summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-format1
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-xBUILD/SETUP.sh6
-rw-r--r--CMakeLists.txt20
-rw-r--r--Docs/INFO_SRC8
-rw-r--r--README.md19
-rw-r--r--VERSION2
-rw-r--r--client/CMakeLists.txt2
-rw-r--r--client/client_priv.h77
-rw-r--r--client/mysql.cc373
-rw-r--r--client/mysql_upgrade.c10
-rw-r--r--client/mysqladmin.cc20
-rw-r--r--client/mysqlbinlog.cc34
-rw-r--r--client/mysqlcheck.c31
-rw-r--r--client/mysqldump.c327
-rw-r--r--client/mysqlimport.c30
-rw-r--r--client/mysqlshow.c14
-rw-r--r--client/mysqlslap.c61
-rw-r--r--client/mysqltest.cc190
-rw-r--r--cmake/FindPMEM.cmake18
-rw-r--r--cmake/libutils.cmake6
-rw-r--r--cmake/mariadb_connector_c.cmake7
-rw-r--r--cmake/os/AIX.cmake3
-rw-r--r--cmake/os/SunOS.cmake4
-rw-r--r--cmake/os/WindowsCache.cmake1
-rw-r--r--cmake/pcre.cmake17
-rw-r--r--cmake/plugin.cmake2
-rw-r--r--cmake/ssl.cmake5
-rw-r--r--cmake/zlib.cmake18
-rw-r--r--config.h.cmake2
-rw-r--r--configure.cmake15
-rw-r--r--debian/README.Contributor2
-rwxr-xr-xdebian/additions/debian-start.inc.sh4
-rwxr-xr-xdebian/additions/innotop/innotop6
-rw-r--r--debian/changelog57
-rw-r--r--debian/control1255
-rw-r--r--debian/gbp.conf9
-rw-r--r--debian/libmariadb-dev.install1
-rw-r--r--debian/mariadb-server.postinst5
-rw-r--r--debian/mariadb-server.postrm4
-rw-r--r--debian/patches/1063738-revert-c432c9ef.patch25
-rw-r--r--debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch51
-rw-r--r--debian/patches/2541-fix-stack-overflow-in-pinbox-allocator.patch8
-rw-r--r--debian/patches/2980-riscv-use-rdtime.patch59
-rw-r--r--debian/patches/3039-os-data-file-no-o-direct.patch32
-rw-r--r--debian/patches/3154-openssl-alert-protocol-string.patch39
-rw-r--r--debian/patches/MDEV-32975-chartset-collation-fix-php.patch45
-rw-r--r--debian/patches/fix-spelling-mariadb.patch74
-rw-r--r--debian/patches/hurd-i386-plugin_disks_information_schema_disks.cc.patch19
-rw-r--r--debian/patches/hurd-i386-storage_connect_ioapi.h.patch22
-rw-r--r--debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch4
-rw-r--r--debian/patches/series8
-rw-r--r--debian/patches/startup-message.patch18
-rw-r--r--debian/po/sw.po110
-rwxr-xr-xdebian/rules14
-rw-r--r--debian/salsa-ci.yml38
-rw-r--r--debian/source/lintian-overrides2
-rw-r--r--debian/tests/control25
-rw-r--r--debian/tests/traces/mariadb-verbose-help.expected159
-rw-r--r--debian/tests/traces/mariadbd-verbose-help.expected31
-rw-r--r--debian/tests/upstream8
-rw-r--r--debian/unstable-tests.armhf18
-rw-r--r--debian/unstable-tests.hppa3
l---------debian/unstable-tests.hurd-i3861
-rw-r--r--extra/CMakeLists.txt2
-rw-r--r--extra/mariabackup/CMakeLists.txt15
-rw-r--r--extra/mariabackup/aria_backup_client.cc1016
-rw-r--r--extra/mariabackup/aria_backup_client.h38
-rw-r--r--extra/mariabackup/backup_copy.cc495
-rw-r--r--extra/mariabackup/backup_copy.h32
-rw-r--r--extra/mariabackup/backup_debug.h21
-rw-r--r--extra/mariabackup/backup_mysql.cc356
-rw-r--r--extra/mariabackup/backup_mysql.h24
-rw-r--r--extra/mariabackup/changed_page_bitmap.cc1040
-rw-r--r--extra/mariabackup/changed_page_bitmap.h85
-rw-r--r--extra/mariabackup/common.h3
-rw-r--r--extra/mariabackup/common_engine.cc512
-rw-r--r--extra/mariabackup/common_engine.h39
-rw-r--r--extra/mariabackup/datasink.cc28
-rw-r--r--extra/mariabackup/datasink.h17
-rw-r--r--extra/mariabackup/ddl_log.cc553
-rw-r--r--extra/mariabackup/ddl_log.h15
-rw-r--r--extra/mariabackup/ds_buffer.cc9
-rw-r--r--extra/mariabackup/ds_compress.cc9
-rw-r--r--extra/mariabackup/ds_local.cc105
-rw-r--r--extra/mariabackup/ds_stdout.cc8
-rw-r--r--extra/mariabackup/ds_tmpfile.cc8
-rw-r--r--extra/mariabackup/ds_xbstream.cc61
-rw-r--r--extra/mariabackup/encryption_plugin.cc (renamed from extra/mariabackup/xb_plugin.cc)66
-rw-r--r--extra/mariabackup/encryption_plugin.h7
-rw-r--r--extra/mariabackup/fil_cur.cc19
-rw-r--r--extra/mariabackup/fil_cur.h1
-rw-r--r--extra/mariabackup/innobackupex.cc78
-rw-r--r--extra/mariabackup/read_filt.cc142
-rw-r--r--extra/mariabackup/read_filt.h29
-rw-r--r--extra/mariabackup/thread_pool.cc50
-rw-r--r--extra/mariabackup/thread_pool.h62
-rw-r--r--extra/mariabackup/write_filt.cc12
-rw-r--r--extra/mariabackup/wsrep.cc48
-rw-r--r--extra/mariabackup/xb_plugin.h5
-rw-r--r--extra/mariabackup/xbstream.cc64
-rw-r--r--extra/mariabackup/xbstream.h19
-rw-r--r--extra/mariabackup/xbstream_read.cc107
-rw-r--r--extra/mariabackup/xbstream_write.cc152
-rw-r--r--extra/mariabackup/xtrabackup.cc1005
-rw-r--r--extra/mariabackup/xtrabackup.h57
-rw-r--r--extra/wolfssl/CMakeLists.txt184
-rw-r--r--extra/wolfssl/user_settings.h.in18
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/async.yml2
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/curl.yml8
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/docker-Espressif.yml6
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/docker-OpenWrt.yml16
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/haproxy.yml4
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/hitch.yml10
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/hostap.yml14
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/krb5.yml20
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/libssh2.yml58
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/main.yml5
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/memcached.yml10
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/multi-arch.yml2
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/multi-compiler.yml2
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/nginx.yml18
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/openssh.yml68
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/openvpn.yml14
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/os-check.yml7
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/packaging.yml2
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/stunnel.yml8
-rw-r--r--extra/wolfssl/wolfssl/.github/workflows/zephyr.yml8
-rw-r--r--extra/wolfssl/wolfssl/.gitignore40
-rw-r--r--extra/wolfssl/wolfssl/CMakeLists.txt227
-rw-r--r--extra/wolfssl/wolfssl/ChangeLog.md94
-rw-r--r--extra/wolfssl/wolfssl/Docker/Dockerfile5
-rw-r--r--extra/wolfssl/wolfssl/Docker/Dockerfile.cross-compiler2
-rw-r--r--extra/wolfssl/wolfssl/Docker/yocto/Dockerfile27
-rwxr-xr-xextra/wolfssl/wolfssl/Docker/yocto/buildAndPush.sh27
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/Arduino_README_prepend.md13
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/README.md185
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/include.am9
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/keywords.txt21
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/library.properties.template9
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/README.md12
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/README.md22
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino928
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/README.md134
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino913
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/README.md3
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/wolfssl_version.ino24
-rwxr-xr-xextra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl-arduino.sh347
-rw-r--r--extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl.h39
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt6
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/CMakeLists.txt6
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/main.c33
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile128
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md122
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.sln5
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/CMakeLists.txt10
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/component.mk230
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h199
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c122
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/component.mk6
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h26
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/main.h4
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/time_helper.h15
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h58
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/main.c114
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/time_helper.c162
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c136
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/sdkconfig.defaults29
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/wolfssl_client_ESP8266.vgdbproj292
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/CMakeLists.txt6
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/CMakeLists.txt6
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/main.c20
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/README.md43
-rw-r--r--extra/wolfssl/wolfssl/IDE/Espressif/include.am1
-rw-r--r--extra/wolfssl/wolfssl/IDE/IAR-EWARM/Projects/user_settings.h52
-rw-r--r--extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/settings/wolfcrypt_benchmark_Debug.jlink39
-rw-r--r--extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/wolfcrypt_benchmark.ewt2382
-rw-r--r--extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_lib_SAMV71_XULT/wolfcrypt_lib.ewt2400
-rw-r--r--extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/settings/wolfcrypt_test_Debug.jlink39
-rw-r--r--extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/wolfcrypt_test.ewt2382
-rw-r--r--extra/wolfssl/wolfssl/IDE/LINUX-SGX/sgx_t_static.mk1
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/README.md62
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/include.am8
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/main.c39
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/user_settings.h414
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/Makefile113
-rwxr-xr-xextra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/configurations.xml285
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/include.am8
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/configurations.xml25
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/private.xml7
-rwxr-xr-xextra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/project.xml33
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/Makefile113
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/configurations.xml290
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/include.am7
-rw-r--r--extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/project.xml34
-rw-r--r--extra/wolfssl/wolfssl/IDE/MSVS-2019-AZSPHERE/shared/util.h1
-rw-r--r--extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h3
-rw-r--r--extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/test/.cproject4
-rw-r--r--extra/wolfssl/wolfssl/IDE/STM32Cube/STM32_Benchmarks.md75
-rw-r--r--extra/wolfssl/wolfssl/IDE/STM32Cube/default_conf.ftl47
-rw-r--r--extra/wolfssl/wolfssl/IDE/WIN10/wolfssl-fips.rc8
-rw-r--r--extra/wolfssl/wolfssl/IDE/include.am3
-rw-r--r--extra/wolfssl/wolfssl/IDE/iotsafe/memory-tls.c5
-rw-r--r--extra/wolfssl/wolfssl/IDE/iotsafe/user_settings.h16
-rw-r--r--extra/wolfssl/wolfssl/Makefile.am4
-rw-r--r--extra/wolfssl/wolfssl/README140
-rw-r--r--extra/wolfssl/wolfssl/README.md187
-rwxr-xr-xextra/wolfssl/wolfssl/autogen.sh28
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/caEcc384Crl.pem12
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/caEccCrl.pem12
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/cliCrl.pem54
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/crl.derbin520 -> 520 bytes
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/crl.pem52
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/crl.revoked56
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/crl2.derbin520 -> 520 bytes
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/crl2.pem102
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/crl_rsapss.pem53
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/eccCliCRL.pem22
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/eccSrvCRL.pem22
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/extra-crls/ca-int-cert-revoked.pem16
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/extra-crls/general-server-crl.pem16
-rwxr-xr-xextra/wolfssl/wolfssl/certs/crl/gencrls.sh17
-rw-r--r--extra/wolfssl/wolfssl/certs/crl/include.am3
-rw-r--r--extra/wolfssl/wolfssl/certs/include.am1
-rwxr-xr-xextra/wolfssl/wolfssl/certs/renewcerts.sh5
-rw-r--r--extra/wolfssl/wolfssl/certs/test-stream-sign.p7bbin0 -> 6228 bytes
-rw-r--r--extra/wolfssl/wolfssl/cmake/config.in6
-rw-r--r--extra/wolfssl/wolfssl/cmake/functions.cmake30
-rw-r--r--extra/wolfssl/wolfssl/configure.ac465
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/cmac.h54
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_groups.h1
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_pages.h1
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/rsa.h2
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/aes.h22
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/cmac.h5
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/ecc.h8
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/hmac.h439
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/iotsafe.h8
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/rsa.h51
-rw-r--r--extra/wolfssl/wolfssl/doc/dox_comments/header_files/ssl.h208
-rw-r--r--extra/wolfssl/wolfssl/examples/asn1/asn1.c4
-rw-r--r--extra/wolfssl/wolfssl/examples/client/client.c18
-rw-r--r--extra/wolfssl/wolfssl/examples/configs/include.am2
-rw-r--r--extra/wolfssl/wolfssl/examples/configs/user_settings_arduino.h486
-rw-r--r--extra/wolfssl/wolfssl/examples/configs/user_settings_tls12.h158
-rw-r--r--extra/wolfssl/wolfssl/examples/pem/pem.c4
-rw-r--r--extra/wolfssl/wolfssl/examples/server/server.c37
-rwxr-xr-xextra/wolfssl/wolfssl/fips-check.sh40
-rw-r--r--extra/wolfssl/wolfssl/lib/dummy2
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/Kbuild21
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/Makefile4
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/include.am3
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/linuxkm_memory.c124
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/linuxkm_wc_port.h280
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/lkcapi_glue.c2739
-rw-r--r--extra/wolfssl/wolfssl/linuxkm/module_hooks.c144
-rwxr-xr-xextra/wolfssl/wolfssl/pre-commit.sh45
-rwxr-xr-xextra/wolfssl/wolfssl/pre-push.sh19
-rw-r--r--extra/wolfssl/wolfssl/rpm/spec.in1
-rwxr-xr-xextra/wolfssl/wolfssl/scripts/makedistsmall.sh1
-rwxr-xr-xextra/wolfssl/wolfssl/scripts/openssl.test2
-rw-r--r--extra/wolfssl/wolfssl/src/bio.c69
-rw-r--r--extra/wolfssl/wolfssl/src/crl.c64
-rw-r--r--extra/wolfssl/wolfssl/src/dtls.c8
-rw-r--r--extra/wolfssl/wolfssl/src/dtls13.c1
-rw-r--r--extra/wolfssl/wolfssl/src/include.am59
-rw-r--r--extra/wolfssl/wolfssl/src/internal.c880
-rw-r--r--extra/wolfssl/wolfssl/src/pk.c93
-rw-r--r--extra/wolfssl/wolfssl/src/quic.c13
-rw-r--r--extra/wolfssl/wolfssl/src/sniffer.c19
-rw-r--r--extra/wolfssl/wolfssl/src/ssl.c852
-rw-r--r--extra/wolfssl/wolfssl/src/ssl_bn.c3
-rw-r--r--extra/wolfssl/wolfssl/src/ssl_certman.c87
-rw-r--r--extra/wolfssl/wolfssl/src/tls.c328
-rw-r--r--extra/wolfssl/wolfssl/src/tls13.c934
-rw-r--r--extra/wolfssl/wolfssl/src/wolfio.c53
-rw-r--r--extra/wolfssl/wolfssl/src/x509.c152
-rw-r--r--extra/wolfssl/wolfssl/src/x509_str.c10
-rw-r--r--extra/wolfssl/wolfssl/support/wolfssl.pc.in1
-rw-r--r--extra/wolfssl/wolfssl/tests/api.c2731
-rw-r--r--extra/wolfssl/wolfssl/tests/srp.c2
-rw-r--r--extra/wolfssl/wolfssl/tests/suites.c2
-rw-r--r--extra/wolfssl/wolfssl/tests/test-dtls.conf14
-rw-r--r--extra/wolfssl/wolfssl/tests/test.conf12
-rw-r--r--extra/wolfssl/wolfssl/tests/unit.h3
-rw-r--r--extra/wolfssl/wolfssl/tests/utils.h70
-rw-r--r--extra/wolfssl/wolfssl/testsuite/testsuite.c4
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.c2552
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/aes.c251
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/aes_asm.S6
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/aes_gcm_x86_asm.S300
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/asn.c1298
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/chacha.c9
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/chacha20_poly1305.c52
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/cmac.c162
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/cpuid.c1
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/cryptocb.c314
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/curve25519.c8
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/dh.c18
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/dilithium.c206
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/dsa.c8
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/ecc.c284
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/eccsi.c8
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/ed25519.c26
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/ed448.c36
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/error.c3
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/evp.c92
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/ext_kyber.c76
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/ext_xmss.c64
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/falcon.c190
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/fe_x25519_asm.S36
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/ge_448.c46
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/hash.c305
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/hmac.c27
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/include.am6
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/integer.c3
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/kdf.c121
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/logging.c13
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/md5.c5
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/memory.c57
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/misc.c62
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/pkcs12.c2
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/pkcs7.c2177
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_mp.c10
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c36
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_util.c17
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-crypt.c5
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-cryptocb.c28
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-aes.c76
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-chacha.c34
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-sha256.c198
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm.S29
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm_c.c104
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha256-asm_c.c5
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha512-asm_c.c3
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/README.md45
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/cryif.c103
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/crypto.c495
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/csm.c298
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/include.am23
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/test.c430
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/iotsafe/iotsafe.c44
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/liboqs/liboqs.c132
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/st/stm32.c52
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-aes.c1066
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-hash.c39
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/port/xilinx/xil-aesgcm.c33
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/random.c359
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/rsa.c93
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sakke.c9
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sha.c66
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sha256.c407
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sha256_asm.S942
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sha512.c83
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/siphash.c12
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm32.c48
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm64.c42
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_armthumb.c48
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_c32.c24
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_c64.c24
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_cortexm.c48
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_dsp32.c6
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_int.c59
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sp_x86_64.c32
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/sphincs.c23
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/tfm.c24
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_dsp.c6
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber.c1247
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_asm.S27812
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_poly.c3020
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms.c2
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms_impl.c26
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_port.c78
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/src/wc_xmss_impl.c26
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/test/test.c1393
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/Makefile.am9
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/README.txt78
-rwxr-xr-xextra/wolfssl/wolfssl/wolfcrypt/user-crypto/autogen.sh23
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/configure.ac44
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include.am13
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include/user_rsa.h137
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/lib/.gitkeep0
-rw-r--r--extra/wolfssl/wolfssl/wolfcrypt/user-crypto/src/rsa.c2797
-rw-r--r--extra/wolfssl/wolfssl/wolfssl.rcbin4918 -> 4918 bytes
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/internal.h121
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/openssl/bio.h1
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/openssl/crypto.h8
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/openssl/opensslv.h9
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/openssl/ssl.h3
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/quic.h11
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/ssl.h58
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/test.h147
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/version.h4
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/aes.h14
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn.h76
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn_public.h30
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cmac.h14
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cpuid.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cryptocb.h106
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/dilithium.h41
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ecc.h6
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed25519.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed448.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/error-crypt.h11
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ext_kyber.h10
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/falcon.h42
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ge_448.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hash.h33
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hmac.h8
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/include.am12
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kdf.h11
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kyber.h6
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/logging.h5
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/memory.h47
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/misc.h3
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/pkcs7.h21
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h38
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/CryIf.h49
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Crypto.h55
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Csm.h295
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/StandardTypes.h66
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/iotsafe/iotsafe.h5
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/liboqs/liboqs.h62
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/psa/psa.h7
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/random.h5
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/rsa.h9
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/settings.h310
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha.h66
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha256.h6
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha512.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sp_int.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sphincs.h5
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/tfm.h5
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/types.h332
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_kyber.h280
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_lms.h2
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_port.h127
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfcrypt/xmss.h95
-rw-r--r--extra/wolfssl/wolfssl/wolfssl/wolfio.h12
-rw-r--r--extra/wolfssl/wolfssl/zephyr/CMakeLists.txt4
-rw-r--r--extra/wolfssl/wolfssl/zephyr/samples/wolfssl_benchmark/prj.conf1
-rw-r--r--include/my_attribute.h14
-rw-r--r--include/my_base.h7
-rw-r--r--include/my_bitmap.h67
-rw-r--r--include/my_global.h2
-rw-r--r--include/my_rdtsc.h12
-rw-r--r--include/my_sys.h3
-rw-r--r--include/mysql/service_print_check_msg.h44
-rw-r--r--include/mysql_com.h1
-rw-r--r--include/service_versions.h1
-rw-r--r--include/source_revision.h1
-rw-r--r--include/sslopt-longopts.h10
-rw-r--r--include/violite.h8
-rw-r--r--libmariadb/.gitattributes9
-rw-r--r--libmariadb/.gitignore116
-rw-r--r--libmariadb/CMakeLists.txt4
-rw-r--r--libmariadb/include/CMakeLists.txt1
-rw-r--r--libmariadb/include/errmsg.h3
-rw-r--r--libmariadb/include/ma_hash.h22
-rw-r--r--libmariadb/include/mariadb_com.h8
-rw-r--r--libmariadb/include/mysql/client_plugin.h2
-rw-r--r--libmariadb/include/mysql/plugin_auth_common.h110
-rw-r--r--libmariadb/libmariadb/ma_default.c1
-rw-r--r--libmariadb/libmariadb/ma_errmsg.c3
-rw-r--r--libmariadb/libmariadb/mariadb_async.c2
-rw-r--r--libmariadb/libmariadb/mariadb_lib.c17
-rw-r--r--libmariadb/libmariadb/secure/openssl.c2
-rw-r--r--libmariadb/plugins/io/remote_io.c4
-rw-r--r--libmariadb/plugins/pvio/pvio_socket.c2
-rw-r--r--libmariadb/plugins/trace/trace_example.c2
-rw-r--r--libmariadb/unittest/libmariadb/bulk1.c4
-rw-r--r--libmariadb/unittest/libmariadb/connection.c26
-rw-r--r--libmariadb/unittest/libmariadb/ps_bugs.c4
-rw-r--r--libmysqld/CMakeLists.txt4
-rw-r--r--libmysqld/embedded_priv.h2
-rw-r--r--libmysqld/lib_sql.cc26
-rw-r--r--libmysqld/libmysqld.c4
-rw-r--r--libservices/CMakeLists.txt1
-rw-r--r--libservices/print_check_msg_service.c18
-rw-r--r--man/CMakeLists.txt3
-rw-r--r--man/my_print_defaults.118
-rw-r--r--man/wsrep_sst_backup.116
-rw-r--r--mysql-test/collections/buildbot_suites.bat2
-rwxr-xr-xmysql-test/dgcov.pl3
-rw-r--r--mysql-test/include/aria_log_control_load.inc11
-rw-r--r--mysql-test/include/check-testcase.test12
-rw-r--r--mysql-test/include/commit.inc20
-rw-r--r--mysql-test/include/crash_mysqld.inc2
-rw-r--r--mysql-test/include/deadlock.inc1
-rw-r--r--mysql-test/include/default_mysqld.cnf4
-rw-r--r--mysql-test/include/expect_crash.inc2
-rw-r--r--mysql-test/include/have_innodb.combinations39
-rw-r--r--mysql-test/include/have_innodb.inc5
-rw-r--r--mysql-test/include/have_innodb.opt17
-rw-r--r--mysql-test/include/innodb_rollback_on_timeout.inc2
-rw-r--r--mysql-test/include/kill_and_restart_mysqld.inc2
-rw-r--r--mysql-test/include/kill_galera.inc2
-rw-r--r--mysql-test/include/kill_mysqld.inc2
-rw-r--r--mysql-test/include/rpl_change_topology.inc7
-rw-r--r--mysql-test/include/rpl_clone_slave_using_mariadb-backup.inc297
-rw-r--r--mysql-test/include/rpl_start_server.inc2
-rw-r--r--mysql-test/include/rpl_stop_server.inc2
-rw-r--r--mysql-test/include/search_pattern_in_file.inc64
-rw-r--r--mysql-test/include/shutdown_mysqld.inc9
-rw-r--r--mysql-test/include/slow_environ.inc9
-rw-r--r--mysql-test/include/start_mysqld.inc4
-rw-r--r--mysql-test/include/stop_slave_io.inc11
-rw-r--r--mysql-test/include/sync_slave_sql_with_io.inc7
-rw-r--r--mysql-test/include/sync_with_master_gtid.inc7
-rw-r--r--mysql-test/include/wait_for_pattern_in_file.inc13
-rw-r--r--mysql-test/include/wait_for_slave_param.inc7
-rw-r--r--mysql-test/include/wait_until_connected_again.inc2
-rw-r--r--mysql-test/lib/My/Debugger.pm1
-rw-r--r--mysql-test/lib/My/Platform.pm10
-rw-r--r--mysql-test/lib/mtr_report.pm4
-rw-r--r--mysql-test/main/alter_table.result8
-rw-r--r--mysql-test/main/alter_table.test9
-rw-r--r--mysql-test/main/bootstrap.test2
-rw-r--r--mysql-test/main/column_compression_parts.result1
-rw-r--r--mysql-test/main/commit_1innodb.result13
-rw-r--r--mysql-test/main/constraints.result13
-rw-r--r--mysql-test/main/constraints.test15
-rw-r--r--mysql-test/main/crash_commit_before.test2
-rw-r--r--mysql-test/main/create.result2
-rw-r--r--mysql-test/main/ctype_collate.result24
-rw-r--r--mysql-test/main/ctype_collate.test15
-rw-r--r--mysql-test/main/ctype_ucs.result20
-rw-r--r--mysql-test/main/ctype_ucs.test17
-rw-r--r--mysql-test/main/ddl_i18n_koi8r.result6
-rw-r--r--mysql-test/main/ddl_i18n_utf8.result6
-rw-r--r--mysql-test/main/deadlock_innodb.result5
-rw-r--r--mysql-test/main/derived_split_innodb.result57
-rw-r--r--mysql-test/main/derived_split_innodb.test42
-rw-r--r--mysql-test/main/derived_view.result66
-rw-r--r--mysql-test/main/derived_view.test72
-rw-r--r--mysql-test/main/distinct_notembedded.result322
-rw-r--r--mysql-test/main/distinct_notembedded.test109
-rw-r--r--mysql-test/main/dyncol.result28
-rw-r--r--mysql-test/main/dyncol.test21
-rw-r--r--mysql-test/main/empty_server_name-8224.test4
-rw-r--r--mysql-test/main/empty_string_literal.result26
-rw-r--r--mysql-test/main/empty_string_literal.test15
-rw-r--r--mysql-test/main/func_encrypt_nossl.result42
-rw-r--r--mysql-test/main/func_extract.result882
-rw-r--r--mysql-test/main/func_extract.test251
-rw-r--r--mysql-test/main/func_gconcat.result95
-rw-r--r--mysql-test/main/func_gconcat.test56
-rw-r--r--mysql-test/main/func_hybrid_type.result25
-rw-r--r--mysql-test/main/func_hybrid_type.test23
-rw-r--r--mysql-test/main/func_in.result78
-rw-r--r--mysql-test/main/func_in.test60
-rw-r--r--mysql-test/main/func_json.result29
-rw-r--r--mysql-test/main/func_json.test51
-rw-r--r--mysql-test/main/func_json_notembedded.result3
-rw-r--r--mysql-test/main/func_json_notembedded.test4
-rw-r--r--mysql-test/main/func_math.result15
-rw-r--r--mysql-test/main/func_math.test10
-rw-r--r--mysql-test/main/func_regexp.result52
-rw-r--r--mysql-test/main/func_regexp.test47
-rw-r--r--mysql-test/main/func_sformat.result38
-rw-r--r--mysql-test/main/func_sformat.test56
-rw-r--r--mysql-test/main/func_str.result36
-rw-r--r--mysql-test/main/func_str.test22
-rw-r--r--mysql-test/main/func_time.result74
-rw-r--r--mysql-test/main/func_time.test39
-rw-r--r--mysql-test/main/function_defaults.result25
-rw-r--r--mysql-test/main/function_defaults.test23
-rw-r--r--mysql-test/main/gis.result32
-rw-r--r--mysql-test/main/host_cache_size_functionality.test8
-rw-r--r--mysql-test/main/information_schema2.result18
-rw-r--r--mysql-test/main/information_schema2.test23
-rw-r--r--mysql-test/main/init_file_set_password-7656.test4
-rw-r--r--mysql-test/main/innodb_ext_key,covering,on.rdiff (renamed from mysql-test/main/innodb_ext_key,covering,innodb,on.rdiff)0
-rw-r--r--mysql-test/main/innodb_ext_key,off.rdiff6
-rw-r--r--mysql-test/main/innodb_ext_key,on,unoptimized.rdiff (renamed from mysql-test/main/innodb_ext_key,innodb,on,unoptimized.rdiff)0
-rw-r--r--mysql-test/main/innodb_ext_key.result28
-rw-r--r--mysql-test/main/innodb_ext_key.test30
-rw-r--r--mysql-test/main/insert_select.result8
-rw-r--r--mysql-test/main/join.result58
-rw-r--r--mysql-test/main/join.test46
-rw-r--r--mysql-test/main/join_cache.result22
-rw-r--r--mysql-test/main/join_cache.test21
-rw-r--r--mysql-test/main/join_outer.test18
-rw-r--r--mysql-test/main/kill_processlist-6619.test14
-rw-r--r--mysql-test/main/load_timezones_with_alter_algorithm_inplace.result18
-rw-r--r--mysql-test/main/load_timezones_with_alter_algorithm_inplace.test40
-rw-r--r--mysql-test/main/lock_sync.result24
-rw-r--r--mysql-test/main/lock_sync.test27
-rw-r--r--mysql-test/main/lock_view.result2
-rw-r--r--mysql-test/main/log_errchk.test4
-rw-r--r--mysql-test/main/long_unique_bugs.result55
-rw-r--r--mysql-test/main/long_unique_bugs.test47
-rw-r--r--mysql-test/main/lowercase_fs_on.test4
-rw-r--r--[-rwxr-xr-x]mysql-test/main/lowercase_table2.result0
-rw-r--r--mysql-test/main/mdl_sync.result4
-rw-r--r--mysql-test/main/mdl_sync.test7
-rw-r--r--mysql-test/main/myisam.result1
-rw-r--r--mysql-test/main/myisam.test3
-rw-r--r--mysql-test/main/myisam_crash_before_flush_keys.test4
-rw-r--r--mysql-test/main/mysql-interactive.test2
-rw-r--r--mysql-test/main/mysql.result32
-rw-r--r--mysql-test/main/mysql.test44
-rw-r--r--mysql-test/main/mysql_client_test.result1
-rw-r--r--mysql-test/main/mysql_client_test.test8
-rw-r--r--mysql-test/main/mysql_client_test_comp.test2
-rw-r--r--mysql-test/main/mysql_client_test_nonblock.test2
-rw-r--r--mysql-test/main/mysql_connector_net.test2
-rw-r--r--mysql-test/main/mysql_install_db_win_admin.result6
-rw-r--r--mysql-test/main/mysql_install_db_win_admin.test5
-rw-r--r--mysql-test/main/mysql_tzinfo_to_sql_symlink.result12
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.result194
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.test5
-rw-r--r--mysql-test/main/mysqlbinlog_row_minimal.result2
-rw-r--r--mysql-test/main/mysqlbinlog_stmt_compressed.result128
-rw-r--r--mysql-test/main/mysqlbinlog_stmt_compressed.test3
-rw-r--r--mysql-test/main/mysqld--help.result22
-rw-r--r--mysql-test/main/mysqld_option_err.result11
-rw-r--r--mysql-test/main/mysqld_option_err.test34
-rw-r--r--mysql-test/main/mysqldump-compat-102.result1
-rw-r--r--mysql-test/main/mysqldump-max.result24
-rw-r--r--mysql-test/main/mysqldump-nl.result2
-rw-r--r--mysql-test/main/mysqldump-no-binlog.result1
-rw-r--r--mysql-test/main/mysqldump-order-by-size.result1
-rw-r--r--mysql-test/main/mysqldump-system.result23
-rw-r--r--mysql-test/main/mysqldump-timing.result2
-rw-r--r--mysql-test/main/mysqldump-utf8mb4.result1
-rw-r--r--mysql-test/main/mysqldump.result130
-rw-r--r--mysql-test/main/mysqldump.test31
-rw-r--r--mysql-test/main/openssl_1.result3
-rw-r--r--mysql-test/main/openssl_1.test2
-rw-r--r--mysql-test/main/opt_trace.result37
-rw-r--r--mysql-test/main/opt_trace.test10
-rw-r--r--mysql-test/main/partition.result1
-rw-r--r--mysql-test/main/partition_binlog.result1
-rw-r--r--mysql-test/main/plugin_auth.result1
-rw-r--r--mysql-test/main/plugin_loaderr.test4
-rw-r--r--mysql-test/main/ps.result181
-rw-r--r--mysql-test/main/ps.test185
-rw-r--r--mysql-test/main/ps_2myisam.result4
-rw-r--r--mysql-test/main/ps_3innodb.result4
-rw-r--r--mysql-test/main/ps_4heap.result4
-rw-r--r--mysql-test/main/ps_5merge.result8
-rw-r--r--mysql-test/main/query_cache.result33
-rw-r--r--mysql-test/main/query_cache.test43
-rw-r--r--mysql-test/main/read_only_innodb.result25
-rw-r--r--mysql-test/main/read_only_innodb.test28
-rw-r--r--mysql-test/main/rowid_filter_innodb.result102
-rw-r--r--mysql-test/main/rowid_filter_innodb.test80
-rw-r--r--mysql-test/main/rpl_mysqldump_slave.result179
-rw-r--r--mysql-test/main/rpl_mysqldump_slave.test73
-rw-r--r--mysql-test/main/secondary_key_costs.result35
-rw-r--r--mysql-test/main/secondary_key_costs.test21
-rw-r--r--mysql-test/main/selectivity_innodb_notembedded.result131
-rw-r--r--mysql-test/main/selectivity_notembedded.result131
-rw-r--r--mysql-test/main/selectivity_notembedded.test102
-rw-r--r--mysql-test/main/show_analyze.result8
-rw-r--r--mysql-test/main/show_analyze.test12
-rw-r--r--mysql-test/main/show_explain_json.result8
-rw-r--r--mysql-test/main/show_explain_json.test12
-rw-r--r--mysql-test/main/shutdown.test4
-rw-r--r--mysql-test/main/skip_grants.test4
-rw-r--r--mysql-test/main/sp.result3
-rw-r--r--mysql-test/main/sp.test2
-rw-r--r--mysql-test/main/ssl_and_innodb.test2
-rw-r--r--mysql-test/main/ssl_crl.result2
-rw-r--r--mysql-test/main/ssl_crl.test4
-rw-r--r--mysql-test/main/ssl_timeout.result2
-rw-r--r--mysql-test/main/ssl_timeout.test3
-rw-r--r--mysql-test/main/stat_tables_partition.result3
-rw-r--r--mysql-test/main/stat_tables_rbr.result1
-rw-r--r--mysql-test/main/subselect4.result79
-rw-r--r--mysql-test/main/subselect4.test15
-rw-r--r--mysql-test/main/subselect_elimination.result268
-rw-r--r--mysql-test/main/subselect_elimination.test242
-rw-r--r--mysql-test/main/subselect_sj_mat.test9
-rw-r--r--mysql-test/main/system_mysql_db_fix50030.result2
-rw-r--r--mysql-test/main/system_mysql_db_fix50117.result2
-rw-r--r--mysql-test/main/system_mysql_db_fix50568.result2
-rw-r--r--mysql-test/main/table_value_constr.result4
-rw-r--r--mysql-test/main/table_value_constr.test4
-rw-r--r--mysql-test/main/temp_table.result49
-rw-r--r--mysql-test/main/temp_table.test54
-rw-r--r--mysql-test/main/trigger.result6
-rw-r--r--mysql-test/main/trigger.test9
-rw-r--r--mysql-test/main/trigger_wl3253.result2
-rw-r--r--mysql-test/main/type_decimal.result173
-rw-r--r--mysql-test/main/type_decimal.test90
-rw-r--r--mysql-test/main/type_json.result2
-rw-r--r--mysql-test/main/type_timestamp.result116
-rw-r--r--mysql-test/main/type_timestamp.test92
-rw-r--r--mysql-test/main/type_varchar_mysql41.result149
-rw-r--r--mysql-test/main/type_varchar_mysql41.test85
-rw-r--r--mysql-test/main/udf.result64
-rw-r--r--mysql-test/main/udf.test34
-rwxr-xr-xmysql-test/mariadb-test-run.pl19
-rw-r--r--mysql-test/std_data/autoinc_import_101.frmbin0 -> 922 bytes
-rw-r--r--mysql-test/std_data/autoinc_import_57.frmbin0 -> 8556 bytes
-rw-r--r--mysql-test/std_data/mdev-25731.dat6
-rw-r--r--mysql-test/suite.pm9
-rw-r--r--mysql-test/suite/archive/archive.test2
-rw-r--r--mysql-test/suite/archive/archive_bitfield.result1
-rw-r--r--mysql-test/suite/atomic/alter_table.test7
-rw-r--r--mysql-test/suite/binlog/include/binlog_index.inc12
-rw-r--r--mysql-test/suite/binlog/include/print_optional_metadata.inc3
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result119
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result119
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_annotate.result12
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result4
-rw-r--r--mysql-test/suite/binlog/t/binlog_autocommit_off_no_hang.test4
-rw-r--r--mysql-test/suite/binlog/t/binlog_rotate_perf.test4
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_row_annotate.result6
-rw-r--r--mysql-test/suite/binlog_encryption/restart_server.inc4
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_gtid_basic.result6
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_packet.result2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result8
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/empty_string_literal.result6
-rw-r--r--mysql-test/suite/compat/oracle/r/gis.result32
-rw-r--r--mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result1
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result1
-rw-r--r--mysql-test/suite/encryption/r/corrupted_during_recovery.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result24
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change2.result18
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-compressed-blob.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result7
-rw-r--r--mysql-test/suite/encryption/r/innodb-force-corrupt.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-missing-key.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-redo-nokeys.result11
-rw-r--r--mysql-test/suite/encryption/t/corrupted_during_recovery.test2
-rw-r--r--mysql-test/suite/encryption/t/encrypt_and_grep.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change2.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change3.test12
-rw-r--r--mysql-test/suite/encryption/t/innodb-compressed-blob.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test7
-rw-r--r--mysql-test/suite/encryption/t/innodb-force-corrupt.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-missing-key.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-redo-nokeys.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_freed.test2
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_change_master.result5
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_get_lock.result3
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_partition_analyze.result1
-rw-r--r--mysql-test/suite/federated/federatedx.result1
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.result65
-rw-r--r--mysql-test/suite/federated/federatedx_create_handlers.test61
-rw-r--r--mysql-test/suite/galera/disabled.def6
-rw-r--r--mysql-test/suite/galera/galera_4nodes.cnf4
-rw-r--r--mysql-test/suite/galera/include/kill_galera.inc2
-rw-r--r--mysql-test/suite/galera/include/shutdown_mysqld.inc18
-rw-r--r--mysql-test/suite/galera/include/start_mysqld.inc4
-rw-r--r--mysql-test/suite/galera/r/MDEV-22232.result12
-rw-r--r--mysql-test/suite/galera/r/MDEV-24143.result2
-rw-r--r--mysql-test/suite/galera/r/MDEV-25731.result47
-rw-r--r--mysql-test/suite/galera/r/MDEV-26499.result6
-rw-r--r--mysql-test/suite/galera/r/MDEV-27276.result6
-rw-r--r--mysql-test/suite/galera/r/MDEV-27806.result2
-rw-r--r--mysql-test/suite/galera/r/MDEV-33136.result21
-rw-r--r--mysql-test/suite/galera/r/MDEV-33828.result41
-rw-r--r--mysql-test/suite/galera/r/MW-336.result46
-rw-r--r--mysql-test/suite/galera/r/MW-369.result126
-rw-r--r--mysql-test/suite/galera/r/MW-402.result108
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_mariabackup.result24
-rw-r--r--mysql-test/suite/galera/r/galera_load_data.result305
-rw-r--r--mysql-test/suite/galera/r/galera_mdl_race.result50
-rw-r--r--mysql-test/suite/galera/r/galera_myisam_autocommit.result37
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_query_cache_invalidate.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sequence_engine.result12
-rw-r--r--mysql-test/suite/galera/r/galera_shutdown_nonprim.result7
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff11
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mariabackup.result20
-rw-r--r--mysql-test/suite/galera/r/galera_table_with_hyphen.result52
-rw-r--r--mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result5
-rw-r--r--mysql-test/suite/galera/r/galera_wan_restart_sst.result9
-rw-r--r--mysql-test/suite/galera/r/mdev-22063.result241
-rw-r--r--mysql-test/suite/galera/r/mdev-31285.result21
-rw-r--r--mysql-test/suite/galera/r/mysql-wsrep#332.result12
-rw-r--r--mysql-test/suite/galera/r/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.result211
-rw-r--r--mysql-test/suite/galera/r/versioning_trx_id.result6
-rw-r--r--mysql-test/suite/galera/suite.pm2
-rw-r--r--mysql-test/suite/galera/t/MDEV-22232.test26
-rw-r--r--mysql-test/suite/galera/t/MDEV-24143.test6
-rw-r--r--mysql-test/suite/galera/t/MDEV-25731.test34
-rw-r--r--mysql-test/suite/galera/t/MDEV-26499.test20
-rw-r--r--mysql-test/suite/galera/t/MDEV-26597.test2
-rw-r--r--mysql-test/suite/galera/t/MDEV-27276.test43
-rw-r--r--mysql-test/suite/galera/t/MDEV-29142.test4
-rw-r--r--mysql-test/suite/galera/t/MDEV-33136.test44
-rw-r--r--mysql-test/suite/galera/t/MDEV-33828.cnf4
-rw-r--r--mysql-test/suite/galera/t/MDEV-33828.test45
-rw-r--r--mysql-test/suite/galera/t/MW-336.cnf2
-rw-r--r--mysql-test/suite/galera/t/MW-336.test62
-rw-r--r--mysql-test/suite/galera/t/MW-369.inc40
-rw-r--r--mysql-test/suite/galera/t/MW-369.test1
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_mariabackup.test15
-rw-r--r--mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf2
-rw-r--r--mysql-test/suite/galera/t/galera_ist_restart_joiner.test2
-rw-r--r--mysql-test/suite/galera/t/galera_load_data.test304
-rw-r--r--mysql-test/suite/galera/t/galera_mdl_race.test60
-rw-r--r--mysql-test/suite/galera/t/galera_myisam_autocommit.test26
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_simple.test2
-rw-r--r--mysql-test/suite/galera/t/galera_pc_recovery.test8
-rw-r--r--mysql-test/suite/galera/t/galera_restart_on_unknown_option.test4
-rw-r--r--mysql-test/suite/galera/t/galera_sequence_engine.test16
-rw-r--r--mysql-test/suite/galera/t/galera_shutdown_nonprim.test16
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup.cnf5
-rw-r--r--mysql-test/suite/galera/t/galera_sst_mariabackup.test27
-rw-r--r--mysql-test/suite/galera/t/galera_table_with_hyphen.inc48
-rw-r--r--mysql-test/suite/galera/t/galera_table_with_hyphen.test34
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf6
-rw-r--r--mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test18
-rw-r--r--mysql-test/suite/galera/t/galera_wan_restart_sst.test36
-rw-r--r--mysql-test/suite/galera/t/galera_wsrep_new_cluster.test2
-rw-r--r--mysql-test/suite/galera/t/mdev-22063.test184
-rw-r--r--mysql-test/suite/galera/t/mdev-22543.test2
-rw-r--r--mysql-test/suite/galera/t/mdev-30013.test1
-rw-r--r--mysql-test/suite/galera/t/mdev-31285.test33
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#332.test113
-rw-r--r--mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf10
-rw-r--r--mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.test9
-rw-r--r--mysql-test/suite/galera/t/versioning_trx_id.test12
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def1
-rw-r--r--mysql-test/suite/galera_3nodes/r/MDEV-29171.result20
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_allowlist.result3
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ist_gcache_rollover.result27
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result4
-rw-r--r--mysql-test/suite/galera_3nodes/t/MDEV-29171.test37
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_allowlist.test9
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf3
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf14
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test33
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test5
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-336.result2
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/GCF-832.result10
-rw-r--r--mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result17
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-336.test6
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/GCF-832.test19
-rw-r--r--mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test16
-rw-r--r--mysql-test/suite/galera_sr/r/galera_sr_bf_abort_idle.result33
-rw-r--r--mysql-test/suite/galera_sr/t/MDEV-25718.test5
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_bf_abort_idle.test68
-rw-r--r--mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test4
-rw-r--r--mysql-test/suite/gcol/inc/innodb_v_large_col.inc2
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result10
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test8
-rw-r--r--mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc3
-rw-r--r--mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc3
-rw-r--r--mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc3
-rw-r--r--mysql-test/suite/innodb/include/no_checkpoint_start.inc23
-rw-r--r--mysql-test/suite/innodb/r/alter_copy.result2
-rw-r--r--mysql-test/suite/innodb/r/alter_kill.result4
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff121
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff181
-rw-r--r--mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff164
-rw-r--r--mysql-test/suite/innodb/r/autoinc_debug.result57
-rw-r--r--mysql-test/suite/innodb/r/autoinc_import.result232
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff6
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize.result2
-rw-r--r--mysql-test/suite/innodb/r/cursor-restore-unique-null.result24
-rw-r--r--mysql-test/suite/innodb/r/foreign_key.result21
-rw-r--r--mysql-test/suite/innodb/r/full_crc32_import.result20
-rw-r--r--mysql-test/suite/innodb/r/import_bugs.result52
-rw-r--r--mysql-test/suite/innodb/r/import_hidden_fts.result45
-rw-r--r--mysql-test/suite/innodb/r/import_hidden_fts_debug.result76
-rw-r--r--mysql-test/suite/innodb/r/index_length.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-debug.result15
-rw-r--r--mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff5
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff17
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30113362.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb_timeout_rollback.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_ut_format_name.result5
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff12
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty.result53
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_crash.result24
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff4
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_debug.result53
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_extend.resultbin9115 -> 9503 bytes
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_import.result1
-rw-r--r--mysql-test/suite/innodb/r/lock_insert_into_empty.result5
-rw-r--r--mysql-test/suite/innodb/r/lock_isolation.result136
-rw-r--r--mysql-test/suite/innodb/r/log_upgrade_101_flags.result12
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff (renamed from mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/monitor.result56
-rw-r--r--mysql-test/suite/innodb/r/rename_table.result10
-rw-r--r--mysql-test/suite/innodb/r/restart,16k.rdiff (renamed from mysql-test/suite/innodb/r/restart,16k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,32k.rdiff (renamed from mysql-test/suite/innodb/r/restart,32k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,4k.rdiff (renamed from mysql-test/suite/innodb/r/restart,4k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,64k.rdiff (renamed from mysql-test/suite/innodb/r/restart,64k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/restart,8k.rdiff (renamed from mysql-test/suite/innodb/r/restart,8k,innodb.rdiff)0
-rw-r--r--mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff2
-rw-r--r--mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result8
-rw-r--r--mysql-test/suite/innodb/r/undo_space_dblwr.result9
-rw-r--r--mysql-test/suite/innodb/r/undo_truncate.result3
-rw-r--r--mysql-test/suite/innodb/t/alter_copy.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_crash.test6
-rw-r--r--mysql-test/suite/innodb/t/alter_kill.test2
-rw-r--r--mysql-test/suite/innodb/t/alter_rename_existing.test2
-rw-r--r--mysql-test/suite/innodb/t/autoinc_debug.test66
-rw-r--r--mysql-test/suite/innodb/t/autoinc_import.test168
-rw-r--r--mysql-test/suite/innodb/t/corrupted_during_recovery.test2
-rw-r--r--mysql-test/suite/innodb/t/cursor-restore-unique-null.test36
-rw-r--r--mysql-test/suite/innodb/t/doublewrite_debug.test4
-rw-r--r--mysql-test/suite/innodb/t/foreign_key.test21
-rw-r--r--mysql-test/suite/innodb/t/full_crc32_import.test12
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash.test2
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test2
-rw-r--r--mysql-test/suite/innodb/t/import_bugs.test62
-rw-r--r--mysql-test/suite/innodb/t/import_hidden_fts.test46
-rw-r--r--mysql-test/suite/innodb/t/import_hidden_fts_debug.test101
-rw-r--r--mysql-test/suite/innodb/t/index_length.test8
-rw-r--r--mysql-test/suite/innodb/t/index_merge_threshold.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-debug.test22
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-tempfile.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-corrupted-table.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-lru-force-no-free-page.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test6
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60196.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_defrag_stats.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_fetch.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb_timeout_rollback.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb_ut_format_name.test17
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty.test61
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_crash.test26
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_debug.test53
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_extend.test13
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_import.test1
-rw-r--r--mysql-test/suite/innodb/t/lock_insert_into_empty.test4
-rw-r--r--mysql-test/suite/innodb/t/lock_isolation.test149
-rw-r--r--mysql-test/suite/innodb/t/log_file_name.test2
-rw-r--r--mysql-test/suite/innodb/t/log_upgrade_101_flags.test91
-rw-r--r--mysql-test/suite/innodb/t/monitor.test62
-rw-r--r--mysql-test/suite/innodb/t/purge_secondary.test4
-rw-r--r--mysql-test/suite/innodb/t/rename_table.test9
-rw-r--r--mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test16
-rw-r--r--mysql-test/suite/innodb/t/temporary_table.test2
-rw-r--r--mysql-test/suite/innodb/t/undo_space_dblwr.test12
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate.test5
-rw-r--r--mysql-test/suite/innodb/t/undo_truncate_recover.test2
-rw-r--r--mysql-test/suite/innodb_fts/r/create,orig.rdiff11
-rw-r--r--mysql-test/suite/innodb_fts/r/create.result2
-rw-r--r--mysql-test/suite/innodb_fts/r/foreign_key_update.result12
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers.rdiff57
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers_trx.rdiff57
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers.rdiff10
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers_trx.rdiff10
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug,vers.rdiff66
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug,vers_trx.rdiff66
-rw-r--r--mysql-test/suite/innodb_fts/r/sync_ddl,vers.rdiff12
-rw-r--r--mysql-test/suite/innodb_fts/r/sync_ddl,vers_trx.rdiff12
-rw-r--r--mysql-test/suite/innodb_fts/r/sync_ddl.result5
-rw-r--r--mysql-test/suite/innodb_fts/t/create.test6
-rw-r--r--mysql-test/suite/innodb_fts/t/foreign_key_update.test13
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test33
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb-fts-fic.test5
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test16
-rw-r--r--mysql-test/suite/innodb_fts/t/sync.test2
-rw-r--r--mysql-test/suite/innodb_fts/t/sync_ddl.test5
-rw-r--r--mysql-test/suite/innodb_gis/t/rollback.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_2.test5
-rw-r--r--mysql-test/suite/innodb_zip/t/restart.test18
-rw-r--r--mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test6
-rw-r--r--mysql-test/suite/json/r/json_no_table.result20
-rw-r--r--mysql-test/suite/json/r/type_json.result8
-rw-r--r--mysql-test/suite/json/t/type_json.test9
-rw-r--r--mysql-test/suite/large_tests/r/maria_recover_encrypted.result2
-rw-r--r--mysql-test/suite/large_tests/t/maria_recover_encrypted.test8
-rw-r--r--mysql-test/suite/maria/alter.result26
-rw-r--r--mysql-test/suite/maria/alter.test28
-rw-r--r--mysql-test/suite/maria/bulk_insert_crash.test2
-rw-r--r--mysql-test/suite/maria/encrypt-no-key.test8
-rw-r--r--mysql-test/suite/maria/encrypt-wrong-key.test12
-rw-r--r--mysql-test/suite/maria/ps_maria.result4
-rw-r--r--mysql-test/suite/maria/repair.result23
-rw-r--r--mysql-test/suite/maria/repair.test19
-rw-r--r--mysql-test/suite/mariabackup/absolute_ibdata_paths.test2
-rw-r--r--mysql-test/suite/mariabackup/alter_copy_race.result2
-rw-r--r--mysql-test/suite/mariabackup/alter_copy_race.test4
-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/aria_backup.opt1
-rw-r--r--mysql-test/suite/mariabackup/aria_backup.result780
-rw-r--r--mysql-test/suite/mariabackup/aria_backup.test425
-rw-r--r--mysql-test/suite/mariabackup/aria_log.opt1
-rw-r--r--mysql-test/suite/mariabackup/aria_log_dir_path.result1
-rw-r--r--mysql-test/suite/mariabackup/aria_log_dir_path.test6
-rw-r--r--mysql-test/suite/mariabackup/aria_log_dir_path_rel.result1
-rw-r--r--mysql-test/suite/mariabackup/aria_log_rotate_during_backup.opt2
-rw-r--r--mysql-test/suite/mariabackup/aria_log_rotate_during_backup.result58
-rw-r--r--mysql-test/suite/mariabackup/aria_log_rotate_during_backup.test82
-rw-r--r--mysql-test/suite/mariabackup/auth_plugin_win.test2
-rw-r--r--mysql-test/suite/mariabackup/backup_grants.result4
-rw-r--r--mysql-test/suite/mariabackup/backup_grants.test34
-rw-r--r--mysql-test/suite/mariabackup/backup_ssl.test2
-rw-r--r--mysql-test/suite/mariabackup/binlog.test2
-rw-r--r--mysql-test/suite/mariabackup/compress_qpress.test2
-rw-r--r--mysql-test/suite/mariabackup/create_during_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/data_directory.test5
-rw-r--r--mysql-test/suite/mariabackup/ddl_for_common_engine.result67
-rw-r--r--mysql-test/suite/mariabackup/ddl_for_common_engine.test79
-rw-r--r--mysql-test/suite/mariabackup/disabled.def2
-rw-r--r--mysql-test/suite/mariabackup/encrypted_export.opt6
-rw-r--r--mysql-test/suite/mariabackup/encrypted_export.result14
-rw-r--r--mysql-test/suite/mariabackup/encrypted_export.test29
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_compressed.test2
-rw-r--r--mysql-test/suite/mariabackup/encrypted_page_corruption.test4
-rw-r--r--mysql-test/suite/mariabackup/extra_lsndir.test2
-rw-r--r--mysql-test/suite/mariabackup/full_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/huge_lsn.test2
-rw-r--r--mysql-test/suite/mariabackup/incremental_encrypted.test10
-rw-r--r--mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.result5
-rw-r--r--mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.test18
-rw-r--r--mysql-test/suite/mariabackup/lock_ddl_per_table.test2
-rw-r--r--mysql-test/suite/mariabackup/log_checksum_mismatch.test2
-rw-r--r--mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.result20
-rw-r--r--mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.test47
-rw-r--r--mysql-test/suite/mariabackup/log_tables.result24
-rw-r--r--mysql-test/suite/mariabackup/log_tables.test49
-rw-r--r--mysql-test/suite/mariabackup/mdev-14447.test2
-rw-r--r--mysql-test/suite/mariabackup/missing_ibd.test2
-rw-r--r--mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test2
-rw-r--r--mysql-test/suite/mariabackup/partial.result8
-rw-r--r--mysql-test/suite/mariabackup/partial.test21
-rw-r--r--mysql-test/suite/mariabackup/partial_exclude.test2
-rw-r--r--mysql-test/suite/mariabackup/partition_datadir.test2
-rw-r--r--mysql-test/suite/mariabackup/partition_partial.test2
-rw-r--r--mysql-test/suite/mariabackup/rename_during_backup.result12
-rw-r--r--mysql-test/suite/mariabackup/rename_during_backup.test27
-rw-r--r--mysql-test/suite/mariabackup/rename_during_mdl_lock.test2
-rw-r--r--mysql-test/suite/mariabackup/rpl_clone_slave.result202
-rw-r--r--mysql-test/suite/mariabackup/rpl_clone_slave.test17
-rw-r--r--mysql-test/suite/mariabackup/small_ibd.test2
-rw-r--r--mysql-test/suite/mariabackup/std_data/ment1587_aria_log.00000004 (renamed from extra/wolfssl/wolfssl/IPP/.gitkeep)0
-rw-r--r--mysql-test/suite/mariabackup/suite.opt2
-rw-r--r--mysql-test/suite/mariabackup/system_versioning.test4
-rw-r--r--mysql-test/suite/mariabackup/truncate_during_backup.test2
-rw-r--r--mysql-test/suite/mariabackup/undo_space_id.result7
-rw-r--r--mysql-test/suite/mariabackup/undo_space_id.test21
-rw-r--r--mysql-test/suite/mariabackup/unencrypted_page_compressed.test2
-rw-r--r--mysql-test/suite/mariabackup/unsupported_redo.test8
-rw-r--r--mysql-test/suite/mariabackup/xb_aws_key_management.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_file_key_management.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_history.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_page_compress.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_partition.test2
-rw-r--r--mysql-test/suite/mariabackup/xb_rocksdb.test4
-rw-r--r--mysql-test/suite/mariabackup/xb_rocksdb_datadir.test2
-rw-r--r--mysql-test/suite/mariabackup/xbstream.test2
-rw-r--r--mysql-test/suite/multi_source/gtid_ignore_duplicates.result108
-rw-r--r--mysql-test/suite/multi_source/gtid_ignore_duplicates.test68
-rw-r--r--mysql-test/suite/multi_source/info_logs.result12
-rw-r--r--mysql-test/suite/multi_source/multi_source_slave_alias_replica.result4
-rw-r--r--mysql-test/suite/multi_source/reset_slave.result8
-rw-r--r--mysql-test/suite/multi_source/simple.result14
-rw-r--r--mysql-test/suite/multi_source/syntax.result6
-rw-r--r--mysql-test/suite/parts/inc/partition_crash.inc4
-rw-r--r--mysql-test/suite/parts/r/alter_table.result12
-rw-r--r--mysql-test/suite/parts/r/mdev_21007.result5
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result24
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result24
-rw-r--r--mysql-test/suite/parts/r/partition_alter_myisam.result22
-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_recover_myisam.result3
-rw-r--r--mysql-test/suite/parts/t/alter_table.test30
-rw-r--r--mysql-test/suite/parts/t/mdev_21007.test9
-rw-r--r--mysql-test/suite/parts/t/partition_alter_myisam.test15
-rw-r--r--mysql-test/suite/parts/t/partition_recover_myisam-master.opt1
-rw-r--r--mysql-test/suite/parts/t/partition_recover_myisam.opt1
-rw-r--r--mysql-test/suite/parts/t/partition_recover_myisam.test8
-rw-r--r--mysql-test/suite/perfschema/include/memory_aggregate_load.inc3
-rw-r--r--mysql-test/suite/perfschema/include/program_execution.inc2
-rw-r--r--mysql-test/suite/perfschema/include/stage_setup.inc23
-rw-r--r--mysql-test/suite/perfschema/r/alter_table_progress.result3
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate.result378
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a.result266
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result228
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result146
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result108
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_h.result340
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u.result258
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result220
-rw-r--r--mysql-test/suite/perfschema/r/max_program_zero.result4
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_32bit.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_h.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_u.result2
-rw-r--r--mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result2
-rw-r--r--mysql-test/suite/perfschema/r/misc.result2
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result56
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result4
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result4
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result4
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_table.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_transactions.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_index.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_table_lock.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_index.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mdl.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_memory_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statement_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_lock.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_variables.result8
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_lost_inst.result4
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result4
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_non_nested.result6
-rw-r--r--mysql-test/suite/perfschema/r/threads_history.result428
-rw-r--r--mysql-test/suite/perfschema/t/bad_option.test4
-rw-r--r--mysql-test/suite/perfschema/t/misc.test1
-rw-r--r--mysql-test/suite/perfschema/t/processlist_57.test10
-rw-r--r--mysql-test/suite/perfschema/t/setup_instruments_defaults.test4
-rw-r--r--mysql-test/suite/perfschema/t/statement_program_lost_inst.test4
-rw-r--r--mysql-test/suite/perfschema/t/threads_history.test494
-rw-r--r--mysql-test/suite/period/r/overlaps.result82
-rw-r--r--mysql-test/suite/period/t/overlaps.test77
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff4
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff4
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff4
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff4
-rw-r--r--mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff4
-rw-r--r--mysql-test/suite/plugins/r/compression.result4
-rw-r--r--mysql-test/suite/plugins/t/compression.test2
-rw-r--r--mysql-test/suite/roles/definer.result1
-rw-r--r--mysql-test/suite/rpl/include/rpl_extra_col_master.test4
-rw-r--r--mysql-test/suite/rpl/r/parallel_backup.result4
-rw-r--r--mysql-test/suite/rpl/r/parallel_backup_lsu_off.result4
-rw-r--r--mysql-test/suite/rpl/r/parallel_backup_slave_binlog_off.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_auditing.result64
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_change_master.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_change_master_demote.result17
-rw-r--r--mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result27
-rw-r--r--mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_domain_id_filter_restart.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_get_lock.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_basic.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_crash.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_grouping.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_header_valid.result146
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_stop_start.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_debug.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mark_optimize_tbl_ddl.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev33798.result143
-rw-r--r--mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result31
-rw-r--r--mysql-test/suite/rpl/r/rpl_packet.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_multi_domain_xa.result58
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_retry.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_sbm.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_seq.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_temptable.result18
-rw-r--r--mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_rewrite_db_sys_vars.result20
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_find_row_debug.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result32
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_fail_over.result54
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_shutdown_await_ack.result267
-rw-r--r--mysql-test/suite/rpl/r/rpl_semi_sync_slave_enabled_consistent.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_show_slave_status.result75
-rw-r--r--mysql-test/suite/rpl/r/rpl_shutdown_sighup.result50
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_error.result25
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_alter_options.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary_error2_skip_all.result64
-rw-r--r--mysql-test/suite/rpl/r/rpl_using_gtid_default.result2
-rw-r--r--mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result1
-rw-r--r--mysql-test/suite/rpl/t/parallel_backup_xa.inc2
-rw-r--r--mysql-test/suite/rpl/t/rpl_auditing.test77
-rw-r--r--mysql-test/suite/rpl/t/rpl_binlog_dump_slave_gtid_state_info.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_change_master.test5
-rw-r--r--mysql-test/suite/rpl/t/rpl_change_master_demote.test34
-rw-r--r--mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test66
-rw-r--r--mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test7
-rw-r--r--mysql-test/suite/rpl/t/rpl_domain_id_filter_restart.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_get_lock.test15
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt2
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash_myisam.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_grouping.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_header_valid.test213
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_stop_start.test18
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat.test8
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_debug.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev33798.cnf17
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev33798.test182
-rw-r--r--mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test64
-rw-r--r--mysql-test/suite/rpl/t/rpl_packet.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_multi_domain_xa.test181
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_retry.test38
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_sbm.test16
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_seq.test18
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test23
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_temptable.test24
-rw-r--r--mysql-test/suite/rpl/t/rpl_relay_max_extension.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test23
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_find_row_debug.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf10
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test77
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc28
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_fail_over.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.cnf6
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.inc104
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_await_ack.test187
-rw-r--r--mysql-test/suite/rpl/t/rpl_semi_sync_slave_enabled_consistent.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_show_slave_status.test27
-rw-r--r--mysql-test/suite/rpl/t/rpl_shutdown_sighup.test154
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_error.test42
-rw-r--r--mysql-test/suite/rpl/t/rpl_sync.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_error2.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all.test3
-rw-r--r--mysql-test/suite/rpl/t/rpl_using_gtid_default.test3
-rw-r--r--mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test3
-rw-r--r--mysql-test/suite/s3/mysqldump.result2
-rw-r--r--mysql-test/suite/s3/partition.result2
-rw-r--r--mysql-test/suite/sql_sequence/mysqldump.result5
-rw-r--r--mysql-test/suite/sys_vars/r/debug_dbug_utf16le.result31
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result5
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/replicate_rewrite_db.result8
-rw-r--r--mysql-test/suite/sys_vars/r/slave_transaction_retry_errors.result10
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff77
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result28
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result12
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result12
-rw-r--r--mysql-test/suite/sys_vars/t/allow_suspicious_udfs.test4
-rw-r--r--mysql-test/suite/sys_vars/t/debug_dbug_utf16le.test29
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/replicate_rewrite_db.test7
-rw-r--r--mysql-test/suite/sysschema/t/fn_ps_thread_trx_info.test2
-rw-r--r--mysql-test/suite/vcol/r/func_regexp.result24
-rw-r--r--mysql-test/suite/vcol/t/func_regexp.test30
-rw-r--r--mysql-test/suite/versioning/r/alter.result13
-rw-r--r--mysql-test/suite/versioning/r/data.result6
-rw-r--r--mysql-test/suite/versioning/r/partition.result23
-rw-r--r--mysql-test/suite/versioning/t/alter.test15
-rw-r--r--mysql-test/suite/versioning/t/partition.test38
-rw-r--r--mysys/CMakeLists.txt34
-rw-r--r--mysys/crc32/crc32_arm64.c338
-rw-r--r--mysys/crc32/crc32_x86.c16
-rw-r--r--mysys/crc32/crc32c.cc261
-rw-r--r--mysys/crc32/crc32c_amd64.cc8
-rw-r--r--mysys/crc32/crc32c_ppc.h3
-rw-r--r--mysys/crc32/crc32c_x86.cc457
-rw-r--r--mysys/crc32/crc_ppc64.h7
-rw-r--r--mysys/crc32ieee.cc19
-rw-r--r--mysys/errors.c9
-rw-r--r--mysys/lf_alloc-pin.c7
-rw-r--r--mysys/mf_tempfile.c37
-rw-r--r--mysys/my_bitmap.c645
-rw-r--r--mysys/my_getopt.c84
-rw-r--r--mysys/my_thr_init.c8
-rw-r--r--plugin/auth_ed25519/ref10/fe_mul.c21
-rw-r--r--plugin/auth_ed25519/ref10/fe_sq.c21
-rw-r--r--plugin/auth_ed25519/ref10/fe_sq2.c21
-rw-r--r--plugin/auth_ed25519/ref10/fe_tobytes.c37
-rw-r--r--plugin/auth_ed25519/ref10/ge_scalarmult_base.c2
-rw-r--r--plugin/auth_ed25519/ref10/sc_muladd.c46
-rw-r--r--plugin/auth_ed25519/ref10/sc_reduce.c34
-rw-r--r--plugin/auth_gssapi/README.md10
-rw-r--r--plugin/auth_pam/auth_pam_base.c2
-rw-r--r--plugin/cracklib_password_check/CMakeLists.txt3
-rw-r--r--plugin/feedback/feedback.cc4
-rw-r--r--plugin/feedback/feedback.h1
-rw-r--r--plugin/feedback/url_http.cc18
-rw-r--r--plugin/hashicorp_key_management/CMakeLists.txt7
-rw-r--r--plugin/hashicorp_key_management/hashicorp_key_management_plugin.cc80
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/suite.pm4
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_cache_after_recreate.test2
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_check_kv_version.test6
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_migration.test2
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_rotation_age.test2
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.opt1
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.test6
-rw-r--r--plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_url_prefix.test4
-rw-r--r--plugin/test_sql_service/test_sql_service.c3
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet6.result12
-rw-r--r--plugin/type_inet/mysql-test/type_inet/type_inet6.test11
-rw-r--r--plugin/type_inet/sql_type_inet.cc2
-rw-r--r--plugin/type_mysql_timestamp/plugin.cc14
-rw-r--r--plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.result422
-rw-r--r--plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.test110
-rw-r--r--plugin/type_uuid/plugin.cc8
-rw-r--r--plugin/type_uuid/sql_type_uuid.h3
-rw-r--r--plugin/versioning/versioning.cc8
-rw-r--r--scripts/mysql_install_db.sh34
-rw-r--r--scripts/mysql_system_tables_fix.sql9
-rw-r--r--scripts/wsrep_sst_common.sh220
-rw-r--r--scripts/wsrep_sst_mariabackup.sh26
-rw-r--r--scripts/wsrep_sst_rsync.sh23
-rw-r--r--sql/CMakeLists.txt2
-rw-r--r--sql/backup.cc60
-rw-r--r--sql/debug_sync.cc2
-rw-r--r--sql/des_key_file.cc4
-rw-r--r--sql/des_key_file.h4
-rw-r--r--sql/field.cc62
-rw-r--r--sql/field.h12
-rw-r--r--sql/ha_partition.cc112
-rw-r--r--sql/ha_partition.h12
-rw-r--r--sql/handler.cc182
-rw-r--r--sql/handler.h34
-rw-r--r--sql/item.cc250
-rw-r--r--sql/item.h50
-rw-r--r--sql/item_cmpfunc.cc46
-rw-r--r--sql/item_cmpfunc.h8
-rw-r--r--sql/item_func.cc129
-rw-r--r--sql/item_func.h30
-rw-r--r--sql/item_jsonfunc.cc143
-rw-r--r--sql/item_strfunc.cc55
-rw-r--r--sql/item_subselect.cc8
-rw-r--r--sql/item_sum.cc18
-rw-r--r--sql/item_sum.h15
-rw-r--r--sql/item_timefunc.cc20
-rw-r--r--sql/item_timefunc.h33
-rw-r--r--sql/lex.h1
-rw-r--r--sql/log.cc22
-rw-r--r--sql/log.h11
-rw-r--r--sql/log_event.cc70
-rw-r--r--sql/log_event.h15
-rw-r--r--sql/log_event_client.cc25
-rw-r--r--sql/log_event_old.cc60
-rw-r--r--sql/log_event_old.h4
-rw-r--r--sql/log_event_server.cc151
-rw-r--r--sql/mdl.cc11
-rw-r--r--sql/multi_range_read.h10
-rw-r--r--sql/mysqld.cc229
-rw-r--r--sql/mysqld.h20
-rw-r--r--sql/net_serv.cc54
-rw-r--r--sql/opt_range.cc189
-rw-r--r--sql/opt_split.cc5
-rw-r--r--sql/rpl_parallel.cc286
-rw-r--r--sql/rpl_parallel.h59
-rw-r--r--sql/rpl_rli.cc6
-rw-r--r--sql/rpl_rli.h13
-rw-r--r--sql/semisync_master.cc291
-rw-r--r--sql/semisync_master.h117
-rw-r--r--sql/semisync_master_ack_receiver.cc13
-rw-r--r--sql/semisync_master_ack_receiver.h12
-rw-r--r--sql/semisync_slave.cc18
-rw-r--r--sql/service_wsrep.cc26
-rw-r--r--sql/share/errmsg-utf8.txt36
-rw-r--r--sql/slave.cc50
-rw-r--r--sql/sp.cc22
-rw-r--r--sql/sp.h16
-rw-r--r--sql/sp_cache.cc18
-rw-r--r--sql/sp_head.cc3
-rw-r--r--sql/sp_head.h18
-rw-r--r--sql/sql_acl.cc24
-rw-r--r--sql/sql_admin.cc8
-rw-r--r--sql/sql_base.cc60
-rw-r--r--sql/sql_base.h3
-rw-r--r--sql/sql_bootstrap.cc31
-rw-r--r--sql/sql_cache.cc9
-rw-r--r--sql/sql_class.cc116
-rw-r--r--sql/sql_class.h96
-rw-r--r--sql/sql_connect.cc2
-rw-r--r--sql/sql_delete.cc3
-rw-r--r--sql/sql_derived.cc12
-rw-r--r--sql/sql_expression_cache.cc3
-rw-r--r--sql/sql_insert.cc38
-rw-r--r--sql/sql_join_cache.cc1
-rw-r--r--sql/sql_lex.cc23
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_load.cc41
-rw-r--r--sql/sql_manager.cc33
-rw-r--r--sql/sql_parse.cc146
-rw-r--r--sql/sql_partition.cc13
-rw-r--r--sql/sql_plugin.cc5
-rw-r--r--sql/sql_plugin_services.inl7
-rw-r--r--sql/sql_priv.h7
-rw-r--r--sql/sql_reload.cc25
-rw-r--r--sql/sql_repl.cc16
-rw-r--r--sql/sql_select.cc297
-rw-r--r--sql/sql_select.h2
-rw-r--r--sql/sql_sequence.cc6
-rw-r--r--sql/sql_show.cc23
-rw-r--r--sql/sql_statistics.cc12
-rw-r--r--sql/sql_string.cc47
-rw-r--r--sql/sql_string.h36
-rw-r--r--sql/sql_table.cc192
-rw-r--r--sql/sql_table.h4
-rw-r--r--sql/sql_type.cc124
-rw-r--r--sql/sql_type.h64
-rw-r--r--sql/sql_type_fixedbin.h11
-rw-r--r--sql/sql_udf.h14
-rw-r--r--sql/sql_union.cc37
-rw-r--r--sql/sql_update.cc8
-rw-r--r--sql/sql_yacc.yy3
-rw-r--r--sql/sys_vars.cc25
-rw-r--r--sql/sys_vars.inl17
-rw-r--r--sql/table.cc79
-rw-r--r--sql/table.h16
-rw-r--r--sql/temporary_tables.cc11
-rw-r--r--sql/threadpool_generic.cc4
-rw-r--r--sql/threadpool_win.cc9
-rw-r--r--sql/transaction.cc33
-rw-r--r--sql/tztime.cc5
-rw-r--r--sql/unireg.cc10
-rw-r--r--sql/unireg.h2
-rw-r--r--sql/winmain.cc20
-rw-r--r--sql/wsrep_applier.cc13
-rw-r--r--sql/wsrep_client_service.h4
-rw-r--r--sql/wsrep_high_priority_service.cc2
-rw-r--r--sql/wsrep_mysqld.cc131
-rw-r--r--sql/wsrep_notify.cc2
-rw-r--r--sql/wsrep_schema.cc301
-rw-r--r--sql/wsrep_server_service.cc1
-rw-r--r--sql/yy_mariadb.cc52206
-rw-r--r--sql/yy_mariadb.hh981
-rw-r--r--sql/yy_oracle.cc52289
-rw-r--r--sql/yy_oracle.hh981
-rw-r--r--storage/archive/CMakeLists.txt2
-rw-r--r--storage/archive/ha_archive.cc18
-rw-r--r--storage/columnstore/CMakeLists.txt3
-rw-r--r--storage/columnstore/columnstore/CMakeLists.txt1
-rw-r--r--storage/columnstore/columnstore/VERSION2
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_datatype.cpp1
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_datatype.h4
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_datatype_basic.h1
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_double.h3
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_float128.h3
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_int128.cpp1
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_int128.h1
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_int64.h3
-rw-r--r--storage/columnstore/columnstore/datatypes/mcs_longdouble.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/ddlpackage/CMakeLists.txt2
-rw-r--r--storage/columnstore/columnstore/dbcon/ddlpackageproc/altertableprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/ddlpackageproc/createtableprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.h5
-rw-r--r--storage/columnstore/columnstore/dbcon/ddlpackageproc/droptableprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackage/CMakeLists.txt2
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackageproc/dmlpackageprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackageproc/insertpackageprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/calpontselectexecutionplan.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/calpontsystemcatalog.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/clientrotator.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/clientrotator.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/constantcolumn.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/constantfilter.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/execplan/sessionmanager.h5
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/anydatalist.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/batchprimitiveprocessor-jl.h5
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/columncommand-jl.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/crossenginestep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/crossenginestep.h4
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/diskjoinstep.cpp4
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/distributedenginecomm.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/elementtype.h17
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/errorinfo.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/expressionstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/fifo.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/groupconcat.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jlf_common.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jlf_execplantojoblist.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jlf_graphics.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jlf_subquery.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jlf_tuplejoblist.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/joblist.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/joblist.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jobstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/jobstep.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/lbidlist.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/limitedorderby.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/passthrucommand-jl.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/pcolscan.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/pcolstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/pdictionaryscan.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/primitivemsg.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/primitivestep.h41
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/rowestimator.cpp4
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/subquerystep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/subquerystep.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/subquerytransformer.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tuple-bps.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.h4
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.h4
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.h4
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.h3
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.h2
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/virtualtable.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.h4
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/ha_autoi.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/ha_mcs_datatype.h4
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/ha_mcs_ddl.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/ha_mcs_dml.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/ha_mcs_execplan.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/ha_pseudocolumn.cpp1
-rw-r--r--storage/columnstore/columnstore/dbcon/mysql/idb_mysql.h7
-rw-r--r--storage/columnstore/columnstore/ddlproc/ddlproc.cpp1
-rw-r--r--storage/columnstore/columnstore/ddlproc/ddlprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dmlproc/batchinsertprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dmlproc/batchinsertprocessor.h3
-rw-r--r--storage/columnstore/columnstore/dmlproc/dmlproc.cpp10
-rw-r--r--storage/columnstore/columnstore/dmlproc/dmlprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/dmlproc/dmlprocessor.h3
-rw-r--r--storage/columnstore/columnstore/exemgr/activestatementcounter.cpp1
-rw-r--r--storage/columnstore/columnstore/exemgr/activestatementcounter.h3
-rw-r--r--storage/columnstore/columnstore/exemgr/main.cpp1
-rw-r--r--storage/columnstore/columnstore/oam/oamcpp/liboamcpp.cpp1
-rw-r--r--storage/columnstore/columnstore/oam/oamcpp/liboamcpp.h3
-rw-r--r--storage/columnstore/columnstore/oamapps/columnstoreDB/columnstoreDB.cpp2
-rw-r--r--storage/columnstore/columnstore/oamapps/postConfigure/mycnfUpgrade.cpp1
-rw-r--r--storage/columnstore/columnstore/oamapps/sessionWalker/sessionwalker.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/blockcache/blockcacheclient.h3
-rw-r--r--storage/columnstore/columnstore/primitives/blockcache/blockrequestprocessor.h3
-rw-r--r--storage/columnstore/columnstore/primitives/blockcache/filerequest.h3
-rw-r--r--storage/columnstore/columnstore/primitives/blockcache/iomanager.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/blockcache/iomanager.h5
-rw-r--r--storage/columnstore/columnstore/primitives/linux-port/column.cpp9
-rw-r--r--storage/columnstore/columnstore/primitives/linux-port/dictionary.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/linux-port/index.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/linux-port/primitiveprocessor.h3
-rw-r--r--storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/primproc/columncommand.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/primproc/columncommand.h3
-rw-r--r--storage/columnstore/columnstore/primitives/primproc/primitiveserver.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/primproc/primproc.cpp1
-rw-r--r--storage/columnstore/columnstore/primitives/primproc/udf.cpp1
-rw-r--r--storage/columnstore/columnstore/storage-manager/src/smcat.cpp2
-rw-r--r--storage/columnstore/columnstore/storage-manager/src/unit_tests.cpp4
-rw-r--r--storage/columnstore/columnstore/tests/primitives_column_scan_and_filter.cpp1
-rw-r--r--storage/columnstore/columnstore/tests/primitives_scan_bench.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/bincvt/li2bin.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/clearShm/main.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/dbbuilder/dbbuilder.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/ddlcleanup/ddlcleanup.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/editem/editem.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/qfe/server.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/sendPlan/sendplan.cpp1
-rw-r--r--storage/columnstore/columnstore/tools/setConfig/main.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/cacheutils/cacheutils.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/cacheutils/cacheutils.h2
-rw-r--r--storage/columnstore/columnstore/utils/common/hashfamily.h3
-rw-r--r--storage/columnstore/columnstore/utils/common/mcs_basic_types.h3
-rw-r--r--storage/columnstore/columnstore/utils/common/simd_sse.h1
-rw-r--r--storage/columnstore/columnstore/utils/compress/idbcompress.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/configcpp/configcpp.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/configcpp/configcpp.h3
-rw-r--r--storage/columnstore/columnstore/utils/configcpp/configstream.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/configcpp/configstream.h3
-rw-r--r--storage/columnstore/columnstore/utils/configcpp/xmlparser.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/configcpp/xmlparser.h3
-rw-r--r--storage/columnstore/columnstore/utils/dataconvert/dataconvert.cpp3
-rw-r--r--storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.h2
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_abs.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_add_time.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_ascii.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_between.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_case.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_cast.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_ceil.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_char.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_char_length.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_coalesce.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_concat.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_concat_oracle.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_concat_ws.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_conv.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_convert_tz.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_crc32.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_date.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_date_add.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_date_format.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_day.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_dayname.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_dayofweek.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_dayofyear.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_div.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_elt.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_exp.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_extract.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_find_in_set.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_floor.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_from_days.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_from_unixtime.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_get_format.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_greatest.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_hex.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_hour.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_idbpartition.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_if.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_ifnull.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_in.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_insert.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_instr.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_isnull.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_last_day.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_least.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_left.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_length.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_lpad.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_ltrim.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_ltrim_oracle.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_makedate.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_maketime.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_math.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_md5.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_microsecond.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_minute.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_mod.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_month.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_monthname.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_nullif.cpp3
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_period_add.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_period_diff.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_pow.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_quarter.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_quote.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_rand.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_regexp.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_repeat.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_replace.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_replace_oracle.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_reverse.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_right.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_round.cpp3
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_rpad.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_rtrim.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_rtrim_oracle.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_sec_to_time.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_second.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_sha.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_sign.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_space.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_str_to_date.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_strcmp.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_substr.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_substring_index.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_sysdate.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_time.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_time_format.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_time_to_sec.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_timediff.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_timestampdiff.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_to_days.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_trim.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_trim_oracle.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_truncate.cpp5
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_ucase.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_unhex.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_unix_timestamp.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_week.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_weekday.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_year.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/func_yearweek.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/funcexp/functor.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/libmysql_client/libmysql_client.h1
-rw-r--r--storage/columnstore/columnstore/utils/loggingcpp/errorcodes.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/loggingcpp/exceptclasses.h3
-rw-r--r--storage/columnstore/columnstore/utils/messageqcpp/inetstreamsocket.cpp12
-rw-r--r--storage/columnstore/columnstore/utils/messageqcpp/messagequeue.h3
-rw-r--r--storage/columnstore/columnstore/utils/multicast/multicast.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/regr/regrmysql.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/rowgroup/rowgroup.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/rowgroup/rowgroup.h9
-rw-r--r--storage/columnstore/columnstore/utils/rwlock/rwlock.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/rwlock/rwlock.h15
-rw-r--r--storage/columnstore/columnstore/utils/startup/installdir.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/startup/installdir.h3
-rw-r--r--storage/columnstore/columnstore/utils/testbc/iomanager.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/testbc/iomanager.h3
-rw-r--r--storage/columnstore/columnstore/utils/threadpool/prioritythreadpool.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/udfsdk/udfmysql.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/udfsdk/udfsdk.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/udfsdk/udfsdk.h1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/framebound.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/framebound.h4
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/frameboundrange.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/frameboundrange.h4
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/frameboundrow.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/frameboundrow.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/idborderby.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_count.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_count.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_min_max.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_min_max.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_ntile.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_ntile.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_percentile.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_percentile.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_ranking.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_ranking.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_row_number.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_row_number.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_stats.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_stats.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.h4
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_udaf.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/wf_udaf.h4
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/windowframe.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/windowframe.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/windowfunction.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/windowfunction.h2
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.cpp1
-rw-r--r--storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.h2
-rw-r--r--storage/columnstore/columnstore/versioning/BRM/brmshmimpl.cpp1
-rw-r--r--storage/columnstore/columnstore/versioning/BRM/load_brm.cpp1
-rw-r--r--storage/columnstore/columnstore/versioning/BRM/slavecomm.cpp1
-rw-r--r--storage/columnstore/columnstore/versioning/BRM/vbbm.cpp5
-rw-r--r--storage/columnstore/columnstore/writeengine/client/we_clients.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/client/we_clients.h5
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.h4
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.h2
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.h2
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.h4
-rw-r--r--storage/columnstore/columnstore/writeengine/server/we_ddlcommandproc.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/shared/we_brm.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/shared/we_chunkmanager.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/splitter/we_splitterapp.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/wrapper/we_colop.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.cpp1
-rw-r--r--storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.h3
-rw-r--r--storage/columnstore/columnstore/writeengine/wrapper/writeengine.cpp1
-rw-r--r--storage/connect/CMakeLists.txt2
-rw-r--r--storage/connect/ha_connect.cc9
-rw-r--r--storage/connect/ioapi.h2
-rw-r--r--storage/connect/libdoc.cpp39
-rw-r--r--storage/connect/mysql-test/connect/r/drop-open-error.result2
-rw-r--r--storage/connect/mysql-test/connect/r/mysql.result1
-rw-r--r--storage/connect/mysql-test/connect/t/drop-open-error.test3
-rw-r--r--storage/connect/tabmul.cpp6
-rw-r--r--storage/connect/unzip.c12
-rw-r--r--storage/connect/unzip.h2
-rw-r--r--storage/connect/zip.c73
-rw-r--r--storage/connect/zip.h4
-rw-r--r--storage/heap/ha_heap.cc32
-rw-r--r--storage/heap/ha_heap.h4
-rw-r--r--storage/innobase/CMakeLists.txt28
-rw-r--r--storage/innobase/btr/btr0btr.cc183
-rw-r--r--storage/innobase/btr/btr0bulk.cc2
-rw-r--r--storage/innobase/btr/btr0cur.cc107
-rw-r--r--storage/innobase/btr/btr0pcur.cc209
-rw-r--r--storage/innobase/buf/buf0block_hint.cc59
-rw-r--r--storage/innobase/buf/buf0buf.cc264
-rw-r--r--storage/innobase/buf/buf0flu.cc208
-rw-r--r--storage/innobase/buf/buf0lru.cc184
-rw-r--r--storage/innobase/buf/buf0rea.cc2
-rw-r--r--storage/innobase/dict/dict0dict.cc136
-rw-r--r--storage/innobase/dict/dict0stats.cc4
-rw-r--r--storage/innobase/fil/fil0crypt.cc2
-rw-r--r--storage/innobase/fil/fil0fil.cc86
-rw-r--r--storage/innobase/fsp/fsp0file.cc7
-rw-r--r--storage/innobase/fsp/fsp0fsp.cc299
-rw-r--r--storage/innobase/fts/fts0fts.cc62
-rw-r--r--storage/innobase/fts/fts0opt.cc2
-rw-r--r--storage/innobase/fts/fts0que.cc47
-rw-r--r--storage/innobase/fut/fut0lst.cc135
-rw-r--r--storage/innobase/gis/gis0sea.cc117
-rw-r--r--storage/innobase/handler/ha_innodb.cc806
-rw-r--r--storage/innobase/handler/ha_innodb.h7
-rw-r--r--storage/innobase/handler/handler0alter.cc71
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc61
-rw-r--r--storage/innobase/include/btr0btr.h17
-rw-r--r--storage/innobase/include/btr0pcur.h8
-rw-r--r--storage/innobase/include/buf0block_hint.h76
-rw-r--r--storage/innobase/include/buf0buf.h50
-rw-r--r--storage/innobase/include/buf0buf.inl14
-rw-r--r--storage/innobase/include/buf0flu.h10
-rw-r--r--storage/innobase/include/cache.h33
-rw-r--r--storage/innobase/include/data0data.h13
-rw-r--r--storage/innobase/include/data0data.inl30
-rw-r--r--storage/innobase/include/db0err.h12
-rw-r--r--storage/innobase/include/dict0dict.h67
-rw-r--r--storage/innobase/include/dict0mem.h5
-rw-r--r--storage/innobase/include/dict0mem.inl1
-rw-r--r--storage/innobase/include/dyn0buf.h9
-rw-r--r--storage/innobase/include/dyn0types.h3
-rw-r--r--storage/innobase/include/fil0fil.h60
-rw-r--r--storage/innobase/include/fsp0fsp.h20
-rw-r--r--storage/innobase/include/fts0fts.h6
-rw-r--r--storage/innobase/include/fts0priv.h21
-rw-r--r--storage/innobase/include/fts0priv.inl44
-rw-r--r--storage/innobase/include/fts0types.h38
-rw-r--r--storage/innobase/include/fts0types.inl47
-rw-r--r--storage/innobase/include/fut0lst.h50
-rw-r--r--storage/innobase/include/gis0type.h6
-rw-r--r--storage/innobase/include/lock0lock.h74
-rw-r--r--storage/innobase/include/log0crypt.h3
-rw-r--r--storage/innobase/include/log0log.h171
-rw-r--r--storage/innobase/include/mtr0mtr.h28
-rw-r--r--storage/innobase/include/os0file.h89
-rw-r--r--storage/innobase/include/os0file.inl8
-rw-r--r--storage/innobase/include/row0merge.h11
-rw-r--r--storage/innobase/include/row0row.h6
-rw-r--r--storage/innobase/include/row0sel.h4
-rw-r--r--storage/innobase/include/srv0mon.h2
-rw-r--r--storage/innobase/include/srv0srv.h4
-rw-r--r--storage/innobase/include/srw_lock.h50
-rw-r--r--storage/innobase/include/trx0purge.h181
-rw-r--r--storage/innobase/include/trx0rseg.h12
-rw-r--r--storage/innobase/include/trx0trx.h31
-rw-r--r--storage/innobase/include/trx0undo.inl3
-rw-r--r--storage/innobase/include/ut0new.h3
-rw-r--r--storage/innobase/include/ut0ut.h14
-rw-r--r--storage/innobase/include/ut0vec.h9
-rw-r--r--storage/innobase/include/ut0vec.inl13
-rw-r--r--storage/innobase/lock/lock0lock.cc437
-rw-r--r--storage/innobase/log/log0log.cc38
-rw-r--r--storage/innobase/log/log0recv.cc32
-rw-r--r--storage/innobase/mtr/mtr0mtr.cc525
-rw-r--r--storage/innobase/os/os0file.cc805
-rw-r--r--storage/innobase/page/page0zip.cc3
-rw-r--r--storage/innobase/rem/rem0rec.cc2
-rw-r--r--storage/innobase/row/row0import.cc511
-rw-r--r--storage/innobase/row/row0ins.cc23
-rw-r--r--storage/innobase/row/row0merge.cc92
-rw-r--r--storage/innobase/row/row0mysql.cc5
-rw-r--r--storage/innobase/row/row0quiesce.cc5
-rw-r--r--storage/innobase/row/row0sel.cc25
-rw-r--r--storage/innobase/row/row0umod.cc2
-rw-r--r--storage/innobase/srv/srv0mon.cc10
-rw-r--r--storage/innobase/srv/srv0start.cc165
-rw-r--r--storage/innobase/sync/cache.cc160
-rw-r--r--storage/innobase/sync/srw_lock.cc121
-rw-r--r--storage/innobase/trx/trx0purge.cc247
-rw-r--r--storage/innobase/trx/trx0rseg.cc62
-rw-r--r--storage/innobase/trx/trx0trx.cc24
-rw-r--r--storage/innobase/trx/trx0undo.cc42
-rw-r--r--storage/innobase/unittest/CMakeLists.txt4
-rw-r--r--storage/innobase/unittest/innodb_rbt-t.cc83
-rw-r--r--storage/innobase/ut/ut0ut.cc47
-rw-r--r--storage/maria/CMakeLists.txt4
-rw-r--r--storage/maria/aria_chk.c3
-rw-r--r--storage/maria/aria_pack.c3
-rw-r--r--storage/maria/aria_read_log.c2
-rw-r--r--storage/maria/ha_maria.cc106
-rw-r--r--storage/maria/ha_maria.h4
-rw-r--r--storage/maria/ma_bitmap.c2
-rw-r--r--storage/maria/ma_blockrec.c12
-rw-r--r--storage/maria/ma_check.c42
-rw-r--r--storage/maria/ma_control_file.c15
-rw-r--r--storage/maria/ma_control_file.h5
-rw-r--r--storage/maria/ma_create.c2
-rw-r--r--storage/maria/ma_dynrec.c8
-rw-r--r--storage/maria/ma_extra.c32
-rw-r--r--storage/maria/ma_loghandler.c8
-rw-r--r--storage/maria/ma_loghandler.h8
-rw-r--r--storage/maria/ma_open.c20
-rw-r--r--storage/maria/ma_packrec.c8
-rw-r--r--storage/maria/ma_pagecache.c2
-rw-r--r--storage/maria/ma_recovery.c34
-rw-r--r--storage/maria/ma_rt_test.c2
-rw-r--r--storage/maria/ma_test1.c2
-rw-r--r--storage/maria/ma_test2.c2
-rw-r--r--storage/maria/maria_def.h6
-rw-r--r--storage/maria/test_ma_backup.c2
-rw-r--r--storage/maria/unittest/CMakeLists.txt2
-rw-r--r--storage/maria/unittest/ma_control_file-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler-t.c5
-rw-r--r--storage/maria/unittest/ma_test_loghandler_first_lsn-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler_max_lsn-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler_multigroup-t.c4
-rw-r--r--storage/maria/unittest/ma_test_loghandler_multithread-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler_noflush-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler_nologs-t.c4
-rw-r--r--storage/maria/unittest/ma_test_loghandler_pagecache-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler_purge-t.c2
-rw-r--r--storage/mroonga/CMakeLists.txt5
-rw-r--r--storage/mroonga/ha_mroonga.cpp356
-rw-r--r--storage/mroonga/ha_mroonga.hpp16
-rw-r--r--storage/mroonga/vendor/groonga/CMakeLists.txt1
-rw-r--r--storage/mroonga/vendor/groonga/lib/db.c18
-rw-r--r--storage/mroonga/vendor/groonga/lib/load.c5
-rw-r--r--storage/mroonga/vendor/groonga/lib/operator.c5
-rw-r--r--storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c4
-rw-r--r--storage/mroonga/vendor/groonga/lib/proc/proc_schema.c9
-rw-r--r--storage/mroonga/vendor/groonga/lib/proc/proc_select.c20
-rw-r--r--storage/myisam/ft_boolean_search.c2
-rw-r--r--storage/myisam/ha_myisam.cc56
-rw-r--r--storage/myisam/ha_myisam.h4
-rw-r--r--storage/myisam/mi_extra.c13
-rw-r--r--storage/perfschema/pfs_buffer_container.h3
-rw-r--r--storage/perfschema/pfs_instr_class.cc2
-rw-r--r--storage/perfschema/table_replication_applier_status.cc2
-rw-r--r--storage/perfschema/table_replication_applier_status.h2
-rw-r--r--storage/perfschema/unittest/pfs_instr-t.cc3
-rw-r--r--storage/perfschema/unittest/pfs_instr_class-t.cc1
-rw-r--r--storage/rocksdb/CMakeLists.txt2
-rw-r--r--storage/rocksdb/build_rocksdb.cmake2
-rw-r--r--storage/rocksdb/ha_rocksdb.h2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/partition.result1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/disabled.def4
-rw-r--r--storage/rocksdb/rdb_source_revision.h1
-rw-r--r--storage/spider/ha_spider.cc77
-rw-r--r--storage/spider/ha_spider.h27
-rw-r--r--storage/spider/mysql-test/spider/bg/r/spider3_fixes.result1
-rw-r--r--storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result1
-rw-r--r--storage/spider/mysql-test/spider/bg/r/spider_fixes.result1
-rw-r--r--storage/spider/mysql-test/spider/bg/r/spider_fixes_part.result1
-rw-r--r--storage/spider/mysql-test/spider/bg/t/slave_test_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_default.result1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mariadb.result1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_mysql.result1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_19866.result2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_27172.result3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_28856.result3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result24
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33242.result4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33434.result12
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33441.result7
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33441_fail.result10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33494.result4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result12
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33584.result4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33679.result25
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_33731.result10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result18
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/slave_transaction_retry_errors_5digit.result3
-rw-r--r--storage/spider/mysql-test/spider/bugfix/r/slave_trx_isolation.result1
-rw-r--r--[l---------]storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result44
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_28856.test4
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test30
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33242.test6
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33434.test15
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33441.opt1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33441.test10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.opt2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.test10
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33494.test11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test2
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test17
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33584.test11
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33679.test29
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_33731.test16
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test20
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test1
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test2
-rw-r--r--storage/spider/mysql-test/spider/feature/r/pushdown_case.result57
-rw-r--r--storage/spider/mysql-test/spider/feature/r/pushdown_timestamp_diff.result111
-rw-r--r--storage/spider/mysql-test/spider/feature/r/slave_transaction_retry_errors.result3
-rw-r--r--storage/spider/mysql-test/spider/feature/t/pushdown_case.test50
-rw-r--r--storage/spider/mysql-test/spider/feature/t/pushdown_timestamp_diff.test93
-rw-r--r--storage/spider/mysql-test/spider/include/clean_up_spider.inc1
-rw-r--r--storage/spider/mysql-test/spider/r/partition_join_pushdown_for_single_partition.result2
-rw-r--r--storage/spider/mysql-test/spider/r/slave_trx_isolation.result1
-rw-r--r--storage/spider/mysql-test/spider/r/spider3_fixes.result1
-rw-r--r--storage/spider/mysql-test/spider/r/spider3_fixes_part.result1
-rw-r--r--storage/spider/mysql-test/spider/r/spider_fixes.result1
-rw-r--r--storage/spider/mysql-test/spider/r/spider_fixes_part.result2
-rw-r--r--storage/spider/mysql-test/spider/t/slave_test_init.inc2
-rw-r--r--storage/spider/mysql-test/spider/t/spider_fixes_part.opt1
-rw-r--r--storage/spider/mysql-test/spider/t/spider_fixes_part.test16
-rw-r--r--storage/spider/spd_conn.cc4
-rw-r--r--storage/spider/spd_copy_tables.cc50
-rw-r--r--storage/spider/spd_db_conn.cc14
-rw-r--r--storage/spider/spd_db_include.cc16
-rw-r--r--storage/spider/spd_db_include.h6
-rw-r--r--storage/spider/spd_db_mysql.cc308
-rw-r--r--storage/spider/spd_db_mysql.h5
-rw-r--r--storage/spider/spd_direct_sql.cc162
-rw-r--r--storage/spider/spd_i_s.cc5
-rw-r--r--storage/spider/spd_include.h2
-rw-r--r--storage/spider/spd_init_query.h10
-rw-r--r--storage/spider/spd_ping_table.cc134
-rw-r--r--storage/spider/spd_sys_table.cc60
-rw-r--r--storage/spider/spd_sys_table.h3
-rw-r--r--storage/spider/spd_table.cc76
-rw-r--r--storage/spider/spd_trx.cc2
-rw-r--r--strings/ctype-uca.c6
-rw-r--r--support-files/mariadb.service.in2
-rw-r--r--support-files/mariadb@.service.in2
-rwxr-xr-xsupport-files/mini-benchmark.sh123
-rw-r--r--support-files/policy/apparmor/usr.sbin.mysqld1
-rw-r--r--support-files/policy/selinux/mariadb-server.te4
-rw-r--r--tests/async_queries.c2
-rw-r--r--tests/mysql_client_fw.c18
-rw-r--r--tests/mysql_client_test.c10
-rw-r--r--tpool/tpool_generic.cc25
-rw-r--r--unittest/mysys/CMakeLists.txt2
-rw-r--r--unittest/mysys/bitmap-t.c152
-rw-r--r--unittest/mysys/crc32-t.c138
-rw-r--r--unittest/mysys/my_getopt-t.c4
-rw-r--r--unittest/sql/mf_iocache-t.cc3
-rw-r--r--vio/vio.c2
-rw-r--r--vio/viosocket.c53
-rw-r--r--win/packaging/CPackWixConfig.cmake2
-rw-r--r--wsrep-lib/dbsim/db_client_service.hpp5
-rw-r--r--wsrep-lib/include/wsrep/client_service.hpp10
-rw-r--r--wsrep-lib/include/wsrep/reporter.hpp16
-rw-r--r--wsrep-lib/src/client_state.cpp3
-rw-r--r--wsrep-lib/src/reporter.cpp12
-rw-r--r--wsrep-lib/src/transaction.cpp13
-rw-r--r--wsrep-lib/test/mock_client_state.hpp5
-rw-r--r--zlib/ChangeLog10
-rw-r--r--zlib/FAQ3
-rw-r--r--zlib/README6
-rw-r--r--zlib/contrib/nuget/nuget.csproj43
-rw-r--r--zlib/contrib/nuget/nuget.sln22
-rw-r--r--zlib/contrib/vstudio/vc17/miniunz.vcxproj409
-rw-r--r--zlib/contrib/vstudio/vc17/minizip.vcxproj405
-rw-r--r--zlib/contrib/vstudio/vc17/testzlib.vcxproj473
-rw-r--r--zlib/contrib/vstudio/vc17/testzlibdll.vcxproj409
-rw-r--r--zlib/contrib/vstudio/vc17/zlib.rc32
-rw-r--r--zlib/contrib/vstudio/vc17/zlibstat.vcxproj602
-rw-r--r--zlib/contrib/vstudio/vc17/zlibvc.def158
-rw-r--r--zlib/contrib/vstudio/vc17/zlibvc.sln179
-rw-r--r--zlib/contrib/vstudio/vc17/zlibvc.vcxproj875
-rw-r--r--zlib/deflate.c47
-rw-r--r--zlib/deflate.h35
-rw-r--r--zlib/gzguts.h8
-rw-r--r--zlib/gzlib.c12
-rw-r--r--zlib/inflate.c2
-rw-r--r--zlib/inftrees.c6
-rw-r--r--zlib/inftrees.h4
-rw-r--r--zlib/qnx/package.qpg10
-rw-r--r--zlib/treebuild.xml4
-rw-r--r--zlib/trees.c20
-rw-r--r--zlib/win32/DLL_FAQ.txt20
-rw-r--r--zlib/win32/README-WIN32.txt8
-rw-r--r--zlib/zconf.h.cmakein10
-rw-r--r--zlib/zconf.h.in10
-rw-r--r--zlib/zlib.36
-rw-r--r--zlib/zlib.h22
-rw-r--r--zlib/zutil.h27
2126 files changed, 212769 insertions, 33881 deletions
diff --git a/.clang-format b/.clang-format
index 7ce45951..3633507c 100644
--- a/.clang-format
+++ b/.clang-format
@@ -70,7 +70,6 @@ IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
-Language: Cpp
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b59d5a96..d8a6b810 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -510,9 +510,9 @@ mini-benchmark:
- |
mariadb --skip-column-names -e "SELECT @@version, @@version_comment" | tee /tmp/version
grep $MARIADB_MAJOR_VERSION /tmp/version || echo "MariaDB didn't install properly"
- - yum install -y sysbench procps-ng perf util-linux || yum install -y https://kojipkgs.fedoraproject.org//packages/luajit/2.0.4/3.el7/x86_64/luajit-2.0.4-3.el7.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/sysbench/1.0.17/2.el7/x86_64/sysbench-1.0.17-2.el7.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/ck/0.5.2/2.el7/x86_64/ck-0.5.2-2.el7.x86_64.rpm
+ - yum install -y sysbench procps-ng perf flamegraph flamegraph-stackcollapse-perf util-linux dnf-utils
- /usr/share/mysql/mini-benchmark
- - cp -av */sysbench-run-*.log */metrics.txt .. # Move files one level down so they can be saved as artifacts
+ - cp -av */sysbench-run-*.log */metrics.txt . # Move files one level down so they can be saved as artifacts
artifacts:
when: always
paths:
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 0defa2d4..5b02a8aa 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -267,6 +267,12 @@ if test `$CC -v 2>&1 | tail -1 | sed 's/ .*$//'` = 'gcc' ; then
fi
fi
+if test `$CC -v 2>&1 | head -1 | sed 's/ .*$//'` = 'clang' ; then
+ dbug_cflags="$dbug_cflags -Wframe-larger-than=16384 -fno-inline"
+ c_warnings="$c_warnings -Wframe-larger-than=16384"
+ cxx_warnings="$cxx_warnings -Wframe-larger-than=16384"
+fi
+
# If ccache (a compiler cache which reduces build time)
# (http://samba.org/ccache) is installed, use it.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49769e2b..93908662 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,7 @@ ENDIF()
# in RPM's:
#set(CPACK_RPM_SPEC_MORE_DEFINE "%define __spec_install_post /bin/true")
-FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0075 CMP0069 CMP0135)
+FOREACH(p CMP0022 CMP0046 CMP0040 CMP0048 CMP0054 CMP0074 CMP0075 CMP0069 CMP0135)
IF(POLICY ${p})
CMAKE_POLICY(SET ${p} NEW)
ENDIF()
@@ -187,7 +187,7 @@ ENDIF()
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
IF (WITHOUT_SERVER)
- SET (SKIP_COMPONENTS "Server|IniFiles|SuportFiles|Readme")
+ SET (SKIP_COMPONENTS "Server|IniFiles|SupportFiles|Readme")
ELSE()
SET (SKIP_COMPONENTS "N-O-N-E")
ENDIF()
@@ -199,8 +199,9 @@ OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system librar
# Can be switched on only for debug build.
#
OPTION(WITH_PROTECT_STATEMENT_MEMROOT "Enable protection of statement's memory root after first SP/PS execution. Turned into account only for debug build" OFF)
-IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND WITH_PROTECT_STATEMENT_MEMROOT)
- ADD_DEFINITIONS(-DPROTECT_STATEMENT_MEMROOT)
+IF (WITH_PROTECT_STATEMENT_MEMROOT)
+ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DPROTECT_STATEMENT_MEMROOT")
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DPROTECT_STATEMENT_MEMROOT")
ENDIF()
INCLUDE(check_compiler_flag)
@@ -264,8 +265,6 @@ IF(SECURITY_HARDENED AND NOT WITH_ASAN AND NOT WITH_UBSAN AND NOT WITH_TSAN AND
MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
ENDIF()
-INCLUDE(wsrep)
-
OPTION(WITH_DBUG_TRACE "Enable DBUG_ENTER()/DBUG_RETURN()/DBUG_PRINT()" ON)
IF(WITH_DBUG_TRACE)
FOREACH(LANG C CXX)
@@ -276,7 +275,12 @@ ENDIF()
# Always enable debug sync for debug builds.
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
-
+
+IF(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
+ # Enable extra checks when using a recent enough version of GNU libstdc++
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG -D_GLIBCXX_ASSERTIONS")
+ENDIF()
+
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
IF (ENABLE_GCOV)
MY_CHECK_AND_SET_COMPILER_FLAG("-DHAVE_gcov -fprofile-arcs -ftest-coverage -lgcov" DEBUG)
@@ -337,6 +341,8 @@ ELSEIF(TRASH_FREED_MEMORY MATCHES "AUTO" AND NOT WIN32 AND NOT WITH_VALGRIND AND
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTRASH_FREED_MEMORY")
ENDIF()
+INCLUDE(wsrep)
+
# Set commonly used variables
IF(WIN32)
SET(DEFAULT_MYSQL_HOME "C:/Program Files/MariaDB ${MYSQL_BASE_VERSION}")
diff --git a/Docs/INFO_SRC b/Docs/INFO_SRC
new file mode 100644
index 00000000..dd90364e
--- /dev/null
+++ b/Docs/INFO_SRC
@@ -0,0 +1,8 @@
+commit: 3a069644682e336e445039e48baae9693f9a08ee
+date: 2024-05-10 22:20:49 +0200
+build-date: 2024-05-10 21:03:21 +0000
+short: 3a069644682
+branch: HEAD
+
+
+MariaDB source 10.11.8
diff --git a/README.md b/README.md
index 58dbf105..5fe95f46 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Code status:
* [![Appveyor CI status](https://ci.appveyor.com/api/projects/status/4u6pexmtpuf8jq66?svg=true)](https://ci.appveyor.com/project/rasmushoj/server) ci.appveyor.com
-## MariaDB: The open source relational database
+## MariaDB: The innovative open source database
MariaDB was designed as a drop-in replacement of MySQL(R) with more
features, new storage engines, fewer bugs, and better performance.
@@ -33,28 +33,23 @@ https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/
https://mariadb.com/kb/en/new-and-old-releases/
+Getting the code, building it and testing it
+---------------------------------------------------------------
+
+Refer to the following guide: https://mariadb.org/get-involved/getting-started-for-developers/get-code-build-test/ which outlines how to correctly build the source code and run the MariaDB testing framework.
+
Help
-----
More help is available from the Maria Discuss mailing list
-https://launchpad.net/~maria-discuss, MariaDB's Zulip
+https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/ and MariaDB's Zulip
instance, https://mariadb.zulipchat.com/
-Live QA for beginner contributors
-----
-MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip.
-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
---------
***************************************************************************
-NOTE:
-
MariaDB is specifically available only under version 2 of the GNU
General Public License (GPLv2). (I.e. Without the "any later version"
clause.) This is inherited from MySQL. Please see the README file in
diff --git a/VERSION b/VERSION
index 7dd56698..96bdb06e 100644
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=11
-MYSQL_VERSION_PATCH=7
+MYSQL_VERSION_PATCH=8
SERVER_MATURITY=stable
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 4dfce247..a8e80bc8 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -18,7 +18,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${PCRE_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/mysys_ssl
- ${ZLIB_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings
diff --git a/client/client_priv.h b/client/client_priv.h
index 597c074c..eba8a841 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, 2022, MariaDB
+ Copyright (c) 2009, 2024, 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
@@ -38,75 +38,34 @@ enum options_client
{
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
OPT_PAGER, OPT_TEE,
- OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS,
- OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE,
- OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES,
- OPT_MASTER_DATA, OPT_AUTOCOMMIT, OPT_AUTO_REHASH,
- OPT_LINE_NUMBERS, OPT_COLUMN_NAMES, OPT_CONNECT_TIMEOUT,
- OPT_MAX_ALLOWED_PACKET, OPT_NET_BUFFER_LENGTH,
- OPT_SELECT_LIMIT, OPT_MAX_JOIN_SIZE, OPT_SSL_SSL,
+ OPT_OPTIMIZE,
+ OPT_TABLES,
+ OPT_MASTER_DATA,
OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH,
- 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_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,
- OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
- OPT_FLUSH_TABLES,
- OPT_TRIGGERS,
- OPT_MYSQL_ONLY_PRINT,
- OPT_MYSQL_LOCK_DIRECTORY,
- OPT_USE_THREADS,
- OPT_IMPORT_USE_THREADS,
- OPT_MYSQL_NUMBER_OF_QUERY,
+ OPT_SSL_CIPHER, OPT_LOCAL_INFILE,
+ OPT_COMPACT,
+ OPT_MYSQL_PROTOCOL,
+ OPT_SKIP_OPTIMIZATION,
+ OPT_COMPATIBLE, OPT_DELIMITER,
+ OPT_SERVER_ARG,
+ OPT_START_DATETIME, OPT_STOP_DATETIME,
OPT_IGNORE_DATABASE,
- OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
- OPT_TZ_UTC, OPT_CREATE_SLAP_SCHEMA,
- OPT_MYSQLDUMP_SLAVE_APPLY,
+ OPT_IGNORE_TABLE,
OPT_MYSQLDUMP_SLAVE_DATA,
- OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
-#ifdef WHEN_FLASHBACK_REVIEW_READY
- OPT_REVIEW,
- OPT_REVIEW_DBNAME, OPT_REVIEW_TABLENAME,
-#endif
- OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING,
- OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
- OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
- OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
- OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
- OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
- OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
- OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
- OPT_SLAP_PRE_QUERY,
- OPT_SLAP_POST_QUERY,
- OPT_SLAP_PRE_SYSTEM,
- OPT_SLAP_POST_SYSTEM,
- OPT_SLAP_COMMIT,
- OPT_SLAP_DETACH,
- OPT_SLAP_NO_DROP,
- OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT_MODE, OPT_SERVER_ID,
- OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
- OPT_AUTO_VERTICAL_OUTPUT,
- OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
- OPT_WRITE_BINLOG, OPT_DUMP_DATE,
- OPT_INIT_COMMAND,
+ OPT_SLAP_CSV,
+ OPT_BASE64_OUTPUT_MODE,
+ OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES,
+ OPT_WRITE_BINLOG,
OPT_PLUGIN_DIR,
OPT_DEFAULT_AUTH,
- OPT_ABORT_SOURCE_ON_ERROR,
OPT_REWRITE_DB,
- OPT_REPORT_PROGRESS,
- OPT_SKIP_ANNOTATE_ROWS_EVENTS,
OPT_SSL_CRL, OPT_SSL_CRLPATH,
OPT_IGNORE_DATA,
OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS,
OPT_CHECK_IF_UPGRADE_NEEDED,
OPT_COMPATIBILTY_CLEARTEXT_PLUGIN,
- OPT_SHUTDOWN_WAIT_FOR_SLAVES,
- OPT_COPY_S3_TABLES,
- OPT_PRINT_TABLE_METADATA,
- OPT_ASOF_TIMESTAMP,
+ OPT_STOP_POSITION,
+ OPT_SERVER_ID,
OPT_IGNORE_DOMAIN_IDS,
OPT_DO_DOMAIN_IDS,
OPT_IGNORE_SERVER_IDS,
diff --git a/client/mysql.cc b/client/mysql.cc
index ab4c3cd7..d9173cf6 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2022, MariaDB Corporation.
+ Copyright (c) 2009, 2024, 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
@@ -226,7 +226,7 @@ typedef struct st_status
ulong query_start_line;
char *file_name;
LINE_BUFFER *line_buff;
- bool batch,add_to_history;
+ bool batch, add_to_history, sandbox;
} STATUS;
@@ -244,7 +244,7 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0,
vertical=0, line_numbers=1, column_names=1,opt_html=0,
opt_xml=0,opt_nopager=1, opt_outfile=0, named_cmds= 0,
tty_password= 0, opt_nobeep=0, opt_reconnect=1,
- opt_secure_auth= 0,
+ opt_secure_auth= 0,
default_pager_set= 0, opt_sigint_ignore= 0,
auto_vertical_output= 0,
show_warnings= 0, executing_query= 0,
@@ -324,7 +324,8 @@ static int com_quit(String *str,char*),
com_rehash(String *str, char*), com_tee(String *str, char*),
com_notee(String *str, char*), com_charset(String *str,char*),
com_prompt(String *str, char*), com_delimiter(String *str, char*),
- com_warnings(String *str, char*), com_nowarnings(String *str, char*);
+ com_warnings(String *str, char*), com_nowarnings(String *str, char*),
+ com_sandbox(String *str, char*);
#ifdef USE_POPEN
static int com_nopager(String *str, char*), com_pager(String *str, char*),
@@ -372,11 +373,12 @@ typedef struct {
static COMMANDS commands[] = {
{ "?", '?', com_help, 1, "Synonym for `help'." },
+ { "charset", 'C', com_charset, 1,
+ "Switch to another charset. Might be needed for processing binlog with multi-byte charsets." },
{ "clear", 'c', com_clear, 0, "Clear the current input statement."},
{ "connect",'r', com_connect,1,
"Reconnect to the server. Optional arguments are db and host." },
- { "delimiter", 'd', com_delimiter, 1,
- "Set statement delimiter." },
+ { "delimiter", 'd', com_delimiter, 1, "Set statement delimiter." },
#ifdef USE_POPEN
{ "edit", 'e', com_edit, 0, "Edit command with $EDITOR."},
#endif
@@ -389,6 +391,8 @@ static COMMANDS commands[] = {
{ "nopager",'n', com_nopager,0, "Disable pager, print to stdout." },
#endif
{ "notee", 't', com_notee, 0, "Don't write into outfile." },
+ { "nowarning", 'w', com_nowarnings, 0,
+ "Don't show warnings after every statement." },
#ifdef USE_POPEN
{ "pager", 'P', com_pager, 1,
"Set PAGER [to_pager]. Print the query results via PAGER." },
@@ -397,6 +401,8 @@ static COMMANDS commands[] = {
{ "prompt", 'R', com_prompt, 1, "Change your mysql prompt."},
{ "quit", 'q', com_quit, 0, "Quit mysql." },
{ "rehash", '#', com_rehash, 0, "Rebuild completion hash." },
+ { "sandbox", '-', com_sandbox, 0,
+ "Disallow commands that access the file system (except \\P without an argument and \\e)." },
{ "source", '.', com_source, 1,
"Execute an SQL script file. Takes a file name as an argument."},
{ "status", 's', com_status, 0, "Get status information from the server."},
@@ -407,12 +413,8 @@ static COMMANDS commands[] = {
"Set outfile [to_outfile]. Append everything into given outfile." },
{ "use", 'u', com_use, 1,
"Use another database. Takes database name as argument." },
- { "charset", 'C', com_charset, 1,
- "Switch to another charset. Might be needed for processing binlog with multi-byte charsets." },
{ "warnings", 'W', com_warnings, 0,
"Show warnings after every statement." },
- { "nowarning", 'w', com_nowarnings, 0,
- "Don't show warnings after every statement." },
/* Get bash-like expansion for some commands */
{ "create table", 0, 0, 0, ""},
{ "create database", 0, 0, 0, ""},
@@ -1636,35 +1638,47 @@ static struct my_option my_long_options[] =
0, 0, 0, 0, 0},
{"help", 'I', "Synonym for -?", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0},
- {"abort-source-on-error", OPT_ABORT_SOURCE_ON_ERROR,
+ {"abort-source-on-error", 0,
"Abort 'source filename' operations in case of errors",
&batch_abort_on_error, &batch_abort_on_error, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-rehash", OPT_AUTO_REHASH,
+ {"auto-rehash", 0,
"Enable automatic rehashing. One doesn't need to use 'rehash' to get table "
- "and field completion, but startup and reconnecting may take a longer time. "
- "Disable with --disable-auto-rehash.",
- &opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
- 0, 0},
+ "and field completion, but startup and reconnecting may take a longer time.",
+ &opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"no-auto-rehash", 'A',
"No automatic rehashing. One has to use 'rehash' to get table and field "
"completion. This gives a quicker start of mysql and disables rehashing "
"on reconnect.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT,
+ {"auto-vertical-output", 0,
"Automatically switch to vertical output mode if the result is wider "
- "than the terminal width.",
- &auto_vertical_output, &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0,
- 0, 0, 0, 0, 0},
+ "than the terminal width.", &auto_vertical_output, &auto_vertical_output,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"batch", 'B',
"Don't use history file. Disable interactive behavior. (Enables --silent.)",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"binary-mode", 0,
+ "Binary mode allows certain character sequences to be processed as data "
+ "that would otherwise be treated with a special meaning by the parser. "
+ "Specifically, this switch turns off parsing of all client commands except "
+ "\\C and DELIMITER in non-interactive mode (i.e., when binary mode is "
+ "combined with either 1) piped input, 2) the --batch mysql option, or 3) "
+ "the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and "
+ "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},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
+ {"column-names", 0, "Write column names in results.",
+ &column_names, &column_names, 0, GET_BOOL,
+ NO_ARG, 1, 0, 0, 0, 0, 0},
+ {"skip-column-names", 'N', "Don't write column names in results.", 0, 0, 0,
+ GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"column-type-info", 0, "Display column type information.",
&column_types_flag, &column_types_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"comments", 'c', "Preserve comments. Send comments to the server."
@@ -1674,6 +1688,16 @@ static struct my_option my_long_options[] =
{"compress", 'C', "Use compression in server/client protocol.",
&opt_compress, &opt_compress, 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},
+ {"connect_timeout", 0, "Number of seconds before connection timeout.",
+ &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG,
+ 0, 0, 3600*12, 0, 0, 0},
+ {"database", 'D', "Database to use.", &current_db,
+ &current_db, 0, GET_STR_ALLOC, 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},
@@ -1681,70 +1705,64 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log.", &default_dbug_option,
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"database", 'D', "Database to use.", &current_db,
- &current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
+ {"default-auth", 0, "Default authentication client-side plugin to use.",
+ &opt_default_auth, &opt_default_auth, 0,
+ GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"default-character-set", 0,
"Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str,
&delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN,
+ "Obsolete option. Exists only for MySQL compatibility.",
+ 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN, "Obsolete option. Exists only for MySQL compatibility.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"vertical", 'E', "Print the output of a query (rows) vertically.",
- &vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
- 0},
- {"force", 'f', "Continue even if we get an SQL error. Sets abort-source-on-error to 0",
- &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
- 0, 0, 0, 0},
+ {"force", 'f',
+ "Continue even if we get an SQL error. Sets abort-source-on-error to 0",
+ &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"host", 'h', "Connect to host.", &current_host,
+ &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"html", 'H', "Produce HTML output.", &opt_html, &opt_html,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"ignore-spaces", 'i', "Ignore space after function names.",
+ &ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"init-command", 0,
+ "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},
+ {"line-numbers", 0, "Write line numbers for errors.",
+ &line_numbers, &line_numbers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+ {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0,
+ GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"local-infile", OPT_LOCAL_INFILE, "Enable LOAD DATA LOCAL INFILE.",
+ &opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ {"max-allowed-packet", 0,
+ "The maximum packet length to send to or receive from server.",
+ &opt_max_allowed_packet, &opt_max_allowed_packet, 0, GET_ULONG,
+ REQUIRED_ARG, 16*1024LL*1024LL, 4096, 2*1024LL*1024LL*1024LL, 0, 1024, 0},
+ {"max-join-size", 0,
+ "Automatic limit for rows in a join when using --safe-updates.",
+ &max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
+ 1, ULONG_MAX, 0, 1, 0},
{"named-commands", 'G',
"Enable named commands. Named commands mean this program's internal "
"commands; see mysql> help . When enabled, the named commands can be "
"used from any line of the query, otherwise only from the first line, "
"before an enter. Disable with --disable-named-commands. This option "
"is disabled by default.",
- &named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
- {"ignore-spaces", 'i', "Ignore space after function names.",
- &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 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},
- {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
- &opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ &named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"net-buffer-length", 0,
+ "The buffer size for TCP/IP and socket communication.",
+ &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG,
+ REQUIRED_ARG, 16384, 1024, 512*1024ULL*1024ULL, MALLOC_OVERHEAD, 1024, 0},
{"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
&opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"host", 'h', "Connect to host.", &current_host,
- &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"html", 'H', "Produce HTML output.", &opt_html, &opt_html,
- 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0,
- GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
- &line_numbers, &line_numbers, 0, GET_BOOL,
- NO_ARG, 1, 0, 0, 0, 0, 0},
- {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
- NO_ARG, 0, 0, 0, 0, 0, 0},
- {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
- &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
- &column_names, &column_names, 0, GET_BOOL,
- NO_ARG, 1, 0, 0, 0, 0, 0},
- {"skip-column-names", 'N',
- "Don't write column names in results.",
- 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C).",
- &opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
- NO_ARG, 0, 0, 0, 0, 0, 0},
{"one-database", 'o',
"Ignore statements except those that occur while the default "
"database is the one named at the command line.",
@@ -1765,19 +1783,20 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"plugin-dir", 0, "Directory for client-side plugins.", &opt_plugin_dir,
+ &opt_plugin_dir, 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, "
#if MYSQL_PORT_DEFAULT == 0
"/etc/services, "
#endif
- "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
- &opt_mysql_port,
- &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"progress-reports", OPT_REPORT_PROGRESS,
+ "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", &opt_mysql_port,
+ &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"progress-reports", 0,
"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 command line prompt to this value.",
+ {"prompt", 0, "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).",
@@ -1788,11 +1807,27 @@ static struct my_option my_long_options[] =
"if the output is suspended. Doesn't use history file.",
&quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"raw", 'r', "Write fields without conversion. Used with --batch.",
- &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0,
- 0, 0, 0},
- {"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable "
- "with --disable-reconnect. This option is enabled by default.",
+ &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"reconnect", 0, "Reconnect if the connection is lost.",
&opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+ {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
+ &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
+ &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"sandbox", 0, "Disallow commands that access the file system (except \\P without an argument and \\e).",
+ &status.sandbox, &status.sandbox, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"secure-auth", 0, "Refuse client connecting to server if it"
+ " uses old (pre-4.1.1) protocol.", &opt_secure_auth,
+ &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"select-limit", 0,
+ "Automatic limit for SELECT when using --safe-updates.", &select_limit,
+ &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L, 1, ULONG_MAX, 0, 1, 0},
+ {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
+ 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"show-warnings", 0, "Show warnings after every statement.",
+ &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"sigint-ignore", 0, "Ignore SIGINT (CTRL-C).", &opt_sigint_ignore,
+ &opt_sigint_ignore, 0, GET_BOOL, NO_ARG, 0, 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},
{"socket", 'S', "The socket file to use for connection.",
@@ -1806,73 +1841,22 @@ static struct my_option my_long_options[] =
"Does not work in batch mode. Disable with --disable-tee. "
"This option is disabled by default.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
+ &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", &current_user,
&current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
- &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
- 0, 0, 0, 0},
- {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
- &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
- 0, 0, 0, 0},
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
0, 0, GET_NO_ARG, 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},
+ {"vertical", 'E', "Print the output of a query (rows) vertically.",
+ &vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"connect_timeout", OPT_CONNECT_TIMEOUT,
- "Number of seconds before connection timeout.",
- &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG,
- 0, 0, 3600*12, 0, 0, 0},
- {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
- "The maximum packet length to send to or receive from server.",
- &opt_max_allowed_packet, &opt_max_allowed_packet, 0,
- GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
- (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
- {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
- "The buffer size for TCP/IP and socket communication.",
- &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG,
- REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
- {"select_limit", OPT_SELECT_LIMIT,
- "Automatic limit for SELECT when using --safe-updates.",
- &select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L,
- 1, ULONG_MAX, 0, 1, 0},
- {"max_join_size", OPT_MAX_JOIN_SIZE,
- "Automatic limit for rows in a join when using --safe-updates.",
- &max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
- 1, ULONG_MAX, 0, 1, 0},
- {"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
- " uses old (pre-4.1.1) protocol.", &opt_secure_auth,
- &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
- 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
- &show_warnings, &show_warnings, 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},
- {"default_auth", OPT_DEFAULT_AUTH,
- "Default authentication client-side plugin to use.",
- &opt_default_auth, &opt_default_auth, 0,
- GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"binary-mode", 0,
- "Binary mode allows certain character sequences to be processed as data "
- "that would otherwise be treated with a special meaning by the parser. "
- "Specifically, this switch turns off parsing of all client commands except "
- "\\C and DELIMITER in non-interactive mode (i.e., when binary mode is "
- "combined with either 1) piped input, 2) the --batch mysql option, or 3) "
- "the 'source' command). Also, in binary mode, occurrences of '\\r\\n' and "
- "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},
+ {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 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}
};
@@ -2924,9 +2908,7 @@ static void initialize_readline ()
array of matches, or NULL if there aren't any.
*/
-static char **new_mysql_completion(const char *text,
- int start __attribute__((unused)),
- int end __attribute__((unused)))
+static char **new_mysql_completion(const char *text, int, int)
{
if (!status.batch && !quick)
#if defined(USE_NEW_READLINE_INTERFACE)
@@ -3249,8 +3231,7 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *las
}
-static int com_server_help(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)), char *help_arg)
+static int com_server_help(String *buffer, char *, char *help_arg)
{
MYSQL_ROW cur;
const char *server_cmd;
@@ -3352,18 +3333,16 @@ err:
return error;
}
-static int
-com_help(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_help(String *buffer, char *line)
{
int i, j;
char * help_arg= strchr(line,' '), buff[32], *end;
if (help_arg)
{
- while (my_isspace(charset_info,*help_arg))
+ while (my_isspace(charset_info, *help_arg))
help_arg++;
if (*help_arg)
- return com_server_help(buffer,line,help_arg);
+ return com_server_help(buffer, line, help_arg);
}
put_info("\nGeneral information about MariaDB can be found at\n"
@@ -3386,9 +3365,7 @@ com_help(String *buffer __attribute__((unused)),
}
- /* ARGSUSED */
-static int
-com_clear(String *buffer,char *line __attribute__((unused)))
+static int com_clear(String *buffer,char *)
{
#ifdef HAVE_READLINE
if (status.add_to_history)
@@ -3413,9 +3390,7 @@ static void adjust_console_codepage(const char *name __attribute__((unused)))
}
- /* ARGSUSED */
-static int
-com_charset(String *buffer __attribute__((unused)), char *line)
+static int com_charset(String *, char *line)
{
char buff[256], *param;
CHARSET_INFO * new_cs;
@@ -3448,8 +3423,7 @@ com_charset(String *buffer __attribute__((unused)), char *line)
*/
-static int
-com_go(String *buffer,char *line __attribute__((unused)))
+static int com_go(String *buffer, char *)
{
char buff[200]; /* about 110 chars used so far */
char time_buff[53+3+1]; /* time max + space & parens + NUL */
@@ -4032,9 +4006,7 @@ tee_print_sized_data(const char *data, unsigned int data_length, unsigned int to
}
-
-static void
-print_table_data_html(MYSQL_RES *result)
+static void print_table_data_html(MYSQL_RES *result)
{
MYSQL_ROW cur;
MYSQL_FIELD *field;
@@ -4330,15 +4302,15 @@ print_tab_data(MYSQL_RES *result)
}
}
-static int
-com_tee(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_tee(String *, char *line)
{
char file_name[FN_REFLEN], *end, *param;
+ if (status.sandbox)
+ return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0);
if (status.batch)
return 0;
- while (my_isspace(charset_info,*line))
+ while (my_isspace(charset_info, *line))
line++;
if (!(param = strchr(line, ' '))) // if outfile wasn't given, use the default
{
@@ -4375,9 +4347,7 @@ com_tee(String *buffer __attribute__((unused)),
}
-static int
-com_notee(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_notee(String *, char *)
{
if (opt_outfile)
end_tee();
@@ -4390,9 +4360,7 @@ com_notee(String *buffer __attribute__((unused)),
*/
#ifdef USE_POPEN
-static int
-com_pager(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_pager(String *, char *line)
{
char pager_name[FN_REFLEN], *end, *param;
@@ -4420,6 +4388,8 @@ com_pager(String *buffer __attribute__((unused)),
}
else
{
+ if (status.sandbox)
+ return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0);
end= strmake_buf(pager_name, param);
while (end > pager_name && (my_isspace(charset_info,end[-1]) ||
my_iscntrl(charset_info,end[-1])))
@@ -4434,9 +4404,7 @@ com_pager(String *buffer __attribute__((unused)),
}
-static int
-com_nopager(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_nopager(String *, char *)
{
strmov(pager, "stdout");
opt_nopager=1;
@@ -4448,7 +4416,7 @@ com_nopager(String *buffer __attribute__((unused)),
#ifdef USE_POPEN
static int
-com_edit(String *buffer,char *line __attribute__((unused)))
+com_edit(String *buffer,char *)
{
char filename[FN_REFLEN],buff[160];
int fd,tmp,error;
@@ -4495,17 +4463,15 @@ err:
/* If arg is given, exit without errors. This happens on command 'quit' */
-static int
-com_quit(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_quit(String *, char *)
{
status.exit_status=0;
return 1;
}
static int
-com_rehash(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+com_rehash(String *,
+ char *)
{
#ifdef HAVE_READLINE
build_completion_hash(1, 0);
@@ -4515,12 +4481,13 @@ com_rehash(String *buffer __attribute__((unused)),
#ifdef USE_POPEN
-static int
-com_shell(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_shell(String *, char *line)
{
char *shell_cmd;
+ if (status.sandbox)
+ return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0);
+
/* Skip space from line begin */
while (my_isspace(charset_info, *line))
line++;
@@ -4543,8 +4510,7 @@ com_shell(String *buffer __attribute__((unused)),
#endif
-static int
-com_print(String *buffer,char *line __attribute__((unused)))
+static int com_print(String *buffer,char *)
{
tee_puts("--------------", stdout);
(void) tee_fputs(buffer->c_ptr(), stdout);
@@ -4554,9 +4520,8 @@ com_print(String *buffer,char *line __attribute__((unused)))
return 0; /* If empty buffer */
}
- /* ARGSUSED */
-static int
-com_connect(String *buffer, char *line)
+
+static int com_connect(String *buffer, char *line)
{
char *tmp, buff[256];
my_bool save_rehash= opt_rehash;
@@ -4609,8 +4574,7 @@ com_connect(String *buffer, char *line)
}
-static int com_source(String *buffer __attribute__((unused)),
- char *line)
+static int com_source(String *, char *line)
{
char source_name[FN_REFLEN], *end, *param;
LINE_BUFFER *line_buff;
@@ -4619,6 +4583,9 @@ static int com_source(String *buffer __attribute__((unused)),
FILE *sql_file;
my_bool save_ignore_errors;
+ if (status.sandbox)
+ return put_info("Not allowed in the sandbox mode", INFO_ERROR, 0);
+
/* Skip space from file name */
while (my_isspace(charset_info,*line))
line++;
@@ -4653,6 +4620,7 @@ static int com_source(String *buffer __attribute__((unused)),
bfill((char*) &status,sizeof(status),(char) 0);
status.batch=old_status.batch; // Run in batch mode
+ status.sandbox=old_status.sandbox;
status.line_buff=line_buff;
status.file_name=source_name;
glob_buffer.length(0); // Empty command buffer
@@ -4674,9 +4642,7 @@ static int com_source(String *buffer __attribute__((unused)),
}
- /* ARGSUSED */
-static int
-com_delimiter(String *buffer __attribute__((unused)), char *line)
+static int com_delimiter(String *, char *line)
{
char buff[256], *tmp;
@@ -4703,9 +4669,7 @@ com_delimiter(String *buffer __attribute__((unused)), char *line)
return 0;
}
- /* ARGSUSED */
-static int
-com_use(String *buffer __attribute__((unused)), char *line)
+static int com_use(String *, char *line)
{
char *tmp, buff[FN_REFLEN + 1];
int select_db;
@@ -4778,18 +4742,21 @@ com_use(String *buffer __attribute__((unused)), char *line)
return 0;
}
-static int
-com_warnings(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_sandbox(String *, char *)
+{
+ status.sandbox= 1;
+ put_info("Sandbox mode.", INFO_INFO);
+ return 0;
+}
+
+static int com_warnings(String *, char *)
{
show_warnings = 1;
put_info("Show warnings enabled.",INFO_INFO);
return 0;
}
-static int
-com_nowarnings(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_nowarnings(String *, char *)
{
show_warnings = 0;
put_info("Show warnings disabled.",INFO_INFO);
@@ -5041,10 +5008,7 @@ sql_connect(char *host,char *database,char *user,char *password,uint silent)
}
-
-static int
-com_status(String *buffer __attribute__((unused)),
- char *line __attribute__((unused)))
+static int com_status(String *, char *)
{
const char *status_str;
char buff[40];
@@ -5169,8 +5133,7 @@ select_limit, max_join_size);
return 0;
}
-static const char *
-server_version_string(MYSQL *con)
+static const char * server_version_string(MYSQL *con)
{
/* Only one thread calls this, so no synchronization is needed */
if (server_version == NULL)
@@ -5295,8 +5258,7 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
}
-static int
-put_error(MYSQL *con)
+static int put_error(MYSQL *con)
{
return put_info(mysql_error(con), INFO_ERROR, mysql_errno(con),
mysql_sqlstate(con));
@@ -5362,7 +5324,7 @@ void tee_putc(int c, FILE *file)
len("4294967296 days, 23 hours, 59 minutes, 60.000 seconds") -> 53
*/
-static void nice_time(double sec,char *buff,bool part_second)
+static void nice_time(double sec, char *buff, bool part_second)
{
ulong tmp;
if (sec >= 3600.0*24)
@@ -5643,8 +5605,7 @@ static void init_username()
}
}
-static int com_prompt(String *buffer __attribute__((unused)),
- char *line)
+static int com_prompt(String *, char *line)
{
char *ptr=strchr(line, ' ');
prompt_counter = 0;
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 7bac797f..fd6e1abc 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2006, 2013, Oracle and/or its affiliates.
- Copyright (c) 2010, 2017, MariaDB
+ Copyright (c) 2010, 2024, 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
@@ -87,10 +87,10 @@ static struct my_option my_long_options[]=
{"basedir", 'b',
"Not used by mysql_upgrade. Only for backward compatibility.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"character-sets-dir", OPT_CHARSETS_DIR,
+ {"character-sets-dir", 0,
"Not used by mysql_upgrade. Only for backward compatibility.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
- {"compress", OPT_COMPRESS,
+ {"compress", 0,
"Not used by mysql_upgrade. Only for backward compatibility.",
&not_used, &not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"datadir", 'd',
@@ -103,12 +103,12 @@ static struct my_option my_long_options[]=
{"debug", '#', "Output debug log.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
+ {"default-character-set", 0,
"Not used by mysql_upgrade. Only for backward compatibility.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default_auth", OPT_DEFAULT_AUTH,
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 69bd3cd7..01b012d3 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, 2019, MariaDB
+ Copyright (c) 2010, 2024, 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
@@ -141,10 +141,10 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
+ {"debug-info", 0, "Print some debug info at exit.",
&debug_info_flag, &debug_info_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f',
@@ -158,7 +158,7 @@ static struct my_option my_long_options[] =
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
+ {"default-character-set", 0,
"Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
@@ -216,21 +216,21 @@ static struct my_option my_long_options[] =
0, 0, 0},
{"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_UINT,
OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"connect_timeout", OPT_CONNECT_TIMEOUT, "", &opt_connect_timeout,
+ {"connect_timeout", 0, "", &opt_connect_timeout,
&opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG, 3600*12, 0,
3600*12, 0, 1, 0},
- {"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
+ {"shutdown_timeout", 0, "", &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,
+ {"wait_for_all_slaves", 0,
"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.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
+ {"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1405,7 +1405,9 @@ static void usage(void)
refresh Flush all tables and close and open logfiles\n\
shutdown Take server down\n\
status Gives a short status message from the server\n\
+ start-all-slaves Start all slaves\n\
start-slave Start slave\n\
+ stop-all-slaves Stop all slaves\n\
stop-slave Stop slave\n\
variables Prints variables available\n\
version Get version info from server");
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 3d22f091..8caf39b2 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
- Copyright (c) 2009, 2020, MariaDB
+ Copyright (c) 2009, 2024, 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
@@ -1682,7 +1682,7 @@ static struct my_option my_options[] =
like this:
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
*/
- {"character-sets-dir", OPT_CHARSETS_DIR,
+ {"character-sets-dir", 0,
"Directory for character set files.", &charsets_dir,
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"database", 'd', "List entries for just this database (local log only).",
@@ -1692,13 +1692,13 @@ static struct my_option my_options[] =
{"debug", '#', "Output debug log.", &current_dbug_option,
&current_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
+ {"debug-check", 0, "Check memory and open file usage at exit .",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
+ {"debug-info", 0, "Print some debug info at exit.",
&debug_info_flag, &debug_info_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
+ {"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1734,7 +1734,7 @@ static struct my_option my_options[] =
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', "Password to connect to remote server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugindir, &opt_plugindir, 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 "
@@ -1760,14 +1760,14 @@ static struct my_option my_options[] =
&result_file_name, &result_file_name, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
#ifdef WHEN_FLASHBACK_REVIEW_READY
- {"review", opt_flashback_review, "Print review sql in output file.",
+ {"review", 0, "Print review sql in output file.",
&opt_flashback_review, &opt_flashback_review, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
- {"review-dbname", opt_flashback_flashback_review_dbname,
+ {"review-dbname", 0,
"Writing flashback original row data into this db",
&flashback_review_dbname, &flashback_review_dbname,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"review-tablename", opt_flashback_flashback_review_tablename,
+ {"review-tablename", 0,
"Writing flashback original row data into this table",
&flashback_review_tablename, &flashback_review_tablename,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1817,7 +1817,7 @@ static struct my_option my_options[] =
"Alias for --do-server-ids.",
&server_id_str, &server_id_str, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"set-charset", OPT_SET_CHARSET,
+ {"set-charset", 0,
"Add 'SET NAMES character_set' to the output.", &charset,
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"short-form", 's', "Just show regular queries: no extra info, no "
@@ -1900,7 +1900,7 @@ that may lead to an endless loop.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Print version and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0},
- {"open_files_limit", OPT_OPEN_FILES_LIMIT,
+ {"open_files_limit", 0,
"Used to reserve file descriptors for use by this program.",
&open_files_limit, &open_files_limit, 0, GET_ULONG,
REQUIRED_ARG, MY_NFILE, 8, OS_FILE_LIMIT, 0, 1, 0},
@@ -1926,12 +1926,12 @@ that may lead to an endless loop.",
"Updates to a database with a different name than the original. \
Example: rewrite-db='from->to'.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"skip-annotate-row-events", OPT_SKIP_ANNOTATE_ROWS_EVENTS,
+ {"skip-annotate-row-events", 0,
"Don't print Annotate_rows events stored in the binary log.",
(uchar**) &opt_skip_annotate_row_events,
(uchar**) &opt_skip_annotate_row_events,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"print-table-metadata", OPT_PRINT_TABLE_METADATA,
+ {"print-table-metadata", 0,
"Print metadata stored in Table_map_log_event",
&opt_print_table_metadata, &opt_print_table_metadata, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -2362,11 +2362,6 @@ get_one_option(const struct my_option *opt, const char *argument,
die(1);
}
break;
-#ifdef WHEN_FLASHBACK_REVIEW_READY
- case opt_flashback_review:
- opt_flashback_review= 1;
- break;
-#endif
case OPT_START_DATETIME:
start_datetime= convert_str_to_timestamp(start_datetime_str);
break;
@@ -3546,7 +3541,8 @@ int main(int argc, char** argv)
{
if (!opt_version)
{
- usage();
+ error("Please provide the log file(s). Run with '--help' for usage "
+ "instructions.");
retval= ERROR_STOP;
}
goto err;
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 2f366ec0..fc93c416 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2001, 2013, Oracle and/or its affiliates.
- Copyright (c) 2010, 2012, MariaDB
+ Copyright (c) 2010, 2024, 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
@@ -82,11 +82,11 @@ static struct my_option my_long_options[] =
"Instead of issuing one query for each table, use one query per database, naming all tables in the database in a comma-separated list.",
&opt_all_in_1, &opt_all_in_1, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
- {"auto-repair", OPT_AUTO_REPAIR,
+ {"auto-repair", 0,
"If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found.",
&opt_auto_repair, &opt_auto_repair, 0, GET_BOOL, NO_ARG, 0,
0, 0, 0, 0, 0},
- {"character-sets-dir", OPT_CHARSETS_DIR,
+ {"character-sets-dir", 0,
"Directory for character set files.", (char**) &charsets_dir,
(char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c', "Check table for errors.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0,
@@ -97,7 +97,7 @@ static struct my_option my_long_options[] =
{"check-upgrade", 'g',
"Check tables for version-dependent changes. May be used with --auto-repair to correct tables requiring version-dependent updates.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
+ {"compress", 0, "Use compression in server/client protocol.",
&opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"databases", 'B',
@@ -111,16 +111,16 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
+ {"debug-info", 0, "Print some debug info at exit.",
&debug_info_flag, &debug_info_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
+ {"default-character-set", 0,
"Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
+ {"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -140,7 +140,7 @@ static struct my_option my_long_options[] =
"If you are using this option with CHECK TABLE, it will ensure that the table is 100 percent consistent, but will take a long time. If you are using this option with REPAIR TABLE, it will force using old slow repair with keycache method, instead of much faster repair by sorting.",
&opt_extended, &opt_extended, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
- {"flush", OPT_FLUSH_TABLES, "Flush each table after check. This is useful if you don't want to have the checked tables take up space in the caches after the check",
+ {"flush", 0, "Flush each table after check. This is useful if you don't want to have the checked tables take up space in the caches after the check",
&opt_flush_tables, &opt_flush_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0 },
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
@@ -150,7 +150,7 @@ static struct my_option my_long_options[] =
{"medium-check", 'm',
"Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"write-binlog", OPT_WRITE_BINLOG,
+ {"write-binlog", 0,
"Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Use --skip-write-binlog "
"when commands should not be sent to replication slaves.",
&opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG,
@@ -168,7 +168,7 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 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 "
@@ -199,7 +199,7 @@ static struct my_option my_long_options[] =
#include <sslopt-longopts.h>
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"use-frm", OPT_FRM,
+ {"use-frm", 0,
"When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.",
&opt_frm, &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
@@ -897,6 +897,7 @@ static int disable_binlog()
return run_query("SET SQL_LOG_BIN=0", 0);
}
+
static int handle_request_for_tables(char *tables, size_t length,
my_bool view, my_bool dont_quote)
{
@@ -1028,7 +1029,10 @@ static void insert_table_name(DYNAMIC_ARRAY *arr, char *in, size_t dblen)
insert_dynamic(arr, (uchar*) buf);
}
-static void print_result()
+/* Ok as mysqlcheck is not multi threaded */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
+static void __attribute__((noinline)) print_result()
{
MYSQL_RES *res;
MYSQL_ROW row;
@@ -1119,6 +1123,7 @@ static void print_result()
mysql_free_result(res);
DBUG_VOID_RETURN;
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
static int dbConnect(char *host, char *user, char *passwd)
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 0a6ebf0e..3ef8b1d6 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2010, 2020, MariaDB Corporation.
+ Copyright (c) 2010, 2024, 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
@@ -166,7 +166,6 @@ static my_bool server_supports_switching_charsets= TRUE;
static ulong opt_compatible_mode= 0;
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
-#define MYSQL_OPT_MAX_STATEMENT_TIME 0
#define MYSQL_OPT_SLAVE_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL 2
static uint opt_mysql_port= 0, opt_master_data;
@@ -250,41 +249,36 @@ static struct my_option my_long_options[] =
{
{"all-databases", 'A',
"Dump all the databases. This will be same as --databases with all databases selected.",
- &opt_alldbs, &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
+ &opt_alldbs, &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"all-tablespaces", 'Y',
"Dump all the tablespaces.",
- &opt_alltspcs, &opt_alltspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
+ &opt_alltspcs, &opt_alltspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-tablespaces", 'y',
"Do not dump any tablespace information.",
- &opt_notspcs, &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
- {"add-drop-database", OPT_DROP_DATABASE, "Add a DROP DATABASE before each create.",
+ &opt_notspcs, &opt_notspcs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"add-drop-database", 0, "Add a DROP DATABASE before each create.",
&opt_drop_database, &opt_drop_database, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
- {"add-drop-table", OPT_DROP, "Add a DROP TABLE before each create.",
- &opt_drop, &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
- 0},
+ {"add-drop-table", 0, "Add a DROP TABLE before each create.",
+ &opt_drop, &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"add-drop-trigger", 0, "Add a DROP TRIGGER before each create.",
&opt_drop_trigger, &opt_drop_trigger, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
- {"add-locks", OPT_LOCKS, "Add locks around INSERT statements.",
- &opt_lock, &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
- 0},
- {"allow-keywords", OPT_KEYWORDS,
+ {"add-locks", 0, "Add locks around INSERT statements.",
+ &opt_lock, &opt_lock, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+ {"allow-keywords", 0,
"Allow creation of column names that are keywords.", &opt_keywords,
&opt_keywords, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"apply-slave-statements", OPT_MYSQLDUMP_SLAVE_APPLY,
+ {"apply-slave-statements", 0,
"Adds 'STOP SLAVE' prior to 'CHANGE MASTER' and 'START SLAVE' to bottom of dump.",
- &opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG,
- 0, 0, 0, 0, 0, 0},
- {"as-of", OPT_ASOF_TIMESTAMP,
+ &opt_slave_apply, &opt_slave_apply, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"as-of", 0,
"Dump system versioned table(s) as of specified timestamp. "
"Argument is interpreted according to the --tz-utc setting. "
"Table structures are always dumped as of current timestamp.",
- &opt_asof_timestamp, &opt_asof_timestamp, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"character-sets-dir", OPT_CHARSETS_DIR,
+ &opt_asof_timestamp, &opt_asof_timestamp, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
+ {"character-sets-dir", 0,
"Directory for character set files.", (char **)&charsets_dir,
(char **)&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"comments", 'i', "Write additional information.",
@@ -309,21 +303,18 @@ static struct my_option my_long_options[] =
&opt_complete_insert, &opt_complete_insert, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.",
- &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
- 0, 0, 0},
- {"copy_s3_tables", OPT_COPY_S3_TABLES,
+ &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"copy_s3_tables", 0,
"If 'no' S3 tables will be ignored, otherwise S3 tables will be copied as "
" Aria tables and then altered to S3",
&opt_copy_s3_tables, &opt_copy_s3_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"create-options", 'a',
"Include all MariaDB specific create options.",
- &create_options, &create_options, 0, GET_BOOL, NO_ARG, 1,
- 0, 0, 0, 0, 0},
+ &create_options, &create_options, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"databases", 'B',
"Dump several databases. Note the difference in usage; in this case no tables are given. All name arguments are regarded as database names. 'USE db_name;' will be included in the output.",
- &opt_databases, &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0,
- 0, 0, 0, 0},
+ &opt_databases, &opt_databases, 0, GET_BOOL, NO_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},
@@ -331,19 +322,17 @@ 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
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
- &debug_info_flag, &debug_info_flag,
- 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"debug-info", 0, "Print some debug info at exit.", &debug_info_flag,
+ &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"delayed-insert", OPT_DELAYED, "Insert rows with INSERT DELAYED.",
- &opt_delayed, &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
- {"delete-master-logs", OPT_DELETE_MASTER_LOGS,
+ {"delayed-insert", 0, "Insert rows with INSERT DELAYED.",
+ &opt_delayed, &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"delete-master-logs", 0,
"Delete logs on master after backup. This automatically enables --master-data.",
&opt_delete_master_logs, &opt_delete_master_logs, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -351,9 +340,8 @@ static struct my_option my_long_options[] =
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER "
"TABLE tb_name ENABLE KEYS */; will be put in the output.", &opt_disable_keys,
&opt_disable_keys, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
- {"dump-date", OPT_DUMP_DATE, "Put a dump date to the end of the output.",
- &opt_dump_date, &opt_dump_date, 0,
- GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
+ {"dump-date", 0, "Put a dump date to the end of the output.",
+ &opt_dump_date, &opt_dump_date, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"dump-history", 'H', "Dump system-versioned tables with history (only for "
"timestamp based versioning)", &opt_dump_history,
&opt_dump_history, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -370,24 +358,23 @@ static struct my_option my_long_options[] =
"Option automatically turns --lock-tables off.",
&opt_slave_data, &opt_slave_data, 0,
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL, 0, 0, 0},
- {"events", 'E', "Dump events.",
- &opt_events, &opt_events, 0, GET_BOOL,
- NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"events", 'E', "Dump events.", &opt_events, &opt_events, 0, GET_BOOL,
+ NO_ARG, 0, 0, 0, 0, 0, 0},
{"extended-insert", 'e',
"Use multiple-row INSERT syntax that include several VALUES lists.",
&extended_insert, &extended_insert, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0},
- {"fields-terminated-by", OPT_FTB,
+ {"fields-terminated-by", 0,
"Fields in the output file are terminated by the given string.",
&fields_terminated, &fields_terminated, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"fields-enclosed-by", OPT_ENC,
+ {"fields-enclosed-by", 0,
"Fields in the output file are enclosed by the given character.",
&enclosed, &enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
- {"fields-optionally-enclosed-by", OPT_O_ENC,
+ {"fields-optionally-enclosed-by", 0,
"Fields in the output file are optionally enclosed by the given character.",
&opt_enclosed, &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
- {"fields-escaped-by", OPT_ESC,
+ {"fields-escaped-by", 0,
"Fields in the output file are escaped by the given character.",
&escaped, &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
@@ -399,29 +386,26 @@ static struct my_option my_long_options[] =
"to the moment all tables are locked. So if you want your dump and "
"the log flush to happen at the same exact moment you should use "
"--lock-all-tables or --master-data with --flush-logs.",
- &flush_logs, &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
- {"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
+ &flush_logs, &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"flush-privileges", 0, "Emit a FLUSH PRIVILEGES statement "
"after dumping the mysql database. This option should be used any "
"time the dump contains the mysql database and any other database "
"that depends on the data in the mysql database for proper restore. ",
&flush_privileges, &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
{"force", 'f', "Continue even if we get an SQL error.",
- &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG,
- 0, 0, 0, 0, 0, 0},
+ &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"gtid", 0, "Used together with --master-data=1 or --dump-slave=1."
"When enabled, the output from those options will set the GTID position "
"instead of the binlog file and offset; the file/offset will appear only as "
"a comment. When disabled, the GTID position will still appear in the "
"output, but only commented.",
- &opt_use_gtid, &opt_use_gtid, 0, GET_BOOL, NO_ARG,
- 0, 0, 0, 0, 0, 0},
+ &opt_use_gtid, &opt_use_gtid, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"header", 0, "Used together with --tab. When enabled, adds header with column names to the top of output txt files.",
&opt_header, &opt_header, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
+ {"hex-blob", 0, "Dump binary strings (BINARY, "
"VARBINARY, BLOB) in hexadecimal format.",
&opt_hex_blob, &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", &current_host,
@@ -443,15 +427,13 @@ static struct my_option my_long_options[] =
"be specified with both database and table names, e.g., "
"--ignore-table=database.table.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"include-master-host-port", OPT_MYSQLDUMP_INCLUDE_MASTER_HOST_PORT,
+ {"include-master-host-port", 0,
"Adds 'MASTER_HOST=<host>, MASTER_PORT=<port>' to 'CHANGE MASTER TO..' "
"in dump produced with --dump-slave.", &opt_include_master_host_port,
- &opt_include_master_host_port, 0, GET_BOOL, NO_ARG,
- 0, 0, 0, 0, 0, 0},
- {"insert-ignore", OPT_INSERT_IGNORE, "Insert rows with INSERT IGNORE.",
- &opt_ignore, &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
- {"lines-terminated-by", OPT_LTB,
+ &opt_include_master_host_port, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"insert-ignore", 0, "Insert rows with INSERT IGNORE.",
+ &opt_ignore, &opt_ignore, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"lines-terminated-by", 0,
"Lines in the output file are terminated by the given string.",
&lines_terminated, &lines_terminated, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -462,7 +444,7 @@ static struct my_option my_long_options[] =
0, 0, 0, 0, 0, 0},
{"lock-tables", 'l', "Lock all tables for read.", &lock_tables,
&lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
- {"log-error", OPT_ERROR_LOG_FILE, "Append warnings and errors to given file.",
+ {"log-error", 0, "Append warnings and errors to given file.",
&log_error_file, &log_error_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"log-queries", 0, "When restoring the dump, the server will, if logging turned on, log the queries to the general and slow query log.",
@@ -479,30 +461,28 @@ static struct my_option my_long_options[] =
"Option automatically turns --lock-tables off.",
&opt_master_data, &opt_master_data, 0,
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
- {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
+ {"max_allowed_packet", 0,
"The maximum packet length to send to or receive from server.",
&opt_max_allowed_packet, &opt_max_allowed_packet, 0,
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
- {"max-statement-time", MYSQL_OPT_MAX_STATEMENT_TIME,
+ {"max-statement-time", 0,
"Max statement execution time. If unset, overrides server default with 0.",
&opt_max_statement_time, &opt_max_statement_time, 0, GET_DOUBLE,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
+ {"net_buffer_length", 0,
"The buffer size for TCP/IP and socket communication.",
&opt_net_buffer_length, &opt_net_buffer_length, 0,
GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L,
MALLOC_OVERHEAD-1024, 1024, 0},
- {"no-autocommit", OPT_AUTOCOMMIT,
+ {"no-autocommit", 0,
"Wrap tables with autocommit/commit statements.",
- &opt_autocommit, &opt_autocommit, 0, GET_BOOL, NO_ARG,
- 0, 0, 0, 0, 0, 0},
+ &opt_autocommit, &opt_autocommit, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-create-db", 'n',
"Suppress the CREATE DATABASE ... IF EXISTS statement that normally is "
"output for each dumped database if --all-databases or --databases is "
"given.",
- &opt_create_db, &opt_create_db, 0,
- GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ &opt_create_db, &opt_create_db, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-create-info", 't', "Don't write table creation info.",
&opt_no_create_info, &opt_no_create_info, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -516,7 +496,7 @@ static struct my_option my_long_options[] =
{"opt", OPT_OPTIMIZE,
"Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"order-by-primary", OPT_ORDER_BY_PRIMARY,
+ {"order-by-primary", 0,
"Sorts each table's rows by primary key, or first unique key, if such a key exists. Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.",
&opt_order_by_primary, &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"order-by-size", 0,
@@ -541,27 +521,24 @@ static struct my_option my_long_options[] =
{"quote-names",'Q', "Quote table and column names with backticks (`).",
&opt_quoted, &opt_quoted, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0},
- {"replace", OPT_MYSQL_REPLACE_INTO, "Use REPLACE INTO instead of INSERT INTO.",
- &opt_replace_into, &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
- 0, 0},
+ {"replace", 0, "Use REPLACE INTO instead of INSERT INTO.", &opt_replace_into,
+ &opt_replace_into, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"result-file", 'r',
"Direct output to a given file. This option should be used in systems "
"(e.g., DOS, Windows) that use carriage-return linefeed pairs (\\r\\n) "
"to separate text lines. This option ensures that only a single newline "
"is used.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"routines", 'R', "Dump stored routines (functions and procedures).",
- &opt_routines, &opt_routines, 0, GET_BOOL,
- NO_ARG, 0, 0, 0, 0, 0, 0},
- {"set-charset", OPT_SET_CHARSET,
- "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},
+ &opt_routines, &opt_routines, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"set-charset", 0,
+ "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},
/*
Note that the combination --single-transaction --master-data
will give bullet-proof binlog position only if server >=4.1.3. That's the
old "FLUSH TABLES WITH READ LOCK does not block commit" fixed bug.
*/
- {"single-transaction", OPT_TRANSACTION,
+ {"single-transaction", 0,
"Creates a consistent snapshot by dumping all tables in a single "
"transaction. Works ONLY for tables stored in storage engines which "
"support multiversioning (currently only InnoDB does); the dump is NOT "
@@ -580,7 +557,7 @@ static struct my_option my_long_options[] =
&opt_mysql_unix_port, &opt_mysql_unix_port, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h>
- {"system", 256, "Dump system tables as portable SQL",
+ {"system", 0, "Dump system tables as portable SQL",
&opt_system, &opt_system, &opt_system_types, GET_SET, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tab",'T',
"Create tab-separated textfile for each table to given path. (Create .sql "
@@ -589,17 +566,16 @@ static struct my_option my_long_options[] =
&path, &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tables", OPT_TABLES, "Overrides option --databases (-B).",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"triggers", OPT_TRIGGERS, "Dump triggers for each dumped table.",
+ {"triggers", 0, "Dump triggers for each dumped table.",
&opt_dump_triggers, &opt_dump_triggers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0},
- {"tz-utc", OPT_TZ_UTC,
+ {"tz-utc", 0,
"Set connection time zone to UTC before commencing the dump and add "
"SET TIME_ZONE=´+00:00´ to the top of the dump file.",
&opt_tz_utc, &opt_tz_utc, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
- {"user", 'u', "User for login if not current user.",
- &current_user, &current_user, 0, GET_STR, REQUIRED_ARG,
- 0, 0, 0, 0, 0, 0},
+ {"user", 'u', "User for login if not current user.", &current_user,
+ &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"verbose", 'v', "Print info about the various stages.",
&verbose, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -609,11 +585,10 @@ static struct my_option my_long_options[] =
&where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
- "Default authentication client-side plugin to use.",
+ {"default_auth", 0, "Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
@@ -770,56 +745,59 @@ static void write_header(FILE *sql_file, const char *db_name)
fputs(">\n", sql_file);
check_io(sql_file);
}
- else if (!opt_compact)
+ else
{
- print_comment(sql_file, 0,
- "-- 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 ",
- fix_for_comment(current_host ? current_host : "localhost"));
- print_comment(sql_file, 0, "Database: %s\n",
- fix_for_comment(db_name ? db_name : ""));
- print_comment(sql_file, 0,
- "-- ------------------------------------------------------\n"
- );
- print_comment(sql_file, 0, "-- Server version\t%s\n",
- mysql_get_server_info(&mysql_connection));
+ fprintf(sql_file, "/*!999999\\- enable the sandbox mode */ \n");
+ if (!opt_compact)
+ {
+ print_comment(sql_file, 0,
+ "-- 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 ",
+ fix_for_comment(current_host ? current_host : "localhost"));
+ print_comment(sql_file, 0, "Database: %s\n",
+ fix_for_comment(db_name ? db_name : ""));
+ print_comment(sql_file, 0,
+ "-- ------------------------------------------------------\n"
+ );
+ print_comment(sql_file, 0, "-- Server version\t%s\n",
+ mysql_get_server_info(&mysql_connection));
- if (!opt_logging)
- fprintf(sql_file,
-"\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL LOG_SLOW_QUERY=0 */;");
+ if (!opt_logging)
+ fprintf(sql_file,
+ "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL LOG_SLOW_QUERY=0 */;");
- if (opt_set_charset)
- fprintf(sql_file,
-"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;"
-"\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;"
-"\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;"
-"\n/*!40101 SET NAMES %s */;\n",default_charset);
+ if (opt_set_charset)
+ fprintf(sql_file,
+ "\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;"
+ "\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;"
+ "\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;"
+ "\n/*!40101 SET NAMES %s */;\n",default_charset);
- if (opt_tz_utc)
- {
- fprintf(sql_file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n");
- fprintf(sql_file, "/*!40103 SET TIME_ZONE='+00:00' */;\n");
- }
+ if (opt_tz_utc)
+ {
+ fprintf(sql_file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n");
+ fprintf(sql_file, "/*!40103 SET TIME_ZONE='+00:00' */;\n");
+ }
- if (!path)
- {
- if (!opt_no_create_info)
+ if (!path)
{
- /* We don't need unique checks as the table is created just before */
- fprintf(md_result_file,"\
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n");
+ if (!opt_no_create_info)
+ {
+ /* We don't need unique checks as the table is created just before */
+ fprintf(md_result_file,
+ "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n");
+ }
+ fprintf(md_result_file,
+ "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n");
}
- fprintf(md_result_file,"\
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\
-");
+ fprintf(sql_file,
+ "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n"
+ "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n",
+ path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
+ compatible_mode_normal_str);
}
- fprintf(sql_file,
- "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n"
- "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n",
- path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
- compatible_mode_normal_str);
check_io(sql_file);
}
} /* write_header */
@@ -1273,8 +1251,9 @@ static int get_options(int *argc, char ***argv)
if (opt_slave_data)
{
opt_lock_all_tables= !opt_single_transaction;
- opt_master_data= 0;
opt_delete_master_logs= 0;
+ if (opt_slave_data != MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL)
+ opt_master_data= 0;
}
/* Ensure consistency of the set of binlog & locking options */
@@ -1287,10 +1266,7 @@ static int get_options(int *argc, char ***argv)
return(EX_USAGE);
}
if (opt_master_data)
- {
opt_lock_all_tables= !opt_single_transaction;
- opt_slave_data= 0;
- }
if (opt_single_transaction || opt_lock_all_tables)
lock_tables= 0;
if (enclosed && opt_enclosed)
@@ -3125,8 +3101,9 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
if (opt_header)
dynstr_set_checked(&select_field_names_for_header, "");
}
- insert_option= ((delayed && opt_ignore) ? " DELAYED IGNORE " :
- delayed ? " DELAYED " : opt_ignore ? " IGNORE " : "");
+
+ insert_option= ((delayed && opt_ignore) ? "DELAYED IGNORE " :
+ delayed ? "DELAYED " : opt_ignore ? "IGNORE " : "");
verbose_msg("-- Retrieving table structure for table %s...\n", table);
@@ -6227,17 +6204,12 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
}
- /* SHOW MASTER STATUS reports file and position */
- print_comment(md_result_file, 0,
- "\n--\n-- Position to start replication or point-in-time "
- "recovery from\n--\n\n");
- fprintf(md_result_file,
- "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
- (use_gtid ? "-- " : comment_prefix), file, offset);
+ /* gtid */
if (have_mariadb_gtid)
{
print_comment(md_result_file, 0,
- "\n--\n-- GTID to start replication from\n--\n\n");
+ "\n-- Preferably use GTID to start replication from GTID "
+ "position:\n\n");
if (use_gtid)
fprintf(md_result_file,
"%sCHANGE MASTER TO MASTER_USE_GTID=slave_pos;\n",
@@ -6246,6 +6218,19 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
"%sSET GLOBAL gtid_slave_pos='%s';\n",
(!use_gtid ? "-- " : comment_prefix), gtid_pos);
}
+
+ /* SHOW MASTER STATUS reports file and position */
+ print_comment(md_result_file, 0,
+ "\n--\n-- Alternately, following is the position of the binary "
+ "logging from SHOW MASTER STATUS at point of backup."
+ "\n-- Use this when creating a replica of the primary server "
+ "where the backup was made."
+ "\n-- The new server will be connecting to the primary server "
+ "where the backup was taken."
+ "\n--\n\n");
+ fprintf(md_result_file,
+ "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
+ (use_gtid ? "-- " : comment_prefix), file, offset);
check_io(md_result_file);
if (!consistent_binlog_pos)
@@ -6324,7 +6309,6 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
const char *gtid_comment_prefix= (use_gtid ? comment_prefix : "-- ");
const char *nogtid_comment_prefix= (!use_gtid ? comment_prefix : "-- ");
- int set_gtid_done= 0;
if (mysql_query_with_error_report(mysql_con, &slave,
multi_source ?
@@ -6340,23 +6324,36 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
return 1;
}
- while ((row= mysql_fetch_row(slave)))
+ print_comment(md_result_file, 0,
+ "\n--\n-- The following is the SQL position of the replication "
+ "taken from SHOW SLAVE STATUS at the time of backup.\n"
+ "-- Use this position when creating a clone of, or replacement "
+ "server, from where the backup was taken."
+ "\n-- This new server will connects to the same primary "
+ "server%s.\n--\n",
+ multi_source ? "(s)" : "");
+
+ if (multi_source)
{
- if (multi_source && !set_gtid_done)
+ char gtid_pos[MAX_GTID_LENGTH];
+ if (have_mariadb_gtid && get_gtid_pos(gtid_pos, 0))
{
- char gtid_pos[MAX_GTID_LENGTH];
- if (have_mariadb_gtid && get_gtid_pos(gtid_pos, 0))
- {
- mysql_free_result(slave);
- return 1;
- }
- if (opt_comments)
- fprintf(md_result_file, "\n--\n-- Gtid position to start replication "
- "from\n--\n\n");
- fprintf(md_result_file, "%sSET GLOBAL gtid_slave_pos='%s';\n",
- gtid_comment_prefix, gtid_pos);
- set_gtid_done= 1;
+ mysql_free_result(slave);
+ return 1;
}
+ print_comment(md_result_file, 0,
+ "-- GTID position to start replication:\n");
+ fprintf(md_result_file, "%sSET GLOBAL gtid_slave_pos='%s';\n",
+ gtid_comment_prefix, gtid_pos);
+ }
+ if (use_gtid)
+ print_comment(md_result_file, 0,
+ "\n-- Use only the MASTER_USE_GTID=slave_pos or "
+ "MASTER_LOG_FILE/MASTER_LOG_POS in the statements below."
+ "\n\n");
+
+ while ((row= mysql_fetch_row(slave)))
+ {
if (row[9 + multi_source] && row[21 + multi_source])
{
if (use_gtid)
@@ -6370,11 +6367,6 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
}
/* SHOW MASTER STATUS reports file and position */
- if (opt_comments)
- fprintf(md_result_file,
- "\n--\n-- Position to start replication or point-in-time "
- "recovery from (the master of this slave)\n--\n\n");
-
if (multi_source)
fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO ",
nogtid_comment_prefix, row[0]);
@@ -6395,6 +6387,7 @@ static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
check_io(md_result_file);
}
}
+ fprintf(md_result_file, "\n");
mysql_free_result(slave);
return 0;
}
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index a7c60e2b..f23ba1e4 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2011, 2022, MariaDB
+ Copyright (c) 2011, 2024, 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
@@ -70,10 +70,10 @@ static char **argv_to_free;
static struct my_option my_long_options[] =
{
- {"character-sets-dir", OPT_CHARSETS_DIR,
+ {"character-sets-dir", 0,
"Directory for character set files.", (char**) &charsets_dir,
(char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
+ {"default-character-set", 0,
"Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"columns", 'c',
@@ -85,31 +85,31 @@ static struct my_option my_long_options[] =
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},
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
+ {"debug-info", 0, "Print some debug info at exit.",
&debug_info_flag, &debug_info_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
+ {"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delete", 'd', "First delete all rows from table.", &opt_delete,
&opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"fields-terminated-by", OPT_FTB,
+ {"fields-terminated-by", 0,
"Fields in the input file are terminated by the given string.",
&fields_terminated, &fields_terminated, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"fields-enclosed-by", OPT_ENC,
+ {"fields-enclosed-by", 0,
"Fields in the import file are enclosed by the given character.",
&enclosed, &enclosed, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"fields-optionally-enclosed-by", OPT_O_ENC,
+ {"fields-optionally-enclosed-by", 0,
"Fields in the input file are optionally enclosed by the given character.",
&opt_enclosed, &opt_enclosed, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"fields-escaped-by", OPT_ESC,
+ {"fields-escaped-by", 0,
"Fields in the input file are escaped by the given character.",
&escaped, &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0,
0, 0},
@@ -126,10 +126,10 @@ static struct my_option my_long_options[] =
"Disable foreign key checks while importing the data.",
&ignore_foreign_keys, &ignore_foreign_keys, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
- {"ignore-lines", OPT_IGN_LINES, "Ignore first n lines of data infile.",
+ {"ignore-lines", 0, "Ignore first n lines of data infile.",
&opt_ignore_lines, &opt_ignore_lines, 0, GET_LL,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"lines-terminated-by", OPT_LTB,
+ {"lines-terminated-by", 0,
"Lines in the input file are terminated by the given string.",
&lines_terminated, &lines_terminated, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -138,7 +138,7 @@ static struct my_option my_long_options[] =
{"lock-tables", 'l', "Lock all tables for write (this disables threads).",
&lock_tables, &lock_tables, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0},
- {"low-priority", OPT_LOW_PRIORITY,
+ {"low-priority", 0,
"Use LOW_PRIORITY when updating the table.", &opt_low_priority,
&opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p',
@@ -148,7 +148,7 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 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 "
@@ -170,7 +170,7 @@ static struct my_option my_long_options[] =
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#include <sslopt-longopts.h>
- {"use-threads", OPT_USE_THREADS,
+ {"use-threads", 0,
"Load files in parallel. The argument is the number "
"of threads to use for loading data.",
&opt_use_threads, &opt_use_threads, 0,
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index aa606d61..4ad31b65 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, 2019, MariaDB
+ Copyright (c) 2010, 2024, 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
@@ -191,10 +191,10 @@ static struct my_option my_long_options[] =
{"character-sets-dir", 'c', "Directory for character set files.",
(char**) &charsets_dir, (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0,
0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
+ {"default-character-set", 0,
"Set the default character set.", &default_charset,
&default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"count", OPT_COUNT,
+ {"count", 0,
"Show number of rows per table (may be slow for non-MyISAM tables).",
&opt_count, &opt_count, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
@@ -203,13 +203,13 @@ static struct my_option my_long_options[] =
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},
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
+ {"debug-info", 0, "Print some debug info at exit.",
&debug_info_flag, &debug_info_flag,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
+ {"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -226,7 +226,7 @@ static struct my_option my_long_options[] =
"Password to use when connecting to server. If password is not given, it's "
"solicited on the tty.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 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 "
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 885a5f43..035a7f0d 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2022, MariaDB
+ Copyright (c) 2010, 2024, 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
@@ -535,50 +535,45 @@ static struct my_option my_long_options[] =
"Generate SQL where not supplied by file or command line.",
&auto_generate_sql, &auto_generate_sql,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
+ {"auto-generate-sql-add-autoincrement", 0,
"Add an AUTO_INCREMENT column to auto-generated tables.",
- &auto_generate_sql_autoincrement,
- &auto_generate_sql_autoincrement,
+ &auto_generate_sql_autoincrement, &auto_generate_sql_autoincrement,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
+ {"auto-generate-sql-execute-number", 0,
"Set this number to generate a set number of queries to run.",
&auto_actual_queries, &auto_actual_queries,
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
+ {"auto-generate-sql-guid-primary", 0,
"Add GUID based primary keys to auto-generated tables.",
- &auto_generate_sql_guid_primary,
- &auto_generate_sql_guid_primary,
+ &auto_generate_sql_guid_primary, &auto_generate_sql_guid_primary,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE,
+ {"auto-generate-sql-load-type", 0,
"Specify test load type: mixed, update, write, key, or read; default is mixed.",
(char**) &auto_generate_sql_type, (char**) &auto_generate_sql_type,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-generate-sql-secondary-indexes",
- OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
+ {"auto-generate-sql-secondary-indexes", 0,
"Number of secondary indexes to add to auto-generated tables.",
&auto_generate_sql_secondary_indexes,
&auto_generate_sql_secondary_indexes, 0,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"auto-generate-sql-unique-query-number",
- OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
+ {"auto-generate-sql-unique-query-number", 0,
"Number of unique queries to generate for automatic tests.",
&auto_generate_sql_unique_query_number,
&auto_generate_sql_unique_query_number,
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
- {"auto-generate-sql-unique-write-number",
- OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
+ {"auto-generate-sql-unique-write-number", 0,
"Number of unique queries to generate for auto-generate-sql-write-number.",
&auto_generate_sql_unique_write_number,
&auto_generate_sql_unique_write_number,
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
- {"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
+ {"auto-generate-sql-write-number", 0,
"Number of row inserts to perform for each thread (default is 100).",
&auto_generate_sql_number, &auto_generate_sql_number,
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory for character set files.", (char **)&charsets_dir,
(char **)&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
+ {"commit", 0, "Commit records every X number of statements.",
&commit_rate, &commit_rate, 0, GET_UINT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.",
@@ -587,10 +582,10 @@ static struct my_option my_long_options[] =
{"concurrency", 'c', "Number of clients to simulate for query to run.",
(char**) &concurrency_str, (char**) &concurrency_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"create", OPT_SLAP_CREATE_STRING, "File or string to use create tables.",
+ {"create", 0, "File or string to use create tables.",
&create_string, &create_string, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
- {"create-schema", OPT_CREATE_SLAP_SCHEMA, "Schema to run tests in.",
+ {"create-schema", 0, "Schema to run tests in.",
(char**) &create_schema_string, (char**) &create_schema_string, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"csv", OPT_SLAP_CSV,
@@ -604,12 +599,12 @@ static struct my_option my_long_options[] =
(char**) &default_dbug_option, (char**) &default_dbug_option, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
+ {"debug-check", 0, "Check memory and open file usage at exit.",
&debug_check_flag, &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"default_auth", OPT_DEFAULT_AUTH,
+ {"default_auth", 0,
"Default authentication client-side plugin to use.",
&opt_default_auth, &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -617,7 +612,7 @@ static struct my_option my_long_options[] =
"Delimiter to use in SQL statements supplied in file or command line.",
(char**) &delimiter, (char**) &delimiter, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
- {"detach", OPT_SLAP_DETACH,
+ {"detach", 0,
"Detach (close and reopen) connections after X number of requests.",
&detach_rate, &detach_rate, 0, GET_UINT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
@@ -629,14 +624,14 @@ static struct my_option my_long_options[] =
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", &host, &host, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"init-command", OPT_INIT_COMMAND,
+ {"init-command", 0,
"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},
{"iterations", 'i', "Number of times to run the tests.", &iterations,
&iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
- {"no-drop", OPT_SLAP_NO_DROP, "Do not drop the schema after the test.",
+ {"no-drop", 0, "Do not drop the schema after the test.",
&opt_no_drop, &opt_no_drop, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"number-char-cols", 'x',
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql.",
@@ -646,11 +641,11 @@ static struct my_option my_long_options[] =
"Number of INT columns to create in table if specifying --auto-generate-sql.",
(char**) &num_int_cols_opt, (char**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
- {"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
+ {"number-of-queries", 0,
"Limit each client to this number of queries (this is not exact).",
&num_of_query, &num_of_query, 0,
GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"only-print", OPT_MYSQL_ONLY_PRINT,
+ {"only-print", 0,
"Do not connect to the databases, but instead print out what would have "
"been done.",
&opt_only_print, &opt_only_print, 0, GET_BOOL, NO_ARG,
@@ -662,25 +657,25 @@ static struct my_option my_long_options[] =
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
+ {"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection.", &opt_mysql_port,
&opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0},
- {"post-query", OPT_SLAP_POST_QUERY,
+ {"post-query", 0,
"Query to run or file containing query to execute after tests have completed.",
&user_supplied_post_statements, &user_supplied_post_statements,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"post-system", OPT_SLAP_POST_SYSTEM,
+ {"post-system", 0,
"system() string to execute after tests have completed.",
&post_system, &post_system,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"pre-query", OPT_SLAP_PRE_QUERY,
+ {"pre-query", 0,
"Query to run or file containing query to execute before running tests.",
&user_supplied_pre_statements, &user_supplied_pre_statements,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"pre-system", OPT_SLAP_PRE_SYSTEM,
+ {"pre-system", 0,
"system() string to execute before running tests.",
&pre_system, &pre_system,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1649,6 +1644,9 @@ drop_primary_key_list(void)
return 0;
}
+
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static int
create_schema(MYSQL *mysql, const char *db, statement *stmt,
option_string *engine_stmt)
@@ -1744,6 +1742,7 @@ limit_not_met:
DBUG_RETURN(0);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
static int
drop_schema(MYSQL *mysql, const char *db)
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index a49895c9..46565095 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -78,7 +78,7 @@ static my_bool non_blocking_api_enabled= 0;
#define MAX_DELIMITER_LENGTH 16
#define DEFAULT_MAX_CONN 64
-#define DIE_BUFF_SIZE 256*1024
+#define DIE_BUFF_SIZE 15*1024
#define RESULT_STRING_INIT_MEM 2048
#define RESULT_STRING_INCREMENT_MEM 2048
@@ -397,7 +397,7 @@ enum enum_commands {
Q_IF,
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
- Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP,
+ Q_WRITE_FILE, Q_WRITE_LINE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP,
Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES,
Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,
Q_LIST_FILES, Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
@@ -500,6 +500,7 @@ const char *command_names[]=
"remove_file",
"file_exists",
"write_file",
+ "write_line",
"copy_file",
"perl",
"die",
@@ -615,7 +616,7 @@ void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
const char *from);
ATTRIBUTE_NORETURN
-static void cleanup_and_exit(int exit_code);
+static void cleanup_and_exit(int exit_code, bool called_from_die);
ATTRIBUTE_NORETURN
static void really_die(const char *msg);
@@ -932,6 +933,7 @@ pthread_attr_t cn_thd_attrib;
pthread_handler_t connection_thread(void *arg)
{
struct st_connection *cn= (struct st_connection*)arg;
+ DBUG_ENTER("connection_thread");
mysql_thread_init();
while (cn->command != EMB_END_CONNECTION)
@@ -943,6 +945,7 @@ pthread_handler_t connection_thread(void *arg)
pthread_cond_wait(&cn->query_cond, &cn->query_mutex);
pthread_mutex_unlock(&cn->query_mutex);
}
+ DBUG_PRINT("info", ("executing command: %d", cn->command));
switch (cn->command)
{
case EMB_END_CONNECTION:
@@ -963,24 +966,26 @@ pthread_handler_t connection_thread(void *arg)
break;
case EMB_CLOSE_STMT:
cn->result= mysql_stmt_close(cn->stmt);
+ cn->stmt= 0;
break;
default:
DBUG_ASSERT(0);
}
- cn->command= 0;
pthread_mutex_lock(&cn->result_mutex);
cn->query_done= 1;
+ cn->command= 0;
pthread_cond_signal(&cn->result_cond);
pthread_mutex_unlock(&cn->result_mutex);
}
end_thread:
- cn->query_done= 1;
+ DBUG_ASSERT(cn->stmt == 0);
mysql_close(cn->mysql);
cn->mysql= 0;
+ cn->query_done= 1;
mysql_thread_end();
pthread_exit(0);
- return 0;
+ DBUG_RETURN(0);
}
static void wait_query_thread_done(struct st_connection *con)
@@ -998,12 +1003,16 @@ static void wait_query_thread_done(struct st_connection *con)
static void signal_connection_thd(struct st_connection *cn, int command)
{
+ DBUG_ENTER("signal_connection_thd");
+ DBUG_PRINT("enter", ("command: %d", command));
+
DBUG_ASSERT(cn->has_thread);
cn->query_done= 0;
- cn->command= command;
pthread_mutex_lock(&cn->query_mutex);
+ cn->command= command;
pthread_cond_signal(&cn->query_cond);
pthread_mutex_unlock(&cn->query_mutex);
+ DBUG_VOID_RETURN;
}
@@ -1068,27 +1077,37 @@ static int do_stmt_execute(struct st_connection *cn)
static int do_stmt_close(struct st_connection *cn)
{
DBUG_ENTER("do_stmt_close");
- /* The cn->stmt is already set. */
if (!cn->has_thread)
- DBUG_RETURN(mysql_stmt_close(cn->stmt));
+ {
+ /* The cn->stmt is already set. */
+ int res= mysql_stmt_close(cn->stmt);
+ cn->stmt= 0;
+ DBUG_RETURN(res);
+ }
+ wait_query_thread_done(cn);
signal_connection_thd(cn, EMB_CLOSE_STMT);
wait_query_thread_done(cn);
+ DBUG_ASSERT(cn->stmt == 0);
DBUG_RETURN(cn->result);
}
static void emb_close_connection(struct st_connection *cn)
{
+ DBUG_ENTER("emb_close_connection");
if (!cn->has_thread)
- return;
+ DBUG_VOID_RETURN;
wait_query_thread_done(cn);
signal_connection_thd(cn, EMB_END_CONNECTION);
pthread_join(cn->tid, NULL);
cn->has_thread= FALSE;
+ DBUG_ASSERT(cn->mysql == 0);
+ DBUG_ASSERT(cn->stmt == 0);
pthread_mutex_destroy(&cn->query_mutex);
pthread_cond_destroy(&cn->query_cond);
pthread_mutex_destroy(&cn->result_mutex);
pthread_cond_destroy(&cn->result_cond);
+ DBUG_VOID_RETURN;
}
@@ -1112,7 +1131,13 @@ static void init_connection_thd(struct st_connection *cn)
#define do_read_query_result(cn) mysql_read_query_result(cn->mysql)
#define do_stmt_prepare(cn, q, q_len) mysql_stmt_prepare(cn->stmt, q, (ulong)q_len)
#define do_stmt_execute(cn) mysql_stmt_execute(cn->stmt)
-#define do_stmt_close(cn) mysql_stmt_close(cn->stmt)
+
+static int do_stmt_close(struct st_connection *cn)
+{
+ int res= mysql_stmt_close(cn->stmt);
+ cn->stmt= 0;
+ return res;
+}
#endif /*EMBEDDED_LIBRARY*/
@@ -1440,7 +1465,6 @@ void close_statements()
{
if (con->stmt)
do_stmt_close(con);
- con->stmt= 0;
}
DBUG_VOID_RETURN;
}
@@ -1511,8 +1535,8 @@ void free_used_memory()
void ha_pre_shutdown();
#endif
-
-ATTRIBUTE_NORETURN static void cleanup_and_exit(int exit_code)
+ATTRIBUTE_NORETURN static void cleanup_and_exit(int exit_code,
+ bool called_from_die)
{
#ifdef EMBEDDED_LIBRARY
if (server_initialized)
@@ -1525,16 +1549,6 @@ ATTRIBUTE_NORETURN static void cleanup_and_exit(int exit_code)
if (server_initialized)
mysql_server_end();
- /*
- mysqltest is fundamentally written in a way that makes impossible
- to free all memory before exit (consider memory allocated
- for frame local DYNAMIC_STRING's and die() invoked down the stack.
-
- We close stderr here to stop unavoidable safemalloc reports
- from polluting the output.
- */
- fclose(stderr);
-
my_end(my_end_arg);
if (!silent) {
@@ -1554,6 +1568,11 @@ ATTRIBUTE_NORETURN static void cleanup_and_exit(int exit_code)
}
}
+ /*
+ Report memory leaks, if not called from 'die()', as die() will not release
+ all memory.
+ */
+ sf_leaking_memory= called_from_die;
exit(exit_code);
}
@@ -1620,7 +1639,7 @@ static void really_die(const char *msg)
second time, just exit
*/
if (dying)
- cleanup_and_exit(1);
+ cleanup_and_exit(1, 1);
dying= 1;
log_file.show_tail(opt_tail_lines);
@@ -1632,7 +1651,7 @@ static void really_die(const char *msg)
if (cur_con && !cur_con->pending)
show_warnings_before_error(cur_con->mysql);
- cleanup_and_exit(1);
+ cleanup_and_exit(1, 1);
}
void report_or_die(const char *fmt, ...)
@@ -1686,7 +1705,7 @@ void abort_not_supported_test(const char *fmt, ...)
}
va_end(args);
- cleanup_and_exit(62);
+ cleanup_and_exit(62, 0);
}
@@ -2233,14 +2252,14 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
check_result
RETURN VALUES
- error - the function will not return
-
+ 0 ok
+ 1 error
*/
-void check_result()
+int check_result()
{
const char *mess= 0;
-
+ int error= 1;
DBUG_ENTER("check_result");
DBUG_ASSERT(result_file_name);
DBUG_PRINT("enter", ("result_file_name: %s", result_file_name));
@@ -2248,7 +2267,10 @@ void check_result()
switch (compare_files(log_file.file_name(), result_file_name)) {
case RESULT_OK:
if (!error_count)
+ {
+ error= 0;
break; /* ok */
+ }
mess= "Got errors while running test";
/* Fallthrough */
case RESULT_LENGTH_MISMATCH:
@@ -2287,14 +2309,13 @@ void check_result()
log_file.file_name(), reject_file, errno);
show_diff(NULL, result_file_name, reject_file);
- die("%s", mess);
+ fprintf(stderr, "%s", mess);
break;
}
default: /* impossible */
die("Unknown error code from dyn_string_cmp()");
}
-
- DBUG_VOID_RETURN;
+ DBUG_RETURN(error);
}
@@ -4348,6 +4369,49 @@ void do_write_file(struct st_command *command)
do_write_file_command(command, FALSE);
}
+/**
+ Write a line to the start of the file.
+ Truncates existing file, creates new one if it doesn't exist.
+
+ Usage
+ write_line <line> <filename>;
+
+ Example
+ --write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+ @note Both the file and the line parameters are evaluated
+ (can be variables).
+
+ @note This is a better alternative to
+ exec echo > file, as it doesn't depend on shell,
+ and can better handle sporadic file access errors caused
+ by antivirus or backup software on Windows.
+*/
+void do_write_line(struct st_command *command)
+{
+ DYNAMIC_STRING ds_line;
+ DYNAMIC_STRING ds_filename;
+
+ struct command_arg write_line_args[] = {
+ { "line", ARG_STRING, FALSE, &ds_line, "line to add" },
+ { "filename", ARG_STRING, TRUE, &ds_filename, "File to write to" },
+ };
+ DBUG_ENTER("do_write_line");
+
+ check_command_args(command,
+ command->first_argument,
+ write_line_args,
+ sizeof(write_line_args)/sizeof(struct command_arg),
+ ' ');
+
+ if (bad_path(ds_filename.str))
+ DBUG_VOID_RETURN;
+ dynstr_append_mem(&ds_line, "\n", 1);
+ str_to_file2(ds_filename.str, ds_line.str, ds_line.length, FALSE);
+ dynstr_free(&ds_filename);
+ dynstr_free(&ds_line);
+ DBUG_VOID_RETURN;
+}
/*
SYNOPSIS
@@ -5265,7 +5329,11 @@ void do_shutdown_server(struct st_command *command)
*/
if (timeout && mysql_shutdown(mysql, SHUTDOWN_DEFAULT))
- die("mysql_shutdown failed");
+ {
+ handle_error(command, mysql_errno(mysql), mysql_error(mysql),
+ mysql_sqlstate(mysql), &ds_res);
+ DBUG_VOID_RETURN;
+ }
if (!timeout || wait_until_dead(pid, timeout))
{
@@ -5693,7 +5761,6 @@ void do_close_connection(struct st_command *command)
#endif /*!EMBEDDED_LIBRARY*/
if (con->stmt)
do_stmt_close(con);
- con->stmt= 0;
#ifdef EMBEDDED_LIBRARY
/*
As query could be still executed in a separate thread
@@ -7381,17 +7448,17 @@ get_one_option(const struct my_option *opt, const char *argument, const char *)
break;
case 'V':
print_version();
- exit(0);
+ cleanup_and_exit(0,0);
case OPT_MYSQL_PROTOCOL:
#ifndef EMBEDDED_LIBRARY
if ((opt_protocol= find_type_with_warning(argument, &sql_protocol_typelib,
opt->name)) <= 0)
- exit(1);
+ cleanup_and_exit(1,0);
#endif
break;
case '?':
usage();
- exit(0);
+ cleanup_and_exit(0,0);
}
return 0;
}
@@ -7403,12 +7470,12 @@ int parse_args(int argc, char **argv)
default_argv= argv;
if ((handle_options(&argc, &argv, my_long_options, get_one_option)))
- exit(1);
+ cleanup_and_exit(1, 0);
if (argc > 1)
{
usage();
- exit(1);
+ cleanup_and_exit(1, 0);
}
if (argc == 1)
opt_db= *argv;
@@ -7475,7 +7542,7 @@ void str_to_file2(const char *fname, char *str, size_t size, my_bool append)
die("Could not open '%s' for writing, errno: %d", buff, errno);
if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR)
die("Could not find end of file '%s', errno: %d", buff, errno);
- if (my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP)))
+ if (size > 0 && my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP)))
die("write failed, errno: %d", errno);
my_close(fd, MYF(0));
}
@@ -8270,7 +8337,7 @@ static int match_expected_error(struct st_command *command,
SYNOPSIS
handle_error()
- q - query context
+ command - command
err_errno - error number
err_error - error message
err_sqlstate - sql state
@@ -8529,7 +8596,7 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
my_bool ds_res_1st_execution_init = FALSE;
my_bool compare_2nd_execution = TRUE;
int query_match_ps2_re;
-
+ MYSQL_RES *res;
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
DBUG_PRINT("info",
@@ -8735,10 +8802,13 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
The --enable_prepare_warnings command can be used to change this so
that warnings from both the prepare and execute phase are shown.
*/
- if ((mysql_stmt_result_metadata(stmt) != NULL) &&
- !disable_warnings &&
- !prepare_warnings_enabled)
- dynstr_set(&ds_prepare_warnings, NULL);
+ if ((res= mysql_stmt_result_metadata(stmt)))
+ {
+ if (!disable_warnings &&
+ !prepare_warnings_enabled)
+ dynstr_set(&ds_prepare_warnings, NULL);
+ mysql_free_result(res);
+ }
/*
Fetch info before fetching warnings, since it will be reset
@@ -9865,6 +9935,7 @@ static sig_handler signal_handler(int sig)
fflush(stderr);
my_write_core(sig);
#ifndef _WIN32
+ sf_leaking_memory= 1;
exit(1); // Shouldn't get here but just in case
#endif
}
@@ -9938,12 +10009,10 @@ int main(int argc, char **argv)
uint command_executed= 0, last_command_executed= 0;
char save_file[FN_REFLEN];
bool empty_result= FALSE;
+ int error= 0;
MY_INIT(argv[0]);
DBUG_ENTER("main");
- /* mysqltest has no way to free all its memory correctly */
- sf_leaking_memory= 1;
-
save_file[0]= 0;
TMPDIR[0]= 0;
@@ -10269,6 +10338,7 @@ int main(int argc, char **argv)
break;
case Q_FILE_EXIST: do_file_exist(command); break;
case Q_WRITE_FILE: do_write_file(command); break;
+ case Q_WRITE_LINE: do_write_line(command); break;
case Q_APPEND_FILE: do_append_file(command); break;
case Q_DIFF_FILES: do_diff_files(command); break;
case Q_SEND_QUIT: do_send_quit(command); break;
@@ -10636,7 +10706,7 @@ int main(int argc, char **argv)
die("Test ended with parsing disabled");
/*
- The whole test has been executed _successfully_.
+ The whole test has been executed successfully.
Time to compare result or save it to record file.
The entire output from test is in the log file
*/
@@ -10659,7 +10729,7 @@ int main(int argc, char **argv)
else
{
/* Check that the output from test is equal to result file */
- check_result();
+ error= check_result();
}
}
}
@@ -10669,7 +10739,8 @@ int main(int argc, char **argv)
if (! result_file_name || record ||
compare_files (log_file.file_name(), result_file_name))
{
- die("The test didn't produce any output");
+ fprintf(stderr, "mysqltest: The test didn't produce any output\n");
+ error= 1;
}
else
{
@@ -10678,12 +10749,15 @@ int main(int argc, char **argv)
}
if (!command_executed && result_file_name && !empty_result)
- die("No queries executed but non-empty result file found!");
+ {
+ fprintf(stderr, "mysqltest: No queries executed but non-empty result file found!\n");
+ error= 1;
+ }
- verbose_msg("Test has succeeded!");
+ if (!error)
+ verbose_msg("Test has succeeded!");
timer_output();
- /* Yes, if we got this far the test has succeeded! Sakila smiles */
- cleanup_and_exit(0);
+ cleanup_and_exit(error, 0);
return 0; /* Keep compiler happy too */
}
diff --git a/cmake/FindPMEM.cmake b/cmake/FindPMEM.cmake
deleted file mode 100644
index 02443644..00000000
--- a/cmake/FindPMEM.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-if(PMEM_LIBRARIES)
- set(PMEM_FOUND TRUE)
- return()
-endif()
-if(DEFINED PMEM_LIBRARIES)
- set(PMEM_FOUND FALSE)
- return()
-endif()
-
-find_path(PMEM_INCLUDE_DIRS NAMES libpmem.h)
-find_library(PMEM_LIBRARIES NAMES pmem)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(
- PMEM DEFAULT_MSG
- PMEM_LIBRARIES PMEM_INCLUDE_DIRS)
-
-mark_as_advanced(PMEM_INCLUDE_DIRS PMEM_LIBRARIES)
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 74853c36..3263c08e 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -379,5 +379,11 @@ FUNCTION (MAYBE_DISABLE_IPO target)
INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO OFF
INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL OFF)
+ IF(CMAKE_CONFIGURATION_TYPES)
+ FOREACH(cfg ${CMAKE_CONFIGURATION_TYPES})
+ STRING(TOUPPER "${cfg}" cfg_upper)
+ SET_TARGET_PROPERTIES(${target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_${cfg_upper} OFF)
+ ENDFOREACH()
+ ENDIF()
ENDIF()
ENDFUNCTION()
diff --git a/cmake/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake
index a9b10334..b4f56597 100644
--- a/cmake/mariadb_connector_c.cmake
+++ b/cmake/mariadb_connector_c.cmake
@@ -40,6 +40,13 @@ SET(CLIENT_PLUGIN_PVIO_SOCKET STATIC)
MESSAGE("== Configuring MariaDB Connector/C")
ADD_SUBDIRECTORY(libmariadb)
+IF(MSVC AND TARGET mariadb_obj AND TARGET mariadbclient)
+ # With MSVC, do not produce LTCG-compiled static client libraries.
+ # They are not usable by end-users, being tied to exact compiler version
+ MAYBE_DISABLE_IPO(mariadb_obj)
+ MAYBE_DISABLE_IPO(mariadbclient)
+ENDIF()
+
IF(UNIX)
INSTALL(CODE "EXECUTE_PROCESS(
COMMAND ${CMAKE_COMMAND} -E make_directory \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR})
diff --git a/cmake/os/AIX.cmake b/cmake/os/AIX.cmake
index 7513c4f4..299b7919 100644
--- a/cmake/os/AIX.cmake
+++ b/cmake/os/AIX.cmake
@@ -34,8 +34,5 @@ ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -maix64 -pthread -mcmodel=large")
ENDIF()
-# fcntl(fd, F_SETFL, O_DIRECT) is not supported; O_DIRECT is an open(2) flag
-SET(HAVE_FCNTL_DIRECT 0 CACHE INTERNAL "")
-
# make it WARN by default, not AUTO (that implies -Werror)
SET(MYSQL_MAINTAINER_MODE "WARN" CACHE STRING "Enable MariaDB maintainer-specific warnings. One of: NO (warnings are disabled) WARN (warnings are enabled) ERR (warnings are errors) AUTO (warnings are errors in Debug only)")
diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake
index 3d99d347..3a9d2dcc 100644
--- a/cmake/os/SunOS.cmake
+++ b/cmake/os/SunOS.cmake
@@ -17,10 +17,6 @@ INCLUDE(CheckSymbolExists)
INCLUDE(CheckCSourceRuns)
INCLUDE(CheckCSourceCompiles)
-# fcntl(fd, F_SETFL, O_DIRECT) is not supported,
-# and directio(3C) would only work on UFS or NFS, not ZFS.
-SET(HAVE_FCNTL_DIRECT 0 CACHE INTERNAL "")
-
# Enable 64 bit file offsets
SET(_FILE_OFFSET_BITS 64)
diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake
index ceb42627..c1048661 100644
--- a/cmake/os/WindowsCache.cmake
+++ b/cmake/os/WindowsCache.cmake
@@ -44,7 +44,6 @@ SET(HAVE_EXECINFO_H CACHE INTERNAL "")
SET(HAVE_FCHMOD CACHE INTERNAL "")
SET(HAVE_FCNTL CACHE INTERNAL "")
SET(HAVE_FCNTL_H 1 CACHE INTERNAL "")
-SET(HAVE_FCNTL_DIRECT 0 CACHE INTERNAL "")
SET(HAVE_FCNTL_NONBLOCK CACHE INTERNAL "")
SET(HAVE_FDATASYNC CACHE INTERNAL "")
SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake
index 3c427b88..f42db939 100644
--- a/cmake/pcre.cmake
+++ b/cmake/pcre.cmake
@@ -4,6 +4,9 @@ SET(WITH_PCRE "auto" CACHE STRING
"Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
MACRO(BUNDLE_PCRE2)
+ SET(WITH_PCRE "bundled" CACHE STRING
+ "Which pcre to use (possible values are 'bundled', 'system', or 'auto')")
+
SET(dir "${CMAKE_BINARY_DIR}/extra/pcre2")
SET(PCRE_INCLUDE_DIRS ${dir}/src/pcre2-build ${dir}/src/pcre2/src)
MESSAGE(STATUS "Will download and bundle pcre2")
@@ -41,21 +44,21 @@ MACRO(BUNDLE_PCRE2)
SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${file} ${file_d})
SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION ${file})
ENDFOREACH()
+
FOREACH(v "" "_DEBUG" "_RELWITHDEBINFO" "_RELEASE" "_MINSIZEREL")
- STRING(REPLACE "/WX" "" pcre2_flags${v} "${CMAKE_C_FLAGS${v}}")
- SET(pcre2_flags${v} "${pcre2_flags${v}} -std=c99 ")
+ SET(pcre2_flags${v} "${CMAKE_C_FLAGS${v}}")
IF(MSVC)
+ STRING(REPLACE "/WX" "" pcre2_flags${v} "${pcre2_flags${v}}")
# Suppress a warning
- STRING(APPEND pcre2_flags${v} " /wd4244 " )
- # Disable asan support
- STRING(REPLACE "-fsanitize=address" "" pcre2_flags${v} "${CMAKE_C_FLAGS${v}}")
+ STRING(APPEND pcre2_flags${v} " /wd4244 /wd4267 " )
ENDIF()
ENDFOREACH()
+
ExternalProject_Add(
pcre2
PREFIX "${dir}"
- URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.zip"
- URL_MD5 fe90992fbfb03f854bd9f344074f49eb
+ URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.zip"
+ URL_MD5 b58f050f2fdd6f2ca5774a2975377a85
INSTALL_COMMAND ""
CMAKE_ARGS
"-DCMAKE_WARN_DEPRECATED=FALSE"
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 6efd40fd..378fc5f5 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -46,7 +46,7 @@ MACRO(MYSQL_ADD_PLUGIN)
${CMAKE_SOURCE_DIR}/sql
${PCRE_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
- ${ZLIB_INCLUDE_DIR})
+ ${ZLIB_INCLUDE_DIRS})
LIST(GET ARG_UNPARSED_ARGUMENTS 0 plugin)
SET(SOURCES ${ARG_UNPARSED_ARGUMENTS})
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index 646aa37a..8be48e2a 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -53,13 +53,14 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl/wolfssl
)
- SET(SSL_LIBRARIES wolfssl wolfcrypt)
+ SET(SSL_LIBRARIES wolfssl)
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
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")
+ SET(HAVE_des ON CACHE INTERNAL "wolfssl does support DES API")
CHANGE_SSL_SETTINGS("bundled")
ADD_SUBDIRECTORY(extra/wolfssl)
MESSAGE_ONCE(SSL_LIBRARIES "SSL_LIBRARIES = ${SSL_LIBRARIES}")
@@ -158,6 +159,8 @@ MACRO (MYSQL_CHECK_SSL)
HAVE_EncryptAes128Gcm)
CHECK_SYMBOL_EXISTS(X509_check_host "openssl/x509v3.h"
HAVE_X509_check_host)
+ CHECK_SYMBOL_EXISTS(DES_set_key_unchecked "openssl/des.h"
+ HAVE_des)
SET(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_REQUIRED_LIBRARIES)
SET(CMAKE_REQUIRED_DEFINITIONS)
diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
index 9e085189..a933194c 100644
--- a/cmake/zlib.cmake
+++ b/cmake/zlib.cmake
@@ -14,9 +14,12 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
MACRO (MYSQL_USE_BUNDLED_ZLIB)
- SET(ZLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
+ SET(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
SET(BUILD_BUNDLED_ZLIB 1)
- SET(ZLIB_LIBRARY zlib CACHE INTERNAL "Bundled zlib library")
+ SET(ZLIB_LIBRARIES zlib CACHE INTERNAL "Bundled zlib library")
+ # temporarily define ZLIB_LIBRARY and ZLIB_INCLUDE_DIR for libmariadb
+ SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
+ SET(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
SET(ZLIB_FOUND TRUE)
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
ADD_SUBDIRECTORY(zlib)
@@ -29,7 +32,7 @@ ENDMACRO()
# If this is set,we use bundled zlib
# If this is not set,search for system zlib.
# if system zlib is not found, use bundled copy
-# ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR and ZLIB_SOURCES
+# ZLIB_LIBRARIES, ZLIB_INCLUDE_DIRS
# are set after this macro has run
MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
@@ -37,10 +40,14 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
IF(WITH_ZLIB STREQUAL "bundled")
MYSQL_USE_BUNDLED_ZLIB()
ELSE()
- INCLUDE(FindZLIB)
+ FIND_PACKAGE(PkgConfig QUIET)
+ IF(PKG_CONFIG_FOUND AND (COMMAND PKG_GET_VARIABLE) AND (NOT WIN32))
+ PKG_GET_VARIABLE(ZLIB_ROOT zlib prefix)
+ ENDIF()
+ FIND_PACKAGE(ZLIB)
IF(ZLIB_FOUND)
INCLUDE(CheckFunctionExists)
- SET(CMAKE_REQUIRED_LIBRARIES z)
+ SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
@@ -48,7 +55,6 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
SET(WITH_ZLIB "system" CACHE STRING
"Which zlib to use (possible values are 'bundled' or 'system')")
- SET(ZLIB_SOURCES "")
ELSE()
SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
MESSAGE(STATUS "system zlib found but not usable")
diff --git a/config.h.cmake b/config.h.cmake
index 81ca8fe7..49783ce6 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -30,7 +30,6 @@
#cmakedefine HAVE_DLFCN_H 1
#cmakedefine HAVE_EXECINFO_H 1
#cmakedefine HAVE_FCNTL_H 1
-#cmakedefine HAVE_FCNTL_DIRECT 1
#cmakedefine HAVE_FENV_H 1
#cmakedefine HAVE_FLOAT_H 1
#cmakedefine HAVE_FNMATCH_H 1
@@ -500,6 +499,7 @@
#cmakedefine HAVE_COMPRESS 1
#cmakedefine HAVE_EncryptAes128Ctr 1
#cmakedefine HAVE_EncryptAes128Gcm 1
+#cmakedefine HAVE_des 1
/*
Stuff that always need to be defined (compile breaks without it)
diff --git a/configure.cmake b/configure.cmake
index 061837c1..5aefb673 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -60,15 +60,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND (NOT MSVC))
ENDIF()
ENDIF()
-# workaround for old gcc on x86, gcc atomic ops only work under -march=i686
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
- CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.0")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
- # query_response_time.cc causes "error: unable to find a register to spill"
- 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")
@@ -706,7 +697,6 @@ CHECK_SYMBOL_EXISTS(O_NONBLOCK "unistd.h;fcntl.h" HAVE_FCNTL_NONBLOCK)
IF(NOT HAVE_FCNTL_NONBLOCK)
SET(NO_FCNTL_NONBLOCK 1)
ENDIF()
-CHECK_SYMBOL_EXISTS(O_DIRECT "fcntl.h" HAVE_FCNTL_DIRECT)
#
# Test for how the C compiler does inline, if at all
@@ -985,3 +975,8 @@ IF(have_C__Werror)
)
SET(CMAKE_REQUIRED_FLAGS ${SAVE_CMAKE_REQUIRED_FLAGS})
ENDIF()
+
+IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-no-ansi-alias")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fp-model precise")
+ENDIF()
diff --git a/debian/README.Contributor b/debian/README.Contributor
index 45708b52..bf8505b7 100644
--- a/debian/README.Contributor
+++ b/debian/README.Contributor
@@ -142,7 +142,7 @@ https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/7972a38e
Ensure most packaging files are formatted correctly:
- wrap-and-sort -av
+ wrap-and-sort -vast
Check man pages for syntax errors:
diff --git a/debian/additions/debian-start.inc.sh b/debian/additions/debian-start.inc.sh
index 57050057..f6929f7c 100755
--- a/debian/additions/debian-start.inc.sh
+++ b/debian/additions/debian-start.inc.sh
@@ -36,8 +36,8 @@ function check_for_crashed_tables() {
SELECT CONCAT("select count(*) into @discard from '\''", TABLE_SCHEMA, "'\''.'\''", TABLE_NAME, "'\''")
FROM information_schema.TABLES WHERE TABLE_SCHEMA<>"INFORMATION_SCHEMA" AND TABLE_SCHEMA<>"PERFORMANCE_SCHEMA"
AND (ENGINE="MyISAM" OR ENGINE="Aria")
- ' | \
- $MARIADB --skip-column-names --batch | \
+ ' |
+ $MARIADB --skip-column-names --batch |
xargs -i $MARIADB --skip-column-names --silent --batch --force -e "{}" &> "${tempfile}"
set -e
diff --git a/debian/additions/innotop/innotop b/debian/additions/innotop/innotop
index 6d5595ec..e0de8cce 100755
--- a/debian/additions/innotop/innotop
+++ b/debian/additions/innotop/innotop
@@ -469,7 +469,7 @@ sub parse_status_text {
# too many locks to print, the output might be truncated)
my $time_text;
- if ( ($mysqlversion =~ /^5\.[67]\./) || ($mysqlversion =~ /^10\.[0-9]\./) ) {
+ if ( ($mysqlversion =~ /^5\.[67]\./) || ($mysqlversion =~ /^10|11\.[0-9]\./) ) {
( $time_text ) = $fulltext =~ m/^([0-9-]* [0-9:]*) [0-9a-fx]* INNODB MONITOR OUTPUT/m;
$innodb_data{'ts'} = [ parse_innodb_timestamp_56( $time_text ) ];
} else {
@@ -640,7 +640,7 @@ sub parse_fk_section {
return 0 unless $fulltext;
my ( $ts, $type );
- if ( ($mysqlversion =~ /^5.[67]\./) || ($mysqlversion =~ /^10.[0-9]\./) ) {
+ if ( ($mysqlversion =~ /^5.[67]\./) || ($mysqlversion =~ /^10|11.[0-9]\./) ) {
( $ts, $type ) = $fulltext =~ m/^([0-9-]* [0-9:]*)\s[0-9a-fx]*\s+(\w+)/m;
$section->{'ts'} = [ parse_innodb_timestamp_56( $ts ) ];
} else {
@@ -901,7 +901,7 @@ sub parse_dl_section {
my ( $ts ) = $fulltext =~ m/^$s$/m;
return 0 unless $ts;
- if ( ($mysqlversion =~ /^5\.[67]\./) || ($mysqlversion =~ /^10\.[0-9]\./) ) {
+ if ( ($mysqlversion =~ /^5\.[67]\./) || ($mysqlversion =~ /^10|11\.[0-9]\./) ) {
$dl->{'ts'} = [ parse_innodb_timestamp_56( $ts ) ];
}
else {
diff --git a/debian/changelog b/debian/changelog
index fd5004da..75d3cf1a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,60 @@
+mariadb (1:10.11.8-1~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building with debhelper from backports to fix FTBFS.
+ - Reverting t64 migration for backports.
+ * Merging upstream version 1:10.11.8.
+ * Merging debian version 1:10.11.8-1.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sat, 18 May 2024 15:28:01 +0200
+
+mariadb (1:10.11.8-1) unstable; urgency=medium
+
+ [ Otto Kekäläinen ]
+ * New upstream version 10.11.8. Includes fixes for several severe regressions
+ as noted at https://mariadb.com/kb/en/mariadb-10-11-8-release-notes/ as well
+ as security issues:
+ - CVE-2024-21096
+ * Add CMake flag to ignore libfmt exit code so cross-building works
+ * Extend skip test list for latest failures in reproducible builds on armhf
+ * Disable tests that fail on armhf when full test suite is run
+ * Remove temporary exceptions for bugs that should by now be fixed
+ * MDEV-31530 Localizations for Swahili language
+ * Update Innotop to be compatible with MariaDB 11.x series
+ * Replace use of trailing line `| \` with just `|` in Bash scripts
+ * Remove libmariadb file no longer present in MariaDB Connector C v3.3
+ * Replace autopkgtest smoke test dependency hack with arch list
+ * Update client program 'mariadb' trace to match new libmariadb v3.3
+ - New parameter 'sandbox' to fix a vulnerability and new mariadb-dump
+ output that always has the sandbox header and is backwards incompatible
+ * Update server trace to include new parameters innodb-log-spin-wait-delay
+ and innodb-snapshot-isolation
+ [ Michael Biebl ]
+ * Ensure debconf database is purged after it has been used in postrm
+
+ [ Svante Signell ]
+ * Make hurd-i386 build fully pass (Closes: #1069094)
+
+
+ -- Otto Kekäläinen <otto@debian.org> Thu, 16 May 2024 22:02:04 -0700
+
+mariadb (1:10.11.7-4~progress7.99u1) graograman-backports; urgency=medium
+
+ * Uploading to graograman-backports, remaining changes:
+ - Updating maintainer field.
+ - Updating uploaders field.
+ - Updating bugs field.
+ - Updating vcs fields.
+ - Building with debhelper from backports to fix FTBFS.
+ - Reverting t64 migration for backports.
+ * Merging debian version 1:10.11.7-4.
+
+ -- Daniel Baumann <daniel.baumann@progress-linux.org> Sun, 14 Apr 2024 07:16:59 +0200
+
mariadb (1:10.11.7-4) unstable; urgency=medium
[ Michael Biebl ]
diff --git a/debian/control b/debian/control
index cd1ff240..78f9201e 100644
--- a/debian/control
+++ b/debian/control
@@ -4,48 +4,50 @@ Priority: optional
Maintainer: Progress Linux Maintainers <maintainers@lists.progress-linux.org>
XSBC-Uploaders: Daniel Baumann <daniel.baumann@progress-linux.org>
XSBC-Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
-XSBC-Original-Uploaders: Otto Kekäläinen <otto@debian.org>
+XSBC-Original-Uploaders:
+ Otto Kekäläinen <otto@debian.org>,
Bugs: mailto:maintainers@lists.progress-linux.org
-Build-Depends: bison,
- cmake,
- cracklib-runtime <!nocheck>,
- debhelper-compat (= 13),
- debhelper (>= 13.13~),
- dh-exec,
- gdb <!nocheck>,
- libboost-dev,
- libbz2-dev,
- libcrack2-dev (>= 2.9.0),
- libcurl4-openssl-dev | libcurl4-dev,
- libedit-dev,
- libedit-dev:native,
- libfmt-dev (>= 7.0.0),
- libjemalloc-dev [linux-any],
- libjudy-dev,
- libkrb5-dev,
- liblz4-dev,
- liblzma-dev,
- liblzo2-dev,
- libncurses-dev,
- libnuma-dev [linux-any],
- libpam0g-dev,
- libpcre2-dev,
- libpmem-dev [amd64 arm64 ppc64el riscv64],
- libsnappy-dev,
- libssl-dev,
- libssl-dev:native,
- libsystemd-dev [linux-any],
- liburing-dev [linux-any],
- libxml2-dev,
- libzstd-dev (>= 1.3.3),
- lsb-release,
- perl:any,
- po-debconf,
- psmisc,
- unixodbc-dev,
- uuid-dev,
- zlib1g-dev (>= 1:1.1.3-5~),
- zlib1g-dev:native
+Build-Depends:
+ bison,
+ cmake,
+ cracklib-runtime <!nocheck>,
+ debhelper-compat (= 13),
+ debhelper (>= 13.13~),
+ dh-exec,
+ gdb <!nocheck>,
+ libboost-dev,
+ libbz2-dev,
+ libcrack2-dev (>= 2.9.0),
+ libcurl4-openssl-dev | libcurl4-dev,
+ libedit-dev,
+ libedit-dev:native,
+ libfmt-dev (>= 10.2.2) | libfmt-dev (<< 10),
+ libjemalloc-dev [linux-any],
+ libjudy-dev,
+ libkrb5-dev,
+ liblz4-dev,
+ liblzma-dev,
+ liblzo2-dev,
+ libncurses-dev,
+ libnuma-dev [linux-any],
+ libpam0g-dev,
+ libpcre2-dev,
+ libpmem-dev [amd64 arm64 ppc64el riscv64],
+ libsnappy-dev,
+ libssl-dev,
+ libssl-dev:native,
+ libsystemd-dev [linux-any],
+ liburing-dev [linux-any],
+ libxml2-dev,
+ libzstd-dev (>= 1.3.3),
+ lsb-release,
+ perl:any,
+ po-debconf,
+ psmisc,
+ unixodbc-dev,
+ uuid-dev,
+ zlib1g-dev (>= 1:1.1.3-5~),
+ zlib1g-dev:native,
Rules-Requires-Root: no
Standards-Version: 4.6.2
Homepage: https://mariadb.org/
@@ -57,23 +59,27 @@ XSBC-Original-Vcs-Git: https://salsa.debian.org/mariadb-team/mariadb-server.git
Package: libmariadb-dev
Architecture: any
Section: libdevel
-Depends: libmariadb3 (= ${binary:Version}),
- libssl-dev,
- zlib1g-dev,
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: libmariadb-client-lgpl-dev,
- libmariadb-dev-compat (<< ${source:Version}),
- libmariadbclient-dev (<< 1:10.3),
- libmysqlclient-dev,
- libmysqld-dev (<< ${source:Version})
-Replaces: libmariadb-client-lgpl-dev,
- libmariadb-dev-compat (<< ${source:Version}),
- libmariadbclient-dev (<< 1:10.3),
- libmysqlclient-dev,
- libmysqld-dev (<< ${source:Version})
-Conflicts: libmariadbclient16-dev,
- libmysqlclient-dev
+Depends:
+ libmariadb3 (= ${binary:Version}),
+ libssl-dev,
+ zlib1g-dev,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ libmariadb-client-lgpl-dev,
+ libmariadb-dev-compat (<< ${source:Version}),
+ libmariadbclient-dev (<< 1:10.3),
+ libmysqlclient-dev,
+ libmysqld-dev (<< ${source:Version}),
+Replaces:
+ libmariadb-client-lgpl-dev,
+ libmariadb-dev-compat (<< ${source:Version}),
+ libmariadbclient-dev (<< 1:10.3),
+ libmysqlclient-dev,
+ libmysqld-dev (<< ${source:Version}),
+Conflicts:
+ libmariadbclient16-dev,
+ libmysqlclient-dev,
Description: MariaDB database development files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -87,21 +93,26 @@ Description: MariaDB database development files
Package: libmariadb-dev-compat
Architecture: any
Section: libdevel
-Depends: libmariadb-dev (= ${binary:Version}),
- ${misc:Depends}
-Conflicts: libmariadb-client-lgpl-dev-compat,
- libmariadbclient-dev-compat,
- libmysqlclient-dev
-Provides: libmariadb-client-lgpl-dev-compat,
- libmariadbclient-dev-compat
-Breaks: libmariadb-client-lgpl-dev-compat,
- libmariadbclient-dev (<< 1:10.3),
- libmariadbclient-dev-compat,
- libmysqlclient-dev
-Replaces: libmariadb-client-lgpl-dev-compat,
- libmariadbclient-dev (<< 1:10.3),
- libmariadbclient-dev-compat,
- libmysqlclient-dev
+Depends:
+ libmariadb-dev (= ${binary:Version}),
+ ${misc:Depends},
+Conflicts:
+ libmariadb-client-lgpl-dev-compat,
+ libmariadbclient-dev-compat,
+ libmysqlclient-dev,
+Provides:
+ libmariadb-client-lgpl-dev-compat,
+ libmariadbclient-dev-compat,
+Breaks:
+ libmariadb-client-lgpl-dev-compat,
+ libmariadbclient-dev (<< 1:10.3),
+ libmariadbclient-dev-compat,
+ libmysqlclient-dev,
+Replaces:
+ libmariadb-client-lgpl-dev-compat,
+ libmariadbclient-dev (<< 1:10.3),
+ libmariadbclient-dev-compat,
+ libmysqlclient-dev,
Description: MariaDB Connector/C, compatibility symlinks
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -115,18 +126,22 @@ Package: libmariadb3
Architecture: any
Multi-Arch: same
Section: libs
-Depends: mariadb-common,
- ${misc:Depends},
- ${shlibs:Depends}
-Conflicts: mariadb-galera-server-10.0,
- mariadb-galera-server-5.5,
- mariadb-server-10.0,
- mariadb-server-5.1,
- mariadb-server-5.2,
- mariadb-server-5.3,
- mariadb-server-5.5
-Breaks: libmariadbclient18
-Replaces: libmariadbclient18
+Depends:
+ mariadb-common,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Conflicts:
+ mariadb-galera-server-10.0,
+ mariadb-galera-server-5.5,
+ mariadb-server-10.0,
+ mariadb-server-5.1,
+ mariadb-server-5.2,
+ mariadb-server-5.3,
+ mariadb-server-5.5,
+Breaks:
+ libmariadbclient18,
+Replaces:
+ libmariadbclient18,
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
@@ -138,8 +153,9 @@ Description: MariaDB database client library
Package: libmariadbd19
Architecture: any
Section: libs
-Depends: ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
Multi-Arch: same
Description: MariaDB embedded database, shared library
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
@@ -152,16 +168,21 @@ Description: MariaDB embedded database, shared library
Package: libmariadbd-dev
Architecture: any
Section: libdevel
-Provides: libmysqld-dev
-Pre-Depends: ${misc:Pre-Depends}
-Depends: libmariadb-dev (= ${binary:Version}),
- libmariadbd19 (= ${binary:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: libmariadb-dev (<< 1:10.4),
- libmysqld-dev
-Replaces: libmariadb-dev (<< 1:10.4),
- libmysqld-dev
+Provides:
+ libmysqld-dev,
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ libmariadb-dev (= ${binary:Version}),
+ libmariadbd19 (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ libmariadb-dev (<< 1:10.4),
+ libmysqld-dev,
+Replaces:
+ libmariadb-dev (<< 1:10.4),
+ libmysqld-dev,
Description: MariaDB embedded database, development files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -173,8 +194,9 @@ Description: MariaDB embedded database, development files
Package: mariadb-common
Architecture: all
-Depends: mysql-common (>= 5.6.25),
- ${misc:Depends}
+Depends:
+ mysql-common (>= 5.6.25),
+ ${misc:Depends},
Multi-Arch: foreign
Description: MariaDB database common config files (/etc/mysql/mariadb.conf.d/)
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
@@ -186,79 +208,84 @@ Description: MariaDB database common config files (/etc/mysql/mariadb.conf.d/)
Package: mariadb-client-core
Architecture: any
-Depends: libmariadb3 (>= 10.5.4),
- mariadb-common (>= ${source:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Conflicts: mysql-client-5.5,
- mysql-client-5.6,
- mysql-client-5.7,
- mysql-client-8.0,
- virtual-mysql-client-core
-Breaks: 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-10.4,
- mariadb-client-core-10.5,
- mariadb-client-core-10.6,
- mariadb-client-core-5.5,
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-core (<< ${source:Version}),
- mariadb-server-core-10.3,
- mariadb-server-core-10.4,
- mariadb-server-core-10.5,
- mariadb-server-core-10.6,
- mysql-client-core-5.5,
- mysql-client-core-5.6,
- mysql-client-core-5.7,
- mysql-client-core-8.0,
- mysql-cluster-community-client-plugins,
- mysql-server-core-5.5,
- mysql-server-core-5.6,
- mysql-server-core-5.7,
- mysql-server-core-8.0,
- percona-server-server-5.6,
- percona-server-server-5.7,
- percona-server-server-8.0,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- percona-xtradb-cluster-server-8.0
-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-10.4,
- mariadb-client-core-10.5,
- mariadb-client-core-10.6,
- mariadb-client-core-5.5,
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-core (<< ${source:Version}),
- mariadb-server-core-10.3,
- mariadb-server-core-10.4,
- mariadb-server-core-10.5,
- mariadb-server-core-10.6,
- mysql-client-core-5.5,
- mysql-client-core-5.6,
- mysql-client-core-5.7,
- mysql-client-core-8.0,
- mysql-cluster-community-client-plugins,
- mysql-server-core-5.5,
- mysql-server-core-5.6,
- mysql-server-core-5.7,
- mysql-server-core-8.0,
- percona-server-server-5.6,
- percona-server-server-5.7,
- percona-server-server-8.0,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- percona-xtradb-cluster-server-8.0,
- virtual-mysql-client-core
-Provides: virtual-mysql-client-core
+Depends:
+ libmariadb3 (>= 10.5.4),
+ mariadb-common (>= ${source:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Conflicts:
+ mysql-client-5.5,
+ mysql-client-5.6,
+ mysql-client-5.7,
+ mysql-client-8.0,
+ virtual-mysql-client-core,
+Breaks:
+ 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-10.4,
+ mariadb-client-core-10.5,
+ mariadb-client-core-10.6,
+ mariadb-client-core-5.5,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-core (<< ${source:Version}),
+ mariadb-server-core-10.3,
+ mariadb-server-core-10.4,
+ mariadb-server-core-10.5,
+ mariadb-server-core-10.6,
+ mysql-client-core-5.5,
+ mysql-client-core-5.6,
+ mysql-client-core-5.7,
+ mysql-client-core-8.0,
+ mysql-cluster-community-client-plugins,
+ mysql-server-core-5.5,
+ mysql-server-core-5.6,
+ mysql-server-core-5.7,
+ mysql-server-core-8.0,
+ percona-server-server-5.6,
+ percona-server-server-5.7,
+ percona-server-server-8.0,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ percona-xtradb-cluster-server-8.0,
+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-10.4,
+ mariadb-client-core-10.5,
+ mariadb-client-core-10.6,
+ mariadb-client-core-5.5,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-core (<< ${source:Version}),
+ mariadb-server-core-10.3,
+ mariadb-server-core-10.4,
+ mariadb-server-core-10.5,
+ mariadb-server-core-10.6,
+ mysql-client-core-5.5,
+ mysql-client-core-5.6,
+ mysql-client-core-5.7,
+ mysql-client-core-8.0,
+ mysql-cluster-community-client-plugins,
+ mysql-server-core-5.5,
+ mysql-server-core-5.6,
+ mysql-server-core-5.7,
+ mysql-server-core-8.0,
+ percona-server-server-5.6,
+ percona-server-server-5.7,
+ percona-server-server-8.0,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ percona-xtradb-cluster-server-8.0,
+ virtual-mysql-client-core,
+Provides:
+ virtual-mysql-client-core,
Description: MariaDB database core client binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -269,92 +296,98 @@ Description: MariaDB database core client binaries
Package: mariadb-client
Architecture: any
-Depends: debianutils (>=1.6),
- libconfig-inifiles-perl,
- mariadb-client-core (>= ${source:Version}),
- ${misc:Depends},
- ${perl:Depends},
- ${shlibs:Depends}
-Conflicts: mysql-client-core-5.5,
- mysql-client-core-5.6,
- mysql-client-core-5.7,
- mysql-client-core-8.0,
- mytop,
- virtual-mysql-client
-Breaks: mariadb-client-10.0,
- mariadb-client-10.1,
- mariadb-client-10.2,
- mariadb-client-10.3,
- mariadb-client-10.4,
- mariadb-client-10.5,
- mariadb-client-10.6,
- mariadb-client-5.5,
- mariadb-client-core (<< ${source:Version}),
- mariadb-client-core-10.0,
- mariadb-client-core-10.1,
- mariadb-client-core-10.2,
- mariadb-client-core-10.3,
- mariadb-client-core-10.4,
- mariadb-client-core-10.5,
- mariadb-client-core-10.6,
- mariadb-server (<< ${source:Version}),
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-10.2,
- mariadb-server-10.3,
- mariadb-server-10.4,
- mariadb-server-10.5 (<< 1:10.11),
- mariadb-server-10.6,
- mysql-client-5.5,
- mysql-client-5.6,
- mysql-client-5.7,
- mysql-client-8.0,
- mysql-server-5.5,
- mysql-server-5.7,
- mysql-server-core-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7
-Replaces: mariadb-client-10.0,
- mariadb-client-10.1,
- mariadb-client-10.2,
- mariadb-client-10.3,
- mariadb-client-10.4,
- mariadb-client-10.5,
- mariadb-client-10.6,
- mariadb-client-5.5,
- mariadb-client-core (<< ${source:Version}),
- mariadb-client-core-10.0,
- mariadb-client-core-10.1,
- mariadb-client-core-10.2,
- mariadb-client-core-10.3,
- mariadb-client-core-10.4,
- mariadb-client-core-10.5,
- mariadb-client-core-10.6,
- mariadb-server (<< ${source:Version}),
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-10.2,
- mariadb-server-10.3,
- mariadb-server-10.4,
- mariadb-server-10.5 (<< 1:10.11),
- mariadb-server-10.6,
- mysql-client-5.5,
- mysql-client-5.6,
- mysql-client-5.7,
- mysql-client-8.0,
- mysql-server-5.5,
- mysql-server-5.7,
- mysql-server-core-8.0,
- mytop,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- virtual-mysql-client
-Provides: virtual-mysql-client
-Recommends: libdbd-mariadb-perl | libdbd-mysql-perl,
- libdbi-perl,
- libterm-readkey-perl
+Depends:
+ debianutils (>=1.6),
+ libconfig-inifiles-perl,
+ mariadb-client-core (>= ${source:Version}),
+ ${misc:Depends},
+ ${perl:Depends},
+ ${shlibs:Depends},
+Conflicts:
+ mysql-client-core-5.5,
+ mysql-client-core-5.6,
+ mysql-client-core-5.7,
+ mysql-client-core-8.0,
+ mytop,
+ virtual-mysql-client,
+Breaks:
+ mariadb-client-10.0,
+ mariadb-client-10.1,
+ mariadb-client-10.2,
+ mariadb-client-10.3,
+ mariadb-client-10.4,
+ mariadb-client-10.5,
+ mariadb-client-10.6,
+ mariadb-client-5.5,
+ mariadb-client-core (<< ${source:Version}),
+ mariadb-client-core-10.0,
+ mariadb-client-core-10.1,
+ mariadb-client-core-10.2,
+ mariadb-client-core-10.3,
+ mariadb-client-core-10.4,
+ mariadb-client-core-10.5,
+ mariadb-client-core-10.6,
+ mariadb-server (<< ${source:Version}),
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-10.2,
+ mariadb-server-10.3,
+ mariadb-server-10.4,
+ mariadb-server-10.5 (<< 1:10.11),
+ mariadb-server-10.6,
+ mysql-client-5.5,
+ mysql-client-5.6,
+ mysql-client-5.7,
+ mysql-client-8.0,
+ mysql-server-5.5,
+ mysql-server-5.7,
+ mysql-server-core-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+Replaces:
+ mariadb-client-10.0,
+ mariadb-client-10.1,
+ mariadb-client-10.2,
+ mariadb-client-10.3,
+ mariadb-client-10.4,
+ mariadb-client-10.5,
+ mariadb-client-10.6,
+ mariadb-client-5.5,
+ mariadb-client-core (<< ${source:Version}),
+ mariadb-client-core-10.0,
+ mariadb-client-core-10.1,
+ mariadb-client-core-10.2,
+ mariadb-client-core-10.3,
+ mariadb-client-core-10.4,
+ mariadb-client-core-10.5,
+ mariadb-client-core-10.6,
+ mariadb-server (<< ${source:Version}),
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-10.2,
+ mariadb-server-10.3,
+ mariadb-server-10.4,
+ mariadb-server-10.5 (<< 1:10.11),
+ mariadb-server-10.6,
+ mysql-client-5.5,
+ mysql-client-5.6,
+ mysql-client-5.7,
+ mysql-client-8.0,
+ mysql-server-5.5,
+ mysql-server-5.7,
+ mysql-server-core-8.0,
+ mytop,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ virtual-mysql-client,
+Provides:
+ virtual-mysql-client,
+Recommends:
+ libdbd-mariadb-perl | libdbd-mysql-perl,
+ libdbi-perl,
+ libterm-readkey-perl,
Description: MariaDB database client binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -366,69 +399,74 @@ Description: MariaDB database client binaries
Package: mariadb-server-core
Architecture: any
-Depends: mariadb-common (>= ${source:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Conflicts: mariadb-galera-server-5.5,
- mysql-server-5.5,
- mysql-server-5.6,
- mysql-server-5.7,
- mysql-server-8.0,
- virtual-mysql-server-core
-Breaks: mariadb-client-10.1,
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-10.2,
- mariadb-server-10.3,
- mariadb-server-10.4,
- mariadb-server-10.5 (<< 1:10.11),
- mariadb-server-core-10.0,
- mariadb-server-core-10.1,
- mariadb-server-core-10.2,
- mariadb-server-core-10.3,
- mariadb-server-core-10.4,
- mariadb-server-core-10.5,
- mariadb-server-core-10.6,
- mariadb-server-core-5.5,
- mysql-client-5.5,
- mysql-client-5.6,
- mysql-server-core-5.5,
- mysql-server-core-5.6,
- mysql-server-core-5.7,
- mysql-server-core-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7
-Replaces: mariadb-client-10.1,
- mariadb-server (<< ${source:Version}),
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-10.2,
- mariadb-server-10.3,
- mariadb-server-10.4,
- mariadb-server-10.5 (<< 1:10.11),
- mariadb-server-10.6,
- mariadb-server-core-10.0,
- mariadb-server-core-10.1,
- mariadb-server-core-10.2,
- mariadb-server-core-10.3,
- mariadb-server-core-10.4,
- mariadb-server-core-10.5,
- mariadb-server-core-10.6,
- mariadb-server-core-5.5,
- mysql-client-5.5,
- mysql-client-5.6,
- mysql-client-5.7,
- mysql-client-8.0,
- mysql-server-core-5.5,
- mysql-server-core-5.6,
- mysql-server-core-5.7,
- mysql-server-core-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- virtual-mysql-server-core
-Provides: virtual-mysql-server-core
+Depends:
+ mariadb-common (>= ${source:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Conflicts:
+ mariadb-galera-server-5.5,
+ mysql-server-5.5,
+ mysql-server-5.6,
+ mysql-server-5.7,
+ mysql-server-8.0,
+ virtual-mysql-server-core,
+Breaks:
+ mariadb-client-10.1,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-10.2,
+ mariadb-server-10.3,
+ mariadb-server-10.4,
+ mariadb-server-10.5 (<< 1:10.11),
+ mariadb-server-core-10.0,
+ mariadb-server-core-10.1,
+ mariadb-server-core-10.2,
+ mariadb-server-core-10.3,
+ mariadb-server-core-10.4,
+ mariadb-server-core-10.5,
+ mariadb-server-core-10.6,
+ mariadb-server-core-5.5,
+ mysql-client-5.5,
+ mysql-client-5.6,
+ mysql-server-core-5.5,
+ mysql-server-core-5.6,
+ mysql-server-core-5.7,
+ mysql-server-core-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+Replaces:
+ mariadb-client-10.1,
+ mariadb-server (<< ${source:Version}),
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-10.2,
+ mariadb-server-10.3,
+ mariadb-server-10.4,
+ mariadb-server-10.5 (<< 1:10.11),
+ mariadb-server-10.6,
+ mariadb-server-core-10.0,
+ mariadb-server-core-10.1,
+ mariadb-server-core-10.2,
+ mariadb-server-core-10.3,
+ mariadb-server-core-10.4,
+ mariadb-server-core-10.5,
+ mariadb-server-core-10.6,
+ mariadb-server-core-5.5,
+ mysql-client-5.5,
+ mysql-client-5.6,
+ mysql-client-5.7,
+ mysql-client-8.0,
+ mysql-server-core-5.5,
+ mysql-server-core-5.6,
+ mysql-server-core-5.7,
+ mysql-server-core-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ virtual-mysql-server-core,
+Provides:
+ virtual-mysql-server-core,
Description: MariaDB database core server files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -439,98 +477,106 @@ Description: MariaDB database core server files
Package: mariadb-server
Architecture: any
-Suggests: mailx,
- mariadb-test,
- netcat-openbsd
-Recommends: libhtml-template-perl,
- mariadb-plugin-provider-bzip2,
- mariadb-plugin-provider-lz4,
- mariadb-plugin-provider-lzma,
- mariadb-plugin-provider-lzo,
- mariadb-plugin-provider-snappy,
- pv
-Pre-Depends: adduser (>= 3.40),
- debconf,
- mariadb-common (>= ${source:Version}),
- ${misc:Pre-Depends}
-Depends: galera-4 (>= 26.4),
- gawk,
- iproute2 [linux-any],
- libdbi-perl,
- lsof [linux-any],
- mariadb-client (>= ${source:Version}),
- mariadb-server-core (>= ${server:Version}),
- passwd,
- perl (>= 5.6),
- procps,
- psmisc,
- rsync,
- socat,
- ${misc:Depends},
- ${shlibs:Depends}
-Conflicts: handlersocket-mysql-5.5,
- mariadb-tokudb-engine-10.0,
- mariadb-tokudb-engine-10.1,
- mariadb-tokudb-engine-5.5,
- mysql-server-core-5.5,
- mysql-server-core-5.6,
- mysql-server-core-5.7,
- mysql-server-core-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- virtual-mysql-server
-Breaks: cqrlog (<< 1.9.0-5~),
- galera-3 (<< 26.4),
- handlersocket-mysql-5.5,
- mariadb-galera-server,
- mariadb-galera-server-10.0,
- mariadb-galera-server-5.5,
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-10.2,
- mariadb-server-10.3,
- mariadb-server-10.4,
- mariadb-server-10.5 (<< 1:10.11),
- mariadb-server-10.6,
- mariadb-server-5.5,
- mariadb-tokudb-engine-10.0,
- mariadb-tokudb-engine-10.1,
- mariadb-tokudb-engine-5.5,
- mysql-client-5.5,
- mysql-client-5.7,
- mysql-client-core-8.0,
- mysql-server-5.5,
- mysql-server-5.6,
- mysql-server-5.7,
- mysql-server-8.0
-Replaces: handlersocket-mysql-5.5,
- mariadb-galera-server,
- mariadb-galera-server-10.0,
- mariadb-galera-server-5.5,
- mariadb-server-10.0,
- mariadb-server-10.1,
- mariadb-server-10.2,
- mariadb-server-10.3,
- mariadb-server-10.4,
- mariadb-server-10.5 (<< 1:10.11),
- mariadb-server-10.6,
- mariadb-server-5.5,
- mariadb-tokudb-engine-10.0,
- mariadb-tokudb-engine-10.1,
- mariadb-tokudb-engine-5.5,
- mysql-client-5.5,
- mysql-client-5.7,
- mysql-client-core-8.0,
- mysql-server-5.5,
- mysql-server-5.6,
- mysql-server-5.7,
- mysql-server-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- virtual-mysql-server
-Provides: virtual-mysql-server
+Suggests:
+ mailx,
+ mariadb-test,
+ netcat-openbsd,
+Recommends:
+ libhtml-template-perl,
+ mariadb-plugin-provider-bzip2,
+ mariadb-plugin-provider-lz4,
+ mariadb-plugin-provider-lzma,
+ mariadb-plugin-provider-lzo,
+ mariadb-plugin-provider-snappy,
+ pv,
+Pre-Depends:
+ adduser (>= 3.40),
+ debconf,
+ mariadb-common (>= ${source:Version}),
+ ${misc:Pre-Depends},
+Depends:
+ galera-4 (>= 26.4),
+ gawk,
+ iproute2 [linux-any],
+ libdbi-perl,
+ lsof [linux-any],
+ mariadb-client (>= ${source:Version}),
+ mariadb-server-core (>= ${server:Version}),
+ passwd,
+ perl (>= 5.6),
+ procps,
+ psmisc,
+ rsync,
+ socat,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Conflicts:
+ handlersocket-mysql-5.5,
+ mariadb-tokudb-engine-10.0,
+ mariadb-tokudb-engine-10.1,
+ mariadb-tokudb-engine-5.5,
+ mysql-server-core-5.5,
+ mysql-server-core-5.6,
+ mysql-server-core-5.7,
+ mysql-server-core-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ virtual-mysql-server,
+Breaks:
+ cqrlog (<< 1.9.0-5~),
+ galera-3 (<< 26.4),
+ handlersocket-mysql-5.5,
+ mariadb-galera-server,
+ mariadb-galera-server-10.0,
+ mariadb-galera-server-5.5,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-10.2,
+ mariadb-server-10.3,
+ mariadb-server-10.4,
+ mariadb-server-10.5 (<< 1:10.11),
+ mariadb-server-10.6,
+ mariadb-server-5.5,
+ mariadb-tokudb-engine-10.0,
+ mariadb-tokudb-engine-10.1,
+ mariadb-tokudb-engine-5.5,
+ mysql-client-5.5,
+ mysql-client-5.7,
+ mysql-client-core-8.0,
+ mysql-server-5.5,
+ mysql-server-5.6,
+ mysql-server-5.7,
+ mysql-server-8.0,
+Replaces:
+ handlersocket-mysql-5.5,
+ mariadb-galera-server,
+ mariadb-galera-server-10.0,
+ mariadb-galera-server-5.5,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+ mariadb-server-10.2,
+ mariadb-server-10.3,
+ mariadb-server-10.4,
+ mariadb-server-10.5 (<< 1:10.11),
+ mariadb-server-10.6,
+ mariadb-server-5.5,
+ mariadb-tokudb-engine-10.0,
+ mariadb-tokudb-engine-10.1,
+ mariadb-tokudb-engine-5.5,
+ mysql-client-5.5,
+ mysql-client-5.7,
+ mysql-client-core-8.0,
+ mysql-server-5.5,
+ mysql-server-5.6,
+ mysql-server-5.7,
+ mysql-server-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ virtual-mysql-server,
+Provides:
+ virtual-mysql-server,
Description: MariaDB database server binaries
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -541,9 +587,10 @@ Description: MariaDB database server binaries
Package: mariadb-server-10.5
Architecture: any
-Depends: mariadb-server (>= 1:10.11),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (>= 1:10.11),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: MariaDB database server binaries (transitional dummy 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
@@ -555,17 +602,20 @@ Description: MariaDB database server binaries (transitional dummy package)
Package: mariadb-backup
Architecture: any
-Breaks: mariadb-backup-10.1,
- mariadb-backup-10.2,
- mariadb-backup-10.3,
- mariadb-client-10.1
-Replaces: mariadb-backup-10.1,
- mariadb-backup-10.2,
- mariadb-backup-10.3,
- mariadb-client-10.1
-Depends: mariadb-client-core (= ${binary:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
+Breaks:
+ mariadb-backup-10.1,
+ mariadb-backup-10.2,
+ mariadb-backup-10.3,
+ mariadb-client-10.1,
+Replaces:
+ mariadb-backup-10.1,
+ mariadb-backup-10.2,
+ mariadb-backup-10.3,
+ mariadb-client-10.1,
+Depends:
+ mariadb-client-core (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: Backup tool for MariaDB server
Based on Xtrabackup, but improved to work with MariaDB server.
This backup tool is guaranteed to be compatible with MariaDB server.
@@ -575,22 +625,27 @@ Description: Backup tool for MariaDB server
Package: mariadb-plugin-connect
Architecture: any
-Depends: libxml2,
- mariadb-server (= ${server:Version}),
- unixodbc,
- ${misc:Depends},
- ${shlibs:Depends}
-Recommends: curl
-Conflicts: mariadb-connect-engine-10.0,
- mariadb-connect-engine-10.1
-Breaks: mariadb-connect-engine-10.0,
- mariadb-connect-engine-10.1,
- mariadb-server-10.0,
- mariadb-server-10.1
-Replaces: mariadb-connect-engine-10.0,
- mariadb-connect-engine-10.1,
- mariadb-server-10.0,
- mariadb-server-10.1
+Depends:
+ libxml2,
+ mariadb-server (= ${server:Version}),
+ unixodbc,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Recommends:
+ curl,
+Conflicts:
+ mariadb-connect-engine-10.0,
+ mariadb-connect-engine-10.1,
+Breaks:
+ mariadb-connect-engine-10.0,
+ mariadb-connect-engine-10.1,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+Replaces:
+ mariadb-connect-engine-10.0,
+ mariadb-connect-engine-10.1,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
Description: Connect storage engine for MariaDB server
Connect engine supports a number of file formats (dbf, xml, txt, bin, etc),
connections to ODBC tables and remote MySQL tables, as well as a number of
@@ -599,9 +654,10 @@ Description: Connect storage engine for MariaDB server
Package: mariadb-plugin-s3
Architecture: any
-Depends: mariadb-server (= ${server:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (= ${server:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: Amazon S3 archival storage engine for MariaDB
The S3 storage engine allows one to archive MariaDB tables in Amazon S3 (or any
third-party public or private cloud that implements S3 API), but still have
@@ -609,16 +665,20 @@ Description: Amazon S3 archival storage engine for MariaDB
Package: mariadb-plugin-rocksdb
Architecture: amd64 arm64 mips64el ppc64el riscv64
-Depends: mariadb-server (= ${server:Version}),
- python3:any,
- rocksdb-tools,
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-rocksdb-engine-10.2,
- mariadb-rocksdb-engine-10.3
-Replaces: mariadb-rocksdb-engine-10.2,
- mariadb-rocksdb-engine-10.3
-Recommends: python3-mysqldb
+Depends:
+ mariadb-server (= ${server:Version}),
+ python3:any,
+ rocksdb-tools,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-rocksdb-engine-10.2,
+ mariadb-rocksdb-engine-10.3,
+Replaces:
+ mariadb-rocksdb-engine-10.2,
+ mariadb-rocksdb-engine-10.3,
+Recommends:
+ python3-mysqldb,
Description: RocksDB storage engine for MariaDB server
The RocksDB storage engine is a high performance storage engine, aimed
at maximising storage efficiency while maintaining InnoDB-like performance.
@@ -626,20 +686,24 @@ Description: RocksDB storage engine for MariaDB server
Package: mariadb-plugin-oqgraph
Architecture: any
-Depends: libjudydebian1,
- mariadb-server (= ${server:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Conflicts: mariadb-oqgraph-engine-10.0,
- mariadb-oqgraph-engine-10.1
-Breaks: mariadb-oqgraph-engine-10.0,
- mariadb-oqgraph-engine-10.1,
- mariadb-server-10.0,
- mariadb-server-10.1
-Replaces: mariadb-oqgraph-engine-10.0,
- mariadb-oqgraph-engine-10.1,
- mariadb-server-10.0,
- mariadb-server-10.1
+Depends:
+ libjudydebian1,
+ mariadb-server (= ${server:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Conflicts:
+ mariadb-oqgraph-engine-10.0,
+ mariadb-oqgraph-engine-10.1,
+Breaks:
+ mariadb-oqgraph-engine-10.0,
+ mariadb-oqgraph-engine-10.1,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+Replaces:
+ mariadb-oqgraph-engine-10.0,
+ mariadb-oqgraph-engine-10.1,
+ mariadb-server-10.0,
+ mariadb-server-10.1,
Description: OQGraph storage engine for MariaDB server
The OQGraph engine is a computation engine plugin for handling hierarchies
(trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL.
@@ -647,13 +711,16 @@ Description: OQGraph storage engine for MariaDB server
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
-Depends: mariadb-server (= ${server:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-server-10.0,
- mariadb-server-10.1
-Replaces: mariadb-server-10.0,
- mariadb-server-10.1
+Depends:
+ mariadb-server (= ${server:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+Replaces:
+ mariadb-server-10.0,
+ mariadb-server-10.1,
Description: Mroonga storage engine for MariaDB server
Mroonga (formerly named Groonga Storage Engine) is a storage engine that
provides fast CJK-ready full text searching using column store.
@@ -661,13 +728,16 @@ Description: Mroonga storage engine for MariaDB server
Package: mariadb-plugin-spider
Architecture: any
-Depends: mariadb-server (= ${server:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-server-10.0,
- mariadb-server-10.1
-Replaces: mariadb-server-10.0,
- mariadb-server-10.1
+Depends:
+ mariadb-server (= ${server:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-server-10.0,
+ mariadb-server-10.1,
+Replaces:
+ mariadb-server-10.0,
+ mariadb-server-10.1,
Description: Spider storage engine for MariaDB server
The Spider storage engine with built-in sharding features. It supports
partitioning and xa transactions, and allows tables of different MariaDB server
@@ -676,14 +746,17 @@ Description: Spider storage engine for MariaDB server
Package: mariadb-plugin-gssapi-server
Architecture: any
-Depends: libgssapi-krb5-2,
- mariadb-server,
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-gssapi-server-10.1,
- mariadb-gssapi-server-10.2
-Replaces: mariadb-gssapi-server-10.1,
- mariadb-gssapi-server-10.2
+Depends:
+ libgssapi-krb5-2,
+ mariadb-server,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-gssapi-server-10.1,
+ mariadb-gssapi-server-10.2,
+Replaces:
+ mariadb-gssapi-server-10.1,
+ mariadb-gssapi-server-10.2,
Description: GSSAPI authentication plugin for MariaDB server
This plugin includes support for Kerberos on Unix, but can also be used for
Windows authentication with or without domain environment.
@@ -692,14 +765,17 @@ Description: GSSAPI authentication plugin for MariaDB server
Package: mariadb-plugin-gssapi-client
Architecture: any
-Depends: libgssapi-krb5-2,
- mariadb-client (= ${binary:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-gssapi-client-10.1,
- mariadb-gssapi-client-10.2
-Replaces: mariadb-gssapi-client-10.1,
- mariadb-gssapi-client-10.2
+Depends:
+ libgssapi-krb5-2,
+ mariadb-client (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-gssapi-client-10.1,
+ mariadb-gssapi-client-10.2,
+Replaces:
+ mariadb-gssapi-client-10.1,
+ mariadb-gssapi-client-10.2,
Description: GSSAPI authentication plugin for MariaDB client
This plugin includes support for Kerberos on Unix, but can also be used for
Windows authentication with or without domain environment.
@@ -708,10 +784,11 @@ Description: GSSAPI authentication plugin for MariaDB client
Package: mariadb-plugin-cracklib-password-check
Architecture: any
-Depends: libcrack2 (>= 2.9.0),
- mariadb-server (= ${server:Version}),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ libcrack2 (>= 2.9.0),
+ mariadb-server (= ${server:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: CrackLib Password Validation Plugin for MariaDB server
This password validation plugin uses cracklib to allow only
sufficiently secure (as defined by cracklib) user passwords in MariaDB server.
@@ -721,18 +798,20 @@ Description: CrackLib Password Validation Plugin for MariaDB server
Package: mariadb-plugin-hashicorp-key-management
Architecture: any
-Depends: mariadb-server,
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server,
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: Hashicorp Key Management plugin for MariaDB
This encryption plugin uses Hashicorp Vault for storing encryption
keys for MariaDB Data-at-Rest encryption.
Package: mariadb-plugin-provider-bzip2
Architecture: any
-Depends: mariadb-server (>= 1:10.11.1-1),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (>= 1:10.11.1-1),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: BZip2 compression support in the server and storage engines
The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga,
can use different compression libraries.
@@ -744,9 +823,10 @@ Description: BZip2 compression support in the server and storage engines
Package: mariadb-plugin-provider-lz4
Architecture: any
-Depends: mariadb-server (>= 1:10.11.1-1),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (>= 1:10.11.1-1),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: LZ4 compression support in the server and storage engines
The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga,
can use different compression libraries.
@@ -758,9 +838,10 @@ Description: LZ4 compression support in the server and storage engines
Package: mariadb-plugin-provider-lzma
Architecture: any
-Depends: mariadb-server (>= 1:10.11.1-1),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (>= 1:10.11.1-1),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: LZMA compression support in the server and storage engines
The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga,
can use different compression libraries.
@@ -772,9 +853,10 @@ Description: LZMA compression support in the server and storage engines
Package: mariadb-plugin-provider-lzo
Architecture: any
-Depends: mariadb-server (>= 1:10.11.1-1),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (>= 1:10.11.1-1),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: LZO compression support in the server and storage engines
The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga,
can use different compression libraries.
@@ -786,9 +868,10 @@ Description: LZO compression support in the server and storage engines
Package: mariadb-plugin-provider-snappy
Architecture: any
-Depends: mariadb-server (>= 1:10.11.1-1),
- ${misc:Depends},
- ${shlibs:Depends}
+Depends:
+ mariadb-server (>= 1:10.11.1-1),
+ ${misc:Depends},
+ ${shlibs:Depends},
Description: Snappy compression support in the server and storage engines
The various MariaDB storage engines, such as InnoDB, RocksDB, Mroonga,
can use different compression libraries.
@@ -800,45 +883,50 @@ Description: Snappy compression support in the server and storage engines
Package: mariadb-test
Architecture: any
-Depends: mariadb-client (= ${binary:Version}),
- mariadb-server (= ${server:Version}),
- mariadb-test-data (= ${source:Version}),
- virtual-mysql-testsuite,
- ${misc:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-test-10.0,
- mariadb-test-10.1,
- mariadb-test-5.5,
- mysql-client-5.5,
- mysql-server-5.5,
- mysql-server-5.7,
- mysql-server-core-8.0,
- mysql-testsuite,
- mysql-testsuite-5.5,
- mysql-testsuite-5.6,
- mysql-testsuite-5.7,
- mysql-testsuite-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7
-Replaces: mariadb-test-10.0,
- mariadb-test-10.1,
- mariadb-test-5.5,
- mysql-client-5.5,
- mysql-server-5.5,
- mysql-server-5.7,
- mysql-server-core-8.0,
- mysql-testsuite,
- mysql-testsuite-5.5,
- mysql-testsuite-5.6,
- mysql-testsuite-5.7,
- mysql-testsuite-8.0,
- percona-server-server-5.6,
- percona-xtradb-cluster-server-5.6,
- percona-xtradb-cluster-server-5.7,
- virtual-mysql-testsuite
-Provides: virtual-mysql-testsuite
-Suggests: patch
+Depends:
+ mariadb-client (= ${binary:Version}),
+ mariadb-server (= ${server:Version}),
+ mariadb-test-data (= ${source:Version}),
+ virtual-mysql-testsuite,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-test-10.0,
+ mariadb-test-10.1,
+ mariadb-test-5.5,
+ mysql-client-5.5,
+ mysql-server-5.5,
+ mysql-server-5.7,
+ mysql-server-core-8.0,
+ mysql-testsuite,
+ mysql-testsuite-5.5,
+ mysql-testsuite-5.6,
+ mysql-testsuite-5.7,
+ mysql-testsuite-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+Replaces:
+ mariadb-test-10.0,
+ mariadb-test-10.1,
+ mariadb-test-5.5,
+ mysql-client-5.5,
+ mysql-server-5.5,
+ mysql-server-5.7,
+ mysql-server-core-8.0,
+ mysql-testsuite,
+ mysql-testsuite-5.5,
+ mysql-testsuite-5.6,
+ mysql-testsuite-5.7,
+ mysql-testsuite-8.0,
+ percona-server-server-5.6,
+ percona-xtradb-cluster-server-5.6,
+ percona-xtradb-cluster-server-5.7,
+ virtual-mysql-testsuite,
+Provides:
+ virtual-mysql-testsuite,
+Suggests:
+ patch,
Description: MariaDB database regression test suite
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
@@ -850,27 +938,30 @@ Description: MariaDB database regression test suite
Package: mariadb-test-data
Architecture: all
Multi-Arch: foreign
-Depends: ${misc:Depends},
- ${perl:Depends},
- ${shlibs:Depends}
-Breaks: mariadb-test-10.0,
- mariadb-test-10.1,
- mariadb-test-5.5,
- mariadb-test-data-10.0,
- mysql-testsuite,
- mysql-testsuite-5.5,
- mysql-testsuite-5.6,
- mysql-testsuite-5.7,
- mysql-testsuite-8.0
-Replaces: mariadb-test-10.0,
- mariadb-test-10.1,
- mariadb-test-5.5,
- mariadb-test-data-10.0,
- mysql-testsuite,
- mysql-testsuite-5.5,
- mysql-testsuite-5.6,
- mysql-testsuite-5.7,
- mysql-testsuite-8.0
+Depends:
+ ${misc:Depends},
+ ${perl:Depends},
+ ${shlibs:Depends},
+Breaks:
+ mariadb-test-10.0,
+ mariadb-test-10.1,
+ mariadb-test-5.5,
+ mariadb-test-data-10.0,
+ mysql-testsuite,
+ mysql-testsuite-5.5,
+ mysql-testsuite-5.6,
+ mysql-testsuite-5.7,
+ mysql-testsuite-8.0,
+Replaces:
+ mariadb-test-10.0,
+ mariadb-test-10.1,
+ mariadb-test-5.5,
+ mariadb-test-data-10.0,
+ mysql-testsuite,
+ mysql-testsuite-5.5,
+ mysql-testsuite-5.6,
+ mysql-testsuite-5.7,
+ mysql-testsuite-8.0,
Description: MariaDB database regression test suite - data files
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
diff --git a/debian/gbp.conf b/debian/gbp.conf
index c82f8327..fd0fdf63 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -3,14 +3,19 @@
# for contributors to work with feature and bugfix branches
ignore-branch = True
+# Always use pristine tar
+pristine-tar = True
+
# Always sign everything
sign-tags = True
upstream-signatures = on
# DEP-14 format
debian-branch = debian/latest
-upstream-branch = 10.11
-upstream-tag = mariadb-%(version)s
+upstream-branch = upstream/latest
+
+# Upstream tag format
+upstream-vcs-tag = mariadb-%(version)s
# MariaDB has submodules
submodules = True
diff --git a/debian/libmariadb-dev.install b/debian/libmariadb-dev.install
index b6af1d5b..8bf8245e 100644
--- a/debian/libmariadb-dev.install
+++ b/debian/libmariadb-dev.install
@@ -19,7 +19,6 @@ usr/include/mariadb/mysql.h
usr/include/mariadb/mysql/
usr/include/mariadb/mysql/client_plugin.h
usr/include/mariadb/mysql/plugin_auth.h
-usr/include/mariadb/mysql/plugin_auth_common.h
usr/include/mariadb/mysql_com.h
usr/include/mariadb/mysql_version.h
usr/include/mariadb/mysqld_error.h
diff --git a/debian/mariadb-server.postinst b/debian/mariadb-server.postinst
index ca267a3a..82732921 100644
--- a/debian/mariadb-server.postinst
+++ b/debian/mariadb-server.postinst
@@ -127,7 +127,7 @@ EOF
! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null &&
[ ! -f "$mysql_datadir/undo_001" ]
then
- echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" | \
+ echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" |
mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null
fi
@@ -194,7 +194,7 @@ EOF
TMPDIR='' bash /usr/bin/mariadb-install-db \
--rpm --cross-bootstrap \
--user=mysql --disable-log-bin \
- --skip-test-db 2>&1 | \
+ --skip-test-db 2>&1 |
$ERR_LOGGER
set -e
@@ -302,4 +302,3 @@ esac
db_stop # in case invoke fails
#DEBHELPER#
-
diff --git a/debian/mariadb-server.postrm b/debian/mariadb-server.postrm
index 64e194f2..fc8401bc 100644
--- a/debian/mariadb-server.postrm
+++ b/debian/mariadb-server.postrm
@@ -12,8 +12,6 @@ fi
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
-#DEBHELPER#
-
#
# - Purge logs and data only if they are ours (#307473)
# - Remove the mysql user only after all his owned files are purged.
@@ -55,3 +53,5 @@ then
fi
fi
+
+#DEBHELPER#
diff --git a/debian/patches/1063738-revert-c432c9ef.patch b/debian/patches/1063738-revert-c432c9ef.patch
deleted file mode 100644
index e5e2668e..00000000
--- a/debian/patches/1063738-revert-c432c9ef.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Forwarded: no
-From: Otto Kekäläinen <otto@debian.org>
-Date: Wed, 21 Feb 2024 20:34:12 -0800
-Subject: [PATCH] Revert compile_time_assert() changes from "MDEV-32862 MYSQL struct in C/C and server differs"
-
-This partially reverts commit c432c9ef19bf6ff40ab9551bcae202d7e1319878 which
-most likely caused the regression that broke builds on many 32-bit platforms.
-
---- a/tests/mysql_client_fw.c
-+++ b/tests/mysql_client_fw.c
-@@ -1430,14 +1430,6 @@ int main(int argc, char **argv)
- tests_to_run[i]= NULL;
- }
-
--#ifdef _WIN32
-- /* must be the same in C/C and embedded, 1208 on 64bit, 968 on 32bit */
-- compile_time_assert(sizeof(MYSQL) == 60*sizeof(void*)+728);
--#else
-- /* must be the same in C/C and embedded, 1272 on 64bit, 964 on 32bit */
-- compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656);
--#endif
--
- if (mysql_server_init(embedded_server_arg_count,
- embedded_server_args,
- (char**) embedded_server_groups))
diff --git a/debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch b/debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch
deleted file mode 100644
index 7607cfd7..00000000
--- a/debian/patches/2129-new-script-wsrep-sst-backup-fixes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Forwarded: https://github.com/MariaDB/server/pull/2129 (merged in Feb 2024)
-Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2129.patch
-From: Otto Kekäläinen <otto@kekalainen.net>
-Date: Sun, 22 May 2022 10:13:33 -0700
-Subject: [PATCH] Properly introduce wsrep_sst_backup script in project
- packaging
-
-The script wsrep_sst_backup was introduced on MariaDB 10.3 in commit
-9b2fa2a. The new script was automatically included in RPM packages but not
-in Debian packages (which started to fail on warning about stray file).
-
-Include wsrep_sst_backup in the mariadb-server-10.{3..8} package, and
-also include a stub man page so that packaging of a new script is complete.
-
----
- debian/mariadb-server-10.6.install | 2 ++
- man/CMakeLists.txt | 2 +-
- man/wsrep_sst_backup.1 | 16 ++++++++++++++++
- 3 files changed, 19 insertions(+), 1 deletion(-)
- create mode 100644 man/wsrep_sst_backup.1
-
---- a/man/CMakeLists.txt
-+++ b/man/CMakeLists.txt
-@@ -13,7 +13,7 @@
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
-
--SET(MAN1_WSREP wsrep_sst_rsync.1 wsrep_sst_common.1 wsrep_sst_mariabackup.1
-+SET(MAN1_WSREP wsrep_sst_rsync.1 wsrep_sst_common.1 wsrep_sst_mariabackup.1 wsrep_sst_backup.1
- wsrep_sst_mysqldump.1 wsrep_sst_rsync_wan.1 galera_recovery.1 galera_new_cluster.1)
- SET(MAN1_SERVER innochecksum.1 myisam_ftdump.1 myisamchk.1
- aria_chk.1 aria_dump_log.1 aria_ftdump.1 aria_pack.1 aria_read_log.1
---- /dev/null
-+++ b/man/wsrep_sst_backup.1
-@@ -0,0 +1,16 @@
-+'\" t
-+.\"
-+.TH "\FBWSREP_SST_BACKUP\FR" "1" "22 May 2022" "MariaDB 10\&.3" "MariaDB Database System"
-+.\" -----------------------------------------------------------------
-+.\" * set default formatting
-+.\" -----------------------------------------------------------------
-+.\" disable hyphenation
-+.nh
-+.\" disable justification (adjust text to left margin only)
-+.ad l
-+.SH NAME
-+wsrep_sst_backup \- backup helper script for the MariaDB Galera Cluster
-+.SH DESCRIPTION
-+Use: See source code of script\.
-+.PP
-+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
diff --git a/debian/patches/2541-fix-stack-overflow-in-pinbox-allocator.patch b/debian/patches/2541-fix-stack-overflow-in-pinbox-allocator.patch
index bbc1af6b..b6dd97e3 100644
--- a/debian/patches/2541-fix-stack-overflow-in-pinbox-allocator.patch
+++ b/debian/patches/2541-fix-stack-overflow-in-pinbox-allocator.patch
@@ -1,6 +1,4 @@
-Forwarded: https://github.com/MariaDB/server/pull/2541
-Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2541.patch
-Bug: https://jira.mariadb.org/browse/MDEV-31151
+From fd83a9431cd16e6c61b8cdbb89810c554a315338 Mon Sep 17 00:00:00 2001
From: Hugo Wen <wenhug@amazon.com>
Date: Sat, 11 Mar 2023 00:27:42 +0000
Subject: [PATCH] Fix a stack overflow in pinbox allocator
@@ -126,7 +124,7 @@ Services, Inc.
{
for (i= 0; i < LF_PINBOX_PINS; i++)
{
- void *p= el->pin[i];
+ void *p= my_atomic_loadptr((void **)&el->pin[i]);
if (p)
- *hv->granary++= p;
+ {
@@ -172,7 +170,7 @@ Services, Inc.
- LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
- for (; el < el_end; el++)
- for (i= 0; i < LF_PINBOX_PINS; i++)
-- if (el->pin[i] == addr)
+- if (my_atomic_loadptr((void **)&el->pin[i]) == addr)
- return 1;
- return 0;
-}
diff --git a/debian/patches/2980-riscv-use-rdtime.patch b/debian/patches/2980-riscv-use-rdtime.patch
deleted file mode 100644
index a2e21ddb..00000000
--- a/debian/patches/2980-riscv-use-rdtime.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Forwarded: https://github.com/MariaDB/server/pull/2980 (merged in Feb 2024)
-Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2980.patch
-From: Aurelien Jarno <aurelien@aurel32.net>
-Date: Thu, 4 Jan 2024 11:30:34 +0100
-Subject: [PATCH] RISC-V: use RDTIME instead of RDCYCLE
-
-Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on
-RISC-V and can't be used directly from userland. There is a sysctl
-option to change that as a transition period, but it will eventually
-disappear.
-
-Use RDTIME instead, which while less accurate has the advantage of being
-synchronized between CPU (and thus monotonic) and of constant frequency.
-
-[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3
----
- include/my_rdtsc.h | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
---- a/include/my_rdtsc.h
-+++ b/include/my_rdtsc.h
-@@ -111,7 +111,7 @@ C_MODE_START
- On AARCH64, we use the generic timer base register. We override clang
- implementation for aarch64 as it access a PMU register which is not
- guaranteed to be active.
-- On RISC-V, we use the rdcycle instruction to read from mcycle register.
-+ On RISC-V, we use the rdtime instruction to read from mtime register.
-
- Sadly, we have nothing for the Digital Alpha, MIPS, Motorola m68k,
- HP PA-RISC or other non-mainstream (or obsolete) processors.
-@@ -211,15 +211,15 @@ static inline ulonglong my_timer_cycles(
- }
- #elif defined(__riscv)
- #define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_RISCV
-- /* Use RDCYCLE (and RDCYCLEH on riscv32) */
-+ /* Use RDTIME (and RDTIMEH on riscv32) */
- {
- # if __riscv_xlen == 32
- ulong result_lo, result_hi0, result_hi1;
- /* Implemented in assembly because Clang insisted on branching. */
- __asm __volatile__(
-- "rdcycleh %0\n"
-- "rdcycle %1\n"
-- "rdcycleh %2\n"
-+ "rdtimeh %0\n"
-+ "rdtime %1\n"
-+ "rdtimeh %2\n"
- "sub %0, %0, %2\n"
- "seqz %0, %0\n"
- "sub %0, zero, %0\n"
-@@ -228,7 +228,7 @@ static inline ulonglong my_timer_cycles(
- return (static_cast<ulonglong>(result_hi1) << 32) | result_lo;
- # else
- ulonglong result;
-- __asm __volatile__("rdcycle %0" : "=r"(result));
-+ __asm __volatile__("rdtime %0" : "=r"(result));
- return result;
- }
- # endif
diff --git a/debian/patches/3039-os-data-file-no-o-direct.patch b/debian/patches/3039-os-data-file-no-o-direct.patch
deleted file mode 100644
index 634bfbd9..00000000
--- a/debian/patches/3039-os-data-file-no-o-direct.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Forwarded: https://github.com/MariaDB/server/pull/3039 (merged in Feb 2024)
-Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/3039.patch
-From: Daniel Black <daniel@mariadb.org>
-Date: Fri, 2 Feb 2024 11:38:00 +1100
-Subject: [PATCH] MDEV-33095 MariaDB-backup - no OS_DATA_FILE_NO_O_DIRECT on
- some platforms
-
-Postfix for a6290a5bc5f3cba096854595c354d19d9267743d, in 10.11
-where OS_DATA_FILE_NO_O_DIRECT gets used. Same #ifdef conditions
-as other uses of OS_DATA_FILE_NO_O_DIRECT.
-
-Noticed on aarch64-macos builder.
----
- extra/mariabackup/xtrabackup.cc | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
---- a/extra/mariabackup/xtrabackup.cc
-+++ b/extra/mariabackup/xtrabackup.cc
-@@ -2428,7 +2428,12 @@ static bool innodb_init()
- os_file_delete_if_exists_func(ib_logfile0.c_str(), nullptr);
- os_file_t file= os_file_create_func(ib_logfile0.c_str(),
- OS_FILE_CREATE, OS_FILE_NORMAL,
-- OS_DATA_FILE_NO_O_DIRECT, false, &ret);
-+#if defined _WIN32 || defined HAVE_FCNTL_DIRECT
-+ OS_DATA_FILE_NO_O_DIRECT,
-+#else
-+ OS_DATA_FILE,
-+#endif
-+ false, &ret);
- if (!ret)
- {
- invalid_log:
diff --git a/debian/patches/3154-openssl-alert-protocol-string.patch b/debian/patches/3154-openssl-alert-protocol-string.patch
deleted file mode 100644
index a2aa8767..00000000
--- a/debian/patches/3154-openssl-alert-protocol-string.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Forwarded: https://github.com/MariaDB/server/pull/3154
-Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/3154.patch
-From: Zhibo Zhang <zhibo@amazon.com>
-Date: Tue, 19 Mar 2024 19:16:46 +0000
-Subject: [PATCH] Update tests to be compatible with OpenSSL 3.2.0
-
-As of version 3.2.0, OpenSSL updated the error message in new versions
-("https://github.com/openssl/openssl/commit/81b741f68984"). Update the
-tests and result files such that they are compatible with both original
-and new error messages.
-
-All new code of the whole pull request, including one or several files that are
-either new files or modified ones, are contributed under the BSD-new license. I
-am contributing on behalf of my employer Amazon Web Services, Inc.
----
- mysql-test/main/ssl_crl.result | 2 +-
- mysql-test/main/ssl_crl.test | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
---- a/mysql-test/main/ssl_crl.result
-+++ b/mysql-test/main/ssl_crl.result
-@@ -2,4 +2,4 @@
- Variable_name Value
- Ssl_version TLS_VERSION
- # try logging in with a certificate in the server's --ssl-crl : should fail
--ERROR 2026 (HY000): TLS/SSL error: sslv3 alert certificate revoked
-+ERROR 2026 (HY000): TLS/SSL error: ssl/tls alert certificate revoked
---- a/mysql-test/main/ssl_crl.test
-+++ b/mysql-test/main/ssl_crl.test
-@@ -7,7 +7,7 @@
- --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-new-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-new-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'"
-
- --echo # try logging in with a certificate in the server's --ssl-crl : should fail
--# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different
----replace_regex /ERROR 2013 \(HY000\): Lost connection to server at '.*', system error: [0-9]+/ERROR 2026 (HY000): TLS\/SSL error: sslv3 alert certificate revoked/
-+# OpenSSL 1.1.1a and later releases correctly rejects the certificate, but the error message is different
-+--replace_regex /(ERROR 2013 \(HY000\): Lost connection to server at '.*', system error: [0-9]+|ERROR 2026 \(HY000\): TLS\/SSL error: sslv3 alert certificate revoked)/ERROR 2026 (HY000): TLS\/SSL error: ssl\/tls alert certificate revoked/
- --error 1
- --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
diff --git a/debian/patches/MDEV-32975-chartset-collation-fix-php.patch b/debian/patches/MDEV-32975-chartset-collation-fix-php.patch
deleted file mode 100644
index e1282019..00000000
--- a/debian/patches/MDEV-32975-chartset-collation-fix-php.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Origin: https://github.com/MariaDB/server/commit/1b37cb71f44549c94acf8914cf93d43a4293a449 (merged in Feb 2024)
-Bug: https://jira.mariadb.org/browse/MDEV-32975
-From: Alexander Barkov <bar@mariadb.com>
-Date: Fri, 26 Jan 2024 13:12:03 +0400
-Subject: [PATCH] MDEV-32975 Default charset doesn't work with PHP MySQLi
- extension
-
-When sending the server default collation ID to the client
-in the handshake packet, translate a 2-byte collation ID
-to the ID of the default collation for the character set.
----
- sql/sql_acl.cc | 21 ++++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
---- a/sql/sql_acl.cc
-+++ b/sql/sql_acl.cc
-@@ -13354,8 +13354,27 @@ static bool send_server_handshake_packet
- *end++= 0;
-
- int2store(end, thd->client_capabilities);
-+
-+ CHARSET_INFO *handshake_cs= default_charset_info;
-+ if (handshake_cs->number > 0xFF)
-+ {
-+ /*
-+ A workaround for a 2-byte collation ID: translate it into
-+ the ID of the primary collation of this character set.
-+ */
-+ CHARSET_INFO *cs= get_charset_by_csname(handshake_cs->cs_name.str,
-+ MY_CS_PRIMARY, MYF(MY_WME));
-+ /*
-+ cs should not normally be NULL, however it may be possible
-+ with a dynamic character set incorrectly defined in Index.xml.
-+ For safety let's fallback to latin1 in case cs is NULL.
-+ */
-+ handshake_cs= cs ? cs : &my_charset_latin1;
-+ }
-+
- /* write server characteristics: up to 16 bytes allowed */
-- end[2]= (char) default_charset_info->number;
-+ end[2]= (char) handshake_cs->number;
-+
- int2store(end+3, mpvio->auth_info.thd->server_status);
- int2store(end+5, thd->client_capabilities >> 16);
- end[7]= data_len;
diff --git a/debian/patches/fix-spelling-mariadb.patch b/debian/patches/fix-spelling-mariadb.patch
index 0eb88d3f..5d5265cb 100644
--- a/debian/patches/fix-spelling-mariadb.patch
+++ b/debian/patches/fix-spelling-mariadb.patch
@@ -14,3 +14,77 @@ Subject: [PATCH] Fix misc spelling in MariaDB Server repository
cap = NULL;
} catch (const char *msg) {
htrc(g->Message, msg);
+--- a/extra/mariabackup/innobackupex.cc
++++ b/extra/mariabackup/innobackupex.cc
+@@ -188,7 +188,7 @@ enum innobackupex_options
+ OPT_DATABASES,
+ OPT_DECOMPRESS,
+
+- /* options wich are passed directly to xtrabackup */
++ /* options which are passed directly to xtrabackup */
+ OPT_CLOSE_FILES,
+ OPT_COMPACT,
+ OPT_COMPRESS,
+@@ -447,7 +447,7 @@ static struct my_option ibx_long_options
+ {"startup-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
+ "This option specifies time in seconds that mariadb-backup should wait for "
+ "BACKUP STAGE START to complete. BACKUP STAGE START has to wait until all "
+- "currently running queries using explicite LOCK TABLES has ended. "
++ "currently running queries using explicit LOCK TABLES has ended. "
+ "If there are still such queries when the timeout expires, mariadb-backup "
+ "terminates with an error. Default is 0, in which case mariadb-backup waits "
+ "indefinitely for BACKUP STAGE START to finish",
+--- a/extra/mariabackup/xtrabackup.cc
++++ b/extra/mariabackup/xtrabackup.cc
+@@ -217,7 +217,7 @@ uint xtrabackup_compress = FALSE;
+ uint xtrabackup_compress_threads;
+ ulonglong xtrabackup_compress_chunk_size = 0;
+
+-/* sleep interval beetween log copy iterations in log copying thread
++/* sleep interval between log copy iterations in log copying thread
+ in milliseconds (default is 1 second) */
+ ulint xtrabackup_log_copy_interval = 1000;
+ static ulong max_buf_pool_modified_pct;
+@@ -1597,11 +1597,11 @@ struct my_option xb_client_options[]= {
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"rsync", OPT_RSYNC,
+- "Obsolete depricated option",
++ "Obsolete deprecated option",
+ &ignored_option, &ignored_option, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"no-backup-locks", OPT_NO_BACKUP_LOCKS,
+- "Obsolete depricated option",
++ "Obsolete deprecated option",
+ &ignored_option, &ignored_option, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS,
+@@ -1729,7 +1729,7 @@ struct my_option xb_client_options[]= {
+ {"startup-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
+ "This option specifies time in seconds that mariadb-backup should wait for "
+ "BACKUP STAGE START to complete. BACKUP STAGE START has to wait until all "
+- "currently running queries using explicite LOCK TABLES has ended. "
++ "currently running queries using explicit LOCK TABLES has ended. "
+ "If there are still such queries when the timeout expires, mariadb-backup "
+ "terminates with an error. Default is 0, in which case mariadb-backup waits "
+ "indefinitely for BACKUP STAGE START to finish",
+@@ -5622,7 +5622,7 @@ void CorruptedPages::backup_fix_ddl(ds_c
+ }
+
+ /* Mariabackup doesn't detect any FILE_OP for the deferred
+- tablespace. There is a possiblity that page0 could've
++ tablespace. There is a possibility that page0 could've
+ been corrupted persistently in the disk */
+ for (auto space_name: defer_space_names) {
+ if (!check_if_skip_table(space_name.c_str())) {
+--- a/support-files/mysql.server.sh
++++ b/support-files/mysql.server.sh
+@@ -194,7 +194,7 @@ su_kill() {
+
+ #
+ # Read defaults file from 'basedir'. If there is no defaults file there
+-# check if it's in the old (depricated) place (datadir) and read it from there
++# check if it's in the old (deprecated) place (datadir) and read it from there
+ #
+
+ extra_args=""
diff --git a/debian/patches/hurd-i386-plugin_disks_information_schema_disks.cc.patch b/debian/patches/hurd-i386-plugin_disks_information_schema_disks.cc.patch
new file mode 100644
index 00000000..ca5b669a
--- /dev/null
+++ b/debian/patches/hurd-i386-plugin_disks_information_schema_disks.cc.patch
@@ -0,0 +1,19 @@
+Forwarded: no
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069094
+Author: Svante Signell <svante.signell@gmail.com>
+Subject: Bug#1069094: mariadb: FTBFS on hurd-i386
+
+Define PATH_MAX if not defined.
+
+--- a/plugin/disks/information_schema_disks.cc
++++ b/plugin/disks/information_schema_disks.cc
+@@ -32,6 +32,9 @@
+ #include <sys/mntent.h>
+ #endif
+ #endif
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
+ #include <sql_class.h>
+ #include <sql_i_s.h>
+ #include <sql_acl.h> /* check_global_access() */
diff --git a/debian/patches/hurd-i386-storage_connect_ioapi.h.patch b/debian/patches/hurd-i386-storage_connect_ioapi.h.patch
new file mode 100644
index 00000000..75cd7dfa
--- /dev/null
+++ b/debian/patches/hurd-i386-storage_connect_ioapi.h.patch
@@ -0,0 +1,22 @@
+Forwarded: no
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069094
+Author: Svante Signell <svante.signell@gmail.com>
+Subject: Bug#1069094: mariadb: FTBFS on hurd-i386
+
+Add Hurd to define __USE_FILE_OFFSET64 et al.
+
+--- a/storage/connect/ioapi.h
++++ b/storage/connect/ioapi.h
+@@ -21,9 +21,10 @@
+ #ifndef _ZLIBIOAPI64_H
+ #define _ZLIBIOAPI64_H
+
+-#if defined(__linux__)
++#if defined(__linux__) || defined (__GNU__)
+
+- // Linux needs this to support file operation on files larger then 4+GB
++ // Linux and Hurd needs this to support file operation on files larger
++ // than 4+GB.
+ // But might need better if/def to select just the platforms that needs them.
+
+ #ifndef __USE_FILE_OFFSET64
diff --git a/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch b/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch
index 1034f8c6..eeb91cc7 100644
--- a/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch
+++ b/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] cmake: add support for reproducible buildS
We can use target without breaking reproducibility.
--- a/storage/mroonga/CMakeLists.txt
+++ b/storage/mroonga/CMakeLists.txt
-@@ -209,7 +209,7 @@ set(MYSQL_INCLUDE_DIRS
+@@ -214,7 +214,7 @@ set(MYSQL_INCLUDE_DIRS
if(MRN_BUNDLED)
set(MYSQL_PLUGIN_DIR "${INSTALL_PLUGINDIR}")
@@ -18,7 +18,7 @@ Subject: [PATCH] cmake: add support for reproducible buildS
set(MYSQL_CFLAGS "${CMAKE_C_FLAGS}")
set(MYSQL_VERSION "${MYSQL_BASE_VERSION}")
else()
-@@ -248,15 +248,11 @@ endif()
+@@ -253,15 +253,11 @@ endif()
if(MRN_GROONGA_BUNDLED)
set(GROONGA_INCLUDE_DIRS "${MRN_BUNDLED_GROONGA_DIR}/include")
diff --git a/debian/patches/series b/debian/patches/series
index 69ef5c47..d1a6925a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,15 +4,11 @@ env-perl-usr-bin-perl.patch
fix-spelling-rocksdb.patch
fix-reproducible-builds-rocksdb.patch
mroonga-mrn-lib-dirs-path-reproducible-build.patch
-2129-new-script-wsrep-sst-backup-fixes.patch
2541-fix-stack-overflow-in-pinbox-allocator.patch
fix-spelling-libmariadb.patch
-2980-riscv-use-rdtime.patch
install-files-into-usr.patch
1006531-hurd-no-auth-socket.patch
-3039-os-data-file-no-o-direct.patch
-1063738-revert-c432c9ef.patch
-MDEV-32975-chartset-collation-fix-php.patch
startup-message.patch
fix-spelling-mariadb.patch
-3154-openssl-alert-protocol-string.patch
+hurd-i386-plugin_disks_information_schema_disks.cc.patch
+hurd-i386-storage_connect_ioapi.h.patch
diff --git a/debian/patches/startup-message.patch b/debian/patches/startup-message.patch
index 27b86b3d..6b8bbce7 100644
--- a/debian/patches/startup-message.patch
+++ b/debian/patches/startup-message.patch
@@ -27,7 +27,7 @@ Server output if build in git directory:
--- a/client/mysql.cc
+++ b/client/mysql.cc
-@@ -1326,6 +1326,9 @@ int main(int argc,char *argv[])
+@@ -1328,6 +1328,9 @@ int main(int argc,char *argv[])
mysql_thread_id(&mysql), server_version_string(&mysql));
put_info((char*) glob_buffer.ptr(),INFO_INFO);
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
@@ -39,16 +39,16 @@ Server output if build in git directory:
#ifdef HAVE_READLINE
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
-@@ -4983,12 +4983,21 @@ static int init_server_components()
- proc_info_hook= set_thd_stage_info;
+@@ -4985,12 +4985,21 @@ static int init_server_components()
+ my_sleep_for_space= mariadb_sleep_for_space;
/*
-- Print source revision hash, as one of the first lines, if not the
-- first in error log, for troubleshooting and debugging purposes
-+ Print source revision hash, if set, for troubleshooting and debugging
-+ purposes. If not, suggest database adming to help project by giving a
-+ star on GitHub.
-  */
+- Print source revision hash, as one of the first lines, if not the
+- first in error log, for troubleshooting and debugging purposes
++ Print source revision hash, if set, for troubleshooting and debugging
++ purposes. If not, suggest database adming to help project by giving a
++ star on GitHub.
+ */
- if (!opt_help)
- sql_print_information("Starting MariaDB %s source revision %s as process %lu",
- server_version, SOURCE_REVISION, (ulong) getpid());
diff --git a/debian/po/sw.po b/debian/po/sw.po
new file mode 100644
index 00000000..ec5d48e3
--- /dev/null
+++ b/debian/po/sw.po
@@ -0,0 +1,110 @@
+# Translation of mariadb debconf templates to Swahili
+# Copyright (C) 2023, MariaDB authors.
+# This file is distributed under the same license as the mariadb packages.
+#
+# Translators:
+# Nicholas Othieno <nothieno@amazon.com>, 2023.
+msgid ""
+msgstr ""
+"Project-Id-Version: mariadb\n"
+"Report-Msgid-Bugs-To: mariadb@packages.debian.org\n"
+"POT-Creation-Date: 2019-07-23 19:16-0300\n"
+"PO-Revision-Date: 2023-06-16 18:32-0400\n"
+"Last-Translator: Nicholas Othieno <nothieno@amazon.com>\n"
+"Language-Team: Swahili <(nothing)>\n"
+"Language: sw\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"debian.org>\n"
+"X-Generator: Poedit 3.2.2\n"
+"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#. Type: note
+#. Description
+#: ../mariadb-server.templates:2001
+msgid "The old data directory will be saved at new location"
+msgstr "Saraka la zamani la data itahifadhiwa kwenye eneo jipya"
+
+#. Type: note
+#. Description
+#: ../mariadb-server.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 "
+"upgraded (or downgraded)."
+msgstr ""
+"Faili linaloitwa /var/lib/mysql/debian-*.flag lipo katika mfumo huu. Namba "
+"inaonyesha toleo la umbizo wa mfumo wa jozi la hifadhidata ambalo haliwezi "
+"kuboreshwa (au kushushwa) kiotomatiki."
+
+#. Type: note
+#. Description
+#: ../mariadb-server.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."
+msgstr ""
+"Hivyo basi saraka la zamani la data litapewa jina jipya kuwa /var/lib/mysql-* "
+"na saraka jipya la data litaanzishwa kwenye /var/lib/mysql."
+
+#. Type: note
+#. Description
+#: ../mariadb-server.templates:2001
+msgid ""
+"Please manually export/import your data (e.g. with mysqldump) if needed."
+msgstr ""
+"Tafadhali peleka/ingiza data yako kwa mkono (kwa mfano kwa kutumia mysqldump) ikiwa inahitajika."
+
+#. Type: note
+#. Description
+#: ../mariadb-server.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Ujumbe muhimu kwa watumiaji wa NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mariadb-server.templates:3001
+msgid ""
+"Using MariaDB under NIS/YP requires a mysql user account to be added on the "
+"local system with:"
+msgstr ""
+"Kutumia MariaDB chini ya NIS/YP inahitaji akaunti ya mtumiaji wa mysql kuongezwa "
+"katika mfumo wa ndani na:"
+
+#. Type: note
+#. Description
+#: ../mariadb-server.templates:3001
+msgid ""
+"You should also check the permissions and ownership of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Unapaswa pia kukagua ruhusa na umiliki wa saraka la /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mariadb-server.templates:4001
+msgid "Remove all MariaDB databases?"
+msgstr "Ondoa hifadhidata zote za MariaDB?"
+
+#. Type: boolean
+#. Description
+#: ../mariadb-server.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MariaDB databases is about "
+"to be removed."
+msgstr ""
+"Eneo la /var/lib/mysql ambalo lina hifadhidata za MariaDB linakaribia "
+"kuondolewa."
+
+#. Type: boolean
+#. Description
+#: ../mariadb-server.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, "
+"the data should be kept."
+msgstr ""
+"Ikiwa unatoa kifurushi cha MariaDB ili kusakinisha toleo jipya zaidi baadaye "
+"au ikiwa kifurushi tofauti cha mariadb-server tayari inaitumia data, data "
+"inapaswa kuwekwa." \ No newline at end of file
diff --git a/debian/rules b/debian/rules
index 45c74f74..94eb814f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -80,10 +80,10 @@ override_dh_auto_clean:
rm -rf storage/columnstore
# Delete precompiled binaries in upstream sources to ensure they are not used in Debian
rm -rf storage/connect/JavaWrappers.jar storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2
-
+
# Update po-files when clean runs before each build
debconf-updatepo
-
+
# Clean up files created by custom sections in build that 'dh clean' does not see automatically
rm -rf debian/mariadb-server.*.socket debian/substvars
@@ -122,6 +122,7 @@ endif
-DIGNORE_AIO_CHECK=ON \
-DWITH_URING=ON \
-DWITH_INNODB_SNAPPY=ON \
+ -DHAVE_SYSTEM_LIBFMT_EXITCODE=0 \
-DDEB=$(DEB_VENDOR)
# This is needed, otherwise 'make test' will run before binaries have been built
@@ -204,8 +205,17 @@ override_dh_auto_install:
# Move test plugins that are only needed by the client to the libmariadb path
mv -v $(TMP)/usr/lib/mysql/plugin/qa_auth_client.so $(TMP)/usr/lib/$(DEB_HOST_MULTIARCH)/libmariadb3/plugin/
+# Define name used for service, and install mariadb.service on Linux only
override_dh_installsystemd:
+ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS)))
dh_installsystemd -pmariadb-server mariadb.service
+endif
+
+# Change dh_missing from fail to list on non-Linux
+override_dh_missing:
+ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS)))
+ dh_missing --list-missing
+endif
override_dh_installinit-arch:
dh_installinit --name=mariadb
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
index ca2c14b1..f699166c 100644
--- a/debian/salsa-ci.yml
+++ b/debian/salsa-ci.yml
@@ -60,7 +60,12 @@ packaging-fix-checks:
stage: provisioning
image: debian:sid-slim
script:
- - apt-get update -qq && apt-get -qq install --no-install-recommends --yes git devscripts python3-debian shellcheck make lsb-release
+ - apt-get update -qq && apt-get -qq install --no-install-recommends --yes git devscripts python3-debian shellcheck make lsb-release dh-debputy python3-pygls
+ # Check debian/* for typical errors. Don't check spelling as there are too
+ # many false positives and anyway spelling issues are level 'pedantic' in
+ # Debputy and do not emit an exit code, so wouldn't show up as failure in CI
+ # anyway.
+ - debputy lint
- |
if [ "$(find debian/patches/ -type f -not -name series | wc -l)" -eq "$(cat debian/patches/series | wc -l)" ]
then
@@ -74,15 +79,15 @@ packaging-fix-checks:
exit 1
fi
- |
- wrap-and-sort -a
+ wrap-and-sort -ast
git checkout debian/tests/control # Revert touching this file, wrap-and-sort shouldn't do it
if [ "$(git diff --name-only | wc -l)" -eq 0 ]
then
- echo "No uncommitted changes after 'wrap-and-sort -av', maintainer has done good job keeping files in order."
+ echo "No uncommitted changes after 'wrap-and-sort -ast', maintainer has done good job keeping files in order."
else
git diff
echo
- echo "Debian packaging files are unordered! Please run 'wrap-and-sort -av'."
+ echo "Debian packaging files are unordered! Please run 'wrap-and-sort -vast'."
exit 1
fi
# Print syntax errors if found, otherwise continue silently
@@ -99,6 +104,21 @@ packaging-fix-checks:
test-crossbuild-arm64:
stage: build
+ # Cross-builds allowed to fail by default in Salsa-CI
+
+test-crossbuild-armhf:
+ stage: build
+ extends: .test-crossbuild-package-arm64
+ variables:
+ HOST_ARCH: armhf
+ allow_failure: true # Cross-builds seem to fail frequently due to unclear reasons
+
+test-crossbuild-armel:
+ stage: build
+ extends: .test-crossbuild-package-arm64
+ variables:
+ HOST_ARCH: armel
+ allow_failure: true # Cross-builds seem to fail frequently due to unclear reasons
autopkgtest:
extends: .test-autopkgtest
@@ -142,6 +162,13 @@ blhc:
curl -sS -O https://snapshot.debian.org/archive/debian/20220507T034236Z/pool/main/o/openssl/libssl1.1_1.1.1o-1_amd64.deb
apt-get -qq install --no-install-recommends --yes ./libssl1.1_1.1.1o-1_amd64.deb
+# Package libaio1 was replaced by libaio1t64 in Debian Sid in April 2024. To
+# continue installing old MariaDB versions that depend on libaio1, use libaio1
+# from snapshots.
+.test-install-libaio-in-sid-for-backwards-compat: &test-install-libaio-in-sid-for-backwards-compat |
+ curl -sS -O https://snapshot.debian.org/archive/debian/20240331T210805Z/pool/main/liba/libaio/libaio1_0.3.113-5_amd64.deb
+ apt-get -qq install --no-install-recommends --yes ./libaio1_0.3.113-5_amd64.deb
+
.test-verify-initial: &test-verify-initial |
dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
# MariaDB until 10.5 only had 'mysql', and since only 'mariadb', so try both
@@ -918,6 +945,7 @@ mariadb.org-10.4 upgrade:
script:
- *test-install-readline-in-sid-for-backwards-compat
- *test-install-openssl1-in-sid-for-backwards-compat
+ - *test-install-libaio-in-sid-for-backwards-compat
- apt-get install -qq --yes mariadb-server-10.4
# MariaDB.org version of 10.4 and early 10.5 do not install an init file, so
# it must be installed here manually
@@ -938,6 +966,7 @@ mariadb.org-10.3 upgrade:
script:
- *test-install-readline-in-sid-for-backwards-compat
- *test-install-openssl1-in-sid-for-backwards-compat
+ - *test-install-libaio-in-sid-for-backwards-compat
- apt-get install -qq --yes mariadb-server-10.3
- *test-verify-initial
- *test-install-all
@@ -958,6 +987,7 @@ mariadb.org-10.2 upgrade:
script:
- *test-install-readline-in-sid-for-backwards-compat
- *test-install-openssl1-in-sid-for-backwards-compat
+ - *test-install-libaio-in-sid-for-backwards-compat
- apt-get install -qq --yes mariadb-server-10.2
# Verify initial state before upgrade
- dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
index 72674895..edf48ebc 100644
--- a/debian/source/lintian-overrides
+++ b/debian/source/lintian-overrides
@@ -20,14 +20,12 @@ very-long-line-length-in-source-file * [*.cproject:*]
very-long-line-length-in-source-file * [*.launch:*]
very-long-line-length-in-source-file * [*.md:*]
very-long-line-length-in-source-file * [*.scfg:*]
-very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/configure.ac:*]
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/ssl.h:*]
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/types.h:*]
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/wolfio.h:*]
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/doc/formats/html/html_changes/tabs.css:*]
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/test/test_wolfssl.c:*]
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/IDE/IAR-MSP430/main.c:*]
-very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/README:*]
# Preprocessed C files which have long lines
very-long-line-length-in-source-file * [extra/wolfssl/wolfssl/wolfcrypt/src/*.i:*]
# These are all results for test cases and similar so they can be
diff --git a/debian/tests/control b/debian/tests/control
index d91e3b11..2a8c23a5 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,20 +1,21 @@
Tests: configuration-tracing
-Depends: mariadb-server, diffutils
+Depends:
+ diffutils,
+ mariadb-server,
Restrictions: allow-stderr needs-root
Tests: smoke
-# RocksDB is not built for all archs. Rather than duplicating the condition
-# for its existence (see the list in debian/control), install it if available
-# and check in the test if it's functional when it should be.
-# The plugin package also already depends on the other one.
-Depends: mariadb-plugin-rocksdb | mariadb-server,
- mariadb-plugin-provider-bzip2,
- mariadb-plugin-provider-lz4,
- mariadb-plugin-provider-lzma,
- mariadb-plugin-provider-lzo,
- mariadb-plugin-provider-snappy
+Depends:
+ mariadb-plugin-provider-bzip2,
+ mariadb-plugin-provider-lz4,
+ mariadb-plugin-provider-lzma,
+ mariadb-plugin-provider-lzo,
+ mariadb-plugin-provider-snappy,
+ mariadb-plugin-rocksdb [amd64 arm64 mips64el ppc64el riscv64],
Restrictions: allow-stderr needs-root isolation-container
Tests: upstream
-Depends: mariadb-test, eatmydata
+Depends:
+ eatmydata,
+ mariadb-test,
Restrictions: allow-stderr breaks-testbed
diff --git a/debian/tests/traces/mariadb-verbose-help.expected b/debian/tests/traces/mariadb-verbose-help.expected
index 015a0430..2c81bd35 100644
--- a/debian/tests/traces/mariadb-verbose-help.expected
+++ b/debian/tests/traces/mariadb-verbose-help.expected
@@ -19,8 +19,7 @@ The following specify which files/extra groups are read (specified before remain
Abort 'source filename' operations in case of errors
--auto-rehash Enable automatic rehashing. One doesn't need to use
'rehash' to get table and field completion, but startup
- and reconnecting may take a longer time. Disable with
- --disable-auto-rehash.
+ and reconnecting may take a longer time.
(Defaults to on; use --skip-auto-rehash to disable.)
-A, --no-auto-rehash
No automatic rehashing. One has to use 'rehash' to get
@@ -32,27 +31,61 @@ The following specify which files/extra groups are read (specified before remain
-B, --batch Don't use history file. Disable interactive behavior.
(Enables --silent.)
--binary-as-hex Print binary data as hex
+ --binary-mode Binary mode allows certain character sequences to be
+ processed as data that would otherwise be treated with a
+ special meaning by the parser. Specifically, this switch
+ turns off parsing of all client commands except \C and
+ DELIMITER in non-interactive mode (i.e., when binary mode
+ is combined with either 1) piped input, 2) the --batch
+ mysql option, or 3) the 'source' command). Also, in
+ binary mode, occurrences of '\r\n' and ASCII '\0' are
+ preserved within strings, whereas by default, '\r\n' is
+ translated to '\n' and '\0' is disallowed in user input.
--character-sets-dir=name
Directory for character set files.
+ --column-names Write column names in results.
+ (Defaults to on; use --skip-column-names to disable.)
+ -N, --skip-column-names
+ Don't write column names in results.
--column-type-info Display column type information.
-c, --comments Preserve comments. Send comments to the server. The
default is --skip-comments (discard comments), enable
with --comments.
-C, --compress Use compression in server/client protocol.
+ --connect-expired-password
+ Notify the server that this client is prepared to handle
+ expired password sandbox mode even if --batch was
+ specified.
+ --connect-timeout=# Number of seconds before connection timeout.
+ -D, --database=name Database to use.
-#, --debug[=#] This is a non-debug version. Catch this and exit.
--debug-check Check memory and open file usage at exit.
-T, --debug-info Print some debug info at exit.
- -D, --database=name Database to use.
+ --default-auth=name Default authentication client-side plugin to use.
--default-character-set=name
Set the default character set.
--delimiter=name Delimiter to be used.
- -e, --execute=name Execute command and quit. (Disables --force and history
- file.)
--enable-cleartext-plugin
Obsolete option. Exists only for MySQL compatibility.
- -E, --vertical Print the output of a query (rows) vertically.
+ -e, --execute=name Execute command and quit. (Disables --force and history
+ file.)
-f, --force Continue even if we get an SQL error. Sets
abort-source-on-error to 0
+ -h, --host=name Connect to host.
+ -H, --html Produce HTML output.
+ -i, --ignore-spaces Ignore space after function names.
+ --init-command=name SQL Command to execute when connecting to MariaDB server.
+ Will automatically be re-executed when reconnecting.
+ --line-numbers Write line numbers for errors.
+ (Defaults to on; use --skip-line-numbers to disable.)
+ -L, --skip-line-numbers
+ Don't write line number for errors.
+ --local-infile Enable LOAD DATA LOCAL INFILE.
+ --max-allowed-packet=#
+ The maximum packet length to send to or receive from
+ server.
+ --max-join-size=# Automatic limit for rows in a join when using
+ --safe-updates.
-G, --named-commands
Enable named commands. Named commands mean this program's
internal commands; see mysql> help . When enabled, the
@@ -60,24 +93,9 @@ The following specify which files/extra groups are read (specified before remain
otherwise only from the first line, before an enter.
Disable with --disable-named-commands. This option is
disabled by default.
- -i, --ignore-spaces Ignore space after function names.
- --init-command=name SQL Command to execute when connecting to MariaDB server.
- Will automatically be re-executed when reconnecting.
- --local-infile Enable/disable LOAD DATA LOCAL INFILE.
+ --net-buffer-length=#
+ The buffer size for TCP/IP and socket communication.
-b, --no-beep Turn off beep on error.
- -h, --host=name Connect to host.
- -H, --html Produce HTML output.
- -X, --xml Produce XML output.
- --line-numbers Write line numbers for errors.
- (Defaults to on; use --skip-line-numbers to disable.)
- -L, --skip-line-numbers
- Don't write line number for errors.
- -n, --unbuffered Flush buffer after each query.
- --column-names Write column names in results.
- (Defaults to on; use --skip-column-names to disable.)
- -N, --skip-column-names
- Don't write column names in results.
- --sigint-ignore Ignore SIGINT (CTRL-C).
-o, --one-database Ignore statements except those that occur while the
default database is the one named at the command line.
--pager[=name] Pager to use to display results. If you don't supply an
@@ -89,6 +107,7 @@ The following specify which files/extra groups are read (specified before remain
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
+ --plugin-dir=name Directory for client-side plugins.
-P, --port=# Port number to use for connection or 0 for default to, in
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/services, built-in default (3306).
@@ -101,9 +120,18 @@ The following specify which files/extra groups are read (specified before remain
down the server if the output is suspended. Doesn't use
history file.
-r, --raw Write fields without conversion. Used with --batch.
- --reconnect Reconnect if the connection is lost. Disable with
- --disable-reconnect. This option is enabled by default.
+ --reconnect Reconnect if the connection is lost.
(Defaults to on; use --skip-reconnect to disable.)
+ -U, --safe-updates Only allow UPDATE and DELETE that uses keys.
+ -U, --i-am-a-dummy Synonym for option --safe-updates, -U.
+ --sandbox Disallow commands that access the file system (except \P
+ without an argument and \e).
+ --secure-auth Refuse client connecting to server if it uses old
+ (pre-4.1.1) protocol.
+ --select-limit=# Automatic limit for SELECT when using --safe-updates.
+ --server-arg=name Send embedded server this as a parameter.
+ --show-warnings Show warnings after every statement.
+ --sigint-ignore Ignore SIGINT (CTRL-C).
-s, --silent Be more silent. Print results with a tab as separator,
each row on new line.
-S, --socket=name The socket file to use for connection.
@@ -127,41 +155,13 @@ The following specify which files/extra groups are read (specified before remain
--tee=name Append everything into outfile. See interactive help (\h)
also. Does not work in batch mode. Disable with
--disable-tee. This option is disabled by default.
+ -n, --unbuffered Flush buffer after each query.
-u, --user=name User for login if not current user.
- -U, --safe-updates Only allow UPDATE and DELETE that uses keys.
- -U, --i-am-a-dummy Synonym for option --safe-updates, -U.
-v, --verbose Write more. (-v -v -v gives the table output format).
-V, --version Output version information and exit.
+ -E, --vertical Print the output of a query (rows) vertically.
-w, --wait Wait and retry if connection is down.
- --connect-timeout=# Number of seconds before connection timeout.
- --max-allowed-packet=#
- The maximum packet length to send to or receive from
- server.
- --net-buffer-length=#
- The buffer size for TCP/IP and socket communication.
- --select-limit=# Automatic limit for SELECT when using --safe-updates.
- --max-join-size=# Automatic limit for rows in a join when using
- --safe-updates.
- --secure-auth Refuse client connecting to server if it uses old
- (pre-4.1.1) protocol.
- --server-arg=name Send embedded server this as a parameter.
- --show-warnings Show warnings after every statement.
- --plugin-dir=name Directory for client-side plugins.
- --default-auth=name Default authentication client-side plugin to use.
- --binary-mode Binary mode allows certain character sequences to be
- processed as data that would otherwise be treated with a
- special meaning by the parser. Specifically, this switch
- turns off parsing of all client commands except \C and
- DELIMITER in non-interactive mode (i.e., when binary mode
- is combined with either 1) piped input, 2) the --batch
- mysql option, or 3) the 'source' command). Also, in
- binary mode, occurrences of '\r\n' and ASCII '\0' are
- preserved within strings, whereas by default, '\r\n' is
- translated to '\n' and '\0' is disallowed in user input.
- --connect-expired-password
- Notify the server that this client is prepared to handle
- expired password sandbox mode even if --batch was
- specified.
+ -X, --xml Produce XML output.
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
@@ -170,29 +170,33 @@ abort-source-on-error FALSE
auto-rehash TRUE
auto-vertical-output FALSE
binary-as-hex FALSE
+binary-mode FALSE
character-sets-dir (No default value)
+column-names TRUE
column-type-info FALSE
comments FALSE
compress FALSE
+connect-expired-password FALSE
+connect-timeout 0
+database (No default value)
debug-check FALSE
debug-info FALSE
-database (No default value)
+default-auth (No default value)
default-character-set auto
delimiter ;
-vertical FALSE
force FALSE
-named-commands FALSE
+host (No default value)
+html FALSE
ignore-spaces FALSE
init-command (No default value)
+line-numbers TRUE
local-infile FALSE
+max-allowed-packet 16777216
+max-join-size 1000000
+named-commands FALSE
+net-buffer-length 16384
no-beep FALSE
-host (No default value)
-html FALSE
-xml FALSE
-line-numbers TRUE
-unbuffered FALSE
-column-names TRUE
-sigint-ignore FALSE
+plugin-dir (No default value)
port 0
progress-reports TRUE
prompt \N [\d]>
@@ -200,6 +204,13 @@ protocol
quick FALSE
raw FALSE
reconnect TRUE
+safe-updates FALSE
+i-am-a-dummy FALSE
+sandbox FALSE
+secure-auth FALSE
+select-limit 1000
+show-warnings FALSE
+sigint-ignore FALSE
socket /run/mysqld/mysqld.sock
ssl TRUE
ssl-ca (No default value)
@@ -212,17 +223,7 @@ ssl-crlpath (No default value)
tls-version (No default value)
ssl-verify-server-cert FALSE
table FALSE
+unbuffered FALSE
user (No default value)
-safe-updates FALSE
-i-am-a-dummy FALSE
-connect-timeout 0
-max-allowed-packet 16777216
-net-buffer-length 16384
-select-limit 1000
-max-join-size 1000000
-secure-auth FALSE
-show-warnings FALSE
-plugin-dir (No default value)
-default-auth (No default value)
-binary-mode FALSE
-connect-expired-password FALSE
+vertical FALSE
+xml FALSE
diff --git a/debian/tests/traces/mariadbd-verbose-help.expected b/debian/tests/traces/mariadbd-verbose-help.expected
index 601e8828..1c0f4be9 100644
--- a/debian/tests/traces/mariadbd-verbose-help.expected
+++ b/debian/tests/traces/mariadbd-verbose-help.expected
@@ -886,6 +886,9 @@ The following specify which files/extra groups are read (specified before remain
Redo log size in bytes.
--innodb-log-group-home-dir=name
Path to ib_logfile0
+ --innodb-log-spin-wait-delay[=#]
+ Delay between log buffer spin lock polls (0 to use a
+ blocking latch)
--innodb-lru-flush-size=#
How many pages to flush on LRU eviction
--innodb-lru-scan-depth=#
@@ -964,6 +967,8 @@ The following specify which files/extra groups are read (specified before remain
--innodb-rollback-on-timeout
Roll back the complete transaction on lock wait timeout,
for 4.x compatibility (disabled by default)
+ --innodb-snapshot-isolation
+ Use snapshot isolation (write-write conflict detection).
--innodb-sort-buffer-size=#
Memory buffer size for index creation
--innodb-spin-wait-delay[=#]
@@ -1426,13 +1431,17 @@ The following specify which files/extra groups are read (specified before remain
max_connections*5 or max_connections + table_cache*2
(whichever is larger) number of file descriptors
(Automatically configured unless set explicitly)
- --optimizer-adjust-secondary-key-costs=#
- 0 = No changes. 1 = Update secondary key costs for ranges
- to be at least 5x of clustered primary key costs. 2 =
- Remove 'max_seek optimization' for secondary keys and
- slight adjustment of filter cost. This option will be
- deleted in MariaDB 11.0 as it is not needed with the new
- 11.0 optimizer.
+ --optimizer-adjust-secondary-key-costs=name
+ A bit field with the following values:
+ adjust_secondary_key_cost = Update secondary key costs
+ for ranges to be at least 5x of clustered primary key
+ costs. disable_max_seek = Disable 'max_seek optimization'
+ for secondary keys and slight adjustment of filter cost.
+ disable_forced_index_in_group_by = Disable automatic
+ forced index in GROUP BY. This variable will be deleted
+ in MariaDB 11.0 as it is not needed with the new 11.0
+ optimizer.
+ Use 'ALL' to set all combinations.
--optimizer-extra-pruning-depth=#
If the optimizer needs to enumerate join prefix of this
size or larger, then it will try aggressively prune away
@@ -1479,7 +1488,7 @@ The following specify which files/extra groups are read (specified before remain
extended_keys, exists_to_in, orderby_uses_equalities,
condition_pushdown_for_derived, split_materialized,
condition_pushdown_for_subquery, rowid_filter,
- condition_pushdown_from_having, not_null_range_scan,
+ condition_pushdown_from_having, not_null_range_scan,
hash_join_cardinality, cset_narrowing
--optimizer-trace=name
Controls tracing of the Optimizer:
@@ -2658,6 +2667,7 @@ innodb-log-buffer-size 16777216
innodb-log-file-buffering FALSE
innodb-log-file-size 100663296
innodb-log-group-home-dir (No default value)
+innodb-log-spin-wait-delay 0
innodb-lru-flush-size 32
innodb-lru-scan-depth 1536
innodb-max-dirty-pages-pct 90
@@ -2689,6 +2699,7 @@ innodb-read-io-threads 4
innodb-read-only FALSE
innodb-read-only-compressed FALSE
innodb-rollback-on-timeout FALSE
+innodb-snapshot-isolation FALSE
innodb-sort-buffer-size 1048576
innodb-spin-wait-delay 4
innodb-stats-auto-recalc TRUE
@@ -2829,7 +2840,7 @@ old-mode UTF8_IS_UTF8MB3
old-passwords FALSE
old-style-user-limits FALSE
open-files-limit 32000
-optimizer-adjust-secondary-key-costs 0
+optimizer-adjust-secondary-key-costs
optimizer-extra-pruning-depth 8
optimizer-max-sel-arg-weight 32000
optimizer-max-sel-args 16000
@@ -2979,7 +2990,7 @@ slave-run-triggers-for-rbr NO
slave-skip-errors OFF
slave-sql-verify-checksum TRUE
slave-transaction-retries 10
-slave-transaction-retry-errors 1158,1159,1160,1161,1205,1213,1429,2013,12701
+slave-transaction-retry-errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701
slave-transaction-retry-interval 0
slave-type-conversions
slow-launch-time 2
diff --git a/debian/tests/upstream b/debian/tests/upstream
index a348e154..6dc864d3 100644
--- a/debian/tests/upstream
+++ b/debian/tests/upstream
@@ -45,14 +45,6 @@ main.mysqld--help : For unknown reason table-cache is 4000 instead of default 42
EOF
fi
-if [ "$ARCH" = "s390x" ]
-then
- echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> "$MTR_SKIP_TEST_LIST"
-elif [ "$ARCH" = "armhf" ] || [ "$ARCH" = "i386" ]
-then
- echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> "$MTR_SKIP_TEST_LIST"
-fi
-
# Store skipped test list in artifacts so it can be viewed while debugging
# failed autopkgtest runs
cp -v "$MTR_SKIP_TEST_LIST" "$AUTOPKGTEST_ARTIFACTS"
diff --git a/debian/unstable-tests.armhf b/debian/unstable-tests.armhf
index 3974b331..11bf8337 100644
--- a/debian/unstable-tests.armhf
+++ b/debian/unstable-tests.armhf
@@ -1,7 +1,21 @@
+# MDEV-33381: The full test suite (including --big-test) has numerous failures
+# on armhf and a Raspberry Pi enthusiast is needed to debug them
+federated.federatedx_versioning : MDEV-33381
+index_intersect_innodb : MDEV-23921
+main.index_intersect : MDEV-23921
+main.join_cache_notasan : MDEV-34084
main.table_value_constr : MDEV-33520
main.xml : MDEV-21968
maria.maria-purge : MDEV-31349
+mariabackup.encrypted_page_corruption : Not reported upstream yet
+period.versioning : MDEV-33381
+spider.basic_sql : MDEV-33381
+spider.spider_fixes_part : MDEV-33381
+spider/bg.basic_sql : MDEV-33381
+spider/bg.spider_fixes_part : MDEV-33381
type_test.type_test_double : MDEV-22243, but wasn't actually fixed yet
unit.conc_connection : CONC-640: unit.conc_connection fails on test_conc21
-# The full test suite (including --big-test) has numerous failures on armhf and
-# MariaDB is in desperate need of a Raspberry PI enthusiast to analyze them
+versioning.autoinc : MDEV-33381
+versioning.online : MDEV-33381
+versioning.partition : MDEV-33381
+versioning.trx_id : MDEV-33381
diff --git a/debian/unstable-tests.hppa b/debian/unstable-tests.hppa
index 3fa55709..d273b15e 100644
--- a/debian/unstable-tests.hppa
+++ b/debian/unstable-tests.hppa
@@ -1,3 +1,4 @@
+index_intersect_innodb : MDEV-23921
main.analyze_engine_stats : MDEV-32375
main.analyze_stmt_orderby : MDEV-32375
main.analyze_stmt_slow_query_log : MDEV-12237
@@ -6,8 +7,10 @@ main.derived_split_innodb : MDEV-32375
main.explain_json_format_partitions : MDEV-32375
main.func_json_notembedded : MDEV-27955 / MDEV-30518 / https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006529 (timeout)
main.index_intersect : MDEV-23921
+main.index_intersect : MDEV-23921
main.index_intersect_innodb : MDEV-23921
main.join_cache_notasan : MDEV-31893 (fixed but perhaps not for hppa)
+main.join_cache_notasan : MDEV-34084
main.rowid_filter_innodb : MDEV-32375
main.table_value_constr : MDEV-33520
maria.maria-purge : MDEV-31349
diff --git a/debian/unstable-tests.hurd-i386 b/debian/unstable-tests.hurd-i386
new file mode 120000
index 00000000..32dbff60
--- /dev/null
+++ b/debian/unstable-tests.hurd-i386
@@ -0,0 +1 @@
+unstable-tests.hurd \ No newline at end of file
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 5021128e..06dc8900 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -13,7 +13,7 @@
# 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 ${ZLIB_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${ZLIB_INCLUDE_DIRS})
# Default install component for the files is Server here
SET(MYSQL_INSTALL_COMPONENT Server)
diff --git a/extra/mariabackup/CMakeLists.txt b/extra/mariabackup/CMakeLists.txt
index f1c9dca7..63ac8cf3 100644
--- a/extra/mariabackup/CMakeLists.txt
+++ b/extra/mariabackup/CMakeLists.txt
@@ -31,6 +31,7 @@ ENDIF()
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/storage/maria
${CMAKE_CURRENT_SOURCE_DIR}/quicklz
${CMAKE_CURRENT_SOURCE_DIR}
)
@@ -49,14 +50,9 @@ ADD_DEFINITIONS(-UMYSQL_SERVER)
ADD_DEFINITIONS(-DPCRE_STATIC=1)
ADD_DEFINITIONS(${SSL_DEFINES})
-IF(PMEM_FOUND)
- ADD_COMPILE_FLAGS(xtrabackup.cc COMPILE_FLAGS "-DHAVE_PMEM")
-ENDIF()
-
MYSQL_ADD_EXECUTABLE(mariadb-backup
xtrabackup.cc
innobackupex.cc
- changed_page_bitmap.cc
datasink.cc
ds_buffer.cc
ds_compress.cc
@@ -72,8 +68,12 @@ MYSQL_ADD_EXECUTABLE(mariadb-backup
xbstream_write.cc
backup_mysql.cc
backup_copy.cc
- xb_plugin.cc
+ encryption_plugin.cc
${PROJECT_BINARY_DIR}/sql/sql_builtin.cc
+ aria_backup_client.cc
+ thread_pool.cc
+ ddl_log.cc
+ common_engine.cc
${PROJECT_SOURCE_DIR}/sql/net_serv.cc
${PROJECT_SOURCE_DIR}/libmysqld/libmysql.c
COMPONENT backup
@@ -82,7 +82,8 @@ MYSQL_ADD_EXECUTABLE(mariadb-backup
# Export all symbols on Unix, for better crash callstacks
SET_TARGET_PROPERTIES(mariadb-backup PROPERTIES ENABLE_EXPORTS TRUE)
-TARGET_LINK_LIBRARIES(mariadb-backup sql sql_builtins)
+TARGET_LINK_LIBRARIES(mariadb-backup sql sql_builtins aria)
+
IF(NOT HAVE_SYSTEM_REGEX)
TARGET_LINK_LIBRARIES(mariadb-backup pcre2-posix)
ENDIF()
diff --git a/extra/mariabackup/aria_backup_client.cc b/extra/mariabackup/aria_backup_client.cc
new file mode 100644
index 00000000..25468148
--- /dev/null
+++ b/extra/mariabackup/aria_backup_client.cc
@@ -0,0 +1,1016 @@
+#include <my_global.h>
+#include <m_string.h>
+extern "C" {
+#include "maria_def.h"
+}
+#undef LSN_MAX
+#include "aria_backup_client.h"
+#include "backup_copy.h"
+#include "common.h"
+#include "sql_table.h"
+#include "ma_checkpoint.h"
+#include "ma_recovery.h"
+#include "backup_debug.h"
+#include "aria_backup.h"
+#include <thread>
+#include <string>
+#include <vector>
+#include <memory>
+#include <limits>
+#include <unordered_map>
+#include <atomic>
+#include <utility>
+#include <sstream>
+#include <iomanip>
+#include <cstdlib>
+
+namespace aria {
+
+const char *log_preffix = "aria_log.";
+
+
+static std::string log_file_name_only(size_t log_num) {
+ std::string log_file;
+ {
+ std::stringstream ss;
+ ss << std::setw(8) << std::setfill('0') << log_num;
+ log_file.append(log_preffix).append(ss.str());
+ }
+ return log_file;
+}
+
+
+static std::string log_file_name(const char *datadir_path, size_t log_num) {
+ std::string log_file(datadir_path);
+ return log_file.append("/").append(log_file_name_only(log_num));
+}
+
+
+class LogFileCollection
+{
+ uint32 m_first;
+ uint32 m_count;
+public:
+ uint32 first() const { return m_first; }
+ uint32 count() const { return m_count; }
+ uint32 last() const
+ {
+ DBUG_ASSERT(m_count > 0);
+ return m_first + m_count - 1;
+ }
+
+ // Initialize by checking existing log files on the disk
+ LogFileCollection(const char *datadir, uint32 max_log_no)
+ {
+ uint32 end= find_greatest_existing_log(datadir, max_log_no);
+ if (!end)
+ {
+ // No log files were found at all
+ m_first= 0;
+ m_count= 0;
+ }
+ else if (end == 1)
+ {
+ // Just the very first one log file (aria_log.00000001) was found.
+ m_first= 1;
+ m_count= 1;
+ }
+ else
+ {
+ // Multiple files were found
+ m_first= find_greatest_missing_log(datadir, end - 1) + 1;
+ m_count= 1 + end - m_first;
+ }
+ }
+
+ /*
+ Skip all missing log files and find the greatest existing log file, or
+ Skip all existing log files and find the greatest missing log file.
+
+ @param datadir - Search files in this directory
+ @param start - Start searching from this log number and go downto 1.
+ @param kind - true - search for an existing file
+ false - search for a missing file.
+ @returns - [1..start] - the greatest found log file
+ of the searched kind
+ - 0 - if no log files of this kind
+ were found in the range [1..start].
+ */
+ static uint32 find_greatest_existing_or_missing_log(const char *datadir,
+ uint32 start,
+ bool kind)
+ {
+ DBUG_ASSERT(start > 0);
+ for (uint32 i= start; i > 0; i--)
+ {
+ if (file_exists(log_file_name(datadir, i).c_str()) == kind)
+ return i;
+ }
+ return 0; // No log files of the searched kind were found
+ }
+
+ static uint32 find_greatest_existing_log(const char *datadir, uint32 start)
+ {
+ return find_greatest_existing_or_missing_log(datadir, start, true);
+ }
+
+ static uint32 find_greatest_missing_log(const char *datadir, uint32 start)
+ {
+ return find_greatest_existing_or_missing_log(datadir, start, false);
+ }
+
+ /*
+ In some scenarios (e.g. log rotate) some new log files can appear
+ outside of the initially assumed [first,last] log number range.
+ This function adds all extra files behind "last".
+ */
+ void find_logs_after_last(const char *datadir)
+ {
+ DBUG_ASSERT(m_count > 0);
+ for ( ;
+ file_exists(log_file_name(datadir, last() + 1).c_str()) ;
+ m_count++)
+ { }
+ }
+
+ void report_found(unsigned thread_num) const
+ {
+ if (m_count)
+ msg(thread_num,
+ "Found %u aria log files, "
+ "minimum log number %u, "
+ "maximum log number %u",
+ m_count, m_first, last());
+ }
+
+ void die_if_missing(uint32 logno) const
+ {
+ DBUG_ASSERT(logno > 0);
+ if (!m_count || m_first > logno || last() < logno)
+ die("Aria log file %u does not exists.", logno);
+ }
+};
+
+
+class Table {
+public:
+ struct Partition {
+ std::string m_file_path;
+ File m_index_file = -1;
+ MY_STAT m_index_file_stat;
+ File m_data_file = -1;
+ MY_STAT m_data_file_stat;
+ };
+ Table() = default;
+ Table (Table &&other) = delete;
+ Table & operator= (Table &&other) = delete;
+ Table(const Table &) = delete;
+ Table & operator= (const Table &) = delete;
+ ~Table();
+ bool init(const char *data_file_path);
+ bool open(MYSQL *con, bool opt_no_lock, unsigned thread_num);
+ bool close();
+ bool copy(ds_ctxt_t *ds, unsigned thread_num);
+
+ bool is_online_backup_safe() const {
+ DBUG_ASSERT(is_opened());
+ return m_cap.online_backup_safe;
+ }
+ bool is_stats() const {
+ return is_stats_table(m_db.c_str(), m_table.c_str());
+ }
+ bool is_log() const {
+ return is_log_table(m_db.c_str(), m_table.c_str());
+ }
+ bool is_opened() const {
+ return !m_partitions.empty() &&
+ m_partitions[0].m_index_file >= 0 && m_partitions[0].m_data_file >= 0;
+ };
+ std::string &get_full_name() {
+ return m_full_name;
+ }
+ std::string &get_db() { return m_db; }
+ std::string &get_table() { return m_table; }
+ std::string &get_version() { return m_table_version; }
+ bool is_partitioned() const { return m_partitioned; }
+ void add_partition(const Table &partition) {
+ DBUG_ASSERT(is_partitioned());
+ m_partitions.push_back(partition.m_partitions[0]);
+ }
+#ifndef DBUG_OFF
+ const std::string& get_sql_name() const { return m_sql_name; }
+#endif //DBUG_OFF
+private:
+
+ bool copy(ds_ctxt_t *ds, bool is_index, unsigned thread_num);
+ // frm and par files will be copied under BLOCK_DDL stage in
+ // backup_copy_non_system()
+ bool copy_frm_and_par(ds_ctxt_t *ds, unsigned thread_num);
+ bool read_table_version_id(File file);
+
+ std::string m_db;
+ std::string m_table;
+ std::string m_full_name;
+ std::string m_frm_par_path;
+ std::string m_table_version;
+#ifndef DBUG_OFF
+ std::string m_sql_name;
+#endif //DBUG_OFF
+ bool m_partitioned = false;
+ std::vector<Partition> m_partitions;
+ ARIA_TABLE_CAPABILITIES m_cap;
+};
+
+Table::~Table() {
+ (void)close();
+}
+
+bool Table::init(const char *data_file_path) {
+ DBUG_ASSERT(data_file_path);
+
+ const char *ext_pos = strrchr(data_file_path, '.');
+ if (!ext_pos)
+ return false;
+
+ char db_name_orig[FN_REFLEN];
+ char table_name_orig[FN_REFLEN];
+ parse_db_table_from_file_path(
+ data_file_path, db_name_orig, table_name_orig);
+ if (!db_name_orig[0] || !table_name_orig[0])
+ return false;
+ char db_name_conv[FN_REFLEN];
+ char table_name_conv[FN_REFLEN];
+ filename_to_tablename(db_name_orig, db_name_conv, sizeof(db_name_conv));
+ filename_to_tablename(
+ table_name_orig, table_name_conv, sizeof(table_name_conv));
+ if (!db_name_conv[0] || !table_name_conv[0])
+ return false;
+
+ if (strstr(data_file_path, "#P#"))
+ m_partitioned = true;
+
+ const char *table_name_begin = strrchr(data_file_path, FN_LIBCHAR);
+ if (!table_name_begin)
+ return false;
+ m_frm_par_path.assign(data_file_path, table_name_begin + 1).
+ append(table_name_orig);
+
+ m_db.assign(db_name_conv);
+ m_table.assign(table_name_conv);
+ // TODO: find the correct way to represent quoted table/db names
+ m_full_name.assign("`").append(m_db).append("`.`").
+ append(m_table).append("`");
+#ifndef DBUG_OFF
+ m_sql_name.assign(m_db).append("/").append(m_table);
+#endif // DBUG_OFF
+ Partition partition;
+ partition.m_file_path.assign(data_file_path, ext_pos - data_file_path);
+ m_partitions.push_back(std::move(partition));
+ return true;
+}
+
+bool Table::read_table_version_id(File file) {
+ m_table_version = ::read_table_version_id(file);
+ return m_table_version.empty();
+}
+
+bool Table::open(MYSQL *con, bool opt_no_lock, unsigned thread_num) {
+ int error= 1;
+ bool have_capabilities = false;
+ File frm_file = -1;
+
+ if (!opt_no_lock && !backup_lock(con, m_full_name.c_str())) {
+ msg(thread_num, "Error on BACKUP LOCK for aria table %s",
+ m_full_name.c_str());
+ goto exit;
+ }
+
+ for (Partition &partition : m_partitions) {
+ std::string file_path = partition.m_file_path + ".MAI";
+ if ((partition.m_index_file= my_open(file_path.c_str(),
+ O_RDONLY | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
+ MYF(MY_WME))) < 0) {
+ msg(thread_num, "Error on aria table file open %s", file_path.c_str());
+ goto exit;
+ }
+ if (!my_stat(file_path.c_str(), &partition.m_index_file_stat, MYF(0))) {
+ msg(thread_num, "Error on aria table file stat %s", file_path.c_str());
+ goto exit;
+ }
+ if (!have_capabilities) {
+ if ((error= aria_get_capabilities(partition.m_index_file, &m_cap))) {
+ msg(thread_num, "aria_get_capabilities failed: %d", error);
+ goto exit;
+ }
+ have_capabilities = true;
+ }
+
+ file_path = partition.m_file_path + ".MAD";
+ if ((partition.m_data_file= my_open(file_path.c_str(),
+ O_RDONLY | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_WME))) < 0) {
+ msg(thread_num, "Error on aria table file open %s", file_path.c_str());
+ goto exit;
+ }
+ if (!my_stat(file_path.c_str(), &partition.m_data_file_stat, MYF(0))) {
+ msg(thread_num, "Error on aria table file stat %s", file_path.c_str());
+ goto exit;
+ }
+ }
+
+ if ((frm_file = mysql_file_open(
+ key_file_frm, (m_frm_par_path + ".frm").c_str(),
+ O_RDONLY | O_SHARE, MYF(0))) < 0) {
+ msg(thread_num, "Error on aria table %s file open",
+ (m_frm_par_path + ".frm").c_str());
+ goto exit;
+ }
+
+ error = 0;
+
+exit:
+ if (!opt_no_lock && !backup_unlock(con)) {
+ msg(thread_num, "Error on BACKUP UNLOCK for aria table %s",
+ m_full_name.c_str());
+ error = 1;
+ }
+ if (error)
+ (void)close();
+ else {
+ (void)read_table_version_id(frm_file);
+ mysql_file_close(frm_file, MYF(MY_WME));
+ }
+ return !error;
+}
+
+bool Table::close() {
+ for (Partition &partition : m_partitions) {
+ if (partition.m_index_file >= 0) {
+ my_close(partition.m_index_file, MYF(MY_WME));
+ partition.m_index_file = -1;
+ }
+ if (partition.m_data_file >= 0) {
+ my_close(partition.m_data_file, MYF(MY_WME));
+ partition.m_data_file = -1;
+ }
+ }
+ return true;
+}
+
+bool Table::copy(ds_ctxt_t *ds, unsigned thread_num) {
+ DBUG_ASSERT(is_opened());
+ DBUG_MARIABACKUP_EVENT_LOCK("before_aria_table_copy",
+ fil_space_t::name_type(m_sql_name.data(), m_sql_name.size()));
+ bool result =
+// copy_frm_and_par(ds, thread_num) &&
+ copy(ds, true, thread_num) && copy(ds, false, thread_num);
+ return result;
+}
+
+bool Table::copy(ds_ctxt_t *ds, bool is_index, unsigned thread_num) {
+ DBUG_ASSERT(ds);
+ const char *ext = is_index ? ".MAI" : ".MAD";
+ int error= 1;
+ for (const Partition &partition : m_partitions) {
+ ds_file_t *dst_file = nullptr;
+ uchar *copy_buffer = nullptr;
+ std::string full_name = partition.m_file_path + ext;
+ const char *dst_path =
+ (xtrabackup_copy_back || xtrabackup_move_back) ?
+ full_name.c_str() : trim_dotslash(full_name.c_str());
+
+ dst_file = ds_open(ds, dst_path,
+ is_index ? &partition.m_index_file_stat : &partition.m_data_file_stat);
+ if (!dst_file) {
+ msg(thread_num, "error: cannot open the destination stream for %s",
+ dst_path);
+ goto err;
+ }
+
+ copy_buffer =
+ reinterpret_cast<uchar *>(my_malloc(PSI_NOT_INSTRUMENTED,
+ m_cap.block_size, MYF(0)));
+
+ DBUG_MARIABACKUP_EVENT_LOCK(
+ is_index ?
+ "before_aria_index_file_copy":
+ "before_aria_data_file_copy",
+ fil_space_t::name_type(m_sql_name.data(),
+ m_sql_name.size()));
+
+ for (ulonglong block= 0 ; ; block++) {
+ size_t length = m_cap.block_size;
+ if (is_index) {
+ if ((error= aria_read_index(
+ partition.m_index_file, &m_cap, block, copy_buffer) ==
+ HA_ERR_END_OF_FILE))
+ break;
+ } else {
+ if ((error= aria_read_data(
+ partition.m_data_file, &m_cap, block, copy_buffer, &length) ==
+ HA_ERR_END_OF_FILE))
+ break;
+ }
+ if (error) {
+ msg(thread_num, "error: aria_read %s failed: %d",
+ is_index ? "index" : "data", error);
+ goto err;
+ }
+ xtrabackup_io_throttling();
+ if ((error = ds_write(dst_file, copy_buffer, length))) {
+ msg(thread_num, "error: aria_write failed: %d", error);
+ goto err;
+ }
+ }
+
+ DBUG_MARIABACKUP_EVENT_LOCK(
+ is_index ?
+ "after_aria_index_file_copy":
+ "after_aria_data_file_copy",
+ fil_space_t::name_type(m_sql_name.data(),
+ m_sql_name.size()));
+
+ error = 0;
+ msg(thread_num, "aria table file %s is copied successfully.",
+ full_name.c_str());
+
+ err:
+ if (dst_file)
+ ds_close(dst_file);
+ if (copy_buffer)
+ my_free(copy_buffer);
+ if (error)
+ break;
+ }
+ return !error;
+}
+
+class BackupImpl {
+public:
+ BackupImpl(
+ const char *datadir_path,
+ const char *aria_log_path,
+ ds_ctxt_t *datasink, bool opt_no_lock,
+ std::vector<MYSQL *> &con_pool, ThreadPool &thread_pool) :
+ m_datadir_path(datadir_path),
+ m_aria_log_dir_path(aria_log_path),
+ m_ds(datasink), m_con_pool(con_pool),
+ m_tasks_group(thread_pool), m_thread_pool(thread_pool) { }
+ ~BackupImpl() { destroy(); }
+ bool init();
+ bool start(bool no_lock);
+ bool wait_for_finish();
+ bool copy_offline_tables(
+ const std::unordered_set<table_key_t> *exclude_tables, bool no_lock,
+ bool copy_stats);
+ bool finalize();
+ void set_post_copy_table_hook(const post_copy_table_hook_t &hook) {
+ m_table_post_copy_hook = hook;
+ }
+ bool copy_log_tail() { return copy_log_tail(0, false); }
+private:
+ void destroy();
+ void scan_job(bool no_lock, unsigned thread_num);
+ bool copy_log_tail(unsigned thread_num, bool finalize);
+ void copy_log_file_job(size_t log_num, unsigned thread_num);
+ void destroy_log_tail();
+ void process_table_job(Table *table, bool online_only, bool copy_stats,
+ bool no_lock, unsigned thread_num);
+
+ const char *m_datadir_path;
+ const char *m_aria_log_dir_path;
+ std::string aria_log_dir_path() const
+ {
+ if (!m_aria_log_dir_path || !m_aria_log_dir_path[0])
+ return m_datadir_path;
+ if (is_absolute_path(m_aria_log_dir_path))
+ return m_aria_log_dir_path;
+ return std::string(m_datadir_path).append("/")
+ .append(m_aria_log_dir_path);
+ }
+ ds_ctxt_t *m_ds;
+ std::vector<MYSQL *> &m_con_pool;
+
+ TasksGroup m_tasks_group;
+
+ std::mutex m_offline_tables_mutex;
+ std::vector<std::unique_ptr<Table>> m_offline_tables;
+ post_copy_table_hook_t m_table_post_copy_hook;
+
+ ThreadPool &m_thread_pool;
+
+ size_t m_last_log_num = 0;
+ ds_file_t* m_last_log_dst = nullptr;
+ File m_last_log_src = -1;
+};
+
+bool BackupImpl::init() {
+ DBUG_ASSERT(m_tasks_group.is_finished());
+ return true;
+};
+
+void BackupImpl::destroy() {
+ DBUG_ASSERT(m_tasks_group.is_finished());
+ destroy_log_tail();
+}
+
+bool BackupImpl::start(bool no_lock) {
+ DBUG_ASSERT(m_tasks_group.is_finished());
+ m_tasks_group.push_task(
+ std::bind(&BackupImpl::scan_job, this, no_lock, std::placeholders::_1));
+ return true;
+}
+
+void BackupImpl::process_table_job(
+ Table *table_ptr, bool online_only, bool copy_stats, bool no_lock,
+ unsigned thread_num) {
+ DBUG_ASSERT(table_ptr);
+ DBUG_ASSERT(thread_num < m_con_pool.size());
+ std::unique_ptr<Table> table(table_ptr);
+ bool is_online;
+ bool is_stats;
+ bool need_copy;
+ int result = 1;
+
+ if (!m_tasks_group.get_result())
+ goto exit;
+
+ if (!table->open(m_con_pool[thread_num], no_lock, thread_num)) {
+ // if table can't be opened, it might be removed or renamed, this is not
+ // error for transactional tables
+ table->close(); // Close opened table files
+ goto exit;
+ }
+
+ is_online = table->is_online_backup_safe();
+ is_stats = table->is_stats();
+
+ need_copy = (!online_only || is_online) && (copy_stats || !is_stats);
+
+ if (need_copy && !table->copy(m_ds, thread_num)) {
+ table->close();
+ DBUG_MARIABACKUP_EVENT_LOCK("after_aria_table_copy",
+ fil_space_t::name_type(table->get_sql_name().data(),
+ table->get_sql_name().size()));
+ // if table is opened, it must be copied,
+ // the corresponding diagnostic messages must be issued in Table::copy()
+ result = 0;
+ goto exit;
+ }
+
+ if (!table->close()) {
+ msg(thread_num, "Can't close aria table %s.\n",
+ table->get_full_name().c_str());
+ result = 0;
+ goto exit;
+ }
+
+ if (!need_copy) {
+ std::lock_guard<std::mutex> lock(m_offline_tables_mutex);
+ m_offline_tables.push_back(std::move(table));
+ }
+ else {
+ DBUG_MARIABACKUP_EVENT_LOCK("after_aria_table_copy",
+ fil_space_t::name_type(table->get_sql_name().data(),
+ table->get_sql_name().size()));
+ if (m_table_post_copy_hook)
+ m_table_post_copy_hook(
+ std::move(table->get_db()),
+ std::move(table->get_table()),
+ std::move(table->get_version()));
+ }
+exit:
+ m_tasks_group.finish_task(result);
+}
+
+
+void BackupImpl::scan_job(bool no_lock, unsigned thread_num) {
+ std::unordered_map<std::string, std::unique_ptr<Table>> partitioned_tables;
+
+ std::string aria_log_dir_path_cache(aria_log_dir_path());
+ std::string log_control_file_path(aria_log_dir_path_cache);
+ log_control_file_path.append("/aria_log_control");
+ if (!m_ds->copy_file(
+ log_control_file_path.c_str(), "aria_log_control",
+ 0, false)) {
+ msg("Aria log control file copying error.");
+ m_tasks_group.finish_task(0);
+ return;
+ }
+
+ msg(thread_num, "Loading aria_log_control.");
+ aria_readonly= 1;
+ maria_data_root= aria_log_dir_path_cache.c_str();
+ if (ma_control_file_open(FALSE, FALSE, FALSE, O_RDONLY))
+ die("Can't open Aria control file (%d)", errno);
+ uint32 aria_log_control_last_log_number= last_logno;
+ msg(thread_num, "aria_log_control: last_log_number: %d",
+ aria_log_control_last_log_number);
+ ma_control_file_end();
+
+ msg(thread_num, "Start scanning aria tables.");
+
+ foreach_file_in_db_dirs(m_datadir_path, [&](const char *file_path)->bool {
+
+ if (check_if_skip_table(file_path)) {
+ msg(thread_num, "Skipping %s.", file_path);
+ return true;
+ }
+
+ if (!ends_with(file_path, ".MAD"))
+ return true;
+
+ std::unique_ptr<Table> table(new Table());
+ if (!table->init(file_path)) {
+ msg(thread_num, "Can't init aria table %s.\n", file_path);
+ return true;
+ }
+
+ if (table->is_log())
+ return true;
+
+ if (table->is_partitioned()) {
+ auto table_it = partitioned_tables.find(table->get_full_name());
+ if (table_it == partitioned_tables.end()) {
+ partitioned_tables[table->get_full_name()] = std::move(table);
+ } else {
+ table_it->second->add_partition(*table);
+ }
+ return true;
+ }
+
+ m_tasks_group.push_task(
+ std::bind(&BackupImpl::process_table_job, this, table.release(), true,
+ false, no_lock, std::placeholders::_1));
+ return true;
+ });
+
+ for (auto &table_it : partitioned_tables) {
+ m_tasks_group.push_task(
+ std::bind(&BackupImpl::process_table_job, this, table_it.second.release(),
+ true, false, no_lock, std::placeholders::_1));
+ }
+
+ msg(thread_num, "Start scanning aria log files.");
+
+ LogFileCollection logs(aria_log_dir_path_cache.c_str(),
+ aria_log_control_last_log_number);
+ logs.report_found(thread_num);
+ logs.die_if_missing(aria_log_control_last_log_number);
+
+ m_last_log_num= logs.last();
+
+ DBUG_MARIABACKUP_EVENT("after_scanning_log_files", {});
+
+ for (uint32 i= logs.first(); i <= logs.last(); ++i)
+ m_tasks_group.push_task(
+ std::bind(&BackupImpl::copy_log_file_job, this,
+ i, std::placeholders::_1));
+
+ msg(thread_num, "Stop scanning aria tables.");
+
+ m_tasks_group.finish_task(1);
+}
+
+template<typename T>
+T align_down(T n, ulint align_no)
+{
+ DBUG_ASSERT(align_no > 0);
+ DBUG_ASSERT(ut_is_2pow(align_no));
+ return n & ~(static_cast<T>(align_no) - 1);
+}
+
+static ssize_t copy_file_chunk(File src, ds_file_t* dst, size_t size) {
+ size_t bytes_read;
+ static const size_t max_buf_size = 10 * 1024 * 1024;
+ size_t buf_size = size ? std::min(size, max_buf_size) : max_buf_size;
+ std::unique_ptr<uchar[]> buf(new uchar[buf_size]);
+ ssize_t copied_size = 0;
+ bool unlim = !size;
+ while((unlim || size) && (bytes_read = my_read(src, buf.get(),
+ unlim ? buf_size : std::min(buf_size, size), MY_WME))) {
+ if (bytes_read == size_t(-1))
+ return -1;
+ xtrabackup_io_throttling();
+ if (ds_write(dst, buf.get(), bytes_read))
+ return -1;
+ copied_size += bytes_read;
+ if (!unlim)
+ size -= bytes_read;
+ }
+ return copied_size;
+}
+
+bool BackupImpl::copy_log_tail(unsigned thread_num, bool finalize) {
+ bool result = false;
+ std::string log_file = log_file_name(aria_log_dir_path().c_str(), m_last_log_num);
+ std::string prev_log_file;
+ ssize_t total_bytes_copied = 0;
+ MY_STAT stat_info;
+ my_off_t file_offset = 0;
+ size_t to_copy_size = 0;
+
+repeat:
+ memset(&stat_info, 0, sizeof(MY_STAT));
+ if (!m_tasks_group.get_result()) {
+ msg(thread_num, "Skip copying aria lof file tail %s due to error.",
+ log_file.c_str());
+ result = true;
+ goto exit;
+ }
+
+ msg(thread_num, "Start copying aria log file tail: %s", log_file.c_str());
+
+ if (m_last_log_src < 0 && (m_last_log_src =
+ my_open(log_file.c_str(), O_RDONLY | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
+ MYF(MY_WME))) < 0) {
+ msg("Aria log file %s open failed: %d", log_file.c_str(), my_errno);
+ goto exit;
+ }
+
+ if (!m_last_log_dst &&
+ !(m_last_log_dst = ds_open(m_ds,
+ log_file_name_only(m_last_log_num).c_str(),
+ &stat_info, false))) {
+ msg(thread_num, "error: failed to open the target stream for "
+ "aria log file %s.",
+ log_file.c_str());
+ goto exit;
+ }
+
+// If there is no need to finalize log file copying, calculate the size to copy
+// without the last page, which can be rewritten by the server
+// (see translog_force_current_buffer_to_finish()).
+ if (!finalize) {
+ if (my_fstat(m_last_log_src, &stat_info, MYF(0))) {
+ msg(thread_num, "error: failed to get file size for aria log file: %s.",
+ log_file.c_str());
+ goto exit;
+ }
+ if ((file_offset = my_tell(m_last_log_src, MYF(0))) == (my_off_t)(-1)) {
+ msg(thread_num, "error: failed to get file offset for aria log file: %s.",
+ log_file.c_str());
+ goto exit;
+ }
+ DBUG_ASSERT(file_offset <= static_cast<my_off_t>(stat_info.st_size));
+ to_copy_size = static_cast<size_t>(stat_info.st_size - file_offset);
+ to_copy_size = to_copy_size >= TRANSLOG_PAGE_SIZE ?
+ (align_down(to_copy_size, TRANSLOG_PAGE_SIZE) - TRANSLOG_PAGE_SIZE) : 0;
+ }
+
+// Copy from the last position to the end of file,
+// excluding the last page is there is no need to finalize the copy.
+ if ((to_copy_size || finalize) &&
+ (total_bytes_copied = copy_file_chunk(m_last_log_src,
+ m_last_log_dst, to_copy_size)) < 0) {
+ msg(thread_num, "Aria log file %s chunk copy error", log_file.c_str());
+ goto exit;
+ }
+
+ msg(thread_num, "Stop copying aria log file tail: %s, copied %zu bytes",
+ log_file.c_str(), total_bytes_copied);
+
+// Check if there is new log file, if yes, then copy the last page of the old
+// one, and fix it last LSN in the log header, as it is changed on new
+// log file creating by the server (see translog_create_new_file() and
+// translog_max_lsn_to_header()). Then close the old log file and repeat
+// the copying for the new log file.
+ prev_log_file = std::move(log_file);
+ log_file = log_file_name(aria_log_dir_path().c_str(), m_last_log_num + 1);
+ if (file_exists(log_file.c_str())) {
+ uchar lsn_buff[LSN_STORE_SIZE];
+ msg(thread_num, "Found new aria log tail file: %s, start copy %s tail",
+ log_file.c_str(), prev_log_file.c_str());
+ if ((total_bytes_copied = copy_file_chunk(m_last_log_src,
+ m_last_log_dst, 0)) < 0) {
+ msg(thread_num, "Aria log file %s tail copy error",
+ prev_log_file.c_str());
+ goto exit;
+ }
+
+ if (my_pread(m_last_log_src, lsn_buff, LSN_STORE_SIZE,
+ (LOG_HEADER_DATA_SIZE - LSN_STORE_SIZE), MYF(0)) < LSN_STORE_SIZE) {
+ msg(thread_num, "Aria lsn store read error for log file %s",
+ prev_log_file.c_str());
+ goto exit;
+ }
+
+ if (ds_seek_set(m_last_log_dst, (LOG_HEADER_DATA_SIZE - LSN_STORE_SIZE))) {
+ msg(thread_num, "Set aria log pointer error for log file %s",
+ prev_log_file.c_str());
+ goto exit;
+ }
+
+ if (ds_write(m_last_log_dst, lsn_buff, LSN_STORE_SIZE)) {
+ msg(thread_num, "LSN write error for aria log file %s",
+ prev_log_file.c_str());
+ goto exit;
+ }
+
+ msg(thread_num, "The last %zu bytes were copied for %s.",
+ total_bytes_copied, prev_log_file.c_str());
+ destroy_log_tail();
+ ++m_last_log_num;
+ goto repeat;
+ }
+
+ result = true;
+
+exit:
+ if (!result)
+ destroy_log_tail();
+ return result;
+}
+
+void BackupImpl::copy_log_file_job(size_t log_num, unsigned thread_num) {
+ DBUG_ASSERT(log_num <= m_last_log_num);
+
+ if (!m_tasks_group.get_result()) {
+ msg(thread_num, "Skip copying %zu aria log file due to error", log_num);
+ m_tasks_group.finish_task(0);
+ return;
+ }
+
+// Copy log file if the file is not the last one.
+ if (log_num < m_last_log_num) {
+ std::string log_file = log_file_name(aria_log_dir_path().c_str(), log_num);
+ if (!m_ds->copy_file(log_file.c_str(),
+ log_file_name_only(log_num).c_str(),
+ thread_num, false)) {
+ msg(thread_num, "Error on copying %s aria log file.", log_file.c_str());
+ m_tasks_group.finish_task(0);
+ }
+ else
+ m_tasks_group.finish_task(1);
+ return;
+ }
+// Copy the last log file.
+ m_tasks_group.finish_task(copy_log_tail(thread_num, false) ? 1 : 0);
+}
+
+void BackupImpl::destroy_log_tail() {
+ if (m_last_log_src >= 0) {
+ my_close(m_last_log_src, MYF(MY_WME));
+ m_last_log_src = -1;
+ }
+ if (m_last_log_dst) {
+ ds_close(m_last_log_dst);
+ m_last_log_dst = nullptr;
+ }
+}
+
+bool BackupImpl::wait_for_finish() {
+ return m_tasks_group.wait_for_finish();
+}
+
+bool BackupImpl::copy_offline_tables(
+ const std::unordered_set<table_key_t> *exclude_tables, bool no_lock,
+ bool copy_stats) {
+ DBUG_ASSERT(m_tasks_group.is_finished());
+
+ std::vector<std::unique_ptr<Table>> ignored_tables;
+
+ while (true) {
+ std::unique_lock<std::mutex> lock(m_offline_tables_mutex);
+ if (m_offline_tables.empty())
+ break;
+ auto table = std::move(m_offline_tables.back());
+ m_offline_tables.pop_back();
+ lock.unlock();
+ if ((exclude_tables &&
+ exclude_tables->count(table_key(table->get_db(), table->get_table()))) ||
+ (!copy_stats && table->is_stats())) {
+ ignored_tables.push_back(std::move(table));
+ continue;
+ }
+ m_tasks_group.push_task(
+ std::bind(&BackupImpl::process_table_job, this, table.release(), false,
+ copy_stats, no_lock, std::placeholders::_1));
+ }
+
+ if (!ignored_tables.empty()) {
+ std::lock_guard<std::mutex> lock(m_offline_tables_mutex);
+ m_offline_tables = std::move(ignored_tables);
+ }
+
+ return true;
+}
+
+bool BackupImpl::finalize() {
+ DBUG_ASSERT(m_tasks_group.is_finished());
+ DBUG_ASSERT(!m_con_pool.empty());
+ bool result = true;
+ msg("Start copying statistics aria tables.");
+ copy_offline_tables(nullptr, true, true);
+ while (!m_tasks_group.is_finished())
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
+ msg("Stop copying statistics aria tables.");
+ copy_log_tail(0, true);
+ destroy_log_tail();
+ return result;
+}
+
+Backup::Backup(const char *datadir_path,
+ const char *aria_log_path,
+ ds_ctxt_t *datasink,
+ std::vector<MYSQL *> &con_pool, ThreadPool &thread_pool) :
+ m_backup_impl(
+ new BackupImpl(datadir_path, aria_log_path,
+ datasink, opt_no_lock, con_pool,
+ thread_pool)) { }
+
+Backup::~Backup() {
+ delete m_backup_impl;
+}
+
+bool Backup::init() {
+ return m_backup_impl->init();
+}
+
+bool Backup::start(bool no_lock) {
+ return m_backup_impl->start(no_lock);
+}
+
+bool Backup::wait_for_finish() {
+ return m_backup_impl->wait_for_finish();
+}
+
+bool Backup::copy_offline_tables(
+ const std::unordered_set<table_key_t> *exclude_tables, bool no_lock,
+ bool copy_stats) {
+ return m_backup_impl->copy_offline_tables(exclude_tables, no_lock,
+ copy_stats);
+}
+
+bool Backup::finalize() {
+ return m_backup_impl->finalize();
+}
+
+bool Backup::copy_log_tail() {
+ return m_backup_impl->copy_log_tail();
+}
+
+void Backup::set_post_copy_table_hook(const post_copy_table_hook_t &hook) {
+ m_backup_impl->set_post_copy_table_hook(hook);
+}
+
+bool prepare(const char *target_dir) {
+ maria_data_root= (char *)target_dir;
+
+ if (maria_init())
+ die("Can't init Aria engine (%d)", errno);
+
+ maria_block_size= 0; /* Use block size from file */
+ /* we don't want to create a control file, it MUST exist */
+ if (ma_control_file_open(FALSE, TRUE, TRUE, control_file_open_flags))
+ die("Can't open Aria control file (%d)", errno);
+
+ if (last_logno == FILENO_IMPOSSIBLE)
+ die("Can't find any Aria log");
+
+ LogFileCollection logs(target_dir, last_logno);
+ logs.die_if_missing(last_logno); // Fatal, a broken backup.
+ /*
+ "mariadb-backup --backup" can put extra log files,
+ with log number greater than last_logno. For example,
+ this combination of files is possible:
+ - aria_log_control (with last_logno==1)
+ - aria_log.00000001 (last_logno)
+ - aria_log.00000002 (last_logno+1, the extra log file)
+ This can happen if during the ealier run of
+ "mariadb-backup --backup" a log rotate happened.
+ The extra log file is copied to the backup directory,
+ but last_logno in aria_log_control does not get updated.
+ This mismatch is probably not good and should eventually be fixed.
+ But during "mariadb-backup --prepare" this mismatch goes away:
+ aria_log_control gets fixed to say last_logno==2.
+ See mysql-test/suite/mariabackup/aria_log_rotate_during_backup.test,
+ it covers the scenario with one extra file created during --backup.
+ */
+ logs.find_logs_after_last(target_dir);
+ last_logno= logs.last(); // Update last_logno if extra logs were found
+
+ if (init_pagecache(maria_pagecache, 1024L*1024L, 0, 0,
+ static_cast<uint>(maria_block_size), 0, MY_WME) == 0)
+ die("Got error in Aria init_pagecache() (errno: %d)", errno);
+
+ if (init_pagecache(maria_log_pagecache, 1024L*1024L,
+ 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, FALSE))
+ die("Can't init Aria loghandler (%d)", errno);
+
+ if (maria_recovery_from_log())
+ die("Aria log apply FAILED");
+
+ if (maria_recovery_changed_data || recovery_failures) {
+ if (ma_control_file_write_and_force(last_checkpoint_lsn, last_logno,
+ max_trid_in_control_file, 0))
+ die("Aria control file update error");
+// TODO: find out do we need checkpoint here
+ }
+
+ maria_end();
+ return true;
+}
+
+} // namespace aria
diff --git a/extra/mariabackup/aria_backup_client.h b/extra/mariabackup/aria_backup_client.h
new file mode 100644
index 00000000..7a581b58
--- /dev/null
+++ b/extra/mariabackup/aria_backup_client.h
@@ -0,0 +1,38 @@
+#pragma once
+#include "my_global.h"
+#include "datasink.h"
+#include "backup_mysql.h"
+#include "thread_pool.h"
+#include "xtrabackup.h"
+
+namespace aria {
+
+bool prepare(const char *target_dir);
+
+class BackupImpl;
+
+class Backup {
+ public:
+ Backup(const char *datadir_path,
+ const char *aria_log_path,
+ ds_ctxt_t *datasink,
+ std::vector<MYSQL *> &con_pool, ThreadPool &thread_pool);
+ ~Backup();
+ Backup (Backup &&other) = delete;
+ Backup & operator= (Backup &&other) = delete;
+ Backup(const Backup &) = delete;
+ Backup & operator= (const Backup &) = delete;
+ bool init();
+ bool start(bool no_lock);
+ bool wait_for_finish();
+ bool copy_offline_tables(
+ const std::unordered_set<table_key_t> *exclude_tables, bool no_lock,
+ bool copy_stats);
+ bool finalize();
+ bool copy_log_tail();
+ void set_post_copy_table_hook(const post_copy_table_hook_t &hook);
+ private:
+ BackupImpl *m_backup_impl;
+};
+
+} // namespace aria
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index f8d315d9..198da01a 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -41,6 +41,9 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
*******************************************************/
#include <my_global.h>
+#include <my_config.h>
+#include <unireg.h>
+#include <datadict.h>
#include <os0file.h>
#include <my_dir.h>
#include <ut0mem.h>
@@ -66,19 +69,26 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <aclapi.h>
#endif
+#ifdef MYSQL_CLIENT
+#define WAS_MYSQL_CLIENT 1
+#undef MYSQL_CLIENT
+#endif
+
+#include "table.h"
+
+#ifdef WAS_MYSQL_CLIENT
+#define MYSQL_CLIENT 1
+#undef WAS_MYSQL_CLIENT
+#endif
#define ROCKSDB_BACKUP_DIR "#rocksdb"
-/* list of files to sync for --rsync mode */
-static std::set<std::string> rsync_list;
/* locations of tablespaces read from .isl files */
static std::map<std::string, std::string> tablespace_locations;
/* Whether LOCK BINLOG FOR BACKUP has been issued during backup */
bool binlog_locked;
-static void rocksdb_create_checkpoint();
-static bool has_rocksdb_plugin();
static void rocksdb_backup_checkpoint(ds_ctxt *ds_data);
static void rocksdb_copy_back(ds_ctxt *ds_data);
@@ -135,10 +145,6 @@ struct datadir_thread_ctxt_t {
bool ret;
};
-static bool backup_files_from_datadir(ds_ctxt_t *ds_data,
- const char *dir_path,
- const char *prefix);
-
/************************************************************************
Retirn true if character if file separator */
bool
@@ -585,7 +591,6 @@ datafile_read(datafile_cur_t *cursor)
Check to see if a file exists.
Takes name of the file to check.
@return true if file exists. */
-static
bool
file_exists(const char *filename)
{
@@ -601,7 +606,6 @@ file_exists(const char *filename)
/************************************************************************
Trim leading slashes from absolute path so it becomes relative */
-static
const char *
trim_dotslash(const char *path)
{
@@ -634,7 +638,7 @@ ends_with(const char *str, const char *suffix)
&& strcmp(str + str_len - suffix_len, suffix) == 0);
}
-static bool starts_with(const char *str, const char *prefix)
+bool starts_with(const char *str, const char *prefix)
{
return strncmp(str, prefix, strlen(prefix)) == 0;
}
@@ -785,7 +789,6 @@ directory_exists_and_empty(const char *dir, const char *comment)
/************************************************************************
Check if file name ends with given set of suffixes.
@return true if it does. */
-static
bool
filename_matches(const char *filename, const char **ext_list)
{
@@ -800,52 +803,127 @@ filename_matches(const char *filename, const char **ext_list)
return(false);
}
-
-/************************************************************************
-Copy data file for backup. Also check if it is allowed to copy by
-comparing its name to the list of known data file types and checking
-if passes the rules for partial backup.
-@return true if file backed up or skipped successfully. */
+// TODO: the code can be used to find storage engine of partitions
+/*
static
-bool
-datafile_copy_backup(ds_ctxt *ds_data, const char *filepath, uint thread_n)
-{
- const char *ext_list[] = {"frm", "isl", "MYD", "MYI", "MAD", "MAI",
- "MRG", "TRG", "TRN", "ARM", "ARZ", "CSM", "CSV", "opt", "par",
- NULL};
+bool is_aria_frm_or_par(const char *path) {
+ if (!ends_with(path, ".frm") && !ends_with(path, ".par"))
+ return false;
- /* Get the name and the path for the tablespace. node->name always
- contains the path (which may be absolute for remote tablespaces in
- 5.6+). space->name contains the tablespace name in the form
- "./database/table.ibd" (in 5.5-) or "database/table" (in 5.6+). For a
- multi-node shared tablespace, space->name contains the name of the first
- node, but that's irrelevant, since we only need node_name to match them
- against filters, and the shared tablespace is always copied regardless
- of the filters value. */
+ const char *frm_path = path;
+ if (ends_with(path, ".par")) {
+ size_t frm_path_len = strlen(path);
+ DBUG_ASSERT(frm_path_len > strlen("frm"));
+ frm_path = strdup(path);
+ strcpy(const_cast<char *>(frm_path) + frm_path_len - strlen("frm"), "frm");
+ }
- if (check_if_skip_table(filepath)) {
- msg(thread_n,"Skipping %s.", filepath);
- return(true);
+ bool result = false;
+ File file;
+ uchar header[40];
+ legacy_db_type dbt;
+
+ if ((file= mysql_file_open(key_file_frm, frm_path, O_RDONLY | O_SHARE, MYF(0)))
+ < 0)
+ goto err;
+
+ if (mysql_file_read(file, (uchar*) header, sizeof(header), MYF(MY_NABP)))
+ goto err;
+
+ if (!strncmp((char*) header, "TYPE=VIEW\n", 10))
+ goto err;
+
+ if (!is_binary_frm_header(header))
+ goto err;
+
+ dbt = (legacy_db_type)header[3];
+
+ if (dbt == DB_TYPE_ARIA) {
+ result = true;
}
+ else if (dbt == DB_TYPE_PARTITION_DB) {
+ MY_STAT state;
+ uchar *frm_image= 0;
+// uint n_length;
- if (filename_matches(filepath, ext_list)) {
- return ds_data->copy_file(filepath, filepath, thread_n);
+ if (mysql_file_fstat(file, &state, MYF(MY_WME)))
+ goto err;
+
+ if (mysql_file_seek(file, 0, SEEK_SET, MYF(MY_WME)))
+ goto err;
+
+ if (read_string(file, &frm_image, (size_t)state.st_size))
+ goto err;
+
+ dbt = (legacy_db_type)frm_image[61];
+ if (dbt == DB_TYPE_ARIA) {
+ result = true;
+ }
+ my_free(frm_image);
}
- return(true);
+err:
+ if (file >= 0)
+ mysql_file_close(file, MYF(MY_WME));
+ if (frm_path != path)
+ free(const_cast<char *>(frm_path));
+ return result;
}
+*/
+void parse_db_table_from_file_path(
+ const char *filepath, char *dbname, char *tablename) {
+ dbname[0] = '\0';
+ tablename[0] = '\0';
+ const char *dbname_start = nullptr;
+ const char *tablename_start = filepath;
+ const char *const_ptr;
+ while ((const_ptr = strchr(tablename_start, FN_LIBCHAR)) != NULL) {
+ dbname_start = tablename_start;
+ tablename_start = const_ptr + 1;
+ }
+ if (!dbname_start)
+ return;
+ size_t dbname_len = tablename_start - dbname_start - 1;
+ if (dbname_len >= FN_REFLEN)
+ dbname_len = FN_REFLEN-1;
+ strmake(dbname, dbname_start, dbname_len);
+ strmake(tablename, tablename_start, FN_REFLEN-1);
+ char *ptr;
+ if ((ptr = strchr(tablename, '.')))
+ *ptr = '\0';
+ if ((ptr = strstr(tablename, "#P#")))
+ *ptr = '\0';
+}
+
+bool is_system_table(const char *dbname, const char *tablename)
+{
+ DBUG_ASSERT(dbname);
+ DBUG_ASSERT(tablename);
+
+ LEX_CSTRING lex_dbname;
+ LEX_CSTRING lex_tablename;
+ lex_dbname.str = dbname;
+ lex_dbname.length = strlen(dbname);
+ lex_tablename.str = tablename;
+ lex_tablename.length = strlen(tablename);
+
+ TABLE_CATEGORY tg = get_table_category(&lex_dbname, &lex_tablename);
+
+ return (tg == TABLE_CATEGORY_LOG) || (tg == TABLE_CATEGORY_SYSTEM);
+}
/************************************************************************
-Same as datafile_copy_backup, but put file name into the list for
-rsync command. */
+Copy data file for backup. Also check if it is allowed to copy by
+comparing its name to the list of known data file types and checking
+if passes the rules for partial backup.
+@return true if file backed up or skipped successfully. */
static
bool
-datafile_rsync_backup(const char *filepath, bool save_to_list, FILE *f)
+datafile_copy_backup(ds_ctxt *ds_data, const char *filepath, uint thread_n)
{
- const char *ext_list[] = {"frm", "isl", "MYD", "MYI", "MAD", "MAI",
- "MRG", "TRG", "TRN", "ARM", "ARZ", "CSM", "CSV", "opt", "par",
- NULL};
+ const char *ext_list[] = {".frm", ".isl", ".TRG", ".TRN", ".opt", ".par",
+ NULL};
/* Get the name and the path for the tablespace. node->name always
contains the path (which may be absolute for remote tablespaces in
@@ -857,15 +935,13 @@ datafile_rsync_backup(const char *filepath, bool save_to_list, FILE *f)
of the filters value. */
if (check_if_skip_table(filepath)) {
+ msg(thread_n,"Skipping %s.", filepath);
return(true);
}
if (filename_matches(filepath, ext_list)) {
- fprintf(f, "%s\n", filepath);
- if (save_to_list) {
- rsync_list.insert(filepath);
- }
- }
+ return ds_data->copy_file(filepath, filepath, thread_n);
+ }
return(true);
}
@@ -1004,16 +1080,15 @@ Copy file for backup/restore.
bool
ds_ctxt_t::copy_file(const char *src_file_path,
const char *dst_file_path,
- uint thread_n)
+ uint thread_n,
+ bool rewrite)
{
char dst_name[FN_REFLEN];
ds_file_t *dstfile = NULL;
datafile_cur_t cursor;
xb_fil_cur_result_t res;
DBUG_ASSERT(datasink->remove);
- const char *dst_path =
- (xtrabackup_copy_back || xtrabackup_move_back)?
- dst_file_path : trim_dotslash(dst_file_path);
+ const char *dst_path = convert_dst(dst_file_path);
if (!datafile_open(src_file_path, &cursor, thread_n)) {
goto error_close;
@@ -1021,7 +1096,7 @@ ds_ctxt_t::copy_file(const char *src_file_path,
strncpy(dst_name, cursor.rel_path, sizeof(dst_name));
- dstfile = ds_open(this, dst_path, &cursor.statinfo);
+ dstfile = ds_open(this, dst_path, &cursor.statinfo, rewrite);
if (dstfile == NULL) {
msg(thread_n,"error: "
"cannot open the destination stream for %s", dst_name);
@@ -1245,278 +1320,45 @@ cleanup:
}
-
-
-static
bool
-backup_files(ds_ctxt *ds_data, const char *from, bool prep_mode)
+backup_files(ds_ctxt *ds_data, const char *from)
{
- char rsync_tmpfile_name[FN_REFLEN];
- FILE *rsync_tmpfile = NULL;
datadir_iter_t *it;
datadir_node_t node;
bool ret = true;
-
- if (prep_mode && !opt_rsync) {
- return(true);
- }
-
- if (opt_rsync) {
- snprintf(rsync_tmpfile_name, sizeof(rsync_tmpfile_name),
- "%s/%s%d", opt_mysql_tmpdir,
- "xtrabackup_rsyncfiles_pass",
- prep_mode ? 1 : 2);
- rsync_tmpfile = fopen(rsync_tmpfile_name, "w");
- if (rsync_tmpfile == NULL) {
- msg("Error: can't create file %s",
- rsync_tmpfile_name);
- return(false);
- }
- }
-
- msg("Starting %s non-InnoDB tables and files",
- prep_mode ? "prep copy of" : "to backup");
-
+ msg("Starting to backup non-InnoDB tables and files");
datadir_node_init(&node);
it = datadir_iter_new(from);
-
while (datadir_iter_next(it, &node)) {
-
if (!node.is_empty_dir) {
- if (opt_rsync) {
- ret = datafile_rsync_backup(node.filepath,
- !prep_mode, rsync_tmpfile);
- } else {
- ret = datafile_copy_backup(ds_data, node.filepath, 1);
- }
+ ret = datafile_copy_backup(ds_data, node.filepath, 1);
if (!ret) {
msg("Failed to copy file %s", node.filepath);
goto out;
}
- } else if (!prep_mode) {
+ } else {
/* backup fake file into empty directory */
char path[FN_REFLEN];
- snprintf(path, sizeof(path),
- "%s/db.opt", node.filepath);
- if (!(ret = ds_data->backup_file_printf(
- trim_dotslash(path), "%s", ""))) {
+ snprintf(path, sizeof(path), "%s/db.opt", node.filepath);
+ if (!(ret = ds_data->backup_file_printf(trim_dotslash(path), "%s", ""))) {
msg("Failed to create file %s", path);
goto out;
}
}
}
-
- if (opt_rsync) {
- std::stringstream cmd;
- int err;
-
- if (buffer_pool_filename && file_exists(buffer_pool_filename)) {
- fprintf(rsync_tmpfile, "%s\n", buffer_pool_filename);
- rsync_list.insert(buffer_pool_filename);
- }
- if (file_exists("ib_lru_dump")) {
- fprintf(rsync_tmpfile, "%s\n", "ib_lru_dump");
- rsync_list.insert("ib_lru_dump");
- }
-
- fclose(rsync_tmpfile);
- rsync_tmpfile = NULL;
-
- cmd << "rsync -t . --files-from=" << rsync_tmpfile_name
- << " " << xtrabackup_target_dir;
-
- msg("Starting rsync as: %s", cmd.str().c_str());
- if ((err = system(cmd.str().c_str()) && !prep_mode) != 0) {
- msg("Error: rsync failed with error code %d", err);
- ret = false;
- goto out;
- }
- msg("rsync finished successfully.");
-
- if (!prep_mode && !opt_no_lock) {
- char path[FN_REFLEN];
- char dst_path[FN_REFLEN];
- char *newline;
-
- /* Remove files that have been removed between first and
- second passes. Cannot use "rsync --delete" because it
- does not work with --files-from. */
- snprintf(rsync_tmpfile_name, sizeof(rsync_tmpfile_name),
- "%s/%s", opt_mysql_tmpdir,
- "xtrabackup_rsyncfiles_pass1");
-
- rsync_tmpfile = fopen(rsync_tmpfile_name, "r");
- if (rsync_tmpfile == NULL) {
- msg("Error: can't open file %s",
- rsync_tmpfile_name);
- ret = false;
- goto out;
- }
-
- while (fgets(path, sizeof(path), rsync_tmpfile)) {
-
- newline = strchr(path, '\n');
- if (newline) {
- *newline = 0;
- }
- if (rsync_list.count(path) < 1) {
- snprintf(dst_path, sizeof(dst_path),
- "%s/%s", xtrabackup_target_dir,
- path);
- msg("Removing %s", dst_path);
- unlink(dst_path);
- }
- }
-
- fclose(rsync_tmpfile);
- rsync_tmpfile = NULL;
- }
- }
-
- msg("Finished %s non-InnoDB tables and files",
- prep_mode ? "a prep copy of" : "backing up");
-
+ msg("Finished backing up non-InnoDB tables and files");
out:
datadir_iter_free(it);
datadir_node_free(&node);
-
- if (rsync_tmpfile != NULL) {
- fclose(rsync_tmpfile);
- }
-
return(ret);
}
-
-lsn_t get_current_lsn(MYSQL *connection)
-{
- static const char lsn_prefix[] = "\nLog sequence number ";
- lsn_t lsn = 0;
- if (MYSQL_RES *res = xb_mysql_query(connection,
- "SHOW ENGINE INNODB STATUS",
- true, false)) {
- if (MYSQL_ROW row = mysql_fetch_row(res)) {
- const char *p= strstr(row[2], lsn_prefix);
- DBUG_ASSERT(p);
- if (p) {
- p += sizeof lsn_prefix - 1;
- lsn = lsn_t(strtoll(p, NULL, 10));
- }
- }
- mysql_free_result(res);
- }
- return lsn;
-}
-
lsn_t server_lsn_after_lock;
extern void backup_wait_for_lsn(lsn_t lsn);
-/** Start --backup */
-bool backup_start(ds_ctxt *ds_data, ds_ctxt *ds_meta,
- CorruptedPages &corrupted_pages)
-{
- if (!opt_no_lock) {
- if (opt_safe_slave_backup) {
- if (!wait_for_safe_slave(mysql_connection)) {
- return(false);
- }
- }
-
- if (!backup_files(ds_data, fil_path_to_mysql_datadir, true)) {
- return(false);
- }
-
- history_lock_time = time(NULL);
-
- if (!lock_tables(mysql_connection)) {
- return(false);
- }
- server_lsn_after_lock = get_current_lsn(mysql_connection);
- }
-
- if (!backup_files(ds_data, fil_path_to_mysql_datadir, false)) {
- return(false);
- }
-
- if (!backup_files_from_datadir(ds_data, fil_path_to_mysql_datadir,
- "aws-kms-key") ||
- !backup_files_from_datadir(ds_data,
- aria_log_dir_path,
- "aria_log")) {
- return false;
- }
- if (has_rocksdb_plugin()) {
- rocksdb_create_checkpoint();
- }
-
- msg("Waiting for log copy thread to read lsn %llu", (ulonglong)server_lsn_after_lock);
- backup_wait_for_lsn(server_lsn_after_lock);
- DBUG_EXECUTE_FOR_KEY("sleep_after_waiting_for_lsn", {},
- {
- ulong milliseconds = strtoul(dbug_val, NULL, 10);
- msg("sleep_after_waiting_for_lsn");
- my_sleep(milliseconds*1000UL);
- });
-
- corrupted_pages.backup_fix_ddl(ds_data, ds_meta);
-
- // There is no need to stop slave thread before coping non-Innodb data when
- // --no-lock option is used because --no-lock option requires that no DDL or
- // DML to non-transaction tables can occur.
- if (opt_no_lock) {
- if (opt_safe_slave_backup) {
- if (!wait_for_safe_slave(mysql_connection)) {
- return(false);
- }
- }
- }
-
- if (opt_slave_info) {
- lock_binlog_maybe(mysql_connection);
-
- if (!write_slave_info(ds_data, mysql_connection)) {
- return(false);
- }
- }
-
- /* The only reason why Galera/binlog info is written before
- wait_for_ibbackup_log_copy_finish() is that after that call the xtrabackup
- binary will start streamig a temporary copy of REDO log to stdout and
- thus, any streaming from innobackupex would interfere. The only way to
- avoid that is to have a single process, i.e. merge innobackupex and
- xtrabackup. */
- if (opt_galera_info) {
- if (!write_galera_info(ds_data, mysql_connection)) {
- return(false);
- }
- }
-
- if (opt_binlog_info == BINLOG_INFO_ON) {
-
- lock_binlog_maybe(mysql_connection);
- write_binlog_info(ds_data, mysql_connection);
- }
-
- if (!opt_no_lock) {
- msg("Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...");
- xb_mysql_query(mysql_connection,
- "FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS", false);
- }
-
- return(true);
-}
-
-/** Release resources after backup_start() */
+/** Release resources after backup_files() */
void backup_release()
{
- /* release all locks */
- if (!opt_no_lock) {
- unlock_all(mysql_connection);
- history_lock_time = 0;
- } else {
- history_lock_time = time(NULL) - history_lock_time;
- }
-
if (opt_lock_ddl_per_table) {
mdl_unlock_all();
}
@@ -1530,11 +1372,11 @@ void backup_release()
static const char *default_buffer_pool_file = "ib_buffer_pool";
-/** Finish after backup_start() and backup_release() */
+/** Finish after backup_files() and backup_release() */
bool backup_finish(ds_ctxt *ds_data)
{
/* Copy buffer pool dump or LRU dump */
- if (!opt_rsync && opt_galera_info) {
+ if (opt_galera_info) {
if (buffer_pool_filename && file_exists(buffer_pool_filename)) {
ds_data->copy_file(buffer_pool_filename, default_buffer_pool_file, 0);
}
@@ -1893,8 +1735,6 @@ copy_back()
return(false);
}
- srv_max_n_threads = 1000;
-
/* copy undo tablespaces */
Copy_back_dst_dir dst_dir_buf;
@@ -1922,7 +1762,8 @@ copy_back()
dst_dir = dst_dir_buf.make(srv_log_group_home_dir);
- /* --backup generates a single ib_logfile0, which we must copy. */
+ /* --backup generates a single LOG_FILE_NAME, which we must copy
+ if it exists. */
ds_tmp = ds_create(dst_dir, DS_TYPE_LOCAL);
if (!(ret = copy_or_move_file(ds_tmp, LOG_FILE_NAME, LOG_FILE_NAME,
@@ -2155,8 +1996,6 @@ decrypt_decompress()
bool ret;
datadir_iter_t *it = NULL;
- srv_max_n_threads = 1000;
-
/* cd to backup directory */
if (my_setwd(xtrabackup_target_dir, MYF(MY_WME)))
{
@@ -2169,8 +2008,6 @@ decrypt_decompress()
it = datadir_iter_new(".", false);
- ut_a(xtrabackup_parallel >= 0);
-
ret = run_data_threads(it, decrypt_decompress_thread_func,
xtrabackup_parallel ? xtrabackup_parallel : 1);
@@ -2192,9 +2029,9 @@ decrypt_decompress()
Do not copy the Innodb files (ibdata1, redo log files),
as this is done in a separate step.
*/
-static bool backup_files_from_datadir(ds_ctxt_t *ds_data,
- const char *dir_path,
- const char *prefix)
+bool backup_files_from_datadir(ds_ctxt_t *ds_data,
+ const char *dir_path,
+ const char *prefix)
{
os_file_dir_t dir = os_file_opendir(dir_path);
if (dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr)) return false;
@@ -2218,10 +2055,6 @@ static bool backup_files_from_datadir(ds_ctxt_t *ds_data,
pname = info.name;
if (!starts_with(pname, prefix))
- /* For ES exchange the above line with the following code:
- (!xtrabackup_prepare || !xtrabackup_incremental_dir ||
- !starts_with(pname, "aria_log")))
- */
continue;
if (xtrabackup_prepare && xtrabackup_incremental_dir &&
@@ -2244,7 +2077,7 @@ static int rocksdb_remove_checkpoint_directory()
return 0;
}
-static bool has_rocksdb_plugin()
+bool has_rocksdb_plugin()
{
static bool first_time = true;
static bool has_plugin= false;
@@ -2390,7 +2223,7 @@ static void rocksdb_unlock_checkpoint()
#define MARIADB_CHECKPOINT_DIR "mariabackup-checkpoint"
static char rocksdb_checkpoint_dir[FN_REFLEN];
-static void rocksdb_create_checkpoint()
+void rocksdb_create_checkpoint()
{
MYSQL_RES *result = xb_mysql_query(mysql_connection, "SELECT @@rocksdb_datadir,@@datadir", true, true);
MYSQL_ROW row = mysql_fetch_row(result);
@@ -2470,3 +2303,39 @@ static void rocksdb_copy_back(ds_ctxt *ds_data) {
mkdirp(rocksdb_home_dir, 0777, MYF(0));
ds_data->copy_or_move_dir(ROCKSDB_BACKUP_DIR, rocksdb_home_dir, xtrabackup_copy_back, xtrabackup_copy_back);
}
+
+void foreach_file_in_db_dirs(
+ const char *dir_path, std::function<bool(const char *)> func) {
+ DBUG_ASSERT(dir_path);
+
+ datadir_iter_t *it;
+ datadir_node_t node;
+
+ datadir_node_init(&node);
+ it = datadir_iter_new(dir_path);
+
+ while (datadir_iter_next(it, &node))
+ if (!node.is_empty_dir && !func(node.filepath))
+ break;
+
+ datadir_iter_free(it);
+ datadir_node_free(&node);
+}
+
+void foreach_file_in_datadir(
+ const char *dir_path, std::function<bool(const char *)> func)
+{
+ DBUG_ASSERT(dir_path);
+ os_file_dir_t dir = os_file_opendir(dir_path);
+ os_file_stat_t info;
+ while (os_file_readdir_next_file(dir_path, dir, &info) == 0) {
+ if (info.type != OS_FILE_TYPE_FILE)
+ continue;
+ const char *pname = strrchr(info.name, IF_WIN('\\', '/'));
+ if (!pname)
+ pname = info.name;
+ if (!func(pname))
+ break;
+ }
+ os_file_closedir(dir);
+}
diff --git a/extra/mariabackup/backup_copy.h b/extra/mariabackup/backup_copy.h
index b5aaf312..409e7839 100644
--- a/extra/mariabackup/backup_copy.h
+++ b/extra/mariabackup/backup_copy.h
@@ -2,6 +2,7 @@
#ifndef XTRABACKUP_BACKUP_COPY_H
#define XTRABACKUP_BACKUP_COPY_H
+#include <functional>
#include <my_global.h>
#include <mysql.h>
#include "datasink.h"
@@ -21,11 +22,10 @@ bool
equal_paths(const char *first, const char *second);
/** Start --backup */
-bool backup_start(ds_ctxt *ds_data, ds_ctxt *ds_meta,
- CorruptedPages &corrupted_pages);
-/** Release resources after backup_start() */
+bool backup_files(ds_ctxt *ds_data, const char *from);
+/** Release resources after backup_files() */
void backup_release();
-/** Finish after backup_start() and backup_release() */
+/** Finish after backup_files() and backup_release() */
bool backup_finish(ds_ctxt *ds_data);
bool
apply_log_finish();
@@ -38,7 +38,25 @@ is_path_separator(char);
bool
directory_exists(const char *dir, bool create);
-lsn_t
-get_current_lsn(MYSQL *connection);
-
+bool has_rocksdb_plugin();
+void rocksdb_create_checkpoint();
+void foreach_file_in_db_dirs(
+ const char *dir_path, std::function<bool(const char *)> func);
+void foreach_file_in_datadir(
+ const char *dir_path, std::function<bool(const char *)> func);
+bool ends_with(const char *str, const char *suffix);
+bool starts_with(const char *str, const char *prefix);
+void parse_db_table_from_file_path(
+ const char *filepath, char *dbname, char *tablename);
+const char *trim_dotslash(const char *path);
+bool backup_files_from_datadir(ds_ctxt_t *ds_data,
+ const char *dir_path,
+ const char *prefix);
+
+bool is_system_table(const char *dbname, const char *tablename);
+std::unique_ptr<std::vector<std::string>>
+ find_files(const char *dir_path, const char *prefix, const char *suffix);
+bool file_exists(const char *filename);
+bool
+filename_matches(const char *filename, const char **ext_list);
#endif
diff --git a/extra/mariabackup/backup_debug.h b/extra/mariabackup/backup_debug.h
index 777b4f4a..9286bc7b 100644
--- a/extra/mariabackup/backup_debug.h
+++ b/extra/mariabackup/backup_debug.h
@@ -1,5 +1,6 @@
#pragma once
#include "my_dbug.h"
+
#ifndef DBUG_OFF
char *dbug_mariabackup_get_val(const char *event, fil_space_t::name_type key);
/*
@@ -14,11 +15,21 @@ To use this facility, you need to
for the variable)
3. start mariabackup with --dbug=+d,debug_mariabackup_events
*/
-#define DBUG_EXECUTE_FOR_KEY(EVENT, KEY, CODE) \
- DBUG_EXECUTE_IF("mariabackup_inject_code", \
- { char *dbug_val= dbug_mariabackup_get_val(EVENT, KEY); \
- if (dbug_val) CODE })
+extern void dbug_mariabackup_event(
+ const char *event, const fil_space_t::name_type key, bool need_lock);
+#define DBUG_MARIABACKUP_EVENT(A, B) \
+ DBUG_EXECUTE_IF("mariabackup_events", \
+ dbug_mariabackup_event(A,B,false););
+#define DBUG_MARIABACKUP_EVENT_LOCK(A, B) \
+ DBUG_EXECUTE_IF("mariabackup_events", \
+ dbug_mariabackup_event(A,B, true););
+#define DBUG_EXECUTE_FOR_KEY(EVENT, KEY, CODE) \
+ DBUG_EXECUTE_IF("mariabackup_inject_code", {\
+ char *dbug_val = dbug_mariabackup_get_val(EVENT, KEY); \
+ if (dbug_val && *dbug_val) CODE \
+ })
#else
+#define DBUG_MARIABACKUP_EVENT(A,B)
+#define DBUG_MARIABACKUP_EVENT_LOCK(A,B)
#define DBUG_EXECUTE_FOR_KEY(EVENT, KEY, CODE)
#endif
-
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index c2f15da4..2aad6004 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -47,6 +47,12 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <stdlib.h>
#include <string.h>
#include <limits>
+#ifdef HAVE_PWD_H
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <pwd.h>
+#endif
#include "common.h"
#include "xtrabackup.h"
#include "srv0srv.h"
@@ -54,19 +60,19 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include "backup_copy.h"
#include "backup_mysql.h"
#include "mysqld.h"
-#include "xb_plugin.h"
+#include "encryption_plugin.h"
#include <sstream>
#include <sql_error.h>
#include "page0zip.h"
+#include "backup_debug.h"
char *tool_name;
-char tool_args[2048];
+char tool_args[8192];
ulong mysql_server_version;
/* server capabilities */
bool have_changed_page_bitmaps = false;
-bool have_backup_locks = false;
bool have_lock_wait_timeout = false;
bool have_galera_enabled = false;
bool have_multi_threaded_slave = false;
@@ -92,11 +98,54 @@ MYSQL *mysql_connection;
extern my_bool opt_ssl_verify_server_cert, opt_use_ssl;
+
+/*
+ get_os_user()
+ Ressemles read_user_name() from libmariadb/libmariadb/mariadb_lib.c.
+*/
+
+#if !defined(_WIN32)
+
+#if defined(HAVE_GETPWUID) && defined(NO_GETPWUID_DECL)
+struct passwd *getpwuid(uid_t);
+char* getlogin(void);
+#endif
+
+static const char *get_os_user() // Posix
+{
+ if (!geteuid())
+ return "root";
+#ifdef HAVE_GETPWUID
+ struct passwd *pw;
+ const char *str;
+ if ((pw= getpwuid(geteuid())) != NULL)
+ return pw->pw_name;
+ if ((str= getlogin()) != NULL)
+ return str;
+#endif
+ if ((str= getenv("USER")) ||
+ (str= getenv("LOGNAME")) ||
+ (str= getenv("LOGIN")))
+ return str;
+ return NULL;
+}
+
+#else
+
+static const char *get_os_user() // Windows
+{
+ return getenv("USERNAME");
+}
+
+#endif // _WIN32
+
+
MYSQL *
xb_mysql_connect()
{
MYSQL *connection = mysql_init(NULL);
char mysql_port_str[std::numeric_limits<int>::digits10 + 3];
+ const char *user= opt_user ? opt_user : get_os_user();
sprintf(mysql_port_str, "%d", opt_port);
@@ -126,7 +175,7 @@ xb_mysql_connect()
msg("Connecting to MariaDB server host: %s, user: %s, password: %s, "
"port: %s, socket: %s", opt_host ? opt_host : "localhost",
- opt_user ? opt_user : "not set",
+ user ? user : "not set",
opt_password ? "set" : "not set",
opt_port != 0 ? mysql_port_str : "not set",
opt_socket ? opt_socket : "not set");
@@ -147,7 +196,7 @@ xb_mysql_connect()
if (!mysql_real_connect(connection,
opt_host ? opt_host : "localhost",
- opt_user,
+ user,
opt_password,
"" /*database*/, opt_port,
opt_socket, 0)) {
@@ -203,13 +252,14 @@ struct mysql_variable {
static
-void
+uint
read_mysql_variables(MYSQL *connection, const char *query, mysql_variable *vars,
bool vertical_result)
{
MYSQL_RES *mysql_result;
MYSQL_ROW row;
mysql_variable *var;
+ uint n_values=0;
mysql_result = xb_mysql_query(connection, query, true);
@@ -223,6 +273,7 @@ read_mysql_variables(MYSQL *connection, const char *query, mysql_variable *vars,
if (strcmp(var->name, name) == 0
&& value != NULL) {
*(var->value) = strdup(value);
+ n_values++;
}
}
}
@@ -239,6 +290,7 @@ read_mysql_variables(MYSQL *connection, const char *query, mysql_variable *vars,
if (strcmp(var->name, name) == 0
&& value != NULL) {
*(var->value) = strdup(value);
+ n_values++;
}
}
++i;
@@ -247,6 +299,7 @@ read_mysql_variables(MYSQL *connection, const char *query, mysql_variable *vars,
}
mysql_free_result(mysql_result);
+ return n_values;
}
@@ -311,7 +364,6 @@ bool get_mysql_vars(MYSQL *connection)
{
char *gtid_mode_var= NULL;
char *version_var= NULL;
- char *have_backup_locks_var= NULL;
char *log_bin_var= NULL;
char *lock_wait_timeout_var= NULL;
char *wsrep_on_var= NULL;
@@ -336,7 +388,6 @@ bool get_mysql_vars(MYSQL *connection)
bool ret= true;
mysql_variable mysql_vars[]= {
- {"have_backup_locks", &have_backup_locks_var},
{"log_bin", &log_bin_var},
{"lock_wait_timeout", &lock_wait_timeout_var},
{"gtid_mode", &gtid_mode_var},
@@ -361,11 +412,6 @@ bool get_mysql_vars(MYSQL *connection)
read_mysql_variables(connection, "SHOW VARIABLES", mysql_vars, true);
- if (have_backup_locks_var != NULL && !opt_no_backup_locks)
- {
- have_backup_locks= true;
- }
-
if (opt_binlog_info == BINLOG_INFO_AUTO)
{
if (log_bin_var != NULL && !strcmp(log_bin_var, "ON"))
@@ -512,24 +558,6 @@ Query the server to find out what backup capabilities it supports.
bool
detect_mysql_capabilities_for_backup()
{
- const char *query = "SELECT 'INNODB_CHANGED_PAGES', COUNT(*) FROM "
- "INFORMATION_SCHEMA.PLUGINS "
- "WHERE PLUGIN_NAME LIKE 'INNODB_CHANGED_PAGES'";
- char *innodb_changed_pages = NULL;
- mysql_variable vars[] = {
- {"INNODB_CHANGED_PAGES", &innodb_changed_pages}, {NULL, NULL}};
-
- if (xtrabackup_incremental) {
-
- read_mysql_variables(mysql_connection, query, vars, true);
-
- ut_ad(innodb_changed_pages != NULL);
-
- have_changed_page_bitmaps = (atoi(innodb_changed_pages) == 1);
-
- free_mysql_variables(vars);
- }
-
/* do some sanity checks */
if (opt_galera_info && !have_galera_enabled) {
msg("--galera-info is specified on the command "
@@ -837,11 +865,11 @@ static void stop_query_killer()
/*********************************************************************//**
-Function acquires either a backup tables lock, if supported
-by the server, or a global read lock (FLUSH TABLES WITH READ LOCK)
-otherwise.
+Function acquires backup locks
@returns true if lock acquired */
-bool lock_tables(MYSQL *connection)
+
+bool
+lock_for_backup_stage_start(MYSQL *connection)
{
if (have_lock_wait_timeout || opt_lock_wait_timeout)
{
@@ -854,12 +882,6 @@ bool lock_tables(MYSQL *connection)
xb_mysql_query(connection, buf, false);
}
- if (have_backup_locks)
- {
- msg("Executing LOCK TABLES FOR BACKUP...");
- xb_mysql_query(connection, "LOCK TABLES FOR BACKUP", false);
- return (true);
- }
if (opt_lock_wait_timeout)
{
@@ -884,8 +906,6 @@ bool lock_tables(MYSQL *connection)
xb_mysql_query(connection, "BACKUP STAGE START", true);
DBUG_MARIABACKUP_EVENT("after_backup_stage_start", {});
- xb_mysql_query(connection, "BACKUP STAGE BLOCK_COMMIT", true);
- DBUG_MARIABACKUP_EVENT("after_backup_stage_block_commit", {});
/* Set the maximum supported session value for
lock_wait_timeout to prevent unnecessary timeouts when the
global value is changed from the default */
@@ -901,24 +921,68 @@ bool lock_tables(MYSQL *connection)
return (true);
}
-/*********************************************************************//**
-If backup locks are used, execute LOCK BINLOG FOR BACKUP provided that we are
-not in the --no-lock mode and the lock has not been acquired already.
-@returns true if lock acquired */
bool
-lock_binlog_maybe(MYSQL *connection)
-{
- if (have_backup_locks && !opt_no_lock && !binlog_locked) {
- msg("Executing LOCK BINLOG FOR BACKUP...");
- xb_mysql_query(connection, "LOCK BINLOG FOR BACKUP", false);
- binlog_locked = true;
+lock_for_backup_stage_flush(MYSQL *connection) {
+ if (opt_kill_long_queries_timeout) {
+ start_query_killer();
+ }
+ xb_mysql_query(connection, "BACKUP STAGE FLUSH", true);
+ if (opt_kill_long_queries_timeout) {
+ stop_query_killer();
+ }
+ return true;
+}
- return(true);
+bool
+lock_for_backup_stage_block_ddl(MYSQL *connection) {
+ if (opt_kill_long_queries_timeout) {
+ start_query_killer();
+ }
+ xb_mysql_query(connection, "BACKUP STAGE BLOCK_DDL", true);
+ DBUG_MARIABACKUP_EVENT("after_backup_stage_block_ddl", {});
+ if (opt_kill_long_queries_timeout) {
+ stop_query_killer();
}
+ return true;
+}
- return(false);
+bool
+lock_for_backup_stage_commit(MYSQL *connection) {
+ if (opt_kill_long_queries_timeout) {
+ start_query_killer();
+ }
+ xb_mysql_query(connection, "BACKUP STAGE BLOCK_COMMIT", true);
+ DBUG_MARIABACKUP_EVENT("after_backup_stage_block_commit", {});
+ if (opt_kill_long_queries_timeout) {
+ stop_query_killer();
+ }
+ return true;
}
+bool backup_lock(MYSQL *con, const char *table_name) {
+ static const std::string backup_lock_prefix("BACKUP LOCK ");
+ std::string backup_lock_query = backup_lock_prefix + table_name;
+ xb_mysql_query(con, backup_lock_query.c_str(), true);
+ return true;
+}
+
+bool backup_unlock(MYSQL *con) {
+ xb_mysql_query(con, "BACKUP UNLOCK", true);
+ return true;
+}
+
+std::unordered_set<std::string>
+get_tables_in_use(MYSQL *con) {
+ std::unordered_set<std::string> result;
+ MYSQL_RES *q_res =
+ xb_mysql_query(con, "SHOW OPEN TABLES WHERE In_use = 1", true);
+ while (MYSQL_ROW row = mysql_fetch_row(q_res)) {
+ auto tk = table_key(row[0], row[1]);
+ msg("Table %s is in use", tk.c_str());
+ result.insert(std::move(tk));
+ }
+ return result;
+}
/*********************************************************************//**
Releases either global read lock acquired with FTWRL and the binlog
@@ -1353,77 +1417,103 @@ write_slave_info(ds_ctxt *datasink, MYSQL *connection)
/*********************************************************************//**
-Retrieves MySQL Galera and
-saves it in a file. It also prints it to stdout. */
+Retrieves MySQL Galera and saves it in a file. It also prints it to stdout.
+
+We should create xtrabackup_galelera_info file even when backup locks
+are used because donor's wsrep_gtid_domain_id is needed later in joiner.
+Note that at this stage wsrep_local_state_uuid and wsrep_last_committed
+are inconsistent but they are not used in joiner. Joiner will rewrite this file
+at mariabackup --prepare phase and thus there is extra file donor_galera_info.
+Information is needed to maitain wsrep_gtid_domain_id and gtid_binlog_pos
+same across the cluster. If joiner node have different wsrep_gtid_domain_id
+we should still receive effective domain id from the donor node,
+and use it.
+*/
bool
write_galera_info(ds_ctxt *datasink, MYSQL *connection)
{
- char *state_uuid = NULL, *state_uuid55 = NULL;
- char *last_committed = NULL, *last_committed55 = NULL;
- char *domain_id = NULL, *domain_id55 = NULL;
- bool result;
-
- mysql_variable status[] = {
- {"Wsrep_local_state_uuid", &state_uuid},
- {"wsrep_local_state_uuid", &state_uuid55},
- {"Wsrep_last_committed", &last_committed},
- {"wsrep_last_committed", &last_committed55},
- {NULL, NULL}
- };
+ char *state_uuid = NULL, *state_uuid55 = NULL;
+ char *last_committed = NULL, *last_committed55 = NULL;
+ char *domain_id = NULL, *domain_id55 = NULL;
+ bool result=true;
+ uint n_values=0;
+ char *wsrep_on = NULL, *wsrep_on55 = NULL;
+
+ mysql_variable vars[] = {
+ {"Wsrep_on", &wsrep_on},
+ {"wsrep_on", &wsrep_on55},
+ {NULL, NULL}
+ };
+
+ mysql_variable status[] = {
+ {"Wsrep_local_state_uuid", &state_uuid},
+ {"wsrep_local_state_uuid", &state_uuid55},
+ {"Wsrep_last_committed", &last_committed},
+ {"wsrep_last_committed", &last_committed55},
+ {NULL, NULL}
+ };
+
+ mysql_variable value[] = {
+ {"Wsrep_gtid_domain_id", &domain_id},
+ {"wsrep_gtid_domain_id", &domain_id55},
+ {NULL, NULL}
+ };
+
+ n_values= read_mysql_variables(connection, "SHOW VARIABLES", vars, true);
+
+ if (n_values == 0 || (wsrep_on == NULL && wsrep_on55 == NULL))
+ {
+ msg("Server is not Galera node thus --galera-info does not "
+ "have any effect.");
+ result = true;
+ goto cleanup;
+ }
- mysql_variable value[] = {
- {"Wsrep_gtid_domain_id", &domain_id},
- {"wsrep_gtid_domain_id", &domain_id55},
- {NULL, NULL}
- };
+ read_mysql_variables(connection, "SHOW STATUS", status, true);
- /* When backup locks are supported by the server, we should skip
- creating xtrabackup_galera_info file on the backup stage, because
- wsrep_local_state_uuid and wsrep_last_committed will be inconsistent
- without blocking commits. The state file will be created on the prepare
- stage using the WSREP recovery procedure. */
- if (have_backup_locks) {
- return(true);
- }
+ if ((state_uuid == NULL && state_uuid55 == NULL)
+ || (last_committed == NULL && last_committed55 == NULL))
+ {
+ msg("Warning: failed to get master wsrep state from SHOW STATUS.");
+ result = true;
+ goto cleanup;
+ }
- read_mysql_variables(connection, "SHOW STATUS", status, true);
+ n_values= read_mysql_variables(connection, "SHOW VARIABLES LIKE 'wsrep%'", value, true);
- if ((state_uuid == NULL && state_uuid55 == NULL)
- || (last_committed == NULL && last_committed55 == NULL)) {
- msg("Warning: failed to get master wsrep state from SHOW STATUS.");
- result = true;
- goto cleanup;
- }
+ if (n_values == 0 || (domain_id == NULL && domain_id55 == NULL))
+ {
+ msg("Warning: failed to get master wsrep state from SHOW VARIABLES.");
+ result = true;
+ goto cleanup;
+ }
- read_mysql_variables(connection, "SHOW VARIABLES LIKE 'wsrep%'", value, true);
+ result= datasink->backup_file_printf(XTRABACKUP_GALERA_INFO,
+ "%s:%s %s\n", state_uuid ? state_uuid : state_uuid55,
+ last_committed ? last_committed : last_committed55,
+ domain_id ? domain_id : domain_id55);
- if (domain_id == NULL && domain_id55 == NULL) {
- msg("Warning: failed to get master wsrep state from SHOW VARIABLES.");
- result = true;
- goto cleanup;
- }
+ if (result)
+ {
+ result= datasink->backup_file_printf(XTRABACKUP_DONOR_GALERA_INFO,
+ "%s:%s %s\n", state_uuid ? state_uuid : state_uuid55,
+ last_committed ? last_committed : last_committed55,
+ domain_id ? domain_id : domain_id55);
+ }
- result = datasink->backup_file_printf(XTRABACKUP_GALERA_INFO,
- "%s:%s %s\n", state_uuid ? state_uuid : state_uuid55,
- last_committed ? last_committed : last_committed55,
- domain_id ? domain_id : domain_id55);
+ if (result)
+ write_current_binlog_file(datasink, connection);
- if (result)
- {
- result= datasink->backup_file_printf(XTRABACKUP_DONOR_GALERA_INFO,
- "%s:%s %s\n", state_uuid ? state_uuid : state_uuid55,
- last_committed ? last_committed : last_committed55,
- domain_id ? domain_id : domain_id55);
- }
- if (result)
- {
- write_current_binlog_file(datasink, connection);
- }
+ if (result)
+ msg("Writing Galera info succeeded with %s:%s %s",
+ state_uuid ? state_uuid : state_uuid55,
+ last_committed ? last_committed : last_committed55,
+ domain_id ? domain_id : domain_id55);
cleanup:
- free_mysql_variables(status);
+ free_mysql_variables(status);
- return(result);
+ return(result);
}
@@ -1466,8 +1556,6 @@ write_current_binlog_file(ds_ctxt *datasink, MYSQL *connection)
if (gtid_exists) {
size_t log_bin_dir_length;
- lock_binlog_maybe(connection);
-
xb_mysql_query(connection, "FLUSH BINARY LOGS", false);
read_mysql_variables(connection, "SHOW MASTER STATUS",
@@ -1826,13 +1914,13 @@ bool write_backup_config_file(ds_ctxt *datasink)
srv_log_file_size,
srv_page_size,
srv_undo_dir,
- srv_undo_tablespaces,
+ (uint) srv_undo_tablespaces,
page_zip_level,
innobase_buffer_pool_filename ?
"innodb_buffer_pool_filename=" : "",
innobase_buffer_pool_filename ?
innobase_buffer_pool_filename : "",
- xb_plugin_get_config());
+ encryption_plugin_get_config());
return rc;
}
@@ -1851,9 +1939,11 @@ char *make_argv(char *buf, size_t len, int argc, char **argv)
if (strncmp(*argv, "--password", strlen("--password")) == 0) {
arg = "--password=...";
}
- left-= snprintf(buf + len - left, left,
+ uint l= snprintf(buf + len - left, left,
"%s%c", arg, argc > 1 ? ' ' : 0);
++argv; --argc;
+ if (l < left)
+ left-= l;
}
return buf;
@@ -1882,18 +1972,6 @@ select_history()
return(true);
}
-bool
-flush_changed_page_bitmaps()
-{
- if (xtrabackup_incremental && have_changed_page_bitmaps &&
- !xtrabackup_incremental_force_scan) {
- xb_mysql_query(mysql_connection,
- "FLUSH NO_WRITE_TO_BINLOG CHANGED_PAGE_BITMAPS", false);
- }
- return(true);
-}
-
-
/*********************************************************************//**
Deallocate memory, disconnect from server, etc.
@return true on success. */
@@ -1969,3 +2047,23 @@ mdl_unlock_all()
mysql_close(mdl_con);
spaceid_to_tablename.clear();
}
+
+ulonglong get_current_lsn(MYSQL *connection)
+{
+ static const char lsn_prefix[] = "\nLog sequence number ";
+ ulonglong lsn = 0;
+ if (MYSQL_RES *res = xb_mysql_query(connection,
+ "SHOW ENGINE INNODB STATUS",
+ true, false)) {
+ if (MYSQL_ROW row = mysql_fetch_row(res)) {
+ const char *p= strstr(row[2], lsn_prefix);
+ DBUG_ASSERT(p);
+ if (p) {
+ p += sizeof lsn_prefix - 1;
+ lsn = lsn_t(strtoll(p, NULL, 10));
+ }
+ }
+ mysql_free_result(res);
+ }
+ return lsn;
+}
diff --git a/extra/mariabackup/backup_mysql.h b/extra/mariabackup/backup_mysql.h
index 4b08da0b..c87efd21 100644
--- a/extra/mariabackup/backup_mysql.h
+++ b/extra/mariabackup/backup_mysql.h
@@ -2,13 +2,15 @@
#define XTRABACKUP_BACKUP_MYSQL_H
#include <mysql.h>
+#include <string>
+#include <unordered_set>
+#include "datasink.h"
/* MariaDB version */
extern ulong mysql_server_version;
/* server capabilities */
extern bool have_changed_page_bitmaps;
-extern bool have_backup_locks;
extern bool have_lock_wait_timeout;
extern bool have_galera_enabled;
extern bool have_multi_threaded_slave;
@@ -35,9 +37,6 @@ capture_tool_command(int argc, char **argv);
bool
select_history();
-bool
-flush_changed_page_bitmaps();
-
void
backup_cleanup();
@@ -75,7 +74,21 @@ bool
lock_binlog_maybe(MYSQL *connection);
bool
-lock_tables(MYSQL *connection);
+lock_for_backup_stage_start(MYSQL *connection);
+
+bool
+lock_for_backup_stage_flush(MYSQL *connection);
+
+bool
+lock_for_backup_stage_block_ddl(MYSQL *connection);
+
+bool
+lock_for_backup_stage_commit(MYSQL *connection);
+
+bool backup_lock(MYSQL *con, const char *table_name);
+bool backup_unlock(MYSQL *con);
+
+std::unordered_set<std::string> get_tables_in_use(MYSQL *con);
bool
wait_for_safe_slave(MYSQL *connection);
@@ -86,5 +99,6 @@ write_galera_info(ds_ctxt *datasink, MYSQL *connection);
bool
write_slave_info(ds_ctxt *datasink, MYSQL *connection);
+ulonglong get_current_lsn(MYSQL *connection);
#endif
diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc
deleted file mode 100644
index 39a07a25..00000000
--- a/extra/mariabackup/changed_page_bitmap.cc
+++ /dev/null
@@ -1,1040 +0,0 @@
-/******************************************************
-XtraBackup: hot backup tool for InnoDB
-(c) 2009-2012 Percona Inc.
-Originally Created 3/3/2009 Yasufumi Kinoshita
-Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
-Yasufumi Kinoshita, Ignacio Nin and Baron Schwartz.
-
-This program is free 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
-
-*******************************************************/
-
-/* Changed page bitmap implementation */
-
-#include "changed_page_bitmap.h"
-
-#include "common.h"
-#include "xtrabackup.h"
-#include "srv0srv.h"
-
-/* TODO: copy-pasted shared definitions from the XtraDB bitmap write code.
-Remove these on the first opportunity, i.e. single-binary XtraBackup. */
-
-/* log0online.h */
-
-/** Single bitmap file information */
-struct log_online_bitmap_file_t {
- char name[FN_REFLEN]; /*!< Name with full path */
- pfs_os_file_t file; /*!< Handle to opened file */
- ib_uint64_t size; /*!< Size of the file */
- ib_uint64_t offset; /*!< Offset of the next read,
- or count of already-read bytes
- */
-};
-
-/** A set of bitmap files containing some LSN range */
-struct log_online_bitmap_file_range_t {
- size_t count; /*!< Number of files */
- /*!< Dynamically-allocated array of info about individual files */
- struct files_t {
- char name[FN_REFLEN];/*!< Name of a file */
- lsn_t start_lsn; /*!< Starting LSN of data in this
- file */
- ulong seq_num; /*!< Sequence number of this file */
- } *files;
-};
-
-/* log0online.c */
-
-/** File name stem for bitmap files. */
-static const char* bmp_file_name_stem = "ib_modified_log_";
-
-/** The bitmap file block size in bytes. All writes will be multiples of this.
- */
-enum {
- MODIFIED_PAGE_BLOCK_SIZE = 4096
-};
-
-/** Offsets in a file bitmap block */
-enum {
- MODIFIED_PAGE_IS_LAST_BLOCK = 0,/* 1 if last block in the current
- write, 0 otherwise. */
- MODIFIED_PAGE_START_LSN = 4, /* The starting tracked LSN of this and
- other blocks in the same write */
- MODIFIED_PAGE_END_LSN = 12, /* The ending tracked LSN of this and
- other blocks in the same write */
- MODIFIED_PAGE_SPACE_ID = 20, /* The space ID of tracked pages in
- this block */
- MODIFIED_PAGE_1ST_PAGE_ID = 24, /* The page ID of the first tracked
- page in this block */
- MODIFIED_PAGE_BLOCK_UNUSED_1 = 28,/* Unused in order to align the start
- of bitmap at 8 byte boundary */
- MODIFIED_PAGE_BLOCK_BITMAP = 32,/* Start of the bitmap itself */
- MODIFIED_PAGE_BLOCK_UNUSED_2 = MODIFIED_PAGE_BLOCK_SIZE - 8,
- /* Unused in order to align the end of
- bitmap at 8 byte boundary */
- MODIFIED_PAGE_BLOCK_CHECKSUM = MODIFIED_PAGE_BLOCK_SIZE - 4
- /* The checksum of the current block */
-};
-
-/** Length of the bitmap data in a block */
-enum { MODIFIED_PAGE_BLOCK_BITMAP_LEN
- = MODIFIED_PAGE_BLOCK_UNUSED_2 - MODIFIED_PAGE_BLOCK_BITMAP };
-
-/** Length of the bitmap data in a block in page ids */
-enum { MODIFIED_PAGE_BLOCK_ID_COUNT = MODIFIED_PAGE_BLOCK_BITMAP_LEN * 8 };
-
-typedef ib_uint64_t bitmap_word_t;
-
-/****************************************************************//**
-Calculate a bitmap block checksum. Algorithm borrowed from
-log_block_calc_checksum.
-@return checksum */
-UNIV_INLINE
-ulint
-log_online_calc_checksum(
-/*=====================*/
- const byte* block); /*!<in: bitmap block */
-
-/****************************************************************//**
-Provide a comparisson function for the RB-tree tree (space,
-block_start_page) pairs. Actual implementation does not matter as
-long as the ordering is full.
-@return -1 if p1 < p2, 0 if p1 == p2, 1 if p1 > p2
-*/
-static
-int
-log_online_compare_bmp_keys(
-/*========================*/
- const void* p1, /*!<in: 1st key to compare */
- const void* p2) /*!<in: 2nd key to compare */
-{
- const byte *k1 = (const byte *)p1;
- const byte *k2 = (const byte *)p2;
-
- ulint k1_space = mach_read_from_4(k1 + MODIFIED_PAGE_SPACE_ID);
- ulint k2_space = mach_read_from_4(k2 + MODIFIED_PAGE_SPACE_ID);
- if (k1_space == k2_space) {
-
- ulint k1_start_page
- = mach_read_from_4(k1 + MODIFIED_PAGE_1ST_PAGE_ID);
- ulint k2_start_page
- = mach_read_from_4(k2 + MODIFIED_PAGE_1ST_PAGE_ID);
- return k1_start_page < k2_start_page
- ? -1 : k1_start_page > k2_start_page ? 1 : 0;
- }
- return k1_space < k2_space ? -1 : 1;
-}
-
-/****************************************************************//**
-Calculate a bitmap block checksum. Algorithm borrowed from
-log_block_calc_checksum.
-@return checksum */
-UNIV_INLINE
-ulint
-log_online_calc_checksum(
-/*=====================*/
- const byte* block) /*!<in: bitmap block */
-{
- ulint sum;
- ulint sh;
- ulint i;
-
- sum = 1;
- sh = 0;
-
- for (i = 0; i < MODIFIED_PAGE_BLOCK_CHECKSUM; i++) {
-
- ulint b = block[i];
- sum &= 0x7FFFFFFFUL;
- sum += b;
- sum += b << sh;
- sh++;
- if (sh > 24) {
-
- sh = 0;
- }
- }
-
- return sum;
-}
-
-/****************************************************************//**
-Read one bitmap data page and check it for corruption.
-
-@return TRUE if page read OK, FALSE if I/O error */
-static
-ibool
-log_online_read_bitmap_page(
-/*========================*/
- log_online_bitmap_file_t *bitmap_file, /*!<in/out: bitmap
- file */
- byte *page, /*!<out: read page. Must be at
- least MODIFIED_PAGE_BLOCK_SIZE
- bytes long */
- ibool *checksum_ok) /*!<out: TRUE if page
- checksum OK */
-{
- ulint checksum;
- ulint actual_checksum;
-
- ut_a(bitmap_file->size >= MODIFIED_PAGE_BLOCK_SIZE);
- ut_a(bitmap_file->offset
- <= bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE);
- ut_a(bitmap_file->offset % MODIFIED_PAGE_BLOCK_SIZE == 0);
- if (DB_SUCCESS !=
- os_file_read(IORequestRead, bitmap_file->file, page,
- bitmap_file->offset, MODIFIED_PAGE_BLOCK_SIZE,
- nullptr)) {
- /* The following call prints an error message */
- os_file_get_last_error(TRUE);
- msg("InnoDB: Warning: failed reading changed page bitmap "
- "file \'%s\'", bitmap_file->name);
- return FALSE;
- }
-
- bitmap_file->offset += MODIFIED_PAGE_BLOCK_SIZE;
- ut_ad(bitmap_file->offset <= bitmap_file->size);
-
- checksum = mach_read_from_4(page + MODIFIED_PAGE_BLOCK_CHECKSUM);
- actual_checksum = log_online_calc_checksum(page);
- *checksum_ok = (checksum == actual_checksum);
-
- return TRUE;
-}
-
-/*********************************************************************//**
-Check the name of a given file if it's a changed page bitmap file and
-return file sequence and start LSN name components if it is. If is not,
-the values of output parameters are undefined.
-
-@return TRUE if a given file is a changed page bitmap file. */
-static
-ibool
-log_online_is_bitmap_file(
-/*======================*/
- const os_file_stat_t* file_info, /*!<in: file to
- check */
- ulong* bitmap_file_seq_num, /*!<out: bitmap file
- sequence number */
- lsn_t* bitmap_file_start_lsn) /*!<out: bitmap file
- start LSN */
-{
- char stem[FN_REFLEN];
-
- ut_ad (strlen(file_info->name) < OS_FILE_MAX_PATH);
-
- return ((file_info->type == OS_FILE_TYPE_FILE
- || file_info->type == OS_FILE_TYPE_LINK)
- && (sscanf(file_info->name, "%[a-z_]%lu_" LSN_PF ".xdb", stem,
- bitmap_file_seq_num, bitmap_file_start_lsn) == 3)
- && (!strcmp(stem, bmp_file_name_stem)));
-}
-
-/*********************************************************************//**
-List the bitmap files in srv_data_home and setup their range that contains the
-specified LSN interval. This range, if non-empty, will start with a file that
-has the greatest LSN equal to or less than the start LSN and will include all
-the files up to the one with the greatest LSN less than the end LSN. Caller
-must free bitmap_files->files when done if bitmap_files set to non-NULL and
-this function returned TRUE. Field bitmap_files->count might be set to a
-larger value than the actual count of the files, and space for the unused array
-slots will be allocated but cleared to zeroes.
-
-@return TRUE if succeeded
-*/
-static
-ibool
-log_online_setup_bitmap_file_range(
-/*===============================*/
- log_online_bitmap_file_range_t *bitmap_files, /*!<in/out: bitmap file
- range */
- lsn_t range_start, /*!<in: start LSN */
- lsn_t range_end) /*!<in: end LSN */
-{
- os_file_dir_t bitmap_dir;
- os_file_stat_t bitmap_dir_file_info;
- ulong first_file_seq_num = ULONG_MAX;
- ulong last_file_seq_num = 0;
- lsn_t first_file_start_lsn = LSN_MAX;
-
- xb_ad(range_end >= range_start);
-
- bitmap_files->count = 0;
- bitmap_files->files = NULL;
-
- /* 1st pass: size the info array */
-
- 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;
- }
-
- while (!os_file_readdir_next_file(srv_data_home, bitmap_dir,
- &bitmap_dir_file_info)) {
-
- ulong file_seq_num;
- lsn_t file_start_lsn;
-
- if (!log_online_is_bitmap_file(&bitmap_dir_file_info,
- &file_seq_num,
- &file_start_lsn)
- || file_start_lsn >= range_end) {
-
- continue;
- }
-
- if (file_seq_num > last_file_seq_num) {
-
- last_file_seq_num = file_seq_num;
- }
-
- if (file_start_lsn >= range_start
- || file_start_lsn == first_file_start_lsn
- || first_file_start_lsn > range_start) {
-
- /* A file that falls into the range */
-
- if (file_start_lsn < first_file_start_lsn) {
-
- first_file_start_lsn = file_start_lsn;
- }
- if (file_seq_num < first_file_seq_num) {
-
- first_file_seq_num = file_seq_num;
- }
- } else if (file_start_lsn > first_file_start_lsn) {
-
- /* A file that has LSN closer to the range start
- but smaller than it, replacing another such file */
- first_file_start_lsn = file_start_lsn;
- first_file_seq_num = file_seq_num;
- }
- }
-
- 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;
- }
-
- if (first_file_seq_num == ULONG_MAX && last_file_seq_num == 0) {
-
- bitmap_files->count = 0;
- return TRUE;
- }
-
- bitmap_files->count = last_file_seq_num - first_file_seq_num + 1;
-
- /* 2nd pass: get the file names in the file_seq_num order */
-
- 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;
- }
-
- bitmap_files->files =
- static_cast<log_online_bitmap_file_range_t::files_t *>
- (malloc(bitmap_files->count * sizeof(bitmap_files->files[0])));
- memset(bitmap_files->files, 0,
- bitmap_files->count * sizeof(bitmap_files->files[0]));
-
- while (!os_file_readdir_next_file(srv_data_home, bitmap_dir,
- &bitmap_dir_file_info)) {
-
- ulong file_seq_num;
- lsn_t file_start_lsn;
- size_t array_pos;
-
- if (!log_online_is_bitmap_file(&bitmap_dir_file_info,
- &file_seq_num,
- &file_start_lsn)
- || file_start_lsn >= range_end
- || file_start_lsn < first_file_start_lsn) {
-
- continue;
- }
-
- array_pos = file_seq_num - first_file_seq_num;
- if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {
-
- msg("InnoDB: Error: inconsistent bitmap file "
- "directory");
- os_file_closedir(bitmap_dir);
- free(bitmap_files->files);
- return FALSE;
- }
-
- if (file_seq_num > bitmap_files->files[array_pos].seq_num) {
-
- bitmap_files->files[array_pos].seq_num = file_seq_num;
- strncpy(bitmap_files->files[array_pos].name,
- bitmap_dir_file_info.name, FN_REFLEN - 1);
- bitmap_files->files[array_pos].name[FN_REFLEN - 1]
- = '\0';
- bitmap_files->files[array_pos].start_lsn
- = file_start_lsn;
- }
- }
-
- 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);
- return FALSE;
- }
-
-#ifdef UNIV_DEBUG
- ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num);
-
- for (size_t i = 1; i < bitmap_files->count; i++) {
- if (!bitmap_files->files[i].seq_num) {
-
- break;
- }
- ut_ad(bitmap_files->files[i].seq_num
- > bitmap_files->files[i - 1].seq_num);
- ut_ad(bitmap_files->files[i].start_lsn
- >= bitmap_files->files[i - 1].start_lsn);
- }
-#endif
-
- return TRUE;
-}
-
-/****************************************************************//**
-Open a bitmap file for reading.
-
-@return whether opened successfully */
-static
-bool
-log_online_open_bitmap_file_read_only(
-/*==================================*/
- const char* name, /*!<in: bitmap file
- name without directory,
- which is assumed to be
- srv_data_home */
- log_online_bitmap_file_t* bitmap_file) /*!<out: opened bitmap
- file */
-{
- bool success = false;
-
- xb_ad(name[0] != '\0');
-
- snprintf(bitmap_file->name, FN_REFLEN, "%s%s", srv_data_home, name);
- bitmap_file->file = os_file_create_simple_no_error_handling(
- 0, bitmap_file->name,
- OS_FILE_OPEN, OS_FILE_READ_ONLY, true, &success);
- if (UNIV_UNLIKELY(!success)) {
-
- /* Here and below assume that bitmap file names do not
- contain apostrophes, thus no need for ut_print_filename(). */
- msg("InnoDB: Warning: error opening the changed page "
- "bitmap \'%s\'", bitmap_file->name);
- return success;
- }
-
- bitmap_file->size = os_file_get_size(bitmap_file->file);
- bitmap_file->offset = 0;
-
-#ifdef __linux__
- posix_fadvise(bitmap_file->file, 0, 0, POSIX_FADV_SEQUENTIAL);
- posix_fadvise(bitmap_file->file, 0, 0, POSIX_FADV_NOREUSE);
-#endif
-
- return success;
-}
-
-/****************************************************************//**
-Diagnose one or both of the following situations if we read close to
-the end of bitmap file:
-1) Warn if the remainder of the file is less than one page.
-2) Error if we cannot read any more full pages but the last read page
-did not have the last-in-run flag set.
-
-@return FALSE for the error */
-static
-ibool
-log_online_diagnose_bitmap_eof(
-/*===========================*/
- const log_online_bitmap_file_t* bitmap_file, /*!< in: bitmap file */
- ibool last_page_in_run)/*!< in: "last page in
- run" flag value in the
- last read page */
-{
- /* Check if we are too close to EOF to read a full page */
- if ((bitmap_file->size < MODIFIED_PAGE_BLOCK_SIZE)
- || (bitmap_file->offset
- > bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) {
-
- if (UNIV_UNLIKELY(bitmap_file->offset != bitmap_file->size)) {
-
- /* If we are not at EOF and we have less than one page
- to read, it's junk. This error is not fatal in
- itself. */
-
- msg("InnoDB: Warning: junk at the end of changed "
- "page bitmap file \'%s\'.", bitmap_file->name);
- }
-
- if (UNIV_UNLIKELY(!last_page_in_run)) {
-
- /* We are at EOF but the last read page did not finish
- a run */
- /* It's a "Warning" here because it's not a fatal error
- for the whole server */
- msg("InnoDB: Warning: changed page bitmap "
- "file \'%s\' does not contain a complete run "
- "at the end.", bitmap_file->name);
- return FALSE;
- }
- }
- return TRUE;
-}
-
-/* End of copy-pasted definitions */
-
-/** Iterator structure over changed page bitmap */
-struct xb_page_bitmap_range_struct {
- const xb_page_bitmap *bitmap; /* Bitmap with data */
- ulint space_id; /* Space id for this
- iterator */
- ulint bit_i; /* Bit index of the iterator
- position in the current page */
- const ib_rbt_node_t *bitmap_node; /* Current bitmap tree node */
- const byte *bitmap_page; /* Current bitmap page */
- ulint current_page_id;/* Current page id */
-};
-
-/****************************************************************//**
-Print a diagnostic message on missing bitmap data for an LSN range. */
-static
-void
-xb_msg_missing_lsn_data(
-/*====================*/
- lsn_t missing_interval_start, /*!<in: interval start */
- lsn_t missing_interval_end) /*!<in: interval end */
-{
- msg("mariabackup: warning: changed page data missing for LSNs between "
- LSN_PF " and " LSN_PF, missing_interval_start,
- missing_interval_end);
-}
-
-/****************************************************************//**
-Scan a bitmap file until data for a desired LSN or EOF is found and check that
-the page before the starting one is not corrupted to ensure that the found page
-indeed contains the very start of the desired LSN data. The caller must check
-the page LSN values to determine if the bitmap file was scanned until the data
-was found or until EOF. Page must be at least MODIFIED_PAGE_BLOCK_SIZE big.
-
-@return TRUE if the scan successful without corruption detected
-*/
-static
-ibool
-xb_find_lsn_in_bitmap_file(
-/*=======================*/
- log_online_bitmap_file_t *bitmap_file, /*!<in/out: bitmap
- file */
- byte *page, /*!<in/out: last read
- bitmap page */
- lsn_t *page_end_lsn, /*!<out: end LSN of the
- last read page */
- lsn_t lsn) /*!<in: LSN to find */
-{
- ibool last_page_ok = TRUE;
- ibool next_to_last_page_ok = TRUE;
-
- xb_ad (bitmap_file->size >= MODIFIED_PAGE_BLOCK_SIZE);
-
- *page_end_lsn = 0;
-
- while ((*page_end_lsn <= lsn)
- && (bitmap_file->offset
- <= bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) {
-
- next_to_last_page_ok = last_page_ok;
- if (!log_online_read_bitmap_page(bitmap_file, page,
- &last_page_ok)) {
-
- return FALSE;
- }
-
- *page_end_lsn = mach_read_from_8(page + MODIFIED_PAGE_END_LSN);
- }
-
- /* We check two pages here because the last read page already contains
- the required LSN data. If the next to the last one page is corrupted,
- then we have no way of telling if that page contained the required LSN
- range data too */
- return last_page_ok && next_to_last_page_ok;
-}
-
-/****************************************************************//**
-Read the disk bitmap and build the changed page bitmap tree for the
-LSN interval incremental_lsn to log_sys.next_checkpoint_lsn.
-
-@return the built bitmap tree or NULL if unable to read the full interval for
-any reason. */
-xb_page_bitmap*
-xb_page_bitmap_init(void)
-/*=====================*/
-{
- log_online_bitmap_file_t bitmap_file;
- lsn_t bmp_start_lsn = incremental_lsn;
- const lsn_t bmp_end_lsn{log_sys.next_checkpoint_lsn};
- byte page[MODIFIED_PAGE_BLOCK_SIZE];
- lsn_t current_page_end_lsn;
- xb_page_bitmap *result;
- ibool last_page_in_run= FALSE;
- log_online_bitmap_file_range_t bitmap_files;
- size_t bmp_i;
- ibool last_page_ok = TRUE;
-
- if (UNIV_UNLIKELY(bmp_start_lsn > bmp_end_lsn)) {
-
- msg("mariabackup: incremental backup LSN " LSN_PF
- " is larger than than the last checkpoint LSN " LSN_PF
- , bmp_start_lsn, bmp_end_lsn);
- return NULL;
- }
-
- if (!log_online_setup_bitmap_file_range(&bitmap_files, bmp_start_lsn,
- bmp_end_lsn)) {
-
- return NULL;
- }
-
- /* Only accept no bitmap files returned if start LSN == end LSN */
- if (bitmap_files.count == 0 && bmp_end_lsn != bmp_start_lsn) {
-
- return NULL;
- }
-
- result = rbt_create(MODIFIED_PAGE_BLOCK_SIZE,
- log_online_compare_bmp_keys);
-
- if (bmp_start_lsn == bmp_end_lsn) {
-
- /* Empty range - empty bitmap */
- return result;
- }
-
- bmp_i = 0;
-
- if (UNIV_UNLIKELY(bitmap_files.files[bmp_i].start_lsn
- > bmp_start_lsn)) {
-
- /* The 1st file does not have the starting LSN data */
- xb_msg_missing_lsn_data(bmp_start_lsn,
- bitmap_files.files[bmp_i].start_lsn);
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
-
- /* Skip any zero-sized files at the start */
- while ((bmp_i < bitmap_files.count - 1)
- && (bitmap_files.files[bmp_i].start_lsn
- == bitmap_files.files[bmp_i + 1].start_lsn)) {
-
- bmp_i++;
- }
-
- /* Is the 1st bitmap file missing? */
- if (UNIV_UNLIKELY(bitmap_files.files[bmp_i].name[0] == '\0')) {
-
- /* TODO: this is not the exact missing range */
- xb_msg_missing_lsn_data(bmp_start_lsn, bmp_end_lsn);
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
-
- /* Open the 1st bitmap file */
- if (UNIV_UNLIKELY(!log_online_open_bitmap_file_read_only(
- bitmap_files.files[bmp_i].name,
- &bitmap_file))) {
-
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
-
- /* If the 1st file is truncated, no data. Not merged with the case
- below because zero-length file indicates not a corruption but missing
- subsequent files instead. */
- if (UNIV_UNLIKELY(bitmap_file.size < MODIFIED_PAGE_BLOCK_SIZE)) {
-
- xb_msg_missing_lsn_data(bmp_start_lsn, bmp_end_lsn);
- rbt_free(result);
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
- return NULL;
- }
-
- /* Find the start of the required LSN range in the file */
- if (UNIV_UNLIKELY(!xb_find_lsn_in_bitmap_file(&bitmap_file, page,
- &current_page_end_lsn,
- bmp_start_lsn))) {
-
- msg("mariabackup: Warning: changed page bitmap file "
- "\'%s\' corrupted", bitmap_file.name);
- rbt_free(result);
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
- return NULL;
- }
-
- last_page_in_run
- = mach_read_from_4(page + MODIFIED_PAGE_IS_LAST_BLOCK);
-
- if (UNIV_UNLIKELY(!log_online_diagnose_bitmap_eof(&bitmap_file,
- last_page_in_run))) {
-
- rbt_free(result);
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
- return NULL;
- }
-
- if (UNIV_UNLIKELY(current_page_end_lsn < bmp_start_lsn)) {
-
- xb_msg_missing_lsn_data(current_page_end_lsn, bmp_start_lsn);
- rbt_free(result);
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
- return NULL;
- }
-
- /* 1st bitmap page found, add it to the tree. */
- rbt_insert(result, page, page);
-
- /* Read next pages/files until all required data is read */
- while (last_page_ok
- && (current_page_end_lsn < bmp_end_lsn
- || (current_page_end_lsn == bmp_end_lsn
- && !last_page_in_run))) {
-
- ib_rbt_bound_t tree_search_pos;
-
- /* If EOF, advance the file skipping over any empty files */
- while (bitmap_file.size < MODIFIED_PAGE_BLOCK_SIZE
- || (bitmap_file.offset
- > bitmap_file.size - MODIFIED_PAGE_BLOCK_SIZE)) {
-
- os_file_close(bitmap_file.file);
-
- if (UNIV_UNLIKELY(
- !log_online_diagnose_bitmap_eof(
- &bitmap_file, last_page_in_run))) {
-
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
-
- bmp_i++;
-
- if (UNIV_UNLIKELY(bmp_i == bitmap_files.count
- || (bitmap_files.files[bmp_i].seq_num
- == 0))) {
-
- xb_msg_missing_lsn_data(current_page_end_lsn,
- bmp_end_lsn);
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
-
- /* Is the next file missing? */
- if (UNIV_UNLIKELY(bitmap_files.files[bmp_i].name[0]
- == '\0')) {
-
- /* TODO: this is not the exact missing range */
- xb_msg_missing_lsn_data(bitmap_files.files
- [bmp_i - 1].start_lsn,
- bmp_end_lsn);
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
-
- if (UNIV_UNLIKELY(
- !log_online_open_bitmap_file_read_only(
- bitmap_files.files[bmp_i].name,
- &bitmap_file))) {
-
- rbt_free(result);
- free(bitmap_files.files);
- return NULL;
- }
- }
-
- if (UNIV_UNLIKELY(
- !log_online_read_bitmap_page(&bitmap_file, page,
- &last_page_ok))) {
-
- rbt_free(result);
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
- return NULL;
- }
-
- if (UNIV_UNLIKELY(!last_page_ok)) {
-
- msg("mariabackup: warning: changed page bitmap file "
- "\'%s\' corrupted.", bitmap_file.name);
- rbt_free(result);
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
- return NULL;
- }
-
- /* Merge the current page with an existing page or insert a new
- page into the tree */
-
- if (!rbt_search(result, &tree_search_pos, page)) {
-
- /* Merge the bitmap pages */
- byte *existing_page
- = rbt_value(byte, tree_search_pos.last);
- bitmap_word_t *bmp_word_1 = (bitmap_word_t *)
- (existing_page + MODIFIED_PAGE_BLOCK_BITMAP);
- bitmap_word_t *bmp_end = (bitmap_word_t *)
- (existing_page + MODIFIED_PAGE_BLOCK_UNUSED_2);
- bitmap_word_t *bmp_word_2 = (bitmap_word_t *)
- (page + MODIFIED_PAGE_BLOCK_BITMAP);
- while (bmp_word_1 < bmp_end) {
-
- *bmp_word_1++ |= *bmp_word_2++;
- }
- xb_a (bmp_word_1 == bmp_end);
- } else {
-
- /* Add a new page */
- rbt_add_node(result, &tree_search_pos, page);
- }
-
- current_page_end_lsn
- = mach_read_from_8(page + MODIFIED_PAGE_END_LSN);
- last_page_in_run
- = mach_read_from_4(page + MODIFIED_PAGE_IS_LAST_BLOCK);
- }
-
- xb_a (current_page_end_lsn >= bmp_end_lsn);
-
- free(bitmap_files.files);
- os_file_close(bitmap_file.file);
-
- return result;
-}
-
-/****************************************************************//**
-Free the bitmap tree. */
-void
-xb_page_bitmap_deinit(
-/*==================*/
- xb_page_bitmap* bitmap) /*!<in/out: bitmap tree */
-{
- if (bitmap) {
-
- rbt_free(bitmap);
- }
-}
-
-/****************************************************************//**
-Advance to the next bitmap page or setup the first bitmap page for the
-given bitmap range. Assumes that bitmap_range->bitmap_page has been
-already found/bumped by rbt_search()/rbt_next().
-
-@return FALSE if no more bitmap data for the range space ID */
-static
-ibool
-xb_page_bitmap_setup_next_page(
-/*===========================*/
- xb_page_bitmap_range* bitmap_range) /*!<in/out: the bitmap range */
-{
- ulint new_space_id;
- ulint new_1st_page_id;
-
- if (bitmap_range->bitmap_node == NULL) {
-
- bitmap_range->current_page_id = ULINT_UNDEFINED;
- return FALSE;
- }
-
- bitmap_range->bitmap_page = rbt_value(byte, bitmap_range->bitmap_node);
-
- new_space_id = mach_read_from_4(bitmap_range->bitmap_page
- + MODIFIED_PAGE_SPACE_ID);
- if (new_space_id != bitmap_range->space_id) {
-
- /* No more data for the current page id. */
- xb_a(new_space_id > bitmap_range->space_id);
- bitmap_range->current_page_id = ULINT_UNDEFINED;
- return FALSE;
- }
-
- new_1st_page_id = mach_read_from_4(bitmap_range->bitmap_page +
- MODIFIED_PAGE_1ST_PAGE_ID);
- xb_a (new_1st_page_id >= bitmap_range->current_page_id
- || bitmap_range->current_page_id == ULINT_UNDEFINED);
-
- bitmap_range->current_page_id = new_1st_page_id;
- bitmap_range->bit_i = 0;
-
- return TRUE;
-}
-
-/** Find the node with the smallest key that greater than equal to search key.
-@param[in] tree red-black tree
-@param[in] key search key
-@return node with the smallest greater-than-or-equal key
-@retval NULL if none was found */
-static
-const ib_rbt_node_t*
-rbt_lower_bound(const ib_rbt_t* tree, const void* key)
-{
- ut_ad(!tree->cmp_arg);
- const ib_rbt_node_t* ge = NULL;
-
- for (const ib_rbt_node_t *node = tree->root->left;
- node != tree->nil; ) {
- int result = tree->compare(node->value, key);
-
- if (result < 0) {
- node = node->right;
- } else {
- ge = node;
- if (result == 0) {
- break;
- }
-
- node = node->left;
- }
- }
-
- return(ge);
-}
-
-/****************************************************************//**
-Set up a new bitmap range iterator over a given space id changed
-pages in a given bitmap.
-
-@return bitmap range iterator */
-xb_page_bitmap_range*
-xb_page_bitmap_range_init(
-/*======================*/
- xb_page_bitmap* bitmap, /*!< in: bitmap to iterate over */
- ulint space_id) /*!< in: space id */
-{
- byte search_page[MODIFIED_PAGE_BLOCK_SIZE];
- xb_page_bitmap_range *result
- = static_cast<xb_page_bitmap_range *>(malloc(sizeof(*result)));
-
- memset(result, 0, sizeof(*result));
- result->bitmap = bitmap;
- result->space_id = space_id;
- result->current_page_id = ULINT_UNDEFINED;
-
- /* Search for the 1st page for the given space id */
- /* This also sets MODIFIED_PAGE_1ST_PAGE_ID to 0, which is what we
- want. */
- memset(search_page, 0, MODIFIED_PAGE_BLOCK_SIZE);
- mach_write_to_4(search_page + MODIFIED_PAGE_SPACE_ID, space_id);
-
- result->bitmap_node = rbt_lower_bound(result->bitmap, search_page);
-
- xb_page_bitmap_setup_next_page(result);
-
- return result;
-}
-
-/****************************************************************//**
-Get the value of the bitmap->range->bit_i bitmap bit
-
-@return the current bit value */
-static inline
-ibool
-is_bit_set(
-/*=======*/
- const xb_page_bitmap_range* bitmap_range) /*!< in: bitmap
- range */
-{
- return ((*(((bitmap_word_t *)(bitmap_range->bitmap_page
- + MODIFIED_PAGE_BLOCK_BITMAP))
- + (bitmap_range->bit_i >> 6)))
- & (1ULL << (bitmap_range->bit_i & 0x3F))) ? TRUE : FALSE;
-}
-
-/****************************************************************//**
-Get the next page id that has its bit set or cleared, i.e. equal to
-bit_value.
-
-@return page id */
-ulint
-xb_page_bitmap_range_get_next_bit(
-/*==============================*/
- xb_page_bitmap_range* bitmap_range, /*!< in/out: bitmap range */
- ibool bit_value) /*!< in: bit value */
-{
- if (UNIV_UNLIKELY(bitmap_range->current_page_id
- == ULINT_UNDEFINED)) {
-
- return ULINT_UNDEFINED;
- }
-
- do {
- while (bitmap_range->bit_i < MODIFIED_PAGE_BLOCK_ID_COUNT) {
-
- while (is_bit_set(bitmap_range) != bit_value
- && (bitmap_range->bit_i
- < MODIFIED_PAGE_BLOCK_ID_COUNT)) {
-
- bitmap_range->current_page_id++;
- bitmap_range->bit_i++;
- }
-
- if (bitmap_range->bit_i
- < MODIFIED_PAGE_BLOCK_ID_COUNT) {
-
- ulint result = bitmap_range->current_page_id;
- bitmap_range->current_page_id++;
- bitmap_range->bit_i++;
- return result;
- }
- }
-
- bitmap_range->bitmap_node
- = rbt_next(bitmap_range->bitmap,
- bitmap_range->bitmap_node);
-
- } while (xb_page_bitmap_setup_next_page(bitmap_range));
-
- return ULINT_UNDEFINED;
-}
-
-/****************************************************************//**
-Free the bitmap range iterator. */
-void
-xb_page_bitmap_range_deinit(
-/*========================*/
- xb_page_bitmap_range* bitmap_range) /*! in/out: bitmap range */
-{
- free(bitmap_range);
-}
diff --git a/extra/mariabackup/changed_page_bitmap.h b/extra/mariabackup/changed_page_bitmap.h
deleted file mode 100644
index 8d504359..00000000
--- a/extra/mariabackup/changed_page_bitmap.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/******************************************************
-XtraBackup: hot backup tool for InnoDB
-(c) 2009-2012 Percona Inc.
-Originally Created 3/3/2009 Yasufumi Kinoshita
-Written by Alexey Kopytov, Aleksandr Kuzminsky, Stewart Smith, Vadim Tkachenko,
-Yasufumi Kinoshita, Ignacio Nin and Baron Schwartz.
-
-This program is free 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
-
-*******************************************************/
-
-/* Changed page bitmap interface */
-
-#ifndef XB_CHANGED_PAGE_BITMAP_H
-#define XB_CHANGED_PAGE_BITMAP_H
-
-#include <ut0rbt.h>
-#include <fil0fil.h>
-
-/* The changed page bitmap structure */
-typedef ib_rbt_t xb_page_bitmap;
-
-struct xb_page_bitmap_range_struct;
-
-/* The bitmap range iterator over one space id */
-typedef struct xb_page_bitmap_range_struct xb_page_bitmap_range;
-
-/****************************************************************//**
-Read the disk bitmap and build the changed page bitmap tree for the
-LSN interval incremental_lsn to log_sys.next_checkpoint_lsn.
-
-@return the built bitmap tree */
-xb_page_bitmap*
-xb_page_bitmap_init(void);
-/*=====================*/
-
-/****************************************************************//**
-Free the bitmap tree. */
-void
-xb_page_bitmap_deinit(
-/*==================*/
- xb_page_bitmap* bitmap); /*!<in/out: bitmap tree */
-
-
-/****************************************************************//**
-Set up a new bitmap range iterator over a given space id changed
-pages in a given bitmap.
-
-@return bitmap range iterator */
-xb_page_bitmap_range*
-xb_page_bitmap_range_init(
-/*======================*/
- xb_page_bitmap* bitmap, /*!< in: bitmap to iterate over */
- ulint space_id); /*!< in: space id */
-
-/****************************************************************//**
-Get the next page id that has its bit set or cleared, i.e. equal to
-bit_value.
-
-@return page id */
-ulint
-xb_page_bitmap_range_get_next_bit(
-/*==============================*/
- xb_page_bitmap_range* bitmap_range, /*!< in/out: bitmap range */
- ibool bit_value); /*!< in: bit value */
-
-/****************************************************************//**
-Free the bitmap range iterator. */
-void
-xb_page_bitmap_range_deinit(
-/*========================*/
- xb_page_bitmap_range* bitmap_range); /*! in/out: bitmap range */
-
-#endif
diff --git a/extra/mariabackup/common.h b/extra/mariabackup/common.h
index 89b189e3..6fde514e 100644
--- a/extra/mariabackup/common.h
+++ b/extra/mariabackup/common.h
@@ -23,7 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <my_global.h>
#include <mysql_version.h>
-#include <fcntl.h>
#include <stdarg.h>
#include <my_sys.h>
@@ -143,7 +142,7 @@ static inline ATTRIBUTE_FORMAT(printf, 1,2) ATTRIBUTE_NORETURN void die(const ch
# define POSIX_FADV_NORMAL
# define POSIX_FADV_SEQUENTIAL
# define POSIX_FADV_DONTNEED
-# define posix_fadvise(a,b,c,d) do {} while(0)
+# define posix_fadvise(fd, offset, len, advice) do { (void)offset; } while(0)
#endif
/***********************************************************************
diff --git a/extra/mariabackup/common_engine.cc b/extra/mariabackup/common_engine.cc
new file mode 100644
index 00000000..a4a87062
--- /dev/null
+++ b/extra/mariabackup/common_engine.cc
@@ -0,0 +1,512 @@
+#include "common_engine.h"
+#include "backup_copy.h"
+#include "xtrabackup.h"
+#include "common.h"
+#include "backup_debug.h"
+
+#include <unordered_map>
+#include <atomic>
+#include <memory>
+#include <chrono>
+
+namespace common_engine {
+
+class Table {
+public:
+ Table(std::string &db, std::string &table, std::string &fs_name) :
+ m_db(std::move(db)), m_table(std::move(table)),
+ m_fs_name(std::move(fs_name)) {}
+ virtual ~Table() {}
+ void add_file_name(const char *file_name) { m_fnames.push_back(file_name); }
+ virtual bool copy(ds_ctxt_t *ds, MYSQL *con, bool no_lock,
+ bool finalize, unsigned thread_num);
+ std::string &get_db() { return m_db; }
+ std::string &get_table() { return m_table; }
+ std::string &get_version() { return m_version; }
+
+protected:
+ std::string m_db;
+ std::string m_table;
+ std::string m_fs_name;
+ std::string m_version;
+ std::vector<std::string> m_fnames;
+};
+
+bool
+Table::copy(ds_ctxt_t *ds, MYSQL *con, bool no_lock, bool, unsigned thread_num) {
+ static const size_t buf_size = 10 * 1024 * 1024;
+ std::unique_ptr<uchar[]> buf;
+ bool result = false;
+ File frm_file = -1;
+ std::vector<File> files;
+ bool locked = false;
+ std::string full_tname("`");
+ full_tname.append(m_db).append("`.`").append(m_table).append("`");
+
+ if (!no_lock && !backup_lock(con, full_tname.c_str())) {
+ msg(thread_num, "Error on executing BACKUP LOCK for table %s",
+ full_tname.c_str());
+ goto exit;
+ }
+ else
+ locked = !no_lock;
+
+ if ((frm_file = mysql_file_open(key_file_frm, (m_fs_name + ".frm").c_str(),
+ O_RDONLY | O_SHARE, MYF(0))) < 0 && !m_fnames.empty() &&
+ !ends_with(m_fnames[0].c_str(), ".ARZ") &&
+ !ends_with(m_fnames[0].c_str(), ".ARM")) {
+ // Don't treat it as error, as the table can be dropped after it
+ // was added to queue for copying
+ result = true;
+ goto exit;
+ }
+
+ for (const auto &fname : m_fnames) {
+ File file = mysql_file_open(0, fname.c_str(),O_RDONLY | O_SHARE, MYF(0));
+ if (file < 0) {
+ msg(thread_num, "Error on file %s open during %s table copy",
+ fname.c_str(), full_tname.c_str());
+ goto exit;
+ }
+ files.push_back(file);
+ }
+
+ if (locked && !backup_unlock(con)) {
+ msg(thread_num, "Error on BACKUP UNLOCK for table %s", full_tname.c_str());
+ locked = false;
+ goto exit;
+ }
+
+ locked = false;
+
+ buf.reset(new uchar[buf_size]);
+
+ for (size_t i = 0; i < m_fnames.size(); ++i) {
+ ds_file_t *dst_file = nullptr;
+ size_t bytes_read;
+ size_t copied_size = 0;
+ MY_STAT stat_info;
+
+ if (my_fstat(files[i], &stat_info, MYF(0))) {
+ msg(thread_num, "error: failed to get stat info for file %s of "
+ "table %s", m_fnames[i].c_str(), full_tname.c_str());
+ goto exit;
+ }
+
+ const char *dst_path =
+ (xtrabackup_copy_back || xtrabackup_move_back) ?
+ m_fnames[i].c_str() : trim_dotslash(m_fnames[i].c_str());
+
+ dst_file = ds_open(ds, dst_path, &stat_info, false);
+ if (!dst_file) {
+ msg(thread_num, "error: cannot open destination stream for %s, table %s",
+ dst_path, full_tname.c_str());
+ goto exit;
+ }
+
+ while ((bytes_read = my_read(files[i], buf.get(), buf_size, MY_WME))) {
+ if (bytes_read == size_t(-1)) {
+ msg(thread_num, "error: file %s read for table %s",
+ m_fnames[i].c_str(), full_tname.c_str());
+ ds_close(dst_file);
+ goto exit;
+ }
+ xtrabackup_io_throttling();
+ if (ds_write(dst_file, buf.get(), bytes_read)) {
+ msg(thread_num, "error: file %s write for table %s",
+ dst_path, full_tname.c_str());
+ ds_close(dst_file);
+ goto exit;
+ }
+ copied_size += bytes_read;
+ }
+ mysql_file_close(files[i], MYF(MY_WME));
+ files[i] = -1;
+ ds_close(dst_file);
+ msg(thread_num, "Copied file %s for table %s, %zu bytes",
+ m_fnames[i].c_str(), full_tname.c_str(), copied_size);
+ }
+
+ result = true;
+
+#ifndef DBUG_OFF
+ {
+ std::string sql_name(m_db);
+ sql_name.append("/").append(m_table);
+ DBUG_MARIABACKUP_EVENT_LOCK("after_ce_table_copy", fil_space_t::name_type(sql_name.data(), sql_name.size()));
+ }
+#endif // DBUG_OFF
+exit:
+ if (frm_file >= 0) {
+ m_version = ::read_table_version_id(frm_file);
+ mysql_file_close(frm_file, MYF(MY_WME));
+ }
+ if (locked && !backup_unlock(con)) {
+ msg(thread_num, "Error on BACKUP UNLOCK for table %s", full_tname.c_str());
+ result = false;
+ }
+ for (auto file : files)
+ if (file >= 0)
+ mysql_file_close(file, MYF(MY_WME));
+ return result;
+}
+
+// Append-only tables
+class LogTable : public Table {
+ public:
+ LogTable(std::string &db, std::string &table, std::string &fs_name) :
+ Table(db, table, fs_name) {}
+
+ virtual ~LogTable() { (void)close(); }
+ bool
+ copy(ds_ctxt_t *ds, MYSQL *con, bool no_lock, bool finalize,
+ unsigned thread_num) override;
+ bool close();
+ private:
+ bool open(ds_ctxt_t *ds, unsigned thread_num);
+ std::vector<File> m_src;
+ std::vector<ds_file_t *> m_dst;
+};
+
+bool
+LogTable::open(ds_ctxt_t *ds, unsigned thread_num) {
+ DBUG_ASSERT(m_src.empty());
+ DBUG_ASSERT(m_dst.empty());
+
+ std::string full_tname("`");
+ full_tname.append(m_db).append("`.`").append(m_table).append("`");
+
+ for (const auto &fname : m_fnames) {
+ File file = mysql_file_open(0, fname.c_str(),O_RDONLY | O_SHARE, MYF(0));
+ if (file < 0) {
+ msg(thread_num, "Error on file %s open during %s log table copy",
+ fname.c_str(), full_tname.c_str());
+ return false;
+ }
+ m_src.push_back(file);
+
+ MY_STAT stat_info;
+ if (my_fstat(file, &stat_info, MYF(0))) {
+ msg(thread_num, "error: failed to get stat info for file %s of "
+ "log table %s", fname.c_str(), full_tname.c_str());
+ return false;
+ }
+ const char *dst_path =
+ (xtrabackup_copy_back || xtrabackup_move_back) ?
+ fname.c_str() : trim_dotslash(fname.c_str());
+ ds_file_t *dst_file = ds_open(ds, dst_path, &stat_info, false);
+ if (!dst_file) {
+ msg(thread_num, "error: cannot open destination stream for %s, "
+ "log table %s", dst_path, full_tname.c_str());
+ return false;
+ }
+ m_dst.push_back(dst_file);
+ }
+
+ File frm_file;
+ if ((frm_file = mysql_file_open(key_file_frm, (m_fs_name + ".frm").c_str(),
+ O_RDONLY | O_SHARE, MYF(0))) < 0 && !m_fnames.empty() &&
+ !ends_with(m_fnames[0].c_str(), ".ARZ") &&
+ !ends_with(m_fnames[0].c_str(), ".ARM")) {
+ msg(thread_num, "Error on .frm file open for log table %s",
+ full_tname.c_str());
+ return false;
+ }
+
+ m_version = ::read_table_version_id(frm_file);
+ mysql_file_close(frm_file, MYF(MY_WME));
+
+ return true;
+}
+
+bool LogTable::close() {
+ while (!m_src.empty()) {
+ auto f = m_src.back();
+ m_src.pop_back();
+ mysql_file_close(f, MYF(MY_WME));
+ }
+ while (!m_dst.empty()) {
+ auto f = m_dst.back();
+ m_dst.pop_back();
+ ds_close(f);
+ }
+ return true;
+}
+
+bool
+LogTable::copy(ds_ctxt_t *ds, MYSQL *con, bool no_lock, bool finalize,
+ unsigned thread_num) {
+ static const size_t buf_size = 10 * 1024 * 1024;
+ DBUG_ASSERT(ds);
+ DBUG_ASSERT(con);
+ if (m_src.empty() && !open(ds, thread_num)) {
+ close();
+ return false;
+ }
+ DBUG_ASSERT(m_src.size() == m_dst.size());
+
+ std::unique_ptr<uchar[]> buf(new uchar[buf_size]);
+ for (size_t i = 0; i < m_src.size(); ++i) {
+ // .CSM can be rewritten (see write_meta_file() usage in ha_tina.cc)
+ if (!finalize && ends_with(m_fnames[i].c_str(), ".CSM"))
+ continue;
+ size_t bytes_read;
+ size_t copied_size = 0;
+ while ((bytes_read = my_read(m_src[i], buf.get(), buf_size, MY_WME))) {
+ if (bytes_read == size_t(-1)) {
+ msg(thread_num, "error: file %s read for log table %s",
+ m_fnames[i].c_str(),
+ std::string("`").append(m_db).append("`.`").
+ append(m_table).append("`").c_str());
+ close();
+ return false;
+ }
+ xtrabackup_io_throttling();
+ if (ds_write(m_dst[i], buf.get(), bytes_read)) {
+ msg(thread_num, "error: file %s write for log table %s",
+ m_fnames[i].c_str(), std::string("`").append(m_db).append("`.`").
+ append(m_table).append("`").c_str());
+ close();
+ return false;
+ }
+ copied_size += bytes_read;
+ }
+ msg(thread_num, "Copied file %s for log table %s, %zu bytes",
+ m_fnames[i].c_str(), std::string("`").append(m_db).append("`.`").
+ append(m_table).append("`").c_str(), copied_size);
+ }
+
+ return true;
+}
+
+class BackupImpl {
+ public:
+ BackupImpl(
+ const char *datadir_path, ds_ctxt_t *datasink,
+ std::vector<MYSQL *> &con_pool, ThreadPool &thread_pool) :
+ m_datadir_path(datadir_path), m_ds(datasink), m_con_pool(con_pool),
+ m_process_table_jobs(thread_pool) {}
+ ~BackupImpl() { }
+ bool scan(
+ const std::unordered_set<std::string> &exclude_tables,
+ std::unordered_set<std::string> *out_processed_tables,
+ bool no_lock, bool collect_log_and_stats);
+ void set_post_copy_table_hook(const post_copy_table_hook_t &hook) {
+ m_table_post_copy_hook = hook;
+ }
+ bool copy_log_tables(bool finalize);
+ bool copy_stats_tables();
+ bool wait_for_finish();
+ bool close_log_tables();
+ private:
+
+ void process_table_job(Table *table, bool no_lock, bool delete_table,
+ bool finalize, unsigned thread_num);
+
+ const char *m_datadir_path;
+ ds_ctxt_t *m_ds;
+ std::vector<MYSQL *> &m_con_pool;
+ TasksGroup m_process_table_jobs;
+
+ post_copy_table_hook_t m_table_post_copy_hook;
+ std::unordered_map<table_key_t, std::unique_ptr<LogTable>> m_log_tables;
+ std::unordered_map<table_key_t, std::unique_ptr<Table>> m_stats_tables;
+};
+
+void BackupImpl::process_table_job(Table *table, bool no_lock,
+ bool delete_table, bool finalize, unsigned thread_num) {
+ int result = 0;
+
+ if (!m_process_table_jobs.get_result())
+ goto exit;
+
+ if (!table->copy(m_ds, m_con_pool[thread_num], no_lock, finalize, thread_num))
+ goto exit;
+
+ if (m_table_post_copy_hook)
+ m_table_post_copy_hook(table->get_db(), table->get_table(),
+ table->get_version());
+
+ result = 1;
+
+exit:
+ if (delete_table)
+ delete table;
+ m_process_table_jobs.finish_task(result);
+}
+
+bool BackupImpl::scan(const std::unordered_set<table_key_t> &exclude_tables,
+ std::unordered_set<table_key_t> *out_processed_tables, bool no_lock,
+ bool collect_log_and_stats) {
+
+ msg("Start scanning common engine tables, need backup locks: %d, "
+ "collect log and stat tables: %d", no_lock, collect_log_and_stats);
+
+ std::unordered_map<table_key_t, std::unique_ptr<Table>> found_tables;
+
+ foreach_file_in_db_dirs(m_datadir_path,
+ [&](const char *file_path)->bool {
+
+ static const char *ext_list[] =
+ {".MYD", ".MYI", ".MRG", ".ARM", ".ARZ", ".CSM", ".CSV", NULL};
+
+ bool is_aria = ends_with(file_path, ".MAD") || ends_with(file_path, ".MAI");
+
+ if (!collect_log_and_stats && is_aria)
+ return true;
+
+ if (!is_aria && !filename_matches(file_path, ext_list))
+ return true;
+
+ if (check_if_skip_table(file_path)) {
+ msg("Skipping %s.", file_path);
+ return true;
+ }
+
+ auto db_table_fs = convert_filepath_to_tablename(file_path);
+ auto tk =
+ table_key(std::get<0>(db_table_fs), std::get<1>(db_table_fs));
+
+ // log and stats tables are only collected in this function,
+ // so there is no need to filter out them with exclude_tables.
+ if (collect_log_and_stats) {
+ if (is_log_table(std::get<0>(db_table_fs).c_str(),
+ std::get<1>(db_table_fs).c_str())) {
+ auto table_it = m_log_tables.find(tk);
+ if (table_it == m_log_tables.end()) {
+ msg("Log table found: %s", tk.c_str());
+ table_it = m_log_tables.emplace(tk,
+ std::unique_ptr<LogTable>(new LogTable(std::get<0>(db_table_fs),
+ std::get<1>(db_table_fs), std::get<2>(db_table_fs)))).first;
+ }
+ msg("Collect log table file: %s", file_path);
+ table_it->second->add_file_name(file_path);
+ return true;
+ }
+ // Aria can handle statistics tables
+ else if (is_stats_table(std::get<0>(db_table_fs).c_str(),
+ std::get<1>(db_table_fs).c_str()) && !is_aria) {
+ auto table_it = m_stats_tables.find(tk);
+ if (table_it == m_stats_tables.end()) {
+ msg("Stats table found: %s", tk.c_str());
+ table_it = m_stats_tables.emplace(tk,
+ std::unique_ptr<Table>(new Table(std::get<0>(db_table_fs),
+ std::get<1>(db_table_fs), std::get<2>(db_table_fs)))).first;
+ }
+ msg("Collect stats table file: %s", file_path);
+ table_it->second->add_file_name(file_path);
+ return true;
+ }
+ } else if (is_log_table(std::get<0>(db_table_fs).c_str(),
+ std::get<1>(db_table_fs).c_str()) ||
+ is_stats_table(std::get<0>(db_table_fs).c_str(),
+ std::get<1>(db_table_fs).c_str()))
+ return true;
+
+ if (is_aria)
+ return true;
+
+ if (exclude_tables.count(tk)) {
+ msg("Skip table %s at it is in exclude list", tk.c_str());
+ return true;
+ }
+
+ auto table_it = found_tables.find(tk);
+ if (table_it == found_tables.end()) {
+ table_it = found_tables.emplace(tk,
+ std::unique_ptr<Table>(new Table(std::get<0>(db_table_fs),
+ std::get<1>(db_table_fs), std::get<2>(db_table_fs)))).first;
+ }
+
+ table_it->second->add_file_name(file_path);
+
+ return true;
+ });
+
+ for (auto &table_it : found_tables) {
+ m_process_table_jobs.push_task(
+ std::bind(&BackupImpl::process_table_job, this, table_it.second.release(),
+ no_lock, true, false, std::placeholders::_1));
+ if (out_processed_tables)
+ out_processed_tables->insert(table_it.first);
+ }
+
+ msg("Stop scanning common engine tables");
+ return true;
+}
+
+bool BackupImpl::copy_log_tables(bool finalize) {
+ for (auto &table_it : m_log_tables) {
+ // Do not execute BACKUP LOCK for log tables as it's supposed
+ // that they must be copied on BLOCK_DDL and BLOCK_COMMIT locks.
+ m_process_table_jobs.push_task(
+ std::bind(&BackupImpl::process_table_job, this, table_it.second.get(),
+ true, false, finalize, std::placeholders::_1));
+ }
+ return true;
+}
+
+bool BackupImpl::copy_stats_tables() {
+ for (auto &table_it : m_stats_tables) {
+ // Do not execute BACKUP LOCK for stats tables as it's supposed
+ // that they must be copied on BLOCK_DDL and BLOCK_COMMIT locks.
+ // Delete stats table object after copy (see process_table_job())
+ m_process_table_jobs.push_task(
+ std::bind(&BackupImpl::process_table_job, this, table_it.second.release(),
+ true, true, false, std::placeholders::_1));
+ }
+ m_stats_tables.clear();
+ return true;
+}
+
+bool BackupImpl::wait_for_finish() {
+ /* Wait for threads to exit */
+ return m_process_table_jobs.wait_for_finish();
+}
+
+bool BackupImpl::close_log_tables() {
+ bool result = wait_for_finish();
+ for (auto &table_it : m_log_tables)
+ table_it.second->close();
+ return result;
+}
+
+Backup::Backup(const char *datadir_path, ds_ctxt_t *datasink,
+ std::vector<MYSQL *> &con_pool, ThreadPool &thread_pool) :
+ m_backup_impl(
+ new BackupImpl(datadir_path, datasink, con_pool,
+ thread_pool)) { }
+
+Backup::~Backup() {
+ delete m_backup_impl;
+}
+
+bool Backup::scan(
+ const std::unordered_set<table_key_t> &exclude_tables,
+ std::unordered_set<table_key_t> *out_processed_tables,
+ bool no_lock, bool collect_log_and_stats) {
+ return m_backup_impl->scan(exclude_tables, out_processed_tables, no_lock,
+ collect_log_and_stats);
+}
+
+bool Backup::copy_log_tables(bool finalize) {
+ return m_backup_impl->copy_log_tables(finalize);
+}
+
+bool Backup::copy_stats_tables() {
+ return m_backup_impl->copy_stats_tables();
+}
+
+bool Backup::wait_for_finish() {
+ return m_backup_impl->wait_for_finish();
+}
+
+bool Backup::close_log_tables() {
+ return m_backup_impl->close_log_tables();
+}
+
+void Backup::set_post_copy_table_hook(const post_copy_table_hook_t &hook) {
+ m_backup_impl->set_post_copy_table_hook(hook);
+}
+
+} // namespace common_engine
diff --git a/extra/mariabackup/common_engine.h b/extra/mariabackup/common_engine.h
new file mode 100644
index 00000000..6f5d8062
--- /dev/null
+++ b/extra/mariabackup/common_engine.h
@@ -0,0 +1,39 @@
+#pragma once
+#include "my_global.h"
+#include "backup_mysql.h"
+#include "datasink.h"
+#include "thread_pool.h"
+#include "xtrabackup.h"
+
+#include <unordered_set>
+#include <string>
+#include <vector>
+
+namespace common_engine {
+
+class BackupImpl;
+
+class Backup {
+ public:
+ Backup(const char *datadir_path, ds_ctxt_t *datasink,
+ std::vector<MYSQL *> &con_pool, ThreadPool &thread_pool);
+ ~Backup();
+ Backup (Backup &&other) = delete;
+ Backup & operator= (Backup &&other) = delete;
+ Backup(const Backup &) = delete;
+ Backup & operator= (const Backup &) = delete;
+ bool scan(
+ const std::unordered_set<table_key_t> &exclude_tables,
+ std::unordered_set<table_key_t> *out_processed_tables,
+ bool no_lock, bool collect_log_and_stats);
+ bool copy_log_tables(bool finalize);
+ bool copy_stats_tables();
+ bool wait_for_finish();
+ bool close_log_tables();
+ void set_post_copy_table_hook(const post_copy_table_hook_t &hook);
+ private:
+ BackupImpl *m_backup_impl;
+};
+
+} // namespace common_engine
+
diff --git a/extra/mariabackup/datasink.cc b/extra/mariabackup/datasink.cc
index a576526d..132ff3fc 100644
--- a/extra/mariabackup/datasink.cc
+++ b/extra/mariabackup/datasink.cc
@@ -80,11 +80,11 @@ ds_create(const char *root, ds_type_t type)
/************************************************************************
Open a datasink file */
ds_file_t *
-ds_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *stat)
+ds_open(ds_ctxt_t *ctxt, const char *path, const MY_STAT *stat, bool rewrite)
{
ds_file_t *file;
- file = ctxt->datasink->open(ctxt, path, stat);
+ file = ctxt->datasink->open(ctxt, path, stat, rewrite);
if (file != NULL) {
file->datasink = ctxt->datasink;
}
@@ -104,6 +104,30 @@ ds_write(ds_file_t *file, const void *buf, size_t len)
return file->datasink->write(file, (const uchar *)buf, len);
}
+int ds_seek_set(ds_file_t *file, my_off_t offset) {
+ DBUG_ASSERT(file);
+ DBUG_ASSERT(file->datasink);
+ if (file->datasink->seek_set)
+ return file->datasink->seek_set(file, offset);
+ return 0;
+}
+
+int ds_rename(ds_ctxt_t *ctxt, const char *old_path, const char *new_path) {
+ DBUG_ASSERT(ctxt);
+ DBUG_ASSERT(ctxt->datasink);
+ if (ctxt->datasink->rename)
+ return ctxt->datasink->rename(ctxt, old_path, new_path);
+ return 0;
+}
+
+int ds_remove(ds_ctxt_t *ctxt, const char *path) {
+ DBUG_ASSERT(ctxt);
+ DBUG_ASSERT(ctxt->datasink);
+ if (ctxt->datasink->remove)
+ return ctxt->datasink->mremove(ctxt, path);
+ return 0;
+}
+
/************************************************************************
Close a datasink file.
@return 0 on success, 1, on error. */
diff --git a/extra/mariabackup/datasink.h b/extra/mariabackup/datasink.h
index 57468e0c..98cbe525 100644
--- a/extra/mariabackup/datasink.h
+++ b/extra/mariabackup/datasink.h
@@ -43,7 +43,8 @@ typedef struct ds_ctxt {
*/
bool copy_file(const char *src_file_path,
const char *dst_file_path,
- uint thread_n);
+ uint thread_n,
+ bool rewrite = false);
bool move_file(const char *src_file_path,
const char *dst_file_path,
@@ -76,10 +77,15 @@ typedef struct {
struct datasink_struct {
ds_ctxt_t *(*init)(const char *root);
- ds_file_t *(*open)(ds_ctxt_t *ctxt, const char *path, MY_STAT *stat);
+ ds_file_t *(*open)(ds_ctxt_t *ctxt, const char *path,
+ const MY_STAT *stat, bool rewrite);
int (*write)(ds_file_t *file, const unsigned char *buf, size_t len);
+ int (*seek_set)(ds_file_t *file, my_off_t offset);
int (*close)(ds_file_t *file);
int (*remove)(const char *path);
+ // TODO: consider to return bool from "rename" and "remove"
+ int (*rename)(ds_ctxt_t *ctxt, const char *old_path, const char *new_path);
+ int (*mremove)(ds_ctxt_t *ctxt, const char *path);
void (*deinit)(ds_ctxt_t *ctxt);
};
@@ -106,12 +112,17 @@ ds_ctxt_t *ds_create(const char *root, ds_type_t type);
/************************************************************************
Open a datasink file */
-ds_file_t *ds_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *stat);
+ds_file_t *ds_open(
+ ds_ctxt_t *ctxt, const char *path, const MY_STAT *stat, bool rewrite = false);
/************************************************************************
Write to a datasink file.
@return 0 on success, 1 on error. */
int ds_write(ds_file_t *file, const void *buf, size_t len);
+int ds_seek_set(ds_file_t *file, my_off_t offset);
+
+int ds_rename(ds_ctxt_t *ctxt, const char *old_path, const char *new_path);
+int ds_remove(ds_ctxt_t *ctxt, const char *path);
/************************************************************************
Close a datasink file.
diff --git a/extra/mariabackup/ddl_log.cc b/extra/mariabackup/ddl_log.cc
new file mode 100644
index 00000000..6af34172
--- /dev/null
+++ b/extra/mariabackup/ddl_log.cc
@@ -0,0 +1,553 @@
+#include "ddl_log.h"
+#include "common.h"
+#include "my_sys.h"
+#include "sql_table.h"
+#include "backup_copy.h"
+#include "xtrabackup.h"
+#include <unordered_set>
+#include <functional>
+#include <memory>
+#include <cstddef>
+
+namespace ddl_log {
+
+struct Entry {
+ enum Type {
+ CREATE,
+ ALTER,
+ RENAME,
+ REPAIR,
+ OPTIMIZE,
+ DROP,
+ TRUNCATE,
+ CHANGE_INDEX,
+ BULK_INSERT
+ };
+ Type type;
+ std::string date;
+ std::string engine;
+ bool partitioned;
+ std::string db;
+ std::string table;
+ std::string id;
+ std::string new_engine;
+ bool new_partitioned;
+ std::string new_db;
+ std::string new_table;
+ std::string new_id;
+};
+
+typedef std::vector<std::unique_ptr<Entry>> entries_t;
+typedef std::function<bool(std::unique_ptr<Entry>)> store_entry_func_t;
+
+const char *aria_engine_name = "Aria";
+static const char *frm_ext = ".frm";
+static const char *database_keyword = "DATABASE";
+
+const std::unordered_map<std::string, std::vector<const char *>> engine_exts =
+{
+ {"Aria", {".MAD", ".MAI"}},
+ {"MyISAM", {".MYD", ".MYI"}},
+ {"MRG_MyISAM", {".MRG"}},
+ {"ARCHIVE", {".ARM", ".ARZ"}},
+ {"CSV", {".CSM", ".CSV"}}
+};
+
+static inline bool known_engine(const std::string &engine) {
+ return engine_exts.count(engine);
+}
+
+// TODO: add error messages
+size_t parse(const uchar *buf, size_t buf_size, bool &error_flag,
+ store_entry_func_t &store_entry_func) {
+ DBUG_ASSERT(buf);
+ static constexpr char token_delimiter = '\t';
+ static constexpr char line_delimiter = '\n';
+ enum {
+ TOKEN_FIRST = 0,
+ TOKEN_DATE = TOKEN_FIRST,
+ TOKEN_TYPE,
+ TOKEN_ENGINE,
+ TOKEN_PARTITIONED,
+ TOKEN_DB,
+ TOKEN_TABLE,
+ TOKEN_ID,
+ TOKEN_MANDATORY = TOKEN_ID,
+ TOKEN_NEW_ENGINE,
+ TOKEN_NEW_PARTITIONED,
+ TOKEN_NEW_DB,
+ TOKEN_NEW_TABLE,
+ TOKEN_NEW_ID,
+ TOKEN_LAST = TOKEN_NEW_ID
+ };
+ const size_t string_offsets[TOKEN_LAST + 1] = {
+ offsetof(Entry, date),
+ offsetof(Entry, type), // not a string, be careful
+ offsetof(Entry, engine),
+ offsetof(Entry, partitioned), // not a string, be careful
+ offsetof(Entry, db),
+ offsetof(Entry, table),
+ offsetof(Entry, id),
+ offsetof(Entry, new_engine),
+ offsetof(Entry, new_partitioned), // not a string, be careful
+ offsetof(Entry, new_db),
+ offsetof(Entry, new_table),
+ offsetof(Entry, new_id)
+ };
+ const std::unordered_map<std::string, Entry::Type> str_to_type = {
+ {"CREATE", Entry::CREATE},
+ {"ALTER", Entry::ALTER},
+ {"RENAME", Entry::RENAME},
+ // TODO: fix to use uppercase-only
+ {"repair", Entry::REPAIR},
+ {"optimize", Entry::OPTIMIZE},
+ {"DROP", Entry::DROP},
+ {"TRUNCATE", Entry::TRUNCATE},
+ {"CHANGE_INDEX", Entry::CHANGE_INDEX},
+ {"BULK_INSERT", Entry::BULK_INSERT}
+ };
+
+ const uchar *new_line = buf;
+ const uchar *token_start = buf;
+ unsigned token_num = TOKEN_FIRST;
+
+ error_flag = false;
+
+ std::unique_ptr<Entry> entry(new Entry());
+
+ for (const uchar *ptr = buf; ptr < buf + buf_size; ++ptr) {
+
+ if (*ptr != token_delimiter && *ptr != line_delimiter)
+ continue;
+
+ if (token_start != ptr) {
+ std::string token(token_start, ptr);
+
+ if (token_num == TOKEN_TYPE) {
+ const auto type_it = str_to_type.find(token);
+ if (type_it == str_to_type.end()) {
+ error_flag = true;
+ goto exit;
+ }
+ entry->type = type_it->second;
+ }
+ else if (token_num == TOKEN_PARTITIONED) {
+ entry->partitioned = token[0] - '0';
+ }
+ else if (token_num == TOKEN_NEW_PARTITIONED) {
+ entry->new_partitioned = token[0] - '0';
+ }
+ else if (token_num <= TOKEN_LAST) {
+ DBUG_ASSERT(token_num != TOKEN_TYPE);
+ DBUG_ASSERT(token_num != TOKEN_PARTITIONED);
+ DBUG_ASSERT(token_num != TOKEN_NEW_PARTITIONED);
+ reinterpret_cast<std::string *>
+ (reinterpret_cast<uchar *>(entry.get()) + string_offsets[token_num])->
+ assign(std::move(token));
+ }
+ else {
+ error_flag = true;
+ goto exit;
+ }
+ }
+ token_start = ptr + 1;
+
+ if (*ptr == line_delimiter) {
+ if (token_num < TOKEN_MANDATORY) {
+ error_flag = true;
+ goto exit;
+ }
+ if (!store_entry_func(std::move(entry))) {
+ error_flag = true;
+ goto exit;
+ }
+ entry.reset(new Entry());
+ token_num = TOKEN_FIRST;
+ new_line = ptr + 1;
+ } else
+ ++token_num;
+ }
+
+exit:
+ return new_line - buf;
+}
+
+bool parse(const char *file_path, store_entry_func_t store_entry_func) {
+ DBUG_ASSERT(file_path);
+ DBUG_ASSERT(store_entry_func);
+ File file= -1;
+ bool result = true;
+ uchar buf[1024];
+ size_t bytes_read = 0;
+ size_t buf_read_offset = 0;
+
+ if ((file= my_open(file_path, O_RDONLY | O_SHARE | O_NOFOLLOW | O_CLOEXEC,
+ MYF(MY_WME))) < 0) {
+ msg("DDL log file %s open failed: %d", file_path, my_errno);
+ result = false;
+ goto exit;
+ }
+
+ while((bytes_read = my_read(
+ file, &buf[buf_read_offset], sizeof(buf) - buf_read_offset, MY_WME)) > 0) {
+ if (bytes_read == size_t(-1)) {
+ msg("DDL log file %s read error: %d", file_path, my_errno);
+ result = false;
+ break;
+ }
+ bytes_read += buf_read_offset;
+ bool parse_error_flag = false;
+ size_t bytes_parsed = parse(
+ buf, bytes_read, parse_error_flag, store_entry_func);
+ if (parse_error_flag) {
+ result = false;
+ break;
+ }
+ size_t rest_size = bytes_read - bytes_parsed;
+ if (rest_size)
+ memcpy(buf, buf + bytes_parsed, rest_size);
+ buf_read_offset = rest_size;
+ }
+
+exit:
+ if (file >= 0)
+ my_close(file, MYF(MY_WME));
+ return result;
+};
+
+
+static
+bool process_database(
+ const char *datadir_path,
+ ds_ctxt_t *ds,
+ const Entry &entry,
+ std::unordered_set<std::string> &dropped_databases) {
+
+ if (entry.type == Entry::Type::CREATE ||
+ entry.type == Entry::Type::ALTER) {
+ std::string opt_file(datadir_path);
+ opt_file.append("/").append(entry.db).append("/db.opt");
+ if (!ds->copy_file(opt_file.c_str(), opt_file.c_str(), 0, true)) {
+ msg("Failed to re-copy %s.", opt_file.c_str());
+ return false;
+ }
+ if (entry.type == Entry::Type::CREATE)
+ dropped_databases.erase(entry.db);
+ return true;
+ }
+
+ DBUG_ASSERT(entry.type == Entry::Type::DROP);
+
+ std::string db_path(datadir_path);
+ db_path.append("/").append(entry.db);
+ const char *dst_path = convert_dst(db_path.c_str());
+ if (!ds_remove(ds, dst_path)) {
+ dropped_databases.insert(entry.db);
+ return true;
+ }
+ return false;
+}
+
+static
+std::unique_ptr<std::vector<std::string>>
+ find_table_files(
+ const char *dir_path,
+ const std::string &db,
+ const std::string &table) {
+
+ std::unique_ptr<std::vector<std::string>>
+ result(new std::vector<std::string>());
+
+ std::string prefix = convert_tablename_to_filepath(dir_path, db, table);
+ foreach_file_in_db_dirs(dir_path, [&](const char *file_name)->bool {
+ if (!strncmp(file_name, prefix.c_str(), prefix.size())) {
+ DBUG_ASSERT(strlen(file_name) >= prefix.size());
+ if (file_name[prefix.size()] == '.' ||
+ !strncmp(file_name + prefix.size(), "#P#", strlen("#P#")))
+ result->push_back(std::string(file_name));
+ }
+ return true;
+ });
+
+ return result;
+}
+
+static
+bool process_remove(
+ const char *datadir_path,
+ ds_ctxt_t *ds,
+ const Entry &entry,
+ bool remove_frm) {
+
+ if (check_if_skip_table(
+ std::string(entry.db).append("/").append(entry.table).c_str()))
+ return true;
+
+ auto ext_it = engine_exts.find(entry.engine);
+ if (ext_it == engine_exts.end())
+ return true;
+
+ std::string file_preffix = convert_tablename_to_filepath(datadir_path,
+ entry.db, entry.table);
+ const char *dst_preffix = convert_dst(file_preffix.c_str());
+
+ for (const char *ext : ext_it->second) {
+ std::string old_name(dst_preffix);
+ if (!entry.partitioned)
+ old_name.append(ext);
+ else
+ old_name.append("#P#*");
+ if (ds_remove(ds, old_name.c_str())) {
+ msg("Failed to remove %s.", old_name.c_str());
+ return false;
+ }
+ }
+
+ if (remove_frm) {
+ std::string old_frm_name(dst_preffix);
+ old_frm_name.append(frm_ext);
+ if (ds_remove(ds, old_frm_name.c_str())) {
+ msg("Failed to remove %s.", old_frm_name.c_str());
+ return false;
+ }
+ }
+ return true;
+
+}
+
+static
+bool process_recopy(
+ const char *datadir_path,
+ ds_ctxt_t *ds,
+ const Entry &entry,
+ const tables_t &tables) {
+
+ if (check_if_skip_table(
+ std::string(entry.db).append("/").append(entry.table).c_str()))
+ return true;
+
+ const std::string &new_table_id =
+ entry.new_id.empty() ? entry.id : entry.new_id;
+ DBUG_ASSERT(!new_table_id.empty());
+ const std::string &new_table =
+ entry.new_table.empty() ? entry.table : entry.new_table;
+ DBUG_ASSERT(!new_table.empty());
+ const std::string &new_db =
+ entry.new_db.empty() ? entry.db : entry.new_db;
+ DBUG_ASSERT(!new_db.empty());
+ const std::string &new_engine =
+ entry.new_engine.empty() ? entry.engine : entry.new_engine;
+ DBUG_ASSERT(!new_engine.empty());
+
+ if (entry.type != Entry::Type::BULK_INSERT) {
+ auto table_it = tables.find(table_key(new_db, new_table));
+ if (table_it != tables.end() &&
+ table_it->second == new_table_id)
+ return true;
+ }
+
+ if (!entry.new_engine.empty() &&
+ entry.engine != entry.new_engine &&
+ !known_engine(entry.new_engine)) {
+ return process_remove(datadir_path, ds, entry, false);
+ }
+
+ if ((entry.partitioned || entry.new_partitioned) &&
+ !process_remove(datadir_path, ds, entry, false))
+ return false;
+
+ if (entry.partitioned || entry.new_partitioned) {
+ auto files = find_table_files(datadir_path, new_db, new_table);
+ if (!files.get())
+ return true;
+ for (const auto &file : *files) {
+ const char *dst_path = convert_dst(file.c_str());
+ if (!ds->copy_file(file.c_str(), dst_path, 0, true)) {
+ msg("Failed to re-copy %s.", file.c_str());
+ return false;
+ }
+ }
+ return true;
+ }
+
+ auto ext_it = engine_exts.find(new_engine);
+ if (ext_it == engine_exts.end())
+ return false;
+
+ for (const char *ext : ext_it->second) {
+ std::string file_name =
+ convert_tablename_to_filepath(datadir_path, new_db, new_table).
+ append(ext);
+ const char *dst_path = convert_dst(file_name.c_str());
+ if (file_exists(file_name.c_str()) &&
+ !ds->copy_file(file_name.c_str(), dst_path, 0, true)) {
+ msg("Failed to re-copy %s.", file_name.c_str());
+ return false;
+ }
+ }
+
+ std::string frm_file =
+ convert_tablename_to_filepath(datadir_path, new_db, new_table).
+ append(frm_ext);
+ const char *frm_dst_path = convert_dst(frm_file.c_str());
+ if (file_exists(frm_file.c_str()) &&
+ !ds->copy_file(frm_file.c_str(), frm_dst_path, 0, true)) {
+ msg("Failed to re-copy %s.", frm_file.c_str());
+ return false;
+ }
+
+ return true;
+}
+
+static
+bool process_rename(
+ const char *datadir_path,
+ ds_ctxt_t *ds,
+ const Entry &entry) {
+
+ if (check_if_skip_table(
+ std::string(entry.db).append("/").append(entry.table).c_str()))
+ return true;
+
+ DBUG_ASSERT(entry.db != "partition");
+
+ auto ext_it = engine_exts.find(entry.engine);
+ if (ext_it == engine_exts.end())
+ return false;
+
+ std::string new_preffix = convert_tablename_to_filepath(datadir_path,
+ entry.new_db, entry.new_table);
+ const char *dst_path = convert_dst(new_preffix.c_str());
+
+ std::string old_preffix = convert_tablename_to_filepath(datadir_path,
+ entry.db, entry.table);
+ const char *src_path = convert_dst(old_preffix.c_str());
+
+ for (const char *ext : ext_it->second) {
+ std::string old_name(src_path);
+ old_name.append(ext);
+ std::string new_name(dst_path);
+ new_name.append(ext);
+ if (ds_rename(ds, old_name.c_str(), new_name.c_str())) {
+ msg("Failed to rename %s to %s.",
+ old_name.c_str(), new_name.c_str());
+ return false;
+ }
+ }
+
+ std::string new_frm_file = new_preffix + frm_ext;
+ const char *new_frm_dst = convert_dst(new_frm_file.c_str());
+ if (file_exists(new_frm_file.c_str()) &&
+ !ds->copy_file(new_frm_file.c_str(), new_frm_dst, 0, true)) {
+ msg("Failed to re-copy %s.", new_frm_file.c_str());
+ return false;
+ }
+
+// TODO: return this code if .frm is copied not under BLOCK_DDL
+/*
+ std::string old_frm_name(src_path);
+ old_frm_name.append(frm_ext);
+ std::string new_frm_name(dst_path);
+ new_frm_name.append(frm_ext);
+ if (ds_rename(ds, old_frm_name.c_str(), new_frm_name.c_str())) {
+ msg("Failed to rename %s to %s.",
+ old_frm_name.c_str(), new_frm_name.c_str());
+ return false;
+ }
+*/
+ return true;
+}
+
+bool backup(
+ const char *datadir_path,
+ ds_ctxt_t *ds,
+ const tables_t &tables) {
+ DBUG_ASSERT(datadir_path);
+ DBUG_ASSERT(ds);
+ char ddl_log_path[FN_REFLEN];
+ fn_format(ddl_log_path, "ddl", datadir_path, ".log", 0);
+ std::vector<std::unique_ptr<Entry>> entries;
+
+ std::unordered_set<std::string> processed_tables;
+ std::unordered_set<std::string> dropped_databases;
+
+ bool parsing_result =
+ parse(ddl_log_path, [&](std::unique_ptr<Entry> entry)->bool {
+
+ if (entry->engine == database_keyword)
+ return process_database(datadir_path, ds, *entry, dropped_databases);
+
+ if (!known_engine(entry->engine) && !known_engine(entry->new_engine))
+ return true;
+
+ if (entry->type == Entry::Type::CREATE ||
+ (entry->type == Entry::Type::ALTER &&
+ !entry->new_engine.empty() &&
+ entry->engine != entry->new_engine)) {
+ if (!process_recopy(datadir_path, ds, *entry, tables))
+ return false;
+ processed_tables.insert(table_key(entry->db, entry->table));
+ if (entry->type == Entry::Type::ALTER)
+ processed_tables.insert(table_key(entry->new_db, entry->new_table));
+ return true;
+ }
+
+ if (entry->type == Entry::Type::DROP) {
+ if (!process_remove(datadir_path, ds, *entry, true))
+ return false;
+ processed_tables.insert(table_key(entry->db, entry->table));
+ return true;
+ }
+ if (entry->type == Entry::Type::RENAME) {
+ if (entry->partitioned) {
+ if (!process_remove(datadir_path, ds, *entry, true))
+ return false;
+ Entry recopy_entry {
+ entry->type,
+ {},
+ entry->new_engine.empty() ? entry->engine : entry->new_engine,
+ true,
+ entry->new_db,
+ entry->new_table,
+ entry->new_id,
+ {}, true, {}, {}, {}
+ };
+ if (!process_recopy(datadir_path, ds, recopy_entry, tables))
+ return false;
+ }
+ else if (!process_rename(datadir_path, ds, *entry))
+ return false;
+ processed_tables.insert(table_key(entry->db, entry->table));
+ processed_tables.insert(table_key(entry->new_db, entry->new_table));
+ return true;
+ }
+
+ entries.push_back(std::move(entry));
+ return true;
+
+ });
+
+ if (!parsing_result)
+ return false;
+
+
+ while (!entries.empty()) {
+ auto entry = std::move(entries.back());
+ entries.pop_back();
+ auto tk = table_key(
+ entry->new_db.empty() ? entry->db : entry->new_db,
+ entry->new_table.empty() ? entry->table : entry->new_table);
+ if (dropped_databases.count(entry->db) ||
+ dropped_databases.count(entry->new_db))
+ continue;
+ if (processed_tables.count(tk))
+ continue;
+ processed_tables.insert(std::move(tk));
+ if (!process_recopy(datadir_path, ds, *entry, tables))
+ return false;
+ }
+
+ return true;
+}
+
+} // namespace ddl_log
diff --git a/extra/mariabackup/ddl_log.h b/extra/mariabackup/ddl_log.h
new file mode 100644
index 00000000..5cac3e5d
--- /dev/null
+++ b/extra/mariabackup/ddl_log.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "my_global.h"
+#include "datasink.h"
+#include "aria_backup_client.h"
+#include <string>
+#include <memory>
+#include <vector>
+#include <unordered_map>
+
+namespace ddl_log {
+
+typedef std::unordered_map<std::string, std::string> tables_t;
+bool backup(const char *datadir_path, ds_ctxt_t *ds, const tables_t &tables);
+
+} // namespace ddl_log
diff --git a/extra/mariabackup/ds_buffer.cc b/extra/mariabackup/ds_buffer.cc
index d6a42095..bc1d4663 100644
--- a/extra/mariabackup/ds_buffer.cc
+++ b/extra/mariabackup/ds_buffer.cc
@@ -44,7 +44,7 @@ typedef struct {
static ds_ctxt_t *buffer_init(const char *root);
static ds_file_t *buffer_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat);
+ const MY_STAT *mystat, bool rewrite);
static int buffer_write(ds_file_t *file, const uchar *buf, size_t len);
static int buffer_close(ds_file_t *file);
static void buffer_deinit(ds_ctxt_t *ctxt);
@@ -53,8 +53,11 @@ datasink_t datasink_buffer = {
&buffer_init,
&buffer_open,
&buffer_write,
+ nullptr,
&buffer_close,
&dummy_remove,
+ nullptr,
+ nullptr,
&buffer_deinit
};
@@ -84,8 +87,10 @@ buffer_init(const char *root)
}
static ds_file_t *
-buffer_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
+buffer_open(ds_ctxt_t *ctxt, const char *path,
+ const MY_STAT *mystat, bool rewrite)
{
+ DBUG_ASSERT(rewrite == false);
ds_buffer_ctxt_t *buffer_ctxt;
ds_ctxt_t *pipe_ctxt;
ds_file_t *dst_file;
diff --git a/extra/mariabackup/ds_compress.cc b/extra/mariabackup/ds_compress.cc
index f7a9b7a1..0cb52e97 100644
--- a/extra/mariabackup/ds_compress.cc
+++ b/extra/mariabackup/ds_compress.cc
@@ -65,7 +65,7 @@ extern ulonglong xtrabackup_compress_chunk_size;
static ds_ctxt_t *compress_init(const char *root);
static ds_file_t *compress_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat);
+ const MY_STAT *mystat, bool rewrite);
static int compress_write(ds_file_t *file, const uchar *buf, size_t len);
static int compress_close(ds_file_t *file);
static void compress_deinit(ds_ctxt_t *ctxt);
@@ -74,8 +74,11 @@ datasink_t datasink_compress = {
&compress_init,
&compress_open,
&compress_write,
+ nullptr,
&compress_close,
&dummy_remove,
+ nullptr,
+ nullptr,
&compress_deinit
};
@@ -116,8 +119,10 @@ compress_init(const char *root)
static
ds_file_t *
-compress_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
+compress_open(ds_ctxt_t *ctxt, const char *path,
+ const MY_STAT *mystat, bool rewrite)
{
+ DBUG_ASSERT(rewrite == false);
ds_compress_ctxt_t *comp_ctxt;
ds_ctxt_t *dest_ctxt;
ds_file_t *dest_file;
diff --git a/extra/mariabackup/ds_local.cc b/extra/mariabackup/ds_local.cc
index f86612b9..ff2021fc 100644
--- a/extra/mariabackup/ds_local.cc
+++ b/extra/mariabackup/ds_local.cc
@@ -42,8 +42,9 @@ typedef struct {
static ds_ctxt_t *local_init(const char *root);
static ds_file_t *local_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat);
+ const MY_STAT *mystat, bool rewrite);
static int local_write(ds_file_t *file, const uchar *buf, size_t len);
+static int local_seek_set(ds_file_t *file, my_off_t offset);
static int local_close(ds_file_t *file);
static void local_deinit(ds_ctxt_t *ctxt);
@@ -52,13 +53,20 @@ static int local_remove(const char *path)
return unlink(path);
}
+static int local_rename(
+ ds_ctxt_t *ctxt, const char *old_path, const char *new_path);
+static int local_mremove(ds_ctxt_t *ctxt, const char *path);
+
extern "C" {
datasink_t datasink_local = {
&local_init,
&local_open,
&local_write,
+ &local_seek_set,
&local_close,
&local_remove,
+ &local_rename,
+ &local_mremove,
&local_deinit
};
}
@@ -89,7 +97,7 @@ local_init(const char *root)
static
ds_file_t *
local_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat __attribute__((unused)))
+ const MY_STAT *mystat __attribute__((unused)), bool rewrite)
{
char fullpath[FN_REFLEN];
char dirpath[FN_REFLEN];
@@ -111,8 +119,10 @@ local_open(ds_ctxt_t *ctxt, const char *path,
return NULL;
}
- fd = my_create(fullpath, 0, O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
- MYF(MY_WME));
+ // TODO: check in Windows and set the corresponding flags on fail
+ fd = my_create(fullpath, 0,
+ O_WRONLY | O_BINARY | (rewrite ? O_TRUNC : O_EXCL) | O_NOFOLLOW,
+ MYF(MY_WME));
if (fd < 0) {
return NULL;
}
@@ -194,8 +204,8 @@ static void init_ibd_data(ds_local_file_t *local_file, const uchar *buf, size_t
return;
}
- auto flags = mach_read_from_4(&buf[FIL_PAGE_DATA + FSP_SPACE_FLAGS]);
- auto ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
+ uint32_t flags = mach_read_from_4(&buf[FIL_PAGE_DATA + FSP_SPACE_FLAGS]);
+ uint32_t 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 = fil_space_t::full_crc32(flags)
? fil_space_t::is_compressed(flags)
@@ -239,6 +249,15 @@ local_write(ds_file_t *file, const uchar *buf, size_t len)
return 1;
}
+static
+int
+local_seek_set(ds_file_t *file, my_off_t offset) {
+ ds_local_file_t *local_file= (ds_local_file_t *)file->ptr;
+ if (my_seek(local_file->fd, offset, SEEK_SET, MYF(0)) == MY_FILEPOS_ERROR)
+ return 1;
+ return 0;
+}
+
/* Set EOF at file's current position.*/
static int set_eof(File fd)
{
@@ -276,3 +295,77 @@ local_deinit(ds_ctxt_t *ctxt)
my_free(ctxt->root);
my_free(ctxt);
}
+
+
+static int local_rename(
+ ds_ctxt_t *ctxt, const char *old_path, const char *new_path) {
+ char full_old_path[FN_REFLEN];
+ char full_new_path[FN_REFLEN];
+ fn_format(full_old_path, old_path, ctxt->root, "", MYF(MY_RELATIVE_PATH));
+ fn_format(full_new_path, new_path, ctxt->root, "", MYF(MY_RELATIVE_PATH));
+ // Ignore errors as .frm files can me copied separately.
+ // TODO: return error processing here after the corresponding changes in
+ // xtrabackup.cc
+ (void)my_rename(full_old_path, full_new_path, MYF(0));
+// if (my_rename(full_old_path, full_new_path, MYF(0))) {
+// msg("Failed to rename file %s to %s", old_path, new_path);
+// return 1;
+// }
+ return 0;
+}
+
+// It's ok if destination does not contain the file or folder
+static int local_mremove(ds_ctxt_t *ctxt, const char *path) {
+ char full_path[FN_REFLEN];
+ fn_format(full_path, path, ctxt->root, "", MYF(MY_RELATIVE_PATH));
+ size_t full_path_len = strlen(full_path);
+ if (full_path[full_path_len - 1] == '*') {
+ full_path[full_path_len - 1] = '\0';
+ char *preffix = strrchr(full_path, '/');
+ const char *full_path_dir = full_path;
+ size_t preffix_len;
+ if (preffix) {
+ preffix_len = (full_path_len - 1) - (preffix - full_path);
+ *(preffix++) = '\0';
+ }
+ else {
+ preffix = full_path;
+ preffix_len = full_path_len - 1;
+ full_path_dir= IF_WIN(".\\", "./");
+ }
+ if (!preffix_len)
+ return 0;
+ MY_DIR *dir= my_dir(full_path_dir, 0);
+ if (!dir)
+ return 0;
+ for (size_t i = 0; i < dir->number_of_files; ++i) {
+ char full_fpath[FN_REFLEN];
+ if (strncmp(dir->dir_entry[i].name, preffix, preffix_len))
+ continue;
+ fn_format(full_fpath, dir->dir_entry[i].name,
+ full_path_dir, "", MYF(MY_RELATIVE_PATH));
+ (void)my_delete(full_fpath, MYF(0));
+ }
+ my_dirend(dir);
+ }
+ else {
+ MY_STAT stat;
+ if (!my_stat(full_path, &stat, MYF(0)))
+ return 0;
+ MY_DIR *dir= my_dir(full_path, 0);
+ if (!dir) {
+ // TODO: check for error here if necessary
+ (void)my_delete(full_path, MYF(0));
+ return 0;
+ }
+ for (size_t i = 0; i < dir->number_of_files; ++i) {
+ char full_fpath[FN_REFLEN];
+ fn_format(full_fpath, dir->dir_entry[i].name,
+ full_path, "", MYF(MY_RELATIVE_PATH));
+ (void)my_delete(full_fpath, MYF(0));
+ }
+ my_dirend(dir);
+ (void)my_rmtree(full_path, MYF(0));
+ }
+ return 0;
+}
diff --git a/extra/mariabackup/ds_stdout.cc b/extra/mariabackup/ds_stdout.cc
index a9639ff7..3fc0873b 100644
--- a/extra/mariabackup/ds_stdout.cc
+++ b/extra/mariabackup/ds_stdout.cc
@@ -30,7 +30,7 @@ typedef struct {
static ds_ctxt_t *stdout_init(const char *root);
static ds_file_t *stdout_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat);
+ const MY_STAT *mystat, bool rewrite);
static int stdout_write(ds_file_t *file, const uchar *buf, size_t len);
static int stdout_close(ds_file_t *file);
static void stdout_deinit(ds_ctxt_t *ctxt);
@@ -39,8 +39,11 @@ datasink_t datasink_stdout = {
&stdout_init,
&stdout_open,
&stdout_write,
+ nullptr,
&stdout_close,
&dummy_remove,
+ nullptr,
+ nullptr,
&stdout_deinit
};
@@ -61,8 +64,9 @@ static
ds_file_t *
stdout_open(ds_ctxt_t *ctxt __attribute__((unused)),
const char *path __attribute__((unused)),
- MY_STAT *mystat __attribute__((unused)))
+ const MY_STAT *mystat __attribute__((unused)), bool rewrite)
{
+ DBUG_ASSERT(rewrite == false);
ds_stdout_file_t *stdout_file;
ds_file_t *file;
size_t pathlen;
diff --git a/extra/mariabackup/ds_tmpfile.cc b/extra/mariabackup/ds_tmpfile.cc
index 80b9d3bb..6bafee25 100644
--- a/extra/mariabackup/ds_tmpfile.cc
+++ b/extra/mariabackup/ds_tmpfile.cc
@@ -41,7 +41,7 @@ typedef struct {
static ds_ctxt_t *tmpfile_init(const char *root);
static ds_file_t *tmpfile_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat);
+ const MY_STAT *mystat, bool rewrite);
static int tmpfile_write(ds_file_t *file, const uchar *buf, size_t len);
static int tmpfile_close(ds_file_t *file);
static void tmpfile_deinit(ds_ctxt_t *ctxt);
@@ -50,8 +50,11 @@ datasink_t datasink_tmpfile = {
&tmpfile_init,
&tmpfile_open,
&tmpfile_write,
+ nullptr,
&tmpfile_close,
&dummy_remove,
+ nullptr,
+ nullptr,
&tmpfile_deinit
};
@@ -80,8 +83,9 @@ tmpfile_init(const char *root)
static ds_file_t *
tmpfile_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat)
+ const MY_STAT *mystat, bool rewrite)
{
+ DBUG_ASSERT(rewrite == false);
ds_tmpfile_ctxt_t *tmpfile_ctxt;
char tmp_path[FN_REFLEN];
ds_tmp_file_t *tmp_file;
diff --git a/extra/mariabackup/ds_xbstream.cc b/extra/mariabackup/ds_xbstream.cc
index 3bf8bd08..96e0cf7a 100644
--- a/extra/mariabackup/ds_xbstream.cc
+++ b/extra/mariabackup/ds_xbstream.cc
@@ -40,24 +40,31 @@ General streaming interface */
static ds_ctxt_t *xbstream_init(const char *root);
static ds_file_t *xbstream_open(ds_ctxt_t *ctxt, const char *path,
- MY_STAT *mystat);
+ const MY_STAT *mystat, bool rewrite);
static int xbstream_write(ds_file_t *file, const uchar *buf, size_t len);
+static int xbstream_seek_set(ds_file_t *file, my_off_t offset);
static int xbstream_close(ds_file_t *file);
static void xbstream_deinit(ds_ctxt_t *ctxt);
+static int xbstream_rename(
+ ds_ctxt_t *ctxt, const char *old_path, const char *new_path);
+static int xbstream_mremove(ds_ctxt_t *ctxt, const char *path);
+
datasink_t datasink_xbstream = {
&xbstream_init,
&xbstream_open,
&xbstream_write,
+ &xbstream_seek_set,
&xbstream_close,
&dummy_remove,
+ &xbstream_rename,
+ &xbstream_mremove,
&xbstream_deinit
};
static
ssize_t
-my_xbstream_write_callback(xb_wstream_file_t *f __attribute__((unused)),
- void *userdata, const void *buf, size_t len)
+my_xbstream_write_callback(void *userdata, const void *buf, size_t len)
{
ds_stream_ctxt_t *stream_ctxt;
@@ -89,7 +96,7 @@ xbstream_init(const char *root __attribute__((unused)))
goto err;
}
- xbstream = xb_stream_write_new();
+ xbstream = xb_stream_write_new(my_xbstream_write_callback, stream_ctxt);
if (xbstream == NULL) {
msg("xb_stream_write_new() failed.");
goto err;
@@ -108,7 +115,8 @@ err:
static
ds_file_t *
-xbstream_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
+xbstream_open(ds_ctxt_t *ctxt, const char *path,
+ const MY_STAT *mystat, bool rewrite)
{
ds_file_t *file;
ds_stream_file_t *stream_file;
@@ -144,9 +152,7 @@ xbstream_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
xbstream = stream_ctxt->xbstream;
- xbstream_file = xb_stream_write_open(xbstream, path, mystat,
- stream_ctxt,
- my_xbstream_write_callback);
+ xbstream_file = xb_stream_write_open(xbstream, path, mystat, rewrite);
if (xbstream_file == NULL) {
msg("xb_stream_write_open() failed.");
@@ -192,6 +198,45 @@ xbstream_write(ds_file_t *file, const uchar *buf, size_t len)
static
int
+xbstream_seek_set(ds_file_t *file, my_off_t offset)
+{
+ ds_stream_file_t *stream_file;
+ xb_wstream_file_t *xbstream_file;
+
+
+ stream_file = (ds_stream_file_t *) file->ptr;
+
+ xbstream_file = stream_file->xbstream_file;
+
+ if (xb_stream_write_seek_set(xbstream_file, offset)) {
+ msg("xb_stream_write_seek_set() failed.");
+ return 1;
+ }
+
+ return 0;
+}
+
+static
+int
+xbstream_mremove(ds_ctxt_t *ctxt, const char *path) {
+ ds_stream_ctxt_t *stream_ctxt =
+ reinterpret_cast<ds_stream_ctxt_t *>(ctxt->ptr);
+ xb_wstream_t *xbstream = stream_ctxt->xbstream;
+ return xb_stream_write_remove(xbstream, path);
+}
+
+static
+int
+xbstream_rename(
+ ds_ctxt_t *ctxt, const char *old_path, const char *new_path) {
+ ds_stream_ctxt_t *stream_ctxt =
+ reinterpret_cast<ds_stream_ctxt_t *>(ctxt->ptr);
+ xb_wstream_t *xbstream = stream_ctxt->xbstream;
+ return xb_stream_write_rename(xbstream, old_path, new_path);
+}
+
+static
+int
xbstream_close(ds_file_t *file)
{
ds_stream_file_t *stream_file;
diff --git a/extra/mariabackup/xb_plugin.cc b/extra/mariabackup/encryption_plugin.cc
index 7470d376..ab0c5140 100644
--- a/extra/mariabackup/xb_plugin.cc
+++ b/extra/mariabackup/encryption_plugin.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, 2022, MariaDB Corporation.
+/* 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
@@ -17,18 +17,18 @@
#include <mysqld.h>
#include <mysql.h>
#include <xtrabackup.h>
-#include <xb_plugin.h>
+#include <encryption_plugin.h>
#include <sql_plugin.h>
#include <sstream>
#include <vector>
#include <common.h>
#include <backup_mysql.h>
-#include <srv0srv.h>
+#include <log0crypt.h>
extern struct st_maria_plugin *mysql_optional_plugins[];
extern struct st_maria_plugin *mysql_mandatory_plugins[];
-static void xb_plugin_init(int argc, char **argv);
+static void encryption_plugin_init(int argc, char **argv);
extern char *xb_plugin_load;
extern char *xb_plugin_dir;
@@ -42,7 +42,7 @@ const char *QUERY_PLUGIN =
" OR (plugin_type = 'DAEMON' AND plugin_name LIKE 'provider\\_%')"
" AND plugin_status='ACTIVE'";
-std::string xb_plugin_config;
+std::string encryption_plugin_config;
static void add_to_plugin_load_list(const char *plugin_def)
{
@@ -52,16 +52,16 @@ static void add_to_plugin_load_list(const char *plugin_def)
static char XTRABACKUP_EXE[] = "xtrabackup";
/*
- Read "plugin-load" value from backup-my.cnf during prepare phase.
+ Read "plugin-load" value (encryption plugin) from backup-my.cnf during
+ prepare phase.
The value is stored during backup phase.
*/
-static std::string get_plugin_from_cnf(const char *dir)
+static std::string get_encryption_plugin_from_cnf()
{
- std::string path = dir + std::string("/backup-my.cnf");
- FILE *f = fopen(path.c_str(), "r");
+ FILE *f = fopen("backup-my.cnf", "r");
if (!f)
{
- die("Can't open %s for reading", path.c_str());
+ die("Can't open backup-my.cnf for reading");
}
char line[512];
std::string plugin_load;
@@ -72,7 +72,16 @@ static std::string get_plugin_from_cnf(const char *dir)
plugin_load = line + 12;
// remote \n at the end of string
plugin_load.resize(plugin_load.size() - 1);
- break;
+ }
+
+ if (strncmp(line, "innodb_encrypt_tables=", 22) == 0)
+ {
+ if (!strncmp(line + 22, "ON", 2) ||
+ !strncmp(line + 22, "1", 1))
+ srv_encrypt_tables= 1;
+ else if (!strncmp(line + 22, "FORCE", 5) ||
+ !strncmp(line + 22, "2", 1))
+ srv_encrypt_tables= 2;
}
}
fclose(f);
@@ -80,7 +89,7 @@ static std::string get_plugin_from_cnf(const char *dir)
}
-void xb_plugin_backup_init(MYSQL *mysql)
+void encryption_plugin_backup_init(MYSQL *mysql)
{
MYSQL_RES *result;
MYSQL_ROW row;
@@ -163,7 +172,18 @@ void xb_plugin_backup_init(MYSQL *mysql)
mysql_free_result(result);
}
- xb_plugin_config = oss.str();
+ result = xb_mysql_query(mysql, "select @@innodb_encrypt_tables", true, true);
+ row = mysql_fetch_row(result);
+ if (!row);
+ else if (const char *r= row[0])
+ {
+ if (!strcmp(r, "ON")) srv_encrypt_tables= 1;
+ else if (!strcmp(r, "FORCE")) srv_encrypt_tables= 2;
+ oss << "innodb_encrypt_tables=" << r << std::endl;
+ }
+
+ mysql_free_result(result);
+ encryption_plugin_config = oss.str();
argc = 0;
argv[argc++] = XTRABACKUP_EXE;
@@ -175,23 +195,23 @@ void xb_plugin_backup_init(MYSQL *mysql)
}
argv[argc] = 0;
- xb_plugin_init(argc, argv);
+ encryption_plugin_init(argc, argv);
}
-const char *xb_plugin_get_config()
+const char *encryption_plugin_get_config()
{
- return xb_plugin_config.c_str();
+ return encryption_plugin_config.c_str();
}
extern int finalize_encryption_plugin(st_plugin_int *plugin);
-void xb_plugin_prepare_init(int argc, char **argv, const char *dir)
+void encryption_plugin_prepare_init(int argc, char **argv)
{
- std::string plugin_load= get_plugin_from_cnf(dir ? dir : ".");
+ std::string plugin_load= get_encryption_plugin_from_cnf();
if (plugin_load.size())
{
- msg("Loading plugins from %s", plugin_load.c_str());
+ msg("Loading encryption plugin from %s", plugin_load.c_str());
}
else
{
@@ -211,19 +231,19 @@ void xb_plugin_prepare_init(int argc, char **argv, const char *dir)
new_argv[0] = XTRABACKUP_EXE;
memcpy(&new_argv[1], argv, argc*sizeof(char *));
- xb_plugin_init(argc+1, new_argv);
+ encryption_plugin_init(argc+1, new_argv);
delete[] new_argv;
}
-static void xb_plugin_init(int argc, char **argv)
+static void encryption_plugin_init(int argc, char **argv)
{
/* Patch optional and mandatory plugins, we only need to load the one in xb_plugin_load. */
mysql_optional_plugins[0] = mysql_mandatory_plugins[0] = 0;
plugin_maturity = MariaDB_PLUGIN_MATURITY_UNKNOWN; /* mariabackup accepts all plugins */
- msg("Loading plugins");
+ msg("Loading encryption plugin");
for (int i= 1; i < argc; i++)
- msg("\t Plugin parameter : '%s'", argv[i]);
+ msg("\t Encryption plugin parameter : '%s'", argv[i]);
plugin_init(&argc, argv, PLUGIN_INIT_SKIP_PLUGIN_TABLE);
}
diff --git a/extra/mariabackup/encryption_plugin.h b/extra/mariabackup/encryption_plugin.h
new file mode 100644
index 00000000..16d74790
--- /dev/null
+++ b/extra/mariabackup/encryption_plugin.h
@@ -0,0 +1,7 @@
+#include <mysql.h>
+#include <string>
+extern void encryption_plugin_backup_init(MYSQL *mysql);
+extern const char* encryption_plugin_get_config();
+extern void encryption_plugin_prepare_init(int argc, char **argv);
+
+//extern void encryption_plugin_init(int argc, char **argv);
diff --git a/extra/mariabackup/fil_cur.cc b/extra/mariabackup/fil_cur.cc
index 4f5d67a5..be871e4a 100644
--- a/extra/mariabackup/fil_cur.cc
+++ b/extra/mariabackup/fil_cur.cc
@@ -199,14 +199,6 @@ xb_fil_cur_open(
return(XB_FIL_CUR_SKIP);
}
-#ifdef HAVE_FCNTL_DIRECT
- if (srv_file_flush_method == SRV_O_DIRECT
- || srv_file_flush_method == SRV_O_DIRECT_NO_FSYNC) {
-
- os_file_set_nocache(cursor->file, node->name, "OPEN");
- }
-#endif
-
posix_fadvise(cursor->file, 0, 0, POSIX_FADV_SEQUENTIAL);
cursor->page_size = node->space->physical_size();
@@ -239,12 +231,14 @@ xb_fil_cur_open(
/ cursor->page_size);
cursor->read_filter = read_filter;
- cursor->read_filter->init(&cursor->read_filter_ctxt, cursor,
- node->space->id);
+ cursor->read_filter->init(&cursor->read_filter_ctxt, cursor);
return(XB_FIL_CUR_SUCCESS);
}
+/* Stack usage 131224 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static bool page_is_corrupted(const byte *page, ulint page_no,
const xb_fil_cur_t *cursor,
const fil_space_t *space)
@@ -348,6 +342,7 @@ static bool page_is_corrupted(const byte *page, ulint page_no,
return buf_page_is_corrupted(true, page, space->flags);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/** Reads and verifies the next block of pages from the source
file. Positions the cursor after the last read non-corrupted page.
@@ -510,10 +505,6 @@ xb_fil_cur_close(
/*=============*/
xb_fil_cur_t *cursor) /*!< in/out: source file cursor */
{
- if (cursor->read_filter) {
- cursor->read_filter->deinit(&cursor->read_filter_ctxt);
- }
-
aligned_free(cursor->buf);
cursor->buf = NULL;
diff --git a/extra/mariabackup/fil_cur.h b/extra/mariabackup/fil_cur.h
index b7812f65..46c8cb03 100644
--- a/extra/mariabackup/fil_cur.h
+++ b/extra/mariabackup/fil_cur.h
@@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <my_dir.h>
#include "read_filt.h"
+#include "mtr0types.h"
#include "srv0start.h"
#include "srv0srv.h"
#include "xtrabackup.h"
diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc
index b925b415..2de57a14 100644
--- a/extra/mariabackup/innobackupex.cc
+++ b/extra/mariabackup/innobackupex.cc
@@ -78,10 +78,8 @@ my_bool opt_ibx_galera_info = FALSE;
my_bool opt_ibx_slave_info = FALSE;
my_bool opt_ibx_no_lock = FALSE;
my_bool opt_ibx_safe_slave_backup = FALSE;
-my_bool opt_ibx_rsync = FALSE;
my_bool opt_ibx_force_non_empty_dirs = FALSE;
my_bool opt_ibx_noversioncheck = FALSE;
-my_bool opt_ibx_no_backup_locks = FALSE;
my_bool opt_ibx_decompress = FALSE;
char *opt_ibx_incremental_history_name = NULL;
@@ -268,8 +266,10 @@ static struct my_option ibx_long_options[] =
(uchar *) &opt_ibx_incremental, (uchar *) &opt_ibx_incremental, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"no-lock", OPT_NO_LOCK, "Use this option to disable table lock "
- "with \"FLUSH TABLES WITH READ LOCK\". Use it only if ALL your "
+ {"no-lock", OPT_NO_LOCK, "This option should not be used as "
+ "mariadb-backup now is using BACKUP LOCKS, which minimizes the "
+ "lock time. ALTER TABLE can run in parallel with BACKUP LOCKS."
+ "Use the --no-lock option it only if ALL your "
"tables are InnoDB and you DO NOT CARE about the binary log "
"position of the backup. This option shouldn't be used if there "
"are any DDL statements being executed or if any updates are "
@@ -297,15 +297,6 @@ static struct my_option ibx_long_options[] =
(uchar *) &opt_ibx_safe_slave_backup,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"rsync", OPT_RSYNC, "Uses the rsync utility to optimize local file "
- "transfers. When this option is specified, innobackupex uses rsync "
- "to copy all non-InnoDB files instead of spawning a separate cp for "
- "each file, which can be much faster for servers with a large number "
- "of databases or tables. This option cannot be used together with "
- "--stream.",
- (uchar *) &opt_ibx_rsync, (uchar *) &opt_ibx_rsync,
- 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-
{"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS, "This "
"option, when specified, makes --copy-back or --move-back transfer "
"files to non-empty directories. Note that no existing files will be "
@@ -330,13 +321,9 @@ static struct my_option ibx_long_options[] =
(uchar *) &opt_ibx_noversioncheck,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"no-backup-locks", OPT_NO_BACKUP_LOCKS, "This option controls if "
- "backup locks should be used instead of FLUSH TABLES WITH READ LOCK "
- "on the backup stage. The option has no effect when backup locks are "
- "not supported by the server. This option is enabled by default, "
- "disable with --no-backup-locks.",
- (uchar *) &opt_ibx_no_backup_locks,
- (uchar *) &opt_ibx_no_backup_locks,
+ {"no-backup-locks", OPT_NO_BACKUP_LOCKS,
+ "Old disabled option which has no effect anymore.",
+ (uchar *) 0, (uchar*) 0,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"decompress", OPT_DECOMPRESS, "Decompresses all files with the .qp "
@@ -402,11 +389,10 @@ static struct my_option ibx_long_options[] =
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
- "This option specifies which types of queries are allowed to complete "
- "before innobackupex will issue the global lock. Default is all.",
- (uchar*) &opt_ibx_lock_wait_query_type,
- (uchar*) &opt_ibx_lock_wait_query_type, &query_type_typelib,
- GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0},
+ "Old disabled option which has no effect anymore (not needed "
+ "with BACKUP LOCKS)",
+ (uchar*) 0, (uchar*) 0, &query_type_typelib, GET_ENUM,
+ REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0},
{"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE,
"This option specifies which types of queries should be killed to "
@@ -447,32 +433,32 @@ static struct my_option ibx_long_options[] =
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT,
- "This option specifies the number of seconds innobackupex waits "
- "between starting FLUSH TABLES WITH READ LOCK and killing those "
- "queries that block it. Default is 0 seconds, which means "
- "innobackupex will not attempt to kill any queries.",
- (uchar*) &opt_ibx_kill_long_queries_timeout,
- (uchar*) &opt_ibx_kill_long_queries_timeout, 0, GET_UINT,
+ "Old disabled option which has no effect anymore (not needed "
+ "with BACKUP LOCKS)",
+ (uchar*) 0, (uchar*) 0, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
- "This option specifies time in seconds that innobackupex should wait "
- "for queries that would block FTWRL before running it. If there are "
- "still such queries when the timeout expires, innobackupex terminates "
- "with an error. Default is 0, in which case innobackupex does not "
- "wait for queries to complete and starts FTWRL immediately.",
- (uchar*) &opt_ibx_lock_wait_timeout,
- (uchar*) &opt_ibx_lock_wait_timeout, 0, GET_UINT,
+ "Alias for startup-wait-timeout",
+ (uchar*) &opt_ibx_lock_wait_timeout,
+ (uchar*) &opt_ibx_lock_wait_timeout, 0, GET_UINT,
+ REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"startup-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
+ "This option specifies time in seconds that mariadb-backup should wait for "
+ "BACKUP STAGE START to complete. BACKUP STAGE START has to wait until all "
+ "currently running queries using explicite LOCK TABLES has ended. "
+ "If there are still such queries when the timeout expires, mariadb-backup "
+ "terminates with an error. Default is 0, in which case mariadb-backup waits "
+ "indefinitely for BACKUP STAGE START to finish",
+ (uchar*) &opt_ibx_lock_wait_timeout,
+ (uchar*) &opt_ibx_lock_wait_timeout, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD,
- "This option specifies the query run time threshold which is used by "
- "innobackupex to detect long-running queries with a non-zero value "
- "of --ftwrl-wait-timeout. FTWRL is not started until such "
- "long-running queries exist. This option has no effect if "
- "--ftwrl-wait-timeout is 0. Default value is 60 seconds.",
- (uchar*) &opt_ibx_lock_wait_threshold,
- (uchar*) &opt_ibx_lock_wait_threshold, 0, GET_UINT,
+ "Old disabled option which has no effect anymore (not needed "
+ "with BACKUP LOCKS)",
+ (uchar*) 0, (uchar*) 0, 0, GET_UINT,
REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
{"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT,
@@ -864,10 +850,8 @@ ibx_init()
opt_slave_info = opt_ibx_slave_info;
opt_no_lock = opt_ibx_no_lock;
opt_safe_slave_backup = opt_ibx_safe_slave_backup;
- opt_rsync = opt_ibx_rsync;
opt_force_non_empty_dirs = opt_ibx_force_non_empty_dirs;
opt_noversioncheck = opt_ibx_noversioncheck;
- opt_no_backup_locks = opt_ibx_no_backup_locks;
opt_decompress = opt_ibx_decompress;
opt_incremental_history_name = opt_ibx_incremental_history_name;
diff --git a/extra/mariabackup/read_filt.cc b/extra/mariabackup/read_filt.cc
index 58920055..c7c0aa55 100644
--- a/extra/mariabackup/read_filt.cc
+++ b/extra/mariabackup/read_filt.cc
@@ -32,29 +32,13 @@ Perform read filter context initialization that is common to all read
filters. */
static
void
-common_init(
-/*========*/
+rf_pass_through_init(
xb_read_filt_ctxt_t* ctxt, /*!<in/out: read filter context */
const xb_fil_cur_t* cursor) /*!<in: file cursor */
{
ctxt->offset = 0;
ctxt->data_file_size = cursor->statinfo.st_size;
ctxt->buffer_capacity = cursor->buf_size;
- ctxt->page_size = cursor->page_size;
-}
-
-/****************************************************************//**
-Initialize the pass-through read filter. */
-static
-void
-rf_pass_through_init(
-/*=================*/
- xb_read_filt_ctxt_t* ctxt, /*!<in/out: read filter context */
- const xb_fil_cur_t* cursor, /*!<in: file cursor */
- ulint space_id __attribute__((unused)))
- /*!<in: space id we are reading */
-{
- common_init(ctxt, cursor);
}
/****************************************************************//**
@@ -65,143 +49,25 @@ rf_pass_through_get_next_batch(
/*===========================*/
xb_read_filt_ctxt_t* ctxt, /*!<in/out: read filter
context */
- ib_int64_t* read_batch_start, /*!<out: starting read
+ int64_t* read_batch_start, /*!<out: starting read
offset in bytes for the
next batch of pages */
- ib_int64_t* read_batch_len) /*!<out: length in
+ int64_t* read_batch_len) /*!<out: length in
bytes of the next batch
of pages */
{
*read_batch_start = ctxt->offset;
*read_batch_len = ctxt->data_file_size - ctxt->offset;
- if (*read_batch_len > (ib_int64_t)ctxt->buffer_capacity) {
- *read_batch_len = ctxt->buffer_capacity;
- }
-
- ctxt->offset += *read_batch_len;
-}
-
-/****************************************************************//**
-Deinitialize the pass-through read filter. */
-static
-void
-rf_pass_through_deinit(
-/*===================*/
- xb_read_filt_ctxt_t* ctxt __attribute__((unused)))
- /*!<in: read filter context */
-{
-}
-
-/****************************************************************//**
-Initialize the changed page bitmap-based read filter. Assumes that
-the bitmap is already set up in changed_page_bitmap. */
-static
-void
-rf_bitmap_init(
-/*===========*/
- xb_read_filt_ctxt_t* ctxt, /*!<in/out: read filter
- context */
- const xb_fil_cur_t* cursor, /*!<in: read cursor */
- ulint space_id) /*!<in: space id */
-{
- common_init(ctxt, cursor);
- ctxt->bitmap_range = xb_page_bitmap_range_init(changed_page_bitmap,
- space_id);
- ctxt->filter_batch_end = 0;
-}
-
-/****************************************************************//**
-Get the next batch of pages for the bitmap read filter. */
-static
-void
-rf_bitmap_get_next_batch(
-/*=====================*/
- xb_read_filt_ctxt_t* ctxt, /*!<in/out: read filter
- context */
- ib_int64_t* read_batch_start, /*!<out: starting read
- offset in bytes for the
- next batch of pages */
- ib_int64_t* read_batch_len) /*!<out: length in
- bytes of the next batch
- of pages */
-{
- ulint start_page_id;
- const ulint page_size = ctxt->page_size;
-
- start_page_id = (ulint)(ctxt->offset / page_size);
-
- xb_a (ctxt->offset % page_size == 0);
-
- if (start_page_id == ctxt->filter_batch_end) {
-
- /* Used up all the previous bitmap range, get some more */
- ulint next_page_id;
-
- /* Find the next changed page using the bitmap */
- next_page_id = xb_page_bitmap_range_get_next_bit
- (ctxt->bitmap_range, TRUE);
-
- if (next_page_id == ULINT_UNDEFINED) {
- *read_batch_len = 0;
- return;
- }
-
- ctxt->offset = next_page_id * page_size;
-
- /* Find the end of the current changed page block by searching
- for the next cleared bitmap bit */
- ctxt->filter_batch_end
- = xb_page_bitmap_range_get_next_bit(ctxt->bitmap_range,
- FALSE);
- xb_a(next_page_id < ctxt->filter_batch_end);
- }
-
- *read_batch_start = ctxt->offset;
- if (ctxt->filter_batch_end == ULINT_UNDEFINED) {
- /* No more cleared bits in the bitmap, need to copy all the
- remaining pages. */
- *read_batch_len = ctxt->data_file_size - ctxt->offset;
- } else {
- *read_batch_len = ctxt->filter_batch_end * page_size
- - ctxt->offset;
- }
-
- /* If the page block is larger than the buffer capacity, limit it to
- buffer capacity. The subsequent invocations will continue returning
- the current block in buffer-sized pieces until ctxt->filter_batch_end
- is reached, trigerring the next bitmap query. */
- if (*read_batch_len > (ib_int64_t)ctxt->buffer_capacity) {
+ if (*read_batch_len > (int64_t)ctxt->buffer_capacity) {
*read_batch_len = ctxt->buffer_capacity;
}
ctxt->offset += *read_batch_len;
- xb_a (ctxt->offset % page_size == 0);
- xb_a (*read_batch_start % page_size == 0);
- xb_a (*read_batch_len % page_size == 0);
-}
-
-/****************************************************************//**
-Deinitialize the changed page bitmap-based read filter. */
-static
-void
-rf_bitmap_deinit(
-/*=============*/
- xb_read_filt_ctxt_t* ctxt) /*!<in/out: read filter context */
-{
- xb_page_bitmap_range_deinit(ctxt->bitmap_range);
}
/* The pass-through read filter */
xb_read_filt_t rf_pass_through = {
&rf_pass_through_init,
&rf_pass_through_get_next_batch,
- &rf_pass_through_deinit
-};
-
-/* The changed page bitmap-based read filter */
-xb_read_filt_t rf_bitmap = {
- &rf_bitmap_init,
- &rf_bitmap_get_next_batch,
- &rf_bitmap_deinit
};
diff --git a/extra/mariabackup/read_filt.h b/extra/mariabackup/read_filt.h
index 51150705..caf8ac56 100644
--- a/extra/mariabackup/read_filt.h
+++ b/extra/mariabackup/read_filt.h
@@ -25,42 +25,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#ifndef XB_READ_FILT_H
#define XB_READ_FILT_H
-#include "changed_page_bitmap.h"
-
-typedef uint32_t space_id_t;
+#include <cstdint>
+#include <cstddef>
struct xb_fil_cur_t;
/* The read filter context */
struct xb_read_filt_ctxt_t {
- ib_int64_t offset; /*!< current file offset */
- ib_int64_t data_file_size; /*!< data file size */
+ int64_t offset; /*!< current file offset */
+ int64_t data_file_size; /*!< data file size */
size_t buffer_capacity;/*!< read buffer capacity */
- space_id_t space_id; /*!< space id */
- /* The following fields used only in bitmap filter */
- /* 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 */
- ulint page_size; /*!< page size */
- ulint filter_batch_end;/*!< the ending page id of the
- current changed page block in
- the bitmap */
- /** TODO: remove this default constructor */
- xb_read_filt_ctxt_t() : page_size(0) {}
};
/* The read filter */
struct xb_read_filt_t {
void (*init)(xb_read_filt_ctxt_t* ctxt,
- const xb_fil_cur_t* cursor,
- ulint space_id);
+ const xb_fil_cur_t* cursor);
void (*get_next_batch)(xb_read_filt_ctxt_t* ctxt,
- ib_int64_t* read_batch_start,
- ib_int64_t* read_batch_len);
- void (*deinit)(xb_read_filt_ctxt_t* ctxt);
+ int64_t* read_batch_start,
+ int64_t* read_batch_len);
};
extern xb_read_filt_t rf_pass_through;
-extern xb_read_filt_t rf_bitmap;
#endif
diff --git a/extra/mariabackup/thread_pool.cc b/extra/mariabackup/thread_pool.cc
new file mode 100644
index 00000000..e18581f4
--- /dev/null
+++ b/extra/mariabackup/thread_pool.cc
@@ -0,0 +1,50 @@
+#include "thread_pool.h"
+#include "common.h"
+
+bool ThreadPool::start(size_t threads_count) {
+ if (!m_stopped)
+ return false;
+ m_stopped = false;
+ for (unsigned i = 0; i < threads_count; ++i)
+ m_threads.emplace_back(&ThreadPool::thread_func, this, i);
+ return true;
+}
+
+void ThreadPool::stop() {
+ if (m_stopped)
+ return;
+ m_stop = true;
+ m_cv.notify_all();
+ for (auto &t : m_threads)
+ t.join();
+ m_stopped = true;
+};
+
+void ThreadPool::push(ThreadPool::job_t &&j) {
+ std::unique_lock<std::mutex> lock(m_mutex);
+ m_jobs.push(j);
+ lock.unlock();
+ m_cv.notify_one();
+}
+
+void ThreadPool::thread_func(unsigned thread_num) {
+ if (my_thread_init())
+ die("Can't init mysql thread");
+ std::unique_lock<std::mutex> lock(m_mutex);
+ while(true) {
+ if (m_stop)
+ goto exit;
+ while (!m_jobs.empty()) {
+ if (m_stop)
+ goto exit;
+ job_t j = std::move(m_jobs.front());
+ m_jobs.pop();
+ lock.unlock();
+ j(thread_num);
+ lock.lock();
+ }
+ m_cv.wait(lock, [&] { return m_stop || !m_jobs.empty(); });
+ }
+exit:
+ my_thread_end();
+}
diff --git a/extra/mariabackup/thread_pool.h b/extra/mariabackup/thread_pool.h
new file mode 100644
index 00000000..10ad74c6
--- /dev/null
+++ b/extra/mariabackup/thread_pool.h
@@ -0,0 +1,62 @@
+#pragma once
+#include <queue>
+#include <vector>
+#include <functional>
+#include <thread>
+#include <mutex>
+#include <condition_variable>
+#include <atomic>
+#include "trx0sys.h"
+
+class ThreadPool {
+public:
+ typedef std::function<void(unsigned)> job_t;
+
+ ThreadPool() { m_stop = false; m_stopped = true; }
+ ThreadPool (ThreadPool &&other) = delete;
+ ThreadPool & operator= (ThreadPool &&other) = delete;
+ ThreadPool(const ThreadPool &) = delete;
+ ThreadPool & operator= (const ThreadPool &) = delete;
+
+ bool start(size_t threads_count);
+ void stop();
+ void push(job_t &&j);
+ size_t threads_count() const { return m_threads.size(); }
+private:
+ void thread_func(unsigned thread_num);
+ std::mutex m_mutex;
+ std::condition_variable m_cv;
+ std::queue<job_t> m_jobs;
+ std::atomic<bool> m_stop;
+ std::atomic<bool> m_stopped;
+ std::vector<std::thread> m_threads;
+};
+
+class TasksGroup {
+public:
+ TasksGroup(ThreadPool &thread_pool) : m_thread_pool(thread_pool) {
+ m_tasks_count = 0;
+ m_tasks_result = 1;
+ }
+ void push_task(ThreadPool::job_t &&j) {
+ ++m_tasks_count;
+ m_thread_pool.push(std::forward<ThreadPool::job_t>(j));
+ }
+ void finish_task(int res) {
+ --m_tasks_count;
+ m_tasks_result.fetch_and(res);
+ }
+ int get_result() const { return m_tasks_result; }
+ bool is_finished() const {
+ return !m_tasks_count;
+ }
+ bool wait_for_finish() {
+ while (!is_finished())
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
+ return get_result();
+ }
+private:
+ ThreadPool &m_thread_pool;
+ std::atomic<size_t> m_tasks_count;
+ std::atomic<int> m_tasks_result;
+};
diff --git a/extra/mariabackup/write_filt.cc b/extra/mariabackup/write_filt.cc
index 052cea26..13f19ca6 100644
--- a/extra/mariabackup/write_filt.cc
+++ b/extra/mariabackup/write_filt.cc
@@ -144,6 +144,18 @@ wf_incremental_process(xb_write_filt_ctxt_t *ctxt, ds_file_t *dstfile)
return false;
}
+ /* Check whether TRX_SYS page has been changed */
+ if (mach_read_from_4(page + FIL_PAGE_SPACE_ID)
+ == TRX_SYS_SPACE
+ && mach_read_from_4(page + FIL_PAGE_OFFSET)
+ == TRX_SYS_PAGE_NO) {
+ msg(cursor->thread_n,
+ "--incremental backup is impossible if "
+ "the server had been restarted with "
+ "different innodb_undo_tablespaces.");
+ return false;
+ }
+
/* updated page */
if (cp->npages == page_size / 4) {
/* flush buffer */
diff --git a/extra/mariabackup/wsrep.cc b/extra/mariabackup/wsrep.cc
index acaf5c50..15463a85 100644
--- a/extra/mariabackup/wsrep.cc
+++ b/extra/mariabackup/wsrep.cc
@@ -55,6 +55,9 @@ permission notice:
#define XB_GALERA_INFO_FILENAME "xtrabackup_galera_info"
#define XB_GALERA_DONOR_INFO_FILENAME "donor_galera_info"
+/* backup copy of galera info file as sent by donor */
+#define XB_GALERA_INFO_FILENAME_SST "xtrabackup_galera_info_SST"
+
/***********************************************************************
Store Galera checkpoint info in the 'xtrabackup_galera_info' file, if that
information is present in the trx system header. Otherwise, do nothing. */
@@ -68,21 +71,47 @@ xb_write_galera_info(bool incremental_prepare)
long long seqno;
MY_STAT statinfo;
- /* Do not overwrite an existing file to be compatible with
- servers with older server versions */
- if (!incremental_prepare &&
- my_stat(XB_GALERA_INFO_FILENAME, &statinfo, MYF(0)) != NULL) {
-
- return;
- }
-
xid.null();
+ /* try to read last wsrep XID from innodb rsegs, we will use it
+ instead of galera info file received from donor
+ */
if (!trx_rseg_read_wsrep_checkpoint(xid)) {
-
+ /* no worries yet, SST may have brought in galera info file
+ from some old MariaDB version, which does not support
+ wsrep XID storing in innodb rsegs
+ */
return;
}
+ /* if SST brought in galera info file, copy it as *_SST file
+ this will not be used, saved just for future reference
+ */
+ if (my_stat(XB_GALERA_INFO_FILENAME, &statinfo, MYF(0)) != NULL) {
+ FILE* fp_in = fopen(XB_GALERA_INFO_FILENAME, "r");
+ FILE* fp_out = fopen(XB_GALERA_INFO_FILENAME_SST, "w");
+
+ char buf[BUFSIZ] = {'\0'};
+ size_t size;
+ while ((size = fread(buf, 1, BUFSIZ, fp_in))) {
+ if (fwrite(buf, 1, size, fp_out) != strlen(buf)) {
+ die(
+ "could not write to "
+ XB_GALERA_INFO_FILENAME_SST
+ ", errno = %d\n",
+ errno);
+ }
+ }
+ if (!feof(fp_in)) {
+ die(
+ XB_GALERA_INFO_FILENAME_SST
+ " not fully copied\n"
+ );
+ }
+ fclose(fp_out);
+ fclose(fp_in);
+ }
+
wsrep_uuid_t uuid;
memcpy(uuid.data, wsrep_xid_uuid(&xid), sizeof(uuid.data));
if (wsrep_uuid_print(&uuid, uuid_str,
@@ -97,7 +126,6 @@ xb_write_galera_info(bool incremental_prepare)
"could not create " XB_GALERA_INFO_FILENAME
", errno = %d\n",
errno);
- exit(EXIT_FAILURE);
}
seqno = wsrep_xid_seqno(&xid);
diff --git a/extra/mariabackup/xb_plugin.h b/extra/mariabackup/xb_plugin.h
deleted file mode 100644
index fea24b6b..00000000
--- a/extra/mariabackup/xb_plugin.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <mysql.h>
-#include <string>
-extern void xb_plugin_backup_init(MYSQL *mysql);
-extern const char* xb_plugin_get_config();
-extern void xb_plugin_prepare_init(int argc, char **argv, const char *dir);
diff --git a/extra/mariabackup/xbstream.cc b/extra/mariabackup/xbstream.cc
index 6306806b..d69a0029 100644
--- a/extra/mariabackup/xbstream.cc
+++ b/extra/mariabackup/xbstream.cc
@@ -262,7 +262,7 @@ mode_create(int argc, char **argv)
return 1;
}
- stream = xb_stream_write_new();
+ stream = xb_stream_write_new(nullptr, nullptr);
if (stream == NULL) {
msg("%s: xb_stream_write_new() failed.", my_progname);
return 1;
@@ -287,7 +287,7 @@ mode_create(int argc, char **argv)
goto err;
}
- file = xb_stream_write_open(stream, filepath, &mystat, NULL, NULL);
+ file = xb_stream_write_open(stream, filepath, &mystat, false);
if (file == NULL) {
goto err;
}
@@ -314,7 +314,8 @@ err:
static
file_entry_t *
-file_entry_new(extract_ctxt_t *ctxt, const char *path, uint pathlen)
+file_entry_new(extract_ctxt_t *ctxt, const char *path, uint pathlen,
+ uchar chunk_flags)
{
file_entry_t *entry;
ds_file_t *file;
@@ -331,7 +332,8 @@ file_entry_new(extract_ctxt_t *ctxt, const char *path, uint pathlen)
}
entry->pathlen = pathlen;
- file = ds_open(ctxt->ds_ctxt, path, NULL);
+ file = ds_open(ctxt->ds_ctxt, path, NULL,
+ chunk_flags == XB_STREAM_FLAG_REWRITE);
if (file == NULL) {
msg("%s: failed to create file.", my_progname);
@@ -412,10 +414,50 @@ extract_worker_thread_func(void *arg)
(uchar *) chunk.path,
chunk.pathlen);
+ if (entry && (chunk.type == XB_CHUNK_TYPE_REMOVE ||
+ chunk.type == XB_CHUNK_TYPE_RENAME)) {
+ msg("%s: rename and remove chunks can not be applied to opened file: %s",
+ my_progname, chunk.path);
+ pthread_mutex_unlock(ctxt->mutex);
+ break;
+ }
+
+ if (chunk.type == XB_CHUNK_TYPE_REMOVE) {
+ if (ds_remove(ctxt->ds_ctxt, chunk.path)) {
+ msg("%s: error on file removing: %s", my_progname, chunk.path);
+ pthread_mutex_unlock(ctxt->mutex);
+ res = XB_STREAM_READ_ERROR;
+ break;
+ }
+ pthread_mutex_unlock(ctxt->mutex);
+ continue;
+ }
+
+ if (chunk.type == XB_CHUNK_TYPE_RENAME) {
+ if (my_hash_search(ctxt->filehash,
+ reinterpret_cast<const uchar *>(chunk.data), chunk.length)) {
+ msg("%s: rename chunks can not be applied to opened file: %s",
+ my_progname, reinterpret_cast<const uchar *>(chunk.data));
+ pthread_mutex_unlock(ctxt->mutex);
+ break;
+ }
+ if (ds_rename(ctxt->ds_ctxt, chunk.path,
+ reinterpret_cast<const char *>(chunk.data))) {
+ msg("%s: error on file renaming: %s to %s", my_progname,
+ reinterpret_cast<const char *>(chunk.data), chunk.path);
+ pthread_mutex_unlock(ctxt->mutex);
+ res = XB_STREAM_READ_ERROR;
+ break;
+ }
+ pthread_mutex_unlock(ctxt->mutex);
+ continue;
+ }
+
if (entry == NULL) {
entry = file_entry_new(ctxt,
chunk.path,
- chunk.pathlen);
+ chunk.pathlen,
+ chunk.flags);
if (entry == NULL) {
pthread_mutex_unlock(ctxt->mutex);
break;
@@ -432,6 +474,18 @@ extract_worker_thread_func(void *arg)
pthread_mutex_unlock(ctxt->mutex);
+ if (chunk.type == XB_CHUNK_TYPE_SEEK) {
+ if (ds_seek_set(entry->file, chunk.offset)) {
+ msg("%s: my_seek() failed.", my_progname);
+ pthread_mutex_unlock(&entry->mutex);
+ res = XB_STREAM_READ_ERROR;
+ break;
+ }
+ entry->offset = chunk.offset;
+ pthread_mutex_unlock(&entry->mutex);
+ continue;
+ }
+
res = xb_stream_validate_checksum(&chunk);
if (res != XB_STREAM_READ_CHUNK) {
diff --git a/extra/mariabackup/xbstream.h b/extra/mariabackup/xbstream.h
index 1b36ec24..c8b2997d 100644
--- a/extra/mariabackup/xbstream.h
+++ b/extra/mariabackup/xbstream.h
@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
/* Chunk flags */
/* Chunk can be ignored if unknown version/format */
#define XB_STREAM_FLAG_IGNORABLE 0x01
+#define XB_STREAM_FLAG_REWRITE 0x02
/* Magic + flags + type + path len */
#define CHUNK_HEADER_CONSTANT_LEN ((sizeof(XB_STREAM_CHUNK_MAGIC) - 1) + \
@@ -48,18 +49,21 @@ typedef enum {
/************************************************************************
Write interface. */
-typedef ssize_t xb_stream_write_callback(xb_wstream_file_t *file,
+typedef ssize_t xb_stream_write_callback(
void *userdata,
const void *buf, size_t len);
-xb_wstream_t *xb_stream_write_new(void);
-
+xb_wstream_t *xb_stream_write_new(
+ xb_stream_write_callback *write_callback, void *user_data);
xb_wstream_file_t *xb_stream_write_open(xb_wstream_t *stream, const char *path,
- MY_STAT *mystat, void *userdata,
- xb_stream_write_callback *onwrite);
+ const MY_STAT *mystat, bool rewrite);
int xb_stream_write_data(xb_wstream_file_t *file, const void *buf, size_t len);
-
+int xb_stream_write_seek_set(xb_wstream_file_t *file, my_off_t offset);
+int xb_stream_write_remove(xb_wstream_t *stream, const char *path);
+int
+xb_stream_write_rename(
+ xb_wstream_t *stream, const char *old_path, const char *new_path);
int xb_stream_write_close(xb_wstream_file_t *file);
int xb_stream_write_done(xb_wstream_t *stream);
@@ -76,6 +80,9 @@ typedef enum {
typedef enum {
XB_CHUNK_TYPE_UNKNOWN = '\0',
XB_CHUNK_TYPE_PAYLOAD = 'P',
+ XB_CHUNK_TYPE_RENAME = 'R',
+ XB_CHUNK_TYPE_REMOVE = 'D',
+ XB_CHUNK_TYPE_SEEK = 'S',
XB_CHUNK_TYPE_EOF = 'E'
} xb_chunk_type_t;
diff --git a/extra/mariabackup/xbstream_read.cc b/extra/mariabackup/xbstream_read.cc
index b54a9815..d82176ad 100644
--- a/extra/mariabackup/xbstream_read.cc
+++ b/extra/mariabackup/xbstream_read.cc
@@ -59,6 +59,9 @@ validate_chunk_type(uchar code)
{
switch ((xb_chunk_type_t) code) {
case XB_CHUNK_TYPE_PAYLOAD:
+ case XB_CHUNK_TYPE_RENAME:
+ case XB_CHUNK_TYPE_REMOVE:
+ case XB_CHUNK_TYPE_SEEK:
case XB_CHUNK_TYPE_EOF:
return (xb_chunk_type_t) code;
default:
@@ -159,57 +162,91 @@ xb_stream_read_chunk(xb_rstream_t *stream, xb_rstream_chunk_t *chunk)
}
chunk->path[pathlen] = '\0';
- if (chunk->type == XB_CHUNK_TYPE_EOF) {
+ if (chunk->type == XB_CHUNK_TYPE_EOF ||
+ chunk->type == XB_CHUNK_TYPE_REMOVE) {
return XB_STREAM_READ_CHUNK;
}
- /* Payload length */
- F_READ(tmpbuf, 16);
- ullval = uint8korr(tmpbuf);
- if (ullval > (ulonglong) SIZE_T_MAX) {
- msg("xb_stream_read_chunk(): chunk length is too large at "
- "offset 0x%llx: 0x%llx.", (ulonglong) stream->offset,
- ullval);
- goto err;
+ if (chunk->type == XB_CHUNK_TYPE_RENAME) {
+ F_READ(tmpbuf, 4);
+ size_t new_pathlen = uint4korr(tmpbuf);
+ if (new_pathlen >= FN_REFLEN) {
+ msg("xb_stream_read_chunk(): path length (%lu) for new name of 'rename'"
+ " chunk is too large", (ulong) new_pathlen);
+ goto err;
+ }
+ chunk->length = new_pathlen;
+ stream->offset +=4;
}
- chunk->length = (size_t) ullval;
- stream->offset += 8;
-
- /* Payload offset */
- ullval = uint8korr(tmpbuf + 8);
- if (ullval > (ulonglong) MY_OFF_T_MAX) {
- msg("xb_stream_read_chunk(): chunk offset is too large at "
- "offset 0x%llx: 0x%llx.", (ulonglong) stream->offset,
- ullval);
- goto err;
+ else if (chunk->type == XB_CHUNK_TYPE_SEEK) {
+ F_READ(tmpbuf, 8);
+ chunk->offset = uint8korr(tmpbuf);
+ stream->offset += 8;
+ return XB_STREAM_READ_CHUNK;
+ }
+ else {
+ /* Payload length */
+ F_READ(tmpbuf, 16);
+ ullval = uint8korr(tmpbuf);
+ if (ullval > (ulonglong) SIZE_T_MAX) {
+ msg("xb_stream_read_chunk(): chunk length is too large at "
+ "offset 0x%llx: 0x%llx.", (ulonglong) stream->offset,
+ ullval);
+ goto err;
+ }
+ chunk->length = (size_t) ullval;
+ stream->offset += 8;
+
+ /* Payload offset */
+ ullval = uint8korr(tmpbuf + 8);
+ if (ullval > (ulonglong) MY_OFF_T_MAX) {
+ msg("xb_stream_read_chunk(): chunk offset is too large at "
+ "offset 0x%llx: 0x%llx.", (ulonglong) stream->offset,
+ ullval);
+ goto err;
+ }
+ chunk->offset = (my_off_t) ullval;
+ stream->offset += 8;
}
- chunk->offset = (my_off_t) ullval;
- stream->offset += 8;
- /* Reallocate the buffer if needed */
- if (chunk->length > chunk->buflen) {
- chunk->data = my_realloc(PSI_NOT_INSTRUMENTED, chunk->data, chunk->length,
- MYF(MY_WME | MY_ALLOW_ZERO_PTR));
+ /* Reallocate the buffer if needed, take into account trailing '\0' for
+ new file name in the case of XB_CHUNK_TYPE_RENAME */
+ if (chunk->length + 1 > chunk->buflen) {
+ chunk->data = my_realloc(PSI_NOT_INSTRUMENTED, chunk->data,
+ chunk->length + 1, MYF(MY_WME | MY_ALLOW_ZERO_PTR));
if (chunk->data == NULL) {
msg("xb_stream_read_chunk(): failed to increase buffer "
- "to %lu bytes.", (ulong) chunk->length);
+ "to %lu bytes.", (ulong) chunk->length + 1);
goto err;
}
- chunk->buflen = chunk->length;
+ chunk->buflen = chunk->length + 1;
}
- /* Checksum */
- F_READ(tmpbuf, 4);
- chunk->checksum = uint4korr(tmpbuf);
- chunk->checksum_offset = stream->offset;
-
- /* Payload */
- if (chunk->length > 0) {
+ if (chunk->type == XB_CHUNK_TYPE_RENAME) {
+ if (chunk->length == 0) {
+ msg("xb_stream_read_chunk(): failed to read new name for file to rename "
+ ": %s", chunk->path);
+ goto err;
+ }
F_READ(chunk->data, chunk->length);
stream->offset += chunk->length;
+ reinterpret_cast<char *>(chunk->data)[chunk->length] = '\0';
+ ++chunk->length;
}
+ else {
+ /* Checksum */
+ F_READ(tmpbuf, 4);
+ chunk->checksum = uint4korr(tmpbuf);
+ chunk->checksum_offset = stream->offset;
+
+ /* Payload */
+ if (chunk->length > 0) {
+ F_READ(chunk->data, chunk->length);
+ stream->offset += chunk->length;
+ }
- stream->offset += 4;
+ stream->offset += 4;
+ }
return XB_STREAM_READ_CHUNK;
diff --git a/extra/mariabackup/xbstream_write.cc b/extra/mariabackup/xbstream_write.cc
index 5801e867..926e091b 100644
--- a/extra/mariabackup/xbstream_write.cc
+++ b/extra/mariabackup/xbstream_write.cc
@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <my_global.h>
#include <my_base.h>
#include <zlib.h>
+#include <stdint.h>
#include "common.h"
#include "xbstream.h"
@@ -29,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
struct xb_wstream_struct {
pthread_mutex_t mutex;
+ xb_stream_write_callback *write;
+ void *user_data;
};
struct xb_wstream_file_struct {
@@ -39,8 +42,7 @@ struct xb_wstream_file_struct {
char *chunk_ptr;
size_t chunk_free;
my_off_t offset;
- void *userdata;
- xb_stream_write_callback *write;
+ bool rewrite;
};
static int xb_stream_flush(xb_wstream_file_t *file);
@@ -50,7 +52,7 @@ static int xb_stream_write_eof(xb_wstream_file_t *file);
static
ssize_t
-xb_stream_default_write_callback(xb_wstream_file_t *file __attribute__((unused)),
+xb_stream_default_write_callback(
void *userdata __attribute__((unused)),
const void *buf, size_t len)
{
@@ -60,21 +62,31 @@ xb_stream_default_write_callback(xb_wstream_file_t *file __attribute__((unused))
}
xb_wstream_t *
-xb_stream_write_new(void)
+xb_stream_write_new(
+ xb_stream_write_callback *write_callback, void *user_data)
{
xb_wstream_t *stream;
stream = (xb_wstream_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(xb_wstream_t), MYF(MY_FAE));
pthread_mutex_init(&stream->mutex, NULL);
+ if (write_callback) {
+#ifdef _WIN32
+ setmode(fileno(stdout), _O_BINARY);
+#endif
+ stream->write = write_callback;
+ stream->user_data = user_data;
+ }
+ else {
+ stream->write = xb_stream_default_write_callback;
+ stream->user_data = user_data;
+ }
return stream;;
}
xb_wstream_file_t *
xb_stream_write_open(xb_wstream_t *stream, const char *path,
- MY_STAT *mystat __attribute__((unused)),
- void *userdata,
- xb_stream_write_callback *onwrite)
+ const MY_STAT *mystat __attribute__((unused)), bool rewrite)
{
xb_wstream_file_t *file;
size_t path_len;
@@ -109,16 +121,7 @@ xb_stream_write_open(xb_wstream_t *stream, const char *path,
file->offset = 0;
file->chunk_ptr = file->chunk;
file->chunk_free = XB_STREAM_MIN_CHUNK_SIZE;
- if (onwrite) {
-#ifdef _WIN32
- setmode(fileno(stdout), _O_BINARY);
-#endif
- file->userdata = userdata;
- file->write = onwrite;
- } else {
- file->userdata = NULL;
- file->write = xb_stream_default_write_callback;
- }
+ file->rewrite = rewrite;
return file;
}
@@ -202,7 +205,8 @@ xb_stream_write_chunk(xb_wstream_file_t *file, const void *buf, size_t len)
memcpy(ptr, XB_STREAM_CHUNK_MAGIC, sizeof(XB_STREAM_CHUNK_MAGIC) - 1);
ptr += sizeof(XB_STREAM_CHUNK_MAGIC) - 1;
- *ptr++ = 0; /* Chunk flags */
+ *ptr++ =
+ file->rewrite ? XB_STREAM_FLAG_REWRITE : 0; /* Chunk flags */
*ptr++ = (uchar) XB_CHUNK_TYPE_PAYLOAD; /* Chunk type */
@@ -227,11 +231,11 @@ xb_stream_write_chunk(xb_wstream_file_t *file, const void *buf, size_t len)
xb_ad(ptr <= tmpbuf + sizeof(tmpbuf));
- if (file->write(file, file->userdata, tmpbuf, ptr-tmpbuf) == -1)
+ if (stream->write(stream->user_data, tmpbuf, ptr-tmpbuf) == -1)
goto err;
- if (file->write(file, file->userdata, buf, len) == -1) /* Payload */
+ if (stream->write(stream->user_data, buf, len) == -1) /* Payload */
goto err;
file->offset+= len;
@@ -247,6 +251,38 @@ err:
return 1;
}
+int xb_stream_write_seek_set(xb_wstream_file_t *file, my_off_t offset)
+{
+ /* Chunk magic + flags + chunk type + path_len + path + offset */
+ uchar tmpbuf[sizeof(XB_STREAM_CHUNK_MAGIC) - 1 + 1 + 1 + 4 +
+ FN_REFLEN + 8];
+ int error = 0;
+ xb_wstream_t *stream = file->stream;
+ uchar *ptr = tmpbuf;
+ /* Chunk magic */
+ memcpy(ptr, XB_STREAM_CHUNK_MAGIC, sizeof(XB_STREAM_CHUNK_MAGIC) - 1);
+ ptr += sizeof(XB_STREAM_CHUNK_MAGIC) - 1;
+ *ptr++ = 0; /* Chunk flags */
+ *ptr++ = (uchar) XB_CHUNK_TYPE_SEEK; /* Chunk type */
+ int4store(ptr, file->path_len); /* Path length */
+ ptr += 4;
+ memcpy(ptr, file->path, file->path_len); /* Path */
+ ptr += file->path_len;
+ int8store(ptr, static_cast<int64_t>(offset)); /* Offset */
+ ptr += 8;
+ if (xb_stream_flush(file))
+ return 1;
+ pthread_mutex_lock(&stream->mutex);
+ if (stream->write(stream->user_data, tmpbuf, ptr-tmpbuf) == -1)
+ error = 1;
+ if (!error)
+ file->offset = offset;
+ pthread_mutex_unlock(&stream->mutex);
+ if (xb_stream_flush(file))
+ return 1;
+ return error;
+}
+
static
int
xb_stream_write_eof(xb_wstream_file_t *file)
@@ -278,7 +314,7 @@ xb_stream_write_eof(xb_wstream_file_t *file)
xb_ad(ptr <= tmpbuf + sizeof(tmpbuf));
- if (file->write(file, file->userdata, tmpbuf,
+ if (stream->write(stream->user_data, tmpbuf,
(ulonglong) (ptr - tmpbuf)) == -1)
goto err;
@@ -291,3 +327,77 @@ err:
return 1;
}
+
+
+int
+xb_stream_write_remove(xb_wstream_t *stream, const char *path) {
+ /* Chunk magic + flags + chunk type + path_len + path */
+ uchar tmpbuf[sizeof(XB_STREAM_CHUNK_MAGIC) - 1 + 1 + 1 + 4 + FN_REFLEN];
+ uchar *ptr = tmpbuf;
+ /* Chunk magic */
+ memcpy(ptr, XB_STREAM_CHUNK_MAGIC, sizeof(XB_STREAM_CHUNK_MAGIC) - 1);
+ ptr += sizeof(XB_STREAM_CHUNK_MAGIC) - 1;
+
+ *ptr++ = 0; /* Chunk flags */
+
+ *ptr++ = (uchar) XB_CHUNK_TYPE_REMOVE; /* Chunk type */
+ size_t path_len = strlen(path);
+ int4store(ptr, path_len); /* Path length */
+ ptr += 4;
+
+ memcpy(ptr, path, path_len); /* Path */
+ ptr += path_len;
+
+ xb_ad(ptr <= tmpbuf + sizeof(tmpbuf));
+
+ pthread_mutex_lock(&stream->mutex);
+
+ ssize_t result = stream->write(stream->user_data, tmpbuf,
+ (ulonglong) (ptr - tmpbuf));
+
+ pthread_mutex_unlock(&stream->mutex);
+
+ return result < 0;
+
+}
+
+int
+xb_stream_write_rename(
+ xb_wstream_t *stream, const char *old_path, const char *new_path) {
+ /* Chunk magic + flags + chunk type + path_len + path + path_len + path*/
+ uchar tmpbuf[sizeof(XB_STREAM_CHUNK_MAGIC) - 1 + 1 + 1 +
+ 4 + FN_REFLEN + 4 + FN_REFLEN];
+ uchar *ptr = tmpbuf;
+ /* Chunk magic */
+ memcpy(ptr, XB_STREAM_CHUNK_MAGIC, sizeof(XB_STREAM_CHUNK_MAGIC) - 1);
+ ptr += sizeof(XB_STREAM_CHUNK_MAGIC) - 1;
+
+ *ptr++ = 0; /* Chunk flags */
+
+ *ptr++ = (uchar) XB_CHUNK_TYPE_RENAME; /* Chunk type */
+ size_t path_len = strlen(old_path);
+ int4store(ptr, path_len); /* Path length */
+ ptr += 4;
+
+ memcpy(ptr, old_path, path_len); /* Path */
+ ptr += path_len;
+
+ path_len = strlen(new_path);
+ int4store(ptr, path_len); /* Path length */
+ ptr += 4;
+
+ memcpy(ptr, new_path, path_len); /* Path */
+ ptr += path_len;
+
+ xb_ad(ptr <= tmpbuf + sizeof(tmpbuf));
+
+ pthread_mutex_lock(&stream->mutex);
+
+ ssize_t result = stream->write(stream->user_data, tmpbuf,
+ (ulonglong) (ptr - tmpbuf));
+
+ pthread_mutex_unlock(&stream->mutex);
+
+ return result < 0;
+}
+
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 485cb143..5979bbd3 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, 2022, MariaDB Corporation.
+(c) 2017, 2024, MariaDB Corporation.
Portions written by Marko Mäkelä.
This program is free software; you can redistribute it and/or modify
@@ -54,7 +54,6 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <scope.h>
#include <sql_class.h>
-#include <fcntl.h>
#include <string.h>
#ifdef __linux__
@@ -70,6 +69,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
# include <sys/sysctl.h>
#endif
+#include "aria_backup_client.h"
#include <btr0sea.h>
#include <lock0lock.h>
@@ -82,6 +82,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <buf0dblwr.h>
#include <buf0flu.h>
#include "ha_innodb.h"
+#include "fts0types.h"
#include <list>
#include <sstream>
@@ -97,23 +98,26 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include "xb_regex.h"
#include "fil_cur.h"
#include "write_filt.h"
-#include "xtrabackup.h"
#include "ds_buffer.h"
#include "ds_tmpfile.h"
#include "xbstream.h"
-#include "changed_page_bitmap.h"
#include "read_filt.h"
#include "backup_wsrep.h"
#include "innobackupex.h"
#include "backup_mysql.h"
#include "backup_copy.h"
#include "backup_mysql.h"
-#include "xb_plugin.h"
+#include "encryption_plugin.h"
#include <sql_plugin.h>
#include <srv0srv.h>
#include <log.h>
#include <derror.h>
#include <thr_timer.h>
+#include <tuple>
+#include "ddl_log.h"
+#include "common_engine.h"
+#include "lex_string.h"
+#include "sql_table.h"
#include "backup_debug.h"
#define MB_CORRUPTED_PAGES_FILE "innodb_corrupted_pages"
@@ -126,6 +130,9 @@ int sd_notifyf() { return 0; }
int sys_var_init();
+extern const char* fts_common_tables[];
+extern const fts_index_selector_t fts_index_selector[];
+
/* === xtrabackup specific options === */
#define DEFAULT_TARGET_DIR "./xtrabackup_backupfiles/"
char xtrabackup_real_target_dir[FN_REFLEN] = DEFAULT_TARGET_DIR;
@@ -140,8 +147,8 @@ my_bool xtrabackup_decrypt_decompress;
my_bool xtrabackup_print_param;
my_bool xtrabackup_mysqld_args;
my_bool xtrabackup_help;
-
my_bool xtrabackup_export;
+my_bool ignored_option;
longlong xtrabackup_use_memory;
@@ -155,7 +162,6 @@ char *xtrabackup_incremental;
lsn_t incremental_lsn;
lsn_t incremental_to_lsn;
lsn_t incremental_last_lsn;
-xb_page_bitmap *changed_page_bitmap;
char *xtrabackup_incremental_basedir; /* for --backup */
char *xtrabackup_extra_lsndir; /* for --backup with --extra-lsndir */
@@ -195,10 +201,12 @@ struct xb_filter_entry_t{
xb_filter_entry_t *name_hash;
};
+lsn_t checkpoint_lsn_start;
+lsn_t checkpoint_no_start;
/** whether log_copying_thread() is active; protected by recv_sys.mutex */
static bool log_copying_running;
-int xtrabackup_parallel;
+uint xtrabackup_parallel;
char *xtrabackup_stream_str = NULL;
xb_stream_fmt_t xtrabackup_stream_fmt = XB_STREAM_FMT_NONE;
@@ -255,7 +263,7 @@ recv_sys.mutex. */
static std::set<uint32_t> fail_undo_ids;
longlong innobase_page_size = (1LL << 14); /* 16KB */
-char* innobase_buffer_pool_filename = NULL;
+char *innobase_buffer_pool_filename = NULL;
/* The default values for the following char* start-up parameters
are determined in innobase_init below: */
@@ -361,10 +369,8 @@ my_bool opt_galera_info = FALSE;
my_bool opt_slave_info = FALSE;
my_bool opt_no_lock = FALSE;
my_bool opt_safe_slave_backup = FALSE;
-my_bool opt_rsync = FALSE;
my_bool opt_force_non_empty_dirs = FALSE;
my_bool opt_noversioncheck = FALSE;
-my_bool opt_no_backup_locks = FALSE;
my_bool opt_decompress = FALSE;
my_bool opt_remove_original;
my_bool opt_log_innodb_page_corruption;
@@ -422,6 +428,8 @@ pthread_cond_t scanned_lsn_cond;
/** Store the deferred tablespace name during --backup */
static std::set<std::string> defer_space_names;
+typedef decltype(fil_space_t::id) space_id_t;
+
typedef std::map<space_id_t,std::string> space_id_to_name_t;
struct ddl_tracker_t {
@@ -696,8 +704,190 @@ typedef void (*process_single_tablespace_func_t)(const char *dirname,
uint32_t defer_space_id);
static dberr_t enumerate_ibd_files(process_single_tablespace_func_t callback);
+const char *convert_dst(const char *dst) {
+ return
+ (xtrabackup_copy_back || xtrabackup_move_back) ?
+ dst : trim_dotslash(dst);
+}
+
+std::string convert_tablename_to_filepath(
+ const char *data_dir_path, const std::string &db, const std::string &table) {
+ char dbbuff[FN_REFLEN];
+ char tbbuff[FN_REFLEN];
+ (void)tablename_to_filename(db.c_str(), dbbuff, sizeof(dbbuff));
+ (void)tablename_to_filename(table.c_str(), tbbuff, sizeof(tbbuff));
+ std::string result(data_dir_path);
+ result.append(1, FN_LIBCHAR).append(dbbuff).
+ append(1, FN_LIBCHAR).append(tbbuff);
+ return result;
+}
+
+std::tuple<std::string, std::string, std::string>
+convert_filepath_to_tablename(const char *filepath) {
+ char db_name_orig[FN_REFLEN];
+ char table_name_orig[FN_REFLEN];
+ parse_db_table_from_file_path(filepath, db_name_orig, table_name_orig);
+ if (!db_name_orig[0] || !table_name_orig[0])
+ return std::make_tuple("", "", "");
+ char db_name_conv[FN_REFLEN];
+ char table_name_conv[FN_REFLEN];
+ filename_to_tablename(db_name_orig, db_name_conv, sizeof(db_name_conv));
+ filename_to_tablename(
+ table_name_orig, table_name_conv, sizeof(table_name_conv));
+ if (!db_name_conv[0] || !table_name_conv[0])
+ return std::make_tuple("", "", "");
+ return std::make_tuple(db_name_conv, table_name_conv,
+ std::string(db_name_orig).append("/").append(table_name_orig));
+}
+
+std::string get_table_version_from_image(const std::vector<uchar> &frm_image) {
+ DBUG_ASSERT(frm_image.size() >= 64);
+
+ if (!strncmp((char*) frm_image.data(), "TYPE=VIEW\n", 10))
+ return {};
+
+ if (!is_binary_frm_header(frm_image.data()))
+ return {};
+
+ /* Length of the MariaDB extra2 segment in the form file. */
+ uint len = uint2korr(frm_image.data() + 4);
+ const uchar *extra2= frm_image.data() + 64;
+
+ if (*extra2 == '/') // old frm had '/' there
+ return {};
+
+ const uchar *e2end= extra2 + len;
+ while (extra2 + 3 <= e2end)
+ {
+ uchar type= *extra2++;
+ size_t length= *extra2++;
+ if (!length)
+ {
+ if (extra2 + 2 >= e2end)
+ return {};
+ length= uint2korr(extra2);
+ extra2+= 2;
+ if (length < 256)
+ return {};
+ }
+ if (extra2 + length > e2end)
+ return {};
+ if (type == EXTRA2_TABLEDEF_VERSION) {
+ char buff[MY_UUID_STRING_LENGTH];
+ my_uuid2str(extra2, buff, 1);
+ return std::string(buff, buff + MY_UUID_STRING_LENGTH);
+ }
+ extra2+= length;
+ }
+
+ return {};
+}
+
+std::pair<bool, legacy_db_type>
+ get_table_engine_from_image(const std::vector<uchar> &frm_image) {
+
+ DBUG_ASSERT(frm_image.size() >= 64);
+
+ if (!strncmp((char*) frm_image.data(), "TYPE=VIEW\n", 10))
+ return std::make_pair(false, DB_TYPE_UNKNOWN);
+
+ if (!is_binary_frm_header(frm_image.data()))
+ return std::make_pair(false, DB_TYPE_UNKNOWN);
+
+ legacy_db_type dbt = (legacy_db_type)frm_image[3];
+
+ if (dbt >= DB_TYPE_FIRST_DYNAMIC)
+ return std::make_pair(false, DB_TYPE_UNKNOWN);
+
+ if (dbt != DB_TYPE_PARTITION_DB)
+ return std::make_pair(false, dbt);
+
+ dbt = (legacy_db_type)frm_image[61];
+ return std::make_pair(true,
+ dbt < DB_TYPE_FIRST_DYNAMIC ? dbt : DB_TYPE_UNKNOWN);
+}
+
+std::vector<uchar> read_frm_image(File file) {
+ std::vector<uchar> frm_image;
+ MY_STAT state;
+
+ if (mysql_file_fstat(file, &state, MYF(MY_WME)))
+ return frm_image;
+
+ frm_image.resize((size_t)state.st_size, 0);
+
+ if (mysql_file_read(
+ file, frm_image.data(), (size_t)state.st_size, MYF(MY_NABP)))
+ frm_image.clear();
+
+ return frm_image;
+}
+
+std::string read_table_version_id(File file) {
+ auto frm_image = read_frm_image(file);
+ if (frm_image.empty())
+ return {};
+ return get_table_version_from_image(frm_image);
+}
+
+bool is_log_table(const char *dbname, const char *tablename) {
+ DBUG_ASSERT(dbname);
+ DBUG_ASSERT(tablename);
+
+ LEX_CSTRING lex_db;
+ LEX_CSTRING lex_table;
+ lex_db.str = dbname;
+ lex_db.length = strlen(dbname);
+ lex_table.str = tablename;
+ lex_table.length = strlen(tablename);
+
+ if (!lex_string_eq(&MYSQL_SCHEMA_NAME, &lex_db))
+ return false;
+
+ if (lex_string_eq(&GENERAL_LOG_NAME, &lex_table))
+ return true;
+
+ if (lex_string_eq(&SLOW_LOG_NAME, &lex_table))
+ return true;
+
+ return false;
+}
+
+bool is_stats_table(const char *dbname, const char *tablename) {
+ DBUG_ASSERT(dbname);
+ DBUG_ASSERT(tablename);
+
+ LEX_CSTRING lex_db;
+ LEX_CSTRING lex_table;
+ lex_db.str = dbname;
+ lex_db.length = strlen(dbname);
+ lex_table.str = tablename;
+ lex_table.length = strlen(tablename);
+
+ if (!lex_string_eq(&MYSQL_SCHEMA_NAME, &lex_db))
+ return false;
+
+ CHARSET_INFO *ci= system_charset_info;
+
+ return (lex_table.length > 4 &&
+ /* one of mysql.*_stat tables, but not mysql.innodb* tables*/
+ ((my_tolower(ci, lex_table.str[lex_table.length-5]) == 's' &&
+ my_tolower(ci, lex_table.str[lex_table.length-4]) == 't' &&
+ my_tolower(ci, lex_table.str[lex_table.length-3]) == 'a' &&
+ my_tolower(ci, lex_table.str[lex_table.length-2]) == 't' &&
+ my_tolower(ci, lex_table.str[lex_table.length-1]) == 's') &&
+ !(my_tolower(ci, lex_table.str[0]) == 'i' &&
+ my_tolower(ci, lex_table.str[1]) == 'n' &&
+ my_tolower(ci, lex_table.str[2]) == 'n' &&
+ my_tolower(ci, lex_table.str[3]) == 'o')));
+}
+
/* ======== Datafiles iterator ======== */
struct datafiles_iter_t {
+ datafiles_iter_t() : space(fil_system.space_list.end()), node(nullptr), started(FALSE) {
+ }
+ ~datafiles_iter_t() {
+ }
space_list_t::iterator space = fil_system.space_list.end();
fil_node_t *node = nullptr;
bool started = false;
@@ -777,8 +967,6 @@ static void *dbug_execute_in_new_connection(void *arg)
return nullptr;
}
-static pthread_t dbug_alter_thread;
-
/*
Execute query from a new connection, in own thread.
@@ -789,8 +977,9 @@ Execute query from a new connection, in own thread.
otherwise query should return error.
@param expected_errno - if not 0, and query finished with error,
expected mysql_errno()
+@return created thread id
*/
-static void dbug_start_query_thread(
+static pthread_t dbug_start_query_thread(
const char *query,
const char *wait_state,
int expected_err,
@@ -802,12 +991,14 @@ static void dbug_start_query_thread(
par->expect_err = expected_err;
par->expect_errno = expected_errno;
par->con = xb_mysql_connect();
-
- mysql_thread_create(0, &dbug_alter_thread, nullptr,
+ if (mysql_set_server_option(par->con, MYSQL_OPTION_MULTI_STATEMENTS_ON))
+ die("Can't set multistatement option for query: %s", query);
+ pthread_t result_thread;
+ mysql_thread_create(0, &result_thread, nullptr,
dbug_execute_in_new_connection, par);
if (!wait_state)
- return;
+ return result_thread;
char q[256];
snprintf(q, sizeof(q),
@@ -829,7 +1020,11 @@ static void dbug_start_query_thread(
end:
msg("query '%s' on connection %lu reached state '%s'", query,
mysql_thread_id(par->con), wait_state);
+ return result_thread;
}
+
+static pthread_t dbug_alter_thread;
+static pthread_t dbug_emulate_ddl_on_intermediate_table_thread;
#endif
void mdl_lock_all()
@@ -952,6 +1147,31 @@ static void backup_file_op(uint32_t space_id, int type,
}
}
+static bool check_if_fts_table(const char *file_name) {
+ const char *table_name_start = strrchr(file_name, '/');
+ if (table_name_start)
+ ++table_name_start;
+ else
+ table_name_start = file_name;
+
+ if (!starts_with(table_name_start,"FTS_"))
+ return false;
+
+ const char *table_name_end = strrchr(table_name_start, '.');
+ if (!table_name_end)
+ table_name_end = table_name_start + strlen(table_name_start);
+ ptrdiff_t table_name_len = table_name_end - table_name_end;
+
+ for (const char **suffix = fts_common_tables; *suffix; ++suffix)
+ if (!strncmp(table_name_start, *suffix, table_name_len))
+ return true;
+ for (size_t i = 0; fts_index_selector[i].suffix; ++i)
+ if (!strncmp(table_name_start, fts_index_selector[i].suffix,
+ table_name_len))
+ return true;
+
+ return false;
+}
/*
This callback is called if DDL operation is detected,
@@ -985,8 +1205,9 @@ static void backup_file_op_fail(uint32_t space_id, int type,
break;
case FILE_DELETE:
fail = !check_if_skip_table(
- filename_to_spacename(name, len).c_str());
- msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
+ filename_to_spacename(name, len).c_str())
+ && !check_if_fts_table(reinterpret_cast<const char*>(name));
+ msg("DDL tracking : delete %u \"%.*s\"", space_id, int(len), name);
break;
default:
ut_ad(0);
@@ -1112,6 +1333,7 @@ enum options_xtrabackup
OPT_INNODB_LOG_FILE_BUFFERING,
#endif
OPT_INNODB_LOG_FILE_SIZE,
+ OPT_INNODB_LOG_FILES_IN_GROUP,
OPT_INNODB_OPEN_FILES,
OPT_XTRA_DEBUG_SYNC,
OPT_INNODB_CHECKSUM_ALGORITHM,
@@ -1129,9 +1351,9 @@ enum options_xtrabackup
OPT_NO_LOCK,
OPT_SAFE_SLAVE_BACKUP,
OPT_RSYNC,
+ OPT_NO_BACKUP_LOCKS,
OPT_FORCE_NON_EMPTY_DIRS,
OPT_NO_VERSION_CHECK,
- OPT_NO_BACKUP_LOCKS,
OPT_DECOMPRESS,
OPT_INCREMENTAL_HISTORY_NAME,
OPT_INCREMENTAL_HISTORY_UUID,
@@ -1343,8 +1565,10 @@ struct my_option xb_client_options[]= {
0, 0, 0, 0, 0, 0},
{"no-lock", OPT_NO_LOCK,
- "Use this option to disable table lock "
- "with \"FLUSH TABLES WITH READ LOCK\". Use it only if ALL your "
+ "This option should not be used as "
+ "mariadb-backup now is using BACKUP LOCKS, which minimizes the "
+ "lock time. ALTER TABLE can run in parallel with BACKUP LOCKS."
+ "Use the --no-lock option it only if ALL your "
"tables are InnoDB and you DO NOT CARE about the binary log "
"position of the backup. This option shouldn't be used if there "
"are any DDL statements being executed or if any updates are "
@@ -1373,14 +1597,12 @@ struct my_option xb_client_options[]= {
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"rsync", OPT_RSYNC,
- "Uses the rsync utility to optimize local file "
- "transfers. When this option is specified, " XB_TOOL_NAME " uses rsync "
- "to copy all non-InnoDB files instead of spawning a separate cp for "
- "each file, which can be much faster for servers with a large number "
- "of databases or tables. This option cannot be used together with "
- "--stream.",
- (uchar *) &opt_rsync, (uchar *) &opt_rsync, 0, GET_BOOL, NO_ARG, 0, 0, 0,
- 0, 0, 0},
+ "Obsolete depricated option",
+ &ignored_option, &ignored_option, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"no-backup-locks", OPT_NO_BACKUP_LOCKS,
+ "Obsolete depricated option",
+ &ignored_option, &ignored_option, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS,
"This "
@@ -1398,15 +1620,6 @@ struct my_option xb_client_options[]= {
(uchar *) &opt_noversioncheck, (uchar *) &opt_noversioncheck, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"no-backup-locks", OPT_NO_BACKUP_LOCKS,
- "This option controls if "
- "backup locks should be used instead of FLUSH TABLES WITH READ LOCK "
- "on the backup stage. The option has no effect when backup locks are "
- "not supported by the server. This option is enabled by default, "
- "disable with --no-backup-locks.",
- (uchar *) &opt_no_backup_locks, (uchar *) &opt_no_backup_locks, 0,
- GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-
{"decompress", OPT_DECOMPRESS,
"Decompresses all files with the .qp "
"extension in a backup previously made with the --compress option. "
@@ -1483,11 +1696,10 @@ struct my_option xb_client_options[]= {
(uchar *) &opt_remove_original, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
- "This option specifies which types of queries are allowed to complete "
- "before " XB_TOOL_NAME " will issue the global lock. Default is all.",
- (uchar *) &opt_lock_wait_query_type, (uchar *) &opt_lock_wait_query_type,
- &query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0,
- 0},
+ "Old disabled option which has no effect anymore (not needed "
+ "with BACKUP LOCKS)",
+ (uchar*) 0, (uchar*) 0, &query_type_typelib, GET_ENUM,
+ REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0},
{"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE,
"This option specifies which types of queries should be killed to "
@@ -1504,32 +1716,31 @@ struct my_option xb_client_options[]= {
NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT,
- "This option specifies the number of seconds " XB_TOOL_NAME " waits "
- "between starting FLUSH TABLES WITH READ LOCK and killing those "
- "queries that block it. Default is 0 seconds, which means "
- XB_TOOL_NAME " will not attempt to kill any queries.",
- (uchar *) &opt_kill_long_queries_timeout,
- (uchar *) &opt_kill_long_queries_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0,
+ "Old disabled option which has no effect anymore (not needed "
+ "with BACKUP LOCKS)",
+ (uchar*) 0, (uchar*) 0, 0, GET_UINT, REQUIRED_ARG, 0, 0,
0, 0, 0, 0},
{"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
- "This option specifies time in seconds that " XB_TOOL_NAME " should wait "
- "for queries that would block FTWRL before running it. If there are "
- "still such queries when the timeout expires, " XB_TOOL_NAME " terminates "
- "with an error. Default is 0, in which case " XB_TOOL_NAME " does not "
- "wait for queries to complete and starts FTWRL immediately.",
- (uchar *) &opt_lock_wait_timeout, (uchar *) &opt_lock_wait_timeout, 0,
- GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ "Alias for startup-wait-timeout",
+ (uchar*) &opt_lock_wait_timeout, (uchar*) &opt_lock_wait_timeout,
+ 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+
+ {"startup-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
+ "This option specifies time in seconds that mariadb-backup should wait for "
+ "BACKUP STAGE START to complete. BACKUP STAGE START has to wait until all "
+ "currently running queries using explicite LOCK TABLES has ended. "
+ "If there are still such queries when the timeout expires, mariadb-backup "
+ "terminates with an error. Default is 0, in which case mariadb-backup waits "
+ "indefinitely for BACKUP STAGE START to finish",
+ (uchar*) &opt_lock_wait_timeout, (uchar*) &opt_lock_wait_timeout,
+ 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD,
- "This option specifies the query run time threshold which is used by "
- XB_TOOL_NAME " to detect long-running queries with a non-zero value "
- "of --ftwrl-wait-timeout. FTWRL is not started until such "
- "long-running queries exist. This option has no effect if "
- "--ftwrl-wait-timeout is 0. Default value is 60 seconds.",
- (uchar *) &opt_lock_wait_threshold, (uchar *) &opt_lock_wait_threshold, 0,
- GET_UINT, REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
-
+ "Old disabled option which has no effect anymore (not needed "
+ "with BACKUP LOCKS)",
+ (uchar*) 0, (uchar*) 0, 0, GET_UINT,
+ REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
{"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT,
"How many seconds --safe-slave-backup should wait for "
@@ -1595,7 +1806,7 @@ struct my_option xb_server_options[] =
{"parallel", OPT_XTRA_PARALLEL,
"Number of threads to use for parallel datafiles transfer. "
"The default value is 1.",
- (G_PTR*) &xtrabackup_parallel, (G_PTR*) &xtrabackup_parallel, 0, GET_INT,
+ (G_PTR*) &xtrabackup_parallel, (G_PTR*) &xtrabackup_parallel, 0, GET_UINT,
REQUIRED_ARG, 1, 1, INT_MAX, 0, 0, 0},
{"extended_validation", OPT_XTRA_EXTENDED_VALIDATION,
@@ -1677,8 +1888,8 @@ struct my_option xb_server_options[] =
{"innodb_log_buffer_size", OPT_INNODB_LOG_BUFFER_SIZE,
"Redo log buffer size in bytes.",
(G_PTR*) &log_sys.buf_size, (G_PTR*) &log_sys.buf_size, 0,
- IF_WIN(GET_ULL,GET_ULONG), REQUIRED_ARG, 2U << 20,
- 2U << 20, SIZE_T_MAX, 0, 4096, 0},
+ GET_UINT, REQUIRED_ARG, 2U << 20,
+ 2U << 20, log_sys.buf_size_max, 0, 4096, 0},
#if defined __linux__ || defined _WIN32
{"innodb_log_file_buffering", OPT_INNODB_LOG_FILE_BUFFERING,
"Whether the file system cache for ib_logfile0 is enabled during --backup",
@@ -1754,17 +1965,17 @@ struct my_option xb_server_options[] =
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"plugin-dir", OPT_PLUGIN_DIR,
- "Server plugin directory. Used to load plugins during 'prepare' phase."
- "Has no effect in the 'backup' phase (plugin directory during backup is the same as server's)",
- &xb_plugin_dir, &xb_plugin_dir,
- 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+ "Server plugin directory. Used to load plugins during 'prepare' phase."
+ "Has no effect in the 'backup' phase (plugin directory during backup is the same as server's)",
+ &xb_plugin_dir, &xb_plugin_dir,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{"aria_log_dir_path", OPT_ARIA_LOG_DIR_PATH,
"Path to individual files and their sizes.",
&aria_log_dir_path, &aria_log_dir_path,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"open_files_limit", OPT_OPEN_FILES_LIMIT, "the maximum number of file "
+ {"open_files_limit", 0, "the maximum number of file "
"descriptors to reserve with setrlimit().",
(G_PTR*) &xb_open_files_limit, (G_PTR*) &xb_open_files_limit, 0, GET_ULONG,
REQUIRED_ARG, 0, 0, UINT_MAX, 0, 1, 0},
@@ -1885,7 +2096,7 @@ static int prepare_export()
IF_WIN("\"","") "\"%s\" --mysqld \"%s\""
" --defaults-extra-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
" --innodb --innodb-fast-shutdown=0 --loose-partition"
- " --innodb-buffer-pool-size=%llu"
+ " --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
" --console --skip-log-error --skip-log-bin --bootstrap %s< "
BOOTSTRAP_FILENAME IF_WIN("\"",""),
mariabackup_exe,
@@ -1899,7 +2110,7 @@ static int prepare_export()
IF_WIN("\"","") "\"%s\" --mysqld"
" --defaults-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
" --innodb --innodb-fast-shutdown=0 --loose-partition"
- " --innodb-buffer-pool-size=%llu"
+ " --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
" --console --log-error= --skip-log-bin --bootstrap %s< "
BOOTSTRAP_FILENAME IF_WIN("\"",""),
mariabackup_exe,
@@ -1948,7 +2159,8 @@ static void usage(void)
puts("Open source backup tool for InnoDB and XtraDB\n\
\n\
Copyright (C) 2009-2015 Percona LLC and/or its affiliates.\n\
-Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.\n\
+Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy.\n\
+Portions Copyright (C) 2017-2023 MariaDB Corporation / MariaDB Plc.\n\
\n\
This program is free software; you can redistribute it and/or\n\
modify it under the terms of the GNU General Public License\n\
@@ -2021,6 +2233,10 @@ xb_get_one_option(const struct my_option *opt,
ADD_PRINT_PARAM_OPT(srv_log_group_home_dir);
break;
+ case OPT_INNODB_LOG_FILES_IN_GROUP:
+ case OPT_INNODB_LOG_FILE_SIZE:
+ break;
+
case OPT_INNODB_FLUSH_METHOD:
#ifdef _WIN32
/* From: storage/innobase/handler/ha_innodb.cc:innodb_init_params */
@@ -2133,6 +2349,11 @@ xb_get_one_option(const struct my_option *opt,
}
}
break;
+ case OPT_RSYNC:
+ case OPT_NO_BACKUP_LOCKS:
+ if (my_handle_options_init_variables)
+ fprintf(stderr, "Obsolete option: %s. Ignored\n", opt->name);
+ break;
#define MYSQL_CLIENT
#include "sslopt-case.h"
#undef MYSQL_CLIENT
@@ -2428,7 +2649,12 @@ static bool innodb_init()
os_file_delete_if_exists_func(ib_logfile0.c_str(), nullptr);
os_file_t file= os_file_create_func(ib_logfile0.c_str(),
OS_FILE_CREATE, OS_FILE_NORMAL,
- OS_DATA_FILE_NO_O_DIRECT, false, &ret);
+#if defined _WIN32 || defined O_DIRECT
+ OS_DATA_FILE_NO_O_DIRECT,
+#else
+ OS_DATA_FILE,
+#endif
+ false, &ret);
if (!ret)
{
invalid_log:
@@ -3026,12 +3252,7 @@ static my_bool xtrabackup_copy_datafile(ds_ctxt *ds_data,
goto skip;
}
- if (!changed_page_bitmap) {
- read_filter = &rf_pass_through;
- }
- else {
- read_filter = &rf_bitmap;
- }
+ read_filter = &rf_pass_through;
res = xb_fil_cur_open(&cursor, read_filter, node, thread_n, ULLONG_MAX);
if (res == XB_FIL_CUR_SKIP) {
@@ -3355,50 +3576,22 @@ To use this facility, you need to
3. start mariabackup with --dbug=+d,debug_mariabackup_events
*/
void dbug_mariabackup_event(const char *event,
- const fil_space_t::name_type key)
+ const fil_space_t::name_type key,
+ bool need_lock)
{
+ static std::mutex dbug_mariabackup_event_mutex;
char *sql = dbug_mariabackup_get_val(event, key);
if (sql && *sql) {
msg("dbug_mariabackup_event : executing '%s'", sql);
- xb_mysql_query(mysql_connection, sql, false, true);
- }
+ if (need_lock) {
+ std::lock_guard<std::mutex> lock(dbug_mariabackup_event_mutex);
+ xb_mysql_query(mysql_connection, sql, false, true);
+ } else
+ xb_mysql_query(mysql_connection, sql, false, true);
+ }
}
#endif // DBUG_OFF
-/** Datafiles copying thread.*/
-static void data_copy_thread_func(data_thread_ctxt_t *ctxt) /* thread context */
-{
- uint num = ctxt->num;
- fil_node_t* node;
- ut_ad(ctxt->corrupted_pages);
-
- /*
- Initialize mysys thread-specific memory so we can
- use mysys functions in this thread.
- */
- my_thread_init();
-
- while ((node = datafiles_iter_next(ctxt->it)) != NULL) {
- DBUG_MARIABACKUP_EVENT("before_copy", node->space->name());
- DBUG_EXECUTE_FOR_KEY("wait_innodb_redo_before_copy",
- node->space->name(),
- backup_wait_for_lsn(get_current_lsn(mysql_connection)););
- /* copy the datafile */
- if (xtrabackup_copy_datafile(ctxt->datasinks->m_data,
- ctxt->datasinks->m_meta, node, num, NULL,
- xtrabackup_incremental ? wf_incremental : wf_write_through,
- *ctxt->corrupted_pages))
- die("failed to copy datafile.");
-
- DBUG_MARIABACKUP_EVENT("after_copy", node->space->name());
- }
-
- pthread_mutex_lock(ctxt->count_mutex);
- (*ctxt->count)--;
- pthread_mutex_unlock(ctxt->count_mutex);
-
- my_thread_end();
-}
/************************************************************************
Initialize the appropriate datasink(s). Both local backups and streaming in the
@@ -3553,6 +3746,11 @@ static void xb_load_single_table_tablespace(const char *dirname,
}
if (file->open_read_only(true) != DB_SUCCESS) {
+ // Ignore FTS tables, as they can be removed for intermediate tables,
+ // this code must be executed under stronger or equal to BLOCK_DDL lock,
+ // so there must not be errors for non-intermediate FTS tables.
+ if (check_if_fts_table(filname))
+ return;
die("Can't open datafile %s", name);
}
@@ -4558,7 +4756,6 @@ bool Backup_datasinks::backup_low()
if (failed_ids.size() > 0) {
return false;
}
-
if (!xtrabackup_incremental) {
safe_strcpy(metadata_type, sizeof(metadata_type),
"full-backuped");
@@ -4597,16 +4794,441 @@ bool Backup_datasinks::backup_low()
return true;
}
+class InnodbDataCopier {
+public:
+ InnodbDataCopier(Backup_datasinks &backup_datasinks,
+ CorruptedPages &corrupted_pages,
+ ThreadPool &thread_pool) :
+ m_backup_datasinks(backup_datasinks),
+ m_corrupted_pages(corrupted_pages),
+ m_tasks(thread_pool) {}
+
+ ~InnodbDataCopier() {
+ DBUG_ASSERT(m_tasks.is_finished());
+ }
+
+ bool start() {
+ DBUG_ASSERT(m_tasks.is_finished());
+ m_tasks.push_task(
+ std::bind(&InnodbDataCopier::scan_job, this, std::placeholders::_1));
+ return true;
+ }
+
+ bool wait_for_finish() {
+ return m_tasks.wait_for_finish();
+ }
+
+private:
+ void scan_job(unsigned thread_num) {
+ datafiles_iter_t it;
+ fil_node_t* node;
+ while ((node = datafiles_iter_next(&it)) != nullptr) {
+ m_tasks.push_task(
+ std::bind(&InnodbDataCopier::copy_job, this, node,
+ std::placeholders::_1));
+ }
+ m_tasks.finish_task(1);
+ }
+
+ void copy_job(fil_node_t *node, unsigned thread_num) {
+ DBUG_ASSERT(node);
+ // TODO: this came from the old code, where it was not thread-safe
+ // too, use separate mysql connection per thread here
+ DBUG_MARIABACKUP_EVENT("before_copy", node->space->name());
+ DBUG_EXECUTE_FOR_KEY("wait_innodb_redo_before_copy",
+ node->space->name(),
+ backup_wait_for_lsn(
+ get_current_lsn(mysql_connection)););
+ /* copy the datafile */
+ if(xtrabackup_copy_datafile(m_backup_datasinks.m_data,
+ m_backup_datasinks.m_meta,
+ node, thread_num, NULL,
+ xtrabackup_incremental
+ ? wf_incremental : wf_write_through,
+ m_corrupted_pages))
+ die("mariabackup: Error: failed to copy datafile.");
+ // TODO: this came from the old code, where it was not thread-safe
+ // too, use separate mysql connection per thread here
+ DBUG_MARIABACKUP_EVENT("after_copy", node->space->name());
+ m_tasks.finish_task(1);
+ }
+
+ Backup_datasinks &m_backup_datasinks;
+ CorruptedPages &m_corrupted_pages;
+ TasksGroup m_tasks;
+};
+
+
+class BackupStages {
+
+ public:
+
+ BackupStages(ds_ctxt_t *ds_data) :
+ m_bs_con(nullptr),
+ m_aria_backup(fil_path_to_mysql_datadir,
+ aria_log_dir_path,
+ ds_data, m_con_pool, m_thread_pool),
+ m_common_backup(fil_path_to_mysql_datadir, ds_data, m_con_pool,
+ m_thread_pool) {}
+
+ ~BackupStages() { destroy(); }
+
+ bool init() {
+ if ((m_bs_con = xb_mysql_connect()) == nullptr)
+ return false;
+
+ while(m_con_pool.size() < xtrabackup_parallel) {
+ MYSQL *con = xb_mysql_connect();
+ if (con == nullptr)
+ return false;
+ m_con_pool.push_back(con);
+ }
+
+ if (!m_thread_pool.start(xtrabackup_parallel))
+ return false;
+ if (!m_aria_backup.init())
+ return false;
+ m_aria_backup.set_post_copy_table_hook(
+ std::bind(&BackupStages::store_table_version, this,
+ std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+ m_common_backup.set_post_copy_table_hook(
+ std::bind(&BackupStages::store_table_version, this,
+ std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
+ return true;
+ }
+
+ void destroy() {
+ m_thread_pool.stop();
+ while (!m_con_pool.empty()) {
+ MYSQL *con = m_con_pool.back();
+ m_con_pool.pop_back();
+ mysql_close(con);
+ }
+ if (m_bs_con)
+ mysql_close(m_bs_con);
+ m_bs_con = nullptr;
+ }
+
+ bool stage_start(Backup_datasinks &backup_datasinks,
+ CorruptedPages &corrupted_pages) {
+ msg("BACKUP STAGE START");
+ if (!opt_no_lock) {
+ if (opt_safe_slave_backup) {
+ if (!wait_for_safe_slave(mysql_connection)) {
+ return(false);
+ }
+ }
+
+ history_lock_time = time(NULL);
+
+ if (!lock_for_backup_stage_start(m_bs_con)) {
+ msg("Error on BACKUP STAGE START query execution");
+ return(false);
+ }
+ }
+
+ InnodbDataCopier innodb_data_copier(backup_datasinks,
+ corrupted_pages,
+ m_thread_pool);
+ // Start InnoDB data files copy in background
+ if (!innodb_data_copier.start()) {
+ msg("Error on starting InnoDB data files backup");
+ return false;
+ }
+ // Start online non-stats-log Aria tables copying in background
+ if (!m_aria_backup.start(opt_no_lock)) {
+ msg("Error on starting Aria data files backup");
+ innodb_data_copier.wait_for_finish();
+ return false;
+ }
+
+ // Wait for all innodb data files copy finish
+ if(!innodb_data_copier.wait_for_finish()) {
+ msg("InnoDB data files backup process is finished with error");
+ return false;
+ }
+ // Wait for online non-stats-log Aria tables copy finish
+ if (!m_aria_backup.wait_for_finish()) {
+ msg("Aria data files backup process is finished with error");
+ return false;
+ }
+
+ DBUG_MARIABACKUP_EVENT_LOCK("after_aria_background", {});
+
+ return true;
+ }
+
+ bool stage_flush() {
+ msg("BACKUP STAGE FLUSH");
+ if (!opt_no_lock && !lock_for_backup_stage_flush(m_bs_con)) {
+ msg("Error on BACKUP STAGE FLUSH query execution");
+ return false;
+ }
+ auto tables_in_use = get_tables_in_use(mysql_connection);
+ // Copy non-stats-log non-in-use tables of non-InnoDB-Aria-RocksDB engines
+ // in background
+ if (!m_common_backup.scan(tables_in_use,
+ &m_copied_common_tables, opt_no_lock, true)) {
+ msg("Error on scan data directory for common engines");
+ return false;
+ }
+ // Copy Aria offline non-stats-log non-in-use tables in background
+ if (!m_aria_backup.copy_offline_tables(&tables_in_use, opt_no_lock,
+ false)) {
+ msg("Error on start Aria tables backup");
+ return false;
+ }
+
+ if (!m_aria_backup.copy_log_tail()) {
+ msg("Error on Aria log tail copy");
+ return false;
+ };
+
+ // Wait for Aria tables copy finish
+ if (!m_aria_backup.wait_for_finish()) {
+ msg("Aria data files backup process is finished with error");
+ return false;
+ }
+ // Wait for non-InnoDB-Aria-RocksDB engines copy finish
+ if (!m_common_backup.wait_for_finish()) {
+ msg("Data files backup process is finished with error");
+ return false;
+ }
+
+ DBUG_EXECUTE_IF("emulate_ddl_on_intermediate_table",
+ dbug_emulate_ddl_on_intermediate_table_thread =
+ dbug_start_query_thread(
+ "SET debug_sync='copy_data_between_tables_after_set_backup_lock "
+ "SIGNAL copy_started';"
+ "SET debug_sync='copy_data_between_tables_before_reset_backup_lock "
+ "SIGNAL before_backup_lock_reset WAIT_FOR backup_lock_reset';"
+ "SET debug_sync='alter_table_after_temp_table_drop "
+ "SIGNAL temp_table_dropped';"
+ "SET SESSION lock_wait_timeout = 1;"
+ "ALTER TABLE test.t1 ADD COLUMN col1_copy INT, ALGORITHM = COPY;",
+ NULL, 0, 0);
+ xb_mysql_query(mysql_connection,
+ "SET debug_sync='now WAIT_FOR copy_started'", false, true);
+ );
+
+ return true;
+ }
+
+ bool stage_block_ddl(Backup_datasinks &backup_datasinks,
+ CorruptedPages &corrupted_pages) {
+ if (!opt_no_lock) {
+ if (!lock_for_backup_stage_block_ddl(m_bs_con)) {
+ msg("BACKUP STAGE BLOCK_DDL");
+ return false;
+ }
+ if (have_galera_enabled)
+ {
+ xb_mysql_query(mysql_connection, "SET SESSION wsrep_sync_wait=0", false);
+ }
+ }
+
+ ulonglong server_lsn_after_lock = get_current_lsn(mysql_connection);
+
+ // Copy the rest of non-stats-lognon-InnoDB-Aria-RocksDB tables
+ // Do not execute BACKUP LOCK under BLOCK_DDL stage
+ if (!m_common_backup.scan(m_copied_common_tables, &m_copied_common_tables,
+ true, false)) {
+ msg("Error on scan data directory for common engines");
+ return false;
+ }
+ // Copy log tables tail
+ if (!m_common_backup.copy_log_tables(false)) {
+ msg("Error on copy system tables");
+ return false;
+ }
+
+ // Copy the rest of non-stats Aria tables in background
+ if (!m_aria_backup.copy_offline_tables(nullptr, true, false)) {
+ msg("Error on start Aria tables backup");
+ return false;
+ }
+
+ // Copy .frm, .trn and other files
+ if (!backup_files(backup_datasinks.m_data,
+ fil_path_to_mysql_datadir)) {
+ msg("Backup files error");
+ return false;
+ }
+
+ msg("Waiting for log copy thread to read lsn %llu",
+ server_lsn_after_lock);
+ backup_wait_for_lsn(server_lsn_after_lock);
+ corrupted_pages.backup_fix_ddl(backup_datasinks.m_data,
+ backup_datasinks.m_meta);
+
+ if (!m_aria_backup.copy_log_tail()) {
+ msg("Error on Aria log tail copy");
+ return false;
+ }
+
+ // Wait for Aria tables copy finish
+ if (!m_aria_backup.wait_for_finish()) {
+ msg("Aria data files backup process is finished with error");
+ return false;
+ }
+ // Wait for non-InnoDB-Aria-RocksDB engines copy finish
+ if (!m_common_backup.wait_for_finish()) {
+ msg("Data files backup process is finished with error");
+ return false;
+ }
+
+ ddl_log::backup(fil_path_to_mysql_datadir,
+ backup_datasinks.m_data, m_tables);
+
+ DBUG_MARIABACKUP_EVENT_LOCK("after_stage_block_ddl", {});
+
+ return true;
+ }
+
+ bool stage_block_commit(Backup_datasinks &backup_datasinks) {
+ msg("BACKUP STAGE BLOCK_COMMIT");
+ if (!opt_no_lock && !lock_for_backup_stage_commit(m_bs_con)) {
+ msg("Error on BACKUP STAGE BLOCK_COMMIT query execution");
+ return false;
+ }
+
+ // Copy log tables tail
+ if (!m_common_backup.copy_log_tables(true)) {
+ msg("Error on copy log tables");
+ return false;
+ }
+
+ // Copy stats tables
+ if (!m_common_backup.copy_stats_tables()) {
+ msg("Error on copy stats tables");
+ return false;
+ }
+
+ // Copy system Aria files
+ if (!m_aria_backup.finalize()) {
+ msg("Error on finalize Aria tables backup");
+ return false;
+ }
+
+ if (!m_common_backup.wait_for_finish()) {
+ msg("Error on finish common engines backup");
+ return false;
+ }
+
+ if (!m_common_backup.close_log_tables()) {
+ msg("Error on close log tables");
+ return false;
+ }
+
+ if (!backup_files_from_datadir(backup_datasinks.m_data,
+ fil_path_to_mysql_datadir,
+ "aws-kms-key")) {
+ msg("Error on root data dir files backup");
+ return false;
+ }
+
+ if (has_rocksdb_plugin()) {
+ rocksdb_create_checkpoint();
+ }
+
+ // There is no need to stop slave thread before coping non-Innodb data when
+ // --no-lock option is used because --no-lock option requires that no DDL or
+ // DML to non-transaction tables can occur.
+ if (opt_no_lock) {
+ if (opt_safe_slave_backup) {
+ if (!wait_for_safe_slave(mysql_connection)) {
+ return(false);
+ }
+ }
+ }
+
+ if (opt_slave_info) {
+ if (!write_slave_info(backup_datasinks.m_data,
+ mysql_connection)) {
+ return(false);
+ }
+ }
+
+ /* The only reason why Galera/binlog info is written before
+ wait_for_ibbackup_log_copy_finish() is that after that call the xtrabackup
+ binary will start streamig a temporary copy of REDO log to stdout and
+ thus, any streaming from innobackupex would interfere. The only way to
+ avoid that is to have a single process, i.e. merge innobackupex and
+ xtrabackup. */
+ if (opt_galera_info) {
+ if (!write_galera_info(backup_datasinks.m_data,
+ mysql_connection)) {
+ return(false);
+ }
+ }
+
+ bool with_binlogs = opt_binlog_info == BINLOG_INFO_ON;
+
+ if (with_binlogs || opt_galera_info) {
+ if (!write_binlog_info(backup_datasinks.m_data,
+ mysql_connection)) {
+ return(false);
+ }
+ }
+
+ if (!opt_no_lock) {
+ msg("Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...");
+ xb_mysql_query(mysql_connection,
+ "FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS", false);
+ }
+
+ return backup_datasinks.backup_low();
+ }
+
+ bool stage_end(Backup_datasinks &backup_datasinks) {
+ msg("BACKUP STAGE END");
+ /* release all locks */
+ if (!opt_no_lock) {
+ unlock_all(m_bs_con);
+ history_lock_time = 0;
+ } else {
+ history_lock_time = time(NULL) - history_lock_time;
+ }
+ backup_release();
+ DBUG_EXECUTE_IF("check_mdl_lock_works",
+ pthread_join(dbug_alter_thread, nullptr);
+ );
+
+ DBUG_EXECUTE_IF("emulate_ddl_on_intermediate_table",
+ pthread_join(
+ dbug_emulate_ddl_on_intermediate_table_thread,
+ nullptr);
+ );
+
+ backup_finish(backup_datasinks.m_data);
+ return true;
+ }
+
+ void store_table_version(
+ std::string db, std::string table, std::string table_version) {
+ auto tk = table_key(db, table);
+ std::lock_guard<std::mutex> lock(m_tables_mutex);
+ m_tables[std::move(tk)] = std::move(table_version);
+ }
+
+ private:
+ Backup_datasinks *backup_datasinks;
+ MYSQL *m_bs_con;
+ ThreadPool m_thread_pool;
+ std::vector<MYSQL *> m_con_pool;
+ std::mutex m_tables_mutex;
+ ddl_log::tables_t m_tables;
+ aria::Backup m_aria_backup;
+ common_engine::Backup m_common_backup;
+ std::unordered_set<table_key_t> m_copied_common_tables;
+};
+
/** Implement --backup
@return whether the operation succeeded */
static bool xtrabackup_backup_func()
{
MY_STAT stat_info;
- uint i;
- uint count;
- pthread_mutex_t count_mutex;
CorruptedPages corrupted_pages;
- data_thread_ctxt_t *data_threads;
Backup_datasinks backup_datasinks;
pthread_cond_init(&scanned_lsn_cond, NULL);
@@ -4622,7 +5244,7 @@ static bool xtrabackup_backup_func()
return(false);
}
msg("cd to %s", mysql_real_data_home);
- xb_plugin_backup_init(mysql_connection);
+ encryption_plugin_backup_init(mysql_connection);
msg("open files limit requested %lu, set to %lu",
xb_open_files_limit,
xb_set_max_open_files(xb_open_files_limit));
@@ -4663,22 +5285,6 @@ fail:
return(false);
}
- if (srv_buf_pool_size >= 1000 * 1024 * 1024) {
- /* Here we still have srv_pool_size counted
- in kilobytes (in 4.0 this was in bytes)
- srv_boot() converts the value to
- pages; if buffer pool is less than 1000 MB,
- assume fewer threads. */
- srv_max_n_threads = 50000;
-
- } else if (srv_buf_pool_size >= 8 * 1024 * 1024) {
-
- srv_max_n_threads = 10000;
- } else {
- srv_max_n_threads = 1000; /* saves several MB of memory,
- especially in 64-bit
- computers */
- }
srv_thread_pool_init();
/* Reset the system variables in the recovery module. */
trx_pool_init();
@@ -4698,9 +5304,10 @@ fail:
}
/* get current checkpoint_lsn */
{
+ log_sys.latch.wr_lock(SRW_LOCK_CALL);
mysql_mutex_lock(&recv_sys.mutex);
-
dberr_t err = recv_sys.find_checkpoint();
+ log_sys.latch.wr_unlock();
if (err != DB_SUCCESS) {
msg("Error: cannot read redo log header");
@@ -4796,11 +5403,6 @@ fail:
std::thread(log_copying_thread).detach();
- /* FLUSH CHANGED_PAGE_BITMAPS call */
- if (!flush_changed_page_bitmaps()) {
- goto fail;
- }
-
ut_a(xtrabackup_parallel > 0);
if (xtrabackup_parallel > 1) {
@@ -4812,71 +5414,36 @@ fail:
mdl_lock_all();
DBUG_EXECUTE_IF("check_mdl_lock_works",
- dbug_start_query_thread("ALTER TABLE test.t ADD COLUMN mdl_lock_column int",
+ dbug_alter_thread =
+ dbug_start_query_thread("ALTER TABLE test.t ADD COLUMN mdl_lock_column int",
"Waiting for table metadata lock", 0, 0););
}
- datafiles_iter_t it;
-
- /* Create data copying threads */
- data_threads = (data_thread_ctxt_t *)
- malloc(sizeof(data_thread_ctxt_t) * xtrabackup_parallel);
- count = xtrabackup_parallel;
- pthread_mutex_init(&count_mutex, NULL);
-
- for (i = 0; i < (uint) xtrabackup_parallel; i++) {
- data_threads[i].it = &it;
- data_threads[i].num = i+1;
- data_threads[i].count = &count;
- data_threads[i].count_mutex = &count_mutex;
- data_threads[i].corrupted_pages = &corrupted_pages;
- data_threads[i].datasinks= &backup_datasinks;
- std::thread(data_copy_thread_func, data_threads + i).detach();
- }
+ BackupStages stages(backup_datasinks.m_data);
- /* Wait for threads to exit */
- while (1) {
- std::this_thread::sleep_for(std::chrono::seconds(1));
- pthread_mutex_lock(&count_mutex);
- bool stop = count == 0;
- pthread_mutex_unlock(&count_mutex);
- if (stop) {
- break;
- }
- }
-
- pthread_mutex_destroy(&count_mutex);
- free(data_threads);
-
- DBUG_ASSERT(backup_datasinks.m_data);
- DBUG_ASSERT(backup_datasinks.m_meta);
- bool ok = backup_start(backup_datasinks.m_data,
- backup_datasinks.m_meta, corrupted_pages);
+ if (!stages.init())
+ goto fail;
- if (ok) {
- ok = backup_datasinks.backup_low();
+ if (!stages.stage_start(backup_datasinks, corrupted_pages))
+ goto fail;
- backup_release();
+ if (!stages.stage_flush())
+ goto fail;
- DBUG_EXECUTE_IF("check_mdl_lock_works",
- pthread_join(dbug_alter_thread, nullptr););
+ if (!stages.stage_block_ddl(backup_datasinks, corrupted_pages))
+ goto fail;
- if (ok) {
- backup_finish(backup_datasinks.m_data);
- }
- }
+ if (!stages.stage_block_commit(backup_datasinks))
+ goto fail;
- if (opt_log_innodb_page_corruption)
- ok = corrupted_pages.print_to_file(backup_datasinks.m_data,
- MB_CORRUPTED_PAGES_FILE);
+ if (!stages.stage_end(backup_datasinks))
+ goto fail;
- if (!ok) {
+ if (opt_log_innodb_page_corruption
+ && !corrupted_pages.print_to_file(backup_datasinks.m_data,
+ MB_CORRUPTED_PAGES_FILE))
goto fail;
- }
- if (changed_page_bitmap) {
- xb_page_bitmap_deinit(changed_page_bitmap);
- }
backup_datasinks.destroy();
msg("Redo log (from LSN " LSN_PF " to " LSN_PF ") was copied.",
@@ -4938,6 +5505,12 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
DBUG_MARIABACKUP_EVENT("backup_fix_ddl", {});
+ DBUG_EXECUTE_IF("emulate_ddl_on_intermediate_table",
+ xb_mysql_query(mysql_connection,
+ "SET debug_sync='now SIGNAL backup_lock_reset "
+ "WAIT_FOR temp_table_dropped'", false, true);
+ );
+
for (space_id_to_name_t::iterator iter = ddl_tracker.tables_in_backup.begin();
iter != ddl_tracker.tables_in_backup.end();
iter++) {
@@ -5082,6 +5655,7 @@ void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta)
}
}
+
/* ================= prepare ================= */
/***********************************************************************
@@ -5568,7 +6142,7 @@ std::string change_extension(std::string filename, std::string new_ext) {
}
-static void rename_file(const char *from,const char *to) {
+void rename_file(const char *from,const char *to) {
msg("Renaming %s to %s\n", from, to);
if (my_rename(from, to, MY_WME)) {
die("Can't rename %s to %s errno %d", from, to, errno);
@@ -5590,7 +6164,7 @@ typedef ibool (*handle_datadir_entry_func_t)(
void* arg); /*!<in: caller-provided data */
/** Rename, and replace destination file, if exists */
-static void rename_force(const char *from, const char *to) {
+void rename_force(const char *from, const char *to) {
if (access(to, R_OK) == 0) {
msg("Removing %s", to);
if (my_delete(to, MYF(MY_WME))) {
@@ -5884,7 +6458,7 @@ static std::string read_file_as_string(const std::string file) {
}
/** Delete file- Provide verbose diagnostics and exit, if operation fails. */
-static void delete_file(const std::string& file, bool if_exists = false) {
+void delete_file(const std::string& file, bool if_exists = false) {
if (if_exists && !file_exists(file))
return;
if (my_delete(file.c_str(), MYF(MY_WME))) {
@@ -6025,7 +6599,7 @@ static bool xtrabackup_prepare_func(char** argv)
}
int argc; for (argc = 0; argv[argc]; argc++) {}
- xb_plugin_prepare_init(argc, argv, xtrabackup_incremental_dir);
+ encryption_plugin_prepare_init(argc, argv);
xtrabackup_target_dir= mysql_data_home_buff;
xtrabackup_target_dir[0]=FN_CURLIB; // all paths are relative from here
@@ -6068,7 +6642,6 @@ static bool xtrabackup_prepare_func(char** argv)
return(false);
}
- srv_max_n_threads = 1000;
srv_n_purge_threads = 1;
xb_filters_init();
@@ -6237,6 +6810,8 @@ error:
if (ok && xtrabackup_export)
ok= (prepare_export() == 0);
+ if (ok) ok = aria::prepare(xtrabackup_target_dir);
+
cleanup:
xb_filters_free();
return ok && !ib::error::was_logged() && corrupted_pages.empty();
@@ -6374,7 +6949,7 @@ static bool check_all_privileges()
int check_result = PRIVILEGE_OK;
- /* FLUSH TABLES WITH READ LOCK */
+ /* BACKUP LOCKS */
if (!opt_no_lock)
{
check_result |= check_privilege(
@@ -6442,21 +7017,6 @@ xb_init()
return(false);
}
- if (xtrabackup_backup && opt_rsync)
- {
- if (xtrabackup_stream_fmt)
- {
- msg("Error: --rsync doesn't work with --stream\n");
- return(false);
- }
- bool have_rsync = IF_WIN(false, (system("rsync --version > /dev/null 2>&1") == 0));
- if (!have_rsync)
- {
- msg("Error: rsync executable not found, cannot run backup with --rsync\n");
- return false;
- }
- }
-
n_mixed_options = 0;
if (opt_decompress) {
@@ -6493,6 +7053,7 @@ xb_init()
if (opt_check_privileges && !check_all_privileges()) {
return(false);
}
+
history_start_time = time(NULL);
}
diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h
index d091c474..38d7e5fd 100644
--- a/extra/mariabackup/xtrabackup.h
+++ b/extra/mariabackup/xtrabackup.h
@@ -24,8 +24,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <my_getopt.h>
#include "datasink.h"
#include "xbstream.h"
-#include "changed_page_bitmap.h"
+#include "fil0fil.h"
#include <set>
+#include "handler.h"
+
+#include <utility>
+#include <vector>
+#include <tuple>
+#include <functional>
+
#define XB_TOOL_NAME "mariadb-backup"
#define XB_HISTORY_TABLE "mysql.mariadb_backup_history"
@@ -84,8 +91,6 @@ extern my_bool xb_backup_rocksdb;
extern uint opt_protocol;
-extern xb_page_bitmap *changed_page_bitmap;
-
extern char *xtrabackup_incremental;
extern my_bool xtrabackup_incremental_force_scan;
@@ -112,7 +117,7 @@ extern my_bool xtrabackup_decrypt_decompress;
extern char *innobase_data_file_path;
extern longlong innobase_page_size;
-extern int xtrabackup_parallel;
+extern uint xtrabackup_parallel;
extern my_bool xb_close_files;
extern const char *xtrabackup_compress_alg;
@@ -131,7 +136,6 @@ extern my_bool opt_galera_info;
extern my_bool opt_slave_info;
extern my_bool opt_no_lock;
extern my_bool opt_safe_slave_backup;
-extern my_bool opt_rsync;
extern my_bool opt_force_non_empty_dirs;
extern my_bool opt_noversioncheck;
extern my_bool opt_no_backup_locks;
@@ -288,15 +292,40 @@ fil_file_readdir_next_file(
os_file_stat_t* info); /*!< in/out: buffer where the
info is returned */
-#ifndef DBUG_OFF
-#include <fil0fil.h>
-extern void dbug_mariabackup_event(const char *event,
- const fil_space_t::name_type key);
+const char *convert_dst(const char *dst);
-#define DBUG_MARIABACKUP_EVENT(A, B) \
- DBUG_EXECUTE_IF("mariabackup_events", dbug_mariabackup_event(A, B);)
-#else
-#define DBUG_MARIABACKUP_EVENT(A, B) /* empty */
-#endif // DBUG_OFF
+std::string get_table_version_from_image(const std::vector<uchar> &frm_image);
+std::pair<bool, legacy_db_type>
+ get_table_engine_from_image(const std::vector<uchar> &frm_image);
+std::string read_table_version_id(File file);
+
+std::string convert_tablename_to_filepath(
+ const char *data_dir_path, const std::string &db, const std::string &table);
+
+std::tuple<std::string, std::string, std::string>
+convert_filepath_to_tablename(const char *filepath);
+
+typedef std::string table_key_t;
+
+inline table_key_t table_key(const std::string &db, const std::string &table) {
+ return std::string(db).append(".").append(table);
+};
+
+inline table_key_t table_key(const char *db, const char *table) {
+ return std::string(db).append(".").append(table);
+};
+
+typedef std::function<void(std::string, std::string, std::string)>
+ post_copy_table_hook_t;
+
+my_bool
+check_if_skip_table(
+/******************/
+ const char* name); /*!< in: path to the table */
+
+bool is_log_table(const char *dbname, const char *tablename);
+bool is_stats_table(const char *dbname, const char *tablename);
+extern my_bool xtrabackup_copy_back;
+extern my_bool xtrabackup_move_back;
#endif /* XB_XTRABACKUP_H */
diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt
index 271e76b8..e3f8da21 100644
--- a/extra/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/CMakeLists.txt
@@ -1,86 +1,57 @@
IF(MSVC_INTEL)
PROJECT(wolfssl C ASM_MASM)
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
- PROJECT(wolfssl C ASM)
+ PROJECT(wolfssl C ASM)
ELSE()
PROJECT(wolfssl C)
ENDIF()
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
-IF(MSVC_INTEL)
+IF(MSVC_INTEL AND NOT (CMAKE_C_COMPILER_ID MATCHES Clang))
SET(WOLFSSL_INTELASM ON)
- SET(WOLFSSL_X86_64_BUILD 1)
SET(HAVE_INTEL_RDSEED 1)
SET(HAVE_INTEL_RDRAND 1)
-ELSEIF(CMAKE_ASM_COMPILER_ID MATCHES "Clang" AND CMAKE_VERSION VERSION_LESS 3.16)
-
- # WolfSSL 5.5.4 bug workaround below does not work, due to some CMake bug
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")
+ ELSEIF(WITH_MSAN)
+ MESSAGE_ONCE(MSAN_CANT_HANDLE_IT "Disable Intel assembly for WolfSSL - MSAN can't handle it")
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)
+ 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)
+ 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()
- 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)
+SET(WOLFCRYPT_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/wolfcrypt/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)
-
+ADD_DEFINITIONS(-DWOLFSSL_SP_4096)
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()
+INCLUDE_DIRECTORIES(${SSL_INCLUDE_DIRS})
-SET(WOLFCRYPT_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/wolfcrypt/src)
-SET(WOLFCRYPT_SOURCES
+add_library(wolfssl STATIC
+${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
${WOLFCRYPT_SRCDIR}/aes.c
${WOLFCRYPT_SRCDIR}/arc4.c
${WOLFCRYPT_SRCDIR}/asn.c
@@ -110,69 +81,56 @@ ${WOLFCRYPT_SRCDIR}/wc_encrypt.c
${WOLFCRYPT_SRCDIR}/hash.c
${WOLFCRYPT_SRCDIR}/wolfmath.c
${WOLFCRYPT_SRCDIR}/kdf.c
+${WOLFCRYPT_SRCDIR}/sp_int.c
+${WOLFCRYPT_SRCDIR}/sp_c32.c
+${WOLFCRYPT_SRCDIR}/sp_c64.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
- ${WOLFCRYPT_SRCDIR}/aes_gcm_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
+# Optimizations, assembly
+if(WOLFSSL_INTELASM)
+ set(WOLFSSL_X86_64_BUILD 1)
+ set(WOLFSSL_SP_X86_64 1)
+ set(WOLFSSL_SP_X86_64_ASM 1)
+ set(WOLFSSL_AESNI 1)
+ target_sources(wolfssl PRIVATE
+ ${WOLFCRYPT_SRCDIR}/cpuid.c
+ ${WOLFCRYPT_SRCDIR}/sp_x86_64.c
+ )
+ if(MSVC_INTEL)
+ target_sources(wolfssl PRIVATE
+ ${WOLFCRYPT_SRCDIR}/aes_asm.asm
+ ${WOLFCRYPT_SRCDIR}/aes_gcm_asm.asm
+ ${WOLFCRYPT_SRCDIR}/sp_x86_64_asm.asm
+ )
+ target_compile_options(wolfssl PRIVATE
+ $<$<COMPILE_LANG_AND_ID:C,Clang>:-maes -msse4.2 -mpclmul -mrdrnd -mrdseed>
+ $<$<COMPILE_LANGUAGE:ASM_MASM>:/Zi>
+ )
+ else()
+ set(USE_INTEL_SPEEDUP 1)
+ target_sources(wolfssl PRIVATE
${WOLFCRYPT_SRCDIR}/aes_asm.S
${WOLFCRYPT_SRCDIR}/aes_gcm_asm.S
${WOLFCRYPT_SRCDIR}/chacha_asm.S
${WOLFCRYPT_SRCDIR}/poly1305_asm.S
${WOLFCRYPT_SRCDIR}/sha512_asm.S
- ${WOLFCRYPT_SRCDIR}/sha256_asm.S)
- ADD_DEFINITIONS(-maes -msse4.2 -mpclmul)
- # WolfSSL 5.5.4 bug - user_settings.h not included into aes_asm.S
- SET_PROPERTY(SOURCE ${WOLFCRYPT_SRCDIR}/aes_asm.S APPEND PROPERTY COMPILE_OPTIONS "-DWOLFSSL_X86_64_BUILD")
- ENDIF()
-ENDIF()
+ ${WOLFCRYPT_SRCDIR}/sha256_asm.S
+ ${WOLFCRYPT_SRCDIR}/sp_x86_64_asm.S
+ )
+ target_compile_options(wolfssl PRIVATE -maes -msse4.2 -mpclmul)
+ # Workaround 5.5.4 bug (user_settings.h not included into aes_asm.S)
+ set_property(SOURCE ${WOLFCRYPT_SRCDIR}/aes_asm.S APPEND PROPERTY COMPILE_OPTIONS "-DWOLFSSL_X86_64_BUILD")
+ endif()
+endif()
+
+# Silence some warnings
+if(MSVC)
+ # truncation warnings
+ target_compile_options(wolfssl PRIVATE $<$<COMPILE_LANGUAGE:C>:/wd4244>)
+ if(CMAKE_C_COMPILER_ID MATCHES Clang)
+ target_compile_options(wolfssl PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wno-incompatible-function-pointer-types>)
+ 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
index baa64fcd..489118b3 100644
--- a/extra/wolfssl/user_settings.h.in
+++ b/extra/wolfssl/user_settings.h.in
@@ -21,6 +21,7 @@
#define HAVE_AESGCM
#define HAVE_CHACHA
#define HAVE_POLY1305
+#define HAVE_THREAD_LS
#define WOLFSSL_AES_COUNTER
#define NO_WOLFSSL_STUB
#define OPENSSL_ALL
@@ -51,20 +52,19 @@
#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
+#define WOLFSSL_SP_MATH_ALL
+#define WOLFSSL_HAVE_SP_RSA
+#ifndef WOLFSSL_SP_4096
+#define WOLFSSL_SP_4096
+#endif
+
#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
+#cmakedefine WOLFSSL_SP_X86_64
+#cmakedefine WOLFSSL_SP_X86_64_ASM
#endif /* WOLFSSL_USER_SETTINGS_H */
diff --git a/extra/wolfssl/wolfssl/.github/workflows/async.yml b/extra/wolfssl/wolfssl/.github/workflows/async.yml
index 84eb4c58..36f50265 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/async.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/async.yml
@@ -18,7 +18,7 @@ jobs:
# This should be a safe limit for the tests to run.
timeout-minutes: 6
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
name: Checkout wolfSSL
- name: Test wolfSSL async
diff --git a/extra/wolfssl/wolfssl/.github/workflows/curl.yml b/extra/wolfssl/wolfssl/.github/workflows/curl.yml
index fe6350e7..69840eb6 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/curl.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/curl.yml
@@ -18,11 +18,11 @@ jobs:
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-curl
path: build-dir
- retention-days: 1
+ retention-days: 5
test_curl:
name: ${{ matrix.curl_ref }}
@@ -38,11 +38,11 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
- sudo apt-get install nghttp2
+ sudo apt-get install nghttp2 libpsl5 libpsl-dev
sudo pip install impacket
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-curl
path: build-dir
diff --git a/extra/wolfssl/wolfssl/.github/workflows/docker-Espressif.yml b/extra/wolfssl/wolfssl/.github/workflows/docker-Espressif.yml
index 9b9b9be2..4990e928 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/docker-Espressif.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/docker-Espressif.yml
@@ -11,7 +11,7 @@ jobs:
container:
image: espressif/idf:latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
espressif_v4_4:
@@ -20,7 +20,7 @@ jobs:
container:
image: espressif/idf:release-v4.4
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
espressif_v5_0:
@@ -29,6 +29,6 @@ jobs:
container:
image: espressif/idf:release-v5.0
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Initialize Espressif IDE and build examples
run: . /opt/esp/idf/export.sh; IDE/Espressif/ESP-IDF/compileAllExamples.sh
diff --git a/extra/wolfssl/wolfssl/.github/workflows/docker-OpenWrt.yml b/extra/wolfssl/wolfssl/.github/workflows/docker-OpenWrt.yml
index aa827895..3c348b62 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/docker-OpenWrt.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/docker-OpenWrt.yml
@@ -16,15 +16,15 @@ jobs:
steps:
- name: Install required tools
run: apk add argp-standalone asciidoc bash bc binutils bzip2 cdrkit coreutils diffutils elfutils-dev findutils flex musl-fts-dev g++ gawk gcc gettext git grep intltool libxslt linux-headers make musl-libintl musl-obstack-dev ncurses-dev openssl-dev patch perl python3-dev rsync tar unzip util-linux wget zlib-dev autoconf automake libtool
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Compile libwolfssl.so
run: ./autogen.sh && ./configure --enable-all && make
- name: Upload libwolfssl.so
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: openwrt-libwolfssl.so
path: src/.libs/libwolfssl.so
- retention-days: 1
+ retention-days: 5
compile_container:
name: Compile container
runs-on: ubuntu-latest
@@ -34,16 +34,16 @@ jobs:
strategy:
fail-fast: false
matrix:
- release: [ "22.03-SNAPSHOT", "21.02-SNAPSHOT" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
+ release: [ "22.03.6", "21.02.7" ] # some other versions: 21.02.0 21.02.5 22.03.0 22.03.3 snapshot
steps:
- - uses: actions/checkout@v3
- - uses: docker/setup-buildx-action@v2
- - uses: actions/download-artifact@v3
+ - uses: actions/checkout@v4
+ - uses: docker/setup-buildx-action@v3
+ - uses: actions/download-artifact@v4
with:
name: openwrt-libwolfssl.so
path: Docker/OpenWrt/.
- name: Build but dont push
- uses: docker/build-push-action@v3
+ uses: docker/build-push-action@v5
with:
context: Docker/OpenWrt
platforms: linux/amd64
diff --git a/extra/wolfssl/wolfssl/.github/workflows/haproxy.yml b/extra/wolfssl/wolfssl/.github/workflows/haproxy.yml
index 54a52b8c..9c7047bc 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/haproxy.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/haproxy.yml
@@ -21,7 +21,7 @@ jobs:
install: true
- name: Checkout VTest
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: vtest/VTest
path: VTest
@@ -32,7 +32,7 @@ jobs:
run: make FLAGS='-O2 -s -Wall'
- name: Checkout HaProxy
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: haproxy/haproxy
path: haproxy
diff --git a/extra/wolfssl/wolfssl/.github/workflows/hitch.yml b/extra/wolfssl/wolfssl/.github/workflows/hitch.yml
index a7f745db..13b933fd 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/hitch.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/hitch.yml
@@ -19,11 +19,11 @@ jobs:
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-hitch
path: build-dir
- retention-days: 1
+ retention-days: 5
hitch_check:
strategy:
@@ -41,13 +41,13 @@ jobs:
needs: build_wolfssl
steps:
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-hitch
path: build-dir
- name: Checkout OSP
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
@@ -59,7 +59,7 @@ jobs:
sudo apt-get install -y libev-dev libssl-dev automake python3-docutils flex bison pkg-config make
- name: Checkout hitch
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: varnish/hitch
ref: 1.7.3
diff --git a/extra/wolfssl/wolfssl/.github/workflows/hostap.yml b/extra/wolfssl/wolfssl/.github/workflows/hostap.yml
index 84ea1009..187c735b 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/hostap.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/hostap.yml
@@ -40,11 +40,11 @@ jobs:
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build_id }}
path: build-dir
- retention-days: 1
+ retention-days: 5
# Build wpa_supplicant with wolfSSL and hostapd with OpenSSL and interop.
hostap_test:
@@ -113,7 +113,7 @@ jobs:
echo Our job run ID is $SHA_SUM
- name: Checkout wolfSSL
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: wolfssl
@@ -140,7 +140,7 @@ jobs:
echo "hostap_debug_flags=-d" >> $GITHUB_ENV
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: ${{ matrix.config.build_id }}
path: build-dir
@@ -170,7 +170,7 @@ jobs:
sudo rmmod mac80211_hwsim
- name: Checkout hostap
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: julek-wolfssl/hostap-mirror
path: hostap
@@ -185,7 +185,7 @@ jobs:
- if: ${{ matrix.config.osp_ref }}
name: Checkout OSP
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
@@ -275,7 +275,7 @@ jobs:
- name: Upload failure logs
if: ${{ failure() && steps.testing.outcome == 'failure' }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: hostap-logs-${{ env.our_job_run_id }}
path: hostap/tests/hwsim/logs.zip
diff --git a/extra/wolfssl/wolfssl/.github/workflows/krb5.yml b/extra/wolfssl/wolfssl/.github/workflows/krb5.yml
index f03237c8..0022d64d 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/krb5.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/krb5.yml
@@ -11,19 +11,23 @@ jobs:
# This should be a safe limit for the tests to run.
timeout-minutes: 5
steps:
+ - name: workaround high-entropy ASLR
+ # not needed after either an update to llvm or runner is done
+ run: sudo sysctl vm.mmap_rnd_bits=28
+
- name: Build wolfSSL
uses: wolfSSL/actions-build-autotools-project@v1
with:
path: wolfssl
- configure: --enable-krb CFLAGS='-fsanitize=address'
+ configure: --enable-krb CC='gcc -fsanitize=address'
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-krb5
path: build-dir
- retention-days: 1
+ retention-days: 5
krb5_check:
strategy:
@@ -38,19 +42,19 @@ jobs:
needs: build_wolfssl
steps:
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-krb5
path: build-dir
- name: Checkout OSP
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
- name: Checkout krb5
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: krb5/krb5
ref: krb5-${{ matrix.ref }}-final
@@ -61,6 +65,10 @@ jobs:
run: |
patch -p1 < $GITHUB_WORKSPACE/osp/krb5/Patch-for-Kerberos-5-${{ matrix.ref }}.patch
+ - name: workaround high-entropy ASLR
+ # not needed after either an update to llvm or runner is done
+ run: sudo sysctl vm.mmap_rnd_bits=28
+
- name: Build krb5
working-directory: ./krb5/src
run: |
diff --git a/extra/wolfssl/wolfssl/.github/workflows/libssh2.yml b/extra/wolfssl/wolfssl/.github/workflows/libssh2.yml
new file mode 100644
index 00000000..dd9d50e6
--- /dev/null
+++ b/extra/wolfssl/wolfssl/.github/workflows/libssh2.yml
@@ -0,0 +1,58 @@
+name: libssh2 Tests
+
+on:
+ workflow_call:
+
+jobs:
+ build_wolfssl:
+ name: Build wolfSSL
+ # Just to keep it the same as the testing target
+ runs-on: ubuntu-latest
+ # This should be a safe limit for the tests to run.
+ timeout-minutes: 4
+ steps:
+ - name: Build wolfSSL
+ uses: wolfSSL/actions-build-autotools-project@v1
+ with:
+ path: wolfssl
+ configure: --enable-all
+ check: false # config is already tested in many other PRB's
+ install: true
+
+ - name: Upload built lib
+ uses: actions/upload-artifact@v4
+ with:
+ name: wolf-install-libssh2
+ path: build-dir
+ retention-days: 5
+
+ libssh2_check:
+ strategy:
+ fail-fast: false
+ matrix:
+ # List of releases to test
+ ref: [ 1.11.0 ]
+ name: ${{ matrix.ref }}
+ runs-on: ubuntu-latest
+ # This should be a safe limit for the tests to run.
+ timeout-minutes: 8
+ needs: build_wolfssl
+ steps:
+ - name: Download lib
+ uses: actions/download-artifact@v4
+ with:
+ name: wolf-install-libssh2
+ path: build-dir
+
+ - name: Build and test libssh2
+ uses: wolfSSL/actions-build-autotools-project@v1
+ with:
+ repository: libssh2/libssh2
+ ref: libssh2-${{ matrix.ref }}
+ path: libssh2
+ configure: --with-crypto=wolfssl --with-libwolfssl-prefix=$GITHUB_WORKSPACE/build-dir
+ check: true
+
+ - name: Confirm libssh2 built with wolfSSL
+ working-directory: ./libssh2
+ run: ldd src/.libs/libssh2.so | grep wolfssl
diff --git a/extra/wolfssl/wolfssl/.github/workflows/main.yml b/extra/wolfssl/wolfssl/.github/workflows/main.yml
index b1e63a32..4579eaab 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/main.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/main.yml
@@ -43,5 +43,10 @@ jobs:
memcached:
uses: ./.github/workflows/memcached.yml
# TODO: Currently this test fails. Enable it once it becomes passing.
+# libssh2:
+# uses: ./.github/workflows/libssh2.yml
+ openssh:
+ uses: ./.github/workflows/openssh.yml
+# TODO: Currently this test fails. Enable it once it becomes passing.
# haproxy:
# uses: ./.github/workflows/haproxy.yml
diff --git a/extra/wolfssl/wolfssl/.github/workflows/memcached.yml b/extra/wolfssl/wolfssl/.github/workflows/memcached.yml
index 9a4c8131..fde37018 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/memcached.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/memcached.yml
@@ -20,11 +20,11 @@ jobs:
run: cp wolfssl/.github/workflows/memcached.sh build-dir/bin
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-memcached
path: build-dir
- retention-days: 1
+ retention-days: 5
memcached_check:
strategy:
@@ -38,13 +38,13 @@ jobs:
needs: build_wolfssl
steps:
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-memcached
path: build-dir
- name: Checkout OSP
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
@@ -56,7 +56,7 @@ jobs:
sudo apt-get install -y libevent-dev libevent-2.1-7 automake pkg-config make libio-socket-ssl-perl
- name: Checkout memcached
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: memcached/memcached
ref: 1.6.22
diff --git a/extra/wolfssl/wolfssl/.github/workflows/multi-arch.yml b/extra/wolfssl/wolfssl/.github/workflows/multi-arch.yml
index e5b9859a..031ca802 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/multi-arch.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/multi-arch.yml
@@ -35,7 +35,7 @@ jobs:
run: |
sudo apt update
sudo apt install -y crossbuild-essential-${{ matrix.ARCH }} qemu-user
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Build
env:
CC: ${{ matrix.CC }}
diff --git a/extra/wolfssl/wolfssl/.github/workflows/multi-compiler.yml b/extra/wolfssl/wolfssl/.github/workflows/multi-compiler.yml
index 48512df2..b63fd0f2 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/multi-compiler.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/multi-compiler.yml
@@ -41,7 +41,7 @@ jobs:
# This should be a safe limit for the tests to run.
timeout-minutes: 4
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Build
env:
CC: ${{ matrix.CC }}
diff --git a/extra/wolfssl/wolfssl/.github/workflows/nginx.yml b/extra/wolfssl/wolfssl/.github/workflows/nginx.yml
index 05f2ed7c..9f9f81ec 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/nginx.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/nginx.yml
@@ -25,11 +25,11 @@ jobs:
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-nginx
path: build-dir
- retention-days: 1
+ retention-days: 5
nginx_check:
strategy:
@@ -99,7 +99,7 @@ jobs:
needs: build_wolfssl
steps:
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-nginx
path: build-dir
@@ -109,13 +109,13 @@ jobs:
sudo cpan -iT Proc::Find Net::SSLeay IO::Socket::SSL
- name: Checkout wolfssl-nginx
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: wolfssl/wolfssl-nginx
path: wolfssl-nginx
- name: Checkout nginx
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: nginx/nginx
path: nginx
@@ -131,7 +131,7 @@ jobs:
run: patch -p1 < ../wolfssl-nginx/nginx-${{ matrix.ref }}-wolfssl-debug.patch
- name: Checkout nginx-tests
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: nginx/nginx-tests
path: nginx-tests
@@ -174,6 +174,10 @@ jobs:
run: |
echo "nginx_c_flags=-O0" >> $GITHUB_ENV
+ - name: workaround high-entropy ASLR
+ # not needed after either an update to llvm or runner is done
+ run: sudo sysctl vm.mmap_rnd_bits=28
+
- name: Build nginx with sanitizer
working-directory: nginx
run: |
@@ -203,4 +207,4 @@ jobs:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib \
TMPDIR=$GITHUB_WORKSPACE TEST_NGINX_BINARY=../nginx/objs/nginx \
prove ${{ matrix.sanitize-ok }}
- \ No newline at end of file
+
diff --git a/extra/wolfssl/wolfssl/.github/workflows/openssh.yml b/extra/wolfssl/wolfssl/.github/workflows/openssh.yml
new file mode 100644
index 00000000..02838773
--- /dev/null
+++ b/extra/wolfssl/wolfssl/.github/workflows/openssh.yml
@@ -0,0 +1,68 @@
+name: openssh Tests
+
+on:
+ workflow_call:
+
+jobs:
+ build_wolfssl:
+ name: Build wolfSSL
+ # Just to keep it the same as the testing target
+ runs-on: ubuntu-latest
+ # This should be a safe limit for the tests to run.
+ timeout-minutes: 4
+ steps:
+ - name: Build wolfSSL
+ uses: wolfSSL/actions-build-autotools-project@v1
+ with:
+ path: wolfssl
+ configure: >-
+ --enable-openssh --enable-dsa --with-max-rsa-bits=8192
+ --enable-intelasm --enable-sp-asm
+ install: true
+
+ - name: Upload built lib
+ uses: actions/upload-artifact@v4
+ with:
+ name: wolf-install-openssh
+ path: build-dir
+ retention-days: 5
+
+ openssh_check:
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - git_ref: 'V_9_6_P1'
+ osp_ver: '9.6'
+ name: ${{ matrix.ref }}
+ runs-on: ubuntu-latest
+ needs: build_wolfssl
+ steps:
+ - name: Download lib
+ uses: actions/download-artifact@v4
+ with:
+ name: wolf-install-openssh
+ path: build-dir
+
+ - name: Checkout OSP
+ uses: actions/checkout@v4
+ with:
+ repository: wolfssl/osp
+ path: osp
+
+ - name: Build and test openssh
+ uses: wolfSSL/actions-build-autotools-project@v1
+ with:
+ repository: openssh/openssh-portable
+ ref: ${{ matrix.git_ref }}
+ path: openssh
+ patch-file: $GITHUB_WORKSPACE/osp/openssh-patches/openssh-${{ matrix.osp_ver }}.patch
+ configure: --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-rpath=-Wl,-rpath=
+ check: false
+
+ # make tests take >20 minutes. Consider limiting?
+ - name: Run tests
+ working-directory: ./openssh
+ run: |
+ # Run all the tests except (t-exec) as it takes too long
+ make file-tests interop-tests extra-tests unit
diff --git a/extra/wolfssl/wolfssl/.github/workflows/openvpn.yml b/extra/wolfssl/wolfssl/.github/workflows/openvpn.yml
index 10f206ff..314f9a4e 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/openvpn.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/openvpn.yml
@@ -19,18 +19,18 @@ jobs:
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-openvpn
path: build-dir
- retention-days: 1
+ retention-days: 5
openvpn_check:
strategy:
fail-fast: false
matrix:
# List of refs to test
- ref: [ master, release/2.6, v2.6.0 ]
+ ref: [ release/2.6, v2.6.0, master ]
name: ${{ matrix.ref }}
runs-on: ubuntu-latest
# This should be a safe limit for the tests to run.
@@ -38,7 +38,7 @@ jobs:
needs: build_wolfssl
steps:
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-openvpn
path: build-dir
@@ -50,10 +50,14 @@ jobs:
linux-libc-dev man2html libcmocka-dev python3-docutils \
libtool automake autoconf libnl-genl-3-dev libnl-genl-3-200
+ - name: workaround high-entropy ASLR
+ # not needed after either an update to llvm or runner is done
+ run: sudo sysctl vm.mmap_rnd_bits=28
+
- if: ${{ matrix.ref != 'master' }}
name: Build and test openvpn with fsanitize
run: |
- echo 'extra_c_flags=CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
+ echo 'extra_c_flags=CC="gcc -fsanitize=address" CFLAGS="-fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
- name: Build and test openvpn
uses: wolfSSL/actions-build-autotools-project@v1
diff --git a/extra/wolfssl/wolfssl/.github/workflows/os-check.yml b/extra/wolfssl/wolfssl/.github/workflows/os-check.yml
index 08134c4a..9846efaa 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/os-check.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/os-check.yml
@@ -67,6 +67,7 @@ jobs:
'examples/configs/user_settings_min_ecc.h',
'examples/configs/user_settings_wolfboot_keytools.h',
'examples/configs/user_settings_wolftpm.h',
+ 'examples/configs/user_settings_tls12.h',
]
name: make user_setting.h (testwolfcrypt only)
runs-on: ${{ matrix.os }}
@@ -94,7 +95,7 @@ jobs:
# This should be a safe limit for the tests to run.
timeout-minutes: 14
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- if: ${{ matrix.os == 'macos-latest' }}
run: brew install automake libtool
- run: ./autogen.sh
@@ -121,10 +122,10 @@ jobs:
BUILD_CONFIGURATION: Release
BUILD_PLATFORM: x64
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Add MSBuild to PATH
- uses: microsoft/setup-msbuild@v1
+ uses: microsoft/setup-msbuild@v2
- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
diff --git a/extra/wolfssl/wolfssl/.github/workflows/packaging.yml b/extra/wolfssl/wolfssl/.github/workflows/packaging.yml
index 42e21359..50f2a086 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/packaging.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/packaging.yml
@@ -11,7 +11,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout wolfSSL
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Configure wolfSSL
run: |
diff --git a/extra/wolfssl/wolfssl/.github/workflows/stunnel.yml b/extra/wolfssl/wolfssl/.github/workflows/stunnel.yml
index ac25126d..a93a0477 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/stunnel.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/stunnel.yml
@@ -19,11 +19,11 @@ jobs:
install: true
- name: Upload built lib
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: wolf-install-stunnel
path: build-dir
- retention-days: 1
+ retention-days: 5
stunnel_check:
strategy:
@@ -38,13 +38,13 @@ jobs:
needs: build_wolfssl
steps:
- name: Download lib
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: wolf-install-stunnel
path: build-dir
- name: Checkout OSP
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
repository: wolfssl/osp
path: osp
diff --git a/extra/wolfssl/wolfssl/.github/workflows/zephyr.yml b/extra/wolfssl/wolfssl/.github/workflows/zephyr.yml
index decdba25..c7f1bc8e 100644
--- a/extra/wolfssl/wolfssl/.github/workflows/zephyr.yml
+++ b/extra/wolfssl/wolfssl/.github/workflows/zephyr.yml
@@ -64,10 +64,10 @@ jobs:
- name: Install zephyr SDK
run: |
- wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${{ matrix.config.zephyr-sdk }}/zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64.tar.xz
- tar xf zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64.tar.xz
+ wget -q https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${{ matrix.config.zephyr-sdk }}/zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64_minimal.tar.xz
+ tar xf zephyr-sdk-${{ matrix.config.zephyr-sdk }}_linux-x86_64_minimal.tar.xz
cd zephyr-sdk-${{ matrix.config.zephyr-sdk }}
- ./setup.sh -h -c
+ ./setup.sh -h -c -t x86_64-zephyr-elf
- name: Run wolfssl test
id: wolfssl-test
@@ -97,7 +97,7 @@ jobs:
- name: Upload failure logs
if: ${{ failure() && (steps.wolfssl-test.outcome == 'failure' || steps.wolfssl-tls-sock.outcome == 'failure' || steps.wolfssl-tls-thread.outcome == 'failure') }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: zephyr-client-test-logs
path: logs.zip
diff --git a/extra/wolfssl/wolfssl/.gitignore b/extra/wolfssl/wolfssl/.gitignore
index 5adfbf31..5bd31033 100644
--- a/extra/wolfssl/wolfssl/.gitignore
+++ b/extra/wolfssl/wolfssl/.gitignore
@@ -82,16 +82,19 @@ snifftest
output
mcapi/test
testsuite/testsuite
-tests/unit
testsuite/testsuite.test
+testsuite/*.der
+testsuite/*.pem
+testsuite/*.raw
+testsuite/*.obj
+testsuite/*.pdb
+testsuite/*.idb
+tests/unit
tests/unit.test
tests/bio_write_test.txt
tests/test-log-dump-to-file.txt
tests/cert_cache.tmp
test-write-dhparams.pem
-testsuite/*.der
-testsuite/*.pem
-testsuite/*.raw
cert.der
cert.pem
certecc.der
@@ -286,23 +289,6 @@ mqx/wolfcrypt_benchmark/.settings
mqx/wolfcrypt_benchmark/.cwGeneratedFileSetLog
mqx/wolfcrypt_benchmark/SaAnalysispointsManager.apconfig
-# User Crypto example build
-wolfcrypt/user-crypto/aclocal.m4
-wolfcrypt/user-crypto/config.guess
-wolfcrypt/user-crypto/autom4te.cache
-wolfcrypt/user-crypto/config.log
-wolfcrypt/user-crypto/config.status
-wolfcrypt/user-crypto/config.sub
-wolfcrypt/user-crypto/depcomp
-wolfcrypt/user-crypto/install-sh
-wolfcrypt/user-crypto/libtool
-wolfcrypt/user-crypto/ltmain.sh
-wolfcrypt/user-crypto/m4
-wolfcrypt/user-crypto/missing
-wolfcrypt/user-crypto/Makefile.in
-wolfcrypt/user-crypto/lib/libusercrypto.*
-*.hzs
-
# wolfSSL CSharp wrapper
wrapper/CSharp/x64/
@@ -339,6 +325,10 @@ wolfcrypt/src/port/intel/qat_test
# Arduino Generated Files
/IDE/ARDUINO/wolfSSL
scripts/memtest.txt
+/IDE/ARDUINO/Arduino_README_prepend.md.tmp
+/IDE/ARDUINO/library.properties.tmp
+/IDE/ARDUINO/library.properties.tmp.backup
+/IDE/ARDUINO/PREPENDED_README.md
# Doxygen generated files
doc/doxygen_warnings
@@ -415,7 +405,7 @@ XXX-fips-test
# Generated user_settings_asm.h.
user_settings_asm.h
-# VisualGD
+# VisualGDB
**/.visualgdb
# Espressif sdk config default should be saved in sdkconfig.defaults
@@ -423,6 +413,12 @@ user_settings_asm.h
/IDE/Espressif/**/sdkconfig
/IDE/Espressif/**/sdkconfig.old
+# MPLAB
+/IDE/MPLABX16/wolfssl.X/dist/default/
+/IDE/MPLABX16/wolfssl.X/.generated_files
+/IDE/MPLABX16/wolfcrypt_test.X/dist/default/
+/IDE/MPLABX16/wolfcrypt_test.X/.generated_files
+
# auto-created CMake backups
**/CMakeLists.txt.old
diff --git a/extra/wolfssl/wolfssl/CMakeLists.txt b/extra/wolfssl/wolfssl/CMakeLists.txt
index 337b0d61..bf6bc752 100644
--- a/extra/wolfssl/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/CMakeLists.txt
@@ -28,7 +28,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
You must delete them, or cmake will refuse to work.")
endif()
-project(wolfssl VERSION 5.6.6 LANGUAGES C ASM)
+project(wolfssl VERSION 5.7.0 LANGUAGES C ASM)
# Set WOLFSSL_ROOT if not already defined
if ("${WOLFSSL_ROOT}" STREQUAL "")
@@ -42,16 +42,19 @@ else()
endif()
# shared library versioning
-# increment if interfaces have been added, removed or changed
-set(LIBTOOL_CURRENT 42)
-# increment if source code has changed set to zero if current is incremented
-set(LIBTOOL_REVISION 0)
-# increment if interfaces have been added set to zero if interfaces have been
-# removed or changed
-set(LIBTOOL_AGE 0)
+# increment if interfaces have been removed or changed
+set(WOLFSSL_LIBRARY_VERSION_FIRST 42)
-math(EXPR LIBTOOL_SO_VERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}")
-set(LIBTOOL_FULL_VERSION ${LIBTOOL_SO_VERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION})
+# increment if interfaces have been added
+# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
+set(WOLFSSL_LIBRARY_VERSION_SECOND 1)
+
+# increment if source code has changed
+# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented or
+# WOLFSSL_LIBRARY_VERSION_SECOND is incremented
+set(WOLFSSL_LIBRARY_VERSION_THIRD 0)
+
+set(LIBTOOL_FULL_VERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}.${WOLFSSL_LIBRARY_VERSION_SECOND}.${WOLFSSL_LIBRARY_VERSION_THIRD})
set(WOLFSSL_DEFINITIONS)
set(WOLFSSL_LINK_LIBS)
@@ -130,9 +133,15 @@ if(HAVE___UINT128_T)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE___UINT128_T")
endif()
-include(TestBigEndian)
-
-test_big_endian(WORDS_BIGENDIAN)
+if(CMAKE_VERSION VERSION_LESS "3.20")
+ # TestBigEndian was deprecated in 3.20
+ include(TestBigEndian)
+ test_big_endian(IS_BIG_ENDIAN)
+ set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
+ if(IS_BIG_ENDIAN)
+ set(CMAKE_C_BYTE_ORDER "BIG_ENDIAN")
+ endif()
+endif()
# Thread local storage
include(CheckCSourceCompiles)
@@ -215,6 +224,8 @@ if(WOLFSSL_REPRODUCIBLE_BUILD)
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -D <TARGET>")
endif()
+add_option("WOLFSSL_INSTALL" "Create install target for WolfSSL project" "yes" "yes;no")
+
# Support for forcing 32-bit mode
# TODO: detect platform from other options
add_option("WOLFSSL_32BIT"
@@ -574,7 +585,7 @@ if(WOLFSSL_LEAN_PSK OR (WOLFSSL_LEAN_TLS AND NOT WOLFSSL_TLS13))
override_cache(WOLFSSL_AESGCM "no")
endif()
-if(WOLFSSL_AESGCM AND NOT WORDS_BIGENDIAN)
+if(WOLFSSL_AESGCM AND CMAKE_C_BYTE_ORDER STREQUAL "LITTLE_ENDIAN")
override_cache(WOLFSSL_AESGCM "4bit")
endif()
@@ -1662,17 +1673,14 @@ if(WOLFSSL_FAST_MATH)
list(APPEND WOLFSSL_DEFINITIONS "-DUSE_FAST_MATH")
set(WOLFSSL_SLOWMATH "no")
endif()
-
- if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64|AMD64")
- # Have settings.h set FP_MAX_BITS higher if user didn't set directly
- list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_X86_64_BUILD")
- endif()
endif()
# TODO: - Fast huge math
# Set processor-specific build macros
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64|AMD64")
+ set(WOLFSSL_X86_64_BUILD ON)
+ add_option("WOLFSSL_X86_64_BUILD_ASM" "Build ASM files" "yes" "yes;no")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_X86_64_BUILD")
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "aarch64|arm64")
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_AARCH64_BUILD")
@@ -1753,13 +1761,15 @@ else()
list(APPEND WOLFSSL_DEFINITIONS "-DWC_NO_ASYNC_THREADING")
endif()
-# TODO: - cryptodev
-# - Session export
+# TODO: - Session export
add_option("WOLFSSL_CRYPTOCB"
"Enable crypto callbacks (default: disabled)"
"no" "yes;no")
+add_option("WOLFSSL_PKCALLBACKS"
+ "Enable public key callbacks (default: disabled)"
+ "no" "yes;no")
add_option("WOLFSSL_OLD_NAMES"
"Keep backwards compat with old names (default: enabled)"
@@ -1960,6 +1970,11 @@ if(WOLFSSL_CRYPTOCB)
list(APPEND WOLFSSL_DEFINITIONS "-DWOLF_CRYPTO_CB")
endif()
+# Public Key Callbacks
+if(WOLFSSL_PKCALLBACKS)
+ list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_PK_CALLBACKS")
+endif()
+
if(WOLFSSL_OCSPSTAPLING)
list(APPEND WOLFSSL_DEFINITIONS "-DHAVE_CERTIFICATE_STATUS_REQUEST" "-DHAVE_TLS_EXTENSIONS")
override_cache(WOLFSSL_OCSP "yes")
@@ -2075,7 +2090,7 @@ endif()
# Suppress some warnings about separate compilation, inlining
add_definitions("-DWOLFSSL_IGNORE_FILE_WARN")
# Generate user options header
-message("Generating user options header...")
+message(STATUS "Generating user options header...")
if (${CMAKE_DISABLE_SOURCE_CHANGES})
set(WOLFSSL_BUILD_OUT_OF_TREE_DEFAULT "${CMAKE_DISABLE_SOURCE_CHANGES}")
else()
@@ -2198,7 +2213,7 @@ endif()
set_target_properties(wolfssl
PROPERTIES
- SOVERSION ${LIBTOOL_SO_VERSION}
+ SOVERSION ${WOLFSSL_LIBRARY_VERSION_FIRST}
VERSION ${LIBTOOL_FULL_VERSION}
)
@@ -2516,82 +2531,96 @@ list(JOIN HEADER_EXCLUDE "|" EXCLUDED_HEADERS_REGEX)
string(PREPEND EXCLUDED_HEADERS_REGEX "(")
string(APPEND EXCLUDED_HEADERS_REGEX ")")
-set(INSTALLED_EXAMPLES
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/echoserver/echoserver.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-server.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-client-dtls.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-client.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-server-dtls.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/echoclient/echoclient.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/server/server.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/benchmark/tls_bench.c
- ${CMAKE_CURRENT_SOURCE_DIR}/examples/client/client.c)
-
-# Install the library
-install(TARGETS wolfssl
- EXPORT wolfssl-targets
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib
- RUNTIME DESTINATION bin
- )
-# Install the headers
-install(DIRECTORY ${WOLFSSL_OUTPUT_BASE}/wolfssl/
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wolfssl
- FILES_MATCHING PATTERN "*.h"
- REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE)
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wolfssl
- FILES_MATCHING PATTERN "*.h"
- REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE)
-
-# Install the examples
-install(FILES ${INSTALLED_EXAMPLES}
- DESTINATION ${CMAKE_INSTALL_DOCDIR}/example)
-# Install README.txt and taoCert.txt
-install(FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/doc/README.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/certs/taoCert.txt
- DESTINATION ${CMAKE_INSTALL_DOCDIR})
-# Install the export set
-install(EXPORT wolfssl-targets
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wolfssl
- FILE wolfssl-targets.cmake
- NAMESPACE wolfssl::)
-
-# TODO: Distro build + rules for what to include in the distro.
-# See various include.am files.
-
-set(prefix ${CMAKE_INSTALL_PREFIX})
-set(exec_prefix "\${prefix}")
-set(libdir "\${exec_prefix}/lib")
-set(includedir "\${prefix}/include")
-set(VERSION ${PROJECT_VERSION})
-
-configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-
-include(CMakePackageConfigHelpers)
-configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in
- "${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config.cmake"
- INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/wolfssl"
- NO_SET_AND_CHECK_MACRO
- NO_CHECK_REQUIRED_COMPONENTS_MACRO
-)
+if(WOLFSSL_INSTALL)
+
+ set(INSTALLED_EXAMPLES
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/echoserver/echoserver.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-server.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-client-dtls.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-client.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/sctp/sctp-server-dtls.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/echoclient/echoclient.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/server/server.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/benchmark/tls_bench.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples/client/client.c)
-export(EXPORT wolfssl-targets
- FILE "${CMAKE_CURRENT_BINARY_DIR}/wolfssl-targets.cmake"
- NAMESPACE wolfssl::
-)
-write_basic_package_version_file(
- "${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config-version.cmake"
- VERSION "${wolfssl_VERSION_MAJOR}.${wolfssl_VERSION_MINOR}"
- COMPATIBILITY AnyNewerVersion
-)
+ # Install the library
+ install(TARGETS wolfssl
+ EXPORT wolfssl-targets
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ RUNTIME DESTINATION bin
+ )
+ # Install the headers
+ install(DIRECTORY ${WOLFSSL_OUTPUT_BASE}/wolfssl/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wolfssl
+ FILES_MATCHING PATTERN "*.h"
+ REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE)
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wolfssl
+ FILES_MATCHING PATTERN "*.h"
+ REGEX ${EXCLUDED_HEADERS_REGEX} EXCLUDE)
+
+ # Install the examples
+ install(FILES ${INSTALLED_EXAMPLES}
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/example)
+ # Install README.txt and taoCert.txt
+ install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/doc/README.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/certs/taoCert.txt
+ DESTINATION ${CMAKE_INSTALL_DOCDIR})
+ # Install the export set
+ install(EXPORT wolfssl-targets
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wolfssl
+ FILE wolfssl-targets.cmake
+ NAMESPACE wolfssl::)
+
+ # TODO: Distro build + rules for what to include in the distro.
+ # See various include.am files.
+
+ set(prefix ${CMAKE_INSTALL_PREFIX})
+ set(exec_prefix "\${prefix}")
+ set(libdir "\${exec_prefix}/lib")
+ set(includedir "\${prefix}/include")
+ set(VERSION ${PROJECT_VERSION})
+
+ # Setting libm in Libs.private of wolfssl.pc.
+ # See "Link Libraries" in above about `m` insertion to LINK_LIBRARIES
+ get_target_property(_wolfssl_dep_libs wolfssl LINK_LIBRARIES)
+ list(FIND _wolfssl_dep_libs m _dep_libm)
+ if ("${_dep_libm}" GREATER -1)
+ set(LIBM -lm)
+ else()
+ set(LIBM)
+ endif()
-install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config-version.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wolfssl
-)
+ configure_file(support/wolfssl.pc.in ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/support/wolfssl.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+ include(CMakePackageConfigHelpers)
+ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in
+ "${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config.cmake"
+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/wolfssl"
+ NO_SET_AND_CHECK_MACRO
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO
+ )
+
+ export(EXPORT wolfssl-targets
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/wolfssl-targets.cmake"
+ NAMESPACE wolfssl::
+ )
+
+ write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config-version.cmake"
+ VERSION "${wolfssl_VERSION_MAJOR}.${wolfssl_VERSION_MINOR}"
+ COMPATIBILITY AnyNewerVersion
+ )
+
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/wolfssl-config-version.cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/wolfssl
+ )
+endif()
diff --git a/extra/wolfssl/wolfssl/ChangeLog.md b/extra/wolfssl/wolfssl/ChangeLog.md
index 586adaa4..c3b24757 100644
--- a/extra/wolfssl/wolfssl/ChangeLog.md
+++ b/extra/wolfssl/wolfssl/ChangeLog.md
@@ -1,3 +1,97 @@
+# wolfSSL Release 5.7.0 (Mar 20, 2024)
+
+Release 5.7.0 has been developed according to wolfSSL's development and QA
+process (see link below) and successfully passed the quality criteria.
+https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
+
+NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
+
+NOTE: In future releases, --enable-des3 (which is disabled by default) will be insufficient in itself to enable DES3 in TLS cipher suites. A new option, --enable-des3-tls-suites, will need to be supplied in addition. This option should only be used in backward compatibility scenarios, as it is inherently insecure.
+
+NOTE: This release switches the default ASN.1 parser to the new ASN template code. If the original ASN.1 code is preferred define `WOLFSSL_ASN_ORIGINAL` to use it. See PR #7199.
+
+
+## Vulnerabilities
+* [High] CVE-2024-0901 Potential denial of service and out of bounds read. Affects TLS 1.3 on the server side when accepting a connection from a malicious TLS 1.3 client. If using TLS 1.3 on the server side it is recommended to update the version of wolfSSL used. Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7099
+
+
+* [Med] CVE-2024-1545 Fault Injection vulnerability in RsaPrivateDecryption function that potentially allows an attacker that has access to the same system with a victims process to perform a Rowhammer fault injection. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia)."
+Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7167
+
+
+* [Med] Fault injection attack with EdDSA signature operations. This affects ed25519 sign operations where the system could be susceptible to Rowhammer attacks. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia).
+Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7212
+
+
+## New Feature Additions
+
+* Added --enable-experimental configure flag to gate out features that are currently experimental. Now liboqs, kyber, lms, xmss, and dual-alg-certs require the --enable-experimental flag.
+
+### POST QUANTUM SUPPORT ADDITIONS
+* Experimental framework for using wolfSSL’s XMSS implementation (PR 7161)
+* Experimental framework for using wolfSSL’s LMS implementation (PR 7283)
+* Experimental wolfSSL Kyber implementation and assembly optimizations, enabled with --enable-experimental --enable-kyber (PR 7318)
+* Experimental support for post quantum dual key/signature certificates. A few known issues and sanitizer checks are in progress with this feature. Enabled with the configure flags --enable-experimental --enable-dual-alg-certs (PR 7112)
+* CryptoCb support for PQC algorithms (PR 7110)
+
+### OTHER FEATURE ADDITIONS
+* The Linux kernel module now supports registration of AES-GCM, AES-XTS, AES-CBC, and AES-CFB with the kernel cryptosystem through the new --enable-linuxkm-lkcapi-register option, enabling automatic use of wolfCrypt implementations by the dm-crypt/luks and ESP subsystems. In particular, wolfCrypt AES-XTS with –enable-aesni is faster than the native kernel implementation.
+* CryptoCb hook to one-shot CMAC functions (PR 7059)
+* BER content streaming support for PKCS7_VerifySignedData and sign/encrypt operations (PR 6961 & 7184)
+* IoT-Safe SHA-384 and SHA-512 support (PR 7176)
+* I/O callbacks for content and output with PKCS7 bundle sign/encrypt to reduce peak memory usage (PR 7272)
+* Microchip PIC24 support and example project (PR 7151)
+* AutoSAR shim layer for RNG, SHA256, and AES (PR 7296)
+* wolfSSL_CertManagerUnloadIntermediateCerts API to clear intermediate certs added to certificate store (PR 7245)
+* Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid (PR 7236)
+
+
+## Enhancements and Optimizations
+
+* Remove obsolete user-crypto functionality and Intel IPP support (PR 7097)
+* Support for RSA-PSS signatures with CRL use (PR 7119)
+* Enhancement for AES-GCM use with Xilsecure on Microblaze (PR 7051)
+* Support for crypto cb only build with ECC and NXP CAAM (PR 7269)
+* Improve liboqs integration adding locking and init/cleanup functions (PR 7026)
+* Prevent memory access before clientSession->serverRow and clientSession->serverIdx are sanitized (PR 7096)
+* Enhancements to reproducible build (PR 7267)
+* Update Arduino example TLS Client/Server and improve support for ESP32 (PR 7304 & 7177)
+* XC32 compiler version 4.x compatibility (PR 7128)
+* Porting for build on PlayStation 3 and 4 (PR 7072)
+* Improvements for Espressif use; SHA HW/SW selection and use on ESP32-C2/ESP8684, wolfSSL_NewThread() type, component cmake fix, and update TLS client example for ESP8266 (PR 7081, 7173, 7077, 7148, 7240)
+* Allow crypto callbacks with SHA-1 HW (PR 7087)
+* Update OpenSSH port to version 9.6p1(PR 7203)
+* ARM Thumb2 enhancements, AES-GCM support for GCM_SMALL, alignment fix on key, fix for ASM clobber list (PR 7291,7301,7221)
+* Expand heap hint support for static memory build with more x509 functions (PR 7136)
+* Improving ARMv8 ChaCha20 ASM (alignment) (PR 7182)
+* Unknown extension callback wolfSSL_CertManagerSetUnknownExtCallback added to CertManager (PR 7194)
+* Implement wc_rng_new_ex for use with devID’s with crypto callback (PR 7271)
+* Allow reading 0-RTT data after writing 0.5-RTT data (PR 7102)
+* Send alert on bad PSK binder error (PR 7235)
+* Enhancements to CMake build files for use with cross compiling (PR 7188)
+
+
+## Fixes
+
+* Fix for checking result of MAC verify when no AAD is used with AES-GCM and Xilinx Xilsecure (PR 7051)
+* Fix for Aria sign use (PR 7082)
+* Fix for invalid `dh_ffdhe_test` test case using Intel QuickAssist (PR 7085)
+* Fixes for TI AES and SHA on TM4C with HW acceleration and add full AES GCM and CCM support with TLS (PR 7018)
+* Fixes for STM32 PKA use with ECC (PR 7098)
+* Fixes for TLS 1.3 with crypto callbacks to offload KDF / HMAC operation (PR 7070)
+* Fix include path for FSP 3.5 on Renesas RA6M4 (PR 7101)
+* Siphash x64 asm fix for use with older compilers (PR 7299)
+* Fix for SGX build with SP (PR 7308)
+* Fix to Make it mandatory that the cookie is sent back in new ClientHello when seen in a HelloRetryRequest with (PR 7190)
+* Fix for wrap around behavior with BIO pairs (PR 7169)
+* OCSP fixes for parsing of response correctly when there was a revocation reason and returning correct error value with date checks (PR 7241 & 7255)
+* Fix build with `NO_STDIO_FILESYSTEM` and improve checks for `XGETENV` (PR 7150)
+* Fix for DTLS sequence number and cookie when downgrading DTLS version (PR 7214)
+* Fix for write_dup use with chacha-poly cipher suites (PR 7206)
+* Fix for multiple handshake messages in one record failing with OUT_OF_ORDER_E when downgrading from TLS 1.3 to TLS 1.2 (PR 7141)
+* Fix for AES ECB build with Thumb and alignment (PR 7094)
+* Fix for negotiate handshake until the end in wolfSSL_read/wolfSSL_write if hitting an edge case with want read/write (PR 7237)
+
# wolfSSL Release 5.6.6 (Dec 19, 2023)
Release 5.6.6 has been developed according to wolfSSL's development and QA
diff --git a/extra/wolfssl/wolfssl/Docker/Dockerfile b/extra/wolfssl/wolfssl/Docker/Dockerfile
index 388169e6..b45cff4d 100644
--- a/extra/wolfssl/wolfssl/Docker/Dockerfile
+++ b/extra/wolfssl/wolfssl/Docker/Dockerfile
@@ -3,10 +3,13 @@ FROM $DOCKER_BASE_IMAGE
USER root
+# Set timezone to UTC
+RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
+
ARG DEPS_WOLFSSL="build-essential autoconf libtool clang clang-tools zlib1g-dev libuv1-dev libpam0g-dev valgrind git linux-headers-generic gcc-multilib g++-multilib libpcap-dev bubblewrap gdb iputils-ping lldb bsdmainutils netcat binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu"
ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git"
ARG DEPS_UDP_PROXY="wget libevent-dev"
-ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump"
+ARG DEPS_TESTS="abi-dumper libcurl4-openssl-dev tcpdump libpsl-dev python3-pandas python3-tabulate libnl-genl-3-dev libcap-ng-dev"
ARG DEPS_TOOLS="ccache"
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \
&& apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} ${DEPS_UDP_PROXY} ${DEPS_TESTS} ${DEPS_TOOLS} \
diff --git a/extra/wolfssl/wolfssl/Docker/Dockerfile.cross-compiler b/extra/wolfssl/wolfssl/Docker/Dockerfile.cross-compiler
index a89a9d5b..a9868d38 100644
--- a/extra/wolfssl/wolfssl/Docker/Dockerfile.cross-compiler
+++ b/extra/wolfssl/wolfssl/Docker/Dockerfile.cross-compiler
@@ -3,7 +3,7 @@ FROM $DOCKER_BASE_IMAGE
USER root
-ARG DEPS_TESTING="gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu"
+ARG DEPS_TESTING="gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu"
RUN DEBIAN_FRONTEND=noninteractive apt update \
&& apt install -y ${DEPS_TESTING} \
&& apt clean -y && rm -rf /var/lib/apt/lists/*
diff --git a/extra/wolfssl/wolfssl/Docker/yocto/Dockerfile b/extra/wolfssl/wolfssl/Docker/yocto/Dockerfile
new file mode 100644
index 00000000..5fda38f9
--- /dev/null
+++ b/extra/wolfssl/wolfssl/Docker/yocto/Dockerfile
@@ -0,0 +1,27 @@
+FROM ubuntu
+
+# Set timezone to UTC
+RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
+
+RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales libacl1 vim && apt clean -y && rm -rf /var/lib/apt/lists/*
+RUN locale-gen en_US.UTF-8
+
+# Add in non-root user
+ENV UID_OF_DOCKERUSER 1000
+RUN useradd -m -s /bin/bash -g users -u ${UID_OF_DOCKERUSER} dockerUser
+RUN chown -R dockerUser:users /home/dockerUser && chown dockerUser:users /opt
+
+USER dockerUser
+
+RUN cd /opt && git clone git://git.yoctoproject.org/poky
+WORKDIR /opt/poky
+
+ARG YOCTO_VERSION=kirkstone
+RUN git checkout -t origin/${YOCTO_VERSION} -b ${YOCTO_VERSION} && git pull
+
+RUN git clone --single-branch --branch=${YOCTO_VERSION} https://github.com/wolfSSL/meta-wolfssl.git && \
+ /bin/bash -c "source oe-init-build-env" && \
+ echo 'IMAGE_INSTALL:append = " wolfssl wolfclu wolfssh wolfmqtt wolftpm wolfclu "' >> /opt/poky/build/conf/local.conf && \
+ sed -i '/\/opt\/poky\/meta-poky \\/a \\t/opt/poky/meta-wolfssl \\' /opt/poky/build/conf/bblayers.conf
+
+RUN /bin/bash -c "source oe-init-build-env && bitbake core-image-minimal"
diff --git a/extra/wolfssl/wolfssl/Docker/yocto/buildAndPush.sh b/extra/wolfssl/wolfssl/Docker/yocto/buildAndPush.sh
new file mode 100755
index 00000000..d76a603e
--- /dev/null
+++ b/extra/wolfssl/wolfssl/Docker/yocto/buildAndPush.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Assume we're in wolfssl/Docker/yocto
+WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/../..; pwd)
+
+DOCKER_BUILD_OPTIONS="$1"
+if [ "${DOCKER_BASE_IMAGE}" != "" ]; then
+ DOCKER_BUILD_OPTIONS+=" --build-arg DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}"
+fi
+
+NUM_FAILURES=0
+
+CUR_DATE=$(date -u +%F)
+for ver in kirkstone dunfell; do
+ echo "Building wolfssl/yocto:${ver}-${CUR_DATE} as ${DOCKER_BUILD_OPTIONS}"
+ docker build -t wolfssl/yocto:${ver}-${CUR_DATE} --build-arg YOCTO_VERSION=${ver} -f Dockerfile "${WOLFSSL_DIR}/Docker/yocto" && \
+ docker tag wolfssl/yocto:${ver}-${CUR_DATE} wolfssl/yocto:${ver}-latest
+ if [ $? -eq 0 ]; then
+ echo "Pushing containers to DockerHub"
+ docker push wolfssl/yocto:${ver}-${CUR_DATE} && docker push wolfssl/yocto:${ver}-latest
+ else
+ echo "Warning: Build wolfssl/yocto:${ver} failed. Continuing"
+ ((NUM_FAILURES++))
+ fi
+done
+
+echo "Script completed in $SECONDS seconds. Had $NUM_FAILURES failures."
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/Arduino_README_prepend.md b/extra/wolfssl/wolfssl/IDE/ARDUINO/Arduino_README_prepend.md
new file mode 100644
index 00000000..594a0678
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/Arduino_README_prepend.md
@@ -0,0 +1,13 @@
+# Arduino wolfSSL Library
+
+This library is restructured from [wolfSSL](https://github.com/wolfSSL/wolfssl/) Release ${WOLFSSL_VERSION} for the Arduino platform.
+
+The Official wolfSSL Arduino Library is found in [The Library Manager index](http://downloads.arduino.cc/libraries/library_index.json).
+
+See the [Arduino-wolfSSL logs](https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/).
+
+## Arduino Releases
+
+The first Official wolfSSL Arduino Library is `5.6.6-Arduino.1`: a slightly modified, post [release 5.6.6](https://github.com/wolfSSL/wolfssl/releases/tag/v5.6.6-stable) version update.
+
+See other [wolfSSL releases versions](https://github.com/wolfSSL/wolfssl/releases). The `./wolfssl-arduino.sh INSTALL` [script](https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO) can be used to install specific GitHub versions as needed.
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/README.md b/extra/wolfssl/wolfssl/IDE/ARDUINO/README.md
index 4c4e10da..75c25a20 100644
--- a/extra/wolfssl/wolfssl/IDE/ARDUINO/README.md
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/README.md
@@ -1,30 +1,89 @@
-### wolfSSL with Arduino
+# wolfSSL with Arduino
-##### Reformatting wolfSSL as a compatible Arduino Library
-This is a shell script that will re-organize the wolfSSL library to be
-compatible with Arduino projects that use Arduino IDE 1.5.0 or newer.
-The Arduino IDE requires a library's source files to be in the library's root
-directory with a header file in the name of the library. This script moves all
-src/ files to the `IDE/ARDUINO/wolfSSL/src` directory and creates a stub header
-file called `wolfssl.h` inside that directory.
+See the [example sketches](./sketches/README.md):
-Step 1: To configure wolfSSL with Arduino, enter the following from within the
-wolfssl/IDE/ARDUINO directory:
+- [sketches/wolfssl_server](./sketches/wolfssl_server/README.md)
+- [sketches/wolfssl_client](./sketches/wolfssl_client/README.md)
- `./wolfssl-arduino.sh`
+When publishing a new version to the Arduino Registry, be sure to edit `WOLFSSL_VERSION_ARUINO_SUFFIX` in the `wolfssl-arduino.sh` script.
-Step 2: Copy the directory wolfSSL that was just created to:
-`~/Documents/Arduino/libraries/` directory so the Arduino IDE can find it.
+## Boards
-Step 3: Edit `<arduino-libraries>/wolfSSL/src/user_settings.h`
+Many of the supported boards are natively built-in to the [Arduino IDE Board Manager](https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-board-manager/)
+and by adding [additional cores](https://docs.arduino.cc/learn/starting-guide/cores/) as needed.
+
+STM32 Support can be added by including this link in the "Additional Boards Managers URLs" field
+from [stm32duino/Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32?tab=readme-ov-file#getting-started) .
+
+```
+https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
+```
+
+## Using wolfSSL from the Arduino IDE
+
+The Official wolfSSL: https://github.com/wolfSSL/arduino-wolfSSL See [PR #1](https://github.com/wolfSSL/Arduino-wolfSSL/pull/1).
+
+This option will allow wolfSSL to be installed directly using the native Arduino tools.
+
+## Manually Reformatting wolfSSL as a Compatible Arduino Library
+
+Use [this](./wolfssl-arduino.sh) shell script that will re-organize the wolfSSL library to be
+compatible with [Arduino Library Specification](https://arduino.github.io/arduino-cli/0.35/library-specification/)
+for projects that use Arduino IDE 1.5.0 or newer.
+
+The Arduino IDE requires a library's source files to be in the library's root directory with a
+header file in the name of the library. This script moves all `src/` files to the `IDE/ARDUINO/wolfSSL/src`
+directory and creates a stub header file called `wolfssl.h` inside that directory.
+
+### Step 1:
+
+To configure wolfSSL with Arduino, enter ONE of the following 4 commands
+from within the `wolfssl/IDE/ARDUINO` directory:
+
+1. `./wolfssl-arduino.sh`
+ - Creates an Arduino Library directory structure in the local `wolfSSL` directory of `IDE/ARDUINO`.
+ - You can add your own `user_settings.h`, or copy/rename the [default](../../examples/configs/user_settings_arduino.h).
+
+2. `./wolfssl-arduino.sh INSTALL` (The most common option)
+ - Creates an Arduino Library in the local `wolfSSL` directory
+ - Moves that directory to the Arduino library directory:
+ - `$HOME/Arduino/libraries` for most bash environments
+ - `/mnt/c/Users/$USER/Documents/Arduino/libraries` (for WSL)
+ - Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
+ - The wolfSSL library is now available from the Arduino IDE.
+
+3. `./wolfssl-arduino.sh INSTALL /path/to/repository` (Used to update [arduino-wolfSSL](https://github.com/wolfSSL/arduino-wolfSSL))
+ - Creates an Arduino Library in `wolfSSL` directory
+ - Copies that directory contents to the specified `/path/to/repository`
+ - Adds the [default](../../examples/configs/user_settings_arduino.h) as `user_settings.h`.
+
+4. `./wolfssl-arduino.sh INSTALL /path/to/any/other/directory`
+ - Creates an Arduino Library in `wolfSSL` directory
+ - Copies that directory contents to the specified `/path/to/any/other/directory`
+
+### Step 2:
+
+Edit `<arduino-libraries>/wolfSSL/src/user_settings.h`
If building for Intel Galileo platform add: `#define INTEL_GALILEO`.
-Add any other custom settings, for a good start see the examples in wolfssl root
-"/examples/configs/user_settings_*.h"
+Add any other custom settings. For a good start see the examples in wolfssl root
+"[/examples/configs/user_settings_*.h](https://github.com/wolfssl/wolfssl/tree/master/examples/configs)"
-Step 4: If you experience any issues with custom user_settings.h see the wolfssl
+### Step 3:
+
+If you experience any issues with custom `user_settings.h` see the wolfssl
porting guide here for more assistance: https://www.wolfssl.com/docs/porting-guide/
-Step 5: If you still have any issues contact support@wolfssl.com for more help.
+If you have any issues contact support@wolfssl.com for help.
+
+# Including wolfSSL in Arduino Libraries (for Arduino version 2.0 or greater)
+
+1. In the Arduino IDE:
+
+The wolfSSL library should automatically be detected when found in the `libraries`
+directory.
+
+ - In `Sketch -> Include Library` choose wolfSSL for new sketches.
+
##### Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
@@ -33,6 +92,90 @@ Step 5: If you still have any issues contact support@wolfssl.com for more help.
`IDE/ARDUNIO/wolfSSL` folder.
- In `Sketch -> Include Library` choose wolfSSL.
-2. Open an example Arduino sketch for wolfSSL:
- - wolfSSL Client INO sketch: `sketches/wolfssl_client/wolfssl_client.ino`
- - wolfSSL Server INO sketch: `sketches/wolfssl_server/wolfssl_server.ino`
+##### wolfSSL Examples
+
+Open an example Arduino sketch for wolfSSL:
+
+ - wolfSSL [Client INO sketch](./sketches/wolfssl_client/README.md): `sketches/wolfssl_client/wolfssl_client.ino`
+
+ - wolfSSL [Server INO sketch](./sketches/wolfssl_server/README.md): `sketches/wolfssl_server/wolfssl_server.ino`
+
+#### Script Examples
+
+Refresh the local Windows Arduino wolfSSL library from GitHub repository directory using WSL:
+
+Don't forget to edit `WOLFSSL_VERSION_ARUINO_SUFFIX`!
+
+```bash
+# Change to the wolfSSL Arduino IDE directory
+cd /mnt/c/workspace/wolfssl-$USER/IDE/ARDUINO
+
+# remove current Arduino wolfSSL library
+rm -rf /mnt/c/Users/$USER/Documents/Arduino/libraries/wolfssl
+
+# Install wolfSSL as an Arduino library
+./wolfssl-arduino.sh INSTALL
+```
+
+Publish wolfSSL from WSL to a `Arduino-wolfSSL-$USER` repository.
+
+```bash
+cd /mnt/c/workspace/wolfssl-$USER/IDE/ARDUINO
+rm -rf /mnt/c/Users/$USER/Documents/Arduino/libraries/wolfSSL
+rm -rf /mnt/c/workspace/wolfssl-$USER/IDE/ARDUINO/wolfSSL
+./wolfssl-arduino.sh INSTALL /mnt/c/workspace/Arduino-wolfSSL-$USER/
+```
+
+Publish wolfSSL from WSL to default Windows local library.
+
+```bash
+cd /mnt/c/workspace/wolfssl-$USER/IDE/ARDUINO
+rm -rf /mnt/c/Users/$USER/Documents/Arduino/libraries/wolfSSL
+rm -rf /mnt/c/workspace/wolfssl-arduino/IDE/ARDUINO/wolfSSL
+./wolfssl-arduino.sh INSTALL
+```
+
+Test the TLS server by running a local command-line client.
+
+```bash
+cd /mnt/c/workspace/wolfssl-$USER
+./examples/client/client -h 192.168.1.43 -p 11111 -v 3
+```
+
+Build wolfSSL to include wolfSSH support to an alternate development directory.
+
+```bash
+cd /mnt/c/workspace/wolfssl-$USER
+./configure --prefix=/mnt/c/workspace/wolfssh-$USER/wolfssl_install --enable-ssh
+make
+make install
+
+```
+
+Build wolfSSH with wolfSSL not installed to default directory.
+
+```bash
+cd /mnt/c/workspace/wolfssh-$USER
+./configure --with-wolfssl=/mnt/c/workspace/wolfssh-$USER/wolfssl_install
+make
+./examples/client/client -u jill -h 192.168.1.34 -p 22222 -P upthehill
+```
+
+Test the current wolfSSL.
+
+```bash
+cd /mnt/c/workspace/wolfssl-arduino
+git status
+./autogen.sh
+./configure --enable-all
+make clean
+make && make test
+```
+
+Build and run `testwolfcrypt`.
+
+```bash
+./autogen.sh
+./configure --enable-all
+make clean && make && ./wolfcrypt/test/testwolfcrypt
+```
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/include.am b/extra/wolfssl/wolfssl/IDE/ARDUINO/include.am
index 19189e82..52491a8b 100644
--- a/extra/wolfssl/wolfssl/IDE/ARDUINO/include.am
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/include.am
@@ -3,6 +3,15 @@
# All paths should be given relative to the root
EXTRA_DIST+= IDE/ARDUINO/README.md
+EXTRA_DIST+= IDE/ARDUINO/Arduino_README_prepend.md
+EXTRA_DIST+= IDE/ARDUINO/keywords.txt
+EXTRA_DIST+= IDE/ARDUINO/library.properties.template
+EXTRA_DIST+= IDE/ARDUINO/sketches/README.md
+EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_client/README.md
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino
+EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_server/README.md
EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
+EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_version/README.md
+EXTRA_DIST+= IDE/ARDUINO/sketches/wolfssl_version/wolfssl_version.ino
+EXTRA_DIST+= IDE/ARDUINO/wolfssl.h
EXTRA_DIST+= IDE/ARDUINO/wolfssl-arduino.sh
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/keywords.txt b/extra/wolfssl/wolfssl/IDE/ARDUINO/keywords.txt
new file mode 100644
index 00000000..27d5dc3d
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/keywords.txt
@@ -0,0 +1,21 @@
+# Syntax Coloring Map For wolfSSL
+# See https://arduino.github.io/arduino-cli/0.35/library-specification/#keywords
+#
+# Be sure to use tabs, not spaces. This might help:
+# tr ' ' '\t' < keywords1.txt > keywords.txt
+
+#=============================================
+# Datatypes (KEYWORD1)
+#=============================================
+
+
+#=============================================
+# Methods and Functions (KEYWORD2)
+#=============================================
+wolfSSL_SetIORecv KEYWORD1
+
+#=============================================
+# Instances (KEYWORD2)
+#=============================================
+ctx KEYWORD2
+
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/library.properties.template b/extra/wolfssl/wolfssl/IDE/ARDUINO/library.properties.template
new file mode 100644
index 00000000..9b18e8c2
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/library.properties.template
@@ -0,0 +1,9 @@
+name=wolfssl
+version=${WOLFSSL_VERSION}${WOLFSSL_VERSION_ARUINO_SUFFIX}
+author=wolfSSL Inc.
+maintainer=wolfSSL inc <support@wolfssl.com>
+sentence=A lightweight SSL/TLS library written in ANSI C and targeted for embedded, RTOS, and resource-constrained environments.
+paragraph=Manual: https://www.wolfssl.com/documentation/manuals/wolfssl/index.html.
+category=Communication
+url=https://www.wolfssl.com/
+architectures=*
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/README.md b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/README.md
new file mode 100644
index 00000000..26a1d1e1
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/README.md
@@ -0,0 +1,12 @@
+# wolfSSL Arduino Examples
+
+There are currently two example Arduino sketches:
+
+* [wolfssl_client](./wolfssl_client/README.md): Basic TLS listening client.
+* [wolfssl_server](./wolfssl_server/README.md): Basic TLS server.
+
+Examples have been most recently confirmed operational on the
+[Arduino IDE](https://www.arduino.cc/en/software) 2.2.1.
+
+For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE).
+Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/).
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/README.md b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/README.md
new file mode 100644
index 00000000..caf83c58
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/README.md
@@ -0,0 +1,22 @@
+# Arduino Basic TLS Listening Client
+
+Open the [wolfssl_client.ino](./wolfssl_client.ino) file in the Arduino IDE.
+
+Other IDE products are also supported, such as:
+
+- [PlatformIO in VS Code](https://docs.platformio.org/en/latest/frameworks/arduino.html)
+- [VisualGDB](https://visualgdb.com/tutorials/arduino/)
+- [VisualMicro](https://www.visualmicro.com/)
+
+For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE).
+Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/).
+
+
+### Troubleshooting
+
+When encountering odd errors such as `undefined reference to ``_impure_ptr'`, try cleaning the Arduino
+cache directories. For Windows, that's typically in:
+
+```text
+C:\Users\%USERNAME%\AppData\Local\Temp\arduino\sketches
+```
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino
index 61362ae9..21a84deb 100644
--- a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_client/wolfssl_client.ino
@@ -20,157 +20,875 @@
*/
/*
- This was original tested with Intel Galileo acting as the Client, with a
-laptop acting as a server using the server example provided in examples/server.
-Legacy Ardunio v1.86 was used to compile and program the Galileo
+Tested with:
+
+1) Intel Galileo acting as the Client, with a laptop acting as a server using
+ the server example provided in examples/server.
+ Legacy Arduino v1.86 was used to compile and program the Galileo
+
+2) Espressif ESP32 WiFi
+
+3) Arduino Due, Nano33 IoT, Nano RP-2040
*/
-#define USE_CERT_BUFFERS_2048
+/*
+ * Note to code editors: the Arduino client and server examples are edited in
+ * parallel for side-by-side comparison between examples.
+ */
+
+/* If you have a private include, define it here, otherwise edit WiFi params */
+#define MY_PRIVATE_CONFIG "/workspace/my_private_config.h"
+
+/* set REPEAT_CONNECTION to a non-zero value to continually run the example. */
+#define REPEAT_CONNECTION 0
+
+/* Edit this with your other TLS host server address to connect to: */
+#define WOLFSSL_TLS_SERVER_HOST "192.168.1.39"
+
+/* wolfssl TLS examples communicate on port 11111 */
+#define WOLFSSL_PORT 11111
+
+/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
+#define SERIAL_BAUD 115200
+
+/* We'll wait up to 2000 milliseconds to properly shut down connection */
+#define SHUTDOWN_DELAY_MS 2000
+
+/* Number of times to retry connection. */
+#define RECONNECT_ATTEMPTS 20
+
+/* Optional stress test. Define to consume memory until exhausted: */
+/* #define MEMORY_STRESS_TEST */
+
+/* Choose client or server example, not both. */
+#define WOLFSSL_CLIENT_EXAMPLE
+/* #define WOLFSSL_SERVER_EXAMPLE */
+
+#if defined(MY_PRIVATE_CONFIG)
+ /* the /workspace directory may contain a private config
+ * excluded from GitHub with items such as WiFi passwords */
+ #include MY_PRIVATE_CONFIG
+ static const char* ssid PROGMEM = MY_ARDUINO_WIFI_SSID;
+ static const char* password PROGMEM = MY_ARDUINO_WIFI_PASSWORD;
+#else
+ /* when using WiFi capable boards: */
+ static const char* ssid PROGMEM = "your_SSID";
+ static const char* password PROGMEM = "your_PASSWORD";
+#endif
+
+#define BROADCAST_ADDRESS "255.255.255.255"
+
+/* There's an optional 3rd party NTPClient library by Fabrice Weinberg.
+ * If it is installed, uncomment define USE_NTP_LIB here: */
+/* #define USE_NTP_LIB */
+#ifdef USE_NTP_LIB
+ #include <NTPClient.h>
+#endif
+
#include <wolfssl.h>
+/* Important: make sure settings.h appears before any other wolfSSL headers */
+#include <wolfssl/wolfcrypt/settings.h>
+/* Reminder: settings.h includes user_settings.h
+ * For ALL project wolfSSL settings, see:
+ * [your path]/Arduino\libraries\wolfSSL\src\user_settings.h */
#include <wolfssl/ssl.h>
-#include <Ethernet.h>
#include <wolfssl/certs_test.h>
+#include <wolfssl/wolfcrypt/error-crypt.h>
+
+/* Define DEBUG_WOLFSSL in user_settings.h for more verbose logging. */
+#if defined(DEBUG_WOLFSSL)
+ #define PROGRESS_DOT F("")
+#else
+ #define PROGRESS_DOT F(".")
+#endif
+
+/* Convert a macro to a string */
+#define xstr(x) str(x)
+#define str(x) #x
+
+/* optional board-specific networking includes */
+#if defined(ESP32)
+ #define USING_WIFI
+ #include <WiFi.h>
+ #include <WiFiUdp.h>
+ #ifdef USE_NTP_LIB
+ WiFiUDP ntpUDP;
+ #endif
+ /* Ensure the F() flash macro is defined */
+ #ifndef F
+ #define F
+ #endif
+ WiFiClient client;
+
+#elif defined(ESP8266)
+ #define USING_WIFI
+ #include <ESP8266WiFi.h>
+ WiFiClient client;
+
+#elif defined(ARDUINO_SAM_DUE)
+ #include <SPI.h>
+ /* There's no WiFi/Ethernet on the Due. Requires Ethernet Shield.
+ /* Needs "Ethernet by Various" library to be installed. Tested with V2.0.2 */
+ #include <Ethernet.h>
+ EthernetClient client;
+
+#elif defined(ARDUINO_SAMD_NANO_33_IOT)
+ #define USING_WIFI
+ #include <SPI.h>
+ #include <WiFiNINA.h> /* Needs Arduino WiFiNINA library installed manually */
+ WiFiClient client;
+
+#elif defined(ARDUINO_ARCH_RP2040)
+ #define USING_WIFI
+ #include <SPI.h>
+ #include <WiFiNINA.h>
+ WiFiClient client;
+
+#elif defined(USING_WIFI)
+ #define USING_WIFI
+ #include <WiFi.h>
+ #include <WiFiUdp.h>
+ #ifdef USE_NTP_LIB
+ WiFiUDP ntpUDP;
+ #endif
+ WiFiClient client;
+
+/* TODO
+#elif defined(OTHER_BOARD)
+*/
+#else
+ #define USING_WIFI
+ WiFiClient client;
+
+#endif
+
+/* Only for syntax highlighters to show interesting options enabled: */
+#if defined(HAVE_SNI) \
+ || defined(HAVE_MAX_FRAGMENT) \
+ || defined(HAVE_TRUSTED_CA) \
+ || defined(HAVE_TRUNCATED_HMAC) \
+ || defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
+ || defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2) \
+ || defined(HAVE_SUPPORTED_CURVES) \
+ || defined(HAVE_ALPN) \
+ || defined(HAVE_SESSION_TICKET) \
+ || defined(HAVE_SECURE_RENEGOTIATION) \
+ || defined(HAVE_SERVER_RENEGOTIATION_INFO)
+#endif
+
+static const char host[] PROGMEM = WOLFSSL_TLS_SERVER_HOST; /* server to connect to */
+static const int port PROGMEM = WOLFSSL_PORT; /* port on server to connect to */
+
+static WOLFSSL_CTX* ctx = NULL;
+static WOLFSSL* ssl = NULL;
+static char* wc_error_message = (char*)malloc(80 + 1);
+static char errBuf[80];
+
+#if defined(MEMORY_STRESS_TEST)
+ #define MEMORY_STRESS_ITERATIONS 100
+ #define MEMORY_STRESS_BLOCK_SIZE 1024
+ #define MEMORY_STRESS_INITIAL (4*1024)
+ static char* memory_stress[MEMORY_STRESS_ITERATIONS]; /* typically 1K per item */
+ static int mem_ctr = 0;
+#endif
+
+static int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
+static int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
+static int reconnect = RECONNECT_ATTEMPTS;
+static int lng_index PROGMEM = 0; /* 0 = English */
+
+#if defined(__arm__)
+ #include <malloc.h>
+ extern char _end;
+ extern "C" char *sbrk(int i);
+ static char *ramstart=(char *)0x20070000;
+ static char *ramend=(char *)0x20088000;
+#endif
+
+/*****************************************************************************/
+/* fail_wait - in case of unrecoverable error */
+/*****************************************************************************/
+int fail_wait(void) {
+ show_memory();
+
+ Serial.println(F("Failed. Halt."));
+ while (1) {
+ delay(1000);
+ }
+ return 0;
+}
+
+/*****************************************************************************/
+/* show_memory() to optionally view during debugging. */
+/*****************************************************************************/
+int show_memory(void)
+{
+#if defined(__arm__)
+ struct mallinfo mi = mallinfo();
+
+ char *heapend=sbrk(0);
+ register char * stack_ptr asm("sp");
+ #if defined(DEBUG_WOLFSSL_VERBOSE)
+ Serial.print(" arena=");
+ Serial.println(mi.arena);
+ Serial.print(" ordblks=");
+ Serial.println(mi.ordblks);
+ Serial.print(" uordblks=");
+ Serial.println(mi.uordblks);
+ Serial.print(" fordblks=");
+ Serial.println(mi.fordblks);
+ Serial.print(" keepcost=");
+ Serial.println(mi.keepcost);
+ #endif
+
+ #if defined(DEBUG_WOLFSSL) || defined(MEMORY_STRESS_TEST)
+ Serial.print("Estimated free memory: ");
+ Serial.print(stack_ptr - heapend + mi.fordblks);
+ Serial.println(F(" bytes"));
+ #endif
+
+ #if (0)
+ /* Experimental: not supported on all devices: */
+ Serial.print("RAM Start %lx\n", (unsigned long)ramstart);
+ Serial.print("Data/Bss end %lx\n", (unsigned long)&_end);
+ Serial.print("Heap End %lx\n", (unsigned long)heapend);
+ Serial.print("Stack Ptr %lx\n",(unsigned long)stack_ptr);
+ Serial.print("RAM End %lx\n", (unsigned long)ramend);
+
+ Serial.print("Heap RAM Used: ",mi.uordblks);
+ Serial.print("Program RAM Used ",&_end - ramstart);
+ Serial.print("Stack RAM Used ",ramend - stack_ptr);
+
+ Serial.print("Estimated Free RAM: %d\n\n",stack_ptr - heapend + mi.fordblks);
+ #endif
+#else
+ Serial.println(F("show_memory() not implemented for this platform"));
+#endif
+ return 0;
+}
+
+/*****************************************************************************/
+/* EthernetSend() to send a message string. */
+/*****************************************************************************/
+int EthernetSend(WOLFSSL* ssl, char* message, int sz, void* ctx) {
+ int sent = 0;
+ (void)ssl;
+ (void)ctx;
+
+ sent = client.write((byte*)message, sz);
+ return sent;
+}
+
+/*****************************************************************************/
+/* EthernetReceive() to receive a reply string. */
+/*****************************************************************************/
+int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
+ int ret = 0;
+ (void)ssl;
+ (void)ctx;
+
+ while (client.available() > 0 && ret < sz) {
+ reply[ret++] = client.read();
+ }
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_hardware() */
+/*****************************************************************************/
+int setup_hardware(void) {
+ int ret = 0;
+
+#if defined(ARDUINO_SAMD_NANO_33_IOT)
+ Serial.println(F("Detected known tested and working Arduino Nano 33 IoT"));
+#elif defined(ARDUINO_ARCH_RP2040)
+ Serial.println(F("Detected known tested and working Arduino RP-2040"));
+#elif defined(__arm__) && defined(ID_TRNG) && defined(TRNG)
+ /* need to manually turn on random number generator on Arduino Due, etc. */
+ pmc_enable_periph_clk(ID_TRNG);
+ trng_enable(TRNG);
+ Serial.println(F("Enabled ARM TRNG"));
+#endif
+
+ show_memory();
+ randomSeed(analogRead(0));
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_datetime() */
+/* The device needs to have a valid date within the valid range of certs. */
+/*****************************************************************************/
+int setup_datetime(void) {
+ int ret = 0;
+ int ntp_tries = 20;
+
+ /* we need a date in the range of cert expiration */
+#ifdef USE_NTP_LIB
+ #if defined(ESP32)
+ NTPClient timeClient(ntpUDP, "pool.ntp.org");
+
+ timeClient.begin();
+ timeClient.update();
+ delay(1000);
+ while (!timeClient.isTimeSet() && (ntp_tries > 0)) {
+ timeClient.forceUpdate();
+ Serial.println(F("Waiting for NTP update"));
+ delay(2000);
+ ntp_tries--;
+ }
+ if (ntp_tries <= 0) {
+ Serial.println(F("Warning: gave up waiting on NTP"));
+ }
+ Serial.println(timeClient.getFormattedTime());
+ Serial.println(timeClient.getEpochTime());
+ #endif
+#endif
+
+#if defined(ESP32)
+ /* see esp32-hal-time.c */
+ ntp_tries = 5;
+ /* Replace "pool.ntp.org" with your preferred NTP server */
+ configTime(0, 0, "pool.ntp.org");
+
+ /* Wait for time to be set */
+ while ((time(nullptr) <= 100000) && ntp_tries > 0) {
+ Serial.println(F("Waiting for time to be set..."));
+ delay(2000);
+ ntp_tries--;
+ }
+#endif
+ return ret;
+} /* setup_datetime */
+
+/*****************************************************************************/
+/* Arduino setup_network() */
+/*****************************************************************************/
+int setup_network(void) {
+ int ret = 0;
-const char host[] = "192.168.1.148"; /* server to connect to */
-const int port = 11111; /* port on server to connect to */
+#if defined(USING_WIFI)
+ int status = WL_IDLE_STATUS;
-int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
-int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
-int reconnect = 10;
+ /* The ESP8266 & ESP32 support both AP and STA. We'll use STA: */
+ #if defined(ESP8266) || defined(ESP32)
+ WiFi.mode(WIFI_STA);
+ #else
+ String fv;
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ /* don't continue if no network */
+ while (true) ;
+ }
-EthernetClient client;
+ fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+ #endif
+
+ Serial.print(F("Connecting to WiFi "));
+ Serial.print(ssid);
+ status = WiFi.begin(ssid, password);
+ while (status != WL_CONNECTED) {
+ delay(1000);
+ Serial.print(F("."));
+ Serial.print(status);
+ status = WiFi.status();
+ }
+
+ Serial.println(F(" Connected!"));
+#else
+ /* Newer Ethernet shields have a
+ * MAC address printed on a sticker on the shield */
+ byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
+ IPAddress ip(192, 168, 1, 42);
+ IPAddress myDns(192, 168, 1, 1);
+ Ethernet.init(10); /* Most Arduino shields */
+ /* Ethernet.init(5); * MKR ETH Shield */
+ /* Ethernet.init(0); * Teensy 2.0 */
+ /* Ethernet.init(20); * Teensy++ 2.0 */
+ /* Ethernet.init(15); * ESP8266 with Adafruit FeatherWing Ethernet */
+ /* Ethernet.init(33); * ESP32 with Adafruit FeatherWing Ethernet */
+ Serial.println(F("Initialize Ethernet with DHCP:"));
+ if (Ethernet.begin(mac) == 0) {
+ Serial.println(F("Failed to configure Ethernet using DHCP"));
+ /* Check for Ethernet hardware present */
+ if (Ethernet.hardwareStatus() == EthernetNoHardware) {
+ Serial.println(F("Ethernet shield was not found."));
+ while (true) {
+ delay(1); /* do nothing */
+ }
+ }
+ if (Ethernet.linkStatus() == LinkOFF) {
+ Serial.println(F("Ethernet cable is not connected."));
+ }
+ /* try to configure using IP address instead of DHCP : */
+ Ethernet.begin(mac, ip, myDns);
+ }
+ else {
+ Serial.print(F(" DHCP assigned IP "));
+ Serial.println(Ethernet.localIP());
+ }
+ /* We'll assume the Ethernet connection is ready to go. */
+#endif
-WOLFSSL_CTX* ctx = NULL;
-WOLFSSL* ssl = NULL;
+ Serial.println(F("********************************************************"));
+ Serial.print(F(" wolfSSL Example Client IP = "));
+#if defined(USING_WIFI)
+ Serial.println(WiFi.localIP());
+#else
+ Serial.println(Ethernet.localIP());
+#endif
+ Serial.print(F(" Configured Server Host to connect to: "));
+ Serial.println(host);
+ Serial.println(F("********************************************************"));
+ Serial.println(F("Setup network complete."));
-void setup() {
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_wolfssl() */
+/*****************************************************************************/
+int setup_wolfssl(void) {
+ int ret = 0;
WOLFSSL_METHOD* method;
- /* Initialize Return Code */
- int rc;
- Serial.begin(9600);
- /* Delay need to ensure connection to server */
- delay(4000);
- method = wolfTLSv1_2_client_method();
+ /* Show a revision of wolfssl user_settings.h file in use when available: */
+#if defined(WOLFSSL_USER_SETTINGS_ID)
+ Serial.print(F("WOLFSSL_USER_SETTINGS_ID: "));
+ Serial.println(F(WOLFSSL_USER_SETTINGS_ID));
+#else
+ Serial.println(F("No WOLFSSL_USER_SETTINGS_ID found."));
+#endif
+
+#if defined(NO_WOLFSSL_SERVER)
+ Serial.println(F("wolfSSL server code disabled to save space."));
+#endif
+#if defined(NO_WOLFSSL_CLIENT)
+ Serial.println(F("wolfSSL client code disabled to save space."));
+#endif
+
+#if defined(DEBUG_WOLFSSL)
+ wolfSSL_Debugging_ON();
+ Serial.println(F("wolfSSL Debugging is On!"));
+#else
+ Serial.println(F("wolfSSL Debugging is Off! (enable with DEBUG_WOLFSSL)"));
+#endif
+
+ /* See ssl.c for TLS cache settings. Larger cache = use more RAM. */
+#if defined(NO_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS NO_SESSION_CACHE"));
+#elif defined(MICRO_SESSION_CACHEx)
+ Serial.println(F("wolfSSL TLS MICRO_SESSION_CACHE"));
+#elif defined(SMALL_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS SMALL_SESSION_CACHE"));
+#elif defined(MEDIUM_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS MEDIUM_SESSION_CACHE"));
+#elif defined(BIG_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS BIG_SESSION_CACHE"));
+#elif defined(HUGE_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
+#elif defined(HUGE_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
+#else
+ Serial.println(F("WARNING: Unknown or no TLS session cache setting."));
+ /* See wolfssl/src/ssl.c for amount of memory used.
+ * It is best on embedded devices to choose a TLS session cache size. */
+#endif
+
+ ret = wolfSSL_Init();
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.println("Successfully called wolfSSL_Init");
+ }
+ else {
+ Serial.println("ERROR: wolfSSL_Init failed");
+ }
+
+ /* See companion server example with wolfSSLv23_server_method here.
+ * method = wolfSSLv23_client_method()); SSL 3.0 - TLS 1.3.
+ * method = wolfTLSv1_2_client_method(); only TLS 1.2
+ * method = wolfTLSv1_3_client_method(); only TLS 1.3
+ *
+ * see Arduino\libraries\wolfssl\src\user_settings.h */
+
+ Serial.println("Here we go!");
+
+ method = wolfSSLv23_client_method();
if (method == NULL) {
- Serial.println("unable to get method");
- return;
+ Serial.println(F("unable to get wolfssl client method"));
+ fail_wait();
}
ctx = wolfSSL_CTX_new(method);
if (ctx == NULL) {
- Serial.println("unable to get ctx");
- return;
+ Serial.println(F("unable to get ctx"));
+ fail_wait();
}
- /* initialize wolfSSL using callback functions */
+
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_certificates() */
+/*****************************************************************************/
+int setup_certificates(void) {
+ int ret = 0;
+
+ Serial.println(F("Initializing certificates..."));
+ show_memory();
+
+ /* Use built-in validation, No verification callback function: */
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, 0);
- rc = wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048,\
- sizeof_ca_cert_der_2048,\
- WOLFSSL_FILETYPE_ASN1);
- Serial.print("\n\n Return code of load_verify is:");
- Serial.println(rc);
- Serial.println("");
- rc = wolfSSL_CTX_use_certificate_buffer(ctx, client_cert_der_2048,\
- sizeof_client_cert_der_2048,\
- WOLFSSL_FILETYPE_ASN1);
- Serial.print("\n\n Return code of use_certificate_buffer is:");
- Serial.println(rc);
- Serial.println("");
- rc = wolfSSL_CTX_use_PrivateKey_buffer(ctx, client_key_der_2048,\
- sizeof_client_key_der_2048,\
- WOLFSSL_FILETYPE_ASN1);
- Serial.print("\n\n Return code of use_PrivateKey_buffer is:");
- Serial.println(rc);
- Serial.println("");
+
+ /* Certificate */
+ Serial.println("Initializing certificates...");
+ ret = wolfSSL_CTX_use_certificate_buffer(ctx,
+ CTX_CLIENT_CERT,
+ CTX_CLIENT_CERT_SIZE,
+ CTX_CLIENT_CERT_TYPE);
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.print("Success: use certificate: ");
+ Serial.println(xstr(CTX_SERVER_CERT));
+ }
+ else {
+ Serial.println(F("Error: wolfSSL_CTX_use_certificate_buffer failed: "));
+ wc_ErrorString(ret, wc_error_message);
+ Serial.println(wc_error_message);
+ fail_wait();
+ }
+
+ /* Setup private client key */
+ ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
+ CTX_CLIENT_KEY,
+ CTX_CLIENT_KEY_SIZE,
+ CTX_CLIENT_KEY_TYPE);
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.print("Success: use private key buffer: ");
+ Serial.println(xstr(CTX_SERVER_KEY));
+ }
+ else {
+ Serial.println(F("Error: wolfSSL_CTX_use_PrivateKey_buffer failed: "));
+ wc_ErrorString(ret, wc_error_message);
+ Serial.println(wc_error_message);
+ fail_wait();
+ }
+
+ ret = wolfSSL_CTX_load_verify_buffer(ctx,
+ CTX_CA_CERT,
+ CTX_CA_CERT_SIZE,
+ CTX_CA_CERT_TYPE);
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.println(F("Success: load_verify CTX_CA_CERT"));
+ }
+ else {
+ Serial.println(F("Error: wolfSSL_CTX_load_verify_buffer failed: "));
+ wc_ErrorString(ret, wc_error_message);
+ Serial.println(wc_error_message);
+ fail_wait();
+ }
+
+
+
+ return ret;
+} /* Arduino setup */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Arduino setup() */
+/*****************************************************************************/
+/*****************************************************************************/
+void setup(void) {
+ int i = 0;
+ Serial.begin(SERIAL_BAUD);
+ while (!Serial && (i < 10)) {
+ /* wait for serial port to connect. Needed for native USB port only */
+ delay(1000);
+ i++;
+ }
+ Serial.println(F(""));
+ Serial.println(F(""));
+ Serial.println(F("wolfSSL TLS Client Example Startup."));
+
+ /* define DEBUG_WOLFSSL in wolfSSL user_settings.h for diagnostics */
+#if defined(DEBUG_WOLFSSL)
+ wolfSSL_Debugging_ON();
+#endif
+
+ /* Optionally pre-allocate a large block of memory for testing */
+#if defined(MEMORY_STRESS_TEST)
+ Serial.println(F("WARNING: Memory Stress Test Active!"));
+ Serial.print(F("Allocating extra memory: "));
+ Serial.print(MEMORY_STRESS_INITIAL);
+ Serial.println(F(" bytes..."));
+ memory_stress[mem_ctr] = (char*)malloc(MEMORY_STRESS_INITIAL);
+ show_memory();
+#endif
+
+ setup_hardware();
+
+ setup_network();
+
+ setup_datetime();
+
+ setup_wolfssl();
+
+ setup_certificates();
+
+ /* Initialize wolfSSL using callback functions. */
wolfSSL_SetIOSend(ctx, EthernetSend);
wolfSSL_SetIORecv(ctx, EthernetReceive);
- return;
-}
-int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx) {
- int sent = 0;
- sent = client.write((byte*)msg, sz);
- return sent;
-}
+ Serial.println(F("Completed Arduino setup!"));
+ /* See companion wolfssl_server.ino code; server begins listening here
+ * https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO/sketches/wolfssl_server
+ * Any other server will work. See also:
+ * https://github.com/wolfSSL/wolfssl/tree/master/examples/client
+ */
+ /* See companion wolfssl_server.ino code */
+ return;
+} /* Arduino setup */
-int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
+/*****************************************************************************/
+/* wolfSSL error_check() */
+/*****************************************************************************/
+int error_check(int this_ret, bool halt_on_error,
+ const __FlashStringHelper* message) {
int ret = 0;
- while (client.available() > 0 && ret < sz) {
- reply[ret++] = client.read();
+ if (this_ret == WOLFSSL_SUCCESS) {
+ Serial.print(F("Success: "));
+ Serial.println(message);
+ }
+ else {
+ Serial.print(F("ERROR: return = "));
+ Serial.print(this_ret);
+ Serial.print(F(": "));
+ Serial.println(message);
+ Serial.println(wc_GetErrorString(this_ret));
+ if (halt_on_error) {
+ fail_wait();
+ }
}
+ show_memory();
+
return ret;
+} /* error_check */
+
+/*****************************************************************************/
+/* wolfSSL error_check_ssl */
+/* Parameters: */
+/* ssl is the current WOLFSSL object pointer */
+/* halt_on_error set to true to suspend operations for critical error */
+/* message is expected to be a memory-efficient F("") macro string */
+/*****************************************************************************/
+int error_check_ssl(WOLFSSL* ssl, int this_ret, bool halt_on_error,
+ const __FlashStringHelper* message) {
+ int err = 0;
+
+ if (ssl == NULL) {
+ Serial.println(F("ssl is Null; Unable to allocate SSL object?"));
+#ifndef DEBUG_WOLFSSL
+ Serial.println(F("Define DEBUG_WOLFSSL in user_settings.h for more."));
+#else
+ Serial.println(F("See wolfssl/wolfcrypt/error-crypt.h for codes."));
+#endif
+ Serial.print(F("ERROR: "));
+ Serial.println(message);
+ show_memory();
+ if (halt_on_error) {
+ fail_wait();
+ }
+ }
+ else {
+ err = wolfSSL_get_error(ssl, this_ret);
+ if (err == WOLFSSL_SUCCESS) {
+ Serial.print(F("Success m: "));
+ Serial.println(message);
+ }
+ else {
+ if (err < 0) {
+ wolfSSL_ERR_error_string(err, errBuf);
+ Serial.print(F("WOLFSSL Error: "));
+ Serial.print(err);
+ Serial.print(F("; "));
+ Serial.println(errBuf);
+ }
+ else {
+ Serial.println(F("Success: ssl object."));
+ }
+ }
+ }
+
+ return err;
}
+/*****************************************************************************/
+/*****************************************************************************/
+/* Arduino loop() */
+/*****************************************************************************/
+/*****************************************************************************/
void loop() {
- int err = 0;
- int input = 0;
- int total_input = 0;
- char msg[32] = "hello wolfssl!";
- int msgSz = (int)strlen(msg);
- char errBuf[80];
char reply[80];
+ char msg[32] = "hello wolfssl!";
const char* cipherName;
+ int retry_shutdown = SHUTDOWN_DELAY_MS; /* max try, once per millisecond */
+ int total_input = 0;
+ int msgSz = 0;
+ int input = 0;
+ int ret = 0;
+ int err = 0;
+ msgSz = (int)strlen(msg);
+ Serial.println(F(""));
+ Serial.println(F("Starting Arduino loop() ..."));
+
if (reconnect) {
reconnect--;
- if (client.connect(host, port)) {
- Serial.print("Connected to ");
- Serial.println(host);
+ /* WiFi client returns true if connection succeeds, false if not. */
+ /* Wired client returns int (1,-1,-2,-3,-4) for connection status. */
+ Serial.print(F("Connecting to "));
+ Serial.print(host);
+ Serial.print(F(":"));
+ Serial.println(port);
+ /* can also use: IPAddress server(192,168,1,37); */
+ Serial.println(F("Here we go..."));
+ ret = client.connect(host, port);
+ Serial.println(F("Ok, checking..."));
+ if (ret > 0) {
+ Serial.println(F("Connected!"));
+
+ /* initialize wolfSSL */
+ ret = wolfSSL_Init();
+ error_check(ret, false, F("calling wolfSSL_Init") );
+
+ /* create secure connection object. see setup for ctx certs. */
+ Serial.println(F("Calling ssl = wolfSSL_new(ctx)"));
ssl = wolfSSL_new(ctx);
- if (ssl == NULL) {
- Serial.println("Unable to allocate SSL object");
- return;
- }
- err = wolfSSL_connect(ssl);
- if (err != WOLFSSL_SUCCESS) {
- err = wolfSSL_get_error(ssl, 0);
- wolfSSL_ERR_error_string(err, errBuf);
- Serial.print("TLS Connect Error: ");
- Serial.println(errBuf);
- }
- Serial.print("SSL version is ");
+ error_check_ssl(ssl, 0, true, F("Create WOLFSSL object from ctx"));
+
+ Serial.print(F("Connecting to wolfSSL TLS Secure Server..."));
+ do {
+ err = 0; /* reset error */
+ Serial.println(F("wolfSSL_connect ..."));
+ ret = wolfSSL_connect(ssl);
+ Serial.print("wolfSSL_connect return result =");
+ Serial.println(ret);
+ if ((ret != WOLFSSL_SUCCESS) && (ret != WC_PENDING_E)) {
+ Serial.println(F("Failed connection, checking error."));
+ err = error_check_ssl(ssl, ret, true,
+ F("Create WOLFSSL object from ctx"));
+ Serial.print("err =");
+ Serial.println(err);
+ }
+ else {
+ Serial.print(PROGRESS_DOT);
+ }
+ } while (err == WC_PENDING_E);
+
+ Serial.println();
+ Serial.println(F("Connected!"));
+ Serial.print(F("SSL version is "));
Serial.println(wolfSSL_get_version(ssl));
+
cipherName = wolfSSL_get_cipher(ssl);
- Serial.print("SSL cipher suite is ");
+ Serial.print(F("SSL cipher suite is "));
Serial.println(cipherName);
- if ((wolfSSL_write(ssl, msg, msgSz)) == msgSz) {
- Serial.print("Server response: ");
- /* wait for data */
- while (!client.available()) {}
+
+ /* see test.h
+ * TODO: test.h needs a little bit of Arduino work for these:
+ showPeerEx(ssl, lng_index);
+ showPeerPEM(ssl);
+ */
+
+ Serial.print(F("Sending secure message to server: "));
+ Serial.println(msg);
+ ret = wolfSSL_write(ssl, msg, msgSz);
+ if (ret == msgSz) {
+ Serial.print(F("Waiting for Server response..."));
+
+ while (!client.available()) {
+ /* wait for data */
+ delay(1); /* 1 ms delay */
+ }
+
+ Serial.print(F("Reading response.."));
/* read data */
- while (wolfSSL_pending(ssl)) {
- input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
- total_input += input;
- if (input < 0) {
- err = wolfSSL_get_error(ssl, 0);
- wolfSSL_ERR_error_string(err, errBuf);
- Serial.print("TLS Read Error: ");
- Serial.println(errBuf);
- break;
- }
- else if (input > 0) {
- reply[input] = '\0';
- Serial.print(reply);
+ do {
+ ret = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
+ if (ret < 0) {
+ error_check_ssl(ssl, ret, false,
+ F("during TLS Read"));
}
else {
- Serial.println();
+ Serial.print(PROGRESS_DOT);
}
- }
- }
+ } while (err == WC_PENDING_E);
+ Serial.println();
+
+ Serial.println();
+ Serial.println(reply); /* typically: I hear you fa shizzle! */
+ Serial.println();
+
+ } /* wolfSSL_write message size matched */
else {
- err = wolfSSL_get_error(ssl, 0);
- wolfSSL_ERR_error_string(err, errBuf);
- Serial.print("TLS Write Error: ");
- Serial.println(errBuf);
+ error_check_ssl(ssl, ret, false,
+ F("during TLS Write"));
+ } /* any wolfSSL_write message size mismatch is an error */
+
+ Serial.print(F("Shutting down.."));
+ do {
+ delay(1);
+ Serial.print(PROGRESS_DOT);
+ retry_shutdown--;
+ ret = wolfSSL_shutdown(ssl);
+ } while ( (ret == WOLFSSL_SHUTDOWN_NOT_DONE)
+ && (retry_shutdown > 0)
+ ); /* There may be pending data, so wait until done. */
+ Serial.println();
+
+ if (retry_shutdown <= 0) {
+ /* if wolfSSL_free is called before properly shutting down the
+ * ssl object, undesired results may occur. */
+ Serial.println(F("Warning! Shutdown did not properly complete."));
}
- wolfSSL_shutdown(ssl);
+
wolfSSL_free(ssl);
client.stop();
- Serial.println("Connection complete.");
- reconnect = 0;
- }
+ Serial.println(F("Connection complete."));
+ if (REPEAT_CONNECTION) {
+ reconnect = RECONNECT_ATTEMPTS;
+ }
+ else {
+ reconnect = 0;
+ }
+ } /* client.connect(host, port) */
else {
- Serial.println("Trying to reconnect...");
+ Serial.println(F("Problem sending message. Trying to reconnect..."));
}
}
delay(1000);
-}
+ if ((reconnect > 0) && (REPEAT_CONNECTION)) {
+ Serial.println(F("Arduino loop repeating..."));
+ Serial.println();
+ }
+ else {
+ printf("wow");
+ Serial.println(F("Done!"));
+ while(1) {
+ /* wait forever */
+ }
+ }
+
+#if defined(MEMORY_STRESS_TEST)
+ if (mem_ctr < MEMORY_STRESS_ITERATIONS) {
+ /* reminder: mem_ctr == 0 is MEMORY_STRESS_INITIAL allocation */
+ mem_ctr++;
+ Serial.print(F("Memory stress increment: "));
+ Serial.print(mem_ctr);
+ Serial.print(F(". Allocating addition memory (bytes): "));
+ Serial.println(MEMORY_STRESS_BLOCK_SIZE);
+ memory_stress[mem_ctr] = (char*)malloc(MEMORY_STRESS_BLOCK_SIZE);
+ show_memory();
+ }
+#endif
+} /* Arduino loop repeats */
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/README.md b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/README.md
new file mode 100644
index 00000000..523eb087
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/README.md
@@ -0,0 +1,134 @@
+# Arduino Basic TLS Server
+
+Open the [wolfssl_server.ino](./wolfssl_server.ino) file in the Arduino IDE.
+
+Other IDE products are also supported, such as:
+
+- [PlatformIO in VS Code](https://docs.platformio.org/en/latest/frameworks/arduino.html)
+- [VisualGDB](https://visualgdb.com/tutorials/arduino/)
+- [VisualMicro](https://www.visualmicro.com/)
+
+For examples on other platforms, see the [IDE directory](https://github.com/wolfssl/wolfssl/tree/master/IDE).
+Additional examples can be found on [wolfSSL/wolfssl-examples](https://github.com/wolfSSL/wolfssl-examples/).
+
+## Connect with an Arduino Sketch
+
+See the companion [Arduino Sketch Client](../wolfssl_client/wolfssl_client.ino).
+
+## Connect with Linux Client
+
+See also the [wolfSSL Example TLS Client](https://github.com/wolfSSL/wolfssl/tree/master/examples/client)
+and [wolfSSL Example TLS Server](https://github.com/wolfSSL/wolfssl/tree/master/examples/server).
+
+Assuming a listening [Arduino Sketch Server](./wolfssl_server.ino) at `192.168.1.38` on port `11111`,
+connect with the `client` executable:
+
+```
+./examples/client/client -h 192.168.1.38 -p 11111 -v 3
+```
+
+## wolfSSL Error -308 wolfSSL_connect error state on socket
+
+When using a wired Ethernet connection, and this error is encountered, simply
+press the reset button or power cycle the Arduino before making a connection.
+
+Here's one possible script to test the server from a command-line client:
+
+```bash
+#!/bin/bash
+echo "client log " > client_log.txt
+counter=1
+THIS_ERR=0
+while [ $THIS_ERR -eq 0 ]; do
+ ./examples/client/client -h 192.168.1.38 -p 11111 -v 3 >> client_log.txt
+
+ THIS_ERR=$?
+ if [ $? -ne 0 ]; then
+ echo "Failed!"
+ exit 1
+ fi
+ echo "Iteration $counter"
+ echo "Iteration $counter" >> client_log.txt
+ ((counter++))
+done
+```
+
+Output expected from the `client` command:
+
+```
+$ ./examples/client/client -h 192.168.1.38 -p 11111 -v 3
+Alternate cert chain used
+ issuer : /C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
+ subject: /C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Support/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
+ altname = example.com
+ altname = 127.0.0.1
+ serial number:01
+SSL version is TLSv1.2
+SSL cipher suite is ECDHE-RSA-AES128-GCM-SHA256
+SSL curve name is SECP256R1
+---
+Server certificate
+-----BEGIN CERTIFICATE-----
+MIIE6DCCA9CgAwIBAgIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMx
+EDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNh
+d3Rvb3RoMRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
+bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMjMxMjEz
+MjIxOTI4WhcNMjYwOTA4MjIxOTI4WjCBkDELMAkGA1UEBhMCVVMxEDAOBgNVBAgM
+B01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wxEDAO
+BgNVBAsMB1N1cHBvcnQxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
+SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAMCVCOFXQfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hn
+f/5cnFF194rKB+c1L4/hvXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/X
+GQ0lT+FjY1GLC2Q/rUO4pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bM
+QLRpo0YzaYduxLsXpvPo3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq
+0KGWSrzh1Bpbx6DAwWN4D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ
+6dgIvDMgs1gip6rrxOHmYYPF0pbf2dBPrdcCAwEAAaOCAUUwggFBMB0GA1UdDgQW
+BBSzETLJkpiE4sn40DtuA0LKHw6OPDCB1AYDVR0jBIHMMIHJgBQnjmcRdMMmHT/t
+M2OzpNgdMOXo1aGBmqSBlzCBlDELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB01vbnRh
+bmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3RoMRMwEQYDVQQL
+DApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20xHzAdBgkqhkiG
+9w0BCQEWEGluZm9Ad29sZnNzbC5jb22CFDNEGqhsAez2YPJwUQpM0RT6vOlEMAwG
+A1UdEwQFMAMBAf8wHAYDVR0RBBUwE4ILZXhhbXBsZS5jb22HBH8AAAEwHQYDVR0l
+BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQBK/7nl
+hZvaU2Z/ByK/thnqQuukEQdi/zlfMzc6hyZxPROyyrhkOHuKmUgOpaRrsZlu4EZR
+vRlSrbymfip6fCOnzNteQ31rBMi33ZWt8JGAWcUZkSYnkbhIHOtVtqp9pDjxA7xs
+i6qU1jwFepbFBvEmFC51+93lNbMBLLOtYlohmgi+Vvz5okKHhuWpxZnPrhS+4LkI
+JA0dXNYU4UyfQLOp6S1Si0y/rEQxZ8GNBoXsD+SZ10t7IQZm1OT1nf+O8IY5WB2k
+W+Jj73zJGIeoAiUQPoco+fXvR56lgAgRkGj+0aOoUbk3/9XKfId/a7wsEsjFhYv8
+DMa5hrjJBMNRN9JP
+-----END CERTIFICATE-----
+Session timeout set to 500 seconds
+Client Random : 56A0BB9647B064D3F20947032B74B31FDB4C93DBAC9460BA8AEA213A2B2DD4A8
+SSL-Session:
+ Protocol : TLSv1.2
+ Cipher : TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
+ Session-ID: 3255404E997FA9C27ECB4F1A20A70E722E4AA504B63A945FC175434D1907EC31
+ Session-ID-ctx:
+ Master-Key: 67F22168BBADD678643BBA76B398277270C29788AC18FD05B57F6B715F49A7BCEEF75BEAF7FE266B0CC058534AF76C1F
+ TLS session ticket: NONE
+ Start Time: 1705533296
+ Timeout : 500 (sec)
+ Extended master secret: no
+I hear you fa shizzle!
+```
+
+### Troubleshooting
+
+When encountering odd errors such as `undefined reference to ``_impure_ptr'`, such as this:
+
+```text
+c:/users/gojimmypi/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\gojimmypi\AppData\Local\Temp\arduino\sketches\EAB8D79A02D1ECF107884802D893914E\libraries\wolfSSL\wolfcrypt\src\logging.c.o:(.literal.wolfssl_log+0x8): undefined reference to `_impure_ptr'
+collect2.exe: error: ld returned 1 exit status
+
+exit status 1
+
+Compilation error: exit status 1
+```
+
+Try cleaning the Arduino cache directories. For Windows, that's typically in:
+
+```text
+C:\Users\%USERNAME%\AppData\Local\Temp\arduino\sketches
+```
+
+Remove all other boards from other serial ports, leaving one the one being programmed.
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
index f331e781..3a894323 100644
--- a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_server/wolfssl_server.ino
@@ -19,161 +19,820 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
+/*
+Tested with:
+
+1) Intel Galileo acting as the Client, with a laptop acting as a server using
+ the server example provided in examples/server.
+ Legacy Arduino v1.86 was used to compile and program the Galileo
+
+2) Espressif ESP32 WiFi
+
+3) Arduino Due, Nano33 IoT, Nano RP-2040
+*/
+
+/*
+ * Note to code editors: the Arduino client and server examples are edited in
+ * parallel for side-by-side comparison between examples.
+ */
+
+/* If you have a private include, define it here, otherwise edit WiFi params */
+#define MY_PRIVATE_CONFIG "/workspace/my_private_config.h"
+
+/* set REPEAT_CONNECTION to a non-zero value to continually run the example. */
+#define REPEAT_CONNECTION 1
+
+/* Edit this with your other TLS host server address to connect to: */
+/* #define WOLFSSL_TLS_SERVER_HOST "192.168.1.34" */
+
+/* wolfssl TLS examples communicate on port 11111 */
+#define WOLFSSL_PORT 11111
+
+/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
+#define SERIAL_BAUD 115200
+
+/* We'll wait up to 2000 milliseconds to properly shut down connection */
+#define SHUTDOWN_DELAY_MS 2000
+
+/* Number of times to retry connection. */
+#define RECONNECT_ATTEMPTS 20
+
+/* Optional stress test. Define to consume memory until exhausted: */
+/* #define MEMORY_STRESS_TEST */
+
+/* Choose client or server example, not both. */
+/* #define WOLFSSL_CLIENT_EXAMPLE */
+#define WOLFSSL_SERVER_EXAMPLE
+
+#if defined(MY_PRIVATE_CONFIG)
+ /* the /workspace directory may contain a private config
+ * excluded from GitHub with items such as WiFi passwords */
+ #include MY_PRIVATE_CONFIG
+ static const char* ssid PROGMEM = MY_ARDUINO_WIFI_SSID;
+ static const char* password PROGMEM = MY_ARDUINO_WIFI_PASSWORD;
+#else
+ /* when using WiFi capable boards: */
+ static const char* ssid PROGMEM = "your_SSID";
+ static const char* password PROGMEM = "your_PASSWORD";
+#endif
+
+#define BROADCAST_ADDRESS "255.255.255.255"
+
+/* There's an optional 3rd party NTPClient library by Fabrice Weinberg.
+ * If it is installed, uncomment define USE_NTP_LIB here: */
+/* #define USE_NTP_LIB */
+#ifdef USE_NTP_LIB
+ #include <NTPClient.h>
+#endif
#include <wolfssl.h>
+/* Important: make sure settings.h appears before any other wolfSSL headers */
+#include <wolfssl/wolfcrypt/settings.h>
+/* Reminder: settings.h includes user_settings.h
+ * For ALL project wolfSSL settings, see:
+ * [your path]/Arduino\libraries\wolfSSL\src\user_settings.h */
#include <wolfssl/ssl.h>
-#include <Ethernet.h>
-
-#define USE_CERT_BUFFERS_256
#include <wolfssl/certs_test.h>
+#include <wolfssl/wolfcrypt/error-crypt.h>
-#ifdef NO_WOLFSSL_SERVER
- #error Please undefine NO_WOLFSSL_SERVER for this example
+/* Define DEBUG_WOLFSSL in user_settings.h for more verbose logging. */
+#if defined(DEBUG_WOLFSSL)
+ #define PROGRESS_DOT F("")
+#else
+ #define PROGRESS_DOT F(".")
#endif
-const int port = 11111; /* port to listen on */
+/* Convert a macro to a string */
+#define xstr(x) str(x)
+#define str(x) #x
-int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
-int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
+/* optional board-specific networking includes */
+#if defined(ESP32)
+ #define USING_WIFI
+ #include <WiFi.h>
+ #include <WiFiUdp.h>
+ #ifdef USE_NTP_LIB
+ WiFiUDP ntpUDP;
+ #endif
+ /* Ensure the F() flash macro is defined */
+ #ifndef F
+ #define F
+ #endif
+ WiFiClient client;
+ WiFiServer server(WOLFSSL_PORT);
+#elif defined(ESP8266)
+ #define USING_WIFI
+ #include <ESP8266WiFi.h>
+ WiFiClient client;
+ WiFiServer server(WOLFSSL_PORT);
+#elif defined(ARDUINO_SAM_DUE)
+ #include <SPI.h>
+ /* There's no WiFi/Ethernet on the Due. Requires Ethernet Shield.
+ /* Needs "Ethernet by Various" library to be installed. Tested with V2.0.2 */
+ #include <Ethernet.h>
+ EthernetClient client;
+ EthernetClient server(WOLFSSL_PORT);
+#elif defined(ARDUINO_SAMD_NANO_33_IOT)
+ #define USING_WIFI
+ #include <SPI.h>
+ #include <WiFiNINA.h> /* Needs Arduino WiFiNINA library installed manually */
+ WiFiClient client;
+ WiFiServer server(WOLFSSL_PORT);
+#elif defined(ARDUINO_ARCH_RP2040)
+ #define USING_WIFI
+ #include <SPI.h>
+ #include <WiFiNINA.h>
+ WiFiClient client;
+ WiFiServer server(WOLFSSL_PORT);
+#elif defined(USING_WIFI)
+ #define USING_WIFI
+ #include <WiFi.h>
+ #include <WiFiUdp.h>
+ #ifdef USE_NTP_LIB
+ WiFiUDP ntpUDP;
+ #endif
+ WiFiClient client;
+ WiFiServer server(WOLFSSL_PORT);
+/* TODO
+#elif defined(OTHER_BOARD)
+*/
+#else
+ #define USING_WIFI
+ WiFiClient client;
+ WiFiServer server(WOLFSSL_PORT);
+#endif
-EthernetServer server(port);
-EthernetClient client;
+/* Only for syntax highlighters to show interesting options enabled: */
+#if defined(HAVE_SNI) \
+ || defined(HAVE_MAX_FRAGMENT) \
+ || defined(HAVE_TRUSTED_CA) \
+ || defined(HAVE_TRUNCATED_HMAC) \
+ || defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
+ || defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2) \
+ || defined(HAVE_SUPPORTED_CURVES) \
+ || defined(HAVE_ALPN) \
+ || defined(HAVE_SESSION_TICKET) \
+ || defined(HAVE_SECURE_RENEGOTIATION) \
+ || defined(HAVE_SERVER_RENEGOTIATION_INFO)
+#endif
-WOLFSSL_CTX* ctx = NULL;
-WOLFSSL* ssl = NULL;
-void setup() {
- int err;
- WOLFSSL_METHOD* method;
+/* we expect our IP address from DHCP */
- Serial.begin(9600);
+static WOLFSSL_CTX* ctx = NULL;
+static WOLFSSL* ssl = NULL;
+static char* wc_error_message = (char*)malloc(80 + 1);
+static char errBuf[80];
- method = wolfTLSv1_2_server_method();
- if (method == NULL) {
- Serial.println("unable to get method");
- return;
- }
- ctx = wolfSSL_CTX_new(method);
- if (ctx == NULL) {
- Serial.println("unable to get ctx");
- return;
- }
-
- /* initialize wolfSSL using callback functions */
- wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
- wolfSSL_SetIOSend(ctx, EthernetSend);
- wolfSSL_SetIORecv(ctx, EthernetReceive);
-
- /* setup the private key and certificate */
- err = wolfSSL_CTX_use_PrivateKey_buffer(ctx, ecc_key_der_256,
- sizeof_ecc_key_der_256, WOLFSSL_FILETYPE_ASN1);
- if (err != WOLFSSL_SUCCESS) {
- Serial.println("error setting key");
- return;
- }
- err = wolfSSL_CTX_use_certificate_buffer(ctx, serv_ecc_der_256,
- sizeof_serv_ecc_der_256, WOLFSSL_FILETYPE_ASN1);
- if (err != WOLFSSL_SUCCESS) {
- Serial.println("error setting certificate");
- return;
- }
+#if defined(MEMORY_STRESS_TEST)
+ #define MEMORY_STRESS_ITERATIONS 100
+ #define MEMORY_STRESS_BLOCK_SIZE 1024
+ #define MEMORY_STRESS_INITIAL (4*1024)
+ static char* memory_stress[MEMORY_STRESS_ITERATIONS]; /* typically 1K per item */
+ static int mem_ctr = 0;
+#endif
- /* Start the server */
- server.begin();
-
- return;
+static int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx);
+static int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx);
+static int reconnect = RECONNECT_ATTEMPTS;
+static int lng_index PROGMEM = 0; /* 0 = English */
+
+#if defined(__arm__)
+ #include <malloc.h>
+ extern char _end;
+ extern "C" char *sbrk(int i);
+ static char *ramstart=(char *)0x20070000;
+ static char *ramend=(char *)0x20088000;
+#endif
+
+/*****************************************************************************/
+/* fail_wait - in case of unrecoverable error */
+/*****************************************************************************/
+int fail_wait(void) {
+ show_memory();
+
+ Serial.println(F("Failed. Halt."));
+ while (1) {
+ delay(1000);
+ }
+ return 0;
}
-int EthernetSend(WOLFSSL* ssl, char* msg, int sz, void* ctx) {
- int sent = 0;
+/*****************************************************************************/
+/* show_memory() to optionally view during debugging. */
+/*****************************************************************************/
+int show_memory(void)
+{
+#if defined(__arm__)
+ struct mallinfo mi = mallinfo();
+
+ char *heapend=sbrk(0);
+ register char * stack_ptr asm("sp");
+ #if defined(DEBUG_WOLFSSL_VERBOSE)
+ Serial.print(" arena=");
+ Serial.println(mi.arena);
+ Serial.print(" ordblks=");
+ Serial.println(mi.ordblks);
+ Serial.print(" uordblks=");
+ Serial.println(mi.uordblks);
+ Serial.print(" fordblks=");
+ Serial.println(mi.fordblks);
+ Serial.print(" keepcost=");
+ Serial.println(mi.keepcost);
+ #endif
+
+ #if defined(DEBUG_WOLFSSL) || defined(MEMORY_STRESS_TEST)
+ Serial.print("Estimated free memory: ");
+ Serial.print(stack_ptr - heapend + mi.fordblks);
+ Serial.println(F(" bytes"));
+ #endif
+
+ #if (0)
+ /* Experimental: not supported on all devices: */
+ Serial.print("RAM Start %lx\n", (unsigned long)ramstart);
+ Serial.print("Data/Bss end %lx\n", (unsigned long)&_end);
+ Serial.print("Heap End %lx\n", (unsigned long)heapend);
+ Serial.print("Stack Ptr %lx\n",(unsigned long)stack_ptr);
+ Serial.print("RAM End %lx\n", (unsigned long)ramend);
- sent = client.write((byte*)msg, sz);
+ Serial.print("Heap RAM Used: ",mi.uordblks);
+ Serial.print("Program RAM Used ",&_end - ramstart);
+ Serial.print("Stack RAM Used ",ramend - stack_ptr);
- return sent;
+ Serial.print("Estimated Free RAM: %d\n\n",stack_ptr - heapend + mi.fordblks);
+ #endif
+#else
+ Serial.println(F("show_memory() not implemented for this platform"));
+#endif
+ return 0;
}
+/*****************************************************************************/
+/* EthernetSend() to send a message string. */
+/*****************************************************************************/
+int EthernetSend(WOLFSSL* ssl, char* message, int sz, void* ctx) {
+ int sent = 0;
+ (void)ssl;
+ (void)ctx;
+
+ sent = client.write((byte*)message, sz);
+ return sent;
+}
+
+/*****************************************************************************/
+/* EthernetReceive() to receive a reply string. */
+/*****************************************************************************/
int EthernetReceive(WOLFSSL* ssl, char* reply, int sz, void* ctx) {
- int ret = 0;
+ int ret = 0;
+ (void)ssl;
+ (void)ctx;
- while (client.available() > 0 && ret < sz) {
- reply[ret++] = client.read();
- }
+ while (client.available() > 0 && ret < sz) {
+ reply[ret++] = client.read();
+ }
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_hardware() */
+/*****************************************************************************/
+int setup_hardware(void) {
+ int ret = 0;
+
+#if defined(ARDUINO_SAMD_NANO_33_IOT)
+ Serial.println(F("Detected known tested and working Arduino Nano 33 IoT"));
+#elif defined(ARDUINO_ARCH_RP2040)
+ Serial.println(F("Detected known tested and working Arduino RP-2040"));
+#elif defined(__arm__) && defined(ID_TRNG) && defined(TRNG)
+ /* need to manually turn on random number generator on Arduino Due, etc. */
+ pmc_enable_periph_clk(ID_TRNG);
+ trng_enable(TRNG);
+ Serial.println(F("Enabled ARM TRNG"));
+#endif
- return ret;
+ show_memory();
+ randomSeed(analogRead(0));
+ return ret;
}
-void loop() {
- int err = 0;
- int input = 0;
- char errBuf[80];
- char reply[80];
- int replySz = 0;
- const char* cipherName;
-
- /* Listen for incoming client requests. */
- client = server.available();
- if (!client) {
+/*****************************************************************************/
+/* Arduino setup_datetime() */
+/* The device needs to have a valid date within the valid range of certs. */
+/*****************************************************************************/
+int setup_datetime(void) {
+ int ret = 0;
+ int ntp_tries = 20;
+
+ /* we need a date in the range of cert expiration */
+#ifdef USE_NTP_LIB
+ #if defined(ESP32)
+ NTPClient timeClient(ntpUDP, "pool.ntp.org");
+
+ timeClient.begin();
+ timeClient.update();
+ delay(1000);
+ while (!timeClient.isTimeSet() && (ntp_tries > 0)) {
+ timeClient.forceUpdate();
+ Serial.println(F("Waiting for NTP update"));
+ delay(2000);
+ ntp_tries--;
+ }
+ if (ntp_tries <= 0) {
+ Serial.println(F("Warning: gave up waiting on NTP"));
+ }
+ Serial.println(timeClient.getFormattedTime());
+ Serial.println(timeClient.getEpochTime());
+ #endif
+#endif
+
+#if defined(ESP32)
+ /* see esp32-hal-time.c */
+ ntp_tries = 5;
+ /* Replace "pool.ntp.org" with your preferred NTP server */
+ configTime(0, 0, "pool.ntp.org");
+
+ /* Wait for time to be set */
+ while ((time(nullptr) <= 100000) && ntp_tries > 0) {
+ Serial.println(F("Waiting for time to be set..."));
+ delay(2000);
+ ntp_tries--;
+ }
+#endif
+
+ return ret;
+} /* setup_datetime */
+
+/*****************************************************************************/
+/* Arduino setup_network() */
+/*****************************************************************************/
+int setup_network(void) {
+ int ret = 0;
+
+#if defined(USING_WIFI)
+ int status = WL_IDLE_STATUS;
+
+ /* The ESP8266 & ESP32 support both AP and STA. We'll use STA: */
+ #if defined(ESP8266) || defined(ESP32)
+ WiFi.mode(WIFI_STA);
+ #else
+ String fv;
+ if (WiFi.status() == WL_NO_MODULE) {
+ Serial.println("Communication with WiFi module failed!");
+ /* don't continue if no network */
+ while (true) ;
+ }
+
+ fv = WiFi.firmwareVersion();
+ if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
+ Serial.println("Please upgrade the firmware");
+ }
+ #endif
+
+ Serial.print(F("Connecting to WiFi "));
+ Serial.print(ssid);
+ status = WiFi.begin(ssid, password);
+ while (status != WL_CONNECTED) {
+ delay(1000);
+ Serial.print(F("."));
+ Serial.print(status);
+ status = WiFi.status();
+ }
+
+ Serial.println(F(" Connected!"));
+#else
+ /* Newer Ethernet shields have a
+ * MAC address printed on a sticker on the shield */
+ byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
+ IPAddress ip(192, 168, 1, 42);
+ IPAddress myDns(192, 168, 1, 1);
+ Ethernet.init(10); /* Most Arduino shields */
+ /* Ethernet.init(5); * MKR ETH Shield */
+ /* Ethernet.init(0); * Teensy 2.0 */
+ /* Ethernet.init(20); * Teensy++ 2.0 */
+ /* Ethernet.init(15); * ESP8266 with Adafruit FeatherWing Ethernet */
+ /* Ethernet.init(33); * ESP32 with Adafruit FeatherWing Ethernet */
+ Serial.println(F("Initialize Ethernet with DHCP:"));
+ if (Ethernet.begin(mac) == 0) {
+ Serial.println(F("Failed to configure Ethernet using DHCP"));
+ /* Check for Ethernet hardware present */
+ if (Ethernet.hardwareStatus() == EthernetNoHardware) {
+ Serial.println(F("Ethernet shield was not found."));
+ while (true) {
+ delay(1); /* do nothing */
+ }
+ }
+ if (Ethernet.linkStatus() == LinkOFF) {
+ Serial.println(F("Ethernet cable is not connected."));
+ }
+ /* try to configure using IP address instead of DHCP : */
+ Ethernet.begin(mac, ip, myDns);
+ }
+ else {
+ Serial.print(F(" DHCP assigned IP "));
+ Serial.println(Ethernet.localIP());
+ }
+ /* We'll assume the Ethernet connection is ready to go. */
+#endif
+
+ Serial.println(F("********************************************************"));
+ Serial.print(F(" wolfSSL Example Server IP = "));
+#if defined(USING_WIFI)
+ Serial.println(WiFi.localIP());
+#else
+ Serial.println(Ethernet.localIP());
+#endif
+ /* In server mode, there's no host definition. */
+ /* See companion example: wolfssl_client.ino */
+ Serial.println(F("********************************************************"));
+ Serial.println(F("Setup network complete."));
+
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_wolfssl() */
+/*****************************************************************************/
+int setup_wolfssl(void) {
+ int ret = 0;
+ WOLFSSL_METHOD* method;
+
+ /* Show a revision of wolfssl user_settings.h file in use when available: */
+#if defined(WOLFSSL_USER_SETTINGS_ID)
+ Serial.print(F("WOLFSSL_USER_SETTINGS_ID: "));
+ Serial.println(F(WOLFSSL_USER_SETTINGS_ID));
+#else
+ Serial.println(F("No WOLFSSL_USER_SETTINGS_ID found."));
+#endif
+
+#if defined(NO_WOLFSSL_SERVER)
+ Serial.println(F("wolfSSL server code disabled to save space."));
+#endif
+#if defined(NO_WOLFSSL_CLIENT)
+ Serial.println(F("wolfSSL client code disabled to save space."));
+#endif
+
+#if defined(DEBUG_WOLFSSL)
+ wolfSSL_Debugging_ON();
+ Serial.println(F("wolfSSL Debugging is On!"));
+#else
+ Serial.println(F("wolfSSL Debugging is Off! (enable with DEBUG_WOLFSSL)"));
+#endif
+
+ /* See ssl.c for TLS cache settings. Larger cache = use more RAM. */
+#if defined(NO_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS NO_SESSION_CACHE"));
+#elif defined(MICRO_SESSION_CACHEx)
+ Serial.println(F("wolfSSL TLS MICRO_SESSION_CACHE"));
+#elif defined(SMALL_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS SMALL_SESSION_CACHE"));
+#elif defined(MEDIUM_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS MEDIUM_SESSION_CACHE"));
+#elif defined(BIG_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS BIG_SESSION_CACHE"));
+#elif defined(HUGE_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
+#elif defined(HUGE_SESSION_CACHE)
+ Serial.println(F("wolfSSL TLS HUGE_SESSION_CACHE"));
+#else
+ Serial.println(F("WARNING: Unknown or no TLS session cache setting."));
+ /* See wolfssl/src/ssl.c for amount of memory used.
+ * It is best on embedded devices to choose a TLS session cache size. */
+#endif
+
+ ret = wolfSSL_Init();
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.println("Successfully called wolfSSL_Init");
+ }
+ else {
+ Serial.println("ERROR: wolfSSL_Init failed");
+ }
+
+ /* See companion server example with wolfSSLv23_server_method here.
+ * method = wolfSSLv23_client_method()); SSL 3.0 - TLS 1.3.
+ * method = wolfTLSv1_2_client_method(); only TLS 1.2
+ * method = wolfTLSv1_3_client_method(); only TLS 1.3
+ *
+ * see Arduino\libraries\wolfssl\src\user_settings.h */
+
+ Serial.println("Here we go!");
+
+ method = wolfSSLv23_server_method();
+ if (method == NULL) {
+ Serial.println(F("unable to get wolfssl server method"));
+ fail_wait();
+ }
+ ctx = wolfSSL_CTX_new(method);
+ if (ctx == NULL) {
+ Serial.println(F("unable to get ctx"));
+ fail_wait();
+ }
+
+ return ret;
+}
+
+/*****************************************************************************/
+/* Arduino setup_certificates() */
+/*****************************************************************************/
+int setup_certificates(void) {
+ int ret = 0;
+
+ Serial.println(F("Initializing certificates..."));
+ show_memory();
+
+ /* Use built-in validation, No verification callback function: */
+ wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
+
+ /* Certificate */
+ Serial.println("Initializing certificates...");
+ ret = wolfSSL_CTX_use_certificate_buffer(ctx,
+ CTX_SERVER_CERT,
+ CTX_SERVER_CERT_SIZE,
+ CTX_CA_CERT_TYPE);
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.print("Success: use certificate: ");
+ Serial.println(xstr(CTX_SERVER_CERT));
+ }
+ else {
+ Serial.print("Error: wolfSSL_CTX_use_certificate_buffer failed: ");
+ wc_ErrorString(ret, wc_error_message);
+ Serial.println(wc_error_message);
+ fail_wait();
+ }
+
+ /* Setup private server key */
+ ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
+ CTX_SERVER_KEY,
+ CTX_SERVER_KEY_SIZE,
+ CTX_SERVER_KEY_TYPE);
+ if (ret == WOLFSSL_SUCCESS) {
+ Serial.print("Success: use private key buffer: ");
+ Serial.println(xstr(CTX_SERVER_KEY));
+ }
+ else {
+ Serial.print("Error: wolfSSL_CTX_use_PrivateKey_buffer failed: ");
+ wc_ErrorString(ret, wc_error_message);
+ Serial.println(wc_error_message);
+ fail_wait();
+ }
+
+ return ret;
+} /* Arduino setup */
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Arduino setup() */
+/*****************************************************************************/
+/*****************************************************************************/
+void setup(void) {
+ int i = 0;
+ Serial.begin(SERIAL_BAUD);
+ while (!Serial && (i < 10)) {
+ /* wait for serial port to connect. Needed for native USB port only */
+ delay(1000);
+ i++;
+ }
+
+ Serial.println(F(""));
+ Serial.println(F(""));
+ Serial.println(F("wolfSSL TLS Server Example Startup."));
+
+ /* define DEBUG_WOLFSSL in wolfSSL user_settings.h for diagnostics */
+#if defined(DEBUG_WOLFSSL)
+ wolfSSL_Debugging_ON();
+#endif
+
+ /* Optionally pre-allocate a large block of memory for testing */
+#if defined(MEMORY_STRESS_TEST)
+ Serial.println(F("WARNING: Memory Stress Test Active!"));
+ Serial.print(F("Allocating extra memory: "));
+ Serial.print(MEMORY_STRESS_INITIAL);
+ Serial.println(F(" bytes..."));
+ memory_stress[mem_ctr] = (char*)malloc(MEMORY_STRESS_INITIAL);
+ show_memory();
+#endif
+
+ setup_hardware();
+
+ setup_network();
+
+ setup_datetime();
+
+ setup_wolfssl();
+
+ setup_certificates();
+
+ /* Initialize wolfSSL using callback functions. */
+ wolfSSL_SetIOSend(ctx, EthernetSend);
+ wolfSSL_SetIORecv(ctx, EthernetReceive);
+
+#if defined THIS_USER_SETTINGS_VERSION
+ Serial.print(F("This user_settings.h version:"))
+ Serial.println(THIS_USER_SETTINGS_VERSION)
+#endif
+
+ /* Start the server
+ * See https://www.arduino.cc/reference/en/libraries/ethernet/server.begin/
+ */
+
+ Serial.println(F("Completed Arduino setup()"));
+
+ server.begin();
+ Serial.println("Begin Server... (waiting for remote client to connect)");
+
+ /* See companion wolfssl_client.ino code */
return;
- }
+} /* Arduino setup */
+
+/*****************************************************************************/
+/* wolfSSL error_check() */
+/*****************************************************************************/
+int error_check(int this_ret, bool halt_on_error,
+ const __FlashStringHelper* message) {
+ int ret = 0;
+ if (this_ret == WOLFSSL_SUCCESS) {
+ Serial.print(F("Success: "));
+ Serial.println(message);
+ }
+ else {
+ Serial.print(F("ERROR: return = "));
+ Serial.print(this_ret);
+ Serial.print(F(": "));
+ Serial.println(message);
+ Serial.println(wc_GetErrorString(this_ret));
+ if (halt_on_error) {
+ fail_wait();
+ }
+ }
+ show_memory();
- if (client.connected()) {
+ return ret;
+} /* error_check */
- Serial.println("Client connected");
+/*****************************************************************************/
+/* wolfSSL error_check_ssl */
+/* Parameters: */
+/* ssl is the current WOLFSSL object pointer */
+/* halt_on_error set to true to suspend operations for critical error */
+/* message is expected to be a memory-efficient F("") macro string */
+/*****************************************************************************/
+int error_check_ssl(WOLFSSL* ssl, int this_ret, bool halt_on_error,
+ const __FlashStringHelper* message) {
+ int err = 0;
- ssl = wolfSSL_new(ctx);
if (ssl == NULL) {
- Serial.println("Unable to allocate SSL object");
- return;
- }
-
- err = wolfSSL_accept(ssl);
- if (err != WOLFSSL_SUCCESS) {
- err = wolfSSL_get_error(ssl, 0);
- wolfSSL_ERR_error_string(err, errBuf);
- Serial.print("TLS Accept Error: ");
- Serial.println(errBuf);
- }
-
- Serial.print("SSL version is ");
- Serial.println(wolfSSL_get_version(ssl));
-
- cipherName = wolfSSL_get_cipher(ssl);
- Serial.print("SSL cipher suite is ");
- Serial.println(cipherName);
-
- Serial.print("Server Read: ");
- /* wait for data */
- while (!client.available()) {}
- /* read data */
- while (wolfSSL_pending(ssl)) {
- input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
- if (input < 0) {
- err = wolfSSL_get_error(ssl, 0);
- wolfSSL_ERR_error_string(err, errBuf);
- Serial.print("TLS Read Error: ");
- Serial.println(errBuf);
- break;
- } else if (input > 0) {
- replySz = input;
- reply[input] = '\0';
- Serial.print(reply);
- } else {
- Serial.println();
- }
- }
-
- /* echo data */
- if ((wolfSSL_write(ssl, reply, replySz)) != replySz) {
- err = wolfSSL_get_error(ssl, 0);
- wolfSSL_ERR_error_string(err, errBuf);
- Serial.print("TLS Write Error: ");
- Serial.println(errBuf);
- }
-
- wolfSSL_shutdown(ssl);
- wolfSSL_free(ssl);
- }
-
- client.stop();
- Serial.println("Connection complete");
+ Serial.println(F("ssl is Null; Unable to allocate SSL object?"));
+#ifndef DEBUG_WOLFSSL
+ Serial.println(F("Define DEBUG_WOLFSSL in user_settings.h for more."));
+#else
+ Serial.println(F("See wolfssl/wolfcrypt/error-crypt.h for codes."));
+#endif
+ Serial.print(F("ERROR: "));
+ Serial.println(message);
+ show_memory();
+ if (halt_on_error) {
+ fail_wait();
+ }
+ }
+ else {
+ err = wolfSSL_get_error(ssl, this_ret);
+ if (err == WOLFSSL_SUCCESS) {
+ Serial.print(F("Success m: "));
+ Serial.println(message);
+ }
+ else {
+ if (err < 0) {
+ wolfSSL_ERR_error_string(err, errBuf);
+ Serial.print(F("WOLFSSL Error: "));
+ Serial.print(err);
+ Serial.print(F("; "));
+ Serial.println(errBuf);
+ }
+ else {
+ Serial.println(F("Success: ssl object."));
+ }
+ }
+ }
+
+ return err;
}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Arduino loop() */
+/*****************************************************************************/
+/*****************************************************************************/
+void loop() {
+ char errBuf[80] = "(no error";
+ char reply[80] = "(no reply)";
+ const char msg[] = "I hear you fa shizzle!";
+ const char* cipherName;
+ int input = 0;
+ int replySz = 0;
+ int retry_shutdown = SHUTDOWN_DELAY_MS; /* max try, once per millisecond */
+ int ret = 0;
+ IPAddress broadcast_address(255, 255, 255, 255);
+
+ /* Listen for incoming client requests. */
+ client = server.available();
+ if (client) {
+ Serial.println("Have Client");
+ while (!client.connected()) {
+ /* wait for the client to actually connect */
+ delay(10);
+ }
+ Serial.print("Client connected from remote IP: ");
+ Serial.println(client.remoteIP());
+
+ ssl = wolfSSL_new(ctx);
+ if (ssl == NULL) {
+ Serial.println("Unable to allocate SSL object");
+ fail_wait();
+ }
+
+ ret = wolfSSL_accept(ssl);
+ if (ret != WOLFSSL_SUCCESS) {
+ ret = wolfSSL_get_error(ssl, 0);
+ wolfSSL_ERR_error_string(ret, errBuf);
+ Serial.print("TLS Accept Error: ");
+ Serial.println(errBuf);
+ }
+
+ cipherName = wolfSSL_get_cipher(ssl);
+ Serial.print("SSL cipher suite is ");
+ Serial.println(cipherName);
+
+ Serial.print("Server Read: ");
+ while (!client.available()) {
+ /* wait for data */
+ }
+
+ /* read data */
+ while (wolfSSL_pending(ssl)) {
+ input = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
+ if (input < 0) {
+ ret = wolfSSL_get_error(ssl, 0);
+ wolfSSL_ERR_error_string(ret, errBuf);
+ Serial.print("TLS Read Error: ");
+ Serial.println(errBuf);
+ break;
+ }
+ else if (input > 0) {
+ replySz = input;
+ reply[input] = '\0';
+ Serial.print(reply);
+ }
+ else {
+ Serial.println("<end of reply, input == 0>");
+ }
+ }
+
+ /* Write our message into reply buffer to send */
+ memset(reply, 0, sizeof(reply));
+ memcpy(reply, msg, sizeof(msg));
+ replySz = strnlen(reply, sizeof(reply));
+
+ Serial.println("Sending reply...");
+ if ((wolfSSL_write(ssl, reply, replySz)) != replySz) {
+ ret = wolfSSL_get_error(ssl, 0);
+ wolfSSL_ERR_error_string(ret, errBuf);
+ Serial.print("TLS Write Error: ");
+ Serial.println(errBuf);
+ }
+ else {
+ Serial.println("Reply sent!");
+ }
+
+ Serial.println("Shutdown!");
+ do {
+ delay(1);
+ retry_shutdown--;
+ ret = wolfSSL_shutdown(ssl);
+ } while ((ret == WOLFSSL_SHUTDOWN_NOT_DONE) && (retry_shutdown > 0));
+
+ if (retry_shutdown <= 0) {
+ /* if wolfSSL_free is called before properly shutting down the
+ * ssl object, undesired results may occur. */
+ Serial.println("Warning! Shutdown did not properly complete.");
+ }
+
+ wolfSSL_free(ssl);
+ Serial.println("Connection complete.");
+ if (REPEAT_CONNECTION) {
+ Serial.println();
+ Serial.println("Waiting for next connection.");
+ }
+ else {
+ client.stop();
+ Serial.println("Done!");
+ while (1) {
+ /* wait forever if not repeating */
+ delay(100);
+ }
+ }
+ }
+ else {
+ /* Serial.println("Client not connected. Trying again..."); */
+ }
+
+ delay(100);
+} /* Arduino loop repeats */
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/README.md b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/README.md
new file mode 100644
index 00000000..3abfe829
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/README.md
@@ -0,0 +1,3 @@
+# Arduino Basic Hello World
+
+This example simply compiles in wolfSSL and shows the current version number.
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/wolfssl_version.ino b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/wolfssl_version.ino
new file mode 100644
index 00000000..b052b46e
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/sketches/wolfssl_version/wolfssl_version.ino
@@ -0,0 +1,24 @@
+#include <Arduino.h>
+#include <wolfssl.h>
+#include <wolfssl/version.h>
+
+/* Choose a monitor serial baud rate: 9600, 14400, 19200, 57600, 74880, etc. */
+#define SERIAL_BAUD 115200
+
+/* Arduino setup */
+void setup() {
+ Serial.begin(SERIAL_BAUD);
+ while (!Serial) {
+ /* wait for serial port to connect. Needed for native USB port only */
+ }
+ Serial.println(F(""));
+ Serial.println(F(""));
+ Serial.println(F("wolfSSL setup complete!"));
+}
+
+/* Arduino main application loop. */
+void loop() {
+ Serial.print("wolfSSL Version: ");
+ Serial.println(LIBWOLFSSL_VERSION_STRING);
+ delay(60000);
+}
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl-arduino.sh b/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl-arduino.sh
index 107f99b1..d48b4166 100755
--- a/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl-arduino.sh
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl-arduino.sh
@@ -2,19 +2,124 @@
# this script will reformat the wolfSSL source code to be compatible with
# an Arduino project
-# run as bash ./wolfssl-arduino.sh
+# run as bash ./wolfssl-arduino.sh [INSTALL] [path]
+#
+# ./wolfssl-arduino.sh
+# The default is to install to a local wolfSSL directory (`ROOT_DIR`).
+# If successfully built, and the INSTALL option is used, tis directory
+# is then moved to the target.
+#
+# ./wolfssl-arduino.sh INSTALL
+# Creates a local wolfSSL directory and then moves it to the ARDUINO_ROOT
+#
+# ./wolfssl-arduino.sh INSTALL /mnt/c/workspace/Arduino-wolfSSL-$USER
+# Updates the Arduino-wolfSSL fork for $USER to refresh versions.
+#
+# To ensure a pristine build, the directory must not exist.
+#
+# Reminder there's typically no $USER for GitHub actions, but:
+# ROOT_DIR="/mnt/c/Users/$USER/Documents/Arduino/libraries"
+#
+# The company name is "wolfSSL Inc."; There’s a space, no comma, and a period after "Inc."
+# The Arduino library name is "wolfssl" (all lower case)
+# The Arduino library directory name is "wolfssl" (all lower case)
+# The Arduino library include file is "wolfssl.h" (all lower case)
+# The Published wolfSSL Arduino Registry is at https://github.com/wolfSSL/Arduino-wolfSSL.git
+# See https://downloads.arduino.cc/libraries/logs/github.com/wolfSSL/Arduino-wolfSSL/
+ROOT_DIR="/wolfssl"
+
+# The Arduino Version will initially have a suffix appended during fine tuning stage.
+WOLFSSL_VERSION_ARUINO_SUFFIX="-Arduino.3"
+
+# For verbose copy, set CP_CMD="-v", otherwise clear it: CP_CMD="cp"
+# Do not set to empty string, as copy will fail with this: CP_CMD=""
+# CP_CMD="cp -v "
+CP_CMD="cp "
+
+# Specify the executable shell checker you want to use:
+MY_SHELLCHECK="shellcheck"
+
+# There are special circumstances to publish to GitHub repository.
+# Typically: https://github.com/wolfSSL/Arduino-wolfSSL
+#
+# Unlike a local Arduino library that requires a clean directory,
+# we'll allow extra files, overwrites, etc.
+#
+# Note in all cases, the local IDE/ARDUINO/wolfssl must be empty.
+THIS_INSTALL_IS_GITHUB="false"
+
+# Check if the executable is available in the PATH
+if command -v "$MY_SHELLCHECK" >/dev/null 2>&1; then
+ # Run your command here
+ shellcheck "$0" || exit 1
+else
+ echo "$MY_SHELLCHECK is not installed. Please install it if changes to this script have been made."
+fi
+
+if ! [ "$CP_CMD" = "cp " ]; then
+ if [ "$CP_CMD" = "cp -v" ]; then
+ echo "Copy verbose mode"
+ else
+ echo "ERROR: Copy mode not supported: $CP_CMD"
+ exit 1
+ fi
+fi
+
+# Check environment
+if [ -n "$WSL_DISTRO_NAME" ]; then
+ # we found a non-blank WSL environment distro name
+ current_path="$(pwd)"
+ pattern="/mnt/?"
+ if echo "$current_path" | grep -Eq "^$pattern"; then
+ # if we are in WSL and shared Windows file system, 'ln' does not work.
+ ARDUINO_ROOT="/mnt/c/Users/$USER/Documents/Arduino/libraries"
+ else
+ ARDUINO_ROOT="$HOME/Arduino/libraries"
+ fi
+fi
+echo "The Arduino library root is: $ARDUINO_ROOT"
+
+if [ $# -gt 0 ]; then
+ THIS_OPERATION="$1"
+ if [ "$THIS_OPERATION" = "INSTALL" ]; then
+ THIS_INSTALL_DIR=$2
+
+ echo "Install is active."
+
+ if [ "$THIS_INSTALL_DIR" = "" ]; then
+ if [ -d "$ARDUINO_ROOT$ROOT_DIR" ]; then
+ echo "Error: the installation directory already exists: $ARDUINO_ROOT$ROOT_DIR"
+ echo "A new directory needs to be created to ensure there are no stray files"
+ echo "Please delete or move the directory and try again."
+ exit 1
+ fi
+ else
+ echo "Installing to $THIS_INSTALL_DIR"
+ if [ -d "$THIS_INSTALL_DIR/.git" ];then
+ echo "Target is a GitHub repository."
+ THIS_INSTALL_IS_GITHUB="true"
+ else
+ echo "Target is NOT a GitHub repository."
+ fi
+ fi
+ else
+ echo "Error: not a valid operation: $THIS_OPERATION"
+ exit 1
+ fi
+fi
+
-ROOT_DIR="/wolfSSL"
ROOT_SRC_DIR="${ROOT_DIR}/src"
+EXAMPLES_DIR="${ROOT_DIR}/examples"
WOLFSSL_SRC="${ROOT_SRC_DIR}/src"
WOLFSSL_HEADERS="${ROOT_SRC_DIR}/wolfssl"
WOLFCRYPT_ROOT="${ROOT_SRC_DIR}/wolfcrypt"
WOLFCRYPT_SRC="${WOLFCRYPT_ROOT}/src"
WOLFCRYPT_HEADERS="${WOLFSSL_HEADERS}/wolfcrypt"
OPENSSL_DIR="${WOLFSSL_HEADERS}/openssl"
-WOLFSSL_VERSION="5.6.4"
-# TOP indicates the file directory comes from the top level of the wolfssl repo
+
+# TOP indicates the file directory for top level of the wolfssl repository.
TOP_DIR="../.."
WOLFSSL_SRC_TOP="${TOP_DIR}/src"
WOLFSSL_HEADERS_TOP="${TOP_DIR}/wolfssl"
@@ -24,122 +129,196 @@ WOLFCRYPT_HEADERS_TOP="${WOLFSSL_HEADERS_TOP}/wolfcrypt"
OPENSSL_DIR_TOP="${WOLFSSL_HEADERS_TOP}/openssl"
-# TODO: Parse version number
WOLFSSL_VERSION=$(grep -i "LIBWOLFSSL_VERSION_STRING" ${TOP_DIR}/wolfssl/version.h | cut -d '"' -f 2)
+if [ "$WOLFSSL_VERSION" = "" ]; then
+ echo "ERROR: Could not find wolfSSL Version in ${TOP_DIR}/wolfssl/version.h"
+ exit 1
+else
+ echo "Found wolfSSL version $WOLFSSL_VERSION"
+ echo "# WOLFSSL_VERSION_ARUINO_SUFFIX $WOLFSSL_VERSION_ARUINO_SUFFIX"
+fi
+echo ""
+THIS_DIR=${PWD##*/}
-DIR=${PWD##*/}
-
-if [ "$DIR" = "ARDUINO" ]; then
- if [ ! -d ".${ROOT_DIR}" ]; then
- mkdir .${ROOT_DIR}
+if [ "$THIS_DIR" = "ARDUINO" ]; then
+ # mkdir ./wolfssl
+ if [ -d ".${ROOT_DIR}" ]; then
+ echo "ERROR: $(realpath ".${ROOT_DIR}") is not empty"
+ exit 1
+ else
+ echo "Step 01: mkdir .${ROOT_DIR}"
+ mkdir ."${ROOT_DIR}"
fi
+
+ # mkdir ./wolfssl/src
if [ ! -d ".${ROOT_SRC_DIR}" ]; then
- mkdir .${ROOT_SRC_DIR}
+ echo "Step 02: mkdir .${ROOT_SRC_DIR}"
+ mkdir ."${ROOT_SRC_DIR}"
fi
+ # mkdir ./wolfssl/src/wolfssl
if [ ! -d ".${WOLFSSL_HEADERS}" ]; then
- mkdir .${WOLFSSL_HEADERS}
+ echo "Step 03: mkdir .${WOLFSSL_HEADERS}"
+ mkdir ."${WOLFSSL_HEADERS}"
fi
- cp ${WOLFSSL_HEADERS_TOP}/*.h .${WOLFSSL_HEADERS}
+ # cp ../../wolfssl/*.h ./wolfssl/src/wolfssl
+ echo "Step 04: cp ${WOLFSSL_HEADERS_TOP}/*.h .${WOLFSSL_HEADERS}"
+ $CP_CMD "${WOLFSSL_HEADERS_TOP}"/*.h ."${WOLFSSL_HEADERS}"
if [ ! -d ".${WOLFCRYPT_HEADERS}" ]; then
- mkdir .${WOLFCRYPT_HEADERS}
+ # mkdir ./wolfssl/src/wolfssl/wolfcrypt
+ echo "Step 05: mkdir .${WOLFCRYPT_HEADERS}"
+ mkdir ."${WOLFCRYPT_HEADERS}"
+ mkdir ."${WOLFCRYPT_HEADERS}/port"
+ mkdir ."${WOLFCRYPT_HEADERS}/port/atmel"
+ mkdir ."${WOLFCRYPT_HEADERS}/port/Espressif"
fi
- cp ${WOLFCRYPT_HEADERS_TOP}/*.h .${WOLFCRYPT_HEADERS}
+
+ # cp ../../wolfssl/wolfcrypt/*.h ./wolfssl/src/wolfssl/wolfcrypt
+ echo "Step 06: cp ${WOLFCRYPT_HEADERS_TOP}/*.h .${WOLFCRYPT_HEADERS}"
+ $CP_CMD "${WOLFCRYPT_HEADERS_TOP}"/*.h ."${WOLFCRYPT_HEADERS}" || exit 1
+ $CP_CMD "${WOLFCRYPT_HEADERS_TOP}"/port/atmel/*.h ."${WOLFCRYPT_HEADERS}/port/atmel" || exit 1
+ $CP_CMD "${WOLFCRYPT_HEADERS_TOP}"/port/Espressif/*.h ."${WOLFCRYPT_HEADERS}/port/Espressif" || exit 1
# Add in source files to wolfcrypt/src
if [ ! -d ".${WOLFCRYPT_ROOT}" ]; then
- mkdir .${WOLFCRYPT_ROOT}
+ # mkdir ./wolfssl/src/wolfcrypt
+ echo "Step 07: mkdir .${WOLFCRYPT_ROOT}"
+ mkdir ."${WOLFCRYPT_ROOT}"
fi
+
+ # mkdir ./wolfssl/src/wolfcrypt/src
if [ ! -d ".${WOLFCRYPT_SRC}" ]; then
- mkdir .${WOLFCRYPT_SRC}
+ echo "Step 08: mkdir .${WOLFCRYPT_SRC}"
+ mkdir ."${WOLFCRYPT_SRC}"
+ mkdir ."${WOLFCRYPT_SRC}"/port
+ mkdir ."${WOLFCRYPT_SRC}"/port/atmel
+ mkdir ."${WOLFCRYPT_SRC}"/port/Espressif
fi
- cp ${WOLFCRYPT_SRC_TOP}/*.c .${WOLFCRYPT_SRC}
-
+
+ # cp ../../wolfcrypt/src/*.c ./wolfssl/src/wolfcrypt/src
+ echo "Step 09: cp ${WOLFCRYPT_SRC_TOP}/*.c .${WOLFCRYPT_SRC}"
+ $CP_CMD -r "${WOLFCRYPT_SRC_TOP}"/*.c ."${WOLFCRYPT_SRC}" || exit 1
+ $CP_CMD -r "${WOLFCRYPT_SRC_TOP}"/port/atmel/*.c ."${WOLFCRYPT_SRC}"/port/atmel || exit 1
+ $CP_CMD -r "${WOLFCRYPT_SRC_TOP}"/port/Espressif/*.c ."${WOLFCRYPT_SRC}"/port/Espressif || exit 1
+
# Add in source files to top level src folders
if [ ! -d ".${WOLFSSL_SRC}" ]; then
- mkdir .${WOLFSSL_SRC}
+ # mkdir ./wolfssl/src/src
+ echo "Step 10: mkdir .${WOLFSSL_SRC}"
+ mkdir ."${WOLFSSL_SRC}"
fi
- cp ${WOLFSSL_SRC_TOP}/*.c .${WOLFSSL_SRC}
+ $CP_CMD "${WOLFSSL_SRC_TOP}"/*.c ."${WOLFSSL_SRC}" || exit 1
# put bio and evp as includes
- cp .${WOLFSSL_SRC}/bio.c .${WOLFSSL_HEADERS}
- cp .${WOLFCRYPT_SRC}/evp.c .${WOLFSSL_HEADERS}
+ $CP_CMD ."${WOLFSSL_SRC}"/bio.c ."${WOLFSSL_HEADERS}" || exit 1
+ $CP_CMD ."${WOLFCRYPT_SRC}"/evp.c ."${WOLFSSL_HEADERS}" || exit 1
# make a copy of evp.c and bio.c for ssl.c to include inline
- cp .${WOLFSSL_HEADERS}/evp.c .${WOLFCRYPT_SRC}/evp.c
- cp .${WOLFSSL_HEADERS}/bio.c .${WOLFCRYPT_SRC}/bio.c
-
+ $CP_CMD ."${WOLFSSL_HEADERS}"/evp.c ."${WOLFCRYPT_SRC}"/evp.c || exit 1
+ $CP_CMD ."${WOLFSSL_HEADERS}"/bio.c ."${WOLFCRYPT_SRC}"/bio.c || exit 1
+
# copy openssl compatibility headers to their appropriate location
if [ ! -d ".${OPENSSL_DIR}" ]; then
- mkdir .${OPENSSL_DIR}
+ mkdir ."${OPENSSL_DIR}"
fi
- cp ${OPENSSL_DIR_TOP}/* .${OPENSSL_DIR}
+ $CP_CMD "${OPENSSL_DIR_TOP}"/* ."${OPENSSL_DIR}" || exit 1
+ # Finally, copy the Arduino-specific wolfssl library files into place: [lib]/src
+ $CP_CMD ./wolfssl.h ".${ROOT_SRC_DIR}"/wolfssl.h
- cat > .${ROOT_SRC_DIR}/wolfssl.h <<EOF
-/* Generated wolfSSL header file for Arduino */
-#include <user_settings.h>
-#include <wolfssl/wolfcrypt/settings.h>
-#include <wolfssl/ssl.h>
-EOF
+ echo "Copy examples...."
+ # Copy examples
+ mkdir -p ".${ROOT_SRC_DIR}"/examples
+ echo "Copy wolfssl_client example...."
+ mkdir -p ".${EXAMPLES_DIR}"/wolfssl_client
+ $CP_CMD ./sketches/wolfssl_client/wolfssl_client.ino ".${EXAMPLES_DIR}"/wolfssl_client/wolfssl_client.ino || exit 1
+ $CP_CMD ./sketches/wolfssl_client/README.md ".${EXAMPLES_DIR}"/wolfssl_client/README.md || exit 1
-# Creates user_settings file if one does not exist
- if [ ! -f ".${ROOT_SRC_DIR}/user_settings.h" ]; then
- cat > .${ROOT_SRC_DIR}/user_settings.h <<EOF
-/* Generated wolfSSL user_settings.h file for Arduino */
-#ifndef ARDUINO_USER_SETTINGS_H
-#define ARDUINO_USER_SETTINGS_H
+ echo "Copy wolfssl_server example...."
+ mkdir -p .${EXAMPLES_DIR}/wolfssl_server
+ $CP_CMD ./sketches/wolfssl_server/wolfssl_server.ino ".${EXAMPLES_DIR}"/wolfssl_server/wolfssl_server.ino || exit 1
+ $CP_CMD ./sketches/wolfssl_server/README.md ".${EXAMPLES_DIR}"/wolfssl_server/README.md || exit 1
-/* Platform */
-#define WOLFSSL_ARDUINO
+ echo "Copy wolfssl_server example...."
+ mkdir -p .${EXAMPLES_DIR}/wolfssl_version
+ $CP_CMD ./sketches/wolfssl_version/wolfssl_version.ino ".${EXAMPLES_DIR}"/wolfssl_version/wolfssl_version.ino || exit 1
+ $CP_CMD ./sketches/wolfssl_version/README.md ".${EXAMPLES_DIR}"/wolfssl_version/README.md || exit 1
+else
+ echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
+ exit 1
+fi
-/* Math library (remove this to use normal math)*/
-#define USE_FAST_MATH
-#define TFM_NO_ASM
-#define NO_ASN_TIME
+# At this point, the library is complete, but we need some additional files.
+#
+# optional diagnostics:
+# echo ".${ROOT_DIR}"
+# echo "${TOP_DIR}"
+# echo "cp ${TOP_DIR}/README.md .${ROOT_DIR}/"
-/* When using Intel Galileo Uncomment the line below */
-/* #define INTEL_GALILEO */
+# Replace the `${WOLFSSL_VERSION}` text in Arduino_README_prepend.md,
+# saving it to a .tmp file. Prepend that file to the wolfSSL README.md
+# file as PREPENDED_README.md, then copy that to the publish directory
+# as an Arduino-specific README.md file.
+VERSION_PLACEHOLDER="\${WOLFSSL_VERSION}"
+ARDUINO_VERSION_SUFFIX_PLACEHOLDER="\${WOLFSSL_VERSION_ARUINO_SUFFIX}"
+PREPEND_FILE="Arduino_README_prepend.md"
+PROPERTIES_FILE_TEMPLATE="library.properties.template"
+sed s/"$VERSION_PLACEHOLDER"/"$WOLFSSL_VERSION"/ "$PREPEND_FILE" > "$PREPEND_FILE.tmp"
+cat "$PREPEND_FILE.tmp" ${TOP_DIR}/README.md > PREPENDED_README.md
-/* RNG DEFAULT !!FOR TESTING ONLY!! */
-/* comment out the error below to get started w/ bad entropy source
- * This will need fixed before distribution but is OK to test with */
-#error "needs solved, see: https://www.wolfssl.com/docs/porting-guide/"
-#define WOLFSSL_GENSEED_FORTEST
+# Here we'll insert the wolfSSL version into the `library.properties.tmp` file, along with an Arduino version suffix.
+# The result should be something like version=5.6.6.Arduino.1 (for the 1st incremental version on top of 5.6.6)
+sed s/"$VERSION_PLACEHOLDER"/"$WOLFSSL_VERSION"/ "$PROPERTIES_FILE_TEMPLATE" > "library.properties.tmp"
+sed -i.backup s/"$ARDUINO_VERSION_SUFFIX_PLACEHOLDER"/"$WOLFSSL_VERSION_ARUINO_SUFFIX"/ "library.properties.tmp"
-#endif /* ARDUINO_USER_SETTINGS_H */
-EOF
- fi
+# cat library.properties.tmp
+# echo "${WOLFSSL_VERSION_ARUINO_SUFFIX}"
- cp .${WOLFCRYPT_HEADERS}/settings.h .${WOLFCRYPT_HEADERS}/settings.h.bak
- cat > .${WOLFCRYPT_HEADERS}/settings.h <<EOF
-/*wolfSSL Generated ARDUINO settings */
-#ifndef WOLFSSL_USER_SETTINGS
- #define WOLFSSL_USER_SETTINGS
-#endif /* WOLFSSL_USER_SETTINGS */
-/*wolfSSL Generated ARDUINO settings: END */
-
-EOF
- cat .${WOLFCRYPT_HEADERS}/settings.h.bak >> .${WOLFCRYPT_HEADERS}/settings.h
-
- #Creating library.properties file based off of:
- #https://arduino.github.io/arduino-cli/0.35/library-specification/#libraryproperties-file-format
-
- cat > .${ROOT_DIR}/library.properties <<EOF
-name=wolfSSL
-version=${WOLFSSL_VERSION}
-author=wolfSSL inc
-maintainer=wolfSSL inc <support@wolfssl.com>
-sentence=A lightweight SSL/TLS library written in ANSI C and targeted for embedded, RTOS, and resource-constrained environments.
-paragraph=Manual: https://www.wolfssl.com/documentation/manuals/wolfssl/index.html.
-category=Communication
-url=https://www.wolfssl.com/
-architectures=*
-
-EOF
+echo "Step 11: Final root file copy"
+$CP_CMD PREPENDED_README.md ."${ROOT_DIR}"/README.md || exit 1
+$CP_CMD library.properties.tmp ."${ROOT_DIR}"/library.properties || exit 1
+$CP_CMD "${TOP_DIR}"/"LICENSING" ."${ROOT_DIR}"/ || exit 1
+$CP_CMD "${TOP_DIR}"/"README" ."${ROOT_DIR}"/ || exit 1
+$CP_CMD "${TOP_DIR}"/"COPYING" ."${ROOT_DIR}"/ || exit 1
+$CP_CMD "${TOP_DIR}"/"ChangeLog.md" ."${ROOT_DIR}"/ || exit 1
+$CP_CMD "${TOP_DIR}"/".editorconfig" ."${ROOT_DIR}"/ || exit 1
+$CP_CMD "${TOP_DIR}"/".gitignore" ."${ROOT_DIR}"/ || exit 1
-else
- echo "ERROR: You must be in the IDE/ARDUINO directory to run this script"
+$CP_CMD "keywords.txt" ."${ROOT_DIR}"/ || exit 1
+
+
+echo "Step 12: Workspace to publish:"
+echo ""
+head -n 3 PREPENDED_README.md
+echo ""
+ls ./wolfssl -al
+echo ""
+
+# Optionally install to a separate directory.
+# Note we should have exited above if a problem was encountered,
+# as we'll never want to install a bad library.
+if [ "$THIS_OPERATION" = "INSTALL" ]; then
+ if [ "$THIS_INSTALL_IS_GITHUB" = "true" ]; then
+ echo "Installing to GitHub directory: $THIS_INSTALL_DIR"
+ cp -r ."$ROOT_DIR"/* "$THIS_INSTALL_DIR" || exit 1
+ else
+ echo "Config:"
+ echo "cp ../../examples/configs/user_settings_arduino.h ".${ROOT_SRC_DIR}"/user_settings.h"
+ # Nearly an ordinary copy, but we remove any lines with ">>" (typically edit with caution warning in comments)
+ grep -v '>>' ../../examples/configs/user_settings_arduino.h > ".${ROOT_SRC_DIR}"/user_settings.h || exit 1
+
+ # Show the user_settings.h revision string:
+ grep "WOLFSSL_USER_SETTINGS_ID" ."${ROOT_SRC_DIR}/user_settings.h"
+ echo ""
+
+ echo "Install:"
+ echo "mv .$ROOT_DIR $ARDUINO_ROOT"
+ mv ."$ROOT_DIR" "$ARDUINO_ROOT" || exit 1
+
+ echo "Arduino wolfSSL Version: $WOLFSSL_VERSION$WOLFSSL_VERSION_ARUINO_SUFFIX"
+ fi
fi
+
+echo "Done!"
diff --git a/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl.h b/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl.h
new file mode 100644
index 00000000..46ef50d3
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/ARDUINO/wolfssl.h
@@ -0,0 +1,39 @@
+/* wolfssl.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+/* Edit with caution. This is an Arduino-library specific header for wolfSSL */
+
+#ifndef WOLFSSL_USER_SETTINGS
+ #define WOLFSSL_USER_SETTINGS
+#endif
+
+#include <Arduino.h>
+
+/* wolfSSL user_settings.h must be included from settings.h */
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/ssl.h>
+
+int wolfSSL_Arduino_Serial_Print(const char *const s)
+{
+ /* See wolfssl/wolfcrypt/logging.c */
+ Serial.println(F(s));
+ return 0;
+};
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt
index e82e19b6..e129a64e 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt
@@ -82,8 +82,10 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
else()
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
- if("${FOUND_WOLFSSL}")
- message(STATUS "Found WOLFSSL_ROOT via Environment Variable:")
+ if( FOUND_WOLFSSL )
+ message(STATUS "Found WOLFSSL_ROOT via Environment Variable: ${CURRENT_SEARCH_DIR}")
+ set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
+ return()
else()
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
message(STATUS "$ENV{WOLFSSL_ROOT}")
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/CMakeLists.txt b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/CMakeLists.txt
index e82e19b6..e129a64e 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/components/wolfssl/CMakeLists.txt
@@ -82,8 +82,10 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
else()
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
- if("${FOUND_WOLFSSL}")
- message(STATUS "Found WOLFSSL_ROOT via Environment Variable:")
+ if( FOUND_WOLFSSL )
+ message(STATUS "Found WOLFSSL_ROOT via Environment Variable: ${CURRENT_SEARCH_DIR}")
+ set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
+ return()
else()
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
message(STATUS "$ENV{WOLFSSL_ROOT}")
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/main.c b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/main.c
index 855105e7..5a40d9cf 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/main.c
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_benchmark/main/main.c
@@ -24,21 +24,25 @@
#include "sdkconfig.h"
/* wolfSSL */
+/* The wolfSSL user_settings.h file is automatically included by the settings.h
+ * file and should never be explicitly included in any other source files.
+ * The settings.h should also be listed above wolfssl library include files. */
#include <wolfssl/wolfcrypt/settings.h>
-#include <user_settings.h>
#include <wolfssl/version.h>
-#include "wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h"
+#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
#ifndef WOLFSSL_ESPIDF
- #warning "Problem with wolfSSL user_settings."
- #warning "Check components/wolfssl/include"
+ #error "Problem with wolfSSL user_settings. " \
+ "Check components/wolfssl/include " \
+ "and confirm WOLFSSL_USER_SETTINGS is defined, " \
+ "typically in the component CMakeLists.txt"
#endif
#include <wolfssl/wolfcrypt/types.h>
#include <wolfcrypt/benchmark/benchmark.h>
/* set to 0 for one benchmark,
-** set to 1 for continous benchmark loop */
-#define BENCHMARK_LOOP 1
+** set to 1 for continuous benchmark loop */
+#define BENCHMARK_LOOP 0
/* check BENCH_ARGV in sdkconfig to determine need to set WOLFSSL_BENCH_ARGV */
#ifdef CONFIG_BENCH_ARGV
@@ -129,6 +133,7 @@ void my_atmel_free(int slotId)
/* the following are needed by benchmark.c with args */
#ifdef WOLFSSL_BENCH_ARGV
char* __argv[WOLFSSL_BENCH_ARGV_MAX_ARGUMENTS];
+#define ARG_BUFF_SIZE 16
int construct_argv()
{
@@ -137,7 +142,7 @@ int construct_argv()
int len = 0;
char *_argv; /* buffer for copying the string */
char *ch; /* char pointer to trace the string */
- char buff[16] = { 0 }; /* buffer for a argument copy */
+ char buff[ARG_BUFF_SIZE] = { 0 }; /* buffer for a argument copy */
ESP_LOGI(TAG, "construct_argv arg:%s\n", CONFIG_BENCH_ARGV);
len = strlen(CONFIG_BENCH_ARGV);
@@ -170,7 +175,7 @@ int construct_argv()
memset(buff, 0, sizeof(buff));
/* copy each args into buffer */
i = 0;
- while ((*ch != ' ') && (*ch != '\0') && (i < 16)) {
+ while ((*ch != ' ') && (*ch != '\0') && (i <= ARG_BUFF_SIZE)) {
buff[i] = *ch;
++i;
++ch;
@@ -193,14 +198,15 @@ int construct_argv()
void app_main(void)
{
int stack_start = 0;
- ESP_LOGI(TAG, "---------------- wolfSSL Benchmark Example ------------");
+
+ ESP_LOGI(TAG, "---------------- wolfSSL Benchmark Example -------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
ESP_LOGI(TAG, "---------------------- BEGIN MAIN ----------------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
-#ifdef HAVE_VERSION_EXTENDED_INFO
+#if defined(HAVE_VERSION_EXTENDED_INFO) && defined(WOLFSSL_HAS_METRICS)
esp_ShowExtendedSystemInfo();
#endif
@@ -236,7 +242,7 @@ void app_main(void)
ESP_LOGI(TAG, "Stack used: %d\n",
stack_start - uxTaskGetStackHighWaterMark(NULL));
- #ifdef WOLFSSL_HW_METRICS_DISABLED/* Remove _DISABLED upon #6990 Merge */
+ #if defined(WOLFSSL_HW_METRICS) && defined(WOLFSSL_HAS_METRICS)
esp_hw_show_metrics();
#endif
} while (BENCHMARK_LOOP);
@@ -249,8 +255,9 @@ void app_main(void)
ESP_LOGI(TAG, "Stack HWM: %d\n", uxTaskGetStackHighWaterMark(NULL));
#endif
- ESP_LOGI(TAG, "\n\nDone!\n\n"
- "If running from idf.py monitor, press twice: Ctrl+]");
+#ifdef WOLFSSL_ESPIDF_EXIT_MESSAGE
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_EXIT_MESSAGE);
+#endif
/* after the test, we'll just wait */
while (1) {
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile
index f3854ff1..45d4b1d2 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/Makefile
@@ -1,12 +1,134 @@
+# ESP8266 Project Makefile for wolfssl_client
#
-# This is a project Makefile. It is assumed the directory this Makefile resides in is a
-# project subdirectory.
+# Copyright (C) 2006-2024 wolfSSL Inc.
+#
+# This file is part of wolfSSL.
+#
+# wolfSSL is free 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.
+#
+# wolfSSL 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 is a project Makefile.
+# It is assumed the directory this Makefile resides in is a
+# project subdirectory containing an entire project.
+#
+# Optional private config headers. Define environment variables
+# to include various default header files that are typically
+# not in a git path, and thus excluded from being checked in.
+#
+# Environment Variable Name | Header file name included
+# ---------------------------------- | ---------------------------------------
+# MY_PRIVATE_CONFIG (files detected / selected in header)
+# USE_MY_PRIVATE_WSL_CONFIG /mnt/c/workspace/my_private_config.h
+# USE_MY_PRIVATE_MAC_CONFIG ~/Documents/my_private_config.h
+# USE_MY_PRIVATE_LINUX_CONFIG ~/workspace/my_private_config.h
+# USE_MY_PRIVATE_WINDOWS_CONFIG /workspace/my_private_config.h
+#
+#
PROJECT_NAME := wolfssl_client
+MY_PRIVATE_CONFIG ?= n
+USE_MY_PRIVATE_WSL_CONFIG ?= n
+USE_MY_PRIVATE_MAC_CONFIG ?= n
+USE_MY_PRIVATE_LINUX_CONFIG ?= n
+USE_MY_PRIVATE_WINDOWS_CONFIG ?= n
+
+# Calling shell causes unintuitive error in Windows:
+# OS := $(shell uname -s)
+#
+# But OS, or MY_PRIVATE_CONFIG should already be defined:
+$(info ************* wolfssl_client *************)
+
+ifeq ($(MY_PRIVATE_CONFIG),y)
+ CFLAGS += -DMY_PRIVATE_CONFIG
+ $(info Enabled MY_PRIVATE_CONFIG")
+endif
+
+# Check for Windows environment variable: USE_MY_PRIVATE_WINDOWS_CONFIG
+ifeq ($(USE_MY_PRIVATE_WINDOWS_CONFIG),y)
+ # This hard coded MY_CONFIG_FILE value must match that in the header file.
+ MY_CONFIG_FILE := /workspace/my_private_config.h
+ ifeq ($(wildcard $(MY_CONFIG_FILE)),)
+ $(info File does not exist: $(MY_CONFIG_FILE))
+ else
+ CFLAGS += -DUSE_MY_PRIVATE_WINDOWS_CONFIG
+ $(info Using private config file for: Windows)
+ endif
+endif
+
+# Check for WSL environment variable: USE_MY_PRIVATE_WSL_CONFIG
+ifeq ($(USE_MY_PRIVATE_WSL_CONFIG),y)
+ # This hard coded MY_CONFIG_FILE value must match that in the header file.
+ MY_CONFIG_FILE := /mnt/c/workspace/my_private_config.h
+ ifeq ($(wildcard $(MY_CONFIG_FILE)),)
+ $(info File does not exist: $(MY_CONFIG_FILE))
+ else
+ CFLAGS += -DUSE_MY_PRIVATE_WSL_CONFIG
+ $(info Using private config file for: WSL)
+ endif
+endif
+
+# Check for Linux environment variable: USE_MY_PRIVATE_LINUX_CONFIG
+ifeq ($(USE_MY_PRIVATE_LINUX_CONFIG),y)
+ # This hard coded MY_CONFIG_FILE value must match that in the header file.
+ MY_CONFIG_FILE := ~/workspace/my_private_config.h
+ ifeq ($(wildcard $(MY_CONFIG_FILE)),)
+ $(info File does not exist: $(MY_CONFIG_FILE))
+ else
+ CFLAGS += -DUSE_MY_PRIVATE_LINUX_CONFIG
+ $(info Using private config file for: Linux)
+ endif
+endif
+
+# Check for Mac environment variable: USE_MY_PRIVATE_MAC_CONFIG
+ifeq ($(USE_MY_PRIVATE_MAC_CONFIG),y)
+ # This hard coded MY_CONFIG_FILE value must match that in the header file.
+ MY_CONFIG_FILE := ~/Documents/my_private_config.h
+ ifeq ($(wildcard $(MY_CONFIG_FILE)),)
+ $(info File does not exist: $(MY_CONFIG_FILE))
+ else
+ CFLAGS += -DUSE_MY_PRIVATE_MAC_CONFIG
+ $(info Using private config file for: Mac)
+ endif
+endif
+
+ifneq ($(OS),MY_PRIVATE_CONFIG)
+ CFLAGS += -DMY_PRIVATE_CONFIG="$(MY_PRIVATE_CONFIG)"
+else
+ ifeq ($(OS),Linux)
+ CFLAGS += -DOS_LINUX
+ endif
+ ifeq ($(OS),Windows_NT)
+ CFLAGS += -DWOLFSSL_MAKE_SYSTEM_NAME_WINDOWS
+ endif
+ ifeq ($(OS),Darwin)
+ CFLAGS += -DWOLFSSL_MAKE_SYSTEM_NAME_APPLE
+ endif
+ ifneq (,$(findstring MINGW,$(OS)))
+ CFLAGS += -DWOLFSSL_MAKE_SYSTEM_NAME_MINGW
+ endif
+ ifneq (,$(findstring CYGWIN,$(OS)))
+ CFLAGS += -DWOLFSSL_MAKE_SYSTEM_NAME_CYGWIN
+ endif
+endif
+
+# It is essential that the build process sees the WOLFSSL_USER_SETTINGS
CFLAGS += -DWOLFSSL_USER_SETTINGS
-# if there isn't the directory, please disable the line below.
+
+# if directory not available, please disable the line below.
EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_common
+# The Standard Espressif IDF include:
include $(IDF_PATH)/make/project.mk
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md
index 21855add..1bfd0cc8 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/README.md
@@ -8,12 +8,50 @@ When using the CLI, see the [example parameters](/IDE/Espressif/ESP-IDF/examples
For general information on [wolfSSL examples for Espressif](../README.md), see the
[README](https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/README.md) file.
-## VisualGDB
+## Quick Start
+
+Use the [ESP-IDF](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html)
+for ESP32 or [RTOS SDK](https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html)
+for the ESP8266.
+
+Run `menuconfig` utility (`idf.py menuconfig` for ESP32 or `make menuconfig` for the ESP8266)
+and set the various parameters for the target device, along with local WiFi settings:
+
+* Target Host: `CONFIG_WOLFSSL_TARGET_HOST` (The IP address of a listening server)
+* Target Port: `CONFIG_WOLFSSL_TARGET_PORT` (Typically `11111`)
+* Example WiFi SSID: `CONFIG_EXAMPLE_WIFI_SSID` (The WiFi that you want to connect to)
+* Example WiFi Password: `CONFIG_EXAMPLE_WIFI_PASSWORD` (The WiFi password)
+
+The latest examples use makefiles that do not require local file copy installation of wolfSSL.
+
+Build and flash the software to see the example in action.
+
+## Quick Start with VisualGDB
+
+There are optional [VisualGDB](https://visualgdb.com/tutorials/esp8266/) project files in the
+[VisualGDB](./VisualGDB) project subdirectory, and an ESP8266 project file in the project directory,
+called `wolfssl_client_ESP8266.vgdbproj`.
Open the VisualGDB Visual Studio Project file in the VisualGDB directory and click the "Start" button.
-No wolfSSL setup is needed. You may need to adjust your specific COM port. The default is `COM20`.
+No wolfSSL setup is needed. You may need to adjust your specific COM port. The default is `COM19`.
+
+## Troubleshooting
+
+Weird results, odd messages, unexpected compiler errors? Manually delete the build directory and
+any locally generated files (`sdkconfig`, `sdkconfig-debug`, etc.) and start over.
+
+The `build` directory is typically located in the root of the project directory: `[project]/build`.
+
+
+Difficulty flashing:
+
+* Ensure the target device has a robust, stable, clean power supply.
+* Check that quality USB cables are being used.
+* Try lowering the flash baud rate in the `menuconfig`. The 115200 is typically reliable.
+* Review board specifications: some require manual boot mode via on-board buttons.
+* See [Espressif ESP Frequently Asked Questions](https://docs.espressif.com/projects/esp-faq/en/latest/esp-faq-en-master.pdf)
-## ESP-IDF Commandline
+## ESP-IDF Commandline v5.x
1. `idf.py menuconfig` to config the project
@@ -38,9 +76,83 @@ When you want to test the wolfSSL client
e.g. Launch ./examples/server/server -v 4 -b -i -d
+
+## VisualGDB for ESP8266
+
+Reminder that we build with `make` and not `cmake` in VisualGDB.
+
+Build files will be created in `[project directory]\build`
+
+## ESP-IDF make Commandline (version 3.5 or earlier for the ESP8266)
+
+```
+export IDF_PATH=~/esp/ESP8266_RTOS_SDK
+
+```
+
+
+## ESP-IDF CMake Commandline (version 3.5 or earlier for the ESP8266)
+
+Build files will be created in `[project directory]\build\debug`
+
+```
+# Set your path to RTOS SDK, shown here for default from WSL with VisualGDB
+WRK_IDF_PATH=/mnt/c/SysGCC/esp8266/rtos-sdk/v3.4
+# or
+WRK_IDF_PATH=~/esp/ESP8266_RTOS_SDK
+
+# Setup the environment
+. $WRK_IDF_PATH/export.sh
+
+# install as needed / prompted
+/mnt/c/SysGCC/esp8266/rtos-sdk/v3.4/install.sh
+
+# Fetch wolfssl from GitHub if needed:
+cd /workspace
+git clone https://github.com/wolfSSL/wolfssl.git
+
+# change directory to wolfssl client example.
+cd wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client
+
+# or for example, WSL with C:\workspace as home for git clones:
+# cd /mnt/c/workspace/wolfssl-$USER/IDE/Espressif/ESP-IDF/examples/wolfssl_client
+
+# adjust settings as desired
+idf.py menuconfig
+
+
+idf.py build flash -p /dev/ttyS70 -b 115200
+idf.py monitor -p /dev/ttyS70 -b 74880
+```
+
## SM Ciphers
-#### Working Linux Client to ESP32 Server
+(TODO coming soon)
+See https://github.com/wolfSSL/wolfsm
+
+#### Working Linux Client to ESP32 Server Example:
+
+```
+./examples/client/client -h 192.168.1.37 -p 11111 -v 3
+```
+
+```text
+-c <file> Certificate file, default ./certs/client-cert.pem
+-k <file> Key file, default ./certs/client-key.pem
+-A <file> Certificate Authority file, default ./certs/ca-cert.pem
+```
+
+Example client, with default certs explicitly given:
+
+```bash
+./examples/client/client -h 192.168.1.37 -p 11111 -v 3 -c ./certs/client-cert.pem -k ./certs/client-key.pem -A ./certs/ca-cert.pem
+```
+
+Example client, with RSA 1024 certs explicitly given:
+
+```
+./examples/client/client -h 192.168.1.37 -p 11111 -v 3 -c ./certs/1024/client-cert.pem -k ./certs/1024/client-key.pem -A ./certs/1024/ca-cert.pem
+```
Command:
@@ -48,7 +160,6 @@ Command:
cd /mnt/c/workspace/wolfssl-$USER/IDE/Espressif/ESP-IDF/examples/wolfssl_server
. /mnt/c/SysGCC/esp32/esp-idf/v5.1/export.sh
idf.py flash -p /dev/ttyS19 -b 115200 monitor
-
```
```
@@ -75,4 +186,3 @@ I hear you fa shizzle!
```
See the README.md file in the upper level 'examples' directory for [more information about examples](../README.md).
-
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.sln b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.sln
index a2be094c..e8e3a317 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.sln
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.sln
@@ -18,6 +18,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "include", "include", "{5326
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A51226B3-88A7-4463-B443-0E321C4A3D53}"
ProjectSection(SolutionItems) = preProject
+ ..\..\..\..\..\..\wolfssl\wolfcrypt\error-crypt.h = ..\..\..\..\..\..\wolfssl\wolfcrypt\error-crypt.h
+ ..\..\..\..\..\..\wolfssl\error-ssl.h = ..\..\..\..\..\..\wolfssl\error-ssl.h
+ ..\main\Kconfig.projbuild = ..\main\Kconfig.projbuild
+ ..\build\VisualGDB\Debug\esp-idf\esp_system\ld\memory.ld = ..\build\VisualGDB\Debug\esp-idf\esp_system\ld\memory.ld
..\..\..\..\..\..\..\my_private_config.h = ..\..\..\..\..\..\..\my_private_config.h
..\partitions_singleapp_large.csv = ..\partitions_singleapp_large.csv
..\README.md = ..\README.md
@@ -25,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\build\VisualGDB\Debug\config\sdkconfig.cmake = ..\build\VisualGDB\Debug\config\sdkconfig.cmake
..\sdkconfig.defaults = ..\sdkconfig.defaults
..\build\VisualGDB\Debug\config\sdkconfig.h = ..\build\VisualGDB\Debug\config\sdkconfig.h
+ ..\build\VisualGDB\Debug\esp-idf\esp_system\ld\sections.ld = ..\build\VisualGDB\Debug\esp-idf\esp_system\ld\sections.ld
EndProjectSection
EndProject
Global
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/CMakeLists.txt b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/CMakeLists.txt
index e82e19b6..615142ba 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/CMakeLists.txt
@@ -82,8 +82,10 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
else()
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
- if("${FOUND_WOLFSSL}")
- message(STATUS "Found WOLFSSL_ROOT via Environment Variable:")
+ if( FOUND_WOLFSSL )
+ message(STATUS "Found WOLFSSL_ROOT via Environment Variable: ${CURRENT_SEARCH_DIR}")
+ set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
+ return()
else()
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
message(STATUS "$ENV{WOLFSSL_ROOT}")
@@ -156,8 +158,8 @@ if(CMAKE_BUILD_EARLY_EXPANSION)
idf_component_register(
REQUIRES "${COMPONENT_REQUIRES}"
PRIV_REQUIRES # esp_hw_support
- esp_timer
- driver # this will typically only be needed for wolfSSL benchmark
+ # esp_timer
+ # driver # this will typically only be needed for wolfSSL benchmark
)
else()
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/component.mk b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/component.mk
index 13834b08..8184da11 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/component.mk
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/component.mk
@@ -17,24 +17,228 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
#
+
#
# Component Makefile
#
+#
+# The Espressif Managed Components are only for newer versions of the ESP-IDF
+# Typically only for ESP32[-x] targets and only for ESP-IDF v4.3 or later:
+# See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html
+# https://components.espressif.com/
+#
+# Usage:
+#
+# make flash
+#
+# make flash ESPPORT=/dev/ttyS55
+#
+# make flash ESPBAUD=9600
+#
+# make monitor ESPPORT=COM1
+#
+# make monitor ESPPORT=/dev/ttyS55 MONITORBAUD=115200
+#
+# export ESPPORT=/dev/ttyS55
+#
+# https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/get-started/index.html
+#
-COMPONENT_ADD_INCLUDEDIRS := . ./include
+# Although the project should define WOLFSSL_USER_SETTINGS, we'll also
+# define it here:
+CFLAGS +=-DWOLFSSL_USER_SETTINGS
-COMPONENT_ADD_INCLUDEDIRS += "$ENV{IDF_PATH}/components/freertos/include/freertos"
-# COMPONENT_ADD_INCLUDEDIRS += "$ENV{IDF_PATH}/soc/esp32s3/include/soc"
+# NOTICE: the WOLFSSL_ROOT setting MUST be relative!
+# See https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-guides/build-system.html?highlight=must+relative#optional-component-specific-variables
+# In the wolfSSL GitHub examples for Espressif:
+# https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples
+# When this wolfssl component.mk makefile is in [project]/components/wolfssl
+# The root is 7 directories up from here:
+WOLFSSL_ROOT := ../../../../../../..
-COMPONENT_SRCDIRS := src wolfcrypt/src
-COMPONENT_SRCDIRS += wolfcrypt/src/port/Espressif
-COMPONENT_SRCDIRS += wolfcrypt/src/port/atmel
-COMPONENT_SRCDIRS += wolfcrypt/benchmark
-COMPONENT_SRCDIRS += wolfcrypt/test
+# NOTE: The wolfSSL include diretory (e.g. user_settings.h) is
+# located HERE in THIS project, and *not* in the wolfSSL root.
+COMPONENT_ADD_INCLUDEDIRS := ./include
+COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/.
+COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl
+COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl/wolfcrypt
+COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfssl/wolfcrypt/port/Espressif
+# COMPONENT_ADD_INCLUDEDIRS += $ENV(IDF_PATH)/components/freertos/include/freertos
+# COMPONENT_ADD_INCLUDEDIRS += "$ENV(IDF_PATH)/soc/esp32s3/include/soc"
-CFLAGS +=-DWOLFSSL_USER_SETTINGS
+# wolfSSL
+COMPONENT_SRCDIRS := $(WOLFSSL_ROOT)/src
+
+# wolfcrypt
+COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src
+
+# Espressif
+COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif
+COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/atmel
+
+COMPONENT_OBJEXCLUDE := $(WOLFSSL_ROOT)/wolfcrypt/src/aes_asm.o
+COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/evp.o
+COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/misc.o
+COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/sha512_asm.o
+COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_x25519_asm.o
+COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/wolfcrypt/src/aes_gcm_x86_asm.o
+COMPONENT_OBJEXCLUDE += $(WOLFSSL_ROOT)/src/bio.o
+
+
+##
+## wolfSSL
+##
+COMPONENT_OBJS := $(WOLFSSL_ROOT)/src/bio.o
+# COMPONENT_OBJS += src/conf.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/crl.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/dtls.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/dtls13.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/internal.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/keys.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/ocsp.o
+# COMPONENT_OBJS += src/pk.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/quic.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/sniffer.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/ssl.o
+# COMPONENT_OBJS += src/ssl_asn1.o
+# COMPONENT_OBJS += src/ssl_bn.o
+# COMPONENT_OBJS += src/ssl_certman.o
+# COMPONENT_OBJS += src/ssl_crypto.o
+# COMPONENT_OBJS += src/ssl_misc.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/tls.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/tls13.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/src/wolfio.o
+# COMPONENT_OBJS += src/x509.o
+# COMPONENT_OBJS += src/x509_str.o
+
+##
+## wolfcrypt
+##
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/aes.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/arc4.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/asm.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/asn.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/async.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/blake2b.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/blake2s.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/camellia.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/chacha.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/chacha20_poly1305.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cmac.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/coding.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/compress.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cpuid.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/cryptocb.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/curve25519.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/curve448.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/des3.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dh.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dilithium.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/dsa.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ecc.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/eccsi.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ecc_fp.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ed25519.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ed448.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/error.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/evp.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_kyber.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_lms.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ext_xmss.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/falcon.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_448.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_low_mem.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fe_operations.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fips.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/fips_test.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_448.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_low_mem.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ge_operations.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hash.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hmac.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/hpke.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/integer.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/kdf.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/logging.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md2.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md4.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/md5.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/memory.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/misc.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pkcs12.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pkcs7.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/poly1305.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/pwdbased.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/random.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/rc2.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/ripemd.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/rsa.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sakke.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/selftest.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha256.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha3.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sha512.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/signature.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/siphash.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm2.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm3.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sm4.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sphincs.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_arm32.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_arm64.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_armthumb.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c32.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_c64.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_cortexm.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_dsp32.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_int.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_arm32.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_arm64.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_armthumb.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_c32.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_c64.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_cortexm.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_sm2_x86_64.o
+# COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/sp_x86_64.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/srp.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/tfm.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_dsp.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_encrypt.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_kyber.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_kyber_poly.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_lms.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_pkcs11.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_port.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wc_xmss.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_first.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfcrypt_last.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfevent.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/wolfmath.o
+
+##
+## Espressif
+##
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_aes.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_mp.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_sha.o
+COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/src/port/Espressif/esp32_util.o
+
+##
+## wolfcrypt benchmark (optional)
+##
+## COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark/benchmark.o
+## COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark
+## COMPONENT_ADD_INCLUDEDIRS += $(WOLFSSL_ROOT)/wolfcrypt/benchmark
+
+
+##
+## wolfcrypt test (optional)
+##
+## COMPONENT_OBJS += $(WOLFSSL_ROOT)/wolfcrypt/test/test.o
+## COMPONENT_SRCDIRS += $(WOLFSSL_ROOT)/wolfcrypt/test
-COMPONENT_OBJEXCLUDE := wolfcrypt/src/aes_asm.o
-COMPONENT_OBJEXCLUDE += wolfcrypt/src/evp.o
-COMPONENT_OBJEXCLUDE += wolfcrypt/src/misc.o
-COMPONENT_OBJEXCLUDE += src/bio.o
+##
+## wolfcrypt
+##
+# COMPONENT_PRIV_INCLUDEDIRS += $(PROJECT_PATH)/components/wolfssl/include
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h
index de5e247c..99b61e15 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/components/wolfssl/include/user_settings.h
@@ -1,6 +1,6 @@
/* user_settings.h
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -19,12 +19,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
+/* Standardized wolfSSL Espressif ESP32 + ESP8266 user_settings.h V5.6.6-01 */
+
/* This user_settings.h is for Espressif ESP-IDF */
#include <sdkconfig.h>
+#define DEBUG_WOLFSSL
+#define DEBUG_WOLFSSL_VERBOSE
/* The Espressif sdkconfig will have chipset info.
**
-** Possible values:
+** Some possible values:
**
** CONFIG_IDF_TARGET_ESP32
** CONFIG_IDF_TARGET_ESP32S2
@@ -37,7 +41,7 @@
#define WOLFSSL_ESPIDF
/*
- * choose ONE of these Espressif chips to define:
+ * ONE of these Espressif chipsets should be defined:
*
* WOLFSSL_ESP32
* WOLFSSL_ESPWROOM32SE
@@ -46,8 +50,13 @@
#undef WOLFSSL_ESPWROOM32SE
#undef WOLFSSL_ESP8266
#undef WOLFSSL_ESP32
+/* See below for chipset detection from sdkconfig.h */
-#define WOLFSSL_ESP32
+/* Small session cache saves a lot of RAM for ClientCache and SessionCache.
+ * Memory requirement is about 5KB, otherwise 20K is needed when not specified.
+ * If extra small footprint is needed, try MICRO_SESSION_CACHE (< 1K)
+ * When really desparate, try NO_SESSION_CACHE. */
+#define SMALL_SESSION_CACHE
/* optionally turn off SHA512/224 SHA512/256 */
/* #define WOLFSSL_NOSHA512_224 */
@@ -62,6 +71,9 @@
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_2048
+#define WOLFSSL_SMALL_STACK
+#define HAVE_ECC
+#define RSA_LOW_MEM
/* TLS 1.3 */
#define WOLFSSL_TLS13
@@ -79,7 +91,9 @@
#define HAVE_AESGCM
-#define WOLFSSL_RIPEMD
+/* Optional RIPEMD: RACE Integrity Primitives Evaluation Message Digest */
+/* #define WOLFSSL_RIPEMD */
+
/* when you want to use SHA224 */
#define WOLFSSL_SHA224
@@ -87,24 +101,17 @@
#define WOLFSSL_SHA384
/* when you want to use SHA512 */
-#define WOLFSSL_SHA512
+/* #define WOLFSSL_SHA512 */
/* when you want to use SHA3 */
-#define WOLFSSL_SHA3
+/* #define WOLFSSL_SHA3 */
-#define HAVE_ED25519 /* ED25519 requires SHA512 */
+/* ED25519 requires SHA512 */
+/* #define HAVE_ED25519 */
-#define HAVE_ECC
-#define HAVE_CURVE25519
-#define CURVE25519_SMALL
-#define HAVE_ED25519
-
- #define OPENSSL_EXTRA
/* when you want to use pkcs7 */
/* #define HAVE_PKCS7 */
-#define HAVE_PKCS7
-
#if defined(HAVE_PKCS7)
#define HAVE_AES_KEYWRAP
#define HAVE_X963_KDF
@@ -125,7 +132,7 @@
/* #define CUSTOM_SLOT_ALLOCATION */
#endif
-/* rsa primitive specific definition */
+/* RSA primitive specific definition */
#if defined(WOLFSSL_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
/* Define USE_FAST_MATH and SMALL_STACK */
#define ESP32_USE_RSA_PRIMITIVE
@@ -145,8 +152,6 @@
#endif
#endif
-#define RSA_LOW_MEM
-
/* #define WOLFSSL_ATECC508A_DEBUG */
/* date/time */
@@ -173,10 +178,6 @@
/* #undef USE_FAST_MATH */
/* #define USE_INTEGER_HEAP_MATH */
-
-#define WOLFSSL_SMALL_STACK
-
-
#define HAVE_VERSION_EXTENDED_INFO
/* #define HAVE_WC_INTROSPECTION */
@@ -190,7 +191,6 @@
#define WOLFSSL_CERT_EXT
#define WOLFSSL_SYS_CA_CERTS
-
#define WOLFSSL_CERT_TEXT
#define WOLFSSL_ASN_TEMPLATE
@@ -203,7 +203,7 @@
#undef WOLFSSL_SYS_CA_CERTS
*/
-/*
+/* command-line options
--enable-keygen
--enable-certgen
--enable-certreq
@@ -211,10 +211,11 @@
--enable-asn-template
*/
-/* Default is HW enabled unless turned off.
-** Uncomment these lines to force SW instead of HW acceleration */
-
+/* Chipset detection from sdkconfig.h
+ * Default is HW enabled unless turned off.
+ * Uncomment lines to force SW instead of HW acceleration */
#if defined(CONFIG_IDF_TARGET_ESP32)
+ #define WOLFSSL_ESP32
/* wolfSSL HW Acceleration supported on ESP32. Uncomment to disable: */
/* #define NO_ESP32_CRYPT */
/* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
@@ -232,6 +233,7 @@
/***** END CONFIG_IDF_TARGET_ESP32 *****/
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
+ #define WOLFSSL_ESP32
/* wolfSSL HW Acceleration supported on ESP32-S2. Uncomment to disable: */
/* #define NO_ESP32_CRYPT */
/* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
@@ -244,6 +246,7 @@
/***** END CONFIG_IDF_TARGET_ESP32S2 *****/
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
+ #define WOLFSSL_ESP32
/* wolfSSL HW Acceleration supported on ESP32-S3. Uncomment to disable: */
/* #define NO_ESP32_CRYPT */
/* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
@@ -257,6 +260,7 @@
#elif defined(CONFIG_IDF_TARGET_ESP32C2) || \
defined(CONFIG_IDF_TARGET_ESP8684)
+ #define WOLFSSL_ESP32
/* ESP8684 is essentially ESP32-C2 chip + flash embedded together in a
* single QFN 4x4 mm package. Out of released documentation, Technical
* Reference Manual as well as ESP-IDF Programming Guide is applicable
@@ -282,6 +286,7 @@
/***** END CONFIG_IDF_TARGET_ESP32C2 *****/
#elif defined(CONFIG_IDF_TARGET_ESP32C3)
+ #define WOLFSSL_ESP32
/* wolfSSL HW Acceleration supported on ESP32-C3. Uncomment to disable: */
/* #define NO_ESP32_CRYPT */
@@ -299,6 +304,7 @@
/***** END CONFIG_IDF_TARGET_ESP32C3 *****/
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
+ #define WOLFSSL_ESP32
/* wolfSSL HW Acceleration supported on ESP32-C6. Uncomment to disable: */
/* #define NO_ESP32_CRYPT */
@@ -315,6 +321,7 @@
/***** END CONFIG_IDF_TARGET_ESP32C6 *****/
#elif defined(CONFIG_IDF_TARGET_ESP32H2)
+ #define WOLFSSL_ESP32
/* wolfSSL Hardware Acceleration not yet implemented */
#define NO_ESP32_CRYPT
#define NO_WOLFSSL_ESP32_CRYPT_HASH
@@ -323,15 +330,28 @@
/***** END CONFIG_IDF_TARGET_ESP32H2 *****/
#elif defined(CONFIG_IDF_TARGET_ESP8266)
- /* TODO: Revisit ESP8266 */
+ #define WOLFSSL_ESP8266
+
+ /* There's no hardware encryption on the ESP8266 */
+ /* Consider using the ESP32-C2/C3/C6
+ * See https://www.espressif.com/en/products/socs/esp32-c2 */
#define NO_ESP32_CRYPT
#define NO_WOLFSSL_ESP32_CRYPT_HASH
#define NO_WOLFSSL_ESP32_CRYPT_AES
#define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
/***** END CONFIG_IDF_TARGET_ESP266 *****/
+#elif defined(CONFIG_IDF_TARGET_ESP8684)
+ /* There's no Hardware Acceleration available on ESP8684 */
+ #define NO_ESP32_CRYPT
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH
+ #define NO_WOLFSSL_ESP32_CRYPT_AES
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
+ /***** END CONFIG_IDF_TARGET_ESP8684 *****/
+
#else
/* Anything else encountered, disable HW accleration */
+ #warning "Unexpected CONFIG_IDF_TARGET_NN value"
#define NO_ESP32_CRYPT
#define NO_WOLFSSL_ESP32_CRYPT_HASH
#define NO_WOLFSSL_ESP32_CRYPT_AES
@@ -392,12 +412,75 @@
#define ATCA_WOLFSSL
*/
-/* optional SM4 Ciphers. See https://github.com/wolfSSL/wolfsm
+/***************************** Certificate Macros *****************************
+ *
+ * The section below defines macros used in typically all of the wolfSSL
+ * examples such as the client and server for certs stored in header files.
+ *
+ * There are various certificate examples in this header file:
+ * https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/certs_test.h
+ *
+ * To use the sets of macros below, define *one* of these:
+ *
+ * USE_CERT_BUFFERS_1024 - ECC 1024 bit encoded ASN1
+ * USE_CERT_BUFFERS_2048 - RSA 2048 bit encoded ASN1
+ * WOLFSSL_SM[2,3,4] - SM Ciphers
+ *
+ * For example: define USE_CERT_BUFFERS_2048 to use CA Certs used in this
+ * wolfSSL function for the `ca_cert_der_2048` buffer, size and types:
+ *
+ * ret = wolfSSL_CTX_load_verify_buffer(ctx,
+ * CTX_CA_CERT,
+ * CTX_CA_CERT_SIZE,
+ * CTX_CA_CERT_TYPE);
+ *
+ * See https://www.wolfssl.com/documentation/manuals/wolfssl/group__CertsKeys.html#function-wolfssl_ctx_load_verify_buffer
+ *
+ * In this case the CTX_CA_CERT will be defined as `ca_cert_der_2048` as
+ * defined here: https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/certs_test.h
+ *
+ * The CTX_CA_CERT_SIZE and CTX_CA_CERT_TYPE are similarly used to reference
+ * array size and cert type respectively.
+ *
+ * Similarly for loading the private client key:
+ *
+ * ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
+ * CTX_CLIENT_KEY,
+ * CTX_CLIENT_KEY_SIZE,
+ * CTX_CLIENT_KEY_TYPE);
+ *
+ * see https://www.wolfssl.com/documentation/manuals/wolfssl/group__CertsKeys.html#function-wolfssl_ctx_use_privatekey_buffer
+ *
+ * Similarly, the other macros are for server certificates and keys:
+ * `CTX_SERVER_CERT` and `CTX_SERVER_KEY` are available.
+ *
+ * The certificate and key names are typically `static const unsigned char`
+ * arrays. The [NAME]_size are typically `sizeof([array name])`, and the types
+ * are the known wolfSSL encoding type integers (e.g. WOLFSSL_FILETYPE_PEM).
+ *
+ * See `SSL_FILETYPE_[name]` in
+ * https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/ssl.h
+ *
+ * See Abstract Syntax Notation One (ASN.1) in:
+ * https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/wolfcrypt/asn.h
+ *
+ * Optional SM4 Ciphers:
+ *
+ * Although the SM ciphers are shown here, the `certs_test_sm.h` may not yet
+ * be available. See:
+ * https://github.com/wolfSSL/wolfssl/pull/6825
+ * https://github.com/wolfSSL/wolfsm
+ *
+ * Uncomment these 3 macros to enable the SM Ciphers and use the macros below.
+ */
+
+/*
#define WOLFSSL_SM2
#define WOLFSSL_SM3
#define WOLFSSL_SM4
*/
+/* Conditional macros used in wolfSSL TLS client and server examples */
#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)
#include <wolfssl/certs_test_sm.h>
#define CTX_CA_CERT root_sm2
@@ -413,15 +496,47 @@
#undef WOLFSSL_BASE16
#define WOLFSSL_BASE16
#else
- #define USE_CERT_BUFFERS_2048
- #define USE_CERT_BUFFERS_256
- #define CTX_CA_CERT ca_cert_der_2048
- #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
- #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_SERVER_CERT server_cert_der_2048
- #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_2048
- #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_SERVER_KEY server_key_der_2048
- #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_2048
- #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
-#endif
+ #if defined(USE_CERT_BUFFERS_2048)
+ #include <wolfssl/certs_test.h>
+ #define CTX_CA_CERT ca_cert_der_2048
+ #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
+ #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_SERVER_CERT server_cert_der_2048
+ #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_2048
+ #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_SERVER_KEY server_key_der_2048
+ #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_2048
+ #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_CLIENT_CERT client_cert_der_2048
+ #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_2048
+ #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_CLIENT_KEY client_key_der_2048
+ #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_2048
+ #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #elif defined(USE_CERT_BUFFERS_1024)
+ #include <wolfssl/certs_test.h>
+ #define CTX_CA_CERT ca_cert_der_1024
+ #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
+ #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_CLIENT_CERT client_cert_der_1024
+ #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_1024
+ #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_CLIENT_KEY client_key_der_1024
+ #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_1024
+ #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_SERVER_CERT server_cert_der_1024
+ #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_1024
+ #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_SERVER_KEY server_key_der_1024
+ #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_1024
+ #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+ #else
+ /* Optionally define custom cert arrays, sizes, and types here */
+ #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024"
+ #endif
+#endif /* Conditional key and cert constant names */
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c
index 9d5d26db..30388b31 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/client-tls.c
@@ -1,6 +1,6 @@
/* client-tls.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -18,7 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-
#include "client-tls.h"
/* Espressif FreeRTOS */
@@ -28,13 +27,15 @@
#include <freertos/event_groups.h>
#endif
+/* Espressif */
+#include <esp_log.h>
+
/* socket includes */
#include <lwip/netdb.h>
#include <lwip/sockets.h>
/* wolfSSL */
#include <wolfssl/wolfcrypt/settings.h>
-#include "user_settings.h"
#include <wolfssl/ssl.h>
#ifdef WOLFSSL_TRACK_MEMORY
@@ -50,30 +51,6 @@
#define DEFAULT_MAX_DHKEY_BITS 2048
#endif
-#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)
- #include <wolfssl/certs_test_sm.h>
- #define CTX_CA_CERT root_sm2
- #define CTX_CA_CERT_SIZE sizeof_root_sm2
- #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_PEM
- #define CTX_CLIENT_CERT client_sm2
- #define CTX_CLIENT_CERT_SIZE sizeof_client_sm2
- #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_PEM
- #define CTX_CLIENT_KEY client_sm2_priv
- #define CTX_CLIENT_KEY_SIZE sizeof_client_sm2_priv
- #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_PEM
-#else
- #include <wolfssl/certs_test.h>
- #define CTX_CA_CERT ca_cert_der_2048
- #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
- #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_CLIENT_CERT client_cert_der_2048
- #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_2048
- #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_CLIENT_KEY client_key_der_2048
- #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_2048
- #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
-#endif
-
/* Project */
#include "wifi_connect.h"
#include "time_helper.h"
@@ -87,7 +64,7 @@
* -h 192.168.1.128 -v 4 -l TLS13-SM4-CCM-SM3 -c ./certs/sm2/client-sm2.pem -k ./certs/sm2/client-sm2-priv.pem -A ./certs/sm2/root-sm2.pem -C
*
**/
-static const char* const TAG = "tls_client";
+#define TAG "client-tls"
#if defined(DEBUG_WOLFSSL)
int stack_start = -1;
@@ -264,29 +241,29 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args)
*
* reference code for SM Ciphers:
*
- #if defined(HAVE_AESGCM) && !defined(NO_DH)
- #ifdef WOLFSSL_TLS13
- defaultCipherList = "TLS13-AES128-GCM-SHA256"
- #ifndef WOLFSSL_NO_TLS12
- ":DHE-PSK-AES128-GCM-SHA256"
- #endif
- ;
- #else
- defaultCipherList = "DHE-PSK-AES128-GCM-SHA256";
+ #if defined(HAVE_AESGCM) && !defined(NO_DH)
+ #ifdef WOLFSSL_TLS13
+ defaultCipherList = "TLS13-AES128-GCM-SHA256"
+ #ifndef WOLFSSL_NO_TLS12
+ ":DHE-PSK-AES128-GCM-SHA256"
#endif
- #elif defined(HAVE_AESGCM) && defined(WOLFSSL_TLS13)
- defaultCipherList = "TLS13-AES128-GCM-SHA256:PSK-AES128-GCM-SHA256"
- #ifndef WOLFSSL_NO_TLS12
- ":PSK-AES128-GCM-SHA256"
- #endif
- ;
- #elif defined(HAVE_NULL_CIPHER)
- defaultCipherList = "PSK-NULL-SHA256";
- #elif !defined(NO_AES_CBC)
- defaultCipherList = "PSK-AES128-CBC-SHA256";
+ ;
#else
- defaultCipherList = "PSK-AES128-GCM-SHA256";
+ defaultCipherList = "DHE-PSK-AES128-GCM-SHA256";
#endif
+ #elif defined(HAVE_AESGCM) && defined(WOLFSSL_TLS13)
+ defaultCipherList = "TLS13-AES128-GCM-SHA256:PSK-AES128-GCM-SHA256"
+ #ifndef WOLFSSL_NO_TLS12
+ ":PSK-AES128-GCM-SHA256"
+ #endif
+ ;
+ #elif defined(HAVE_NULL_CIPHER)
+ defaultCipherList = "PSK-NULL-SHA256";
+ #elif !defined(NO_AES_CBC)
+ defaultCipherList = "PSK-AES128-CBC-SHA256";
+ #else
+ defaultCipherList = "PSK-AES128-GCM-SHA256";
+ #endif
*/
ret = wolfSSL_CTX_set_cipher_list(ctx, WOLFSSL_ESP32_CIPHER_SUITE);
@@ -294,16 +271,16 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args)
ESP_LOGI(TAG, "Set cipher list: %s\n", WOLFSSL_ESP32_CIPHER_SUITE);
}
else {
- ESP_LOGE(TAG, "ERROR: failed to set cipher list: %s\n", WOLFSSL_ESP32_CIPHER_SUITE);
+ ESP_LOGE(TAG, "ERROR: failed to set cipher list: %s\n",
+ WOLFSSL_ESP32_CIPHER_SUITE);
}
#endif
#ifdef DEBUG_WOLFSSL
ShowCiphers(NULL);
- ESP_LOGI(TAG,
- "Stack used: %d\n",
- CONFIG_ESP_MAIN_TASK_STACK_SIZE
- - uxTaskGetStackHighWaterMark(NULL));
+ ESP_LOGI(TAG, "Stack used: %d\n",
+ CONFIG_ESP_MAIN_TASK_STACK_SIZE
+ - uxTaskGetStackHighWaterMark(NULL));
#endif
/* see user_settings PROJECT_DH for HAVE_DH and HAVE_FFDHE_2048 */
@@ -328,12 +305,13 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args)
CTX_CLIENT_CERT_SIZE,
CTX_CLIENT_CERT_TYPE);
if (ret_i != SSL_SUCCESS) {
- ESP_LOGE(TAG, "ERROR: failed to load chain %d, please check the file.\n", ret_i);
+ ESP_LOGE(TAG, "ERROR: failed to load chain %d, "
+ "please check the file.", ret_i);
}
- /* Load client certificates into WOLFSSL_CTX */
- WOLFSSL_MSG("Loading...cert");
- ret_i = wolfSSL_CTX_load_verify_buffer(ctx,
+ /* Load client certificates into WOLFSSL_CTX */
+ WOLFSSL_MSG("Loading...cert");
+ ret_i = wolfSSL_CTX_load_verify_buffer(ctx,
CTX_CA_CERT,
CTX_CA_CERT_SIZE,
CTX_CA_CERT_TYPE);
@@ -420,10 +398,17 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args)
#endif
/* Attach wolfSSL to the socket */
- wolfSSL_set_fd(ssl, sockfd);
+ ret_i = wolfSSL_set_fd(ssl, sockfd);
+ if (ret_i == WOLFSSL_SUCCESS) {
+ ESP_LOGI(TAG, "wolfSSL_set_fd success");
+ }
+ else {
+ ESP_LOGE(TAG, "ERROR: failed wolfSSL_set_fd. Error: %d\n", ret_i);
+ }
WOLFSSL_MSG("Connect to wolfSSL on the server side");
/* Connect to wolfSSL on the server side */
+ ret_i = wolfSSL_connect(ssl);
if (wolfSSL_connect(ssl) == SSL_SUCCESS) {
#ifdef DEBUG_WOLFSSL
ShowCiphers(ssl);
@@ -458,7 +443,8 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args)
printf("%s\n", buff);
}
else {
- ESP_LOGE(TAG, "ERROR: failed to connect to wolfSSL\n");
+ ESP_LOGE(TAG, "ERROR: failed to connect to wolfSSL. "
+ "Error: %d\n", ret_i);
}
#ifdef DEBUG_WOLFSSL
ShowCiphers(ssl);
@@ -487,16 +473,28 @@ WOLFSSL_ESP_TASK tls_smp_client_init(void* args)
#else
xTaskHandle _handle;
#endif
- /* http://esp32.info/docs/esp_idf/html/dd/d3c/group__xTaskCreate.html */
+ /* See https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos_idf.html#functions */
+ if (TLS_SMP_CLIENT_TASK_BYTES < (6 * 1024)) {
+ /* Observed approximately 6KB limit for the RTOS task stack size.
+ * Reminder parameter is bytes, not words as with generic FreeeRTOS. */
+ ESP_LOGW(TAG, "Warning: TLS_SMP_CLIENT_TASK_BYTES < 6KB");
+ }
+#ifndef WOLFSSL_SMALL_STACK
+ ESP_LOGW(TAG, "WARNING: WOLFSSL_SMALL_STACK is not defined. Consider "
+ "defining that to reduce embedded memory usage.");
+#endif
+
+ /* Note that despite vanilla FreeRTOS using WORDS for a parameter,
+ * Espressif uses BYTES for the task stack size here: */
ret = xTaskCreate(tls_smp_client_task,
TLS_SMP_CLIENT_TASK_NAME,
- TLS_SMP_CLIENT_TASK_WORDS,
+ TLS_SMP_CLIENT_TASK_BYTES,
NULL,
TLS_SMP_CLIENT_TASK_PRIORITY,
&_handle);
if (ret != pdPASS) {
- ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_CLIENT_TASK_NAME);
+ ESP_LOGI(TAG, "Create thread %s failed.", TLS_SMP_CLIENT_TASK_NAME);
}
return TLS_SMP_CLIENT_TASK_RET;
}
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/component.mk b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/component.mk
index 61f8990c..c59edbee 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/component.mk
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/component.mk
@@ -1,8 +1,8 @@
#
# Main component makefile.
#
-# This Makefile can be left empty. By default, it will take the sources in the
-# src/ directory, compile them and link them into lib(subdirectory_name).a
-# in the build directory. This behaviour is entirely configurable,
+# This Makefile can be left empty. By default, it will take the sources in the
+# src/ directory, compile them and link them into lib(subdirectory_name).a
+# in the build directory. This behavior is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h
index 1188ee36..de534035 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/client-tls.h
@@ -1,6 +1,6 @@
-/* server-tls.h
+/* client-tls.h
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -18,18 +18,20 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-#ifndef _SERVER_TLS_
-#define _SERVER_TLS_
+#ifndef _CLIENT_TLS_H_
+#define _CLIENT_TLS_H_
+
+/* Local project, auto-generated configuration */
+#include "sdkconfig.h"
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
-#include "sdkconfig.h"
/* See main/Kconfig.projbuild for default configuration settings */
#ifdef CONFIG_WOLFSSL_TARGET_HOST
#define TLS_SMP_TARGET_HOST CONFIG_WOLFSSL_TARGET_HOST
#else
- #define TLS_SMP_TARGET_HOST "192.168.1.38"
+ #define TLS_SMP_TARGET_HOST "192.168.1.37"
#endif
#ifdef CONFIG_WOLFSSL_TARGET_PORT
@@ -39,13 +41,20 @@
#endif
#define TLS_SMP_CLIENT_TASK_NAME "tls_client_example"
-#define TLS_SMP_CLIENT_TASK_WORDS 22240
+
+/* Reminder: Vanilla FreeRTOS is words, Espressif is bytes. */
+#if defined(WOLFSSL_ESP8266)
+ #define TLS_SMP_CLIENT_TASK_BYTES (6 * 1024)
+#else
+ #define TLS_SMP_CLIENT_TASK_BYTES (8 * 1024)
+#endif
+
#define TLS_SMP_CLIENT_TASK_PRIORITY 8
#if defined(SINGLE_THREADED)
#define WOLFSSL_ESP_TASK int
#else
- #include "freertos/FreeRTOS.h"
+ #include <freertos/FreeRTOS.h>
#define WOLFSSL_ESP_TASK void
#endif
@@ -68,4 +77,5 @@ WOLFSSL_ESP_TASK tls_smp_client_task(void* args);
#else
WOLFSSL_ESP_TASK tls_smp_client_init(void* args);
#endif
+
#endif /* _SERVER_TLS_ */
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/main.h b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/main.h
index 94c3b5eb..12c452d6 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/main.h
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/main.h
@@ -1,6 +1,6 @@
-/* template main.h
+/* wolfssl_client main.h
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/time_helper.h b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/time_helper.h
index a47f9400..3586ac65 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/time_helper.h
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/time_helper.h
@@ -1,5 +1,6 @@
-/*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+/* time_helper.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -20,8 +21,8 @@
/* common Espressif time_helper v5.6.3.001 */
-#ifndef _TIME_HELPER_H
-#define _TIME_HELPER_H
+#ifndef _TIME_HELPER_H_
+#define _TIME_HELPER_H_
/* ESP-IDF uses a 64-bit signed integer to represent time_t starting from release v5.0
* See: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system_time.html#year-2036-and-2038-overflow-issues
@@ -32,13 +33,13 @@ extern "C" {
#endif
/* a function to show the current data and time */
-int esp_show_current_datetime();
+int esp_show_current_datetime(void);
/* worst case, if GitHub time not available, used fixed time */
int set_fixed_default_time(void);
/* set time from string (e.g. GitHub commit time) */
-int set_time_from_string(char* time_buffer);
+int set_time_from_string(const char* time_buffer);
/* set time from NTP servers,
* also initially calls set_fixed_default_time or set_time_from_string */
@@ -51,4 +52,4 @@ int set_time_wait_for_ntp(void);
} /* extern "C" */
#endif
-#endif /* #ifndef _TIME_HELPER_H */
+#endif /* #ifndef _TIME_HELPER_H_ */
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h
index 644ce00d..b29d5812 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h
@@ -21,9 +21,6 @@
#ifndef _WIFI_CONNECT_H_
#define _WIFI_CONNECT_H_
-#include <esp_idf_version.h>
-#include <esp_log.h>
-
/* ESP lwip */
#define EXAMPLE_ESP_MAXIMUM_RETRY CONFIG_ESP_MAXIMUM_RETRY
@@ -48,19 +45,54 @@
* file my_private_config.h should be excluded from git updates */
/* #define USE_MY_PRIVATE_CONFIG */
-#ifdef USE_MY_PRIVATE_CONFIG
+/* Note that IntelliSense may not work properly in the next section for the
+ * Espressif SDK 3.4 on the ESP8266. Macros should still be defined.
+ * See the project-level Makefile. Example found in:
+ * https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples/template
+ *
+ * The USE_MY_PRIVATE_[OS]_CONFIG is typically an environment variable that
+ * triggers the make (not cmake) to add compiler defines.
+ */
+#if defined(USE_MY_PRIVATE_WINDOWS_CONFIG)
+ #include "/workspace/my_private_config.h"
+#elif defined(USE_MY_PRIVATE_WSL_CONFIG)
+ #include "/mnt/c/workspace/my_private_config.h"
+#elif defined(USE_MY_PRIVATE_LINUX_CONFIG)
+ #include "~/workspace/my_private_config.h"
+#elif defined(USE_MY_PRIVATE_MAC_CONFIG)
+ #include "~/Documents/my_private_config.h"
+#elif defined(USE_MY_PRIVATE_CONFIG)
+ /* This section works best with cmake & non-environment variable setting */
#if defined(WOLFSSL_CMAKE_SYSTEM_NAME_WINDOWS)
+ #define WOLFSSL_CMAKE
+ #include "/workspace/my_private_config.h"
+ #elif defined(WOLFSSL_MAKE_SYSTEM_NAME_WINDOWS)
+ #define WOLFSSL_MAKE
#include "/workspace/my_private_config.h"
#elif defined(WOLFSSL_CMAKE_SYSTEM_NAME_WSL)
+ #define WOLFSSL_CMAKE
+ #include "/mnt/c/workspace/my_private_config.h"
+ #elif defined(WOLFSSL_MAKE_SYSTEM_NAME_WSL)
+ #define WOLFSSL_MAKE
#include "/mnt/c/workspace/my_private_config.h"
#elif defined(WOLFSSL_CMAKE_SYSTEM_NAME_LINUX)
+ #define WOLFSSL_CMAKE
+ #include "~/workspace/my_private_config.h"
+ #elif defined(WOLFSSL_MAKE_SYSTEM_NAME_LINUX)
+ #define WOLFSSL_MAKE
#include "~/workspace/my_private_config.h"
#elif defined(WOLFSSL_CMAKE_SYSTEM_NAME_APPLE)
#include "~/Documents/my_private_config.h"
+ #elif defined(WOLFSSL_MAKE_SYSTEM_NAME_APPLE)
+ #define WOLFSSL_MAKE
+ #include "~/Documents/my_private_config.h"
+ #elif defined(OS_WINDOWS)
+ #include "/workspace/my_private_config.h"
#else
- #warning "did not detect environment. using ~/my_private_config.h"
- #include "~/my_private_config.h"
- #endif
+ /* Edit as needed for your private config: */
+ #warning "default private config using /workspace/my_private_config.h"
+ #include "/workspace/my_private_config.h"
+ #endif
#else
/*
@@ -70,14 +102,22 @@
** If you'd rather not, just change the below entries to strings with
** the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid"
*/
- #ifdef CONFIG_ESP_WIFI_SSID
+ #if defined(CONFIG_ESP_WIFI_SSID)
+ /* tyically from ESP32 with ESP-IDF v4 ot v5 */
#define EXAMPLE_ESP_WIFI_SSID CONFIG_ESP_WIFI_SSID
+ #elif defined(CONFIG_EXAMPLE_WIFI_SSID)
+ /* tyically from ESP8266 rtos-sdk/v3.4 */
+ #define EXAMPLE_ESP_WIFI_SSID CONFIG_EXAMPLE_WIFI_SSID
#else
#define EXAMPLE_ESP_WIFI_SSID "MYSSID_WIFI_CONNECT"
#endif
- #ifdef CONFIG_ESP_WIFI_PASSWORD
+ #if defined(CONFIG_ESP_WIFI_PASSWORD)
+ /* tyically from ESP32 with ESP-IDF v4 or v5 */
#define EXAMPLE_ESP_WIFI_PASS CONFIG_ESP_WIFI_PASSWORD
+ #elif defined(CONFIG_EXAMPLE_WIFI_SSID)
+ /* tyically from ESP8266 rtos-sdk/v3.4 */
+ #define EXAMPLE_ESP_WIFI_PASS CONFIG_EXAMPLE_WIFI_PASSWORD
#else
#define EXAMPLE_ESP_WIFI_PASS "MYPASSWORD_WIFI_CONNECT"
#endif
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/main.c b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/main.c
index add43ada..fa116ed1 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/main.c
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -27,8 +27,9 @@
#include <esp_event.h>
/* wolfSSL */
+/* Always include wolfcrypt/settings.h before any other wolfSSL file. */
+/* Reminder: settings.h pulls in user_settings.h; don't include it here */
#include <wolfssl/wolfcrypt/settings.h>
-#include <user_settings.h>
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
#ifndef WOLFSSL_ESPIDF
#warning "Problem with wolfSSL user_settings."
@@ -44,13 +45,17 @@
* For wired ethernet, see:
* https://github.com/wolfSSL/wolfssl-examples/tree/master/ESP32/TLS13-ENC28J60-client */
#include "wifi_connect.h"
+ /*
+ * Note ModBus TCP cannot be disabled on ESP8266 tos-sdk/v3.4
+ * See https://github.com/espressif/esp-modbus/issues/2
+ */
#endif
#ifdef WOLFSSL_TRACK_MEMORY
#include <wolfssl/wolfcrypt/mem_track.h>
#endif
-static const char* const TAG = "TLS Client";
+static const char* TAG = "main";
#if defined(WOLFSSL_ESPWROOM32SE) && defined(HAVE_PK_CALLBACKS) \
&& defined(WOLFSSL_ATECC508A)
@@ -115,7 +120,7 @@ void my_atmel_free(int slotId)
#endif /* CUSTOM_SLOT_ALLOCATION */
#endif /* WOLFSSL_ESPWROOM32SE && HAVE_PK_CALLBACK && WOLFSSL_ATECC508A */
-/* for FreeRTOS */
+/* Entry for FreeRTOS */
void app_main(void)
{
int stack_start = 0;
@@ -126,26 +131,42 @@ void app_main(void)
ESP_LOGI(TAG, "---------------------- BEGIN MAIN ----------------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
+#ifdef ESP_SDK_MEM_LIB_VERSION
+ sdk_init_meminfo();
+#endif
#ifdef ESP_TASK_MAIN_STACK
ESP_LOGI(TAG, "ESP_TASK_MAIN_STACK: %d", ESP_TASK_MAIN_STACK);
#endif
#ifdef TASK_EXTRA_STACK_SIZE
ESP_LOGI(TAG, "TASK_EXTRA_STACK_SIZE: %d", TASK_EXTRA_STACK_SIZE);
#endif
-#ifdef INCLUDE_uxTaskGetStackHighWaterMark
+
+#ifdef SINGLE_THREADED
+ ESP_LOGI(TAG, "Single threaded");
+#else
ESP_LOGI(TAG, "CONFIG_ESP_MAIN_TASK_STACK_SIZE = %d bytes (%d words)",
CONFIG_ESP_MAIN_TASK_STACK_SIZE,
- (int)(CONFIG_ESP_MAIN_TASK_STACK_SIZE / sizeof(void*)));
+ (int)(CONFIG_ESP_MAIN_TASK_STACK_SIZE / sizeof(void*)));
+
+ #ifdef INCLUDE_uxTaskGetStackHighWaterMark
+ {
+ /* Returns the high water mark of the stack associated with xTask. That is,
+ * the minimum free stack space there has been (in bytes not words, unlike
+ * vanilla FreeRTOS) since the task started. The smaller the returned
+ * number the closer the task has come to overflowing its stack.
+ * see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos_idf.html
+ */
+ stack_start = uxTaskGetStackHighWaterMark(NULL);
+ #ifdef ESP_SDK_MEM_LIB_VERSION
+ {
+ sdk_var_whereis("stack_start", &stack_start);
+ }
+ #endif
- /* Returns the high water mark of the stack associated with xTask. That is,
- * the minimum free stack space there has been (in bytes not words, unlike
- * vanilla FreeRTOS) since the task started. The smaller the returned
- * number the closer the task has come to overflowing its stack.
- * see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos_idf.html
- */
- stack_start = uxTaskGetStackHighWaterMark(NULL);
- ESP_LOGI(TAG, "Stack Start HWM: %d bytes", stack_start);
-#endif
+ ESP_LOGI(TAG, "Stack Start HWM: %d bytes", stack_start);
+ }
+ #endif /* INCLUDE_uxTaskGetStackHighWaterMark */
+#endif /* SINGLE_THREADED */
#ifdef HAVE_VERSION_EXTENDED_INFO
esp_ShowExtendedSystemInfo();
@@ -184,11 +205,23 @@ void app_main(void)
/* Initialize NVS */
ret = nvs_flash_init();
- if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
- ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
- ESP_ERROR_CHECK(nvs_flash_erase());
- ret = nvs_flash_init();
+ #if defined(CONFIG_IDF_TARGET_ESP8266)
+ {
+ if (ret == ESP_ERR_NVS_NO_FREE_PAGES) {
+ ESP_ERROR_CHECK(nvs_flash_erase());
+ ret = nvs_flash_init();
+ }
}
+ #else
+ {
+ /* Non-ESP8266 initialization is slightly different */
+ if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
+ ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
+ ESP_ERROR_CHECK(nvs_flash_erase());
+ ret = nvs_flash_init();
+ }
+ }
+ #endif /* else not CONFIG_IDF_TARGET_ESP8266 */
ESP_ERROR_CHECK(ret);
#if defined(CONFIG_IDF_TARGET_ESP32H2)
@@ -203,8 +236,8 @@ void app_main(void)
ESP_LOGI(TAG, "Trying WiFi again...");
ret = wifi_init_sta();
}
- #endif
-#endif
+ #endif /* else not CONFIG_IDF_TARGET_ESP32H2 */
+#endif /* else FOUND_PROTOCOL_EXAMPLES_DIR not found */
/* Once we are connected to the network, start & wait for NTP time */
ret = set_time_wait_for_ntp();
@@ -216,14 +249,6 @@ void app_main(void)
esp_show_current_datetime();
}
- /* HWM is maximum amount of stack space that has been unused, in bytes
- * not words (unlike vanilla freeRTOS). */
- ESP_LOGI(TAG, "Initial Stack Used (before wolfSSL Server): %d bytes",
- CONFIG_ESP_MAIN_TASK_STACK_SIZE
- - (uxTaskGetStackHighWaterMark(NULL))
- );
- ESP_LOGI(TAG, "Starting TLS Client task ...\n");
-
#if defined(SINGLE_THREADED)
/* just call the task */
tls_smp_client_task((void*)NULL);
@@ -232,6 +257,19 @@ void app_main(void)
/* start a thread with the task */
args[0].loops = 10;
args[0].port = 11111;
+
+ /* HWM is maximum amount of stack space that has been unused, in bytes
+ * not words (unlike vanilla freeRTOS). */
+ int this_heap;
+ this_heap = esp_get_free_heap_size();
+ ESP_LOGI(TAG, "Initial Stack Used (before wolfSSL Server): %d bytes",
+ CONFIG_ESP_MAIN_TASK_STACK_SIZE
+ - (uxTaskGetStackHighWaterMark(NULL))
+ );
+ ESP_LOGI(TAG, "Starting TLS Client task ...\n");
+
+ ESP_LOGI(TAG, "main tls_smp_client_init heap @ %p = %d",
+ &this_heap, this_heap);
tls_smp_client_init(args);
/* optional additional client threads
tls_smp_client_init(args);
@@ -244,24 +282,24 @@ void app_main(void)
*/
#endif
+ /* Done */
+#ifdef SINGLE_THREADED
+ ESP_LOGV(TAG, "\n\nDone!\n\n");
+ while (1);
+#else
ESP_LOGV(TAG, "\n\nvTaskDelete...\n\n");
vTaskDelete(NULL);
/* done */
while (1) {
ESP_LOGV(TAG, "\n\nLoop...\n\n");
-#ifdef INCLUDE_uxTaskGetStackHighWaterMark
+ #ifdef INCLUDE_uxTaskGetStackHighWaterMark
ESP_LOGI(TAG, "Stack HWM: %d", uxTaskGetStackHighWaterMark(NULL));
ESP_LOGI(TAG, "Stack used: %d", CONFIG_ESP_MAIN_TASK_STACK_SIZE
- (uxTaskGetStackHighWaterMark(NULL) ));
-#endif
-
-#if defined(SINGLE_THREADED)
- ESP_LOGV(TAG, "\n\nDone!\n\n");
- while (1);
-#else
+ #endif
vTaskDelay(60000);
-#endif
- } /* done whle */
+ } /* done while */
+#endif /* else not SINGLE_THREADED */
} /* app_main */
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/time_helper.c b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/time_helper.c
index 5149d2e6..5eb06a14 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/time_helper.c
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/time_helper.c
@@ -1,6 +1,6 @@
/* time_helper.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -19,12 +19,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-/* common Espressif time_helper v5.6.3.002 */
-#include "esp_idf_version.h"
+/* See https://tf.nist.gov/tf-cgi/servers.cgi */
+
+/* common Espressif time_helper v5.6.6.001 */
#include "sdkconfig.h"
#include "time_helper.h"
#include <esp_log.h>
+#include <esp_idf_version.h>
#if defined(ESP_IDF_VERSION_MAJOR) && defined(ESP_IDF_VERSION_MINOR)
#if (ESP_IDF_VERSION_MAJOR == 5) && (ESP_IDF_VERSION_MINOR >= 1)
@@ -36,25 +38,24 @@
#include <esp_sntp.h>
#endif
#else
- /* TODO Consider pre IDF v5? */
+ /* TODO Consider non ESP-IDF environments */
#endif
/* ESP-IDF uses a 64-bit signed integer to represent time_t starting from release v5.0
* See: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system_time.html#year-2036-and-2038-overflow-issues
*/
-const static char* TAG = "time_helper";
/* see https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html */
#ifndef TIME_ZONE
-/*
- * PST represents Pacific Standard Time.
- * +8 specifies the offset from UTC (Coordinated Universal Time), indicating
- * that Pacific Time is UTC-8 during standard time.
- * PDT represents Pacific Daylight Time.
- * M3.2.0 indicates that Daylight Saving Time (DST) starts on the
- * second (2) Sunday (0) of March (3).
- * M11.1.0 indicates that DST ends on the first (1) Sunday (0) of November (11)
- */
+ /*
+ * PST represents Pacific Standard Time.
+ * +8 specifies the offset from UTC (Coordinated Universal Time), indicating
+ * that Pacific Time is UTC-8 during standard time.
+ * PDT represents Pacific Daylight Time.
+ * M3.2.0 indicates that Daylight Saving Time (DST) starts on the
+ * second (2) Sunday (0) of March (3).
+ * M11.1.0 indicates that DST ends on the first (1) Sunday (0) of November (11)
+ */
#define TIME_ZONE "PST+8PDT,M3.2.0,M11.1.0"
#endif /* not defined: TIME_ZONE, so we are setting our own */
@@ -87,11 +88,13 @@ const static char* TAG = "time_helper";
char* ntpServerList[NTP_SERVER_COUNT] = NTP_SERVER_LIST;
+const static char* TAG = "time_helper";
+
/* our NTP server list is global info */
extern char* ntpServerList[NTP_SERVER_COUNT];
/* Show the current date and time */
-int esp_show_current_datetime()
+int esp_show_current_datetime(void)
{
time_t now;
char strftime_buf[64];
@@ -104,7 +107,7 @@ int esp_show_current_datetime()
localtime_r(&now, &timeinfo);
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
- return 0;
+ return ESP_OK;
}
/* the worst-case scenario is a hard-coded date/time */
@@ -113,9 +116,9 @@ int set_fixed_default_time(void)
/* ideally, we'd like to set time from network,
* but let's set a default time, just in case */
struct tm timeinfo = {
- .tm_year = 2023 - 1900,
- .tm_mon = 10,
- .tm_mday = 02,
+ .tm_year = 2024 - 1900,
+ .tm_mon = 1,
+ .tm_mday = 05,
.tm_hour = 13,
.tm_min = 01,
.tm_sec = 05
@@ -130,7 +133,38 @@ int set_fixed_default_time(void)
ESP_LOGI(TAG, "Adjusting time from fixed value");
now = (struct timeval){ .tv_sec = interim_time };
ret = settimeofday(&now, NULL);
+ ESP_LOGI(TAG, "settimeofday result = %d", ret);
+ return ret;
+}
+
+/* probably_valid_time_string(s)
+ *
+ * some sanity checks on time string before calling sscanf()
+ *
+ * returns 0 == ESP_OK == Success if str is likely a valid time.
+ * -1 == ESP_FAIL otherwise
+ */
+int probably_valid_time_string(const char* str)
+{
+ int ret = ESP_OK;
+ size_t length = 0;
+ size_t spaces = 0;
+ size_t colons = 0;
+
+ while (str[length] != '\0') {
+ if (str[length] == ' ') {
+ spaces++;
+ }
+ if (str[length] == ':') {
+ colons++;
+ }
+ length++;
+ }
+ if ((length > 32) || (spaces < 4) || (spaces > 5) || (colons > 2)) {
+ ret = ESP_FAIL;
+ ESP_LOGE(TAG, "ERROR, failed time sanity check: %s", str);
+ }
return ret;
}
@@ -138,60 +172,66 @@ int set_fixed_default_time(void)
*
* returns 0 = success if able to set the time from the provided string
* error for any other value, typically -1 */
-int set_time_from_string(char* time_buffer)
+int set_time_from_string(const char* time_buffer)
{
/* expecting github default formatting: 'Thu Aug 31 12:41:45 2023 -0700' */
+ char offset[28]; /* large arrays, just in case there's still bad data */
+ char day_str[28];
+ char month_str[28];
const char *format = "%3s %3s %d %d:%d:%d %d %s";
struct tm this_timeinfo;
struct timeval now;
time_t interim_time;
- char offset[6]; /* expecting trailing single quote, not used */
- char day_str[4];
- char month_str[4];
int day, year, hour, minute, second;
int quote_offset = 0;
int ret = 0;
- /* we are expecting the string to be encapsulated in single quotes */
- if (*time_buffer == 0x27) {
- quote_offset = 1;
- }
+ /* perform some basic sanity checkes */
+ ret = probably_valid_time_string(time_buffer);
+ if (ret == ESP_OK) {
+ /* we are expecting the string to be encapsulated in single quotes */
+ if (*time_buffer == 0x27) {
+ quote_offset = 1;
+ }
- ret = sscanf(time_buffer + quote_offset,
- format,
- day_str, month_str,
- &day, &hour, &minute, &second, &year, &offset);
+ ret = sscanf(time_buffer + quote_offset,
+ format,
+ day_str, month_str,
+ &day, &hour, &minute, &second, &year, &offset);
- if (ret == 8) {
- /* we found a match for all componets */
+ if (ret == 8) {
+ /* we found a match for all componets */
- const char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ const char *months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
- for (int i = 0; i < 12; i++) {
- if (strcmp(month_str, months[i]) == 0) {
- this_timeinfo.tm_mon = i;
- break;
+ for (int i = 0; i < 12; i++) {
+ if (strcmp(month_str, months[i]) == 0) {
+ this_timeinfo.tm_mon = i;
+ break;
+ }
}
- }
- this_timeinfo.tm_mday = day;
- this_timeinfo.tm_hour = hour;
- this_timeinfo.tm_min = minute;
- this_timeinfo.tm_sec = second;
- this_timeinfo.tm_year = year - 1900; /* Number of years since 1900 */
+ this_timeinfo.tm_mday = day;
+ this_timeinfo.tm_hour = hour;
+ this_timeinfo.tm_min = minute;
+ this_timeinfo.tm_sec = second;
+ this_timeinfo.tm_year = year - 1900; /* Number of years since 1900 */
- interim_time = mktime(&this_timeinfo);
- now = (struct timeval){ .tv_sec = interim_time };
- ret = settimeofday(&now, NULL);
- ESP_LOGI(TAG, "Time updated to %s", time_buffer);
- }
- else {
- ESP_LOGE(TAG, "Failed to convert \"%s\" to a tm date.", time_buffer);
- ESP_LOGI(TAG, "Trying fixed date that was hard-coded.");
- set_fixed_default_time();
- ret = -1;
+ interim_time = mktime(&this_timeinfo);
+ now = (struct timeval){ .tv_sec = interim_time };
+ ret = settimeofday(&now, NULL);
+ ESP_LOGI(TAG, "Time updated to %s", time_buffer);
+ }
+ else {
+ ESP_LOGE(TAG, "Failed to convert \"%s\" to a tm date.",
+ time_buffer);
+ ESP_LOGI(TAG, "Trying fixed date that was hard-coded....");
+ set_fixed_default_time();
+ ret = ESP_FAIL;
+ }
}
+
return ret;
}
@@ -224,14 +264,16 @@ int set_time(void)
#ifdef LIBWOLFSSL_VERSION_GIT_HASH_DATE
/* initialy set a default approximate time from recent git commit */
- ESP_LOGI(TAG, "Found git hash date, attempting to set system date.");
- set_time_from_string(LIBWOLFSSL_VERSION_GIT_HASH_DATE);
+ ESP_LOGI(TAG, "Found git hash date, attempting to set system date: %s",
+ LIBWOLFSSL_VERSION_GIT_HASH_DATE);
+ set_time_from_string(LIBWOLFSSL_VERSION_GIT_HASH_DATE"\0");
esp_show_current_datetime();
ret = -4;
#else
/* otherwise set a fixed time that was hard coded */
set_fixed_default_time();
+ esp_show_current_datetime();
ret = -3;
#endif
@@ -262,6 +304,7 @@ int set_time(void)
}
ESP_LOGI(TAG, "%s", thisServer);
sntp_setservername(i, thisServer);
+ ret = ESP_OK;
}
#ifdef HAS_ESP_NETIF_SNTP
ret = esp_netif_sntp_init(&config);
@@ -289,6 +332,9 @@ int set_time(void)
ESP_LOGW(TAG, "No sntp time servers found.");
ret = -1;
}
+
+ esp_show_current_datetime();
+ ESP_LOGI(TAG, "time helper existing with result = %d", ret);
return ret;
}
@@ -303,6 +349,8 @@ int set_time_wait_for_ntp(void)
ret = esp_netif_sntp_start();
ret = esp_netif_sntp_sync_wait(500 / portTICK_PERIOD_MS);
+#else
+ ESP_LOGE(TAG, "HAS_ESP_NETIF_SNTP not defined");
#endif /* HAS_ESP_NETIF_SNTP */
esp_show_current_datetime();
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c
index b9f9ab73..19ced330 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c
@@ -1,6 +1,6 @@
/* wifi_connect.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -18,17 +18,20 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
- #include "wifi_connect.h"
+#include "wifi_connect.h"
+/* FreeRTOS */
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <freertos/event_groups.h>
-#include <esp_wifi.h>
+
+/* Espressif */
#include <esp_log.h>
+#include <esp_idf_version.h>
+#include <esp_wifi.h>
/* wolfSSL */
#include <wolfssl/wolfcrypt/settings.h>
-#include "user_settings.h"
#include <wolfssl/version.h>
#include <wolfssl/wolfcrypt/types.h>
#ifndef WOLFSSL_ESPIDF
@@ -36,7 +39,12 @@
#warning "Check components/wolfssl/include"
#endif
-#if ESP_IDF_VERSION_MAJOR >= 5
+/* When there's too little heap, WiFi quietly refuses to connect */
+#define WIFI_LOW_HEAP_WARNING 21132
+
+#if defined(CONFIG_IDF_TARGET_ESP8266)
+#elif ESP_IDF_VERSION_MAJOR >= 5
+ /* example path set in cmake file */
#elif ESP_IDF_VERSION_MAJOR >= 4
#include "protocol_examples_common.h"
#else
@@ -44,7 +52,9 @@
static EventGroupHandle_t wifi_event_group;
#endif
-#if defined(ESP_IDF_VERSION_MAJOR) && defined(ESP_IDF_VERSION_MINOR)
+#if defined(CONFIG_IDF_TARGET_ESP8266)
+
+#elif defined(ESP_IDF_VERSION_MAJOR) && defined(ESP_IDF_VERSION_MINOR)
#if ESP_IDF_VERSION_MAJOR >= 4
/* likely using examples, see wifi_connect.h */
#else
@@ -64,7 +74,114 @@
/* breadcrumb prefix for logging */
const static char *TAG = "wifi_connect";
-#if ESP_IDF_VERSION_MAJOR < 4
+#if defined(CONFIG_IDF_TARGET_ESP8266)
+#ifndef CONFIG_ESP_MAX_STA_CONN
+ #define CONFIG_ESP_MAX_STA_CONN 4
+#endif
+#define EXAMPLE_MAX_STA_CONN CONFIG_ESP_MAX_STA_CONN
+
+#define WIFI_CONNECTED_BIT BIT0
+#define WIFI_FAIL_BIT BIT1
+#ifndef CONFIG_ESP_MAXIMUM_RETRY
+ #define CONFIG_ESP_MAXIMUM_RETRY 5
+#endif
+/* FreeRTOS event group to signal when we are connected*/
+static EventGroupHandle_t s_wifi_event_group;
+static int s_retry_num = 0;
+
+#define EXAMPLE_ESP_MAXIMUM_RETRY CONFIG_ESP_MAXIMUM_RETRY
+static void event_handler(void* arg, esp_event_base_t event_base,
+ int32_t event_id, void* event_data)
+{
+ if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
+ esp_wifi_connect();
+ } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
+ if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) {
+ esp_wifi_connect();
+ s_retry_num++;
+ ESP_LOGI(TAG, "retry to connect to the AP");
+ } else {
+ xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT);
+ }
+ ESP_LOGI(TAG,"connect to the AP fail");
+ } else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
+ ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
+ ESP_LOGI(TAG, "got ip:%s",
+ ip4addr_ntoa(&event->ip_info.ip));
+ s_retry_num = 0;
+ xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
+ }
+}
+
+int wifi_init_sta(void)
+{
+ word32 this_heap;
+
+ s_wifi_event_group = xEventGroupCreate();
+
+ tcpip_adapter_init();
+
+ ESP_ERROR_CHECK(esp_event_loop_create_default());
+
+ wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
+ ESP_ERROR_CHECK(esp_wifi_init(&cfg));
+
+ ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL));
+ ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL));
+
+ wifi_config_t wifi_config = {
+ .sta = {
+ .ssid = EXAMPLE_ESP_WIFI_SSID,
+ .password = EXAMPLE_ESP_WIFI_PASS
+ },
+ };
+
+ /* Setting a password implies station will connect to all security modes including WEP/WPA.
+ * However these modes are deprecated and not advisable to be used. Incase your Access point
+ * doesn't support WPA2, these mode can be enabled by commenting below line */
+
+ if (strlen((char *)wifi_config.sta.password)) {
+ wifi_config.sta.threshold.authmode = WIFI_AUTH_WPA2_PSK;
+ }
+
+ ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
+ ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
+ ESP_ERROR_CHECK(esp_wifi_start() );
+
+ ESP_LOGI(TAG, "wifi_init_sta finished. Connecting...");
+ this_heap = esp_get_free_heap_size();
+ ESP_LOGI(TAG, "this heap = %d", this_heap);
+ if (this_heap < WIFI_LOW_HEAP_WARNING) {
+ ESP_LOGW(TAG, "Warning: WiFi low heap: %d", WIFI_LOW_HEAP_WARNING);
+ }
+ /* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum
+ * number of re-tries (WIFI_FAIL_BIT). The bits are set by event_handler() (see above) */
+ EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
+ WIFI_CONNECTED_BIT | WIFI_FAIL_BIT,
+ pdFALSE,
+ pdFALSE,
+ portMAX_DELAY);
+
+ ESP_LOGI(TAG, "xEventGroupWaitBits finished.");
+ /* xEventGroupWaitBits() returns the bits before the call returned, hence we can test which event actually
+ * happened. */
+ if (bits & WIFI_CONNECTED_BIT) {
+ ESP_LOGI(TAG, "connected to ap SSID:%s",
+ EXAMPLE_ESP_WIFI_SSID);
+ } else if (bits & WIFI_FAIL_BIT) {
+ ESP_LOGI(TAG, "Failed to connect to SSID:%s, password:%s",
+ EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS);
+ } else {
+ ESP_LOGE(TAG, "UNEXPECTED EVENT");
+ }
+
+ ESP_ERROR_CHECK(esp_event_handler_unregister(IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler));
+ ESP_ERROR_CHECK(esp_event_handler_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, &event_handler));
+ vEventGroupDelete(s_wifi_event_group);
+ return ESP_OK;
+}
+
+#elif ESP_IDF_VERSION_MAJOR < 4
/* event handler for wifi events */
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
{
@@ -270,7 +387,8 @@ int wifi_init_sta(void)
int wifi_show_ip(void)
{
- /* ESP_LOGI(TAG, "got ip:" IPSTR, IP2STR(&event->ip_info.ip)); */
- return 0;
+ /* TODO Causes panic: ESP_LOGI(TAG, "got ip:" IPSTR,
+ * IP2STR(&event->ip_info.ip)); */
+ return ESP_OK;
}
#endif
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/sdkconfig.defaults b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/sdkconfig.defaults
index f8bce25f..ff9a5d4c 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/sdkconfig.defaults
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/sdkconfig.defaults
@@ -1,26 +1,15 @@
-CONFIG_FREERTOS_HZ=1000
-CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
-
-#
-# Default main stack size
-#
-# This is typically way bigger than needed for stack size. See user_settings.h
-#
-CONFIG_ESP_MAIN_TASK_STACK_SIZE=55500
+# sdkconfig.defaults for ESP8266 + ESP32
-# Legacy stack size for older ESP-IDF versions
-CONFIG_MAIN_TASK_STACK_SIZE=55500
+# CONFIG_ESP_PANIC_PRINT_REBOOT is not set
+CONFIG_ESP_PANIC_PRINT_REBOOT=n
+CONFIG_ESP_PANIC_PRINT_HALT=y
-#
-# Compiler options
-#
-CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y
-CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
-CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2
-CONFIG_COMPILER_HIDE_PATHS_MACROS=y
-CONFIG_COMPILER_STACK_CHECK_MODE_NORM=y
-CONFIG_COMPILER_STACK_CHECK=y
+# CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is not set
+CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=n
+CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y
+CONFIG_HEAP_DISABLE_IRAM=y
+CONFIG_FREERTOS_HZ=1000
#
# Partition Table
#
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/wolfssl_client_ESP8266.vgdbproj b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/wolfssl_client_ESP8266.vgdbproj
new file mode 100644
index 00000000..f0501227
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_client/wolfssl_client_ESP8266.vgdbproj
@@ -0,0 +1,292 @@
+<?xml version="1.0"?>
+<VisualGDBProjectSettings2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <Project xsi:type="com.visualgdb.project.external.esp-idf">
+ <CustomSourceDirectories>
+ <Directories />
+ <PathStyle>Unknown</PathStyle>
+ </CustomSourceDirectories>
+ <AutoProgramSPIFFSPartition>true</AutoProgramSPIFFSPartition>
+ <ProjectModeSettings>
+ <ProjectGUID>c9687472-a434-43a7-9026-7914f425b9b4</ProjectGUID>
+ <GroupSourcesByTypes>true</GroupSourcesByTypes>
+ <GroupSourcesByPaths>true</GroupSourcesByPaths>
+ <HeaderScanMode>SourceDirs</HeaderScanMode>
+ </ProjectModeSettings>
+ </Project>
+ <Build xsi:type="com.visualgdb.build.external.esp-idf">
+ <BuildLogMode xsi:nil="true" />
+ <ToolchainID>
+ <ID>com.visualgdb.xtensa-lx106-elf</ID>
+ <Version>
+ <GCC>8.4.0</GCC>
+ <GDB>8.1</GDB>
+ <Revision>1</Revision>
+ </Version>
+ </ToolchainID>
+ <IDFCheckout>
+ <Version>release/v3.4</Version>
+ <Subdirectory>rtos-sdk/v3.4</Subdirectory>
+ <Type>RTOS_SDK</Type>
+ </IDFCheckout>
+ <BuildThreadCount>0</BuildThreadCount>
+ </Build>
+ <CustomBuild>
+ <PreSyncActions />
+ <PreBuildActions />
+ <PostBuildActions />
+ <PreCleanActions />
+ <PostCleanActions />
+ </CustomBuild>
+ <CustomDebug>
+ <PreDebugActions />
+ <PostDebugActions />
+ <DebugStopActions />
+ <BreakMode>Default</BreakMode>
+ <CustomBreakCommand>
+ <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList>
+ <RemoteHost>
+ <HostName>BuildMachine</HostName>
+ <Transport>BuiltinShortcut</Transport>
+ </RemoteHost>
+ <BackgroundMode xsi:nil="true" />
+ </CustomBreakCommand>
+ </CustomDebug>
+ <DeviceTerminalSettings>
+ <Connection xsi:type="com.sysprogs.terminal.connection.serial">
+ <ComPortName>COM70</ComPortName>
+ <AdvancedSettings>
+ <BaudRate>74880</BaudRate>
+ <DataBits>8</DataBits>
+ <Parity>None</Parity>
+ <StopBits>One</StopBits>
+ <FlowControl>None</FlowControl>
+ </AdvancedSettings>
+ </Connection>
+ <LastConnectionTime>0</LastConnectionTime>
+ <EchoTypedCharacters>false</EchoTypedCharacters>
+ <ClearContentsWhenReconnecting>true</ClearContentsWhenReconnecting>
+ <ReconnectAutomatically>false</ReconnectAutomatically>
+ <DisplayMode>ASCII</DisplayMode>
+ <Colors>
+ <Background>
+ <Alpha>255</Alpha>
+ <Red>0</Red>
+ <Green>0</Green>
+ <Blue>0</Blue>
+ </Background>
+ <Disconnected>
+ <Alpha>255</Alpha>
+ <Red>169</Red>
+ <Green>169</Green>
+ <Blue>169</Blue>
+ </Disconnected>
+ <Text>
+ <Alpha>255</Alpha>
+ <Red>211</Red>
+ <Green>211</Green>
+ <Blue>211</Blue>
+ </Text>
+ <Echo>
+ <Alpha>255</Alpha>
+ <Red>144</Red>
+ <Green>238</Green>
+ <Blue>144</Blue>
+ </Echo>
+ <Inactive>
+ <Alpha>255</Alpha>
+ <Red>169</Red>
+ <Green>169</Green>
+ <Blue>169</Blue>
+ </Inactive>
+ </Colors>
+ <HexSettings>
+ <MaximumBytesPerLine>16</MaximumBytesPerLine>
+ <ShowTextView>true</ShowTextView>
+ <BreaksAroundEcho>true</BreaksAroundEcho>
+ <AutoSend>true</AutoSend>
+ <SendAsHex>true</SendAsHex>
+ <TimeoutForAutoBreak>0</TimeoutForAutoBreak>
+ </HexSettings>
+ <LineEnding>LF</LineEnding>
+ <TreatLFAsCRLF>false</TreatLFAsCRLF>
+ <KeepOpenAfterExit>false</KeepOpenAfterExit>
+ <ShowAfterProgramming>false</ShowAfterProgramming>
+ </DeviceTerminalSettings>
+ <CustomShortcuts>
+ <Shortcuts />
+ <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting>
+ </CustomShortcuts>
+ <UserDefinedVariables />
+ <ImportedPropertySheets />
+ <CodeSense>
+ <Enabled>True</Enabled>
+ <ExtraSettings>
+ <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders>
+ <SupportLightweightReferenceAnalysis>true</SupportLightweightReferenceAnalysis>
+ <DiscoverySettings>
+ <Mode>Enabled</Mode>
+ <SearchInProjectDir>true</SearchInProjectDir>
+ <SearchInSourceDirs>true</SearchInSourceDirs>
+ <SearchInIncludeSubdirs>true</SearchInIncludeSubdirs>
+ </DiscoverySettings>
+ <CheckForClangFormatFiles>true</CheckForClangFormatFiles>
+ <FormattingEngine xsi:nil="true" />
+ </ExtraSettings>
+ <CodeAnalyzerSettings>
+ <Enabled>false</Enabled>
+ <SelectedAnalyzers>
+ <string>apiModeling.google.GTest</string>
+ <string>core.builtin.BuiltinFunctions</string>
+ <string>core.builtin.NoReturnFunctions</string>
+ <string>core.CallAndMessage</string>
+ <string>core.DivideZero</string>
+ <string>core.DynamicTypePropagation</string>
+ <string>core.NonnilStringConstants</string>
+ <string>core.NonNullParamChecker</string>
+ <string>core.NullDereference</string>
+ <string>core.StackAddressEscape</string>
+ <string>core.UndefinedBinaryOperatorResult</string>
+ <string>core.uninitialized.ArraySubscript</string>
+ <string>core.uninitialized.Assign</string>
+ <string>core.uninitialized.Branch</string>
+ <string>core.uninitialized.CapturedBlockVariable</string>
+ <string>core.uninitialized.UndefReturn</string>
+ <string>core.VLASize</string>
+ <string>cplusplus.NewDelete</string>
+ <string>cplusplus.NewDeleteLeaks</string>
+ <string>cplusplus.SelfAssignment</string>
+ <string>deadcode.DeadStores</string>
+ <string>nullability.NullPassedToNonnull</string>
+ <string>nullability.NullReturnedFromNonnull</string>
+ <string>security.insecureAPI.getpw</string>
+ <string>security.insecureAPI.gets</string>
+ <string>security.insecureAPI.mkstemp</string>
+ <string>security.insecureAPI.mktemp</string>
+ <string>security.insecureAPI.UncheckedReturn</string>
+ <string>security.insecureAPI.vfork</string>
+ <string>unix.API</string>
+ <string>unix.cstring.BadSizeArg</string>
+ <string>unix.cstring.NullArg</string>
+ <string>unix.Malloc</string>
+ <string>unix.MallocSizeof</string>
+ <string>unix.MismatchedDeallocator</string>
+ <string>unix.StdCLibraryFunctions</string>
+ <string>unix.Vfork</string>
+ </SelectedAnalyzers>
+ <ExtraArguments>
+ <string>-analyzer-store=region</string>
+ <string>-analyzer-opt-analyze-nested-blocks</string>
+ <string>-analyzer-eagerly-assume</string>
+ </ExtraArguments>
+ </CodeAnalyzerSettings>
+ </CodeSense>
+ <Configurations>
+ <VisualGDBConfiguration>
+ <Name>Debug</Name>
+ <BuildSettingsExtension xsi:type="com.visualgdb.build.external.esp-idf.extension">
+ <OutputSubdirectory>build/Debug</OutputSubdirectory>
+ <SDKConfigFile>sdkconfig-debug</SDKConfigFile>
+ <EnableVerboseBuild>false</EnableVerboseBuild>
+ </BuildSettingsExtension>
+ </VisualGDBConfiguration>
+ <VisualGDBConfiguration>
+ <Name>Release</Name>
+ <BuildSettingsExtension xsi:type="com.visualgdb.build.external.esp-idf.extension">
+ <OutputSubdirectory>build/Release</OutputSubdirectory>
+ <SDKConfigFile>sdkconfig-release</SDKConfigFile>
+ <EnableVerboseBuild>false</EnableVerboseBuild>
+ </BuildSettingsExtension>
+ </VisualGDBConfiguration>
+ </Configurations>
+ <ProgramArgumentsSuggestions />
+ <Debug xsi:type="com.visualgdb.debug.embedded">
+ <AdditionalStartupCommands>
+ <GDBPreStartupCommands />
+ <GDBStartupCommands />
+ <GDBFinalizationCommands />
+ </AdditionalStartupCommands>
+ <AdditionalGDBSettings>
+ <Features>
+ <DisableAutoDetection>false</DisableAutoDetection>
+ <UseFrameParameter>false</UseFrameParameter>
+ <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported>
+ <ListLocalsSupported>false</ListLocalsSupported>
+ <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable>
+ <ThreadInfoSupported>false</ThreadInfoSupported>
+ <PendingBreakpointsSupported>false</PendingBreakpointsSupported>
+ <SupportTargetCommand>false</SupportTargetCommand>
+ <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications>
+ </Features>
+ <EnableSmartStepping>false</EnableSmartStepping>
+ <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications>
+ <ForceSingleThreadedMode>false</ForceSingleThreadedMode>
+ <UseAppleExtensions>false</UseAppleExtensions>
+ <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning>
+ <MakeLogFile>false</MakeLogFile>
+ <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping>
+ <UseRelativePathsOnly>false</UseRelativePathsOnly>
+ <ExitAction>None</ExitAction>
+ <DisableDisassembly>false</DisableDisassembly>
+ <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand>
+ <StepIntoNewInstanceEntry />
+ <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat>
+ <DisableSignals>false</DisableSignals>
+ <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode>
+ <AsyncModeSupportsBreakpoints>true</AsyncModeSupportsBreakpoints>
+ <TemporaryBreakConsolidationTimeout>0</TemporaryBreakConsolidationTimeout>
+ <EnableNonStopMode>false</EnableNonStopMode>
+ <MaxBreakpointLimit>0</MaxBreakpointLimit>
+ <EnableVerboseMode>true</EnableVerboseMode>
+ <EnablePrettyPrinters>false</EnablePrettyPrinters>
+ </AdditionalGDBSettings>
+ <DebugMethod>
+ <ID>openocd</ID>
+ <Configuration xsi:type="com.visualgdb.edp.openocd.settings.esp8266">
+ <CommandLine>-f interface/ftdi/tigard.cfg -f target/esp8266.cfg</CommandLine>
+ <ExtraParameters>
+ <Frequency xsi:nil="true" />
+ <BoostedFrequency xsi:nil="true" />
+ <ConnectUnderReset>false</ConnectUnderReset>
+ </ExtraParameters>
+ <LoadProgressGUIThreshold>131072</LoadProgressGUIThreshold>
+ <ProgramMode>Enabled</ProgramMode>
+ <StartupCommands>
+ <string>set remotetimeout 60</string>
+ <string>target remote :$$SYS:GDB_PORT$$</string>
+ <string>mon reset halt</string>
+ <string>load</string>
+ <string>mon xtensa_no_interrupts_during_steps on</string>
+ <string>mon esp8266_autofeed_watchdog on</string>
+ </StartupCommands>
+ <ProgramFLASHUsingExternalTool>false</ProgramFLASHUsingExternalTool>
+ <PreferredGDBPort>0</PreferredGDBPort>
+ <PreferredTelnetPort>0</PreferredTelnetPort>
+ <AlwaysPassSerialNumber>false</AlwaysPassSerialNumber>
+ <SelectedCoreIndex xsi:nil="true" />
+ <SuggestionLogicRevision>0</SuggestionLogicRevision>
+ <ResetMode>Soft</ResetMode>
+ <ProgramSectorSize>4096</ProgramSectorSize>
+ <EraseSectorSize>4096</EraseSectorSize>
+ <FLASHSettings>
+ <Size>size4M</Size>
+ <Frequency>freq40M</Frequency>
+ <Mode>QIO</Mode>
+ </FLASHSettings>
+ </Configuration>
+ </DebugMethod>
+ <AutoDetectRTOS>true</AutoDetectRTOS>
+ <SemihostingSupport>Disabled</SemihostingSupport>
+ <SemihostingPollingDelay>0</SemihostingPollingDelay>
+ <StepIntoEntryPoint>false</StepIntoEntryPoint>
+ <ReloadFirmwareOnReset>false</ReloadFirmwareOnReset>
+ <ValidateEndOfStackAddress>true</ValidateEndOfStackAddress>
+ <StopAtEntryPoint>false</StopAtEntryPoint>
+ <EnableVirtualHalts>false</EnableVirtualHalts>
+ <DynamicAnalysisSettings />
+ <EndOfStackSymbol>_estack</EndOfStackSymbol>
+ <TimestampProviderTicksPerSecond>0</TimestampProviderTicksPerSecond>
+ <KeepConsoleAfterExit>false</KeepConsoleAfterExit>
+ <UnusedStackFillPattern xsi:nil="true" />
+ <CheckInterfaceDrivers>true</CheckInterfaceDrivers>
+ </Debug>
+</VisualGDBProjectSettings2> \ No newline at end of file
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/CMakeLists.txt b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/CMakeLists.txt
index e82e19b6..e129a64e 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_server/components/wolfssl/CMakeLists.txt
@@ -82,8 +82,10 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
else()
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
- if("${FOUND_WOLFSSL}")
- message(STATUS "Found WOLFSSL_ROOT via Environment Variable:")
+ if( FOUND_WOLFSSL )
+ message(STATUS "Found WOLFSSL_ROOT via Environment Variable: ${CURRENT_SEARCH_DIR}")
+ set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
+ return()
else()
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
message(STATUS "$ENV{WOLFSSL_ROOT}")
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/CMakeLists.txt b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/CMakeLists.txt
index e82e19b6..e129a64e 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/components/wolfssl/CMakeLists.txt
@@ -82,8 +82,10 @@ function(FIND_WOLFSSL_DIRECTORY OUTPUT_FOUND_WOLFSSL_DIRECTORY)
else()
get_filename_component(CURRENT_SEARCH_DIR "$ENV{WOLFSSL_ROOT}" ABSOLUTE)
IS_WOLFSSL_SOURCE("${CURRENT_SEARCH_DIR}" FOUND_WOLFSSL)
- if("${FOUND_WOLFSSL}")
- message(STATUS "Found WOLFSSL_ROOT via Environment Variable:")
+ if( FOUND_WOLFSSL )
+ message(STATUS "Found WOLFSSL_ROOT via Environment Variable: ${CURRENT_SEARCH_DIR}")
+ set(${OUTPUT_FOUND_WOLFSSL_DIRECTORY} ${CURRENT_SEARCH_DIR} PARENT_SCOPE)
+ return()
else()
message(FATAL_ERROR "WOLFSSL_ROOT Environment Variable defined, but path not found:")
message(STATUS "$ENV{WOLFSSL_ROOT}")
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/main.c b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/main.c
index 1c21bd93..2fd41d3f 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/main.c
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/examples/wolfssl_test/main/main.c
@@ -36,6 +36,10 @@
#include <wolfcrypt/test/test.h>
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
+/* set to 0 for one benchmark,
+** set to 1 for continuous benchmark loop */
+#define TEST_LOOP 0
+
/*
** the wolfssl component can be installed in either:
**
@@ -190,7 +194,10 @@ void app_main(void)
#if defined(NO_ESP32_CRYPT)
ESP_LOGI(TAG, "NO_ESP32_CRYPT defined! HW acceleration DISABLED.");
#else
- #if defined(CONFIG_IDF_TARGET_ESP32C3)
+ #if defined(CONFIG_IDF_TARGET_ESP32C2)
+ ESP_LOGI(TAG, "ESP32_CRYPT is enabled for ESP32-C2.");
+
+ #elif defined(CONFIG_IDF_TARGET_ESP32C3)
ESP_LOGI(TAG, "ESP32_CRYPT is enabled for ESP32-C3.");
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
@@ -239,8 +246,11 @@ void app_main(void)
loops++;
}
- while (ret == 0);
- ESP_LOGI(TAG, "loops = %d", loops);
+ while (TEST_LOOP && (ret == 0));
+
+#if defined TEST_LOOP && (TEST_LOOP == 1)
+ ESP_LOGI(TAG, "Test loops completed: %d", loops);
+#endif
/* note wolfCrypt_Cleanup() should always be called when finished.
** This is called at the end of wolf_test_task();
@@ -266,8 +276,12 @@ void app_main(void)
- (uxTaskGetStackHighWaterMark(NULL)));
#endif
+#ifdef WOLFSSL_ESPIDF_EXIT_MESSAGE
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_EXIT_MESSAGE);
+#else
ESP_LOGI(TAG, "\n\nDone!\n\n"
"If running from idf.py monitor, press twice: Ctrl+]");
+#endif
/* done */
while (1) {
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/README.md b/extra/wolfssl/wolfssl/IDE/Espressif/README.md
index dea3b36a..5bb1622f 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/README.md
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/README.md
@@ -154,7 +154,48 @@ CMake Error at run_serial_tool.cmake:56 (message):
Solution:
-Press and hold`EN` button, press and release `IO0` button, then release `EN` button.
+Press and hold `EN` button, press and release `IO0` button, then release `EN` button.
+
+### Unknown CMake command "esptool_py_flash_project_args".
+
+This unintuitive error was observed when including an unneeded `set(COMPONENTS` in the project-level CMakeLists.txt
+and attempting to build with an older toolchain, such as the RTOS SDK 3.4 for the ESP8266.
+
+### PermissionError: [Errno 13] Permission denied could not open port {}
+
+This error, other than the obvious permissions, also occurs when the port is in use by another application:
+
+```text
+Traceback (most recent call last):
+ File "/home/gojimmypi/.espressif/python_env/rtos3.4_py3.10_env/lib/python3.10/site-packages/serial/serialposix.py", line 322, in open
+ self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
+PermissionError: [Errno 13] Permission denied: '/dev/ttyS55'
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+ [... snip ...]
+raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
+serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyS55: [Errno 13] Permission denied: '/dev/ttyS55'
+```
+### Panic Task watchdog got triggered.
+
+Long-running code may trip the watchdog timer.
+
+```
+Task watchdog got triggered.
+
+Guru Meditation Error: Core 0 panic'ed (unknown). Exception was unhandled.
+```
+
+The watchdog needs to be [fed](https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-reference/system/wdts.html?highlight=watchdog#_CPPv418esp_task_wdt_resetv) on a regular basis
+with `void esp_task_wdt_reset(void)` from `esp8266/include/esp_task_wdt.h`.
+
+Try turning off the WDT in menuconfig, or for Makefiles:
+
+```
+EXTRA_CFLAGS += -DNO_WATCHDOG
+```
#### Other Solutions
diff --git a/extra/wolfssl/wolfssl/IDE/Espressif/include.am b/extra/wolfssl/wolfssl/IDE/Espressif/include.am
index 66203415..5011e51f 100644
--- a/extra/wolfssl/wolfssl/IDE/Espressif/include.am
+++ b/extra/wolfssl/wolfssl/IDE/Espressif/include.am
@@ -95,6 +95,7 @@ EXTRA_DIST+= IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/time_hel
EXTRA_DIST+= IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/include/wifi_connect.h
EXTRA_DIST+= IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/README.md
+EXTRA_DIST+= IDE/Espressif/ESP-IDF/examples/wolfssl_client/wolfssl_client_ESP8266.vgdbproj
EXTRA_DIST+= IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.sln
EXTRA_DIST+= IDE/Espressif/ESP-IDF/examples/wolfssl_client/VisualGDB/wolfssl_client_IDF_v5_ESP32.vgdbproj
diff --git a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/Projects/user_settings.h b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/Projects/user_settings.h
index 289a4d71..c6274a29 100644
--- a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/Projects/user_settings.h
+++ b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/Projects/user_settings.h
@@ -1,4 +1,3 @@
-
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_WRITEV
@@ -17,10 +16,59 @@
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
-#define TFM_TIMING_RESISTANT
+/* A few examples of different math options below.
+ *
+ * See examples/configs/user_settings_template.h for a more
+ * detailed template. */
+#if 1
+ /* Use only single precision (SP) math and algorithms.
+ * SP math is written to accelerate specific/common key
+ * sizes and curves. This adds code from sp_c32.c, or one of the specific
+ * assembly implementations like sp_cortexm.c. This code is faster than the
+ * multi-precision support because it's optimized for the key/curve.
+ * The SP math can be used together with any multi-precision math library
+ * if WOLFSSL_SP_MATH is removed. If only standard keys/curves are being
+ * used the multi-precision math is not required.
+ */
+ #define WOLFSSL_SP_MATH
+ /* Enable SP ECC support */
+ #define WOLFSSL_HAVE_SP_ECC
+ /* Enable SP RSA support */
+ #define WOLFSSL_HAVE_SP_RSA
+ /* Enable SP DH support */
+ #define WOLFSSL_HAVE_SP_DH
+ /* Reduce stack use specifically in SP implementation. */
+ #define WOLFSSL_SP_SMALL_STACK
+ /* use smaller version of code */
+ #define WOLFSSL_SP_SMALL
+ /* Assembly optimized version - sp_cortexm.c */
+ //#define WOLFSSL_SP_ARM_CORTEX_M_ASM
+#elif 1
+ /* Use SP math for all key sizes and curves. This will use
+ * the multi-precision (MP) math implementation in sp_int.c */
+ #define WOLFSSL_SP_MATH_ALL
+ /* Disable use of dynamic stack items */
+ #define WOLFSSL_SP_NO_DYN_STACK
+ /* use smaller version of code */
+ #define WOLFSSL_SP_SMALL
+#elif 1
+ /* Fast Math (tfm.c) (stack based and timing resistant) */
+ #define USE_FAST_MATH
+ /* Enable Fast Math Timing Resistance */
+ #define TFM_TIMING_RESISTANT
+#else
+ /* Normal (integer.c) (heap based, not timing resistant) - not recommended*/
+ #define USE_INTEGER_HEAP_MATH
+#endif
+
+/* Enable ECC Timing Resistance */
#define ECC_TIMING_RESISTANT
+/* Enables blinding mode, to prevent timing attacks */
#define WC_RSA_BLINDING
+/* reduce stack use. For variables over 100 bytes allocate from heap */
+#define WOLFSSL_SMALL_STACK
+/* disable mutex locking */
#define SINGLE_THREADED /* or define RTOS option */
/* #define WOLFSSL_CMSIS_RTOS */
#define NO_FILESYSTEM
diff --git a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/settings/wolfcrypt_benchmark_Debug.jlink b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/settings/wolfcrypt_benchmark_Debug.jlink
deleted file mode 100644
index 3a2fb474..00000000
--- a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/settings/wolfcrypt_benchmark_Debug.jlink
+++ /dev/null
@@ -1,39 +0,0 @@
-[BREAKPOINTS]
-ForceImpTypeAny = 0
-ShowInfoWin = 1
-EnableFlashBP = 2
-BPDuringExecution = 0
-[CFI]
-CFISize = 0x00
-CFIAddr = 0x00
-[CPU]
-MonModeVTableAddr = 0xFFFFFFFF
-MonModeDebug = 0
-MaxNumAPs = 0
-LowPowerHandlingMode = 0
-OverrideMemMap = 0
-AllowSimulation = 1
-ScriptFile=""
-[FLASH]
-CacheExcludeSize = 0x00
-CacheExcludeAddr = 0x00
-MinNumBytesFlashDL = 0
-SkipProgOnCRCMatch = 1
-VerifyDownload = 1
-AllowCaching = 1
-EnableFlashDL = 2
-Override = 1
-Device="ATSAMV71Q21"
-[GENERAL]
-WorkRAMSize = 0x00
-WorkRAMAddr = 0x00
-RAMUsageLimit = 0x00
-[SWO]
-SWOLogFile=""
-[MEM]
-RdOverrideOrMask = 0x00
-RdOverrideAndMask = 0xFFFFFFFF
-RdOverrideAddr = 0xFFFFFFFF
-WrOverrideOrMask = 0x00
-WrOverrideAndMask = 0xFFFFFFFF
-WrOverrideAddr = 0xFFFFFFFF
diff --git a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/wolfcrypt_benchmark.ewt b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/wolfcrypt_benchmark.ewt
deleted file mode 100644
index 86013a04..00000000
--- a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_benchmark_SAMV71_XULT/wolfcrypt_benchmark.ewt
+++ /dev/null
@@ -1,2382 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-
-<project>
- <fileVersion>2</fileVersion>
- <configuration>
- <name>Debug</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>1</debug>
- <settings>
- <name>C-STAT</name>
- <archiveVersion>259</archiveVersion>
- <data>
- <version>259</version>
- <cstatargs>
- <useExtraArgs>0</useExtraArgs>
- <extraArgs></extraArgs>
- <analyzeTimeoutEnabled>1</analyzeTimeoutEnabled>
- <analyzeTimeout>600</analyzeTimeout>
- <enableParallel>0</enableParallel>
- <parallelThreads>2</parallelThreads>
- <enableFalsePositives>0</enableFalsePositives>
- <messagesLimitEnabled>1</messagesLimitEnabled>
- <messagesLimit>100</messagesLimit>
- </cstatargs>
- <cstat_settings>
- <cstat_version>1.3.2</cstat_version>
- <checks_tree>
- <package enabled="true" name="STDCHECKS">
- <group enabled="true" name="ARR">
- <check enabled="true" name="ARR-inv-index-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr"/>
- <check enabled="true" name="ARR-inv-index"/>
- <check enabled="true" name="ARR-neg-index"/>
- <check enabled="true" name="ARR-uninit-index"/>
- </group>
- <group enabled="true" name="ATH">
- <check enabled="true" name="ATH-cmp-float"/>
- <check enabled="true" name="ATH-cmp-unsign-neg"/>
- <check enabled="true" name="ATH-cmp-unsign-pos"/>
- <check enabled="true" name="ATH-div-0-assign"/>
- <check enabled="false" name="ATH-div-0-cmp-aft"/>
- <check enabled="true" name="ATH-div-0-cmp-bef"/>
- <check enabled="true" name="ATH-div-0-interval"/>
- <check enabled="true" name="ATH-div-0-pos"/>
- <check enabled="true" name="ATH-div-0-unchk-global"/>
- <check enabled="true" name="ATH-div-0-unchk-local"/>
- <check enabled="true" name="ATH-div-0-unchk-param"/>
- <check enabled="true" name="ATH-div-0"/>
- <check enabled="true" name="ATH-inc-bool"/>
- <check enabled="true" name="ATH-malloc-overrun"/>
- <check enabled="true" name="ATH-neg-check-nonneg"/>
- <check enabled="true" name="ATH-neg-check-pos"/>
- <check enabled="true" name="ATH-new-overrun"/>
- <check enabled="false" name="ATH-overflow-cast"/>
- <check enabled="true" name="ATH-overflow"/>
- <check enabled="true" name="ATH-shift-bounds"/>
- <check enabled="true" name="ATH-shift-neg"/>
- <check enabled="true" name="ATH-sizeof-by-sizeof"/>
- </group>
- <group enabled="true" name="CAST">
- <check enabled="false" name="CAST-old-style"/>
- </group>
- <group enabled="true" name="CATCH">
- <check enabled="true" name="CATCH-object-slicing"/>
- <check enabled="false" name="CATCH-xtor-bad-member"/>
- </group>
- <group enabled="true" name="COMMA">
- <check enabled="false" name="COMMA-overload"/>
- </group>
- <group enabled="true" name="COMMENT">
- <check enabled="true" name="COMMENT-nested"/>
- </group>
- <group enabled="true" name="CONST">
- <check enabled="true" name="CONST-member-ret"/>
- </group>
- <group enabled="true" name="COP">
- <check enabled="false" name="COP-alloc-ctor"/>
- <check enabled="true" name="COP-assign-op-ret"/>
- <check enabled="true" name="COP-assign-op-self"/>
- <check enabled="true" name="COP-assign-op"/>
- <check enabled="true" name="COP-copy-ctor"/>
- <check enabled="false" name="COP-dealloc-dtor"/>
- <check enabled="true" name="COP-dtor-throw"/>
- <check enabled="true" name="COP-dtor"/>
- <check enabled="true" name="COP-init-order"/>
- <check enabled="true" name="COP-init-uninit"/>
- <check enabled="true" name="COP-member-uninit"/>
- </group>
- <group enabled="true" name="CPU">
- <check enabled="true" name="CPU-ctor-call-virt"/>
- <check enabled="false" name="CPU-ctor-implicit"/>
- <check enabled="true" name="CPU-delete-throw"/>
- <check enabled="true" name="CPU-delete-void"/>
- <check enabled="true" name="CPU-dtor-call-virt"/>
- <check enabled="true" name="CPU-malloc-class"/>
- <check enabled="true" name="CPU-nonvirt-dtor"/>
- <check enabled="true" name="CPU-return-ref-to-class-data"/>
- </group>
- <group enabled="true" name="DECL">
- <check enabled="false" name="DECL-implicit-int"/>
- </group>
- <group enabled="true" name="DEFINE">
- <check enabled="true" name="DEFINE-hash-multiple"/>
- </group>
- <group enabled="true" name="ENUM">
- <check enabled="false" name="ENUM-bounds"/>
- </group>
- <group enabled="true" name="EXP">
- <check enabled="true" name="EXP-cond-assign"/>
- <check enabled="true" name="EXP-dangling-else"/>
- <check enabled="true" name="EXP-loop-exit"/>
- <check enabled="false" name="EXP-main-ret-int"/>
- <check enabled="false" name="EXP-null-stmt"/>
- <check enabled="false" name="EXP-stray-semicolon"/>
- </group>
- <group enabled="true" name="EXPR">
- <check enabled="true" name="EXPR-const-overflow"/>
- </group>
- <group enabled="true" name="FPT">
- <check enabled="true" name="FPT-cmp-null"/>
- <check enabled="false" name="FPT-literal"/>
- <check enabled="true" name="FPT-misuse"/>
- </group>
- <group enabled="true" name="FUNC">
- <check enabled="false" name="FUNC-implicit-decl"/>
- <check enabled="false" name="FUNC-unprototyped-all"/>
- <check enabled="true" name="FUNC-unprototyped-used"/>
- </group>
- <group enabled="true" name="INCLUDE">
- <check enabled="false" name="INCLUDE-c-file"/>
- </group>
- <group enabled="true" name="INT">
- <check enabled="false" name="INT-use-signed-as-unsigned-pos"/>
- <check enabled="true" name="INT-use-signed-as-unsigned"/>
- </group>
- <group enabled="true" name="ITR">
- <check enabled="true" name="ITR-end-cmp-aft"/>
- <check enabled="true" name="ITR-end-cmp-bef"/>
- <check enabled="true" name="ITR-invalidated"/>
- <check enabled="false" name="ITR-mismatch-alg"/>
- <check enabled="false" name="ITR-store"/>
- <check enabled="true" name="ITR-uninit"/>
- </group>
- <group enabled="true" name="LIB">
- <check enabled="false" name="LIB-bsearch-overrun-pos"/>
- <check enabled="false" name="LIB-bsearch-overrun"/>
- <check enabled="false" name="LIB-fn-unsafe"/>
- <check enabled="false" name="LIB-fread-overrun-pos"/>
- <check enabled="true" name="LIB-fread-overrun"/>
- <check enabled="false" name="LIB-memchr-overrun-pos"/>
- <check enabled="true" name="LIB-memchr-overrun"/>
- <check enabled="false" name="LIB-memcpy-overrun-pos"/>
- <check enabled="true" name="LIB-memcpy-overrun"/>
- <check enabled="false" name="LIB-memset-overrun-pos"/>
- <check enabled="true" name="LIB-memset-overrun"/>
- <check enabled="false" name="LIB-putenv"/>
- <check enabled="false" name="LIB-qsort-overrun-pos"/>
- <check enabled="false" name="LIB-qsort-overrun"/>
- <check enabled="true" name="LIB-return-const"/>
- <check enabled="true" name="LIB-return-error"/>
- <check enabled="true" name="LIB-return-leak"/>
- <check enabled="true" name="LIB-return-neg"/>
- <check enabled="true" name="LIB-return-null"/>
- <check enabled="false" name="LIB-sprintf-overrun"/>
- <check enabled="false" name="LIB-std-sort-overrun-pos"/>
- <check enabled="true" name="LIB-std-sort-overrun"/>
- <check enabled="false" name="LIB-strcat-overrun-pos"/>
- <check enabled="true" name="LIB-strcat-overrun"/>
- <check enabled="false" name="LIB-strcpy-overrun-pos"/>
- <check enabled="true" name="LIB-strcpy-overrun"/>
- <check enabled="false" name="LIB-strncat-overrun-pos"/>
- <check enabled="true" name="LIB-strncat-overrun"/>
- <check enabled="false" name="LIB-strncmp-overrun-pos"/>
- <check enabled="true" name="LIB-strncmp-overrun"/>
- <check enabled="false" name="LIB-strncpy-overrun-pos"/>
- <check enabled="true" name="LIB-strncpy-overrun"/>
- </group>
- <group enabled="true" name="LOGIC">
- <check enabled="false" name="LOGIC-overload"/>
- </group>
- <group enabled="true" name="MEM">
- <check enabled="true" name="MEM-delete-array-op"/>
- <check enabled="true" name="MEM-delete-op"/>
- <check enabled="true" name="MEM-double-free-alias"/>
- <check enabled="true" name="MEM-double-free-some"/>
- <check enabled="true" name="MEM-double-free"/>
- <check enabled="true" name="MEM-free-field"/>
- <check enabled="true" name="MEM-free-fptr"/>
- <check enabled="false" name="MEM-free-no-alloc-struct"/>
- <check enabled="false" name="MEM-free-no-alloc"/>
- <check enabled="true" name="MEM-free-no-use"/>
- <check enabled="true" name="MEM-free-op"/>
- <check enabled="true" name="MEM-free-struct-field"/>
- <check enabled="true" name="MEM-free-variable-alias"/>
- <check enabled="true" name="MEM-free-variable"/>
- <check enabled="true" name="MEM-leak-alias"/>
- <check enabled="false" name="MEM-leak"/>
- <check enabled="false" name="MEM-malloc-arith"/>
- <check enabled="true" name="MEM-malloc-diff-type"/>
- <check enabled="true" name="MEM-malloc-sizeof-ptr"/>
- <check enabled="true" name="MEM-malloc-sizeof"/>
- <check enabled="false" name="MEM-malloc-strlen"/>
- <check enabled="true" name="MEM-realloc-diff-type"/>
- <check enabled="true" name="MEM-return-free"/>
- <check enabled="true" name="MEM-return-no-assign"/>
- <check enabled="true" name="MEM-stack-global-field"/>
- <check enabled="true" name="MEM-stack-global"/>
- <check enabled="true" name="MEM-stack-param-ref"/>
- <check enabled="true" name="MEM-stack-param"/>
- <check enabled="true" name="MEM-stack-pos"/>
- <check enabled="true" name="MEM-stack-ref"/>
- <check enabled="true" name="MEM-stack"/>
- <check enabled="true" name="MEM-use-free-all"/>
- <check enabled="true" name="MEM-use-free-some"/>
- </group>
- <group enabled="true" name="PTR">
- <check enabled="true" name="PTR-arith-field"/>
- <check enabled="true" name="PTR-arith-stack"/>
- <check enabled="true" name="PTR-arith-var"/>
- <check enabled="true" name="PTR-cmp-str-lit"/>
- <check enabled="false" name="PTR-null-assign-fun-pos"/>
- <check enabled="false" name="PTR-null-assign-pos"/>
- <check enabled="true" name="PTR-null-assign"/>
- <check enabled="true" name="PTR-null-cmp-aft"/>
- <check enabled="true" name="PTR-null-cmp-bef-fun"/>
- <check enabled="true" name="PTR-null-cmp-bef"/>
- <check enabled="true" name="PTR-null-fun-pos"/>
- <check enabled="false" name="PTR-null-literal-pos"/>
- <check enabled="false" name="PTR-overload"/>
- <check enabled="false" name="PTR-singleton-arith-pos"/>
- <check enabled="true" name="PTR-singleton-arith"/>
- <check enabled="true" name="PTR-unchk-param-some"/>
- <check enabled="false" name="PTR-unchk-param"/>
- <check enabled="false" name="PTR-uninit-pos"/>
- <check enabled="true" name="PTR-uninit"/>
- </group>
- <group enabled="true" name="RED">
- <check enabled="false" name="RED-alloc-zero-bytes"/>
- <check enabled="false" name="RED-case-reach"/>
- <check enabled="false" name="RED-cmp-always"/>
- <check enabled="false" name="RED-cmp-never"/>
- <check enabled="false" name="RED-cond-always"/>
- <check enabled="true" name="RED-cond-const-assign"/>
- <check enabled="false" name="RED-cond-const-expr"/>
- <check enabled="false" name="RED-cond-const"/>
- <check enabled="false" name="RED-cond-never"/>
- <check enabled="true" name="RED-dead"/>
- <check enabled="false" name="RED-expr"/>
- <check enabled="false" name="RED-func-no-effect"/>
- <check enabled="true" name="RED-local-hides-global"/>
- <check enabled="false" name="RED-local-hides-local"/>
- <check enabled="false" name="RED-local-hides-member"/>
- <check enabled="true" name="RED-local-hides-param"/>
- <check enabled="false" name="RED-no-effect"/>
- <check enabled="true" name="RED-self-assign"/>
- <check enabled="true" name="RED-unused-assign"/>
- <check enabled="false" name="RED-unused-param"/>
- <check enabled="false" name="RED-unused-return-val"/>
- <check enabled="false" name="RED-unused-val"/>
- <check enabled="true" name="RED-unused-var-all"/>
- </group>
- <group enabled="true" name="RESOURCE">
- <check enabled="false" name="RESOURCE-deref-file"/>
- <check enabled="true" name="RESOURCE-double-close"/>
- <check enabled="true" name="RESOURCE-file-no-close-all"/>
- <check enabled="false" name="RESOURCE-file-pos-neg"/>
- <check enabled="true" name="RESOURCE-file-use-after-close"/>
- <check enabled="false" name="RESOURCE-implicit-deref-file"/>
- <check enabled="true" name="RESOURCE-write-ronly-file"/>
- </group>
- <group enabled="true" name="SIZEOF">
- <check enabled="true" name="SIZEOF-side-effect"/>
- </group>
- <group enabled="true" name="SPC">
- <check enabled="true" name="SPC-order"/>
- <check enabled="false" name="SPC-uninit-arr-all"/>
- <check enabled="true" name="SPC-uninit-struct-field-heap"/>
- <check enabled="false" name="SPC-uninit-struct-field"/>
- <check enabled="true" name="SPC-uninit-struct"/>
- <check enabled="true" name="SPC-uninit-var-all"/>
- <check enabled="true" name="SPC-uninit-var-some"/>
- <check enabled="false" name="SPC-volatile-reads"/>
- <check enabled="false" name="SPC-volatile-writes"/>
- </group>
- <group enabled="true" name="STRUCT">
- <check enabled="false" name="STRUCT-signed-bit"/>
- </group>
- <group enabled="true" name="SWITCH">
- <check enabled="true" name="SWITCH-fall-through"/>
- </group>
- <group enabled="true" name="THROW">
- <check enabled="false" name="THROW-empty"/>
- <check enabled="false" name="THROW-main"/>
- <check enabled="true" name="THROW-null"/>
- <check enabled="true" name="THROW-ptr"/>
- <check enabled="true" name="THROW-static"/>
- <check enabled="true" name="THROW-unhandled"/>
- </group>
- <group enabled="true" name="UNION">
- <check enabled="true" name="UNION-overlap-assign"/>
- <check enabled="true" name="UNION-type-punning"/>
- </group>
- </package>
- <package enabled="false" name="CERT">
- <group enabled="true" name="CERT-EXP">
- <check enabled="true" name="CERT-EXP19-C"/>
- </group>
- <group enabled="true" name="CERT-FIO">
- <check enabled="true" name="CERT-FIO37-C"/>
- <check enabled="true" name="CERT-FIO38-C"/>
- </group>
- <group enabled="true" name="CERT-SIG">
- <check enabled="true" name="CERT-SIG31-C"/>
- </group>
- </package>
- <package enabled="false" name="SECURITY">
- <group enabled="true" name="SEC-BUFFER">
- <check enabled="true" name="SEC-BUFFER-memory-leak-alias"/>
- <check enabled="false" name="SEC-BUFFER-memory-leak"/>
- <check enabled="false" name="SEC-BUFFER-memset-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-memset-overrun"/>
- <check enabled="false" name="SEC-BUFFER-qsort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-qsort-overrun"/>
- <check enabled="true" name="SEC-BUFFER-sprintf-overrun"/>
- <check enabled="false" name="SEC-BUFFER-std-sort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-std-sort-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcpy-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncmp-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncmp-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncpy-overrun"/>
- <check enabled="true" name="SEC-BUFFER-tainted-alloc-size"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy-length"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy"/>
- <check enabled="true" name="SEC-BUFFER-tainted-index"/>
- <check enabled="true" name="SEC-BUFFER-tainted-offset"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-all"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-some"/>
- </group>
- <group enabled="true" name="SEC-DIV-0">
- <check enabled="true" name="SEC-DIV-0-compare-after"/>
- <check enabled="true" name="SEC-DIV-0-compare-before"/>
- <check enabled="true" name="SEC-DIV-0-tainted"/>
- </group>
- <group enabled="true" name="SEC-FILEOP">
- <check enabled="true" name="SEC-FILEOP-open-no-close"/>
- <check enabled="false" name="SEC-FILEOP-path-traversal"/>
- <check enabled="true" name="SEC-FILEOP-use-after-close"/>
- </group>
- <group enabled="true" name="SEC-INJECTION">
- <check enabled="false" name="SEC-INJECTION-sql"/>
- <check enabled="false" name="SEC-INJECTION-xpath"/>
- </group>
- <group enabled="true" name="SEC-LOOP">
- <check enabled="true" name="SEC-LOOP-tainted-bound"/>
- </group>
- <group enabled="true" name="SEC-NULL">
- <check enabled="false" name="SEC-NULL-assignment-fun-pos"/>
- <check enabled="true" name="SEC-NULL-assignment"/>
- <check enabled="true" name="SEC-NULL-cmp-aft"/>
- <check enabled="true" name="SEC-NULL-cmp-bef-fun"/>
- <check enabled="true" name="SEC-NULL-cmp-bef"/>
- <check enabled="false" name="SEC-NULL-literal-pos"/>
- </group>
- <group enabled="true" name="SEC-STRING">
- <check enabled="true" name="SEC-STRING-format-string"/>
- <check enabled="false" name="SEC-STRING-hard-coded-credentials"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2004">
- <group enabled="true" name="MISRAC2004-1">
- <check enabled="true" name="MISRAC2004-1.1"/>
- <check enabled="true" name="MISRAC2004-1.2_a"/>
- <check enabled="true" name="MISRAC2004-1.2_b"/>
- <check enabled="true" name="MISRAC2004-1.2_c"/>
- <check enabled="true" name="MISRAC2004-1.2_d"/>
- <check enabled="true" name="MISRAC2004-1.2_e"/>
- <check enabled="true" name="MISRAC2004-1.2_f"/>
- <check enabled="true" name="MISRAC2004-1.2_g"/>
- <check enabled="true" name="MISRAC2004-1.2_h"/>
- <check enabled="true" name="MISRAC2004-1.2_i"/>
- <check enabled="true" name="MISRAC2004-1.2_j"/>
- </group>
- <group enabled="true" name="MISRAC2004-2">
- <check enabled="true" name="MISRAC2004-2.1"/>
- <check enabled="true" name="MISRAC2004-2.2"/>
- <check enabled="true" name="MISRAC2004-2.3"/>
- <check enabled="false" name="MISRAC2004-2.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-5">
- <check enabled="true" name="MISRAC2004-5.2"/>
- <check enabled="true" name="MISRAC2004-5.3"/>
- <check enabled="true" name="MISRAC2004-5.4"/>
- <check enabled="false" name="MISRAC2004-5.5"/>
- <check enabled="false" name="MISRAC2004-5.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-6">
- <check enabled="true" name="MISRAC2004-6.1"/>
- <check enabled="false" name="MISRAC2004-6.3"/>
- <check enabled="true" name="MISRAC2004-6.4"/>
- <check enabled="true" name="MISRAC2004-6.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-7">
- <check enabled="true" name="MISRAC2004-7.1"/>
- </group>
- <group enabled="true" name="MISRAC2004-8">
- <check enabled="true" name="MISRAC2004-8.1"/>
- <check enabled="true" name="MISRAC2004-8.2"/>
- <check enabled="true" name="MISRAC2004-8.5_a"/>
- <check enabled="true" name="MISRAC2004-8.5_b"/>
- <check enabled="true" name="MISRAC2004-8.12"/>
- </group>
- <group enabled="true" name="MISRAC2004-9">
- <check enabled="true" name="MISRAC2004-9.1_a"/>
- <check enabled="true" name="MISRAC2004-9.1_b"/>
- <check enabled="true" name="MISRAC2004-9.1_c"/>
- <check enabled="true" name="MISRAC2004-9.2"/>
- </group>
- <group enabled="true" name="MISRAC2004-10">
- <check enabled="true" name="MISRAC2004-10.1_a"/>
- <check enabled="true" name="MISRAC2004-10.1_b"/>
- <check enabled="true" name="MISRAC2004-10.1_c"/>
- <check enabled="true" name="MISRAC2004-10.1_d"/>
- <check enabled="true" name="MISRAC2004-10.2_a"/>
- <check enabled="true" name="MISRAC2004-10.2_b"/>
- <check enabled="true" name="MISRAC2004-10.2_c"/>
- <check enabled="true" name="MISRAC2004-10.2_d"/>
- <check enabled="true" name="MISRAC2004-10.3"/>
- <check enabled="true" name="MISRAC2004-10.4"/>
- <check enabled="true" name="MISRAC2004-10.5"/>
- <check enabled="true" name="MISRAC2004-10.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-11">
- <check enabled="true" name="MISRAC2004-11.1"/>
- <check enabled="false" name="MISRAC2004-11.3"/>
- <check enabled="false" name="MISRAC2004-11.4"/>
- <check enabled="true" name="MISRAC2004-11.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-12">
- <check enabled="false" name="MISRAC2004-12.1"/>
- <check enabled="true" name="MISRAC2004-12.2_a"/>
- <check enabled="true" name="MISRAC2004-12.2_b"/>
- <check enabled="true" name="MISRAC2004-12.2_c"/>
- <check enabled="true" name="MISRAC2004-12.3"/>
- <check enabled="true" name="MISRAC2004-12.4"/>
- <check enabled="false" name="MISRAC2004-12.6_a"/>
- <check enabled="false" name="MISRAC2004-12.6_b"/>
- <check enabled="true" name="MISRAC2004-12.7"/>
- <check enabled="true" name="MISRAC2004-12.8"/>
- <check enabled="true" name="MISRAC2004-12.9"/>
- <check enabled="true" name="MISRAC2004-12.10"/>
- <check enabled="false" name="MISRAC2004-12.11"/>
- <check enabled="true" name="MISRAC2004-12.12_a"/>
- <check enabled="true" name="MISRAC2004-12.12_b"/>
- <check enabled="false" name="MISRAC2004-12.13"/>
- </group>
- <group enabled="true" name="MISRAC2004-13">
- <check enabled="true" name="MISRAC2004-13.1"/>
- <check enabled="false" name="MISRAC2004-13.2_a"/>
- <check enabled="false" name="MISRAC2004-13.2_b"/>
- <check enabled="false" name="MISRAC2004-13.2_c"/>
- <check enabled="false" name="MISRAC2004-13.2_d"/>
- <check enabled="false" name="MISRAC2004-13.2_e"/>
- <check enabled="true" name="MISRAC2004-13.3"/>
- <check enabled="true" name="MISRAC2004-13.4"/>
- <check enabled="true" name="MISRAC2004-13.5"/>
- <check enabled="true" name="MISRAC2004-13.6"/>
- <check enabled="true" name="MISRAC2004-13.7_a"/>
- <check enabled="true" name="MISRAC2004-13.7_b"/>
- </group>
- <group enabled="true" name="MISRAC2004-14">
- <check enabled="true" name="MISRAC2004-14.1"/>
- <check enabled="true" name="MISRAC2004-14.2"/>
- <check enabled="true" name="MISRAC2004-14.3"/>
- <check enabled="true" name="MISRAC2004-14.4"/>
- <check enabled="true" name="MISRAC2004-14.5"/>
- <check enabled="true" name="MISRAC2004-14.6"/>
- <check enabled="true" name="MISRAC2004-14.7"/>
- <check enabled="true" name="MISRAC2004-14.8_a"/>
- <check enabled="true" name="MISRAC2004-14.8_b"/>
- <check enabled="true" name="MISRAC2004-14.8_c"/>
- <check enabled="true" name="MISRAC2004-14.8_d"/>
- <check enabled="true" name="MISRAC2004-14.9"/>
- <check enabled="true" name="MISRAC2004-14.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-15">
- <check enabled="true" name="MISRAC2004-15.0"/>
- <check enabled="true" name="MISRAC2004-15.1"/>
- <check enabled="true" name="MISRAC2004-15.2"/>
- <check enabled="true" name="MISRAC2004-15.3"/>
- <check enabled="true" name="MISRAC2004-15.4"/>
- <check enabled="true" name="MISRAC2004-15.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-16">
- <check enabled="true" name="MISRAC2004-16.1"/>
- <check enabled="true" name="MISRAC2004-16.2_a"/>
- <check enabled="true" name="MISRAC2004-16.2_b"/>
- <check enabled="true" name="MISRAC2004-16.3"/>
- <check enabled="true" name="MISRAC2004-16.5"/>
- <check enabled="true" name="MISRAC2004-16.7"/>
- <check enabled="true" name="MISRAC2004-16.8"/>
- <check enabled="true" name="MISRAC2004-16.9"/>
- <check enabled="true" name="MISRAC2004-16.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-17">
- <check enabled="true" name="MISRAC2004-17.1_a"/>
- <check enabled="true" name="MISRAC2004-17.1_b"/>
- <check enabled="true" name="MISRAC2004-17.1_c"/>
- <check enabled="true" name="MISRAC2004-17.4_a"/>
- <check enabled="true" name="MISRAC2004-17.4_b"/>
- <check enabled="true" name="MISRAC2004-17.5"/>
- <check enabled="true" name="MISRAC2004-17.6_a"/>
- <check enabled="true" name="MISRAC2004-17.6_b"/>
- <check enabled="true" name="MISRAC2004-17.6_c"/>
- <check enabled="true" name="MISRAC2004-17.6_d"/>
- </group>
- <group enabled="true" name="MISRAC2004-18">
- <check enabled="true" name="MISRAC2004-18.1"/>
- <check enabled="true" name="MISRAC2004-18.2"/>
- <check enabled="true" name="MISRAC2004-18.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-19">
- <check enabled="false" name="MISRAC2004-19.2"/>
- <check enabled="true" name="MISRAC2004-19.6"/>
- <check enabled="false" name="MISRAC2004-19.7"/>
- <check enabled="true" name="MISRAC2004-19.12"/>
- <check enabled="false" name="MISRAC2004-19.13"/>
- <check enabled="true" name="MISRAC2004-19.15"/>
- </group>
- <group enabled="true" name="MISRAC2004-20">
- <check enabled="true" name="MISRAC2004-20.1"/>
- <check enabled="true" name="MISRAC2004-20.4"/>
- <check enabled="true" name="MISRAC2004-20.5"/>
- <check enabled="true" name="MISRAC2004-20.6"/>
- <check enabled="true" name="MISRAC2004-20.7"/>
- <check enabled="true" name="MISRAC2004-20.8"/>
- <check enabled="true" name="MISRAC2004-20.9"/>
- <check enabled="true" name="MISRAC2004-20.10"/>
- <check enabled="true" name="MISRAC2004-20.11"/>
- <check enabled="true" name="MISRAC2004-20.12"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2012">
- <group enabled="true" name="MISRAC2012-Dir-4">
- <check enabled="true" name="MISRAC2012-Dir-4.3"/>
- <check enabled="false" name="MISRAC2012-Dir-4.4"/>
- <check enabled="false" name="MISRAC2012-Dir-4.5"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.8"/>
- <check enabled="false" name="MISRAC2012-Dir-4.9"/>
- <check enabled="true" name="MISRAC2012-Dir-4.10"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_d"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_e"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_f"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_h"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_i"/>
- <check enabled="false" name="MISRAC2012-Dir-4.12"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_b"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_c"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_d"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_e"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_f"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.13_h"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-1">
- <check enabled="true" name="MISRAC2012-Rule-1.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_c"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_d"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_e"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_f"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_g"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_h"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_i"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_j"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_k"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_m"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_n"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_o"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_p"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_q"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_r"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_s"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_t"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_u"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_v"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_w"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-2">
- <check enabled="true" name="MISRAC2012-Rule-2.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-2.3"/>
- <check enabled="false" name="MISRAC2012-Rule-2.4"/>
- <check enabled="false" name="MISRAC2012-Rule-2.5"/>
- <check enabled="false" name="MISRAC2012-Rule-2.6"/>
- <check enabled="false" name="MISRAC2012-Rule-2.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-3">
- <check enabled="true" name="MISRAC2012-Rule-3.1"/>
- <check enabled="true" name="MISRAC2012-Rule-3.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-5">
- <check enabled="true" name="MISRAC2012-Rule-5.1"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.6"/>
- <check enabled="true" name="MISRAC2012-Rule-5.7"/>
- <check enabled="true" name="MISRAC2012-Rule-5.8"/>
- <check enabled="false" name="MISRAC2012-Rule-5.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-6">
- <check enabled="true" name="MISRAC2012-Rule-6.1"/>
- <check enabled="true" name="MISRAC2012-Rule-6.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-7">
- <check enabled="true" name="MISRAC2012-Rule-7.1"/>
- <check enabled="true" name="MISRAC2012-Rule-7.2"/>
- <check enabled="true" name="MISRAC2012-Rule-7.3"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-8">
- <check enabled="true" name="MISRAC2012-Rule-8.1"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.4"/>
- <check enabled="false" name="MISRAC2012-Rule-8.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.6"/>
- <check enabled="false" name="MISRAC2012-Rule-8.7"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_a"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.10"/>
- <check enabled="false" name="MISRAC2012-Rule-8.11"/>
- <check enabled="true" name="MISRAC2012-Rule-8.12"/>
- <check enabled="false" name="MISRAC2012-Rule-8.13"/>
- <check enabled="true" name="MISRAC2012-Rule-8.14"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-9">
- <check enabled="true" name="MISRAC2012-Rule-9.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_e"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_f"/>
- <check enabled="true" name="MISRAC2012-Rule-9.2"/>
- <check enabled="true" name="MISRAC2012-Rule-9.3"/>
- <check enabled="true" name="MISRAC2012-Rule-9.4"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-10">
- <check enabled="true" name="MISRAC2012-Rule-10.1_R2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R4"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R8"/>
- <check enabled="true" name="MISRAC2012-Rule-10.2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_b"/>
- <check enabled="false" name="MISRAC2012-Rule-10.5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-11">
- <check enabled="true" name="MISRAC2012-Rule-11.1"/>
- <check enabled="true" name="MISRAC2012-Rule-11.2"/>
- <check enabled="true" name="MISRAC2012-Rule-11.3"/>
- <check enabled="false" name="MISRAC2012-Rule-11.4"/>
- <check enabled="false" name="MISRAC2012-Rule-11.5"/>
- <check enabled="true" name="MISRAC2012-Rule-11.6"/>
- <check enabled="true" name="MISRAC2012-Rule-11.7"/>
- <check enabled="true" name="MISRAC2012-Rule-11.8"/>
- <check enabled="true" name="MISRAC2012-Rule-11.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-12">
- <check enabled="false" name="MISRAC2012-Rule-12.1"/>
- <check enabled="true" name="MISRAC2012-Rule-12.2"/>
- <check enabled="false" name="MISRAC2012-Rule-12.3"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-13">
- <check enabled="true" name="MISRAC2012-Rule-13.1"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-13.3"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_a"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.5"/>
- <check enabled="true" name="MISRAC2012-Rule-13.6"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-14">
- <check enabled="true" name="MISRAC2012-Rule-14.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.2"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_c"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_d"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-15">
- <check enabled="false" name="MISRAC2012-Rule-15.1"/>
- <check enabled="true" name="MISRAC2012-Rule-15.2"/>
- <check enabled="true" name="MISRAC2012-Rule-15.3"/>
- <check enabled="false" name="MISRAC2012-Rule-15.4"/>
- <check enabled="false" name="MISRAC2012-Rule-15.5"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_e"/>
- <check enabled="true" name="MISRAC2012-Rule-15.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-16">
- <check enabled="true" name="MISRAC2012-Rule-16.1"/>
- <check enabled="true" name="MISRAC2012-Rule-16.2"/>
- <check enabled="true" name="MISRAC2012-Rule-16.3"/>
- <check enabled="true" name="MISRAC2012-Rule-16.4"/>
- <check enabled="true" name="MISRAC2012-Rule-16.5"/>
- <check enabled="true" name="MISRAC2012-Rule-16.6"/>
- <check enabled="true" name="MISRAC2012-Rule-16.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-17">
- <check enabled="true" name="MISRAC2012-Rule-17.1"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-17.3"/>
- <check enabled="true" name="MISRAC2012-Rule-17.4"/>
- <check enabled="false" name="MISRAC2012-Rule-17.5"/>
- <check enabled="true" name="MISRAC2012-Rule-17.6"/>
- <check enabled="true" name="MISRAC2012-Rule-17.7"/>
- <check enabled="false" name="MISRAC2012-Rule-17.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-18">
- <check enabled="true" name="MISRAC2012-Rule-18.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.2"/>
- <check enabled="true" name="MISRAC2012-Rule-18.3"/>
- <check enabled="true" name="MISRAC2012-Rule-18.4"/>
- <check enabled="false" name="MISRAC2012-Rule-18.5"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.7"/>
- <check enabled="true" name="MISRAC2012-Rule-18.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-19">
- <check enabled="true" name="MISRAC2012-Rule-19.1"/>
- <check enabled="false" name="MISRAC2012-Rule-19.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-20">
- <check enabled="false" name="MISRAC2012-Rule-20.1"/>
- <check enabled="true" name="MISRAC2012-Rule-20.2"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c99"/>
- <check enabled="false" name="MISRAC2012-Rule-20.5"/>
- <check enabled="true" name="MISRAC2012-Rule-20.7"/>
- <check enabled="false" name="MISRAC2012-Rule-20.10"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-21">
- <check enabled="true" name="MISRAC2012-Rule-21.1"/>
- <check enabled="true" name="MISRAC2012-Rule-21.2"/>
- <check enabled="true" name="MISRAC2012-Rule-21.3"/>
- <check enabled="true" name="MISRAC2012-Rule-21.4"/>
- <check enabled="true" name="MISRAC2012-Rule-21.5"/>
- <check enabled="true" name="MISRAC2012-Rule-21.6"/>
- <check enabled="true" name="MISRAC2012-Rule-21.7"/>
- <check enabled="true" name="MISRAC2012-Rule-21.8"/>
- <check enabled="true" name="MISRAC2012-Rule-21.9"/>
- <check enabled="true" name="MISRAC2012-Rule-21.10"/>
- <check enabled="true" name="MISRAC2012-Rule-21.11"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_a"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-22">
- <check enabled="true" name="MISRAC2012-Rule-22.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_c"/>
- <check enabled="true" name="MISRAC2012-Rule-22.3"/>
- <check enabled="true" name="MISRAC2012-Rule-22.4"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.6"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC++2008">
- <group enabled="true" name="MISRAC++2008-0-1">
- <check enabled="true" name="MISRAC++2008-0-1-1"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_c"/>
- <check enabled="true" name="MISRAC++2008-0-1-3"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-6"/>
- <check enabled="true" name="MISRAC++2008-0-1-7"/>
- <check enabled="false" name="MISRAC++2008-0-1-8"/>
- <check enabled="true" name="MISRAC++2008-0-1-9"/>
- <check enabled="true" name="MISRAC++2008-0-1-11"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-2">
- <check enabled="true" name="MISRAC++2008-0-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-3">
- <check enabled="true" name="MISRAC++2008-0-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-7">
- <check enabled="true" name="MISRAC++2008-2-7-1"/>
- <check enabled="true" name="MISRAC++2008-2-7-2"/>
- <check enabled="false" name="MISRAC++2008-2-7-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-10">
- <check enabled="true" name="MISRAC++2008-2-10-1"/>
- <check enabled="true" name="MISRAC++2008-2-10-2"/>
- <check enabled="true" name="MISRAC++2008-2-10-3"/>
- <check enabled="true" name="MISRAC++2008-2-10-4"/>
- <check enabled="false" name="MISRAC++2008-2-10-5"/>
- <check enabled="true" name="MISRAC++2008-2-10-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-13">
- <check enabled="true" name="MISRAC++2008-2-13-2"/>
- <check enabled="true" name="MISRAC++2008-2-13-3"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_a"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-1">
- <check enabled="true" name="MISRAC++2008-3-1-1"/>
- <check enabled="true" name="MISRAC++2008-3-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-9">
- <check enabled="false" name="MISRAC++2008-3-9-2"/>
- <check enabled="true" name="MISRAC++2008-3-9-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-4-5">
- <check enabled="true" name="MISRAC++2008-4-5-1"/>
- <check enabled="true" name="MISRAC++2008-4-5-2"/>
- <check enabled="true" name="MISRAC++2008-4-5-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-0">
- <check enabled="true" name="MISRAC++2008-5-0-1_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_c"/>
- <check enabled="false" name="MISRAC++2008-5-0-2"/>
- <check enabled="true" name="MISRAC++2008-5-0-3"/>
- <check enabled="true" name="MISRAC++2008-5-0-4"/>
- <check enabled="true" name="MISRAC++2008-5-0-5"/>
- <check enabled="true" name="MISRAC++2008-5-0-6"/>
- <check enabled="true" name="MISRAC++2008-5-0-7"/>
- <check enabled="true" name="MISRAC++2008-5-0-8"/>
- <check enabled="true" name="MISRAC++2008-5-0-9"/>
- <check enabled="true" name="MISRAC++2008-5-0-10"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-14"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_e"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_f"/>
- <check enabled="true" name="MISRAC++2008-5-0-19"/>
- <check enabled="true" name="MISRAC++2008-5-0-21"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-2">
- <check enabled="true" name="MISRAC++2008-5-2-4"/>
- <check enabled="true" name="MISRAC++2008-5-2-5"/>
- <check enabled="true" name="MISRAC++2008-5-2-6"/>
- <check enabled="true" name="MISRAC++2008-5-2-7"/>
- <check enabled="false" name="MISRAC++2008-5-2-9"/>
- <check enabled="false" name="MISRAC++2008-5-2-10"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_a"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-3">
- <check enabled="true" name="MISRAC++2008-5-3-1"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_a"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_b"/>
- <check enabled="true" name="MISRAC++2008-5-3-3"/>
- <check enabled="true" name="MISRAC++2008-5-3-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-8">
- <check enabled="true" name="MISRAC++2008-5-8-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-14">
- <check enabled="true" name="MISRAC++2008-5-14-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-18">
- <check enabled="true" name="MISRAC++2008-5-18-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-19">
- <check enabled="false" name="MISRAC++2008-5-19-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-2">
- <check enabled="true" name="MISRAC++2008-6-2-1"/>
- <check enabled="true" name="MISRAC++2008-6-2-2"/>
- <check enabled="false" name="MISRAC++2008-6-2-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-3">
- <check enabled="true" name="MISRAC++2008-6-3-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_b"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_c"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_d"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-4">
- <check enabled="true" name="MISRAC++2008-6-4-1"/>
- <check enabled="true" name="MISRAC++2008-6-4-2"/>
- <check enabled="true" name="MISRAC++2008-6-4-3"/>
- <check enabled="true" name="MISRAC++2008-6-4-4"/>
- <check enabled="true" name="MISRAC++2008-6-4-5"/>
- <check enabled="true" name="MISRAC++2008-6-4-6"/>
- <check enabled="true" name="MISRAC++2008-6-4-7"/>
- <check enabled="true" name="MISRAC++2008-6-4-8"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-5">
- <check enabled="true" name="MISRAC++2008-6-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-5-2"/>
- <check enabled="true" name="MISRAC++2008-6-5-3"/>
- <check enabled="true" name="MISRAC++2008-6-5-4"/>
- <check enabled="true" name="MISRAC++2008-6-5-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-6">
- <check enabled="true" name="MISRAC++2008-6-6-1"/>
- <check enabled="true" name="MISRAC++2008-6-6-2"/>
- <check enabled="true" name="MISRAC++2008-6-6-4"/>
- <check enabled="true" name="MISRAC++2008-6-6-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-1">
- <check enabled="true" name="MISRAC++2008-7-1-1"/>
- <check enabled="true" name="MISRAC++2008-7-1-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-2">
- <check enabled="true" name="MISRAC++2008-7-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-4">
- <check enabled="true" name="MISRAC++2008-7-4-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-5">
- <check enabled="true" name="MISRAC++2008-7-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_c"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_d"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_a"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-0">
- <check enabled="true" name="MISRAC++2008-8-0-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-4">
- <check enabled="true" name="MISRAC++2008-8-4-1"/>
- <check enabled="true" name="MISRAC++2008-8-4-3"/>
- <check enabled="true" name="MISRAC++2008-8-4-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-5">
- <check enabled="true" name="MISRAC++2008-8-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_c"/>
- <check enabled="true" name="MISRAC++2008-8-5-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-3">
- <check enabled="true" name="MISRAC++2008-9-3-1"/>
- <check enabled="true" name="MISRAC++2008-9-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-5">
- <check enabled="true" name="MISRAC++2008-9-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-6">
- <check enabled="true" name="MISRAC++2008-9-6-2"/>
- <check enabled="true" name="MISRAC++2008-9-6-3"/>
- <check enabled="true" name="MISRAC++2008-9-6-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-12-1">
- <check enabled="true" name="MISRAC++2008-12-1-1_a"/>
- <check enabled="true" name="MISRAC++2008-12-1-1_b"/>
- <check enabled="true" name="MISRAC++2008-12-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-0">
- <check enabled="false" name="MISRAC++2008-15-0-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-1">
- <check enabled="true" name="MISRAC++2008-15-1-2"/>
- <check enabled="true" name="MISRAC++2008-15-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-3">
- <check enabled="true" name="MISRAC++2008-15-3-1"/>
- <check enabled="false" name="MISRAC++2008-15-3-2"/>
- <check enabled="true" name="MISRAC++2008-15-3-3"/>
- <check enabled="true" name="MISRAC++2008-15-3-4"/>
- <check enabled="true" name="MISRAC++2008-15-3-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-5">
- <check enabled="true" name="MISRAC++2008-15-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-0">
- <check enabled="true" name="MISRAC++2008-16-0-3"/>
- <check enabled="true" name="MISRAC++2008-16-0-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-2">
- <check enabled="true" name="MISRAC++2008-16-2-2"/>
- <check enabled="true" name="MISRAC++2008-16-2-3"/>
- <check enabled="true" name="MISRAC++2008-16-2-4"/>
- <check enabled="false" name="MISRAC++2008-16-2-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-3">
- <check enabled="true" name="MISRAC++2008-16-3-1"/>
- <check enabled="false" name="MISRAC++2008-16-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-17-0">
- <check enabled="true" name="MISRAC++2008-17-0-1"/>
- <check enabled="true" name="MISRAC++2008-17-0-3"/>
- <check enabled="true" name="MISRAC++2008-17-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-0">
- <check enabled="true" name="MISRAC++2008-18-0-1"/>
- <check enabled="true" name="MISRAC++2008-18-0-2"/>
- <check enabled="true" name="MISRAC++2008-18-0-3"/>
- <check enabled="true" name="MISRAC++2008-18-0-4"/>
- <check enabled="true" name="MISRAC++2008-18-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-2">
- <check enabled="true" name="MISRAC++2008-18-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-4">
- <check enabled="true" name="MISRAC++2008-18-4-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-7">
- <check enabled="true" name="MISRAC++2008-18-7-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-19-3">
- <check enabled="true" name="MISRAC++2008-19-3-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-27-0">
- <check enabled="true" name="MISRAC++2008-27-0-1"/>
- </group>
- </package>
- </checks_tree>
- </cstat_settings>
- </data>
- </settings>
- <settings>
- <name>RuntimeChecking</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>GenRtcDebugHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnableBoundsChecking</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrMem</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcTrackPointerBounds</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcCheckAccesses</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcGenerateEntries</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcNrTrackedPointers</name>
- <state>1000</state>
- </option>
- <option>
- <name>GenRtcIntOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIncUnsigned</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntConversion</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclExplicit</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclUnsignedShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcUnhandledCase</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcDivByZero</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrFunc</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- </configuration>
- <configuration>
- <name>Release</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>0</debug>
- <settings>
- <name>C-STAT</name>
- <archiveVersion>259</archiveVersion>
- <data>
- <version>259</version>
- <cstatargs>
- <useExtraArgs>0</useExtraArgs>
- <extraArgs></extraArgs>
- <analyzeTimeoutEnabled>1</analyzeTimeoutEnabled>
- <analyzeTimeout>600</analyzeTimeout>
- <enableParallel>0</enableParallel>
- <parallelThreads>2</parallelThreads>
- <enableFalsePositives>0</enableFalsePositives>
- <messagesLimitEnabled>1</messagesLimitEnabled>
- <messagesLimit>100</messagesLimit>
- </cstatargs>
- <cstat_settings>
- <cstat_version>1.3.2</cstat_version>
- <checks_tree>
- <package enabled="true" name="STDCHECKS">
- <group enabled="true" name="ARR">
- <check enabled="true" name="ARR-inv-index-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr"/>
- <check enabled="true" name="ARR-inv-index"/>
- <check enabled="true" name="ARR-neg-index"/>
- <check enabled="true" name="ARR-uninit-index"/>
- </group>
- <group enabled="true" name="ATH">
- <check enabled="true" name="ATH-cmp-float"/>
- <check enabled="true" name="ATH-cmp-unsign-neg"/>
- <check enabled="true" name="ATH-cmp-unsign-pos"/>
- <check enabled="true" name="ATH-div-0-assign"/>
- <check enabled="false" name="ATH-div-0-cmp-aft"/>
- <check enabled="true" name="ATH-div-0-cmp-bef"/>
- <check enabled="true" name="ATH-div-0-interval"/>
- <check enabled="true" name="ATH-div-0-pos"/>
- <check enabled="true" name="ATH-div-0-unchk-global"/>
- <check enabled="true" name="ATH-div-0-unchk-local"/>
- <check enabled="true" name="ATH-div-0-unchk-param"/>
- <check enabled="true" name="ATH-div-0"/>
- <check enabled="true" name="ATH-inc-bool"/>
- <check enabled="true" name="ATH-malloc-overrun"/>
- <check enabled="true" name="ATH-neg-check-nonneg"/>
- <check enabled="true" name="ATH-neg-check-pos"/>
- <check enabled="true" name="ATH-new-overrun"/>
- <check enabled="false" name="ATH-overflow-cast"/>
- <check enabled="true" name="ATH-overflow"/>
- <check enabled="true" name="ATH-shift-bounds"/>
- <check enabled="true" name="ATH-shift-neg"/>
- <check enabled="true" name="ATH-sizeof-by-sizeof"/>
- </group>
- <group enabled="true" name="CAST">
- <check enabled="false" name="CAST-old-style"/>
- </group>
- <group enabled="true" name="CATCH">
- <check enabled="true" name="CATCH-object-slicing"/>
- <check enabled="false" name="CATCH-xtor-bad-member"/>
- </group>
- <group enabled="true" name="COMMA">
- <check enabled="false" name="COMMA-overload"/>
- </group>
- <group enabled="true" name="COMMENT">
- <check enabled="true" name="COMMENT-nested"/>
- </group>
- <group enabled="true" name="CONST">
- <check enabled="true" name="CONST-member-ret"/>
- </group>
- <group enabled="true" name="COP">
- <check enabled="false" name="COP-alloc-ctor"/>
- <check enabled="true" name="COP-assign-op-ret"/>
- <check enabled="true" name="COP-assign-op-self"/>
- <check enabled="true" name="COP-assign-op"/>
- <check enabled="true" name="COP-copy-ctor"/>
- <check enabled="false" name="COP-dealloc-dtor"/>
- <check enabled="true" name="COP-dtor-throw"/>
- <check enabled="true" name="COP-dtor"/>
- <check enabled="true" name="COP-init-order"/>
- <check enabled="true" name="COP-init-uninit"/>
- <check enabled="true" name="COP-member-uninit"/>
- </group>
- <group enabled="true" name="CPU">
- <check enabled="true" name="CPU-ctor-call-virt"/>
- <check enabled="false" name="CPU-ctor-implicit"/>
- <check enabled="true" name="CPU-delete-throw"/>
- <check enabled="true" name="CPU-delete-void"/>
- <check enabled="true" name="CPU-dtor-call-virt"/>
- <check enabled="true" name="CPU-malloc-class"/>
- <check enabled="true" name="CPU-nonvirt-dtor"/>
- <check enabled="true" name="CPU-return-ref-to-class-data"/>
- </group>
- <group enabled="true" name="DECL">
- <check enabled="false" name="DECL-implicit-int"/>
- </group>
- <group enabled="true" name="DEFINE">
- <check enabled="true" name="DEFINE-hash-multiple"/>
- </group>
- <group enabled="true" name="ENUM">
- <check enabled="false" name="ENUM-bounds"/>
- </group>
- <group enabled="true" name="EXP">
- <check enabled="true" name="EXP-cond-assign"/>
- <check enabled="true" name="EXP-dangling-else"/>
- <check enabled="true" name="EXP-loop-exit"/>
- <check enabled="false" name="EXP-main-ret-int"/>
- <check enabled="false" name="EXP-null-stmt"/>
- <check enabled="false" name="EXP-stray-semicolon"/>
- </group>
- <group enabled="true" name="EXPR">
- <check enabled="true" name="EXPR-const-overflow"/>
- </group>
- <group enabled="true" name="FPT">
- <check enabled="true" name="FPT-cmp-null"/>
- <check enabled="false" name="FPT-literal"/>
- <check enabled="true" name="FPT-misuse"/>
- </group>
- <group enabled="true" name="FUNC">
- <check enabled="false" name="FUNC-implicit-decl"/>
- <check enabled="false" name="FUNC-unprototyped-all"/>
- <check enabled="true" name="FUNC-unprototyped-used"/>
- </group>
- <group enabled="true" name="INCLUDE">
- <check enabled="false" name="INCLUDE-c-file"/>
- </group>
- <group enabled="true" name="INT">
- <check enabled="false" name="INT-use-signed-as-unsigned-pos"/>
- <check enabled="true" name="INT-use-signed-as-unsigned"/>
- </group>
- <group enabled="true" name="ITR">
- <check enabled="true" name="ITR-end-cmp-aft"/>
- <check enabled="true" name="ITR-end-cmp-bef"/>
- <check enabled="true" name="ITR-invalidated"/>
- <check enabled="false" name="ITR-mismatch-alg"/>
- <check enabled="false" name="ITR-store"/>
- <check enabled="true" name="ITR-uninit"/>
- </group>
- <group enabled="true" name="LIB">
- <check enabled="false" name="LIB-bsearch-overrun-pos"/>
- <check enabled="false" name="LIB-bsearch-overrun"/>
- <check enabled="false" name="LIB-fn-unsafe"/>
- <check enabled="false" name="LIB-fread-overrun-pos"/>
- <check enabled="true" name="LIB-fread-overrun"/>
- <check enabled="false" name="LIB-memchr-overrun-pos"/>
- <check enabled="true" name="LIB-memchr-overrun"/>
- <check enabled="false" name="LIB-memcpy-overrun-pos"/>
- <check enabled="true" name="LIB-memcpy-overrun"/>
- <check enabled="false" name="LIB-memset-overrun-pos"/>
- <check enabled="true" name="LIB-memset-overrun"/>
- <check enabled="false" name="LIB-putenv"/>
- <check enabled="false" name="LIB-qsort-overrun-pos"/>
- <check enabled="false" name="LIB-qsort-overrun"/>
- <check enabled="true" name="LIB-return-const"/>
- <check enabled="true" name="LIB-return-error"/>
- <check enabled="true" name="LIB-return-leak"/>
- <check enabled="true" name="LIB-return-neg"/>
- <check enabled="true" name="LIB-return-null"/>
- <check enabled="false" name="LIB-sprintf-overrun"/>
- <check enabled="false" name="LIB-std-sort-overrun-pos"/>
- <check enabled="true" name="LIB-std-sort-overrun"/>
- <check enabled="false" name="LIB-strcat-overrun-pos"/>
- <check enabled="true" name="LIB-strcat-overrun"/>
- <check enabled="false" name="LIB-strcpy-overrun-pos"/>
- <check enabled="true" name="LIB-strcpy-overrun"/>
- <check enabled="false" name="LIB-strncat-overrun-pos"/>
- <check enabled="true" name="LIB-strncat-overrun"/>
- <check enabled="false" name="LIB-strncmp-overrun-pos"/>
- <check enabled="true" name="LIB-strncmp-overrun"/>
- <check enabled="false" name="LIB-strncpy-overrun-pos"/>
- <check enabled="true" name="LIB-strncpy-overrun"/>
- </group>
- <group enabled="true" name="LOGIC">
- <check enabled="false" name="LOGIC-overload"/>
- </group>
- <group enabled="true" name="MEM">
- <check enabled="true" name="MEM-delete-array-op"/>
- <check enabled="true" name="MEM-delete-op"/>
- <check enabled="true" name="MEM-double-free-alias"/>
- <check enabled="true" name="MEM-double-free-some"/>
- <check enabled="true" name="MEM-double-free"/>
- <check enabled="true" name="MEM-free-field"/>
- <check enabled="true" name="MEM-free-fptr"/>
- <check enabled="false" name="MEM-free-no-alloc-struct"/>
- <check enabled="false" name="MEM-free-no-alloc"/>
- <check enabled="true" name="MEM-free-no-use"/>
- <check enabled="true" name="MEM-free-op"/>
- <check enabled="true" name="MEM-free-struct-field"/>
- <check enabled="true" name="MEM-free-variable-alias"/>
- <check enabled="true" name="MEM-free-variable"/>
- <check enabled="true" name="MEM-leak-alias"/>
- <check enabled="false" name="MEM-leak"/>
- <check enabled="false" name="MEM-malloc-arith"/>
- <check enabled="true" name="MEM-malloc-diff-type"/>
- <check enabled="true" name="MEM-malloc-sizeof-ptr"/>
- <check enabled="true" name="MEM-malloc-sizeof"/>
- <check enabled="false" name="MEM-malloc-strlen"/>
- <check enabled="true" name="MEM-realloc-diff-type"/>
- <check enabled="true" name="MEM-return-free"/>
- <check enabled="true" name="MEM-return-no-assign"/>
- <check enabled="true" name="MEM-stack-global-field"/>
- <check enabled="true" name="MEM-stack-global"/>
- <check enabled="true" name="MEM-stack-param-ref"/>
- <check enabled="true" name="MEM-stack-param"/>
- <check enabled="true" name="MEM-stack-pos"/>
- <check enabled="true" name="MEM-stack-ref"/>
- <check enabled="true" name="MEM-stack"/>
- <check enabled="true" name="MEM-use-free-all"/>
- <check enabled="true" name="MEM-use-free-some"/>
- </group>
- <group enabled="true" name="PTR">
- <check enabled="true" name="PTR-arith-field"/>
- <check enabled="true" name="PTR-arith-stack"/>
- <check enabled="true" name="PTR-arith-var"/>
- <check enabled="true" name="PTR-cmp-str-lit"/>
- <check enabled="false" name="PTR-null-assign-fun-pos"/>
- <check enabled="false" name="PTR-null-assign-pos"/>
- <check enabled="true" name="PTR-null-assign"/>
- <check enabled="true" name="PTR-null-cmp-aft"/>
- <check enabled="true" name="PTR-null-cmp-bef-fun"/>
- <check enabled="true" name="PTR-null-cmp-bef"/>
- <check enabled="true" name="PTR-null-fun-pos"/>
- <check enabled="false" name="PTR-null-literal-pos"/>
- <check enabled="false" name="PTR-overload"/>
- <check enabled="false" name="PTR-singleton-arith-pos"/>
- <check enabled="true" name="PTR-singleton-arith"/>
- <check enabled="true" name="PTR-unchk-param-some"/>
- <check enabled="false" name="PTR-unchk-param"/>
- <check enabled="false" name="PTR-uninit-pos"/>
- <check enabled="true" name="PTR-uninit"/>
- </group>
- <group enabled="true" name="RED">
- <check enabled="false" name="RED-alloc-zero-bytes"/>
- <check enabled="false" name="RED-case-reach"/>
- <check enabled="false" name="RED-cmp-always"/>
- <check enabled="false" name="RED-cmp-never"/>
- <check enabled="false" name="RED-cond-always"/>
- <check enabled="true" name="RED-cond-const-assign"/>
- <check enabled="false" name="RED-cond-const-expr"/>
- <check enabled="false" name="RED-cond-const"/>
- <check enabled="false" name="RED-cond-never"/>
- <check enabled="true" name="RED-dead"/>
- <check enabled="false" name="RED-expr"/>
- <check enabled="false" name="RED-func-no-effect"/>
- <check enabled="true" name="RED-local-hides-global"/>
- <check enabled="false" name="RED-local-hides-local"/>
- <check enabled="false" name="RED-local-hides-member"/>
- <check enabled="true" name="RED-local-hides-param"/>
- <check enabled="false" name="RED-no-effect"/>
- <check enabled="true" name="RED-self-assign"/>
- <check enabled="true" name="RED-unused-assign"/>
- <check enabled="false" name="RED-unused-param"/>
- <check enabled="false" name="RED-unused-return-val"/>
- <check enabled="false" name="RED-unused-val"/>
- <check enabled="true" name="RED-unused-var-all"/>
- </group>
- <group enabled="true" name="RESOURCE">
- <check enabled="false" name="RESOURCE-deref-file"/>
- <check enabled="true" name="RESOURCE-double-close"/>
- <check enabled="true" name="RESOURCE-file-no-close-all"/>
- <check enabled="false" name="RESOURCE-file-pos-neg"/>
- <check enabled="true" name="RESOURCE-file-use-after-close"/>
- <check enabled="false" name="RESOURCE-implicit-deref-file"/>
- <check enabled="true" name="RESOURCE-write-ronly-file"/>
- </group>
- <group enabled="true" name="SIZEOF">
- <check enabled="true" name="SIZEOF-side-effect"/>
- </group>
- <group enabled="true" name="SPC">
- <check enabled="true" name="SPC-order"/>
- <check enabled="false" name="SPC-uninit-arr-all"/>
- <check enabled="true" name="SPC-uninit-struct-field-heap"/>
- <check enabled="false" name="SPC-uninit-struct-field"/>
- <check enabled="true" name="SPC-uninit-struct"/>
- <check enabled="true" name="SPC-uninit-var-all"/>
- <check enabled="true" name="SPC-uninit-var-some"/>
- <check enabled="false" name="SPC-volatile-reads"/>
- <check enabled="false" name="SPC-volatile-writes"/>
- </group>
- <group enabled="true" name="STRUCT">
- <check enabled="false" name="STRUCT-signed-bit"/>
- </group>
- <group enabled="true" name="SWITCH">
- <check enabled="true" name="SWITCH-fall-through"/>
- </group>
- <group enabled="true" name="THROW">
- <check enabled="false" name="THROW-empty"/>
- <check enabled="false" name="THROW-main"/>
- <check enabled="true" name="THROW-null"/>
- <check enabled="true" name="THROW-ptr"/>
- <check enabled="true" name="THROW-static"/>
- <check enabled="true" name="THROW-unhandled"/>
- </group>
- <group enabled="true" name="UNION">
- <check enabled="true" name="UNION-overlap-assign"/>
- <check enabled="true" name="UNION-type-punning"/>
- </group>
- </package>
- <package enabled="false" name="CERT">
- <group enabled="true" name="CERT-EXP">
- <check enabled="true" name="CERT-EXP19-C"/>
- </group>
- <group enabled="true" name="CERT-FIO">
- <check enabled="true" name="CERT-FIO37-C"/>
- <check enabled="true" name="CERT-FIO38-C"/>
- </group>
- <group enabled="true" name="CERT-SIG">
- <check enabled="true" name="CERT-SIG31-C"/>
- </group>
- </package>
- <package enabled="false" name="SECURITY">
- <group enabled="true" name="SEC-BUFFER">
- <check enabled="true" name="SEC-BUFFER-memory-leak-alias"/>
- <check enabled="false" name="SEC-BUFFER-memory-leak"/>
- <check enabled="false" name="SEC-BUFFER-memset-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-memset-overrun"/>
- <check enabled="false" name="SEC-BUFFER-qsort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-qsort-overrun"/>
- <check enabled="true" name="SEC-BUFFER-sprintf-overrun"/>
- <check enabled="false" name="SEC-BUFFER-std-sort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-std-sort-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcpy-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncmp-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncmp-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncpy-overrun"/>
- <check enabled="true" name="SEC-BUFFER-tainted-alloc-size"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy-length"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy"/>
- <check enabled="true" name="SEC-BUFFER-tainted-index"/>
- <check enabled="true" name="SEC-BUFFER-tainted-offset"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-all"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-some"/>
- </group>
- <group enabled="true" name="SEC-DIV-0">
- <check enabled="true" name="SEC-DIV-0-compare-after"/>
- <check enabled="true" name="SEC-DIV-0-compare-before"/>
- <check enabled="true" name="SEC-DIV-0-tainted"/>
- </group>
- <group enabled="true" name="SEC-FILEOP">
- <check enabled="true" name="SEC-FILEOP-open-no-close"/>
- <check enabled="false" name="SEC-FILEOP-path-traversal"/>
- <check enabled="true" name="SEC-FILEOP-use-after-close"/>
- </group>
- <group enabled="true" name="SEC-INJECTION">
- <check enabled="false" name="SEC-INJECTION-sql"/>
- <check enabled="false" name="SEC-INJECTION-xpath"/>
- </group>
- <group enabled="true" name="SEC-LOOP">
- <check enabled="true" name="SEC-LOOP-tainted-bound"/>
- </group>
- <group enabled="true" name="SEC-NULL">
- <check enabled="false" name="SEC-NULL-assignment-fun-pos"/>
- <check enabled="true" name="SEC-NULL-assignment"/>
- <check enabled="true" name="SEC-NULL-cmp-aft"/>
- <check enabled="true" name="SEC-NULL-cmp-bef-fun"/>
- <check enabled="true" name="SEC-NULL-cmp-bef"/>
- <check enabled="false" name="SEC-NULL-literal-pos"/>
- </group>
- <group enabled="true" name="SEC-STRING">
- <check enabled="true" name="SEC-STRING-format-string"/>
- <check enabled="false" name="SEC-STRING-hard-coded-credentials"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2004">
- <group enabled="true" name="MISRAC2004-1">
- <check enabled="true" name="MISRAC2004-1.1"/>
- <check enabled="true" name="MISRAC2004-1.2_a"/>
- <check enabled="true" name="MISRAC2004-1.2_b"/>
- <check enabled="true" name="MISRAC2004-1.2_c"/>
- <check enabled="true" name="MISRAC2004-1.2_d"/>
- <check enabled="true" name="MISRAC2004-1.2_e"/>
- <check enabled="true" name="MISRAC2004-1.2_f"/>
- <check enabled="true" name="MISRAC2004-1.2_g"/>
- <check enabled="true" name="MISRAC2004-1.2_h"/>
- <check enabled="true" name="MISRAC2004-1.2_i"/>
- <check enabled="true" name="MISRAC2004-1.2_j"/>
- </group>
- <group enabled="true" name="MISRAC2004-2">
- <check enabled="true" name="MISRAC2004-2.1"/>
- <check enabled="true" name="MISRAC2004-2.2"/>
- <check enabled="true" name="MISRAC2004-2.3"/>
- <check enabled="false" name="MISRAC2004-2.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-5">
- <check enabled="true" name="MISRAC2004-5.2"/>
- <check enabled="true" name="MISRAC2004-5.3"/>
- <check enabled="true" name="MISRAC2004-5.4"/>
- <check enabled="false" name="MISRAC2004-5.5"/>
- <check enabled="false" name="MISRAC2004-5.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-6">
- <check enabled="true" name="MISRAC2004-6.1"/>
- <check enabled="false" name="MISRAC2004-6.3"/>
- <check enabled="true" name="MISRAC2004-6.4"/>
- <check enabled="true" name="MISRAC2004-6.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-7">
- <check enabled="true" name="MISRAC2004-7.1"/>
- </group>
- <group enabled="true" name="MISRAC2004-8">
- <check enabled="true" name="MISRAC2004-8.1"/>
- <check enabled="true" name="MISRAC2004-8.2"/>
- <check enabled="true" name="MISRAC2004-8.5_a"/>
- <check enabled="true" name="MISRAC2004-8.5_b"/>
- <check enabled="true" name="MISRAC2004-8.12"/>
- </group>
- <group enabled="true" name="MISRAC2004-9">
- <check enabled="true" name="MISRAC2004-9.1_a"/>
- <check enabled="true" name="MISRAC2004-9.1_b"/>
- <check enabled="true" name="MISRAC2004-9.1_c"/>
- <check enabled="true" name="MISRAC2004-9.2"/>
- </group>
- <group enabled="true" name="MISRAC2004-10">
- <check enabled="true" name="MISRAC2004-10.1_a"/>
- <check enabled="true" name="MISRAC2004-10.1_b"/>
- <check enabled="true" name="MISRAC2004-10.1_c"/>
- <check enabled="true" name="MISRAC2004-10.1_d"/>
- <check enabled="true" name="MISRAC2004-10.2_a"/>
- <check enabled="true" name="MISRAC2004-10.2_b"/>
- <check enabled="true" name="MISRAC2004-10.2_c"/>
- <check enabled="true" name="MISRAC2004-10.2_d"/>
- <check enabled="true" name="MISRAC2004-10.3"/>
- <check enabled="true" name="MISRAC2004-10.4"/>
- <check enabled="true" name="MISRAC2004-10.5"/>
- <check enabled="true" name="MISRAC2004-10.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-11">
- <check enabled="true" name="MISRAC2004-11.1"/>
- <check enabled="false" name="MISRAC2004-11.3"/>
- <check enabled="false" name="MISRAC2004-11.4"/>
- <check enabled="true" name="MISRAC2004-11.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-12">
- <check enabled="false" name="MISRAC2004-12.1"/>
- <check enabled="true" name="MISRAC2004-12.2_a"/>
- <check enabled="true" name="MISRAC2004-12.2_b"/>
- <check enabled="true" name="MISRAC2004-12.2_c"/>
- <check enabled="true" name="MISRAC2004-12.3"/>
- <check enabled="true" name="MISRAC2004-12.4"/>
- <check enabled="false" name="MISRAC2004-12.6_a"/>
- <check enabled="false" name="MISRAC2004-12.6_b"/>
- <check enabled="true" name="MISRAC2004-12.7"/>
- <check enabled="true" name="MISRAC2004-12.8"/>
- <check enabled="true" name="MISRAC2004-12.9"/>
- <check enabled="true" name="MISRAC2004-12.10"/>
- <check enabled="false" name="MISRAC2004-12.11"/>
- <check enabled="true" name="MISRAC2004-12.12_a"/>
- <check enabled="true" name="MISRAC2004-12.12_b"/>
- <check enabled="false" name="MISRAC2004-12.13"/>
- </group>
- <group enabled="true" name="MISRAC2004-13">
- <check enabled="true" name="MISRAC2004-13.1"/>
- <check enabled="false" name="MISRAC2004-13.2_a"/>
- <check enabled="false" name="MISRAC2004-13.2_b"/>
- <check enabled="false" name="MISRAC2004-13.2_c"/>
- <check enabled="false" name="MISRAC2004-13.2_d"/>
- <check enabled="false" name="MISRAC2004-13.2_e"/>
- <check enabled="true" name="MISRAC2004-13.3"/>
- <check enabled="true" name="MISRAC2004-13.4"/>
- <check enabled="true" name="MISRAC2004-13.5"/>
- <check enabled="true" name="MISRAC2004-13.6"/>
- <check enabled="true" name="MISRAC2004-13.7_a"/>
- <check enabled="true" name="MISRAC2004-13.7_b"/>
- </group>
- <group enabled="true" name="MISRAC2004-14">
- <check enabled="true" name="MISRAC2004-14.1"/>
- <check enabled="true" name="MISRAC2004-14.2"/>
- <check enabled="true" name="MISRAC2004-14.3"/>
- <check enabled="true" name="MISRAC2004-14.4"/>
- <check enabled="true" name="MISRAC2004-14.5"/>
- <check enabled="true" name="MISRAC2004-14.6"/>
- <check enabled="true" name="MISRAC2004-14.7"/>
- <check enabled="true" name="MISRAC2004-14.8_a"/>
- <check enabled="true" name="MISRAC2004-14.8_b"/>
- <check enabled="true" name="MISRAC2004-14.8_c"/>
- <check enabled="true" name="MISRAC2004-14.8_d"/>
- <check enabled="true" name="MISRAC2004-14.9"/>
- <check enabled="true" name="MISRAC2004-14.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-15">
- <check enabled="true" name="MISRAC2004-15.0"/>
- <check enabled="true" name="MISRAC2004-15.1"/>
- <check enabled="true" name="MISRAC2004-15.2"/>
- <check enabled="true" name="MISRAC2004-15.3"/>
- <check enabled="true" name="MISRAC2004-15.4"/>
- <check enabled="true" name="MISRAC2004-15.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-16">
- <check enabled="true" name="MISRAC2004-16.1"/>
- <check enabled="true" name="MISRAC2004-16.2_a"/>
- <check enabled="true" name="MISRAC2004-16.2_b"/>
- <check enabled="true" name="MISRAC2004-16.3"/>
- <check enabled="true" name="MISRAC2004-16.5"/>
- <check enabled="true" name="MISRAC2004-16.7"/>
- <check enabled="true" name="MISRAC2004-16.8"/>
- <check enabled="true" name="MISRAC2004-16.9"/>
- <check enabled="true" name="MISRAC2004-16.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-17">
- <check enabled="true" name="MISRAC2004-17.1_a"/>
- <check enabled="true" name="MISRAC2004-17.1_b"/>
- <check enabled="true" name="MISRAC2004-17.1_c"/>
- <check enabled="true" name="MISRAC2004-17.4_a"/>
- <check enabled="true" name="MISRAC2004-17.4_b"/>
- <check enabled="true" name="MISRAC2004-17.5"/>
- <check enabled="true" name="MISRAC2004-17.6_a"/>
- <check enabled="true" name="MISRAC2004-17.6_b"/>
- <check enabled="true" name="MISRAC2004-17.6_c"/>
- <check enabled="true" name="MISRAC2004-17.6_d"/>
- </group>
- <group enabled="true" name="MISRAC2004-18">
- <check enabled="true" name="MISRAC2004-18.1"/>
- <check enabled="true" name="MISRAC2004-18.2"/>
- <check enabled="true" name="MISRAC2004-18.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-19">
- <check enabled="false" name="MISRAC2004-19.2"/>
- <check enabled="true" name="MISRAC2004-19.6"/>
- <check enabled="false" name="MISRAC2004-19.7"/>
- <check enabled="true" name="MISRAC2004-19.12"/>
- <check enabled="false" name="MISRAC2004-19.13"/>
- <check enabled="true" name="MISRAC2004-19.15"/>
- </group>
- <group enabled="true" name="MISRAC2004-20">
- <check enabled="true" name="MISRAC2004-20.1"/>
- <check enabled="true" name="MISRAC2004-20.4"/>
- <check enabled="true" name="MISRAC2004-20.5"/>
- <check enabled="true" name="MISRAC2004-20.6"/>
- <check enabled="true" name="MISRAC2004-20.7"/>
- <check enabled="true" name="MISRAC2004-20.8"/>
- <check enabled="true" name="MISRAC2004-20.9"/>
- <check enabled="true" name="MISRAC2004-20.10"/>
- <check enabled="true" name="MISRAC2004-20.11"/>
- <check enabled="true" name="MISRAC2004-20.12"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2012">
- <group enabled="true" name="MISRAC2012-Dir-4">
- <check enabled="true" name="MISRAC2012-Dir-4.3"/>
- <check enabled="false" name="MISRAC2012-Dir-4.4"/>
- <check enabled="false" name="MISRAC2012-Dir-4.5"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.8"/>
- <check enabled="false" name="MISRAC2012-Dir-4.9"/>
- <check enabled="true" name="MISRAC2012-Dir-4.10"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_d"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_e"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_f"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_h"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_i"/>
- <check enabled="false" name="MISRAC2012-Dir-4.12"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_b"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_c"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_d"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_e"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_f"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.13_h"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-1">
- <check enabled="true" name="MISRAC2012-Rule-1.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_c"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_d"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_e"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_f"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_g"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_h"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_i"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_j"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_k"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_m"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_n"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_o"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_p"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_q"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_r"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_s"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_t"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_u"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_v"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_w"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-2">
- <check enabled="true" name="MISRAC2012-Rule-2.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-2.3"/>
- <check enabled="false" name="MISRAC2012-Rule-2.4"/>
- <check enabled="false" name="MISRAC2012-Rule-2.5"/>
- <check enabled="false" name="MISRAC2012-Rule-2.6"/>
- <check enabled="false" name="MISRAC2012-Rule-2.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-3">
- <check enabled="true" name="MISRAC2012-Rule-3.1"/>
- <check enabled="true" name="MISRAC2012-Rule-3.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-5">
- <check enabled="true" name="MISRAC2012-Rule-5.1"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.6"/>
- <check enabled="true" name="MISRAC2012-Rule-5.7"/>
- <check enabled="true" name="MISRAC2012-Rule-5.8"/>
- <check enabled="false" name="MISRAC2012-Rule-5.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-6">
- <check enabled="true" name="MISRAC2012-Rule-6.1"/>
- <check enabled="true" name="MISRAC2012-Rule-6.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-7">
- <check enabled="true" name="MISRAC2012-Rule-7.1"/>
- <check enabled="true" name="MISRAC2012-Rule-7.2"/>
- <check enabled="true" name="MISRAC2012-Rule-7.3"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-8">
- <check enabled="true" name="MISRAC2012-Rule-8.1"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.4"/>
- <check enabled="false" name="MISRAC2012-Rule-8.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.6"/>
- <check enabled="false" name="MISRAC2012-Rule-8.7"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_a"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.10"/>
- <check enabled="false" name="MISRAC2012-Rule-8.11"/>
- <check enabled="true" name="MISRAC2012-Rule-8.12"/>
- <check enabled="false" name="MISRAC2012-Rule-8.13"/>
- <check enabled="true" name="MISRAC2012-Rule-8.14"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-9">
- <check enabled="true" name="MISRAC2012-Rule-9.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_e"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_f"/>
- <check enabled="true" name="MISRAC2012-Rule-9.2"/>
- <check enabled="true" name="MISRAC2012-Rule-9.3"/>
- <check enabled="true" name="MISRAC2012-Rule-9.4"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-10">
- <check enabled="true" name="MISRAC2012-Rule-10.1_R2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R4"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R8"/>
- <check enabled="true" name="MISRAC2012-Rule-10.2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_b"/>
- <check enabled="false" name="MISRAC2012-Rule-10.5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-11">
- <check enabled="true" name="MISRAC2012-Rule-11.1"/>
- <check enabled="true" name="MISRAC2012-Rule-11.2"/>
- <check enabled="true" name="MISRAC2012-Rule-11.3"/>
- <check enabled="false" name="MISRAC2012-Rule-11.4"/>
- <check enabled="false" name="MISRAC2012-Rule-11.5"/>
- <check enabled="true" name="MISRAC2012-Rule-11.6"/>
- <check enabled="true" name="MISRAC2012-Rule-11.7"/>
- <check enabled="true" name="MISRAC2012-Rule-11.8"/>
- <check enabled="true" name="MISRAC2012-Rule-11.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-12">
- <check enabled="false" name="MISRAC2012-Rule-12.1"/>
- <check enabled="true" name="MISRAC2012-Rule-12.2"/>
- <check enabled="false" name="MISRAC2012-Rule-12.3"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-13">
- <check enabled="true" name="MISRAC2012-Rule-13.1"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-13.3"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_a"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.5"/>
- <check enabled="true" name="MISRAC2012-Rule-13.6"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-14">
- <check enabled="true" name="MISRAC2012-Rule-14.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.2"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_c"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_d"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-15">
- <check enabled="false" name="MISRAC2012-Rule-15.1"/>
- <check enabled="true" name="MISRAC2012-Rule-15.2"/>
- <check enabled="true" name="MISRAC2012-Rule-15.3"/>
- <check enabled="false" name="MISRAC2012-Rule-15.4"/>
- <check enabled="false" name="MISRAC2012-Rule-15.5"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_e"/>
- <check enabled="true" name="MISRAC2012-Rule-15.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-16">
- <check enabled="true" name="MISRAC2012-Rule-16.1"/>
- <check enabled="true" name="MISRAC2012-Rule-16.2"/>
- <check enabled="true" name="MISRAC2012-Rule-16.3"/>
- <check enabled="true" name="MISRAC2012-Rule-16.4"/>
- <check enabled="true" name="MISRAC2012-Rule-16.5"/>
- <check enabled="true" name="MISRAC2012-Rule-16.6"/>
- <check enabled="true" name="MISRAC2012-Rule-16.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-17">
- <check enabled="true" name="MISRAC2012-Rule-17.1"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-17.3"/>
- <check enabled="true" name="MISRAC2012-Rule-17.4"/>
- <check enabled="false" name="MISRAC2012-Rule-17.5"/>
- <check enabled="true" name="MISRAC2012-Rule-17.6"/>
- <check enabled="true" name="MISRAC2012-Rule-17.7"/>
- <check enabled="false" name="MISRAC2012-Rule-17.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-18">
- <check enabled="true" name="MISRAC2012-Rule-18.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.2"/>
- <check enabled="true" name="MISRAC2012-Rule-18.3"/>
- <check enabled="true" name="MISRAC2012-Rule-18.4"/>
- <check enabled="false" name="MISRAC2012-Rule-18.5"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.7"/>
- <check enabled="true" name="MISRAC2012-Rule-18.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-19">
- <check enabled="true" name="MISRAC2012-Rule-19.1"/>
- <check enabled="false" name="MISRAC2012-Rule-19.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-20">
- <check enabled="false" name="MISRAC2012-Rule-20.1"/>
- <check enabled="true" name="MISRAC2012-Rule-20.2"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c99"/>
- <check enabled="false" name="MISRAC2012-Rule-20.5"/>
- <check enabled="true" name="MISRAC2012-Rule-20.7"/>
- <check enabled="false" name="MISRAC2012-Rule-20.10"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-21">
- <check enabled="true" name="MISRAC2012-Rule-21.1"/>
- <check enabled="true" name="MISRAC2012-Rule-21.2"/>
- <check enabled="true" name="MISRAC2012-Rule-21.3"/>
- <check enabled="true" name="MISRAC2012-Rule-21.4"/>
- <check enabled="true" name="MISRAC2012-Rule-21.5"/>
- <check enabled="true" name="MISRAC2012-Rule-21.6"/>
- <check enabled="true" name="MISRAC2012-Rule-21.7"/>
- <check enabled="true" name="MISRAC2012-Rule-21.8"/>
- <check enabled="true" name="MISRAC2012-Rule-21.9"/>
- <check enabled="true" name="MISRAC2012-Rule-21.10"/>
- <check enabled="true" name="MISRAC2012-Rule-21.11"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_a"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-22">
- <check enabled="true" name="MISRAC2012-Rule-22.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_c"/>
- <check enabled="true" name="MISRAC2012-Rule-22.3"/>
- <check enabled="true" name="MISRAC2012-Rule-22.4"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.6"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC++2008">
- <group enabled="true" name="MISRAC++2008-0-1">
- <check enabled="true" name="MISRAC++2008-0-1-1"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_c"/>
- <check enabled="true" name="MISRAC++2008-0-1-3"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-6"/>
- <check enabled="true" name="MISRAC++2008-0-1-7"/>
- <check enabled="false" name="MISRAC++2008-0-1-8"/>
- <check enabled="true" name="MISRAC++2008-0-1-9"/>
- <check enabled="true" name="MISRAC++2008-0-1-11"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-2">
- <check enabled="true" name="MISRAC++2008-0-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-3">
- <check enabled="true" name="MISRAC++2008-0-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-7">
- <check enabled="true" name="MISRAC++2008-2-7-1"/>
- <check enabled="true" name="MISRAC++2008-2-7-2"/>
- <check enabled="false" name="MISRAC++2008-2-7-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-10">
- <check enabled="true" name="MISRAC++2008-2-10-1"/>
- <check enabled="true" name="MISRAC++2008-2-10-2"/>
- <check enabled="true" name="MISRAC++2008-2-10-3"/>
- <check enabled="true" name="MISRAC++2008-2-10-4"/>
- <check enabled="false" name="MISRAC++2008-2-10-5"/>
- <check enabled="true" name="MISRAC++2008-2-10-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-13">
- <check enabled="true" name="MISRAC++2008-2-13-2"/>
- <check enabled="true" name="MISRAC++2008-2-13-3"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_a"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-1">
- <check enabled="true" name="MISRAC++2008-3-1-1"/>
- <check enabled="true" name="MISRAC++2008-3-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-9">
- <check enabled="false" name="MISRAC++2008-3-9-2"/>
- <check enabled="true" name="MISRAC++2008-3-9-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-4-5">
- <check enabled="true" name="MISRAC++2008-4-5-1"/>
- <check enabled="true" name="MISRAC++2008-4-5-2"/>
- <check enabled="true" name="MISRAC++2008-4-5-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-0">
- <check enabled="true" name="MISRAC++2008-5-0-1_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_c"/>
- <check enabled="false" name="MISRAC++2008-5-0-2"/>
- <check enabled="true" name="MISRAC++2008-5-0-3"/>
- <check enabled="true" name="MISRAC++2008-5-0-4"/>
- <check enabled="true" name="MISRAC++2008-5-0-5"/>
- <check enabled="true" name="MISRAC++2008-5-0-6"/>
- <check enabled="true" name="MISRAC++2008-5-0-7"/>
- <check enabled="true" name="MISRAC++2008-5-0-8"/>
- <check enabled="true" name="MISRAC++2008-5-0-9"/>
- <check enabled="true" name="MISRAC++2008-5-0-10"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-14"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_e"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_f"/>
- <check enabled="true" name="MISRAC++2008-5-0-19"/>
- <check enabled="true" name="MISRAC++2008-5-0-21"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-2">
- <check enabled="true" name="MISRAC++2008-5-2-4"/>
- <check enabled="true" name="MISRAC++2008-5-2-5"/>
- <check enabled="true" name="MISRAC++2008-5-2-6"/>
- <check enabled="true" name="MISRAC++2008-5-2-7"/>
- <check enabled="false" name="MISRAC++2008-5-2-9"/>
- <check enabled="false" name="MISRAC++2008-5-2-10"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_a"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-3">
- <check enabled="true" name="MISRAC++2008-5-3-1"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_a"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_b"/>
- <check enabled="true" name="MISRAC++2008-5-3-3"/>
- <check enabled="true" name="MISRAC++2008-5-3-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-8">
- <check enabled="true" name="MISRAC++2008-5-8-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-14">
- <check enabled="true" name="MISRAC++2008-5-14-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-18">
- <check enabled="true" name="MISRAC++2008-5-18-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-19">
- <check enabled="false" name="MISRAC++2008-5-19-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-2">
- <check enabled="true" name="MISRAC++2008-6-2-1"/>
- <check enabled="true" name="MISRAC++2008-6-2-2"/>
- <check enabled="false" name="MISRAC++2008-6-2-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-3">
- <check enabled="true" name="MISRAC++2008-6-3-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_b"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_c"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_d"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-4">
- <check enabled="true" name="MISRAC++2008-6-4-1"/>
- <check enabled="true" name="MISRAC++2008-6-4-2"/>
- <check enabled="true" name="MISRAC++2008-6-4-3"/>
- <check enabled="true" name="MISRAC++2008-6-4-4"/>
- <check enabled="true" name="MISRAC++2008-6-4-5"/>
- <check enabled="true" name="MISRAC++2008-6-4-6"/>
- <check enabled="true" name="MISRAC++2008-6-4-7"/>
- <check enabled="true" name="MISRAC++2008-6-4-8"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-5">
- <check enabled="true" name="MISRAC++2008-6-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-5-2"/>
- <check enabled="true" name="MISRAC++2008-6-5-3"/>
- <check enabled="true" name="MISRAC++2008-6-5-4"/>
- <check enabled="true" name="MISRAC++2008-6-5-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-6">
- <check enabled="true" name="MISRAC++2008-6-6-1"/>
- <check enabled="true" name="MISRAC++2008-6-6-2"/>
- <check enabled="true" name="MISRAC++2008-6-6-4"/>
- <check enabled="true" name="MISRAC++2008-6-6-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-1">
- <check enabled="true" name="MISRAC++2008-7-1-1"/>
- <check enabled="true" name="MISRAC++2008-7-1-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-2">
- <check enabled="true" name="MISRAC++2008-7-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-4">
- <check enabled="true" name="MISRAC++2008-7-4-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-5">
- <check enabled="true" name="MISRAC++2008-7-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_c"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_d"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_a"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-0">
- <check enabled="true" name="MISRAC++2008-8-0-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-4">
- <check enabled="true" name="MISRAC++2008-8-4-1"/>
- <check enabled="true" name="MISRAC++2008-8-4-3"/>
- <check enabled="true" name="MISRAC++2008-8-4-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-5">
- <check enabled="true" name="MISRAC++2008-8-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_c"/>
- <check enabled="true" name="MISRAC++2008-8-5-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-3">
- <check enabled="true" name="MISRAC++2008-9-3-1"/>
- <check enabled="true" name="MISRAC++2008-9-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-5">
- <check enabled="true" name="MISRAC++2008-9-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-6">
- <check enabled="true" name="MISRAC++2008-9-6-2"/>
- <check enabled="true" name="MISRAC++2008-9-6-3"/>
- <check enabled="true" name="MISRAC++2008-9-6-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-12-1">
- <check enabled="true" name="MISRAC++2008-12-1-1_a"/>
- <check enabled="true" name="MISRAC++2008-12-1-1_b"/>
- <check enabled="true" name="MISRAC++2008-12-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-0">
- <check enabled="false" name="MISRAC++2008-15-0-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-1">
- <check enabled="true" name="MISRAC++2008-15-1-2"/>
- <check enabled="true" name="MISRAC++2008-15-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-3">
- <check enabled="true" name="MISRAC++2008-15-3-1"/>
- <check enabled="false" name="MISRAC++2008-15-3-2"/>
- <check enabled="true" name="MISRAC++2008-15-3-3"/>
- <check enabled="true" name="MISRAC++2008-15-3-4"/>
- <check enabled="true" name="MISRAC++2008-15-3-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-5">
- <check enabled="true" name="MISRAC++2008-15-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-0">
- <check enabled="true" name="MISRAC++2008-16-0-3"/>
- <check enabled="true" name="MISRAC++2008-16-0-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-2">
- <check enabled="true" name="MISRAC++2008-16-2-2"/>
- <check enabled="true" name="MISRAC++2008-16-2-3"/>
- <check enabled="true" name="MISRAC++2008-16-2-4"/>
- <check enabled="false" name="MISRAC++2008-16-2-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-3">
- <check enabled="true" name="MISRAC++2008-16-3-1"/>
- <check enabled="false" name="MISRAC++2008-16-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-17-0">
- <check enabled="true" name="MISRAC++2008-17-0-1"/>
- <check enabled="true" name="MISRAC++2008-17-0-3"/>
- <check enabled="true" name="MISRAC++2008-17-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-0">
- <check enabled="true" name="MISRAC++2008-18-0-1"/>
- <check enabled="true" name="MISRAC++2008-18-0-2"/>
- <check enabled="true" name="MISRAC++2008-18-0-3"/>
- <check enabled="true" name="MISRAC++2008-18-0-4"/>
- <check enabled="true" name="MISRAC++2008-18-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-2">
- <check enabled="true" name="MISRAC++2008-18-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-4">
- <check enabled="true" name="MISRAC++2008-18-4-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-7">
- <check enabled="true" name="MISRAC++2008-18-7-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-19-3">
- <check enabled="true" name="MISRAC++2008-19-3-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-27-0">
- <check enabled="true" name="MISRAC++2008-27-0-1"/>
- </group>
- </package>
- </checks_tree>
- </cstat_settings>
- </data>
- </settings>
- <settings>
- <name>RuntimeChecking</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>0</debug>
- <option>
- <name>GenRtcDebugHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnableBoundsChecking</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrMem</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcTrackPointerBounds</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcCheckAccesses</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcGenerateEntries</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcNrTrackedPointers</name>
- <state>1000</state>
- </option>
- <option>
- <name>GenRtcIntOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIncUnsigned</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntConversion</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclExplicit</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclUnsignedShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcUnhandledCase</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcDivByZero</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrFunc</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- </configuration>
- <group>
- <name>Application</name>
- <file>
- <name>$PROJ_DIR$\Application\runBenchmarks.c</name>
- </file>
- </group>
- <group>
- <name>benchmark</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\benchmark\benchmark.c</name>
- </file>
- </group>
- <group>
- <name>Device_Support</name>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\DeviceSupport\startup_sam.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\DeviceSupport\system_sam.c</name>
- </file>
- </group>
- <group>
- <name>Setup</name>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\BSP.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\HardFaultHandler.S</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\JLINKMEM_Process.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\OS_Error.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\RTOSInit_SAMV71_CMSIS.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_HardFaultHandler.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_RTT.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_RTT_printf.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_SYSVIEW.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_SYSVIEW_Config_embOS.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_SYSVIEW_embOS.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\xmtx.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\xmtx2.c</name>
- </file>
- </group>
-</project>
-
-
diff --git a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_lib_SAMV71_XULT/wolfcrypt_lib.ewt b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_lib_SAMV71_XULT/wolfcrypt_lib.ewt
deleted file mode 100644
index e0722daa..00000000
--- a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_lib_SAMV71_XULT/wolfcrypt_lib.ewt
+++ /dev/null
@@ -1,2400 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-
-<project>
- <fileVersion>2</fileVersion>
- <configuration>
- <name>Debug</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>1</debug>
- <settings>
- <name>C-STAT</name>
- <archiveVersion>259</archiveVersion>
- <data>
- <version>259</version>
- <cstatargs>
- <useExtraArgs>0</useExtraArgs>
- <extraArgs></extraArgs>
- <analyzeTimeoutEnabled>1</analyzeTimeoutEnabled>
- <analyzeTimeout>600</analyzeTimeout>
- <enableParallel>0</enableParallel>
- <parallelThreads>2</parallelThreads>
- <enableFalsePositives>0</enableFalsePositives>
- <messagesLimitEnabled>1</messagesLimitEnabled>
- <messagesLimit>100</messagesLimit>
- </cstatargs>
- <cstat_settings>
- <cstat_version>1.3.2</cstat_version>
- <checks_tree>
- <package enabled="true" name="STDCHECKS">
- <group enabled="true" name="ARR">
- <check enabled="true" name="ARR-inv-index-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr"/>
- <check enabled="true" name="ARR-inv-index"/>
- <check enabled="true" name="ARR-neg-index"/>
- <check enabled="true" name="ARR-uninit-index"/>
- </group>
- <group enabled="true" name="ATH">
- <check enabled="true" name="ATH-cmp-float"/>
- <check enabled="true" name="ATH-cmp-unsign-neg"/>
- <check enabled="true" name="ATH-cmp-unsign-pos"/>
- <check enabled="true" name="ATH-div-0-assign"/>
- <check enabled="false" name="ATH-div-0-cmp-aft"/>
- <check enabled="true" name="ATH-div-0-cmp-bef"/>
- <check enabled="true" name="ATH-div-0-interval"/>
- <check enabled="true" name="ATH-div-0-pos"/>
- <check enabled="true" name="ATH-div-0-unchk-global"/>
- <check enabled="true" name="ATH-div-0-unchk-local"/>
- <check enabled="true" name="ATH-div-0-unchk-param"/>
- <check enabled="true" name="ATH-div-0"/>
- <check enabled="true" name="ATH-inc-bool"/>
- <check enabled="true" name="ATH-malloc-overrun"/>
- <check enabled="true" name="ATH-neg-check-nonneg"/>
- <check enabled="true" name="ATH-neg-check-pos"/>
- <check enabled="true" name="ATH-new-overrun"/>
- <check enabled="false" name="ATH-overflow-cast"/>
- <check enabled="true" name="ATH-overflow"/>
- <check enabled="true" name="ATH-shift-bounds"/>
- <check enabled="true" name="ATH-shift-neg"/>
- <check enabled="true" name="ATH-sizeof-by-sizeof"/>
- </group>
- <group enabled="true" name="CAST">
- <check enabled="false" name="CAST-old-style"/>
- </group>
- <group enabled="true" name="CATCH">
- <check enabled="true" name="CATCH-object-slicing"/>
- <check enabled="false" name="CATCH-xtor-bad-member"/>
- </group>
- <group enabled="true" name="COMMA">
- <check enabled="false" name="COMMA-overload"/>
- </group>
- <group enabled="true" name="COMMENT">
- <check enabled="true" name="COMMENT-nested"/>
- </group>
- <group enabled="true" name="CONST">
- <check enabled="true" name="CONST-member-ret"/>
- </group>
- <group enabled="true" name="COP">
- <check enabled="false" name="COP-alloc-ctor"/>
- <check enabled="true" name="COP-assign-op-ret"/>
- <check enabled="true" name="COP-assign-op-self"/>
- <check enabled="true" name="COP-assign-op"/>
- <check enabled="true" name="COP-copy-ctor"/>
- <check enabled="false" name="COP-dealloc-dtor"/>
- <check enabled="true" name="COP-dtor-throw"/>
- <check enabled="true" name="COP-dtor"/>
- <check enabled="true" name="COP-init-order"/>
- <check enabled="true" name="COP-init-uninit"/>
- <check enabled="true" name="COP-member-uninit"/>
- </group>
- <group enabled="true" name="CPU">
- <check enabled="true" name="CPU-ctor-call-virt"/>
- <check enabled="false" name="CPU-ctor-implicit"/>
- <check enabled="true" name="CPU-delete-throw"/>
- <check enabled="true" name="CPU-delete-void"/>
- <check enabled="true" name="CPU-dtor-call-virt"/>
- <check enabled="true" name="CPU-malloc-class"/>
- <check enabled="true" name="CPU-nonvirt-dtor"/>
- <check enabled="true" name="CPU-return-ref-to-class-data"/>
- </group>
- <group enabled="true" name="DECL">
- <check enabled="false" name="DECL-implicit-int"/>
- </group>
- <group enabled="true" name="DEFINE">
- <check enabled="true" name="DEFINE-hash-multiple"/>
- </group>
- <group enabled="true" name="ENUM">
- <check enabled="false" name="ENUM-bounds"/>
- </group>
- <group enabled="true" name="EXP">
- <check enabled="true" name="EXP-cond-assign"/>
- <check enabled="true" name="EXP-dangling-else"/>
- <check enabled="true" name="EXP-loop-exit"/>
- <check enabled="false" name="EXP-main-ret-int"/>
- <check enabled="false" name="EXP-null-stmt"/>
- <check enabled="false" name="EXP-stray-semicolon"/>
- </group>
- <group enabled="true" name="EXPR">
- <check enabled="true" name="EXPR-const-overflow"/>
- </group>
- <group enabled="true" name="FPT">
- <check enabled="true" name="FPT-cmp-null"/>
- <check enabled="false" name="FPT-literal"/>
- <check enabled="true" name="FPT-misuse"/>
- </group>
- <group enabled="true" name="FUNC">
- <check enabled="false" name="FUNC-implicit-decl"/>
- <check enabled="false" name="FUNC-unprototyped-all"/>
- <check enabled="true" name="FUNC-unprototyped-used"/>
- </group>
- <group enabled="true" name="INCLUDE">
- <check enabled="false" name="INCLUDE-c-file"/>
- </group>
- <group enabled="true" name="INT">
- <check enabled="false" name="INT-use-signed-as-unsigned-pos"/>
- <check enabled="true" name="INT-use-signed-as-unsigned"/>
- </group>
- <group enabled="true" name="ITR">
- <check enabled="true" name="ITR-end-cmp-aft"/>
- <check enabled="true" name="ITR-end-cmp-bef"/>
- <check enabled="true" name="ITR-invalidated"/>
- <check enabled="false" name="ITR-mismatch-alg"/>
- <check enabled="false" name="ITR-store"/>
- <check enabled="true" name="ITR-uninit"/>
- </group>
- <group enabled="true" name="LIB">
- <check enabled="false" name="LIB-bsearch-overrun-pos"/>
- <check enabled="false" name="LIB-bsearch-overrun"/>
- <check enabled="false" name="LIB-fn-unsafe"/>
- <check enabled="false" name="LIB-fread-overrun-pos"/>
- <check enabled="true" name="LIB-fread-overrun"/>
- <check enabled="false" name="LIB-memchr-overrun-pos"/>
- <check enabled="true" name="LIB-memchr-overrun"/>
- <check enabled="false" name="LIB-memcpy-overrun-pos"/>
- <check enabled="true" name="LIB-memcpy-overrun"/>
- <check enabled="false" name="LIB-memset-overrun-pos"/>
- <check enabled="true" name="LIB-memset-overrun"/>
- <check enabled="false" name="LIB-putenv"/>
- <check enabled="false" name="LIB-qsort-overrun-pos"/>
- <check enabled="false" name="LIB-qsort-overrun"/>
- <check enabled="true" name="LIB-return-const"/>
- <check enabled="true" name="LIB-return-error"/>
- <check enabled="true" name="LIB-return-leak"/>
- <check enabled="true" name="LIB-return-neg"/>
- <check enabled="true" name="LIB-return-null"/>
- <check enabled="false" name="LIB-sprintf-overrun"/>
- <check enabled="false" name="LIB-std-sort-overrun-pos"/>
- <check enabled="true" name="LIB-std-sort-overrun"/>
- <check enabled="false" name="LIB-strcat-overrun-pos"/>
- <check enabled="true" name="LIB-strcat-overrun"/>
- <check enabled="false" name="LIB-strcpy-overrun-pos"/>
- <check enabled="true" name="LIB-strcpy-overrun"/>
- <check enabled="false" name="LIB-strncat-overrun-pos"/>
- <check enabled="true" name="LIB-strncat-overrun"/>
- <check enabled="false" name="LIB-strncmp-overrun-pos"/>
- <check enabled="true" name="LIB-strncmp-overrun"/>
- <check enabled="false" name="LIB-strncpy-overrun-pos"/>
- <check enabled="true" name="LIB-strncpy-overrun"/>
- </group>
- <group enabled="true" name="LOGIC">
- <check enabled="false" name="LOGIC-overload"/>
- </group>
- <group enabled="true" name="MEM">
- <check enabled="true" name="MEM-delete-array-op"/>
- <check enabled="true" name="MEM-delete-op"/>
- <check enabled="true" name="MEM-double-free-alias"/>
- <check enabled="true" name="MEM-double-free-some"/>
- <check enabled="true" name="MEM-double-free"/>
- <check enabled="true" name="MEM-free-field"/>
- <check enabled="true" name="MEM-free-fptr"/>
- <check enabled="false" name="MEM-free-no-alloc-struct"/>
- <check enabled="false" name="MEM-free-no-alloc"/>
- <check enabled="true" name="MEM-free-no-use"/>
- <check enabled="true" name="MEM-free-op"/>
- <check enabled="true" name="MEM-free-struct-field"/>
- <check enabled="true" name="MEM-free-variable-alias"/>
- <check enabled="true" name="MEM-free-variable"/>
- <check enabled="true" name="MEM-leak-alias"/>
- <check enabled="false" name="MEM-leak"/>
- <check enabled="false" name="MEM-malloc-arith"/>
- <check enabled="true" name="MEM-malloc-diff-type"/>
- <check enabled="true" name="MEM-malloc-sizeof-ptr"/>
- <check enabled="true" name="MEM-malloc-sizeof"/>
- <check enabled="false" name="MEM-malloc-strlen"/>
- <check enabled="true" name="MEM-realloc-diff-type"/>
- <check enabled="true" name="MEM-return-free"/>
- <check enabled="true" name="MEM-return-no-assign"/>
- <check enabled="true" name="MEM-stack-global-field"/>
- <check enabled="true" name="MEM-stack-global"/>
- <check enabled="true" name="MEM-stack-param-ref"/>
- <check enabled="true" name="MEM-stack-param"/>
- <check enabled="true" name="MEM-stack-pos"/>
- <check enabled="true" name="MEM-stack-ref"/>
- <check enabled="true" name="MEM-stack"/>
- <check enabled="true" name="MEM-use-free-all"/>
- <check enabled="true" name="MEM-use-free-some"/>
- </group>
- <group enabled="true" name="PTR">
- <check enabled="true" name="PTR-arith-field"/>
- <check enabled="true" name="PTR-arith-stack"/>
- <check enabled="true" name="PTR-arith-var"/>
- <check enabled="true" name="PTR-cmp-str-lit"/>
- <check enabled="false" name="PTR-null-assign-fun-pos"/>
- <check enabled="false" name="PTR-null-assign-pos"/>
- <check enabled="true" name="PTR-null-assign"/>
- <check enabled="true" name="PTR-null-cmp-aft"/>
- <check enabled="true" name="PTR-null-cmp-bef-fun"/>
- <check enabled="true" name="PTR-null-cmp-bef"/>
- <check enabled="true" name="PTR-null-fun-pos"/>
- <check enabled="false" name="PTR-null-literal-pos"/>
- <check enabled="false" name="PTR-overload"/>
- <check enabled="false" name="PTR-singleton-arith-pos"/>
- <check enabled="true" name="PTR-singleton-arith"/>
- <check enabled="true" name="PTR-unchk-param-some"/>
- <check enabled="false" name="PTR-unchk-param"/>
- <check enabled="false" name="PTR-uninit-pos"/>
- <check enabled="true" name="PTR-uninit"/>
- </group>
- <group enabled="true" name="RED">
- <check enabled="false" name="RED-alloc-zero-bytes"/>
- <check enabled="false" name="RED-case-reach"/>
- <check enabled="false" name="RED-cmp-always"/>
- <check enabled="false" name="RED-cmp-never"/>
- <check enabled="false" name="RED-cond-always"/>
- <check enabled="true" name="RED-cond-const-assign"/>
- <check enabled="false" name="RED-cond-const-expr"/>
- <check enabled="false" name="RED-cond-const"/>
- <check enabled="false" name="RED-cond-never"/>
- <check enabled="true" name="RED-dead"/>
- <check enabled="false" name="RED-expr"/>
- <check enabled="false" name="RED-func-no-effect"/>
- <check enabled="true" name="RED-local-hides-global"/>
- <check enabled="false" name="RED-local-hides-local"/>
- <check enabled="false" name="RED-local-hides-member"/>
- <check enabled="true" name="RED-local-hides-param"/>
- <check enabled="false" name="RED-no-effect"/>
- <check enabled="true" name="RED-self-assign"/>
- <check enabled="true" name="RED-unused-assign"/>
- <check enabled="false" name="RED-unused-param"/>
- <check enabled="false" name="RED-unused-return-val"/>
- <check enabled="false" name="RED-unused-val"/>
- <check enabled="true" name="RED-unused-var-all"/>
- </group>
- <group enabled="true" name="RESOURCE">
- <check enabled="false" name="RESOURCE-deref-file"/>
- <check enabled="true" name="RESOURCE-double-close"/>
- <check enabled="true" name="RESOURCE-file-no-close-all"/>
- <check enabled="false" name="RESOURCE-file-pos-neg"/>
- <check enabled="true" name="RESOURCE-file-use-after-close"/>
- <check enabled="false" name="RESOURCE-implicit-deref-file"/>
- <check enabled="true" name="RESOURCE-write-ronly-file"/>
- </group>
- <group enabled="true" name="SIZEOF">
- <check enabled="true" name="SIZEOF-side-effect"/>
- </group>
- <group enabled="true" name="SPC">
- <check enabled="true" name="SPC-order"/>
- <check enabled="false" name="SPC-uninit-arr-all"/>
- <check enabled="true" name="SPC-uninit-struct-field-heap"/>
- <check enabled="false" name="SPC-uninit-struct-field"/>
- <check enabled="true" name="SPC-uninit-struct"/>
- <check enabled="true" name="SPC-uninit-var-all"/>
- <check enabled="true" name="SPC-uninit-var-some"/>
- <check enabled="false" name="SPC-volatile-reads"/>
- <check enabled="false" name="SPC-volatile-writes"/>
- </group>
- <group enabled="true" name="STRUCT">
- <check enabled="false" name="STRUCT-signed-bit"/>
- </group>
- <group enabled="true" name="SWITCH">
- <check enabled="true" name="SWITCH-fall-through"/>
- </group>
- <group enabled="true" name="THROW">
- <check enabled="false" name="THROW-empty"/>
- <check enabled="false" name="THROW-main"/>
- <check enabled="true" name="THROW-null"/>
- <check enabled="true" name="THROW-ptr"/>
- <check enabled="true" name="THROW-static"/>
- <check enabled="true" name="THROW-unhandled"/>
- </group>
- <group enabled="true" name="UNION">
- <check enabled="true" name="UNION-overlap-assign"/>
- <check enabled="true" name="UNION-type-punning"/>
- </group>
- </package>
- <package enabled="false" name="CERT">
- <group enabled="true" name="CERT-EXP">
- <check enabled="true" name="CERT-EXP19-C"/>
- </group>
- <group enabled="true" name="CERT-FIO">
- <check enabled="true" name="CERT-FIO37-C"/>
- <check enabled="true" name="CERT-FIO38-C"/>
- </group>
- <group enabled="true" name="CERT-SIG">
- <check enabled="true" name="CERT-SIG31-C"/>
- </group>
- </package>
- <package enabled="false" name="SECURITY">
- <group enabled="true" name="SEC-BUFFER">
- <check enabled="true" name="SEC-BUFFER-memory-leak-alias"/>
- <check enabled="false" name="SEC-BUFFER-memory-leak"/>
- <check enabled="false" name="SEC-BUFFER-memset-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-memset-overrun"/>
- <check enabled="false" name="SEC-BUFFER-qsort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-qsort-overrun"/>
- <check enabled="true" name="SEC-BUFFER-sprintf-overrun"/>
- <check enabled="false" name="SEC-BUFFER-std-sort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-std-sort-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcpy-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncmp-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncmp-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncpy-overrun"/>
- <check enabled="true" name="SEC-BUFFER-tainted-alloc-size"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy-length"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy"/>
- <check enabled="true" name="SEC-BUFFER-tainted-index"/>
- <check enabled="true" name="SEC-BUFFER-tainted-offset"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-all"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-some"/>
- </group>
- <group enabled="true" name="SEC-DIV-0">
- <check enabled="true" name="SEC-DIV-0-compare-after"/>
- <check enabled="true" name="SEC-DIV-0-compare-before"/>
- <check enabled="true" name="SEC-DIV-0-tainted"/>
- </group>
- <group enabled="true" name="SEC-FILEOP">
- <check enabled="true" name="SEC-FILEOP-open-no-close"/>
- <check enabled="false" name="SEC-FILEOP-path-traversal"/>
- <check enabled="true" name="SEC-FILEOP-use-after-close"/>
- </group>
- <group enabled="true" name="SEC-INJECTION">
- <check enabled="false" name="SEC-INJECTION-sql"/>
- <check enabled="false" name="SEC-INJECTION-xpath"/>
- </group>
- <group enabled="true" name="SEC-LOOP">
- <check enabled="true" name="SEC-LOOP-tainted-bound"/>
- </group>
- <group enabled="true" name="SEC-NULL">
- <check enabled="false" name="SEC-NULL-assignment-fun-pos"/>
- <check enabled="true" name="SEC-NULL-assignment"/>
- <check enabled="true" name="SEC-NULL-cmp-aft"/>
- <check enabled="true" name="SEC-NULL-cmp-bef-fun"/>
- <check enabled="true" name="SEC-NULL-cmp-bef"/>
- <check enabled="false" name="SEC-NULL-literal-pos"/>
- </group>
- <group enabled="true" name="SEC-STRING">
- <check enabled="true" name="SEC-STRING-format-string"/>
- <check enabled="false" name="SEC-STRING-hard-coded-credentials"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2004">
- <group enabled="true" name="MISRAC2004-1">
- <check enabled="true" name="MISRAC2004-1.1"/>
- <check enabled="true" name="MISRAC2004-1.2_a"/>
- <check enabled="true" name="MISRAC2004-1.2_b"/>
- <check enabled="true" name="MISRAC2004-1.2_c"/>
- <check enabled="true" name="MISRAC2004-1.2_d"/>
- <check enabled="true" name="MISRAC2004-1.2_e"/>
- <check enabled="true" name="MISRAC2004-1.2_f"/>
- <check enabled="true" name="MISRAC2004-1.2_g"/>
- <check enabled="true" name="MISRAC2004-1.2_h"/>
- <check enabled="true" name="MISRAC2004-1.2_i"/>
- <check enabled="true" name="MISRAC2004-1.2_j"/>
- </group>
- <group enabled="true" name="MISRAC2004-2">
- <check enabled="true" name="MISRAC2004-2.1"/>
- <check enabled="true" name="MISRAC2004-2.2"/>
- <check enabled="true" name="MISRAC2004-2.3"/>
- <check enabled="false" name="MISRAC2004-2.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-5">
- <check enabled="true" name="MISRAC2004-5.2"/>
- <check enabled="true" name="MISRAC2004-5.3"/>
- <check enabled="true" name="MISRAC2004-5.4"/>
- <check enabled="false" name="MISRAC2004-5.5"/>
- <check enabled="false" name="MISRAC2004-5.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-6">
- <check enabled="true" name="MISRAC2004-6.1"/>
- <check enabled="false" name="MISRAC2004-6.3"/>
- <check enabled="true" name="MISRAC2004-6.4"/>
- <check enabled="true" name="MISRAC2004-6.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-7">
- <check enabled="true" name="MISRAC2004-7.1"/>
- </group>
- <group enabled="true" name="MISRAC2004-8">
- <check enabled="true" name="MISRAC2004-8.1"/>
- <check enabled="true" name="MISRAC2004-8.2"/>
- <check enabled="true" name="MISRAC2004-8.5_a"/>
- <check enabled="true" name="MISRAC2004-8.5_b"/>
- <check enabled="true" name="MISRAC2004-8.12"/>
- </group>
- <group enabled="true" name="MISRAC2004-9">
- <check enabled="true" name="MISRAC2004-9.1_a"/>
- <check enabled="true" name="MISRAC2004-9.1_b"/>
- <check enabled="true" name="MISRAC2004-9.1_c"/>
- <check enabled="true" name="MISRAC2004-9.2"/>
- </group>
- <group enabled="true" name="MISRAC2004-10">
- <check enabled="true" name="MISRAC2004-10.1_a"/>
- <check enabled="true" name="MISRAC2004-10.1_b"/>
- <check enabled="true" name="MISRAC2004-10.1_c"/>
- <check enabled="true" name="MISRAC2004-10.1_d"/>
- <check enabled="true" name="MISRAC2004-10.2_a"/>
- <check enabled="true" name="MISRAC2004-10.2_b"/>
- <check enabled="true" name="MISRAC2004-10.2_c"/>
- <check enabled="true" name="MISRAC2004-10.2_d"/>
- <check enabled="true" name="MISRAC2004-10.3"/>
- <check enabled="true" name="MISRAC2004-10.4"/>
- <check enabled="true" name="MISRAC2004-10.5"/>
- <check enabled="true" name="MISRAC2004-10.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-11">
- <check enabled="true" name="MISRAC2004-11.1"/>
- <check enabled="false" name="MISRAC2004-11.3"/>
- <check enabled="false" name="MISRAC2004-11.4"/>
- <check enabled="true" name="MISRAC2004-11.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-12">
- <check enabled="false" name="MISRAC2004-12.1"/>
- <check enabled="true" name="MISRAC2004-12.2_a"/>
- <check enabled="true" name="MISRAC2004-12.2_b"/>
- <check enabled="true" name="MISRAC2004-12.2_c"/>
- <check enabled="true" name="MISRAC2004-12.3"/>
- <check enabled="true" name="MISRAC2004-12.4"/>
- <check enabled="false" name="MISRAC2004-12.6_a"/>
- <check enabled="false" name="MISRAC2004-12.6_b"/>
- <check enabled="true" name="MISRAC2004-12.7"/>
- <check enabled="true" name="MISRAC2004-12.8"/>
- <check enabled="true" name="MISRAC2004-12.9"/>
- <check enabled="true" name="MISRAC2004-12.10"/>
- <check enabled="false" name="MISRAC2004-12.11"/>
- <check enabled="true" name="MISRAC2004-12.12_a"/>
- <check enabled="true" name="MISRAC2004-12.12_b"/>
- <check enabled="false" name="MISRAC2004-12.13"/>
- </group>
- <group enabled="true" name="MISRAC2004-13">
- <check enabled="true" name="MISRAC2004-13.1"/>
- <check enabled="false" name="MISRAC2004-13.2_a"/>
- <check enabled="false" name="MISRAC2004-13.2_b"/>
- <check enabled="false" name="MISRAC2004-13.2_c"/>
- <check enabled="false" name="MISRAC2004-13.2_d"/>
- <check enabled="false" name="MISRAC2004-13.2_e"/>
- <check enabled="true" name="MISRAC2004-13.3"/>
- <check enabled="true" name="MISRAC2004-13.4"/>
- <check enabled="true" name="MISRAC2004-13.5"/>
- <check enabled="true" name="MISRAC2004-13.6"/>
- <check enabled="true" name="MISRAC2004-13.7_a"/>
- <check enabled="true" name="MISRAC2004-13.7_b"/>
- </group>
- <group enabled="true" name="MISRAC2004-14">
- <check enabled="true" name="MISRAC2004-14.1"/>
- <check enabled="true" name="MISRAC2004-14.2"/>
- <check enabled="true" name="MISRAC2004-14.3"/>
- <check enabled="true" name="MISRAC2004-14.4"/>
- <check enabled="true" name="MISRAC2004-14.5"/>
- <check enabled="true" name="MISRAC2004-14.6"/>
- <check enabled="true" name="MISRAC2004-14.7"/>
- <check enabled="true" name="MISRAC2004-14.8_a"/>
- <check enabled="true" name="MISRAC2004-14.8_b"/>
- <check enabled="true" name="MISRAC2004-14.8_c"/>
- <check enabled="true" name="MISRAC2004-14.8_d"/>
- <check enabled="true" name="MISRAC2004-14.9"/>
- <check enabled="true" name="MISRAC2004-14.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-15">
- <check enabled="true" name="MISRAC2004-15.0"/>
- <check enabled="true" name="MISRAC2004-15.1"/>
- <check enabled="true" name="MISRAC2004-15.2"/>
- <check enabled="true" name="MISRAC2004-15.3"/>
- <check enabled="true" name="MISRAC2004-15.4"/>
- <check enabled="true" name="MISRAC2004-15.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-16">
- <check enabled="true" name="MISRAC2004-16.1"/>
- <check enabled="true" name="MISRAC2004-16.2_a"/>
- <check enabled="true" name="MISRAC2004-16.2_b"/>
- <check enabled="true" name="MISRAC2004-16.3"/>
- <check enabled="true" name="MISRAC2004-16.5"/>
- <check enabled="true" name="MISRAC2004-16.7"/>
- <check enabled="true" name="MISRAC2004-16.8"/>
- <check enabled="true" name="MISRAC2004-16.9"/>
- <check enabled="true" name="MISRAC2004-16.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-17">
- <check enabled="true" name="MISRAC2004-17.1_a"/>
- <check enabled="true" name="MISRAC2004-17.1_b"/>
- <check enabled="true" name="MISRAC2004-17.1_c"/>
- <check enabled="true" name="MISRAC2004-17.4_a"/>
- <check enabled="true" name="MISRAC2004-17.4_b"/>
- <check enabled="true" name="MISRAC2004-17.5"/>
- <check enabled="true" name="MISRAC2004-17.6_a"/>
- <check enabled="true" name="MISRAC2004-17.6_b"/>
- <check enabled="true" name="MISRAC2004-17.6_c"/>
- <check enabled="true" name="MISRAC2004-17.6_d"/>
- </group>
- <group enabled="true" name="MISRAC2004-18">
- <check enabled="true" name="MISRAC2004-18.1"/>
- <check enabled="true" name="MISRAC2004-18.2"/>
- <check enabled="true" name="MISRAC2004-18.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-19">
- <check enabled="false" name="MISRAC2004-19.2"/>
- <check enabled="true" name="MISRAC2004-19.6"/>
- <check enabled="false" name="MISRAC2004-19.7"/>
- <check enabled="true" name="MISRAC2004-19.12"/>
- <check enabled="false" name="MISRAC2004-19.13"/>
- <check enabled="true" name="MISRAC2004-19.15"/>
- </group>
- <group enabled="true" name="MISRAC2004-20">
- <check enabled="true" name="MISRAC2004-20.1"/>
- <check enabled="true" name="MISRAC2004-20.4"/>
- <check enabled="true" name="MISRAC2004-20.5"/>
- <check enabled="true" name="MISRAC2004-20.6"/>
- <check enabled="true" name="MISRAC2004-20.7"/>
- <check enabled="true" name="MISRAC2004-20.8"/>
- <check enabled="true" name="MISRAC2004-20.9"/>
- <check enabled="true" name="MISRAC2004-20.10"/>
- <check enabled="true" name="MISRAC2004-20.11"/>
- <check enabled="true" name="MISRAC2004-20.12"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2012">
- <group enabled="true" name="MISRAC2012-Dir-4">
- <check enabled="true" name="MISRAC2012-Dir-4.3"/>
- <check enabled="false" name="MISRAC2012-Dir-4.4"/>
- <check enabled="false" name="MISRAC2012-Dir-4.5"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.8"/>
- <check enabled="false" name="MISRAC2012-Dir-4.9"/>
- <check enabled="true" name="MISRAC2012-Dir-4.10"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_d"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_e"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_f"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_h"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_i"/>
- <check enabled="false" name="MISRAC2012-Dir-4.12"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_b"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_c"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_d"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_e"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_f"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.13_h"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-1">
- <check enabled="true" name="MISRAC2012-Rule-1.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_c"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_d"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_e"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_f"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_g"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_h"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_i"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_j"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_k"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_m"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_n"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_o"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_p"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_q"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_r"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_s"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_t"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_u"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_v"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_w"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-2">
- <check enabled="true" name="MISRAC2012-Rule-2.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-2.3"/>
- <check enabled="false" name="MISRAC2012-Rule-2.4"/>
- <check enabled="false" name="MISRAC2012-Rule-2.5"/>
- <check enabled="false" name="MISRAC2012-Rule-2.6"/>
- <check enabled="false" name="MISRAC2012-Rule-2.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-3">
- <check enabled="true" name="MISRAC2012-Rule-3.1"/>
- <check enabled="true" name="MISRAC2012-Rule-3.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-5">
- <check enabled="true" name="MISRAC2012-Rule-5.1"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.6"/>
- <check enabled="true" name="MISRAC2012-Rule-5.7"/>
- <check enabled="true" name="MISRAC2012-Rule-5.8"/>
- <check enabled="false" name="MISRAC2012-Rule-5.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-6">
- <check enabled="true" name="MISRAC2012-Rule-6.1"/>
- <check enabled="true" name="MISRAC2012-Rule-6.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-7">
- <check enabled="true" name="MISRAC2012-Rule-7.1"/>
- <check enabled="true" name="MISRAC2012-Rule-7.2"/>
- <check enabled="true" name="MISRAC2012-Rule-7.3"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-8">
- <check enabled="true" name="MISRAC2012-Rule-8.1"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.4"/>
- <check enabled="false" name="MISRAC2012-Rule-8.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.6"/>
- <check enabled="false" name="MISRAC2012-Rule-8.7"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_a"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.10"/>
- <check enabled="false" name="MISRAC2012-Rule-8.11"/>
- <check enabled="true" name="MISRAC2012-Rule-8.12"/>
- <check enabled="false" name="MISRAC2012-Rule-8.13"/>
- <check enabled="true" name="MISRAC2012-Rule-8.14"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-9">
- <check enabled="true" name="MISRAC2012-Rule-9.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_e"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_f"/>
- <check enabled="true" name="MISRAC2012-Rule-9.2"/>
- <check enabled="true" name="MISRAC2012-Rule-9.3"/>
- <check enabled="true" name="MISRAC2012-Rule-9.4"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-10">
- <check enabled="true" name="MISRAC2012-Rule-10.1_R2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R4"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R8"/>
- <check enabled="true" name="MISRAC2012-Rule-10.2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_b"/>
- <check enabled="false" name="MISRAC2012-Rule-10.5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-11">
- <check enabled="true" name="MISRAC2012-Rule-11.1"/>
- <check enabled="true" name="MISRAC2012-Rule-11.2"/>
- <check enabled="true" name="MISRAC2012-Rule-11.3"/>
- <check enabled="false" name="MISRAC2012-Rule-11.4"/>
- <check enabled="false" name="MISRAC2012-Rule-11.5"/>
- <check enabled="true" name="MISRAC2012-Rule-11.6"/>
- <check enabled="true" name="MISRAC2012-Rule-11.7"/>
- <check enabled="true" name="MISRAC2012-Rule-11.8"/>
- <check enabled="true" name="MISRAC2012-Rule-11.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-12">
- <check enabled="false" name="MISRAC2012-Rule-12.1"/>
- <check enabled="true" name="MISRAC2012-Rule-12.2"/>
- <check enabled="false" name="MISRAC2012-Rule-12.3"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-13">
- <check enabled="true" name="MISRAC2012-Rule-13.1"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-13.3"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_a"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.5"/>
- <check enabled="true" name="MISRAC2012-Rule-13.6"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-14">
- <check enabled="true" name="MISRAC2012-Rule-14.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.2"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_c"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_d"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-15">
- <check enabled="false" name="MISRAC2012-Rule-15.1"/>
- <check enabled="true" name="MISRAC2012-Rule-15.2"/>
- <check enabled="true" name="MISRAC2012-Rule-15.3"/>
- <check enabled="false" name="MISRAC2012-Rule-15.4"/>
- <check enabled="false" name="MISRAC2012-Rule-15.5"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_e"/>
- <check enabled="true" name="MISRAC2012-Rule-15.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-16">
- <check enabled="true" name="MISRAC2012-Rule-16.1"/>
- <check enabled="true" name="MISRAC2012-Rule-16.2"/>
- <check enabled="true" name="MISRAC2012-Rule-16.3"/>
- <check enabled="true" name="MISRAC2012-Rule-16.4"/>
- <check enabled="true" name="MISRAC2012-Rule-16.5"/>
- <check enabled="true" name="MISRAC2012-Rule-16.6"/>
- <check enabled="true" name="MISRAC2012-Rule-16.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-17">
- <check enabled="true" name="MISRAC2012-Rule-17.1"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-17.3"/>
- <check enabled="true" name="MISRAC2012-Rule-17.4"/>
- <check enabled="false" name="MISRAC2012-Rule-17.5"/>
- <check enabled="true" name="MISRAC2012-Rule-17.6"/>
- <check enabled="true" name="MISRAC2012-Rule-17.7"/>
- <check enabled="false" name="MISRAC2012-Rule-17.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-18">
- <check enabled="true" name="MISRAC2012-Rule-18.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.2"/>
- <check enabled="true" name="MISRAC2012-Rule-18.3"/>
- <check enabled="true" name="MISRAC2012-Rule-18.4"/>
- <check enabled="false" name="MISRAC2012-Rule-18.5"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.7"/>
- <check enabled="true" name="MISRAC2012-Rule-18.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-19">
- <check enabled="true" name="MISRAC2012-Rule-19.1"/>
- <check enabled="false" name="MISRAC2012-Rule-19.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-20">
- <check enabled="false" name="MISRAC2012-Rule-20.1"/>
- <check enabled="true" name="MISRAC2012-Rule-20.2"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c99"/>
- <check enabled="false" name="MISRAC2012-Rule-20.5"/>
- <check enabled="true" name="MISRAC2012-Rule-20.7"/>
- <check enabled="false" name="MISRAC2012-Rule-20.10"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-21">
- <check enabled="true" name="MISRAC2012-Rule-21.1"/>
- <check enabled="true" name="MISRAC2012-Rule-21.2"/>
- <check enabled="true" name="MISRAC2012-Rule-21.3"/>
- <check enabled="true" name="MISRAC2012-Rule-21.4"/>
- <check enabled="true" name="MISRAC2012-Rule-21.5"/>
- <check enabled="true" name="MISRAC2012-Rule-21.6"/>
- <check enabled="true" name="MISRAC2012-Rule-21.7"/>
- <check enabled="true" name="MISRAC2012-Rule-21.8"/>
- <check enabled="true" name="MISRAC2012-Rule-21.9"/>
- <check enabled="true" name="MISRAC2012-Rule-21.10"/>
- <check enabled="true" name="MISRAC2012-Rule-21.11"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_a"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-22">
- <check enabled="true" name="MISRAC2012-Rule-22.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_c"/>
- <check enabled="true" name="MISRAC2012-Rule-22.3"/>
- <check enabled="true" name="MISRAC2012-Rule-22.4"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.6"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC++2008">
- <group enabled="true" name="MISRAC++2008-0-1">
- <check enabled="true" name="MISRAC++2008-0-1-1"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_c"/>
- <check enabled="true" name="MISRAC++2008-0-1-3"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-6"/>
- <check enabled="true" name="MISRAC++2008-0-1-7"/>
- <check enabled="false" name="MISRAC++2008-0-1-8"/>
- <check enabled="true" name="MISRAC++2008-0-1-9"/>
- <check enabled="true" name="MISRAC++2008-0-1-11"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-2">
- <check enabled="true" name="MISRAC++2008-0-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-3">
- <check enabled="true" name="MISRAC++2008-0-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-7">
- <check enabled="true" name="MISRAC++2008-2-7-1"/>
- <check enabled="true" name="MISRAC++2008-2-7-2"/>
- <check enabled="false" name="MISRAC++2008-2-7-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-10">
- <check enabled="true" name="MISRAC++2008-2-10-1"/>
- <check enabled="true" name="MISRAC++2008-2-10-2"/>
- <check enabled="true" name="MISRAC++2008-2-10-3"/>
- <check enabled="true" name="MISRAC++2008-2-10-4"/>
- <check enabled="false" name="MISRAC++2008-2-10-5"/>
- <check enabled="true" name="MISRAC++2008-2-10-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-13">
- <check enabled="true" name="MISRAC++2008-2-13-2"/>
- <check enabled="true" name="MISRAC++2008-2-13-3"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_a"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-1">
- <check enabled="true" name="MISRAC++2008-3-1-1"/>
- <check enabled="true" name="MISRAC++2008-3-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-9">
- <check enabled="false" name="MISRAC++2008-3-9-2"/>
- <check enabled="true" name="MISRAC++2008-3-9-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-4-5">
- <check enabled="true" name="MISRAC++2008-4-5-1"/>
- <check enabled="true" name="MISRAC++2008-4-5-2"/>
- <check enabled="true" name="MISRAC++2008-4-5-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-0">
- <check enabled="true" name="MISRAC++2008-5-0-1_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_c"/>
- <check enabled="false" name="MISRAC++2008-5-0-2"/>
- <check enabled="true" name="MISRAC++2008-5-0-3"/>
- <check enabled="true" name="MISRAC++2008-5-0-4"/>
- <check enabled="true" name="MISRAC++2008-5-0-5"/>
- <check enabled="true" name="MISRAC++2008-5-0-6"/>
- <check enabled="true" name="MISRAC++2008-5-0-7"/>
- <check enabled="true" name="MISRAC++2008-5-0-8"/>
- <check enabled="true" name="MISRAC++2008-5-0-9"/>
- <check enabled="true" name="MISRAC++2008-5-0-10"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-14"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_e"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_f"/>
- <check enabled="true" name="MISRAC++2008-5-0-19"/>
- <check enabled="true" name="MISRAC++2008-5-0-21"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-2">
- <check enabled="true" name="MISRAC++2008-5-2-4"/>
- <check enabled="true" name="MISRAC++2008-5-2-5"/>
- <check enabled="true" name="MISRAC++2008-5-2-6"/>
- <check enabled="true" name="MISRAC++2008-5-2-7"/>
- <check enabled="false" name="MISRAC++2008-5-2-9"/>
- <check enabled="false" name="MISRAC++2008-5-2-10"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_a"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-3">
- <check enabled="true" name="MISRAC++2008-5-3-1"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_a"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_b"/>
- <check enabled="true" name="MISRAC++2008-5-3-3"/>
- <check enabled="true" name="MISRAC++2008-5-3-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-8">
- <check enabled="true" name="MISRAC++2008-5-8-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-14">
- <check enabled="true" name="MISRAC++2008-5-14-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-18">
- <check enabled="true" name="MISRAC++2008-5-18-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-19">
- <check enabled="false" name="MISRAC++2008-5-19-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-2">
- <check enabled="true" name="MISRAC++2008-6-2-1"/>
- <check enabled="true" name="MISRAC++2008-6-2-2"/>
- <check enabled="false" name="MISRAC++2008-6-2-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-3">
- <check enabled="true" name="MISRAC++2008-6-3-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_b"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_c"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_d"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-4">
- <check enabled="true" name="MISRAC++2008-6-4-1"/>
- <check enabled="true" name="MISRAC++2008-6-4-2"/>
- <check enabled="true" name="MISRAC++2008-6-4-3"/>
- <check enabled="true" name="MISRAC++2008-6-4-4"/>
- <check enabled="true" name="MISRAC++2008-6-4-5"/>
- <check enabled="true" name="MISRAC++2008-6-4-6"/>
- <check enabled="true" name="MISRAC++2008-6-4-7"/>
- <check enabled="true" name="MISRAC++2008-6-4-8"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-5">
- <check enabled="true" name="MISRAC++2008-6-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-5-2"/>
- <check enabled="true" name="MISRAC++2008-6-5-3"/>
- <check enabled="true" name="MISRAC++2008-6-5-4"/>
- <check enabled="true" name="MISRAC++2008-6-5-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-6">
- <check enabled="true" name="MISRAC++2008-6-6-1"/>
- <check enabled="true" name="MISRAC++2008-6-6-2"/>
- <check enabled="true" name="MISRAC++2008-6-6-4"/>
- <check enabled="true" name="MISRAC++2008-6-6-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-1">
- <check enabled="true" name="MISRAC++2008-7-1-1"/>
- <check enabled="true" name="MISRAC++2008-7-1-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-2">
- <check enabled="true" name="MISRAC++2008-7-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-4">
- <check enabled="true" name="MISRAC++2008-7-4-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-5">
- <check enabled="true" name="MISRAC++2008-7-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_c"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_d"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_a"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-0">
- <check enabled="true" name="MISRAC++2008-8-0-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-4">
- <check enabled="true" name="MISRAC++2008-8-4-1"/>
- <check enabled="true" name="MISRAC++2008-8-4-3"/>
- <check enabled="true" name="MISRAC++2008-8-4-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-5">
- <check enabled="true" name="MISRAC++2008-8-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_c"/>
- <check enabled="true" name="MISRAC++2008-8-5-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-3">
- <check enabled="true" name="MISRAC++2008-9-3-1"/>
- <check enabled="true" name="MISRAC++2008-9-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-5">
- <check enabled="true" name="MISRAC++2008-9-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-6">
- <check enabled="true" name="MISRAC++2008-9-6-2"/>
- <check enabled="true" name="MISRAC++2008-9-6-3"/>
- <check enabled="true" name="MISRAC++2008-9-6-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-12-1">
- <check enabled="true" name="MISRAC++2008-12-1-1_a"/>
- <check enabled="true" name="MISRAC++2008-12-1-1_b"/>
- <check enabled="true" name="MISRAC++2008-12-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-0">
- <check enabled="false" name="MISRAC++2008-15-0-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-1">
- <check enabled="true" name="MISRAC++2008-15-1-2"/>
- <check enabled="true" name="MISRAC++2008-15-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-3">
- <check enabled="true" name="MISRAC++2008-15-3-1"/>
- <check enabled="false" name="MISRAC++2008-15-3-2"/>
- <check enabled="true" name="MISRAC++2008-15-3-3"/>
- <check enabled="true" name="MISRAC++2008-15-3-4"/>
- <check enabled="true" name="MISRAC++2008-15-3-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-5">
- <check enabled="true" name="MISRAC++2008-15-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-0">
- <check enabled="true" name="MISRAC++2008-16-0-3"/>
- <check enabled="true" name="MISRAC++2008-16-0-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-2">
- <check enabled="true" name="MISRAC++2008-16-2-2"/>
- <check enabled="true" name="MISRAC++2008-16-2-3"/>
- <check enabled="true" name="MISRAC++2008-16-2-4"/>
- <check enabled="false" name="MISRAC++2008-16-2-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-3">
- <check enabled="true" name="MISRAC++2008-16-3-1"/>
- <check enabled="false" name="MISRAC++2008-16-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-17-0">
- <check enabled="true" name="MISRAC++2008-17-0-1"/>
- <check enabled="true" name="MISRAC++2008-17-0-3"/>
- <check enabled="true" name="MISRAC++2008-17-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-0">
- <check enabled="true" name="MISRAC++2008-18-0-1"/>
- <check enabled="true" name="MISRAC++2008-18-0-2"/>
- <check enabled="true" name="MISRAC++2008-18-0-3"/>
- <check enabled="true" name="MISRAC++2008-18-0-4"/>
- <check enabled="true" name="MISRAC++2008-18-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-2">
- <check enabled="true" name="MISRAC++2008-18-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-4">
- <check enabled="true" name="MISRAC++2008-18-4-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-7">
- <check enabled="true" name="MISRAC++2008-18-7-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-19-3">
- <check enabled="true" name="MISRAC++2008-19-3-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-27-0">
- <check enabled="true" name="MISRAC++2008-27-0-1"/>
- </group>
- </package>
- </checks_tree>
- </cstat_settings>
- </data>
- </settings>
- <settings>
- <name>RuntimeChecking</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>GenRtcDebugHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnableBoundsChecking</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrMem</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcTrackPointerBounds</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcCheckAccesses</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcGenerateEntries</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcNrTrackedPointers</name>
- <state>1000</state>
- </option>
- <option>
- <name>GenRtcIntOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIncUnsigned</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntConversion</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclExplicit</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclUnsignedShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcUnhandledCase</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcDivByZero</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrFunc</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- </configuration>
- <configuration>
- <name>Release</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>0</debug>
- <settings>
- <name>C-STAT</name>
- <archiveVersion>259</archiveVersion>
- <data>
- <version>259</version>
- <cstatargs>
- <useExtraArgs>0</useExtraArgs>
- <extraArgs></extraArgs>
- <analyzeTimeoutEnabled>1</analyzeTimeoutEnabled>
- <analyzeTimeout>600</analyzeTimeout>
- <enableParallel>0</enableParallel>
- <parallelThreads>2</parallelThreads>
- <enableFalsePositives>0</enableFalsePositives>
- <messagesLimitEnabled>1</messagesLimitEnabled>
- <messagesLimit>100</messagesLimit>
- </cstatargs>
- <cstat_settings>
- <cstat_version>1.3.2</cstat_version>
- <checks_tree>
- <package enabled="true" name="STDCHECKS">
- <group enabled="true" name="ARR">
- <check enabled="true" name="ARR-inv-index-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr"/>
- <check enabled="true" name="ARR-inv-index"/>
- <check enabled="true" name="ARR-neg-index"/>
- <check enabled="true" name="ARR-uninit-index"/>
- </group>
- <group enabled="true" name="ATH">
- <check enabled="true" name="ATH-cmp-float"/>
- <check enabled="true" name="ATH-cmp-unsign-neg"/>
- <check enabled="true" name="ATH-cmp-unsign-pos"/>
- <check enabled="true" name="ATH-div-0-assign"/>
- <check enabled="false" name="ATH-div-0-cmp-aft"/>
- <check enabled="true" name="ATH-div-0-cmp-bef"/>
- <check enabled="true" name="ATH-div-0-interval"/>
- <check enabled="true" name="ATH-div-0-pos"/>
- <check enabled="true" name="ATH-div-0-unchk-global"/>
- <check enabled="true" name="ATH-div-0-unchk-local"/>
- <check enabled="true" name="ATH-div-0-unchk-param"/>
- <check enabled="true" name="ATH-div-0"/>
- <check enabled="true" name="ATH-inc-bool"/>
- <check enabled="true" name="ATH-malloc-overrun"/>
- <check enabled="true" name="ATH-neg-check-nonneg"/>
- <check enabled="true" name="ATH-neg-check-pos"/>
- <check enabled="true" name="ATH-new-overrun"/>
- <check enabled="false" name="ATH-overflow-cast"/>
- <check enabled="true" name="ATH-overflow"/>
- <check enabled="true" name="ATH-shift-bounds"/>
- <check enabled="true" name="ATH-shift-neg"/>
- <check enabled="true" name="ATH-sizeof-by-sizeof"/>
- </group>
- <group enabled="true" name="CAST">
- <check enabled="false" name="CAST-old-style"/>
- </group>
- <group enabled="true" name="CATCH">
- <check enabled="true" name="CATCH-object-slicing"/>
- <check enabled="false" name="CATCH-xtor-bad-member"/>
- </group>
- <group enabled="true" name="COMMA">
- <check enabled="false" name="COMMA-overload"/>
- </group>
- <group enabled="true" name="COMMENT">
- <check enabled="true" name="COMMENT-nested"/>
- </group>
- <group enabled="true" name="CONST">
- <check enabled="true" name="CONST-member-ret"/>
- </group>
- <group enabled="true" name="COP">
- <check enabled="false" name="COP-alloc-ctor"/>
- <check enabled="true" name="COP-assign-op-ret"/>
- <check enabled="true" name="COP-assign-op-self"/>
- <check enabled="true" name="COP-assign-op"/>
- <check enabled="true" name="COP-copy-ctor"/>
- <check enabled="false" name="COP-dealloc-dtor"/>
- <check enabled="true" name="COP-dtor-throw"/>
- <check enabled="true" name="COP-dtor"/>
- <check enabled="true" name="COP-init-order"/>
- <check enabled="true" name="COP-init-uninit"/>
- <check enabled="true" name="COP-member-uninit"/>
- </group>
- <group enabled="true" name="CPU">
- <check enabled="true" name="CPU-ctor-call-virt"/>
- <check enabled="false" name="CPU-ctor-implicit"/>
- <check enabled="true" name="CPU-delete-throw"/>
- <check enabled="true" name="CPU-delete-void"/>
- <check enabled="true" name="CPU-dtor-call-virt"/>
- <check enabled="true" name="CPU-malloc-class"/>
- <check enabled="true" name="CPU-nonvirt-dtor"/>
- <check enabled="true" name="CPU-return-ref-to-class-data"/>
- </group>
- <group enabled="true" name="DECL">
- <check enabled="false" name="DECL-implicit-int"/>
- </group>
- <group enabled="true" name="DEFINE">
- <check enabled="true" name="DEFINE-hash-multiple"/>
- </group>
- <group enabled="true" name="ENUM">
- <check enabled="false" name="ENUM-bounds"/>
- </group>
- <group enabled="true" name="EXP">
- <check enabled="true" name="EXP-cond-assign"/>
- <check enabled="true" name="EXP-dangling-else"/>
- <check enabled="true" name="EXP-loop-exit"/>
- <check enabled="false" name="EXP-main-ret-int"/>
- <check enabled="false" name="EXP-null-stmt"/>
- <check enabled="false" name="EXP-stray-semicolon"/>
- </group>
- <group enabled="true" name="EXPR">
- <check enabled="true" name="EXPR-const-overflow"/>
- </group>
- <group enabled="true" name="FPT">
- <check enabled="true" name="FPT-cmp-null"/>
- <check enabled="false" name="FPT-literal"/>
- <check enabled="true" name="FPT-misuse"/>
- </group>
- <group enabled="true" name="FUNC">
- <check enabled="false" name="FUNC-implicit-decl"/>
- <check enabled="false" name="FUNC-unprototyped-all"/>
- <check enabled="true" name="FUNC-unprototyped-used"/>
- </group>
- <group enabled="true" name="INCLUDE">
- <check enabled="false" name="INCLUDE-c-file"/>
- </group>
- <group enabled="true" name="INT">
- <check enabled="false" name="INT-use-signed-as-unsigned-pos"/>
- <check enabled="true" name="INT-use-signed-as-unsigned"/>
- </group>
- <group enabled="true" name="ITR">
- <check enabled="true" name="ITR-end-cmp-aft"/>
- <check enabled="true" name="ITR-end-cmp-bef"/>
- <check enabled="true" name="ITR-invalidated"/>
- <check enabled="false" name="ITR-mismatch-alg"/>
- <check enabled="false" name="ITR-store"/>
- <check enabled="true" name="ITR-uninit"/>
- </group>
- <group enabled="true" name="LIB">
- <check enabled="false" name="LIB-bsearch-overrun-pos"/>
- <check enabled="false" name="LIB-bsearch-overrun"/>
- <check enabled="false" name="LIB-fn-unsafe"/>
- <check enabled="false" name="LIB-fread-overrun-pos"/>
- <check enabled="true" name="LIB-fread-overrun"/>
- <check enabled="false" name="LIB-memchr-overrun-pos"/>
- <check enabled="true" name="LIB-memchr-overrun"/>
- <check enabled="false" name="LIB-memcpy-overrun-pos"/>
- <check enabled="true" name="LIB-memcpy-overrun"/>
- <check enabled="false" name="LIB-memset-overrun-pos"/>
- <check enabled="true" name="LIB-memset-overrun"/>
- <check enabled="false" name="LIB-putenv"/>
- <check enabled="false" name="LIB-qsort-overrun-pos"/>
- <check enabled="false" name="LIB-qsort-overrun"/>
- <check enabled="true" name="LIB-return-const"/>
- <check enabled="true" name="LIB-return-error"/>
- <check enabled="true" name="LIB-return-leak"/>
- <check enabled="true" name="LIB-return-neg"/>
- <check enabled="true" name="LIB-return-null"/>
- <check enabled="false" name="LIB-sprintf-overrun"/>
- <check enabled="false" name="LIB-std-sort-overrun-pos"/>
- <check enabled="true" name="LIB-std-sort-overrun"/>
- <check enabled="false" name="LIB-strcat-overrun-pos"/>
- <check enabled="true" name="LIB-strcat-overrun"/>
- <check enabled="false" name="LIB-strcpy-overrun-pos"/>
- <check enabled="true" name="LIB-strcpy-overrun"/>
- <check enabled="false" name="LIB-strncat-overrun-pos"/>
- <check enabled="true" name="LIB-strncat-overrun"/>
- <check enabled="false" name="LIB-strncmp-overrun-pos"/>
- <check enabled="true" name="LIB-strncmp-overrun"/>
- <check enabled="false" name="LIB-strncpy-overrun-pos"/>
- <check enabled="true" name="LIB-strncpy-overrun"/>
- </group>
- <group enabled="true" name="LOGIC">
- <check enabled="false" name="LOGIC-overload"/>
- </group>
- <group enabled="true" name="MEM">
- <check enabled="true" name="MEM-delete-array-op"/>
- <check enabled="true" name="MEM-delete-op"/>
- <check enabled="true" name="MEM-double-free-alias"/>
- <check enabled="true" name="MEM-double-free-some"/>
- <check enabled="true" name="MEM-double-free"/>
- <check enabled="true" name="MEM-free-field"/>
- <check enabled="true" name="MEM-free-fptr"/>
- <check enabled="false" name="MEM-free-no-alloc-struct"/>
- <check enabled="false" name="MEM-free-no-alloc"/>
- <check enabled="true" name="MEM-free-no-use"/>
- <check enabled="true" name="MEM-free-op"/>
- <check enabled="true" name="MEM-free-struct-field"/>
- <check enabled="true" name="MEM-free-variable-alias"/>
- <check enabled="true" name="MEM-free-variable"/>
- <check enabled="true" name="MEM-leak-alias"/>
- <check enabled="false" name="MEM-leak"/>
- <check enabled="false" name="MEM-malloc-arith"/>
- <check enabled="true" name="MEM-malloc-diff-type"/>
- <check enabled="true" name="MEM-malloc-sizeof-ptr"/>
- <check enabled="true" name="MEM-malloc-sizeof"/>
- <check enabled="false" name="MEM-malloc-strlen"/>
- <check enabled="true" name="MEM-realloc-diff-type"/>
- <check enabled="true" name="MEM-return-free"/>
- <check enabled="true" name="MEM-return-no-assign"/>
- <check enabled="true" name="MEM-stack-global-field"/>
- <check enabled="true" name="MEM-stack-global"/>
- <check enabled="true" name="MEM-stack-param-ref"/>
- <check enabled="true" name="MEM-stack-param"/>
- <check enabled="true" name="MEM-stack-pos"/>
- <check enabled="true" name="MEM-stack-ref"/>
- <check enabled="true" name="MEM-stack"/>
- <check enabled="true" name="MEM-use-free-all"/>
- <check enabled="true" name="MEM-use-free-some"/>
- </group>
- <group enabled="true" name="PTR">
- <check enabled="true" name="PTR-arith-field"/>
- <check enabled="true" name="PTR-arith-stack"/>
- <check enabled="true" name="PTR-arith-var"/>
- <check enabled="true" name="PTR-cmp-str-lit"/>
- <check enabled="false" name="PTR-null-assign-fun-pos"/>
- <check enabled="false" name="PTR-null-assign-pos"/>
- <check enabled="true" name="PTR-null-assign"/>
- <check enabled="true" name="PTR-null-cmp-aft"/>
- <check enabled="true" name="PTR-null-cmp-bef-fun"/>
- <check enabled="true" name="PTR-null-cmp-bef"/>
- <check enabled="true" name="PTR-null-fun-pos"/>
- <check enabled="false" name="PTR-null-literal-pos"/>
- <check enabled="false" name="PTR-overload"/>
- <check enabled="false" name="PTR-singleton-arith-pos"/>
- <check enabled="true" name="PTR-singleton-arith"/>
- <check enabled="true" name="PTR-unchk-param-some"/>
- <check enabled="false" name="PTR-unchk-param"/>
- <check enabled="false" name="PTR-uninit-pos"/>
- <check enabled="true" name="PTR-uninit"/>
- </group>
- <group enabled="true" name="RED">
- <check enabled="false" name="RED-alloc-zero-bytes"/>
- <check enabled="false" name="RED-case-reach"/>
- <check enabled="false" name="RED-cmp-always"/>
- <check enabled="false" name="RED-cmp-never"/>
- <check enabled="false" name="RED-cond-always"/>
- <check enabled="true" name="RED-cond-const-assign"/>
- <check enabled="false" name="RED-cond-const-expr"/>
- <check enabled="false" name="RED-cond-const"/>
- <check enabled="false" name="RED-cond-never"/>
- <check enabled="true" name="RED-dead"/>
- <check enabled="false" name="RED-expr"/>
- <check enabled="false" name="RED-func-no-effect"/>
- <check enabled="true" name="RED-local-hides-global"/>
- <check enabled="false" name="RED-local-hides-local"/>
- <check enabled="false" name="RED-local-hides-member"/>
- <check enabled="true" name="RED-local-hides-param"/>
- <check enabled="false" name="RED-no-effect"/>
- <check enabled="true" name="RED-self-assign"/>
- <check enabled="true" name="RED-unused-assign"/>
- <check enabled="false" name="RED-unused-param"/>
- <check enabled="false" name="RED-unused-return-val"/>
- <check enabled="false" name="RED-unused-val"/>
- <check enabled="true" name="RED-unused-var-all"/>
- </group>
- <group enabled="true" name="RESOURCE">
- <check enabled="false" name="RESOURCE-deref-file"/>
- <check enabled="true" name="RESOURCE-double-close"/>
- <check enabled="true" name="RESOURCE-file-no-close-all"/>
- <check enabled="false" name="RESOURCE-file-pos-neg"/>
- <check enabled="true" name="RESOURCE-file-use-after-close"/>
- <check enabled="false" name="RESOURCE-implicit-deref-file"/>
- <check enabled="true" name="RESOURCE-write-ronly-file"/>
- </group>
- <group enabled="true" name="SIZEOF">
- <check enabled="true" name="SIZEOF-side-effect"/>
- </group>
- <group enabled="true" name="SPC">
- <check enabled="true" name="SPC-order"/>
- <check enabled="false" name="SPC-uninit-arr-all"/>
- <check enabled="true" name="SPC-uninit-struct-field-heap"/>
- <check enabled="false" name="SPC-uninit-struct-field"/>
- <check enabled="true" name="SPC-uninit-struct"/>
- <check enabled="true" name="SPC-uninit-var-all"/>
- <check enabled="true" name="SPC-uninit-var-some"/>
- <check enabled="false" name="SPC-volatile-reads"/>
- <check enabled="false" name="SPC-volatile-writes"/>
- </group>
- <group enabled="true" name="STRUCT">
- <check enabled="false" name="STRUCT-signed-bit"/>
- </group>
- <group enabled="true" name="SWITCH">
- <check enabled="true" name="SWITCH-fall-through"/>
- </group>
- <group enabled="true" name="THROW">
- <check enabled="false" name="THROW-empty"/>
- <check enabled="false" name="THROW-main"/>
- <check enabled="true" name="THROW-null"/>
- <check enabled="true" name="THROW-ptr"/>
- <check enabled="true" name="THROW-static"/>
- <check enabled="true" name="THROW-unhandled"/>
- </group>
- <group enabled="true" name="UNION">
- <check enabled="true" name="UNION-overlap-assign"/>
- <check enabled="true" name="UNION-type-punning"/>
- </group>
- </package>
- <package enabled="false" name="CERT">
- <group enabled="true" name="CERT-EXP">
- <check enabled="true" name="CERT-EXP19-C"/>
- </group>
- <group enabled="true" name="CERT-FIO">
- <check enabled="true" name="CERT-FIO37-C"/>
- <check enabled="true" name="CERT-FIO38-C"/>
- </group>
- <group enabled="true" name="CERT-SIG">
- <check enabled="true" name="CERT-SIG31-C"/>
- </group>
- </package>
- <package enabled="false" name="SECURITY">
- <group enabled="true" name="SEC-BUFFER">
- <check enabled="true" name="SEC-BUFFER-memory-leak-alias"/>
- <check enabled="false" name="SEC-BUFFER-memory-leak"/>
- <check enabled="false" name="SEC-BUFFER-memset-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-memset-overrun"/>
- <check enabled="false" name="SEC-BUFFER-qsort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-qsort-overrun"/>
- <check enabled="true" name="SEC-BUFFER-sprintf-overrun"/>
- <check enabled="false" name="SEC-BUFFER-std-sort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-std-sort-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcpy-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncmp-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncmp-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncpy-overrun"/>
- <check enabled="true" name="SEC-BUFFER-tainted-alloc-size"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy-length"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy"/>
- <check enabled="true" name="SEC-BUFFER-tainted-index"/>
- <check enabled="true" name="SEC-BUFFER-tainted-offset"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-all"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-some"/>
- </group>
- <group enabled="true" name="SEC-DIV-0">
- <check enabled="true" name="SEC-DIV-0-compare-after"/>
- <check enabled="true" name="SEC-DIV-0-compare-before"/>
- <check enabled="true" name="SEC-DIV-0-tainted"/>
- </group>
- <group enabled="true" name="SEC-FILEOP">
- <check enabled="true" name="SEC-FILEOP-open-no-close"/>
- <check enabled="false" name="SEC-FILEOP-path-traversal"/>
- <check enabled="true" name="SEC-FILEOP-use-after-close"/>
- </group>
- <group enabled="true" name="SEC-INJECTION">
- <check enabled="false" name="SEC-INJECTION-sql"/>
- <check enabled="false" name="SEC-INJECTION-xpath"/>
- </group>
- <group enabled="true" name="SEC-LOOP">
- <check enabled="true" name="SEC-LOOP-tainted-bound"/>
- </group>
- <group enabled="true" name="SEC-NULL">
- <check enabled="false" name="SEC-NULL-assignment-fun-pos"/>
- <check enabled="true" name="SEC-NULL-assignment"/>
- <check enabled="true" name="SEC-NULL-cmp-aft"/>
- <check enabled="true" name="SEC-NULL-cmp-bef-fun"/>
- <check enabled="true" name="SEC-NULL-cmp-bef"/>
- <check enabled="false" name="SEC-NULL-literal-pos"/>
- </group>
- <group enabled="true" name="SEC-STRING">
- <check enabled="true" name="SEC-STRING-format-string"/>
- <check enabled="false" name="SEC-STRING-hard-coded-credentials"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2004">
- <group enabled="true" name="MISRAC2004-1">
- <check enabled="true" name="MISRAC2004-1.1"/>
- <check enabled="true" name="MISRAC2004-1.2_a"/>
- <check enabled="true" name="MISRAC2004-1.2_b"/>
- <check enabled="true" name="MISRAC2004-1.2_c"/>
- <check enabled="true" name="MISRAC2004-1.2_d"/>
- <check enabled="true" name="MISRAC2004-1.2_e"/>
- <check enabled="true" name="MISRAC2004-1.2_f"/>
- <check enabled="true" name="MISRAC2004-1.2_g"/>
- <check enabled="true" name="MISRAC2004-1.2_h"/>
- <check enabled="true" name="MISRAC2004-1.2_i"/>
- <check enabled="true" name="MISRAC2004-1.2_j"/>
- </group>
- <group enabled="true" name="MISRAC2004-2">
- <check enabled="true" name="MISRAC2004-2.1"/>
- <check enabled="true" name="MISRAC2004-2.2"/>
- <check enabled="true" name="MISRAC2004-2.3"/>
- <check enabled="false" name="MISRAC2004-2.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-5">
- <check enabled="true" name="MISRAC2004-5.2"/>
- <check enabled="true" name="MISRAC2004-5.3"/>
- <check enabled="true" name="MISRAC2004-5.4"/>
- <check enabled="false" name="MISRAC2004-5.5"/>
- <check enabled="false" name="MISRAC2004-5.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-6">
- <check enabled="true" name="MISRAC2004-6.1"/>
- <check enabled="false" name="MISRAC2004-6.3"/>
- <check enabled="true" name="MISRAC2004-6.4"/>
- <check enabled="true" name="MISRAC2004-6.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-7">
- <check enabled="true" name="MISRAC2004-7.1"/>
- </group>
- <group enabled="true" name="MISRAC2004-8">
- <check enabled="true" name="MISRAC2004-8.1"/>
- <check enabled="true" name="MISRAC2004-8.2"/>
- <check enabled="true" name="MISRAC2004-8.5_a"/>
- <check enabled="true" name="MISRAC2004-8.5_b"/>
- <check enabled="true" name="MISRAC2004-8.12"/>
- </group>
- <group enabled="true" name="MISRAC2004-9">
- <check enabled="true" name="MISRAC2004-9.1_a"/>
- <check enabled="true" name="MISRAC2004-9.1_b"/>
- <check enabled="true" name="MISRAC2004-9.1_c"/>
- <check enabled="true" name="MISRAC2004-9.2"/>
- </group>
- <group enabled="true" name="MISRAC2004-10">
- <check enabled="true" name="MISRAC2004-10.1_a"/>
- <check enabled="true" name="MISRAC2004-10.1_b"/>
- <check enabled="true" name="MISRAC2004-10.1_c"/>
- <check enabled="true" name="MISRAC2004-10.1_d"/>
- <check enabled="true" name="MISRAC2004-10.2_a"/>
- <check enabled="true" name="MISRAC2004-10.2_b"/>
- <check enabled="true" name="MISRAC2004-10.2_c"/>
- <check enabled="true" name="MISRAC2004-10.2_d"/>
- <check enabled="true" name="MISRAC2004-10.3"/>
- <check enabled="true" name="MISRAC2004-10.4"/>
- <check enabled="true" name="MISRAC2004-10.5"/>
- <check enabled="true" name="MISRAC2004-10.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-11">
- <check enabled="true" name="MISRAC2004-11.1"/>
- <check enabled="false" name="MISRAC2004-11.3"/>
- <check enabled="false" name="MISRAC2004-11.4"/>
- <check enabled="true" name="MISRAC2004-11.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-12">
- <check enabled="false" name="MISRAC2004-12.1"/>
- <check enabled="true" name="MISRAC2004-12.2_a"/>
- <check enabled="true" name="MISRAC2004-12.2_b"/>
- <check enabled="true" name="MISRAC2004-12.2_c"/>
- <check enabled="true" name="MISRAC2004-12.3"/>
- <check enabled="true" name="MISRAC2004-12.4"/>
- <check enabled="false" name="MISRAC2004-12.6_a"/>
- <check enabled="false" name="MISRAC2004-12.6_b"/>
- <check enabled="true" name="MISRAC2004-12.7"/>
- <check enabled="true" name="MISRAC2004-12.8"/>
- <check enabled="true" name="MISRAC2004-12.9"/>
- <check enabled="true" name="MISRAC2004-12.10"/>
- <check enabled="false" name="MISRAC2004-12.11"/>
- <check enabled="true" name="MISRAC2004-12.12_a"/>
- <check enabled="true" name="MISRAC2004-12.12_b"/>
- <check enabled="false" name="MISRAC2004-12.13"/>
- </group>
- <group enabled="true" name="MISRAC2004-13">
- <check enabled="true" name="MISRAC2004-13.1"/>
- <check enabled="false" name="MISRAC2004-13.2_a"/>
- <check enabled="false" name="MISRAC2004-13.2_b"/>
- <check enabled="false" name="MISRAC2004-13.2_c"/>
- <check enabled="false" name="MISRAC2004-13.2_d"/>
- <check enabled="false" name="MISRAC2004-13.2_e"/>
- <check enabled="true" name="MISRAC2004-13.3"/>
- <check enabled="true" name="MISRAC2004-13.4"/>
- <check enabled="true" name="MISRAC2004-13.5"/>
- <check enabled="true" name="MISRAC2004-13.6"/>
- <check enabled="true" name="MISRAC2004-13.7_a"/>
- <check enabled="true" name="MISRAC2004-13.7_b"/>
- </group>
- <group enabled="true" name="MISRAC2004-14">
- <check enabled="true" name="MISRAC2004-14.1"/>
- <check enabled="true" name="MISRAC2004-14.2"/>
- <check enabled="true" name="MISRAC2004-14.3"/>
- <check enabled="true" name="MISRAC2004-14.4"/>
- <check enabled="true" name="MISRAC2004-14.5"/>
- <check enabled="true" name="MISRAC2004-14.6"/>
- <check enabled="true" name="MISRAC2004-14.7"/>
- <check enabled="true" name="MISRAC2004-14.8_a"/>
- <check enabled="true" name="MISRAC2004-14.8_b"/>
- <check enabled="true" name="MISRAC2004-14.8_c"/>
- <check enabled="true" name="MISRAC2004-14.8_d"/>
- <check enabled="true" name="MISRAC2004-14.9"/>
- <check enabled="true" name="MISRAC2004-14.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-15">
- <check enabled="true" name="MISRAC2004-15.0"/>
- <check enabled="true" name="MISRAC2004-15.1"/>
- <check enabled="true" name="MISRAC2004-15.2"/>
- <check enabled="true" name="MISRAC2004-15.3"/>
- <check enabled="true" name="MISRAC2004-15.4"/>
- <check enabled="true" name="MISRAC2004-15.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-16">
- <check enabled="true" name="MISRAC2004-16.1"/>
- <check enabled="true" name="MISRAC2004-16.2_a"/>
- <check enabled="true" name="MISRAC2004-16.2_b"/>
- <check enabled="true" name="MISRAC2004-16.3"/>
- <check enabled="true" name="MISRAC2004-16.5"/>
- <check enabled="true" name="MISRAC2004-16.7"/>
- <check enabled="true" name="MISRAC2004-16.8"/>
- <check enabled="true" name="MISRAC2004-16.9"/>
- <check enabled="true" name="MISRAC2004-16.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-17">
- <check enabled="true" name="MISRAC2004-17.1_a"/>
- <check enabled="true" name="MISRAC2004-17.1_b"/>
- <check enabled="true" name="MISRAC2004-17.1_c"/>
- <check enabled="true" name="MISRAC2004-17.4_a"/>
- <check enabled="true" name="MISRAC2004-17.4_b"/>
- <check enabled="true" name="MISRAC2004-17.5"/>
- <check enabled="true" name="MISRAC2004-17.6_a"/>
- <check enabled="true" name="MISRAC2004-17.6_b"/>
- <check enabled="true" name="MISRAC2004-17.6_c"/>
- <check enabled="true" name="MISRAC2004-17.6_d"/>
- </group>
- <group enabled="true" name="MISRAC2004-18">
- <check enabled="true" name="MISRAC2004-18.1"/>
- <check enabled="true" name="MISRAC2004-18.2"/>
- <check enabled="true" name="MISRAC2004-18.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-19">
- <check enabled="false" name="MISRAC2004-19.2"/>
- <check enabled="true" name="MISRAC2004-19.6"/>
- <check enabled="false" name="MISRAC2004-19.7"/>
- <check enabled="true" name="MISRAC2004-19.12"/>
- <check enabled="false" name="MISRAC2004-19.13"/>
- <check enabled="true" name="MISRAC2004-19.15"/>
- </group>
- <group enabled="true" name="MISRAC2004-20">
- <check enabled="true" name="MISRAC2004-20.1"/>
- <check enabled="true" name="MISRAC2004-20.4"/>
- <check enabled="true" name="MISRAC2004-20.5"/>
- <check enabled="true" name="MISRAC2004-20.6"/>
- <check enabled="true" name="MISRAC2004-20.7"/>
- <check enabled="true" name="MISRAC2004-20.8"/>
- <check enabled="true" name="MISRAC2004-20.9"/>
- <check enabled="true" name="MISRAC2004-20.10"/>
- <check enabled="true" name="MISRAC2004-20.11"/>
- <check enabled="true" name="MISRAC2004-20.12"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2012">
- <group enabled="true" name="MISRAC2012-Dir-4">
- <check enabled="true" name="MISRAC2012-Dir-4.3"/>
- <check enabled="false" name="MISRAC2012-Dir-4.4"/>
- <check enabled="false" name="MISRAC2012-Dir-4.5"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.8"/>
- <check enabled="false" name="MISRAC2012-Dir-4.9"/>
- <check enabled="true" name="MISRAC2012-Dir-4.10"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_d"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_e"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_f"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_h"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_i"/>
- <check enabled="false" name="MISRAC2012-Dir-4.12"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_b"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_c"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_d"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_e"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_f"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.13_h"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-1">
- <check enabled="true" name="MISRAC2012-Rule-1.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_c"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_d"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_e"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_f"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_g"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_h"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_i"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_j"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_k"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_m"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_n"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_o"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_p"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_q"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_r"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_s"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_t"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_u"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_v"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_w"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-2">
- <check enabled="true" name="MISRAC2012-Rule-2.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-2.3"/>
- <check enabled="false" name="MISRAC2012-Rule-2.4"/>
- <check enabled="false" name="MISRAC2012-Rule-2.5"/>
- <check enabled="false" name="MISRAC2012-Rule-2.6"/>
- <check enabled="false" name="MISRAC2012-Rule-2.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-3">
- <check enabled="true" name="MISRAC2012-Rule-3.1"/>
- <check enabled="true" name="MISRAC2012-Rule-3.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-5">
- <check enabled="true" name="MISRAC2012-Rule-5.1"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.6"/>
- <check enabled="true" name="MISRAC2012-Rule-5.7"/>
- <check enabled="true" name="MISRAC2012-Rule-5.8"/>
- <check enabled="false" name="MISRAC2012-Rule-5.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-6">
- <check enabled="true" name="MISRAC2012-Rule-6.1"/>
- <check enabled="true" name="MISRAC2012-Rule-6.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-7">
- <check enabled="true" name="MISRAC2012-Rule-7.1"/>
- <check enabled="true" name="MISRAC2012-Rule-7.2"/>
- <check enabled="true" name="MISRAC2012-Rule-7.3"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-8">
- <check enabled="true" name="MISRAC2012-Rule-8.1"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.4"/>
- <check enabled="false" name="MISRAC2012-Rule-8.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.6"/>
- <check enabled="false" name="MISRAC2012-Rule-8.7"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_a"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.10"/>
- <check enabled="false" name="MISRAC2012-Rule-8.11"/>
- <check enabled="true" name="MISRAC2012-Rule-8.12"/>
- <check enabled="false" name="MISRAC2012-Rule-8.13"/>
- <check enabled="true" name="MISRAC2012-Rule-8.14"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-9">
- <check enabled="true" name="MISRAC2012-Rule-9.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_e"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_f"/>
- <check enabled="true" name="MISRAC2012-Rule-9.2"/>
- <check enabled="true" name="MISRAC2012-Rule-9.3"/>
- <check enabled="true" name="MISRAC2012-Rule-9.4"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-10">
- <check enabled="true" name="MISRAC2012-Rule-10.1_R2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R4"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R8"/>
- <check enabled="true" name="MISRAC2012-Rule-10.2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_b"/>
- <check enabled="false" name="MISRAC2012-Rule-10.5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-11">
- <check enabled="true" name="MISRAC2012-Rule-11.1"/>
- <check enabled="true" name="MISRAC2012-Rule-11.2"/>
- <check enabled="true" name="MISRAC2012-Rule-11.3"/>
- <check enabled="false" name="MISRAC2012-Rule-11.4"/>
- <check enabled="false" name="MISRAC2012-Rule-11.5"/>
- <check enabled="true" name="MISRAC2012-Rule-11.6"/>
- <check enabled="true" name="MISRAC2012-Rule-11.7"/>
- <check enabled="true" name="MISRAC2012-Rule-11.8"/>
- <check enabled="true" name="MISRAC2012-Rule-11.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-12">
- <check enabled="false" name="MISRAC2012-Rule-12.1"/>
- <check enabled="true" name="MISRAC2012-Rule-12.2"/>
- <check enabled="false" name="MISRAC2012-Rule-12.3"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-13">
- <check enabled="true" name="MISRAC2012-Rule-13.1"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-13.3"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_a"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.5"/>
- <check enabled="true" name="MISRAC2012-Rule-13.6"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-14">
- <check enabled="true" name="MISRAC2012-Rule-14.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.2"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_c"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_d"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-15">
- <check enabled="false" name="MISRAC2012-Rule-15.1"/>
- <check enabled="true" name="MISRAC2012-Rule-15.2"/>
- <check enabled="true" name="MISRAC2012-Rule-15.3"/>
- <check enabled="false" name="MISRAC2012-Rule-15.4"/>
- <check enabled="false" name="MISRAC2012-Rule-15.5"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_e"/>
- <check enabled="true" name="MISRAC2012-Rule-15.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-16">
- <check enabled="true" name="MISRAC2012-Rule-16.1"/>
- <check enabled="true" name="MISRAC2012-Rule-16.2"/>
- <check enabled="true" name="MISRAC2012-Rule-16.3"/>
- <check enabled="true" name="MISRAC2012-Rule-16.4"/>
- <check enabled="true" name="MISRAC2012-Rule-16.5"/>
- <check enabled="true" name="MISRAC2012-Rule-16.6"/>
- <check enabled="true" name="MISRAC2012-Rule-16.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-17">
- <check enabled="true" name="MISRAC2012-Rule-17.1"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-17.3"/>
- <check enabled="true" name="MISRAC2012-Rule-17.4"/>
- <check enabled="false" name="MISRAC2012-Rule-17.5"/>
- <check enabled="true" name="MISRAC2012-Rule-17.6"/>
- <check enabled="true" name="MISRAC2012-Rule-17.7"/>
- <check enabled="false" name="MISRAC2012-Rule-17.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-18">
- <check enabled="true" name="MISRAC2012-Rule-18.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.2"/>
- <check enabled="true" name="MISRAC2012-Rule-18.3"/>
- <check enabled="true" name="MISRAC2012-Rule-18.4"/>
- <check enabled="false" name="MISRAC2012-Rule-18.5"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.7"/>
- <check enabled="true" name="MISRAC2012-Rule-18.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-19">
- <check enabled="true" name="MISRAC2012-Rule-19.1"/>
- <check enabled="false" name="MISRAC2012-Rule-19.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-20">
- <check enabled="false" name="MISRAC2012-Rule-20.1"/>
- <check enabled="true" name="MISRAC2012-Rule-20.2"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c99"/>
- <check enabled="false" name="MISRAC2012-Rule-20.5"/>
- <check enabled="true" name="MISRAC2012-Rule-20.7"/>
- <check enabled="false" name="MISRAC2012-Rule-20.10"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-21">
- <check enabled="true" name="MISRAC2012-Rule-21.1"/>
- <check enabled="true" name="MISRAC2012-Rule-21.2"/>
- <check enabled="true" name="MISRAC2012-Rule-21.3"/>
- <check enabled="true" name="MISRAC2012-Rule-21.4"/>
- <check enabled="true" name="MISRAC2012-Rule-21.5"/>
- <check enabled="true" name="MISRAC2012-Rule-21.6"/>
- <check enabled="true" name="MISRAC2012-Rule-21.7"/>
- <check enabled="true" name="MISRAC2012-Rule-21.8"/>
- <check enabled="true" name="MISRAC2012-Rule-21.9"/>
- <check enabled="true" name="MISRAC2012-Rule-21.10"/>
- <check enabled="true" name="MISRAC2012-Rule-21.11"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_a"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-22">
- <check enabled="true" name="MISRAC2012-Rule-22.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_c"/>
- <check enabled="true" name="MISRAC2012-Rule-22.3"/>
- <check enabled="true" name="MISRAC2012-Rule-22.4"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.6"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC++2008">
- <group enabled="true" name="MISRAC++2008-0-1">
- <check enabled="true" name="MISRAC++2008-0-1-1"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_c"/>
- <check enabled="true" name="MISRAC++2008-0-1-3"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-6"/>
- <check enabled="true" name="MISRAC++2008-0-1-7"/>
- <check enabled="false" name="MISRAC++2008-0-1-8"/>
- <check enabled="true" name="MISRAC++2008-0-1-9"/>
- <check enabled="true" name="MISRAC++2008-0-1-11"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-2">
- <check enabled="true" name="MISRAC++2008-0-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-3">
- <check enabled="true" name="MISRAC++2008-0-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-7">
- <check enabled="true" name="MISRAC++2008-2-7-1"/>
- <check enabled="true" name="MISRAC++2008-2-7-2"/>
- <check enabled="false" name="MISRAC++2008-2-7-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-10">
- <check enabled="true" name="MISRAC++2008-2-10-1"/>
- <check enabled="true" name="MISRAC++2008-2-10-2"/>
- <check enabled="true" name="MISRAC++2008-2-10-3"/>
- <check enabled="true" name="MISRAC++2008-2-10-4"/>
- <check enabled="false" name="MISRAC++2008-2-10-5"/>
- <check enabled="true" name="MISRAC++2008-2-10-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-13">
- <check enabled="true" name="MISRAC++2008-2-13-2"/>
- <check enabled="true" name="MISRAC++2008-2-13-3"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_a"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-1">
- <check enabled="true" name="MISRAC++2008-3-1-1"/>
- <check enabled="true" name="MISRAC++2008-3-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-9">
- <check enabled="false" name="MISRAC++2008-3-9-2"/>
- <check enabled="true" name="MISRAC++2008-3-9-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-4-5">
- <check enabled="true" name="MISRAC++2008-4-5-1"/>
- <check enabled="true" name="MISRAC++2008-4-5-2"/>
- <check enabled="true" name="MISRAC++2008-4-5-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-0">
- <check enabled="true" name="MISRAC++2008-5-0-1_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_c"/>
- <check enabled="false" name="MISRAC++2008-5-0-2"/>
- <check enabled="true" name="MISRAC++2008-5-0-3"/>
- <check enabled="true" name="MISRAC++2008-5-0-4"/>
- <check enabled="true" name="MISRAC++2008-5-0-5"/>
- <check enabled="true" name="MISRAC++2008-5-0-6"/>
- <check enabled="true" name="MISRAC++2008-5-0-7"/>
- <check enabled="true" name="MISRAC++2008-5-0-8"/>
- <check enabled="true" name="MISRAC++2008-5-0-9"/>
- <check enabled="true" name="MISRAC++2008-5-0-10"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-14"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_e"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_f"/>
- <check enabled="true" name="MISRAC++2008-5-0-19"/>
- <check enabled="true" name="MISRAC++2008-5-0-21"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-2">
- <check enabled="true" name="MISRAC++2008-5-2-4"/>
- <check enabled="true" name="MISRAC++2008-5-2-5"/>
- <check enabled="true" name="MISRAC++2008-5-2-6"/>
- <check enabled="true" name="MISRAC++2008-5-2-7"/>
- <check enabled="false" name="MISRAC++2008-5-2-9"/>
- <check enabled="false" name="MISRAC++2008-5-2-10"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_a"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-3">
- <check enabled="true" name="MISRAC++2008-5-3-1"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_a"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_b"/>
- <check enabled="true" name="MISRAC++2008-5-3-3"/>
- <check enabled="true" name="MISRAC++2008-5-3-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-8">
- <check enabled="true" name="MISRAC++2008-5-8-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-14">
- <check enabled="true" name="MISRAC++2008-5-14-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-18">
- <check enabled="true" name="MISRAC++2008-5-18-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-19">
- <check enabled="false" name="MISRAC++2008-5-19-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-2">
- <check enabled="true" name="MISRAC++2008-6-2-1"/>
- <check enabled="true" name="MISRAC++2008-6-2-2"/>
- <check enabled="false" name="MISRAC++2008-6-2-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-3">
- <check enabled="true" name="MISRAC++2008-6-3-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_b"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_c"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_d"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-4">
- <check enabled="true" name="MISRAC++2008-6-4-1"/>
- <check enabled="true" name="MISRAC++2008-6-4-2"/>
- <check enabled="true" name="MISRAC++2008-6-4-3"/>
- <check enabled="true" name="MISRAC++2008-6-4-4"/>
- <check enabled="true" name="MISRAC++2008-6-4-5"/>
- <check enabled="true" name="MISRAC++2008-6-4-6"/>
- <check enabled="true" name="MISRAC++2008-6-4-7"/>
- <check enabled="true" name="MISRAC++2008-6-4-8"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-5">
- <check enabled="true" name="MISRAC++2008-6-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-5-2"/>
- <check enabled="true" name="MISRAC++2008-6-5-3"/>
- <check enabled="true" name="MISRAC++2008-6-5-4"/>
- <check enabled="true" name="MISRAC++2008-6-5-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-6">
- <check enabled="true" name="MISRAC++2008-6-6-1"/>
- <check enabled="true" name="MISRAC++2008-6-6-2"/>
- <check enabled="true" name="MISRAC++2008-6-6-4"/>
- <check enabled="true" name="MISRAC++2008-6-6-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-1">
- <check enabled="true" name="MISRAC++2008-7-1-1"/>
- <check enabled="true" name="MISRAC++2008-7-1-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-2">
- <check enabled="true" name="MISRAC++2008-7-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-4">
- <check enabled="true" name="MISRAC++2008-7-4-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-5">
- <check enabled="true" name="MISRAC++2008-7-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_c"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_d"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_a"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-0">
- <check enabled="true" name="MISRAC++2008-8-0-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-4">
- <check enabled="true" name="MISRAC++2008-8-4-1"/>
- <check enabled="true" name="MISRAC++2008-8-4-3"/>
- <check enabled="true" name="MISRAC++2008-8-4-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-5">
- <check enabled="true" name="MISRAC++2008-8-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_c"/>
- <check enabled="true" name="MISRAC++2008-8-5-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-3">
- <check enabled="true" name="MISRAC++2008-9-3-1"/>
- <check enabled="true" name="MISRAC++2008-9-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-5">
- <check enabled="true" name="MISRAC++2008-9-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-6">
- <check enabled="true" name="MISRAC++2008-9-6-2"/>
- <check enabled="true" name="MISRAC++2008-9-6-3"/>
- <check enabled="true" name="MISRAC++2008-9-6-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-12-1">
- <check enabled="true" name="MISRAC++2008-12-1-1_a"/>
- <check enabled="true" name="MISRAC++2008-12-1-1_b"/>
- <check enabled="true" name="MISRAC++2008-12-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-0">
- <check enabled="false" name="MISRAC++2008-15-0-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-1">
- <check enabled="true" name="MISRAC++2008-15-1-2"/>
- <check enabled="true" name="MISRAC++2008-15-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-3">
- <check enabled="true" name="MISRAC++2008-15-3-1"/>
- <check enabled="false" name="MISRAC++2008-15-3-2"/>
- <check enabled="true" name="MISRAC++2008-15-3-3"/>
- <check enabled="true" name="MISRAC++2008-15-3-4"/>
- <check enabled="true" name="MISRAC++2008-15-3-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-5">
- <check enabled="true" name="MISRAC++2008-15-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-0">
- <check enabled="true" name="MISRAC++2008-16-0-3"/>
- <check enabled="true" name="MISRAC++2008-16-0-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-2">
- <check enabled="true" name="MISRAC++2008-16-2-2"/>
- <check enabled="true" name="MISRAC++2008-16-2-3"/>
- <check enabled="true" name="MISRAC++2008-16-2-4"/>
- <check enabled="false" name="MISRAC++2008-16-2-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-3">
- <check enabled="true" name="MISRAC++2008-16-3-1"/>
- <check enabled="false" name="MISRAC++2008-16-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-17-0">
- <check enabled="true" name="MISRAC++2008-17-0-1"/>
- <check enabled="true" name="MISRAC++2008-17-0-3"/>
- <check enabled="true" name="MISRAC++2008-17-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-0">
- <check enabled="true" name="MISRAC++2008-18-0-1"/>
- <check enabled="true" name="MISRAC++2008-18-0-2"/>
- <check enabled="true" name="MISRAC++2008-18-0-3"/>
- <check enabled="true" name="MISRAC++2008-18-0-4"/>
- <check enabled="true" name="MISRAC++2008-18-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-2">
- <check enabled="true" name="MISRAC++2008-18-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-4">
- <check enabled="true" name="MISRAC++2008-18-4-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-7">
- <check enabled="true" name="MISRAC++2008-18-7-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-19-3">
- <check enabled="true" name="MISRAC++2008-19-3-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-27-0">
- <check enabled="true" name="MISRAC++2008-27-0-1"/>
- </group>
- </package>
- </checks_tree>
- </cstat_settings>
- </data>
- </settings>
- <settings>
- <name>RuntimeChecking</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>0</debug>
- <option>
- <name>GenRtcDebugHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnableBoundsChecking</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrMem</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcTrackPointerBounds</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcCheckAccesses</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcGenerateEntries</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcNrTrackedPointers</name>
- <state>1000</state>
- </option>
- <option>
- <name>GenRtcIntOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIncUnsigned</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntConversion</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclExplicit</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclUnsignedShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcUnhandledCase</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcDivByZero</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrFunc</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- </configuration>
- <group>
- <name>wolfcrypt_sources</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\aes.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\asn.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\chacha.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\coding.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\des3.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\dh.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\dsa.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\ecc.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\hash.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\kdf.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\hmac.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\md4.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\md5.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\memory.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\misc.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\poly1305.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\pwdbased.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\random.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\rsa.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\sha.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\sha256.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\sha512.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\tfm.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\wc_encrypt.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\src\wc_port.c</name>
- </file>
- </group>
-</project>
-
-
diff --git a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/settings/wolfcrypt_test_Debug.jlink b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/settings/wolfcrypt_test_Debug.jlink
deleted file mode 100644
index 3a2fb474..00000000
--- a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/settings/wolfcrypt_test_Debug.jlink
+++ /dev/null
@@ -1,39 +0,0 @@
-[BREAKPOINTS]
-ForceImpTypeAny = 0
-ShowInfoWin = 1
-EnableFlashBP = 2
-BPDuringExecution = 0
-[CFI]
-CFISize = 0x00
-CFIAddr = 0x00
-[CPU]
-MonModeVTableAddr = 0xFFFFFFFF
-MonModeDebug = 0
-MaxNumAPs = 0
-LowPowerHandlingMode = 0
-OverrideMemMap = 0
-AllowSimulation = 1
-ScriptFile=""
-[FLASH]
-CacheExcludeSize = 0x00
-CacheExcludeAddr = 0x00
-MinNumBytesFlashDL = 0
-SkipProgOnCRCMatch = 1
-VerifyDownload = 1
-AllowCaching = 1
-EnableFlashDL = 2
-Override = 1
-Device="ATSAMV71Q21"
-[GENERAL]
-WorkRAMSize = 0x00
-WorkRAMAddr = 0x00
-RAMUsageLimit = 0x00
-[SWO]
-SWOLogFile=""
-[MEM]
-RdOverrideOrMask = 0x00
-RdOverrideAndMask = 0xFFFFFFFF
-RdOverrideAddr = 0xFFFFFFFF
-WrOverrideOrMask = 0x00
-WrOverrideAndMask = 0xFFFFFFFF
-WrOverrideAddr = 0xFFFFFFFF
diff --git a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/wolfcrypt_test.ewt b/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/wolfcrypt_test.ewt
deleted file mode 100644
index 2847ab53..00000000
--- a/extra/wolfssl/wolfssl/IDE/IAR-EWARM/embOS/SAMV71_XULT/embOS_wolfcrypt_test_SAMV71_XULT/wolfcrypt_test.ewt
+++ /dev/null
@@ -1,2382 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-
-<project>
- <fileVersion>2</fileVersion>
- <configuration>
- <name>Debug</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>1</debug>
- <settings>
- <name>C-STAT</name>
- <archiveVersion>259</archiveVersion>
- <data>
- <version>259</version>
- <cstatargs>
- <useExtraArgs>0</useExtraArgs>
- <extraArgs></extraArgs>
- <analyzeTimeoutEnabled>1</analyzeTimeoutEnabled>
- <analyzeTimeout>600</analyzeTimeout>
- <enableParallel>0</enableParallel>
- <parallelThreads>2</parallelThreads>
- <enableFalsePositives>0</enableFalsePositives>
- <messagesLimitEnabled>1</messagesLimitEnabled>
- <messagesLimit>100</messagesLimit>
- </cstatargs>
- <cstat_settings>
- <cstat_version>1.3.2</cstat_version>
- <checks_tree>
- <package enabled="true" name="STDCHECKS">
- <group enabled="true" name="ARR">
- <check enabled="true" name="ARR-inv-index-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr"/>
- <check enabled="true" name="ARR-inv-index"/>
- <check enabled="true" name="ARR-neg-index"/>
- <check enabled="true" name="ARR-uninit-index"/>
- </group>
- <group enabled="true" name="ATH">
- <check enabled="true" name="ATH-cmp-float"/>
- <check enabled="true" name="ATH-cmp-unsign-neg"/>
- <check enabled="true" name="ATH-cmp-unsign-pos"/>
- <check enabled="true" name="ATH-div-0-assign"/>
- <check enabled="false" name="ATH-div-0-cmp-aft"/>
- <check enabled="true" name="ATH-div-0-cmp-bef"/>
- <check enabled="true" name="ATH-div-0-interval"/>
- <check enabled="true" name="ATH-div-0-pos"/>
- <check enabled="true" name="ATH-div-0-unchk-global"/>
- <check enabled="true" name="ATH-div-0-unchk-local"/>
- <check enabled="true" name="ATH-div-0-unchk-param"/>
- <check enabled="true" name="ATH-div-0"/>
- <check enabled="true" name="ATH-inc-bool"/>
- <check enabled="true" name="ATH-malloc-overrun"/>
- <check enabled="true" name="ATH-neg-check-nonneg"/>
- <check enabled="true" name="ATH-neg-check-pos"/>
- <check enabled="true" name="ATH-new-overrun"/>
- <check enabled="false" name="ATH-overflow-cast"/>
- <check enabled="true" name="ATH-overflow"/>
- <check enabled="true" name="ATH-shift-bounds"/>
- <check enabled="true" name="ATH-shift-neg"/>
- <check enabled="true" name="ATH-sizeof-by-sizeof"/>
- </group>
- <group enabled="true" name="CAST">
- <check enabled="false" name="CAST-old-style"/>
- </group>
- <group enabled="true" name="CATCH">
- <check enabled="true" name="CATCH-object-slicing"/>
- <check enabled="false" name="CATCH-xtor-bad-member"/>
- </group>
- <group enabled="true" name="COMMA">
- <check enabled="false" name="COMMA-overload"/>
- </group>
- <group enabled="true" name="COMMENT">
- <check enabled="true" name="COMMENT-nested"/>
- </group>
- <group enabled="true" name="CONST">
- <check enabled="true" name="CONST-member-ret"/>
- </group>
- <group enabled="true" name="COP">
- <check enabled="false" name="COP-alloc-ctor"/>
- <check enabled="true" name="COP-assign-op-ret"/>
- <check enabled="true" name="COP-assign-op-self"/>
- <check enabled="true" name="COP-assign-op"/>
- <check enabled="true" name="COP-copy-ctor"/>
- <check enabled="false" name="COP-dealloc-dtor"/>
- <check enabled="true" name="COP-dtor-throw"/>
- <check enabled="true" name="COP-dtor"/>
- <check enabled="true" name="COP-init-order"/>
- <check enabled="true" name="COP-init-uninit"/>
- <check enabled="true" name="COP-member-uninit"/>
- </group>
- <group enabled="true" name="CPU">
- <check enabled="true" name="CPU-ctor-call-virt"/>
- <check enabled="false" name="CPU-ctor-implicit"/>
- <check enabled="true" name="CPU-delete-throw"/>
- <check enabled="true" name="CPU-delete-void"/>
- <check enabled="true" name="CPU-dtor-call-virt"/>
- <check enabled="true" name="CPU-malloc-class"/>
- <check enabled="true" name="CPU-nonvirt-dtor"/>
- <check enabled="true" name="CPU-return-ref-to-class-data"/>
- </group>
- <group enabled="true" name="DECL">
- <check enabled="false" name="DECL-implicit-int"/>
- </group>
- <group enabled="true" name="DEFINE">
- <check enabled="true" name="DEFINE-hash-multiple"/>
- </group>
- <group enabled="true" name="ENUM">
- <check enabled="false" name="ENUM-bounds"/>
- </group>
- <group enabled="true" name="EXP">
- <check enabled="true" name="EXP-cond-assign"/>
- <check enabled="true" name="EXP-dangling-else"/>
- <check enabled="true" name="EXP-loop-exit"/>
- <check enabled="false" name="EXP-main-ret-int"/>
- <check enabled="false" name="EXP-null-stmt"/>
- <check enabled="false" name="EXP-stray-semicolon"/>
- </group>
- <group enabled="true" name="EXPR">
- <check enabled="true" name="EXPR-const-overflow"/>
- </group>
- <group enabled="true" name="FPT">
- <check enabled="true" name="FPT-cmp-null"/>
- <check enabled="false" name="FPT-literal"/>
- <check enabled="true" name="FPT-misuse"/>
- </group>
- <group enabled="true" name="FUNC">
- <check enabled="false" name="FUNC-implicit-decl"/>
- <check enabled="false" name="FUNC-unprototyped-all"/>
- <check enabled="true" name="FUNC-unprototyped-used"/>
- </group>
- <group enabled="true" name="INCLUDE">
- <check enabled="false" name="INCLUDE-c-file"/>
- </group>
- <group enabled="true" name="INT">
- <check enabled="false" name="INT-use-signed-as-unsigned-pos"/>
- <check enabled="true" name="INT-use-signed-as-unsigned"/>
- </group>
- <group enabled="true" name="ITR">
- <check enabled="true" name="ITR-end-cmp-aft"/>
- <check enabled="true" name="ITR-end-cmp-bef"/>
- <check enabled="true" name="ITR-invalidated"/>
- <check enabled="false" name="ITR-mismatch-alg"/>
- <check enabled="false" name="ITR-store"/>
- <check enabled="true" name="ITR-uninit"/>
- </group>
- <group enabled="true" name="LIB">
- <check enabled="false" name="LIB-bsearch-overrun-pos"/>
- <check enabled="false" name="LIB-bsearch-overrun"/>
- <check enabled="false" name="LIB-fn-unsafe"/>
- <check enabled="false" name="LIB-fread-overrun-pos"/>
- <check enabled="true" name="LIB-fread-overrun"/>
- <check enabled="false" name="LIB-memchr-overrun-pos"/>
- <check enabled="true" name="LIB-memchr-overrun"/>
- <check enabled="false" name="LIB-memcpy-overrun-pos"/>
- <check enabled="true" name="LIB-memcpy-overrun"/>
- <check enabled="false" name="LIB-memset-overrun-pos"/>
- <check enabled="true" name="LIB-memset-overrun"/>
- <check enabled="false" name="LIB-putenv"/>
- <check enabled="false" name="LIB-qsort-overrun-pos"/>
- <check enabled="false" name="LIB-qsort-overrun"/>
- <check enabled="true" name="LIB-return-const"/>
- <check enabled="true" name="LIB-return-error"/>
- <check enabled="true" name="LIB-return-leak"/>
- <check enabled="true" name="LIB-return-neg"/>
- <check enabled="true" name="LIB-return-null"/>
- <check enabled="false" name="LIB-sprintf-overrun"/>
- <check enabled="false" name="LIB-std-sort-overrun-pos"/>
- <check enabled="true" name="LIB-std-sort-overrun"/>
- <check enabled="false" name="LIB-strcat-overrun-pos"/>
- <check enabled="true" name="LIB-strcat-overrun"/>
- <check enabled="false" name="LIB-strcpy-overrun-pos"/>
- <check enabled="true" name="LIB-strcpy-overrun"/>
- <check enabled="false" name="LIB-strncat-overrun-pos"/>
- <check enabled="true" name="LIB-strncat-overrun"/>
- <check enabled="false" name="LIB-strncmp-overrun-pos"/>
- <check enabled="true" name="LIB-strncmp-overrun"/>
- <check enabled="false" name="LIB-strncpy-overrun-pos"/>
- <check enabled="true" name="LIB-strncpy-overrun"/>
- </group>
- <group enabled="true" name="LOGIC">
- <check enabled="false" name="LOGIC-overload"/>
- </group>
- <group enabled="true" name="MEM">
- <check enabled="true" name="MEM-delete-array-op"/>
- <check enabled="true" name="MEM-delete-op"/>
- <check enabled="true" name="MEM-double-free-alias"/>
- <check enabled="true" name="MEM-double-free-some"/>
- <check enabled="true" name="MEM-double-free"/>
- <check enabled="true" name="MEM-free-field"/>
- <check enabled="true" name="MEM-free-fptr"/>
- <check enabled="false" name="MEM-free-no-alloc-struct"/>
- <check enabled="false" name="MEM-free-no-alloc"/>
- <check enabled="true" name="MEM-free-no-use"/>
- <check enabled="true" name="MEM-free-op"/>
- <check enabled="true" name="MEM-free-struct-field"/>
- <check enabled="true" name="MEM-free-variable-alias"/>
- <check enabled="true" name="MEM-free-variable"/>
- <check enabled="true" name="MEM-leak-alias"/>
- <check enabled="false" name="MEM-leak"/>
- <check enabled="false" name="MEM-malloc-arith"/>
- <check enabled="true" name="MEM-malloc-diff-type"/>
- <check enabled="true" name="MEM-malloc-sizeof-ptr"/>
- <check enabled="true" name="MEM-malloc-sizeof"/>
- <check enabled="false" name="MEM-malloc-strlen"/>
- <check enabled="true" name="MEM-realloc-diff-type"/>
- <check enabled="true" name="MEM-return-free"/>
- <check enabled="true" name="MEM-return-no-assign"/>
- <check enabled="true" name="MEM-stack-global-field"/>
- <check enabled="true" name="MEM-stack-global"/>
- <check enabled="true" name="MEM-stack-param-ref"/>
- <check enabled="true" name="MEM-stack-param"/>
- <check enabled="true" name="MEM-stack-pos"/>
- <check enabled="true" name="MEM-stack-ref"/>
- <check enabled="true" name="MEM-stack"/>
- <check enabled="true" name="MEM-use-free-all"/>
- <check enabled="true" name="MEM-use-free-some"/>
- </group>
- <group enabled="true" name="PTR">
- <check enabled="true" name="PTR-arith-field"/>
- <check enabled="true" name="PTR-arith-stack"/>
- <check enabled="true" name="PTR-arith-var"/>
- <check enabled="true" name="PTR-cmp-str-lit"/>
- <check enabled="false" name="PTR-null-assign-fun-pos"/>
- <check enabled="false" name="PTR-null-assign-pos"/>
- <check enabled="true" name="PTR-null-assign"/>
- <check enabled="true" name="PTR-null-cmp-aft"/>
- <check enabled="true" name="PTR-null-cmp-bef-fun"/>
- <check enabled="true" name="PTR-null-cmp-bef"/>
- <check enabled="true" name="PTR-null-fun-pos"/>
- <check enabled="false" name="PTR-null-literal-pos"/>
- <check enabled="false" name="PTR-overload"/>
- <check enabled="false" name="PTR-singleton-arith-pos"/>
- <check enabled="true" name="PTR-singleton-arith"/>
- <check enabled="true" name="PTR-unchk-param-some"/>
- <check enabled="false" name="PTR-unchk-param"/>
- <check enabled="false" name="PTR-uninit-pos"/>
- <check enabled="true" name="PTR-uninit"/>
- </group>
- <group enabled="true" name="RED">
- <check enabled="false" name="RED-alloc-zero-bytes"/>
- <check enabled="false" name="RED-case-reach"/>
- <check enabled="false" name="RED-cmp-always"/>
- <check enabled="false" name="RED-cmp-never"/>
- <check enabled="false" name="RED-cond-always"/>
- <check enabled="true" name="RED-cond-const-assign"/>
- <check enabled="false" name="RED-cond-const-expr"/>
- <check enabled="false" name="RED-cond-const"/>
- <check enabled="false" name="RED-cond-never"/>
- <check enabled="true" name="RED-dead"/>
- <check enabled="false" name="RED-expr"/>
- <check enabled="false" name="RED-func-no-effect"/>
- <check enabled="true" name="RED-local-hides-global"/>
- <check enabled="false" name="RED-local-hides-local"/>
- <check enabled="false" name="RED-local-hides-member"/>
- <check enabled="true" name="RED-local-hides-param"/>
- <check enabled="false" name="RED-no-effect"/>
- <check enabled="true" name="RED-self-assign"/>
- <check enabled="true" name="RED-unused-assign"/>
- <check enabled="false" name="RED-unused-param"/>
- <check enabled="false" name="RED-unused-return-val"/>
- <check enabled="false" name="RED-unused-val"/>
- <check enabled="true" name="RED-unused-var-all"/>
- </group>
- <group enabled="true" name="RESOURCE">
- <check enabled="false" name="RESOURCE-deref-file"/>
- <check enabled="true" name="RESOURCE-double-close"/>
- <check enabled="true" name="RESOURCE-file-no-close-all"/>
- <check enabled="false" name="RESOURCE-file-pos-neg"/>
- <check enabled="true" name="RESOURCE-file-use-after-close"/>
- <check enabled="false" name="RESOURCE-implicit-deref-file"/>
- <check enabled="true" name="RESOURCE-write-ronly-file"/>
- </group>
- <group enabled="true" name="SIZEOF">
- <check enabled="true" name="SIZEOF-side-effect"/>
- </group>
- <group enabled="true" name="SPC">
- <check enabled="true" name="SPC-order"/>
- <check enabled="false" name="SPC-uninit-arr-all"/>
- <check enabled="true" name="SPC-uninit-struct-field-heap"/>
- <check enabled="false" name="SPC-uninit-struct-field"/>
- <check enabled="true" name="SPC-uninit-struct"/>
- <check enabled="true" name="SPC-uninit-var-all"/>
- <check enabled="true" name="SPC-uninit-var-some"/>
- <check enabled="false" name="SPC-volatile-reads"/>
- <check enabled="false" name="SPC-volatile-writes"/>
- </group>
- <group enabled="true" name="STRUCT">
- <check enabled="false" name="STRUCT-signed-bit"/>
- </group>
- <group enabled="true" name="SWITCH">
- <check enabled="true" name="SWITCH-fall-through"/>
- </group>
- <group enabled="true" name="THROW">
- <check enabled="false" name="THROW-empty"/>
- <check enabled="false" name="THROW-main"/>
- <check enabled="true" name="THROW-null"/>
- <check enabled="true" name="THROW-ptr"/>
- <check enabled="true" name="THROW-static"/>
- <check enabled="true" name="THROW-unhandled"/>
- </group>
- <group enabled="true" name="UNION">
- <check enabled="true" name="UNION-overlap-assign"/>
- <check enabled="true" name="UNION-type-punning"/>
- </group>
- </package>
- <package enabled="false" name="CERT">
- <group enabled="true" name="CERT-EXP">
- <check enabled="true" name="CERT-EXP19-C"/>
- </group>
- <group enabled="true" name="CERT-FIO">
- <check enabled="true" name="CERT-FIO37-C"/>
- <check enabled="true" name="CERT-FIO38-C"/>
- </group>
- <group enabled="true" name="CERT-SIG">
- <check enabled="true" name="CERT-SIG31-C"/>
- </group>
- </package>
- <package enabled="false" name="SECURITY">
- <group enabled="true" name="SEC-BUFFER">
- <check enabled="true" name="SEC-BUFFER-memory-leak-alias"/>
- <check enabled="false" name="SEC-BUFFER-memory-leak"/>
- <check enabled="false" name="SEC-BUFFER-memset-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-memset-overrun"/>
- <check enabled="false" name="SEC-BUFFER-qsort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-qsort-overrun"/>
- <check enabled="true" name="SEC-BUFFER-sprintf-overrun"/>
- <check enabled="false" name="SEC-BUFFER-std-sort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-std-sort-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcpy-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncmp-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncmp-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncpy-overrun"/>
- <check enabled="true" name="SEC-BUFFER-tainted-alloc-size"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy-length"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy"/>
- <check enabled="true" name="SEC-BUFFER-tainted-index"/>
- <check enabled="true" name="SEC-BUFFER-tainted-offset"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-all"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-some"/>
- </group>
- <group enabled="true" name="SEC-DIV-0">
- <check enabled="true" name="SEC-DIV-0-compare-after"/>
- <check enabled="true" name="SEC-DIV-0-compare-before"/>
- <check enabled="true" name="SEC-DIV-0-tainted"/>
- </group>
- <group enabled="true" name="SEC-FILEOP">
- <check enabled="true" name="SEC-FILEOP-open-no-close"/>
- <check enabled="false" name="SEC-FILEOP-path-traversal"/>
- <check enabled="true" name="SEC-FILEOP-use-after-close"/>
- </group>
- <group enabled="true" name="SEC-INJECTION">
- <check enabled="false" name="SEC-INJECTION-sql"/>
- <check enabled="false" name="SEC-INJECTION-xpath"/>
- </group>
- <group enabled="true" name="SEC-LOOP">
- <check enabled="true" name="SEC-LOOP-tainted-bound"/>
- </group>
- <group enabled="true" name="SEC-NULL">
- <check enabled="false" name="SEC-NULL-assignment-fun-pos"/>
- <check enabled="true" name="SEC-NULL-assignment"/>
- <check enabled="true" name="SEC-NULL-cmp-aft"/>
- <check enabled="true" name="SEC-NULL-cmp-bef-fun"/>
- <check enabled="true" name="SEC-NULL-cmp-bef"/>
- <check enabled="false" name="SEC-NULL-literal-pos"/>
- </group>
- <group enabled="true" name="SEC-STRING">
- <check enabled="true" name="SEC-STRING-format-string"/>
- <check enabled="false" name="SEC-STRING-hard-coded-credentials"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2004">
- <group enabled="true" name="MISRAC2004-1">
- <check enabled="true" name="MISRAC2004-1.1"/>
- <check enabled="true" name="MISRAC2004-1.2_a"/>
- <check enabled="true" name="MISRAC2004-1.2_b"/>
- <check enabled="true" name="MISRAC2004-1.2_c"/>
- <check enabled="true" name="MISRAC2004-1.2_d"/>
- <check enabled="true" name="MISRAC2004-1.2_e"/>
- <check enabled="true" name="MISRAC2004-1.2_f"/>
- <check enabled="true" name="MISRAC2004-1.2_g"/>
- <check enabled="true" name="MISRAC2004-1.2_h"/>
- <check enabled="true" name="MISRAC2004-1.2_i"/>
- <check enabled="true" name="MISRAC2004-1.2_j"/>
- </group>
- <group enabled="true" name="MISRAC2004-2">
- <check enabled="true" name="MISRAC2004-2.1"/>
- <check enabled="true" name="MISRAC2004-2.2"/>
- <check enabled="true" name="MISRAC2004-2.3"/>
- <check enabled="false" name="MISRAC2004-2.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-5">
- <check enabled="true" name="MISRAC2004-5.2"/>
- <check enabled="true" name="MISRAC2004-5.3"/>
- <check enabled="true" name="MISRAC2004-5.4"/>
- <check enabled="false" name="MISRAC2004-5.5"/>
- <check enabled="false" name="MISRAC2004-5.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-6">
- <check enabled="true" name="MISRAC2004-6.1"/>
- <check enabled="false" name="MISRAC2004-6.3"/>
- <check enabled="true" name="MISRAC2004-6.4"/>
- <check enabled="true" name="MISRAC2004-6.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-7">
- <check enabled="true" name="MISRAC2004-7.1"/>
- </group>
- <group enabled="true" name="MISRAC2004-8">
- <check enabled="true" name="MISRAC2004-8.1"/>
- <check enabled="true" name="MISRAC2004-8.2"/>
- <check enabled="true" name="MISRAC2004-8.5_a"/>
- <check enabled="true" name="MISRAC2004-8.5_b"/>
- <check enabled="true" name="MISRAC2004-8.12"/>
- </group>
- <group enabled="true" name="MISRAC2004-9">
- <check enabled="true" name="MISRAC2004-9.1_a"/>
- <check enabled="true" name="MISRAC2004-9.1_b"/>
- <check enabled="true" name="MISRAC2004-9.1_c"/>
- <check enabled="true" name="MISRAC2004-9.2"/>
- </group>
- <group enabled="true" name="MISRAC2004-10">
- <check enabled="true" name="MISRAC2004-10.1_a"/>
- <check enabled="true" name="MISRAC2004-10.1_b"/>
- <check enabled="true" name="MISRAC2004-10.1_c"/>
- <check enabled="true" name="MISRAC2004-10.1_d"/>
- <check enabled="true" name="MISRAC2004-10.2_a"/>
- <check enabled="true" name="MISRAC2004-10.2_b"/>
- <check enabled="true" name="MISRAC2004-10.2_c"/>
- <check enabled="true" name="MISRAC2004-10.2_d"/>
- <check enabled="true" name="MISRAC2004-10.3"/>
- <check enabled="true" name="MISRAC2004-10.4"/>
- <check enabled="true" name="MISRAC2004-10.5"/>
- <check enabled="true" name="MISRAC2004-10.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-11">
- <check enabled="true" name="MISRAC2004-11.1"/>
- <check enabled="false" name="MISRAC2004-11.3"/>
- <check enabled="false" name="MISRAC2004-11.4"/>
- <check enabled="true" name="MISRAC2004-11.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-12">
- <check enabled="false" name="MISRAC2004-12.1"/>
- <check enabled="true" name="MISRAC2004-12.2_a"/>
- <check enabled="true" name="MISRAC2004-12.2_b"/>
- <check enabled="true" name="MISRAC2004-12.2_c"/>
- <check enabled="true" name="MISRAC2004-12.3"/>
- <check enabled="true" name="MISRAC2004-12.4"/>
- <check enabled="false" name="MISRAC2004-12.6_a"/>
- <check enabled="false" name="MISRAC2004-12.6_b"/>
- <check enabled="true" name="MISRAC2004-12.7"/>
- <check enabled="true" name="MISRAC2004-12.8"/>
- <check enabled="true" name="MISRAC2004-12.9"/>
- <check enabled="true" name="MISRAC2004-12.10"/>
- <check enabled="false" name="MISRAC2004-12.11"/>
- <check enabled="true" name="MISRAC2004-12.12_a"/>
- <check enabled="true" name="MISRAC2004-12.12_b"/>
- <check enabled="false" name="MISRAC2004-12.13"/>
- </group>
- <group enabled="true" name="MISRAC2004-13">
- <check enabled="true" name="MISRAC2004-13.1"/>
- <check enabled="false" name="MISRAC2004-13.2_a"/>
- <check enabled="false" name="MISRAC2004-13.2_b"/>
- <check enabled="false" name="MISRAC2004-13.2_c"/>
- <check enabled="false" name="MISRAC2004-13.2_d"/>
- <check enabled="false" name="MISRAC2004-13.2_e"/>
- <check enabled="true" name="MISRAC2004-13.3"/>
- <check enabled="true" name="MISRAC2004-13.4"/>
- <check enabled="true" name="MISRAC2004-13.5"/>
- <check enabled="true" name="MISRAC2004-13.6"/>
- <check enabled="true" name="MISRAC2004-13.7_a"/>
- <check enabled="true" name="MISRAC2004-13.7_b"/>
- </group>
- <group enabled="true" name="MISRAC2004-14">
- <check enabled="true" name="MISRAC2004-14.1"/>
- <check enabled="true" name="MISRAC2004-14.2"/>
- <check enabled="true" name="MISRAC2004-14.3"/>
- <check enabled="true" name="MISRAC2004-14.4"/>
- <check enabled="true" name="MISRAC2004-14.5"/>
- <check enabled="true" name="MISRAC2004-14.6"/>
- <check enabled="true" name="MISRAC2004-14.7"/>
- <check enabled="true" name="MISRAC2004-14.8_a"/>
- <check enabled="true" name="MISRAC2004-14.8_b"/>
- <check enabled="true" name="MISRAC2004-14.8_c"/>
- <check enabled="true" name="MISRAC2004-14.8_d"/>
- <check enabled="true" name="MISRAC2004-14.9"/>
- <check enabled="true" name="MISRAC2004-14.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-15">
- <check enabled="true" name="MISRAC2004-15.0"/>
- <check enabled="true" name="MISRAC2004-15.1"/>
- <check enabled="true" name="MISRAC2004-15.2"/>
- <check enabled="true" name="MISRAC2004-15.3"/>
- <check enabled="true" name="MISRAC2004-15.4"/>
- <check enabled="true" name="MISRAC2004-15.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-16">
- <check enabled="true" name="MISRAC2004-16.1"/>
- <check enabled="true" name="MISRAC2004-16.2_a"/>
- <check enabled="true" name="MISRAC2004-16.2_b"/>
- <check enabled="true" name="MISRAC2004-16.3"/>
- <check enabled="true" name="MISRAC2004-16.5"/>
- <check enabled="true" name="MISRAC2004-16.7"/>
- <check enabled="true" name="MISRAC2004-16.8"/>
- <check enabled="true" name="MISRAC2004-16.9"/>
- <check enabled="true" name="MISRAC2004-16.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-17">
- <check enabled="true" name="MISRAC2004-17.1_a"/>
- <check enabled="true" name="MISRAC2004-17.1_b"/>
- <check enabled="true" name="MISRAC2004-17.1_c"/>
- <check enabled="true" name="MISRAC2004-17.4_a"/>
- <check enabled="true" name="MISRAC2004-17.4_b"/>
- <check enabled="true" name="MISRAC2004-17.5"/>
- <check enabled="true" name="MISRAC2004-17.6_a"/>
- <check enabled="true" name="MISRAC2004-17.6_b"/>
- <check enabled="true" name="MISRAC2004-17.6_c"/>
- <check enabled="true" name="MISRAC2004-17.6_d"/>
- </group>
- <group enabled="true" name="MISRAC2004-18">
- <check enabled="true" name="MISRAC2004-18.1"/>
- <check enabled="true" name="MISRAC2004-18.2"/>
- <check enabled="true" name="MISRAC2004-18.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-19">
- <check enabled="false" name="MISRAC2004-19.2"/>
- <check enabled="true" name="MISRAC2004-19.6"/>
- <check enabled="false" name="MISRAC2004-19.7"/>
- <check enabled="true" name="MISRAC2004-19.12"/>
- <check enabled="false" name="MISRAC2004-19.13"/>
- <check enabled="true" name="MISRAC2004-19.15"/>
- </group>
- <group enabled="true" name="MISRAC2004-20">
- <check enabled="true" name="MISRAC2004-20.1"/>
- <check enabled="true" name="MISRAC2004-20.4"/>
- <check enabled="true" name="MISRAC2004-20.5"/>
- <check enabled="true" name="MISRAC2004-20.6"/>
- <check enabled="true" name="MISRAC2004-20.7"/>
- <check enabled="true" name="MISRAC2004-20.8"/>
- <check enabled="true" name="MISRAC2004-20.9"/>
- <check enabled="true" name="MISRAC2004-20.10"/>
- <check enabled="true" name="MISRAC2004-20.11"/>
- <check enabled="true" name="MISRAC2004-20.12"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2012">
- <group enabled="true" name="MISRAC2012-Dir-4">
- <check enabled="true" name="MISRAC2012-Dir-4.3"/>
- <check enabled="false" name="MISRAC2012-Dir-4.4"/>
- <check enabled="false" name="MISRAC2012-Dir-4.5"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.8"/>
- <check enabled="false" name="MISRAC2012-Dir-4.9"/>
- <check enabled="true" name="MISRAC2012-Dir-4.10"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_d"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_e"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_f"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_h"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_i"/>
- <check enabled="false" name="MISRAC2012-Dir-4.12"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_b"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_c"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_d"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_e"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_f"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.13_h"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-1">
- <check enabled="true" name="MISRAC2012-Rule-1.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_c"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_d"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_e"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_f"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_g"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_h"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_i"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_j"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_k"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_m"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_n"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_o"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_p"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_q"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_r"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_s"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_t"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_u"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_v"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_w"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-2">
- <check enabled="true" name="MISRAC2012-Rule-2.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-2.3"/>
- <check enabled="false" name="MISRAC2012-Rule-2.4"/>
- <check enabled="false" name="MISRAC2012-Rule-2.5"/>
- <check enabled="false" name="MISRAC2012-Rule-2.6"/>
- <check enabled="false" name="MISRAC2012-Rule-2.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-3">
- <check enabled="true" name="MISRAC2012-Rule-3.1"/>
- <check enabled="true" name="MISRAC2012-Rule-3.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-5">
- <check enabled="true" name="MISRAC2012-Rule-5.1"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.6"/>
- <check enabled="true" name="MISRAC2012-Rule-5.7"/>
- <check enabled="true" name="MISRAC2012-Rule-5.8"/>
- <check enabled="false" name="MISRAC2012-Rule-5.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-6">
- <check enabled="true" name="MISRAC2012-Rule-6.1"/>
- <check enabled="true" name="MISRAC2012-Rule-6.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-7">
- <check enabled="true" name="MISRAC2012-Rule-7.1"/>
- <check enabled="true" name="MISRAC2012-Rule-7.2"/>
- <check enabled="true" name="MISRAC2012-Rule-7.3"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-8">
- <check enabled="true" name="MISRAC2012-Rule-8.1"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.4"/>
- <check enabled="false" name="MISRAC2012-Rule-8.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.6"/>
- <check enabled="false" name="MISRAC2012-Rule-8.7"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_a"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.10"/>
- <check enabled="false" name="MISRAC2012-Rule-8.11"/>
- <check enabled="true" name="MISRAC2012-Rule-8.12"/>
- <check enabled="false" name="MISRAC2012-Rule-8.13"/>
- <check enabled="true" name="MISRAC2012-Rule-8.14"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-9">
- <check enabled="true" name="MISRAC2012-Rule-9.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_e"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_f"/>
- <check enabled="true" name="MISRAC2012-Rule-9.2"/>
- <check enabled="true" name="MISRAC2012-Rule-9.3"/>
- <check enabled="true" name="MISRAC2012-Rule-9.4"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-10">
- <check enabled="true" name="MISRAC2012-Rule-10.1_R2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R4"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R8"/>
- <check enabled="true" name="MISRAC2012-Rule-10.2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_b"/>
- <check enabled="false" name="MISRAC2012-Rule-10.5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-11">
- <check enabled="true" name="MISRAC2012-Rule-11.1"/>
- <check enabled="true" name="MISRAC2012-Rule-11.2"/>
- <check enabled="true" name="MISRAC2012-Rule-11.3"/>
- <check enabled="false" name="MISRAC2012-Rule-11.4"/>
- <check enabled="false" name="MISRAC2012-Rule-11.5"/>
- <check enabled="true" name="MISRAC2012-Rule-11.6"/>
- <check enabled="true" name="MISRAC2012-Rule-11.7"/>
- <check enabled="true" name="MISRAC2012-Rule-11.8"/>
- <check enabled="true" name="MISRAC2012-Rule-11.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-12">
- <check enabled="false" name="MISRAC2012-Rule-12.1"/>
- <check enabled="true" name="MISRAC2012-Rule-12.2"/>
- <check enabled="false" name="MISRAC2012-Rule-12.3"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-13">
- <check enabled="true" name="MISRAC2012-Rule-13.1"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-13.3"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_a"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.5"/>
- <check enabled="true" name="MISRAC2012-Rule-13.6"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-14">
- <check enabled="true" name="MISRAC2012-Rule-14.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.2"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_c"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_d"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-15">
- <check enabled="false" name="MISRAC2012-Rule-15.1"/>
- <check enabled="true" name="MISRAC2012-Rule-15.2"/>
- <check enabled="true" name="MISRAC2012-Rule-15.3"/>
- <check enabled="false" name="MISRAC2012-Rule-15.4"/>
- <check enabled="false" name="MISRAC2012-Rule-15.5"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_e"/>
- <check enabled="true" name="MISRAC2012-Rule-15.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-16">
- <check enabled="true" name="MISRAC2012-Rule-16.1"/>
- <check enabled="true" name="MISRAC2012-Rule-16.2"/>
- <check enabled="true" name="MISRAC2012-Rule-16.3"/>
- <check enabled="true" name="MISRAC2012-Rule-16.4"/>
- <check enabled="true" name="MISRAC2012-Rule-16.5"/>
- <check enabled="true" name="MISRAC2012-Rule-16.6"/>
- <check enabled="true" name="MISRAC2012-Rule-16.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-17">
- <check enabled="true" name="MISRAC2012-Rule-17.1"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-17.3"/>
- <check enabled="true" name="MISRAC2012-Rule-17.4"/>
- <check enabled="false" name="MISRAC2012-Rule-17.5"/>
- <check enabled="true" name="MISRAC2012-Rule-17.6"/>
- <check enabled="true" name="MISRAC2012-Rule-17.7"/>
- <check enabled="false" name="MISRAC2012-Rule-17.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-18">
- <check enabled="true" name="MISRAC2012-Rule-18.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.2"/>
- <check enabled="true" name="MISRAC2012-Rule-18.3"/>
- <check enabled="true" name="MISRAC2012-Rule-18.4"/>
- <check enabled="false" name="MISRAC2012-Rule-18.5"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.7"/>
- <check enabled="true" name="MISRAC2012-Rule-18.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-19">
- <check enabled="true" name="MISRAC2012-Rule-19.1"/>
- <check enabled="false" name="MISRAC2012-Rule-19.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-20">
- <check enabled="false" name="MISRAC2012-Rule-20.1"/>
- <check enabled="true" name="MISRAC2012-Rule-20.2"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c99"/>
- <check enabled="false" name="MISRAC2012-Rule-20.5"/>
- <check enabled="true" name="MISRAC2012-Rule-20.7"/>
- <check enabled="false" name="MISRAC2012-Rule-20.10"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-21">
- <check enabled="true" name="MISRAC2012-Rule-21.1"/>
- <check enabled="true" name="MISRAC2012-Rule-21.2"/>
- <check enabled="true" name="MISRAC2012-Rule-21.3"/>
- <check enabled="true" name="MISRAC2012-Rule-21.4"/>
- <check enabled="true" name="MISRAC2012-Rule-21.5"/>
- <check enabled="true" name="MISRAC2012-Rule-21.6"/>
- <check enabled="true" name="MISRAC2012-Rule-21.7"/>
- <check enabled="true" name="MISRAC2012-Rule-21.8"/>
- <check enabled="true" name="MISRAC2012-Rule-21.9"/>
- <check enabled="true" name="MISRAC2012-Rule-21.10"/>
- <check enabled="true" name="MISRAC2012-Rule-21.11"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_a"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-22">
- <check enabled="true" name="MISRAC2012-Rule-22.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_c"/>
- <check enabled="true" name="MISRAC2012-Rule-22.3"/>
- <check enabled="true" name="MISRAC2012-Rule-22.4"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.6"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC++2008">
- <group enabled="true" name="MISRAC++2008-0-1">
- <check enabled="true" name="MISRAC++2008-0-1-1"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_c"/>
- <check enabled="true" name="MISRAC++2008-0-1-3"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-6"/>
- <check enabled="true" name="MISRAC++2008-0-1-7"/>
- <check enabled="false" name="MISRAC++2008-0-1-8"/>
- <check enabled="true" name="MISRAC++2008-0-1-9"/>
- <check enabled="true" name="MISRAC++2008-0-1-11"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-2">
- <check enabled="true" name="MISRAC++2008-0-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-3">
- <check enabled="true" name="MISRAC++2008-0-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-7">
- <check enabled="true" name="MISRAC++2008-2-7-1"/>
- <check enabled="true" name="MISRAC++2008-2-7-2"/>
- <check enabled="false" name="MISRAC++2008-2-7-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-10">
- <check enabled="true" name="MISRAC++2008-2-10-1"/>
- <check enabled="true" name="MISRAC++2008-2-10-2"/>
- <check enabled="true" name="MISRAC++2008-2-10-3"/>
- <check enabled="true" name="MISRAC++2008-2-10-4"/>
- <check enabled="false" name="MISRAC++2008-2-10-5"/>
- <check enabled="true" name="MISRAC++2008-2-10-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-13">
- <check enabled="true" name="MISRAC++2008-2-13-2"/>
- <check enabled="true" name="MISRAC++2008-2-13-3"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_a"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-1">
- <check enabled="true" name="MISRAC++2008-3-1-1"/>
- <check enabled="true" name="MISRAC++2008-3-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-9">
- <check enabled="false" name="MISRAC++2008-3-9-2"/>
- <check enabled="true" name="MISRAC++2008-3-9-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-4-5">
- <check enabled="true" name="MISRAC++2008-4-5-1"/>
- <check enabled="true" name="MISRAC++2008-4-5-2"/>
- <check enabled="true" name="MISRAC++2008-4-5-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-0">
- <check enabled="true" name="MISRAC++2008-5-0-1_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_c"/>
- <check enabled="false" name="MISRAC++2008-5-0-2"/>
- <check enabled="true" name="MISRAC++2008-5-0-3"/>
- <check enabled="true" name="MISRAC++2008-5-0-4"/>
- <check enabled="true" name="MISRAC++2008-5-0-5"/>
- <check enabled="true" name="MISRAC++2008-5-0-6"/>
- <check enabled="true" name="MISRAC++2008-5-0-7"/>
- <check enabled="true" name="MISRAC++2008-5-0-8"/>
- <check enabled="true" name="MISRAC++2008-5-0-9"/>
- <check enabled="true" name="MISRAC++2008-5-0-10"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-14"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_e"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_f"/>
- <check enabled="true" name="MISRAC++2008-5-0-19"/>
- <check enabled="true" name="MISRAC++2008-5-0-21"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-2">
- <check enabled="true" name="MISRAC++2008-5-2-4"/>
- <check enabled="true" name="MISRAC++2008-5-2-5"/>
- <check enabled="true" name="MISRAC++2008-5-2-6"/>
- <check enabled="true" name="MISRAC++2008-5-2-7"/>
- <check enabled="false" name="MISRAC++2008-5-2-9"/>
- <check enabled="false" name="MISRAC++2008-5-2-10"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_a"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-3">
- <check enabled="true" name="MISRAC++2008-5-3-1"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_a"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_b"/>
- <check enabled="true" name="MISRAC++2008-5-3-3"/>
- <check enabled="true" name="MISRAC++2008-5-3-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-8">
- <check enabled="true" name="MISRAC++2008-5-8-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-14">
- <check enabled="true" name="MISRAC++2008-5-14-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-18">
- <check enabled="true" name="MISRAC++2008-5-18-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-19">
- <check enabled="false" name="MISRAC++2008-5-19-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-2">
- <check enabled="true" name="MISRAC++2008-6-2-1"/>
- <check enabled="true" name="MISRAC++2008-6-2-2"/>
- <check enabled="false" name="MISRAC++2008-6-2-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-3">
- <check enabled="true" name="MISRAC++2008-6-3-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_b"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_c"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_d"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-4">
- <check enabled="true" name="MISRAC++2008-6-4-1"/>
- <check enabled="true" name="MISRAC++2008-6-4-2"/>
- <check enabled="true" name="MISRAC++2008-6-4-3"/>
- <check enabled="true" name="MISRAC++2008-6-4-4"/>
- <check enabled="true" name="MISRAC++2008-6-4-5"/>
- <check enabled="true" name="MISRAC++2008-6-4-6"/>
- <check enabled="true" name="MISRAC++2008-6-4-7"/>
- <check enabled="true" name="MISRAC++2008-6-4-8"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-5">
- <check enabled="true" name="MISRAC++2008-6-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-5-2"/>
- <check enabled="true" name="MISRAC++2008-6-5-3"/>
- <check enabled="true" name="MISRAC++2008-6-5-4"/>
- <check enabled="true" name="MISRAC++2008-6-5-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-6">
- <check enabled="true" name="MISRAC++2008-6-6-1"/>
- <check enabled="true" name="MISRAC++2008-6-6-2"/>
- <check enabled="true" name="MISRAC++2008-6-6-4"/>
- <check enabled="true" name="MISRAC++2008-6-6-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-1">
- <check enabled="true" name="MISRAC++2008-7-1-1"/>
- <check enabled="true" name="MISRAC++2008-7-1-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-2">
- <check enabled="true" name="MISRAC++2008-7-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-4">
- <check enabled="true" name="MISRAC++2008-7-4-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-5">
- <check enabled="true" name="MISRAC++2008-7-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_c"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_d"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_a"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-0">
- <check enabled="true" name="MISRAC++2008-8-0-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-4">
- <check enabled="true" name="MISRAC++2008-8-4-1"/>
- <check enabled="true" name="MISRAC++2008-8-4-3"/>
- <check enabled="true" name="MISRAC++2008-8-4-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-5">
- <check enabled="true" name="MISRAC++2008-8-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_c"/>
- <check enabled="true" name="MISRAC++2008-8-5-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-3">
- <check enabled="true" name="MISRAC++2008-9-3-1"/>
- <check enabled="true" name="MISRAC++2008-9-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-5">
- <check enabled="true" name="MISRAC++2008-9-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-6">
- <check enabled="true" name="MISRAC++2008-9-6-2"/>
- <check enabled="true" name="MISRAC++2008-9-6-3"/>
- <check enabled="true" name="MISRAC++2008-9-6-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-12-1">
- <check enabled="true" name="MISRAC++2008-12-1-1_a"/>
- <check enabled="true" name="MISRAC++2008-12-1-1_b"/>
- <check enabled="true" name="MISRAC++2008-12-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-0">
- <check enabled="false" name="MISRAC++2008-15-0-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-1">
- <check enabled="true" name="MISRAC++2008-15-1-2"/>
- <check enabled="true" name="MISRAC++2008-15-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-3">
- <check enabled="true" name="MISRAC++2008-15-3-1"/>
- <check enabled="false" name="MISRAC++2008-15-3-2"/>
- <check enabled="true" name="MISRAC++2008-15-3-3"/>
- <check enabled="true" name="MISRAC++2008-15-3-4"/>
- <check enabled="true" name="MISRAC++2008-15-3-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-5">
- <check enabled="true" name="MISRAC++2008-15-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-0">
- <check enabled="true" name="MISRAC++2008-16-0-3"/>
- <check enabled="true" name="MISRAC++2008-16-0-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-2">
- <check enabled="true" name="MISRAC++2008-16-2-2"/>
- <check enabled="true" name="MISRAC++2008-16-2-3"/>
- <check enabled="true" name="MISRAC++2008-16-2-4"/>
- <check enabled="false" name="MISRAC++2008-16-2-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-3">
- <check enabled="true" name="MISRAC++2008-16-3-1"/>
- <check enabled="false" name="MISRAC++2008-16-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-17-0">
- <check enabled="true" name="MISRAC++2008-17-0-1"/>
- <check enabled="true" name="MISRAC++2008-17-0-3"/>
- <check enabled="true" name="MISRAC++2008-17-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-0">
- <check enabled="true" name="MISRAC++2008-18-0-1"/>
- <check enabled="true" name="MISRAC++2008-18-0-2"/>
- <check enabled="true" name="MISRAC++2008-18-0-3"/>
- <check enabled="true" name="MISRAC++2008-18-0-4"/>
- <check enabled="true" name="MISRAC++2008-18-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-2">
- <check enabled="true" name="MISRAC++2008-18-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-4">
- <check enabled="true" name="MISRAC++2008-18-4-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-7">
- <check enabled="true" name="MISRAC++2008-18-7-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-19-3">
- <check enabled="true" name="MISRAC++2008-19-3-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-27-0">
- <check enabled="true" name="MISRAC++2008-27-0-1"/>
- </group>
- </package>
- </checks_tree>
- </cstat_settings>
- </data>
- </settings>
- <settings>
- <name>RuntimeChecking</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>GenRtcDebugHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnableBoundsChecking</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrMem</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcTrackPointerBounds</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcCheckAccesses</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcGenerateEntries</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcNrTrackedPointers</name>
- <state>1000</state>
- </option>
- <option>
- <name>GenRtcIntOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIncUnsigned</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntConversion</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclExplicit</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclUnsignedShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcUnhandledCase</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcDivByZero</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrFunc</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- </configuration>
- <configuration>
- <name>Release</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>0</debug>
- <settings>
- <name>C-STAT</name>
- <archiveVersion>259</archiveVersion>
- <data>
- <version>259</version>
- <cstatargs>
- <useExtraArgs>0</useExtraArgs>
- <extraArgs></extraArgs>
- <analyzeTimeoutEnabled>1</analyzeTimeoutEnabled>
- <analyzeTimeout>600</analyzeTimeout>
- <enableParallel>0</enableParallel>
- <parallelThreads>2</parallelThreads>
- <enableFalsePositives>0</enableFalsePositives>
- <messagesLimitEnabled>1</messagesLimitEnabled>
- <messagesLimit>100</messagesLimit>
- </cstatargs>
- <cstat_settings>
- <cstat_version>1.3.2</cstat_version>
- <checks_tree>
- <package enabled="true" name="STDCHECKS">
- <group enabled="true" name="ARR">
- <check enabled="true" name="ARR-inv-index-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr-pos"/>
- <check enabled="true" name="ARR-inv-index-ptr"/>
- <check enabled="true" name="ARR-inv-index"/>
- <check enabled="true" name="ARR-neg-index"/>
- <check enabled="true" name="ARR-uninit-index"/>
- </group>
- <group enabled="true" name="ATH">
- <check enabled="true" name="ATH-cmp-float"/>
- <check enabled="true" name="ATH-cmp-unsign-neg"/>
- <check enabled="true" name="ATH-cmp-unsign-pos"/>
- <check enabled="true" name="ATH-div-0-assign"/>
- <check enabled="false" name="ATH-div-0-cmp-aft"/>
- <check enabled="true" name="ATH-div-0-cmp-bef"/>
- <check enabled="true" name="ATH-div-0-interval"/>
- <check enabled="true" name="ATH-div-0-pos"/>
- <check enabled="true" name="ATH-div-0-unchk-global"/>
- <check enabled="true" name="ATH-div-0-unchk-local"/>
- <check enabled="true" name="ATH-div-0-unchk-param"/>
- <check enabled="true" name="ATH-div-0"/>
- <check enabled="true" name="ATH-inc-bool"/>
- <check enabled="true" name="ATH-malloc-overrun"/>
- <check enabled="true" name="ATH-neg-check-nonneg"/>
- <check enabled="true" name="ATH-neg-check-pos"/>
- <check enabled="true" name="ATH-new-overrun"/>
- <check enabled="false" name="ATH-overflow-cast"/>
- <check enabled="true" name="ATH-overflow"/>
- <check enabled="true" name="ATH-shift-bounds"/>
- <check enabled="true" name="ATH-shift-neg"/>
- <check enabled="true" name="ATH-sizeof-by-sizeof"/>
- </group>
- <group enabled="true" name="CAST">
- <check enabled="false" name="CAST-old-style"/>
- </group>
- <group enabled="true" name="CATCH">
- <check enabled="true" name="CATCH-object-slicing"/>
- <check enabled="false" name="CATCH-xtor-bad-member"/>
- </group>
- <group enabled="true" name="COMMA">
- <check enabled="false" name="COMMA-overload"/>
- </group>
- <group enabled="true" name="COMMENT">
- <check enabled="true" name="COMMENT-nested"/>
- </group>
- <group enabled="true" name="CONST">
- <check enabled="true" name="CONST-member-ret"/>
- </group>
- <group enabled="true" name="COP">
- <check enabled="false" name="COP-alloc-ctor"/>
- <check enabled="true" name="COP-assign-op-ret"/>
- <check enabled="true" name="COP-assign-op-self"/>
- <check enabled="true" name="COP-assign-op"/>
- <check enabled="true" name="COP-copy-ctor"/>
- <check enabled="false" name="COP-dealloc-dtor"/>
- <check enabled="true" name="COP-dtor-throw"/>
- <check enabled="true" name="COP-dtor"/>
- <check enabled="true" name="COP-init-order"/>
- <check enabled="true" name="COP-init-uninit"/>
- <check enabled="true" name="COP-member-uninit"/>
- </group>
- <group enabled="true" name="CPU">
- <check enabled="true" name="CPU-ctor-call-virt"/>
- <check enabled="false" name="CPU-ctor-implicit"/>
- <check enabled="true" name="CPU-delete-throw"/>
- <check enabled="true" name="CPU-delete-void"/>
- <check enabled="true" name="CPU-dtor-call-virt"/>
- <check enabled="true" name="CPU-malloc-class"/>
- <check enabled="true" name="CPU-nonvirt-dtor"/>
- <check enabled="true" name="CPU-return-ref-to-class-data"/>
- </group>
- <group enabled="true" name="DECL">
- <check enabled="false" name="DECL-implicit-int"/>
- </group>
- <group enabled="true" name="DEFINE">
- <check enabled="true" name="DEFINE-hash-multiple"/>
- </group>
- <group enabled="true" name="ENUM">
- <check enabled="false" name="ENUM-bounds"/>
- </group>
- <group enabled="true" name="EXP">
- <check enabled="true" name="EXP-cond-assign"/>
- <check enabled="true" name="EXP-dangling-else"/>
- <check enabled="true" name="EXP-loop-exit"/>
- <check enabled="false" name="EXP-main-ret-int"/>
- <check enabled="false" name="EXP-null-stmt"/>
- <check enabled="false" name="EXP-stray-semicolon"/>
- </group>
- <group enabled="true" name="EXPR">
- <check enabled="true" name="EXPR-const-overflow"/>
- </group>
- <group enabled="true" name="FPT">
- <check enabled="true" name="FPT-cmp-null"/>
- <check enabled="false" name="FPT-literal"/>
- <check enabled="true" name="FPT-misuse"/>
- </group>
- <group enabled="true" name="FUNC">
- <check enabled="false" name="FUNC-implicit-decl"/>
- <check enabled="false" name="FUNC-unprototyped-all"/>
- <check enabled="true" name="FUNC-unprototyped-used"/>
- </group>
- <group enabled="true" name="INCLUDE">
- <check enabled="false" name="INCLUDE-c-file"/>
- </group>
- <group enabled="true" name="INT">
- <check enabled="false" name="INT-use-signed-as-unsigned-pos"/>
- <check enabled="true" name="INT-use-signed-as-unsigned"/>
- </group>
- <group enabled="true" name="ITR">
- <check enabled="true" name="ITR-end-cmp-aft"/>
- <check enabled="true" name="ITR-end-cmp-bef"/>
- <check enabled="true" name="ITR-invalidated"/>
- <check enabled="false" name="ITR-mismatch-alg"/>
- <check enabled="false" name="ITR-store"/>
- <check enabled="true" name="ITR-uninit"/>
- </group>
- <group enabled="true" name="LIB">
- <check enabled="false" name="LIB-bsearch-overrun-pos"/>
- <check enabled="false" name="LIB-bsearch-overrun"/>
- <check enabled="false" name="LIB-fn-unsafe"/>
- <check enabled="false" name="LIB-fread-overrun-pos"/>
- <check enabled="true" name="LIB-fread-overrun"/>
- <check enabled="false" name="LIB-memchr-overrun-pos"/>
- <check enabled="true" name="LIB-memchr-overrun"/>
- <check enabled="false" name="LIB-memcpy-overrun-pos"/>
- <check enabled="true" name="LIB-memcpy-overrun"/>
- <check enabled="false" name="LIB-memset-overrun-pos"/>
- <check enabled="true" name="LIB-memset-overrun"/>
- <check enabled="false" name="LIB-putenv"/>
- <check enabled="false" name="LIB-qsort-overrun-pos"/>
- <check enabled="false" name="LIB-qsort-overrun"/>
- <check enabled="true" name="LIB-return-const"/>
- <check enabled="true" name="LIB-return-error"/>
- <check enabled="true" name="LIB-return-leak"/>
- <check enabled="true" name="LIB-return-neg"/>
- <check enabled="true" name="LIB-return-null"/>
- <check enabled="false" name="LIB-sprintf-overrun"/>
- <check enabled="false" name="LIB-std-sort-overrun-pos"/>
- <check enabled="true" name="LIB-std-sort-overrun"/>
- <check enabled="false" name="LIB-strcat-overrun-pos"/>
- <check enabled="true" name="LIB-strcat-overrun"/>
- <check enabled="false" name="LIB-strcpy-overrun-pos"/>
- <check enabled="true" name="LIB-strcpy-overrun"/>
- <check enabled="false" name="LIB-strncat-overrun-pos"/>
- <check enabled="true" name="LIB-strncat-overrun"/>
- <check enabled="false" name="LIB-strncmp-overrun-pos"/>
- <check enabled="true" name="LIB-strncmp-overrun"/>
- <check enabled="false" name="LIB-strncpy-overrun-pos"/>
- <check enabled="true" name="LIB-strncpy-overrun"/>
- </group>
- <group enabled="true" name="LOGIC">
- <check enabled="false" name="LOGIC-overload"/>
- </group>
- <group enabled="true" name="MEM">
- <check enabled="true" name="MEM-delete-array-op"/>
- <check enabled="true" name="MEM-delete-op"/>
- <check enabled="true" name="MEM-double-free-alias"/>
- <check enabled="true" name="MEM-double-free-some"/>
- <check enabled="true" name="MEM-double-free"/>
- <check enabled="true" name="MEM-free-field"/>
- <check enabled="true" name="MEM-free-fptr"/>
- <check enabled="false" name="MEM-free-no-alloc-struct"/>
- <check enabled="false" name="MEM-free-no-alloc"/>
- <check enabled="true" name="MEM-free-no-use"/>
- <check enabled="true" name="MEM-free-op"/>
- <check enabled="true" name="MEM-free-struct-field"/>
- <check enabled="true" name="MEM-free-variable-alias"/>
- <check enabled="true" name="MEM-free-variable"/>
- <check enabled="true" name="MEM-leak-alias"/>
- <check enabled="false" name="MEM-leak"/>
- <check enabled="false" name="MEM-malloc-arith"/>
- <check enabled="true" name="MEM-malloc-diff-type"/>
- <check enabled="true" name="MEM-malloc-sizeof-ptr"/>
- <check enabled="true" name="MEM-malloc-sizeof"/>
- <check enabled="false" name="MEM-malloc-strlen"/>
- <check enabled="true" name="MEM-realloc-diff-type"/>
- <check enabled="true" name="MEM-return-free"/>
- <check enabled="true" name="MEM-return-no-assign"/>
- <check enabled="true" name="MEM-stack-global-field"/>
- <check enabled="true" name="MEM-stack-global"/>
- <check enabled="true" name="MEM-stack-param-ref"/>
- <check enabled="true" name="MEM-stack-param"/>
- <check enabled="true" name="MEM-stack-pos"/>
- <check enabled="true" name="MEM-stack-ref"/>
- <check enabled="true" name="MEM-stack"/>
- <check enabled="true" name="MEM-use-free-all"/>
- <check enabled="true" name="MEM-use-free-some"/>
- </group>
- <group enabled="true" name="PTR">
- <check enabled="true" name="PTR-arith-field"/>
- <check enabled="true" name="PTR-arith-stack"/>
- <check enabled="true" name="PTR-arith-var"/>
- <check enabled="true" name="PTR-cmp-str-lit"/>
- <check enabled="false" name="PTR-null-assign-fun-pos"/>
- <check enabled="false" name="PTR-null-assign-pos"/>
- <check enabled="true" name="PTR-null-assign"/>
- <check enabled="true" name="PTR-null-cmp-aft"/>
- <check enabled="true" name="PTR-null-cmp-bef-fun"/>
- <check enabled="true" name="PTR-null-cmp-bef"/>
- <check enabled="true" name="PTR-null-fun-pos"/>
- <check enabled="false" name="PTR-null-literal-pos"/>
- <check enabled="false" name="PTR-overload"/>
- <check enabled="false" name="PTR-singleton-arith-pos"/>
- <check enabled="true" name="PTR-singleton-arith"/>
- <check enabled="true" name="PTR-unchk-param-some"/>
- <check enabled="false" name="PTR-unchk-param"/>
- <check enabled="false" name="PTR-uninit-pos"/>
- <check enabled="true" name="PTR-uninit"/>
- </group>
- <group enabled="true" name="RED">
- <check enabled="false" name="RED-alloc-zero-bytes"/>
- <check enabled="false" name="RED-case-reach"/>
- <check enabled="false" name="RED-cmp-always"/>
- <check enabled="false" name="RED-cmp-never"/>
- <check enabled="false" name="RED-cond-always"/>
- <check enabled="true" name="RED-cond-const-assign"/>
- <check enabled="false" name="RED-cond-const-expr"/>
- <check enabled="false" name="RED-cond-const"/>
- <check enabled="false" name="RED-cond-never"/>
- <check enabled="true" name="RED-dead"/>
- <check enabled="false" name="RED-expr"/>
- <check enabled="false" name="RED-func-no-effect"/>
- <check enabled="true" name="RED-local-hides-global"/>
- <check enabled="false" name="RED-local-hides-local"/>
- <check enabled="false" name="RED-local-hides-member"/>
- <check enabled="true" name="RED-local-hides-param"/>
- <check enabled="false" name="RED-no-effect"/>
- <check enabled="true" name="RED-self-assign"/>
- <check enabled="true" name="RED-unused-assign"/>
- <check enabled="false" name="RED-unused-param"/>
- <check enabled="false" name="RED-unused-return-val"/>
- <check enabled="false" name="RED-unused-val"/>
- <check enabled="true" name="RED-unused-var-all"/>
- </group>
- <group enabled="true" name="RESOURCE">
- <check enabled="false" name="RESOURCE-deref-file"/>
- <check enabled="true" name="RESOURCE-double-close"/>
- <check enabled="true" name="RESOURCE-file-no-close-all"/>
- <check enabled="false" name="RESOURCE-file-pos-neg"/>
- <check enabled="true" name="RESOURCE-file-use-after-close"/>
- <check enabled="false" name="RESOURCE-implicit-deref-file"/>
- <check enabled="true" name="RESOURCE-write-ronly-file"/>
- </group>
- <group enabled="true" name="SIZEOF">
- <check enabled="true" name="SIZEOF-side-effect"/>
- </group>
- <group enabled="true" name="SPC">
- <check enabled="true" name="SPC-order"/>
- <check enabled="false" name="SPC-uninit-arr-all"/>
- <check enabled="true" name="SPC-uninit-struct-field-heap"/>
- <check enabled="false" name="SPC-uninit-struct-field"/>
- <check enabled="true" name="SPC-uninit-struct"/>
- <check enabled="true" name="SPC-uninit-var-all"/>
- <check enabled="true" name="SPC-uninit-var-some"/>
- <check enabled="false" name="SPC-volatile-reads"/>
- <check enabled="false" name="SPC-volatile-writes"/>
- </group>
- <group enabled="true" name="STRUCT">
- <check enabled="false" name="STRUCT-signed-bit"/>
- </group>
- <group enabled="true" name="SWITCH">
- <check enabled="true" name="SWITCH-fall-through"/>
- </group>
- <group enabled="true" name="THROW">
- <check enabled="false" name="THROW-empty"/>
- <check enabled="false" name="THROW-main"/>
- <check enabled="true" name="THROW-null"/>
- <check enabled="true" name="THROW-ptr"/>
- <check enabled="true" name="THROW-static"/>
- <check enabled="true" name="THROW-unhandled"/>
- </group>
- <group enabled="true" name="UNION">
- <check enabled="true" name="UNION-overlap-assign"/>
- <check enabled="true" name="UNION-type-punning"/>
- </group>
- </package>
- <package enabled="false" name="CERT">
- <group enabled="true" name="CERT-EXP">
- <check enabled="true" name="CERT-EXP19-C"/>
- </group>
- <group enabled="true" name="CERT-FIO">
- <check enabled="true" name="CERT-FIO37-C"/>
- <check enabled="true" name="CERT-FIO38-C"/>
- </group>
- <group enabled="true" name="CERT-SIG">
- <check enabled="true" name="CERT-SIG31-C"/>
- </group>
- </package>
- <package enabled="false" name="SECURITY">
- <group enabled="true" name="SEC-BUFFER">
- <check enabled="true" name="SEC-BUFFER-memory-leak-alias"/>
- <check enabled="false" name="SEC-BUFFER-memory-leak"/>
- <check enabled="false" name="SEC-BUFFER-memset-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-memset-overrun"/>
- <check enabled="false" name="SEC-BUFFER-qsort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-qsort-overrun"/>
- <check enabled="true" name="SEC-BUFFER-sprintf-overrun"/>
- <check enabled="false" name="SEC-BUFFER-std-sort-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-std-sort-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strcpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strcpy-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncat-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncat-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncmp-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncmp-overrun"/>
- <check enabled="false" name="SEC-BUFFER-strncpy-overrun-pos"/>
- <check enabled="true" name="SEC-BUFFER-strncpy-overrun"/>
- <check enabled="true" name="SEC-BUFFER-tainted-alloc-size"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy-length"/>
- <check enabled="true" name="SEC-BUFFER-tainted-copy"/>
- <check enabled="true" name="SEC-BUFFER-tainted-index"/>
- <check enabled="true" name="SEC-BUFFER-tainted-offset"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-all"/>
- <check enabled="true" name="SEC-BUFFER-use-after-free-some"/>
- </group>
- <group enabled="true" name="SEC-DIV-0">
- <check enabled="true" name="SEC-DIV-0-compare-after"/>
- <check enabled="true" name="SEC-DIV-0-compare-before"/>
- <check enabled="true" name="SEC-DIV-0-tainted"/>
- </group>
- <group enabled="true" name="SEC-FILEOP">
- <check enabled="true" name="SEC-FILEOP-open-no-close"/>
- <check enabled="false" name="SEC-FILEOP-path-traversal"/>
- <check enabled="true" name="SEC-FILEOP-use-after-close"/>
- </group>
- <group enabled="true" name="SEC-INJECTION">
- <check enabled="false" name="SEC-INJECTION-sql"/>
- <check enabled="false" name="SEC-INJECTION-xpath"/>
- </group>
- <group enabled="true" name="SEC-LOOP">
- <check enabled="true" name="SEC-LOOP-tainted-bound"/>
- </group>
- <group enabled="true" name="SEC-NULL">
- <check enabled="false" name="SEC-NULL-assignment-fun-pos"/>
- <check enabled="true" name="SEC-NULL-assignment"/>
- <check enabled="true" name="SEC-NULL-cmp-aft"/>
- <check enabled="true" name="SEC-NULL-cmp-bef-fun"/>
- <check enabled="true" name="SEC-NULL-cmp-bef"/>
- <check enabled="false" name="SEC-NULL-literal-pos"/>
- </group>
- <group enabled="true" name="SEC-STRING">
- <check enabled="true" name="SEC-STRING-format-string"/>
- <check enabled="false" name="SEC-STRING-hard-coded-credentials"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2004">
- <group enabled="true" name="MISRAC2004-1">
- <check enabled="true" name="MISRAC2004-1.1"/>
- <check enabled="true" name="MISRAC2004-1.2_a"/>
- <check enabled="true" name="MISRAC2004-1.2_b"/>
- <check enabled="true" name="MISRAC2004-1.2_c"/>
- <check enabled="true" name="MISRAC2004-1.2_d"/>
- <check enabled="true" name="MISRAC2004-1.2_e"/>
- <check enabled="true" name="MISRAC2004-1.2_f"/>
- <check enabled="true" name="MISRAC2004-1.2_g"/>
- <check enabled="true" name="MISRAC2004-1.2_h"/>
- <check enabled="true" name="MISRAC2004-1.2_i"/>
- <check enabled="true" name="MISRAC2004-1.2_j"/>
- </group>
- <group enabled="true" name="MISRAC2004-2">
- <check enabled="true" name="MISRAC2004-2.1"/>
- <check enabled="true" name="MISRAC2004-2.2"/>
- <check enabled="true" name="MISRAC2004-2.3"/>
- <check enabled="false" name="MISRAC2004-2.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-5">
- <check enabled="true" name="MISRAC2004-5.2"/>
- <check enabled="true" name="MISRAC2004-5.3"/>
- <check enabled="true" name="MISRAC2004-5.4"/>
- <check enabled="false" name="MISRAC2004-5.5"/>
- <check enabled="false" name="MISRAC2004-5.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-6">
- <check enabled="true" name="MISRAC2004-6.1"/>
- <check enabled="false" name="MISRAC2004-6.3"/>
- <check enabled="true" name="MISRAC2004-6.4"/>
- <check enabled="true" name="MISRAC2004-6.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-7">
- <check enabled="true" name="MISRAC2004-7.1"/>
- </group>
- <group enabled="true" name="MISRAC2004-8">
- <check enabled="true" name="MISRAC2004-8.1"/>
- <check enabled="true" name="MISRAC2004-8.2"/>
- <check enabled="true" name="MISRAC2004-8.5_a"/>
- <check enabled="true" name="MISRAC2004-8.5_b"/>
- <check enabled="true" name="MISRAC2004-8.12"/>
- </group>
- <group enabled="true" name="MISRAC2004-9">
- <check enabled="true" name="MISRAC2004-9.1_a"/>
- <check enabled="true" name="MISRAC2004-9.1_b"/>
- <check enabled="true" name="MISRAC2004-9.1_c"/>
- <check enabled="true" name="MISRAC2004-9.2"/>
- </group>
- <group enabled="true" name="MISRAC2004-10">
- <check enabled="true" name="MISRAC2004-10.1_a"/>
- <check enabled="true" name="MISRAC2004-10.1_b"/>
- <check enabled="true" name="MISRAC2004-10.1_c"/>
- <check enabled="true" name="MISRAC2004-10.1_d"/>
- <check enabled="true" name="MISRAC2004-10.2_a"/>
- <check enabled="true" name="MISRAC2004-10.2_b"/>
- <check enabled="true" name="MISRAC2004-10.2_c"/>
- <check enabled="true" name="MISRAC2004-10.2_d"/>
- <check enabled="true" name="MISRAC2004-10.3"/>
- <check enabled="true" name="MISRAC2004-10.4"/>
- <check enabled="true" name="MISRAC2004-10.5"/>
- <check enabled="true" name="MISRAC2004-10.6"/>
- </group>
- <group enabled="true" name="MISRAC2004-11">
- <check enabled="true" name="MISRAC2004-11.1"/>
- <check enabled="false" name="MISRAC2004-11.3"/>
- <check enabled="false" name="MISRAC2004-11.4"/>
- <check enabled="true" name="MISRAC2004-11.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-12">
- <check enabled="false" name="MISRAC2004-12.1"/>
- <check enabled="true" name="MISRAC2004-12.2_a"/>
- <check enabled="true" name="MISRAC2004-12.2_b"/>
- <check enabled="true" name="MISRAC2004-12.2_c"/>
- <check enabled="true" name="MISRAC2004-12.3"/>
- <check enabled="true" name="MISRAC2004-12.4"/>
- <check enabled="false" name="MISRAC2004-12.6_a"/>
- <check enabled="false" name="MISRAC2004-12.6_b"/>
- <check enabled="true" name="MISRAC2004-12.7"/>
- <check enabled="true" name="MISRAC2004-12.8"/>
- <check enabled="true" name="MISRAC2004-12.9"/>
- <check enabled="true" name="MISRAC2004-12.10"/>
- <check enabled="false" name="MISRAC2004-12.11"/>
- <check enabled="true" name="MISRAC2004-12.12_a"/>
- <check enabled="true" name="MISRAC2004-12.12_b"/>
- <check enabled="false" name="MISRAC2004-12.13"/>
- </group>
- <group enabled="true" name="MISRAC2004-13">
- <check enabled="true" name="MISRAC2004-13.1"/>
- <check enabled="false" name="MISRAC2004-13.2_a"/>
- <check enabled="false" name="MISRAC2004-13.2_b"/>
- <check enabled="false" name="MISRAC2004-13.2_c"/>
- <check enabled="false" name="MISRAC2004-13.2_d"/>
- <check enabled="false" name="MISRAC2004-13.2_e"/>
- <check enabled="true" name="MISRAC2004-13.3"/>
- <check enabled="true" name="MISRAC2004-13.4"/>
- <check enabled="true" name="MISRAC2004-13.5"/>
- <check enabled="true" name="MISRAC2004-13.6"/>
- <check enabled="true" name="MISRAC2004-13.7_a"/>
- <check enabled="true" name="MISRAC2004-13.7_b"/>
- </group>
- <group enabled="true" name="MISRAC2004-14">
- <check enabled="true" name="MISRAC2004-14.1"/>
- <check enabled="true" name="MISRAC2004-14.2"/>
- <check enabled="true" name="MISRAC2004-14.3"/>
- <check enabled="true" name="MISRAC2004-14.4"/>
- <check enabled="true" name="MISRAC2004-14.5"/>
- <check enabled="true" name="MISRAC2004-14.6"/>
- <check enabled="true" name="MISRAC2004-14.7"/>
- <check enabled="true" name="MISRAC2004-14.8_a"/>
- <check enabled="true" name="MISRAC2004-14.8_b"/>
- <check enabled="true" name="MISRAC2004-14.8_c"/>
- <check enabled="true" name="MISRAC2004-14.8_d"/>
- <check enabled="true" name="MISRAC2004-14.9"/>
- <check enabled="true" name="MISRAC2004-14.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-15">
- <check enabled="true" name="MISRAC2004-15.0"/>
- <check enabled="true" name="MISRAC2004-15.1"/>
- <check enabled="true" name="MISRAC2004-15.2"/>
- <check enabled="true" name="MISRAC2004-15.3"/>
- <check enabled="true" name="MISRAC2004-15.4"/>
- <check enabled="true" name="MISRAC2004-15.5"/>
- </group>
- <group enabled="true" name="MISRAC2004-16">
- <check enabled="true" name="MISRAC2004-16.1"/>
- <check enabled="true" name="MISRAC2004-16.2_a"/>
- <check enabled="true" name="MISRAC2004-16.2_b"/>
- <check enabled="true" name="MISRAC2004-16.3"/>
- <check enabled="true" name="MISRAC2004-16.5"/>
- <check enabled="true" name="MISRAC2004-16.7"/>
- <check enabled="true" name="MISRAC2004-16.8"/>
- <check enabled="true" name="MISRAC2004-16.9"/>
- <check enabled="true" name="MISRAC2004-16.10"/>
- </group>
- <group enabled="true" name="MISRAC2004-17">
- <check enabled="true" name="MISRAC2004-17.1_a"/>
- <check enabled="true" name="MISRAC2004-17.1_b"/>
- <check enabled="true" name="MISRAC2004-17.1_c"/>
- <check enabled="true" name="MISRAC2004-17.4_a"/>
- <check enabled="true" name="MISRAC2004-17.4_b"/>
- <check enabled="true" name="MISRAC2004-17.5"/>
- <check enabled="true" name="MISRAC2004-17.6_a"/>
- <check enabled="true" name="MISRAC2004-17.6_b"/>
- <check enabled="true" name="MISRAC2004-17.6_c"/>
- <check enabled="true" name="MISRAC2004-17.6_d"/>
- </group>
- <group enabled="true" name="MISRAC2004-18">
- <check enabled="true" name="MISRAC2004-18.1"/>
- <check enabled="true" name="MISRAC2004-18.2"/>
- <check enabled="true" name="MISRAC2004-18.4"/>
- </group>
- <group enabled="true" name="MISRAC2004-19">
- <check enabled="false" name="MISRAC2004-19.2"/>
- <check enabled="true" name="MISRAC2004-19.6"/>
- <check enabled="false" name="MISRAC2004-19.7"/>
- <check enabled="true" name="MISRAC2004-19.12"/>
- <check enabled="false" name="MISRAC2004-19.13"/>
- <check enabled="true" name="MISRAC2004-19.15"/>
- </group>
- <group enabled="true" name="MISRAC2004-20">
- <check enabled="true" name="MISRAC2004-20.1"/>
- <check enabled="true" name="MISRAC2004-20.4"/>
- <check enabled="true" name="MISRAC2004-20.5"/>
- <check enabled="true" name="MISRAC2004-20.6"/>
- <check enabled="true" name="MISRAC2004-20.7"/>
- <check enabled="true" name="MISRAC2004-20.8"/>
- <check enabled="true" name="MISRAC2004-20.9"/>
- <check enabled="true" name="MISRAC2004-20.10"/>
- <check enabled="true" name="MISRAC2004-20.11"/>
- <check enabled="true" name="MISRAC2004-20.12"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC2012">
- <group enabled="true" name="MISRAC2012-Dir-4">
- <check enabled="true" name="MISRAC2012-Dir-4.3"/>
- <check enabled="false" name="MISRAC2012-Dir-4.4"/>
- <check enabled="false" name="MISRAC2012-Dir-4.5"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.6_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.7_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.8"/>
- <check enabled="false" name="MISRAC2012-Dir-4.9"/>
- <check enabled="true" name="MISRAC2012-Dir-4.10"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_a"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_b"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_c"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_d"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_e"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_f"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_h"/>
- <check enabled="false" name="MISRAC2012-Dir-4.11_i"/>
- <check enabled="false" name="MISRAC2012-Dir-4.12"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_b"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_c"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_d"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_e"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_f"/>
- <check enabled="true" name="MISRAC2012-Dir-4.13_g"/>
- <check enabled="false" name="MISRAC2012-Dir-4.13_h"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-1">
- <check enabled="true" name="MISRAC2012-Rule-1.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_c"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_d"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_e"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_f"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_g"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_h"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_i"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_j"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_k"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_m"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_n"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_o"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_p"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_q"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_r"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_s"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_t"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_u"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_v"/>
- <check enabled="true" name="MISRAC2012-Rule-1.3_w"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-2">
- <check enabled="true" name="MISRAC2012-Rule-2.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-2.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-2.3"/>
- <check enabled="false" name="MISRAC2012-Rule-2.4"/>
- <check enabled="false" name="MISRAC2012-Rule-2.5"/>
- <check enabled="false" name="MISRAC2012-Rule-2.6"/>
- <check enabled="false" name="MISRAC2012-Rule-2.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-3">
- <check enabled="true" name="MISRAC2012-Rule-3.1"/>
- <check enabled="true" name="MISRAC2012-Rule-3.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-5">
- <check enabled="true" name="MISRAC2012-Rule-5.1"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.2_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.3_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.4_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-5.5_c99"/>
- <check enabled="true" name="MISRAC2012-Rule-5.6"/>
- <check enabled="true" name="MISRAC2012-Rule-5.7"/>
- <check enabled="true" name="MISRAC2012-Rule-5.8"/>
- <check enabled="false" name="MISRAC2012-Rule-5.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-6">
- <check enabled="true" name="MISRAC2012-Rule-6.1"/>
- <check enabled="true" name="MISRAC2012-Rule-6.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-7">
- <check enabled="true" name="MISRAC2012-Rule-7.1"/>
- <check enabled="true" name="MISRAC2012-Rule-7.2"/>
- <check enabled="true" name="MISRAC2012-Rule-7.3"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-7.4_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-8">
- <check enabled="true" name="MISRAC2012-Rule-8.1"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.4"/>
- <check enabled="false" name="MISRAC2012-Rule-8.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-8.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.6"/>
- <check enabled="false" name="MISRAC2012-Rule-8.7"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_a"/>
- <check enabled="false" name="MISRAC2012-Rule-8.9_b"/>
- <check enabled="true" name="MISRAC2012-Rule-8.10"/>
- <check enabled="false" name="MISRAC2012-Rule-8.11"/>
- <check enabled="true" name="MISRAC2012-Rule-8.12"/>
- <check enabled="false" name="MISRAC2012-Rule-8.13"/>
- <check enabled="true" name="MISRAC2012-Rule-8.14"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-9">
- <check enabled="true" name="MISRAC2012-Rule-9.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_e"/>
- <check enabled="true" name="MISRAC2012-Rule-9.1_f"/>
- <check enabled="true" name="MISRAC2012-Rule-9.2"/>
- <check enabled="true" name="MISRAC2012-Rule-9.3"/>
- <check enabled="true" name="MISRAC2012-Rule-9.4"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-9.5_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-10">
- <check enabled="true" name="MISRAC2012-Rule-10.1_R2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R4"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.1_R8"/>
- <check enabled="true" name="MISRAC2012-Rule-10.2"/>
- <check enabled="true" name="MISRAC2012-Rule-10.3"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-10.4_b"/>
- <check enabled="false" name="MISRAC2012-Rule-10.5"/>
- <check enabled="true" name="MISRAC2012-Rule-10.6"/>
- <check enabled="true" name="MISRAC2012-Rule-10.7"/>
- <check enabled="true" name="MISRAC2012-Rule-10.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-11">
- <check enabled="true" name="MISRAC2012-Rule-11.1"/>
- <check enabled="true" name="MISRAC2012-Rule-11.2"/>
- <check enabled="true" name="MISRAC2012-Rule-11.3"/>
- <check enabled="false" name="MISRAC2012-Rule-11.4"/>
- <check enabled="false" name="MISRAC2012-Rule-11.5"/>
- <check enabled="true" name="MISRAC2012-Rule-11.6"/>
- <check enabled="true" name="MISRAC2012-Rule-11.7"/>
- <check enabled="true" name="MISRAC2012-Rule-11.8"/>
- <check enabled="true" name="MISRAC2012-Rule-11.9"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-12">
- <check enabled="false" name="MISRAC2012-Rule-12.1"/>
- <check enabled="true" name="MISRAC2012-Rule-12.2"/>
- <check enabled="false" name="MISRAC2012-Rule-12.3"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-13">
- <check enabled="true" name="MISRAC2012-Rule-13.1"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.2_c"/>
- <check enabled="false" name="MISRAC2012-Rule-13.3"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_a"/>
- <check enabled="false" name="MISRAC2012-Rule-13.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-13.5"/>
- <check enabled="true" name="MISRAC2012-Rule-13.6"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-14">
- <check enabled="true" name="MISRAC2012-Rule-14.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.2"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.3_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_a"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_b"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_c"/>
- <check enabled="true" name="MISRAC2012-Rule-14.4_d"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-15">
- <check enabled="false" name="MISRAC2012-Rule-15.1"/>
- <check enabled="true" name="MISRAC2012-Rule-15.2"/>
- <check enabled="true" name="MISRAC2012-Rule-15.3"/>
- <check enabled="false" name="MISRAC2012-Rule-15.4"/>
- <check enabled="false" name="MISRAC2012-Rule-15.5"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-15.6_e"/>
- <check enabled="true" name="MISRAC2012-Rule-15.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-16">
- <check enabled="true" name="MISRAC2012-Rule-16.1"/>
- <check enabled="true" name="MISRAC2012-Rule-16.2"/>
- <check enabled="true" name="MISRAC2012-Rule-16.3"/>
- <check enabled="true" name="MISRAC2012-Rule-16.4"/>
- <check enabled="true" name="MISRAC2012-Rule-16.5"/>
- <check enabled="true" name="MISRAC2012-Rule-16.6"/>
- <check enabled="true" name="MISRAC2012-Rule-16.7"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-17">
- <check enabled="true" name="MISRAC2012-Rule-17.1"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-17.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-17.3"/>
- <check enabled="true" name="MISRAC2012-Rule-17.4"/>
- <check enabled="false" name="MISRAC2012-Rule-17.5"/>
- <check enabled="true" name="MISRAC2012-Rule-17.6"/>
- <check enabled="true" name="MISRAC2012-Rule-17.7"/>
- <check enabled="false" name="MISRAC2012-Rule-17.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-18">
- <check enabled="true" name="MISRAC2012-Rule-18.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.1_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.2"/>
- <check enabled="true" name="MISRAC2012-Rule-18.3"/>
- <check enabled="true" name="MISRAC2012-Rule-18.4"/>
- <check enabled="false" name="MISRAC2012-Rule-18.5"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_a"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_b"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_c"/>
- <check enabled="true" name="MISRAC2012-Rule-18.6_d"/>
- <check enabled="true" name="MISRAC2012-Rule-18.7"/>
- <check enabled="true" name="MISRAC2012-Rule-18.8"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-19">
- <check enabled="true" name="MISRAC2012-Rule-19.1"/>
- <check enabled="false" name="MISRAC2012-Rule-19.2"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-20">
- <check enabled="false" name="MISRAC2012-Rule-20.1"/>
- <check enabled="true" name="MISRAC2012-Rule-20.2"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c89"/>
- <check enabled="true" name="MISRAC2012-Rule-20.4_c99"/>
- <check enabled="false" name="MISRAC2012-Rule-20.5"/>
- <check enabled="true" name="MISRAC2012-Rule-20.7"/>
- <check enabled="false" name="MISRAC2012-Rule-20.10"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-21">
- <check enabled="true" name="MISRAC2012-Rule-21.1"/>
- <check enabled="true" name="MISRAC2012-Rule-21.2"/>
- <check enabled="true" name="MISRAC2012-Rule-21.3"/>
- <check enabled="true" name="MISRAC2012-Rule-21.4"/>
- <check enabled="true" name="MISRAC2012-Rule-21.5"/>
- <check enabled="true" name="MISRAC2012-Rule-21.6"/>
- <check enabled="true" name="MISRAC2012-Rule-21.7"/>
- <check enabled="true" name="MISRAC2012-Rule-21.8"/>
- <check enabled="true" name="MISRAC2012-Rule-21.9"/>
- <check enabled="true" name="MISRAC2012-Rule-21.10"/>
- <check enabled="true" name="MISRAC2012-Rule-21.11"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_a"/>
- <check enabled="false" name="MISRAC2012-Rule-21.12_b"/>
- </group>
- <group enabled="true" name="MISRAC2012-Rule-22">
- <check enabled="true" name="MISRAC2012-Rule-22.1_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.1_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.2_c"/>
- <check enabled="true" name="MISRAC2012-Rule-22.3"/>
- <check enabled="true" name="MISRAC2012-Rule-22.4"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_a"/>
- <check enabled="true" name="MISRAC2012-Rule-22.5_b"/>
- <check enabled="true" name="MISRAC2012-Rule-22.6"/>
- </group>
- </package>
- <package enabled="false" name="MISRAC++2008">
- <group enabled="true" name="MISRAC++2008-0-1">
- <check enabled="true" name="MISRAC++2008-0-1-1"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-2_c"/>
- <check enabled="true" name="MISRAC++2008-0-1-3"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_a"/>
- <check enabled="true" name="MISRAC++2008-0-1-4_b"/>
- <check enabled="true" name="MISRAC++2008-0-1-6"/>
- <check enabled="true" name="MISRAC++2008-0-1-7"/>
- <check enabled="false" name="MISRAC++2008-0-1-8"/>
- <check enabled="true" name="MISRAC++2008-0-1-9"/>
- <check enabled="true" name="MISRAC++2008-0-1-11"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-2">
- <check enabled="true" name="MISRAC++2008-0-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-0-3">
- <check enabled="true" name="MISRAC++2008-0-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-7">
- <check enabled="true" name="MISRAC++2008-2-7-1"/>
- <check enabled="true" name="MISRAC++2008-2-7-2"/>
- <check enabled="false" name="MISRAC++2008-2-7-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-10">
- <check enabled="true" name="MISRAC++2008-2-10-1"/>
- <check enabled="true" name="MISRAC++2008-2-10-2"/>
- <check enabled="true" name="MISRAC++2008-2-10-3"/>
- <check enabled="true" name="MISRAC++2008-2-10-4"/>
- <check enabled="false" name="MISRAC++2008-2-10-5"/>
- <check enabled="true" name="MISRAC++2008-2-10-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-2-13">
- <check enabled="true" name="MISRAC++2008-2-13-2"/>
- <check enabled="true" name="MISRAC++2008-2-13-3"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_a"/>
- <check enabled="true" name="MISRAC++2008-2-13-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-1">
- <check enabled="true" name="MISRAC++2008-3-1-1"/>
- <check enabled="true" name="MISRAC++2008-3-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-3-9">
- <check enabled="false" name="MISRAC++2008-3-9-2"/>
- <check enabled="true" name="MISRAC++2008-3-9-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-4-5">
- <check enabled="true" name="MISRAC++2008-4-5-1"/>
- <check enabled="true" name="MISRAC++2008-4-5-2"/>
- <check enabled="true" name="MISRAC++2008-4-5-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-0">
- <check enabled="true" name="MISRAC++2008-5-0-1_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-1_c"/>
- <check enabled="false" name="MISRAC++2008-5-0-2"/>
- <check enabled="true" name="MISRAC++2008-5-0-3"/>
- <check enabled="true" name="MISRAC++2008-5-0-4"/>
- <check enabled="true" name="MISRAC++2008-5-0-5"/>
- <check enabled="true" name="MISRAC++2008-5-0-6"/>
- <check enabled="true" name="MISRAC++2008-5-0-7"/>
- <check enabled="true" name="MISRAC++2008-5-0-8"/>
- <check enabled="true" name="MISRAC++2008-5-0-9"/>
- <check enabled="true" name="MISRAC++2008-5-0-10"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-13_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-14"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-15_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_a"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_b"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_c"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_d"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_e"/>
- <check enabled="true" name="MISRAC++2008-5-0-16_f"/>
- <check enabled="true" name="MISRAC++2008-5-0-19"/>
- <check enabled="true" name="MISRAC++2008-5-0-21"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-2">
- <check enabled="true" name="MISRAC++2008-5-2-4"/>
- <check enabled="true" name="MISRAC++2008-5-2-5"/>
- <check enabled="true" name="MISRAC++2008-5-2-6"/>
- <check enabled="true" name="MISRAC++2008-5-2-7"/>
- <check enabled="false" name="MISRAC++2008-5-2-9"/>
- <check enabled="false" name="MISRAC++2008-5-2-10"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_a"/>
- <check enabled="true" name="MISRAC++2008-5-2-11_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-3">
- <check enabled="true" name="MISRAC++2008-5-3-1"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_a"/>
- <check enabled="true" name="MISRAC++2008-5-3-2_b"/>
- <check enabled="true" name="MISRAC++2008-5-3-3"/>
- <check enabled="true" name="MISRAC++2008-5-3-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-8">
- <check enabled="true" name="MISRAC++2008-5-8-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-14">
- <check enabled="true" name="MISRAC++2008-5-14-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-18">
- <check enabled="true" name="MISRAC++2008-5-18-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-5-19">
- <check enabled="false" name="MISRAC++2008-5-19-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-2">
- <check enabled="true" name="MISRAC++2008-6-2-1"/>
- <check enabled="true" name="MISRAC++2008-6-2-2"/>
- <check enabled="false" name="MISRAC++2008-6-2-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-3">
- <check enabled="true" name="MISRAC++2008-6-3-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_b"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_c"/>
- <check enabled="true" name="MISRAC++2008-6-3-1_d"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-4">
- <check enabled="true" name="MISRAC++2008-6-4-1"/>
- <check enabled="true" name="MISRAC++2008-6-4-2"/>
- <check enabled="true" name="MISRAC++2008-6-4-3"/>
- <check enabled="true" name="MISRAC++2008-6-4-4"/>
- <check enabled="true" name="MISRAC++2008-6-4-5"/>
- <check enabled="true" name="MISRAC++2008-6-4-6"/>
- <check enabled="true" name="MISRAC++2008-6-4-7"/>
- <check enabled="true" name="MISRAC++2008-6-4-8"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-5">
- <check enabled="true" name="MISRAC++2008-6-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-6-5-2"/>
- <check enabled="true" name="MISRAC++2008-6-5-3"/>
- <check enabled="true" name="MISRAC++2008-6-5-4"/>
- <check enabled="true" name="MISRAC++2008-6-5-6"/>
- </group>
- <group enabled="true" name="MISRAC++2008-6-6">
- <check enabled="true" name="MISRAC++2008-6-6-1"/>
- <check enabled="true" name="MISRAC++2008-6-6-2"/>
- <check enabled="true" name="MISRAC++2008-6-6-4"/>
- <check enabled="true" name="MISRAC++2008-6-6-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-1">
- <check enabled="true" name="MISRAC++2008-7-1-1"/>
- <check enabled="true" name="MISRAC++2008-7-1-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-2">
- <check enabled="true" name="MISRAC++2008-7-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-4">
- <check enabled="true" name="MISRAC++2008-7-4-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-7-5">
- <check enabled="true" name="MISRAC++2008-7-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_a"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_b"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_c"/>
- <check enabled="true" name="MISRAC++2008-7-5-2_d"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_a"/>
- <check enabled="false" name="MISRAC++2008-7-5-4_b"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-0">
- <check enabled="true" name="MISRAC++2008-8-0-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-4">
- <check enabled="true" name="MISRAC++2008-8-4-1"/>
- <check enabled="true" name="MISRAC++2008-8-4-3"/>
- <check enabled="true" name="MISRAC++2008-8-4-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-8-5">
- <check enabled="true" name="MISRAC++2008-8-5-1_a"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_b"/>
- <check enabled="true" name="MISRAC++2008-8-5-1_c"/>
- <check enabled="true" name="MISRAC++2008-8-5-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-3">
- <check enabled="true" name="MISRAC++2008-9-3-1"/>
- <check enabled="true" name="MISRAC++2008-9-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-5">
- <check enabled="true" name="MISRAC++2008-9-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-9-6">
- <check enabled="true" name="MISRAC++2008-9-6-2"/>
- <check enabled="true" name="MISRAC++2008-9-6-3"/>
- <check enabled="true" name="MISRAC++2008-9-6-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-12-1">
- <check enabled="true" name="MISRAC++2008-12-1-1_a"/>
- <check enabled="true" name="MISRAC++2008-12-1-1_b"/>
- <check enabled="true" name="MISRAC++2008-12-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-0">
- <check enabled="false" name="MISRAC++2008-15-0-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-1">
- <check enabled="true" name="MISRAC++2008-15-1-2"/>
- <check enabled="true" name="MISRAC++2008-15-1-3"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-3">
- <check enabled="true" name="MISRAC++2008-15-3-1"/>
- <check enabled="false" name="MISRAC++2008-15-3-2"/>
- <check enabled="true" name="MISRAC++2008-15-3-3"/>
- <check enabled="true" name="MISRAC++2008-15-3-4"/>
- <check enabled="true" name="MISRAC++2008-15-3-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-15-5">
- <check enabled="true" name="MISRAC++2008-15-5-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-0">
- <check enabled="true" name="MISRAC++2008-16-0-3"/>
- <check enabled="true" name="MISRAC++2008-16-0-4"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-2">
- <check enabled="true" name="MISRAC++2008-16-2-2"/>
- <check enabled="true" name="MISRAC++2008-16-2-3"/>
- <check enabled="true" name="MISRAC++2008-16-2-4"/>
- <check enabled="false" name="MISRAC++2008-16-2-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-16-3">
- <check enabled="true" name="MISRAC++2008-16-3-1"/>
- <check enabled="false" name="MISRAC++2008-16-3-2"/>
- </group>
- <group enabled="true" name="MISRAC++2008-17-0">
- <check enabled="true" name="MISRAC++2008-17-0-1"/>
- <check enabled="true" name="MISRAC++2008-17-0-3"/>
- <check enabled="true" name="MISRAC++2008-17-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-0">
- <check enabled="true" name="MISRAC++2008-18-0-1"/>
- <check enabled="true" name="MISRAC++2008-18-0-2"/>
- <check enabled="true" name="MISRAC++2008-18-0-3"/>
- <check enabled="true" name="MISRAC++2008-18-0-4"/>
- <check enabled="true" name="MISRAC++2008-18-0-5"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-2">
- <check enabled="true" name="MISRAC++2008-18-2-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-4">
- <check enabled="true" name="MISRAC++2008-18-4-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-18-7">
- <check enabled="true" name="MISRAC++2008-18-7-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-19-3">
- <check enabled="true" name="MISRAC++2008-19-3-1"/>
- </group>
- <group enabled="true" name="MISRAC++2008-27-0">
- <check enabled="true" name="MISRAC++2008-27-0-1"/>
- </group>
- </package>
- </checks_tree>
- </cstat_settings>
- </data>
- </settings>
- <settings>
- <name>RuntimeChecking</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>0</debug>
- <option>
- <name>GenRtcDebugHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnableBoundsChecking</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrMem</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcTrackPointerBounds</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcCheckAccesses</name>
- <state>1</state>
- </option>
- <option>
- <name>GenRtcGenerateEntries</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcNrTrackedPointers</name>
- <state>1000</state>
- </option>
- <option>
- <name>GenRtcIntOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIncUnsigned</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntConversion</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclExplicit</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcIntShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcInclUnsignedShiftOverflow</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcUnhandledCase</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcDivByZero</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>GenRtcCheckPtrsNonInstrFunc</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- </configuration>
- <group>
- <name>Application</name>
- <file>
- <name>$PROJ_DIR$\Application\runWolfcryptTests.c</name>
- </file>
- </group>
- <group>
- <name>Device_Support</name>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\DeviceSupport\startup_sam.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\DeviceSupport\system_sam.c</name>
- </file>
- </group>
- <group>
- <name>Setup</name>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\BSP.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\HardFaultHandler.S</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\JLINKMEM_Process.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\OS_Error.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\RTOSInit_SAMV71_CMSIS.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_HardFaultHandler.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_RTT.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_RTT_printf.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_SYSVIEW.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_SYSVIEW_Config_embOS.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\SEGGER_SYSVIEW_embOS.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\xmtx.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\extract_trial_here\Start\BoardSupport\Atmel\SAMV71_XPlainedUltra\Setup\xmtx2.c</name>
- </file>
- </group>
- <group>
- <name>wolfcrypt_test</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\wolfcrypt\test\test.c</name>
- </file>
- </group>
-</project>
-
-
diff --git a/extra/wolfssl/wolfssl/IDE/LINUX-SGX/sgx_t_static.mk b/extra/wolfssl/wolfssl/IDE/LINUX-SGX/sgx_t_static.mk
index 5f26391b..ebb718cf 100644
--- a/extra/wolfssl/wolfssl/IDE/LINUX-SGX/sgx_t_static.mk
+++ b/extra/wolfssl/wolfssl/IDE/LINUX-SGX/sgx_t_static.mk
@@ -88,6 +88,7 @@ Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/signature.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/sp_c32.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/sp_c64.c\
+ $(WOLFSSL_ROOT)/wolfcrypt/src/sp_int.c\
$(WOLFSSL_ROOT)/src/ssl.c\
$(WOLFSSL_ROOT)/src/tls.c\
$(WOLFSSL_ROOT)/wolfcrypt/src/wc_encrypt.c\
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/README.md b/extra/wolfssl/wolfssl/IDE/MPLABX16/README.md
new file mode 100644
index 00000000..a35b6dec
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/README.md
@@ -0,0 +1,62 @@
+# wolfSSL MPLAB X Project Files for XC16
+
+This directory contains project files for the Microchip MPLAB X IDE. These
+projects have been set up to use the Microchip PIC24 Starter Kit
+and the Microchip XC16 compiler.
+
+In order to generate the necessary auto-generated MPLAB X files, make sure
+to import the wolfssl.X project into your MPLAB X workspace before trying to
+build the wolfCrypt test. This will correctly set up the respective project's
+Makefiles.
+
+## Included Project Files
+
+### wolfSSL library (wolfssl.X)
+
+This project builds a static wolfSSL library. The settings for this project are in `user_settings.h`:
+```
+<wolfssl_root>/IDE/MPLABX16/user_settings.h
+```
+
+After this project has been built, the compiled library will be located at:
+```
+<wolfssl_root>/IDE/MPLABX16/wolfssl.X/dist/default/production/wolfssl.X.a
+```
+
+### wolfCrypt Test App (wolfcrypt_test.X)
+
+This project tests the wolfCrypt cryptography modules. It is generally a good
+idea to run this first on an embedded system after compiling wolfSSL in order
+to verify all underlying crypto is working correctly. This project depends on
+files generated by Microchip's MCC tool to view the UART output. Follow the
+steps below to generate that code.
+
+## Generating MCC UART code
+
+1. Open the MPLAB Code Configurator application.
+
+2. Set the Project path to the wolfSSL/IDE/MPLABX16 and enter your PIC device
+into the interface.
+
+3. Select MCC Clasic as the content type and click `Finish`.
+
+4. Under the Device Resources section, find the UART entry and add the UART1
+peripheral.
+
+5. Note the UART settings and check the `Enable UART Interrupts` and
+`Redirect Printf to UART` boxes.
+
+6. Click the `Generate` button.
+
+
+**Note** : If using an older version of `xc16`, you may have to add the
+following to `user_settings.h`.
+```
+#define WOLFSSL_HAVE_MIN
+#define WOLFSSL_HAVE_MAX
+```
+
+## Support
+
+Please send questions or comments to support@wolfssl.com
+
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/include.am b/extra/wolfssl/wolfssl/IDE/MPLABX16/include.am
new file mode 100644
index 00000000..d7f855b1
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/include.am
@@ -0,0 +1,8 @@
+# vim:ft=automake
+# All paths should be given relative to the root
+#
+
+EXTRA_DIST += \
+ IDE/MPLABX16/README.md \
+ IDE/MPLABX16/main.c \
+ IDE/MPLABX16/user_settings.h
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/main.c b/extra/wolfssl/wolfssl/IDE/MPLABX16/main.c
new file mode 100644
index 00000000..fadad81d
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/main.c
@@ -0,0 +1,39 @@
+/* main.c
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 <stdio.h>
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfcrypt/test/test.h>
+
+#include <stdlib.h>
+
+#include "xc.h"
+#include "mcc_generated_files/mcc.h"
+
+int main(void) {
+ SYSTEM_Initialize();
+
+ wolfcrypt_test(NULL);
+
+ return 0;
+}
+
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/user_settings.h b/extra/wolfssl/wolfssl/IDE/MPLABX16/user_settings.h
new file mode 100644
index 00000000..d4754db8
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/user_settings.h
@@ -0,0 +1,414 @@
+/* Example custom user settings for wolfSSL */
+
+#ifndef WOLFSSL_USER_SETTINGS_H
+#define WOLFSSL_USER_SETTINGS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Platform */
+/* ------------------------------------------------------------------------- */
+#undef WOLFSSL_GENERAL_ALIGNMENT
+#define WOLFSSL_GENERAL_ALIGNMENT 4
+
+#undef SINGLE_THREADED
+#define SINGLE_THREADED
+
+#undef WOLFSSL_SMALL_STACK
+#define WOLFSSL_SMALL_STACK
+
+#define MICROCHIP_PIC24
+
+/* Define for older versions of xc16 */
+#if 0
+ #define WOLFSSL_HAVE_MIN
+ #define WOLFSSL_HAVE_MAX
+#endif
+
+#ifdef MICROCHIP_PIC24
+ #define SIZEOF_LONG_LONG 8
+ #define SIZEOF_LONG 4
+ #define SINGLE_THREADED
+ #define WOLFSSL_USER_IO
+ #define NO_WRITEV
+ #define NO_DEV_RANDOM
+ #define NO_FILESYSTEM
+ #define BENCH_EMBEDDED
+ #define WC_16BIT_CPU
+ #define WORD64_AVAILABLE
+ #define WOLFSSL_GENSEED_FORTEST
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Math Configuration */
+/* ------------------------------------------------------------------------- */
+#if 1
+ #undef USE_FAST_MATH
+ #define USE_FAST_MATH
+
+ #undef FP_MAX_BITS
+ #define FP_MAX_BITS 2048
+#else
+ #define WOLFSSL_SP_MATH
+ #define WOLFSSL_SP_SMALL
+ #define WOLFSSL_SP_MATH_ALL
+ #define SP_INT_BITS 256
+#endif
+
+
+#ifdef USE_FAST_MATH
+ #undef TFM_TIMING_RESISTANT
+ #define TFM_TIMING_RESISTANT
+
+ /* Optimizations */
+ //#define TFM_MIPS
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Crypto */
+/* ------------------------------------------------------------------------- */
+/* ECC */
+#if 1
+ #undef HAVE_ECC
+ #define HAVE_ECC
+
+ /* Manually define enabled curves */
+ #undef ECC_USER_CURVES
+ #define ECC_USER_CURVES
+
+ /* Reduces heap usage, but slower */
+ #undef ECC_TIMING_RESISTANT
+ #define ECC_TIMING_RESISTANT
+
+ //#define HAVE_ECC192
+ //#define HAVE_ECC224
+ //#define HAVE_ECC384
+ /* Fixed point cache (speeds repeated operations against same private key) */
+#if 1
+ #undef FP_ECC
+ #define FP_ECC
+ #ifdef FP_ECC
+ /* Bits / Entries */
+ #undef FP_ENTRIES
+ #define FP_ENTRIES 2
+ #undef FP_LUT
+ #define FP_LUT 4
+ #endif
+ /* Optional ECC calculation method */
+ /* Note: doubles heap usage, but slightly faster */
+ #undef ECC_SHAMIR
+ #define ECC_SHAMIR
+
+
+ #ifdef USE_FAST_MATH
+ /* use reduced size math buffers for ecc points */
+ #undef ALT_ECC_SIZE
+ #define ALT_ECC_SIZE
+
+ /* Enable TFM optimizations for ECC */
+ #if defined(HAVE_ECC192) || defined(HAVE_ALL_CURVES)
+ #define TFM_ECC192
+ #endif
+ #if defined(HAVE_ECC224) || defined(HAVE_ALL_CURVES)
+ #define TFM_ECC224
+ #endif
+ #if !defined(NO_ECC256) || defined(HAVE_ALL_CURVES)
+ #define TFM_ECC256
+ #endif
+ #if defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES)
+ #define TFM_ECC384
+ #endif
+ #if defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)
+ #define TFM_ECC521
+ #endif
+ #endif
+#endif
+#endif
+
+/* RSA */
+#undef NO_RSA
+#if 0
+ /* half as much memory but twice as slow */
+ #undef RSA_LOW_MEM
+#define RSA_LOW_MEM
+
+ #undef WC_RSA_PSS
+ #define WC_RSA_PSS
+
+ /* timing resistance */
+ #undef WC_RSA_BLINDING
+ #define WC_RSA_BLINDING
+#else
+ #define NO_RSA
+#endif
+
+/* AES */
+#undef NO_AES
+#if 1
+ #undef HAVE_AES_DECRYPT
+ #define HAVE_AES_DECRYPT
+
+ #undef HAVE_AESGCM
+ #define HAVE_AESGCM
+
+ /* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
+ #undef GCM_SMALL
+ #define GCM_SMALL
+
+ /* #undef HAVE_AESCCM
+ #define HAVE_AESCCM */
+
+ /* #undef WOLFSSL_AES_DIRECT
+ #define WOLFSSL_AES_DIRECT */
+
+ #undef NO_AES_CBC
+ #define NO_AES_CBC
+#else
+ #define NO_AES
+#endif
+
+/* DES3 */
+#undef NO_DES3
+#if 0
+ #undef WOLFSSL_DES_ECB
+ #define WOLFSSL_DES_ECB
+#else
+ #define NO_DES3
+#endif
+
+
+/* ChaCha20 / Poly1305 */
+#undef HAVE_CHACHA
+#undef HAVE_POLY1305
+#if 0
+ #define HAVE_CHACHA
+ #define HAVE_POLY1305
+
+ /* Needed for Poly1305 */
+ #undef HAVE_ONE_TIME_AUTH
+ #define HAVE_ONE_TIME_AUTH
+#endif
+
+/* Ed25519 / Curve25519 */
+#undef HAVE_CURVE25519
+#undef HAVE_ED25519
+#if 0
+ #define HAVE_CURVE25519
+ #define HAVE_ED25519
+
+ /* Optionally use small math (less flash usage, but much slower) */
+ #if 0
+ #define CURVED25519_SMALL
+ #endif
+#endif
+
+
+/* ------------------------------------------------------------------------- */
+/* Hashing */
+/* ------------------------------------------------------------------------- */
+/* Sha */
+#undef NO_SHA
+#if 0
+ /* 1k smaller, but 25% slower */
+ #define USE_SLOW_SHA
+#else
+ #define NO_SHA
+#endif
+
+/* Sha256 */
+#undef NO_SHA256
+#if 1
+#else
+ #define NO_SHA256
+#endif
+
+/* Sha512 */
+#undef WOLFSSL_SHA512
+#if 0
+ #define WOLFSSL_SHA512
+
+ /* Sha384 */
+ #undef WOLFSSL_SHA384
+ #if 0
+ #define WOLFSSL_SHA384
+ #endif
+
+ /* over twice as small, but 50% slower */
+ #define USE_SLOW_SHA2
+#endif
+
+
+/* ------------------------------------------------------------------------- */
+/* Benchmark / Test */
+/* ------------------------------------------------------------------------- */
+/* Use reduced benchmark / test sizes */
+#undef BENCH_EMBEDDED
+#define BENCH_EMBEDDED
+
+//#undef USE_CERT_BUFFERS_2048
+//#define USE_CERT_BUFFERS_2048
+
+#undef USE_CERT_BUFFERS_1024
+#define USE_CERT_BUFFERS_1024
+
+#undef USE_CERT_BUFFERS_256
+#define USE_CERT_BUFFERS_256
+
+
+/* ------------------------------------------------------------------------- */
+/* Time */
+/* ------------------------------------------------------------------------- */
+#if 0
+ /* Override Current Time */
+ /* Allows custom "custom_time()" function to be used for benchmark */
+ #define WOLFSSL_USER_CURRTIME
+ #define USER_TICKS
+ extern unsigned long custom_time(unsigned long* timer);
+ #define XTIME custom_time
+#else
+ //#warning Time/RTC disabled
+ #undef NO_ASN_TIME
+ #define NO_ASN_TIME
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Debugging */
+/* ------------------------------------------------------------------------- */
+#undef DEBUG_WOLFSSL
+
+#if 0
+ #define DEBUG_WOLFSSL
+ #define WOLFSSL_DEBUG_TLS
+ /* Use this to measure / print heap usage */
+ #undef USE_WOLFSSL_MEMORY
+ #define USE_WOLFSSL_MEMORY
+ #undef WOLFSSL_TRACK_MEMORY
+ #define WOLFSSL_TRACK_MEMORY
+#else
+ #undef NO_WOLFSSL_MEMORY
+ #define NO_WOLFSSL_MEMORY
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Misc */
+/* ------------------------------------------------------------------------- */
+#define WOLFSSL_ASN_TEMPLATE
+#define NO_ERROR_STRINGS
+#define NO_LARGE_HASH_TEST
+#define NO_PKCS12
+#define NO_PKCS8
+#define WOLFSSL_NO_PEM
+
+
+/* ------------------------------------------------------------------------- */
+/* Enable Features */
+/* ------------------------------------------------------------------------- */
+#undef KEEP_PEER_CERT
+#define KEEP_PEER_CERT
+
+#undef HAVE_COMP_KEY
+#define HAVE_COMP_KEY
+
+#undef WOLFSSL_TLS13
+#define WOLFSSL_TLS13
+
+#undef HAVE_HKDF
+#define HAVE_HKDF
+
+#undef HAVE_TLS_EXTENSIONS
+#define HAVE_TLS_EXTENSIONS
+
+#ifdef HAVE_ECC
+#undef HAVE_SUPPORTED_CURVES
+#define HAVE_SUPPORTED_CURVES
+#endif
+
+#undef WOLFSSL_BASE64_ENCODE
+#define WOLFSSL_BASE64_ENCODE
+
+/* TLS Session Cache */
+#if 0
+ #define SMALL_SESSION_CACHE
+#else
+ #define NO_SESSION_CACHE
+#endif
+
+
+/* ------------------------------------------------------------------------- */
+/* Disable Features */
+/* ------------------------------------------------------------------------- */
+#undef NO_WOLFSSL_SERVER
+//#define NO_WOLFSSL_SERVER
+
+#undef NO_WOLFSSL_CLIENT
+#define NO_WOLFSSL_CLIENT
+
+#undef NO_CRYPT_TEST
+//#define NO_CRYPT_TEST
+
+#undef NO_CRYPT_BENCHMARK
+//#define NO_CRYPT_BENCHMARK
+
+/* In-lining of misc.c functions */
+/* If defined, must include wolfcrypt/src/misc.c in build */
+/* Slower, but about 1k smaller */
+#undef NO_INLINE
+#define NO_INLINE
+
+#undef NO_FILESYSTEM
+#define NO_FILESYSTEM
+
+#undef NO_WRITEV
+#define NO_WRITEV
+
+#undef NO_MAIN_DRIVER
+#define NO_MAIN_DRIVER
+
+#undef NO_DEV_RANDOM
+#define NO_DEV_RANDOM
+
+#undef NO_PSK
+#define NO_PSK
+
+#undef NO_DSA
+#define NO_DSA
+
+#undef NO_DH
+#define NO_DH
+
+#undef NO_RC4
+#define NO_RC4
+
+#undef NO_OLD_TLS
+#define NO_OLD_TLS
+
+#undef WOLFSSL_NO_TLS12
+#define WOLFSSL_NO_TLS12
+
+#undef NO_PSK
+//#define NO_PSK
+#define WOLFSSL_STATIC_PSK
+
+#undef NO_MD4
+#define NO_MD4
+
+#undef NO_PWDBASED
+#define NO_PWDBASED
+
+#undef NO_MD5
+#define NO_MD5
+
+#undef NO_DES3
+#define NO_DES3
+
+#undef NO_CODING
+//#define NO_CODING
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WOLFSSL_USER_SETTINGS_H */
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/Makefile b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/Makefile
new file mode 100644
index 00000000..fca8e2cc
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/Makefile
@@ -0,0 +1,113 @@
+#
+# There exist several targets which are by default empty and which can be
+# used for execution of your targets. These targets are usually executed
+# before and after some main targets. They are:
+#
+# .build-pre: called before 'build' target
+# .build-post: called after 'build' target
+# .clean-pre: called before 'clean' target
+# .clean-post: called after 'clean' target
+# .clobber-pre: called before 'clobber' target
+# .clobber-post: called after 'clobber' target
+# .all-pre: called before 'all' target
+# .all-post: called after 'all' target
+# .help-pre: called before 'help' target
+# .help-post: called after 'help' target
+#
+# Targets beginning with '.' are not intended to be called on their own.
+#
+# Main targets can be executed directly, and they are:
+#
+# build build a specific configuration
+# clean remove built files from a configuration
+# clobber remove all built files
+# all build all configurations
+# help print help mesage
+#
+# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+# .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+# Available make variables:
+#
+# CND_BASEDIR base directory for relative paths
+# CND_DISTDIR default top distribution directory (build artifacts)
+# CND_BUILDDIR default top build directory (object files, ...)
+# CONF name of current configuration
+# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
+# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
+# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
+# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
+# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
+# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
+#
+# NOCDDL
+
+
+# Environment
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post: .build-impl
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+# WARNING: the IDE does not call this target since it takes a long time to
+# simply run make. Instead, the IDE removes the configuration directories
+# under build and dist directly without calling make.
+# This target is left here so people can do a clean when running a clean
+# outside the IDE.
+
+.clean-post: .clean-impl
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post: .clobber-impl
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post: .all-impl
+# Add your post 'all' code here...
+
+
+# help
+help: .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post: .help-impl
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
+
+# include project make variables
+include nbproject/Makefile-variables.mk
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/configurations.xml b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/configurations.xml
new file mode 100755
index 00000000..fe95c871
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/configurations.xml
@@ -0,0 +1,285 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configurationDescriptor version="65">
+ <logicalFolder name="root" displayName="root" projectFiles="true">
+ <logicalFolder name="HeaderFiles"
+ displayName="Header Files"
+ projectFiles="true">
+ <itemPath>../user_settings.h</itemPath>
+ </logicalFolder>
+ <logicalFolder name="LinkerScript"
+ displayName="Linker Files"
+ projectFiles="true">
+ </logicalFolder>
+ <logicalFolder name="SourceFiles"
+ displayName="Source Files"
+ projectFiles="true">
+ <logicalFolder name="f1" displayName="mcc_generated_files" projectFiles="true">
+ <itemPath>../mcc_generated_files/clock.c</itemPath>
+ <itemPath>../mcc_generated_files/interrupt_manager.c</itemPath>
+ <itemPath>../mcc_generated_files/mcc.c</itemPath>
+ <itemPath>../mcc_generated_files/pin_manager.c</itemPath>
+ <itemPath>../mcc_generated_files/system.c</itemPath>
+ <itemPath>../mcc_generated_files/traps.c</itemPath>
+ <itemPath>../mcc_generated_files/uart1.c</itemPath>
+ </logicalFolder>
+ <itemPath>../../../wolfcrypt/test/test.c</itemPath>
+ <itemPath>../main.c</itemPath>
+ </logicalFolder>
+ <logicalFolder name="ExternalFiles"
+ displayName="Important Files"
+ projectFiles="false">
+ <itemPath>Makefile</itemPath>
+ </logicalFolder>
+ </logicalFolder>
+ <sourceRootList>
+ <Elem>..</Elem>
+ <Elem>../../wolfcrypt/test</Elem>
+ <Elem>../../../wolfcrypt/test</Elem>
+ </sourceRootList>
+ <projectmakefile>Makefile</projectmakefile>
+ <confs>
+ <conf name="default" type="2">
+ <toolsSet>
+ <developmentServer>localhost</developmentServer>
+ <targetDevice>PIC24FJ1024GB610</targetDevice>
+ <targetHeader></targetHeader>
+ <targetPluginBoard></targetPluginBoard>
+ <platformTool>PKOBSKDEPlatformTool</platformTool>
+ <languageToolchain>XC16</languageToolchain>
+ <languageToolchainVersion>2.10</languageToolchainVersion>
+ <platform>4</platform>
+ </toolsSet>
+ <packs>
+ <pack name="PIC24F-GA-GB_DFP" vendor="Microchip" version="1.4.141"/>
+ </packs>
+ <ScriptingSettings>
+ </ScriptingSettings>
+ <compileType>
+ <linkerTool>
+ <linkerLibItems>
+ <linkerLibProjectItem>
+ <makeArtifact PL="../wolfssl.X"
+ CT="3"
+ CN="default"
+ AC="true"
+ BL="true"
+ WD="../wolfssl.X"
+ BC="${MAKE} -f Makefile CONF=default"
+ DBC="${MAKE} -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
+ CC="rm -rf &quot;build/default&quot; &quot;dist/default&quot;"
+ OP="dist/default/production/wolfssl.X.a"
+ DOP="dist/default/debug/wolfssl.X.a"
+ FL="dist/default/production/wolfssl.X.a"
+ PD="dist/default/production/wolfssl.X."
+ DD="dist/default/debug/wolfssl.X.">
+ </makeArtifact>
+ </linkerLibProjectItem>
+ </linkerLibItems>
+ </linkerTool>
+ <archiverTool>
+ </archiverTool>
+ <loading>
+ <useAlternateLoadableFile>false</useAlternateLoadableFile>
+ <parseOnProdLoad>true</parseOnProdLoad>
+ <alternateLoadableFile></alternateLoadableFile>
+ </loading>
+ <subordinates>
+ </subordinates>
+ </compileType>
+ <makeCustomizationType>
+ <makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
+ <makeUseCleanTarget>false</makeUseCleanTarget>
+ <makeCustomizationPreStep></makeCustomizationPreStep>
+ <makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
+ <makeCustomizationPostStep></makeCustomizationPostStep>
+ <makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
+ <makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
+ <makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
+ </makeCustomizationType>
+ <C30>
+ <property key="code-model" value="large-code"/>
+ <property key="const-model" value="default"/>
+ <property key="data-model" value="default"/>
+ <property key="disable-instruction-scheduling" value="false"/>
+ <property key="enable-all-warnings" value="true"/>
+ <property key="enable-ansi-std" value="false"/>
+ <property key="enable-ansi-warnings" value="false"/>
+ <property key="enable-fatal-warnings" value="false"/>
+ <property key="enable-large-arrays" value="false"/>
+ <property key="enable-omit-frame-pointer" value="false"/>
+ <property key="enable-procedural-abstraction" value="false"/>
+ <property key="enable-short-double" value="false"/>
+ <property key="enable-symbols" value="true"/>
+ <property key="enable-unroll-loops" value="false"/>
+ <property key="expand-pragma-config" value="false"/>
+ <property key="extra-include-directories" value="../;../../.."/>
+ <property key="isolate-each-function" value="false"/>
+ <property key="keep-inline" value="false"/>
+ <property key="oXC16gcc-align-arr" value="false"/>
+ <property key="oXC16gcc-cnsts-mauxflash" value="false"/>
+ <property key="oXC16gcc-data-sects" value="false"/>
+ <property key="oXC16gcc-errata" value=""/>
+ <property key="oXC16gcc-fillupper" value=""/>
+ <property key="oXC16gcc-large-aggregate" value="false"/>
+ <property key="oXC16gcc-mauxflash" value="false"/>
+ <property key="oXC16gcc-mpa-lvl" value=""/>
+ <property key="oXC16gcc-name-text-sec" value=""/>
+ <property key="oXC16gcc-near-chars" value="false"/>
+ <property key="oXC16gcc-no-isr-warn" value="false"/>
+ <property key="oXC16gcc-sfr-warn" value="false"/>
+ <property key="oXC16gcc-smar-io-lvl" value="1"/>
+ <property key="oXC16gcc-smart-io-fmt" value=""/>
+ <property key="optimization-level" value="2"/>
+ <property key="post-instruction-scheduling" value="default"/>
+ <property key="pre-instruction-scheduling" value="default"/>
+ <property key="preprocessor-macros" value="WOLFSSL_USER_SETTINGS"/>
+ <property key="scalar-model" value="default"/>
+ <property key="use-cci" value="false"/>
+ <property key="use-iar" value="false"/>
+ </C30>
+ <C30-AR>
+ <property key="additional-options-chop-files" value="false"/>
+ </C30-AR>
+ <C30-AS>
+ <property key="assembler-symbols" value=""/>
+ <property key="expand-macros" value="false"/>
+ <property key="extra-include-directories-for-assembler" value=""/>
+ <property key="extra-include-directories-for-preprocessor" value=""/>
+ <property key="false-conditionals" value="false"/>
+ <property key="keep-locals" value="false"/>
+ <property key="list-assembly" value="false"/>
+ <property key="list-section-info" value="false"/>
+ <property key="list-source" value="false"/>
+ <property key="list-symbols" value="false"/>
+ <property key="oXC16asm-extra-opts" value=""/>
+ <property key="oXC16asm-list-to-file" value="false"/>
+ <property key="omit-debug-dirs" value="false"/>
+ <property key="omit-forms" value="false"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="relax" value="false"/>
+ <property key="warning-level" value="emit-warnings"/>
+ </C30-AS>
+ <C30-CO>
+ <property key="coverage-enable" value=""/>
+ <property key="stack-guidance" value="false"/>
+ </C30-CO>
+ <C30-LD>
+ <property key="additional-options-use-response-files" value="false"/>
+ <property key="boot-eeprom" value="no_eeprom"/>
+ <property key="boot-flash" value="no_flash"/>
+ <property key="boot-ram" value="no_ram"/>
+ <property key="boot-write-protect" value="no_write_protect"/>
+ <property key="enable-check-sections" value="true"/>
+ <property key="enable-data-init" value="true"/>
+ <property key="enable-default-isr" value="true"/>
+ <property key="enable-handles" value="true"/>
+ <property key="enable-pack-data" value="true"/>
+ <property key="extra-lib-directories" value=""/>
+ <property key="fill-flash-options-addr" value=""/>
+ <property key="fill-flash-options-const" value=""/>
+ <property key="fill-flash-options-how" value="0"/>
+ <property key="fill-flash-options-inc-const" value="1"/>
+ <property key="fill-flash-options-increment" value=""/>
+ <property key="fill-flash-options-seq" value=""/>
+ <property key="fill-flash-options-what" value="0"/>
+ <property key="general-code-protect" value="no_code_protect"/>
+ <property key="general-write-protect" value="no_write_protect"/>
+ <property key="generate-cross-reference-file" value="false"/>
+ <property key="heap-size" value=""/>
+ <property key="input-libraries" value=""/>
+ <property key="linker-stack" value="true"/>
+ <property key="linker-symbols" value=""/>
+ <property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>
+ <property key="no-ivt" value="false"/>
+ <property key="oXC16ld-extra-opts" value=""/>
+ <property key="oXC16ld-fill-upper" value="0"/>
+ <property key="oXC16ld-force-link" value="false"/>
+ <property key="oXC16ld-no-smart-io" value="false"/>
+ <property key="oXC16ld-nostdlib" value="false"/>
+ <property key="oXC16ld-stackguard" value="16"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="remove-unused-sections" value="true"/>
+ <property key="report-memory-usage" value="true"/>
+ <property key="secure-eeprom" value="no_eeprom"/>
+ <property key="secure-flash" value="no_flash"/>
+ <property key="secure-ram" value="no_ram"/>
+ <property key="secure-write-protect" value="no_write_protect"/>
+ <property key="stack-size" value="16"/>
+ <property key="symbol-stripping" value=""/>
+ <property key="trace-symbols" value=""/>
+ <property key="warn-section-align" value="false"/>
+ </C30-LD>
+ <C30Global>
+ <property key="common-include-directories" value=""/>
+ <property key="dual-boot-partition" value="0"/>
+ <property key="fast-math" value="false"/>
+ <property key="generic-16-bit" value="false"/>
+ <property key="legacy-libc" value="true"/>
+ <property key="mpreserve-all" value="false"/>
+ <property key="oXC16glb-macros" value=""/>
+ <property key="omit-pack-options" value="1"/>
+ <property key="output-file-format" value="elf"/>
+ <property key="preserve-all" value="false"/>
+ <property key="preserve-file" value=""/>
+ <property key="relaxed-math" value="false"/>
+ <property key="save-temps" value="false"/>
+ </C30Global>
+ <PKOBSKDEPlatformTool>
+ <property key="AutoSelectMemRanges" value="auto"/>
+ <property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
+ <property key="ToolFirmwareFilePath"
+ value="Press to browse for a specific firmware version"/>
+ <property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
+ <property key="memories.configurationmemory" value="true"/>
+ <property key="memories.dataflash" value="true"/>
+ <property key="memories.eeprom" value="true"/>
+ <property key="memories.id" value="true"/>
+ <property key="memories.programmemory" value="true"/>
+ <property key="memories.programmemory.ranges" value="1d000000-1d07ffff"/>
+ <property key="memories.userotp" value="true"/>
+ <property key="programoptions.donoteraseauxmem" value="false"/>
+ <property key="programoptions.eraseb4program" value="true"/>
+ <property key="programoptions.preservedataflash" value="false"/>
+ <property key="programoptions.preservedataflash.ranges" value=""/>
+ <property key="programoptions.preserveeeprom" value="false"/>
+ <property key="programoptions.preserveeeprom.ranges"
+ value="${memories.eedata.default}"/>
+ <property key="programoptions.preserveprogram.ranges" value=""/>
+ <property key="programoptions.preserveprogramrange" value="false"/>
+ <property key="programoptions.usehighvoltageonmclr" value="false"/>
+ <property key="programoptions.uselvpprogramming" value="false"/>
+ </PKOBSKDEPlatformTool>
+ <Tool>
+ <property key="AutoSelectMemRanges" value="auto"/>
+ <property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
+ <property key="ToolFirmwareFilePath"
+ value="Press to browse for a specific firmware version"/>
+ <property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
+ <property key="memories.configurationmemory" value="true"/>
+ <property key="memories.dataflash" value="true"/>
+ <property key="memories.eeprom" value="true"/>
+ <property key="memories.id" value="true"/>
+ <property key="memories.programmemory" value="true"/>
+ <property key="memories.programmemory.end" value="0x1d07ffff"/>
+ <property key="memories.programmemory.ranges" value="1d000000-1d07ffff"/>
+ <property key="memories.programmemory.start" value="0x1d000000"/>
+ <property key="memories.userotp" value="true"/>
+ <property key="poweroptions.powerenable" value="false"/>
+ <property key="programoptions.donoteraseauxmem" value="false"/>
+ <property key="programoptions.eraseb4program" value="true"/>
+ <property key="programoptions.preservedataflash" value="false"/>
+ <property key="programoptions.preservedataflash.ranges" value=""/>
+ <property key="programoptions.preserveeeprom" value="false"/>
+ <property key="programoptions.preserveeeprom.ranges"
+ value="${memories.eedata.default}"/>
+ <property key="programoptions.preserveprogram.ranges" value=""/>
+ <property key="programoptions.preserveprogramrange" value="false"/>
+ <property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
+ <property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
+ <property key="programoptions.usehighvoltageonmclr" value="false"/>
+ <property key="programoptions.uselvpprogramming" value="false"/>
+ <property key="voltagevalue" value="3.25"/>
+ </Tool>
+ </conf>
+ </confs>
+</configurationDescriptor>
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/include.am b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/include.am
new file mode 100644
index 00000000..ab8cb715
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/include.am
@@ -0,0 +1,8 @@
+j vim:ft=automake
+# All paths should be given relative to the root
+#
+
+EXTRA_DIST += \
+ IDE/MPLABX16/wolfcrypt_test.X/nbproject/configurations.xml \
+ IDE/MPLABX16/wolfcrypt_test.X/nbproject/project.xml
+
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/configurations.xml b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/configurations.xml
new file mode 100644
index 00000000..ba95e245
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/configurations.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configurationDescriptor version="65">
+ <projectmakefile>Makefile</projectmakefile>
+ <defaultConf>0</defaultConf>
+ <confs>
+ <conf name="default" type="2">
+ <platformToolSN></platformToolSN>
+ <languageToolchainDir>/Applications/microchip/xc16/v2.10/bin</languageToolchainDir>
+ <mdbdebugger version="1">
+ <placeholder1>place holder 1</placeholder1>
+ <placeholder2>place holder 2</placeholder2>
+ </mdbdebugger>
+ <runprofile version="6">
+ <args></args>
+ <rundir></rundir>
+ <buildfirst>true</buildfirst>
+ <console-type>0</console-type>
+ <terminal-type>0</terminal-type>
+ <remove-instrumentation>0</remove-instrumentation>
+ <environment>
+ </environment>
+ </runprofile>
+ </conf>
+ </confs>
+</configurationDescriptor>
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/private.xml b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/private.xml
new file mode 100644
index 00000000..6807a2ba
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/private/private.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
+ <group/>
+ </open-files>
+</project-private>
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/project.xml b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/project.xml
new file mode 100755
index 00000000..358f3c77
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfcrypt_test.X/nbproject/project.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>com.microchip.mplab.nbide.embedded.makeproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/make-project/1">
+ <name>wolfcrypt_test</name>
+ <creation-uuid>b34c4937-7042-4352-88b1-7717bcdf8aeb</creation-uuid>
+ <make-project-type>0</make-project-type>
+ <c-extensions>c</c-extensions>
+ <cpp-extensions/>
+ <header-extensions>h</header-extensions>
+ <sourceEncoding>ISO-8859-1</sourceEncoding>
+ <asminc-extensions/>
+ <make-dep-projects>
+ <make-dep-project>../wolfssl.X</make-dep-project>
+ </make-dep-projects>
+ <sourceRootList>
+ <sourceRootElem>..</sourceRootElem>
+ <sourceRootElem>../../wolfcrypt/test</sourceRootElem>
+ <sourceRootElem>../../../wolfcrypt/test</sourceRootElem>
+ </sourceRootList>
+ <confList>
+ <confElem>
+ <name>default</name>
+ <type>2</type>
+ </confElem>
+ </confList>
+ <formatting>
+ <project-formatting-style>false</project-formatting-style>
+ </formatting>
+ </data>
+ </configuration>
+</project>
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/Makefile b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/Makefile
new file mode 100644
index 00000000..fca8e2cc
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/Makefile
@@ -0,0 +1,113 @@
+#
+# There exist several targets which are by default empty and which can be
+# used for execution of your targets. These targets are usually executed
+# before and after some main targets. They are:
+#
+# .build-pre: called before 'build' target
+# .build-post: called after 'build' target
+# .clean-pre: called before 'clean' target
+# .clean-post: called after 'clean' target
+# .clobber-pre: called before 'clobber' target
+# .clobber-post: called after 'clobber' target
+# .all-pre: called before 'all' target
+# .all-post: called after 'all' target
+# .help-pre: called before 'help' target
+# .help-post: called after 'help' target
+#
+# Targets beginning with '.' are not intended to be called on their own.
+#
+# Main targets can be executed directly, and they are:
+#
+# build build a specific configuration
+# clean remove built files from a configuration
+# clobber remove all built files
+# all build all configurations
+# help print help mesage
+#
+# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+# .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+# Available make variables:
+#
+# CND_BASEDIR base directory for relative paths
+# CND_DISTDIR default top distribution directory (build artifacts)
+# CND_BUILDDIR default top build directory (object files, ...)
+# CONF name of current configuration
+# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
+# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
+# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
+# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
+# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
+# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
+#
+# NOCDDL
+
+
+# Environment
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post: .build-impl
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+# WARNING: the IDE does not call this target since it takes a long time to
+# simply run make. Instead, the IDE removes the configuration directories
+# under build and dist directly without calling make.
+# This target is left here so people can do a clean when running a clean
+# outside the IDE.
+
+.clean-post: .clean-impl
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post: .clobber-impl
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post: .all-impl
+# Add your post 'all' code here...
+
+
+# help
+help: .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post: .help-impl
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
+
+# include project make variables
+include nbproject/Makefile-variables.mk
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/configurations.xml b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/configurations.xml
new file mode 100644
index 00000000..bd423ae2
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/configurations.xml
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configurationDescriptor version="65">
+ <logicalFolder name="root" displayName="root" projectFiles="true">
+ <logicalFolder name="HeaderFiles"
+ displayName="Header Files"
+ projectFiles="true">
+ <itemPath>../user_settings.h</itemPath>
+ </logicalFolder>
+ <logicalFolder name="LinkerScript"
+ displayName="Linker Files"
+ projectFiles="true">
+ </logicalFolder>
+ <logicalFolder name="SourceFiles"
+ displayName="Source Files"
+ projectFiles="true">
+ <logicalFolder name="f2" displayName="wolfcrypt" projectFiles="true">
+ <itemPath>../../../wolfcrypt/src/aes.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/arc4.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/asm.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/asn.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/blake2b.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/blake2s.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/camellia.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/chacha.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/chacha20_poly1305.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/cmac.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/coding.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/compress.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/cpuid.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/cryptocb.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/curve25519.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/curve448.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/des3.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/dh.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/dilithium.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/dsa.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ecc.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ecc_fp.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/eccsi.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ed25519.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ed448.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/error.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/evp.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ext_kyber.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/falcon.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/fe_448.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/fe_low_mem.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/fe_operations.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ge_448.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ge_low_mem.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ge_operations.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/hash.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/hmac.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/hpke.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/integer.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/kdf.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/logging.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/md2.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/md4.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/md5.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/memory.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/misc.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/pkcs12.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/pkcs7.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/poly1305.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/pwdbased.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/random.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/rc2.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/ripemd.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/rsa.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sakke.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sha.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sha256.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sha3.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sha512.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/signature.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/siphash.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sp_arm32.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sp_arm64.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sp_armthumb.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sp_c32.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sp_c64.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sp_int.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/sphincs.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/srp.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/tfm.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/wc_encrypt.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/wc_pkcs11.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/wc_port.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/wolfevent.c</itemPath>
+ <itemPath>../../../wolfcrypt/src/wolfmath.c</itemPath>
+ </logicalFolder>
+ <logicalFolder name="f1" displayName="wolfssl" projectFiles="true">
+ <itemPath>../../../src/crl.c</itemPath>
+ <itemPath>../../../src/internal.c</itemPath>
+ <itemPath>../../../src/keys.c</itemPath>
+ <itemPath>../../../src/ssl.c</itemPath>
+ <itemPath>../../../src/tls.c</itemPath>
+ <itemPath>../../../src/tls13.c</itemPath>
+ <itemPath>../../../src/wolfio.c</itemPath>
+ </logicalFolder>
+ </logicalFolder>
+ <logicalFolder name="ExternalFiles"
+ displayName="Important Files"
+ projectFiles="false">
+ <itemPath>Makefile</itemPath>
+ </logicalFolder>
+ </logicalFolder>
+ <sourceRootList>
+ <Elem>..</Elem>
+ <Elem>../../src</Elem>
+ <Elem>../../wolfcrypt/src</Elem>
+ <Elem>../../wolfcrypt/test</Elem>
+ <Elem>../../../src</Elem>
+ <Elem>../../../wolfcrypt/src</Elem>
+ </sourceRootList>
+ <projectmakefile>Makefile</projectmakefile>
+ <confs>
+ <conf name="default" type="3">
+ <toolsSet>
+ <developmentServer>localhost</developmentServer>
+ <targetDevice>PIC24FJ1024GB610</targetDevice>
+ <targetHeader></targetHeader>
+ <targetPluginBoard></targetPluginBoard>
+ <platformTool>noID</platformTool>
+ <languageToolchain>XC16</languageToolchain>
+ <languageToolchainVersion>2.10</languageToolchainVersion>
+ <platform>4</platform>
+ </toolsSet>
+ <packs>
+ <pack name="PIC24F-GA-GB_DFP" vendor="Microchip" version="1.4.141"/>
+ </packs>
+ <ScriptingSettings>
+ </ScriptingSettings>
+ <compileType>
+ <linkerTool>
+ <linkerLibItems>
+ </linkerLibItems>
+ </linkerTool>
+ <archiverTool>
+ </archiverTool>
+ <loading>
+ <useAlternateLoadableFile>false</useAlternateLoadableFile>
+ <parseOnProdLoad>false</parseOnProdLoad>
+ <alternateLoadableFile></alternateLoadableFile>
+ </loading>
+ <subordinates>
+ </subordinates>
+ </compileType>
+ <makeCustomizationType>
+ <makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
+ <makeUseCleanTarget>false</makeUseCleanTarget>
+ <makeCustomizationPreStep></makeCustomizationPreStep>
+ <makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
+ <makeCustomizationPostStep></makeCustomizationPostStep>
+ <makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
+ <makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
+ <makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
+ </makeCustomizationType>
+ <C30>
+ <property key="code-model" value="large-code"/>
+ <property key="const-model" value="default"/>
+ <property key="data-model" value="default"/>
+ <property key="disable-instruction-scheduling" value="false"/>
+ <property key="enable-all-warnings" value="true"/>
+ <property key="enable-ansi-std" value="false"/>
+ <property key="enable-ansi-warnings" value="false"/>
+ <property key="enable-fatal-warnings" value="false"/>
+ <property key="enable-large-arrays" value="false"/>
+ <property key="enable-omit-frame-pointer" value="false"/>
+ <property key="enable-procedural-abstraction" value="false"/>
+ <property key="enable-short-double" value="false"/>
+ <property key="enable-symbols" value="true"/>
+ <property key="enable-unroll-loops" value="false"/>
+ <property key="expand-pragma-config" value="false"/>
+ <property key="extra-include-directories" value="../../;../"/>
+ <property key="isolate-each-function" value="false"/>
+ <property key="keep-inline" value="false"/>
+ <property key="oXC16gcc-align-arr" value="false"/>
+ <property key="oXC16gcc-cnsts-mauxflash" value="false"/>
+ <property key="oXC16gcc-data-sects" value="false"/>
+ <property key="oXC16gcc-errata" value=""/>
+ <property key="oXC16gcc-fillupper" value=""/>
+ <property key="oXC16gcc-large-aggregate" value="false"/>
+ <property key="oXC16gcc-mauxflash" value="false"/>
+ <property key="oXC16gcc-mpa-lvl" value=""/>
+ <property key="oXC16gcc-name-text-sec" value=""/>
+ <property key="oXC16gcc-near-chars" value="false"/>
+ <property key="oXC16gcc-no-isr-warn" value="false"/>
+ <property key="oXC16gcc-sfr-warn" value="false"/>
+ <property key="oXC16gcc-smar-io-lvl" value="1"/>
+ <property key="oXC16gcc-smart-io-fmt" value=""/>
+ <property key="optimization-level" value="2"/>
+ <property key="post-instruction-scheduling" value="default"/>
+ <property key="pre-instruction-scheduling" value="default"/>
+ <property key="preprocessor-macros" value="WOLFSSL_USER_SETTINGS"/>
+ <property key="scalar-model" value="default"/>
+ <property key="use-cci" value="false"/>
+ <property key="use-iar" value="false"/>
+ </C30>
+ <C30-AR>
+ <property key="additional-options-chop-files" value="false"/>
+ </C30-AR>
+ <C30-AS>
+ <property key="assembler-symbols" value=""/>
+ <property key="expand-macros" value="false"/>
+ <property key="extra-include-directories-for-assembler" value=""/>
+ <property key="extra-include-directories-for-preprocessor" value=""/>
+ <property key="false-conditionals" value="false"/>
+ <property key="keep-locals" value="false"/>
+ <property key="list-assembly" value="false"/>
+ <property key="list-section-info" value="false"/>
+ <property key="list-source" value="false"/>
+ <property key="list-symbols" value="false"/>
+ <property key="oXC16asm-extra-opts" value=""/>
+ <property key="oXC16asm-list-to-file" value="false"/>
+ <property key="omit-debug-dirs" value="false"/>
+ <property key="omit-forms" value="false"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="relax" value="false"/>
+ <property key="warning-level" value="emit-warnings"/>
+ </C30-AS>
+ <C30-CO>
+ <property key="coverage-enable" value=""/>
+ <property key="stack-guidance" value="true"/>
+ </C30-CO>
+ <C30-LD>
+ <property key="additional-options-use-response-files" value="false"/>
+ <property key="boot-eeprom" value="no_eeprom"/>
+ <property key="boot-flash" value="no_flash"/>
+ <property key="boot-ram" value="no_ram"/>
+ <property key="boot-write-protect" value="no_write_protect"/>
+ <property key="enable-check-sections" value="false"/>
+ <property key="enable-data-init" value="true"/>
+ <property key="enable-default-isr" value="true"/>
+ <property key="enable-handles" value="true"/>
+ <property key="enable-pack-data" value="true"/>
+ <property key="extra-lib-directories" value=""/>
+ <property key="fill-flash-options-addr" value=""/>
+ <property key="fill-flash-options-const" value=""/>
+ <property key="fill-flash-options-how" value="0"/>
+ <property key="fill-flash-options-inc-const" value="1"/>
+ <property key="fill-flash-options-increment" value=""/>
+ <property key="fill-flash-options-seq" value=""/>
+ <property key="fill-flash-options-what" value="0"/>
+ <property key="general-code-protect" value="no_code_protect"/>
+ <property key="general-write-protect" value="no_write_protect"/>
+ <property key="generate-cross-reference-file" value="false"/>
+ <property key="heap-size" value=""/>
+ <property key="input-libraries" value=""/>
+ <property key="linker-stack" value="true"/>
+ <property key="linker-symbols" value=""/>
+ <property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>
+ <property key="no-ivt" value="false"/>
+ <property key="oXC16ld-extra-opts" value=""/>
+ <property key="oXC16ld-fill-upper" value="0"/>
+ <property key="oXC16ld-force-link" value="false"/>
+ <property key="oXC16ld-no-smart-io" value="false"/>
+ <property key="oXC16ld-nostdlib" value="false"/>
+ <property key="oXC16ld-stackguard" value="16"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="remove-unused-sections" value="false"/>
+ <property key="report-memory-usage" value="true"/>
+ <property key="secure-eeprom" value="no_eeprom"/>
+ <property key="secure-flash" value="no_flash"/>
+ <property key="secure-ram" value="no_ram"/>
+ <property key="secure-write-protect" value="no_write_protect"/>
+ <property key="stack-size" value="16"/>
+ <property key="symbol-stripping" value=""/>
+ <property key="trace-symbols" value=""/>
+ <property key="warn-section-align" value="false"/>
+ </C30-LD>
+ <C30Global>
+ <property key="common-include-directories" value="../../.."/>
+ <property key="dual-boot-partition" value="0"/>
+ <property key="fast-math" value="false"/>
+ <property key="generic-16-bit" value="false"/>
+ <property key="legacy-libc" value="true"/>
+ <property key="mpreserve-all" value="false"/>
+ <property key="oXC16glb-macros" value=""/>
+ <property key="omit-pack-options" value="1"/>
+ <property key="output-file-format" value="elf"/>
+ <property key="preserve-all" value="false"/>
+ <property key="preserve-file" value=""/>
+ <property key="relaxed-math" value="false"/>
+ <property key="save-temps" value="false"/>
+ </C30Global>
+ </conf>
+ </confs>
+</configurationDescriptor>
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/include.am b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/include.am
new file mode 100644
index 00000000..14d44b06
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/include.am
@@ -0,0 +1,7 @@
+# vim:ft=automake
+# All paths should be given relative to the root
+#
+
+EXTRA_DIST += \
+ IDE/MPLABX16/wolfssl.X/nbproject/configurations.xml \
+ IDE/MPLABX16/wolfssl.X/nbproject/project.xml
diff --git a/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/project.xml b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/project.xml
new file mode 100644
index 00000000..1fb81b58
--- /dev/null
+++ b/extra/wolfssl/wolfssl/IDE/MPLABX16/wolfssl.X/nbproject/project.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>com.microchip.mplab.nbide.embedded.makeproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/make-project/1">
+ <name>wolfssl</name>
+ <creation-uuid>93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b</creation-uuid>
+ <make-project-type>0</make-project-type>
+ <c-extensions>c</c-extensions>
+ <cpp-extensions/>
+ <header-extensions>h</header-extensions>
+ <sourceEncoding>ISO-8859-1</sourceEncoding>
+ <asminc-extensions/>
+ <make-dep-projects/>
+ <sourceRootList>
+ <sourceRootElem>..</sourceRootElem>
+ <sourceRootElem>../../src</sourceRootElem>
+ <sourceRootElem>../../wolfcrypt/src</sourceRootElem>
+ <sourceRootElem>../../wolfcrypt/test</sourceRootElem>
+ <sourceRootElem>../../../src</sourceRootElem>
+ <sourceRootElem>../../../wolfcrypt/src</sourceRootElem>
+ </sourceRootList>
+ <confList>
+ <confElem>
+ <name>default</name>
+ <type>3</type>
+ </confElem>
+ </confList>
+ <formatting>
+ <project-formatting-style>false</project-formatting-style>
+ </formatting>
+ </data>
+ </configuration>
+</project>
diff --git a/extra/wolfssl/wolfssl/IDE/MSVS-2019-AZSPHERE/shared/util.h b/extra/wolfssl/wolfssl/IDE/MSVS-2019-AZSPHERE/shared/util.h
index 005676f4..fc54a709 100644
--- a/extra/wolfssl/wolfssl/IDE/MSVS-2019-AZSPHERE/shared/util.h
+++ b/extra/wolfssl/wolfssl/IDE/MSVS-2019-AZSPHERE/shared/util.h
@@ -26,6 +26,7 @@
#include <wolfssl/ssl.h>
#include <ifaddrs.h>
#include <applibs/log.h>
+#include <netdb.h>
#define _GNU_SOURCE /* defines NI_NUMERICHOST */
#ifndef NI_MAXHOST
diff --git a/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h b/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h
index 4263164e..48541531 100644
--- a/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h
+++ b/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h
@@ -115,4 +115,5 @@
#endif
#define CUSTOM_RAND_GENERATE_BLOCK wc_fspsm_GenerateRandBlock
-
+/* use original asn parsing */
+#define WOLFSSL_ASN_ORIGINAL
diff --git a/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/test/.cproject b/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/test/.cproject
index 61375953..e7bb1ceb 100644
--- a/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/test/.cproject
+++ b/extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RA6M4/test/.cproject
@@ -94,7 +94,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/api}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/instances}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_port}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/FreeRTOS/FreeRTOS/Source/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/freertos_kernel/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/arm/CMSIS_5/CMSIS/Core/Include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra_gen}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg/bsp}&quot;"/>
@@ -103,7 +103,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/FreeRTOS/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_plus_tcp}&quot;"/>
</option>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1484044149" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
diff --git a/extra/wolfssl/wolfssl/IDE/STM32Cube/STM32_Benchmarks.md b/extra/wolfssl/wolfssl/IDE/STM32Cube/STM32_Benchmarks.md
index 129cbdd4..674ddaba 100644
--- a/extra/wolfssl/wolfssl/IDE/STM32Cube/STM32_Benchmarks.md
+++ b/extra/wolfssl/wolfssl/IDE/STM32Cube/STM32_Benchmarks.md
@@ -59,6 +59,81 @@ Benchmark complete
Benchmark Test: Return code 0
```
+### STM32H753ZI (-O2, Thumb2 ARM ASM, SP-ASM Cortex M small)
+
+Enable CPU I-Cache and D-Cache by calling:
+
+```c
+SCB_EnableICache();
+SCB_EnableDCache();
+```
+
+Build options for ARM ASM:
+
+```c
+#define WOLFSSL_ARMASM
+#define WOLFSSL_ARMASM_INLINE
+#define WOLFSSL_ARMASM_NO_HW_CRYPTO
+#define WOLFSSL_ARMASM_NO_NEON
+#define WOLFSSL_ARM_ARCH 7
+```
+
+```
+------------------------------------------------------------------------------
+ wolfSSL version 5.6.6
+------------------------------------------------------------------------------
+wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
+RNG 6 MiB took 1.000 seconds, 6.079 MiB/s
+AES-128-CBC-enc 17 MiB took 1.000 seconds, 17.261 MiB/s
+AES-128-CBC-dec 17 MiB took 1.000 seconds, 16.748 MiB/s
+AES-192-CBC-enc 15 MiB took 1.000 seconds, 14.575 MiB/s
+AES-192-CBC-dec 14 MiB took 1.000 seconds, 14.209 MiB/s
+AES-256-CBC-enc 13 MiB took 1.000 seconds, 12.622 MiB/s
+AES-256-CBC-dec 12 MiB took 1.000 seconds, 12.378 MiB/s
+AES-128-GCM-enc 8 MiB took 1.000 seconds, 8.374 MiB/s
+AES-128-GCM-dec 8 MiB took 1.000 seconds, 8.374 MiB/s
+AES-192-GCM-enc 8 MiB took 1.000 seconds, 7.690 MiB/s
+AES-192-GCM-dec 8 MiB took 1.000 seconds, 7.690 MiB/s
+AES-256-GCM-enc 7 MiB took 1.000 seconds, 7.129 MiB/s
+AES-256-GCM-dec 7 MiB took 1.000 seconds, 7.104 MiB/s
+AES-128-GCM-enc-no_AAD 8 MiB took 1.000 seconds, 8.472 MiB/s
+AES-128-GCM-dec-no_AAD 8 MiB took 1.000 seconds, 8.472 MiB/s
+AES-192-GCM-enc-no_AAD 8 MiB took 1.000 seconds, 7.764 MiB/s
+AES-192-GCM-dec-no_AAD 8 MiB took 1.000 seconds, 7.715 MiB/s
+AES-256-GCM-enc-no_AAD 7 MiB took 1.000 seconds, 7.153 MiB/s
+AES-256-GCM-dec-no_AAD 7 MiB took 1.000 seconds, 7.153 MiB/s
+GMAC Table 4-bit 17 MiB took 1.000 seconds, 16.617 MiB/s
+CHACHA 29 MiB took 1.000 seconds, 28.662 MiB/s
+CHA-POLY 19 MiB took 1.000 seconds, 18.848 MiB/s
+POLY1305 90 MiB took 1.000 seconds, 89.771 MiB/s
+SHA-224 18 MiB took 1.000 seconds, 18.042 MiB/s
+SHA-256 18 MiB took 1.000 seconds, 18.042 MiB/s
+SHA-384 8 MiB took 1.000 seconds, 7.544 MiB/s
+SHA-512 8 MiB took 1.000 seconds, 7.568 MiB/s
+SHA-512/224 8 MiB took 1.000 seconds, 7.544 MiB/s
+SHA-512/256 8 MiB took 1.000 seconds, 7.520 MiB/s
+HMAC-SHA224 18 MiB took 1.000 seconds, 17.896 MiB/s
+HMAC-SHA256 18 MiB took 1.000 seconds, 17.896 MiB/s
+HMAC-SHA384 7 MiB took 1.000 seconds, 7.373 MiB/s
+HMAC-SHA512 7 MiB took 1.000 seconds, 7.397 MiB/s
+RSA 2048 public 508 ops took 1.000 sec, avg 1.969 ms, 508.000 ops/sec
+RSA 2048 private 14 ops took 1.020 sec, avg 72.857 ms, 13.725 ops/sec
+DH 2048 key gen 30 ops took 1.012 sec, avg 33.733 ms, 29.644 ops/sec
+DH 2048 agree 30 ops took 1.012 sec, avg 33.733 ms, 29.644 ops/sec
+ECC [ SECP256R1] 256 key gen 982 ops took 1.000 sec, avg 1.018 ms, 982.000 ops/sec
+ECDHE [ SECP256R1] 256 agree 456 ops took 1.000 sec, avg 2.193 ms, 456.000 ops/sec
+ECDSA [ SECP256R1] 256 sign 520 ops took 1.000 sec, avg 1.923 ms, 520.000 ops/sec
+ECDSA [ SECP256R1] 256 verify 288 ops took 1.004 sec, avg 3.486 ms, 286.853 ops/sec
+CURVE 25519 key gen 1112 ops took 1.000 sec, avg 0.899 ms, 1112.000 ops/sec
+CURVE 25519 agree 1144 ops took 1.000 sec, avg 0.874 ms, 1144.000 ops/sec
+ED 25519 key gen 2358 ops took 1.000 sec, avg 0.424 ms, 2358.000 ops/sec
+ED 25519 sign 1716 ops took 1.000 sec, avg 0.583 ms, 1716.000 ops/sec
+ED 25519 verify 862 ops took 1.000 sec, avg 1.160 ms, 862.000 ops/sec
+Benchmark complete
+Benchmark Test: Return code 0
+```
+
+
### STM32H753ZI (No HW Crypto, -Os, FastMath)
```
diff --git a/extra/wolfssl/wolfssl/IDE/STM32Cube/default_conf.ftl b/extra/wolfssl/wolfssl/IDE/STM32Cube/default_conf.ftl
index 015a2851..b976c55d 100644
--- a/extra/wolfssl/wolfssl/IDE/STM32Cube/default_conf.ftl
+++ b/extra/wolfssl/wolfssl/IDE/STM32Cube/default_conf.ftl
@@ -213,19 +213,28 @@ extern ${variable.value} ${variable.name};
/* ------------------------------------------------------------------------- */
/* Math Configuration */
/* ------------------------------------------------------------------------- */
-/* 1=Fast (stack)
- * 2=Normal (heap)
- * 3=Single Precision C (only common curves/key sizes)
- * 4=Single Precision ASM Cortex-M3+
- * 5=Single Precision ASM Cortex-M0 (Generic Thumb)
- * 6=Single Precision C all small
- * 7=Single Precision C all big
+/* 1=Fast (stack) (tfm.c)
+ * 2=Normal (heap) (integer.c)
+ * 3-5=Single Precision: only common curves/key sizes:
+ * (ECC 256/384/521 and RSA/DH 2048/3072/4096)
+ * 3=Single Precision C (sp_c32.c)
+ * 4=Single Precision ASM Cortex-M3+ (sp_cortexm.c)
+ * 5=Single Precision ASM Cortex-M0 (sp_armthumb.c)
+ * 6=Wolf multi-precision C small (sp_int.c)
+ * 7=Wolf multi-precision C big (sp_int.c)
*/
+
#if defined(WOLF_CONF_MATH) && WOLF_CONF_MATH == 1
/* fast (stack) math - tfm.c */
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
+ #if !defined(NO_RSA) || !defined(NO_DH)
+ /* Maximum math bits (Max DH/RSA key bits * 2) */
+ #undef FP_MAX_BITS
+ #define FP_MAX_BITS 4096
+ #endif
+
/* Optimizations (TFM_ARM, TFM_ASM or none) */
//#define TFM_NO_ASM
//#define TFM_ASM
@@ -240,19 +249,26 @@ extern ${variable.value} ${variable.name};
#endif
#if defined(WOLF_CONF_RSA) && WOLF_CONF_RSA == 1
#define WOLFSSL_HAVE_SP_RSA
+ //#define WOLFSSL_SP_NO_2048
+ //#define WOLFSSL_SP_NO_3072
+ //#define WOLFSSL_SP_4096
#endif
#if defined(WOLF_CONF_DH) && WOLF_CONF_DH == 1
#define WOLFSSL_HAVE_SP_DH
#endif
#if defined(WOLF_CONF_ECC) && WOLF_CONF_ECC == 1
#define WOLFSSL_HAVE_SP_ECC
+ //#define WOLFSSL_SP_NO_256
+ //#define WOLFSSL_SP_384
+ //#define WOLFSSL_SP_521
#endif
#if WOLF_CONF_MATH == 6 || WOLF_CONF_MATH == 7
#define WOLFSSL_SP_MATH_ALL /* use sp_int.c multi precision math */
+ //#define WOLFSSL_SP_ARM_THUMB /* enable ARM Thumb ASM speedups */
#else
#define WOLFSSL_SP_MATH /* disable non-standard curves / key sizes */
#endif
- #define SP_WORD_SIZE 32
+ #define SP_WORD_SIZE 32 /* force 32-bit mode */
/* Enable to put all math on stack (no heap) */
//#define WOLFSSL_SP_NO_MALLOC
@@ -279,6 +295,8 @@ extern ${variable.value} ${variable.name};
#define HAVE_SUPPORTED_CURVES
#define HAVE_ENCRYPT_THEN_MAC
#define HAVE_EXTENDED_MASTER
+#define WOLFSSL_ASN_TEMPLATE
+#define HAVE_SNI
#if defined(WOLF_CONF_TLS13) && WOLF_CONF_TLS13 == 1
#define WOLFSSL_TLS13
@@ -331,12 +349,6 @@ extern ${variable.value} ${variable.name};
/* RSA */
#undef NO_RSA
#if defined(WOLF_CONF_RSA) && WOLF_CONF_RSA == 1
- #ifdef USE_FAST_MATH
- /* Maximum math bits (Max RSA key bits * 2) */
- #undef FP_MAX_BITS
- #define FP_MAX_BITS 4096
- #endif
-
/* half as much memory but twice as slow */
#undef RSA_LOW_MEM
//#define RSA_LOW_MEM
@@ -390,8 +402,8 @@ extern ${variable.value} ${variable.name};
//#define HAVE_COMP_KEY
#ifdef USE_FAST_MATH
- #ifdef NO_RSA
- /* Custom fastmath size if not using RSA */
+ #if defined(NO_RSA) && defined(NO_DH)
+ /* Custom fastmath size if not using RSA/DH */
/* MAX = ROUND32(ECC BITS) * 2 */
#define FP_MAX_BITS (256 * 2)
#else
@@ -432,6 +444,7 @@ extern ${variable.value} ${variable.name};
#endif
/* Other possible AES modes */
+//#define WOLFSSL_AES_CFB /* Used by TPM parameter encryption */
//#define WOLFSSL_AES_COUNTER
//#define HAVE_AESCCM
//#define WOLFSSL_AES_XTS
@@ -600,6 +613,8 @@ extern ${variable.value} ${variable.name};
#define NO_RC4
#define NO_MD4
#define NO_DES3
+#define WOLFSSL_NO_SHAKE128
+#define WOLFSSL_NO_SHAKE256
/* In-lining of misc.c functions */
/* If defined, must include wolfcrypt/src/misc.c in build */
diff --git a/extra/wolfssl/wolfssl/IDE/WIN10/wolfssl-fips.rc b/extra/wolfssl/wolfssl/IDE/WIN10/wolfssl-fips.rc
index 4da10de8..956269fb 100644
--- a/extra/wolfssl/wolfssl/IDE/WIN10/wolfssl-fips.rc
+++ b/extra/wolfssl/wolfssl/IDE/WIN10/wolfssl-fips.rc
@@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 5,6,6,0
- PRODUCTVERSION 5,6,6,0
+ FILEVERSION 5,7,0,0
+ PRODUCTVERSION 5,7,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "wolfSSL Inc."
VALUE "FileDescription", "The wolfSSL FIPS embedded SSL library is a lightweight, portable, C-language-based SSL/TLS library targeted at IoT, embedded, and RTOS environments primarily because of its size, speed, and feature set."
- VALUE "FileVersion", "5.6.6.0"
+ VALUE "FileVersion", "5.7.0.0"
VALUE "InternalName", "wolfssl-fips"
VALUE "LegalCopyright", "Copyright (C) 2023"
VALUE "OriginalFilename", "wolfssl-fips.dll"
VALUE "ProductName", "wolfSSL FIPS"
- VALUE "ProductVersion", "5.6.6.0"
+ VALUE "ProductVersion", "5.7.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/extra/wolfssl/wolfssl/IDE/include.am b/extra/wolfssl/wolfssl/IDE/include.am
index 4f84b43f..0656e8ba 100644
--- a/extra/wolfssl/wolfssl/IDE/include.am
+++ b/extra/wolfssl/wolfssl/IDE/include.am
@@ -57,6 +57,9 @@ include IDE/STARCORE/include.am
include IDE/MDK5-ARM/include.am
include IDE/SimplicityStudio/include.am
include IDE/apple-universal/include.am
+include IDE/MPLABX16/include.am
+include IDE/MPLABX16/wolfssl.X/nbproject/include.am
+include IDE/MPLABX16/wolfcrypt_test.X/nbproject/include.am
EXTRA_DIST+= IDE/IAR-EWARM IDE/MDK-ARM IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR IDE/Espressif
EXTRA_DIST+= IDE/OPENSTM32/README.md
diff --git a/extra/wolfssl/wolfssl/IDE/iotsafe/memory-tls.c b/extra/wolfssl/wolfssl/IDE/iotsafe/memory-tls.c
index eff9f384..96d92168 100644
--- a/extra/wolfssl/wolfssl/IDE/iotsafe/memory-tls.c
+++ b/extra/wolfssl/wolfssl/IDE/iotsafe/memory-tls.c
@@ -146,9 +146,12 @@ static int client_loop(void)
#if (IOTSAFE_ID_SIZE == 1)
byte cert_file_id, privkey_id, keypair_id, peer_pubkey_id, peer_cert_id, serv_cert_id;
byte ca_cert_id;
- #else
+ #elif (IOTSAFE_ID_SIZE == 2)
word16 cert_file_id, privkey_id, keypair_id, peer_pubkey_id, peer_cert_id, serv_cert_id;
word16 ca_cert_id;
+ #else
+ word32 cert_file_id, privkey_id, keypair_id, peer_pubkey_id, peer_cert_id, serv_cert_id;
+ word32 ca_cert_id;
#endif
cert_file_id = CRT_CLIENT_FILE_ID;
privkey_id = PRIVKEY_ID;
diff --git a/extra/wolfssl/wolfssl/IDE/iotsafe/user_settings.h b/extra/wolfssl/wolfssl/IDE/iotsafe/user_settings.h
index f483b2cf..3852464e 100644
--- a/extra/wolfssl/wolfssl/IDE/iotsafe/user_settings.h
+++ b/extra/wolfssl/wolfssl/IDE/iotsafe/user_settings.h
@@ -34,7 +34,21 @@
* - Default: one-byte ID sim, with hardcoded server certificate
*/
-#ifdef TWO_BYTES_ID_DEMO
+#if defined(FOUR_BYTES_ID_DEMO)
+ #define IOTSAFE_ID_SIZE 2
+ #define CRT_CLIENT_FILE_ID 0xABCD3430 /* pre-provisioned */
+ #define CRT_SERVER_FILE_ID 0xABCD3330
+ #define PRIVKEY_ID 0xABCD3230 /* pre-provisioned */
+ #define ECDH_KEYPAIR_ID 0xABCD3330
+ #define PEER_PUBKEY_ID 0xABCD3730
+ #define PEER_CERT_ID 0xABCD3430
+
+ /* In this version of the demo, the server certificate is
+ * stored in a buffer, while the CA is read from a file slot in IoT-SAFE
+ */
+ #define SOFT_SERVER_CERT
+
+#elif defined(TWO_BYTES_ID_DEMO)
#define IOTSAFE_ID_SIZE 2
#define CRT_CLIENT_FILE_ID 0x3430 /* pre-provisioned */
#define CRT_SERVER_FILE_ID 0x3330
diff --git a/extra/wolfssl/wolfssl/Makefile.am b/extra/wolfssl/wolfssl/Makefile.am
index 07a2496e..19e766d5 100644
--- a/extra/wolfssl/wolfssl/Makefile.am
+++ b/extra/wolfssl/wolfssl/Makefile.am
@@ -138,8 +138,6 @@ dist_example_DATA=
ACLOCAL_AMFLAGS= -I m4
-EXTRA_DIST+= lib/dummy
-
EXTRA_DIST+= wolfssl.vcproj
EXTRA_DIST+= wolfssl.vcxproj
EXTRA_DIST+= wolfssl64.sln
@@ -152,7 +150,6 @@ EXTRA_DIST+= README
EXTRA_DIST+= ChangeLog.md
EXTRA_DIST+= LICENSING
EXTRA_DIST+= INSTALL
-EXTRA_DIST+= IPP
EXTRA_DIST+= LPCExpresso.cproject
EXTRA_DIST+= LPCExpresso.project
EXTRA_DIST+= resource.h wolfssl.rc
@@ -168,7 +165,6 @@ include Docker/include.am
include src/include.am
include support/include.am
-include wolfcrypt/user-crypto/include.am
include wolfcrypt/benchmark/include.am
include wolfcrypt/src/include.am
include wolfcrypt/test/include.am
diff --git a/extra/wolfssl/wolfssl/README b/extra/wolfssl/wolfssl/README
index c344bf80..72d5cb36 100644
--- a/extra/wolfssl/wolfssl/README
+++ b/extra/wolfssl/wolfssl/README
@@ -70,93 +70,99 @@ should be used for the enum name.
*** end Notes ***
-# wolfSSL Release 5.6.6 (Dec 19, 2023)
+# wolfSSL Release 5.7.0 (Mar 20, 2024)
-Release 5.6.6 has been developed according to wolfSSL's development and QA
+Release 5.7.0 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
-NOTE: * --enable-heapmath is being deprecated and will be removed by 2024
+NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
+
+NOTE: In future releases, --enable-des3 (which is disabled by default) will be insufficient in itself to enable DES3 in TLS cipher suites. A new option, --enable-des3-tls-suites, will need to be supplied in addition. This option should only be used in backward compatibility scenarios, as it is inherently insecure.
+
+NOTE: This release switches the default ASN.1 parser to the new ASN template code. If the original ASN.1 code is preferred define `WOLFSSL_ASN_ORIGINAL` to use it. See PR #7199.
-REMINDER: When working with AES Block Cipher algorithms, wc_AesInit() should
-always be called first to initialize the `Aes` structure, before calling other
-Aes API functions. Recently we found several places in our documentation,
-comments, and codebase where this pattern was not observed. We have since
-fixed this omission in several PRs for this release.
## Vulnerabilities
+* [High] CVE-2024-0901 Potential denial of service and out of bounds read. Affects TLS 1.3 on the server side when accepting a connection from a malicious TLS 1.3 client. If using TLS 1.3 on the server side it is recommended to update the version of wolfSSL used. Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7099
-* [Medium] CVE-2023-6935: After review of the previous RSA timing fix in wolfSSL 5.6.4, additional changes were found to be required. A complete resistant change is delivered in this release. This fix is for the Marvin attack, leading to being able to decrypt a saved TLS connection and potentially forge a signature after probing with a very large number of trial connections. This issue is around RSA decryption and affects the optional static RSA cipher suites on the server side, which are considered weak, not recommended to be used and are off by default in wolfSSL (even with --enable-all). Static RSA cipher suites were also removed from the TLS 1.3 protocol and are only present in TLS 1.2 and lower. All padding versions of RSA decrypt are affected since the code under review is outside of the padding processing. Information about the private keys is NOT compromised in affected code. It is recommended to disable static RSA cipher suites and update the version of wolfSSL used if using RSA private decryption alone outside of TLS. Thanks to Hubert Kario for the report. The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6955.
-* [Low] CVE-2023-6936: A potential heap overflow read is possible in servers connecting over TLS 1.3 when the optional WOLFSSL_CALLBACKS has been defined. The out of bounds read can occur when a server receives a malicious malformed ClientHello. Users should either discontinue use of WOLFSSL_CALLBACKS on the server side or update versions of wolfSSL to 5.6.6. Thanks to the tlspuffin fuzzer team for the report which was designed and developed by; Lucca Hirschi (Inria, LORIA), Steve Kremer (Inria, LORIA), and Max Ammann (Trail of Bits). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6949.
+* [Med] CVE-2024-1545 Fault Injection vulnerability in RsaPrivateDecryption function that potentially allows an attacker that has access to the same system with a victims process to perform a Rowhammer fault injection. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia)."
+Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7167
-* [Low] A side channel vulnerability with AES T-Tables is possible in a very controlled environment where precision sub-cache-line inspection can happen, such as inside an Intel SGX enclave. This can lead to recovery of the AES key. To prevent this type of attack, wolfSSL added an AES bitsliced implementation which can be enabled with the “--enable-aes-bitsliced†configure option. Thanks to Florian Sieck, Zhiyuan Zhang, Sebastian Berndt, Chitchanok Chuengsatiansup, Thomas Eisenbarth, and Yuval Yarom for the report (Universities of Lübeck, Melbourne, Adelaide and Bochum). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6854.
-* [Low] CVE-2023-6937: wolfSSL prior to 5.6.6 did not check that messages in a single (D)TLS record do not span key boundaries. As a result, it was possible to combine (D)TLS messages using different keys into one (D)TLS record. The most extreme edge case is that, in (D)TLS 1.3, it was possible that an unencrypted (D)TLS 1.3 record from the server containing first a ServerHello message and then the rest of the first server flight would be accepted by a wolfSSL client. In (D)TLS 1.3 the handshake is encrypted after the ServerHello but a wolfSSL client would accept an unencrypted flight from the server. This does not compromise key negotiation and authentication so it is assigned a low severity rating. Thanks to Johannes Wilson for the report (Sectra Communications and Linköping University). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/7029.
+* [Med] Fault injection attack with EdDSA signature operations. This affects ed25519 sign operations where the system could be susceptible to Rowhammer attacks. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia).
+Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7212
+
## New Feature Additions
-* Build option for disabling CRL date checks (WOLFSSL_NO_CRL_DATE_CHECK) (PR 6927)
-* Support for STM32WL55 and improvements to PKA ECC support (PR 6937)
-* Add option to skip cookie exchange on DTLS 1.3 session resumption (PR 6929)
-* Add implementation of SRTP KDF and SRTCP KDF (--enable-srtp-kdf) (PR 6888)
-* Add wolfSSL_EXTENDED_KEY_USAGE_free() (PR 6916)
-* Add AES bitsliced implementation that is cache attack safe (--enable-aes-bitsliced) (PR 6854)
-* Add memcached support and automated testing (PR 6430, 7022)
-* Add Hardware Encryption Acceleration for ESP32-C3, ESP32-C6, and ESP32-S2 (PR 6990)
-* Add (D)TLS 1.3 support for 0.5-RTT data (PR 7010)
+* Added --enable-experimental configure flag to gate out features that are currently experimental. Now liboqs, kyber, lms, xmss, and dual-alg-certs require the --enable-experimental flag.
+
+### POST QUANTUM SUPPORT ADDITIONS
+* Experimental framework for using wolfSSL’s XMSS implementation (PR 7161)
+* Experimental framework for using wolfSSL’s LMS implementation (PR 7283)
+* Experimental wolfSSL Kyber implementation and assembly optimizations, enabled with --enable-experimental --enable-kyber (PR 7318)
+* Experimental support for post quantum dual key/signature certificates. A few known issues and sanitizer checks are in progress with this feature. Enabled with the configure flags --enable-experimental --enable-dual-alg-certs (PR 7112)
+* CryptoCb support for PQC algorithms (PR 7110)
+
+### OTHER FEATURE ADDITIONS
+* The Linux kernel module now supports registration of AES-GCM, AES-XTS, AES-CBC, and AES-CFB with the kernel cryptosystem through the new --enable-linuxkm-lkcapi-register option, enabling automatic use of wolfCrypt implementations by the dm-crypt/luks and ESP subsystems. In particular, wolfCrypt AES-XTS with –enable-aesni is faster than the native kernel implementation.
+* CryptoCb hook to one-shot CMAC functions (PR 7059)
+* BER content streaming support for PKCS7_VerifySignedData and sign/encrypt operations (PR 6961 & 7184)
+* IoT-Safe SHA-384 and SHA-512 support (PR 7176)
+* I/O callbacks for content and output with PKCS7 bundle sign/encrypt to reduce peak memory usage (PR 7272)
+* Microchip PIC24 support and example project (PR 7151)
+* AutoSAR shim layer for RNG, SHA256, and AES (PR 7296)
+* wolfSSL_CertManagerUnloadIntermediateCerts API to clear intermediate certs added to certificate store (PR 7245)
+* Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid (PR 7236)
+
## Enhancements and Optimizations
-* Better built in testing of “--sys-ca-certs†configure option (PR 6910)
-* Updated CMakeLists.txt for Espressif wolfSSL component usage (PR 6877)
-* Disable TLS 1.1 by default (unless SSL 3.0 or TLS 1.0 is enabled) (PR 6946)
-* Add “--enable-quic†to “--enable-all†configure option (PR 6957)
-* Add support to SP C implementation for RSA exponent up to 64-bits (PR 6959)
-* Add result of “HAVE___UINT128_T†to options.h for CMake builds (PR 6965)
-* Add optimized assembly for AES-GCM on ARM64 using hardware crypto instructions (PR 6967)
-* Add built-in cipher suite tests for DTLS 1.3 PQC (PR 6952)
-* Add wolfCrypt test and unit test to ctest (PR 6977)
-* Move OpenSSL compatibility crypto APIs into ssl_crypto.c file (PR 6935)
-* Validate time generated from XGMTIME() (PR 6958)
-* Allow wolfCrypt benchmark to run with microsecond accuracy (PR 6868)
-* Add GitHub Actions testing with nginx 1.24.0 (PR 6982)
-* Allow encoding of CA:FALSE BasicConstraint during cert generation (PR 6953)
-* Add CMake option to enable DTLS-SRTP (PR 6991)
-* Add CMake options for enabling QUIC and cURL (PR 7049)
-* Improve RSA blinding to make code more constant time (PR 6955)
-* Refactor AES-NI implementation macros to allow dynamic fallback to C (PR 6981)
-* Default to native Windows threading API on MinGW (PR 7015)
-* Return better error codes from OCSP response check (PR 7028)
-* Updated Espressif ESP32 TLS client and server examples (PR 6844)
-* Add/clean up support for ESP-IDF v5.1 for a variety of ESP32 chips (PR 7035, 7037)
-* Add API to choose dynamic certs based on client ciphers/sigalgs (PR 6963)
-* Improve Arduino IDE 1.5 project file to match recursive style (PR 7007)
-* Simplify and improve apple-universal build script (PR 7025)
+* Remove obsolete user-crypto functionality and Intel IPP support (PR 7097)
+* Support for RSA-PSS signatures with CRL use (PR 7119)
+* Enhancement for AES-GCM use with Xilsecure on Microblaze (PR 7051)
+* Support for crypto cb only build with ECC and NXP CAAM (PR 7269)
+* Improve liboqs integration adding locking and init/cleanup functions (PR 7026)
+* Prevent memory access before clientSession->serverRow and clientSession->serverIdx are sanitized (PR 7096)
+* Enhancements to reproducible build (PR 7267)
+* Update Arduino example TLS Client/Server and improve support for ESP32 (PR 7304 & 7177)
+* XC32 compiler version 4.x compatibility (PR 7128)
+* Porting for build on PlayStation 3 and 4 (PR 7072)
+* Improvements for Espressif use; SHA HW/SW selection and use on ESP32-C2/ESP8684, wolfSSL_NewThread() type, component cmake fix, and update TLS client example for ESP8266 (PR 7081, 7173, 7077, 7148, 7240)
+* Allow crypto callbacks with SHA-1 HW (PR 7087)
+* Update OpenSSH port to version 9.6p1(PR 7203)
+* ARM Thumb2 enhancements, AES-GCM support for GCM_SMALL, alignment fix on key, fix for ASM clobber list (PR 7291,7301,7221)
+* Expand heap hint support for static memory build with more x509 functions (PR 7136)
+* Improving ARMv8 ChaCha20 ASM (alignment) (PR 7182)
+* Unknown extension callback wolfSSL_CertManagerSetUnknownExtCallback added to CertManager (PR 7194)
+* Implement wc_rng_new_ex for use with devID’s with crypto callback (PR 7271)
+* Allow reading 0-RTT data after writing 0.5-RTT data (PR 7102)
+* Send alert on bad PSK binder error (PR 7235)
+* Enhancements to CMake build files for use with cross compiling (PR 7188)
+
## Fixes
-* Fix for async edge case with Intel QuickAssist/Cavium Nitrox (PR 6931)
-* Fix for building PKCS#7 with RSA disabled (PR 6902)
-* Fix for advancing output pointer in wolfSSL_i2d_X509() (PR 6891)
-* Fix for EVP_EncodeBlock() appending a newline (PR 6900)
-* Fix for wolfSSL_RSA_verify_PKCS1_PSS() with RSA_PSS_SALTLEN_AUTO (PR 6938)
-* Fixes for CODESonar reports around isalpha() and isalnum() calls (PR 6810)
-* Fix for SP ARM64 integer math to avoid compiler optimization issues (PR 6942)
-* Fix for SP Thumb2 inline assembly to add IAR build support (PR 6943, 6971)
-* Fix for SP Thumb2 to make functions not inlined (PR 6993)
-* Fix for SP Cortex-M assembly large build with IAR (PR 6954)
-* Fix for SP ARM64 assembly montgomery reduction by 4 (PR 6947)
-* Fix for SP ARM64 P-256 for not inlining functions for iOS compatibility (PR 6979)
-* Fix for WOLFSSL_CALLBACKS and potential memory error (PR 6949)
-* Fixes for wolfSSL’s Zephyr OS port (PR 6930)
-* Fix for build errors when building for NXP mmCAU (FREESCALE_MMCAU) (PR 6970)
-* Fix for TLS 1.3 SendBuffered() return code in non-blocking mode (PR 7001)
-* Fix for TLS Hmac_UpdateFinal() when padding byte is invalid (PR 6998)
-* Fix for ARMv8 AES-GCM streaming to check size of IV before storing (PR 6996)
-* Add missing calls to wc_AesInit() before wc_AesSetKey() (PR 7011)
-* Fix build errors with DTLS 1.3 enabled but TLS 1.2 disabled (PR 6976)
-* Fixes for building wolfSSL in Visual Studio (PR 7040)
+* Fix for checking result of MAC verify when no AAD is used with AES-GCM and Xilinx Xilsecure (PR 7051)
+* Fix for Aria sign use (PR 7082)
+* Fix for invalid `dh_ffdhe_test` test case using Intel QuickAssist (PR 7085)
+* Fixes for TI AES and SHA on TM4C with HW acceleration and add full AES GCM and CCM support with TLS (PR 7018)
+* Fixes for STM32 PKA use with ECC (PR 7098)
+* Fixes for TLS 1.3 with crypto callbacks to offload KDF / HMAC operation (PR 7070)
+* Fix include path for FSP 3.5 on Renesas RA6M4 (PR 7101)
+* Siphash x64 asm fix for use with older compilers (PR 7299)
+* Fix for SGX build with SP (PR 7308)
+* Fix to Make it mandatory that the cookie is sent back in new ClientHello when seen in a HelloRetryRequest with (PR 7190)
+* Fix for wrap around behavior with BIO pairs (PR 7169)
+* OCSP fixes for parsing of response correctly when there was a revocation reason and returning correct error value with date checks (PR 7241 & 7255)
+* Fix build with `NO_STDIO_FILESYSTEM` and improve checks for `XGETENV` (PR 7150)
+* Fix for DTLS sequence number and cookie when downgrading DTLS version (PR 7214)
+* Fix for write_dup use with chacha-poly cipher suites (PR 7206)
+* Fix for multiple handshake messages in one record failing with OUT_OF_ORDER_E when downgrading from TLS 1.3 to TLS 1.2 (PR 7141)
+* Fix for AES ECB build with Thumb and alignment (PR 7094)
+* Fix for negotiate handshake until the end in wolfSSL_read/wolfSSL_write if hitting an edge case with want read/write (PR 7237)
For additional vulnerability information visit the vulnerability page at:
https://www.wolfssl.com/docs/security-vulnerabilities/
diff --git a/extra/wolfssl/wolfssl/README.md b/extra/wolfssl/wolfssl/README.md
index 381a05fb..89acd736 100644
--- a/extra/wolfssl/wolfssl/README.md
+++ b/extra/wolfssl/wolfssl/README.md
@@ -75,93 +75,98 @@ single call hash function. Instead the name `WC_SHA`, `WC_SHA256`, `WC_SHA384` a
`WC_SHA512` should be used for the enum name.
-# wolfSSL Release 5.6.6 (Dec 19, 2023)
+# wolfSSL Release 5.7.0 (Mar 20, 2024)
-Release 5.6.6 has been developed according to wolfSSL's development and QA
+Release 5.7.0 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance
-NOTE: * --enable-heapmath is being deprecated and will be removed by 2024
+NOTE: * --enable-heapmath is being deprecated and will be removed by end of 2024
-REMINDER: When working with AES Block Cipher algorithms, `wc_AesInit()` should
-always be called first to initialize the `Aes` structure, before calling other
-Aes API functions. Recently we found several places in our documentation,
-comments, and codebase where this pattern was not observed. We have since
-fixed this omission in several PRs for this release.
+NOTE: In future releases, --enable-des3 (which is disabled by default) will be insufficient in itself to enable DES3 in TLS cipher suites. A new option, --enable-des3-tls-suites, will need to be supplied in addition. This option should only be used in backward compatibility scenarios, as it is inherently insecure.
+
+NOTE: This release switches the default ASN.1 parser to the new ASN template code. If the original ASN.1 code is preferred define `WOLFSSL_ASN_ORIGINAL` to use it. See PR #7199.
## Vulnerabilities
+* [High] CVE-2024-0901 Potential denial of service and out of bounds read. Affects TLS 1.3 on the server side when accepting a connection from a malicious TLS 1.3 client. If using TLS 1.3 on the server side it is recommended to update the version of wolfSSL used. Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7099
+
-* [Medium] CVE-2023-6935: After review of the previous RSA timing fix in wolfSSL 5.6.4, additional changes were found to be required. A complete resistant change is delivered in this release. This fix is for the Marvin attack, leading to being able to decrypt a saved TLS connection and potentially forge a signature after probing with a very large number of trial connections. This issue is around RSA decryption and affects the optional static RSA cipher suites on the server side, which are considered weak, not recommended to be used and are off by default in wolfSSL (even with `--enable-all`). Static RSA cipher suites were also removed from the TLS 1.3 protocol and are only present in TLS 1.2 and lower. All padding versions of RSA decrypt are affected since the code under review is outside of the padding processing. Information about the private keys is NOT compromised in affected code. It is recommended to disable static RSA cipher suites and update the version of wolfSSL used if using RSA private decryption alone outside of TLS. Thanks to Hubert Kario for the report. The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6955.
+* [Med] CVE-2024-1545 Fault Injection vulnerability in RsaPrivateDecryption function that potentially allows an attacker that has access to the same system with a victims process to perform a Rowhammer fault injection. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia)."
+Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7167
-* [Low] CVE-2023-6936: A potential heap overflow read is possible in servers connecting over TLS 1.3 when the optional `WOLFSSL_CALLBACKS` has been defined. The out of bounds read can occur when a server receives a malicious malformed ClientHello. Users should either discontinue use of `WOLFSSL_CALLBACKS` on the server side or update versions of wolfSSL to 5.6.6. Thanks to the tlspuffin fuzzer team for the report which was designed and developed by; Lucca Hirschi (Inria, LORIA), Steve Kremer (Inria, LORIA), and Max Ammann (Trail of Bits). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6949.
-* [Low] A side channel vulnerability with AES T-Tables is possible in a very controlled environment where precision sub-cache-line inspection can happen, such as inside an Intel SGX enclave. This can lead to recovery of the AES key. To prevent this type of attack, wolfSSL added an AES bitsliced implementation which can be enabled with the “`--enable-aes-bitsliced`†configure option. Thanks to Florian Sieck, Zhiyuan Zhang, Sebastian Berndt, Chitchanok Chuengsatiansup, Thomas Eisenbarth, and Yuval Yarom for the report (Universities of Lübeck, Melbourne, Adelaide and Bochum). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/6854.
+* [Med] Fault injection attack with EdDSA signature operations. This affects ed25519 sign operations where the system could be susceptible to Rowhammer attacks. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang, Qingni Shen for the report (Peking University, The University of Western Australia).
+Fixed in this GitHub pull request https://github.com/wolfSSL/wolfssl/pull/7212
-* [Low] CVE-2023-6937: wolfSSL prior to 5.6.6 did not check that messages in a single (D)TLS record do not span key boundaries. As a result, it was possible to combine (D)TLS messages using different keys into one (D)TLS record. The most extreme edge case is that, in (D)TLS 1.3, it was possible that an unencrypted (D)TLS 1.3 record from the server containing first a ServerHello message and then the rest of the first server flight would be accepted by a wolfSSL client. In (D)TLS 1.3 the handshake is encrypted after the ServerHello but a wolfSSL client would accept an unencrypted flight from the server. This does not compromise key negotiation and authentication so it is assigned a low severity rating. Thanks to Johannes Wilson for the report (Sectra Communications and Linköping University). The fix for this issue is located in the following GitHub Pull Request: https://github.com/wolfSSL/wolfssl/pull/7029.
## New Feature Additions
-* Build option for disabling CRL date checks (`WOLFSSL_NO_CRL_DATE_CHECK`) (PR 6927)
-* Support for STM32WL55 and improvements to PKA ECC support (PR 6937)
-* Add option to skip cookie exchange on DTLS 1.3 session resumption (PR 6929)
-* Add implementation of SRTP KDF and SRTCP KDF (`--enable-srtp-kdf`) (PR 6888)
-* Add `wolfSSL_EXTENDED_KEY_USAGE_free()` (PR 6916)
-* Add AES bitsliced implementation that is cache attack safe (`--enable-aes-bitsliced`) (PR 6854)
-* Add memcached support and automated testing (PR 6430, 7022)
-* Add Hardware Encryption Acceleration for ESP32-C3, ESP32-C6, and ESP32-S2 (PR 6990)
-* Add (D)TLS 1.3 support for 0.5-RTT data (PR 7010)
+* Added --enable-experimental configure flag to gate out features that are currently experimental. Now liboqs, kyber, lms, xmss, and dual-alg-certs require the --enable-experimental flag.
+
+### POST QUANTUM SUPPORT ADDITIONS
+* Experimental framework for using wolfSSL’s XMSS implementation (PR 7161)
+* Experimental framework for using wolfSSL’s LMS implementation (PR 7283)
+* Experimental wolfSSL Kyber implementation and assembly optimizations, enabled with --enable-experimental --enable-kyber (PR 7318)
+* Experimental support for post quantum dual key/signature certificates. A few known issues and sanitizer checks are in progress with this feature. Enabled with the configure flags --enable-experimental --enable-dual-alg-certs (PR 7112)
+* CryptoCb support for PQC algorithms (PR 7110)
+
+### OTHER FEATURE ADDITIONS
+* The Linux kernel module now supports registration of AES-GCM, AES-XTS, AES-CBC, and AES-CFB with the kernel cryptosystem through the new --enable-linuxkm-lkcapi-register option, enabling automatic use of wolfCrypt implementations by the dm-crypt/luks and ESP subsystems. In particular, wolfCrypt AES-XTS with –enable-aesni is faster than the native kernel implementation.
+* CryptoCb hook to one-shot CMAC functions (PR 7059)
+* BER content streaming support for PKCS7_VerifySignedData and sign/encrypt operations (PR 6961 & 7184)
+* IoT-Safe SHA-384 and SHA-512 support (PR 7176)
+* I/O callbacks for content and output with PKCS7 bundle sign/encrypt to reduce peak memory usage (PR 7272)
+* Microchip PIC24 support and example project (PR 7151)
+* AutoSAR shim layer for RNG, SHA256, and AES (PR 7296)
+* wolfSSL_CertManagerUnloadIntermediateCerts API to clear intermediate certs added to certificate store (PR 7245)
+* Implement SSL_get_peer_signature_nid and SSL_get_peer_signature_type_nid (PR 7236)
+
## Enhancements and Optimizations
-* Better built in testing of “`--sys-ca-certs`†configure option (PR 6910)
-* Updated CMakeLists.txt for Espressif wolfSSL component usage (PR 6877)
-* Disable TLS 1.1 by default (unless SSL 3.0 or TLS 1.0 is enabled) (PR 6946)
-* Add “`--enable-quic`†to “`--enable-all`†configure option (PR 6957)
-* Add support to SP C implementation for RSA exponent up to 64-bits (PR 6959)
-* Add result of “`HAVE___UINT128_T`†to options.h for CMake builds (PR 6965)
-* Add optimized assembly for AES-GCM on ARM64 using hardware crypto instructions (PR 6967)
-* Add built-in cipher suite tests for DTLS 1.3 PQC (PR 6952)
-* Add wolfCrypt test and unit test to ctest (PR 6977)
-* Move OpenSSL compatibility crypto APIs into `ssl_crypto.c` file (PR 6935)
-* Validate time generated from XGMTIME() (PR 6958)
-* Allow wolfCrypt benchmark to run with microsecond accuracy (PR 6868)
-* Add GitHub Actions testing with nginx 1.24.0 (PR 6982)
-* Allow encoding of CA:FALSE BasicConstraint during cert generation (PR 6953)
-* Add CMake option to enable DTLS-SRTP (PR 6991)
-* Add CMake options for enabling QUIC and cURL (PR 7049)
-* Improve RSA blinding to make code more constant time (PR 6955)
-* Refactor AES-NI implementation macros to allow dynamic fallback to C (PR 6981)
-* Default to native Windows threading API on MinGW (PR 7015)
-* Return better error codes from OCSP response check (PR 7028)
-* Updated Espressif ESP32 TLS client and server examples (PR 6844)
-* Add/clean up support for ESP-IDF v5.1 for a variety of ESP32 chips (PR 7035, 7037)
-* Add API to choose dynamic certs based on client ciphers/sigalgs (PR 6963)
-* Improve Arduino IDE 1.5 project file to match recursive style (PR 7007)
-* Simplify and improve apple-universal build script (PR 7025)
+* Remove obsolete user-crypto functionality and Intel IPP support (PR 7097)
+* Support for RSA-PSS signatures with CRL use (PR 7119)
+* Enhancement for AES-GCM use with Xilsecure on Microblaze (PR 7051)
+* Support for crypto cb only build with ECC and NXP CAAM (PR 7269)
+* Improve liboqs integration adding locking and init/cleanup functions (PR 7026)
+* Prevent memory access before clientSession->serverRow and clientSession->serverIdx are sanitized (PR 7096)
+* Enhancements to reproducible build (PR 7267)
+* Update Arduino example TLS Client/Server and improve support for ESP32 (PR 7304 & 7177)
+* XC32 compiler version 4.x compatibility (PR 7128)
+* Porting for build on PlayStation 3 and 4 (PR 7072)
+* Improvements for Espressif use; SHA HW/SW selection and use on ESP32-C2/ESP8684, wolfSSL_NewThread() type, component cmake fix, and update TLS client example for ESP8266 (PR 7081, 7173, 7077, 7148, 7240)
+* Allow crypto callbacks with SHA-1 HW (PR 7087)
+* Update OpenSSH port to version 9.6p1(PR 7203)
+* ARM Thumb2 enhancements, AES-GCM support for GCM_SMALL, alignment fix on key, fix for ASM clobber list (PR 7291,7301,7221)
+* Expand heap hint support for static memory build with more x509 functions (PR 7136)
+* Improving ARMv8 ChaCha20 ASM (alignment) (PR 7182)
+* Unknown extension callback wolfSSL_CertManagerSetUnknownExtCallback added to CertManager (PR 7194)
+* Implement wc_rng_new_ex for use with devID’s with crypto callback (PR 7271)
+* Allow reading 0-RTT data after writing 0.5-RTT data (PR 7102)
+* Send alert on bad PSK binder error (PR 7235)
+* Enhancements to CMake build files for use with cross compiling (PR 7188)
+
## Fixes
-* Fix for async edge case with Intel QuickAssist/Cavium Nitrox (PR 6931)
-* Fix for building PKCS#7 with RSA disabled (PR 6902)
-* Fix for advancing output pointer in `wolfSSL_i2d_X509()` (PR 6891)
-* Fix for `EVP_EncodeBlock()` appending a newline (PR 6900)
-* Fix for `wolfSSL_RSA_verify_PKCS1_PSS()` with `RSA_PSS_SALTLEN_AUTO` (PR 6938)
-* Fixes for CODESonar reports around `isalpha()` and `isalnum()` calls (PR 6810)
-* Fix for SP ARM64 integer math to avoid compiler optimization issues (PR 6942)
-* Fix for SP Thumb2 inline assembly to add IAR build support (PR 6943, 6971)
-* Fix for SP Thumb2 to make functions not inlined (PR 6993)
-* Fix for SP Cortex-M assembly large build with IAR (PR 6954)
-* Fix for SP ARM64 assembly montgomery reduction by 4 (PR 6947)
-* Fix for SP ARM64 P-256 for not inlining functions for iOS compatibility (PR 6979)
-* Fix for `WOLFSSL_CALLBACKS` and potential memory error (PR 6949)
-* Fixes for wolfSSL’s Zephyr OS port (PR 6930)
-* Fix for build errors when building for NXP mmCAU (`FREESCALE_MMCAU`) (PR 6970)
-* Fix for TLS 1.3 `SendBuffered()` return code in non-blocking mode (PR 7001)
-* Fix for TLS `Hmac_UpdateFinal()` when padding byte is invalid (PR 6998)
-* Fix for ARMv8 AES-GCM streaming to check size of IV before storing (PR 6996)
-* Add missing calls to `wc_AesInit()` before `wc_AesSetKey()` (PR 7011)
-* Fix build errors with DTLS 1.3 enabled but TLS 1.2 disabled (PR 6976)
-* Fixes for building wolfSSL in Visual Studio (PR 7040)
+* Fix for checking result of MAC verify when no AAD is used with AES-GCM and Xilinx Xilsecure (PR 7051)
+* Fix for Aria sign use (PR 7082)
+* Fix for invalid `dh_ffdhe_test` test case using Intel QuickAssist (PR 7085)
+* Fixes for TI AES and SHA on TM4C with HW acceleration and add full AES GCM and CCM support with TLS (PR 7018)
+* Fixes for STM32 PKA use with ECC (PR 7098)
+* Fixes for TLS 1.3 with crypto callbacks to offload KDF / HMAC operation (PR 7070)
+* Fix include path for FSP 3.5 on Renesas RA6M4 (PR 7101)
+* Siphash x64 asm fix for use with older compilers (PR 7299)
+* Fix for SGX build with SP (PR 7308)
+* Fix to Make it mandatory that the cookie is sent back in new ClientHello when seen in a HelloRetryRequest with (PR 7190)
+* Fix for wrap around behavior with BIO pairs (PR 7169)
+* OCSP fixes for parsing of response correctly when there was a revocation reason and returning correct error value with date checks (PR 7241 & 7255)
+* Fix build with `NO_STDIO_FILESYSTEM` and improve checks for `XGETENV` (PR 7150)
+* Fix for DTLS sequence number and cookie when downgrading DTLS version (PR 7214)
+* Fix for write_dup use with chacha-poly cipher suites (PR 7206)
+* Fix for multiple handshake messages in one record failing with OUT_OF_ORDER_E when downgrading from TLS 1.3 to TLS 1.2 (PR 7141)
+* Fix for AES ECB build with Thumb and alignment (PR 7094)
+* Fix for negotiate handshake until the end in wolfSSL_read/wolfSSL_write if hitting an edge case with want read/write (PR 7237)
For additional vulnerability information visit the vulnerability page at:
https://www.wolfssl.com/docs/security-vulnerabilities/
@@ -190,3 +195,51 @@ More info can be found on-line at: https://wolfssl.com/wolfSSL/Docs.html
[wolfSSL Vulnerabilities](https://www.wolfssl.com/docs/security-vulnerabilities/)
[Additional wolfSSL Examples](https://github.com/wolfssl/wolfssl-examples)
+
+# Directory structure
+
+```
+<wolfssl_root>
+├── certs [Certificates used in tests and examples]
+├── cmake [Cmake build utilities]
+├── debian [Debian packaging files]
+├── doc [Documentation for wolfSSL (Doxygen)]
+├── Docker [Prebuilt Docker environments]
+├── examples [wolfSSL examples]
+│   ├── asn1 [ASN.1 printing example]
+│   ├── async [Asynchronous Cryptography example]
+│   ├── benchmark [TLS benchmark example]
+│   ├── client [Client example]
+│   ├── configs [Example build configurations]
+│   ├── echoclient [Echoclient example]
+│   ├── echoserver [Echoserver example]
+│   ├── pem [Example for convert between PEM and DER]
+│   ├── sctp [Servers and clients that demonstrate wolfSSL's DTLS-SCTP support]
+│   └── server [Server example]
+├── IDE [Contains example projects for various development environments]
+├── linuxkm [Linux Kernel Module implementation]
+├── m4 [Autotools utilities]
+├── mcapi [wolfSSL MPLAB X Project Files]
+├── mplabx [wolfSSL MPLAB X Project Files]
+├── mqx [wolfSSL Freescale CodeWarrior Project Files]
+├── rpm [RPM packaging metadata]
+├── RTOS
+│   └── nuttx [Port of wolfSSL for NuttX]
+├── scripts [Testing scripts]
+├── src [wolfSSL source code]
+├── sslSniffer [wolfSSL sniffer can be used to passively sniff SSL traffic]
+├── support [Contains the pkg-config file]
+├── tests [Unit and configuration testing]
+├── testsuite [Test application that orchestrates tests]
+├── tirtos [Port of wolfSSL for TI RTOS]
+├── wolfcrypt [The wolfCrypt component]
+│   ├── benchmark [Cryptography benchmarking application]
+│   ├── src [wolfCrypt source code]
+│   │   └── port [Supported hardware acceleration ports]
+│   └── test [Cryptography testing application]
+├── wolfssl [Header files]
+│   ├── openssl [Compatibility layer headers]
+│   └── wolfcrypt [Header files]
+├── wrapper [wolfSSL language wrappers]
+└── zephyr [Port of wolfSSL for Zephyr RTOS]
+```
diff --git a/extra/wolfssl/wolfssl/autogen.sh b/extra/wolfssl/wolfssl/autogen.sh
index d9ae0881..854aef45 100755
--- a/extra/wolfssl/wolfssl/autogen.sh
+++ b/extra/wolfssl/wolfssl/autogen.sh
@@ -16,34 +16,6 @@ if [ -n "$WSL_DISTRO_NAME" ]; then
fi
fi
-# Git hooks should come before autoreconf.
-if [ -d .git ]; then
- if [ ! -d .git/hooks ]; then
- mkdir .git/hooks || exit $?
- fi
-
- if [ -n "$no_links" ]; then
- echo "Linux ln does not work on shared Windows file system in WSL."
- if [ ! -e .git/hooks/pre-commit ]; then
- echo "The pre-commit.sh file will not be copied to .git/hooks/pre-commit"
- # shell scripts do not work on Windows; TODO create equivalent batch file
- # cp ./pre-commit.sh .git/hooks/pre-commit || exit $?
- fi
- if [ ! -e .git/hooks/pre-push ]; then
- echo "The pre-push.sh file will not be copied to .git/hooks/pre-commit"
- # shell scripts do not work on Windows; TODO create equivalent batch file
- # cp ./pre-push.sh .git/hooks/pre-push || exit $?
- fi
- else
- if [ ! -e .git/hooks/pre-commit ]; then
- ln -s ../../pre-commit.sh .git/hooks/pre-commit || exit $?
- fi
- if [ ! -e .git/hooks/pre-push ]; then
- ln -s ../../pre-push.sh .git/hooks/pre-push || exit $?
- fi
- fi
-fi
-
# if and as needed, create empty dummy versions of various files, mostly
# associated with fips/self-test and asynccrypt:
diff --git a/extra/wolfssl/wolfssl/certs/crl/caEcc384Crl.pem b/extra/wolfssl/wolfssl/certs/crl/caEcc384Crl.pem
index ab0833e0..cf3f9a1b 100644
--- a/extra/wolfssl/wolfssl/certs/crl/caEcc384Crl.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/caEcc384Crl.pem
@@ -1,10 +1,10 @@
-----BEGIN X509 CRL-----
-MIIBcjCB+AIBATAKBggqhkjOPQQDAjCBlzELMAkGA1UEBhMCVVMxEzARBgNVBAgM
+MIIBcTCB+AIBATAKBggqhkjOPQQDAjCBlzELMAkGA1UEBhMCVVMxEzARBgNVBAgM
Cldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxEDAOBgNVBAoMB3dvbGZTU0wx
FDASBgNVBAsMC0RldmVsb3BtZW50MRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
-HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTIzMTIxMzIyMTkzM1oX
-DTI2MDkwODIyMTkzM1qgLzAtMB8GA1UdIwQYMBaAFKvgwyZMGNRyu9KEjJwKBZKA
-ElNSMAoGA1UdFAQDAgEMMAoGCCqGSM49BAMCA2kAMGYCMQDiAhgtXMrlvYjxh1+q
-uqluR12ThFI1k8wTdFiGF0yToo3zpoxbaN5w33vBYVUZzCYCMQD76v5cIfO8RUBc
-f5tVsV7n7fGhwMPREOw0f0nmtl+qwNWSDDegMLtTdZyYF9ERdV0=
+HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTI0MDEwOTAwMzQzMFoX
+DTI2MTAwNTAwMzQzMFqgLzAtMB8GA1UdIwQYMBaAFKvgwyZMGNRyu9KEjJwKBZKA
+ElNSMAoGA1UdFAQDAgEMMAoGCCqGSM49BAMCA2gAMGUCMQCjqo2bmsEzvBpsVBfA
+7CXvvAoldG0sFKW75EvAUOFZYWC92/GDULxTxzOGqg81B5ICMEeFr+vl+RMQZfju
+ZY3eOC5PKW4z1LwneOUyoKu2joHBENLhsD+tSixSHumx+kmh2g==
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/caEccCrl.pem b/extra/wolfssl/wolfssl/certs/crl/caEccCrl.pem
index 4729407b..8574c307 100644
--- a/extra/wolfssl/wolfssl/certs/crl/caEccCrl.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/caEccCrl.pem
@@ -1,10 +1,10 @@
-----BEGIN X509 CRL-----
-MIIBUTCB+AIBATAKBggqhkjOPQQDAjCBlzELMAkGA1UEBhMCVVMxEzARBgNVBAgM
+MIIBUDCB+AIBATAKBggqhkjOPQQDAjCBlzELMAkGA1UEBhMCVVMxEzARBgNVBAgM
Cldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxEDAOBgNVBAoMB3dvbGZTU0wx
FDASBgNVBAsMC0RldmVsb3BtZW50MRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
-HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTIzMTIxMzIyMTkzM1oX
-DTI2MDkwODIyMTkzM1qgLzAtMB8GA1UdIwQYMBaAFFaOmsPwQt4YuUVVbvmTz+rD
-86UhMAoGA1UdFAQDAgELMAoGCCqGSM49BAMCA0gAMEUCICFj5IcBuGatpURtIwMU
-hSKkP11GeUUb5crLMcBKI2u9AiEArWyOTYXvODOGebzJONGEy7UQ9d+HUba3ROqc
-aGu35HE=
+HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTI0MDEwOTAwMzQzMFoX
+DTI2MTAwNTAwMzQzMFqgLzAtMB8GA1UdIwQYMBaAFFaOmsPwQt4YuUVVbvmTz+rD
+86UhMAoGA1UdFAQDAgELMAoGCCqGSM49BAMCA0cAMEQCIFuy1ACI/xzHowxHb4+6
+Ey9EPuLVgbvwLmVVSnDiwEkAAiB8BrOHHUMxK0ZFMZoAdRBgE/p32q9FdJJfAO0n
+VnFcxg==
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/cliCrl.pem b/extra/wolfssl/wolfssl/certs/crl/cliCrl.pem
index 00c48537..e20203ef 100644
--- a/extra/wolfssl/wolfssl/certs/crl/cliCrl.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/cliCrl.pem
@@ -2,41 +2,41 @@ Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Montana, L = Bozeman, O = wolfSSL_2048, OU = Programming-2048, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
8
Revoked Certificates:
Serial Number: 02
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Signature Algorithm: sha256WithRSAEncryption
- 74:17:9b:40:81:d2:a0:f3:26:68:44:5b:f8:a2:6c:3f:7e:71:
- 75:a2:7f:c6:e6:71:cb:f9:08:57:42:cd:3e:3f:ab:cd:0c:85:
- 36:45:58:8b:59:28:81:d9:b0:6b:10:4a:d0:7d:59:ad:cf:53:
- 05:cb:13:c7:c1:ec:65:64:6b:4d:e6:87:0b:ae:06:60:ab:8a:
- 3c:ae:c1:7d:ed:8f:ee:09:02:7a:3a:f2:21:bf:89:ef:cd:14:
- b1:03:64:2d:b2:b6:45:15:da:2d:ee:2d:c0:15:3b:a8:01:a8:
- 4f:30:61:ae:99:b9:16:07:b5:8b:71:8f:38:ac:69:82:39:90:
- 92:ff:d6:41:33:3b:92:5b:f2:dd:56:5a:8f:82:d1:1f:76:ee:
- ca:01:a2:ac:c0:22:41:dd:6e:e1:ce:06:b0:6f:bc:e2:da:91:
- 11:c1:a0:41:16:7d:ba:7e:a1:53:13:14:4b:54:3b:b9:44:cf:
- 4f:1c:ef:ce:a8:bd:e8:ab:ba:de:97:f7:b7:7d:4f:ab:7a:e7:
- 73:65:97:a1:d9:a3:f3:92:f1:95:06:6d:52:7b:6e:fd:26:56:
- 55:83:c7:71:f7:a4:8f:9a:2c:52:04:dd:9f:85:ab:9c:88:e1:
- 30:c6:4a:88:7d:20:1b:c6:47:8b:82:cc:9d:0f:51:69:b1:90:
- b2:8a:9c:74
+ 52:11:97:57:04:d7:e2:14:1f:c4:7f:a2:d8:cf:4c:b7:5b:0c:
+ d3:ac:ca:29:10:74:09:2f:3d:fb:4d:75:3e:32:21:5a:0f:41:
+ 5f:cc:e7:98:f8:ea:8e:e2:c9:57:60:b6:a3:b0:70:10:18:b9:
+ 86:a3:65:1e:3a:88:13:df:44:18:15:51:00:f6:33:d6:ab:90:
+ 18:93:df:ac:7d:15:5c:6a:63:55:d1:4d:41:37:03:89:86:65:
+ fa:fb:d7:b1:73:db:c3:43:08:ff:89:94:89:b1:b4:ad:96:78:
+ 52:92:50:8c:0a:5d:ca:29:8b:e0:bc:ca:88:c0:7a:52:48:d3:
+ cf:09:03:08:5f:a1:b9:16:b0:55:5e:11:60:7f:73:9a:98:05:
+ 54:97:bf:eb:0e:04:61:4f:b4:40:23:61:9a:07:69:78:fc:16:
+ de:f4:54:04:cf:f0:2b:07:8d:51:9e:6b:b5:77:c4:13:2c:a3:
+ 40:99:ed:fa:f4:00:4a:45:36:da:52:9d:dc:88:66:3e:03:f0:
+ 20:ce:54:a4:56:58:a8:9e:30:78:e8:42:2d:a8:0f:9b:c4:a9:
+ ab:13:c2:4e:ec:be:2e:99:16:56:2f:22:86:96:27:1d:30:80:
+ 7d:a5:f8:45:ef:93:b4:63:13:96:4f:6a:df:a0:11:3b:52:be:
+ 93:03:7a:81
-----BEGIN X509 CRL-----
MIICDjCB9wIBATANBgkqhkiG9w0BAQsFADCBnjELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xFTATBgNVBAoMDHdvbGZTU0xf
MjA0ODEZMBcGA1UECwwQUHJvZ3JhbW1pbmctMjA0ODEYMBYGA1UEAwwPd3d3Lndv
-bGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tFw0yMzEy
-MTMyMjE5MzNaFw0yNjA5MDgyMjE5MzNaMBQwEgIBAhcNMjMxMjEzMjIxOTMzWqAO
-MAwwCgYDVR0UBAMCAQgwDQYJKoZIhvcNAQELBQADggEBAHQXm0CB0qDzJmhEW/ii
-bD9+cXWif8bmccv5CFdCzT4/q80MhTZFWItZKIHZsGsQStB9Wa3PUwXLE8fB7GVk
-a03mhwuuBmCrijyuwX3tj+4JAno68iG/ie/NFLEDZC2ytkUV2i3uLcAVO6gBqE8w
-Ya6ZuRYHtYtxjzisaYI5kJL/1kEzO5Jb8t1WWo+C0R927soBoqzAIkHdbuHOBrBv
-vOLakRHBoEEWfbp+oVMTFEtUO7lEz08c786oveirut6X97d9T6t653Nll6HZo/OS
-8ZUGbVJ7bv0mVlWDx3H3pI+aLFIE3Z+Fq5yI4TDGSoh9IBvGR4uCzJ0PUWmxkLKK
-nHQ=
+bGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tFw0yNDAx
+MDkwMDM0MzBaFw0yNjEwMDUwMDM0MzBaMBQwEgIBAhcNMjQwMTA5MDAzNDMwWqAO
+MAwwCgYDVR0UBAMCAQgwDQYJKoZIhvcNAQELBQADggEBAFIRl1cE1+IUH8R/otjP
+TLdbDNOsyikQdAkvPftNdT4yIVoPQV/M55j46o7iyVdgtqOwcBAYuYajZR46iBPf
+RBgVUQD2M9arkBiT36x9FVxqY1XRTUE3A4mGZfr717Fz28NDCP+JlImxtK2WeFKS
+UIwKXcopi+C8yojAelJI088JAwhfobkWsFVeEWB/c5qYBVSXv+sOBGFPtEAjYZoH
+aXj8Ft70VATP8CsHjVGea7V3xBMso0CZ7fr0AEpFNtpSndyIZj4D8CDOVKRWWKie
+MHjoQi2oD5vEqasTwk7svi6ZFlYvIoaWJx0wgH2l+EXvk7RjE5ZPat+gETtSvpMD
+eoE=
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/crl.der b/extra/wolfssl/wolfssl/certs/crl/crl.der
index c6ec65c4..7ce490cd 100644
--- a/extra/wolfssl/wolfssl/certs/crl/crl.der
+++ b/extra/wolfssl/wolfssl/certs/crl/crl.der
Binary files differ
diff --git a/extra/wolfssl/wolfssl/certs/crl/crl.pem b/extra/wolfssl/wolfssl/certs/crl/crl.pem
index a4a09f0a..58312874 100644
--- a/extra/wolfssl/wolfssl/certs/crl/crl.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/crl.pem
@@ -2,40 +2,40 @@ Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
2
Revoked Certificates:
Serial Number: 02
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Signature Algorithm: sha256WithRSAEncryption
- 48:36:98:18:42:9c:0c:81:51:19:75:4b:26:9a:e0:07:18:89:
- a2:a1:bd:b6:4e:91:f2:44:93:1a:50:a1:8f:72:1f:c4:ae:99:
- 81:c5:00:3a:94:03:de:00:24:98:d4:2c:17:e5:ba:f2:29:3a:
- 43:c8:23:ba:73:6a:5c:99:5d:ba:80:dd:bd:4f:cd:53:a6:cf:
- 33:11:31:30:27:e2:d2:31:06:65:b8:3e:cf:fe:00:21:ff:0d:
- 18:4f:fc:fd:d5:80:75:72:7c:2e:44:c1:a1:26:a6:8a:88:c8:
- c0:66:1a:d4:99:36:ca:8f:67:42:8f:7c:f2:1a:e7:1b:d0:90:
- 05:22:0d:29:d3:35:57:23:8c:bb:d2:53:c1:a8:00:3c:d4:b3:
- 97:23:8a:4f:1d:8b:c9:73:6a:96:40:b0:a4:b1:c7:de:06:4d:
- a3:5d:6a:d2:f5:5c:1e:f0:21:0f:d1:fd:21:89:e2:9e:3d:c1:
- b2:f0:0f:5e:79:1e:47:48:92:bf:eb:96:28:ad:0b:89:5e:3b:
- ed:97:29:bb:8d:24:c2:e6:26:e5:33:ef:88:17:c1:1a:97:fa:
- 51:44:a2:cc:b2:64:e5:5c:94:54:ed:3b:7d:8f:34:4a:4b:d3:
- ca:62:f9:20:00:86:26:ea:1b:a9:b4:df:8f:f4:4d:d8:3e:95:
- aa:3b:43:1c
+ b3:6f:ed:72:d2:73:6a:77:bf:3a:55:bc:54:18:6a:71:bc:6a:
+ cc:cd:5d:90:f5:64:8d:1b:f0:e0:48:7b:f2:7b:06:86:53:63:
+ 9b:d8:24:15:10:b1:19:96:9b:d2:75:a8:25:a2:35:a9:14:d6:
+ d5:5e:53:e3:34:9d:f2:8b:07:19:9b:1f:f1:02:0f:04:46:e8:
+ b8:b6:f2:8d:c7:c0:15:3e:3e:8e:96:73:15:1e:62:f6:4e:2a:
+ f7:aa:a0:91:80:12:7f:81:0c:65:cc:38:be:58:6c:14:a5:21:
+ a1:8d:f7:8a:b9:24:f4:2d:ca:c0:67:43:0b:c8:1c:b4:7d:12:
+ 7f:a2:1b:19:0e:94:cf:7b:9f:75:a0:08:9a:67:3f:87:89:3e:
+ f8:58:a5:8a:1b:2d:da:9b:d0:1b:18:92:c3:d2:6a:d7:1c:fc:
+ 45:69:77:c3:57:65:75:99:9e:47:2a:20:25:ef:90:f2:5f:3b:
+ 7d:9c:7d:00:ea:92:54:eb:0b:e7:17:af:24:1a:f9:7c:83:50:
+ 68:1d:dc:5b:60:12:a7:52:78:d9:a9:b0:1f:59:48:36:c7:a6:
+ 97:34:c7:87:3f:ae:fd:a9:56:5d:48:cc:89:7a:79:60:8f:9b:
+ 2b:63:3c:b3:04:1d:5f:f7:20:d2:fd:f2:51:b1:96:93:13:5b:
+ ab:74:82:8b
-----BEGIN X509 CRL-----
MIICBDCB7QIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3Ro
MRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
-HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTIzMTIxMzIyMTkzM1oX
-DTI2MDkwODIyMTkzM1owFDASAgECFw0yMzEyMTMyMjE5MzNaoA4wDDAKBgNVHRQE
-AwIBAjANBgkqhkiG9w0BAQsFAAOCAQEASDaYGEKcDIFRGXVLJprgBxiJoqG9tk6R
-8kSTGlChj3IfxK6ZgcUAOpQD3gAkmNQsF+W68ik6Q8gjunNqXJlduoDdvU/NU6bP
-MxExMCfi0jEGZbg+z/4AIf8NGE/8/dWAdXJ8LkTBoSamiojIwGYa1Jk2yo9nQo98
-8hrnG9CQBSINKdM1VyOMu9JTwagAPNSzlyOKTx2LyXNqlkCwpLHH3gZNo11q0vVc
-HvAhD9H9IYninj3BsvAPXnkeR0iSv+uWKK0LiV477Zcpu40kwuYm5TPviBfBGpf6
-UUSizLJk5VyUVO07fY80SkvTymL5IACGJuobqbTfj/RN2D6VqjtDHA==
+HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTI0MDEwOTAwMzQzMFoX
+DTI2MTAwNTAwMzQzMFowFDASAgECFw0yNDAxMDkwMDM0MzBaoA4wDDAKBgNVHRQE
+AwIBAjANBgkqhkiG9w0BAQsFAAOCAQEAs2/tctJzane/OlW8VBhqcbxqzM1dkPVk
+jRvw4Eh78nsGhlNjm9gkFRCxGZab0nWoJaI1qRTW1V5T4zSd8osHGZsf8QIPBEbo
+uLbyjcfAFT4+jpZzFR5i9k4q96qgkYASf4EMZcw4vlhsFKUhoY33irkk9C3KwGdD
+C8gctH0Sf6IbGQ6Uz3ufdaAImmc/h4k++Filihst2pvQGxiSw9Jq1xz8RWl3w1dl
+dZmeRyogJe+Q8l87fZx9AOqSVOsL5xevJBr5fINQaB3cW2ASp1J42amwH1lINsem
+lzTHhz+u/alWXUjMiXp5YI+bK2M8swQdX/cg0v3yUbGWkxNbq3SCiw==
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/crl.revoked b/extra/wolfssl/wolfssl/certs/crl/crl.revoked
index 73252614..9dfc67fd 100644
--- a/extra/wolfssl/wolfssl/certs/crl/crl.revoked
+++ b/extra/wolfssl/wolfssl/certs/crl/crl.revoked
@@ -2,43 +2,43 @@ Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
3
Revoked Certificates:
Serial Number: 01
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Serial Number: 02
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Signature Algorithm: sha256WithRSAEncryption
- 72:6e:a4:64:36:6b:e8:e0:c5:1d:98:ef:ab:7e:7a:14:f2:8d:
- 99:d0:57:4b:76:ac:f4:89:60:cd:89:23:9d:01:34:f3:83:e5:
- 82:21:b3:48:c4:42:25:7f:ea:9f:74:5f:e8:b8:d6:71:bb:a2:
- 39:d8:ef:46:a8:13:ba:7d:44:ab:d6:13:65:18:de:b5:03:85:
- a7:c6:4f:0a:a0:6a:78:ba:7b:f7:ce:6e:ba:1c:ef:6f:b1:04:
- a8:ac:c6:de:3b:76:77:3e:3d:8b:ae:8b:2b:7e:c9:4f:77:31:
- 7f:1f:f5:04:2c:e9:cf:a1:56:c2:59:e9:be:49:9f:e8:67:a3:
- 42:66:05:21:02:64:82:b2:74:a7:4b:89:89:7d:43:1a:41:fd:
- 53:8c:d6:4f:27:04:2a:48:6b:9e:62:fa:4a:42:83:22:53:3f:
- 53:07:4f:bc:cd:8d:8d:cc:15:c6:ff:3c:af:7d:db:ab:dd:fa:
- 8f:65:86:86:2a:89:5e:3f:d5:4b:39:80:78:3f:6e:38:3b:6d:
- a5:5e:2c:9e:1d:2f:9c:62:12:b1:34:f2:95:64:37:dc:4b:20:
- dc:27:f3:de:81:67:b2:04:b0:14:b9:47:e3:65:e3:2f:35:27:
- c2:fc:22:db:24:bd:04:58:88:17:e3:42:3c:a5:ef:53:39:15:
- 54:52:ac:a1
+ 35:50:96:da:71:71:90:d5:b7:37:5a:a6:b9:09:07:2f:af:c9:
+ e0:02:32:6a:43:6e:20:ec:20:a4:ac:d0:39:a9:19:35:d0:d2:
+ 6f:bb:d1:cd:46:10:a7:cb:8a:be:0a:02:a2:91:f5:29:74:ee:
+ 34:83:a3:8c:a0:ca:39:af:94:4a:23:d7:56:57:6b:cc:c6:eb:
+ b0:ce:9f:0a:e1:b0:a8:12:6b:6a:8b:21:73:22:6f:49:41:cd:
+ fd:85:44:d1:fa:52:6b:2f:b2:2b:02:e7:43:0e:f1:92:bc:15:
+ 8f:22:28:49:25:69:93:d8:50:10:2f:93:e2:f5:b0:31:5c:eb:
+ 1a:35:e2:40:83:25:87:55:4d:c0:85:06:37:9e:23:44:80:a1:
+ f9:e2:eb:9c:90:28:7a:71:d8:55:a2:8b:70:32:31:33:26:70:
+ fe:1d:11:d5:4b:c1:04:47:19:59:44:8f:0b:0a:ec:d6:62:40:
+ 8a:6f:67:2e:6a:50:38:54:35:c9:f8:d5:ec:e8:ae:93:88:3d:
+ a0:40:81:2c:e0:fe:f7:c8:68:24:8e:41:04:88:af:94:82:97:
+ 75:e5:69:4c:22:1d:f9:67:53:a3:4c:a3:db:bf:55:08:e7:3a:
+ 07:67:a2:28:25:63:af:f8:0e:c7:d3:c1:77:ef:20:20:20:63:
+ 9e:5c:22:81
-----BEGIN X509 CRL-----
MIICGTCCAQECAQEwDQYJKoZIhvcNAQELBQAwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290
aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
-MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tFw0yMzEyMTMyMjE5MzNa
-Fw0yNjA5MDgyMjE5MzNaMCgwEgIBARcNMjMxMjEzMjIxOTMzWjASAgECFw0yMzEy
-MTMyMjE5MzNaoA4wDDAKBgNVHRQEAwIBAzANBgkqhkiG9w0BAQsFAAOCAQEAcm6k
-ZDZr6ODFHZjvq356FPKNmdBXS3as9IlgzYkjnQE084PlgiGzSMRCJX/qn3Rf6LjW
-cbuiOdjvRqgTun1Eq9YTZRjetQOFp8ZPCqBqeLp7985uuhzvb7EEqKzG3jt2dz49
-i66LK37JT3cxfx/1BCzpz6FWwlnpvkmf6GejQmYFIQJkgrJ0p0uJiX1DGkH9U4zW
-TycEKkhrnmL6SkKDIlM/UwdPvM2NjcwVxv88r33bq936j2WGhiqJXj/VSzmAeD9u
-ODttpV4snh0vnGISsTTylWQ33Esg3Cfz3oFnsgSwFLlH42XjLzUnwvwi2yS9BFiI
-F+NCPKXvUzkVVFKsoQ==
+MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tFw0yNDAxMDkwMDM0MzBa
+Fw0yNjEwMDUwMDM0MzBaMCgwEgIBARcNMjQwMTA5MDAzNDMwWjASAgECFw0yNDAx
+MDkwMDM0MzBaoA4wDDAKBgNVHRQEAwIBAzANBgkqhkiG9w0BAQsFAAOCAQEANVCW
+2nFxkNW3N1qmuQkHL6/J4AIyakNuIOwgpKzQOakZNdDSb7vRzUYQp8uKvgoCopH1
+KXTuNIOjjKDKOa+USiPXVldrzMbrsM6fCuGwqBJraoshcyJvSUHN/YVE0fpSay+y
+KwLnQw7xkrwVjyIoSSVpk9hQEC+T4vWwMVzrGjXiQIMlh1VNwIUGN54jRICh+eLr
+nJAoenHYVaKLcDIxMyZw/h0R1UvBBEcZWUSPCwrs1mJAim9nLmpQOFQ1yfjV7Oiu
+k4g9oECBLOD+98hoJI5BBIivlIKXdeVpTCId+WdTo0yj279VCOc6B2eiKCVjr/gO
+x9PBd+8gICBjnlwigQ==
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/crl2.der b/extra/wolfssl/wolfssl/certs/crl/crl2.der
index c6ec65c4..7ce490cd 100644
--- a/extra/wolfssl/wolfssl/certs/crl/crl2.der
+++ b/extra/wolfssl/wolfssl/certs/crl/crl2.der
Binary files differ
diff --git a/extra/wolfssl/wolfssl/certs/crl/crl2.pem b/extra/wolfssl/wolfssl/certs/crl/crl2.pem
index eb71f194..f722481b 100644
--- a/extra/wolfssl/wolfssl/certs/crl/crl2.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/crl2.pem
@@ -2,79 +2,79 @@ Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
2
Revoked Certificates:
Serial Number: 02
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Signature Algorithm: sha256WithRSAEncryption
- 48:36:98:18:42:9c:0c:81:51:19:75:4b:26:9a:e0:07:18:89:
- a2:a1:bd:b6:4e:91:f2:44:93:1a:50:a1:8f:72:1f:c4:ae:99:
- 81:c5:00:3a:94:03:de:00:24:98:d4:2c:17:e5:ba:f2:29:3a:
- 43:c8:23:ba:73:6a:5c:99:5d:ba:80:dd:bd:4f:cd:53:a6:cf:
- 33:11:31:30:27:e2:d2:31:06:65:b8:3e:cf:fe:00:21:ff:0d:
- 18:4f:fc:fd:d5:80:75:72:7c:2e:44:c1:a1:26:a6:8a:88:c8:
- c0:66:1a:d4:99:36:ca:8f:67:42:8f:7c:f2:1a:e7:1b:d0:90:
- 05:22:0d:29:d3:35:57:23:8c:bb:d2:53:c1:a8:00:3c:d4:b3:
- 97:23:8a:4f:1d:8b:c9:73:6a:96:40:b0:a4:b1:c7:de:06:4d:
- a3:5d:6a:d2:f5:5c:1e:f0:21:0f:d1:fd:21:89:e2:9e:3d:c1:
- b2:f0:0f:5e:79:1e:47:48:92:bf:eb:96:28:ad:0b:89:5e:3b:
- ed:97:29:bb:8d:24:c2:e6:26:e5:33:ef:88:17:c1:1a:97:fa:
- 51:44:a2:cc:b2:64:e5:5c:94:54:ed:3b:7d:8f:34:4a:4b:d3:
- ca:62:f9:20:00:86:26:ea:1b:a9:b4:df:8f:f4:4d:d8:3e:95:
- aa:3b:43:1c
+ b3:6f:ed:72:d2:73:6a:77:bf:3a:55:bc:54:18:6a:71:bc:6a:
+ cc:cd:5d:90:f5:64:8d:1b:f0:e0:48:7b:f2:7b:06:86:53:63:
+ 9b:d8:24:15:10:b1:19:96:9b:d2:75:a8:25:a2:35:a9:14:d6:
+ d5:5e:53:e3:34:9d:f2:8b:07:19:9b:1f:f1:02:0f:04:46:e8:
+ b8:b6:f2:8d:c7:c0:15:3e:3e:8e:96:73:15:1e:62:f6:4e:2a:
+ f7:aa:a0:91:80:12:7f:81:0c:65:cc:38:be:58:6c:14:a5:21:
+ a1:8d:f7:8a:b9:24:f4:2d:ca:c0:67:43:0b:c8:1c:b4:7d:12:
+ 7f:a2:1b:19:0e:94:cf:7b:9f:75:a0:08:9a:67:3f:87:89:3e:
+ f8:58:a5:8a:1b:2d:da:9b:d0:1b:18:92:c3:d2:6a:d7:1c:fc:
+ 45:69:77:c3:57:65:75:99:9e:47:2a:20:25:ef:90:f2:5f:3b:
+ 7d:9c:7d:00:ea:92:54:eb:0b:e7:17:af:24:1a:f9:7c:83:50:
+ 68:1d:dc:5b:60:12:a7:52:78:d9:a9:b0:1f:59:48:36:c7:a6:
+ 97:34:c7:87:3f:ae:fd:a9:56:5d:48:cc:89:7a:79:60:8f:9b:
+ 2b:63:3c:b3:04:1d:5f:f7:20:d2:fd:f2:51:b1:96:93:13:5b:
+ ab:74:82:8b
-----BEGIN X509 CRL-----
MIICBDCB7QIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3Ro
MRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
-HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTIzMTIxMzIyMTkzM1oX
-DTI2MDkwODIyMTkzM1owFDASAgECFw0yMzEyMTMyMjE5MzNaoA4wDDAKBgNVHRQE
-AwIBAjANBgkqhkiG9w0BAQsFAAOCAQEASDaYGEKcDIFRGXVLJprgBxiJoqG9tk6R
-8kSTGlChj3IfxK6ZgcUAOpQD3gAkmNQsF+W68ik6Q8gjunNqXJlduoDdvU/NU6bP
-MxExMCfi0jEGZbg+z/4AIf8NGE/8/dWAdXJ8LkTBoSamiojIwGYa1Jk2yo9nQo98
-8hrnG9CQBSINKdM1VyOMu9JTwagAPNSzlyOKTx2LyXNqlkCwpLHH3gZNo11q0vVc
-HvAhD9H9IYninj3BsvAPXnkeR0iSv+uWKK0LiV477Zcpu40kwuYm5TPviBfBGpf6
-UUSizLJk5VyUVO07fY80SkvTymL5IACGJuobqbTfj/RN2D6VqjtDHA==
+HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTI0MDEwOTAwMzQzMFoX
+DTI2MTAwNTAwMzQzMFowFDASAgECFw0yNDAxMDkwMDM0MzBaoA4wDDAKBgNVHRQE
+AwIBAjANBgkqhkiG9w0BAQsFAAOCAQEAs2/tctJzane/OlW8VBhqcbxqzM1dkPVk
+jRvw4Eh78nsGhlNjm9gkFRCxGZab0nWoJaI1qRTW1V5T4zSd8osHGZsf8QIPBEbo
+uLbyjcfAFT4+jpZzFR5i9k4q96qgkYASf4EMZcw4vlhsFKUhoY33irkk9C3KwGdD
+C8gctH0Sf6IbGQ6Uz3ufdaAImmc/h4k++Filihst2pvQGxiSw9Jq1xz8RWl3w1dl
+dZmeRyogJe+Q8l87fZx9AOqSVOsL5xevJBr5fINQaB3cW2ASp1J42amwH1lINsem
+lzTHhz+u/alWXUjMiXp5YI+bK2M8swQdX/cg0v3yUbGWkxNbq3SCiw==
-----END X509 CRL-----
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Montana, L = Bozeman, O = wolfSSL_2048, OU = Programming-2048, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
1
No Revoked Certificates.
Signature Algorithm: sha256WithRSAEncryption
- 38:bd:b1:ed:0c:8b:5d:f2:e3:de:48:7b:03:16:a7:09:4c:98:
- 03:9d:a7:50:1d:56:57:a6:6f:e1:7d:4c:32:31:f3:55:28:4a:
- d3:b5:55:a7:7d:f8:43:46:cf:7c:64:66:2e:0e:bc:e6:43:41:
- c1:b8:b4:a0:db:68:92:3b:d4:a1:ef:47:44:fe:f6:e4:33:45:
- 18:62:cb:e5:04:44:44:07:83:e4:62:c4:d0:52:63:94:b0:1a:
- 43:bf:01:91:de:05:66:ae:6d:88:78:94:d9:c6:5e:a9:28:52:
- 93:2b:24:00:3f:d3:f7:6c:ca:27:b6:9b:8e:8f:61:a3:ac:3b:
- e5:62:54:09:6f:c5:52:fb:87:9a:36:e0:51:14:5d:52:f9:42:
- 48:f1:18:20:bf:b3:98:c2:d4:a2:55:9e:7e:42:9b:01:59:fc:
- 64:3c:bb:05:46:09:ab:16:8a:f8:08:b7:f7:3d:01:8e:1b:60:
- ba:e0:8f:e8:fe:6b:38:bc:23:af:52:31:bc:f3:a0:60:71:c4:
- 9a:29:49:46:5b:c2:f8:ff:c9:f6:8a:1a:c6:5c:9f:e5:bb:c0:
- bf:6e:7b:26:8b:5a:6a:91:80:82:40:2e:48:96:b7:6a:8f:74:
- 75:6d:54:d7:4d:2a:81:7f:01:02:bd:6e:cf:37:50:de:bb:52:
- b6:40:eb:ad
+ 48:97:27:ce:47:2d:c9:e5:a9:7d:ac:6a:36:29:92:0d:bf:b7:
+ 17:04:cb:7b:1c:a1:ce:e8:45:6d:c8:b9:a2:81:16:74:9d:b1:
+ b5:06:5f:46:64:06:74:e4:6a:79:13:27:a2:ed:f4:7e:73:0b:
+ c4:6e:99:9a:35:a7:8b:02:69:92:6d:80:da:dd:5c:fd:05:e0:
+ 0e:4b:ee:5b:55:5c:a7:d0:c2:83:f3:41:62:86:f1:b3:f2:67:
+ 48:6b:b2:3e:3f:b2:1d:aa:63:54:3a:43:62:9a:9e:87:ef:49:
+ 36:dc:29:36:74:8b:7d:d7:04:b8:38:6d:55:5a:56:db:a1:72:
+ cf:bd:9f:cc:b4:59:f4:65:06:fb:a4:80:48:98:1c:1f:c9:b8:
+ c6:b2:3e:47:c5:2f:f3:f4:ca:45:97:4c:20:08:72:90:5f:c3:
+ e9:b8:4d:04:4b:1c:43:7d:b0:e3:34:59:9c:5f:db:ad:c3:87:
+ 11:3f:eb:8c:75:5f:2f:b8:84:12:c1:73:f1:ec:f8:2e:36:b9:
+ 5d:3e:a9:9d:70:dd:24:84:77:de:29:b8:73:39:70:6b:44:91:
+ cb:bf:b5:fc:b8:6f:93:75:8c:58:f4:aa:79:8f:70:24:5d:75:
+ 19:e7:9a:08:6a:8e:cd:8d:cc:17:d2:6f:76:d5:40:99:1c:e8:
+ 53:99:4e:f0
-----BEGIN X509 CRL-----
MIIB+DCB4QIBATANBgkqhkiG9w0BAQsFADCBnjELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xFTATBgNVBAoMDHdvbGZTU0xf
MjA0ODEZMBcGA1UECwwQUHJvZ3JhbW1pbmctMjA0ODEYMBYGA1UEAwwPd3d3Lndv
-bGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tFw0yMzEy
-MTMyMjE5MzNaFw0yNjA5MDgyMjE5MzNaoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG
-9w0BAQsFAAOCAQEAOL2x7QyLXfLj3kh7AxanCUyYA52nUB1WV6Zv4X1MMjHzVShK
-07VVp334Q0bPfGRmLg685kNBwbi0oNtokjvUoe9HRP725DNFGGLL5QRERAeD5GLE
-0FJjlLAaQ78Bkd4FZq5tiHiU2cZeqShSkyskAD/T92zKJ7abjo9ho6w75WJUCW/F
-UvuHmjbgURRdUvlCSPEYIL+zmMLUolWefkKbAVn8ZDy7BUYJqxaK+Ai39z0Bjhtg
-uuCP6P5rOLwjr1IxvPOgYHHEmilJRlvC+P/J9ooaxlyf5bvAv257JotaapGAgkAu
-SJa3ao90dW1U100qgX8BAr1uzzdQ3rtStkDrrQ==
+bGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tFw0yNDAx
+MDkwMDM0MzBaFw0yNjEwMDUwMDM0MzBaoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG
+9w0BAQsFAAOCAQEASJcnzkctyeWpfaxqNimSDb+3FwTLexyhzuhFbci5ooEWdJ2x
+tQZfRmQGdORqeRMnou30fnMLxG6ZmjWniwJpkm2A2t1c/QXgDkvuW1Vcp9DCg/NB
+Yobxs/JnSGuyPj+yHapjVDpDYpqeh+9JNtwpNnSLfdcEuDhtVVpW26Fyz72fzLRZ
+9GUG+6SASJgcH8m4xrI+R8Uv8/TKRZdMIAhykF/D6bhNBEscQ32w4zRZnF/brcOH
+ET/rjHVfL7iEEsFz8ez4Lja5XT6pnXDdJIR33im4czlwa0SRy7+1/Lhvk3WMWPSq
+eY9wJF11GeeaCGqOzY3MF9JvdtVAmRzoU5lO8A==
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/crl_rsapss.pem b/extra/wolfssl/wolfssl/certs/crl/crl_rsapss.pem
new file mode 100644
index 00000000..fab27b61
--- /dev/null
+++ b/extra/wolfssl/wolfssl/certs/crl/crl_rsapss.pem
@@ -0,0 +1,53 @@
+Certificate Revocation List (CRL):
+ Version 2 (0x1)
+ Signature Algorithm: rsassaPss
+ Hash Algorithm: sha256
+ Mask Algorithm: mgf1 with sha256
+ Salt Length: 0x20
+ Trailer Field: 0xBC (default)
+ Issuer: C = US, ST = Montana, L = Bozeman, O = wolfSSL_RSAPSS, OU = CA-RSAPSS, CN = www.wolfssl.com, emailAddress = info@wolfssl.com, UID = wolfSSL
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
+ CRL extensions:
+ X509v3 CRL Number:
+ 13
+Revoked Certificates:
+ Serial Number: 01
+ Revocation Date: Jan 9 00:34:30 2024 GMT
+ Signature Algorithm: rsassaPss
+ Hash Algorithm: sha256
+ Mask Algorithm: mgf1 with sha256
+ Salt Length: 0x20
+ Trailer Field: 0xBC (default)
+
+ 68:74:81:f0:7e:55:bb:ea:38:4e:ae:d5:b2:b6:c2:6a:53:fa:
+ 2a:23:07:d0:b8:76:66:74:cb:ba:e7:b2:66:ac:19:1d:b5:ba:
+ ab:e7:de:f2:84:10:e5:df:57:ea:19:f4:2c:af:d8:61:b3:09:
+ 31:e4:b3:94:08:65:52:03:b4:5c:7b:d0:44:37:59:df:d3:13:
+ 09:f7:da:34:a1:d0:8d:e8:c7:73:05:60:15:a2:ef:a1:94:31:
+ 0b:a7:ee:3d:25:12:19:6a:e5:29:30:3c:97:82:ed:a5:db:f3:
+ 54:7f:2a:73:c2:be:0d:25:30:9b:d4:c0:77:99:db:55:dd:d2:
+ f7:88:d0:8b:74:66:00:65:14:d6:c6:4c:a8:de:cf:54:19:bf:
+ 3a:d9:6a:80:4a:85:87:f6:ec:3d:3d:01:67:54:ea:82:7f:d5:
+ c3:37:3b:c3:d0:82:ce:01:30:bf:30:a0:c2:04:70:ab:5b:02:
+ 05:2f:ca:f1:e2:49:d3:50:04:e4:f2:77:08:16:5a:45:95:6c:
+ c9:80:72:a7:e6:b6:97:d4:22:5d:b7:f9:3a:5e:d0:be:6a:53:
+ 44:35:fc:e9:45:3b:56:4a:1d:06:38:8e:5b:1b:fe:a2:0b:5b:
+ c2:5d:5e:99:84:7e:ba:c4:5c:b5:43:1d:a2:9b:b3:05:bd:33:
+ 38:8e:2c:e8
+-----BEGIN X509 CRL-----
+MIICgzCCATsCAQEwPQYJKoZIhvcNAQEKMDCgDTALBglghkgBZQMEAgGhGjAYBgkq
+hkiG9w0BAQgwCwYJYIZIAWUDBAIBogMCASAwgbIxCzAJBgNVBAYTAlVTMRAwDgYD
+VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMRcwFQYDVQQKDA53b2xmU1NM
+X1JTQVBTUzESMBAGA1UECwwJQ0EtUlNBUFNTMRgwFgYDVQQDDA93d3cud29sZnNz
+bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20xFzAVBgoJkiaJ
+k/IsZAEBDAd3b2xmU1NMFw0yNDAxMDkwMDM0MzBaFw0yNjEwMDUwMDM0MzBaMBQw
+EgIBARcNMjQwMTA5MDAzNDMwWqAOMAwwCgYDVR0UBAMCAQ0wPQYJKoZIhvcNAQEK
+MDCgDTALBglghkgBZQMEAgGhGjAYBgkqhkiG9w0BAQgwCwYJYIZIAWUDBAIBogMC
+ASADggEBAGh0gfB+VbvqOE6u1bK2wmpT+iojB9C4dmZ0y7rnsmasGR21uqvn3vKE
+EOXfV+oZ9Cyv2GGzCTHks5QIZVIDtFx70EQ3Wd/TEwn32jSh0I3ox3MFYBWi76GU
+MQun7j0lEhlq5SkwPJeC7aXb81R/KnPCvg0lMJvUwHeZ21Xd0veI0It0ZgBlFNbG
+TKjez1QZvzrZaoBKhYf27D09AWdU6oJ/1cM3O8PQgs4BML8woMIEcKtbAgUvyvHi
+SdNQBOTydwgWWkWVbMmAcqfmtpfUIl23+Tpe0L5qU0Q1/OlFO1ZKHQY4jlsb/qIL
+W8JdXpmEfrrEXLVDHaKbswW9MziOLOg=
+-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/eccCliCRL.pem b/extra/wolfssl/wolfssl/certs/crl/eccCliCRL.pem
index 86fa84a0..f7a8c177 100644
--- a/extra/wolfssl/wolfssl/certs/crl/eccCliCRL.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/eccCliCRL.pem
@@ -2,25 +2,25 @@ Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: ecdsa-with-SHA256
Issuer: C = US, ST = Oregon, L = Salem, O = Client ECC, OU = Fast, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
9
Revoked Certificates:
Serial Number: 02
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Signature Algorithm: ecdsa-with-SHA256
- 30:45:02:21:00:dc:a7:bf:34:1b:68:b6:54:0c:38:8d:46:41:
- 84:bf:fa:f0:96:00:89:a6:81:4a:0f:15:12:ef:15:98:f7:51:
- 95:02:20:08:57:33:0d:c1:a5:c6:83:63:49:96:8c:71:41:7b:
- 40:92:67:80:d6:23:62:2a:c2:f2:43:5a:92:9b:9b:d6:83
+ 30:45:02:20:3b:07:f1:6c:fb:19:62:f2:56:2a:5c:21:a3:7d:
+ bf:06:33:3e:b4:53:01:f3:f5:0e:e6:ca:f5:b9:26:7e:4d:ca:
+ 02:21:00:dd:04:d6:b1:18:01:b7:d6:ca:d9:7b:29:53:cf:9e:
+ ad:38:ef:fa:70:2c:41:74:ba:ce:e6:77:1f:22:86:f0:e3
-----BEGIN X509 CRL-----
MIIBPDCB4wIBATAKBggqhkjOPQQDAjCBjTELMAkGA1UEBhMCVVMxDzANBgNVBAgM
Bk9yZWdvbjEOMAwGA1UEBwwFU2FsZW0xEzARBgNVBAoMCkNsaWVudCBFQ0MxDTAL
BgNVBAsMBEZhc3QxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3
-DQEJARYQaW5mb0B3b2xmc3NsLmNvbRcNMjMxMjEzMjIxOTMzWhcNMjYwOTA4MjIx
-OTMzWjAUMBICAQIXDTIzMTIxMzIyMTkzM1qgDjAMMAoGA1UdFAQDAgEJMAoGCCqG
-SM49BAMCA0gAMEUCIQDcp780G2i2VAw4jUZBhL/68JYAiaaBSg8VEu8VmPdRlQIg
-CFczDcGlxoNjSZaMcUF7QJJngNYjYirC8kNakpub1oM=
+DQEJARYQaW5mb0B3b2xmc3NsLmNvbRcNMjQwMTA5MDAzNDMwWhcNMjYxMDA1MDAz
+NDMwWjAUMBICAQIXDTI0MDEwOTAwMzQzMFqgDjAMMAoGA1UdFAQDAgEJMAoGCCqG
+SM49BAMCA0gAMEUCIDsH8Wz7GWLyVipcIaN9vwYzPrRTAfP1DubK9bkmfk3KAiEA
+3QTWsRgBt9bK2XspU8+erTjv+nAsQXS6zuZ3HyKG8OM=
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/eccSrvCRL.pem b/extra/wolfssl/wolfssl/certs/crl/eccSrvCRL.pem
index 8cd5091c..2b6bc71c 100644
--- a/extra/wolfssl/wolfssl/certs/crl/eccSrvCRL.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/eccSrvCRL.pem
@@ -2,25 +2,25 @@ Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: ecdsa-with-SHA256
Issuer: C = US, ST = Washington, L = Seattle, O = Elliptic, OU = ECC, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
- Last Update: Dec 13 22:19:33 2023 GMT
- Next Update: Sep 8 22:19:33 2026 GMT
+ Last Update: Jan 9 00:34:30 2024 GMT
+ Next Update: Oct 5 00:34:30 2026 GMT
CRL extensions:
X509v3 CRL Number:
10
Revoked Certificates:
Serial Number: 02
- Revocation Date: Dec 13 22:19:33 2023 GMT
+ Revocation Date: Jan 9 00:34:30 2024 GMT
Signature Algorithm: ecdsa-with-SHA256
- 30:45:02:21:00:a9:26:ab:1a:4a:be:5c:92:da:9d:17:0a:b5:
- f6:40:ea:84:93:ce:57:b8:af:68:75:e8:e9:de:a7:27:e7:79:
- 48:02:20:11:d4:03:97:19:2a:28:04:70:28:bb:5e:6a:b7:f6:
- 32:90:f1:92:ff:48:7c:cf:e7:94:0f:ce:63:de:f8:fc:6c
+ 30:45:02:20:4e:83:3e:21:ee:69:a6:f2:7e:87:45:10:5c:60:
+ ad:24:49:1e:0f:9e:1f:81:03:00:43:a9:e6:1b:63:27:3f:6b:
+ 02:21:00:b2:7f:bd:3d:af:c4:f5:ff:82:3f:b7:6a:56:25:7c:
+ 07:85:54:d9:19:44:42:60:b4:8a:e3:55:f4:a4:96:c7:d1
-----BEGIN X509 CRL-----
MIIBPzCB5gIBATAKBggqhkjOPQQDAjCBkDELMAkGA1UEBhMCVVMxEzARBgNVBAgM
Cldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxETAPBgNVBAoMCEVsbGlwdGlj
MQwwCgYDVQQLDANFQ0MxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
-SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbRcNMjMxMjEzMjIxOTMzWhcNMjYwOTA4
-MjIxOTMzWjAUMBICAQIXDTIzMTIxMzIyMTkzM1qgDjAMMAoGA1UdFAQDAgEKMAoG
-CCqGSM49BAMCA0gAMEUCIQCpJqsaSr5cktqdFwq19kDqhJPOV7ivaHXo6d6nJ+d5
-SAIgEdQDlxkqKARwKLtearf2MpDxkv9IfM/nlA/OY974/Gw=
+SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbRcNMjQwMTA5MDAzNDMwWhcNMjYxMDA1
+MDAzNDMwWjAUMBICAQIXDTI0MDEwOTAwMzQzMFqgDjAMMAoGA1UdFAQDAgEKMAoG
+CCqGSM49BAMCA0gAMEUCIE6DPiHuaabyfodFEFxgrSRJHg+eH4EDAEOp5htjJz9r
+AiEAsn+9Pa/E9f+CP7dqViV8B4VU2RlEQmC0iuNV9KSWx9E=
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/extra-crls/ca-int-cert-revoked.pem b/extra/wolfssl/wolfssl/certs/crl/extra-crls/ca-int-cert-revoked.pem
index 16b02cd9..598502ae 100644
--- a/extra/wolfssl/wolfssl/certs/crl/extra-crls/ca-int-cert-revoked.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/extra-crls/ca-int-cert-revoked.pem
@@ -2,12 +2,12 @@
MIICBTCB7gIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3Ro
MRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
-HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTIzMTIxMzIyMTkzM1oX
-DTI2MDkwODIyMTkzM1owFTATAgIQABcNMjMxMjEzMjIxOTMzWqAOMAwwCgYDVR0U
-BAMCAQUwDQYJKoZIhvcNAQELBQADggEBACmOUprDH201Mv2gW5wiighBTzH10Lwv
-tKJtoehgsTPgsWPk7BaDTsgzLqrk5g7Nlhe1by5UNGgRbHNBzK+TQgeOtdEE0npr
-PITh7Kmtk8rAKygYjDHPtamJLc0oJcpRkVIB7PiyKs8LUlVr+Cv3m6F5I9K5pxc8
-9FXVlrVfAuN8KDC68SPlmpCsWh8v11lXRyy7sMg/ScLvBxTYiehe54kS/IUnjx1E
-eKbgRGKf0alznvdQizMhkX4XJ1gbxdeAzbxO0vsCdgevj4uSyizYKzuMkilqzure
-KGgSLade8ZwS952XPRLHGmPEeVfaDs5qdXBC6Ov9Tg+IVfmY9FO2Tp4=
+HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTI0MDEwOTAwMzQzMFoX
+DTI2MTAwNTAwMzQzMFowFTATAgIQABcNMjQwMTA5MDAzNDMwWqAOMAwwCgYDVR0U
+BAMCAQUwDQYJKoZIhvcNAQELBQADggEBAHeXXNQirv4s301n52RKjlA2GgYMtqKU
+pNmZhFVY91LH4JUb93+iHfeBACD7ELUF0lHY6WEk26cL9JU3+2PKE/CqhmLtmtLE
+hksE55zfOep+WzeQrngJTEJrsS5ptkCI38NX7uzOn1PC5bX70LdzC4v8wZpZuxCf
+VVgORds34s8Hdwq5Scx2qdgip3XTPoxJYIG+iBRp1zg9DM/RIOgCtSISkB9AU2wJ
+obFgLNAuhJue6swyo4rj++V6g38ojrZoknwmgZ3qIo4AwZt5o1UhVBkJbXYpbyi6
+bDlDuvJ2SNoaAcGsNjT8Opy61ti729wI/hOqUDn0WqsinFhljpRqW04=
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/extra-crls/general-server-crl.pem b/extra/wolfssl/wolfssl/certs/crl/extra-crls/general-server-crl.pem
index d547b88f..eab9266e 100644
--- a/extra/wolfssl/wolfssl/certs/crl/extra-crls/general-server-crl.pem
+++ b/extra/wolfssl/wolfssl/certs/crl/extra-crls/general-server-crl.pem
@@ -2,12 +2,12 @@
MIICBDCB7QIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3Ro
MRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
-HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTIzMTIxMzIyMTkzM1oX
-DTI2MDkwODIyMTkzM1owFDASAgEBFw0yMzEyMTMyMjE5MzNaoA4wDDAKBgNVHRQE
-AwIBBDANBgkqhkiG9w0BAQsFAAOCAQEAkoJhgjUEmUasZKFCVTZ0yLC+AoCpm10E
-den4O2yCm6N6NNlOuCbJr34iHSFHeS4Dal0phM6fl6wQTiC5zdVlG4Tnq+RlBVNk
-/15jGnjTH20bEc+2KS855GvTe9LhP/HgwS1usLhfR8YwVMSFL2NbFO+HEMD9ULx5
-UkGg9I9ehAcp42uR8RpWkeoLoWzbiw+YaBNZPdzYIylW4RqeLX3D+QhDGEnk3pR/
-Zvl3NcmLKMghXy9hMFEqu0A/G0lC5U2Oo+7jWcjO2Kn8QzCfbXrieIJ/0R4i2tUj
-wtmZ4mKVqaD66x/mSXYPpX52p5RTD7R3k+04w9FzLk73LuM69WQr5w==
+HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTI0MDEwOTAwMzQzMFoX
+DTI2MTAwNTAwMzQzMFowFDASAgEBFw0yNDAxMDkwMDM0MzBaoA4wDDAKBgNVHRQE
+AwIBBDANBgkqhkiG9w0BAQsFAAOCAQEAWFcHDGDzEVttKWzvWv88rkJhBQihzcbm
+I5qlXrccNXrC+7fqHcXp2crCE0o75tnrXkcAL7YWeKcO1SkfIuyd84N73JrEECmf
+MaJEVgQrGmuqyLk8p3cq+Rqomyc1KxpxIzUkX7BL6ZCMZGWvvybcA51F+zX+9cMa
+jAFR7Ta9byN+TyrDDxecqhGgs/hjfTdXg2NABZjLjFZ3Eo4JO7aio6DgCygIncZX
+46xDMqYnl0fOl6+GNBmRdt16O3LXNRFJyvFx/sXBmAVa3/Sfq7UoF+zyT/k0zInu
+qfwBkM/hdrpfH2ZyzyDHC4/NXOv/tLZWfbakXAUWZpRx04Wyi8WKyw==
-----END X509 CRL-----
diff --git a/extra/wolfssl/wolfssl/certs/crl/gencrls.sh b/extra/wolfssl/wolfssl/certs/crl/gencrls.sh
index e509d962..98deb7e4 100755
--- a/extra/wolfssl/wolfssl/certs/crl/gencrls.sh
+++ b/extra/wolfssl/wolfssl/certs/crl/gencrls.sh
@@ -202,4 +202,21 @@ echo "Step 26"
openssl crl -in crl.pem -inform PEM -out crl.der -outform DER
openssl crl -in crl2.pem -inform PEM -out crl2.der -outform DER
+# clear state for RSA-PSS revoke
+cp blank.index.txt demoCA/index.txt
+
+echo "Step 27 RSA-PSS revoke"
+openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../rsapss/server-rsapss.pem -keyfile ../rsapss/ca-rsapss-priv.pem -cert ../rsapss/ca-rsapss.pem
+check_result $?
+
+echo "Step 28 RSA-PSS"
+openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out crl_rsapss.pem -keyfile ../rsapss/ca-rsapss-priv.pem -cert ../rsapss/ca-rsapss.pem
+check_result $?
+
+# metadata
+echo "Step 29"
+openssl crl -in crl_rsapss.pem -text > tmp
+check_result $?
+mv tmp crl_rsapss.pem
+
exit 0
diff --git a/extra/wolfssl/wolfssl/certs/crl/include.am b/extra/wolfssl/wolfssl/certs/crl/include.am
index 91f09bd0..d3194933 100644
--- a/extra/wolfssl/wolfssl/certs/crl/include.am
+++ b/extra/wolfssl/wolfssl/certs/crl/include.am
@@ -15,7 +15,8 @@ EXTRA_DIST += \
certs/crl/caEcc384Crl.pem \
certs/crl/wolfssl.cnf \
certs/crl/crl.der \
- certs/crl/crl2.der
+ certs/crl/crl2.der \
+ certs/crl/crl_rsapss.pem
EXTRA_DIST += \
certs/crl/crl.revoked \
diff --git a/extra/wolfssl/wolfssl/certs/include.am b/extra/wolfssl/wolfssl/certs/include.am
index 637b6b2d..de8d2edf 100644
--- a/extra/wolfssl/wolfssl/certs/include.am
+++ b/extra/wolfssl/wolfssl/certs/include.am
@@ -51,6 +51,7 @@ EXTRA_DIST += \
certs/server-revoked-key.pem \
certs/wolfssl-website-ca.pem \
certs/test-degenerate.p7b \
+ certs/test-stream-sign.p7b \
certs/test-ber-exp02-05-2022.p7b \
certs/test-servercert.p12 \
certs/test-servercert-rc2.p12 \
diff --git a/extra/wolfssl/wolfssl/certs/renewcerts.sh b/extra/wolfssl/wolfssl/certs/renewcerts.sh
index a25385d5..d2482f51 100755
--- a/extra/wolfssl/wolfssl/certs/renewcerts.sh
+++ b/extra/wolfssl/wolfssl/certs/renewcerts.sh
@@ -838,6 +838,7 @@ run_renewcerts(){
cd ./crl || { echo "Failed to switch to dir ./crl"; exit 1; }
echo "changed directory: cd/crl"
echo ""
+ # has dependency on rsapss generation (rsapss should be ran first)
./gencrls.sh
check_result $? "gencrls.sh"
echo "ran ./gencrls.sh"
@@ -853,6 +854,10 @@ run_renewcerts(){
echo ""
openssl crl2pkcs7 -nocrl -certfile ./client-cert.pem -out test-degenerate.p7b -outform DER
check_result $? ""
+
+ openssl smime -sign -in ./ca-cert.pem -out test-stream-sign.p7b -signer ./ca-cert.pem -nodetach -nocerts -binary -outform DER -stream -inkey ./ca-key.pem
+ check_result $? ""
+
echo "End of section"
echo "---------------------------------------------------------------------"
diff --git a/extra/wolfssl/wolfssl/certs/test-stream-sign.p7b b/extra/wolfssl/wolfssl/certs/test-stream-sign.p7b
new file mode 100644
index 00000000..05f6643c
--- /dev/null
+++ b/extra/wolfssl/wolfssl/certs/test-stream-sign.p7b
Binary files differ
diff --git a/extra/wolfssl/wolfssl/cmake/config.in b/extra/wolfssl/wolfssl/cmake/config.in
index 4082325b..d1b61aa1 100644
--- a/extra/wolfssl/wolfssl/cmake/config.in
+++ b/extra/wolfssl/wolfssl/cmake/config.in
@@ -1,6 +1,12 @@
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H @HAVE_ARPA_INET_H@
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#cmakedefine HAVE_SYS_IOCTL_H @HAVE_SYS_IOCTL_H@
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#cmakedefine HAVE_NETDB_H @HAVE_NETDB_H@
+
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H @HAVE_SYS_SOCKET_H@
diff --git a/extra/wolfssl/wolfssl/cmake/functions.cmake b/extra/wolfssl/wolfssl/cmake/functions.cmake
index 6b5b9a7f..bf31acf3 100644
--- a/extra/wolfssl/wolfssl/cmake/functions.cmake
+++ b/extra/wolfssl/wolfssl/cmake/functions.cmake
@@ -198,6 +198,7 @@ function(generate_build_flags)
set(BUILD_SPHINCS "yes" PARENT_SCOPE)
set(BUILD_DILITHIUM "yes" PARENT_SCOPE)
set(BUILD_EXT_KYBER "yes" PARENT_SCOPE)
+ set(BUILD_OQS_HELPER "yes" PARENT_SCOPE)
endif()
if(WOLFSSL_ARIA OR WOLFSSL_USER_SETTINGS)
message(STATUS "ARIA functions.cmake found WOLFSSL_ARIA")
@@ -217,8 +218,6 @@ function(generate_build_flags)
set(BUILD_CRL_MONITOR "yes" PARENT_SCOPE)
endif()
set(BUILD_QUIC ${WOLFSSL_QUIC} PARENT_SCOPE)
- set(BUILD_USER_RSA ${WOLFSSL_USER_RSA} PARENT_SCOPE)
- set(BUILD_USER_CRYPTO ${WOLFSSL_USER_CRYPTO} PARENT_SCOPE)
set(BUILD_WNR ${WOLFSSL_WNR} PARENT_SCOPE)
if(WOLFSSL_SRP OR WOLFSSL_USER_SETTINGS)
set(BUILD_SRP "yes" PARENT_SCOPE)
@@ -281,13 +280,12 @@ function(generate_build_flags)
if(WOLFSSL_SP_ARM_CORTEX_ASM OR WOLFSSL_USER_SETTINGS)
set(BUILD_SP_ARM_CORTEX "yes" PARENT_SCOPE)
endif()
- if(WOLFSSL_SP_X86_64_ASM OR WOLFSSL_USER_SETTINGS)
+ if(WOLFSSL_X86_64_BUILD AND (WOLFSSL_SP_X86_64_ASM OR WOLFSSL_USER_SETTINGS))
set(BUILD_SP_X86_64 "yes" PARENT_SCOPE)
endif()
if(WOLFSSL_SP_MATH OR WOLFSSL_SP_MATH_ALL OR WOLFSSL_USER_SETTINGS)
set(BUILD_SP_INT "yes" PARENT_SCOPE)
endif()
- set(BUILD_FAST_RSA ${WOLFSSL_FAST_RSA} PARENT_SCOPE)
set(BUILD_MCAPI ${WOLFSSL_MCAPI} PARENT_SCOPE)
set(BUILD_ASYNCCRYPT ${WOLFSSL_ASYNCCRYPT} PARENT_SCOPE)
set(BUILD_WOLFEVENT ${WOLFSSL_ASYNCCRYPT} PARENT_SCOPE)
@@ -493,14 +491,10 @@ function(generate_lib_src_list LIB_SOURCES)
list(APPEND LIB_SOURCES wolfcrypt/src/async.c)
endif()
- if(NOT BUILD_USER_RSA AND BUILD_RSA)
- if(BUILD_FAST_RSA)
- list(APPEND LIB_SOURCES wolfcrypt/user-crypto/src/rsa.c)
- else()
- if(NOT BUILD_FIPS_V2)
- list(APPEND LIB_SOURCES wolfcrypt/src/rsa.c)
- endif()
- endif()
+ if(BUILD_RSA)
+ if(NOT BUILD_FIPS_V2)
+ list(APPEND LIB_SOURCES wolfcrypt/src/rsa.c)
+ endif()
endif()
if(BUILD_SP)
@@ -511,9 +505,10 @@ function(generate_lib_src_list LIB_SOURCES)
endif()
if(BUILD_SP_X86_64)
- list(APPEND LIB_SOURCES
- wolfcrypt/src/sp_x86_64.c
- wolfcrypt/src/sp_x86_64_asm.S)
+ list(APPEND LIB_SOURCES wolfcrypt/src/sp_x86_64.c)
+ if(WOLFSSL_X86_64_BUILD_ASM)
+ list(APPEND LIB_SOURCES wolfcrypt/src/sp_x86_64_asm.S)
+ endif()
endif()
if(NOT BUILD_FIPS_V2 AND BUILD_SP_ARM32)
@@ -587,6 +582,11 @@ function(generate_lib_src_list LIB_SOURCES)
wolfcrypt/src/wc_port.c
wolfcrypt/src/error.c)
+ if(BUILD_OQS_HELPER)
+ list(APPEND LIB_SOURCES
+ wolfcrypt/src/port/liboqs/liboqs.c)
+ endif()
+
if(BUILD_ARIA)
list(APPEND LIB_SOURCES
wolfcrypt/src/port/aria/aria-crypt.c
diff --git a/extra/wolfssl/wolfssl/configure.ac b/extra/wolfssl/wolfssl/configure.ac
index 0e2d0706..df2f74e1 100644
--- a/extra/wolfssl/wolfssl/configure.ac
+++ b/extra/wolfssl/wolfssl/configure.ac
@@ -7,7 +7,7 @@
#
AC_COPYRIGHT([Copyright (C) 2006-2023 wolfSSL Inc.])
AC_PREREQ([2.69])
-AC_INIT([wolfssl],[5.6.6],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[https://www.wolfssl.com])
+AC_INIT([wolfssl],[5.7.0],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[https://www.wolfssl.com])
AC_CONFIG_AUX_DIR([build-aux])
# The following sets CFLAGS to empty if unset on command line. We do not
@@ -45,22 +45,20 @@ AC_SUBST([WOLFSSL_CONFIG_ARGS])
# shared library versioning
# The three numbers in the libwolfssl.so.*.*.* file name. Unfortunately
-# these numbers don't always line up nicely with the library version.
+
+# increment if interfaces have been removed or changed
WOLFSSL_LIBRARY_VERSION_FIRST=42
-WOLFSSL_LIBRARY_VERSION_SECOND=0
+
+# increment if interfaces have been added
+# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented
+WOLFSSL_LIBRARY_VERSION_SECOND=1
+
+# increment if source code has changed
+# set to zero if WOLFSSL_LIBRARY_VERSION_FIRST is incremented or
+# WOLFSSL_LIBRARY_VERSION_SECOND is incremented
WOLFSSL_LIBRARY_VERSION_THIRD=0
-WOLFSSL_LIBRARY_VERSION=42:0:0
-# | | |
-# +------+ | +---+
-# | | |
-# current:revision:age
-# | | |
-# | | +- increment if interfaces have been added
-# | | set to zero if interfaces have been removed
-# | | or changed
-# | +- increment if source code has changed
-# | set to zero if current is incremented
-# +- increment if interfaces have been added, removed or changed
+
+WOLFSSL_LIBRARY_VERSION=${WOLFSSL_LIBRARY_VERSION_FIRST}:${WOLFSSL_LIBRARY_VERSION_SECOND}:${WOLFSSL_LIBRARY_VERSION_THIRD}
AC_SUBST([WOLFSSL_LIBRARY_VERSION_FIRST])
AC_SUBST([WOLFSSL_LIBRARY_VERSION_SECOND])
AC_SUBST([WOLFSSL_LIBRARY_VERSION_THIRD])
@@ -102,6 +100,18 @@ else
REPRODUCIBLE_BUILD_DEFAULT=no
fi
+# Allow experimental settings
+AC_ARG_ENABLE([experimental],
+ [AS_HELP_STRING([--enable-experimental],[Allow experimental settings in the configuration (default: disabled)])],
+ [ ENABLED_EXPERIMENTAL=$enableval ],
+ [ ENABLED_EXPERIMENTAL=no ]
+ )
+if test "$ENABLED_EXPERIMENTAL" = "yes"
+then
+ AS_IF([ test "$ENABLED_DISTRO" = "yes" && test "$ENABLED_EXPERIMENTAL" = "yes" ],[ AC_MSG_ERROR([--enable-distro and --enable-experimental are mutually exclusive.]) ])
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_EXPERIMENTAL_SETTINGS"
+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_EXPERIMENTAL_SETTINGS"
+fi
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h time.h sys/ioctl.h sys/socket.h sys/time.h errno.h sys/un.h])
AC_CHECK_LIB([network],[socket])
@@ -451,9 +461,35 @@ then
RANLIB=ranlib
fi
xxx_ranlib_flags=$(${RANLIB} --help 2>&1)
- AM_CFLAGS="$AM_CFLAGS -DHAVE_REPRODUCIBLE_BUILD"
+
AS_CASE([$xxx_ar_flags],[*'use zero for timestamps and uids/gids'*],[AR_FLAGS="Dcr" lt_ar_flags="Dcr"])
AS_CASE([$xxx_ranlib_flags],[*'Use zero for symbol map timestamp'*],[RANLIB="${RANLIB} -D"])
+
+ AM_CFLAGS="$AM_CFLAGS -DHAVE_REPRODUCIBLE_BUILD -g0"
+
+ # opportunistically use -ffile-prefix-map (added in GCC8 and LLVM10)
+
+ if "$CC" -ffile-prefix-map=/tmp=. -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
+ #include <stdlib.h>
+ int main(int argc, char **argv) {
+ (void)argc; (void)argv; return 0;
+ }
+ EOF
+ then
+ AM_CFLAGS="$AM_CFLAGS -ffile-prefix-map=\$(abs_top_srcdir)/= -ffile-prefix-map=\$(top_srcdir)/="
+ fi
+
+ # opportunistically use linker option --build-id=none
+
+ if "$CC" -Wl,--build-id=none -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
+ #include <stdlib.h>
+ int main(int argc, char **argv) {
+ (void)argc; (void)argv; return 0;
+ }
+ EOF
+ then
+ AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=none"
+ fi
fi
@@ -720,6 +756,7 @@ then
# this set is also enabled by enable-all-crypto:
test "$enable_atomicuser" = "" && enable_atomicuser=yes
test "$enable_aesgcm" = "" && enable_aesgcm=yes
+ test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
test "$enable_aesccm" = "" && enable_aesccm=yes
test "$enable_aesctr" = "" && enable_aesctr=yes
test "$enable_aeseax" = "" && enable_aeseax=yes
@@ -745,7 +782,6 @@ then
test "$enable_psk" = "" && enable_psk=yes
test "$enable_cmac" = "" && enable_cmac=yes
test "$enable_siphash" = "" && enable_siphash=yes
- test "$enable_xts" = "" && enable_xts=yes
test "$enable_ocsp" = "" && enable_ocsp=yes
test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes
test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes
@@ -787,6 +823,7 @@ then
test "$enable_session_ticket" = "" && enable_session_ticket=yes
test "$enable_earlydata" = "" && enable_earlydata=yes
test "$enable_ech" = "" && enable_ech=yes
+ test "$enable_srtp" = "" && enable_srtp=yes
if test "$ENABLED_32BIT" != "yes"
then
@@ -796,7 +833,6 @@ then
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
then
- test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
test "$enable_compkey" = "" && enable_compkey=yes
test "$enable_quic" = "" && test "$enable_cryptonly" != "yes" && enable_quic=yes
AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_IO -DHAVE_IO_TIMEOUT"
@@ -861,7 +897,8 @@ then
fi
fi
- if test "$ENABLED_FIPS" = "no" || test "$ENABLED_FIPS" = "dev"; then
+ if test "$ENABLED_FIPS" = "no" || test "$FIPS_VERSION" = "dev"; then
+ test "$enable_aesxts" = "" && enable_aesxts=yes
test "$enable_aessiv" = "" && enable_aessiv=yes
fi
@@ -908,6 +945,7 @@ if test "$ENABLED_ALL_CRYPT" = "yes"
then
test "$enable_atomicuser" = "" && enable_atomicuser=yes
test "$enable_aesgcm" = "" && enable_aesgcm=yes
+ test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
test "$enable_aesccm" = "" && enable_aesccm=yes
test "$enable_aesctr" = "" && enable_aesctr=yes
test "$enable_aeseax" = "" && enable_aeseax=yes
@@ -933,7 +971,6 @@ then
test "$enable_psk" = "" && enable_psk=yes
test "$enable_cmac" = "" && enable_cmac=yes
test "$enable_siphash" = "" && enable_siphash=yes
- test "$enable_xts" = "" && enable_xts=yes
test "$enable_ocsp" = "" && enable_ocsp=yes
test "$enable_ocspstapling" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling=yes
test "$enable_ocspstapling2" = "" && test "$enable_ocsp" != "no" && enable_ocspstapling2=yes
@@ -959,6 +996,7 @@ then
test "$enable_cryptocb" = "" && enable_cryptocb=yes
test "$enable_anon" = "" && enable_anon=yes
test "$enable_ssh" = "" && test "$enable_hmac" != "no" && enable_ssh=yes
+ test "$enable_srtp_kdf" = "" && enable_srtp_kdf=yes
if test "$ENABLED_32BIT" != "yes"
then
@@ -968,7 +1006,6 @@ then
if test "$ENABLED_LINUXKM_DEFAULTS" != "yes"
then
- test "$enable_aesgcm_stream" = "" && test "$enable_aesgcm" = "yes" && enable_aesgcm_stream=yes
test "$enable_compkey" = "" && enable_compkey=yes
fi
@@ -1001,7 +1038,8 @@ then
fi
fi
- if test "$ENABLED_FIPS" = "no" || test "$ENABLED_FIPS" = "dev"; then
+ if test "$ENABLED_FIPS" = "no" || test "$FIPS_VERSION" = "dev"; then
+ test "$enable_aesxts" = "" && enable_aesxts=yes
test "$enable_aessiv" = "" && enable_aessiv=yes
fi
@@ -1029,8 +1067,9 @@ fi
ENABLED_LIBOQS="no"
tryliboqsdir=""
AC_ARG_WITH([liboqs],
- [AS_HELP_STRING([--with-liboqs=PATH],[Path to liboqs install (default /usr/local) EXPERIMENTAL!])],
+ [AS_HELP_STRING([--with-liboqs=PATH],[Path to liboqs install (default /usr/local) (requires --enable-experimental)])],
[
+ AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([LIBOQS requires --enable-experimental.]) ])
AC_MSG_CHECKING([for liboqs])
LIBS="$LIBS -loqs"
@@ -1077,7 +1116,7 @@ AC_ARG_WITH([liboqs],
# - SHA3, Shake128 and Shake256, or
# - SHA256, SHA512, AES-CTR
AC_ARG_ENABLE([kyber],
- [AS_HELP_STRING([--enable-kyber],[Enable KYBER (default: disabled)])],
+ [AS_HELP_STRING([--enable-kyber],[Enable KYBER (requires --enable-experimental) (default: disabled)])],
[ ENABLED_KYBER=$enableval ],
[ ENABLED_KYBER=no ]
)
@@ -1093,10 +1132,6 @@ do
;;
no)
;;
- wolfssl)
- ENABLED_WC_KYBER=yes
- AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_KYBER"
- ;;
small)
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_KYBER_SMALL"
;;
@@ -1117,7 +1152,14 @@ done
if test "$ENABLED_KYBER" != "no"
then
+ AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([KYBER requires --enable-experimental.]) ])
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_KYBER"
+ # Use liboqs if specified.
+ if test "$ENABLED_LIBOQS" = "no"; then
+ ENABLED_WC_KYBER=yes
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_KYBER"
+ AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_WC_KYBER"
+ fi
if test "$ENABLED_KYBER512" = ""; then
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_NO_KYBER512"
@@ -1134,12 +1176,6 @@ then
test "$enable_sha3" = "" && enable_sha3=yes
test "$enable_shake128" = "" && enable_shake128=yes
test "$enable_shake256" = "" && enable_shake256=yes
- else
- # Default is to use liboqs. Make sure its enabled.
- if test "$ENABLED_LIBOQS" = "no"; then
- AC_MSG_ERROR([The default implementation for kyber is liboqs.
- Please use --with-liboqs.])
- fi
fi
fi
@@ -1167,6 +1203,10 @@ do
ENABLED_WC_XMSS=yes
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_XMSS"
;;
+ small)
+ ENABLED_WC_XMSS=yes
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_XMSS_SMALL"
+ ;;
*)
AC_MSG_ERROR([Invalid choice for XMSS []: $ENABLED_XMSS.])
break;;
@@ -1192,8 +1232,9 @@ fi
ENABLED_LIBXMSS="no"
trylibxmssdir=""
AC_ARG_WITH([libxmss],
- [AS_HELP_STRING([--with-libxmss=PATH],[PATH to xmss-reference root dir. EXPERIMENTAL!])],
+ [AS_HELP_STRING([--with-libxmss=PATH],[PATH to xmss-reference root dir. (requires --enable-experimental)!])],
[
+ AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([libxmss requires --enable-experimental.]) ])
AC_MSG_CHECKING([for libxmss])
trylibxmssdir=$withval
@@ -1257,6 +1298,10 @@ do
LMS_VERIFY_ONLY=yes
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_LMS_VERIFY_ONLY"
;;
+ small)
+ ENABLED_WC_LMS=yes
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_LMS_SMALL"
+ ;;
wolfssl)
ENABLED_WC_LMS=yes
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_WC_LMS"
@@ -1286,8 +1331,9 @@ fi
ENABLED_LIBLMS="no"
tryliblmsdir=""
AC_ARG_WITH([liblms],
- [AS_HELP_STRING([--with-liblms=PATH],[PATH to hash-sigs LMS/HSS install (default /usr/local) EXPERIMENTAL!])],
+ [AS_HELP_STRING([--with-liblms=PATH],[PATH to hash-sigs LMS/HSS install (default /usr/local) (requires --enable-experimental)!])],
[
+ AS_IF([ test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([liblms requires --enable-experimental.]) ])
AC_MSG_CHECKING([for liblms])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <hss.h>]], [[ param_set_t lm_type; param_set_t lm_ots_type; hss_get_public_key_len(4, &lm_type, &lm_ots_type); ]])], [ liblms_linked=yes ],[ liblms_linked=no ])
@@ -4832,18 +4878,17 @@ AS_IF([test "x$ENABLED_CMAC" = "xyes"],
# AES-XTS
-AC_ARG_ENABLE([xts],
- [AS_HELP_STRING([--enable-xts],[Enable XTS (default: disabled)])],
- [ ENABLED_XTS=$enableval ],
- [ ENABLED_XTS=no ]
+AC_ARG_ENABLE([aesxts],
+ [AS_HELP_STRING([--enable-aesxts],[Enable AES XTS (default: disabled)])],
+ [ ENABLED_AESXTS=$enableval ],
+ [ ENABLED_AESXTS=no ]
)
-AS_IF([test "x$ENABLED_XTS" = "xyes"],
- [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"])
-AS_IF([test "x$ENABLED_XTS" = "xyes" && test "x$ENABLED_INTELASM" = "xyes"],
- [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
-AS_IF([test "x$ENABLED_XTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"],
- [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
+# legacy old option name, for compatibility:
+AC_ARG_ENABLE([xts],
+ [AS_HELP_STRING([--enable-xts],[Please use --enable-aesxts])],
+ [ ENABLED_AESXTS=$enableval ]
+ )
# Web Server Build
AC_ARG_ENABLE([webserver],
@@ -4943,6 +4988,9 @@ AS_CASE([$FIPS_VERSION],
AS_IF([test "$ENABLED_AESCCM" != "yes" && (test "$FIPS_VERSION" != "dev" || test "$enable_aesccm" != "no")],
[ENABLED_AESCCM="yes"; AM_CFLAGS="$AM_CFLAGS -DHAVE_AESCCM"])
+ AS_IF([test "$ENABLED_AESXTS" = "yes" && (test "$FIPS_VERSION" != "dev" || test "$enable_aesxts" != "yes")],
+ [ENABLED_AESXTS="no"])
+
AS_IF([test "$ENABLED_RSAPSS" != "yes" && (test "$FIPS_VERSION" != "dev" || test "$enable_rsapss" != "no")],
[ENABLED_RSAPSS="yes"; AM_CFLAGS="$AM_CFLAGS -DWC_RSA_PSS"])
@@ -4984,7 +5032,8 @@ AS_CASE([$FIPS_VERSION],
AS_IF([(test "$ENABLED_AESCCM" = "yes" && test "$HAVE_AESCCM_PORT" != "yes") ||
(test "$ENABLED_AESCTR" = "yes" && test "$HAVE_AESCTR_PORT" != "yes") ||
(test "$ENABLED_AESGCM" = "yes" && test "$HAVE_AESGCM_PORT" != "yes") ||
- (test "$ENABLED_AESOFB" = "yes" && test "$HAVE_AESOFB_PORT" != "yes")],
+ (test "$ENABLED_AESOFB" = "yes" && test "$HAVE_AESOFB_PORT" != "yes") ||
+ (test "$ENABLED_AESXTS" = "yes" && test "$HAVE_AESXTS_PORT" != "yes")],
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_DIRECT -DHAVE_AES_ECB"])
],
@@ -5090,6 +5139,14 @@ AS_CASE([$SELFTEST_VERSION],
])
+AS_IF([test "x$ENABLED_AESXTS" = "xyes"],
+ [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AES_XTS -DWOLFSSL_AES_DIRECT"])
+AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_INTELASM" = "xyes"],
+ [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
+AS_IF([test "x$ENABLED_AESXTS" = "xyes" && test "x$ENABLED_AESNI" = "xyes"],
+ [AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_AES_XTS"])
+
+
# Set SHA-3 flags
if test "$ENABLED_SHA3" != "no" && test "$ENABLED_32BIT" = "no"
then
@@ -5420,65 +5477,6 @@ then
esac
fi
-
-# USER CRYPTO
-ENABLED_USER_CRYPTO="no"
-ENABLED_USER_RSA="no"
-AC_DEFINE([BUILD_USER_RSA], [], [User RSA is being defined])
-trycryptodir=""
-AC_ARG_WITH([user-crypto],
- [AS_HELP_STRING([--with-user-crypto=PATH],[Path to USER_CRYPTO install (default /usr/local)])],
- [
- CPPFLAGS="$CPPFLAGS -DHAVE_USER_CRYPTO"
- LIBS="$LIBS -lusercrypto"
-
- if test "x$withval" != "xno" ; then
- trycryptodir=$withval
- fi
- if test "x$withval" = "xyes" ; then
- trycryptodir="/usr/local"
- fi
-
- LDFLAGS="$LDFLAGS -L$trycryptodir/lib"
- CPPFLAGS="$CPPFLAGS -I$trycryptodir/include"
-
- #Look for RSA Init function in usercrypto lib
- AC_CHECK_LIB([usercrypto], [wc_InitRsaKey], [user_rsa_linked=yes], [user_rsa_linked=no])
-
- if test "x$user_rsa_linked" = "xyes" ; then
- AC_MSG_NOTICE([User user_rsa.h being used])
- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_RSA"
- ENABLED_USER_RSA=yes
- ENABLED_USER_CRYPTO=yes
- fi
-
-
- #Display check and find result of link attempts
- AC_MSG_CHECKING([for USER_CRYPTO])
- if test "x$ENABLED_USER_CRYPTO" = "xno" ; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([USER_CRYPTO not found. Either move to /usr/include and /usr/lib or
- Specify its path using --with-user-crypto=/dir/])
- else
- AC_MSG_RESULT([yes])
- # Check if .la is available if not then rely on exported path
- if test -e $trycryptodir/lib/libusercrypto.la
- then
- LIB_ADD="$trycryptodir/lib/libusercrypto.la $LIB_ADD"
- else
- LIB_ADD="-lusercrypto $LIB_ADD"
- fi
- AM_LDFLAGS="$AM_LDFLAGS -L$trycryptodir/lib"
- AM_CFLAGS="$AM_CFLAGS -DHAVE_USER_CRYPTO"
- fi
- ]
-)
-
-if test "$ENABLED_USER_CRYPTO" = "yes" && test "$ENABLED_FIPS" = "yes"
-then
- AC_MSG_ERROR([cannot enable user crypto and fips, user crypto possibility of using code in fips boundary.])
-fi
-
# Whitewood netRandom client library
ENABLED_WNR="no"
trywnrdir=""
@@ -7795,171 +7793,6 @@ fi
# End - Single Precision option handling #
################################################################################
-# Fast RSA using Intel IPP
-ippdir="${srcdir}/IPP"
-ipplib="lib" # if autoconf guesses 32bit system changes lib directory
-fastRSA_found=no
-abs_path=`pwd`
-
-# set up variables used
-IPPLIBS=
-IPPHEADERS=
-IPPLINK=
-
-AC_ARG_ENABLE([fast-rsa],
- [AS_HELP_STRING([--enable-fast-rsa],[Enable RSA using Intel IPP (default: disabled)])],
- [ ENABLED_FAST_RSA=$enableval ],
- [ ENABLED_FAST_RSA=no ],
- )
-
-# Fast RSA does not support RSA-PSS
-if test "$ENABLED_RSAPSS" = "yes"; then
- ENABLED_FAST_RSA=no
-fi
-
-if test "$ENABLED_USER_RSA" = "no" && test "$ENABLED_FIPS" = "no"; then
-
- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
- ipplib="lib_32" # 32 bit OS detected
- fi
-
-# Use static IPP Libraries
-if test "$enable_shared" = "no" && test "$ENABLED_FAST_RSA" = "yes"; then
- case $host_os in
- *darwin*)
- ipplib="$ipplib/mac_static"
- AC_MSG_ERROR([Issue with static linking to libippcp.a on Mac.
- Dynamic IPP libraries supported on Mac])
- break;;
-
- *linux*)
- ipplib="$ipplib/linux_static"
- break;;
- *)
- ENABLED_FAST_RSA=no
- esac
-
- if test -e $srcdir/IPP/$ipplib/libippcore.a && test -e $srcdir/IPP/$ipplib/libippcp.a
- then
- :
- else
- ENABLED_FAST_RSA=no
- fi
- AC_CHECK_HEADERS([IPP/include/ipp.h IPP/include/ippcp.h], [AM_CPPFLAGS="-I$srcdir/IPP/include $AM_CPPFLAGS"], [ENABLED_FAST_RSA=no])
- LIB_STATIC_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_STATIC_ADD"
- if test "$ENABLED_FAST_RSA" = "no"; then
- AC_MSG_ERROR([Could not find fast rsa libraries])
- fi
-else
-
-# Check for and use bundled IPP libraries
-if test "$ENABLED_FAST_RSA" = "yes"; then
- AC_MSG_NOTICE([Using local IPP crypto library])
-
- AC_CHECK_HEADER([$abs_path/IPP/include/ippcp.h],
- [
- # build and default locations on linux and mac
- STORE_LDFLAGS=${LDFLAGS}
- STORE_CPPFLAGS=${CPPFLAGS}
-
- # using LDFLAGS instead of AM_ temporarily to test link to library
- LDFLAGS="-L$ippdir/$ipplib -lippcp -lippcore"
- CPPFLAGS="-I$ippdir/include"
- AC_CHECK_HEADERS([ippcp.h], [AC_CHECK_LIB([ippcp], [ippsRSAEncrypt_PKCSv15], [fastRSA_found=yes], [fastRSA_found=no])], [fastRSA_found=no])
- name="$ippdir/$ipplib/libippcp"
- case $host_os in
- *darwin*)
- # check file existence and conditionally set variables
- if test -e $abs_path/IPP/$ipplib/libippcp.dylib
- then
- IPPLIBS="${name}.dylib ${name}-9.0.dylib ${name}e9-9.0.dylib ${name}g9-9.0.dylib ${name}h9-9.0.dylib ${name}k0-9.0.dylib ${name}l9-9.0.dylib ${name}n8-9.0.dylib ${name}p8-9.0.dylib ${name}s8-9.0.dylib ${name}y8-9.0.dylib IPP/lib/libippcore.dylib IPP/lib/libippcore-9.0.dylib"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.dylib src/.libs/libippcp.dylib && ln -f ${srcdir}/${name}-9.0.dylib src/.libs/libippcp-9.0.dylib && ln -f ${srcdir}/${name}e9-9.0.dylib src/.libs/libippcpe9-9.0.dylib && ln -f ${srcdir}/${name}g9-9.0.dylib src/.libs/libippcpg9-9.0.dylib && ln -f ${srcdir}/${name}h9-9.0.dylib src/.libs/libippcph9-9.0.dylib && ln -f ${srcdir}/${name}k0-9.0.dylib src/.libs/libippcpk0-9.0.dylib && ln -f ${srcdir}/${name}l9-9.0.dylib src/.libs/libippcpl9-9.0.dylib && ln -f ${srcdir}/${name}n8-9.0.dylib src/.libs/libippcpn8-9.0.dylib && ln -f ${srcdir}/${name}p8-9.0.dylib src/.libs/libippcpp8-9.0.dylib && ln -f ${srcdir}/${name}s8-9.0.dylib src/.libs/libippcps8-9.0.dylib && ln -f ${srcdir}/${name}y8-9.0.dylib src/.libs/libippcpy8-9.0.dylib && ln -f ${srcdir}/IPP/lib/libippcore.dylib src/.libs/libippcore.dylib && ln -f ${srcdir}/IPP/lib/libippcore-9.0.dylib src/.libs/libippcore-9.0.dylib"
- else
- fastRSA_found=no
- fi
- break;;
-
- *linux*)
- # check file existence and conditionally set variables
- if test -e $abs_path/IPP/$ipplib/libippcp.so.9.0
- then
- if test "$ac_cv_sizeof_long" = "4" && test "$ac_cv_sizeof_long_long" = "8"; then
- IPPLIBS="${name}.so.9.0 ${name}g9.so.9.0 ${name}h9.so.9.0 ${name}p8.so.9.0 ${name}px.so.9.0 ${name}s8.so.9.0 ${name}.so ${name}w7.so.9.0 IPP/$ipplib/libippcore.so IPP/$ipplib/libippcore.so.9.0"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}g9.so.9.0 src/.libs/libippcpg9.so.9.0 && ln -f ${name}h9.so.9.0 src/.libs/libippcph9.so.9.0 && ln -f ${name}p8.so.9.0 src/.libs/libippcpp8.so.9.0 && ln -f ${name}px.so.9.0 src/.libs/libippcppx.so.9.0 && ln -f ${name}s8.so.9.0 src/.libs/libippcps8.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}w7.so.9.0 src/.libs/libippcpw7.so.9.0 && ln -f IPP/$ipplib/libippcore.so src/.libs/libippcore.so && ln -f IPP/$ipplib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
- else
- IPPLIBS="${name}.so.9.0 ${name}e9.so.9.0 ${name}k0.so.9.0 ${name}l9.so.9.0 ${name}m7.so.9.0 ${name}mx.so.9.0 ${name}.so ${name}n8.so.9.0 ${name}y8.so.9.0 IPP/lib/libippcore.so IPP/lib/libippcore.so.9.0"
- IPPLINK="mkdir -p src/.libs && ln -f ${name}.so.9.0 src/.libs/libippcp.so.9.0 && ln -f ${name}e9.so.9.0 src/.libs/libippcpe9.so.9.0 && ln -f ${name}k0.so.9.0 src/.libs/libippcpk0.so.9.0 && ln -f ${name}l9.so.9.0 src/.libs/libippcpl9.so.9.0 && ln -f ${name}m7.so.9.0 src/.libs/libippcpm7.so.9.0 && ln -f ${name}mx.so.9.0 src/.libs/libippcpmx.so.9.0 && ln -f ${name}.so src/.libs/libippcp.so && ln -f ${name}n8.so.9.0 src/.libs/libippcpn8.so.9.0 && ln -f ${name}y8.so.9.0 src/.libs/libippcpy8.so.9.0 && ln -f IPP/lib/libippcore.so src/.libs/libippcore.so && ln -f IPP/lib/libippcore.so.9.0 src/.libs/libippcore.so.9.0"
- fi
- else
- fastRSA_found=no
- fi
- break;;
- *)
- fastRSA_found=no
- esac
-
- if test "$fastRSA_found" = "yes"; then
- # was successful so add tested LDFLAGS to AM_ flags
- AM_LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}"
- AM_CPPFLAGS="${AM_CPPFLAGS} ${CPPFLAGS}"
- IPPHEADERS="${srcdir}/IPP/include/*.h"
- fi
-
- # restore LDFLAGS to user set
- LDFLAGS=${STORE_LDFLAGS}
- CPPFLAGS=${STORE_CPPFLAGS}
- ], [fastRSA_found=no])
-fi
-
-# Don't cache the result so it can be checked
-AS_UNSET([ac_cv_header_ippcp_h])
-AS_UNSET([ac_cv_header_ipp_h])
-AS_UNSET([ac_cv_lib_ippcp_ippsRSAEncrypt_PKCSv15]);
-
-# Check link and see if user has pre-existing IPP Libraries if not using local
-if test "$ENABLED_FAST_RSA" = "yes" && test "$fastRSA_found" = "no"; then
- AC_MSG_NOTICE([Checking if IPP crypto library installed])
- AC_CHECK_HEADER([ippcp.h], [AC_CHECK_LIB([ippcp], [ippsRSAEncrypt_PKCSv15],
- [
- fastRSA_found=yes
- AM_LDFLAGS="${AM_LDFLAGS} -lippcore -lippcp"
- ], [ fastRSA_found=no])
- ], [fastRSA_found=no])
-
- # Error out on not finding libraries
- if test "$fastRSA_found" = "no"; then
- AC_MSG_ERROR([Could not find fast rsa libraries])
- fi
-fi
-fi # end of if for shared library
-else # if user rsa is set than do not use fast rsa option
- if test "$ENABLED_FAST_RSA" = "yes"; then
- AC_MSG_ERROR([Could not use fast rsa libraries with user crypto or fips])
- fi
-fi # end of if for user rsa crypto or fips
-
-# End result of checking for IPP Libraries
-AC_MSG_CHECKING([for fast RSA])
-if test "$ENABLED_FAST_RSA" = "yes"; then
- AM_CFLAGS="$AM_CFLAGS -DHAVE_FAST_RSA -DHAVE_USER_RSA"
- # add in user crypto header that uses Intel IPP
- AM_CPPFLAGS="$AM_CPPFLAGS -I$srcdir/wolfcrypt/user-crypto/include"
- if test "$enable_shared" = "yes"; then
- LIBS="$LIBS -lippcore -lippcp"
- LIB_ADD="-lippcp -lippcore $LIB_ADD"
- else
- LIB_ADD="$srcdir/IPP/$ipplib/libippcp.a $srcdir/IPP/$ipplib/libippcore.a $LIB_ADD"
- fi
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_SUBST([IPPLIBS])
-AC_SUBST([IPPHEADERS])
-AC_SUBST([IPPLINK])
-
-
# static memory use
AC_ARG_ENABLE([staticmemory],
[AS_HELP_STRING([--enable-staticmemory],[Enable static memory use (default: disabled)])],
@@ -8113,6 +7946,19 @@ else
fi
+# Support for autosar shim
+AC_ARG_ENABLE([autosar],
+ [AS_HELP_STRING([--enable-autosar],[Enable AutoSAR support (default: disabled)])],
+ [ ENABLED_AUTOSAR=$enableval ],
+ [ ENABLED_AUTOSAR=no ]
+ )
+
+if test "$ENABLED_AUTOSAR" = "yes"
+then
+ AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_AUTOSAR"
+fi
+
+
# Session Export
AC_ARG_ENABLE([sessionexport],
[AS_HELP_STRING([--enable-sessionexport],[Enable export and import of sessions (default: disabled)])],
@@ -8248,6 +8094,42 @@ if test -n "$MPI_MAX_KEY_BITS" -o -n "$WITH_MAX_ECC_BITS"; then
fi
fi
+AC_ARG_ENABLE([linuxkm-lkcapi-register],
+ [AS_HELP_STRING([--enable-linuxkm-lkcapi-register],[Register wolfCrypt implementations with the Linux Kernel Crypto API backplane. Possible values are "none", "all", "cbc(aes)", "cfb(aes)", "gcm(aes)", and "xts(aes)", or a comma-separate combination. (default: none)])],
+ [ENABLED_LINUXKM_LKCAPI_REGISTER=$enableval],
+ [ENABLED_LINUXKM_LKCAPI_REGISTER=none]
+ )
+if test "$ENABLED_LINUXKM_LKCAPI_REGISTER" != "none"
+then
+ AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER"
+
+ if test "$ENABLED_AESGCM" != "no" && test "$ENABLED_AESGCM_STREAM" = "no" && test "$ENABLED_ARMASM" = "no" && test "$ENABLED_FIPS" = "no"; then
+ ENABLED_AESGCM_STREAM=yes
+ fi
+
+ if test "$ENABLED_LINUXKM_LKCAPI_REGISTER" = "yes"
+ then
+ ENABLED_LINUXKM_LKCAPI_REGISTER=all
+ fi
+
+ for lkcapi_alg in $(echo "$ENABLED_LINUXKM_LKCAPI_REGISTER" | tr ',' ' ')
+ do
+ case "$lkcapi_alg" in
+ all) AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_ALL" ;;
+ 'cbc(aes)') test "$ENABLED_AESCBC" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-CBC implementation not enabled.])
+ AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCBC" ;;
+ 'cfb(aes)') test "$ENABLED_AESCFB" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-CFB implementation not enabled.])
+ AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESCFB" ;;
+ 'gcm(aes)') test "$ENABLED_AESGCM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-GCM implementation not enabled.])
+ test "$ENABLED_AESGCM_STREAM" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: --enable-aesgcm-stream is required for LKCAPI.])
+ AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESGCM" ;;
+ 'xts(aes)') test "$ENABLED_AESXTS" != "no" || AC_MSG_ERROR([linuxkm-lkcapi-register ${lkcapi_alg}: AES-XTS implementation not enabled.])
+ AM_CFLAGS="$AM_CFLAGS -DLINUXKM_LKCAPI_REGISTER_AESXTS" ;;
+ *) AC_MSG_ERROR([Unsupported LKCAPI algorithm "$lkcapi_alg".]) ;;
+ esac
+ done
+fi
+
# Library Suffix
LIBSUFFIX=""
AC_ARG_WITH([libsuffix],
@@ -8321,6 +8203,14 @@ AC_ARG_ENABLE([sys-ca-certs],
[ ENABLED_SYS_CA_CERTS=yes ]
)
+AC_ARG_ENABLE([dual-alg-certs],
+ [AS_HELP_STRING([--enable-dual-alg-certs],[Enable support for dual key/signature certificates in TLS 1.3 as defined in X9.146 (requires --enable-experimental) (default: disabled)])],
+ [ ENABLED_DUAL_ALG_CERTS=$enableval ],
+ [ ENABLED_DUAL_ALG_CERTS=no ]
+ )
+
+AS_IF([ test "$ENABLED_DUAL_ALG_CERTS" != "no" && test "$ENABLED_EXPERIMENTAL" != "yes" ],[ AC_MSG_ERROR([dual-alg-certs requires --enable-experimental.]) ])
+
# check if should run the trusted peer certs test
# (for now checking both C_FLAGS and C_EXTRA_FLAGS)
AS_CASE(["$CFLAGS $CPPFLAGS"],[*'WOLFSSL_TRUST_PEER_CERT'*],[ENABLED_TRUSTED_PEER_CERT=yes])
@@ -8686,6 +8576,9 @@ AS_IF([test "x$ENABLED_ASN" = "xno"],
AS_IF([test "x$ENABLED_SYS_CA_CERTS" = "xyes"],
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SYS_CA_CERTS"])
+AS_IF([test "x$ENABLED_DUAL_ALG_CERTS" = "xyes"],
+ [AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DUAL_ALG_CERTS"])
+
AS_IF([test "x$ENABLED_ALTNAMES" = "xyes"],
[AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_ALT_NAMES"])
@@ -9123,9 +9016,6 @@ if test "x$ENABLED_LINUXKM" = "xyes"; then
if test "$ENABLED_FASTMATH" = "yes"; then
AC_MSG_ERROR([--enable-fastmath is incompatible with --enable-linuxkm (exceeds stack limit).])
fi
- if test "$ENABLED_FAST_RSA" = "yes"; then
- AC_MSG_ERROR([--enable-fastrsa is incompatible with --enable-linuxkm.])
- fi
if test "$ENABLED_LIBZ_RSA" = "yes"; then
AC_MSG_ERROR([--with-libz is incompatible with --enable-linuxkm.])
fi
@@ -9172,7 +9062,7 @@ AM_CONDITIONAL([BUILD_SNIFFER], [ test "x$ENABLED_SNIFFER" = "xyes" || test "
AM_CONDITIONAL([BUILD_SNIFFTEST],[ test "x$ENABLED_SNIFFTEST" = "xyes"])
AM_CONDITIONAL([BUILD_AESGCM],[test "x$ENABLED_AESGCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_AESCCM],[test "x$ENABLED_AESCCM" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
-AM_CONDITIONAL([BUILD_XTS],[test "x$ENABLED_XTS" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
+AM_CONDITIONAL([BUILD_AESXTS],[test "x$ENABLED_AESXTS" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_ARMASM],[test "x$ENABLED_ARMASM" = "xyes"])
AM_CONDITIONAL([BUILD_ARMASM_INLINE],[test "x$ENABLED_ARMASM_INLINE" = "xyes"])
AM_CONDITIONAL([BUILD_ARMASM_CRYPTO],[test "x$ENABLED_ARMASM_CRYPTO" = "xyes"])
@@ -9243,8 +9133,6 @@ AM_CONDITIONAL([BUILD_OCSP_STAPLING],[test "x$ENABLED_CERTIFICATE_STATUS_REQUEST
AM_CONDITIONAL([BUILD_OCSP_STAPLING_V2],[test "x$ENABLED_CERTIFICATE_STATUS_REQUEST_V2" = "xyes"])
AM_CONDITIONAL([BUILD_CRL],[test "x$ENABLED_CRL" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_CRL_MONITOR],[test "x$ENABLED_CRL_MONITOR" = "xyes"])
-AM_CONDITIONAL([BUILD_USER_RSA],[test "x$ENABLED_USER_RSA" = "xyes"] )
-AM_CONDITIONAL([BUILD_USER_CRYPTO],[test "x$ENABLED_USER_CRYPTO" = "xyes"])
AM_CONDITIONAL([BUILD_LIBLMS],[test "x$ENABLED_LIBLMS" = "xyes"])
AM_CONDITIONAL([BUILD_LIBXMSS],[test "x$ENABLED_LIBXMSS" = "xyes"])
AM_CONDITIONAL([BUILD_LIBOQS],[test "x$ENABLED_LIBOQS" = "xyes"])
@@ -9290,7 +9178,6 @@ AM_CONDITIONAL([BUILD_SP_INT],[test "x$ENABLED_SP_MATH" = "xyes" || test "x$ENAB
AM_COND_IF([BUILD_SP], [INCLUDE_SP_INT="yes"])
AM_COND_IF([BUILD_SP_INT], [INCLUDE_SP_INT="yes"])
AC_SUBST([INCLUDE_SP_INT])
-AM_CONDITIONAL([BUILD_FAST_RSA],[test "x$ENABLED_FAST_RSA" = "xyes"])
AM_CONDITIONAL([BUILD_MCAPI],[test "x$ENABLED_MCAPI" = "xyes"])
AM_CONDITIONAL([BUILD_ASYNCCRYPT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
AM_CONDITIONAL([BUILD_WOLFEVENT],[test "x$ENABLED_ASYNCCRYPT" = "xyes"])
@@ -9323,6 +9210,8 @@ AM_CONDITIONAL([BUILD_HPKE],[test "x$ENABLED_HPKE" = "xyes" || test "x$ENABLED_U
AM_CONDITIONAL([BUILD_DTLS],[test "x$ENABLED_DTLS" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
AM_CONDITIONAL([BUILD_MAXQ10XX],[test "x$ENABLED_MAXQ10XX" = "xyes"])
AM_CONDITIONAL([BUILD_ARIA],[test "x$ENABLED_ARIA" = "xyes"])
+AM_CONDITIONAL([BUILD_XILINX],[test "x$ENABLED_XILINX" = "xyes"])
+AM_CONDITIONAL([BUILD_AUTOSAR],[test "x$ENABLED_AUTOSAR" = "xyes"])
if test "$ENABLED_REPRODUCIBLE_BUILD" != "yes" &&
(test "$ax_enable_debug" = "yes" ||
@@ -9351,6 +9240,7 @@ AC_SUBST([AM_LDFLAGS])
AC_SUBST([AM_CCASFLAGS])
AC_SUBST([LIB_ADD])
AC_SUBST([LIB_STATIC_ADD])
+AC_SUBST([LIBM])
# FINAL
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
@@ -9559,7 +9449,6 @@ echo " * FPU enable as flags: $ASFLAGS_FPU_ENABLE_SIMD_DISABLE" && \
echo " * SIMD+FPU disable as flags: $ASFLAGS_FPUSIMD_DISABLE" && \
echo " * SIMD+FPU enable as flags: $ASFLAGS_FPUSIMD_ENABLE" && \
echo " * Linux kernel module PIE: $ENABLED_LINUXKM_PIE"
-echo " * Linux kernel module bench: $ENABLED_LINUXKM_BENCHMARKS"
echo " * Debug enabled: $ax_enable_debug"
echo " * Coverage enabled: $ax_enable_coverage"
@@ -9568,6 +9457,12 @@ echo " * make -j: $enable_jobserver"
echo " * VCS checkout: $ac_cv_vcs_checkout"
echo
echo " Features "
+if test "$ENABLED_EXPERIMENTAL" = "yes"
+then
+ echo " * Experimental settings: Allowed"
+else
+ echo " * Experimental settings: Forbidden"
+fi
if test "$ENABLED_FIPS" = "yes"; then
echo " * FIPS: $FIPS_VERSION"
else
@@ -9613,6 +9508,7 @@ echo " * AES-CCM: $ENABLED_AESCCM"
echo " * AES-CTR: $ENABLED_AESCTR"
echo " * AES-CFB: $ENABLED_AESCFB"
echo " * AES-OFB: $ENABLED_AESOFB"
+echo " * AES-XTS: $ENABLED_AESXTS"
echo " * AES-SIV: $ENABLED_AESSIV"
echo " * AES-EAX: $ENABLED_AESEAX"
echo " * AES Bitspliced: $ENABLED_AESBS"
@@ -9774,14 +9670,17 @@ echo " * wolfSCEP: $ENABLED_WOLFSCEP"
echo " * Secure Remote Password: $ENABLED_SRP"
echo " * Small Stack: $ENABLED_SMALL_STACK"
echo " * Linux Kernel Module: $ENABLED_LINUXKM"
+
+test "$ENABLED_LINUXKM" = "yes" && \
+echo " * Linux kernel module bench: $ENABLED_LINUXKM_BENCHMARKS" && \
+echo " * Linux kernel alg register: $ENABLED_LINUXKM_LKCAPI_REGISTER"
+
echo " * valgrind unit tests: $ENABLED_VALGRIND"
echo " * LIBZ: $ENABLED_LIBZ"
echo " * Examples: $ENABLED_EXAMPLES"
echo " * Crypt tests: $ENABLED_CRYPT_TESTS"
echo " * Stack sizes in tests: $ENABLED_STACKSIZE"
echo " * Heap stats in tests: $ENABLED_TRACKMEMORY"
-echo " * User Crypto: $ENABLED_USER_CRYPTO"
-echo " * Fast RSA: $ENABLED_FAST_RSA"
echo " * Asynchronous Crypto: $ENABLED_ASYNCCRYPT"
echo " * Asynchronous Crypto (sim): $ENABLED_ASYNCCRYPT_SW"
echo " * Cavium Nitrox: $ENABLED_CAVIUM"
@@ -9810,12 +9709,16 @@ echo " * NXP SE050: $ENABLED_SE050"
echo " * Maxim Integrated MAXQ10XX: $ENABLED_MAXQ10XX"
echo " * PSA: $ENABLED_PSA"
echo " * System CA certs: $ENABLED_SYS_CA_CERTS"
+echo " * Dual alg cert support: $ENABLED_DUAL_ALG_CERTS"
echo " * ERR Queues per Thread: $ENABLED_ERRORQUEUEPERTHREAD"
echo " * rwlock: $ENABLED_RWLOCK"
echo " * keylog export: $ENABLED_KEYLOG_EXPORT"
+echo " * AutoSAR : $ENABLED_AUTOSAR"
echo ""
echo "---"
+echo "./configure flags: $(./config.status --config)"
+
fi # $silent != yes
################################################################################
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/cmac.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/cmac.h
index 95612f6c..6dc1dc9d 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/cmac.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/cmac.h
@@ -23,6 +23,8 @@
\sa wc_InitCmac_ex
\sa wc_CmacUpdate
\sa wc_CmacFinal
+ \sa wc_CmacFinalNoFree
+ \sa wc_CmacFree
*/
int wc_InitCmac(Cmac* cmac,
const byte* keyã€word32 keySzã€
@@ -55,6 +57,8 @@ int wc_InitCmac(Cmac* cmac,
\sa wc_InitCmac_ex
\sa wc_CmacUpdate
\sa wc_CmacFinal
+ \sa wc_CmacFinalNoFree
+ \sa wc_CmacFree
*/
int wc_InitCmac_ex(Cmac* cmac,
const byte* key, word32 keySz,
@@ -75,17 +79,40 @@ int wc_InitCmac_ex(Cmac* cmac,
\sa wc_InitCmac
\sa wc_CmacFinal
+ \sa wc_CmacFinalNoFree
+ \sa wc_CmacFree
*/
int wc_CmacUpdate(Cmac* cmac,
const byte* in, word32 inSz);
/*!
+ \ingroup CMAC
+ \brief æš—å·ãƒ™ãƒ¼ã‚¹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸èªè¨¼ã‚³ãƒ¼ãƒ‰ã®æœ€çµ‚çµæžœã‚’生æˆã—ã¾ã™ã€‚ãŸã ã—ã€ä½¿ç”¨ã—ãŸã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®ã‚¯ãƒªãƒ¼ãƒ³ã‚¢ãƒƒãƒ—ã¯è¡Œã„ã¾ã›ã‚“。
+ \return æˆåŠŸã—ãŸã‚‰0ã‚’è¿”ã—ã¾ã™
+ \param cmac Cmac構造体ã¸ã®ãƒã‚¤ãƒ³ã‚¿
+ \param out çµæžœã‚’æ ¼ç´ã™ã‚‹ãƒãƒƒãƒ•ã‚¡ã¸ã®ãƒã‚¤ãƒ³ã‚¿
+ \param outSz çµæžœå‡ºåŠ›å…ˆãƒãƒƒãƒ•ã‚¡ã®ã‚µã‚¤ã‚º
+
+ _Example_
+ \code
+ ret = wc_CmacFinalNoFree(cmac, out, &outSz);
+ (void)wc_CmacFree(cmac);
+ \endcode
+
+ \sa wc_InitCmac
+ \sa wc_CmacFinal
+ \sa wc_CmacFinalNoFree
+ \sa wc_CmacFree
+*/
+int wc_CmacFinalNoFree(Cmac* cmac,
+ byte* out, word32* outSz);
+/*!
\ingroup CMAC
- \brief æš—å·ãƒ™ãƒ¼ã‚¹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸èªè¨¼ã‚³ãƒ¼ãƒ‰ã‚’使用ã—ã¦æœ€çµ‚çµæžœã‚’生æˆã—ã¾ã™
+ \brief æš—å·ãƒ™ãƒ¼ã‚¹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸èªè¨¼ã‚³ãƒ¼ãƒ‰ã‚’使用ã—ã¦æœ€çµ‚çµæžœã‚’生æˆã—ã¾ã™ã€‚加ãˆã¦ã€å†…部ã§wc_CmacFreeを呼ã³å‡ºã—ã¦ã‚³ãƒ³ãƒ†ã‚­ã‚¹ã¨ã‚’クリーンアップã—ã¾ã™ã€‚
\return æˆåŠŸã—ãŸã‚‰0ã‚’è¿”ã—ã¾ã™
\param cmac Cmac構造体ã¸ã®ãƒã‚¤ãƒ³ã‚¿
- \param out çµæžœã®å‡ºåŠ›å…ˆãƒãƒƒãƒ•ã‚¡ã¸ã®ãƒã‚¤ãƒ³ã‚¿
- \param outSz çµæžœã®å‡ºåŠ›å…ˆãƒãƒƒãƒ•ã‚¡ã‚µã‚¤ã‚º (in/out)
+ \param out çµæžœã‚’æ ¼ç´ã™ã‚‹ãƒãƒƒãƒ•ã‚¡ã¸ã®ãƒã‚¤ãƒ³ã‚¿
+ \param outSz çµæžœå‡ºåŠ›å…ˆãƒãƒƒãƒ•ã‚¡ã®ã‚µã‚¤ã‚º
_例_
\code
@@ -94,11 +121,32 @@ int wc_CmacUpdate(Cmac* cmac,
\sa wc_InitCmac
\sa wc_CmacFinal
+ \sa wc_CmacFinalNoFree
+ \sa wc_CmacFree
*/
int wc_CmacFinal(Cmac* cmac,
byte* out, word32* outSz);
/*!
+ \ingroup CMAC
+ \brief CMAC処ç†ä¸­ã«Cmac構造体内ã«ç¢ºä¿ã•ã‚ŒãŸã‚ªãƒ–ジェクトを開放ã—ã¾ã™ã€‚
+ \return æˆåŠŸã—ãŸã‚‰0ã‚’è¿”ã—ã¾ã™
+ \param cmac Cmac構造体ã¸ã®ãƒã‚¤ãƒ³ã‚¿
+
+ _Example_
+ \code
+ ret = wc_CmacFinalNoFree(cmac, out, &outSz);
+ (void)wc_CmacFree(cmac);
+ \endcode
+
+ \sa wc_InitCmac
+ \sa wc_CmacFinalNoFree
+ \sa wc_CmacFinal
+ \sa wc_CmacFree
+*/
+int wc_CmacFree(Cmac* cmac);
+
+/*!
\ingroup CMAC
\brief CMACを生æˆã™ã‚‹ãŸã‚ã®ã‚·ãƒ³ã‚°ãƒ«ã‚·ãƒ§ãƒƒãƒˆé–¢æ•°
\return æˆåŠŸã—ãŸã‚‰0ã‚’è¿”ã—ã¾ã™
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_groups.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_groups.h
index 0571feda..e3009c31 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_groups.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_groups.h
@@ -6,6 +6,7 @@
\defgroup Camellia Algorithms - Camellia
\defgroup ChaCha Algorithms - ChaCha
\defgroup ChaCha20Poly1305 Algorithms - ChaCha20_Poly1305
+  \defgroup CMAC Algorithm - CMAC
\defgroup Crypto Callbacks - CryptoCb
\defgroup Curve25519 Algorithms - Curve25519
\defgroup Curve448 Algorithms - Curve448
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_pages.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_pages.h
index 39065f81..56b9025e 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_pages.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/doxygen_pages.h
@@ -34,6 +34,7 @@
<li>\ref Camellia</li>
<li>\ref ChaCha</li>
<li>\ref ChaCha20Poly1305</li>
+ <li>\ref CMAC</li>
<li>\ref Crypto Callbacks</li>
<li>\ref Curve25519</li>
<li>\ref Curve448</li>
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/rsa.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/rsa.h
index 99d4e236..2ac0149b 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/rsa.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files-ja/rsa.h
@@ -13,7 +13,6 @@
// error initializing RSA key
}
\endcode
- \sa wc_RsaInitCavium
\sa wc_FreeRsaKey
\sa wc_RsaSetRNG
*/
@@ -47,7 +46,6 @@ int wc_InitRsaKey(RsaKey* key, void* heap);
}
\endcode
\sa wc_InitRsaKey
- \sa wc_RsaInitCavium
\sa wc_FreeRsaKey
\sa wc_RsaSetRNG
*/
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/aes.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/aes.h
index 997bc58c..764c4d5f 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/aes.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/aes.h
@@ -668,13 +668,13 @@ int wc_AesCcmDecrypt(Aes* aes, byte* out,
\param aes AES keys for encrypt/decrypt process
\param heap heap hint to use for memory. Can be NULL
- \param devId id to use with async crypto. Can be 0
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
XtsAes aes;
- if(wc_AesXtsInit(&aes, NULL, 0) != 0)
+ if(wc_AesXtsInit(&aes, NULL, INVALID_DEVID) != 0)
{
// Handle error
}
@@ -749,13 +749,13 @@ int wc_AesXtsSetKeyNoInit(XtsAes* aes, const byte* key,
i.e. 32 for a 16 byte key.
\param dir direction, either AES_ENCRYPTION or AES_DECRYPTION
\param heap heap hint to use for memory. Can be NULL
- \param devId id to use with async crypto. Can be 0
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
XtsAes aes;
- if(wc_AesXtsSetKey(&aes, key, sizeof(key), AES_ENCRYPTION, NULL, 0) != 0)
+ if(wc_AesXtsSetKey(&aes, key, sizeof(key), AES_ENCRYPTION, NULL, INVALID_DEVID) != 0)
{
// Handle error
}
@@ -974,7 +974,7 @@ int wc_AesXtsFree(XtsAes* aes);
\param aes aes structure in to initialize
\param heap heap hint to use for malloc / free if needed
- \param devId ID to use with async hardware
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
@@ -1455,7 +1455,7 @@ WOLFSSL_API int wc_AesEaxEncryptUpdate(AesEax* eax, byte* out,
This argument should be NULL if not used
\param authInSz size in bytes of the input authentication data
-
+
_Example_
\code
AesEax eax;
@@ -1571,8 +1571,8 @@ WOLFSSL_API int wc_AesEaxAuthDataUpdate(AesEax* eax,
/*!
\ingroup AES
- \brief This function finalizes the encrypt AEAD operation, producing an auth
- tag over the current authentication stream. \c eax must have been previously
+ \brief This function finalizes the encrypt AEAD operation, producing an auth
+ tag over the current authentication stream. \c eax must have been previously
initialized with a call to \ref wc_AesEaxInit. When done using the \c AesEax
context structure, make sure to free it using \ref wc_AesEaxFree.
@@ -1632,10 +1632,10 @@ WOLFSSL_API int wc_AesEaxEncryptFinal(AesEax* eax,
/*!
\ingroup AES
- \brief This function finalizes the decrypt AEAD operation, finalizing the
+ \brief This function finalizes the decrypt AEAD operation, finalizing the
auth tag computation and checking it for validity against the user supplied
- tag. \c eax must have been previously initialized with a call to
- \ref wc_AesEaxInit. When done using the \c AesEax context structure, make
+ tag. \c eax must have been previously initialized with a call to
+ \ref wc_AesEaxInit. When done using the \c AesEax context structure, make
sure to free it using \ref wc_AesEaxFree.
\return 0 if data is authenticated successfully
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/cmac.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/cmac.h
index 96d5bc8c..7f3ebffd 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/cmac.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/cmac.h
@@ -40,7 +40,7 @@ int wc_InitCmac(Cmac* cmac,
\param type Always WC_CMAC_AES = 1
\param unused not used, exists for potential future use around compatibility
\param heap pointer to the heap hint used for dynamic allocation. Typically used with our static memory option. Can be NULL.
- \param devId ID to use with async hardware. Set to INVALID_DEVID if not using async hardware.
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
@@ -126,7 +126,8 @@ int wc_CmacFinalNoFree(Cmac* cmac,
\sa wc_CmacFinalNoFree
\sa wc_CmacFree
*/
-int wc_CmacFinalNoFree(Cmac* cmac);
+int wc_CmacFinal(Cmac* cmac,
+ byte* out, word32* outSz);
/*!
\ingroup CMAC
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ecc.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ecc.h
index 24e888ef..49de5aa0 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ecc.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ecc.h
@@ -572,8 +572,8 @@ int wc_ecc_init(ecc_key* key);
\return MEMORY_E Returned if there is an error allocating memory
\param key pointer to the ecc_key object to initialize
- \param devId ID to use with async hardware
\param heap pointer to a heap identifier
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
@@ -1968,7 +1968,7 @@ int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
/*!
\ingroup ECC
- \brief Enable ECC support for non-blocking operations. Supported for
+ \brief Enable ECC support for non-blocking operations. Supported for
Single Precision (SP) math with the following build options:
WOLFSSL_SP_NONBLOCK
WOLFSSL_SP_SMALL
@@ -1978,7 +1978,7 @@ int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
\return 0 Returned upon successfully setting the callback context the input message
\param key pointer to the ecc_key object
- \param ctx pointer to ecc_nb_ctx_t structure with stack data cache for SP
+ \param ctx pointer to ecc_nb_ctx_t structure with stack data cache for SP
_Example_
\code
@@ -1998,7 +1998,7 @@ int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
&key
);
- // TODO: Real-time work can be called here
+ // TODO: Real-time work can be called here
} while (ret == FP_WOULDBLOCK);
}
wc_ecc_free(&key);
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/hmac.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/hmac.h
index ca6dcd32..a7c41682 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/hmac.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/hmac.h
@@ -129,6 +129,9 @@ int wolfSSL_GetHmacMaxSize(void);
optional info into a derived key, which it stores in out. The hash type
defaults to MD5 if 0 or NULL is given.
+ The HMAC configure option is --enable-hmac (on by default) or if building
+ sources directly HAVE_HKDF
+
\return 0 Returned upon successfully generating a key with the given inputs
\return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
\return MEMORY_E Returned if there is an error allocating memory
@@ -170,3 +173,439 @@ int wc_HKDF(int type, const byte* inKey, word32 inKeySz,
const byte* salt, word32 saltSz,
const byte* info, word32 infoSz,
byte* out, word32 outSz);
+
+
+/*!
+ \ingroup HMAC
+
+ \brief This function provides access to a HMAC Key Derivation Function
+ (HKDF). It utilizes HMAC to convert inKey, with an optional salt
+ into a derived key, which it stores in out. The hash type
+ defaults to MD5 if 0 or NULL is given.
+
+ The HMAC configure option is --enable-hmac (on by default) or if building
+ sources directly HAVE_HKDF
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param type hash type to use for the HKDF. Valid types are: WC_MD5, WC_SHA,
+ WC_SHA256, WC_SHA384, WC_SHA512, WC_SHA3_224, WC_SHA3_256, WC_SHA3_384 or
+ WC_SHA3_512
+ \param salt pointer to a buffer containing an optional salt. Use NULL
+ instead if not using a salt
+ \param saltSz length of the salt. Use 0 if not using a salt
+ \param inKey pointer to the buffer containing the key to use for KDF
+ \param inKeySz length of the input key
+ \param out pointer to the buffer in which to store the derived key
+
+ _Example_
+ \code
+ byte key[] = { // initialize with key };
+ byte salt[] = { // initialize with salt };
+ byte derivedKey[MAX_DIGEST_SIZE];
+
+ int ret = wc_HKDF_Extract(WC_SHA512, salt, sizeof(salt), key, sizeof(key),
+ derivedKey);
+ if ( ret != 0 ) {
+ // error generating derived key
+ }
+ \endcode
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+ \sa wc_HKDF_Expand_ex
+*/
+int wc_HKDF_Extract(
+ int type,
+ const byte* salt, word32 saltSz,
+ const byte* inKey, word32 inKeySz,
+ byte* out);
+
+/*!
+ \ingroup HMAC
+
+ \brief This function provides access to a HMAC Key Derivation Function
+ (HKDF). It utilizes HMAC to convert inKey, with an optional salt
+ into a derived key, which it stores in out. The hash type
+ defaults to MD5 if 0 or NULL is given. This is the _ex version adding
+ heap hint and device identifier.
+
+ The HMAC configure option is --enable-hmac (on by default) or if building
+ sources directly HAVE_HKDF
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param type hash type to use for the HKDF. Valid types are: WC_MD5, WC_SHA,
+ WC_SHA256, WC_SHA384, WC_SHA512, WC_SHA3_224, WC_SHA3_256, WC_SHA3_384 or
+ WC_SHA3_512
+ \param salt pointer to a buffer containing an optional salt. Use NULL
+ instead if not using a salt
+ \param saltSz length of the salt. Use 0 if not using a salt
+ \param inKey pointer to the buffer containing the key to use for KDF
+ \param inKeySz length of the input key
+ \param out pointer to the buffer in which to store the derived key
+ \param heap heap hint to use for memory. Can be NULL
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
+
+ _Example_
+ \code
+ byte key[] = { // initialize with key };
+ byte salt[] = { // initialize with salt };
+ byte derivedKey[MAX_DIGEST_SIZE];
+
+ int ret = wc_HKDF_Extract_ex(WC_SHA512, salt, sizeof(salt), key, sizeof(key),
+ derivedKey, NULL, INVALID_DEVID);
+ if ( ret != 0 ) {
+ // error generating derived key
+ }
+ \endcode
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Expand
+ \sa wc_HKDF_Expand_ex
+*/
+int wc_HKDF_Extract_ex(
+ int type,
+ const byte* salt, word32 saltSz,
+ const byte* inKey, word32 inKeySz,
+ byte* out,
+ void* heap, int devId);
+
+/*!
+ \ingroup HMAC
+
+ \brief This function provides access to a HMAC Key Derivation Function
+ (HKDF). It utilizes HMAC to convert inKey, with optional info into a
+ derived key, which it stores in out. The hash type
+ defaults to MD5 if 0 or NULL is given.
+
+ The HMAC configure option is --enable-hmac (on by default) or if building
+ sources directly HAVE_HKDF
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param type hash type to use for the HKDF. Valid types are: WC_MD5, WC_SHA,
+ WC_SHA256, WC_SHA384, WC_SHA512, WC_SHA3_224, WC_SHA3_256, WC_SHA3_384 or
+ WC_SHA3_512
+ \param inKey pointer to the buffer containing the key to use for KDF
+ \param inKeySz length of the input key
+ \param info pointer to a buffer containing optional additional info.
+ Use NULL if not appending extra info
+ \param infoSz length of additional info. Use 0 if not using additional info
+ \param out pointer to the buffer in which to store the derived key
+ \param outSz space available in the output buffer to store the
+ generated key
+
+ _Example_
+ \code
+ byte key[] = { // initialize with key };
+ byte salt[] = { // initialize with salt };
+ byte derivedKey[MAX_DIGEST_SIZE];
+
+ int ret = wc_HKDF_Expand(WC_SHA512, key, sizeof(key), NULL, 0,
+ derivedKey, sizeof(derivedKey));
+ if ( ret != 0 ) {
+ // error generating derived key
+ }
+ \endcode
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand_ex
+*/
+int wc_HKDF_Expand(
+ int type,
+ const byte* inKey, word32 inKeySz,
+ const byte* info, word32 infoSz,
+ byte* out, word32 outSz);
+
+/*!
+ \ingroup HMAC
+
+ \brief This function provides access to a HMAC Key Derivation Function
+ (HKDF). It utilizes HMAC to convert inKey, with optional info into a
+ derived key, which it stores in out. The hash type
+ defaults to MD5 if 0 or NULL is given. This is the _ex version adding
+ heap hint and device identifier.
+
+ The HMAC configure option is --enable-hmac (on by default) or if building
+ sources directly HAVE_HKDF
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param type hash type to use for the HKDF. Valid types are: WC_MD5, WC_SHA,
+ WC_SHA256, WC_SHA384, WC_SHA512, WC_SHA3_224, WC_SHA3_256, WC_SHA3_384 or
+ WC_SHA3_512
+ \param inKey pointer to the buffer containing the key to use for KDF
+ \param inKeySz length of the input key
+ \param info pointer to a buffer containing optional additional info.
+ Use NULL if not appending extra info
+ \param infoSz length of additional info. Use 0 if not using additional info
+ \param out pointer to the buffer in which to store the derived key
+ \param outSz space available in the output buffer to store the
+ generated key
+ \param heap heap hint to use for memory. Can be NULL
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
+
+ _Example_
+ \code
+ byte key[] = { // initialize with key };
+ byte salt[] = { // initialize with salt };
+ byte derivedKey[MAX_DIGEST_SIZE];
+
+ int ret = wc_HKDF_Expand_ex(WC_SHA512, key, sizeof(key), NULL, 0,
+ derivedKey, sizeof(derivedKey), NULL, INVALID_DEVID);
+ if ( ret != 0 ) {
+ // error generating derived key
+ }
+ \endcode
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+*/
+int wc_HKDF_Expand_ex(
+ int type,
+ const byte* inKey, word32 inKeySz,
+ const byte* info, word32 infoSz,
+ byte* out, word32 outSz,
+ void* heap, int devId);
+
+/*!
+ \ingroup HMAC
+
+ \brief This function provides access to RFC 5869
+ HMAC-based Extract-and-Expand Key Derivation Function (HKDF) for TLS v1.3
+ key derivation
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param prk Generated pseudorandom key
+ \param salt salt.
+ \param saltLen length of the salt
+ \param ikm pointer to putput for keying material
+ \param ikmLen length of the input keying material buffer
+ \param digest hash type to use for the HKDF. Valid types are: WC_SHA256, WC_SHA384 or WC_SHA512
+
+ _Example_
+ \code
+ byte secret[] = { // initialize with random key };
+ byte salt[] = { // initialize with optional salt };
+ byte masterSecret[MAX_DIGEST_SIZE];
+
+ int ret = wc_Tls13_HKDF_Extract(secret, salt, sizeof(salt), 0,
+ masterSecret, sizeof(masterSecret), WC_SHA512);
+ if ( ret != 0 ) {
+ // error generating derived key
+ }
+ \endcode
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+ \sa wc_Tls13_HKDF_Extract_ex
+*/
+int wc_Tls13_HKDF_Extract(
+ byte* prk,
+ const byte* salt, word32 saltLen,
+ byte* ikm, word32 ikmLen, int digest);
+
+/*!
+ \ingroup HMAC
+
+ \brief This function provides access to RFC 5869
+ HMAC-based Extract-and-Expand Key Derivation Function (HKDF) for TLS v1.3
+ key derivation. This is the _ex version adding heap hint and device identifier.
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param prk Generated pseudorandom key
+ \param salt Salt.
+ \param saltLen Length of the salt
+ \param ikm Pointer to output for keying material
+ \param ikmLen Length of the input keying material buffer
+ \param digest Hash type to use for the HKDF. Valid types are: WC_SHA256, WC_SHA384 or WC_SHA512
+ \param heap Heap hint to use for memory. Can be NULL
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
+
+ _Example_
+ \code
+ byte secret[] = { // initialize with random key };
+ byte salt[] = { // initialize with optional salt };
+ byte masterSecret[MAX_DIGEST_SIZE];
+
+ int ret = wc_Tls13_HKDF_Extract_ex(secret, salt, sizeof(salt), 0,
+ masterSecret, sizeof(masterSecret), WC_SHA512, NULL, INVALID_DEVID);
+ if ( ret != 0 ) {
+ // error generating derived key
+ }
+ \endcode
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+ \sa wc_Tls13_HKDF_Extract
+*/
+int wc_Tls13_HKDF_Extract_ex(
+ byte* prk,
+ const byte* salt, word32 saltLen,
+ byte* ikm, word32 ikmLen, int digest,
+ void* heap, int devId);
+
+/*!
+ \ingroup HMAC
+
+ \brief Expand data using HMAC, salt and label and info. TLS v1.3 defines
+ this function for key derivation. This is the _ex version adding heap hint
+ and device identifier.
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param okm Generated pseudorandom key - output key material.
+ \param okmLen Length of generated pseudorandom key - output key material.
+ \param prk Salt - pseudo-random key.
+ \param prkLen Length of the salt - pseudo-random key.
+ \param protocol TLS protocol label.
+ \param protocolLen Length of the TLS protocol label.
+ \param info Information to expand.
+ \param infoLen Length of the information.
+ \param digest Hash type to use for the HKDF. Valid types are: WC_SHA256, WC_SHA384 or WC_SHA512
+ \param heap Heap hint to use for memory. Can be NULL
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+ \sa wc_Tls13_HKDF_Expand_Label
+ \sa wc_Tls13_HKDF_Expand_Label_Alloc
+*/
+int wc_Tls13_HKDF_Expand_Label_ex(
+ byte* okm, word32 okmLen,
+ const byte* prk, word32 prkLen,
+ const byte* protocol, word32 protocolLen,
+ const byte* label, word32 labelLen,
+ const byte* info, word32 infoLen,
+ int digest,
+ void* heap, int devId);
+
+/*!
+ \ingroup HMAC
+
+ \brief Expand data using HMAC, salt and label and info. TLS v1.3 defines
+ this function for key derivation. This is the _ex version adding heap hint
+ and device identifier.
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param okm Generated pseudorandom key - output key material.
+ \param okmLen Length of generated pseudorandom key - output key material.
+ \param prk Salt - pseudo-random key.
+ \param prkLen Length of the salt - pseudo-random key.
+ \param protocol TLS protocol label.
+ \param protocolLen Length of the TLS protocol label.
+ \param info Information to expand.
+ \param infoLen Length of the information.
+ \param digest Hash type to use for the HKDF. Valid types are: WC_SHA256, WC_SHA384 or WC_SHA512
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+ \sa wc_Tls13_HKDF_Expand_Label_ex
+ \sa wc_Tls13_HKDF_Expand_Label_Alloc
+*/
+int wc_Tls13_HKDF_Expand_Label(
+ byte* okm, word32 okmLen,
+ const byte* prk, word32 prkLen,
+ const byte* protocol, word32 protocolLen,
+ const byte* label, word32 labelLen,
+ const byte* info, word32 infoLen,
+ int digest);
+
+/*!
+ \ingroup HMAC
+
+ \brief This functions is very similar to wc_Tls13_HKDF_Expand_Label(), but it
+ allocates memory if the stack space usually used isn't enough. Expand data
+ using HMAC, salt and label and info. TLS v1.3 defines this function for
+ key derivation. This is the _ex version adding heap hint and device identifier.
+
+ \return 0 Returned upon successfully generating a key with the given inputs
+ \return BAD_FUNC_ARG Returned if an invalid hash type is given (see type param)
+ \return MEMORY_E Returned if there is an error allocating memory
+ \return HMAC_MIN_KEYLEN_E May be returned when using a FIPS implementation
+ and the key length specified is shorter than the minimum acceptable FIPS
+ standard
+
+ \param okm Generated pseudorandom key - output key material.
+ \param okmLen Length of generated pseudorandom key - output key material.
+ \param prk Salt - pseudo-random key.
+ \param prkLen Length of the salt - pseudo-random key.
+ \param protocol TLS protocol label.
+ \param protocolLen Length of the TLS protocol label.
+ \param info Information to expand.
+ \param infoLen Length of the information.
+ \param digest Hash type to use for the HKDF. Valid types are: WC_SHA256, WC_SHA384 or WC_SHA512
+ \param heap Heap hint to use for memory. Can be NULL
+
+ \sa wc_HKDF
+ \sa wc_HKDF_Extract
+ \sa wc_HKDF_Extract_ex
+ \sa wc_HKDF_Expand
+ \sa wc_Tls13_HKDF_Expand_Label
+ \sa wc_Tls13_HKDF_Expand_Label_ex
+*/
+int wc_Tls13_HKDF_Expand_Label_Alloc(
+ byte* okm, word32 okmLen,
+ const byte* prk, word32 prkLen,
+ const byte* protocol, word32 protocolLen,
+ const byte* label, word32 labelLen,
+ const byte* info, word32 infoLen,
+ int digest, void* heap);
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/iotsafe.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/iotsafe.h
index d04d8f31..46bd2e5d 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/iotsafe.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/iotsafe.h
@@ -346,7 +346,7 @@ int wc_iotsafe_ecc_export_private_ex(ecc_key *key, byte *key_id, word16 id_size)
/*!
\ingroup IoTSafe
- \brief Sign a pre-computed 256-bit HASH, using a private key previously stored, or pre-provisioned,
+ \brief Sign a pre-computed HASH, using a private key previously stored, or pre-provisioned,
in the IoT-Safe applet.
\param in pointer to the buffer containing the message hash to sign
@@ -367,7 +367,7 @@ int wc_iotsafe_ecc_sign_hash(byte *in, word32 inlen, byte *out, word32 *outlen,
/*!
\ingroup IoTSafe
- \brief Sign a pre-computed 256-bit HASH, using a private key previously stored, or pre-provisioned,
+ \brief Sign a pre-computed HASH, using a private key previously stored, or pre-provisioned,
in the IoT-Safe applet. Equivalent to \ref wc_iotsafe_ecc_sign_hash "wc_iotsafe_ecc_sign_hash",
except that it can be invoked with a key ID of two or more bytes.
@@ -390,7 +390,7 @@ int wc_iotsafe_ecc_sign_hash_ex(byte *in, word32 inlen, byte *out, word32 *outle
/*!
\ingroup IoTSafe
- \brief Verify an ECC signature against a pre-computed 256-bit HASH, using a public key previously stored, or pre-provisioned,
+ \brief Verify an ECC signature against a pre-computed HASH, using a public key previously stored, or pre-provisioned,
in the IoT-Safe applet. Result is written to res. 1 is valid, 0 is invalid.
Note: Do not use the return value to test for valid. Only use res.
@@ -412,7 +412,7 @@ int wc_iotsafe_ecc_verify_hash(byte *sig, word32 siglen, byte *hash, word32 hash
/*!
\ingroup IoTSafe
- \brief Verify an ECC signature against a pre-computed 256-bit HASH, using a public key previously stored, or pre-provisioned,
+ \brief Verify an ECC signature against a pre-computed HASH, using a public key previously stored, or pre-provisioned,
in the IoT-Safe applet. Result is written to res. 1 is valid, 0 is invalid.
Note: Do not use the return value to test for valid. Only use res.
Equivalent to \ref wc_iotsafe_ecc_verify_hash "wc_iotsafe_ecc_verify_hash",
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/rsa.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/rsa.h
index 6e8c7526..9f099c1e 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/rsa.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/rsa.h
@@ -27,7 +27,6 @@
}
\endcode
- \sa wc_RsaInitCavium
\sa wc_FreeRsaKey
\sa wc_RsaSetRNG
*/
@@ -56,7 +55,7 @@ int wc_InitRsaKey(RsaKey* key, void* heap);
\param heap pointer to a heap identifier, for use with memory overrides,
allowing custom handling of memory allocation. This heap will be the
default used when allocating memory for use with this RSA object
- \param devId ID to use with hardware device
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
@@ -77,7 +76,6 @@ int wc_InitRsaKey(RsaKey* key, void* heap);
\endcode
\sa wc_InitRsaKey
- \sa wc_RsaInitCavium
\sa wc_FreeRsaKey
\sa wc_RsaSetRNG
*/
@@ -136,6 +134,51 @@ int wc_FreeRsaKey(RsaKey* key);
/*!
\ingroup RSA
+ \brief Function that does the RSA operation directly with no padding. The input
+ size must match key size. Typically this is
+ used when padding is already done on the RSA input.
+
+ \return size On successfully encryption the size of the encrypted buffer
+ is returned
+ \return RSA_BUFFER_E RSA buffer error, output too small or input too large
+
+ \param in buffer to do operation on
+ \param inLen length of input buffer
+ \param out buffer to hold results
+ \param outSz gets set to size of result buffer. Should be passed in as length
+ of out buffer. If the pointer "out" is null then outSz gets set to the
+ expected buffer size needed and LENGTH_ONLY_E gets returned.
+ \param key initialized RSA key to use for encrypt/decrypt
+ \param type if using private or public key (RSA_PUBLIC_ENCRYPT,
+ RSA_PUBLIC_DECRYPT, RSA_PRIVATE_ENCRYPT, RSA_PRIVATE_DECRYPT)
+ \param rng initialized WC_RNG struct
+
+ _Example_
+ \code
+ int ret;
+ WC_RNG rng;
+ RsaKey key;
+ byte in[256];
+ byte out[256];
+ word32 outSz = (word32)sizeof(out);
+ …
+
+ ret = wc_RsaDirect(in, (word32)sizeof(in), out, &outSz, &key,
+ RSA_PRIVATE_ENCRYPT, &rng);
+ if (ret < 0) {
+ //handle error
+ }
+ \endcode
+
+ \sa wc_RsaPublicEncrypt
+ \sa wc_RsaPrivateDecrypt
+*/
+int wc_RsaDirect(byte* in, word32 inLen, byte* out, word32* outSz,
+ RsaKey* key, int type, WC_RNG* rng);
+
+/*!
+ \ingroup RSA
+
\brief This function encrypts a message from in and stores the result
in out. It requires an initialized public key and a random number
generator. As a side effect, this function will return the bytes written
@@ -1377,7 +1420,7 @@ int wc_RsaKeyToPublicDer(RsaKey* key, byte* output, word32 inLen);
\ingroup RSA
\brief Convert RSA Public key to DER format. Writes to output, and
- returns count of bytes written. If with_header is 0 then only the
+ returns count of bytes written. If with_header is 0 then only the
( seq + n + e) is returned in ASN.1 DER format and will exclude the header.
\return >0 Success, number of bytes written.
diff --git a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ssl.h b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ssl.h
index 5965f11d..7569daf4 100644
--- a/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ssl.h
+++ b/extra/wolfssl/wolfssl/doc/dox_comments/header_files/ssl.h
@@ -1063,12 +1063,12 @@ int wolfSSL_CTX_use_certificate_file(WOLFSSL_CTX* ctx, const char* file,
argument specifies the format type of the file - SSL_FILETYPE_ASN1or
SSL_FILETYPE_PEM. Please see the examples for proper usage.
- If using an external key store and do not have the private key you can
- instead provide the public key and register the crypro callback to handle
- the signing. For this you can build with either build with crypto callbacks
+ If using an external key store and do not have the private key you can
+ instead provide the public key and register the crypro callback to handle
+ the signing. For this you can build with either build with crypto callbacks
or PK callbacks. To enable crypto callbacks use --enable-cryptocb
- or WOLF_CRYPTO_CB and register a crypto callback using
- wc_CryptoCb_RegisterDevice and set the associated devId using
+ or WOLF_CRYPTO_CB and register a crypto callback using
+ wc_CryptoCb_RegisterDevice and set the associated devId using
wolfSSL_CTX_SetDevId.
\return SSL_SUCCESS upon success.
@@ -1554,12 +1554,12 @@ int wolfSSL_use_certificate_file(WOLFSSL* ssl, const char* file, int format);
The format argument specifies the format type of the file -
SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.
- If using an external key store and do not have the private key you can
- instead provide the public key and register the crypro callback to handle
- the signing. For this you can build with either build with crypto callbacks
+ If using an external key store and do not have the private key you can
+ instead provide the public key and register the crypro callback to handle
+ the signing. For this you can build with either build with crypto callbacks
or PK callbacks. To enable crypto callbacks use --enable-cryptocb or
- WOLF_CRYPTO_CB and register a crypto callback using
- wc_CryptoCb_RegisterDevice and set the associated devId using
+ WOLF_CRYPTO_CB and register a crypto callback using
+ wc_CryptoCb_RegisterDevice and set the associated devId using
wolfSSL_SetDevId.
\return SSL_SUCCESS upon success.
@@ -2086,15 +2086,18 @@ int wolfSSL_get_using_nonblock(WOLFSSL*);
\brief This function writes sz bytes from the buffer, data, to the SSL
connection, ssl. If necessary, wolfSSL_write() will negotiate an SSL/TLS
session if the handshake has not already been performed yet by
- wolfSSL_connect() or wolfSSL_accept(). wolfSSL_write() works with both
- blocking and non-blocking I/O. When the underlying I/O is non-blocking,
- wolfSSL_write() will return when the underlying I/O could not satisfy the
- needs of wolfSSL_write() to continue. In this case, a call to
- wolfSSL_get_error() will yield either SSL_ERROR_WANT_READ or
- SSL_ERROR_WANT_WRITE. The calling process must then repeat the call to
- wolfSSL_write() when the underlying I/O is ready. If the underlying I/O
- is blocking, wolfSSL_write() will only return once the buffer data of
- size sz has been completely written or an error occurred.
+ wolfSSL_connect() or wolfSSL_accept(). When using (D)TLSv1.3 and early data
+ feature is compiled in, this function progresses the handshake only up to
+ the point when it is possible to send data. Next invokations of
+ wolfSSL_Connect()/wolfSSL_Accept()/wolfSSL_read() will complete the
+ handshake. wolfSSL_write() works with both blocking and non-blocking I/O.
+ When the underlying I/O is non-blocking, wolfSSL_write() will return when
+ the underlying I/O could not satisfy the needs of wolfSSL_write() to
+ continue. In this case, a call to wolfSSL_get_error() will yield either
+ SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. The calling process must then
+ repeat the call to wolfSSL_write() when the underlying I/O is ready. If the
+ underlying I/O is blocking, wolfSSL_write() will only return once the buffer
+ data of size sz has been completely written or an error occurred.
\return >0 the number of bytes written upon success.
\return 0 will be returned upon failure. Call wolfSSL_get_error() for
@@ -3041,7 +3044,7 @@ int wolfSSL_library_init(void);
\return BAD_FUNC_ARG if ssl is NULL.
\param ssl pointer to a SSL object, created with wolfSSL_new().
- \param devId ID to use with async hardware
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
@@ -3064,7 +3067,7 @@ int wolfSSL_SetDevId(WOLFSSL* ssl, int devId);
\return BAD_FUNC_ARG if ssl is NULL.
\param ctx pointer to the SSL context, created with wolfSSL_CTX_new().
- \param devId ID to use with async hardware
+ \param devId ID to use with crypto callbacks or async hardware. Set to INVALID_DEVID (-2) if not used
_Example_
\code
@@ -6246,7 +6249,7 @@ int wolfSSL_set_timeout(WOLFSSL* ssl, unsigned int to);
\brief This function sets the timeout value for SSL sessions, in seconds,
for the specified SSL context.
- \return the previous timeout value, if WOLFSSL_ERROR_CODE_OPENSSL is
+ \return the previous timeout value, if WOLFSSL_ERROR_CODE_OPENSSL is
\return defined on success. If not defined, SSL_SUCCESS will be returned.
\return BAD_FUNC_ARG will be returned when the input context (ctx) is null.
@@ -7596,18 +7599,49 @@ int wolfSSL_writev(WOLFSSL* ssl, const struct iovec* iov,
WOLFSSL_METHOD method = wolfTLSv1_2_client_method();
WOLFSSL_CTX* ctx = WOLFSSL_CTX_new(method);
…
- if(!wolfSSL_CTX_UnloadCAs(ctx)){
+ if(wolfSSL_CTX_UnloadCAs(ctx) != SSL_SUCCESS){
// The function did not unload CAs
}
\endcode
\sa wolfSSL_CertManagerUnloadCAs
\sa LockMutex
- \sa FreeSignerTable
\sa UnlockMutex
*/
int wolfSSL_CTX_UnloadCAs(WOLFSSL_CTX*);
+
+/*!
+ \ingroup Setup
+
+ \brief This function unloads intermediate certificates added to the CA
+ signer list and frees them.
+
+ \return SSL_SUCCESS returned on successful execution of the function.
+ \return BAD_FUNC_ARG returned if the WOLFSSL_CTX struct is NULL or there
+ are otherwise unpermitted argument values passed in a subroutine.
+ \return BAD_STATE_E returned if the WOLFSSL_CTX has a reference count > 1.
+ \return BAD_MUTEX_E returned if there was a mutex error. The LockMutex()
+ did not return 0.
+
+ \param ctx a pointer to a WOLFSSL_CTX structure, created using
+ wolfSSL_CTX_new().
+
+ _Example_
+ \code
+ WOLFSSL_METHOD method = wolfTLSv1_2_client_method();
+ WOLFSSL_CTX* ctx = WOLFSSL_CTX_new(method);
+ …
+ if(wolfSSL_CTX_UnloadIntermediateCerts(ctx) != NULL){
+ // The function did not unload CAs
+ }
+ \endcode
+
+ \sa wolfSSL_CTX_UnloadCAs
+ \sa wolfSSL_CertManagerUnloadIntermediateCerts
+*/
+int wolfSSL_CTX_UnloadIntermediateCerts(WOLFSSL_CTX* ctx);
+
/*!
\ingroup Setup
@@ -7755,7 +7789,7 @@ int wolfSSL_CTX_load_verify_buffer(WOLFSSL_CTX* ctx, const unsigned char* in,
The buffer is provided by the in argument of size sz. format specifies
the format type of the buffer; SSL_FILETYPE_ASN1 or SSL_FILETYPE_PEM.
More than one CA certificate may be loaded per buffer as long as the
- format is in PEM. The _ex version was added in PR 2413 and supports
+ format is in PEM. The _ex version was added in PR 2413 and supports
additional arguments for userChain and flags.
\return SSL_SUCCESS upon success
@@ -9548,20 +9582,47 @@ int wolfSSL_CertManagerLoadCABuffer(WOLFSSL_CERT_MANAGER* cm,
#include <wolfssl/ssl.h>
WOLFSSL_CTX* ctx = wolfSSL_CTX_new(protocol method);
- WOLFSSL_CERT_MANAGER* cm = wolfSSL_CertManagerNew();
+ WOLFSSL_CERT_MANAGER* cm = wolfSSL_CTX_GetCertManager(ctx);
...
- if(wolfSSL_CertManagerUnloadCAs(ctx->cm) != SSL_SUCCESS){
- Failure case.
+ if(wolfSSL_CertManagerUnloadCAs(cm) != SSL_SUCCESS){
+ Failure case.
}
\endcode
- \sa FreeSignerTable
\sa UnlockMutex
*/
int wolfSSL_CertManagerUnloadCAs(WOLFSSL_CERT_MANAGER* cm);
/*!
\ingroup CertManager
+ \brief This function unloads intermediate certificates add to the CA
+ signer list.
+
+ \return SSL_SUCCESS returned on successful execution of the function.
+ \return BAD_FUNC_ARG returned if the WOLFSSL_CERT_MANAGER is NULL.
+ \return BAD_MUTEX_E returned if there was a mutex error.
+
+ \param cm a pointer to a WOLFSSL_CERT_MANAGER structure,
+ created using wolfSSL_CertManagerNew().
+
+ _Example_
+ \code
+ #include <wolfssl/ssl.h>
+
+ WOLFSSL_CTX* ctx = wolfSSL_CTX_new(protocol method);
+ WOLFSSL_CERT_MANAGER* cm = wolfSSL_CTX_GetCertManager(ctx);
+ ...
+ if(wolfSSL_CertManagerUnloadIntermediateCerts(cm) != SSL_SUCCESS){
+ Failure case.
+ }
+ \endcode
+
+ \sa UnlockMutex
+*/
+int wolfSSL_CertManagerUnloadIntermediateCerts(WOLFSSL_CERT_MANAGER* cm);
+
+/*!
+ \ingroup CertManager
\brief The function will free the Trusted Peer linked list and unlocks
the trusted peer list.
@@ -13938,9 +13999,11 @@ int wolfSSL_write_early_data(WOLFSSL* ssl, const void* data,
\brief This function reads any early data from a client on resumption.
Call this function instead of wolfSSL_accept() or wolfSSL_accept_TLSv13()
- to accept a client and read any early data in the handshake.
- If there is no early data than the handshake will be processed as normal.
- This function is only used with servers.
+ to accept a client and read any early data in the handshake. The function
+ should be invoked until wolfSSL_is_init_finished() returns true. Early data
+ may be sent by the client in multiple messsages. If there is no early data
+ then the handshake will be processed as normal. This function is only used
+ with servers.
\param [in,out] ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
\param [out] data a buffer to hold the early data read from client.
@@ -13951,7 +14014,7 @@ int wolfSSL_write_early_data(WOLFSSL* ssl, const void* data,
not using TLSv1.3.
\return SIDE_ERROR if called with a client.
\return WOLFSSL_FATAL_ERROR if accepting a connection fails.
- \return WOLFSSL_SUCCESS if successful.
+ \return Number of early data bytes read (may be zero).
_Example_
\code
@@ -13963,19 +14026,16 @@ int wolfSSL_write_early_data(WOLFSSL* ssl, const void* data,
char buffer[80];
...
- ret = wolfSSL_read_early_data(ssl, earlyData, sizeof(earlyData), &outSz);
- if (ret != SSL_SUCCESS) {
- err = wolfSSL_get_error(ssl, ret);
- printf(“error = %d, %s\nâ€, err, wolfSSL_ERR_error_string(err, buffer));
- }
- if (outSz > 0) {
- // early data available
- }
- ret = wolfSSL_accept_TLSv13(ssl);
- if (ret != SSL_SUCCESS) {
- err = wolfSSL_get_error(ssl, ret);
- printf(“error = %d, %s\nâ€, err, wolfSSL_ERR_error_string(err, buffer));
- }
+ do {
+ ret = wolfSSL_read_early_data(ssl, earlyData, sizeof(earlyData), &outSz);
+ if (ret < 0) {
+ err = wolfSSL_get_error(ssl, ret);
+ printf(“error = %d, %s\nâ€, err, wolfSSL_ERR_error_string(err, buffer));
+ }
+ if (outSz > 0) {
+ // early data available
+ }
+ } while (!wolfSSL_is_init_finished(ssl));
\endcode
\sa wolfSSL_write_early_data
@@ -14421,7 +14481,7 @@ int wolfSSL_set_ephemeral_key(WOLFSSL* ssl, int keyAlgo, const char* key, unsign
\param keySz key size pointer
\sa wolfSSL_CTX_set_ephemeral_key
*/
-int wolfSSL_CTX_get_ephemeral_key(WOLFSSL_CTX* ctx, int keyAlgo,
+int wolfSSL_CTX_get_ephemeral_key(WOLFSSL_CTX* ctx, int keyAlgo,
const unsigned char** key, unsigned int* keySz);
/*!
@@ -14434,7 +14494,7 @@ int wolfSSL_CTX_get_ephemeral_key(WOLFSSL_CTX* ctx, int keyAlgo,
\param keySz key size pointer
\sa wolfSSL_set_ephemeral_key
*/
-int wolfSSL_get_ephemeral_key(WOLFSSL* ssl, int keyAlgo,
+int wolfSSL_get_ephemeral_key(WOLFSSL* ssl, int keyAlgo,
const unsigned char** key, unsigned int* keySz);
/*!
@@ -14504,18 +14564,18 @@ unsigned int wolfSSL_SESSION_get_max_early_data(const WOLFSSL_SESSION *s);
int wolfSSL_CRYPTO_get_ex_new_index(int, void*, void*, void*, void*);
/*!
- \ingroup Setup
- \brief In case this function is called in a client side, set certificate types
+ \ingroup Setup
+ \brief In case this function is called in a client side, set certificate types
that can be sent to its peer. In case called in a server side,
set certificate types that can be acceptable from its peer. Put cert types in the
buffer with prioritised order. To reset the settings to default, pass NULL
- for the buffer or pass zero for len. By default, certificate type is only X509.
+ for the buffer or pass zero for len. By default, certificate type is only X509.
In case both side intend to send or accept "Raw public key" cert,
WOLFSSL_CERT_TYPE_RPK should be included in the buffer to set.
\return WOLFSSL_SUCCESS if cert types set successfully
\return BAD_FUNC_ARG if NULL was passed for ctx, illegal value was specified as
- cert type, buf size exceed MAX_CLIENT_CERT_TYPE_CNT was specified or
+ cert type, buf size exceed MAX_CLIENT_CERT_TYPE_CNT was specified or
a duplicate value is found in buf.
\param ctx WOLFSSL_CTX object pointer
@@ -14540,18 +14600,18 @@ int wolfSSL_CRYPTO_get_ex_new_index(int, void*, void*, void*, void*);
int wolfSSL_CTX_set_client_cert_type(WOLFSSL_CTX* ctx, const char* buf, int len);
/*!
- \ingroup Setup
- \brief In case this function is called in a server side, set certificate types
+ \ingroup Setup
+ \brief In case this function is called in a server side, set certificate types
that can be sent to its peer. In case called in a client side,
set certificate types that can be acceptable from its peer. Put cert types in the
buffer with prioritised order. To reset the settings to default, pass NULL
- for the buffer or pass zero for len. By default, certificate type is only X509.
+ for the buffer or pass zero for len. By default, certificate type is only X509.
In case both side intend to send or accept "Raw public key" cert,
WOLFSSL_CERT_TYPE_RPK should be included in the buffer to set.
\return WOLFSSL_SUCCESS if cert types set successfully
\return BAD_FUNC_ARG if NULL was passed for ctx, illegal value was specified as
- cert type, buf size exceed MAX_SERVER_CERT_TYPE_CNT was specified or
+ cert type, buf size exceed MAX_SERVER_CERT_TYPE_CNT was specified or
a duplicate value is found in buf.
\param ctx WOLFSSL_CTX object pointer
@@ -14576,18 +14636,18 @@ int wolfSSL_CTX_set_client_cert_type(WOLFSSL_CTX* ctx, const char* buf, int len)
int wolfSSL_CTX_set_server_cert_type(WOLFSSL_CTX* ctx, const char* buf, int len);
/*!
- \ingroup Setup
- \brief In case this function is called in a client side, set certificate types
+ \ingroup Setup
+ \brief In case this function is called in a client side, set certificate types
that can be sent to its peer. In case called in a server side,
set certificate types that can be acceptable from its peer. Put cert types in the
buffer with prioritised order. To reset the settings to default, pass NULL
- for the buffer or pass zero for len. By default, certificate type is only X509.
+ for the buffer or pass zero for len. By default, certificate type is only X509.
In case both side intend to send or accept "Raw public key" cert,
WOLFSSL_CERT_TYPE_RPK should be included in the buffer to set.
\return WOLFSSL_SUCCESS if cert types set successfully
\return BAD_FUNC_ARG if NULL was passed for ctx, illegal value was specified as
- cert type, buf size exceed MAX_CLIENT_CERT_TYPE_CNT was specified or
+ cert type, buf size exceed MAX_CLIENT_CERT_TYPE_CNT was specified or
a duplicate value is found in buf.
\param ssl WOLFSSL object pointer
@@ -14612,18 +14672,18 @@ int wolfSSL_CTX_set_server_cert_type(WOLFSSL_CTX* ctx, const char* buf, int len)
int wolfSSL_set_client_cert_type(WOLFSSL* ssl, const char* buf, int len);
/*!
- \ingroup Setup
- \brief In case this function is called in a server side, set certificate types
+ \ingroup Setup
+ \brief In case this function is called in a server side, set certificate types
that can be sent to its peer. In case called in a client side,
set certificate types that can be acceptable from its peer. Put cert types in the
buffer with prioritised order. To reset the settings to default, pass NULL
- for the buffer or pass zero for len. By default, certificate type is only X509.
+ for the buffer or pass zero for len. By default, certificate type is only X509.
In case both side intend to send or accept "Raw public key" cert,
WOLFSSL_CERT_TYPE_RPK should be included in the buffer to set.
\return WOLFSSL_SUCCESS if cert types set successfully
\return BAD_FUNC_ARG if NULL was passed for ctx, illegal value was specified as
- cert type, buf size exceed MAX_SERVER_CERT_TYPE_CNT was specified or
+ cert type, buf size exceed MAX_SERVER_CERT_TYPE_CNT was specified or
a duplicate value is found in buf.
\param ctx WOLFSSL_CTX object pointer
@@ -14648,17 +14708,17 @@ int wolfSSL_set_client_cert_type(WOLFSSL* ssl, const char* buf, int len);
int wolfSSL_set_server_cert_type(WOLFSSL* ssl, const char* buf, int len);
/*!
- \ingroup SSL
- \brief This function returns the result of the client certificate type
+ \ingroup SSL
+ \brief This function returns the result of the client certificate type
negotiation done in ClientHello and ServerHello. WOLFSSL_SUCCESS is returned as
- a return value if no negotiation occurs and WOLFSSL_CERT_TYPE_UNKNOWN is
+ a return value if no negotiation occurs and WOLFSSL_CERT_TYPE_UNKNOWN is
returned as the certificate type.
\return WOLFSSL_SUCCESS if a negotiated certificate type could be got
\return BAD_FUNC_ARG if NULL was passed for ctx or tp
\param ssl WOLFSSL object pointer
- \param tp A buffer where a certificate type is to be returned. One of three
- certificate types will be returned: WOLFSSL_CERT_TYPE_RPK,
+ \param tp A buffer where a certificate type is to be returned. One of three
+ certificate types will be returned: WOLFSSL_CERT_TYPE_RPK,
WOLFSSL_CERT_TYPE_X509 or WOLFSSL_CERT_TYPE_UNKNOWN.
_Example_
@@ -14679,17 +14739,17 @@ int wolfSSL_set_server_cert_type(WOLFSSL* ssl, const char* buf, int len);
int wolfSSL_get_negotiated_client_cert_type(WOLFSSL* ssl, int* tp);
/*!
- \ingroup SSL
- \brief This function returns the result of the server certificate type
+ \ingroup SSL
+ \brief This function returns the result of the server certificate type
negotiation done in ClientHello and ServerHello. WOLFSSL_SUCCESS is returned as
- a return value if no negotiation occurs and WOLFSSL_CERT_TYPE_UNKNOWN is
+ a return value if no negotiation occurs and WOLFSSL_CERT_TYPE_UNKNOWN is
returned as the certificate type.
\return WOLFSSL_SUCCESS if a negotiated certificate type could be got
\return BAD_FUNC_ARG if NULL was passed for ctx or tp
\param ssl WOLFSSL object pointer
- \param tp A buffer where a certificate type is to be returned. One of three
- certificate types will be returned: WOLFSSL_CERT_TYPE_RPK,
+ \param tp A buffer where a certificate type is to be returned. One of three
+ certificate types will be returned: WOLFSSL_CERT_TYPE_RPK,
WOLFSSL_CERT_TYPE_X509 or WOLFSSL_CERT_TYPE_UNKNOWN.
_Example_
\code
diff --git a/extra/wolfssl/wolfssl/examples/asn1/asn1.c b/extra/wolfssl/wolfssl/examples/asn1/asn1.c
index 28e90957..57d38d11 100644
--- a/extra/wolfssl/wolfssl/examples/asn1/asn1.c
+++ b/extra/wolfssl/wolfssl/examples/asn1/asn1.c
@@ -180,8 +180,8 @@ static int FindPem(unsigned char* data, word32 offset, word32 len,
word32* start, word32* end)
{
int ret = 0;
- word32 i;
- word32 j;
+ word32 i = 0;
+ word32 j = 0;
/* Find header. */
for (i = offset; i < len; i++) {
diff --git a/extra/wolfssl/wolfssl/examples/client/client.c b/extra/wolfssl/wolfssl/examples/client/client.c
index 0141be1f..020e0f55 100644
--- a/extra/wolfssl/wolfssl/examples/client/client.c
+++ b/extra/wolfssl/wolfssl/examples/client/client.c
@@ -3558,6 +3558,24 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
err_sys("unable to get SSL object");
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* Set our preference for verfication to be for both the native and
+ * alternative chains. Ultimately, its the server's choice.
+ */
+ {
+ byte cks_order[3] = {
+ WOLFSSL_CKS_SIGSPEC_BOTH,
+ WOLFSSL_CKS_SIGSPEC_ALTERNATIVE,
+ WOLFSSL_CKS_SIGSPEC_NATIVE,
+ };
+
+ if (!wolfSSL_UseCKS(ssl, cks_order, sizeof(cks_order))) {
+ wolfSSL_CTX_free(ctx); ctx = NULL;
+ err_sys("unable to set the CKS order.");
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
#ifndef NO_PSK
if (usePsk) {
#if defined(OPENSSL_EXTRA) && defined(WOLFSSL_TLS13) && defined(TEST_PSK_USE_SESSION)
diff --git a/extra/wolfssl/wolfssl/examples/configs/include.am b/extra/wolfssl/wolfssl/examples/configs/include.am
index 781fbcbc..61154167 100644
--- a/extra/wolfssl/wolfssl/examples/configs/include.am
+++ b/extra/wolfssl/wolfssl/examples/configs/include.am
@@ -3,11 +3,13 @@
EXTRA_DIST += examples/configs/README.md
EXTRA_DIST += examples/configs/user_settings_all.h
+EXTRA_DIST += examples/configs/user_settings_arduino.h
EXTRA_DIST += examples/configs/user_settings_min_ecc.h
EXTRA_DIST += examples/configs/user_settings_wolfboot_keytools.h
EXTRA_DIST += examples/configs/user_settings_template.h
EXTRA_DIST += examples/configs/user_settings_fipsv2.h
EXTRA_DIST += examples/configs/user_settings_fipsv5.h
EXTRA_DIST += examples/configs/user_settings_stm32.h
+EXTRA_DIST += examples/configs/user_settings_tls12.h
EXTRA_DIST += examples/configs/user_settings_wolftpm.h
EXTRA_DIST += examples/configs/user_settings_EBSnet.h
diff --git a/extra/wolfssl/wolfssl/examples/configs/user_settings_arduino.h b/extra/wolfssl/wolfssl/examples/configs/user_settings_arduino.h
new file mode 100644
index 00000000..cf64c75d
--- /dev/null
+++ b/extra/wolfssl/wolfssl/examples/configs/user_settings_arduino.h
@@ -0,0 +1,486 @@
+/* examples/configs/user_settings_arduino.h
+ *
+ * Copyright (C) 2006-2023 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 is a sample Arduino user_settings.h for wolfSSL
+ >> Edit with caution. This is the file copied to wolfSSL Arduino library.
+ >> at publish time. (lines with ">>" are removed)
+*/
+
+/* Define a macro to display user settings version in example code: */
+#define WOLFSSL_USER_SETTINGS_ID "Arduino user_settings.h v5.6.7"
+
+/* Due to limited build control, we'll ignore file warnings. */
+/* See https://github.com/arduino/arduino-cli/issues/631 */
+#undef WOLFSSL_IGNORE_FILE_WARN
+#define WOLFSSL_IGNORE_FILE_WARN
+
+#define NO_FILESYSTEM
+#define USE_CERT_BUFFERS_2048
+
+/* Make sure this is not an ESP-IDF file */
+#undef WOLFSSL_ESPIDF
+
+#define HAVE_ECC
+#define WOLFSSL_SMALL_STACK
+/* #define WOLFSSL_SMALL_STACK_EXTRA */
+/* #define WOLFSSL_SMALL_STACK_CIPHERS */
+/* #define NO_DH */
+#define MICRO_SESSION_CACHE
+
+/* RSA must be enabled for examples, but can be disabled like this: */
+/* #define NO_RSA */
+#define RSA_LOW_MEM
+
+#define NO_OLD_TLS
+/* TLS 1.3 */
+/* #define WOLFSSL_TLS13 */
+#if defined(WOLFSSL_TLS13)
+ #define HAVE_TLS_EXTENSIONS
+ #define WC_RSA_PSS
+ #define HAVE_HKDF
+ #define HAVE_AEAD
+#endif
+
+/* #define HAVE_SUPPORTED_CURVES */
+
+/* Cannot use WOLFSSL_NO_MALLOC with small stack */
+/* #define WOLFSSL_NO_MALLOC */
+
+#define HAVE_TLS_EXTENSIONS
+#define HAVE_SUPPORTED_CURVES
+
+/* To further reduce size, client or server functionality can be disabled.
+ * Here, we check if the example code gave us a hint.
+ *
+ * The calling application can define either one of these macros before
+ * including the Arduino wolfssl.h library file:
+ *
+ * WOLFSSL_CLIENT_EXAMPLE
+ * WOLFSSL_SERVER_EXAMPLE
+ */
+#if defined(WOLFSSL_CLIENT_EXAMPLE)
+ #define NO_WOLFSSL_SERVER
+#elif defined(WOLFSSL_SERVER_EXAMPLE)
+ #define NO_WOLFSSL_CLIENT
+#else
+ /* Provide a hint to application that neither WOLFSSL_CLIENT_EXAMPLE
+ * or WOLFSSL_SERVER_EXAMPLE macro hint was desired but not found. */
+ #define NO_WOLFSSL_SERVER_CLIENT_MISSING
+ #warning "Define WOLFSSL_CLIENT_EXAMPLE or WOLFSSL_SERVER_EXAMPLE to" \
+ " optimize memory for small embedded devices."
+ /* Both can be disabled in wolfssl test & benchmark */
+#endif
+
+
+#define NO_DH
+#define NO_DSA
+#define USE_FAST_MATH
+#define WOLFSSL_SMALL_STACK
+#define SINGLE_THREADED
+#define WOLFSSL_LOW_MEMORY
+#define HAVE_AESGCM
+
+/* optionally turn off SHA512/224 SHA512/256 */
+/* #define WOLFSSL_NOSHA512_224 */
+/* #define WOLFSSL_NOSHA512_256 */
+
+/* when you want to use SINGLE THREAD. Note Default ESP-IDF is FreeRTOS */
+#define SINGLE_THREADED
+
+
+/* Optional OPENSSL compatibility */
+/* #define OPENSSL_EXTRA */
+/* #define OPENSSL_ALL */
+
+/* when you want to use pkcs7 */
+/* #define HAVE_PKCS7 */
+
+/* when you want to use AES counter mode */
+/* #define WOLFSSL_AES_DIRECT */
+/* #define WOLFSSL_AES_COUNTER */
+
+/* esp32-wroom-32se specific definition */
+#if defined(WOLFSSL_ESPWROOM32SE)
+ #define WOLFSSL_ATECC508A
+ #define HAVE_PK_CALLBACKS
+ /* when you want to use a custom slot allocation for ATECC608A */
+ /* unless your configuration is unusual, you can use default */
+ /* implementation. */
+ /* #define CUSTOM_SLOT_ALLOCATION */
+#endif
+
+/* RSA primitive specific definition */
+#if defined(WOLFSSL_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
+ /* Define USE_FAST_MATH and SMALL_STACK */
+ #define ESP32_USE_RSA_PRIMITIVE
+
+ #if defined(CONFIG_IDF_TARGET_ESP32)
+
+ /* NOTE HW unreliable for small values! */
+ /* threshold for performance adjustment for HW primitive use */
+ /* X bits of G^X mod P greater than */
+ #undef ESP_RSA_EXPT_XBITS
+ #define ESP_RSA_EXPT_XBITS 32
+
+ /* X and Y of X * Y mod P greater than */
+ #undef ESP_RSA_MULM_BITS
+ #define ESP_RSA_MULM_BITS 16
+
+ #endif
+#endif
+
+/* #define WOLFSSL_ATECC508A_DEBUG */
+
+/* date/time */
+/* if it cannot adjust time in the device, */
+/* enable macro below */
+/* #define NO_ASN_TIME */
+/* #define XTIME time */
+
+
+/* adjust wait-timeout count if you see timeout in RSA HW acceleration */
+#define ESP_RSA_TIMEOUT_CNT 0x249F00
+
+#define HASH_SIZE_LIMIT /* for test.c */
+
+/* USE_FAST_MATH is default */
+#define USE_FAST_MATH
+
+/***** Use SP_MATH *****/
+/* #undef USE_FAST_MATH */
+/* #define SP_MATH */
+/* #define WOLFSSL_SP_MATH_ALL */
+
+/***** Use Integer Heap Math *****/
+/* #undef USE_FAST_MATH */
+/* #define USE_INTEGER_HEAP_MATH */
+
+/* Default is HW enabled unless turned off.
+** Uncomment these lines to force SW instead of HW acceleration */
+
+#if defined(CONFIG_IDF_TARGET_ESP32)
+ /* wolfSSL HW Acceleration supported on ESP32. Uncomment to disable: */
+ /* #define NO_ESP32_CRYPT */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_AES */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD */
+
+ /* These are defined automatically in esp32-crypt.h, here for clarity: */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA224 /* no SHA224 HW on ESP32 */
+
+ #undef ESP_RSA_MULM_BITS
+ #define ESP_RSA_MULM_BITS 16 /* TODO add compile-time warning */
+ /***** END CONFIG_IDF_TARGET_ESP32 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP32S2)
+ /* wolfSSL HW Acceleration supported on ESP32-S2. Uncomment to disable: */
+ /* #define NO_ESP32_CRYPT */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
+ /* Note: There's no AES192 HW on the ESP32-S2; falls back to SW */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_AES */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD */
+ /***** END CONFIG_IDF_TARGET_ESP32S2 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP32S3)
+ /* wolfSSL HW Acceleration supported on ESP32-S3. Uncomment to disable: */
+ /* #define NO_ESP32_CRYPT */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
+ /* Note: There's no AES192 HW on the ESP32-S3; falls back to SW */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_AES */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD */
+ /***** END CONFIG_IDF_TARGET_ESP32S3 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684)
+ /* ESP8684 is essentially ESP32-C2 chip + flash embedded together in a
+ * single QFN 4x4 mm package. Out of released documentation, Technical
+ * Reference Manual as well as ESP-IDF Programming Guide is applicable
+ * to both ESP32-C2 and ESP8684.
+ *
+ * See: https://www.esp32.com/viewtopic.php?f=5&t=27926#:~:text=ESP8684%20is%20essentially%20ESP32%2DC2,both%20ESP32%2DC2%20and%20ESP8684. */
+
+ /* wolfSSL HW Acceleration supported on ESP32-C2. Uncomment to disable: */
+ /* #define NO_ESP32_CRYPT */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_HASH */ /* to disable all SHA HW */
+
+ /* These are defined automatically in esp32-crypt.h, here for clarity */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384 /* no SHA384 HW on C2 */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512 /* no SHA512 HW on C2 */
+
+ /* There's no AES or RSA/Math accelerator on the ESP32-C2
+ * Auto defined with NO_WOLFSSL_ESP32_CRYPT_RSA_PRI, for clarity: */
+ #define NO_WOLFSSL_ESP32_CRYPT_AES
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD
+ /***** END CONFIG_IDF_TARGET_ESP32C2 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP32C3)
+ /* wolfSSL HW Acceleration supported on ESP32-C3. Uncomment to disable: */
+
+ /* #define NO_ESP32_CRYPT */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_HASH */ /* to disable all SHA HW */
+
+ /* These are defined automatically in esp32-crypt.h, here for clarity: */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384 /* no SHA384 HW on C6 */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512 /* no SHA512 HW on C6 */
+
+ /* #define NO_WOLFSSL_ESP32_CRYPT_AES */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD */
+ /***** END CONFIG_IDF_TARGET_ESP32C3 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP32C6)
+ /* wolfSSL HW Acceleration supported on ESP32-C6. Uncomment to disable: */
+
+ /* #define NO_ESP32_CRYPT */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_HASH */
+ /* These are defined automatically in esp32-crypt.h, here for clarity: */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384 /* no SHA384 HW on C6 */
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512 /* no SHA512 HW on C6 */
+
+ /* #define NO_WOLFSSL_ESP32_CRYPT_AES */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD */
+ /* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD */
+ /***** END CONFIG_IDF_TARGET_ESP32C6 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP32H2)
+ /* wolfSSL Hardware Acceleration not yet implemented */
+ #define NO_ESP32_CRYPT
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH
+ #define NO_WOLFSSL_ESP32_CRYPT_AES
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
+ /***** END CONFIG_IDF_TARGET_ESP32H2 *****/
+
+#elif defined(CONFIG_IDF_TARGET_ESP8266)
+ /* TODO: Revisit ESP8266 */
+ #define NO_ESP32_CRYPT
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH
+ #define NO_WOLFSSL_ESP32_CRYPT_AES
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
+ /***** END CONFIG_IDF_TARGET_ESP266 *****/
+#else
+ /* Anything else encountered, disable HW acceleration */
+ #define NO_ESP32_CRYPT
+ #define NO_WOLFSSL_ESP32_CRYPT_HASH
+ #define NO_WOLFSSL_ESP32_CRYPT_AES
+ #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
+#endif /* CONFIG_IDF_TARGET Check */
+
+#define DEBUG_WOLFSSL
+/* Debug options:
+
+#define ESP_VERIFY_MEMBLOCK
+#define DEBUG_WOLFSSL
+#define DEBUG_WOLFSSL_VERBOSE
+#define DEBUG_WOLFSSL_SHA_MUTEX
+#define WOLFSSL_ESP32_CRYPT_DEBUG
+#define WOLFSSL_ESP32_CRYPT_HASH_SHA224_DEBUG
+#define NO_RECOVER_SOFTWARE_CALC
+#define WOLFSSL_TEST_STRAY 1
+#define USE_ESP_DPORT_ACCESS_READ_BUFFER
+#define WOLFSSL_ESP32_HW_LOCK_DEBUG
+#define WOLFSSL_DEBUG_ESP_RSA_MULM_BITS
+#define ESP_DISABLE_HW_TASK_LOCK
+*/
+
+#define WOLFSSL_ESPIDF_ERROR_PAUSE /* Pause in a loop rather than exit. */
+#define WOLFSSL_HW_METRICS
+#define ALT_ECC_SIZE
+/* #define HASH_SIZE_LIMIT */ /* for test.c */
+
+/* #define NO_HW_MATH_TEST */ /* Optionally turn off HW math checks */
+
+/* Optionally include alternate HW test library: alt_hw_test.h */
+/* When enabling, the ./components/wolfssl/CMakeLists.txt file
+ * will need the name of the library in the idf_component_register
+ * for the PRIV_REQUIRES list. */
+/* #define INCLUDE_ALT_HW_TEST */
+
+/* optionally turn off individual math HW acceleration features */
+
+/* Turn off Large Number ESP32 HW Multiplication:
+** [Z = X * Y] in esp_mp_mul() */
+/* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL */
+
+/* Turn off Large Number ESP32 HW Modular Exponentiation:
+** [Z = X^Y mod M] in esp_mp_exptmod() */
+/* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD */
+
+/* Turn off Large Number ESP32 HW Modular Multiplication
+** [Z = X * Y mod M] in esp_mp_mulmod() */
+/* #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD */
+
+
+#define WOLFSSL_PUBLIC_MP /* used by benchmark */
+
+/* when turning on ECC508 / ECC608 support
+#define WOLFSSL_ESPWROOM32SE
+#define HAVE_PK_CALLBACKS
+#define WOLFSSL_ATECC508A
+#define ATCA_WOLFSSL
+*/
+
+/* optional SM4 Ciphers. See https://github.com/wolfSSL/wolfsm
+/* The section below defines macros used in typically all of the wolfSSL
+ * examples such as the client and server for certs stored in header files.
+ *
+ * There are various certificate examples in this header file:
+ * https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/certs_test.h
+ *
+ * To use the sets of macros below, define *one* of these:
+ *
+ * USE_CERT_BUFFERS_1024 - ECC 1024 bit encoded ASN1
+ * USE_CERT_BUFFERS_2048 - RSA 2048 bit encoded ASN1
+ * WOLFSSL_SM[2,3,4] - SM Ciphers
+ *
+ * For example: define USE_CERT_BUFFERS_2048 to use CA Certs used in this
+ * wolfSSL function for the `ca_cert_der_2048` buffer, size and types:
+ *
+ * ret = wolfSSL_CTX_load_verify_buffer(ctx,
+ * CTX_CA_CERT,
+ * CTX_CA_CERT_SIZE,
+ * CTX_CA_CERT_TYPE);
+ *
+ * See https://www.wolfssl.com/documentation/manuals/wolfssl/group__CertsKeys.html#function-wolfssl_ctx_load_verify_buffer
+ *
+ * In this case the CTX_CA_CERT will be defined as `ca_cert_der_2048` as
+ * defined here: https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/certs_test.h
+ *
+ * The CTX_CA_CERT_SIZE and CTX_CA_CERT_TYPE are similarly used to reference
+ * array size and cert type respectively.
+ *
+ * Similarly for loading the private client key:
+ *
+ * ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
+ * CTX_CLIENT_KEY,
+ * CTX_CLIENT_KEY_SIZE,
+ * CTX_CLIENT_KEY_TYPE);
+ *
+ * see https://www.wolfssl.com/documentation/manuals/wolfssl/group__CertsKeys.html#function-wolfssl_ctx_use_privatekey_buffer
+ *
+ * Similarly, the other macros are for server certificates and keys:
+ * `CTX_SERVER_CERT` and `CTX_SERVER_KEY` are available.
+ *
+ * The certificate and key names are typically `static const unsigned char`
+ * arrays. The [NAME]_size are typically `sizeof([array name])`, and the types
+ * are the known wolfSSL encoding type integers (e.g. WOLFSSL_FILETYPE_PEM).
+ *
+ * See `SSL_FILETYPE_[name]` in
+ * https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/ssl.h
+ *
+ * See Abstract Syntax Notation One (ASN.1) in:
+ * https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/wolfcrypt/asn.h
+ *
+ * Optional SM4 Ciphers:
+ *
+ * Although the SM ciphers are shown here, the `certs_test_sm.h` may not yet
+ * be available. See:
+ * https://github.com/wolfSSL/wolfssl/pull/6825
+ * https://github.com/wolfSSL/wolfsm
+ *
+ * Uncomment these 3 macros to enable the SM Ciphers and use the macros below.
+ */
+
+/*
+#define WOLFSSL_SM2
+#define WOLFSSL_SM3
+#define WOLFSSL_SM4
+*/
+
+/* Conditional macros used in wolfSSL TLS client and server examples */
+#if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)
+ #include <wolfssl/certs_test_sm.h>
+ #define CTX_CA_CERT root_sm2
+ #define CTX_CA_CERT_SIZE sizeof_root_sm2
+ #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_PEM
+ #define CTX_SERVER_CERT server_sm2
+ #define CTX_SERVER_CERT_SIZE sizeof_server_sm2
+ #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_PEM
+ #define CTX_SERVER_KEY server_sm2_priv
+ #define CTX_SERVER_KEY_SIZE sizeof_server_sm2_priv
+ #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_PEM
+
+ #undef WOLFSSL_BASE16
+ #define WOLFSSL_BASE16
+#else
+ #if defined(USE_CERT_BUFFERS_2048)
+ #ifdef USE_CERT_BUFFERS_1024
+ #error "USE_CERT_BUFFERS_1024 is already defined. Pick one."
+ #endif
+ #include <wolfssl/certs_test.h>
+ #define CTX_CA_CERT ca_cert_der_2048
+ #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
+ #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_SERVER_CERT server_cert_der_2048
+ #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_2048
+ #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_SERVER_KEY server_key_der_2048
+ #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_2048
+ #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_CLIENT_CERT client_cert_der_2048
+ #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_2048
+ #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_CLIENT_KEY client_key_der_2048
+ #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_2048
+ #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+ #elif defined(USE_CERT_BUFFERS_1024)
+ #ifdef USE_CERT_BUFFERS_2048
+ #error "USE_CERT_BUFFERS_2048 is already defined. Pick one."
+ #endif
+ #include <wolfssl/certs_test.h>
+ #define CTX_CA_CERT ca_cert_der_1024
+ #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
+ #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_CLIENT_CERT client_cert_der_1024
+ #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_1024
+ #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_CLIENT_KEY client_key_der_1024
+ #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_1024
+ #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+
+ #define CTX_SERVER_CERT server_cert_der_1024
+ #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_1024
+ #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
+ #define CTX_SERVER_KEY server_key_der_1024
+ #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_1024
+ #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
+ #else
+ #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024"
+ #endif
+#endif
diff --git a/extra/wolfssl/wolfssl/examples/configs/user_settings_tls12.h b/extra/wolfssl/wolfssl/examples/configs/user_settings_tls12.h
new file mode 100644
index 00000000..c8ec7fce
--- /dev/null
+++ b/extra/wolfssl/wolfssl/examples/configs/user_settings_tls12.h
@@ -0,0 +1,158 @@
+/* user_settings_tls12.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+/* Example for TLS v1.2 client only, ECC only, AES GCM only, SHA2-256 only */
+/* Derived using:
+ * ./configure --disable-rsa --disable-dh --disable-tls13 --disable-chacha \
+ * --disable-poly1305 --disable-sha224 --disable-sha --disable-md5
+ * From generated wolfssl/options.h
+ * Build and Test using:
+ * ./configure --enable-usersettings --disable-examples
+ * make
+ * ./wolfcrypt/test/testwolfcrypt
+ */
+
+#ifndef WOLFSSL_USER_SETTINGS_H
+#define WOLFSSL_USER_SETTINGS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* Platform */
+/* ------------------------------------------------------------------------- */
+/* Use the SetIO callbacks, not the internal wolfio.c socket code */
+#define WOLFSSL_USER_IO
+#define WOLFSSL_IGNORE_FILE_WARN /* ignore file includes not required */
+//#define WOLFSSL_SMALL_STACK /* option to reduce stack size, offload to heap */
+#define NO_FILESYSTEM
+#define NO_WRITEV
+#define NO_SIG_WRAPPER
+
+/* ------------------------------------------------------------------------- */
+/* Math */
+/* ------------------------------------------------------------------------- */
+/* Math Options */
+#if 1 /* Single-precision (SP) wolf math - ECC only */
+ #define WOLFSSL_HAVE_SP_ECC /* use sp_c32.c for math */
+ #define WOLFSSL_SP_SMALL /* use smaller version of code */
+ #define WOLFSSL_SP_MATH /* only SP math - eliminates fast math code */
+ /* optional Cortex-M3+ speedup with inline assembly */
+ //#define WOLFSSL_SP_ARM_CORTEX_M_ASM
+#elif 1
+ /* Multi-precision wolf math */
+ #define WOLFSSL_SP_MATH_ALL /* use sp_int.c generic math */
+ #define WOLFSSL_SP_SMALL /* use smaller version of code */
+#else
+ /* Fast Math - tfm.c */
+ #define USE_FAST_MATH
+ #define TFM_TIMING_RESISTANT
+ #define WOLFSSL_NO_ASM
+#endif
+
+/* ------------------------------------------------------------------------- */
+/* TLS */
+/* ------------------------------------------------------------------------- */
+/* Enable TLS v1.2 (on by default) */
+#undef WOLFSSL_NO_TLS12
+/* Disable TLS server code */
+#define NO_WOLFSSL_SERVER
+//#define NO_WOLFSSL_CLIENT
+/* Disable TLS v1.3 code */
+#undef WOLFSSL_TLS13
+/* Disable older TLS version prior to 1.2 */
+#define NO_OLD_TLS
+
+/* Enable default TLS extensions */
+#define HAVE_TLS_EXTENSIONS
+#define HAVE_SUPPORTED_CURVES
+#define HAVE_EXTENDED_MASTER
+#define HAVE_ENCRYPT_THEN_MAC
+#define HAVE_SERVER_RENEGOTIATION_INFO
+//#define HAVE_SNI /* optional Server Name Indicator (SNI) */
+
+/* ASN */
+#define WOLFSSL_ASN_TEMPLATE /* use newer ASN template asn.c code (default) */
+
+/* Disable Features */
+#define NO_SESSION_CACHE /* disable session resumption */
+#define NO_PSK /* pre-shared-key support */
+
+/* ------------------------------------------------------------------------- */
+/* Algorithms */
+/* ------------------------------------------------------------------------- */
+/* RNG */
+#define HAVE_HASHDRBG /* Use DRBG SHA2-256 and seed */
+
+/* Enable ECC */
+#define HAVE_ECC
+#define ECC_USER_CURVES /* Enable only ECC curves specific */
+#undef NO_ECC256 /* Enable SECP256R1 only (on by default) */
+#define ECC_TIMING_RESISTANT /* Enable Timing Resistance */
+/* Optional ECC calculation speed improvement if not using SP implementation */
+//#define ECC_SHAMIR
+
+/* Enable SHA2-256 only (on by default) */
+#undef NO_SHA256
+//#define USE_SLOW_SHA256 /* Reduces code size by not partially unrolling */
+
+/* Enable AES GCM only */
+#define HAVE_AESGCM
+#define GCM_SMALL /* use small GHASH table */
+#define NO_AES_CBC /* Disable AES CBC */
+
+/* Optional Features */
+//#define WOLFSSL_BASE64_ENCODE /* Enable Base64 encoding */
+
+
+/* Disable Algorithms */
+#define NO_RSA
+#define NO_DH
+#define NO_SHA
+#define NO_DSA
+#define NO_RC4
+#define NO_MD4
+#define NO_MD5
+#define NO_DES3
+#define NO_PWDBASED
+#define WOLFSSL_NO_SHAKE128
+#define WOLFSSL_NO_SHAKE256
+
+/* ------------------------------------------------------------------------- */
+/* Debugging */
+/* ------------------------------------------------------------------------- */
+#undef DEBUG_WOLFSSL
+#undef NO_ERROR_STRINGS
+#if 0
+ #define DEBUG_WOLFSSL
+#else
+ #if 1
+ #define NO_ERROR_STRINGS
+ #endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* WOLFSSL_USER_SETTINGS_H */
diff --git a/extra/wolfssl/wolfssl/examples/pem/pem.c b/extra/wolfssl/wolfssl/examples/pem/pem.c
index 61d7e1ae..e69b1199 100644
--- a/extra/wolfssl/wolfssl/examples/pem/pem.c
+++ b/extra/wolfssl/wolfssl/examples/pem/pem.c
@@ -294,8 +294,8 @@ static int FindPem(char* data, word32 offset, word32 len, word32* start,
word32* end, int* type)
{
int ret = 0;
- word32 i;
- word32 type_off;
+ word32 i = 0;
+ word32 type_off = 0;
char str[PEM_TYPE_MAX_LEN];
/* Find header. */
diff --git a/extra/wolfssl/wolfssl/examples/server/server.c b/extra/wolfssl/wolfssl/examples/server/server.c
index c88f3759..50b6d0a8 100644
--- a/extra/wolfssl/wolfssl/examples/server/server.c
+++ b/extra/wolfssl/wolfssl/examples/server/server.c
@@ -970,10 +970,14 @@ static const char* server_usage_msg[][65] = {
#ifdef HAVE_SUPPORTED_CURVES
"--onlyPskDheKe Must use DHE key exchange with PSK\n", /* 64 */
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ "--altPrivKey <file> Generate alternative signature with this key.\n",
+ /* 65 */
+#endif
"\n"
"For simpler wolfSSL TLS server examples, visit\n"
"https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n",
- /* 65 */
+ /* 66 */
NULL,
},
#ifndef NO_MULTIBYTE_PRINT
@@ -1160,10 +1164,15 @@ static const char* server_usage_msg[][65] = {
#ifdef HAVE_SUPPORTED_CURVES
"--onlyPskDheKe Must use DHE key exchange with PSK\n", /* 64 */
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ "--altPrivKey <file> Generate alternative signature with this key.\n",
+ /* 65 */
+#endif
"\n"
"より簡å˜ãªwolfSSL TSL クライアントã®ä¾‹ã«ã¤ã„ã¦ã¯"
"下記ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ãã ã•ã„\n"
- "https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n", /* 65 */
+ "https://github.com/wolfSSL/wolfssl-examples/tree/master/tls\n",
+ /* 66 */
NULL,
},
#endif
@@ -1320,7 +1329,10 @@ static void Usage(void)
#ifdef HAVE_SUPPORTED_CURVES
printf("%s", msg[++msgId]); /* --onlyPskDheKe */
#endif
- printf("%s", msg[++msgId]); /* Examples repo link */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ printf("%s", msg[++msgId]); /* --altPrivKey */
+#endif
+ printf("%s", msg[++msgId]); /* Examples repo link */
}
#ifdef WOLFSSL_SRTP
@@ -1436,6 +1448,9 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
{"crl-dir", 1, 265},
#endif
{"quieter", 0, 266},
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ { "altPrivKey", 1, 267},
+#endif
{ 0, 0, 0 }
};
#endif
@@ -1600,6 +1615,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
int useX448 = 0;
int usePqc = 0;
char* pqcAlg = NULL;
+ char* altPrivKey = NULL;
int exitWithRet = 0;
int loadCertKeyIntoSSLObj = 0;
@@ -1674,6 +1690,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
(void)nonBlocking;
(void)pqcAlg;
(void)usePqc;
+ (void)altPrivKey;
#ifdef WOLFSSL_TIRTOS
fdOpenSession(Task_self());
@@ -2320,6 +2337,12 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
quieter = 1;
break;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ case 267:
+ altPrivKey = myoptarg;
+ break;
+#endif
+
case -1:
default:
Usage();
@@ -2697,6 +2720,14 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
!= WOLFSSL_SUCCESS)
err_sys_ex(catastrophic, "can't load server private key file, "
"check file and run from wolfSSL home dir");
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ if ((altPrivKey != NULL) &&
+ wolfSSL_CTX_use_AltPrivateKey_file(ctx, altPrivKey,
+ WOLFSSL_FILETYPE_PEM)
+ != WOLFSSL_SUCCESS)
+ err_sys_ex(catastrophic, "can't load alt private key file, "
+ "check file and run from wolfSSL home dir");
+ #endif /* WOLFSSL_DUAL_ALG_CERTS */
#else
/* loads private key file using buffer API */
load_buffer(ctx, ourKey, WOLFSSL_KEY);
diff --git a/extra/wolfssl/wolfssl/fips-check.sh b/extra/wolfssl/wolfssl/fips-check.sh
index b31b16dd..8d116c19 100755
--- a/extra/wolfssl/wolfssl/fips-check.sh
+++ b/extra/wolfssl/wolfssl/fips-check.sh
@@ -16,6 +16,7 @@ GIT="${GIT:-git -c advice.detachedHead=false}"
TEST_DIR="${TEST_DIR:-XXX-fips-test}"
FLAVOR="${FLAVOR:-linux}"
KEEP="${KEEP:-no}"
+MAKECHECK=${MAKECHECK:-yes}
FIPS_REPO="${FIPS_REPO:-git@github.com:wolfssl/fips.git}"
Usage() {
@@ -39,7 +40,9 @@ usageText
}
while [ "$1" ]; do
- if [ "$1" = 'keep' ]; then KEEP='yes'; else FLAVOR="$1"; fi
+ if [ "$1" = 'keep' ]; then KEEP='yes';
+ elif [ "$1" = 'nomakecheck' ]; then MAKECHECK='no';
+ else FLAVOR="$1"; fi
shift
done
@@ -140,7 +143,7 @@ marvell-linux-selftest)
linuxv5)
FIPS_OPTION='v5'
FIPS_FILES=(
- 'wolfcrypt/src/fips.c:WCv5.0-RC12'
+ 'wolfcrypt/src/fips.c:WCv5.2.0.1-RC01'
'wolfcrypt/src/fips_test.c:WCv5.0-RC12'
'wolfcrypt/src/wolfcrypt_first.c:WCv5.0-RC12'
'wolfcrypt/src/wolfcrypt_last.c:WCv5.0-RC12'
@@ -262,8 +265,7 @@ esac
function checkout_files() {
local name
local tag
- for file_entry in "$@"
- do
+ for file_entry in "$@"; do
name=${file_entry%%:*}
tag=${file_entry#*:}
if ! $GIT rev-parse -q --verify "my$tag" >/dev/null
@@ -283,14 +285,12 @@ function copy_fips_files() {
local bname
local dname
local tag
- for file_entry in "$@"
- do
+ for file_entry in "$@"; do
name=${file_entry%%:*}
tag=${file_entry#*:}
bname=$(basename "$name")
dname=$(dirname "$name")
- if ! $GIT rev-parse -q --verify "my$tag" >/dev/null
- then
+ if ! $GIT rev-parse -q --verify "my$tag" >/dev/null; then
$GIT branch --no-track "my$tag" "$tag" || exit $?
fi
$GIT checkout "my$tag" -- "$bname" || exit $?
@@ -305,8 +305,7 @@ fi
pushd "$TEST_DIR" || exit 2
-if ! $GIT clone "$FIPS_REPO" fips
-then
+if ! $GIT clone "$FIPS_REPO" fips; then
echo "fips-check: Couldn't check out FIPS repository."
exit 1
fi
@@ -322,8 +321,7 @@ popd || exit 2
# Since OE additions can still be processed for cert3389 we will call 140-2
# ready "fipsv2-OE-ready" indicating it is ready to use for an OE addition but
# would not be good for a new certification effort with the latest files.
-if [ "$FLAVOR" = 'fipsv2-OE-ready' ] && [ -s wolfcrypt/src/fips.c ]
-then
+if [ "$FLAVOR" = 'fipsv2-OE-ready' ] && [ -s wolfcrypt/src/fips.c ]; then
cp wolfcrypt/src/fips.c wolfcrypt/src/fips.c.bak
sed "s/v4.0.0-alpha/fipsv2-OE-ready/" wolfcrypt/src/fips.c.bak >wolfcrypt/src/fips.c
fi
@@ -343,14 +341,12 @@ cavp-selftest-v2)
;;
esac
-if ! $MAKE
-then
+if ! $MAKE; then
echo 'fips-check: Make failed. Debris left for analysis.'
exit 3
fi
-if [ -s wolfcrypt/src/fips_test.c ]
-then
+if [ -s wolfcrypt/src/fips_test.c ]; then
NEWHASH=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
if [ -n "$NEWHASH" ]; then
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak
@@ -359,15 +355,15 @@ then
fi
fi
-if ! $MAKE check
-then
- echo 'fips-check: Test failed. Debris left for analysis.'
- exit 3
+if [ "$MAKECHECK" = "yes" ]; then
+ if ! $MAKE check; then
+ echo 'fips-check: Test failed. Debris left for analysis.'
+ exit 3
+ fi
fi
# Clean up
popd || exit 2
-if [ "$KEEP" = 'no' ];
-then
+if [ "$KEEP" = 'no' ]; then
rm -rf "$TEST_DIR"
fi
diff --git a/extra/wolfssl/wolfssl/lib/dummy b/extra/wolfssl/wolfssl/lib/dummy
deleted file mode 100644
index 13c3b18c..00000000
--- a/extra/wolfssl/wolfssl/lib/dummy
+++ /dev/null
@@ -1,2 +0,0 @@
-// this is a dummy file
-
diff --git a/extra/wolfssl/wolfssl/linuxkm/Kbuild b/extra/wolfssl/wolfssl/linuxkm/Kbuild
index 093a7a11..29e8092a 100644
--- a/extra/wolfssl/wolfssl/linuxkm/Kbuild
+++ b/extra/wolfssl/wolfssl/linuxkm/Kbuild
@@ -32,6 +32,10 @@ WOLFSSL_CFLAGS += -ffreestanding -Wframe-larger-than=$(MAX_STACK_FRAME_SIZE) -is
ifeq "$(KERNEL_ARCH)" "x86"
WOLFSSL_CFLAGS += -mpreferred-stack-boundary=4
+else ifeq "$(KERNEL_ARCH)" "aarch64"
+ WOLFSSL_CFLAGS += -mno-outline-atomics
+else ifeq "$(KERNEL_ARCH)" "arm64"
+ WOLFSSL_CFLAGS += -mno-outline-atomics
endif
obj-m := libwolfssl.o
@@ -47,9 +51,14 @@ $(obj)/linuxkm/module_exports.o: $(WOLFSSL_OBJ_TARGETS)
# this mechanism only works in kernel 5.x+ (fallback to hardcoded value)
hostprogs := linuxkm/get_thread_size
always-y := $(hostprogs)
+
+HOST_EXTRACFLAGS += $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CFLAGS) -static -fno-omit-frame-pointer
+
# "-mindirect-branch=keep -mfunction-return=keep" to avoid "undefined reference
# to `__x86_return_thunk'" on CONFIG_RETHUNK kernels (5.19.0-rc7)
-HOST_EXTRACFLAGS += $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CFLAGS) -static -fno-omit-frame-pointer -mindirect-branch=keep -mfunction-return=keep
+ifeq "$(KERNEL_ARCH)" "x86"
+ HOST_EXTRACFLAGS += -mindirect-branch=keep -mfunction-return=keep
+endif
# this rule is needed to get build to succeed in 4.x (get_thread_size still doesn't get built)
$(obj)/linuxkm/get_thread_size: $(src)/linuxkm/get_thread_size.c
@@ -90,10 +99,8 @@ ifeq "$(ENABLED_LINUXKM_PIE)" "yes"
$(obj)/linuxkm/module_hooks.o: ccflags-y += $(PIE_SUPPORT_FLAGS)
endif
-ifeq "$(ENABLED_LINUXKM_BENCHMARKS)" "yes"
- $(obj)/linuxkm/module_hooks.o: ccflags-y = $(WOLFSSL_CFLAGS) $(CFLAGS_FPU_ENABLE) $(CFLAGS_SIMD_ENABLE) $(PIE_SUPPORT_FLAGS)
- $(obj)/linuxkm/module_hooks.o: asflags-y = $(WOLFSSL_ASFLAGS) $(ASFLAGS_FPU_ENABLE_SIMD_DISABLE)
-endif
+$(obj)/wolfcrypt/benchmark/benchmark.o: ccflags-y = $(WOLFSSL_CFLAGS) $(CFLAGS_FPU_ENABLE) $(CFLAGS_SIMD_ENABLE) $(PIE_SUPPORT_FLAGS) -DNO_MAIN_FUNCTION
+$(obj)/wolfcrypt/benchmark/benchmark.o: asflags-y = $(WOLFSSL_ASFLAGS) $(ASFLAGS_FPU_ENABLE_SIMD_DISABLE)
asflags-y := $(WOLFSSL_ASFLAGS) $(ASFLAGS_FPUSIMD_DISABLE)
@@ -149,10 +156,10 @@ ifneq "$(quiet)" "silent_"
endif
@cd "$(obj)" || exit $$?; \
for file in $(WOLFCRYPT_PIE_FILES); do \
- $(OBJCOPY) --rename-section .text=.text.wolfcrypt --rename-section .data=.data.wolfcrypt "$$file" || exit $$?; \
+ $(OBJCOPY) --rename-section .text=.text.wolfcrypt --rename-section .data=.data.wolfcrypt --rename-section .rodata=.rodata.wolfcrypt "$$file" || exit $$?; \
done
ifneq "$(quiet)" "silent_"
- @echo ' wolfCrypt .{text,data} sections containerized to .{text,data}.wolfcrypt'
+ @echo ' wolfCrypt .{text,data,rodata} sections containerized to .{text,data,rodata}.wolfcrypt'
endif
$(src)/linuxkm/module_exports.c: rename-pie-text-and-data-sections
diff --git a/extra/wolfssl/wolfssl/linuxkm/Makefile b/extra/wolfssl/wolfssl/linuxkm/Makefile
index 667015fb..4830458c 100644
--- a/extra/wolfssl/wolfssl/linuxkm/Makefile
+++ b/extra/wolfssl/wolfssl/linuxkm/Makefile
@@ -47,6 +47,10 @@ else
WOLFSSL_CFLAGS+=-DNO_CRYPT_TEST
endif
+ifeq "$(ENABLED_LINUXKM_BENCHMARKS)" "yes"
+ WOLFSSL_OBJ_FILES+=wolfcrypt/benchmark/benchmark.o
+endif
+
ifeq "$(ENABLED_LINUXKM_PIE)" "yes"
WOLFCRYPT_PIE_FILES := linuxkm/pie_first.o $(filter wolfcrypt/src/%,$(WOLFSSL_OBJ_FILES)) linuxkm/pie_redirect_table.o linuxkm/pie_last.o
WOLFSSL_OBJ_FILES := $(WOLFCRYPT_PIE_FILES) $(filter-out $(WOLFCRYPT_PIE_FILES),$(WOLFSSL_OBJ_FILES))
diff --git a/extra/wolfssl/wolfssl/linuxkm/include.am b/extra/wolfssl/wolfssl/linuxkm/include.am
index cec11ad2..b89aab40 100644
--- a/extra/wolfssl/wolfssl/linuxkm/include.am
+++ b/extra/wolfssl/wolfssl/linuxkm/include.am
@@ -12,4 +12,5 @@ EXTRA_DIST += m4/ax_linuxkm.m4 \
linuxkm/pie_redirect_table.c \
linuxkm/pie_last.c \
linuxkm/linuxkm_memory.c \
- linuxkm/linuxkm_wc_port.h
+ linuxkm/linuxkm_wc_port.h \
+ linuxkm/lkcapi_glue.c
diff --git a/extra/wolfssl/wolfssl/linuxkm/linuxkm_memory.c b/extra/wolfssl/wolfssl/linuxkm/linuxkm_memory.c
index 31a7b935..81a7dfab 100644
--- a/extra/wolfssl/wolfssl/linuxkm/linuxkm_memory.c
+++ b/extra/wolfssl/wolfssl/linuxkm/linuxkm_memory.c
@@ -80,6 +80,25 @@ struct wc_thread_fpu_count_ent {
unsigned int fpu_state;
};
struct wc_thread_fpu_count_ent *wc_linuxkm_fpu_states = NULL;
+
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wnested-externs"
+/* avoid dependence on "alternatives_patched" and "xfd_validate_state()". */
+#undef CONFIG_X86_DEBUG_FPU
+#include "../kernel/fpu/internal.h"
+#include "../kernel/fpu/xstate.h"
+#pragma GCC diagnostic pop
+
+static union wc_linuxkm_fpu_savebuf {
+ byte buf[1024]; /* must be 64-byte-aligned */
+ struct fpstate fpstate;
+} *wc_linuxkm_fpu_savebufs = NULL;
+
+#endif /* WOLFSSL_COMMERCIAL_LICENSE */
+
#define WC_FPU_COUNT_MASK 0x7fffffffU
#define WC_FPU_SAVED_MASK 0x80000000U
@@ -111,7 +130,37 @@ WARN_UNUSED_RESULT int allocate_wolfcrypt_linuxkm_fpu_states(void)
return MEMORY_E;
}
- memset(wc_linuxkm_fpu_states, 0, wc_linuxkm_fpu_states_n_tracked * sizeof(wc_linuxkm_fpu_states[0]));
+ memset(wc_linuxkm_fpu_states, 0, wc_linuxkm_fpu_states_n_tracked
+ * sizeof(wc_linuxkm_fpu_states[0]));
+
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+ wc_linuxkm_fpu_savebufs = (union wc_linuxkm_fpu_savebuf *)malloc(
+ wc_linuxkm_fpu_states_n_tracked * sizeof(*wc_linuxkm_fpu_savebufs));
+ if (! wc_linuxkm_fpu_savebufs) {
+ pr_err("allocation of %lu bytes for "
+ "wc_linuxkm_fpu_savebufs failed.\n",
+ WC_LINUXKM_ROUND_UP_P_OF_2(wc_linuxkm_fpu_states_n_tracked)
+ * sizeof(*wc_linuxkm_fpu_savebufs));
+ free(wc_linuxkm_fpu_states);
+ wc_linuxkm_fpu_states = NULL;
+ return MEMORY_E;
+ }
+ if ((uintptr_t)wc_linuxkm_fpu_savebufs
+ & (WC_LINUXKM_ROUND_UP_P_OF_2(sizeof(*wc_linuxkm_fpu_savebufs)) - 1))
+ {
+ pr_err("allocation of %lu bytes for "
+ "wc_linuxkm_fpu_savebufs allocated with wrong alignment 0x%lx.\n",
+ WC_LINUXKM_ROUND_UP_P_OF_2(wc_linuxkm_fpu_states_n_tracked)
+ * sizeof(*wc_linuxkm_fpu_savebufs),
+ (uintptr_t)wc_linuxkm_fpu_savebufs);
+ free(wc_linuxkm_fpu_savebufs);
+ wc_linuxkm_fpu_savebufs = NULL;
+ free(wc_linuxkm_fpu_states);
+ wc_linuxkm_fpu_states = NULL;
+ return MEMORY_E;
+ }
+
+#endif
return 0;
}
@@ -141,11 +190,17 @@ void free_wolfcrypt_linuxkm_fpu_states(void) {
}
}
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+ free(wc_linuxkm_fpu_savebufs);
+ wc_linuxkm_fpu_savebufs = NULL;
+#endif
free(wc_linuxkm_fpu_states);
wc_linuxkm_fpu_states = NULL;
}
-/* lock-(mostly)-free thread-local storage facility for tracking recursive fpu pushing/popping */
+/* lock-(mostly)-free thread-local storage facility for tracking recursive fpu
+ * pushing/popping
+ */
static struct wc_thread_fpu_count_ent *wc_linuxkm_fpu_state_assoc(int create_p) {
struct wc_thread_fpu_count_ent *i, *i_endptr, *i_empty;
pid_t my_pid = task_pid_nr(current), i_pid;
@@ -194,7 +249,16 @@ static struct wc_thread_fpu_count_ent *wc_linuxkm_fpu_state_assoc(int create_p)
}
}
-static void wc_linuxkm_fpu_state_free(struct wc_thread_fpu_count_ent *ent) {
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+static struct fpstate *wc_linuxkm_fpstate_buf_from_fpu_state(
+ struct wc_thread_fpu_count_ent *state)
+{
+ size_t i = (size_t)(state - wc_linuxkm_fpu_states) / sizeof(*state);
+ return &wc_linuxkm_fpu_savebufs[i].fpstate;
+}
+#endif
+
+static void wc_linuxkm_fpu_state_release(struct wc_thread_fpu_count_ent *ent) {
if (ent->fpu_state != 0) {
static int warned_nonzero_fpu_state = 0;
if (! warned_nonzero_fpu_state) {
@@ -211,7 +275,7 @@ WARN_UNUSED_RESULT int save_vector_registers_x86(void)
{
struct wc_thread_fpu_count_ent *pstate = wc_linuxkm_fpu_state_assoc(1);
if (pstate == NULL)
- return ENOMEM;
+ return MEMORY_E;
/* allow for nested calls */
if (pstate->fpu_state != 0U) {
@@ -228,25 +292,39 @@ WARN_UNUSED_RESULT int save_vector_registers_x86(void)
}
if (irq_fpu_usable()) {
-#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_COUNT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
- /* inhibit migration, which gums up the algorithm in kernel_fpu_{begin,end}(). */
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+ struct fpstate *fpstate = wc_linuxkm_fpstate_buf_from_fpu_state(pstate);
+ fpregs_lock();
+ fpstate->xfeatures = ~0UL;
+ os_xsave(fpstate);
+#else /* !WOLFSSL_COMMERCIAL_LICENSE */
+#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_COUNT) && \
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
+ /* inhibit migration, which gums up the algorithm in
+ * kernel_fpu_{begin,end}().
+ */
migrate_disable();
#endif
kernel_fpu_begin();
- pstate->fpu_state = 1U; /* set msb 0 to trigger kernel_fpu_end() at cleanup. */
+#endif /* !WOLFSSL_COMMERCIAL_LICENSE */
+ /* set msb 0 to trigger kernel_fpu_end() at cleanup. */
+ pstate->fpu_state = 1U;
} else if (in_nmi() || (hardirq_count() > 0) || (softirq_count() > 0)) {
static int warned_fpu_forbidden = 0;
if (! warned_fpu_forbidden)
pr_err("save_vector_registers_x86 called from IRQ handler.\n");
- wc_linuxkm_fpu_state_free(pstate);
- return EPERM;
+ wc_linuxkm_fpu_state_release(pstate);
+ return BAD_STATE_E;
} else {
-#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_COUNT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
+#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_COUNT) && \
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) && \
+ !defined(WOLFSSL_COMMERCIAL_LICENSE)
migrate_disable();
#endif
/* assume already safely in_kernel_fpu. */
+ /* set msb 1 to inhibit kernel_fpu_end() at cleanup. */
pstate->fpu_state =
- WC_FPU_SAVED_MASK + 1U; /* set msb 1 to inhibit kernel_fpu_end() at cleanup. */
+ WC_FPU_SAVED_MASK + 1U;
}
return 0;
@@ -265,15 +343,23 @@ void restore_vector_registers_x86(void)
return;
}
- if (pstate->fpu_state == 0U)
+ if (pstate->fpu_state == 0U) {
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+ struct fpstate *fpstate = wc_linuxkm_fpstate_buf_from_fpu_state(pstate);
+ os_xrstor(fpstate, fpstate->xfeatures);
+ fpregs_unlock();
+#else
kernel_fpu_end();
- else
+#endif
+ } else
pstate->fpu_state = 0U;
-#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_COUNT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
+#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_COUNT) && \
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) && \
+ !defined(WOLFSSL_COMMERCIAL_LICENSE)
migrate_enable();
#endif
- wc_linuxkm_fpu_state_free(pstate);
+ wc_linuxkm_fpu_state_release(pstate);
return;
}
@@ -294,3 +380,11 @@ void my__show_free_areas(
return;
}
#endif
+
+#if defined(__PIE__) && defined(CONFIG_FORTIFY_SOURCE)
+/* needed because FORTIFY_SOURCE inline implementations call fortify_panic(). */
+void __my_fortify_panic(const char *name) {
+ pr_emerg("__my_fortify_panic in %s\n", name);
+ BUG();
+}
+#endif
diff --git a/extra/wolfssl/wolfssl/linuxkm/linuxkm_wc_port.h b/extra/wolfssl/wolfssl/linuxkm/linuxkm_wc_port.h
index 3e738d00..3553eb8b 100644
--- a/extra/wolfssl/wolfssl/linuxkm/linuxkm_wc_port.h
+++ b/extra/wolfssl/wolfssl/linuxkm/linuxkm_wc_port.h
@@ -65,8 +65,8 @@
(int)_xatoi_res; \
})
- /* Kbuild+gcc on x86 doesn't consistently honor the default ALIGN16 on stack objects,
- * but gives adequate alignment with "32".
+ /* Kbuild+gcc on x86 doesn't consistently honor the default ALIGN16 on stack
+ * objects, but gives adequate alignment with "32".
*/
#if defined(CONFIG_X86) && !defined(ALIGN16)
#define ALIGN16 __attribute__ ( (aligned (32)))
@@ -119,8 +119,133 @@
#include <linux/kconfig.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
+
+ #if defined(CONFIG_FORTIFY_SOURCE) || defined(DEBUG_LINUXKM_FORTIFY_OVERLAY)
+ #ifdef __PIE__
+ /* the inline definitions in fortify-string.h use non-inline
+ * fortify_panic().
+ */
+ extern void __my_fortify_panic(const char *name) __noreturn __cold;
+ #define fortify_panic __my_fortify_panic
+ #endif
+
+ /* the _FORTIFY_SOURCE macros and implementations for several string
+ * functions are incompatible with libwolfssl, so just reimplement with
+ * inlines and remap with macros.
+ */
+
+ #define __ARCH_STRLEN_NO_REDIRECT
+ #define __ARCH_MEMCPY_NO_REDIRECT
+ #define __ARCH_MEMSET_NO_REDIRECT
+ #define __ARCH_MEMMOVE_NO_REDIRECT
+
+ /* the inline definitions in fortify-string.h use non-inline
+ * strlen().
+ */
+ static inline size_t strlen(const char *s) {
+ const char *s_start = s;
+ while (*s)
+ ++s;
+ return (size_t)((uintptr_t)s - (uintptr_t)s_start);
+ }
+
+ #include <linux/string.h>
+
+ #undef strlen
+ #define strlen(s) \
+ ((__builtin_constant_p(s) && __builtin_constant_p(*(s))) ? \
+ (sizeof(s) - 1) : strlen(s))
+
+ static inline void *my_memcpy(void *dest, const void *src, size_t n) {
+ if (! (((uintptr_t)dest | (uintptr_t)src | (uintptr_t)n)
+ & (uintptr_t)(sizeof(uintptr_t) - 1)))
+ {
+ uintptr_t *src_longs = (uintptr_t *)src,
+ *dest_longs = (uintptr_t *)dest,
+ *endp = (uintptr_t *)((u8 *)src + n);
+ while (src_longs < endp)
+ *dest_longs++ = *src_longs++;
+ } else {
+ u8 *src_bytes = (u8 *)src,
+ *dest_bytes = (u8 *)dest,
+ *endp = src_bytes + n;
+ while (src_bytes < endp)
+ *dest_bytes++ = *src_bytes++;
+ }
+ return dest;
+ }
+ #undef memcpy
+ #define memcpy my_memcpy
+
+ static inline void *my_memset(void *dest, int c, size_t n) {
+ if (! (((uintptr_t)dest | (uintptr_t)n)
+ & (uintptr_t)(sizeof(uintptr_t) - 1)))
+ {
+ uintptr_t c_long = __builtin_choose_expr(
+ sizeof(uintptr_t) == 8,
+ (uintptr_t)(u8)c * 0x0101010101010101UL,
+ (uintptr_t)(u8)c * 0x01010101U
+ );
+ uintptr_t *dest_longs = (uintptr_t *)dest,
+ *endp = (uintptr_t *)((u8 *)dest_longs + n);
+ while (dest_longs < endp)
+ *dest_longs++ = c_long;
+ } else {
+ u8 *dest_bytes = (u8 *)dest, *endp = dest_bytes + n;
+ while (dest_bytes < endp)
+ *dest_bytes++ = (u8)c;
+ }
+ return dest;
+ }
+ #undef memset
+ #define memset my_memset
+
+ static inline void *my_memmove(void *dest, const void *src, size_t n) {
+ if (! (((uintptr_t)dest | (uintptr_t)src | (uintptr_t)n)
+ & (uintptr_t)(sizeof(uintptr_t) - 1)))
+ {
+ uintptr_t *src_longs = (uintptr_t *)src,
+ *dest_longs = (uintptr_t *)dest;
+ n >>= __builtin_choose_expr(
+ sizeof(uintptr_t) == 8,
+ 3U,
+ 2U);
+ if (src_longs < dest_longs) {
+ uintptr_t *startp = src_longs;
+ src_longs += n - 1;
+ dest_longs += n - 1;
+ while (src_longs >= startp)
+ *dest_longs-- = *src_longs--;
+ } else if (src_longs > dest_longs) {
+ uintptr_t *endp = src_longs + n;
+ while (src_longs < endp)
+ *dest_longs++ = *src_longs++;
+ }
+ } else {
+ u8 *src_bytes = (u8 *)src, *dest_bytes = (u8 *)dest;
+ if (src_bytes < dest_bytes) {
+ u8 *startp = src_bytes;
+ src_bytes += n - 1;
+ dest_bytes += n - 1;
+ while (src_bytes >= startp)
+ *dest_bytes-- = *src_bytes--;
+ } else if (src_bytes > dest_bytes) {
+ u8 *endp = src_bytes + n;
+ while (src_bytes < endp)
+ *dest_bytes++ = *src_bytes++;
+ }
+ }
+ return dest;
+ }
+ #undef memmove
+ #define memmove my_memmove
+
+ #endif /* CONFIG_FORTIFY_SOURCE */
+
#include <linux/init.h>
#include <linux/module.h>
+ #include <linux/delay.h>
+
#ifdef __PIE__
/* without this, mm.h brings in static, but not inline, pmd_to_page(),
* with direct references to global vmem variables.
@@ -146,7 +271,33 @@
#include <linux/net.h>
#include <linux/slab.h>
- #if defined(WOLFSSL_AESNI) || defined(USE_INTEL_SPEEDUP) || defined(WOLFSSL_SP_X86_64_ASM)
+ #ifdef LINUXKM_LKCAPI_REGISTER
+ #include <linux/crypto.h>
+ #include <linux/scatterlist.h>
+ #include <crypto/scatterwalk.h>
+ #include <crypto/internal/aead.h>
+ #include <crypto/internal/skcipher.h>
+
+ /* the LKCAPI assumes that expanded encrypt and decrypt keys will stay
+ * loaded simultaneously, and the Linux in-tree implementations have two
+ * AES key structs in each context, one for each direction. in
+ * linuxkm/lkcapi_glue.c (used for CBC, CFB, and GCM), we do the same
+ * thing with "struct km_AesCtx". however, wolfCrypt struct AesXts
+ * already has two AES expanded keys, the main and tweak, and the tweak
+ * is always used in the encrypt direction regardless of the main
+ * direction. to avoid allocating and computing a duplicate second
+ * tweak encrypt key, we set
+ * WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS, which adds a second
+ * Aes slot to wolfCrypt's struct AesXts, and activates support for
+ * AES_ENCRYPTION_AND_DECRYPTION on AES-XTS.
+ */
+ #ifndef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ #define WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ #endif
+ #endif
+
+ #if defined(WOLFSSL_AESNI) || defined(USE_INTEL_SPEEDUP) || \
+ defined(WOLFSSL_SP_X86_64_ASM)
#ifndef CONFIG_X86
#error X86 SIMD extensions requested, but CONFIG_X86 is not set.
#endif
@@ -172,20 +323,40 @@
#endif
#endif
- /* benchmarks.c uses floating point math, so needs a working SAVE_VECTOR_REGISTERS(). */
- #if defined(WOLFSSL_LINUXKM_BENCHMARKS) && !defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS)
+ /* benchmarks.c uses floating point math, so needs a working
+ * SAVE_VECTOR_REGISTERS().
+ */
+ #if defined(WOLFSSL_LINUXKM_BENCHMARKS) && \
+ !defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS)
#define WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS
#endif
- #if defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS) && defined(CONFIG_X86)
+ #if defined(WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS) && \
+ defined(CONFIG_X86)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
#include <asm/i387.h>
#else
#include <asm/simd.h>
#endif
#ifndef SAVE_VECTOR_REGISTERS
- #define SAVE_VECTOR_REGISTERS(fail_clause) { int _svr_ret = save_vector_registers_x86(); if (_svr_ret != 0) { fail_clause } }
- #define SAVE_VECTOR_REGISTERS2() save_vector_registers_x86()
+ #define SAVE_VECTOR_REGISTERS(fail_clause) { \
+ int _svr_ret = save_vector_registers_x86(); \
+ if (_svr_ret != 0) { \
+ fail_clause \
+ } \
+ }
+ #endif
+ #ifndef SAVE_VECTOR_REGISTERS2
+ #ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING
+ #define SAVE_VECTOR_REGISTERS2() ({ \
+ int _fuzzer_ret = SAVE_VECTOR_REGISTERS2_fuzzer(); \
+ (_fuzzer_ret == 0) ? \
+ save_vector_registers_x86() : \
+ _fuzzer_ret; \
+ })
+ #else
+ #define SAVE_VECTOR_REGISTERS2() save_vector_registers_x86()
+ #endif
#endif
#ifndef RESTORE_VECTOR_REGISTERS
#define RESTORE_VECTOR_REGISTERS() restore_vector_registers_x86()
@@ -194,6 +365,8 @@
#include <asm/fpsimd.h>
#ifndef SAVE_VECTOR_REGISTERS
#define SAVE_VECTOR_REGISTERS(fail_clause) { int _svr_ret = save_vector_registers_arm(); if (_svr_ret != 0) { fail_clause } }
+ #endif
+ #ifndef SAVE_VECTOR_REGISTERS2
#define SAVE_VECTOR_REGISTERS2() save_vector_registers_arm()
#endif
#ifndef RESTORE_VECTOR_REGISTERS
@@ -291,6 +464,11 @@
#else
typeof(printk) *printk;
#endif
+
+#ifdef CONFIG_FORTIFY_SOURCE
+ typeof(__warn_printk) *__warn_printk;
+#endif
+
typeof(snprintf) *snprintf;
const unsigned char *_ctype;
@@ -333,7 +511,7 @@
#endif
typeof(nr_cpu_ids) *nr_cpu_ids;
- #if defined(CONFIG_SMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
+ #if defined(CONFIG_SMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) && !defined(WOLFSSL_COMMERCIAL_LICENSE)
/* note the current and needed version of these were added in af449901b8 (2020-Sep-17) */
typeof(migrate_disable) *migrate_disable;
typeof(migrate_enable) *migrate_enable;
@@ -341,15 +519,20 @@
#ifdef CONFIG_X86
typeof(irq_fpu_usable) *irq_fpu_usable;
- /* kernel_fpu_begin() replaced by kernel_fpu_begin_mask() in commit e4512289,
- * released in kernel 5.11, backported to 5.4.93
- */
- #ifdef kernel_fpu_begin
- typeof(kernel_fpu_begin_mask) *kernel_fpu_begin_mask;
- #else
- typeof(kernel_fpu_begin) *kernel_fpu_begin;
- #endif
- typeof(kernel_fpu_end) *kernel_fpu_end;
+ #ifdef WOLFSSL_COMMERCIAL_LICENSE
+ typeof(fpregs_lock) *fpregs_lock;
+ typeof(fpregs_lock) *fpregs_unlock;
+ #else /* !WOLFSSL_COMMERCIAL_LICENSE */
+ /* kernel_fpu_begin() replaced by kernel_fpu_begin_mask() in commit e4512289,
+ * released in kernel 5.11, backported to 5.4.93
+ */
+ #ifdef kernel_fpu_begin
+ typeof(kernel_fpu_begin_mask) *kernel_fpu_begin_mask;
+ #else
+ typeof(kernel_fpu_begin) *kernel_fpu_begin;
+ #endif
+ typeof(kernel_fpu_end) *kernel_fpu_end;
+ #endif /* !defined(WOLFSSL_COMMERCIAL_LICENSE) */
#else /* !CONFIG_X86 */
#error WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS is set for an unsupported architecture.
#endif /* arch */
@@ -429,6 +612,11 @@
#else
#define printk (wolfssl_linuxkm_get_pie_redirect_table()->printk)
#endif
+
+ #ifdef CONFIG_FORTIFY_SOURCE
+ #define __warn_printk (wolfssl_linuxkm_get_pie_redirect_table()->__warn_printk)
+ #endif
+
#define snprintf (wolfssl_linuxkm_get_pie_redirect_table()->snprintf)
#define _ctype (wolfssl_linuxkm_get_pie_redirect_table()->_ctype)
@@ -472,19 +660,24 @@
#endif
#define nr_cpu_ids (*(wolfssl_linuxkm_get_pie_redirect_table()->nr_cpu_ids))
- #if defined(CONFIG_SMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
+ #if defined(CONFIG_SMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) && !defined(WOLFSSL_COMMERCIAL_LICENSE)
#define migrate_disable (*(wolfssl_linuxkm_get_pie_redirect_table()->migrate_disable))
#define migrate_enable (*(wolfssl_linuxkm_get_pie_redirect_table()->migrate_enable))
#endif
#ifdef CONFIG_X86
#define irq_fpu_usable (wolfssl_linuxkm_get_pie_redirect_table()->irq_fpu_usable)
- #ifdef kernel_fpu_begin
- #define kernel_fpu_begin_mask (wolfssl_linuxkm_get_pie_redirect_table()->kernel_fpu_begin_mask)
- #else
- #define kernel_fpu_begin (wolfssl_linuxkm_get_pie_redirect_table()->kernel_fpu_begin)
- #endif
- #define kernel_fpu_end (wolfssl_linuxkm_get_pie_redirect_table()->kernel_fpu_end)
+ #ifdef WOLFSSL_COMMERCIAL_LICENSE
+ #define fpregs_lock() (wolfssl_linuxkm_get_pie_redirect_table()->fpregs_lock())
+ #define fpregs_unlock() (wolfssl_linuxkm_get_pie_redirect_table()->fpregs_unlock())
+ #else /* !defined(WOLFSSL_COMMERCIAL_LICENSE) */
+ #ifdef kernel_fpu_begin
+ #define kernel_fpu_begin_mask (wolfssl_linuxkm_get_pie_redirect_table()->kernel_fpu_begin_mask)
+ #else
+ #define kernel_fpu_begin (wolfssl_linuxkm_get_pie_redirect_table()->kernel_fpu_begin)
+ #endif
+ #define kernel_fpu_end (wolfssl_linuxkm_get_pie_redirect_table()->kernel_fpu_end)
+ #endif /* !defined(WOLFSSL_COMMERCIAL_LICENSE) */
#else /* !CONFIG_X86 */
#error WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS is set for an unsupported architecture.
#endif /* archs */
@@ -607,6 +800,7 @@
*/
#include <linux/mutex.h>
typedef struct mutex wolfSSL_Mutex;
+ #define WOLFSSL_MUTEX_INITIALIZER(lockname) __MUTEX_INITIALIZER(lockname)
/* prevent gcc's mm_malloc.h from being included, since it unconditionally
* includes stdlib.h, which is kernel-incompatible.
@@ -616,11 +810,13 @@
/* fun fact: since linux commit 59bb47985c, kmalloc with power-of-2 size is
* aligned to the size.
*/
- #define WC_LINUXKM_ROUND_UP_P_OF_2(x) ( \
- { \
- size_t _alloc_sz = (x); \
- _alloc_sz = 1UL << ((sizeof(_alloc_sz) * 8UL) - __builtin_clzl(_alloc_sz)); \
- _alloc_sz; \
+ #define WC_LINUXKM_ROUND_UP_P_OF_2(x) ( \
+ { \
+ size_t _alloc_sz = (x); \
+ if (_alloc_sz < 8192) \
+ _alloc_sz = 1UL << \
+ ((sizeof(_alloc_sz) * 8UL) - __builtin_clzl(_alloc_sz - 1)); \
+ _alloc_sz; \
})
#ifdef HAVE_KVMALLOC
#define malloc(size) kvmalloc_node(WC_LINUXKM_ROUND_UP_P_OF_2(size), GFP_KERNEL, NUMA_NO_NODE)
@@ -633,14 +829,28 @@
#define realloc(ptr, newsize) krealloc(ptr, WC_LINUXKM_ROUND_UP_P_OF_2(newsize), GFP_KERNEL)
#endif
-#ifdef WOLFSSL_TRACK_MEMORY
+ #ifndef static_assert
+ #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
+ #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
+ #endif
+
#include <wolfssl/wolfcrypt/memory.h>
+
+#ifdef WOLFSSL_TRACK_MEMORY
#define XMALLOC(s, h, t) ({(void)(h); (void)(t); wolfSSL_Malloc(s);})
- #define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) wolfSSL_Free(_xp);})
+ #ifdef WOLFSSL_XFREE_NO_NULLNESS_CHECK
+ #define XFREE(p, h, t) ({(void)(h); (void)(t); wolfSSL_Free(p);})
+ #else
+ #define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) wolfSSL_Free(_xp);})
+ #endif
#define XREALLOC(p, n, h, t) ({(void)(h); (void)(t); wolfSSL_Realloc(p, n);})
#else
#define XMALLOC(s, h, t) ({(void)(h); (void)(t); malloc(s);})
- #define XFREE(p, h, t) ({void* _xp; (void)(h); _xp = (p); if(_xp) free(_xp);})
+ #ifdef WOLFSSL_XFREE_NO_NULLNESS_CHECK
+ #define XFREE(p, h, t) ({(void)(h); (void)(t); free(p);})
+ #else
+ #define XFREE(p, h, t) ({void* _xp; (void)(h); (void)(t); _xp = (p); if(_xp) free(_xp);})
+ #endif
#define XREALLOC(p, n, h, t) ({(void)(h); (void)(t); realloc(p, n);})
#endif
@@ -650,7 +860,7 @@
* them to be evaluable by the preprocessor, for use in sp_int.h.
*/
#if BITS_PER_LONG == 64
- _Static_assert(sizeof(ULONG_MAX) == 8,
+ static_assert(sizeof(ULONG_MAX) == 8,
"BITS_PER_LONG is 64, but ULONG_MAX is not.");
#undef UCHAR_MAX
@@ -672,7 +882,7 @@
#elif BITS_PER_LONG == 32
- _Static_assert(sizeof(ULONG_MAX) == 4,
+ static_assert(sizeof(ULONG_MAX) == 4,
"BITS_PER_LONG is 32, but ULONG_MAX is not.");
#undef UCHAR_MAX
diff --git a/extra/wolfssl/wolfssl/linuxkm/lkcapi_glue.c b/extra/wolfssl/wolfssl/linuxkm/lkcapi_glue.c
new file mode 100644
index 00000000..7fe91afe
--- /dev/null
+++ b/extra/wolfssl/wolfssl/linuxkm/lkcapi_glue.c
@@ -0,0 +1,2739 @@
+/* lkcapi_glue.c -- glue logic to register wolfCrypt implementations with
+ * the Linux Kernel Cryptosystem
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 LINUXKM_LKCAPI_REGISTER
+ #error lkcapi_glue.c included in non-LINUXKM_LKCAPI_REGISTER project.
+#endif
+
+#ifndef WOLFSSL_LINUXKM_LKCAPI_PRIORITY
+/* Larger number means higher priority. The highest in-tree priority is 4001,
+ * in the Cavium driver.
+ */
+#define WOLFSSL_LINUXKM_LKCAPI_PRIORITY 10000
+#endif
+
+#ifndef NO_AES
+
+/* note the FIPS code will be returned on failure even in non-FIPS builds. */
+#define LINUXKM_LKCAPI_AES_KAT_MISMATCH_E AES_KAT_FIPS_E
+#define LINUXKM_LKCAPI_AESGCM_KAT_MISMATCH_E AESGCM_KAT_FIPS_E
+
+#define WOLFKM_AESCBC_NAME "cbc(aes)"
+#define WOLFKM_AESCFB_NAME "cfb(aes)"
+#define WOLFKM_AESGCM_NAME "gcm(aes)"
+#define WOLFKM_AESXTS_NAME "xts(aes)"
+
+#ifdef WOLFSSL_AESNI
+ #define WOLFKM_DRIVER_ISA_EXT "-aesni"
+#else
+ #define WOLFKM_DRIVER_ISA_EXT ""
+#endif
+
+#ifdef HAVE_FIPS
+ #ifndef HAVE_FIPS_VERSION
+ #define WOLFKM_DRIVER_FIPS "-fips-140"
+ #elif HAVE_FIPS_VERSION >= 5
+ #define WOLFKM_DRIVER_FIPS "-fips-140-3"
+ #elif HAVE_FIPS_VERSION == 2
+ #define WOLFKM_DRIVER_FIPS "-fips-140-2"
+ #else
+ #define WOLFKM_DRIVER_FIPS "-fips-140"
+ #endif
+#else
+ #define WOLFKM_DRIVER_FIPS ""
+#endif
+
+#define WOLFKM_DRIVER_SUFFIX \
+ WOLFKM_DRIVER_ISA_EXT WOLFKM_DRIVER_FIPS "-wolfcrypt"
+
+#define WOLFKM_AESCBC_DRIVER ("cbc-aes" WOLFKM_DRIVER_SUFFIX)
+#define WOLFKM_AESCFB_DRIVER ("cfb-aes" WOLFKM_DRIVER_SUFFIX)
+#define WOLFKM_AESGCM_DRIVER ("gcm-aes" WOLFKM_DRIVER_SUFFIX)
+#define WOLFKM_AESXTS_DRIVER ("xts-aes" WOLFKM_DRIVER_SUFFIX)
+
+#if defined(HAVE_AES_CBC) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC))
+static int linuxkm_test_aescbc(void);
+#endif
+#if defined(WOLFSSL_AES_CFB) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB))
+static int linuxkm_test_aescfb(void);
+#endif
+#if defined(HAVE_AESGCM) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESGCM))
+static int linuxkm_test_aesgcm(void);
+#endif
+#if defined(WOLFSSL_AES_XTS) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESXTS))
+static int linuxkm_test_aesxts(void);
+#endif
+
+/* km_AesX(): wrappers to wolfcrypt wc_AesX functions and
+ * structures. */
+
+#include <wolfssl/wolfcrypt/aes.h>
+
+struct km_AesCtx {
+ Aes *aes_encrypt; /* allocated in km_AesInitCommon() to assure
+ * alignment, needed for AESNI.
+ */
+ Aes *aes_decrypt; /* same. */
+};
+
+#if defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESGCM)
+
+static void km_AesExitCommon(struct km_AesCtx * ctx);
+
+static int km_AesInitCommon(
+ struct km_AesCtx * ctx,
+ const char * name,
+ int need_decryption)
+{
+ int err;
+
+ ctx->aes_encrypt = (Aes *)malloc(sizeof(*ctx->aes_encrypt));
+
+ if (! ctx->aes_encrypt) {
+ pr_err("%s: allocation of %zu bytes for encryption key failed.\n",
+ name, sizeof(*ctx->aes_encrypt));
+ return MEMORY_E;
+ }
+
+ err = wc_AesInit(ctx->aes_encrypt, NULL, INVALID_DEVID);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesInit failed: %d\n", name, err);
+ free(ctx->aes_encrypt);
+ ctx->aes_encrypt = NULL;
+ return -EINVAL;
+ }
+
+ if (! need_decryption) {
+ ctx->aes_decrypt = NULL;
+ return 0;
+ }
+
+ ctx->aes_decrypt = (Aes *)malloc(sizeof(*ctx->aes_decrypt));
+
+ if (! ctx->aes_decrypt) {
+ pr_err("%s: allocation of %zu bytes for decryption key failed.\n",
+ name, sizeof(*ctx->aes_decrypt));
+ km_AesExitCommon(ctx);
+ return MEMORY_E;
+ }
+
+ err = wc_AesInit(ctx->aes_decrypt, NULL, INVALID_DEVID);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesInit failed: %d\n", name, err);
+ free(ctx->aes_decrypt);
+ ctx->aes_decrypt = NULL;
+ km_AesExitCommon(ctx);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static void km_AesExitCommon(struct km_AesCtx * ctx)
+{
+ if (ctx->aes_encrypt) {
+ wc_AesFree(ctx->aes_encrypt);
+ free(ctx->aes_encrypt);
+ ctx->aes_encrypt = NULL;
+ }
+ if (ctx->aes_decrypt) {
+ wc_AesFree(ctx->aes_decrypt);
+ free(ctx->aes_decrypt);
+ ctx->aes_decrypt = NULL;
+ }
+}
+
+#if defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB)
+
+static int km_AesSetKeyCommon(struct km_AesCtx * ctx, const u8 *in_key,
+ unsigned int key_len, const char * name)
+{
+ int err;
+
+ err = wc_AesSetKey(ctx->aes_encrypt, in_key, key_len, NULL, AES_ENCRYPTION);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesSetKey for encryption key failed: %d\n", name, err);
+ return -ENOKEY;
+ }
+
+ if (ctx->aes_decrypt) {
+ err = wc_AesSetKey(ctx->aes_decrypt, in_key, key_len, NULL,
+ AES_DECRYPTION);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesSetKey for decryption key failed: %d\n",
+ name, err);
+ return -ENOKEY;
+ }
+ }
+
+ return 0;
+}
+
+static void km_AesExit(struct crypto_skcipher *tfm)
+{
+ struct km_AesCtx * ctx = crypto_skcipher_ctx(tfm);
+ km_AesExitCommon(ctx);
+}
+
+#endif /* LINUXKM_LKCAPI_REGISTER_ALL ||
+ * LINUXKM_LKCAPI_REGISTER_AESCBC ||
+ * LINUXKM_LKCAPI_REGISTER_AESCFB
+ */
+
+#endif /* LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESCBC ||
+ * LINUXKM_LKCAPI_REGISTER_AESCFB || LINUXKM_LKCAPI_REGISTER_AESGCM
+ */
+
+#if defined(HAVE_AES_CBC) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC))
+
+static int km_AesCbcInit(struct crypto_skcipher *tfm)
+{
+ struct km_AesCtx * ctx = crypto_skcipher_ctx(tfm);
+ return km_AesInitCommon(ctx, WOLFKM_AESCBC_DRIVER, 1);
+}
+
+static int km_AesCbcSetKey(struct crypto_skcipher *tfm, const u8 *in_key,
+ unsigned int key_len)
+{
+ struct km_AesCtx * ctx = crypto_skcipher_ctx(tfm);
+ return km_AesSetKeyCommon(ctx, in_key, key_len, WOLFKM_AESCBC_DRIVER);
+}
+
+static int km_AesCbcEncrypt(struct skcipher_request *req)
+{
+ struct crypto_skcipher * tfm = NULL;
+ struct km_AesCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ unsigned int nbytes = 0;
+ int err = 0;
+
+ tfm = crypto_skcipher_reqtfm(req);
+ ctx = crypto_skcipher_ctx(tfm);
+
+ err = skcipher_walk_virt(&walk, req, false);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_virt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ err = wc_AesSetIV(ctx->aes_encrypt, walk.iv);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesSetIV failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = wc_AesCbcEncrypt(ctx->aes_encrypt, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesCbcEncrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ return err;
+}
+
+static int km_AesCbcDecrypt(struct skcipher_request *req)
+{
+ struct crypto_skcipher * tfm = NULL;
+ struct km_AesCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ unsigned int nbytes = 0;
+ int err = 0;
+
+ tfm = crypto_skcipher_reqtfm(req);
+ ctx = crypto_skcipher_ctx(tfm);
+
+ err = skcipher_walk_virt(&walk, req, false);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_virt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ err = wc_AesSetIV(ctx->aes_decrypt, walk.iv);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesSetKey failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = wc_AesCbcDecrypt(ctx->aes_decrypt, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesCbcDecrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ return err;
+}
+
+static struct skcipher_alg cbcAesAlg = {
+ .base.cra_name = WOLFKM_AESCBC_NAME,
+ .base.cra_driver_name = WOLFKM_AESCBC_DRIVER,
+ .base.cra_priority = WOLFSSL_LINUXKM_LKCAPI_PRIORITY,
+ .base.cra_blocksize = AES_BLOCK_SIZE,
+ .base.cra_ctxsize = sizeof(struct km_AesCtx),
+ .base.cra_module = THIS_MODULE,
+ .init = km_AesCbcInit,
+ .exit = km_AesExit,
+ .min_keysize = AES_128_KEY_SIZE,
+ .max_keysize = AES_256_KEY_SIZE,
+ .ivsize = AES_BLOCK_SIZE,
+ .setkey = km_AesCbcSetKey,
+ .encrypt = km_AesCbcEncrypt,
+ .decrypt = km_AesCbcDecrypt,
+};
+static int cbcAesAlg_loaded = 0;
+
+#endif /* HAVE_AES_CBC &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESCBC)
+ */
+
+#if defined(WOLFSSL_AES_CFB) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB))
+
+static int km_AesCfbInit(struct crypto_skcipher *tfm)
+{
+ struct km_AesCtx * ctx = crypto_skcipher_ctx(tfm);
+ return km_AesInitCommon(ctx, WOLFKM_AESCFB_DRIVER, 0);
+}
+
+static int km_AesCfbSetKey(struct crypto_skcipher *tfm, const u8 *in_key,
+ unsigned int key_len)
+{
+ struct km_AesCtx * ctx = crypto_skcipher_ctx(tfm);
+ return km_AesSetKeyCommon(ctx, in_key, key_len, WOLFKM_AESCFB_DRIVER);
+}
+
+static int km_AesCfbEncrypt(struct skcipher_request *req)
+{
+ struct crypto_skcipher * tfm = NULL;
+ struct km_AesCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ unsigned int nbytes = 0;
+ int err = 0;
+
+ tfm = crypto_skcipher_reqtfm(req);
+ ctx = crypto_skcipher_ctx(tfm);
+
+ err = skcipher_walk_virt(&walk, req, false);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_virt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ err = wc_AesSetIV(ctx->aes_encrypt, walk.iv);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesSetKey failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = wc_AesCfbEncrypt(ctx->aes_encrypt, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesCfbEncrypt failed %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ return err;
+}
+
+static int km_AesCfbDecrypt(struct skcipher_request *req)
+{
+ struct crypto_skcipher * tfm = NULL;
+ struct km_AesCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ unsigned int nbytes = 0;
+ int err = 0;
+
+ tfm = crypto_skcipher_reqtfm(req);
+ ctx = crypto_skcipher_ctx(tfm);
+
+ err = skcipher_walk_virt(&walk, req, false);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_virt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ err = wc_AesSetIV(ctx->aes_encrypt, walk.iv);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesSetKey failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = wc_AesCfbDecrypt(ctx->aes_encrypt, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesCfbDecrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ return err;
+}
+
+static struct skcipher_alg cfbAesAlg = {
+ .base.cra_name = WOLFKM_AESCFB_NAME,
+ .base.cra_driver_name = WOLFKM_AESCFB_DRIVER,
+ .base.cra_priority = WOLFSSL_LINUXKM_LKCAPI_PRIORITY,
+ .base.cra_blocksize = AES_BLOCK_SIZE,
+ .base.cra_ctxsize = sizeof(struct km_AesCtx),
+ .base.cra_module = THIS_MODULE,
+ .init = km_AesCfbInit,
+ .exit = km_AesExit,
+ .min_keysize = AES_128_KEY_SIZE,
+ .max_keysize = AES_256_KEY_SIZE,
+ .ivsize = AES_BLOCK_SIZE,
+ .setkey = km_AesCfbSetKey,
+ .encrypt = km_AesCfbEncrypt,
+ .decrypt = km_AesCfbDecrypt,
+};
+static int cfbAesAlg_loaded = 0;
+
+#endif /* WOLFSSL_AES_CFB &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESCBC)
+ */
+
+#if defined(HAVE_AESGCM) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESGCM))
+
+#ifndef WOLFSSL_AESGCM_STREAM
+ #error LKCAPI registration of AES-GCM requires WOLFSSL_AESGCM_STREAM (--enable-aesgcm-stream).
+#endif
+
+static int km_AesGcmInit(struct crypto_aead * tfm)
+{
+ struct km_AesCtx * ctx = crypto_aead_ctx(tfm);
+ return km_AesInitCommon(ctx, WOLFKM_AESGCM_DRIVER, 0);
+}
+
+static void km_AesGcmExit(struct crypto_aead * tfm)
+{
+ struct km_AesCtx * ctx = crypto_aead_ctx(tfm);
+ km_AesExitCommon(ctx);
+}
+
+static int km_AesGcmSetKey(struct crypto_aead *tfm, const u8 *in_key,
+ unsigned int key_len)
+{
+ int err;
+ struct km_AesCtx * ctx = crypto_aead_ctx(tfm);
+
+ err = wc_AesGcmSetKey(ctx->aes_encrypt, in_key, key_len);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmSetKey failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -ENOKEY;
+ }
+
+ return 0;
+}
+
+static int km_AesGcmSetAuthsize(struct crypto_aead *tfm, unsigned int authsize)
+{
+ (void)tfm;
+ if (authsize > AES_BLOCK_SIZE ||
+ authsize < WOLFSSL_MIN_AUTH_TAG_SZ) {
+ pr_err("%s: invalid authsize: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), authsize);
+ return -EINVAL;
+ }
+ return 0;
+}
+
+/*
+ * aead ciphers recieve data in scatterlists in following order:
+ * encrypt
+ * req->src: aad||plaintext
+ * req->dst: aad||ciphertext||tag
+ * decrypt
+ * req->src: aad||ciphertext||tag
+ * req->dst: aad||plaintext, return 0 or -EBADMSG
+ */
+
+static int km_AesGcmEncrypt(struct aead_request *req)
+{
+ struct crypto_aead * tfm = NULL;
+ struct km_AesCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ struct scatter_walk assocSgWalk;
+ unsigned int nbytes = 0;
+ u8 authTag[AES_BLOCK_SIZE];
+ int err = 0;
+ unsigned int assocLeft = 0;
+ unsigned int cryptLeft = 0;
+ u8 * assoc = NULL;
+
+ tfm = crypto_aead_reqtfm(req);
+ ctx = crypto_aead_ctx(tfm);
+ assocLeft = req->assoclen;
+ cryptLeft = req->cryptlen;
+
+ scatterwalk_start(&assocSgWalk, req->src);
+
+ err = skcipher_walk_aead_encrypt(&walk, req, false);
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_aead_encrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -1;
+ }
+
+ err = wc_AesGcmInit(ctx->aes_encrypt, NULL /*key*/, 0 /*keylen*/, walk.iv,
+ AES_BLOCK_SIZE);
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmInit failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ assoc = scatterwalk_map(&assocSgWalk);
+ if (unlikely(IS_ERR(assoc))) {
+ pr_err("%s: scatterwalk_map failed: %ld\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)),
+ PTR_ERR(assoc));
+ return err;
+ }
+
+ err = wc_AesGcmEncryptUpdate(ctx->aes_encrypt, NULL, NULL, 0,
+ assoc, assocLeft);
+ assocLeft -= assocLeft;
+ scatterwalk_unmap(assoc);
+ assoc = NULL;
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmEncryptUpdate failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ int n = nbytes;
+
+ if (likely(cryptLeft && nbytes)) {
+ n = cryptLeft < nbytes ? cryptLeft : nbytes;
+
+ err = wc_AesGcmEncryptUpdate(
+ ctx->aes_encrypt,
+ walk.dst.virt.addr,
+ walk.src.virt.addr,
+ cryptLeft,
+ NULL, 0);
+ nbytes -= n;
+ cryptLeft -= n;
+ }
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmEncryptUpdate failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ err = wc_AesGcmEncryptFinal(ctx->aes_encrypt, authTag, tfm->authsize);
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmEncryptFinal failed with return code %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ /* Now copy the auth tag into request scatterlist. */
+ scatterwalk_map_and_copy(authTag, req->dst,
+ req->assoclen + req->cryptlen,
+ tfm->authsize, 1);
+
+ return err;
+}
+
+static int km_AesGcmDecrypt(struct aead_request *req)
+{
+ struct crypto_aead * tfm = NULL;
+ struct km_AesCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ struct scatter_walk assocSgWalk;
+ unsigned int nbytes = 0;
+ u8 origAuthTag[AES_BLOCK_SIZE];
+ int err = 0;
+ unsigned int assocLeft = 0;
+ unsigned int cryptLeft = 0;
+ u8 * assoc = NULL;
+
+ tfm = crypto_aead_reqtfm(req);
+ ctx = crypto_aead_ctx(tfm);
+ assocLeft = req->assoclen;
+ cryptLeft = req->cryptlen - tfm->authsize;
+
+ /* Copy out original auth tag from req->src. */
+ scatterwalk_map_and_copy(origAuthTag, req->src,
+ req->assoclen + req->cryptlen - tfm->authsize,
+ tfm->authsize, 0);
+
+ scatterwalk_start(&assocSgWalk, req->src);
+
+ err = skcipher_walk_aead_decrypt(&walk, req, false);
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_aead_decrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return err;
+ }
+
+ err = wc_AesGcmInit(ctx->aes_encrypt, NULL /*key*/, 0 /*keylen*/, walk.iv,
+ AES_BLOCK_SIZE);
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmInit failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ assoc = scatterwalk_map(&assocSgWalk);
+ if (unlikely(IS_ERR(assoc))) {
+ pr_err("%s: scatterwalk_map failed: %ld\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)),
+ PTR_ERR(assoc));
+ return err;
+ }
+
+ err = wc_AesGcmDecryptUpdate(ctx->aes_encrypt, NULL, NULL, 0,
+ assoc, assocLeft);
+ assocLeft -= assocLeft;
+ scatterwalk_unmap(assoc);
+ assoc = NULL;
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmDecryptUpdate failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ int n = nbytes;
+
+ if (likely(cryptLeft && nbytes)) {
+ n = cryptLeft < nbytes ? cryptLeft : nbytes;
+
+ err = wc_AesGcmDecryptUpdate(
+ ctx->aes_encrypt,
+ walk.dst.virt.addr,
+ walk.src.virt.addr,
+ cryptLeft,
+ NULL, 0);
+ nbytes -= n;
+ cryptLeft -= n;
+ }
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmDecryptUpdate failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ err = wc_AesGcmDecryptFinal(ctx->aes_encrypt, origAuthTag, tfm->authsize);
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesGcmDecryptFinal failed with return code %d\n",
+ crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm)), err);
+
+ if (err == AES_GCM_AUTH_E) {
+ return -EBADMSG;
+ }
+ else {
+ return -EINVAL;
+ }
+ }
+
+ return err;
+}
+
+static struct aead_alg gcmAesAead = {
+ .base.cra_name = WOLFKM_AESGCM_NAME,
+ .base.cra_driver_name = WOLFKM_AESGCM_DRIVER,
+ .base.cra_priority = WOLFSSL_LINUXKM_LKCAPI_PRIORITY,
+ .base.cra_blocksize = 1,
+ .base.cra_ctxsize = sizeof(struct km_AesCtx),
+ .base.cra_module = THIS_MODULE,
+ .init = km_AesGcmInit,
+ .exit = km_AesGcmExit,
+ .setkey = km_AesGcmSetKey,
+ .setauthsize = km_AesGcmSetAuthsize,
+ .encrypt = km_AesGcmEncrypt,
+ .decrypt = km_AesGcmDecrypt,
+ .ivsize = AES_BLOCK_SIZE,
+ .maxauthsize = AES_BLOCK_SIZE,
+ .chunksize = AES_BLOCK_SIZE,
+};
+static int gcmAesAead_loaded = 0;
+
+#endif /* HAVE_AESGCM &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESGCM) &&
+ */
+
+#if defined(WOLFSSL_AES_XTS) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESXTS))
+
+struct km_AesXtsCtx {
+ XtsAes *aesXts; /* allocated in km_AesXtsInitCommon() to assure alignment
+ * for AESNI.
+ */
+};
+
+static int km_AesXtsInitCommon(struct km_AesXtsCtx * ctx, const char * name)
+{
+ int err;
+
+ ctx->aesXts = (XtsAes *)malloc(sizeof(*ctx->aesXts));
+
+ if (! ctx->aesXts)
+ return -MEMORY_E;
+
+ err = wc_AesXtsInit(ctx->aesXts, NULL, INVALID_DEVID);
+
+ if (unlikely(err)) {
+ pr_err("%s: km_AesXtsInitCommon failed: %d\n", name, err);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int km_AesXtsInit(struct crypto_skcipher *tfm)
+{
+ struct km_AesXtsCtx * ctx = crypto_skcipher_ctx(tfm);
+ return km_AesXtsInitCommon(ctx, WOLFKM_AESXTS_DRIVER);
+}
+
+static void km_AesXtsExit(struct crypto_skcipher *tfm)
+{
+ struct km_AesXtsCtx * ctx = crypto_skcipher_ctx(tfm);
+ wc_AesXtsFree(ctx->aesXts);
+ free(ctx->aesXts);
+ ctx->aesXts = NULL;
+}
+
+static int km_AesXtsSetKey(struct crypto_skcipher *tfm, const u8 *in_key,
+ unsigned int key_len)
+{
+ int err;
+ struct km_AesXtsCtx * ctx = crypto_skcipher_ctx(tfm);
+
+ err = wc_AesXtsSetKeyNoInit(ctx->aesXts, in_key, key_len,
+ AES_ENCRYPTION_AND_DECRYPTION);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesXtsSetKeyNoInit failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+/* see /usr/src/linux/drivers/md/dm-crypt.c */
+
+static int km_AesXtsEncrypt(struct skcipher_request *req)
+{
+ int err = 0;
+
+ struct crypto_skcipher * tfm = NULL;
+ struct km_AesXtsCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ unsigned int nbytes = 0;
+
+ tfm = crypto_skcipher_reqtfm(req);
+ ctx = crypto_skcipher_ctx(tfm);
+
+ err = skcipher_walk_virt(&walk, req, false);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_virt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ err = wc_AesXtsEncrypt(ctx->aesXts, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes,
+ walk.iv, walk.ivsize);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesXtsEncrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ return err;
+}
+
+static int km_AesXtsDecrypt(struct skcipher_request *req)
+{
+ int err = 0;
+ struct crypto_skcipher * tfm = NULL;
+ struct km_AesXtsCtx * ctx = NULL;
+ struct skcipher_walk walk;
+ unsigned int nbytes = 0;
+
+ tfm = crypto_skcipher_reqtfm(req);
+ ctx = crypto_skcipher_ctx(tfm);
+
+ err = skcipher_walk_virt(&walk, req, false);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_virt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+
+ while ((nbytes = walk.nbytes) != 0) {
+ err = wc_AesXtsDecrypt(ctx->aesXts, walk.dst.virt.addr,
+ walk.src.virt.addr, nbytes,
+ walk.iv, walk.ivsize);
+
+ if (unlikely(err)) {
+ pr_err("%s: wc_AesCbcDecrypt failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return -EINVAL;
+ }
+
+ err = skcipher_walk_done(&walk, walk.nbytes - nbytes);
+
+ if (unlikely(err)) {
+ pr_err("%s: skcipher_walk_done failed: %d\n",
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)), err);
+ return err;
+ }
+ }
+
+ return err;
+}
+
+static struct skcipher_alg xtsAesAlg = {
+ .base.cra_name = WOLFKM_AESXTS_NAME,
+ .base.cra_driver_name = WOLFKM_AESXTS_DRIVER,
+ .base.cra_priority = WOLFSSL_LINUXKM_LKCAPI_PRIORITY,
+ .base.cra_blocksize = AES_BLOCK_SIZE,
+ .base.cra_ctxsize = sizeof(struct km_AesXtsCtx),
+ .base.cra_module = THIS_MODULE,
+
+ .min_keysize = 2 * AES_128_KEY_SIZE,
+ .max_keysize = 2 * AES_256_KEY_SIZE,
+ .ivsize = AES_BLOCK_SIZE,
+ .walksize = 2 * AES_BLOCK_SIZE,
+ .init = km_AesXtsInit,
+ .exit = km_AesXtsExit,
+ .setkey = km_AesXtsSetKey,
+ .encrypt = km_AesXtsEncrypt,
+ .decrypt = km_AesXtsDecrypt
+};
+static int xtsAesAlg_loaded = 0;
+
+#endif /* WOLFSSL_AES_XTS &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESXTS)
+ */
+
+/* cipher tests, cribbed from test.c, with supplementary LKCAPI tests: */
+
+#if defined(HAVE_AES_CBC) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC))
+
+static int linuxkm_test_aescbc(void)
+{
+ int ret = 0;
+ struct crypto_skcipher * tfm = NULL;
+ struct skcipher_request * req = NULL;
+ struct scatterlist src, dst;
+ Aes *aes;
+ int aes_inited = 0;
+ static const byte key32[] =
+ {
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66
+ };
+ static const byte p_vector[] =
+ /* Now is the time for all good men w/o trailing 0 */
+ {
+ 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+ 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+ 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20,
+ 0x67,0x6f,0x6f,0x64,0x20,0x6d,0x65,0x6e
+ };
+ static const byte iv[] = "1234567890abcdef";
+
+ static const byte c_vector[] =
+ {
+ 0xd7,0xd6,0x04,0x5b,0x4d,0xc4,0x90,0xdf,
+ 0x4a,0x82,0xed,0x61,0x26,0x4e,0x23,0xb3,
+ 0xe4,0xb5,0x85,0x30,0x29,0x4c,0x9d,0xcf,
+ 0x73,0xc9,0x46,0xd1,0xaa,0xc8,0xcb,0x62
+ };
+
+ byte iv_copy[sizeof(iv)];
+ byte enc[sizeof(p_vector)];
+ byte dec[sizeof(p_vector)];
+ u8 * enc2 = NULL;
+ u8 * dec2 = NULL;
+
+ aes = (Aes *)malloc(sizeof(*aes));
+ if (aes == NULL)
+ return -ENOMEM;
+
+ XMEMSET(enc, 0, sizeof(enc));
+ XMEMSET(dec, 0, sizeof(enc));
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesInit failed with return code %d.\n", ret);
+ goto test_cbc_end;
+ }
+ aes_inited = 1;
+
+ ret = wc_AesSetKey(aes, key32, AES_BLOCK_SIZE * 2, iv, AES_ENCRYPTION);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesSetKey failed with return code %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ ret = wc_AesCbcEncrypt(aes, enc, p_vector, sizeof(p_vector));
+ if (ret) {
+ pr_err("wolfcrypt wc_AesCbcEncrypt failed with return code %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ if (XMEMCMP(enc, c_vector, sizeof(c_vector)) != 0) {
+ pr_err("wolfcrypt wc_AesCbcEncrypt KAT mismatch\n");
+ return LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ }
+
+ /* Re init for decrypt and set flag. */
+ wc_AesFree(aes);
+ aes_inited = 0;
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesInit failed with return code %d.\n", ret);
+ goto test_cbc_end;
+ }
+ aes_inited = 1;
+
+ ret = wc_AesSetKey(aes, key32, AES_BLOCK_SIZE * 2, iv, AES_DECRYPTION);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesSetKey failed with return code %d.\n", ret);
+ goto test_cbc_end;
+ }
+
+ ret = wc_AesCbcDecrypt(aes, dec, enc, sizeof(p_vector));
+ if (ret) {
+ pr_err("wolfcrypt wc_AesCbcDecrypt failed with return code %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ ret = XMEMCMP(p_vector, dec, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: p_vector and dec do not match: %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ /* now the kernel crypto part */
+ enc2 = malloc(sizeof(p_vector));
+ if (!enc2) {
+ pr_err("error: malloc failed\n");
+ goto test_cbc_end;
+ }
+
+ dec2 = malloc(sizeof(p_vector));
+ if (!dec2) {
+ pr_err("error: malloc failed\n");
+ goto test_cbc_end;
+ }
+
+ memcpy(dec2, p_vector, sizeof(p_vector));
+
+ tfm = crypto_alloc_skcipher(WOLFKM_AESCBC_NAME, 0, 0);
+ if (IS_ERR(tfm)) {
+ pr_err("error: allocating AES skcipher algorithm %s failed: %ld\n",
+ WOLFKM_AESCBC_DRIVER, PTR_ERR(tfm));
+ goto test_cbc_end;
+ }
+
+#ifndef LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
+ {
+ const char *driver_name =
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm));
+ if (strcmp(driver_name, WOLFKM_AESCBC_DRIVER)) {
+ pr_err("error: unexpected implementation for %s: %s (expected %s)\n",
+ WOLFKM_AESCBC_NAME, driver_name, WOLFKM_AESCBC_DRIVER);
+ ret = -ENOENT;
+ goto test_cbc_end;
+ }
+ }
+#endif
+
+ ret = crypto_skcipher_setkey(tfm, key32, AES_BLOCK_SIZE * 2);
+ if (ret) {
+ pr_err("error: crypto_skcipher_setkey returned: %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ req = skcipher_request_alloc(tfm, GFP_KERNEL);
+ if (IS_ERR(req)) {
+ pr_err("error: allocating AES skcipher request %s failed\n",
+ WOLFKM_AESCBC_DRIVER);
+ goto test_cbc_end;
+ }
+
+ sg_init_one(&src, dec2, sizeof(p_vector));
+ sg_init_one(&dst, enc2, sizeof(p_vector));
+
+ XMEMCPY(iv_copy, iv, sizeof(iv));
+ skcipher_request_set_crypt(req, &src, &dst, sizeof(p_vector), iv_copy);
+
+ ret = crypto_skcipher_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_encrypt returned: %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ ret = XMEMCMP(enc, enc2, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: enc and enc2 do not match: %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ memset(dec2, 0, sizeof(p_vector));
+ sg_init_one(&src, enc2, sizeof(p_vector));
+ sg_init_one(&dst, dec2, sizeof(p_vector));
+
+ XMEMCPY(iv_copy, iv, sizeof(iv));
+ skcipher_request_set_crypt(req, &src, &dst, sizeof(p_vector), iv_copy);
+
+ ret = crypto_skcipher_decrypt(req);
+
+ if (ret) {
+ pr_err("ERROR: crypto_skcipher_decrypt returned %d\n", ret);
+ goto test_cbc_end;
+ }
+
+ ret = XMEMCMP(dec, dec2, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: dec and dec2 do not match: %d\n", ret);
+ goto test_cbc_end;
+ }
+
+test_cbc_end:
+
+ if (enc2) { free(enc2); }
+ if (dec2) { free(dec2); }
+ if (req) { skcipher_request_free(req); }
+ if (tfm) { crypto_free_skcipher(tfm); }
+
+ if (aes_inited)
+ wc_AesFree(aes);
+ free(aes);
+
+ return ret;
+}
+
+#endif /* HAVE_AES_CBC &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESCBC)
+ */
+
+#if defined(WOLFSSL_AES_CFB) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB))
+
+static int linuxkm_test_aescfb(void)
+{
+ int ret = 0;
+ struct crypto_skcipher * tfm = NULL;
+ struct skcipher_request * req = NULL;
+ struct scatterlist src, dst;
+ Aes *aes;
+ int aes_inited = 0;
+ static const byte key32[] =
+ {
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66
+ };
+ static const byte p_vector[] =
+ /* Now is the time for all good men w/o trailing 0 */
+ {
+ 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+ 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+ 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20,
+ 0x67,0x6f,0x6f,0x64,0x20,0x6d,0x65,0x6e
+ };
+ static const byte iv[] = "1234567890abcdef";
+ static const byte c_vector[] =
+ {
+ 0x56,0x35,0x3f,0xdd,0xde,0xa6,0x15,0x87,
+ 0x57,0xdc,0x34,0x62,0x9a,0x68,0x96,0x51,
+ 0xc7,0x09,0xb9,0x4e,0x47,0x6b,0x24,0x72,
+ 0x19,0x5a,0xdf,0x7e,0xba,0xa8,0x01,0xb6
+ };
+ byte iv_copy[sizeof(iv)];
+ byte enc[sizeof(p_vector)];
+ byte dec[sizeof(p_vector)];
+ u8 * enc2 = NULL;
+ u8 * dec2 = NULL;
+
+ aes = (Aes *)malloc(sizeof(*aes));
+ if (aes == NULL)
+ return -ENOMEM;
+
+ XMEMSET(enc, 0, sizeof(enc));
+ XMEMSET(dec, 0, sizeof(enc));
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesInit failed with return code %d.\n", ret);
+ goto test_cfb_end;
+ }
+ aes_inited = 1;
+
+ ret = wc_AesSetKey(aes, key32, AES_BLOCK_SIZE * 2, iv, AES_ENCRYPTION);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesSetKey failed with return code %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ ret = wc_AesCfbEncrypt(aes, enc, p_vector, sizeof(p_vector));
+ if (ret) {
+ pr_err("wolfcrypt wc_AesCfbEncrypt failed with return code %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ if (XMEMCMP(enc, c_vector, sizeof(c_vector)) != 0) {
+ pr_err("wolfcrypt wc_AesCfbEncrypt KAT mismatch\n");
+ return LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ }
+
+ /* Re init for decrypt and set flag. */
+ wc_AesFree(aes);
+ aes_inited = 0;
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesInit failed with return code %d.\n", ret);
+ goto test_cfb_end;
+ }
+ aes_inited = 1;
+
+ ret = wc_AesSetKey(aes, key32, AES_BLOCK_SIZE * 2, iv, AES_ENCRYPTION);
+ if (ret) {
+ pr_err("wolfcrypt wc_AesSetKey failed with return code %d.\n", ret);
+ goto test_cfb_end;
+ }
+
+ ret = wc_AesCfbDecrypt(aes, dec, enc, sizeof(p_vector));
+ if (ret) {
+ pr_err("wolfcrypt wc_AesCfbDecrypt failed with return code %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ ret = XMEMCMP(p_vector, dec, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: p_vector and dec do not match: %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ /* now the kernel crypto part */
+ enc2 = malloc(sizeof(p_vector));
+ if (!enc2) {
+ pr_err("error: malloc failed\n");
+ goto test_cfb_end;
+ }
+
+ dec2 = malloc(sizeof(p_vector));
+ if (!dec2) {
+ pr_err("error: malloc failed\n");
+ goto test_cfb_end;
+ }
+
+ memcpy(dec2, p_vector, sizeof(p_vector));
+
+ tfm = crypto_alloc_skcipher(WOLFKM_AESCFB_NAME, 0, 0);
+ if (IS_ERR(tfm)) {
+ pr_err("error: allocating AES skcipher algorithm %s failed: %ld\n",
+ WOLFKM_AESCFB_DRIVER, PTR_ERR(tfm));
+ goto test_cfb_end;
+ }
+
+#ifndef LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
+ {
+ const char *driver_name =
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm));
+ if (strcmp(driver_name, WOLFKM_AESCFB_DRIVER)) {
+ pr_err("error: unexpected implementation for %s: %s (expected %s)\n",
+ WOLFKM_AESCFB_NAME, driver_name, WOLFKM_AESCFB_DRIVER);
+ ret = -ENOENT;
+ goto test_cfb_end;
+ }
+ }
+#endif
+
+ ret = crypto_skcipher_setkey(tfm, key32, AES_BLOCK_SIZE * 2);
+ if (ret) {
+ pr_err("error: crypto_skcipher_setkey returned: %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ req = skcipher_request_alloc(tfm, GFP_KERNEL);
+ if (IS_ERR(req)) {
+ pr_err("error: allocating AES skcipher request %s failed\n",
+ WOLFKM_AESCFB_DRIVER);
+ goto test_cfb_end;
+ }
+
+ sg_init_one(&src, dec2, sizeof(p_vector));
+ sg_init_one(&dst, enc2, sizeof(p_vector));
+
+ XMEMCPY(iv_copy, iv, sizeof(iv));
+ skcipher_request_set_crypt(req, &src, &dst, sizeof(p_vector), iv_copy);
+
+ ret = crypto_skcipher_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_encrypt returned: %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ ret = XMEMCMP(enc, enc2, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: enc and enc2 do not match: %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ memset(dec2, 0, sizeof(p_vector));
+ sg_init_one(&src, enc2, sizeof(p_vector));
+ sg_init_one(&dst, dec2, sizeof(p_vector));
+
+ XMEMCPY(iv_copy, iv, sizeof(iv));
+ skcipher_request_set_crypt(req, &src, &dst, sizeof(p_vector), iv_copy);
+
+ ret = crypto_skcipher_decrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_decrypt returned: %d\n", ret);
+ goto test_cfb_end;
+ }
+
+ ret = XMEMCMP(dec, dec2, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: dec and dec2 do not match: %d\n", ret);
+ goto test_cfb_end;
+ }
+
+test_cfb_end:
+
+ if (enc2) { free(enc2); }
+ if (dec2) { free(dec2); }
+ if (req) { skcipher_request_free(req); }
+ if (tfm) { crypto_free_skcipher(tfm); }
+
+ if (aes_inited)
+ wc_AesFree(aes);
+ free(aes);
+
+ return ret;
+}
+
+#endif /* WOLFSSL_AES_CFB &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESCFB)
+ */
+
+#if defined(HAVE_AESGCM) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESGCM))
+
+static int linuxkm_test_aesgcm(void)
+{
+ int ret = 0;
+ struct crypto_aead * tfm = NULL;
+ struct aead_request * req = NULL;
+ struct scatterlist * src = NULL;
+ struct scatterlist * dst = NULL;
+ Aes *aes;
+ int aes_inited = 0;
+ static const byte key32[] =
+ {
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66
+ };
+ static const byte p_vector[] =
+ /* Now is the time for all w/o trailing 0 */
+ {
+ 0x4e,0x6f,0x77,0x20,0x69,0x73,0x20,0x74,
+ 0x68,0x65,0x20,0x74,0x69,0x6d,0x65,0x20,
+ 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20
+ };
+ static const byte assoc[] =
+ {
+ 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
+ 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef,
+ 0xab, 0xad, 0xda, 0xd2
+ };
+ static const byte ivstr[] = "1234567890abcdef";
+ static const byte c_vector[] =
+ {
+ 0x0c,0x97,0x05,0x3c,0xef,0x5c,0x63,0x6b,
+ 0x15,0xe4,0x00,0x63,0xf8,0x8c,0xd0,0x95,
+ 0x27,0x81,0x90,0x9c,0x9f,0xe6,0x98,0xe9
+ };
+ static const byte KAT_authTag[] =
+ {
+ 0xc9,0xd5,0x7a,0x77,0xac,0x28,0xc2,0xe7,
+ 0xe4,0x28,0x90,0xaa,0x09,0xab,0xf9,0x7c
+ };
+ byte enc[sizeof(p_vector)];
+ byte authTag[AES_BLOCK_SIZE];
+ byte dec[sizeof(p_vector)];
+ u8 * assoc2 = NULL;
+ u8 * enc2 = NULL;
+ u8 * dec2 = NULL;
+ u8 * iv = NULL;
+ size_t encryptLen = sizeof(p_vector);
+ size_t decryptLen = sizeof(p_vector) + sizeof(authTag);
+
+ /* Init stack variables. */
+ XMEMSET(enc, 0, sizeof(p_vector));
+ XMEMSET(dec, 0, sizeof(p_vector));
+ XMEMSET(authTag, 0, AES_BLOCK_SIZE);
+
+ aes = (Aes *)malloc(sizeof(*aes));
+ if (aes == NULL)
+ return -ENOMEM;
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret) {
+ pr_err("error: wc_AesInit failed with return code %d.\n", ret);
+ goto test_gcm_end;
+ }
+ aes_inited = 1;
+
+ ret = wc_AesGcmInit(aes, key32, sizeof(key32)/sizeof(byte), ivstr,
+ AES_BLOCK_SIZE);
+ if (ret) {
+ pr_err("error: wc_AesGcmInit failed with return code %d.\n", ret);
+ goto test_gcm_end;
+ }
+
+ ret = wc_AesGcmEncryptUpdate(aes, NULL, NULL, 0, assoc, sizeof(assoc));
+ if (ret) {
+ pr_err("error: wc_AesGcmEncryptUpdate failed with return code %d\n",
+ ret);
+ goto test_gcm_end;
+ }
+
+ ret = wc_AesGcmEncryptUpdate(aes, enc, p_vector, sizeof(p_vector), NULL, 0);
+ if (ret) {
+ pr_err("error: wc_AesGcmEncryptUpdate failed with return code %d\n",
+ ret);
+ goto test_gcm_end;
+ }
+
+ if (XMEMCMP(enc, c_vector, sizeof(c_vector)) != 0) {
+ pr_err("wolfcrypt AES-GCM KAT mismatch on ciphertext\n");
+ ret = LINUXKM_LKCAPI_AESGCM_KAT_MISMATCH_E;
+ goto test_gcm_end;
+ }
+
+ ret = wc_AesGcmEncryptFinal(aes, authTag, AES_BLOCK_SIZE);
+ if (ret) {
+ pr_err("error: wc_AesGcmEncryptFinal failed with return code %d\n",
+ ret);
+ goto test_gcm_end;
+ }
+
+ if (XMEMCMP(authTag, KAT_authTag, sizeof(KAT_authTag)) != 0) {
+ pr_err("wolfcrypt AES-GCM KAT mismatch on authTag\n");
+ ret = LINUXKM_LKCAPI_AESGCM_KAT_MISMATCH_E;
+ goto test_gcm_end;
+ }
+
+ ret = wc_AesGcmInit(aes, key32, sizeof(key32)/sizeof(byte), ivstr,
+ AES_BLOCK_SIZE);
+ if (ret) {
+ pr_err("error: wc_AesGcmInit failed with return code %d.\n", ret);
+ goto test_gcm_end;
+ }
+
+ ret = wc_AesGcmDecryptUpdate(aes, dec, enc, sizeof(p_vector),
+ assoc, sizeof(assoc));
+ if (ret) {
+ pr_err("error: wc_AesGcmDecryptUpdate failed with return code %d\n",
+ ret);
+ goto test_gcm_end;
+ }
+
+ ret = wc_AesGcmDecryptFinal(aes, authTag, AES_BLOCK_SIZE);
+ if (ret) {
+ pr_err("error: wc_AesGcmEncryptFinal failed with return code %d\n",
+ ret);
+ goto test_gcm_end;
+ }
+
+ ret = XMEMCMP(p_vector, dec, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: gcm: p_vector and dec do not match: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ /* now the kernel crypto part */
+ assoc2 = malloc(sizeof(assoc));
+ if (IS_ERR(assoc2)) {
+ pr_err("error: malloc failed\n");
+ goto test_gcm_end;
+ }
+ memset(assoc2, 0, sizeof(assoc));
+ memcpy(assoc2, assoc, sizeof(assoc));
+
+ iv = malloc(AES_BLOCK_SIZE);
+ if (IS_ERR(iv)) {
+ pr_err("error: malloc failed\n");
+ goto test_gcm_end;
+ }
+ memset(iv, 0, AES_BLOCK_SIZE);
+ memcpy(iv, ivstr, AES_BLOCK_SIZE);
+
+ enc2 = malloc(decryptLen);
+ if (IS_ERR(enc2)) {
+ pr_err("error: malloc failed\n");
+ goto test_gcm_end;
+ }
+
+ dec2 = malloc(decryptLen);
+ if (IS_ERR(dec2)) {
+ pr_err("error: malloc failed\n");
+ goto test_gcm_end;
+ }
+
+ memset(enc2, 0, decryptLen);
+ memset(dec2, 0, decryptLen);
+ memcpy(dec2, p_vector, sizeof(p_vector));
+
+ tfm = crypto_alloc_aead(WOLFKM_AESGCM_NAME, 0, 0);
+ if (IS_ERR(tfm)) {
+ pr_err("error: allocating AES skcipher algorithm %s failed: %ld\n",
+ WOLFKM_AESGCM_DRIVER, PTR_ERR(tfm));
+ goto test_gcm_end;
+ }
+
+#ifndef LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
+ {
+ const char *driver_name = crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm));
+ if (strcmp(driver_name, WOLFKM_AESGCM_DRIVER)) {
+ pr_err("error: unexpected implementation for %s: %s (expected %s)\n",
+ WOLFKM_AESGCM_NAME, driver_name, WOLFKM_AESGCM_DRIVER);
+ ret = -ENOENT;
+ goto test_gcm_end;
+ }
+ }
+#endif
+
+ ret = crypto_aead_setkey(tfm, key32, AES_BLOCK_SIZE * 2);
+ if (ret) {
+ pr_err("error: crypto_aead_setkey returned: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ ret = crypto_aead_setauthsize(tfm, sizeof(authTag));
+ if (ret) {
+ pr_err("error: crypto_aead_setauthsize returned: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ req = aead_request_alloc(tfm, GFP_KERNEL);
+ if (IS_ERR(req)) {
+ pr_err("error: allocating AES aead request %s failed: %ld\n",
+ WOLFKM_AESCBC_DRIVER, PTR_ERR(req));
+ goto test_gcm_end;
+ }
+
+ src = malloc(sizeof(struct scatterlist) * 2);
+ dst = malloc(sizeof(struct scatterlist) * 2);
+
+ if (IS_ERR(src) || IS_ERR(dst)) {
+ pr_err("error: malloc src or dst failed: %ld, %ld\n",
+ PTR_ERR(src), PTR_ERR(dst));
+ goto test_gcm_end;
+ }
+
+ sg_init_table(src, 2);
+ sg_set_buf(src, assoc2, sizeof(assoc));
+ sg_set_buf(&src[1], dec2, sizeof(p_vector));
+
+ sg_init_table(dst, 2);
+ sg_set_buf(dst, assoc2, sizeof(assoc));
+ sg_set_buf(&dst[1], enc2, decryptLen);
+
+ aead_request_set_callback(req, 0, NULL, NULL);
+ aead_request_set_ad(req, sizeof(assoc));
+ aead_request_set_crypt(req, src, dst, sizeof(p_vector), iv);
+
+ ret = crypto_aead_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_aead_encrypt returned: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ ret = XMEMCMP(enc, enc2, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: enc and enc2 do not match: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ ret = XMEMCMP(authTag, enc2 + encryptLen, sizeof(authTag));
+ if (ret) {
+ pr_err("error: authTags do not match: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ /* Now decrypt crypto request. Reverse src and dst. */
+ memset(dec2, 0, decryptLen);
+ aead_request_set_ad(req, sizeof(assoc));
+ aead_request_set_crypt(req, dst, src, decryptLen, iv);
+
+ ret = crypto_aead_decrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_aead_decrypt returned: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+ ret = XMEMCMP(dec, dec2, sizeof(p_vector));
+ if (ret) {
+ pr_err("error: dec and dec2 do not match: %d\n", ret);
+ goto test_gcm_end;
+ }
+
+test_gcm_end:
+ if (req) { aead_request_free(req); req = NULL; }
+ if (tfm) { crypto_free_aead(tfm); tfm = NULL; }
+
+ if (src) { free(src); src = NULL; }
+ if (dst) { free(dst); dst = NULL; }
+
+ if (dec2) { free(dec2); dec2 = NULL; }
+ if (enc2) { free(enc2); enc2 = NULL; }
+
+ if (assoc2) { free(assoc2); assoc2 = NULL; }
+ if (iv) { free(iv); iv = NULL; }
+
+ if (aes_inited)
+ wc_AesFree(aes);
+ free(aes);
+
+ return ret;
+}
+
+#endif /* HAVE_AESGCM &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESGCM) &&
+ */
+
+#if defined(WOLFSSL_AES_XTS) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESXTS))
+
+/* test vectors from
+ * http://csrc.nist.gov/groups/STM/cavp/block-cipher-modes.html
+ */
+#ifdef WOLFSSL_AES_128
+static int aes_xts_128_test(void)
+{
+ XtsAes *aes = NULL;
+ int aes_inited = 0;
+ int ret = 0;
+#define AES_XTS_128_TEST_BUF_SIZ (AES_BLOCK_SIZE * 2 + 8)
+ unsigned char *buf = NULL;
+ unsigned char *cipher = NULL;
+ u8 * enc2 = NULL;
+ u8 * dec2 = NULL;
+ struct scatterlist * src = NULL;
+ struct scatterlist * dst = NULL;
+ struct crypto_skcipher *tfm = NULL;
+ struct skcipher_request *req = NULL;
+ u8 iv[AES_BLOCK_SIZE];
+ byte* large_input = NULL;
+
+ /* 128 key tests */
+ static const unsigned char k1[] = {
+ 0xa1, 0xb9, 0x0c, 0xba, 0x3f, 0x06, 0xac, 0x35,
+ 0x3b, 0x2c, 0x34, 0x38, 0x76, 0x08, 0x17, 0x62,
+ 0x09, 0x09, 0x23, 0x02, 0x6e, 0x91, 0x77, 0x18,
+ 0x15, 0xf2, 0x9d, 0xab, 0x01, 0x93, 0x2f, 0x2f
+ };
+
+ static const unsigned char i1[] = {
+ 0x4f, 0xae, 0xf7, 0x11, 0x7c, 0xda, 0x59, 0xc6,
+ 0x6e, 0x4b, 0x92, 0x01, 0x3e, 0x76, 0x8a, 0xd5
+ };
+
+ static const unsigned char p1[] = {
+ 0xeb, 0xab, 0xce, 0x95, 0xb1, 0x4d, 0x3c, 0x8d,
+ 0x6f, 0xb3, 0x50, 0x39, 0x07, 0x90, 0x31, 0x1c
+ };
+
+ /* plain text test of partial block is not from NIST test vector list */
+ static const unsigned char pp[] = {
+ 0xeb, 0xab, 0xce, 0x95, 0xb1, 0x4d, 0x3c, 0x8d,
+ 0x6f, 0xb3, 0x50, 0x39, 0x07, 0x90, 0x31, 0x1c,
+ 0x6e, 0x4b, 0x92, 0x01, 0x3e, 0x76, 0x8a, 0xd5
+ };
+
+ static const unsigned char c1[] = {
+ 0x77, 0x8a, 0xe8, 0xb4, 0x3c, 0xb9, 0x8d, 0x5a,
+ 0x82, 0x50, 0x81, 0xd5, 0xbe, 0x47, 0x1c, 0x63
+ };
+
+ /* plain text test of partial block is not from NIST test vector list */
+ static const unsigned char cp[] = {
+ 0x2b, 0xf7, 0x2c, 0xf3, 0xeb, 0x85, 0xef, 0x7b,
+ 0x0b, 0x76, 0xa0, 0xaa, 0xf3, 0x3f, 0x25, 0x8b,
+ 0x77, 0x8a, 0xe8, 0xb4, 0x3c, 0xb9, 0x8d, 0x5a
+ };
+
+ static const unsigned char k2[] = {
+ 0x39, 0x25, 0x79, 0x05, 0xdf, 0xcc, 0x77, 0x76,
+ 0x6c, 0x87, 0x0a, 0x80, 0x6a, 0x60, 0xe3, 0xc0,
+ 0x93, 0xd1, 0x2a, 0xcf, 0xcb, 0x51, 0x42, 0xfa,
+ 0x09, 0x69, 0x89, 0x62, 0x5b, 0x60, 0xdb, 0x16
+ };
+
+ static const unsigned char i2[] = {
+ 0x5c, 0xf7, 0x9d, 0xb6, 0xc5, 0xcd, 0x99, 0x1a,
+ 0x1c, 0x78, 0x81, 0x42, 0x24, 0x95, 0x1e, 0x84
+ };
+
+ static const unsigned char p2[] = {
+ 0xbd, 0xc5, 0x46, 0x8f, 0xbc, 0x8d, 0x50, 0xa1,
+ 0x0d, 0x1c, 0x85, 0x7f, 0x79, 0x1c, 0x5c, 0xba,
+ 0xb3, 0x81, 0x0d, 0x0d, 0x73, 0xcf, 0x8f, 0x20,
+ 0x46, 0xb1, 0xd1, 0x9e, 0x7d, 0x5d, 0x8a, 0x56
+ };
+
+ static const unsigned char c2[] = {
+ 0xd6, 0xbe, 0x04, 0x6d, 0x41, 0xf2, 0x3b, 0x5e,
+ 0xd7, 0x0b, 0x6b, 0x3d, 0x5c, 0x8e, 0x66, 0x23,
+ 0x2b, 0xe6, 0xb8, 0x07, 0xd4, 0xdc, 0xc6, 0x0e,
+ 0xff, 0x8d, 0xbc, 0x1d, 0x9f, 0x7f, 0xc8, 0x22
+ };
+
+#ifndef HAVE_FIPS /* FIPS requires different keys for main and tweak. */
+ static const unsigned char k3[] = {
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ };
+ static const unsigned char i3[] = {
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ };
+ static const unsigned char p3[] = {
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
+ };
+ static const unsigned char c3[] = {
+ 0xA2, 0x07, 0x47, 0x76, 0x3F, 0xEC, 0x0C, 0x23,
+ 0x1B, 0xD0, 0xBD, 0x46, 0x9A, 0x27, 0x38, 0x12,
+ 0x95, 0x02, 0x3D, 0x5D, 0xC6, 0x94, 0x51, 0x36,
+ 0xA0, 0x85, 0xD2, 0x69, 0x6E, 0x87, 0x0A, 0xBF,
+ 0xB5, 0x5A, 0xDD, 0xCB, 0x80, 0xE0, 0xFC, 0xCD
+ };
+#endif /* HAVE_FIPS */
+
+ if ((aes = (XtsAes *)XMALLOC(sizeof(*aes), NULL, DYNAMIC_TYPE_AES))
+ == NULL)
+ {
+ ret = MEMORY_E;
+ goto out;
+ }
+
+ if ((buf = (unsigned char *)XMALLOC(AES_XTS_128_TEST_BUF_SIZ, NULL,
+ DYNAMIC_TYPE_AES)) == NULL)
+ {
+ ret = MEMORY_E;
+ goto out;
+ }
+ if ((cipher = (unsigned char *)XMALLOC(AES_XTS_128_TEST_BUF_SIZ, NULL,
+ DYNAMIC_TYPE_AES)) == NULL)
+ {
+ ret = MEMORY_E;
+ goto out;
+ }
+
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsInit(aes, NULL, INVALID_DEVID);
+ if (ret != 0)
+ goto out;
+ else
+ aes_inited = 1;
+
+ ret = wc_AesXtsSetKeyNoInit(aes, k2, sizeof(k2), AES_ENCRYPTION);
+ if (ret != 0)
+ goto out;
+
+ ret = wc_AesXtsEncrypt(aes, buf, p2, sizeof(p2), i2, sizeof(i2));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c2, buf, sizeof(c2))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#if defined(DEBUG_VECTOR_REGISTER_ACCESS) && defined(WC_AES_C_DYNAMIC_FALLBACK)
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(SYSLIB_FAILED_E);
+ ret = wc_AesXtsEncrypt(aes, buf, p2, sizeof(p2), i2, sizeof(i2));
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c2, buf, sizeof(c2))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+#endif
+
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+
+ ret = wc_AesXtsSetKeyNoInit(aes, k1, sizeof(k1), AES_ENCRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsEncrypt(aes, buf, p1, sizeof(p1), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c1, buf, AES_BLOCK_SIZE)) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#if defined(DEBUG_VECTOR_REGISTER_ACCESS) && defined(WC_AES_C_DYNAMIC_FALLBACK)
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(SYSLIB_FAILED_E);
+ ret = wc_AesXtsEncrypt(aes, buf, p1, sizeof(p1), i1, sizeof(i1));
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c1, buf, AES_BLOCK_SIZE)) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+#endif
+
+ /* partial block encryption test */
+ XMEMSET(cipher, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsEncrypt(aes, cipher, pp, sizeof(pp), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(cp, cipher, sizeof(cp))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#if defined(DEBUG_VECTOR_REGISTER_ACCESS) && defined(WC_AES_C_DYNAMIC_FALLBACK)
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(SYSLIB_FAILED_E);
+ XMEMSET(cipher, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsEncrypt(aes, cipher, pp, sizeof(pp), i1, sizeof(i1));
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(cp, cipher, sizeof(cp))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+#endif
+
+ /* partial block decrypt test */
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsSetKeyNoInit(aes, k1, sizeof(k1), AES_DECRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsDecrypt(aes, buf, cipher, sizeof(pp), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(pp, buf, sizeof(pp))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#if defined(DEBUG_VECTOR_REGISTER_ACCESS) && defined(WC_AES_C_DYNAMIC_FALLBACK)
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(SYSLIB_FAILED_E);
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsDecrypt(aes, buf, cipher, sizeof(pp), i1, sizeof(i1));
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(pp, buf, sizeof(pp))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+#endif
+
+ /* NIST decrypt test vector */
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsDecrypt(aes, buf, c1, sizeof(c1), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p1, buf, AES_BLOCK_SIZE)) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#if defined(DEBUG_VECTOR_REGISTER_ACCESS) && defined(WC_AES_C_DYNAMIC_FALLBACK)
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(SYSLIB_FAILED_E);
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsDecrypt(aes, buf, c1, sizeof(c1), i1, sizeof(i1));
+ WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p1, buf, AES_BLOCK_SIZE)) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+#endif
+
+ /* fail case with decrypting using wrong key */
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsDecrypt(aes, buf, c2, sizeof(c2), i2, sizeof(i2));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p2, buf, sizeof(p2)) == 0) { /* fail case with wrong key */
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ /* set correct key and retest */
+ XMEMSET(buf, 0, AES_XTS_128_TEST_BUF_SIZ);
+ ret = wc_AesXtsSetKeyNoInit(aes, k2, sizeof(k2), AES_DECRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsDecrypt(aes, buf, c2, sizeof(c2), i2, sizeof(i2));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p2, buf, sizeof(p2))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#ifndef HAVE_FIPS
+
+ /* Test ciphertext stealing in-place. */
+ XMEMCPY(buf, p3, sizeof(p3));
+ ret = wc_AesXtsSetKeyNoInit(aes, k3, sizeof(k3), AES_ENCRYPTION);
+ if (ret != 0)
+ goto out;
+
+ ret = wc_AesXtsEncrypt(aes, buf, buf, sizeof(p3), i3, sizeof(i3));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c3, buf, sizeof(c3))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ ret = wc_AesXtsSetKeyNoInit(aes, k3, sizeof(k3), AES_DECRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsDecrypt(aes, buf, buf, sizeof(c3), i3, sizeof(i3));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p3, buf, sizeof(p3))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+#endif /* HAVE_FIPS */
+
+ {
+ #define LARGE_XTS_SZ 1024
+ int i;
+ int j;
+
+ large_input = (byte *)XMALLOC(LARGE_XTS_SZ, NULL,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (large_input == NULL) {
+ ret = MEMORY_E;
+ goto out;
+ }
+
+ for (i = 0; i < (int)LARGE_XTS_SZ; i++)
+ large_input[i] = (byte)i;
+
+ for (j = 16; j < (int)LARGE_XTS_SZ; j++) {
+ ret = wc_AesXtsSetKeyNoInit(aes, k1, sizeof(k1), AES_ENCRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsEncrypt(aes, large_input, large_input, j, i1,
+ sizeof(i1));
+ if (ret != 0)
+ goto out;
+
+ ret = wc_AesXtsSetKeyNoInit(aes, k1, sizeof(k1), AES_DECRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsDecrypt(aes, large_input, large_input, j, i1,
+ sizeof(i1));
+ if (ret != 0)
+ goto out;
+ for (i = 0; i < j; i++) {
+ if (large_input[i] != (byte)i) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+ }
+ }
+ }
+
+ /* now the kernel crypto part */
+
+ enc2 = XMALLOC(sizeof(pp), NULL, DYNAMIC_TYPE_AES);
+ if (!enc2) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ dec2 = XMALLOC(sizeof(pp), NULL, DYNAMIC_TYPE_AES);
+ if (!dec2) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ src = XMALLOC(sizeof(*src) * 2, NULL, DYNAMIC_TYPE_AES);
+ if (! src) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ dst = XMALLOC(sizeof(*dst) * 2, NULL, DYNAMIC_TYPE_AES);
+ if (! dst) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ tfm = crypto_alloc_skcipher(WOLFKM_AESXTS_NAME, 0, 0);
+ if (IS_ERR(tfm)) {
+ ret = PTR_ERR(tfm);
+ pr_err("error: allocating AES skcipher algorithm %s failed: %d\n",
+ WOLFKM_AESXTS_DRIVER, ret);
+ goto test_xts_end;
+ }
+
+#ifndef LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
+ {
+ const char *driver_name =
+ crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm));
+ if (strcmp(driver_name, WOLFKM_AESXTS_DRIVER)) {
+ pr_err("error: unexpected implementation for %s: %s (expected %s)\n",
+ WOLFKM_AESXTS_NAME, driver_name, WOLFKM_AESXTS_DRIVER);
+ ret = -ENOENT;
+ goto test_xts_end;
+ }
+ }
+#endif
+
+ ret = crypto_skcipher_ivsize(tfm);
+ if (ret != sizeof(iv)) {
+ pr_err("error: AES skcipher algorithm %s crypto_skcipher_ivsize()"
+ " returned %d but expected %d\n",
+ WOLFKM_AESXTS_DRIVER, ret, (int)sizeof(iv));
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ ret = crypto_skcipher_setkey(tfm, k1, sizeof(k1));
+ if (ret) {
+ pr_err("error: crypto_skcipher_setkey for %s returned: %d\n",
+ WOLFKM_AESXTS_NAME, ret);
+ goto test_xts_end;
+ }
+
+ req = skcipher_request_alloc(tfm, GFP_KERNEL);
+ if (IS_ERR(req)) {
+ ret = PTR_ERR(req);
+ pr_err("error: allocating AES skcipher request %s failed: %d\n",
+ WOLFKM_AESXTS_DRIVER, ret);
+ goto test_xts_end;
+ }
+
+ memcpy(dec2, p1, sizeof(p1));
+ memset(enc2, 0, sizeof(p1));
+
+ sg_init_one(src, dec2, sizeof(p1));
+ sg_init_one(dst, enc2, sizeof(p1));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(p1), iv);
+
+ ret = crypto_skcipher_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_encrypt returned: %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(c1, enc2, sizeof(c1));
+ if (ret) {
+ pr_err("error: c1 and enc2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ memset(dec2, 0, sizeof(p1));
+ sg_init_one(src, enc2, sizeof(p1));
+ sg_init_one(dst, dec2, sizeof(p1));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(p1), iv);
+
+ ret = crypto_skcipher_decrypt(req);
+
+ if (ret) {
+ pr_err("ERROR: crypto_skcipher_decrypt returned %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(p1, dec2, sizeof(p1));
+ if (ret) {
+ pr_err("error: p1 and dec2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ memcpy(dec2, pp, sizeof(pp));
+ memset(enc2, 0, sizeof(pp));
+
+ sg_init_one(src, dec2, sizeof(pp));
+ sg_init_one(dst, enc2, sizeof(pp));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(pp), iv);
+
+ ret = crypto_skcipher_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_encrypt returned: %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(cp, enc2, sizeof(cp));
+ if (ret) {
+ pr_err("error: cp and enc2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ memset(dec2, 0, sizeof(pp));
+ sg_init_one(src, enc2, sizeof(pp));
+ sg_init_one(dst, dec2, sizeof(pp));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(pp), iv);
+
+ ret = crypto_skcipher_decrypt(req);
+
+ if (ret) {
+ pr_err("ERROR: crypto_skcipher_decrypt returned %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(pp, dec2, sizeof(pp));
+ if (ret) {
+ pr_err("error: pp and dec2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ test_xts_end:
+
+ if (enc2)
+ XFREE(enc2, NULL, DYNAMIC_TYPE_AES);
+ if (dec2)
+ XFREE(dec2, NULL, DYNAMIC_TYPE_AES);
+ if (src)
+ XFREE(src, NULL, DYNAMIC_TYPE_AES);
+ if (dst)
+ XFREE(dst, NULL, DYNAMIC_TYPE_AES);
+ if (req)
+ skcipher_request_free(req);
+ if (tfm)
+ crypto_free_skcipher(tfm);
+
+ out:
+
+ if (large_input)
+ XFREE(large_input, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+
+ if (aes_inited)
+ wc_AesXtsFree(aes);
+
+ if (buf)
+ XFREE(buf, NULL, DYNAMIC_TYPE_AES);
+ if (cipher)
+ XFREE(cipher, NULL, DYNAMIC_TYPE_AES);
+
+ if (aes)
+ XFREE(aes, NULL, DYNAMIC_TYPE_AES);
+
+#undef AES_XTS_128_TEST_BUF_SIZ
+
+ return ret;
+}
+#endif /* WOLFSSL_AES_128 */
+
+#ifdef WOLFSSL_AES_256
+static int aes_xts_256_test(void)
+{
+ XtsAes *aes = NULL;
+ int aes_inited = 0;
+ int ret = 0;
+#define AES_XTS_256_TEST_BUF_SIZ (AES_BLOCK_SIZE * 3)
+ unsigned char *buf = NULL;
+ unsigned char *cipher = NULL;
+ u8 * enc2 = NULL;
+ u8 * dec2 = NULL;
+ struct scatterlist * src = NULL;
+ struct scatterlist * dst = NULL;
+ struct crypto_skcipher *tfm = NULL;
+ struct skcipher_request *req = NULL;
+ u8 iv[AES_BLOCK_SIZE];
+
+ /* 256 key tests */
+ static const unsigned char k1[] = {
+ 0x1e, 0xa6, 0x61, 0xc5, 0x8d, 0x94, 0x3a, 0x0e,
+ 0x48, 0x01, 0xe4, 0x2f, 0x4b, 0x09, 0x47, 0x14,
+ 0x9e, 0x7f, 0x9f, 0x8e, 0x3e, 0x68, 0xd0, 0xc7,
+ 0x50, 0x52, 0x10, 0xbd, 0x31, 0x1a, 0x0e, 0x7c,
+ 0xd6, 0xe1, 0x3f, 0xfd, 0xf2, 0x41, 0x8d, 0x8d,
+ 0x19, 0x11, 0xc0, 0x04, 0xcd, 0xa5, 0x8d, 0xa3,
+ 0xd6, 0x19, 0xb7, 0xe2, 0xb9, 0x14, 0x1e, 0x58,
+ 0x31, 0x8e, 0xea, 0x39, 0x2c, 0xf4, 0x1b, 0x08
+ };
+
+ static const unsigned char i1[] = {
+ 0xad, 0xf8, 0xd9, 0x26, 0x27, 0x46, 0x4a, 0xd2,
+ 0xf0, 0x42, 0x8e, 0x84, 0xa9, 0xf8, 0x75, 0x64
+ };
+
+ static const unsigned char p1[] = {
+ 0x2e, 0xed, 0xea, 0x52, 0xcd, 0x82, 0x15, 0xe1,
+ 0xac, 0xc6, 0x47, 0xe8, 0x10, 0xbb, 0xc3, 0x64,
+ 0x2e, 0x87, 0x28, 0x7f, 0x8d, 0x2e, 0x57, 0xe3,
+ 0x6c, 0x0a, 0x24, 0xfb, 0xc1, 0x2a, 0x20, 0x2e
+ };
+
+ static const unsigned char c1[] = {
+ 0xcb, 0xaa, 0xd0, 0xe2, 0xf6, 0xce, 0xa3, 0xf5,
+ 0x0b, 0x37, 0xf9, 0x34, 0xd4, 0x6a, 0x9b, 0x13,
+ 0x0b, 0x9d, 0x54, 0xf0, 0x7e, 0x34, 0xf3, 0x6a,
+ 0xf7, 0x93, 0xe8, 0x6f, 0x73, 0xc6, 0xd7, 0xdb
+ };
+
+ /* plain text test of partial block is not from NIST test vector list */
+ static const unsigned char pp[] = {
+ 0xeb, 0xab, 0xce, 0x95, 0xb1, 0x4d, 0x3c, 0x8d,
+ 0x6f, 0xb3, 0x50, 0x39, 0x07, 0x90, 0x31, 0x1c,
+ 0x6e, 0x4b, 0x92, 0x01, 0x3e, 0x76, 0x8a, 0xd5
+ };
+
+ static const unsigned char cp[] = {
+ 0x65, 0x5e, 0x1d, 0x37, 0x4a, 0x91, 0xe7, 0x6c,
+ 0x4f, 0x83, 0x92, 0xbc, 0x5a, 0x10, 0x55, 0x27,
+ 0x61, 0x0e, 0x5a, 0xde, 0xca, 0xc5, 0x12, 0xd8
+ };
+
+ static const unsigned char k2[] = {
+ 0xad, 0x50, 0x4b, 0x85, 0xd7, 0x51, 0xbf, 0xba,
+ 0x69, 0x13, 0xb4, 0xcc, 0x79, 0xb6, 0x5a, 0x62,
+ 0xf7, 0xf3, 0x9d, 0x36, 0x0f, 0x35, 0xb5, 0xec,
+ 0x4a, 0x7e, 0x95, 0xbd, 0x9b, 0xa5, 0xf2, 0xec,
+ 0xc1, 0xd7, 0x7e, 0xa3, 0xc3, 0x74, 0xbd, 0x4b,
+ 0x13, 0x1b, 0x07, 0x83, 0x87, 0xdd, 0x55, 0x5a,
+ 0xb5, 0xb0, 0xc7, 0xe5, 0x2d, 0xb5, 0x06, 0x12,
+ 0xd2, 0xb5, 0x3a, 0xcb, 0x47, 0x8a, 0x53, 0xb4
+ };
+
+ static const unsigned char i2[] = {
+ 0xe6, 0x42, 0x19, 0xed, 0xe0, 0xe1, 0xc2, 0xa0,
+ 0x0e, 0xf5, 0x58, 0x6a, 0xc4, 0x9b, 0xeb, 0x6f
+ };
+
+ static const unsigned char p2[] = {
+ 0x24, 0xcb, 0x76, 0x22, 0x55, 0xb5, 0xa8, 0x00,
+ 0xf4, 0x6e, 0x80, 0x60, 0x56, 0x9e, 0x05, 0x53,
+ 0xbc, 0xfe, 0x86, 0x55, 0x3b, 0xca, 0xd5, 0x89,
+ 0xc7, 0x54, 0x1a, 0x73, 0xac, 0xc3, 0x9a, 0xbd,
+ 0x53, 0xc4, 0x07, 0x76, 0xd8, 0xe8, 0x22, 0x61,
+ 0x9e, 0xa9, 0xad, 0x77, 0xa0, 0x13, 0x4c, 0xfc
+ };
+
+ static const unsigned char c2[] = {
+ 0xa3, 0xc6, 0xf3, 0xf3, 0x82, 0x79, 0x5b, 0x10,
+ 0x87, 0xd7, 0x02, 0x50, 0xdb, 0x2c, 0xd3, 0xb1,
+ 0xa1, 0x62, 0xa8, 0xb6, 0xdc, 0x12, 0x60, 0x61,
+ 0xc1, 0x0a, 0x84, 0xa5, 0x85, 0x3f, 0x3a, 0x89,
+ 0xe6, 0x6c, 0xdb, 0xb7, 0x9a, 0xb4, 0x28, 0x9b,
+ 0xc3, 0xea, 0xd8, 0x10, 0xe9, 0xc0, 0xaf, 0x92
+ };
+
+ if ((aes = (XtsAes *)XMALLOC(sizeof(*aes), NULL, DYNAMIC_TYPE_AES))
+ == NULL)
+ {
+ ret = MEMORY_E;
+ goto out;
+ }
+
+ if ((buf = (unsigned char *)XMALLOC(AES_XTS_256_TEST_BUF_SIZ, NULL,
+ DYNAMIC_TYPE_AES)) == NULL)
+ {
+ ret = MEMORY_E;
+ goto out;
+ }
+ if ((cipher = (unsigned char *)XMALLOC(AES_XTS_256_TEST_BUF_SIZ, NULL,
+ DYNAMIC_TYPE_AES)) == NULL)
+ {
+ ret = MEMORY_E;
+ goto out;
+ }
+
+ ret = wc_AesXtsInit(aes, NULL, INVALID_DEVID);
+ if (ret != 0)
+ goto out;
+ else
+ aes_inited = 1;
+
+ XMEMSET(buf, 0, AES_XTS_256_TEST_BUF_SIZ);
+ ret = wc_AesXtsSetKeyNoInit(aes, k2, sizeof(k2), AES_ENCRYPTION);
+ if (ret != 0)
+ goto out;
+
+ ret = wc_AesXtsEncrypt(aes, buf, p2, sizeof(p2), i2, sizeof(i2));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c2, buf, sizeof(c2))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ XMEMSET(buf, 0, AES_XTS_256_TEST_BUF_SIZ);
+ ret = wc_AesXtsSetKeyNoInit(aes, k1, sizeof(k1), AES_ENCRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsEncrypt(aes, buf, p1, sizeof(p1), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(c1, buf, AES_BLOCK_SIZE)) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ /* partial block encryption test */
+ XMEMSET(cipher, 0, AES_XTS_256_TEST_BUF_SIZ);
+ ret = wc_AesXtsEncrypt(aes, cipher, pp, sizeof(pp), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+
+ /* partial block decrypt test */
+ XMEMSET(buf, 0, AES_XTS_256_TEST_BUF_SIZ);
+ ret = wc_AesXtsSetKeyNoInit(aes, k1, sizeof(k1), AES_DECRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsDecrypt(aes, buf, cipher, sizeof(pp), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(pp, buf, sizeof(pp))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ /* NIST decrypt test vector */
+ XMEMSET(buf, 0, AES_XTS_256_TEST_BUF_SIZ);
+ ret = wc_AesXtsDecrypt(aes, buf, c1, sizeof(c1), i1, sizeof(i1));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p1, buf, AES_BLOCK_SIZE)) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ XMEMSET(buf, 0, AES_XTS_256_TEST_BUF_SIZ);
+ ret = wc_AesXtsSetKeyNoInit(aes, k2, sizeof(k2), AES_DECRYPTION);
+ if (ret != 0)
+ goto out;
+ ret = wc_AesXtsDecrypt(aes, buf, c2, sizeof(c2), i2, sizeof(i2));
+ if (ret != 0)
+ goto out;
+ if (XMEMCMP(p2, buf, sizeof(p2))) {
+ ret = LINUXKM_LKCAPI_AES_KAT_MISMATCH_E;
+ goto out;
+ }
+
+ /* now the kernel crypto part */
+
+ enc2 = XMALLOC(sizeof(p1), NULL, DYNAMIC_TYPE_AES);
+ if (!enc2) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ dec2 = XMALLOC(sizeof(p1), NULL, DYNAMIC_TYPE_AES);
+ if (!dec2) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ src = XMALLOC(sizeof(*src) * 2, NULL, DYNAMIC_TYPE_AES);
+ if (! src) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ dst = XMALLOC(sizeof(*dst) * 2, NULL, DYNAMIC_TYPE_AES);
+ if (! dst) {
+ pr_err("error: malloc failed\n");
+ ret = -ENOMEM;
+ goto test_xts_end;
+ }
+
+ tfm = crypto_alloc_skcipher(WOLFKM_AESXTS_NAME, 0, 0);
+ if (IS_ERR(tfm)) {
+ ret = PTR_ERR(tfm);
+ pr_err("error: allocating AES skcipher algorithm %s failed: %d\n",
+ WOLFKM_AESXTS_DRIVER, ret);
+ goto test_xts_end;
+ }
+
+#ifndef LINUXKM_LKCAPI_PRIORITY_ALLOW_MASKING
+ {
+ const char *driver_name = crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm));
+ if (strcmp(driver_name, WOLFKM_AESXTS_DRIVER)) {
+ pr_err("error: unexpected implementation for %s: %s (expected %s)\n",
+ WOLFKM_AESXTS_NAME, driver_name, WOLFKM_AESXTS_DRIVER);
+ ret = -ENOENT;
+ goto test_xts_end;
+ }
+ }
+#endif
+
+ ret = crypto_skcipher_ivsize(tfm);
+ if (ret != sizeof(iv)) {
+ pr_err("error: AES skcipher algorithm %s crypto_skcipher_ivsize()"
+ " returned %d but expected %d\n",
+ WOLFKM_AESXTS_DRIVER, ret, (int)sizeof(iv));
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ ret = crypto_skcipher_setkey(tfm, k1, sizeof(k1));
+ if (ret) {
+ pr_err("error: crypto_skcipher_setkey for %s returned: %d\n",
+ WOLFKM_AESXTS_NAME, ret);
+ goto test_xts_end;
+ }
+
+ req = skcipher_request_alloc(tfm, GFP_KERNEL);
+ if (IS_ERR(req)) {
+ ret = PTR_ERR(req);
+ pr_err("error: allocating AES skcipher request %s failed: %d\n",
+ WOLFKM_AESXTS_DRIVER, ret);
+ goto test_xts_end;
+ }
+
+ memcpy(dec2, p1, sizeof(p1));
+ memset(enc2, 0, sizeof(p1));
+
+ sg_init_one(src, dec2, sizeof(p1));
+ sg_init_one(dst, enc2, sizeof(p1));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(p1), iv);
+
+ ret = crypto_skcipher_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_encrypt returned: %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(c1, enc2, sizeof(c1));
+ if (ret) {
+ pr_err("error: c1 and enc2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ memset(dec2, 0, sizeof(p1));
+ sg_init_one(src, enc2, sizeof(p1));
+ sg_init_one(dst, dec2, sizeof(p1));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(p1), iv);
+
+ ret = crypto_skcipher_decrypt(req);
+
+ if (ret) {
+ pr_err("ERROR: crypto_skcipher_decrypt returned %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(p1, dec2, sizeof(p1));
+ if (ret) {
+ pr_err("error: p1 and dec2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ memcpy(dec2, pp, sizeof(pp));
+ memset(enc2, 0, sizeof(pp));
+
+ sg_init_one(src, dec2, sizeof(pp));
+ sg_init_one(dst, enc2, sizeof(pp));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(pp), iv);
+
+ ret = crypto_skcipher_encrypt(req);
+
+ if (ret) {
+ pr_err("error: crypto_skcipher_encrypt returned: %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(cp, enc2, sizeof(cp));
+ if (ret) {
+ pr_err("error: cp and enc2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ memset(dec2, 0, sizeof(pp));
+ sg_init_one(src, enc2, sizeof(pp));
+ sg_init_one(dst, dec2, sizeof(pp));
+
+ memcpy(iv, i1, sizeof(iv));
+ skcipher_request_set_crypt(req, src, dst, sizeof(pp), iv);
+
+ ret = crypto_skcipher_decrypt(req);
+
+ if (ret) {
+ pr_err("ERROR: crypto_skcipher_decrypt returned %d\n", ret);
+ goto test_xts_end;
+ }
+
+ ret = XMEMCMP(pp, dec2, sizeof(pp));
+ if (ret) {
+ pr_err("error: pp and dec2 do not match: %d\n", ret);
+ ret = -EINVAL;
+ goto test_xts_end;
+ }
+
+ test_xts_end:
+
+ if (enc2)
+ XFREE(enc2, NULL, DYNAMIC_TYPE_AES);
+ if (dec2)
+ XFREE(dec2, NULL, DYNAMIC_TYPE_AES);
+ if (src)
+ XFREE(src, NULL, DYNAMIC_TYPE_AES);
+ if (dst)
+ XFREE(dst, NULL, DYNAMIC_TYPE_AES);
+ if (req)
+ skcipher_request_free(req);
+ if (tfm)
+ crypto_free_skcipher(tfm);
+
+ out:
+
+ if (aes_inited)
+ wc_AesXtsFree(aes);
+
+ if (buf)
+ XFREE(buf, NULL, DYNAMIC_TYPE_AES);
+ if (cipher)
+ XFREE(cipher, NULL, DYNAMIC_TYPE_AES);
+
+ if (aes)
+ XFREE(aes, NULL, DYNAMIC_TYPE_AES);
+
+#undef AES_XTS_256_TEST_BUF_SIZ
+
+ return ret;
+}
+#endif /* WOLFSSL_AES_256 */
+
+static int linuxkm_test_aesxts(void) {
+ int ret;
+
+ #ifdef WOLFSSL_AES_128
+ ret = aes_xts_128_test();
+ if (ret != 0) {
+ pr_err("aes_xts_128_test() failed with retval %d.\n", ret);
+ goto out;
+ }
+ #endif
+ #ifdef WOLFSSL_AES_256
+ ret = aes_xts_256_test();
+ if (ret != 0) {
+ pr_err("aes_xts_256_test() failed with retval %d.\n", ret);
+ goto out;
+ }
+ #endif
+
+out:
+
+ return ret;
+}
+
+#endif /* WOLFSSL_AES_XTS &&
+ * (LINUXKM_LKCAPI_REGISTER_ALL || LINUXKM_LKCAPI_REGISTER_AESXTS)
+ */
+
+#endif /* !NO_AES */
+
+static int linuxkm_lkcapi_register(void)
+{
+ int ret = 0;
+
+#define REGISTER_ALG(alg, installer, tester) do { \
+ if (alg ## _loaded) { \
+ pr_err("ERROR: %s is already registered.\n", \
+ (alg).base.cra_driver_name); \
+ return -EEXIST; \
+ } \
+ \
+ ret = (installer)(&(alg)); \
+ \
+ if (ret) { \
+ pr_err("ERROR: " #installer " for %s failed " \
+ "with return code %d.\n", \
+ (alg).base.cra_driver_name, ret); \
+ return ret; \
+ } \
+ \
+ alg ## _loaded = 1; \
+ \
+ ret = (tester()); \
+ \
+ if (ret) { \
+ pr_err("ERROR: self-test for %s failed " \
+ "with return code %d.\n", \
+ (alg).base.cra_driver_name, ret); \
+ return ret; \
+ } \
+ pr_info("%s self-test OK -- " \
+ "registered for %s with priority %d.\n", \
+ (alg).base.cra_driver_name, \
+ (alg).base.cra_name, \
+ (alg).base.cra_priority); \
+ } while (0)
+
+#if defined(HAVE_AES_CBC) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC))
+
+ REGISTER_ALG(cbcAesAlg, crypto_register_skcipher, linuxkm_test_aescbc);
+#endif
+
+#if defined(WOLFSSL_AES_CFB) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB))
+
+ REGISTER_ALG(cfbAesAlg, crypto_register_skcipher, linuxkm_test_aescfb);
+#endif
+
+#if defined(HAVE_AESGCM) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESGCM))
+
+ REGISTER_ALG(gcmAesAead, crypto_register_aead, linuxkm_test_aesgcm);
+#endif
+
+#if defined(WOLFSSL_AES_XTS) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESXTS))
+
+ REGISTER_ALG(xtsAesAlg, crypto_register_skcipher, linuxkm_test_aesxts);
+#endif
+
+#undef REGISTER_ALG
+
+ return 0;
+}
+
+static void linuxkm_lkcapi_unregister(void)
+{
+#define UNREGISTER_ALG(alg, uninstaller) do { \
+ if (alg ## _loaded) { \
+ (uninstaller)(&(alg)); \
+ alg ## _loaded = 0; \
+ } \
+ } while (0)
+
+#if defined(HAVE_AES_CBC) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCBC))
+
+ UNREGISTER_ALG(cbcAesAlg, crypto_unregister_skcipher);
+#endif
+#if defined(WOLFSSL_AES_CFB) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESCFB))
+
+ UNREGISTER_ALG(cfbAesAlg, crypto_unregister_skcipher);
+#endif
+#if defined(HAVE_AESGCM) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESGCM))
+
+ UNREGISTER_ALG(gcmAesAead, crypto_unregister_aead);
+#endif
+#if defined(WOLFSSL_AES_XTS) && \
+ (defined(LINUXKM_LKCAPI_REGISTER_ALL) || \
+ defined(LINUXKM_LKCAPI_REGISTER_AESXTS))
+
+ UNREGISTER_ALG(xtsAesAlg, crypto_unregister_skcipher);
+#endif
+
+#undef UNREGISTER_ALG
+}
diff --git a/extra/wolfssl/wolfssl/linuxkm/module_hooks.c b/extra/wolfssl/wolfssl/linuxkm/module_hooks.c
index 5b513374..6030480e 100644
--- a/extra/wolfssl/wolfssl/linuxkm/module_hooks.c
+++ b/extra/wolfssl/wolfssl/linuxkm/module_hooks.c
@@ -20,8 +20,12 @@
*/
#ifndef WOLFSSL_LICENSE
+#ifdef WOLFSSL_COMMERCIAL_LICENSE
+#define WOLFSSL_LICENSE "wolfSSL Commercial"
+#else
#define WOLFSSL_LICENSE "GPL v2"
#endif
+#endif
#define FIPS_NO_WRAPPERS
@@ -43,7 +47,6 @@
#endif
#ifndef NO_CRYPT_TEST
#include <wolfcrypt/test/test.h>
- #include <linux/delay.h>
#endif
static int libwolfssl_cleanup(void) {
@@ -67,6 +70,8 @@ static int libwolfssl_cleanup(void) {
#ifdef HAVE_LINUXKM_PIE_SUPPORT
+#ifdef DEBUG_LINUXKM_PIE_SUPPORT
+
extern int wolfCrypt_PIE_first_function(void);
extern int wolfCrypt_PIE_last_function(void);
extern const unsigned int wolfCrypt_PIE_rodata_start[];
@@ -86,6 +91,8 @@ static unsigned int hash_span(char *start, char *end) {
return sum;
}
+#endif /* DEBUG_LINUXKM_PIE_SUPPORT */
+
#ifdef USE_WOLFSSL_LINUXKM_PIE_REDIRECT_TABLE
extern struct wolfssl_linuxkm_pie_redirect_table wolfssl_linuxkm_pie_redirect_table;
static int set_up_wolfssl_linuxkm_pie_redirect_table(void);
@@ -114,14 +121,13 @@ static int updateFipsHash(void);
#endif
#ifdef WOLFSSL_LINUXKM_BENCHMARKS
-#undef HAVE_PTHREAD
-#define STRING_USER
-#define NO_MAIN_FUNCTION
-#define current_time benchmark_current_time
-#define WOLFSSL_NO_FLOAT_FMT
-#include "wolfcrypt/benchmark/benchmark.c"
+extern int wolfcrypt_benchmark_main(int argc, char** argv);
#endif /* WOLFSSL_LINUXKM_BENCHMARKS */
+#ifdef LINUXKM_LKCAPI_REGISTER
+ #include "linuxkm/lkcapi_glue.c"
+#endif
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
static int __init wolfssl_init(void)
#else
@@ -148,7 +154,7 @@ static int wolfssl_init(void)
return ret;
#endif
-#ifdef HAVE_LINUXKM_PIE_SUPPORT
+#if defined(HAVE_LINUXKM_PIE_SUPPORT) && defined(DEBUG_LINUXKM_PIE_SUPPORT)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
/* see linux commit ac3b432839 */
@@ -215,7 +221,7 @@ static int wolfssl_init(void)
text_hash, pie_text_end-pie_text_start,
rodata_hash, pie_rodata_end-pie_rodata_start);
}
-#endif /* HAVE_LINUXKM_PIE_SUPPORT */
+#endif /* HAVE_LINUXKM_PIE_SUPPORT && DEBUG_LINUXKM_PIE_SUPPORT */
#ifdef HAVE_FIPS
ret = wolfCrypt_SetCb_fips(lkmFipsCb);
@@ -235,19 +241,32 @@ static int wolfssl_init(void)
return -ECANCELED;
}
- pr_info("wolfCrypt FIPS ["
-
-#if defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION == 3)
- "ready"
-#elif defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION == 2) \
- && defined(WOLFCRYPT_FIPS_RAND)
- "140-2 rand"
-#elif defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION == 2)
- "140-2"
+ pr_info("FIPS 140-3 wolfCrypt-fips v%d.%d.%d%s%s startup "
+ "self-test succeeded.\n",
+#ifdef HAVE_FIPS_VERSION_MAJOR
+ HAVE_FIPS_VERSION_MAJOR,
+#else
+ HAVE_FIPS_VERSION,
+#endif
+#ifdef HAVE_FIPS_VERSION_MINOR
+ HAVE_FIPS_VERSION_MINOR,
+#else
+ 0,
+#endif
+#ifdef HAVE_FIPS_VERSION_PATCH
+ HAVE_FIPS_VERSION_PATCH,
+#else
+ 0,
+#endif
+#ifdef HAVE_FIPS_VERSION_PORT
+ "-",
+ HAVE_FIPS_VERSION_PORT
#else
- "140"
+ "",
+ ""
#endif
- "] POST succeeded.\n");
+ );
+
#endif /* HAVE_FIPS */
#ifdef WC_RNG_SEED_CB
@@ -283,6 +302,21 @@ static int wolfssl_init(void)
return -ECANCELED;
}
pr_info("wolfCrypt self-test passed.\n");
+#else
+ pr_info("skipping full wolfcrypt_test() "
+ "(configure with --enable-crypttests to enable).\n");
+#endif
+
+#ifdef LINUXKM_LKCAPI_REGISTER
+ ret = linuxkm_lkcapi_register();
+
+ if (ret) {
+ pr_err("linuxkm_lkcapi_register() failed with return code %d.\n", ret);
+ linuxkm_lkcapi_unregister();
+ (void)libwolfssl_cleanup();
+ msleep(10);
+ return -ECANCELED;
+ }
#endif
#ifdef WOLFSSL_LINUXKM_BENCHMARKS
@@ -322,6 +356,10 @@ static void __exit wolfssl_exit(void)
static void wolfssl_exit(void)
#endif
{
+#ifdef LINUXKM_LKCAPI_REGISTER
+ linuxkm_lkcapi_unregister();
+#endif
+
(void)libwolfssl_cleanup();
return;
@@ -346,6 +384,22 @@ static int my_preempt_count(void) {
return preempt_count();
}
+#if defined(WOLFSSL_LINUXKM_SIMD_X86) && defined(WOLFSSL_COMMERCIAL_LICENSE)
+
+/* ditto for fpregs_lock/fpregs_unlock */
+#ifdef WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS
+static void my_fpregs_lock(void) {
+ fpregs_lock();
+}
+
+static void my_fpregs_unlock(void) {
+ fpregs_unlock();
+}
+
+#endif /* WOLFSSL_LINUXKM_SIMD_X86 && WOLFSSL_COMMERCIAL_LICENSE */
+
+#endif /* USE_WOLFSSL_LINUXKM_PIE_REDIRECT_TABLE */
+
static int set_up_wolfssl_linuxkm_pie_redirect_table(void) {
memset(
&wolfssl_linuxkm_pie_redirect_table,
@@ -355,6 +409,7 @@ static int set_up_wolfssl_linuxkm_pie_redirect_table(void) {
#ifndef __ARCH_MEMCMP_NO_REDIRECT
wolfssl_linuxkm_pie_redirect_table.memcmp = memcmp;
#endif
+#ifndef CONFIG_FORTIFY_SOURCE
#ifndef __ARCH_MEMCPY_NO_REDIRECT
wolfssl_linuxkm_pie_redirect_table.memcpy = memcpy;
#endif
@@ -364,6 +419,7 @@ static int set_up_wolfssl_linuxkm_pie_redirect_table(void) {
#ifndef __ARCH_MEMMOVE_NO_REDIRECT
wolfssl_linuxkm_pie_redirect_table.memmove = memmove;
#endif
+#endif /* !CONFIG_FORTIFY_SOURCE */
#ifndef __ARCH_STRCMP_NO_REDIRECT
wolfssl_linuxkm_pie_redirect_table.strcmp = strcmp;
#endif
@@ -395,6 +451,11 @@ static int set_up_wolfssl_linuxkm_pie_redirect_table(void) {
#else
wolfssl_linuxkm_pie_redirect_table.printk = printk;
#endif
+
+#ifdef CONFIG_FORTIFY_SOURCE
+ wolfssl_linuxkm_pie_redirect_table.__warn_printk = __warn_printk;
+#endif
+
wolfssl_linuxkm_pie_redirect_table.snprintf = snprintf;
wolfssl_linuxkm_pie_redirect_table._ctype = _ctype;
@@ -442,21 +503,28 @@ static int set_up_wolfssl_linuxkm_pie_redirect_table(void) {
#endif
wolfssl_linuxkm_pie_redirect_table.nr_cpu_ids = &nr_cpu_ids;
- #if defined(CONFIG_SMP) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
+ #if defined(CONFIG_SMP) && \
+ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) && \
+ !defined(WOLFSSL_COMMERCIAL_LICENSE)
wolfssl_linuxkm_pie_redirect_table.migrate_disable = &migrate_disable;
wolfssl_linuxkm_pie_redirect_table.migrate_enable = &migrate_enable;
#endif
#ifdef WOLFSSL_LINUXKM_SIMD_X86
wolfssl_linuxkm_pie_redirect_table.irq_fpu_usable = irq_fpu_usable;
- #ifdef kernel_fpu_begin
- wolfssl_linuxkm_pie_redirect_table.kernel_fpu_begin_mask =
- kernel_fpu_begin_mask;
- #else
- wolfssl_linuxkm_pie_redirect_table.kernel_fpu_begin =
- kernel_fpu_begin;
- #endif
- wolfssl_linuxkm_pie_redirect_table.kernel_fpu_end = kernel_fpu_end;
+ #ifdef WOLFSSL_COMMERCIAL_LICENSE
+ wolfssl_linuxkm_pie_redirect_table.fpregs_lock = my_fpregs_lock;
+ wolfssl_linuxkm_pie_redirect_table.fpregs_unlock = my_fpregs_unlock;
+ #else /* !defined(WOLFSSL_COMMERCIAL_LICENSE) */
+ #ifdef kernel_fpu_begin
+ wolfssl_linuxkm_pie_redirect_table.kernel_fpu_begin_mask =
+ kernel_fpu_begin_mask;
+ #else
+ wolfssl_linuxkm_pie_redirect_table.kernel_fpu_begin =
+ kernel_fpu_begin;
+ #endif
+ wolfssl_linuxkm_pie_redirect_table.kernel_fpu_end = kernel_fpu_end;
+ #endif /* !defined(WOLFSSL_COMMERCIAL_LICENSE) */
#endif /* WOLFSSL_LINUXKM_SIMD_X86 */
#endif /* WOLFSSL_LINUXKM_USE_SAVE_VECTOR_REGISTERS */
@@ -489,11 +557,15 @@ static int set_up_wolfssl_linuxkm_pie_redirect_table(void) {
/* runtime assert that the table has no null slots after initialization. */
{
unsigned long *i;
+ static_assert(sizeof(unsigned long) == sizeof(void *),
+ "unexpected pointer size");
for (i = (unsigned long *)&wolfssl_linuxkm_pie_redirect_table;
i < (unsigned long *)&wolfssl_linuxkm_pie_redirect_table._last_slot;
++i)
if (*i == 0) {
- pr_err("wolfCrypt container redirect table initialization was incomplete.\n");
+ pr_err("wolfCrypt container redirect table initialization was "
+ "incomplete [%lu].\n",
+ i-(unsigned long *)&wolfssl_linuxkm_pie_redirect_table);
return -EFAULT;
}
}
@@ -684,11 +756,19 @@ static int updateFipsHash(void)
}
}
- if (XMEMCMP(hash, binVerify, WC_SHA256_DIGEST_SIZE) == 0)
+ if (XMEMCMP(hash, binVerify, WC_SHA256_DIGEST_SIZE) == 0) {
+#if defined(DEBUG_LINUXKM_PIE_SUPPORT) || defined(WOLFSSL_LINUXKM_VERBOSE_DEBUG)
+ pr_info("updateFipsHash: verifyCore already matches [%s]\n", verifyCore);
+#else
pr_info("updateFipsHash: verifyCore already matches.\n");
- else {
+#endif
+ } else {
XMEMCPY(verifyCore, base16_hash, WC_SHA256_DIGEST_SIZE*2 + 1);
+#if defined(DEBUG_LINUXKM_PIE_SUPPORT) || defined(WOLFSSL_LINUXKM_VERBOSE_DEBUG)
+ pr_info("updateFipsHash: verifyCore updated [%s].\n", base16_hash);
+#else
pr_info("updateFipsHash: verifyCore updated.\n");
+#endif
}
ret = 0;
diff --git a/extra/wolfssl/wolfssl/pre-commit.sh b/extra/wolfssl/wolfssl/pre-commit.sh
deleted file mode 100755
index a426d0d3..00000000
--- a/extra/wolfssl/wolfssl/pre-commit.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-#
-#
-# Our "pre-commit" hook.
-
-# save current config
-echo "\n\nSaving current config\n\n"
-cp config.status tmp.status
-cp wolfssl/options.h tmp.options.h
-
-# stash modified files, if any, that are not part of this commit, don't test
-# them
-STASHED=0
-if ! git diff --quiet
-then
- STASHED=1
- echo "\n\nStashing modified files not part of commit\n\n"
- git stash -q --keep-index
-fi
-
-# do the commit tests
-echo "\n\nRunning commit tests...\n\n"
-./commit-tests.sh
-RESULT=$?
-
-# restore modified files not part of this commit
-if test $STASHED -eq 1
-then
- echo "\n\nPopping stashed modified files not part of commit\n"
- git stash pop -q
-fi
-
-# restore current config
-echo "\nRestoring current config\n"
-mv tmp.status config.status
-# don't show output in case error from above
-./config.status >/dev/null 2>&1
-mv tmp.options.h wolfssl/options.h
-make clean >/dev/null 2>&1
-make -j 8 >/dev/null 2>&1
-
-[ $RESULT -ne 0 ] && echo "\nOops, your commit failed\n" && exit 1
-
-echo "\nCommit tests passed!\n"
-exit 0
diff --git a/extra/wolfssl/wolfssl/pre-push.sh b/extra/wolfssl/wolfssl/pre-push.sh
deleted file mode 100755
index 2251bd33..00000000
--- a/extra/wolfssl/wolfssl/pre-push.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-#
-#
-# Our "pre-push" hook.
-
-RESULT=0
-
-if [ -d ./fips ];
-then
- echo "\n\nTesting with FIPS release code...\n\n"
- ./fips-check.sh
- RESULT=$?
- [ $RESULT -ne 0 ] && echo -e "\n\nFIPS build test failed" && exit 1
-fi
-
-[ $RESULT -ne 0 ] && echo "\nOops, your push failed\n" && exit 1
-
-echo "\nPush tests passed!\n"
-exit 0
diff --git a/extra/wolfssl/wolfssl/rpm/spec.in b/extra/wolfssl/wolfssl/rpm/spec.in
index b99f3bed..dae98a77 100644
--- a/extra/wolfssl/wolfssl/rpm/spec.in
+++ b/extra/wolfssl/wolfssl/rpm/spec.in
@@ -49,7 +49,6 @@ fi
%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
-mkdir -p $RPM_BUILD_ROOT/
%{__rm} -f %{buildroot}/%{_libdir}/libwolfssl@LIBSUFFIX@.la
%{__rm} -f %{buildroot}/%{_libdir}/libwolfssl.a
diff --git a/extra/wolfssl/wolfssl/scripts/makedistsmall.sh b/extra/wolfssl/wolfssl/scripts/makedistsmall.sh
index 9c38e568..0b92e1ce 100755
--- a/extra/wolfssl/wolfssl/scripts/makedistsmall.sh
+++ b/extra/wolfssl/wolfssl/scripts/makedistsmall.sh
@@ -62,7 +62,6 @@ rm -rf ./swig
rm -rf ./tests
rm -rf ./testsuite
rm -rf ./tirtos
-rm -rf ./wolfcrypt/user-crypto
rm -rf ./wrapper
rm -f -- *.rc *.supp *.ac *.am *.conf *.sh *.cproject *.project *.pl
rm -f Vagrantfile SCRIPTS-LIST quit input resource.h
diff --git a/extra/wolfssl/wolfssl/scripts/openssl.test b/extra/wolfssl/wolfssl/scripts/openssl.test
index 9bd98e5f..7cbe3833 100755
--- a/extra/wolfssl/wolfssl/scripts/openssl.test
+++ b/extra/wolfssl/wolfssl/scripts/openssl.test
@@ -1143,7 +1143,7 @@ do
do_wolfssl_client
psk=""
adh=""
- openssl_psk="-psk 0123456789abcdef0123456789abcdef"
+ openssl_psk="-psk 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
open_temp_cases_total=$((open_temp_cases_total + 1))
port=$wolfssl_port
do_openssl_client
diff --git a/extra/wolfssl/wolfssl/src/bio.c b/extra/wolfssl/wolfssl/src/bio.c
index 85de16dd..2dab43e6 100644
--- a/extra/wolfssl/wolfssl/src/bio.c
+++ b/extra/wolfssl/wolfssl/src/bio.c
@@ -70,16 +70,31 @@ static int wolfSSL_BIO_BASE64_read(WOLFSSL_BIO* bio, void* buf, int len)
*/
static int wolfSSL_BIO_BIO_read(WOLFSSL_BIO* bio, void* buf, int len)
{
- int sz;
+ int sz1;
+ int sz2;
char* pt;
- sz = wolfSSL_BIO_nread(bio, &pt, len);
+ if (buf == NULL || len == 0)
+ return 0;
- if (sz > 0) {
- XMEMCPY(buf, pt, sz);
+ sz1 = wolfSSL_BIO_nread(bio, &pt, len);
+ if (sz1 > 0) {
+ XMEMCPY(buf, pt, sz1);
+ buf = (char*)buf + sz1;
+ len -= sz1;
+ if (len > 0) {
+ /* try again to see if maybe we wrapped around the ring buffer */
+ sz2 = wolfSSL_BIO_nread(bio, &pt, len);
+ if (sz2 > 0) {
+ XMEMCPY(buf, pt, sz2);
+ sz1 += sz2;
+ }
+ }
}
+ if (sz1 == 0)
+ sz1 = -1;
- return sz;
+ return sz1;
}
#ifndef WOLFSSL_BIO_RESIZE_THRESHOLD
@@ -470,7 +485,6 @@ static int wolfSSL_BIO_SSL_write(WOLFSSL_BIO* bio, const void* data,
}
#endif /* WOLFCRYPT_ONLY */
-
/* Writes to a WOLFSSL_BIO_BIO type.
*
* returns the amount written on success
@@ -478,27 +492,40 @@ static int wolfSSL_BIO_SSL_write(WOLFSSL_BIO* bio, const void* data,
static int wolfSSL_BIO_BIO_write(WOLFSSL_BIO* bio, const void* data,
int len)
{
- int sz;
+ int sz1;
+ int sz2;
char* buf;
WOLFSSL_ENTER("wolfSSL_BIO_BIO_write");
/* adding in sanity checks for static analysis tools */
- if (bio == NULL || data == NULL) {
- return BAD_FUNC_ARG;
- }
-
- sz = wolfSSL_BIO_nwrite(bio, &buf, len);
+ if (bio == NULL || data == NULL || len == 0)
+ return 0;
- /* test space for write */
- if (sz <= 0) {
+ sz1 = wolfSSL_BIO_nwrite(bio, &buf, len);
+ if (sz1 == 0) {
WOLFSSL_MSG("No room left to write");
- return sz;
+ return WOLFSSL_BIO_ERROR;
+ }
+ if (sz1 < 0) {
+ WOLFSSL_MSG("Error in wolfSSL_BIO_nwrite");
+ return sz1;
+ }
+ XMEMCPY(buf, data, sz1);
+ data = (char*)data + sz1;
+ len -= sz1;
+
+ if (len > 0) {
+ /* try again to see if maybe we wrapped around the ring buffer */
+ sz2 = wolfSSL_BIO_nwrite(bio, &buf, len);
+ if (sz2 > 0) {
+ XMEMCPY(buf, data, sz2);
+ sz1 += sz2;
+ }
}
- XMEMCPY(buf, data, sz);
- return sz;
+ return sz1;
}
@@ -907,7 +934,7 @@ int wolfSSL_BIO_gets(WOLFSSL_BIO* bio, char* buf, int sz)
char* c;
int cSz;
cSz = wolfSSL_BIO_nread0(bio, &c);
- if (cSz == 0) {
+ if (cSz <= 0) {
ret = 0; /* Nothing to read */
buf[0] = '\0';
break;
@@ -1297,7 +1324,7 @@ int wolfSSL_BIO_nread0(WOLFSSL_BIO *bio, char **buf)
if (bio == NULL || buf == NULL) {
WOLFSSL_MSG("NULL argument passed in");
- return 0;
+ return -2;
}
/* if paired read from pair */
@@ -1314,7 +1341,7 @@ int wolfSSL_BIO_nread0(WOLFSSL_BIO *bio, char **buf)
}
}
- return 0;
+ return -2;
}
@@ -1343,7 +1370,7 @@ int wolfSSL_BIO_nread(WOLFSSL_BIO *bio, char **buf, int num)
/* get amount able to read and set buffer pointer */
sz = wolfSSL_BIO_nread0(bio, buf);
- if (sz == 0) {
+ if (sz < 0) {
return WOLFSSL_BIO_ERROR;
}
diff --git a/extra/wolfssl/wolfssl/src/crl.c b/extra/wolfssl/wolfssl/src/crl.c
index 9c847b8c..3e61ec95 100644
--- a/extra/wolfssl/wolfssl/src/crl.c
+++ b/extra/wolfssl/wolfssl/src/crl.c
@@ -69,9 +69,9 @@ int InitCRL(WOLFSSL_CRL* crl, WOLFSSL_CERT_MANAGER* cm)
crl->cm = cm;
crl->crlList = NULL;
crl->currentEntry = NULL;
+#ifdef HAVE_CRL_MONITOR
crl->monitors[0].path = NULL;
crl->monitors[1].path = NULL;
-#ifdef HAVE_CRL_MONITOR
crl->tid = INVALID_THREAD_VAL;
crl->mfd = WOLFSSL_CRL_MFD_INIT_VAL;
crl->setup = 0; /* thread setup done predicate */
@@ -149,6 +149,23 @@ static int InitCRL_Entry(CRL_Entry* crle, DecodedCRL* dcrl, const byte* buff,
crle->toBeSigned = NULL;
return -1;
}
+
+ #ifdef WC_RSA_PSS
+ crle->sigParamsSz = dcrl->sigParamsLength;
+ if (dcrl->sigParamsLength > 0) {
+ crle->sigParams = (byte*)XMALLOC(crle->sigParamsSz, heap,
+ DYNAMIC_TYPE_CRL_ENTRY);
+ if (crle->sigParams== NULL) {
+ XFREE(crle->toBeSigned, heap, DYNAMIC_TYPE_CRL_ENTRY);
+ crle->toBeSigned = NULL;
+ XFREE(crle->signature, heap, DYNAMIC_TYPE_CRL_ENTRY);
+ crle->signature = NULL;
+ return -1;
+ }
+ XMEMCPY(crle->sigParams, buff + dcrl->sigParamsIndex,
+ crle->sigParamsSz);
+ }
+ #endif
XMEMCPY(crle->toBeSigned, buff + dcrl->certBegin, crle->tbsSz);
XMEMCPY(crle->signature, dcrl->signature, crle->signatureSz);
#ifndef NO_SKID
@@ -206,6 +223,10 @@ static void CRL_Entry_free(CRL_Entry* crle, void* heap)
XFREE(crle->signature, heap, DYNAMIC_TYPE_CRL_ENTRY);
if (crle->toBeSigned != NULL)
XFREE(crle->toBeSigned, heap, DYNAMIC_TYPE_CRL_ENTRY);
+#ifdef WC_RSA_PSS
+ if (crle->sigParams != NULL)
+ XFREE(crle->sigParams, heap, DYNAMIC_TYPE_CRL_ENTRY);
+#endif
#if defined(OPENSSL_EXTRA)
if (crle->issuer != NULL) {
FreeX509Name(crle->issuer);
@@ -228,11 +249,13 @@ void FreeCRL(WOLFSSL_CRL* crl, int dynamic)
tmp = crl->crlList;
WOLFSSL_ENTER("FreeCRL");
+#ifdef HAVE_CRL_MONITOR
if (crl->monitors[0].path)
XFREE(crl->monitors[0].path, crl->heap, DYNAMIC_TYPE_CRL_MONITOR);
if (crl->monitors[1].path)
XFREE(crl->monitors[1].path, crl->heap, DYNAMIC_TYPE_CRL_MONITOR);
+#endif
XFREE(crl->currentEntry, crl->heap, DYNAMIC_TYPE_CRL_ENTRY);
crl->currentEntry = NULL;
@@ -337,13 +360,20 @@ static int VerifyCRLE(const WOLFSSL_CRL* crl, CRL_Entry* crle)
}
ret = VerifyCRL_Signature(&sigCtx, crle->toBeSigned, crle->tbsSz,
- crle->signature, crle->signatureSz, crle->signatureOID, ca,
- crl->heap);
+ crle->signature, crle->signatureSz, crle->signatureOID,
+ #ifdef WC_RSA_PSS
+ crle->sigParams, crle->sigParamsSz,
+ #else
+ NULL, 0,
+ #endif
+ ca, crl->heap);
- if (ret == 0)
+ if (ret == 0) {
crle->verified = 1;
- else
+ }
+ else {
crle->verified = ret;
+ }
return ret;
}
@@ -461,7 +491,8 @@ int CheckCertCRL_ex(WOLFSSL_CRL* crl, byte* issuerHash, byte* serial,
#if defined(OPENSSL_ALL) && defined(WOLFSSL_CERT_GEN) && \
(defined(WOLFSSL_CERT_REQ) || defined(WOLFSSL_CERT_EXT)) && \
- !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
+ !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) && \
+ !defined(NO_STDIO_FILESYSTEM)
/* if not find entry in the CRL list, it looks at the folder that sets */
/* by LOOKUP_ctrl because user would want to use hash_dir. */
/* Loading <issuer-hash>.rN form CRL file if find at the folder, */
@@ -735,18 +766,35 @@ static CRL_Entry* DupCRL_Entry(const CRL_Entry* ent, void* heap)
DYNAMIC_TYPE_CRL_ENTRY);
dupl->signature = (byte*)XMALLOC(dupl->signatureSz, heap,
DYNAMIC_TYPE_CRL_ENTRY);
- if (dupl->toBeSigned == NULL || dupl->signature == NULL) {
+ #ifdef WC_RSA_PSS
+ dupl->sigParams = (byte*)XMALLOC(dupl->sigParamsSz, heap,
+ DYNAMIC_TYPE_CRL_ENTRY);
+ #endif
+ if (dupl->toBeSigned == NULL || dupl->signature == NULL
+ #ifdef WC_RSA_PSS
+ || dupl->sigParams == NULL
+ #endif
+ ) {
CRL_Entry_free(dupl, heap);
return NULL;
}
XMEMCPY(dupl->toBeSigned, ent->toBeSigned, dupl->tbsSz);
XMEMCPY(dupl->signature, ent->signature, dupl->signatureSz);
+ #ifdef WC_RSA_PSS
+ if (dupl->sigParamsSz > 0) {
+ XMEMCPY(dupl->sigParams, ent->sigParams, dupl->sigParamsSz);
+ }
+ #endif
}
else {
dupl->toBeSigned = NULL;
dupl->tbsSz = 0;
dupl->signature = NULL;
dupl->signatureSz = 0;
+#ifdef WC_RSA_PSS
+ dupl->sigParams = NULL;
+ dupl->sigParamsSz = 0;
+#endif
#if !defined(NO_SKID) && !defined(NO_ASN)
dupl->extAuthKeyIdSet = 0;
#endif
@@ -794,6 +842,7 @@ static int DupX509_CRL(WOLFSSL_X509_CRL *dupl, const WOLFSSL_X509_CRL* crl)
return BAD_FUNC_ARG;
}
+#ifdef HAVE_CRL_MONITOR
if (crl->monitors[0].path) {
int pathSz = (int)XSTRLEN(crl->monitors[0].path) + 1;
dupl->monitors[0].path = (char*)XMALLOC(pathSz, dupl->heap,
@@ -821,6 +870,7 @@ static int DupX509_CRL(WOLFSSL_X509_CRL *dupl, const WOLFSSL_X509_CRL* crl)
return MEMORY_E;
}
}
+#endif
dupl->crlList = DupCRL_list(crl->crlList, dupl->heap);
#ifdef HAVE_CRL_IO
diff --git a/extra/wolfssl/wolfssl/src/dtls.c b/extra/wolfssl/wolfssl/src/dtls.c
index fceeedbe..aecd2605 100644
--- a/extra/wolfssl/wolfssl/src/dtls.c
+++ b/extra/wolfssl/wolfssl/src/dtls.c
@@ -114,6 +114,7 @@ int DtlsIgnoreError(int err)
case SOCKET_ERROR_E:
case WANT_READ:
case WANT_WRITE:
+ case COOKIE_ERROR:
return 0;
default:
return 1;
@@ -207,6 +208,13 @@ static int CreateDtls12Cookie(const WOLFSSL* ssl, const WolfSSL_CH* ch,
{
int ret;
Hmac cookieHmac;
+
+ if (ssl->buffers.dtlsCookieSecret.buffer == NULL ||
+ ssl->buffers.dtlsCookieSecret.length == 0) {
+ WOLFSSL_MSG("Missing DTLS 1.2 cookie secret");
+ return COOKIE_ERROR;
+ }
+
ret = wc_HmacInit(&cookieHmac, ssl->heap, ssl->devId);
if (ret == 0) {
ret = wc_HmacSetKey(&cookieHmac, DTLS_COOKIE_TYPE,
diff --git a/extra/wolfssl/wolfssl/src/dtls13.c b/extra/wolfssl/wolfssl/src/dtls13.c
index 3591d67b..86e5fb8b 100644
--- a/extra/wolfssl/wolfssl/src/dtls13.c
+++ b/extra/wolfssl/wolfssl/src/dtls13.c
@@ -262,6 +262,7 @@ static int Dtls13GetRnMask(WOLFSSL* ssl, const byte* ciphertext, byte* mask,
return wc_AesEncryptDirect(c->aes, mask, ciphertext);
#else
wc_AesEncryptDirect(c->aes, mask, ciphertext);
+ return 0;
#endif
}
#endif /* HAVE_AESGCM || HAVE_AESCCM */
diff --git a/extra/wolfssl/wolfssl/src/include.am b/extra/wolfssl/wolfssl/src/include.am
index a69822ff..b89618b0 100644
--- a/extra/wolfssl/wolfssl/src/include.am
+++ b/extra/wolfssl/wolfssl/src/include.am
@@ -32,25 +32,11 @@ if !BUILD_NO_LIBRARY
lib_LTLIBRARIES+= src/libwolfssl@LIBSUFFIX@.la
endif
src_libwolfssl@LIBSUFFIX@_la_SOURCES =
-src_libwolfssl@LIBSUFFIX@_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WOLFSSL_LIBRARY_VERSION}
+src_libwolfssl@LIBSUFFIX@_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-number ${WOLFSSL_LIBRARY_VERSION}
src_libwolfssl@LIBSUFFIX@_la_LIBADD = $(LIBM) $(LIB_ADD) $(LIB_STATIC_ADD)
src_libwolfssl@LIBSUFFIX@_la_CFLAGS = -DBUILDING_WOLFSSL $(AM_CFLAGS) -DLIBWOLFSSL_GLOBAL_EXTRA_CFLAGS="\" $(EXTRA_CFLAGS)\""
src_libwolfssl@LIBSUFFIX@_la_CPPFLAGS = -DBUILDING_WOLFSSL $(AM_CPPFLAGS)
-# install the packaged IPP libraries
-if BUILD_FAST_RSA
-
-# Link needed IPP libraries
-noinst_SCRIPTS+=IPP_links
-IPP_links:
- @$(IPPLINK)
-
-ippdir = $(libdir)
-ipp_DATA = $(IPPLIBS)
-
-include_HEADERS+=$(IPPHEADERS)
-endif # BUILD_FAST_RSA
-
if BUILD_FIPS
if BUILD_FIPS_V2
@@ -93,23 +79,29 @@ if BUILD_SHA
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha.c
endif
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha256_asm.S
endif
+endif
if BUILD_SHA512
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha512.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha512_asm.S
endif
endif
+endif
if BUILD_SHA3
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha3.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha3_asm.S
endif
endif
+endif
if BUILD_DH
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/dh.c
@@ -216,9 +208,11 @@ src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/thumb2-sha256-asm
endif !BUILD_ARMASM_INLINE
else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha256.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha256_asm.S
endif BUILD_INTELASM
+endif !BUILD_X86_ASM
endif !BUILD_ARMASM
endif !BUILD_ARMASM_NEON
@@ -244,9 +238,11 @@ src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/thumb2-sha512-asm
endif !BUILD_ARMASM_INLINE
else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha512.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha512_asm.S
endif BUILD_INTELASM
+endif !BUILD_X86_ASM
endif !BUILD_ARMASM
endif !BUILD_ARMASM_NEON
endif BUILD_SHA512
@@ -260,10 +256,12 @@ else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-sha3-asm.S
endif !BUILD_ARMASM_INLINE
endif BUILD_ARMASM_NEON
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha3_asm.S
endif
endif
+endif
if BUILD_DH
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/dh.c
@@ -342,9 +340,11 @@ src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-32-sha256-a
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/thumb2-sha256-asm.S
endif !BUILD_ARMASM_INLINE
else
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha256_asm.S
endif BUILD_INTELASM
+endif !BUILD_X86_ASM
endif !BUILD_ARMASM
endif !BUILD_ARMASM_NEON
endif !BUILD_FIPS_CURRENT
@@ -370,17 +370,11 @@ if BUILD_ASYNCCRYPT
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/async.c
endif
-if !BUILD_USER_RSA
if BUILD_RSA
-if BUILD_FAST_RSA
-src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/user-crypto/src/rsa.c
-else
if !BUILD_FIPS_CURRENT
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/rsa.c
endif !BUILD_FIPS_CURRENT
endif
-endif
-endif
if BUILD_RC2
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/rc2.c
@@ -493,9 +487,11 @@ src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/thumb2-sha512-asm
endif !BUILD_ARMASM_INLINE
else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha512.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha512_asm.S
endif BUILD_INTELASM
+endif !BUILD_X86_ASM
endif !BUILD_ARMASM
endif !BUILD_ARMASM_NEON
endif BUILD_SHA512
@@ -511,10 +507,12 @@ else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-sha3-asm.S
endif !BUILD_ARMASM_INLINE
endif BUILD_ARMASM_NEON
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha3_asm.S
endif
endif
+endif
endif !BUILD_FIPS_CURRENT
if !BUILD_FIPS_CURRENT
@@ -555,9 +553,11 @@ endif !BUILD_FIPS_CURRENT
if !BUILD_FIPS_CURRENT
if BUILD_SM3
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sm3.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sm3_asm.S
endif
+endif
endif BUILD_SM3
endif !BUILD_FIPS_CURRENT
@@ -622,10 +622,12 @@ if BUILD_ARMASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-poly1305.c
endif
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/poly1305.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/poly1305_asm.S
endif
endif
+endif
if BUILD_RC4
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/arc4.c
@@ -684,10 +686,12 @@ if BUILD_ARMASM_NEON
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/arm/armv8-chacha.c
else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/chacha.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/chacha_asm.S
endif
endif
+endif
if BUILD_POLY1305
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/chacha20_poly1305.c
endif
@@ -722,18 +726,22 @@ if !BUILD_FIPS_CURRENT
if BUILD_WC_KYBER
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_kyber.c
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_kyber_poly.c
+if !BUILD_X86_ASM
if BUILD_INTELASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_kyber_asm.S
endif
endif
endif
+endif
if BUILD_WC_LMS
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_lms.c
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_lms_impl.c
endif
if BUILD_WC_XMSS
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_xmss.c
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/wc_xmss_impl.c
endif
if BUILD_CURVE25519
@@ -749,7 +757,9 @@ if BUILD_CURVE25519_SMALL
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/fe_low_mem.c
else
if BUILD_INTELASM
+if !BUILD_X86_ASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/fe_x25519_asm.S
+endif !BUILD_X86_ASM
else
if BUILD_ARMASM
if BUILD_ARMASM_NEON
@@ -785,7 +795,9 @@ else
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/ge_operations.c
if !BUILD_FEMATH
if BUILD_INTELASM
+if !BUILD_X86_ASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/fe_x25519_asm.S
+endif !BUILD_X86_ASM
else
if BUILD_ARMASM
if BUILD_ARMASM_NEON
@@ -835,6 +847,7 @@ src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/falcon.c
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/dilithium.c
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sphincs.c
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/ext_kyber.c
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/liboqs/liboqs.c
endif
if BUILD_LIBLMS
@@ -900,6 +913,9 @@ endif
endif !BUILD_CRYPTONLY
+if BUILD_XILINX
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/xilinx/xil-aesgcm.c
+endif
endif !BUILD_FIPS_RAND
@@ -907,3 +923,4 @@ if BUILD_ARIA
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/aria/aria-crypt.c
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/aria/aria-cryptocb.c
endif
+
diff --git a/extra/wolfssl/wolfssl/src/internal.c b/extra/wolfssl/wolfssl/src/internal.c
index 2274ab7e..d889f337 100644
--- a/extra/wolfssl/wolfssl/src/internal.c
+++ b/extra/wolfssl/wolfssl/src/internal.c
@@ -1254,7 +1254,7 @@ static int ExportOptions(WOLFSSL* ssl, byte* exp, word32 len, byte ver,
exp[idx++] = 0;
#endif
#ifdef HAVE_ANON
- exp[idx++] = options->haveAnon;
+ exp[idx++] = options->useAnon;
#else
exp[idx++] = 0;
#endif
@@ -1459,7 +1459,7 @@ static int ImportOptions(WOLFSSL* ssl, const byte* exp, word32 len, byte ver,
idx++;
#endif
#ifdef HAVE_ANON
- options->haveAnon = exp[idx++]; /* User wants to allow Anon suites */
+ options->useAnon = exp[idx++]; /* User wants to allow Anon suites */
#else
idx++;
#endif
@@ -2585,6 +2585,12 @@ void SSL_CtxResourceFree(WOLFSSL_CTX* ctx)
ForceZero(ctx->privateKey->buffer, ctx->privateKey->length);
}
FreeDer(&ctx->privateKey);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (ctx->altPrivateKey != NULL && ctx->altPrivateKey->buffer != NULL) {
+ ForceZero(ctx->altPrivateKey->buffer, ctx->altPrivateKey->length);
+ }
+ FreeDer(&ctx->altPrivateKey);
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#ifdef OPENSSL_ALL
wolfSSL_EVP_PKEY_free(ctx->privateKeyPKey);
#endif
@@ -4575,6 +4581,12 @@ void FreeX509(WOLFSSL_X509* x509)
x509->altNames = NULL;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ XFREE(x509->sapkiDer, x509->heap, DYNAMIC_TYPE_X509_EXT);
+ XFREE(x509->altSigAlgDer, x509->heap, DYNAMIC_TYPE_X509_EXT);
+ XFREE(x509->altSigValDer, x509->heap, DYNAMIC_TYPE_X509_EXT);
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)
wolfSSL_RefFree(&x509->ref);
#endif
@@ -4644,7 +4656,8 @@ static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output)
static void SetDigest(WOLFSSL* ssl, int hashAlgo)
{
switch (hashAlgo) {
- #ifndef NO_SHA
+ #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
case sha_mac:
ssl->options.dontFreeDigest = 1;
ssl->buffers.digest.buffer = ssl->hsHashes->certHashes.sha;
@@ -6396,7 +6409,7 @@ void InitSSL_CTX_Suites(WOLFSSL_CTX* ctx)
havePSK = ctx->havePSK;
#endif /* NO_PSK */
#ifdef HAVE_ANON
- haveAnon = ctx->haveAnon;
+ haveAnon = ctx->useAnon;
#endif /* HAVE_ANON*/
#ifndef NO_CERTS
keySz = ctx->privateKeySz;
@@ -6429,7 +6442,7 @@ int InitSSL_Suites(WOLFSSL* ssl)
#endif /* NO_PSK */
#if !defined(NO_CERTS) && !defined(WOLFSSL_SESSION_EXPORT)
#ifdef HAVE_ANON
- haveAnon = (byte)ssl->options.haveAnon;
+ haveAnon = (byte)ssl->options.useAnon;
#endif /* HAVE_ANON*/
#ifdef WOLFSSL_MULTICAST
haveMcast = (byte)ssl->options.haveMcast;
@@ -6459,7 +6472,7 @@ int InitSSL_Suites(WOLFSSL* ssl)
havePSK, ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, ssl->options.side);
+ ssl->options.useAnon, ssl->options.side);
}
#if !defined(NO_CERTS) && !defined(WOLFSSL_SESSION_EXPORT)
@@ -6679,7 +6692,7 @@ int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
#endif
#ifdef HAVE_ANON
- ssl->options.haveAnon = ctx->haveAnon;
+ ssl->options.useAnon = ctx->useAnon;
#endif
#ifndef NO_DH
ssl->options.minDhKeySz = ctx->minDhKeySz;
@@ -6747,6 +6760,11 @@ int SetSSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
ssl->buffers.keyLabel = ctx->privateKeyLabel;
ssl->buffers.keySz = ctx->privateKeySz;
ssl->buffers.keyDevId = ctx->privateKeyDevId;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ ssl->buffers.altKey = ctx->altPrivateKey;
+ ssl->buffers.altKeySz = ctx->altPrivateKeySz;
+ ssl->buffers.altKeyType = ctx->altPrivateKeyType;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#endif
#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
((defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)) || \
@@ -6839,8 +6857,7 @@ int InitHandshakeHashes(WOLFSSL* ssl)
}
XMEMSET(ssl->hsHashes, 0, sizeof(HS_Hashes));
-#ifndef NO_OLD_TLS
-#ifndef NO_MD5
+#if !defined(NO_MD5) && !defined(NO_OLD_TLS)
ret = wc_InitMd5_ex(&ssl->hsHashes->hashMd5, ssl->heap, ssl->devId);
if (ret != 0)
return ret;
@@ -6848,7 +6865,8 @@ int InitHandshakeHashes(WOLFSSL* ssl)
wc_Md5SetFlags(&ssl->hsHashes->hashMd5, WC_HASH_FLAG_WILLCOPY);
#endif
#endif
-#ifndef NO_SHA
+#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
ret = wc_InitSha_ex(&ssl->hsHashes->hashSha, ssl->heap, ssl->devId);
if (ret != 0)
return ret;
@@ -6856,7 +6874,6 @@ int InitHandshakeHashes(WOLFSSL* ssl)
wc_ShaSetFlags(&ssl->hsHashes->hashSha, WC_HASH_FLAG_WILLCOPY);
#endif
#endif
-#endif /* !NO_OLD_TLS */
#ifndef NO_SHA256
ret = wc_InitSha256_ex(&ssl->hsHashes->hashSha256, ssl->heap, ssl->devId);
if (ret != 0)
@@ -6896,14 +6913,13 @@ int InitHandshakeHashes(WOLFSSL* ssl)
void FreeHandshakeHashes(WOLFSSL* ssl)
{
if (ssl->hsHashes) {
-#ifndef NO_OLD_TLS
- #ifndef NO_MD5
+ #if !defined(NO_MD5) && !defined(NO_OLD_TLS)
wc_Md5Free(&ssl->hsHashes->hashMd5);
#endif
- #ifndef NO_SHA
+ #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
wc_ShaFree(&ssl->hsHashes->hashSha);
#endif
-#endif /* !NO_OLD_TLS */
#ifndef NO_SHA256
wc_Sha256Free(&ssl->hsHashes->hashSha256);
#endif
@@ -7389,6 +7405,7 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
/* all done with init, now can return errors, call other stuff */
if ((ret = ReinitSSL(ssl, ctx, writeDup)) != 0) {
+ WOLFSSL_MSG_EX("ReinitSSL failed. err = %d", ret);
return ret;
}
@@ -7422,6 +7439,7 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
&& ret != NO_PRIVATE_KEY
#endif
) {
+ WOLFSSL_MSG_EX("SetSSL_CTX failed. err = %d", ret);
return ret;
}
ssl->options.dtls = ssl->version.major == DTLS_MAJOR;
@@ -7435,20 +7453,21 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
/* hsHashes */
ret = InitHandshakeHashes(ssl);
- if (ret != 0)
+ if (ret != 0) {
+ WOLFSSL_MSG_EX("InitHandshakeHashes failed. err = %d", ret);
return ret;
+ }
#if defined(WOLFSSL_DTLS) && !defined(NO_WOLFSSL_SERVER)
if (ssl->options.dtls && ssl->options.side == WOLFSSL_SERVER_END) {
- if (!IsAtLeastTLSv1_3(ssl->version)) {
- ret = wolfSSL_DTLS_SetCookieSecret(ssl, NULL, 0);
- if (ret != 0) {
- WOLFSSL_MSG("DTLS Cookie Secret error");
- return ret;
- }
+ /* Initialize both in case we allow downgrading. */
+ ret = wolfSSL_DTLS_SetCookieSecret(ssl, NULL, 0);
+ if (ret != 0) {
+ WOLFSSL_MSG("DTLS Cookie Secret error");
+ return ret;
}
#if defined(WOLFSSL_DTLS13) && defined(WOLFSSL_SEND_HRR_COOKIE)
- else {
+ if (IsAtLeastTLSv1_3(ssl->version)) {
ret = wolfSSL_send_hrr_cookie(ssl, NULL, 0);
if (ret != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("DTLS1.3 Cookie secret error");
@@ -7478,10 +7497,10 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
ssl->session = wolfSSL_NewSession(ssl->heap);
if (ssl->session == NULL) {
- WOLFSSL_MSG("SSL Session Memory error");
+ WOLFSSL_MSG_EX("SSL Session Memory error. wolfSSL_NewSession "
+ "err = %d", ret);
return MEMORY_E;
}
-
#ifdef HAVE_SESSION_TICKET
ssl->options.noTicketTls12 = ctx->noTicketTls12;
#endif
@@ -7554,7 +7573,12 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
defined(WOLFSSL_SSLKEYLOGFILE) && defined(WOLFSSL_TLS13)
(void)wolfSSL_set_tls13_secret_cb(ssl, tls13ShowSecrets, NULL);
#endif
-
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ ssl->sigSpec = ctx->sigSpec;
+ ssl->sigSpecSz = ctx->sigSpecSz;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ /* Returns 0 on success, not WOLFSSL_SUCCESS (1) */
+ WOLFSSL_MSG_EX("InitSSL done. return 0 (success)");
return 0;
}
@@ -7788,13 +7812,13 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey)
#if defined(HAVE_PQC)
#if defined(HAVE_FALCON)
case DYNAMIC_TYPE_FALCON:
- wc_falcon_init((falcon_key*)*pKey);
+ wc_falcon_init_ex((falcon_key*)*pKey, ssl->heap, ssl->devId);
ret = 0;
break;
#endif /* HAVE_FALCON */
#if defined(HAVE_DILITHIUM)
case DYNAMIC_TYPE_DILITHIUM:
- wc_dilithium_init((dilithium_key*)*pKey);
+ wc_dilithium_init_ex((dilithium_key*)*pKey, ssl->heap, ssl->devId);
ret = 0;
break;
#endif /* HAVE_DILITHIUM */
@@ -7935,6 +7959,9 @@ void FreeKeyExchange(WOLFSSL* ssl)
/* Free handshake key */
FreeKey(ssl, ssl->hsType, &ssl->hsKey);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ FreeKey(ssl, ssl->hsAltType, &ssl->hsAltKey);
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#ifndef NO_DH
/* Free temp DH key */
@@ -8303,6 +8330,9 @@ void SSL_ResourceFree(WOLFSSL* ssl)
wolfSSL_CTX_free(ssl->initial_ctx);
ssl->initial_ctx = NULL;
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ XFREE(ssl->peerSigSpec, ssl->heap, DYNAMIC_TYPE_TLSX);
+#endif
}
/* Free any handshake resources no longer needed */
@@ -9836,14 +9866,13 @@ int HashRaw(WOLFSSL* ssl, const byte* data, int sz)
}
#endif /* WOLFSSL_RENESAS_TSIP_TLS */
-#ifndef NO_OLD_TLS
- #ifndef NO_SHA
- wc_ShaUpdate(&ssl->hsHashes->hashSha, data, sz);
- #endif
- #ifndef NO_MD5
- wc_Md5Update(&ssl->hsHashes->hashMd5, data, sz);
- #endif
-#endif /* NO_OLD_TLS */
+#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
+ wc_ShaUpdate(&ssl->hsHashes->hashSha, data, sz);
+#endif
+#if !defined(NO_MD5) && !defined(NO_OLD_TLS)
+ wc_Md5Update(&ssl->hsHashes->hashMd5, data, sz);
+#endif
if (IsAtLeastTLSv1_2(ssl)) {
#ifndef NO_SHA256
@@ -10973,18 +11002,11 @@ int EarlySanityCheckMsgReceived(WOLFSSL* ssl, byte type, word32 msgSz)
{
int ret = 0;
#ifndef WOLFSSL_DISABLE_EARLY_SANITY_CHECKS
- byte version_negotiated = 0;
-
- WOLFSSL_ENTER("EarlySanityCheckMsgReceived");
-
-#ifdef WOLFSSL_DTLS
/* Version has only been negotiated after we either send or process a
* ServerHello message */
- if (ssl->options.dtls)
- version_negotiated = ssl->options.serverState >= SERVER_HELLO_COMPLETE;
- else
-#endif
- version_negotiated = 1;
+ byte version_negotiated = ssl->options.serverState >= SERVER_HELLO_COMPLETE;
+
+ WOLFSSL_ENTER("EarlySanityCheckMsgReceived");
if (version_negotiated)
ret = MsgCheckEncryption(ssl, type, ssl->keys.decryptedCur == 1);
@@ -11454,7 +11476,7 @@ static int BuildMD5(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
if (ret == 0)
ret = wc_Md5Update(md5, sender, SIZEOF_SENDER);
if (ret == 0)
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_Md5Update(md5, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_Md5Update(md5, PAD1, PAD_MD5);
if (ret == 0)
@@ -11464,7 +11486,7 @@ static int BuildMD5(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
if (ret == 0) {
ret = wc_InitMd5_ex(md5, ssl->heap, ssl->devId);
if (ret == 0) {
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_Md5Update(md5, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_Md5Update(md5, PAD2, PAD_MD5);
if (ret == 0)
@@ -11500,7 +11522,7 @@ static int BuildSHA(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
if (ret == 0)
ret = wc_ShaUpdate(sha, sender, SIZEOF_SENDER);
if (ret == 0)
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_ShaUpdate(sha, PAD1, PAD_SHA);
if (ret == 0)
@@ -11510,7 +11532,7 @@ static int BuildSHA(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
if (ret == 0) {
ret = wc_InitSha_ex(sha, ssl->heap, ssl->devId);
if (ret == 0) {
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_ShaUpdate(sha, PAD2, PAD_SHA);
if (ret == 0)
@@ -12937,6 +12959,30 @@ int CopyDecodedToX509(WOLFSSL_X509* x509, DecodedCert* dCert)
x509->pkCurveOID = dCert->pkCurveOID;
#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* Copy over alternative sig and pubkey. In this case we will allocate new
+ * buffers for them as we have no knowledge of when the DecodedCert is
+ * freed. */
+ x509->sapkiDer = (byte*)XMALLOC(dCert->sapkiLen, x509->heap,
+ DYNAMIC_TYPE_X509_EXT);
+ x509->altSigAlgDer = (byte*)XMALLOC(dCert->altSigAlgLen, x509->heap,
+ DYNAMIC_TYPE_X509_EXT);
+ x509->altSigValDer = (byte*)XMALLOC(dCert->altSigValLen, x509->heap,
+ DYNAMIC_TYPE_X509_EXT);
+ if ((x509->sapkiDer != NULL) && (x509->altSigAlgDer != NULL) &&
+ (x509->altSigValDer != NULL)) {
+ XMEMCPY(x509->sapkiDer, dCert->sapkiDer, dCert->sapkiLen);
+ XMEMCPY(x509->altSigAlgDer, dCert->altSigAlgDer, dCert->altSigAlgLen);
+ XMEMCPY(x509->altSigValDer, dCert->altSigValDer, dCert->altSigValLen);
+ x509->sapkiLen = dCert->sapkiLen;
+ x509->altSigAlgLen = dCert->altSigAlgLen;
+ x509->altSigValLen = dCert->altSigValLen;
+ }
+ else {
+ ret = MEMORY_E;
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
return ret;
}
@@ -13529,7 +13575,8 @@ static void FreeProcPeerCertArgs(WOLFSSL* ssl, void* pArgs)
}
#if defined(OPENSSL_ALL) && defined(WOLFSSL_CERT_GEN) && \
(defined(WOLFSSL_CERT_REQ) || defined(WOLFSSL_CERT_EXT)) && \
- !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
+ !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) && \
+ !defined(NO_STDIO_FILESYSTEM)
/* load certificate file which has the form <hash>.(r)N[0..N] */
/* in the folder. */
/* (r), in the case of CRL file */
@@ -13883,6 +13930,39 @@ PRAGMA_GCC_DIAG_POP
alreadySigner = AlreadySigner(SSL_CM(ssl), subjectHash);
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if ((ret == 0) && (args->dCert->sapkiDer != NULL)) {
+#ifndef WOLFSSL_SMALL_STACK
+ byte der[MAX_CERT_VERIFY_SZ];
+#else
+ byte *der = (byte*)XMALLOC(MAX_CERT_VERIFY_SZ, ssl->heap,
+ DYNAMIC_TYPE_DCERT);
+ if (der == NULL) {
+ ret = MEMORY_E;
+ }
+#endif /* ! WOLFSSL_SMALL_STACK */
+
+ if (ret == 0) {
+ ret = wc_GeneratePreTBS(args->dCert, der, MAX_CERT_VERIFY_SZ);
+
+ if (ret > 0) {
+ ret = wc_ConfirmAltSignature(der, ret,
+ args->dCert->sapkiDer, args->dCert->sapkiLen,
+ args->dCert->sapkiOID,
+ args->dCert->altSigValDer, args->dCert->altSigValLen,
+ args->dCert->altSigAlgOID, ssl->heap);
+ }
+#ifdef WOLFSSL_SMALL_STACK
+ XFREE(der, ssl->heap, DYNAMIC_TYPE_DCERT);
+#endif /* WOLFSSL_SMALL_STACK */
+
+ if (ret == 0) {
+ WOLFSSL_MSG("Alternative signature has been verified!");
+ }
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
#ifdef WOLFSSL_SMALL_CERT_VERIFY
/* get signature check failures from above */
if (ret == 0)
@@ -14406,7 +14486,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
&subjectHash, &alreadySigner);
#if defined(OPENSSL_ALL) && defined(WOLFSSL_CERT_GEN) && \
(defined(WOLFSSL_CERT_REQ) || defined(WOLFSSL_CERT_EXT)) && \
- !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
+ !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) && \
+ !defined(NO_STDIO_FILESYSTEM)
if (ret == ASN_NO_SIGNER_E || ret == ASN_SELF_SIGNED_E) {
WOLFSSL_MSG("try to load certificate if hash dir is set");
ret = LoadCertByIssuer(SSL_STORE(ssl),
@@ -14692,7 +14773,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
&subjectHash, &alreadySigner);
#if defined(OPENSSL_ALL) && defined(WOLFSSL_CERT_GEN) && \
(defined(WOLFSSL_CERT_REQ) || defined(WOLFSSL_CERT_EXT)) && \
- !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR)
+ !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) && \
+ !defined(NO_STDIO_FILESYSTEM)
if (ret == ASN_NO_SIGNER_E || ret == ASN_SELF_SIGNED_E) {
int lastErr = ret; /* save error from last time */
WOLFSSL_MSG("try to load certificate if hash dir is set");
@@ -20660,8 +20742,10 @@ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
#endif
ret = RetrySendAlert(ssl);
- if (ret != 0)
+ if (ret != 0) {
+ WOLFSSL_MSG_EX("RetrySendAlert failed, giving up. err = %d", ret);
return ret;
+ }
for (;;) {
switch (ssl->options.processReply) {
@@ -21162,11 +21246,11 @@ default:
ssl->keys.decryptedCur = 1;
#ifdef WOLFSSL_TLS13
if (ssl->options.tls1_3) {
- /* end of plaintext */
- word16 i = (word16)(ssl->buffers.inputBuffer.idx +
- ssl->curSize - ssl->specs.aead_mac_size);
-
- if (i > ssl->buffers.inputBuffer.length) {
+ word32 i = (ssl->buffers.inputBuffer.idx +
+ ssl->curSize - ssl->specs.aead_mac_size);
+ /* check that the end of the logical length doesn't extend
+ * past the real buffer */
+ if (i > ssl->buffers.inputBuffer.length || i == 0) {
WOLFSSL_ERROR(BUFFER_ERROR);
return BUFFER_ERROR;
}
@@ -21992,7 +22076,8 @@ static int BuildMD5_CertVerify(const WOLFSSL* ssl, byte* digest)
int ret;
byte md5_result[WC_MD5_DIGEST_SIZE];
#ifdef WOLFSSL_SMALL_STACK
- wc_Md5* md5 = (wc_Md5*)XMALLOC(sizeof(wc_Md5), ssl->heap, DYNAMIC_TYPE_HASHCTX);
+ wc_Md5* md5 = (wc_Md5*)XMALLOC(sizeof(wc_Md5), ssl->heap,
+ DYNAMIC_TYPE_HASHCTX);
#else
wc_Md5 md5[1];
#endif
@@ -22000,7 +22085,7 @@ static int BuildMD5_CertVerify(const WOLFSSL* ssl, byte* digest)
/* make md5 inner */
ret = wc_Md5Copy(&ssl->hsHashes->hashMd5, md5); /* Save current position */
if (ret == 0)
- ret = wc_Md5Update(md5, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_Md5Update(md5, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_Md5Update(md5, PAD1, PAD_MD5);
if (ret == 0)
@@ -22030,13 +22115,14 @@ static int BuildMD5_CertVerify(const WOLFSSL* ssl, byte* digest)
#endif /* !NO_MD5 && !NO_OLD_TLS */
#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
- defined(WOLFSSL_ALLOW_TLS_SHA1))
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
static int BuildSHA_CertVerify(const WOLFSSL* ssl, byte* digest)
{
int ret;
byte sha_result[WC_SHA_DIGEST_SIZE];
#ifdef WOLFSSL_SMALL_STACK
- wc_Sha* sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), ssl->heap, DYNAMIC_TYPE_HASHCTX);
+ wc_Sha* sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), ssl->heap,
+ DYNAMIC_TYPE_HASHCTX);
#else
wc_Sha sha[1];
#endif
@@ -22044,7 +22130,7 @@ static int BuildSHA_CertVerify(const WOLFSSL* ssl, byte* digest)
/* make sha inner */
ret = wc_ShaCopy(&ssl->hsHashes->hashSha, sha); /* Save current position */
if (ret == 0)
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_ShaUpdate(sha, PAD1, PAD_SHA);
if (ret == 0)
@@ -22054,7 +22140,7 @@ static int BuildSHA_CertVerify(const WOLFSSL* ssl, byte* digest)
if (ret == 0) {
ret = wc_InitSha_ex(sha, ssl->heap, ssl->devId);
if (ret == 0) {
- ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret,SECRET_LEN);
+ ret = wc_ShaUpdate(sha, ssl->arrays->masterSecret, SECRET_LEN);
if (ret == 0)
ret = wc_ShaUpdate(sha, PAD2, PAD_SHA);
if (ret == 0)
@@ -22085,7 +22171,8 @@ int BuildCertHashes(const WOLFSSL* ssl, Hashes* hashes)
if (ret != 0)
return ret;
#endif
- #if !defined(NO_SHA)
+ #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
ret = wc_ShaGetHash(&ssl->hsHashes->hashSha, hashes->sha);
if (ret != 0)
return ret;
@@ -23943,13 +24030,62 @@ static int CheckTLS13AEADSendLimit(WOLFSSL* ssl)
ssl->keys.sequence_number_lo);
}
- if (w64GTE(seq, limit))
+ if (w64GTE(seq, limit)) { /* cppcheck-suppress uninitvar
+ * (false positive from cppcheck-2.13.0)
+ */
return Tls13UpdateKeys(ssl); /* Need to generate new keys */
+ }
return 0;
}
#endif /* WOLFSSL_TLS13 && !WOLFSSL_TLS13_IGNORE_AEAD_LIMITS */
+/**
+ * ssl_in_handshake():
+ * Invoked in wolfSSL_read/wolfSSL_write to check if wolfSSL_negotiate() is
+ * needed in the handshake.
+ *
+ * In TLSv1.2 negotiate until the end of the handshake, unless:
+ * 1 in SCR and sending data or
+ * 2 in SCR and we have plain data ready
+ * Early data logic may bypass this logic in TLSv1.3 when appropriate.
+ */
+static int ssl_in_handshake(WOLFSSL *ssl, int send)
+{
+ if (IsSCR(ssl)) {
+ if (send) {
+ /* allow sending data in SCR */
+ return 0;
+ } else {
+ /* allow reading buffered data in SCR */
+ if (ssl->buffers.clearOutputBuffer.length != 0)
+ return 0;
+ }
+ return 1;
+ }
+
+ if (ssl->options.handShakeState != HANDSHAKE_DONE)
+ return 1;
+
+ if (ssl->options.side == WOLFSSL_SERVER_END) {
+ if (IsAtLeastTLSv1_3(ssl->version))
+ return ssl->options.acceptState < TLS13_TICKET_SENT;
+ if (IsAtLeastTLSv1_2(ssl))
+ return ssl->options.acceptState < ACCEPT_THIRD_REPLY_DONE;
+ return 0;
+ }
+
+ if (ssl->options.side == WOLFSSL_CLIENT_END) {
+ if (IsAtLeastTLSv1_3(ssl->version))
+ return ssl->options.connectState < FINISHED_DONE;
+ if (IsAtLeastTLSv1_2(ssl))
+ return ssl->options.connectState < SECOND_REPLY_DONE;
+ return 0;
+ }
+
+ return 0;
+}
+
int SendData(WOLFSSL* ssl, const void* data, int sz)
{
int sent = 0, /* plainText size */
@@ -23981,7 +24117,9 @@ int SendData(WOLFSSL* ssl, const void* data, int sz)
}
#ifdef WOLFSSL_EARLY_DATA
- if (ssl->earlyData != no_early_data) {
+ if (ssl->options.side == WOLFSSL_CLIENT_END &&
+ ssl->earlyData != no_early_data &&
+ ssl->earlyData != done_early_data) {
if (ssl->options.handShakeState == HANDSHAKE_DONE) {
WOLFSSL_MSG("handshake complete, trying to send early data");
ssl->error = BUILD_MSG_ERROR;
@@ -23999,7 +24137,7 @@ int SendData(WOLFSSL* ssl, const void* data, int sz)
}
else
#endif
- if (ssl->options.handShakeState != HANDSHAKE_DONE && !IsSCR(ssl)) {
+ if (ssl_in_handshake(ssl, 1)) {
int err;
WOLFSSL_MSG("handshake not complete, trying to finish");
if ( (err = wolfSSL_negotiate(ssl)) != WOLFSSL_SUCCESS) {
@@ -24075,7 +24213,9 @@ int SendData(WOLFSSL* ssl, const void* data, int sz)
return ssl->error = BAD_STATE_E;
#ifdef WOLFSSL_EARLY_DATA
- isEarlyData = ssl->earlyData != no_early_data;
+ isEarlyData = ssl->options.side == WOLFSSL_CLIENT_END &&
+ ssl->earlyData != no_early_data &&
+ ssl->earlyData != done_early_data;
#endif
if (isEarlyData) {
@@ -24243,24 +24383,13 @@ int ReceiveData(WOLFSSL* ssl, byte* output, int sz, int peek)
}
#ifdef WOLFSSL_EARLY_DATA
- if (ssl->earlyData != no_early_data) {
+ if (ssl->options.side == WOLFSSL_SERVER_END &&
+ ssl->earlyData > early_data_ext && ssl->earlyData < done_early_data) {
}
else
#endif
{
- int negotiate = 0;
-#ifdef HAVE_SECURE_RENEGOTIATION
- if (ssl->secure_renegotiation && ssl->secure_renegotiation->enabled) {
- if (ssl->options.handShakeState != HANDSHAKE_DONE
- && ssl->buffers.clearOutputBuffer.length == 0)
- negotiate = 1;
- }
- else
-#endif
- if (ssl->options.handShakeState != HANDSHAKE_DONE)
- negotiate = 1;
-
- if (negotiate) {
+ if (ssl_in_handshake(ssl, 0)) {
int err;
WOLFSSL_MSG("Handshake not complete, trying to finish");
if ( (err = wolfSSL_negotiate(ssl)) != WOLFSSL_SUCCESS) {
@@ -24547,8 +24676,16 @@ static int SendAlert_ex(WOLFSSL* ssl, int severity, int type)
int RetrySendAlert(WOLFSSL* ssl)
{
- int type = ssl->pendingAlert.code;
- int severity = ssl->pendingAlert.level;
+ int type;
+ int severity;
+ WOLFSSL_ENTER("RetrySendAlert");
+
+ if (ssl == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+ type = ssl->pendingAlert.code;
+ severity = ssl->pendingAlert.level;
if (severity == alert_none)
return 0;
@@ -24562,6 +24699,12 @@ int RetrySendAlert(WOLFSSL* ssl)
/* send alert message */
int SendAlert(WOLFSSL* ssl, int severity, int type)
{
+ WOLFSSL_ENTER("SendAlert");
+
+ if (ssl == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
if (ssl->pendingAlert.level != alert_none) {
int ret = RetrySendAlert(ssl);
if (ret != 0) {
@@ -26106,7 +26249,8 @@ ciphersuites introduced through the "bulk" ciphersuites.
@return true on success, else false.
*/
-int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
+static int ParseCipherList(Suites* suites,
+ const char* list, ProtocolVersion version, int privateKeySz, byte side)
{
int ret = 0;
int idx = 0;
@@ -26135,14 +26279,14 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
#ifndef NO_RSA
haveRSA = 1;
#endif
- InitSuites(suites, ctx->method->version,
+ InitSuites(suites, version,
#ifndef NO_CERTS
- ctx->privateKeySz,
+ privateKeySz,
#else
0,
#endif
haveRSA, 1, 1, !haveRSA, 1, haveRSA, !haveRSA, 1, 1, 0, 0,
- ctx->method->side);
+ side);
return 1; /* wolfSSL default */
}
@@ -26219,9 +26363,6 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
haveSig |= SIG_ANON;
else
haveSig &= ~SIG_ANON;
- #ifdef HAVE_ANON
- ctx->haveAnon = (haveSig & SIG_ANON) == SIG_ANON;
- #endif
haveRSA = 1;
haveDH = 1;
haveECC = 1;
@@ -26244,9 +26385,6 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
if (XSTRCMP(name, "HIGH") == 0 && allowing) {
/* Disable static, anonymous, and null ciphers */
haveSig &= ~SIG_ANON;
- #ifdef HAVE_ANON
- ctx->haveAnon = 0;
- #endif
haveRSA = 1;
haveDH = 1;
haveECC = 1;
@@ -26266,9 +26404,6 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
haveSig |= SIG_ANON;
else
haveSig &= ~SIG_ANON;
- #ifdef HAVE_ANON
- ctx->haveAnon = allowing;
- #endif
if (allowing) {
/* Allow RSA by default. */
if (!haveECC)
@@ -26382,7 +26517,7 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
#ifdef WOLFSSL_DTLS
/* don't allow stream ciphers with DTLS */
- if (ctx->method->version.major == DTLS_MAJOR) {
+ if (version.major == DTLS_MAJOR) {
if (XSTRSTR(name, "RC4"))
{
WOLFSSL_MSG("Stream ciphers not supported with DTLS");
@@ -26499,14 +26634,14 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
if (ret) {
int keySz = 0;
#ifndef NO_CERTS
- keySz = ctx->privateKeySz;
+ keySz = privateKeySz;
#endif
#ifdef OPENSSL_EXTRA
if (callInitSuites) {
suites->setSuites = 0; /* Force InitSuites */
suites->hashSigAlgoSz = 0; /* Force InitSuitesHashSigAlgo call
* inside InitSuites */
- InitSuites(suites, ctx->method->version, keySz, (word16)haveRSA,
+ InitSuites(suites, version, keySz, (word16)haveRSA,
(word16)havePSK, (word16)haveDH,
(word16)((haveSig & SIG_ECDSA) != 0),
(word16)haveECC, (word16)haveStaticRSA,
@@ -26514,7 +26649,7 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
(word16)((haveSig & SIG_FALCON) != 0),
(word16)((haveSig & SIG_DILITHIUM) != 0),
(word16)((haveSig & SIG_ANON) != 0),
- (word16)haveNull, ctx->method->side);
+ (word16)haveNull, side);
/* Restore user ciphers ahead of defaults */
XMEMMOVE(suites->suites + idx, suites->suites,
min(suites->suiteSz, WOLFSSL_MAX_SUITE_SZ-idx));
@@ -26529,7 +26664,7 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
}
#ifdef HAVE_RENEGOTIATION_INDICATION
- if (ctx->method->side == WOLFSSL_CLIENT_END) {
+ if (side == WOLFSSL_CLIENT_END) {
if (suites->suiteSz > WOLFSSL_MAX_SUITE_SZ - 2) {
WOLFSSL_MSG("Too many ciphersuites");
return 0;
@@ -26543,11 +26678,46 @@ int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites, const char* list)
suites->setSuites = 1;
}
- (void)ctx;
+ (void)privateKeySz;
return ret;
}
+int SetCipherList_ex(const WOLFSSL_CTX* ctx, const WOLFSSL* ssl,
+ Suites* suites, const char* list)
+{
+ ProtocolVersion version;
+ int privateKeySz = 0;
+ byte side;
+
+ if (ctx != NULL) {
+ version = ctx->method->version;
+#ifndef NO_CERTS
+ privateKeySz = ctx->privateKeySz;
+#endif
+ side = ctx->method->side;
+ }
+ else if (ssl != NULL) {
+ version = ssl->version;
+#ifndef NO_CERTS
+ privateKeySz = ssl->buffers.keySz;
+#endif
+ side = (byte)ssl->options.side;
+ }
+ else {
+ WOLFSSL_MSG("SetCipherList_ex parameter error");
+ return 0;
+ }
+
+ return ParseCipherList(suites, list, version, privateKeySz, side);
+}
+
+int SetCipherList(const WOLFSSL_CTX* ctx, Suites* suites,
+ const char* list)
+{
+ return SetCipherList_ex(ctx, NULL, suites, list);
+}
+
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_SET_CIPHER_BYTES)
int SetCipherListFromBytes(WOLFSSL_CTX* ctx, Suites* suites, const byte* list,
const int listSz)
@@ -27442,6 +27612,55 @@ int CreateDevPrivateKey(void** pkey, byte* data, word32 length, int hsType,
}
#endif
}
+ else if (hsType == DYNAMIC_TYPE_DILITHIUM) {
+#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
+ dilithium_key* dilithiumKey;
+
+ dilithiumKey = (dilithium_key*)XMALLOC(sizeof(dilithium_key), heap,
+ DYNAMIC_TYPE_DILITHIUM);
+ if (dilithiumKey == NULL) {
+ return MEMORY_E;
+ }
+
+ if (label) {
+ ret = wc_dilithium_init_label(dilithiumKey, (char*)data,
+ heap, devId);
+ }
+ else if (id) {
+ ret = wc_dilithium_init_id(dilithiumKey, data, length, heap, devId);
+ }
+ if (ret == 0) {
+ *pkey = (void*)dilithiumKey;
+ }
+ else {
+ XFREE(dilithiumKey, heap, DYNAMIC_TYPE_DILITHIUM);
+ }
+#endif
+ }
+ else if (hsType == DYNAMIC_TYPE_FALCON) {
+#if defined(HAVE_PQC) && defined(HAVE_FALCON)
+ falcon_key* falconKey;
+
+ falconKey = (falcon_key*)XMALLOC(sizeof(falcon_key), heap,
+ DYNAMIC_TYPE_FALCON);
+ if (falconKey == NULL) {
+ return MEMORY_E;
+ }
+
+ if (label) {
+ ret = wc_falcon_init_label(falconKey, (char*)data, heap, devId);
+ }
+ else if (id) {
+ ret = wc_falcon_init_id(falconKey, data, length, heap, devId);
+ }
+ if (ret == 0) {
+ *pkey = (void*)falconKey;
+ }
+ else {
+ XFREE(falconKey, heap, DYNAMIC_TYPE_FALCON);
+ }
+#endif
+ }
return ret;
}
@@ -27490,6 +27709,10 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
ssl->hsType = DYNAMIC_TYPE_RSA;
else if (ssl->buffers.keyType == ecc_dsa_sa_algo)
ssl->hsType = DYNAMIC_TYPE_ECC;
+ else if (ssl->buffers.keyType == falcon_level5_sa_algo)
+ ssl->hsType = DYNAMIC_TYPE_FALCON;
+ else if (ssl->buffers.keyType == dilithium_level5_sa_algo)
+ ssl->hsType = DYNAMIC_TYPE_DILITHIUM;
ret = AllocKey(ssl, ssl->hsType, &ssl->hsKey);
if (ret != 0) {
goto exit_dpk;
@@ -27547,6 +27770,59 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
ret = NOT_COMPILED_IN;
#endif
}
+ else if (ssl->buffers.keyType == falcon_level5_sa_algo) {
+ #if defined(HAVE_PQC) && defined(HAVE_FALCON)
+ if (ssl->buffers.keyLabel) {
+ ret = wc_falcon_init_label((falcon_key*)ssl->hsKey,
+ (char*)ssl->buffers.key->buffer,
+ ssl->heap, ssl->buffers.keyDevId);
+ }
+ else if (ssl->buffers.keyId) {
+ ret = wc_falcon_init_id((falcon_key*)ssl->hsKey,
+ ssl->buffers.key->buffer,
+ ssl->buffers.key->length, ssl->heap,
+ ssl->buffers.keyDevId);
+ }
+ if (ret == 0) {
+ if (ssl->buffers.keySz < ssl->options.minFalconKeySz) {
+ WOLFSSL_MSG("Falcon key size too small");
+ ERROR_OUT(FALCON_KEY_SIZE_E, exit_dpk);
+ }
+
+ /* Return the maximum signature length. */
+ *length = (word16)wc_falcon_sig_size((falcon_key*)ssl->hsKey);
+ }
+ #else
+ ret = NOT_COMPILED_IN;
+ #endif
+ }
+ else if (ssl->buffers.keyType == dilithium_level5_sa_algo) {
+ #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
+ if (ssl->buffers.keyLabel) {
+ ret = wc_dilithium_init_label((dilithium_key*)ssl->hsKey,
+ (char*)ssl->buffers.key->buffer,
+ ssl->heap, ssl->buffers.keyDevId);
+ }
+ else if (ssl->buffers.keyId) {
+ ret = wc_dilithium_init_id((dilithium_key*)ssl->hsKey,
+ ssl->buffers.key->buffer,
+ ssl->buffers.key->length, ssl->heap,
+ ssl->buffers.keyDevId);
+ }
+ if (ret == 0) {
+ if (ssl->buffers.keySz < ssl->options.minDilithiumKeySz) {
+ WOLFSSL_MSG("Dilithium key size too small");
+ ERROR_OUT(DILITHIUM_KEY_SIZE_E, exit_dpk);
+ }
+
+ /* Return the maximum signature length. */
+ *length = (word16)wc_dilithium_sig_size(
+ (dilithium_key*)ssl->hsKey);
+ }
+ #else
+ ret = NOT_COMPILED_IN;
+ #endif
+ }
goto exit_dpk;
}
#endif /* WOLF_PRIVATE_KEY_ID */
@@ -27776,6 +28052,10 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
#endif /* HAVE_ED448 && HAVE_ED448_KEY_IMPORT */
#if defined(HAVE_PQC)
#if defined(HAVE_FALCON)
+ #if !defined(NO_RSA) || defined(HAVE_ECC)
+ FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey);
+ #endif
+
if (ssl->buffers.keyType == falcon_level1_sa_algo ||
ssl->buffers.keyType == falcon_level5_sa_algo ||
ssl->buffers.keyType == 0) {
@@ -27837,6 +28117,10 @@ int DecodePrivateKey(WOLFSSL *ssl, word16* length)
}
#endif /* HAVE_FALCON */
#if defined(HAVE_DILITHIUM)
+ #if !defined(NO_RSA) || defined(HAVE_ECC)
+ FreeKey(ssl, ssl->hsType, (void**)&ssl->hsKey);
+ #endif
+
if (ssl->buffers.keyType == dilithium_level2_sa_algo ||
ssl->buffers.keyType == dilithium_level3_sa_algo ||
ssl->buffers.keyType == dilithium_level5_sa_algo ||
@@ -27917,6 +28201,119 @@ exit_dpk:
return ret;
}
+#if defined(HAVE_PQC) && defined(WOLFSSL_DUAL_ALG_CERTS)
+/* This is just like the above, but only consider Falcon and Dilthium and
+ * only for the alternative key; not the native key. */
+int DecodeAltPrivateKey(WOLFSSL *ssl, word16* length)
+{
+ int ret = BAD_FUNC_ARG;
+
+ /* make sure alt private key exists */
+ if (ssl->buffers.altKey == NULL || ssl->buffers.altKey->buffer == NULL) {
+ WOLFSSL_MSG("Alternative Private key missing!");
+ ERROR_OUT(NO_PRIVATE_KEY, exit_dapk);
+ }
+
+ if (ssl->buffers.altKeyType == falcon_level1_sa_algo ||
+ ssl->buffers.altKeyType == falcon_level5_sa_algo) {
+
+ ssl->hsAltType = DYNAMIC_TYPE_FALCON;
+ ret = AllocKey(ssl, ssl->hsAltType, &ssl->hsAltKey);
+ if (ret != 0) {
+ goto exit_dapk;
+ }
+
+ if (ssl->buffers.altKeyType == falcon_level1_sa_algo) {
+ ret = wc_falcon_set_level((falcon_key*)ssl->hsAltKey, 1);
+ }
+ else if (ssl->buffers.altKeyType == falcon_level5_sa_algo) {
+ ret = wc_falcon_set_level((falcon_key*)ssl->hsAltKey, 5);
+ }
+ else {
+ ret = ALGO_ID_E;
+ }
+
+ if (ret != 0) {
+ goto exit_dapk;
+ }
+ WOLFSSL_MSG("Trying Falcon private key");
+
+ /* Decode the key assuming it is a Falcon private key. */
+ ret = wc_falcon_import_private_only(ssl->buffers.altKey->buffer,
+ ssl->buffers.altKey->length,
+ (falcon_key*)ssl->hsAltKey);
+ if (ret == 0) {
+ WOLFSSL_MSG("Using Falcon private key");
+
+ /* Check it meets the minimum Falcon key size requirements. */
+ if (FALCON_MAX_KEY_SIZE < ssl->options.minFalconKeySz) {
+ WOLFSSL_MSG("Falcon key size too small");
+ ERROR_OUT(FALCON_KEY_SIZE_E, exit_dapk);
+ }
+
+ *length = wc_falcon_sig_size((falcon_key*)ssl->hsAltKey);
+
+ goto exit_dapk;
+ }
+ }
+ FreeKey(ssl, ssl->hsAltType, (void**)&ssl->hsAltKey);
+
+ if (ssl->buffers.altKeyType == dilithium_level2_sa_algo ||
+ ssl->buffers.altKeyType == dilithium_level3_sa_algo ||
+ ssl->buffers.altKeyType == dilithium_level5_sa_algo) {
+
+ ssl->hsAltType = DYNAMIC_TYPE_DILITHIUM;
+ ret = AllocKey(ssl, ssl->hsAltType, &ssl->hsAltKey);
+ if (ret != 0) {
+ goto exit_dapk;
+ }
+
+ if (ssl->buffers.altKeyType == dilithium_level2_sa_algo) {
+ ret = wc_dilithium_set_level((dilithium_key*)ssl->hsAltKey, 2);
+ }
+ else if (ssl->buffers.altKeyType == dilithium_level3_sa_algo) {
+ ret = wc_dilithium_set_level((dilithium_key*)ssl->hsAltKey, 3);
+ }
+ else if (ssl->buffers.altKeyType == dilithium_level5_sa_algo) {
+ ret = wc_dilithium_set_level((dilithium_key*)ssl->hsAltKey, 5);
+ }
+ else {
+ ret = ALGO_ID_E;
+ }
+
+ if (ret != 0) {
+ goto exit_dapk;
+ }
+
+ WOLFSSL_MSG("Trying Dilithium private key");
+
+ /* Decode the key assuming it is a Dilithium private key. */
+ ret = wc_dilithium_import_private_only(ssl->buffers.altKey->buffer,
+ ssl->buffers.altKey->length,
+ (dilithium_key*)ssl->hsAltKey);
+ if (ret == 0) {
+ WOLFSSL_MSG("Using Dilithium private key");
+
+ /* Check it meets the minimum Dilithium key size requirements. */
+ if (DILITHIUM_MAX_KEY_SIZE < ssl->options.minDilithiumKeySz) {
+ WOLFSSL_MSG("Dilithium key size too small");
+ ERROR_OUT(DILITHIUM_KEY_SIZE_E, exit_dapk);
+ }
+
+ *length = wc_dilithium_sig_size((dilithium_key*)ssl->hsAltKey);
+
+ goto exit_dapk;
+ }
+ }
+
+exit_dapk:
+ if (ret != 0) {
+ WOLFSSL_ERROR_VERBOSE(ret);
+ }
+
+ return ret;
+}
+#endif /* HAVE_PQC && WOLFSSL_DUAL_ALG_CERTS */
#endif /* WOLFSSL_TLS13 || !NO_WOLFSSL_CLIENT */
#if defined(WOLFSSL_TLS13) && !defined(WOLFSSL_NO_TLS12)
@@ -29285,8 +29682,6 @@ typedef struct DskeArgs {
word16 verifySigSz;
#endif
word16 sigSz;
- byte sigAlgo;
- byte hashAlgo;
#if !defined(NO_RSA) && defined(WC_RSA_PSS)
int bits;
#endif
@@ -29605,8 +30000,8 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
XMEMSET(args, 0, sizeof(DskeArgs));
args->idx = *inOutIdx;
args->begin = *inOutIdx;
- args->sigAlgo = ssl->specs.sig_algo;
- args->hashAlgo = sha_mac;
+ ssl->options.peerSigAlgo = ssl->specs.sig_algo;
+ ssl->options.peerHashAlgo = sha_mac;
#ifdef WOLFSSL_ASYNC_CRYPT
ssl->async->freeArgs = FreeDskeArgs;
#endif
@@ -29886,6 +30281,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
if ((curveOid = CheckCurveId(b)) < 0) {
ERROR_OUT(ECC_CURVE_ERROR, exit_dske);
}
+ ssl->ecdhCurveOID = curveOid;
length = input[args->idx++];
if ((args->idx - args->begin) + length > size) {
@@ -30056,43 +30452,43 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
ERROR_OUT(BUFFER_ERROR, exit_dske);
}
- DecodeSigAlg(&input[args->idx], &args->hashAlgo,
+ DecodeSigAlg(&input[args->idx], &ssl->options.peerHashAlgo,
&sigAlgo);
#ifndef NO_RSA
if (sigAlgo == rsa_pss_sa_algo &&
- args->sigAlgo == rsa_sa_algo) {
- args->sigAlgo = sigAlgo;
+ ssl->options.peerSigAlgo == rsa_sa_algo) {
+ ssl->options.peerSigAlgo = sigAlgo;
}
else
#endif
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
if (sigAlgo == sm2_sa_algo &&
- args->sigAlgo == ecc_dsa_sa_algo) {
- args->sigAlgo = sigAlgo;
+ ssl->options.peerSigAlgo == ecc_dsa_sa_algo) {
+ ssl->options.peerSigAlgo = sigAlgo;
}
else
#endif
#ifdef HAVE_ED25519
if (sigAlgo == ed25519_sa_algo &&
- args->sigAlgo == ecc_dsa_sa_algo) {
- args->sigAlgo = sigAlgo;
+ ssl->options.peerSigAlgo == ecc_dsa_sa_algo) {
+ ssl->options.peerSigAlgo = sigAlgo;
}
else
#endif
#ifdef HAVE_ED448
if (sigAlgo == ed448_sa_algo &&
- args->sigAlgo == ecc_dsa_sa_algo) {
- args->sigAlgo = sigAlgo;
+ ssl->options.peerSigAlgo == ecc_dsa_sa_algo) {
+ ssl->options.peerSigAlgo = sigAlgo;
}
else
#endif
/* Signature algorithm from message must match signature
* algorithm in cipher suite. */
- if (sigAlgo != args->sigAlgo) {
+ if (sigAlgo != ssl->options.peerSigAlgo) {
ERROR_OUT(ALGO_ID_E, exit_dske);
}
args->idx += 2;
- hashType = HashAlgoToType(args->hashAlgo);
+ hashType = HashAlgoToType(ssl->options.peerHashAlgo);
if (hashType == WC_HASH_TYPE_NONE) {
ERROR_OUT(ALGO_ID_E, exit_dske);
}
@@ -30100,7 +30496,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
/* only using sha and md5 for rsa */
#ifndef NO_OLD_TLS
hashType = WC_HASH_TYPE_SHA;
- if (args->sigAlgo == rsa_sa_algo) {
+ if (ssl->options.peerSigAlgo == rsa_sa_algo) {
hashType = WC_HASH_TYPE_MD5_SHA;
}
#else
@@ -30121,12 +30517,12 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
}
ret = HashSkeData(ssl, hashType, input + args->begin,
- verifySz, args->sigAlgo);
+ verifySz, ssl->options.peerSigAlgo);
if (ret != 0) {
goto exit_dske;
}
- switch (args->sigAlgo)
+ switch (ssl->options.peerSigAlgo)
{
#ifndef NO_RSA
#ifdef WC_RSA_PSS
@@ -30174,7 +30570,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
default:
ret = ALGO_ID_E;
- } /* switch (args->sigAlgo) */
+ } /* switch (ssl->options.peerSigAlgo) */
#endif /* NO_DH && !HAVE_ECC && !HAVE_ED25519 && !HAVE_ED448 */
break;
@@ -30226,7 +30622,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
args->verifySigSz);
}
- switch (args->sigAlgo)
+ switch (ssl->options.peerSigAlgo)
{
#ifndef NO_RSA
#ifdef WC_RSA_PSS
@@ -30237,7 +30633,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
ret = RsaVerify(ssl,
args->verifySig, args->verifySigSz,
&args->output,
- args->sigAlgo, args->hashAlgo,
+ ssl->options.peerSigAlgo, ssl->options.peerHashAlgo,
ssl->peerRsaKey,
#ifdef HAVE_PK_CALLBACKS
&ssl->buffers.peerRsaKey
@@ -30275,7 +30671,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
#ifdef HAVE_PK_CALLBACKS
if (ssl->ctx && ssl->ctx->ProcessServerSigKexCb) {
ret = ssl->ctx->ProcessServerSigKexCb(ssl,
- args->sigAlgo,
+ ssl->options.peerSigAlgo,
args->verifySig, args->verifySigSz,
ssl->buffers.sig.buffer, SEED_LEN,
&ssl->buffers.sig.buffer[SEED_LEN],
@@ -30284,7 +30680,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
#endif /* HAVE_PK_CALLBACKS */
if (ret == NOT_COMPILED_IN) {
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- if (args->sigAlgo == sm2_sa_algo) {
+ if (ssl->options.peerSigAlgo == sm2_sa_algo) {
ret = Sm2wSm3Verify(ssl,
TLS12_SM2_SIG_ID, TLS12_SM2_SIG_ID_SZ,
args->verifySig, args->verifySigSz,
@@ -30437,7 +30833,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
/* increment index after verify is done */
args->idx += args->verifySigSz;
- switch(args->sigAlgo)
+ switch(ssl->options.peerSigAlgo)
{
#ifndef NO_RSA
#ifdef WC_RSA_PSS
@@ -30447,13 +30843,13 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
ssl->buffers.digest.buffer,
ssl->buffers.digest.length,
args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo));
+ HashAlgoToType(ssl->options.peerHashAlgo));
#else
ret = wc_RsaPSS_CheckPadding_ex(
ssl->buffers.digest.buffer,
ssl->buffers.digest.length,
args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo),
+ HashAlgoToType(ssl->options.peerHashAlgo),
-1, args->bits);
#endif
if (ret != 0)
@@ -30493,7 +30889,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
encSigSz = wc_EncodeSignature(encodedSig,
ssl->buffers.digest.buffer,
ssl->buffers.digest.length,
- TypeHash(args->hashAlgo));
+ TypeHash(ssl->options.peerHashAlgo));
if (encSigSz != args->sigSz || !args->output ||
XMEMCMP(args->output, encodedSig,
min(encSigSz, MAX_ENCODED_SIG_SZ)) != 0) {
@@ -31068,23 +31464,13 @@ int SendClientKeyExchange(WOLFSSL* ssl)
case psk_kea:
{
byte* pms = ssl->arrays->preMasterSecret;
- int cbret = (int)ssl->options.client_psk_cb(ssl,
+ ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl,
ssl->arrays->server_hint, ssl->arrays->client_identity,
MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
-
- if (cbret == 0 || cbret > MAX_PSK_KEY_LEN) {
- if (cbret != USE_HW_PSK) {
- ERROR_OUT(PSK_KEY_ERROR, exit_scke);
- }
- }
-
- if (cbret == USE_HW_PSK) {
- /* USE_HW_PSK indicates that the hardware has the PSK
- * and generates the premaster secret. */
- ssl->arrays->psk_keySz = 0;
- }
- else {
- ssl->arrays->psk_keySz = (word32)cbret;
+ if (ssl->arrays->psk_keySz == 0 ||
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
+ ERROR_OUT(PSK_KEY_ERROR, exit_scke);
}
/* Ensure the buffer is null-terminated. */
@@ -31096,7 +31482,7 @@ int SendClientKeyExchange(WOLFSSL* ssl)
XMEMCPY(args->encSecret, ssl->arrays->client_identity,
args->encSz);
ssl->options.peerAuthGood = 1;
- if (cbret != USE_HW_PSK) {
+ if ((int)ssl->arrays->psk_keySz > 0) {
/* CLIENT: Pre-shared Key for peer authentication. */
/* make psk pre master secret */
@@ -31112,8 +31498,8 @@ int SendClientKeyExchange(WOLFSSL* ssl)
ssl->arrays->preMasterSz = (ssl->arrays->psk_keySz * 2)
+ (2 * OPAQUE16_LEN);
ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->psk_keySz = 0; /* No further need */
}
+ ssl->arrays->psk_keySz = 0; /* No further need */
break;
}
#endif /* !NO_PSK */
@@ -31124,12 +31510,14 @@ int SendClientKeyExchange(WOLFSSL* ssl)
args->output = args->encSecret;
ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl,
- ssl->arrays->server_hint, ssl->arrays->client_identity,
- MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
+ ssl->arrays->server_hint, ssl->arrays->client_identity,
+ MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
ERROR_OUT(PSK_KEY_ERROR, exit_scke);
}
+
ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0'; /* null term */
esSz = (word32)XSTRLEN(ssl->arrays->client_identity);
@@ -31205,12 +31593,14 @@ int SendClientKeyExchange(WOLFSSL* ssl)
/* Send PSK client identity */
ssl->arrays->psk_keySz = ssl->options.client_psk_cb(ssl,
- ssl->arrays->server_hint, ssl->arrays->client_identity,
- MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
+ ssl->arrays->server_hint, ssl->arrays->client_identity,
+ MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
ERROR_OUT(PSK_KEY_ERROR, exit_scke);
}
+
ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0'; /* null term */
esSz = (word32)XSTRLEN(ssl->arrays->client_identity);
if (esSz > MAX_PSK_ID_LEN) {
@@ -31230,7 +31620,7 @@ int SendClientKeyExchange(WOLFSSL* ssl)
args->length = MAX_ENCRYPT_SZ;
/* Create shared ECC key leaving room at the beginning
- of buffer for size of shared key. */
+ * of buffer for size of shared key. */
ssl->arrays->preMasterSz = ENCRYPT_LEN - OPAQUE16_LEN;
#ifdef HAVE_CURVE25519
@@ -31621,13 +32011,15 @@ int SendClientKeyExchange(WOLFSSL* ssl)
pms += ssl->arrays->preMasterSz;
/* make psk pre master secret */
- /* length of key + length 0s + length of key + key */
- c16toa((word16)ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz +=
- ssl->arrays->psk_keySz + OPAQUE16_LEN;
- ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ if ((int)ssl->arrays->psk_keySz > 0) {
+ /* length of key + length 0s + length of key + key */
+ c16toa((word16)ssl->arrays->psk_keySz, pms);
+ pms += OPAQUE16_LEN;
+ XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ ssl->arrays->preMasterSz +=
+ ssl->arrays->psk_keySz + OPAQUE16_LEN;
+ ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ }
ssl->arrays->psk_keySz = 0; /* No further need */
break;
}
@@ -31648,18 +32040,19 @@ int SendClientKeyExchange(WOLFSSL* ssl)
args->encSz += args->length + OPAQUE8_LEN;
/* Create pre master secret is the concatenation of
- eccSize + eccSharedKey + pskSize + pskKey */
+ * eccSize + eccSharedKey + pskSize + pskKey */
c16toa((word16)ssl->arrays->preMasterSz, pms);
ssl->arrays->preMasterSz += OPAQUE16_LEN;
pms += ssl->arrays->preMasterSz;
- c16toa((word16)ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz +=
- ssl->arrays->psk_keySz + OPAQUE16_LEN;
+ if ((int)ssl->arrays->psk_keySz > 0) {
+ c16toa((word16)ssl->arrays->psk_keySz, pms);
+ pms += OPAQUE16_LEN;
+ XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ ssl->arrays->preMasterSz += ssl->arrays->psk_keySz + OPAQUE16_LEN;
- ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ }
ssl->arrays->psk_keySz = 0; /* No further need */
break;
}
@@ -32683,6 +33076,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
case PSK_KEY_ERROR:
case INVALID_PARAMETER:
case HRR_COOKIE_ERROR:
+ case BAD_BINDER:
return illegal_parameter;
case INCOMPLETE_DATA:
return missing_extension;
@@ -34935,7 +35329,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#ifndef NO_SHA
wc_ShaUpdate(&ssl->hsHashes->hashSha, input + idx, sz);
#endif
-#endif
+#endif /* !NO_OLD_TLS */
#ifndef NO_SHA256
if (IsAtLeastTLSv1_2(ssl)) {
int shaRet = wc_Sha256Update(&ssl->hsHashes->hashSha256,
@@ -35003,7 +35397,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig,
- ssl->options.haveDilithiumSig, ssl->options.haveAnon,
+ ssl->options.haveDilithiumSig, ssl->options.useAnon,
TRUE, ssl->options.side);
}
@@ -35394,7 +35788,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig,
- ssl->options.haveDilithiumSig, ssl->options.haveAnon,
+ ssl->options.haveDilithiumSig, ssl->options.useAnon,
TRUE, ssl->options.side);
}
@@ -35472,7 +35866,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig,
- ssl->options.haveDilithiumSig, ssl->options.haveAnon,
+ ssl->options.haveDilithiumSig, ssl->options.useAnon,
TRUE, ssl->options.side);
}
}
@@ -35827,7 +36221,13 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif
#ifdef OPENSSL_EXTRA
- ssl->clSuites = clSuites;
+ ssl->clSuites = clSuites; /* cppcheck-suppress autoVariables
+ *
+ * (suppress warning that ssl, a persistent
+ * non-local allocation, has its ->clSuites
+ * set to clSuites, a local stack allocation.
+ * we clear this assignment before returning.)
+ */
/* Give user last chance to provide a cert for cipher selection */
if (ret == 0 && ssl->ctx->certSetupCb != NULL)
ret = CertSetupCbWrapper(ssl);
@@ -35879,8 +36279,6 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
word32 sigSz;
word32 idx;
word32 begin;
- byte hashAlgo;
- byte sigAlgo;
} DcvArgs;
static void FreeDcvArgs(WOLFSSL* ssl, void* pArgs)
@@ -35929,8 +36327,8 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ret = 0;
ssl->options.asyncState = TLS_ASYNC_BEGIN;
XMEMSET(args, 0, sizeof(DcvArgs));
- args->hashAlgo = sha_mac;
- args->sigAlgo = anonymous_sa_algo;
+ ssl->options.peerHashAlgo = sha_mac;
+ ssl->options.peerSigAlgo = anonymous_sa_algo;
args->idx = *inOutIdx;
args->begin = *inOutIdx;
#ifdef WOLFSSL_ASYNC_CRYPT
@@ -35961,34 +36359,34 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
ERROR_OUT(BUFFER_ERROR, exit_dcv);
}
- DecodeSigAlg(&input[args->idx], &args->hashAlgo,
- &args->sigAlgo);
+ DecodeSigAlg(&input[args->idx], &ssl->options.peerHashAlgo,
+ &ssl->options.peerSigAlgo);
args->idx += 2;
}
#ifndef NO_RSA
else if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0)
- args->sigAlgo = rsa_sa_algo;
+ ssl->options.peerSigAlgo = rsa_sa_algo;
#endif
#ifdef HAVE_ECC
else if (ssl->peerEccDsaKeyPresent) {
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
if (ssl->peerEccDsaKey->dp->id == ECC_SM2P256V1) {
- args->sigAlgo = sm2_sa_algo;
+ ssl->options.peerSigAlgo = sm2_sa_algo;
}
else
#endif
{
- args->sigAlgo = ecc_dsa_sa_algo;
+ ssl->options.peerSigAlgo = ecc_dsa_sa_algo;
}
}
#endif
#if defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)
else if (ssl->peerEd25519KeyPresent)
- args->sigAlgo = ed25519_sa_algo;
+ ssl->options.peerSigAlgo = ed25519_sa_algo;
#endif /* HAVE_ED25519 && !NO_ED25519_CLIENT_AUTH */
#if defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)
else if (ssl->peerEd448KeyPresent)
- args->sigAlgo = ed448_sa_algo;
+ ssl->options.peerSigAlgo = ed448_sa_algo;
#endif /* HAVE_ED448 && !NO_ED448_CLIENT_AUTH */
if ((args->idx - args->begin) + OPAQUE16_LEN > size) {
@@ -36024,15 +36422,15 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif
if (IsAtLeastTLSv1_2(ssl)) {
- if (args->sigAlgo != ecc_dsa_sa_algo
+ if (ssl->options.peerSigAlgo != ecc_dsa_sa_algo
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- && args->sigAlgo != sm2_sa_algo
+ && ssl->options.peerSigAlgo != sm2_sa_algo
#endif
) {
WOLFSSL_MSG("Oops, peer sent ECC key but not in verify");
}
- SetDigest(ssl, args->hashAlgo);
+ SetDigest(ssl, ssl->options.peerHashAlgo);
}
}
#endif /* HAVE_ECC */
@@ -36040,7 +36438,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ssl->peerEd25519KeyPresent) {
WOLFSSL_MSG("Doing ED25519 peer cert verify");
if (IsAtLeastTLSv1_2(ssl) &&
- args->sigAlgo != ed25519_sa_algo) {
+ ssl->options.peerSigAlgo != ed25519_sa_algo) {
WOLFSSL_MSG(
"Oops, peer sent ED25519 key but not in verify");
}
@@ -36050,7 +36448,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ssl->peerEd448KeyPresent) {
WOLFSSL_MSG("Doing ED448 peer cert verify");
if (IsAtLeastTLSv1_2(ssl) &&
- args->sigAlgo != ed448_sa_algo) {
+ ssl->options.peerSigAlgo != ed448_sa_algo) {
WOLFSSL_MSG(
"Oops, peer sent ED448 key but not in verify");
}
@@ -36072,7 +36470,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
input + args->idx,
args->sz,
&args->output,
- args->sigAlgo, args->hashAlgo,
+ ssl->options.peerSigAlgo, ssl->options.peerHashAlgo,
ssl->peerRsaKey,
#ifdef HAVE_PK_CALLBACKS
&ssl->buffers.peerRsaKey
@@ -36081,7 +36479,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#endif
);
if (ret >= 0) {
- if (args->sigAlgo == rsa_sa_algo)
+ if (ssl->options.peerSigAlgo == rsa_sa_algo)
args->sendSz = ret;
else {
args->sigSz = ret;
@@ -36096,7 +36494,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
WOLFSSL_MSG("Doing ECC peer cert verify");
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- if (args->sigAlgo == sm2_sa_algo) {
+ if (ssl->options.peerSigAlgo == sm2_sa_algo) {
ret = Sm2wSm3Verify(ssl,
TLS12_SM2_SIG_ID, TLS12_SM2_SIG_ID_SZ,
input + args->idx, args->sz,
@@ -36191,21 +36589,21 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0) {
if (IsAtLeastTLSv1_2(ssl)) {
#ifdef WC_RSA_PSS
- if (args->sigAlgo == rsa_pss_sa_algo) {
- SetDigest(ssl, args->hashAlgo);
+ if (ssl->options.peerSigAlgo == rsa_pss_sa_algo) {
+ SetDigest(ssl, ssl->options.peerHashAlgo);
#ifdef HAVE_SELFTEST
ret = wc_RsaPSS_CheckPadding(
ssl->buffers.digest.buffer,
ssl->buffers.digest.length,
args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo));
+ HashAlgoToType(ssl->options.peerHashAlgo));
#else
ret = wc_RsaPSS_CheckPadding_ex(
ssl->buffers.digest.buffer,
ssl->buffers.digest.length,
args->output, args->sigSz,
- HashAlgoToType(args->hashAlgo), -1,
+ HashAlgoToType(ssl->options.peerHashAlgo), -1,
mp_count_bits(&ssl->peerRsaKey->n));
#endif
if (ret != 0) {
@@ -36226,17 +36624,17 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
}
#endif
- if (args->sigAlgo != rsa_sa_algo) {
+ if (ssl->options.peerSigAlgo != rsa_sa_algo) {
WOLFSSL_MSG("Oops, peer sent RSA key but not "
"in verify");
}
- SetDigest(ssl, args->hashAlgo);
+ SetDigest(ssl, ssl->options.peerHashAlgo);
args->sigSz = wc_EncodeSignature(encodedSig,
ssl->buffers.digest.buffer,
ssl->buffers.digest.length,
- TypeHash(args->hashAlgo));
+ TypeHash(ssl->options.peerHashAlgo));
if (args->sendSz != args->sigSz || !args->output ||
XMEMCMP(args->output, encodedSig,
@@ -38290,31 +38688,35 @@ static int DefTicketEncCb(WOLFSSL* ssl, byte key_name[WOLFSSL_TICKET_NAME_SZ],
MAX_PSK_KEY_LEN);
if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- #if defined(WOLFSSL_EXTRA_ALERTS) || \
- defined(WOLFSSL_PSK_IDENTITY_ALERT)
- SendAlert(ssl, alert_fatal,
- unknown_psk_identity);
- #endif
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
+ #if defined(WOLFSSL_EXTRA_ALERTS) || \
+ defined(WOLFSSL_PSK_IDENTITY_ALERT)
+ SendAlert(ssl, alert_fatal,
+ unknown_psk_identity);
+ #endif
ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
}
/* SERVER: Pre-shared Key for peer authentication. */
ssl->options.peerAuthGood = 1;
/* make psk pre master secret */
- /* length of key + length 0s + length of key + key */
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
+ if ((int)ssl->arrays->psk_keySz > 0) {
+ /* length of key + length 0s + length of key + key */
+ c16toa((word16) ssl->arrays->psk_keySz, pms);
+ pms += OPAQUE16_LEN;
- XMEMSET(pms, 0, ssl->arrays->psk_keySz);
- pms += ssl->arrays->psk_keySz;
+ XMEMSET(pms, 0, ssl->arrays->psk_keySz);
+ pms += ssl->arrays->psk_keySz;
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
+ c16toa((word16) ssl->arrays->psk_keySz, pms);
+ pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz =
- (ssl->arrays->psk_keySz * 2) + (OPAQUE16_LEN * 2);
+ XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ ssl->arrays->preMasterSz = (ssl->arrays->psk_keySz * 2) +
+ (OPAQUE16_LEN * 2);
+ }
+ ssl->arrays->psk_keySz = 0; /* no further need */
break;
}
#endif /* !NO_PSK */
@@ -39129,24 +39531,27 @@ static int DefTicketEncCb(WOLFSSL* ssl, byte key_name[WOLFSSL_TICKET_NAME_SZ],
MAX_PSK_KEY_LEN);
if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- #if defined(WOLFSSL_EXTRA_ALERTS) || \
- defined(WOLFSSL_PSK_IDENTITY_ALERT)
- SendAlert(ssl, alert_fatal,
- unknown_psk_identity);
- #endif
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
+ #if defined(WOLFSSL_EXTRA_ALERTS) || \
+ defined(WOLFSSL_PSK_IDENTITY_ALERT)
+ SendAlert(ssl, alert_fatal,
+ unknown_psk_identity);
+ #endif
ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
}
/* SERVER: Pre-shared Key for peer authentication. */
ssl->options.peerAuthGood = 1;
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
+ if ((int)ssl->arrays->psk_keySz > 0) {
+ c16toa((word16) ssl->arrays->psk_keySz, pms);
+ pms += OPAQUE16_LEN;
- XMEMCPY(pms, ssl->arrays->psk_key,
- ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz += ssl->arrays->psk_keySz +
- OPAQUE16_LEN;
+ XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ ssl->arrays->preMasterSz += ssl->arrays->psk_keySz + OPAQUE16_LEN;
+ ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ }
+ ssl->arrays->psk_keySz = 0; /* no further need */
break;
}
#endif /* !NO_DH && !NO_PSK */
@@ -39172,18 +39577,21 @@ static int DefTicketEncCb(WOLFSSL* ssl, byte key_name[WOLFSSL_TICKET_NAME_SZ],
MAX_PSK_KEY_LEN);
if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
ERROR_OUT(PSK_KEY_ERROR, exit_dcke);
}
/* SERVER: Pre-shared Key for peer authentication. */
ssl->options.peerAuthGood = 1;
+ if ((int)ssl->arrays->psk_keySz > 0) {
+ c16toa((word16) ssl->arrays->psk_keySz, pms);
+ pms += OPAQUE16_LEN;
- c16toa((word16) ssl->arrays->psk_keySz, pms);
- pms += OPAQUE16_LEN;
-
- XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
- ssl->arrays->preMasterSz +=
- ssl->arrays->psk_keySz + OPAQUE16_LEN;
+ XMEMCPY(pms, ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ ssl->arrays->preMasterSz += ssl->arrays->psk_keySz + OPAQUE16_LEN;
+ ForceZero(ssl->arrays->psk_key, ssl->arrays->psk_keySz);
+ }
+ ssl->arrays->psk_keySz = 0; /* no further need */
break;
}
#endif /* (HAVE_ECC || CURVE25519 || CURVE448) && !NO_PSK */
diff --git a/extra/wolfssl/wolfssl/src/pk.c b/extra/wolfssl/wolfssl/src/pk.c
index f3d1483b..d7d32dd5 100644
--- a/extra/wolfssl/wolfssl/src/pk.c
+++ b/extra/wolfssl/wolfssl/src/pk.c
@@ -50,8 +50,7 @@
#endif
#if defined(OPENSSL_EXTRA) && !defined(NO_BIO) && defined(WOLFSSL_KEY_GEN) && \
- (!defined(HAVE_USER_RSA) || defined(HAVE_ECC) || \
- (!defined(NO_DSA) && !defined(HAVE_SELFTEST)))
+ (defined(HAVE_ECC) || (!defined(NO_DSA) && !defined(HAVE_SELFTEST)))
/* Forward declaration for wolfSSL_PEM_write_bio_DSA_PUBKEY.
* Implementation in ssl.c.
*/
@@ -220,8 +219,8 @@ static int pem_read_file_key(XFILE fp, wc_pem_password_cb* cb, void* pass,
#endif /* !NO_FILESYSTEM */
#endif
-#if defined(OPENSSL_EXTRA) && ((!defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) \
- && !defined(HAVE_USER_RSA)) || !defined(WOLFCRYPT_ONLY))
+#if defined(OPENSSL_EXTRA) && ((!defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)) \
+ || !defined(WOLFCRYPT_ONLY))
/* Convert DER data to PEM in an allocated buffer.
*
* @param [in] der Buffer containing DER data.
@@ -298,8 +297,7 @@ static int der_write_to_bio_as_pem(const unsigned char* der, int derSz,
#endif
#endif
-#if (!defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_USER_RSA)) || \
+#if (!defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)) || \
(!defined(NO_DH) && defined(WOLFSSL_DH_EXTRA)) || \
(defined(HAVE_ECC) && defined(WOLFSSL_KEY_GEN))
#if !defined(NO_FILESYSTEM)
@@ -337,7 +335,7 @@ static int der_write_to_file_as_pem(const unsigned char* der, int derSz,
#if defined(WOLFSSL_KEY_GEN) && \
(defined(WOLFSSL_PEM_TO_DER) || defined(WOLFSSL_DER_TO_PEM)) && \
- ((!defined(NO_RSA) && !defined(HAVE_USER_RSA)) || defined(HAVE_ECC))
+ (!defined(NO_RSA) || defined(HAVE_ECC))
static int der_to_enc_pem_alloc(unsigned char* der, int derSz,
const EVP_CIPHER *cipher, unsigned char *passwd, int passwdSz, int type,
void* heap, byte** out, int* outSz)
@@ -532,8 +530,7 @@ static int pk_bn_field_print_fp(XFILE fp, int indent, const char* field,
#endif /* !NO_CERTS && XFPRINTF && !NO_FILESYSTEM && !NO_STDIO_FILESYSTEM &&
* (!NO_DSA || !NO_RSA || HAVE_ECC) */
-#if defined(XSNPRINTF) && !defined(NO_BIO) && !defined(NO_RSA) && \
- !defined(HAVE_FAST_RSA)
+#if defined(XSNPRINTF) && !defined(NO_BIO) && !defined(NO_RSA)
/* snprintf() must be available */
/* Maximum number of extra indent spaces on each line. */
@@ -737,7 +734,7 @@ static int wolfssl_print_number(WOLFSSL_BIO* bio, mp_int* num, const char* name,
return ret;
}
-#endif /* XSNPRINTF && !NO_BIO && !NO_RSA && !HAVE_FAST_RSA */
+#endif /* XSNPRINTF && !NO_BIO && !NO_RSA */
#if !defined(NO_RSA) || (!defined(NO_DH) && !defined(NO_CERTS) && \
defined(HAVE_FIPS) && !FIPS_VERSION_GT(2,0)) || defined(HAVE_ECC)
@@ -922,8 +919,7 @@ void wolfSSL_RSA_free(WOLFSSL_RSA* rsa)
#endif
if (rsa->internal != NULL) {
- #if !defined(HAVE_FIPS) && !defined(HAVE_USER_RSA) && \
- !defined(HAVE_FAST_RSA) && defined(WC_RSA_BLINDING)
+ #if !defined(HAVE_FIPS) && defined(WC_RSA_BLINDING)
/* Check if RNG is owned before freeing it. */
if (rsa->ownRng) {
WC_RNG* rng = ((RsaKey*)(rsa->internal))->rng;
@@ -1022,8 +1018,7 @@ WOLFSSL_RSA* wolfSSL_RSA_new_ex(void* heap, int devId)
rsaKeyInited = 1;
}
}
- #if !defined(HAVE_FIPS) && !defined(HAVE_USER_RSA) && \
- !defined(HAVE_FAST_RSA) && defined(WC_RSA_BLINDING)
+ #if !defined(HAVE_FIPS) && defined(WC_RSA_BLINDING)
if (!err) {
WC_RNG* rng;
@@ -1052,8 +1047,7 @@ WOLFSSL_RSA* wolfSSL_RSA_new_ex(void* heap, int devId)
/* Won't fail as key and rng are not NULL. */
}
}
- #endif /* !HAVE_FIPS && !HAVE_USER_RSA && !HAVE_FAST_RSA &&
- * WC_RSA_BLINDING */
+ #endif /* !HAVE_FIPS && WC_RSA_BLINDING */
if (!err) {
/* Set wolfCrypt RSA key into RSA key. */
rsa->internal = key;
@@ -1105,7 +1099,7 @@ int wolfSSL_RSA_up_ref(WOLFSSL_RSA* rsa)
#ifdef OPENSSL_EXTRA
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN)
/* Allocate a new RSA key and make it a copy.
*
@@ -1161,12 +1155,10 @@ WOLFSSL_RSA* wolfSSL_RSAPublicKey_dup(WOLFSSL_RSA *rsa)
/* wolfSSL_RSAPrivateKey_dup not supported */
-#endif /* WOLFSSL_KEY_GEN && !HAVE_USER_RSA */
+#endif /* WOLFSSL_KEY_GEN */
-#ifndef HAVE_USER_RSA
static int wolfSSL_RSA_To_Der_ex(WOLFSSL_RSA* rsa, byte** outBuf, int publicKey,
void* heap);
-#endif
/*
* RSA to/from bin APIs
@@ -1270,8 +1262,6 @@ WOLFSSL_RSA *wolfSSL_d2i_RSAPrivateKey(WOLFSSL_RSA **out,
return rsa;
}
-#if defined(OPENSSL_EXTRA) && !defined(HAVE_USER_RSA) && \
- !defined(HAVE_FAST_RSA)
/* Converts an internal RSA structure to DER format for the private key.
*
* If "pp" is null then buffer size only is returned.
@@ -1345,8 +1335,6 @@ int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, unsigned char **pp)
return ret;
}
-#endif /* defined(OPENSSL_EXTRA) && !defined(HAVE_USER_RSA) &&
- * !defined(HAVE_FAST_RSA) */
#endif /* OPENSSL_EXTRA */
@@ -1359,8 +1347,7 @@ int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, unsigned char **pp)
#if defined(OPENSSL_ALL) || defined(WOLFSSL_ASIO) || defined(WOLFSSL_HAPROXY) \
|| defined(WOLFSSL_NGINX) || defined(WOLFSSL_QT)
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA) && \
- !defined(HAVE_FAST_RSA) && !defined(NO_BIO)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_BIO)
/* Read DER data from a BIO.
*
@@ -1464,8 +1451,7 @@ WOLFSSL_RSA* wolfSSL_d2i_RSAPrivateKey_bio(WOLFSSL_BIO *bio, WOLFSSL_RSA **out)
XFREE(der, bio ? bio->heap : NULL, DYNAMIC_TYPE_TMP_BUFFER);
return key;
}
-#endif /* defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA) &&
- * !defined(HAVE_FAST_RSA) && !NO_BIO */
+#endif /* defined(WOLFSSL_KEY_GEN) && !NO_BIO */
#endif /* OPENSSL_ALL || WOLFSSL_ASIO || WOLFSSL_HAPROXY || WOLFSSL_QT */
@@ -1475,7 +1461,6 @@ WOLFSSL_RSA* wolfSSL_d2i_RSAPrivateKey_bio(WOLFSSL_BIO *bio, WOLFSSL_RSA **out)
#ifdef OPENSSL_EXTRA
-#ifndef HAVE_USER_RSA
/* Create a DER encoding of key.
*
* Not OpenSSL API.
@@ -1612,7 +1597,6 @@ static int wolfSSL_RSA_To_Der_ex(WOLFSSL_RSA* rsa, byte** outBuf, int publicKey,
WOLFSSL_LEAVE("wolfSSL_RSA_To_Der", ret);
return ret;
}
-#endif /* !HAVE_USER_RSA */
#endif /* OPENSSL_EXTRA */
@@ -1772,7 +1756,7 @@ static WOLFSSL_RSA* wolfssl_rsa_d2i(WOLFSSL_RSA** rsa, const unsigned char* in,
#ifdef OPENSSL_EXTRA
#ifndef NO_BIO
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN)
/* Writes PEM encoding of an RSA public key to a BIO.
*
* @param [in] bio BIO object to write to.
@@ -1812,10 +1796,10 @@ int wolfSSL_PEM_write_bio_RSA_PUBKEY(WOLFSSL_BIO* bio, WOLFSSL_RSA* rsa)
return ret;
}
-#endif /* WOLFSSL_KEY_GEN && !HAVE_USER_RSA */
+#endif /* WOLFSSL_KEY_GEN */
#endif /* !NO_BIO */
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN)
#ifndef NO_FILESYSTEM
/* Writes PEM encoding of an RSA public key to a file pointer.
@@ -1886,7 +1870,7 @@ int wolfSSL_PEM_write_RSAPublicKey(XFILE fp, WOLFSSL_RSA* rsa)
return wolfssl_pem_write_rsa_public_key(fp, rsa, RSA_PUBLICKEY_TYPE);
}
#endif /* !NO_FILESYSTEM */
-#endif /* WOLFSSL_KEY_GEN && !HAVE_USER_RSA */
+#endif /* WOLFSSL_KEY_GEN */
#ifndef NO_BIO
/* Create an RSA public key by reading the PEM encoded data from the BIO.
@@ -1983,7 +1967,7 @@ WOLFSSL_RSA* wolfSSL_PEM_read_RSAPublicKey(XFILE fp, WOLFSSL_RSA** rsa,
#endif /* NO_FILESYSTEM */
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA) && \
+#if defined(WOLFSSL_KEY_GEN) && \
(defined(WOLFSSL_PEM_TO_DER) || defined(WOLFSSL_DER_TO_PEM))
/* Writes PEM encoding of an RSA private key to newly allocated buffer.
@@ -2142,7 +2126,7 @@ int wolfSSL_PEM_write_RSAPrivateKey(XFILE fp, WOLFSSL_RSA *rsa,
return ret;
}
#endif /* NO_FILESYSTEM */
-#endif /* WOLFSSL_KEY_GEN && !HAVE_USER_RSA && WOLFSSL_PEM_TO_DER */
+#endif /* WOLFSSL_KEY_GEN && WOLFSSL_PEM_TO_DER */
#ifndef NO_BIO
/* Create an RSA private key by reading the PEM encoded data from the BIO.
@@ -2290,7 +2274,7 @@ int wolfSSL_RSA_print_fp(XFILE fp, WOLFSSL_RSA* rsa, int indent)
}
#endif /* XFPRINTF && !NO_FILESYSTEM && !NO_STDIO_FILESYSTEM */
-#if defined(XSNPRINTF) && !defined(NO_BIO) && !defined(HAVE_FAST_RSA)
+#if defined(XSNPRINTF) && !defined(NO_BIO)
/* snprintf() must be available */
/* Maximum size of a header line. */
@@ -2398,7 +2382,7 @@ int wolfSSL_RSA_print(WOLFSSL_BIO* bio, WOLFSSL_RSA* rsa, int indent)
return ret;
}
-#endif /* XSNPRINTF && !NO_BIO && !HAVE_FAST_RSA */
+#endif /* XSNPRINTF && !NO_BIO */
#endif /* OPENSSL_EXTRA */
@@ -2407,7 +2391,6 @@ int wolfSSL_RSA_print(WOLFSSL_BIO* bio, WOLFSSL_RSA* rsa, int indent)
*/
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
-#if !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA)
/* Set RSA key data (external) from wolfCrypt RSA key (internal).
*
* @param [in, out] rsa RSA key.
@@ -2500,12 +2483,10 @@ int SetRsaExternal(WOLFSSL_RSA* rsa)
return ret;
}
-#endif /* !HAVE_USER_RSA && !HAVE_FAST_RSA */
#endif /* (OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL) */
#ifdef OPENSSL_EXTRA
-#if !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA)
/* Set wolfCrypt RSA key data (internal) from RSA key (external).
*
* @param [in, out] rsa RSA key.
@@ -2601,8 +2582,6 @@ int SetRsaInternal(WOLFSSL_RSA* rsa)
return ret;
}
-#endif /* HAVE_USER_RSA */
-
/* Set the RSA method into object.
*
* @param [in, out] rsa RSA key.
@@ -2679,8 +2658,6 @@ int wolfSSL_RSA_bits(const WOLFSSL_RSA* rsa)
return ret;
}
-#ifndef HAVE_USER_RSA
-
/* Get the BN objects that are the Chinese-Remainder Theorem (CRT) parameters.
*
* Only for those that are not NULL parameters.
@@ -2922,8 +2899,6 @@ int wolfSSL_RSA_set0_key(WOLFSSL_RSA *rsa, WOLFSSL_BIGNUM *n, WOLFSSL_BIGNUM *e,
return ret;
}
-#endif /* !HAVE_USER_RSA */
-
/* Get the flags of the RSA key.
*
* @param [in] rsa RSA key.
@@ -3088,7 +3063,6 @@ int wolfSSL_RSA_check_key(const WOLFSSL_RSA* rsa)
* RSA generate APIs
*/
-#if !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA)
/* Get a random number generator associated with the RSA key.
*
* If not able, then get the global if possible.
@@ -3131,7 +3105,6 @@ WC_RNG* WOLFSSL_RSA_GetRNG(WOLFSSL_RSA* rsa, WC_RNG** tmpRng, int* initTmpRng)
return rng;
}
-#endif
/* Use the wolfCrypt RSA APIs to generate a new RSA key.
*
@@ -3652,8 +3625,6 @@ int wolfSSL_RSA_verify_PKCS1_PSS(WOLFSSL_RSA *rsa, const unsigned char *mHash,
#if defined(OPENSSL_EXTRA)
-#if !defined(HAVE_USER_RSA)
-
/* Encode the message hash.
*
* Used by signing and verification.
@@ -4082,8 +4053,6 @@ int wolfSSL_RSA_verify_ex(int hashAlg, const unsigned char* hash,
* RSA public/private encrypt/decrypt APIs
*/
-#if !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA)
-
/* Encrypt with the RSA public key.
*
* Return compliant with OpenSSL.
@@ -4481,7 +4450,6 @@ int wolfSSL_RSA_private_encrypt(int len, const unsigned char* from,
WOLFSSL_LEAVE("wolfSSL_RSA_private_encrypt", ret);
return ret;
}
-#endif /* !HAVE_USER_RSA && !HAVE_FAST_RSA */
/*
* RSA misc operation APIs
@@ -4581,7 +4549,6 @@ int wolfSSL_RSA_GenAdd(WOLFSSL_RSA* rsa)
return ret;
}
-#endif /* !HAVE_USER_RSA */
#ifndef NO_WOLFSSL_STUB
/* Enable blinding for RSA key operations.
@@ -5066,15 +5033,19 @@ int wolfSSL_DSA_set0_key(WOLFSSL_DSA *d, WOLFSSL_BIGNUM *pub_key,
WOLFSSL_ENTER("wolfSSL_DSA_set0_key");
/* The private key may be NULL */
- if (pub_key == NULL) {
+ if (d->pub_key == NULL && pub_key == NULL) {
WOLFSSL_MSG("Bad parameter");
return 0;
}
- wolfSSL_BN_free(d->pub_key);
- wolfSSL_BN_free(d->priv_key);
- d->pub_key = pub_key;
- d->priv_key = priv_key;
+ if (pub_key != NULL) {
+ wolfSSL_BN_free(d->pub_key);
+ d->pub_key = pub_key;
+ }
+ if (priv_key != NULL) {
+ wolfSSL_BN_free(d->priv_key);
+ d->priv_key = priv_key;
+ }
return 1;
}
@@ -8528,7 +8499,7 @@ int wolfSSL_DH_compute_key(unsigned char* key, const WOLFSSL_BIGNUM* otherPub,
word32 keySz = 0;
int pubSz = MAX_DHKEY_SZ;
int privSz = MAX_DHKEY_SZ;
- int sz;
+ int sz = 0;
#ifdef WOLFSSL_SMALL_STACK
unsigned char* pub = NULL;
unsigned char* priv = NULL;
diff --git a/extra/wolfssl/wolfssl/src/quic.c b/extra/wolfssl/wolfssl/src/quic.c
index 02622a7e..66f866a4 100644
--- a/extra/wolfssl/wolfssl/src/quic.c
+++ b/extra/wolfssl/wolfssl/src/quic.c
@@ -83,6 +83,11 @@ static QuicRecord *quic_record_make(WOLFSSL *ssl,
}
else {
qr->capacity = qr->len = qr_length(data, len);
+ if (qr->capacity > WOLFSSL_QUIC_MAX_RECORD_CAPACITY) {
+ WOLFSSL_MSG("QUIC length read larger than expected");
+ quic_record_free(ssl, qr);
+ return NULL;
+ }
}
if (qr->capacity == 0) {
qr->capacity = 2*1024;
@@ -129,6 +134,14 @@ static int quic_record_append(WOLFSSL *ssl, QuicRecord *qr, const uint8_t *data,
consumed = missing;
qr->len = qr_length(qr->data, qr->end);
+
+ /* sanity check on length read from wire before use */
+ if (qr->len > WOLFSSL_QUIC_MAX_RECORD_CAPACITY) {
+ WOLFSSL_MSG("Length read for quic is larger than expected");
+ ret = BUFFER_E;
+ goto cleanup;
+ }
+
if (qr->len > qr->capacity) {
uint8_t *ndata = (uint8_t*)XREALLOC(qr->data, qr->len, ssl->heap,
DYNAMIC_TYPE_TMP_BUFFER);
diff --git a/extra/wolfssl/wolfssl/src/sniffer.c b/extra/wolfssl/wolfssl/src/sniffer.c
index ddcb5403..d5fc5c17 100644
--- a/extra/wolfssl/wolfssl/src/sniffer.c
+++ b/extra/wolfssl/wolfssl/src/sniffer.c
@@ -447,7 +447,6 @@ typedef struct SnifferServer {
struct SnifferServer* next; /* for list */
} SnifferServer;
-
/* Session Flags */
typedef struct Flags {
byte side; /* which end is current packet headed */
@@ -569,13 +568,13 @@ typedef struct SnifferSession {
/* Sniffer Server List and mutex */
static THREAD_LS_T WOLFSSL_GLOBAL SnifferServer* ServerList = NULL;
#ifndef HAVE_C___ATOMIC
-static WOLFSSL_GLOBAL wolfSSL_Mutex ServerListMutex;
+static WOLFSSL_GLOBAL wolfSSL_Mutex ServerListMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(ServerListMutex);
#endif
/* Session Hash Table, mutex, and count */
static THREAD_LS_T WOLFSSL_GLOBAL SnifferSession* SessionTable[HASH_SIZE];
#ifndef HAVE_C___ATOMIC
-static WOLFSSL_GLOBAL wolfSSL_Mutex SessionMutex;
+static WOLFSSL_GLOBAL wolfSSL_Mutex SessionMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(SessionMutex);
#endif
static THREAD_LS_T WOLFSSL_GLOBAL int SessionCount = 0;
@@ -584,7 +583,7 @@ static WOLFSSL_GLOBAL int MaxRecoveryMemory = -1;
/* per session max recovery memory */
#ifndef WOLFSSL_SNIFFER_NO_RECOVERY
/* Recovery of missed data switches and stats */
-static WOLFSSL_GLOBAL wolfSSL_Mutex RecoveryMutex; /* for stats */
+static WOLFSSL_GLOBAL wolfSSL_Mutex RecoveryMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(RecoveryMutex); /* for stats */
/* # of sessions with missed data */
static WOLFSSL_GLOBAL word32 MissedDataSessions = 0;
#endif
@@ -596,7 +595,7 @@ static WOLFSSL_GLOBAL void* ConnectionCbCtx = NULL;
#ifdef WOLFSSL_SNIFFER_STATS
/* Sessions Statistics */
static WOLFSSL_GLOBAL SSLStats SnifferStats;
-static WOLFSSL_GLOBAL wolfSSL_Mutex StatsMutex;
+static WOLFSSL_GLOBAL wolfSSL_Mutex StatsMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(StatsMutex);
#endif
#ifdef WOLFSSL_SNIFFER_KEY_CALLBACK
@@ -683,6 +682,7 @@ static int addKeyLogSnifferServerHelper(const char* address,
void ssl_InitSniffer_ex(int devId)
{
wolfSSL_Init();
+#ifndef WOLFSSL_MUTEX_INITIALIZER
#ifndef HAVE_C___ATOMIC
wc_InitMutex(&ServerListMutex);
wc_InitMutex(&SessionMutex);
@@ -694,6 +694,11 @@ void ssl_InitSniffer_ex(int devId)
XMEMSET(&SnifferStats, 0, sizeof(SSLStats));
wc_InitMutex(&StatsMutex);
#endif
+#endif /* !WOLFSSL_MUTEX_INITIALIZER */
+
+#ifdef WOLFSSL_SNIFFER_STATS
+ XMEMSET(&SnifferStats, 0, sizeof(SSLStats));
+#endif
#if defined(WOLF_CRYPTO_CB) || defined(WOLFSSL_ASYNC_CRYPT)
CryptoDeviceId = devId;
#endif
@@ -903,6 +908,7 @@ void ssl_FreeSniffer(void)
#endif /* WOLFSSL_SNIFFER_KEYLOGFILE */
+#ifndef WOLFSSL_MUTEX_INITIALIZER
#ifndef WOLFSSL_SNIFFER_NO_RECOVERY
wc_FreeMutex(&RecoveryMutex);
#endif
@@ -910,6 +916,7 @@ void ssl_FreeSniffer(void)
wc_FreeMutex(&SessionMutex);
wc_FreeMutex(&ServerListMutex);
#endif
+#endif /* !WOLFSSL_MUTEX_INITIALIZER */
#ifdef WOLF_CRYPTO_CB
#ifdef HAVE_INTEL_QA_SYNC
@@ -7235,7 +7242,7 @@ static THREAD_LS_T WOLFSSL_GLOBAL
SecretNode*
secretHashTable[WOLFSSL_SNIFFER_KEYLOGFILE_HASH_TABLE_SIZE] = {NULL};
#ifndef HAVE_C___ATOMIC
-static WOLFSSL_GLOBAL wolfSSL_Mutex secretListMutex;
+static WOLFSSL_GLOBAL wolfSSL_Mutex secretListMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(secretListMutex);
#endif
static unsigned int secretHashFunction(unsigned char* clientRandom);
diff --git a/extra/wolfssl/wolfssl/src/ssl.c b/extra/wolfssl/wolfssl/src/ssl.c
index e99f702f..ea66e429 100644
--- a/extra/wolfssl/wolfssl/src/ssl.c
+++ b/extra/wolfssl/wolfssl/src/ssl.c
@@ -309,8 +309,10 @@ int wc_OBJ_sn2nid(const char *sn)
static WC_RNG globalRNG;
static int initGlobalRNG = 0;
-static wolfSSL_Mutex globalRNGMutex;
+static WC_MAYBE_UNUSED wolfSSL_Mutex globalRNGMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(globalRNGMutex);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
static int globalRNGMutex_valid = 0;
+#endif
#if defined(OPENSSL_EXTRA) && defined(HAVE_HASHDRBG)
static WOLFSSL_DRBG_CTX* gDrbgDefCtx = NULL;
@@ -406,8 +408,10 @@ WC_RNG* wolfssl_make_rng(WC_RNG* rng, int* local)
* OPENSSL_EXTRA where RAND callbacks are not used */
#ifndef WOLFSSL_NO_OPENSSL_RAND_CB
static const WOLFSSL_RAND_METHOD* gRandMethods = NULL;
+ static wolfSSL_Mutex gRandMethodMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(gRandMethodMutex);
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static int gRandMethodsInit = 0;
- static wolfSSL_Mutex gRandMethodMutex;
+ #endif
#endif /* !WOLFSSL_NO_OPENSSL_RAND_CB */
#endif /* OPENSSL_EXTRA */
@@ -1265,11 +1269,9 @@ int wolfSSL_send_session(WOLFSSL* ssl)
/* prevent multiple mutex initializations */
static volatile WOLFSSL_GLOBAL int initRefCount = 0;
-#ifdef WOLFSSL_MUTEX_INITIALIZER
-static WOLFSSL_GLOBAL wolfSSL_Mutex count_mutex = WOLFSSL_MUTEX_INITIALIZER;
-#else
-static WOLFSSL_GLOBAL wolfSSL_Mutex count_mutex; /* init ref count mutex */
-static WOLFSSL_GLOBAL int count_mutex_valid = 0;
+static WOLFSSL_GLOBAL wolfSSL_Mutex inits_count_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(inits_count_mutex); /* init ref count mutex */
+#ifndef WOLFSSL_MUTEX_INITIALIZER
+static WOLFSSL_GLOBAL int inits_count_mutex_valid = 0;
#endif
/* Create a new WOLFSSL_CTX struct and return the pointer to created struct.
@@ -1474,17 +1476,35 @@ WOLFSSL* wolfSSL_new(WOLFSSL_CTX* ctx)
WOLFSSL_ENTER("wolfSSL_new");
- if (ctx == NULL)
- return ssl;
+ if (ctx == NULL) {
+ WOLFSSL_MSG("wolfSSL_new ctx is null");
+ return NULL;
+ }
ssl = (WOLFSSL*) XMALLOC(sizeof(WOLFSSL), ctx->heap, DYNAMIC_TYPE_SSL);
- if (ssl)
- if ( (ret = InitSSL(ssl, ctx, 0)) < 0) {
+
+ if (ssl == NULL) {
+ WOLFSSL_MSG_EX("ssl xmalloc failed to allocate %d bytes",
+ (int)sizeof(WOLFSSL));
+ }
+ else {
+ ret = InitSSL(ssl, ctx, 0);
+ if (ret < 0) {
+ WOLFSSL_MSG_EX("wolfSSL_new failed during InitSSL. err = %d", ret);
FreeSSL(ssl, ctx->heap);
- ssl = 0;
+ ssl = NULL;
+ }
+ else if (ret == 0) {
+ WOLFSSL_MSG("wolfSSL_new InitSSL success");
}
+ else {
+ /* Only success (0) or negative values should ever be seen. */
+ WOLFSSL_MSG_EX("WARNING: wolfSSL_new unexpected InitSSL return"
+ " value = %d", ret);
+ } /* InitSSL check */
+ } /* ssl XMALLOC success */
- WOLFSSL_LEAVE("wolfSSL_new", ret);
+ WOLFSSL_LEAVE("wolfSSL_new InitSSL =", ret);
(void)ret;
return ssl;
@@ -1495,8 +1515,14 @@ WOLFSSL_ABI
void wolfSSL_free(WOLFSSL* ssl)
{
WOLFSSL_ENTER("wolfSSL_free");
- if (ssl)
+
+ if (ssl) {
+ WOLFSSL_MSG_EX("Free SSL: %p", (wc_ptr_t)ssl);
FreeSSL(ssl, ssl->ctx->heap);
+ }
+ else {
+ WOLFSSL_MSG("Free SSL: wolfSSL_free already null");
+ }
WOLFSSL_LEAVE("wolfSSL_free", 0);
}
@@ -1581,6 +1607,18 @@ static int DupSSL(WOLFSSL* dup, WOLFSSL* ssl)
XMEMCPY(&dup->version, &ssl->version, sizeof(ProtocolVersion));
XMEMCPY(&dup->chVersion, &ssl->chVersion, sizeof(ProtocolVersion));
+#ifdef HAVE_ONE_TIME_AUTH
+#ifdef HAVE_POLY1305
+ if (ssl->auth.setup && ssl->auth.poly1305 != NULL) {
+ dup->auth.poly1305 =
+ (Poly1305*)XMALLOC(sizeof(Poly1305), dup->heap, DYNAMIC_TYPE_CIPHER);
+ if (dup->auth.poly1305 == NULL)
+ return MEMORY_E;
+ dup->auth.setup = 1;
+ }
+#endif
+#endif
+
/* dup side now owns encrypt/write ciphers */
XMEMSET(&ssl->encrypt, 0, sizeof(Ciphers));
@@ -3068,7 +3106,7 @@ int wolfSSL_SetTmpDH(WOLFSSL* ssl, const unsigned char* p, int pSz,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
WOLFSSL_LEAVE("wolfSSL_SetTmpDH", 0);
@@ -3240,20 +3278,6 @@ int wolfSSL_write(WOLFSSL* ssl, const void* data, int sz)
return BAD_FUNC_ARG;
}
#endif
-#ifdef WOLFSSL_EARLY_DATA
- if (IsAtLeastTLSv1_3(ssl->version) &&
- ssl->options.side == WOLFSSL_SERVER_END &&
- ssl->options.acceptState >= TLS13_ACCEPT_FINISHED_SENT) {
- /* We can send data without waiting on peer finished msg */
- WOLFSSL_MSG("server sending data before receiving client finished");
- }
- else if (ssl->earlyData != no_early_data &&
- (ret = wolfSSL_negotiate(ssl)) < 0) {
- ssl->error = ret;
- return WOLFSSL_FATAL_ERROR;
- }
- ssl->earlyData = no_early_data;
-#endif
#ifdef HAVE_WRITE_DUP
{ /* local variable scope */
@@ -5343,7 +5367,7 @@ int wolfSSL_SetVersion(WOLFSSL* ssl, int version)
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
return WOLFSSL_SUCCESS;
}
#endif /* !leanpsk */
@@ -5610,7 +5634,8 @@ Signer* GetCAByName(void* vp, byte* hash)
/* add a trusted peer cert to linked list */
int AddTrustedPeer(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int verify)
{
- int ret, row;
+ int ret = 0;
+ int row = 0;
TrustedPeerCert* peerCert;
DecodedCert* cert;
DerBuffer* der = *pDer;
@@ -5892,6 +5917,12 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
signer->publicKey = cert->publicKey;
signer->pubKeySize = cert->pubKeySize;
}
+
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ signer->sapkiDer = cert->sapkiDer;
+ signer->sapkiLen = cert->sapkiLen;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
if (cert->subjectCNStored) {
signer->nameLen = cert->subjectCNLen;
signer->name = cert->subjectCN;
@@ -5925,6 +5956,7 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
cert->permittedNames = NULL;
cert->excludedNames = NULL;
#endif
+ signer->type = (byte)type;
#ifndef NO_SKID
row = HashSigner(signer->subjectKeyIdHash);
@@ -6008,10 +6040,15 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
aren't under heavy load, basically allows 200 new sessions per minute
SMALL_SESSION_CACHE only stores 6 sessions, good for embedded clients
- or systems where the default of nearly 3kB is too much RAM, this define
- uses less than 500 bytes RAM
+ or systems where the default of is too much RAM.
+ SessionCache takes about 2K, ClientCache takes about 3Kbytes
+
+ MICRO_SESSION_CACHE only stores 1 session, good for embedded clients
+ or systems where memory is at a premium.
+ SessionCache takes about 400 bytes, ClientCache takes 576 bytes
default SESSION_CACHE stores 33 sessions (no XXX_SESSION_CACHE defined)
+ SessionCache takes about 13K bytes, ClientCache takes 17K bytes
*/
#if defined(TITAN_SESSION_CACHE)
#define SESSIONS_PER_ROW 31
@@ -6031,6 +6068,9 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
#elif defined(SMALL_SESSION_CACHE)
#define SESSIONS_PER_ROW 2
#define SESSION_ROWS 3
+ #elif defined(MICRO_SESSION_CACHE)
+ #define SESSIONS_PER_ROW 1
+ #define SESSION_ROWS 1
#else
#define SESSIONS_PER_ROW 3
#define SESSION_ROWS 11
@@ -6126,8 +6166,10 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
/* Client Cache */
/* uses session mutex */
- static WOLFSSL_GLOBAL wolfSSL_Mutex clisession_mutex; /* ClientCache mutex */
+ static WOLFSSL_GLOBAL wolfSSL_Mutex clisession_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(clisession_mutex); /* ClientCache mutex */
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static WOLFSSL_GLOBAL int clisession_mutex_valid = 0;
+ #endif
#endif /* !NO_CLIENT_CACHE */
void EvictSessionFromCache(WOLFSSL_SESSION* session)
@@ -6185,22 +6227,40 @@ int wolfSSL_Init(void)
WOLFSSL_ENTER("wolfSSL_Init");
+#ifndef WOLFSSL_MUTEX_INITIALIZER
+ if (inits_count_mutex_valid == 0) {
+ if (wc_InitMutex(&inits_count_mutex) != 0) {
+ WOLFSSL_MSG("Bad Init Mutex count");
+ return BAD_MUTEX_E;
+ }
+ else {
+ inits_count_mutex_valid = 1;
+ }
+ }
+#endif /* !WOLFSSL_MUTEX_INITIALIZER */
+
+ if (wc_LockMutex(&inits_count_mutex) != 0) {
+ WOLFSSL_MSG("Bad Lock Mutex count");
+ return BAD_MUTEX_E;
+ }
+
#if FIPS_VERSION_GE(5,1)
+ if ((ret == WOLFSSL_SUCCESS) && (initRefCount == 0)) {
ret = wolfCrypt_SetPrivateKeyReadEnable_fips(1, WC_KEYTYPE_ALL);
- if (ret != 0)
- return ret;
- else
+ if (ret == 0)
ret = WOLFSSL_SUCCESS;
+ }
#endif
- if (initRefCount == 0) {
+ if ((ret == WOLFSSL_SUCCESS) && (initRefCount == 0)) {
/* Initialize crypto for use with TLS connection */
+
if (wolfCrypt_Init() != 0) {
WOLFSSL_MSG("Bad wolfCrypt Init");
ret = WC_INIT_E;
}
-#ifdef HAVE_GLOBAL_RNG
+#if defined(HAVE_GLOBAL_RNG) && !defined(WOLFSSL_MUTEX_INITIALIZER)
if (ret == WOLFSSL_SUCCESS) {
if (wc_InitMutex(&globalRNGMutex) != 0) {
WOLFSSL_MSG("Bad Init Mutex rng");
@@ -6255,6 +6315,7 @@ int wolfSSL_Init(void)
}
#endif
#ifndef NO_CLIENT_CACHE
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (ret == WOLFSSL_SUCCESS) {
if (wc_InitMutex(&clisession_mutex) != 0) {
WOLFSSL_MSG("Bad Init Mutex session");
@@ -6264,19 +6325,9 @@ int wolfSSL_Init(void)
clisession_mutex_valid = 1;
}
}
+ #endif
#endif
#endif
-#ifndef WOLFSSL_MUTEX_INITIALIZER
- if (ret == WOLFSSL_SUCCESS) {
- if (wc_InitMutex(&count_mutex) != 0) {
- WOLFSSL_MSG("Bad Init Mutex count");
- ret = BAD_MUTEX_E;
- }
- else {
- count_mutex_valid = 1;
- }
- }
-#endif /* !WOLFSSL_MUTEX_INITIALIZER */
#if defined(OPENSSL_EXTRA) && defined(HAVE_ATEXIT)
/* OpenSSL registers cleanup using atexit */
if ((ret == WOLFSSL_SUCCESS) && (atexit(AtExitCleanup) != 0)) {
@@ -6287,16 +6338,11 @@ int wolfSSL_Init(void)
}
if (ret == WOLFSSL_SUCCESS) {
- if (wc_LockMutex(&count_mutex) != 0) {
- WOLFSSL_MSG("Bad Lock Mutex count");
- ret = BAD_MUTEX_E;
- }
- else {
- initRefCount++;
- wc_UnLockMutex(&count_mutex);
- }
+ initRefCount++;
}
+ wc_UnLockMutex(&inits_count_mutex);
+
if (ret != WOLFSSL_SUCCESS) {
initRefCount = 1; /* Force cleanup */
(void)wolfSSL_Cleanup(); /* Ignore any error from cleanup */
@@ -6505,7 +6551,10 @@ static int ProcessBufferTryDecodeRsa(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
"not enabled to try");
ret = WOLFSSL_BAD_FILE;
#else
- ret = 0; /* continue trying other algorithms */
+ if (*keyFormat == 0) {
+ /* Format unknown so keep trying. */
+ ret = 0; /* continue trying other algorithms */
+ }
#endif
}
else {
@@ -6578,7 +6627,10 @@ static int ProcessBufferTryDecodeRsa(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
"not enabled to try");
ret = WOLFSSL_BAD_FILE;
#else
- ret = 0; /* continue trying other algorithms */
+ if (*keyFormat == 0) {
+ /* Format unknown so keep trying. */
+ ret = 0; /* continue trying other algorithms */
+ }
#endif
}
else {
@@ -6690,7 +6742,7 @@ static int ProcessBufferTryDecodeEcc(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
*resetSuites = 1;
}
}
- else {
+ else if (*keyFormat == 0) {
ret = 0; /* continue trying other algorithms */
}
@@ -6753,7 +6805,7 @@ static int ProcessBufferTryDecodeEd25519(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
ssl->buffers.keyType = ed25519_sa_algo;
ssl->buffers.keySz = *keySz;
}
- else if (ctx) {
+ else {
ctx->privateKeyType = ed25519_sa_algo;
ctx->privateKeySz = *keySz;
}
@@ -6771,7 +6823,7 @@ static int ProcessBufferTryDecodeEd25519(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
}
}
}
- else {
+ else if (*keyFormat == 0) {
ret = 0; /* continue trying other algorithms */
}
@@ -6849,6 +6901,9 @@ static int ProcessBufferTryDecodeEd448(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
}
}
}
+ else if (*keyFormat == 0) {
+ ret = 0; /* continue trying other algorithms */
+ }
wc_ed448_free(key);
}
@@ -6864,12 +6919,13 @@ static int ProcessBufferTryDecodeEd448(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
#if defined(HAVE_FALCON)
static int ProcessBufferTryDecodeFalcon(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
DerBuffer* der, int* keySz, word32* idx, int* resetSuites, int* keyFormat,
- void* heap)
+ void* heap, int type)
{
int ret;
/* make sure Falcon key can be used */
falcon_key* key = (falcon_key*)XMALLOC(sizeof(falcon_key), heap,
DYNAMIC_TYPE_FALCON);
+ (void) type;
if (key == NULL) {
return MEMORY_E;
}
@@ -6902,28 +6958,60 @@ static int ProcessBufferTryDecodeFalcon(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
ret = FALCON_KEY_SIZE_E;
}
if (ssl) {
- if (*keyFormat == FALCON_LEVEL1k) {
- ssl->buffers.keyType = falcon_level1_sa_algo;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (type == ALT_PRIVATEKEY_TYPE) {
+ if (*keyFormat == FALCON_LEVEL1k) {
+ ssl->buffers.altKeyType = falcon_level1_sa_algo;
+ }
+ else {
+ ssl->buffers.altKeyType = falcon_level5_sa_algo;
+ }
+ ssl->buffers.altKeySz = *keySz;
}
- else {
- ssl->buffers.keyType = falcon_level5_sa_algo;
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ {
+ if (*keyFormat == FALCON_LEVEL1k) {
+ ssl->buffers.keyType = falcon_level1_sa_algo;
+ }
+ else {
+ ssl->buffers.keyType = falcon_level5_sa_algo;
+ }
+ ssl->buffers.keySz = *keySz;
}
- ssl->buffers.keySz = *keySz;
}
else {
- if (*keyFormat == FALCON_LEVEL1k) {
- ctx->privateKeyType = falcon_level1_sa_algo;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (type == ALT_PRIVATEKEY_TYPE) {
+ if (*keyFormat == FALCON_LEVEL1k) {
+ ctx->altPrivateKeyType = falcon_level1_sa_algo;
+ }
+ else {
+ ctx->altPrivateKeyType = falcon_level5_sa_algo;
+ }
+ ctx->altPrivateKeySz = *keySz;
}
- else {
- ctx->privateKeyType = falcon_level5_sa_algo;
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ {
+ if (*keyFormat == FALCON_LEVEL1k) {
+ ctx->privateKeyType = falcon_level1_sa_algo;
+ }
+ else {
+ ctx->privateKeyType = falcon_level5_sa_algo;
+ }
+ ctx->privateKeySz = *keySz;
}
- ctx->privateKeySz = *keySz;
}
if (ssl && ssl->options.side == WOLFSSL_SERVER_END) {
*resetSuites = 1;
}
}
+ else if (*keyFormat == 0) {
+ ret = 0; /* continue trying other algorithms */
+ }
+
wc_falcon_free(key);
}
XFREE(key, heap, DYNAMIC_TYPE_FALCON);
@@ -6934,12 +7022,13 @@ static int ProcessBufferTryDecodeFalcon(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
#if defined(HAVE_DILITHIUM)
static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
DerBuffer* der, int* keySz, word32* idx, int* resetSuites, int* keyFormat,
- void* heap)
+ void* heap, int type)
{
int ret;
/* make sure Dilithium key can be used */
dilithium_key* key = (dilithium_key*)XMALLOC(sizeof(dilithium_key), heap,
DYNAMIC_TYPE_DILITHIUM);
+ (void) type;
if (key == NULL) {
return MEMORY_E;
}
@@ -6975,34 +7064,72 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
ret = DILITHIUM_KEY_SIZE_E;
}
if (ssl) {
- if (*keyFormat == DILITHIUM_LEVEL2k) {
- ssl->buffers.keyType = dilithium_level2_sa_algo;
- }
- else if (*keyFormat == DILITHIUM_LEVEL3k) {
- ssl->buffers.keyType = dilithium_level3_sa_algo;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (type == ALT_PRIVATEKEY_TYPE) {
+ if (*keyFormat == DILITHIUM_LEVEL2k) {
+ ssl->buffers.altKeyType = dilithium_level2_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL3k) {
+ ssl->buffers.altKeyType = dilithium_level3_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL5k) {
+ ssl->buffers.altKeyType = dilithium_level5_sa_algo;
+ }
+ ssl->buffers.altKeySz = *keySz;
}
- else if (*keyFormat == DILITHIUM_LEVEL5k) {
- ssl->buffers.keyType = dilithium_level5_sa_algo;
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ {
+ if (*keyFormat == DILITHIUM_LEVEL2k) {
+ ssl->buffers.keyType = dilithium_level2_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL3k) {
+ ssl->buffers.keyType = dilithium_level3_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL5k) {
+ ssl->buffers.keyType = dilithium_level5_sa_algo;
+ }
+ ssl->buffers.keySz = *keySz;
}
- ssl->buffers.keySz = *keySz;
}
else {
- if (*keyFormat == DILITHIUM_LEVEL2k) {
- ctx->privateKeyType = dilithium_level2_sa_algo;
- }
- else if (*keyFormat == DILITHIUM_LEVEL3k) {
- ctx->privateKeyType = dilithium_level3_sa_algo;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (type == ALT_PRIVATEKEY_TYPE) {
+ if (*keyFormat == DILITHIUM_LEVEL2k) {
+ ctx->altPrivateKeyType = dilithium_level2_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL3k) {
+ ctx->altPrivateKeyType = dilithium_level3_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL5k) {
+ ctx->altPrivateKeyType = dilithium_level5_sa_algo;
+ }
+ ctx->altPrivateKeySz = *keySz;
}
- else if (*keyFormat == DILITHIUM_LEVEL5k) {
- ctx->privateKeyType = dilithium_level5_sa_algo;
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ {
+ if (*keyFormat == DILITHIUM_LEVEL2k) {
+ ctx->privateKeyType = dilithium_level2_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL3k) {
+ ctx->privateKeyType = dilithium_level3_sa_algo;
+ }
+ else if (*keyFormat == DILITHIUM_LEVEL5k) {
+ ctx->privateKeyType = dilithium_level5_sa_algo;
+ }
+ ctx->privateKeySz = *keySz;
}
- ctx->privateKeySz = *keySz;
}
if (ssl && ssl->options.side == WOLFSSL_SERVER_END) {
*resetSuites = 1;
}
}
+ else if (*keyFormat == 0) {
+ ret = 0; /* continue trying other algorithms */
+ }
+
wc_dilithium_free(key);
}
XFREE(key, heap, DYNAMIC_TYPE_DILITHIUM);
@@ -7014,12 +7141,13 @@ static int ProcessBufferTryDecodeDilithium(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
static int ProcessBufferTryDecode(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
DerBuffer* der, int* keySz, word32* idx, int* resetSuites, int* keyFormat,
- void* heap, int devId)
+ void* heap, int devId, int type)
{
int ret = 0;
(void)heap;
(void)devId;
+ (void)type;
if (ctx == NULL && ssl == NULL)
return BAD_FUNC_ARG;
@@ -7073,7 +7201,7 @@ static int ProcessBufferTryDecode(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
if (((*keyFormat == 0) || (*keyFormat == FALCON_LEVEL1k) ||
(*keyFormat == FALCON_LEVEL5k))) {
ret = ProcessBufferTryDecodeFalcon(ctx, ssl, der, keySz, idx,
- resetSuites, keyFormat, heap);
+ resetSuites, keyFormat, heap, type);
if (ret != 0)
return ret;
}
@@ -7084,7 +7212,7 @@ static int ProcessBufferTryDecode(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
(*keyFormat == DILITHIUM_LEVEL3k) ||
(*keyFormat == DILITHIUM_LEVEL5k)) {
ret = ProcessBufferTryDecodeDilithium(ctx, ssl, der, keySz, idx,
- resetSuites, keyFormat, heap);
+ resetSuites, keyFormat, heap, type);
if (ret != 0) {
return ret;
}
@@ -7317,6 +7445,35 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
#endif
}
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ else if (type == ALT_PRIVATEKEY_TYPE) {
+ if (ssl != NULL) {
+ /* Make sure previous is free'd */
+ if (ssl->buffers.weOwnAltKey) {
+ ForceZero(ssl->buffers.altKey->buffer,
+ ssl->buffers.altKey->length);
+ FreeDer(&ssl->buffers.altKey);
+ }
+ ssl->buffers.altKey = der;
+#ifdef WOLFSSL_CHECK_MEM_ZERO
+ wc_MemZero_Add("SSL Buffers key", der->buffer, der->length);
+#endif
+ ssl->buffers.weOwnAltKey = 1;
+ }
+ else if (ctx != NULL) {
+ if (ctx->altPrivateKey != NULL &&
+ ctx->altPrivateKey->buffer != NULL) {
+ ForceZero(ctx->altPrivateKey->buffer,
+ ctx->altPrivateKey->length);
+ }
+ FreeDer(&ctx->altPrivateKey);
+ ctx->altPrivateKey = der;
+#ifdef WOLFSSL_CHECK_MEM_ZERO
+ wc_MemZero_Add("CTX private key", der->buffer, der->length);
+#endif
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
else {
FreeDer(&der);
return WOLFSSL_BAD_CERTTYPE;
@@ -7325,9 +7482,13 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
if (done == 1) {
/* No operation, just skip the next section */
}
- else if (type == PRIVATEKEY_TYPE) {
+ else if (type == PRIVATEKEY_TYPE
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ || type == ALT_PRIVATEKEY_TYPE
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ ) {
ret = ProcessBufferTryDecode(ctx, ssl, der, &keySz, &idx, &resetSuites,
- &keyFormat, heap, devId);
+ &keyFormat, heap, devId, type);
#if defined(WOLFSSL_ENCRYPTED_KEYS) && !defined(NO_PWDBASED)
/* for WOLFSSL_FILETYPE_PEM, PemToDer manages the decryption */
@@ -7373,7 +7534,7 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
wc_MemZero_Check(password, NAME_SZ);
#endif
ret = ProcessBufferTryDecode(ctx, ssl, der, &keySz, &idx,
- &resetSuites, &keyFormat, heap, devId);
+ &resetSuites, &keyFormat, heap, devId, type);
}
#endif /* WOLFSSL_ENCRYPTED_KEYS && !NO_PWDBASED */
@@ -7747,6 +7908,9 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
#if defined(HAVE_FALCON)
case FALCON_LEVEL1k:
case FALCON_LEVEL5k:
+ #ifdef WOLF_PRIVATE_KEY_ID
+ keyType = falcon_level5_sa_algo;
+ #endif
/* Falcon is fixed key size */
keySz = FALCON_MAX_KEY_SIZE;
if (ssl && !ssl->options.verifyNone) {
@@ -7769,6 +7933,9 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
case DILITHIUM_LEVEL2k:
case DILITHIUM_LEVEL3k:
case DILITHIUM_LEVEL5k:
+ #ifdef WOLF_PRIVATE_KEY_ID
+ keyType = dilithium_level5_sa_algo;
+ #endif
/* Dilithium is fixed key size */
keySz = DILITHIUM_MAX_KEY_SIZE;
if (ssl && !ssl->options.verifyNone) {
@@ -7853,7 +8020,7 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
havePSK, ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
else if (ctx && resetSuites) {
word16 havePSK = 0;
@@ -7877,7 +8044,7 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
ctx->haveECC, TRUE, ctx->haveStaticECC,
ctx->haveFalconSig, ctx->haveDilithiumSig,
#ifdef HAVE_ANON
- ctx->haveAnon,
+ ctx->useAnon,
#else
FALSE,
#endif
@@ -8874,7 +9041,20 @@ int wolfSSL_CTX_use_PrivateKey_file(WOLFSSL_CTX* ctx, const char* file,
return WOLFSSL_FAILURE;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+int wolfSSL_CTX_use_AltPrivateKey_file(WOLFSSL_CTX* ctx, const char* file,
+ int format)
+{
+ WOLFSSL_ENTER("wolfSSL_CTX_use_AltPrivateKey_file");
+
+ if (ProcessFile(ctx, file, format, ALT_PRIVATEKEY_TYPE, NULL, 0, NULL,
+ GET_VERIFY_SETTING_CTX(ctx)) == WOLFSSL_SUCCESS) {
+ return WOLFSSL_SUCCESS;
+ }
+ return WOLFSSL_FAILURE;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#endif /* NO_FILESYSTEM */
@@ -9103,6 +9283,19 @@ static int check_cert_key(DerBuffer* cert, DerBuffer* key, void* heap,
type = DYNAMIC_TYPE_ECC;
}
#endif
+ #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
+ if ((der->keyOID == DILITHIUM_LEVEL2k) ||
+ (der->keyOID == DILITHIUM_LEVEL3k) ||
+ (der->keyOID == DILITHIUM_LEVEL5k)) {
+ type = DYNAMIC_TYPE_DILITHIUM;
+ }
+ #endif
+ #if defined(HAVE_PQC) && defined(HAVE_FALCON)
+ if ((der->keyOID == FALCON_LEVEL1k) ||
+ (der->keyOID == FALCON_LEVEL5k)) {
+ type = DYNAMIC_TYPE_FALCON;
+ }
+ #endif
ret = CreateDevPrivateKey(&pkey, buff, size, type,
isKeyLabel, isKeyId, heap, devId);
@@ -9124,6 +9317,23 @@ static int check_cert_key(DerBuffer* cert, DerBuffer* key, void* heap,
der->publicKey, der->pubKeySize);
}
#endif
+ #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
+ if ((der->keyOID == DILITHIUM_LEVEL2k) ||
+ (der->keyOID == DILITHIUM_LEVEL3k) ||
+ (der->keyOID == DILITHIUM_LEVEL5k)) {
+ ret = wc_CryptoCb_PqcSignatureCheckPrivKey(pkey,
+ WC_PQC_SIG_TYPE_DILITHIUM,
+ der->publicKey, der->pubKeySize);
+ }
+ #endif
+ #if defined(HAVE_PQC) && defined(HAVE_FALCON)
+ if ((der->keyOID == FALCON_LEVEL1k) ||
+ (der->keyOID == FALCON_LEVEL5k)) {
+ ret = wc_CryptoCb_PqcSignatureCheckPrivKey(pkey,
+ WC_PQC_SIG_TYPE_FALCON,
+ der->publicKey, der->pubKeySize);
+ }
+ #endif
}
#else
/* devId was set, don't check, for now */
@@ -9144,6 +9354,19 @@ static int check_cert_key(DerBuffer* cert, DerBuffer* key, void* heap,
wc_ecc_free((ecc_key*)pkey);
}
#endif
+ #if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
+ if ((der->keyOID == DILITHIUM_LEVEL2k) ||
+ (der->keyOID == DILITHIUM_LEVEL3k) ||
+ (der->keyOID == DILITHIUM_LEVEL5k)) {
+ wc_dilithium_free((dilithium_key*)pkey);
+ }
+ #endif
+ #if defined(HAVE_PQC) && defined(HAVE_FALCON)
+ if ((der->keyOID == FALCON_LEVEL1k) ||
+ (der->keyOID == FALCON_LEVEL5k)) {
+ wc_falcon_free((falcon_key*)pkey);
+ }
+ #endif
XFREE(pkey, heap, type);
}
if (ret != CRYPTOCB_UNAVAILABLE) {
@@ -9948,7 +10171,7 @@ static WOLFSSL_EVP_PKEY* _d2i_PublicKey(int type, WOLFSSL_EVP_PKEY** out,
word32 idx = 0, algId;
word16 pkcs8HeaderSz = 0;
WOLFSSL_EVP_PKEY* local;
- int opt;
+ int opt = 0;
(void)opt;
@@ -10281,7 +10504,7 @@ int wolfSSL_use_RSAPrivateKey_ASN1(WOLFSSL* ssl, unsigned char* der, long derSz)
int wolfSSL_use_certificate(WOLFSSL* ssl, WOLFSSL_X509* x509)
{
- long idx;
+ long idx = 0;
WOLFSSL_ENTER("wolfSSL_use_certificate");
if (x509 != NULL && ssl != NULL && x509->derCert != NULL) {
@@ -10527,7 +10750,7 @@ WOLFSSL_API int wolfSSL_get_negotiated_server_cert_type(WOLFSSL* ssl, int* tp)
int wolfSSL_use_certificate_ASN1(WOLFSSL* ssl, const unsigned char* der,
int derSz)
{
- long idx;
+ long idx = 0;
WOLFSSL_ENTER("wolfSSL_use_certificate_ASN1");
if (der != NULL && ssl != NULL) {
@@ -11684,8 +11907,8 @@ static int CheckcipherList(const char* list)
*
* returns WOLFSSL_SUCCESS on success and sets the cipher suite list
*/
-static int wolfSSL_parse_cipher_list(WOLFSSL_CTX* ctx, Suites* suites,
- const char* list)
+static int wolfSSL_parse_cipher_list(WOLFSSL_CTX* ctx, WOLFSSL* ssl,
+ Suites* suites, const char* list)
{
int ret = 0;
int listattribute = 0;
@@ -11710,7 +11933,7 @@ static int wolfSSL_parse_cipher_list(WOLFSSL_CTX* ctx, Suites* suites,
/* list has mixed(pre-TLSv13 and TLSv13) suites
* update cipher suites the same as before
*/
- return (SetCipherList(ctx, suites, list)) ? WOLFSSL_SUCCESS :
+ return (SetCipherList_ex(ctx, ssl, suites, list)) ? WOLFSSL_SUCCESS :
WOLFSSL_FAILURE;
}
else if (listattribute == 1) {
@@ -11724,28 +11947,37 @@ static int wolfSSL_parse_cipher_list(WOLFSSL_CTX* ctx, Suites* suites,
* simulate set_ciphersuites() compatibility layer API
*/
tls13Only = 1;
- if (!IsAtLeastTLSv1_3(ctx->method->version)) {
+ if ((ctx != NULL && !IsAtLeastTLSv1_3(ctx->method->version)) ||
+ (ssl != NULL && !IsAtLeastTLSv1_3(ssl->version))) {
/* Silently ignore TLS 1.3 ciphers if we don't support it. */
return WOLFSSL_SUCCESS;
}
}
/* list contains ciphers either only for TLS 1.3 or <= TLS 1.2 */
-
+ if (suites->suiteSz == 0) {
+ WOLFSSL_MSG("Warning suites->suiteSz = 0 set to WOLFSSL_MAX_SUITE_SZ");
+ suites->suiteSz = WOLFSSL_MAX_SUITE_SZ;
+ }
#ifdef WOLFSSL_SMALL_STACK
if (suites->suiteSz > 0) {
suitesCpy = (byte*)XMALLOC(suites->suiteSz, NULL,
DYNAMIC_TYPE_TMP_BUFFER);
- if (suitesCpy == NULL)
+ if (suitesCpy == NULL) {
return WOLFSSL_FAILURE;
+ }
+
+ XMEMSET(suitesCpy, 0, suites->suiteSz);
}
+#else
+ XMEMSET(suitesCpy, 0, sizeof(suitesCpy));
#endif
if (suites->suiteSz > 0)
XMEMCPY(suitesCpy, suites->suites, suites->suiteSz);
suitesCpySz = suites->suiteSz;
- ret = SetCipherList(ctx, suites, list);
+ ret = SetCipherList_ex(ctx, ssl, suites, list);
if (ret != 1) {
#ifdef WOLFSSL_SMALL_STACK
XFREE(suitesCpy, NULL, DYNAMIC_TYPE_TMP_BUFFER);
@@ -11809,7 +12041,7 @@ int wolfSSL_CTX_set_cipher_list(WOLFSSL_CTX* ctx, const char* list)
return WOLFSSL_FAILURE;
#ifdef OPENSSL_EXTRA
- return wolfSSL_parse_cipher_list(ctx, ctx->suites, list);
+ return wolfSSL_parse_cipher_list(ctx, NULL, ctx->suites, list);
#else
return (SetCipherList(ctx, ctx->suites, list)) ?
WOLFSSL_SUCCESS : WOLFSSL_FAILURE;
@@ -11845,9 +12077,9 @@ int wolfSSL_set_cipher_list(WOLFSSL* ssl, const char* list)
return WOLFSSL_FAILURE;
#ifdef OPENSSL_EXTRA
- return wolfSSL_parse_cipher_list(ssl->ctx, ssl->suites, list);
+ return wolfSSL_parse_cipher_list(NULL, ssl, ssl->suites, list);
#else
- return (SetCipherList(ssl->ctx, ssl->suites, list)) ?
+ return (SetCipherList_ex(NULL, ssl, ssl->suites, list)) ?
WOLFSSL_SUCCESS :
WOLFSSL_FAILURE;
#endif
@@ -12418,10 +12650,13 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
return wolfSSL_connect_TLSv13(ssl);
#else
#ifdef WOLFSSL_TLS13
- if (ssl->options.tls1_3)
+ if (ssl->options.tls1_3) {
+ WOLFSSL_MSG("TLS 1.3");
return wolfSSL_connect_TLSv13(ssl);
+ }
#endif
+ WOLFSSL_MSG("TLS 1.2 or lower");
WOLFSSL_ENTER("wolfSSL_connect");
/* make sure this wolfSSL object has arrays and rng setup. Protects
@@ -12539,11 +12774,14 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
neededState = SERVER_HELLOVERIFYREQUEST_COMPLETE;
#endif
/* get response */
+ WOLFSSL_MSG("Server state up to needed state.");
while (ssl->options.serverState < neededState) {
+ WOLFSSL_MSG("Progressing server state...");
#ifdef WOLFSSL_TLS13
if (ssl->options.tls1_3)
return wolfSSL_connect_TLSv13(ssl);
#endif
+ WOLFSSL_MSG("ProcessReply...");
if ( (ssl->error = ProcessReply(ssl)) < 0) {
WOLFSSL_ERROR(ssl->error);
return WOLFSSL_FATAL_ERROR;
@@ -12559,6 +12797,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
neededState = SERVER_HELLODONE_COMPLETE;
}
}
+ WOLFSSL_MSG("ProcessReply done.");
#ifdef WOLFSSL_DTLS13
if (ssl->options.dtls && IsAtLeastTLSv1_3(ssl->version)
@@ -12947,7 +13186,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl,
(void)havePSK;
#ifdef HAVE_ANON
- haveAnon = ssl->options.haveAnon;
+ haveAnon = ssl->options.useAnon;
#endif
(void)haveAnon;
@@ -13389,9 +13628,9 @@ int wolfSSL_Cleanup(void)
WOLFSSL_ENTER("wolfSSL_Cleanup");
#ifndef WOLFSSL_MUTEX_INITIALIZER
- if (count_mutex_valid == 1) {
+ if (inits_count_mutex_valid == 1) {
#endif
- if (wc_LockMutex(&count_mutex) != 0) {
+ if (wc_LockMutex(&inits_count_mutex) != 0) {
WOLFSSL_MSG("Bad Lock Mutex count");
return BAD_MUTEX_E;
}
@@ -13406,9 +13645,9 @@ int wolfSSL_Cleanup(void)
}
#ifndef WOLFSSL_MUTEX_INITIALIZER
- if (count_mutex_valid == 1) {
+ if (inits_count_mutex_valid == 1) {
#endif
- wc_UnLockMutex(&count_mutex);
+ wc_UnLockMutex(&inits_count_mutex);
#ifndef WOLFSSL_MUTEX_INITIALIZER
}
#endif
@@ -13452,6 +13691,7 @@ int wolfSSL_Cleanup(void)
}
}
#ifndef NO_CLIENT_CACHE
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if ((clisession_mutex_valid == 1) &&
(wc_FreeMutex(&clisession_mutex) != 0)) {
if (ret == WOLFSSL_SUCCESS)
@@ -13459,14 +13699,15 @@ int wolfSSL_Cleanup(void)
}
clisession_mutex_valid = 0;
#endif
+ #endif
#endif /* !NO_SESSION_CACHE */
#ifndef WOLFSSL_MUTEX_INITIALIZER
- if ((count_mutex_valid == 1) && (wc_FreeMutex(&count_mutex) != 0)) {
+ if ((inits_count_mutex_valid == 1) && (wc_FreeMutex(&inits_count_mutex) != 0)) {
if (ret == WOLFSSL_SUCCESS)
ret = BAD_MUTEX_E;
}
- count_mutex_valid = 0;
+ inits_count_mutex_valid = 0;
#endif
#ifdef OPENSSL_EXTRA
@@ -13487,11 +13728,13 @@ int wolfSSL_Cleanup(void)
#endif
#ifdef HAVE_GLOBAL_RNG
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if ((globalRNGMutex_valid == 1) && (wc_FreeMutex(&globalRNGMutex) != 0)) {
if (ret == WOLFSSL_SUCCESS)
ret = BAD_MUTEX_E;
}
globalRNGMutex_valid = 0;
+#endif /* !WOLFSSL_MUTEX_INITIALIZER */
#if defined(OPENSSL_EXTRA) && defined(HAVE_HASHDRBG)
wolfSSL_FIPS_drbg_free(gDrbgDefCtx);
@@ -14469,6 +14712,9 @@ WOLFSSL_SESSION* ClientSessionToSession(const WOLFSSL_SESSION* session)
WOLFSSL_MSG("Client cache serverRow or serverIdx invalid");
error = -1;
}
+ /* Prevent memory access before clientSession->serverRow and
+ * clientSession->serverIdx are sanitized. */
+ XFENCE();
if (error == 0) {
/* Lock row */
sessRow = &SessionCache[clientSession->serverRow];
@@ -15543,7 +15789,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
#ifdef OPENSSL_EXTRA
/**
@@ -15600,7 +15846,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
const char* wolfSSL_get_psk_identity_hint(const WOLFSSL* ssl)
@@ -15691,7 +15937,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
if (ctx == NULL)
return WOLFSSL_FAILURE;
- ctx->haveAnon = 1;
+ ctx->useAnon = 1;
return WOLFSSL_SUCCESS;
}
@@ -15762,10 +16008,11 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
return BAD_FUNC_ARG;
}
- verify = GET_VERIFY_SETTING_CTX(ctx);
- if (WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS &
- WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY)
+ #if (WOLFSSL_LOAD_VERIFY_DEFAULT_FLAGS & WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY)
verify = VERIFY_SKIP_DATE;
+ #else
+ verify = GET_VERIFY_SETTING_CTX(ctx);
+ #endif
if (format == WOLFSSL_FILETYPE_PEM)
return ProcessChainBuffer(ctx, in, sz, format, TRUSTED_PEER_TYPE,
@@ -16115,6 +16362,15 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
ssl->buffers.weOwnKey = 0;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (ssl->buffers.weOwnAltKey) {
+ WOLFSSL_MSG("Unloading alt key");
+ ForceZero(ssl->buffers.altKey->buffer, ssl->buffers.altKey->length);
+ FreeDer(&ssl->buffers.altKey);
+ ssl->buffers.weOwnAltKey = 0;
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
return WOLFSSL_SUCCESS;
}
@@ -16129,6 +16385,22 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
return wolfSSL_CertManagerUnloadCAs(ctx->cm);
}
+ int wolfSSL_CTX_UnloadIntermediateCerts(WOLFSSL_CTX* ctx)
+ {
+ WOLFSSL_ENTER("wolfSSL_CTX_UnloadIntermediateCerts");
+
+ if (ctx == NULL)
+ return BAD_FUNC_ARG;
+
+ if (ctx->ref.count > 1) {
+ WOLFSSL_MSG("ctx object must have a ref count of 1 before "
+ "unloading intermediate certs");
+ return BAD_STATE_E;
+ }
+
+ return wolfSSL_CertManagerUnloadIntermediateCerts(ctx->cm);
+ }
+
#ifdef WOLFSSL_TRUST_PEER_CERT
int wolfSSL_CTX_Unload_trust_peers(WOLFSSL_CTX* ctx)
@@ -16393,7 +16665,7 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
/* cast so that compiler reminds us of unimplemented values */
switch ((enum SignatureAlgorithm)sigType) {
case anonymous_sa_algo:
- *sigAlgo = (enum Key_Sum)0;
+ *sigAlgo = ANONk;
break;
case rsa_sa_algo:
*sigAlgo = RSAk;
@@ -16710,6 +16982,11 @@ cleanup:
}
#endif
+#ifdef NO_FILESYSTEM
+ WOLFSSL_MSG("wolfSSL_CTX_set_default_verify_paths not supported"
+ " with NO_FILESYSTEM enabled");
+ ret = WOLFSSL_FATAL_ERROR;
+#else
ret = wolfSSL_CTX_load_system_CA_certs(ctx);
if (ret == WOLFSSL_BAD_PATH) {
/*
@@ -16718,6 +16995,7 @@ cleanup:
*/
ret = WOLFSSL_SUCCESS;
}
+#endif
WOLFSSL_LEAVE("wolfSSL_CTX_set_default_verify_paths", ret);
@@ -18860,7 +19138,7 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_set_peer_cert_chain(WOLFSSL* ssl)
sk = wolfSSL_sk_X509_new_null();
i = ssl->session->chain.count-1;
for (; i >= 0; i--) {
- x509 = wolfSSL_X509_new();
+ x509 = wolfSSL_X509_new_ex(ssl->heap);
if (x509 == NULL) {
WOLFSSL_MSG("Error Creating X509");
wolfSSL_sk_X509_pop_free(sk, NULL);
@@ -19228,9 +19506,10 @@ WOLFSSL_X509* wolfSSL_get_certificate(WOLFSSL* ssl)
return NULL;
}
#ifndef WOLFSSL_X509_STORE_CERTS
- ssl->ourCert = wolfSSL_X509_d2i(NULL,
+ ssl->ourCert = wolfSSL_X509_d2i_ex(NULL,
ssl->buffers.certificate->buffer,
- ssl->buffers.certificate->length);
+ ssl->buffers.certificate->length,
+ ssl->heap);
#endif
}
return ssl->ourCert;
@@ -19243,9 +19522,10 @@ WOLFSSL_X509* wolfSSL_get_certificate(WOLFSSL* ssl)
return NULL;
}
#ifndef WOLFSSL_X509_STORE_CERTS
- ssl->ctx->ourCert = wolfSSL_X509_d2i(NULL,
+ ssl->ctx->ourCert = wolfSSL_X509_d2i_ex(NULL,
ssl->ctx->certificate->buffer,
- ssl->ctx->certificate->length);
+ ssl->ctx->certificate->length,
+ ssl->heap);
#endif
ssl->ctx->ownOurCert = 1;
}
@@ -19265,9 +19545,9 @@ WOLFSSL_X509* wolfSSL_CTX_get0_certificate(WOLFSSL_CTX* ctx)
return NULL;
}
#ifndef WOLFSSL_X509_STORE_CERTS
- ctx->ourCert = wolfSSL_X509_d2i(NULL,
+ ctx->ourCert = wolfSSL_X509_d2i_ex(NULL,
ctx->certificate->buffer,
- ctx->certificate->length);
+ ctx->certificate->length, ctx->heap);
#endif
ctx->ownOurCert = 1;
}
@@ -19778,12 +20058,17 @@ void wolfSSL_FreeSession(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* session)
#ifdef HAVE_SESSION_TICKET
if (session->ticketLenAlloc > 0) {
XFREE(session->ticket, session->heap, DYNAMIC_TYPE_SESSION_TICK);
+ session->ticket = session->staticTicket;
+ session->ticketLen = 0;
+ session->ticketLenAlloc = 0;
}
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
if (session->ticketNonce.data != session->ticketNonce.dataStatic) {
XFREE(session->ticketNonce.data, session->heap,
DYNAMIC_TYPE_SESSION_TICK);
+ session->ticketNonce.data = session->ticketNonce.dataStatic;
+ session->ticketNonce.len = 0;
}
#endif /* WOLFSSL_TLS13 && WOLFSSL_TICKET_NONCE_MALLOC && FIPS_VERSION_GE(5,3)*/
#endif
@@ -21793,7 +22078,7 @@ long wolfSSL_set_options(WOLFSSL* ssl, long op)
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
return ssl->options.mask;
@@ -23150,7 +23435,7 @@ WOLFSSL_SESSION* wolfSSL_d2i_SSL_SESSION(WOLFSSL_SESSION** sess,
WOLFSSL_SESSION* s = NULL;
int ret = 0;
#if defined(HAVE_EXT_CACHE)
- int idx;
+ int idx = 0;
byte* data;
#ifdef SESSION_CERTS
int j;
@@ -24175,7 +24460,7 @@ static int pem_write_pubkey(WOLFSSL_EVP_PKEY* key, void* heap, byte** derBuf,
}
switch (key->type) {
-#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
case EVP_PKEY_RSA:
if ((sz = wolfSSL_RSA_To_Der(key->rsa, &buf, 1, heap))
< 0) {
@@ -24183,7 +24468,7 @@ static int pem_write_pubkey(WOLFSSL_EVP_PKEY* key, void* heap, byte** derBuf,
break;
}
break;
-#endif /* WOLFSSL_KEY_GEN && !NO_RSA && !HAVE_USER_RSA */
+#endif /* WOLFSSL_KEY_GEN && !NO_RSA */
#if !defined(NO_DSA) && !defined(HAVE_SELFTEST) && (defined(WOLFSSL_KEY_GEN) || \
defined(WOLFSSL_CERT_GEN))
case EVP_PKEY_DSA:
@@ -24373,119 +24658,167 @@ int wolfSSL_set1_sigalgs_list(WOLFSSL* ssl, const char* list)
return SetSuitesHashSigAlgo(ssl->suites, list);
}
-struct WOLFSSL_HashSigInfo {
- int hashAlgo;
- int sigAlgo;
- int nid;
-} wolfssl_hash_sig_info[] =
+static int HashToNid(byte hashAlgo, int* nid)
{
-#ifndef NO_RSA
- #ifndef NO_SHA256
- { sha256_mac, rsa_sa_algo, CTC_SHA256wRSA },
- #endif
- #ifdef WOLFSSL_SHA384
- { sha384_mac, rsa_sa_algo, CTC_SHA384wRSA },
- #endif
- #ifdef WOLFSSL_SHA512
- { sha512_mac, rsa_sa_algo, CTC_SHA512wRSA },
- #endif
- #ifdef WOLFSSL_SHA224
- { sha224_mac, rsa_sa_algo, CTC_SHA224wRSA },
- #endif
- #ifndef NO_SHA
- { sha_mac, rsa_sa_algo, CTC_SHAwRSA },
- #endif
- #ifdef WC_RSA_PSS
- #ifndef NO_SHA256
- { sha256_mac, rsa_pss_sa_algo, CTC_SHA256wRSA },
- #endif
- #ifdef WOLFSSL_SHA384
- { sha384_mac, rsa_pss_sa_algo, CTC_SHA384wRSA },
- #endif
- #ifdef WOLFSSL_SHA512
- { sha512_mac, rsa_pss_sa_algo, CTC_SHA512wRSA },
- #endif
- #ifdef WOLFSSL_SHA224
- { sha224_mac, rsa_pss_sa_algo, CTC_SHA224wRSA },
- #endif
- #endif
-#endif
-#ifdef HAVE_ECC
- #ifndef NO_SHA256
- { sha256_mac, ecc_dsa_sa_algo, CTC_SHA256wECDSA },
- #endif
- #ifdef WOLFSSL_SHA384
- { sha384_mac, ecc_dsa_sa_algo, CTC_SHA384wECDSA },
- #endif
- #ifdef WOLFSSL_SHA512
- { sha512_mac, ecc_dsa_sa_algo, CTC_SHA512wECDSA },
- #endif
- #ifdef WOLFSSL_SHA224
- { sha224_mac, ecc_dsa_sa_algo, CTC_SHA224wECDSA },
- #endif
- #ifndef NO_SHA
- { sha_mac, ecc_dsa_sa_algo, CTC_SHAwECDSA },
- #endif
-#endif
-#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- { sm3_mac, sm2_sa_algo, CTC_SM3wSM2 },
-#endif
+ int ret = WOLFSSL_SUCCESS;
+
+ /* Cast for compiler to check everything is implemented */
+ switch ((enum wc_MACAlgorithm)hashAlgo) {
+ case no_mac:
+ case rmd_mac:
+ *nid = NID_undef;
+ break;
+ case md5_mac:
+ *nid = NID_md5;
+ break;
+ case sha_mac:
+ *nid = NID_sha1;
+ break;
+ case sha224_mac:
+ *nid = NID_sha224;
+ break;
+ case sha256_mac:
+ *nid = NID_sha256;
+ break;
+ case sha384_mac:
+ *nid = NID_sha384;
+ break;
+ case sha512_mac:
+ *nid = NID_sha512;
+ break;
+ case blake2b_mac:
+ *nid = NID_blake2b512;
+ break;
+ case sm3_mac:
+ *nid = NID_sm3;
+ break;
+ default:
+ ret = WOLFSSL_FAILURE;
+ break;
+ }
+
+ return ret;
+}
+
+static int SaToNid(byte sa, int* nid)
+{
+ int ret = WOLFSSL_SUCCESS;
+ /* Cast for compiler to check everything is implemented */
+ switch ((enum SignatureAlgorithm)sa) {
+ case anonymous_sa_algo:
+ *nid = NID_undef;
+ break;
+ case rsa_sa_algo:
+ *nid = NID_rsaEncryption;
+ break;
+ case dsa_sa_algo:
+ *nid = NID_dsa;
+ break;
+ case ecc_dsa_sa_algo:
+ *nid = NID_X9_62_id_ecPublicKey;
+ break;
+ case rsa_pss_sa_algo:
+ *nid = NID_rsassaPss;
+ break;
+ case ed25519_sa_algo:
#ifdef HAVE_ED25519
- { no_mac, ed25519_sa_algo, CTC_ED25519 },
+ *nid = NID_ED25519;
+#else
+ ret = WOLFSSL_FAILURE;
#endif
+ break;
+ case rsa_pss_pss_algo:
+ *nid = NID_rsassaPss;
+ break;
+ case ed448_sa_algo:
#ifdef HAVE_ED448
- { no_mac, ed448_sa_algo, CTC_ED448 },
-#endif
-#ifdef HAVE_PQC
-#ifdef HAVE_FALCON
- { no_mac, falcon_level1_sa_algo, CTC_FALCON_LEVEL1 },
- { no_mac, falcon_level5_sa_algo, CTC_FALCON_LEVEL5 },
-#endif /* HAVE_FALCON */
-#ifdef HAVE_DILITHIUM
- { no_mac, dilithium_level2_sa_algo, CTC_DILITHIUM_LEVEL2 },
- { no_mac, dilithium_level3_sa_algo, CTC_DILITHIUM_LEVEL3 },
- { no_mac, dilithium_level5_sa_algo, CTC_DILITHIUM_LEVEL5 },
-#endif /* HAVE_DILITHIUM */
-#endif /* HAVE_PQC */
-#ifndef NO_DSA
- #ifndef NO_SHA
- { sha_mac, dsa_sa_algo, CTC_SHAwDSA },
- #endif
+ *nid = NID_ED448;
+#else
+ ret = WOLFSSL_FAILURE;
#endif
-};
-#define WOLFSSL_HASH_SIG_INFO_SZ \
- (int)(sizeof(wolfssl_hash_sig_info)/sizeof(*wolfssl_hash_sig_info))
+ break;
+ case falcon_level1_sa_algo:
+ *nid = CTC_FALCON_LEVEL1;
+ break;
+ case falcon_level5_sa_algo:
+ *nid = CTC_FALCON_LEVEL5;
+ break;
+ case dilithium_level2_sa_algo:
+ *nid = CTC_DILITHIUM_LEVEL2;
+ break;
+ case dilithium_level3_sa_algo:
+ *nid = CTC_DILITHIUM_LEVEL3;
+ break;
+ case dilithium_level5_sa_algo:
+ *nid = CTC_DILITHIUM_LEVEL5;
+ break;
+ case sm2_sa_algo:
+ *nid = NID_sm2;
+ break;
+ case invalid_sa_algo:
+ default:
+ ret = WOLFSSL_FAILURE;
+ break;
+ }
+ return ret;
+}
+/* This API returns the hash selected. */
int wolfSSL_get_signature_nid(WOLFSSL *ssl, int* nid)
{
- int i;
- int ret = WOLFSSL_FAILURE;
-
WOLFSSL_MSG("wolfSSL_get_signature_nid");
- if (ssl == NULL) {
+ if (ssl == NULL || nid == NULL) {
WOLFSSL_MSG("Bad function arguments");
return WOLFSSL_FAILURE;
}
- for (i = 0; i < WOLFSSL_HASH_SIG_INFO_SZ; i++) {
- if (ssl->options.hashAlgo == wolfssl_hash_sig_info[i].hashAlgo &&
- ssl->options.sigAlgo == wolfssl_hash_sig_info[i].sigAlgo) {
- *nid = wolfssl_hash_sig_info[i].nid;
- ret = WOLFSSL_SUCCESS;
- break;
- }
+ return HashToNid(ssl->options.hashAlgo, nid);
+}
+
+/* This API returns the signature selected. */
+int wolfSSL_get_signature_type_nid(const WOLFSSL* ssl, int* nid)
+{
+ WOLFSSL_MSG("wolfSSL_get_signature_type_nid");
+
+ if (ssl == NULL || nid == NULL) {
+ WOLFSSL_MSG("Bad function arguments");
+ return WOLFSSL_FAILURE;
}
- return ret;
+ return SaToNid(ssl->options.sigAlgo, nid);
+}
+
+int wolfSSL_get_peer_signature_nid(WOLFSSL* ssl, int* nid)
+{
+ WOLFSSL_MSG("wolfSSL_get_peer_signature_nid");
+
+ if (ssl == NULL || nid == NULL) {
+ WOLFSSL_MSG("Bad function arguments");
+ return WOLFSSL_FAILURE;
+ }
+
+ return HashToNid(ssl->options.peerHashAlgo, nid);
+}
+
+int wolfSSL_get_peer_signature_type_nid(const WOLFSSL* ssl, int* nid)
+{
+ WOLFSSL_MSG("wolfSSL_get_peer_signature_type_nid");
+
+ if (ssl == NULL || nid == NULL) {
+ WOLFSSL_MSG("Bad function arguments");
+ return WOLFSSL_FAILURE;
+ }
+
+ return SaToNid(ssl->options.peerSigAlgo, nid);
}
#ifdef HAVE_ECC
#if defined(WOLFSSL_TLS13) && defined(HAVE_SUPPORTED_CURVES)
-static int populate_groups(int* groups, int max_count, char *list)
+static int populate_groups(int* groups, int max_count, const char *list)
{
- char *end;
+ const char *end;
int count = 0;
const WOLF_EC_NIST_NAME* nist_name;
@@ -24525,10 +24858,10 @@ static int populate_groups(int* groups, int max_count, char *list)
return count;
}
-int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, char *list)
+int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, const char *list)
{
int groups[WOLFSSL_MAX_GROUP_COUNT];
- int count;
+ int count = 0;
if (!ctx || !list) {
return WOLFSSL_FAILURE;
@@ -24542,10 +24875,10 @@ int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, char *list)
return wolfSSL_CTX_set1_groups(ctx, groups, count);
}
-int wolfSSL_set1_groups_list(WOLFSSL *ssl, char *list)
+int wolfSSL_set1_groups_list(WOLFSSL *ssl, const char *list)
{
int groups[WOLFSSL_MAX_GROUP_COUNT];
- int count;
+ int count = 0;
if (!ssl || !list) {
return WOLFSSL_FAILURE;
@@ -24769,7 +25102,7 @@ byte* wolfSSL_get_chain_cert(WOLFSSL_X509_CHAIN* chain, int idx)
/* Get peer's wolfSSL X509 certificate at index (idx) */
WOLFSSL_X509* wolfSSL_get_chain_X509(WOLFSSL_X509_CHAIN* chain, int idx)
{
- int ret;
+ int ret = 0;
WOLFSSL_X509* x509 = NULL;
#ifdef WOLFSSL_SMALL_STACK
DecodedCert* cert = NULL;
@@ -26220,7 +26553,8 @@ void* wolfSSL_GetHKDFExtractCtx(WOLFSSL* ssl)
return WOLFSSL_FAILURE;
}
#else
- ctx->ourCert = wolfSSL_X509_d2i(NULL, x->derCert->buffer,x->derCert->length);
+ ctx->ourCert = wolfSSL_X509_d2i_ex(NULL, x->derCert->buffer,
+ x->derCert->length, ctx->heap);
if(ctx->ourCert == NULL){
return WOLFSSL_FAILURE;
}
@@ -26838,7 +27172,7 @@ int wolfSSL_CTX_use_PrivateKey(WOLFSSL_CTX *ctx, WOLFSSL_EVP_PKEY *pkey)
}
switch (pkey->type) {
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA) && !defined(NO_RSA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
case EVP_PKEY_RSA:
WOLFSSL_MSG("populating RSA key");
if (PopulateRSAEvpPkeyDer(pkey) != WOLFSSL_SUCCESS)
@@ -27271,6 +27605,11 @@ void wolfSSL_certs_clear(WOLFSSL* ssl)
ssl->buffers.keyLabel = 0;
ssl->buffers.keySz = 0;
ssl->buffers.keyDevId = 0;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (ssl->buffers.weOwnAltKey)
+ FreeDer(&ssl->buffers.altKey);
+ ssl->buffers.altKey = NULL;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
}
#endif
@@ -27493,8 +27832,7 @@ int wolfSSL_CTX_use_certificate_ASN1(WOLFSSL_CTX *ctx, int derSz,
}
-#if !defined(HAVE_FAST_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
/* Adds the rsa private key to the user ctx.
Returns WOLFSSL_SUCCESS if no error, returns WOLFSSL_FAILURE otherwise.*/
int wolfSSL_CTX_use_RSAPrivateKey(WOLFSSL_CTX* ctx, WOLFSSL_RSA* rsa)
@@ -27532,7 +27870,7 @@ int wolfSSL_CTX_use_RSAPrivateKey(WOLFSSL_CTX* ctx, WOLFSSL_RSA* rsa)
XFREE(maxDerBuf, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return ret;
}
-#endif /* NO_RSA && !HAVE_FAST_RSA */
+#endif /* WOLFSSL_KEY_GEN && !NO_RSA */
#ifndef NO_BIO
@@ -28072,6 +28410,11 @@ WOLFSSL_CTX* wolfSSL_set_SSL_CTX(WOLFSSL* ssl, WOLFSSL_CTX* ctx)
ssl->options.haveStaticECC = ctx->haveStaticECC;
ssl->options.haveFalconSig = ctx->haveFalconSig;
ssl->options.haveDilithiumSig = ctx->haveDilithiumSig;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ ssl->buffers.altKey = ctx->altPrivateKey;
+ ssl->buffers.altKeySz = ctx->altPrivateKeySz;
+ ssl->buffers.altKeyType = ctx->altPrivateKeyType;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#endif
#ifdef WOLFSSL_SESSION_ID_CTX
@@ -28309,6 +28652,7 @@ static int wolfSSL_SESSION_print_ticket(WOLFSSL_BIO* bio,
for (i = 0; i < sz;) {
char asc[16];
+ XMEMSET(asc, 0, sizeof(asc));
if (sz - i < 16) {
if (wolfSSL_BIO_printf(bio, "%s%04X -", tab, tag + (sz - i)) <= 0)
@@ -30056,8 +30400,8 @@ int wolfSSL_CTX_get_extra_chain_certs(WOLFSSL_CTX* ctx, WOLF_STACK_OF(X509)** ch
idx += 3;
/* Create a new X509 from DER encoded data. */
- node->data.x509 = wolfSSL_X509_d2i(NULL, ctx->certChain->buffer + idx,
- length);
+ node->data.x509 = wolfSSL_X509_d2i_ex(NULL,
+ ctx->certChain->buffer + idx, length, ctx->heap);
if (node->data.x509 == NULL) {
XFREE(node, NULL, DYNAMIC_TYPE_OPENSSL);
/* Return as much of the chain as we created. */
@@ -30337,9 +30681,9 @@ int wolfSSL_curve_is_disabled(const WOLFSSL* ssl, word16 curve_id)
}
if (curve_id >= 32) {
/* 0 is for invalid and 1-14 aren't used otherwise. */
- return (ssl->disabledCurves & (1 << (curve_id - 32))) != 0;
+ return (ssl->disabledCurves & (1U << (curve_id - 32))) != 0;
}
- return (ssl->disabledCurves & (1 << curve_id)) != 0;
+ return (ssl->disabledCurves & (1U << curve_id)) != 0;
}
#if (defined(HAVE_ECC) || \
@@ -32617,6 +32961,7 @@ void wolfSSL_BUF_MEM_free(WOLFSSL_BUF_MEM* buf)
#if defined(OPENSSL_EXTRA) && !defined(WOLFSSL_NO_OPENSSL_RAND_CB)
static int wolfSSL_RAND_InitMutex(void)
{
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (gRandMethodsInit == 0) {
if (wc_InitMutex(&gRandMethodMutex) != 0) {
WOLFSSL_MSG("Bad Init Mutex rand methods");
@@ -32624,6 +32969,7 @@ static int wolfSSL_RAND_InitMutex(void)
}
gRandMethodsInit = 1;
}
+#endif
return 0;
}
#endif
@@ -32692,7 +33038,7 @@ int wolfSSL_RAND_seed(const void* seed, int len)
*/
const char* wolfSSL_RAND_file_name(char* fname, unsigned long len)
{
-#ifndef NO_FILESYSTEM
+#if !defined(NO_FILESYSTEM) && defined(XGETENV)
char* rt;
WOLFSSL_ENTER("wolfSSL_RAND_file_name");
@@ -32702,7 +33048,7 @@ const char* wolfSSL_RAND_file_name(char* fname, unsigned long len)
}
XMEMSET(fname, 0, len);
- /* if access to stdlib.h */
+
if ((rt = XGETENV("RANDFILE")) != NULL) {
if (len > XSTRLEN(rt)) {
XMEMCPY(fname, rt, XSTRLEN(rt));
@@ -32715,7 +33061,7 @@ const char* wolfSSL_RAND_file_name(char* fname, unsigned long len)
/* $RANDFILE was not set or is too large, check $HOME */
if (rt == NULL) {
- char ap[] = "/.rnd";
+ const char ap[] = "/.rnd";
WOLFSSL_MSG("Environment variable RANDFILE not set");
if ((rt = XGETENV("HOME")) == NULL) {
@@ -32723,7 +33069,7 @@ const char* wolfSSL_RAND_file_name(char* fname, unsigned long len)
return NULL;
}
- if (len > XSTRLEN(rt) + XSTRLEN(ap)) {
+ if (len > XSTRLEN(rt) + XSTRLEN(ap)) {
fname[0] = '\0';
XSTRNCAT(fname, rt, len);
XSTRNCAT(fname, ap, len - XSTRLEN(rt));
@@ -32737,9 +33083,9 @@ const char* wolfSSL_RAND_file_name(char* fname, unsigned long len)
return fname;
#else
- /* no filesystem defined */
WOLFSSL_ENTER("wolfSSL_RAND_file_name");
- WOLFSSL_MSG("No filesystem feature enabled, not compiled in");
+ WOLFSSL_MSG("RAND_file_name requires filesystem and getenv support, "
+ "not compiled in");
(void)fname;
(void)len;
return NULL;
@@ -32995,8 +33341,10 @@ void wolfSSL_RAND_Cleanup(void)
wc_UnLockMutex(&gRandMethodMutex);
}
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (wc_FreeMutex(&gRandMethodMutex) == 0)
gRandMethodsInit = 0;
+ #endif
#endif
#ifdef HAVE_GLOBAL_RNG
if (wc_LockMutex(&globalRNGMutex) == 0) {
@@ -33783,8 +34131,8 @@ WOLFSSL_STACK* wolfSSL_PKCS7_to_stack(PKCS7* pkcs7)
return p7->certs;
for (i = 0; i < MAX_PKCS7_CERTS && p7->pkcs7.cert[i]; i++) {
- WOLFSSL_X509* x509 = wolfSSL_X509_d2i(NULL, p7->pkcs7.cert[i],
- p7->pkcs7.certSz[i]);
+ WOLFSSL_X509* x509 = wolfSSL_X509_d2i_ex(NULL, p7->pkcs7.cert[i],
+ p7->pkcs7.certSz[i], pkcs7->heap);
if (!ret)
ret = wolfSSL_sk_X509_new_null();
if (x509) {
@@ -35199,7 +35547,7 @@ void wolfSSL_PKCS12_PBE_add(void)
WOLFSSL_ENTER("wolfSSL_PKCS12_PBE_add");
}
-#if !defined(NO_FILESYSTEM)
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
WOLFSSL_X509_PKCS12 *wolfSSL_d2i_PKCS12_fp(XFILE fp,
WOLFSSL_X509_PKCS12 **pkcs12)
{
diff --git a/extra/wolfssl/wolfssl/src/ssl_bn.c b/extra/wolfssl/wolfssl/src/ssl_bn.c
index 8a054c80..cbb4a92f 100644
--- a/extra/wolfssl/wolfssl/src/ssl_bn.c
+++ b/extra/wolfssl/wolfssl/src/ssl_bn.c
@@ -2303,7 +2303,8 @@ int wolfSSL_BN_is_prime_ex(const WOLFSSL_BIGNUM *bn, int checks,
* Print APIs
******************************************************************************/
-#if !defined(NO_FILESYSTEM) && defined(XFPRINTF)
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) && \
+ defined(XFPRINTF)
/* Print big number to file pointer.
*
* Return code compliant with OpenSSL.
diff --git a/extra/wolfssl/wolfssl/src/ssl_certman.c b/extra/wolfssl/wolfssl/src/ssl_certman.c
index 65a6c559..e074996a 100644
--- a/extra/wolfssl/wolfssl/src/ssl_certman.c
+++ b/extra/wolfssl/wolfssl/src/ssl_certman.c
@@ -25,7 +25,7 @@
#include <wolfssl/wolfcrypt/settings.h>
- #include <wolfssl/internal.h>
+#include <wolfssl/internal.h>
#if !defined(WOLFSSL_SSL_CERTMAN_INCLUDED)
#ifndef WOLFSSL_IGNORE_FILE_WARN
@@ -42,33 +42,33 @@
* @return A TLS method on success.
* @return NULL when no TLS method built into wolfSSL.
*/
-static WC_INLINE WOLFSSL_METHOD* cm_pick_method(void)
+static WC_INLINE WOLFSSL_METHOD* cm_pick_method(void* heap)
{
#ifndef NO_WOLFSSL_CLIENT
#if !defined(NO_OLD_TLS) && defined(WOLFSSL_ALLOW_SSLV3)
- return wolfSSLv3_client_method();
+ return wolfSSLv3_client_method_ex(heap);
#elif !defined(NO_OLD_TLS) && defined(WOLFSSL_ALLOW_TLSV10)
- return wolfTLSv1_client_method();
+ return wolfTLSv1_client_method_ex(heap);
#elif !defined(NO_OLD_TLS)
- return wolfTLSv1_1_client_method();
+ return wolfTLSv1_1_client_method_ex(heap);
#elif !defined(WOLFSSL_NO_TLS12)
- return wolfTLSv1_2_client_method();
+ return wolfTLSv1_2_client_method_ex(heap);
#elif defined(WOLFSSL_TLS13)
- return wolfTLSv1_3_client_method();
+ return wolfTLSv1_3_client_method_ex(heap);
#else
return NULL;
#endif
#elif !defined(NO_WOLFSSL_SERVER)
#if !defined(NO_OLD_TLS) && defined(WOLFSSL_ALLOW_SSLV3)
- return wolfSSLv3_server_method();
+ return wolfSSLv3_server_method_ex(heap);
#elif !defined(NO_OLD_TLS) && defined(WOLFSSL_ALLOW_TLSV10)
- return wolfTLSv1_server_method();
+ return wolfTLSv1_server_method_ex(heap);
#elif !defined(NO_OLD_TLS)
- return wolfTLSv1_1_server_method();
+ return wolfTLSv1_1_server_method_ex(heap);
#elif !defined(WOLFSSL_NO_TLS12)
- return wolfTLSv1_2_server_method();
+ return wolfTLSv1_2_server_method_ex(heap);
#elif defined(WOLFSSL_TLS13)
- return wolfTLSv1_3_server_method();
+ return wolfTLSv1_3_server_method_ex(heap);
#else
return NULL;
#endif
@@ -89,11 +89,22 @@ WOLFSSL_CERT_MANAGER* wolfSSL_CertManagerNew_ex(void* heap)
WOLFSSL_CERT_MANAGER* cm;
WOLFSSL_ENTER("wolfSSL_CertManagerNew");
+ if (heap == NULL) {
+ WOLFSSL_MSG("heap param is null");
+ }
+ else {
+ /* Some systems may have heap in unexpected segments. (IRAM vs DRAM) */
+ WOLFSSL_MSG_EX("heap param = %p", heap);
+ }
+ WOLFSSL_MSG_EX("DYNAMIC_TYPE_CERT_MANAGER Allocating = %d bytes",
+ (word32)sizeof(WOLFSSL_CERT_MANAGER));
/* Allocate memory for certificate manager. */
cm = (WOLFSSL_CERT_MANAGER*)XMALLOC(sizeof(WOLFSSL_CERT_MANAGER), heap,
DYNAMIC_TYPE_CERT_MANAGER);
if (cm == NULL) {
+ WOLFSSL_MSG_EX("XMALLOC failed to allocate WOLFSSL_CERT_MANAGER %d "
+ "bytes.", (int)sizeof(WOLFSSL_CERT_MANAGER));
err = 1;
}
if (!err) {
@@ -446,6 +457,31 @@ int wolfSSL_CertManagerUnloadCAs(WOLFSSL_CERT_MANAGER* cm)
return ret;
}
+int wolfSSL_CertManagerUnloadIntermediateCerts(WOLFSSL_CERT_MANAGER* cm)
+{
+ int ret = WOLFSSL_SUCCESS;
+
+ WOLFSSL_ENTER("wolfSSL_CertManagerUnloadIntermediateCerts");
+
+ /* Validate parameter. */
+ if (cm == NULL) {
+ ret = BAD_FUNC_ARG;
+ }
+ /* Lock CA table. */
+ if ((ret == WOLFSSL_SUCCESS) && (wc_LockMutex(&cm->caLock) != 0)) {
+ ret = BAD_MUTEX_E;
+ }
+ if (ret == WOLFSSL_SUCCESS) {
+ /* Dispose of CA table. */
+ FreeSignerTableType(cm->caTable, CA_TABLE_SIZE, WOLFSSL_CHAIN_CA,
+ cm->heap);
+
+ /* Unlock CA table. */
+ wc_UnLockMutex(&cm->caLock);
+ }
+
+ return ret;
+}
#ifdef WOLFSSL_TRUST_PEER_CERT
/* Unload the trusted peers table.
@@ -513,8 +549,8 @@ int wolfSSL_CertManagerLoadCABuffer_ex(WOLFSSL_CERT_MANAGER* cm,
ret = WOLFSSL_FATAL_ERROR;
}
/* Allocate a temporary WOLFSSL_CTX to load with. */
- if ((ret == WOLFSSL_SUCCESS) && ((tmp = wolfSSL_CTX_new(cm_pick_method()))
- == NULL)) {
+ if ((ret == WOLFSSL_SUCCESS) && ((tmp =
+ wolfSSL_CTX_new_ex(cm_pick_method(cm->heap), cm->heap)) == NULL)) {
WOLFSSL_MSG("CTX new failed");
ret = WOLFSSL_FATAL_ERROR;
}
@@ -575,6 +611,19 @@ void wolfSSL_CertManagerSetVerify(WOLFSSL_CERT_MANAGER* cm, VerifyCallback vc)
}
#endif /* NO_WOLFSSL_CM_VERIFY */
+#if defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ASN_TEMPLATE) \
+ && defined(HAVE_OID_DECODING)
+void wolfSSL_CertManagerSetUnknownExtCallback(WOLFSSL_CERT_MANAGER* cm,
+ wc_UnknownExtCallback cb)
+{
+ WOLFSSL_ENTER("wolfSSL_CertManagerSetUnknownExtCallback");
+ if (cm != NULL) {
+ cm->unknownExtCallback = cb;
+ }
+
+}
+#endif /* WOLFSSL_CUSTOM_OID && WOLFSSL_ASN_TEMPLATE && HAVE_OID_DECODING */
+
#if !defined(NO_WOLFSSL_CLIENT) || !defined(WOLFSSL_NO_CLIENT_AUTH)
/* Verify the certificate.
*
@@ -643,6 +692,12 @@ int CM_VerifyBuffer_ex(WOLFSSL_CERT_MANAGER* cm, const unsigned char* buff,
/* Create a decoded certificate with DER buffer. */
InitDecodedCert(cert, buff, (word32)sz, cm->heap);
+#if defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ASN_TEMPLATE) \
+ && defined(HAVE_OID_DECODING)
+ if (cm->unknownExtCallback != NULL)
+ wc_SetUnknownExtCallback(cert, cm->unknownExtCallback);
+#endif
+
/* Parse DER into decoded certificate fields and verify signature
* against a known CA. */
ret = ParseCertRelative(cert, CERT_TYPE, VERIFY, cm);
@@ -876,8 +931,8 @@ int wolfSSL_CertManagerLoadCA(WOLFSSL_CERT_MANAGER* cm, const char* file,
ret = WOLFSSL_FATAL_ERROR;
}
/* Create temporary WOLFSSL_CTX. */
- if ((ret == WOLFSSL_SUCCESS) && ((tmp = wolfSSL_CTX_new(cm_pick_method()))
- == NULL)) {
+ if ((ret == WOLFSSL_SUCCESS) && ((tmp =
+ wolfSSL_CTX_new_ex(cm_pick_method(cm->heap), cm->heap)) == NULL)) {
WOLFSSL_MSG("CTX new failed");
ret = WOLFSSL_FATAL_ERROR;
}
diff --git a/extra/wolfssl/wolfssl/src/tls.c b/extra/wolfssl/wolfssl/src/tls.c
index 48d76dfa..a28568c6 100644
--- a/extra/wolfssl/wolfssl/src/tls.c
+++ b/extra/wolfssl/wolfssl/src/tls.c
@@ -182,10 +182,12 @@ int BuildTlsFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
byte handshake_hash[HSHASH_SZ];
#else
WC_DECLARE_VAR(handshake_hash, byte, HSHASH_SZ, ssl->heap);
+ WC_ALLOC_VAR(handshake_hash, byte, HSHASH_SZ, ssl->heap);
if (handshake_hash == NULL)
return MEMORY_E;
#endif
+ XMEMSET(handshake_hash, 0, HSHASH_SZ);
ret = BuildTlsHandshakeHash(ssl, handshake_hash, &hashSz);
if (ret == 0) {
if (XSTRNCMP((const char*)sender, (const char*)kTlsClientStr,
@@ -316,6 +318,7 @@ static int _DeriveTlsKeys(byte* key_dig, word32 key_dig_len,
int ret;
#if defined(WOLFSSL_ASYNC_CRYPT) && !defined(WC_ASYNC_NO_HASH)
WC_DECLARE_VAR(seed, byte, SEED_LEN, heap);
+ WC_ALLOC_VAR(seed, byte, SEED_LEN, heap);
if (seed == NULL)
return MEMORY_E;
#else
@@ -421,6 +424,7 @@ static int _MakeTlsMasterSecret(byte* ms, word32 msLen,
byte seed[SEED_LEN];
#else
WC_DECLARE_VAR(seed, byte, SEED_LEN, heap);
+ WC_ALLOC_VAR(seed, byte, SEED_LEN, heap);
if (seed == NULL)
return MEMORY_E;
#endif
@@ -544,6 +548,7 @@ int MakeTlsMasterSecret(WOLFSSL* ssl)
byte handshake_hash[HSHASH_SZ];
#endif
+ XMEMSET(handshake_hash, 0, HSHASH_SZ);
ret = BuildTlsHandshakeHash(ssl, handshake_hash, &hashSz);
if (ret == 0) {
ret = _MakeTlsExtendedMasterSecret(
@@ -1324,6 +1329,10 @@ static WC_INLINE word16 TLSX_ToSemaphore(word16 type)
case TLSX_ECH: /* 0xfe0d */
return 65;
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ case TLSX_CKS:
+ return 66;
+#endif
default:
if (type > 62) {
/* This message SHOULD only happens during the adding of
@@ -3080,14 +3089,15 @@ static word16 TLSX_CSR_GetSize(CertificateStatusRequest* csr, byte isRequest)
return size;
}
-static word16 TLSX_CSR_Write(CertificateStatusRequest* csr, byte* output,
- byte isRequest)
+static int TLSX_CSR_Write(CertificateStatusRequest* csr, byte* output,
+ byte isRequest)
{
/* shut up compiler warnings */
(void) csr; (void) output; (void) isRequest;
#ifndef NO_WOLFSSL_CLIENT
if (isRequest) {
+ int ret = 0;
word16 offset = 0;
word16 length = 0;
@@ -3101,19 +3111,26 @@ static word16 TLSX_CSR_Write(CertificateStatusRequest* csr, byte* output,
offset += OPAQUE16_LEN;
/* request extensions */
- if (csr->request.ocsp.nonceSz)
- length = (word16)EncodeOcspRequestExtensions(
- &csr->request.ocsp,
+ if (csr->request.ocsp.nonceSz) {
+ ret = (int)EncodeOcspRequestExtensions(&csr->request.ocsp,
output + offset + OPAQUE16_LEN,
OCSP_NONCE_EXT_SZ);
+ if (ret > 0) {
+ length = (word16)ret;
+ }
+ else {
+ return ret;
+ }
+ }
+
c16toa(length, output + offset);
offset += OPAQUE16_LEN + length;
break;
}
- return offset;
+ return (int)offset;
}
#endif
#if defined(WOLFSSL_TLS13) && !defined(NO_WOLFSSL_SERVER)
@@ -3541,7 +3558,7 @@ static word16 TLSX_CSR2_GetSize(CertificateStatusRequestItemV2* csr2,
return size;
}
-static word16 TLSX_CSR2_Write(CertificateStatusRequestItemV2* csr2,
+static int TLSX_CSR2_Write(CertificateStatusRequestItemV2* csr2,
byte* output, byte isRequest)
{
/* shut up compiler warnings */
@@ -3549,6 +3566,7 @@ static word16 TLSX_CSR2_Write(CertificateStatusRequestItemV2* csr2,
#ifndef NO_WOLFSSL_CLIENT
if (isRequest) {
+ int ret = 0;
word16 offset;
word16 length;
@@ -3576,12 +3594,20 @@ static word16 TLSX_CSR2_Write(CertificateStatusRequestItemV2* csr2,
/* request extensions */
length = 0;
- if (csr2->request.ocsp[0].nonceSz)
- length = (word16)EncodeOcspRequestExtensions(
+ if (csr2->request.ocsp[0].nonceSz) {
+ ret = (int)EncodeOcspRequestExtensions(
&csr2->request.ocsp[0],
output + offset + OPAQUE16_LEN,
OCSP_NONCE_EXT_SZ);
+ if (ret > 0) {
+ length = (word16)ret;
+ }
+ else {
+ return ret;
+ }
+ }
+
c16toa(length, output + offset);
offset += OPAQUE16_LEN + length;
break;
@@ -3591,7 +3617,7 @@ static word16 TLSX_CSR2_Write(CertificateStatusRequestItemV2* csr2,
/* list size */
c16toa(offset - OPAQUE16_LEN, output);
- return offset;
+ return (int)offset;
}
#endif
@@ -6473,7 +6499,7 @@ static int TLSX_Cookie_Parse(WOLFSSL* ssl, const byte* input, word16 length,
return BUFFER_E;
if (msgType == hello_retry_request)
- return TLSX_Cookie_Use(ssl, input + idx, len, NULL, 0, 0,
+ return TLSX_Cookie_Use(ssl, input + idx, len, NULL, 0, 1,
&ssl->extensions);
/* client_hello */
@@ -7453,7 +7479,9 @@ static int TLSX_KeyShare_GenEccKey(WOLFSSL *ssl, KeyShareEntry* kse)
/* Allocate an ECC key to hold private key. */
kse->key = (byte*)XMALLOC(sizeof(ecc_key), ssl->heap, DYNAMIC_TYPE_ECC);
if (kse->key == NULL) {
- WOLFSSL_MSG("EccTempKey Memory error");
+ WOLFSSL_MSG_EX("Failed to allocate %d bytes, ssl->heap: %p",
+ (int)sizeof(ecc_key), (wc_ptr_t)ssl->heap);
+ WOLFSSL_MSG("EccTempKey Memory error!");
return MEMORY_E;
}
@@ -7652,6 +7680,13 @@ static int TLSX_KeyShare_GenPqcKey(WOLFSSL *ssl, KeyShareEntry* kse)
word32 privSz = 0;
word32 pubSz = 0;
+ /* This gets called twice. Once during parsing of the key share and once
+ * during the population of the extension. No need to do work the second
+ * time. Just return success if its already been done. */
+ if (kse->pubKey != NULL) {
+ return ret;
+ }
+
findEccPqc(&ecc_group, &oqs_group, kse->group);
ret = kyber_id2type(oqs_group, &type);
if (ret == NOT_COMPILED_IN) {
@@ -7721,17 +7756,19 @@ static int TLSX_KeyShare_GenPqcKey(WOLFSSL *ssl, KeyShareEntry* kse)
ret = wc_KyberKey_EncodePrivateKey(kem, privKey, privSz);
}
if (ret == 0) {
- XMEMCPY(pubKey, ecc_kse->pubKey, ecc_kse->pubKeyLen);
+ if (ecc_kse->pubKeyLen > 0)
+ XMEMCPY(pubKey, ecc_kse->pubKey, ecc_kse->pubKeyLen);
kse->pubKey = pubKey;
kse->pubKeyLen = ecc_kse->pubKeyLen + pubSz;
pubKey = NULL;
/* Note we are saving the OQS private key and ECC private key
* separately. That's because the ECC private key is not simply a
- * buffer. Its is an ecc_key struct.
- */
+ * buffer. Its is an ecc_key struct. Typically do not need the private
+ * key size, but will need to zero it out upon freeing. */
kse->privKey = privKey;
privKey = NULL;
+ kse->privKeyLen = privSz;
kse->key = ecc_kse->key;
ecc_kse->key = NULL;
@@ -7807,9 +7844,19 @@ static void TLSX_KeyShare_FreeAll(KeyShareEntry* list, void* heap)
#endif
}
#ifdef HAVE_PQC
- else if (WOLFSSL_NAMED_GROUP_IS_PQC(current->group) &&
- current->key != NULL) {
- ForceZero((byte*)current->key, current->keyLen);
+ else if (WOLFSSL_NAMED_GROUP_IS_PQC(current->group)) {
+ if (current->key != NULL) {
+ ForceZero((byte*)current->key, current->keyLen);
+ }
+ if (current->pubKey != NULL) {
+ XFREE(current->pubKey, heap, DYNAMIC_TYPE_PUBLIC_KEY);
+ current->pubKey = NULL;
+ }
+ if (current->privKey != NULL) {
+ ForceZero(current->privKey, current->privKeyLen);
+ XFREE(current->privKey, heap, DYNAMIC_TYPE_PRIVATE_KEY);
+ current->privKey = NULL;
+ }
}
#endif
else {
@@ -8412,7 +8459,7 @@ static int TLSX_KeyShare_ProcessPqc(WOLFSSL* ssl, KeyShareEntry* keyShareEntry)
return BAD_FUNC_ARG;
}
- ret = wc_KyberKey_Init(type, kem, ssl->heap, INVALID_DEVID);
+ ret = wc_KyberKey_Init(type, kem, ssl->heap, ssl->devId);
if (ret != 0) {
wc_ecc_free(&eccpubkey);
WOLFSSL_MSG("Error creating Kyber KEM");
@@ -8904,7 +8951,7 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
return MEMORY_E;
}
- ret = wc_KyberKey_Init(type, kem, ssl->heap, INVALID_DEVID);
+ ret = wc_KyberKey_Init(type, kem, ssl->heap, ssl->devId);
if (ret != 0) {
wc_ecc_free(&eccpubkey);
WOLFSSL_MSG("Error creating Kyber KEM");
@@ -9009,7 +9056,8 @@ static int server_generate_pqc_ciphertext(WOLFSSL* ssl,
keyShareEntry->keLen = outlen + ssSz;
sharedSecret = NULL;
- XMEMCPY(ciphertext, ecc_kse->pubKey, ecc_kse->pubKeyLen);
+ if (ecc_kse->pubKeyLen > 0)
+ XMEMCPY(ciphertext, ecc_kse->pubKey, ecc_kse->pubKeyLen);
keyShareEntry->pubKey = ciphertext;
keyShareEntry->pubKeyLen = (word32)(ecc_kse->pubKeyLen + ctSz);
ciphertext = NULL;
@@ -9470,6 +9518,121 @@ int TLSX_KeyShare_SetSupported(const WOLFSSL* ssl, TLSX** extensions)
return ret;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+/* Writes the CKS objects of a list in a buffer. */
+static word16 CKS_WRITE(WOLFSSL* ssl, byte* output)
+{
+ XMEMCPY(output, ssl->sigSpec, ssl->sigSpecSz);
+ return ssl->sigSpecSz;
+}
+
+static int TLSX_UseCKS(TLSX** extensions, WOLFSSL* ssl, void* heap)
+{
+ int ret = 0;
+ TLSX* extension;
+
+ if (extensions == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+ extension = TLSX_Find(*extensions, TLSX_CKS);
+ /* If it is already present, do nothing. */
+ if (extension == NULL) {
+ /* The data required is in the ssl struct, so push it in. */
+ ret = TLSX_Push(extensions, TLSX_CKS, (void*)ssl, heap);
+ }
+
+ return ret;
+}
+
+int TLSX_CKS_Set(WOLFSSL* ssl, TLSX** extensions)
+{
+ int ret;
+ TLSX* extension;
+ /* Push new KeyShare extension. This will also free the old one */
+ ret = TLSX_Push(extensions, TLSX_CKS, NULL, ssl->heap);
+ if (ret != 0)
+ return ret;
+ /* Extension got pushed to head */
+ extension = *extensions;
+ /* Need ssl->sigSpecSz during extension length calculation. */
+ extension->data = ssl;
+ /* Set extension to be in response. */
+ extension->resp = 1;
+ return ret;
+}
+
+int TLSX_CKS_Parse(WOLFSSL* ssl, byte* input, word16 length,
+ TLSX** extensions)
+{
+ (void) extensions;
+ int ret;
+ int i, j;
+
+ /* Validating the input. */
+ if (length == 0)
+ return BUFFER_ERROR;
+ for (i = 0; i < length; i++) {
+ switch (input[i])
+ {
+ case WOLFSSL_CKS_SIGSPEC_NATIVE:
+ case WOLFSSL_CKS_SIGSPEC_ALTERNATIVE:
+ case WOLFSSL_CKS_SIGSPEC_BOTH:
+ /* These are all valid values; do nothing */
+ break;
+ case WOLFSSL_CKS_SIGSPEC_EXTERNAL:
+ default:
+ /* All other values (including external) are not. */
+ return WOLFSSL_NOT_IMPLEMENTED;
+ }
+ }
+
+ /* Extension data is valid, but if we are the server and we don't have an
+ * alt private key, do not respond with CKS extension. */
+ if (wolfSSL_is_server(ssl) && ssl->buffers.altKey == NULL) {
+ ssl->sigSpec = NULL;
+ ssl->sigSpecSz = 0;
+ return 0;
+ }
+
+ /* Copy as the lifetime of input seems to be ephemeral. */
+ ssl->peerSigSpec = (byte*)XMALLOC(length, ssl->heap, DYNAMIC_TYPE_TLSX);
+ if (ssl->peerSigSpec == NULL) {
+ return BUFFER_ERROR;
+ }
+ XMEMCPY(ssl->peerSigSpec, input, length);
+ ssl->peerSigSpecSz = length;
+
+ /* If there is no preference set, use theirs... */
+ if (ssl->sigSpec == NULL) {
+ ret = wolfSSL_UseCKS(ssl, ssl->peerSigSpec, 1);
+ if (ret == WOLFSSL_SUCCESS) {
+ ret = TLSX_UseCKS(&ssl->extensions, ssl, ssl->heap);
+ TLSX_SetResponse(ssl, TLSX_CKS);
+ }
+ return ret;
+ }
+
+ /* ...otherwise, prioritize our preference. */
+ for (i = 0; i < ssl->sigSpecSz; i++) {
+ for (j = 0; j < length; j++) {
+ if (ssl->sigSpec[i] == input[j]) {
+ /* Got the match, set to this one. */
+ ret = wolfSSL_UseCKS(ssl, &ssl->peerSigSpec[i], 1);
+ if (ret == WOLFSSL_SUCCESS) {
+ ret = TLSX_UseCKS(&ssl->extensions, ssl, ssl->heap);
+ TLSX_SetResponse(ssl, TLSX_CKS);
+ }
+ return ret;
+ }
+ }
+ }
+
+ /* No match found. Cannot continue. */
+ return MATCH_SUITE_ERROR;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Server side KSE processing */
int TLSX_KeyShare_Choose(const WOLFSSL *ssl, TLSX* extensions,
byte cipherSuite0, byte cipherSuite, KeyShareEntry** kse, byte* searched)
@@ -12002,7 +12165,6 @@ void TLSX_FreeAll(TLSX* list, void* heap)
list = extension->next;
switch (extension->type) {
-
#if defined(HAVE_RPK)
case TLSX_CLIENT_CERTIFICATE_TYPE:
WOLFSSL_MSG("Client Certificate Type extension free");
@@ -12165,6 +12327,12 @@ void TLSX_FreeAll(TLSX* list, void* heap)
ECH_FREE((WOLFSSL_ECH*)extension->data, heap);
break;
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ case TLSX_CKS:
+ WOLFSSL_MSG("CKS extension free");
+ /* nothing to do */
+ break;
+#endif
default:
break;
}
@@ -12205,7 +12373,11 @@ static int TLSX_GetSize(TLSX* list, byte* semaphore, byte msgType,
length += HELLO_EXT_TYPE_SZ + OPAQUE16_LEN;
switch (extension->type) {
-
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ case TLSX_CKS:
+ length += ((WOLFSSL*)extension->data)->sigSpecSz ;
+ break;
+#endif
#ifdef HAVE_SNI
case TLSX_SERVER_NAME:
/* SNI only sends the name on the request. */
@@ -12396,6 +12568,13 @@ static int TLSX_Write(TLSX* list, byte* output, byte* semaphore,
/* extension data should be written internally. */
switch (extension->type) {
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ case TLSX_CKS:
+ WOLFSSL_MSG("CKS extension to write");
+ offset += CKS_WRITE(((WOLFSSL*)extension->data),
+ output + offset);
+ break;
+#endif
#ifdef HAVE_SNI
case TLSX_SERVER_NAME:
if (isRequest) {
@@ -12441,15 +12620,23 @@ static int TLSX_Write(TLSX* list, byte* output, byte* semaphore,
case TLSX_STATUS_REQUEST:
WOLFSSL_MSG("Certificate Status Request extension to write");
- offset += CSR_WRITE((CertificateStatusRequest*)extension->data,
+ ret = CSR_WRITE((CertificateStatusRequest*)extension->data,
output + offset, isRequest);
+ if (ret > 0) {
+ offset += (word16)ret;
+ ret = 0;
+ }
break;
case TLSX_STATUS_REQUEST_V2:
WOLFSSL_MSG("Certificate Status Request v2 extension to write");
- offset += CSR2_WRITE(
+ ret = CSR2_WRITE(
(CertificateStatusRequestItemV2*)extension->data,
output + offset, isRequest);
+ if (ret > 0) {
+ offset += (word16)ret;
+ ret = 0;
+ }
break;
case TLSX_RENEGOTIATION_INFO:
@@ -12906,6 +13093,14 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer)
}
}
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if ((IsAtLeastTLSv1_3(ssl->version)) && (ssl->sigSpec != NULL)) {
+ WOLFSSL_MSG("Adding CKS extension");
+ if ((ret = TLSX_UseCKS(&ssl->extensions, ssl, ssl->heap)) != 0) {
+ return ret;
+ }
+ }
+#endif
} /* is not server */
#if !defined(NO_CERTS) && !defined(WOLFSSL_NO_SIGALG)
@@ -13146,7 +13341,7 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer)
else
#endif
if (ssl->options.client_psk_cb != NULL ||
- ssl->options.client_psk_tls13_cb != NULL) {
+ ssl->options.client_psk_tls13_cb != NULL) {
/* Default cipher suite. */
byte cipherSuite0 = TLS13_BYTE;
byte cipherSuite = WOLFSSL_DEF_PSK_CIPHER;
@@ -13168,42 +13363,40 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer)
ssl->arrays->server_hint, ssl->arrays->client_identity,
MAX_PSK_ID_LEN, ssl->arrays->psk_key, MAX_PSK_KEY_LEN);
}
- #if defined(OPENSSL_EXTRA)
- /* OpenSSL treats 0 as a PSK key length of 0
- * and meaning no PSK available.
- */
- if (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- return PSK_KEY_ERROR;
- }
- if (ssl->arrays->psk_keySz > 0) {
- #else
- if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
- return PSK_KEY_ERROR;
+ if (
+ #ifdef OPENSSL_EXTRA
+ /* OpenSSL treats a PSK key length of 0
+ * to indicate no PSK available.
+ */
+ ssl->arrays->psk_keySz == 0 ||
+ #endif
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
+ #ifndef OPENSSL_EXTRA
+ ret = PSK_KEY_ERROR;
+ #endif
}
- #endif
- ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0';
-
- ssl->options.cipherSuite0 = cipherSuite0;
- ssl->options.cipherSuite = cipherSuite;
- (void)cipherSuiteFlags;
- ret = SetCipherSpecs(ssl);
- if (ret != 0)
- return ret;
+ else {
+ ssl->arrays->client_identity[MAX_PSK_ID_LEN] = '\0';
- ret = TLSX_PreSharedKey_Use(&ssl->extensions,
- (byte*)ssl->arrays->client_identity,
- (word16)XSTRLEN(ssl->arrays->client_identity),
- 0, ssl->specs.mac_algorithm,
- cipherSuite0, cipherSuite, 0,
- NULL, ssl->heap);
+ ssl->options.cipherSuite0 = cipherSuite0;
+ ssl->options.cipherSuite = cipherSuite;
+ (void)cipherSuiteFlags;
+ ret = SetCipherSpecs(ssl);
+ if (ret == 0) {
+ ret = TLSX_PreSharedKey_Use(
+ &ssl->extensions,
+ (byte*)ssl->arrays->client_identity,
+ (word16)XSTRLEN(ssl->arrays->client_identity),
+ 0, ssl->specs.mac_algorithm,
+ cipherSuite0, cipherSuite, 0,
+ NULL, ssl->heap);
+ }
+ if (ret == 0)
+ usingPSK = 1;
+ }
if (ret != 0)
return ret;
-
- usingPSK = 1;
- #if defined(OPENSSL_EXTRA)
- }
- #endif
}
#endif /* !NO_PSK */
#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)
@@ -13649,6 +13842,10 @@ int TLSX_WriteRequest(WOLFSSL* ssl, byte* output, byte msgType, word16* pOffset)
TURN_ON(semaphore,
TLSX_ToSemaphore(TLSX_CERTIFICATE_AUTHORITIES));
#endif
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ TURN_ON(semaphore,
+ TLSX_ToSemaphore(TLSX_CKS));
+ #endif
}
#endif
#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)
@@ -13743,7 +13940,6 @@ int TLSX_WriteRequest(WOLFSSL* ssl, byte* output, byte msgType, word16* pOffset)
return ret;
}
-
#endif /* WOLFSSL_TLS13 || !NO_WOLFSSL_CLIENT */
#if defined(WOLFSSL_TLS13) || !defined(NO_WOLFSSL_SERVER)
@@ -14274,7 +14470,19 @@ int TLSX_Parse(WOLFSSL* ssl, const byte* input, word16 length, byte msgType,
ret = EC_PARSE(ssl, input + offset, size, isRequest,
&ssl->extensions);
break;
-
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ case TLSX_CKS:
+ WOLFSSL_MSG("CKS extension received");
+ if (!IsAtLeastTLSv1_3(ssl->version) ||
+ (msgType != client_hello &&
+ msgType != encrypted_extensions)) {
+ WOLFSSL_ERROR_VERBOSE(EXT_NOT_ALLOWED);
+ return EXT_NOT_ALLOWED;
+ }
+ ret = TLSX_CKS_Parse(ssl, (byte *)(input + offset), size,
+ &ssl->extensions);
+ break;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
case TLSX_EC_POINT_FORMATS:
WOLFSSL_MSG("Point Formats extension received");
#ifdef WOLFSSL_DEBUG_TLS
diff --git a/extra/wolfssl/wolfssl/src/tls13.c b/extra/wolfssl/wolfssl/src/tls13.c
index d16a5761..9a2e240c 100644
--- a/extra/wolfssl/wolfssl/src/tls13.c
+++ b/extra/wolfssl/wolfssl/src/tls13.c
@@ -117,6 +117,7 @@
#include <wolfssl/wolfcrypt/asn.h>
#include <wolfssl/wolfcrypt/dh.h>
#include <wolfssl/wolfcrypt/kdf.h>
+#include <wolfssl/wolfcrypt/signature.h>
#ifdef NO_INLINE
#include <wolfssl/wolfcrypt/misc.h>
#else
@@ -135,6 +136,15 @@
#define FALSE 0
#endif
+#ifndef HAVE_AEAD
+ #ifndef _MSC_VER
+ #error "The build option HAVE_AEAD is required for TLS 1.3"
+ #else
+ #pragma \
+ message("error: The build option HAVE_AEAD is required for TLS 1.3")
+ #endif
+#endif
+
#ifndef HAVE_HKDF
#ifndef _MSC_VER
#error "The build option HAVE_HKDF is required for TLS 1.3"
@@ -187,21 +197,7 @@ static WC_INLINE int GetMsgHash(WOLFSSL* ssl, byte* hash);
#endif
/* Expand data using HMAC, salt and label and info.
- * TLS v1.3 defines this function. Use callback if available.
- *
- * ssl The SSL/TLS object.
- * okm The generated pseudorandom key - output key material.
- * okmLen The length of generated pseudorandom key -
- * output key material.
- * prk The salt - pseudo-random key.
- * prkLen The length of the salt - pseudo-random key.
- * protocol The TLS protocol label.
- * protocolLen The length of the TLS protocol label.
- * info The information to expand.
- * infoLen The length of the information.
- * digest The type of digest to use.
- * returns 0 on success, otherwise failure.
- */
+ * TLS v1.3 defines this function. Use callback if available. */
static int Tls13HKDFExpandLabel(WOLFSSL* ssl, byte* okm, word32 okmLen,
const byte* prk, word32 prkLen,
const byte* protocol, word32 protocolLen,
@@ -225,18 +221,24 @@ static int Tls13HKDFExpandLabel(WOLFSSL* ssl, byte* okm, word32 okmLen,
#endif
(void)ssl;
PRIVATE_KEY_UNLOCK();
+#if !defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))
+ ret = wc_Tls13_HKDF_Expand_Label_ex(okm, okmLen, prk, prkLen,
+ protocol, protocolLen,
+ label, labelLen,
+ info, infoLen, digest,
+ ssl->heap, ssl->devId);
+#else
ret = wc_Tls13_HKDF_Expand_Label(okm, okmLen, prk, prkLen,
protocol, protocolLen,
label, labelLen,
info, infoLen, digest);
+#endif
PRIVATE_KEY_LOCK();
return ret;
}
-#if !defined(HAVE_FIPS) || !defined(wc_Tls13_HKDF_Expand_Label)
-/* Same as above, but pass in the side we are expanding for.
- *
- * side The side (WOLFSSL_CLIENT_END or WOLFSSL_SERVER_END).
+/* Same as above, but pass in the side we are expanding for:
+ * side: either WOLFSSL_CLIENT_END or WOLFSSL_SERVER_END.
*/
static int Tls13HKDFExpandKeyLabel(WOLFSSL* ssl, byte* okm, word32 okmLen,
const byte* prk, word32 prkLen,
@@ -245,8 +247,9 @@ static int Tls13HKDFExpandKeyLabel(WOLFSSL* ssl, byte* okm, word32 okmLen,
const byte* info, word32 infoLen,
int digest, int side)
{
+ int ret;
#if defined(HAVE_PK_CALLBACKS)
- int ret = NOT_COMPILED_IN;
+ ret = NOT_COMPILED_IN;
if (ssl->ctx && ssl->ctx->HKDFExpandLabelCb) {
ret = ssl->ctx->HKDFExpandLabelCb(okm, okmLen, prk, prkLen,
protocol, protocolLen,
@@ -254,25 +257,33 @@ static int Tls13HKDFExpandKeyLabel(WOLFSSL* ssl, byte* okm, word32 okmLen,
info, infoLen,
digest, side);
}
-
if (ret != NOT_COMPILED_IN)
return ret;
#endif
-/* hash buffer may not be fully initialized, but the sending length won't
- * extend beyond the initialized span.
- */
-PRAGMA_GCC_DIAG_PUSH
-PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
- (void)ssl;
- (void)side;
- return wc_Tls13_HKDF_Expand_Label(okm, okmLen, prk, prkLen,
+#if !defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))
+ ret = wc_Tls13_HKDF_Expand_Label_ex(okm, okmLen, prk, prkLen,
+ protocol, protocolLen,
+ label, labelLen,
+ info, infoLen, digest,
+ ssl->heap, ssl->devId);
+
+#elif defined(HAVE_FIPS) && defined(wc_Tls13_HKDF_Expand_Label)
+ ret = wc_Tls13_HKDF_Expand_Label_fips(okm, okmLen, prk, prkLen,
+ protocol, protocolLen,
+ label, labelLen,
+ info, infoLen, digest);
+#else
+ ret = wc_Tls13_HKDF_Expand_Label(okm, okmLen, prk, prkLen,
protocol, protocolLen,
label, labelLen,
info, infoLen, digest);
-PRAGMA_GCC_DIAG_POP
+#endif
+ (void)ssl;
+ (void)side;
+ return ret;
}
-#endif /* !HAVE_FIPS || !wc_Tls13_HKDF_Expand_Label */
+
/* Derive a key from a message.
*
@@ -302,7 +313,7 @@ static int DeriveKeyMsg(WOLFSSL* ssl, byte* output, int outputLen,
switch (hashAlgo) {
#ifndef NO_WOLFSSL_SHA256
case sha256_mac:
- ret = wc_InitSha256_ex(&digest.sha256, ssl->heap, INVALID_DEVID);
+ ret = wc_InitSha256_ex(&digest.sha256, ssl->heap, ssl->devId);
if (ret == 0) {
ret = wc_Sha256Update(&digest.sha256, msg, msgLen);
if (ret == 0)
@@ -315,7 +326,7 @@ static int DeriveKeyMsg(WOLFSSL* ssl, byte* output, int outputLen,
#endif
#ifdef WOLFSSL_SHA384
case sha384_mac:
- ret = wc_InitSha384_ex(&digest.sha384, ssl->heap, INVALID_DEVID);
+ ret = wc_InitSha384_ex(&digest.sha384, ssl->heap, ssl->devId);
if (ret == 0) {
ret = wc_Sha384Update(&digest.sha384, msg, msgLen);
if (ret == 0)
@@ -328,7 +339,7 @@ static int DeriveKeyMsg(WOLFSSL* ssl, byte* output, int outputLen,
#endif
#ifdef WOLFSSL_TLS13_SHA512
case sha512_mac:
- ret = wc_InitSha512_ex(&digest.sha512, ssl->heap, INVALID_DEVID);
+ ret = wc_InitSha512_ex(&digest.sha512, ssl->heap, ssl->devId);
if (ret == 0) {
ret = wc_Sha512Update(&digest.sha512, msg, msgLen);
if (ret == 0)
@@ -341,7 +352,7 @@ static int DeriveKeyMsg(WOLFSSL* ssl, byte* output, int outputLen,
#endif
#ifdef WOLFSSL_SM3
case sm3_mac:
- ret = wc_InitSm3(&digest.sm3, ssl->heap, INVALID_DEVID);
+ ret = wc_InitSm3(&digest.sm3, ssl->heap, ssl->devId);
if (ret == 0) {
ret = wc_Sm3Update(&digest.sm3, msg, msgLen);
if (ret == 0)
@@ -469,34 +480,31 @@ int Tls13DeriveKey(WOLFSSL* ssl, byte* output, int outputLen,
}
#endif /* WOLFSSL_DTLS13 */
- if (outputLen == -1)
+ if (outputLen == -1) {
outputLen = hashSz;
- if (includeMsgs)
+ }
+ if (includeMsgs) {
hashOutSz = hashSz;
+ }
+ else {
+ /* Appease static analyzers by making sure hash is cleared, since it is
+ * passed into expand key label where older wc_Tls13_HKDF_Expand_Label
+ * will unconditionally try to call a memcpy on it, however length will
+ * always be 0. */
+ XMEMSET(hash, 0, sizeof(hash));
+ hashOutSz = 0;
+ }
- /* hash buffer may not be fully initialized, but the sending length won't
- * extend beyond the initialized span.
- */
- PRAGMA_GCC_DIAG_PUSH
- PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
PRIVATE_KEY_UNLOCK();
- #if defined(HAVE_FIPS) && defined(wc_Tls13_HKDF_Expand_Label)
- (void)side;
- ret = wc_Tls13_HKDF_Expand_Label_fips(output, outputLen, secret, hashSz,
- protocol, protocolLen, label, labelLen,
- hash, hashOutSz, digestAlg);
- #else
ret = Tls13HKDFExpandKeyLabel(ssl, output, outputLen, secret, hashSz,
protocol, protocolLen, label, labelLen,
hash, hashOutSz, digestAlg, side);
- #endif
PRIVATE_KEY_LOCK();
#ifdef WOLFSSL_CHECK_MEM_ZERO
wc_MemZero_Add("TLS 1.3 derived key", output, outputLen);
#endif
return ret;
- PRAGMA_GCC_DIAG_POP
}
/* Convert TLS mac ID to a hash algorithm ID
@@ -1108,8 +1116,8 @@ static int DeriveTrafficSecret(WOLFSSL* ssl, byte* secret, int side)
}
-static int Tls13_HKDF_Extract(WOLFSSL *ssl, byte* prk, const byte* salt, int saltLen,
- byte* ikm, int ikmLen, int digest)
+static int Tls13_HKDF_Extract(WOLFSSL *ssl, byte* prk, const byte* salt,
+ int saltLen, byte* ikm, int ikmLen, int digest)
{
int ret;
#ifdef HAVE_PK_CALLBACKS
@@ -1120,9 +1128,21 @@ static int Tls13_HKDF_Extract(WOLFSSL *ssl, byte* prk, const byte* salt, int sal
}
else
#endif
+#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)
+ if ((int)ssl->arrays->psk_keySz < 0) {
+ ret = PSK_KEY_ERROR;
+ }
+ else
+#endif
{
- (void)ssl;
+ #if !defined(HAVE_FIPS) || \
+ (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))
+ ret = wc_Tls13_HKDF_Extract_ex(prk, salt, saltLen, ikm, ikmLen, digest,
+ ssl->heap, ssl->devId);
+ #else
ret = wc_Tls13_HKDF_Extract(prk, salt, saltLen, ikm, ikmLen, digest);
+ (void)ssl;
+ #endif
}
return ret;
}
@@ -3541,6 +3561,12 @@ int CreateCookieExt(const WOLFSSL* ssl, byte* hash, word16 hashSz,
return BAD_FUNC_ARG;
}
+ if (ssl->buffers.tls13CookieSecret.buffer == NULL ||
+ ssl->buffers.tls13CookieSecret.length == 0) {
+ WOLFSSL_MSG("Missing DTLS 1.3 cookie secret");
+ return COOKIE_ERROR;
+ }
+
/* Cookie Data = Hash Len | Hash | CS | KeyShare Group */
cookie[cookieSz++] = (byte)hashSz;
XMEMCPY(cookie + cookieSz, hash, hashSz);
@@ -3923,7 +3949,8 @@ static int SetupPskKey(WOLFSSL* ssl, PreSharedKey* psk, int clientHello)
ssl->options.cipherSuite = WOLFSSL_DEF_PSK_CIPHER;
}
if (ssl->arrays->psk_keySz == 0 ||
- ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN) {
+ (ssl->arrays->psk_keySz > MAX_PSK_KEY_LEN &&
+ (int)ssl->arrays->psk_keySz != USE_HW_PSK)) {
WOLFSSL_ERROR_VERBOSE(PSK_KEY_ERROR);
return PSK_KEY_ERROR;
}
@@ -3936,7 +3963,7 @@ static int SetupPskKey(WOLFSSL* ssl, PreSharedKey* psk, int clientHello)
#endif /* !WOLFSSL_PSK_ONE_ID */
if (!clientHello && (psk->cipherSuite0 != suite[0] ||
- psk->cipherSuite != suite[1])) {
+ psk->cipherSuite != suite[1])) {
WOLFSSL_ERROR_VERBOSE(PSK_KEY_ERROR);
return PSK_KEY_ERROR;
}
@@ -4688,7 +4715,7 @@ int SendTls13ClientHello(WOLFSSL* ssl)
}
#if defined(WOLFSSL_DTLS13) && !defined(WOLFSSL_NO_CLIENT)
-static int Dtls13DoDowngrade(WOLFSSL* ssl)
+static int Dtls13ClientDoDowngrade(WOLFSSL* ssl)
{
int ret;
if (ssl->dtls13ClientHello == NULL)
@@ -4719,8 +4746,8 @@ static int EchCheckAcceptance(WOLFSSL* ssl, const byte* input,
int serverRandomOffset, int helloSz)
{
int ret = 0;
- int digestType;
- int digestSize;
+ int digestType = 0;
+ int digestSize = 0;
HS_Hashes* tmpHashes;
HS_Hashes* acceptHashes;
byte zeros[WC_MAX_DIGEST_SIZE];
@@ -4786,17 +4813,30 @@ static int EchCheckAcceptance(WOLFSSL* ssl, const byte* input,
}
}
/* extract clientRandomInner with a key of all zeros */
- if (ret == 0)
+ if (ret == 0) {
+ PRIVATE_KEY_UNLOCK();
+ #if !defined(HAVE_FIPS) || \
+ (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))
+ ret = wc_HKDF_Extract_ex(digestType, zeros, digestSize,
+ ssl->arrays->clientRandomInner, RAN_LEN, expandLabelPrk,
+ ssl->heap, ssl->devId);
+ #else
ret = wc_HKDF_Extract(digestType, zeros, digestSize,
ssl->arrays->clientRandomInner, RAN_LEN, expandLabelPrk);
+ #endif
+ PRIVATE_KEY_LOCK();
+ }
/* tls expand with the confirmation label */
- if (ret == 0)
- ret = wc_Tls13_HKDF_Expand_Label(acceptConfirmation,
- ECH_ACCEPT_CONFIRMATION_SZ,
- expandLabelPrk, digestSize, tls13ProtocolLabel,
- TLS13_PROTOCOL_LABEL_SZ, echAcceptConfirmationLabel,
- ECH_ACCEPT_CONFIRMATION_LABEL_SZ, transcriptEchConf, digestSize,
- digestType);
+ if (ret == 0) {
+ PRIVATE_KEY_UNLOCK();
+ ret = Tls13HKDFExpandKeyLabel(ssl,
+ acceptConfirmation, ECH_ACCEPT_CONFIRMATION_SZ,
+ expandLabelPrk, digestSize,
+ tls13ProtocolLabel, TLS13_PROTOCOL_LABEL_SZ,
+ echAcceptConfirmationLabel, ECH_ACCEPT_CONFIRMATION_LABEL_SZ,
+ transcriptEchConf, digestSize, digestType, WOLFSSL_SERVER_END);
+ PRIVATE_KEY_LOCK();
+ }
if (ret == 0) {
/* last 8 bytes should match our expand output */
ret = XMEMCMP(acceptConfirmation,
@@ -4839,10 +4879,10 @@ static int EchWriteAcceptance(WOLFSSL* ssl, byte* output,
int serverRandomOffset, int helloSz)
{
int ret = 0;
- int digestType;
- int digestSize;
- HS_Hashes* tmpHashes;
- HS_Hashes* acceptHashes;
+ int digestType = 0;
+ int digestSize = 0;
+ HS_Hashes* tmpHashes = NULL;
+ HS_Hashes* acceptHashes = NULL;
byte zeros[WC_MAX_DIGEST_SIZE];
byte transcriptEchConf[WC_MAX_DIGEST_SIZE];
byte expandLabelPrk[WC_MAX_DIGEST_SIZE];
@@ -4913,21 +4953,28 @@ static int EchWriteAcceptance(WOLFSSL* ssl, byte* output,
/* extract clientRandom with a key of all zeros */
if (ret == 0) {
PRIVATE_KEY_UNLOCK();
+ #if !defined(HAVE_FIPS) || \
+ (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3))
+ ret = wc_HKDF_Extract_ex(digestType, zeros, digestSize,
+ ssl->arrays->clientRandom, RAN_LEN, expandLabelPrk,
+ ssl->heap, ssl->devId);
+ #else
ret = wc_HKDF_Extract(digestType, zeros, digestSize,
ssl->arrays->clientRandom, RAN_LEN, expandLabelPrk);
+ #endif
PRIVATE_KEY_LOCK();
}
/* tls expand with the confirmation label */
if (ret == 0) {
PRIVATE_KEY_UNLOCK();
- ret = wc_Tls13_HKDF_Expand_Label(
+ ret = Tls13HKDFExpandKeyLabel(ssl,
output + serverRandomOffset + RAN_LEN - ECH_ACCEPT_CONFIRMATION_SZ,
- ECH_ACCEPT_CONFIRMATION_SZ,
- expandLabelPrk, digestSize, tls13ProtocolLabel,
- TLS13_PROTOCOL_LABEL_SZ, echAcceptConfirmationLabel,
- ECH_ACCEPT_CONFIRMATION_LABEL_SZ, transcriptEchConf, digestSize,
- digestType);
+ ECH_ACCEPT_CONFIRMATION_SZ,
+ expandLabelPrk, digestSize,
+ tls13ProtocolLabel, TLS13_PROTOCOL_LABEL_SZ,
+ echAcceptConfirmationLabel, ECH_ACCEPT_CONFIRMATION_LABEL_SZ,
+ transcriptEchConf, digestSize, digestType, WOLFSSL_SERVER_END);
PRIVATE_KEY_LOCK();
}
@@ -5074,7 +5121,7 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ssl->options.dtls) {
ssl->chVersion.minor = DTLSv1_2_MINOR;
ssl->version.minor = DTLSv1_2_MINOR;
- ret = Dtls13DoDowngrade(ssl);
+ ret = Dtls13ClientDoDowngrade(ssl);
if (ret != 0)
return ret;
}
@@ -5168,7 +5215,7 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ssl->options.dtls) {
ssl->chVersion.minor = DTLSv1_2_MINOR;
ssl->version.minor = DTLSv1_2_MINOR;
- ret = Dtls13DoDowngrade(ssl);
+ ret = Dtls13ClientDoDowngrade(ssl);
if (ret != 0)
return ret;
}
@@ -5241,7 +5288,7 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#ifdef WOLFSSL_DTLS13
if (ssl->options.dtls) {
- ret = Dtls13DoDowngrade(ssl);
+ ret = Dtls13ClientDoDowngrade(ssl);
if (ret != 0)
return ret;
}
@@ -5799,7 +5846,8 @@ int FindPskSuite(const WOLFSSL* ssl, PreSharedKey* psk, byte* psk_key,
*found = (*psk_keySz != 0);
}
if (*found) {
- if (*psk_keySz > MAX_PSK_KEY_LEN) {
+ if (*psk_keySz > MAX_PSK_KEY_LEN &&
+ *((int*)psk_keySz) != USE_HW_PSK) {
WOLFSSL_MSG("Key len too long in FindPsk()");
ret = PSK_KEY_ERROR;
WOLFSSL_ERROR_VERBOSE(ret);
@@ -5854,29 +5902,27 @@ static int FindPsk(WOLFSSL* ssl, PreSharedKey* psk, const byte* suite, int* err)
ret = FindPskSuite(ssl, psk, ssl->arrays->psk_key, &ssl->arrays->psk_keySz,
suite, &found, foundSuite);
if (ret == 0 && found) {
- if ((ret == 0) && found) {
- /* Default to ciphersuite if cb doesn't specify. */
- ssl->options.resuming = 0;
- /* Don't send certificate request when using PSK. */
- ssl->options.verifyPeer = 0;
+ /* Default to ciphersuite if cb doesn't specify. */
+ ssl->options.resuming = 0;
+ /* Don't send certificate request when using PSK. */
+ ssl->options.verifyPeer = 0;
- /* PSK age is always zero. */
- if (psk->ticketAge != 0) {
- ret = PSK_KEY_ERROR;
- WOLFSSL_ERROR_VERBOSE(ret);
- }
+ /* PSK age is always zero. */
+ if (psk->ticketAge != 0) {
+ ret = PSK_KEY_ERROR;
+ WOLFSSL_ERROR_VERBOSE(ret);
}
- if ((ret == 0) && found) {
+ if (ret == 0) {
/* Set PSK ciphersuite into SSL. */
ssl->options.cipherSuite0 = foundSuite[0];
ssl->options.cipherSuite = foundSuite[1];
ret = SetCipherSpecs(ssl);
}
- if ((ret == 0) && found) {
+ if (ret == 0) {
/* Derive the early secret using the PSK. */
ret = DeriveEarlySecret(ssl);
}
- if ((ret == 0) && found) {
+ if (ret == 0) {
/* PSK negotiation has succeeded */
ssl->options.isPSK = 1;
/* SERVER: using PSK for peer authentication. */
@@ -6296,6 +6342,12 @@ int TlsCheckCookie(const WOLFSSL* ssl, const byte* cookie, word16 cookieSz)
byte cookieType = 0;
byte macSz = 0;
+ if (ssl->buffers.tls13CookieSecret.buffer == NULL ||
+ ssl->buffers.tls13CookieSecret.length == 0) {
+ WOLFSSL_MSG("Missing DTLS 1.3 cookie secret");
+ return COOKIE_ERROR;
+ }
+
#if !defined(NO_SHA) && defined(NO_SHA256)
cookieType = SHA;
macSz = WC_SHA_DIGEST_SIZE;
@@ -6670,6 +6722,7 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
* wolfSSL_accept_TLSv13 when changing this one. */
if (IsDtlsNotSctpMode(ssl) && ssl->options.sendCookie &&
!ssl->options.dtlsStateful) {
+ DtlsSetSeqNumForReply(ssl);
ret = DoClientHelloStateless(ssl, input + *inOutIdx, helloSz, 0, NULL);
if (ret != 0 || !ssl->options.dtlsStateful) {
*inOutIdx += helloSz;
@@ -7088,6 +7141,7 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
#ifdef HAVE_SESSION_TICKET
if (ssl->options.resuming) {
ssl->options.resuming = 0;
+ ssl->arrays->psk_keySz = 0;
XMEMSET(ssl->arrays->psk_key, 0, ssl->specs.hash_size);
}
#endif
@@ -7760,6 +7814,54 @@ static WC_INLINE void EncodeSigAlg(byte hashAlgo, byte hsType, byte* output)
}
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+/* These match up with what the OQS team has defined. */
+#define HYBRID_SA_MAJOR 0xFE
+#define HYBRID_P256_DILITHIUM_LEVEL2_SA_MINOR 0xA1
+#define HYBRID_RSA3072_DILITHIUM_LEVEL2_SA_MINOR 0xA2
+#define HYBRID_P384_DILITHIUM_LEVEL3_SA_MINOR 0xA4
+#define HYBRID_P521_DILITHIUM_LEVEL5_SA_MINOR 0xA6
+#define HYBRID_P256_FALCON_LEVEL1_SA_MINOR 0x0C
+#define HYBRID_RSA3072_FALCON_LEVEL1_SA_MINOR 0x0D
+#define HYBRID_P521_FALCON_LEVEL5_SA_MINOR 0x0F
+
+static void EncodeDualSigAlg(byte sigAlg, byte altSigAlg, byte* output)
+{
+ /* Initialize output to error indicator. */
+ output[0] = 0x0;
+ output[1] = 0x0;
+
+ if (sigAlg == ecc_dsa_sa_algo && altSigAlg == dilithium_level2_sa_algo) {
+ output[1] = HYBRID_P256_DILITHIUM_LEVEL2_SA_MINOR;
+ }
+ else if (sigAlg == rsa_pss_sa_algo &&
+ altSigAlg == dilithium_level2_sa_algo) {
+ output[1] = HYBRID_RSA3072_DILITHIUM_LEVEL2_SA_MINOR;
+ }
+ else if (sigAlg == ecc_dsa_sa_algo &&
+ altSigAlg == dilithium_level3_sa_algo) {
+ output[1] = HYBRID_P384_DILITHIUM_LEVEL3_SA_MINOR;
+ }
+ else if (sigAlg == ecc_dsa_sa_algo &&
+ altSigAlg == dilithium_level5_sa_algo) {
+ output[1] = HYBRID_P521_DILITHIUM_LEVEL5_SA_MINOR;
+ }
+ else if (sigAlg == ecc_dsa_sa_algo && altSigAlg == falcon_level1_sa_algo) {
+ output[1] = HYBRID_P256_FALCON_LEVEL1_SA_MINOR;
+ }
+ else if (sigAlg == rsa_pss_sa_algo && altSigAlg == falcon_level1_sa_algo) {
+ output[1] = HYBRID_RSA3072_FALCON_LEVEL1_SA_MINOR;
+ }
+ else if (sigAlg == ecc_dsa_sa_algo && altSigAlg == falcon_level5_sa_algo) {
+ output[1] = HYBRID_P521_FALCON_LEVEL5_SA_MINOR;
+ }
+
+ if (output[1] != 0x0) {
+ output[0] = HYBRID_SA_MAJOR;
+ }
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Decode the signature algorithm.
*
* input The encoded signature algorithm.
@@ -7852,6 +7954,65 @@ static WC_INLINE int DecodeTls13SigAlg(byte* input, byte* hashAlgo,
return ret;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+/* Decode the hybrid signature algorithm.
+ *
+ * input The encoded signature algorithm.
+ * hashalgo The hash algorithm.
+ * hsType The signature type.
+ * returns INVALID_PARAMETER if not recognized and 0 otherwise.
+ */
+static WC_INLINE int DecodeTls13HybridSigAlg(byte* input, byte* hashAlg,
+ byte *sigAlg, byte *altSigAlg)
+{
+
+ if (input[0] != HYBRID_SA_MAJOR) {
+ return INVALID_PARAMETER;
+ }
+
+ if (input[1] == HYBRID_P256_DILITHIUM_LEVEL2_SA_MINOR) {
+ *sigAlg = ecc_dsa_sa_algo;
+ *hashAlg = 4; /* WC_HASH_TYPE_SHA? Reviewer? */
+ *altSigAlg = dilithium_level2_sa_algo;
+ }
+ else if (input[1] == HYBRID_RSA3072_DILITHIUM_LEVEL2_SA_MINOR) {
+ *sigAlg = rsa_pss_sa_algo;
+ *hashAlg = 4;
+ *altSigAlg = dilithium_level2_sa_algo;
+ }
+ else if (input[1] == HYBRID_P384_DILITHIUM_LEVEL3_SA_MINOR) {
+ *sigAlg = ecc_dsa_sa_algo;
+ *hashAlg = 5;
+ *altSigAlg = dilithium_level3_sa_algo;
+ }
+ else if (input[1] == HYBRID_P521_DILITHIUM_LEVEL5_SA_MINOR) {
+ *sigAlg = ecc_dsa_sa_algo;
+ *hashAlg = 6;
+ *altSigAlg = dilithium_level5_sa_algo;
+ }
+ else if (input[1] == HYBRID_P256_FALCON_LEVEL1_SA_MINOR) {
+ *sigAlg = ecc_dsa_sa_algo;
+ *hashAlg = 4;
+ *altSigAlg = falcon_level1_sa_algo;
+ }
+ else if (input[1] == HYBRID_RSA3072_FALCON_LEVEL1_SA_MINOR) {
+ *sigAlg = rsa_pss_sa_algo;
+ *hashAlg = 4;
+ *altSigAlg = falcon_level1_sa_algo;
+ }
+ else if (input[1] == HYBRID_P521_FALCON_LEVEL5_SA_MINOR) {
+ *sigAlg = ecc_dsa_sa_algo;
+ *hashAlg = 6;
+ *altSigAlg = falcon_level5_sa_algo;
+ }
+ else {
+ return INVALID_PARAMETER;
+ }
+
+ return 0;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Get the hash of the messages so far.
*
* ssl The SSL/TLS object.
@@ -8505,6 +8666,10 @@ typedef struct Scv13Args {
byte sigAlgo;
byte* sigData;
word16 sigDataSz;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ byte altSigAlgo;
+ word16 altSigLen; /* Only used in the case of both native and alt. */
+#endif
} Scv13Args;
static void FreeScv13Args(WOLFSSL* ssl, void* pArgs)
@@ -8647,6 +8812,29 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
}
else {
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_ALTERNATIVE) {
+ /* In the case of alternative, we swap in the alt. */
+ if (ssl->ctx->altPrivateKey == NULL) {
+ ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
+ }
+ ssl->buffers.keyType = ssl->buffers.altKeyType;
+ ssl->buffers.keySz = ssl->buffers.altKeySz;
+ /* If we own it, free key before overriding it. */
+ if (ssl->buffers.weOwnKey) {
+ FreeDer(&ssl->buffers.key);
+ }
+
+ /* Transfer ownership. ssl->ctx always owns the alt private
+ * key. */
+ ssl->buffers.key = ssl->ctx->altPrivateKey;
+ ssl->ctx->altPrivateKey = NULL;
+ ssl->buffers.weOwnKey = 1;
+ ssl->buffers.weOwnAltKey = 0;
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
ret = DecodePrivateKey(ssl, &args->length);
if (ret != 0)
goto exit_scv;
@@ -8728,7 +8916,51 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
else {
ERROR_OUT(ALGO_ID_E, exit_scv);
}
- EncodeSigAlg(ssl->options.hashAlgo, args->sigAlgo, args->verify);
+
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (ssl->peerSigSpec == NULL) {
+ /* The peer did not respond. We didn't send CKS or they don't
+ * support it. Either way, we do not need to handle dual
+ * key/sig case. */
+ ssl->sigSpec = NULL;
+ ssl->sigSpecSz = 0;
+ }
+
+ if (wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ /* The native was already decoded. Now we need to do the
+ * alternative. Note that no swap was done because this case is
+ * both native and alternative, not just alternative. */
+ if (ssl->ctx->altPrivateKey == NULL) {
+ ERROR_OUT(NO_PRIVATE_KEY, exit_scv);
+ }
+
+ if (ssl->buffers.altKeyType == falcon_level1_sa_algo ||
+ ssl->buffers.altKeyType == falcon_level5_sa_algo ||
+ ssl->buffers.altKeyType == dilithium_level2_sa_algo ||
+ ssl->buffers.altKeyType == dilithium_level3_sa_algo ||
+ ssl->buffers.altKeyType == dilithium_level5_sa_algo) {
+ args->altSigAlgo = ssl->buffers.altKeyType;
+ }
+ else {
+ ERROR_OUT(ALGO_ID_E, exit_scv);
+ }
+ /* After this call, args->altSigLen has the length we need for
+ * the alternative signature. */
+ ret = DecodeAltPrivateKey(ssl, &args->altSigLen);
+ if (ret != 0)
+ goto exit_scv;
+
+ EncodeDualSigAlg(args->sigAlgo, args->altSigAlgo, args->verify);
+ if (args->verify[0] == 0) {
+ ERROR_OUT(ALGO_ID_E, exit_scv);
+ }
+ }
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ EncodeSigAlg(ssl->options.hashAlgo, args->sigAlgo,
+ args->verify);
if (args->sigData == NULL) {
if (ssl->hsType == DYNAMIC_TYPE_RSA) {
@@ -8807,6 +9039,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
}
sig->length = ED448_SIG_SIZE;
}
+
#endif /* HAVE_ED448 */
#if defined(HAVE_PQC)
#if defined(HAVE_FALCON)
@@ -8850,6 +9083,32 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
#endif
);
}
+
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ if (ssl->hsAltType == DYNAMIC_TYPE_DILITHIUM) {
+ /* note the + sig->length; we are appending. */
+ ret = wc_dilithium_sign_msg(
+ args->sigData, args->sigDataSz,
+ args->verify + HASH_SIG_SIZE +
+ VERIFY_HEADER + sig->length,
+ (word32*)&args->altSigLen,
+ (dilithium_key*)ssl->hsAltKey, ssl->rng);
+
+ }
+ else if (ssl->hsAltType == DYNAMIC_TYPE_FALCON) {
+ /* note the sig->length; we are appending. */
+ ret = wc_falcon_sign_msg(args->sigData, args->sigDataSz,
+ args->verify + HASH_SIG_SIZE +
+ VERIFY_HEADER + sig->length,
+ (word32*)&args->altSigLen,
+ (falcon_key*)ssl->hsAltKey,
+ ssl->rng);
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
args->length = (word16)sig->length;
}
#endif /* HAVE_ECC */
@@ -8887,7 +9146,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
ret = wc_falcon_sign_msg(args->sigData, args->sigDataSz,
args->verify + HASH_SIG_SIZE +
VERIFY_HEADER, (word32*)&sig->length,
- (falcon_key*)ssl->hsKey);
+ (falcon_key*)ssl->hsKey, ssl->rng);
args->length = (word16)sig->length;
}
#endif
@@ -8896,7 +9155,7 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
ret = wc_dilithium_sign_msg(args->sigData, args->sigDataSz,
args->verify + HASH_SIG_SIZE +
VERIFY_HEADER, (word32*)&sig->length,
- (dilithium_key*)ssl->hsKey);
+ (dilithium_key*)ssl->hsKey, ssl->rng);
args->length = (word16)sig->length;
}
#endif
@@ -8909,6 +9168,36 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
(RsaKey*)ssl->hsKey,
ssl->buffers.key
);
+
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* In the case of RSA, we need to do the CKS both case here
+ * BEFORE args->sigData is overwritten!! We keep the sig
+ * separate and then append later so we don't interfere with the
+ * checks below. */
+ if (wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ if (ssl->hsAltType == DYNAMIC_TYPE_DILITHIUM) {
+ /* note the + args->sigLen; we are appending. */
+ ret = wc_dilithium_sign_msg(args->sigData,
+ args->sigDataSz,
+ args->verify + HASH_SIG_SIZE + VERIFY_HEADER +
+ args->sigLen,
+ (word32*)&args->altSigLen,
+ (dilithium_key*)ssl->hsAltKey, ssl->rng);
+ }
+ else if (ssl->hsAltType == DYNAMIC_TYPE_FALCON) {
+ /* note the + args->sigLen; we are appending. */
+ ret = wc_falcon_sign_msg(args->sigData, args->sigDataSz,
+ args->verify + HASH_SIG_SIZE +
+ VERIFY_HEADER + args->sigLen,
+ (word32*)&args->altSigLen,
+ (falcon_key*)ssl->hsAltKey,
+ ssl->rng);
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
if (ret == 0) {
args->length = (word16)args->sigLen;
@@ -8924,6 +9213,11 @@ static int SendTls13CertificateVerify(WOLFSSL* ssl)
goto exit_scv;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* Add in length of the alt sig which will be appended to the sig */
+ args->length += args->altSigLen;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Add signature length. */
c16toa(args->length, args->verify + HASH_SIG_SIZE);
@@ -9142,11 +9436,16 @@ typedef struct Dcv13Args {
word32 sigSz;
word32 idx;
word32 begin;
- byte hashAlgo;
- byte sigAlgo;
byte* sigData;
word16 sigDataSz;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ byte altSigAlgo;
+ byte* altSigData;
+ word16 altSigDataSz;
+ word16 altSignatureSz;
+ byte altPeerAuthGood;
+#endif
} Dcv13Args;
static void FreeDcv13Args(WOLFSSL* ssl, void* pArgs)
@@ -9157,10 +9456,82 @@ static void FreeDcv13Args(WOLFSSL* ssl, void* pArgs)
XFREE(args->sigData, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
args->sigData = NULL;
}
-
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (args && args->altSigData != NULL) {
+ XFREE(args->altSigData, ssl->heap, DYNAMIC_TYPE_SIGNATURE);
+ args->altSigData = NULL;
+ }
+#endif
(void)ssl;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+/* ssl->peerCert->sapkiDer is the alternative public key. Hopefully it is a
+ * dilithium public key. Convert it into a usable public key. */
+static int decodeDilithiumKey(WOLFSSL* ssl, int level)
+{
+ int keyRet;
+ word32 tmpIdx = 0;
+
+ if (ssl->peerDilithiumKeyPresent)
+ return INVALID_PARAMETER;
+
+ keyRet = AllocKey(ssl, DYNAMIC_TYPE_DILITHIUM,
+ (void**)&ssl->peerDilithiumKey);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ ssl->peerDilithiumKeyPresent = 1;
+ keyRet = wc_dilithium_init(ssl->peerDilithiumKey);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ keyRet = wc_dilithium_set_level(ssl->peerDilithiumKey, level);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ keyRet = wc_Dilithium_PublicKeyDecode(ssl->peerCert.sapkiDer, &tmpIdx,
+ ssl->peerDilithiumKey,
+ ssl->peerCert.sapkiLen);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ return 0;
+}
+
+/* ssl->peerCert->sapkiDer is the alternative public key. Hopefully it is a
+ * falcon public key. Convert it into a usable public key. */
+static int decodeFalconKey(WOLFSSL* ssl, int level)
+{
+ int keyRet;
+ word32 tmpIdx = 0;
+
+ if (ssl->peerFalconKeyPresent)
+ return INVALID_PARAMETER;
+
+ keyRet = AllocKey(ssl, DYNAMIC_TYPE_FALCON, (void**)&ssl->peerFalconKey);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ ssl->peerFalconKeyPresent = 1;
+ keyRet = wc_falcon_init(ssl->peerFalconKey);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ keyRet = wc_falcon_set_level(ssl->peerFalconKey, level);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ keyRet = wc_Falcon_PublicKeyDecode(ssl->peerCert.sapkiDer, &tmpIdx,
+ ssl->peerFalconKey,
+ ssl->peerCert.sapkiLen);
+ if (keyRet != 0)
+ return PEER_KEY_ERROR;
+
+ return 0;
+}
+#endif
+
/* handle processing TLS v1.3 certificate_verify (15) */
/* Parse and handle a TLS v1.3 CertificateVerify message.
*
@@ -9218,8 +9589,8 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
ret = 0;
ssl->options.asyncState = TLS_ASYNC_BEGIN;
XMEMSET(args, 0, sizeof(Dcv13Args));
- args->hashAlgo = sha_mac;
- args->sigAlgo = anonymous_sa_algo;
+ ssl->options.peerHashAlgo = sha_mac;
+ ssl->options.peerSigAlgo = anonymous_sa_algo;
args->idx = *inOutIdx;
args->begin = *inOutIdx;
#ifdef WOLFSSL_ASYNC_CRYPT
@@ -9250,8 +9621,36 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
if ((args->idx - args->begin) + ENUM_LEN + ENUM_LEN > totalSz) {
ERROR_OUT(BUFFER_ERROR, exit_dcv);
}
- ret = DecodeTls13SigAlg(input + args->idx, &args->hashAlgo,
- &args->sigAlgo);
+
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (ssl->peerSigSpec == NULL) {
+ /* The peer did not respond. We didn't send CKS or they don't
+ * support it. Either way, we do not need to handle dual
+ * key/sig case. */
+ ssl->sigSpec = NULL;
+ ssl->sigSpecSz = 0;
+ }
+
+ /* If no CKS extension or either native or alternative, then just
+ * get a normal sigalgo. But if BOTH, then get the native and alt
+ * sig algos. */
+ if (wolfSSL_is_server(ssl) ||
+ ssl->sigSpec == NULL ||
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_NATIVE ||
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_ALTERNATIVE) {
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ ret = DecodeTls13SigAlg(input + args->idx,
+ &ssl->options.peerHashAlgo, &ssl->options.peerSigAlgo);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ }
+ else {
+ ret = DecodeTls13HybridSigAlg(input + args->idx,
+ &ssl->options.peerHashAlgo,
+ &ssl->options.peerSigAlgo,
+ &args->altSigAlgo);
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
if (ret < 0)
goto exit_dcv;
args->idx += OPAQUE16_LEN;
@@ -9269,70 +9668,159 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
ERROR_OUT(BUFFER_ERROR, exit_dcv);
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ (ssl->sigSpec != NULL) &&
+ (*ssl->sigSpec != WOLFSSL_CKS_SIGSPEC_NATIVE)) {
+
+ word16 sa;
+ if (args->altSigAlgo == 0)
+ sa = ssl->options.peerSigAlgo;
+ else
+ sa = args->altSigAlgo;
+
+ switch(sa) {
+ case dilithium_level2_sa_algo:
+ ret = decodeDilithiumKey(ssl, 2);
+ break;
+ case dilithium_level3_sa_algo:
+ ret = decodeDilithiumKey(ssl, 3);
+ break;
+ case dilithium_level5_sa_algo:
+ ret = decodeDilithiumKey(ssl, 5);
+ break;
+ case falcon_level1_sa_algo:
+ ret = decodeFalconKey(ssl, 1);
+ break;
+ case falcon_level5_sa_algo:
+ ret = decodeFalconKey(ssl, 5);
+ break;
+ default:
+ ERROR_OUT(PEER_KEY_ERROR, exit_dcv);
+ break;
+ }
+
+ if (ret != 0)
+ ERROR_OUT(ret, exit_dcv);
+
+ if (*ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_ALTERNATIVE) {
+ /* Now swap in the alternative. We only support hybrid certs
+ * where native is RSA or ECC so check that either of those
+ * are present and then remove it. */
+ if (ssl->peerRsaKeyPresent &&
+ ssl->peerEccDsaKeyPresent) {
+ /* They shouldn't both be present. */
+ ERROR_OUT(PEER_KEY_ERROR, exit_dcv);
+ }
+ else if (ssl->peerRsaKeyPresent) {
+ FreeKey(ssl, DYNAMIC_TYPE_RSA,
+ (void**)&ssl->peerRsaKey);
+ ssl->peerRsaKeyPresent = 0;
+ }
+ else if (ssl->peerEccDsaKeyPresent) {
+ FreeKey(ssl, DYNAMIC_TYPE_ECC,
+ (void**)&ssl->peerEccDsaKey);
+ ssl->peerEccDsaKeyPresent = 0;
+ }
+ else {
+ ERROR_OUT(WOLFSSL_NOT_IMPLEMENTED, exit_dcv);
+ }
+ }
+ else if (*ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ /* Use alternative public key to figure out the expected
+ * alt sig size. We only support Post-quantum key as SAPKI.
+ */
+ switch(sa) {
+ case dilithium_level2_sa_algo:
+ case dilithium_level3_sa_algo:
+ case dilithium_level5_sa_algo:
+ ret = wc_dilithium_sig_size(ssl->peerDilithiumKey);
+ break;
+ case falcon_level1_sa_algo:
+ case falcon_level5_sa_algo:
+ ret = wc_falcon_sig_size(ssl->peerFalconKey);
+ break;
+ default:
+ ERROR_OUT(PEER_KEY_ERROR, exit_dcv);
+ break;
+ }
+
+ if (ret <= 0) {
+ ERROR_OUT(PEER_KEY_ERROR, exit_dcv);
+ }
+ args->altSignatureSz = ret;
+ ret = 0;
+ }
+ else {
+ ERROR_OUT(WOLFSSL_NOT_IMPLEMENTED, exit_dcv);
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Check for public key of required type. */
/* Assume invalid unless signature algo matches the key provided */
validSigAlgo = 0;
#ifdef HAVE_ED25519
- if (args->sigAlgo == ed25519_sa_algo) {
+ if (ssl->options.peerSigAlgo == ed25519_sa_algo) {
WOLFSSL_MSG("Peer sent ED25519 sig");
validSigAlgo = (ssl->peerEd25519Key != NULL) &&
ssl->peerEd25519KeyPresent;
}
#endif
#ifdef HAVE_ED448
- if (args->sigAlgo == ed448_sa_algo) {
+ if (ssl->options.peerSigAlgo == ed448_sa_algo) {
WOLFSSL_MSG("Peer sent ED448 sig");
validSigAlgo = (ssl->peerEd448Key != NULL) &&
ssl->peerEd448KeyPresent;
}
#endif
#ifdef HAVE_ECC
- if (args->sigAlgo == ecc_dsa_sa_algo) {
+ if (ssl->options.peerSigAlgo == ecc_dsa_sa_algo) {
WOLFSSL_MSG("Peer sent ECC sig");
validSigAlgo = (ssl->peerEccDsaKey != NULL) &&
ssl->peerEccDsaKeyPresent;
}
#endif
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- if (args->sigAlgo == sm2_sa_algo) {
+ if (ssl->options.peerSigAlgo == sm2_sa_algo) {
WOLFSSL_MSG("Peer sent SM2 sig");
validSigAlgo = (ssl->peerEccDsaKey != NULL) &&
ssl->peerEccDsaKeyPresent;
}
#endif
#ifdef HAVE_PQC
- if (args->sigAlgo == falcon_level1_sa_algo) {
+ if (ssl->options.peerSigAlgo == falcon_level1_sa_algo) {
WOLFSSL_MSG("Peer sent Falcon Level 1 sig");
validSigAlgo = (ssl->peerFalconKey != NULL) &&
ssl->peerFalconKeyPresent;
}
- if (args->sigAlgo == falcon_level5_sa_algo) {
+ if (ssl->options.peerSigAlgo == falcon_level5_sa_algo) {
WOLFSSL_MSG("Peer sent Falcon Level 5 sig");
validSigAlgo = (ssl->peerFalconKey != NULL) &&
ssl->peerFalconKeyPresent;
}
- if (args->sigAlgo == dilithium_level2_sa_algo) {
+ if (ssl->options.peerSigAlgo == dilithium_level2_sa_algo) {
WOLFSSL_MSG("Peer sent Dilithium Level 2 sig");
validSigAlgo = (ssl->peerDilithiumKey != NULL) &&
ssl->peerDilithiumKeyPresent;
}
- if (args->sigAlgo == dilithium_level3_sa_algo) {
+ if (ssl->options.peerSigAlgo == dilithium_level3_sa_algo) {
WOLFSSL_MSG("Peer sent Dilithium Level 3 sig");
validSigAlgo = (ssl->peerDilithiumKey != NULL) &&
ssl->peerDilithiumKeyPresent;
}
- if (args->sigAlgo == dilithium_level5_sa_algo) {
+ if (ssl->options.peerSigAlgo == dilithium_level5_sa_algo) {
WOLFSSL_MSG("Peer sent Dilithium Level 5 sig");
validSigAlgo = (ssl->peerDilithiumKey != NULL) &&
ssl->peerDilithiumKeyPresent;
}
#endif
#ifndef NO_RSA
- if (args->sigAlgo == rsa_sa_algo) {
+ if (ssl->options.peerSigAlgo == rsa_sa_algo) {
WOLFSSL_MSG("Peer sent PKCS#1.5 algo - not valid TLS 1.3");
ERROR_OUT(INVALID_PARAMETER, exit_dcv);
}
- if (args->sigAlgo == rsa_pss_sa_algo) {
+ if (ssl->options.peerSigAlgo == rsa_pss_sa_algo) {
WOLFSSL_MSG("Peer sent RSA sig");
validSigAlgo = (ssl->peerRsaKey != NULL) &&
ssl->peerRsaKeyPresent;
@@ -9343,14 +9831,48 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
ERROR_OUT(SIG_VERIFY_E, exit_dcv);
}
- sig->buffer = (byte*)XMALLOC(args->sz, ssl->heap,
+ sig->length = args->sz;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ /* If its RSA, we only hybridize with RSA3072 which has a sig
+ * size of 384. For ECC, this is actually encoded as an RFC5912
+ * formatted signature which means we can use the ASN APIs to
+ * figure out the length. Note that some post-quantum sig algs
+ * have variable length signatures (Falcon). That is why we
+ * don't do:
+ * sig->length -= args->altSignatureSz; */
+ #define RSA3072_SIG_LEN 384
+ if (ssl->options.peerSigAlgo == rsa_pss_sa_algo) {
+ sig->length = RSA3072_SIG_LEN;
+ }
+ else if (ssl->options.peerSigAlgo == ecc_dsa_sa_algo) {
+ word32 tmpIdx = args->idx;
+ sig->length = wc_SignatureGetSize(WC_SIGNATURE_TYPE_ECC,
+ ssl->peerEccDsaKey,
+ sizeof(*ssl->peerEccDsaKey));
+ if (GetSequence(input, &tmpIdx, (int*)&sig->length,
+ args->sz) < 0) {
+ ERROR_OUT(SIG_VERIFY_E, exit_dcv);
+ }
+ /* We have to increment by the size of the header. */
+ sig->length += tmpIdx - args->idx;
+ }
+ else {
+ ERROR_OUT(WOLFSSL_NOT_IMPLEMENTED, exit_dcv);
+ }
+ }
+#endif
+
+ sig->buffer = (byte*)XMALLOC(sig->length, ssl->heap,
DYNAMIC_TYPE_SIGNATURE);
+
if (sig->buffer == NULL) {
ERROR_OUT(MEMORY_E, exit_dcv);
}
- sig->length = args->sz;
- XMEMCPY(sig->buffer, input + args->idx, args->sz);
+ XMEMCPY(sig->buffer, input + args->idx, sig->length);
#ifdef HAVE_ECC
if (ssl->peerEccDsaKeyPresent) {
WOLFSSL_MSG("Doing ECC peer cert verify");
@@ -9365,11 +9887,11 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
if (ret != 0)
goto exit_dcv;
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- if (args->sigAlgo != sm2_sa_algo)
+ if (ssl->options.peerSigAlgo != sm2_sa_algo)
#endif
{
ret = CreateECCEncodedSig(args->sigData,
- args->sigDataSz, args->hashAlgo);
+ args->sigDataSz, ssl->options.peerHashAlgo);
if (ret < 0)
goto exit_dcv;
args->sigDataSz = (word16)ret;
@@ -9387,8 +9909,9 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
ERROR_OUT(MEMORY_E, exit_dcv);
}
- CreateSigData(ssl, args->sigData, &args->sigDataSz, 1);
- ret = 0;
+ ret = CreateSigData(ssl, args->sigData, &args->sigDataSz, 1);
+ if (ret < 0)
+ goto exit_dcv;
}
#endif
#ifdef HAVE_ED448
@@ -9401,34 +9924,39 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
ERROR_OUT(MEMORY_E, exit_dcv);
}
- CreateSigData(ssl, args->sigData, &args->sigDataSz, 1);
- ret = 0;
+ ret = CreateSigData(ssl, args->sigData, &args->sigDataSz, 1);
+ if (ret < 0)
+ goto exit_dcv;
}
#endif
#ifdef HAVE_PQC
- if (ssl->peerFalconKeyPresent) {
- WOLFSSL_MSG("Doing Falcon peer cert verify");
-
- args->sigData = (byte*)XMALLOC(MAX_SIG_DATA_SZ, ssl->heap,
+ if (ssl->peerFalconKeyPresent || ssl->peerDilithiumKeyPresent) {
+ word16 sigDataSz;
+ byte *sigData = (byte*)XMALLOC(MAX_SIG_DATA_SZ, ssl->heap,
DYNAMIC_TYPE_SIGNATURE);
- if (args->sigData == NULL) {
+ if (sigData == NULL) {
ERROR_OUT(MEMORY_E, exit_dcv);
}
- CreateSigData(ssl, args->sigData, &args->sigDataSz, 1);
- ret = 0;
- }
-
- if (ssl->peerDilithiumKeyPresent) {
- WOLFSSL_MSG("Doing Dilithium peer cert verify");
-
- args->sigData = (byte*)XMALLOC(MAX_SIG_DATA_SZ, ssl->heap,
- DYNAMIC_TYPE_SIGNATURE);
- if (args->sigData == NULL) {
- ERROR_OUT(MEMORY_E, exit_dcv);
+ ret = CreateSigData(ssl, sigData, &sigDataSz, 1);
+ if (ret < 0) {
+ goto exit_dcv;
}
- CreateSigData(ssl, args->sigData, &args->sigDataSz, 1);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ /* In this case (BOTH), the pq sig is the alternative. */
+ args->altSigData = sigData;
+ args->altSigDataSz = sigDataSz;
+ }
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ {
+ args->sigData = sigData;
+ args->sigDataSz = sigDataSz;
+ }
ret = 0;
}
#endif
@@ -9443,7 +9971,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
#ifndef NO_RSA
if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0) {
ret = RsaVerify(ssl, sig->buffer, (word32)sig->length, &args->output,
- args->sigAlgo, args->hashAlgo, ssl->peerRsaKey,
+ ssl->options.peerSigAlgo, ssl->options.peerHashAlgo, ssl->peerRsaKey,
#ifdef HAVE_PK_CALLBACKS
&ssl->buffers.peerRsaKey
#else
@@ -9459,7 +9987,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
#ifdef HAVE_ECC
if (ssl->peerEccDsaKeyPresent) {
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
- if (args->sigAlgo == sm2_sa_algo) {
+ if (ssl->options.peerSigAlgo == sm2_sa_algo) {
ret = Sm2wSm3Verify(ssl, TLS13_SM2_SIG_ID,
TLS13_SM2_SIG_ID_SZ, input + args->idx, args->sz,
args->sigData, args->sigDataSz,
@@ -9468,7 +9996,7 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
else
#endif
{
- ret = EccVerify(ssl, input + args->idx, args->sz,
+ ret = EccVerify(ssl, input + args->idx, sig->length,
args->sigData, args->sigDataSz,
ssl->peerEccDsaKey,
#ifdef HAVE_PK_CALLBACKS
@@ -9535,15 +10063,43 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
#if defined(HAVE_PQC) && defined(HAVE_FALCON)
if (ssl->peerFalconKeyPresent) {
int res = 0;
+ byte *sigIn = input + args->idx;
+ word32 sigInLen = args->sz;
+ byte *sigData = args->sigData;
+ word32 sigDataSz = args->sigDataSz;
WOLFSSL_MSG("Doing Falcon peer cert verify");
- ret = wc_falcon_verify_msg(input + args->idx, args->sz,
- args->sigData, args->sigDataSz,
- &res, ssl->peerFalconKey);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ /* Note: + sig->length; we are skipping the native sig. */
+ sigIn = input + args->idx + sig->length;
+ sigInLen = args->sz - sig->length;
+
+ /* For RSA, something different was verified. */
+ if (ssl->peerRsaKeyPresent) {
+ sigData = args->altSigData;
+ sigDataSz = args->altSigDataSz;
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ ret = wc_falcon_verify_msg(sigIn, sigInLen,
+ sigData, sigDataSz,
+ &res, ssl->peerFalconKey);
if ((ret >= 0) && (res == 1)) {
/* CLIENT/SERVER: data verified with public key from
* certificate. */
- ssl->options.peerAuthGood = 1;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ args->altPeerAuthGood = 1;
+ }
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ ssl->options.peerAuthGood = 1;
+
FreeKey(ssl, DYNAMIC_TYPE_FALCON,
(void**)&ssl->peerFalconKey);
ssl->peerFalconKeyPresent = 0;
@@ -9553,15 +10109,43 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
if (ssl->peerDilithiumKeyPresent) {
int res = 0;
+ byte *sigIn = input + args->idx;
+ word32 sigInLen = args->sz;
+ byte *sigData = args->sigData;
+ word32 sigDataSz = args->sigDataSz;
WOLFSSL_MSG("Doing Dilithium peer cert verify");
- ret = wc_dilithium_verify_msg(input + args->idx, args->sz,
- args->sigData, args->sigDataSz,
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ /* Go backwards from the end of the signature the size of
+ * the alt sig to find the beginning of the alt sig. */
+ sigIn = input + args->idx + args->sz - args->altSignatureSz;
+ sigInLen = args->altSignatureSz;
+ /* For RSA, something different was verified. */
+ if (ssl->peerRsaKeyPresent) {
+ sigData = args->altSigData;
+ sigDataSz = args->altSigDataSz;
+ }
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ ret = wc_dilithium_verify_msg(sigIn, sigInLen,
+ sigData, sigDataSz,
&res, ssl->peerDilithiumKey);
if ((ret >= 0) && (res == 1)) {
/* CLIENT/SERVER: data verified with public key from
* certificate. */
- ssl->options.peerAuthGood = 1;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ args->altPeerAuthGood = 1;
+ }
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ ssl->options.peerAuthGood = 1;
+
FreeKey(ssl, DYNAMIC_TYPE_DILITHIUM,
(void**)&ssl->peerDilithiumKey);
ssl->peerDilithiumKeyPresent = 0;
@@ -9583,8 +10167,8 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
{
#if !defined(NO_RSA) && defined(WC_RSA_PSS)
if (ssl->peerRsaKey != NULL && ssl->peerRsaKeyPresent != 0) {
- ret = CheckRSASignature(ssl, args->sigAlgo, args->hashAlgo,
- args->output, args->sendSz);
+ ret = CheckRSASignature(ssl, ssl->options.peerSigAlgo,
+ ssl->options.peerHashAlgo, args->output, args->sendSz);
if (ret != 0)
goto exit_dcv;
@@ -9603,6 +10187,14 @@ static int DoTls13CertificateVerify(WOLFSSL* ssl, byte* input,
case TLS_ASYNC_FINALIZE:
{
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (!wolfSSL_is_server(ssl) &&
+ ssl->options.peerAuthGood &&
+ ssl->sigSpec != NULL &&
+ *ssl->sigSpec == WOLFSSL_CKS_SIGSPEC_BOTH) {
+ ssl->options.peerAuthGood = args->altPeerAuthGood;
+ }
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
ssl->options.havePeerVerify = 1;
/* Set final index */
@@ -9790,7 +10382,8 @@ int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (sniff == NO_SNIFF) {
/* Actually check verify data. */
- if (XMEMCMP(input + *inOutIdx, mac, size) != 0){
+ if (size > WC_MAX_DIGEST_SIZE ||
+ XMEMCMP(input + *inOutIdx, mac, size) != 0){
WOLFSSL_MSG("Verify finished error on hashes");
SendAlert(ssl, alert_fatal, decrypt_error);
WOLFSSL_ERROR_VERBOSE(VERIFY_FINISHED_ERROR);
@@ -10354,6 +10947,8 @@ static int SendTls13EndOfEarlyData(WOLFSSL* ssl)
if (!ssl->options.groupMessages)
ret = SendBuffered(ssl);
+ ssl->earlyData = done_early_data;
+
WOLFSSL_LEAVE("SendTls13EndOfEarlyData", ret);
WOLFSSL_END(WC_FUNC_END_OF_EARLY_DATA_SEND);
@@ -12053,7 +12648,7 @@ int wolfSSL_connect_TLSv13(WOLFSSL* ssl)
}
ssl->options.connectState = CLIENT_HELLO_SENT;
- WOLFSSL_MSG("connect state: CLIENT_HELLO_SENT");
+ WOLFSSL_MSG("TLSv13 connect state: CLIENT_HELLO_SENT");
#ifdef WOLFSSL_EARLY_DATA
if (ssl->earlyData != no_early_data) {
#if defined(WOLFSSL_TLS13_MIDDLEBOX_COMPAT)
@@ -12484,6 +13079,30 @@ int wolfSSL_NoKeyShares(WOLFSSL* ssl)
}
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+int wolfSSL_UseCKS(WOLFSSL* ssl, byte *sigSpec, word16 sigSpecSz)
+{
+ if (ssl == NULL || !IsAtLeastTLSv1_3(ssl->ctx->method->version) ||
+ sigSpec == NULL || sigSpecSz == 0)
+ return BAD_FUNC_ARG;
+
+ ssl->sigSpec = sigSpec;
+ ssl->sigSpecSz = sigSpecSz;
+ return WOLFSSL_SUCCESS;
+}
+
+int wolfSSL_CTX_UseCKS(WOLFSSL_CTX* ctx, byte *sigSpec, word16 sigSpecSz)
+{
+ if (ctx == NULL || !IsAtLeastTLSv1_3(ctx->method->version) ||
+ sigSpec == NULL || sigSpecSz == 0)
+ return BAD_FUNC_ARG;
+
+ ctx->sigSpec = sigSpec;
+ ctx->sigSpecSz = sigSpecSz;
+ return WOLFSSL_SUCCESS;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Do not send a ticket after TLS v1.3 handshake for resumption.
*
* ctx The SSL/TLS CTX object.
@@ -12901,7 +13520,7 @@ void wolfSSL_set_psk_client_cs_callback(WOLFSSL* ssl,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
/* Set the PSK callback that returns the cipher suite for a client to use
@@ -12954,7 +13573,7 @@ void wolfSSL_set_psk_client_tls13_callback(WOLFSSL* ssl,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
/* Set the PSK callback that returns the cipher suite for a server to use
@@ -13004,7 +13623,7 @@ void wolfSSL_set_psk_server_tls13_callback(WOLFSSL* ssl,
ssl->options.haveDH, ssl->options.haveECDSAsig,
ssl->options.haveECC, TRUE, ssl->options.haveStaticECC,
ssl->options.haveFalconSig, ssl->options.haveDilithiumSig,
- ssl->options.haveAnon, TRUE, ssl->options.side);
+ ssl->options.useAnon, TRUE, ssl->options.side);
}
/* Get name of first supported cipher suite that uses the hash indicated.
@@ -13753,6 +14372,7 @@ int wolfSSL_read_early_data(WOLFSSL* ssl, void* data, int sz, int* outSz)
if (!IsAtLeastTLSv1_3(ssl->version))
return BAD_FUNC_ARG;
+ *outSz = 0;
#ifndef NO_WOLFSSL_SERVER
if (ssl->options.side == WOLFSSL_CLIENT_END)
return SIDE_ERROR;
diff --git a/extra/wolfssl/wolfssl/src/wolfio.c b/extra/wolfssl/wolfssl/src/wolfio.c
index 4fee9583..041e0b77 100644
--- a/extra/wolfssl/wolfssl/src/wolfio.c
+++ b/extra/wolfssl/wolfssl/src/wolfio.c
@@ -41,6 +41,56 @@
#include <wolfssl/error-ssl.h>
#include <wolfssl/wolfio.h>
+#if defined(USE_WOLFSSL_IO) || defined(HAVE_HTTP_CLIENT)
+ #ifndef USE_WINDOWS_API
+ #if defined(WOLFSSL_LWIP) && !defined(WOLFSSL_APACHE_MYNEWT)
+ #elif defined(ARDUINO)
+ #elif defined(FREESCALE_MQX)
+ #elif defined(FREESCALE_KSDK_MQX)
+ #elif (defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET))
+ #elif defined(WOLFSSL_CMSIS_RTOS)
+ #elif defined(WOLFSSL_CMSIS_RTOSv2)
+ #elif defined(WOLFSSL_TIRTOS)
+ #elif defined(FREERTOS_TCP)
+ #elif defined(WOLFSSL_IAR_ARM)
+ #elif defined(HAVE_NETX_BSD)
+ #elif defined(WOLFSSL_VXWORKS)
+ #elif defined(WOLFSSL_NUCLEUS_1_2)
+ #elif defined(WOLFSSL_LINUXKM)
+ /* the requisite linux/net.h is included in wc_port.h, with incompatible warnings masked out. */
+ #elif defined(WOLFSSL_ATMEL)
+ #elif defined(INTIME_RTOS)
+ #include <netdb.h>
+ #elif defined(WOLFSSL_PRCONNECT_PRO)
+ #include <netdb.h>
+ #include <sys/ioctl.h>
+ #elif defined(WOLFSSL_SGX)
+ #elif defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
+ #elif defined(WOLFSSL_DEOS)
+ #elif defined(WOLFSSL_ZEPHYR)
+ #elif defined(MICROCHIP_PIC32)
+ #elif defined(HAVE_NETX)
+ #elif defined(FUSION_RTOS)
+ #elif !defined(WOLFSSL_NO_SOCK)
+ #if defined(HAVE_RTP_SYS)
+ #elif defined(EBSNET)
+ #elif defined(NETOS)
+ #elif !defined(DEVKITPRO) && !defined(WOLFSSL_PICOTCP) \
+ && !defined(WOLFSSL_CONTIKI) && !defined(WOLFSSL_WICED) \
+ && !defined(WOLFSSL_GNRC) && !defined(WOLFSSL_RIOT_OS)
+ #include <netdb.h>
+ #ifdef __PPU
+ #include <netex/errno.h>
+ #else
+ #include <sys/ioctl.h>
+ #endif
+ #endif
+ #endif
+
+ #endif /* USE_WINDOWS_API */
+#endif /* defined(USE_WOLFSSL_IO) || defined(HAVE_HTTP_CLIENT) */
+
+
#if defined(HAVE_HTTP_CLIENT)
#include <stdlib.h> /* strtol() */
#endif
@@ -1409,6 +1459,9 @@ int wolfIO_DecodeUrl(const char* url, int urlSz, char* outName, char* outPath,
word32 bigPort = 0;
i = 0;
cur++;
+
+ XMEMSET(port, 0, sizeof(port));
+
while (i < 6 && cur < urlSz && url[cur] != 0 && url[cur] != '/') {
port[i] = url[cur];
i++; cur++;
diff --git a/extra/wolfssl/wolfssl/src/x509.c b/extra/wolfssl/wolfssl/src/x509.c
index a1c4fc4d..eefa69cb 100644
--- a/extra/wolfssl/wolfssl/src/x509.c
+++ b/extra/wolfssl/wolfssl/src/x509.c
@@ -1545,22 +1545,10 @@ int wolfSSL_X509V3_EXT_print(WOLFSSL_BIO *out, WOLFSSL_X509_EXTENSION *ext,
WOLFSSL_MSG("Memory error");
return rc;
}
- if (sk->next) {
- if ((valLen = XSNPRINTF(val, len, "%*s%s,",
- indent, "", str->strData))
- >= len) {
- XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- return rc;
- }
- } else {
- if ((valLen = XSNPRINTF(val, len, "%*s%s",
- indent, "", str->strData))
- >= len) {
- XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- return rc;
- }
- }
- if ((tmpLen + valLen) >= tmpSz) {
+ valLen = XSNPRINTF(val, len, "%*s%s", indent, "",
+ str->strData);
+ if ((valLen < 0) || (valLen >= len)
+ || ((tmpLen + valLen) >= tmpSz)) {
XFREE(val, NULL, DYNAMIC_TYPE_TMP_BUFFER);
return rc;
}
@@ -3593,7 +3581,7 @@ WOLFSSL_X509* wolfSSL_d2i_X509(WOLFSSL_X509** x509, const unsigned char** in,
}
static WOLFSSL_X509* d2i_X509orX509REQ(WOLFSSL_X509** x509,
- const byte* in, int len, int req)
+ const byte* in, int len, int req, void* heap)
{
WOLFSSL_X509 *newX509 = NULL;
int type = req ? CERTREQ_TYPE : CERT_TYPE;
@@ -3620,12 +3608,12 @@ static WOLFSSL_X509* d2i_X509orX509REQ(WOLFSSL_X509** x509,
return NULL;
#endif
- InitDecodedCert(cert, (byte*)in, len, NULL);
+ InitDecodedCert(cert, (byte*)in, len, heap);
#ifdef WOLFSSL_CERT_REQ
cert->isCSR = (byte)req;
#endif
if (ParseCertRelative(cert, type, 0, NULL) == 0) {
- newX509 = wolfSSL_X509_new();
+ newX509 = wolfSSL_X509_new_ex(heap);
if (newX509 != NULL) {
if (CopyDecodedToX509(newX509, cert) != 0) {
wolfSSL_X509_free(newX509);
@@ -3659,16 +3647,22 @@ int wolfSSL_X509_get_isCA(WOLFSSL_X509* x509)
return isCA;
}
+WOLFSSL_X509* wolfSSL_X509_d2i_ex(WOLFSSL_X509** x509, const byte* in, int len,
+ void* heap)
+{
+ return d2i_X509orX509REQ(x509, in, len, 0, heap);
+}
+
WOLFSSL_X509* wolfSSL_X509_d2i(WOLFSSL_X509** x509, const byte* in, int len)
{
- return d2i_X509orX509REQ(x509, in, len, 0);
+ return wolfSSL_X509_d2i_ex(x509, in, len, NULL);
}
#ifdef WOLFSSL_CERT_REQ
WOLFSSL_X509* wolfSSL_X509_REQ_d2i(WOLFSSL_X509** x509,
const unsigned char* in, int len)
{
- return d2i_X509orX509REQ(x509, in, len, 1);
+ return d2i_X509orX509REQ(x509, in, len, 1, NULL);
}
#endif
@@ -5319,19 +5313,24 @@ WOLFSSL_X509* wolfSSL_X509_REQ_load_certificate_buffer(
/* returns a pointer to a new WOLFSSL_X509 structure on success and NULL on
* fail
*/
-WOLFSSL_X509* wolfSSL_X509_new(void)
+WOLFSSL_X509* wolfSSL_X509_new_ex(void* heap)
{
WOLFSSL_X509* x509;
- x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), NULL,
+ x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), heap,
DYNAMIC_TYPE_X509);
if (x509 != NULL) {
- InitX509(x509, 1, NULL);
+ InitX509(x509, 1, heap);
}
return x509;
}
+WOLFSSL_X509* wolfSSL_X509_new(void)
+{
+ return wolfSSL_X509_new_ex(NULL);
+}
+
WOLFSSL_ABI
WOLFSSL_X509_NAME* wolfSSL_X509_get_subject_name(WOLFSSL_X509* cert)
{
@@ -7523,6 +7522,45 @@ int wolfSSL_i2d_X509(WOLFSSL_X509* x509, unsigned char** out)
return derSz;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+int wc_GeneratePreTBS(DecodedCert* cert, byte *der, int derSz) {
+ int ret = 0;
+ WOLFSSL_X509 *x = NULL;
+
+ if ((cert == NULL) || (der == NULL) || (derSz <= 0)) {
+ return BAD_FUNC_ARG;
+ }
+
+ x = wolfSSL_X509_new();
+ if (x == NULL) {
+ ret = MEMORY_E;
+ }
+ else {
+ ret = CopyDecodedToX509(x, cert);
+ }
+
+ if (ret == 0) {
+ /* Remove the altsigval extension. */
+ XFREE(x->altSigValDer, x->heap, DYNAMIC_TYPE_X509_EXT);
+ x->altSigValDer = NULL;
+ x->altSigValDer = 0;
+ /* Remove sigOID so it won't be encoded. */
+ x->sigOID = 0;
+ /* We now have a PreTBS. Encode it. */
+ ret = wolfssl_x509_make_der(x, 0, der, &derSz, 0);
+ if (ret == WOLFSSL_SUCCESS) {
+ ret = derSz;
+ }
+ }
+
+ if (x != NULL) {
+ wolfSSL_X509_free(x);
+ }
+
+ return ret;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
#ifndef NO_BIO
/**
* Converts the DER from bio and creates a WOLFSSL_X509 structure from it.
@@ -7571,7 +7609,7 @@ static WOLFSSL_X509* d2i_X509orX509REQ_bio(WOLFSSL_BIO* bio,
#endif
}
else {
- localX509 = wolfSSL_X509_d2i(NULL, mem, size);
+ localX509 = wolfSSL_X509_d2i_ex(NULL, mem, size, bio->heap);
}
if (localX509 == NULL) {
WOLFSSL_MSG("wolfSSL_X509_d2i error");
@@ -7934,7 +7972,7 @@ WOLFSSL_API WOLFSSL_X509_CRL *wolfSSL_d2i_X509_CRL_bio(WOLFSSL_BIO *bp,
}
#endif
-#ifndef NO_FILESYSTEM
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
WOLFSSL_X509_CRL *wolfSSL_d2i_X509_CRL_fp(XFILE fp, WOLFSSL_X509_CRL **crl)
{
WOLFSSL_ENTER("wolfSSL_d2i_X509_CRL_fp");
@@ -9928,6 +9966,16 @@ WOLF_STACK_OF(WOLFSSL_X509)* wolfSSL_X509_chain_up_ref(
XMEMCPY(cert->crlInfo, x509->rawCRLInfo, x509->rawCRLInfoSz);
cert->crlInfoSz = x509->rawCRLInfoSz;
}
+
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* We point to instance in x509 so DON'T need to be free'd. */
+ cert->sapkiDer = x509->sapkiDer;
+ cert->sapkiLen = x509->sapkiLen;
+ cert->altSigAlgDer = x509->altSigAlgDer;
+ cert->altSigAlgLen = x509->altSigAlgLen;
+ cert->altSigValDer = x509->altSigValDer;
+ cert->altSigValLen = x509->altSigValLen;
+ #endif /* WOLFSSL_DUAL_ALG_CERTS */
#endif /* WOLFSSL_CERT_EXT */
#ifdef WOLFSSL_CERT_REQ
@@ -11173,7 +11221,7 @@ err:
pemSz = (int)(l - i);
/* check calculated length */
- if (pemSz > MAX_WOLFSSL_FILE_SIZE || pemSz < 0) {
+ if (pemSz > MAX_WOLFSSL_FILE_SIZE || pemSz <= 0) {
WOLFSSL_MSG("PEM_read_X509_ex file size error");
return NULL;
}
@@ -13304,7 +13352,7 @@ static int x509GetIssuerFromCM(WOLFSSL_X509 **issuer, WOLFSSL_CERT_MANAGER* cm,
#endif
/* Use existing CA retrieval APIs that use DecodedCert. */
- InitDecodedCert(cert, x->derCert->buffer, x->derCert->length, NULL);
+ InitDecodedCert(cert, x->derCert->buffer, x->derCert->length, cm->heap);
if (ParseCertRelative(cert, CERT_TYPE, 0, NULL) == 0
&& !cert->selfSigned) {
#ifndef NO_SKID
@@ -13326,8 +13374,8 @@ static int x509GetIssuerFromCM(WOLFSSL_X509 **issuer, WOLFSSL_CERT_MANAGER* cm,
#ifdef WOLFSSL_SIGNER_DER_CERT
/* populate issuer with Signer DER */
- if (wolfSSL_X509_d2i(issuer, ca->derCert->buffer,
- ca->derCert->length) == NULL)
+ if (wolfSSL_X509_d2i_ex(issuer, ca->derCert->buffer,
+ ca->derCert->length, cm->heap) == NULL)
return WOLFSSL_FAILURE;
#else
/* Create an empty certificate as CA doesn't have a certificate. */
@@ -13422,7 +13470,8 @@ WOLFSSL_X509* wolfSSL_X509_dup(WOLFSSL_X509 *x)
return NULL;
}
- return wolfSSL_X509_d2i(NULL, x->derCert->buffer, x->derCert->length);
+ return wolfSSL_X509_d2i_ex(NULL, x->derCert->buffer, x->derCert->length,
+ x->heap);
}
#endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL */
@@ -13787,35 +13836,50 @@ void wolfSSL_X509V3_set_ctx(WOLFSSL_X509V3_CTX* ctx, WOLFSSL_X509* issuer,
{
int ret = WOLFSSL_SUCCESS;
WOLFSSL_ENTER("wolfSSL_X509V3_set_ctx");
- if (!ctx)
- return;
+ if (!ctx) {
+ ret = WOLFSSL_FAILURE;
+ WOLFSSL_MSG("wolfSSL_X509V3_set_ctx() called with null ctx.");
+ }
- /* not checking ctx->x509 for null first since app won't have initialized
- * this X509V3_CTX before this function call */
- ctx->x509 = wolfSSL_X509_new();
- if (!ctx->x509)
- return;
+ if (ret == WOLFSSL_SUCCESS && (ctx->x509 != NULL)) {
+ ret = WOLFSSL_FAILURE;
+ WOLFSSL_MSG("wolfSSL_X509V3_set_ctx() called "
+ "with ctx->x509 already allocated.");
+ }
+
+ if (ret == WOLFSSL_SUCCESS) {
+ ctx->x509 = wolfSSL_X509_new_ex(
+ (issuer && issuer->heap) ? issuer->heap :
+ (subject && subject->heap) ? subject->heap :
+ (req && req->heap) ? req->heap :
+ NULL);
+ if (!ctx->x509) {
+ ret = WOLFSSL_FAILURE;
+ WOLFSSL_MSG("wolfSSL_X509_new_ex() failed "
+ "in wolfSSL_X509V3_set_ctx().");
+ }
+ }
/* Set parameters in ctx as long as ret == WOLFSSL_SUCCESS */
- if (issuer)
+ if (ret == WOLFSSL_SUCCESS && issuer)
ret = wolfSSL_X509_set_issuer_name(ctx->x509,&issuer->issuer);
- if (subject && ret == WOLFSSL_SUCCESS)
+ if (ret == WOLFSSL_SUCCESS && subject)
ret = wolfSSL_X509_set_subject_name(ctx->x509,&subject->subject);
- if (req && ret == WOLFSSL_SUCCESS) {
+ if (ret == WOLFSSL_SUCCESS && req) {
WOLFSSL_MSG("req not implemented.");
}
- if (crl && ret == WOLFSSL_SUCCESS) {
+ if (ret == WOLFSSL_SUCCESS && crl) {
WOLFSSL_MSG("crl not implemented.");
}
- if (flag && ret == WOLFSSL_SUCCESS) {
+ if (ret == WOLFSSL_SUCCESS && flag) {
WOLFSSL_MSG("flag not implemented.");
}
- if (!ret) {
+ if (ret != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("Error setting WOLFSSL_X509V3_CTX parameters.");
}
}
diff --git a/extra/wolfssl/wolfssl/src/x509_str.c b/extra/wolfssl/wolfssl/src/x509_str.c
index b0b365bc..a38f93b2 100644
--- a/extra/wolfssl/wolfssl/src/x509_str.c
+++ b/extra/wolfssl/wolfssl/src/x509_str.c
@@ -63,7 +63,8 @@ WOLFSSL_X509_STORE_CTX* wolfSSL_X509_STORE_CTX_new(void)
int wolfSSL_X509_STORE_CTX_init(WOLFSSL_X509_STORE_CTX* ctx,
- WOLFSSL_X509_STORE* store, WOLFSSL_X509* x509, WOLF_STACK_OF(WOLFSSL_X509)* sk)
+ WOLFSSL_X509_STORE* store, WOLFSSL_X509* x509,
+ WOLF_STACK_OF(WOLFSSL_X509)* sk)
{
int ret = 0;
(void)sk;
@@ -75,8 +76,8 @@ int wolfSSL_X509_STORE_CTX_init(WOLFSSL_X509_STORE_CTX* ctx,
ctx->current_cert = x509;
#else
if(x509 != NULL){
- ctx->current_cert = wolfSSL_X509_d2i(NULL, x509->derCert->buffer,
- x509->derCert->length);
+ ctx->current_cert = wolfSSL_X509_d2i_ex(NULL, x509->derCert->buffer,
+ x509->derCert->length, x509->heap);
if(ctx->current_cert == NULL)
return WOLFSSL_FAILURE;
} else
@@ -556,6 +557,7 @@ WOLFSSL_STACK* wolfSSL_X509_STORE_CTX_get_chain(WOLFSSL_X509_STORE_CTX* ctx)
}
}
else {
+ wolfSSL_X509_free(x509);
WOLFSSL_MSG("Could not find CA for certificate");
}
}
@@ -1035,7 +1037,7 @@ WOLFSSL_API int wolfSSL_X509_STORE_load_locations(WOLFSSL_X509_STORE *str,
return WOLFSSL_FAILURE;
/* tmp ctx for setting our cert manager */
- ctx = wolfSSL_CTX_new(cm_pick_method());
+ ctx = wolfSSL_CTX_new_ex(cm_pick_method(str->cm->heap), str->cm->heap);
if (ctx == NULL)
return WOLFSSL_FAILURE;
diff --git a/extra/wolfssl/wolfssl/support/wolfssl.pc.in b/extra/wolfssl/wolfssl/support/wolfssl.pc.in
index e8cb694f..19aa4431 100644
--- a/extra/wolfssl/wolfssl/support/wolfssl.pc.in
+++ b/extra/wolfssl/wolfssl/support/wolfssl.pc.in
@@ -7,4 +7,5 @@ Name: wolfssl
Description: wolfssl C library.
Version: @VERSION@
Libs: -L${libdir} -lwolfssl
+Libs.private: @LIBM@
Cflags: -I${includedir}
diff --git a/extra/wolfssl/wolfssl/tests/api.c b/extra/wolfssl/wolfssl/tests/api.c
index 19cca234..c6c6cc90 100644
--- a/extra/wolfssl/wolfssl/tests/api.c
+++ b/extra/wolfssl/wolfssl/tests/api.c
@@ -234,10 +234,6 @@
#define FOURK_BUF 4096
#define GEN_BUF 294
-
- #ifndef USER_CRYPTO_ERROR
- #define USER_CRYPTO_ERROR (-101) /* error returned by IPP lib. */
- #endif
#endif
#ifndef NO_SIG_WRAPPER
@@ -445,6 +441,7 @@ typedef struct test_ssl_cbf {
ctx_cb ctx_ready;
ssl_cb ssl_ready;
ssl_cb on_result;
+ ctx_cb on_ctx_cleanup;
ssl_cb on_cleanup;
hs_cb on_handshake;
WOLFSSL_CTX* ctx;
@@ -839,6 +836,344 @@ static int test_wolfSSL_Method_Allocators(void)
return EXPECT_RESULT();
}
+#if defined(WOLFSSL_DUAL_ALG_CERTS) && !defined(NO_FILESYSTEM)
+/*----------------------------------------------------------------------------*
+ | Dual algorithm Certificate Tests
+ *----------------------------------------------------------------------------*/
+#define LARGE_TEMP_SZ 4096
+
+/* To better understand this, please see the X9.146 example in wolfssl-examples
+ * repo. */
+static int do_dual_alg_root_certgen(byte **out, char *caKeyFile,
+ char *sapkiFile, char *altPrivFile)
+{
+ EXPECT_DECLS;
+ FILE* file = NULL;
+ Cert newCert;
+ DecodedCert preTBS;
+
+ byte caKeyBuf[LARGE_TEMP_SZ];
+ word32 caKeySz = LARGE_TEMP_SZ;
+ byte sapkiBuf[LARGE_TEMP_SZ];
+ word32 sapkiSz = LARGE_TEMP_SZ;
+ byte altPrivBuf[LARGE_TEMP_SZ];
+ word32 altPrivSz = LARGE_TEMP_SZ;
+ byte altSigAlgBuf[LARGE_TEMP_SZ];
+ word32 altSigAlgSz = LARGE_TEMP_SZ;
+ byte scratchBuf[LARGE_TEMP_SZ];
+ word32 scratchSz = LARGE_TEMP_SZ;
+ byte preTbsBuf[LARGE_TEMP_SZ];
+ word32 preTbsSz = LARGE_TEMP_SZ;
+ byte altSigValBuf[LARGE_TEMP_SZ];
+ word32 altSigValSz = LARGE_TEMP_SZ;
+ byte *outBuf = NULL;
+ word32 outSz = LARGE_TEMP_SZ;
+ WC_RNG rng;
+ RsaKey caKey;
+ ecc_key altCaKey;
+ word32 idx = 0;
+ ExpectNotNull(outBuf = (byte*)XMALLOC(outSz, NULL,
+ DYNAMIC_TYPE_TMP_BUFFER));
+ ExpectIntEQ(wc_InitRng(&rng), 0);
+ XMEMSET(caKeyBuf, 0, caKeySz);
+ ExpectNotNull(file = fopen(caKeyFile, "rb"));
+ ExpectIntGT(caKeySz = (word32)fread(caKeyBuf, 1, caKeySz, file), 0);
+ fclose(file);
+ ExpectIntEQ(wc_InitRsaKey_ex(&caKey, NULL, INVALID_DEVID), 0);
+ idx = 0;
+ ExpectIntEQ(wc_RsaPrivateKeyDecode(caKeyBuf, &idx, &caKey, caKeySz),
+ 0);
+ XMEMSET(sapkiBuf, 0, sapkiSz);
+ ExpectNotNull(file = fopen(sapkiFile, "rb"));
+ ExpectIntGT(sapkiSz = (word32)fread(sapkiBuf, 1, sapkiSz, file), 0);
+ fclose(file);
+ XMEMSET(altPrivBuf, 0, altPrivSz);
+ ExpectNotNull(file = fopen(altPrivFile, "rb"));
+ ExpectIntGT(altPrivSz = (word32)fread(altPrivBuf, 1, altPrivSz, file), 0);
+ fclose(file);
+ wc_ecc_init(&altCaKey);
+ idx = 0;
+ ExpectIntEQ(wc_EccPrivateKeyDecode(altPrivBuf, &idx, &altCaKey,
+ (word32)altPrivSz), 0);
+ XMEMSET(altSigAlgBuf, 0, altSigAlgSz);
+ ExpectIntGT(altSigAlgSz = SetAlgoID(CTC_SHA256wECDSA, altSigAlgBuf,
+ oidSigType, 0), 0);
+ wc_InitCert(&newCert);
+ strncpy(newCert.subject.country, "US", CTC_NAME_SIZE);
+ strncpy(newCert.subject.state, "MT", CTC_NAME_SIZE);
+ strncpy(newCert.subject.locality, "Bozeman", CTC_NAME_SIZE);
+ strncpy(newCert.subject.org, "wolfSSL", CTC_NAME_SIZE);
+ strncpy(newCert.subject.unit, "Engineering", CTC_NAME_SIZE);
+ strncpy(newCert.subject.commonName, "www.wolfssl.com", CTC_NAME_SIZE);
+ strncpy(newCert.subject.email, "root@wolfssl.com", CTC_NAME_SIZE);
+ newCert.sigType = CTC_SHA256wRSA;
+ newCert.isCA = 1;
+
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "1.2.3.4.5",
+ (const byte *)"This is NOT a critical extension", 32), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "2.5.29.72", sapkiBuf,
+ sapkiSz), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "2.5.29.73", altSigAlgBuf,
+ altSigAlgSz), 0);
+
+ XMEMSET(scratchBuf, 0, scratchSz);
+ ExpectIntGT(scratchSz = wc_MakeSelfCert(&newCert, scratchBuf, scratchSz,
+ &caKey, &rng), 0);
+ wc_InitDecodedCert(&preTBS, scratchBuf, scratchSz, 0);
+ ExpectIntEQ(wc_ParseCert(&preTBS, CERT_TYPE, NO_VERIFY, NULL), 0);
+
+ XMEMSET(preTbsBuf, 0, preTbsSz);
+ ExpectIntGT(preTbsSz = wc_GeneratePreTBS(&preTBS, preTbsBuf, preTbsSz), 0);
+ XMEMSET(altSigValBuf, 0, altSigValSz);
+ ExpectIntGT(altSigValSz = wc_MakeSigWithBitStr(altSigValBuf, altSigValSz,
+ CTC_SHA256wECDSA, preTbsBuf, preTbsSz, ECC_TYPE, &altCaKey,
+ &rng), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "2.5.29.74", altSigValBuf,
+ altSigValSz), 0);
+
+ /* Finally, generate the new certificate. */
+ XMEMSET(outBuf, 0, outSz);
+ ExpectIntGT(outSz = wc_MakeSelfCert(&newCert, outBuf, outSz, &caKey, &rng),
+ 0);
+ *out = outBuf;
+ wc_FreeRsaKey(&caKey);
+ wc_FreeRng(&rng);
+ return outSz;
+}
+
+static int do_dual_alg_server_certgen(byte **out, char *caKeyFile,
+ char *sapkiFile, char *altPrivFile,
+ char *serverKeyFile,
+ byte *caCertBuf, int caCertSz)
+{
+ EXPECT_DECLS;
+ FILE* file = NULL;
+ Cert newCert;
+ DecodedCert preTBS;
+
+ byte serverKeyBuf[LARGE_TEMP_SZ];
+ word32 serverKeySz = LARGE_TEMP_SZ;
+ byte caKeyBuf[LARGE_TEMP_SZ];
+ word32 caKeySz = LARGE_TEMP_SZ;
+ byte sapkiBuf[LARGE_TEMP_SZ];
+ word32 sapkiSz = LARGE_TEMP_SZ;
+ byte altPrivBuf[LARGE_TEMP_SZ];
+ word32 altPrivSz = LARGE_TEMP_SZ;
+ byte altSigAlgBuf[LARGE_TEMP_SZ];
+ word32 altSigAlgSz = LARGE_TEMP_SZ;
+ byte scratchBuf[LARGE_TEMP_SZ];
+ word32 scratchSz = LARGE_TEMP_SZ;
+ byte preTbsBuf[LARGE_TEMP_SZ];
+ word32 preTbsSz = LARGE_TEMP_SZ;
+ byte altSigValBuf[LARGE_TEMP_SZ];
+ word32 altSigValSz = LARGE_TEMP_SZ;
+ byte *outBuf = NULL;
+ word32 outSz = LARGE_TEMP_SZ;
+ WC_RNG rng;
+ RsaKey caKey;
+ RsaKey serverKey;
+ ecc_key altCaKey;
+ word32 idx = 0;
+ ExpectNotNull(outBuf = (byte*)XMALLOC(outSz, NULL,
+ DYNAMIC_TYPE_TMP_BUFFER));
+ ExpectIntEQ(wc_InitRng(&rng), 0);
+ XMEMSET(serverKeyBuf, 0, serverKeySz);
+ ExpectNotNull(file = fopen(serverKeyFile, "rb"));
+ ExpectIntGT(serverKeySz = (word32)fread(serverKeyBuf, 1, serverKeySz, file),
+ 0);
+ fclose(file);
+ ExpectIntEQ(wc_InitRsaKey_ex(&serverKey, NULL, INVALID_DEVID), 0);
+ idx = 0;
+ ExpectIntEQ(wc_RsaPrivateKeyDecode(serverKeyBuf, &idx, &serverKey,
+ (word32)serverKeySz), 0);
+ XMEMSET(caKeyBuf, 0, caKeySz);
+ ExpectNotNull(file = fopen(caKeyFile, "rb"));
+ ExpectIntGT(caKeySz = (word32)fread(caKeyBuf, 1, caKeySz, file), 0);
+ fclose(file);
+ ExpectIntEQ(wc_InitRsaKey_ex(&caKey, NULL, INVALID_DEVID), 0);
+ idx = 0;
+ ExpectIntEQ(wc_RsaPrivateKeyDecode(caKeyBuf, &idx, &caKey,
+ (word32)caKeySz), 0);
+ XMEMSET(sapkiBuf, 0, sapkiSz);
+ ExpectNotNull(file = fopen(sapkiFile, "rb"));
+ ExpectIntGT(sapkiSz = (word32)fread(sapkiBuf, 1, sapkiSz, file), 0);
+ fclose(file);
+ XMEMSET(altPrivBuf, 0, altPrivSz);
+ ExpectNotNull(file = fopen(altPrivFile, "rb"));
+ ExpectIntGT(altPrivSz = (word32)fread(altPrivBuf, 1, altPrivSz, file), 0);
+ fclose(file);
+ wc_ecc_init(&altCaKey);
+ idx = 0;
+ ExpectIntEQ(wc_EccPrivateKeyDecode(altPrivBuf, &idx, &altCaKey,
+ (word32)altPrivSz), 0);
+ XMEMSET(altSigAlgBuf, 0, altSigAlgSz);
+ ExpectIntGT(altSigAlgSz = SetAlgoID(CTC_SHA256wECDSA, altSigAlgBuf,
+ oidSigType, 0), 0);
+ wc_InitCert(&newCert);
+ strncpy(newCert.subject.country, "US", CTC_NAME_SIZE);
+ strncpy(newCert.subject.state, "MT", CTC_NAME_SIZE);
+ strncpy(newCert.subject.locality, "Bozeman", CTC_NAME_SIZE);
+ strncpy(newCert.subject.org, "wolfSSL", CTC_NAME_SIZE);
+ strncpy(newCert.subject.unit, "Engineering", CTC_NAME_SIZE);
+ strncpy(newCert.subject.commonName, "www.wolfssl.com", CTC_NAME_SIZE);
+ strncpy(newCert.subject.email, "server@wolfssl.com", CTC_NAME_SIZE);
+
+ newCert.sigType = CTC_SHA256wRSA;
+ newCert.isCA = 0;
+ ExpectIntEQ(wc_SetIssuerBuffer(&newCert, caCertBuf, caCertSz), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "1.2.3.4.5",
+ (const byte *)"This is NOT a critical extension", 32), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "2.5.29.72", sapkiBuf,
+ sapkiSz), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "2.5.29.73", altSigAlgBuf,
+ altSigAlgSz), 0);
+ XMEMSET(scratchBuf, 0, scratchSz);
+ ExpectIntGT(wc_MakeCert(&newCert, scratchBuf, scratchSz, &serverKey, NULL,
+ &rng), 0);
+ ExpectIntGT(scratchSz = wc_SignCert(newCert.bodySz, newCert.sigType,
+ scratchBuf, scratchSz, &caKey, NULL, &rng), 0);
+ wc_InitDecodedCert(&preTBS, scratchBuf, scratchSz, 0);
+ ExpectIntEQ(wc_ParseCert(&preTBS, CERT_TYPE, NO_VERIFY, NULL), 0);
+ XMEMSET(preTbsBuf, 0, preTbsSz);
+ ExpectIntGT(preTbsSz = wc_GeneratePreTBS(&preTBS, preTbsBuf, preTbsSz), 0);
+ XMEMSET(altSigValBuf, 0, altSigValSz);
+ ExpectIntGT(altSigValSz = wc_MakeSigWithBitStr(altSigValBuf, altSigValSz,
+ CTC_SHA256wECDSA, preTbsBuf, preTbsSz, ECC_TYPE, &altCaKey,
+ &rng), 0);
+ ExpectIntEQ(wc_SetCustomExtension(&newCert, 0, "2.5.29.74",
+ altSigValBuf, altSigValSz), 0);
+ /* Finally, generate the new certificate. */
+ XMEMSET(outBuf, 0, outSz);
+ ExpectIntGT(wc_MakeCert(&newCert, outBuf, outSz, &serverKey, NULL, &rng),
+ 0);
+ ExpectIntGT(outSz = wc_SignCert(newCert.bodySz, newCert.sigType, outBuf,
+ outSz, &caKey, NULL, &rng), 0);
+ *out = outBuf;
+ wc_FreeRsaKey(&caKey);
+ wc_FreeRsaKey(&serverKey);
+ wc_FreeRng(&rng);
+ return outSz;
+}
+
+static int do_dual_alg_tls13_connection(byte *caCert, word32 caCertSz,
+ byte *serverCert, word32 serverCertSz,
+ byte *serverKey, word32 serverKeySz,
+ int negative_test)
+{
+ EXPECT_DECLS;
+ WOLFSSL_CTX *ctx_c = NULL;
+ WOLFSSL_CTX *ctx_s = NULL;
+ WOLFSSL *ssl_c = NULL;
+ WOLFSSL *ssl_s = NULL;
+ struct test_memio_ctx test_ctx;
+
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+ ExpectIntEQ(test_memio_setup_ex(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ wolfTLSv1_3_client_method, wolfTLSv1_3_server_method,
+ caCert, caCertSz, serverCert, serverCertSz,
+ serverKey, serverKeySz), 0);
+ if (negative_test) {
+ ExpectTrue(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL) != 0);
+ }
+ else {
+ ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
+ }
+ wolfSSL_free(ssl_c);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_CTX_free(ctx_s);
+ return EXPECT_RESULT();
+}
+
+static int extCount = 0;
+static int myUnknownExtCallback(const word16* oid, word32 oidSz, int crit,
+ const unsigned char* der, word32 derSz)
+{
+ (void) oid;
+ (void) oidSz;
+ (void) crit;
+ (void) der;
+ (void) derSz;
+ extCount ++;
+ /* Accept all extensions. This is only a test. Normally we would be much more
+ * careful about critical extensions. */
+ return 1;
+}
+
+static int test_dual_alg_support(void)
+{
+ EXPECT_DECLS;
+ /* Root CA and server keys will be the same. This is only appropriate for
+ * testing. */
+ char keyFile[] = "./certs/ca-key.der";
+ char sapkiFile[] = "./certs/ecc-keyPub.der";
+ char altPrivFile[] = "./certs/ecc-key.der";
+ char wrongPrivFile[] = "./certs/ecc-client-key.der";
+ byte *serverKey = NULL;
+ size_t serverKeySz = 0;
+ byte *root = NULL;
+ int rootSz = 0;
+ byte *server = NULL;
+ int serverSz = 0;
+ WOLFSSL_CERT_MANAGER* cm = NULL;
+
+ ExpectIntEQ(load_file(keyFile, &serverKey, &serverKeySz), 0);
+
+ /* Base normal case. */
+ rootSz = do_dual_alg_root_certgen(&root, keyFile, sapkiFile, altPrivFile);
+ ExpectNotNull(root);
+ ExpectIntGT(rootSz, 0);
+ serverSz = do_dual_alg_server_certgen(&server, keyFile, sapkiFile,
+ altPrivFile, keyFile, root, rootSz);
+ ExpectNotNull(server);
+ ExpectIntGT(serverSz, 0);
+ ExpectIntEQ(do_dual_alg_tls13_connection(root, rootSz,
+ server, serverSz, serverKey, (word32)serverKeySz, 0),
+ TEST_SUCCESS);
+ XFREE(root, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(server, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+
+ /* Now we try a negative case. Note that we use wrongPrivFile to generate
+ * the alternative signature and then set negative_test to true for the
+ * call to do_dual_alg_tls13_connection(). Its expecting a failed connection
+ * because the signature won't verify. */
+ rootSz = do_dual_alg_root_certgen(&root, keyFile, sapkiFile, wrongPrivFile);
+ ExpectNotNull(root);
+ ExpectIntGT(rootSz, 0);
+ serverSz = do_dual_alg_server_certgen(&server, keyFile, sapkiFile,
+ wrongPrivFile, keyFile, root, rootSz);
+ ExpectNotNull(server);
+ ExpectIntGT(serverSz, 0);
+ ExpectIntEQ(do_dual_alg_tls13_connection(root, rootSz,
+ server, serverSz, serverKey, (word32)serverKeySz, 1),
+ TEST_SUCCESS);
+
+ /* Lets see if CertManager can find the new extensions */
+ extCount = 0;
+ ExpectNotNull(cm = wolfSSL_CertManagerNew());
+ wolfSSL_CertManagerSetUnknownExtCallback(cm, myUnknownExtCallback);
+ ExpectIntEQ(wolfSSL_CertManagerLoadCABuffer(cm, root, rootSz,
+ SSL_FILETYPE_ASN1), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_CertManagerVerifyBuffer(cm, server, serverSz,
+ SSL_FILETYPE_ASN1), WOLFSSL_SUCCESS);
+ /* There is only 1 unknown exension (1.2.3.4.5). The other ones are known
+ * because they are for the dual alg extensions. */
+ ExpectIntEQ(extCount, 1);
+ wolfSSL_CertManagerFree(cm);
+
+ XFREE(root, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(server, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+
+ free(serverKey);
+
+ return EXPECT_RESULT();
+}
+#else
+static int test_dual_alg_support(void)
+{
+ return TEST_SKIPPED;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS && !NO_FILESYSTEM */
/*----------------------------------------------------------------------------*
| Context
@@ -2086,7 +2421,7 @@ static int test_wolfSSL_CertManagerGetCerts(void)
#endif
int i = 0;
int ret = 0;
- const byte* der;
+ const byte* der = NULL;
int derSz = 0;
ExpectNotNull(file1 = fopen("./certs/ca-cert.pem", "rb"));
@@ -3044,6 +3379,10 @@ static int test_wolfSSL_CertManagerCRL(void)
const char* ca_cert = "./certs/ca-cert.pem";
const char* crl1 = "./certs/crl/crl.pem";
const char* crl2 = "./certs/crl/crl2.pem";
+#ifdef WC_RSA_PSS
+ const char* crl_rsapss = "./certs/crl/crl_rsapss.pem";
+ const char* ca_rsapss = "./certs/rsapss/ca-rsapss.pem";
+#endif
const unsigned char crl_buff[] = {
0x30, 0x82, 0x02, 0x04, 0x30, 0x81, 0xed, 0x02,
0x01, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
@@ -3199,6 +3538,18 @@ static int test_wolfSSL_CertManagerCRL(void)
ExpectIntEQ(wolfSSL_CertManagerLoadCRLBuffer(cm, crl_buff, sizeof(crl_buff),
WOLFSSL_FILETYPE_ASN1), 1);
+#if !defined(NO_FILESYSTEM) && defined(WC_RSA_PSS)
+ /* loading should fail without the CA set */
+ ExpectIntEQ(wolfSSL_CertManagerLoadCRLFile(cm, crl_rsapss,
+ WOLFSSL_FILETYPE_PEM), ASN_CRL_NO_SIGNER_E);
+
+ /* now successfully load the RSA-PSS crl once loading in it's CA */
+ ExpectIntEQ(WOLFSSL_SUCCESS,
+ wolfSSL_CertManagerLoadCA(cm, ca_rsapss, NULL));
+ ExpectIntEQ(wolfSSL_CertManagerLoadCRLFile(cm, crl_rsapss,
+ WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
+#endif
+
wolfSSL_CertManagerFree(cm);
#endif
@@ -4705,7 +5056,7 @@ static int test_wolfSSL_EVP_PKEY_print_public(void)
WOLFSSL_EVP_PKEY* pkey = NULL;
char line[256] = { 0 };
char line1[256] = { 0 };
- int i;
+ int i = 0;
/* test error cases */
ExpectIntEQ( EVP_PKEY_print_public(NULL,NULL,0,NULL),0L);
@@ -5799,8 +6150,10 @@ static WC_INLINE int test_ssl_memio_setup(test_ssl_memio_ctx *ctx)
int c_sharedCtx = 0;
int s_sharedCtx = 0;
#endif
- const char* certFile = svrCertFile;
- const char* keyFile = svrKeyFile;
+ const char* clientCertFile = cliCertFile;
+ const char* clientKeyFile = cliKeyFile;
+ const char* serverCertFile = svrCertFile;
+ const char* serverKeyFile = svrKeyFile;
/********************************
* Create WOLFSSL_CTX for client.
@@ -5832,13 +6185,19 @@ static WC_INLINE int test_ssl_memio_setup(test_ssl_memio_ctx *ctx)
else
ExpectIntEQ(wolfSSL_CTX_load_verify_locations(ctx->c_ctx,
caCertFile, 0), WOLFSSL_SUCCESS);
+ if (ctx->c_cb.certPemFile != NULL) {
+ clientCertFile = ctx->c_cb.certPemFile;
+ }
+ if (ctx->c_cb.keyPemFile != NULL) {
+ clientKeyFile = ctx->c_cb.keyPemFile;
+ }
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_EITHER_SIDE)
if (!c_sharedCtx)
#endif
{
ExpectIntEQ(wolfSSL_CTX_use_certificate_chain_file(ctx->c_ctx,
- cliCertFile), WOLFSSL_SUCCESS);
- ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_file(ctx->c_ctx, cliKeyFile,
+ clientCertFile), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_file(ctx->c_ctx, clientKeyFile,
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
}
#ifdef HAVE_CRL
@@ -5905,23 +6264,23 @@ static WC_INLINE int test_ssl_memio_setup(test_ssl_memio_ctx *ctx)
wolfSSL_CTX_set_default_passwd_cb(ctx->s_ctx, PasswordCallBack);
#endif
if (ctx->s_cb.certPemFile != NULL) {
- certFile = ctx->s_cb.certPemFile;
+ serverCertFile = ctx->s_cb.certPemFile;
}
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_EITHER_SIDE)
if (!s_sharedCtx)
#endif
{
ExpectIntEQ(wolfSSL_CTX_use_certificate_chain_file(ctx->s_ctx,
- certFile), WOLFSSL_SUCCESS);
+ serverCertFile), WOLFSSL_SUCCESS);
}
if (ctx->s_cb.keyPemFile != NULL) {
- keyFile = ctx->s_cb.keyPemFile;
+ serverKeyFile = ctx->s_cb.keyPemFile;
}
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_EITHER_SIDE)
if (!s_sharedCtx)
#endif
{
- ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_file(ctx->s_ctx, keyFile,
+ ExpectIntEQ(wolfSSL_CTX_use_PrivateKey_file(ctx->s_ctx, serverKeyFile,
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
}
if (ctx->s_ciphers != NULL) {
@@ -5945,9 +6304,9 @@ static WC_INLINE int test_ssl_memio_setup(test_ssl_memio_ctx *ctx)
#endif
)
{
- ExpectIntEQ(wolfSSL_use_certificate_chain_file(ctx->c_ssl, cliCertFile),
- WOLFSSL_SUCCESS);
- ExpectIntEQ(wolfSSL_use_PrivateKey_file(ctx->c_ssl, cliKeyFile,
+ ExpectIntEQ(wolfSSL_use_certificate_chain_file(ctx->c_ssl,
+ clientCertFile), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_use_PrivateKey_file(ctx->c_ssl, clientKeyFile,
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
}
if (ctx->c_cb.ssl_ready != NULL) {
@@ -5966,9 +6325,9 @@ static WC_INLINE int test_ssl_memio_setup(test_ssl_memio_ctx *ctx)
#endif
)
{
- ExpectIntEQ(wolfSSL_use_certificate_chain_file(ctx->s_ssl, certFile),
- WOLFSSL_SUCCESS);
- ExpectIntEQ(wolfSSL_use_PrivateKey_file(ctx->s_ssl, keyFile,
+ ExpectIntEQ(wolfSSL_use_certificate_chain_file(ctx->s_ssl,
+ serverCertFile), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_use_PrivateKey_file(ctx->s_ssl, serverKeyFile,
WOLFSSL_FILETYPE_PEM), WOLFSSL_SUCCESS);
}
#if !defined(NO_FILESYSTEM) && !defined(NO_DH)
@@ -6010,6 +6369,9 @@ static int test_ssl_memio_do_handshake(test_ssl_memio_ctx* ctx, int max_rounds,
err = wolfSSL_get_error(ctx->c_ssl, ret);
if (err != WOLFSSL_ERROR_WANT_READ &&
err != WOLFSSL_ERROR_WANT_WRITE) {
+ char buff[WOLFSSL_MAX_ERROR_SZ];
+ fprintf(stderr, "error = %d, %s\n", err,
+ wolfSSL_ERR_error_string(err, buff));
failing_c = 1;
hs_c = 1;
if (failing_c && failing_s) {
@@ -6029,6 +6391,9 @@ static int test_ssl_memio_do_handshake(test_ssl_memio_ctx* ctx, int max_rounds,
err = wolfSSL_get_error(ctx->s_ssl, ret);
if (err != WOLFSSL_ERROR_WANT_READ &&
err != WOLFSSL_ERROR_WANT_WRITE) {
+ char buff[WOLFSSL_MAX_ERROR_SZ];
+ fprintf(stderr, "error = %d, %s\n", err,
+ wolfSSL_ERR_error_string(err, buff));
failing_s = 1;
hs_s = 1;
if (failing_c && failing_s) {
@@ -6044,7 +6409,7 @@ static int test_ssl_memio_do_handshake(test_ssl_memio_ctx* ctx, int max_rounds,
}
}
- if (!handshake_complete) {
+ if (!handshake_complete || failing_c || failing_s) {
return TEST_FAIL;
}
@@ -6112,14 +6477,20 @@ static void test_ssl_memio_cleanup(test_ssl_memio_ctx* ctx)
wolfSSL_shutdown(ctx->c_ssl);
wolfSSL_free(ctx->s_ssl);
wolfSSL_free(ctx->c_ssl);
- if (!ctx->s_cb.isSharedCtx) {
- wolfSSL_CTX_free(ctx->s_ctx);
- ctx->s_ctx = NULL;
+ if (ctx->c_cb.on_ctx_cleanup != NULL) {
+ ctx->c_cb.on_ctx_cleanup(ctx->c_ctx);
}
if (!ctx->c_cb.isSharedCtx) {
wolfSSL_CTX_free(ctx->c_ctx);
ctx->c_ctx = NULL;
}
+ if (ctx->s_cb.on_ctx_cleanup != NULL) {
+ ctx->s_cb.on_ctx_cleanup(ctx->s_ctx);
+ }
+ if (!ctx->s_cb.isSharedCtx) {
+ wolfSSL_CTX_free(ctx->s_ctx);
+ ctx->s_ctx = NULL;
+ }
if (!ctx->s_cb.ticNoInit) {
#if defined(HAVE_SESSION_TICKET) && \
@@ -11205,14 +11576,14 @@ static int test_wolfSSL_X509_NAME_get_entry(void)
(defined(OPENSSL_EXTRA) && \
(defined(KEEP_PEER_CERT) || defined(SESSION_CERTS)))
/* use openssl like name to test mapping */
- X509_NAME_ENTRY* ne;
- X509_NAME* name;
+ X509_NAME_ENTRY* ne = NULL;
+ X509_NAME* name = NULL;
X509* x509 = NULL;
#ifndef NO_FILESYSTEM
- ASN1_STRING* asn;
+ ASN1_STRING* asn = NULL;
char* subCN = NULL;
#endif
- int idx;
+ int idx = 0;
ASN1_OBJECT *object = NULL;
#if defined(WOLFSSL_APACHE_HTTPD) || defined(OPENSSL_ALL) || \
defined(WOLFSSL_NGINX)
@@ -11269,6 +11640,7 @@ static int test_wolfSSL_PKCS12(void)
* Password Key
*/
#if defined(OPENSSL_EXTRA) && !defined(NO_DES3) && !defined(NO_FILESYSTEM) && \
+ !defined(NO_STDIO_FILESYSTEM) && \
!defined(NO_ASN) && !defined(NO_PWDBASED) && !defined(NO_RSA) && \
!defined(NO_SHA) && defined(HAVE_PKCS12) && !defined(NO_BIO)
byte buf[6000];
@@ -11285,7 +11657,7 @@ static int test_wolfSSL_PKCS12(void)
WOLFSSL_X509 *x509 = NULL;
#endif
XFILE f = XBADFILE;
- int bytes, ret, goodPswLen, badPswLen;
+ int bytes = 0, ret = 0, goodPswLen = 0, badPswLen = 0;
WOLFSSL_BIO *bio = NULL;
WOLFSSL_EVP_PKEY *pkey = NULL;
WC_PKCS12 *pkcs12 = NULL;
@@ -18145,9 +18517,15 @@ static int test_wc_AesGcmEncryptDecrypt(void)
ExpectIntEQ(wc_AesGcmDecrypt(&aes, dec, enc, sizeof(enc)/sizeof(byte), iv,
sizeof(iv)/sizeof(byte), NULL, sizeof(resultT), a, sizeof(a)),
BAD_FUNC_ARG);
+ #if (defined(HAVE_FIPS) && FIPS_VERSION_LE(2,0) && defined(WOLFSSL_ARMASM))
+ ExpectIntEQ(wc_AesGcmDecrypt(&aes, dec, enc, sizeof(enc)/sizeof(byte), iv,
+ sizeof(iv)/sizeof(byte), resultT, sizeof(resultT) + 1, a, sizeof(a)),
+ AES_GCM_AUTH_E);
+ #else
ExpectIntEQ(wc_AesGcmDecrypt(&aes, dec, enc, sizeof(enc)/sizeof(byte), iv,
sizeof(iv)/sizeof(byte), resultT, sizeof(resultT) + 1, a, sizeof(a)),
BAD_FUNC_ARG);
+ #endif
#if ((defined(HAVE_FIPS) && defined(HAVE_FIPS_VERSION) && \
(HAVE_FIPS_VERSION == 2)) || defined(HAVE_SELFTEST)) && \
!defined(WOLFSSL_AES_GCM_FIXED_IV_AAD)
@@ -18685,11 +19063,7 @@ static int test_wc_InitRsaKey(void)
ExpectIntEQ(wc_InitRsaKey(&key, HEAP_HINT), 0);
/* Test bad args. */
-#ifndef HAVE_USER_RSA
ExpectIntEQ(wc_InitRsaKey(NULL, HEAP_HINT), BAD_FUNC_ARG);
-#else
- ExpectIntEQ(wc_InitRsaKey(NULL, HEAP_HINT), USER_CRYPTO_ERROR);
-#endif
DoExpectIntEQ(wc_FreeRsaKey(&key), 0);
#endif
@@ -18726,7 +19100,7 @@ static int test_wc_RsaPrivateKeyDecode(void)
}
ExpectIntEQ(wc_RsaPrivateKeyDecode(tmp, &idx, &key, (word32)bytes), 0);
-#ifndef HAVE_USER_RSA
+
/* Test bad args. */
ExpectIntEQ(wc_RsaPrivateKeyDecode(NULL, &idx, &key, (word32)bytes),
BAD_FUNC_ARG);
@@ -18734,15 +19108,6 @@ static int test_wc_RsaPrivateKeyDecode(void)
BAD_FUNC_ARG);
ExpectIntEQ(wc_RsaPrivateKeyDecode(tmp, &idx, NULL, (word32)bytes),
BAD_FUNC_ARG);
-#else
- /* Test bad args. User RSA. */
- ExpectIntEQ(wc_RsaPrivateKeyDecode(NULL, &idx, &key, (word32)bytes),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaPrivateKeyDecode(tmp, NULL, &key, (word32)bytes),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaPrivateKeyDecode(tmp, &idx, NULL, (word32)bytes),
- USER_CRYPTO_ERROR);
-#endif
XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
DoExpectIntEQ(wc_FreeRsaKey(&key), 0);
@@ -18789,7 +19154,7 @@ static int test_wc_RsaPublicKeyDecode(void)
}
ExpectIntEQ(wc_RsaPublicKeyDecode(tmp, &idx, &keyPub, (word32)bytes), 0);
-#ifndef HAVE_USER_RSA
+
/* Pass in bad args. */
ExpectIntEQ(wc_RsaPublicKeyDecode(NULL, &idx, &keyPub, (word32)bytes),
BAD_FUNC_ARG);
@@ -18797,15 +19162,6 @@ static int test_wc_RsaPublicKeyDecode(void)
BAD_FUNC_ARG);
ExpectIntEQ(wc_RsaPublicKeyDecode(tmp, &idx, NULL, (word32)bytes),
BAD_FUNC_ARG);
-#else
- /* Pass in bad args. */
- ExpectIntEQ(wc_RsaPublicKeyDecode(NULL, &idx, &keyPub, (word32)bytes),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaPublicKeyDecode(tmp, NULL, &keyPub, (word32)bytes),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaPublicKeyDecode(tmp, &idx, NULL, (word32)bytes),
- USER_CRYPTO_ERROR);
-#endif
DoExpectIntEQ(wc_FreeRsaKey(&keyPub), 0);
@@ -18854,7 +19210,7 @@ static int test_wc_RsaPublicKeyDecodeRaw(void)
ExpectIntEQ(wc_InitRsaKey(&key, HEAP_HINT), 0);
ExpectIntEQ(wc_RsaPublicKeyDecodeRaw(&n, nSz, &e, eSz, &key), 0);
-#ifndef HAVE_USER_RSA
+
/* Pass in bad args. */
ExpectIntEQ(wc_RsaPublicKeyDecodeRaw(NULL, nSz, &e, eSz, &key),
BAD_FUNC_ARG);
@@ -18862,15 +19218,7 @@ static int test_wc_RsaPublicKeyDecodeRaw(void)
BAD_FUNC_ARG);
ExpectIntEQ(wc_RsaPublicKeyDecodeRaw(&n, nSz, &e, eSz, NULL),
BAD_FUNC_ARG);
-#else
- /* Pass in bad args. User RSA. */
- ExpectIntEQ(wc_RsaPublicKeyDecodeRaw(NULL, nSz, &e, eSz, &key),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaPublicKeyDecodeRaw(&n, nSz, NULL, eSz, &key),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaPublicKeyDecodeRaw(&n, nSz, &e, eSz, NULL),
- USER_CRYPTO_ERROR);
-#endif
+
DoExpectIntEQ(wc_FreeRsaKey(&key), 0);
#endif
@@ -18879,7 +19227,7 @@ static int test_wc_RsaPublicKeyDecodeRaw(void)
} /* END test_wc_RsaPublicKeyDecodeRaw */
-#if (!defined(NO_RSA) || !defined(HAVE_FAST_RSA)) && defined(WOLFSSL_KEY_GEN)
+#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
/* In FIPS builds, wc_MakeRsaKey() will return an error if it cannot find
* a probable prime in 5*(modLen/2) attempts. In non-FIPS builds, it keeps
* trying until it gets a probable prime. */
@@ -18929,7 +19277,6 @@ static int test_wc_MakeRsaKey(void)
ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, WC_RSA_EXPONENT, &rng), 0);
DoExpectIntEQ(wc_FreeRsaKey(&genKey), 0);
-#ifndef HAVE_USER_RSA
/* Test bad args. */
ExpectIntEQ(MAKE_RSA_KEY(NULL, bits, WC_RSA_EXPONENT, &rng), BAD_FUNC_ARG);
ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, WC_RSA_EXPONENT, NULL),
@@ -18938,17 +19285,6 @@ static int test_wc_MakeRsaKey(void)
ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, 2, &rng), BAD_FUNC_ARG);
/* e & 1 == 0 */
ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, 6, &rng), BAD_FUNC_ARG);
-#else
- /* Test bad args. */
- ExpectIntEQ(MAKE_RSA_KEY(NULL, bits, WC_RSA_EXPONENT, &rng),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, WC_RSA_EXPONENT, NULL),
- USER_CRYPTO_ERROR);
- /* e < 3 */
- ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, 2, &rng), USER_CRYPTO_ERROR);
- /* e & 1 == 0 */
- ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, 6, &rng), USER_CRYPTO_ERROR);
-#endif /* HAVE_USER_RSA */
DoExpectIntEQ(wc_FreeRng(&rng), 0);
#endif
@@ -19351,7 +19687,7 @@ static int test_wc_RsaKeyToDer(void)
ExpectIntEQ(MAKE_RSA_KEY(&genKey, bits, WC_RSA_EXPONENT, &rng), 0);
ExpectIntGT(wc_RsaKeyToDer(&genKey, der, derSz), 0);
-#ifndef HAVE_USER_RSA
+
/* Pass good/bad args. */
ExpectIntEQ(wc_RsaKeyToDer(NULL, der, FOURK_BUF), BAD_FUNC_ARG);
/* Get just the output length */
@@ -19363,19 +19699,6 @@ static int test_wc_RsaKeyToDer(void)
/* Put back to Private Key */
genKey.type = 1;
#endif
-#else
- /* Pass good/bad args. */
- ExpectIntEQ(wc_RsaKeyToDer(NULL, der, FOURK_BUF), USER_CRYPTO_ERROR);
- /* Get just the output length */
- ExpectIntGT(wc_RsaKeyToDer(&genKey, NULL, 0), 0);
- /* Try Public Key. */
- genKey.type = 0;
- ExpectIntEQ(wc_RsaKeyToDer(&genKey, der, FOURK_BUF), USER_CRYPTO_ERROR);
- #ifdef WOLFSSL_CHECK_MEM_ZERO
- /* Put back to Private Key */
- genKey.type = 1;
- #endif
-#endif
XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER);
DoExpectIntEQ(wc_FreeRsaKey(&genKey), 0);
@@ -19402,9 +19725,7 @@ static int test_wc_RsaKeyToPublicDer(void)
int bits = 2048;
word32 derLen = 294;
#endif
-#ifndef HAVE_USER_RSA
int ret;
-#endif
XMEMSET(&rng, 0, sizeof(rng));
XMEMSET(&key, 0, sizeof(key));
@@ -19422,16 +19743,10 @@ static int test_wc_RsaKeyToPublicDer(void)
ExpectIntGT(wc_RsaKeyToPublicDer_ex(&key, NULL, derLen, 0), 0);
ExpectIntGT(wc_RsaKeyToPublicDer_ex(&key, der, derLen, 0), 0);
-#ifndef HAVE_USER_RSA
/* Pass in bad args. */
ExpectIntEQ(wc_RsaKeyToPublicDer(NULL, der, derLen), BAD_FUNC_ARG);
ExpectIntLT(ret = wc_RsaKeyToPublicDer(&key, der, -1), 0);
ExpectTrue((ret == BUFFER_E) || (ret == BAD_FUNC_ARG));
-#else
- /* Pass in bad args. */
- ExpectIntEQ(wc_RsaKeyToPublicDer(NULL, der, derLen), USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaKeyToPublicDer(&key, der, -1), USER_CRYPTO_ERROR);
-#endif
XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER);
DoExpectIntEQ(wc_FreeRsaKey(&key), 0);
@@ -19460,6 +19775,10 @@ static int test_wc_RsaPublicEncryptDecrypt(void)
WC_DECLARE_VAR(plain, byte, TEST_STRING_SZ, NULL);
WC_DECLARE_VAR(cipher, byte, TEST_RSA_BYTES, NULL);
+ WC_ALLOC_VAR(in, byte, TEST_STRING_SZ, NULL);
+ WC_ALLOC_VAR(plain, byte, TEST_STRING_SZ, NULL);
+ WC_ALLOC_VAR(cipher, byte, TEST_RSA_BYTES, NULL);
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
ExpectNotNull(in);
ExpectNotNull(plain);
@@ -19507,8 +19826,7 @@ static int test_wc_RsaPublicEncryptDecrypt_ex(void)
{
EXPECT_DECLS;
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && !defined(HAVE_FIPS)\
- && !defined(WC_NO_RSA_OAEP) && !defined(HAVE_USER_RSA)\
- && !defined(NO_SHA256)
+ && !defined(WC_NO_RSA_OAEP) && !defined(NO_SHA256)
RsaKey key;
WC_RNG rng;
const char inStr[] = TEST_STRING;
@@ -19523,6 +19841,10 @@ static int test_wc_RsaPublicEncryptDecrypt_ex(void)
WC_DECLARE_VAR(plain, byte, TEST_STRING_SZ, NULL);
WC_DECLARE_VAR(cipher, byte, TEST_RSA_BYTES, NULL);
+ WC_ALLOC_VAR(in, byte, TEST_STRING_SZ, NULL);
+ WC_ALLOC_VAR(plain, byte, TEST_STRING_SZ, NULL);
+ WC_ALLOC_VAR(cipher, byte, TEST_RSA_BYTES, NULL);
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
ExpectNotNull(in);
ExpectNotNull(plain);
@@ -19588,6 +19910,10 @@ static int test_wc_RsaSSL_SignVerify(void)
WC_DECLARE_VAR(out, byte, TEST_RSA_BYTES, NULL);
WC_DECLARE_VAR(plain, byte, TEST_STRING_SZ, NULL);
+ WC_ALLOC_VAR(in, byte, TEST_STRING_SZ, NULL);
+ WC_ALLOC_VAR(out, byte, TEST_RSA_BYTES, NULL);
+ WC_ALLOC_VAR(plain, byte, TEST_STRING_SZ, NULL);
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
ExpectNotNull(in);
ExpectNotNull(out);
@@ -19605,7 +19931,7 @@ static int test_wc_RsaSSL_SignVerify(void)
/* Sign. */
ExpectIntEQ(wc_RsaSSL_Sign(in, inLen, out, outSz, &key, &rng), (int)outSz);
idx = (int)outSz;
-#ifndef HAVE_USER_RSA
+
/* Test bad args. */
ExpectIntEQ(wc_RsaSSL_Sign(NULL, inLen, out, outSz, &key, &rng),
BAD_FUNC_ARG);
@@ -19615,21 +19941,10 @@ static int test_wc_RsaSSL_SignVerify(void)
BAD_FUNC_ARG);
ExpectIntEQ(wc_RsaSSL_Sign(in, inLen, out, outSz, NULL, &rng),
BAD_FUNC_ARG);
-#else
- /* Test bad args. */
- ExpectIntEQ(wc_RsaSSL_Sign(NULL, inLen, out, outSz, &key, &rng),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaSSL_Sign(in, 0, out, outSz, &key, &rng),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaSSL_Sign(in, inLen, NULL, outSz, &key, &rng),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaSSL_Sign(in, inLen, out, outSz, NULL, &rng),
- USER_CRYPTO_ERROR);
-#endif
/* Verify. */
ExpectIntEQ(wc_RsaSSL_Verify(out, idx, plain, plainSz, &key), (int)inLen);
-#ifndef HAVE_USER_RSA
+
/* Pass bad args. */
ExpectIntEQ(wc_RsaSSL_Verify(NULL, idx, plain, plainSz, &key),
BAD_FUNC_ARG);
@@ -19639,17 +19954,6 @@ static int test_wc_RsaSSL_SignVerify(void)
BAD_FUNC_ARG);
ExpectIntEQ(wc_RsaSSL_Verify(out, idx, plain, plainSz, NULL),
BAD_FUNC_ARG);
-#else
- /* Pass bad args. */
- ExpectIntEQ(wc_RsaSSL_Verify(NULL, idx, plain, plainSz, &key),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaSSL_Verify(out, 0, plain, plainSz, &key),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaSSL_Verify(out, idx, NULL, plainSz, &key),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaSSL_Verify(out, idx, plain, plainSz, NULL),
- USER_CRYPTO_ERROR);
-#endif
WC_FREE_VAR(in, NULL);
WC_FREE_VAR(out, NULL);
@@ -19689,11 +19993,7 @@ static int test_wc_RsaEncryptSize(void)
ExpectIntEQ(wc_RsaEncryptSize(&key), 256);
/* Pass in bad arg. */
-#ifndef HAVE_USER_RSA
ExpectIntEQ(wc_RsaEncryptSize(NULL), BAD_FUNC_ARG);
-#else
- ExpectIntEQ(wc_RsaEncryptSize(NULL), 0);
-#endif
DoExpectIntEQ(wc_FreeRsaKey(&key), 0);
DoExpectIntEQ(wc_FreeRng(&rng), 0);
@@ -19730,7 +20030,7 @@ static int test_wc_RsaFlattenPublicKey(void)
ExpectIntEQ(MAKE_RSA_KEY(&key, bits, WC_RSA_EXPONENT, &rng), 0);
ExpectIntEQ(wc_RsaFlattenPublicKey(&key, e, &eSz, n, &nSz), 0);
-#ifndef HAVE_USER_RSA
+
/* Pass bad args. */
ExpectIntEQ(wc_RsaFlattenPublicKey(NULL, e, &eSz, n, &nSz),
BAD_FUNC_ARG);
@@ -19742,19 +20042,6 @@ static int test_wc_RsaFlattenPublicKey(void)
BAD_FUNC_ARG);
ExpectIntEQ(wc_RsaFlattenPublicKey(&key, e, &eSz, n, NULL),
BAD_FUNC_ARG);
-#else
- /* Pass bad args. */
- ExpectIntEQ(wc_RsaFlattenPublicKey(NULL, e, &eSz, n, &nSz),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaFlattenPublicKey(&key, NULL, &eSz, n, &nSz),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaFlattenPublicKey(&key, e, NULL, n, &nSz),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaFlattenPublicKey(&key, e, &eSz, NULL, &nSz),
- USER_CRYPTO_ERROR);
- ExpectIntEQ(wc_RsaFlattenPublicKey(&key, e, &eSz, n, NULL),
- USER_CRYPTO_ERROR);
-#endif
DoExpectIntEQ(wc_FreeRsaKey(&key), 0);
DoExpectIntEQ(wc_FreeRng(&rng), 0);
@@ -21510,9 +21797,9 @@ static int test_wc_DsaPublicPrivateKeyDecode(void)
EXPECT_DECLS;
#if !defined(NO_DSA)
DsaKey key;
- word32 bytes;
+ word32 bytes = 0;
word32 idx = 0;
- int ret;
+ int ret = 0;
#ifdef USE_CERT_BUFFERS_1024
byte tmp[ONEK_BUF];
@@ -24798,14 +25085,15 @@ static int test_wc_ecc_pointFns(void)
/*
- * Testing wc_ecc_sahred_secret_ssh()
+ * Testing wc_ecc_shared_secret_ssh()
*/
static int test_wc_ecc_shared_secret_ssh(void)
{
EXPECT_DECLS;
#if defined(HAVE_ECC) && defined(HAVE_ECC_DHE) && \
!defined(WC_NO_RNG) && !defined(WOLFSSL_ATECC508A) && \
- !defined(WOLFSSL_ATECC608A)
+ !defined(WOLFSSL_ATECC608A) && !defined(PLUTON_CRYPTO_ECC) && \
+ !defined(WOLFSSL_CRYPTOCELL)
ecc_key key;
ecc_key key2;
WC_RNG rng;
@@ -25739,7 +26027,7 @@ static int test_ToTraditional(void)
defined(OPENSSL_EXTRA_X509_SMALL)) && !defined(NO_FILESYSTEM)
XFILE f = XBADFILE;
byte input[TWOK_BUF];
- word32 sz;
+ word32 sz = 0;
ExpectTrue((f = XFOPEN("./certs/server-keyPkcs8.der", "rb")) != XBADFILE);
ExpectTrue((sz = (word32)XFREAD(input, 1, sizeof(input), f)) > 0);
@@ -26583,6 +26871,43 @@ static int rsaSignRawDigestCb(PKCS7* pkcs7, byte* digest, word32 digestSz,
}
#endif
+#if defined(HAVE_PKCS7) && defined(ASN_BER_TO_DER)
+typedef struct encodeSignedDataStream {
+ byte out[FOURK_BUF*3];
+ int idx;
+ word32 outIdx;
+} encodeSignedDataStream;
+
+
+/* content is 8k of partially created bundle */
+static int GetContentCB(PKCS7* pkcs7, byte** content, void* ctx)
+{
+ int ret = 0;
+ encodeSignedDataStream* strm = (encodeSignedDataStream*)ctx;
+
+ if (strm->outIdx < pkcs7->contentSz) {
+ ret = (pkcs7->contentSz > strm->outIdx + FOURK_BUF)?
+ FOURK_BUF : pkcs7->contentSz - strm->outIdx;
+ *content = strm->out + strm->outIdx;
+ strm->outIdx += ret;
+ }
+
+ (void)pkcs7;
+ return ret;
+}
+
+static int StreamOutputCB(PKCS7* pkcs7, const byte* output, word32 outputSz,
+ void* ctx)
+{
+ encodeSignedDataStream* strm = (encodeSignedDataStream*)ctx;
+
+ XMEMCPY(strm->out + strm->idx, output, outputSz);
+ strm->idx += outputSz;
+ (void)pkcs7;
+ return 0;
+}
+#endif
+
/*
* Testing wc_PKCS7_EncodeSignedData()
@@ -26657,7 +26982,7 @@ static int test_wc_PKCS7_EncodeSignedData(void)
int certSz;
int keySz;
- ExpectTrue((fp = XOPEN("./certs/client-ecc-cert.der", "rb")) !=
+ ExpectTrue((fp = XFOPEN("./certs/client-ecc-cert.der", "rb")) !=
XBADFILE);
ExpectIntGT(certSz = (int)XFREAD(cert, 1, ONEK_BUF, fp), 0);
if (fp != XBADFILE) {
@@ -26698,13 +27023,116 @@ static int test_wc_PKCS7_EncodeSignedData(void)
}
ExpectIntGT(wc_PKCS7_EncodeSignedData(pkcs7, output, outputSz), 0);
-
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
+#ifdef ASN_BER_TO_DER
+ wc_PKCS7_Free(pkcs7);
+
+ /* reinitialize and test setting stream mode */
+ {
+ int signedSz;
+ encodeSignedDataStream strm;
+
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
+
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, cert, certSz), 0);
+
+ if (pkcs7 != NULL) {
+ pkcs7->content = data;
+ pkcs7->contentSz = (word32)sizeof(data);
+ pkcs7->privateKey = key;
+ pkcs7->privateKeySz = (word32)sizeof(key);
+ pkcs7->encryptOID = RSAk;
+ #ifdef NO_SHA
+ pkcs7->hashOID = SHA256h;
+ #else
+ pkcs7->hashOID = SHAh;
+ #endif
+ pkcs7->rng = &rng;
+ }
+ ExpectIntEQ(wc_PKCS7_GetStreamMode(pkcs7), 0);
+ ExpectIntEQ(wc_PKCS7_SetStreamMode(pkcs7, 1, NULL, NULL, NULL), 0);
+ ExpectIntEQ(wc_PKCS7_SetStreamMode(NULL, 1, NULL, NULL, NULL),
+ BAD_FUNC_ARG);
+ ExpectIntEQ(wc_PKCS7_GetStreamMode(pkcs7), 1);
+
+ ExpectIntGT(signedSz = wc_PKCS7_EncodeSignedData(pkcs7, output,
+ outputSz), 0);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* use exact signed buffer size since BER encoded */
+ ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, signedSz), 0);
+ wc_PKCS7_Free(pkcs7);
+
+ /* now try with using callbacks for IO */
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
+
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, cert, certSz), 0);
+
+ if (pkcs7 != NULL) {
+ pkcs7->contentSz = FOURK_BUF*2;
+ pkcs7->privateKey = key;
+ pkcs7->privateKeySz = (word32)sizeof(key);
+ pkcs7->encryptOID = RSAk;
+ #ifdef NO_SHA
+ pkcs7->hashOID = SHA256h;
+ #else
+ pkcs7->hashOID = SHAh;
+ #endif
+ pkcs7->rng = &rng;
+ }
+ XMEMSET(&strm, 0, sizeof(strm));
+ ExpectIntEQ(wc_PKCS7_SetStreamMode(pkcs7, 1, GetContentCB,
+ StreamOutputCB, (void*)&strm), 0);
+
+ ExpectIntGT(signedSz = wc_PKCS7_EncodeSignedData(pkcs7, NULL, 0), 0);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* use exact signed buffer size since BER encoded */
+ ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, strm.out, signedSz), 0);
+ }
+#endif
+#ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+
+ {
+ word32 z;
+ int ret;
+
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming mode */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+ }
+#endif /* !NO_PKCS7_STREAM */
+
+
/* Pass in bad args. */
ExpectIntEQ(wc_PKCS7_EncodeSignedData(NULL, output, outputSz),
BAD_FUNC_ARG);
@@ -26743,6 +27171,7 @@ static int test_wc_PKCS7_EncodeSignedData(void)
wc_PKCS7_Free(pkcs7);
DoExpectIntEQ(wc_FreeRng(&rng), 0);
+
#endif
return EXPECT_RESULT();
} /* END test_wc_PKCS7_EncodeSignedData */
@@ -26912,6 +27341,10 @@ static int test_wc_PKCS7_EncodeSignedData_ex(void)
{
byte* output = NULL;
word32 outputSz = 0;
+ #ifndef NO_PKCS7_STREAM
+ word32 z;
+ int ret;
+ #endif /* !NO_PKCS7_STREAM */
ExpectNotNull(output = (byte*)XMALLOC(
outputHeadSz + sizeof(data) + outputFootSz, HEAP_HINT,
@@ -26928,6 +27361,32 @@ static int test_wc_PKCS7_EncodeSignedData_ex(void)
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
+
+ #ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming mode */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ #endif /* !NO_PKCS7_STREAM */
+
XFREE(output, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
}
@@ -27376,6 +27835,10 @@ static int test_wc_PKCS7_VerifySignedData_RSA(void)
struct tm* tmpTime = &tmpTimeStorage;
#endif
#endif /* !NO_ASN && !NO_ASN_TIME */
+#ifndef NO_PKCS7_STREAM
+ word32 z;
+ int ret;
+#endif /* !NO_PKCS7_STREAM */
XMEMSET(&hash, 0, sizeof(wc_HashAlg));
@@ -27394,6 +27857,26 @@ static int test_wc_PKCS7_VerifySignedData_RSA(void)
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
+#ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+#endif /* !NO_PKCS7_STREAM */
+
/* Check that decoded signed attributes are correct */
/* messageDigest should be first */
@@ -27488,9 +27971,36 @@ static int test_wc_PKCS7_VerifySignedData_RSA(void)
}
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz),
SIG_VERIFY_E);
+
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ if (pkcs7 != NULL) {
+ pkcs7->content = badContent;
+ pkcs7->contentSz = sizeof(badContent);
+ }
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret == WC_PKCS7_WANT_READ_E){
+ continue;
+ }
+ else if (ret < 0) {
+ break;
+ }
+ }
+ ExpectIntEQ(ret, SIG_VERIFY_E);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
+
/* Test success case with detached signature and valid content */
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
@@ -27502,6 +28012,30 @@ static int test_wc_PKCS7_VerifySignedData_RSA(void)
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ if (pkcs7 != NULL) {
+ pkcs7->content = data;
+ pkcs7->contentSz = sizeof(data);
+ }
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
/* verify using pre-computed content digest only (no content) */
{
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
@@ -27525,7 +28059,105 @@ static int test_wc_PKCS7_VerifySignedData_RSA(void)
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
#endif /* !NO_RSA */
+#if defined(ASN_BER_TO_DER) && !defined(NO_PKCS7_STREAM) && \
+ !defined(NO_FILESYSTEM)
+ {
+ XFILE signedBundle = XBADFILE;
+ int signedBundleSz = 0;
+ int chunkSz = 1;
+ int i, rc = 0;
+ byte* buf = NULL;
+
+ ExpectTrue((signedBundle = XFOPEN("./certs/test-stream-sign.p7b",
+ "rb")) != XBADFILE);
+ ExpectTrue(XFSEEK(signedBundle, 0, XSEEK_END) == 0);
+ ExpectIntGT(signedBundleSz = (int)XFTELL(signedBundle), 0);
+ ExpectTrue(XFSEEK(signedBundle, 0, XSEEK_SET) == 0);
+ ExpectNotNull(buf = (byte*)XMALLOC(signedBundleSz, HEAP_HINT,
+ DYNAMIC_TYPE_FILE));
+ if (buf != NULL) {
+ ExpectIntEQ(XFREAD(buf, 1, signedBundleSz, signedBundle),
+ signedBundleSz);
+ }
+ if (signedBundle != XBADFILE) {
+ XFCLOSE(signedBundle);
+ signedBundle = XBADFILE;
+ }
+
+ if (buf != NULL) {
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ for (i = 0; i < signedBundleSz;) {
+ int sz = (i + chunkSz > signedBundleSz)? signedBundleSz - i :
+ chunkSz;
+ rc = wc_PKCS7_VerifySignedData(pkcs7, buf + i, sz);
+ if (rc < 0 ) {
+ if (rc == WC_PKCS7_WANT_READ_E) {
+ i += sz;
+ continue;
+ }
+ break;
+ }
+ else {
+ break;
+ }
+ }
+ ExpectIntEQ(rc, PKCS7_SIGNEEDS_CHECK);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ }
+
+ /* now try with malformed bundle */
+ if (buf != NULL) {
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ buf[signedBundleSz - 2] = buf[signedBundleSz - 2] + 1;
+ for (i = 0; i < signedBundleSz;) {
+ int sz = (i + chunkSz > signedBundleSz)? signedBundleSz - i :
+ chunkSz;
+ rc = wc_PKCS7_VerifySignedData(pkcs7, buf + i, sz);
+ if (rc < 0 ) {
+ if (rc == WC_PKCS7_WANT_READ_E) {
+ i += sz;
+ continue;
+ }
+ break;
+ }
+ else {
+ break;
+ }
+ }
+ ExpectIntEQ(rc, ASN_PARSE_E);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ }
+
+ if (buf != NULL)
+ XFREE(buf, HEAP_HINT, DYNAMIC_TYPE_FILE);
+ }
+#endif /* BER and stream */
#endif
return EXPECT_RESULT();
} /* END test_wc_PKCS7_VerifySignedData()_RSA */
@@ -27543,6 +28175,10 @@ static int test_wc_PKCS7_VerifySignedData_ECC(void)
byte data[] = "Test data to encode.";
byte badContent[] = "This is different content than was signed";
wc_HashAlg hash;
+#ifndef NO_PKCS7_STREAM
+ word32 z;
+ int ret;
+#endif /* !NO_PKCS7_STREAM */
#ifdef NO_SHA
enum wc_HashType hashType = WC_HASH_TYPE_SHA256;
#else
@@ -27566,6 +28202,25 @@ static int test_wc_PKCS7_VerifySignedData_ECC(void)
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
/* Invalid content should error, use detached signature so we can
* easily change content */
outputSz = sizeof(output);
@@ -27583,6 +28238,33 @@ static int test_wc_PKCS7_VerifySignedData_ECC(void)
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ if (pkcs7 != NULL) {
+ pkcs7->content = badContent;
+ pkcs7->contentSz = sizeof(badContent);
+ }
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret == WC_PKCS7_WANT_READ_E){
+ continue;
+ }
+ else if (ret < 0) {
+ break;
+ }
+ }
+ ExpectIntEQ(ret, SIG_VERIFY_E);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
+
/* Test success case with detached signature and valid content */
ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
@@ -27594,6 +28276,30 @@ static int test_wc_PKCS7_VerifySignedData_ECC(void)
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ if (pkcs7 != NULL) {
+ pkcs7->content = data;
+ pkcs7->contentSz = sizeof(data);
+ }
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
/* verify using pre-computed content digest only (no content) */
{
/* calculate hash for content */
@@ -27620,6 +28326,27 @@ static int test_wc_PKCS7_VerifySignedData_ECC(void)
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, output, outputSz), 0);
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outputSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, output + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectIntNE(pkcs7->contentSz, 0);
+ ExpectNotNull(pkcs7->contentDynamic);
+
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
+
#endif
return EXPECT_RESULT();
} /* END test_wc_PKCS7_VerifySignedData_ECC() */
@@ -27684,6 +28411,14 @@ static int myCEKwrapFunc(PKCS7* pkcs7, byte* cek, word32 cekSz, byte* keyId,
{
int ret = -1;
+ (void)cekSz;
+ (void)cek;
+ (void)outSz;
+ (void)keyIdSz;
+ (void)direction;
+ (void)orginKey; /* used with KAKRI */
+ (void)orginKeySz;
+
if (out == NULL)
return BAD_FUNC_ARG;
@@ -27715,15 +28450,6 @@ static int myCEKwrapFunc(PKCS7* pkcs7, byte* cek, word32 cekSz, byte* keyId,
WOLFSSL_MSG("Unsupported key wrap algorithm in example");
return BAD_KEYWRAP_ALG_E;
};
-
- (void)cekSz;
- (void)cek;
- (void)outSz;
- (void)keyIdSz;
- (void)direction;
- (void)orginKey; /* used with KAKRI */
- (void)orginKeySz;
- return ret;
}
#endif /* HAVE_PKCS7 && !NO_AES && HAVE_AES_CBC && !NO_AES_256 */
@@ -27736,6 +28462,9 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
EXPECT_DECLS;
#if defined(HAVE_PKCS7)
PKCS7* pkcs7 = NULL;
+#ifdef ASN_BER_TO_DER
+ int encodedSz = 0;
+#endif
#ifdef ECC_TIMING_RESISTANT
WC_RNG rng;
#endif
@@ -27936,6 +28665,87 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
testSz = (int)sizeof(testVectors)/(int)sizeof(pkcs7EnvelopedVector);
for (i = 0; i < testSz; i++) {
+ #ifdef ASN_BER_TO_DER
+ encodeSignedDataStream strm;
+
+ /* test setting stream mode, the first one using IO callbacks */
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, (testVectors + i)->cert,
+ (word32)(testVectors + i)->certSz), 0);
+ if (pkcs7 != NULL) {
+ #ifdef ECC_TIMING_RESISTANT
+ pkcs7->rng = &rng;
+ #endif
+
+ if (i != 0)
+ pkcs7->content = (byte*)(testVectors + i)->content;
+ pkcs7->contentSz = (testVectors + i)->contentSz;
+ pkcs7->contentOID = (testVectors + i)->contentOID;
+ pkcs7->encryptOID = (testVectors + i)->encryptOID;
+ pkcs7->keyWrapOID = (testVectors + i)->keyWrapOID;
+ pkcs7->keyAgreeOID = (testVectors + i)->keyAgreeOID;
+ pkcs7->privateKey = (testVectors + i)->privateKey;
+ pkcs7->privateKeySz = (testVectors + i)->privateKeySz;
+ }
+
+ if (i == 0) {
+ XMEMSET(&strm, 0, sizeof(strm));
+ ExpectIntEQ(wc_PKCS7_SetStreamMode(pkcs7, 1, GetContentCB,
+ StreamOutputCB, (void*)&strm), 0);
+ encodedSz = wc_PKCS7_EncodeEnvelopedData(pkcs7, NULL, 0);
+ }
+ else {
+ ExpectIntEQ(wc_PKCS7_SetStreamMode(pkcs7, 1, NULL, NULL, NULL), 0);
+ encodedSz = wc_PKCS7_EncodeEnvelopedData(pkcs7, output,
+ (word32)sizeof(output));
+ }
+
+ switch ((testVectors + i)->encryptOID) {
+ #ifndef NO_DES3
+ case DES3b:
+ case DESb:
+ ExpectIntEQ(encodedSz, BAD_FUNC_ARG);
+ break;
+ #endif
+ #ifdef HAVE_AESCCM
+ #ifdef WOLFSSL_AES_128
+ case AES128CCMb:
+ ExpectIntEQ(encodedSz, BAD_FUNC_ARG);
+ break;
+ #endif
+ #ifdef WOLFSSL_AES_192
+ case AES192CCMb:
+ ExpectIntEQ(encodedSz, BAD_FUNC_ARG);
+ break;
+ #endif
+ #ifdef WOLFSSL_AES_256
+ case AES256CCMb:
+ ExpectIntEQ(encodedSz, BAD_FUNC_ARG);
+ break;
+ #endif
+ #endif
+ default:
+ ExpectIntGE(encodedSz, 0);
+ }
+
+ if (encodedSz > 0) {
+ if (i == 0) {
+ decodedSz = wc_PKCS7_DecodeEnvelopedData(pkcs7,
+ strm.out, (word32)encodedSz, decoded,
+ (word32)sizeof(decoded));
+ }
+ else {
+ decodedSz = wc_PKCS7_DecodeEnvelopedData(pkcs7, output,
+ (word32)encodedSz, decoded, (word32)sizeof(decoded));
+ }
+ ExpectIntGE(decodedSz, 0);
+ /* Verify the size of each buffer. */
+ ExpectIntEQ((word32)sizeof(input)/sizeof(char), decodedSz);
+ }
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ #endif
+
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, (testVectors + i)->cert,
(word32)(testVectors + i)->certSz), 0);
if (pkcs7 != NULL) {
@@ -27953,6 +28763,11 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
pkcs7->privateKeySz = (testVectors + i)->privateKeySz;
}
+ #ifdef ASN_BER_TO_DER
+ /* test without setting stream mode */
+ ExpectIntEQ(wc_PKCS7_GetStreamMode(pkcs7), 0);
+ #endif
+
ExpectIntGE(wc_PKCS7_EncodeEnvelopedData(pkcs7, output,
(word32)sizeof(output)), 0);
@@ -27961,6 +28776,7 @@ static int test_wc_PKCS7_EncodeDecodeEnvelopedData(void)
ExpectIntGE(decodedSz, 0);
/* Verify the size of each buffer. */
ExpectIntEQ((word32)sizeof(input)/sizeof(char), decodedSz);
+
/* Don't free the last time through the loop. */
if (i < testSz - 1) {
wc_PKCS7_Free(pkcs7);
@@ -28152,10 +28968,10 @@ static int test_wc_PKCS7_EncodeEncryptedData(void)
byte decoded[TWOK_BUF];
word32 tmpWrd32 = 0;
int tmpInt = 0;
- int decodedSz;
+ int decodedSz = 0;
int encryptedSz = 0;
- int testSz;
- int i;
+ int testSz = 0;
+ int i = 0;
const byte data[] = { /* Hello World */
0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,
0x72,0x6c,0x64
@@ -28341,7 +29157,10 @@ static int test_wc_PKCS7_Degenerate(void)
XFILE f = XBADFILE;
byte der[4096];
word32 derSz = 0;
-
+#ifndef NO_PKCS7_STREAM
+ word32 z;
+ int ret;
+#endif /* !NO_PKCS7_STREAM */
ExpectTrue((f = XFOPEN(fName, "rb")) != XBADFILE);
ExpectTrue((derSz = (word32)XFREAD(der, 1, sizeof(der), f)) > 0);
if (f != XBADFILE)
@@ -28353,9 +29172,27 @@ static int test_wc_PKCS7_Degenerate(void)
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
#ifndef NO_RSA
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, der, derSz), 0);
+
+ #ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < derSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, der + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ #endif /* !NO_PKCS7_STREAM */
#else
ExpectIntNE(wc_PKCS7_VerifySignedData(pkcs7, der, derSz), 0);
-#endif
+#endif /* NO_RSA */
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
@@ -28366,6 +29203,28 @@ static int test_wc_PKCS7_Degenerate(void)
wc_PKCS7_AllowDegenerate(pkcs7, 0); /* override allowing degenerate case */
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, der, derSz),
PKCS7_NO_SIGNER_E);
+
+ #ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ wc_PKCS7_AllowDegenerate(pkcs7, 0); /* override allowing degenerate case */
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < derSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, der + z, 1);
+ if (ret == WC_PKCS7_WANT_READ_E){
+ continue;
+ }
+ else
+ break;
+ }
+ ExpectIntEQ(ret, PKCS7_NO_SIGNER_E);
+ #endif /* !NO_PKCS7_STREAM */
+
wc_PKCS7_Free(pkcs7);
#endif
return EXPECT_RESULT();
@@ -28582,6 +29441,10 @@ static int test_wc_PKCS7_BER(void)
byte decoded[2048];
#endif
word32 derSz = 0;
+#ifndef NO_PKCS7_STREAM
+ word32 z;
+ int ret;
+#endif /* !NO_PKCS7_STREAM */
ExpectTrue((f = XFOPEN(fName, "rb")) != XBADFILE);
ExpectTrue((derSz = (word32)XFREAD(der, 1, sizeof(der), f)) > 0);
@@ -28595,6 +29458,24 @@ static int test_wc_PKCS7_BER(void)
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
#ifndef NO_RSA
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, der, derSz), 0);
+
+ #ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, INVALID_DEVID), 0);
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < derSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, der + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ #endif /* !NO_PKCS7_STREAM */
#else
ExpectIntNE(wc_PKCS7_VerifySignedData(pkcs7, der, derSz), 0);
#endif
@@ -28654,7 +29535,6 @@ static int test_wc_PKCS7_signed_enveloped(void)
#ifdef HAVE_AES_CBC
PKCS7* inner = NULL;
#endif
- void* pt = NULL;
WC_RNG rng;
unsigned char key[FOURK_BUF/2];
unsigned char cert[FOURK_BUF/2];
@@ -28668,6 +29548,10 @@ static int test_wc_PKCS7_signed_enveloped(void)
unsigned char decoded[FOURK_BUF];
int decodedSz = FOURK_BUF;
#endif
+#ifndef NO_PKCS7_STREAM
+ int z;
+ int ret;
+#endif /* !NO_PKCS7_STREAM */
XMEMSET(&rng, 0, sizeof(WC_RNG));
@@ -28741,17 +29625,13 @@ static int test_wc_PKCS7_signed_enveloped(void)
pkcs7->rng = &rng;
}
- /* Set no certs in bundle for this test. Hang on to the pointer though to
- * free it later. */
+ /* Set no certs in bundle for this test. */
if (pkcs7 != NULL) {
- pt = (void*)pkcs7->certList;
- pkcs7->certList = NULL; /* no certs in bundle */
+ ExpectIntEQ(wc_PKCS7_SetNoCerts(pkcs7, 1), 0);
+ ExpectIntEQ(wc_PKCS7_SetNoCerts(NULL, 1), BAD_FUNC_ARG);
+ ExpectIntEQ(wc_PKCS7_GetNoCerts(pkcs7), 1);
}
ExpectIntGT((sigSz = wc_PKCS7_EncodeSignedData(pkcs7, sig, sigSz)), 0);
- if (pkcs7 != NULL) {
- /* restore pointer for PKCS7 free call */
- pkcs7->certList = (Pkcs7Cert*)pt;
- }
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
@@ -28767,7 +29647,7 @@ static int test_wc_PKCS7_signed_enveloped(void)
word32 idx = 0;
byte digest[MAX_SEQ_SZ + MAX_ALGO_SZ + MAX_OCTET_STR_SZ +
WC_MAX_DIGEST_SIZE];
- int digestSz;
+ int digestSz = 0;
ExpectIntEQ(wc_InitRsaKey(&rKey, HEAP_HINT), 0);
ExpectIntEQ(wc_RsaPrivateKeyDecode(key, &idx, &rKey, keySz), 0);
@@ -28786,6 +29666,24 @@ static int test_wc_PKCS7_signed_enveloped(void)
ExpectNotNull(pkcs7 = wc_PKCS7_New(NULL, 0));
ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, cert, certSz), 0);
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, sig, sigSz), 0);
+
+#ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, cert, certSz), 0);
+
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < sigSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, sig + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+#endif /* !NO_PKCS7_STREAM */
+
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
@@ -28814,6 +29712,43 @@ static int test_wc_PKCS7_signed_enveloped(void)
ExpectIntEQ(wc_PKCS7_VerifySignedData(pkcs7, sig, sigSz), 0);
ExpectNotNull(pkcs7->content);
+#ifndef NO_PKCS7_STREAM
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+
+ /* create valid degenerate bundle */
+ sigSz = FOURK_BUF * 2;
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(NULL, 0));
+ if (pkcs7 != NULL) {
+ pkcs7->content = env;
+ pkcs7->contentSz = envSz;
+ pkcs7->contentOID = DATA;
+ pkcs7->privateKey = key;
+ pkcs7->privateKeySz = keySz;
+ pkcs7->encryptOID = RSAk;
+ pkcs7->hashOID = SHA256h;
+ pkcs7->rng = &rng;
+ }
+ ExpectIntEQ(wc_PKCS7_SetSignerIdentifierType(pkcs7, DEGENERATE_SID), 0);
+ ExpectIntGT((sigSz = wc_PKCS7_EncodeSignedData(pkcs7, sig, sigSz)), 0);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+ wc_FreeRng(&rng);
+
+ /* check verify */
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(NULL, 0));
+ ExpectIntEQ(wc_PKCS7_Init(pkcs7, HEAP_HINT, testDevId), 0);
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < sigSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, sig + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+#endif /* !NO_PKCS7_STREAM */
+
#ifdef HAVE_AES_CBC
/* check decode */
ExpectNotNull(inner = wc_PKCS7_New(NULL, 0));
@@ -28839,6 +29774,24 @@ static int test_wc_PKCS7_signed_enveloped(void)
ExpectIntNE(pkcs7->singleCertSz, 0);
wc_PKCS7_Free(pkcs7);
pkcs7 = NULL;
+
+#ifndef NO_PKCS7_STREAM
+ ExpectNotNull(pkcs7 = wc_PKCS7_New(NULL, 0));
+ ExpectIntEQ(wc_PKCS7_InitWithCert(pkcs7, NULL, 0), 0);
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < decodedSz && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(pkcs7, decoded + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectNotNull(pkcs7->singleCert);
+ ExpectIntNE(pkcs7->singleCertSz, 0);
+ wc_PKCS7_Free(pkcs7);
+ pkcs7 = NULL;
+#endif /* !NO_PKCS7_STREAM */
#endif
#endif /* HAVE_PKCS7 && !NO_RSA && !NO_AES */
return EXPECT_RESULT();
@@ -29064,7 +30017,9 @@ static int test_wc_SignatureGetSize_ecc(void)
ExpectIntGT(wc_SignatureGetSize(sig_type, &ecc, key_len), 0);
/* Test bad args */
+ /* // NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) */
sig_type = (enum wc_SignatureType) 100;
+ /* // NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) */
ExpectIntEQ(wc_SignatureGetSize(sig_type, &ecc, key_len), BAD_FUNC_ARG);
sig_type = WC_SIGNATURE_TYPE_ECC;
ExpectIntEQ(wc_SignatureGetSize(sig_type, NULL, key_len), 0);
@@ -29129,14 +30084,12 @@ static int test_wc_SignatureGetSize_rsa(void)
ExpectIntGT(wc_SignatureGetSize(sig_type, &rsa_key, key_len), 0);
/* Test bad args */
+ /* // NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) */
sig_type = (enum wc_SignatureType)100;
+ /* // NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) */
ExpectIntEQ(wc_SignatureGetSize(sig_type, &rsa_key, key_len), BAD_FUNC_ARG);
sig_type = WC_SIGNATURE_TYPE_RSA;
- #ifndef HAVE_USER_RSA
- ExpectIntEQ(wc_SignatureGetSize(sig_type, NULL, key_len), BAD_FUNC_ARG);
- #else
- ExpectIntEQ(wc_SignatureGetSize(sig_type, NULL, key_len), 0);
- #endif
+ ExpectIntEQ(wc_SignatureGetSize(sig_type, NULL, key_len), BAD_FUNC_ARG);
key_len = (word32)0;
ExpectIntEQ(wc_SignatureGetSize(sig_type, &rsa_key, key_len), BAD_FUNC_ARG);
@@ -29677,7 +30630,7 @@ static int test_wolfSSL_d2i_ASN1_INTEGER(void)
const byte* p = NULL;
byte* p2 = NULL;
byte* reEncoded = NULL;
- int reEncodedSz;
+ int reEncodedSz = 0;
static const byte zeroDer[] = {
0x02, 0x01, 0x00
@@ -29906,8 +30859,8 @@ static int test_wolfSSL_i2c_ASN1_INTEGER(void)
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_ASN)
ASN1_INTEGER *a = NULL;
- unsigned char *pp,*tpp;
- int ret;
+ unsigned char *pp = NULL,*tpp = NULL;
+ int ret = 0;
ExpectNotNull(a = wolfSSL_ASN1_INTEGER_new());
@@ -31023,8 +31976,8 @@ static int test_wolfSSL_ASN1_TIME_diff_compare(void)
ASN1_TIME* closeToTime = NULL;
ASN1_TIME* toTime = NULL;
ASN1_TIME* invalidTime = NULL;
- int daysDiff;
- int secsDiff;
+ int daysDiff = 0;
+ int secsDiff = 0;
ExpectNotNull((fromTime = ASN1_TIME_new()));
/* Feb 22, 2003, 21:15:15 */
@@ -31216,6 +32169,8 @@ static int test_wolfSSL_ASN1_TIME_to_tm(void)
struct tm tm;
time_t testTime = 1683926567; /* Fri May 12 09:22:47 PM UTC 2023 */
+ XMEMSET(&tm, 0, sizeof(struct tm));
+
XMEMSET(&asnTime, 0, sizeof(ASN1_TIME));
ExpectIntEQ(ASN1_TIME_set_string(&asnTime, "000222211515Z"), 1);
ExpectIntEQ(ASN1_TIME_to_tm(&asnTime, NULL), 1);
@@ -31386,8 +32341,8 @@ static int test_wolfSSL_ASN1_TIME_print(void)
BIO* fixed = NULL;
X509* x509 = NULL;
const unsigned char* der = client_cert_der_2048;
- ASN1_TIME* notAfter;
- ASN1_TIME* notBefore;
+ ASN1_TIME* notAfter = NULL;
+ ASN1_TIME* notBefore = NULL;
unsigned char buf[25];
ExpectNotNull(bio = BIO_new(BIO_s_mem()));
@@ -31623,7 +32578,7 @@ static int test_wolfSSL_IMPLEMENT_ASN1_FUNCTIONS(void)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
EC_KEY *eckey = NULL;
EVP_PKEY *key = NULL;
- size_t len;
+ size_t len = 0;
unsigned char *der = NULL;
DPP_BOOTSTRAPPING_KEY *bootstrap = NULL;
const unsigned char *in = ecc_clikey_der_256;
@@ -31795,15 +32750,15 @@ static int test_wolfSSL_X509_NAME(void)
(defined(WOLFSSL_CERT_REQ) || defined(WOLFSSL_CERT_EXT) || \
defined(OPENSSL_EXTRA))
X509* x509 = NULL;
- const unsigned char* c;
+ const unsigned char* c = NULL;
unsigned char buf[4096];
- int bytes;
+ int bytes = 0;
XFILE f = XBADFILE;
const X509_NAME* a = NULL;
const X509_NAME* b = NULL;
X509_NAME* d2i_name = NULL;
int sz = 0;
- unsigned char* tmp;
+ unsigned char* tmp = NULL;
char file[] = "./certs/ca-cert.der";
#ifndef OPENSSL_EXTRA_X509_SMALL
byte empty[] = { /* CN=empty emailAddress= */
@@ -31830,7 +32785,7 @@ static int test_wolfSSL_X509_NAME(void)
XFCLOSE(f);
c = buf;
- ExpectNotNull(x509 = wolfSSL_X509_d2i(NULL, c, bytes));
+ ExpectNotNull(x509 = wolfSSL_X509_d2i_ex(NULL, c, bytes, HEAP_HINT));
/* test cmp function */
ExpectNotNull(a = X509_get_issuer_name(x509));
@@ -31947,7 +32902,7 @@ static int test_wolfSSL_X509_NAME_print_ex(void)
defined(HAVE_LIGHTY) || defined(WOLFSSL_HAPROXY) || \
defined(WOLFSSL_OPENSSH) || defined(HAVE_SBLIM_SFCB)))) && \
!defined(NO_BIO) && !defined(NO_RSA)
- int memSz;
+ int memSz = 0;
byte* mem = NULL;
BIO* bio = NULL;
BIO* membio = NULL;
@@ -32110,7 +33065,7 @@ static int test_wolfSSL_X509_INFO_multiple_info(void)
* to group objects together. */
ExpectNotNull(concatBIO = BIO_new(BIO_s_mem()));
for (curFile = files; EXPECT_SUCCESS() && *curFile != NULL; curFile++) {
- int fileLen;
+ int fileLen = 0;
ExpectNotNull(fileBIO = BIO_new_file(*curFile, "rb"));
ExpectIntGT(fileLen = wolfSSL_BIO_get_len(fileBIO), 0);
if (EXPECT_SUCCESS()) {
@@ -32456,7 +33411,7 @@ static int test_wc_KeyPemToDer(void)
{
EXPECT_DECLS;
#if defined(WOLFSSL_PEM_TO_DER) && !defined(NO_FILESYSTEM) && !defined(NO_RSA)
- int ret;
+ int ret = 0;
const byte cert_buf[] = \
"-----BEGIN PRIVATE KEY-----\n"
"MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMG5KgWxP002pA\n"
@@ -32754,7 +33709,7 @@ static int test_wc_CheckCertSigPubKey(void)
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && !defined(NO_FILESYSTEM) && \
!defined(NO_RSA) && defined(WOLFSSL_PEM_TO_DER) && defined(HAVE_ECC)
- int ret;
+ int ret = 0;
const char* ca_cert = "./certs/ca-cert.pem";
byte* cert_buf = NULL;
size_t cert_sz = 0;
@@ -32827,7 +33782,7 @@ static int test_wolfSSL_certs(void)
ASN1_STRING* asn1_str = NULL;
AUTHORITY_KEYID* akey = NULL;
BASIC_CONSTRAINTS* bc = NULL;
- int crit;
+ int crit = 0;
#ifndef NO_WOLFSSL_SERVER
ExpectNotNull(ctx = SSL_CTX_new(SSLv23_server_method()));
@@ -32837,16 +33792,16 @@ static int test_wolfSSL_certs(void)
ExpectTrue(SSL_CTX_use_certificate_file(ctx, svrCertFile, SSL_FILETYPE_PEM));
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, SSL_FILETYPE_PEM));
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx, cliKeyFile, SSL_FILETYPE_PEM));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(SSL_CTX_check_private_key(ctx), SSL_FAILURE);
#endif
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, SSL_FILETYPE_PEM));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(SSL_CTX_check_private_key(ctx), SSL_SUCCESS);
#endif
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -32863,7 +33818,7 @@ static int test_wolfSSL_certs(void)
WOLFSSL_FILETYPE_PEM));
ExpectIntEQ(SSL_use_certificate(ssl, x509ext), WOLFSSL_SUCCESS);
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
/* with loading in a new cert the check on private key should now fail */
ExpectIntNE(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -33124,16 +34079,16 @@ static int test_wolfSSL_private_keys(void)
ExpectTrue(SSL_CTX_use_PrivateKey_file(ctx, svrKeyFile, WOLFSSL_FILETYPE_PEM));
/* Have to load a cert before you can check the private key against that
* certificates public key! */
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_CTX_check_private_key(ctx), WOLFSSL_FAILURE);
#endif
ExpectTrue(SSL_CTX_use_certificate_file(ctx, svrCertFile, WOLFSSL_FILETYPE_PEM));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_CTX_check_private_key(ctx), WOLFSSL_SUCCESS);
#endif
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -33146,7 +34101,7 @@ static int test_wolfSSL_private_keys(void)
ExpectIntEQ(SSL_use_RSAPrivateKey_ASN1(ssl,
(unsigned char*)client_key_der_2048,
sizeof_client_key_der_2048), WOLFSSL_SUCCESS);
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
/* Should mismatch now that a different private key loaded */
ExpectIntNE(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -33154,7 +34109,7 @@ static int test_wolfSSL_private_keys(void)
ExpectIntEQ(SSL_use_PrivateKey_ASN1(0, ssl,
(unsigned char*)server_key,
sizeof_server_key_der_2048), WOLFSSL_SUCCESS);
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
/* After loading back in DER format of original key, should match */
ExpectIntEQ(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -33164,7 +34119,7 @@ static int test_wolfSSL_private_keys(void)
(unsigned char*)client_key_der_2048,
sizeof_client_key_der_2048), WOLFSSL_SUCCESS);
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
/* Should mismatch now that a different private key loaded */
ExpectIntNE(wolfSSL_CTX_check_private_key(ctx), WOLFSSL_SUCCESS);
#endif
@@ -33172,7 +34127,7 @@ static int test_wolfSSL_private_keys(void)
ExpectIntEQ(SSL_CTX_use_PrivateKey_ASN1(0, ctx,
(unsigned char*)server_key,
sizeof_server_key_der_2048), WOLFSSL_SUCCESS);
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
/* After loading back in DER format of original key, should match */
ExpectIntEQ(wolfSSL_CTX_check_private_key(ctx), WOLFSSL_SUCCESS);
#endif
@@ -33226,7 +34181,7 @@ static int test_wolfSSL_private_keys(void)
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
SSL_free(ssl);
@@ -33259,7 +34214,7 @@ static int test_wolfSSL_private_keys(void)
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
SSL_free(ssl);
@@ -33270,7 +34225,7 @@ static int test_wolfSSL_private_keys(void)
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntNE(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -33292,7 +34247,7 @@ static int test_wolfSSL_private_keys(void)
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntEQ(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
SSL_free(ssl);
@@ -33303,7 +34258,7 @@ static int test_wolfSSL_private_keys(void)
WOLFSSL_FILETYPE_PEM));
ExpectNotNull(ssl = SSL_new(ctx));
- #if !defined(HAVE_USER_RSA) && !defined(NO_CHECK_PRIVATE_KEY)
+ #if !defined(NO_CHECK_PRIVATE_KEY)
ExpectIntNE(wolfSSL_check_private_key(ssl), WOLFSSL_SUCCESS);
#endif
@@ -33339,7 +34294,7 @@ static int test_wolfSSL_PEM_read_PrivateKey(void)
RSA* rsa = NULL;
WOLFSSL_EVP_PKEY_CTX* ctx = NULL;
unsigned char* sig = NULL;
- size_t sigLen;
+ size_t sigLen = 0;
const unsigned char tbs[] = {0, 1, 2, 3, 4, 5, 6, 7};
size_t tbsLen = sizeof(tbs);
@@ -33414,7 +34369,7 @@ static int test_wolfSSL_PEM_PrivateKey(void)
const char* fname = "./certs/server-key.pem";
const char* fname_rsa_p8 = "./certs/server-keyPkcs8.pem";
- size_t sz;
+ size_t sz = 0;
byte* buf = NULL;
EVP_PKEY* pkey2 = NULL;
EVP_PKEY* pkey3 = NULL;
@@ -33663,8 +34618,7 @@ static int test_wolfSSL_PEM_PrivateKey(void)
/* key is DES encrypted */
#if !defined(NO_DES3) && defined(WOLFSSL_ENCRYPTED_KEYS) && \
!defined(NO_RSA) && !defined(NO_BIO) && !defined(NO_FILESYSTEM) && \
- !defined(NO_MD5) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_USER_RSA) && !defined(NO_RSA)
+ !defined(NO_MD5) && defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
{
XFILE f = XBADFILE;
wc_pem_password_cb* passwd_cb = NULL;
@@ -33777,7 +34731,7 @@ static int test_wolfSSL_PEM_file_RSAKey(void)
EXPECT_DECLS;
#if (defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)) && \
defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) && \
- !defined(HAVE_USER_RSA) && !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
+ !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
RSA* rsa = NULL;
XFILE fp = XBADFILE;
@@ -33806,7 +34760,7 @@ static int test_wolfSSL_PEM_file_RSAPrivateKey(void)
{
EXPECT_DECLS;
#if !defined(NO_RSA) && defined(OPENSSL_EXTRA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_USER_RSA) && !defined(NO_FILESYSTEM) && \
+ !defined(NO_FILESYSTEM) && \
(defined(WOLFSSL_PEM_TO_DER) || defined(WOLFSSL_DER_TO_PEM))
RSA* rsa = NULL;
XFILE f = NULL;
@@ -33865,7 +34819,7 @@ static int test_wolfSSL_PEM_bio_RSAKey(void)
EXPECT_DECLS;
#if (defined(OPENSSL_EXTRA) || defined(OPENSSL_ALL)) && \
defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) && \
- !defined(HAVE_USER_RSA) && !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
+ !defined(NO_FILESYSTEM) && !defined(NO_CERTS)
RSA* rsa = NULL;
BIO* bio = NULL;
@@ -33940,7 +34894,7 @@ static int test_wolfSSL_PEM_bio_RSAPrivateKey(void)
ExpectNotNull((rsa = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL)));
ExpectIntEQ(RSA_size(rsa), 256);
-#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
ExpectNull(rsa_dup = RSAPublicKey_dup(NULL));
/* Test duplicating empty key. */
ExpectNotNull(rsa_dup = RSA_new());
@@ -34341,9 +35295,11 @@ static int test_wolfSSL_tmp_dh(void)
BIO_free(bio);
DSA_free(dsa);
DH_free(dh);
+ dh = NULL;
#if defined(WOLFSSL_DH_EXTRA) && \
(defined(WOLFSSL_QT) || defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH))
DH_free(dh2);
+ dh2 = NULL;
#endif
SSL_free(ssl);
SSL_CTX_free(ctx);
@@ -34921,8 +35877,7 @@ static int test_wolfSSL_EVP_MD_hmac_signing(void)
static int test_wolfSSL_EVP_MD_rsa_signing(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_USER_RSA) && \
- defined(USE_CERT_BUFFERS_2048)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(USE_CERT_BUFFERS_2048)
WOLFSSL_EVP_PKEY* privKey = NULL;
WOLFSSL_EVP_PKEY* pubKey = NULL;
WOLFSSL_EVP_PKEY_CTX* keyCtx = NULL;
@@ -35139,7 +36094,6 @@ static int test_wolfSSL_CTX_add_extra_chain_cert(void)
ExpectNotNull(x509 = wolfSSL_X509_load_certificate_file(clientFile,
WOLFSSL_FILETYPE_PEM));
-#if !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA)
/* additional test of getting EVP_PKEY key size from X509
* Do not run with user RSA because wolfSSL_RSA_size is not currently
* allowed with user RSA */
@@ -35176,7 +36130,6 @@ static int test_wolfSSL_CTX_add_extra_chain_cert(void)
pkey = NULL;
#endif /* HAVE_ECC */
}
-#endif /* !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA) */
ExpectIntEQ((int)SSL_CTX_add_extra_chain_cert(ctx, x509), SSL_SUCCESS);
if (EXPECT_SUCCESS()) {
@@ -36584,12 +37537,14 @@ static int test_wolfSSL_Tls12_Key_Logging_test(void)
/* clean up keylog file */
ExpectTrue((fp = XFOPEN("./MyKeyLog.txt", "w")) != XBADFILE);
if (fp != XBADFILE) {
+ XFFLUSH(fp);
XFCLOSE(fp);
fp = XBADFILE;
}
ExpectIntEQ(test_wolfSSL_client_server_nofail_memio(&client_cbf,
&server_cbf, NULL), TEST_SUCCESS);
+ XSLEEP_MS(100);
/* check if the keylog file exists */
@@ -36597,6 +37552,7 @@ static int test_wolfSSL_Tls12_Key_Logging_test(void)
int found = 0;
ExpectTrue((fp = XFOPEN("./MyKeyLog.txt", "r")) != XBADFILE);
+ XFFLUSH(fp); /* Just to make sure any buffers get flushed */
while (EXPECT_SUCCESS() && XFGETS(buff, (int)sizeof(buff), fp) != NULL) {
if (0 == strncmp(buff,"CLIENT_RANDOM ", sizeof("CLIENT_RANDOM ")-1)) {
@@ -36963,8 +37919,8 @@ static int test_wolfSSL_X509_NID(void)
/* ------ PARSE ORIGINAL SELF-SIGNED CERTIFICATE ------ */
/* convert cert from DER to internal WOLFSSL_X509 struct */
- ExpectNotNull(cert = wolfSSL_X509_d2i(&cert, client_cert_der_2048,
- sizeof_client_cert_der_2048));
+ ExpectNotNull(cert = wolfSSL_X509_d2i_ex(&cert, client_cert_der_2048,
+ sizeof_client_cert_der_2048, HEAP_HINT));
/* ------ EXTRACT CERTIFICATE ELEMENTS ------ */
@@ -37470,6 +38426,7 @@ static int test_wolfSSL_BN(void)
ExpectIntLT(BN_cmp(a, c), 0);
ExpectIntGT(BN_cmp(c, b), 0);
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
ExpectIntEQ(BN_print_fp(XBADFILE, NULL), 0);
ExpectIntEQ(BN_print_fp(XBADFILE, &emptyBN), 0);
ExpectIntEQ(BN_print_fp(stderr, NULL), 0);
@@ -37477,6 +38434,7 @@ static int test_wolfSSL_BN(void)
ExpectIntEQ(BN_print_fp(XBADFILE, a), 0);
ExpectIntEQ(BN_print_fp(stderr, a), 1);
+#endif
BN_clear(a);
@@ -39012,12 +39970,12 @@ static int test_wolfSSL_BIO(void)
for (i = 0; i < 20; i++) {
ExpectIntEQ((int)bufPt[i], i);
}
- ExpectIntEQ(BIO_nread(bio2, &bufPt, 1), WOLFSSL_BIO_ERROR);
+ ExpectIntEQ(BIO_nread(bio2, &bufPt, 1), 0);
ExpectIntEQ(BIO_nread(bio1, &bufPt, (int)BIO_ctrl_pending(bio1)), 8);
for (i = 0; i < 8; i++) {
ExpectIntEQ((int)bufPt[i], i);
}
- ExpectIntEQ(BIO_nread(bio1, &bufPt, 1), WOLFSSL_BIO_ERROR);
+ ExpectIntEQ(BIO_nread(bio1, &bufPt, 1), 0);
ExpectIntEQ(BIO_ctrl_reset_read_request(bio1), 1);
/* new pair */
@@ -39026,7 +39984,7 @@ static int test_wolfSSL_BIO(void)
bio2 = NULL;
ExpectIntEQ(BIO_make_bio_pair(bio1, bio3), WOLFSSL_SUCCESS);
ExpectIntEQ((int)BIO_ctrl_pending(bio3), 0);
- ExpectIntEQ(BIO_nread(bio3, &bufPt, 10), WOLFSSL_BIO_ERROR);
+ ExpectIntEQ(BIO_nread(bio3, &bufPt, 10), 0);
/* test wrap around... */
ExpectIntEQ(BIO_reset(bio1), 0);
@@ -39074,7 +40032,7 @@ static int test_wolfSSL_BIO(void)
/* test reset on data in bio1 write buffer */
ExpectIntEQ(BIO_reset(bio1), 0);
ExpectIntEQ((int)BIO_ctrl_pending(bio3), 0);
- ExpectIntEQ(BIO_nread(bio3, &bufPt, 3), WOLFSSL_BIO_ERROR);
+ ExpectIntEQ(BIO_nread(bio3, &bufPt, 3), 0);
ExpectIntEQ(BIO_nwrite(bio1, &bufPt, 20), 20);
ExpectIntEQ((int)BIO_ctrl(bio1, BIO_CTRL_INFO, 0, &p), 20);
ExpectNotNull(p);
@@ -39189,6 +40147,35 @@ static int test_wolfSSL_BIO(void)
return EXPECT_RESULT();
}
+static int test_wolfSSL_BIO_BIO_ring_read(void)
+{
+ EXPECT_DECLS;
+#if defined(OPENSSL_ALL)
+ BIO* bio1 = NULL;
+ BIO* bio2 = NULL;
+ byte data[50];
+ byte tmp[50];
+
+ XMEMSET(data, 42, sizeof(data));
+
+
+ ExpectIntEQ(BIO_new_bio_pair(&bio1, sizeof(data), &bio2, sizeof(data)),
+ SSL_SUCCESS);
+
+ ExpectIntEQ(BIO_write(bio1, data, 40), 40);
+ ExpectIntEQ(BIO_read(bio1, tmp, 20), -1);
+ ExpectIntEQ(BIO_read(bio2, tmp, 20), 20);
+ ExpectBufEQ(tmp, data, 20);
+ ExpectIntEQ(BIO_write(bio1, data, 20), 20);
+ ExpectIntEQ(BIO_read(bio2, tmp, 40), 40);
+ ExpectBufEQ(tmp, data, 40);
+
+ BIO_free(bio1);
+ BIO_free(bio2);
+#endif
+ return EXPECT_RESULT();
+}
+
#endif /* !NO_BIO */
@@ -39583,9 +40570,9 @@ static int test_wolfSSL_X509_sign(void)
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && !defined(NO_ASN_TIME) && \
defined(WOLFSSL_CERT_GEN) && defined(WOLFSSL_CERT_REQ) && !defined(NO_RSA)
- int ret;
+ int ret = 0;
char *cn = NULL;
- word32 cnSz;
+ word32 cnSz = 0;
X509_NAME *name = NULL;
X509 *x509 = NULL;
X509 *ca = NULL;
@@ -40452,8 +41439,8 @@ static int test_wolfSSL_PKCS8_d2i(void)
#ifndef NO_FILESYSTEM
unsigned char pkcs8_buffer[2048];
- const unsigned char* p;
- int bytes;
+ const unsigned char* p = NULL;
+ int bytes = 0;
XFILE file = XBADFILE;
WOLFSSL_EVP_PKEY* pkey = NULL;
#ifndef NO_BIO
@@ -41167,7 +42154,7 @@ static int test_wolfSSL_SHA(void)
unsigned char expected[] = "\xA9\x99\x3E\x36\x47\x06\x81\x6A\xBA\x3E"
"\x25\x71\x78\x50\xC2\x6C\x9C\xD0\xD8\x9D";
unsigned char out[WC_SHA_DIGEST_SIZE];
- unsigned char* p;
+ unsigned char* p = NULL;
WOLFSSL_SHA_CTX sha;
XMEMSET(out, 0, WC_SHA_DIGEST_SIZE);
@@ -41208,7 +42195,7 @@ static int test_wolfSSL_SHA(void)
"\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00"
"\x15\xAD";
unsigned char out[WC_SHA256_DIGEST_SIZE];
- unsigned char* p;
+ unsigned char* p = NULL;
XMEMSET(out, 0, WC_SHA256_DIGEST_SIZE);
#if !defined(NO_OLD_NAMES) && !defined(HAVE_FIPS)
@@ -41235,7 +42222,7 @@ static int test_wolfSSL_SHA(void)
"\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34"
"\xc8\x25\xa7";
unsigned char out[WC_SHA384_DIGEST_SIZE];
- unsigned char* p;
+ unsigned char* p = NULL;
XMEMSET(out, 0, WC_SHA384_DIGEST_SIZE);
#if !defined(NO_OLD_NAMES) && !defined(HAVE_FIPS)
@@ -41263,7 +42250,7 @@ static int test_wolfSSL_SHA(void)
"\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f"
"\xa5\x4c\xa4\x9f";
unsigned char out[WC_SHA512_DIGEST_SIZE];
- unsigned char* p;
+ unsigned char* p = NULL;
XMEMSET(out, 0, WC_SHA512_DIGEST_SIZE);
#if !defined(NO_OLD_NAMES) && !defined(HAVE_FIPS)
@@ -42201,8 +43188,8 @@ static int test_wolfSSL_DES(void)
const_DES_cblock myDes;
DES_cblock iv;
DES_key_schedule key;
- word32 i;
- DES_LONG dl;
+ word32 i = 0;
+ DES_LONG dl = 0;
unsigned char msg[] = "hello wolfssl";
unsigned char weakKey[][8] = {
{ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
@@ -43116,7 +44103,8 @@ static int test_wolfSSL_OBJ(void)
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_SHA256) && !defined(NO_ASN) && \
!defined(HAVE_FIPS) && !defined(NO_SHA) && defined(WOLFSSL_CERT_EXT) && \
- defined(WOLFSSL_CERT_GEN) && !defined(NO_BIO)
+ defined(WOLFSSL_CERT_GEN) && !defined(NO_BIO) && \
+ !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
ASN1_OBJECT *obj = NULL;
ASN1_OBJECT *obj2 = NULL;
char buf[50];
@@ -45357,12 +46345,12 @@ static int test_wolfSSL_SESSION(void)
#ifdef HAVE_EXT_CACHE
unsigned char* sessDer = NULL;
unsigned char* ptr = NULL;
- int sz;
+ int sz = 0;
#endif
const unsigned char context[] = "user app context";
unsigned int contextSz = (unsigned int)sizeof(context);
#endif
- int ret, err;
+ int ret = 0, err = 0;
SOCKET_T sockfd;
tcp_ready ready;
func_args server_args;
@@ -46010,7 +46998,7 @@ static int test_wolfSSL_d2i_PrivateKeys_bio(void)
{
XFILE file = XBADFILE;
const char* fname = "./certs/server-key.der";
- size_t sz;
+ size_t sz = 0;
byte* buf = NULL;
ExpectTrue((file = XFOPEN(fname, "rb")) != XBADFILE);
@@ -46039,7 +47027,7 @@ static int test_wolfSSL_d2i_PrivateKeys_bio(void)
{
XFILE file = XBADFILE;
const char* fname = "./certs/ecc-key.der";
- size_t sz;
+ size_t sz = 0;
byte* buf = NULL;
ExpectTrue((file = XFOPEN(fname, "rb")) != XBADFILE);
@@ -46069,8 +47057,7 @@ static int test_wolfSSL_d2i_PrivateKeys_bio(void)
ExpectNotNull(ctx = SSL_CTX_new(wolfSSLv23_client_method()));
#endif
-#if !defined(HAVE_FAST_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
{
RSA* rsa = NULL;
/* Tests bad parameters */
@@ -46110,7 +47097,7 @@ static int test_wolfSSL_d2i_PrivateKeys_bio(void)
#endif /* USE_CERT_BUFFERS_2048 WOLFSSL_KEY_GEN */
RSA_free(rsa);
}
-#endif /* !HAVE_FAST_RSA && WOLFSSL_KEY_GEN && !NO_RSA && !HAVE_USER_RSA*/
+#endif /* WOLFSSL_KEY_GEN && !NO_RSA */
SSL_CTX_free(ctx);
ctx = NULL;
BIO_free(bio);
@@ -46431,14 +47418,14 @@ static int test_wolfSSL_sk_DIST_POINT(void)
X509* x509 = NULL;
unsigned char buf[4096];
const unsigned char* bufPt;
- int bytes;
- int i;
- int j;
+ int bytes = 0;
+ int i = 0;
+ int j = 0;
XFILE f = XBADFILE;
- DIST_POINT* dp;
- DIST_POINT_NAME* dpn;
- GENERAL_NAME* gn;
- ASN1_IA5STRING* uri;
+ DIST_POINT* dp = NULL;
+ DIST_POINT_NAME* dpn = NULL;
+ GENERAL_NAME* gn = NULL;
+ ASN1_IA5STRING* uri = NULL;
STACK_OF(DIST_POINT)* dps = NULL;
STACK_OF(GENERAL_NAME)* gns = NULL;
const char cliCertDerCrlDistPoint[] = "./certs/client-crl-dist.der";
@@ -46930,6 +47917,7 @@ static int test_wolfSSL_PEM_read_DHparams(void)
XFCLOSE(fp);
DH_free(dh);
+ dh = NULL;
#endif
return EXPECT_RESULT();
}
@@ -47059,7 +48047,7 @@ static int test_wolfSSL_OPENSSL_hexstr2buf(void)
long len = 0;
unsigned char* returnedBuf = NULL;
- for (i = 0; i < NUM_CASES && EXPECT_SUCCESS(); ++i) {
+ for (i = 0; i < NUM_CASES && !EXPECT_FAIL(); ++i) {
returnedBuf = wolfSSL_OPENSSL_hexstr2buf(inputs[i], &len);
if (returnedBuf == NULL) {
ExpectIntEQ(expectedOutputs[i].ret, 0);
@@ -47144,22 +48132,22 @@ static int test_wolfSSL_make_cert(void)
EXPECT_DECLS;
#if !defined(NO_RSA) && !defined(NO_ASN_TIME) && defined(WOLFSSL_CERT_GEN) && \
defined(WOLFSSL_CERT_EXT)
- int ret;
+ int ret = 0;
Cert cert;
CertName name;
RsaKey key;
WC_RNG rng;
byte der[FOURK_BUF];
- word32 idx;
+ word32 idx = 0;
const byte mySerial[8] = {1,2,3,4,5,6,7,8};
#ifdef OPENSSL_EXTRA
- const unsigned char* pt;
- int certSz;
+ const unsigned char* pt = NULL;
+ int certSz = 0;
X509* x509 = NULL;
- X509_NAME* x509name;
- X509_NAME_ENTRY* entry;
- ASN1_STRING* entryValue;
+ X509_NAME* x509name = NULL;
+ X509_NAME_ENTRY* entry = NULL;
+ ASN1_STRING* entryValue = NULL;
#endif
XMEMSET(&name, 0, sizeof(CertName));
@@ -47688,7 +48676,9 @@ static int test_wolfSSL_EVP_PKEY_set1_get1_DH (void)
EVP_PKEY_free(pkey);
DH_free(setDh);
+ setDh = NULL;
DH_free(dh);
+ dh = NULL;
#endif /* !NO_DH && WOLFSSL_DH_EXTRA && !NO_FILESYSTEM */
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
#endif /* OPENSSL_ALL || WOLFSSL_QT || WOLFSSL_OPENSSH */
@@ -47708,7 +48698,7 @@ static int test_wolfSSL_CTX_ctrl(void)
byte buf[6000];
char file[] = "./certs/dsaparams.pem";
XFILE f = XBADFILE;
- int bytes;
+ int bytes = 0;
BIO* bio = NULL;
DSA* dsa = NULL;
DH* dh = NULL;
@@ -47748,7 +48738,6 @@ static int test_wolfSSL_CTX_ctrl(void)
ExpectIntEQ(wolfSSL_EC_KEY_generate_key(ecKey), 1);
#endif
-#if !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA)
/* additional test of getting EVP_PKEY key size from X509
* Do not run with user RSA because wolfSSL_RSA_size is not currently
* allowed with user RSA */
@@ -47782,7 +48771,6 @@ static int test_wolfSSL_CTX_ctrl(void)
EVP_PKEY_free(pkey);
#endif /* HAVE_ECC */
}
-#endif /* !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA) */
/* Tests should fail with passed in NULL pointer */
ExpectIntEQ((int)wolfSSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, NULL),
@@ -47860,6 +48848,7 @@ static int test_wolfSSL_CTX_ctrl(void)
BIO_free(bio);
DSA_free(dsa);
DH_free(dh);
+ dh = NULL;
#endif
#endif
#ifdef HAVE_ECC
@@ -48106,6 +49095,7 @@ static int test_wolfSSL_EVP_PKEY_keygen(void)
ASN1_INTEGER_free(asn1int);
DH_free(dh);
+ dh = NULL;
XFREE(derBuffer, NULL, DYNAMIC_TYPE_TMP_BUFFER);
EVP_PKEY_free(pkey);
@@ -48194,6 +49184,7 @@ static int test_wolfSSL_EVP_PKEY_copy_parameters(void)
ExpectIntEQ(BN_cmp(g1, g2), 0);
DH_free(dh);
+ dh = NULL;
EVP_PKEY_free(copy);
EVP_PKEY_free(params);
#endif
@@ -48939,7 +49930,9 @@ static int test_wolfSSL_EVP_PKEY_param_check(void)
EVP_PKEY_CTX_free(ctx);
EVP_PKEY_free(pkey);
DH_free(setDh);
+ setDh = NULL;
DH_free(dh);
+ dh = NULL;
#endif
#endif
return EXPECT_RESULT();
@@ -49817,7 +50810,7 @@ static int test_wolfSSL_X509_get_ext_by_NID(void)
{
EXPECT_DECLS;
#if defined(OPENSSL_ALL) && !defined(NO_RSA)
- int rc;
+ int rc = 0;
XFILE f = XBADFILE;
WOLFSSL_X509* x509 = NULL;
ASN1_OBJECT* obj = NULL;
@@ -49859,12 +50852,12 @@ static int test_wolfSSL_X509_get_ext_subj_alt_name(void)
{
EXPECT_DECLS;
#if defined(OPENSSL_ALL) && !defined(NO_RSA)
- int rc;
+ int rc = 0;
XFILE f = XBADFILE;
WOLFSSL_X509* x509 = NULL;
- WOLFSSL_X509_EXTENSION* ext;
- WOLFSSL_ASN1_STRING* sanString;
- byte* sanDer;
+ WOLFSSL_X509_EXTENSION* ext = NULL;
+ WOLFSSL_ASN1_STRING* sanString = NULL;
+ byte* sanDer = NULL;
const byte expectedDer[] = {
0x30, 0x13, 0x82, 0x0b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e,
@@ -49934,8 +50927,8 @@ static int test_wolfSSL_X509_EXTENSION_get_data(void)
EXPECT_DECLS;
#if !defined(NO_FILESYSTEM) && defined(OPENSSL_ALL) && !defined(NO_RSA)
WOLFSSL_X509* x509 = NULL;
- WOLFSSL_X509_EXTENSION* ext;
- WOLFSSL_ASN1_STRING* str;
+ WOLFSSL_X509_EXTENSION* ext = NULL;
+ WOLFSSL_ASN1_STRING* str = NULL;
XFILE file = XBADFILE;
ExpectTrue((file = XFOPEN("./certs/server-cert.pem", "rb")) != XBADFILE);
@@ -49957,9 +50950,9 @@ static int test_wolfSSL_X509_EXTENSION_get_critical(void)
EXPECT_DECLS;
#if !defined(NO_FILESYSTEM) && defined(OPENSSL_ALL) && !defined(NO_RSA)
WOLFSSL_X509* x509 = NULL;
- WOLFSSL_X509_EXTENSION* ext;
+ WOLFSSL_X509_EXTENSION* ext = NULL;
XFILE file = XBADFILE;
- int crit;
+ int crit = 0;
ExpectTrue((file = XFOPEN("./certs/server-cert.pem", "rb")) != XBADFILE);
ExpectNotNull(x509 = wolfSSL_PEM_read_X509(file, NULL, NULL, NULL));
@@ -49985,7 +50978,7 @@ static int test_wolfSSL_X509V3_EXT_print(void)
XFILE f = XBADFILE;
WOLFSSL_X509* x509 = NULL;
X509_EXTENSION * ext = NULL;
- int loc;
+ int loc = 0;
BIO *bio = NULL;
ExpectTrue((f = XFOPEN(svrCertFile, "rb")) != XBADFILE);
@@ -50017,9 +51010,9 @@ static int test_wolfSSL_X509V3_EXT_print(void)
{
X509 *x509 = NULL;
BIO *bio = NULL;
- X509_EXTENSION *ext;
- unsigned int i;
- unsigned int idx;
+ X509_EXTENSION *ext = NULL;
+ unsigned int i = 0;
+ unsigned int idx = 0;
/* Some NIDs to test with */
int nids[] = {
/* NID_key_usage, currently X509_get_ext returns this as a bit
@@ -50027,7 +51020,7 @@ static int test_wolfSSL_X509V3_EXT_print(void)
/* NID_ext_key_usage, */
NID_subject_alt_name,
};
- int* n;
+ int* n = NULL;
ExpectNotNull(bio = BIO_new_fp(stderr, BIO_NOCLOSE));
@@ -50277,7 +51270,7 @@ static int test_wolfSSL_i2d_PrivateKey(void)
(const unsigned char*)server_key_der_2048;
unsigned char buf[FOURK_BUF];
unsigned char* pt = NULL;
- int bufSz;
+ int bufSz = 0;
ExpectNotNull(pkey = d2i_PrivateKey(EVP_PKEY_RSA, NULL, &server_key,
(long)sizeof_server_key_der_2048));
@@ -50296,7 +51289,7 @@ static int test_wolfSSL_i2d_PrivateKey(void)
(const unsigned char*)ecc_clikey_der_256;
unsigned char buf[FOURK_BUF];
unsigned char* pt = NULL;
- int bufSz;
+ int bufSz = 0;
ExpectNotNull((pkey = d2i_PrivateKey(EVP_PKEY_EC, NULL, &client_key,
(long)sizeof_ecc_clikey_der_256)));
@@ -50326,7 +51319,7 @@ static int test_wolfSSL_OCSP_id_get0_info(void)
ASN1_OBJECT* pmd = NULL;
ASN1_STRING* keyHash = NULL;
ASN1_INTEGER* serial = NULL;
- ASN1_INTEGER* x509Int;
+ ASN1_INTEGER* x509Int = NULL;
ExpectNotNull(cert = wolfSSL_X509_load_certificate_file(svrCertFile,
SSL_FILETYPE_PEM));
@@ -51422,8 +52415,7 @@ static int test_wc_ecc_get_curve_id_from_params(void)
static int test_wolfSSL_EVP_PKEY_encrypt(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
WOLFSSL_RSA* rsa = NULL;
WOLFSSL_EVP_PKEY* pkey = NULL;
WOLFSSL_EVP_PKEY_CTX* ctx = NULL;
@@ -51531,7 +52523,7 @@ static int test_wolfSSL_EVP_PKEY_encrypt(void)
}
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
#ifndef TEST_WOLFSSL_EVP_PKEY_SIGN_VERIFY
#define TEST_WOLFSSL_EVP_PKEY_SIGN_VERIFY
@@ -51559,7 +52551,7 @@ static int test_wolfSSL_EVP_PKEY_sign_verify(int keyType)
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA)
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
WOLFSSL_RSA* rsa = NULL;
#endif
@@ -51609,7 +52601,7 @@ static int test_wolfSSL_EVP_PKEY_sign_verify(int keyType)
switch (keyType) {
case EVP_PKEY_RSA:
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
{
ExpectNotNull(rsa = RSA_generate_key(2048, 3, NULL, NULL));
@@ -51646,7 +52638,7 @@ static int test_wolfSSL_EVP_PKEY_sign_verify(int keyType)
ExpectNotNull(ctx = EVP_PKEY_CTX_new(pkey, NULL));
ExpectIntEQ(EVP_PKEY_sign_init(ctx), WOLFSSL_SUCCESS);
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
if (keyType == EVP_PKEY_RSA)
ExpectIntEQ(EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING),
@@ -51667,7 +52659,7 @@ static int test_wolfSSL_EVP_PKEY_sign_verify(int keyType)
ExpectNotNull(ctx_verify = EVP_PKEY_CTX_new(pkey, NULL));
ExpectIntEQ(EVP_PKEY_verify_init(ctx_verify), WOLFSSL_SUCCESS);
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
if (keyType == EVP_PKEY_RSA)
ExpectIntEQ(
@@ -51683,7 +52675,7 @@ static int test_wolfSSL_EVP_PKEY_sign_verify(int keyType)
WOLFSSL_FAILURE);
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
if (keyType == EVP_PKEY_RSA) {
#if defined(WC_RSA_NO_PADDING) || defined(WC_RSA_DIRECT)
@@ -51752,7 +52744,7 @@ static int test_wolfSSL_EVP_PKEY_sign_verify_rsa(void)
{
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_SELFTEST)
+ !defined(HAVE_SELFTEST)
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
ExpectIntEQ(test_wolfSSL_EVP_PKEY_sign_verify(EVP_PKEY_RSA), TEST_SUCCESS);
#endif
@@ -52314,6 +53306,10 @@ static int test_wolfSSL_PKCS7_sign(void)
EVP_PKEY* signKey = NULL;
X509* caCert = NULL;
X509_STORE* store = NULL;
+#ifndef NO_PKCS7_STREAM
+ int z;
+ int ret;
+#endif /* !NO_PKCS7_STREAM */
/* read signer cert/key into BIO */
ExpectNotNull(certBio = BIO_new_file(cert, "r"));
@@ -52360,6 +53356,23 @@ static int test_wolfSSL_PKCS7_sign(void)
ExpectIntEQ(wc_PKCS7_Init(p7Ver, HEAP_HINT, INVALID_DEVID), 0);
ExpectIntEQ(wc_PKCS7_VerifySignedData(p7Ver, out, outLen), 0);
+ #ifndef NO_PKCS7_STREAM
+ /* verify with wc_PKCS7_VerifySignedData streaming */
+ wc_PKCS7_Free(p7Ver);
+ p7Ver = NULL;
+ ExpectNotNull(p7Ver = wc_PKCS7_New(HEAP_HINT, testDevId));
+ ExpectIntEQ(wc_PKCS7_Init(p7Ver, HEAP_HINT, INVALID_DEVID), 0);
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outLen && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(p7Ver, out + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ #endif /* !NO_PKCS7_STREAM */
+
/* compare the signer found to expected signer */
ExpectIntNE(p7Ver->verifyCertSz, 0);
tmpPtr = NULL;
@@ -52432,6 +53445,26 @@ static int test_wolfSSL_PKCS7_sign(void)
wc_PKCS7_Free(p7Ver);
p7Ver = NULL;
+ #ifndef NO_PKCS7_STREAM
+ /* verify with wc_PKCS7_VerifySignedData streaming */
+ ExpectNotNull(p7Ver = wc_PKCS7_New(HEAP_HINT, testDevId));
+ if (p7Ver != NULL) {
+ p7Ver->content = data;
+ p7Ver->contentSz = sizeof(data);
+ }
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outLen && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(p7Ver, out + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ wc_PKCS7_Free(p7Ver);
+ p7Ver = NULL;
+ #endif /* !NO_PKCS7_STREAM */
+
/* verify expected failure (NULL return) from d2i_PKCS7, it does not
* yet support detached content */
tmpPtr = out;
@@ -52470,6 +53503,28 @@ static int test_wolfSSL_PKCS7_sign(void)
p7Ver = NULL;
ExpectNotNull(out);
+
+ #ifndef NO_PKCS7_STREAM
+ /* verify with wc_PKCS7_VerifySignedData streaming */
+ ExpectNotNull(p7Ver = wc_PKCS7_New(HEAP_HINT, testDevId));
+ if (p7Ver != NULL) {
+ p7Ver->content = data;
+ p7Ver->contentSz = sizeof(data);
+ }
+ /* test for streaming */
+ ret = -1;
+ for (z = 0; z < outLen && ret != 0; z++) {
+ ret = wc_PKCS7_VerifySignedData(p7Ver, out + z, 1);
+ if (ret < 0){
+ ExpectIntEQ(ret, WC_PKCS7_WANT_READ_E);
+ }
+ }
+ ExpectIntEQ(ret, 0);
+ ExpectNotNull(out);
+ wc_PKCS7_Free(p7Ver);
+ p7Ver = NULL;
+ #endif /* !NO_PKCS7_STREAM */
+
XFREE(out, NULL, DYNAMIC_TYPE_TMP_BUFFER);
PKCS7_free(p7);
p7 = NULL;
@@ -53273,7 +54328,7 @@ static int test_tls13_apis(void)
#endif
#if (!defined(NO_ECC256) || defined(HAVE_ALL_CURVES)) && ECC_MIN_KEY_SZ <= 256
"P-256"
-#ifdef HAVE_PQC
+#if defined(HAVE_PQC) && defined(HAVE_LIBOQS)
":P256_KYBER_LEVEL1"
#endif
#endif
@@ -54508,7 +55563,7 @@ static int test_wolfSSL_X509_load_crl_file(void)
{
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && defined(HAVE_CRL) && !defined(NO_FILESYSTEM) && \
- !defined(NO_RSA) && !defined(NO_BIO)
+ !defined(NO_STDIO_FILESYSTEM) && !defined(NO_RSA) && !defined(NO_BIO)
int i;
char pem[][100] = {
"./certs/crl/crl.pem",
@@ -54516,6 +55571,9 @@ static int test_wolfSSL_X509_load_crl_file(void)
"./certs/crl/caEccCrl.pem",
"./certs/crl/eccCliCRL.pem",
"./certs/crl/eccSrvCRL.pem",
+ #ifdef WC_RSA_PSS
+ "./certs/crl/crl_rsapss.pem",
+ #endif
""
};
char der[][100] = {
@@ -54531,6 +55589,10 @@ static int test_wolfSSL_X509_load_crl_file(void)
ExpectIntEQ(X509_LOOKUP_load_file(lookup, "certs/ca-cert.pem",
X509_FILETYPE_PEM), 1);
+#ifdef WC_RSA_PSS
+ ExpectIntEQ(X509_LOOKUP_load_file(lookup, "certs/rsapss/ca-rsapss.pem",
+ X509_FILETYPE_PEM), 1);
+#endif
ExpectIntEQ(X509_LOOKUP_load_file(lookup, "certs/server-revoked-cert.pem",
X509_FILETYPE_PEM), 1);
if (store) {
@@ -54551,6 +55613,11 @@ static int test_wolfSSL_X509_load_crl_file(void)
ExpectIntEQ(wolfSSL_CertManagerVerify(store->cm,
"certs/server-revoked-cert.pem", WOLFSSL_FILETYPE_PEM),
CRL_CERT_REVOKED);
+#ifdef WC_RSA_PSS
+ ExpectIntEQ(wolfSSL_CertManagerVerify(store->cm,
+ "certs/rsapss/server-rsapss-cert.pem", WOLFSSL_FILETYPE_PEM),
+ CRL_CERT_REVOKED);
+#endif
}
/* once feeing store */
X509_STORE_free(store);
@@ -54669,8 +55736,8 @@ static int test_wolfSSL_d2i_X509_REQ(void)
}
{
#ifdef OPENSSL_ALL
- X509_ATTRIBUTE* attr;
- ASN1_TYPE *at;
+ X509_ATTRIBUTE* attr = NULL;
+ ASN1_TYPE *at = NULL;
#endif
ExpectNotNull(bio = BIO_new_file(csrPopFile, "rb"));
ExpectNotNull(d2i_X509_REQ_bio(bio, &req));
@@ -54708,8 +55775,8 @@ static int test_wolfSSL_d2i_X509_REQ(void)
}
{
#ifdef OPENSSL_ALL
- X509_ATTRIBUTE* attr;
- ASN1_TYPE *at;
+ X509_ATTRIBUTE* attr = NULL;
+ ASN1_TYPE *at = NULL;
STACK_OF(X509_EXTENSION) *exts = NULL;
#endif
ExpectNotNull(bio = BIO_new_file(csrExtFile, "rb"));
@@ -56538,11 +57605,11 @@ static int test_wolfSSL_X509_print(void)
{
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_FILESYSTEM) && \
- !defined(NO_RSA) && !defined(HAVE_FAST_RSA) && defined(XSNPRINTF)
+ !defined(NO_RSA) && defined(XSNPRINTF)
X509 *x509 = NULL;
BIO *bio = NULL;
#if defined(OPENSSL_ALL) && !defined(NO_WOLFSSL_DIR)
- const X509_ALGOR *cert_sig_alg;
+ const X509_ALGOR *cert_sig_alg = NULL;
#endif
ExpectNotNull(x509 = X509_load_certificate_file(svrCertFile,
@@ -56645,17 +57712,16 @@ static int test_wolfSSL_BIO_get_len(void)
static int test_wolfSSL_RSA(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_USER_RSA) && \
- defined(WOLFSSL_KEY_GEN)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
RSA* rsa = NULL;
- const BIGNUM *n;
- const BIGNUM *e;
- const BIGNUM *d;
- const BIGNUM *p;
- const BIGNUM *q;
- const BIGNUM *dmp1;
- const BIGNUM *dmq1;
- const BIGNUM *iqmp;
+ const BIGNUM *n = NULL;
+ const BIGNUM *e = NULL;
+ const BIGNUM *d = NULL;
+ const BIGNUM *p = NULL;
+ const BIGNUM *q = NULL;
+ const BIGNUM *dmp1 = NULL;
+ const BIGNUM *dmq1 = NULL;
+ const BIGNUM *iqmp = NULL;
ExpectNotNull(rsa = RSA_new());
ExpectIntEQ(RSA_size(NULL), 0);
@@ -56791,7 +57857,7 @@ static int test_wolfSSL_RSA(void)
const char PrivKeyPemFile[] = "certs/client-keyEnc.pem";
XFILE f = XBADFILE;
- int bytes;
+ int bytes = 0;
/* test loading encrypted RSA private pem w/o password */
ExpectTrue((f = XFOPEN(PrivKeyPemFile, "rb")) != XBADFILE);
@@ -56811,8 +57877,7 @@ static int test_wolfSSL_RSA(void)
static int test_wolfSSL_RSA_DER(void)
{
EXPECT_DECLS;
-#if !defined(HAVE_FAST_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(NO_RSA) && !defined(HAVE_USER_RSA) && defined(OPENSSL_EXTRA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA) && defined(OPENSSL_EXTRA)
RSA *rsa = NULL;
int i;
const unsigned char *buff = NULL;
@@ -56900,8 +57965,9 @@ static int test_wolfSSL_RSA_print(void)
{
EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_FILESYSTEM) && \
- !defined(NO_RSA) && !defined(HAVE_FAST_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_FAST_RSA) && !defined(NO_BIO) && defined(XFPRINTF)
+ !defined(NO_STDIO_FILESYSTEM) && \
+ !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
+ !defined(NO_BIO) && defined(XFPRINTF)
BIO *bio = NULL;
WOLFSSL_RSA* rsa = NULL;
@@ -57028,7 +58094,7 @@ static int test_wolfSSL_RSA_sign_sha3(void)
static int test_wolfSSL_RSA_get0_key(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA *rsa = NULL;
const BIGNUM* n = NULL;
const BIGNUM* e = NULL;
@@ -57080,7 +58146,7 @@ static int test_wolfSSL_RSA_get0_key(void)
static int test_wolfSSL_RSA_meth(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA *rsa = NULL;
RSA_METHOD *rsa_meth = NULL;
@@ -57148,8 +58214,7 @@ static int test_wolfSSL_RSA_meth(void)
static int test_wolfSSL_RSA_verify(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA) && \
- !defined(NO_FILESYSTEM)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(NO_FILESYSTEM)
#ifndef NO_BIO
XFILE fp = XBADFILE;
RSA *pKey = NULL;
@@ -57229,7 +58294,7 @@ static int test_wolfSSL_RSA_verify(void)
static int test_wolfSSL_RSA_sign(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA *rsa;
unsigned char hash[SHA256_DIGEST_LENGTH];
#ifdef USE_CERT_BUFFERS_1024
@@ -57286,7 +58351,7 @@ static int test_wolfSSL_RSA_sign(void)
static int test_wolfSSL_RSA_sign_ex(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA *rsa = NULL;
unsigned char hash[SHA256_DIGEST_LENGTH];
#ifdef USE_CERT_BUFFERS_1024
@@ -57374,7 +58439,7 @@ static int test_wolfSSL_RSA_sign_ex(void)
static int test_wolfSSL_RSA_public_decrypt(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA *rsa;
unsigned char msg[SHA256_DIGEST_LENGTH];
#ifdef USE_CERT_BUFFERS_1024
@@ -57549,7 +58614,7 @@ static int test_wolfSSL_RSA_public_decrypt(void)
static int test_wolfSSL_RSA_private_encrypt(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA *rsa;
unsigned char msg[SHA256_DIGEST_LENGTH];
#ifdef USE_CERT_BUFFERS_1024
@@ -57709,7 +58774,7 @@ static int test_wolfSSL_RSA_private_encrypt(void)
static int test_wolfSSL_RSA_public_encrypt(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA* rsa = NULL;
const unsigned char msg[2048/8] = { 0 };
unsigned char encMsg[2048/8];
@@ -57738,7 +58803,7 @@ static int test_wolfSSL_RSA_public_encrypt(void)
static int test_wolfSSL_RSA_private_decrypt(void)
{
EXPECT_DECLS;
-#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
+#if defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA* rsa = NULL;
unsigned char msg[2048/8];
const unsigned char encMsg[2048/8] = { 0 };
@@ -57903,8 +58968,7 @@ static int test_wolfSSL_RSA_To_Der(void)
{
EXPECT_DECLS;
#ifdef WOLFSSL_TEST_STATIC_BUILD
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA) && \
- defined(OPENSSL_EXTRA) && !defined(NO_RSA)
+#if defined(WOLFSSL_KEY_GEN) && defined(OPENSSL_EXTRA) && !defined(NO_RSA)
RSA* rsa;
#ifdef USE_CERT_BUFFERS_1024
const unsigned char* privDer = client_key_der_1024;
@@ -57987,7 +59051,7 @@ static int test_wolfSSL_PEM_write_RSA_PUBKEY(void)
{
EXPECT_DECLS;
#if !defined(NO_RSA) && defined(OPENSSL_EXTRA) && !defined(NO_FILESYSTEM) && \
- defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA)
+ defined(WOLFSSL_KEY_GEN)
RSA* rsa = NULL;
ExpectIntEQ(wolfSSL_PEM_write_RSA_PUBKEY(XBADFILE, NULL), 0);
@@ -58002,7 +59066,7 @@ static int test_wolfSSL_PEM_write_RSAPrivateKey(void)
{
EXPECT_DECLS;
#if !defined(NO_RSA) && defined(OPENSSL_EXTRA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_USER_RSA) && (defined(WOLFSSL_PEM_TO_DER) || \
+ (defined(WOLFSSL_PEM_TO_DER) || \
defined(WOLFSSL_DER_TO_PEM)) && !defined(NO_FILESYSTEM)
RSA* rsa = NULL;
#ifdef USE_CERT_BUFFERS_1024
@@ -58048,8 +59112,7 @@ static int test_wolfSSL_PEM_write_mem_RSAPrivateKey(void)
{
EXPECT_DECLS;
#if !defined(NO_RSA) && defined(OPENSSL_EXTRA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(HAVE_USER_RSA) && (defined(WOLFSSL_PEM_TO_DER) || \
- defined(WOLFSSL_DER_TO_PEM))
+ (defined(WOLFSSL_PEM_TO_DER) || defined(WOLFSSL_DER_TO_PEM))
RSA* rsa = NULL;
#ifdef USE_CERT_BUFFERS_1024
const unsigned char* privDer = client_key_der_1024;
@@ -58213,6 +59276,7 @@ static int test_wolfSSL_DH(void)
ExpectNotNull(dh = DH_generate_parameters(2048, 2, NULL, NULL));
ExpectIntEQ(wolfSSL_DH_generate_parameters_ex(NULL, 2048, 2, NULL), 0);
DH_free(dh);
+ dh = NULL;
#endif
#endif /* !HAVE_FIPS || (HAVE_FIPS_VERSION && HAVE_FIPS_VERSION > 2) */
#endif /* OPENSSL_ALL */
@@ -58367,6 +59431,7 @@ static int test_wolfSSL_DH(void)
ExpectIntEQ(wolfSSL_DH_up_ref(dh), WOLFSSL_SUCCESS);
DH_free(dh); /* decrease ref count */
DH_free(dh); /* free WOLFSSL_DH */
+ dh = NULL;
q = NULL;
ExpectNull((dh = DH_new_by_nid(NID_sha1)));
@@ -58376,16 +59441,19 @@ static int test_wolfSSL_DH(void)
#ifdef HAVE_FFDHE_2048
ExpectNotNull((dh = DH_new_by_nid(NID_ffdhe2048)));
DH_free(dh);
+ dh = NULL;
q = NULL;
#endif
#ifdef HAVE_FFDHE_3072
ExpectNotNull((dh = DH_new_by_nid(NID_ffdhe3072)));
DH_free(dh);
+ dh = NULL;
q = NULL;
#endif
#ifdef HAVE_FFDHE_4096
ExpectNotNull((dh = DH_new_by_nid(NID_ffdhe4096)));
DH_free(dh);
+ dh = NULL;
q = NULL;
#endif
#else
@@ -58585,6 +59653,7 @@ static int test_wolfSSL_DH_check(void)
ExpectIntEQ(wolfSSL_DH_check(dh, NULL), 0);
ExpectIntEQ(codes, DH_CHECK_P_NOT_PRIME);
DH_free(dh);
+ dh = NULL;
#endif
#endif /* !NO_DH && !NO_DSA */
#endif
@@ -58768,9 +59837,9 @@ static int test_wolfSSL_DH_get_2048_256(void)
0x40, 0x12, 0x9D, 0xA2, 0x99, 0xB1, 0xA4, 0x7D, 0x1E, 0xB3, 0x75, 0x0B,
0xA3, 0x08, 0xB0, 0xFE, 0x64, 0xF5, 0xFB, 0xD3
};
- int pSz;
- int qSz;
- int gSz;
+ int pSz = 0;
+ int qSz = 0;
+ int gSz = 0;
byte* pReturned = NULL;
byte* qReturned = NULL;
byte* gReturned = NULL;
@@ -59042,7 +60111,7 @@ static int test_wolfSSL_i2d_DHparams(void)
#ifdef HAVE_FFDHE_3072
const char* params2 = "./certs/dh3072.der";
#endif
- long len;
+ long len = 0;
WOLFSSL_DH* dh = NULL;
/* Test 2048 bit parameters */
@@ -59070,6 +60139,7 @@ static int test_wolfSSL_i2d_DHparams(void)
ExpectIntEQ(wolfSSL_i2d_DHparams(dh, NULL), 268);
DH_free(dh);
+ dh = NULL;
*buf = 0;
#endif
@@ -59099,6 +60169,7 @@ static int test_wolfSSL_i2d_DHparams(void)
ExpectIntEQ(wolfSSL_i2d_DHparams(dh, NULL), 396);
DH_free(dh);
+ dh = NULL;
#endif
dh = DH_new();
@@ -59106,6 +60177,7 @@ static int test_wolfSSL_i2d_DHparams(void)
pt2 = buf;
ExpectIntEQ(wolfSSL_i2d_DHparams(dh, &pt2), 0);
DH_free(dh);
+ dh = NULL;
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
#endif /* !NO_DH && (HAVE_FFDHE_2048 || HAVE_FFDHE_3072) */
#endif
@@ -59614,7 +60686,8 @@ static int test_wolfSSL_EC_POINT(void)
/* check bn2hex */
hexStr = BN_bn2hex(k);
ExpectStrEQ(hexStr, kTest);
-#if !defined(NO_FILESYSTEM) && defined(XFPRINTF)
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) && \
+ defined(XFPRINTF)
BN_print_fp(stderr, k);
fprintf(stderr, "\n");
#endif
@@ -59622,7 +60695,8 @@ static int test_wolfSSL_EC_POINT(void)
hexStr = BN_bn2hex(Gx);
ExpectStrEQ(hexStr, kGx);
-#if !defined(NO_FILESYSTEM) && defined(XFPRINTF)
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) && \
+ defined(XFPRINTF)
BN_print_fp(stderr, Gx);
fprintf(stderr, "\n");
#endif
@@ -59630,7 +60704,8 @@ static int test_wolfSSL_EC_POINT(void)
hexStr = BN_bn2hex(Gy);
ExpectStrEQ(hexStr, kGy);
-#if !defined(NO_FILESYSTEM) && defined(XFPRINTF)
+#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM) && \
+ defined(XFPRINTF)
BN_print_fp(stderr, Gy);
fprintf(stderr, "\n");
#endif
@@ -62372,7 +63447,7 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
char msg[] = "I hear you fa shizzle!";
int len = (int) XSTRLEN(msg);
char input[1024];
- int ret;
+ int ret = 0;
int err = 0;
if (!args)
@@ -65744,6 +66819,77 @@ static int test_extra_alerts_bad_psk(void)
}
#endif
+#if defined(WOLFSSL_TLS13) && defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES)\
+ && !defined(NO_PSK)
+static unsigned int test_tls13_bad_psk_binder_client_cb(WOLFSSL* ssl,
+ const char* hint, char* identity, unsigned int id_max_len,
+ unsigned char* key, unsigned int key_max_len)
+{
+ (void)ssl;
+ (void)hint;
+ (void)key_max_len;
+
+ /* see internal.h MAX_PSK_ID_LEN for PSK identity limit */
+ XSTRNCPY(identity, "Client_identity", id_max_len);
+
+ key[0] = 0x20;
+ return 1;
+}
+
+static unsigned int test_tls13_bad_psk_binder_server_cb(WOLFSSL* ssl,
+ const char* id, unsigned char* key, unsigned int key_max_len)
+{
+ (void)ssl;
+ (void)id;
+ (void)key_max_len;
+ /* zero means error */
+ key[0] = 0x10;
+ return 1;
+}
+#endif
+
+static int test_tls13_bad_psk_binder(void)
+{
+ EXPECT_DECLS;
+#if defined(WOLFSSL_TLS13) && defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES)\
+ && !defined(NO_PSK)
+ WOLFSSL_CTX *ctx_c = NULL;
+ WOLFSSL_CTX *ctx_s = NULL;
+ WOLFSSL *ssl_c = NULL;
+ WOLFSSL *ssl_s = NULL;
+ struct test_memio_ctx test_ctx;
+ WOLFSSL_ALERT_HISTORY h;
+
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ wolfTLSv1_3_client_method, wolfTLSv1_3_server_method), 0);
+
+ wolfSSL_set_psk_client_callback(ssl_c, test_tls13_bad_psk_binder_client_cb);
+ wolfSSL_set_psk_server_callback(ssl_s, test_tls13_bad_psk_binder_server_cb);
+
+ ExpectIntNE(wolfSSL_connect(ssl_c), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, WOLFSSL_FATAL_ERROR),
+ WOLFSSL_ERROR_WANT_READ);
+
+ ExpectIntNE(wolfSSL_accept(ssl_s), WOLFSSL_SUCCESS);
+ ExpectIntEQ( wolfSSL_get_error(ssl_s, WOLFSSL_FATAL_ERROR),
+ BAD_BINDER);
+
+ ExpectIntNE(wolfSSL_connect(ssl_c), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, WOLFSSL_FATAL_ERROR),
+ FATAL_ERROR);
+ ExpectIntEQ(wolfSSL_get_alert_history(ssl_c, &h), WOLFSSL_SUCCESS);
+ ExpectIntEQ(h.last_rx.code, illegal_parameter);
+ ExpectIntEQ(h.last_rx.level, alert_fatal);
+
+ wolfSSL_free(ssl_c);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_s);
+#endif
+ return EXPECT_RESULT();
+}
+
#if defined(WOLFSSL_HARDEN_TLS) && !defined(WOLFSSL_NO_TLS12) && \
defined(HAVE_IO_TESTS_DEPENDENCIES)
static int test_harden_no_secure_renegotiation_io_cb(WOLFSSL *ssl, char *buf,
@@ -68191,6 +69337,81 @@ static int test_dtls_dropped_ccs(void)
#endif
return EXPECT_RESULT();
}
+
+#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && defined(WOLFSSL_DTLS) \
+ && !defined(WOLFSSL_NO_TLS12)
+static int test_dtls_seq_num_downgrade_check_num(byte* ioBuf, int ioBufLen,
+ byte seq_num)
+{
+ EXPECT_DECLS;
+ DtlsRecordLayerHeader* dtlsRH;
+ byte sequence_number[8];
+
+ XMEMSET(&sequence_number, 0, sizeof(sequence_number));
+
+ ExpectIntGE(ioBufLen, sizeof(*dtlsRH));
+ dtlsRH = (DtlsRecordLayerHeader*)ioBuf;
+ ExpectIntEQ(dtlsRH->type, handshake);
+ ExpectIntEQ(dtlsRH->pvMajor, DTLS_MAJOR);
+ ExpectIntEQ(dtlsRH->pvMinor, DTLSv1_2_MINOR);
+ sequence_number[7] = seq_num;
+ ExpectIntEQ(XMEMCMP(sequence_number, dtlsRH->sequence_number,
+ sizeof(sequence_number)), 0);
+
+ return EXPECT_RESULT();
+}
+#endif
+
+/*
+ * Make sure that we send the correct sequence number after a HelloVerifyRequest
+ * and after a HelloRetryRequest. This is testing the server side as it is
+ * operating statelessly and should copy the sequence number of the ClientHello.
+ */
+static int test_dtls_seq_num_downgrade(void)
+{
+ EXPECT_DECLS;
+#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && defined(WOLFSSL_DTLS) \
+ && !defined(WOLFSSL_NO_TLS12)
+ WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
+ WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
+ struct test_memio_ctx test_ctx;
+
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ wolfDTLSv1_2_client_method, wolfDTLS_server_method), 0);
+
+ /* CH1 */
+ ExpectIntEQ(wolfSSL_negotiate(ssl_c), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectIntEQ(test_dtls_seq_num_downgrade_check_num(test_ctx.s_buff,
+ test_ctx.s_len, 0), TEST_SUCCESS);
+ /* HVR */
+ ExpectIntEQ(wolfSSL_negotiate(ssl_s), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectIntEQ(test_dtls_seq_num_downgrade_check_num(test_ctx.c_buff,
+ test_ctx.c_len, 0), TEST_SUCCESS);
+ /* CH2 */
+ ExpectIntEQ(wolfSSL_negotiate(ssl_c), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectIntEQ(test_dtls_seq_num_downgrade_check_num(test_ctx.s_buff,
+ test_ctx.s_len, 1), TEST_SUCCESS);
+ /* Server first flight */
+ ExpectIntEQ(wolfSSL_negotiate(ssl_s), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectIntEQ(test_dtls_seq_num_downgrade_check_num(test_ctx.c_buff,
+ test_ctx.c_len, 1), TEST_SUCCESS);
+
+ ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
+
+ wolfSSL_free(ssl_c);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_s);
+#endif
+ return EXPECT_RESULT();
+}
+
/**
* Make sure we don't send RSA Signature Hash Algorithms in the
* CertificateRequest when we don't have any such ciphers set.
@@ -68688,102 +69909,162 @@ static int test_tls13_pq_groups(void)
return EXPECT_RESULT();
}
-static int test_dtls13_early_data(void)
+static int test_tls13_early_data(void)
{
EXPECT_DECLS;
-#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && defined(WOLFSSL_DTLS13) && \
+#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && \
defined(WOLFSSL_EARLY_DATA) && defined(HAVE_SESSION_TICKET)
- struct test_memio_ctx test_ctx;
- WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
- WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
- WOLFSSL_SESSION *sess = NULL;
int written = 0;
int read = 0;
+ size_t i;
+ int splitEarlyData;
char msg[] = "This is early data";
char msg2[] = "This is client data";
char msg3[] = "This is server data";
char msg4[] = "This is server immediate data";
char msgBuf[50];
+ struct {
+ method_provider client_meth;
+ method_provider server_meth;
+ const char* tls_version;
+ int isUdp;
+ } params[] = {
+#ifdef WOLFSSL_TLS13
+ { wolfTLSv1_3_client_method, wolfTLSv1_3_server_method,
+ "TLS 1.3", 0 },
+#endif
+#ifdef WOLFSSL_DTLS13
+ { wolfDTLSv1_3_client_method, wolfDTLSv1_3_server_method,
+ "DTLS 1.3", 1 },
+#endif
+ };
- XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+ for (i = 0; i < sizeof(params)/sizeof(*params) && !EXPECT_FAIL(); i++) {
+ for (splitEarlyData = 0; splitEarlyData < 2; splitEarlyData++) {
+ struct test_memio_ctx test_ctx;
+ WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
+ WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
+ WOLFSSL_SESSION *sess = NULL;
- ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
- wolfDTLSv1_3_client_method, wolfDTLSv1_3_server_method), 0);
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
- /* Get a ticket so that we can do 0-RTT on the next connection */
- ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
- ExpectNotNull(sess = wolfSSL_get1_session(ssl_c));
+ fprintf(stderr, "\tEarly data with %s\n", params[i].tls_version);
- wolfSSL_free(ssl_c);
- ssl_c = NULL;
- wolfSSL_free(ssl_s);
- ssl_s = NULL;
- XMEMSET(&test_ctx, 0, sizeof(test_ctx));
- ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
- wolfDTLSv1_3_client_method, wolfDTLSv1_3_server_method), 0);
- ExpectIntEQ(wolfSSL_set_session(ssl_c, sess), WOLFSSL_SUCCESS);
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c,
+ &ssl_s, params[i].client_meth, params[i].server_meth), 0);
+
+ /* Get a ticket so that we can do 0-RTT on the next connection */
+ ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
+ /* Make sure we read the ticket */
+ ExpectIntEQ(wolfSSL_read(ssl_c, msgBuf, sizeof(msgBuf)), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectNotNull(sess = wolfSSL_get1_session(ssl_c));
+
+ wolfSSL_free(ssl_c);
+ ssl_c = NULL;
+ wolfSSL_free(ssl_s);
+ ssl_s = NULL;
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ params[i].client_meth, params[i].server_meth), 0);
+ ExpectIntEQ(wolfSSL_set_session(ssl_c, sess), WOLFSSL_SUCCESS);
+#ifdef WOLFSSL_DTLS13
+ if (params[i].isUdp) {
#ifdef WOLFSSL_DTLS13_NO_HRR_ON_RESUME
- ExpectIntEQ(wolfSSL_dtls13_no_hrr_on_resume(ssl_s, 1), WOLFSSL_SUCCESS);
+ ExpectIntEQ(wolfSSL_dtls13_no_hrr_on_resume(ssl_s, 1), WOLFSSL_SUCCESS);
#else
- /* Let's test this but we generally don't recommend turning off the
- * cookie exchange */
- ExpectIntEQ(wolfSSL_disable_hrr_cookie(ssl_s), WOLFSSL_SUCCESS);
+ /* Let's test this but we generally don't recommend turning off the
+ * cookie exchange */
+ ExpectIntEQ(wolfSSL_disable_hrr_cookie(ssl_s), WOLFSSL_SUCCESS);
+#endif
+ }
#endif
- /* Test 0-RTT data */
- ExpectIntEQ(wolfSSL_write_early_data(ssl_c, msg, sizeof(msg),
- &written), sizeof(msg));
- ExpectIntEQ(written, sizeof(msg));
-
- ExpectIntEQ(wolfSSL_read_early_data(ssl_s, msgBuf, sizeof(msgBuf),
- &read), sizeof(msg));
- ExpectIntEQ(read, sizeof(msg));
- ExpectStrEQ(msg, msgBuf);
-
- /* Test 0.5-RTT data */
- ExpectIntEQ(wolfSSL_write(ssl_s, msg4, sizeof(msg4)), sizeof(msg4));
-
- ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
- ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), APP_DATA_READY);
-
- ExpectIntEQ(wolfSSL_read(ssl_c, msgBuf, sizeof(msgBuf)), sizeof(msg4));
- ExpectStrEQ(msg4, msgBuf);
-
- /* Complete handshake */
- ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
- ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
- /* Use wolfSSL_is_init_finished to check if handshake is complete. Normally
- * a user would loop until it is true but here we control both sides so we
- * just assert the expected value. wolfSSL_read_early_data does not provide
- * handshake status to us with non-blocking IO and we can't use
- * wolfSSL_accept as TLS layer may return ZERO_RETURN due to early data
- * parsing logic. */
- ExpectFalse(wolfSSL_is_init_finished(ssl_s));
- ExpectIntEQ(wolfSSL_read_early_data(ssl_s, msgBuf, sizeof(msgBuf),
- &read), -1);
- ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_READ);
+ /* Test 0-RTT data */
+ ExpectIntEQ(wolfSSL_write_early_data(ssl_c, msg, sizeof(msg),
+ &written), sizeof(msg));
+ ExpectIntEQ(written, sizeof(msg));
- ExpectIntEQ(wolfSSL_connect(ssl_c), WOLFSSL_SUCCESS);
+ if (splitEarlyData) {
+ ExpectIntEQ(wolfSSL_write_early_data(ssl_c, msg, sizeof(msg),
+ &written), sizeof(msg));
+ ExpectIntEQ(written, sizeof(msg));
+ }
- ExpectTrue(wolfSSL_is_init_finished(ssl_s));
+ /* Read first 0-RTT data (if split otherwise entire data) */
+ ExpectIntEQ(wolfSSL_read_early_data(ssl_s, msgBuf, sizeof(msgBuf),
+ &read), sizeof(msg));
+ ExpectIntEQ(read, sizeof(msg));
+ ExpectStrEQ(msg, msgBuf);
+
+ /* Test 0.5-RTT data */
+ ExpectIntEQ(wolfSSL_write(ssl_s, msg4, sizeof(msg4)), sizeof(msg4));
+
+ if (splitEarlyData) {
+ /* Read second 0-RTT data */
+ ExpectIntEQ(wolfSSL_read_early_data(ssl_s, msgBuf, sizeof(msgBuf),
+ &read), sizeof(msg));
+ ExpectIntEQ(read, sizeof(msg));
+ ExpectStrEQ(msg, msgBuf);
+ }
+ if (params[i].isUdp) {
+ ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), APP_DATA_READY);
+
+ /* Read server 0.5-RTT data */
+ ExpectIntEQ(wolfSSL_read(ssl_c, msgBuf, sizeof(msgBuf)), sizeof(msg4));
+ ExpectStrEQ(msg4, msgBuf);
+
+ /* Complete handshake */
+ ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+ /* Use wolfSSL_is_init_finished to check if handshake is complete. Normally
+ * a user would loop until it is true but here we control both sides so we
+ * just assert the expected value. wolfSSL_read_early_data does not provide
+ * handshake status to us with non-blocking IO and we can't use
+ * wolfSSL_accept as TLS layer may return ZERO_RETURN due to early data
+ * parsing logic. */
+ ExpectFalse(wolfSSL_is_init_finished(ssl_s));
+ ExpectIntEQ(wolfSSL_read_early_data(ssl_s, msgBuf, sizeof(msgBuf),
+ &read), 0);
+ ExpectIntEQ(read, 0);
+ ExpectTrue(wolfSSL_is_init_finished(ssl_s));
+
+ ExpectIntEQ(wolfSSL_connect(ssl_c), WOLFSSL_SUCCESS);
+ }
+ else {
+ ExpectIntEQ(wolfSSL_connect(ssl_c), WOLFSSL_SUCCESS);
- /* Test bi-directional write */
- ExpectIntEQ(wolfSSL_write(ssl_c, msg2, sizeof(msg2)), sizeof(msg2));
- ExpectIntEQ(wolfSSL_read(ssl_s, msgBuf, sizeof(msgBuf)), sizeof(msg2));
- ExpectStrEQ(msg2, msgBuf);
- ExpectIntEQ(wolfSSL_write(ssl_s, msg3, sizeof(msg3)), sizeof(msg3));
- ExpectIntEQ(wolfSSL_read(ssl_c, msgBuf, sizeof(msgBuf)), sizeof(msg3));
- ExpectStrEQ(msg3, msgBuf);
+ ExpectFalse(wolfSSL_is_init_finished(ssl_s));
+ ExpectIntEQ(wolfSSL_read_early_data(ssl_s, msgBuf, sizeof(msgBuf),
+ &read), 0);
+ ExpectIntEQ(read, 0);
+ ExpectTrue(wolfSSL_is_init_finished(ssl_s));
- ExpectTrue(wolfSSL_session_reused(ssl_c));
- ExpectTrue(wolfSSL_session_reused(ssl_s));
+ /* Read server 0.5-RTT data */
+ ExpectIntEQ(wolfSSL_read(ssl_c, msgBuf, sizeof(msgBuf)), sizeof(msg4));
+ ExpectStrEQ(msg4, msgBuf);
+ }
- wolfSSL_SESSION_free(sess);
- wolfSSL_free(ssl_c);
- wolfSSL_free(ssl_s);
- wolfSSL_CTX_free(ctx_c);
- wolfSSL_CTX_free(ctx_s);
+ /* Test bi-directional write */
+ ExpectIntEQ(wolfSSL_write(ssl_c, msg2, sizeof(msg2)), sizeof(msg2));
+ ExpectIntEQ(wolfSSL_read(ssl_s, msgBuf, sizeof(msgBuf)), sizeof(msg2));
+ ExpectStrEQ(msg2, msgBuf);
+ ExpectIntEQ(wolfSSL_write(ssl_s, msg3, sizeof(msg3)), sizeof(msg3));
+ ExpectIntEQ(wolfSSL_read(ssl_c, msgBuf, sizeof(msgBuf)), sizeof(msg3));
+ ExpectStrEQ(msg3, msgBuf);
+
+ ExpectTrue(wolfSSL_session_reused(ssl_c));
+ ExpectTrue(wolfSSL_session_reused(ssl_s));
+
+ wolfSSL_SESSION_free(sess);
+ wolfSSL_free(ssl_c);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_CTX_free(ctx_s);
+ }
+ }
#endif
return EXPECT_RESULT();
}
@@ -68884,6 +70165,624 @@ static int test_self_signed_stapling(void)
return EXPECT_RESULT();
}
+static int test_tls_multi_handshakes_one_record(void)
+{
+ EXPECT_DECLS;
+#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && !defined(WOLFSSL_NO_TLS12)
+ struct test_memio_ctx test_ctx;
+ WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
+ WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
+ RecordLayerHeader* rh = NULL;
+ byte *len ;
+ int newRecIdx = RECORD_HEADER_SZ;
+ int idx = 0;
+
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ wolfTLS_client_method, wolfTLSv1_2_server_method), 0);
+
+ ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectIntEQ(wolfSSL_accept(ssl_s), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_READ);
+
+ /* Combine server handshake msgs into one record */
+ while (idx < test_ctx.c_len) {
+ word16 recLen;
+
+ rh = (RecordLayerHeader*)(test_ctx.c_buff + idx);
+ len = &rh->length[0];
+
+ ato16((const byte*)len, &recLen);
+ idx += RECORD_HEADER_SZ;
+
+ XMEMMOVE(test_ctx.c_buff + newRecIdx, test_ctx.c_buff + idx,
+ (size_t)recLen);
+
+ newRecIdx += recLen;
+ idx += recLen;
+ }
+ rh = (RecordLayerHeader*)(test_ctx.c_buff);
+ len = &rh->length[0];
+ c16toa(newRecIdx - RECORD_HEADER_SZ, len);
+ test_ctx.c_len = newRecIdx;
+
+ ExpectIntEQ(wolfSSL_connect(ssl_c), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+
+ wolfSSL_free(ssl_c);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_CTX_free(ctx_s);
+#endif
+ return EXPECT_RESULT();
+}
+
+
+static int test_write_dup(void)
+{
+ EXPECT_DECLS;
+#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && defined(HAVE_WRITE_DUP)
+ size_t i, j;
+ char hiWorld[] = "dup message";
+ char readData[sizeof(hiWorld) + 5];
+ struct {
+ method_provider client_meth;
+ method_provider server_meth;
+ const char* version_name;
+ int version;
+ } methods[] = {
+#ifndef WOLFSSL_NO_TLS12
+ {wolfTLSv1_2_client_method, wolfTLSv1_2_server_method, "TLS 1.2", WOLFSSL_TLSV1_2},
+#endif
+#ifdef WOLFSSL_TLS13
+ {wolfTLSv1_3_client_method, wolfTLSv1_3_server_method, "TLS 1.3", WOLFSSL_TLSV1_3},
+#endif
+ };
+ struct {
+ const char* cipher;
+ int version;
+ } ciphers[] = {
+/* For simplicity the macros are copied from internal.h */
+/* TLS 1.2 */
+#if defined(HAVE_CHACHA) && defined(HAVE_POLY1305) && !defined(NO_SHA256)
+ #if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
+ #ifndef NO_RSA
+ {"ECDHE-RSA-CHACHA20-POLY1305", WOLFSSL_TLSV1_2},
+ #endif
+ #endif
+ #if !defined(NO_DH) && !defined(NO_RSA) && !defined(NO_TLS_DH)
+ {"DHE-RSA-CHACHA20-POLY1305", WOLFSSL_TLSV1_2},
+ #endif
+#endif
+#if !defined(NO_DH) && !defined(NO_AES) && !defined(NO_TLS) && \
+ !defined(NO_RSA) && defined(HAVE_AESGCM) && !defined(NO_TLS_DH)
+ #if !defined(NO_SHA256) && defined(WOLFSSL_AES_128)
+ {"DHE-RSA-AES128-GCM-SHA256", WOLFSSL_TLSV1_2},
+ #endif
+ #if defined(WOLFSSL_SHA384) && defined(WOLFSSL_AES_256)
+ {"DHE-RSA-AES256-GCM-SHA384", WOLFSSL_TLSV1_2},
+ #endif
+#endif
+#if (defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)) \
+ && !defined(NO_TLS) && !defined(NO_AES)
+ #ifdef HAVE_AESGCM
+ #if !defined(NO_SHA256) && defined(WOLFSSL_AES_128)
+ #ifndef NO_RSA
+ {"ECDHE-RSA-AES128-GCM-SHA256", WOLFSSL_TLSV1_2},
+ #endif
+ #endif
+ #if defined(WOLFSSL_SHA384) && defined(WOLFSSL_AES_256)
+ #ifndef NO_RSA
+ {"ECDHE-RSA-AES256-GCM-SHA384", WOLFSSL_TLSV1_2},
+ #endif
+ #endif
+ #endif
+#endif
+/* TLS 1.3 */
+#ifdef WOLFSSL_TLS13
+ #ifdef HAVE_AESGCM
+ #if !defined(NO_SHA256) && defined(WOLFSSL_AES_128)
+ {"TLS13-AES128-GCM-SHA256", WOLFSSL_TLSV1_3},
+ #endif
+ #if defined(WOLFSSL_SHA384) && defined(WOLFSSL_AES_256)
+ {"TLS13-AES256-GCM-SHA384", WOLFSSL_TLSV1_3},
+ #endif
+ #endif
+ #if defined(HAVE_CHACHA) && defined(HAVE_POLY1305)
+ #ifndef NO_SHA256
+ {"TLS13-CHACHA20-POLY1305-SHA256", WOLFSSL_TLSV1_3},
+ #endif
+ #endif
+ #ifdef HAVE_AESCCM
+ #if !defined(NO_SHA256) && defined(WOLFSSL_AES_128)
+ {"TLS13-AES128-CCM-SHA256", WOLFSSL_TLSV1_3},
+ #endif
+ #endif
+#endif
+ };
+
+ for (i = 0; i < XELEM_CNT(methods); i++) {
+ for (j = 0; j < XELEM_CNT(ciphers) && !EXPECT_FAIL(); j++) {
+ struct test_memio_ctx test_ctx;
+ WOLFSSL_CTX *ctx_c = NULL, *ctx_s = NULL;
+ WOLFSSL *ssl_c = NULL, *ssl_s = NULL;
+ WOLFSSL *ssl_c2 = NULL;
+
+ if (methods[i].version != ciphers[j].version)
+ continue;
+
+ if (i == 0 && j == 0)
+ printf("\n");
+
+ printf("Testing %s with %s... ", methods[i].version_name,
+ ciphers[j].cipher);
+
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+
+ test_ctx.c_ciphers = test_ctx.s_ciphers = ciphers[j].cipher;
+
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ methods[i].client_meth, methods[i].server_meth), 0);
+ ExpectIntEQ(test_memio_do_handshake(ssl_c, ssl_s, 10, NULL), 0);
+
+ ExpectNotNull(ssl_c2 = wolfSSL_write_dup(ssl_c));
+ ExpectIntEQ(wolfSSL_write(ssl_c, hiWorld, sizeof(hiWorld)),
+ WRITE_DUP_WRITE_E);
+ ExpectIntEQ(wolfSSL_write(ssl_c2, hiWorld, sizeof(hiWorld)),
+ sizeof(hiWorld));
+
+ ExpectIntEQ(wolfSSL_read(ssl_s, readData, sizeof(readData)),
+ sizeof(hiWorld));
+ ExpectIntEQ(wolfSSL_write(ssl_s, hiWorld, sizeof(hiWorld)),
+ sizeof(hiWorld));
+
+ ExpectIntEQ(wolfSSL_read(ssl_c2, readData, sizeof(readData)),
+ WRITE_DUP_READ_E);
+ ExpectIntEQ(wolfSSL_read(ssl_c, readData, sizeof(readData)),
+ sizeof(hiWorld));
+
+ if (EXPECT_SUCCESS())
+ printf("ok\n");
+ else
+ printf("failed\n");
+
+ wolfSSL_free(ssl_c);
+ wolfSSL_free(ssl_c2);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_CTX_free(ctx_s);
+ }
+ }
+#endif
+ return EXPECT_RESULT();
+}
+
+static int test_read_write_hs(void)
+{
+
+ EXPECT_DECLS;
+#if defined(HAVE_MANUAL_MEMIO_TESTS_DEPENDENCIES) && !defined(WOLFSSL_NO_TLS12)
+ WOLFSSL_CTX *ctx_s = NULL, *ctx_c = NULL;
+ WOLFSSL *ssl_s = NULL, *ssl_c = NULL;
+ struct test_memio_ctx test_ctx;
+ uint8_t test_buffer[16];
+ unsigned int test;
+
+ /* test == 0 : client writes, server reads */
+ /* test == 1 : server writes, client reads */
+ for (test = 0; test < 2; test++) {
+ XMEMSET(&test_ctx, 0, sizeof(test_ctx));
+ ExpectIntEQ(test_memio_setup(&test_ctx, &ctx_c, &ctx_s, &ssl_c, &ssl_s,
+ wolfTLSv1_2_client_method,
+ wolfTLSv1_2_server_method), 0);
+ ExpectIntEQ(wolfSSL_set_group_messages(ssl_s), WOLFSSL_SUCCESS);
+ /* CH -> */
+ if (test == 0) {
+ ExpectIntEQ(wolfSSL_write(ssl_c, "hello", 5), -1);
+ } else {
+ ExpectIntEQ(wolfSSL_read(ssl_c, test_buffer,
+ sizeof(test_buffer)), -1);
+ }
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+
+ /* <- SH + SKE + SHD */
+ if (test == 0) {
+ ExpectIntEQ(wolfSSL_read(ssl_s, test_buffer,
+ sizeof(test_buffer)), -1);
+ } else {
+ ExpectIntEQ(wolfSSL_write(ssl_s, "hello", 5), -1);
+ }
+ ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_READ);
+
+ /* -> CKE + CLIENT FINISHED */
+ if (test == 0) {
+ ExpectIntEQ(wolfSSL_write(ssl_c, "hello", 5), -1);
+ } else {
+ ExpectIntEQ(wolfSSL_read(ssl_c, test_buffer,
+ sizeof(test_buffer)), -1);
+ }
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+
+ /* abide clang static analyzer */
+ if (ssl_s != NULL) {
+ /* disable group message to separate sending of ChangeCipherspec
+ * from Finished */
+ ssl_s->options.groupMessages = 0;
+ }
+ /* allow writing of CS, but not FINISHED */
+ test_ctx.c_len = TEST_MEMIO_BUF_SZ - 6;
+
+ /* <- CS */
+ if (test == 0) {
+ ExpectIntEQ(wolfSSL_read(ssl_s, test_buffer,
+ sizeof(test_buffer)), -1);
+ } else {
+ ExpectIntEQ(wolfSSL_write(ssl_s, "hello", 5), -1);
+ }
+ ExpectIntEQ(wolfSSL_get_error(ssl_s, -1), WOLFSSL_ERROR_WANT_WRITE);
+
+ /* move CS message where the client can read it */
+ memmove(test_ctx.c_buff,
+ (test_ctx.c_buff + TEST_MEMIO_BUF_SZ - 6), 6);
+ test_ctx.c_len = 6;
+ /* read CS */
+ if (test == 0) {
+ ExpectIntEQ(wolfSSL_write(ssl_c, "hello", 5), -1);
+ } else {
+ ExpectIntEQ(wolfSSL_read(ssl_c, test_buffer,
+ sizeof(test_buffer)), -1);
+ }
+ ExpectIntEQ(wolfSSL_get_error(ssl_c, -1), WOLFSSL_ERROR_WANT_READ);
+ ExpectIntEQ(test_ctx.c_len, 0);
+
+ if (test == 0) {
+ /* send SERVER FINISHED */
+ ExpectIntEQ(wolfSSL_read(ssl_s, test_buffer,
+ sizeof(test_buffer)), -1);
+ ExpectIntEQ(wolfSSL_get_error(ssl_s, -1),
+ WOLFSSL_ERROR_WANT_READ);
+ } else {
+ /* send SERVER FINISHED + App Data */
+ ExpectIntEQ(wolfSSL_write(ssl_s, "hello", 5), 5);
+ }
+
+ ExpectIntGT(test_ctx.c_len, 0);
+
+ /* Send and receive the data */
+ if (test == 0) {
+ ExpectIntEQ(wolfSSL_write(ssl_c, "hello", 5), 5);
+ ExpectIntEQ(wolfSSL_read(ssl_s, test_buffer,
+ sizeof(test_buffer)), 5);
+ } else {
+ ExpectIntEQ(wolfSSL_read(ssl_c, test_buffer,
+ sizeof(test_buffer)), 5);
+ }
+
+ ExpectBufEQ(test_buffer, "hello", 5);
+
+ wolfSSL_free(ssl_c);
+ wolfSSL_free(ssl_s);
+ wolfSSL_CTX_free(ctx_c);
+ wolfSSL_CTX_free(ctx_s);
+ ssl_c = ssl_s = NULL;
+ ctx_c = ctx_s = NULL;
+ }
+
+#endif
+ return EXPECT_RESULT();
+}
+
+#if defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && defined(OPENSSL_EXTRA)
+static const char* test_get_signature_nid_siglag;
+static int test_get_signature_nid_sig;
+static int test_get_signature_nid_hash;
+
+static int test_get_signature_nid_ssl_ready(WOLFSSL* ssl)
+{
+ EXPECT_DECLS;
+ ExpectIntEQ(wolfSSL_set_cipher_list(ssl, "ALL"), WOLFSSL_SUCCESS);
+ if (!wolfSSL_is_server(ssl)) {
+ ExpectIntEQ(wolfSSL_set1_sigalgs_list(ssl,
+ test_get_signature_nid_siglag), WOLFSSL_SUCCESS);
+ }
+ return EXPECT_RESULT();
+}
+
+static int test_get_signature_nid_on_hs_client(WOLFSSL_CTX **ctx, WOLFSSL **ssl)
+{
+ EXPECT_DECLS;
+ int nid = 0;
+ (void)ctx;
+ if (XSTRSTR(wolfSSL_get_cipher(*ssl), "TLS_RSA_") == NULL) {
+ ExpectIntEQ(SSL_get_peer_signature_type_nid(*ssl, &nid), WOLFSSL_SUCCESS);
+ ExpectIntEQ(nid, test_get_signature_nid_sig);
+ ExpectIntEQ(SSL_get_peer_signature_nid(*ssl, &nid), WOLFSSL_SUCCESS);
+ ExpectIntEQ(nid, test_get_signature_nid_hash);
+ }
+ else /* No sigalg info on static ciphersuite */
+ return TEST_SUCCESS;
+ return EXPECT_RESULT();
+}
+
+static int test_get_signature_nid_on_hs_server(WOLFSSL_CTX **ctx, WOLFSSL **ssl)
+{
+ EXPECT_DECLS;
+ int nid = 0;
+ (void)ctx;
+ ExpectIntEQ(SSL_get_signature_type_nid(*ssl, &nid), WOLFSSL_SUCCESS);
+ ExpectIntEQ(nid, test_get_signature_nid_sig);
+ ExpectIntEQ(SSL_get_signature_nid(*ssl, &nid), WOLFSSL_SUCCESS);
+ ExpectIntEQ(nid, test_get_signature_nid_hash);
+ return EXPECT_RESULT();
+}
+#endif
+
+static int test_get_signature_nid(void)
+{
+ EXPECT_DECLS;
+#if defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES) && defined(OPENSSL_EXTRA)
+ test_ssl_cbf client_cbf;
+ test_ssl_cbf server_cbf;
+ size_t i;
+#define TGSN_TLS12_RSA(sigalg, sig_nid, hash_nid) \
+ { sigalg, sig_nid, hash_nid, WOLFSSL_TLSV1_2, svrCertFile, svrKeyFile, \
+ caCertFile }
+#define TGSN_TLS12_ECDSA(sigalg, sig_nid, hash_nid) \
+ { sigalg, sig_nid, hash_nid, WOLFSSL_TLSV1_2, eccCertFile, eccKeyFile, \
+ caEccCertFile }
+#define TGSN_TLS13_RSA(sigalg, sig_nid, hash_nid) \
+ { sigalg, sig_nid, hash_nid, WOLFSSL_TLSV1_3, svrCertFile, svrKeyFile, \
+ caCertFile }
+#define TGSN_TLS13_ECDSA(sigalg, sig_nid, hash_nid) \
+ { sigalg, sig_nid, hash_nid, WOLFSSL_TLSV1_3, eccCertFile, eccKeyFile, \
+ caEccCertFile }
+#define TGSN_TLS13_ED25519(sigalg, sig_nid, hash_nid) \
+ { sigalg, sig_nid, hash_nid, WOLFSSL_TLSV1_3, edCertFile, edKeyFile, \
+ caEdCertFile }
+#define TGSN_TLS13_ED448(sigalg, sig_nid, hash_nid) \
+ { sigalg, sig_nid, hash_nid, WOLFSSL_TLSV1_3, ed448CertFile, ed448KeyFile, \
+ caEd448CertFile }
+ struct {
+ const char* siglag;
+ int sig_nid;
+ int hash_nid;
+ int tls_ver;
+ const char* server_cert;
+ const char* server_key;
+ const char* client_ca;
+ } params[] = {
+#ifndef NO_RSA
+ #ifndef NO_SHA256
+ TGSN_TLS12_RSA("RSA+SHA256", NID_rsaEncryption, NID_sha256),
+ #ifdef WC_RSA_PSS
+ TGSN_TLS12_RSA("RSA-PSS+SHA256", NID_rsassaPss, NID_sha256),
+ TGSN_TLS13_RSA("RSA-PSS+SHA256", NID_rsassaPss, NID_sha256),
+ #endif
+ #endif
+ #ifdef WOLFSSL_SHA512
+ TGSN_TLS12_RSA("RSA+SHA512", NID_rsaEncryption, NID_sha512),
+ #ifdef WC_RSA_PSS
+ TGSN_TLS12_RSA("RSA-PSS+SHA512", NID_rsassaPss, NID_sha512),
+ TGSN_TLS13_RSA("RSA-PSS+SHA512", NID_rsassaPss, NID_sha512),
+ #endif
+ #endif
+#endif
+#ifdef HAVE_ECC
+ #ifndef NO_SHA256
+ TGSN_TLS12_ECDSA("ECDSA+SHA256", NID_X9_62_id_ecPublicKey, NID_sha256),
+ TGSN_TLS13_ECDSA("ECDSA+SHA256", NID_X9_62_id_ecPublicKey, NID_sha256),
+ #endif
+#endif
+#ifdef HAVE_ED25519
+ TGSN_TLS13_ED25519("ED25519", NID_ED25519, NID_sha512),
+#endif
+#ifdef HAVE_ED448
+ TGSN_TLS13_ED448("ED448", NID_ED448, NID_sha512),
+#endif
+ };
+
+ printf("\n");
+
+ for (i = 0; i < XELEM_CNT(params) && !EXPECT_FAIL(); i++) {
+
+ XMEMSET(&client_cbf, 0, sizeof(client_cbf));
+ XMEMSET(&server_cbf, 0, sizeof(server_cbf));
+
+ printf("Testing %s with %s...", tls_desc[params[i].tls_ver],
+ params[i].siglag);
+
+ switch (params[i].tls_ver) {
+#ifndef WOLFSSL_NO_TLS12
+ case WOLFSSL_TLSV1_2:
+ client_cbf.method = wolfTLSv1_2_client_method;
+ server_cbf.method = wolfTLSv1_2_server_method;
+ break;
+#endif
+#ifdef WOLFSSL_TLS13
+ case WOLFSSL_TLSV1_3:
+ client_cbf.method = wolfTLSv1_3_client_method;
+ server_cbf.method = wolfTLSv1_3_server_method;
+ break;
+#endif
+ default:
+ printf("skipping\n");
+ continue;
+ }
+
+ test_get_signature_nid_siglag = params[i].siglag;
+ test_get_signature_nid_sig = params[i].sig_nid;
+ test_get_signature_nid_hash = params[i].hash_nid;
+
+ client_cbf.ssl_ready = test_get_signature_nid_ssl_ready;
+ server_cbf.ssl_ready = test_get_signature_nid_ssl_ready;
+
+ client_cbf.on_handshake = test_get_signature_nid_on_hs_client;
+ server_cbf.on_handshake = test_get_signature_nid_on_hs_server;
+
+ server_cbf.certPemFile = params[i].server_cert;
+ server_cbf.keyPemFile = params[i].server_key;
+
+ client_cbf.caPemFile = params[i].client_ca;
+
+ ExpectIntEQ(test_wolfSSL_client_server_nofail_memio(&client_cbf,
+ &server_cbf, NULL), TEST_SUCCESS);
+ if (EXPECT_SUCCESS())
+ printf("passed\n");
+ }
+
+#endif
+ return EXPECT_RESULT();
+}
+
+#if !defined(NO_CERTS) && defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES)
+static word32 test_tls_cert_store_unchanged_HashCaTable(Signer** caTable)
+{
+#ifndef NO_MD5
+ enum wc_HashType hashType = WC_HASH_TYPE_MD5;
+#elif !defined(NO_SHA)
+ enum wc_HashType hashType = WC_HASH_TYPE_SHA;
+#elif !defined(NO_SHA256)
+ enum wc_HashType hashType = WC_HASH_TYPE_SHA256;
+#else
+ #error "We need a digest to hash the Signer object"
+#endif
+ byte hashBuf[WC_MAX_DIGEST_SIZE];
+ wc_HashAlg hash;
+ size_t i;
+
+ AssertIntEQ(wc_HashInit(&hash, hashType), 0);
+ for (i = 0; i < CA_TABLE_SIZE; i++) {
+ Signer* cur;
+ for (cur = caTable[i]; cur != NULL; cur = cur->next)
+ AssertIntEQ(wc_HashUpdate(&hash, hashType, (byte*)cur,
+ sizeof(*cur)), 0);
+ }
+ AssertIntEQ(wc_HashFinal(&hash, hashType, hashBuf), 0);
+ AssertIntEQ(wc_HashFree(&hash, hashType), 0);
+
+ return MakeWordFromHash(hashBuf);
+}
+
+static word32 test_tls_cert_store_unchanged_before_hashes[2];
+static size_t test_tls_cert_store_unchanged_before_hashes_idx;
+static word32 test_tls_cert_store_unchanged_after_hashes[2];
+static size_t test_tls_cert_store_unchanged_after_hashes_idx;
+
+static int test_tls_cert_store_unchanged_ctx_ready(WOLFSSL_CTX* ctx)
+{
+ EXPECT_DECLS;
+
+ ExpectIntNE(test_tls_cert_store_unchanged_before_hashes
+ [test_tls_cert_store_unchanged_before_hashes_idx++] =
+ test_tls_cert_store_unchanged_HashCaTable(ctx->cm->caTable), 0);
+
+ wolfSSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER |
+ WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0);
+
+ return EXPECT_RESULT();
+}
+
+static int test_tls_cert_store_unchanged_ctx_cleanup(WOLFSSL_CTX* ctx)
+{
+ EXPECT_DECLS;
+ ExpectIntEQ(wolfSSL_CTX_UnloadIntermediateCerts(ctx), WOLFSSL_SUCCESS);
+ ExpectIntNE(test_tls_cert_store_unchanged_after_hashes
+ [test_tls_cert_store_unchanged_after_hashes_idx++] =
+ test_tls_cert_store_unchanged_HashCaTable(ctx->cm->caTable), 0);
+
+ return EXPECT_RESULT();
+}
+
+static int test_tls_cert_store_unchanged_on_hs(WOLFSSL_CTX **ctx, WOLFSSL **ssl)
+{
+ EXPECT_DECLS;
+ WOLFSSL_CERT_MANAGER* cm;
+
+ (void)ssl;
+ /* WARNING: this approach bypasses the reference counter check in
+ * wolfSSL_CTX_UnloadIntermediateCerts. It is not recommended as it may
+ * cause unexpected behaviour when other active connections try accessing
+ * the caTable. */
+ ExpectNotNull(cm = wolfSSL_CTX_GetCertManager(*ctx));
+ ExpectIntEQ(wolfSSL_CertManagerUnloadIntermediateCerts(cm),
+ WOLFSSL_SUCCESS);
+ ExpectIntNE(test_tls_cert_store_unchanged_after_hashes
+ [test_tls_cert_store_unchanged_after_hashes_idx++] =
+ test_tls_cert_store_unchanged_HashCaTable((*ctx)->cm->caTable), 0);
+
+ return EXPECT_RESULT();
+}
+
+static int test_tls_cert_store_unchanged_ssl_ready(WOLFSSL* ssl)
+{
+ EXPECT_DECLS;
+ WOLFSSL_CTX* ctx;
+
+ ExpectNotNull(ctx = wolfSSL_get_SSL_CTX(ssl));
+
+ return EXPECT_RESULT();
+}
+#endif
+
+static int test_tls_cert_store_unchanged(void)
+{
+ EXPECT_DECLS;
+#if !defined(NO_CERTS) && defined(HAVE_SSL_MEMIO_TESTS_DEPENDENCIES)
+ test_ssl_cbf client_cbf;
+ test_ssl_cbf server_cbf;
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ XMEMSET(&client_cbf, 0, sizeof(client_cbf));
+ XMEMSET(&server_cbf, 0, sizeof(server_cbf));
+
+ test_tls_cert_store_unchanged_before_hashes_idx = 0;
+ XMEMSET(test_tls_cert_store_unchanged_before_hashes, 0,
+ sizeof(test_tls_cert_store_unchanged_before_hashes));
+ test_tls_cert_store_unchanged_after_hashes_idx = 0;
+ XMEMSET(test_tls_cert_store_unchanged_after_hashes, 0,
+ sizeof(test_tls_cert_store_unchanged_after_hashes));
+
+ client_cbf.ctx_ready = test_tls_cert_store_unchanged_ctx_ready;
+ server_cbf.ctx_ready = test_tls_cert_store_unchanged_ctx_ready;
+
+ client_cbf.ssl_ready = test_tls_cert_store_unchanged_ssl_ready;
+ server_cbf.ssl_ready = test_tls_cert_store_unchanged_ssl_ready;
+
+ switch (i) {
+ case 0:
+ client_cbf.on_ctx_cleanup =
+ test_tls_cert_store_unchanged_ctx_cleanup;
+ server_cbf.on_ctx_cleanup =
+ test_tls_cert_store_unchanged_ctx_cleanup;
+ break;
+ case 1:
+ client_cbf.on_handshake = test_tls_cert_store_unchanged_on_hs;
+ server_cbf.on_handshake = test_tls_cert_store_unchanged_on_hs;
+ break;
+ default:
+ Fail(("Should not enter here"), ("Entered here"));
+ }
+
+
+ client_cbf.certPemFile = "certs/intermediate/client-chain.pem";
+ server_cbf.certPemFile = "certs/intermediate/server-chain.pem";
+
+ server_cbf.caPemFile = caCertFile;
+
+ ExpectIntEQ(test_wolfSSL_client_server_nofail_memio(&client_cbf,
+ &server_cbf, NULL), TEST_SUCCESS);
+
+ ExpectBufEQ(test_tls_cert_store_unchanged_before_hashes,
+ test_tls_cert_store_unchanged_after_hashes,
+ sizeof(test_tls_cert_store_unchanged_after_hashes));
+ }
+#endif
+ return EXPECT_RESULT();
+}
+
/*----------------------------------------------------------------------------*
| Main
*----------------------------------------------------------------------------*/
@@ -69307,6 +71206,8 @@ TEST_CASE testCases[] = {
TEST_DECL(test_wolfSSL_Init),
+ TEST_DECL(test_dual_alg_support),
+
/*********************************
* OpenSSL compatibility API tests
*********************************/
@@ -69363,6 +71264,7 @@ TEST_CASE testCases[] = {
TEST_DECL(test_wolfSSL_PEM_file_RSAPrivateKey),
#ifndef NO_BIO
TEST_DECL(test_wolfSSL_BIO),
+ TEST_DECL(test_wolfSSL_BIO_BIO_ring_read),
TEST_DECL(test_wolfSSL_PEM_read_bio),
TEST_DECL(test_wolfSSL_PEM_bio_RSAKey),
TEST_DECL(test_wolfSSL_PEM_bio_DSAKey),
@@ -70155,6 +72057,7 @@ TEST_CASE testCases[] = {
TEST_DECL(test_extra_alerts_wrong_cs),
TEST_DECL(test_extra_alerts_skip_hs),
TEST_DECL(test_extra_alerts_bad_psk),
+ TEST_DECL(test_tls13_bad_psk_binder),
/* Can't memory test as client/server Asserts. */
TEST_DECL(test_harden_no_secure_renegotiation),
TEST_DECL(test_override_alt_cert_chain),
@@ -70177,13 +72080,19 @@ TEST_CASE testCases[] = {
TEST_DECL(test_dtls_client_hello_timeout_downgrade),
TEST_DECL(test_dtls_client_hello_timeout),
TEST_DECL(test_dtls_dropped_ccs),
+ TEST_DECL(test_dtls_seq_num_downgrade),
TEST_DECL(test_certreq_sighash_algos),
TEST_DECL(test_revoked_loaded_int_cert),
TEST_DECL(test_dtls_frag_ch),
TEST_DECL(test_dtls13_frag_ch_pq),
TEST_DECL(test_dtls_empty_keyshare_with_cookie),
TEST_DECL(test_tls13_pq_groups),
- TEST_DECL(test_dtls13_early_data),
+ TEST_DECL(test_tls13_early_data),
+ TEST_DECL(test_tls_multi_handshakes_one_record),
+ TEST_DECL(test_write_dup),
+ TEST_DECL(test_read_write_hs),
+ TEST_DECL(test_get_signature_nid),
+ TEST_DECL(test_tls_cert_store_unchanged),
/* This test needs to stay at the end to clean up any caches allocated. */
TEST_DECL(test_wolfSSL_Cleanup)
};
diff --git a/extra/wolfssl/wolfssl/tests/srp.c b/extra/wolfssl/wolfssl/tests/srp.c
index ef6aaad6..a890f3cc 100644
--- a/extra/wolfssl/wolfssl/tests/srp.c
+++ b/extra/wolfssl/wolfssl/tests/srp.c
@@ -128,9 +128,11 @@ static void test_SrpInit(void)
/* invalid params */
AssertIntEQ(BAD_FUNC_ARG, wc_SrpInit(NULL, SRP_TYPE_TEST_DEFAULT,
SRP_CLIENT_SIDE));
+ /* // NOLINTBEGIN(clang-analyzer-optin.core.EnumCastOutOfRange) */
AssertIntEQ(BAD_FUNC_ARG, wc_SrpInit(&srp, (SrpType)255, SRP_CLIENT_SIDE));
AssertIntEQ(BAD_FUNC_ARG, wc_SrpInit(&srp, SRP_TYPE_TEST_DEFAULT,
(SrpSide)255));
+ /* // NOLINTEND(clang-analyzer-optin.core.EnumCastOutOfRange) */
/* success */
AssertIntEQ(0, wc_SrpInit(&srp, SRP_TYPE_TEST_DEFAULT, SRP_CLIENT_SIDE));
diff --git a/extra/wolfssl/wolfssl/tests/suites.c b/extra/wolfssl/wolfssl/tests/suites.c
index 76aa4131..e95ff933 100644
--- a/extra/wolfssl/wolfssl/tests/suites.c
+++ b/extra/wolfssl/wolfssl/tests/suites.c
@@ -1455,8 +1455,8 @@ exit:
return args.return_code;
#else
- return NOT_COMPILED_IN;
(void)argc;
(void)argv;
+ return NOT_COMPILED_IN;
#endif /* !NO_WOLFSSL_SERVER && !NO_WOLFSSL_CLIENT */
}
diff --git a/extra/wolfssl/wolfssl/tests/test-dtls.conf b/extra/wolfssl/wolfssl/tests/test-dtls.conf
index 42f0f63c..bb055c36 100644
--- a/extra/wolfssl/wolfssl/tests/test-dtls.conf
+++ b/extra/wolfssl/wolfssl/tests/test-dtls.conf
@@ -55,6 +55,20 @@
-s
-l ECDHE-PSK-CHACHA20-POLY1305
+# server TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
+-u
+-v 3
+-s
+-t
+-l ECDHE-PSK-CHACHA20-POLY1305
+
+# client TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
+-u
+-v 3
+-s
+-t
+-l ECDHE-PSK-CHACHA20-POLY1305
+
# server TLSv1.2 PSK-CHACHA20-POLY1305
-u
-v 3
diff --git a/extra/wolfssl/wolfssl/tests/test.conf b/extra/wolfssl/wolfssl/tests/test.conf
index 099ef470..73d40f00 100644
--- a/extra/wolfssl/wolfssl/tests/test.conf
+++ b/extra/wolfssl/wolfssl/tests/test.conf
@@ -45,6 +45,18 @@
-s
-l ECDHE-PSK-CHACHA20-POLY1305
+# server TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
+-v 3
+-s
+-t
+-l ECDHE-PSK-CHACHA20-POLY1305
+
+# client TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305 x25519
+-v 3
+-s
+-t
+-l ECDHE-PSK-CHACHA20-POLY1305
+
# server TLSv1.2 PSK-CHACHA20-POLY1305
-v 3
-s
diff --git a/extra/wolfssl/wolfssl/tests/unit.h b/extra/wolfssl/wolfssl/tests/unit.h
index 185fc22d..061e84d8 100644
--- a/extra/wolfssl/wolfssl/tests/unit.h
+++ b/extra/wolfssl/wolfssl/tests/unit.h
@@ -217,7 +217,8 @@
int _z = (int)(z); \
int _w = ((_x) && (_y)) ? XMEMCMP(_x, _y, _z) : -1; \
Expect(_w op 0, ("%s " #op " %s for %s", #x, #y, #z), \
- ("\"%p\" " #er " \"%p\" for \"%d\"", _x, _y, _z));\
+ ("\"%p\" " #er " \"%p\" for \"%d\"", \
+ (const void *)_x, (const void *)_y, _z)); \
} \
} while(0)
diff --git a/extra/wolfssl/wolfssl/tests/utils.h b/extra/wolfssl/wolfssl/tests/utils.h
index 46b16e2c..cf57e336 100644
--- a/extra/wolfssl/wolfssl/tests/utils.h
+++ b/extra/wolfssl/wolfssl/tests/utils.h
@@ -111,6 +111,13 @@ cleanup:
XFCLOSE(outFile);
return ret;
}
+
+#if defined(__MACH__) || defined(__FreeBSD__)
+int link_file(const char* in, const char* out)
+{
+ return link(in, out);
+}
+#endif
#endif /* !NO_FILESYSTEM */
#if !defined(NO_FILESYSTEM) && !defined(NO_CERTS) && !defined(NO_RSA) && \
@@ -148,6 +155,12 @@ int test_memio_do_handshake(WOLFSSL *ssl_c, WOLFSSL *ssl_s,
int test_memio_setup(struct test_memio_ctx *ctx,
WOLFSSL_CTX **ctx_c, WOLFSSL_CTX **ctx_s, WOLFSSL **ssl_c, WOLFSSL **ssl_s,
method_provider method_c, method_provider method_s);
+int test_memio_setup_ex(struct test_memio_ctx *ctx,
+ WOLFSSL_CTX **ctx_c, WOLFSSL_CTX **ctx_s, WOLFSSL **ssl_c, WOLFSSL **ssl_s,
+ method_provider method_c, method_provider method_s,
+ byte *caCert, int caCertSz, byte *serverCert, int serverCertSz,
+ byte *serverKey, int serverKeySz);
+
static WC_INLINE int test_memio_write_cb(WOLFSSL *ssl, char *data, int sz,
void *ctx)
@@ -266,18 +279,32 @@ int test_memio_do_handshake(WOLFSSL *ssl_c, WOLFSSL *ssl_s,
return 0;
}
-int test_memio_setup(struct test_memio_ctx *ctx,
+int test_memio_setup_ex(struct test_memio_ctx *ctx,
WOLFSSL_CTX **ctx_c, WOLFSSL_CTX **ctx_s, WOLFSSL **ssl_c, WOLFSSL **ssl_s,
- method_provider method_c, method_provider method_s)
+ method_provider method_c, method_provider method_s,
+ byte *caCert, int caCertSz, byte *serverCert, int serverCertSz,
+ byte *serverKey, int serverKeySz)
{
int ret;
+ (void)caCert;
+ (void)caCertSz;
+ (void)serverCert;
+ (void)serverCertSz;
+ (void)serverKey;
+ (void)serverKeySz;
if (ctx_c != NULL && *ctx_c == NULL) {
*ctx_c = wolfSSL_CTX_new(method_c());
if (*ctx_c == NULL)
return -1;
#ifndef NO_CERTS
- ret = wolfSSL_CTX_load_verify_locations(*ctx_c, caCertFile, 0);
+ if (caCert == NULL) {
+ ret = wolfSSL_CTX_load_verify_locations(*ctx_c, caCertFile, 0);
+ }
+ else {
+ ret = wolfSSL_CTX_load_verify_buffer(*ctx_c, caCert, (long)caCertSz,
+ WOLFSSL_FILETYPE_ASN1);
+ }
if (ret != WOLFSSL_SUCCESS)
return -1;
#endif /* NO_CERTS */
@@ -295,15 +322,28 @@ int test_memio_setup(struct test_memio_ctx *ctx,
if (*ctx_s == NULL)
return -1;
#ifndef NO_CERTS
- ret = wolfSSL_CTX_use_PrivateKey_file(*ctx_s, svrKeyFile,
- WOLFSSL_FILETYPE_PEM);
+ if (serverKey == NULL) {
+ ret = wolfSSL_CTX_use_PrivateKey_file(*ctx_s, svrKeyFile,
+ WOLFSSL_FILETYPE_PEM);
+ }
+ else {
+ ret = wolfSSL_CTX_use_PrivateKey_buffer(*ctx_s, serverKey,
+ (long)serverKeySz, WOLFSSL_FILETYPE_ASN1);
+ }
if (ret != WOLFSSL_SUCCESS)
return- -1;
- ret = wolfSSL_CTX_use_certificate_file(*ctx_s, svrCertFile,
- WOLFSSL_FILETYPE_PEM);
+
+ if (serverCert == NULL) {
+ ret = wolfSSL_CTX_use_certificate_file(*ctx_s, svrCertFile,
+ WOLFSSL_FILETYPE_PEM);
+ }
+ else {
+ ret = wolfSSL_CTX_use_certificate_chain_buffer_format(*ctx_s,
+ serverCert, (long)serverCertSz, WOLFSSL_FILETYPE_ASN1);
+ }
if (ret != WOLFSSL_SUCCESS)
return -1;
-#endif
+#endif /* NO_CERTS */
wolfSSL_SetIORecv(*ctx_s, test_memio_read_cb);
wolfSSL_SetIOSend(*ctx_s, test_memio_write_cb);
if (ctx->s_ciphers != NULL) {
@@ -333,6 +373,14 @@ int test_memio_setup(struct test_memio_ctx *ctx,
return 0;
}
+
+int test_memio_setup(struct test_memio_ctx *ctx,
+ WOLFSSL_CTX **ctx_c, WOLFSSL_CTX **ctx_s, WOLFSSL **ssl_c, WOLFSSL **ssl_s,
+ method_provider method_c, method_provider method_s)
+{
+ return test_memio_setup_ex(ctx, ctx_c, ctx_s, ssl_c, ssl_s, method_c,
+ method_s, NULL, 0, NULL, 0, NULL, 0);
+}
#endif
#if !defined(SINGLE_THREADED) && defined(WOLFSSL_COND)
@@ -383,3 +431,9 @@ void join_thread(THREAD_TYPE thread)
THREAD_CHECK_RET(wolfSSL_JoinThread(thread));
}
#endif /* SINGLE_THREADED */
+
+/* These correspond to WOLFSSL_SSLV3...WOLFSSL_DTLSV1_3 */
+const char* tls_desc[] = {
+ "SSLv3", "TLSv1.0", "TLSv1.1", "TLSv1.2", "TLSv1.3",
+ "DTLSv1.0", "DTLSv1.2", "DTLSv1.3"
+};
diff --git a/extra/wolfssl/wolfssl/testsuite/testsuite.c b/extra/wolfssl/wolfssl/testsuite/testsuite.c
index 753077aa..70aecb88 100644
--- a/extra/wolfssl/wolfssl/testsuite/testsuite.c
+++ b/extra/wolfssl/wolfssl/testsuite/testsuite.c
@@ -327,7 +327,7 @@ static int test_crl_monitor(void)
if (i % 2 == 0) {
/* succeed on even rounds */
sprintf(buf, "%s/%s", tmpDir, "crl.pem");
- if (copy_file("certs/crl/crl.pem", buf) != 0) {
+ if (STAGE_FILE("certs/crl/crl.pem", buf) != 0) {
fprintf(stderr, "[%d] Failed to copy file to %s\n", i, buf);
goto cleanup;
}
@@ -350,7 +350,7 @@ static int test_crl_monitor(void)
else {
/* fail on odd rounds */
sprintf(buf, "%s/%s", tmpDir, "crl.revoked");
- if (copy_file("certs/crl/crl.revoked", buf) != 0) {
+ if (STAGE_FILE("certs/crl/crl.revoked", buf) != 0) {
fprintf(stderr, "[%d] Failed to copy file to %s\n", i, buf);
goto cleanup;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.c b/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.c
index 49803d6d..2f51aeff 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.c
@@ -55,7 +55,6 @@
*
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -68,6 +67,8 @@
/* Macro to disable benchmark */
#ifndef NO_CRYPT_BENCHMARK
+#define WC_ALLOC_DO_ON_FAILURE() do { printf("out of memory at benchmark.c L %d\n", __LINE__); ret = MEMORY_E; goto exit; } while (0)
+
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/wc_port.h>
#include <wolfssl/wolfcrypt/wolfmath.h>
@@ -77,6 +78,11 @@
#include <wolfssl/wolfcrypt/asn.h>
#include <wolfssl/version.h>
+#ifdef WOLFSSL_LINUXKM
+ /* remap current_time() -- collides with a function in kernel linux/fs.h */
+ #define current_time benchmark_current_time
+#endif /* WOLFSSL_LINUXKM */
+
#ifdef HAVE_CHACHA
#include <wolfssl/wolfcrypt/chacha.h>
#endif
@@ -172,12 +178,16 @@
#include <wolfssl/wolfcrypt/lms.h>
#ifdef HAVE_LIBLMS
#include <wolfssl/wolfcrypt/ext_lms.h>
+ #else
+ #include <wolfssl/wolfcrypt/wc_lms.h>
#endif
#endif
#if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY)
#include <wolfssl/wolfcrypt/xmss.h>
#ifdef HAVE_LIBXMSS
#include <wolfssl/wolfcrypt/ext_xmss.h>
+ #else
+ #include <wolfssl/wolfcrypt/wc_xmss.h>
#endif
#endif
#ifdef WOLFCRYPT_HAVE_ECCSI
@@ -222,7 +232,6 @@
#include "wolfcrypt/benchmark/benchmark.h"
#endif
-
/* define the max length for each string of metric reported */
#ifndef WC_BENCH_MAX_LINE_LEN
#define WC_BENCH_MAX_LINE_LEN 150
@@ -465,7 +474,7 @@
#include <stdlib.h> /* we're using malloc / free direct here */
#endif
- #ifndef STRING_USER
+ #if !defined(STRING_USER) && !defined(NO_STDIO_FILESYSTEM)
#include <string.h>
#include <stdio.h>
#endif
@@ -662,7 +671,21 @@
/* Post-Quantum Stateful Hash-Based sig algorithms. */
#define BENCH_LMS_HSS 0x00000001
-#define BENCH_XMSS_XMSSMT 0x00000002
+#define BENCH_XMSS_XMSSMT_SHA256 0x00000002
+#define BENCH_XMSS_XMSSMT_SHA512 0x00000004
+#define BENCH_XMSS_XMSSMT_SHAKE128 0x00000008
+#define BENCH_XMSS_XMSSMT_SHAKE256 0x00000010
+#ifndef NO_SHA256
+#define BENCH_XMSS_XMSSMT BENCH_XMSS_XMSSMT_SHA256
+#elif defined(WOLFSSL_SHA512)
+#define BENCH_XMSS_XMSSMT BENCH_XMSS_XMSSMT_SHA512
+#elif defined(WOLFSSL_SHAKE128)
+#define BENCH_XMSS_XMSSMT BENCH_XMSS_XMSSMT_SHAKE128
+#elif defined(WOLFSSL_SHAKE256)
+#define BENCH_XMSS_XMSSMT BENCH_XMSS_XMSSMT_SHAKE256
+#else
+#define BENCH_XMSS_XMSSMT 0x00000000
+#endif
/* Other */
#define BENCH_RNG 0x00000001
@@ -987,7 +1010,23 @@ static const bench_pq_hash_sig_alg bench_pq_hash_sig_opt[] = {
{ "-lms_hss", BENCH_LMS_HSS},
#endif
#if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY)
- { "-xmss_xmssmt", BENCH_XMSS_XMSSMT},
+ { "-xmss_xmssmt", BENCH_XMSS_XMSSMT},
+#ifdef WC_XMSS_SHA256
+ { "-xmss_xmssmt_sha256", BENCH_XMSS_XMSSMT_SHA256},
+#endif
+#ifdef WC_XMSS_SHA512
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 512 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 512
+ { "-xmss_xmssmt_sha512", BENCH_XMSS_XMSSMT_SHA512},
+#endif
+#endif
+#ifdef WC_XMSS_SHAKE128
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 256 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 256
+ { "-xmss_xmssmt_shake128", BENCH_XMSS_XMSSMT_SHAKE128},
+#endif
+#endif
+#ifdef WC_XMSS_SHAKE256
+ { "-xmss_xmssmt_shake256", BENCH_XMSS_XMSSMT_SHAKE256},
+#endif
#endif
{ NULL, 0}
};
@@ -1439,7 +1478,7 @@ static const char* bench_result_words3[][5] = {
ESP_LOGI(TAG, "expected_diff = %llu", expected_diff);
ESP_LOGI(TAG, "tickBeginDiff = %lu", tickBeginDiff);
- ESP_LOGW(TAG, "");
+ ESP_LOGW(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
}
#endif
}
@@ -1841,21 +1880,33 @@ static const char* bench_result_words2[][5] = {
/* use kB instead of mB for embedded benchmarking */
#ifdef BENCH_EMBEDDED
+ #ifndef BENCH_NTIMES
+ #define BENCH_NTIMES 2
+ #endif
+ #ifndef BENCH_AGREETIMES
+ #define BENCH_AGREETIMES 2
+ #endif
enum BenchmarkBounds {
scryptCnt = 1,
- ntimes = 2,
+ ntimes = BENCH_NTIMES,
genTimes = BENCH_MAX_PENDING,
- agreeTimes = 2
+ agreeTimes = BENCH_AGREETIMES
};
/* how many kB to test (en/de)cryption */
#define NUM_BLOCKS 25
#define BENCH_SIZE (1024uL)
#else
+ #ifndef BENCH_NTIMES
+ #define BENCH_NTIMES 100
+ #endif
+ #ifndef BENCH_AGREETIMES
+ #define BENCH_AGREETIMES 100
+ #endif
enum BenchmarkBounds {
scryptCnt = 10,
- ntimes = 100,
+ ntimes = BENCH_NTIMES,
genTimes = BENCH_MAX_PENDING, /* must be at least BENCH_MAX_PENDING */
- agreeTimes = 100
+ agreeTimes = BENCH_AGREETIMES
};
/* how many megs to test (en/de)cryption */
#define NUM_BLOCKS 5
@@ -3497,9 +3548,29 @@ static void* benchmarks_do(void* args)
#endif /* if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_VERIFY_ONLY) */
#if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY)
- if (bench_all || (bench_pq_hash_sig_algs & BENCH_XMSS_XMSSMT)) {
- bench_xmss();
+ if (bench_all) {
+ bench_pq_hash_sig_algs |= BENCH_XMSS_XMSSMT;
}
+#ifndef NO_SHA256
+ if (bench_pq_hash_sig_algs & BENCH_XMSS_XMSSMT_SHA256) {
+ bench_xmss(WC_HASH_TYPE_SHA256);
+ }
+#endif
+#ifdef WOLFSSL_SHA512
+ if (bench_pq_hash_sig_algs & BENCH_XMSS_XMSSMT_SHA512) {
+ bench_xmss(WC_HASH_TYPE_SHA512);
+ }
+#endif
+#ifdef WOLFSSL_SHAKE128
+ if (bench_pq_hash_sig_algs & BENCH_XMSS_XMSSMT_SHAKE128) {
+ bench_xmss(WC_HASH_TYPE_SHAKE128);
+ }
+#endif
+#ifdef WOLFSSL_SHAKE256
+ if (bench_pq_hash_sig_algs & BENCH_XMSS_XMSSMT_SHAKE256) {
+ bench_xmss(WC_HASH_TYPE_SHAKE256);
+ }
+#endif
#endif /* if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY) */
#ifdef HAVE_ECC
@@ -4014,22 +4085,23 @@ static void bench_aescbc_internal(int useDeviceID,
const char* decLabel)
{
int ret = 0, i, count = 0, times, pending = 0;
- Aes enc[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
- /* clear for done cleanup */
- XMEMSET(enc, 0, sizeof(enc));
+ WC_CALLOC_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_AesInit(&enc[i], HEAP_HINT,
+ if ((ret = wc_AesInit(enc[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID)) != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
goto exit;
}
- ret = wc_AesSetKey(&enc[i], key, keySz, iv, AES_ENCRYPTION);
+ ret = wc_AesSetKey(enc[i], key, keySz, iv, AES_ENCRYPTION);
if (ret != 0) {
printf("AesSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4043,12 +4115,12 @@ static void bench_aescbc_internal(int useDeviceID,
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_AesCbcEncrypt(&enc[i], bench_plain, bench_cipher,
+ ret = wc_AesCbcEncrypt(enc[i], bench_plain, bench_cipher,
bench_size);
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_aes_enc;
}
@@ -4077,7 +4149,7 @@ exit_aes_enc:
#ifdef HAVE_AES_DECRYPT
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_AesSetKey(&enc[i], key, keySz, iv, AES_DECRYPTION);
+ ret = wc_AesSetKey(enc[i], key, keySz, iv, AES_DECRYPTION);
if (ret != 0) {
printf("AesSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4093,12 +4165,12 @@ exit_aes_enc:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_AesCbcDecrypt(&enc[i], bench_cipher, bench_plain,
+ ret = wc_AesCbcDecrypt(enc[i], bench_cipher, bench_plain,
bench_size);
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_aes_dec;
}
@@ -4125,8 +4197,11 @@ exit_aes_dec:
(void)decLabel;
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_AesFree(&enc[i]);
+ if (WC_ARRAY_OK(enc)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_AesFree(enc[i]);
+ }
+ WC_FREE_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
}
}
@@ -4165,42 +4240,38 @@ static void bench_aesgcm_internal(int useDeviceID,
const char* encLabel, const char* decLabel)
{
int ret = 0, i, count = 0, times, pending = 0;
- Aes enc[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#ifdef HAVE_AES_DECRYPT
- Aes dec[BENCH_MAX_PENDING+1];
+ WC_DECLARE_ARRAY(dec, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#endif
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
-
WC_DECLARE_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
WC_DECLARE_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
-#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (bench_additional == NULL || bench_tag == NULL) {
- printf("bench_aesgcm_internal malloc failed\n");
- goto exit;
- }
-#endif
- /* clear for done cleanup */
- XMEMSET(enc, 0, sizeof(enc));
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (bench_additional)
-#endif
- XMEMSET(bench_additional, 0, AES_AUTH_ADD_SZ);
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (bench_tag)
+ WC_ALLOC_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
+ WC_CALLOC_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
+#ifdef HAVE_AES_DECRYPT
+ WC_CALLOC_ARRAY(dec, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#endif
- XMEMSET(bench_tag, 0, AES_AUTH_TAG_SZ);
+
+ XMEMSET(bench_additional, 0, AES_AUTH_ADD_SZ);
+ XMEMSET(bench_tag, 0, AES_AUTH_TAG_SZ);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_AesInit(&enc[i], HEAP_HINT,
+ if ((ret = wc_AesInit(enc[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID)) != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
goto exit;
}
- ret = wc_AesGcmSetKey(&enc[i], key, keySz);
+ ret = wc_AesGcmSetKey(enc[i], key, keySz);
if (ret != 0) {
printf("AesGcmSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4215,13 +4286,13 @@ static void bench_aesgcm_internal(int useDeviceID,
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_AesGcmEncrypt(&enc[i], bench_cipher,
+ ret = wc_AesGcmEncrypt(enc[i], bench_cipher,
bench_plain, bench_size,
iv, ivSz, bench_tag, AES_AUTH_TAG_SZ,
bench_additional, aesAuthAddSz);
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_aes_gcm;
}
@@ -4244,19 +4315,18 @@ exit_aes_gcm:
#endif
#ifdef HAVE_AES_DECRYPT
- XMEMSET(dec, 0, sizeof(dec));
RESET_MULTI_VALUE_STATS_VARS();
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_AesInit(&dec[i], HEAP_HINT,
+ if ((ret = wc_AesInit(dec[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID)) != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
goto exit;
}
- ret = wc_AesGcmSetKey(&dec[i], key, keySz);
+ ret = wc_AesGcmSetKey(dec[i], key, keySz);
if (ret != 0) {
printf("AesGcmSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4270,13 +4340,13 @@ exit_aes_gcm:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&dec[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(dec[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_AesGcmDecrypt(&dec[i], bench_plain,
+ ret = wc_AesGcmDecrypt(dec[i], bench_plain,
bench_cipher, bench_size,
iv, ivSz, bench_tag, AES_AUTH_TAG_SZ,
bench_additional, aesAuthAddSz);
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&dec[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(dec[i]),
0, &times, &pending)) {
goto exit_aes_gcm_dec;
}
@@ -4307,12 +4377,18 @@ exit:
printf("bench_aesgcm failed: %d\n", ret);
}
#ifdef HAVE_AES_DECRYPT
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_AesFree(&dec[i]);
+ if (WC_ARRAY_OK(dec)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_AesFree(dec[i]);
+ }
+ WC_FREE_ARRAY(dec, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_AesFree(&enc[i]);
+ if (WC_ARRAY_OK(enc)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_AesFree(enc[i]);
+ }
+ WC_FREE_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
}
WC_FREE_VAR(bench_additional, HEAP_HINT);
@@ -4325,45 +4401,40 @@ static void bench_aesgcm_stream_internal(int useDeviceID,
const char* encLabel, const char* decLabel)
{
int ret = 0, i, count = 0, times, pending = 0;
- Aes enc[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#ifdef HAVE_AES_DECRYPT
- Aes dec[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(dec, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#endif
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
WC_DECLARE_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
-#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (bench_additional == NULL || bench_tag == NULL) {
- printf("bench_aesgcm_internal malloc failed\n");
- goto exit;
- }
-#endif
- /* clear for done cleanup */
- XMEMSET(enc, 0, sizeof(enc));
+ WC_ALLOC_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
+
+ WC_CALLOC_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#ifdef HAVE_AES_DECRYPT
- XMEMSET(dec, 0, sizeof(dec));
+ WC_CALLOC_ARRAY(dec, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
#endif
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (bench_additional)
-#endif
- XMEMSET(bench_additional, 0, AES_AUTH_ADD_SZ);
-#ifdef WOLFSSL_ASYNC_CRYPT
- if (bench_tag)
-#endif
- XMEMSET(bench_tag, 0, AES_AUTH_TAG_SZ);
+
+ XMEMSET(bench_additional, 0, AES_AUTH_ADD_SZ);
+ XMEMSET(bench_tag, 0, AES_AUTH_TAG_SZ);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_AesInit(&enc[i], HEAP_HINT,
+ if ((ret = wc_AesInit(enc[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID)) != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
goto exit;
}
- ret = wc_AesGcmSetKey(&enc[i], key, keySz);
+ ret = wc_AesGcmSetKey(enc[i], key, keySz);
if (ret != 0) {
printf("AesGcmSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4378,19 +4449,19 @@ static void bench_aesgcm_stream_internal(int useDeviceID,
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_AesGcmEncryptInit(&enc[i], NULL, 0, iv, ivSz);
+ ret = wc_AesGcmEncryptInit(enc[i], NULL, 0, iv, ivSz);
if (ret == 0) {
- ret = wc_AesGcmEncryptUpdate(&enc[i], bench_cipher,
+ ret = wc_AesGcmEncryptUpdate(enc[i], bench_cipher,
bench_plain, bench_size, bench_additional,
aesAuthAddSz);
}
if (ret == 0) {
- ret = wc_AesGcmEncryptFinal(&enc[i], bench_tag,
+ ret = wc_AesGcmEncryptFinal(enc[i], bench_tag,
AES_AUTH_TAG_SZ);
}
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_aes_gcm;
}
@@ -4415,13 +4486,13 @@ exit_aes_gcm:
#ifdef HAVE_AES_DECRYPT
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_AesInit(&dec[i], HEAP_HINT,
+ if ((ret = wc_AesInit(dec[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID)) != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
goto exit;
}
- ret = wc_AesGcmSetKey(&dec[i], key, keySz);
+ ret = wc_AesGcmSetKey(dec[i], key, keySz);
if (ret != 0) {
printf("AesGcmSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4437,19 +4508,19 @@ exit_aes_gcm:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&dec[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(dec[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_AesGcmDecryptInit(&enc[i], NULL, 0, iv, ivSz);
+ ret = wc_AesGcmDecryptInit(enc[i], NULL, 0, iv, ivSz);
if (ret == 0) {
- ret = wc_AesGcmDecryptUpdate(&enc[i], bench_plain,
+ ret = wc_AesGcmDecryptUpdate(enc[i], bench_plain,
bench_cipher, bench_size, bench_additional,
aesAuthAddSz);
}
if (ret == 0) {
- ret = wc_AesGcmDecryptFinal(&enc[i], bench_tag,
+ ret = wc_AesGcmDecryptFinal(enc[i], bench_tag,
AES_AUTH_TAG_SZ);
}
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&dec[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(dec[i]),
0, &times, &pending)) {
goto exit_aes_gcm_dec;
}
@@ -4480,12 +4551,18 @@ exit:
printf("bench_aesgcm failed: %d\n", ret);
}
#ifdef HAVE_AES_DECRYPT
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_AesFree(&dec[i]);
+ if (WC_ARRAY_OK(dec)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_AesFree(dec[i]);
+ }
+ WC_FREE_ARRAY(dec, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_AesFree(&enc[i]);
+ if (WC_ARRAY_OK(enc)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_AesFree(enc[i]);
+ }
+ WC_FREE_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
}
WC_FREE_VAR(bench_additional, HEAP_HINT);
@@ -4607,7 +4684,8 @@ static void bench_aesecb_internal(int useDeviceID,
const char* encLabel, const char* decLabel)
{
int ret = 0, i, count = 0, times, pending = 0;
- Aes enc[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
#ifdef HAVE_FIPS
@@ -4616,18 +4694,18 @@ static void bench_aesecb_internal(int useDeviceID,
const int benchSz = (int)bench_size;
#endif
- /* clear for done cleanup */
- XMEMSET(enc, 0, sizeof(enc));
+ WC_CALLOC_ARRAY(enc, Aes, BENCH_MAX_PENDING,
+ sizeof(Aes), HEAP_HINT);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_AesInit(&enc[i], HEAP_HINT,
+ if ((ret = wc_AesInit(enc[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID)) != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
goto exit;
}
- ret = wc_AesSetKey(&enc[i], key, keySz, bench_iv, AES_ENCRYPTION);
+ ret = wc_AesSetKey(enc[i], key, keySz, bench_iv, AES_ENCRYPTION);
if (ret != 0) {
printf("AesSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4644,16 +4722,16 @@ static void bench_aesecb_internal(int useDeviceID,
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
- &times, numBlocks, &pending)) {
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
+ &times, outer_loop_limit, &pending)) {
#ifdef HAVE_FIPS
- wc_AesEncryptDirect(&enc[i], bench_cipher, bench_plain);
+ wc_AesEncryptDirect(enc[i], bench_cipher, bench_plain);
#else
- wc_AesEcbEncrypt(&enc[i], bench_cipher, bench_plain,
+ wc_AesEcbEncrypt(enc[i], bench_cipher, bench_plain,
benchSz);
#endif
ret = 0;
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_aes_enc;
}
@@ -4678,7 +4756,7 @@ exit_aes_enc:
#ifdef HAVE_AES_DECRYPT
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_AesSetKey(&enc[i], key, keySz, bench_iv, AES_DECRYPTION);
+ ret = wc_AesSetKey(enc[i], key, keySz, bench_iv, AES_DECRYPTION);
if (ret != 0) {
printf("AesSetKey failed, ret = %d\n", ret);
goto exit;
@@ -4695,16 +4773,16 @@ exit_aes_enc:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
- &times, numBlocks, &pending)) {
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
+ &times, outer_loop_limit, &pending)) {
#ifdef HAVE_FIPS
- wc_AesDecryptDirect(&enc[i], bench_plain, bench_cipher);
+ wc_AesDecryptDirect(enc[i], bench_plain, bench_cipher);
#else
- wc_AesEcbDecrypt(&enc[i], bench_plain, bench_cipher,
+ wc_AesEcbDecrypt(enc[i], bench_plain, bench_cipher,
benchSz);
#endif
ret = 0;
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_aes_dec;
}
@@ -4730,8 +4808,11 @@ exit_aes_dec:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_AesFree(&enc[i]);
+ if (WC_ARRAY_OK(enc)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_AesFree(enc[i]);
+ }
+ WC_FREE_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
}
}
@@ -4764,14 +4845,14 @@ static void bench_aescfb_internal(const byte* key,
ret = wc_AesInit(&enc, HEAP_HINT, INVALID_DEVID);
if (ret != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
return;
}
ret = wc_AesSetKey(&enc, key, keySz, iv, AES_ENCRYPTION);
if (ret != 0) {
printf("AesSetKey failed, ret = %d\n", ret);
- return;
+ goto out;
}
bench_stats_start(&count, &start);
@@ -4780,7 +4861,7 @@ static void bench_aescfb_internal(const byte* key,
if((ret = wc_AesCfbEncrypt(&enc, bench_plain, bench_cipher,
bench_size)) != 0) {
printf("wc_AesCfbEncrypt failed, ret = %d\n", ret);
- return;
+ goto out;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -4795,6 +4876,11 @@ static void bench_aescfb_internal(const byte* key,
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
+
+out:
+
+ wc_AesFree(&enc);
+ return;
}
void bench_aescfb(void)
@@ -4824,7 +4910,7 @@ static void bench_aesofb_internal(const byte* key,
ret = wc_AesInit(&enc, NULL, INVALID_DEVID);
if (ret != 0) {
- printf("AesInit failed, ret = %d\n", ret);
+ printf("AesInit failed at L%d, ret = %d\n", __LINE__, ret);
return;
}
@@ -4877,37 +4963,39 @@ void bench_aesofb(void)
#ifdef WOLFSSL_AES_XTS
void bench_aesxts(void)
{
- XtsAes aes;
+ WC_DECLARE_VAR(aes, XtsAes, 1, HEAP_HINT);
double start;
int i, count, ret;
DECLARE_MULTI_VALUE_STATS_VARS()
- static unsigned char k1[] = {
+ static const unsigned char k1[] = {
0xa1, 0xb9, 0x0c, 0xba, 0x3f, 0x06, 0xac, 0x35,
0x3b, 0x2c, 0x34, 0x38, 0x76, 0x08, 0x17, 0x62,
0x09, 0x09, 0x23, 0x02, 0x6e, 0x91, 0x77, 0x18,
0x15, 0xf2, 0x9d, 0xab, 0x01, 0x93, 0x2f, 0x2f
};
- static unsigned char i1[] = {
+ static const unsigned char i1[] = {
0x4f, 0xae, 0xf7, 0x11, 0x7c, 0xda, 0x59, 0xc6,
0x6e, 0x4b, 0x92, 0x01, 0x3e, 0x76, 0x8a, 0xd5
};
- ret = wc_AesXtsSetKey(&aes, k1, sizeof(k1), AES_ENCRYPTION,
+ WC_ALLOC_VAR(aes, XtsAes, 1, HEAP_HINT);
+
+ ret = wc_AesXtsSetKey(aes, k1, sizeof(k1), AES_ENCRYPTION,
HEAP_HINT, devId);
if (ret != 0) {
printf("wc_AesXtsSetKey failed, ret = %d\n", ret);
- return;
+ goto exit;
}
bench_stats_start(&count, &start);
do {
for (i = 0; i < numBlocks; i++) {
- if ((ret = wc_AesXtsEncrypt(&aes, bench_cipher, bench_plain,
+ if ((ret = wc_AesXtsEncrypt(aes, bench_cipher, bench_plain,
bench_size, i1, sizeof(i1))) != 0) {
printf("wc_AesXtsEncrypt failed, ret = %d\n", ret);
- return;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -4922,14 +5010,14 @@ void bench_aesxts(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_AesXtsFree(&aes);
+ wc_AesXtsFree(aes);
/* decryption benchmark */
- ret = wc_AesXtsSetKey(&aes, k1, sizeof(k1), AES_DECRYPTION,
+ ret = wc_AesXtsSetKey(aes, k1, sizeof(k1), AES_DECRYPTION,
HEAP_HINT, devId);
if (ret != 0) {
printf("wc_AesXtsSetKey failed, ret = %d\n", ret);
- return;
+ goto exit;
}
RESET_MULTI_VALUE_STATS_VARS();
@@ -4937,10 +5025,10 @@ void bench_aesxts(void)
bench_stats_start(&count, &start);
do {
for (i = 0; i < numBlocks; i++) {
- if ((ret = wc_AesXtsDecrypt(&aes, bench_plain, bench_cipher,
+ if ((ret = wc_AesXtsDecrypt(aes, bench_plain, bench_cipher,
bench_size, i1, sizeof(i1))) != 0) {
printf("wc_AesXtsDecrypt failed, ret = %d\n", ret);
- return;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -4955,7 +5043,11 @@ void bench_aesxts(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_AesXtsFree(&aes);
+
+exit:
+
+ wc_AesXtsFree(aes);
+ WC_FREE_VAR(aes, HEAP_HINT);
}
#endif /* WOLFSSL_AES_XTS */
@@ -5024,6 +5116,7 @@ void bench_aesctr(int useDeviceID)
void bench_aesccm(int useDeviceID)
{
Aes enc;
+ int enc_inited = 0;
double start;
int ret, i, count;
DECLARE_MULTI_VALUE_STATS_VARS()
@@ -5031,18 +5124,15 @@ void bench_aesccm(int useDeviceID)
WC_DECLARE_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
WC_DECLARE_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
-#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (bench_additional == NULL || bench_tag == NULL) {
- printf("bench_aesccm malloc failed\n");
- goto exit;
- }
-#endif
+ WC_ALLOC_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
XMEMSET(bench_tag, 0, AES_AUTH_TAG_SZ);
XMEMSET(bench_additional, 0, AES_AUTH_ADD_SZ);
if ((ret = wc_AesInit(&enc, HEAP_HINT,
- useDeviceID ? devId : INVALID_DEVID)) != 0) {
+ useDeviceID ? devId : INVALID_DEVID)) != 0)
+ {
printf("wc_AesInit failed, ret = %d\n", ret);
goto exit;
}
@@ -5051,6 +5141,7 @@ void bench_aesccm(int useDeviceID)
printf("wc_AesCcmSetKey failed, ret = %d\n", ret);
goto exit;
}
+ enc_inited = 1;
bench_stats_start(&count, &start);
do {
@@ -5106,6 +5197,9 @@ void bench_aesccm(int useDeviceID)
exit:
+ if (enc_inited)
+ wc_AesFree(&enc);
+
WC_FREE_VAR(bench_additional, HEAP_HINT);
WC_FREE_VAR(bench_tag, HEAP_HINT);
}
@@ -5372,17 +5466,14 @@ void bench_sm4_gcm(void)
WC_DECLARE_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
WC_DECLARE_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
-#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (bench_additional == NULL || bench_tag == NULL) {
- printf("bench_aesgcm_internal malloc failed\n");
- return;
- }
-#endif
+
+ WC_ALLOC_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
ret = wc_Sm4GcmSetKey(&sm4, bench_key, SM4_KEY_SIZE);
if (ret != 0) {
printf("Sm4GcmSetKey failed, ret = %d\n", ret);
- return;
+ goto exit;
}
bench_stats_start(&count, &start);
@@ -5393,7 +5484,7 @@ void bench_sm4_gcm(void)
bench_additional, aesAuthAddSz);
if (ret < 0) {
printf("Sm4GcmEncrypt failed: %d\n", ret);
- return;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -5419,7 +5510,7 @@ void bench_sm4_gcm(void)
bench_additional, aesAuthAddSz);
if (ret < 0) {
printf("Sm4GcmDecrypt failed: %d\n", ret);
- return;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -5434,6 +5525,11 @@ void bench_sm4_gcm(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
+
+exit:
+
+ WC_FREE_VAR(bench_additional, HEAP_HINT);
+ WC_FREE_VAR(bench_tag, HEAP_HINT);
}
#endif
@@ -5448,12 +5544,8 @@ void bench_sm4_ccm()
WC_DECLARE_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
WC_DECLARE_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
-#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (bench_additional == NULL || bench_tag == NULL) {
- printf("bench_aesccm malloc failed\n");
- goto exit;
- }
-#endif
+ WC_ALLOC_VAR(bench_additional, byte, AES_AUTH_ADD_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(bench_tag, byte, AES_AUTH_TAG_SZ, HEAP_HINT);
XMEMSET(bench_tag, 0, AES_AUTH_TAG_SZ);
XMEMSET(bench_additional, 0, AES_AUTH_ADD_SZ);
@@ -5523,22 +5615,23 @@ void bench_sm4_ccm()
void bench_des(int useDeviceID)
{
int ret = 0, i, count = 0, times, pending = 0;
- Des3 enc[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(enc, Des3, BENCH_MAX_PENDING,
+ sizeof(Des3), HEAP_HINT);
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
- /* clear for done cleanup */
- XMEMSET(enc, 0, sizeof(enc));
+ WC_CALLOC_ARRAY(enc, Des3, BENCH_MAX_PENDING,
+ sizeof(Des3), HEAP_HINT);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_Des3Init(&enc[i], HEAP_HINT,
+ if ((ret = wc_Des3Init(enc[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID)) != 0) {
printf("Des3Init failed, ret = %d\n", ret);
goto exit;
}
- ret = wc_Des3_SetKey(&enc[i], bench_key, bench_iv, DES_ENCRYPTION);
+ ret = wc_Des3_SetKey(enc[i], bench_key, bench_iv, DES_ENCRYPTION);
if (ret != 0) {
printf("Des3_SetKey failed, ret = %d\n", ret);
goto exit;
@@ -5552,12 +5645,12 @@ void bench_des(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_Des3_CbcEncrypt(&enc[i],
+ ret = wc_Des3_CbcEncrypt(enc[i],
bench_cipher,
bench_plain, bench_size);
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_3des;
}
@@ -5580,8 +5673,11 @@ exit_3des:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Des3Free(&enc[i]);
+ if (WC_ARRAY_OK(enc)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Des3Free(enc[i]);
+ }
+ WC_FREE_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
}
}
#endif /* !NO_DES3 */
@@ -5591,22 +5687,23 @@ exit:
void bench_arc4(int useDeviceID)
{
int ret = 0, i, count = 0, times, pending = 0;
- Arc4 enc[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(enc, Arc4, BENCH_MAX_PENDING,
+ sizeof(Arc4), HEAP_HINT);
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
- /* clear for done cleanup */
- XMEMSET(enc, 0, sizeof(enc));
+ WC_CALLOC_ARRAY(enc, Arc4, BENCH_MAX_PENDING,
+ sizeof(Arc4), HEAP_HINT);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if ((ret = wc_Arc4Init(&enc[i], HEAP_HINT,
+ if ((ret = wc_Arc4Init(enc[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID)) != 0) {
printf("Arc4Init failed, ret = %d\n", ret);
goto exit;
}
- ret = wc_Arc4SetKey(&enc[i], bench_key, 16);
+ ret = wc_Arc4SetKey(enc[i], bench_key, 16);
if (ret != 0) {
printf("Arc4SetKey failed, ret = %d\n", ret);
goto exit;
@@ -5620,11 +5717,11 @@ void bench_arc4(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&enc[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(enc[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_Arc4Process(&enc[i], bench_cipher, bench_plain,
+ ret = wc_Arc4Process(enc[i], bench_cipher, bench_plain,
bench_size);
- if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(&enc[i]),
+ if (!bench_async_handle(&ret, BENCH_ASYNC_GET_DEV(enc[i]),
0, &times, &pending)) {
goto exit_arc4;
}
@@ -5647,8 +5744,11 @@ exit_arc4:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Arc4Free(&enc[i]);
+ if (WC_ARRAY_OK(enc)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Arc4Free(enc[i]);
+ }
+ WC_FREE_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
}
}
#endif /* !NO_RC4 */
@@ -5657,19 +5757,29 @@ exit:
#ifdef HAVE_CHACHA
void bench_chacha(void)
{
- ChaCha enc;
+ WC_DECLARE_VAR(enc, ChaCha, 1, HEAP_HINT);
double start;
- int i, count;
+ int ret, i, count;
DECLARE_MULTI_VALUE_STATS_VARS()
- XMEMSET(&enc, 0, sizeof(enc));
- wc_Chacha_SetKey(&enc, bench_key, 16);
+ WC_ALLOC_VAR(enc, ChaCha, 1, HEAP_HINT);
+
+ XMEMSET(enc, 0, sizeof(ChaCha));
+ wc_Chacha_SetKey(enc, bench_key, 16);
bench_stats_start(&count, &start);
do {
for (i = 0; i < numBlocks; i++) {
- wc_Chacha_SetIV(&enc, bench_iv, 0);
- wc_Chacha_Process(&enc, bench_cipher, bench_plain, bench_size);
+ ret = wc_Chacha_SetIV(enc, bench_iv, 0);
+ if (ret < 0) {
+ printf("wc_Chacha_SetIV error: %d\n", ret);
+ goto exit;
+ }
+ ret = wc_Chacha_Process(enc, bench_cipher, bench_plain, bench_size);
+ if (ret < 0) {
+ printf("wc_Chacha_Process error: %d\n", ret);
+ goto exit;
+ }
RECORD_MULTI_VALUE_STATS();
}
count += i;
@@ -5683,6 +5793,9 @@ void bench_chacha(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
+
+exit:
+ WC_FREE_VAR(enc, HEAP_HINT);
}
#endif /* HAVE_CHACHA*/
@@ -5693,8 +5806,9 @@ void bench_chacha20_poly1305_aead(void)
int ret = 0, i, count;
DECLARE_MULTI_VALUE_STATS_VARS()
- byte authTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE];
- XMEMSET(authTag, 0, sizeof(authTag));
+ WC_DECLARE_VAR(authTag, byte, CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(authTag, byte, CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE, HEAP_HINT);
+ XMEMSET(authTag, 0, CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE);
bench_stats_start(&count, &start);
do {
@@ -5703,7 +5817,7 @@ void bench_chacha20_poly1305_aead(void)
bench_plain, bench_size, bench_cipher, authTag);
if (ret < 0) {
printf("wc_ChaCha20Poly1305_Encrypt error: %d\n", ret);
- break;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -5718,6 +5832,10 @@ void bench_chacha20_poly1305_aead(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
+
+exit:
+
+ WC_FREE_VAR(authTag, HEAP_HINT);
}
#endif /* HAVE_CHACHA && HAVE_POLY1305 */
@@ -5725,30 +5843,30 @@ void bench_chacha20_poly1305_aead(void)
#ifndef NO_MD5
void bench_md5(int useDeviceID)
{
- wc_Md5 hash[BENCH_MAX_PENDING];
- double start;
+ WC_DECLARE_ARRAY(hash, wc_Md5, BENCH_MAX_PENDING,
+ sizeof(wc_Md5), HEAP_HINT);
+ double start = 0;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
-
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_MD5_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_MD5_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Md5, BENCH_MAX_PENDING,
+ sizeof(wc_Md5), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_MD5_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitMd5_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitMd5_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitMd5_ex failed, ret = %d\n", ret);
goto exit;
}
#ifdef WOLFSSL_PIC32MZ_HASH
- wc_Md5SizeSet(&hash[i], numBlocks * bench_size);
+ wc_Md5SizeSet(hash[i], numBlocks * bench_size);
#endif
}
@@ -5759,12 +5877,12 @@ void bench_md5(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Md5Update(&hash[i], bench_plain,
+ ret = wc_Md5Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]),
+ BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, &pending)) {
goto exit_md5;
}
@@ -5779,11 +5897,11 @@ void bench_md5(int useDeviceID)
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Md5Final(&hash[i], digest[i]);
+ ret = wc_Md5Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_md5;
}
@@ -5800,11 +5918,11 @@ void bench_md5(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitMd5_ex(hash, HEAP_HINT, INVALID_DEVID);
+ ret = wc_InitMd5_ex(hash[0], HEAP_HINT, INVALID_DEVID);
if (ret == 0)
- ret = wc_Md5Update(hash, bench_plain, bench_size);
+ ret = wc_Md5Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Md5Final(hash, digest[0]);
+ ret = wc_Md5Final(hash[0], digest[0]);
if (ret != 0)
goto exit_md5;
RECORD_MULTI_VALUE_STATS();
@@ -5825,11 +5943,14 @@ exit_md5:
exit:
#ifdef WOLFSSL_ASYNC_CRYPT
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Md5Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Md5Free(hash[i]);
+ }
}
#endif
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* !NO_MD5 */
@@ -5838,29 +5959,30 @@ exit:
#ifndef NO_SHA
void bench_sha(int useDeviceID)
{
- wc_Sha hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha, BENCH_MAX_PENDING,
+ sizeof(wc_Sha), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha, BENCH_MAX_PENDING,
+ sizeof(wc_Sha), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha failed, ret = %d\n", ret);
goto exit;
}
#ifdef WOLFSSL_PIC32MZ_HASH
- wc_ShaSizeSet(&hash[i], numBlocks * bench_size);
+ wc_ShaSizeSet(hash[i], numBlocks * bench_size);
#endif
}
@@ -5871,12 +5993,12 @@ void bench_sha(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_ShaUpdate(&hash[i], bench_plain,
+ ret = wc_ShaUpdate(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha;
}
@@ -5891,11 +6013,11 @@ void bench_sha(int useDeviceID)
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_ShaFinal(&hash[i], digest[i]);
+ ret = wc_ShaFinal(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha;
}
@@ -5912,12 +6034,12 @@ void bench_sha(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha_ex(hash, HEAP_HINT,
+ ret = wc_InitSha_ex(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_ShaUpdate(hash, bench_plain, bench_size);
+ ret = wc_ShaUpdate(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_ShaFinal(hash, digest[0]);
+ ret = wc_ShaFinal(hash[0], digest[0]);
if (ret != 0)
goto exit_sha;
RECORD_MULTI_VALUE_STATS();
@@ -5937,10 +6059,12 @@ exit_sha:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_ShaFree(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_ShaFree(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* NO_SHA */
@@ -5949,22 +6073,23 @@ exit:
#ifdef WOLFSSL_SHA224
void bench_sha224(int useDeviceID)
{
- wc_Sha224 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha224, BENCH_MAX_PENDING,
+ sizeof(wc_Sha224), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA224_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA224_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha224, BENCH_MAX_PENDING,
+ sizeof(wc_Sha224), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA224_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha224_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha224_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha224_ex failed, ret = %d\n", ret);
@@ -5979,12 +6104,12 @@ void bench_sha224(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha224Update(&hash[i], bench_plain,
+ ret = wc_Sha224Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha224;
}
@@ -5998,11 +6123,11 @@ void bench_sha224(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha224Final(&hash[i], digest[i]);
+ ret = wc_Sha224Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha224;
}
@@ -6019,12 +6144,12 @@ void bench_sha224(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha224_ex(hash, HEAP_HINT,
+ ret = wc_InitSha224_ex(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha224Update(hash, bench_plain, bench_size);
+ ret = wc_Sha224Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha224Final(hash, digest[0]);
+ ret = wc_Sha224Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha224;
} /* for times */
@@ -6044,10 +6169,12 @@ exit_sha224:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha224Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha224Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif
@@ -6056,29 +6183,30 @@ exit:
#ifndef NO_SHA256
void bench_sha256(int useDeviceID)
{
- wc_Sha256 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha256, BENCH_MAX_PENDING,
+ sizeof(wc_Sha256), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA256_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA256_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha256, BENCH_MAX_PENDING,
+ sizeof(wc_Sha256), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA256_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha256_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha256_ex(hash[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID);
if (ret != 0) {
printf("InitSha256_ex failed, ret = %d\n", ret);
goto exit;
}
#ifdef WOLFSSL_PIC32MZ_HASH
- wc_Sha256SizeSet(&hash[i], numBlocks * bench_size);
+ wc_Sha256SizeSet(hash[i], numBlocks * bench_size);
#endif
}
@@ -6089,12 +6217,12 @@ void bench_sha256(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha256Update(&hash[i], bench_plain,
+ ret = wc_Sha256Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha256;
}
@@ -6108,11 +6236,11 @@ void bench_sha256(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha256Final(&hash[i], digest[i]);
+ ret = wc_Sha256Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha256;
}
@@ -6129,12 +6257,12 @@ void bench_sha256(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha256_ex(hash, HEAP_HINT,
+ ret = wc_InitSha256_ex(hash[0], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha256Update(hash, bench_plain, bench_size);
+ ret = wc_Sha256Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha256Final(hash, digest[0]);
+ ret = wc_Sha256Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha256;
RECORD_MULTI_VALUE_STATS();
@@ -6153,10 +6281,12 @@ exit_sha256:
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha256Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha256Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif
@@ -6164,22 +6294,23 @@ exit:
#ifdef WOLFSSL_SHA384
void bench_sha384(int useDeviceID)
{
- wc_Sha384 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha384, BENCH_MAX_PENDING,
+ sizeof(wc_Sha384), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA384_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA384_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha384, BENCH_MAX_PENDING,
+ sizeof(wc_Sha384), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA384_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha384_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha384_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha384_ex failed, ret = %d\n", ret);
@@ -6194,12 +6325,12 @@ void bench_sha384(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha384Update(&hash[i], bench_plain,
+ ret = wc_Sha384Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha384;
}
@@ -6213,11 +6344,11 @@ void bench_sha384(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha384Final(&hash[i], digest[i]);
+ ret = wc_Sha384Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha384;
}
@@ -6234,12 +6365,12 @@ void bench_sha384(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha384_ex(hash, HEAP_HINT,
+ ret = wc_InitSha384_ex(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha384Update(hash, bench_plain, bench_size);
+ ret = wc_Sha384Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha384Final(hash, digest[0]);
+ ret = wc_Sha384Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha384;
RECORD_MULTI_VALUE_STATS();
@@ -6260,10 +6391,12 @@ exit_sha384:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha384Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha384Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif
@@ -6271,22 +6404,23 @@ exit:
#ifdef WOLFSSL_SHA512
void bench_sha512(int useDeviceID)
{
- wc_Sha512 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha512, BENCH_MAX_PENDING,
+ sizeof(wc_Sha512), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA512_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA512_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha512, BENCH_MAX_PENDING,
+ sizeof(wc_Sha512), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA512_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha512_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha512_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha512_ex failed, ret = %d\n", ret);
@@ -6301,12 +6435,12 @@ void bench_sha512(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha512Update(&hash[i], bench_plain,
+ ret = wc_Sha512Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha512;
}
@@ -6320,11 +6454,11 @@ void bench_sha512(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha512Final(&hash[i], digest[i]);
+ ret = wc_Sha512Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha512;
}
@@ -6341,12 +6475,12 @@ void bench_sha512(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha512_ex(hash, HEAP_HINT,
+ ret = wc_InitSha512_ex(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha512Update(hash, bench_plain, bench_size);
+ ret = wc_Sha512Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha512Final(hash, digest[0]);
+ ret = wc_Sha512Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha512;
RECORD_MULTI_VALUE_STATS();
@@ -6367,10 +6501,12 @@ exit_sha512:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha512Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha512Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
@@ -6378,22 +6514,23 @@ exit:
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
void bench_sha512_224(int useDeviceID)
{
- wc_Sha512_224 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha512_224, BENCH_MAX_PENDING,
+ sizeof(wc_Sha512_224), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
- WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA512_224_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA512_224_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha512_224, BENCH_MAX_PENDING,
+ sizeof(wc_Sha512_224), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA512_224_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha512_224_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha512_224_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha512_224_ex failed, ret = %d\n", ret);
@@ -6408,12 +6545,12 @@ void bench_sha512_224(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha512_224Update(&hash[i], bench_plain,
+ ret = wc_Sha512_224Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha512_224;
}
@@ -6427,11 +6564,11 @@ void bench_sha512_224(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha512_224Final(&hash[i], digest[i]);
+ ret = wc_Sha512_224Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha512_224;
}
@@ -6448,12 +6585,12 @@ void bench_sha512_224(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha512_224_ex(hash, HEAP_HINT,
+ ret = wc_InitSha512_224_ex(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha512_224Update(hash, bench_plain, bench_size);
+ ret = wc_Sha512_224Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha512_224Final(hash, digest[0]);
+ ret = wc_Sha512_224Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha512_224;
RECORD_MULTI_VALUE_STATS();
@@ -6474,10 +6611,12 @@ exit_sha512_224:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha512_224Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha512_224Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_NOSHA512_224 && !FIPS ... */
@@ -6486,22 +6625,23 @@ exit:
(!defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)) && !defined(HAVE_SELFTEST)
void bench_sha512_256(int useDeviceID)
{
- wc_Sha512_256 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha512_256, BENCH_MAX_PENDING,
+ sizeof(wc_Sha512_256), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA512_256_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA512_256_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha512_256, BENCH_MAX_PENDING,
+ sizeof(wc_Sha512_256), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA512_256_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha512_256_ex(&hash[i], HEAP_HINT,
+ ret = wc_InitSha512_256_ex(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha512_256_ex failed, ret = %d\n", ret);
@@ -6516,12 +6656,12 @@ void bench_sha512_256(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha512_256Update(&hash[i], bench_plain,
+ ret = wc_Sha512_256Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha512_256;
}
@@ -6535,11 +6675,11 @@ void bench_sha512_256(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha512_256Final(&hash[i], digest[i]);
+ ret = wc_Sha512_256Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha512_256;
}
@@ -6556,12 +6696,12 @@ void bench_sha512_256(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha512_256_ex(hash, HEAP_HINT,
+ ret = wc_InitSha512_256_ex(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha512_256Update(hash, bench_plain, bench_size);
+ ret = wc_Sha512_256Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha512_256Final(hash, digest[0]);
+ ret = wc_Sha512_256Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha512_256;
RECORD_MULTI_VALUE_STATS();
@@ -6582,10 +6722,12 @@ exit_sha512_256:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha512_256Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha512_256Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_NOSHA512_256 && !FIPS ... */
@@ -6597,22 +6739,23 @@ exit:
#ifndef WOLFSSL_NOSHA3_224
void bench_sha3_224(int useDeviceID)
{
- wc_Sha3 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA3_224_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA3_224_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA3_224_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha3_224(&hash[i], HEAP_HINT,
+ ret = wc_InitSha3_224(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha3_224 failed, ret = %d\n", ret);
@@ -6627,12 +6770,12 @@ void bench_sha3_224(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_224_Update(&hash[i], bench_plain,
+ ret = wc_Sha3_224_Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_224;
}
@@ -6646,11 +6789,11 @@ void bench_sha3_224(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_224_Final(&hash[i], digest[i]);
+ ret = wc_Sha3_224_Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_224;
}
@@ -6667,12 +6810,12 @@ void bench_sha3_224(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha3_224(hash, HEAP_HINT,
+ ret = wc_InitSha3_224(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha3_224_Update(hash, bench_plain, bench_size);
+ ret = wc_Sha3_224_Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha3_224_Final(hash, digest[0]);
+ ret = wc_Sha3_224_Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha3_224;
RECORD_MULTI_VALUE_STATS();
@@ -6693,10 +6836,12 @@ exit_sha3_224:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha3_224_Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha3_224_Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_NOSHA3_224 */
@@ -6704,22 +6849,23 @@ exit:
#ifndef WOLFSSL_NOSHA3_256
void bench_sha3_256(int useDeviceID)
{
- wc_Sha3 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
double start;
DECLARE_MULTI_VALUE_STATS_VARS()
int ret = 0, i, count = 0, times, pending = 0;
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA3_256_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA3_256_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA3_256_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha3_256(&hash[i], HEAP_HINT,
+ ret = wc_InitSha3_256(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha3_256 failed, ret = %d\n", ret);
@@ -6734,12 +6880,12 @@ void bench_sha3_256(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_256_Update(&hash[i], bench_plain,
+ ret = wc_Sha3_256_Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_256;
}
@@ -6753,11 +6899,11 @@ void bench_sha3_256(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_256_Final(&hash[i], digest[i]);
+ ret = wc_Sha3_256_Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_256;
}
@@ -6774,12 +6920,12 @@ void bench_sha3_256(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha3_256(hash, HEAP_HINT,
+ ret = wc_InitSha3_256(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha3_256_Update(hash, bench_plain, bench_size);
+ ret = wc_Sha3_256_Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha3_256_Final(hash, digest[0]);
+ ret = wc_Sha3_256_Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha3_256;
RECORD_MULTI_VALUE_STATS();
@@ -6800,10 +6946,12 @@ exit_sha3_256:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha3_256_Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha3_256_Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_NOSHA3_256 */
@@ -6811,22 +6959,23 @@ exit:
#ifndef WOLFSSL_NOSHA3_384
void bench_sha3_384(int useDeviceID)
{
- wc_Sha3 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA3_384_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA3_384_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA3_384_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha3_384(&hash[i], HEAP_HINT,
+ ret = wc_InitSha3_384(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha3_384 failed, ret = %d\n", ret);
@@ -6841,12 +6990,12 @@ void bench_sha3_384(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_384_Update(&hash[i], bench_plain,
+ ret = wc_Sha3_384_Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_384;
}
@@ -6860,11 +7009,11 @@ void bench_sha3_384(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_384_Final(&hash[i], digest[i]);
+ ret = wc_Sha3_384_Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_384;
}
@@ -6881,12 +7030,12 @@ void bench_sha3_384(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha3_384(hash, HEAP_HINT,
+ ret = wc_InitSha3_384(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha3_384_Update(hash, bench_plain, bench_size);
+ ret = wc_Sha3_384_Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha3_384_Final(hash, digest[0]);
+ ret = wc_Sha3_384_Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha3_384;
RECORD_MULTI_VALUE_STATS();
@@ -6907,10 +7056,12 @@ exit_sha3_384:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha3_384_Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha3_384_Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_NOSHA3_384 */
@@ -6918,22 +7069,23 @@ exit:
#ifndef WOLFSSL_NOSHA3_512
void bench_sha3_512(int useDeviceID)
{
- wc_Sha3 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA3_512_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA3_512_DIGEST_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sha3, BENCH_MAX_PENDING,
+ sizeof(wc_Sha3), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA3_512_DIGEST_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSha3_512(&hash[i], HEAP_HINT,
+ ret = wc_InitSha3_512(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitSha3_512 failed, ret = %d\n", ret);
@@ -6948,12 +7100,12 @@ void bench_sha3_512(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_512_Update(&hash[i], bench_plain,
+ ret = wc_Sha3_512_Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_512;
}
@@ -6967,11 +7119,11 @@ void bench_sha3_512(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sha3_512_Final(&hash[i], digest[i]);
+ ret = wc_Sha3_512_Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_sha3_512;
}
@@ -6988,12 +7140,12 @@ void bench_sha3_512(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitSha3_512(hash, HEAP_HINT,
+ ret = wc_InitSha3_512(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Sha3_512_Update(hash, bench_plain, bench_size);
+ ret = wc_Sha3_512_Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Sha3_512_Final(hash, digest[0]);
+ ret = wc_Sha3_512_Final(hash[0], digest[0]);
if (ret != 0)
goto exit_sha3_512;
RECORD_MULTI_VALUE_STATS();
@@ -7014,10 +7166,12 @@ exit_sha3_512:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sha3_512_Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sha3_512_Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_NOSHA3_512 */
@@ -7025,22 +7179,23 @@ exit:
#ifdef WOLFSSL_SHAKE128
void bench_shake128(int useDeviceID)
{
- wc_Shake hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Shake, BENCH_MAX_PENDING,
+ sizeof(wc_Shake), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA3_128_BLOCK_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA3_128_BLOCK_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Shake, BENCH_MAX_PENDING,
+ sizeof(wc_Shake), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA3_128_BLOCK_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitShake128(&hash[i], HEAP_HINT,
+ ret = wc_InitShake128(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitShake128 failed, ret = %d\n", ret);
@@ -7055,12 +7210,12 @@ void bench_shake128(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Shake128_Update(&hash[i], bench_plain,
+ ret = wc_Shake128_Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_shake128;
}
@@ -7074,12 +7229,12 @@ void bench_shake128(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Shake128_Final(&hash[i], digest[i],
+ ret = wc_Shake128_Final(hash[i], digest[i],
WC_SHA3_128_BLOCK_SIZE);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_shake128;
}
@@ -7096,12 +7251,12 @@ void bench_shake128(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitShake128(hash, HEAP_HINT,
+ ret = wc_InitShake128(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Shake128_Update(hash, bench_plain, bench_size);
+ ret = wc_Shake128_Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Shake128_Final(hash, digest[0],
+ ret = wc_Shake128_Final(hash[0], digest[0],
WC_SHA3_128_BLOCK_SIZE);
if (ret != 0)
goto exit_shake128;
@@ -7123,10 +7278,12 @@ exit_shake128:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Shake128_Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Shake128_Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_SHAKE128 */
@@ -7134,22 +7291,23 @@ exit:
#ifdef WOLFSSL_SHAKE256
void bench_shake256(int useDeviceID)
{
- wc_Shake hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Shake, BENCH_MAX_PENDING,
+ sizeof(wc_Shake), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_SHA3_256_BLOCK_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
- WC_SHA3_256_BLOCK_SIZE, HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Shake, BENCH_MAX_PENDING,
+ sizeof(wc_Shake), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_SHA3_256_BLOCK_SIZE, HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitShake256(&hash[i], HEAP_HINT,
+ ret = wc_InitShake256(hash[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("InitShake256 failed, ret = %d\n", ret);
@@ -7164,12 +7322,12 @@ void bench_shake256(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Shake256_Update(&hash[i], bench_plain,
+ ret = wc_Shake256_Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_shake256;
}
@@ -7183,12 +7341,12 @@ void bench_shake256(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Shake256_Final(&hash[i], digest[i],
+ ret = wc_Shake256_Final(hash[i], digest[i],
WC_SHA3_256_BLOCK_SIZE);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0,
+ BENCH_ASYNC_GET_DEV(hash[i]), 0,
&times, &pending)) {
goto exit_shake256;
}
@@ -7205,12 +7363,12 @@ void bench_shake256(int useDeviceID)
bench_stats_start(&count, &start);
do {
for (times = 0; times < numBlocks; times++) {
- ret = wc_InitShake256(hash, HEAP_HINT,
+ ret = wc_InitShake256(hash[0], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret == 0)
- ret = wc_Shake256_Update(hash, bench_plain, bench_size);
+ ret = wc_Shake256_Update(hash[0], bench_plain, bench_size);
if (ret == 0)
- ret = wc_Shake256_Final(hash, digest[0],
+ ret = wc_Shake256_Final(hash[0], digest[0],
WC_SHA3_256_BLOCK_SIZE);
if (ret != 0)
goto exit_shake256;
@@ -7232,10 +7390,12 @@ exit_shake256:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Shake256_Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Shake256_Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif /* WOLFSSL_SHAKE256 */
@@ -7244,22 +7404,23 @@ exit:
#ifdef WOLFSSL_SM3
void bench_sm3(int useDeviceID)
{
- wc_Sm3 hash[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hash, wc_Sm3, BENCH_MAX_PENDING,
+ sizeof(wc_Sm3), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING, WC_SM3_DIGEST_SIZE,
HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING, WC_SM3_DIGEST_SIZE,
- HEAP_HINT);
- /* clear for done cleanup */
- XMEMSET(hash, 0, sizeof(hash));
+ WC_CALLOC_ARRAY(hash, wc_Sm3, BENCH_MAX_PENDING,
+ sizeof(wc_Sm3), HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING, WC_SM3_DIGEST_SIZE,
+ HEAP_HINT);
if (digest_stream) {
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_InitSm3(&hash[i], HEAP_HINT,
+ ret = wc_InitSm3(hash[i], HEAP_HINT,
useDeviceID ? devId: INVALID_DEVID);
if (ret != 0) {
printf("InitSm3 failed, ret = %d\n", ret);
@@ -7274,12 +7435,12 @@ void bench_sm3(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sm3Update(&hash[i], bench_plain,
+ ret = wc_Sm3Update(hash[i], bench_plain,
bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0, &times, &pending)) {
+ BENCH_ASYNC_GET_DEV(hash[i]), 0, &times, &pending)) {
goto exit_sm3;
}
}
@@ -7292,11 +7453,11 @@ void bench_sm3(int useDeviceID)
do {
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&hash[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(hash[i]),
0, &times, numBlocks, &pending)) {
- ret = wc_Sm3Final(&hash[i], digest[i]);
+ ret = wc_Sm3Final(hash[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hash[i]), 0, &times, &pending)) {
+ BENCH_ASYNC_GET_DEV(hash[i]), 0, &times, &pending)) {
goto exit_sm3;
}
}
@@ -7337,10 +7498,12 @@ exit_sm3:
exit:
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_Sm3Free(&hash[i]);
+ if (WC_ARRAY_OK(hash)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_Sm3Free(hash[i]);
+ }
+ WC_FREE_ARRAY(hash, BENCH_MAX_PENDING, HEAP_HINT);
}
-
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
}
#endif
@@ -7699,14 +7862,15 @@ exit:
static void bench_hmac(int useDeviceID, int type, int digestSz,
const byte* key, word32 keySz, const char* label)
{
- Hmac hmac[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(hmac, Hmac, BENCH_MAX_PENDING,
+ sizeof(Hmac), HEAP_HINT);
double start;
int ret = 0, i, count = 0, times, pending = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
#ifdef WOLFSSL_ASYNC_CRYPT
WC_DECLARE_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_MAX_DIGEST_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING,
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING,
WC_MAX_DIGEST_SIZE, HEAP_HINT);
#else
byte digest[BENCH_MAX_PENDING][WC_MAX_DIGEST_SIZE];
@@ -7714,19 +7878,19 @@ static void bench_hmac(int useDeviceID, int type, int digestSz,
(void)digestSz;
- /* clear for done cleanup */
- XMEMSET(hmac, 0, sizeof(hmac));
+ WC_CALLOC_ARRAY(hmac, Hmac, BENCH_MAX_PENDING,
+ sizeof(Hmac), HEAP_HINT);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- ret = wc_HmacInit(&hmac[i], HEAP_HINT,
+ ret = wc_HmacInit(hmac[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0) {
printf("wc_HmacInit failed for %s, ret = %d\n", label, ret);
goto exit;
}
- ret = wc_HmacSetKey(&hmac[i], type, key, keySz);
+ ret = wc_HmacSetKey(hmac[i], type, key, keySz);
if (ret != 0) {
printf("wc_HmacSetKey failed for %s, ret = %d\n", label, ret);
goto exit;
@@ -7741,11 +7905,11 @@ static void bench_hmac(int useDeviceID, int type, int digestSz,
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&hmac[i]), 0,
+ BENCH_ASYNC_GET_DEV(hmac[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_HmacUpdate(&hmac[i], bench_plain, bench_size);
+ ret = wc_HmacUpdate(hmac[i], bench_plain, bench_size);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hmac[i]),
+ BENCH_ASYNC_GET_DEV(hmac[i]),
0, &times, &pending)) {
goto exit_hmac;
}
@@ -7760,11 +7924,11 @@ static void bench_hmac(int useDeviceID, int type, int digestSz,
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&hmac[i]), 0,
+ BENCH_ASYNC_GET_DEV(hmac[i]), 0,
&times, numBlocks, &pending)) {
- ret = wc_HmacFinal(&hmac[i], digest[i]);
+ ret = wc_HmacFinal(hmac[i], digest[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&hmac[i]),
+ BENCH_ASYNC_GET_DEV(hmac[i]),
0, &times, &pending)) {
goto exit_hmac;
}
@@ -7787,9 +7951,10 @@ exit_hmac:
exit:
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_HmacFree(&hmac[i]);
+ wc_HmacFree(hmac[i]);
}
+ WC_FREE_ARRAY(hmac, BENCH_MAX_PENDING, HEAP_HINT);
#ifdef WOLFSSL_ASYNC_CRYPT
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
#endif
@@ -8089,28 +8254,16 @@ void bench_srtpkdf(void)
#if defined(WOLFSSL_KEY_GEN)
static void bench_rsaKeyGen_helper(int useDeviceID, word32 keySz)
{
-#ifdef WOLFSSL_SMALL_STACK
- RsaKey *genKey;
-#else
- RsaKey genKey[BENCH_MAX_PENDING];
-#endif
- double start;
+ WC_DECLARE_ARRAY(genKey, RsaKey, BENCH_MAX_PENDING,
+ sizeof(RsaKey), HEAP_HINT);
+ double start = 0;
int ret = 0, i, count = 0, times, pending = 0;
const long rsa_e_val = WC_RSA_EXPONENT;
const char**desc = bench_desc_words[lng_index];
DECLARE_MULTI_VALUE_STATS_VARS()
-#ifdef WOLFSSL_SMALL_STACK
- genKey = (RsaKey *)XMALLOC(sizeof(*genKey) * BENCH_MAX_PENDING,
- HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- if (genKey == NULL) {
- printf("bench_rsaKeyGen_helper malloc failed\n");
- return;
- }
-#endif
-
- /* clear for done cleanup */
- XMEMSET(genKey, 0, sizeof(*genKey) * BENCH_MAX_PENDING);
+ WC_CALLOC_ARRAY(genKey, RsaKey, BENCH_MAX_PENDING,
+ sizeof(RsaKey), HEAP_HINT);
bench_stats_start(&count, &start);
do {
@@ -8119,19 +8272,18 @@ static void bench_rsaKeyGen_helper(int useDeviceID, word32 keySz)
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]),
0, &times, genTimes, &pending)) {
-
- wc_FreeRsaKey(&genKey[i]);
- ret = wc_InitRsaKey_ex(&genKey[i], HEAP_HINT, devId);
+ wc_FreeRsaKey(genKey[i]);
+ ret = wc_InitRsaKey_ex(genKey[i], HEAP_HINT, devId);
if (ret < 0) {
goto exit;
}
- ret = wc_MakeRsaKey(&genKey[i], (int)keySz, rsa_e_val,
+ ret = wc_MakeRsaKey(genKey[i], (int)keySz, rsa_e_val,
&gRng);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 0,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 0,
&times, &pending)) {
goto exit;
}
@@ -8155,12 +8307,10 @@ exit:
/* cleanup */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_FreeRsaKey(&genKey[i]);
+ wc_FreeRsaKey(genKey[i]);
}
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(genKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
+ WC_FREE_ARRAY(genKey, BENCH_MAX_PENDING, HEAP_HINT);
}
void bench_rsaKeyGen(int useDeviceID)
@@ -8291,7 +8441,11 @@ static const unsigned char rsa_3072_sig[] = {
#endif
#endif /* WOLFSSL_RSA_VERIFY_INLINE || WOLFSSL_RSA_PUBLIC_ONLY */
-static void bench_rsa_helper(int useDeviceID, RsaKey rsaKey[BENCH_MAX_PENDING],
+static void bench_rsa_helper(int useDeviceID,
+ WC_ARRAY_ARG(rsaKey,
+ RsaKey,
+ BENCH_MAX_PENDING,
+ sizeof(RsaKey)),
word32 rsaKeySz)
{
int ret = 0, i, times, count = 0, pending = 0;
@@ -8306,41 +8460,38 @@ static void bench_rsa_helper(int useDeviceID, RsaKey rsaKey[BENCH_MAX_PENDING],
#ifndef WOLFSSL_RSA_VERIFY_ONLY
WC_DECLARE_VAR(message, byte, TEST_STRING_SZ, HEAP_HINT);
#endif
- WC_DECLARE_ARRAY_DYNAMIC_DEC(enc, byte, BENCH_MAX_PENDING,
+ WC_DECLARE_HEAP_ARRAY(enc, byte, BENCH_MAX_PENDING,
rsaKeySz, HEAP_HINT);
- #if ( !defined(WOLFSSL_RSA_VERIFY_INLINE) \
- && !defined(WOLFSSL_RSA_PUBLIC_ONLY) )
- WC_DECLARE_ARRAY_DYNAMIC_DEC(out, byte, BENCH_MAX_PENDING,
- rsaKeySz, HEAP_HINT);
- #else
- byte* out[BENCH_MAX_PENDING];
- #endif
+#if (!defined(WOLFSSL_RSA_VERIFY_INLINE) && \
+ !defined(WOLFSSL_RSA_PUBLIC_ONLY))
+ WC_DECLARE_HEAP_ARRAY(out, byte, BENCH_MAX_PENDING,
+ rsaKeySz, HEAP_HINT);
+#else
+ byte* out[BENCH_MAX_PENDING];
+#endif
+
+ XMEMSET(out, 0, sizeof(out));
- WC_DECLARE_ARRAY_DYNAMIC_EXE(enc, byte, BENCH_MAX_PENDING,
+ WC_ALLOC_HEAP_ARRAY(enc, byte, BENCH_MAX_PENDING,
rsaKeySz, HEAP_HINT);
- #if ( !defined(WOLFSSL_RSA_VERIFY_INLINE) \
- && !defined(WOLFSSL_RSA_PUBLIC_ONLY) )
- WC_DECLARE_ARRAY_DYNAMIC_EXE(out, byte, BENCH_MAX_PENDING,
- rsaKeySz, HEAP_HINT);
- if (out[0] == NULL) {
- ret = MEMORY_E;
- goto exit;
- }
- #endif
- if (enc[0] == NULL) {
+#if (!defined(WOLFSSL_RSA_VERIFY_INLINE) && \
+ !defined(WOLFSSL_RSA_PUBLIC_ONLY))
+ WC_ALLOC_HEAP_ARRAY(out, byte, BENCH_MAX_PENDING,
+ rsaKeySz, HEAP_HINT);
+ if (out[0] == NULL) {
ret = MEMORY_E;
goto exit;
}
-
-#ifndef WOLFSSL_RSA_VERIFY_ONLY
- #ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (message == NULL) {
+#endif
+ if (enc[0] == NULL) {
ret = MEMORY_E;
goto exit;
}
- #endif
+
+#ifndef WOLFSSL_RSA_VERIFY_ONLY
+ WC_ALLOC_VAR(message, byte, TEST_STRING_SZ, HEAP_HINT);
XMEMCPY(message, messageStr, len);
#endif
@@ -8355,14 +8506,14 @@ static void bench_rsa_helper(int useDeviceID, RsaKey rsaKey[BENCH_MAX_PENDING],
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, ntimes, &pending)) {
ret = wc_RsaPublicEncrypt(message, (word32)len, enc[i],
- rsaKeySz/8, &rsaKey[i],
+ rsaKeySz/8, rsaKey[i],
GLOBAL_RNG);
if (!bench_async_handle(&ret,
BENCH_ASYNC_GET_DEV(
- &rsaKey[i]), 1, &times,
+ rsaKey[i]), 1, &times,
&pending)) {
goto exit_rsa_verify;
}
@@ -8404,12 +8555,12 @@ exit_rsa_verify:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, ntimes, &pending)) {
ret = wc_RsaPrivateDecrypt(enc[i], idx, out[i],
- rsaKeySz/8, &rsaKey[i]);
+ rsaKeySz/8, rsaKey[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, &pending)) {
goto exit_rsa_pub;
}
@@ -8443,12 +8594,12 @@ exit_rsa_pub:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, ntimes, &pending)) {
ret = wc_RsaSSL_Sign(message, len, enc[i],
- rsaKeySz/8, &rsaKey[i], GLOBAL_RNG);
+ rsaKeySz/8, rsaKey[i], GLOBAL_RNG);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, &pending)) {
goto exit_rsa_sign;
}
@@ -8489,18 +8640,18 @@ exit_rsa_sign:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, ntimes, &pending)) {
#if !defined(WOLFSSL_RSA_VERIFY_INLINE) && \
!defined(WOLFSSL_RSA_PUBLIC_ONLY)
ret = wc_RsaSSL_Verify(enc[i], idx, out[i],
- rsaKeySz/8, &rsaKey[i]);
+ rsaKeySz/8, rsaKey[i]);
#elif defined(USE_CERT_BUFFERS_2048)
XMEMCPY(enc[i], rsa_2048_sig, sizeof(rsa_2048_sig));
idx = sizeof(rsa_2048_sig);
out[i] = NULL;
ret = wc_RsaSSL_VerifyInline(enc[i], idx,
- &out[i], &rsaKey[i]);
+ &out[i], rsaKey[i]);
if (ret > 0) {
ret = 0;
}
@@ -8510,12 +8661,12 @@ exit_rsa_sign:
idx = sizeof(rsa_3072_sig);
out[i] = NULL;
ret = wc_RsaSSL_VerifyInline(enc[i], idx,
- &out[i], &rsaKey[i]);
+ &out[i], rsaKey[i]);
if (ret > 0)
ret = 0;
#endif
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&rsaKey[i]),
+ BENCH_ASYNC_GET_DEV(rsaKey[i]),
1, &times, &pending)) {
goto exit_rsa_verifyinline;
}
@@ -8540,9 +8691,9 @@ exit_rsa_verifyinline:
exit:
- WC_FREE_ARRAY_DYNAMIC(enc, BENCH_MAX_PENDING, HEAP_HINT);
+ WC_FREE_HEAP_ARRAY(enc, BENCH_MAX_PENDING, HEAP_HINT);
#if !defined(WOLFSSL_RSA_VERIFY_INLINE) && !defined(WOLFSSL_RSA_PUBLIC_ONLY)
- WC_FREE_ARRAY_DYNAMIC(out, BENCH_MAX_PENDING, HEAP_HINT);
+ WC_FREE_HEAP_ARRAY(out, BENCH_MAX_PENDING, HEAP_HINT);
#endif
#ifndef WOLFSSL_RSA_VERIFY_ONLY
WC_FREE_VAR(message, HEAP_HINT);
@@ -8552,11 +8703,8 @@ exit:
void bench_rsa(int useDeviceID)
{
int i;
-#ifdef WOLFSSL_SMALL_STACK
- RsaKey *rsaKey;
-#else
- RsaKey rsaKey[BENCH_MAX_PENDING];
-#endif
+ WC_DECLARE_ARRAY(rsaKey, RsaKey, BENCH_MAX_PENDING,
+ sizeof(RsaKey), HEAP_HINT);
int ret = 0;
word32 rsaKeySz = 0;
const byte* tmp;
@@ -8565,14 +8713,8 @@ void bench_rsa(int useDeviceID)
word32 idx;
#endif
-#ifdef WOLFSSL_SMALL_STACK
- rsaKey = (RsaKey *)XMALLOC(sizeof(*rsaKey) * BENCH_MAX_PENDING,
- HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- if (rsaKey == NULL) {
- printf("bench_rsa malloc failed\n");
- return;
- }
-#endif
+ WC_CALLOC_ARRAY(rsaKey, RsaKey, BENCH_MAX_PENDING,
+ sizeof(RsaKey), HEAP_HINT);
#ifdef USE_CERT_BUFFERS_1024
tmp = rsa_key_der_1024;
@@ -8594,23 +8736,20 @@ void bench_rsa(int useDeviceID)
#error "need a cert buffer size"
#endif /* USE_CERT_BUFFERS */
- /* clear for done cleanup */
- XMEMSET(rsaKey, 0, sizeof(*rsaKey) * BENCH_MAX_PENDING);
-
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
/* setup an async context for each key */
- ret = wc_InitRsaKey_ex(&rsaKey[i], HEAP_HINT,
+ ret = wc_InitRsaKey_ex(rsaKey[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret < 0) {
- goto exit_bench_rsa;
+ goto exit;
}
#if !defined(WOLFSSL_RSA_PUBLIC_ONLY) && !defined(WOLFSSL_RSA_VERIFY_ONLY)
#ifdef WC_RSA_BLINDING
- ret = wc_RsaSetRNG(&rsaKey[i], &gRng);
+ ret = wc_RsaSetRNG(rsaKey[i], &gRng);
if (ret != 0)
- goto exit_bench_rsa;
+ goto exit;
#endif
#endif
@@ -8618,9 +8757,9 @@ void bench_rsa(int useDeviceID)
/* decode the private key */
idx = 0;
if ((ret = wc_RsaPrivateKeyDecode(tmp, &idx,
- &rsaKey[i], (word32)bytes)) != 0) {
+ rsaKey[i], (word32)bytes)) != 0) {
printf("wc_RsaPrivateKeyDecode failed! %d\n", ret);
- goto exit_bench_rsa;
+ goto exit;
}
#elif defined(WOLFSSL_PUBLIC_MP)
/* get offset to public portion of the RSA key */
@@ -8629,15 +8768,15 @@ void bench_rsa(int useDeviceID)
#elif defined(USE_CERT_BUFFERS_2048) || defined(USE_CERT_BUFFERS_3072)
bytes = 12;
#endif
- ret = mp_read_unsigned_bin(&rsaKey[i].n, &tmp[bytes], rsaKeySz/8);
+ ret = mp_read_unsigned_bin(&rsaKey[i]->n, &tmp[bytes], rsaKeySz/8);
if (ret != 0) {
printf("wc_RsaPrivateKeyDecode failed! %d\n", ret);
- goto exit_bench_rsa;
+ goto exit;
}
- ret = mp_set_int(&rsaKey[i].e, WC_RSA_EXPONENT);
+ ret = mp_set_int(&rsaKey[i]->e, WC_RSA_EXPONENT);
if (ret != 0) {
printf("wc_RsaPrivateKeyDecode failed! %d\n", ret);
- goto exit_bench_rsa;
+ goto exit;
}
#else
/* Note: To benchmark public only define WOLFSSL_PUBLIC_MP */
@@ -8652,15 +8791,14 @@ void bench_rsa(int useDeviceID)
(void)bytes;
(void)tmp;
-exit_bench_rsa:
+exit:
/* cleanup */
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_FreeRsaKey(&rsaKey[i]);
+ if (WC_ARRAY_OK(rsaKey)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_FreeRsaKey(rsaKey[i]);
+ }
+ WC_FREE_ARRAY(rsaKey, BENCH_MAX_PENDING, HEAP_HINT);
}
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(rsaKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
}
@@ -8669,27 +8807,17 @@ exit_bench_rsa:
void bench_rsa_key(int useDeviceID, word32 rsaKeySz)
{
int ret = 0, i, pending = 0;
-#ifdef WOLFSSL_SMALL_STACK
- RsaKey *rsaKey;
-#else
- RsaKey rsaKey[BENCH_MAX_PENDING];
-#endif
- int isPending[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(rsaKey, RsaKey, BENCH_MAX_PENDING,
+ sizeof(RsaKey), HEAP_HINT);
+ int isPending[BENCH_MAX_PENDING];
long exp = 65537L;
-#ifdef WOLFSSL_SMALL_STACK
- rsaKey = (RsaKey *)XMALLOC(sizeof(*rsaKey) * BENCH_MAX_PENDING,
- HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- if (rsaKey == NULL) {
- printf("bench_rsa_key malloc failed\n");
- return;
- }
-#endif
-
/* clear for done cleanup */
- XMEMSET(rsaKey, 0, sizeof(*rsaKey) * BENCH_MAX_PENDING);
XMEMSET(isPending, 0, sizeof(isPending));
+ WC_CALLOC_ARRAY(rsaKey, RsaKey, BENCH_MAX_PENDING,
+ sizeof(RsaKey), HEAP_HINT);
+
/* init keys */
do {
pending = 0;
@@ -8697,42 +8825,41 @@ void bench_rsa_key(int useDeviceID, word32 rsaKeySz)
if (!isPending[i]) { /* if making the key is pending then just call
* wc_MakeRsaKey again */
/* setup an async context for each key */
- if (wc_InitRsaKey_ex(&rsaKey[i], HEAP_HINT,
+ if (wc_InitRsaKey_ex(rsaKey[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID) < 0) {
- goto exit_bench_rsa_key;
+ goto exit;
}
#ifdef WC_RSA_BLINDING
- ret = wc_RsaSetRNG(&rsaKey[i], &gRng);
+ ret = wc_RsaSetRNG(rsaKey[i], &gRng);
if (ret != 0)
- goto exit_bench_rsa_key;
+ goto exit;
#endif
}
/* create the RSA key */
- ret = wc_MakeRsaKey(&rsaKey[i], (int)rsaKeySz, exp, &gRng);
+ ret = wc_MakeRsaKey(rsaKey[i], (int)rsaKeySz, exp, &gRng);
if (ret == WC_PENDING_E) {
isPending[i] = 1;
pending = 1;
}
else if (ret != 0) {
printf("wc_MakeRsaKey failed! %d\n", ret);
- goto exit_bench_rsa_key;
+ goto exit;
}
} /* for i */
} while (pending > 0);
bench_rsa_helper(useDeviceID, rsaKey, rsaKeySz);
-exit_bench_rsa_key:
+exit:
/* cleanup */
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_FreeRsaKey(&rsaKey[i]);
+ if (WC_ARRAY_OK(rsaKey)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_FreeRsaKey(rsaKey[i]);
+ }
+ WC_FREE_ARRAY(rsaKey, BENCH_MAX_PENDING, HEAP_HINT);
}
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(rsaKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
}
#endif /* WOLFSSL_KEY_GEN */
#endif /* !NO_RSA */
@@ -8768,11 +8895,8 @@ void bench_dh(int useDeviceID)
int count = 0, times, pending = 0;
const byte* tmp = NULL;
double start = 0.0F;
-#ifdef WOLFSSL_SMALL_STACK
- DhKey *dhKey = NULL;
-#else
- DhKey dhKey[BENCH_MAX_PENDING];
-#endif
+ WC_DECLARE_ARRAY(dhKey, DhKey, BENCH_MAX_PENDING,
+ sizeof(DhKey), HEAP_HINT);
int dhKeySz = BENCH_DH_KEY_SIZE * 8; /* used in printf */
const char**desc = bench_desc_words[lng_index];
#ifndef NO_ASN
@@ -8804,28 +8928,22 @@ void bench_dh(int useDeviceID)
WC_DECLARE_VAR(priv2, byte,
BENCH_DH_PRIV_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(pub, byte,
+ /* old scan-build misfires -Wmaybe-uninitialized on these. */
+ XMEMSET(pub, 0, sizeof(pub));
+ XMEMSET(agree, 0, sizeof(agree));
+ XMEMSET(priv, 0, sizeof(priv));
+
+ WC_CALLOC_ARRAY(dhKey, DhKey, BENCH_MAX_PENDING,
+ sizeof(DhKey), HEAP_HINT);
+ WC_ALLOC_ARRAY(pub, byte,
BENCH_MAX_PENDING, BENCH_DH_KEY_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(agree, byte,
+ WC_ALLOC_ARRAY(agree, byte,
BENCH_MAX_PENDING, BENCH_DH_KEY_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(priv, byte,
+ WC_ALLOC_ARRAY(priv, byte,
BENCH_MAX_PENDING, BENCH_DH_PRIV_SIZE, HEAP_HINT);
-#ifdef WOLFSSL_SMALL_STACK
- dhKey = (DhKey *)XMALLOC(sizeof(DhKey) * BENCH_MAX_PENDING, HEAP_HINT,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (! dhKey) {
- ret = MEMORY_E;
- goto exit;
- }
-#endif
-
-#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
- if (pub[0] == NULL || pub2 == NULL || agree[0] == NULL || priv[0] == NULL || priv2 == NULL) {
- ret = MEMORY_E;
- goto exit;
- }
-#endif
+ WC_ALLOC_VAR(pub2, byte, BENCH_DH_KEY_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(priv2, byte, BENCH_DH_PRIV_SIZE, HEAP_HINT);
(void)tmp;
@@ -8884,18 +9002,10 @@ void bench_dh(int useDeviceID)
}
#endif
- /* clear for done cleanup */
- XMEMSET(dhKey, 0, sizeof(DhKey) * BENCH_MAX_PENDING);
-#if 0
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- XMEMSET(dhKey[i], 0, sizeof(DhKey));
- }
-#endif
-
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
/* setup an async context for each key */
- ret = wc_InitDhKey_ex(&dhKey[i], HEAP_HINT,
+ ret = wc_InitDhKey_ex(dhKey[i], HEAP_HINT,
useDeviceID ? devId : INVALID_DEVID);
if (ret != 0)
goto exit;
@@ -8903,22 +9013,22 @@ void bench_dh(int useDeviceID)
/* setup key */
if (!use_ffdhe) {
#ifdef NO_ASN
- ret = wc_DhSetKey(&dhKey[i], dh_p,
+ ret = wc_DhSetKey(dhKey[i], dh_p,
sizeof(dh_p), dh_g, sizeof(dh_g));
#else
idx = 0;
- ret = wc_DhKeyDecode(tmp, &idx, &dhKey[i], (word32)bytes);
+ ret = wc_DhKeyDecode(tmp, &idx, dhKey[i], (word32)bytes);
#endif
}
#if defined(HAVE_FFDHE_2048) || defined(HAVE_FFDHE_3072)
#ifdef HAVE_PUBLIC_FFDHE
else if (params != NULL) {
- ret = wc_DhSetKey(&dhKey[i], params->p, params->p_len,
+ ret = wc_DhSetKey(dhKey[i], params->p, params->p_len,
params->g, params->g_len);
}
#else
else if (paramName != 0) {
- ret = wc_DhSetNamedKey(&dhKey[i], paramName);
+ ret = wc_DhSetNamedKey(dhKey[i], paramName);
}
#endif
#endif
@@ -8938,15 +9048,15 @@ void bench_dh(int useDeviceID)
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&dhKey[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(dhKey[i]),
0, &times, genTimes, &pending)) {
privSz[i] = BENCH_DH_PRIV_SIZE;
pubSz[i] = BENCH_DH_KEY_SIZE;
- ret = wc_DhGenerateKeyPair(&dhKey[i], &gRng,
+ ret = wc_DhGenerateKeyPair(dhKey[i], &gRng,
priv[i], &privSz[i],
pub[i], &pubSz[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&dhKey[i]),
+ BENCH_ASYNC_GET_DEV(dhKey[i]),
0, &times, &pending)) {
goto exit_dh_gen;
}
@@ -8977,11 +9087,11 @@ exit_dh_gen:
/* Generate key to use as other public */
PRIVATE_KEY_UNLOCK();
- ret = wc_DhGenerateKeyPair(&dhKey[0], &gRng,
+ ret = wc_DhGenerateKeyPair(dhKey[0], &gRng,
priv2, &privSz2, pub2, &pubSz2);
PRIVATE_KEY_LOCK();
#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wc_AsyncWait(ret, &dhKey[0].asyncDev, WC_ASYNC_FLAG_NONE);
+ ret = wc_AsyncWait(ret, &dhKey[0]->asyncDev, WC_ASYNC_FLAG_NONE);
#endif
/* Key Agree */
@@ -8993,12 +9103,12 @@ exit_dh_gen:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&dhKey[i]),
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(dhKey[i]),
0, &times, agreeTimes, &pending)) {
- ret = wc_DhAgree(&dhKey[i], agree[i], &agreeSz[i], priv[i],
+ ret = wc_DhAgree(dhKey[i], agree[i], &agreeSz[i], priv[i],
privSz[i], pub2, pubSz2);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&dhKey[i]), 0, &times, &pending)) {
+ BENCH_ASYNC_GET_DEV(dhKey[i]), 0, &times, &pending)) {
goto exit;
}
}
@@ -9022,19 +9132,12 @@ exit:
#endif
/* cleanup */
-#ifdef WOLFSSL_SMALL_STACK
- if (dhKey) {
+ if (WC_ARRAY_OK(dhKey)) {
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_FreeDhKey(&dhKey[i]);
+ wc_FreeDhKey(dhKey[i]);
}
- XFREE(dhKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- }
-#else
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_FreeDhKey(&dhKey[i]);
+ WC_FREE_ARRAY(dhKey, BENCH_MAX_PENDING, HEAP_HINT);
}
-#endif
-
WC_FREE_ARRAY(pub, BENCH_MAX_PENDING, HEAP_HINT);
WC_FREE_VAR(pub2, HEAP_HINT);
WC_FREE_ARRAY(priv, BENCH_MAX_PENDING, HEAP_HINT);
@@ -9347,7 +9450,7 @@ static const byte lms_pub_L4_H5_W8[60] =
0x74,0x24,0x12,0xC8
};
-static int lms_write_key_mem(const byte * priv, word32 privSz, void *context)
+static int lms_write_key_mem(const byte* priv, word32 privSz, void* context)
{
/* WARNING: THIS IS AN INSECURE WRITE CALLBACK THAT SHOULD ONLY
* BE USED FOR TESTING PURPOSES! Production applications should
@@ -9356,15 +9459,128 @@ static int lms_write_key_mem(const byte * priv, word32 privSz, void *context)
return WC_LMS_RC_SAVED_TO_NV_MEMORY;
}
-static int lms_read_key_mem(byte * priv, word32 privSz, void *context)
+static int lms_read_key_mem(byte* priv, word32 privSz, void* context)
{
/* WARNING: THIS IS AN INSECURE READ CALLBACK THAT SHOULD ONLY
* BE USED FOR TESTING PURPOSES! */
XMEMCPY(priv, context, privSz);
return WC_LMS_RC_READ_TO_MEMORY;
}
+static byte lms_priv[HSS_MAX_PRIVATE_KEY_LEN];
-static void bench_lms_sign_verify(enum wc_LmsParm parm)
+static void bench_lms_keygen(int parm, byte* pub)
+{
+ WC_RNG rng;
+ LmsKey key;
+ int ret;
+ word32 pubLen = HSS_MAX_PUBLIC_KEY_LEN;
+ int times = 0;
+ int count = 0;
+ double start = 0.0F;
+ int levels;
+ int height;
+ int winternitz;
+ const char* str = wc_LmsKey_ParmToStr(parm);
+ DECLARE_MULTI_VALUE_STATS_VARS()
+
+#ifndef HAVE_FIPS
+ ret = wc_InitRng_ex(&rng, HEAP_HINT, INVALID_DEVID);
+#else
+ ret = wc_InitRng(&rng);
+#endif
+ if (ret != 0) {
+ fprintf(stderr, "error: wc_InitRng failed: %d\n", ret);
+ return;
+ }
+
+ ret = wc_LmsKey_Init(&key, NULL, INVALID_DEVID);
+ if (ret) {
+ printf("wc_LmsKey_Init failed: %d\n", ret);
+ wc_FreeRng(&rng);
+ return;
+ }
+
+ count = 0;
+ bench_stats_start(&count, &start);
+
+ do {
+ /* LMS is stateful. Async queuing not practical. */
+ for (times = 0; times < 1; ++times) {
+
+ wc_LmsKey_Free(&key);
+
+ ret = wc_LmsKey_Init(&key, NULL, INVALID_DEVID);
+ if (ret) {
+ printf("wc_LmsKey_Init failed: %d\n", ret);
+ goto exit_lms_keygen;
+ }
+
+ ret = wc_LmsKey_SetLmsParm(&key, parm);
+ if (ret) {
+ printf("wc_LmsKey_SetLmsParm failed: %d\n", ret);
+ goto exit_lms_keygen;
+ }
+
+ ret = wc_LmsKey_GetParameters(&key, &levels, &height, &winternitz);
+ if (ret) {
+ fprintf(stderr, "error: wc_LmsKey_GetParameters failed: %d\n",
+ ret);
+ goto exit_lms_keygen;
+ }
+
+ ret = wc_LmsKey_SetWriteCb(&key, lms_write_key_mem);
+ if (ret) {
+ fprintf(stderr, "error: wc_LmsKey_SetWriteCb failed: %d\n",
+ ret);
+ goto exit_lms_keygen;
+ }
+
+ ret = wc_LmsKey_SetReadCb(&key, lms_read_key_mem);
+ if (ret) {
+ fprintf(stderr, "error: wc_LmsKey_SetReadCb failed: %d\n", ret);
+ goto exit_lms_keygen;
+ }
+
+ ret = wc_LmsKey_SetContext(&key, (void*)lms_priv);
+ if (ret) {
+ fprintf(stderr, "error: wc_LmsKey_SetContext failed: %d\n",
+ ret);
+ goto exit_lms_keygen;
+ }
+
+ ret = wc_LmsKey_MakeKey(&key, &rng);
+ if (ret) {
+ printf("wc_LmsKey_MakeKey failed: %d\n", ret);
+ goto exit_lms_keygen;
+ }
+
+ RECORD_MULTI_VALUE_STATS();
+ }
+
+ count += times;
+ } while (bench_stats_check(start)
+#ifdef MULTI_VALUE_STATISTICS
+ || runs < minimum_runs
+#endif
+ );
+
+ bench_stats_asym_finish(str, levels * height, "keygen", 0,
+ count, start, ret);
+#ifdef MULTI_VALUE_STATISTICS
+ bench_multi_value_stats(max, min, sum, squareSum, runs);
+#endif
+
+ ret = wc_LmsKey_ExportPubRaw(&key, pub, &pubLen);
+ if (ret) {
+ fprintf(stderr, "error: wc_LmsKey_ExportPubRaw failed: %d\n", ret);
+ }
+
+exit_lms_keygen:
+ wc_LmsKey_Free(&key);
+ wc_FreeRng(&rng);
+}
+
+static void bench_lms_sign_verify(int parm, byte* pub)
{
LmsKey key;
int ret = 0;
@@ -9377,8 +9593,8 @@ static void bench_lms_sign_verify(enum wc_LmsParm parm)
int times = 0;
int count = 0;
double start = 0.0F;
- byte priv[HSS_MAX_PRIVATE_KEY_LEN];
const char * str = wc_LmsKey_ParmToStr(parm);
+ DECLARE_MULTI_VALUE_STATS_VARS()
ret = wc_LmsKey_Init(&key, NULL, INVALID_DEVID);
if (ret) {
@@ -9394,33 +9610,33 @@ static void bench_lms_sign_verify(enum wc_LmsParm parm)
switch (parm) {
case WC_LMS_PARM_L2_H10_W2:
- XMEMCPY(priv, lms_priv_L2_H10_W2, sizeof(lms_priv_L2_H10_W2));
- XMEMCPY(key.pub, lms_pub_L2_H10_W2, sizeof(lms_pub_L2_H10_W2));
+ XMEMCPY(lms_priv, lms_priv_L2_H10_W2, sizeof(lms_priv_L2_H10_W2));
+ XMEMCPY(key.pub, lms_pub_L2_H10_W2, HSS_MAX_PUBLIC_KEY_LEN);
break;
case WC_LMS_PARM_L2_H10_W4:
- XMEMCPY(priv, lms_priv_L2_H10_W4, sizeof(lms_priv_L2_H10_W4));
- XMEMCPY(key.pub, lms_pub_L2_H10_W4, sizeof(lms_pub_L2_H10_W4));
+ XMEMCPY(lms_priv, lms_priv_L2_H10_W4, sizeof(lms_priv_L2_H10_W4));
+ XMEMCPY(key.pub, lms_pub_L2_H10_W4, HSS_MAX_PUBLIC_KEY_LEN);
break;
case WC_LMS_PARM_L3_H5_W4:
- XMEMCPY(priv, lms_priv_L3_H5_W4, sizeof(lms_priv_L3_H5_W4));
- XMEMCPY(key.pub, lms_pub_L3_H5_W4, sizeof(lms_pub_L3_H5_W4));
+ XMEMCPY(lms_priv, lms_priv_L3_H5_W4, sizeof(lms_priv_L3_H5_W4));
+ XMEMCPY(key.pub, lms_pub_L3_H5_W4, HSS_MAX_PUBLIC_KEY_LEN);
break;
case WC_LMS_PARM_L3_H5_W8:
- XMEMCPY(priv, lms_priv_L3_H5_W8, sizeof(lms_priv_L3_H5_W8));
- XMEMCPY(key.pub, lms_pub_L3_H5_W8, sizeof(lms_pub_L3_H5_W8));
+ XMEMCPY(lms_priv, lms_priv_L3_H5_W8, sizeof(lms_priv_L3_H5_W8));
+ XMEMCPY(key.pub, lms_pub_L3_H5_W8, HSS_MAX_PUBLIC_KEY_LEN);
break;
case WC_LMS_PARM_L3_H10_W4:
- XMEMCPY(priv, lms_priv_L3_H10_W4, sizeof(lms_priv_L3_H10_W4));
- XMEMCPY(key.pub, lms_pub_L3_H10_W4, sizeof(lms_pub_L3_H10_W4));
+ XMEMCPY(lms_priv, lms_priv_L3_H10_W4, sizeof(lms_priv_L3_H10_W4));
+ XMEMCPY(key.pub, lms_pub_L3_H10_W4, HSS_MAX_PUBLIC_KEY_LEN);
break;
case WC_LMS_PARM_L4_H5_W8:
- XMEMCPY(priv, lms_priv_L4_H5_W8, sizeof(lms_priv_L4_H5_W8));
- XMEMCPY(key.pub, lms_pub_L4_H5_W8, sizeof(lms_pub_L4_H5_W8));
+ XMEMCPY(lms_priv, lms_priv_L4_H5_W8, sizeof(lms_priv_L4_H5_W8));
+ XMEMCPY(key.pub, lms_pub_L4_H5_W8, HSS_MAX_PUBLIC_KEY_LEN);
break;
case WC_LMS_PARM_NONE:
@@ -9428,9 +9644,9 @@ static void bench_lms_sign_verify(enum wc_LmsParm parm)
case WC_LMS_PARM_L1_H15_W4:
case WC_LMS_PARM_L2_H10_W8:
case WC_LMS_PARM_L3_H5_W2:
- printf("bench_lms_sign_verify: unsupported benchmark option: %d\n",
- parm);
- goto exit_lms_sign_verify;
+ default:
+ XMEMCPY(key.pub, pub, HSS_MAX_PUBLIC_KEY_LEN);
+ break;
}
ret = wc_LmsKey_SetWriteCb(&key, lms_write_key_mem);
@@ -9445,7 +9661,7 @@ static void bench_lms_sign_verify(enum wc_LmsParm parm)
goto exit_lms_sign_verify;
}
- ret = wc_LmsKey_SetContext(&key, (void *) priv);
+ ret = wc_LmsKey_SetContext(&key, (void*)lms_priv);
if (ret) {
fprintf(stderr, "error: wc_LmsKey_SetContext failed: %d\n", ret);
goto exit_lms_sign_verify;
@@ -9454,35 +9670,68 @@ static void bench_lms_sign_verify(enum wc_LmsParm parm)
/* Even with saved priv/pub keys, we must still reload the private
* key before using it. Reloading the private key is the bottleneck
* for larger heights. Only print load time in debug builds. */
-#if defined(DEBUG_WOLFSSL)
+ count = 0;
bench_stats_start(&count, &start);
-#endif /* if defined DEBUG_WOLFSSL*/
+#ifndef WOLFSSL_WC_LMS_SMALL
+ do {
+ #ifdef WOLFSSL_WC_LMS
+ key.priv.inited = 0;
+ key.state = WC_LMS_STATE_PARMSET;
+ #endif
+ ret = wc_LmsKey_Reload(&key);
+ if (ret) {
+ printf("wc_LmsKey_Reload failed: %d\n", ret);
+ goto exit_lms_sign_verify;
+ }
+ RECORD_MULTI_VALUE_STATS();
+
+ count++;
+
+ ret = wc_LmsKey_GetSigLen(&key, &sigSz);
+ if (ret) {
+ printf("wc_LmsKey_GetSigLen failed: %d\n", ret);
+ goto exit_lms_sign_verify;
+ }
+
+ ret = wc_LmsKey_GetPrivLen(&key, &privLen);
+ if (ret) {
+ printf("wc_LmsKey_GetPrivLen failed: %d\n", ret);
+ goto exit_lms_sign_verify;
+ }
+ #ifdef HAVE_LIBLMS
+ break;
+ #endif
+ } while (bench_stats_check(start)
+#ifdef MULTI_VALUE_STATISTICS
+ || runs < minimum_runs
+#endif
+ );
+
+ bench_stats_asym_finish(str, (int)privLen, "load", 0,
+ count, start, ret);
+#ifdef MULTI_VALUE_STATISTICS
+ bench_multi_value_stats(max, min, sum, squareSum, runs);
+#endif
+
+ RESET_MULTI_VALUE_STATS_VARS();
+#else
ret = wc_LmsKey_Reload(&key);
if (ret) {
printf("wc_LmsKey_Reload failed: %d\n", ret);
goto exit_lms_sign_verify;
}
-
- count +=1;
-
ret = wc_LmsKey_GetSigLen(&key, &sigSz);
if (ret) {
printf("wc_LmsKey_GetSigLen failed: %d\n", ret);
goto exit_lms_sign_verify;
}
-
ret = wc_LmsKey_GetPrivLen(&key, &privLen);
if (ret) {
printf("wc_LmsKey_GetPrivLen failed: %d\n", ret);
goto exit_lms_sign_verify;
}
-
-#if defined(DEBUG_WOLFSSL)
- bench_stats_check(start);
- bench_stats_asym_finish(str, (int)privLen, "load", 0,
- count, start, ret);
-#endif /* if defined DEBUG_WOLFSSL*/
+#endif
loaded = 1;
@@ -9497,22 +9746,29 @@ static void bench_lms_sign_verify(enum wc_LmsParm parm)
do {
/* LMS is stateful. Async queuing not practical. */
- for (times = 0; times < ntimes; ++times) {
-
+#ifndef WOLFSSL_WC_LMS_SMALL
+ for (times = 0; times < ntimes; ++times)
+#else
+ for (times = 0; times < 1; ++times)
+#endif
+ {
ret = wc_LmsKey_Sign(&key, sig, &sigSz, (byte *) msg, msgSz);
if (ret) {
printf("wc_LmsKey_Sign failed: %d\n", ret);
goto exit_lms_sign_verify;
}
RECORD_MULTI_VALUE_STATS();
+ if (!wc_LmsKey_SigsLeft(&key)) {
+ break;
+ }
}
count += times;
- } while (bench_stats_check(start)
+ } while (wc_LmsKey_SigsLeft(&key) && (bench_stats_check(start)
#ifdef MULTI_VALUE_STATISTICS
|| runs < minimum_runs
#endif
- );
+ ));
bench_stats_asym_finish(str, (int)sigSz, "sign", 0,
count, start, ret);
@@ -9552,25 +9808,62 @@ exit_lms_sign_verify:
if (loaded) {
wc_LmsKey_Free(&key);
- loaded = 0;
- }
-
- if (sig != NULL) {
- XFREE(sig, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- sig = NULL;
}
+ XFREE(sig, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
return;
}
void bench_lms(void)
{
- bench_lms_sign_verify(WC_LMS_PARM_L2_H10_W2);
- bench_lms_sign_verify(WC_LMS_PARM_L2_H10_W4);
- bench_lms_sign_verify(WC_LMS_PARM_L3_H5_W4);
- bench_lms_sign_verify(WC_LMS_PARM_L3_H5_W8);
- bench_lms_sign_verify(WC_LMS_PARM_L3_H10_W4);
- bench_lms_sign_verify(WC_LMS_PARM_L4_H5_W8);
+ byte pub[HSS_MAX_PUBLIC_KEY_LEN];
+
+#ifdef BENCH_LMS_SLOW_KEYGEN
+#if !defined(WOLFSSL_WC_LMS) || (LMS_MAX_HEIGHT >= 15)
+ bench_lms_keygen(WC_LMS_PARM_L1_H15_W2, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L1_H15_W2, pub);
+ bench_lms_keygen(WC_LMS_PARM_L1_H15_W4, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L1_H15_W4, pub);
+ #undef LMS_PARAMS_BENCHED
+ #define LMS_PARAMS_BENCHED
+#endif
+#endif
+#if !defined(WOLFSSL_WC_LMS) || ((LMS_MAX_LEVELS >= 2) && \
+ (LMS_MAX_HEIGHT >= 10))
+ bench_lms_keygen(WC_LMS_PARM_L2_H10_W2, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L2_H10_W2, pub);
+ bench_lms_keygen(WC_LMS_PARM_L2_H10_W4, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L2_H10_W4, pub);
+ #undef LMS_PARAMS_BENCHED
+ #define LMS_PARAMS_BENCHED
+#ifdef BENCH_LMS_SLOW_KEYGEN
+ bench_lms_keygen(WC_LMS_PARM_L2_H10_W8, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L2_H10_W8, pub);
+#endif
+#endif
+#if !defined(WOLFSSL_WC_LMS) || (LMS_MAX_LEVELS >= 3)
+ bench_lms_keygen(WC_LMS_PARM_L3_H5_W4, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L3_H5_W4, pub);
+ bench_lms_keygen(WC_LMS_PARM_L3_H5_W8, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L3_H5_W8, pub);
+ #undef LMS_PARAMS_BENCHED
+ #define LMS_PARAMS_BENCHED
+#endif
+#if !defined(WOLFSSL_WC_LMS) || ((LMS_MAX_LEVELS >= 3) && \
+ (LMS_MAX_HEIGHT >= 10))
+ bench_lms_keygen(WC_LMS_PARM_L3_H10_W4, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L3_H10_W4, pub);
+#endif
+#if !defined(WOLFSSL_WC_LMS) || (LMS_MAX_LEVELS >= 4)
+ bench_lms_keygen(WC_LMS_PARM_L4_H5_W8, pub);
+ bench_lms_sign_verify(WC_LMS_PARM_L4_H5_W8, pub);
+#endif
+
+#if defined(WOLFSSL_WC_LMS) && !defined(LMS_PARAMS_BENCHED)
+ bench_lms_keygen(0x100, pub);
+ bench_lms_sign_verify(0x100, pub);
+#endif
+
return;
}
@@ -9640,11 +9933,17 @@ static void bench_xmss_sign_verify(const char * params)
}
ret = wc_XmssKey_GetPubLen(&key, &pkSz);
+ if (ret != 0) {
+ fprintf(stderr, "wc_XmssKey_GetPubLen failed: %d\n", ret);
+ goto exit_xmss_sign_verify;
+ }
+#ifndef WOLFSSL_WC_XMSS
if (pkSz != XMSS_SHA256_PUBLEN) {
- fprintf(stderr, "error: xmss pub len: got %d, expected %d\n", pkSz,
+ fprintf(stderr, "error: xmss pub len: got %u, expected %d\n", pkSz,
XMSS_SHA256_PUBLEN);
goto exit_xmss_sign_verify;
}
+#endif
ret = wc_XmssKey_GetPrivLen(&key, &skSz);
if (ret != 0 || skSz <= 0) {
@@ -9684,7 +9983,7 @@ static void bench_xmss_sign_verify(const char * params)
goto exit_xmss_sign_verify;
}
- ret = wc_XmssKey_SetContext(&key, (void *) sk);
+ ret = wc_XmssKey_SetContext(&key, (void *)sk);
if (ret != 0) {
fprintf(stderr, "error: wc_XmssKey_SetContext failed: %d\n", ret);
goto exit_xmss_sign_verify;
@@ -9697,25 +9996,21 @@ static void bench_xmss_sign_verify(const char * params)
fprintf(stderr, "sigSz: %d\n", sigSz);
#endif
- /* Making the private key is the bottleneck
- * for larger heights. Only print load time in debug builds. */
-#if defined(DEBUG_WOLFSSL)
+ /* Making the private key is the bottleneck for larger heights. */
+ count = 0;
bench_stats_start(&count, &start);
-#endif /* if defined DEBUG_WOLFSSL*/
ret = wc_XmssKey_MakeKey(&key, &rng);
if (ret != 0) {
printf("wc_XmssKey_MakeKey failed: %d\n", ret);
goto exit_xmss_sign_verify;
}
+ /* Can only do one at a time - state changes after make key. */
count +=1;
-#if defined(DEBUG_WOLFSSL)
bench_stats_check(start);
- bench_stats_asym_finish(params, (int)skSz, "load", 0,
- count, start, ret);
-#endif /* if defined DEBUG_WOLFSSL*/
+ bench_stats_asym_finish(params, (int)skSz, "gen", 0, count, start, ret);
freeKey = 1;
@@ -9724,20 +10019,24 @@ static void bench_xmss_sign_verify(const char * params)
do {
/* XMSS is stateful. Async queuing not practical. */
- for (times = 0; times < ntimes; ++times) {
-
+#ifndef WOLFSSL_WC_XMSS_SMALL
+ for (times = 0; times < ntimes; ++times)
+#else
+ for (times = 0; times < 1; ++times)
+#endif
+ {
+ if (!wc_XmssKey_SigsLeft(&key))
+ break;
ret = wc_XmssKey_Sign(&key, sig, &sigSz, (byte *) msg, msgSz);
if (ret) {
printf("wc_XmssKey_Sign failed: %d\n", ret);
goto exit_xmss_sign_verify;
}
}
-
count += times;
- } while (bench_stats_check(start));
+ } while (wc_XmssKey_SigsLeft(&key) && bench_stats_check(start));
- bench_stats_asym_finish(params, (int)sigSz, "sign", 0,
- count, start, ret);
+ bench_stats_asym_finish(params, (int)sigSz, "sign", 0, count, start, ret);
count = 0;
bench_stats_start(&count, &start);
@@ -9751,13 +10050,11 @@ static void bench_xmss_sign_verify(const char * params)
goto exit_xmss_sign_verify;
}
}
-
count += times;
} while (bench_stats_check(start));
exit_xmss_sign_verify:
- bench_stats_asym_finish(params, (int)sigSz, "verify", 0,
- count, start, ret);
+ bench_stats_asym_finish(params, (int)sigSz, "verify", 0, count, start, ret);
/* Cleanup everything. */
if (sig != NULL) {
@@ -9783,7 +10080,7 @@ exit_xmss_sign_verify:
return;
}
-void bench_xmss(void)
+void bench_xmss(int hash)
{
/* All NIST SP 800-208 approved SHA256 XMSS/XMSS^MT parameter
* sets.
@@ -9799,18 +10096,287 @@ void bench_xmss(void)
*
* h is the total height of the hyper tree, and d the number of
* trees.
- * */
- /* h/d h d */
- bench_xmss_sign_verify("XMSS-SHA2_10_256"); /* 10 10 1 */
- /* bench_xmss_sign_verify("XMSS-SHA2_16_256"); */ /* 16 16 1 */
- /* bench_xmss_sign_verify("XMSS-SHA2_20_256"); */ /* 20 20 1 */
- bench_xmss_sign_verify("XMSSMT-SHA2_20/2_256"); /* 10 20 2 */
- bench_xmss_sign_verify("XMSSMT-SHA2_20/4_256"); /* 5 20 4 */
- bench_xmss_sign_verify("XMSSMT-SHA2_40/4_256"); /* 10 40 4 */
- bench_xmss_sign_verify("XMSSMT-SHA2_40/8_256"); /* 5 40 8 */
- /* bench_xmss_sign_verify("XMSSMT-SHA2_60/3_256"); */ /* 20 60 3 */
- bench_xmss_sign_verify("XMSSMT-SHA2_60/6_256"); /* 10 60 6 */
- bench_xmss_sign_verify("XMSSMT-SHA2_60/12_256"); /* 5 60 12 */
+ */
+ /* h/d h d */
+#ifdef WC_XMSS_SHA256
+ if (hash == WC_HASH_TYPE_SHA256) {
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 256 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 256
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHA2_10_256"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHA2_16_256"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHA2_20_256"); /* 20 20 1 */
+#endif
+#endif
+#endif /* HASH_SIZE 256 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 192 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 192
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHA2_10_192"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHA2_16_192"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHA2_20_192"); /* 20 20 1 */
+#endif
+#endif
+#endif /* HASH_SIZE 192 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 256 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 256
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+ bench_xmss_sign_verify("XMSSMT-SHA2_20/2_256"); /* 10 20 2 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_20/4_256"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/2_256"); /* 20 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/4_256"); /* 10 40 4 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/8_256"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/3_256"); /* 20 60 3 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/6_256"); /* 10 60 6 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/12_256"); /* 5 60 12 */
+#endif
+#endif /* HASH_SIZE 256 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 192 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 192
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+ bench_xmss_sign_verify("XMSSMT-SHA2_20/2_192"); /* 10 20 2 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_20/4_192"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/2_192"); /* 20 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/4_192"); /* 10 40 4 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/8_192"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/3_192"); /* 20 60 3 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/6_192"); /* 10 60 6 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/12_192"); /* 5 60 12 */
+#endif
+#endif /* HASH_SIZE 192 */
+ }
+#endif
+#ifdef WC_XMSS_SHA512
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 512 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 512
+ if (hash == WC_HASH_TYPE_SHA512) {
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHA2_10_512"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHA2_16_512"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHA2_20_512"); /* 20 20 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+ bench_xmss_sign_verify("XMSSMT-SHA2_20/2_512"); /* 10 20 2 */
+ bench_xmss_sign_verify("XMSSMT-SHA2_20/4_512"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/2_512"); /* 20 40 4 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/4_512"); /* 10 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHA2_40/8_512"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/3_512"); /* 20 60 3 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/6_512"); /* 10 60 6 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHA2_60/12_512"); /* 5 60 12 */
+#endif
+ }
+#endif /* HASH_SIZE 512 */
+#endif
+#ifdef WC_XMSS_SHAKE128
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 256 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 256
+ if (hash == WC_HASH_TYPE_SHAKE128) {
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHAKE_10_256"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE_16_256"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE_20_256"); /* 20 20 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+ bench_xmss_sign_verify("XMSSMT-SHAKE_20/2_256"); /* 10 20 2 */
+ bench_xmss_sign_verify("XMSSMT-SHAKE_20/4_256"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_40/2_256"); /* 20 40 4 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_40/4_256"); /* 10 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE_40/8_256"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_60/3_256"); /* 20 60 3 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_60/6_256"); /* 10 60 6 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE_60/12_256"); /* 5 60 12 */
+#endif
+ }
+#endif /* HASH_SIZE 256 */
+#endif
+#ifdef WC_XMSS_SHAKE256
+ if (hash == WC_HASH_TYPE_SHAKE256) {
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 512 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 512
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHAKE_10_512"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE_16_512"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE_20_512"); /* 20 20 1 */
+#endif
+#endif
+#endif /* HASH_SIZE 512 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 256 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 256
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHAKE256_10_256"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE256_16_256"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE256_20_256"); /* 20 20 1 */
+#endif
+#endif
+#endif /* HASH_SIZE 256 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 192 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 192
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10 && WOLFSSL_XMSS_MAX_HEIGHT >= 10
+ bench_xmss_sign_verify("XMSS-SHAKE256_10_192"); /* 10 10 1 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 16 && WOLFSSL_XMSS_MAX_HEIGHT >= 16
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE256_16_192"); /* 16 16 1 */
+#endif
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSS-SHAKE256_20_192"); /* 20 20 1 */
+#endif
+#endif
+#endif /* HASH_SIZE 192 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 512 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 512
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_20/2_512"); /* 10 20 2 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE_20/4_512"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_40/2_512"); /* 20 40 4 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_40/4_512"); /* 10 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE_40/8_512"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_60/3_512"); /* 20 60 3 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE_60/6_512"); /* 10 60 6 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE_60/12_512"); /* 5 60 12 */
+#endif
+#endif /* HASH_SIZE 512 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 256 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 256
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_20/2_256"); /* 10 20 2 */
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_20/4_256"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_40/2_256"); /* 20 40 4 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_40/4_256"); /* 10 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_40/8_256"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_60/3_256"); /* 20 60 3 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_60/6_256"); /* 10 60 6 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_60/12_256");/* 5 60 12 */
+#endif
+#endif /* HASH_SIZE 256 */
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE <= 192 && WOLFSSL_WC_XMSS_MAX_HASH_SIZE >= 192
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 20 && WOLFSSL_XMSS_MAX_HEIGHT >= 20
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_20/2_192"); /* 10 20 2 */
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_20/4_192"); /* 5 20 4 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 40 && WOLFSSL_XMSS_MAX_HEIGHT >= 40
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_40/2_192"); /* 20 40 4 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_40/4_192"); /* 10 40 4 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_40/8_192"); /* 5 40 8 */
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 60 && WOLFSSL_XMSS_MAX_HEIGHT >= 60
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_60/3_192"); /* 20 60 3 */
+#endif
+#ifdef BENCH_XMSS_SLOW_KEYGEN
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_60/6_192"); /* 10 60 6 */
+#endif
+ bench_xmss_sign_verify("XMSSMT-SHAKE256_60/12_192");/* 5 60 12 */
+#endif
+#endif /* HASH_SIZE 192 */
+ }
+#endif
return;
}
#endif /* if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY) */
@@ -9849,34 +10415,22 @@ void bench_ecc_curve(int curveId)
void bench_eccMakeKey(int useDeviceID, int curveId)
{
- int ret = 0, i, times, count, pending = 0;
+ int ret = 0, i, times, count = 0, pending = 0;
int deviceID;
- int keySize;
-#ifdef WOLFSSL_SMALL_STACK
- ecc_key *genKey;
-#else
- ecc_key genKey[BENCH_MAX_PENDING];
-#endif
+ int keySize = 0;
+ WC_DECLARE_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
char name[BENCH_ECC_NAME_SZ];
- double start;
+ double start = 0;
const char**desc = bench_desc_words[lng_index];
DECLARE_MULTI_VALUE_STATS_VARS()
-#ifdef WOLFSSL_SMALL_STACK
- genKey = (ecc_key *)XMALLOC(sizeof(*genKey) * BENCH_MAX_PENDING,
- HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- if (genKey == NULL) {
- printf("bench_eccMakeKey malloc failed\n");
- return;
- }
-#endif
+ WC_CALLOC_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
deviceID = useDeviceID ? devId : INVALID_DEVID;
keySize = wc_ecc_get_curve_size_from_id(curveId);
- /* clear for done cleanup */
- XMEMSET(genKey, 0, sizeof(*genKey) * BENCH_MAX_PENDING);
-
/* ECC Make Key */
bench_stats_start(&count, &start);
do {
@@ -9886,19 +10440,19 @@ void bench_eccMakeKey(int useDeviceID, int curveId)
for (i = 0; i < BENCH_MAX_PENDING; i++) {
if (bench_async_check(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 0,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 0,
&times, agreeTimes, &pending)) {
- wc_ecc_free(&genKey[i]);
- ret = wc_ecc_init_ex(&genKey[i], HEAP_HINT, deviceID);
+ wc_ecc_free(genKey[i]);
+ ret = wc_ecc_init_ex(genKey[i], HEAP_HINT, deviceID);
if (ret < 0) {
goto exit;
}
- ret = wc_ecc_make_key_ex(&gRng, keySize, &genKey[i],
+ ret = wc_ecc_make_key_ex(&gRng, keySize, genKey[i],
curveId);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 0, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 0, &times,
&pending)) {
goto exit;
}
@@ -9923,13 +10477,12 @@ exit:
#endif
/* cleanup */
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_ecc_free(&genKey[i]);
+ if (WC_ARRAY_OK(genKey)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_ecc_free(genKey[i]);
+ }
+ WC_FREE_ARRAY(genKey, BENCH_MAX_PENDING, HEAP_HINT);
}
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(genKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
}
@@ -9939,22 +10492,16 @@ void bench_ecc(int useDeviceID, int curveId)
int deviceID;
int keySize;
char name[BENCH_ECC_NAME_SZ];
-#ifdef WOLFSSL_SMALL_STACK
- ecc_key *genKey;
-#else
- ecc_key genKey[BENCH_MAX_PENDING];
-#endif
+ WC_DECLARE_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#ifdef HAVE_ECC_DHE
-#ifdef WOLFSSL_SMALL_STACK
- ecc_key *genKey2;
-#else
- ecc_key genKey2[BENCH_MAX_PENDING];
-#endif
+ WC_DECLARE_ARRAY(genKey2, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#endif
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
#ifdef HAVE_ECC_VERIFY
- int verify[BENCH_MAX_PENDING];
+ int verify[BENCH_MAX_PENDING];
#endif
#endif
@@ -9975,61 +10522,48 @@ void bench_ecc(int useDeviceID, int curveId)
BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
#endif
-#ifdef WOLFSSL_SMALL_STACK
- genKey = (ecc_key *)XMALLOC(sizeof(*genKey) * BENCH_MAX_PENDING,
- HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- if (genKey == NULL) {
- printf("bench_eccMakeKey malloc failed\n");
- return;
- }
-#ifdef HAVE_ECC_DHE
- genKey2 = (ecc_key *)XMALLOC(sizeof(*genKey2) * BENCH_MAX_PENDING,
- HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- if (genKey2 == NULL) {
- XFREE(genKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- printf("bench_eccMakeKey malloc failed\n");
- return;
- }
-#endif
-#endif
+ /* old scan-build misfires -Wmaybe-uninitialized on these. */
+ XMEMSET(sig, 0, sizeof(sig));
+ XMEMSET(digest, 0, sizeof(digest));
+ XMEMSET(shared, 0, sizeof(shared));
+
+ WC_CALLOC_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#ifdef HAVE_ECC_DHE
- WC_INIT_ARRAY(shared, byte,
+ WC_CALLOC_ARRAY(genKey2, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
+ WC_ALLOC_ARRAY(shared, byte,
BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
#endif
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
- WC_INIT_ARRAY(sig, byte, BENCH_MAX_PENDING, ECC_MAX_SIG_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
+ WC_ALLOC_ARRAY(sig, byte, BENCH_MAX_PENDING, ECC_MAX_SIG_SIZE, HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
#endif
deviceID = useDeviceID ? devId : INVALID_DEVID;
- /* clear for done cleanup */
- XMEMSET(genKey, 0, sizeof(*genKey) * BENCH_MAX_PENDING);
-#ifdef HAVE_ECC_DHE
- XMEMSET(genKey2, 0, sizeof(*genKey2) * BENCH_MAX_PENDING);
-#endif
keySize = wc_ecc_get_curve_size_from_id(curveId);
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
/* setup an context for each key */
- if ((ret = wc_ecc_init_ex(&genKey[i], HEAP_HINT, deviceID)) < 0) {
+ if ((ret = wc_ecc_init_ex(genKey[i], HEAP_HINT, deviceID)) < 0) {
goto exit;
}
- ret = wc_ecc_make_key_ex(&gRng, keySize, &genKey[i], curveId);
+ ret = wc_ecc_make_key_ex(&gRng, keySize, genKey[i], curveId);
#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wc_AsyncWait(ret, &genKey[i].asyncDev, WC_ASYNC_FLAG_NONE);
+ ret = wc_AsyncWait(ret, &genKey[i]->asyncDev, WC_ASYNC_FLAG_NONE);
#endif
if (ret < 0) {
goto exit;
}
#ifdef HAVE_ECC_DHE
- if ((ret = wc_ecc_init_ex(&genKey2[i], HEAP_HINT, deviceID)) < 0) {
+ if ((ret = wc_ecc_init_ex(genKey2[i], HEAP_HINT, deviceID)) < 0) {
goto exit;
}
- if ((ret = wc_ecc_make_key_ex(&gRng, keySize, &genKey2[i],
+ if ((ret = wc_ecc_make_key_ex(&gRng, keySize, genKey2[i],
curveId)) > 0) {
goto exit;
}
@@ -10041,7 +10575,7 @@ void bench_ecc(int useDeviceID, int curveId)
(!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION != 2))) && \
!defined(HAVE_SELFTEST)
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- (void)wc_ecc_set_rng(&genKey[i], &gRng);
+ (void)wc_ecc_set_rng(genKey[i], &gRng);
}
#endif
@@ -10054,13 +10588,13 @@ void bench_ecc(int useDeviceID, int curveId)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 1,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
x[i] = (word32)keySize;
- ret = wc_ecc_shared_secret(&genKey[i], &genKey2[i],
+ ret = wc_ecc_shared_secret(genKey[i], genKey2[i],
shared[i], &x[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 1, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
goto exit_ecdhe;
}
@@ -10111,18 +10645,18 @@ exit_ecdhe:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 1,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
- if (genKey[i].state == 0) {
+ if (genKey[i]->state == 0) {
x[i] = ECC_MAX_SIG_SIZE;
}
ret = wc_ecc_sign_hash(digest[i], (word32)keySize, sig[i],
- &x[i], GLOBAL_RNG, &genKey[i]);
+ &x[i], GLOBAL_RNG, genKey[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 1, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
goto exit_ecdsa_sign;
}
@@ -10163,18 +10697,18 @@ exit_ecdsa_sign:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 1,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
- if (genKey[i].state == 0) {
+ if (genKey[i]->state == 0) {
verify[i] = 0;
}
ret = wc_ecc_verify_hash(sig[i], x[i], digest[i],
(word32)keySize, &verify[i],
- &genKey[i]);
+ genKey[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]),
+ BENCH_ASYNC_GET_DEV(genKey[i]),
1, &times,
&pending)) {
goto exit_ecdsa_verify;
@@ -10205,19 +10739,18 @@ exit_ecdsa_verify:
exit:
/* cleanup */
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_ecc_free(&genKey[i]);
- #ifdef HAVE_ECC_DHE
- wc_ecc_free(&genKey2[i]);
- #endif
+ if (WC_ARRAY_OK(genKey)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++)
+ wc_ecc_free(genKey[i]);
+ WC_FREE_ARRAY(genKey, BENCH_MAX_PENDING, HEAP_HINT);
}
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(genKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
#ifdef HAVE_ECC_DHE
- XFREE(genKey2, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+ if (WC_ARRAY_OK(genKey2)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++)
+ wc_ecc_free(genKey2[i]);
+ WC_FREE_ARRAY(genKey2, BENCH_MAX_PENDING, HEAP_HINT);
+ }
#endif
-#endif
#ifdef HAVE_ECC_DHE
WC_FREE_ARRAY(shared, BENCH_MAX_PENDING, HEAP_HINT);
@@ -10350,6 +10883,9 @@ exit_enc:
RESET_MULTI_VALUE_STATS_VARS();
+ if (ret != 0)
+ goto exit;
+
bench_stats_start(&count, &start);
do {
for (i = 0; i < ntimes; i++) {
@@ -10404,7 +10940,8 @@ static void bench_sm2_MakeKey(int useDeviceID)
int ret = 0, i, times, count, pending = 0;
int deviceID;
int keySize;
- ecc_key genKey[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
char name[BENCH_ECC_NAME_SZ];
double start;
const char**desc = bench_desc_words[lng_index];
@@ -10413,8 +10950,8 @@ static void bench_sm2_MakeKey(int useDeviceID)
deviceID = useDeviceID ? devId : INVALID_DEVID;
keySize = wc_ecc_get_curve_size_from_id(ECC_SM2P256V1);
- /* clear for done cleanup */
- XMEMSET(&genKey, 0, sizeof(genKey));
+ WC_CALLOC_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
/* ECC Make Key */
bench_stats_start(&count, &start);
@@ -10424,19 +10961,19 @@ static void bench_sm2_MakeKey(int useDeviceID)
bench_async_poll(&pending);
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 0,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 0,
&times, agreeTimes, &pending)) {
- wc_ecc_free(&genKey[i]);
- ret = wc_ecc_init_ex(&genKey[i], HEAP_HINT, deviceID);
+ wc_ecc_free(genKey[i]);
+ ret = wc_ecc_init_ex(genKey[i], HEAP_HINT, deviceID);
if (ret < 0) {
goto exit;
}
- ret = wc_ecc_sm2_make_key(&gRng, &genKey[i],
+ ret = wc_ecc_sm2_make_key(&gRng, genKey[i],
WC_ECC_FLAG_NONE);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 0, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 0, &times,
&pending)) {
goto exit;
}
@@ -10461,8 +10998,11 @@ exit:
#endif
/* cleanup */
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_ecc_free(&genKey[i]);
+ if (WC_ARRAY_OK(genKey)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++) {
+ wc_ecc_free(genKey[i]);
+ }
+ WC_FREE_ARRAY(genKey, BENCH_MAX_PENDING, HEAP_HINT);
}
}
@@ -10473,13 +11013,15 @@ void bench_sm2(int useDeviceID)
int deviceID;
int keySize;
char name[BENCH_ECC_NAME_SZ];
- ecc_key genKey[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#ifdef HAVE_ECC_DHE
- ecc_key genKey2[BENCH_MAX_PENDING];
+ WC_DECLARE_ARRAY(genKey2, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#endif
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
#ifdef HAVE_ECC_VERIFY
- int verify[BENCH_MAX_PENDING];
+ int verify[BENCH_MAX_PENDING];
#endif
#endif
word32 x[BENCH_MAX_PENDING];
@@ -10496,20 +11038,21 @@ void bench_sm2(int useDeviceID)
#endif
#ifdef HAVE_ECC_DHE
- WC_INIT_ARRAY(shared, byte, BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
+ WC_ALLOC_ARRAY(shared, byte, BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
#endif
#if !defined(NO_ASN) && defined(HAVE_ECC_SIGN)
- WC_INIT_ARRAY(sig, byte, BENCH_MAX_PENDING, ECC_MAX_SIG_SIZE, HEAP_HINT);
- WC_INIT_ARRAY(digest, byte, BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
+ WC_ALLOC_ARRAY(sig, byte, BENCH_MAX_PENDING, ECC_MAX_SIG_SIZE, HEAP_HINT);
+ WC_ALLOC_ARRAY(digest, byte, BENCH_MAX_PENDING, MAX_ECC_BYTES, HEAP_HINT);
#endif
deviceID = useDeviceID ? devId : INVALID_DEVID;
bench_sm2_MakeKey(useDeviceID);
- /* clear for done cleanup */
- XMEMSET(&genKey, 0, sizeof(genKey));
+ WC_CALLOC_ARRAY(genKey, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#ifdef HAVE_ECC_DHE
- XMEMSET(&genKey2, 0, sizeof(genKey2));
+ WC_CALLOC_ARRAY(genKey2, ecc_key, BENCH_MAX_PENDING,
+ sizeof(ecc_key), HEAP_HINT);
#endif
keySize = wc_ecc_get_curve_size_from_id(ECC_SM2P256V1);
@@ -10517,22 +11060,22 @@ void bench_sm2(int useDeviceID)
/* init keys */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
/* setup an context for each key */
- if ((ret = wc_ecc_init_ex(&genKey[i], HEAP_HINT, deviceID)) < 0) {
+ if ((ret = wc_ecc_init_ex(genKey[i], HEAP_HINT, deviceID)) < 0) {
goto exit;
}
- ret = wc_ecc_sm2_make_key(&gRng, &genKey[i], WC_ECC_FLAG_NONE);
+ ret = wc_ecc_sm2_make_key(&gRng, genKey[i], WC_ECC_FLAG_NONE);
#ifdef WOLFSSL_ASYNC_CRYPT
- ret = wc_AsyncWait(ret, &genKey[i].asyncDev, WC_ASYNC_FLAG_NONE);
+ ret = wc_AsyncWait(ret, genKey[i].asyncDev, WC_ASYNC_FLAG_NONE);
#endif
if (ret < 0) {
goto exit;
}
#ifdef HAVE_ECC_DHE
- if ((ret = wc_ecc_init_ex(&genKey2[i], HEAP_HINT, deviceID)) < 0) {
+ if ((ret = wc_ecc_init_ex(genKey2[i], HEAP_HINT, deviceID)) < 0) {
goto exit;
}
- if ((ret = wc_ecc_sm2_make_key(&gRng, &genKey2[i],
+ if ((ret = wc_ecc_sm2_make_key(&gRng, genKey2[i],
WC_ECC_FLAG_NONE)) > 0) {
goto exit;
}
@@ -10544,7 +11087,7 @@ void bench_sm2(int useDeviceID)
(!defined(HAVE_FIPS_VERSION) || (HAVE_FIPS_VERSION != 2))) && \
!defined(HAVE_SELFTEST)
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- (void)wc_ecc_set_rng(&genKey[i], &gRng);
+ (void)wc_ecc_set_rng(genKey[i], &gRng);
}
#endif
@@ -10557,13 +11100,13 @@ void bench_sm2(int useDeviceID)
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 1,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
x[i] = (word32)keySize;
- ret = wc_ecc_sm2_shared_secret(&genKey[i], &genKey2[i],
+ ret = wc_ecc_sm2_shared_secret(genKey[i], genKey2[i],
shared[i], &x[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 1, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
goto exit_ecdhe;
}
@@ -10613,14 +11156,14 @@ exit_ecdhe:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 1,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
- if (genKey[i].state == 0)
+ if (genKey[i]->state == 0)
x[i] = ECC_MAX_SIG_SIZE;
ret = wc_ecc_sm2_sign_hash(digest[i], (word32)keySize,
- sig[i], &x[i], &gRng, &genKey[i]);
+ sig[i], &x[i], &gRng, genKey[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 1, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
goto exit_ecdsa_sign;
}
@@ -10659,14 +11202,14 @@ exit_ecdsa_sign:
/* while free pending slots in queue, submit ops */
for (i = 0; i < BENCH_MAX_PENDING; i++) {
- if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(&genKey[i]), 1,
+ if (bench_async_check(&ret, BENCH_ASYNC_GET_DEV(genKey[i]), 1,
&times, agreeTimes, &pending)) {
- if (genKey[i].state == 0)
+ if (genKey[i]->state == 0)
verify[i] = 0;
ret = wc_ecc_sm2_verify_hash(sig[i], x[i], digest[i],
- (word32)keySize, &verify[i], &genKey[i]);
+ (word32)keySize, &verify[i], genKey[i]);
if (!bench_async_handle(&ret,
- BENCH_ASYNC_GET_DEV(&genKey[i]), 1, &times,
+ BENCH_ASYNC_GET_DEV(genKey[i]), 1, &times,
&pending)) {
goto exit_ecdsa_verify;
}
@@ -10697,12 +11240,18 @@ exit_ecdsa_verify:
exit:
/* cleanup */
- for (i = 0; i < BENCH_MAX_PENDING; i++) {
- wc_ecc_free(&genKey[i]);
+ if (WC_ARRAY_OK(genKey)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++)
+ wc_ecc_free(genKey[i]);
+ WC_FREE_ARRAY(genKey, BENCH_MAX_PENDING, HEAP_HINT);
+ }
#ifdef HAVE_ECC_DHE
- wc_ecc_free(&genKey2[i]);
- #endif
+ if (WC_ARRAY_OK(genKey2)) {
+ for (i = 0; i < BENCH_MAX_PENDING; i++)
+ wc_ecc_free(genKey2[i]);
+ WC_FREE_ARRAY(genKey2, BENCH_MAX_PENDING, HEAP_HINT);
}
+ #endif
#ifdef HAVE_ECC_DHE
WC_FREE_ARRAY(shared, BENCH_MAX_PENDING, HEAP_HINT);
@@ -10712,6 +11261,7 @@ exit:
WC_FREE_ARRAY(digest, BENCH_MAX_PENDING, HEAP_HINT);
#endif
+
(void)useDeviceID;
(void)pending;
(void)x;
@@ -11071,11 +11621,10 @@ void bench_ed448KeyGen(void)
#endif
}
-
void bench_ed448KeySign(void)
{
int ret;
- ed448_key genKey;
+ WC_DECLARE_VAR(genKey, ed448_key, 1, HEAP_HINT);
#ifdef HAVE_ED448_SIGN
double start;
int i, count;
@@ -11086,12 +11635,14 @@ void bench_ed448KeySign(void)
DECLARE_MULTI_VALUE_STATS_VARS()
#endif
- wc_ed448_init(&genKey);
+ WC_ALLOC_VAR(genKey, ed448_key, 1, HEAP_HINT);
- ret = wc_ed448_make_key(&gRng, ED448_KEY_SIZE, &genKey);
+ wc_ed448_init(genKey);
+
+ ret = wc_ed448_make_key(&gRng, ED448_KEY_SIZE, genKey);
if (ret != 0) {
printf("ed448_make_key failed\n");
- return;
+ goto exit;
}
#ifdef HAVE_ED448_SIGN
@@ -11103,11 +11654,11 @@ void bench_ed448KeySign(void)
do {
for (i = 0; i < agreeTimes; i++) {
x = sizeof(sig);
- ret = wc_ed448_sign_msg(msg, sizeof(msg), sig, &x, &genKey,
+ ret = wc_ed448_sign_msg(msg, sizeof(msg), sig, &x, genKey,
NULL, 0);
if (ret != 0) {
printf("ed448_sign_msg failed\n");
- goto exit_ed_sign;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11118,7 +11669,6 @@ void bench_ed448KeySign(void)
#endif
);
-exit_ed_sign:
bench_stats_asym_finish("ED", 448, desc[4], 0, count, start, ret);
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
@@ -11132,10 +11682,10 @@ exit_ed_sign:
for (i = 0; i < agreeTimes; i++) {
int verify = 0;
ret = wc_ed448_verify_msg(sig, x, msg, sizeof(msg), &verify,
- &genKey, NULL, 0);
+ genKey, NULL, 0);
if (ret != 0 || verify != 1) {
printf("ed448_verify_msg failed\n");
- goto exit_ed_verify;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11146,7 +11696,6 @@ exit_ed_sign:
#endif
);
-exit_ed_verify:
bench_stats_asym_finish("ED", 448, desc[5], 0, count, start, ret);
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
@@ -11154,7 +11703,10 @@ exit_ed_verify:
#endif /* HAVE_ED448_VERIFY */
#endif /* HAVE_ED448_SIGN */
- wc_ed448_free(&genKey);
+exit:
+
+ wc_ed448_free(genKey);
+ WC_FREE_VAR(genKey, HEAP_HINT);
}
#endif /* HAVE_ED448 */
@@ -11162,24 +11714,26 @@ exit_ed_verify:
#ifdef WOLFCRYPT_ECCSI_KMS
void bench_eccsiKeyGen(void)
{
- EccsiKey genKey;
+ WC_DECLARE_VAR(genKey, EccsiKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
int ret;
DECLARE_MULTI_VALUE_STATS_VARS()
+ WC_ALLOC_VAR(genKey, EccsiKey, 1, HEAP_HINT);
+
/* Key Gen */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- wc_InitEccsiKey(&genKey, NULL, INVALID_DEVID);
- ret = wc_MakeEccsiKey(&genKey, &gRng);
+ wc_InitEccsiKey(genKey, NULL, INVALID_DEVID);
+ ret = wc_MakeEccsiKey(genKey, &gRng);
+ wc_FreeEccsiKey(genKey);
if (ret != 0) {
printf("wc_MakeEccsiKey failed: %d\n", ret);
- break;
+ goto exit;
}
- wc_FreeEccsiKey(&genKey);
RECORD_MULTI_VALUE_STATS();
}
count += i;
@@ -11193,34 +11747,41 @@ void bench_eccsiKeyGen(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
}
void bench_eccsiPairGen(void)
{
- EccsiKey genKey;
+ WC_DECLARE_VAR(genKey, EccsiKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
- mp_int ssk;
+ WC_DECLARE_VAR(ssk, mp_int, 1, HEAP_HINT);
ecc_point* pvt;
static const byte id[] = { 0x01, 0x23, 0x34, 0x45 };
int ret;
DECLARE_MULTI_VALUE_STATS_VARS()
- (void)mp_init(&ssk);
+ WC_ALLOC_VAR(genKey, EccsiKey, 1, HEAP_HINT);
+ WC_ALLOC_VAR(ssk, mp_int, 1, HEAP_HINT);
+
+ (void)mp_init(ssk);
pvt = wc_ecc_new_point();
- wc_InitEccsiKey(&genKey, NULL, INVALID_DEVID);
- (void)wc_MakeEccsiKey(&genKey, &gRng);
+ wc_InitEccsiKey(genKey, NULL, INVALID_DEVID);
+ (void)wc_MakeEccsiKey(genKey, &gRng);
/* RSK Gen */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_MakeEccsiPair(&genKey, &gRng, WC_HASH_TYPE_SHA256, id,
- sizeof(id), &ssk, pvt);
+ ret = wc_MakeEccsiPair(genKey, &gRng, WC_HASH_TYPE_SHA256, id,
+ sizeof(id), ssk, pvt);
if (ret != 0) {
printf("wc_MakeEccsiPair failed: %d\n", ret);
- break;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11236,43 +11797,51 @@ void bench_eccsiPairGen(void)
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_FreeEccsiKey(&genKey);
+ wc_FreeEccsiKey(genKey);
wc_ecc_del_point(pvt);
- mp_free(&ssk);
+ mp_free(ssk);
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
+ WC_FREE_VAR(ssk, HEAP_HINT);
}
#endif
#ifdef WOLFCRYPT_ECCSI_CLIENT
void bench_eccsiValidate(void)
{
- EccsiKey genKey;
+ WC_DECLARE_VAR(genKey, EccsiKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
- mp_int ssk;
+ WC_DECLARE_VAR(ssk, mp_int, 1, HEAP_HINT);
ecc_point* pvt;
static const byte id[] = { 0x01, 0x23, 0x34, 0x45 };
int valid;
int ret;
DECLARE_MULTI_VALUE_STATS_VARS()
- (void)mp_init(&ssk);
+ WC_ALLOC_VAR(genKey, EccsiKey, 1, HEAP_HINT);
+ WC_ALLOC_VAR(ssk, mp_int, 1, HEAP_HINT);
+
+ (void)mp_init(ssk);
pvt = wc_ecc_new_point();
- wc_InitEccsiKey(&genKey, NULL, INVALID_DEVID);
- (void)wc_MakeEccsiKey(&genKey, &gRng);
- (void)wc_MakeEccsiPair(&genKey, &gRng, WC_HASH_TYPE_SHA256, id, sizeof(id),
- &ssk, pvt);
+ wc_InitEccsiKey(genKey, NULL, INVALID_DEVID);
+ (void)wc_MakeEccsiKey(genKey, &gRng);
+ (void)wc_MakeEccsiPair(genKey, &gRng, WC_HASH_TYPE_SHA256, id, sizeof(id),
+ ssk, pvt);
/* Validation of RSK */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_ValidateEccsiPair(&genKey, WC_HASH_TYPE_SHA256, id,
- sizeof(id), &ssk, pvt, &valid);
+ ret = wc_ValidateEccsiPair(genKey, WC_HASH_TYPE_SHA256, id,
+ sizeof(id), ssk, pvt, &valid);
if (ret != 0 || !valid) {
printf("wc_ValidateEccsiPair failed: %d (valid=%d))\n", ret,
valid);
- break;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11288,18 +11857,23 @@ void bench_eccsiValidate(void)
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_FreeEccsiKey(&genKey);
+ wc_FreeEccsiKey(genKey);
wc_ecc_del_point(pvt);
- mp_free(&ssk);
+ mp_free(ssk);
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
+ WC_FREE_VAR(ssk, HEAP_HINT);
}
void bench_eccsi(void)
{
- EccsiKey genKey;
+ WC_DECLARE_VAR(genKey, EccsiKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
- mp_int ssk;
+ WC_DECLARE_VAR(ssk, mp_int, 1, HEAP_HINT);
ecc_point* pvt;
static const byte id[] = { 0x01, 0x23, 0x34, 0x45 };
static const byte msg[] = { 0x01, 0x23, 0x34, 0x45 };
@@ -11311,22 +11885,25 @@ void bench_eccsi(void)
int verified;
DECLARE_MULTI_VALUE_STATS_VARS()
- (void)mp_init(&ssk);
+ WC_ALLOC_VAR(genKey, EccsiKey, 1, HEAP_HINT);
+ WC_ALLOC_VAR(ssk, mp_int, 1, HEAP_HINT);
+
+ (void)mp_init(ssk);
pvt = wc_ecc_new_point();
- (void)wc_InitEccsiKey(&genKey, NULL, INVALID_DEVID);
- (void)wc_MakeEccsiKey(&genKey, &gRng);
- (void)wc_MakeEccsiPair(&genKey, &gRng, WC_HASH_TYPE_SHA256, id, sizeof(id),
- &ssk, pvt);
- (void)wc_HashEccsiId(&genKey, WC_HASH_TYPE_SHA256, id, sizeof(id), pvt,
+ (void)wc_InitEccsiKey(genKey, NULL, INVALID_DEVID);
+ (void)wc_MakeEccsiKey(genKey, &gRng);
+ (void)wc_MakeEccsiPair(genKey, &gRng, WC_HASH_TYPE_SHA256, id, sizeof(id),
+ ssk, pvt);
+ (void)wc_HashEccsiId(genKey, WC_HASH_TYPE_SHA256, id, sizeof(id), pvt,
hash, &hashSz);
- (void)wc_SetEccsiHash(&genKey, hash, hashSz);
- (void)wc_SetEccsiPair(&genKey, &ssk, pvt);
+ (void)wc_SetEccsiHash(genKey, hash, hashSz);
+ (void)wc_SetEccsiPair(genKey, ssk, pvt);
/* Encapsulate */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_SignEccsiHash(&genKey, &gRng, WC_HASH_TYPE_SHA256, msg,
+ ret = wc_SignEccsiHash(genKey, &gRng, WC_HASH_TYPE_SHA256, msg,
sizeof(msg), sig, &sigSz);
if (ret != 0) {
printf("wc_SignEccsiHash failed: %d\n", ret);
@@ -11352,13 +11929,13 @@ void bench_eccsi(void)
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_VerifyEccsiHash(&genKey, WC_HASH_TYPE_SHA256, msg,
+ ret = wc_VerifyEccsiHash(genKey, WC_HASH_TYPE_SHA256, msg,
sizeof(msg), sig, sigSz, &verified);
if (ret != 0 || !verified) {
printf("wc_VerifyEccsiHash failed: %d (verified: %d)\n", ret,
verified);
- break;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11374,8 +11951,13 @@ void bench_eccsi(void)
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_FreeEccsiKey(&genKey);
+ wc_FreeEccsiKey(genKey);
wc_ecc_del_point(pvt);
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
+ WC_FREE_VAR(ssk, HEAP_HINT);
}
#endif /* WOLFCRYPT_ECCSI_CLIENT */
#endif /* WOLFCRYPT_HAVE_ECCSI */
@@ -11384,24 +11966,26 @@ void bench_eccsi(void)
#ifdef WOLFCRYPT_SAKKE_KMS
void bench_sakkeKeyGen(void)
{
- SakkeKey genKey;
+ WC_DECLARE_VAR(genKey, SakkeKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
int ret;
DECLARE_MULTI_VALUE_STATS_VARS()
+ WC_ALLOC_VAR(genKey, SakkeKey, 1, HEAP_HINT);
+
/* Key Gen */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- wc_InitSakkeKey_ex(&genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
- ret = wc_MakeSakkeKey(&genKey, &gRng);
+ wc_InitSakkeKey_ex(genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
+ ret = wc_MakeSakkeKey(genKey, &gRng);
if (ret != 0) {
printf("wc_MakeSakkeKey failed: %d\n", ret);
- break;
+ goto exit;
}
- wc_FreeSakkeKey(&genKey);
+ wc_FreeSakkeKey(genKey);
RECORD_MULTI_VALUE_STATS();
}
count += i;
@@ -11415,11 +11999,15 @@ void bench_sakkeKeyGen(void)
#ifdef MULTI_VALUE_STATISTICS
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
}
void bench_sakkeRskGen(void)
{
- SakkeKey genKey;
+ WC_DECLARE_VAR(genKey, SakkeKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
@@ -11428,18 +12016,20 @@ void bench_sakkeRskGen(void)
int ret;
DECLARE_MULTI_VALUE_STATS_VARS()
+ WC_ALLOC_VAR(genKey, SakkeKey, 1, HEAP_HINT);
+
rsk = wc_ecc_new_point();
- wc_InitSakkeKey_ex(&genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
- (void)wc_MakeSakkeKey(&genKey, &gRng);
+ wc_InitSakkeKey_ex(genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
+ (void)wc_MakeSakkeKey(genKey, &gRng);
/* RSK Gen */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_MakeSakkeRsk(&genKey, id, sizeof(id), rsk);
+ ret = wc_MakeSakkeRsk(genKey, id, sizeof(id), rsk);
if (ret != 0) {
printf("wc_MakeSakkeRsk failed: %d\n", ret);
- break;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11455,15 +12045,19 @@ void bench_sakkeRskGen(void)
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_FreeSakkeKey(&genKey);
+ wc_FreeSakkeKey(genKey);
wc_ecc_del_point(rsk);
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
}
#endif
#ifdef WOLFCRYPT_SAKKE_CLIENT
void bench_sakkeValidate(void)
{
- SakkeKey genKey;
+ WC_DECLARE_VAR(genKey, SakkeKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
@@ -11473,21 +12067,23 @@ void bench_sakkeValidate(void)
int ret;
DECLARE_MULTI_VALUE_STATS_VARS()
+ WC_ALLOC_VAR(genKey, SakkeKey, 1, HEAP_HINT);
+
rsk = wc_ecc_new_point();
- (void)wc_InitSakkeKey_ex(&genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
- (void)wc_MakeSakkeKey(&genKey, &gRng);
- (void)wc_MakeSakkeRsk(&genKey, id, sizeof(id), rsk);
- (void)wc_ValidateSakkeRsk(&genKey, id, sizeof(id), rsk, &valid);
+ (void)wc_InitSakkeKey_ex(genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
+ (void)wc_MakeSakkeKey(genKey, &gRng);
+ (void)wc_MakeSakkeRsk(genKey, id, sizeof(id), rsk);
+ (void)wc_ValidateSakkeRsk(genKey, id, sizeof(id), rsk, &valid);
/* Validation of RSK */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_ValidateSakkeRsk(&genKey, id, sizeof(id), rsk, &valid);
+ ret = wc_ValidateSakkeRsk(genKey, id, sizeof(id), rsk, &valid);
if (ret != 0 || !valid) {
printf("wc_ValidateSakkeRsk failed: %d (valid=%d))\n", ret,
valid);
- break;
+ goto exit;
}
RECORD_MULTI_VALUE_STATS();
}
@@ -11503,13 +12099,17 @@ void bench_sakkeValidate(void)
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_FreeSakkeKey(&genKey);
+ wc_FreeSakkeKey(genKey);
wc_ecc_del_point(rsk);
+
+exit:
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
}
void bench_sakke(void)
{
- SakkeKey genKey;
+ WC_DECLARE_VAR(genKey, SakkeKey, 1, HEAP_HINT);
double start;
int i, count;
const char**desc = bench_desc_words[lng_index];
@@ -11527,20 +12127,22 @@ void bench_sakke(void)
word32 iTableLen = 0;
DECLARE_MULTI_VALUE_STATS_VARS()
+ WC_ALLOC_VAR(genKey, SakkeKey, 1, HEAP_HINT);
+
XMEMCPY(ssv, ssv_init, sizeof ssv);
rsk = wc_ecc_new_point();
- (void)wc_InitSakkeKey_ex(&genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
- (void)wc_MakeSakkeKey(&genKey, &gRng);
- (void)wc_MakeSakkeRsk(&genKey, id, sizeof(id), rsk);
- (void)wc_SetSakkeRsk(&genKey, rsk, NULL, 0);
- (void)wc_SetSakkeIdentity(&genKey, id, sizeof(id));
+ (void)wc_InitSakkeKey_ex(genKey, 128, ECC_SAKKE_1, NULL, INVALID_DEVID);
+ (void)wc_MakeSakkeKey(genKey, &gRng);
+ (void)wc_MakeSakkeRsk(genKey, id, sizeof(id), rsk);
+ (void)wc_SetSakkeRsk(genKey, rsk, NULL, 0);
+ (void)wc_SetSakkeIdentity(genKey, id, sizeof(id));
/* Encapsulate */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_MakeSakkeEncapsulatedSSV(&genKey,
+ ret = wc_MakeSakkeEncapsulatedSSV(genKey,
WC_HASH_TYPE_SHA256,
ssv, sizeof(ssv), auth, &authSz);
if (ret != 0) {
@@ -11569,7 +12171,7 @@ void bench_sakke(void)
do {
for (i = 0; i < genTimes; i++) {
XMEMCPY(derSSV, ssv, sizeof(ssv));
- ret = wc_DeriveSakkeSSV(&genKey, WC_HASH_TYPE_SHA256, derSSV,
+ ret = wc_DeriveSakkeSSV(genKey, WC_HASH_TYPE_SHA256, derSSV,
sizeof(derSSV), auth, authSz);
if (ret != 0) {
printf("wc_DeriveSakkeSSV failed: %d\n", ret);
@@ -11592,19 +12194,21 @@ void bench_sakke(void)
#endif
/* Calculate Point I and generate table. */
- (void)wc_MakeSakkePointI(&genKey, id, sizeof(id));
+ (void)wc_MakeSakkePointI(genKey, id, sizeof(id));
iTableLen = 0;
- (void)wc_GenerateSakkePointITable(&genKey, NULL, &iTableLen);
+ (void)wc_GenerateSakkePointITable(genKey, NULL, &iTableLen);
if (iTableLen != 0) {
iTable = (byte*)XMALLOC(iTableLen, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- (void)wc_GenerateSakkePointITable(&genKey, iTable, &iTableLen);
+ if (iTable == NULL)
+ WC_ALLOC_DO_ON_FAILURE();
+ (void)wc_GenerateSakkePointITable(genKey, iTable, &iTableLen);
}
/* Encapsulate with Point I table */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
- ret = wc_MakeSakkeEncapsulatedSSV(&genKey,
+ ret = wc_MakeSakkeEncapsulatedSSV(genKey,
WC_HASH_TYPE_SHA256, ssv,
sizeof(ssv), auth, &authSz);
if (ret != 0) {
@@ -11628,14 +12232,14 @@ void bench_sakke(void)
RESET_MULTI_VALUE_STATS_VARS();
- (void)wc_SetSakkeRsk(&genKey, rsk, table, len);
+ (void)wc_SetSakkeRsk(genKey, rsk, table, len);
/* Derive with Point I table */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
XMEMCPY(derSSV, ssv, sizeof(ssv));
- ret = wc_DeriveSakkeSSV(&genKey, WC_HASH_TYPE_SHA256, derSSV,
+ ret = wc_DeriveSakkeSSV(genKey, WC_HASH_TYPE_SHA256, derSSV,
sizeof(derSSV), auth, authSz);
if (ret != 0) {
printf("wc_DeriveSakkeSSV failed: %d\n", ret);
@@ -11660,19 +12264,21 @@ void bench_sakke(void)
RESET_MULTI_VALUE_STATS_VARS();
len = 0;
- (void)wc_GenerateSakkeRskTable(&genKey, rsk, NULL, &len);
+ (void)wc_GenerateSakkeRskTable(genKey, rsk, NULL, &len);
if (len > 0) {
table = (byte*)XMALLOC(len, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
- (void)wc_GenerateSakkeRskTable(&genKey, rsk, table, &len);
+ if (table == NULL)
+ WC_ALLOC_DO_ON_FAILURE();
+ (void)wc_GenerateSakkeRskTable(genKey, rsk, table, &len);
}
- (void)wc_SetSakkeRsk(&genKey, rsk, table, len);
+ (void)wc_SetSakkeRsk(genKey, rsk, table, len);
/* Derive with Point I table and RSK table */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
XMEMCPY(derSSV, ssv, sizeof(ssv));
- ret = wc_DeriveSakkeSSV(&genKey, WC_HASH_TYPE_SHA256, derSSV,
+ ret = wc_DeriveSakkeSSV(genKey, WC_HASH_TYPE_SHA256, derSSV,
sizeof(derSSV), auth, authSz);
if (ret != 0) {
printf("wc_DeriveSakkeSSV failed: %d\n", ret);
@@ -11696,13 +12302,13 @@ void bench_sakke(void)
RESET_MULTI_VALUE_STATS_VARS();
- wc_ClearSakkePointITable(&genKey);
+ wc_ClearSakkePointITable(genKey);
/* Derive with RSK table */
bench_stats_start(&count, &start);
do {
for (i = 0; i < genTimes; i++) {
XMEMCPY(derSSV, ssv, sizeof(ssv));
- ret = wc_DeriveSakkeSSV(&genKey, WC_HASH_TYPE_SHA256, derSSV,
+ ret = wc_DeriveSakkeSSV(genKey, WC_HASH_TYPE_SHA256, derSSV,
sizeof(derSSV), auth, authSz);
if (ret != 0) {
printf("wc_DeriveSakkeSSV failed: %d\n", ret);
@@ -11724,8 +12330,18 @@ void bench_sakke(void)
bench_multi_value_stats(max, min, sum, squareSum, runs);
#endif
- wc_FreeSakkeKey(&genKey);
+ wc_FreeSakkeKey(genKey);
wc_ecc_del_point(rsk);
+
+exit:
+
+ if (iTable)
+ XFREE(iTable, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+
+ if (table)
+ XFREE(table, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+
+ WC_FREE_VAR(genKey, HEAP_HINT);
}
#endif /* WOLFCRYPT_SAKKE_CLIENT */
#endif /* WOLFCRYPT_HAVE_SAKKE */
@@ -11788,7 +12404,7 @@ void bench_falconKeySign(byte level)
x = FALCON_LEVEL5_SIG_SIZE;
}
- ret = wc_falcon_sign_msg(msg, sizeof(msg), sig, &x, &key);
+ ret = wc_falcon_sign_msg(msg, sizeof(msg), sig, &x, &key, GLOBAL_RNG);
if (ret != 0) {
printf("wc_falcon_sign_msg failed\n");
}
@@ -11909,7 +12525,7 @@ void bench_dilithiumKeySign(byte level)
x = DILITHIUM_LEVEL5_SIG_SIZE;
}
- ret = wc_dilithium_sign_msg(msg, sizeof(msg), sig, &x, &key);
+ ret = wc_dilithium_sign_msg(msg, sizeof(msg), sig, &x, &key, GLOBAL_RNG);
if (ret != 0) {
printf("wc_dilithium_sign_msg failed\n");
}
@@ -12055,7 +12671,7 @@ void bench_sphincsKeySign(byte level, byte optim)
x = SPHINCS_SMALL_LEVEL5_SIG_SIZE;
}
- ret = wc_sphincs_sign_msg(msg, sizeof(msg), sig, &x, &key);
+ ret = wc_sphincs_sign_msg(msg, sizeof(msg), sig, &x, &key, GLOBAL_RNG);
if (ret != 0) {
printf("wc_sphincs_sign_msg failed\n");
}
@@ -12936,7 +13552,9 @@ int wolfcrypt_benchmark_main(int argc, char** argv)
/* Both bench_pq_asym_opt and bench_pq_asym_opt2 are looking for
* -pq, so we need to do a special case for -pq since optMatched
* was set to 1 just above. */
- if (string_matches(argv[1], bench_pq_asym_opt[0].str)) {
+ if ((bench_pq_asym_opt[0].str != NULL) &&
+ string_matches(argv[1], bench_pq_asym_opt[0].str))
+ {
bench_pq_asym_algs2 |= bench_pq_asym_opt2[0].val;
bench_all = 0;
optMatched = 1;
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.h b/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.h
index cefef7ca..b814a947 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.h
+++ b/extra/wolfssl/wolfssl/wolfcrypt/benchmark/benchmark.h
@@ -103,7 +103,7 @@ void bench_rsa_key(int useDeviceID, word32 keySz);
void bench_dh(int useDeviceID);
void bench_kyber(int type);
void bench_lms(void);
-void bench_xmss(void);
+void bench_xmss(int hash);
void bench_ecc_curve(int curveId);
void bench_eccMakeKey(int useDeviceID, int curveId);
void bench_ecc(int useDeviceID, int curveId);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/aes.c b/extra/wolfssl/wolfssl/wolfcrypt/src/aes.c
index d4e44d73..e9716bcd 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/aes.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/aes.c
@@ -527,10 +527,10 @@ block cipher mechanism that uses n-bit binary string parameter key with 128-bits
#endif /* HAVE_AES_DECRYPT */
#elif defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_AES)
+ !defined(NO_WOLFSSL_ESP32_CRYPT_AES)
#include <esp_log.h>
#include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
- const char* TAG = "aes";
+ #define TAG "aes"
/* We'll use SW for fallback:
* unsupported key lengths. (e.g. ESP32-S3)
@@ -968,6 +968,10 @@ block cipher mechanism that uses n-bit binary string parameter key with 128-bits
+#if defined(WC_AES_BITSLICED) && !defined(HAVE_AES_ECB)
+ #error "When WC_AES_BITSLICED is defined, HAVE_AES_ECB is needed."
+#endif
+
#ifdef NEED_AES_TABLES
#ifndef WC_AES_BITSLICED
@@ -2889,7 +2893,7 @@ static WARN_UNUSED_RESULT WC_INLINE word32 PreFetchTd(void)
}
return x;
}
-#endif
+#endif /* !WOLFSSL_AES_SMALL_TABLES */
/* load Td Table4 into cache by cache line stride */
static WARN_UNUSED_RESULT WC_INLINE word32 PreFetchTd4(void)
@@ -2906,7 +2910,7 @@ static WARN_UNUSED_RESULT WC_INLINE word32 PreFetchTd4(void)
return 0;
#endif
}
-#endif
+#endif /* !WC_NO_CACHE_RESISTANT */
/* Decrypt a block using AES.
*
@@ -3161,7 +3165,7 @@ static void AesDecryptBlocks_C(Aes* aes, const byte* in, byte* out, word32 sz)
}
#endif
-#else
+#else /* WC_AES_BITSLICED */
/* http://cs-www.cs.yale.edu/homes/peralta/CircuitStuff/Sinv.txt */
static void bs_inv_sub_bytes(bs_word u[8])
@@ -3501,7 +3505,7 @@ static void AesDecryptBlocks_C(Aes* aes, const byte* in, byte* out, word32 sz)
}
#endif
-#endif
+#endif /* !WC_AES_BITSLICED */
#if !defined(WC_AES_BITSLICED) || defined(WOLFSSL_AES_DIRECT)
/* Software AES - ECB Decrypt */
@@ -6383,7 +6387,6 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
#endif
return BAD_FUNC_ARG;
}
-
#ifdef OPENSSL_EXTRA
XMEMSET(aes->gcm.aadH, 0, sizeof(aes->gcm.aadH));
aes->gcm.aadLen = 0;
@@ -8963,10 +8966,6 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
#ifdef WOLFSSL_AESGCM_STREAM
-#if defined(WC_AES_C_DYNAMIC_FALLBACK) && defined(WOLFSSL_AESNI)
- #error "AES-GCM streaming with AESNI is incompatible with WC_AES_C_DYNAMIC_FALLBACK."
-#endif
-
/* Initialize the AES GCM cipher with an IV. C implementation.
*
* @param [in, out] aes AES object.
@@ -8978,10 +8977,6 @@ static WARN_UNUSED_RESULT int AesGcmInit_C(Aes* aes, const byte* iv, word32 ivSz
ALIGN32 byte counter[AES_BLOCK_SIZE];
int ret;
-#ifdef WOLFSSL_AESNI
- aes->use_aesni = 0;
-#endif
-
if (ivSz == GCM_NONCE_MID_SZ) {
/* Counter is IV with bottom 4 bytes set to: 0x00,0x00,0x00,0x01. */
XMEMCPY(counter, iv, ivSz);
@@ -9208,6 +9203,7 @@ static WARN_UNUSED_RESULT int AesGcmInit_aesni(
ASSERT_SAVED_VECTOR_REGISTERS();
/* Reset state fields. */
+ aes->over = 0;
aes->aSz = 0;
aes->cSz = 0;
/* Set tag to all zeros as initial value. */
@@ -9235,8 +9231,6 @@ static WARN_UNUSED_RESULT int AesGcmInit_aesni(
aes->gcm.H, AES_COUNTER(aes), AES_INITCTR(aes));
}
- aes->use_aesni = 1;
-
return 0;
}
@@ -9862,11 +9856,12 @@ int wc_AesGcmInit(Aes* aes, const byte* key, word32 len, const byte* iv,
if (iv != NULL) {
/* Initialize with the IV. */
- VECTOR_REGISTERS_PUSH;
#ifdef WOLFSSL_AESNI
if (aes->use_aesni) {
+ SAVE_VECTOR_REGISTERS(return _svr_ret;);
ret = AesGcmInit_aesni(aes, iv, ivSz);
+ RESTORE_VECTOR_REGISTERS();
}
else
#endif
@@ -9874,8 +9869,6 @@ int wc_AesGcmInit(Aes* aes, const byte* key, word32 len, const byte* iv,
ret = AesGcmInit_C(aes, iv, ivSz);
}
- VECTOR_REGISTERS_POP;
-
if (ret == 0)
aes->nonceSet = 1;
}
@@ -9989,11 +9982,12 @@ int wc_AesGcmEncryptUpdate(Aes* aes, byte* out, const byte* in, word32 sz,
if (ret == 0) {
/* Encrypt with AAD and/or plaintext. */
- VECTOR_REGISTERS_PUSH;
#ifdef WOLFSSL_AESNI
if (aes->use_aesni) {
+ SAVE_VECTOR_REGISTERS(return _svr_ret;);
ret = AesGcmEncryptUpdate_aesni(aes, out, in, sz, authIn, authInSz);
+ RESTORE_VECTOR_REGISTERS();
}
else
#endif
@@ -10006,8 +10000,6 @@ int wc_AesGcmEncryptUpdate(Aes* aes, byte* out, const byte* in, word32 sz,
GHASH_UPDATE(aes, authIn, authInSz, out, sz);
}
}
-
- VECTOR_REGISTERS_POP;
}
return ret;
@@ -10044,17 +10036,17 @@ int wc_AesGcmEncryptFinal(Aes* aes, byte* authTag, word32 authTagSz)
if (ret == 0) {
/* Calculate authentication tag. */
- VECTOR_REGISTERS_PUSH;
#ifdef WOLFSSL_AESNI
if (aes->use_aesni) {
+ SAVE_VECTOR_REGISTERS(return _svr_ret;);
ret = AesGcmEncryptFinal_aesni(aes, authTag, authTagSz);
+ RESTORE_VECTOR_REGISTERS();
}
else
#endif
{
ret = AesGcmFinal_C(aes, authTag, authTagSz);
}
- VECTOR_REGISTERS_POP;
}
if ((ret == 0) && aes->ctrSet) {
@@ -10127,10 +10119,11 @@ int wc_AesGcmDecryptUpdate(Aes* aes, byte* out, const byte* in, word32 sz,
if (ret == 0) {
/* Decrypt with AAD and/or cipher text. */
- VECTOR_REGISTERS_PUSH;
#ifdef WOLFSSL_AESNI
if (aes->use_aesni) {
+ SAVE_VECTOR_REGISTERS(return _svr_ret;);
ret = AesGcmDecryptUpdate_aesni(aes, out, in, sz, authIn, authInSz);
+ RESTORE_VECTOR_REGISTERS();
}
else
#endif
@@ -10141,7 +10134,6 @@ int wc_AesGcmDecryptUpdate(Aes* aes, byte* out, const byte* in, word32 sz,
/* Decrypt the cipher text. */
ret = AesGcmCryptUpdate_C(aes, out, in, sz);
}
- VECTOR_REGISTERS_POP;
}
return ret;
@@ -10178,10 +10170,11 @@ int wc_AesGcmDecryptFinal(Aes* aes, const byte* authTag, word32 authTagSz)
if (ret == 0) {
/* Calculate authentication tag and compare with one passed in.. */
- VECTOR_REGISTERS_PUSH;
#ifdef WOLFSSL_AESNI
if (aes->use_aesni) {
+ SAVE_VECTOR_REGISTERS(return _svr_ret;);
ret = AesGcmDecryptFinal_aesni(aes, authTag, authTagSz);
+ RESTORE_VECTOR_REGISTERS();
}
else
#endif
@@ -10196,7 +10189,6 @@ int wc_AesGcmDecryptFinal(Aes* aes, const byte* authTag, word32 authTagSz)
}
}
}
- VECTOR_REGISTERS_POP;
}
return ret;
@@ -11103,6 +11095,12 @@ int wc_AesInit(Aes* aes, void* heap, int devId)
return BAD_FUNC_ARG;
aes->heap = heap;
+ aes->rounds = 0;
+
+#ifdef WOLFSSL_AESNI
+ /* clear here for the benefit of wc_AesGcmInit(). */
+ aes->use_aesni = 0;
+#endif
#ifdef WOLF_CRYPTO_CB
aes->devId = devId;
@@ -11410,7 +11408,7 @@ static WARN_UNUSED_RESULT int _AesEcbEncrypt(
else
#endif
{
-#ifndef WOLFSSL_ARMASM
+#ifdef NEED_AES_TABLES
AesEncryptBlocks_C(aes, in, out, sz);
#else
word32 i;
@@ -11461,7 +11459,7 @@ static WARN_UNUSED_RESULT int _AesEcbDecrypt(
else
#endif
{
-#ifndef WOLFSSL_ARMASM
+#ifdef NEED_AES_TABLES
AesDecryptBlocks_C(aes, in, out, sz);
#else
word32 i;
@@ -12249,9 +12247,17 @@ int wc_AesKeyUnWrap(const byte* key, word32 keySz, const byte* in, word32 inSz,
#ifdef WOLFSSL_AES_XTS
-/* Galios Field to use */
+/* Galois Field to use */
#define GF_XTS 0x87
+/* Set up keys for encryption and/or decryption.
+ *
+ * aes buffer holding aes subkeys
+ * heap heap hint to use for memory. Can be NULL
+ * devId id to use with async crypto. Can be 0
+ *
+ * return 0 on success
+ */
int wc_AesXtsInit(XtsAes* aes, void* heap, int devId)
{
int ret = 0;
@@ -12264,22 +12270,28 @@ int wc_AesXtsInit(XtsAes* aes, void* heap, int devId)
return ret;
}
if ((ret = wc_AesInit(&aes->aes, heap, devId)) != 0) {
+ (void)wc_AesFree(&aes->tweak);
return ret;
}
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ if ((ret = wc_AesInit(&aes->aes_decrypt, heap, devId)) != 0) {
+ (void)wc_AesFree(&aes->tweak);
+ (void)wc_AesFree(&aes->aes);
+ return ret;
+ }
+#endif
return 0;
}
-/* This is to help with setting keys to correct encrypt or decrypt type.
+/* Set up keys for encryption and/or decryption.
*
- * tweak AES key for tweak in XTS
- * aes AES key for encrypt/decrypt process
- * key buffer holding aes key | tweak key
+ * aes buffer holding aes subkeys
+ * key AES key for encrypt/decrypt and tweak process (concatenated)
* len length of key buffer in bytes. Should be twice that of key size. i.e.
* 32 for a 16 byte key.
- * dir direction, either AES_ENCRYPTION or AES_DECRYPTION
- * heap heap hint to use for memory. Can be NULL
- * devId id to use with async crypto. Can be 0
+ * dir direction: AES_ENCRYPTION, AES_DECRYPTION, or
+ * AES_ENCRYPTION_AND_DECRYPTION
*
* return 0 on success
*/
@@ -12292,27 +12304,85 @@ int wc_AesXtsSetKeyNoInit(XtsAes* aes, const byte* key, word32 len, int dir)
return BAD_FUNC_ARG;
}
+ if ((dir != AES_ENCRYPTION) && (dir != AES_DECRYPTION)
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ && (dir != AES_ENCRYPTION_AND_DECRYPTION)
+#endif
+ )
+ {
+ return BAD_FUNC_ARG;
+ }
+
keySz = len/2;
- if (keySz != 16 && keySz != 32) {
+ if (keySz != AES_128_KEY_SIZE && keySz != AES_256_KEY_SIZE) {
WOLFSSL_MSG("Unsupported key size");
return WC_KEY_SIZE_E;
}
- if ((ret = wc_AesSetKey(&aes->aes, key, keySz, NULL, dir)) == 0) {
+#ifdef HAVE_FIPS
+ if (XMEMCMP(key, key + keySz, keySz) == 0) {
+ WOLFSSL_MSG("FIPS AES-XTS main and tweak keys must differ");
+ return BAD_FUNC_ARG;
+ }
+#endif
+
+ if (dir == AES_ENCRYPTION
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ || dir == AES_ENCRYPTION_AND_DECRYPTION
+#endif
+ )
+ {
+ ret = wc_AesSetKey(&aes->aes, key, keySz, NULL, AES_ENCRYPTION);
+ }
+
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ if ((ret == 0) && ((dir == AES_DECRYPTION)
+ || (dir == AES_ENCRYPTION_AND_DECRYPTION)))
+ ret = wc_AesSetKey(&aes->aes_decrypt, key, keySz, NULL, AES_DECRYPTION);
+#else
+ if (dir == AES_DECRYPTION)
+ ret = wc_AesSetKey(&aes->aes, key, keySz, NULL, AES_DECRYPTION);
+#endif
+
+ if (ret == 0)
ret = wc_AesSetKey(&aes->tweak, key + keySz, keySz, NULL,
AES_ENCRYPTION);
- if (ret != 0) {
- wc_AesFree(&aes->aes);
- }
+
#ifdef WOLFSSL_AESNI
+ if (ret == 0) {
+ /* With WC_AES_C_DYNAMIC_FALLBACK, the main and tweak keys could have
+ * conflicting _aesni status, but the AES-XTS asm implementations need
+ * them to all be AESNI. If any aren't, disable AESNI on all.
+ */
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ if ((((dir == AES_ENCRYPTION) ||
+ (dir == AES_ENCRYPTION_AND_DECRYPTION))
+ && (aes->aes.use_aesni != aes->tweak.use_aesni))
+ ||
+ (((dir == AES_DECRYPTION) ||
+ (dir == AES_ENCRYPTION_AND_DECRYPTION))
+ && (aes->aes_decrypt.use_aesni != aes->tweak.use_aesni)))
+ {
+ #ifdef WC_AES_C_DYNAMIC_FALLBACK
+ aes->aes.use_aesni = 0;
+ aes->aes_decrypt.use_aesni = 0;
+ aes->tweak.use_aesni = 0;
+ #else
+ ret = SYSLIB_FAILED_E;
+ #endif
+ }
+ #else /* !WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS */
if (aes->aes.use_aesni != aes->tweak.use_aesni) {
- if (aes->aes.use_aesni)
- aes->aes.use_aesni = 0;
- else
- aes->tweak.use_aesni = 0;
+ #ifdef WC_AES_C_DYNAMIC_FALLBACK
+ aes->aes.use_aesni = 0;
+ aes->tweak.use_aesni = 0;
+ #else
+ ret = SYSLIB_FAILED_E;
+ #endif
}
-#endif
+ #endif /* !WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS */
}
+#endif /* WOLFSSL_AESNI */
return ret;
}
@@ -12355,6 +12425,9 @@ int wc_AesXtsFree(XtsAes* aes)
{
if (aes != NULL) {
wc_AesFree(&aes->aes);
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ wc_AesFree(&aes->aes_decrypt);
+#endif
wc_AesFree(&aes->tweak);
}
@@ -12614,10 +12687,19 @@ int wc_AesXtsEncrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
{
int ret;
+ Aes *aes;
+
if (xaes == NULL || out == NULL || in == NULL) {
return BAD_FUNC_ARG;
}
+ aes = &xaes->aes;
+
+ if (aes->keylen == 0) {
+ WOLFSSL_MSG("wc_AesXtsEncrypt called with unset encryption key.");
+ return BAD_FUNC_ARG;
+ }
+
if (iSz < AES_BLOCK_SIZE) {
return BAD_FUNC_ARG;
}
@@ -12630,28 +12712,33 @@ int wc_AesXtsEncrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
{
#ifdef WOLFSSL_AESNI
#ifdef WC_AES_C_DYNAMIC_FALLBACK
- int orig_use_aesni = xaes->aes.use_aesni;
+ int orig_use_aesni = aes->use_aesni;
#endif
- if (xaes->aes.use_aesni && ((ret = SAVE_VECTOR_REGISTERS2()) != 0)) {
+
+ if (aes->use_aesni && ((ret = SAVE_VECTOR_REGISTERS2()) != 0)) {
#ifdef WC_AES_C_DYNAMIC_FALLBACK
- xaes->aes.use_aesni = 0;
+ aes->use_aesni = 0;
xaes->tweak.use_aesni = 0;
#else
return ret;
#endif
}
- if (xaes->aes.use_aesni) {
+ if (aes->use_aesni) {
#if defined(HAVE_INTEL_AVX1)
if (IS_INTEL_AVX1(intel_flags)) {
- AES_XTS_encrypt_avx1(in, out, sz, i, (const byte*)xaes->aes.key,
- (const byte*)xaes->tweak.key, (int)xaes->aes.rounds);
+ AES_XTS_encrypt_avx1(in, out, sz, i,
+ (const byte*)aes->key,
+ (const byte*)xaes->tweak.key,
+ (int)aes->rounds);
ret = 0;
}
else
#endif
{
- AES_XTS_encrypt_aesni(in, out, sz, i, (const byte*)xaes->aes.key,
- (const byte*)xaes->tweak.key, (int)xaes->aes.rounds);
+ AES_XTS_encrypt_aesni(in, out, sz, i,
+ (const byte*)aes->key,
+ (const byte*)xaes->tweak.key,
+ (int)aes->rounds);
ret = 0;
}
}
@@ -12662,11 +12749,11 @@ int wc_AesXtsEncrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
}
#ifdef WOLFSSL_AESNI
- if (xaes->aes.use_aesni)
+ if (aes->use_aesni)
RESTORE_VECTOR_REGISTERS();
#ifdef WC_AES_C_DYNAMIC_FALLBACK
else if (orig_use_aesni) {
- xaes->aes.use_aesni = orig_use_aesni;
+ aes->use_aesni = orig_use_aesni;
xaes->tweak.use_aesni = orig_use_aesni;
}
#endif
@@ -12676,7 +12763,7 @@ int wc_AesXtsEncrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
return ret;
}
-/* Same process as encryption but Aes key is AES_DECRYPTION type.
+/* Same process as encryption but use aes_decrypt key.
*
* xaes AES keys to use for block encrypt/decrypt
* out output buffer to hold plain text
@@ -12692,7 +12779,11 @@ static int AesXtsDecrypt_sw(XtsAes* xaes, byte* out, const byte* in, word32 sz,
{
int ret = 0;
word32 blocks = (sz / AES_BLOCK_SIZE);
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ Aes *aes = &xaes->aes_decrypt;
+#else
Aes *aes = &xaes->aes;
+#endif
Aes *tweak = &xaes->tweak;
word32 j;
byte carry = 0;
@@ -12820,11 +12911,23 @@ int wc_AesXtsDecrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
const byte* i, word32 iSz)
{
int ret;
+ Aes *aes;
if (xaes == NULL || out == NULL || in == NULL) {
return BAD_FUNC_ARG;
}
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ aes = &xaes->aes_decrypt;
+#else
+ aes = &xaes->aes;
+#endif
+
+ if (aes->keylen == 0) {
+ WOLFSSL_MSG("wc_AesXtsDecrypt called with unset decryption key.");
+ return BAD_FUNC_ARG;
+ }
+
if (iSz < AES_BLOCK_SIZE) {
return BAD_FUNC_ARG;
}
@@ -12837,25 +12940,33 @@ int wc_AesXtsDecrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
{
#ifdef WOLFSSL_AESNI
#ifdef WC_AES_C_DYNAMIC_FALLBACK
- int orig_use_aesni = xaes->aes.use_aesni;
+ int orig_use_aesni = aes->use_aesni;
#endif
- if (xaes->aes.use_aesni && (SAVE_VECTOR_REGISTERS2() != 0)) {
- xaes->aes.use_aesni = 0;
+ if (aes->use_aesni && ((ret = SAVE_VECTOR_REGISTERS2() != 0))) {
+#ifdef WC_AES_C_DYNAMIC_FALLBACK
+ aes->use_aesni = 0;
xaes->tweak.use_aesni = 0;
+#else
+ return ret;
+#endif
}
- if (xaes->aes.use_aesni) {
+ if (aes->use_aesni) {
#if defined(HAVE_INTEL_AVX1)
if (IS_INTEL_AVX1(intel_flags)) {
- AES_XTS_decrypt_avx1(in, out, sz, i, (const byte*)xaes->aes.key,
- (const byte*)xaes->tweak.key, (int)xaes->aes.rounds);
+ AES_XTS_decrypt_avx1(in, out, sz, i,
+ (const byte*)aes->key,
+ (const byte*)xaes->tweak.key,
+ (int)aes->rounds);
ret = 0;
}
else
#endif
{
- AES_XTS_decrypt_aesni(in, out, sz, i, (const byte*)xaes->aes.key,
- (const byte*)xaes->tweak.key, (int)xaes->aes.rounds);
+ AES_XTS_decrypt_aesni(in, out, sz, i,
+ (const byte*)aes->key,
+ (const byte*)xaes->tweak.key,
+ (int)aes->rounds);
ret = 0;
}
}
@@ -12866,11 +12977,11 @@ int wc_AesXtsDecrypt(XtsAes* xaes, byte* out, const byte* in, word32 sz,
}
#ifdef WOLFSSL_AESNI
- if (xaes->aes.use_aesni)
+ if (aes->use_aesni)
RESTORE_VECTOR_REGISTERS();
#ifdef WC_AES_C_DYNAMIC_FALLBACK
else if (orig_use_aesni) {
- xaes->aes.use_aesni = orig_use_aesni;
+ aes->use_aesni = orig_use_aesni;
xaes->tweak.use_aesni = orig_use_aesni;
}
#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/aes_asm.S b/extra/wolfssl/wolfssl/wolfcrypt/src/aes_asm.S
index afaa0d40..f961a797 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/aes_asm.S
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/aes_asm.S
@@ -1095,12 +1095,13 @@ DECB_END_4:
void AES_128_Key_Expansion_AESNI(const unsigned char* userkey,
unsigned char* key_schedule);
*/
-.align 16,0x90
#ifndef __APPLE__
.globl AES_128_Key_Expansion_AESNI
+.align 16,0x90
AES_128_Key_Expansion_AESNI:
#else
.globl _AES_128_Key_Expansion_AESNI
+.p2align 4
_AES_128_Key_Expansion_AESNI:
#endif
# parameter 1: %rdi
@@ -1971,12 +1972,13 @@ DECB_END_4:
void AES_128_Key_Expansion_AESNI(const unsigned char* userkey,
unsigned char* key_schedule);
*/
-.align 16,0x90
#ifndef __APPLE__
.globl AES_128_Key_Expansion_AESNI
+.align 16,0x90
AES_128_Key_Expansion_AESNI:
#else
.globl _AES_128_Key_Expansion_AESNI
+.p2align 4
_AES_128_Key_Expansion_AESNI:
#endif
# parameter 1: stack[4] => %eax
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/aes_gcm_x86_asm.S b/extra/wolfssl/wolfssl/wolfcrypt/src/aes_gcm_x86_asm.S
index c428a1c4..0559a206 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/aes_gcm_x86_asm.S
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/aes_gcm_x86_asm.S
@@ -97,10 +97,10 @@ L_aes_gcm_avx2_bswap_mask:
L_aes_gcm_avx2_mod2_128:
.long 0x1,0x0,0x0,0xc2000000
.text
-.globl AES_GCM_encrypt
-.type AES_GCM_encrypt,@function
+.globl AES_GCM_encrypt_aesni
+.type AES_GCM_encrypt_aesni,@function
.align 16
-AES_GCM_encrypt:
+AES_GCM_encrypt_aesni:
pushl %ebx
pushl %esi
pushl %edi
@@ -112,7 +112,7 @@ AES_GCM_encrypt:
pxor %xmm0, %xmm0
pxor %xmm2, %xmm2
cmpl $12, %edx
- jne L_AES_GCM_encrypt_iv_not_12
+ jne L_AES_GCM_encrypt_aesni_iv_not_12
# # Calculate values when IV is 12 bytes
# Set counter based on IV
movl $0x1000000, %ecx
@@ -153,7 +153,7 @@ AES_GCM_encrypt:
aesenc %xmm3, %xmm5
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm3
- jl L_AES_GCM_encrypt_calc_iv_12_last
+ jl L_AES_GCM_encrypt_aesni_calc_iv_12_last
aesenc %xmm3, %xmm1
aesenc %xmm3, %xmm5
movdqa 176(%ebp), %xmm3
@@ -161,20 +161,20 @@ AES_GCM_encrypt:
aesenc %xmm3, %xmm5
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm3
- jl L_AES_GCM_encrypt_calc_iv_12_last
+ jl L_AES_GCM_encrypt_aesni_calc_iv_12_last
aesenc %xmm3, %xmm1
aesenc %xmm3, %xmm5
movdqa 208(%ebp), %xmm3
aesenc %xmm3, %xmm1
aesenc %xmm3, %xmm5
movdqa 224(%ebp), %xmm3
-L_AES_GCM_encrypt_calc_iv_12_last:
+L_AES_GCM_encrypt_aesni_calc_iv_12_last:
aesenclast %xmm3, %xmm1
aesenclast %xmm3, %xmm5
pshufb L_aes_gcm_bswap_mask, %xmm1
movdqu %xmm5, 80(%esp)
- jmp L_AES_GCM_encrypt_iv_done
-L_AES_GCM_encrypt_iv_not_12:
+ jmp L_AES_GCM_encrypt_aesni_iv_done
+L_AES_GCM_encrypt_aesni_iv_not_12:
# Calculate values when IV is not 12 bytes
# H = Encrypt X(=0)
movdqa (%ebp), %xmm1
@@ -189,27 +189,27 @@ L_AES_GCM_encrypt_iv_not_12:
aesenc 144(%ebp), %xmm1
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_encrypt_calc_iv_1_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_calc_iv_1_aesenc_avx_last
aesenc %xmm5, %xmm1
aesenc 176(%ebp), %xmm1
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_encrypt_calc_iv_1_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_calc_iv_1_aesenc_avx_last
aesenc %xmm5, %xmm1
aesenc 208(%ebp), %xmm1
movdqa 224(%ebp), %xmm5
-L_AES_GCM_encrypt_calc_iv_1_aesenc_avx_last:
+L_AES_GCM_encrypt_aesni_calc_iv_1_aesenc_avx_last:
aesenclast %xmm5, %xmm1
pshufb L_aes_gcm_bswap_mask, %xmm1
# Calc counter
# Initialization vector
cmpl $0x00, %edx
movl $0x00, %ecx
- je L_AES_GCM_encrypt_calc_iv_done
+ je L_AES_GCM_encrypt_aesni_calc_iv_done
cmpl $16, %edx
- jl L_AES_GCM_encrypt_calc_iv_lt16
+ jl L_AES_GCM_encrypt_aesni_calc_iv_lt16
andl $0xfffffff0, %edx
-L_AES_GCM_encrypt_calc_iv_16_loop:
+L_AES_GCM_encrypt_aesni_calc_iv_16_loop:
movdqu (%esi,%ecx,1), %xmm4
pshufb L_aes_gcm_bswap_mask, %xmm4
pxor %xmm4, %xmm0
@@ -269,22 +269,22 @@ L_AES_GCM_encrypt_calc_iv_16_loop:
pxor %xmm6, %xmm0
addl $16, %ecx
cmpl %edx, %ecx
- jl L_AES_GCM_encrypt_calc_iv_16_loop
+ jl L_AES_GCM_encrypt_aesni_calc_iv_16_loop
movl 160(%esp), %edx
cmpl %edx, %ecx
- je L_AES_GCM_encrypt_calc_iv_done
-L_AES_GCM_encrypt_calc_iv_lt16:
+ je L_AES_GCM_encrypt_aesni_calc_iv_done
+L_AES_GCM_encrypt_aesni_calc_iv_lt16:
subl $16, %esp
pxor %xmm4, %xmm4
xorl %ebx, %ebx
movdqu %xmm4, (%esp)
-L_AES_GCM_encrypt_calc_iv_loop:
+L_AES_GCM_encrypt_aesni_calc_iv_loop:
movzbl (%esi,%ecx,1), %eax
movb %al, (%esp,%ebx,1)
incl %ecx
incl %ebx
cmpl %edx, %ecx
- jl L_AES_GCM_encrypt_calc_iv_loop
+ jl L_AES_GCM_encrypt_aesni_calc_iv_loop
movdqu (%esp), %xmm4
addl $16, %esp
pshufb L_aes_gcm_bswap_mask, %xmm4
@@ -343,7 +343,7 @@ L_AES_GCM_encrypt_calc_iv_loop:
pxor %xmm5, %xmm6
pxor %xmm3, %xmm6
pxor %xmm6, %xmm0
-L_AES_GCM_encrypt_calc_iv_done:
+L_AES_GCM_encrypt_aesni_calc_iv_done:
# T = Encrypt counter
pxor %xmm4, %xmm4
shll $3, %edx
@@ -418,29 +418,29 @@ L_AES_GCM_encrypt_calc_iv_done:
aesenc 144(%ebp), %xmm4
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_encrypt_calc_iv_2_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_calc_iv_2_aesenc_avx_last
aesenc %xmm5, %xmm4
aesenc 176(%ebp), %xmm4
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_encrypt_calc_iv_2_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_calc_iv_2_aesenc_avx_last
aesenc %xmm5, %xmm4
aesenc 208(%ebp), %xmm4
movdqa 224(%ebp), %xmm5
-L_AES_GCM_encrypt_calc_iv_2_aesenc_avx_last:
+L_AES_GCM_encrypt_aesni_calc_iv_2_aesenc_avx_last:
aesenclast %xmm5, %xmm4
movdqu %xmm4, 80(%esp)
-L_AES_GCM_encrypt_iv_done:
+L_AES_GCM_encrypt_aesni_iv_done:
movl 140(%esp), %esi
# Additional authentication data
movl 156(%esp), %edx
cmpl $0x00, %edx
- je L_AES_GCM_encrypt_calc_aad_done
+ je L_AES_GCM_encrypt_aesni_calc_aad_done
xorl %ecx, %ecx
cmpl $16, %edx
- jl L_AES_GCM_encrypt_calc_aad_lt16
+ jl L_AES_GCM_encrypt_aesni_calc_aad_lt16
andl $0xfffffff0, %edx
-L_AES_GCM_encrypt_calc_aad_16_loop:
+L_AES_GCM_encrypt_aesni_calc_aad_16_loop:
movdqu (%esi,%ecx,1), %xmm4
pshufb L_aes_gcm_bswap_mask, %xmm4
pxor %xmm4, %xmm2
@@ -500,22 +500,22 @@ L_AES_GCM_encrypt_calc_aad_16_loop:
pxor %xmm6, %xmm2
addl $16, %ecx
cmpl %edx, %ecx
- jl L_AES_GCM_encrypt_calc_aad_16_loop
+ jl L_AES_GCM_encrypt_aesni_calc_aad_16_loop
movl 156(%esp), %edx
cmpl %edx, %ecx
- je L_AES_GCM_encrypt_calc_aad_done
-L_AES_GCM_encrypt_calc_aad_lt16:
+ je L_AES_GCM_encrypt_aesni_calc_aad_done
+L_AES_GCM_encrypt_aesni_calc_aad_lt16:
subl $16, %esp
pxor %xmm4, %xmm4
xorl %ebx, %ebx
movdqu %xmm4, (%esp)
-L_AES_GCM_encrypt_calc_aad_loop:
+L_AES_GCM_encrypt_aesni_calc_aad_loop:
movzbl (%esi,%ecx,1), %eax
movb %al, (%esp,%ebx,1)
incl %ecx
incl %ebx
cmpl %edx, %ecx
- jl L_AES_GCM_encrypt_calc_aad_loop
+ jl L_AES_GCM_encrypt_aesni_calc_aad_loop
movdqu (%esp), %xmm4
addl $16, %esp
pshufb L_aes_gcm_bswap_mask, %xmm4
@@ -574,7 +574,7 @@ L_AES_GCM_encrypt_calc_aad_loop:
pxor %xmm5, %xmm6
pxor %xmm3, %xmm6
pxor %xmm6, %xmm2
-L_AES_GCM_encrypt_calc_aad_done:
+L_AES_GCM_encrypt_aesni_calc_aad_done:
movdqu %xmm2, 96(%esp)
movl 132(%esp), %esi
movl 136(%esp), %edi
@@ -595,7 +595,7 @@ L_AES_GCM_encrypt_calc_aad_done:
xorl %ebx, %ebx
movl 152(%esp), %eax
cmpl $0x40, %eax
- jl L_AES_GCM_encrypt_done_64
+ jl L_AES_GCM_encrypt_aesni_done_64
andl $0xffffffc0, %eax
movdqa %xmm2, %xmm6
# H ^ 1
@@ -792,7 +792,7 @@ L_AES_GCM_encrypt_calc_aad_done:
aesenc %xmm3, %xmm7
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm3
- jl L_AES_GCM_encrypt_enc_done
+ jl L_AES_GCM_encrypt_aesni_enc_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -804,7 +804,7 @@ L_AES_GCM_encrypt_calc_aad_done:
aesenc %xmm3, %xmm7
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm3
- jl L_AES_GCM_encrypt_enc_done
+ jl L_AES_GCM_encrypt_aesni_enc_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -815,7 +815,7 @@ L_AES_GCM_encrypt_calc_aad_done:
aesenc %xmm3, %xmm6
aesenc %xmm3, %xmm7
movdqa 224(%ebp), %xmm3
-L_AES_GCM_encrypt_enc_done:
+L_AES_GCM_encrypt_aesni_enc_done:
aesenclast %xmm3, %xmm4
aesenclast %xmm3, %xmm5
movdqu (%esi), %xmm0
@@ -836,9 +836,9 @@ L_AES_GCM_encrypt_enc_done:
movl $0x40, %ebx
movl %esi, %ecx
movl %edi, %edx
- jle L_AES_GCM_encrypt_end_64
+ jle L_AES_GCM_encrypt_aesni_end_64
# More 64 bytes of input
-L_AES_GCM_encrypt_ghash_64:
+L_AES_GCM_encrypt_aesni_ghash_64:
leal (%esi,%ebx,1), %ecx
leal (%edi,%ebx,1), %edx
# Encrypt 64 bytes of counter
@@ -909,7 +909,7 @@ L_AES_GCM_encrypt_ghash_64:
aesenc %xmm3, %xmm7
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm3
- jl L_AES_GCM_encrypt_aesenc_64_ghash_avx_done
+ jl L_AES_GCM_encrypt_aesni_aesenc_64_ghash_avx_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -921,7 +921,7 @@ L_AES_GCM_encrypt_ghash_64:
aesenc %xmm3, %xmm7
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm3
- jl L_AES_GCM_encrypt_aesenc_64_ghash_avx_done
+ jl L_AES_GCM_encrypt_aesni_aesenc_64_ghash_avx_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -932,7 +932,7 @@ L_AES_GCM_encrypt_ghash_64:
aesenc %xmm3, %xmm6
aesenc %xmm3, %xmm7
movdqa 224(%ebp), %xmm3
-L_AES_GCM_encrypt_aesenc_64_ghash_avx_done:
+L_AES_GCM_encrypt_aesni_aesenc_64_ghash_avx_done:
aesenclast %xmm3, %xmm4
aesenclast %xmm3, %xmm5
movdqu (%ecx), %xmm0
@@ -1045,8 +1045,8 @@ L_AES_GCM_encrypt_aesenc_64_ghash_avx_done:
movdqu %xmm6, 96(%esp)
addl $0x40, %ebx
cmpl %eax, %ebx
- jl L_AES_GCM_encrypt_ghash_64
-L_AES_GCM_encrypt_end_64:
+ jl L_AES_GCM_encrypt_aesni_ghash_64
+L_AES_GCM_encrypt_aesni_end_64:
movdqu 96(%esp), %xmm2
# Block 1
movdqa L_aes_gcm_bswap_mask, %xmm4
@@ -1165,14 +1165,14 @@ L_AES_GCM_encrypt_end_64:
pxor %xmm0, %xmm6
pxor %xmm6, %xmm2
movdqu (%esp), %xmm1
-L_AES_GCM_encrypt_done_64:
+L_AES_GCM_encrypt_aesni_done_64:
movl 152(%esp), %edx
cmpl %edx, %ebx
- jge L_AES_GCM_encrypt_done_enc
+ jge L_AES_GCM_encrypt_aesni_done_enc
movl 152(%esp), %eax
andl $0xfffffff0, %eax
cmpl %eax, %ebx
- jge L_AES_GCM_encrypt_last_block_done
+ jge L_AES_GCM_encrypt_aesni_last_block_done
leal (%esi,%ebx,1), %ecx
leal (%edi,%ebx,1), %edx
movdqu 64(%esp), %xmm4
@@ -1192,16 +1192,16 @@ L_AES_GCM_encrypt_done_64:
aesenc 144(%ebp), %xmm4
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_encrypt_aesenc_block_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_aesenc_block_aesenc_avx_last
aesenc %xmm5, %xmm4
aesenc 176(%ebp), %xmm4
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_encrypt_aesenc_block_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_aesenc_block_aesenc_avx_last
aesenc %xmm5, %xmm4
aesenc 208(%ebp), %xmm4
movdqa 224(%ebp), %xmm5
-L_AES_GCM_encrypt_aesenc_block_aesenc_avx_last:
+L_AES_GCM_encrypt_aesni_aesenc_block_aesenc_avx_last:
aesenclast %xmm5, %xmm4
movdqu (%ecx), %xmm5
pxor %xmm5, %xmm4
@@ -1210,8 +1210,8 @@ L_AES_GCM_encrypt_aesenc_block_aesenc_avx_last:
pxor %xmm4, %xmm2
addl $16, %ebx
cmpl %eax, %ebx
- jge L_AES_GCM_encrypt_last_block_ghash
-L_AES_GCM_encrypt_last_block_start:
+ jge L_AES_GCM_encrypt_aesni_last_block_ghash
+L_AES_GCM_encrypt_aesni_last_block_start:
leal (%esi,%ebx,1), %ecx
leal (%edi,%ebx,1), %edx
movdqu 64(%esp), %xmm4
@@ -1255,16 +1255,16 @@ L_AES_GCM_encrypt_last_block_start:
pxor %xmm5, %xmm2
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_encrypt_aesenc_gfmul_last
+ jl L_AES_GCM_encrypt_aesni_aesenc_gfmul_last
aesenc %xmm5, %xmm4
aesenc 176(%ebp), %xmm4
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_encrypt_aesenc_gfmul_last
+ jl L_AES_GCM_encrypt_aesni_aesenc_gfmul_last
aesenc %xmm5, %xmm4
aesenc 208(%ebp), %xmm4
movdqa 224(%ebp), %xmm5
-L_AES_GCM_encrypt_aesenc_gfmul_last:
+L_AES_GCM_encrypt_aesni_aesenc_gfmul_last:
aesenclast %xmm5, %xmm4
movdqu (%ecx), %xmm5
pxor %xmm5, %xmm4
@@ -1273,8 +1273,8 @@ L_AES_GCM_encrypt_aesenc_gfmul_last:
pxor %xmm4, %xmm2
addl $16, %ebx
cmpl %eax, %ebx
- jl L_AES_GCM_encrypt_last_block_start
-L_AES_GCM_encrypt_last_block_ghash:
+ jl L_AES_GCM_encrypt_aesni_last_block_start
+L_AES_GCM_encrypt_aesni_last_block_ghash:
pshufd $0x4e, %xmm1, %xmm5
pshufd $0x4e, %xmm2, %xmm6
movdqa %xmm2, %xmm7
@@ -1314,11 +1314,11 @@ L_AES_GCM_encrypt_last_block_ghash:
pxor %xmm7, %xmm5
pxor %xmm4, %xmm5
pxor %xmm5, %xmm2
-L_AES_GCM_encrypt_last_block_done:
+L_AES_GCM_encrypt_aesni_last_block_done:
movl 152(%esp), %ecx
movl %ecx, %edx
andl $15, %ecx
- jz L_AES_GCM_encrypt_aesenc_last15_enc_avx_done
+ jz L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_done
movdqu 64(%esp), %xmm0
pshufb L_aes_gcm_bswap_epi64, %xmm0
pxor (%ebp), %xmm0
@@ -1333,21 +1333,21 @@ L_AES_GCM_encrypt_last_block_done:
aesenc 144(%ebp), %xmm0
cmpl $11, 172(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_encrypt_aesenc_last15_enc_avx_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_aesenc_avx_last
aesenc %xmm5, %xmm0
aesenc 176(%ebp), %xmm0
cmpl $13, 172(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_encrypt_aesenc_last15_enc_avx_aesenc_avx_last
+ jl L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_aesenc_avx_last
aesenc %xmm5, %xmm0
aesenc 208(%ebp), %xmm0
movdqa 224(%ebp), %xmm5
-L_AES_GCM_encrypt_aesenc_last15_enc_avx_aesenc_avx_last:
+L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_aesenc_avx_last:
aesenclast %xmm5, %xmm0
subl $16, %esp
xorl %ecx, %ecx
movdqu %xmm0, (%esp)
-L_AES_GCM_encrypt_aesenc_last15_enc_avx_loop:
+L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_loop:
movzbl (%esi,%ebx,1), %eax
xorb (%esp,%ecx,1), %al
movb %al, (%edi,%ebx,1)
@@ -1355,16 +1355,16 @@ L_AES_GCM_encrypt_aesenc_last15_enc_avx_loop:
incl %ebx
incl %ecx
cmpl %edx, %ebx
- jl L_AES_GCM_encrypt_aesenc_last15_enc_avx_loop
+ jl L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_loop
xorl %eax, %eax
cmpl $16, %ecx
- je L_AES_GCM_encrypt_aesenc_last15_enc_avx_finish_enc
-L_AES_GCM_encrypt_aesenc_last15_enc_avx_byte_loop:
+ je L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_finish_enc
+L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_byte_loop:
movb %al, (%esp,%ecx,1)
incl %ecx
cmpl $16, %ecx
- jl L_AES_GCM_encrypt_aesenc_last15_enc_avx_byte_loop
-L_AES_GCM_encrypt_aesenc_last15_enc_avx_finish_enc:
+ jl L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_byte_loop
+L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_finish_enc:
movdqu (%esp), %xmm0
addl $16, %esp
pshufb L_aes_gcm_bswap_mask, %xmm0
@@ -1408,8 +1408,8 @@ L_AES_GCM_encrypt_aesenc_last15_enc_avx_finish_enc:
pxor %xmm7, %xmm5
pxor %xmm4, %xmm5
pxor %xmm5, %xmm2
-L_AES_GCM_encrypt_aesenc_last15_enc_avx_done:
-L_AES_GCM_encrypt_done_enc:
+L_AES_GCM_encrypt_aesni_aesenc_last15_enc_avx_done:
+L_AES_GCM_encrypt_aesni_done_enc:
movl 148(%esp), %edi
movl 164(%esp), %ebx
movl 152(%esp), %edx
@@ -1468,31 +1468,31 @@ L_AES_GCM_encrypt_done_enc:
movdqu 80(%esp), %xmm4
pxor %xmm2, %xmm4
cmpl $16, %ebx
- je L_AES_GCM_encrypt_store_tag_16
+ je L_AES_GCM_encrypt_aesni_store_tag_16
xorl %ecx, %ecx
movdqu %xmm4, (%esp)
-L_AES_GCM_encrypt_store_tag_loop:
+L_AES_GCM_encrypt_aesni_store_tag_loop:
movzbl (%esp,%ecx,1), %eax
movb %al, (%edi,%ecx,1)
incl %ecx
cmpl %ebx, %ecx
- jne L_AES_GCM_encrypt_store_tag_loop
- jmp L_AES_GCM_encrypt_store_tag_done
-L_AES_GCM_encrypt_store_tag_16:
+ jne L_AES_GCM_encrypt_aesni_store_tag_loop
+ jmp L_AES_GCM_encrypt_aesni_store_tag_done
+L_AES_GCM_encrypt_aesni_store_tag_16:
movdqu %xmm4, (%edi)
-L_AES_GCM_encrypt_store_tag_done:
+L_AES_GCM_encrypt_aesni_store_tag_done:
addl $0x70, %esp
popl %ebp
popl %edi
popl %esi
popl %ebx
ret
-.size AES_GCM_encrypt,.-AES_GCM_encrypt
+.size AES_GCM_encrypt_aesni,.-AES_GCM_encrypt_aesni
.text
-.globl AES_GCM_decrypt
-.type AES_GCM_decrypt,@function
+.globl AES_GCM_decrypt_aesni
+.type AES_GCM_decrypt_aesni,@function
.align 16
-AES_GCM_decrypt:
+AES_GCM_decrypt_aesni:
pushl %ebx
pushl %esi
pushl %edi
@@ -1504,7 +1504,7 @@ AES_GCM_decrypt:
pxor %xmm0, %xmm0
pxor %xmm2, %xmm2
cmpl $12, %edx
- jne L_AES_GCM_decrypt_iv_not_12
+ jne L_AES_GCM_decrypt_aesni_iv_not_12
# # Calculate values when IV is 12 bytes
# Set counter based on IV
movl $0x1000000, %ecx
@@ -1545,7 +1545,7 @@ AES_GCM_decrypt:
aesenc %xmm3, %xmm5
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm3
- jl L_AES_GCM_decrypt_calc_iv_12_last
+ jl L_AES_GCM_decrypt_aesni_calc_iv_12_last
aesenc %xmm3, %xmm1
aesenc %xmm3, %xmm5
movdqa 176(%ebp), %xmm3
@@ -1553,20 +1553,20 @@ AES_GCM_decrypt:
aesenc %xmm3, %xmm5
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm3
- jl L_AES_GCM_decrypt_calc_iv_12_last
+ jl L_AES_GCM_decrypt_aesni_calc_iv_12_last
aesenc %xmm3, %xmm1
aesenc %xmm3, %xmm5
movdqa 208(%ebp), %xmm3
aesenc %xmm3, %xmm1
aesenc %xmm3, %xmm5
movdqa 224(%ebp), %xmm3
-L_AES_GCM_decrypt_calc_iv_12_last:
+L_AES_GCM_decrypt_aesni_calc_iv_12_last:
aesenclast %xmm3, %xmm1
aesenclast %xmm3, %xmm5
pshufb L_aes_gcm_bswap_mask, %xmm1
movdqu %xmm5, 80(%esp)
- jmp L_AES_GCM_decrypt_iv_done
-L_AES_GCM_decrypt_iv_not_12:
+ jmp L_AES_GCM_decrypt_aesni_iv_done
+L_AES_GCM_decrypt_aesni_iv_not_12:
# Calculate values when IV is not 12 bytes
# H = Encrypt X(=0)
movdqa (%ebp), %xmm1
@@ -1581,27 +1581,27 @@ L_AES_GCM_decrypt_iv_not_12:
aesenc 144(%ebp), %xmm1
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_decrypt_calc_iv_1_aesenc_avx_last
+ jl L_AES_GCM_decrypt_aesni_calc_iv_1_aesenc_avx_last
aesenc %xmm5, %xmm1
aesenc 176(%ebp), %xmm1
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_decrypt_calc_iv_1_aesenc_avx_last
+ jl L_AES_GCM_decrypt_aesni_calc_iv_1_aesenc_avx_last
aesenc %xmm5, %xmm1
aesenc 208(%ebp), %xmm1
movdqa 224(%ebp), %xmm5
-L_AES_GCM_decrypt_calc_iv_1_aesenc_avx_last:
+L_AES_GCM_decrypt_aesni_calc_iv_1_aesenc_avx_last:
aesenclast %xmm5, %xmm1
pshufb L_aes_gcm_bswap_mask, %xmm1
# Calc counter
# Initialization vector
cmpl $0x00, %edx
movl $0x00, %ecx
- je L_AES_GCM_decrypt_calc_iv_done
+ je L_AES_GCM_decrypt_aesni_calc_iv_done
cmpl $16, %edx
- jl L_AES_GCM_decrypt_calc_iv_lt16
+ jl L_AES_GCM_decrypt_aesni_calc_iv_lt16
andl $0xfffffff0, %edx
-L_AES_GCM_decrypt_calc_iv_16_loop:
+L_AES_GCM_decrypt_aesni_calc_iv_16_loop:
movdqu (%esi,%ecx,1), %xmm4
pshufb L_aes_gcm_bswap_mask, %xmm4
pxor %xmm4, %xmm0
@@ -1661,22 +1661,22 @@ L_AES_GCM_decrypt_calc_iv_16_loop:
pxor %xmm6, %xmm0
addl $16, %ecx
cmpl %edx, %ecx
- jl L_AES_GCM_decrypt_calc_iv_16_loop
+ jl L_AES_GCM_decrypt_aesni_calc_iv_16_loop
movl 224(%esp), %edx
cmpl %edx, %ecx
- je L_AES_GCM_decrypt_calc_iv_done
-L_AES_GCM_decrypt_calc_iv_lt16:
+ je L_AES_GCM_decrypt_aesni_calc_iv_done
+L_AES_GCM_decrypt_aesni_calc_iv_lt16:
subl $16, %esp
pxor %xmm4, %xmm4
xorl %ebx, %ebx
movdqu %xmm4, (%esp)
-L_AES_GCM_decrypt_calc_iv_loop:
+L_AES_GCM_decrypt_aesni_calc_iv_loop:
movzbl (%esi,%ecx,1), %eax
movb %al, (%esp,%ebx,1)
incl %ecx
incl %ebx
cmpl %edx, %ecx
- jl L_AES_GCM_decrypt_calc_iv_loop
+ jl L_AES_GCM_decrypt_aesni_calc_iv_loop
movdqu (%esp), %xmm4
addl $16, %esp
pshufb L_aes_gcm_bswap_mask, %xmm4
@@ -1735,7 +1735,7 @@ L_AES_GCM_decrypt_calc_iv_loop:
pxor %xmm5, %xmm6
pxor %xmm3, %xmm6
pxor %xmm6, %xmm0
-L_AES_GCM_decrypt_calc_iv_done:
+L_AES_GCM_decrypt_aesni_calc_iv_done:
# T = Encrypt counter
pxor %xmm4, %xmm4
shll $3, %edx
@@ -1810,29 +1810,29 @@ L_AES_GCM_decrypt_calc_iv_done:
aesenc 144(%ebp), %xmm4
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_decrypt_calc_iv_2_aesenc_avx_last
+ jl L_AES_GCM_decrypt_aesni_calc_iv_2_aesenc_avx_last
aesenc %xmm5, %xmm4
aesenc 176(%ebp), %xmm4
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_decrypt_calc_iv_2_aesenc_avx_last
+ jl L_AES_GCM_decrypt_aesni_calc_iv_2_aesenc_avx_last
aesenc %xmm5, %xmm4
aesenc 208(%ebp), %xmm4
movdqa 224(%ebp), %xmm5
-L_AES_GCM_decrypt_calc_iv_2_aesenc_avx_last:
+L_AES_GCM_decrypt_aesni_calc_iv_2_aesenc_avx_last:
aesenclast %xmm5, %xmm4
movdqu %xmm4, 80(%esp)
-L_AES_GCM_decrypt_iv_done:
+L_AES_GCM_decrypt_aesni_iv_done:
movl 204(%esp), %esi
# Additional authentication data
movl 220(%esp), %edx
cmpl $0x00, %edx
- je L_AES_GCM_decrypt_calc_aad_done
+ je L_AES_GCM_decrypt_aesni_calc_aad_done
xorl %ecx, %ecx
cmpl $16, %edx
- jl L_AES_GCM_decrypt_calc_aad_lt16
+ jl L_AES_GCM_decrypt_aesni_calc_aad_lt16
andl $0xfffffff0, %edx
-L_AES_GCM_decrypt_calc_aad_16_loop:
+L_AES_GCM_decrypt_aesni_calc_aad_16_loop:
movdqu (%esi,%ecx,1), %xmm4
pshufb L_aes_gcm_bswap_mask, %xmm4
pxor %xmm4, %xmm2
@@ -1892,22 +1892,22 @@ L_AES_GCM_decrypt_calc_aad_16_loop:
pxor %xmm6, %xmm2
addl $16, %ecx
cmpl %edx, %ecx
- jl L_AES_GCM_decrypt_calc_aad_16_loop
+ jl L_AES_GCM_decrypt_aesni_calc_aad_16_loop
movl 220(%esp), %edx
cmpl %edx, %ecx
- je L_AES_GCM_decrypt_calc_aad_done
-L_AES_GCM_decrypt_calc_aad_lt16:
+ je L_AES_GCM_decrypt_aesni_calc_aad_done
+L_AES_GCM_decrypt_aesni_calc_aad_lt16:
subl $16, %esp
pxor %xmm4, %xmm4
xorl %ebx, %ebx
movdqu %xmm4, (%esp)
-L_AES_GCM_decrypt_calc_aad_loop:
+L_AES_GCM_decrypt_aesni_calc_aad_loop:
movzbl (%esi,%ecx,1), %eax
movb %al, (%esp,%ebx,1)
incl %ecx
incl %ebx
cmpl %edx, %ecx
- jl L_AES_GCM_decrypt_calc_aad_loop
+ jl L_AES_GCM_decrypt_aesni_calc_aad_loop
movdqu (%esp), %xmm4
addl $16, %esp
pshufb L_aes_gcm_bswap_mask, %xmm4
@@ -1966,7 +1966,7 @@ L_AES_GCM_decrypt_calc_aad_loop:
pxor %xmm5, %xmm6
pxor %xmm3, %xmm6
pxor %xmm6, %xmm2
-L_AES_GCM_decrypt_calc_aad_done:
+L_AES_GCM_decrypt_aesni_calc_aad_done:
movdqu %xmm2, 96(%esp)
movl 196(%esp), %esi
movl 200(%esp), %edi
@@ -1987,7 +1987,7 @@ L_AES_GCM_decrypt_calc_aad_done:
xorl %ebx, %ebx
cmpl $0x40, 216(%esp)
movl 216(%esp), %eax
- jl L_AES_GCM_decrypt_done_64
+ jl L_AES_GCM_decrypt_aesni_done_64
andl $0xffffffc0, %eax
movdqa %xmm2, %xmm6
# H ^ 1
@@ -2116,8 +2116,8 @@ L_AES_GCM_decrypt_calc_aad_done:
pxor %xmm5, %xmm3
movdqu %xmm3, 48(%esp)
cmpl %esi, %edi
- jne L_AES_GCM_decrypt_ghash_64
-L_AES_GCM_decrypt_ghash_64_inplace:
+ jne L_AES_GCM_decrypt_aesni_ghash_64
+L_AES_GCM_decrypt_aesni_ghash_64_inplace:
leal (%esi,%ebx,1), %ecx
leal (%edi,%ebx,1), %edx
# Encrypt 64 bytes of counter
@@ -2188,7 +2188,7 @@ L_AES_GCM_decrypt_ghash_64_inplace:
aesenc %xmm3, %xmm7
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm3
- jl L_AES_GCM_decryptinplace_aesenc_64_ghash_avx_done
+ jl L_AES_GCM_decrypt_aesniinplace_aesenc_64_ghash_avx_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -2200,7 +2200,7 @@ L_AES_GCM_decrypt_ghash_64_inplace:
aesenc %xmm3, %xmm7
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm3
- jl L_AES_GCM_decryptinplace_aesenc_64_ghash_avx_done
+ jl L_AES_GCM_decrypt_aesniinplace_aesenc_64_ghash_avx_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -2211,7 +2211,7 @@ L_AES_GCM_decrypt_ghash_64_inplace:
aesenc %xmm3, %xmm6
aesenc %xmm3, %xmm7
movdqa 224(%ebp), %xmm3
-L_AES_GCM_decryptinplace_aesenc_64_ghash_avx_done:
+L_AES_GCM_decrypt_aesniinplace_aesenc_64_ghash_avx_done:
aesenclast %xmm3, %xmm4
aesenclast %xmm3, %xmm5
movdqu (%ecx), %xmm0
@@ -2328,9 +2328,9 @@ L_AES_GCM_decryptinplace_aesenc_64_ghash_avx_done:
movdqu %xmm6, 96(%esp)
addl $0x40, %ebx
cmpl %eax, %ebx
- jl L_AES_GCM_decrypt_ghash_64_inplace
- jmp L_AES_GCM_decrypt_ghash_64_done
-L_AES_GCM_decrypt_ghash_64:
+ jl L_AES_GCM_decrypt_aesni_ghash_64_inplace
+ jmp L_AES_GCM_decrypt_aesni_ghash_64_done
+L_AES_GCM_decrypt_aesni_ghash_64:
leal (%esi,%ebx,1), %ecx
leal (%edi,%ebx,1), %edx
# Encrypt 64 bytes of counter
@@ -2401,7 +2401,7 @@ L_AES_GCM_decrypt_ghash_64:
aesenc %xmm3, %xmm7
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm3
- jl L_AES_GCM_decrypt_aesenc_64_ghash_avx_done
+ jl L_AES_GCM_decrypt_aesni_aesenc_64_ghash_avx_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -2413,7 +2413,7 @@ L_AES_GCM_decrypt_ghash_64:
aesenc %xmm3, %xmm7
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm3
- jl L_AES_GCM_decrypt_aesenc_64_ghash_avx_done
+ jl L_AES_GCM_decrypt_aesni_aesenc_64_ghash_avx_done
aesenc %xmm3, %xmm4
aesenc %xmm3, %xmm5
aesenc %xmm3, %xmm6
@@ -2424,7 +2424,7 @@ L_AES_GCM_decrypt_ghash_64:
aesenc %xmm3, %xmm6
aesenc %xmm3, %xmm7
movdqa 224(%ebp), %xmm3
-L_AES_GCM_decrypt_aesenc_64_ghash_avx_done:
+L_AES_GCM_decrypt_aesni_aesenc_64_ghash_avx_done:
aesenclast %xmm3, %xmm4
aesenclast %xmm3, %xmm5
movdqu (%ecx), %xmm0
@@ -2541,19 +2541,19 @@ L_AES_GCM_decrypt_aesenc_64_ghash_avx_done:
movdqu %xmm6, 96(%esp)
addl $0x40, %ebx
cmpl %eax, %ebx
- jl L_AES_GCM_decrypt_ghash_64
-L_AES_GCM_decrypt_ghash_64_done:
+ jl L_AES_GCM_decrypt_aesni_ghash_64
+L_AES_GCM_decrypt_aesni_ghash_64_done:
movdqa %xmm6, %xmm2
movdqu (%esp), %xmm1
-L_AES_GCM_decrypt_done_64:
+L_AES_GCM_decrypt_aesni_done_64:
movl 216(%esp), %edx
cmpl %edx, %ebx
- jge L_AES_GCM_decrypt_done_dec
+ jge L_AES_GCM_decrypt_aesni_done_dec
movl 216(%esp), %eax
andl $0xfffffff0, %eax
cmpl %eax, %ebx
- jge L_AES_GCM_decrypt_last_block_done
-L_AES_GCM_decrypt_last_block_start:
+ jge L_AES_GCM_decrypt_aesni_last_block_done
+L_AES_GCM_decrypt_aesni_last_block_start:
leal (%esi,%ebx,1), %ecx
leal (%edi,%ebx,1), %edx
movdqu (%ecx), %xmm5
@@ -2601,28 +2601,28 @@ L_AES_GCM_decrypt_last_block_start:
pxor %xmm5, %xmm2
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_decrypt_aesenc_gfmul_last
+ jl L_AES_GCM_decrypt_aesni_aesenc_gfmul_last
aesenc %xmm5, %xmm4
aesenc 176(%ebp), %xmm4
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_decrypt_aesenc_gfmul_last
+ jl L_AES_GCM_decrypt_aesni_aesenc_gfmul_last
aesenc %xmm5, %xmm4
aesenc 208(%ebp), %xmm4
movdqa 224(%ebp), %xmm5
-L_AES_GCM_decrypt_aesenc_gfmul_last:
+L_AES_GCM_decrypt_aesni_aesenc_gfmul_last:
aesenclast %xmm5, %xmm4
movdqu (%ecx), %xmm5
pxor %xmm5, %xmm4
movdqu %xmm4, (%edx)
addl $16, %ebx
cmpl %eax, %ebx
- jl L_AES_GCM_decrypt_last_block_start
-L_AES_GCM_decrypt_last_block_done:
+ jl L_AES_GCM_decrypt_aesni_last_block_start
+L_AES_GCM_decrypt_aesni_last_block_done:
movl 216(%esp), %ecx
movl %ecx, %edx
andl $15, %ecx
- jz L_AES_GCM_decrypt_aesenc_last15_dec_avx_done
+ jz L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_done
movdqu 64(%esp), %xmm0
pshufb L_aes_gcm_bswap_epi64, %xmm0
pxor (%ebp), %xmm0
@@ -2637,23 +2637,23 @@ L_AES_GCM_decrypt_last_block_done:
aesenc 144(%ebp), %xmm0
cmpl $11, 236(%esp)
movdqa 160(%ebp), %xmm5
- jl L_AES_GCM_decrypt_aesenc_last15_dec_avx_aesenc_avx_last
+ jl L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_aesenc_avx_last
aesenc %xmm5, %xmm0
aesenc 176(%ebp), %xmm0
cmpl $13, 236(%esp)
movdqa 192(%ebp), %xmm5
- jl L_AES_GCM_decrypt_aesenc_last15_dec_avx_aesenc_avx_last
+ jl L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_aesenc_avx_last
aesenc %xmm5, %xmm0
aesenc 208(%ebp), %xmm0
movdqa 224(%ebp), %xmm5
-L_AES_GCM_decrypt_aesenc_last15_dec_avx_aesenc_avx_last:
+L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_aesenc_avx_last:
aesenclast %xmm5, %xmm0
subl $32, %esp
xorl %ecx, %ecx
movdqu %xmm0, (%esp)
pxor %xmm4, %xmm4
movdqu %xmm4, 16(%esp)
-L_AES_GCM_decrypt_aesenc_last15_dec_avx_loop:
+L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_loop:
movzbl (%esi,%ebx,1), %eax
movb %al, 16(%esp,%ecx,1)
xorb (%esp,%ecx,1), %al
@@ -2661,7 +2661,7 @@ L_AES_GCM_decrypt_aesenc_last15_dec_avx_loop:
incl %ebx
incl %ecx
cmpl %edx, %ebx
- jl L_AES_GCM_decrypt_aesenc_last15_dec_avx_loop
+ jl L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_loop
movdqu 16(%esp), %xmm0
addl $32, %esp
pshufb L_aes_gcm_bswap_mask, %xmm0
@@ -2705,8 +2705,8 @@ L_AES_GCM_decrypt_aesenc_last15_dec_avx_loop:
pxor %xmm7, %xmm5
pxor %xmm4, %xmm5
pxor %xmm5, %xmm2
-L_AES_GCM_decrypt_aesenc_last15_dec_avx_done:
-L_AES_GCM_decrypt_done_dec:
+L_AES_GCM_decrypt_aesni_aesenc_last15_dec_avx_done:
+L_AES_GCM_decrypt_aesni_done_dec:
movl 212(%esp), %esi
movl 228(%esp), %ebp
movl 216(%esp), %edx
@@ -2766,24 +2766,24 @@ L_AES_GCM_decrypt_done_dec:
pxor %xmm2, %xmm4
movl 240(%esp), %edi
cmpl $16, %ebp
- je L_AES_GCM_decrypt_cmp_tag_16
+ je L_AES_GCM_decrypt_aesni_cmp_tag_16
subl $16, %esp
xorl %ecx, %ecx
xorl %ebx, %ebx
movdqu %xmm4, (%esp)
-L_AES_GCM_decrypt_cmp_tag_loop:
+L_AES_GCM_decrypt_aesni_cmp_tag_loop:
movzbl (%esp,%ecx,1), %eax
xorb (%esi,%ecx,1), %al
orb %al, %bl
incl %ecx
cmpl %ebp, %ecx
- jne L_AES_GCM_decrypt_cmp_tag_loop
+ jne L_AES_GCM_decrypt_aesni_cmp_tag_loop
cmpb $0x00, %bl
sete %bl
addl $16, %esp
xorl %ecx, %ecx
- jmp L_AES_GCM_decrypt_cmp_tag_done
-L_AES_GCM_decrypt_cmp_tag_16:
+ jmp L_AES_GCM_decrypt_aesni_cmp_tag_done
+L_AES_GCM_decrypt_aesni_cmp_tag_16:
movdqu (%esi), %xmm5
pcmpeqb %xmm5, %xmm4
pmovmskb %xmm4, %edx
@@ -2791,7 +2791,7 @@ L_AES_GCM_decrypt_cmp_tag_16:
xorl %ebx, %ebx
cmpl $0xffff, %edx
sete %bl
-L_AES_GCM_decrypt_cmp_tag_done:
+L_AES_GCM_decrypt_aesni_cmp_tag_done:
movl %ebx, (%edi)
addl $0xb0, %esp
popl %ebp
@@ -2799,7 +2799,7 @@ L_AES_GCM_decrypt_cmp_tag_done:
popl %esi
popl %ebx
ret
-.size AES_GCM_decrypt,.-AES_GCM_decrypt
+.size AES_GCM_decrypt_aesni,.-AES_GCM_decrypt_aesni
#ifdef WOLFSSL_AESGCM_STREAM
.text
.globl AES_GCM_init_aesni
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/asn.c b/extra/wolfssl/wolfssl/wolfcrypt/src/asn.c
index 6147dea8..ac509958 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/asn.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/asn.c
@@ -99,6 +99,7 @@ ASN Options:
* WOLFSSL_ALLOW_ENCODING_CA_FALSE: Allow encoding BasicConstraints CA:FALSE
* which is discouraged by X.690 specification - default values shall not
* be encoded.
+ * NO_TIME_SIGNEDNESS_CHECK: Disabled the time_t signedness check.
*/
#include <wolfssl/wolfcrypt/error-crypt.h>
@@ -1064,6 +1065,16 @@ static int GetASN_Integer(const byte* input, word32 idx, int length,
#endif
}
}
+ /* check for invalid padding on negative integer.
+ * c.f. X.690 (ISO/IEC 8825-2:2003 (E)) 10.4.6; RFC 5280 4.1
+ */
+ else if ((length > 1) && (input[idx] == 0xff) &&
+ ((input[idx + 1] & 0x80) != 0)) {
+ WOLFSSL_MSG("Bad INTEGER encoding of negative");
+ #ifndef WOLFSSL_ASN_INT_LEAD_0_ANY
+ return ASN_EXPECT_0_E;
+ #endif /* WOLFSSL_ASN_INT_LEAD_0_ANY */
+ }
/* Check whether a leading zero byte was required. */
else if (positive && (input[idx] & 0x80)) {
WOLFSSL_MSG("INTEGER is negative");
@@ -1115,6 +1126,100 @@ static int GetASN_BitString(const byte* input, word32 idx, int length)
return 0;
}
+#ifndef WOLFSSL_NO_ASN_STRICT
+/* Check a UTF8STRING's data is valid.
+ *
+ * @param [in] input BER encoded data.
+ * @param [in] idx Index of UTF8STRING data.
+ * @param [in] length Length of input data.
+ * @return 0 on success.
+ * @return ASN_PARSE_E when data is invalid.
+ */
+static int GetASN_UTF8String(const byte* input, word32 idx, int length)
+{
+ int ret = 0;
+ word32 i = 0;
+
+ while ((ret == 0) && ((int)i < length)) {
+ int cnt;
+
+ /* Check code points and get count of following bytes. */
+ if ((input[idx + i] & 0x80) == 0x00) {
+ cnt = 0;
+ }
+ else if ((input[idx + i] & 0xe0) == 0xc0) {
+ cnt = 1;
+ }
+ else if ((input[idx + i] & 0xf0) == 0xe0) {
+ cnt = 2;
+ }
+ else if ((input[idx + i] & 0xf8) == 0xf0) {
+ cnt = 3;
+ }
+ else {
+ WOLFSSL_MSG("Invalid character in UTF8STRING\n");
+ ret = ASN_PARSE_E;
+ break;
+ }
+
+ /* Have checked first byte. */
+ i++;
+ /* Check each following byte. */
+ for (; cnt > 0; cnt--) {
+ /* Check we have enough data. */
+ if ((int)i == length) {
+ WOLFSSL_MSG("Missing character in UTF8STRING\n");
+ ret = ASN_PARSE_E;
+ break;
+ }
+ /* Check following byte has top bit set. */
+ if ((input[idx + i] & 0x80) != 0x80) {
+ WOLFSSL_MSG("Invalid character in UTF8STRING\n");
+ ret = ASN_PARSE_E;
+ break;
+ }
+ i++;
+ }
+ }
+
+ return ret;
+}
+#endif
+
+/* Check an OBJECT IDENTIFIER's data is valid.
+ *
+ * X.690 8.19
+ *
+ * @param [in] input BER encoded data.
+ * @param [in] idx Index of OBJECT IDENTIFIER data.
+ * @param [in] length Length of input data.
+ * @return 0 on success.
+ * @return ASN_PARSE_E when data is invalid.
+ */
+static int GetASN_ObjectId(const byte* input, word32 idx, int length)
+{
+ int ret = 0;
+
+ /* OID data must be at least 3 bytes. */
+ if (length < 3) {
+ #ifdef WOLFSSL_DEBUG_ASN_TEMPLATE
+ WOLFSSL_MSG_VSNPRINTF("OID length must be 3 or more: %d", len);
+ #else
+ WOLFSSL_MSG("OID length less than 3");
+ #endif
+ ret = ASN_PARSE_E;
+ }
+ /* Last octet of a subidentifier has bit 8 clear. Last octet must be last
+ * of a subidentifier. Ensure last octet hasn't got top bit set indicating.
+ */
+ else if ((input[(int)idx + length - 1] & 0x80) != 0x00) {
+ WOLFSSL_MSG("OID last octet has top bit set");
+ ret = ASN_PARSE_E;
+ }
+
+ return ret;
+}
+
/* Get the ASN.1 items from the BER encoding.
*
* @param [in] asn ASN.1 item expected.
@@ -1383,9 +1488,8 @@ int GetASN_Items(const ASNItem* asn, ASNGetData *data, int count, int complete,
int len;
/* Current index into buffer. */
word32 idx = *inOutIdx;
- /* Initialize the end index at each depth to be the length. */
- word32 endIdx[GET_ASN_MAX_DEPTH] = { length, length, length, length, length,
- length, length };
+ /* Declare the end index array. */
+ word32 endIdx[GET_ASN_MAX_DEPTH];
/* Set choices to -1 to indicate they haven't been seen or found. */
signed char choiceMet[GET_ASN_MAX_CHOICES] = { -1, -1 };
/* Not matching a choice right now. */
@@ -1401,6 +1505,11 @@ int GetASN_Items(const ASNItem* asn, ASNGetData *data, int count, int complete,
WOLFSSL_ENTER("GetASN_Items");
#endif
+ /* Set the end index at each depth to be the length. */
+ for (i=0; i<GET_ASN_MAX_DEPTH; i++) {
+ endIdx[i] = length;
+ }
+
/* Start depth at first items depth. */
minDepth = depth = asn[0].depth;
/* Check every ASN.1 item. */
@@ -1576,11 +1685,20 @@ int GetASN_Items(const ASNItem* asn, ASNGetData *data, int count, int complete,
idx++;
len--;
}
- else if ((asn[i].tag == ASN_OBJECT_ID) && (len < 3)) {
- #ifdef WOLFSSL_DEBUG_ASN_TEMPLATE
- WOLFSSL_MSG_VSNPRINTF("OID length must be 3 or more: %d", len);
- #endif
- return ASN_PARSE_E;
+ #ifndef WOLFSSL_NO_ASN_STRICT
+ else if ((asn[i].tag == ASN_UTF8STRING) ||
+ (data[i].tag == ASN_UTF8STRING)) {
+ /* Check validity of data. */
+ err = GetASN_UTF8String(input, idx, len);
+ if (err != 0)
+ return err;
+ }
+ #endif
+ else if (asn[i].tag == ASN_OBJECT_ID) {
+ /* Check validity of data. */
+ err = GetASN_ObjectId(input, idx, len);
+ if (err != 0)
+ return err;
}
/* Don't parse data if only header required. */
@@ -2874,7 +2992,7 @@ const char* GetSigName(int oid) {
#if !defined(NO_DSA) || defined(HAVE_ECC) || !defined(NO_CERTS) || \
(!defined(NO_RSA) && \
(defined(WOLFSSL_CERT_GEN) || \
- ((defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA)) && !defined(HAVE_USER_RSA))))
+ ((defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA)))))
/* Set the DER/BER encoding of the ASN.1 INTEGER header.
*
* When output is NULL, calculate the header length only.
@@ -2923,7 +3041,7 @@ int SetASNInt(int len, byte firstByte, byte* output)
#if !defined(NO_DSA) || defined(HAVE_ECC) || (defined(WOLFSSL_CERT_GEN) && \
!defined(NO_RSA)) || ((defined(WOLFSSL_KEY_GEN) || \
(!defined(NO_DH) && defined(WOLFSSL_DH_EXTRA)) || \
- defined(OPENSSL_EXTRA)) && !defined(NO_RSA) && !defined(HAVE_USER_RSA))
+ defined(OPENSSL_EXTRA)) && !defined(NO_RSA))
/* Set the DER/BER encoding of the ASN.1 INTEGER element with an mp_int.
* The number is assumed to be positive.
*
@@ -2959,41 +3077,6 @@ static int SetASNIntMP(mp_int* n, int maxSz, byte* output)
return idx;
}
#endif
-
-#if !defined(NO_RSA) && defined(HAVE_USER_RSA) && \
- (defined(WOLFSSL_CERT_GEN) || defined(OPENSSL_EXTRA))
-/* Set the DER/BER encoding of the ASN.1 INTEGER element with an mp_int from
- * an RSA key.
- * The number is assumed to be positive.
- *
- * n Multi-precision integer to encode.
- * output Buffer to write into.
- * returns BUFFER_E when the data is too long for the buffer.
- * MP_TO_E when encoding the integer fails.
- * Otherwise, the number of bytes added to the buffer.
- */
-static int SetASNIntRSA(void* n, byte* output)
-{
- int idx = 0;
- int leadingBit;
- int length;
-
- leadingBit = wc_Rsa_leading_bit(n);
- length = wc_Rsa_unsigned_bin_size(n);
- idx = SetASNInt(length, leadingBit ? 0x80 : 0x00, output);
- if ((idx + length) > MAX_RSA_INT_SZ)
- return BUFFER_E;
-
- if (output) {
- int err = wc_Rsa_to_unsigned_bin(n, output + idx, length);
- if (err != MP_OKAY)
- return MP_TO_E;
- }
- idx += length;
-
- return idx;
-}
-#endif /* !NO_RSA && HAVE_USER_RSA && WOLFSSL_CERT_GEN */
#endif /* !WOLFSSL_ASN_TEMPLATE */
#ifdef WOLFSSL_ASN_TEMPLATE
@@ -3048,7 +3131,7 @@ int GetMyVersion(const byte* input, word32* inOutIdx,
#else
ASNGetData dataASN[intASN_Length];
int ret;
- byte num;
+ byte num = 0;
/* Clear dynamic data and set the version number variable. */
XMEMSET(dataASN, 0, sizeof(dataASN));
@@ -3115,7 +3198,7 @@ int GetShortInt(const byte* input, word32* inOutIdx, int* number, word32 maxIdx)
#else
ASNGetData dataASN[intASN_Length];
int ret;
- word32 num;
+ word32 num = 0;
/* Clear dynamic data and set the 32-bit number variable. */
XMEMSET(dataASN, 0, sizeof(dataASN));
@@ -3315,7 +3398,7 @@ static int GetIntPositive(mp_int* mpi, const byte* input, word32* inOutIdx,
#endif /* (ECC || !NO_DSA) && !WOLFSSL_ASN_TEMPLATE */
#ifndef WOLFSSL_ASN_TEMPLATE
-#if (!defined(NO_RSA) && !defined(HAVE_USER_RSA)) || !defined(NO_DSA)
+#if !defined(NO_RSA) || !defined(NO_DSA)
static int SkipInt(const byte* input, word32* inOutIdx, word32 maxIdx)
{
word32 idx = *inOutIdx;
@@ -3444,7 +3527,7 @@ int CheckBitString(const byte* input, word32* inOutIdx, int* len,
/* RSA (with CertGen or KeyGen) OR ECC OR ED25519 OR ED448 (with CertGen or
* KeyGen) */
-#if (!defined(NO_RSA) && !defined(HAVE_USER_RSA) && \
+#if (!defined(NO_RSA) && \
(defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN) || \
defined(OPENSSL_EXTRA))) || \
(defined(HAVE_ECC) && defined(HAVE_ECC_KEY_EXPORT)) || \
@@ -3494,6 +3577,72 @@ word32 SetBitString(word32 len, byte unusedBits, byte* output)
#endif /* !NO_RSA || HAVE_ECC || HAVE_ED25519 || HAVE_ED448 */
#ifdef ASN_BER_TO_DER
+
+#ifndef BER_OCTET_LENGTH
+ #define BER_OCTET_LENGTH 4096
+#endif
+
+/* sets the terminating 0x00 0x00 at the end of an indefinite length
+ * returns the number of bytes written */
+word32 SetIndefEnd(byte* output)
+{
+ byte terminate[ASN_INDEF_END_SZ] = { 0x00, 0x00 };
+
+ if (output != NULL) {
+ XMEMCPY(output, terminate, ASN_INDEF_END_SZ);
+ }
+
+ return (word32)ASN_INDEF_END_SZ;
+}
+
+
+/* Breaks an octet string up into chunks for use with streaming
+ * returns 0 on success and updates idx */
+int StreamOctetString(const byte* inBuf, word32 inBufSz, byte* out, word32* outSz,
+ word32* idx)
+{
+ word32 i = 0;
+ word32 outIdx = *idx;
+ byte* tmp = out;
+
+ if (tmp) tmp += outIdx;
+
+ while (i < inBufSz) {
+ word32 ret, sz;
+
+ sz = BER_OCTET_LENGTH;
+
+ if ((sz + i) > inBufSz) {
+ sz = inBufSz - i;
+ }
+
+ ret = SetOctetString(sz, tmp);
+ if (ret > 0) {
+ outIdx += ret;
+ }
+
+ if (tmp) {
+ if ((word32)ret + sz + i + outIdx > *outSz) {
+ return BUFFER_E;
+ }
+ XMEMCPY(tmp + ret, inBuf + i, sz);
+ tmp += sz + ret;
+ }
+ outIdx += sz;
+ i += sz;
+ }
+
+ if (tmp) {
+ *idx = outIdx;
+ return 0;
+ }
+ else {
+ *outSz = outIdx;
+ return LENGTH_ONLY_E;
+ }
+}
+
+
/* Convert BER to DER */
/* Pull informtation from the ASN.1 BER encoded item header */
@@ -4053,11 +4202,11 @@ static word32 SetBitString16Bit(word16 val, byte* output)
#endif /* HAVE_ED448 */
#ifdef HAVE_PQC
#ifdef HAVE_FALCON
- /* Falcon Level 1: 1 3 9999 3 1 */
- static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 1};
+ /* Falcon Level 1: 1 3 9999 3 6 */
+ static const byte sigFalcon_Level1Oid[] = {43, 206, 15, 3, 6};
- /* Falcon Level 5: 1 3 9999 3 4 */
- static const byte sigFalcon_Level5Oid[] = {43, 206, 15, 3, 4};
+ /* Falcon Level 5: 1 3 9999 3 9 */
+ static const byte sigFalcon_Level5Oid[] = {43, 206, 15, 3, 9};
#endif /* HAVE_FACON */
#ifdef HAVE_DILITHIUM
/* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */
@@ -4129,11 +4278,11 @@ static word32 SetBitString16Bit(word16 val, byte* output)
#endif /* !NO_DH */
#ifdef HAVE_PQC
#ifdef HAVE_FALCON
- /* Falcon Level 1: 1 3 9999 3 1 */
- static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 1};
+ /* Falcon Level 1: 1 3 9999 3 6 */
+ static const byte keyFalcon_Level1Oid[] = {43, 206, 15, 3, 6};
- /* Falcon Level 5: 1 3 9999 3 4 */
- static const byte keyFalcon_Level5Oid[] = {43, 206, 15, 3, 4};
+ /* Falcon Level 5: 1 3 9999 3 9 */
+ static const byte keyFalcon_Level5Oid[] = {43, 206, 15, 3, 9};
#endif /* HAVE_FALCON */
#ifdef HAVE_DILITHIUM
/* Dilithium Level 2: 1.3.6.1.4.1.2.267.7.4.4 */
@@ -6335,7 +6484,6 @@ static int DecodeRsaPssParams(const byte* params, word32 sz,
}
#endif /* WC_RSA_PSS */
-#ifndef HAVE_USER_RSA
#if defined(WOLFSSL_ASN_TEMPLATE) || (!defined(NO_CERTS) && \
(defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA) || \
defined(WOLFSSL_KCAPI_RSA) || defined(WOLFSSL_SE050)))
@@ -6673,8 +6821,6 @@ int wc_RsaPrivateKeyValidate(const byte* input, word32* inOutIdx, int* keySz,
{
return _RsaPrivateKeyDecode(input, inOutIdx, NULL, keySz, inSz);
}
-
-#endif /* HAVE_USER_RSA */
#endif /* NO_RSA */
#ifdef WOLFSSL_ASN_TEMPLATE
@@ -6800,7 +6946,7 @@ int ToTraditionalInline_ex(const byte* input, word32* inOutIdx, word32 sz,
DECL_ASNGETDATA(dataASN, pkcs8KeyASN_Length);
int ret = 0;
word32 oid = 9;
- byte version;
+ byte version = 0;
word32 idx;
/* Check validity of parameters. */
@@ -7220,12 +7366,6 @@ int wc_CheckPrivateKey(const byte* privKey, word32 privKeySz,
if ((ret = wc_RsaPublicKeyDecode(pubKey, &keyIdx, b,
pubKeySz)) == 0) {
- /* limit for user RSA crypto because of RsaKey
- * dereference. */
- #if defined(HAVE_USER_RSA)
- WOLFSSL_MSG("Cannot verify RSA pair with user RSA");
- ret = 1; /* return first RSA cert as match */
- #else
/* both keys extracted successfully now check n and e
* values are the same. This is dereferencing RsaKey */
if (mp_cmp(&(a->n), &(b->n)) != MP_EQ ||
@@ -7235,7 +7375,6 @@ int wc_CheckPrivateKey(const byte* privKey, word32 privKeySz,
}
else
ret = 1;
- #endif
}
else {
WOLFSSL_ERROR_VERBOSE(ret);
@@ -8725,7 +8864,7 @@ exit_dc:
int version;
word32 idx = 0;
word32 pIdx = 0;
- word32 iterations;
+ word32 iterations = 0;
word32 keySz = 0;
word32 saltSz = 0;
word32 shaOid = 0;
@@ -9230,7 +9369,6 @@ int EncryptContent(byte* input, word32 inputSz, byte* out, word32* outSz,
#ifndef NO_RSA
-#ifndef HAVE_USER_RSA
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_FSPSM_TLS)
/* This function is to retrieve key position information in a cert.*
* The information will be used to call TSIP TLS-linked API for *
@@ -9582,7 +9720,6 @@ int wc_RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key,
return ret;
}
-#endif /* HAVE_USER_RSA */
#endif /* !NO_RSA */
#ifndef NO_DH
@@ -12637,6 +12774,17 @@ static int GetHashId(const byte* id, int length, byte* hash, int hashAlg)
(((id) - 3) >= 0 && ((id) - 3) < certNameSubjectSz && \
(certNameSubject[(id) - 3].strLen > 0))
+/* Set the string for a name component into the issuer name. */
+#define SetCertNameIssuer(cert, id, val) \
+ *((char**)(((byte *)(cert)) + certNameSubject[(id) - 3].dataI)) = (val)
+/* Set the string length for a name component into the issuer name. */
+#define SetCertNameIssuerLen(cert, id, val) \
+ *((int*)(((byte *)(cert)) + certNameSubject[(id) - 3].lenI)) = (int)(val)
+/* Set the encoding for a name component into the issuer name. */
+#define SetCertNameIssuerEnc(cert, id, val) \
+ *((byte*)(((byte *)(cert)) + certNameSubject[(id) - 3].encI)) = (val)
+
+
/* Mapping of certificate name component to useful information. */
typedef struct CertNameData {
/* Type string of name component. */
@@ -12650,6 +12798,14 @@ typedef struct CertNameData {
size_t len;
/* Offset of encoding in subject name component. */
size_t enc;
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ /* Offset of data in subject name component. */
+ size_t dataI;
+ /* Offset of length in subject name component. */
+ size_t lenI;
+ /* Offset of encoding in subject name component. */
+ size_t encI;
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
/* NID of type for subject name component. */
@@ -12666,6 +12822,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectCN),
OFFSETOF(DecodedCert, subjectCNLen),
OFFSETOF(DecodedCert, subjectCNEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerCN),
+ OFFSETOF(DecodedCert, issuerCNLen),
+ OFFSETOF(DecodedCert, issuerCNEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_commonName
@@ -12678,6 +12839,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectSN),
OFFSETOF(DecodedCert, subjectSNLen),
OFFSETOF(DecodedCert, subjectSNEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerSN),
+ OFFSETOF(DecodedCert, issuerSNLen),
+ OFFSETOF(DecodedCert, issuerSNEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_surname
@@ -12690,6 +12856,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectSND),
OFFSETOF(DecodedCert, subjectSNDLen),
OFFSETOF(DecodedCert, subjectSNDEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerSND),
+ OFFSETOF(DecodedCert, issuerSNDLen),
+ OFFSETOF(DecodedCert, issuerSNDEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_serialNumber
@@ -12702,6 +12873,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectC),
OFFSETOF(DecodedCert, subjectCLen),
OFFSETOF(DecodedCert, subjectCEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerC),
+ OFFSETOF(DecodedCert, issuerCLen),
+ OFFSETOF(DecodedCert, issuerCEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_countryName
@@ -12714,6 +12890,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectL),
OFFSETOF(DecodedCert, subjectLLen),
OFFSETOF(DecodedCert, subjectLEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerL),
+ OFFSETOF(DecodedCert, issuerLLen),
+ OFFSETOF(DecodedCert, issuerLEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_localityName
@@ -12726,6 +12907,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectST),
OFFSETOF(DecodedCert, subjectSTLen),
OFFSETOF(DecodedCert, subjectSTEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerST),
+ OFFSETOF(DecodedCert, issuerSTLen),
+ OFFSETOF(DecodedCert, issuerSTEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_stateOrProvinceName
@@ -12738,6 +12924,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectStreet),
OFFSETOF(DecodedCert, subjectStreetLen),
OFFSETOF(DecodedCert, subjectStreetEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_streetAddress
@@ -12750,6 +12941,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectO),
OFFSETOF(DecodedCert, subjectOLen),
OFFSETOF(DecodedCert, subjectOEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerO),
+ OFFSETOF(DecodedCert, issuerOLen),
+ OFFSETOF(DecodedCert, issuerOEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_organizationName
@@ -12762,6 +12958,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectOU),
OFFSETOF(DecodedCert, subjectOULen),
OFFSETOF(DecodedCert, subjectOUEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ OFFSETOF(DecodedCert, issuerOU),
+ OFFSETOF(DecodedCert, issuerOULen),
+ OFFSETOF(DecodedCert, issuerOUEnc),
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_organizationalUnitName
@@ -12774,6 +12975,11 @@ static const CertNameData certNameSubject[] = {
0,
0,
0,
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
0,
@@ -12786,6 +12992,11 @@ static const CertNameData certNameSubject[] = {
0,
0,
0,
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
0,
@@ -12798,6 +13009,11 @@ static const CertNameData certNameSubject[] = {
0,
0,
0,
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
0,
@@ -12810,6 +13026,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectBC),
OFFSETOF(DecodedCert, subjectBCLen),
OFFSETOF(DecodedCert, subjectBCEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_businessCategory
@@ -12822,6 +13043,11 @@ static const CertNameData certNameSubject[] = {
0,
0,
0,
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
0,
@@ -12834,6 +13060,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectPC),
OFFSETOF(DecodedCert, subjectPCLen),
OFFSETOF(DecodedCert, subjectPCEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_postalCode
@@ -12846,6 +13077,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectUID),
OFFSETOF(DecodedCert, subjectUIDLen),
OFFSETOF(DecodedCert, subjectUIDEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_userId
@@ -12859,6 +13095,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectN),
OFFSETOF(DecodedCert, subjectNLen),
OFFSETOF(DecodedCert, subjectNEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_name
@@ -12871,6 +13112,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectGN),
OFFSETOF(DecodedCert, subjectGNLen),
OFFSETOF(DecodedCert, subjectGNEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_givenName
@@ -12883,6 +13129,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectI),
OFFSETOF(DecodedCert, subjectILen),
OFFSETOF(DecodedCert, subjectIEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_initials
@@ -12895,6 +13146,11 @@ static const CertNameData certNameSubject[] = {
OFFSETOF(DecodedCert, subjectDNQ),
OFFSETOF(DecodedCert, subjectDNQLen),
OFFSETOF(DecodedCert, subjectDNQEnc),
+#ifdef WOLFSSL_HAVE_ISSUER_NAMES
+ 0,
+ 0,
+ 0,
+#endif
#endif
#ifdef WOLFSSL_X509_NAME_AVAILABLE
NID_dnQualifier
@@ -12906,6 +13162,7 @@ static const CertNameData certNameSubject[] = {
static const int certNameSubjectSz =
(int) (sizeof(certNameSubject) / sizeof(CertNameData));
+
/* ASN.1 template for an RDN.
* X.509: RFC 5280, 4.1.2.4 - RelativeDistinguishedName
*/
@@ -12946,7 +13203,7 @@ static const byte rdnChoice[] = {
static int GenerateDNSEntryIPString(DNS_entry* entry, void* heap)
{
int ret = 0;
- size_t nameSz;
+ size_t nameSz = 0;
char tmpName[WOLFSSL_MAX_IPSTR] = {0};
unsigned char* ip;
@@ -13246,6 +13503,43 @@ static int SetSubject(DecodedCert* cert, int id, byte* str, int strLen,
return ret;
}
+#if (defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_CERT_EXT)) && \
+ defined(WOLFSSL_HAVE_ISSUER_NAMES)
+/* Set the details of an issuer name component into a certificate.
+ *
+ * @param [in, out] cert Certificate object.
+ * @param [in] id Id of component.
+ * @param [in] str String for component.
+ * @param [in] strLen Length of string.
+ * @param [in] tag BER tag representing encoding of string.
+ * @return 0 on success, negative values on failure.
+ */
+static int SetIssuer(DecodedCert* cert, int id, byte* str, int strLen,
+ byte tag)
+{
+ int ret = 0;
+
+ /* Put string and encoding into certificate. */
+ if (id == ASN_COMMON_NAME) {
+ cert->issuerCN = (char *)str;
+ cert->issuerCNLen = (int)strLen;
+ cert->issuerCNEnc = (char)tag;
+ }
+ else if (id > ASN_COMMON_NAME && id <= ASN_USER_ID) {
+ /* Use table and offsets to put data into appropriate fields. */
+ SetCertNameIssuer(cert, id, (char*)str);
+ SetCertNameIssuerLen(cert, id, strLen);
+ SetCertNameIssuerEnc(cert, id, tag);
+ }
+ else if (id == ASN_EMAIL) {
+ cert->issuerEmail = (char*)str;
+ cert->issuerEmailLen = strLen;
+ }
+
+ return ret;
+}
+#endif
+
/* Get a RelativeDistinguishedName from the encoding and put in certificate.
*
* @param [in, out] cert Certificate object.
@@ -13378,6 +13672,13 @@ static int GetRDN(DecodedCert* cert, char* full, word32* idx, int* nid,
/* Store subject field components. */
ret = SetSubject(cert, id, str, (int)strLen, tag);
}
+ #if (defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_CERT_EXT)) && \
+ defined(WOLFSSL_HAVE_ISSUER_NAMES)
+ /* Put issuer common name string and encoding into certificate. */
+ else {
+ ret = SetIssuer(cert, id, str, (int)strLen, tag);
+ }
+ #endif
if (ret == 0) {
/* Check there is space for this in the full name string and
* terminating NUL character. */
@@ -14717,12 +15018,14 @@ int wc_ValidateDate(const byte* date, byte format, int dateType)
(void)tmpTime;
ltime = wc_Time(0);
- if (sizeof(ltime) == sizeof(word32) && (int)ltime < 0){
+#ifndef NO_TIME_SIGNEDNESS_CHECK
+ if (sizeof(ltime) == sizeof(word32) && (sword32)ltime < 0){
/* A negative response here could be due to a 32-bit time_t
* where the year is 2038 or later. */
WOLFSSL_MSG("wc_Time failed to return a valid value");
return 0;
}
+#endif
#ifdef WOLFSSL_BEFORE_DATE_CLOCK_SKEW
if (dateType == BEFORE) {
@@ -15378,6 +15681,18 @@ word32 SetLength(word32 length, byte* output)
return i;
}
+word32 SetLengthEx(word32 length, byte* output, byte isIndef)
+{
+ if (isIndef) {
+ if (output != NULL) {
+ output[0] = ASN_INDEF_LENGTH;
+ }
+ return 1;
+ }
+ else {
+ return SetLength(length, output);
+ }
+}
/* Encode a DER header - type/tag and length.
*
* @param [in] tag DER tag of ASN.1 item.
@@ -15385,14 +15700,15 @@ word32 SetLength(word32 length, byte* output)
* @param [out] output Buffer to encode into.
* @return Number of bytes encoded.
*/
-static word32 SetHeader(byte tag, word32 len, byte* output)
+static word32 SetHeader(byte tag, word32 len, byte* output, byte isIndef)
{
if (output) {
/* Encode tag first. */
output[0] = tag;
}
/* Encode the length. */
- return SetLength(len, output ? output + ASN_TAG_SZ : NULL) + ASN_TAG_SZ;
+ return SetLengthEx(len, output ? output + ASN_TAG_SZ : NULL, isIndef) +
+ ASN_TAG_SZ;
}
/* Encode a SEQUENCE header in DER.
@@ -15403,7 +15719,12 @@ static word32 SetHeader(byte tag, word32 len, byte* output)
*/
word32 SetSequence(word32 len, byte* output)
{
- return SetHeader(ASN_SEQUENCE | ASN_CONSTRUCTED, len, output);
+ return SetHeader(ASN_SEQUENCE | ASN_CONSTRUCTED, len, output, 0);
+}
+
+word32 SetSequenceEx(word32 len, byte* output, byte isIndef)
+{
+ return SetHeader(ASN_SEQUENCE | ASN_CONSTRUCTED, len, output, isIndef);
}
/* Encode an OCTET STRING header in DER.
@@ -15414,7 +15735,14 @@ word32 SetSequence(word32 len, byte* output)
*/
word32 SetOctetString(word32 len, byte* output)
{
- return SetHeader(ASN_OCTET_STRING, len, output);
+ return SetHeader(ASN_OCTET_STRING, len, output, 0);
+}
+
+word32 SetOctetStringEx(word32 len, byte* output, byte indef)
+{
+ if (indef)
+ return SetHeader(ASN_OCTET_STRING | ASN_CONSTRUCTED, len, output, indef);
+ return SetOctetString(len, output);
}
/* Encode a SET header in DER.
@@ -15425,7 +15753,7 @@ word32 SetOctetString(word32 len, byte* output)
*/
word32 SetSet(word32 len, byte* output)
{
- return SetHeader(ASN_SET | ASN_CONSTRUCTED, len, output);
+ return SetHeader(ASN_SET | ASN_CONSTRUCTED, len, output, 0);
}
/* Encode an implicit context specific header in DER.
@@ -15438,11 +15766,23 @@ word32 SetSet(word32 len, byte* output)
* @param [out] output Buffer to encode into.
* @return Number of bytes encoded.
*/
-word32 SetImplicit(byte tag, byte number, word32 len, byte* output)
+word32 SetImplicit(byte tag, byte number, word32 len, byte* output, byte isIndef)
{
- tag = (byte)(((tag == ASN_SEQUENCE || tag == ASN_SET) ? ASN_CONSTRUCTED : 0)
- | ASN_CONTEXT_SPECIFIC | number);
- return SetHeader(tag, len, output);
+ byte useIndef = 0;
+
+ if ((tag == ASN_OCTET_STRING) && isIndef) {
+ tag = ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | number;
+ }
+ else {
+ tag = (byte)(((tag == ASN_SEQUENCE || tag == ASN_SET) ?
+ ASN_CONSTRUCTED : 0) | ASN_CONTEXT_SPECIFIC | number);
+ }
+
+ if (isIndef && (tag & ASN_CONSTRUCTED)) {
+ useIndef = 1;
+ }
+
+ return SetHeader(tag, len, output, useIndef);
}
/* Encode an explicit context specific header in DER.
@@ -15454,10 +15794,10 @@ word32 SetImplicit(byte tag, byte number, word32 len, byte* output)
* @param [out] output Buffer to encode into.
* @return Number of bytes encoded.
*/
-word32 SetExplicit(byte number, word32 len, byte* output)
+word32 SetExplicit(byte number, word32 len, byte* output, byte isIndef)
{
return SetHeader((byte)(ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | number),
- len, output);
+ len, output, isIndef);
}
#if defined(OPENSSL_EXTRA)
@@ -15483,8 +15823,8 @@ word32 SetOthername(void *name, byte *output)
nameSz = (word32)nm->value->value.utf8string->length;
len = nm->type_id->objSz +
- SetHeader(ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC, nameSz + 2, NULL) +
- SetHeader(CTC_UTF8, nameSz, NULL) + nameSz;
+ SetHeader(ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC, nameSz + 2, NULL, 0) +
+ SetHeader(CTC_UTF8, nameSz, NULL, 0) + nameSz;
if (output != NULL) {
/* otherName OID */
@@ -15492,9 +15832,9 @@ word32 SetOthername(void *name, byte *output)
output += nm->type_id->objSz;
output += SetHeader(ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC, nameSz + 2,
- output);
+ output, 0);
- output += SetHeader(CTC_UTF8, nameSz, output);
+ output += SetHeader(CTC_UTF8, nameSz, output, 0);
XMEMCPY(output, nameStr, nameSz);
}
@@ -16476,6 +16816,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
#if defined(HAVE_FALCON)
case FALCON_LEVEL1k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.falcon =
(falcon_key*)XMALLOC(sizeof(falcon_key),
@@ -16484,15 +16825,16 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
if (sigCtx->key.falcon == NULL) {
ERROR_OUT(MEMORY_E, exit_cs);
}
- if ((ret = wc_falcon_init(sigCtx->key.falcon)) < 0) {
+ if ((ret = wc_falcon_init_ex(sigCtx->key.falcon,
+ sigCtx->heap, sigCtx->devId)) < 0) {
goto exit_cs;
}
if ((ret = wc_falcon_set_level(sigCtx->key.falcon, 1))
< 0) {
goto exit_cs;
}
- if ((ret = wc_falcon_import_public(key, keySz,
- sigCtx->key.falcon)) < 0) {
+ if ((ret = wc_Falcon_PublicKeyDecode(key, &idx,
+ sigCtx->key.falcon, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import error Falcon Level 1");
WOLFSSL_ERROR_VERBOSE(ret);
goto exit_cs;
@@ -16501,6 +16843,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
}
case FALCON_LEVEL5k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.falcon =
(falcon_key*)XMALLOC(sizeof(falcon_key),
@@ -16509,15 +16852,16 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
if (sigCtx->key.falcon == NULL) {
ERROR_OUT(MEMORY_E, exit_cs);
}
- if ((ret = wc_falcon_init(sigCtx->key.falcon)) < 0) {
+ if ((ret = wc_falcon_init_ex(sigCtx->key.falcon,
+ sigCtx->heap, sigCtx->devId)) < 0) {
goto exit_cs;
}
if ((ret = wc_falcon_set_level(sigCtx->key.falcon, 5))
< 0) {
goto exit_cs;
}
- if ((ret = wc_falcon_import_public(key, keySz,
- sigCtx->key.falcon)) < 0) {
+ if ((ret = wc_Falcon_PublicKeyDecode(key, &idx,
+ sigCtx->key.falcon, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import error Falcon Level 5");
WOLFSSL_ERROR_VERBOSE(ret);
goto exit_cs;
@@ -16528,6 +16872,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
#if defined(HAVE_DILITHIUM)
case DILITHIUM_LEVEL2k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.dilithium =
(dilithium_key*)XMALLOC(sizeof(dilithium_key),
@@ -16536,7 +16881,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
if (sigCtx->key.dilithium == NULL) {
ERROR_OUT(MEMORY_E, exit_cs);
}
- if ((ret = wc_dilithium_init(sigCtx->key.dilithium)) < 0) {
+ if ((ret = wc_dilithium_init_ex(sigCtx->key.dilithium,
+ sigCtx->heap, sigCtx->devId)) < 0) {
goto exit_cs;
}
if ((ret = wc_dilithium_set_level(
@@ -16544,8 +16890,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_dilithium_import_public(key, keySz,
- sigCtx->key.dilithium)) < 0) {
+ if ((ret = wc_Dilithium_PublicKeyDecode(key, &idx,
+ sigCtx->key.dilithium, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import error Dilithium Level 2");
goto exit_cs;
}
@@ -16553,6 +16899,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
}
case DILITHIUM_LEVEL3k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.dilithium =
(dilithium_key*)XMALLOC(sizeof(dilithium_key),
@@ -16561,7 +16908,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
if (sigCtx->key.dilithium == NULL) {
ERROR_OUT(MEMORY_E, exit_cs);
}
- if ((ret = wc_dilithium_init(sigCtx->key.dilithium)) < 0) {
+ if ((ret = wc_dilithium_init_ex(sigCtx->key.dilithium,
+ sigCtx->heap, sigCtx->devId)) < 0) {
goto exit_cs;
}
if ((ret = wc_dilithium_set_level(
@@ -16569,15 +16917,16 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_dilithium_import_public(key, keySz,
- sigCtx->key.dilithium)) < 0) {
- WOLFSSL_MSG("ASN Key import error Dilithium Level 5");
+ if ((ret = wc_Dilithium_PublicKeyDecode(key, &idx,
+ sigCtx->key.dilithium, keySz)) < 0) {
+ WOLFSSL_MSG("ASN Key import error Dilithium Level 3");
goto exit_cs;
}
break;
}
case DILITHIUM_LEVEL5k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.dilithium =
(dilithium_key*)XMALLOC(sizeof(dilithium_key),
@@ -16586,7 +16935,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
if (sigCtx->key.dilithium == NULL) {
ERROR_OUT(MEMORY_E, exit_cs);
}
- if ((ret = wc_dilithium_init(sigCtx->key.dilithium)) < 0) {
+ if ((ret = wc_dilithium_init_ex(sigCtx->key.dilithium,
+ sigCtx->heap, sigCtx->devId)) < 0) {
goto exit_cs;
}
if ((ret = wc_dilithium_set_level(
@@ -16594,8 +16944,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_dilithium_import_public(key, keySz,
- sigCtx->key.dilithium)) < 0) {
+ if ((ret = wc_Dilithium_PublicKeyDecode(key, &idx,
+ sigCtx->key.dilithium, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import error Dilithium Level 5");
goto exit_cs;
}
@@ -16605,6 +16955,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
#if defined(HAVE_SPHINCS)
case SPHINCS_FAST_LEVEL1k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.sphincs =
(sphincs_key*)XMALLOC(sizeof(sphincs_key),
@@ -16621,8 +16972,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_sphincs_import_public(key, keySz,
- sigCtx->key.sphincs)) < 0) {
+ if ((ret = wc_Sphincs_PublicKeyDecode(key, &idx,
+ sigCtx->key.sphincs, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import err: Sphincs-fast Level1");
goto exit_cs;
}
@@ -16630,6 +16981,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
}
case SPHINCS_FAST_LEVEL3k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.sphincs =
(sphincs_key*)XMALLOC(sizeof(sphincs_key),
@@ -16646,8 +16998,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_sphincs_import_public(key, keySz,
- sigCtx->key.sphincs)) < 0) {
+ if ((ret = wc_Sphincs_PublicKeyDecode(key, &idx,
+ sigCtx->key.sphincs, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import err: Sphincs-fast Level3");
goto exit_cs;
}
@@ -16655,6 +17007,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
}
case SPHINCS_FAST_LEVEL5k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.sphincs =
(sphincs_key*)XMALLOC(sizeof(sphincs_key),
@@ -16671,16 +17024,16 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_sphincs_import_public(key, keySz,
- sigCtx->key.sphincs)) < 0) {
+ if ((ret = wc_Sphincs_PublicKeyDecode(key, &idx,
+ sigCtx->key.sphincs, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import err: Sphincs-fast Level5");
goto exit_cs;
}
break;
}
-
case SPHINCS_SMALL_LEVEL1k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.sphincs =
(sphincs_key*)XMALLOC(sizeof(sphincs_key),
@@ -16697,8 +17050,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_sphincs_import_public(key, keySz,
- sigCtx->key.sphincs)) < 0) {
+ if ((ret = wc_Sphincs_PublicKeyDecode(key, &idx,
+ sigCtx->key.sphincs, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import err: Sphincs-fast Level1");
goto exit_cs;
}
@@ -16706,6 +17059,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
}
case SPHINCS_SMALL_LEVEL3k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.sphincs =
(sphincs_key*)XMALLOC(sizeof(sphincs_key),
@@ -16722,8 +17076,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_sphincs_import_public(key, keySz,
- sigCtx->key.sphincs)) < 0) {
+ if ((ret = wc_Sphincs_PublicKeyDecode(key, &idx,
+ sigCtx->key.sphincs, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import err: Sphincs-fast Level3");
goto exit_cs;
}
@@ -16731,6 +17085,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
}
case SPHINCS_SMALL_LEVEL5k:
{
+ word32 idx = 0;
sigCtx->verify = 0;
sigCtx->key.sphincs =
(sphincs_key*)XMALLOC(sizeof(sphincs_key),
@@ -16747,8 +17102,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
< 0) {
goto exit_cs;
}
- if ((ret = wc_sphincs_import_public(key, keySz,
- sigCtx->key.sphincs)) < 0) {
+ if ((ret = wc_Sphincs_PublicKeyDecode(key, &idx,
+ sigCtx->key.sphincs, keySz)) < 0) {
WOLFSSL_MSG("ASN Key import err: Sphincs-fast Level5");
goto exit_cs;
}
@@ -17259,6 +17614,41 @@ exit_cs:
return ret;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+int wc_ConfirmAltSignature(
+ const byte* buf, word32 bufSz,
+ const byte* key, word32 keySz, word32 keyOID,
+ const byte* sig, word32 sigSz, word32 sigOID,
+ void *heap)
+{
+ int ret = 0;
+#ifdef WOLFSSL_SMALL_STACK
+ SignatureCtx* sigCtx = (SignatureCtx*)XMALLOC(sizeof(*sigCtx), heap,
+ DYNAMIC_TYPE_SIGNATURE);
+ if (sigCtx == NULL) {
+ ret = MEMORY_E;
+ }
+#else
+ SignatureCtx sigCtx[1];
+ (void)heap;
+#endif
+
+ if (ret == 0) {
+ InitSignatureCtx(sigCtx, heap, INVALID_DEVID);
+
+ ret = ConfirmSignature(sigCtx, buf, bufSz, key, keySz,
+ keyOID, sig, sigSz, sigOID, NULL, 0, NULL);
+
+ FreeSignatureCtx(sigCtx);
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ if (sigCtx != NULL)
+ XFREE(sigCtx, heap, DYNAMIC_TYPE_SIGNATURE);
+#endif
+ return ret;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#ifndef IGNORE_NAME_CONSTRAINTS
@@ -19298,6 +19688,7 @@ static int DecodeKeyUsage(const byte* input, word32 sz, DecodedCert* cert)
/* Clear dynamic data and set where to store extended key usage. */
XMEMSET(dataASN, 0, sizeof(dataASN));
+ XMEMSET(keyUsage, 0, sizeof(keyUsage));
GetASN_Buffer(&dataASN[KEYUSAGEASN_IDX_STR], keyUsage, &keyUsageSz);
/* Parse key usage. */
ret = GetASN_Items(keyUsageASN, dataASN, keyUsageASN_Length, 0, input,
@@ -19544,7 +19935,7 @@ enum {
static int DecodeSubtreeGeneralName(const byte* input, word32 sz, byte tag,
Base_entry** head, void* heap)
{
- Base_entry* entry;
+ Base_entry* entry = NULL;
word32 nameIdx = 0;
word32 len = sz;
int strLen;
@@ -20365,6 +20756,161 @@ static int DecodeSubjInfoAcc(const byte* input, word32 sz, DecodedCert* cert)
}
#endif /* WOLFSSL_SUBJ_INFO_ACC */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+/* The subject alternative public key is an extension that holds the same thing
+ * as a subject public key. */
+static const ASNItem subjAltPubKeyInfoASN[] = {
+ /* subjectPublicKeyInfo SubjectPublicKeyInfo */
+/* ALT_SPUBKEYINFO_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
+ /* algorithm AlgorithmIdentifier */
+ /* AlgorithmIdentifier ::= SEQUENCE */
+/* ALT_SPUBKEYINFO_ALGO_SEQ */ { 1, ASN_SEQUENCE, 1, 1, 0 },
+ /* Algorithm OBJECT IDENTIFIER */
+/* ALT_SPUBKEYINFO_ALGO_OID */ { 2, ASN_OBJECT_ID, 0, 0, 0 },
+ /* parameters ANY defined by algorithm OPTIONAL */
+/* ALT_SPUBKEYINFO_ALGO_NULL */ { 2, ASN_TAG_NULL, 0, 0, 1 },
+/* ALT_SPUBKEYINFO_ALGO_CURVEID */ { 2, ASN_OBJECT_ID, 0, 0, 1 },
+#ifdef WC_RSA_PSS
+/* ALT_SPUBKEYINFO_ALGO_P_SEQ */ { 2, ASN_SEQUENCE, 1, 0, 1 },
+#endif
+ /* subjectPublicKey BIT STRING */
+/* ALT_SPUBKEYINFO_PUBKEY */ { 1, ASN_BIT_STRING, 0, 0, 0 }
+};
+
+#define subjAltPubKeyInfoASN_Length (sizeof(subjAltPubKeyInfoASN) / \
+ sizeof(ASNItem))
+
+enum {
+ ALT_SPUBKEYINFO_SEQ = 0,
+ ALT_SPUBKEYINFO_ALGO_SEQ,
+ ALT_SPUBKEYINFO_ALGO_OID,
+ ALT_SPUBKEYINFO_ALGO_NULL,
+ ALT_SPUBKEYINFO_ALGO_CURVEID,
+#ifdef WC_RSA_PSS
+ ALT_SPUBKEYINFO_ALGO_P_SEQ,
+#endif
+ ALT_SPUBKEYINFO_PUBKEY
+};
+
+static int DecodeSubjAltPubKeyInfo(const byte* input, int sz, DecodedCert* cert)
+{
+ int ret = 0;
+ word32 idx = 0;
+ DECL_ASNGETDATA(dataASN, subjAltPubKeyInfoASN_Length);
+
+ WOLFSSL_ENTER("DecodeSubjAltPubKeyInfo");
+
+ if (ret == 0) {
+ CALLOC_ASNGETDATA(dataASN, subjAltPubKeyInfoASN_Length, ret,
+ cert->heap);
+ (void)cert;
+ }
+
+ if (ret == 0) {
+ GetASN_OID(&dataASN[ALT_SPUBKEYINFO_ALGO_OID], oidKeyType);
+ GetASN_OID(&dataASN[ALT_SPUBKEYINFO_ALGO_CURVEID], oidCurveType);
+
+ ret = GetASN_Items(subjAltPubKeyInfoASN, dataASN,
+ subjAltPubKeyInfoASN_Length, 1, input, &idx,
+ (word32)sz);
+ }
+
+ if (ret == 0) {
+ /* dataASN[ALT_SPUBKEYINFO_SEQ].data.u8 */
+ cert->sapkiDer = (byte *)input;
+ /* dataASN[ALT_SPUBKEYINFO_SEQ].length */
+ cert->sapkiLen = sz;
+ cert->sapkiOID = dataASN[ALT_SPUBKEYINFO_ALGO_OID].data.oid.sum;
+ }
+
+ FREE_ASNGETDATA(dataASN, cert->heap);
+ WOLFSSL_LEAVE("DecodeSubjAltPubKeyInfo", ret);
+ return ret;
+}
+
+/* The alternative signature algorithm extension holds the same thing as a
+ * as a signature algorithm identifier. */
+static const ASNItem altSigAlgASN[] = {
+ /* AltSigAlg AlgorithmIdentifier */
+ /* AlgorithmIdentifier ::= SEQUENCE */
+/* ALTSIG_ALGOID_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
+ /* Algorithm OBJECT IDENTIFIER */
+/* ALTSIG_ALGOID_OID */ { 1, ASN_OBJECT_ID, 0, 0, 0 },
+ /* parameters ANY defined by algorithm OPTIONAL */
+/* ALTSIG_ALGOID_PARAMS_NULL */ { 1, ASN_TAG_NULL, 0, 0, 1 },
+#ifdef WC_RSA_PSS
+/* ALTSIG_ALGOID_PARAMS */ { 1, ASN_SEQUENCE, 1, 0, 1 },
+#endif
+};
+
+#define altSigAlgASN_Length (sizeof(altSigAlgASN) / sizeof(ASNItem))
+
+enum {
+ ALTSIG_ALGOID_SEQ = 0,
+ ALTSIG_ALGOID_OID,
+ ALTSIG_ALGOID_PARAMS_NULL,
+#ifdef WC_RSA_PSS
+ ALTSIG_ALGOID_PARAMS,
+#endif
+};
+
+static int DecodeAltSigAlg(const byte* input, int sz, DecodedCert* cert)
+{
+ int ret = 0;
+ word32 idx = 0;
+ DECL_ASNGETDATA(dataASN, altSigAlgASN_Length);
+
+ WOLFSSL_ENTER("DecodeAltSigAlg");
+
+ if (ret == 0) {
+ CALLOC_ASNGETDATA(dataASN, altSigAlgASN_Length, ret, cert->heap);
+ (void)cert;
+ }
+
+ if (ret == 0) {
+ GetASN_OID(&dataASN[ALTSIG_ALGOID_OID], oidSigType);
+
+ ret = GetASN_Items(altSigAlgASN, dataASN,
+ altSigAlgASN_Length, 1, input, &idx,
+ (word32)sz);
+ }
+
+ if (ret == 0) {
+ cert->altSigAlgDer = dataASN[ALTSIG_ALGOID_SEQ].data.u8;
+ cert->altSigAlgLen = dataASN[ALTSIG_ALGOID_SEQ].length;
+ cert->altSigAlgOID = dataASN[ALTSIG_ALGOID_OID].data.oid.sum;
+ }
+
+ FREE_ASNGETDATA(dataASN, cert->heap);
+ WOLFSSL_LEAVE("DecodeAltSigAlg", ret);
+ return ret;
+}
+
+/* The alternative signature value extension holds an ASN.1 bitstring just
+ * like a traditional signature in the certificate. */
+static int DecodeAltSigVal(const byte* input, int sz, DecodedCert* cert)
+{
+ (void)cert;
+ int ret = 0;
+ word32 idx = 0;
+ int len = 0;
+
+ WOLFSSL_ENTER("DecodeAltSigVal");
+
+ if (ret == 0) {
+ ret = CheckBitString(input, &idx, &len, sz, 1, NULL);
+ }
+
+ if (ret == 0) {
+ cert->altSigValDer = (byte *)input + idx;
+ cert->altSigValLen = len;
+ }
+
+ WOLFSSL_LEAVE("DecodeAltSigVal", ret);
+ return ret;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
/* Macro to check if bit is set, if not sets and return success.
Otherwise returns failure */
/* Macro required here because bit-field operation */
@@ -20612,6 +21158,23 @@ static int DecodeExtensionType(const byte* input, word32 length, word32 oid,
return ASN_PARSE_E;
break;
#endif
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ case SUBJ_ALT_PUB_KEY_INFO_OID:
+ VERIFY_AND_SET_OID(cert->extSapkiSet);
+ if (DecodeSubjAltPubKeyInfo(&input[idx], length, cert) < 0)
+ return ASN_PARSE_E;
+ break;
+ case ALT_SIG_ALG_OID:
+ VERIFY_AND_SET_OID(cert->extAltSigAlgSet);
+ if (DecodeAltSigAlg(&input[idx], length, cert) < 0)
+ return ASN_PARSE_E;
+ break;
+ case ALT_SIG_VAL_OID:
+ VERIFY_AND_SET_OID(cert->extAltSigValSet);
+ if (DecodeAltSigVal(&input[idx], length, cert) < 0)
+ return ASN_PARSE_E;
+ break;
+ #endif /* WOLFSSL_DUAL_ALG_CERTS */
default:
if (isUnknownExt != NULL)
*isUnknownExt = 1;
@@ -23326,6 +23889,28 @@ void FreeSignerTable(Signer** table, int rows, void* heap)
}
}
+void FreeSignerTableType(Signer** table, int rows, byte type, void* heap)
+{
+ int i;
+
+ for (i = 0; i < rows; i++) {
+ Signer* signer = table[i];
+ Signer** next = &table[i];
+
+ while (signer) {
+ if (signer->type == type) {
+ *next = signer->next;
+ FreeSigner(signer, heap);
+ signer = *next;
+ }
+ else {
+ next = &signer->next;
+ signer = signer->next;
+ }
+ }
+ }
+}
+
#ifdef WOLFSSL_TRUST_PEER_CERT
/* Free an individual trusted peer cert.
*
@@ -23731,6 +24316,9 @@ int wc_PemGetHeaderFooter(int type, const char** header, const char** footer)
#endif
case RSA_TYPE:
case PRIVATEKEY_TYPE:
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ case ALT_PRIVATEKEY_TYPE:
+ #endif
if (header) *header = BEGIN_RSA_PRIV;
if (footer) *footer = END_RSA_PRIV;
ret = 0;
@@ -24238,7 +24826,11 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
break;
}
- if (type == PRIVATEKEY_TYPE) {
+ if (type == PRIVATEKEY_TYPE
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ || type == ALT_PRIVATEKEY_TYPE
+#endif
+ ) {
if (header == BEGIN_RSA_PRIV) {
header = BEGIN_PRIV_KEY;
footer = END_PRIV_KEY;
@@ -24311,7 +24903,11 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
if (!headerEnd) {
#ifdef OPENSSL_EXTRA
- if (type == PRIVATEKEY_TYPE) {
+ if (type == PRIVATEKEY_TYPE
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ || type == ALT_PRIVATEKEY_TYPE
+#endif
+ ) {
/* see if there is a -----BEGIN * PRIVATE KEY----- header */
headerEnd = XSTRNSTR((char*)buff, PRIV_KEY_SUFFIX, sz);
if (headerEnd) {
@@ -24390,7 +24986,11 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
if (keyFormat) {
/* keyFormat is Key_Sum enum */
- if (type == PRIVATEKEY_TYPE) {
+ if (type == PRIVATEKEY_TYPE
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ || type == ALT_PRIVATEKEY_TYPE
+ #endif
+ ) {
#ifndef NO_RSA
if (header == BEGIN_RSA_PRIV)
*keyFormat = RSAk;
@@ -25133,7 +25733,7 @@ int wc_GetFASCNFromCert(struct DecodedCert* cert, byte* fascn, word32* fascnSz)
#if !defined(NO_RSA) && (defined(WOLFSSL_CERT_GEN) || \
defined(WOLFSSL_KCAPI_RSA) || \
- ((defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA)) && !defined(HAVE_USER_RSA)))
+ ((defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA))))
/* USER RSA ifdef portions used instead of refactor in consideration for
possible fips build */
/* Encode a public RSA key to output.
@@ -25168,19 +25768,13 @@ static int SetRsaPublicKey(byte* output, RsaKey* key, int outLen,
return BAD_FUNC_ARG;
}
-#ifdef HAVE_USER_RSA
- nSz = SetASNIntRSA(key->n, NULL);
-#else
nSz = SetASNIntMP(&key->n, MAX_RSA_INT_SZ, NULL);
-#endif
+
if (nSz < 0)
return nSz;
-#ifdef HAVE_USER_RSA
- eSz = SetASNIntRSA(key->e, NULL);
-#else
eSz = SetASNIntMP(&key->e, MAX_RSA_INT_SZ, NULL);
-#endif
+
if (eSz < 0)
return eSz;
seqSz = SetSequence((word32)(nSz + eSz), seq);
@@ -25221,18 +25815,10 @@ static int SetRsaPublicKey(byte* output, RsaKey* key, int outLen,
XMEMCPY(output + idx, seq, seqSz);
idx += seqSz;
/* n */
-#ifdef HAVE_USER_RSA
- nSz = SetASNIntRSA(key->n, output + idx);
-#else
nSz = SetASNIntMP(&key->n, nSz, output + idx);
-#endif
idx += (word32)nSz;
/* e */
-#ifdef HAVE_USER_RSA
- eSz = SetASNIntRSA(key->e, output + idx);
-#else
eSz = SetASNIntMP(&key->e, eSz, output + idx);
-#endif
idx += (word32)eSz;
return (int)idx;
@@ -25260,13 +25846,8 @@ static int SetRsaPublicKey(byte* output, RsaKey* key, int outLen,
dataASN[RSAPUBLICKEYASN_IDX_ALGOID_P_SEQ].noOut = 1;
#endif
/* Set public key mp_ints. */
- #ifdef HAVE_USER_RSA
- SetASN_MP(&dataASN[RSAPUBLICKEYASN_IDX_PUBKEY_RSA_N], key->n);
- SetASN_MP(&dataASN[RSAPUBLICKEYASN_IDX_PUBKEY_RSA_E], key->e);
- #else
SetASN_MP(&dataASN[RSAPUBLICKEYASN_IDX_PUBKEY_RSA_N], &key->n);
SetASN_MP(&dataASN[RSAPUBLICKEYASN_IDX_PUBKEY_RSA_E], &key->e);
- #endif
/* Calculate size of RSA public key. */
ret = SizeASN_Items(rsaPublicKeyASN + o, dataASN + o,
(int)rsaPublicKeyASN_Length - o, &sz);
@@ -25335,11 +25916,11 @@ int wc_RsaKeyToPublicDer_ex(RsaKey* key, byte* output, word32 inLen,
}
#endif /* !NO_RSA && (WOLFSSL_CERT_GEN || WOLFSSL_KCAPI_RSA ||
- ((OPENSSL_EXTRA || WOLFSSL_KEY_GEN) && !HAVE_USER_RSA))) */
+ ((OPENSSL_EXTRA || WOLFSSL_KEY_GEN))) */
#if (defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA) || \
defined(WOLFSSL_KCAPI_RSA) || defined(WOLFSSL_SE050)) && \
- !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+ !defined(NO_RSA)
/* Encode private RSA key in DER format.
*
@@ -25478,7 +26059,7 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
#endif
}
-#endif /* (WOLFSSL_KEY_GEN || OPENSSL_EXTRA) && !NO_RSA && !HAVE_USER_RSA */
+#endif /* (WOLFSSL_KEY_GEN || OPENSSL_EXTRA) && !NO_RSA */
#ifdef WOLFSSL_CERT_GEN
@@ -26976,8 +27557,8 @@ static int EncodeName(EncodedName* name, const char* nameStr,
int ret = 0;
int sz = 0;
const byte* oid;
- word32 oidSz;
- word32 nameSz;
+ word32 oidSz = 0;
+ word32 nameSz = 0;
/* Validate input parameters. */
if ((name == NULL) || (nameStr == NULL)) {
@@ -27689,6 +28270,17 @@ static const ASNItem static_certExtsASN[] = {
/* CRLINFO_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
/* CRLINFO_OID */ { 1, ASN_OBJECT_ID, 0, 0, 0 },
/* CRLINFO_STR */ { 1, ASN_OCTET_STRING, 0, 0, 0 },
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+/* SAPKI_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
+/* SAPKI_OID */ { 1, ASN_OBJECT_ID, 0, 0, 0 },
+/* SAPKI_STR */ { 1, ASN_OCTET_STRING, 0, 0, 0 },
+/* ALTSIGALG_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
+/* ALTSIGALG_OID */ { 1, ASN_OBJECT_ID, 0, 0, 0 },
+/* ALTSIGALG_STR */ { 1, ASN_OCTET_STRING, 0, 0, 0 },
+/* ALTSIGVAL_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
+/* ALTSIGVAL_OID */ { 1, ASN_OBJECT_ID, 0, 0, 0 },
+/* ALTSIGVAL_STR */ { 1, ASN_OCTET_STRING, 0, 0, 0 },
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
/* CUSTOM_SEQ */ { 0, ASN_SEQUENCE, 1, 1, 0 },
/* CUSTOM_OID */ { 1, ASN_OBJECT_ID, 0, 0, 0 },
/* CUSTOM_STR */ { 1, ASN_OCTET_STRING, 0, 0, 0 },
@@ -27732,6 +28324,17 @@ enum {
CERTEXTSASN_IDX_CRLINFO_SEQ,
CERTEXTSASN_IDX_CRLINFO_OID,
CERTEXTSASN_IDX_CRLINFO_STR,
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ CERTEXTSASN_IDX_SAPKI_SEQ,
+ CERTEXTSASN_IDX_SAPKI_OID,
+ CERTEXTSASN_IDX_SAPKI_STR,
+ CERTEXTSASN_IDX_ALTSIGALG_SEQ,
+ CERTEXTSASN_IDX_ALTSIGALG_OID,
+ CERTEXTSASN_IDX_ALTSIGALG_STR,
+ CERTEXTSASN_IDX_ALTSIGVAL_SEQ,
+ CERTEXTSASN_IDX_ALTSIGVAL_OID,
+ CERTEXTSASN_IDX_ALTSIGVAL_STR,
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
CERTEXTSASN_IDX_CUSTOM_SEQ,
CERTEXTSASN_IDX_CUSTOM_OID,
CERTEXTSASN_IDX_CUSTOM_STR,
@@ -27754,7 +28357,7 @@ static int EncodeExtensions(Cert* cert, byte* output, word32 maxSz,
int forRequest)
{
DECL_ASNSETDATA(dataASN, certExtsASN_Length);
- int sz;
+ int sz = 0;
int ret = 0;
int i = 0;
static const byte bcOID[] = { 0x55, 0x1d, 0x13 };
@@ -27770,7 +28373,12 @@ static int EncodeExtensions(Cert* cert, byte* output, word32 maxSz,
static const byte nsCertOID[] = { 0x60, 0x86, 0x48, 0x01,
0x86, 0xF8, 0x42, 0x01, 0x01 };
static const byte crlInfoOID[] = { 0x55, 0x1D, 0x1F };
-#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ static const byte sapkiOID[] = { 0x55, 0x1d, 0x48 };
+ static const byte altSigAlgOID[] = { 0x55, 0x1d, 0x49 };
+ static const byte altSigValOID[] = { 0x55, 0x1d, 0x4a };
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+#endif /* WOLFSSL_CERT_EXT */
#ifdef WOLFSSL_SMALL_STACK
#if defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_CERT_EXT)
@@ -28002,6 +28610,47 @@ static int EncodeExtensions(Cert* cert, byte* output, word32 maxSz,
CERTEXTSASN_IDX_CRLINFO_STR);
}
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (cert->sapkiDer != NULL) {
+ /* Set subject alternative public key info OID and data. */
+ SetASN_Buffer(&dataASN[CERTEXTSASN_IDX_SAPKI_OID], sapkiOID,
+ sizeof(sapkiOID));
+ SetASN_Buffer(&dataASN[CERTEXTSASN_IDX_SAPKI_STR], cert->sapkiDer,
+ cert->sapkiLen);
+ }
+ else {
+ /* Don't write out subject alternative public key info. */
+ SetASNItem_NoOut(dataASN, CERTEXTSASN_IDX_SAPKI_SEQ,
+ CERTEXTSASN_IDX_SAPKI_STR);
+ }
+
+ if (cert->altSigAlgDer != NULL) {
+ /* Set alternative signature algorithm OID and data. */
+ SetASN_Buffer(&dataASN[CERTEXTSASN_IDX_ALTSIGALG_OID], altSigAlgOID,
+ sizeof(altSigAlgOID));
+ SetASN_Buffer(&dataASN[CERTEXTSASN_IDX_ALTSIGALG_STR],
+ cert->altSigAlgDer, cert->altSigAlgLen);
+ }
+ else {
+ /* Don't write out alternative signature algorithm. */
+ SetASNItem_NoOut(dataASN, CERTEXTSASN_IDX_ALTSIGALG_SEQ,
+ CERTEXTSASN_IDX_ALTSIGALG_STR);
+ }
+
+ if (cert->altSigValDer != NULL) {
+ /* Set alternative signature value OID and data. */
+ SetASN_Buffer(&dataASN[CERTEXTSASN_IDX_ALTSIGVAL_OID], altSigValOID,
+ sizeof(altSigValOID));
+ SetASN_Buffer(&dataASN[CERTEXTSASN_IDX_ALTSIGVAL_STR],
+ cert->altSigValDer, cert->altSigValLen);
+ }
+ else {
+ /* Don't write out alternative signature value. */
+ SetASNItem_NoOut(dataASN, CERTEXTSASN_IDX_ALTSIGVAL_SEQ,
+ CERTEXTSASN_IDX_ALTSIGVAL_STR);
+ }
+ #endif /* WOLFSSL_DUAL_ALG_CERTS */
+
#if defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_CUSTOM_OID)
/* encode a custom oid and value */
if (cert->extCustom.oidSz > 0) {
@@ -28897,7 +29546,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
#if defined(HAVE_FALCON)
if (!rsaKey && !eccKey && !ed25519Key && !ed448Key && falconKey) {
word32 outSz = sigSz;
- ret = wc_falcon_sign_msg(buf, sz, sig, &outSz, falconKey);
+ ret = wc_falcon_sign_msg(buf, sz, sig, &outSz, falconKey, rng);
if (ret == 0)
ret = outSz;
}
@@ -28906,7 +29555,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
if (!rsaKey && !eccKey && !ed25519Key && !ed448Key && !falconKey &&
dilithiumKey) {
word32 outSz = sigSz;
- ret = wc_dilithium_sign_msg(buf, sz, sig, &outSz, dilithiumKey);
+ ret = wc_dilithium_sign_msg(buf, sz, sig, &outSz, dilithiumKey, rng);
if (ret == 0)
ret = outSz;
}
@@ -28915,7 +29564,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
if (!rsaKey && !eccKey && !ed25519Key && !ed448Key && !falconKey &&
!dilithiumKey && sphincsKey) {
word32 outSz = sigSz;
- ret = wc_sphincs_sign_msg(buf, sz, sig, &outSz, sphincsKey);
+ ret = wc_sphincs_sign_msg(buf, sz, sig, &outSz, sphincsKey, rng);
if (ret == 0)
ret = outSz;
}
@@ -29342,8 +29991,24 @@ static int MakeAnyCert(Cert* cert, byte* derBuffer, word32 derSz,
(byte)cert->version);
SetASN_Buffer(&dataASN[X509CERTASN_IDX_TBS_SERIAL], cert->serial,
(word32)cert->serialSz);
- SetASN_OID(&dataASN[X509CERTASN_IDX_TBS_ALGOID_OID],
- (word32)cert->sigType, oidSigType);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ if (cert->sigType == 0) {
+ /* sigOID being 0 indicates preTBS. Do not encode signature. */
+ dataASN[X509CERTASN_IDX_TBS_ALGOID_SEQ].noOut = 1;
+ dataASN[X509CERTASN_IDX_TBS_ALGOID_OID].noOut = 1;
+ dataASN[X509CERTASN_IDX_TBS_ALGOID_PARAMS_NULL].noOut = 1;
+ #ifdef WC_RSA_PSS
+ dataASN[X509CERTASN_IDX_TBS_ALGOID_PARAMS].noOut = 1;
+ #endif
+
+ }
+ else
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ {
+ SetASN_OID(&dataASN[X509CERTASN_IDX_TBS_ALGOID_OID],
+ (word32)cert->sigType, oidSigType);
+ }
+
if (IsSigAlgoECC((word32)cert->sigType)) {
/* No NULL tagged item with ECDSA and EdDSA signature OIDs. */
dataASN[X509CERTASN_IDX_TBS_ALGOID_PARAMS_NULL].noOut = 1;
@@ -30622,6 +31287,126 @@ static int SignCert(int requestSz, int sType, byte* buf, word32 buffSz,
return sigSz;
}
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+int wc_MakeSigWithBitStr(byte *sig, int sigSz, int sType, byte* buf,
+ word32 bufSz, int keyType, void* key, WC_RNG* rng)
+{
+ RsaKey* rsaKey = NULL;
+ ecc_key* eccKey = NULL;
+ ed25519_key* ed25519Key = NULL;
+ ed448_key* ed448Key = NULL;
+ falcon_key* falconKey = NULL;
+ dilithium_key* dilithiumKey = NULL;
+ sphincs_key* sphincsKey = NULL;
+
+ int ret = 0;
+ int headerSz;
+ void* heap = NULL;
+ CertSignCtx certSignCtx_lcl;
+ CertSignCtx* certSignCtx = &certSignCtx_lcl;
+
+ if ((sig == NULL) || (sigSz <= 0)) {
+ return BAD_FUNC_ARG;
+ }
+
+ XMEMSET(certSignCtx, 0, sizeof(*certSignCtx));
+
+ switch (keyType)
+ {
+ case RSA_TYPE:
+ rsaKey = (RsaKey*)key;
+ break;
+ case ECC_TYPE:
+ eccKey = (ecc_key*)key;
+ break;
+ case ED25519_TYPE:
+ ed25519Key = (ed25519_key*)key;
+ break;
+ case ED448_TYPE:
+ ed448Key = (ed448_key*)key;
+ break;
+ case FALCON_LEVEL1_TYPE:
+ case FALCON_LEVEL5_TYPE:
+ falconKey = (falcon_key*)key;
+ break;
+ case DILITHIUM_LEVEL2_TYPE:
+ case DILITHIUM_LEVEL3_TYPE:
+ case DILITHIUM_LEVEL5_TYPE:
+ dilithiumKey = (dilithium_key*)key;
+ break;
+ case SPHINCS_FAST_LEVEL1_TYPE:
+ case SPHINCS_FAST_LEVEL3_TYPE:
+ case SPHINCS_FAST_LEVEL5_TYPE:
+ case SPHINCS_SMALL_LEVEL1_TYPE:
+ case SPHINCS_SMALL_LEVEL3_TYPE:
+ case SPHINCS_SMALL_LEVEL5_TYPE:
+ sphincsKey = (sphincs_key*)key;
+ break;
+ default:
+ return BAD_FUNC_ARG;
+ }
+
+ /* locate ctx */
+ if (rsaKey) {
+ #ifndef NO_RSA
+ #ifdef WOLFSSL_ASYNC_CRYPT
+ certSignCtx = &rsaKey->certSignCtx;
+ #endif
+ heap = rsaKey->heap;
+ #else
+ return NOT_COMPILED_IN;
+ #endif /* NO_RSA */
+ }
+ else if (eccKey) {
+ #ifdef HAVE_ECC
+ #ifdef WOLFSSL_ASYNC_CRYPT
+ certSignCtx = &eccKey->certSignCtx;
+ #endif
+ heap = eccKey->heap;
+ #else
+ return NOT_COMPILED_IN;
+ #endif /* HAVE_ECC */
+ }
+
+ if (certSignCtx->sig == NULL) {
+ certSignCtx->sig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ, heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (certSignCtx->sig == NULL)
+ return MEMORY_E;
+ }
+
+ ret = MakeSignature(certSignCtx, buf, (word32)bufSz, certSignCtx->sig,
+ MAX_ENCODED_SIG_SZ, rsaKey, eccKey, ed25519Key, ed448Key,
+ falconKey, dilithiumKey, sphincsKey, rng, (word32)sType, heap);
+#ifdef WOLFSSL_ASYNC_CRYPT
+ if (ret == WC_PENDING_E) {
+ /* Not free'ing certSignCtx->sig here because it could still be in use
+ * with async operations. */
+ return ret;
+ }
+#endif
+
+ if (ret <= 0) {
+ return ret;
+ }
+
+ headerSz = SetBitString(ret, 0, NULL);
+ if (headerSz + ret > sigSz) {
+ ret = BUFFER_E;
+ }
+
+ if (ret > 0) {
+ sig += SetBitString(ret, 0, sig);
+ XMEMCPY(sig, certSignCtx->sig, ret);
+ ret += headerSz;
+ }
+
+ XFREE(certSignCtx->sig, heap, DYNAMIC_TYPE_TMP_BUFFER);
+ certSignCtx->sig = NULL;
+ return ret;
+}
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+
int wc_SignCert_ex(int requestSz, int sType, byte* buf, word32 buffSz,
int keyType, void* key, WC_RNG* rng)
{
@@ -31136,8 +31921,8 @@ int wc_SetExtKeyUsage(Cert *cert, const char *value)
int wc_SetExtKeyUsageOID(Cert *cert, const char *in, word32 sz, byte idx,
void* heap)
{
- byte oid[MAX_OID_SZ];
- word32 oidSz = MAX_OID_SZ;
+ byte oid[CTC_MAX_EKU_OID_SZ];
+ word32 oidSz = CTC_MAX_EKU_OID_SZ;
if (idx >= CTC_MAX_EKU_NB || sz >= CTC_MAX_EKU_OID_SZ) {
WOLFSSL_MSG("Either idx or sz was too large");
@@ -32211,6 +32996,11 @@ int DecodeECC_DSA_Sig_Ex(const byte* sig, word32 sigLen, mp_int* r, mp_int* s,
/* Decode the DSA signature. */
ret = GetASN_Items(dsaSigASN, dataASN, dsaSigASN_Length, 0, sig, &idx,
sigLen);
+
+ if (ret != 0) {
+ ret = ASN_ECC_KEY_E;
+ }
+
#ifndef NO_STRICT_ECDSA_LEN
/* sanity check that the index has been advanced all the way to the end of
* the buffer */
@@ -32350,12 +33140,12 @@ static int EccSpecifiedECDomainDecode(const byte* input, word32 inSz,
{
DECL_ASNGETDATA(dataASN, eccSpecifiedASN_Length);
int ret = 0;
- ecc_set_type* curve;
+ ecc_set_type* curve = NULL;
word32 idx = 0;
- byte version;
- byte cofactor;
- const byte *base;
- word32 baseLen;
+ byte version = 0;
+ byte cofactor = 0;
+ const byte *base = NULL;
+ word32 baseLen = 0;
/* Allocate a new parameter set. */
curve = (ecc_set_type*)XMALLOC(sizeof(*curve), heap,
@@ -32693,7 +33483,7 @@ int wc_EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key,
return ret;
#else
DECL_ASNGETDATA(dataASN, eccKeyASN_Length);
- byte version;
+ byte version = 0;
int ret = 0;
int curve_id = ECC_CURVE_DEF;
#if defined(HAVE_PKCS8) || defined(HAVE_PKCS12) || defined(SM2)
@@ -32813,7 +33603,7 @@ static int ASNToHexString(const byte* input, word32* inOutIdx, char** out,
return 0;
}
-static int EccKeyParamCopy(char** dst, char* src)
+static int EccKeyParamCopy(char** dst, char* src, void* heap)
{
int ret = 0;
#ifdef WOLFSSL_ECC_CURVE_STATIC
@@ -32834,8 +33624,9 @@ static int EccKeyParamCopy(char** dst, char* src)
else {
XSTRNCPY(*dst, src, MAX_ECC_STRING);
}
- XFREE(src, key->heap, DYNAMIC_TYPE_ECC_BUFFER);
+ XFREE(src, heap, DYNAMIC_TYPE_ECC_BUFFER);
#endif
+ (void)heap;
return ret;
}
@@ -32943,10 +33734,10 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
key->heap, DYNAMIC_TYPE_ECC_BUFFER);
if (ret == 0) {
#ifndef WOLFSSL_ECC_CURVE_STATIC
- ret = EccKeyParamCopy((char**)&curve->prime, p);
+ ret = EccKeyParamCopy((char**)&curve->prime, p, key->heap);
#else
const char *_tmp_ptr = &curve->prime[0];
- ret = EccKeyParamCopy((char**)&_tmp_ptr, p);
+ ret = EccKeyParamCopy((char**)&_tmp_ptr, p, key->heap);
#endif
}
}
@@ -32962,10 +33753,10 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
key->heap, DYNAMIC_TYPE_ECC_BUFFER);
if (ret == 0) {
#ifndef WOLFSSL_ECC_CURVE_STATIC
- ret = EccKeyParamCopy((char**)&curve->Af, af);
+ ret = EccKeyParamCopy((char**)&curve->Af, af, key->heap);
#else
const char *_tmp_ptr = &curve->Af[0];
- ret = EccKeyParamCopy((char**)&_tmp_ptr, af);
+ ret = EccKeyParamCopy((char**)&_tmp_ptr, af, key->heap);
#endif
}
}
@@ -32975,10 +33766,10 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
key->heap, DYNAMIC_TYPE_ECC_BUFFER);
if (ret == 0) {
#ifndef WOLFSSL_ECC_CURVE_STATIC
- ret = EccKeyParamCopy((char**)&curve->Bf, bf);
+ ret = EccKeyParamCopy((char**)&curve->Bf, bf, key->heap);
#else
const char *_tmp_ptr = &curve->Bf[0];
- ret = EccKeyParamCopy((char**)&_tmp_ptr, bf);
+ ret = EccKeyParamCopy((char**)&_tmp_ptr, bf, key->heap);
#endif
}
}
@@ -33035,10 +33826,10 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
key->heap, DYNAMIC_TYPE_ECC_BUFFER);
if (ret == 0) {
#ifndef WOLFSSL_ECC_CURVE_STATIC
- ret = EccKeyParamCopy((char**)&curve->order, o);
+ ret = EccKeyParamCopy((char**)&curve->order, o, key->heap);
#else
const char *_tmp_ptr = &curve->order[0];
- ret = EccKeyParamCopy((char**)&_tmp_ptr, o);
+ ret = EccKeyParamCopy((char**)&_tmp_ptr, o, key->heap);
#endif
}
}
@@ -34069,7 +34860,7 @@ int SetAsymKeyDer(const byte* privKey, word32 privKeyLen,
/* pubKey */
if (pubKey) {
idx += SetHeader(ASN_CONTEXT_SPECIFIC | ASN_ASYMKEY_PUBKEY |
- 1, pubKeyLen, output + idx);
+ 1, pubKeyLen, output + idx, 0);
XMEMCPY(output + idx, pubKey, pubKeyLen);
idx += pubKeyLen;
}
@@ -34447,7 +35238,7 @@ static const ASNItem singleResponseASN[] = {
/* revocationTime */
/* CS_REVOKED_TIME */ { 2, ASN_GENERALIZED_TIME, 0, 0, 0 },
/* revocationReason [0] EXPLICIT CRLReason OPTIONAL */
-/* CS_REVOKED_REASON */ { 2, ASN_CONTEXT_SPECIFIC | 0, 0, 1, 1 },
+/* CS_REVOKED_REASON */ { 2, ASN_CONTEXT_SPECIFIC | 0, 1, 1, 1 },
/* crlReason */
/* CS_REVOKED_REASON_VAL */ { 3, ASN_ENUMERATED, 0, 0, 0 },
/* unknown [2] IMPLICIT UnknownInfo ::= NULL */
@@ -35069,7 +35860,8 @@ static int DecodeResponseData(byte* source, word32* ioIndex,
DECL_ASNGETDATA(dataASN, ocspRespDataASN_Length);
int ret = 0;
byte version;
- word32 dateSz, idx = *ioIndex;
+ word32 dateSz = 0;
+ word32 idx = *ioIndex;
OcspEntry* single = NULL;
WOLFSSL_ENTER("DecodeResponseData");
@@ -35443,13 +36235,11 @@ static int DecodeBasicOcspResponse(byte* source, word32* ioIndex,
if (ret == 0) {
word32 dataIdx = 0;
/* Decode the response data. */
- if (DecodeResponseData(
+ ret = DecodeResponseData(
GetASNItem_Addr(dataASN[OCSPBASICRESPASN_IDX_TBS_SEQ], source),
&dataIdx, resp,
GetASNItem_Length(dataASN[OCSPBASICRESPASN_IDX_TBS_SEQ], source)
- ) < 0) {
- ret = ASN_PARSE_E;
- }
+ );
}
#ifdef WC_RSA_PSS
if (ret == 0 && (dataASN[OCSPBASICRESPASN_IDX_SIGNATURE_PARAMS].tag != 0)) {
@@ -35723,7 +36513,7 @@ int OcspResponseDecode(OcspResponse* resp, void* cm, void* heap, int noVerify)
int ret = 0;
word32 idx = 0, size = resp->maxIdx;
byte* source = resp->source;
- byte status;
+ byte status = 0;
byte* basic;
word32 basicSz;
@@ -35848,18 +36638,20 @@ word32 EncodeOcspRequestExtensions(OcspRequest* req, byte* output, word32 size)
/* Check request has nonce to write in extension. */
if (req != NULL && req->nonceSz != 0) {
DECL_ASNSETDATA(dataASN, ocspNonceExtASN_Length);
- int sz;
+ int sz = 0;
CALLOC_ASNSETDATA(dataASN, ocspNonceExtASN_Length, ret, req->heap);
- /* Set nonce extension OID and nonce. */
- SetASN_Buffer(&dataASN[OCSPNONCEEXTASN_IDX_EXT_OID], NonceObjId,
- sizeof(NonceObjId));
- SetASN_Buffer(&dataASN[OCSPNONCEEXTASN_IDX_EXT_NONCE], req->nonce,
- (word32)req->nonceSz);
- /* Calculate size of nonce extension. */
- ret = SizeASN_Items(ocspNonceExtASN, dataASN, ocspNonceExtASN_Length,
- &sz);
+ if (ret == 0) {
+ /* Set nonce extension OID and nonce. */
+ SetASN_Buffer(&dataASN[OCSPNONCEEXTASN_IDX_EXT_OID], NonceObjId,
+ sizeof(NonceObjId));
+ SetASN_Buffer(&dataASN[OCSPNONCEEXTASN_IDX_EXT_NONCE], req->nonce,
+ (word32)req->nonceSz);
+ /* Calculate size of nonce extension. */
+ ret = SizeASN_Items(ocspNonceExtASN, dataASN,
+ ocspNonceExtASN_Length, &sz);
+ }
/* Check buffer big enough for encoding if supplied. */
if ((ret == 0) && (output != NULL) && (sz > (int)size)) {
ret = BUFFER_E;
@@ -35969,7 +36761,7 @@ int EncodeOcspRequest(OcspRequest* req, byte* output, word32 size)
*/
extSz = EncodeOcspRequestExtensions(req, extArray + 2,
OCSP_NONCE_EXT_SZ);
- extSz += SetExplicit(2, extSz, extArray);
+ extSz += SetExplicit(2, extSz, extArray, 0);
}
totalSz = algoSz + issuerSz + issuerKeySz + snSz;
@@ -36606,7 +37398,8 @@ static int GetCRL_Signature(const byte* source, word32* idx, DecodedCRL* dcrl,
int VerifyCRL_Signature(SignatureCtx* sigCtx, const byte* toBeSigned,
word32 tbsSz, const byte* signature, word32 sigSz,
- word32 signatureOID, Signer *ca, void* heap)
+ word32 signatureOID, const byte* sigParams,
+ int sigParamsSz, Signer *ca, void* heap)
{
/* try to confirm/verify signature */
#ifndef IGNORE_KEY_EXTENSIONS
@@ -36620,7 +37413,7 @@ int VerifyCRL_Signature(SignatureCtx* sigCtx, const byte* toBeSigned,
InitSignatureCtx(sigCtx, heap, INVALID_DEVID);
if (ConfirmSignature(sigCtx, toBeSigned, tbsSz, ca->publicKey,
ca->pubKeySize, ca->keyOID, signature, sigSz,
- signatureOID, NULL, 0, NULL) != 0) {
+ signatureOID, sigParams, sigParamsSz, NULL) != 0) {
WOLFSSL_MSG("CRL Confirm signature failed");
WOLFSSL_ERROR_VERBOSE(ASN_CRL_CONFIRM_E);
return ASN_CRL_CONFIRM_E;
@@ -36639,7 +37432,8 @@ int VerifyCRL_Signature(SignatureCtx* sigCtx, const byte* toBeSigned,
* @return ASN_CRL_NO_SIGNER_E when no signer found.
* @return ASN_CRL_CONFIRM_E when signature did not verify.
*/
-static int PaseCRL_CheckSignature(DecodedCRL* dcrl, const byte* buff, void* cm)
+static int PaseCRL_CheckSignature(DecodedCRL* dcrl, const byte* sigParams,
+ int sigParamsSz, const byte* buff, void* cm)
{
int ret = 0;
Signer* ca = NULL;
@@ -36683,7 +37477,7 @@ static int PaseCRL_CheckSignature(DecodedCRL* dcrl, const byte* buff, void* cm)
/* Verify CRL signature with CA. */
ret = VerifyCRL_Signature(&sigCtx, buff + dcrl->certBegin,
dcrl->sigIndex - dcrl->certBegin, dcrl->signature, dcrl->sigLength,
- dcrl->signatureOID, ca, dcrl->heap);
+ dcrl->signatureOID, sigParams, sigParamsSz, ca, dcrl->heap);
}
return ret;
@@ -36715,8 +37509,24 @@ static int ParseCRL_CertList(RevokedCert* rcert, DecodedCRL* dcrl,
dcrl->version++;
}
- if (GetAlgoId(buf, &idx, &oid, oidIgnoreType, sz) < 0)
+ if (GetAlgoId(buf, &idx, &oid, oidIgnoreType, sz) < 0) {
return ASN_PARSE_E;
+ }
+#ifdef WC_RSA_PSS
+ else if (oid == CTC_RSASSAPSS) {
+ word32 tmpSz;
+ int len;
+
+ tmpSz = idx;
+ dcrl->sigParamsIndex = idx;
+ if (GetSequence(buf, &idx, &len, sz) < 0) {
+ dcrl->sigParamsIndex = 0;
+ return ASN_PARSE_E;
+ }
+ idx += len;
+ dcrl->sigParamsLength = idx - tmpSz;
+ }
+#endif
checkIdx = idx;
if (GetSequence(buf, &checkIdx, &length, sz) < 0) {
@@ -37080,6 +37890,9 @@ static const ASNItem crlASN[] = {
/* TBS_SIGALGO_OID */ { 3, ASN_OBJECT_ID, 0, 0, 0 },
/* TBS_SIGALGO_NULL */ { 3, ASN_TAG_NULL, 0, 0, 1 },
/* issuer */
+#ifdef WC_RSA_PSS
+/* TBS_SIGALGO_P_SEQ */ { 3, ASN_SEQUENCE, 1, 0, 2 },
+#endif
/* TBS_ISSUER */ { 2, ASN_SEQUENCE, 1, 0, 0 },
/* thisUpdate */
/* TBS_THISUPDATE_UTC */ { 2, ASN_UTC_TIME, 0, 0, 2 },
@@ -37096,6 +37909,9 @@ static const ASNItem crlASN[] = {
/* SIGALGO */ { 1, ASN_SEQUENCE, 1, 1, 0 },
/* SIGALGO_OID */ { 2, ASN_OBJECT_ID, 0, 0, 0 },
/* SIGALGO_NULL */ { 2, ASN_TAG_NULL, 0, 0, 1 },
+#ifdef WC_RSA_PSS
+/* SIGALGO_PARAMS */ { 2, ASN_SEQUENCE, 1, 0, 2 },
+#endif
/* signatureValue */
/* SIGNATURE */ { 1, ASN_BIT_STRING, 0, 0, 0 },
};
@@ -37106,6 +37922,9 @@ enum {
CRLASN_IDX_TBS_SIGALGO,
CRLASN_IDX_TBS_SIGALGO_OID,
CRLASN_IDX_TBS_SIGALGO_NULL,
+#ifdef WC_RSA_PSS
+ CRLASN_IDX_TBS_SIGALGO_PARAMS,
+#endif
CRLASN_IDX_TBS_ISSUER,
CRLASN_IDX_TBS_THISUPDATE_UTC,
CRLASN_IDX_TBS_THISUPDATE_GT,
@@ -37117,6 +37936,9 @@ enum {
CRLASN_IDX_SIGALGO,
CRLASN_IDX_SIGALGO_OID,
CRLASN_IDX_SIGALGO_NULL,
+#ifdef WC_RSA_PSS
+ CRLASN_IDX_SIGALGO_PARAMS,
+#endif
CRLASN_IDX_SIGNATURE,
};
@@ -37134,6 +37956,10 @@ int ParseCRL(RevokedCert* rcert, DecodedCRL* dcrl, const byte* buff, word32 sz,
int ret = 0;
int len;
word32 idx = 0;
+#ifdef WC_RSA_PSS
+ const byte* sigParams = NULL;
+ int sigParamsSz = 0;
+#endif
WOLFSSL_MSG("ParseCRL");
@@ -37163,8 +37989,24 @@ int ParseCRL(RevokedCert* rcert, DecodedCRL* dcrl, const byte* buff, word32 sz,
idx = dcrl->sigIndex;
- if (GetAlgoId(buff, &idx, &dcrl->signatureOID, oidSigType, sz) < 0)
+ if (GetAlgoId(buff, &idx, &dcrl->signatureOID, oidSigType, sz) < 0) {
return ASN_PARSE_E;
+ }
+#ifdef WC_RSA_PSS
+ else if (dcrl->signatureOID == CTC_RSASSAPSS) {
+ word32 tmpSz;
+ const byte* params;
+
+ tmpSz = idx;
+ params = buff + idx;
+ if (GetSequence(buff, &idx, &len, sz) < 0) {
+ return ASN_PARSE_E;
+ }
+ idx += len;
+ sigParams = params;
+ sigParamsSz = idx - tmpSz;
+ }
+#endif
if (GetCRL_Signature(buff, &idx, dcrl, sz) < 0)
return ASN_PARSE_E;
@@ -37204,7 +38046,7 @@ int ParseCRL(RevokedCert* rcert, DecodedCRL* dcrl, const byte* buff, word32 sz,
WOLFSSL_MSG("Found CRL issuer CA");
ret = VerifyCRL_Signature(&sigCtx, buff + dcrl->certBegin,
dcrl->sigIndex - dcrl->certBegin, dcrl->signature, dcrl->sigLength,
- dcrl->signatureOID, ca, dcrl->heap);
+ dcrl->signatureOID, sigParams, sigParamsSz, ca, dcrl->heap);
end:
return ret;
@@ -37217,6 +38059,12 @@ end:
/* Size of buffer for date. */
word32 lastDateSz = MAX_DATE_SIZE;
word32 nextDateSz = MAX_DATE_SIZE;
+ const byte* sigParams = NULL;
+ int sigParamsSz = 0;
+#ifdef WC_RSA_PSS
+ const byte* tbsParams = NULL;
+ int tbsParamsSz = 0;
+#endif
/* When NO_ASN_TIME is defined, verify not used. */
(void)verify;
@@ -37269,11 +38117,54 @@ end:
dcrl->certBegin = dataASN[CRLASN_IDX_TBS].offset;
/* Store index of signature. */
dcrl->sigIndex = dataASN[CRLASN_IDX_SIGALGO].offset;
+
+ #ifdef WC_RSA_PSS
+ /* get TBS and Signature parameters for PSS */
+ if (dataASN[CRLASN_IDX_TBS_SIGALGO_PARAMS].tag != 0) {
+ tbsParams =
+ GetASNItem_Addr(dataASN[CRLASN_IDX_TBS_SIGALGO_PARAMS],
+ buff);
+ tbsParamsSz =
+ GetASNItem_Length(dataASN[CRLASN_IDX_TBS_SIGALGO_PARAMS],
+ buff);
+ }
+ if (dataASN[CRLASN_IDX_SIGALGO_PARAMS].tag != 0) {
+ sigParams =
+ GetASNItem_Addr(dataASN[CRLASN_IDX_SIGALGO_PARAMS],
+ buff);
+ sigParamsSz =
+ GetASNItem_Length(dataASN[CRLASN_IDX_SIGALGO_PARAMS],
+ buff);
+ dcrl->sigParamsIndex =
+ dataASN[CRLASN_IDX_SIGALGO_PARAMS].offset;
+ dcrl->sigParamsLength = sigParamsSz;
+ }
+ #endif
+
/* Store address and length of signature data. */
GetASN_GetRef(&dataASN[CRLASN_IDX_SIGNATURE], &dcrl->signature,
&dcrl->sigLength);
/* Get the signature OID. */
dcrl->signatureOID = dataASN[CRLASN_IDX_SIGALGO_OID].data.oid.sum;
+
+ #ifdef WC_RSA_PSS
+ /* Sanity check on parameters found */
+ if (tbsParamsSz != sigParamsSz) {
+ WOLFSSL_MSG("CRL TBS and signature parameter sizes mismatch");
+ ret = ASN_PARSE_E;
+ }
+ else if ((tbsParamsSz > 0) &&
+ (dataASN[CRLASN_IDX_TBS_SIGALGO_OID].data.oid.sum != CTC_RSASSAPSS)) {
+ WOLFSSL_MSG("CRL unexpected signature parameters found");
+ ret = ASN_PARSE_E;
+ }
+ else if ((tbsParamsSz > 0) &&
+ (XMEMCMP(tbsParams, sigParams, tbsParamsSz) != 0)) {
+ WOLFSSL_MSG("CRL TBS and signature parameter mismatch");
+ ret = ASN_PARSE_E;
+ }
+ #endif
+
/* Get the format/tag of the last and next date. */
dcrl->lastDateFormat = (dataASN[CRLASN_IDX_TBS_THISUPDATE_UTC].tag != 0)
? dataASN[CRLASN_IDX_TBS_THISUPDATE_UTC].tag
@@ -37326,7 +38217,7 @@ end:
}
if (ret == 0) {
/* Find signer and verify signature. */
- ret = PaseCRL_CheckSignature(dcrl, buff, cm);
+ ret = PaseCRL_CheckSignature(dcrl, sigParams, sigParamsSz, buff, cm);
}
FREE_ASNGETDATA(dataASN, dcrl->heap);
@@ -37597,8 +38488,10 @@ int wc_MIME_parse_headers(char* in, int inLen, MimeHdr** headers)
mimeType == MIME_PARAM)) && pos >= 1) {
mimeStatus = MIME_BODYVAL;
end = pos-1;
- if (nameAttr != NULL)
+ if (nameAttr != NULL) {
XFREE(nameAttr, NULL, DYNAMIC_TYPE_PKCS7);
+ nameAttr = NULL;
+ }
ret = wc_MIME_header_strip(curLine, &nameAttr, start, end);
if (ret) {
goto error;
@@ -38637,8 +39530,7 @@ int wc_Asn1_PrintAll(Asn1* asn1, Asn1PrintOptions* opts, unsigned char* data,
#endif /* !NO_ASN */
/* Functions that parse, but are not using ASN.1 */
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA) && \
- (!defined(NO_BIG_INT) || defined(WOLFSSL_SP_MATH))
+#if !defined(NO_RSA) && (!defined(NO_BIG_INT) || defined(WOLFSSL_SP_MATH))
/* import RSA public key elements (n, e) into RsaKey structure (key) */
/* this function does not use any ASN.1 parsing */
int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e,
@@ -38689,7 +39581,7 @@ int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e,
return 0;
}
-#endif /* !NO_RSA && !HAVE_USER_RSA && (!NO_BIG_INT || WOLFSSL_SP_MATH) */
+#endif /* !NO_RSA && (!NO_BIG_INT || WOLFSSL_SP_MATH) */
#ifdef WOLFSSL_SEP
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/chacha.c b/extra/wolfssl/wolfssl/wolfcrypt/src/chacha.c
index d3a982ed..c84829b7 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/chacha.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/chacha.c
@@ -200,6 +200,7 @@ int wc_Chacha_SetKey(ChaCha* ctx, const byte* key, word32 keySz)
return 0;
}
+#ifndef USE_INTEL_CHACHA_SPEEDUP
/**
* Converts word into bytes with rotations having been done.
*/
@@ -228,6 +229,7 @@ static WC_INLINE void wc_Chacha_wordtobyte(word32 x[CHACHA_CHUNK_WORDS],
#endif
}
}
+#endif /* !USE_INTEL_CHACHA_SPEEDUP */
#ifdef HAVE_XCHACHA
@@ -325,6 +327,7 @@ extern void chacha_encrypt_avx2(ChaCha* ctx, const byte* m, byte* c,
#endif
+#ifndef USE_INTEL_CHACHA_SPEEDUP
/**
* Encrypt a stream of bytes
*/
@@ -372,6 +375,8 @@ static void wc_Chacha_encrypt_bytes(ChaCha* ctx, const byte* m, byte* c,
ctx->left = CHACHA_CHUNK_BYTES - bytes;
}
}
+#endif /* !USE_INTEL_CHACHA_SPEEDUP */
+
/**
* API to encrypt/decrypt a message of any size.
@@ -423,10 +428,10 @@ int wc_Chacha_Process(ChaCha* ctx, byte* output, const byte* input,
chacha_encrypt_x64(ctx, input, output, msglen);
return 0;
}
-#endif
+#else
wc_Chacha_encrypt_bytes(ctx, input, output, msglen);
-
return 0;
+#endif
}
void wc_Chacha_purge_current_block(ChaCha* ctx) {
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/chacha20_poly1305.c b/extra/wolfssl/wolfssl/wolfcrypt/src/chacha20_poly1305.c
index 0c37de74..df4147c8 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/chacha20_poly1305.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/chacha20_poly1305.c
@@ -57,7 +57,11 @@ int wc_ChaCha20Poly1305_Encrypt(
byte outAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE])
{
int ret;
- ChaChaPoly_Aead aead;
+#ifdef WOLFSSL_SMALL_STACK
+ ChaChaPoly_Aead *aead = NULL;
+#else
+ ChaChaPoly_Aead aead[1];
+#endif
/* Validate function arguments */
if (!inKey || !inIV ||
@@ -68,15 +72,27 @@ int wc_ChaCha20Poly1305_Encrypt(
return BAD_FUNC_ARG;
}
- ret = wc_ChaCha20Poly1305_Init(&aead, inKey, inIV,
+#ifdef WOLFSSL_SMALL_STACK
+ aead = (ChaChaPoly_Aead *)XMALLOC(sizeof(*aead), NULL,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (aead == NULL)
+ return MEMORY_E;
+#endif
+
+ ret = wc_ChaCha20Poly1305_Init(aead, inKey, inIV,
CHACHA20_POLY1305_AEAD_ENCRYPT);
if (ret == 0)
- ret = wc_ChaCha20Poly1305_UpdateAad(&aead, inAAD, inAADLen);
+ ret = wc_ChaCha20Poly1305_UpdateAad(aead, inAAD, inAADLen);
if (ret == 0)
- ret = wc_ChaCha20Poly1305_UpdateData(&aead, inPlaintext, outCiphertext,
+ ret = wc_ChaCha20Poly1305_UpdateData(aead, inPlaintext, outCiphertext,
inPlaintextLen);
if (ret == 0)
- ret = wc_ChaCha20Poly1305_Final(&aead, outAuthTag);
+ ret = wc_ChaCha20Poly1305_Final(aead, outAuthTag);
+
+#ifdef WOLFSSL_SMALL_STACK
+ XFREE(aead, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
return ret;
}
@@ -90,7 +106,11 @@ int wc_ChaCha20Poly1305_Decrypt(
byte* outPlaintext)
{
int ret;
- ChaChaPoly_Aead aead;
+#ifdef WOLFSSL_SMALL_STACK
+ ChaChaPoly_Aead *aead = NULL;
+#else
+ ChaChaPoly_Aead aead[1];
+#endif
byte calculatedAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE];
/* Validate function arguments */
@@ -102,19 +122,31 @@ int wc_ChaCha20Poly1305_Decrypt(
return BAD_FUNC_ARG;
}
+#ifdef WOLFSSL_SMALL_STACK
+ aead = (ChaChaPoly_Aead *)XMALLOC(sizeof(*aead), NULL,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (aead == NULL)
+ return MEMORY_E;
+#endif
+
XMEMSET(calculatedAuthTag, 0, sizeof(calculatedAuthTag));
- ret = wc_ChaCha20Poly1305_Init(&aead, inKey, inIV,
+ ret = wc_ChaCha20Poly1305_Init(aead, inKey, inIV,
CHACHA20_POLY1305_AEAD_DECRYPT);
if (ret == 0)
- ret = wc_ChaCha20Poly1305_UpdateAad(&aead, inAAD, inAADLen);
+ ret = wc_ChaCha20Poly1305_UpdateAad(aead, inAAD, inAADLen);
if (ret == 0)
- ret = wc_ChaCha20Poly1305_UpdateData(&aead, inCiphertext, outPlaintext,
+ ret = wc_ChaCha20Poly1305_UpdateData(aead, inCiphertext, outPlaintext,
inCiphertextLen);
if (ret == 0)
- ret = wc_ChaCha20Poly1305_Final(&aead, calculatedAuthTag);
+ ret = wc_ChaCha20Poly1305_Final(aead, calculatedAuthTag);
if (ret == 0)
ret = wc_ChaCha20Poly1305_CheckTag(inAuthTag, calculatedAuthTag);
+
+#ifdef WOLFSSL_SMALL_STACK
+ XFREE(aead, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
return ret;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/cmac.c b/extra/wolfssl/wolfssl/wolfcrypt/src/cmac.c
index 7cade190..c1edfc3a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/cmac.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/cmac.c
@@ -96,7 +96,7 @@ void ShiftAndXorRb(byte* out, byte* in)
int wc_InitCmac_ex(Cmac* cmac, const byte* key, word32 keySz,
int type, void* unused, void* heap, int devId)
{
- int ret;
+ int ret = 0;
#if defined(WOLFSSL_SE050) && defined(WOLFSSL_SE050_CRYPT)
byte useSW = 0;
#endif
@@ -196,10 +196,12 @@ int wc_CmacUpdate(Cmac* cmac, const byte* in, word32 inSz)
if (ret != CRYPTOCB_UNAVAILABLE)
return ret;
/* fall-through when unavailable */
- ret = 0; /* reset error code */
}
#endif
+ /* Clear CRYPTOCB_UNAVAILABLE return code */
+ ret = 0;
+
while (inSz != 0) {
word32 add = min(inSz, AES_BLOCK_SIZE - cmac->bufferSz);
XMEMCPY(&cmac->buffer[cmac->bufferSz], in, add);
@@ -242,7 +244,7 @@ int wc_CmacFree(Cmac* cmac)
int wc_CmacFinalNoFree(Cmac* cmac, byte* out, word32* outSz)
{
- int ret;
+ int ret = 0;
const byte* subKey;
word32 remainder;
@@ -296,7 +298,7 @@ int wc_CmacFinalNoFree(Cmac* cmac, byte* out, word32* outSz)
}
int wc_CmacFinal(Cmac* cmac, byte* out, word32* outSz) {
- int ret;
+ int ret = 0;
if (cmac == NULL)
return BAD_FUNC_ARG;
@@ -305,11 +307,70 @@ int wc_CmacFinal(Cmac* cmac, byte* out, word32* outSz) {
return ret;
}
+
+int wc_AesCmacGenerate_ex(Cmac* cmac,
+ byte* out, word32* outSz,
+ const byte* in, word32 inSz,
+ const byte* key, word32 keySz,
+ void* heap, int devId)
+{
+ int ret = 0;
+
+ if (cmac == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLF_CRYPTO_CB
+ /* Set devId regardless of value (invalid or not) */
+ cmac->devId = devId;
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (devId != INVALID_DEVID)
+ #endif
+ {
+ cmac->devCtx = NULL;
+
+ ret = wc_CryptoCb_Cmac(cmac, key, keySz, in, inSz, out, outSz,
+ WC_CMAC_AES, NULL);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+
+ /* Clear CRYPTOCB_UNAVAILABLE return code */
+ ret = 0;
+
+ /* fall-through when unavailable */
+ }
+#endif
+
+ if ( ((out == NULL) && (outSz != NULL) && (*outSz > 0))
+ || (in == NULL && inSz > 0)
+ || (key == NULL && keySz > 0)) {
+ return BAD_FUNC_ARG;
+ }
+
+ /* Init step is optional */
+ if (key != NULL) {
+ ret = wc_InitCmac_ex(cmac, key, keySz, WC_CMAC_AES, NULL, heap, devId);
+ }
+ if (ret == 0) {
+ ret = wc_CmacUpdate(cmac, in, inSz);
+ /* Ensure we are freed and zeroed if not calling wc_CmacFinal */
+ if (ret != 0) {
+ (void)wc_CmacFree(cmac);
+ }
+ }
+ if (ret == 0) {
+ ret = wc_CmacFinal(cmac, out, outSz);
+ }
+
+ return ret;
+}
+
+
int wc_AesCmacGenerate(byte* out, word32* outSz,
const byte* in, word32 inSz,
const byte* key, word32 keySz)
{
- int ret;
+ int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
Cmac *cmac;
#else
@@ -326,21 +387,22 @@ int wc_AesCmacGenerate(byte* out, word32* outSz,
return MEMORY_E;
}
#endif
+
#ifdef WOLFSSL_CHECK_MEM_ZERO
XMEMSET(((unsigned char *)cmac) + sizeof(Aes), 0xff,
sizeof(Cmac) - sizeof(Aes));
/* Aes part is checked by wc_AesFree. */
- wc_MemZero_Add("wc_AesCmacGenerate cmac",
+ wc_MemZero_Add("wc_AesCmacGenerate_ex cmac",
((unsigned char *)cmac) + sizeof(Aes), sizeof(Cmac) - sizeof(Aes));
#endif
- ret = wc_InitCmac(cmac, key, keySz, WC_CMAC_AES, NULL);
- if (ret == 0) {
- ret = wc_CmacUpdate(cmac, in, inSz);
- }
- if (ret == 0) {
- ret = wc_CmacFinal(cmac, out, outSz);
- }
+ ret = wc_AesCmacGenerate_ex(cmac,
+ out, outSz,
+ in, inSz,
+ key, keySz,
+ NULL,
+ INVALID_DEVID);
+
#ifdef WOLFSSL_SMALL_STACK
if (cmac) {
@@ -354,23 +416,31 @@ int wc_AesCmacGenerate(byte* out, word32* outSz,
}
-int wc_AesCmacVerify(const byte* check, word32 checkSz,
- const byte* in, word32 inSz,
- const byte* key, word32 keySz)
+int wc_AesCmacVerify_ex(Cmac* cmac,
+ const byte* check, word32 checkSz,
+ const byte* in, word32 inSz,
+ const byte* key, word32 keySz,
+ void* heap, int devId)
{
- int ret;
+ int ret = 0;
byte a[AES_BLOCK_SIZE];
word32 aSz = sizeof(a);
int compareRet;
- if (check == NULL || checkSz == 0 || (in == NULL && inSz != 0) ||
- key == NULL || keySz == 0) {
+ if (cmac == NULL || check == NULL || checkSz == 0 || (in == NULL && inSz != 0)) {
return BAD_FUNC_ARG;
}
XMEMSET(a, 0, aSz);
- ret = wc_AesCmacGenerate(a, &aSz, in, inSz, key, keySz);
- compareRet = ConstantCompare(check, a, (int)min(checkSz, aSz));
+ ret = wc_AesCmacGenerate_ex(cmac,
+ a, &aSz,
+ in, inSz,
+ key, keySz,
+ heap,
+ devId);
+ if (ret == 0) {
+ compareRet = ConstantCompare(check, a, (int)min(checkSz, aSz));
+ }
if (ret == 0)
ret = compareRet ? 1 : 0;
@@ -378,4 +448,54 @@ int wc_AesCmacVerify(const byte* check, word32 checkSz,
return ret;
}
+
+int wc_AesCmacVerify(const byte* check, word32 checkSz,
+ const byte* in, word32 inSz,
+ const byte* key, word32 keySz)
+{
+ int ret = 0;
+#ifdef WOLFSSL_SMALL_STACK
+ Cmac *cmac;
+#else
+ Cmac cmac[1];
+#endif
+
+ if (check == NULL || checkSz == 0 || (in == NULL && inSz > 0) ||
+ key == NULL || keySz == 0) {
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ if ((cmac = (Cmac *)XMALLOC(sizeof *cmac, NULL,
+ DYNAMIC_TYPE_CMAC)) == NULL) {
+ return MEMORY_E;
+ }
+#endif
+
+#ifdef WOLFSSL_CHECK_MEM_ZERO
+ XMEMSET(((unsigned char *)cmac) + sizeof(Aes), 0xff,
+ sizeof(Cmac) - sizeof(Aes));
+ /* Aes part is checked by wc_AesFree. */
+ wc_MemZero_Add("wc_AesCmacGenerate_ex cmac",
+ ((unsigned char *)cmac) + sizeof(Aes), sizeof(Cmac) - sizeof(Aes));
+#endif
+
+ ret = wc_AesCmacVerify_ex(cmac,
+ check, checkSz,
+ in, inSz,
+ key, keySz,
+ NULL,
+ INVALID_DEVID);
+
+#ifdef WOLFSSL_SMALL_STACK
+ if (cmac) {
+ XFREE(cmac, NULL, DYNAMIC_TYPE_CMAC);
+ }
+#elif defined(WOLFSSL_CHECK_MEM_ZERO)
+ wc_MemZero_Check(cmac, sizeof(Cmac));
+#endif
+
+ return ret;
+}
+
#endif /* WOLFSSL_CMAC && NO_AES && WOLFSSL_AES_DIRECT */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/cpuid.c b/extra/wolfssl/wolfssl/wolfcrypt/src/cpuid.c
index c1924c1e..fa7ee436 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/cpuid.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/cpuid.c
@@ -96,6 +96,7 @@
if (cpuid_flag(7, 0, EBX, 19)) { cpuid_flags |= CPUID_ADX ; }
if (cpuid_flag(1, 0, ECX, 22)) { cpuid_flags |= CPUID_MOVBE ; }
if (cpuid_flag(7, 0, EBX, 3)) { cpuid_flags |= CPUID_BMI1 ; }
+ if (cpuid_flag(7, 0, EBX, 29)) { cpuid_flags |= CPUID_SHA ; }
cpuid_check = 1;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/cryptocb.c b/extra/wolfssl/wolfssl/wolfcrypt/src/cryptocb.c
index cc09ec04..07b37f1b 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/cryptocb.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/cryptocb.c
@@ -181,25 +181,35 @@ WOLFSSL_API void wc_CryptoCb_InfoString(wc_CryptoInfo* info)
else
#endif
{
- printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
+ printf("Crypto CB: %s %s (%d)\n",
+ GetAlgoTypeStr(info->algo_type),
GetPkTypeStr(info->pk.type), info->pk.type);
}
}
else if (info->algo_type == WC_ALGO_TYPE_CIPHER) {
- printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
- GetCipherTypeStr(info->cipher.type), info->cipher.type);
+ printf("Crypto CB: %s %s (%d) (%p ctx)\n",
+ GetAlgoTypeStr(info->algo_type),
+ GetCipherTypeStr(info->cipher.type),
+ info->cipher.type, info->cipher.ctx);
}
else if (info->algo_type == WC_ALGO_TYPE_HASH) {
- printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
- GetHashTypeStr(info->hash.type), info->hash.type);
+ printf("Crypto CB: %s %s (%d) (%p ctx) %s\n",
+ GetAlgoTypeStr(info->algo_type),
+ GetHashTypeStr(info->hash.type),
+ info->hash.type, info->hash.ctx,
+ (info->hash.in != NULL) ? "Update" : "Final");
}
else if (info->algo_type == WC_ALGO_TYPE_HMAC) {
- printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
- GetHashTypeStr(info->hmac.macType), info->hmac.macType);
+ printf("Crypto CB: %s %s (%d) (%p ctx) %s\n",
+ GetAlgoTypeStr(info->algo_type),
+ GetHashTypeStr(info->hmac.macType),
+ info->hmac.macType, info->hmac.hmac,
+ (info->hmac.in != NULL) ? "Update" : "Final");
}
#ifdef WOLF_CRYPTO_CB_CMD
else if (info->algo_type == WC_ALGO_TYPE_NONE) {
- printf("Crypto CB: %s %s (%d)\n", GetAlgoTypeStr(info->algo_type),
+ printf("Crypto CB: %s %s (%d)\n",
+ GetAlgoTypeStr(info->algo_type),
GetCryptoCbCmdTypeStr(info->cmd.type), info->cmd.type);
}
#endif
@@ -775,6 +785,291 @@ int wc_CryptoCb_Ed25519Verify(const byte* sig, word32 sigLen,
}
#endif /* HAVE_ED25519 */
+#if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER)
+int wc_CryptoCb_PqcKemGetDevId(int type, void* key)
+{
+ int devId = INVALID_DEVID;
+
+ if (key == NULL)
+ return devId;
+
+ /* get devId */
+#if defined(WOLFSSL_HAVE_KYBER)
+ if (type == WC_PQC_KEM_TYPE_KYBER) {
+ devId = ((KyberKey*) key)->devId;
+ }
+#endif
+
+ return devId;
+}
+
+int wc_CryptoCb_MakePqcKemKey(WC_RNG* rng, int type, int keySize, void* key)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcKemGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_KEM_KEYGEN;
+ cryptoInfo.pk.pqc_kem_kg.rng = rng;
+ cryptoInfo.pk.pqc_kem_kg.size = keySize;
+ cryptoInfo.pk.pqc_kem_kg.key = key;
+ cryptoInfo.pk.pqc_kem_kg.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+
+int wc_CryptoCb_PqcEncapsulate(byte* ciphertext, word32 ciphertextLen,
+ byte* sharedSecret, word32 sharedSecretLen, WC_RNG* rng, int type,
+ void* key)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcKemGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_KEM_ENCAPS;
+ cryptoInfo.pk.pqc_encaps.ciphertext = ciphertext;
+ cryptoInfo.pk.pqc_encaps.ciphertextLen = ciphertextLen;
+ cryptoInfo.pk.pqc_encaps.sharedSecret = sharedSecret;
+ cryptoInfo.pk.pqc_encaps.sharedSecretLen = sharedSecretLen;
+ cryptoInfo.pk.pqc_encaps.rng = rng;
+ cryptoInfo.pk.pqc_encaps.key = key;
+ cryptoInfo.pk.pqc_encaps.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+
+int wc_CryptoCb_PqcDecapsulate(const byte* ciphertext, word32 ciphertextLen,
+ byte* sharedSecret, word32 sharedSecretLen, int type, void* key)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcKemGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_KEM_DECAPS;
+ cryptoInfo.pk.pqc_decaps.ciphertext = ciphertext;
+ cryptoInfo.pk.pqc_decaps.ciphertextLen = ciphertextLen;
+ cryptoInfo.pk.pqc_decaps.sharedSecret = sharedSecret;
+ cryptoInfo.pk.pqc_decaps.sharedSecretLen = sharedSecretLen;
+ cryptoInfo.pk.pqc_decaps.key = key;
+ cryptoInfo.pk.pqc_decaps.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+#endif /* HAVE_PQC && WOLFSSL_HAVE_KYBER */
+
+#if defined(HAVE_PQC) && (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM))
+int wc_CryptoCb_PqcSigGetDevId(int type, void* key)
+{
+ int devId = INVALID_DEVID;
+
+ if (key == NULL)
+ return devId;
+
+ /* get devId */
+#if defined(HAVE_DILITHIUM)
+ if (type == WC_PQC_SIG_TYPE_DILITHIUM) {
+ devId = ((dilithium_key*) key)->devId;
+ }
+#endif
+#if defined(HAVE_FALCON)
+ if (type == WC_PQC_SIG_TYPE_FALCON) {
+ devId = ((falcon_key*) key)->devId;
+ }
+#endif
+
+ return devId;
+}
+
+int wc_CryptoCb_MakePqcSignatureKey(WC_RNG* rng, int type, int keySize,
+ void* key)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcSigGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_SIG_KEYGEN;
+ cryptoInfo.pk.pqc_sig_kg.rng = rng;
+ cryptoInfo.pk.pqc_sig_kg.size = keySize;
+ cryptoInfo.pk.pqc_sig_kg.key = key;
+ cryptoInfo.pk.pqc_sig_kg.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+
+int wc_CryptoCb_PqcSign(const byte* in, word32 inlen, byte* out, word32 *outlen,
+ WC_RNG* rng, int type, void* key)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcSigGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_SIG_SIGN;
+ cryptoInfo.pk.pqc_sign.in = in;
+ cryptoInfo.pk.pqc_sign.inlen = inlen;
+ cryptoInfo.pk.pqc_sign.out = out;
+ cryptoInfo.pk.pqc_sign.outlen = outlen;
+ cryptoInfo.pk.pqc_sign.rng = rng;
+ cryptoInfo.pk.pqc_sign.key = key;
+ cryptoInfo.pk.pqc_sign.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+
+int wc_CryptoCb_PqcVerify(const byte* sig, word32 siglen, const byte* msg,
+ word32 msglen, int* res, int type, void* key)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcSigGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_SIG_VERIFY;
+ cryptoInfo.pk.pqc_verify.sig = sig;
+ cryptoInfo.pk.pqc_verify.siglen = siglen;
+ cryptoInfo.pk.pqc_verify.msg = msg;
+ cryptoInfo.pk.pqc_verify.msglen = msglen;
+ cryptoInfo.pk.pqc_verify.res = res;
+ cryptoInfo.pk.pqc_verify.key = key;
+ cryptoInfo.pk.pqc_verify.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+
+int wc_CryptoCb_PqcSignatureCheckPrivKey(void* key, int type,
+ const byte* pubKey, word32 pubKeySz)
+{
+ int ret = CRYPTOCB_UNAVAILABLE;
+ int devId = INVALID_DEVID;
+ CryptoCb* dev;
+
+ if (key == NULL)
+ return ret;
+
+ /* get devId */
+ devId = wc_CryptoCb_PqcSigGetDevId(type, key);
+ if (devId == INVALID_DEVID)
+ return ret;
+
+ /* locate registered callback */
+ dev = wc_CryptoCb_FindDevice(devId, WC_ALGO_TYPE_PK);
+ if (dev && dev->cb) {
+ wc_CryptoInfo cryptoInfo;
+ XMEMSET(&cryptoInfo, 0, sizeof(cryptoInfo));
+ cryptoInfo.algo_type = WC_ALGO_TYPE_PK;
+ cryptoInfo.pk.type = WC_PK_TYPE_PQC_SIG_CHECK_PRIV_KEY;
+ cryptoInfo.pk.pqc_sig_check.key = key;
+ cryptoInfo.pk.pqc_sig_check.pubKey = pubKey;
+ cryptoInfo.pk.pqc_sig_check.pubKeySz = pubKeySz;
+ cryptoInfo.pk.pqc_sig_check.type = type;
+
+ ret = dev->cb(dev->devId, &cryptoInfo, dev->ctx);
+ }
+
+ return wc_CryptoCb_TranslateErrorCode(ret);
+}
+#endif /* HAVE_PQC && (HAVE_FALCON || HAVE_DILITHIUM) */
+
#ifndef NO_AES
#ifdef HAVE_AESGCM
int wc_CryptoCb_AesGcmEncrypt(Aes* aes, byte* out,
@@ -1444,7 +1739,8 @@ int wc_CryptoCb_DefaultDevID(void)
#elif defined(WC_USE_DEVID)
ret = WC_USE_DEVID;
#else
- ret = INVALID_DEVID;
+ /* try first available */
+ ret = wc_CryptoCb_GetDevIdAtIndex(0);
#endif
return ret;
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/curve25519.c b/extra/wolfssl/wolfssl/wolfcrypt/src/curve25519.c
index e5c3593b..2c967dd8 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/curve25519.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/curve25519.c
@@ -51,6 +51,14 @@
#include <wolfssl/wolfcrypt/cryptocb.h>
#endif
+#if defined(WOLFSSL_LINUXKM) && !defined(USE_INTEL_SPEEDUP)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
const curve25519_set_type curve25519_sets[] = {
{
CURVE25519_KEYSIZE,
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/dh.c b/extra/wolfssl/wolfssl/wolfcrypt/src/dh.c
index e638a51c..6b686012 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/dh.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/dh.c
@@ -55,6 +55,13 @@
#include <wolfcrypt/src/misc.c>
#endif
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
/*
Possible DH enable options:
@@ -3003,7 +3010,7 @@ int wc_DhGenerateParams(WC_RNG *rng, int modSz, DhKey *dh)
/* loop until p is prime */
if (ret == 0) {
- do {
+ for (;;) {
if (mp_prime_is_prime_ex(&dh->p, 8, &primeCheck, rng) != MP_OKAY)
ret = PRIME_GEN_E;
@@ -3014,7 +3021,14 @@ int wc_DhGenerateParams(WC_RNG *rng, int modSz, DhKey *dh)
else
primeCheckCount++;
}
- } while (ret == 0 && primeCheck == MP_NO);
+
+ if (ret != 0 || primeCheck == MP_YES)
+ break;
+
+ /* linuxkm: release the kernel for a moment before iterating. */
+ RESTORE_VECTOR_REGISTERS();
+ SAVE_VECTOR_REGISTERS(ret = _svr_ret; break;);
+ };
}
/* tmp2 += (2*loop_check_prime)
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/dilithium.c b/extra/wolfssl/wolfssl/wolfcrypt/src/dilithium.c
index d50b6db3..f8968c56 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/dilithium.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/dilithium.c
@@ -59,18 +59,33 @@
*/
int wc_dilithium_sign_msg(const byte* in, word32 inLen,
byte* out, word32 *outLen,
- dilithium_key* key)
+ dilithium_key* key, WC_RNG* rng)
{
int ret = 0;
-#ifdef HAVE_LIBOQS
- OQS_SIG *oqssig = NULL;
- size_t localOutLen = 0;
/* sanity check on arguments */
if ((in == NULL) || (out == NULL) || (outLen == NULL) || (key == NULL)) {
- ret = BAD_FUNC_ARG;
+ return BAD_FUNC_ARG;
}
+#ifdef WOLF_CRYPTO_CB
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (key->devId != INVALID_DEVID)
+ #endif
+ {
+ ret = wc_CryptoCb_PqcSign(in, inLen, out, outLen, rng,
+ WC_PQC_SIG_TYPE_DILITHIUM, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
+ }
+#endif
+
+#ifdef HAVE_LIBOQS
+ OQS_SIG *oqssig = NULL;
+ size_t localOutLen = 0;
+
if ((ret == 0) && (!key->prvKeySet)) {
ret = BAD_FUNC_ARG;
}
@@ -90,6 +105,10 @@ int wc_dilithium_sign_msg(const byte* in, word32 inLen,
}
}
+ if ((ret == 0) && (oqssig == NULL)) {
+ ret = BUFFER_E;
+ }
+
/* check and set up out length */
if (ret == 0) {
if ((key->level == 2) && (*outLen < DILITHIUM_LEVEL2_SIG_SIZE)) {
@@ -107,6 +126,10 @@ int wc_dilithium_sign_msg(const byte* in, word32 inLen,
localOutLen = *outLen;
}
+ if (ret == 0) {
+ ret = wolfSSL_liboqsRngMutexLock(rng);
+ }
+
if ((ret == 0) &&
(OQS_SIG_sign(oqssig, out, &localOutLen, in, inLen, key->k)
== OQS_ERROR)) {
@@ -117,6 +140,8 @@ int wc_dilithium_sign_msg(const byte* in, word32 inLen,
*outLen = (word32)localOutLen;
}
+ wolfSSL_liboqsRngMutexUnlock();
+
if (oqssig != NULL) {
OQS_SIG_free(oqssig);
}
@@ -142,13 +167,28 @@ int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
word32 msgLen, int* res, dilithium_key* key)
{
int ret = 0;
-#ifdef HAVE_LIBOQS
- OQS_SIG *oqssig = NULL;
if (key == NULL || sig == NULL || msg == NULL || res == NULL) {
- ret = BAD_FUNC_ARG;
+ return BAD_FUNC_ARG;
}
+#ifdef WOLF_CRYPTO_CB
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (key->devId != INVALID_DEVID)
+ #endif
+ {
+ ret = wc_CryptoCb_PqcVerify(sig, sigLen, msg, msgLen, res,
+ WC_PQC_SIG_TYPE_DILITHIUM, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
+ }
+#endif
+
+#ifdef HAVE_LIBOQS
+ OQS_SIG *oqssig = NULL;
+
if ((ret == 0) && (!key->pubKeySet)) {
ret = BAD_FUNC_ARG;
}
@@ -168,6 +208,10 @@ int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
}
}
+ if ((ret == 0) && (oqssig == NULL)) {
+ ret = BUFFER_E;
+ }
+
if ((ret == 0) &&
(OQS_SIG_verify(oqssig, msg, msgLen, sig, sigLen, key->p)
== OQS_ERROR)) {
@@ -195,14 +239,91 @@ int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
*/
int wc_dilithium_init(dilithium_key* key)
{
+ return wc_dilithium_init_ex(key, NULL, INVALID_DEVID);
+}
+
+/* Initialize the dilithium private/public key.
+ *
+ * key [in] Dilithium key.
+ * heap [in] Heap hint.
+ * devId[in] Device ID.
+ * returns BAD_FUNC_ARG when key is NULL
+ */
+int wc_dilithium_init_ex(dilithium_key* key, void* heap, int devId)
+{
if (key == NULL) {
return BAD_FUNC_ARG;
}
- ForceZero(key, sizeof(key));
+ ForceZero(key, sizeof(*key));
+
+#ifdef WOLF_CRYPTO_CB
+ key->devCtx = NULL;
+ key->devId = devId;
+#endif
+#ifdef WOLF_PRIVATE_KEY_ID
+ key->idLen = 0;
+ key->labelLen = 0;
+#endif
+
+ (void) heap;
+ (void) devId;
+
return 0;
}
+#ifdef WOLF_PRIVATE_KEY_ID
+int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len,
+ void* heap, int devId)
+{
+ int ret = 0;
+
+ if (key == NULL)
+ ret = BAD_FUNC_ARG;
+ if (ret == 0 && (len < 0 || len > DILITHIUM_MAX_ID_LEN))
+ ret = BUFFER_E;
+
+ if (ret == 0)
+ ret = wc_dilithium_init_ex(key, heap, devId);
+ if (ret == 0 && id != NULL && len != 0) {
+ XMEMCPY(key->id, id, (size_t)len);
+ key->idLen = len;
+ }
+
+ /* Set the maxiumum level here */
+ wc_dilithium_set_level(key, 5);
+
+ return ret;
+}
+
+int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap,
+ int devId)
+{
+ int ret = 0;
+ int labelLen = 0;
+
+ if (key == NULL || label == NULL)
+ ret = BAD_FUNC_ARG;
+ if (ret == 0) {
+ labelLen = (int)XSTRLEN(label);
+ if (labelLen == 0 || labelLen > DILITHIUM_MAX_LABEL_LEN)
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0)
+ ret = wc_dilithium_init_ex(key, heap, devId);
+ if (ret == 0) {
+ XMEMCPY(key->label, label, (size_t)labelLen);
+ key->labelLen = labelLen;
+ }
+
+ /* Set the maxiumum level here */
+ wc_dilithium_set_level(key, 5);
+
+ return ret;
+}
+#endif
+
/* Set the level of the dilithium private/public key.
*
* key [out] Dilithium key.
@@ -252,7 +373,7 @@ int wc_dilithium_get_level(dilithium_key* key, byte* level)
void wc_dilithium_free(dilithium_key* key)
{
if (key != NULL) {
- ForceZero(key, sizeof(key));
+ ForceZero(key, sizeof(*key));
}
}
@@ -416,15 +537,7 @@ int wc_dilithium_import_private_only(const byte* priv, word32 privSz,
return ret;
}
- if (key->level == 2) {
- XMEMCPY(key->k, newPriv, DILITHIUM_LEVEL2_KEY_SIZE);
- }
- else if (key->level == 3) {
- XMEMCPY(key->k, newPriv, DILITHIUM_LEVEL3_KEY_SIZE);
- }
- else if (key->level == 5) {
- XMEMCPY(key->k, newPriv, DILITHIUM_LEVEL5_KEY_SIZE);
- }
+ XMEMCPY(key->k, newPriv, newPrivSz);
key->prvKeySet = 1;
return 0;
@@ -488,15 +601,7 @@ int wc_dilithium_import_private_key(const byte* priv, word32 privSz,
if (ret == 0) {
/* make the private key (priv + pub) */
- if (key->level == 2) {
- XMEMCPY(key->k, newPriv, DILITHIUM_LEVEL2_KEY_SIZE);
- }
- else if (key->level == 3) {
- XMEMCPY(key->k, newPriv, DILITHIUM_LEVEL3_KEY_SIZE);
- }
- else if (key->level == 5) {
- XMEMCPY(key->k, newPriv, DILITHIUM_LEVEL5_KEY_SIZE);
- }
+ XMEMCPY(key->k, newPriv, newPrivSz);
key->prvKeySet = 1;
}
@@ -591,20 +696,20 @@ int wc_dilithium_export_private(dilithium_key* key, byte* out, word32* outLen)
if (key->level == 2) {
*outLen = DILITHIUM_LEVEL2_PRV_KEY_SIZE;
- XMEMCPY(out, key->k, DILITHIUM_LEVEL2_PRV_KEY_SIZE);
- XMEMCPY(out + DILITHIUM_LEVEL2_PRV_KEY_SIZE, key->p,
+ XMEMCPY(out, key->k, DILITHIUM_LEVEL2_KEY_SIZE);
+ XMEMCPY(out + DILITHIUM_LEVEL2_KEY_SIZE, key->p,
DILITHIUM_LEVEL2_PUB_KEY_SIZE);
}
else if (key->level == 3) {
*outLen = DILITHIUM_LEVEL3_PRV_KEY_SIZE;
- XMEMCPY(out, key->k, DILITHIUM_LEVEL3_PRV_KEY_SIZE);
- XMEMCPY(out + DILITHIUM_LEVEL3_PRV_KEY_SIZE, key->p,
+ XMEMCPY(out, key->k, DILITHIUM_LEVEL3_KEY_SIZE);
+ XMEMCPY(out + DILITHIUM_LEVEL3_KEY_SIZE, key->p,
DILITHIUM_LEVEL3_PUB_KEY_SIZE);
}
else if (key->level == 5) {
*outLen = DILITHIUM_LEVEL5_PRV_KEY_SIZE;
- XMEMCPY(out, key->k, DILITHIUM_LEVEL5_PRV_KEY_SIZE);
- XMEMCPY(out + DILITHIUM_LEVEL5_PRV_KEY_SIZE, key->p,
+ XMEMCPY(out, key->k, DILITHIUM_LEVEL5_KEY_SIZE);
+ XMEMCPY(out + DILITHIUM_LEVEL5_KEY_SIZE, key->p,
DILITHIUM_LEVEL5_PUB_KEY_SIZE);
}
@@ -653,8 +758,29 @@ int wc_dilithium_check_key(dilithium_key* key)
return BAD_FUNC_ARG;
}
- /* Assume everything is fine. */
- return 0;
+ int ret = 0;
+
+ /* The public key is also decoded and stored within the private key buffer
+ * behind the private key. Hence, we can compare both stored public keys. */
+ if (key->level == 2) {
+ ret = XMEMCMP(key->p, key->k + DILITHIUM_LEVEL2_KEY_SIZE,
+ DILITHIUM_LEVEL2_PUB_KEY_SIZE);
+ }
+ else if (key->level == 3) {
+ ret = XMEMCMP(key->p, key->k + DILITHIUM_LEVEL3_KEY_SIZE,
+ DILITHIUM_LEVEL3_PUB_KEY_SIZE);
+ }
+ else if (key->level == 5) {
+ ret = XMEMCMP(key->p, key->k + DILITHIUM_LEVEL5_KEY_SIZE,
+ DILITHIUM_LEVEL5_PUB_KEY_SIZE);
+ }
+
+ if (ret != 0) {
+ ret = PUBLIC_KEY_E;
+ }
+
+ return ret;
+
}
/* Returns the size of a dilithium private key.
@@ -761,7 +887,8 @@ int wc_Dilithium_PrivateKeyDecode(const byte* input, word32* inOutIdx,
dilithium_key* key, word32 inSz)
{
int ret = 0;
- byte privKey[DILITHIUM_MAX_KEY_SIZE], pubKey[DILITHIUM_MAX_PUB_KEY_SIZE];
+ byte privKey[DILITHIUM_MAX_PRV_KEY_SIZE];
+ byte pubKey[DILITHIUM_MAX_PUB_KEY_SIZE];
word32 privKeyLen = (word32)sizeof(privKey);
word32 pubKeyLen = (word32)sizeof(pubKey);
int keytype = 0;
@@ -809,6 +936,11 @@ int wc_Dilithium_PublicKeyDecode(const byte* input, word32* inOutIdx,
return BAD_FUNC_ARG;
}
+ ret = wc_dilithium_import_public(input, inSz, key);
+ if (ret == 0) {
+ return 0;
+ }
+
if (key->level == 2) {
keytype = DILITHIUM_LEVEL2k;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/dsa.c b/extra/wolfssl/wolfssl/wolfcrypt/src/dsa.c
index 3cdcffe3..08f70db5 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/dsa.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/dsa.c
@@ -42,6 +42,14 @@
#include <wolfcrypt/src/misc.c>
#endif
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
#ifdef _MSC_VER
/* disable for while(0) cases (MSVC bug) */
#pragma warning(disable:4127)
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/ecc.c b/extra/wolfssl/wolfssl/wolfcrypt/src/ecc.c
index c4ad9e8a..78101ed2 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/ecc.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/ecc.c
@@ -213,6 +213,14 @@ ECC Curve Sizes:
#include <wolfssl/wolfcrypt/hmac.h>
#endif
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
#if defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL)
#define GEN_MEM_ERR MP_MEM
#elif defined(USE_FAST_MATH)
@@ -237,11 +245,17 @@ ECC Curve Sizes:
#define HAVE_ECC_MAKE_PUB
#endif
+
+/* macro guard for ecc_check_pubkey_order functionality */
#if !defined(WOLFSSL_SP_MATH) && \
!defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
!defined(WOLFSSL_CRYPTOCELL) && !defined(WOLFSSL_SILABS_SE_ACCEL) && \
!defined(WOLFSSL_SE050) && !defined(WOLFSSL_STM32_PKA) && \
- !defined(WOLF_CRYPTO_CB_ONLY_ECC)
+ (!defined(WOLF_CRYPTO_CB_ONLY_ECC) || defined(WOLFSSL_IMXRT1170_CAAM) || \
+ defined(WOLFSSL_QNX_CAAM))
+
+ /* CAAM builds use public key validation as a means to check if an
+ * imported private key is an encrypted black key or not */
#undef HAVE_ECC_CHECK_PUBKEY_ORDER
#define HAVE_ECC_CHECK_PUBKEY_ORDER
#endif
@@ -251,16 +265,27 @@ ECC Curve Sizes:
#else
#define MAX_ECC_BITS_USE MAX_ECC_BITS_NEEDED
#endif
+
#if !defined(WOLFSSL_CUSTOM_CURVES) && (ECC_MIN_KEY_SZ > 160) && \
(!defined(HAVE_ECC_KOBLITZ) || (ECC_MIN_KEY_SZ > 224))
+
#define ECC_KEY_MAX_BITS(key) \
((((key) == NULL) || ((key)->dp == NULL)) ? MAX_ECC_BITS_USE : \
((unsigned)((key)->dp->size * 8)))
+#define ECC_KEY_MAX_BITS_NONULLCHECK(key) \
+ (((key)->dp == NULL) ? MAX_ECC_BITS_USE : \
+ ((unsigned)((key)->dp->size * 8)))
+
#else
+
/* Add one bit for cases when order is a bit greater than prime. */
#define ECC_KEY_MAX_BITS(key) \
((((key) == NULL) || ((key)->dp == NULL)) ? MAX_ECC_BITS_USE : \
((unsigned)((key)->dp->size * 8 + 1)))
+#define ECC_KEY_MAX_BITS_NONULLCHECK(key) \
+ (((key)->dp == NULL) ? MAX_ECC_BITS_USE : \
+ ((unsigned)((key)->dp->size * 8 + 1)))
+
#endif
/* forward declarations */
@@ -1463,7 +1488,7 @@ static int xil_mpi_import(mp_int *mpi,
/* cache (mp_int) of the curve parameters */
static ecc_curve_spec* ecc_curve_spec_cache[ECC_SET_COUNT];
#ifndef SINGLE_THREADED
- static wolfSSL_Mutex ecc_curve_cache_mutex;
+ static wolfSSL_Mutex ecc_curve_cache_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(ecc_curve_cache_mutex);
#endif
#define DECLARE_CURVE_SPECS(intcount) ecc_curve_spec* curve = NULL
@@ -1733,7 +1758,8 @@ static int wc_ecc_curve_load(const ecc_set_type* dp, ecc_curve_spec** pCurve,
int wc_ecc_curve_cache_init(void)
{
int ret = 0;
-#if defined(ECC_CACHE_CURVE) && !defined(SINGLE_THREADED)
+#if defined(ECC_CACHE_CURVE) && !defined(SINGLE_THREADED) && \
+ !defined(WOLFSSL_MUTEX_INITIALIZER)
ret = wc_InitMutex(&ecc_curve_cache_mutex);
#endif
return ret;
@@ -1752,7 +1778,8 @@ void wc_ecc_curve_cache_free(void)
}
}
-#if defined(ECC_CACHE_CURVE) && !defined(SINGLE_THREADED)
+#if defined(ECC_CACHE_CURVE) && !defined(SINGLE_THREADED) && \
+ !defined(WOLFSSL_MUTEX_INITIALIZER)
wc_FreeMutex(&ecc_curve_cache_mutex);
#endif
}
@@ -1823,7 +1850,9 @@ static void alt_fp_init(mp_int* a)
#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
- !defined(WOLFSSL_CRYPTOCELL) && !defined(WOLF_CRYPTO_CB_ONLY_ECC)
+ !defined(WOLFSSL_CRYPTOCELL) && \
+ (!defined(WOLF_CRYPTO_CB_ONLY_ECC) || defined(WOLFSSL_QNX_CAAM) || \
+ defined(WOLFSSL_IMXRT1170_CAAM))
#if !defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_PUBLIC_ECC_ADD_DBL)
static int _ecc_projective_dbl_point(ecc_point *P, ecc_point *R, mp_int* a,
@@ -2785,7 +2814,10 @@ done:
}
return err;
+ /* end !defined(WOLFSSL_SP_MATH) */
+
#else
+ /* begin defined(WOLFSSL_SP_MATH) */
if (P == NULL || modulus == NULL)
return ECC_BAD_ARG_E;
@@ -2794,26 +2826,27 @@ done:
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SP_SM2)
if ((mp_count_bits(modulus) == 256) && (!mp_is_bit_set(modulus, 224))) {
- return sp_ecc_map_sm2_256(P->x, P->y, P->z);
+ err = sp_ecc_map_sm2_256(P->x, P->y, P->z);
}
-#endif
-#ifndef WOLFSSL_SP_NO_256
+#elif defined(WOLFSSL_SP_NO_256)
if (mp_count_bits(modulus) == 256) {
- return sp_ecc_map_256(P->x, P->y, P->z);
+ err = sp_ecc_map_256(P->x, P->y, P->z);
}
-#endif
-#ifdef WOLFSSL_SP_384
+#elif defined(WOLFSSL_SP_384)
if (mp_count_bits(modulus) == 384) {
- return sp_ecc_map_384(P->x, P->y, P->z);
+ err = sp_ecc_map_384(P->x, P->y, P->z);
}
-#endif
-#ifdef WOLFSSL_SP_521
+#elif defined(WOLFSSL_SP_521)
if (mp_count_bits(modulus) == 521) {
- return sp_ecc_map_521(P->x, P->y, P->z);
+ err = sp_ecc_map_521(P->x, P->y, P->z);
}
+#else
+ err = ECC_BAD_ARG_E;
#endif
- return ECC_BAD_ARG_E;
-#endif
+
+ WOLFSSL_LEAVE("ecc_map_ex (SP Math)");
+ return err;
+#endif /* WOLFSSL_SP_MATH */
}
#endif /* !FREESCALE_LTC_ECC && !WOLFSSL_STM32_PKA */
@@ -3479,12 +3512,12 @@ static int ecc_key_tmp_init(ecc_key* key, void* heap)
XMEMSET(key, 0, sizeof(*key));
#if defined(WOLFSSL_SP_MATH_ALL) && defined(WOLFSSL_SMALL_STACK)
- NEW_MP_INT_SIZE(key->t1, ECC_KEY_MAX_BITS(key), heap, DYNAMIC_TYPE_ECC);
- NEW_MP_INT_SIZE(key->t2, ECC_KEY_MAX_BITS(key), heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(key->t1, ECC_KEY_MAX_BITS_NONULLCHECK(key), heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(key->t2, ECC_KEY_MAX_BITS_NONULLCHECK(key), heap, DYNAMIC_TYPE_ECC);
#ifdef ALT_ECC_SIZE
- NEW_MP_INT_SIZE(key->x, ECC_KEY_MAX_BITS(key), heap, DYNAMIC_TYPE_ECC);
- NEW_MP_INT_SIZE(key->y, ECC_KEY_MAX_BITS(key), heap, DYNAMIC_TYPE_ECC);
- NEW_MP_INT_SIZE(key->z, ECC_KEY_MAX_BITS(key), heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(key->x, ECC_KEY_MAX_BITS_NONULLCHECK(key), heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(key->y, ECC_KEY_MAX_BITS_NONULLCHECK(key), heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(key->z, ECC_KEY_MAX_BITS_NONULLCHECK(key), heap, DYNAMIC_TYPE_ECC);
#endif
if (key->t1 == NULL || key->t2 == NULL
#ifdef ALT_ECC_SIZE
@@ -3494,20 +3527,20 @@ static int ecc_key_tmp_init(ecc_key* key, void* heap)
err = MEMORY_E;
}
if (err == 0) {
- err = INIT_MP_INT_SIZE(key->t1, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(key->t1, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
if (err == 0) {
- err = INIT_MP_INT_SIZE(key->t2, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(key->t2, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
#ifdef ALT_ECC_SIZE
if (err == 0) {
- err = INIT_MP_INT_SIZE(key->x, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(key->x, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
if (err == 0) {
- err = INIT_MP_INT_SIZE(key->y, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(key->y, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
if (err == 0) {
- err = INIT_MP_INT_SIZE(key->z, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(key->z, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
#endif
#else
@@ -3817,6 +3850,7 @@ int wc_ecc_mulmod_ex2(const mp_int* k, ecc_point* G, ecc_point* R, mp_int* a,
#endif
/* k can't have more bits than order */
if (mp_count_bits(k) > mp_count_bits(order)) {
+ WOLFSSL_MSG("Private key length is greater than order in bits.");
return ECC_OUT_OF_RANGE_E;
}
@@ -3951,7 +3985,7 @@ int wc_ecc_mulmod(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a,
return wc_ecc_mulmod_ex(k, G, R, a, modulus, map, NULL);
}
-#endif /* !WOLFSSL_ATECC508A */
+#endif
/**
* Allocate a new ECC point (if one not provided)
@@ -3981,6 +4015,7 @@ static int wc_ecc_new_point_ex(ecc_point** point, void* heap)
#ifndef ALT_ECC_SIZE
err = mp_init_multi(p->x, p->y, p->z, NULL, NULL, NULL);
if (err != MP_OKAY) {
+ WOLFSSL_MSG("mp_init_multi failed.");
#ifndef WOLFSSL_NO_MALLOC
XFREE(p, heap, DYNAMIC_TYPE_ECC);
#endif
@@ -3998,13 +4033,15 @@ static int wc_ecc_new_point_ex(ecc_point** point, void* heap)
*point = p;
(void)heap;
return err;
-}
+} /* wc_ecc_new_point_ex */
+
ecc_point* wc_ecc_new_point_h(void* heap)
{
ecc_point* p = NULL;
(void)wc_ecc_new_point_ex(&p, heap);
return p;
}
+
ecc_point* wc_ecc_new_point(void)
{
ecc_point* p = NULL;
@@ -4559,20 +4596,15 @@ int wc_ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out,
#endif
{
err = wc_CryptoCb_Ecdh(private_key, public_key, out, outlen);
- #ifndef WOLF_CRYPTO_CB_ONLY_ECC
if (err != CRYPTOCB_UNAVAILABLE)
return err;
/* fall-through when unavailable */
- #endif
- #ifdef WOLF_CRYPTO_CB_ONLY_ECC
- if (err == CRYPTOCB_UNAVAILABLE) {
- err = NO_VALID_DEVID;
- }
- #endif
}
#endif
-#ifndef WOLF_CRYPTO_CB_ONLY_ECC
+#ifdef WOLF_CRYPTO_CB_ONLY_ECC
+ return NO_VALID_DEVID;
+#else /* !WOLF_CRYPTO_CB_ONLY_ECC */
/* type valid? */
if (private_key->type != ECC_PRIVATEKEY &&
private_key->type != ECC_PRIVATEKEY_ONLY) {
@@ -4621,7 +4653,7 @@ int wc_ecc_shared_secret(ecc_key* private_key, ecc_key* public_key, byte* out,
#else
err = wc_ecc_shared_secret_ex(private_key, &public_key->pubkey, out, outlen);
#endif /* WOLFSSL_ATECC508A */
-#endif /* WOLF_CRYPTO_CB_ONLY_ECC */
+#endif /* !WOLF_CRYPTO_CB_ONLY_ECC */
return err;
}
@@ -5124,7 +5156,9 @@ int wc_ecc_point_is_on_curve(ecc_point *p, int curve_idx)
#endif /* USE_ECC_B_PARAM */
#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
- !defined(WOLFSSL_CRYPTOCELL) && !defined(WOLF_CRYPTO_CB_ONLY_ECC)
+ !defined(WOLFSSL_CRYPTOCELL) && \
+ (!defined(WOLF_CRYPTO_CB_ONLY_ECC) || defined(WOLFSSL_QNX_CAAM) || \
+ defined(WOLFSSL_IMXRT1170_CAAM))
/* return 1 if point is at infinity, 0 if not, < 0 on error */
int wc_ecc_point_is_at_infinity(ecc_point* p)
{
@@ -5135,7 +5169,7 @@ int wc_ecc_point_is_at_infinity(ecc_point* p)
return 0;
}
-#endif /* !WOLFSSL_ATECC508A && !WOLFSSL_CRYPTOCELL */
+#endif
/* generate random and ensure its greater than 0 and less than order */
int wc_ecc_gen_k(WC_RNG* rng, int size, mp_int* k, mp_int* order)
@@ -5518,21 +5552,15 @@ static int _ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key,
#endif
{
err = wc_CryptoCb_MakeEccKey(rng, keysize, key, curve_id);
- #ifndef WOLF_CRYPTO_CB_ONLY_ECC
if (err != CRYPTOCB_UNAVAILABLE)
return err;
/* fall-through when unavailable */
- #endif
- #ifdef WOLF_CRYPTO_CB_ONLY_ECC
- if (err == CRYPTOCB_UNAVAILABLE) {
- return NO_VALID_DEVID;
- }
- return err;
- #endif
}
#endif
-#ifndef WOLF_CRYPTO_CB_ONLY_ECC
+#ifdef WOLF_CRYPTO_CB_ONLY_ECC
+ return NO_VALID_DEVID;
+#else /* !WOLF_CRYPTO_CB_ONLY_ECC */
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
if (key->asyncDev.marker == WOLFSSL_ASYNC_MARKER_ECC) {
#ifdef HAVE_CAVIUM
@@ -5801,19 +5829,32 @@ static int _ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key,
/* load curve info */
if (err == MP_OKAY) {
ALLOC_CURVE_SPECS(ECC_CURVE_FIELD_COUNT, err);
+ if (err != MP_OKAY) {
+ WOLFSSL_MSG("ALLOC_CURVE_SPECS failed");
+ }
}
+
if (err == MP_OKAY) {
err = wc_ecc_curve_load(key->dp, &curve, ECC_CURVE_FIELD_ALL);
+ if (err != MP_OKAY) {
+ WOLFSSL_MSG("wc_ecc_curve_load failed");
+ }
}
/* generate k */
if (err == MP_OKAY) {
err = wc_ecc_gen_k(rng, key->dp->size, key->k, curve->order);
+ if (err != MP_OKAY) {
+ WOLFSSL_MSG("wc_ecc_gen_k failed");
+ }
}
/* generate public key from k */
if (err == MP_OKAY) {
err = ecc_make_pub_ex(key, curve, NULL, rng);
+ if (err != MP_OKAY) {
+ WOLFSSL_MSG("ecc_make_pub_ex failed");
+ }
}
if (err == MP_OKAY
@@ -5848,7 +5889,7 @@ static int _ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key,
#endif /* HAVE_ECC_MAKE_PUB */
return err;
-#endif /* WOLF_CRYPTO_CB_ONLY_ECC */
+#endif /* !WOLF_CRYPTO_CB_ONLY_ECC */
}
@@ -6060,6 +6101,7 @@ int wc_ecc_init_ex(ecc_key* key, void* heap, int devId)
#endif
#ifdef WOLFSSL_HEAP_TEST
+ (void)heap;
key->heap = (void*)WOLFSSL_HEAP_TEST;
#else
key->heap = heap;
@@ -6551,20 +6593,20 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
#endif
{
err = wc_CryptoCb_EccSign(in, inlen, out, outlen, rng, key);
- #ifndef WOLF_CRYPTO_CB_ONLY_ECC
if (err != CRYPTOCB_UNAVAILABLE)
return err;
/* fall-through when unavailable */
- #endif
- #ifdef WOLF_CRYPTO_CB_ONLY_ECC
- if (err == CRYPTOCB_UNAVAILABLE) {
- err = NO_VALID_DEVID;
- }
- #endif
}
#endif
-#ifndef WOLF_CRYPTO_CB_ONLY_ECC
+#ifdef WOLF_CRYPTO_CB_ONLY_ECC
+ (void)rng;
+ (void)inlen;
+ (void)s;
+ (void)r;
+ (void)err;
+ return NO_VALID_DEVID;
+#else /* !WOLF_CRYPTO_CB_ONLY_ECC */
if (rng == NULL) {
WOLFSSL_MSG("ECC sign RNG missing");
return ECC_BAD_ARG_E;
@@ -6575,12 +6617,12 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
err = wc_ecc_sign_hash_async(in, inlen, out, outlen, rng, key);
#else
- NEW_MP_INT_SIZE(r, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(r, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (r == NULL)
return MEMORY_E;
#endif
- NEW_MP_INT_SIZE(s, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(s, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (s == NULL) {
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
@@ -6588,13 +6630,13 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
}
#endif
- err = INIT_MP_INT_SIZE(r, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(r, ECC_KEY_MAX_BITS_NONULLCHECK(key));
if (err != 0) {
FREE_MP_INT_SIZE(s, key->heap, DYNAMIC_TYPE_ECC);
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
return err;
}
- err = INIT_MP_INT_SIZE(s, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(s, ECC_KEY_MAX_BITS_NONULLCHECK(key));
if (err != 0) {
FREE_MP_INT_SIZE(s, key->heap, DYNAMIC_TYPE_ECC);
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
@@ -6628,15 +6670,8 @@ int wc_ecc_sign_hash(const byte* in, word32 inlen, byte* out, word32 *outlen,
FREE_MP_INT_SIZE(s, key->heap, DYNAMIC_TYPE_ECC);
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
#endif /* WOLFSSL_ASYNC_CRYPT */
-#else
- (void)rng;
- (void)inlen;
- (void)s;
- (void)r;
- (void)err;
-#endif /* WOLF_CRYPTO_CB_ONLY_ECC */
-
return err;
+#endif /* !WOLF_CRYPTO_CB_ONLY_ECC */
}
#endif /* !NO_ASN */
@@ -6719,16 +6754,16 @@ static int ecc_sign_hash_sw(ecc_key* key, ecc_key* pubkey, WC_RNG* rng,
{
int err = MP_OKAY;
int loop_check = 0;
- DECL_MP_INT_SIZE_DYN(b, ECC_KEY_MAX_BITS(key), MAX_ECC_BITS_USE);
+ DECL_MP_INT_SIZE_DYN(b, ECC_KEY_MAX_BITS_NONULLCHECK(key), MAX_ECC_BITS_USE);
- NEW_MP_INT_SIZE(b, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(b, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (b == NULL)
err = MEMORY_E;
#endif
if (err == MP_OKAY) {
- err = INIT_MP_INT_SIZE(b, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(b, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
#ifdef WOLFSSL_CUSTOM_CURVES
@@ -7122,7 +7157,7 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng,
}
e = key->e;
#else
- NEW_MP_INT_SIZE(e_lcl, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(e_lcl, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (e_lcl == NULL) {
return MEMORY_E;
@@ -7133,7 +7168,7 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng,
/* get the hash and load it as a bignum into 'e' */
/* init the bignums */
- if ((err = INIT_MP_INT_SIZE(e, ECC_KEY_MAX_BITS(key))) != MP_OKAY) {
+ if ((err = INIT_MP_INT_SIZE(e, ECC_KEY_MAX_BITS_NONULLCHECK(key))) != MP_OKAY) {
FREE_MP_INT_SIZE(e_lcl, key->heap, DYNAMIC_TYPE_ECC);
return err;
}
@@ -7263,10 +7298,10 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng,
pubkey = (ecc_key*)XMALLOC(sizeof(ecc_key), key->heap, DYNAMIC_TYPE_ECC);
if (pubkey == NULL)
err = MEMORY_E;
+ else
#endif
-
+ {
/* don't use async for key, since we don't support async return here */
- if (err == MP_OKAY) {
err = wc_ecc_init_ex(pubkey, key->heap, INVALID_DEVID);
if (err == MP_OKAY) {
err = ecc_sign_hash_sw(key, pubkey, rng, curve, e, r, s);
@@ -7753,7 +7788,9 @@ int wc_ecc_free(ecc_key* key)
#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
!defined(WOLFSSL_CRYPTOCELL) && !defined(WOLFSSL_SP_MATH) && \
- !defined(WOLF_CRYPTO_CB_ONLY_ECC)
+ (!defined(WOLF_CRYPTO_CB_ONLY_ECC) || defined(WOLFSSL_QNX_CAAM) || \
+ defined(WOLFSSL_IMXRT1170_CAAM))
+
/* Handles add failure cases:
*
* Before add:
@@ -7867,8 +7904,11 @@ int ecc_projective_dbl_point_safe(ecc_point *P, ecc_point *R, mp_int* a,
return err;
}
-#endif /* !WOLFSSL_ATECC508A && !WOLFSSL_ATECC608A
- && !WOLFSSL_CRYPTOCELL && !WOLFSSL_SP_MATH */
+#endif /* !(WOLFSSL_ATECC508A) && !(WOLFSSL_ATECC608A) && \
+ !(WOLFSSL_CRYPTOCELL) && !(WOLFSSL_SP_MATH) && \
+ (!(WOLF_CRYPTO_CB_ONLY_ECC) || (WOLFSSL_QNX_CAAM) || \
+ (WOLFSSL_IMXRT1170_CAAM))
+ */
#if !defined(WOLFSSL_SP_MATH) && !defined(WOLFSSL_ATECC508A) && \
!defined(WOLFSSL_ATECC608A) && !defined(WOLFSSL_CRYPTOCELL) && \
@@ -8277,21 +8317,20 @@ int wc_ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash,
#endif
{
err = wc_CryptoCb_EccVerify(sig, siglen, hash, hashlen, res, key);
- #ifndef WOLF_CRYPTO_CB_ONLY_ECC
if (err != CRYPTOCB_UNAVAILABLE)
return err;
/* fall-through when unavailable */
- #endif
- #ifdef WOLF_CRYPTO_CB_ONLY_ECC
- if (err == CRYPTOCB_UNAVAILABLE) {
- err = NO_VALID_DEVID;
- }
- #endif
}
#endif
-#ifndef WOLF_CRYPTO_CB_ONLY_ECC
-
+#ifdef WOLF_CRYPTO_CB_ONLY_ECC
+ (void)siglen;
+ (void)hashlen;
+ (void)s;
+ (void)r;
+ (void)err;
+ return NO_VALID_DEVID;
+#else /* !WOLF_CRYPTO_CB_ONLY_ECC */
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
err = wc_ecc_alloc_async(key);
if (err != 0)
@@ -8299,25 +8338,25 @@ int wc_ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash,
r = key->r;
s = key->s;
#else
- NEW_MP_INT_SIZE(r, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(r, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (r == NULL)
return MEMORY_E;
#endif
- NEW_MP_INT_SIZE(s, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(s, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (s == NULL) {
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
return MEMORY_E;
}
#endif
- err = INIT_MP_INT_SIZE(r, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(r, ECC_KEY_MAX_BITS_NONULLCHECK(key));
if (err != 0) {
FREE_MP_INT_SIZE(s, key->heap, DYNAMIC_TYPE_ECC);
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
return err;
}
- err = INIT_MP_INT_SIZE(s, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(s, ECC_KEY_MAX_BITS_NONULLCHECK(key));
if (err != 0) {
FREE_MP_INT_SIZE(s, key->heap, DYNAMIC_TYPE_ECC);
FREE_MP_INT_SIZE(r, key->heap, DYNAMIC_TYPE_ECC);
@@ -8403,15 +8442,8 @@ int wc_ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash,
/* make sure required variables are reset */
wc_ecc_reset(key);
-#else
- (void)siglen;
- (void)hashlen;
- (void)s;
- (void)r;
- (void)err;
-#endif /* WOLF_CRYPTO_CB_ONLY_ECC */
-
return err;
+#endif /* !WOLF_CRYPTO_CB_ONLY_ECC */
}
#endif /* !NO_ASN */
@@ -8618,9 +8650,9 @@ static int ecc_verify_hash(mp_int *r, mp_int *s, const byte* hash,
ecc_point lcl_mG;
ecc_point lcl_mQ;
#endif
- DECL_MP_INT_SIZE_DYN(w, ECC_KEY_MAX_BITS(key), MAX_ECC_BITS_USE);
+ DECL_MP_INT_SIZE_DYN(w, ECC_KEY_MAX_BITS_NONULLCHECK(key), MAX_ECC_BITS_USE);
#if !defined(WOLFSSL_ASYNC_CRYPT) || !defined(HAVE_CAVIUM_V)
- DECL_MP_INT_SIZE_DYN(e_lcl, ECC_KEY_MAX_BITS(key), MAX_ECC_BITS_USE);
+ DECL_MP_INT_SIZE_DYN(e_lcl, ECC_KEY_MAX_BITS_NONULLCHECK(key), MAX_ECC_BITS_USE);
#endif
mp_int* e;
mp_int* v = NULL; /* Will be w. */
@@ -8636,7 +8668,7 @@ static int ecc_verify_hash(mp_int *r, mp_int *s, const byte* hash,
err = mp_init(e);
#else
- NEW_MP_INT_SIZE(e_lcl, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(e_lcl, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (e_lcl == NULL) {
return MEMORY_E;
@@ -8644,7 +8676,7 @@ static int ecc_verify_hash(mp_int *r, mp_int *s, const byte* hash,
#endif
e = e_lcl;
- err = INIT_MP_INT_SIZE(e, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(e, ECC_KEY_MAX_BITS_NONULLCHECK(key));
#endif /* WOLFSSL_ASYNC_CRYPT && HAVE_CAVIUM_V */
if (err != MP_OKAY) {
#ifdef WOLFSSL_SMALL_STACK
@@ -8706,7 +8738,7 @@ static int ecc_verify_hash(mp_int *r, mp_int *s, const byte* hash,
}
#endif /* WOLFSSL_ASYNC_CRYPT && WC_ASYNC_ENABLE_ECC */
- NEW_MP_INT_SIZE(w, ECC_KEY_MAX_BITS(key), key->heap, DYNAMIC_TYPE_ECC);
+ NEW_MP_INT_SIZE(w, ECC_KEY_MAX_BITS_NONULLCHECK(key), key->heap, DYNAMIC_TYPE_ECC);
#ifdef MP_INT_SIZE_CHECK_NULL
if (w == NULL) {
err = MEMORY_E;
@@ -8719,7 +8751,7 @@ static int ecc_verify_hash(mp_int *r, mp_int *s, const byte* hash,
v = w;
}
if (err == MP_OKAY) {
- err = INIT_MP_INT_SIZE(w, ECC_KEY_MAX_BITS(key));
+ err = INIT_MP_INT_SIZE(w, ECC_KEY_MAX_BITS_NONULLCHECK(key));
}
/* allocate points */
@@ -9600,7 +9632,9 @@ int wc_ecc_export_x963_ex(ecc_key* key, byte* out, word32* outLen,
#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
!defined(WOLFSSL_CRYPTOCELL) && !defined(WOLFSSL_SE050) && \
- !defined(WOLF_CRYPTO_CB_ONLY_ECC) && !defined(WOLFSSL_STM32_PKA)
+ !defined(WOLFSSL_STM32_PKA) && \
+ (!defined(WOLF_CRYPTO_CB_ONLY_ECC) || defined(WOLFSSL_QNX_CAAM) || \
+ defined(WOLFSSL_IMXRT1170_CAAM))
/* is ecc point on curve described by dp ? */
static int _ecc_is_point(ecc_point* ecp, mp_int* a, mp_int* b, mp_int* prime)
@@ -10099,7 +10133,11 @@ static int ecc_check_pubkey_order(ecc_key* key, ecc_point* pubkey, mp_int* a,
}
#endif /* !WOLFSSL_SP_MATH */
-#endif /* !WOLFSSL_ATECC508A && !WOLFSSL_CRYPTOCELL*/
+#endif /* !WOLFSSL_ATECC508A && !WOLFSSL_ATECC608A &&
+ !WOLFSSL_CRYPTOCELL && !WOLFSSL_SE050 && !WOLFSSL_STM32_PKA &&
+ (!WOLF_CRYPTO_CB_ONLY_ECC || WOLFSSL_QNX_CAAM ||
+ WOLFSSL_IMXRT1170_CAAM)
+ */
#ifdef OPENSSL_EXTRA
int wc_ecc_get_generator(ecc_point* ecp, int curve_idx)
@@ -10139,11 +10177,7 @@ int wc_ecc_get_generator(ecc_point* ecp, int curve_idx)
static int _ecc_validate_public_key(ecc_key* key, int partial, int priv)
{
int err = MP_OKAY;
-#ifndef WOLFSSL_SP_MATH
-#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
- !defined(WOLFSSL_CRYPTOCELL) && !defined(WOLFSSL_SILABS_SE_ACCEL) && \
- !defined(WOLFSSL_SE050) && !defined(WOLF_CRYPTO_CB_ONLY_ECC) && \
- !defined(WOLF_CRYPTO_CB_ONLY_ECC) && !defined(WOLFSSL_STM32_PKA)
+#ifdef HAVE_ECC_CHECK_PUBKEY_ORDER
mp_int* b = NULL;
#ifdef USE_ECC_B_PARAM
DECLARE_CURVE_SPECS(4);
@@ -10153,9 +10187,7 @@ static int _ecc_validate_public_key(ecc_key* key, int partial, int priv)
#endif
DECLARE_CURVE_SPECS(3);
#endif /* USE_ECC_B_PARAM */
-#endif /* !WOLFSSL_ATECC508A && !WOLFSSL_ATECC608A &&
- !WOLFSSL_CRYPTOCELL && !WOLFSSL_SILABS_SE_ACCEL && !WOLFSSL_SE050 */
-#endif /* !WOLFSSL_SP_MATH */
+#endif /* HAVE_ECC_CHECK_PUBKEY_ORDER */
ASSERT_SAVED_VECTOR_REGISTERS();
@@ -10200,7 +10232,7 @@ static int _ecc_validate_public_key(ecc_key* key, int partial, int priv)
/* consider key check success on HW crypto
* ex: ATECC508/608A, CryptoCell and Silabs
*
- * consider key check success on Crypt Cb
+ * consider key check success on most Crypt Cb only builds
*/
err = MP_OKAY;
@@ -11575,8 +11607,10 @@ typedef struct {
static THREAD_LS_T fp_cache_t fp_cache[FP_ENTRIES];
#ifndef HAVE_THREAD_LS
+ static wolfSSL_Mutex ecc_fp_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(ecc_fp_lock);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initMutex = 0; /* prevent multiple mutex inits */
- static wolfSSL_Mutex ecc_fp_lock;
+#endif
#endif /* HAVE_THREAD_LS */
/* simple table to help direct the generation of the LUT */
@@ -12863,10 +12897,12 @@ int ecc_mul2add(ecc_point* A, mp_int* kA,
}
#ifndef HAVE_THREAD_LS
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (initMutex == 0) { /* extra sanity check if wolfCrypt_Init not called */
wc_InitMutex(&ecc_fp_lock);
initMutex = 1;
}
+#endif
if (wc_LockMutex(&ecc_fp_lock) != 0) {
#ifdef WOLFSSL_SMALL_STACK
@@ -13021,10 +13057,12 @@ int wc_ecc_mulmod_ex(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a,
}
#ifndef HAVE_THREAD_LS
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (initMutex == 0) { /* extra sanity check if wolfCrypt_Init not called */
wc_InitMutex(&ecc_fp_lock);
initMutex = 1;
}
+#endif
if (wc_LockMutex(&ecc_fp_lock) != 0) {
err = BAD_MUTEX_E;
@@ -13196,10 +13234,12 @@ int wc_ecc_mulmod_ex2(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a,
}
#ifndef HAVE_THREAD_LS
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (initMutex == 0) { /* extra sanity check if wolfCrypt_Init not called */
wc_InitMutex(&ecc_fp_lock);
initMutex = 1;
}
+#endif
if (wc_LockMutex(&ecc_fp_lock) != 0) {
err = BAD_MUTEX_E;
@@ -13356,12 +13396,14 @@ void wc_ecc_fp_init(void)
{
#ifndef WOLFSSL_SP_MATH
#ifndef HAVE_THREAD_LS
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (initMutex == 0) {
wc_InitMutex(&ecc_fp_lock);
initMutex = 1;
}
#endif
#endif
+#endif
}
@@ -13371,10 +13413,12 @@ void wc_ecc_fp_free(void)
{
#if !defined(WOLFSSL_SP_MATH)
#ifndef HAVE_THREAD_LS
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (initMutex == 0) { /* extra sanity check if wolfCrypt_Init not called */
wc_InitMutex(&ecc_fp_lock);
initMutex = 1;
}
+#endif
if (wc_LockMutex(&ecc_fp_lock) == 0) {
#endif /* HAVE_THREAD_LS */
@@ -13383,8 +13427,10 @@ void wc_ecc_fp_free(void)
#ifndef HAVE_THREAD_LS
wc_UnLockMutex(&ecc_fp_lock);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_FreeMutex(&ecc_fp_lock);
initMutex = 0;
+#endif
}
#endif /* HAVE_THREAD_LS */
#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/eccsi.c b/extra/wolfssl/wolfssl/wolfcrypt/src/eccsi.c
index 836243be..0b12991e 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/eccsi.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/eccsi.c
@@ -43,6 +43,14 @@
#include <wolfssl/wolfcrypt/sp.h>
#endif
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
#ifndef WOLFSSL_HAVE_ECC_KEY_GET_PRIV
/* FIPS build has replaced ecc.h. */
#define wc_ecc_key_get_priv(key) (&((key)->k))
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/ed25519.c b/extra/wolfssl/wolfssl/wolfcrypt/src/ed25519.c
index 6dfb7a0f..f59b6729 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/ed25519.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/ed25519.c
@@ -22,6 +22,12 @@
/* Based On Daniel J Bernstein's ed25519 Public Domain ref10 work. */
+
+/* Possible Ed25519 enable options:
+ * WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN Default: OFF
+ * Check that the private key didn't change during the signing operations.
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -32,6 +38,7 @@
#ifdef HAVE_ED25519
#include <wolfssl/wolfcrypt/ed25519.h>
+#include <wolfssl/wolfcrypt/ge_operations.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/hash.h>
#ifdef NO_INLINE
@@ -304,6 +311,9 @@ int wc_ed25519_sign_msg_ex(const byte* in, word32 inLen, byte* out,
ALIGN16 byte nonce[WC_SHA512_DIGEST_SIZE];
ALIGN16 byte hram[WC_SHA512_DIGEST_SIZE];
ALIGN16 byte az[ED25519_PRV_KEY_SIZE];
+#ifdef WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
+ byte orig_k[ED25519_KEY_SIZE];
+#endif
/* sanity check on arguments */
if (in == NULL || out == NULL || outLen == NULL || key == NULL ||
@@ -331,6 +341,10 @@ int wc_ed25519_sign_msg_ex(const byte* in, word32 inLen, byte* out,
}
*outLen = ED25519_SIG_SIZE;
+#ifdef WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
+ XMEMCPY(orig_k, key->k, ED25519_KEY_SIZE);
+#endif
+
/* step 1: create nonce to use where nonce is r in
r = H(h_b, ... ,h_2b-1,M) */
ret = ed25519_hash(key, key->k, ED25519_KEY_SIZE, az);
@@ -441,6 +455,18 @@ int wc_ed25519_sign_msg_ex(const byte* in, word32 inLen, byte* out,
sc_muladd(out + (ED25519_SIG_SIZE/2), hram, az, nonce);
#endif
#endif /* WOLFSSL_SE050 */
+
+#ifdef WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
+ {
+ int i;
+ byte c = 0;
+ for (i = 0; i < ED25519_KEY_SIZE; i++) {
+ c |= key->k[i] ^ orig_k[i];
+ }
+ ret = ctMaskGT(c, 0) & SIG_VERIFY_E;
+ }
+#endif
+
return ret;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/ed448.c b/extra/wolfssl/wolfssl/wolfcrypt/src/ed448.c
index 8eb83372..e93c2128 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/ed448.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/ed448.c
@@ -25,6 +25,11 @@
* Reworked for curve448 by Sean Parkinson.
*/
+/* Possible Ed448 enable options:
+ * WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN Default: OFF
+ * Check that the private key didn't change during the signing operations.
+ */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -198,7 +203,10 @@ int wc_ed448_make_public(ed448_key* key, unsigned char* pubKey, word32 pubKeySz)
az[55] |= 0x80;
az[56] = 0x00;
- ge448_scalarmult_base(&A, az);
+ ret = ge448_scalarmult_base(&A, az);
+ }
+
+ if (ret == 0) {
ge448_to_bytes(pubKey, &A);
key->pubKeySet = 1;
@@ -279,6 +287,9 @@ int wc_ed448_sign_msg_ex(const byte* in, word32 inLen, byte* out,
byte hram[ED448_SIG_SIZE];
byte az[ED448_PRV_KEY_SIZE];
int ret = 0;
+#ifdef WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
+ byte orig_k[ED448_KEY_SIZE];
+#endif
/* sanity check on arguments */
if ((in == NULL) || (out == NULL) || (outLen == NULL) || (key == NULL) ||
@@ -298,6 +309,10 @@ int wc_ed448_sign_msg_ex(const byte* in, word32 inLen, byte* out,
if (ret == 0) {
*outLen = ED448_SIG_SIZE;
+#ifdef WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
+ XMEMCPY(orig_k, key->k, ED448_KEY_SIZE);
+#endif
+
/* step 1: create nonce to use where nonce is r in
r = H(h_b, ... ,h_2b-1,M) */
ret = ed448_hash(key, key->k, ED448_KEY_SIZE, az, sizeof(az));
@@ -353,13 +368,15 @@ int wc_ed448_sign_msg_ex(const byte* in, word32 inLen, byte* out,
/* step 2: computing R = rB where rB is the scalar multiplication of
r and B */
- ge448_scalarmult_base(&R,nonce);
- ge448_to_bytes(out,&R);
+ ret = ge448_scalarmult_base(&R,nonce);
/* step 3: hash R + public key + message getting H(R,A,M) then
creating S = (r + H(R,A,M)a) mod l */
+ if (ret == 0) {
+ ge448_to_bytes(out,&R);
- ret = ed448_hash_update(key, sha, ed448Ctx, ED448CTX_SIZE);
+ ret = ed448_hash_update(key, sha, ed448Ctx, ED448CTX_SIZE);
+ }
if (ret == 0) {
ret = ed448_hash_update(key, sha, &type, sizeof(type));
}
@@ -391,6 +408,17 @@ int wc_ed448_sign_msg_ex(const byte* in, word32 inLen, byte* out,
sc448_muladd(out + (ED448_SIG_SIZE/2), hram, az, nonce);
}
+#ifdef WOLFSSL_EDDSA_CHECK_PRIV_ON_SIGN
+ if (ret == 0) {
+ int i;
+ byte c = 0;
+ for (i = 0; i < ED448_KEY_SIZE; i++) {
+ c |= key->k[i] ^ orig_k[i];
+ }
+ ret = ctMaskGT(c, 0) & SIG_VERIFY_E;
+ }
+#endif
+
return ret;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/error.c b/extra/wolfssl/wolfssl/wolfcrypt/src/error.c
index 929e0bfd..eebd4dbc 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/error.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/error.c
@@ -601,6 +601,9 @@ const char* wc_GetErrorString(int error)
case AES_EAX_AUTH_E:
return "AES-EAX Authentication check fail";
+ case KEY_EXHAUSTED_E:
+ return "Key no longer usable for operation";
+
default:
return "unknown error number";
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/evp.c b/extra/wolfssl/wolfssl/wolfcrypt/src/evp.c
index cdda3947..a365ff68 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/evp.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/evp.c
@@ -2273,7 +2273,7 @@ WOLFSSL_EVP_PKEY_CTX *wolfSSL_EVP_PKEY_CTX_new(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_E
if (ctx == NULL) return NULL;
XMEMSET(ctx, 0, sizeof(WOLFSSL_EVP_PKEY_CTX));
ctx->pkey = pkey;
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
ctx->padding = RSA_PKCS1_PADDING;
ctx->md = NULL;
#endif
@@ -2497,9 +2497,9 @@ int wolfSSL_EVP_PKEY_derive(WOLFSSL_EVP_PKEY_CTX *ctx, unsigned char *key, size_
#endif
return WOLFSSL_FAILURE;
}
- if (wc_ecc_shared_secret_ssh((ecc_key*)ctx->pkey->ecc->internal,
- (ecc_point*)ctx->peerKey->ecc->pub_key->internal,
- key, &len32) != MP_OKAY) {
+ if (wc_ecc_shared_secret((ecc_key*)ctx->pkey->ecc->internal,
+ (ecc_key*)ctx->peerKey->ecc->internal, key, &len32)
+ != MP_OKAY) {
WOLFSSL_MSG("wc_ecc_shared_secret failed");
#if defined(ECC_TIMING_RESISTANT) && !defined(HAVE_SELFTEST) \
&& (!defined(HAVE_FIPS) || \
@@ -2774,7 +2774,7 @@ int wolfSSL_EVP_PKEY_decrypt(WOLFSSL_EVP_PKEY_CTX *ctx,
(void)len;
switch (ctx->pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA:
if (out == NULL) {
if (ctx->pkey->rsa == NULL) {
@@ -2877,7 +2877,7 @@ int wolfSSL_EVP_PKEY_encrypt(WOLFSSL_EVP_PKEY_CTX *ctx,
(void)len;
switch (ctx->pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA:
if (out == NULL) {
if (ctx->pkey->rsa == NULL) {
@@ -2958,7 +2958,7 @@ int wolfSSL_EVP_PKEY_sign_init(WOLFSSL_EVP_PKEY_CTX *ctx)
return ret;
switch (ctx->pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA:
ctx->op = EVP_PKEY_OP_SIGN;
ret = WOLFSSL_SUCCESS;
@@ -3006,7 +3006,7 @@ int wolfSSL_EVP_PKEY_sign(WOLFSSL_EVP_PKEY_CTX *ctx, unsigned char *sig,
(void)tbslen;
switch (ctx->pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA: {
unsigned int usiglen = (unsigned int)*siglen;
if (!sig) {
@@ -3120,7 +3120,7 @@ int wolfSSL_EVP_PKEY_verify_init(WOLFSSL_EVP_PKEY_CTX *ctx)
return WOLFSSL_FAILURE;
switch (ctx->pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA:
ctx->op = EVP_PKEY_OP_VERIFY;
return WOLFSSL_SUCCESS;
@@ -3162,7 +3162,7 @@ int wolfSSL_EVP_PKEY_verify(WOLFSSL_EVP_PKEY_CTX *ctx, const unsigned char *sig,
return WOLFSSL_FAILURE;
switch (ctx->pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA:
return wolfSSL_RSA_verify_ex(WC_HASH_TYPE_NONE, tbs,
(unsigned int)tbslen, sig, (unsigned int)siglen, ctx->pkey->rsa,
@@ -3358,8 +3358,7 @@ int wolfSSL_EVP_PKEY_keygen(WOLFSSL_EVP_PKEY_CTX *ctx,
}
switch (pkey->type) {
-#if !defined(HAVE_FAST_RSA) && defined(WOLFSSL_KEY_GEN) && \
- !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN) && !defined(NO_RSA)
case EVP_PKEY_RSA:
pkey->rsa = wolfSSL_RSA_generate_key(ctx->nbits, WC_RSA_EXPONENT,
NULL, NULL);
@@ -3892,7 +3891,7 @@ int wolfSSL_EVP_SignFinal(WOLFSSL_EVP_MD_CTX *ctx, unsigned char *sigret,
return ret;
switch (pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA: {
int nid;
const WOLFSSL_EVP_MD *ctxmd;
@@ -3988,7 +3987,7 @@ int wolfSSL_EVP_VerifyFinal(WOLFSSL_EVP_MD_CTX *ctx,
(void)siglen;
switch (pkey->type) {
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
case EVP_PKEY_RSA: {
int nid;
const WOLFSSL_EVP_MD *ctxmd = wolfSSL_EVP_MD_CTX_md(ctx);
@@ -4461,7 +4460,7 @@ int wolfSSL_EVP_DigestSignFinal(WOLFSSL_EVP_MD_CTX *ctx, unsigned char *sig,
else {
/* Sign the digest. */
switch (ctx->pctx->pkey->type) {
- #if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+ #if !defined(NO_RSA)
case EVP_PKEY_RSA: {
unsigned int sigSz = (unsigned int)*siglen;
int nid;
@@ -4564,7 +4563,7 @@ int wolfSSL_EVP_DigestVerifyFinal(WOLFSSL_EVP_MD_CTX *ctx,
else {
/* Verify the signature with the digest. */
switch (ctx->pctx->pkey->type) {
- #if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+ #if !defined(NO_RSA)
case EVP_PKEY_RSA: {
int nid;
const WOLFSSL_EVP_MD *md = wolfSSL_EVP_MD_CTX_md(ctx);
@@ -8111,6 +8110,26 @@ void wolfSSL_EVP_init(void)
}
#endif /* !NO_AES || !NO_DES3 */
+ static int IsCipherTypeAEAD(unsigned char cipherType)
+ {
+ switch (cipherType) {
+ case AES_128_GCM_TYPE:
+ case AES_192_GCM_TYPE:
+ case AES_256_GCM_TYPE:
+ case AES_128_CCM_TYPE:
+ case AES_192_CCM_TYPE:
+ case AES_256_CCM_TYPE:
+ case ARIA_128_GCM_TYPE:
+ case ARIA_192_GCM_TYPE:
+ case ARIA_256_GCM_TYPE:
+ case SM4_GCM_TYPE:
+ case SM4_CCM_TYPE:
+ return 1;
+ default:
+ return 0;
+ }
+ }
+
/* Return length on ok */
int wolfSSL_EVP_Cipher(WOLFSSL_EVP_CIPHER_CTX* ctx, byte* dst, byte* src,
word32 len)
@@ -8119,34 +8138,21 @@ void wolfSSL_EVP_init(void)
WOLFSSL_ENTER("wolfSSL_EVP_Cipher");
- if (ctx == NULL || ((src == NULL || dst == NULL) &&
- (TRUE
- #ifdef HAVE_AESGCM
- && ctx->cipherType != AES_128_GCM_TYPE &&
- ctx->cipherType != AES_192_GCM_TYPE &&
- ctx->cipherType != AES_256_GCM_TYPE
- #endif
- #ifdef HAVE_AESCCM
- && ctx->cipherType != AES_128_CCM_TYPE &&
- ctx->cipherType != AES_192_CCM_TYPE &&
- ctx->cipherType != AES_256_CCM_TYPE
- #endif
- #ifdef HAVE_ARIA
- && ctx->cipherType != ARIA_128_GCM_TYPE &&
- ctx->cipherType != ARIA_192_GCM_TYPE &&
- ctx->cipherType != ARIA_256_GCM_TYPE
- #endif
- #ifdef WOLFSSL_SM4_GCM
- && ctx->cipherType != SM4_GCM_TYPE
- #endif
- #ifdef WOLFSSL_SM4_CCM
- && ctx->cipherType != SM4_CCM_TYPE
- #endif
- ))) {
+ if (ctx == NULL) {
WOLFSSL_MSG("Bad argument.");
return WOLFSSL_FATAL_ERROR;
}
+ if (!IsCipherTypeAEAD(ctx->cipherType)) {
+ /* No-op for non-AEAD ciphers */
+ if (src == NULL && dst == NULL && len == 0)
+ return 0;
+ if (src == NULL || dst == NULL) {
+ WOLFSSL_MSG("Bad argument.");
+ return WOLFSSL_FATAL_ERROR;
+ }
+ }
+
if (ctx->cipherType == WOLFSSL_EVP_CIPH_TYPE_INIT) {
WOLFSSL_MSG("Cipher operation not initialized. Call "
"wolfSSL_EVP_CipherInit.");
@@ -8510,7 +8516,7 @@ static void clearEVPPkeyKeys(WOLFSSL_EVP_PKEY *pkey)
}
#ifndef NO_RSA
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN)
static int PopulateRSAEvpPkeyDer(WOLFSSL_EVP_PKEY *pkey)
{
int ret = 0;
@@ -8668,12 +8674,12 @@ int wolfSSL_EVP_PKEY_set1_RSA(WOLFSSL_EVP_PKEY *pkey, WOLFSSL_RSA *key)
}
}
-#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_USER_RSA)
+#if defined(WOLFSSL_KEY_GEN)
if (PopulateRSAEvpPkeyDer(pkey) != WOLFSSL_SUCCESS) {
WOLFSSL_MSG("PopulateRSAEvpPkeyDer failed");
return WOLFSSL_FAILURE;
}
-#endif /* WOLFSSL_KEY_GEN && !HAVE_USER_RSA */
+#endif /* WOLFSSL_KEY_GEN */
#ifdef WC_RSA_BLINDING
if (key->ownRng == 0) {
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/ext_kyber.c b/extra/wolfssl/wolfssl/wolfcrypt/src/ext_kyber.c
index 834d9890..0e694c09 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/ext_kyber.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/ext_kyber.c
@@ -39,6 +39,8 @@
#if defined (HAVE_LIBOQS)
+#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
+
static const char* OQS_ID2name(int id) {
switch (id) {
case KYBER_LEVEL1: return OQS_KEM_alg_kyber_512;
@@ -99,10 +101,15 @@ int wc_KyberKey_Init(int type, KyberKey* key, void* heap, int devId)
/* Keep type for parameters. */
key->type = type;
+
+#ifdef WOLF_CRYPTO_CB
+ key->devCtx = NULL;
+ key->devId = devId;
+#endif
}
- (void)devId;
(void)heap;
+ (void)devId;
return ret;
}
@@ -310,27 +317,33 @@ int wc_KyberKey_MakeKey(KyberKey* key, WC_RNG* rng)
OQS_KEM *kem = NULL;
#endif
- (void)rng;
-
/* Validate parameter. */
if (key == NULL) {
return BAD_FUNC_ARG;
}
-#ifdef HAVE_LIBOQS
- if (ret == 0) {
- algName = OQS_ID2name(key->type);
- if (algName == NULL) {
- ret = BAD_FUNC_ARG;
- }
+#ifdef WOLF_CRYPTO_CB
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (key->devId != INVALID_DEVID)
+ #endif
+ {
+ ret = wc_CryptoCb_MakePqcKemKey(rng, WC_PQC_KEM_TYPE_KYBER,
+ key->type, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
}
+#endif
+#ifdef HAVE_LIBOQS
if (ret == 0) {
algName = OQS_ID2name(key->type);
if (algName == NULL) {
ret = BAD_FUNC_ARG;
}
}
+
if (ret == 0) {
kem = OQS_KEM_new(algName);
if (kem == NULL) {
@@ -338,11 +351,15 @@ int wc_KyberKey_MakeKey(KyberKey* key, WC_RNG* rng)
}
}
if (ret == 0) {
+ ret = wolfSSL_liboqsRngMutexLock(rng);
+ }
+ if (ret == 0) {
if (OQS_KEM_keypair(kem, key->pub, key->priv) !=
OQS_SUCCESS) {
ret = BAD_FUNC_ARG;
}
}
+ wolfSSL_liboqsRngMutexUnlock();
OQS_KEM_free(kem);
#endif /* HAVE_LIBOQS */
#ifdef HAVE_PQM4
@@ -397,6 +414,9 @@ int wc_KyberKey_Encapsulate(KyberKey* key, unsigned char* ct, unsigned char* ss,
WC_RNG* rng)
{
int ret = 0;
+#ifdef WOLF_CRYPTO_CB
+ word32 ctlen = 0;
+#endif
#ifdef HAVE_LIBOQS
const char * algName = NULL;
OQS_KEM *kem = NULL;
@@ -409,6 +429,24 @@ int wc_KyberKey_Encapsulate(KyberKey* key, unsigned char* ct, unsigned char* ss,
ret = BAD_FUNC_ARG;
}
+#ifdef WOLF_CRYPTO_CB
+ if (ret == 0) {
+ ret = wc_KyberKey_CipherTextSize(key, &ctlen);
+ }
+ if ((ret == 0)
+ #ifndef WOLF_CRYPTO_CB_FIND
+ && (key->devId != INVALID_DEVID)
+ #endif
+ ) {
+ ret = wc_CryptoCb_PqcEncapsulate(ct, ctlen, ss, KYBER_SS_SZ, rng,
+ WC_PQC_KEM_TYPE_KYBER, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
+ }
+#endif
+
#ifdef HAVE_LIBOQS
if (ret == 0) {
algName = OQS_ID2name(key->type);
@@ -423,11 +461,14 @@ int wc_KyberKey_Encapsulate(KyberKey* key, unsigned char* ct, unsigned char* ss,
}
}
if (ret == 0) {
+ ret = wolfSSL_liboqsRngMutexLock(rng);
+ }
+ if (ret == 0) {
if (OQS_KEM_encaps(kem, ct, ss, key->pub) != OQS_SUCCESS) {
ret = BAD_FUNC_ARG;
}
}
-
+ wolfSSL_liboqsRngMutexUnlock();
OQS_KEM_free(kem);
#endif /* HAVE_LIBOQS */
#ifdef HAVE_PQM4
@@ -500,6 +541,21 @@ int wc_KyberKey_Decapsulate(KyberKey* key, unsigned char* ss,
ret = BUFFER_E;
}
+#ifdef WOLF_CRYPTO_CB
+ if ((ret == 0)
+ #ifndef WOLF_CRYPTO_CB_FIND
+ && (key->devId != INVALID_DEVID)
+ #endif
+ ) {
+ ret = wc_CryptoCb_PqcDecapsulate(ct, ctlen, ss, KYBER_SS_SZ,
+ WC_PQC_KEM_TYPE_KYBER, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
+ }
+#endif
+
#ifdef HAVE_LIBOQS
if (ret == 0) {
algName = OQS_ID2name(key->type);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/ext_xmss.c b/extra/wolfssl/wolfssl/wolfcrypt/src/ext_xmss.c
index b1e5e46d..84498d9a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/ext_xmss.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/ext_xmss.c
@@ -39,6 +39,7 @@
#endif
#include <xmss_callbacks.h>
+#include <utils.h>
#ifndef WOLFSSL_XMSS_VERIFY_ONLY
static THREAD_LS_T WC_RNG * xmssRng = NULL;
@@ -177,6 +178,11 @@ static int wc_XmssKey_SetOid(XmssKey * key, uint32_t oid, int is_xmssmt)
WOLFSSL_MSG("error: unsupported XMSS/XMSS^MT parameter set");
return -1;
}
+ if ((key->params.full_height < WOLFSSL_XMSS_MIN_HEIGHT) ||
+ (key->params.full_height > WOLFSSL_XMSS_MAX_HEIGHT)) {
+ WOLFSSL_MSG("error: unsupported XMSS/XMSS^MT parameter set - height");
+ return -1;
+ }
ret = xmss_set_sha_cb(sha256_cb);
if (ret != 0) {
@@ -747,6 +753,64 @@ int wc_XmssKey_Sign(XmssKey* key, byte * sig, word32 * sigLen, const byte * msg,
return (key->state == WC_XMSS_STATE_OK) ? 0 : -1;
}
+
+
+/* Check if more signatures are possible with key.
+ *
+ * @param [in] key XMSS key to check.
+ * @return 1 when signatures possible.
+ * @return 0 when key exhausted.
+ */
+int wc_XmssKey_SigsLeft(XmssKey* key)
+{
+ int ret = 0;
+
+ /* Validate parameter. */
+ if (key == NULL) {
+ ret = 0;
+ }
+ /* Validate state. */
+ else if (key->state == WC_XMSS_STATE_NOSIGS) {
+ WOLFSSL_MSG("error: XMSS signatures exhausted");
+ ret = 0;
+ }
+ else if (key->state != WC_XMSS_STATE_OK) {
+ WOLFSSL_MSG("error: can't sign, XMSS key not in good state");
+ ret = 0;
+ }
+ /* Read the current secret key from NV storage.*/
+ else if (key->read_private_key(key->sk, key->sk_len, key->context) !=
+ WC_XMSS_RC_READ_TO_MEMORY) {
+ WOLFSSL_MSG("error: XMSS read_private_key failed");
+ ret = 0;
+ }
+ else {
+ /* The following assumes core_fast implementation is used
+ * from patched xmss-reference. */
+ const unsigned char* sk = (key->sk + XMSS_OID_LEN);
+ const xmss_params* params = &key->params;
+ unsigned long long idx = 0;
+
+ if (key->is_xmssmt) {
+ for (uint64_t i = 0; i < params->index_bytes; i++) {
+ idx |= ((unsigned long long)sk[i])
+ << 8 * (params->index_bytes - 1 - i);
+ }
+ }
+ else {
+ idx = ((unsigned long)sk[0] << 24) |
+ ((unsigned long)sk[1] << 16) |
+ ((unsigned long)sk[2] << 8) | sk[3];
+ }
+
+ ret = idx < ((1ULL << params->full_height) - 1);
+
+ /* Force zero the secret key from memory always. */
+ ForceZero(key->sk, key->sk_len);
+ }
+
+ return ret;
+}
#endif /* ifndef WOLFSSL_XMSS_VERIFY_ONLY*/
/* Get the XMSS/XMSS^MT public key length. The public key
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/falcon.c b/extra/wolfssl/wolfssl/wolfcrypt/src/falcon.c
index ea722a20..2645db63 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/falcon.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/falcon.c
@@ -59,17 +59,32 @@
*/
int wc_falcon_sign_msg(const byte* in, word32 inLen,
byte* out, word32 *outLen,
- falcon_key* key)
+ falcon_key* key, WC_RNG* rng)
{
int ret = 0;
-#ifdef HAVE_LIBOQS
- OQS_SIG *oqssig = NULL;
- size_t localOutLen = 0;
/* sanity check on arguments */
if ((in == NULL) || (out == NULL) || (outLen == NULL) || (key == NULL)) {
- ret = BAD_FUNC_ARG;
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLF_CRYPTO_CB
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (key->devId != INVALID_DEVID)
+ #endif
+ {
+ ret = wc_CryptoCb_PqcSign(in, inLen, out, outLen, rng,
+ WC_PQC_SIG_TYPE_FALCON, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
}
+#endif
+
+#ifdef HAVE_LIBOQS
+ OQS_SIG *oqssig = NULL;
+ size_t localOutLen = 0;
if ((ret == 0) && (!key->prvKeySet)) {
ret = BAD_FUNC_ARG;
@@ -88,6 +103,10 @@ int wc_falcon_sign_msg(const byte* in, word32 inLen,
}
}
+ if ((ret == 0) && (oqssig == NULL)) {
+ ret = BUFFER_E;
+ }
+
/* check and set up out length */
if (ret == 0) {
if ((key->level == 1) && (*outLen < FALCON_LEVEL1_SIG_SIZE)) {
@@ -101,6 +120,10 @@ int wc_falcon_sign_msg(const byte* in, word32 inLen,
localOutLen = *outLen;
}
+ if (ret == 0) {
+ ret = wolfSSL_liboqsRngMutexLock(rng);
+ }
+
if ((ret == 0) &&
(OQS_SIG_sign(oqssig, out, &localOutLen, in, inLen, key->k)
== OQS_ERROR)) {
@@ -111,6 +134,8 @@ int wc_falcon_sign_msg(const byte* in, word32 inLen,
*outLen = (word32)localOutLen;
}
+ wolfSSL_liboqsRngMutexUnlock();
+
if (oqssig != NULL) {
OQS_SIG_free(oqssig);
}
@@ -136,12 +161,27 @@ int wc_falcon_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
word32 msgLen, int* res, falcon_key* key)
{
int ret = 0;
-#ifdef HAVE_LIBOQS
- OQS_SIG *oqssig = NULL;
if (key == NULL || sig == NULL || msg == NULL || res == NULL) {
- ret = BAD_FUNC_ARG;
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLF_CRYPTO_CB
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (key->devId != INVALID_DEVID)
+ #endif
+ {
+ ret = wc_CryptoCb_PqcVerify(sig, sigLen, msg, msgLen, res,
+ WC_PQC_SIG_TYPE_FALCON, key);
+ if (ret != CRYPTOCB_UNAVAILABLE)
+ return ret;
+ /* fall-through when unavailable */
+ ret = 0;
}
+#endif
+
+#ifdef HAVE_LIBOQS
+ OQS_SIG *oqssig = NULL;
if ((ret == 0) && (!key->pubKeySet)) {
ret = BAD_FUNC_ARG;
@@ -160,6 +200,10 @@ int wc_falcon_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
}
}
+ if ((ret == 0) && (oqssig == NULL)) {
+ ret = BUFFER_E;
+ }
+
if ((ret == 0) &&
(OQS_SIG_verify(oqssig, msg, msgLen, sig, sigLen, key->p)
== OQS_ERROR)) {
@@ -187,14 +231,91 @@ int wc_falcon_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
*/
int wc_falcon_init(falcon_key* key)
{
+ return wc_falcon_init_ex(key, NULL, INVALID_DEVID);
+}
+
+/* Initialize the falcon private/public key.
+ *
+ * key [in] Falcon key.
+ * heap [in] Heap hint.
+ * devId[in] Device ID.
+ * returns BAD_FUNC_ARG when key is NULL
+ */
+int wc_falcon_init_ex(falcon_key* key, void* heap, int devId)
+{
if (key == NULL) {
return BAD_FUNC_ARG;
}
- ForceZero(key, sizeof(key));
+ ForceZero(key, sizeof(*key));
+
+#ifdef WOLF_CRYPTO_CB
+ key->devCtx = NULL;
+ key->devId = devId;
+#endif
+#ifdef WOLF_PRIVATE_KEY_ID
+ key->idLen = 0;
+ key->labelLen = 0;
+#endif
+
+ (void) heap;
+ (void) devId;
+
return 0;
}
+#ifdef WOLF_PRIVATE_KEY_ID
+int wc_falcon_init_id(falcon_key* key, const unsigned char* id, int len,
+ void* heap, int devId)
+{
+ int ret = 0;
+
+ if (key == NULL)
+ ret = BAD_FUNC_ARG;
+ if (ret == 0 && (len < 0 || len > FALCON_MAX_ID_LEN))
+ ret = BUFFER_E;
+
+ if (ret == 0)
+ ret = wc_falcon_init_ex(key, heap, devId);
+ if (ret == 0 && id != NULL && len != 0) {
+ XMEMCPY(key->id, id, (size_t)len);
+ key->idLen = len;
+ }
+
+ /* Set the maxiumum level here */
+ wc_falcon_set_level(key, 5);
+
+ return ret;
+}
+
+int wc_falcon_init_label(falcon_key* key, const char* label, void* heap,
+ int devId)
+{
+ int ret = 0;
+ int labelLen = 0;
+
+ if (key == NULL || label == NULL)
+ ret = BAD_FUNC_ARG;
+ if (ret == 0) {
+ labelLen = (int)XSTRLEN(label);
+ if (labelLen == 0 || labelLen > FALCON_MAX_LABEL_LEN)
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0)
+ ret = wc_falcon_init_ex(key, heap, devId);
+ if (ret == 0) {
+ XMEMCPY(key->label, label, (size_t)labelLen);
+ key->labelLen = labelLen;
+ }
+
+ /* Set the maxiumum level here */
+ wc_falcon_set_level(key, 5);
+
+ return ret;
+}
+#endif
+
/* Set the level of the falcon private/public key.
*
* key [out] Falcon key.
@@ -244,7 +365,7 @@ int wc_falcon_get_level(falcon_key* key, byte* level)
void wc_falcon_free(falcon_key* key)
{
if (key != NULL) {
- ForceZero(key, sizeof(key));
+ ForceZero(key, sizeof(*key));
}
}
@@ -393,12 +514,7 @@ int wc_falcon_import_private_only(const byte* priv, word32 privSz,
return ret;
}
- if (key->level == 1) {
- XMEMCPY(key->k, newPriv, FALCON_LEVEL1_KEY_SIZE);
- }
- else if (key->level == 5) {
- XMEMCPY(key->k, newPriv, FALCON_LEVEL5_KEY_SIZE);
- }
+ XMEMCPY(key->k, newPriv, newPrivSz);
key->prvKeySet = 1;
return 0;
@@ -456,12 +572,7 @@ int wc_falcon_import_private_key(const byte* priv, word32 privSz,
if (ret == 0) {
/* make the private key (priv + pub) */
- if (key->level == 1) {
- XMEMCPY(key->k, newPriv, FALCON_LEVEL1_KEY_SIZE);
- }
- else if (key->level == 5) {
- XMEMCPY(key->k, newPriv, FALCON_LEVEL5_KEY_SIZE);
- }
+ XMEMCPY(key->k, newPriv, newPrivSz);
key->prvKeySet = 1;
}
@@ -544,14 +655,14 @@ int wc_falcon_export_private(falcon_key* key, byte* out, word32* outLen)
if (key->level == 1) {
*outLen = FALCON_LEVEL1_PRV_KEY_SIZE;
- XMEMCPY(out, key->k, FALCON_LEVEL1_PRV_KEY_SIZE);
- XMEMCPY(out + FALCON_LEVEL1_PRV_KEY_SIZE, key->p,
+ XMEMCPY(out, key->k, FALCON_LEVEL1_KEY_SIZE);
+ XMEMCPY(out + FALCON_LEVEL1_KEY_SIZE, key->p,
FALCON_LEVEL1_PUB_KEY_SIZE);
}
else if (key->level == 5) {
*outLen = FALCON_LEVEL5_PRV_KEY_SIZE;
- XMEMCPY(out, key->k, FALCON_LEVEL5_PRV_KEY_SIZE);
- XMEMCPY(out + FALCON_LEVEL5_PRV_KEY_SIZE, key->p,
+ XMEMCPY(out, key->k, FALCON_LEVEL5_KEY_SIZE);
+ XMEMCPY(out + FALCON_LEVEL5_KEY_SIZE, key->p,
FALCON_LEVEL5_PUB_KEY_SIZE);
}
@@ -600,8 +711,24 @@ int wc_falcon_check_key(falcon_key* key)
return BAD_FUNC_ARG;
}
- /* Assume everything is fine. */
- return 0;
+ int ret = 0;
+
+ /* The public key is also decoded and stored within the private key buffer
+ * behind the private key. Hence, we can compare both stored public keys. */
+ if (key->level == 1) {
+ ret = XMEMCMP(key->p, key->k + FALCON_LEVEL1_KEY_SIZE,
+ FALCON_LEVEL1_PUB_KEY_SIZE);
+ }
+ else if (key->level == 5) {
+ ret = XMEMCMP(key->p, key->k + FALCON_LEVEL5_KEY_SIZE,
+ FALCON_LEVEL5_PUB_KEY_SIZE);
+ }
+
+ if (ret != 0) {
+ ret = PUBLIC_KEY_E;
+ }
+
+ return ret;
}
/* Returns the size of a falcon private key.
@@ -696,7 +823,7 @@ int wc_Falcon_PrivateKeyDecode(const byte* input, word32* inOutIdx,
falcon_key* key, word32 inSz)
{
int ret = 0;
- byte privKey[FALCON_MAX_KEY_SIZE], pubKey[FALCON_MAX_PUB_KEY_SIZE];
+ byte privKey[FALCON_MAX_PRV_KEY_SIZE], pubKey[FALCON_MAX_PUB_KEY_SIZE];
word32 privKeyLen = (word32)sizeof(privKey);
word32 pubKeyLen = (word32)sizeof(pubKey);
int keytype = 0;
@@ -741,6 +868,11 @@ int wc_Falcon_PublicKeyDecode(const byte* input, word32* inOutIdx,
return BAD_FUNC_ARG;
}
+ ret = wc_falcon_import_public(input, inSz, key);
+ if (ret == 0) {
+ return 0;
+ }
+
if (key->level == 1) {
keytype = FALCON_LEVEL1k;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/fe_x25519_asm.S b/extra/wolfssl/wolfssl/wolfcrypt/src/fe_x25519_asm.S
index 7f6192ac..2001bc0a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/fe_x25519_asm.S
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/fe_x25519_asm.S
@@ -1254,7 +1254,7 @@ cpuFlagsSet:
.long 0
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_cpuFlagsSet:
.long 0
#endif /* __APPLE__ */
@@ -1266,7 +1266,7 @@ intelFlags:
.long 0
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_intelFlags:
.long 0
#endif /* __APPLE__ */
@@ -1278,7 +1278,7 @@ fe_mul_p:
.quad fe_mul_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_fe_mul_p:
.quad _fe_mul_x64
#endif /* __APPLE__ */
@@ -1290,7 +1290,7 @@ fe_sq_p:
.quad fe_sq_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_fe_sq_p:
.quad _fe_sq_x64
#endif /* __APPLE__ */
@@ -1302,7 +1302,7 @@ fe_mul121666_p:
.quad fe_mul121666_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_fe_mul121666_p:
.quad _fe_mul121666_x64
#endif /* __APPLE__ */
@@ -1314,7 +1314,7 @@ fe_invert_p:
.quad fe_invert_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_fe_invert_p:
.quad _fe_invert_x64
#endif /* __APPLE__ */
@@ -1326,7 +1326,7 @@ curve25519_p:
.quad curve25519_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_curve25519_p:
.quad _curve25519_x64
#endif /* __APPLE__ */
@@ -1339,7 +1339,7 @@ fe_sq2_p:
.quad fe_sq2_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_fe_sq2_p:
.quad _fe_sq2_x64
#endif /* __APPLE__ */
@@ -1351,7 +1351,7 @@ fe_pow22523_p:
.quad fe_pow22523_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_fe_pow22523_p:
.quad _fe_pow22523_x64
#endif /* __APPLE__ */
@@ -1363,7 +1363,7 @@ ge_p1p1_to_p2_p:
.quad ge_p1p1_to_p2_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_p1p1_to_p2_p:
.quad _ge_p1p1_to_p2_x64
#endif /* __APPLE__ */
@@ -1375,7 +1375,7 @@ ge_p1p1_to_p3_p:
.quad ge_p1p1_to_p3_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_p1p1_to_p3_p:
.quad _ge_p1p1_to_p3_x64
#endif /* __APPLE__ */
@@ -1387,7 +1387,7 @@ ge_p2_dbl_p:
.quad ge_p2_dbl_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_p2_dbl_p:
.quad _ge_p2_dbl_x64
#endif /* __APPLE__ */
@@ -1399,7 +1399,7 @@ ge_madd_p:
.quad ge_madd_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_madd_p:
.quad _ge_madd_x64
#endif /* __APPLE__ */
@@ -1411,7 +1411,7 @@ ge_msub_p:
.quad ge_msub_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_msub_p:
.quad _ge_msub_x64
#endif /* __APPLE__ */
@@ -1423,7 +1423,7 @@ ge_add_p:
.quad ge_add_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_add_p:
.quad _ge_add_x64
#endif /* __APPLE__ */
@@ -1435,7 +1435,7 @@ ge_sub_p:
.quad ge_sub_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_ge_sub_p:
.quad _ge_sub_x64
#endif /* __APPLE__ */
@@ -1447,7 +1447,7 @@ sc_reduce_p:
.quad sc_reduce_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_sc_reduce_p:
.quad _sc_reduce_x64
#endif /* __APPLE__ */
@@ -1459,7 +1459,7 @@ sc_muladd_p:
.quad sc_muladd_x64
#else
.section __DATA,__data
-.p2align 2
+.p2align 3
_sc_muladd_p:
.quad _sc_muladd_x64
#endif /* __APPLE__ */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/ge_448.c b/extra/wolfssl/wolfssl/wolfcrypt/src/ge_448.c
index 7065b9af..5ce8ea75 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/ge_448.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/ge_448.c
@@ -342,9 +342,10 @@ static void ge448_scalarmult(ge448_p2* h, const ge448_p2* p, const byte* a)
* r [in] Point to hold result.
* a [in] Scalar to multiply by.
*/
-void ge448_scalarmult_base(ge448_p2* h, const byte* a)
+int ge448_scalarmult_base(ge448_p2* h, const byte* a)
{
ge448_scalarmult(h, &ed448_base, a);
+ return 0;
}
/* Perform a scalar multplication of the base point and public point.
@@ -10563,12 +10564,28 @@ static void ge448_select(ge448_precomp* r, int pos, byte b)
* r [in] Point to hold result.
* a [in] Scalar to multiply by.
*/
-void ge448_scalarmult_base(ge448_p2* r, const byte* a)
+int ge448_scalarmult_base(ge448_p2* r, const byte* a)
{
byte carry;
- ge448_precomp t;
- int i;
+#ifdef WOLFSSL_SMALL_STACK
+ ge448_precomp *t = NULL;
+ byte *e = NULL;
+#else
+ ge448_precomp t[1];
byte e[113];
+#endif
+ int i;
+
+#ifdef WOLFSSL_SMALL_STACK
+ t = (ge448_precomp *)XMALLOC(sizeof(*t), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (t == NULL)
+ return MEMORY_E;
+ e = (byte *)XMALLOC(113, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (e == NULL) {
+ XFREE(t, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ return MEMORY_E;
+ }
+#endif
carry = 0;
for (i = 0; i < 56; ++i) {
@@ -10586,13 +10603,13 @@ void ge448_scalarmult_base(ge448_p2* r, const byte* a)
/* each e[i] is between -8 and 8 */
/* Odd indeces first - sum based on even index so multiply by 16 */
- ge448_select(&t, 0, e[1]);
- fe448_copy(r->X, t.x);
- fe448_copy(r->Y, t.y);
+ ge448_select(t, 0, e[1]);
+ fe448_copy(r->X, t->x);
+ fe448_copy(r->Y, t->y);
fe448_1(r->Z);
for (i = 3; i < 112; i += 2) {
- ge448_select(&t, i / 2, e[i]);
- ge448_madd(r, r, &t);
+ ge448_select(t, i / 2, e[i]);
+ ge448_madd(r, r, t);
}
ge448_dbl(r, r);
@@ -10602,9 +10619,16 @@ void ge448_scalarmult_base(ge448_p2* r, const byte* a)
/* Add even indeces */
for (i = 0; i <= 112; i += 2) {
- ge448_select(&t, i / 2, e[i]);
- ge448_madd(r, r, &t);
+ ge448_select(t, i / 2, e[i]);
+ ge448_madd(r, r, t);
}
+
+#ifdef WOLFSSL_SMALL_STACK
+ XFREE(t, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(e, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
+ return 0;
}
/* Create to a sliding window for the scalar multiplicaton.
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/hash.c b/extra/wolfssl/wolfssl/wolfcrypt/src/hash.c
index 7f614803..9c7682f2 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/hash.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/hash.c
@@ -552,8 +552,8 @@ int wc_HashGetBlockSize(enum wc_HashType hash_type)
}
/* Generic Hashing Wrapper */
-int wc_Hash(enum wc_HashType hash_type, const byte* data,
- word32 data_len, byte* hash, word32 hash_len)
+int wc_Hash_ex(enum wc_HashType hash_type, const byte* data,
+ word32 data_len, byte* hash, word32 hash_len, void* heap, int devId)
{
int ret = HASH_TYPE_E; /* Default to hash type error */
int dig_size;
@@ -578,39 +578,39 @@ int wc_Hash(enum wc_HashType hash_type, const byte* data,
{
case WC_HASH_TYPE_MD5:
#ifndef NO_MD5
- ret = wc_Md5Hash(data, data_len, hash);
+ ret = wc_Md5Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA:
#ifndef NO_SHA
- ret = wc_ShaHash(data, data_len, hash);
+ ret = wc_ShaHash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA224:
#ifdef WOLFSSL_SHA224
- ret = wc_Sha224Hash(data, data_len, hash);
+ ret = wc_Sha224Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA256:
#ifndef NO_SHA256
- ret = wc_Sha256Hash(data, data_len, hash);
+ ret = wc_Sha256Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA384:
#ifdef WOLFSSL_SHA384
- ret = wc_Sha384Hash(data, data_len, hash);
+ ret = wc_Sha384Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA512:
#ifdef WOLFSSL_SHA512
- ret = wc_Sha512Hash(data, data_len, hash);
+ ret = wc_Sha512Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
#ifndef WOLFSSL_NOSHA512_224
case WC_HASH_TYPE_SHA512_224:
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
#if defined(WOLFSSL_SHA512) && !defined(WOLFSSL_NOSHA512_224)
- ret = wc_Sha512_224Hash(data, data_len, hash);
+ ret = wc_Sha512_224Hash_ex(data, data_len, hash, heap, devId);
#endif
#endif /* !HAVE_FIPS && !HAVE_SELFTEST */
break;
@@ -619,44 +619,45 @@ int wc_Hash(enum wc_HashType hash_type, const byte* data,
case WC_HASH_TYPE_SHA512_256:
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
#if defined(WOLFSSL_SHA512) && !defined(WOLFSSL_NOSHA512_224)
- ret = wc_Sha512_256Hash(data, data_len, hash);
+ ret = wc_Sha512_256Hash_ex(data, data_len, hash, heap, devId);
#endif
#endif /* !HAVE_FIPS && !HAVE_SELFTEST */
break;
#endif
case WC_HASH_TYPE_MD5_SHA:
#if !defined(NO_MD5) && !defined(NO_SHA)
- ret = wc_Md5Hash(data, data_len, hash);
+ ret = wc_Md5Hash_ex(data, data_len, hash, heap, devId);
if (ret == 0) {
- ret = wc_ShaHash(data, data_len, &hash[WC_MD5_DIGEST_SIZE]);
+ ret = wc_ShaHash_ex(data, data_len, &hash[WC_MD5_DIGEST_SIZE],
+ heap, devId);
}
#endif
break;
case WC_HASH_TYPE_SHA3_224:
#if defined(WOLFSSL_SHA3) && !defined(WOLFSSL_NOSHA3_224)
- ret = wc_Sha3_224Hash(data, data_len, hash);
+ ret = wc_Sha3_224Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA3_256:
#if defined(WOLFSSL_SHA3) && !defined(WOLFSSL_NOSHA3_256)
- ret = wc_Sha3_256Hash(data, data_len, hash);
+ ret = wc_Sha3_256Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA3_384:
#if defined(WOLFSSL_SHA3) && !defined(WOLFSSL_NOSHA3_384)
- ret = wc_Sha3_384Hash(data, data_len, hash);
+ ret = wc_Sha3_384Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
case WC_HASH_TYPE_SHA3_512:
#if defined(WOLFSSL_SHA3) && !defined(WOLFSSL_NOSHA3_512)
- ret = wc_Sha3_512Hash(data, data_len, hash);
+ ret = wc_Sha3_512Hash_ex(data, data_len, hash, heap, devId);
#endif
break;
#ifdef WOLFSSL_SM3
case WC_HASH_TYPE_SM3:
- ret = wc_Sm3Hash(data, data_len, hash);
+ ret = wc_Sm3Hash_ex(data, data_len, hash, heap, devId);
break;
#endif
@@ -678,6 +679,12 @@ int wc_Hash(enum wc_HashType hash_type, const byte* data,
}
return ret;
}
+int wc_Hash(enum wc_HashType hash_type, const byte* data,
+ word32 data_len, byte* hash, word32 hash_len)
+{
+ return wc_Hash_ex(hash_type, data, data_len, hash, hash_len,
+ NULL, INVALID_DEVID);
+}
int wc_HashInit_ex(wc_HashAlg* hash, enum wc_HashType type, void* heap,
int devId)
@@ -1279,7 +1286,8 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
#if !defined(WOLFSSL_TI_HASH)
#if !defined(NO_MD5)
- int wc_Md5Hash(const byte* data, word32 len, byte* hash)
+ int wc_Md5Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret;
#ifdef WOLFSSL_SMALL_STACK
@@ -1294,7 +1302,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitMd5(md5)) != 0) {
+ if ((ret = wc_InitMd5_ex(md5, heap, devId)) != 0) {
WOLFSSL_MSG("InitMd5 failed");
}
else {
@@ -1313,10 +1321,22 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Md5Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Md5Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !NO_MD5 */
#if !defined(NO_SHA)
- int wc_ShaHash(const byte* data, word32 len, byte* hash)
+ int wc_ShaHash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1324,7 +1344,6 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
#else
wc_Sha sha[1];
#endif
- int devId = INVALID_DEVID;
#ifdef WOLFSSL_SMALL_STACK
sha = (wc_Sha*)XMALLOC(sizeof(wc_Sha), NULL, DYNAMIC_TYPE_TMP_BUFFER);
@@ -1332,13 +1351,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- #ifdef WOLF_CRYPTO_CB
- /* only use devId if its not an empty hash */
- if (data != NULL && len > 0)
- devId = wc_CryptoCb_GetDevIdAtIndex(0);
- #endif
-
- if ((ret = wc_InitSha_ex(sha, NULL, devId)) != 0) {
+ if ((ret = wc_InitSha_ex(sha, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha failed");
}
else {
@@ -1357,10 +1370,22 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_ShaHash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_ShaHash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !NO_SHA */
#if defined(WOLFSSL_SHA224)
- int wc_Sha224Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha224Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1376,7 +1401,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha224(sha224)) != 0) {
+ if ((ret = wc_InitSha224_ex(sha224, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha224 failed");
}
else {
@@ -1393,12 +1418,24 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
XFREE(sha224, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif
- return ret;
-}
+ return ret;
+ }
+ int wc_Sha224Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha224Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* WOLFSSL_SHA224 */
#if !defined(NO_SHA256)
- int wc_Sha256Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha256Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1406,7 +1443,6 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
#else
wc_Sha256 sha256[1];
#endif
- int devId = INVALID_DEVID;
#ifdef WOLFSSL_SMALL_STACK
sha256 = (wc_Sha256*)XMALLOC(sizeof(wc_Sha256), NULL,
@@ -1415,13 +1451,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- #ifdef WOLF_CRYPTO_CB
- /* only use devId if its not an empty hash */
- if (data != NULL && len > 0)
- devId = wc_CryptoCb_GetDevIdAtIndex(0);
- #endif
-
- if ((ret = wc_InitSha256_ex(sha256, NULL, devId)) != 0) {
+ if ((ret = wc_InitSha256_ex(sha256, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha256 failed");
}
else {
@@ -1441,13 +1471,25 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha256Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha256Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !NO_SHA256 */
#endif /* !defined(WOLFSSL_TI_HASH) */
#if defined(WOLFSSL_SHA512)
- int wc_Sha512Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha512Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1463,7 +1505,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha512(sha512)) != 0) {
+ if ((ret = wc_InitSha512_ex(sha512, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha512 failed");
}
else {
@@ -1482,9 +1524,21 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha512Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha512Hash_ex(data, len, hash, NULL, devId);
+ }
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
#ifndef WOLFSSL_NOSHA512_224
- int wc_Sha512_224Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha512_224Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1500,7 +1554,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha512_224(sha512)) != 0) {
+ if ((ret = wc_InitSha512_224_ex(sha512, heap, devId)) != 0) {
WOLFSSL_MSG("wc_InitSha512_224 failed");
}
else {
@@ -1519,12 +1573,24 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha512_224Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha512_224Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA512_224 */
#endif /* !HAVE_FIPS && !HAVE_SELFTEST */
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
#ifndef WOLFSSL_NOSHA512_256
- int wc_Sha512_256Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha512_256Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1540,7 +1606,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha512_256(sha512)) != 0) {
+ if ((ret = wc_InitSha512_256_ex(sha512, heap, devId)) != 0) {
WOLFSSL_MSG("wc_InitSha512_256 failed");
}
else {
@@ -1559,13 +1625,25 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha512_256Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha512_256Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA512_256 */
#endif /* !HAVE_FIPS && !HAVE_SELFTEST */
#endif /* WOLFSSL_SHA512 */
#if defined(WOLFSSL_SHA384)
- int wc_Sha384Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha384Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1581,7 +1659,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha384(sha384)) != 0) {
+ if ((ret = wc_InitSha384_ex(sha384, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha384 failed");
}
else {
@@ -1600,11 +1678,23 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha384Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha384Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* WOLFSSL_SHA384 */
#if defined(WOLFSSL_SHA3)
#if !defined(WOLFSSL_NOSHA3_224)
- int wc_Sha3_224Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha3_224Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1620,7 +1710,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha3_224(sha3, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitSha3_224(sha3, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha3_224 failed");
}
else {
@@ -1639,10 +1729,22 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha3_224Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha3_224Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA3_224 */
#if !defined(WOLFSSL_NOSHA3_256)
- int wc_Sha3_256Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha3_256Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1658,7 +1760,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha3_256(sha3, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitSha3_256(sha3, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha3_256 failed");
}
else {
@@ -1677,10 +1779,22 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha3_256Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha3_256Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA3_256 */
#if !defined(WOLFSSL_NOSHA3_384)
- int wc_Sha3_384Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha3_384Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1696,7 +1810,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha3_384(sha3, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitSha3_384(sha3, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha3_384 failed");
}
else {
@@ -1715,10 +1829,22 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha3_384Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha3_384Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA3_384 */
#if !defined(WOLFSSL_NOSHA3_512)
- int wc_Sha3_512Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sha3_512Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1734,7 +1860,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSha3_512(sha3, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitSha3_512(sha3, heap, devId)) != 0) {
WOLFSSL_MSG("InitSha3_512 failed");
}
else {
@@ -1753,11 +1879,22 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sha3_512Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sha3_512Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA3_512 */
#ifdef WOLFSSL_SHAKE128
- int wc_Shake128Hash(const byte* data, word32 len, byte* hash,
- word32 hashLen)
+ int wc_Shake128Hash_ex(const byte* data, word32 len, byte* hash,
+ word32 hashLen, void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1773,7 +1910,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitShake128(shake, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitShake128(shake, heap, devId)) != 0) {
WOLFSSL_MSG("InitShake128 failed");
}
else {
@@ -1792,11 +1929,24 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Shake128Hash(const byte* data, word32 len, byte* hash,
+ word32 hashLen)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Shake128Hash_ex(data, len, hash, hashLen,
+ NULL, devId);
+ }
#endif /* WOLFSSL_SHAKE_128 */
#ifdef WOLFSSL_SHAKE256
- int wc_Shake256Hash(const byte* data, word32 len, byte* hash,
- word32 hashLen)
+ int wc_Shake256Hash_ex(const byte* data, word32 len, byte* hash,
+ word32 hashLen, void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1812,7 +1962,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitShake256(shake, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitShake256(shake, heap, devId)) != 0) {
WOLFSSL_MSG("InitShake256 failed");
}
else {
@@ -1831,11 +1981,25 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Shake256Hash(const byte* data, word32 len, byte* hash,
+ word32 hashLen)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Shake256Hash_ex(data, len, hash, hashLen,
+ NULL, devId);
+ }
#endif /* WOLFSSL_SHAKE_256 */
#endif /* WOLFSSL_SHA3 */
#ifdef WOLFSSL_SM3
- int wc_Sm3Hash(const byte* data, word32 len, byte* hash)
+ int wc_Sm3Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -1850,7 +2014,7 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return MEMORY_E;
#endif
- if ((ret = wc_InitSm3(sm3, NULL, INVALID_DEVID)) != 0) {
+ if ((ret = wc_InitSm3(sm3, heap, devId)) != 0) {
WOLFSSL_MSG("InitSm3 failed");
}
else {
@@ -1869,6 +2033,17 @@ int wc_HashGetFlags(wc_HashAlg* hash, enum wc_HashType type, word32* flags)
return ret;
}
+ int wc_Sm3Hash(const byte* data, word32 len, byte* hash)
+ {
+ int devId = INVALID_DEVID;
+ #ifdef WOLF_CRYPTO_CB
+ /* find devId if its not an empty hash */
+ if (data != NULL && len > 0) {
+ devId = wc_CryptoCb_DefaultDevID();
+ }
+ #endif
+ return wc_Sm3Hash_ex(data, len, hash, NULL, devId);
+ }
#endif /* !WOLFSSL_NOSHA3_224 */
#endif /* !NO_HASH_WRAPPER */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/hmac.c b/extra/wolfssl/wolfssl/wolfcrypt/src/hmac.c
index 83e693b2..9a80cb1e 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/hmac.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/hmac.c
@@ -1195,8 +1195,8 @@ int wolfSSL_GetHmacMaxSize(void)
* out The pseudorandom key with the length that of the hash.
* returns 0 on success, otherwise failure.
*/
- int wc_HKDF_Extract(int type, const byte* salt, word32 saltSz,
- const byte* inKey, word32 inKeySz, byte* out)
+ int wc_HKDF_Extract_ex(int type, const byte* salt, word32 saltSz,
+ const byte* inKey, word32 inKeySz, byte* out, void* heap, int devId)
{
byte tmp[WC_MAX_DIGEST_SIZE]; /* localSalt helper */
#ifdef WOLFSSL_SMALL_STACK
@@ -1228,7 +1228,7 @@ int wolfSSL_GetHmacMaxSize(void)
saltSz = hashSz;
}
- ret = wc_HmacInit(myHmac, NULL, INVALID_DEVID);
+ ret = wc_HmacInit(myHmac, heap, devId);
if (ret == 0) {
ret = wc_HmacSetKey(myHmac, type, localSalt, saltSz);
if (ret == 0)
@@ -1244,6 +1244,13 @@ int wolfSSL_GetHmacMaxSize(void)
return ret;
}
+ int wc_HKDF_Extract(int type, const byte* salt, word32 saltSz,
+ const byte* inKey, word32 inKeySz, byte* out)
+ {
+ return wc_HKDF_Extract_ex(type, salt, saltSz, inKey, inKeySz, out, NULL,
+ INVALID_DEVID);
+ }
+
/* HMAC-KDF-Expand.
* RFC 5869 - HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
*
@@ -1255,8 +1262,9 @@ int wolfSSL_GetHmacMaxSize(void)
* out The output keying material.
* returns 0 on success, otherwise failure.
*/
- int wc_HKDF_Expand(int type, const byte* inKey, word32 inKeySz,
- const byte* info, word32 infoSz, byte* out, word32 outSz)
+ int wc_HKDF_Expand_ex(int type, const byte* inKey, word32 inKeySz,
+ const byte* info, word32 infoSz, byte* out, word32 outSz,
+ void* heap, int devId)
{
byte tmp[WC_MAX_DIGEST_SIZE];
#ifdef WOLFSSL_SMALL_STACK
@@ -1289,7 +1297,7 @@ int wolfSSL_GetHmacMaxSize(void)
}
#endif
- ret = wc_HmacInit(myHmac, NULL, INVALID_DEVID);
+ ret = wc_HmacInit(myHmac, heap, devId);
if (ret != 0) {
#ifdef WOLFSSL_SMALL_STACK
XFREE(myHmac, NULL, DYNAMIC_TYPE_HMAC);
@@ -1334,6 +1342,13 @@ int wolfSSL_GetHmacMaxSize(void)
return ret;
}
+ int wc_HKDF_Expand(int type, const byte* inKey, word32 inKeySz,
+ const byte* info, word32 infoSz, byte* out, word32 outSz)
+ {
+ return wc_HKDF_Expand_ex(type, inKey, inKeySz, info, infoSz, out, outSz,
+ NULL, INVALID_DEVID);
+ }
+
/* HMAC-KDF.
* RFC 5869 - HMAC-based Extract-and-Expand Key Derivation Function (HKDF).
*
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/include.am b/extra/wolfssl/wolfssl/wolfcrypt/src/include.am
index 2a501411..0a6fa215 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/include.am
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/include.am
@@ -132,7 +132,8 @@ EXTRA_DIST += wolfcrypt/src/port/ti/ti-aes.c \
wolfcrypt/src/port/Renesas/renesas_rx64_hw_sha.c \
wolfcrypt/src/port/Renesas/renesas_rx64_hw_util.c \
wolfcrypt/src/port/Renesas/README.md \
- wolfcrypt/src/port/cypress/psoc6_crypto.c
+ wolfcrypt/src/port/cypress/psoc6_crypto.c \
+ wolfcrypt/src/port/liboqs/liboqs.c
$(ASYNC_FILES):
$(AM_V_at)touch $(srcdir)/$@
@@ -213,3 +214,6 @@ if BUILD_MAXQ10XX
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/maxim/maxq10xx.c
endif
EXTRA_DIST += wolfcrypt/src/port/maxim/README.md
+
+include wolfcrypt/src/port/autosar/include.am
+
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/integer.c b/extra/wolfssl/wolfssl/wolfcrypt/src/integer.c
index 21ae2353..dadfeb4e 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/integer.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/integer.c
@@ -5358,6 +5358,9 @@ int mp_read_radix (mp_int * a, const char *str, int radix)
++str;
}
+ /* Skip whitespace at end of str */
+ while (CharIsWhiteSpace(*str))
+ ++str;
/* if digit in isn't null term, then invalid character was found */
if (*str != '\0') {
mp_zero (a);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/kdf.c b/extra/wolfssl/wolfssl/wolfcrypt/src/kdf.c
index 4921e5bb..55b7ab0c 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/kdf.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/kdf.c
@@ -353,17 +353,9 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
/* Extract data using HMAC, salt and input.
* RFC 5869 - HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
- *
- * prk The generated pseudorandom key.
- * salt The salt.
- * saltLen The length of the salt.
- * ikm The input keying material.
- * ikmLen The length of the input keying material.
- * digest The type of digest to use.
- * returns 0 on success, otherwise failure.
*/
- int wc_Tls13_HKDF_Extract(byte* prk, const byte* salt, word32 saltLen,
- byte* ikm, word32 ikmLen, int digest)
+ int wc_Tls13_HKDF_Extract_ex(byte* prk, const byte* salt, word32 saltLen,
+ byte* ikm, word32 ikmLen, int digest, void* heap, int devId)
{
int ret;
word32 len = 0;
@@ -410,7 +402,15 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
WOLFSSL_BUFFER(ikm, ikmLen);
#endif
+#if !defined(HAVE_SELFTEST) && (!defined(HAVE_FIPS) || \
+ (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
+ ret = wc_HKDF_Extract_ex(digest, salt, saltLen, ikm, ikmLen, prk, heap,
+ devId);
+#else
ret = wc_HKDF_Extract(digest, salt, saltLen, ikm, ikmLen, prk);
+ (void)heap;
+ (void)devId;
+#endif
#ifdef WOLFSSL_DEBUG_TLS
WOLFSSL_MSG(" PRK");
@@ -420,27 +420,21 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
return ret;
}
+ int wc_Tls13_HKDF_Extract(byte* prk, const byte* salt, word32 saltLen,
+ byte* ikm, word32 ikmLen, int digest)
+ {
+ return wc_Tls13_HKDF_Extract_ex(prk, salt, saltLen, ikm, ikmLen, digest,
+ NULL, INVALID_DEVID);
+ }
+
/* Expand data using HMAC, salt and label and info.
- * TLS v1.3 defines this function.
- *
- * okm The generated pseudorandom key - output key material.
- * okmLen The length of generated pseudorandom key -
- * output key material.
- * prk The salt - pseudo-random key.
- * prkLen The length of the salt - pseudo-random key.
- * protocol The TLS protocol label.
- * protocolLen The length of the TLS protocol label.
- * info The information to expand.
- * infoLen The length of the information.
- * digest The type of digest to use.
- * returns 0 on success, otherwise failure.
- */
- int wc_Tls13_HKDF_Expand_Label(byte* okm, word32 okmLen,
+ * TLS v1.3 defines this function. */
+ int wc_Tls13_HKDF_Expand_Label_ex(byte* okm, word32 okmLen,
const byte* prk, word32 prkLen,
const byte* protocol, word32 protocolLen,
const byte* label, word32 labelLen,
const byte* info, word32 infoLen,
- int digest)
+ int digest, void* heap, int devId)
{
int ret = 0;
word32 idx = 0;
@@ -470,17 +464,23 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
data[idx++] = (byte)okmLen;
/* Length of protocol | label. */
data[idx++] = (byte)(protocolLen + labelLen);
- /* Protocol */
- XMEMCPY(&data[idx], protocol, protocolLen);
- idx += protocolLen;
- /* Label */
- XMEMCPY(&data[idx], label, labelLen);
- idx += labelLen;
+ if (protocolLen > 0) {
+ /* Protocol */
+ XMEMCPY(&data[idx], protocol, protocolLen);
+ idx += protocolLen;
+ }
+ if (labelLen > 0) {
+ /* Label */
+ XMEMCPY(&data[idx], label, labelLen);
+ idx += labelLen;
+ }
/* Length of hash of messages */
data[idx++] = (byte)infoLen;
- /* Hash of messages */
- XMEMCPY(&data[idx], info, infoLen);
- idx += infoLen;
+ if (infoLen > 0) {
+ /* Hash of messages */
+ XMEMCPY(&data[idx], info, infoLen);
+ idx += infoLen;
+ }
#ifdef WOLFSSL_CHECK_MEM_ZERO
wc_MemZero_Add("wc_Tls13_HKDF_Expand_Label data", data, idx);
@@ -494,7 +494,15 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
WOLFSSL_MSG_EX(" Digest %d", digest);
#endif
+#if !defined(HAVE_SELFTEST) && (!defined(HAVE_FIPS) || \
+ (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
+ ret = wc_HKDF_Expand_ex(digest, prk, prkLen, data, idx, okm, okmLen,
+ heap, devId);
+#else
ret = wc_HKDF_Expand(digest, prk, prkLen, data, idx, okm, okmLen);
+ (void)heap;
+ (void)devId;
+#endif
#ifdef WOLFSSL_DEBUG_TLS
WOLFSSL_MSG(" OKM");
@@ -512,27 +520,22 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
return ret;
}
+ int wc_Tls13_HKDF_Expand_Label(byte* okm, word32 okmLen,
+ const byte* prk, word32 prkLen,
+ const byte* protocol, word32 protocolLen,
+ const byte* label, word32 labelLen,
+ const byte* info, word32 infoLen,
+ int digest)
+ {
+ return wc_Tls13_HKDF_Expand_Label_ex(okm, okmLen, prk, prkLen, protocol,
+ protocolLen, label, labelLen, info, infoLen, digest,
+ NULL, INVALID_DEVID);
+ }
+
#if defined(WOLFSSL_TICKET_NONCE_MALLOC) && \
(!defined(HAVE_FIPS) || (defined(FIPS_VERSION_GE) && FIPS_VERSION_GE(5,3)))
/* Expand data using HMAC, salt and label and info.
- * TLS v1.3 defines this function.
- *
- * okm The generated pseudorandom key - output key material.
- * okmLen The length of generated pseudorandom key -
- * output key material.
- * prk The salt - pseudo-random key.
- * prkLen The length of the salt - pseudo-random key.
- * protocol The TLS protocol label.
- * protocolLen The length of the TLS protocol label.
- * info The information to expand.
- * infoLen The length of the information.
- * digest The type of digest to use.
- *
- * This functions is very similar to wc_Tls13_HKDF_Expand_Label() but it
- * allocate memory if the stack space usually used isn't enough.
- *
- * returns 0 on success, otherwise failure.
- */
+ * TLS v1.3 defines this function. */
int wc_Tls13_HKDF_Expand_Label_Alloc(byte* okm, word32 okmLen,
const byte* prk, word32 prkLen, const byte* protocol,
word32 protocolLen, const byte* label, word32 labelLen,
@@ -885,12 +888,12 @@ int wc_SSH_KDF(byte hashId, byte keyId, byte* key, word32 keySz,
* @param [out] block First block to encrypt.
*/
static void wc_srtp_kdf_first_block(const byte* salt, word32 saltSz, int kdrIdx,
- const byte* index, byte indexSz, unsigned char* block)
+ const byte* index, int indexSz, unsigned char* block)
{
- word32 i;
+ int i;
/* XOR salt into zeroized buffer. */
- for (i = 0; i < WC_SRTP_MAX_SALT - saltSz; i++) {
+ for (i = 0; i < WC_SRTP_MAX_SALT - (int)saltSz; i++) {
block[i] = 0;
}
XMEMCPY(block + WC_SRTP_MAX_SALT - saltSz, salt, saltSz);
@@ -939,13 +942,13 @@ static int wc_srtp_kdf_derive_key(byte* block, byte indexSz, byte label,
int i;
int ret = 0;
/* Calculate the number of full blocks needed for derived key. */
- int blocks = keySz / AES_BLOCK_SIZE;
+ int blocks = (int)(keySz / AES_BLOCK_SIZE);
/* XOR in label. */
block[WC_SRTP_MAX_SALT - indexSz - 1] ^= label;
for (i = 0; (ret == 0) && (i < blocks); i++) {
/* Set counter. */
- block[15] = i;
+ block[15] = (byte)i;
/* Encrypt block into key buffer. */
ret = wc_AesEcbEncrypt(aes, key, block, AES_BLOCK_SIZE);
/* Reposition for more derived key. */
@@ -957,7 +960,7 @@ static int wc_srtp_kdf_derive_key(byte* block, byte indexSz, byte label,
if ((ret == 0) && (keySz > 0)) {
byte enc[AES_BLOCK_SIZE];
/* Set counter. */
- block[15] = i;
+ block[15] = (byte)i;
/* Encrypt block into temporary. */
ret = wc_AesEcbEncrypt(aes, enc, block, AES_BLOCK_SIZE);
if (ret == 0) {
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/logging.c b/extra/wolfssl/wolfssl/wolfcrypt/src/logging.c
index afa0c6f0..43c44a1e 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/logging.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/logging.c
@@ -234,7 +234,9 @@ void WOLFSSL_TIME(int count)
#ifdef DEBUG_WOLFSSL
-#if defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
+#if defined(ARDUINO)
+ /* see Arduino wolfssl.h for wolfSSL_Arduino_Serial_Print */
+#elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
/* see wc_port.h for fio.h and nio.h includes */
#elif defined(WOLFSSL_SGX)
/* Declare sprintf for ocall */
@@ -281,9 +283,10 @@ static void wolfssl_log(const int logLevel, const char *const logMessage)
else {
#if defined(WOLFSSL_USER_LOG)
WOLFSSL_USER_LOG(logMessage);
+#elif defined(ARDUINO)
+ wolfSSL_Arduino_Serial_Print(logMessage);
#elif defined(WOLFSSL_LOG_PRINTF)
printf("%s\n", logMessage);
-
#elif defined(THREADX) && !defined(THREADX_NO_DC_PRINTF)
dc_log_printf("%s\n", logMessage);
#elif defined(WOLFSSL_DEOS)
@@ -818,7 +821,7 @@ static struct wc_error_queue* wc_current_node;
static void* wc_error_heap;
/* mutex for list operation protection */
-static wolfSSL_Mutex wc_error_mutex;
+static wolfSSL_Mutex wc_error_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(wc_error_mutex);
#define ERRQ_MUTEX_INIT() wc_InitMutex(&wc_error_mutex)
#define ERRQ_MUTEX_FREE() wc_FreeMutex(&wc_error_mutex)
#define ERRQ_LOCK() wc_LockMutex(&wc_error_mutex)
@@ -827,10 +830,12 @@ static wolfSSL_Mutex wc_error_mutex;
/* Internal function that is called by wolfCrypt_Init() */
int wc_LoggingInit(void)
{
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (ERRQ_MUTEX_INIT() != 0) {
WOLFSSL_MSG("Bad Init Mutex");
return BAD_MUTEX_E;
}
+#endif
wc_errors_count = 0;
wc_errors = NULL;
wc_current_node = NULL;
@@ -845,10 +850,12 @@ int wc_LoggingCleanup(void)
/* clear logging entries */
wc_ClearErrorNodes();
/* free mutex */
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (ERRQ_MUTEX_FREE() != 0) {
WOLFSSL_MSG("Bad Mutex free");
return BAD_MUTEX_E;
}
+#endif
return 0;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/md5.c b/extra/wolfssl/wolfssl/wolfcrypt/src/md5.c
index 1f613026..daab9c9e 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/md5.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/md5.c
@@ -454,6 +454,7 @@ int wc_Md5Final(wc_Md5* md5, byte* hash)
/* ensure we have a valid buffer length; (-1 to append a byte to length) */
if (md5->buffLen > WC_MD5_BLOCK_SIZE - 1) {
+ /* some places consider this BAD_STATE_E */
return BUFFER_E;
}
@@ -461,7 +462,9 @@ int wc_Md5Final(wc_Md5* md5, byte* hash)
/* pad with zeros */
if (md5->buffLen > WC_MD5_PAD_SIZE) {
- XMEMSET(&local[md5->buffLen], 0, WC_MD5_BLOCK_SIZE - md5->buffLen);
+ if (md5->buffLen < WC_MD5_BLOCK_SIZE) {
+ XMEMSET(&local[md5->buffLen], 0, WC_MD5_BLOCK_SIZE - md5->buffLen);
+ }
md5->buffLen += WC_MD5_BLOCK_SIZE - md5->buffLen;
#if defined(BIG_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/memory.c b/extra/wolfssl/wolfssl/wolfcrypt/src/memory.c
index 565d9107..4b068ce9 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/memory.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/memory.c
@@ -120,7 +120,7 @@ int wolfSSL_GetAllocators(wolfSSL_Malloc_cb* mf,
}
#ifdef WOLFSSL_MEM_FAIL_COUNT
-static wolfSSL_Mutex memFailMutex;
+static wolfSSL_Mutex memFailMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(memFailMutex);
int mem_fail_allocs = 0;
int mem_fail_frees = 0;
int mem_fail_cnt = 0;
@@ -128,7 +128,9 @@ int mem_fail_cnt = 0;
void wc_MemFailCount_Init()
{
char* cnt;
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_InitMutex(&memFailMutex);
+#endif
cnt = getenv("MEM_FAIL_CNT");
if (cnt != NULL) {
fprintf(stderr, "MemFailCount At: %d\n", mem_fail_cnt);
@@ -158,7 +160,9 @@ static void wc_MemFailCount_FreeMem(void)
}
void wc_MemFailCount_Free()
{
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_FreeMutex(&memFailMutex);
+#endif
fprintf(stderr, "MemFailCount Total: %d\n", mem_fail_allocs);
fprintf(stderr, "MemFailCount Frees: %d\n", mem_fail_frees);
}
@@ -196,7 +200,7 @@ static MemZero memZero[WOLFSSL_MEM_CHECK_ZERO_CACHE_LEN];
*/
static int nextIdx = -1;
/* Mutex to protect modifying list of addresses to check. */
-static wolfSSL_Mutex zeroMutex;
+static wolfSSL_Mutex zeroMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(zeroMutex);
/* Initialize the table of addresses and the mutex.
*/
@@ -205,7 +209,9 @@ void wc_MemZero_Init()
/* Clear the table to more easily see what is valid. */
XMEMSET(memZero, 0, sizeof(memZero));
/* Initialize mutex. */
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_InitMutex(&zeroMutex);
+#endif
/* Next index is first entry. */
nextIdx = 0;
}
@@ -215,7 +221,9 @@ void wc_MemZero_Init()
void wc_MemZero_Free()
{
/* Free mutex. */
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_FreeMutex(&zeroMutex);
+#endif
/* Make sure we checked all addresses. */
if (nextIdx > 0) {
int i;
@@ -1508,16 +1516,21 @@ THREAD_LS_T const char *wc_svr_last_file = NULL;
THREAD_LS_T int wc_svr_last_line = -1;
THREAD_LS_T int wc_debug_vector_registers_retval =
WC_DEBUG_VECTOR_REGISTERS_RETVAL_INITVAL;
+#endif
#ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING
+#ifdef HAVE_THREAD_LS
+
WOLFSSL_LOCAL int SAVE_VECTOR_REGISTERS2_fuzzer(void) {
static THREAD_LS_T struct drand48_data wc_svr_fuzzing_state;
static THREAD_LS_T int wc_svr_fuzzing_seeded = 0;
long result;
+#ifdef DEBUG_VECTOR_REGISTER_ACCESS
if (wc_debug_vector_registers_retval)
return wc_debug_vector_registers_retval;
+#endif
if (wc_svr_fuzzing_seeded == 0) {
long seed = WC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED;
@@ -1534,10 +1547,48 @@ WOLFSSL_LOCAL int SAVE_VECTOR_REGISTERS2_fuzzer(void) {
return 0;
}
-#endif
+#else /* !HAVE_THREAD_LS */
+
+/* alternate implementation useful for testing in the kernel module build, where
+ * glibc and thread-local storage are unavailable.
+ *
+ * note this is not a well-behaved PRNG, but is adequate for fuzzing purposes.
+ * the prn sequence is incompressible according to ent and xz, and does not
+ * cycle within 10M iterations with various seeds including zero, but the Chi
+ * square distribution is poor, and the unconditioned lsb bit balance is ~54%
+ * regardless of seed.
+ *
+ * deterministic only if access is single-threaded, but never degenerate.
+ */
+
+WOLFSSL_LOCAL int SAVE_VECTOR_REGISTERS2_fuzzer(void) {
+ static unsigned long prn = WC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED;
+ static int balance_bit = 0;
+ unsigned long new_prn = prn ^ 0xba86943da66ee701ul; /* note this magic
+ * random number is
+ * bit-balanced.
+ */
+#ifdef DEBUG_VECTOR_REGISTER_ACCESS
+ if (wc_debug_vector_registers_retval)
+ return wc_debug_vector_registers_retval;
#endif
+ /* barrel-roll using the bottom 6 bits. */
+ if (new_prn & 0x3f)
+ new_prn = (new_prn << (new_prn & 0x3f)) |
+ (new_prn >> (0x40 - (new_prn & 0x3f)));
+ prn = new_prn;
+
+ balance_bit = !balance_bit;
+
+ return ((prn & 1) ^ balance_bit) ? IO_FAILED_E : 0;
+}
+
+#endif /* !HAVE_THREAD_LS */
+
+#endif /* DEBUG_VECTOR_REGISTER_ACCESS_FUZZING */
+
#ifdef WOLFSSL_LINUXKM
#include "../../linuxkm/linuxkm_memory.c"
#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/misc.c b/extra/wolfssl/wolfssl/wolfcrypt/src/misc.c
index 62cd9b40..af5f09ab 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/misc.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/misc.c
@@ -460,10 +460,16 @@ WC_MISC_STATIC WC_INLINE void c16toa(word16 wc_u16, byte* c)
/* convert 32 bit integer to opaque */
WC_MISC_STATIC WC_INLINE void c32toa(word32 wc_u32, byte* c)
{
+#ifdef WOLFSSL_USE_ALIGN
c[0] = (byte)((wc_u32 >> 24) & 0xff);
c[1] = (byte)((wc_u32 >> 16) & 0xff);
c[2] = (byte)((wc_u32 >> 8) & 0xff);
c[3] = (byte)(wc_u32 & 0xff);
+#elif defined(LITTLE_ENDIAN_ORDER)
+ *(word32*)c = ByteReverseWord32(wc_u32);
+#else
+ *(word32*)c = wc_u32;
+#endif
}
#endif
@@ -492,10 +498,16 @@ WC_MISC_STATIC WC_INLINE void ato16(const byte* c, word16* wc_u16)
/* convert opaque to 32 bit integer */
WC_MISC_STATIC WC_INLINE void ato32(const byte* c, word32* wc_u32)
{
+#ifdef WOLFSSL_USE_ALIGN
*wc_u32 = ((word32)c[0] << 24) |
((word32)c[1] << 16) |
((word32)c[2] << 8) |
(word32)c[3];
+#elif defined(LITTLE_ENDIAN_ORDER)
+ *wc_u32 = ByteReverseWord32(*(word32*)c);
+#else
+ *wc_u32 = *(word32*)c;
+#endif
}
/* convert opaque to 32 bit integer. Interpret as little endian. */
@@ -545,6 +557,18 @@ WC_MISC_STATIC WC_INLINE int ByteToHexStr(byte in, char* out)
return 0;
}
+WC_MISC_STATIC WC_INLINE int CharIsWhiteSpace(char ch)
+{
+ switch (ch) {
+ case ' ':
+ case '\t':
+ case '\n':
+ return 1;
+ default:
+ return 0;
+ }
+}
+
#ifndef WOLFSSL_NO_CT_OPS
/* Constant time - mask set when a > b. */
WC_MISC_STATIC WC_INLINE byte ctMaskGT(int a, int b)
@@ -760,7 +784,20 @@ WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a)
a->n = 0;
}
+WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift)
+{
+ a.n >>= shift;
+ return a;
+}
+
+WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift)
+{
+ a.n <<= shift;
+ return a;
+}
+
#else
+
WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n)
{
n->n[1]++;
@@ -899,6 +936,31 @@ WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b)
return 0;
}
+WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift)
+{
+ if (shift < 32) {
+ a.n[1] = (a.n[1] >> shift) || (a.n[0] << (32 - shift));
+ a.n[0] >>= shift;
+ }
+ else {
+ a.n[1] = a.n[0] >> (shift - 32);
+ a.n[0] = 0;
+ }
+ return a;
+}
+WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift)
+{
+ if (shift < 32) {
+ a.n[0] = (a.n[0] << shift) || (a.n[1] >> (32 - shift));
+ a.n[1] <<= shift;
+ }
+ else {
+ a.n[0] = a.n[1] << (shift - 32);
+ a.n[1] = 0;
+ }
+ return a;
+}
+
#endif /* WORD64_AVAILABLE && !WOLFSSL_W64_WRAPPER_TEST */
#endif /* WOLFSSL_W64_WRAPPER */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs12.c b/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs12.c
index 22e64150..123b2e9d 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs12.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs12.c
@@ -1836,7 +1836,7 @@ static int wc_PKCS12_shroud_key(WC_PKCS12* pkcs12, WC_RNG* rng,
/* rewind index and set tag and length */
tmpIdx -= MAX_LENGTH_SZ + 1;
- sz = (word32)SetExplicit(0, (word32)ret, out + tmpIdx);
+ sz = (word32)SetExplicit(0, (word32)ret, out + tmpIdx, 0);
tmpIdx += sz; totalSz += sz;
XMEMMOVE(out + tmpIdx, out + MAX_LENGTH_SZ + 1, (size_t)ret);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs7.c b/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs7.c
index 507d9eee..997fd4f0 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs7.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/pkcs7.c
@@ -88,6 +88,10 @@ struct PKCS7State {
byte* content;
byte* buffer; /* main internal read buffer */
+ wc_HashAlg hashAlg;
+ int hashType;
+ int cntIdfCnt; /* count of in-definite length in content info */
+
/* stack variables to store for when returning */
word32 varOne;
int varTwo;
@@ -105,6 +109,10 @@ struct PKCS7State {
word32 aadSz; /* size of additional AEAD data */
word32 tagSz; /* size of tag for AEAD */
word32 contentSz;
+ word32 currContIdx; /* index of current content */
+ word32 currContSz; /* size of current content */
+ word32 currContRmnSz; /* remaining size of current content */
+ word32 accumContSz; /* size of accumulated content size */
byte tmpIv[MAX_CONTENT_IV_SIZE]; /* store IV if needed */
#ifdef WC_PKCS7_STREAM_DEBUG
word32 peakUsed; /* most bytes used for struct at any one time */
@@ -113,6 +121,9 @@ struct PKCS7State {
byte multi:1; /* flag for if content is in multiple parts */
byte flagOne:1;
byte detached:1; /* flag to indicate detached signature is present */
+ byte noContent:1;/* indicates content isn't included in bundle */
+ byte degenerate:1;
+ byte indefLen:1; /* flag to indicate indef-length encoding used */
};
@@ -187,6 +198,15 @@ static void wc_PKCS7_ResetStream(PKCS7* pkcs7)
pkcs7->stream->varOne = 0;
pkcs7->stream->varTwo = 0;
pkcs7->stream->varThree = 0;
+ pkcs7->stream->noContent = 0;
+ pkcs7->stream->indefLen = 0;
+ pkcs7->stream->cntIdfCnt = 0;
+ pkcs7->stream->currContIdx = 0;
+ pkcs7->stream->currContSz = 0;
+ pkcs7->stream->currContRmnSz= 0;
+ pkcs7->stream->accumContSz = 0;
+ pkcs7->stream->contentSz = 0;
+ pkcs7->stream->hashType = WC_HASH_TYPE_NONE;
}
}
@@ -200,7 +220,6 @@ static void wc_PKCS7_FreeStream(PKCS7* pkcs7)
XFREE(pkcs7->stream->tmpCert, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
pkcs7->stream->content = NULL;
pkcs7->stream->tmpCert = NULL;
-
XFREE(pkcs7->stream, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
pkcs7->stream = NULL;
}
@@ -468,6 +487,7 @@ static const char* wc_PKCS7_GetStateName(int in)
case WC_PKCS7_VERIFY_STAGE4: return "WC_PKCS7_VERIFY_STAGE4";
case WC_PKCS7_VERIFY_STAGE5: return "WC_PKCS7_VERIFY_STAGE5";
case WC_PKCS7_VERIFY_STAGE6: return "WC_PKCS7_VERIFY_STAGE6";
+ case WC_PKCS7_VERIFY_STAGE7: return "WC_PKCS7_VERIFY_STAGE7";
default:
return "Unknown state";
@@ -1487,6 +1507,7 @@ typedef struct ESD {
wc_HashAlg hash;
enum wc_HashType hashType;
byte contentDigest[WC_MAX_DIGEST_SIZE + 2]; /* content only + ASN.1 heading */
+ byte contentDigestSet:1;
byte contentAttribsDigest[WC_MAX_DIGEST_SIZE];
byte encContentDigest[MAX_ENCRYPTED_KEY_SZ];
@@ -1740,27 +1761,10 @@ static int FlattenAttributes(PKCS7* pkcs7, byte* output, EncodedAttrib* ea,
#ifndef NO_RSA
-/* returns size of signature put into out, negative on error */
-static int wc_PKCS7_RsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
+static int wc_PKCS7_ImportRSA(PKCS7* pkcs7, RsaKey* privKey)
{
int ret;
word32 idx;
-#ifdef WOLFSSL_SMALL_STACK
- RsaKey* privKey;
-#else
- RsaKey privKey[1];
-#endif
-
- if (pkcs7 == NULL || pkcs7->rng == NULL || in == NULL || esd == NULL) {
- return BAD_FUNC_ARG;
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- privKey = (RsaKey*)XMALLOC(sizeof(RsaKey), pkcs7->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (privKey == NULL)
- return MEMORY_E;
-#endif
ret = wc_InitRsaKey_ex(privKey, pkcs7->heap, pkcs7->devId);
if (ret == 0) {
@@ -1794,6 +1798,32 @@ static int wc_PKCS7_RsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
}
}
+ return ret;
+}
+
+
+/* returns size of signature put into out, negative on error */
+static int wc_PKCS7_RsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
+{
+ int ret;
+#ifdef WOLFSSL_SMALL_STACK
+ RsaKey* privKey;
+#else
+ RsaKey privKey[1];
+#endif
+
+ if (pkcs7 == NULL || pkcs7->rng == NULL || in == NULL || esd == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ privKey = (RsaKey*)XMALLOC(sizeof(RsaKey), pkcs7->heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (privKey == NULL)
+ return MEMORY_E;
+#endif
+
+ ret = wc_PKCS7_ImportRSA(pkcs7, privKey);
if (ret == 0) {
#ifdef WOLFSSL_ASYNC_CRYPT
do {
@@ -1824,27 +1854,10 @@ static int wc_PKCS7_RsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
#ifdef HAVE_ECC
-/* returns size of signature put into out, negative on error */
-static int wc_PKCS7_EcdsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
+static int wc_PKCS7_ImportECC(PKCS7* pkcs7, ecc_key* privKey)
{
int ret;
- word32 outSz, idx;
-#ifdef WOLFSSL_SMALL_STACK
- ecc_key* privKey;
-#else
- ecc_key privKey[1];
-#endif
-
- if (pkcs7 == NULL || pkcs7->rng == NULL || in == NULL || esd == NULL) {
- return BAD_FUNC_ARG;
- }
-
-#ifdef WOLFSSL_SMALL_STACK
- privKey = (ecc_key*)XMALLOC(sizeof(ecc_key), pkcs7->heap,
- DYNAMIC_TYPE_TMP_BUFFER);
- if (privKey == NULL)
- return MEMORY_E;
-#endif
+ word32 idx;
ret = wc_ecc_init_ex(privKey, pkcs7->heap, pkcs7->devId);
if (ret == 0) {
@@ -1874,6 +1887,33 @@ static int wc_PKCS7_EcdsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
}
}
+ return ret;
+}
+
+
+/* returns size of signature put into out, negative on error */
+static int wc_PKCS7_EcdsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
+{
+ int ret;
+ word32 outSz;
+#ifdef WOLFSSL_SMALL_STACK
+ ecc_key* privKey;
+#else
+ ecc_key privKey[1];
+#endif
+
+ if (pkcs7 == NULL || pkcs7->rng == NULL || in == NULL || esd == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ privKey = (ecc_key*)XMALLOC(sizeof(ecc_key), pkcs7->heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (privKey == NULL)
+ return MEMORY_E;
+#endif
+
+ ret = wc_PKCS7_ImportECC(pkcs7, privKey);
if (ret == 0) {
outSz = sizeof(esd->encContentDigest);
#ifdef WOLFSSL_ASYNC_CRYPT
@@ -1903,6 +1943,67 @@ static int wc_PKCS7_EcdsaSign(PKCS7* pkcs7, byte* in, word32 inSz, ESD* esd)
#endif /* HAVE_ECC */
+/* returns encContentDigestSz based on the signature set to be used */
+static int wc_PKCS7_GetSignSize(PKCS7* pkcs7)
+{
+ int ret = 0;
+
+ switch (pkcs7->publicKeyOID) {
+
+ #ifndef NO_RSA
+ case RSAk:
+ {
+ #ifndef WOLFSSL_SMALL_STACK
+ RsaKey privKey[1];
+ #else
+ RsaKey* privKey;
+ privKey = (RsaKey*)XMALLOC(sizeof(RsaKey), pkcs7->heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (privKey == NULL)
+ return MEMORY_E;
+ #endif
+
+ ret = wc_PKCS7_ImportRSA(pkcs7, privKey);
+ if (ret == 0) {
+ ret = wc_RsaEncryptSize(privKey);
+ }
+ wc_FreeRsaKey(privKey);
+ #ifdef WOLFSSL_SMALL_STACK
+ XFREE(privKey, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ #endif
+ }
+ break;
+ #endif
+
+ #ifdef HAVE_ECC
+ case ECDSAk:
+ {
+ #ifndef WOLFSSL_SMALL_STACK
+ ecc_key privKey[1];
+ #else
+ ecc_key* privKey;
+ privKey = (ecc_key*)XMALLOC(sizeof(ecc_key), pkcs7->heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (privKey == NULL)
+ return MEMORY_E;
+ #endif
+
+ ret = wc_PKCS7_ImportECC(pkcs7, privKey);
+ if (ret == 0) {
+ ret = wc_ecc_sig_size(privKey);
+ }
+ wc_ecc_free(privKey);
+ #ifdef WOLFSSL_SMALL_STACK
+ XFREE(privKey, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ #endif
+ }
+ break;
+ #endif
+ }
+
+ return ret;
+}
+
/* builds up SignedData signed attributes, including default ones.
*
@@ -2345,10 +2446,286 @@ static int wc_PKCS7_SignedDataBuildSignature(PKCS7* pkcs7,
return ret;
}
+#ifndef BER_OCTET_LENGTH
+ #define BER_OCTET_LENGTH 4096
+#endif
+
+/**
+ * This helper function encodes a chunk of content stream and writes it out.
+ *
+ * @param pkcs7 Pointer to a PKCS7 structure.
+ * @param cipherType The type of cipher to use for encryption.
+ * @param aes Optional pointer to an Aes structure for AES encryption.
+ * @param encContentOut Buffer to hold the encrypted content.
+ * @param contentData Buffer holding the content to be encrypted.
+ * @param contentDataSz Size of the content to be encrypted.
+ * @param out Buffer to hold the output data.
+ * @param outIdx Pointer to an index into the output buffer.
+ * @param esd Pointer to an ESD structure for digest calculation.
+ * @return Returns 0 on success, and a negative value on failure.
+ */
+static int wc_PKCS7_EncodeContentStreamHelper(PKCS7* pkcs7, int cipherType,
+ Aes* aes, byte* encContentOut, byte* contentData, int contentDataSz,
+ byte* out, word32* outIdx, ESD* esd)
+{
+ int ret = BAD_FUNC_ARG;
+ byte encContentOutOct[MAX_OCTET_STR_SZ];
+ word32 encContentOutOctSz = 0;
+
+ switch (cipherType) {
+ case WC_CIPHER_NONE:
+ XMEMCPY(encContentOut, contentData, contentDataSz);
+ if (esd && esd->contentDigestSet != 1) {
+ ret = wc_HashUpdate(&esd->hash, esd->hashType,
+ contentData, contentDataSz);
+ }
+ break;
+
+ #ifndef NO_AES
+ case WC_CIPHER_AES_CBC:
+ ret = wc_AesCbcEncrypt(aes, encContentOut,
+ contentData, contentDataSz);
+ break;
+ #endif
+
+ #ifdef WOLFSSL_AESGCM_STREAM
+ case WC_CIPHER_AES_GCM:
+ ret = wc_AesGcmEncryptUpdate(aes, encContentOut,
+ contentData, contentDataSz, NULL, 0);
+ break;
+ #endif
+ }
+
+ #ifdef WOLFSSL_ASYNC_CRYPT
+ /* async encrypt not available here, so block till done */
+ if (ret == WC_PENDING_E && cipherType != WC_CIPHER_NONE) {
+ ret = wc_AsyncWait(ret, &aes->asyncDev, WC_ASYNC_FLAG_NONE);
+ }
+ #endif
+
+ if (ret == 0) {
+ encContentOutOctSz = SetOctetString(contentDataSz, encContentOutOct);
+ wc_PKCS7_WriteOut(pkcs7, (out)? out + *outIdx: NULL,
+ encContentOutOct, encContentOutOctSz);
+ *outIdx += encContentOutOctSz;
+ wc_PKCS7_WriteOut(pkcs7, (out)? out + *outIdx : NULL,
+ encContentOut, contentDataSz);
+ *outIdx += contentDataSz;
+ }
+
+ return ret;
+}
+
+
+/* Used for encoding the content, potentially one octet chunck at a time if
+ * in streaming mode with IO callbacks set.
+ * Can handle the cipher types:
+ * - WC_CIPHER_NONE, used for encoding signed bundle where no encryption is
+ * done.
+ * - WC_CIPHER_AES_CBC
+ * - WC_CIPHER_AES_GCM, requires WOLFSSL_AESGCM_STREAM for streaming
+ * encryption
+ * If ESD is passed in then hash of the conentet is collected as processed.
+ *
+ * Returns 0 on success */
+#ifndef NO_AES
+static int wc_PKCS7_EncodeContentStream(PKCS7* pkcs7, ESD* esd, Aes* aes,
+ byte* in, int inSz, byte* out, int cipherType)
+#else
+static int wc_PKCS7_EncodeContentStream(PKCS7* pkcs7, ESD* esd, void* aes,
+ byte* in, int inSz, byte* out, int cipherType)
+#endif
+{
+ int ret = 0;
+ int devId = pkcs7->devId;
+ void* heap = pkcs7->heap;
+
+ if (pkcs7->encodeStream) {
+ int sz;
+ word32 totalSz = 0;
+ byte* buf;
+ byte* encContentOut;
+ byte* contentData;
+ word32 idx = 0, outIdx = 0;
+ int padSz = 0;
+
+ if (cipherType != WC_CIPHER_NONE) {
+ padSz = wc_PKCS7_GetPadSize(pkcs7->contentSz,
+ wc_PKCS7_GetOIDBlockSize(pkcs7->encryptOID));
+ }
+
+ if (cipherType == WC_CIPHER_NONE && esd && esd->contentDigestSet != 1) {
+ /* calculate hash for content */
+ ret = wc_HashInit(&esd->hash, esd->hashType);
+ if (ret != 0) {
+ return ret;
+ }
+ }
+
+ encContentOut = (byte *)XMALLOC(BER_OCTET_LENGTH + MAX_OCTET_STR_SZ,
+ heap, DYNAMIC_TYPE_PKCS7);
+ contentData = (byte *)XMALLOC(BER_OCTET_LENGTH + padSz,
+ heap, DYNAMIC_TYPE_PKCS7);
+
+ if (encContentOut == NULL || contentData == NULL) {
+ XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
+ WOLFSSL_MSG("Memory allocation failed for content data");
+ return MEMORY_E;
+ }
+
+ /* keep pulling from content until empty */
+ do {
+ int contentDataRead = 0;
+
+ #ifdef ASN_BER_TO_DER
+ if (pkcs7->getContentCb) {
+ contentDataRead = pkcs7->getContentCb(pkcs7,
+ &buf, pkcs7->streamCtx);
+
+ if (buf == NULL) {
+ WOLFSSL_MSG("Get content callback returned null "
+ "buffer pointer");
+ XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
+ return BAD_FUNC_ARG;
+ }
+ }
+ else
+ #endif
+ {
+ int szLeft = BER_OCTET_LENGTH;
+
+ if (in == NULL) {
+ XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
+ return BAD_FUNC_ARG;
+ }
+
+ if (szLeft + totalSz > (word32)inSz)
+ szLeft = inSz - totalSz;
+
+ contentDataRead = szLeft;
+ buf = in + totalSz;
+ }
+
+ if (contentDataRead <= 0) {
+ /* no more data returned from callback */
+ break;
+ }
+ totalSz += (word32)contentDataRead;
+
+ /* check and handle octet boundary */
+ sz = contentDataRead;
+ if (idx + sz > BER_OCTET_LENGTH) {
+ sz = BER_OCTET_LENGTH - idx;
+ contentDataRead -= sz;
+
+ XMEMCPY(contentData + idx, buf, sz);
+ ret = wc_PKCS7_EncodeContentStreamHelper(pkcs7, cipherType,
+ aes, encContentOut, contentData, BER_OCTET_LENGTH, out,
+ &outIdx, esd);
+ if (ret != 0) {
+ XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
+ return ret;
+ }
+
+ /* copy over any remaining data */
+ XMEMCPY(contentData, buf + sz, contentDataRead);
+ idx = contentDataRead;
+ }
+ else {
+ /* was not on an octet boundary, copy full
+ * amount over */
+ XMEMCPY(contentData + idx, buf, sz);
+ idx += sz;
+ }
+ } while (totalSz < pkcs7->contentSz);
+
+ /* add in padding to the end */
+ if ((cipherType != WC_CIPHER_NONE) && (totalSz == pkcs7->contentSz)) {
+ int i;
+
+ if (BER_OCTET_LENGTH < idx) {
+ XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
+ return BAD_FUNC_ARG;
+ }
+
+ for (i = 0; i < padSz; i++) {
+ contentData[idx + i] = (byte)padSz;
+ }
+ idx += padSz;
+ }
+
+ /* encrypt and flush out remainder of content data */
+ ret = wc_PKCS7_EncodeContentStreamHelper(pkcs7, cipherType, aes,
+ encContentOut, contentData, idx, out, &outIdx, esd);
+ if (ret == 0) {
+ if (cipherType == WC_CIPHER_NONE && esd &&
+ esd->contentDigestSet != 1) {
+ ret = wc_HashFinal(&esd->hash, esd->hashType,
+ esd->contentDigest + 2);
+ wc_HashFree(&esd->hash, esd->hashType);
+ }
+ }
+
+ XFREE(encContentOut, heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(contentData, heap, DYNAMIC_TYPE_PKCS7);
+ }
+ else {
+ if (in == NULL || out == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+ switch (cipherType) {
+ case WC_CIPHER_NONE:
+ if (!pkcs7->detached) {
+ XMEMCPY(out, in, inSz);
+ }
+ if (esd && esd->contentDigestSet != 1) {
+ ret = wc_HashInit(&esd->hash, esd->hashType);
+ if (ret == 0)
+ ret = wc_HashUpdate(&esd->hash, esd->hashType, in,
+ inSz);
+ if (ret == 0)
+ ret = wc_HashFinal(&esd->hash, esd->hashType,
+ esd->contentDigest + 2);
+ wc_HashFree(&esd->hash, esd->hashType);
+ }
+ break;
+
+ #ifndef NO_AES
+ case WC_CIPHER_AES_CBC:
+ ret = wc_AesCbcEncrypt(aes, out, in, inSz);
+ break;
+ #endif
+
+ #ifdef WOLFSSL_AESGCM_STREAM
+ case WC_CIPHER_AES_GCM:
+ ret = wc_AesGcmEncryptUpdate(aes, out, in, inSz, NULL, 0);
+ break;
+ #endif
+ }
+ #ifdef WOLFSSL_ASYNC_CRYPT
+ /* async encrypt not available here, so block till done */
+ if (cipherType != WC_CIPHER_NONE) {
+ ret = wc_AsyncWait(ret, &aes->asyncDev, WC_ASYNC_FLAG_NONE);
+ }
+ #endif
+ }
+
+ (void)devId;
+ (void)heap;
+
+ return ret;
+}
+
/* build PKCS#7 signedData content type */
/* To get the output size then set output = 0 and *outputSz = 0 */
-static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
+static int PKCS7_EncodeSigned(PKCS7* pkcs7,
const byte* hashBuf, word32 hashSz, byte* output, word32* outputSz,
byte* output2, word32* output2Sz)
{
@@ -2379,6 +2756,14 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
word32 flatSignedAttribsSz = 0;
#ifdef WOLFSSL_SMALL_STACK
+ ESD* esd = NULL;
+#else
+ ESD esd[1];
+#endif
+#ifdef ASN_BER_TO_DER
+ word32 streamSz = 0;
+#endif
+#ifdef WOLFSSL_SMALL_STACK
byte *signedDataOid = NULL;
#else
byte signedDataOid[MAX_OID_SZ];
@@ -2388,8 +2773,21 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
byte signingTime[MAX_TIME_STRING_SZ];
if (pkcs7 == NULL || pkcs7->hashOID == 0 ||
- outputSz == NULL || hashSz == 0 ||
- hashBuf == NULL) {
+ outputSz == NULL) {
+ WOLFSSL_MSG("PKCS7 struct / outputSz null, or hashOID is 0");
+ return BAD_FUNC_ARG;
+ }
+
+ if (hashSz == 0 && hashBuf != NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+ /* signature size varies with ECDSA, with a varying sign size the content
+ * hash must be known in order to create the surrounding ASN1 syntax
+ * properly before writing out the content and generating the hash on the
+ * fly and then creating the signature */
+ if (hashBuf == NULL && pkcs7->publicKeyOID == ECDSAk) {
+ WOLFSSL_MSG("Pre-calculated content hash is needed in this case");
return BAD_FUNC_ARG;
}
@@ -2444,16 +2842,24 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
if (pkcs7->sidType != DEGENERATE_SID) {
esd->hashType = wc_OidGetHash(pkcs7->hashOID);
- if (wc_HashGetDigestSize(esd->hashType) != (int)hashSz) {
+ if (hashBuf != NULL &&
+ wc_HashGetDigestSize(esd->hashType) != (int)hashSz) {
WOLFSSL_MSG("hashSz did not match hashOID");
idx = BUFFER_E;
goto out;
}
- /* include hash */
+ /* include hash if provided, otherwise create hash when processing
+ * content data */
esd->contentDigest[0] = ASN_OCTET_STRING;
- esd->contentDigest[1] = (byte)hashSz;
- XMEMCPY(&esd->contentDigest[2], hashBuf, hashSz);
+ if (hashBuf != NULL) {
+ esd->contentDigestSet = 1;
+ esd->contentDigest[1] = (byte)hashSz;
+ XMEMCPY(&esd->contentDigest[2], hashBuf, hashSz);
+ }
+ else {
+ esd->contentDigest[1] = (byte)wc_HashGetDigestSize(esd->hashType);
+ }
}
if (pkcs7->detached == 1) {
@@ -2462,13 +2868,17 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
esd->innerContSeqSz = 0;
esd->contentInfoSeqSz = SetSequence(pkcs7->contentTypeSz,
esd->contentInfoSeq);
- } else {
- esd->innerOctetsSz = SetOctetString(pkcs7->contentSz, esd->innerOctets);
+ }
+ else {
+ esd->innerOctetsSz = SetOctetStringEx(pkcs7->contentSz, esd->innerOctets,
+ pkcs7->encodeStream);
esd->innerContSeqSz = SetExplicit(0, esd->innerOctetsSz +
- pkcs7->contentSz, esd->innerContSeq);
- esd->contentInfoSeqSz = SetSequence(pkcs7->contentSz +
+ pkcs7->contentSz, esd->innerContSeq,
+ pkcs7->encodeStream);
+ esd->contentInfoSeqSz = SetSequenceEx(pkcs7->contentSz +
esd->innerOctetsSz + pkcs7->contentTypeSz +
- esd->innerContSeqSz, esd->contentInfoSeq);
+ esd->innerContSeqSz, esd->contentInfoSeq,
+ pkcs7->encodeStream);
}
/* SignerIdentifier */
@@ -2495,7 +2905,7 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
/* SubjectKeyIdentifier */
esd->issuerSKIDSz = SetOctetString(keyIdSize, esd->issuerSKID);
esd->issuerSKIDSeqSz = SetExplicit(0, esd->issuerSKIDSz + keyIdSize,
- esd->issuerSKIDSeq);
+ esd->issuerSKIDSeq, 0);
signerInfoSz += (esd->issuerSKIDSz + esd->issuerSKIDSeqSz + keyIdSize);
/* version MUST be 3 */
@@ -2550,14 +2960,18 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
FlattenAttributes(pkcs7, flatSignedAttribs,
esd->signedAttribs, esd->signedAttribsCount);
esd->signedAttribSetSz = SetImplicit(ASN_SET, 0, esd->signedAttribsSz,
- esd->signedAttribSet);
+ esd->signedAttribSet, 0);
} else {
esd->signedAttribSetSz = 0;
}
- /* Calculate the final hash and encrypt it. */
- ret = wc_PKCS7_SignedDataBuildSignature(pkcs7, flatSignedAttribs,
- flatSignedAttribsSz, esd);
+ if (pkcs7->publicKeyOID != ECDSAk && hashBuf == NULL) {
+ ret = esd->encContentDigestSz = wc_PKCS7_GetSignSize(pkcs7);
+ }
+ else {
+ ret = wc_PKCS7_SignedDataBuildSignature(pkcs7, flatSignedAttribs,
+ flatSignedAttribsSz, esd);
+ }
if (ret < 0) {
idx = ret;
goto out;
@@ -2577,15 +2991,17 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
/* certificates [0] IMPLICIT CertificateSet */
/* get total certificates size */
- certPtr = pkcs7->certList;
- while (certPtr != NULL) {
- certSetSz += certPtr->derSz;
- certPtr = certPtr->next;
+ if (pkcs7->noCerts != 1) {
+ certPtr = pkcs7->certList;
+ while (certPtr != NULL) {
+ certSetSz += certPtr->derSz;
+ certPtr = certPtr->next;
+ }
}
certPtr = NULL;
if (certSetSz > 0)
- esd->certsSetSz = SetImplicit(ASN_SET, 0, certSetSz, esd->certsSet);
+ esd->certsSetSz = SetImplicit(ASN_SET, 0, certSetSz, esd->certsSet, 0);
if (pkcs7->sidType != DEGENERATE_SID) {
esd->singleDigAlgoIdSz = SetAlgoID(pkcs7->hashOID, esd->singleDigAlgoId,
@@ -2603,19 +3019,48 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
totalSz = esd->versionSz + esd->singleDigAlgoIdSz + esd->digAlgoIdSetSz +
esd->contentInfoSeqSz + pkcs7->contentTypeSz +
- esd->innerContSeqSz + esd->innerOctetsSz + pkcs7->contentSz;
+ esd->innerContSeqSz + esd->innerOctetsSz;
+
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ word32 tmpIdx = 0;
+ totalSz += (3 * ASN_INDEF_END_SZ) ; /* 00's for BER with inner content */
+
+ StreamOctetString(pkcs7->content, pkcs7->contentSz, NULL, &streamSz,
+ &tmpIdx);
+ totalSz += streamSz + (3 * ASN_INDEF_END_SZ);
+ }
+ else
+#endif
+ {
+ totalSz += pkcs7->contentSz;
+ }
total2Sz = esd->certsSetSz + certSetSz + signerInfoSz;
if (pkcs7->detached) {
totalSz -= pkcs7->contentSz;
}
- esd->innerSeqSz = SetSequence(totalSz + total2Sz, esd->innerSeq);
+ esd->innerSeqSz = SetSequenceEx(totalSz + total2Sz, esd->innerSeq,
+ pkcs7->encodeStream);
totalSz += esd->innerSeqSz;
- esd->outerContentSz = SetExplicit(0, totalSz + total2Sz, esd->outerContent);
+ if (pkcs7->encodeStream) {
+ totalSz += ASN_INDEF_END_SZ;
+ }
+
+ esd->outerContentSz = SetExplicit(0, totalSz + total2Sz,
+ esd->outerContent, pkcs7->encodeStream);
totalSz += esd->outerContentSz + signedDataOidSz;
- esd->outerSeqSz = SetSequence(totalSz + total2Sz, esd->outerSeq);
+ if (pkcs7->encodeStream) {
+ totalSz += ASN_INDEF_END_SZ;
+ }
+
+ esd->outerSeqSz = SetSequenceEx(totalSz + total2Sz, esd->outerSeq,
+ pkcs7->encodeStream);
totalSz += esd->outerSeqSz;
+ if (pkcs7->encodeStream) {
+ totalSz += ASN_INDEF_END_SZ;
+ }
/* if using header/footer, we are not returning the content */
if (output2 && output2Sz) {
@@ -2639,7 +3084,11 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
totalSz += total2Sz;
}
- if (totalSz > *outputSz) {
+ if (totalSz > *outputSz
+ #ifdef ASN_BER_TO_DER
+ && pkcs7->streamOutCb == NULL
+ #endif
+ ) {
if (*outputSz == 0) {
#ifdef HAVE_ECC
if (pkcs7->publicKeyOID == ECDSAk) {
@@ -2654,33 +3103,48 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
goto out;
}
+#ifdef ASN_BER_TO_DER
+ if (output == NULL && pkcs7->streamOutCb == NULL) {
+#else
if (output == NULL) {
+#endif
idx = BUFFER_E;
goto out;
}
idx = 0;
- XMEMCPY(output + idx, esd->outerSeq, esd->outerSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->outerSeq, esd->outerSeqSz);
idx += esd->outerSeqSz;
- XMEMCPY(output + idx, signedDataOid, signedDataOidSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ signedDataOid, signedDataOidSz);
idx += signedDataOidSz;
- XMEMCPY(output + idx, esd->outerContent, esd->outerContentSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->outerContent, esd->outerContentSz);
idx += esd->outerContentSz;
- XMEMCPY(output + idx, esd->innerSeq, esd->innerSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->innerSeq, esd->innerSeqSz);
idx += esd->innerSeqSz;
- XMEMCPY(output + idx, esd->version, esd->versionSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->version, esd->versionSz);
idx += esd->versionSz;
- XMEMCPY(output + idx, esd->digAlgoIdSet, esd->digAlgoIdSetSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->digAlgoIdSet, esd->digAlgoIdSetSz);
idx += esd->digAlgoIdSetSz;
- XMEMCPY(output + idx, esd->singleDigAlgoId, esd->singleDigAlgoIdSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->singleDigAlgoId, esd->singleDigAlgoIdSz);
idx += esd->singleDigAlgoIdSz;
- XMEMCPY(output + idx, esd->contentInfoSeq, esd->contentInfoSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->contentInfoSeq, esd->contentInfoSeqSz);
idx += esd->contentInfoSeqSz;
- XMEMCPY(output + idx, pkcs7->contentType, pkcs7->contentTypeSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ pkcs7->contentType, pkcs7->contentTypeSz);
idx += pkcs7->contentTypeSz;
- XMEMCPY(output + idx, esd->innerContSeq, esd->innerContSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->innerContSeq, esd->innerContSeqSz);
idx += esd->innerContSeqSz;
- XMEMCPY(output + idx, esd->innerOctets, esd->innerOctetsSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ esd->innerOctets, esd->innerOctetsSz);
idx += esd->innerOctetsSz;
/* support returning header and footer without content */
@@ -2689,48 +3153,97 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
idx = 0;
}
else {
- if (!pkcs7->detached && pkcs7->content != NULL && pkcs7->contentSz > 0) {
- XMEMCPY(output + idx, pkcs7->content, pkcs7->contentSz);
- idx += pkcs7->contentSz;
+ if (
+ #ifdef ASN_BER_TO_DER
+ (pkcs7->content != NULL || pkcs7->getContentCb != NULL)
+ #else
+ pkcs7->content != NULL
+ #endif
+ && pkcs7->contentSz > 0) {
+ wc_PKCS7_EncodeContentStream(pkcs7, esd, NULL, pkcs7->content,
+ pkcs7->contentSz, (output)? output + idx : NULL, WC_CIPHER_NONE);
+ if (!pkcs7->detached) {
+ #ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ byte indefEnd[ASN_INDEF_END_SZ * 3];
+ word32 localIdx = 0;
+
+ idx += streamSz;
+
+ /* end of content octet string */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of inner content seq */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of inner content info seq */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ indefEnd, localIdx);
+ idx += localIdx;
+ }
+ else
+ #endif
+ {
+ idx += pkcs7->contentSz;
+ }
+ }
}
output2 = output;
}
/* certificates */
- XMEMCPY(output2 + idx, esd->certsSet, esd->certsSetSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->certsSet, esd->certsSetSz);
idx += esd->certsSetSz;
- certPtr = pkcs7->certList;
- while (certPtr != NULL) {
- XMEMCPY(output2 + idx, certPtr->der, certPtr->derSz);
- idx += certPtr->derSz;
- certPtr = certPtr->next;
+
+ if (pkcs7->noCerts != 1) {
+ certPtr = pkcs7->certList;
+ while (certPtr != NULL) {
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ certPtr->der, certPtr->derSz);
+ idx += certPtr->derSz;
+ certPtr = certPtr->next;
+ }
}
+
wc_PKCS7_FreeCertSet(pkcs7);
- XMEMCPY(output2 + idx, esd->signerInfoSet, esd->signerInfoSetSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->signerInfoSet, esd->signerInfoSetSz);
idx += esd->signerInfoSetSz;
- XMEMCPY(output2 + idx, esd->signerInfoSeq, esd->signerInfoSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->signerInfoSeq, esd->signerInfoSeqSz);
idx += esd->signerInfoSeqSz;
- XMEMCPY(output2 + idx, esd->signerVersion, esd->signerVersionSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->signerVersion, esd->signerVersionSz);
idx += esd->signerVersionSz;
/* SignerIdentifier */
if (pkcs7->sidType == CMS_ISSUER_AND_SERIAL_NUMBER) {
/* IssuerAndSerialNumber */
- XMEMCPY(output2 + idx, esd->issuerSnSeq, esd->issuerSnSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->issuerSnSeq, esd->issuerSnSeqSz);
idx += esd->issuerSnSeqSz;
- XMEMCPY(output2 + idx, esd->issuerName, esd->issuerNameSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->issuerName, esd->issuerNameSz);
idx += esd->issuerNameSz;
- XMEMCPY(output2 + idx, pkcs7->issuer, pkcs7->issuerSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ pkcs7->issuer, pkcs7->issuerSz);
idx += pkcs7->issuerSz;
- XMEMCPY(output2 + idx, esd->issuerSn, esd->issuerSnSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->issuerSn, esd->issuerSnSz);
idx += esd->issuerSnSz;
} else if (pkcs7->sidType == CMS_SKID) {
/* SubjectKeyIdentifier */
- XMEMCPY(output2 + idx, esd->issuerSKIDSeq, esd->issuerSKIDSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->issuerSKIDSeq, esd->issuerSKIDSeqSz);
idx += esd->issuerSKIDSeqSz;
- XMEMCPY(output2 + idx, esd->issuerSKID, esd->issuerSKIDSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->issuerSKID, esd->issuerSKIDSz);
idx += esd->issuerSKIDSz;
- XMEMCPY(output2 + idx, pkcs7->issuerSubjKeyId, keyIdSize);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ pkcs7->issuerSubjKeyId, keyIdSize);
idx += keyIdSize;
} else if (pkcs7->sidType == DEGENERATE_SID) {
/* no signer infos in degenerate case */
@@ -2738,24 +3251,95 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
idx = SKID_E;
goto out;
}
- XMEMCPY(output2 + idx, esd->signerDigAlgoId, esd->signerDigAlgoIdSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->signerDigAlgoId, esd->signerDigAlgoIdSz);
idx += esd->signerDigAlgoIdSz;
/* SignerInfo:Attributes */
if (flatSignedAttribsSz > 0) {
- XMEMCPY(output2 + idx, esd->signedAttribSet, esd->signedAttribSetSz);
+ /* if the original hash buffer passed in was null then recreate the
+ * signature */
+ if (hashBuf == NULL && pkcs7->sidType != DEGENERATE_SID) {
+ /* recreate flat attribs after the content hash is known if needed
+ * build up signed attributes, include contentType, signingTime, and
+ messageDigest by default */
+ esd->signedAttribsCount = 0;
+ esd->signedAttribsSz = 0;
+ ret = wc_PKCS7_BuildSignedAttributes(pkcs7, esd, pkcs7->contentType,
+ pkcs7->contentTypeSz,
+ contentTypeOid, sizeof(contentTypeOid),
+ messageDigestOid, sizeof(messageDigestOid),
+ signingTimeOid, sizeof(signingTimeOid),
+ signingTime, sizeof(signingTime));
+ if (ret < 0) {
+ idx = ret;
+ goto out;
+ }
+
+ if (esd->signedAttribsSz > 0) {
+ if (flatSignedAttribs == NULL) {
+ idx = MEMORY_E;
+ goto out;
+ }
+
+ flatSignedAttribsSz = esd->signedAttribsSz;
+ FlattenAttributes(pkcs7, flatSignedAttribs,
+ esd->signedAttribs, esd->signedAttribsCount);
+ } else {
+ esd->signedAttribSetSz = 0;
+ }
+ }
+
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->signedAttribSet, esd->signedAttribSetSz);
idx += esd->signedAttribSetSz;
- XMEMCPY(output2 + idx, flatSignedAttribs, flatSignedAttribsSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ flatSignedAttribs, flatSignedAttribsSz);
idx += flatSignedAttribsSz;
}
- XMEMCPY(output2 + idx, esd->digEncAlgoId, esd->digEncAlgoIdSz);
+ if (hashBuf == NULL && pkcs7->sidType != DEGENERATE_SID) {
+ /* Calculate the final hash and encrypt it. */
+ WOLFSSL_MSG("Recreating signature with new hash");
+ ret = wc_PKCS7_SignedDataBuildSignature(pkcs7, flatSignedAttribs,
+ flatSignedAttribsSz, esd);
+ if (ret < 0) {
+ idx = ret;
+ goto out;
+ }
+ }
+
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->digEncAlgoId, esd->digEncAlgoIdSz);
idx += esd->digEncAlgoIdSz;
- XMEMCPY(output2 + idx, esd->signerDigest, esd->signerDigestSz);
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->signerDigest, esd->signerDigestSz);
idx += esd->signerDigestSz;
- XMEMCPY(output2 + idx, esd->encContentDigest, esd->encContentDigestSz);
+
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ esd->encContentDigest, esd->encContentDigestSz);
idx += esd->encContentDigestSz;
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ byte indefEnd[ASN_INDEF_END_SZ * 3];
+ word32 localIdx = 0;
+
+ /* end of signedData seq */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of outer content set */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of outer content info seq */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ wc_PKCS7_WriteOut(pkcs7, (output2)? (output2 + idx) : NULL,
+ indefEnd, localIdx);
+ idx += localIdx;
+ }
+#endif
+
if (output2Sz) {
*output2Sz = idx;
idx = 0; /* success */
@@ -2792,32 +3376,25 @@ int wc_PKCS7_EncodeSignedData_ex(PKCS7* pkcs7, const byte* hashBuf,
word32* outputFootSz)
{
int ret;
-#ifdef WOLFSSL_SMALL_STACK
- ESD* esd;
-#else
- ESD esd[1];
-#endif
/* other args checked in wc_PKCS7_EncodeSigned_ex */
- if (pkcs7 == NULL || outputFoot == NULL || outputFootSz == NULL) {
+ if (pkcs7 == NULL) {
return BAD_FUNC_ARG;
}
-#ifdef WOLFSSL_SMALL_STACK
- esd = (ESD*)XMALLOC(sizeof(ESD), pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
- if (esd == NULL)
- return MEMORY_E;
+#ifndef ASN_BER_TO_DER
+ if (outputFoot == NULL || outputFootSz == NULL)
+#else
+ if (pkcs7->getContentCb == NULL &&
+ (outputFoot == NULL || outputFootSz == NULL))
#endif
+ {
+ return BAD_FUNC_ARG;
+ }
- XMEMSET(esd, 0, sizeof(ESD));
-
- ret = PKCS7_EncodeSigned(pkcs7, esd, hashBuf, hashSz,
+ ret = PKCS7_EncodeSigned(pkcs7, hashBuf, hashSz,
outputHead, outputHeadSz, outputFoot, outputFootSz);
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(esd, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
return ret;
}
@@ -2904,55 +3481,50 @@ int wc_PKCS7_SetDefaultSignedAttribs(PKCS7* pkcs7, word16 flag)
int wc_PKCS7_EncodeSignedData(PKCS7* pkcs7, byte* output, word32 outputSz)
{
int ret;
- int hashSz;
- enum wc_HashType hashType;
- byte hashBuf[WC_MAX_DIGEST_SIZE];
-#ifdef WOLFSSL_SMALL_STACK
- ESD* esd;
-#else
- ESD esd[1];
-#endif
/* other args checked in wc_PKCS7_EncodeSigned_ex */
- if (pkcs7 == NULL || (pkcs7->contentSz > 0 && pkcs7->content == NULL)) {
+ if (pkcs7 == NULL || (pkcs7->contentSz > 0 &&
+ #ifdef ASN_BER_TO_DER
+ (pkcs7->content == NULL && pkcs7->getContentCb == NULL))
+ #else
+ pkcs7->content == NULL)
+ #endif
+ ) {
return BAD_FUNC_ARG;
}
- /* get hash type and size, validate hashOID */
- hashType = wc_OidGetHash(pkcs7->hashOID);
- hashSz = wc_HashGetDigestSize(hashType);
- if (hashSz < 0)
- return hashSz;
-
-#ifdef WOLFSSL_SMALL_STACK
- esd = (ESD*)XMALLOC(sizeof(ESD), pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
- if (esd == NULL)
- return MEMORY_E;
-#endif
+ /* pre-calculate hash for ECC signatures */
+ if (pkcs7->publicKeyOID == ECDSAk) {
+ int hashSz;
+ enum wc_HashType hashType;
+ byte hashBuf[WC_MAX_DIGEST_SIZE];
+ wc_HashAlg hash;
- XMEMSET(esd, 0, sizeof(ESD));
- esd->hashType = hashType;
+ /* get hash type and size, validate hashOID */
+ hashType = wc_OidGetHash(pkcs7->hashOID);
+ hashSz = wc_HashGetDigestSize(hashType);
+ if (hashSz < 0)
+ return hashSz;
- /* calculate hash for content */
- ret = wc_HashInit(&esd->hash, esd->hashType);
- if (ret == 0) {
- ret = wc_HashUpdate(&esd->hash, esd->hashType,
+ /* calculate hash for content */
+ ret = wc_HashInit(&hash, hashType);
+ if (ret == 0) {
+ ret = wc_HashUpdate(&hash, hashType,
pkcs7->content, pkcs7->contentSz);
+ if (ret == 0) {
+ ret = wc_HashFinal(&hash, hashType, hashBuf);
+ }
+ wc_HashFree(&hash, hashType);
+ }
if (ret == 0) {
- ret = wc_HashFinal(&esd->hash, esd->hashType, hashBuf);
+ ret = PKCS7_EncodeSigned(pkcs7, hashBuf, hashSz,
+ output, &outputSz, NULL, NULL);
}
- wc_HashFree(&esd->hash, esd->hashType);
}
-
- if (ret == 0) {
- ret = PKCS7_EncodeSigned(pkcs7, esd, hashBuf, hashSz,
- output, &outputSz, NULL, NULL);
+ else {
+ ret = PKCS7_EncodeSigned(pkcs7, NULL, 0, output, &outputSz,
+ NULL, NULL);
}
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(esd, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
-#endif
-
return ret;
}
@@ -4280,8 +4852,8 @@ static int wc_PKCS7_ParseSignerInfo(PKCS7* pkcs7, byte* in, word32 inSz,
word32* idxIn, int degenerate, byte** signedAttrib, int* signedAttribSz)
{
int ret = 0;
- int length;
- int version;
+ int length = 0;
+ int version = 0;
word32 sigOID = 0, hashOID = 0;
word32 idx = *idxIn, localIdx;
byte tag;
@@ -4439,7 +5011,245 @@ static int wc_PKCS7_ParseSignerInfo(PKCS7* pkcs7, byte* in, word32 inSz,
return ret;
}
+/* parse input to get single/multiple octet strings.
+ * get each octet string from stream up to the size defined by
+ * MAX_PKCS7_STREAM_BUFFER then hash and store them to the content buffer.
+ * hash is stored to pkcs7->stream->hashBuf and its size in
+ * pkcs7->stream->hashBufSz if keepContent is true, accumulates content into
+ * pkcs7->stream->content and stores its size in pkcs7->stream->contentSz.
+ */
+#ifndef NO_PKCS7_STREAM
+static int wc_PKCS7_HandleOctetStrings(PKCS7* pkcs7, byte* in, word32 inSz,
+ word32* tmpIdx, word32* idx, int keepContent)
+{
+ int ret, length;
+ word32 msgSz, i, contBufSz;
+ byte tag;
+ byte* msg = NULL;
+ byte* tempBuf = NULL;
+
+ /* allow 0 for inSz in streaming */
+ if (inSz == 0) {
+ return WC_PKCS7_WANT_READ_E;
+ }
+
+ if (pkcs7 == NULL || in == NULL || idx == NULL)
+ return BAD_FUNC_ARG;
+
+ /* no content case, do nothing */
+ if (pkcs7->stream->noContent) {
+ if (pkcs7->content && pkcs7->contentSz > 0) {
+ if (pkcs7->stream->content != NULL) {
+ XFREE(pkcs7->stream->content, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ pkcs7->stream->content = NULL;
+ }
+
+ pkcs7->stream->content = (byte*)XMALLOC(pkcs7->contentSz,
+ pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ if (pkcs7->stream->content == NULL) {
+ WOLFSSL_MSG("Failed to grow content buffer.");
+ return MEMORY_E;
+ }
+ XMEMCPY(pkcs7->stream->content, pkcs7->content, pkcs7->contentSz);
+ pkcs7->stream->contentSz = pkcs7->contentSz;
+ }
+ return 0;
+ }
+ /* free pkcs7->contentDynamic buffer */
+ if (pkcs7->contentDynamic != NULL) {
+ XFREE(pkcs7->contentDynamic, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ pkcs7->contentDynamic = NULL;
+ }
+
+ while(1) {
+ if ((ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz,
+ pkcs7->stream->expected, &msg, idx)) != 0) {
+ break;
+ }
+
+ msgSz = (pkcs7->stream->length > 0)? pkcs7->stream->length:inSz;
+
+ if (pkcs7->stream->currContRmnSz == 0) {
+
+ /* processed single OCTET STRING, try to find another one. */
+ if ((ret = GetASNTag(msg, idx, &tag, msgSz)) < 0) {
+ break;
+ }
+
+ /* if another OCTET STRING is found, get its length */
+ if (ret == 0 && tag == ASN_OCTET_STRING) {
+
+ if (ret == 0 && GetLength_ex(msg, idx, &length, msgSz,
+ NO_USER_CHECK) < 0){
+ ret = ASN_PARSE_E;
+ break;
+ }
+
+ /* set up for next octet string */
+ pkcs7->stream->currContSz = length;
+ pkcs7->stream->currContRmnSz = length;
+ pkcs7->stream->expected = min(pkcs7->stream->currContRmnSz,
+ MAX_PKCS7_STREAM_BUFFER);
+
+ /* advance read index */
+ if (wc_PKCS7_StreamEndCase(pkcs7, tmpIdx, idx) != 0) {
+ break;
+ }
+
+ /* check if expected data is available in stream */
+ ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz,
+ pkcs7->stream->expected, &msg, idx);
+ if (ret == WC_PKCS7_WANT_READ_E) {
+ break; /* ask user more input */
+ }
+
+ /* data available, continue processing */
+ continue;
+ }
+ /* reached to the end of contents. trailing zeros may follow. */
+ else if (ret == 0 && tag == ASN_EOC) {
+
+ /* ASN_EOC tag and one zero follows to show the end of
+ * in-definite length encoding.
+ * number of indef is stored in pkcs7->stream->cntIdfCnt.
+ */
+ pkcs7->stream->expected = (ASN_TAG_SZ + TRAILING_ZERO) *
+ pkcs7->stream->cntIdfCnt;
+
+ /* dec idx by one since already consumed to get ASN_EOC */
+ (*idx)--;
+
+ if (wc_PKCS7_StreamEndCase(pkcs7, tmpIdx, idx) != 0) {
+ break;
+ }
+
+ /* check if expected data is available in stream */
+ ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz,
+ pkcs7->stream->expected, &msg, idx);
+ if (ret == WC_PKCS7_WANT_READ_E) {
+ break; /* ask user more input */
+ }
+
+ /* data available, continue processing trailing zeros */
+ for (i = 0; i < pkcs7->stream->expected; i++) {
+ if (msg[*idx + i] != 0) {
+ ret = ASN_PARSE_E;
+ break;
+ }
+ }
+ /* reset indef-length count */
+ pkcs7->stream->cntIdfCnt = 0;
+
+ /* advance read index */
+ *idx += pkcs7->stream->expected;
+
+ if (wc_PKCS7_StreamEndCase(pkcs7, tmpIdx, idx) != 0) {
+ break;
+ }
+
+ /* handled OCTET STRINGs successfully */
+ ret = 0;
+ break;
+ }
+ /* reached to the end of contents without trailing zeros */
+ else if (ret == 0) {
+
+ /* dec idx by one since already consumed to get ASN_EOC */
+ (*idx)--;
+
+ if (wc_PKCS7_StreamEndCase(pkcs7, tmpIdx, idx) != 0) {
+ break;
+ }
+
+ ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz,
+ pkcs7->stream->expected, &msg, idx);
+ if (ret == WC_PKCS7_WANT_READ_E) {
+ break;
+ }
+
+ /* handled OCTET STRINGs successfully */
+ ret = 0;
+ break;
+ }
+ else {
+ break;
+ }
+ }
+ else {
+ /* got partial octet string data */
+ /* accumulate partial octet string to buffer */
+ if (keepContent) {
+
+ /* store current content buffer temporarily */
+ tempBuf = pkcs7->stream->content;
+ pkcs7->stream->content = NULL;
+
+ /* grow content buffer */
+ contBufSz = pkcs7->stream->accumContSz;
+ pkcs7->stream->accumContSz += pkcs7->stream->expected;
+
+ pkcs7->stream->content =
+ (byte*)XMALLOC(pkcs7->stream->accumContSz,
+ pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+
+ if (pkcs7->stream->content == NULL) {
+ WOLFSSL_MSG("failed to grow content buffer.");
+ if (tempBuf != NULL) {
+ XFREE(tempBuf, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ tempBuf = NULL;
+ }
+ ret = MEMORY_E;
+ break;
+ }
+ else {
+ /* accumulate content */
+ if (tempBuf != NULL && contBufSz != 0) {
+ XMEMCPY(pkcs7->stream->content, tempBuf, contBufSz);
+ }
+ XMEMCPY(pkcs7->stream->content + contBufSz, msg + *idx,
+ pkcs7->stream->expected);
+ if (tempBuf != NULL) {
+ XFREE(tempBuf, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ tempBuf = NULL;
+ }
+ }
+ }
+
+ *idx += pkcs7->stream->expected;
+ pkcs7->stream->currContRmnSz -= pkcs7->stream->expected;
+ pkcs7->stream->contentSz += pkcs7->stream->expected;
+
+ if (wc_PKCS7_StreamEndCase(pkcs7, tmpIdx, idx) != 0) {
+ break;
+ }
+
+ if (pkcs7->stream->currContRmnSz > 0) {
+ pkcs7->stream->expected = min(pkcs7->stream->currContRmnSz,
+ MAX_PKCS7_STREAM_BUFFER);
+ }
+ else {
+ /* Processed current OCTET STRING. Proceed to the next one. */
+ pkcs7->stream->currContRmnSz = 0;
+ pkcs7->stream->currContSz = 0;
+ pkcs7->stream->expected= ASN_TAG_SZ + MAX_LENGTH_SZ;
+
+ if (pkcs7->stream->maxLen > 0 &&
+ (pkcs7->stream->maxLen - pkcs7->stream->totalRd)
+ < ASN_TAG_SZ + MAX_LENGTH_SZ) {
+ /* seems reached to end of content */
+ ret = 0;
+ break;
+ }
+ }
+
+ /* data available */
+ continue;
+ }
+ }
+ return ret;
+}
+#endif /* !NO_PKCS7_STREAM */
/* Finds the certificates in the message and saves it. By default allows
* degenerate cases which can have no signer.
*
@@ -4463,6 +5273,7 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
int encapContentInfoLen = 0;
int contentSz = 0, sigSz = 0, certSz = 0, signedAttribSz = 0;
word32 localIdx, start;
+ word32 certIdx, certIdx2;
byte degenerate = 0;
byte detached = 0;
byte tag = 0;
@@ -4477,11 +5288,14 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
word32 pkiMsgSz = inSz;
#ifndef NO_PKCS7_STREAM
word32 stateIdx = 0;
+ word32 hashOID = 0;
+ enum wc_HashType hashType = WC_HASH_TYPE_NONE;
+ byte* src = NULL;
+ word32 srcSz;
#endif
-
byte* pkiMsg2 = in2;
word32 pkiMsg2Sz = in2Sz;
-
+ (void)keepContent;
if (pkcs7 == NULL)
return BAD_FUNC_ARG;
@@ -4524,11 +5338,19 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
break;
}
- if ((ret = wc_PKCS7_SetMaxStream(pkcs7, in, inSz)) != 0) {
+ pkiMsgSz = (pkcs7->stream->length > 0)? pkcs7->stream->length: inSz;
+
+ /* get content info size */
+ localIdx = 0;
+ if (GetSequence_ex(pkiMsg, &localIdx, &length, pkiMsgSz,
+ NO_USER_CHECK) < 0) {
break;
}
- pkiMsgSz = (pkcs7->stream->length > 0)? pkcs7->stream->length:
- inSz;
+ if (ret == 0 && length > 0)
+ pkcs7->stream->maxLen = length + localIdx;
+ else
+ pkcs7->stream->maxLen = inSz;
+
#endif
/* determine total message size */
@@ -4543,13 +5365,16 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
ret = ASN_PARSE_E;
if (ret == 0 && length == 0 && pkiMsg[idx-1] == ASN_INDEF_LENGTH) {
+
+ #if defined(NO_PKCS7_STREAM)
#ifdef ASN_BER_TO_DER
word32 len = 0;
ret = wc_BerToDer(pkiMsg, pkiMsgSz, NULL, &len);
if (ret != LENGTH_ONLY_E)
return ret;
- pkcs7->der = (byte*)XMALLOC(len, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ pkcs7->der = (byte*)XMALLOC(len, pkcs7->heap,
+ DYNAMIC_TYPE_PKCS7);
if (pkcs7->der == NULL)
return MEMORY_E;
ret = wc_BerToDer(pkiMsg, pkiMsgSz, pkcs7->der, &len);
@@ -4588,6 +5413,11 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
#else
ret = BER_INDEF_E;
#endif
+ #else
+ /* the bundle has indefinite length encoding */
+ pkcs7->stream->indefLen = 1;
+
+ #endif /* NO_PKCS7_STREAM */
}
/* Get the contentInfo contentType */
@@ -4633,9 +5463,47 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (ret == 0 && GetSet(pkiMsg, &idx, &length, pkiMsgSz) < 0)
ret = ASN_PARSE_E;
+ localIdx = idx;
+
+ #ifndef NO_PKCS7_STREAM
+ /* initialize hashType*/
+ pkcs7->stream->hashType = WC_HASH_TYPE_NONE;
+
+ /* Get the first DigestAlgorithmIdentifier from the SET */
+ if (ret == 0 && length > 0) {
+ if (GetAlgoId(pkiMsg, &idx, &hashOID, oidHashType, pkiMsgSz)
+ < 0)
+ ret = ASN_PARSE_E;
+
+ pkcs7->hashOID = hashOID;
+ /* get hash type */
+ hashType = wc_OidGetHash(pkcs7->hashOID);
+
+ if (hashType == WC_HASH_TYPE_NONE) {
+ WOLFSSL_MSG("Error getting hash type for PKCS7 content"
+ " verification");
+ ret = ASN_PARSE_E;
+ }
+ if (wc_HashGetDigestSize(hashType) < 0) {
+ WOLFSSL_MSG("Error getting digest size");
+ ret = ASN_PARSE_E;
+ }
+ /* store hashType for later hashing */
+ pkcs7->stream->hashType = hashType;
+
+ /* restore idx */
+ idx = localIdx;
+
+ WOLFSSL_MSG("DigestAlgorithmIdentifier found in bundle");
+ }
+ #endif /* !NO_PKCS7_STREAM */
+
/* Skip the set. */
idx += length;
degenerate = (length == 0) ? 1 : 0;
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->degenerate = degenerate;
+ #endif /* !NO_PKCS7_STREAM */
if (pkcs7->noDegenerate == 1 && degenerate == 1) {
ret = PKCS7_NO_SIGNER_E;
}
@@ -4651,18 +5519,24 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
pkcs7->stream->maxLen += pkiMsg2Sz + pkcs7->contentSz;
}
wc_PKCS7_StreamStoreVar(pkcs7, totalSz, 0, 0);
+
#endif
wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE2);
+
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->expected = MAX_SEQ_SZ + MAX_OID_SZ + ASN_TAG_SZ +
+ MAX_LENGTH_SZ + ASN_TAG_SZ + MAX_LENGTH_SZ;
+ #endif /* !NO_PKCS7_STREAM */
FALL_THROUGH;
case WC_PKCS7_VERIFY_STAGE2:
#ifndef NO_PKCS7_STREAM
if ((ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz + in2Sz,
- MAX_SEQ_SZ + MAX_OID_SZ + ASN_TAG_SZ + MAX_LENGTH_SZ
- + ASN_TAG_SZ + MAX_LENGTH_SZ, &pkiMsg, &idx)) != 0) {
+ pkcs7->stream->expected, &pkiMsg, &idx)) != 0) {
break;
}
+ degenerate = pkcs7->stream->degenerate;
wc_PKCS7_StreamGetVar(pkcs7, &totalSz, 0, 0);
if (pkcs7->stream->length > 0)
@@ -4687,6 +5561,10 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (encapContentInfoLen == 0 &&
pkiMsg[idx-1] == ASN_INDEF_LENGTH) {
isIndef = 1;
+ #ifndef NO_PKCS7_STREAM
+ /* count up indef-length count */
+ pkcs7->stream->cntIdfCnt++;
+ #endif
}
if (GetASNObjectId(pkiMsg, &idx, &length, pkiMsgSz) == 0) {
contentType = pkiMsg + tmpIdx;
@@ -4703,6 +5581,9 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
}
else if (pkiMsg[idx] == ASN_EOC && pkiMsg[idx+1] == 0) {
idx += 2; /* skip EOF + zero byte */
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->cntIdfCnt--;
+ #endif
}
}
}
@@ -4723,6 +5604,9 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if ((encapContentInfoLen != 0) &&
(encapContentInfoLen - contentTypeSz == 0)) {
ret = ASN_PARSE_E;
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->noContent = 1;
+ #endif
}
/* PKCS#7 spec:
@@ -4740,13 +5624,26 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
* OCTET_STRING will be next. If so, we use the length retrieved
* there. PKCS#7 spec defines ANY as eContent type. In this case
* we fall back and save this content length for use later */
- if (ret == 0 && GetLength_ex(pkiMsg, &localIdx, &length, pkiMsgSz,
+ if (ret == 0 && pkiMsg[localIdx] != ASN_INDEF_LENGTH) {
+ if (GetLength_ex(pkiMsg, &localIdx, &length, pkiMsgSz,
NO_USER_CHECK) <= 0) {
- ret = ASN_PARSE_E;
- }
+ ret = ASN_PARSE_E;
+ }
- if (localIdx >= pkiMsgSz) {
- ret = BUFFER_E;
+ if (localIdx >= pkiMsgSz) {
+ ret = BUFFER_E;
+ }
+ }
+ else if (ret == 0 && pkiMsg[localIdx] == ASN_INDEF_LENGTH) {
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->cntIdfCnt++; /* count up indef-length count */
+ #endif
+ length = 0;
+ localIdx++;
+ }
+ else {
+ length = 0;
+ localIdx++;
}
/* Save idx to back up in case of PKCS#7 eContent */
@@ -4781,7 +5678,11 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (GetLength_ex(pkiMsg, &localIdx, &contentLen, pkiMsgSz,
NO_USER_CHECK) < 0)
ret = ASN_PARSE_E;
-
+ #ifndef NO_PKCS7_STREAM
+ if (ret == 0 && pkiMsg[localIdx - 1] == ASN_INDEF_LENGTH) {
+ pkcs7->stream->cntIdfCnt++; /* indef-length count */
+ }
+ #endif
/* Check whether there is one OCTET_STRING inside. */
start = localIdx;
if (localIdx >= pkiMsgSz) {
@@ -4804,6 +5705,12 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (localIdx - start + length == (word32)contentLen) {
multiPart = 0;
} else {
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->multi = multiPart;
+ pkcs7->stream->currContIdx = localIdx;
+ pkcs7->stream->currContSz = length;
+ pkcs7->stream->currContRmnSz = length;
+ #endif
/* reset length to outer OCTET_STRING for bundle
* size check below */
length = contentLen;
@@ -4825,6 +5732,14 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (ret == 0 && GetLength_ex(pkiMsg, &localIdx,
&length, pkiMsgSz, NO_USER_CHECK) < 0)
ret = ASN_PARSE_E;
+ #ifndef NO_PKCS7_STREAM
+ if (ret == 0) {
+ pkcs7->stream->multi = multiPart;
+ pkcs7->stream->currContIdx = localIdx;
+ pkcs7->stream->currContSz = length;
+ pkcs7->stream->currContRmnSz = length;
+ }
+ #endif
}
}
@@ -4833,16 +5748,10 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
/* support using header and footer without content */
if (pkiMsg2 && pkiMsg2Sz > 0 && hashBuf && hashSz > 0) {
localIdx = 0;
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream->noContent = 1;
+ #endif
- } else if (pkiMsg2 == NULL && hashBuf == NULL) {
- /* header/footer not separate, check content length is
- * not larger than total bundle size */
- if ((localIdx + length) > pkiMsgSz) {
- WOLFSSL_MSG("Content length detected is larger than "
- "total bundle size");
- ret = BUFFER_E;
- break;
- }
}
idx = localIdx;
}
@@ -4890,18 +5799,23 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
pkcs7->stream->nonceSz = contentTypeSz;
XMEMCPY(pkcs7->stream->nonce, contentType, contentTypeSz);
}
+ if (ret < 0)
+ break;
- /* content expected? */
- if ((ret == 0 && length > 0) &&
- !(pkiMsg2 && pkiMsg2Sz > 0 && hashBuf && hashSz > 0)) {
- pkcs7->stream->expected = length + ASN_TAG_SZ + MAX_LENGTH_SZ;
+ if (pkcs7->stream->noContent) {
+ pkcs7->stream->expected = 0;
}
else {
- pkcs7->stream->expected = ASN_TAG_SZ + MAX_LENGTH_SZ;
- }
-
- if (pkcs7->stream->expected > (pkcs7->stream->maxLen - idx)) {
- pkcs7->stream->expected = pkcs7->stream->maxLen - idx;
+ if (multiPart) {
+ idx = pkcs7->stream->currContIdx;
+ }
+ if (in2Sz > 0 && hashSz > 0) {
+ /* seems no content included */
+ pkcs7->stream->expected = + ASN_TAG_SZ + MAX_LENGTH_SZ;
+ }
+ else {
+ pkcs7->stream->expected = pkcs7->stream->currContSz;
+ }
}
if ((ret = wc_PKCS7_StreamEndCase(pkcs7, &stateIdx, &idx)) != 0) {
@@ -4909,39 +5823,59 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
}
wc_PKCS7_StreamStoreVar(pkcs7, pkiMsg2Sz, localIdx, length);
- /* content length is in multiple parts */
- if (multiPart) {
- pkcs7->stream->expected = contentLen + ASN_TAG_SZ;
- }
- pkcs7->stream->multi = (byte)multiPart;
- #endif
+ #endif /* !NO_PKCS7_STREAM */
+
wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE3);
+
+ #ifndef NO_PKCS7_STREAM
+ /* free pkcs7->stream->content buffer */
+ if (pkcs7->stream->content != NULL) {
+ XFREE(pkcs7->stream->content, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ pkcs7->stream->content = NULL;
+ }
+ #endif /* !NO_PKCS7_STREAM */
+
FALL_THROUGH;
case WC_PKCS7_VERIFY_STAGE3:
+ keepContent = !(pkiMsg2 && pkiMsg2Sz > 0 && hashBuf && hashSz > 0);
#ifndef NO_PKCS7_STREAM
- if ((ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz + in2Sz,
- pkcs7->stream->expected, &pkiMsg, &idx)) != 0) {
+ ret = wc_PKCS7_HandleOctetStrings(pkcs7, in, inSz,
+ &stateIdx, &idx, keepContent);
+ if (ret != 0)
break;
+
+ /* copy content to pkcs7->contentDynamic */
+ if (keepContent && pkcs7->stream->content &&
+ pkcs7->stream->contentSz >0) {
+ pkcs7->contentDynamic = (byte*)XMALLOC(pkcs7->stream->contentSz,
+ pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ if (pkcs7->contentDynamic == NULL) {
+ ret = MEMORY_E;
+ break;
+ }
+ XMEMCPY(pkcs7->contentDynamic, pkcs7->stream->content,
+ pkcs7->stream->contentSz);
+
+ pkcs7->contentSz = pkcs7->stream->contentSz;
+ pkcs7->content = pkcs7->contentDynamic;
}
- #ifdef ASN_BER_TO_DER
- if (pkcs7->derSz != 0)
- pkiMsgSz = pkcs7->derSz;
- else
- #endif
- pkiMsgSz = (pkcs7->stream->length > 0)? pkcs7->stream->length:
- inSz;
- wc_PKCS7_StreamGetVar(pkcs7, &pkiMsg2Sz, (int*)&localIdx, &length);
- if (pkcs7->stream->length > 0) {
- localIdx = 0;
+ /* check if bundle has more elements or footer, if not, set content
+ * to pkcs7->content and hash to pkcs7->hash.
+ */
+ if (ret == 0 && pkcs7->stream->maxLen > 0 &&
+ (pkcs7->stream->maxLen - pkcs7->stream->totalRd)
+ < ASN_TAG_SZ + MAX_LENGTH_SZ) {
+
+ ret = 0;
+ break;
}
- multiPart = pkcs7->stream->multi;
- detached = pkcs7->stream->detached;
- maxIdx = idx + pkcs7->stream->expected;
- #endif
+ /* expect data length to be enough to check set and seq of certs */
+ pkcs7->stream->expected = (ASN_TAG_SZ + MAX_LENGTH_SZ) * 2;
+ #else
/* Break out before content because it can be optional in degenerate
* cases. */
if (ret != 0 && !degenerate)
@@ -4950,12 +5884,13 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
/* get parts of content */
if (ret == 0 && multiPart) {
int i = 0;
- keepContent = !(pkiMsg2 && pkiMsg2Sz > 0 && hashBuf && hashSz > 0);
+ keepContent = !(pkiMsg2 && pkiMsg2Sz > 0 && hashBuf &&
+ hashSz > 0);
if (keepContent) {
/* Create a buffer to hold content of OCTET_STRINGs. */
- pkcs7->contentDynamic = (byte*)XMALLOC(contentLen, pkcs7->heap,
- DYNAMIC_TYPE_PKCS7);
+ pkcs7->contentDynamic = (byte*)XMALLOC(contentLen,
+ pkcs7->heap, DYNAMIC_TYPE_PKCS7);
if (pkcs7->contentDynamic == NULL)
ret = MEMORY_E;
}
@@ -4968,15 +5903,16 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (ret == 0 && tag != ASN_OCTET_STRING)
ret = ASN_PARSE_E;
- if (ret == 0 && GetLength(pkiMsg, &localIdx, &length, totalSz) < 0)
+ if (ret == 0 && GetLength(pkiMsg, &localIdx, &length,
+ totalSz) < 0)
ret = ASN_PARSE_E;
if (ret == 0 && length + localIdx > start + contentLen)
ret = ASN_PARSE_E;
if (ret == 0) {
if (keepContent) {
- XMEMCPY(pkcs7->contentDynamic + i, pkiMsg + localIdx,
- length);
+ XMEMCPY(pkcs7->contentDynamic + i,
+ pkiMsg + localIdx, length);
}
i += length;
localIdx += length;
@@ -4996,7 +5932,8 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
content = NULL;
localIdx = 0;
if (contentSz != (int)pkcs7->contentSz) {
- WOLFSSL_MSG("Data signed does not match contentSz provided");
+ WOLFSSL_MSG("Data signed does not match contentSz"
+ " provided");
ret = BUFFER_E;
}
}
@@ -5019,26 +5956,16 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
pkiMsg2 = pkiMsg;
pkiMsg2Sz = pkiMsgSz;
- #ifndef NO_PKCS7_STREAM
- pkiMsg2Sz = pkcs7->stream->maxLen;
- pkcs7->stream->varOne = pkiMsg2Sz;
- pkcs7->stream->flagOne = 1;
- #endif
}
}
else {
pkiMsg2 = pkiMsg;
pkiMsg2Sz = pkiMsgSz;
- #ifndef NO_PKCS7_STREAM
- pkiMsg2Sz = pkcs7->stream->maxLen;
- pkcs7->stream->varOne = pkiMsg2Sz;
- pkcs7->stream->flagOne = 1;
- #endif
}
- /* If getting the content info failed with non degenerate then return the
- * error case. Otherwise with a degenerate it is ok if the content
- * info was omitted */
+ /* If getting the content info failed with non degenerate then
+ * return the error case. Otherwise with a degenerate it is ok
+ * if the content info was omitted */
if (!degenerate && !detached && (ret != 0)) {
break;
}
@@ -5052,23 +5979,48 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
content = pkcs7->content;
contentSz = pkcs7->contentSz;
}
+ #endif /* !NO_PKCS7_STREAM */
+ wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE4);
+
+ FALL_THROUGH;
+ case WC_PKCS7_VERIFY_STAGE4:
#ifndef NO_PKCS7_STREAM
- if (content != NULL) {
- XFREE(pkcs7->stream->content, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- pkcs7->stream->content = (byte*)XMALLOC(contentSz, pkcs7->heap,
- DYNAMIC_TYPE_PKCS7);
- if (pkcs7->stream->content == NULL) {
- ret = MEMORY_E;
- break;
- }
- else {
- XMEMCPY(pkcs7->stream->content, content, contentSz);
- pkcs7->stream->contentSz = contentSz;
- }
+ if (in2 && in2Sz > 0) {
+ src = in2;
+ srcSz = in2Sz;
+ pkiMsg2 = in2;
+ }
+ else {
+ src = in;
+ srcSz = inSz;
+ pkiMsg2 = in;
+ }
+ if ((ret = wc_PKCS7_AddDataToStream(pkcs7, src, srcSz,
+ pkcs7->stream->expected, &pkiMsg2, &idx)) != 0) {
+ break;
+ }
+
+ #ifdef ASN_BER_TO_DER
+ if (pkcs7->derSz != 0)
+ pkiMsg2Sz = pkcs7->derSz;
+ else
+ #endif
+ pkiMsg2Sz = (pkcs7->stream->length > 0)? pkcs7->stream->length:
+ srcSz;
+
+ if (pkcs7->stream->length > 0) {
+ localIdx = 0;
}
+
+ maxIdx = idx + pkcs7->stream->expected;
#endif /* !NO_PKCS7_STREAM */
+ if (pkiMsg2 == NULL || pkiMsg2Sz == 0) {
+ pkiMsg2Sz = pkiMsgSz;
+ pkiMsg2 = pkiMsg;
+ }
+
/* Certificates begin "footer" section (ie pkiMsg2) if being used */
/* Get the implicit[0] set of certificates */
if (ret == 0 && idx >= pkiMsg2Sz)
@@ -5076,12 +6028,44 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
length = 0; /* set length to 0 to check if reading in any certs */
localIdx = idx;
+
if (ret == 0 && GetASNTag(pkiMsg2, &localIdx, &tag, pkiMsg2Sz) == 0
&& tag == (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0)) {
idx++;
- if (GetLength_ex(pkiMsg2, &idx, &length, maxIdx, NO_USER_CHECK)
- < 0)
+
+ /* if certificates set has indefinite length, try to get
+ * the first certificate length of the set.
+ */
+ if (ret == 0 && pkiMsg2[localIdx] == ASN_INDEF_LENGTH) {
+
+ localIdx++;
+ certIdx = localIdx;
+ #ifndef NO_PKCS7_STREAM
+ /* set indef-length count. used for skipping trailing zeros */
+ pkcs7->stream->cntIdfCnt = 1;
+ #endif
+ ret = GetASNTag(pkiMsg2, &localIdx, &tag, pkiMsg2Sz);
+ if (ret == 0 && tag == (ASN_CONSTRUCTED | ASN_SEQUENCE)) {
+ if (GetLength_ex(pkiMsg2, &localIdx, &length, maxIdx,
+ NO_USER_CHECK) < 0)
ret = ASN_PARSE_E;
+
+ WOLFSSL_MSG("certificate set found");
+
+ /* adjust cert length */
+ length += localIdx - certIdx;
+ idx = certIdx;
+ }
+ }
+ /* in case certificates set has definite length */
+ else {
+
+ if (GetLength_ex(pkiMsg2, &localIdx, &length, maxIdx,
+ NO_USER_CHECK) < 0)
+ ret = ASN_PARSE_E;
+
+ idx = localIdx;
+ }
}
if (ret != 0) {
@@ -5102,26 +6086,36 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
else {
pkcs7->stream->expected = MAX_SEQ_SZ;
if (pkcs7->stream->expected > (pkcs7->stream->maxLen -
- pkcs7->stream->totalRd) + pkcs7->stream->length) {
+ pkcs7->stream->totalRd) + pkcs7->stream->length) {
pkcs7->stream->expected = (pkcs7->stream->maxLen -
pkcs7->stream->totalRd) + pkcs7->stream->length;
}
}
#endif
- wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE4);
+ wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE5);
FALL_THROUGH;
- case WC_PKCS7_VERIFY_STAGE4:
+ case WC_PKCS7_VERIFY_STAGE5:
#ifndef NO_PKCS7_STREAM
- if ((ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz + in2Sz,
- pkcs7->stream->expected, &pkiMsg, &idx)) != 0) {
+ if (in2 && in2Sz > 0) {
+ src = in2;
+ srcSz = in2Sz;
+ pkiMsg2 = in2;
+ }
+ else {
+ src = in;
+ srcSz = inSz;
+ pkiMsg2 = in;
+ }
+
+ if ((ret = wc_PKCS7_AddDataToStream(pkcs7, src, srcSz,
+ pkcs7->stream->expected, &pkiMsg2, &idx)) != 0) {
break;
}
+ pkiMsg2Sz = (pkcs7->stream->length > 0)? pkcs7->stream->length:
+ srcSz;
wc_PKCS7_StreamGetVar(pkcs7, &pkiMsg2Sz, 0, &length);
- if (pkcs7->stream->flagOne) {
- pkiMsg2 = pkiMsg;
- }
/* restore content */
content = pkcs7->stream->content;
@@ -5130,6 +6124,9 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
/* restore detached flag */
detached = pkcs7->stream->detached;
+ /* store current index to get the signerInfo index later */
+ certIdx2 = idx;
+
/* store certificate if needed */
if (length > 0 && in2Sz == 0) {
/* free tmpCert if not NULL */
@@ -5145,6 +6142,9 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
pkiMsg2Sz = length;
idx = 0;
}
+ #else
+ /* store current index to get the signerInfo index later */
+ certIdx2 = idx;
#endif
if (length > 0) {
@@ -5154,7 +6154,7 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
* certificate. We want to save the first cert if it
* is X.509. */
- word32 certIdx = idx;
+ certIdx = idx;
if (length < MAX_LENGTH_SZ + ASN_TAG_SZ)
ret = BUFFER_E;
@@ -5163,7 +6163,8 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
ret = GetASNTag(pkiMsg2, &certIdx, &tag, pkiMsg2Sz);
if (ret == 0 && tag == (ASN_CONSTRUCTED | ASN_SEQUENCE)) {
- if (GetLength(pkiMsg2, &certIdx, &certSz, pkiMsg2Sz) < 0)
+ if (GetLength_ex(pkiMsg2, &certIdx, &certSz, pkiMsg2Sz,
+ NO_USER_CHECK) < 0)
ret = ASN_PARSE_E;
cert = &pkiMsg2[idx];
@@ -5192,6 +6193,9 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
contentDynamic = (byte*)XMALLOC(contentSz,
pkcs7->heap, DYNAMIC_TYPE_PKCS7);
if (contentDynamic == NULL) {
+ #ifndef NO_PKCS7_STREAM
+ pkcs7->stream = stream;
+ #endif
ret = MEMORY_E;
break;
}
@@ -5270,27 +6274,8 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
pkcs7->content = content;
pkcs7->contentSz = contentSz;
}
- #ifndef NO_PKCS7_STREAM
- else {
- /* save content if detached and using streaming API */
- if (pkcs7->content != NULL) {
- XFREE(pkcs7->stream->content, pkcs7->heap,
- DYNAMIC_TYPE_PKCS7);
- pkcs7->stream->content = (byte*)XMALLOC(pkcs7->contentSz,
- pkcs7->heap,
- DYNAMIC_TYPE_PKCS7);
- if (pkcs7->stream->content == NULL) {
- ret = MEMORY_E;
- break;
- }
- else {
- XMEMCPY(pkcs7->stream->content, pkcs7->content,
- contentSz);
- pkcs7->stream->contentSz = pkcs7->contentSz;
- }
- }
- }
- #endif
+
+ idx = certIdx2 + length;
if (ret != 0) {
break;
@@ -5307,19 +6292,17 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
break;
}
}
- else {
- stateIdx = idx; /* didn't read any from internal buffer */
- }
-
if ((ret = wc_PKCS7_StreamEndCase(pkcs7, &stateIdx, &idx)) != 0) {
break;
}
- if (pkcs7->stream->flagOne && pkcs7->stream->length > 0) {
- idx = stateIdx + idx;
- }
pkcs7->stream->expected = MAX_OID_SZ + ASN_TAG_SZ + MAX_LENGTH_SZ +
MAX_SET_SZ;
+ /* if certificate set has indef-length, there maybe trailing zeros.
+ * add expected size to include size of zeros. */
+ if (pkcs7->stream->cntIdfCnt > 0) {
+ pkcs7->stream->expected += pkcs7->stream->cntIdfCnt * 2;
+ }
if (pkcs7->stream->expected > (pkcs7->stream->maxLen -
pkcs7->stream->totalRd) + pkcs7->stream->length)
@@ -5329,24 +6312,31 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
wc_PKCS7_StreamGetVar(pkcs7, &pkiMsg2Sz, 0, 0);
wc_PKCS7_StreamStoreVar(pkcs7, pkiMsg2Sz, 0, length);
#endif
- wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE5);
+ wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE6);
FALL_THROUGH;
- case WC_PKCS7_VERIFY_STAGE5:
+ case WC_PKCS7_VERIFY_STAGE6:
#ifndef NO_PKCS7_STREAM
- if ((ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz + in2Sz,
- pkcs7->stream->expected, &pkiMsg, &idx)) != 0) {
+
+ if (in2 && in2Sz > 0) {
+ src = in2;
+ srcSz = in2Sz;
+ pkiMsg2 = in2;
+ }
+ else {
+ src = in;
+ srcSz = inSz;
+ pkiMsg2 = in;
+ }
+ if ((ret = wc_PKCS7_AddDataToStream(pkcs7, src, srcSz,
+ pkcs7->stream->expected, &pkiMsg2, &idx)) != 0) {
break;
}
wc_PKCS7_StreamGetVar(pkcs7, &pkiMsg2Sz, 0, &length);
- if (pkcs7->stream->flagOne) {
- pkiMsg2 = pkiMsg;
- /* check if using internal stream buffer and should adjust sz */
- if (pkiMsg != in && pkcs7->stream->length > 0) {
- pkiMsg2Sz = pkcs7->stream->length;
- }
- }
+ /* check if using internal stream buffer and should adjust sz */
+ pkiMsg2Sz = (pkcs7->stream->length > 0)? pkcs7->stream->length:
+ srcSz;
/* restore content type */
contentType = pkcs7->stream->nonce;
@@ -5367,7 +6357,27 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
if (ret == 0 && wc_PKCS7_SetContentType(pkcs7, contentType,
contentTypeSz) < 0)
ret = ASN_PARSE_E;
-
+ #ifndef NO_PKCS7_STREAM
+ /* prior to find set of crls, remove trailing zeros of
+ * set of certificates */
+ if (ret == 0 && pkcs7->stream->cntIdfCnt > 0) {
+ int i;
+ localIdx = idx;
+ for (i = 0; i < pkcs7->stream->cntIdfCnt * ASN_INDEF_END_SZ;
+ i++) {
+ if (pkiMsg2[localIdx + i] == 0)
+ continue;
+ else {
+ ret = ASN_PARSE_E;
+ break;
+ }
+ }
+ if (ret == 0) {
+ idx += pkcs7->stream->cntIdfCnt * ASN_INDEF_END_SZ;
+ pkcs7->stream->cntIdfCnt = 0;
+ }
+ }
+ #endif /* !NO_PKCS7_STREAM */
/* Get the implicit[1] set of crls */
if (ret == 0 && idx >= maxIdx)
ret = BUFFER_E;
@@ -5412,32 +6422,41 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
pkcs7->stream->expected = (pkcs7->stream->maxLen -
pkcs7->stream->totalRd) + pkcs7->stream->length;
}
+ /* In case of indefinite length used in the bundle, terminating
+ * zero's should exist at the end of the bundle.
+ */
+ if (pkcs7->stream->indefLen == 1) {
+ pkcs7->stream->expected = length + 3 * ASN_INDEF_END_SZ;
+ }
+ else {
+ pkcs7->stream->expected = length;
+ }
- #endif
- wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE6);
+ wc_PKCS7_ChangeState(pkcs7, WC_PKCS7_VERIFY_STAGE7);
+ #endif /* !NO_PKCS7_STREAM */
FALL_THROUGH;
- case WC_PKCS7_VERIFY_STAGE6:
+ case WC_PKCS7_VERIFY_STAGE7:
#ifndef NO_PKCS7_STREAM
- if ((ret = wc_PKCS7_AddDataToStream(pkcs7, in, inSz + in2Sz,
- pkcs7->stream->expected, &pkiMsg, &idx)) != 0) {
+ if (in2 && in2Sz > 0) {
+ src = in2;
+ srcSz = in2Sz;
+ pkiMsg2 = in2;
+ }
+ else {
+ src = in;
+ srcSz = inSz;
+ pkiMsg2 = in;
+ }
+ if ((ret = wc_PKCS7_AddDataToStream(pkcs7, src, srcSz,
+ pkcs7->stream->expected, &pkiMsg2, &idx)) != 0) {
break;
}
wc_PKCS7_StreamGetVar(pkcs7, &pkiMsg2Sz, 0, &length);
- if (pkcs7->stream->flagOne) {
- pkiMsg2 = pkiMsg;
-
- /* check if using internal stream buffer and should adjust sz */
- if (pkiMsg != in && pkcs7->stream->length > 0) {
- pkiMsg2Sz = pkcs7->stream->length;
- }
- else {
- /* if pkiMsg2 is pkiMsg and not using an internal stream
- * buffer then the size is limited by inSz */
- pkiMsg2Sz = inSz;
- }
- }
+ pkiMsg2Sz = (pkcs7->stream->length > 0)? pkcs7->stream->length:
+ srcSz;
+ degenerate = pkcs7->stream->degenerate;
/* restore content */
content = pkcs7->stream->content;
@@ -5479,9 +6498,24 @@ static int PKCS7_VerifySignedData(PKCS7* pkcs7, const byte* hashBuf,
}
}
+ #ifndef NO_PKCS7_STREAM
+ /* make sure that terminating zero's follow */
+ if ((ret == PKCS7_SIGNEEDS_CHECK || ret >= 0) &&
+ pkcs7->stream->indefLen == 1) {
+ int i;
+ for (i = 0; i < 3 * ASN_INDEF_END_SZ; i++) {
+ if (pkiMsg2[idx + i] != 0) {
+ ret = ASN_PARSE_E;
+ break;
+ }
+ }
+ }
+ #endif /* NO_PKCS7_STREAM */
+
if (ret < 0)
break;
+
ret = 0; /* success */
#ifndef NO_PKCS7_STREAM
wc_PKCS7_ResetStream(pkcs7);
@@ -6009,7 +7043,7 @@ static int wc_PKCS7_KariGenerateSharedInfo(WC_PKCS7_KARI* kari, int keyWrapOID)
/* suppPubInfo */
suppPubInfoSeqSz = SetImplicit(ASN_SEQUENCE, 2,
kekOctetSz + sizeof(word32),
- suppPubInfoSeq);
+ suppPubInfoSeq, 0);
sharedInfoSz += suppPubInfoSeqSz;
/* optional ukm/entityInfo */
@@ -6019,7 +7053,7 @@ static int wc_PKCS7_KariGenerateSharedInfo(WC_PKCS7_KARI* kari, int keyWrapOID)
entityUInfoExplicitSz = SetExplicit(0, entityUInfoOctetSz +
kari->ukmSz,
- entityUInfoExplicitSeq);
+ entityUInfoExplicitSeq, 0);
sharedInfoSz += entityUInfoExplicitSz;
}
@@ -6395,7 +7429,7 @@ int wc_PKCS7_AddRecipient_KARI(PKCS7* pkcs7, const byte* cert, word32 certSz,
/* RecipientKeyIdentifier IMPLICIT [0] */
recipKeyIdSeqSz = SetImplicit(ASN_SEQUENCE, 0, subjKeyIdOctetSz +
- keyIdSize, recipKeyIdSeq);
+ keyIdSize, recipKeyIdSeq, 0);
totalSz += recipKeyIdSeqSz;
/* RecipientEncryptedKey */
@@ -6413,7 +7447,7 @@ int wc_PKCS7_AddRecipient_KARI(PKCS7* pkcs7, const byte* cert, word32 certSz,
totalSz += (ukmOctetSz + kari->ukmSz);
ukmExplicitSz = SetExplicit(1, ukmOctetSz + kari->ukmSz,
- ukmExplicitSeq);
+ ukmExplicitSeq, 0);
totalSz += ukmExplicitSz;
}
@@ -6447,14 +7481,14 @@ int wc_PKCS7_AddRecipient_KARI(PKCS7* pkcs7, const byte* cert, word32 certSz,
/* outer OriginatorPublicKey IMPLICIT [1] */
origPubKeySeqSz = SetImplicit(ASN_SEQUENCE, 1,
origAlgIdSz + origPubKeyStrSz +
- kari->senderKeyExportSz, origPubKeySeq);
+ kari->senderKeyExportSz, origPubKeySeq, 0);
totalSz += origPubKeySeqSz;
/* outer OriginatorIdentifierOrKey IMPLICIT [0] */
origIdOrKeySeqSz = SetImplicit(ASN_SEQUENCE, 0,
origPubKeySeqSz + origAlgIdSz +
origPubKeyStrSz + kari->senderKeyExportSz,
- origIdOrKeySeq);
+ origIdOrKeySeq, 0);
totalSz += origIdOrKeySeqSz;
/* version, always 3 */
@@ -6463,7 +7497,7 @@ int wc_PKCS7_AddRecipient_KARI(PKCS7* pkcs7, const byte* cert, word32 certSz,
recip->recipVersion = 3;
/* outer IMPLICIT [1] kari */
- kariSeqSz = SetImplicit(ASN_SEQUENCE, 1, totalSz, kariSeq);
+ kariSeqSz = SetImplicit(ASN_SEQUENCE, 1, totalSz, kariSeq, 0);
totalSz += kariSeqSz;
if (totalSz > MAX_RECIP_SZ) {
@@ -6995,12 +8029,52 @@ int wc_PKCS7_AddRecipient_KTRI(PKCS7* pkcs7, const byte* cert, word32 certSz,
#endif /* !NO_RSA */
+/* abstraction for writing out PKCS7 bundle during creation
+ returns 0 on success
+ */
+int wc_PKCS7_WriteOut(PKCS7* pkcs7, byte* output, const byte* input,
+ word32 inputSz)
+{
+ int ret = 0;
+
+ if (inputSz == 0)
+ return 0;
+
+ if (input == NULL) {
+ WOLFSSL_MSG("Internal error, trying to write out NULL buffer");
+ return -1;
+ }
+
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->streamOutCb) {
+ ret = pkcs7->streamOutCb(pkcs7, input, inputSz, pkcs7->streamCtx);
+ /* sanity check on user provided ret value */
+ if (ret < 0) {
+ WOLFSSL_MSG("Return value error from stream out callback");
+ ret = BUFFER_E;
+ }
+ }
+ else
+#endif
+ if (output) {
+ XMEMCPY(output, input, inputSz);
+ }
+ else {
+ WOLFSSL_MSG("No way provided to output bundle");
+ ret = BUFFER_E;
+ }
+
+ (void)pkcs7;
+ return ret;
+}
+
/* encrypt content using encryptOID algo */
-static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
+static int wc_PKCS7_EncryptContent(PKCS7* pkcs7, int encryptOID, byte* key,
+ int keySz,
byte* iv, int ivSz, byte* aad, word32 aadSz,
byte* authTag, word32 authTagSz, byte* in,
- int inSz, byte* out, int devId, void* heap)
+ int inSz, byte* out)
{
int ret;
#ifndef NO_AES
@@ -7014,9 +8088,22 @@ static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
Des des;
Des3 des3;
#endif
+ int devId = pkcs7->devId;
+ void* heap = pkcs7->heap;
+
+ if (key == NULL || iv == NULL)
+ return BAD_FUNC_ARG;
- if (key == NULL || iv == NULL || in == NULL || out == NULL)
+#ifdef ASN_BER_TO_DER
+ if ((in == NULL && pkcs7->getContentCb == NULL) ||
+ (out == NULL && pkcs7->streamOutCb == NULL)) {
+ WOLFSSL_MSG("No input or output set for encrypt");
+ return BAD_FUNC_ARG;
+ }
+#else
+ if (in == NULL || out == NULL)
return BAD_FUNC_ARG;
+#endif
switch (encryptOID) {
#ifndef NO_AES
@@ -7052,11 +8139,8 @@ static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
if (ret == 0) {
ret = wc_AesSetKey(aes, key, keySz, iv, AES_ENCRYPTION);
if (ret == 0) {
- ret = wc_AesCbcEncrypt(aes, out, in, inSz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* async encrypt not available here, so block till done */
- ret = wc_AsyncWait(ret, &aes->asyncDev, WC_ASYNC_FLAG_NONE);
- #endif
+ ret = wc_PKCS7_EncodeContentStream(pkcs7, NULL, aes, in,
+ inSz, out, WC_CIPHER_AES_CBC);
}
wc_AesFree(aes);
}
@@ -7089,11 +8173,34 @@ static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
if (ret == 0) {
ret = wc_AesGcmSetKey(aes, key, keySz);
if (ret == 0) {
- ret = wc_AesGcmEncrypt(aes, out, in, inSz, iv, ivSz,
+ #ifndef WOLFSSL_AESGCM_STREAM
+ if (pkcs7->encodeStream) {
+ WOLFSSL_MSG("Not AES-GCM stream support compiled in");
+ ret = NOT_COMPILED_IN;
+ }
+ else {
+ ret = wc_AesGcmEncrypt(aes, out, in, inSz, iv, ivSz,
authTag, authTagSz, aad, aadSz);
- #ifdef WOLFSSL_ASYNC_CRYPT
- /* async encrypt not available here, so block till done */
- ret = wc_AsyncWait(ret, &aes->asyncDev, WC_ASYNC_FLAG_NONE);
+ #ifdef WOLFSSL_ASYNC_CRYPT
+ /* async encrypt not available here, so block till done */
+ ret = wc_AsyncWait(ret, &aes->asyncDev,
+ WC_ASYNC_FLAG_NONE);
+ #endif
+ }
+ #else
+ ret = wc_AesGcmEncryptInit(aes, key, keySz, iv, ivSz);
+ if (ret == 0) {
+ ret = wc_AesGcmEncryptUpdate(aes, NULL, NULL, 0, aad,
+ aadSz);
+ }
+ if (ret == 0) {
+ ret = wc_PKCS7_EncodeContentStream(pkcs7, NULL, aes, in,
+ inSz, out, WC_CIPHER_AES_GCM);
+ }
+
+ if (ret == 0) {
+ ret = wc_AesGcmEncryptFinal(aes, authTag, authTagSz);
+ }
#endif
}
wc_AesFree(aes);
@@ -7119,6 +8226,11 @@ static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
if (authTag == NULL)
return BAD_FUNC_ARG;
+ if (pkcs7->encodeStream) {
+ WOLFSSL_MSG("Streaming encoding not supported with AES-CCM");
+ return BAD_FUNC_ARG;
+ }
+
#ifdef WOLFSSL_SMALL_STACK
if ((aes = (Aes *)XMALLOC(sizeof *aes, NULL,
DYNAMIC_TYPE_AES)) == NULL)
@@ -7149,6 +8261,11 @@ static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
if (keySz != DES_KEYLEN || ivSz != DES_BLOCK_SIZE)
return BAD_FUNC_ARG;
+ if (pkcs7->encodeStream) {
+ WOLFSSL_MSG("Streaming encoding not supported with DES3");
+ return BAD_FUNC_ARG;
+ }
+
ret = wc_Des_SetKey(&des, key, iv, DES_ENCRYPTION);
if (ret == 0)
ret = wc_Des_CbcEncrypt(&des, out, in, inSz);
@@ -7159,6 +8276,11 @@ static int wc_PKCS7_EncryptContent(int encryptOID, byte* key, int keySz,
if (keySz != DES3_KEYLEN || ivSz != DES_BLOCK_SIZE)
return BAD_FUNC_ARG;
+ if (pkcs7->encodeStream) {
+ WOLFSSL_MSG("Streaming encoding not supported with DES3");
+ return BAD_FUNC_ARG;
+ }
+
ret = wc_Des3Init(&des3, heap, devId);
if (ret == 0) {
ret = wc_Des3_SetKey(&des3, key, iv, DES_ENCRYPTION);
@@ -7578,7 +8700,7 @@ int wc_PKCS7_AddRecipient_ORI(PKCS7* pkcs7, CallbackOriEncrypt oriEncryptCb,
oriTypeLenSz = SetLength(oriTypeSz, oriTypeLen);
recipSeqSz = SetImplicit(ASN_SEQUENCE, 4, 1 + oriTypeLenSz + oriTypeSz +
- oriValueSz, recipSeq);
+ oriValueSz, recipSeq, 0);
idx = 0;
XMEMCPY(recip->recip + idx, recipSeq, recipSeqSz);
@@ -7707,17 +8829,17 @@ static int wc_PKCS7_PwriKek_KeyWrap(PKCS7* pkcs7, const byte* kek, word32 kekSz,
if (ret == 0) {
/* encrypt, normal */
- ret = wc_PKCS7_EncryptContent(algID, (byte*)kek, kekSz, (byte*)iv,
- ivSz, NULL, 0, NULL, 0, out, outLen, out,
- pkcs7->devId, pkcs7->heap);
+ ret = wc_PKCS7_EncryptContent(pkcs7, algID, (byte*)kek, kekSz,
+ (byte*)iv, ivSz, NULL, 0, NULL, 0, out,
+ outLen, out);
}
if (ret == 0) {
/* encrypt again, using last ciphertext block as IV */
lastBlock = out + (((outLen / blockSz) - 1) * blockSz);
- ret = wc_PKCS7_EncryptContent(algID, (byte*)kek, kekSz, lastBlock,
- blockSz, NULL, 0, NULL, 0, out,
- outLen, out, pkcs7->devId, pkcs7->heap);
+ ret = wc_PKCS7_EncryptContent(pkcs7, algID, (byte*)kek, kekSz,
+ lastBlock, blockSz, NULL, 0, NULL, 0, out,
+ outLen, out);
}
if (ret == 0) {
@@ -8028,7 +9150,7 @@ int wc_PKCS7_AddRecipient_PWRI(PKCS7* pkcs7, byte* passwd, word32 pLen,
/* set KeyDerivationAlgorithmIdentifier EXPLICIT [0] SEQ */
kdfAlgoIdSeqSz = SetExplicit(0, kdfAlgoIdSz + kdfParamsSeqSz +
kdfSaltOctetStrSz + saltSz + kdfIterationsSz,
- kdfAlgoIdSeq);
+ kdfAlgoIdSeq, 0);
totalSz += kdfAlgoIdSeqSz;
/* set PasswordRecipientInfo CMSVersion, MUST be 0 */
@@ -8037,7 +9159,7 @@ int wc_PKCS7_AddRecipient_PWRI(PKCS7* pkcs7, byte* passwd, word32 pLen,
recip->recipVersion = 0;
/* set PasswordRecipientInfo SEQ */
- recipSeqSz = SetImplicit(ASN_SEQUENCE, 3, totalSz, recipSeq);
+ recipSeqSz = SetImplicit(ASN_SEQUENCE, 3, totalSz, recipSeq, 0);
totalSz += recipSeqSz;
if (totalSz > MAX_RECIP_SZ) {
@@ -8280,7 +9402,7 @@ int wc_PKCS7_AddRecipient_KEKRI(PKCS7* pkcs7, int keyWrapOID, byte* kek,
recip->recipVersion = 4;
/* KEKRecipientInfo SEQ */
- recipSeqSz = SetImplicit(ASN_SEQUENCE, 2, totalSz, recipSeq);
+ recipSeqSz = SetImplicit(ASN_SEQUENCE, 2, totalSz, recipSeq, 0);
totalSz += recipSeqSz;
if (totalSz > MAX_RECIP_SZ) {
@@ -8405,8 +9527,8 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
WC_RNG rng;
int blockSz, blockKeySz;
- byte* plain;
- byte* encryptedContent;
+ byte* plain = NULL;
+ byte* encryptedContent = NULL;
Pkcs7EncodedRecip* tmpRecip = NULL;
int recipSz, recipSetSz;
@@ -8420,12 +9542,27 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
byte tmpIv[MAX_CONTENT_IV_SIZE];
byte ivOctetString[MAX_OCTET_STR_SZ];
byte encContentOctet[MAX_OCTET_STR_SZ];
+#ifdef ASN_BER_TO_DER
+ word32 streamSz = 0;
+#endif
- if (pkcs7 == NULL || pkcs7->content == NULL || pkcs7->contentSz == 0)
+ if (pkcs7 == NULL
+ #ifndef ASN_BER_TO_DER
+ || pkcs7->content == NULL
+ #endif
+ || pkcs7->contentSz == 0) {
return BAD_FUNC_ARG;
+ }
+#ifndef ASN_BER_TO_DER
if (output == NULL || outputSz == 0)
return BAD_FUNC_ARG;
+#else
+ /* if both output and callback are not set then error out */
+ if ((output == NULL || outputSz == 0) && (pkcs7->streamOutCb == NULL)) {
+ return BAD_FUNC_ARG;
+ }
+#endif
blockKeySz = wc_PKCS7_GetOIDKeySize(pkcs7->encryptOID);
if (blockKeySz < 0)
@@ -8534,26 +9671,37 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
encryptedOutSz = pkcs7->contentSz + padSz;
- plain = (byte*)XMALLOC(encryptedOutSz, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- if (plain == NULL) {
- wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
- return MEMORY_E;
- }
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->getContentCb == NULL)
+#endif
+ {
+ plain = (byte*)XMALLOC(encryptedOutSz, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ if (plain == NULL) {
+ wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
+ return MEMORY_E;
+ }
+
+ ret = wc_PKCS7_PadData(pkcs7->content, pkcs7->contentSz, plain,
+ encryptedOutSz, blockSz);
+ if (ret < 0) {
+ XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
+ return ret;
+ }
- ret = wc_PKCS7_PadData(pkcs7->content, pkcs7->contentSz, plain,
- encryptedOutSz, blockSz);
- if (ret < 0) {
- XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
- return ret;
}
- encryptedContent = (byte*)XMALLOC(encryptedOutSz, pkcs7->heap,
- DYNAMIC_TYPE_PKCS7);
- if (encryptedContent == NULL) {
- XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
- return MEMORY_E;
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->streamOutCb == NULL)
+#endif
+ {
+ encryptedContent = (byte*)XMALLOC(encryptedOutSz, pkcs7->heap,
+ DYNAMIC_TYPE_PKCS7);
+ if (encryptedContent == NULL) {
+ XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
+ return MEMORY_E;
+ }
}
/* put together IV OCTET STRING */
@@ -8571,26 +9719,12 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
return BAD_FUNC_ARG;
}
- /* encrypt content */
- ret = wc_PKCS7_EncryptContent(pkcs7->encryptOID, pkcs7->cek,
- pkcs7->cekSz, tmpIv, blockSz, NULL, 0, NULL, 0, plain,
- encryptedOutSz, encryptedContent,
- pkcs7->devId, pkcs7->heap);
-
- if (ret != 0) {
- XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
- return ret;
- }
-
encContentOctetSz = SetImplicit(ASN_OCTET_STRING, 0, encryptedOutSz,
- encContentOctet);
-
- encContentSeqSz = SetSequence(contentTypeSz + contentEncAlgoSz +
- ivOctetStringSz + blockSz +
- encContentOctetSz + encryptedOutSz,
- encContentSeq);
+ encContentOctet, pkcs7->encodeStream);
+ encContentSeqSz = SetSequenceEx(contentTypeSz + contentEncAlgoSz +
+ ivOctetStringSz + blockSz +
+ encContentOctetSz + encryptedOutSz,
+ encContentSeq, pkcs7->encodeStream);
/* keep track of sizes for outer wrapper layering */
totalSz = verSz + recipSetSz + recipSz + encContentSeqSz + contentTypeSz +
@@ -8598,21 +9732,68 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
encContentOctetSz + encryptedOutSz;
/* EnvelopedData */
- envDataSeqSz = SetSequence(totalSz, envDataSeq);
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ word32 tmpIdx = 0;
+
+ /* account for ending of encContentOctet */
+ totalSz += ASN_INDEF_END_SZ;
+
+ /* account for ending of encContentSeq */
+ totalSz += ASN_INDEF_END_SZ;
+
+ /* account for asn1 syntax around octet strings */
+ StreamOctetString(NULL, encryptedOutSz, NULL, &streamSz, &tmpIdx);
+ totalSz += (streamSz - encryptedOutSz);
+
+ /* resize encrytped content buffer */
+ if (encryptedContent != NULL) {
+ XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ encryptedContent = (byte*)XMALLOC(streamSz, pkcs7->heap,
+ DYNAMIC_TYPE_PKCS7);
+ if (encryptedContent == NULL) {
+ XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
+ return MEMORY_E;
+ }
+ }
+ }
+#endif
+ envDataSeqSz = SetSequenceEx(totalSz, envDataSeq, pkcs7->encodeStream);
totalSz += envDataSeqSz;
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ totalSz += ASN_INDEF_END_SZ;
+ }
+#endif
/* outer content */
- outerContentSz = SetExplicit(0, totalSz, outerContent);
+ outerContentSz = SetExplicit(0, totalSz, outerContent, pkcs7->encodeStream);
+#ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ totalSz += ASN_INDEF_END_SZ;
+ }
+#endif
totalSz += outerContentTypeSz;
totalSz += outerContentSz;
if (pkcs7->contentOID != FIRMWARE_PKG_DATA) {
/* ContentInfo */
- contentInfoSeqSz = SetSequence(totalSz, contentInfoSeq);
+ contentInfoSeqSz = SetSequenceEx(totalSz, contentInfoSeq,
+ pkcs7->encodeStream);
totalSz += contentInfoSeqSz;
+ #ifdef ASN_BER_TO_DER
+ if (pkcs7->encodeStream) {
+ totalSz += ASN_INDEF_END_SZ;
+ }
+ #endif
}
- if (totalSz > (int)outputSz) {
+ if ((totalSz > (int)outputSz)
+ #ifdef ASN_BER_TO_DER
+ && (pkcs7->streamOutCb == NULL)
+ #endif
+ ) {
WOLFSSL_MSG("Pkcs7_encrypt output buffer too small");
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
@@ -8620,45 +9801,121 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
return BUFFER_E;
}
+ /* begin writing out PKCS7 bundle */
if (pkcs7->contentOID != FIRMWARE_PKG_DATA) {
- XMEMCPY(output + idx, contentInfoSeq, contentInfoSeqSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ contentInfoSeq, contentInfoSeqSz);
idx += contentInfoSeqSz;
- XMEMCPY(output + idx, outerContentType, outerContentTypeSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ outerContentType, outerContentTypeSz);
idx += outerContentTypeSz;
- XMEMCPY(output + idx, outerContent, outerContentSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ outerContent, outerContentSz);
idx += outerContentSz;
}
- XMEMCPY(output + idx, envDataSeq, envDataSeqSz);
+
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ envDataSeq, envDataSeqSz);
idx += envDataSeqSz;
- XMEMCPY(output + idx, ver, verSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ ver, verSz);
idx += verSz;
- XMEMCPY(output + idx, recipSet, recipSetSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ recipSet, recipSetSz);
idx += recipSetSz;
/* copy in recipients from list */
tmpRecip = pkcs7->recipList;
while (tmpRecip != NULL) {
- XMEMCPY(output + idx, tmpRecip->recip, tmpRecip->recipSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ tmpRecip->recip, tmpRecip->recipSz);
idx += tmpRecip->recipSz;
tmpRecip = tmpRecip->next;
}
wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
- XMEMCPY(output + idx, encContentSeq, encContentSeqSz);
+
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ encContentSeq, encContentSeqSz);
idx += encContentSeqSz;
- XMEMCPY(output + idx, contentType, contentTypeSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ contentType, contentTypeSz);
idx += contentTypeSz;
- XMEMCPY(output + idx, contentEncAlgo, contentEncAlgoSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ contentEncAlgo, contentEncAlgoSz);
idx += contentEncAlgoSz;
- XMEMCPY(output + idx, ivOctetString, ivOctetStringSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ ivOctetString, ivOctetStringSz);
idx += ivOctetStringSz;
- XMEMCPY(output + idx, tmpIv, blockSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ tmpIv, blockSz);
idx += blockSz;
- XMEMCPY(output + idx, encContentOctet, encContentOctetSz);
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ encContentOctet, encContentOctetSz);
idx += encContentOctetSz;
- XMEMCPY(output + idx, encryptedContent, encryptedOutSz);
- idx += encryptedOutSz;
- XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
- XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ /* encrypt content */
+ ret = wc_PKCS7_EncryptContent(pkcs7, pkcs7->encryptOID, pkcs7->cek,
+ pkcs7->cekSz, tmpIv, blockSz, NULL, 0, NULL, 0, plain,
+ encryptedOutSz, encryptedContent);
+ if (ret != 0) {
+ if (encryptedContent != NULL) {
+ XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ }
+
+ if (plain != NULL) {
+ XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ }
+
+ wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
+ return ret;
+ }
+
+#ifdef ASN_BER_TO_DER
+ /* stream the content (octet string with multiple octet elements) */
+ if (pkcs7->encodeStream) {
+ byte indefEnd[ASN_INDEF_END_SZ * 5];
+ word32 localIdx = 0;
+
+ /* advance index past encrypted content */
+ if (!pkcs7->streamOutCb) {
+ wc_PKCS7_WriteOut(pkcs7, (output)? output + idx : NULL,
+ encryptedContent, streamSz);
+ }
+ idx += streamSz;
+
+ /* end of encrypted content */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of encrypted content info */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of Enveloped Data seq */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of outer content set */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ /* end of outer content info seq */
+ localIdx += SetIndefEnd(indefEnd + localIdx);
+
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ indefEnd, localIdx);
+ idx += localIdx;
+ }
+ else
+#endif
+ {
+ wc_PKCS7_WriteOut(pkcs7, (output)? (output + idx) : NULL,
+ encryptedContent, encryptedOutSz);
+ idx += encryptedOutSz;
+ }
+
+ if (plain != NULL) {
+ XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ }
+
+ if (encryptedContent != NULL) {
+ XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ }
return idx;
}
@@ -11489,11 +12746,16 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
return MEMORY_E;
}
- FlattenAttributes(pkcs7, flatAuthAttribs, authAttribs,
+ ret = FlattenAttributes(pkcs7, flatAuthAttribs, authAttribs,
authAttribsCount);
+ if (ret != 0) {
+ wc_PKCS7_FreeEncodedRecipientSet(pkcs7);
+ XFREE(flatAuthAttribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ return ret;
+ }
authAttribsSetSz = SetImplicit(ASN_SET, 1, authAttribsSz,
- authAttribSet);
+ authAttribSet, 0);
/* From RFC5083, "For the purpose of constructing the AAD, the
* IMPLICIT [1] tag in the authAttrs field is not used for the
@@ -11539,7 +12801,7 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
FlattenAttributes(pkcs7, flatUnauthAttribs, unauthAttribs,
unauthAttribsCount);
unauthAttribsSetSz = SetImplicit(ASN_SET, 2, unauthAttribsSz,
- unauthAttribSet);
+ unauthAttribSet, 0);
}
/* AES-GCM/CCM does NOT require padding for plaintext content or
@@ -11585,10 +12847,9 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
}
/* encrypt content */
- ret = wc_PKCS7_EncryptContent(pkcs7->encryptOID, pkcs7->cek,
+ ret = wc_PKCS7_EncryptContent(pkcs7, pkcs7->encryptOID, pkcs7->cek,
pkcs7->cekSz, nonce, nonceSz, aadBuffer, aadBufferSz, authTag,
- sizeof(authTag), plain, encryptedOutSz, encryptedContent,
- pkcs7->devId, pkcs7->heap);
+ sizeof(authTag), plain, encryptedOutSz, encryptedContent);
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
plain = NULL;
@@ -11651,8 +12912,7 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
}
encContentOctetSz = SetImplicit(ASN_OCTET_STRING, 0, encryptedOutSz,
- encContentOctet);
-
+ encContentOctet, 0);
encContentSeqSz = SetSequence(contentTypeSz + contentEncAlgoSz +
nonceOctetStringSz + nonceSz + macIntSz +
algoParamSeqSz + encContentOctetSz +
@@ -11672,7 +12932,7 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
totalSz += envDataSeqSz;
/* outer content */
- outerContentSz = SetExplicit(0, totalSz, outerContent);
+ outerContentSz = SetExplicit(0, totalSz, outerContent, 0);
totalSz += outerContentTypeSz;
totalSz += outerContentSz;
@@ -11725,6 +12985,8 @@ int wc_PKCS7_EncodeAuthEnvelopedData(PKCS7* pkcs7, byte* output,
idx += nonceSz;
XMEMCPY(output + idx, macInt, macIntSz);
idx += macIntSz;
+
+
XMEMCPY(output + idx, encContentOctet, encContentOctetSz);
idx += encContentOctetSz;
XMEMCPY(output + idx, encryptedContent, encryptedOutSz);
@@ -11825,10 +13087,6 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
}
#endif
-#ifndef WOLFSSL_SMALL_STACK
- XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
-#endif
-
switch (pkcs7->state) {
case WC_PKCS7_START:
case WC_PKCS7_INFOSET_START:
@@ -11867,6 +13125,7 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
pkcs7->stream->key = decryptedKey;
#endif
#endif
+ XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
FALL_THROUGH;
case WC_PKCS7_DECRYPT_KTRI:
@@ -12527,10 +13786,9 @@ int wc_PKCS7_EncodeEncryptedData(PKCS7* pkcs7, byte* output, word32 outputSz)
return ret;
}
- ret = wc_PKCS7_EncryptContent(pkcs7->encryptOID, pkcs7->encryptionKey,
- pkcs7->encryptionKeySz, tmpIv, blockSz, NULL, 0, NULL, 0,
- plain, encryptedOutSz, encryptedContent,
- pkcs7->devId, pkcs7->heap);
+ ret = wc_PKCS7_EncryptContent(pkcs7, pkcs7->encryptOID,
+ pkcs7->encryptionKey, pkcs7->encryptionKeySz, tmpIv, blockSz, NULL,
+ 0, NULL, 0, plain, encryptedOutSz, encryptedContent);
if (ret != 0) {
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
@@ -12538,7 +13796,7 @@ int wc_PKCS7_EncodeEncryptedData(PKCS7* pkcs7, byte* output, word32 outputSz)
}
encContentOctetSz = SetImplicit(ASN_OCTET_STRING, 0,
- encryptedOutSz, encContentOctet);
+ encryptedOutSz, encContentOctet, 0);
encContentSeqSz = SetSequence(contentTypeSz + contentEncAlgoSz +
ivOctetStringSz + blockSz +
@@ -12576,8 +13834,15 @@ int wc_PKCS7_EncodeEncryptedData(PKCS7* pkcs7, byte* output, word32 outputSz)
return MEMORY_E;
}
- FlattenAttributes(pkcs7, flatAttribs, attribs, attribsCount);
- attribsSetSz = SetImplicit(ASN_SET, 1, attribsSz, attribSet);
+ ret = FlattenAttributes(pkcs7, flatAttribs, attribs, attribsCount);
+ if (ret != 0) {
+ XFREE(attribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ XFREE(flatAttribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
+ return ret;
+ }
+ attribsSetSz = SetImplicit(ASN_SET, 1, attribsSz, attribSet, 0);
} else {
attribsSz = 0;
@@ -12595,7 +13860,7 @@ int wc_PKCS7_EncodeEncryptedData(PKCS7* pkcs7, byte* output, word32 outputSz)
if (pkcs7->version != 3) {
/* outer content */
- outerContentSz = SetExplicit(0, totalSz, outerContent);
+ outerContentSz = SetExplicit(0, totalSz, outerContent, 0);
totalSz += outerContentTypeSz;
totalSz += outerContentSz;
/* ContentInfo */
@@ -13086,6 +14351,68 @@ int wc_PKCS7_SetDecodeEncryptedCtx(PKCS7* pkcs7, void* ctx)
}
#endif /* NO_PKCS7_ENCRYPTED_DATA */
+
+/* set stream mode for encoding and signing
+ * returns 0 on success */
+int wc_PKCS7_SetStreamMode(PKCS7* pkcs7, byte flag,
+ CallbackGetContent getContentCb,
+ CallbackStreamOut streamOutCb, void* ctx)
+{
+ if (pkcs7 == NULL) {
+ return BAD_FUNC_ARG;
+ }
+#ifdef ASN_BER_TO_DER
+ pkcs7->encodeStream = flag;
+ pkcs7->getContentCb = getContentCb;
+ pkcs7->streamOutCb = streamOutCb;
+ pkcs7->streamCtx = ctx;
+ return 0;
+#else
+ (void)flag;
+ (void)getContentCb;
+ (void)streamOutCb;
+ (void)ctx;
+ return NOT_COMPILED_IN;
+#endif
+}
+
+
+/* returns to current stream mode flag on success, negative values on fail */
+int wc_PKCS7_GetStreamMode(PKCS7* pkcs7)
+{
+ if (pkcs7 == NULL) {
+ return BAD_FUNC_ARG;
+ }
+#ifdef ASN_BER_TO_DER
+ return pkcs7->encodeStream;
+#else
+ return 0;
+#endif
+}
+
+
+/* set option to not include certificates when creating a bundle
+ * returns 0 on success */
+int wc_PKCS7_SetNoCerts(PKCS7* pkcs7, byte flag)
+{
+ if (pkcs7 == NULL) {
+ return BAD_FUNC_ARG;
+ }
+ pkcs7->noCerts = flag;
+ return 0;
+}
+
+
+/* returns the current noCerts flag value on success, negative values on fail */
+int wc_PKCS7_GetNoCerts(PKCS7* pkcs7)
+{
+ if (pkcs7 == NULL) {
+ return BAD_FUNC_ARG;
+ }
+ return pkcs7->noCerts;
+}
+
+
#if defined(HAVE_LIBZ) && !defined(NO_PKCS7_COMPRESSED_DATA)
/* build PKCS#7 compressedData content type, return encrypted size */
@@ -13140,7 +14467,7 @@ int wc_PKCS7_EncodeCompressedData(PKCS7* pkcs7, byte* output, word32 outputSz)
totalSz = contentOctetStrSz + compressedSz;
/* EXPLICIT [0] eContentType */
- contentSeqSz = SetExplicit(0, totalSz, contentSeq);
+ contentSeqSz = SetExplicit(0, totalSz, contentSeq, 0);
totalSz += contentSeqSz;
/* eContentType OBJECT IDENTIFIER */
@@ -13200,7 +14527,7 @@ int wc_PKCS7_EncodeCompressedData(PKCS7* pkcs7, byte* output, word32 outputSz)
*/
/* ContentInfo content EXPLICIT SEQUENCE */
- contentInfoContentSeqSz = SetExplicit(0, totalSz, contentInfoContentSeq);
+ contentInfoContentSeqSz = SetExplicit(0, totalSz, contentInfoContentSeq, 0);
totalSz += contentInfoContentSeqSz;
ret = wc_SetContentType(COMPRESSED_DATA, contentInfoTypeOid,
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_mp.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_mp.c
index 20fb4ee9..1afda2b8 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_mp.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_mp.c
@@ -2441,14 +2441,14 @@ int esp_mp_mulmod(MATH_INT_T* X, MATH_INT_T* Y, MATH_INT_T* M, MATH_INT_T* Z)
esp_mp_mulmod_usage_ct);
ESP_LOGI(TAG, "esp_mp_mulmod_error_ct = %lu failures",
esp_mp_mulmod_error_ct);
- ESP_LOGI(TAG, "");
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
esp_show_mp("HW Z", Z); /* this is the HW result */
esp_show_mp("SW Z2", Z2); /* this is the SW result */
ESP_LOGI(TAG, "esp_mp_mulmod_usage_ct = %lu tries",
esp_mp_mulmod_usage_ct);
ESP_LOGI(TAG, "esp_mp_mulmod_error_ct = %lu failures",
esp_mp_mulmod_error_ct);
- ESP_LOGI(TAG, "");
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
#ifndef NO_RECOVER_SOFTWARE_CALC
@@ -2991,7 +2991,7 @@ int esp_hw_show_mp_metrics(void)
"NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL");
#else
/* Metrics: esp_mp_mul() */
- ESP_LOGI(TAG, ""); /* mul follows */
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE); /* mul follows */
ESP_LOGI(TAG, "esp_mp_mul HW acceleration enabled.");
ESP_LOGI(TAG, "Number of calls to esp_mp_mul: %lu",
esp_mp_mul_usage_ct);
@@ -3010,7 +3010,7 @@ int esp_hw_show_mp_metrics(void)
"NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD");
#else
/* Metrics: esp_mp_mulmod() */
- ESP_LOGI(TAG, ""); /* mulmod follows */
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE); /* mulmod follows */
ESP_LOGI(TAG, "esp_mp_mulmod HW acceleration enabled.");
/* Metrics: esp_mp_mulmod() */
@@ -3052,7 +3052,7 @@ int esp_hw_show_mp_metrics(void)
"NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD");
#else
/* Metrics: sp_mp_exptmod() */
- ESP_LOGI(TAG, ""); /* exptmod follows */
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE); /* exptmod follows */
ESP_LOGI(TAG, "Number of calls to esp_mp_exptmod: %lu",
esp_mp_exptmod_usage_ct);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c
index 30ba0e7b..332c532a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c
@@ -227,10 +227,13 @@ int esp_sha_init(WC_ESP32SHA* ctx, enum wc_HashType hash_type)
#if defined(CONFIG_IDF_TARGET_ESP32) || \
defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
switch (hash_type) { /* check each wolfSSL hash type WC_[n] */
+
+ #ifndef NO_SHA
case WC_HASH_TYPE_SHA:
ctx->sha_type = SHA1; /* assign Espressif SHA HW type */
ret = esp_sha_init_ctx(ctx);
break;
+ #endif
case WC_HASH_TYPE_SHA224:
#if defined(CONFIG_IDF_TARGET_ESP32S2) || \
@@ -333,7 +336,6 @@ int esp_sha_init(WC_ESP32SHA* ctx, enum wc_HashType hash_type)
return ret;
}
-#ifndef NO_SHAx /* TODO cannot currently turn off SHA */
/* we'll call a separate init as there's only 1 HW acceleration */
int esp_sha_init_ctx(WC_ESP32SHA* ctx)
{
@@ -522,6 +524,7 @@ int esp_sha_init_ctx(WC_ESP32SHA* ctx)
* We assume all issues handled, above. */
} /* esp_sha_init_ctx */
+#ifndef NO_SHA
/*
** internal SHA ctx copy for ESP HW
*/
@@ -679,7 +682,10 @@ int esp_sha256_ctx_copy(struct wc_Sha256* src, struct wc_Sha256* dst)
} /* esp_sha256_ctx_copy */
#endif
-#if defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512)
+#if !(defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384) && \
+ defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512) \
+ ) && \
+ (defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512))
/*
** internal sha384 ctx copy for ESP HW
*/
@@ -744,7 +750,10 @@ int esp_sha384_ctx_copy(struct wc_Sha512* src, struct wc_Sha512* dst)
} /* esp_sha384_ctx_copy */
#endif
-#if defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512)
+#if !(defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384) && \
+ defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512) \
+ ) && \
+ (defined(WOLFSSL_SHA384) || defined(WOLFSSL_SHA512))
/*
** Internal sha512 ctx copy for ESP HW.
** If HW already active, fall back to SW for this ctx.
@@ -1190,7 +1199,7 @@ int esp_sha_try_hw_lock(WC_ESP32SHA* ctx)
ESP_LOGE(TAG, "unexpected error in esp_sha_try_hw_lock.");
return ESP_FAIL;
}
-#else /* not ESP_FAILfined(SINGLE_THREADED) */
+#else /* not SINGLE_THREADED */
/*
** there's only one SHA engine for all the hash types
** so when any hash is in use, no others can use it.
@@ -2013,7 +2022,7 @@ int wc_esp_digest_state(WC_ESP32SHA* ctx, byte* hash)
pwrd1[i] ^= pwrd1[i + 1];
}
}
-#endif
+#endif /* SHA512 or SHA384*/
#endif /* not CONFIG_IDF_TARGET_ESP32S3, C3, else... */
ESP_LOGV(TAG, "leave esp_digest_state");
@@ -2122,6 +2131,9 @@ int esp_sha256_digest_process(struct wc_Sha256* sha, byte blockprocess)
}
wc_esp_digest_state(&sha->ctx, (byte*)sha->digest);
+#else
+ ESP_LOGE(TAG, "Call esp_sha256_digest_process with "
+ "NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256 ");
#endif
ESP_LOGV(TAG, "leave esp_sha256_digest_process");
return ret;
@@ -2130,7 +2142,10 @@ int esp_sha256_digest_process(struct wc_Sha256* sha, byte blockprocess)
#endif /* NO_SHA256 */
-#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
+#if !(defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384) && \
+ defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512) \
+ ) && \
+ (defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384))
/*
** sha512 process. this is used for sha384 too.
*/
@@ -2232,14 +2247,18 @@ int esp_sha512_digest_process(struct wc_Sha512* sha, byte blockproc)
#if defined(WOLFSSL_ESP32_CRYPT) && defined(WOLFSSL_HW_METRICS)
int esp_sw_sha256_count_add(void) {
+ int ret = 0;
+#if !defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
esp_sha256_sw_fallback_usage_ct++;
- return esp_sha256_sw_fallback_usage_ct;
+ ret = esp_sha256_sw_fallback_usage_ct;
+#endif
+ return ret;
}
int esp_hw_show_sha_metrics(void)
{
int ret = 0;
-#ifdef WOLFSSL_ESP32_CRYPT
+#if defined(WOLFSSL_ESP32_CRYPT) && !defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
ESP_LOGI(TAG, "--------------------------------------------------------");
ESP_LOGI(TAG, "------------- wolfSSL ESP HW SHA Metrics----------------");
ESP_LOGI(TAG, "--------------------------------------------------------");
@@ -2268,7 +2287,6 @@ int esp_hw_show_sha_metrics(void)
ret = 0;
#endif /* HW_MATH_ENABLED */
-
return ret;
}
#endif /* WOLFSSL_ESP32_CRYPT and WOLFSSL_HW_METRICS */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_util.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_util.c
index 162b38fd..829afa4a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_util.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/Espressif/esp32_util.c
@@ -482,7 +482,7 @@ int ShowExtendedSystemInfo_config(void)
show_macro("WOLFSSL_NO_CURRDIR", STR_IFNDEF(WOLFSSL_NO_CURRDIR));
show_macro("WOLFSSL_LWIP", STR_IFNDEF(WOLFSSL_LWIP));
- ESP_LOGI(TAG, "");
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
#if defined(CONFIG_COMPILER_OPTIMIZATION_DEFAULT)
ESP_LOGI(TAG, "Compiler Optimization: Default");
#elif defined(CONFIG_COMPILER_OPTIMIZATION_SIZE)
@@ -494,7 +494,7 @@ int ShowExtendedSystemInfo_config(void)
#else
ESP_LOGI(TAG, "Compiler Optimization: Unknown");
#endif
- ESP_LOGI(TAG, "");
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
return ESP_OK;
}
@@ -592,9 +592,10 @@ int ShowExtendedSystemInfo(void)
ESP_LOGI(TAG, "CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ = %u MHz",
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
);
-#elif defined(CONFIG_IDF_TARGET_ESP32C3)
- ESP_LOGI(TAG, "CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ = %u MHz",
- CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
+#elif defined(CONFIG_IDF_TARGET_ESP32C3) && \
+ defined(CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ)
+ ESP_LOGI(TAG, "CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ = %u MHz",
+ CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ
);
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
@@ -628,7 +629,7 @@ int ShowExtendedSystemInfo(void)
#ifdef INCLUDE_uxTaskGetStackHighWaterMark
ESP_LOGI(TAG, "Stack HWM: %d", uxTaskGetStackHighWaterMark(NULL));
#endif
- ESP_LOGI(TAG, "");
+ ESP_LOGI(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
ShowExtendedSystemInfo_config();
ShowExtendedSystemInfo_git();
@@ -664,7 +665,7 @@ int esp_show_mp_attributes(char* c, MATH_INT_T* X)
ESP_LOGV(MP_TAG, "esp_show_mp_attributes called with X == NULL");
}
else {
- ESP_LOGI(MP_TAG, "");
+ ESP_LOGI(MP_TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
ESP_LOGI(MP_TAG, "%s.used = %d;", c, X->used);
#if defined(WOLFSSL_SP_INT_NEGATIVE) || defined(USE_FAST_MATH)
ESP_LOGI(MP_TAG, "%s.sign = %d;", c, X->sign);
@@ -716,7 +717,7 @@ int esp_show_mp(char* c, MATH_INT_T* X)
i /* the index, again, for comment */
);
}
- ESP_LOGI(MP_TAG, "");
+ ESP_LOGI(MP_TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE);
}
return ret;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-crypt.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-crypt.c
index 202ae8b3..d310c6eb 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-crypt.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-crypt.c
@@ -114,6 +114,11 @@ int wc_AriaSetKey(wc_Aria* aria, byte* key)
{
MC_RV rv = MC_OK;
MC_UINT keylen;
+
+ if (aria == NULL || key == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
if (aria->algo == MC_ALGID_ARIA_128BITKEY) {
keylen = ARIA_128_KEY_SIZE;
} else if (aria->algo == MC_ALGID_ARIA_192BITKEY) {
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-cryptocb.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-cryptocb.c
index e52509a5..e52c8338 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-cryptocb.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/aria/aria-cryptocb.c
@@ -185,8 +185,8 @@ int wc_AriaSign(byte* in, word32 inSz, byte* out, word32* outSz, ecc_key* key)
MC_APIMODE gApimode = MC_MODE_KCMV;
MC_ALGORITHM mcAlg = {MC_ALGID_NONE, NULL, 0};
- byte keyAsn1[ARIA_KEYASN1_MAXSZ];
- word32 keyAsn1Sz=(word32)sizeof(keyAsn1);
+ byte keyarr[ARIA_KEYASN1_MAXSZ];
+ word32 keySz=(word32)sizeof(keyarr);
WOLFSSL_ENTER("AriaSign");
@@ -204,13 +204,13 @@ int wc_AriaSign(byte* in, word32 inSz, byte* out, word32* outSz, ecc_key* key)
rv = MC_SetApiMode(hSession, gApimode);
if (rv == MC_OK) {
- int ret = wc_BuildEccKeyDer(key,keyAsn1,&keyAsn1Sz,0,0);
+ int ret = wc_EccPrivateKeyToDer(key, keyarr, keySz);
if (ret < 0) { rv = ret; }
- else { keyAsn1Sz = ret; }
+ else { keySz = ret; }
}
- WOLFSSL_MSG_EX("AriaSign key(%d):",keyAsn1Sz);
- WOLFSSL_BUFFER(keyAsn1,keyAsn1Sz);
+ WOLFSSL_MSG_EX("AriaSign key(%d):",keySz);
+ WOLFSSL_BUFFER(keyarr,keySz);
WOLFSSL_MSG_EX("AriaSign rv=%d",rv);
@@ -230,7 +230,7 @@ int wc_AriaSign(byte* in, word32 inSz, byte* out, word32* outSz, ecc_key* key)
}
if (rv == MC_OK)
- rv = MC_CreateObject(hSession, keyAsn1, keyAsn1Sz, &hPrikey);
+ rv = MC_CreateObject(hSession, keyarr, keySz, &hPrikey);
WOLFSSL_MSG_EX("AriaSign CreateObject rv=%d",rv);
if (rv == MC_OK)
@@ -281,7 +281,7 @@ int wc_AriaVerify(byte* sig, word32 sigSz, byte* hash, word32 hashSz,
rv = MC_SetApiMode(hSession, gApimode);
if (rv == MC_OK) {
- int ret = wc_EccPublicKeyToDer(key,keyarr,keySz,0);
+ int ret = wc_EccPublicKeyToDer(key, keyarr, keySz, 0);
if (ret < 0) { rv = ret; }
else { keySz = ret; }
}
@@ -544,13 +544,11 @@ int wc_AriaDerive(ecc_key* private_key, ecc_key* public_key,
ret = wc_AriaInitSha(&(info->hash.sha256->hSession), MC_ALGID_SHA256);
}
- if (((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE))
- && (info->hash.in != NULL)) {
+ if ((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE)) {
ret = wc_AriaShaUpdate(info->hash.sha256->hSession,
(byte *) info->hash.in, info->hash.inSz);
}
- if (((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE))
- && (info->hash.digest != NULL)) {
+ if ((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE)) {
MC_UINT digestSz = 32;
ret = wc_AriaShaFinal(info->hash.sha256->hSession,
info->hash.digest, &digestSz);
@@ -573,13 +571,11 @@ int wc_AriaDerive(ecc_key* private_key, ecc_key* public_key,
ret = wc_AriaInitSha(&(info->hash.sha384->hSession), MC_ALGID_SHA384);
}
- if (((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE))
- && (info->hash.in != NULL)) {
+ if ((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE)) {
ret = wc_AriaShaUpdate(info->hash.sha384->hSession,
(byte *) info->hash.in, info->hash.inSz);
}
- if (((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE))
- && (info->hash.digest != NULL)) {
+ if ((ret == 0) || (ret == CRYPTOCB_UNAVAILABLE)) {
MC_UINT digestSz = 48;
ret = wc_AriaShaFinal(info->hash.sha384->hSession,
info->hash.digest, &digestSz);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-aes.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-aes.c
index 455d30bb..871d6b38 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-aes.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-aes.c
@@ -16493,9 +16493,11 @@ extern void AES_CBC_decrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* iv);
extern void AES_CTR_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr);
+#if defined(GCM_TABLE) || defined(GCM_TABLE_4BIT)
/* in pre-C2x C, constness conflicts for dimensioned arrays can't be resolved. */
extern void GCM_gmult_len(byte* x, /* const */ byte m[32][AES_BLOCK_SIZE],
const unsigned char* data, unsigned long len);
+#endif
extern void AES_GCM_encrypt(const unsigned char* in, unsigned char* out,
unsigned long len, const unsigned char* ks, int nr, unsigned char* ctr);
@@ -16992,6 +16994,7 @@ static WC_INLINE void RIGHTSHIFTX(byte* x)
x[0] ^= borrow;
}
+#if defined(GCM_TABLE) || defined(GCM_TABLE_4BIT)
void GenerateM0(Gcm* gcm)
{
int i;
@@ -17047,6 +17050,7 @@ void GenerateM0(Gcm* gcm)
m32[3] = ByteReverseWord32(m32[3]);
}
}
+#endif /* GCM_TABLE */
int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
{
@@ -17067,7 +17071,9 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
if (ret == 0) {
AES_ECB_encrypt(iv, aes->gcm.H, AES_BLOCK_SIZE,
(const unsigned char*)aes->key, aes->rounds);
- GenerateM0(&aes->gcm);
+ #if defined(GCM_TABLE) || defined(GCM_TABLE_4BIT)
+ GenerateM0(&aes->gcm);
+ #endif /* GCM_TABLE */
}
return ret;
@@ -17101,6 +17107,44 @@ static WC_INLINE void FlattenSzInBits(byte* buf, word32 sz)
buf[7] = sz & 0xff;
}
+#if defined(GCM_TABLE) || defined(GCM_TABLE_4BIT)
+ /* GCM_gmult_len implementation in armv8-32-aes-asm or thumb2-aes-asm */
+ #define GCM_GMULT_LEN(aes, x, a, len) GCM_gmult_len(x, aes->gcm.M0, a, len)
+#elif defined(GCM_SMALL)
+ static void GCM_gmult_len(byte* x, const byte* h,
+ const unsigned char* a, unsigned long len)
+ {
+ byte Z[AES_BLOCK_SIZE];
+ byte V[AES_BLOCK_SIZE];
+ int i, j;
+
+ while (len >= AES_BLOCK_SIZE) {
+ xorbuf(x, a, AES_BLOCK_SIZE);
+
+ XMEMSET(Z, 0, AES_BLOCK_SIZE);
+ XMEMCPY(V, x, AES_BLOCK_SIZE);
+ for (i = 0; i < AES_BLOCK_SIZE; i++) {
+ byte y = h[i];
+ for (j = 0; j < 8; j++) {
+ if (y & 0x80) {
+ xorbuf(Z, V, AES_BLOCK_SIZE);
+ }
+
+ RIGHTSHIFTX(V);
+ y = y << 1;
+ }
+ }
+ XMEMCPY(x, Z, AES_BLOCK_SIZE);
+
+ len -= AES_BLOCK_SIZE;
+ a += AES_BLOCK_SIZE;
+ }
+ }
+ #define GCM_GMULT_LEN(aes, x, a, len) GCM_gmult_len(x, aes->gcm.H, a, len)
+#else
+ #error ARMv8 AES only supports GCM_TABLE or GCM_TABLE_4BIT or GCM_SMALL
+#endif /* GCM_TABLE */
+
static void gcm_ghash_arm32(Aes* aes, const byte* a, word32 aSz, const byte* c,
word32 cSz, byte* s, word32 sSz)
{
@@ -17119,13 +17163,13 @@ static void gcm_ghash_arm32(Aes* aes, const byte* a, word32 aSz, const byte* c,
blocks = aSz / AES_BLOCK_SIZE;
partial = aSz % AES_BLOCK_SIZE;
if (blocks > 0) {
- GCM_gmult_len(x, aes->gcm.M0, a, blocks * AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, a, blocks * AES_BLOCK_SIZE);
a += blocks * AES_BLOCK_SIZE;
}
if (partial != 0) {
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
XMEMCPY(scratch, a, partial);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
}
}
@@ -17134,20 +17178,20 @@ static void gcm_ghash_arm32(Aes* aes, const byte* a, word32 aSz, const byte* c,
blocks = cSz / AES_BLOCK_SIZE;
partial = cSz % AES_BLOCK_SIZE;
if (blocks > 0) {
- GCM_gmult_len(x, aes->gcm.M0, c, blocks * AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, c, blocks * AES_BLOCK_SIZE);
c += blocks * AES_BLOCK_SIZE;
}
if (partial != 0) {
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
XMEMCPY(scratch, c, partial);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
}
}
/* Hash in the lengths of A and C in bits */
FlattenSzInBits(&scratch[0], aSz);
FlattenSzInBits(&scratch[8], cSz);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
/* Copy the result into s. */
XMEMCPY(s, x, sSz);
@@ -17198,13 +17242,13 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
blocks = authInSz / AES_BLOCK_SIZE;
partial = authInSz % AES_BLOCK_SIZE;
if (blocks > 0) {
- GCM_gmult_len(x, aes->gcm.M0, authIn, blocks * AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, authIn, blocks * AES_BLOCK_SIZE);
authIn += blocks * AES_BLOCK_SIZE;
}
if (partial != 0) {
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
XMEMCPY(scratch, authIn, partial);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
}
}
@@ -17214,7 +17258,7 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
if (blocks > 0) {
AES_GCM_encrypt(in, out, blocks * AES_BLOCK_SIZE,
(const unsigned char*)aes->key, aes->rounds, counter);
- GCM_gmult_len(x, aes->gcm.M0, out, blocks * AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, out, blocks * AES_BLOCK_SIZE);
in += blocks * AES_BLOCK_SIZE;
out += blocks * AES_BLOCK_SIZE;
}
@@ -17227,14 +17271,14 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
XMEMCPY(scratch, out, partial);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
}
/* Hash in the lengths of A and C in bits */
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
FlattenSzInBits(&scratch[0], authInSz);
FlattenSzInBits(&scratch[8], sz);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
if (authTagSz > AES_BLOCK_SIZE) {
XMEMCPY(authTag, x, AES_BLOCK_SIZE);
}
@@ -17286,13 +17330,13 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
blocks = authInSz / AES_BLOCK_SIZE;
partial = authInSz % AES_BLOCK_SIZE;
if (blocks > 0) {
- GCM_gmult_len(x, aes->gcm.M0, authIn, blocks * AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, authIn, blocks * AES_BLOCK_SIZE);
authIn += blocks * AES_BLOCK_SIZE;
}
if (partial != 0) {
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
XMEMCPY(scratch, authIn, partial);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
}
}
@@ -17300,7 +17344,7 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
partial = sz % AES_BLOCK_SIZE;
/* do as many blocks as possible */
if (blocks > 0) {
- GCM_gmult_len(x, aes->gcm.M0, in, blocks * AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, in, blocks * AES_BLOCK_SIZE);
AES_GCM_encrypt(in, out, blocks * AES_BLOCK_SIZE,
(const unsigned char*)aes->key, aes->rounds, counter);
@@ -17310,7 +17354,7 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
if (partial != 0) {
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
XMEMCPY(scratch, in, partial);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
AES_GCM_encrypt(in, scratch, AES_BLOCK_SIZE,
(const unsigned char*)aes->key, aes->rounds, counter);
@@ -17320,7 +17364,7 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
XMEMSET(scratch, 0, AES_BLOCK_SIZE);
FlattenSzInBits(&scratch[0], authInSz);
FlattenSzInBits(&scratch[8], sz);
- GCM_gmult_len(x, aes->gcm.M0, scratch, AES_BLOCK_SIZE);
+ GCM_GMULT_LEN(aes, x, scratch, AES_BLOCK_SIZE);
AES_ECB_encrypt(initialCounter, scratch, AES_BLOCK_SIZE,
(const unsigned char*)aes->key, aes->rounds);
xorbuf(x, scratch, authTagSz);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-chacha.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-chacha.c
index 94e64504..18dd9e59 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-chacha.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-chacha.c
@@ -1666,7 +1666,10 @@ static WC_INLINE int wc_Chacha_encrypt_128(const word32 input[CHACHA_CHUNK_WORDS
"VADD.I32 q6, q6, q12 \n\t"
"VADD.I32 q7, q7, q13 \n\t"
- "VLDM %[m], { q8-q15 } \n\t"
+ "VLD1.8 { q8, q9 }, [%[m]]! \n\t"
+ "VLD1.8 { q10, q11 }, [%[m]]! \n\t"
+ "VLD1.8 { q12, q13 }, [%[m]]! \n\t"
+ "VLD1.8 { q14, q15 }, [%[m]]! \n\t"
"VEOR q0, q0, q8 \n\t"
"VEOR q1, q1, q9 \n\t"
"VEOR q2, q2, q10 \n\t"
@@ -1675,7 +1678,10 @@ static WC_INLINE int wc_Chacha_encrypt_128(const word32 input[CHACHA_CHUNK_WORDS
"VEOR q5, q5, q13 \n\t"
"VEOR q6, q6, q14 \n\t"
"VEOR q7, q7, q15 \n\t"
- "VSTM %[c], { q0-q7 } \n\t"
+ "VST1.8 { q0, q1 }, [%[c]]! \n\t"
+ "VST1.8 { q2, q3 }, [%[c]]! \n\t"
+ "VST1.8 { q4, q5 }, [%[c]]! \n\t"
+ "VST1.8 { q6, q7 }, [%[c]]! \n\t"
: [c] "+r" (c), [m] "+r" (m)
: [rounds] "I" (ROUNDS/2), [input] "r" (input),
@@ -2725,14 +2731,14 @@ static WC_INLINE void wc_Chacha_encrypt_64(const word32* input, const byte* m,
"CMP %[bytes], #64 \n\t"
"BLT L_chacha20_arm32_64_lt_64_%= \n\t"
/* XOR full 64 byte block */
- "VLDM %[m], { q4-q7 } \n\t"
- "ADD %[m], %[m], #64 \n\t"
+ "VLD1.8 { q4, q5 }, [%[m]]! \n\t"
+ "VLD1.8 { q6, q7 }, [%[m]]! \n\t"
"VEOR q0, q0, q4 \n\t"
"VEOR q1, q1, q5 \n\t"
"VEOR q2, q2, q6 \n\t"
"VEOR q3, q3, q7 \n\t"
- "VSTM %[c], { q0-q3 } \n\t"
- "ADD %[c], %[c], #64 \n\t"
+ "VST1.8 { q0, q1 }, [%[c]]! \n\t"
+ "VST1.8 { q2, q3 }, [%[c]]! \n\t"
"SUBS %[bytes], %[bytes], #64 \n\t"
"VADD.I32 q11, q11, q14 \n\t"
"BNE L_chacha20_arm32_64_outer_loop_%= \n\t"
@@ -2743,12 +2749,10 @@ static WC_INLINE void wc_Chacha_encrypt_64(const word32* input, const byte* m,
/* XOR 32 bytes */
"CMP %[bytes], #32 \n\t"
"BLT L_chacha20_arm32_64_lt_32_%= \n\t"
- "VLDM %[m], { q4-q5 } \n\t"
- "ADD %[m], %[m], #32 \n\t"
+ "VLD1.8 { q4, q5 }, [%[m]]! \n\t"
"VEOR q4, q4, q0 \n\t"
"VEOR q5, q5, q1 \n\t"
- "VSTM %[c], { q4-q5 } \n\t"
- "ADD %[c], %[c], #32 \n\t"
+ "VST1.8 { q4, q5 }, [%[c]]! \n\t"
"SUBS %[bytes], %[bytes], #32 \n\t"
"VMOV q0, q2 \n\t"
"VMOV q1, q3 \n\t"
@@ -2758,11 +2762,9 @@ static WC_INLINE void wc_Chacha_encrypt_64(const word32* input, const byte* m,
/* XOR 16 bytes */
"CMP %[bytes], #16 \n\t"
"BLT L_chacha20_arm32_64_lt_16_%= \n\t"
- "VLDM %[m], { q4 } \n\t"
- "ADD %[m], %[m], #16 \n\t"
+ "VLD1.8 { q4 }, [%[m]]! \n\t"
"VEOR q4, q4, q0 \n\t"
- "VSTM %[c], { q4 } \n\t"
- "ADD %[c], %[c], #16 \n\t"
+ "VST1.8 { q4 }, [%[c]]! \n\t"
"SUBS %[bytes], %[bytes], #16 \n\t"
"VMOV q0, q1 \n\t"
"BEQ L_chacha20_arm32_64_done_%= \n\t"
@@ -2771,9 +2773,9 @@ static WC_INLINE void wc_Chacha_encrypt_64(const word32* input, const byte* m,
/* XOR 8 bytes */
"CMP %[bytes], #8 \n\t"
"BLT L_chacha20_arm32_64_lt_8_%= \n\t"
- "VLD1.64 { d8 }, [%[m]]! \n\t"
+ "VLD1.8 { d8 }, [%[m]]! \n\t"
"VEOR d8, d8, d0 \n\t"
- "VST1.64 { d8 }, [%[c]]! \n\t"
+ "VST1.8 { d8 }, [%[c]]! \n\t"
"SUBS %[bytes], %[bytes], #8 \n\t"
"VMOV d0, d1 \n\t"
"BEQ L_chacha20_arm32_64_done_%= \n\t"
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-sha256.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-sha256.c
index 55860d86..37380a3d 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-sha256.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/armv8-sha256.c
@@ -130,8 +130,8 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
word32* k = (word32*)K;
__asm__ volatile (
- "#load leftover data\n"
- "LD1 {v0.2d-v3.2d}, %[buffer] \n"
+ "# load first block of data\n"
+ "LD1 {v0.16b-v3.16b}, [%[dataIn]], #64 \n"
"#load current digest\n"
"LD1 {v12.2d-v13.2d}, %[digest] \n"
@@ -281,7 +281,7 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
"CBZ w8, 2f \n"
"#load in message and schedule updates \n"
- "LD1 {v0.2d-v3.2d}, [%[dataIn]], #64 \n"
+ "LD1 {v0.16b-v3.16b}, [%[dataIn]], #64 \n"
"MOV v14.16b, v12.16b \n"
"MOV v15.16b, v13.16b \n"
"REV32 v0.16b, v0.16b \n"
@@ -291,12 +291,11 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
"B 1b \n" /* do another block */
"2:\n"
- "STP q12, q13, %[out] \n"
+ "ST1 {v12.2d-v13.2d}, %[out] \n"
- : [out] "=m" (sha256->digest), "=m" (sha256->buffer), "=r" (numBlocks),
- "=r" (data), "=r" (k)
- : [k] "4" (k), [digest] "m" (sha256->digest), [buffer] "m" (sha256->buffer),
- [blocks] "2" (numBlocks), [dataIn] "3" (data)
+ : [out] "=m" (sha256->digest), "=r" (numBlocks), "=r" (data), "=r" (k)
+ : [k] "3" (k), [digest] "m" (sha256->digest), [blocks] "1" (numBlocks),
+ [dataIn] "2" (data)
: "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7",
"v8", "v9", "v10", "v11", "v12", "v13", "v14",
"v15", "v16", "v17", "v18", "v19", "v20", "v21",
@@ -306,35 +305,42 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
}
/* ARMv8 hardware acceleration */
-static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
+static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data,
+ word32 len)
{
word32 add;
word32 numBlocks;
/* only perform actions if a buffer is passed in */
if (len > 0) {
- /* fill leftover buffer with data */
- add = min(len, WC_SHA256_BLOCK_SIZE - sha256->buffLen);
- XMEMCPY((byte*)(sha256->buffer) + sha256->buffLen, data, add);
- sha256->buffLen += add;
- data += add;
- len -= add;
+ AddLength(sha256, len);
+
+ if (sha256->buffLen > 0) {
+ /* fill leftover buffer with data */
+ add = min(len, WC_SHA256_BLOCK_SIZE - sha256->buffLen);
+ XMEMCPY((byte*)(sha256->buffer) + sha256->buffLen, data, add);
+ sha256->buffLen += add;
+ data += add;
+ len -= add;
+ if (sha256->buffLen == WC_SHA256_BLOCK_SIZE) {
+ Sha256Transform(sha256, (byte*)sha256->buffer, 1);
+ sha256->buffLen = 0;
+ }
+ }
/* number of blocks in a row to complete */
numBlocks = (len + sha256->buffLen)/WC_SHA256_BLOCK_SIZE;
if (numBlocks > 0) {
- /* get leftover amount after blocks */
- add = (len + sha256->buffLen) - numBlocks * WC_SHA256_BLOCK_SIZE;
-
Sha256Transform(sha256, data, numBlocks);
- data += numBlocks * WC_SHA256_BLOCK_SIZE - sha256->buffLen;
-
- AddLength(sha256, WC_SHA256_BLOCK_SIZE * numBlocks);
+ data += numBlocks * WC_SHA256_BLOCK_SIZE;
+ len -= numBlocks * WC_SHA256_BLOCK_SIZE;
+ }
+ if (len > 0) {
/* copy over any remaining data leftover */
- XMEMCPY(sha256->buffer, data, add);
- sha256->buffLen = add;
+ XMEMCPY(sha256->buffer, data, len);
+ sha256->buffLen = len;
}
}
@@ -352,8 +358,6 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
const word32* k;
local = (byte*)sha256->buffer;
- AddLength(sha256, sha256->buffLen); /* before adding pads */
-
local[sha256->buffLen++] = 0x80; /* add 1 */
/* pad with zeros */
@@ -380,7 +384,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"MOV v16.16b, v20.16b \n"
"MOV v17.16b, v21.16b \n"
- "LD1 {v22.16b-v25.16b}, [%[k]], #64 \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]], #64 \n"
"SHA256SU0 v4.4s, v1.4s \n"
"ADD v0.4s, v0.4s, v22.4s \n"
"MOV v6.16b, v2.16b \n"
@@ -413,7 +417,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"SHA256H q16, q17, v3.4s \n"
"SHA256H2 q17, q18, v3.4s \n"
- "LD1 {v22.16b-v25.16b}, [%[k]], #64 \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]], #64 \n"
"SHA256SU0 v8.4s, v5.4s \n"
"ADD v4.4s, v4.4s, v22.4s \n"
"MOV v18.16b, v16.16b \n"
@@ -446,7 +450,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"SHA256H q16, q17, v7.4s \n"
"SHA256H2 q17, q18, v7.4s \n"
- "LD1 {v22.16b-v25.16b}, [%[k]], #64 \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]], #64 \n"
"SHA256SU0 v12.4s, v9.4s \n"
"ADD v8.4s, v8.4s, v22.4s \n"
"MOV v18.16b, v16.16b \n"
@@ -477,7 +481,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"SHA256H q16, q17, v11.4s \n"
"SHA256H2 q17, q18, v11.4s \n"
- "LD1 {v22.16b-v25.16b}, [%[k]] \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]] \n"
"ADD v12.4s, v12.4s, v22.4s \n"
"MOV v18.16b, v16.16b \n"
"SHA256H q16, q17, v12.4s \n"
@@ -501,7 +505,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"#Add working vars back into digest state \n"
"ADD v16.4s, v16.4s, v20.4s \n"
"ADD v17.4s, v17.4s, v21.4s \n"
- "STP q16, q17, %[out] \n"
+ "ST1 {v16.2d-v17.2d}, %[out] \n"
: [out] "=m" (sha256->digest), [k] "+r" (k)
: [digest] "m" (sha256->digest),
@@ -551,7 +555,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"MOV v16.16b, v20.16b \n"
"MOV v17.16b, v21.16b \n"
- "LD1 {v22.16b-v25.16b}, [%[k]], #64 \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]], #64 \n"
"SHA256SU0 v4.4s, v1.4s \n"
"ADD v0.4s, v0.4s, v22.4s \n"
"MOV v6.16b, v2.16b \n"
@@ -584,7 +588,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"SHA256H q16, q17, v3.4s \n"
"SHA256H2 q17, q18, v3.4s \n"
- "LD1 {v22.16b-v25.16b}, [%[k]], #64 \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]], #64 \n"
"SHA256SU0 v8.4s, v5.4s \n"
"ADD v4.4s, v4.4s, v22.4s \n"
"MOV v18.16b, v16.16b \n"
@@ -617,7 +621,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"SHA256H q16, q17, v7.4s \n"
"SHA256H2 q17, q18, v7.4s \n"
- "LD1 {v22.16b-v25.16b}, [%[k]], #64 \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]], #64 \n"
"SHA256SU0 v12.4s, v9.4s \n"
"ADD v8.4s, v8.4s, v22.4s \n"
"MOV v18.16b, v16.16b \n"
@@ -648,7 +652,7 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
"SHA256H q16, q17, v11.4s \n"
"SHA256H2 q17, q18, v11.4s \n"
- "LD1 {v22.16b-v25.16b}, [%[k]] \n"
+ "LD1 {v22.4s-v25.4s}, [%[k]] \n"
"ADD v12.4s, v12.4s, v22.4s \n"
"MOV v18.16b, v16.16b \n"
"SHA256H q16, q17, v12.4s \n"
@@ -704,8 +708,9 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
word32* digPt = sha256->digest;
__asm__ volatile (
- "#load leftover data\n"
- "VLDM %[buffer]!, {q0-q3} \n"
+ "# load first block of data\n"
+ "VLD1.8 {d0-d3}, [%[dataIn]]! \n"
+ "VLD1.8 {d4-d7}, [%[dataIn]]! \n"
"#load current digest\n"
"VLDM %[digest], {q12-q13} \n"
@@ -865,10 +870,8 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
"BEQ 2f \n"
"#load in message and schedule updates \n"
- "VLD1.32 {q0}, [%[dataIn]]! \n"
- "VLD1.32 {q1}, [%[dataIn]]! \n"
- "VLD1.32 {q2}, [%[dataIn]]! \n"
- "VLD1.32 {q3}, [%[dataIn]]! \n"
+ "VLD1.8 {d0-d3}, [%[dataIn]]! \n"
+ "VLD1.8 {d4-d7}, [%[dataIn]]! \n"
/* reset K pointer */
"SUB %[k], %[k], #160 \n"
@@ -894,35 +897,42 @@ static WC_INLINE void Sha256Transform(wc_Sha256* sha256, const byte* data,
}
/* ARMv8 hardware acceleration Aarch32 */
-static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
+static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data,
+ word32 len)
{
word32 add;
word32 numBlocks;
/* only perform actions if a buffer is passed in */
if (len > 0) {
- /* fill leftover buffer with data */
- add = min(len, WC_SHA256_BLOCK_SIZE - sha256->buffLen);
- XMEMCPY((byte*)(sha256->buffer) + sha256->buffLen, data, add);
- sha256->buffLen += add;
- data += add;
- len -= add;
+ AddLength(sha256, len);
+
+ if (sha256->buffLen > 0) {
+ /* fill leftover buffer with data */
+ add = min(len, WC_SHA256_BLOCK_SIZE - sha256->buffLen);
+ XMEMCPY((byte*)(sha256->buffer) + sha256->buffLen, data, add);
+ sha256->buffLen += add;
+ data += add;
+ len -= add;
+ if (sha256->buffLen == WC_SHA256_BLOCK_SIZE) {
+ Sha256Transform(sha256, (byte*)sha256->buffer, 1);
+ sha256->buffLen = 0;
+ }
+ }
/* number of blocks in a row to complete */
numBlocks = (len + sha256->buffLen)/WC_SHA256_BLOCK_SIZE;
if (numBlocks > 0) {
- /* get leftover amount after blocks */
- add = (len + sha256->buffLen) - numBlocks * WC_SHA256_BLOCK_SIZE;
-
Sha256Transform(sha256, data, numBlocks);
- data += numBlocks * WC_SHA256_BLOCK_SIZE - sha256->buffLen;
-
- AddLength(sha256, WC_SHA256_BLOCK_SIZE * numBlocks);
+ data += numBlocks * WC_SHA256_BLOCK_SIZE;
+ len -= numBlocks * WC_SHA256_BLOCK_SIZE;
+ }
+ if (len > 0) {
/* copy over any remaining data leftover */
- XMEMCPY(sha256->buffer, data, add);
- sha256->buffLen = add;
+ XMEMCPY(sha256->buffer, data, len);
+ sha256->buffLen = len;
}
}
@@ -943,8 +953,6 @@ static WC_INLINE int Sha256Final(wc_Sha256* sha256, byte* hash)
}
local = (byte*)sha256->buffer;
- AddLength(sha256, sha256->buffLen); /* before adding pads */
-
local[sha256->buffLen++] = 0x80; /* add 1 */
/* pad with zeros */
@@ -1615,14 +1623,86 @@ int wc_Sha256Transform(wc_Sha256* sha256, const unsigned char* data)
XMEMCPY(sha256->buffer, data, WC_SHA256_BLOCK_SIZE);
#endif
#ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO
- Sha256Transform(sha256, data, 1);
+ Sha256Transform(sha256, (byte*)sha256->buffer, 1);
#else
- Transform_Sha256_Len(sha256, data, WC_SHA256_BLOCK_SIZE);
+ Transform_Sha256_Len(sha256, (byte*)sha256->buffer, WC_SHA256_BLOCK_SIZE);
#endif
return 0;
}
#endif
+#if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_FULL_HASH)
+/* One block will be used from data.
+ * hash must be big enough to hold all of digest output.
+ */
+int wc_Sha256HashBlock(wc_Sha256* sha256, const unsigned char* data,
+ unsigned char* hash)
+{
+ int ret = 0;
+
+ if ((sha256 == NULL) || (data == NULL)) {
+ return BAD_FUNC_ARG;
+ }
+
+#ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO
+ Sha256Transform(sha256, data, 1);
+#else
+ Transform_Sha256_Len(sha256, data, WC_SHA256_BLOCK_SIZE);
+#endif
+
+ if (hash != NULL) {
+#ifdef LITTLE_ENDIAN_ORDER
+ #ifndef WOLFSSL_ARMASM_NO_HW_CRYPTO
+ #ifdef __aarch64__
+ __asm__ __volatile__ (
+ "LD1 {v0.2d-v1.2d}, [%[digest]] \n"
+ "REV32 v0.16b, v0.16b \n"
+ "REV32 v1.16b, v1.16b \n"
+ "ST1 {v0.16b-v1.16b}, [%[hash]] \n"
+ :
+ : [digest] "r" (sha256->digest), [hash] "r" (hash)
+ : "memory", "v0", "v1"
+ );
+ #else
+ __asm__ __volatile__ (
+ "VLDM %[digest], {q0-q1} \n"
+ "VREV32.8 q0, q0 \n"
+ "VREV32.8 q1, q1 \n"
+ "VST1.8 {d0-d3}, [%[hash]] \n"
+ :
+ : [digest] "r" (sha256->digest), [hash] "r" (hash)
+ : "memory", "q0", "q1"
+ );
+ #endif
+ #else
+ word32* hash32 = (word32*)hash;
+ word32* digest = (word32*)sha256->digest;
+ hash32[0] = ByteReverseWord32(digest[0]);
+ hash32[1] = ByteReverseWord32(digest[1]);
+ hash32[2] = ByteReverseWord32(digest[2]);
+ hash32[3] = ByteReverseWord32(digest[3]);
+ hash32[4] = ByteReverseWord32(digest[4]);
+ hash32[5] = ByteReverseWord32(digest[5]);
+ hash32[6] = ByteReverseWord32(digest[6]);
+ hash32[7] = ByteReverseWord32(digest[7]);
+ #endif /* !WOLFSSL_ARMASM_NO_HW_CRYPTO */
+#else
+ XMEMCPY(hash, sha256->digest, WC_SHA256_DIGEST_SIZE);
+#endif
+ sha256->digest[0] = 0x6A09E667L;
+ sha256->digest[1] = 0xBB67AE85L;
+ sha256->digest[2] = 0x3C6EF372L;
+ sha256->digest[3] = 0xA54FF53AL;
+ sha256->digest[4] = 0x510E527FL;
+ sha256->digest[5] = 0x9B05688CL;
+ sha256->digest[6] = 0x1F83D9ABL;
+ sha256->digest[7] = 0x5BE0CD19L;
+ }
+
+ return ret;
+}
+#endif /* WOLFSSL_HAVE_LMS && !WOLFSSL_LMS_FULL_HASH */
+
#endif /* !NO_SHA256 */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm.S b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm.S
index 0badf8f9..68695a7e 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm.S
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm.S
@@ -714,15 +714,19 @@ AES_set_encrypt_key:
#else
BEQ.W L_AES_set_encrypt_key_start_192
#endif
- LDRD r4, r5, [r0]
- LDRD r6, r7, [r0, #8]
+ LDR r4, [r0]
+ LDR r5, [r0, #4]
+ LDR r6, [r0, #8]
+ LDR r7, [r0, #12]
REV r4, r4
REV r5, r5
REV r6, r6
REV r7, r7
STM r2!, {r4, r5, r6, r7}
- LDRD r4, r5, [r0, #16]
- LDRD r6, r7, [r0, #24]
+ LDR r4, [r0, #16]
+ LDR r5, [r0, #20]
+ LDR r6, [r0, #24]
+ LDR r7, [r0, #28]
REV r4, r4
REV r5, r5
REV r6, r6
@@ -805,9 +809,12 @@ L_AES_set_encrypt_key_loop_256:
B.N L_AES_set_encrypt_key_end
#endif
L_AES_set_encrypt_key_start_192:
- LDRD r4, r5, [r0]
- LDRD r6, r7, [r0, #8]
- LDRD r8, r9, [r0, #16]
+ LDR r4, [r0]
+ LDR r5, [r0, #4]
+ LDR r6, [r0, #8]
+ LDR r7, [r0, #12]
+ LDR r8, [r0, #16]
+ LDR r9, [r0, #20]
REV r4, r4
REV r5, r5
REV r6, r6
@@ -871,8 +878,10 @@ L_AES_set_encrypt_key_loop_192:
B.N L_AES_set_encrypt_key_end
#endif
L_AES_set_encrypt_key_start_128:
- LDRD r4, r5, [r0]
- LDRD r6, r7, [r0, #8]
+ LDR r4, [r0]
+ LDR r5, [r0, #4]
+ LDR r6, [r0, #8]
+ LDR r7, [r0, #12]
REV r4, r4
REV r5, r5
REV r6, r6
@@ -907,7 +916,7 @@ L_AES_set_encrypt_key_loop_128:
#endif
L_AES_set_encrypt_key_end:
POP {r4, r5, r6, r7, r8, r9, r10, pc}
- /* Cycle Count = 331 */
+ /* Cycle Count = 340 */
.size AES_set_encrypt_key,.-AES_set_encrypt_key
.text
.align 4
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm_c.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm_c.c
index 54531316..fc4be05f 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm_c.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-aes-asm_c.c
@@ -54,7 +54,7 @@
#include <wolfssl/wolfcrypt/aes.h>
#ifdef HAVE_AES_DECRYPT
-static const uint32_t L_AES_Thumb2_td_data[] = {
+XALIGNED(16) static const uint32_t L_AES_Thumb2_td_data[] = {
0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e,
0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303,
0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c,
@@ -123,7 +123,7 @@ static const uint32_t L_AES_Thumb2_td_data[] = {
#endif /* HAVE_AES_DECRYPT */
#if defined(HAVE_AES_DECRYPT) || defined(HAVE_AES_CBC) || defined(HAVE_AESCCM) || defined(HAVE_AESGCM) || defined(WOLFSSL_AES_DIRECT) || defined(WOLFSSL_AES_COUNTER)
-static const uint32_t L_AES_Thumb2_te_data[] = {
+XALIGNED(16) static const uint32_t L_AES_Thumb2_te_data[] = {
0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b,
0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5,
0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b,
@@ -310,16 +310,17 @@ void AES_invert_key(unsigned char* ks, word32 rounds)
: [ks] "+r" (ks), [rounds] "+r" (rounds),
[L_AES_Thumb2_te] "+r" (L_AES_Thumb2_te_c), [L_AES_Thumb2_td] "+r" (L_AES_Thumb2_td_c)
:
+ : "memory", "r12", "lr", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
#else
: [ks] "+r" (ks), [rounds] "+r" (rounds)
: [L_AES_Thumb2_te] "r" (L_AES_Thumb2_te), [L_AES_Thumb2_td] "r" (L_AES_Thumb2_td)
-#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
: "memory", "r12", "lr", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
+#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
);
}
#endif /* HAVE_AES_DECRYPT */
-static const uint32_t L_AES_Thumb2_rcon[] = {
+XALIGNED(16) static const uint32_t L_AES_Thumb2_rcon[] = {
0x01000000, 0x02000000, 0x04000000, 0x08000000,
0x10000000, 0x20000000, 0x40000000, 0x80000000,
0x1b000000, 0x36000000
@@ -356,15 +357,19 @@ void AES_set_encrypt_key(const unsigned char* key, word32 len, unsigned char* ks
#else
"BEQ.W L_AES_set_encrypt_key_start_192\n\t"
#endif
- "LDRD r4, r5, [%[key]]\n\t"
- "LDRD r6, r7, [%[key], #8]\n\t"
+ "LDR r4, [%[key]]\n\t"
+ "LDR r5, [%[key], #4]\n\t"
+ "LDR r6, [%[key], #8]\n\t"
+ "LDR r7, [%[key], #12]\n\t"
"REV r4, r4\n\t"
"REV r5, r5\n\t"
"REV r6, r6\n\t"
"REV r7, r7\n\t"
"STM %[ks]!, {r4, r5, r6, r7}\n\t"
- "LDRD r4, r5, [%[key], #16]\n\t"
- "LDRD r6, r7, [%[key], #24]\n\t"
+ "LDR r4, [%[key], #16]\n\t"
+ "LDR r5, [%[key], #20]\n\t"
+ "LDR r6, [%[key], #24]\n\t"
+ "LDR r7, [%[key], #28]\n\t"
"REV r4, r4\n\t"
"REV r5, r5\n\t"
"REV r6, r6\n\t"
@@ -449,9 +454,12 @@ void AES_set_encrypt_key(const unsigned char* key, word32 len, unsigned char* ks
#endif
"\n"
"L_AES_set_encrypt_key_start_192:\n\t"
- "LDRD r4, r5, [%[key]]\n\t"
- "LDRD r6, r7, [%[key], #8]\n\t"
- "LDRD r8, r9, [%[key], #16]\n\t"
+ "LDR r4, [%[key]]\n\t"
+ "LDR r5, [%[key], #4]\n\t"
+ "LDR r6, [%[key], #8]\n\t"
+ "LDR r7, [%[key], #12]\n\t"
+ "LDR r8, [%[key], #16]\n\t"
+ "LDR r9, [%[key], #20]\n\t"
"REV r4, r4\n\t"
"REV r5, r5\n\t"
"REV r6, r6\n\t"
@@ -517,8 +525,10 @@ void AES_set_encrypt_key(const unsigned char* key, word32 len, unsigned char* ks
#endif
"\n"
"L_AES_set_encrypt_key_start_128:\n\t"
- "LDRD r4, r5, [%[key]]\n\t"
- "LDRD r6, r7, [%[key], #8]\n\t"
+ "LDR r4, [%[key]]\n\t"
+ "LDR r5, [%[key], #4]\n\t"
+ "LDR r6, [%[key], #8]\n\t"
+ "LDR r7, [%[key], #12]\n\t"
"REV r4, r4\n\t"
"REV r5, r5\n\t"
"REV r6, r6\n\t"
@@ -558,11 +568,12 @@ void AES_set_encrypt_key(const unsigned char* key, word32 len, unsigned char* ks
: [key] "+r" (key), [len] "+r" (len), [ks] "+r" (ks),
[L_AES_Thumb2_te] "+r" (L_AES_Thumb2_te_c), [L_AES_Thumb2_rcon] "+r" (L_AES_Thumb2_rcon_c)
:
+ : "memory", "r12", "lr", "r5", "r6", "r7", "r8", "r9", "r10", "cc"
#else
: [key] "+r" (key), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_te] "r" (L_AES_Thumb2_te), [L_AES_Thumb2_rcon] "r" (L_AES_Thumb2_rcon)
-#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
: "memory", "r12", "lr", "r5", "r6", "r7", "r8", "r9", "r10", "cc"
+#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
);
}
@@ -969,12 +980,16 @@ void AES_ECB_encrypt(const unsigned char* in, unsigned char* out, unsigned long
: [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr),
[L_AES_Thumb2_te_ecb] "+r" (L_AES_Thumb2_te_ecb_c)
:
+ : "memory", "r12", "lr", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
#else
- : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr)
+ : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_te_ecb] "r" (L_AES_Thumb2_te_ecb)
+ : "memory", "r12", "lr", "r4", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
- : "memory", "r12", "lr", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
);
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)nr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
}
#endif /* HAVE_AESCCM || HAVE_AESGCM || WOLFSSL_AES_DIRECT || WOLFSSL_AES_COUNTER */
@@ -1169,12 +1184,19 @@ void AES_CBC_encrypt(const unsigned char* in, unsigned char* out, unsigned long
: [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [iv] "+r" (iv),
[L_AES_Thumb2_te_ecb] "+r" (L_AES_Thumb2_te_ecb_c)
:
+ : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
#else
- : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [iv] "+r" (iv)
+ : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_te_ecb] "r" (L_AES_Thumb2_te_ecb)
+ : "memory", "r12", "lr", "r4", "r5", "r7", "r8", "r9", "r10", "r11", "cc"
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
- : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
);
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)nr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)iv;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
}
#endif /* HAVE_AES_CBC */
@@ -1390,12 +1412,19 @@ void AES_CTR_encrypt(const unsigned char* in, unsigned char* out, unsigned long
: [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [ctr] "+r" (ctr),
[L_AES_Thumb2_te_ecb] "+r" (L_AES_Thumb2_te_ecb_c)
:
+ : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
#else
- : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [ctr] "+r" (ctr)
+ : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_te_ecb] "r" (L_AES_Thumb2_te_ecb)
+ : "memory", "r12", "lr", "r4", "r5", "r7", "r8", "r9", "r10", "r11", "cc"
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
- : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
);
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)nr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)ctr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
}
#endif /* WOLFSSL_AES_COUNTER */
@@ -1834,12 +1863,16 @@ void AES_ECB_decrypt(const unsigned char* in, unsigned char* out, unsigned long
: [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr),
[L_AES_Thumb2_td_ecb] "+r" (L_AES_Thumb2_td_ecb_c), [L_AES_Thumb2_td4] "+r" (L_AES_Thumb2_td4_c)
:
+ : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
#else
- : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr)
+ : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_td_ecb] "r" (L_AES_Thumb2_td_ecb), [L_AES_Thumb2_td4] "r" (L_AES_Thumb2_td4)
+ : "memory", "r12", "lr", "r4", "r7", "r8", "r9", "r10", "r11", "cc"
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
- : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
);
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)nr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
}
#endif /* WOLFSSL_AES_DIRECT || WOLFSSL_AES_COUNTER */
@@ -2193,19 +2226,26 @@ void AES_CBC_decrypt(const unsigned char* in, unsigned char* out, unsigned long
: [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [iv] "+r" (iv),
[L_AES_Thumb2_td_ecb] "+r" (L_AES_Thumb2_td_ecb_c), [L_AES_Thumb2_td4] "+r" (L_AES_Thumb2_td4_c)
:
+ : "memory", "r12", "lr", "r8", "r9", "r10", "r11", "cc"
#else
- : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [iv] "+r" (iv)
+ : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_td_ecb] "r" (L_AES_Thumb2_td_ecb), [L_AES_Thumb2_td4] "r" (L_AES_Thumb2_td4)
+ : "memory", "r12", "lr", "r4", "r5", "r8", "r9", "r10", "r11", "cc"
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
- : "memory", "r12", "lr", "r8", "r9", "r10", "r11", "cc"
);
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)nr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)iv;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
}
#endif /* HAVE_AES_CBC */
#endif /* WOLFSSL_AES_DIRECT || WOLFSSL_AES_COUNTER || HAVE_AES_CBC */
#endif /* HAVE_AES_DECRYPT */
#ifdef HAVE_AESGCM
-static const uint32_t L_GCM_gmult_len_r[] = {
+XALIGNED(16) static const uint32_t L_GCM_gmult_len_r[] = {
0x00000000, 0x1c200000, 0x38400000, 0x24600000,
0x70800000, 0x6ca00000, 0x48c00000, 0x54e00000,
0xe1000000, 0xfd200000, 0xd9400000, 0xc5600000,
@@ -2785,11 +2825,12 @@ void GCM_gmult_len(unsigned char* x, const unsigned char** m, const unsigned cha
: [x] "+r" (x), [m] "+r" (m), [data] "+r" (data), [len] "+r" (len),
[L_GCM_gmult_len_r] "+r" (L_GCM_gmult_len_r_c)
:
+ : "memory", "r12", "lr", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
#else
: [x] "+r" (x), [m] "+r" (m), [data] "+r" (data), [len] "+r" (len)
: [L_GCM_gmult_len_r] "r" (L_GCM_gmult_len_r)
-#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
: "memory", "r12", "lr", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "cc"
+#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
);
}
@@ -2996,12 +3037,19 @@ void AES_GCM_encrypt(const unsigned char* in, unsigned char* out, unsigned long
: [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [ctr] "+r" (ctr),
[L_AES_Thumb2_te_gcm] "+r" (L_AES_Thumb2_te_gcm_c)
:
+ : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
#else
- : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks), [nr] "+r" (nr), [ctr] "+r" (ctr)
+ : [in] "+r" (in), [out] "+r" (out), [len] "+r" (len), [ks] "+r" (ks)
: [L_AES_Thumb2_te_gcm] "r" (L_AES_Thumb2_te_gcm)
+ : "memory", "r12", "lr", "r4", "r5", "r7", "r8", "r9", "r10", "r11", "cc"
#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
- : "memory", "r12", "lr", "r7", "r8", "r9", "r10", "r11", "cc"
);
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)nr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
+#ifdef WOLFSSL_NO_VAR_ASSIGN_REG
+ (void)ctr;
+#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
}
#endif /* HAVE_AESGCM */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha256-asm_c.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha256-asm_c.c
index 4654dd21..93f8078a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha256-asm_c.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha256-asm_c.c
@@ -54,7 +54,7 @@
#include <wolfssl/wolfcrypt/sha256.h>
#ifdef WOLFSSL_ARMASM_NO_NEON
-static const uint32_t L_SHA256_transform_len_k[] = {
+XALIGNED(16) static const uint32_t L_SHA256_transform_len_k[] = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
@@ -1459,11 +1459,12 @@ void Transform_Sha256_Len(wc_Sha256* sha256, const byte* data, word32 len)
: [sha256] "+r" (sha256), [data] "+r" (data), [len] "+r" (len),
[L_SHA256_transform_len_k] "+r" (L_SHA256_transform_len_k_c)
:
+ : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "cc"
#else
: [sha256] "+r" (sha256), [data] "+r" (data), [len] "+r" (len)
: [L_SHA256_transform_len_k] "r" (L_SHA256_transform_len_k)
-#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
: "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "cc"
+#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
);
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha512-asm_c.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha512-asm_c.c
index d7fbd83e..ab154ada 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha512-asm_c.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/arm/thumb2-sha512-asm_c.c
@@ -3574,11 +3574,12 @@ void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
: [sha512] "+r" (sha512), [data] "+r" (data), [len] "+r" (len),
[L_SHA512_transform_len_k] "+r" (L_SHA512_transform_len_k_c)
:
+ : "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "cc"
#else
: [sha512] "+r" (sha512), [data] "+r" (data), [len] "+r" (len)
: [L_SHA512_transform_len_k] "r" (L_SHA512_transform_len_k)
-#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
: "memory", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "cc"
+#endif /* WOLFSSL_NO_VAR_ASSIGN_REG */
);
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/README.md b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/README.md
new file mode 100644
index 00000000..004989ae
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/README.md
@@ -0,0 +1,45 @@
+## 1.0 Intro To Using wolfSSL with AutoSAR
+
+This readme covers building and using wolfSSL for AutoSAR applications. Currently AES-CBC and RNG are supported. The version of AutoSAR used for reference was 4.4. Currently there is no asynchronous support.
+
+
+## 2.0 Building wolfSSL
+
+### 2.1 wolfSSL Library
+To enable the use of AutoSAR with wolfSSL use the enable option --enable-autosar. In example “./configure --eanble-autosarâ€. If building without autotools then the macro WOLFSSL_AUTOSAR should be defined. This is usually defined in a user_settings.h file which gets included to the wolfSSL build when the macro WOLFSSL_USER_SETTINGS is defined.
+
+
+### 2.2 Key Redirection
+By default the next available key with the same key type desired is used. When specific keys are to be used then key input redirection is needed. This is done at compile time with setting specific macros. An example of key redirection would be as follows :
+
+/* set redirection of primary and secondary */
+#define REDIRECTION_CONFIG 0x03
+
+/* set primary key to keyId of 1 and element type CRYPTO_KE_CIPHER_KEY */
+#define REDIRECTION_IN1_KEYID 1
+#define REDIRECTION_IN1_KEYELMID 0x01
+
+
+/* set secondary key to keyId of 4 and element type CRYPTO_KE_CIPHER_IV */
+#define REDIRECTION_IN2_KEYID 4
+#define REDIRECTION_IN2_KEYELMID 0x05
+
+
+## 3.0 example
+
+There is an example test case located at wolfcrypt/src/port/autsar/example.c. After compiling with autotools (./configure --enable-autsar && make) the example can be ran by running the command ./wolfcrypt/src/port/autsar/example.test
+
+## 4.0 API Implemented
+
+- Std_ReturnType Csm_Decrypt(uint32 jobId,
+ Crypto_OperationModeType mode, const uint8* dataPtr, uint32 dataLength,
+ uint8* resultPtr, uint32* resultLengthPtr);
+- Std_ReturnType Csm_Encrypt(uint32 jobId,
+ Crypto_OperationModeType mode, const uint8* dataPtr, uint32 dataLength,
+ uint8* resultPtr, uint32* resultLengthPtr);
+- Std_ReturnType Csm_KeyElementSet(uint32 keyId, uint32 keyElementId,
+ const uint8* keyPtr, uint32 keyLength);
+- Std_ReturnType Csm_RandomGenerate( uint32 jobId, uint8* resultPtr,
+ uint32* resultLengthPtr);
+
+Along with the structures necessary for these API. \ No newline at end of file
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/cryif.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/cryif.c
new file mode 100644
index 00000000..0bd767b4
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/cryif.c
@@ -0,0 +1,103 @@
+/* cryif.c
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+/* AutoSAR 4.4 */
+/* shim layer for use of wolfSSL crypto driver */
+
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/version.h>
+#include <wolfssl/wolfcrypt/port/autosar/Csm.h>
+#include <wolfssl/wolfcrypt/port/autosar/CryIf.h>
+#include <wolfssl/wolfcrypt/port/autosar/Crypto.h>
+
+#ifdef WOLFSSL_AUTOSAR
+#ifndef NO_WOLFSSL_AUTOSAR_CRYIF
+
+#include <wolfssl/wolfcrypt/logging.h>
+
+/* initialization function */
+void CryIf_Init(const CryIf_ConfigType* in)
+{
+ (void)in;
+ Crypto_Init(NULL);
+}
+
+
+void CryIf_GetVersionInfo(Std_VersionInfoType* ver)
+{
+ if (ver != NULL) {
+ ver->vendorID = 0; /* no vendor or module ID */
+ ver->moduleID = 0;
+ ver->sw_major_version = (LIBWOLFSSL_VERSION_HEX >> 24) & 0xFFF;
+ ver->sw_minor_version = (LIBWOLFSSL_VERSION_HEX >> 12) & 0xFFF;
+ ver->sw_patch_version = (LIBWOLFSSL_VERSION_HEX) & 0xFFF;
+ }
+}
+
+
+/* returns E_OK on success */
+Std_ReturnType CryIf_ProcessJob(uint32 id, Crypto_JobType* job)
+{
+ WOLFSSL_ENTER("CryIf_ProcessJob");
+ if (job == NULL) {
+ return E_NOT_OK;
+ }
+
+ /* only handle synchronous jobs */
+ if (job->jobPrimitiveInfo->processingType != CRYPTO_PROCESSING_SYNC) {
+ WOLFSSL_MSG("Crypto Interface only supporting synchronous jobs");
+ return E_NOT_OK;
+ }
+
+ return Crypto_ProcessJob(id, job);
+}
+
+
+/* not implemented yet since async not supported */
+Std_ReturnType CryIf_CancelJob(uint32 id, Crypto_JobType* job)
+{
+ (void)id;
+ (void)job;
+ WOLFSSL_STUB("CryIf_CancelJob");
+
+ return E_NOT_OK;
+}
+
+
+/* return E_OK on success */
+Std_ReturnType CryIf_KeyElementSet(uint32 keyId, uint32 eId, const uint8* key,
+ uint32 keySz)
+{
+ if (key == NULL || keySz == 0) {
+ /* report CRYIF_E_PARAM_POINTER to the DET */
+ return E_NOT_OK;
+ }
+
+ return Crypto_KeyElementSet(keyId, eId, key, keySz);
+}
+#endif /* NO_WOLFSSL_AUTOSAR_CRYIF */
+#endif /* WOLFSSL_AUTOSAR */
+
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/crypto.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/crypto.c
new file mode 100644
index 00000000..e124b3ca
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/crypto.c
@@ -0,0 +1,495 @@
+/* crypto.c
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/port/autosar/Csm.h>
+#include <wolfssl/wolfcrypt/port/autosar/Crypto.h>
+
+#ifdef WOLFSSL_AUTOSAR
+#ifndef NO_WOLFSSL_AUTOSAR_CRYPTO
+
+#include <wolfssl/wolfcrypt/logging.h>
+#include <wolfssl/wolfcrypt/aes.h>
+#include <wolfssl/wolfcrypt/random.h>
+
+#ifdef NO_INLINE
+ #include <wolfssl/wolfcrypt/misc.h>
+#else
+ #define WOLFSSL_MISC_INCLUDED
+ #include <wolfcrypt/src/misc.c>
+#endif
+
+/* Low level crypto (software based driver) where wolfCrypt gets called */
+Std_ReturnType wolfSSL_Crypto_CBC(Crypto_JobType* job);
+Std_ReturnType wolfSSL_Crypto(Crypto_JobType* job);
+Std_ReturnType wolfSSL_Crypto_RNG(Crypto_JobType* job);
+
+
+#ifndef MAX_KEYSTORE
+ #define MAX_KEYSTORE 15
+#endif
+#ifndef MAX_JOBS
+ #define MAX_JOBS 10
+#endif
+
+static wolfSSL_Mutex crypto_mutex;
+struct Keys {
+ uint32 keyLen;
+ uint32 eId;
+
+ /* raw key */
+ uint8 key[AES_MAX_KEY_SIZE/WOLFSSL_BIT_SIZE];
+} Keys;
+
+
+struct Jobs {
+ uint32 jobId;
+ uint8 inUse; /* is the key available for use */
+ Aes aes;
+} Jobs;
+
+static struct Jobs activeJobs[MAX_JOBS];
+static struct Keys keyStore[MAX_KEYSTORE];
+
+
+/* tries to get a key of type eId
+ * returns 0 on success
+ */
+static int GetKey(Crypto_JobType* job, uint32 eId, uint8 **key, uint32 *keySz)
+{
+ int i, ret = 0;
+
+ if (key == NULL || keySz == NULL || *key != NULL) {
+ WOLFSSL_MSG("Bad parameter to GetKey");
+ return -1;
+ }
+
+ if (wc_LockMutex(&crypto_mutex) != 0) {
+ WOLFSSL_MSG("Unable to lock crypto mutex");
+ return -1;
+ }
+
+#ifdef REDIRECTION_CONFIG
+ /* keys should be set... */
+ if (job->jobRedirectionInfoRef == NULL) {
+ WOLFSSL_MSG("Issue with getting key redirection");
+ wc_UnLockMutex(&crypto_mutex);
+ return -1;
+ }
+
+ /* @TODO sanity checks on setup... uint8 redirectionConfig; */
+ switch (eid) {
+ case job->jobRedirectionInfoRef->inputKeyElementId:
+ if (job->jobRedirectionInfoRef->inputKeyId >= MAX_KEYSTORE) {
+ WOLFSSL_MSG("Bogus input key ID redirection (too large)");
+ ret = -1;
+ }
+ else {
+ i = job->jobRedirectionInfoRef->inputKeyId;
+ *key = keyStore[i].key;
+ *keySz = keyStore[i].keyLen;
+ }
+ break;
+ case job->jobRedirectionInfoRef->secondaryInputKeyElementId:
+ if (job->jobRedirectionInfoRef->secondaryInputKeyId >= MAX_KEYSTORE) {
+ WOLFSSL_MSG("Bogus input key ID redirection (too large)");
+ ret = -1;
+ }
+ else {
+ i = job->jobRedirectionInfoRef->secondaryInputKeyId;
+ *key = keyStore[i].key;
+ *keySz = keyStore[i].keyLen;
+ }
+ break;
+ case job->jobRedirectionInfoRef->tertiaryInputKeyElementId:
+ if (job->jobRedirectionInfoRef->tertiaryInputKeyId >= MAX_KEYSTORE) {
+ WOLFSSL_MSG("Bogus input key ID redirection (too large)");
+ ret = -1;
+ }
+ else {
+ i = job->jobRedirectionInfoRef->tertiaryInputKeyId;
+ *key = keyStore[i].key;
+ *keySz = keyStore[i].keyLen;
+ }
+ break;
+ default:
+ WOLFSSL_MSG("Unknown key element ID");
+ ret = -1;
+ break;
+ }
+#else
+ /* find first key of key element type */
+ for (i = 0; i < MAX_KEYSTORE; i++) {
+ if (keyStore[i].eId == eId && keyStore[i].keyLen ==
+ job->jobPrimitiveInfo->primitiveInfo->algorithm.keyLength) {
+ /* found matching key available, use it */
+ *key = keyStore[i].key;
+ *keySz = keyStore[i].keyLen;
+ }
+ }
+#endif
+
+ if (*key == NULL) {
+ WOLFSSL_MSG("Unable to find an available key");
+ ret = -1;
+ }
+
+ if (wc_UnLockMutex(&crypto_mutex) != 0) {
+ WOLFSSL_MSG("Unable to unlock crypto mutex");
+ ret = -1;
+ }
+ return ret;
+}
+
+
+/* returns a pointer to the Aes struct on success, NULL on failure */
+static Aes* GetAesStruct(Crypto_JobType* job)
+{
+ int i;
+
+ for (i = 0; i < MAX_JOBS; i++) {
+ if (activeJobs[i].inUse == 1 && activeJobs[i].jobId == job->jobId) {
+ return &activeJobs[i].aes;
+ }
+ }
+ return NULL;
+}
+
+
+/* returns a pointer to the Aes struct on success, NULL on failure */
+static Aes* NewAesStruct(Crypto_JobType* job)
+{
+ int i;
+
+ for (i = 0; i < MAX_JOBS; i++) {
+ if (activeJobs[i].inUse == 0) {
+ int ret;
+
+ activeJobs[i].inUse = 1;
+ activeJobs[i].jobId = job->jobId;
+ ret = wc_AesInit(&activeJobs[i].aes, NULL, INVALID_DEVID);
+ if (ret != 0) {
+ WOLFSSL_MSG("Error initializing AES structure");
+ return NULL;
+ }
+ return &activeJobs[i].aes;
+ }
+ }
+ return NULL;
+}
+
+
+/* free's up the use of an AES structure */
+static void FreeAesStruct(Crypto_JobType* job) {
+ int i;
+
+ for (i = 0; i < MAX_JOBS; i++) {
+ if (activeJobs[i].inUse == 1 && activeJobs[i].jobId == job->jobId) {
+ break;
+ }
+ }
+
+ if (i >= MAX_JOBS) {
+ WOLFSSL_MSG("Error finding AES structure");
+ }
+ else {
+ wc_AesFree(&activeJobs[i].aes);
+ activeJobs[i].inUse = 0;
+ activeJobs[i].jobId = 0;
+ }
+}
+
+
+/* returns E_OK on success */
+Std_ReturnType wolfSSL_Crypto_CBC(Crypto_JobType* job)
+{
+ Std_ReturnType ret = E_OK;
+ int encrypt;
+ Aes* aes ;
+
+ encrypt = (job->jobPrimitiveInfo->primitiveInfo->service == CRYPTO_ENCRYPT)
+ ? AES_ENCRYPTION : AES_DECRYPTION;
+
+ /* check if key should be set */
+ if ((job->jobPrimitiveInputOutput.mode & CRYPTO_OPERATIONMODE_START) != 0) {
+ uint8 *key = NULL;
+ uint8 *iv = NULL;
+ uint32 keySz = 0;
+ uint32 ivSz = 0;
+
+ if (GetKey(job, CRYPTO_KE_CIPHER_KEY, &key, &keySz) != 0) {
+ WOLFSSL_MSG("Crypto error with getting a key");
+ return E_NOT_OK;
+ }
+
+ if (GetKey(job, CRYPTO_KE_CIPHER_IV, &iv, &ivSz) != 0) {
+ WOLFSSL_MSG("Crypto error with getting an IV");
+ return E_NOT_OK;
+ }
+
+ if (iv != NULL && ivSz < AES_BLOCK_SIZE) {
+ WOLFSSL_MSG("Error IV is too small");
+ return E_NOT_OK;
+ }
+
+ aes = NewAesStruct(job);
+ if (aes == NULL) {
+ WOLFSSL_MSG("Unable to get AES structure for use");
+ return E_NOT_OK;
+ }
+
+ if (wc_AesSetKey(aes, key, keySz, iv, encrypt) != 0) {
+ WOLFSSL_MSG("Crypto error setting up AES key");
+ return E_NOT_OK;
+ }
+ ForceZero(key, keySz);
+ }
+
+ if ((job->jobPrimitiveInputOutput.mode & CRYPTO_OPERATIONMODE_UPDATE)
+ != 0) {
+ aes = GetAesStruct(job);
+ if (aes == NULL) {
+ WOLFSSL_MSG("Error finding AES structure");
+ return E_NOT_OK;
+ }
+
+ if (encrypt == AES_ENCRYPTION) {
+ if (wc_AesCbcEncrypt(aes, job->jobPrimitiveInputOutput.outputPtr,
+ job->jobPrimitiveInputOutput.inputPtr,
+ job->jobPrimitiveInputOutput.inputLength) != 0) {
+ WOLFSSL_MSG("AES-CBC encrypt error");
+ return E_NOT_OK;
+ }
+ }
+ else {
+ if (wc_AesCbcDecrypt(aes, job->jobPrimitiveInputOutput.outputPtr,
+ job->jobPrimitiveInputOutput.inputPtr,
+ job->jobPrimitiveInputOutput.inputLength) != 0) {
+ WOLFSSL_MSG("AES-CBC decrypt error");
+ return E_NOT_OK;
+ }
+ }
+ }
+
+ if ((job->jobPrimitiveInputOutput.mode & CRYPTO_OPERATIONMODE_FINISH)
+ != 0) {
+ FreeAesStruct(job);
+ }
+
+ return ret;
+}
+
+
+/* returns E_OK on success and E_NOT_OK on failure */
+Std_ReturnType wolfSSL_Crypto(Crypto_JobType* job)
+{
+ Std_ReturnType ret = E_OK;
+
+ WOLFSSL_ENTER("wolfSSL_Crypto");
+
+ /* switch on encryption type */
+ switch (job->jobPrimitiveInfo->primitiveInfo->algorithm.mode) {
+ case CRYPTO_ALGOMODE_CBC:
+ ret = wolfSSL_Crypto_CBC(job);
+ break;
+
+ case CRYPTO_ALGOMODE_NOT_SET:
+ WOLFSSL_MSG("Encrypt algo mode not set!");
+ ret = E_NOT_OK;
+ break;
+
+ default:
+ WOLFSSL_MSG("Unsupported encryption mode");
+ ret = E_NOT_OK;
+ break;
+ }
+
+ WOLFSSL_LEAVE("wolfSSL_Crypto", ret);
+ return ret;
+}
+
+static WC_RNG rng;
+static wolfSSL_Mutex rngMutex;
+static volatile byte rngInit = 0;
+
+/* returns E_OK on success */
+Std_ReturnType wolfSSL_Crypto_RNG(Crypto_JobType* job)
+{
+ int ret;
+
+ uint8 *out = job->jobPrimitiveInputOutput.outputPtr;
+ uint32 *outSz = job->jobPrimitiveInputOutput.outputLengthPtr;
+
+ if (outSz == NULL || out == NULL) {
+ WOLFSSL_MSG("Bad parameter passed into wolfSSL_Crypto_RNG");
+ return E_NOT_OK;
+ }
+
+ if (rngInit == 1) {
+ if (wc_LockMutex(&rngMutex) != 0) {
+ WOLFSSL_MSG("Error locking RNG mutex");
+ return E_NOT_OK;
+ }
+ }
+
+ if (rngInit == 0) {
+ if (wc_InitMutex(&rngMutex) != 0) {
+ WOLFSSL_MSG("Error initializing RNG mutex");
+ return E_NOT_OK;
+ }
+
+ if (wc_LockMutex(&rngMutex) != 0) {
+ WOLFSSL_MSG("Error locking RNG mutex");
+ return E_NOT_OK;
+ }
+
+ ret = wc_InitRng_ex(&rng, NULL, 0);
+ if (ret != 0) {
+ WOLFSSL_MSG("Error initializing RNG");
+ wc_UnLockMutex(&rngMutex);
+ return E_NOT_OK;
+ }
+ rngInit = 1;
+ }
+
+ ret = wc_RNG_GenerateBlock(&rng, out, *outSz);
+ if (ret != 0) {
+ WOLFSSL_MSG("Unable to generate random values");
+ ret = wc_FreeRng(&rng);
+ if (ret != 0) {
+ WOLFSSL_MSG("Error free'ing RNG");
+ }
+ rngInit = 0;
+ wc_UnLockMutex(&rngMutex);
+ return E_NOT_OK;
+ }
+
+ if (wc_UnLockMutex(&rngMutex) != 0) {
+ WOLFSSL_MSG("Error unlocking RNG mutex");
+ return E_NOT_OK;
+ }
+
+ return E_OK;
+}
+
+
+/* returns E_OK on success and E_NOT_OK on failure */
+Std_ReturnType Crypto_ProcessJob(uint32 objectId, Crypto_JobType* job)
+{
+ Std_ReturnType ret = E_OK;
+ (void)objectId;
+
+ WOLFSSL_ENTER("Crypto_ProcessJob");
+ if (job == NULL) {
+ WOLFSSL_MSG("Bad parameter passed to Crypto_ProcessJob");
+ ret = E_NOT_OK;
+ }
+
+ /* only handle synchronous jobs */
+ if (ret == E_OK &&
+ job->jobPrimitiveInfo->processingType != CRYPTO_PROCESSING_SYNC) {
+ WOLFSSL_MSG("Crypto only supporting synchronous jobs");
+ ret = E_NOT_OK;
+ }
+
+ if (ret == E_OK) {
+ job->jobState = CRYPTO_JOBSTATE_ACTIVE;
+ switch (job->jobPrimitiveInfo->primitiveInfo->service) {
+ case CRYPTO_ENCRYPT:
+ ret = wolfSSL_Crypto(job);
+ break;
+
+ case CRYPTO_DECRYPT:
+ ret = wolfSSL_Crypto(job);
+ break;
+
+ case CRYPTO_RANDOMGENERATE:
+ ret = wolfSSL_Crypto_RNG(job);
+ break;
+
+ default:
+ WOLFSSL_MSG("Unsuported Crypto service");
+ ret = E_NOT_OK;
+ break;
+ }
+ job->jobState = CRYPTO_JOBSTATE_IDLE;
+ }
+
+ WOLFSSL_LEAVE("Crypto_ProcessJob", ret);
+ return ret;
+}
+
+
+/* config currently not used, should always be null */
+void Crypto_Init(const Crypto_ConfigType* config)
+{
+ if (wc_InitMutex(&crypto_mutex) != 0) {
+ WOLFSSL_MSG("Issues setting up crypto mutex");
+ }
+ XMEMSET(&keyStore, 0, MAX_KEYSTORE * sizeof(Keys));
+ XMEMSET(&activeJobs, 0, MAX_JOBS * sizeof(Jobs));
+ (void)config;
+}
+
+
+/* returns E_OK on success and E_NOT_OK on failure */
+Std_ReturnType Crypto_KeyElementSet(uint32 keyId, uint32 eId, const uint8* key,
+ uint32 keySz)
+{
+ Std_ReturnType ret = E_OK;
+
+ if (key == NULL || keySz == 0 || keyId >= MAX_KEYSTORE) {
+ WOLFSSL_MSG("Bad argument to Crypto_KeyElementSet");
+ ret = E_NOT_OK;
+ }
+
+ if (ret == E_OK && wc_LockMutex(&crypto_mutex) != 0) {
+ WOLFSSL_MSG("Unable to lock crypto mutex");
+ ret = E_NOT_OK;
+ }
+
+ if (ret == E_OK) {
+ if (keySz > sizeof(keyStore[keyId].key)) {
+ ret = E_NOT_OK;
+ }
+ if (ret == E_OK) {
+ WOLFSSL_MSG("Setting new key");
+ keyStore[keyId].eId = eId;
+ XMEMCPY(keyStore[keyId].key, key, keySz);
+ keyStore[keyId].keyLen = keySz;
+ }
+
+ if (wc_UnLockMutex(&crypto_mutex) != 0) {
+ WOLFSSL_MSG("Unable to unlock crypto mutex");
+ ret = E_NOT_OK;
+ }
+ }
+
+ return ret;
+}
+#endif /* NO_WOLFSSL_AUTOSAR_CRYPTO */
+#endif /* WOLFSSL_AUTOSAR */
+
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/csm.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/csm.c
new file mode 100644
index 00000000..f5df124b
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/csm.c
@@ -0,0 +1,298 @@
+/* csm.c
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/logging.h>
+#include <wolfssl/version.h>
+#include <wolfssl/wolfcrypt/port/autosar/Csm.h>
+#include <wolfssl/wolfcrypt/port/autosar/CryIf.h>
+
+#ifdef WOLFSSL_AUTOSAR
+#ifndef NO_WOLFSSL_AUTOSAR_CSM
+
+
+/* AutoSAR 4.4 */
+/* basic shim layer to plug in wolfSSL crypto */
+
+#ifndef REDIRECTION_CONFIG
+Crypto_JobRedirectionInfoType redirect = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+#else
+Crypto_JobRedirectionInfoType redirect = {
+ REDIRECTION_CONFIG,
+ #ifdef REDIRECTION_IN1_KEYID
+ REDIRECTION_IN1_KEYID,
+ #else
+ 0,
+ #endif
+
+ #ifdef REDIRECTION_IN1_KEYELMID
+ REDIRECTION_IN1_KEYELMID,
+ #else
+ 0,
+ #endif
+
+
+ #ifdef REDIRECTION_IN2_KEYID
+ REDIRECTION_IN2_KEYID,
+ #else
+ 0,
+ #endif
+
+ #ifdef REDIRECTION_IN2_KEYELMID
+ REDIRECTION_IN2_KEYELMID,
+ #else
+ 0,
+ #endif
+
+
+ #ifdef REDIRECTION_IN3_KEYID
+ REDIRECTION_IN3_KEYID,
+ #else
+ 0,
+ #endif
+
+ #ifdef REDIRECTION_IN3_KEYELMID
+ REDIRECTION_IN3_KEYELMID,
+ #else
+ 0,
+ #endif
+
+ #ifdef REDIRECTION_OUT1_KEYID
+ REDIRECTION_OUT1_KEYID,
+ #else
+ 0,
+ #endif
+
+ #ifdef REDIRECTION_OUT1_KEYELMID
+ REDIRECTION_OUT1_KEYELMID,
+ #else
+ 0,
+ #endif
+
+
+ #ifdef REDIRECTION_OUT2_KEYID
+ REDIRECTION_OUT2_KEYID,
+ #else
+ 0,
+ #endif
+
+ #ifdef REDIRECTION_OUT2_KEYELMID
+ REDIRECTION_OUT2_KEYELMID,
+ #else
+ 0,
+ #endif
+};
+#endif
+
+static byte CsmDevErrorDetect = 1; /* flag for development error detection */
+
+enum {
+ CSM_E_PARAM_POINTER,
+ CSM_E_SMALL_BUFFER,
+ CSM_E_UNINT,
+ CSM_E_INIT_FAILED,
+ CSM_E_PROCESSING_MODE
+};
+
+
+/* development error reporting */
+void ReportToDET(int err)
+{
+ if (CsmDevErrorDetect == 1) {
+ switch (err) {
+ case CSM_E_PARAM_POINTER:
+ WOLFSSL_MSG("AutoSAR CSM_E_PARAM_POINTER error");
+ break;
+
+ case CSM_E_SMALL_BUFFER:
+ WOLFSSL_MSG("AutoSAR CSM_E_SMALL_BUFFER error");
+ break;
+
+ case CSM_E_UNINT:
+ WOLFSSL_MSG("AutoSAR CSM_E_UNINT error");
+ break;
+
+ case CSM_E_INIT_FAILED:
+ WOLFSSL_MSG("AutoSAR CSM_E_INIT_FAILED error");
+ break;
+
+ case CSM_E_PROCESSING_MODE:
+ WOLFSSL_MSG("AutoSAR CSM_E_PROCESSING_MODE error");
+ break;
+
+ default:
+ WOLFSSL_MSG("AutoSAR Unknown error");
+ }
+ }
+}
+
+
+void Csm_Init(const Csm_ConfigType* config)
+{
+ (void)config;
+ CryIf_Init(NULL);
+}
+
+
+/* getter function for CSM version info */
+void Csm_GetVersionInfo(Std_VersionInfoType* version)
+{
+ if (version != NULL) {
+ version->vendorID = 0; /* no vendor or module ID */
+ version->moduleID = 0;
+ version->sw_major_version = (LIBWOLFSSL_VERSION_HEX >> 24) & 0xFFF;
+ version->sw_minor_version = (LIBWOLFSSL_VERSION_HEX >> 12) & 0xFFF;
+ version->sw_patch_version = (LIBWOLFSSL_VERSION_HEX) & 0xFFF;
+ }
+}
+
+
+/* creates a new job type and passes it down to CryIf
+ *
+ * return E_OK on success
+ */
+static Std_ReturnType CreateAndRunJobType(uint32 id,
+ Crypto_JobPrimitiveInfoType* jobInfo, Crypto_JobInfoType* jobInfoType,
+ const uint8* data, uint32 dataSz, uint8* out, uint32* outSz,
+ Crypto_OperationModeType mode)
+{
+ WOLFSSL_JOBIO jobIO;
+ WOLFSSL_JOBTYPE jobType;
+
+ XMEMSET(&jobIO, 0, sizeof(WOLFSSL_JOBIO));
+ jobIO.inputPtr = data;
+ jobIO.inputLength = dataSz;
+ jobIO.outputPtr = out;
+ jobIO.outputLengthPtr = outSz;
+ jobIO.mode = mode;
+
+ jobType.jobId = id;
+ jobType.jobState = CRYPTO_JOBSTATE_IDLE;
+ jobType.jobPrimitiveInputOutput = jobIO;
+ jobType.jobPrimitiveInfo = jobInfo;
+ jobType.jobInfo = jobInfoType;
+ jobType.jobRedirectionInfoRef = &redirect;
+
+ return CryIf_ProcessJob(id, &jobType);
+}
+
+
+/* returns E_OK on success */
+static Std_ReturnType Csm_CBC_Operation(uint32 id, Crypto_OperationModeType mode,
+ const uint8* data, uint32 dataSz, uint8* out, uint32* outSz,
+ Crypto_ServiceInfoType service)
+{
+ Crypto_JobInfoType jobInfoType;
+ Crypto_PrimitiveInfoType pInfo;
+ Crypto_JobPrimitiveInfoType jobInfo;
+
+ Crypto_AlgorithmInfoType algorithm = {
+ CRYPTO_ALGOFAM_AES,
+ CRYPTO_ALGOFAM_NOT_SET,
+ 16, /* 128 bit key length */
+ CRYPTO_ALGOMODE_CBC
+ };
+
+ jobInfoType.jobId = id;
+ jobInfoType.jobPriority = 0;
+
+ pInfo.resultLength = 16; /* 128 bit key length */
+ pInfo.service = service;
+ pInfo.algorithm = algorithm;
+
+ jobInfo.callbackId = 0;
+ jobInfo.primitiveInfo = &pInfo;
+ jobInfo.cryIfKeyId = 0;
+ jobInfo.processingType = CRYPTO_PROCESSING_SYNC;
+ jobInfo.callbackUpdateNotification = FALSE;
+
+ return CreateAndRunJobType(id, &jobInfo, &jobInfoType,
+ data, dataSz, out, outSz, mode);
+}
+
+
+/* single shot encrypt
+ * returns E_OK on success */
+Std_ReturnType Csm_Encrypt(uint32 id, Crypto_OperationModeType mode,
+ const uint8* data, uint32 dataSz, uint8* out, uint32* outSz)
+{
+ WOLFSSL_ENTER("Csm_Encrypt");
+ return Csm_CBC_Operation(id, mode, data, dataSz, out, outSz,CRYPTO_ENCRYPT);
+}
+
+
+/* single shot decrypt
+ * returns E_OK on success */
+Std_ReturnType Csm_Decrypt(uint32 id, Crypto_OperationModeType mode,
+ const uint8* data, uint32 dataSz, uint8* out, uint32* outSz)
+{
+ WOLFSSL_ENTER("Csm_Decrypt");
+ return Csm_CBC_Operation(id, mode, data, dataSz, out, outSz,CRYPTO_DECRYPT);
+}
+
+
+/* returns E_OK on success */
+Std_ReturnType Csm_RandomGenerate(uint32 id, uint8* out, uint32* outSz)
+{
+ Crypto_JobInfoType jobInfoType;
+ Crypto_PrimitiveInfoType pInfo;
+ Crypto_JobPrimitiveInfoType jobInfo;
+
+ Crypto_AlgorithmInfoType algorithm = {
+ CRYPTO_ALGOFAM_DRBG,
+ CRYPTO_ALGOFAM_NOT_SET,
+ 0, /* key length */
+ CRYPTO_ALGOMODE_NOT_SET
+ };
+
+ jobInfoType.jobId = id;
+ jobInfoType.jobPriority = 0;
+
+ pInfo.resultLength = 0;
+ pInfo.service = CRYPTO_RANDOMGENERATE;
+ pInfo.algorithm = algorithm;
+
+ jobInfo.callbackId = 0;
+ jobInfo.primitiveInfo = &pInfo;
+ jobInfo.cryIfKeyId = 0;
+ jobInfo.processingType = CRYPTO_PROCESSING_SYNC;
+ jobInfo.callbackUpdateNotification = FALSE;
+
+ return CreateAndRunJobType(id, &jobInfo, &jobInfoType,
+ NULL, 0, out, outSz, CRYPTO_OPERATIONMODE_SINGLECALL);
+}
+
+
+/* returns E_OK on success */
+Std_ReturnType Csm_KeyElementSet(uint32 keyId, uint32 eId,
+ const uint8* key, uint32 keySz)
+{
+ return CryIf_KeyElementSet(keyId, eId, key, keySz);
+}
+
+#endif /* NO_WOLFSSL_AUTOSAR_CSM */
+#endif /* WOLFSSL_AUTOSAR */
+
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/include.am b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/include.am
new file mode 100644
index 00000000..fe13f7dd
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/include.am
@@ -0,0 +1,23 @@
+
+EXTRA_DIST += wolfcrypt/src/port/autosar/csm.c \
+ wolfcrypt/src/port/autosar/crypto.c \
+ wolfcrypt/src/port/autosar/cryif.c \
+ wolfcrypt/src/port/autosar/README.md \
+ wolfcrypt/src/port/autosar/test.c
+
+if BUILD_AUTOSAR
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/autosar/csm.c
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/autosar/crypto.c
+src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/autosar/cryif.c
+
+if BUILD_TESTS
+check_PROGRAMS += wolfcrypt/src/port/autosar/test.test
+noinst_PROGRAMS += wolfcrypt/src/port/autosar/test.test
+
+wolfcrypt_src_port_autosar_test_test_SOURCES = \
+ wolfcrypt/src/port/autosar/test.c
+wolfcrypt_src_port_autosar_test_test_LDADD = \
+ src/libwolfssl.la $(LIB_STATIC_ADD)
+wolfcrypt_src_port_autosar_test_test_DEPENDENCIES = src/libwolfssl.la
+endif
+endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/test.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/test.c
new file mode 100644
index 00000000..4c311f18
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/autosar/test.c
@@ -0,0 +1,430 @@
+/* test.c
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/logging.h>
+#include <wolfssl/wolfcrypt/port/autosar/Csm.h>
+#define BLOCK_SIZE 16
+
+static int singleshot_test(void)
+{
+ Std_ReturnType ret;
+
+ uint8 cipher[BLOCK_SIZE * 2];
+ uint8 plain[BLOCK_SIZE * 2];
+
+ uint32 cipherSz = 0;
+ uint32 plainSz = 0;
+ const uint8 msg[] = { /* "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
+ };
+ const uint8 verify[] =
+ {
+ 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
+ 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
+ };
+ const uint8 key[] = "0123456789abcdef ";
+ const uint8 iv[] = "1234567890abcdef ";
+
+ XMEMSET(cipher, 0, BLOCK_SIZE);
+ XMEMSET(plain, 0, BLOCK_SIZE);
+
+ /* set key that will be used for encryption */
+ ret = Csm_KeyElementSet(0U, CRYPTO_KE_CIPHER_KEY, key, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key");
+ return -1;
+ }
+
+ ret = Csm_KeyElementSet(1U, CRYPTO_KE_CIPHER_IV, iv, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key IV");
+ return -1;
+ }
+
+ /* encrypt data using AES CBC */
+ ret = Csm_Encrypt(1U, CRYPTO_OPERATIONMODE_SINGLECALL, msg, BLOCK_SIZE,
+ cipher, &cipherSz);
+ if (ret != E_OK) {
+ printf("Issue with encrypting msg");
+ return -1;
+ }
+
+ if (XMEMCMP(cipher, verify, BLOCK_SIZE) != 0) {
+ printf("Error with cipher data\n");
+ return -1;
+ }
+
+ /* set key that will be used for decryption */
+ ret = Csm_KeyElementSet(0U, CRYPTO_KE_CIPHER_KEY, key, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key");
+ return -1;
+ }
+
+ ret = Csm_KeyElementSet(1U, CRYPTO_KE_CIPHER_IV, iv, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key IV");
+ return -1;
+ }
+
+ /* decrypt data using AES CBC */
+ ret = Csm_Decrypt(2U, CRYPTO_OPERATIONMODE_SINGLECALL, cipher, BLOCK_SIZE,
+ plain, &plainSz);
+ if (ret != E_OK) {
+ printf("Issue with decrypting msg");
+ return -1;
+ }
+
+ if (XMEMCMP(msg, plain, BLOCK_SIZE) != 0) {
+ printf("Error with plain data\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int update_test(void)
+{
+ Std_ReturnType ret;
+
+ uint8 cipher[BLOCK_SIZE * 3];
+ uint8 plain[BLOCK_SIZE * 3];
+
+ uint32 cipherSz = 0;
+ uint32 plainSz = 0;
+ const uint8 msg[] = { /* "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
+ };
+ const uint8 key[] = "0123456789abcdef ";
+ const uint8 iv[] = "1234567890abcdef ";
+
+ XMEMSET(cipher, 0, BLOCK_SIZE);
+ XMEMSET(plain, 0, BLOCK_SIZE);
+
+ /* set key that will be used for encryption */
+ ret = Csm_KeyElementSet(0U, CRYPTO_KE_CIPHER_KEY, key, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key");
+ return -1;
+ }
+
+ ret = Csm_KeyElementSet(1U, CRYPTO_KE_CIPHER_IV, iv, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key IV");
+ return -1;
+ }
+
+ /* encrypt data using AES CBC */
+ ret = Csm_Encrypt(1U,
+ CRYPTO_OPERATIONMODE_START | CRYPTO_OPERATIONMODE_UPDATE,
+ msg, BLOCK_SIZE, cipher, &cipherSz);
+ if (ret != E_OK) {
+ printf("Issue with encrypting msg");
+ return -1;
+ }
+
+ ret = Csm_Encrypt(1U, CRYPTO_OPERATIONMODE_UPDATE, msg, BLOCK_SIZE,
+ cipher + BLOCK_SIZE, &cipherSz);
+ if (ret != E_OK) {
+ printf("Issue with encrypting msg");
+ return -1;
+ }
+
+ ret = Csm_Encrypt(1U,
+ CRYPTO_OPERATIONMODE_UPDATE | CRYPTO_OPERATIONMODE_FINISH,
+ msg, BLOCK_SIZE, cipher + (BLOCK_SIZE * 2), &cipherSz);
+ if (ret != E_OK) {
+ printf("Issue with encrypting msg");
+ return -1;
+ }
+
+ /* set key that will be used for decryption */
+ ret = Csm_KeyElementSet(0U, CRYPTO_KE_CIPHER_KEY, key, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key");
+ return -1;
+ }
+
+ ret = Csm_KeyElementSet(1U, CRYPTO_KE_CIPHER_IV, iv, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key IV");
+ return -1;
+ }
+
+ /* decrypt data using AES CBC */
+ ret = Csm_Decrypt(2U,
+ CRYPTO_OPERATIONMODE_START | CRYPTO_OPERATIONMODE_UPDATE,
+ cipher, BLOCK_SIZE, plain, &plainSz);
+ if (ret != E_OK) {
+ printf("Issue with decrypting msg");
+ return -1;
+ }
+
+ ret = Csm_Decrypt(2U, CRYPTO_OPERATIONMODE_UPDATE, cipher + BLOCK_SIZE,
+ BLOCK_SIZE, plain + BLOCK_SIZE, &plainSz);
+ if (ret != E_OK) {
+ printf("Issue with decrypting msg");
+ return -1;
+ }
+
+ ret = Csm_Decrypt(2U,
+ CRYPTO_OPERATIONMODE_UPDATE | CRYPTO_OPERATIONMODE_FINISH,
+ cipher + (BLOCK_SIZE * 2), BLOCK_SIZE,
+ plain + (BLOCK_SIZE * 2), &plainSz);
+ if (ret != E_OK) {
+ printf("Issue with decrypting msg");
+ return -1;
+ }
+
+ if (XMEMCMP(msg, plain, BLOCK_SIZE) != 0 ||
+ XMEMCMP(msg, plain + BLOCK_SIZE, BLOCK_SIZE) != 0 ||
+ XMEMCMP(msg, plain + (BLOCK_SIZE * 2), BLOCK_SIZE) != 0) {
+ printf("Error with plain data\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int random_test(void)
+{
+ Std_ReturnType ret;
+
+ int i;
+ uint8 j;
+ uint8 data[BLOCK_SIZE * 3];
+ uint32 dataSz;
+ XMEMSET(data, 0, BLOCK_SIZE * 3);
+
+ /* make three calls, filling up data buffer */
+ for (i = 0; i < 3; i++) {
+ dataSz = BLOCK_SIZE;
+ ret = Csm_RandomGenerate(0U, data + (i * BLOCK_SIZE), &dataSz);
+ if (ret != E_OK) {
+ printf("Issue with getting random data block");
+ return -1;
+ }
+
+ if (dataSz != BLOCK_SIZE) {
+ printf("Did not get full block of random data");
+ return -1;
+ }
+ }
+
+ /* simple test that is not all 0's still after random generate */
+ j = 0;
+ dataSz = sizeof(data);
+ for (i = 0; i < (int)dataSz; i++) {
+ j |= data[i];
+ }
+ if (j == 0) {
+ printf("call to random generate produced all 0's");
+ return -1;
+ }
+
+ /* fill full data buffer all at once */
+ dataSz = sizeof(data);
+ ret = Csm_RandomGenerate(0U, data, &dataSz);
+ if (ret != E_OK) {
+ printf("Issue with getting random data block");
+ return -1;
+ }
+
+ if (dataSz != sizeof(data)) {
+ printf("Did not get full block of random data");
+ return -1;
+ }
+ return 0;
+}
+
+
+#ifndef MAX_KEYSTORE
+ /* default max key slots from crypto.c */
+ #define MAX_KEYSTORE 15
+#endif
+static int key_test(void)
+{
+ Std_ReturnType ret;
+
+ uint8 i;
+ uint8 max = MAX_KEYSTORE;
+ uint8 data[BLOCK_SIZE];
+ uint32 dataSz;
+ XMEMSET(data, 0, BLOCK_SIZE);
+
+ for (i = 0; i < max; i++) {
+ dataSz = BLOCK_SIZE;
+ ret = Csm_RandomGenerate(0U, data, &dataSz);
+ if (ret != E_OK) {
+ printf("Issue with getting random data block for key");
+ return -1;
+ }
+
+ if (dataSz != BLOCK_SIZE) {
+ printf("Did not get full block of random data");
+ return -1;
+ }
+
+ ret = Csm_KeyElementSet(i, CRYPTO_KE_CIPHER_KEY, data, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key id %d", i);
+ return -1;
+ }
+ }
+
+ /* try creating one more key for fail case */
+ ret = Csm_KeyElementSet(i, CRYPTO_KE_CIPHER_KEY, data, BLOCK_SIZE);
+ if (ret == E_OK) {
+ printf("Created more keys than should be possible");
+ return -1;
+ }
+
+ return 0;
+}
+
+#ifdef REDIRECTION_CONFIG
+static int redirect_test()
+{
+ Std_ReturnType ret;
+
+ uint8 cipher[BLOCK_SIZE * 2];
+ uint32 cipherSz = 0;
+ const uint8 msg[] = { /* "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
+ };
+ const uint8 verify[] =
+ {
+ 0x95,0x94,0x92,0x57,0x5f,0x42,0x81,0x53,
+ 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb
+ };
+ const uint8 key[] = "0123456789abcdef "; /* align */
+ const uint8 iv[] = "1234567890abcdef "; /* align */
+ unsigned int i;
+
+ XMEMSET(cipher, 0, BLOCK_SIZE);
+
+ /* fill keystore with bad keys */
+ for (i = 0; i < MAX_KEYSTORE; i++) {
+ ret = Csm_KeyElementSet(i, CRYPTO_KE_CIPHER_KEY, verify, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key");
+ return -1;
+ }
+ }
+
+ /* set specific key that will be used for encryption */
+ ret = Csm_KeyElementSet(REDIRECTION_IN1_KEYID, REDIRECTION_IN1_KEYELMID,
+ key, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key");
+ return -1;
+ }
+
+ ret = Csm_KeyElementSet(REDIRECTION_IN2_KEYID, REDIRECTION_IN2_KEYELMID,
+ iv, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key IV");
+ return -1;
+ }
+
+ /* encrypt data using AES CBC */
+ ret = Csm_Encrypt(0U, CRYPTO_OPERATIONMODE_SINGLECALL, msg, BLOCK_SIZE,
+ cipher, &cipherSz);
+ if (ret != E_OK) {
+ printf("Issue with encrypting msg");
+ return -1;
+ }
+
+ if (XMEMCMP(cipher, verify, BLOCK_SIZE) != 0) {
+ printf("Error with cipher data ");
+ return -1;
+ }
+
+ /* now set bad key to be used for encryption */
+ ret = Csm_KeyElementSet(REDIRECTION_IN1_KEYID, REDIRECTION_IN1_KEYELMID,
+ verify, BLOCK_SIZE);
+ if (ret != E_OK) {
+ printf("Issue with setting key ");
+ return -1;
+ }
+
+ /* encrypt data using AES CBC */
+ ret = Csm_Encrypt(0U, CRYPTO_OPERATIONMODE_SINGLECALL, msg, BLOCK_SIZE,
+ cipher, &cipherSz);
+ if (ret != E_OK) {
+ printf("Issue with encrypting msg ");
+ return -1;
+ }
+
+ if (XMEMCMP(cipher, verify, BLOCK_SIZE) == 0) {
+ printf("Error with cipher data ");
+ return -1;
+ }
+
+ return 0;
+}
+#endif /* REDIRECTION_CONFIG */
+
+/* takes in test function test() and name of test
+ * returns 1 if test failed and 0 if passed */
+static int run_test(int(test)(void), const char* name)
+{
+ printf("%s", name);
+ if (test() != 0) {
+ printf("fail\n");
+ return 1;
+ }
+ else {
+ printf("pass\n");
+ }
+ return 0;
+}
+
+
+/* AES block size */
+int main(int argc, char* argv[])
+{
+ int ret = 0;
+ (void)argv;
+ (void)argc;
+
+ wolfSSL_Debugging_ON();
+ Csm_Init(NULL);
+
+ ret |= run_test(singleshot_test, "singleshot_test ... ");
+ ret |= run_test(update_test, "update_test ... ");
+ ret |= run_test(random_test, "random_test ... ");
+ ret |= run_test(key_test, "key_test ... ");
+#ifdef REDIRECTION_CONFIG
+ ret |= run_test(redirect_test, "redirect_test ... ");
+#endif /* REDIRECTION_CONFIG */
+ return ret;
+}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/iotsafe/iotsafe.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/iotsafe/iotsafe.c
index 8a3af53d..8a7ec2e6 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/iotsafe/iotsafe.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/iotsafe/iotsafe.c
@@ -749,43 +749,37 @@ static int iotsafe_hkdf_extract(byte* prk, const byte* salt, word32 saltLen,
int ret;
char *resp;
uint16_t hash_algo = 0;
- int len;
+ int hash_len;
uint16_t hash_algo_be = 0;
WOLFSSL_MSG("Enter iotsafe_hkdf_extract");
- switch (digest) {
- #ifndef NO_SHA256
+ switch (digest) {
+#ifndef NO_SHA256
case WC_SHA256:
- hash_algo = (uint16_t)1;
- if (ikmLen == 0) {
- len = WC_SHA256_DIGEST_SIZE;
- }
+ hash_algo = (uint16_t)1;
+ hash_len = WC_SHA256_DIGEST_SIZE;
break;
- #endif
- #ifdef WOLFSSL_SHA384
+#endif
+#ifdef WOLFSSL_SHA384
case WC_SHA384:
- hash_algo = (uint16_t)2;
- if (ikmLen == 0) {
- len = WC_SHA384_DIGEST_SIZE;
- }
+ hash_algo = (uint16_t)2;
+ hash_len = WC_SHA384_DIGEST_SIZE;
break;
- #endif
- #ifdef WOLFSSL_TLS13_SHA512
+#endif
+#ifdef WOLFSSL_SHA512
case WC_SHA512:
- hash_algo = (uint16_t)4;
- if (ikmLen == 0) {
- len = WC_SHA512_DIGEST_SIZE;
- }
+ hash_algo = (uint16_t)4;
+ hash_len = WC_SHA512_DIGEST_SIZE;
break;
- #endif
+#endif
default:
return BAD_FUNC_ARG;
break;
- }
+ }
if (ikmLen == 0) {
- ikmLen = len;
- XMEMSET(ikm, 0, len);
+ ikmLen = hash_len;
+ XMEMSET(ikm, 0, hash_len);
}
#ifdef DEBUG_IOTSAFE
@@ -812,14 +806,12 @@ static int iotsafe_hkdf_extract(byte* prk, const byte* salt, word32 saltLen,
WOLFSSL_MSG("Unexpected reply from HKDF extract");
ret = WC_HW_E;
} else {
-
- ret = hexbuffer_conv(resp, prk, 32);
+ ret = hexbuffer_conv(resp, prk, hash_len);
if (ret < 0)
ret = WC_HW_E;
else
ret = 0;
}
-
return ret;
}
#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/liboqs/liboqs.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/liboqs/liboqs.c
new file mode 100644
index 00000000..f04cab02
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/liboqs/liboqs.c
@@ -0,0 +1,132 @@
+/* liboqs.c
+ *
+ * Copyright (C) 2006-2023 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+/*
+
+DESCRIPTION
+This library provides the support interfaces to the liboqs library providing
+implementations for Post-Quantum cryptography algorithms.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/types.h>
+#include <wolfssl/wolfcrypt/logging.h>
+#include <wolfssl/wolfcrypt/error-crypt.h>
+
+#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
+
+#if defined(HAVE_LIBOQS)
+
+/* RNG for liboqs */
+static WC_RNG liboqsDefaultRNG;
+static WC_RNG* liboqsCurrentRNG;
+
+static wolfSSL_Mutex liboqsRNGMutex;
+
+static int liboqs_init = 0;
+
+
+static void wolfSSL_liboqsGetRandomData(uint8_t* buffer, size_t numOfBytes)
+{
+ int ret;
+ word32 numOfBytes_word32;
+
+ while (numOfBytes > 0) {
+ numOfBytes_word32 = (word32)numOfBytes;
+ numOfBytes -= numOfBytes_word32;
+ ret = wc_RNG_GenerateBlock(liboqsCurrentRNG, buffer,
+ numOfBytes_word32);
+ if (ret != 0) {
+ /* ToDo: liboqs exits programm if RNG fails,
+ * not sure what to do here
+ */
+ WOLFSSL_MSG_EX(
+ "wc_RNG_GenerateBlock(..., %u) failed with ret %d "
+ "in wolfSSL_liboqsGetRandomData().", numOfBytes_word32, ret
+ );
+ abort();
+ }
+ }
+}
+
+int wolfSSL_liboqsInit(void)
+{
+ int ret = 0;
+
+ if (liboqs_init == 0) {
+ ret = wc_InitMutex(&liboqsRNGMutex);
+ if (ret != 0) {
+ return ret;
+ }
+ ret = wc_LockMutex(&liboqsRNGMutex);
+ if (ret != 0) {
+ return ret;
+ }
+ ret = wc_InitRng(&liboqsDefaultRNG);
+ if (ret == 0) {
+ OQS_init();
+ liboqs_init = 1;
+ }
+ liboqsCurrentRNG = &liboqsDefaultRNG;
+ wc_UnLockMutex(&liboqsRNGMutex);
+
+ OQS_randombytes_custom_algorithm(wolfSSL_liboqsGetRandomData);
+ }
+
+ return ret;
+}
+
+void wolfSSL_liboqsClose(void)
+{
+ wc_FreeRng(&liboqsDefaultRNG);
+}
+
+int wolfSSL_liboqsRngMutexLock(WC_RNG* rng)
+{
+ int ret = wolfSSL_liboqsInit();
+ if (ret == 0) {
+ ret = wc_LockMutex(&liboqsRNGMutex);
+ }
+ if (ret == 0 && rng != NULL) {
+ /* Update the pointer with the RNG to use. This is safe as we locked the mutex */
+ liboqsCurrentRNG = rng;
+ }
+ return ret;
+}
+
+int wolfSSL_liboqsRngMutexUnlock(void)
+{
+ int ret = BAD_MUTEX_E;
+
+ liboqsCurrentRNG = &liboqsDefaultRNG;
+
+ if (liboqs_init) {
+ ret = wc_UnLockMutex(&liboqsRNGMutex);
+ }
+ return ret;
+}
+
+#endif /* HAVE_LIBOQS */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/st/stm32.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/st/stm32.c
index 04d6c475..83497af2 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/st/stm32.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/st/stm32.c
@@ -595,7 +595,7 @@ static int stm32_getabs_from_mp_int(uint8_t *dst, const mp_int *a, int sz,
#else
*abs_sign = 1; /* default to negative */
#endif
- res = mp_abs(a, &x);
+ res = mp_abs((mp_int*)a, &x);
if (res == MP_OKAY)
res = stm32_get_from_mp_int(dst, &x, sz);
mp_clear(&x);
@@ -638,10 +638,43 @@ static int stm32_get_from_hexstr(const char* hex, uint8_t* dst, int sz)
return stm32_getabs_from_hexstr(hex, dst, sz, NULL);
}
-
/* STM32 PKA supports up to 640-bit numbers */
#define STM32_MAX_ECC_SIZE (80)
+#ifdef WOLFSSL_STM32_PKA_V2
+/* find curve based on prime/modulus and return order/coefB */
+static int stm32_get_curve_params(mp_int* modulus,
+ uint8_t* order, uint8_t* coefB)
+{
+ int res, i, found = 0;
+ mp_int modulusChk;
+ res = mp_init(&modulusChk);
+ if (res != MP_OKAY)
+ return res;
+ for (i = 0; ecc_sets[i].size != 0 && ecc_sets[i].name != NULL; i++) {
+ const ecc_set_type* curve = &ecc_sets[i];
+ /* match based on curve prime */
+ if ((res = mp_read_radix(&modulusChk, curve->prime, MP_RADIX_HEX)) ==
+ MP_OKAY && (mp_cmp(modulus, &modulusChk) == MP_EQ))
+ {
+ found = 1;
+ if (order) {
+ res = stm32_get_from_hexstr(curve->order, order, curve->size);
+ }
+ if (coefB) {
+ res = stm32_get_from_hexstr(curve->Bf, coefB, curve->size);
+ }
+ break;
+ }
+ }
+ mp_clear(&modulusChk);
+ if (!found && res == MP_OKAY) {
+ res = MP_RANGE;
+ }
+ return res;
+}
+#endif /* WOLFSSL_STM32_PKA_V2 */
+
/**
Perform a point multiplication (timing resistant)
@@ -706,8 +739,19 @@ int wc_ecc_mulmod_ex2(const mp_int* k, ecc_point *G, ecc_point *R, mp_int* a,
#ifdef WOLFSSL_STM32_PKA_V2
XMEMSET(order, 0, sizeof(order));
XMEMSET(coefB, 0, sizeof(coefB));
- if (res == MP_OKAY && o != NULL)
- res = stm32_get_from_mp_int(order, o, szModulus);
+ if (res == MP_OKAY) {
+ if (o != NULL) {
+ /* use provided order and get coefB */
+ res = stm32_get_from_mp_int(order, o, szModulus);
+ if (res == MP_OKAY) {
+ res = stm32_get_curve_params(modulus, NULL, coefB);
+ }
+ }
+ else {
+ /* get order and coefB for matching prime */
+ res = stm32_get_curve_params(modulus, order, coefB);
+ }
+ }
#endif
if (res != MP_OKAY)
return res;
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-aes.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-aes.c
index 28a898ae..18feb969 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-aes.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-aes.c
@@ -26,10 +26,8 @@
#include <wolfssl/wolfcrypt/settings.h>
-#ifndef NO_AES
+#if !defined(NO_AES) && defined(WOLFSSL_TI_CRYPT)
-
-#if defined(WOLFSSL_TI_CRYPT)
#include <stdbool.h>
#include <stdint.h>
@@ -37,6 +35,13 @@
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <wolfssl/wolfcrypt/port/ti/ti-ccm.h>
+#ifdef NO_INLINE
+ #include <wolfssl/wolfcrypt/misc.h>
+#else
+ #define WOLFSSL_MISC_INCLUDED
+ #include <wolfcrypt/src/misc.c>
+#endif
+
#include "inc/hw_aes.h"
#include "inc/hw_memmap.h"
#include "inc/hw_ints.h"
@@ -45,7 +50,14 @@
#include "driverlib/rom_map.h"
#include "driverlib/rom.h"
-static int AesSetIV(Aes* aes, const byte* iv)
+#define AES_CFG_MODE_CTR_NOCTR (AES_CFG_MODE_CTR + 100)
+#define IS_ALIGN16(p) (((unsigned int)(p) & 0xf) == 0)
+#define ROUNDUP_16(n) ((n+15) & 0xfffffff0)
+#ifndef TI_BUFFSIZE
+#define TI_BUFFSIZE 1024
+#endif
+
+static int AesSetIV(Aes* aes, const byte* iv)
{
if (aes == NULL)
return BAD_FUNC_ARG;
@@ -58,196 +70,253 @@ static int AesSetIV(Aes* aes, const byte* iv)
return 0;
}
-WOLFSSL_API int wc_AesSetKey(Aes* aes, const byte* key, word32 len, const byte* iv,
- int dir)
+int wc_AesSetKey(Aes* aes, const byte* key, word32 len, const byte* iv, int dir)
{
- if(!wolfSSL_TI_CCMInit())return 1 ;
- if ((aes == NULL) || (key == NULL) || (iv == NULL))
+ if (!wolfSSL_TI_CCMInit())
+ return 1;
+ if ((aes == NULL) || (key == NULL))
return BAD_FUNC_ARG;
- if(!((dir == AES_ENCRYPTION) || (dir == AES_DECRYPTION)))
+ if (!((dir == AES_ENCRYPTION) || (dir == AES_DECRYPTION)))
return BAD_FUNC_ARG;
- switch(len) {
- case 16: aes->keylen = AES_CFG_KEY_SIZE_128BIT ; break ;
- case 24: aes->keylen = AES_CFG_KEY_SIZE_192BIT ; break ;
- case 32: aes->keylen = AES_CFG_KEY_SIZE_256BIT ; break ;
- default: return BAD_FUNC_ARG;
+ switch (len) {
+ #ifdef WOLFSSL_AES_128
+ case 16:
+ break;
+ #endif
+ #ifdef WOLFSSL_AES_192
+ case 24:
+ break;
+ #endif
+ #ifdef WOLFSSL_AES_256
+ case 32:
+ break;
+ #endif
+ default:
+ return BAD_FUNC_ARG;
}
+ aes->keylen = len;
+ aes->rounds = len / 4 + 6;
- XMEMCPY(aes->key, key, len) ;
- #ifdef WOLFSSL_AES_COUNTER
+ XMEMCPY(aes->key, key, len);
+#ifdef WOLFSSL_AES_COUNTER
aes->left = 0;
- #endif /* WOLFSSL_AES_COUNTER */
+#endif
return AesSetIV(aes, iv);
}
-#define AES_CFG_MODE_CTR_NOCTR AES_CFG_MODE_CTR+100
-#define IS_ALIGN16(p) (((unsigned int)(p)&0xf) == 0)
+int wc_AesGetKeySize(Aes* aes, word32* keySize)
+{
+ int ret = 0;
+
+ if (aes == NULL || keySize == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+ switch (aes->rounds) {
+#ifdef WOLFSSL_AES_128
+ case 10:
+ *keySize = 16;
+ break;
+#endif
+#ifdef WOLFSSL_AES_192
+ case 12:
+ *keySize = 24;
+ break;
+#endif
+#ifdef WOLFSSL_AES_256
+ case 14:
+ *keySize = 32;
+ break;
+#endif
+ default:
+ *keySize = 0;
+ ret = BAD_FUNC_ARG;
+ }
+
+ return ret;
+}
-static int AesAlign16(Aes* aes, byte* out, const byte* in, word32 sz, word32 dir, word32 mode)
+static int AesAlign16(Aes* aes, byte* out, const byte* in, word32 sz,
+ word32 dir, word32 mode)
{
- wolfSSL_TI_lockCCM() ;
+ /* Processed aligned chunk to HW AES */
+ wolfSSL_TI_lockCCM();
ROM_AESReset(AES_BASE);
- ROM_AESConfigSet(AES_BASE, (aes->keylen | dir |
- (mode==AES_CFG_MODE_CTR_NOCTR ? AES_CFG_MODE_CTR : mode)));
+ ROM_AESConfigSet(AES_BASE, (aes->keylen-8 | dir |
+ (mode == AES_CFG_MODE_CTR_NOCTR ? AES_CFG_MODE_CTR : mode)));
ROM_AESIVSet(AES_BASE, (uint32_t *)aes->reg);
- ROM_AESKey1Set(AES_BASE, (uint32_t *)aes->key, aes->keylen);
- if((dir == AES_CFG_DIR_DECRYPT)&& (mode == AES_CFG_MODE_CBC))
+ ROM_AESKey1Set(AES_BASE, (uint32_t *)aes->key, aes->keylen-8);
+ if (dir == AES_CFG_DIR_DECRYPT && mode == AES_CFG_MODE_CBC) {
/* if input and output same will overwrite input iv */
XMEMCPY(aes->tmp, in + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE);
+ }
ROM_AESDataProcess(AES_BASE, (uint32_t *)in, (uint32_t *)out, sz);
- wolfSSL_TI_unlockCCM() ;
+ wolfSSL_TI_unlockCCM();
/* store iv for next call */
- if(mode == AES_CFG_MODE_CBC){
- if(dir == AES_CFG_DIR_ENCRYPT)
+ if (mode == AES_CFG_MODE_CBC) {
+ if (dir == AES_CFG_DIR_ENCRYPT)
XMEMCPY(aes->reg, out + sz - AES_BLOCK_SIZE, AES_BLOCK_SIZE);
else
XMEMCPY(aes->reg, aes->tmp, AES_BLOCK_SIZE);
}
- if(mode == AES_CFG_MODE_CTR) {
+ if (mode == AES_CFG_MODE_CTR) {
do {
- int i ;
+ int i;
for (i = AES_BLOCK_SIZE - 1; i >= 0; i--) {
- if (++((byte *)aes->reg)[i])
- break ;
+ if (++((byte*)aes->reg)[i])
+ break;
}
- sz -= AES_BLOCK_SIZE ;
- } while((int)sz > 0) ;
+ sz -= AES_BLOCK_SIZE;
+ } while ((int)sz > 0);
}
- return 0 ;
+ return true;
}
-static int AesProcess(Aes* aes, byte* out, const byte* in, word32 sz, word32 dir, word32 mode)
+static int AesProcess(Aes* aes, byte* out, const byte* in, word32 sz,
+ word32 dir, word32 mode)
{
- const byte * in_p ; byte * out_p ;
- word32 size ;
- #define TI_BUFFSIZE 1024
- byte buff[TI_BUFFSIZE] ;
+ const byte *in_p; byte *out_p;
+ word32 size;
+ byte buff[TI_BUFFSIZE];
if ((aes == NULL) || (in == NULL) || (out == NULL))
return BAD_FUNC_ARG;
- if(sz % AES_BLOCK_SIZE)
+ if (sz % AES_BLOCK_SIZE)
return BAD_FUNC_ARG;
- while(sz > 0) {
- size = sz ; in_p = in ; out_p = out ;
- if(!IS_ALIGN16(in)){
- size = sz>TI_BUFFSIZE ? TI_BUFFSIZE : sz ;
- XMEMCPY(buff, in, size) ;
- in_p = (const byte *)buff ;
+ while (sz > 0) {
+ size = sz; in_p = in; out_p = out;
+ if (!IS_ALIGN16(in)) {
+ size = sz > TI_BUFFSIZE ? TI_BUFFSIZE : sz;
+ XMEMCPY(buff, in, size);
+ in_p = (const byte*)buff;
}
- if(!IS_ALIGN16(out)){
- size = sz>TI_BUFFSIZE ? TI_BUFFSIZE : sz ;
- out_p = buff ;
+ if (!IS_ALIGN16(out)) {
+ size = sz > TI_BUFFSIZE ? TI_BUFFSIZE : sz;
+ out_p = buff;
}
- AesAlign16(aes, out_p, in_p, size, dir, mode) ;
+ AesAlign16(aes, out_p, in_p, size, dir, mode);
- if(!IS_ALIGN16(out)){
- XMEMCPY(out, buff, size) ;
+ if (!IS_ALIGN16(out)) {
+ XMEMCPY(out, buff, size);
}
- sz -= size ; in += size ; out += size ;
+ sz -= size; in += size; out += size;
}
- return 0 ;
+ return 0;
}
-WOLFSSL_API int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
+int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
{
- return AesProcess(aes, out, in, sz, AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CBC) ;
+ return AesProcess(aes, out, in, sz, AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CBC);
}
-WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)
+int wc_AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)
{
- return AesProcess(aes, out, in, sz, AES_CFG_DIR_DECRYPT, AES_CFG_MODE_CBC) ;
+ return AesProcess(aes, out, in, sz, AES_CFG_DIR_DECRYPT, AES_CFG_MODE_CBC);
}
#ifdef WOLFSSL_AES_COUNTER
-WOLFSSL_API int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
-{
- char out_block[AES_BLOCK_SIZE] ;
- int odd ;
- int even ;
- char *tmp ; /* (char *)aes->tmp, for short */
- int ret;
-
- tmp = (char *)aes->tmp ;
- if(aes->left) {
- if((aes->left + sz) >= AES_BLOCK_SIZE){
- odd = AES_BLOCK_SIZE - aes->left ;
- } else {
- odd = sz ;
- }
- XMEMCPY(tmp+aes->left, in, odd) ;
- if((odd+aes->left) == AES_BLOCK_SIZE){
- ret = AesProcess(aes, (byte *)out_block, (byte const *)tmp, AES_BLOCK_SIZE,
- AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CTR) ;
- if (ret != 0)
- return ret;
- XMEMCPY(out, out_block+aes->left, odd) ;
- aes->left = 0 ;
- XMEMSET(tmp, 0x0, AES_BLOCK_SIZE) ;
- }
- in += odd ;
- out+= odd ;
- sz -= odd ;
- }
- odd = sz % AES_BLOCK_SIZE ; /* if there is tail flagment */
- if(sz / AES_BLOCK_SIZE) {
- even = (sz/AES_BLOCK_SIZE)*AES_BLOCK_SIZE ;
- ret = AesProcess(aes, out, in, even, AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CTR);
- if (ret != 0)
- return ret;
- out += even ;
- in += even ;
- }
- if(odd) {
- XMEMSET(tmp+aes->left, 0x0, AES_BLOCK_SIZE - aes->left) ;
- XMEMCPY(tmp+aes->left, in, odd) ;
- ret = AesProcess(aes, (byte *)out_block, (byte const *)tmp, AES_BLOCK_SIZE,
- AES_CFG_DIR_ENCRYPT,
- AES_CFG_MODE_CTR_NOCTR /* Counter mode without counting IV */
- );
- if (ret != 0)
- return ret;
- XMEMCPY(out, out_block+aes->left,odd) ;
- aes->left += odd ;
- }
- return 0;
+int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
+{
+ char out_block[AES_BLOCK_SIZE];
+ int odd;
+ int even;
+ char *tmp; /* (char *)aes->tmp, for short */
+ int ret;
+
+ tmp = (char *)aes->tmp;
+ if (aes->left) {
+ if ((aes->left + sz) >= AES_BLOCK_SIZE) {
+ odd = AES_BLOCK_SIZE - aes->left;
+ } else {
+ odd = sz;
+ }
+ XMEMCPY(tmp+aes->left, in, odd);
+ if ((odd+aes->left) == AES_BLOCK_SIZE) {
+ ret = AesProcess(aes, (byte*)out_block, (byte const *)tmp, AES_BLOCK_SIZE,
+ AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CTR);
+ if (ret != 0)
+ return ret;
+ XMEMCPY(out, out_block+aes->left, odd);
+ aes->left = 0;
+ XMEMSET(tmp, 0x0, AES_BLOCK_SIZE);
+ }
+ in += odd;
+ out+= odd;
+ sz -= odd;
+ }
+ odd = sz % AES_BLOCK_SIZE; /* if there is tail fragment */
+ if (sz / AES_BLOCK_SIZE) {
+ even = (sz/AES_BLOCK_SIZE)*AES_BLOCK_SIZE;
+ ret = AesProcess(aes, out, in, even, AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CTR);
+ if (ret != 0)
+ return ret;
+ out += even;
+ in += even;
+ }
+ if (odd) {
+ XMEMSET(tmp+aes->left, 0x0, AES_BLOCK_SIZE - aes->left);
+ XMEMCPY(tmp+aes->left, in, odd);
+ ret = AesProcess(aes, (byte*)out_block, (byte const *)tmp, AES_BLOCK_SIZE,
+ AES_CFG_DIR_ENCRYPT,
+ AES_CFG_MODE_CTR_NOCTR /* Counter mode without counting IV */
+ );
+ if (ret != 0)
+ return ret;
+ XMEMCPY(out, out_block+aes->left,odd);
+ aes->left += odd;
+ }
+ return 0;
}
-#endif
+#endif /* WOLFSSL_AES_COUNTER */
/* AES-DIRECT */
#if defined(WOLFSSL_AES_DIRECT)
-WOLFSSL_API int wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in)
+int wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in)
{
- return AesProcess(aes, out, in, AES_BLOCK_SIZE, AES_CFG_DIR_ENCRYPT, AES_CFG_MODE_CBC) ;
+ return AesProcess(aes, out, in, AES_BLOCK_SIZE, AES_CFG_DIR_ENCRYPT,
+ AES_CFG_MODE_CBC);
}
-WOLFSSL_API int wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in)
+int wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in)
{
- return AesProcess(aes, out, in, AES_BLOCK_SIZE, AES_CFG_DIR_DECRYPT, AES_CFG_MODE_CBC) ;
+ return AesProcess(aes, out, in, AES_BLOCK_SIZE, AES_CFG_DIR_DECRYPT,
+ AES_CFG_MODE_CBC);
}
-WOLFSSL_API int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len,
- const byte* iv, int dir)
+int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len, const byte* iv,
+ int dir)
{
- return(wc_AesSetKey(aes, key, len, iv, dir)) ;
+ return wc_AesSetKey(aes, key, len, iv, dir);
}
-#endif
+#endif /* WOLFSSL_AES_DIRECT */
#if defined(HAVE_AESGCM) || defined(HAVE_AESCCM)
-static int AesAuthSetKey(Aes* aes, const byte* key, word32 keySz)
+#ifndef NO_RNG
+static WC_INLINE void IncCtr(byte* ctr, word32 ctrSz)
+{
+ int i;
+ for (i = (int)ctrSz - 1; i >= 0; i--) {
+ if (++ctr[i])
+ break;
+ }
+}
+#endif
+
+static int AesAuthSetKey(Aes* aes, const byte* key, word32 keySz)
{
byte nonce[AES_BLOCK_SIZE];
if ((aes == NULL) || (key == NULL))
- return BAD_FUNC_ARG ;
+ return BAD_FUNC_ARG;
if (!((keySz == 16) || (keySz == 24) || (keySz == 32)))
- return BAD_FUNC_ARG ;
+ return BAD_FUNC_ARG;
XMEMSET(nonce, 0, sizeof(nonce));
return wc_AesSetKey(aes, key, keySz, nonce, AES_ENCRYPTION);
@@ -255,166 +324,231 @@ static int AesAuthSetKey(Aes* aes, const byte* key, word32 keySz)
static int AesAuthArgCheck(Aes* aes, byte* out, const byte* in, word32 inSz,
- const byte* nonce, word32 nonceSz,
- const byte* authTag, word32 authTagSz,
- const byte* authIn, word32 authInSz, word32 *M, word32 *L)
+ const byte* nonce, word32 nonceSz,
+ const byte* authTag, word32 authTagSz,
+ word32 *M, word32 *L)
{
- (void) authInSz ;
- if((aes == NULL)||(nonce == NULL)||(authTag== NULL)||(authIn == NULL))
+ if (aes == NULL || nonce == NULL || authTag == NULL)
return BAD_FUNC_ARG;
- if((inSz != 0) && ((out == NULL)||(in == NULL)))
+ if (inSz != 0 && (out == NULL || in == NULL))
return BAD_FUNC_ARG;
- switch(authTagSz){
- case 4:
- *M = AES_CFG_CCM_M_4; break ;
+ switch (authTagSz) {
+ case 4:
+ *M = AES_CFG_CCM_M_4; break;
case 6:
- *M = AES_CFG_CCM_M_6; break ;
+ *M = AES_CFG_CCM_M_6; break;
case 8:
- *M = AES_CFG_CCM_M_8; break ;
+ *M = AES_CFG_CCM_M_8; break;
case 10:
- *M = AES_CFG_CCM_M_10; break ;
+ *M = AES_CFG_CCM_M_10; break;
case 12:
- *M = AES_CFG_CCM_M_12; break ;
+ *M = AES_CFG_CCM_M_12; break;
case 14:
- *M = AES_CFG_CCM_M_14; break ;
+ *M = AES_CFG_CCM_M_14; break;
case 16:
- *M = AES_CFG_CCM_M_16; break ;
+ *M = AES_CFG_CCM_M_16; break;
default:
- return 1 ;
+ return 1;
}
- switch(nonceSz){
+ switch (nonceSz) {
case 7:
- *L = AES_CFG_CCM_L_8; break ;
+ *L = AES_CFG_CCM_L_8; break;
case 8:
- *L = AES_CFG_CCM_L_7; break ;
+ *L = AES_CFG_CCM_L_7; break;
case 9:
- *L = AES_CFG_CCM_L_6; break ;
+ *L = AES_CFG_CCM_L_6; break;
case 10:
- *L = AES_CFG_CCM_L_5; break ;
+ *L = AES_CFG_CCM_L_5; break;
case 11:
- *L = AES_CFG_CCM_L_4; break ;
+ *L = AES_CFG_CCM_L_4; break;
case 12:
- *L = AES_CFG_CCM_L_3; break ;
+ *L = AES_CFG_CCM_L_3; break;
case 13:
- *L = AES_CFG_CCM_L_2; break ;
+ *L = AES_CFG_CCM_L_2; break;
case 14:
- *L = AES_CFG_CCM_L_1; break ;
+ *L = AES_CFG_CCM_L_1; break;
default:
return 1;
}
- return 0 ;
-}
-
-static void AesAuthSetIv(Aes *aes, const byte *nonce, word32 len, word32 L, int mode) {
-
- if(mode == AES_CFG_MODE_CCM){
- XMEMSET(aes->reg, 0, 16) ;
- switch(L){
- case AES_CFG_CCM_L_8:
- aes->reg[0] = 0x7; break ;
- case AES_CFG_CCM_L_7:
- aes->reg[0] = 0x6; break ;
- case AES_CFG_CCM_L_6:
- aes->reg[0] = 0x5; break ;
- case AES_CFG_CCM_L_5:
- aes->reg[0] = 0x4; break ;
- case AES_CFG_CCM_L_4:
- aes->reg[0] = 0x3; break ;
- case AES_CFG_CCM_L_3:
- aes->reg[0] = 0x2; break ;
- case AES_CFG_CCM_L_2:
- aes->reg[0] = 0x1; break ;
- case AES_CFG_CCM_L_1:
- aes->reg[0] = 0x0; break ;
- }
- XMEMCPY(((byte *)aes->reg)+1, nonce, len) ;
- } else {
- byte *b = (byte *)aes->reg ;
- XMEMSET(aes->reg, 0, AES_BLOCK_SIZE);
- XMEMCPY(aes->reg, nonce, len);
- b[AES_BLOCK_SIZE-4] = 0 ;
- b[AES_BLOCK_SIZE-3] = 0 ;
- b[AES_BLOCK_SIZE-2] = 0 ;
- b[AES_BLOCK_SIZE-1] = 1 ;
- }
-}
-
-#define RoundUp16(n) ((n+15)&0xfffffff0)
-#define FREE_ALL \
- if(in_save) XFREE(in_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);\
- if(out_save) XFREE(out_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);\
- if(authIn_save)XFREE(authIn_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);\
- if(nonce_save) XFREE(nonce_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ return 0;
+}
+
+static void AesAuthSetIv(Aes *aes, const byte *nonce, word32 len, word32 L,
+ int mode)
+{
+ if (mode == AES_CFG_MODE_CCM) {
+ XMEMSET(aes->reg, 0, 16);
+ switch (L) {
+ case AES_CFG_CCM_L_8:
+ aes->reg[0] = 0x7; break;
+ case AES_CFG_CCM_L_7:
+ aes->reg[0] = 0x6; break;
+ case AES_CFG_CCM_L_6:
+ aes->reg[0] = 0x5; break;
+ case AES_CFG_CCM_L_5:
+ aes->reg[0] = 0x4; break;
+ case AES_CFG_CCM_L_4:
+ aes->reg[0] = 0x3; break;
+ case AES_CFG_CCM_L_3:
+ aes->reg[0] = 0x2; break;
+ case AES_CFG_CCM_L_2:
+ aes->reg[0] = 0x1; break;
+ case AES_CFG_CCM_L_1:
+ aes->reg[0] = 0x0; break;
+ }
+ XMEMCPY(((byte*)aes->reg)+1, nonce, len);
+ }
+ else { /* GCM */
+ if (len == GCM_NONCE_MID_SZ) {
+ byte *b = (byte*)aes->reg;
+ if (nonce != NULL)
+ XMEMCPY(aes->reg, nonce, len);
+ b[AES_BLOCK_SIZE-4] = 0;
+ b[AES_BLOCK_SIZE-3] = 0;
+ b[AES_BLOCK_SIZE-2] = 0;
+ b[AES_BLOCK_SIZE-1] = 1;
+
+ }
+ else {
+ word32 zeros[AES_BLOCK_SIZE/sizeof(word32)];
+ word32 subkey[AES_BLOCK_SIZE/sizeof(word32)];
+ word32 nonce_padded[AES_BLOCK_SIZE/sizeof(word32)];
+ word32 i;
+
+ XMEMSET(zeros, 0, sizeof(zeros)); /* init to zero */
+
+ wolfSSL_TI_lockCCM();
+ /* Perform a basic GHASH operation with the hashsubkey and IV */
+ /* get subkey */
+ ROM_AESReset(AES_BASE);
+ ROM_AESConfigSet(AES_BASE, (aes->keylen-8) | AES_CFG_DIR_ENCRYPT | AES_CFG_MODE_ECB);
+ ROM_AESKey1Set(AES_BASE, aes->key, (aes->keylen-8));
+ ROM_AESDataProcess(AES_BASE, zeros, subkey, sizeof zeros);
+
+ /* GHASH */
+ ROM_AESReset(AES_BASE);
+ ROM_AESConfigSet(AES_BASE, AES_CFG_KEY_SIZE_128BIT | AES_CFG_MODE_GCM_HLY0ZERO);
+ ROM_AESKey2Set(AES_BASE, subkey, AES_CFG_KEY_SIZE_128BIT);
+
+ ROM_AESLengthSet(AES_BASE, len);
+ ROM_AESAuthLengthSet(AES_BASE, 0);
+
+ /* copy nonce */
+ for (i = 0; i < len; i += AES_BLOCK_SIZE) {
+ word32 nonceSz = len - i;
+ if (nonceSz > AES_BLOCK_SIZE)
+ nonceSz = AES_BLOCK_SIZE;
+ XMEMSET(nonce_padded, 0, sizeof(nonce_padded));
+ XMEMCPY(nonce_padded, (word32*)(nonce + i), nonceSz);
+ ROM_AESDataWrite(AES_BASE, nonce_padded);
+ }
+
+ ROM_AESTagRead(AES_BASE, aes->reg);
+ wolfSSL_TI_unlockCCM();
+ }
+ }
+}
static int AesAuthEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
const byte* nonce, word32 nonceSz,
byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz, int mode)
{
- word32 M, L ;
- byte *in_a, *in_save ;
- byte *out_a, *out_save ;
- byte *authIn_a, *authIn_save ;
- byte *nonce_a, *nonce_save ;
- word32 tmpTag[4] ;
- int ret ;
-
- if(AesAuthArgCheck(aes, out, in, inSz, nonce, nonceSz, authTag, authTagSz, authIn, authInSz, &M, &L)
- == BAD_FUNC_ARG)return BAD_FUNC_ARG ;
-
- /* 16 byte padding */
- in_save = NULL ; out_save = NULL ; authIn_save = NULL ; nonce_save = NULL ;
- if((inSz%16)==0){
- in_save = NULL ; in_a = (byte *)in ;
- out_save = NULL ; out_a = out ;
- } else {
- if((in_save = XMALLOC(RoundUp16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E ; }
- in_a = in_save ; XMEMSET(in_a, 0, RoundUp16(inSz)) ; XMEMCPY(in_a, in, inSz) ;
-
- if((out_save = XMALLOC(RoundUp16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E ; }
- out_a = out_save ;
- }
-
- if((authInSz%16)==0){
- authIn_save = NULL ; authIn_a = (byte *)authIn ;
- } else {
- if((authIn_save = XMALLOC(RoundUp16(authInSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E ; }
- authIn_a = authIn_save ; XMEMSET(authIn_a, 0, RoundUp16(authInSz)) ; XMEMCPY(authIn_a, authIn, authInSz) ;
- }
-
- if((nonceSz%16)==0){
- nonce_save = NULL ; nonce_a = (byte *)nonce ;
- } else {
- if((nonce_save = XMALLOC(RoundUp16(nonceSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E; }
- nonce_a = nonce_save ; XMEMSET(nonce_a, 0, RoundUp16(nonceSz)) ; XMEMCPY(nonce_a, nonce, nonceSz) ;
- }
-
- /* do aes-ccm */
- AesAuthSetIv(aes, nonce, nonceSz, L, mode) ;
+ int ret;
+ word32 M, L;
+ byte *in_a, *in_save = NULL;
+ byte *out_a, *out_save = NULL;
+ byte *authIn_a, *authIn_save = NULL;
+ word32 tmpTag[AES_BLOCK_SIZE/sizeof(word32)];
+
+ ret = AesAuthArgCheck(aes, out, in, inSz, nonce, nonceSz, authTag,
+ authTagSz, &M, &L);
+ if (ret == BAD_FUNC_ARG) {
+ return ret;
+ }
+
+ AesAuthSetIv(aes, nonce, nonceSz, L, mode);
+
+ if (inSz == 0 && authInSz == 0) {
+ /* This is a special case that cannot use the GCM mode because the
+ * data and AAD lengths are both zero. The work around is to perform
+ * an ECB encryption on IV. */
+ wolfSSL_TI_lockCCM();
+ ROM_AESReset(AES_BASE);
+ ROM_AESConfigSet(AES_BASE, (aes->keylen-8) | AES_CFG_DIR_ENCRYPT | AES_CFG_MODE_ECB);
+ ROM_AESKey1Set(AES_BASE, aes->key, (aes->keylen-8));
+ ROM_AESDataProcess(AES_BASE, aes->reg, tmpTag, AES_BLOCK_SIZE);
+ wolfSSL_TI_unlockCCM();
+ XMEMCPY(authTag, tmpTag, authTagSz);
+ return 0;
+ }
+
+ /* Make sure all pointers are 16 byte aligned */
+ if (IS_ALIGN16(inSz)) {
+ in_save = NULL; in_a = (byte*)in;
+ out_save = NULL; out_a = out;
+ }
+ else {
+ in_save = XMALLOC(ROUNDUP_16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (in_save == NULL) { ret = MEMORY_E; goto exit; }
+ in_a = in_save;
+ XMEMSET(in_a, 0, ROUNDUP_16(inSz));
+ XMEMCPY(in_a, in, inSz);
+
+ out_save = XMALLOC(ROUNDUP_16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (out_save == NULL) { ret = MEMORY_E; goto exit; }
+ out_a = out_save;
+ }
+
+ if (IS_ALIGN16(authInSz)) {
+ authIn_save = NULL; authIn_a = (byte*)authIn;
+ }
+ else {
+ authIn_save = XMALLOC(ROUNDUP_16(authInSz), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (authIn_save == NULL) { ret = MEMORY_E; goto exit; }
+
+ authIn_a = authIn_save;
+ XMEMSET(authIn_a, 0, ROUNDUP_16(authInSz));
+ XMEMCPY(authIn_a, authIn, authInSz);
+ }
+
+ /* Do AES-CCM/GCM Cipher with Auth */
+ wolfSSL_TI_lockCCM();
ROM_AESReset(AES_BASE);
- ROM_AESConfigSet(AES_BASE, (aes->keylen | AES_CFG_DIR_ENCRYPT |
- AES_CFG_CTR_WIDTH_128 |
- mode | ((mode== AES_CFG_MODE_CCM) ? (L | M) : 0 ))) ;
+ ROM_AESConfigSet(AES_BASE,
+ (aes->keylen-8 |
+ AES_CFG_DIR_ENCRYPT |
+ AES_CFG_CTR_WIDTH_128 |
+ mode |
+ ((mode == AES_CFG_MODE_CCM) ? (L | M) : 0 ))
+ );
ROM_AESIVSet(AES_BASE, aes->reg);
- ROM_AESKey1Set(AES_BASE, aes->key, aes->keylen);
- ret = ROM_AESDataProcessAuth(AES_BASE, (unsigned int*)in_a, (unsigned int *)out_a, inSz,
- (unsigned int*)authIn_a, authInSz, (unsigned int *)tmpTag);
- if(ret == false){
- XMEMSET(out, 0, inSz) ;
- XMEMSET(authTag, 0, authTagSz) ;
- } else {
- XMEMCPY(out, out_a, inSz) ;
- XMEMCPY(authTag, tmpTag, authTagSz) ;
+ ROM_AESKey1Set(AES_BASE, aes->key, aes->keylen-8);
+
+ ret = ROM_AESDataProcessAuth(AES_BASE,
+ (unsigned int*)in_a, (unsigned int*)out_a, inSz,
+ (unsigned int*)authIn_a, authInSz,
+ (unsigned int*)tmpTag);
+ wolfSSL_TI_unlockCCM();
+
+ if (ret == false) {
+ XMEMSET(out, 0, inSz);
+ XMEMSET(authTag, 0, authTagSz);
+ ret = AES_GCM_AUTH_E;
+ }
+ else {
+ XMEMCPY(out, out_a, inSz);
+ XMEMCPY(authTag, tmpTag, authTagSz);
+ ret = 0;
}
- FREE_ALL;
- return 0 ;
+exit:
+ if (in_save) XFREE(in_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (out_save) XFREE(out_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (authIn_save)XFREE(authIn_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ return ret;
}
static int AesAuthDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
@@ -422,78 +556,110 @@ static int AesAuthDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
const byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz, int mode)
{
- word32 M, L ;
- byte *in_a, *in_save ;
- byte *out_a, *out_save ;
- byte *authIn_a, *authIn_save ;
- byte *nonce_a, *nonce_save ;
- word32 tmpTag[4] ;
- bool ret ;
-
- if(AesAuthArgCheck(aes, out, in, inSz, nonce, nonceSz, authTag, authTagSz, authIn, authInSz, &M, &L)
- == BAD_FUNC_ARG)return BAD_FUNC_ARG ;
-
- /* 16 byte padding */
- in_save = NULL ; out_save = NULL ; authIn_save = NULL ; nonce_save = NULL ;
- if((inSz%16)==0){
- in_save = NULL ; in_a = (byte *)in ;
- out_save = NULL ; out_a = out ;
- } else {
- if((in_save = XMALLOC(RoundUp16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E;}
- in_a = in_save ; XMEMSET(in_a, 0, RoundUp16(inSz)) ; XMEMCPY(in_a, in, inSz) ;
-
- if((out_save = XMALLOC(RoundUp16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E;}
- out_a = out_save ;
- }
-
- if((authInSz%16)==0){
- authIn_save = NULL ; authIn_a = (byte *)authIn ;
- } else {
- if((authIn_save = XMALLOC(RoundUp16(authInSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E; }
- authIn_a = authIn_save ; XMEMSET(authIn_a, 0, RoundUp16(authInSz)) ; XMEMCPY(authIn_a, authIn, authInSz) ;
- }
-
- if((nonceSz%16)==0){
- nonce_save = NULL ; nonce_a = (byte *)nonce ;
- } else {
- if((nonce_save = XMALLOC(RoundUp16(nonceSz), NULL, DYNAMIC_TYPE_TMP_BUFFER)) == NULL){
- FREE_ALL; return MEMORY_E; }
- nonce_a = nonce_save ; XMEMSET(nonce_a, 0, RoundUp16(nonceSz)) ; XMEMCPY(nonce_a, nonce, nonceSz) ;
- }
-
- /* do aes-ccm */
- AesAuthSetIv(aes, nonce, nonceSz, L, mode) ;
+ int ret;
+ word32 M, L;
+ byte *in_a, *in_save = NULL;
+ byte *out_a, *out_save = NULL;
+ byte *authIn_a, *authIn_save = NULL;
+ word32 tmpTag[AES_BLOCK_SIZE/sizeof(word32)];
+
+ ret = AesAuthArgCheck(aes, out, in, inSz, nonce, nonceSz, authTag,
+ authTagSz, &M, &L);
+ if (ret == BAD_FUNC_ARG) {
+ return ret;
+ }
+
+ AesAuthSetIv(aes, nonce, nonceSz, L, mode);
+
+ if (inSz == 0 && authInSz == 0) {
+ /* This is a special case that cannot use the GCM mode because the
+ * data and AAD lengths are both zero. The work around is to perform
+ * an ECB encryption on IV. */
+ wolfSSL_TI_lockCCM();
+ ROM_AESReset(AES_BASE);
+ ROM_AESConfigSet(AES_BASE, (aes->keylen-8) | AES_CFG_DIR_ENCRYPT | AES_CFG_MODE_ECB);
+ ROM_AESKey1Set(AES_BASE, aes->key, (aes->keylen-8));
+ ROM_AESDataProcess(AES_BASE, aes->reg, tmpTag, AES_BLOCK_SIZE);
+ wolfSSL_TI_unlockCCM();
+
+ if (XMEMCMP(authTag, tmpTag, authTagSz) != 0) {
+ ret = AES_GCM_AUTH_E;
+ }
+ return ret;
+ }
+
+ /* Make sure all pointers are 16 byte aligned */
+ if (IS_ALIGN16(inSz)) {
+ in_save = NULL; in_a = (byte*)in;
+ out_save = NULL; out_a = out;
+ }
+ else {
+ in_save = XMALLOC(ROUNDUP_16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (in_save == NULL) { ret = MEMORY_E; goto exit; }
+ in_a = in_save;
+ XMEMSET(in_a, 0, ROUNDUP_16(inSz));
+ XMEMCPY(in_a, in, inSz);
+
+ out_save = XMALLOC(ROUNDUP_16(inSz), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (out_save == NULL) { ret = MEMORY_E; goto exit; }
+ out_a = out_save;
+ }
+
+ if (IS_ALIGN16(authInSz)) {
+ authIn_save = NULL; authIn_a = (byte*)authIn;
+ }
+ else {
+ authIn_save = XMALLOC(ROUNDUP_16(authInSz), NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (authIn_save == NULL) { ret = MEMORY_E; goto exit; }
+
+ authIn_a = authIn_save;
+ XMEMSET(authIn_a, 0, ROUNDUP_16(authInSz));
+ XMEMCPY(authIn_a, authIn, authInSz);
+ }
+
+ /* Do AES-CCM/GCM Cipher with Auth */
+ wolfSSL_TI_lockCCM();
ROM_AESReset(AES_BASE);
- ROM_AESConfigSet(AES_BASE, (aes->keylen | AES_CFG_DIR_DECRYPT |
- AES_CFG_CTR_WIDTH_128 |
- mode | ((mode== AES_CFG_MODE_CCM) ? (L | M) : 0 ))) ;
+ ROM_AESConfigSet(AES_BASE,
+ (aes->keylen-8 |
+ AES_CFG_DIR_DECRYPT |
+ AES_CFG_CTR_WIDTH_128 |
+ mode |
+ ((mode == AES_CFG_MODE_CCM) ? (L | M) : 0 ))
+ );
ROM_AESIVSet(AES_BASE, aes->reg);
- ROM_AESKey1Set(AES_BASE, aes->key, aes->keylen);
- ret = ROM_AESDataProcessAuth(AES_BASE, (unsigned int*)in_a, (unsigned int *)out_a, inSz,
- (unsigned int*)authIn_a, authInSz, (unsigned int *)tmpTag);
- if((ret == false) || (XMEMCMP(authTag, tmpTag, authTagSz) != 0)){
- XMEMSET(out, 0, inSz) ;
- ret = false ;
- } else {
- XMEMCPY(out, out_a, inSz) ;
+ ROM_AESKey1Set(AES_BASE, aes->key, aes->keylen-8);
+ ret = ROM_AESDataProcessAuth(AES_BASE,
+ (unsigned int*)in_a, (unsigned int*)out_a, inSz,
+ (unsigned int*)authIn_a, authInSz,
+ (unsigned int*)tmpTag);
+ wolfSSL_TI_unlockCCM();
+
+ if ((ret == false) || (XMEMCMP(authTag, tmpTag, authTagSz) != 0)) {
+ XMEMSET(out, 0, inSz);
+ ret = AES_GCM_AUTH_E;
+ }
+ else {
+ XMEMCPY(out, out_a, inSz);
+ ret = 0;
}
- FREE_ALL ;
- return ret==true ? 0 : 1 ;
-}
-#endif
+exit:
+ if (in_save) XFREE(in_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (out_save) XFREE(out_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (authIn_save)XFREE(authIn_save, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ return ret;
+}
+#endif /* HAVE_AESGCM || HAVE_AESCCM */
#ifdef HAVE_AESGCM
-WOLFSSL_API int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
+int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
{
- return AesAuthSetKey(aes, key, len) ;
+ return AesAuthSetKey(aes, key, len);
}
-WOLFSSL_API int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
+int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz,
const byte* iv, word32 ivSz,
byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz)
@@ -502,58 +668,301 @@ WOLFSSL_API int wc_AesGcmEncrypt(Aes* aes, byte* out, const byte* in, word32 sz
return BAD_FUNC_ARG;
}
return AesAuthEncrypt(aes, out, in, sz, iv, ivSz, authTag, authTagSz,
- authIn, authInSz, AES_CFG_MODE_GCM_HY0CALC) ;
+ authIn, authInSz, AES_CFG_MODE_GCM_HY0CALC);
}
-WOLFSSL_API int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
+
+#if defined(HAVE_AES_DECRYPT) || defined(HAVE_AESGCM_DECRYPT)
+int wc_AesGcmDecrypt(Aes* aes, byte* out, const byte* in, word32 sz,
const byte* iv, word32 ivSz,
const byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz)
{
return AesAuthDecrypt(aes, out, in, sz, iv, ivSz, authTag, authTagSz,
- authIn, authInSz, AES_CFG_MODE_GCM_HY0CALC) ;
+ authIn, authInSz, AES_CFG_MODE_GCM_HY0CALC);
}
+#endif
-WOLFSSL_API int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len)
+int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len)
{
- return AesAuthSetKey(&gmac->aes, key, len) ;
+ return AesAuthSetKey(&gmac->aes, key, len);
}
-WOLFSSL_API int wc_GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz,
+int wc_GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz,
const byte* authIn, word32 authInSz,
byte* authTag, word32 authTagSz)
{
return AesAuthEncrypt(&gmac->aes, NULL, NULL, 0, iv, ivSz, authTag, authTagSz,
- authIn, authInSz, AES_CFG_MODE_GCM_HY0CALC) ;
+ authIn, authInSz, AES_CFG_MODE_GCM_HY0CALC);
+}
+
+#ifndef NO_RNG
+static WARN_UNUSED_RESULT WC_INLINE int CheckAesGcmIvSize(int ivSz) {
+ return (ivSz == GCM_NONCE_MIN_SZ ||
+ ivSz == GCM_NONCE_MID_SZ ||
+ ivSz == GCM_NONCE_MAX_SZ);
+}
+
+int wc_AesGcmSetIV(Aes* aes, word32 ivSz,
+ const byte* ivFixed, word32 ivFixedSz,
+ WC_RNG* rng)
+{
+ int ret = 0;
+
+ if (aes == NULL || rng == NULL || !CheckAesGcmIvSize((int)ivSz) ||
+ (ivFixed == NULL && ivFixedSz != 0) ||
+ (ivFixed != NULL && ivFixedSz != AES_IV_FIXED_SZ)) {
+
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ byte* iv = (byte*)aes->reg;
+
+ if (ivFixedSz)
+ XMEMCPY(iv, ivFixed, ivFixedSz);
+
+ ret = wc_RNG_GenerateBlock(rng, iv + ivFixedSz, ivSz - ivFixedSz);
+ }
+
+ if (ret == 0) {
+ /* If the IV is 96, allow for a 2^64 invocation counter.
+ * For any other size for the nonce, limit the invocation
+ * counter to 32-bits. (SP 800-38D 8.3) */
+ aes->invokeCtr[0] = 0;
+ aes->invokeCtr[1] = (ivSz == GCM_NONCE_MID_SZ) ? 0 : 0xFFFFFFFF;
+ #ifdef WOLFSSL_AESGCM_STREAM
+ aes->ctrSet = 1;
+ #endif
+ aes->nonceSz = ivSz;
+ }
+
+ return ret;
+}
+
+int wc_AesGcmEncrypt_ex(Aes* aes, byte* out, const byte* in, word32 sz,
+ byte* ivOut, word32 ivOutSz,
+ byte* authTag, word32 authTagSz,
+ const byte* authIn, word32 authInSz)
+{
+ int ret = 0;
+
+ if (aes == NULL || (sz != 0 && (in == NULL || out == NULL)) ||
+ ivOut == NULL || ivOutSz != aes->nonceSz ||
+ (authIn == NULL && authInSz != 0)) {
+
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ aes->invokeCtr[0]++;
+ if (aes->invokeCtr[0] == 0) {
+ aes->invokeCtr[1]++;
+ if (aes->invokeCtr[1] == 0)
+ ret = AES_GCM_OVERFLOW_E;
+ }
+ }
+
+ if (ret == 0) {
+ XMEMCPY(ivOut, aes->reg, ivOutSz);
+ ret = wc_AesGcmEncrypt(aes, out, in, sz,
+ (byte*)aes->reg, ivOutSz,
+ authTag, authTagSz,
+ authIn, authInSz);
+ if (ret == 0)
+ IncCtr((byte*)aes->reg, ivOutSz);
+ }
+
+ return ret;
+}
+
+int wc_Gmac(const byte* key, word32 keySz, byte* iv, word32 ivSz,
+ const byte* authIn, word32 authInSz,
+ byte* authTag, word32 authTagSz, WC_RNG* rng)
+{
+#ifdef WOLFSSL_SMALL_STACK
+ Aes *aes = NULL;
+#else
+ Aes aes[1];
+#endif
+ int ret;
+
+ if (key == NULL || iv == NULL || (authIn == NULL && authInSz != 0) ||
+ authTag == NULL || authTagSz == 0 || rng == NULL) {
+
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ if ((aes = (Aes *)XMALLOC(sizeof *aes, NULL,
+ DYNAMIC_TYPE_AES)) == NULL)
+ return MEMORY_E;
+#endif
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret == 0) {
+ ret = wc_AesGcmSetKey(aes, key, keySz);
+ if (ret == 0)
+ ret = wc_AesGcmSetIV(aes, ivSz, NULL, 0, rng);
+ if (ret == 0)
+ ret = wc_AesGcmEncrypt_ex(aes, NULL, NULL, 0, iv, ivSz,
+ authTag, authTagSz, authIn, authInSz);
+ wc_AesFree(aes);
+ }
+ ForceZero(aes, sizeof *aes);
+#ifdef WOLFSSL_SMALL_STACK
+ XFREE(aes, NULL, DYNAMIC_TYPE_AES);
+#endif
+
+ return ret;
}
+int wc_GmacVerify(const byte* key, word32 keySz,
+ const byte* iv, word32 ivSz,
+ const byte* authIn, word32 authInSz,
+ const byte* authTag, word32 authTagSz)
+{
+ int ret;
+#ifdef HAVE_AES_DECRYPT
+#ifdef WOLFSSL_SMALL_STACK
+ Aes *aes = NULL;
+#else
+ Aes aes[1];
+#endif
+
+ if (key == NULL || iv == NULL || (authIn == NULL && authInSz != 0) ||
+ authTag == NULL || authTagSz == 0 || authTagSz > AES_BLOCK_SIZE) {
+
+ return BAD_FUNC_ARG;
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ if ((aes = (Aes *)XMALLOC(sizeof *aes, NULL,
+ DYNAMIC_TYPE_AES)) == NULL)
+ return MEMORY_E;
+#endif
+
+ ret = wc_AesInit(aes, NULL, INVALID_DEVID);
+ if (ret == 0) {
+ ret = wc_AesGcmSetKey(aes, key, keySz);
+ if (ret == 0)
+ ret = wc_AesGcmDecrypt(aes, NULL, NULL, 0, iv, ivSz,
+ authTag, authTagSz, authIn, authInSz);
+ wc_AesFree(aes);
+ }
+ ForceZero(aes, sizeof *aes);
+#ifdef WOLFSSL_SMALL_STACK
+ XFREE(aes, NULL, DYNAMIC_TYPE_AES);
+#endif
+#else
+ (void)key;
+ (void)keySz;
+ (void)iv;
+ (void)ivSz;
+ (void)authIn;
+ (void)authInSz;
+ (void)authTag;
+ (void)authTagSz;
+ ret = NOT_COMPILED_IN;
+#endif
+ return ret;
+}
+#endif /* !NO_RNG */
+
#endif /* HAVE_AESGCM */
#ifdef HAVE_AESCCM
-WOLFSSL_API int wc_AesCcmSetKey(Aes* aes, const byte* key, word32 keySz)
+int wc_AesCcmSetKey(Aes* aes, const byte* key, word32 keySz)
{
- return AesAuthSetKey(aes, key, keySz) ;
+ return AesAuthSetKey(aes, key, keySz);
}
-WOLFSSL_API int wc_AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
+int wc_AesCcmEncrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
const byte* nonce, word32 nonceSz,
byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz)
{
return AesAuthEncrypt(aes, out, in, inSz, nonce, nonceSz, authTag, authTagSz,
- authIn, authInSz, AES_CFG_MODE_CCM) ;
+ authIn, authInSz, AES_CFG_MODE_CCM);
}
-WOLFSSL_API int wc_AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
+int wc_AesCcmDecrypt(Aes* aes, byte* out, const byte* in, word32 inSz,
const byte* nonce, word32 nonceSz,
const byte* authTag, word32 authTagSz,
const byte* authIn, word32 authInSz)
{
return AesAuthDecrypt(aes, out, in, inSz, nonce, nonceSz, authTag, authTagSz,
- authIn, authInSz, AES_CFG_MODE_CCM) ;
+ authIn, authInSz, AES_CFG_MODE_CCM);
+}
+
+/* abstract functions that call lower level AESCCM functions */
+#ifndef WC_NO_RNG
+
+int wc_AesCcmSetNonce(Aes* aes, const byte* nonce, word32 nonceSz)
+{
+ int ret = 0;
+
+ if (aes == NULL || nonce == NULL ||
+ nonceSz < CCM_NONCE_MIN_SZ || nonceSz > CCM_NONCE_MAX_SZ) {
+
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ XMEMCPY(aes->reg, nonce, nonceSz);
+ aes->nonceSz = nonceSz;
+
+ /* Invocation counter should be 2^61 */
+ aes->invokeCtr[0] = 0;
+ aes->invokeCtr[1] = 0xE0000000;
+ }
+
+ return ret;
+}
+
+
+int wc_AesCcmEncrypt_ex(Aes* aes, byte* out, const byte* in, word32 sz,
+ byte* ivOut, word32 ivOutSz,
+ byte* authTag, word32 authTagSz,
+ const byte* authIn, word32 authInSz)
+{
+ int ret = 0;
+
+ if (aes == NULL || out == NULL ||
+ (in == NULL && sz != 0) ||
+ ivOut == NULL ||
+ (authIn == NULL && authInSz != 0) ||
+ (ivOutSz != aes->nonceSz)) {
+
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ aes->invokeCtr[0]++;
+ if (aes->invokeCtr[0] == 0) {
+ aes->invokeCtr[1]++;
+ if (aes->invokeCtr[1] == 0)
+ ret = AES_CCM_OVERFLOW_E;
+ }
+ }
+
+ if (ret == 0) {
+ ret = wc_AesCcmEncrypt(aes, out, in, sz,
+ (byte*)aes->reg, aes->nonceSz,
+ authTag, authTagSz,
+ authIn, authInSz);
+ if (ret == 0) {
+ XMEMCPY(ivOut, aes->reg, aes->nonceSz);
+ IncCtr((byte*)aes->reg, aes->nonceSz);
+ }
+ }
+
+ return ret;
}
+#endif /* !WC_NO_RNG */
+
#endif /* HAVE_AESCCM */
-WOLFSSL_API int wc_AesInit(Aes* aes, void* heap, int devId)
+int wc_AesInit(Aes* aes, void* heap, int devId)
{
if (aes == NULL)
return BAD_FUNC_ARG;
@@ -564,14 +973,9 @@ WOLFSSL_API int wc_AesInit(Aes* aes, void* heap, int devId)
return 0;
}
-WOLFSSL_API void wc_AesFree(Aes* aes)
+void wc_AesFree(Aes* aes)
{
(void)aes;
}
-#endif /* WOLFSSL_TI_CRYPT */
-
-#endif /* NO_AES */
-
-
-
+#endif /* !NO_AES && WOLFSSL_TI_CRYPT */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-hash.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-hash.c
index 92b2fe99..0077e96d 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-hash.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/ti/ti-hash.c
@@ -62,8 +62,10 @@
#define SHAMD5_ALGO_SHA224 4
#endif
-static int hashInit(wolfssl_TI_Hash *hash) {
- if (!wolfSSL_TI_CCMInit())return 1;
+static int hashInit(wolfssl_TI_Hash *hash)
+{
+ if (!wolfSSL_TI_CCMInit())
+ return 1;
hash->used = 0;
hash->msg = 0;
hash->len = 0;
@@ -115,8 +117,13 @@ static int hashGetHash(wolfssl_TI_Hash *hash, byte* result, word32 algo, word32
return 0;
}
-static int hashCopy(wolfssl_TI_Hash *src, wolfssl_TI_Hash *dst) {
- XMEMCPY(dst, src, sizeof(wolfssl_TI_Hash));
+static int hashCopy(wolfssl_TI_Hash *src, wolfssl_TI_Hash *dst)
+{
+ /* only copy hash, zero the rest of the struct to avoid double-free */
+ dst->msg = NULL;
+ dst->used = 0;
+ dst->len = 0;
+ XMEMCPY(dst->hash, src->hash, sizeof(dst->hash));
return 0;
}
@@ -194,11 +201,12 @@ WOLFSSL_API int wc_Md5GetHash(Md5* md5, byte* hash)
return hashGetHash((wolfssl_TI_Hash *)md5, hash, SHAMD5_ALGO_MD5, MD5_DIGEST_SIZE);
}
-WOLFSSL_API int wc_Md5Copy(Md5* src, Md5* dst) {
+WOLFSSL_API int wc_Md5Copy(Md5* src, Md5* dst)
+{
return hashCopy((wolfssl_TI_Hash *)src, (wolfssl_TI_Hash *)dst);
}
-WOLFSSL_API int wc_Md5Hash(const byte*data, word32 len, byte*hash)
+WOLFSSL_API int wc_Md5Hash(const byte*data, word32 len, byte* hash)
{
return hashHash(data, len, hash, SHAMD5_ALGO_MD5, MD5_DIGEST_SIZE);
}
@@ -239,11 +247,12 @@ WOLFSSL_API int wc_ShaGetHash(Sha* sha, byte* hash)
return hashGetHash(sha, hash, SHAMD5_ALGO_SHA1, SHA_DIGEST_SIZE);
}
-WOLFSSL_API int wc_ShaCopy(Sha* src, Sha* dst) {
+WOLFSSL_API int wc_ShaCopy(Sha* src, Sha* dst)
+{
return hashCopy((wolfssl_TI_Hash *)src, (wolfssl_TI_Hash *)dst);
}
-WOLFSSL_API int wc_ShaHash(const byte*data, word32 len, byte*hash)
+WOLFSSL_API int wc_ShaHash(const byte*data, word32 len, byte* hash)
{
return hashHash(data, len, hash, SHAMD5_ALGO_SHA1, SHA_DIGEST_SIZE);
}
@@ -284,7 +293,12 @@ WOLFSSL_API int wc_Sha224GetHash(Sha224* sha224, byte* hash)
return hashGetHash(sha224, hash, SHAMD5_ALGO_SHA224, SHA224_DIGEST_SIZE);
}
-WOLFSSL_API int wc_Sha224Hash(const byte* data, word32 len, byte*hash)
+WOLFSSL_API int wc_Sha224Copy(Sha224* src, Sha224* dst)
+{
+ return hashCopy((wolfssl_TI_Hash *)src, (wolfssl_TI_Hash *)dst);
+}
+
+WOLFSSL_API int wc_Sha224Hash(const byte* data, word32 len, byte* hash)
{
return hashHash(data, len, hash, SHAMD5_ALGO_SHA224, SHA224_DIGEST_SIZE);
}
@@ -326,7 +340,12 @@ WOLFSSL_API int wc_Sha256GetHash(Sha256* sha256, byte* hash)
return hashGetHash(sha256, hash, SHAMD5_ALGO_SHA256, SHA256_DIGEST_SIZE);
}
-WOLFSSL_API int wc_Sha256Hash(const byte* data, word32 len, byte*hash)
+WOLFSSL_API int wc_Sha256Copy(Sha256* src, Sha256* dst)
+{
+ return hashCopy((wolfssl_TI_Hash *)src, (wolfssl_TI_Hash *)dst);
+}
+
+WOLFSSL_API int wc_Sha256Hash(const byte* data, word32 len, byte* hash)
{
return hashHash(data, len, hash, SHAMD5_ALGO_SHA256, SHA256_DIGEST_SIZE);
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/port/xilinx/xil-aesgcm.c b/extra/wolfssl/wolfssl/wolfcrypt/src/port/xilinx/xil-aesgcm.c
index aabcbd37..e2dfc8af 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/port/xilinx/xil-aesgcm.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/port/xilinx/xil-aesgcm.c
@@ -135,7 +135,9 @@ int wc_AesGcmSetKey_ex(Aes* aes, const byte* key, word32 len, word32 kup)
aes->xKeySize =
len == AES_128_KEY_SIZE ? XSECURE_AES_KEY_SIZE_128 :
XSECURE_AES_KEY_SIZE_256;
- XMEMCPY(aes->keyInit, key, len);
+ if (key != NULL) {
+ XMEMCPY(aes->keyInit, key, len);
+ }
return 0;
}
@@ -478,7 +480,12 @@ int wc_AesGcmSetKey_ex(Aes* aes, const byte* key, word32 len, word32 kup)
{
XCsuDma_Config* con;
- if (aes == NULL || key == NULL) {
+ if (aes == NULL) {
+ return BAD_FUNC_ARG;
+ }
+
+ if (kup == XSECURE_CSU_AES_KEY_SRC_KUP && key == NULL) {
+ WOLFSSL_MSG("Expecting key buffer passed in if using KUP");
return BAD_FUNC_ARG;
}
@@ -501,7 +508,9 @@ int wc_AesGcmSetKey_ex(Aes* aes, const byte* key, word32 len, word32 kup)
aes->keylen = len;
aes->kup = kup;
- XMEMCPY((byte*)(aes->keyInit), key, len);
+ if (key != NULL) {
+ XMEMCPY((byte*)(aes->keyInit), key, len);
+ }
return 0;
}
@@ -538,18 +547,26 @@ int wc_AesGcmEncrypt(Aes* aes, byte* out,
return BAD_FUNC_ARG;
}
+ #ifndef NO_WOLFSSL_XILINX_TAG_MALLOC
tmp = (byte*)XMALLOC(sz + AES_GCM_AUTH_SZ, aes->heap,
DYNAMIC_TYPE_TMP_BUFFER);
if (tmp == NULL) {
return MEMORY_E;
}
+ #else
+ /* if NO_WOLFSSL_XILINX_TAG_MALLOC is defined than it is assumed that
+ * out buffer is large enough to hold both the cipher out and tag */
+ tmp = out;
+ #endif
XSecure_AesInitialize(&(aes->xilAes), &(aes->dma), aes->kup, (word32*)iv,
aes->keyInit);
XSecure_AesEncryptData(&(aes->xilAes), tmp, in, sz);
- XMEMCPY(out, tmp, sz);
XMEMCPY(authTag, tmp + sz, authTagSz);
+ #ifndef NO_WOLFSSL_XILINX_TAG_MALLOC
+ XMEMCPY(out, tmp, sz);
XFREE(tmp, aes->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ #endif
}
/* handle completing tag with any additional data */
@@ -610,7 +627,7 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out,
/* calls to hardened crypto */
XSecure_AesInitialize(&(aes->xilAes), &(aes->dma), aes->kup,
(word32*)iv, aes->keyInit);
- XSecure_AesDecryptData(&(aes->xilAes), out, in, sz, tag);
+ ret = XSecure_AesDecryptData(&(aes->xilAes), out, in, sz, tag);
/* account for additional data */
if (authIn != NULL && authInSz > 0) {
@@ -623,6 +640,12 @@ int wc_AesGcmDecrypt(Aes* aes, byte* out,
return AES_GCM_AUTH_E;
}
}
+ else {
+ /* if no aad then check the result of the initial tag passed in */
+ if (ret != XST_SUCCESS) {
+ return AES_GCM_AUTH_E;
+ }
+ }
return 0;
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/random.c b/extra/wolfssl/wolfssl/wolfcrypt/src/random.c
index cc47fab2..d44f2e2d 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/random.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/random.c
@@ -31,6 +31,9 @@ This library contains implementation for the random number generator.
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
+#if defined(DEBUG_WOLFSSL)
+ #include <wolfssl/wolfcrypt/logging.h>
+#endif
/* on HPUX 11 you may need to install /dev/random see
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=KRNG11I
@@ -89,9 +92,12 @@ This library contains implementation for the random number generator.
#elif defined(HAVE_WNR)
#include <wnr.h>
#include <wolfssl/wolfcrypt/logging.h>
- wolfSSL_Mutex wnr_mutex; /* global netRandom mutex */
+ wolfSSL_Mutex wnr_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(wnr_mutex); /* global netRandom mutex */
int wnr_timeout = 0; /* entropy timeout, milliseconds */
- int wnr_mutex_init = 0; /* flag for mutex init */
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
+ int wnr_mutex_inited = 0; /* flag for mutex init */
+ #endif
+ int wnr_inited = 0; /* flag for whether wc_InitNetRandom() has been called */
wnr_context* wnr_ctx; /* global netRandom context */
#elif defined(FREESCALE_KSDK_2_0_TRNG)
#include "fsl_trng.h"
@@ -311,7 +317,7 @@ enum {
typedef struct DRBG_internal DRBG_internal;
-static int wc_RNG_HealthTestLocal(int reseed);
+static int wc_RNG_HealthTestLocal(int reseed, void* heap, int devId);
/* Hash Derivation Function */
/* Returns: DRBG_SUCCESS or DRBG_FAILURE */
@@ -809,6 +815,26 @@ static WC_INLINE word64 Entropy_TimeHiRes(void)
);
return cnt;
}
+#elif !defined(ENTROPY_MEMUSE_THREAD) && defined(__MICROBLAZE__)
+
+#define LPD_SCNTR_BASE_ADDRESS 0xFF250000
+
+/* Get the high resolution time counter.
+ * Collect ticks from LPD_SCNTR
+ * @return 64-bit tick count.
+ */
+static WC_INLINE word64 Entropy_TimeHiRes(void)
+{
+ word64 cnt;
+ word32 *ptr;
+
+ ptr = (word32*)LPD_SCNTR_BASE_ADDRESS;
+ cnt = *(ptr+1);
+ cnt = cnt << 32;
+ cnt |= *ptr;
+
+ return cnt;
+}
#elif !defined(ENTROPY_MEMUSE_THREAD) && (_POSIX_C_SOURCE >= 199309L)
/* Get the high resolution time counter.
*
@@ -1353,7 +1379,7 @@ static int Entropy_Condition(byte* output, word32 len, byte* noise,
/* Mutex to prevent multiple callers requesting entropy operations at the
* same time.
*/
-static wolfSSL_Mutex entropy_mutex;
+static wolfSSL_Mutex entropy_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(entropy_mutex);
/* Get entropy of specified strength.
*
@@ -1480,7 +1506,7 @@ int Entropy_Init()
/* Check whether initialization has succeeded before. */
if (!entropy_memuse_initialized) {
- #ifndef SINGLE_THREADED
+ #if !defined(SINGLE_THREADED) && !defined(WOLFSSL_MUTEX_INITIALIZER)
ret = wc_InitMutex(&entropy_mutex);
#endif
if (ret == 0) {
@@ -1517,7 +1543,7 @@ void Entropy_Final()
if (entropy_memuse_initialized) {
/* Dispose of the SHA3-356 hash object. */
wc_Sha3_256_Free(&entropyHash);
- #ifndef SINGLE_THREADED
+ #if !defined(SINGLE_THREADED) && !defined(WOLFSSL_MUTEX_INITIALIZER)
wc_FreeMutex(&entropy_mutex);
#endif
/* Clear health test data. */
@@ -1615,11 +1641,21 @@ static int _InitRng(WC_RNG* rng, byte* nonce, word32 nonceSz,
#ifdef CUSTOM_RAND_GENERATE_BLOCK
ret = 0; /* success */
#else
+
+ /* not CUSTOM_RAND_GENERATE_BLOCK follows */
#ifdef HAVE_HASHDRBG
- if (nonceSz == 0)
+ if (nonceSz == 0) {
seedSz = MAX_SEED_SZ;
+ }
- if (wc_RNG_HealthTestLocal(0) == 0) {
+ ret = wc_RNG_HealthTestLocal(0, rng->heap, devId);
+ if (ret != 0) {
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("wc_RNG_HealthTestLocal failed err = %d", ret);
+ #endif
+ ret = DRBG_CONT_FAILURE;
+ }
+ else {
#ifndef WOLFSSL_SMALL_STACK
byte seed[MAX_SEED_SZ];
#else
@@ -1634,13 +1670,23 @@ static int _InitRng(WC_RNG* rng, byte* nonce, word32 nonceSz,
(struct DRBG*)XMALLOC(sizeof(DRBG_internal), rng->heap,
DYNAMIC_TYPE_RNG);
if (rng->drbg == NULL) {
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("_InitRng XMALLOC failed to allocate %d bytes",
+ sizeof(DRBG_internal));
+ #endif
ret = MEMORY_E;
rng->status = DRBG_FAILED;
}
#else
rng->drbg = (struct DRBG*)&rng->drbg_data;
+#endif /* WOLFSSL_NO_MALLOC or WOLFSSL_STATIC_MEMORY */
+
+ if (ret != 0) {
+#if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("_InitRng failed. err = ", ret);
#endif
- if (ret == 0) {
+ }
+ else {
#ifdef WC_RNG_SEED_CB
if (seedCb == NULL) {
ret = DRBG_NO_SEED_CB;
@@ -1653,10 +1699,13 @@ static int _InitRng(WC_RNG* rng, byte* nonce, word32 nonceSz,
}
#else
ret = wc_GenerateSeed(&rng->seed, seed, seedSz);
-#endif
+#endif /* WC_RNG_SEED_CB */
if (ret == 0)
ret = wc_RNG_TestSeed(seed, seedSz);
else {
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("wc_RNG_TestSeed failed... %d", ret);
+ #endif
ret = DRBG_FAILURE;
rng->status = DRBG_FAILED;
}
@@ -1672,24 +1721,21 @@ static int _InitRng(WC_RNG* rng, byte* nonce, word32 nonceSz,
#endif
rng->drbg = NULL;
}
- }
+ } /* ret == 0 */
ForceZero(seed, seedSz);
#ifdef WOLFSSL_SMALL_STACK
XFREE(seed, rng->heap, DYNAMIC_TYPE_SEED);
#endif
- }
- else {
- ret = DRBG_CONT_FAILURE;
- }
+ } /* else swc_RNG_HealthTestLocal was successful */
if (ret == DRBG_SUCCESS) {
#ifdef WOLFSSL_CHECK_MEM_ZERO
-#ifdef HAVE_HASHDRBG
+ #ifdef HAVE_HASHDRBG
struct DRBG_internal* drbg = (struct DRBG_internal*)rng->drbg;
wc_MemZero_Add("DRBG V", &drbg->V, sizeof(drbg->V));
wc_MemZero_Add("DRBG C", &drbg->C, sizeof(drbg->C));
-#endif
+ #endif
#endif
rng->status = DRBG_OK;
@@ -1731,6 +1777,26 @@ WC_RNG* wc_rng_new(byte* nonce, word32 nonceSz, void* heap)
}
+int wc_rng_new_ex(WC_RNG **rng, byte* nonce, word32 nonceSz,
+ void* heap, int devId)
+{
+ int ret;
+
+ *rng = (WC_RNG*)XMALLOC(sizeof(WC_RNG), heap, DYNAMIC_TYPE_RNG);
+ if (*rng == NULL) {
+ return MEMORY_E;
+ }
+
+ ret = _InitRng(*rng, nonce, nonceSz, heap, devId);
+ if (ret != 0) {
+ XFREE(*rng, heap, DYNAMIC_TYPE_RNG);
+ *rng = NULL;
+ }
+
+ return ret;
+}
+
+
WOLFSSL_ABI
void wc_rng_free(WC_RNG* rng)
{
@@ -1830,7 +1896,11 @@ int wc_RNG_GenerateBlock(WC_RNG* rng, byte* output, word32 sz)
ret = Hash_DRBG_Generate((DRBG_internal *)rng->drbg, output, sz);
if (ret == DRBG_NEED_RESEED) {
- if (wc_RNG_HealthTestLocal(1) == 0) {
+ int devId = INVALID_DEVID;
+ #if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLF_CRYPTO_CB)
+ devId = rng->devId;
+ #endif
+ if (wc_RNG_HealthTestLocal(1, rng->heap, devId) == 0) {
#ifndef WOLFSSL_SMALL_STACK
byte newSeed[SEED_SZ + SEED_BLOCK_SZ];
ret = DRBG_SUCCESS;
@@ -2083,7 +2153,7 @@ const FLASH_QUALIFIER byte outputB_data[] = {
};
-static int wc_RNG_HealthTestLocal(int reseed)
+static int wc_RNG_HealthTestLocal(int reseed, void* heap, int devId)
{
int ret = 0;
#ifdef WOLFSSL_SMALL_STACK
@@ -2102,17 +2172,17 @@ static int wc_RNG_HealthTestLocal(int reseed)
if (reseed) {
#ifdef WOLFSSL_USE_FLASHMEM
- byte* seedA = (byte*)XMALLOC(sizeof(seedA_data), NULL,
+ byte* seedA = (byte*)XMALLOC(sizeof(seedA_data), heap,
DYNAMIC_TYPE_TMP_BUFFER);
- byte* reseedSeedA = (byte*)XMALLOC(sizeof(reseedSeedA_data), NULL,
+ byte* reseedSeedA = (byte*)XMALLOC(sizeof(reseedSeedA_data), heap,
DYNAMIC_TYPE_TMP_BUFFER);
- byte* outputA = (byte*)XMALLOC(sizeof(outputA_data), NULL,
+ byte* outputA = (byte*)XMALLOC(sizeof(outputA_data), heap,
DYNAMIC_TYPE_TMP_BUFFER);
if (!seedA || !reseedSeedA || !outputA) {
- XFREE(seedA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(reseedSeedA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(outputA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(seedA, heap, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(reseedSeedA, heap, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(outputA, heap, DYNAMIC_TYPE_TMP_BUFFER);
ret = MEMORY_E;
}
else {
@@ -2124,9 +2194,11 @@ static int wc_RNG_HealthTestLocal(int reseed)
const byte* reseedSeedA = reseedSeedA_data;
const byte* outputA = outputA_data;
#endif
- ret = wc_RNG_HealthTest(1, seedA, sizeof(seedA_data),
- reseedSeedA, sizeof(reseedSeedA_data),
- check, RNG_HEALTH_TEST_CHECK_SIZE);
+ ret = wc_RNG_HealthTest_ex(1, NULL, 0,
+ seedA, sizeof(seedA_data),
+ reseedSeedA, sizeof(reseedSeedA_data),
+ check, RNG_HEALTH_TEST_CHECK_SIZE,
+ heap, devId);
if (ret == 0) {
if (ConstantCompare(check, outputA,
RNG_HEALTH_TEST_CHECK_SIZE) != 0)
@@ -2142,14 +2214,14 @@ static int wc_RNG_HealthTestLocal(int reseed)
}
else {
#ifdef WOLFSSL_USE_FLASHMEM
- byte* seedB = (byte*)XMALLOC(sizeof(seedB_data), NULL,
+ byte* seedB = (byte*)XMALLOC(sizeof(seedB_data), heap,
DYNAMIC_TYPE_TMP_BUFFER);
- byte* outputB = (byte*)XMALLOC(sizeof(outputB_data), NULL,
+ byte* outputB = (byte*)XMALLOC(sizeof(outputB_data), heap,
DYNAMIC_TYPE_TMP_BUFFER);
if (!seedB || !outputB) {
- XFREE(seedB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(outputB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(seedB, heap, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(outputB, heap, DYNAMIC_TYPE_TMP_BUFFER);
ret = MEMORY_E;
}
else {
@@ -2159,13 +2231,31 @@ static int wc_RNG_HealthTestLocal(int reseed)
const byte* seedB = seedB_data;
const byte* outputB = outputB_data;
#endif
- ret = wc_RNG_HealthTest(0, seedB, sizeof(seedB_data),
- NULL, 0,
- check, RNG_HEALTH_TEST_CHECK_SIZE);
- if (ret == 0) {
- if (ConstantCompare(check, outputB,
- RNG_HEALTH_TEST_CHECK_SIZE) != 0)
+#if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("RNG_HEALTH_TEST_CHECK_SIZE = %d",
+ RNG_HEALTH_TEST_CHECK_SIZE);
+ WOLFSSL_MSG_EX("sizeof(seedB_data) = %d",
+ (int)sizeof(outputB_data));
+#endif
+ ret = wc_RNG_HealthTest_ex(0, NULL, 0,
+ seedB, sizeof(seedB_data),
+ NULL, 0,
+ check, RNG_HEALTH_TEST_CHECK_SIZE,
+ heap, devId);
+ if (ret != 0) {
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("RNG_HealthTest failed: err = %d", ret);
+ #endif
+ }
+ else {
+ ret = ConstantCompare(check, outputB,
+ RNG_HEALTH_TEST_CHECK_SIZE);
+ if (ret != 0) {
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG_EX("Random ConstantCompare failed: err = %d", ret);
+ #endif
ret = -1;
+ }
}
/* The previous test cases use a large seed instead of a seed and nonce.
@@ -2174,11 +2264,11 @@ static int wc_RNG_HealthTestLocal(int reseed)
* byte 32, feed them into the health test separately. */
if (ret == 0) {
ret = wc_RNG_HealthTest_ex(0,
- seedB + 32, sizeof(seedB_data) - 32,
- seedB, 32,
- NULL, 0,
- check, RNG_HEALTH_TEST_CHECK_SIZE,
- NULL, INVALID_DEVID);
+ seedB + 32, sizeof(seedB_data) - 32,
+ seedB, 32,
+ NULL, 0,
+ check, RNG_HEALTH_TEST_CHECK_SIZE,
+ heap, devId);
if (ret == 0) {
if (ConstantCompare(check, outputB, sizeof(outputB_data)) != 0)
ret = -1;
@@ -2186,8 +2276,8 @@ static int wc_RNG_HealthTestLocal(int reseed)
}
#ifdef WOLFSSL_USE_FLASHMEM
- XFREE(seedB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
- XFREE(outputB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(seedB, heap, DYNAMIC_TYPE_TMP_BUFFER);
+ XFREE(outputB, heap, DYNAMIC_TYPE_TMP_BUFFER);
}
#endif
}
@@ -2210,10 +2300,13 @@ static int wc_RNG_HealthTestLocal(int reseed)
*/
int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
{
+ int ret;
+
if (configFile == NULL || timeout < 0)
return BAD_FUNC_ARG;
- if (wnr_mutex_init > 0) {
+#ifndef WOLFSSL_MUTEX_INITIALIZER
+ if (wnr_mutex_inited > 0) {
WOLFSSL_MSG("netRandom context already created, skipping");
return 0;
}
@@ -2222,7 +2315,14 @@ int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
WOLFSSL_MSG("Bad Init Mutex wnr_mutex");
return BAD_MUTEX_E;
}
- wnr_mutex_init = 1;
+
+ wnr_mutex_inited = 1;
+#endif
+
+ if (wnr_inited > 0) {
+ WOLFSSL_MSG("netRandom context already created, skipping");
+ return 0;
+ }
if (wc_LockMutex(&wnr_mutex) != 0) {
WOLFSSL_MSG("Bad Lock Mutex wnr_mutex");
@@ -2235,7 +2335,8 @@ int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
/* create global wnr_context struct */
if (wnr_create(&wnr_ctx) != WNR_ERROR_NONE) {
WOLFSSL_MSG("Error creating global netRandom context");
- return RNG_FAILURE_E;
+ ret = RNG_FAILURE_E;
+ goto out;
}
/* load config file */
@@ -2243,7 +2344,8 @@ int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
WOLFSSL_MSG("Error loading config file into netRandom context");
wnr_destroy(wnr_ctx);
wnr_ctx = NULL;
- return RNG_FAILURE_E;
+ ret = RNG_FAILURE_E;
+ goto out;
}
/* create/init polling mechanism */
@@ -2251,7 +2353,8 @@ int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
WOLFSSL_MSG("Error initializing netRandom polling mechanism");
wnr_destroy(wnr_ctx);
wnr_ctx = NULL;
- return RNG_FAILURE_E;
+ ret = RNG_FAILURE_E;
+ goto out;
}
/* validate config, set HMAC callback (optional) */
@@ -2260,12 +2363,17 @@ int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
wnr_destroy(wnr_ctx);
wnr_ctx = NULL;
wnr_poll_destroy();
- return RNG_FAILURE_E;
+ ret = RNG_FAILURE_E;
+ goto out;
}
+ wnr_inited = 1;
+
+out:
+
wc_UnLockMutex(&wnr_mutex);
- return 0;
+ return ret;
}
/*
@@ -2274,7 +2382,7 @@ int wc_InitNetRandom(const char* configFile, wnr_hmac_key hmac_cb, int timeout)
*/
int wc_FreeNetRandom(void)
{
- if (wnr_mutex_init > 0) {
+ if (wnr_inited > 0) {
if (wc_LockMutex(&wnr_mutex) != 0) {
WOLFSSL_MSG("Bad Lock Mutex wnr_mutex");
@@ -2289,8 +2397,12 @@ int wc_FreeNetRandom(void)
wc_UnLockMutex(&wnr_mutex);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_FreeMutex(&wnr_mutex);
- wnr_mutex_init = 0;
+ wnr_mutex_inited = 0;
+#endif
+
+ wnr_inited = 0;
}
return 0;
@@ -3387,6 +3499,79 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
return 0;
}
+#elif defined(ARDUINO)
+
+ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
+ {
+ int ret = 0;
+ word32 rand;
+ while (sz > 0) {
+ word32 len = sizeof(rand);
+ if (sz < len)
+ len = sz;
+ /* Get an Arduino framework random number */
+ #if defined(ARDUINO_SAMD_NANO_33_IOT) || \
+ defined(ARDUINO_ARCH_RP2040)
+ /* Known, tested boards working with random() */
+ rand = random();
+ #elif defined(ARDUINO_SAM_DUE)
+ /* See: https://github.com/avrxml/asf/tree/master/sam/utils/cmsis/sam3x/include */
+ #if defined(__SAM3A4C__)
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #elif defined(__SAM3A8C__)
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #elif defined(__SAM3X4C__)
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #elif defined(__SAM3X4E__)
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #elif defined(__SAM3X8C__)
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #elif defined(__SAM3X8E__)
+ /* This is the Arduino Due */
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #elif defined(__SAM3A8H__)
+ #ifndef TRNG
+ #define TRNG (0x400BC000U)
+ #endif
+ #else
+ #ifndef TRNG
+ #error "Unknown TRNG for this device"
+ #endif
+ #endif
+
+ srand(analogRead(0));
+ rand = trng_read_output_data(TRNG);
+ #elif defined(__STM32__)
+ /* TODO: confirm this is proper random number on Arduino STM32 */
+ #warning "Not yet tested on STM32 targets"
+ rand = random();
+ #else
+ /* TODO: Pull requests appreciated for new targets.
+ * Do *all* other Arduino boards support random()?
+ * Probably not 100%, but most will likely work: */
+ rand = random();
+ #endif
+
+ XMEMCPY(output, &rand, len);
+ output += len;
+ sz -= len;
+ }
+
+ return ret;
+ }
+
#elif defined(WOLFSSL_ESPIDF)
/* Espressif */
@@ -3423,6 +3608,9 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
{
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_ENTER("ESP8266 Random");
+ #endif
word32 rand;
while (sz > 0) {
word32 len = sizeof(rand);
@@ -3437,7 +3625,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
return 0;
}
- #endif /* end WOLFSSL_ESP32 */
+ #endif /* end WOLFSSL_ESPIDF */
#elif defined(WOLFSSL_LINUXKM)
#include <linux/random.h>
@@ -3507,6 +3695,26 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
* extern int myRngFunc(byte* output, word32 sz);
*/
+#elif defined(__MICROBLAZE__)
+ #warning weak source of entropy
+ #define LPD_SCNTR_BASE_ADDRESS 0xFF250000
+
+ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
+ {
+ word32* cnt;
+ word32 i;
+
+ /* using current time with srand */
+ cnt = (word32*)LPD_SCNTR_BASE_ADDRESS;
+ srand(*cnt | *(cnt+1));
+
+ for (i = 0; i < sz; i++)
+ output[i] = rand();
+
+ (void)os;
+ return 0;
+ }
+
#elif defined(WOLFSSL_ZEPHYR)
#include <version.h>
@@ -3585,7 +3793,14 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
output[i] = (byte)rand();
return 0;
}
+#elif defined(WOLFSSL_MAXQ108X) || defined(WOLFSSL_MAXQ1065)
+ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
+ {
+ (void)os;
+
+ return maxq10xx_random(output, sz);
+ }
#elif defined(WOLFSSL_GETRANDOM)
/* getrandom() was added to the Linux kernel in version 3.17.
@@ -3633,6 +3848,28 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
#elif defined(NO_DEV_RANDOM)
+ /* Allow bare-metal targets to use cryptoCb as seed provider */
+ #if defined(WOLF_CRYPTO_CB)
+
+ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
+ {
+ int ret = WC_HW_E;
+
+ #ifndef WOLF_CRYPTO_CB_FIND
+ if (os->devId != INVALID_DEVID)
+ #endif
+ {
+ ret = wc_CryptoCb_RandomSeed(os, output, sz);
+ if (ret == CRYPTOCB_UNAVAILABLE) {
+ ret = WC_HW_E;
+ }
+ }
+
+ return ret;
+ }
+
+ #else /* defined(WOLF_CRYPTO_CB)*/
+
#error "you need to write an os specific wc_GenerateSeed() here"
/*
@@ -3642,6 +3879,8 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
}
*/
+ #endif /* !defined(WOLF_CRYPTO_CB) */
+
#else
/* may block */
@@ -3696,15 +3935,23 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
#ifndef NO_DEV_URANDOM /* way to disable use of /dev/urandom */
os->fd = open("/dev/urandom", O_RDONLY);
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG("opened /dev/urandom.");
+ #endif
if (os->fd == -1)
#endif
{
/* may still have /dev/random */
os->fd = open("/dev/random", O_RDONLY);
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG("opened /dev/random.");
+ #endif
if (os->fd == -1)
return OPEN_RAN_E;
}
-
+ #if defined(DEBUG_WOLFSSL)
+ WOLFSSL_MSG("rnd read...");
+ #endif
while (sz) {
int len = (int)read(os->fd, output, sz);
if (len == -1) {
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/rsa.c b/extra/wolfssl/wolfssl/wolfcrypt/src/rsa.c
index 514ffb23..4299fd2f 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/rsa.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/rsa.c
@@ -62,6 +62,14 @@ RSA keys can be used to encrypt, decrypt, sign and verify data.
#include <wolfssl/wolfcrypt/sp.h>
#endif
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
/*
Possible RSA enable options:
* NO_RSA: Overall control of RSA default: on
@@ -267,8 +275,10 @@ int wc_InitRsaKey_Id(RsaKey* key, unsigned char* id, int len, void* heap,
ret = BUFFER_E;
#if defined(HAVE_PKCS11)
- XMEMSET(key, 0, sizeof(RsaKey));
- key->isPkcs11 = 1;
+ if (ret == 0) {
+ XMEMSET(key, 0, sizeof(RsaKey));
+ key->isPkcs11 = 1;
+ }
#endif
if (ret == 0)
@@ -302,8 +312,10 @@ int wc_InitRsaKey_Label(RsaKey* key, const char* label, void* heap, int devId)
}
#if defined(HAVE_PKCS11)
- XMEMSET(key, 0, sizeof(RsaKey));
- key->isPkcs11 = 1;
+ if (ret == 0) {
+ XMEMSET(key, 0, sizeof(RsaKey));
+ key->isPkcs11 = 1;
+ }
#endif
if (ret == 0)
@@ -708,8 +720,7 @@ int wc_CheckRsaKey(RsaKey* key)
ret = wc_InitRng(rng);
- if (ret == 0)
- SAVE_VECTOR_REGISTERS(ret = _svr_ret;);
+ SAVE_VECTOR_REGISTERS(ret = _svr_ret;);
if (ret == 0) {
if (INIT_MP_INT_SIZE(tmp, mp_bitsused(&key->n)) != MP_OKAY)
@@ -2677,12 +2688,16 @@ static int RsaFunctionSync(const byte* in, word32 inLen, byte* out,
NEW_MP_INT_SIZE(tmp, mp_bitsused(&key->n), key->heap, DYNAMIC_TYPE_RSA);
#ifdef MP_INT_SIZE_CHECK_NULL
- if (tmp == NULL)
+ if (tmp == NULL) {
+ WOLFSSL_MSG("NEW_MP_INT_SIZE tmp is NULL, return MEMORY_E");
return MEMORY_E;
+ }
#endif
- if (INIT_MP_INT_SIZE(tmp, mp_bitsused(&key->n)) != MP_OKAY)
+ if (INIT_MP_INT_SIZE(tmp, mp_bitsused(&key->n)) != MP_OKAY) {
+ WOLFSSL_MSG("INIT_MP_INT_SIZE failed.");
ret = MP_INIT_E;
+ }
#ifndef TEST_UNPAD_CONSTANT_TIME
if (ret == 0 && mp_read_unsigned_bin(tmp, in, inLen) != MP_OKAY)
@@ -2706,8 +2721,10 @@ static int RsaFunctionSync(const byte* in, word32 inLen, byte* out,
#endif
case RSA_PUBLIC_ENCRYPT:
case RSA_PUBLIC_DECRYPT:
- if (mp_exptmod_nct(tmp, &key->e, &key->n, tmp) != MP_OKAY)
+ if (mp_exptmod_nct(tmp, &key->e, &key->n, tmp) != MP_OKAY) {
+ WOLFSSL_MSG("mp_exptmod_nct failed");
ret = MP_EXPTMOD_E;
+ }
break;
default:
ret = RSA_WRONG_TYPE_E;
@@ -2716,9 +2733,23 @@ static int RsaFunctionSync(const byte* in, word32 inLen, byte* out,
}
if (ret == 0) {
- if (mp_to_unsigned_bin_len_ct(tmp, out, (int)*outLen) != MP_OKAY)
- ret = MP_TO_E;
+ WOLFSSL_MSG("mp_to_unsigned_bin_len_ct...");
+ if (mp_to_unsigned_bin_len_ct(tmp, out, (int)*outLen) != MP_OKAY) {
+ WOLFSSL_MSG("mp_to_unsigned_bin_len_ct failed");
+ ret = MP_TO_E;
+ }
}
+#ifdef WOLFSSL_RSA_CHECK_D_ON_DECRYPT
+ if ((ret == 0) && (type == RSA_PRIVATE_DECRYPT)) {
+ mp_sub(&key->n, &key->p, tmp);
+ mp_sub(tmp, &key->q, tmp);
+ mp_add_d(tmp, 1, tmp);
+ mp_mulmod(&key->d, &key->e, tmp, tmp);
+ if (!mp_isone(tmp)) {
+ ret = MP_EXPTMOD_E;
+ }
+ }
+#endif
#else
(void)type;
(void)key;
@@ -2742,6 +2773,7 @@ static int wc_RsaFunctionSync(const byte* in, word32 inLen, byte* out,
ret = wc_RsaEncryptSize(key);
if (ret < 0) {
+ WOLFSSL_MSG_EX("wc_RsaEncryptSize failed err = %d", ret);
return ret;
}
keyLen = (word32)ret;
@@ -2756,6 +2788,7 @@ static int wc_RsaFunctionSync(const byte* in, word32 inLen, byte* out,
}
if (mp_iseven(&key->n)) {
+ WOLFSSL_MSG("MP_VAL is even");
return MP_VAL;
}
@@ -2864,21 +2897,9 @@ static int wc_RsaFunctionAsync(const byte* in, word32 inLen, byte* out,
#endif /* WOLFSSL_ASYNC_CRYPT && WC_ASYNC_ENABLE_RSA */
#if defined(WC_RSA_DIRECT) || defined(WC_RSA_NO_PADDING)
-/* Function that does the RSA operation directly with no padding.
- *
- * in buffer to do operation on
- * inLen length of input buffer
- * out buffer to hold results
- * outSz gets set to size of result buffer. Should be passed in as length
- * of out buffer. If the pointer "out" is null then outSz gets set to
- * the expected buffer size needed and LENGTH_ONLY_E gets returned.
- * key RSA key to use for encrypt/decrypt
- * type if using private or public key {RSA_PUBLIC_ENCRYPT,
- * RSA_PUBLIC_DECRYPT, RSA_PRIVATE_ENCRYPT, RSA_PRIVATE_DECRYPT}
- * rng wolfSSL RNG to use if needed
- *
- * returns size of result on success
- */
+/* Performs direct RSA computation without padding. The input and output must
+ * match the key size (ex: 2048-bits = 256 bytes). Returns the size of the
+ * output on success or negative value on failure. */
int wc_RsaDirect(byte* in, word32 inLen, byte* out, word32* outSz,
RsaKey* key, int type, WC_RNG* rng)
{
@@ -3061,7 +3082,7 @@ int cc310_RsaSSL_Verify(const byte* in, word32 inLen, byte* sig,
#ifndef WOLF_CRYPTO_CB_ONLY_RSA
#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(TEST_UNPAD_CONSTANT_TIME) && !defined(NO_RSA_BOUNDS_CHECK)
/* Check that 1 < in < n-1. (Requirement of 800-56B.) */
-static int RsaFunctionCheckIn(const byte* in, word32 inLen, RsaKey* key,
+int RsaFunctionCheckIn(const byte* in, word32 inLen, RsaKey* key,
int checkSmallCt)
{
int ret = 0;
@@ -3138,7 +3159,9 @@ static int wc_RsaFunction_ex(const byte* in, word32 inLen, byte* out,
}
#endif
-#ifndef WOLF_CRYPTO_CB_ONLY_RSA
+#ifdef WOLF_CRYPTO_CB_ONLY_RSA
+ return NO_VALID_DEVID;
+#else /* !WOLF_CRYPTO_CB_ONLY_RSA */
SAVE_VECTOR_REGISTERS(return _svr_ret;);
#if !defined(WOLFSSL_RSA_VERIFY_ONLY) && !defined(TEST_UNPAD_CONSTANT_TIME) && \
@@ -3189,7 +3212,7 @@ static int wc_RsaFunction_ex(const byte* in, word32 inLen, byte* out,
wc_RsaCleanup(key);
}
return ret;
-#endif /* WOLF_CRYPTO_CB_ONLY_RSA */
+#endif /* !WOLF_CRYPTO_CB_ONLY_RSA */
}
int wc_RsaFunction(const byte* in, word32 inLen, byte* out,
@@ -4825,7 +4848,7 @@ int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
#endif
isPrime = 0;
i = 0;
- do {
+ for (;;) {
#ifdef SHOW_GEN
printf(".");
fflush(stdout);
@@ -4848,9 +4871,15 @@ int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
i++;
#else
/* Keep the old retry behavior in non-FIPS build. */
- (void)i;
#endif
- } while (err == MP_OKAY && !isPrime && i < failCount);
+
+ if (err != MP_OKAY || isPrime || i >= failCount)
+ break;
+
+ /* linuxkm: release the kernel for a moment before iterating. */
+ RESTORE_VECTOR_REGISTERS();
+ SAVE_VECTOR_REGISTERS(err = _svr_ret; break;);
+ };
}
if (err == MP_OKAY && !isPrime)
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sakke.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sakke.c
index 2629365f..eb0f932f 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sakke.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sakke.c
@@ -44,6 +44,14 @@
#include <wolfssl/wolfcrypt/sakke.h>
#include <wolfssl/wolfcrypt/asn_public.h>
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
#ifndef WOLFSSL_HAVE_ECC_KEY_GET_PRIV
/* FIPS build has replaced ecc.h. */
#define wc_ecc_key_get_priv(key) (&((key)->k))
@@ -6514,7 +6522,6 @@ int wc_GenerateSakkePointITable(SakkeKey* key, byte* table, word32* len)
key->i.table = table;
key->i.tableLen = *len;
}
- (void)table;
#endif
return err;
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sha.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sha.c
index 4a5f3e18..69990791 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sha.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sha.c
@@ -644,9 +644,15 @@ int wc_ShaUpdate(wc_Sha* sha, const byte* data, word32 len)
#endif
#if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) \
- && defined(WOLFSSL_ESP32_CRYPT) && \
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
+ defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (esp_sha_need_byte_reversal(&sha->ctx))
#endif
{
@@ -722,9 +728,15 @@ int wc_ShaUpdate(wc_Sha* sha, const byte* data, word32 len)
#endif
#if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (esp_sha_need_byte_reversal(&sha->ctx))
#endif
{
@@ -765,9 +777,15 @@ int wc_ShaFinalRaw(wc_Sha* sha, byte* hash)
}
#ifdef LITTLE_ENDIAN_ORDER
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (esp_sha_need_byte_reversal(&sha->ctx))
#endif
{
@@ -823,7 +841,10 @@ int wc_ShaFinal(wc_Sha* sha, byte* hash)
/* pad with zeros */
if (sha->buffLen > WC_SHA_PAD_SIZE) {
- XMEMSET(&local[sha->buffLen], 0, WC_SHA_BLOCK_SIZE - sha->buffLen);
+ if (sha->buffLen < WC_SHA_BLOCK_SIZE) {
+ XMEMSET(&local[sha->buffLen], 0, WC_SHA_BLOCK_SIZE - sha->buffLen);
+ }
+
sha->buffLen += WC_SHA_BLOCK_SIZE - sha->buffLen;
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
@@ -834,9 +855,15 @@ int wc_ShaFinal(wc_Sha* sha, byte* hash)
#endif
#if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (esp_sha_need_byte_reversal(&sha->ctx))
#endif
{
@@ -875,9 +902,15 @@ int wc_ShaFinal(wc_Sha* sha, byte* hash)
#endif
#if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (esp_sha_need_byte_reversal(&sha->ctx))
#endif
{ /* reminder local also points to sha->buffer */
@@ -902,8 +935,12 @@ int wc_ShaFinal(wc_Sha* sha, byte* hash)
#endif
-#if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && !defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+#if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
+ defined(WOLFSSL_ESP32_CRYPT) && !defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
if (sha->ctx.mode == ESP32_SHA_HW) {
#if defined(WOLFSSL_SUPER_VERBOSE_DEBUG)
{
@@ -938,9 +975,14 @@ if (sha->ctx.mode == ESP32_SHA_HW) {
#endif
#ifdef LITTLE_ENDIAN_ORDER
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
+ defined(WOLFSSL_ESP32_CRYPT) && !defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (esp_sha_need_byte_reversal(&sha->ctx))
#endif
{
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sha256.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sha256.c
index 50e5b1cc..0025e857 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sha256.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sha256.c
@@ -105,11 +105,12 @@ on the specific device platform.
#endif
#ifdef WOLFSSL_ESPIDF
- /* Define the ESP_LOGx(TAG, "" value for output messages here.
+ /* Define the ESP_LOGx(TAG, WOLFSSL_ESPIDF_BLANKLINE_MESSAGE value for output messages here.
**
** Beware of possible conflict in test.c (that one now named TEST_TAG)
*/
- #if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
+ #if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
static const char* TAG = "wc_sha256";
#endif
#endif
@@ -168,6 +169,38 @@ on the specific device platform.
#endif
+#if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
+ defined(WOLFSSL_ESP32_CRYPT) && \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
+ #define SHA256_REV_BYTES(ctx) \
+ (esp_sha_need_byte_reversal(ctx))
+ #endif
+#endif
+#ifndef SHA256_REV_BYTES
+ #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
+ #define SHA256_REV_BYTES(ctx) 1
+ #else
+ #define SHA256_REV_BYTES(ctx) 0
+ #endif
+#endif
+#if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA) && \
+ defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
+ (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
+ #define SHA256_UPDATE_REV_BYTES(ctx) \
+ (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
+#else
+ #define SHA256_UPDATE_REV_BYTES(ctx) SHA256_REV_BYTES(ctx)
+#endif
+
+
#if !defined(WOLFSSL_PIC32MZ_HASH) && !defined(STM32_HASH_SHA2) && \
(!defined(WOLFSSL_IMX6_CAAM) || defined(NO_IMX6_CAAM_HASH) || \
defined(WOLFSSL_QNX_CAAM)) && \
@@ -187,11 +220,6 @@ on the specific device platform.
static int InitSha256(wc_Sha256* sha256)
{
- int ret = 0;
-
- if (sha256 == NULL)
- return BAD_FUNC_ARG;
-
XMEMSET(sha256->digest, 0, sizeof(sha256->digest));
sha256->digest[0] = 0x6A09E667L;
sha256->digest[1] = 0xBB67AE85L;
@@ -226,7 +254,7 @@ static int InitSha256(wc_Sha256* sha256)
sha256->hSession = NULL;
#endif
- return ret;
+ return 0;
}
#endif
@@ -301,7 +329,15 @@ static int InitSha256(wc_Sha256* sha256)
extern "C" {
#endif
+ extern int Transform_Sha256_SSE2_Sha(wc_Sha256 *sha256,
+ const byte* data);
+ extern int Transform_Sha256_SSE2_Sha_Len(wc_Sha256* sha256,
+ const byte* data, word32 len);
#if defined(HAVE_INTEL_AVX1)
+ extern int Transform_Sha256_AVX1_Sha(wc_Sha256 *sha256,
+ const byte* data);
+ extern int Transform_Sha256_AVX1_Sha_Len(wc_Sha256* sha256,
+ const byte* data, word32 len);
extern int Transform_Sha256_AVX1(wc_Sha256 *sha256, const byte* data);
extern int Transform_Sha256_AVX1_Len(wc_Sha256* sha256,
const byte* data, word32 len);
@@ -355,8 +391,24 @@ static int InitSha256(wc_Sha256* sha256)
intel_flags = cpuid_get_flags();
+ if (IS_INTEL_SHA(intel_flags)) {
+ #ifdef HAVE_INTEL_AVX1
+ if (IS_INTEL_AVX1(intel_flags)) {
+ Transform_Sha256_p = Transform_Sha256_AVX1_Sha;
+ Transform_Sha256_Len_p = Transform_Sha256_AVX1_Sha_Len;
+ Transform_Sha256_is_vectorized = 1;
+ }
+ else
+ #endif
+ {
+ Transform_Sha256_p = Transform_Sha256_SSE2_Sha;
+ Transform_Sha256_Len_p = Transform_Sha256_SSE2_Sha_Len;
+ Transform_Sha256_is_vectorized = 1;
+ }
+ }
+ else
#ifdef HAVE_INTEL_AVX2
- if (1 && IS_INTEL_AVX2(intel_flags)) {
+ if (IS_INTEL_AVX2(intel_flags)) {
#ifdef HAVE_INTEL_RORX
if (IS_INTEL_BMI2(intel_flags)) {
Transform_Sha256_p = Transform_Sha256_AVX2_RORX;
@@ -365,27 +417,29 @@ static int InitSha256(wc_Sha256* sha256)
}
else
#endif
- if (1)
{
Transform_Sha256_p = Transform_Sha256_AVX2;
Transform_Sha256_Len_p = Transform_Sha256_AVX2_Len;
Transform_Sha256_is_vectorized = 1;
}
+ }
+ else
+ #endif
+ #ifdef HAVE_INTEL_AVX1
+ if (IS_INTEL_AVX1(intel_flags)) {
#ifdef HAVE_INTEL_RORX
- else {
+ if (IS_INTEL_BMI2(intel_flags)) {
Transform_Sha256_p = Transform_Sha256_AVX1_RORX;
Transform_Sha256_Len_p = Transform_Sha256_AVX1_RORX_Len;
Transform_Sha256_is_vectorized = 1;
}
+ else
#endif
- }
- else
- #endif
- #ifdef HAVE_INTEL_AVX1
- if (IS_INTEL_AVX1(intel_flags)) {
- Transform_Sha256_p = Transform_Sha256_AVX1;
- Transform_Sha256_Len_p = Transform_Sha256_AVX1_Len;
- Transform_Sha256_is_vectorized = 1;
+ {
+ Transform_Sha256_p = Transform_Sha256_AVX1;
+ Transform_Sha256_Len_p = Transform_Sha256_AVX1_Len;
+ Transform_Sha256_is_vectorized = 1;
+ }
}
else
#endif
@@ -709,10 +763,6 @@ static int InitSha256(wc_Sha256* sha256)
{
int ret = 0; /* zero = success */
- if (sha256 == NULL) {
- return BAD_FUNC_ARG;
- }
-
/* We may or may not need initial digest for HW.
* Always needed for SW-only. */
sha256->digest[0] = 0x6A09E667L;
@@ -729,7 +779,7 @@ static int InitSha256(wc_Sha256* sha256)
sha256->hiLen = 0;
#ifndef NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256
- ret = esp_sha_init(&(sha256->ctx), WC_HASH_TYPE_SHA256);
+ ret = esp_sha_init((WC_ESP32SHA*)&(sha256->ctx), WC_HASH_TYPE_SHA256);
#endif
return ret;
}
@@ -746,15 +796,14 @@ static int InitSha256(wc_Sha256* sha256)
return BAD_FUNC_ARG;
}
- #ifdef WOLFSSL_USE_ESP32_CRYPT_HASH_HW
-#ifndef NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256
+ #if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
/* We know this is a fresh, uninitialized item, so set to INIT */
if (sha256->ctx.mode != ESP32_SHA_INIT) {
ESP_LOGV(TAG, "Set ctx mode from prior value: "
"%d", sha256->ctx.mode);
}
sha256->ctx.mode = ESP32_SHA_INIT;
-#endif
#endif
return InitSha256(sha256);
@@ -1023,21 +1072,13 @@ static int InitSha256(wc_Sha256* sha256)
}
/* do block size increments/updates */
- static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
+ static WC_INLINE int Sha256Update(wc_Sha256* sha256, const byte* data,
+ word32 len)
{
int ret = 0;
word32 blocksLen;
byte* local;
- if (sha256 == NULL || (data == NULL && len > 0)) {
- return BAD_FUNC_ARG;
- }
-
- if (data == NULL && len == 0) {
- /* valid, but do nothing */
- return 0;
- }
-
/* check that internal buffLen is valid */
if (sha256->buffLen >= WC_SHA256_BLOCK_SIZE) {
return BUFFER_E;
@@ -1066,29 +1107,13 @@ static int InitSha256(wc_Sha256* sha256)
}
#endif
-
- #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if defined(WOLFSSL_X86_64_BUILD) && \
- defined(USE_INTEL_SPEEDUP) && \
- (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
- if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
- #endif
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
- if (esp_sha_need_byte_reversal(&sha256->ctx))
- #endif
- {
- ByteReverseWords(sha256->buffer, sha256->buffer,
- WC_SHA256_BLOCK_SIZE);
- }
- #endif
+ if (SHA256_UPDATE_REV_BYTES(&sha256->ctx)) {
+ ByteReverseWords(sha256->buffer, sha256->buffer,
+ WC_SHA256_BLOCK_SIZE);
+ }
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
-
if (sha256->ctx.mode == ESP32_SHA_SW) {
#if defined(WOLFSSL_DEBUG_MUTEX)
{
@@ -1115,7 +1140,6 @@ static int InitSha256(wc_Sha256* sha256)
/* Always SW */
ret = XTRANSFORM(sha256, (const byte*)local);
#endif
-
if (ret == 0)
sha256->buffLen = 0;
else
@@ -1130,12 +1154,13 @@ static int InitSha256(wc_Sha256* sha256)
if (Transform_Sha256_Len_p != NULL)
#endif
{
- /* get number of blocks */
- /* 64-1 = 0x3F (~ Inverted = 0xFFFFFFC0) */
- /* len (masked by 0xFFFFFFC0) returns block aligned length */
- blocksLen = len & ~((word32)WC_SHA256_BLOCK_SIZE-1);
- if (blocksLen > 0) {
- /* Byte reversal and alignment handled in function if required */
+ if (len >= WC_SHA256_BLOCK_SIZE) {
+ /* get number of blocks */
+ /* 64-1 = 0x3F (~ Inverted = 0xFFFFFFC0) */
+ /* len (masked by 0xFFFFFFC0) returns block aligned length */
+ blocksLen = len & ~((word32)WC_SHA256_BLOCK_SIZE-1);
+ /* Byte reversal and alignment handled in function if required
+ */
XTRANSFORM_LEN(sha256, data, blocksLen);
data += blocksLen;
len -= blocksLen;
@@ -1178,23 +1203,9 @@ static int InitSha256(wc_Sha256* sha256)
}
#endif
- #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
- if (esp_sha_need_byte_reversal(&sha256->ctx))
- #endif
- #if defined(WOLFSSL_X86_64_BUILD) && \
- defined(USE_INTEL_SPEEDUP) && \
- (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
- if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
- #endif
- {
- ByteReverseWords(local32, local32, WC_SHA256_BLOCK_SIZE);
- }
- #endif
+ if (SHA256_UPDATE_REV_BYTES(&sha256->ctx)) {
+ ByteReverseWords(local32, local32, WC_SHA256_BLOCK_SIZE);
+ }
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
@@ -1231,14 +1242,16 @@ static int InitSha256(wc_Sha256* sha256)
#else
int wc_Sha256Update(wc_Sha256* sha256, const byte* data, word32 len)
{
- if (sha256 == NULL || (data == NULL && len > 0)) {
+ if (sha256 == NULL) {
return BAD_FUNC_ARG;
}
-
if (data == NULL && len == 0) {
/* valid, but do nothing */
return 0;
}
+ if (data == NULL) {
+ return BAD_FUNC_ARG;
+ }
#ifdef WOLF_CRYPTO_CB
#ifndef WOLF_CRYPTO_CB_FIND
@@ -1265,14 +1278,9 @@ static int InitSha256(wc_Sha256* sha256)
static WC_INLINE int Sha256Final(wc_Sha256* sha256)
{
-
int ret;
byte* local;
- if (sha256 == NULL) {
- return BAD_FUNC_ARG;
- }
-
/* we'll add a 0x80 byte at the end,
** so make sure we have appropriate buffer length. */
if (sha256->buffLen > WC_SHA256_BLOCK_SIZE - 1) {
@@ -1285,9 +1293,10 @@ static int InitSha256(wc_Sha256* sha256)
/* pad with zeros */
if (sha256->buffLen > WC_SHA256_PAD_SIZE) {
- XMEMSET(&local[sha256->buffLen], 0,
- WC_SHA256_BLOCK_SIZE - sha256->buffLen);
- sha256->buffLen += WC_SHA256_BLOCK_SIZE - sha256->buffLen;
+ if (sha256->buffLen < WC_SHA256_BLOCK_SIZE) {
+ XMEMSET(&local[sha256->buffLen], 0,
+ WC_SHA256_BLOCK_SIZE - sha256->buffLen);
+ }
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
@@ -1296,23 +1305,10 @@ static int InitSha256(wc_Sha256* sha256)
}
#endif
- #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
- if (esp_sha_need_byte_reversal(&sha256->ctx))
- #endif
- #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
- (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
- if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
- #endif
- {
- ByteReverseWords(sha256->buffer, sha256->buffer,
- WC_SHA256_BLOCK_SIZE);
- }
- #endif
+ if (SHA256_UPDATE_REV_BYTES(&sha256->ctx)) {
+ ByteReverseWords(sha256->buffer, sha256->buffer,
+ WC_SHA256_BLOCK_SIZE);
+ }
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
@@ -1349,23 +1345,10 @@ static int InitSha256(wc_Sha256* sha256)
#endif
/* store lengths */
- #if defined(LITTLE_ENDIAN_ORDER) && !defined(FREESCALE_MMCAU_SHA)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
- if (esp_sha_need_byte_reversal(&sha256->ctx))
- #endif
- #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
- (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
- if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
- #endif
- {
+ if (SHA256_UPDATE_REV_BYTES(&sha256->ctx)) {
ByteReverseWords(sha256->buffer, sha256->buffer,
- WC_SHA256_BLOCK_SIZE);
+ WC_SHA256_PAD_SIZE);
}
- #endif
/* ! 64-bit length ordering dependent on digest endian type ! */
XMEMCPY(&local[WC_SHA256_PAD_SIZE], &sha256->hiLen, sizeof(word32));
XMEMCPY(&local[WC_SHA256_PAD_SIZE + sizeof(word32)], &sha256->loLen,
@@ -1373,11 +1356,16 @@ static int InitSha256(wc_Sha256* sha256)
/* Only the ESP32-C3 with HW enabled may need pad size byte order reversal
* depending on HW or SW mode */
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
+ #if ( defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ defined(CONFIG_IDF_TARGET_ESP32C6) \
+ ) && \
+ defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
+ /* For Espressif RISC-V Targets, we *may* need to reverse bytes
+ * depending on if HW is active or not. */
if (sha256->ctx.mode == ESP32_SHA_HW) {
#if defined(WOLFSSL_SUPER_VERBOSE_DEBUG)
ESP_LOGV(TAG, "Start: Reverse PAD SIZE Endianness.");
@@ -1442,18 +1430,10 @@ static int InitSha256(wc_Sha256* sha256)
}
#ifdef LITTLE_ENDIAN_ORDER
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
- if (esp_sha_need_byte_reversal(&sha256->ctx))
- #endif
- {
- ByteReverseWords((word32*)digest,
- (word32*)sha256->digest,
- WC_SHA256_DIGEST_SIZE);
- }
+ if (SHA256_REV_BYTES(&sha256->ctx)) {
+ ByteReverseWords((word32*)digest, (word32*)sha256->digest,
+ WC_SHA256_DIGEST_SIZE);
+ }
XMEMCPY(hash, digest, WC_SHA256_DIGEST_SIZE);
#else
XMEMCPY(hash, sha256->digest, WC_SHA256_DIGEST_SIZE);
@@ -1497,16 +1477,10 @@ static int InitSha256(wc_Sha256* sha256)
}
#if defined(LITTLE_ENDIAN_ORDER)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH) && \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256)
- if (esp_sha_need_byte_reversal(&sha256->ctx))
- #endif
- {
- ByteReverseWords(sha256->digest, sha256->digest,
- WC_SHA256_DIGEST_SIZE);
- }
+ if (SHA256_REV_BYTES(&sha256->ctx)) {
+ ByteReverseWords(sha256->digest, sha256->digest,
+ WC_SHA256_DIGEST_SIZE);
+ }
#endif
XMEMCPY(hash, sha256->digest, WC_SHA256_DIGEST_SIZE);
@@ -1518,18 +1492,115 @@ static int InitSha256(wc_Sha256* sha256)
/* @param sha a pointer to wc_Sha256 structure */
/* @param data data to be applied SHA256 transformation */
/* @return 0 on successful, otherwise non-zero on failure */
- int wc_Sha256Transform(wc_Sha256* sha, const unsigned char* data)
+ int wc_Sha256Transform(wc_Sha256* sha256, const unsigned char* data)
{
- if (sha == NULL || data == NULL) {
+ if (sha256 == NULL || data == NULL) {
return BAD_FUNC_ARG;
}
- return (Transform_Sha256(sha, data));
+ return Transform_Sha256(sha256, data);
}
- #endif
-#endif /* OPENSSL_EXTRA */
+#endif /* OPENSSL_EXTRA || HAVE_CURL */
+#if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_FULL_HASH)
+ /* One block will be used from data.
+ * hash must be big enough to hold all of digest output.
+ */
+ int wc_Sha256HashBlock(wc_Sha256* sha256, const unsigned char* data,
+ unsigned char* hash)
+ {
+ int ret;
+
+ if ((sha256 == NULL) || (data == NULL)) {
+ return BAD_FUNC_ARG;
+ }
+
+ if (SHA256_UPDATE_REV_BYTES(&sha256->ctx)) {
+ ByteReverseWords(sha256->buffer, (word32*)data,
+ WC_SHA256_BLOCK_SIZE);
+ data = (unsigned char*)sha256->buffer;
+ }
+ ret = XTRANSFORM(sha256, data);
+
+ if ((ret == 0) && (hash != NULL)) {
+ if (!SHA256_REV_BYTES(&sha256->ctx)) {
+ XMEMCPY(hash, sha256->digest, WC_SHA256_DIGEST_SIZE);
+ }
+ else {
+ #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP)
+ __asm__ __volatile__ (
+ "mov 0x00(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x00(%[h])\n\t"
+ "mov 0x04(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x04(%[h])\n\t"
+ "mov 0x08(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x08(%[h])\n\t"
+ "mov 0x0c(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x0c(%[h])\n\t"
+ "mov 0x10(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x10(%[h])\n\t"
+ "mov 0x14(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x14(%[h])\n\t"
+ "mov 0x18(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x18(%[h])\n\t"
+ "mov 0x1c(%[d]), %%esi\n\t"
+ "movbe %%esi, 0x1c(%[h])\n\t"
+ :
+ : [d] "r" (sha256->digest), [h] "r" (hash)
+ : "memory", "esi"
+ );
+ #else
+ word32* hash32 = (word32*)hash;
+ word32* digest = (word32*)sha256->digest;
+ #if WOLFSSL_GENERAL_ALIGNMENT < 4
+ ALIGN16 word32 buf[WC_SHA256_DIGEST_SIZE / sizeof(word32)];
+
+ if (((size_t)digest & 0x3) != 0) {
+ if (((size_t)hash32 & 0x3) != 0) {
+ XMEMCPY(buf, digest, WC_SHA256_DIGEST_SIZE);
+ hash32 = buf;
+ digest = buf;
+ }
+ else {
+ XMEMCPY(hash, digest, WC_SHA256_DIGEST_SIZE);
+ digest = hash32;
+ }
+ }
+ else if (((size_t)hash32 & 0x3) != 0) {
+ hash32 = digest;
+ }
+ #endif
+ hash32[0] = ByteReverseWord32(digest[0]);
+ hash32[1] = ByteReverseWord32(digest[1]);
+ hash32[2] = ByteReverseWord32(digest[2]);
+ hash32[3] = ByteReverseWord32(digest[3]);
+ hash32[4] = ByteReverseWord32(digest[4]);
+ hash32[5] = ByteReverseWord32(digest[5]);
+ hash32[6] = ByteReverseWord32(digest[6]);
+ hash32[7] = ByteReverseWord32(digest[7]);
+ #if WOLFSSL_GENERAL_ALIGNMENT < 4
+ if (hash != (byte*)hash32) {
+ XMEMCPY(hash, hash32, WC_SHA256_DIGEST_SIZE);
+ }
+ #endif
+ #endif /* WOLFSSL_X86_64_BUILD && USE_INTEL_SPEEDUP */
+ }
+ sha256->digest[0] = 0x6A09E667L;
+ sha256->digest[1] = 0xBB67AE85L;
+ sha256->digest[2] = 0x3C6EF372L;
+ sha256->digest[3] = 0xA54FF53AL;
+ sha256->digest[4] = 0x510E527FL;
+ sha256->digest[5] = 0x9B05688CL;
+ sha256->digest[6] = 0x1F83D9ABL;
+ sha256->digest[7] = 0x5BE0CD19L;
+ }
+
+ return ret;
+ }
+#endif /* WOLFSSL_HAVE_LMS && !WOLFSSL_LMS_FULL_HASH */
#endif /* !WOLFSSL_KCAPI_HASH */
+#endif /* XTRANSFORM */
+
#ifdef WOLFSSL_SHA224
@@ -1648,10 +1719,6 @@ static int InitSha256(wc_Sha256* sha256)
{
int ret = 0;
- if (sha224 == NULL) {
- return BAD_FUNC_ARG;
- }
-
sha224->digest[0] = 0xc1059ed8;
sha224->digest[1] = 0x367cd507;
sha224->digest[2] = 0x3070dd17;
@@ -1752,7 +1819,14 @@ static int InitSha256(wc_Sha256* sha256)
{
int ret;
- if (sha224 == NULL || (data == NULL && len > 0)) {
+ if (sha224 == NULL) {
+ return BAD_FUNC_ARG;
+ }
+ if (data == NULL && len == 0) {
+ /* valid, but do nothing */
+ return 0;
+ }
+ if (data == NULL) {
return BAD_FUNC_ARG;
}
@@ -1792,11 +1866,11 @@ static int InitSha256(wc_Sha256* sha256)
}
#endif /* WOLFSSL_ASYNC_CRYPT */
- #if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
- (!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256) || \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA224))
+ #if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW) && \
+ ( !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256) || \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA224) )
- /* nothing enabled here for C3 success */
+ /* nothing enabled here for RISC-V C2/C3/C6 success */
#endif
ret = Sha256Final((wc_Sha256*)sha224);
@@ -1804,14 +1878,7 @@ static int InitSha256(wc_Sha256* sha256)
return ret;
#if defined(LITTLE_ENDIAN_ORDER)
- #if (defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32C6)) && \
- defined(WOLFSSL_ESP32_CRYPT) && \
- (!defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256) || \
- !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA224))
- if (esp_sha_need_byte_reversal(&sha224->ctx))
- #endif
- {
+ if (SHA256_REV_BYTES(&sha224->ctx)) {
ByteReverseWords(sha224->digest,
sha224->digest,
WC_SHA224_DIGEST_SIZE);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sha256_asm.S b/extra/wolfssl/wolfssl/wolfcrypt/src/sha256_asm.S
index 6d1c8ea7..3f7f6cf2 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sha256_asm.S
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sha256_asm.S
@@ -46,6 +46,439 @@
#endif /* NO_AVX2_SUPPORT */
#ifdef WOLFSSL_X86_64_BUILD
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_sse2_sha256_sha_k:
+.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long 0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc
+.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long 0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967
+.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_sse2_sha256_shuf_mask:
+.quad 0x405060700010203, 0xc0d0e0f08090a0b
+#ifndef __APPLE__
+.text
+.globl Transform_Sha256_SSE2_Sha
+.type Transform_Sha256_SSE2_Sha,@function
+.align 16
+Transform_Sha256_SSE2_Sha:
+#else
+.section __TEXT,__text
+.globl _Transform_Sha256_SSE2_Sha
+.p2align 4
+_Transform_Sha256_SSE2_Sha:
+#endif /* __APPLE__ */
+ movdqa L_sse2_sha256_shuf_mask(%rip), %xmm10
+ movq (%rdi), %xmm1
+ movq 8(%rdi), %xmm2
+ movhpd 16(%rdi), %xmm1
+ movhpd 24(%rdi), %xmm2
+ pshufd $27, %xmm1, %xmm1
+ pshufd $27, %xmm2, %xmm2
+ movdqu (%rsi), %xmm3
+ movdqu 16(%rsi), %xmm4
+ movdqu 32(%rsi), %xmm5
+ movdqu 48(%rsi), %xmm6
+ pshufb %xmm10, %xmm3
+ movdqa %xmm1, %xmm8
+ movdqa %xmm2, %xmm9
+ # Rounds: 0-3
+ movdqa %xmm3, %xmm0
+ paddd 0+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 4-7
+ pshufb %xmm10, %xmm4
+ movdqa %xmm4, %xmm0
+ paddd 16+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 8-11
+ pshufb %xmm10, %xmm5
+ movdqa %xmm5, %xmm0
+ paddd 32+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 12-15
+ pshufb %xmm10, %xmm6
+ movdqa %xmm6, %xmm0
+ paddd 48+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm6, %xmm7
+ palignr $4, %xmm5, %xmm7
+ paddd %xmm7, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 16-19
+ movdqa %xmm3, %xmm0
+ paddd 64+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm3, %xmm7
+ palignr $4, %xmm6, %xmm7
+ paddd %xmm7, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 20-23
+ movdqa %xmm4, %xmm0
+ paddd 80+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm4, %xmm7
+ palignr $4, %xmm3, %xmm7
+ paddd %xmm7, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 24-27
+ movdqa %xmm5, %xmm0
+ paddd 96+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm7
+ paddd %xmm7, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 28-31
+ movdqa %xmm6, %xmm0
+ paddd 112+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm6, %xmm7
+ palignr $4, %xmm5, %xmm7
+ paddd %xmm7, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 32-35
+ movdqa %xmm3, %xmm0
+ paddd 128+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm3, %xmm7
+ palignr $4, %xmm6, %xmm7
+ paddd %xmm7, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 36-39
+ movdqa %xmm4, %xmm0
+ paddd 144+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm4, %xmm7
+ palignr $4, %xmm3, %xmm7
+ paddd %xmm7, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 40-43
+ movdqa %xmm5, %xmm0
+ paddd 160+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm7
+ paddd %xmm7, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 44-47
+ movdqa %xmm6, %xmm0
+ paddd 176+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm6, %xmm7
+ palignr $4, %xmm5, %xmm7
+ paddd %xmm7, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 48-51
+ movdqa %xmm3, %xmm0
+ paddd 192+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm3, %xmm7
+ palignr $4, %xmm6, %xmm7
+ paddd %xmm7, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 52-63
+ movdqa %xmm4, %xmm0
+ paddd 208+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm4, %xmm7
+ palignr $4, %xmm3, %xmm7
+ paddd %xmm7, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ movdqa %xmm5, %xmm0
+ paddd 224+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm7
+ paddd %xmm7, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ movdqa %xmm6, %xmm0
+ paddd 240+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ paddd %xmm8, %xmm1
+ paddd %xmm9, %xmm2
+ pshufd $27, %xmm1, %xmm1
+ pshufd $27, %xmm2, %xmm2
+ movq %xmm1, (%rdi)
+ movq %xmm2, 8(%rdi)
+ movhpd %xmm1, 16(%rdi)
+ movhpd %xmm2, 24(%rdi)
+ xorq %rax, %rax
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size Transform_Sha256_SSE2_Sha,.-Transform_Sha256_SSE2_Sha
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl Transform_Sha256_SSE2_Sha_Len
+.type Transform_Sha256_SSE2_Sha_Len,@function
+.align 16
+Transform_Sha256_SSE2_Sha_Len:
+#else
+.section __TEXT,__text
+.globl _Transform_Sha256_SSE2_Sha_Len
+.p2align 4
+_Transform_Sha256_SSE2_Sha_Len:
+#endif /* __APPLE__ */
+ movdqa L_sse2_sha256_shuf_mask(%rip), %xmm10
+ movq (%rdi), %xmm1
+ movq 8(%rdi), %xmm2
+ movhpd 16(%rdi), %xmm1
+ movhpd 24(%rdi), %xmm2
+ pshufd $27, %xmm1, %xmm1
+ pshufd $27, %xmm2, %xmm2
+ # Start of loop processing a block
+L_sha256_sha_len_sse2_start:
+ movdqu (%rsi), %xmm3
+ movdqu 16(%rsi), %xmm4
+ movdqu 32(%rsi), %xmm5
+ movdqu 48(%rsi), %xmm6
+ pshufb %xmm10, %xmm3
+ movdqa %xmm1, %xmm8
+ movdqa %xmm2, %xmm9
+ # Rounds: 0-3
+ movdqa %xmm3, %xmm0
+ paddd 0+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 4-7
+ pshufb %xmm10, %xmm4
+ movdqa %xmm4, %xmm0
+ paddd 16+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 8-11
+ pshufb %xmm10, %xmm5
+ movdqa %xmm5, %xmm0
+ paddd 32+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 12-15
+ pshufb %xmm10, %xmm6
+ movdqa %xmm6, %xmm0
+ paddd 48+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm6, %xmm7
+ palignr $4, %xmm5, %xmm7
+ paddd %xmm7, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 16-19
+ movdqa %xmm3, %xmm0
+ paddd 64+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm3, %xmm7
+ palignr $4, %xmm6, %xmm7
+ paddd %xmm7, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 20-23
+ movdqa %xmm4, %xmm0
+ paddd 80+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm4, %xmm7
+ palignr $4, %xmm3, %xmm7
+ paddd %xmm7, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 24-27
+ movdqa %xmm5, %xmm0
+ paddd 96+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm7
+ paddd %xmm7, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 28-31
+ movdqa %xmm6, %xmm0
+ paddd 112+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm6, %xmm7
+ palignr $4, %xmm5, %xmm7
+ paddd %xmm7, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 32-35
+ movdqa %xmm3, %xmm0
+ paddd 128+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm3, %xmm7
+ palignr $4, %xmm6, %xmm7
+ paddd %xmm7, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 36-39
+ movdqa %xmm4, %xmm0
+ paddd 144+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm4, %xmm7
+ palignr $4, %xmm3, %xmm7
+ paddd %xmm7, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 40-43
+ movdqa %xmm5, %xmm0
+ paddd 160+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm7
+ paddd %xmm7, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 44-47
+ movdqa %xmm6, %xmm0
+ paddd 176+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm6, %xmm7
+ palignr $4, %xmm5, %xmm7
+ paddd %xmm7, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 48-51
+ movdqa %xmm3, %xmm0
+ paddd 192+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm3, %xmm7
+ palignr $4, %xmm6, %xmm7
+ paddd %xmm7, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ pshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 52-63
+ movdqa %xmm4, %xmm0
+ paddd 208+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm4, %xmm7
+ palignr $4, %xmm3, %xmm7
+ paddd %xmm7, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ movdqa %xmm5, %xmm0
+ paddd 224+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ movdqa %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm7
+ paddd %xmm7, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ movdqa %xmm6, %xmm0
+ paddd 240+L_sse2_sha256_sha_k(%rip), %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ pshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ addq $0x40, %rsi
+ subl $0x40, %edx
+ paddd %xmm8, %xmm1
+ paddd %xmm9, %xmm2
+ jnz L_sha256_sha_len_sse2_start
+ pshufd $27, %xmm1, %xmm1
+ pshufd $27, %xmm2, %xmm2
+ movq %xmm1, (%rdi)
+ movq %xmm2, 8(%rdi)
+ movhpd %xmm1, 16(%rdi)
+ movhpd %xmm2, 24(%rdi)
+ xorq %rax, %rax
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size Transform_Sha256_SSE2_Sha_Len,.-Transform_Sha256_SSE2_Sha_Len
+#endif /* __APPLE__ */
#ifdef HAVE_INTEL_AVX1
#ifndef __APPLE__
.data
@@ -123,7 +556,6 @@ _Transform_Sha256_AVX1:
pushq %r14
pushq %r15
subq $0x40, %rsp
- leaq 32(%rdi), %rax
vmovdqa L_avx1_sha256_flip_mask(%rip), %xmm13
vmovdqa L_avx1_sha256_shuf_00BA(%rip), %xmm11
vmovdqa L_avx1_sha256_shuf_DC00(%rip), %xmm12
@@ -136,12 +568,12 @@ _Transform_Sha256_AVX1:
movl 24(%rdi), %r14d
movl 28(%rdi), %r15d
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rax), %xmm0
- vmovdqu 16(%rax), %xmm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
vpshufb %xmm13, %xmm0, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
- vmovdqu 32(%rax), %xmm2
- vmovdqu 48(%rax), %xmm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
vpshufb %xmm13, %xmm2, %xmm2
vpshufb %xmm13, %xmm3, %xmm3
movl %r9d, %ebx
@@ -2513,8 +2945,7 @@ _Transform_Sha256_AVX1_Len:
pushq %r14
pushq %r15
pushq %rbp
- movq %rsi, %rbp
- movq %rdx, %rsi
+ movq %rdx, %rbp
subq $0x40, %rsp
vmovdqa L_avx1_sha256_flip_mask(%rip), %xmm13
vmovdqa L_avx1_sha256_shuf_00BA(%rip), %xmm11
@@ -2530,12 +2961,12 @@ _Transform_Sha256_AVX1_Len:
# Start of loop processing a block
L_sha256_len_avx1_start:
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rbp), %xmm0
- vmovdqu 16(%rbp), %xmm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
vpshufb %xmm13, %xmm0, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
- vmovdqu 32(%rbp), %xmm2
- vmovdqu 48(%rbp), %xmm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
vpshufb %xmm13, %xmm2, %xmm2
vpshufb %xmm13, %xmm3, %xmm3
movl %r9d, %ebx
@@ -4877,8 +5308,8 @@ L_sha256_len_avx1_start:
addl 20(%rdi), %r13d
addl 24(%rdi), %r14d
addl 28(%rdi), %r15d
- addq $0x40, %rbp
- subl $0x40, %esi
+ addq $0x40, %rsi
+ subl $0x40, %ebp
movl %r8d, (%rdi)
movl %r9d, 4(%rdi)
movl %r10d, 8(%rdi)
@@ -4980,14 +5411,13 @@ _Transform_Sha256_AVX1_RORX:
vmovdqa L_avx1_rorx_sha256_flip_mask(%rip), %xmm13
vmovdqa L_avx1_rorx_sha256_shuf_00BA(%rip), %xmm11
vmovdqa L_avx1_rorx_sha256_shuf_DC00(%rip), %xmm12
- leaq 32(%rdi), %rax
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rax), %xmm0
- vmovdqu 16(%rax), %xmm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
vpshufb %xmm13, %xmm0, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
- vmovdqu 32(%rax), %xmm2
- vmovdqu 48(%rax), %xmm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
vpshufb %xmm13, %xmm2, %xmm2
vpshufb %xmm13, %xmm3, %xmm3
movl (%rdi), %r8d
@@ -7325,8 +7755,7 @@ _Transform_Sha256_AVX1_RORX_Len:
pushq %r14
pushq %r15
pushq %rbp
- movq %rsi, %rbp
- movq %rdx, %rsi
+ movq %rdx, %rbp
subq $0x40, %rsp
vmovdqa L_avx1_rorx_sha256_flip_mask(%rip), %xmm13
vmovdqa L_avx1_rorx_sha256_shuf_00BA(%rip), %xmm11
@@ -7342,12 +7771,12 @@ _Transform_Sha256_AVX1_RORX_Len:
# Start of loop processing a block
L_sha256_len_avx1_len_rorx_start:
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rbp), %xmm0
- vmovdqu 16(%rbp), %xmm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
vpshufb %xmm13, %xmm0, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
- vmovdqu 32(%rbp), %xmm2
- vmovdqu 48(%rbp), %xmm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
vpshufb %xmm13, %xmm2, %xmm2
vpshufb %xmm13, %xmm3, %xmm3
# set_w_k_xfer_4: 0
@@ -9648,8 +10077,8 @@ L_sha256_len_avx1_len_rorx_start:
addl 20(%rdi), %r13d
addl 24(%rdi), %r14d
addl 28(%rdi), %r15d
- addq $0x40, %rbp
- subl $0x40, %esi
+ addq $0x40, %rsi
+ subl $0x40, %ebp
movl %r8d, (%rdi)
movl %r9d, 4(%rdi)
movl %r10d, 8(%rdi)
@@ -9672,6 +10101,383 @@ L_sha256_len_avx1_len_rorx_start:
#ifndef __APPLE__
.size Transform_Sha256_AVX1_RORX_Len,.-Transform_Sha256_AVX1_RORX_Len
#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_avx1_sha256_sha_k:
+.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long 0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc
+.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long 0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967
+.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_avx1_sha256_shuf_mask:
+.quad 0x405060700010203, 0xc0d0e0f08090a0b
+#ifndef __APPLE__
+.text
+.globl Transform_Sha256_AVX1_Sha
+.type Transform_Sha256_AVX1_Sha,@function
+.align 16
+Transform_Sha256_AVX1_Sha:
+#else
+.section __TEXT,__text
+.globl _Transform_Sha256_AVX1_Sha
+.p2align 4
+_Transform_Sha256_AVX1_Sha:
+#endif /* __APPLE__ */
+ vmovdqa L_avx1_sha256_shuf_mask(%rip), %xmm10
+ vmovq (%rdi), %xmm1
+ vmovq 8(%rdi), %xmm2
+ vmovhpd 16(%rdi), %xmm1, %xmm1
+ vmovhpd 24(%rdi), %xmm2, %xmm2
+ vpshufd $27, %xmm1, %xmm1
+ vpshufd $27, %xmm2, %xmm2
+ vmovdqu (%rsi), %xmm3
+ vmovdqu 16(%rsi), %xmm4
+ vmovdqu 32(%rsi), %xmm5
+ vmovdqu 48(%rsi), %xmm6
+ vpshufb %xmm10, %xmm3, %xmm3
+ vmovdqa %xmm1, %xmm8
+ vmovdqa %xmm2, %xmm9
+ # Rounds: 0-3
+ vpaddd 0+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 4-7
+ vpshufb %xmm10, %xmm4, %xmm4
+ vpaddd 16+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 8-11
+ vpshufb %xmm10, %xmm5, %xmm5
+ vpaddd 32+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 12-15
+ vpshufb %xmm10, %xmm6, %xmm6
+ vpaddd 48+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm5, %xmm6, %xmm7
+ vpaddd %xmm7, %xmm3, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 16-19
+ vpaddd 64+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm6, %xmm3, %xmm7
+ vpaddd %xmm7, %xmm4, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 20-23
+ vpaddd 80+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm3, %xmm4, %xmm7
+ vpaddd %xmm7, %xmm5, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 24-27
+ vpaddd 96+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm4, %xmm5, %xmm7
+ vpaddd %xmm7, %xmm6, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 28-31
+ vpaddd 112+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm5, %xmm6, %xmm7
+ vpaddd %xmm7, %xmm3, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 32-35
+ vpaddd 128+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm6, %xmm3, %xmm7
+ vpaddd %xmm7, %xmm4, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 36-39
+ vpaddd 144+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm3, %xmm4, %xmm7
+ vpaddd %xmm7, %xmm5, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 40-43
+ vpaddd 160+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm4, %xmm5, %xmm7
+ vpaddd %xmm7, %xmm6, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 44-47
+ vpaddd 176+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm5, %xmm6, %xmm7
+ vpaddd %xmm7, %xmm3, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 48-51
+ vpaddd 192+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm6, %xmm3, %xmm7
+ vpaddd %xmm7, %xmm4, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 52-63
+ vpaddd 208+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm3, %xmm4, %xmm7
+ vpaddd %xmm7, %xmm5, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ vpaddd 224+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm4, %xmm5, %xmm7
+ vpaddd %xmm7, %xmm6, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ vpaddd 240+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ vpaddd %xmm8, %xmm1, %xmm1
+ vpaddd %xmm9, %xmm2, %xmm2
+ vpshufd $27, %xmm1, %xmm1
+ vpshufd $27, %xmm2, %xmm2
+ vmovq %xmm1, (%rdi)
+ vmovq %xmm2, 8(%rdi)
+ vmovhpd %xmm1, 16(%rdi)
+ vmovhpd %xmm2, 24(%rdi)
+ xorq %rax, %rax
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size Transform_Sha256_AVX1_Sha,.-Transform_Sha256_AVX1_Sha
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl Transform_Sha256_AVX1_Sha_Len
+.type Transform_Sha256_AVX1_Sha_Len,@function
+.align 16
+Transform_Sha256_AVX1_Sha_Len:
+#else
+.section __TEXT,__text
+.globl _Transform_Sha256_AVX1_Sha_Len
+.p2align 4
+_Transform_Sha256_AVX1_Sha_Len:
+#endif /* __APPLE__ */
+ vmovdqa L_avx1_sha256_shuf_mask(%rip), %xmm10
+ vmovq (%rdi), %xmm1
+ vmovq 8(%rdi), %xmm2
+ vmovhpd 16(%rdi), %xmm1, %xmm1
+ vmovhpd 24(%rdi), %xmm2, %xmm2
+ vpshufd $27, %xmm1, %xmm1
+ vpshufd $27, %xmm2, %xmm2
+ # Start of loop processing a block
+L_sha256_sha_len_avx1_start:
+ vmovdqu (%rsi), %xmm3
+ vmovdqu 16(%rsi), %xmm4
+ vmovdqu 32(%rsi), %xmm5
+ vmovdqu 48(%rsi), %xmm6
+ vpshufb %xmm10, %xmm3, %xmm3
+ vmovdqa %xmm1, %xmm8
+ vmovdqa %xmm2, %xmm9
+ # Rounds: 0-3
+ vpaddd 0+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 4-7
+ vpshufb %xmm10, %xmm4, %xmm4
+ vpaddd 16+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 8-11
+ vpshufb %xmm10, %xmm5, %xmm5
+ vpaddd 32+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 12-15
+ vpshufb %xmm10, %xmm6, %xmm6
+ vpaddd 48+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm5, %xmm6, %xmm7
+ vpaddd %xmm7, %xmm3, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 16-19
+ vpaddd 64+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm6, %xmm3, %xmm7
+ vpaddd %xmm7, %xmm4, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 20-23
+ vpaddd 80+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm3, %xmm4, %xmm7
+ vpaddd %xmm7, %xmm5, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 24-27
+ vpaddd 96+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm4, %xmm5, %xmm7
+ vpaddd %xmm7, %xmm6, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 28-31
+ vpaddd 112+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm5, %xmm6, %xmm7
+ vpaddd %xmm7, %xmm3, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 32-35
+ vpaddd 128+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm6, %xmm3, %xmm7
+ vpaddd %xmm7, %xmm4, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 36-39
+ vpaddd 144+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm3, %xmm4, %xmm7
+ vpaddd %xmm7, %xmm5, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm4, %xmm3
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 40-43
+ vpaddd 160+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm4, %xmm5, %xmm7
+ vpaddd %xmm7, %xmm6, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm5, %xmm4
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 44-47
+ vpaddd 176+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm5, %xmm6, %xmm7
+ vpaddd %xmm7, %xmm3, %xmm3
+ sha256msg2 %xmm6, %xmm3
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm6, %xmm5
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 48-51
+ vpaddd 192+L_avx1_sha256_sha_k(%rip), %xmm3, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm6, %xmm3, %xmm7
+ vpaddd %xmm7, %xmm4, %xmm4
+ sha256msg2 %xmm3, %xmm4
+ vpshufd $14, %xmm0, %xmm0
+ sha256msg1 %xmm3, %xmm6
+ sha256rnds2 %xmm2, %xmm1
+ # Rounds: 52-63
+ vpaddd 208+L_avx1_sha256_sha_k(%rip), %xmm4, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm3, %xmm4, %xmm7
+ vpaddd %xmm7, %xmm5, %xmm5
+ sha256msg2 %xmm4, %xmm5
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ vpaddd 224+L_avx1_sha256_sha_k(%rip), %xmm5, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpalignr $4, %xmm4, %xmm5, %xmm7
+ vpaddd %xmm7, %xmm6, %xmm6
+ sha256msg2 %xmm5, %xmm6
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ vpaddd 240+L_avx1_sha256_sha_k(%rip), %xmm6, %xmm0
+ sha256rnds2 %xmm1, %xmm2
+ vpshufd $14, %xmm0, %xmm0
+ sha256rnds2 %xmm2, %xmm1
+ addq $0x40, %rsi
+ subl $0x40, %edx
+ vpaddd %xmm8, %xmm1, %xmm1
+ vpaddd %xmm9, %xmm2, %xmm2
+ jnz L_sha256_sha_len_avx1_start
+ vpshufd $27, %xmm1, %xmm1
+ vpshufd $27, %xmm2, %xmm2
+ vmovq %xmm1, (%rdi)
+ vmovq %xmm2, 8(%rdi)
+ vmovhpd %xmm1, 16(%rdi)
+ vmovhpd %xmm2, 24(%rdi)
+ xorq %rax, %rax
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size Transform_Sha256_AVX1_Sha_Len,.-Transform_Sha256_AVX1_Sha_Len
+#endif /* __APPLE__ */
#endif /* HAVE_INTEL_AVX1 */
#ifdef HAVE_INTEL_AVX2
#ifndef __APPLE__
@@ -9769,7 +10575,6 @@ _Transform_Sha256_AVX2:
pushq %r14
pushq %r15
subq $0x200, %rsp
- leaq 32(%rdi), %rax
vmovdqa L_avx2_sha256_flip_mask(%rip), %xmm13
vmovdqa L_avx2_sha256_shuf_00BA(%rip), %ymm11
vmovdqa L_avx2_sha256_shuf_DC00(%rip), %ymm12
@@ -9782,12 +10587,12 @@ _Transform_Sha256_AVX2:
movl 24(%rdi), %r14d
movl 28(%rdi), %r15d
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rax), %xmm0
- vmovdqu 16(%rax), %xmm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
vpshufb %xmm13, %xmm0, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
- vmovdqu 32(%rax), %xmm2
- vmovdqu 48(%rax), %xmm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
vpshufb %xmm13, %xmm2, %xmm2
vpshufb %xmm13, %xmm3, %xmm3
movl %r9d, %ebx
@@ -12159,13 +12964,12 @@ _Transform_Sha256_AVX2_Len:
pushq %r14
pushq %r15
pushq %rbp
- movq %rsi, %rbp
- movq %rdx, %rsi
+ movq %rdx, %rbp
subq $0x200, %rsp
- testb $0x40, %sil
+ testb $0x40, %bpl
je L_sha256_len_avx2_block
- vmovdqu (%rbp), %ymm0
- vmovdqu 32(%rbp), %ymm1
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
vmovups %ymm0, 32(%rdi)
vmovups %ymm1, 64(%rdi)
#ifndef __APPLE__
@@ -12173,8 +12977,8 @@ _Transform_Sha256_AVX2_Len:
#else
call _Transform_Sha256_AVX2
#endif /* __APPLE__ */
- addq $0x40, %rbp
- subl $0x40, %esi
+ addq $0x40, %rsi
+ subl $0x40, %ebp
jz L_sha256_len_avx2_done
L_sha256_len_avx2_block:
vmovdqa L_avx2_sha256_flip_mask(%rip), %ymm13
@@ -12191,18 +12995,18 @@ L_sha256_len_avx2_block:
# Start of loop processing two blocks
L_sha256_len_avx2_start:
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rbp), %xmm0
- vmovdqu 16(%rbp), %xmm1
- vmovdqu 64(%rbp), %xmm4
- vmovdqu 80(%rbp), %xmm5
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
+ vmovdqu 64(%rsi), %xmm4
+ vmovdqu 80(%rsi), %xmm5
vinserti128 $0x01, %xmm4, %ymm0, %ymm0
vinserti128 $0x01, %xmm5, %ymm1, %ymm1
vpshufb %ymm13, %ymm0, %ymm0
vpshufb %ymm13, %ymm1, %ymm1
- vmovdqu 32(%rbp), %xmm2
- vmovdqu 48(%rbp), %xmm3
- vmovdqu 96(%rbp), %xmm6
- vmovdqu 112(%rbp), %xmm7
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
+ vmovdqu 96(%rsi), %xmm6
+ vmovdqu 112(%rsi), %xmm7
vinserti128 $0x01, %xmm6, %ymm2, %ymm2
vinserti128 $0x01, %xmm7, %ymm3, %ymm3
vpshufb %ymm13, %ymm2, %ymm2
@@ -16245,8 +17049,8 @@ L_sha256_len_avx2_start:
addl 20(%rdi), %r13d
addl 24(%rdi), %r14d
addl 28(%rdi), %r15d
- addq $0x80, %rbp
- subl $0x80, %esi
+ addq $0x80, %rsi
+ subl $0x80, %ebp
movl %r8d, (%rdi)
movl %r9d, 4(%rdi)
movl %r10d, 8(%rdi)
@@ -16365,21 +17169,20 @@ _Transform_Sha256_AVX2_RORX:
pushq %r14
pushq %r15
subq $0x200, %rsp
- leaq 32(%rdi), %rax
vmovdqa L_avx2_rorx_sha256_flip_mask(%rip), %xmm13
vmovdqa L_avx2_rorx_sha256_shuf_00BA(%rip), %ymm11
vmovdqa L_avx2_rorx_sha256_shuf_DC00(%rip), %ymm12
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rax), %xmm0
- vmovdqu 16(%rax), %xmm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
vpshufb %xmm13, %xmm0, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
vpaddd 0+L_avx2_rorx_sha256_k(%rip), %ymm0, %ymm4
vpaddd 32+L_avx2_rorx_sha256_k(%rip), %ymm1, %ymm5
vmovdqu %ymm4, (%rsp)
vmovdqu %ymm5, 32(%rsp)
- vmovdqu 32(%rax), %xmm2
- vmovdqu 48(%rax), %xmm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
vpshufb %xmm13, %xmm2, %xmm2
vpshufb %xmm13, %xmm3, %xmm3
vpaddd 64+L_avx2_rorx_sha256_k(%rip), %ymm2, %ymm4
@@ -18730,13 +19533,12 @@ _Transform_Sha256_AVX2_RORX_Len:
pushq %r14
pushq %r15
pushq %rbp
- movq %rsi, %rbp
- movq %rdx, %rsi
+ movq %rdx, %rbp
subq $0x200, %rsp
- testb $0x40, %sil
+ testb $0x40, %bpl
je L_sha256_len_avx2_rorx_block
- vmovdqu (%rbp), %ymm0
- vmovdqu 32(%rbp), %ymm1
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
vmovups %ymm0, 32(%rdi)
vmovups %ymm1, 64(%rdi)
#ifndef __APPLE__
@@ -18744,8 +19546,8 @@ _Transform_Sha256_AVX2_RORX_Len:
#else
call _Transform_Sha256_AVX2_RORX
#endif /* __APPLE__ */
- addq $0x40, %rbp
- subl $0x40, %esi
+ addq $0x40, %rsi
+ subl $0x40, %ebp
jz L_sha256_len_avx2_rorx_done
L_sha256_len_avx2_rorx_block:
vmovdqa L_avx2_rorx_sha256_flip_mask(%rip), %ymm13
@@ -18762,20 +19564,20 @@ L_sha256_len_avx2_rorx_block:
# Start of loop processing two blocks
L_sha256_len_avx2_rorx_start:
# X0, X1, X2, X3 = W[0..15]
- vmovdqu (%rbp), %xmm0
- vmovdqu 16(%rbp), %xmm1
- vinserti128 $0x01, 64(%rbp), %ymm0, %ymm0
- vinserti128 $0x01, 80(%rbp), %ymm1, %ymm1
+ vmovdqu (%rsi), %xmm0
+ vmovdqu 16(%rsi), %xmm1
+ vinserti128 $0x01, 64(%rsi), %ymm0, %ymm0
+ vinserti128 $0x01, 80(%rsi), %ymm1, %ymm1
vpshufb %ymm13, %ymm0, %ymm0
vpshufb %ymm13, %ymm1, %ymm1
vpaddd 0+L_avx2_rorx_sha256_k(%rip), %ymm0, %ymm4
vpaddd 32+L_avx2_rorx_sha256_k(%rip), %ymm1, %ymm5
vmovdqu %ymm4, (%rsp)
vmovdqu %ymm5, 32(%rsp)
- vmovdqu 32(%rbp), %xmm2
- vmovdqu 48(%rbp), %xmm3
- vinserti128 $0x01, 96(%rbp), %ymm2, %ymm2
- vinserti128 $0x01, 112(%rbp), %ymm3, %ymm3
+ vmovdqu 32(%rsi), %xmm2
+ vmovdqu 48(%rsi), %xmm3
+ vinserti128 $0x01, 96(%rsi), %ymm2, %ymm2
+ vinserti128 $0x01, 112(%rsi), %ymm3, %ymm3
vpshufb %ymm13, %ymm2, %ymm2
vpshufb %ymm13, %ymm3, %ymm3
vpaddd 64+L_avx2_rorx_sha256_k(%rip), %ymm2, %ymm4
@@ -22637,7 +23439,7 @@ L_sha256_len_avx2_rorx_start:
addl %edx, %r8d
xorl %r10d, %eax
addl %eax, %r8d
- addq $0x80, %rbp
+ addq $0x80, %rsi
addl (%rdi), %r8d
addl 4(%rdi), %r9d
addl 8(%rdi), %r10d
@@ -22646,7 +23448,7 @@ L_sha256_len_avx2_rorx_start:
addl 20(%rdi), %r13d
addl 24(%rdi), %r14d
addl 28(%rdi), %r15d
- subl $0x80, %esi
+ subl $0x80, %ebp
movl %r8d, (%rdi)
movl %r9d, 4(%rdi)
movl %r10d, 8(%rdi)
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sha512.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sha512.c
index c6968162..91bf1e5b 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sha512.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sha512.c
@@ -39,8 +39,8 @@
* By default the HW acceleration is on for ESP32 Chipsets,
* but individual components can be turned off. See user_settings.h
*/
+ #define TAG "wc_sha_512"
#define WOLFSSL_USE_ESP32_CRYPT_HASH_HW
- static const char* TAG = "wc_sha_512";
#else
#undef WOLFSSL_USE_ESP32_CRYPT_HASH_HW
#endif
@@ -87,7 +87,7 @@
#endif
-#if defined(USE_INTEL_SPEEDUP)
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP)
#if defined(__GNUC__) && ((__GNUC__ < 4) || \
(__GNUC__ == 4 && __GNUC_MINOR__ <= 8))
#undef NO_AVX2_SUPPORT
@@ -318,11 +318,9 @@ static int InitSha512_256(wc_Sha512* sha512)
#endif /* WOLFSSL_SHA512 */
/* Hardware Acceleration */
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
-#ifdef WOLFSSL_SHA512
-
/*****
Intel AVX1/AVX2 Macro Control Structure
@@ -452,37 +450,40 @@ static int InitSha512_256(wc_Sha512* sha512)
}
else
#endif
- if (1) {
+ {
Transform_Sha512_p = Transform_Sha512_AVX2;
Transform_Sha512_Len_p = Transform_Sha512_AVX2_Len;
Transform_Sha512_is_vectorized = 1;
}
+ }
+ else
+ #endif
+ #if defined(HAVE_INTEL_AVX1)
+ if (IS_INTEL_AVX1(intel_flags)) {
#ifdef HAVE_INTEL_RORX
- else {
+ if (IS_INTEL_BMI2(intel_flags)) {
Transform_Sha512_p = Transform_Sha512_AVX1_RORX;
Transform_Sha512_Len_p = Transform_Sha512_AVX1_RORX_Len;
Transform_Sha512_is_vectorized = 1;
}
+ else
#endif
- }
- else
- #endif
- #if defined(HAVE_INTEL_AVX1)
- if (IS_INTEL_AVX1(intel_flags)) {
- Transform_Sha512_p = Transform_Sha512_AVX1;
- Transform_Sha512_Len_p = Transform_Sha512_AVX1_Len;
- Transform_Sha512_is_vectorized = 1;
+ {
+ Transform_Sha512_p = Transform_Sha512_AVX1;
+ Transform_Sha512_Len_p = Transform_Sha512_AVX1_Len;
+ Transform_Sha512_is_vectorized = 1;
+ }
}
else
#endif
{
Transform_Sha512_p = _Transform_Sha512;
- Transform_Sha512_is_vectorized = 1;
+ Transform_Sha512_Len_p = NULL;
+ Transform_Sha512_is_vectorized = 0;
}
transform_check = 1;
}
-#endif /* WOLFSSL_SHA512 */
#else
#define Transform_Sha512(sha512) _Transform_Sha512(sha512)
@@ -515,7 +516,7 @@ static int InitSha512_Family(wc_Sha512* sha512, void* heap, int devId,
if (ret != 0)
return ret;
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
Sha512_SetTransform();
#endif
@@ -756,7 +757,7 @@ static WC_INLINE int Sha512Update(wc_Sha512* sha512, const byte* data, word32 le
if (sha512->buffLen == WC_SHA512_BLOCK_SIZE) {
#if defined(LITTLE_ENDIAN_ORDER)
- #if defined(USE_INTEL_SPEEDUP) && \
+ #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
#endif
@@ -791,7 +792,7 @@ static WC_INLINE int Sha512Update(wc_Sha512* sha512, const byte* data, word32 le
}
}
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (Transform_Sha512_Len_p != NULL) {
word32 blocksLen = len & ~((word32)WC_SHA512_BLOCK_SIZE-1);
@@ -806,8 +807,9 @@ static WC_INLINE int Sha512Update(wc_Sha512* sha512, const byte* data, word32 le
}
else
#endif
-#if !defined(LITTLE_ENDIAN_ORDER) || (defined(USE_INTEL_SPEEDUP) && \
- (defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2)))
+#if !defined(LITTLE_ENDIAN_ORDER) || (defined(WOLFSSL_X86_64_BUILD) && \
+ defined(USE_INTEL_SPEEDUP) && (defined(HAVE_INTEL_AVX1) || \
+ defined(HAVE_INTEL_AVX2)))
{
while (len >= WC_SHA512_BLOCK_SIZE) {
XMEMCPY(local, data, WC_SHA512_BLOCK_SIZE);
@@ -815,7 +817,7 @@ static WC_INLINE int Sha512Update(wc_Sha512* sha512, const byte* data, word32 le
data += WC_SHA512_BLOCK_SIZE;
len -= WC_SHA512_BLOCK_SIZE;
- #if defined(USE_INTEL_SPEEDUP) && \
+ #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
{
@@ -938,10 +940,14 @@ static WC_INLINE int Sha512Final(wc_Sha512* sha512)
/* pad with zeros */
if (sha512->buffLen > WC_SHA512_PAD_SIZE) {
- XMEMSET(&local[sha512->buffLen], 0, WC_SHA512_BLOCK_SIZE - sha512->buffLen);
+ if (sha512->buffLen < WC_SHA512_BLOCK_SIZE ) {
+ XMEMSET(&local[sha512->buffLen], 0,
+ WC_SHA512_BLOCK_SIZE - sha512->buffLen);
+ }
+
sha512->buffLen += WC_SHA512_BLOCK_SIZE - sha512->buffLen;
#if defined(LITTLE_ENDIAN_ORDER)
- #if defined(USE_INTEL_SPEEDUP) && \
+ #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
#endif
@@ -987,7 +993,7 @@ static WC_INLINE int Sha512Final(wc_Sha512* sha512)
/* store lengths */
#if defined(LITTLE_ENDIAN_ORDER)
- #if defined(USE_INTEL_SPEEDUP) && \
+ #if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
#endif
@@ -1006,7 +1012,7 @@ static WC_INLINE int Sha512Final(wc_Sha512* sha512)
sha512->buffer[WC_SHA512_BLOCK_SIZE / sizeof(word64) - 1] = sha512->loLen;
#endif
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (IS_INTEL_AVX1(intel_flags) || IS_INTEL_AVX2(intel_flags))
ByteReverseWords64(&(sha512->buffer[WC_SHA512_BLOCK_SIZE / sizeof(word64) - 2]),
@@ -1211,13 +1217,13 @@ int wc_Sha512Transform(wc_Sha512* sha, const unsigned char* data)
return MEMORY_E;
#endif
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
Sha512_SetTransform();
#endif
#if defined(LITTLE_ENDIAN_ORDER)
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
if (!IS_INTEL_AVX1(intel_flags) && !IS_INTEL_AVX2(intel_flags))
#endif
@@ -1454,7 +1460,7 @@ int wc_InitSha384_ex(wc_Sha384* sha384, void* heap, int devId)
return ret;
}
-#if defined(USE_INTEL_SPEEDUP) && \
+#if defined(WOLFSSL_X86_64_BUILD) && defined(USE_INTEL_SPEEDUP) && \
(defined(HAVE_INTEL_AVX1) || defined(HAVE_INTEL_AVX2))
Sha512_SetTransform();
#endif
@@ -1613,20 +1619,23 @@ int wc_Sha512Copy(wc_Sha512* src, wc_Sha512* dst)
if (ret == 0) {
ret = esp_sha512_ctx_copy(src, dst);
}
- #elif defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ #elif defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
defined(CONFIG_IDF_TARGET_ESP32C6)
ESP_LOGV(TAG, "No SHA-512 HW on the ESP32-C3");
+
#elif defined(CONFIG_IDF_TARGET_ESP32S2) || \
defined(CONFIG_IDF_TARGET_ESP32S3)
- if (ret == 0) {
- ret = esp_sha512_ctx_copy(src, dst);
- }
+ if (ret == 0) {
+ ret = esp_sha512_ctx_copy(src, dst);
+ }
#else
ESP_LOGW(TAG, "No SHA384 HW or not yet implemented for %s",
CONFIG_IDF_TARGET);
#endif
-#endif
+#endif /* WOLFSSL_USE_ESP32_CRYPT_HASH_HW */
#ifdef WOLFSSL_HASH_FLAGS
dst->flags |= WC_HASH_FLAG_ISCOPY;
@@ -1893,7 +1902,9 @@ int wc_Sha384Copy(wc_Sha384* src, wc_Sha384* dst)
#if defined(WOLFSSL_USE_ESP32_CRYPT_HASH_HW)
#if defined(CONFIG_IDF_TARGET_ESP32)
esp_sha384_ctx_copy(src, dst);
- #elif defined(CONFIG_IDF_TARGET_ESP32C3) || \
+ #elif defined(CONFIG_IDF_TARGET_ESP32C2) || \
+ defined(CONFIG_IDF_TARGET_ESP8684) || \
+ defined(CONFIG_IDF_TARGET_ESP32C3) || \
defined(CONFIG_IDF_TARGET_ESP32C6)
ESP_LOGV(TAG, "No SHA-384 HW on the ESP32-C3");
#elif defined(CONFIG_IDF_TARGET_ESP32S2) || \
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/siphash.c b/extra/wolfssl/wolfssl/wolfcrypt/src/siphash.c
index 0fc27218..173b9148 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/siphash.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/siphash.c
@@ -468,7 +468,7 @@ int wc_SipHash(const unsigned char* key, const unsigned char* in, word32 inSz,
: [in] "+r" (in), [inSz] "+r" (inSz), [k0] "+r" (k0), [k1] "+r" (k1),
[v0] "+r" (v0), [v1] "+r" (v1), [v2] "+r" (v2), [v3] "+r" (v3)
- : [key] "r" (key), [out] "r" (out) , [outSz] "r" (outSz)
+ : [out] "r" (out) , [outSz] "r" (outSz)
: "memory"
);
@@ -515,16 +515,16 @@ int wc_SipHash(const unsigned char* key, const unsigned char* in, word32 inSz,
#endif
"xorq %[k1], %[v0]\n\t"
- "cmp $8, %[outSz]\n\t"
- "je L_siphash_8_end\n\t"
-
: [in] "+r" (in), [inSz] "+r" (inSz), [k0] "+r" (k0), [k1] "+r" (k1),
[v0] "+r" (v0), [v1] "+r" (v1), [v2] "+r" (v2), [v3] "+r" (v3)
- : [key] "r" (key), [out] "r" (out) , [outSz] "r" (outSz)
+ : [out] "r" (out) , [outSz] "r" (outSz)
: "memory"
);
__asm__ __volatile__ (
+ "cmp $8, %[outSz]\n\t"
+ "je L_siphash_8_end\n\t"
+
"xor $0xee, %b[v2]\n\t"
#if WOLFSSL_SIPHASH_DROUNDS == 2
SIPHASH_ROUND(%[v0], %[v1], %[v2], %[v3])
@@ -575,7 +575,7 @@ int wc_SipHash(const unsigned char* key, const unsigned char* in, word32 inSz,
: [in] "+r" (in), [inSz] "+r" (inSz), [k0] "+r" (k0), [k1] "+r" (k1),
[v0] "+r" (v0), [v1] "+r" (v1), [v2] "+r" (v2), [v3] "+r" (v3)
- : [key] "r" (key), [out] "r" (out) , [outSz] "r" (outSz)
+ : [out] "r" (out) , [outSz] "r" (outSz)
: "memory"
);
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm32.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm32.c
index 2014da43..8529e419 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm32.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm32.c
@@ -74076,8 +74076,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -74175,10 +74177,12 @@ static int sp_256_ecc_mulmod_8(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -74496,8 +74500,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -74595,10 +74601,12 @@ static int sp_256_ecc_mulmod_8(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -91837,8 +91845,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -91936,10 +91946,12 @@ static int sp_384_ecc_mulmod_12(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -92273,8 +92285,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -92372,10 +92386,12 @@ static int sp_384_ecc_mulmod_12(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -119032,8 +119048,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -119131,10 +119149,12 @@ static int sp_521_ecc_mulmod_17(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -119488,8 +119508,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -119587,10 +119609,12 @@ static int sp_521_ecc_mulmod_17(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -148716,8 +148740,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -148815,10 +148841,12 @@ static int sp_1024_ecc_mulmod_32(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -149071,8 +149099,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -149170,10 +149200,12 @@ static int sp_1024_ecc_mulmod_32(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm64.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm64.c
index ed66e6d1..ea3ce392 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm64.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_arm64.c
@@ -24939,8 +24939,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -25038,10 +25040,12 @@ static int sp_256_ecc_mulmod_4(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -25368,8 +25372,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -25467,10 +25473,12 @@ static int sp_256_ecc_mulmod_4(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -45888,8 +45896,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -45987,10 +45997,12 @@ static int sp_384_ecc_mulmod_6(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -46317,8 +46329,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -46416,10 +46430,12 @@ static int sp_384_ecc_mulmod_6(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -74312,8 +74328,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -74411,10 +74429,12 @@ static int sp_521_ecc_mulmod_9(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -74759,8 +74779,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -74858,10 +74880,12 @@ static int sp_521_ecc_mulmod_9(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -118234,8 +118258,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -118333,10 +118359,12 @@ static int sp_1024_ecc_mulmod_16(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_armthumb.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_armthumb.c
index c73f69ab..c7cb418c 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_armthumb.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_armthumb.c
@@ -101578,8 +101578,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -101677,10 +101679,12 @@ static int sp_256_ecc_mulmod_8(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -101998,8 +102002,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -102097,10 +102103,12 @@ static int sp_256_ecc_mulmod_8(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -112446,8 +112454,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -112545,10 +112555,12 @@ static int sp_384_ecc_mulmod_12(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -112882,8 +112894,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -112981,10 +112995,12 @@ static int sp_384_ecc_mulmod_12(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -126089,8 +126105,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -126188,10 +126206,12 @@ static int sp_521_ecc_mulmod_17(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -126545,8 +126565,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -126644,10 +126666,12 @@ static int sp_521_ecc_mulmod_17(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -210707,8 +210731,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -210806,10 +210832,12 @@ static int sp_1024_ecc_mulmod_32(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -211062,8 +211090,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -211161,10 +211191,12 @@ static int sp_1024_ecc_mulmod_32(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c32.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c32.c
index 468e0fcf..21a9e0ef 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c32.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c32.c
@@ -23120,8 +23120,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -23219,10 +23221,12 @@ static int sp_256_ecc_mulmod_9(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -30674,8 +30678,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -30773,10 +30779,12 @@ static int sp_384_ecc_mulmod_15(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -38277,8 +38285,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -38376,10 +38386,12 @@ static int sp_521_ecc_mulmod_21(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -46862,8 +46874,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -46961,10 +46975,12 @@ static int sp_1024_ecc_mulmod_42(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c64.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c64.c
index a2b97d81..93fd140b 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c64.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_c64.c
@@ -24027,8 +24027,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -24126,10 +24128,12 @@ static int sp_256_ecc_mulmod_5(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -31008,8 +31012,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -31107,10 +31113,12 @@ static int sp_384_ecc_mulmod_7(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -38449,8 +38457,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -38548,10 +38558,12 @@ static int sp_521_ecc_mulmod_9(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -46216,8 +46228,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -46315,10 +46329,12 @@ static int sp_1024_ecc_mulmod_18(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_cortexm.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_cortexm.c
index 3ab1accb..07a3112b 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_cortexm.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_cortexm.c
@@ -36403,8 +36403,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -36502,10 +36504,12 @@ static int sp_256_ecc_mulmod_8(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -36823,8 +36827,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -36922,10 +36928,12 @@ static int sp_256_ecc_mulmod_8(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -46272,8 +46280,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -46371,10 +46381,12 @@ static int sp_384_ecc_mulmod_12(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -46708,8 +46720,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -46807,10 +46821,12 @@ static int sp_384_ecc_mulmod_12(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -58262,8 +58278,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -58361,10 +58379,12 @@ static int sp_521_ecc_mulmod_17(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -58718,8 +58738,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -58817,10 +58839,12 @@ static int sp_521_ecc_mulmod_17(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -72587,8 +72611,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -72686,10 +72712,12 @@ static int sp_1024_ecc_mulmod_32(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -72942,8 +72970,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -73041,10 +73071,12 @@ static int sp_1024_ecc_mulmod_32(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_dsp32.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_dsp32.c
index fd7b88c4..d3b1745d 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_dsp32.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_dsp32.c
@@ -2620,8 +2620,10 @@ static THREAD_LS_T int sp_cache_last = -1;
static THREAD_LS_T int sp_cache_inited = 0;
#ifndef HAVE_THREAD_LS
+ static wolfSSL_Mutex sp_cache_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_lock);
+#ifdef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex = 0;
- static wolfSSL_Mutex sp_cache_lock;
+#endif
#endif
static void sp_ecc_get_cache(const sp_point* g, sp_cache_t** cache)
@@ -2701,10 +2703,12 @@ static int sp_256_ecc_mulmod_10(sp_point* r, const sp_point* g, const sp_digit*
int err = MP_OKAY;
#ifndef HAVE_THREAD_LS
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex == 0) {
wc_InitMutex(&sp_cache_lock);
initCacheMutex = 1;
}
+#endif
if (wc_LockMutex(&sp_cache_lock) != 0)
err = BAD_MUTEX_E;
#endif /* HAVE_THREAD_LS */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_int.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_int.c
index 94fc01c3..83a1306b 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_int.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_int.c
@@ -115,6 +115,14 @@ This library provides single precision (SP) integer math functions.
#include <wolfssl/wolfcrypt/sp_int.h>
+#if defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_SP_ASM)
+ /* force off unneeded vector register save/restore. */
+ #undef SAVE_VECTOR_REGISTERS
+ #define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
+ #undef RESTORE_VECTOR_REGISTERS
+ #define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
+#endif
+
/* DECL_SP_INT: Declare one variable of type 'sp_int'. */
#if (defined(WOLFSSL_SMALL_STACK) || defined(SP_ALLOC)) && \
!defined(WOLFSSL_SP_NO_MALLOC)
@@ -854,7 +862,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo,
"bsr %[a], %[i] \n\t" \
: [i] "=r" (vi) \
: [a] "r" (va) \
- : "cC" \
+ : "cc" \
)
#ifndef WOLFSSL_SP_DIV_WORD_HALF
@@ -4851,7 +4859,7 @@ static void _sp_init_size(sp_int* a, unsigned int size)
#endif
_sp_zero((sp_int*)am);
- am->size = size;
+ a->size = size;
}
/* Initialize the multi-precision number to be zero with a given max size.
@@ -5408,7 +5416,8 @@ int sp_cmp_mag(const sp_int* a, const sp_int* b)
#if defined(WOLFSSL_SP_MATH_ALL) || defined(HAVE_ECC) || !defined(NO_DSA) || \
defined(OPENSSL_EXTRA) || !defined(NO_DH) || \
- (!defined(NO_RSA) && !defined(WOLFSSL_RSA_VERIFY_ONLY))
+ (!defined(NO_RSA) && (!defined(WOLFSSL_RSA_VERIFY_ONLY) || \
+ defined(WOLFSSL_KEY_GEN)))
/* Compare two multi-precision numbers.
*
* Assumes a and b are not NULL.
@@ -7031,7 +7040,7 @@ int sp_mod_d(const sp_int* a, sp_int_digit d, sp_int_digit* r)
#if defined(HAVE_ECC) || !defined(NO_DSA) || defined(OPENSSL_EXTRA) || \
(!defined(NO_RSA) && !defined(WOLFSSL_RSA_VERIFY_ONLY) && \
- !defined(WOLFSSL_RSA_PUBLIC_ONLY))
+ !defined(WOLFSSL_RSA_PUBLIC_ONLY)) || defined(WOLFSSL_SP_INVMOD)
/* Divides a by 2 and stores in r: r = a >> 1
*
* @param [in] a SP integer to divide.
@@ -17135,18 +17144,21 @@ static int _sp_mont_red(sp_int* a, const sp_int* m, sp_int_digit mp, int ct)
bits = sp_count_bits(m);
/* Adding numbers into m->used * 2 digits - zero out unused digits. */
- if (!ct) {
- for (i = a->used; i < m->used * 2; i++) {
- a->dp[i] = 0;
- }
- }
- else {
+#ifndef WOLFSSL_NO_CT_OPS
+ if (ct) {
for (i = 0; i < m->used * 2; i++) {
a->dp[i] &=
(sp_int_digit)
(sp_int_sdigit)ctMaskIntGTE((int)(a->used-1), (int)i);
}
}
+ else
+#endif /* !WOLFSSL_NO_CT_OPS */
+ {
+ for (i = a->used; i < m->used * 2; i++) {
+ a->dp[i] = 0;
+ }
+ }
/* Special case when modulus is 1 digit or less. */
if (m->used <= 1) {
@@ -17260,18 +17272,21 @@ static int _sp_mont_red(sp_int* a, const sp_int* m, sp_int_digit mp, int ct)
bits = sp_count_bits(m);
mask = ((sp_int_digit)1 << (bits & (SP_WORD_SIZE - 1))) - 1;
- if (!ct) {
- for (i = a->used; i < m->used * 2; i++) {
- a->dp[i] = 0;
- }
- }
- else {
+#ifndef WOLFSSL_NO_CT_OPS
+ if (ct) {
for (i = 0; i < m->used * 2; i++) {
a->dp[i] &=
(sp_int_digit)
(sp_int_sdigit)ctMaskIntGTE((int)(a->used-1), (int)i);
}
}
+ else
+#endif
+ {
+ for (i = a->used; i < m->used * 2; i++) {
+ a->dp[i] = 0;
+ }
+ }
if (m->used <= 1) {
sp_int_digit l;
@@ -18061,6 +18076,8 @@ static int _sp_read_radix_16(sp_int* a, const char* in)
unsigned int s = 0;
unsigned int j = 0;
sp_int_digit d;
+ /* Skip whitespace at end of line */
+ int eol_done = 0;
/* Make all nibbles in digit 0. */
d = 0;
@@ -18071,9 +18088,12 @@ static int _sp_read_radix_16(sp_int* a, const char* in)
int ch = (int)HexCharToByte(in[i]);
/* Check for invalid character. */
if (ch < 0) {
+ if (!eol_done && CharIsWhiteSpace(in[i]))
+ continue;
err = MP_VAL;
break;
}
+ eol_done = 1;
/* Check whether we have filled the digit. */
if (s == SP_WORD_SIZE) {
@@ -18143,6 +18163,8 @@ static int _sp_read_radix_10(sp_int* a, const char* in)
ch -= '0';
}
else {
+ if (CharIsWhiteSpace(ch))
+ continue;
/* Return error on invalid character. */
err = MP_VAL;
break;
@@ -19422,7 +19444,7 @@ int sp_gcd(const sp_int* a, const sp_int* b, sp_int* r)
return err;
}
-#endif /* WOLFSSL_SP_MATH_ALL && !NO_RSA && WOLFSSL_KEY_GEN */
+#endif /* !NO_RSA && WOLFSSL_KEY_GEN */
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
(!defined(WC_RSA_BLINDING) || defined(HAVE_FIPS) || defined(HAVE_SELFTEST))
@@ -19548,7 +19570,8 @@ int sp_lcm(const sp_int* a, const sp_int* b, sp_int* r)
return err;
}
-#endif /* WOLFSSL_SP_MATH_ALL && !NO_RSA && WOLFSSL_KEY_GEN */
+#endif /* !NO_RSA && WOLFSSL_KEY_GEN && (!WC_RSA_BLINDING || HAVE_FIPS ||
+ * HAVE_SELFTEST) */
/* Returns the run time settings.
*
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_x86_64.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_x86_64.c
index 990a999c..b57f5a3a 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sp_x86_64.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sp_x86_64.c
@@ -10979,8 +10979,10 @@ static THREAD_LS_T int sp_cache_256_last = -1;
static THREAD_LS_T int sp_cache_256_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_256 = 0;
- static wolfSSL_Mutex sp_cache_256_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_256_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_256_lock);
#endif
/* Get the cache entry for the point.
@@ -11078,10 +11080,12 @@ static int sp_256_ecc_mulmod_4(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -11459,10 +11463,12 @@ static int sp_256_ecc_mulmod_avx2_4(sp_point_256* r, const sp_point_256* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_256 == 0) {
wc_InitMutex(&sp_cache_256_lock);
initCacheMutex_256 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_256_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -30167,8 +30173,10 @@ static THREAD_LS_T int sp_cache_384_last = -1;
static THREAD_LS_T int sp_cache_384_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_384 = 0;
- static wolfSSL_Mutex sp_cache_384_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_384_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_384_lock);
#endif
/* Get the cache entry for the point.
@@ -30266,10 +30274,12 @@ static int sp_384_ecc_mulmod_6(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -30650,10 +30660,12 @@ static int sp_384_ecc_mulmod_avx2_6(sp_point_384* r, const sp_point_384* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_384 == 0) {
wc_InitMutex(&sp_cache_384_lock);
initCacheMutex_384 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_384_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -55045,8 +55057,10 @@ static THREAD_LS_T int sp_cache_521_last = -1;
static THREAD_LS_T int sp_cache_521_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_521 = 0;
- static wolfSSL_Mutex sp_cache_521_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_521_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_521_lock);
#endif
/* Get the cache entry for the point.
@@ -55144,10 +55158,12 @@ static int sp_521_ecc_mulmod_9(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -55528,10 +55544,12 @@ static int sp_521_ecc_mulmod_avx2_9(sp_point_521* r, const sp_point_521* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_521 == 0) {
wc_InitMutex(&sp_cache_521_lock);
initCacheMutex_521 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_521_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -96245,8 +96263,10 @@ static THREAD_LS_T int sp_cache_1024_last = -1;
static THREAD_LS_T int sp_cache_1024_inited = 0;
#ifndef HAVE_THREAD_LS
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
static volatile int initCacheMutex_1024 = 0;
- static wolfSSL_Mutex sp_cache_1024_lock;
+ #endif
+ static wolfSSL_Mutex sp_cache_1024_lock WOLFSSL_MUTEX_INITIALIZER_CLAUSE(sp_cache_1024_lock);
#endif
/* Get the cache entry for the point.
@@ -96344,10 +96364,12 @@ static int sp_1024_ecc_mulmod_16(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
@@ -96711,10 +96733,12 @@ static int sp_1024_ecc_mulmod_avx2_16(sp_point_1024* r, const sp_point_1024* g,
#endif
#ifndef HAVE_THREAD_LS
if (err == MP_OKAY) {
+ #ifndef WOLFSSL_MUTEX_INITIALIZER
if (initCacheMutex_1024 == 0) {
wc_InitMutex(&sp_cache_1024_lock);
initCacheMutex_1024 = 1;
}
+ #endif
if (wc_LockMutex(&sp_cache_1024_lock) != 0) {
err = BAD_MUTEX_E;
}
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/sphincs.c b/extra/wolfssl/wolfssl/wolfcrypt/src/sphincs.c
index 65bb57a9..a0196ce3 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/sphincs.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/sphincs.c
@@ -58,7 +58,7 @@
* 0 otherwise.
*/
int wc_sphincs_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen,
- sphincs_key* key)
+ sphincs_key* key, WC_RNG* rng)
{
int ret = 0;
#ifdef HAVE_LIBOQS
@@ -135,6 +135,10 @@ int wc_sphincs_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen,
localOutLen = *outLen;
}
+ if (ret == 0) {
+ ret = wolfSSL_liboqsRngMutexLock(rng);
+ }
+
if ((ret == 0) &&
(OQS_SIG_sign(oqssig, out, &localOutLen, in, inLen, key->k)
== OQS_ERROR)) {
@@ -145,6 +149,8 @@ int wc_sphincs_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen,
*outLen = (word32)localOutLen;
}
+ wolfSSL_liboqsRngMutexUnlock();
+
if (oqssig != NULL) {
OQS_SIG_free(oqssig);
}
@@ -237,7 +243,7 @@ int wc_sphincs_init(sphincs_key* key)
return BAD_FUNC_ARG;
}
- ForceZero(key, sizeof(key));
+ ForceZero(key, sizeof(*key));
return 0;
}
@@ -302,7 +308,7 @@ int wc_sphincs_get_level_and_optim(sphincs_key* key, byte* level, byte* optim)
void wc_sphincs_free(sphincs_key* key)
{
if (key != NULL) {
- ForceZero(key, sizeof(key));
+ ForceZero(key, sizeof(*key));
}
}
@@ -851,7 +857,7 @@ int wc_Sphincs_PrivateKeyDecode(const byte* input, word32* inOutIdx,
else if ((key->level == 5) && (key->optim == FAST_VARIANT)) {
keytype = SPHINCS_FAST_LEVEL5k;
}
- if ((key->level == 1) && (key->optim == SMALL_VARIANT)) {
+ else if ((key->level == 1) && (key->optim == SMALL_VARIANT)) {
keytype = SPHINCS_SMALL_LEVEL1k;
}
else if ((key->level == 3) && (key->optim == SMALL_VARIANT)) {
@@ -890,6 +896,11 @@ int wc_Sphincs_PublicKeyDecode(const byte* input, word32* inOutIdx,
return BAD_FUNC_ARG;
}
+ ret = wc_sphincs_import_public(input, inSz, key);
+ if (ret == 0) {
+ return 0;
+ }
+
if ((key->level == 1) && (key->optim == FAST_VARIANT)) {
keytype = SPHINCS_FAST_LEVEL1k;
}
@@ -899,7 +910,7 @@ int wc_Sphincs_PublicKeyDecode(const byte* input, word32* inOutIdx,
else if ((key->level == 5) && (key->optim == FAST_VARIANT)) {
keytype = SPHINCS_FAST_LEVEL5k;
}
- if ((key->level == 1) && (key->optim == SMALL_VARIANT)) {
+ else if ((key->level == 1) && (key->optim == SMALL_VARIANT)) {
keytype = SPHINCS_SMALL_LEVEL1k;
}
else if ((key->level == 3) && (key->optim == SMALL_VARIANT)) {
@@ -954,7 +965,7 @@ int wc_Sphincs_PublicKeyToDer(sphincs_key* key, byte* output, word32 inLen,
else if ((key->level == 5) && (key->optim == FAST_VARIANT)) {
keytype = SPHINCS_FAST_LEVEL5k;
}
- if ((key->level == 1) && (key->optim == SMALL_VARIANT)) {
+ else if ((key->level == 1) && (key->optim == SMALL_VARIANT)) {
keytype = SPHINCS_SMALL_LEVEL1k;
}
else if ((key->level == 3) && (key->optim == SMALL_VARIANT)) {
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/tfm.c b/extra/wolfssl/wolfssl/wolfcrypt/src/tfm.c
index 1b07f5d5..07cd1fed 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/tfm.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/tfm.c
@@ -1104,9 +1104,9 @@ void fp_mod_2d(fp_int *a, int b, fp_int *c)
bmax = ((unsigned int)b + DIGIT_BIT - 1) / DIGIT_BIT;
- /* If a is negative and bmax is larger than FP_SIZE, then the
+ /* If a is negative and bmax is greater than or equal to FP_SIZE, then the
* result can't fit within c. Just return. */
- if (c->sign == FP_NEG && bmax > FP_SIZE) {
+ if (c->sign == FP_NEG && bmax >= FP_SIZE) {
return;
}
@@ -4589,10 +4589,11 @@ void fp_clear(fp_int *a)
void fp_forcezero (mp_int * a)
{
+ int size;
+
if (a == NULL)
return;
- int size;
a->used = 0;
a->sign = FP_ZPOS;
#if defined(ALT_ECC_SIZE) || defined(HAVE_WOLF_BIGINT)
@@ -5945,6 +5946,8 @@ static int fp_read_radix_16(fp_int *a, const char *str)
{
int i, j, k, neg;
int ch;
+ /* Skip whitespace at end of line */
+ int eol_done = 0;
/* if the leading digit is a
* minus set the sign to negative.
@@ -5961,8 +5964,11 @@ static int fp_read_radix_16(fp_int *a, const char *str)
for (i = (int)(XSTRLEN(str) - 1); i >= 0; i--) {
ch = (int)HexCharToByte(str[i]);
if (ch < 0) {
+ if (!eol_done && CharIsWhiteSpace(str[i]))
+ continue;
return FP_VAL;
}
+ eol_done = 1;
k += j == DIGIT_BIT;
j &= DIGIT_BIT - 1;
@@ -6024,7 +6030,13 @@ static int fp_read_radix(fp_int *a, const char *str, int radix)
}
}
if (y >= radix) {
- return FP_VAL;
+ /* Check if whitespace at end of line */
+ while (CharIsWhiteSpace(*str))
+ ++str;
+ if (*str)
+ return FP_VAL;
+ else
+ break;
}
/* if the char was found in the map
@@ -6080,14 +6092,14 @@ int mp_montgomery_setup(fp_int *a, fp_digit *rho)
#endif /* HAVE_ECC || (!NO_RSA && WC_RSA_BLINDING) */
-#ifdef HAVE_ECC
-
/* fast math conversion */
int mp_sqr(fp_int *A, fp_int *B)
{
return fp_sqr(A, B);
}
+#ifdef HAVE_ECC
+
/* fast math conversion */
int mp_div_2(fp_int * a, fp_int * b)
{
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_dsp.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_dsp.c
index 95dfed64..c31c62b1 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_dsp.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_dsp.c
@@ -38,7 +38,7 @@
#include "rpcmem.h"
static wolfSSL_DSP_Handle_cb handle_function = NULL;
static remote_handle64 defaultHandle;
-static wolfSSL_Mutex handle_mutex; /* mutex for access to single default handle */
+static wolfSSL_Mutex handle_mutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(handle_mutex); /* mutex for access to single default handle */
#define WOLFSSL_HANDLE_DONE 1
#define WOLFSSL_HANDLE_GET 0
@@ -95,11 +95,13 @@ int wolfSSL_InitHandle()
return -1;
}
wolfSSL_SetHandleCb(default_handle_cb);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
ret = wc_InitMutex(&handle_mutex);
if (ret != 0) {
WOLFSSL_MSG("Unable to init handle mutex");
return -1;
}
+#endif
return 0;
}
@@ -108,7 +110,9 @@ int wolfSSL_InitHandle()
void wolfSSL_CleanupHandle()
{
wolfSSL_close(defaultHandle);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
wc_FreeMutex(&handle_mutex);
+#endif
}
#if defined(WOLFSSL_HAVE_SP_ECC)
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber.c
index 8d516c89..b0b358f0 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber.c
@@ -1,6 +1,6 @@
/* wc_kyber.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -19,8 +19,1249 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
+/* Implementation based on NIST 3rd Round submission package.
+ * See link at:
+ * https://csrc.nist.gov/Projects/post-quantum-cryptography/post-quantum-cryptography-standardization/round-3-submissions
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
+
#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/kyber.h>
+#include <wolfssl/wolfcrypt/wc_kyber.h>
+#include <wolfssl/wolfcrypt/error-crypt.h>
+#include <wolfssl/wolfcrypt/hash.h>
+#include <wolfssl/wolfcrypt/memory.h>
+
+#ifdef NO_INLINE
+ #include <wolfssl/wolfcrypt/misc.h>
+#else
+ #define WOLFSSL_MISC_INCLUDED
+ #include <wolfcrypt/src/misc.c>
+#endif
+
+#ifdef WOLFSSL_WC_KYBER
+
+/******************************************************************************/
+
+/* Use SHA3-256 to generate 32-bytes of hash. */
+#define KYBER_HASH_H wc_Sha3_256Hash
+/* Use SHA3-512 to generate 64-bytes of hash. */
+#define KYBER_HASH_G wc_Sha3_512Hash
+/* Use SHAKE-256 as a key derivation function (KDF). */
+#ifdef USE_INTEL_SPEEDUP
+#define KYBER_KDF kyber_kdf
+#else
+#define KYBER_KDF wc_Shake256Hash
+#endif
+
+/******************************************************************************/
+
+/**
+ * Initialize the Kyber key.
+ *
+ * @param [in] type Type of key: KYBER512, KYBER768, KYBER1024.
+ * @param [out] key Kyber key object to initialize.
+ * @param [in] heap Dynamic memory hint.
+ * @param [in] devId Device Id.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key is NULL or type is unrecognized.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+int wc_KyberKey_Init(int type, KyberKey* key, void* heap, int devId)
+{
+ int ret = 0;
+
+ /* Validate key. */
+ if (key == NULL) {
+ ret = BAD_FUNC_ARG;
+ }
+ if (ret == 0) {
+ /* Validate type. */
+ switch (type) {
+ case KYBER512:
+ #ifndef WOLFSSL_KYBER512
+ /* Code not compiled in for Kyber-512. */
+ ret = NOT_COMPILED_IN;
+ #endif
+ break;
+ case KYBER768:
+ #ifndef WOLFSSL_KYBER768
+ /* Code not compiled in for Kyber-768. */
+ ret = NOT_COMPILED_IN;
+ #endif
+ break;
+ case KYBER1024:
+ #ifndef WOLFSSL_KYBER1024
+ /* Code not compiled in for Kyber-1024. */
+ ret = NOT_COMPILED_IN;
+ #endif
+ break;
+ default:
+ /* No other values supported. */
+ ret = BAD_FUNC_ARG;
+ break;
+ }
+ }
+ if (ret == 0) {
+ /* Zero out all data. */
+ XMEMSET(key, 0, sizeof(*key));
+
+ /* Keep type for parameters. */
+ key->type = type;
+ /* Cache heap pointer. */
+ key->heap = heap;
+ #ifdef WOLF_CRYPTO_CB
+ /* Cache device id - not used in for this algorithm yet. */
+ key->devId = devId;
+ #endif
+
+ /* Initialize the PRF algorithm object. */
+ ret = kyber_prf_new(&key->prf, heap, devId);
+ }
+ if (ret == 0) {
+ kyber_init();
+ }
+
+ (void)devId;
+
+ return ret;
+}
+
+/**
+ * Free the Kyber key object.
+ *
+ * @param [in, out] key Kyber key object to dispose of.
+ */
+void wc_KyberKey_Free(KyberKey* key)
+{
+ if (key != NULL) {
+ /* Dispose of PRF object. */
+ kyber_prf_free(&key->prf);
+ /* Ensure all private data is zeroed. */
+ ForceZero(key, sizeof(*key));
+ }
+}
+
+/******************************************************************************/
+
+/**
+ * Make a Kyber key object using a random number generator.
+ *
+ * @param [in, out] key Kyber key object.
+ * @param [in] rng Random number generator.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or rng is NULL.
+ * @return MEMORY_E when dynamic memory allocation failed.
+ */
+int wc_KyberKey_MakeKey(KyberKey* key, WC_RNG* rng)
+{
+ int ret = 0;
+ unsigned char rand[KYBER_MAKEKEY_RAND_SZ];
+
+ /* Validate parameters. */
+ if ((key == NULL) || (rng == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Generate random to with PRFs. */
+ ret = wc_RNG_GenerateBlock(rng, rand, KYBER_SYM_SZ);
+ }
+ if (ret == 0) {
+ /* Generate random to with PRFs. */
+ ret = wc_RNG_GenerateBlock(rng, rand + KYBER_SYM_SZ, KYBER_SYM_SZ);
+ }
+ if (ret == 0) {
+ /* Make a key pair from the random. */
+ ret = wc_KyberKey_MakeKeyWithRandom(key, rand, sizeof(rand));
+ }
+
+ /* Ensure seeds are zeroized. */
+ ForceZero((void*)rand, (word32)sizeof(rand));
+
+ return ret;
+}
+
+/**
+ * Make a Kyber key object using random data.
+ *
+ * @param [in, out] key Kyber key ovject.
+ * @param [in] rng Random number generator.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or rand is NULL.
+ * @return BUFFER_E when length is not KYBER_MAKEKEY_RAND_SZ.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return MEMORY_E when dynamic memory allocation failed.
+ */
+int wc_KyberKey_MakeKeyWithRandom(KyberKey* key, const unsigned char* rand,
+ int len)
+{
+ byte buf[2 * KYBER_SYM_SZ + 1];
+ byte* pubSeed = buf;
+ byte* noiseSeed = buf + KYBER_SYM_SZ;
+ sword16* a = NULL;
+ sword16* e;
+ int ret = 0;
+ int kp = 0;
+
+ /* Validate parameters. */
+ if ((key == NULL) || (rand == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+ if ((ret == 0) && (len != KYBER_MAKEKEY_RAND_SZ)) {
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0) {
+ /* Establish parameters based on key type. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ kp = KYBER512_K;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ kp = KYBER768_K;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ kp = KYBER1024_K;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+
+ if (ret == 0) {
+ /* Allocate dynamic memory for matrix and error vector. */
+ a = (sword16*)XMALLOC((kp + 1) * kp * KYBER_N * sizeof(sword16),
+ key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ if (a == NULL) {
+ ret = MEMORY_E;
+ }
+ }
+ if (ret == 0) {
+ /* Error vector allocated at end of a. */
+ e = a + (kp * kp * KYBER_N);
+
+ /* Expand 16 bytes of random to 32. */
+ ret = KYBER_HASH_G(rand, KYBER_SYM_SZ, buf);
+ }
+ if (ret == 0) {
+ /* Cache the public seed for use in encapsulation and encoding public
+ * key. */
+ XMEMCPY(key->pubSeed, pubSeed, KYBER_SYM_SZ);
+ /* Cache the z value for decapsulation and encoding private key. */
+ XMEMCPY(key->z, rand + KYBER_SYM_SZ, sizeof(key->z));
+
+ /* Generate the matrix A. */
+ ret = kyber_gen_matrix(&key->prf, a, kp, pubSeed, 0);
+ }
+
+ if (ret == 0) {
+ /* Initialize PRF for use in noise generation. */
+ kyber_prf_init(&key->prf);
+ /* Generate noise using PRF. */
+ ret = kyber_get_noise(&key->prf, kp, key->priv, e, NULL, noiseSeed);
+ }
+ if (ret == 0) {
+ /* Generate key pair from random data. */
+ kyber_keygen(key->priv, key->pub, e, a, kp);
+
+ /* Private and public key are set/available. */
+ key->flags |= KYBER_FLAG_PRIV_SET | KYBER_FLAG_PUB_SET;
+ }
+
+ /* Free dynamic memory allocated in function. */
+ XFREE(a, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+
+ return ret;
+}
+
+/******************************************************************************/
+
+/**
+ * Get the size in bytes of cipher text for key.
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] len Length of cipher text in bytes.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or len is NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+int wc_KyberKey_CipherTextSize(KyberKey* key, word32* len)
+{
+ int ret = 0;
+
+ /* Validate parameters. */
+ if ((key == NULL) || (len == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Return in 'len' size of the cipher text for the type of this key. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ *len = KYBER512_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ *len = KYBER768_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ *len = KYBER1024_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Size of a shared secret in bytes. Always KYBER_SS_SZ.
+ *
+ * @param [in] key Kyber key object. Not used.
+ * @param [out] Size of the shared secret created with a Kyber key.
+ * @return 0 on success.
+ * @return 0 to indicate success.
+ */
+int wc_KyberKey_SharedSecretSize(KyberKey* key, word32* len)
+{
+ (void)key;
+
+ *len = KYBER_SS_SZ;
+
+ return 0;
+}
+
+/* Encapsulate data and derive secret.
+ *
+ * @param [in] key Kyber key object.
+ * @param [in] msg Message to encapsulate.
+ * @param [in] coins Coins (seed) to feed to PRF.
+ * @param [in] ct Calculated cipher text.
+ * @return 0 on success.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+static int kyberkey_encapsulate(KyberKey* key, const byte* msg, byte* coins,
+ unsigned char* ct)
+{
+ int ret = 0;
+ sword16* sp;
+ sword16* ep;
+ sword16* k;
+ sword16* epp;
+ unsigned int kp;
+ unsigned int compVecSz;
+#ifndef USE_INTEL_SPEEDUP
+ sword16* at = NULL;
+#else
+ sword16 at[((KYBER_MAX_K + 3) * KYBER_MAX_K + 3) * KYBER_N];
+#endif
+
+ /* Establish parameters based on key type. */
+ switch (key->type) {
+#ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ kp = KYBER512_K;
+ compVecSz = KYBER512_POLY_VEC_COMPRESSED_SZ;
+ break;
+#endif
+#ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ kp = KYBER768_K;
+ compVecSz = KYBER768_POLY_VEC_COMPRESSED_SZ;
+ break;
+#endif
+#ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ kp = KYBER1024_K;
+ compVecSz = KYBER1024_POLY_VEC_COMPRESSED_SZ;
+ break;
+#endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+
+#ifndef USE_INTEL_SPEEDUP
+ if (ret == 0) {
+ /* Allocate dynamic memory for all matrices, vectors and polynomials. */
+ at = (sword16*)XMALLOC(((kp + 3) * kp + 3) * KYBER_N * sizeof(sword16),
+ key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ if (at == NULL) {
+ ret = MEMORY_E;
+ }
+ }
+#endif
+
+ if (ret == 0) {
+ /* Assign allocated dynamic memory to pointers.
+ * at (m) | k (p) | sp (v) | sp (v) | epp (v) | bp (p) | v (v) */
+ k = at + KYBER_N * kp * kp;
+ sp = k + KYBER_N;
+ ep = sp + KYBER_N * kp;
+ epp = ep + KYBER_N * kp;
+
+ /* Convert msg to a polynomial. */
+ kyber_from_msg(k, msg);
-#ifdef WOLFSSL_HAVE_KYBER
- #error "Contact wolfSSL to get the implementation of this file"
+ /* Generate the transposed matrix. */
+ ret = kyber_gen_matrix(&key->prf, at, kp, key->pubSeed, 1);
+ }
+ if (ret == 0) {
+ /* Initialize the PRF for use in the noise generation. */
+ kyber_prf_init(&key->prf);
+ /* Generate noise using PRF. */
+ ret = kyber_get_noise(&key->prf, kp, sp, ep, epp, coins);
+ }
+ if (ret == 0) {
+ sword16* bp;
+ sword16* v;
+
+ /* Assign remaining allocated dynamic memory to pointers.
+ * at (m) | k (p) | sp (v) | sp (v) | epp (v) | bp (p) | v (v)*/
+ bp = epp + KYBER_N;
+ v = bp + KYBER_N * kp;
+
+ /* Perform encapsulation maths. */
+ kyber_encapsulate(key->pub, bp, v, at, sp, ep, epp, k, kp);
+
+ #ifdef WOLFSSL_KYBER512
+ if (kp == KYBER512_K) {
+ kyber_vec_compress_10(ct, bp, kp);
+ kyber_compress_4(ct + compVecSz, v);
+ }
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ if (kp == KYBER768_K) {
+ kyber_vec_compress_10(ct, bp, kp);
+ kyber_compress_4(ct + compVecSz, v);
+ }
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ if (kp == KYBER1024_K) {
+ kyber_vec_compress_11(ct, bp);
+ kyber_compress_5(ct + compVecSz, v);
+ }
+ #endif
+ }
+
+#ifndef USE_INTEL_SPEEDUP
+ /* Dispose of dynamic memory allocated in function. */
+ XFREE(at, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
#endif
+
+ return ret;
+}
+
+/**
+ * Encapsulate with random number generator and derive secret.
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] ct Cipher text.
+ * @param [out] ss Shared secret generated.
+ * @param [in] rng Random number generator.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key, ct, ss or RNG is NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return MEMORY_E when dynamic memory allocation failed.
+ */
+int wc_KyberKey_Encapsulate(KyberKey* key, unsigned char* ct, unsigned char* ss,
+ WC_RNG* rng)
+{
+ int ret = 0;
+ unsigned char rand[KYBER_ENC_RAND_SZ];
+
+ /* Validate parameters. */
+ if ((key == NULL) || (ct == NULL) || (ss == NULL) || (rng == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Generate seed for use with PRFs. */
+ ret = wc_RNG_GenerateBlock(rng, rand, sizeof(rand));
+ }
+ if (ret == 0) {
+ /* Encapsulate with the random. */
+ ret = wc_KyberKey_EncapsulateWithRandom(key, ct, ss, rand,
+ sizeof(rand));
+ }
+
+ return ret;
+}
+
+/**
+ * Encapsulate with random data and derive secret.
+ *
+ * @param [out] ct Cipher text.
+ * @param [out] ss Shared secret generated.
+ * @param [in] rand Random data.
+ * @param [in] len Random data.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key, ct, ss or RNG is NULL.
+ * @return BUFFER_E when len is not KYBER_ENC_RAND_SZ.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return MEMORY_E when dynamic memory allocation failed.
+ */
+int wc_KyberKey_EncapsulateWithRandom(KyberKey* key, unsigned char* ct,
+ unsigned char* ss, const unsigned char* rand, int len)
+{
+ byte msg[2 * KYBER_SYM_SZ];
+ byte kr[2 * KYBER_SYM_SZ + 1];
+ int ret = 0;
+ unsigned int ctSz;
+
+ /* Validate parameters. */
+ if ((key == NULL) || (ct == NULL) || (ss == NULL) || (rand == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+ if ((ret == 0) && (len != KYBER_ENC_RAND_SZ)) {
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0) {
+ /* Establish parameters based on key type. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ ctSz = KYBER512_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ ctSz = KYBER768_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ ctSz = KYBER1024_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+
+ /* If public hash (h) is not stored against key, calculate it. */
+ if ((ret == 0) && ((key->flags & KYBER_FLAG_H_SET) == 0)) {
+ byte* pubKey = NULL;
+ word32 pubKeyLen;
+
+ /* Determine how big an encoded public key will be. */
+ ret = wc_KyberKey_PublicKeySize(key, &pubKeyLen);
+ if (ret == 0) {
+ /* Allocate dynamic memory for encoded public key. */
+ pubKey = (byte*)XMALLOC(pubKeyLen, key->heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (pubKey == NULL) {
+ ret = MEMORY_E;
+ }
+ }
+ if (ret == 0) {
+ /* Encode public key - h is hash of encoded public key. */
+ ret = wc_KyberKey_EncodePublicKey(key, pubKey, pubKeyLen);
+ }
+ /* Dispose of encoded public key. */
+ XFREE(pubKey, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ }
+ if ((ret == 0) && ((key->flags & KYBER_FLAG_H_SET) == 0)) {
+ /* Implementation issue if h not cached and flag set. */
+ ret = BAD_STATE_E;
+ }
+
+ if (ret == 0) {
+ /* Hash random to anonymize as seed data. */
+ ret = KYBER_HASH_H(rand, KYBER_SYM_SZ, msg);
+ }
+ if (ret == 0) {
+ /* Copy the hash of the public key into msg. */
+ XMEMCPY(msg + KYBER_SYM_SZ, key->h, KYBER_SYM_SZ);
+
+ /* Hash message into seed buffer. */
+ ret = KYBER_HASH_G(msg, 2 * KYBER_SYM_SZ, kr);
+ }
+
+ if (ret == 0) {
+ /* Encapsulate the message using the key and the seed (coins). */
+ ret = kyberkey_encapsulate(key, msg, kr + KYBER_SYM_SZ, ct);
+ }
+
+ if (ret == 0) {
+ /* Hash the cipher text after the seed. */
+ ret = KYBER_HASH_H(ct, ctSz, kr + KYBER_SYM_SZ);
+ }
+ if (ret == 0) {
+ /* Derive the secret from the seed and hash of cipher text. */
+ ret = KYBER_KDF(kr, 2 * KYBER_SYM_SZ, ss, KYBER_SS_SZ);
+ }
+
+ return ret;
+}
+
+/******************************************************************************/
+
+/* Decapsulate cipher text to the message using key.
+ *
+ * @param [in] Kyber key object.
+ * @param [out] Message than was encapsulated.
+ * @param [in] Cipher text.
+ * @return 0 on success.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return MEMORY_E when dynamic memory allocation failed.
+ */
+static KYBER_NOINLINE int kyberkey_decapsulate(KyberKey* key,
+ unsigned char* msg, const unsigned char* ct)
+{
+ int ret = 0;
+ sword16* v;
+ sword16* mp;
+ unsigned int kp;
+ unsigned int compVecSz;
+#ifndef USE_INTEL_SPEEDUP
+ sword16* bp = NULL;
+#else
+ sword16 bp[(KYBER_MAX_K + 2) * KYBER_N];
+#endif
+
+ /* Establish parameters based on key type. */
+ switch (key->type) {
+#ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ kp = KYBER512_K;
+ compVecSz = KYBER512_POLY_VEC_COMPRESSED_SZ;
+ break;
+#endif
+#ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ kp = KYBER768_K;
+ compVecSz = KYBER768_POLY_VEC_COMPRESSED_SZ;
+ break;
+#endif
+#ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ kp = KYBER1024_K;
+ compVecSz = KYBER1024_POLY_VEC_COMPRESSED_SZ;
+ break;
+#endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+
+#ifndef USE_INTEL_SPEEDUP
+ if (ret == 0) {
+ /* Allocate dynamic memory for a vector and two polynomials. */
+ bp = (sword16*)XMALLOC((kp + 2) * KYBER_N * sizeof(sword16), key->heap,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (bp == NULL) {
+ ret = MEMORY_E;
+ }
+ }
+#endif
+ if (ret == 0) {
+ /* Assign allocated dynamic memory to pointers.
+ * bp (v) | v (p) | mp (p) */
+ v = bp + kp * KYBER_N;
+ mp = v + KYBER_N;
+
+ #ifdef WOLFSSL_KYBER512
+ if (kp == KYBER512_K) {
+ kyber_vec_decompress_10(bp, ct, kp);
+ kyber_decompress_4(v, ct + compVecSz);
+ }
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ if (kp == KYBER768_K) {
+ kyber_vec_decompress_10(bp, ct, kp);
+ kyber_decompress_4(v, ct + compVecSz);
+ }
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ if (kp == KYBER1024_K) {
+ kyber_vec_decompress_11(bp, ct);
+ kyber_decompress_5(v, ct + compVecSz);
+ }
+ #endif
+
+ /* Decapsulate the cipher text into polynomial. */
+ kyber_decapsulate(key->priv, mp, bp, v, kp);
+
+ /* Convert the polynomial into a array of bytes (message). */
+ kyber_to_msg(msg, mp);
+ }
+
+#ifndef USE_INTEL_SPEEDUP
+ /* Dispose of dynamically memory allocated in function. */
+ XFREE(bp, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
+ return ret;
+}
+
+/**
+ * Decapsulate the cipher text to calculate the shared secret.
+ *
+ * Validates the cipher text by encapsulating and comparing with data passed in.
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] ss Shared secret.
+ * @param [in] ct Cipher text.
+ * @param [in] len Length of cipher text.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key, ss or cr are NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return BUFFER_E when len is not the length of cipher text for the key type.
+ * @return MEMORY_E when dynamic memory allocation failed.
+ */
+int wc_KyberKey_Decapsulate(KyberKey* key, unsigned char* ss,
+ const unsigned char* ct, word32 len)
+{
+ byte msg[2 * KYBER_SYM_SZ];
+ byte kr[2 * KYBER_SYM_SZ + 1];
+ int ret = 0;
+ unsigned int ctSz;
+ unsigned int i;
+ int fail;
+#ifndef USE_INTEL_SPEEDUP
+ byte* cmp = NULL;
+#else
+ byte cmp[KYBER_MAX_CIPHER_TEXT_SIZE];
+#endif
+
+ /* Validate parameters. */
+ if ((key == NULL) || (ss == NULL) || (ct == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Establish cipher text size based on key type. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ ctSz = KYBER512_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ ctSz = KYBER768_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ ctSz = KYBER1024_CIPHER_TEXT_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+
+ /* Ensure the cipher text passed in is the correct size. */
+ if ((ret == 0) && (len != ctSz)) {
+ ret = BUFFER_E;
+ }
+
+#ifndef USE_INTEL_SPEEDUP
+ if (ret == 0) {
+ /* Allocate memory for cipher text that is generated. */
+ cmp = (byte*)XMALLOC(ctSz, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+ if (cmp == NULL) {
+ ret = MEMORY_E;
+ }
+ }
+#endif
+
+ if (ret == 0) {
+ /* Decapsulate the cipher text. */
+ ret = kyberkey_decapsulate(key, msg, ct);
+ }
+ if (ret == 0) {
+ /* Copy public hash over after the seed. */
+ XMEMCPY(msg + KYBER_SYM_SZ, key->h, KYBER_SYM_SZ);
+ /* Hash message into seed buffer. */
+ ret = KYBER_HASH_G(msg, 2 * KYBER_SYM_SZ, kr);
+ }
+ if (ret == 0) {
+ /* Encapsulate the message. */
+ ret = kyberkey_encapsulate(key, msg, kr + KYBER_SYM_SZ, cmp);
+ }
+ if (ret == 0) {
+ /* Compare generated cipher text with that passed in. */
+ fail = kyber_cmp(ct, cmp, ctSz);
+
+ /* Hash the cipher text after the seed. */
+ ret = KYBER_HASH_H(ct, ctSz, kr + KYBER_SYM_SZ);
+ }
+ if (ret == 0) {
+ /* Change seed to z on comparison failure. */
+ for (i = 0; i < KYBER_SYM_SZ; i++) {
+ kr[i] ^= (kr[i] ^ key->z[i]) & fail;
+ }
+
+ /* Derive the secret from the seed and hash of cipher text. */
+ ret = KYBER_KDF(kr, 2 * KYBER_SYM_SZ, ss, KYBER_SS_SZ);
+ }
+
+#ifndef USE_INTEL_SPEEDUP
+ /* Dispose of dynamic memory allocated in function. */
+ XFREE(cmp, key->heap, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
+ return ret;
+}
+
+/******************************************************************************/
+
+/**
+ * Decode the private key.
+ *
+ * Private Vector | Public Key | Public Hash | Randomizer
+ *
+ * @param [in, out] key Kyber key object.
+ * @param [in] in Buffer holding encoded key.
+ * @param [in] len Length of data in buffer.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or in is NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return BUFFER_E when len is not the correct size.
+ */
+int wc_KyberKey_DecodePrivateKey(KyberKey* key, unsigned char* in, word32 len)
+{
+ int ret = 0;
+ word32 privLen = 0;
+ word32 pubLen = 0;
+ unsigned int k = 0;
+ unsigned char* p = in;
+
+ /* Validate parameters. */
+ if ((key == NULL) || (in == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Establish parameters based on key type. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ k = KYBER512_K;
+ privLen = KYBER512_PRIVATE_KEY_SIZE;
+ pubLen = KYBER512_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ k = KYBER768_K;
+ privLen = KYBER768_PRIVATE_KEY_SIZE;
+ pubLen = KYBER768_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ k = KYBER1024_K;
+ privLen = KYBER1024_PRIVATE_KEY_SIZE;
+ pubLen = KYBER1024_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+ /* Ensure the data is the correct length for the key type. */
+ if ((ret == 0) && (len != privLen)) {
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0) {
+ /* Decode private key that is vector of polynomials. */
+ kyber_from_bytes(key->priv, p, k);
+ p += k * KYBER_POLY_SIZE;
+
+ /* Decode the public key that is after the private key. */
+ ret = wc_KyberKey_DecodePublicKey(key, p, pubLen);
+ }
+ if (ret == 0) {
+ /* Skip over public key. */
+ p += pubLen;
+ /* Copy the hash of the encoded public key that is after public key. */
+ XMEMCPY(key->h, p, sizeof(key->h));
+ p += KYBER_SYM_SZ;
+ /* Copy the z (randomizer) that is after hash. */
+ XMEMCPY(key->z, p, sizeof(key->z));
+ /* Set that private and public keys, and public hash are set. */
+ key->flags |= KYBER_FLAG_H_SET | KYBER_FLAG_BOTH_SET;
+ }
+
+ return ret;
+}
+
+/**
+ * Decode public key.
+ *
+ * Public vector | Public Seed
+ *
+ * @param [in, out] key Kyber key object.
+ * @param [in] in Buffer holding encoded key.
+ * @param [in] len Length of data in buffer.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or in is NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ * @return BUFFER_E when len is not the correct size.
+ */
+int wc_KyberKey_DecodePublicKey(KyberKey* key, unsigned char* in, word32 len)
+{
+ int ret = 0;
+ word32 pubLen = 0;
+ unsigned int k = 0;
+ unsigned char* p = in;
+
+ if ((key == NULL) || (in == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Establish parameters based on key type. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ k = KYBER512_K;
+ pubLen = KYBER512_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ k = KYBER768_K;
+ pubLen = KYBER768_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ k = KYBER1024_K;
+ pubLen = KYBER1024_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+ /* Ensure the data is the correct length for the key type. */
+ if ((ret == 0) && (len != pubLen)) {
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0) {
+ unsigned int i;
+
+ /* Decode public key that is vector of polynomials. */
+ kyber_from_bytes(key->pub, p, k);
+ p += k * KYBER_POLY_SIZE;
+
+ /* Read public key seed. */
+ for (i = 0; i < KYBER_SYM_SZ; i++) {
+ key->pubSeed[i] = p[i];
+ }
+ /* Calculate public hash. */
+ ret = KYBER_HASH_H(in, len, key->h);
+ }
+ if (ret == 0) {
+ /* Record public key and public hash set. */
+ key->flags |= KYBER_FLAG_PUB_SET | KYBER_FLAG_H_SET;
+ }
+
+ return ret;
+}
+
+/**
+ * Get the size in bytes of encoded private key for the key.
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] len Length of encoded private key in bytes.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or len is NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+int wc_KyberKey_PrivateKeySize(KyberKey* key, word32* len)
+{
+ int ret = 0;
+
+ /* Validate parameters. */
+ if ((key == NULL) || (len == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Return in 'len' size of the encoded private key for the type of this
+ * key. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ *len = KYBER512_PRIVATE_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ *len = KYBER768_PRIVATE_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ *len = KYBER1024_PRIVATE_KEY_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Get the size in bytes of encoded public key for the key.
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] len Length of encoded public key in bytes.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or len is NULL.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+int wc_KyberKey_PublicKeySize(KyberKey* key, word32* len)
+{
+ int ret = 0;
+
+ /* Validate parameters. */
+ if ((key == NULL) || (len == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ /* Return in 'len' size of the encoded public key for the type of this
+ * key. */
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ *len = KYBER512_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ *len = KYBER768_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ *len = KYBER1024_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+
+ return ret;
+}
+
+/**
+ * Encode the private key.
+ *
+ * Private Vector | Public Key | Public Hash | Randomizer
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] out Buffer to hold data.
+ * @param [in] len Size of buffer in bytes.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or out is NULL or private/public key not
+ * available.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+int wc_KyberKey_EncodePrivateKey(KyberKey* key, unsigned char* out, word32 len)
+{
+ int ret = 0;
+ unsigned int k = 0;
+ unsigned int pubLen = 0;
+ unsigned int privLen = 0;
+ unsigned char* p = out;
+
+ if ((key == NULL) || (out == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+ if ((ret == 0) &&
+ ((key->flags & KYBER_FLAG_BOTH_SET) != KYBER_FLAG_BOTH_SET)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ k = KYBER512_K;
+ pubLen = KYBER512_PUBLIC_KEY_SIZE;
+ privLen = KYBER512_PRIVATE_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ k = KYBER768_K;
+ pubLen = KYBER768_PUBLIC_KEY_SIZE;
+ privLen = KYBER768_PRIVATE_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ k = KYBER1024_K;
+ pubLen = KYBER1024_PUBLIC_KEY_SIZE;
+ privLen = KYBER1024_PRIVATE_KEY_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+ /* Check buffer is big enough for encoding. */
+ if ((ret == 0) && (len != privLen)) {
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0) {
+ /* Encode private key that is vector of polynomials. */
+ kyber_to_bytes(p, key->priv, k);
+ p += KYBER_POLY_SIZE * k;
+
+ /* Encode public key. */
+ ret = wc_KyberKey_EncodePublicKey(key, p, pubLen);
+ p += pubLen;
+ }
+ /* Ensure hash of public key is available. */
+ if ((ret == 0) && ((key->flags & KYBER_FLAG_H_SET) == 0)) {
+ ret = KYBER_HASH_H(p - pubLen, pubLen, key->h);
+ }
+ if (ret == 0) {
+ /* Public hash is available. */
+ key->flags |= KYBER_FLAG_H_SET;
+ /* Append public hash. */
+ XMEMCPY(p, key->h, sizeof(key->h));
+ p += KYBER_SYM_SZ;
+ /* Append z (randomizer). */
+ XMEMCPY(p, key->z, sizeof(key->z));
+ }
+
+ return ret;
+}
+
+/**
+ * Encode the public key.
+ *
+ * Public vector | Public Seed
+ *
+ * @param [in] key Kyber key object.
+ * @param [out] out Buffer to hold data.
+ * @param [in] len Size of buffer in bytes.
+ * @return 0 on success.
+ * @return BAD_FUNC_ARG when key or out is NULL or public key not available.
+ * @return NOT_COMPILED_IN when key type is not supported.
+ */
+int wc_KyberKey_EncodePublicKey(KyberKey* key, unsigned char* out, word32 len)
+{
+ int ret = 0;
+ unsigned int k = 0;
+ unsigned int pubLen = 0;
+ unsigned char* p = out;
+
+ if ((key == NULL) || (out == NULL)) {
+ ret = BAD_FUNC_ARG;
+ }
+ if ((ret == 0) &&
+ ((key->flags & KYBER_FLAG_PUB_SET) != KYBER_FLAG_PUB_SET)) {
+ ret = BAD_FUNC_ARG;
+ }
+
+ if (ret == 0) {
+ switch (key->type) {
+ #ifdef WOLFSSL_KYBER512
+ case KYBER512:
+ k = KYBER512_K;
+ pubLen = KYBER512_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER768
+ case KYBER768:
+ k = KYBER768_K;
+ pubLen = KYBER768_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ #ifdef WOLFSSL_KYBER1024
+ case KYBER1024:
+ k = KYBER1024_K;
+ pubLen = KYBER1024_PUBLIC_KEY_SIZE;
+ break;
+ #endif
+ default:
+ /* No other values supported. */
+ ret = NOT_COMPILED_IN;
+ break;
+ }
+ }
+ /* Check buffer is big enough for encoding. */
+ if ((ret == 0) && (len != pubLen)) {
+ ret = BUFFER_E;
+ }
+
+ if (ret == 0) {
+ int i;
+
+ /* Encode public key polynomial by polynomial. */
+ kyber_to_bytes(p, key->pub, k);
+ p += k * KYBER_POLY_SIZE;
+
+ /* Append public seed. */
+ for (i = 0; i < KYBER_SYM_SZ; i++) {
+ p[i] = key->pubSeed[i];
+ }
+
+ /* Make sure public hash is set. */
+ if ((key->flags & KYBER_FLAG_H_SET) == 0) {
+ ret = KYBER_HASH_H(out, len, key->h);
+ }
+ }
+ if (ret == 0) {
+ /* Public hash is set. */
+ key->flags |= KYBER_FLAG_H_SET;
+ }
+
+ return ret;
+}
+
+#endif /* WOLFSSL_WC_KYBER */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_asm.S b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_asm.S
index 599400b3..9dff0f7b 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_asm.S
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_asm.S
@@ -1,6 +1,6 @@
-/* wc_kyber_asm.S
- *
- * Copyright (C) 2006-2023 wolfSSL Inc.
+/* wc_kyber_asm.S */
+/*
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -19,9 +19,27807 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-#include <wolfssl/wolfcrypt/settings.h>
+#ifdef WOLFSSL_USER_SETTINGS
+#ifdef WOLFSSL_USER_SETTINGS_ASM
+/*
+ * user_settings_asm.h is a file generated by the script user_settings_asm.sh.
+ * The script takes in a user_settings.h and produces user_settings_asm.h, which
+ * is a stripped down version of user_settings.h containing only preprocessor
+ * directives. This makes the header safe to include in assembly (.S) files.
+ */
+#include "user_settings_asm.h"
+#else
+/*
+ * Note: if user_settings.h contains any C code (e.g. a typedef or function
+ * prototype), including it here in an assembly (.S) file will cause an
+ * assembler failure. See user_settings_asm.h above.
+ */
+#include "user_settings.h"
+#endif /* WOLFSSL_USER_SETTINGS_ASM */
+#endif /* WOLFSSL_USER_SETTINGS */
+
+#ifndef HAVE_INTEL_AVX1
+#define HAVE_INTEL_AVX1
+#endif /* HAVE_INTEL_AVX1 */
+#ifndef NO_AVX2_SUPPORT
+#define HAVE_INTEL_AVX2
+#endif /* NO_AVX2_SUPPORT */
-#ifdef WOLFSSL_HAVE_KYBER
- #error "Contact wolfSSL to get the implementation of this file"
-#endif
+#ifdef WOLFSSL_WC_KYBER
+#ifdef HAVE_INTEL_AVX2
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+kyber_q:
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+kyber_qinv:
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+.value 0xf301,0xf301
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+kyber_f:
+.value 0x549,0x549
+.value 0x549,0x549
+.value 0x549,0x549
+.value 0x549,0x549
+.value 0x549,0x549
+.value 0x549,0x549
+.value 0x549,0x549
+.value 0x549,0x549
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+kyber_f_qinv:
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+.value 0x5049,0x5049
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+kyber_v:
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_avx2_zetas:
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0xa0b,0xa0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0x7b0b,0x7b0b
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0xb9a,0xb9a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x399a,0x399a
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x5d5,0x5d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x34d5,0x34d5
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0x58e,0x58e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xcf8e,0xcf8e
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xc56,0xc56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0xae56,0xae56
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x26e,0x26e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x6c6e,0x6c6e
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0x629,0x629
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xf129,0xf129
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xb6,0xb6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0xc2b6,0xc2b6
+.value 0x23d,0x23d
+.value 0x23d,0x23d
+.value 0x23d,0x23d
+.value 0x23d,0x23d
+.value 0x7d4,0x7d4
+.value 0x7d4,0x7d4
+.value 0x7d4,0x7d4
+.value 0x7d4,0x7d4
+.value 0xe93d,0xe93d
+.value 0xe93d,0xe93d
+.value 0xe93d,0xe93d
+.value 0xe93d,0xe93d
+.value 0x43d4,0x43d4
+.value 0x43d4,0x43d4
+.value 0x43d4,0x43d4
+.value 0x43d4,0x43d4
+.value 0x108,0x108
+.value 0x108,0x108
+.value 0x108,0x108
+.value 0x108,0x108
+.value 0x17f,0x17f
+.value 0x17f,0x17f
+.value 0x17f,0x17f
+.value 0x17f,0x17f
+.value 0x9908,0x9908
+.value 0x9908,0x9908
+.value 0x9908,0x9908
+.value 0x9908,0x9908
+.value 0x8e7f,0x8e7f
+.value 0x8e7f,0x8e7f
+.value 0x8e7f,0x8e7f
+.value 0x8e7f,0x8e7f
+.value 0x4c7,0x4c7
+.value 0x4c7,0x4c7
+.value 0x28c,0x28c
+.value 0x28c,0x28c
+.value 0xad9,0xad9
+.value 0xad9,0xad9
+.value 0x3f7,0x3f7
+.value 0x3f7,0x3f7
+.value 0xe9c7,0xe9c7
+.value 0xe9c7,0xe9c7
+.value 0xe68c,0xe68c
+.value 0xe68c,0xe68c
+.value 0x5d9,0x5d9
+.value 0x5d9,0x5d9
+.value 0x78f7,0x78f7
+.value 0x78f7,0x78f7
+.value 0x7f4,0x7f4
+.value 0x7f4,0x7f4
+.value 0x5d3,0x5d3
+.value 0x5d3,0x5d3
+.value 0xbe7,0xbe7
+.value 0xbe7,0xbe7
+.value 0x6f9,0x6f9
+.value 0x6f9,0x6f9
+.value 0xa3f4,0xa3f4
+.value 0xa3f4,0xa3f4
+.value 0x4ed3,0x4ed3
+.value 0x4ed3,0x4ed3
+.value 0x50e7,0x50e7
+.value 0x50e7,0x50e7
+.value 0x61f9,0x61f9
+.value 0x61f9,0x61f9
+.value 0x9c4,0x9c4
+.value 0x9c4,0x9c4
+.value 0x9c4,0x9c4
+.value 0x9c4,0x9c4
+.value 0x5b2,0x5b2
+.value 0x5b2,0x5b2
+.value 0x5b2,0x5b2
+.value 0x5b2,0x5b2
+.value 0x15c4,0x15c4
+.value 0x15c4,0x15c4
+.value 0x15c4,0x15c4
+.value 0x15c4,0x15c4
+.value 0xfbb2,0xfbb2
+.value 0xfbb2,0xfbb2
+.value 0xfbb2,0xfbb2
+.value 0xfbb2,0xfbb2
+.value 0x6bf,0x6bf
+.value 0x6bf,0x6bf
+.value 0x6bf,0x6bf
+.value 0x6bf,0x6bf
+.value 0xc7f,0xc7f
+.value 0xc7f,0xc7f
+.value 0xc7f,0xc7f
+.value 0xc7f,0xc7f
+.value 0x53bf,0x53bf
+.value 0x53bf,0x53bf
+.value 0x53bf,0x53bf
+.value 0x53bf,0x53bf
+.value 0x997f,0x997f
+.value 0x997f,0x997f
+.value 0x997f,0x997f
+.value 0x997f,0x997f
+.value 0x204,0x204
+.value 0x204,0x204
+.value 0xcf9,0xcf9
+.value 0xcf9,0xcf9
+.value 0xbc1,0xbc1
+.value 0xbc1,0xbc1
+.value 0xa67,0xa67
+.value 0xa67,0xa67
+.value 0xce04,0xce04
+.value 0xce04,0xce04
+.value 0x67f9,0x67f9
+.value 0x67f9,0x67f9
+.value 0x3ec1,0x3ec1
+.value 0x3ec1,0x3ec1
+.value 0xcf67,0xcf67
+.value 0xcf67,0xcf67
+.value 0x6af,0x6af
+.value 0x6af,0x6af
+.value 0x877,0x877
+.value 0x877,0x877
+.value 0x7e,0x7e
+.value 0x7e,0x7e
+.value 0x5bd,0x5bd
+.value 0x5bd,0x5bd
+.value 0x23af,0x23af
+.value 0x23af,0x23af
+.value 0xfd77,0xfd77
+.value 0xfd77,0xfd77
+.value 0x9a7e,0x9a7e
+.value 0x9a7e,0x9a7e
+.value 0x6cbd,0x6cbd
+.value 0x6cbd,0x6cbd
+.value 0x8b2,0x8b2
+.value 0x1ae,0x1ae
+.value 0x22b,0x22b
+.value 0x34b,0x34b
+.value 0x81e,0x81e
+.value 0x367,0x367
+.value 0x60e,0x60e
+.value 0x69,0x69
+.value 0xfeb2,0xfeb2
+.value 0x2bae,0x2bae
+.value 0xd32b,0xd32b
+.value 0x344b,0x344b
+.value 0x821e,0x821e
+.value 0xc867,0xc867
+.value 0x500e,0x500e
+.value 0xab69,0xab69
+.value 0x1a6,0x1a6
+.value 0x24b,0x24b
+.value 0xb1,0xb1
+.value 0xc16,0xc16
+.value 0xbde,0xbde
+.value 0xb35,0xb35
+.value 0x626,0x626
+.value 0x675,0x675
+.value 0x93a6,0x93a6
+.value 0x334b,0x334b
+.value 0x3b1,0x3b1
+.value 0xee16,0xee16
+.value 0xc5de,0xc5de
+.value 0x5a35,0x5a35
+.value 0x1826,0x1826
+.value 0x1575,0x1575
+.value 0xc0b,0xc0b
+.value 0x30a,0x30a
+.value 0x487,0x487
+.value 0xc6e,0xc6e
+.value 0x9f8,0x9f8
+.value 0x5cb,0x5cb
+.value 0xaa7,0xaa7
+.value 0x45f,0x45f
+.value 0x7d0b,0x7d0b
+.value 0x810a,0x810a
+.value 0x2987,0x2987
+.value 0x766e,0x766e
+.value 0x71f8,0x71f8
+.value 0xb6cb,0xb6cb
+.value 0x8fa7,0x8fa7
+.value 0x315f,0x315f
+.value 0x6cb,0x6cb
+.value 0x284,0x284
+.value 0x999,0x999
+.value 0x15d,0x15d
+.value 0x1a2,0x1a2
+.value 0x149,0x149
+.value 0xc65,0xc65
+.value 0xcb6,0xcb6
+.value 0xb7cb,0xb7cb
+.value 0x4e84,0x4e84
+.value 0x4499,0x4499
+.value 0x485d,0x485d
+.value 0xc7a2,0xc7a2
+.value 0x4c49,0x4c49
+.value 0xeb65,0xeb65
+.value 0xceb6,0xceb6
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x714,0x714
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x314,0x314
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x11f,0x11f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0x6e1f,0x6e1f
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xca,0xca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0xbeca,0xbeca
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x3c2,0x3c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x29c2,0x29c2
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x84f,0x84f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x54f,0x54f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0x73f,0x73f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0xd43f,0xd43f
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x5bc,0x5bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0x79bc,0x79bc
+.value 0xa58,0xa58
+.value 0xa58,0xa58
+.value 0xa58,0xa58
+.value 0xa58,0xa58
+.value 0x3f9,0x3f9
+.value 0x3f9,0x3f9
+.value 0x3f9,0x3f9
+.value 0x3f9,0x3f9
+.value 0x9258,0x9258
+.value 0x9258,0x9258
+.value 0x9258,0x9258
+.value 0x9258,0x9258
+.value 0x5ef9,0x5ef9
+.value 0x5ef9,0x5ef9
+.value 0x5ef9,0x5ef9
+.value 0x5ef9,0x5ef9
+.value 0x2dc,0x2dc
+.value 0x2dc,0x2dc
+.value 0x2dc,0x2dc
+.value 0x2dc,0x2dc
+.value 0x260,0x260
+.value 0x260,0x260
+.value 0x260,0x260
+.value 0x260,0x260
+.value 0xd6dc,0xd6dc
+.value 0xd6dc,0xd6dc
+.value 0xd6dc,0xd6dc
+.value 0xd6dc,0xd6dc
+.value 0x2260,0x2260
+.value 0x2260,0x2260
+.value 0x2260,0x2260
+.value 0x2260,0x2260
+.value 0x9ac,0x9ac
+.value 0x9ac,0x9ac
+.value 0xca7,0xca7
+.value 0xca7,0xca7
+.value 0xbf2,0xbf2
+.value 0xbf2,0xbf2
+.value 0x33e,0x33e
+.value 0x33e,0x33e
+.value 0x4dac,0x4dac
+.value 0x4dac,0x4dac
+.value 0x91a7,0x91a7
+.value 0x91a7,0x91a7
+.value 0xc1f2,0xc1f2
+.value 0xc1f2,0xc1f2
+.value 0xdd3e,0xdd3e
+.value 0xdd3e,0xdd3e
+.value 0x6b,0x6b
+.value 0x6b,0x6b
+.value 0x774,0x774
+.value 0x774,0x774
+.value 0xc0a,0xc0a
+.value 0xc0a,0xc0a
+.value 0x94a,0x94a
+.value 0x94a,0x94a
+.value 0x916b,0x916b
+.value 0x916b,0x916b
+.value 0x2374,0x2374
+.value 0x2374,0x2374
+.value 0x8a0a,0x8a0a
+.value 0x8a0a,0x8a0a
+.value 0x474a,0x474a
+.value 0x474a,0x474a
+.value 0x6fb,0x6fb
+.value 0x6fb,0x6fb
+.value 0x6fb,0x6fb
+.value 0x6fb,0x6fb
+.value 0x19b,0x19b
+.value 0x19b,0x19b
+.value 0x19b,0x19b
+.value 0x19b,0x19b
+.value 0x47fb,0x47fb
+.value 0x47fb,0x47fb
+.value 0x47fb,0x47fb
+.value 0x47fb,0x47fb
+.value 0x229b,0x229b
+.value 0x229b,0x229b
+.value 0x229b,0x229b
+.value 0x229b,0x229b
+.value 0xc34,0xc34
+.value 0xc34,0xc34
+.value 0xc34,0xc34
+.value 0xc34,0xc34
+.value 0x6de,0x6de
+.value 0x6de,0x6de
+.value 0x6de,0x6de
+.value 0x6de,0x6de
+.value 0x6834,0x6834
+.value 0x6834,0x6834
+.value 0x6834,0x6834
+.value 0x6834,0x6834
+.value 0xc0de,0xc0de
+.value 0xc0de,0xc0de
+.value 0xc0de,0xc0de
+.value 0xc0de,0xc0de
+.value 0xb73,0xb73
+.value 0xb73,0xb73
+.value 0x3c1,0x3c1
+.value 0x3c1,0x3c1
+.value 0x71d,0x71d
+.value 0x71d,0x71d
+.value 0xa2c,0xa2c
+.value 0xa2c,0xa2c
+.value 0x3473,0x3473
+.value 0x3473,0x3473
+.value 0x36c1,0x36c1
+.value 0x36c1,0x36c1
+.value 0x8e1d,0x8e1d
+.value 0x8e1d,0x8e1d
+.value 0xce2c,0xce2c
+.value 0xce2c,0xce2c
+.value 0x1c0,0x1c0
+.value 0x1c0,0x1c0
+.value 0x8d8,0x8d8
+.value 0x8d8,0x8d8
+.value 0x2a5,0x2a5
+.value 0x2a5,0x2a5
+.value 0x806,0x806
+.value 0x806,0x806
+.value 0x41c0,0x41c0
+.value 0x41c0,0x41c0
+.value 0x10d8,0x10d8
+.value 0x10d8,0x10d8
+.value 0xa1a5,0xa1a5
+.value 0xa1a5,0xa1a5
+.value 0xba06,0xba06
+.value 0xba06,0xba06
+.value 0x331,0x331
+.value 0x449,0x449
+.value 0x25b,0x25b
+.value 0x262,0x262
+.value 0x52a,0x52a
+.value 0x7fc,0x7fc
+.value 0x748,0x748
+.value 0x180,0x180
+.value 0x8631,0x8631
+.value 0x4f49,0x4f49
+.value 0x635b,0x635b
+.value 0x862,0x862
+.value 0xe32a,0xe32a
+.value 0x3bfc,0x3bfc
+.value 0x5f48,0x5f48
+.value 0x8180,0x8180
+.value 0x842,0x842
+.value 0xc79,0xc79
+.value 0x4c2,0x4c2
+.value 0x7ca,0x7ca
+.value 0x997,0x997
+.value 0xdc,0xdc
+.value 0x85e,0x85e
+.value 0x686,0x686
+.value 0xae42,0xae42
+.value 0xe779,0xe779
+.value 0x2ac2,0x2ac2
+.value 0xc5ca,0xc5ca
+.value 0x5e97,0x5e97
+.value 0xd4dc,0xd4dc
+.value 0x425e,0x425e
+.value 0x3886,0x3886
+.value 0x860,0x860
+.value 0x707,0x707
+.value 0x803,0x803
+.value 0x31a,0x31a
+.value 0x71b,0x71b
+.value 0x9ab,0x9ab
+.value 0x99b,0x99b
+.value 0x1de,0x1de
+.value 0x2860,0x2860
+.value 0xac07,0xac07
+.value 0xe103,0xe103
+.value 0xb11a,0xb11a
+.value 0xa81b,0xa81b
+.value 0x5aab,0x5aab
+.value 0x2a9b,0x2a9b
+.value 0xbbde,0xbbde
+.value 0xc95,0xc95
+.value 0xbcd,0xbcd
+.value 0x3e4,0x3e4
+.value 0x3df,0x3df
+.value 0x3be,0x3be
+.value 0x74d,0x74d
+.value 0x5f2,0x5f2
+.value 0x65c,0x65c
+.value 0x7b95,0x7b95
+.value 0xa2cd,0xa2cd
+.value 0x6fe4,0x6fe4
+.value 0xb0df,0xb0df
+.value 0x5dbe,0x5dbe
+.value 0x1e4d,0x1e4d
+.value 0xbbf2,0xbbf2
+.value 0x5a5c,0x5a5c
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_avx2_zetas_basemul:
+.value 0x8b2,0x81e
+.value 0xf74e,0xf7e2
+.value 0x1ae,0x367
+.value 0xfe52,0xfc99
+.value 0x22b,0x60e
+.value 0xfdd5,0xf9f2
+.value 0x34b,0x69
+.value 0xfcb5,0xff97
+.value 0xfeb2,0x821e
+.value 0x14e,0x7de2
+.value 0x2bae,0xc867
+.value 0xd452,0x3799
+.value 0xd32b,0x500e
+.value 0x2cd5,0xaff2
+.value 0x344b,0xab69
+.value 0xcbb5,0x5497
+.value 0x1a6,0xbde
+.value 0xfe5a,0xf422
+.value 0x24b,0xb35
+.value 0xfdb5,0xf4cb
+.value 0xb1,0x626
+.value 0xff4f,0xf9da
+.value 0xc16,0x675
+.value 0xf3ea,0xf98b
+.value 0x93a6,0xc5de
+.value 0x6c5a,0x3a22
+.value 0x334b,0x5a35
+.value 0xccb5,0xa5cb
+.value 0x3b1,0x1826
+.value 0xfc4f,0xe7da
+.value 0xee16,0x1575
+.value 0x11ea,0xea8b
+.value 0xc0b,0x9f8
+.value 0xf3f5,0xf608
+.value 0x30a,0x5cb
+.value 0xfcf6,0xfa35
+.value 0x487,0xaa7
+.value 0xfb79,0xf559
+.value 0xc6e,0x45f
+.value 0xf392,0xfba1
+.value 0x7d0b,0x71f8
+.value 0x82f5,0x8e08
+.value 0x810a,0xb6cb
+.value 0x7ef6,0x4935
+.value 0x2987,0x8fa7
+.value 0xd679,0x7059
+.value 0x766e,0x315f
+.value 0x8992,0xcea1
+.value 0x6cb,0x1a2
+.value 0xf935,0xfe5e
+.value 0x284,0x149
+.value 0xfd7c,0xfeb7
+.value 0x999,0xc65
+.value 0xf667,0xf39b
+.value 0x15d,0xcb6
+.value 0xfea3,0xf34a
+.value 0xb7cb,0xc7a2
+.value 0x4835,0x385e
+.value 0x4e84,0x4c49
+.value 0xb17c,0xb3b7
+.value 0x4499,0xeb65
+.value 0xbb67,0x149b
+.value 0x485d,0xceb6
+.value 0xb7a3,0x314a
+.value 0x331,0x52a
+.value 0xfccf,0xfad6
+.value 0x449,0x7fc
+.value 0xfbb7,0xf804
+.value 0x25b,0x748
+.value 0xfda5,0xf8b8
+.value 0x262,0x180
+.value 0xfd9e,0xfe80
+.value 0x8631,0xe32a
+.value 0x79cf,0x1cd6
+.value 0x4f49,0x3bfc
+.value 0xb0b7,0xc404
+.value 0x635b,0x5f48
+.value 0x9ca5,0xa0b8
+.value 0x862,0x8180
+.value 0xf79e,0x7e80
+.value 0x842,0x997
+.value 0xf7be,0xf669
+.value 0xc79,0xdc
+.value 0xf387,0xff24
+.value 0x4c2,0x85e
+.value 0xfb3e,0xf7a2
+.value 0x7ca,0x686
+.value 0xf836,0xf97a
+.value 0xae42,0x5e97
+.value 0x51be,0xa169
+.value 0xe779,0xd4dc
+.value 0x1887,0x2b24
+.value 0x2ac2,0x425e
+.value 0xd53e,0xbda2
+.value 0xc5ca,0x3886
+.value 0x3a36,0xc77a
+.value 0x860,0x71b
+.value 0xf7a0,0xf8e5
+.value 0x707,0x9ab
+.value 0xf8f9,0xf655
+.value 0x803,0x99b
+.value 0xf7fd,0xf665
+.value 0x31a,0x1de
+.value 0xfce6,0xfe22
+.value 0x2860,0xa81b
+.value 0xd7a0,0x57e5
+.value 0xac07,0x5aab
+.value 0x53f9,0xa555
+.value 0xe103,0x2a9b
+.value 0x1efd,0xd565
+.value 0xb11a,0xbbde
+.value 0x4ee6,0x4422
+.value 0xc95,0x3be
+.value 0xf36b,0xfc42
+.value 0xbcd,0x74d
+.value 0xf433,0xf8b3
+.value 0x3e4,0x5f2
+.value 0xfc1c,0xfa0e
+.value 0x3df,0x65c
+.value 0xfc21,0xf9a4
+.value 0x7b95,0x5dbe
+.value 0x846b,0xa242
+.value 0xa2cd,0x1e4d
+.value 0x5d33,0xe1b3
+.value 0x6fe4,0xbbf2
+.value 0x901c,0x440e
+.value 0xb0df,0x5a5c
+.value 0x4f21,0xa5a4
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_avx2_zetas_inv:
+.value 0x6a5,0x6a5
+.value 0x5b4,0x5b4
+.value 0x70f,0x70f
+.value 0x943,0x943
+.value 0x922,0x922
+.value 0x134,0x134
+.value 0x91d,0x91d
+.value 0x6c,0x6c
+.value 0xa5a5,0xa5a5
+.value 0xe1b4,0xe1b4
+.value 0x440f,0x440f
+.value 0xa243,0xa243
+.value 0x4f22,0x4f22
+.value 0x5d34,0x5d34
+.value 0x901d,0x901d
+.value 0x846c,0x846c
+.value 0xb23,0xb23
+.value 0x356,0x356
+.value 0x366,0x366
+.value 0x5e6,0x5e6
+.value 0x9e7,0x9e7
+.value 0x5fa,0x5fa
+.value 0x4fe,0x4fe
+.value 0x4a1,0x4a1
+.value 0x4423,0x4423
+.value 0xa556,0xa556
+.value 0xd566,0xd566
+.value 0x57e6,0x57e6
+.value 0x4ee7,0x4ee7
+.value 0x53fa,0x53fa
+.value 0x1efe,0x1efe
+.value 0xd7a1,0xd7a1
+.value 0x4fb,0x4fb
+.value 0x4fb,0x4fb
+.value 0xa5c,0xa5c
+.value 0xa5c,0xa5c
+.value 0x429,0x429
+.value 0x429,0x429
+.value 0xb41,0xb41
+.value 0xb41,0xb41
+.value 0x45fb,0x45fb
+.value 0x45fb,0x45fb
+.value 0x5e5c,0x5e5c
+.value 0x5e5c,0x5e5c
+.value 0xef29,0xef29
+.value 0xef29,0xef29
+.value 0xbe41,0xbe41
+.value 0xbe41,0xbe41
+.value 0x2d5,0x2d5
+.value 0x2d5,0x2d5
+.value 0x5e4,0x5e4
+.value 0x5e4,0x5e4
+.value 0x940,0x940
+.value 0x940,0x940
+.value 0x18e,0x18e
+.value 0x18e,0x18e
+.value 0x31d5,0x31d5
+.value 0x31d5,0x31d5
+.value 0x71e4,0x71e4
+.value 0x71e4,0x71e4
+.value 0xc940,0xc940
+.value 0xc940,0xc940
+.value 0xcb8e,0xcb8e
+.value 0xcb8e,0xcb8e
+.value 0x623,0x623
+.value 0x623,0x623
+.value 0x623,0x623
+.value 0x623,0x623
+.value 0xcd,0xcd
+.value 0xcd,0xcd
+.value 0xcd,0xcd
+.value 0xcd,0xcd
+.value 0x3f23,0x3f23
+.value 0x3f23,0x3f23
+.value 0x3f23,0x3f23
+.value 0x3f23,0x3f23
+.value 0x97cd,0x97cd
+.value 0x97cd,0x97cd
+.value 0x97cd,0x97cd
+.value 0x97cd,0x97cd
+.value 0xb66,0xb66
+.value 0xb66,0xb66
+.value 0xb66,0xb66
+.value 0xb66,0xb66
+.value 0x606,0x606
+.value 0x606,0x606
+.value 0x606,0x606
+.value 0x606,0x606
+.value 0xdd66,0xdd66
+.value 0xdd66,0xdd66
+.value 0xdd66,0xdd66
+.value 0xdd66,0xdd66
+.value 0xb806,0xb806
+.value 0xb806,0xb806
+.value 0xb806,0xb806
+.value 0xb806,0xb806
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x745,0x745
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x8645,0x8645
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x5c2,0x5c2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0x2bc2,0x2bc2
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0xc37,0xc37
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x4137,0x4137
+.value 0x67b,0x67b
+.value 0xc25,0xc25
+.value 0x4a3,0x4a3
+.value 0x36a,0x36a
+.value 0x537,0x537
+.value 0x88,0x88
+.value 0x83f,0x83f
+.value 0x4bf,0x4bf
+.value 0xc77b,0xc77b
+.value 0x2b25,0x2b25
+.value 0xbda3,0xbda3
+.value 0xa16a,0xa16a
+.value 0x3a37,0x3a37
+.value 0x1888,0x1888
+.value 0xd53f,0xd53f
+.value 0x51bf,0x51bf
+.value 0xb81,0xb81
+.value 0x505,0x505
+.value 0x5b9,0x5b9
+.value 0x7d7,0x7d7
+.value 0xa9f,0xa9f
+.value 0x8b8,0x8b8
+.value 0xaa6,0xaa6
+.value 0x9d0,0x9d0
+.value 0x7e81,0x7e81
+.value 0xc405,0xc405
+.value 0xa0b9,0xa0b9
+.value 0x1cd7,0x1cd7
+.value 0xf79f,0xf79f
+.value 0xb0b8,0xb0b8
+.value 0x9ca6,0x9ca6
+.value 0x79d0,0x79d0
+.value 0x3b7,0x3b7
+.value 0x3b7,0x3b7
+.value 0xf7,0xf7
+.value 0xf7,0xf7
+.value 0x58d,0x58d
+.value 0x58d,0x58d
+.value 0xc96,0xc96
+.value 0xc96,0xc96
+.value 0xb8b7,0xb8b7
+.value 0xb8b7,0xb8b7
+.value 0x75f7,0x75f7
+.value 0x75f7,0x75f7
+.value 0xdc8d,0xdc8d
+.value 0xdc8d,0xdc8d
+.value 0x6e96,0x6e96
+.value 0x6e96,0x6e96
+.value 0x9c3,0x9c3
+.value 0x9c3,0x9c3
+.value 0x10f,0x10f
+.value 0x10f,0x10f
+.value 0x5a,0x5a
+.value 0x5a,0x5a
+.value 0x355,0x355
+.value 0x355,0x355
+.value 0x22c3,0x22c3
+.value 0x22c3,0x22c3
+.value 0x3e0f,0x3e0f
+.value 0x3e0f,0x3e0f
+.value 0x6e5a,0x6e5a
+.value 0x6e5a,0x6e5a
+.value 0xb255,0xb255
+.value 0xb255,0xb255
+.value 0xaa1,0xaa1
+.value 0xaa1,0xaa1
+.value 0xaa1,0xaa1
+.value 0xaa1,0xaa1
+.value 0xa25,0xa25
+.value 0xa25,0xa25
+.value 0xa25,0xa25
+.value 0xa25,0xa25
+.value 0xdda1,0xdda1
+.value 0xdda1,0xdda1
+.value 0xdda1,0xdda1
+.value 0xdda1,0xdda1
+.value 0x2925,0x2925
+.value 0x2925,0x2925
+.value 0x2925,0x2925
+.value 0x2925,0x2925
+.value 0x908,0x908
+.value 0x908,0x908
+.value 0x908,0x908
+.value 0x908,0x908
+.value 0x2a9,0x2a9
+.value 0x2a9,0x2a9
+.value 0x2a9,0x2a9
+.value 0x2a9,0x2a9
+.value 0xa108,0xa108
+.value 0xa108,0xa108
+.value 0xa108,0xa108
+.value 0xa108,0xa108
+.value 0x6da9,0x6da9
+.value 0x6da9,0x6da9
+.value 0x6da9,0x6da9
+.value 0x6da9,0x6da9
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0x4b2,0x4b2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0xfab2,0xfab2
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0x93f,0x93f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xd63f,0xd63f
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0xbe2,0xbe2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x91e2,0x91e2
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0x5ed,0x5ed
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0xfced,0xfced
+.value 0x4b,0x4b
+.value 0xbb8,0xbb8
+.value 0x9c,0x9c
+.value 0xb5f,0xb5f
+.value 0xba4,0xba4
+.value 0xa7d,0xa7d
+.value 0x368,0x368
+.value 0x636,0x636
+.value 0x314b,0x314b
+.value 0xb3b8,0xb3b8
+.value 0x149c,0x149c
+.value 0x385f,0x385f
+.value 0xb7a4,0xb7a4
+.value 0xb17d,0xb17d
+.value 0xbb68,0xbb68
+.value 0x4836,0x4836
+.value 0x8a2,0x8a2
+.value 0x736,0x736
+.value 0x25a,0x25a
+.value 0x309,0x309
+.value 0x93,0x93
+.value 0x9f7,0x9f7
+.value 0x87a,0x87a
+.value 0xf6,0xf6
+.value 0xcea2,0xcea2
+.value 0x4936,0x4936
+.value 0x705a,0x705a
+.value 0x8e09,0x8e09
+.value 0x8993,0x8993
+.value 0x7ef7,0x7ef7
+.value 0xd67a,0xd67a
+.value 0x82f6,0x82f6
+.value 0x744,0x744
+.value 0x744,0x744
+.value 0xc83,0xc83
+.value 0xc83,0xc83
+.value 0x48a,0x48a
+.value 0x48a,0x48a
+.value 0x652,0x652
+.value 0x652,0x652
+.value 0x9344,0x9344
+.value 0x9344,0x9344
+.value 0x6583,0x6583
+.value 0x6583,0x6583
+.value 0x28a,0x28a
+.value 0x28a,0x28a
+.value 0xdc52,0xdc52
+.value 0xdc52,0xdc52
+.value 0x29a,0x29a
+.value 0x29a,0x29a
+.value 0x140,0x140
+.value 0x140,0x140
+.value 0x8,0x8
+.value 0x8,0x8
+.value 0xafd,0xafd
+.value 0xafd,0xafd
+.value 0x309a,0x309a
+.value 0x309a,0x309a
+.value 0xc140,0xc140
+.value 0xc140,0xc140
+.value 0x9808,0x9808
+.value 0x9808,0x9808
+.value 0x31fd,0x31fd
+.value 0x31fd,0x31fd
+.value 0x82,0x82
+.value 0x82,0x82
+.value 0x82,0x82
+.value 0x82,0x82
+.value 0x642,0x642
+.value 0x642,0x642
+.value 0x642,0x642
+.value 0x642,0x642
+.value 0x6682,0x6682
+.value 0x6682,0x6682
+.value 0x6682,0x6682
+.value 0x6682,0x6682
+.value 0xac42,0xac42
+.value 0xac42,0xac42
+.value 0xac42,0xac42
+.value 0xac42,0xac42
+.value 0x74f,0x74f
+.value 0x74f,0x74f
+.value 0x74f,0x74f
+.value 0x74f,0x74f
+.value 0x33d,0x33d
+.value 0x33d,0x33d
+.value 0x33d,0x33d
+.value 0x33d,0x33d
+.value 0x44f,0x44f
+.value 0x44f,0x44f
+.value 0x44f,0x44f
+.value 0x44f,0x44f
+.value 0xea3d,0xea3d
+.value 0xea3d,0xea3d
+.value 0xea3d,0xea3d
+.value 0xea3d,0xea3d
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0xc4b,0xc4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x3d4b,0x3d4b
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0x6d8,0x6d8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0xed8,0xed8
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x773,0x773
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x3073,0x3073
+.value 0x68c,0x68c
+.value 0x1cc,0x1cc
+.value 0x6db,0x6db
+.value 0x123,0x123
+.value 0xeb,0xeb
+.value 0xab6,0xab6
+.value 0xc50,0xc50
+.value 0xb5b,0xb5b
+.value 0xea8c,0xea8c
+.value 0xa5cc,0xa5cc
+.value 0xe7db,0xe7db
+.value 0x3a23,0x3a23
+.value 0x11eb,0x11eb
+.value 0xccb6,0xccb6
+.value 0xfc50,0xfc50
+.value 0x6c5b,0x6c5b
+.value 0xc98,0xc98
+.value 0x99a,0x99a
+.value 0x6f3,0x6f3
+.value 0x4e3,0x4e3
+.value 0x9b6,0x9b6
+.value 0xb53,0xb53
+.value 0xad6,0xad6
+.value 0x44f,0x44f
+.value 0x5498,0x5498
+.value 0x379a,0x379a
+.value 0xaff3,0xaff3
+.value 0x7de3,0x7de3
+.value 0xcbb6,0xcbb6
+.value 0xd453,0xd453
+.value 0x2cd6,0x2cd6
+.value 0x14f,0x14f
+.value 0x608,0x608
+.value 0x608,0x608
+.value 0x11a,0x11a
+.value 0x11a,0x11a
+.value 0x72e,0x72e
+.value 0x72e,0x72e
+.value 0x50d,0x50d
+.value 0x50d,0x50d
+.value 0x9e08,0x9e08
+.value 0x9e08,0x9e08
+.value 0xaf1a,0xaf1a
+.value 0xaf1a,0xaf1a
+.value 0xb12e,0xb12e
+.value 0xb12e,0xb12e
+.value 0x5c0d,0x5c0d
+.value 0x5c0d,0x5c0d
+.value 0x90a,0x90a
+.value 0x90a,0x90a
+.value 0x228,0x228
+.value 0x228,0x228
+.value 0xa75,0xa75
+.value 0xa75,0xa75
+.value 0x83a,0x83a
+.value 0x83a,0x83a
+.value 0x870a,0x870a
+.value 0x870a,0x870a
+.value 0xfa28,0xfa28
+.value 0xfa28,0xfa28
+.value 0x1975,0x1975
+.value 0x1975,0x1975
+.value 0x163a,0x163a
+.value 0x163a,0x163a
+.value 0xb82,0xb82
+.value 0xb82,0xb82
+.value 0xb82,0xb82
+.value 0xb82,0xb82
+.value 0xbf9,0xbf9
+.value 0xbf9,0xbf9
+.value 0xbf9,0xbf9
+.value 0xbf9,0xbf9
+.value 0x7182,0x7182
+.value 0x7182,0x7182
+.value 0x7182,0x7182
+.value 0x7182,0x7182
+.value 0x66f9,0x66f9
+.value 0x66f9,0x66f9
+.value 0x66f9,0x66f9
+.value 0x66f9,0x66f9
+.value 0x52d,0x52d
+.value 0x52d,0x52d
+.value 0x52d,0x52d
+.value 0x52d,0x52d
+.value 0xac4,0xac4
+.value 0xac4,0xac4
+.value 0xac4,0xac4
+.value 0xac4,0xac4
+.value 0xbc2d,0xbc2d
+.value 0xbc2d,0xbc2d
+.value 0xbc2d,0xbc2d
+.value 0xbc2d,0xbc2d
+.value 0x16c4,0x16c4
+.value 0x16c4,0x16c4
+.value 0x16c4,0x16c4
+.value 0x16c4,0x16c4
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0xa93,0xa93
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0x9393,0x9393
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0xab,0xab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x51ab,0x51ab
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0x72c,0x72c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0xcb2c,0xcb2c
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0x167,0x167
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0xc667,0xc667
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x2f6,0x2f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x84f6,0x84f6
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0x5a1,0x5a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+.value 0xd8a1,0xd8a1
+#ifndef __APPLE__
+.text
+.globl kyber_keygen_avx2
+.type kyber_keygen_avx2,@function
+.align 16
+kyber_keygen_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_keygen_avx2
+.p2align 4
+_kyber_keygen_avx2:
+#endif /* __APPLE__ */
+ vmovdqu kyber_q(%rip), %ymm14
+ vmovdqu kyber_v(%rip), %ymm15
+ movq %r8, %r9
+ movq %rdi, %r10
+L_kyber_keygen_avx2_priv:
+ # ntt
+ leaq L_kyber_avx2_zetas(%rip), %r11
+ vmovdqu (%r11), %ymm10
+ vmovdqu 32(%r11), %ymm12
+ vmovdqu 128(%r10), %ymm0
+ vmovdqu 160(%r10), %ymm1
+ vmovdqu 192(%r10), %ymm2
+ vmovdqu 224(%r10), %ymm3
+ vmovdqu 384(%r10), %ymm4
+ vmovdqu 416(%r10), %ymm5
+ vmovdqu 448(%r10), %ymm6
+ vmovdqu 480(%r10), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%r10)
+ vmovdqu %ymm1, 160(%r10)
+ vmovdqu %ymm2, 192(%r10)
+ vmovdqu %ymm3, 224(%r10)
+ vmovdqu %ymm4, 384(%r10)
+ vmovdqu %ymm5, 416(%r10)
+ vmovdqu %ymm6, 448(%r10)
+ vmovdqu %ymm7, 480(%r10)
+ vmovdqu (%r10), %ymm0
+ vmovdqu 32(%r10), %ymm1
+ vmovdqu 64(%r10), %ymm2
+ vmovdqu 96(%r10), %ymm3
+ vmovdqu 256(%r10), %ymm4
+ vmovdqu 288(%r10), %ymm5
+ vmovdqu 320(%r10), %ymm6
+ vmovdqu 352(%r10), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm4, 256(%r10)
+ vmovdqu %ymm5, 288(%r10)
+ vmovdqu %ymm6, 320(%r10)
+ vmovdqu %ymm7, 352(%r10)
+ vmovdqu 128(%r10), %ymm4
+ vmovdqu 160(%r10), %ymm5
+ vmovdqu 192(%r10), %ymm6
+ vmovdqu 224(%r10), %ymm7
+ # 64: 0/3
+ vmovdqu 64(%r11), %ymm10
+ vmovdqu 96(%r11), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 0/3
+ vmovdqu 128(%r11), %ymm10
+ vmovdqu 160(%r11), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 0/3
+ vmovdqu 192(%r11), %ymm10
+ vmovdqu 224(%r11), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 0/3
+ vmovdqu 256(%r11), %ymm10
+ vmovdqu 288(%r11), %ymm12
+ vmovdqu 320(%r11), %ymm11
+ vmovdqu 352(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 0/3
+ vmovdqu 384(%r11), %ymm10
+ vmovdqu 416(%r11), %ymm12
+ vmovdqu 448(%r11), %ymm11
+ vmovdqu 480(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 0/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 512(%r11), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 544(%r11), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 576(%r11), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 608(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 640(%r11), %ymm10
+ vmovdqu 672(%r11), %ymm12
+ vmovdqu 704(%r11), %ymm11
+ vmovdqu 736(%r11), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 0/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 768(%r11), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 800(%r11), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 832(%r11), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 864(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 896(%r11), %ymm10
+ vmovdqu 928(%r11), %ymm12
+ vmovdqu 960(%r11), %ymm11
+ vmovdqu 992(%r11), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 0/3
+ vmovdqu 1024(%r11), %ymm10
+ vmovdqu 1056(%r11), %ymm12
+ vmovdqu 1088(%r11), %ymm11
+ vmovdqu 1120(%r11), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 0/3
+ vmovdqu 1152(%r11), %ymm10
+ vmovdqu 1184(%r11), %ymm12
+ vmovdqu 1216(%r11), %ymm11
+ vmovdqu 1248(%r11), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vpmulhw %ymm15, %ymm0, %ymm8
+ vpmulhw %ymm15, %ymm1, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm8
+ vpsubw %ymm9, %ymm1, %ymm9
+ vmovdqu %ymm8, (%r10)
+ vmovdqu %ymm9, 32(%r10)
+ vpmulhw %ymm15, %ymm2, %ymm8
+ vpmulhw %ymm15, %ymm3, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vmovdqu %ymm8, 64(%r10)
+ vmovdqu %ymm9, 96(%r10)
+ vpmulhw %ymm15, %ymm4, %ymm8
+ vpmulhw %ymm15, %ymm5, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vmovdqu %ymm8, 128(%r10)
+ vmovdqu %ymm9, 160(%r10)
+ vpmulhw %ymm15, %ymm6, %ymm8
+ vpmulhw %ymm15, %ymm7, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vmovdqu %ymm8, 192(%r10)
+ vmovdqu %ymm9, 224(%r10)
+ vmovdqu 256(%r10), %ymm0
+ vmovdqu 288(%r10), %ymm1
+ vmovdqu 320(%r10), %ymm2
+ vmovdqu 352(%r10), %ymm3
+ vmovdqu 384(%r10), %ymm4
+ vmovdqu 416(%r10), %ymm5
+ vmovdqu 448(%r10), %ymm6
+ vmovdqu 480(%r10), %ymm7
+ # 64: 1/3
+ vmovdqu 1280(%r11), %ymm10
+ vmovdqu 1312(%r11), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 1/3
+ vmovdqu 1344(%r11), %ymm10
+ vmovdqu 1376(%r11), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 1/3
+ vmovdqu 1408(%r11), %ymm10
+ vmovdqu 1440(%r11), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 1/3
+ vmovdqu 1472(%r11), %ymm10
+ vmovdqu 1504(%r11), %ymm12
+ vmovdqu 1536(%r11), %ymm11
+ vmovdqu 1568(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 1/3
+ vmovdqu 1600(%r11), %ymm10
+ vmovdqu 1632(%r11), %ymm12
+ vmovdqu 1664(%r11), %ymm11
+ vmovdqu 1696(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 1/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1728(%r11), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 1760(%r11), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 1792(%r11), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 1824(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 1856(%r11), %ymm10
+ vmovdqu 1888(%r11), %ymm12
+ vmovdqu 1920(%r11), %ymm11
+ vmovdqu 1952(%r11), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 1/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1984(%r11), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 2016(%r11), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 2048(%r11), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 2080(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 2112(%r11), %ymm10
+ vmovdqu 2144(%r11), %ymm12
+ vmovdqu 2176(%r11), %ymm11
+ vmovdqu 2208(%r11), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 1/3
+ vmovdqu 2240(%r11), %ymm10
+ vmovdqu 2272(%r11), %ymm12
+ vmovdqu 2304(%r11), %ymm11
+ vmovdqu 2336(%r11), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 1/3
+ vmovdqu 2368(%r11), %ymm10
+ vmovdqu 2400(%r11), %ymm12
+ vmovdqu 2432(%r11), %ymm11
+ vmovdqu 2464(%r11), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vpmulhw %ymm15, %ymm0, %ymm8
+ vpmulhw %ymm15, %ymm1, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm8
+ vpsubw %ymm9, %ymm1, %ymm9
+ vmovdqu %ymm8, 256(%r10)
+ vmovdqu %ymm9, 288(%r10)
+ vpmulhw %ymm15, %ymm2, %ymm8
+ vpmulhw %ymm15, %ymm3, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vmovdqu %ymm8, 320(%r10)
+ vmovdqu %ymm9, 352(%r10)
+ vpmulhw %ymm15, %ymm4, %ymm8
+ vpmulhw %ymm15, %ymm5, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vmovdqu %ymm8, 384(%r10)
+ vmovdqu %ymm9, 416(%r10)
+ vpmulhw %ymm15, %ymm6, %ymm8
+ vpmulhw %ymm15, %ymm7, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vmovdqu %ymm8, 448(%r10)
+ vmovdqu %ymm9, 480(%r10)
+ addq $0x200, %r10
+ subq $0x01, %r9
+ jg L_kyber_keygen_avx2_priv
+ vmovdqu kyber_qinv(%rip), %ymm13
+ movq %r8, %rax
+ movq %rsi, %r10
+L_kyber_keygen_avx2_acc:
+ # Pointwise acc mont
+ movq %r8, %r9
+ # Base mul mont
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r11
+ vmovdqu (%rcx), %ymm2
+ vmovdqu 32(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%rdi), %ymm4
+ vmovdqu 32(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r11), %ymm10
+ vmovdqu 32(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, (%r10)
+ vmovdqu %ymm1, 32(%r10)
+ vmovdqu 64(%rcx), %ymm2
+ vmovdqu 96(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%rdi), %ymm4
+ vmovdqu 96(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r11), %ymm10
+ vmovdqu 96(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%r10)
+ vmovdqu %ymm1, 96(%r10)
+ vmovdqu 128(%rcx), %ymm2
+ vmovdqu 160(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r11), %ymm10
+ vmovdqu 160(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%r10)
+ vmovdqu %ymm1, 160(%r10)
+ vmovdqu 192(%rcx), %ymm2
+ vmovdqu 224(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%rdi), %ymm4
+ vmovdqu 224(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r11), %ymm10
+ vmovdqu 224(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%r10)
+ vmovdqu %ymm1, 224(%r10)
+ vmovdqu 256(%rcx), %ymm2
+ vmovdqu 288(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%rdi), %ymm4
+ vmovdqu 288(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r11), %ymm10
+ vmovdqu 288(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%r10)
+ vmovdqu %ymm1, 288(%r10)
+ vmovdqu 320(%rcx), %ymm2
+ vmovdqu 352(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%rdi), %ymm4
+ vmovdqu 352(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r11), %ymm10
+ vmovdqu 352(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%r10)
+ vmovdqu %ymm1, 352(%r10)
+ vmovdqu 384(%rcx), %ymm2
+ vmovdqu 416(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%rdi), %ymm4
+ vmovdqu 416(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r11), %ymm10
+ vmovdqu 416(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%r10)
+ vmovdqu %ymm1, 416(%r10)
+ vmovdqu 448(%rcx), %ymm2
+ vmovdqu 480(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%rdi), %ymm4
+ vmovdqu 480(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r11), %ymm10
+ vmovdqu 480(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%r10)
+ vmovdqu %ymm1, 480(%r10)
+ addq $0x200, %rcx
+ addq $0x200, %rdi
+ subq $2, %r9
+ jz L_pointwise_acc_mont_end_keygen
+L_pointwise_acc_mont_start_keygen:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r11
+ vmovdqu (%rcx), %ymm2
+ vmovdqu 32(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%rdi), %ymm4
+ vmovdqu 32(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r11), %ymm10
+ vmovdqu 32(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%r10), %ymm6
+ vmovdqu 32(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%r10)
+ vmovdqu %ymm1, 32(%r10)
+ vmovdqu 64(%rcx), %ymm2
+ vmovdqu 96(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%rdi), %ymm4
+ vmovdqu 96(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r11), %ymm10
+ vmovdqu 96(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%r10), %ymm6
+ vmovdqu 96(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%r10)
+ vmovdqu %ymm1, 96(%r10)
+ vmovdqu 128(%rcx), %ymm2
+ vmovdqu 160(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r11), %ymm10
+ vmovdqu 160(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%r10), %ymm6
+ vmovdqu 160(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%r10)
+ vmovdqu %ymm1, 160(%r10)
+ vmovdqu 192(%rcx), %ymm2
+ vmovdqu 224(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%rdi), %ymm4
+ vmovdqu 224(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r11), %ymm10
+ vmovdqu 224(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%r10), %ymm6
+ vmovdqu 224(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%r10)
+ vmovdqu %ymm1, 224(%r10)
+ vmovdqu 256(%rcx), %ymm2
+ vmovdqu 288(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%rdi), %ymm4
+ vmovdqu 288(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r11), %ymm10
+ vmovdqu 288(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%r10), %ymm6
+ vmovdqu 288(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%r10)
+ vmovdqu %ymm1, 288(%r10)
+ vmovdqu 320(%rcx), %ymm2
+ vmovdqu 352(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%rdi), %ymm4
+ vmovdqu 352(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r11), %ymm10
+ vmovdqu 352(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%r10), %ymm6
+ vmovdqu 352(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%r10)
+ vmovdqu %ymm1, 352(%r10)
+ vmovdqu 384(%rcx), %ymm2
+ vmovdqu 416(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%rdi), %ymm4
+ vmovdqu 416(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r11), %ymm10
+ vmovdqu 416(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%r10), %ymm6
+ vmovdqu 416(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%r10)
+ vmovdqu %ymm1, 416(%r10)
+ vmovdqu 448(%rcx), %ymm2
+ vmovdqu 480(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%rdi), %ymm4
+ vmovdqu 480(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r11), %ymm10
+ vmovdqu 480(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%r10), %ymm6
+ vmovdqu 480(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%r10)
+ vmovdqu %ymm1, 480(%r10)
+ addq $0x200, %rcx
+ addq $0x200, %rdi
+ subq $0x01, %r9
+ jg L_pointwise_acc_mont_start_keygen
+L_pointwise_acc_mont_end_keygen:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r11
+ vmovdqu (%rcx), %ymm2
+ vmovdqu 32(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%rdi), %ymm4
+ vmovdqu 32(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r11), %ymm10
+ vmovdqu 32(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%r10), %ymm6
+ vmovdqu 32(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%r10)
+ vmovdqu %ymm1, 32(%r10)
+ vmovdqu 64(%rcx), %ymm2
+ vmovdqu 96(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%rdi), %ymm4
+ vmovdqu 96(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r11), %ymm10
+ vmovdqu 96(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%r10), %ymm6
+ vmovdqu 96(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%r10)
+ vmovdqu %ymm1, 96(%r10)
+ vmovdqu 128(%rcx), %ymm2
+ vmovdqu 160(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r11), %ymm10
+ vmovdqu 160(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%r10), %ymm6
+ vmovdqu 160(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%r10)
+ vmovdqu %ymm1, 160(%r10)
+ vmovdqu 192(%rcx), %ymm2
+ vmovdqu 224(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%rdi), %ymm4
+ vmovdqu 224(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r11), %ymm10
+ vmovdqu 224(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%r10), %ymm6
+ vmovdqu 224(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%r10)
+ vmovdqu %ymm1, 224(%r10)
+ vmovdqu 256(%rcx), %ymm2
+ vmovdqu 288(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%rdi), %ymm4
+ vmovdqu 288(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r11), %ymm10
+ vmovdqu 288(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%r10), %ymm6
+ vmovdqu 288(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%r10)
+ vmovdqu %ymm1, 288(%r10)
+ vmovdqu 320(%rcx), %ymm2
+ vmovdqu 352(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%rdi), %ymm4
+ vmovdqu 352(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r11), %ymm10
+ vmovdqu 352(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%r10), %ymm6
+ vmovdqu 352(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%r10)
+ vmovdqu %ymm1, 352(%r10)
+ vmovdqu 384(%rcx), %ymm2
+ vmovdqu 416(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%rdi), %ymm4
+ vmovdqu 416(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r11), %ymm10
+ vmovdqu 416(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%r10), %ymm6
+ vmovdqu 416(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%r10)
+ vmovdqu %ymm1, 416(%r10)
+ vmovdqu 448(%rcx), %ymm2
+ vmovdqu 480(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%rdi), %ymm4
+ vmovdqu 480(%rdi), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r11), %ymm10
+ vmovdqu 480(%r11), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm13, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%r10), %ymm6
+ vmovdqu 480(%r10), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%r10)
+ vmovdqu %ymm1, 480(%r10)
+ addq $0x200, %rcx
+ addq $0x200, %rdi
+ movq %r8, %r9
+ shl $9, %r9d
+ subq %r9, %rdi
+ addq $0x200, %r10
+ subq $0x01, %rax
+ jg L_kyber_keygen_avx2_acc
+ movq %r8, %rax
+ vmovdqu kyber_f(%rip), %ymm12
+ vmovdqu kyber_f_qinv(%rip), %ymm13
+ movq %r8, %rax
+ movq %rsi, %r10
+L_kyber_keygen_avx2_to_mont:
+ # To Mont
+ vmovdqu (%r10), %ymm0
+ vmovdqu 32(%r10), %ymm1
+ vmovdqu 64(%r10), %ymm2
+ vmovdqu 96(%r10), %ymm3
+ vpmullw %ymm13, %ymm0, %ymm4
+ vpmulhw %ymm12, %ymm0, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm0
+ vpmullw %ymm13, %ymm1, %ymm4
+ vpmulhw %ymm12, %ymm1, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm4
+ vpmulhw %ymm12, %ymm2, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm2
+ vpmullw %ymm13, %ymm3, %ymm4
+ vpmulhw %ymm12, %ymm3, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm3
+ vmovdqu %ymm0, (%r10)
+ vmovdqu %ymm1, 32(%r10)
+ vmovdqu %ymm2, 64(%r10)
+ vmovdqu %ymm3, 96(%r10)
+ vmovdqu 128(%r10), %ymm0
+ vmovdqu 160(%r10), %ymm1
+ vmovdqu 192(%r10), %ymm2
+ vmovdqu 224(%r10), %ymm3
+ vpmullw %ymm13, %ymm0, %ymm4
+ vpmulhw %ymm12, %ymm0, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm0
+ vpmullw %ymm13, %ymm1, %ymm4
+ vpmulhw %ymm12, %ymm1, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm4
+ vpmulhw %ymm12, %ymm2, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm2
+ vpmullw %ymm13, %ymm3, %ymm4
+ vpmulhw %ymm12, %ymm3, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm3
+ vmovdqu %ymm0, 128(%r10)
+ vmovdqu %ymm1, 160(%r10)
+ vmovdqu %ymm2, 192(%r10)
+ vmovdqu %ymm3, 224(%r10)
+ vmovdqu 256(%r10), %ymm0
+ vmovdqu 288(%r10), %ymm1
+ vmovdqu 320(%r10), %ymm2
+ vmovdqu 352(%r10), %ymm3
+ vpmullw %ymm13, %ymm0, %ymm4
+ vpmulhw %ymm12, %ymm0, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm0
+ vpmullw %ymm13, %ymm1, %ymm4
+ vpmulhw %ymm12, %ymm1, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm4
+ vpmulhw %ymm12, %ymm2, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm2
+ vpmullw %ymm13, %ymm3, %ymm4
+ vpmulhw %ymm12, %ymm3, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm3
+ vmovdqu %ymm0, 256(%r10)
+ vmovdqu %ymm1, 288(%r10)
+ vmovdqu %ymm2, 320(%r10)
+ vmovdqu %ymm3, 352(%r10)
+ vmovdqu 384(%r10), %ymm0
+ vmovdqu 416(%r10), %ymm1
+ vmovdqu 448(%r10), %ymm2
+ vmovdqu 480(%r10), %ymm3
+ vpmullw %ymm13, %ymm0, %ymm4
+ vpmulhw %ymm12, %ymm0, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm0
+ vpmullw %ymm13, %ymm1, %ymm4
+ vpmulhw %ymm12, %ymm1, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm4
+ vpmulhw %ymm12, %ymm2, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm2
+ vpmullw %ymm13, %ymm3, %ymm4
+ vpmulhw %ymm12, %ymm3, %ymm5
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpsubw %ymm4, %ymm5, %ymm3
+ vmovdqu %ymm0, 384(%r10)
+ vmovdqu %ymm1, 416(%r10)
+ vmovdqu %ymm2, 448(%r10)
+ vmovdqu %ymm3, 480(%r10)
+ addq $0x200, %r10
+ subq $0x01, %rax
+ jg L_kyber_keygen_avx2_to_mont
+ movq %r8, %rax
+L_kyber_keygen_avx2_to_mont_ntt_err:
+ # ntt
+ leaq L_kyber_avx2_zetas(%rip), %r11
+ vmovdqu (%r11), %ymm10
+ vmovdqu 32(%r11), %ymm12
+ vmovdqu 128(%rdx), %ymm0
+ vmovdqu 160(%rdx), %ymm1
+ vmovdqu 192(%rdx), %ymm2
+ vmovdqu 224(%rdx), %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vmovdqu 448(%rdx), %ymm6
+ vmovdqu 480(%rdx), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu %ymm2, 192(%rdx)
+ vmovdqu %ymm3, 224(%rdx)
+ vmovdqu %ymm4, 384(%rdx)
+ vmovdqu %ymm5, 416(%rdx)
+ vmovdqu %ymm6, 448(%rdx)
+ vmovdqu %ymm7, 480(%rdx)
+ vmovdqu (%rdx), %ymm0
+ vmovdqu 32(%rdx), %ymm1
+ vmovdqu 64(%rdx), %ymm2
+ vmovdqu 96(%rdx), %ymm3
+ vmovdqu 256(%rdx), %ymm4
+ vmovdqu 288(%rdx), %ymm5
+ vmovdqu 320(%rdx), %ymm6
+ vmovdqu 352(%rdx), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm4, 256(%rdx)
+ vmovdqu %ymm5, 288(%rdx)
+ vmovdqu %ymm6, 320(%rdx)
+ vmovdqu %ymm7, 352(%rdx)
+ vmovdqu 128(%rdx), %ymm4
+ vmovdqu 160(%rdx), %ymm5
+ vmovdqu 192(%rdx), %ymm6
+ vmovdqu 224(%rdx), %ymm7
+ # 64: 0/3
+ vmovdqu 64(%r11), %ymm10
+ vmovdqu 96(%r11), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 0/3
+ vmovdqu 128(%r11), %ymm10
+ vmovdqu 160(%r11), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 0/3
+ vmovdqu 192(%r11), %ymm10
+ vmovdqu 224(%r11), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 0/3
+ vmovdqu 256(%r11), %ymm10
+ vmovdqu 288(%r11), %ymm12
+ vmovdqu 320(%r11), %ymm11
+ vmovdqu 352(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 0/3
+ vmovdqu 384(%r11), %ymm10
+ vmovdqu 416(%r11), %ymm12
+ vmovdqu 448(%r11), %ymm11
+ vmovdqu 480(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 0/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 512(%r11), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 544(%r11), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 576(%r11), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 608(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 640(%r11), %ymm10
+ vmovdqu 672(%r11), %ymm12
+ vmovdqu 704(%r11), %ymm11
+ vmovdqu 736(%r11), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 0/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 768(%r11), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 800(%r11), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 832(%r11), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 864(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 896(%r11), %ymm10
+ vmovdqu 928(%r11), %ymm12
+ vmovdqu 960(%r11), %ymm11
+ vmovdqu 992(%r11), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 0/3
+ vmovdqu 1024(%r11), %ymm10
+ vmovdqu 1056(%r11), %ymm12
+ vmovdqu 1088(%r11), %ymm11
+ vmovdqu 1120(%r11), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 0/3
+ vmovdqu 1152(%r11), %ymm10
+ vmovdqu 1184(%r11), %ymm12
+ vmovdqu 1216(%r11), %ymm11
+ vmovdqu 1248(%r11), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu %ymm2, 64(%rdx)
+ vmovdqu %ymm3, 96(%rdx)
+ vmovdqu %ymm4, 128(%rdx)
+ vmovdqu %ymm5, 160(%rdx)
+ vmovdqu %ymm6, 192(%rdx)
+ vmovdqu %ymm7, 224(%rdx)
+ vmovdqu 256(%rdx), %ymm0
+ vmovdqu 288(%rdx), %ymm1
+ vmovdqu 320(%rdx), %ymm2
+ vmovdqu 352(%rdx), %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vmovdqu 448(%rdx), %ymm6
+ vmovdqu 480(%rdx), %ymm7
+ # 64: 1/3
+ vmovdqu 1280(%r11), %ymm10
+ vmovdqu 1312(%r11), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 1/3
+ vmovdqu 1344(%r11), %ymm10
+ vmovdqu 1376(%r11), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 1/3
+ vmovdqu 1408(%r11), %ymm10
+ vmovdqu 1440(%r11), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 1/3
+ vmovdqu 1472(%r11), %ymm10
+ vmovdqu 1504(%r11), %ymm12
+ vmovdqu 1536(%r11), %ymm11
+ vmovdqu 1568(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 1/3
+ vmovdqu 1600(%r11), %ymm10
+ vmovdqu 1632(%r11), %ymm12
+ vmovdqu 1664(%r11), %ymm11
+ vmovdqu 1696(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 1/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1728(%r11), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 1760(%r11), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 1792(%r11), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 1824(%r11), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 1856(%r11), %ymm10
+ vmovdqu 1888(%r11), %ymm12
+ vmovdqu 1920(%r11), %ymm11
+ vmovdqu 1952(%r11), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 1/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1984(%r11), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 2016(%r11), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 2048(%r11), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 2080(%r11), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 2112(%r11), %ymm10
+ vmovdqu 2144(%r11), %ymm12
+ vmovdqu 2176(%r11), %ymm11
+ vmovdqu 2208(%r11), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 1/3
+ vmovdqu 2240(%r11), %ymm10
+ vmovdqu 2272(%r11), %ymm12
+ vmovdqu 2304(%r11), %ymm11
+ vmovdqu 2336(%r11), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 1/3
+ vmovdqu 2368(%r11), %ymm10
+ vmovdqu 2400(%r11), %ymm12
+ vmovdqu 2432(%r11), %ymm11
+ vmovdqu 2464(%r11), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu %ymm2, 320(%rdx)
+ vmovdqu %ymm3, 352(%rdx)
+ vmovdqu %ymm4, 384(%rdx)
+ vmovdqu %ymm5, 416(%rdx)
+ vmovdqu %ymm6, 448(%rdx)
+ vmovdqu %ymm7, 480(%rdx)
+ # Add Errors
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu (%rdx), %ymm4
+ vmovdqu 32(%rdx), %ymm5
+ vmovdqu 64(%rdx), %ymm6
+ vmovdqu 96(%rdx), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm1
+ vmovdqu 192(%rsi), %ymm2
+ vmovdqu 224(%rsi), %ymm3
+ vmovdqu 128(%rdx), %ymm4
+ vmovdqu 160(%rdx), %ymm5
+ vmovdqu 192(%rdx), %ymm6
+ vmovdqu 224(%rdx), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu %ymm2, 192(%rsi)
+ vmovdqu %ymm3, 224(%rsi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vmovdqu 320(%rsi), %ymm2
+ vmovdqu 352(%rsi), %ymm3
+ vmovdqu 256(%rdx), %ymm4
+ vmovdqu 288(%rdx), %ymm5
+ vmovdqu 320(%rdx), %ymm6
+ vmovdqu 352(%rdx), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu %ymm2, 320(%rsi)
+ vmovdqu %ymm3, 352(%rsi)
+ vmovdqu 384(%rsi), %ymm0
+ vmovdqu 416(%rsi), %ymm1
+ vmovdqu 448(%rsi), %ymm2
+ vmovdqu 480(%rsi), %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vmovdqu 448(%rdx), %ymm6
+ vmovdqu 480(%rdx), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu %ymm2, 448(%rsi)
+ vmovdqu %ymm3, 480(%rsi)
+ addq $0x200, %rdx
+ addq $0x200, %rsi
+ subq $0x01, %rax
+ jg L_kyber_keygen_avx2_to_mont_ntt_err
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_keygen_avx2,.-kyber_keygen_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_encapsulate_avx2
+.type kyber_encapsulate_avx2,@function
+.align 16
+kyber_encapsulate_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_encapsulate_avx2
+.p2align 4
+_kyber_encapsulate_avx2:
+#endif /* __APPLE__ */
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ movq 40(%rsp), %rax
+ movq 48(%rsp), %r10
+ movq 56(%rsp), %r11
+ subq $48, %rsp
+ vmovdqu kyber_q(%rip), %ymm14
+ vmovdqu kyber_v(%rip), %ymm15
+ movq %r11, %r13
+ movq %r8, %r14
+L_kyber_encapsulate_avx2_trans:
+ # ntt
+ leaq L_kyber_avx2_zetas(%rip), %r15
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm12
+ vmovdqu 128(%r14), %ymm0
+ vmovdqu 160(%r14), %ymm1
+ vmovdqu 192(%r14), %ymm2
+ vmovdqu 224(%r14), %ymm3
+ vmovdqu 384(%r14), %ymm4
+ vmovdqu 416(%r14), %ymm5
+ vmovdqu 448(%r14), %ymm6
+ vmovdqu 480(%r14), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%r14)
+ vmovdqu %ymm1, 160(%r14)
+ vmovdqu %ymm2, 192(%r14)
+ vmovdqu %ymm3, 224(%r14)
+ vmovdqu %ymm4, 384(%r14)
+ vmovdqu %ymm5, 416(%r14)
+ vmovdqu %ymm6, 448(%r14)
+ vmovdqu %ymm7, 480(%r14)
+ vmovdqu (%r14), %ymm0
+ vmovdqu 32(%r14), %ymm1
+ vmovdqu 64(%r14), %ymm2
+ vmovdqu 96(%r14), %ymm3
+ vmovdqu 256(%r14), %ymm4
+ vmovdqu 288(%r14), %ymm5
+ vmovdqu 320(%r14), %ymm6
+ vmovdqu 352(%r14), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm4, 256(%r14)
+ vmovdqu %ymm5, 288(%r14)
+ vmovdqu %ymm6, 320(%r14)
+ vmovdqu %ymm7, 352(%r14)
+ vmovdqu 128(%r14), %ymm4
+ vmovdqu 160(%r14), %ymm5
+ vmovdqu 192(%r14), %ymm6
+ vmovdqu 224(%r14), %ymm7
+ # 64: 0/3
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 0/3
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 0/3
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 0/3
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm12
+ vmovdqu 320(%r15), %ymm11
+ vmovdqu 352(%r15), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 0/3
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm12
+ vmovdqu 448(%r15), %ymm11
+ vmovdqu 480(%r15), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 0/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 512(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 544(%r15), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 576(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 608(%r15), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 640(%r15), %ymm10
+ vmovdqu 672(%r15), %ymm12
+ vmovdqu 704(%r15), %ymm11
+ vmovdqu 736(%r15), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 0/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 768(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 800(%r15), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 832(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 864(%r15), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 896(%r15), %ymm10
+ vmovdqu 928(%r15), %ymm12
+ vmovdqu 960(%r15), %ymm11
+ vmovdqu 992(%r15), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 0/3
+ vmovdqu 1024(%r15), %ymm10
+ vmovdqu 1056(%r15), %ymm12
+ vmovdqu 1088(%r15), %ymm11
+ vmovdqu 1120(%r15), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 0/3
+ vmovdqu 1152(%r15), %ymm10
+ vmovdqu 1184(%r15), %ymm12
+ vmovdqu 1216(%r15), %ymm11
+ vmovdqu 1248(%r15), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vmovdqu %ymm0, (%r14)
+ vmovdqu %ymm1, 32(%r14)
+ vmovdqu %ymm2, 64(%r14)
+ vmovdqu %ymm3, 96(%r14)
+ vmovdqu %ymm4, 128(%r14)
+ vmovdqu %ymm5, 160(%r14)
+ vmovdqu %ymm6, 192(%r14)
+ vmovdqu %ymm7, 224(%r14)
+ vmovdqu 256(%r14), %ymm0
+ vmovdqu 288(%r14), %ymm1
+ vmovdqu 320(%r14), %ymm2
+ vmovdqu 352(%r14), %ymm3
+ vmovdqu 384(%r14), %ymm4
+ vmovdqu 416(%r14), %ymm5
+ vmovdqu 448(%r14), %ymm6
+ vmovdqu 480(%r14), %ymm7
+ # 64: 1/3
+ vmovdqu 1280(%r15), %ymm10
+ vmovdqu 1312(%r15), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 1/3
+ vmovdqu 1344(%r15), %ymm10
+ vmovdqu 1376(%r15), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 1/3
+ vmovdqu 1408(%r15), %ymm10
+ vmovdqu 1440(%r15), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 1/3
+ vmovdqu 1472(%r15), %ymm10
+ vmovdqu 1504(%r15), %ymm12
+ vmovdqu 1536(%r15), %ymm11
+ vmovdqu 1568(%r15), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 1/3
+ vmovdqu 1600(%r15), %ymm10
+ vmovdqu 1632(%r15), %ymm12
+ vmovdqu 1664(%r15), %ymm11
+ vmovdqu 1696(%r15), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 1/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1728(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 1760(%r15), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 1792(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 1824(%r15), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 1856(%r15), %ymm10
+ vmovdqu 1888(%r15), %ymm12
+ vmovdqu 1920(%r15), %ymm11
+ vmovdqu 1952(%r15), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 1/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1984(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 2016(%r15), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 2048(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 2080(%r15), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 2112(%r15), %ymm10
+ vmovdqu 2144(%r15), %ymm12
+ vmovdqu 2176(%r15), %ymm11
+ vmovdqu 2208(%r15), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 1/3
+ vmovdqu 2240(%r15), %ymm10
+ vmovdqu 2272(%r15), %ymm12
+ vmovdqu 2304(%r15), %ymm11
+ vmovdqu 2336(%r15), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 1/3
+ vmovdqu 2368(%r15), %ymm10
+ vmovdqu 2400(%r15), %ymm12
+ vmovdqu 2432(%r15), %ymm11
+ vmovdqu 2464(%r15), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vmovdqu %ymm0, 256(%r14)
+ vmovdqu %ymm1, 288(%r14)
+ vmovdqu %ymm2, 320(%r14)
+ vmovdqu %ymm3, 352(%r14)
+ vmovdqu %ymm4, 384(%r14)
+ vmovdqu %ymm5, 416(%r14)
+ vmovdqu %ymm6, 448(%r14)
+ vmovdqu %ymm7, 480(%r14)
+ addq $0x200, %r14
+ subq $0x01, %r13
+ jg L_kyber_encapsulate_avx2_trans
+ movq %r11, %r12
+L_kyber_encapsulate_avx2_calc:
+ vmovdqu kyber_qinv(%rip), %ymm12
+ # Pointwise acc mont
+ movq %r11, %r13
+ # Base mul mont
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r15
+ vmovdqu (%rcx), %ymm2
+ vmovdqu 32(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%r8), %ymm4
+ vmovdqu 32(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu 64(%rcx), %ymm2
+ vmovdqu 96(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%r8), %ymm4
+ vmovdqu 96(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm1, 96(%rsi)
+ vmovdqu 128(%rcx), %ymm2
+ vmovdqu 160(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%r8), %ymm4
+ vmovdqu 160(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu 192(%rcx), %ymm2
+ vmovdqu 224(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%r8), %ymm4
+ vmovdqu 224(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rsi)
+ vmovdqu %ymm1, 224(%rsi)
+ vmovdqu 256(%rcx), %ymm2
+ vmovdqu 288(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%r8), %ymm4
+ vmovdqu 288(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu 320(%rcx), %ymm2
+ vmovdqu 352(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%r8), %ymm4
+ vmovdqu 352(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r15), %ymm10
+ vmovdqu 352(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rsi)
+ vmovdqu %ymm1, 352(%rsi)
+ vmovdqu 384(%rcx), %ymm2
+ vmovdqu 416(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%r8), %ymm4
+ vmovdqu 416(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu 448(%rcx), %ymm2
+ vmovdqu 480(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%r8), %ymm4
+ vmovdqu 480(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r15), %ymm10
+ vmovdqu 480(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rsi)
+ vmovdqu %ymm1, 480(%rsi)
+ addq $0x200, %rcx
+ addq $0x200, %r8
+ subq $2, %r13
+ jz L_pointwise_acc_mont_end_encap_bp
+L_pointwise_acc_mont_start_encap_bp:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r15
+ vmovdqu (%rcx), %ymm2
+ vmovdqu 32(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%r8), %ymm4
+ vmovdqu 32(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%rsi), %ymm6
+ vmovdqu 32(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu 64(%rcx), %ymm2
+ vmovdqu 96(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%r8), %ymm4
+ vmovdqu 96(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%rsi), %ymm6
+ vmovdqu 96(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm1, 96(%rsi)
+ vmovdqu 128(%rcx), %ymm2
+ vmovdqu 160(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%r8), %ymm4
+ vmovdqu 160(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%rsi), %ymm6
+ vmovdqu 160(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu 192(%rcx), %ymm2
+ vmovdqu 224(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%r8), %ymm4
+ vmovdqu 224(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rsi)
+ vmovdqu %ymm1, 224(%rsi)
+ vmovdqu 256(%rcx), %ymm2
+ vmovdqu 288(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%r8), %ymm4
+ vmovdqu 288(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%rsi), %ymm6
+ vmovdqu 288(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu 320(%rcx), %ymm2
+ vmovdqu 352(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%r8), %ymm4
+ vmovdqu 352(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r15), %ymm10
+ vmovdqu 352(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%rsi), %ymm6
+ vmovdqu 352(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rsi)
+ vmovdqu %ymm1, 352(%rsi)
+ vmovdqu 384(%rcx), %ymm2
+ vmovdqu 416(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%r8), %ymm4
+ vmovdqu 416(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%rsi), %ymm6
+ vmovdqu 416(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu 448(%rcx), %ymm2
+ vmovdqu 480(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%r8), %ymm4
+ vmovdqu 480(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r15), %ymm10
+ vmovdqu 480(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rsi)
+ vmovdqu %ymm1, 480(%rsi)
+ addq $0x200, %rcx
+ addq $0x200, %r8
+ subq $0x01, %r13
+ jg L_pointwise_acc_mont_start_encap_bp
+L_pointwise_acc_mont_end_encap_bp:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r15
+ vmovdqu (%rcx), %ymm2
+ vmovdqu 32(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%r8), %ymm4
+ vmovdqu 32(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%rsi), %ymm6
+ vmovdqu 32(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu 64(%rcx), %ymm2
+ vmovdqu 96(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%r8), %ymm4
+ vmovdqu 96(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%rsi), %ymm6
+ vmovdqu 96(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm1, 96(%rsi)
+ vmovdqu 128(%rcx), %ymm2
+ vmovdqu 160(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%r8), %ymm4
+ vmovdqu 160(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%rsi), %ymm6
+ vmovdqu 160(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu 192(%rcx), %ymm2
+ vmovdqu 224(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%r8), %ymm4
+ vmovdqu 224(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rsi)
+ vmovdqu %ymm1, 224(%rsi)
+ vmovdqu 256(%rcx), %ymm2
+ vmovdqu 288(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%r8), %ymm4
+ vmovdqu 288(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%rsi), %ymm6
+ vmovdqu 288(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu 320(%rcx), %ymm2
+ vmovdqu 352(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%r8), %ymm4
+ vmovdqu 352(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r15), %ymm10
+ vmovdqu 352(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%rsi), %ymm6
+ vmovdqu 352(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rsi)
+ vmovdqu %ymm1, 352(%rsi)
+ vmovdqu 384(%rcx), %ymm2
+ vmovdqu 416(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%r8), %ymm4
+ vmovdqu 416(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%rsi), %ymm6
+ vmovdqu 416(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu 448(%rcx), %ymm2
+ vmovdqu 480(%rcx), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%r8), %ymm4
+ vmovdqu 480(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r15), %ymm10
+ vmovdqu 480(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rsi)
+ vmovdqu %ymm1, 480(%rsi)
+ addq $0x200, %rcx
+ addq $0x200, %r8
+ movq %r11, %r13
+ shl $9, %r13d
+ subq %r13, %r8
+ # invntt
+ leaq L_kyber_avx2_zetas_inv(%rip), %r15
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu 128(%rsi), %ymm4
+ vmovdqu 160(%rsi), %ymm5
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ # 2: 1/2
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu (%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm9
+ vmovdqu 32(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm0
+ vpsrlq $32, %ymm8, %ymm1
+ vpblendd $0xaa, %ymm0, %ymm8, %ymm0
+ vpblendd $0x55, %ymm1, %ymm9, %ymm1
+ vperm2i128 $32, %ymm3, %ymm2, %ymm8
+ vmovdqu 64(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm9
+ vmovdqu 96(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm2
+ vpsrlq $32, %ymm8, %ymm3
+ vpblendd $0xaa, %ymm2, %ymm8, %ymm2
+ vpblendd $0x55, %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 4: 1/2
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm12
+ vmovdqu 192(%r15), %ymm11
+ vmovdqu 224(%r15), %ymm13
+ vpunpckldq %ymm1, %ymm8, %ymm0
+ vpunpckhdq %ymm1, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm9, %ymm2
+ vpunpckhdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm2
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm8
+ vpsubw %ymm2, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 8: 1/2
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm12
+ vmovdqu 320(%r15), %ymm11
+ vmovdqu 352(%r15), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 16: 1/2
+ vperm2i128 $32, %ymm1, %ymm8, %ymm0
+ vmovdqu 384(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm8, %ymm1
+ vmovdqu 416(%r15), %ymm12
+ vperm2i128 $32, %ymm3, %ymm9, %ymm2
+ vmovdqu 448(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm9, %ymm3
+ vmovdqu 480(%r15), %ymm13
+ vpsubw %ymm1, %ymm0, %ymm8
+ vpsubw %ymm3, %ymm2, %ymm9
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm2, %ymm2
+ vpmullw %ymm12, %ymm8, %ymm1
+ vpmullw %ymm13, %ymm9, %ymm3
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm1, %ymm8, %ymm1
+ vpsubw %ymm3, %ymm9, %ymm3
+ # 32: 1/2
+ vmovdqu 512(%r15), %ymm10
+ vmovdqu 544(%r15), %ymm12
+ vpaddw %ymm2, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm1, %ymm9
+ vpsubw %ymm2, %ymm0, %ymm2
+ vpsubw %ymm3, %ymm1, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm8, %ymm0
+ vpsubw %ymm1, %ymm9, %ymm1
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ # 2: 1/2
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 576(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm9
+ vmovdqu 608(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm4
+ vpsrlq $32, %ymm8, %ymm5
+ vpblendd $0xaa, %ymm4, %ymm8, %ymm4
+ vpblendd $0x55, %ymm5, %ymm9, %ymm5
+ vperm2i128 $32, %ymm7, %ymm6, %ymm8
+ vmovdqu 640(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm9
+ vmovdqu 672(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm6
+ vpsrlq $32, %ymm8, %ymm7
+ vpblendd $0xaa, %ymm6, %ymm8, %ymm6
+ vpblendd $0x55, %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 4: 1/2
+ vmovdqu 704(%r15), %ymm10
+ vmovdqu 736(%r15), %ymm12
+ vmovdqu 768(%r15), %ymm11
+ vmovdqu 800(%r15), %ymm13
+ vpunpckldq %ymm5, %ymm8, %ymm4
+ vpunpckhdq %ymm5, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm9, %ymm6
+ vpunpckhdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm6
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm6, %ymm6
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm8
+ vpsubw %ymm6, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 8: 1/2
+ vmovdqu 832(%r15), %ymm10
+ vmovdqu 864(%r15), %ymm12
+ vmovdqu 896(%r15), %ymm11
+ vmovdqu 928(%r15), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 16: 1/2
+ vperm2i128 $32, %ymm5, %ymm8, %ymm4
+ vmovdqu 960(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm8, %ymm5
+ vmovdqu 992(%r15), %ymm12
+ vperm2i128 $32, %ymm7, %ymm9, %ymm6
+ vmovdqu 1024(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm9, %ymm7
+ vmovdqu 1056(%r15), %ymm13
+ vpsubw %ymm5, %ymm4, %ymm8
+ vpsubw %ymm7, %ymm6, %ymm9
+ vpaddw %ymm5, %ymm4, %ymm4
+ vpaddw %ymm7, %ymm6, %ymm6
+ vpmullw %ymm12, %ymm8, %ymm5
+ vpmullw %ymm13, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm5, %ymm8, %ymm5
+ vpsubw %ymm7, %ymm9, %ymm7
+ # 32: 1/2
+ vmovdqu 1088(%r15), %ymm10
+ vmovdqu 1120(%r15), %ymm12
+ vpaddw %ymm6, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm5, %ymm9
+ vpsubw %ymm6, %ymm4, %ymm6
+ vpsubw %ymm7, %ymm5, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm5
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm5, %ymm5
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ # 64: 1/2
+ vmovdqu 1152(%r15), %ymm10
+ vmovdqu 1184(%r15), %ymm12
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu %ymm4, 128(%rsi)
+ vmovdqu %ymm5, 160(%rsi)
+ vmovdqu %ymm6, 192(%rsi)
+ vmovdqu %ymm7, 224(%rsi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vmovdqu 320(%rsi), %ymm2
+ vmovdqu 352(%rsi), %ymm3
+ vmovdqu 384(%rsi), %ymm4
+ vmovdqu 416(%rsi), %ymm5
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ # 2: 2/2
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1216(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm9
+ vmovdqu 1248(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm0
+ vpsrlq $32, %ymm8, %ymm1
+ vpblendd $0xaa, %ymm0, %ymm8, %ymm0
+ vpblendd $0x55, %ymm1, %ymm9, %ymm1
+ vperm2i128 $32, %ymm3, %ymm2, %ymm8
+ vmovdqu 1280(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm9
+ vmovdqu 1312(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm2
+ vpsrlq $32, %ymm8, %ymm3
+ vpblendd $0xaa, %ymm2, %ymm8, %ymm2
+ vpblendd $0x55, %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 4: 2/2
+ vmovdqu 1344(%r15), %ymm10
+ vmovdqu 1376(%r15), %ymm12
+ vmovdqu 1408(%r15), %ymm11
+ vmovdqu 1440(%r15), %ymm13
+ vpunpckldq %ymm1, %ymm8, %ymm0
+ vpunpckhdq %ymm1, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm9, %ymm2
+ vpunpckhdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm2
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm8
+ vpsubw %ymm2, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 8: 2/2
+ vmovdqu 1472(%r15), %ymm10
+ vmovdqu 1504(%r15), %ymm12
+ vmovdqu 1536(%r15), %ymm11
+ vmovdqu 1568(%r15), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 16: 2/2
+ vperm2i128 $32, %ymm1, %ymm8, %ymm0
+ vmovdqu 1600(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm8, %ymm1
+ vmovdqu 1632(%r15), %ymm12
+ vperm2i128 $32, %ymm3, %ymm9, %ymm2
+ vmovdqu 1664(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm9, %ymm3
+ vmovdqu 1696(%r15), %ymm13
+ vpsubw %ymm1, %ymm0, %ymm8
+ vpsubw %ymm3, %ymm2, %ymm9
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm2, %ymm2
+ vpmullw %ymm12, %ymm8, %ymm1
+ vpmullw %ymm13, %ymm9, %ymm3
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm1, %ymm8, %ymm1
+ vpsubw %ymm3, %ymm9, %ymm3
+ # 32: 2/2
+ vmovdqu 1728(%r15), %ymm10
+ vmovdqu 1760(%r15), %ymm12
+ vpaddw %ymm2, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm1, %ymm9
+ vpsubw %ymm2, %ymm0, %ymm2
+ vpsubw %ymm3, %ymm1, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm8, %ymm0
+ vpsubw %ymm1, %ymm9, %ymm1
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ # 2: 2/2
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1792(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm9
+ vmovdqu 1824(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm4
+ vpsrlq $32, %ymm8, %ymm5
+ vpblendd $0xaa, %ymm4, %ymm8, %ymm4
+ vpblendd $0x55, %ymm5, %ymm9, %ymm5
+ vperm2i128 $32, %ymm7, %ymm6, %ymm8
+ vmovdqu 1856(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm9
+ vmovdqu 1888(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm6
+ vpsrlq $32, %ymm8, %ymm7
+ vpblendd $0xaa, %ymm6, %ymm8, %ymm6
+ vpblendd $0x55, %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 4: 2/2
+ vmovdqu 1920(%r15), %ymm10
+ vmovdqu 1952(%r15), %ymm12
+ vmovdqu 1984(%r15), %ymm11
+ vmovdqu 2016(%r15), %ymm13
+ vpunpckldq %ymm5, %ymm8, %ymm4
+ vpunpckhdq %ymm5, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm9, %ymm6
+ vpunpckhdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm6
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm6, %ymm6
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm8
+ vpsubw %ymm6, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 8: 2/2
+ vmovdqu 2048(%r15), %ymm10
+ vmovdqu 2080(%r15), %ymm12
+ vmovdqu 2112(%r15), %ymm11
+ vmovdqu 2144(%r15), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 16: 2/2
+ vperm2i128 $32, %ymm5, %ymm8, %ymm4
+ vmovdqu 2176(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm8, %ymm5
+ vmovdqu 2208(%r15), %ymm12
+ vperm2i128 $32, %ymm7, %ymm9, %ymm6
+ vmovdqu 2240(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm9, %ymm7
+ vmovdqu 2272(%r15), %ymm13
+ vpsubw %ymm5, %ymm4, %ymm8
+ vpsubw %ymm7, %ymm6, %ymm9
+ vpaddw %ymm5, %ymm4, %ymm4
+ vpaddw %ymm7, %ymm6, %ymm6
+ vpmullw %ymm12, %ymm8, %ymm5
+ vpmullw %ymm13, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm5, %ymm8, %ymm5
+ vpsubw %ymm7, %ymm9, %ymm7
+ # 32: 2/2
+ vmovdqu 2304(%r15), %ymm10
+ vmovdqu 2336(%r15), %ymm12
+ vpaddw %ymm6, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm5, %ymm9
+ vpsubw %ymm6, %ymm4, %ymm6
+ vpsubw %ymm7, %ymm5, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm5
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm5, %ymm5
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ # 64: 2/2
+ vmovdqu 2368(%r15), %ymm10
+ vmovdqu 2400(%r15), %ymm12
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu %ymm2, 320(%rsi)
+ vmovdqu %ymm3, 352(%rsi)
+ # 128
+ vmovdqu 2432(%r15), %ymm10
+ vmovdqu 2464(%r15), %ymm12
+ vmovdqu 2496(%r15), %ymm11
+ vmovdqu 2528(%r15), %ymm13
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm1
+ vmovdqu 192(%rsi), %ymm2
+ vmovdqu 224(%rsi), %ymm3
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm11, %ymm0, %ymm0
+ vpmulhw %ymm11, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm0
+ vpsubw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm11, %ymm2, %ymm2
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ vpmullw %ymm13, %ymm4, %ymm8
+ vpmullw %ymm13, %ymm5, %ymm9
+ vpmulhw %ymm11, %ymm4, %ymm4
+ vpmulhw %ymm11, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm4
+ vpsubw %ymm9, %ymm5, %ymm5
+ vpmullw %ymm13, %ymm6, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm11, %ymm6, %ymm6
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu %ymm2, 192(%rsi)
+ vmovdqu %ymm3, 224(%rsi)
+ vmovdqu %ymm4, 384(%rsi)
+ vmovdqu %ymm5, 416(%rsi)
+ vmovdqu %ymm6, 448(%rsi)
+ vmovdqu %ymm7, 480(%rsi)
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu 256(%rsi), %ymm4
+ vmovdqu 288(%rsi), %ymm5
+ vmovdqu 320(%rsi), %ymm6
+ vmovdqu 352(%rsi), %ymm7
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm11, %ymm0, %ymm0
+ vpmulhw %ymm11, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm0
+ vpsubw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm11, %ymm2, %ymm2
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ vpmullw %ymm13, %ymm4, %ymm8
+ vpmullw %ymm13, %ymm5, %ymm9
+ vpmulhw %ymm11, %ymm4, %ymm4
+ vpmulhw %ymm11, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm4
+ vpsubw %ymm9, %ymm5, %ymm5
+ vpmullw %ymm13, %ymm6, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm11, %ymm6, %ymm6
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu %ymm4, 256(%rsi)
+ vmovdqu %ymm5, 288(%rsi)
+ vmovdqu %ymm6, 320(%rsi)
+ vmovdqu %ymm7, 352(%rsi)
+ # Add Errors
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu (%r9), %ymm4
+ vmovdqu 32(%r9), %ymm5
+ vmovdqu 64(%r9), %ymm6
+ vmovdqu 96(%r9), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm1
+ vmovdqu 192(%rsi), %ymm2
+ vmovdqu 224(%rsi), %ymm3
+ vmovdqu 128(%r9), %ymm4
+ vmovdqu 160(%r9), %ymm5
+ vmovdqu 192(%r9), %ymm6
+ vmovdqu 224(%r9), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu %ymm2, 192(%rsi)
+ vmovdqu %ymm3, 224(%rsi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vmovdqu 320(%rsi), %ymm2
+ vmovdqu 352(%rsi), %ymm3
+ vmovdqu 256(%r9), %ymm4
+ vmovdqu 288(%r9), %ymm5
+ vmovdqu 320(%r9), %ymm6
+ vmovdqu 352(%r9), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu %ymm2, 320(%rsi)
+ vmovdqu %ymm3, 352(%rsi)
+ vmovdqu 384(%rsi), %ymm0
+ vmovdqu 416(%rsi), %ymm1
+ vmovdqu 448(%rsi), %ymm2
+ vmovdqu 480(%rsi), %ymm3
+ vmovdqu 384(%r9), %ymm4
+ vmovdqu 416(%r9), %ymm5
+ vmovdqu 448(%r9), %ymm6
+ vmovdqu 480(%r9), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu %ymm2, 448(%rsi)
+ vmovdqu %ymm3, 480(%rsi)
+ addq $0x200, %r9
+ addq $0x200, %rsi
+ subq $0x01, %r12
+ jg L_kyber_encapsulate_avx2_calc
+ vmovdqu kyber_qinv(%rip), %ymm12
+ # Pointwise acc mont
+ movq %r11, %r13
+ # Base mul mont
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r15
+ vmovdqu (%rdi), %ymm2
+ vmovdqu 32(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%r8), %ymm4
+ vmovdqu 32(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%r8), %ymm4
+ vmovdqu 96(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rdx)
+ vmovdqu %ymm1, 96(%rdx)
+ vmovdqu 128(%rdi), %ymm2
+ vmovdqu 160(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%r8), %ymm4
+ vmovdqu 160(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu 192(%rdi), %ymm2
+ vmovdqu 224(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%r8), %ymm4
+ vmovdqu 224(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rdx)
+ vmovdqu %ymm1, 224(%rdx)
+ vmovdqu 256(%rdi), %ymm2
+ vmovdqu 288(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%r8), %ymm4
+ vmovdqu 288(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%r8), %ymm4
+ vmovdqu 352(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r15), %ymm10
+ vmovdqu 352(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rdx)
+ vmovdqu %ymm1, 352(%rdx)
+ vmovdqu 384(%rdi), %ymm2
+ vmovdqu 416(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%r8), %ymm4
+ vmovdqu 416(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rdx)
+ vmovdqu %ymm1, 416(%rdx)
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%r8), %ymm4
+ vmovdqu 480(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r15), %ymm10
+ vmovdqu 480(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rdx)
+ vmovdqu %ymm1, 480(%rdx)
+ addq $0x200, %rdi
+ addq $0x200, %r8
+ subq $2, %r13
+ jz L_pointwise_acc_mont_end_encap_v
+L_pointwise_acc_mont_start_encap_v:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r15
+ vmovdqu (%rdi), %ymm2
+ vmovdqu 32(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%r8), %ymm4
+ vmovdqu 32(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%rdx), %ymm6
+ vmovdqu 32(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%r8), %ymm4
+ vmovdqu 96(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%rdx), %ymm6
+ vmovdqu 96(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rdx)
+ vmovdqu %ymm1, 96(%rdx)
+ vmovdqu 128(%rdi), %ymm2
+ vmovdqu 160(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%r8), %ymm4
+ vmovdqu 160(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%rdx), %ymm6
+ vmovdqu 160(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu 192(%rdi), %ymm2
+ vmovdqu 224(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%r8), %ymm4
+ vmovdqu 224(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%rdx), %ymm6
+ vmovdqu 224(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rdx)
+ vmovdqu %ymm1, 224(%rdx)
+ vmovdqu 256(%rdi), %ymm2
+ vmovdqu 288(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%r8), %ymm4
+ vmovdqu 288(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%rdx), %ymm6
+ vmovdqu 288(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%r8), %ymm4
+ vmovdqu 352(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r15), %ymm10
+ vmovdqu 352(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%rdx), %ymm6
+ vmovdqu 352(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rdx)
+ vmovdqu %ymm1, 352(%rdx)
+ vmovdqu 384(%rdi), %ymm2
+ vmovdqu 416(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%r8), %ymm4
+ vmovdqu 416(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%rdx), %ymm6
+ vmovdqu 416(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rdx)
+ vmovdqu %ymm1, 416(%rdx)
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%r8), %ymm4
+ vmovdqu 480(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r15), %ymm10
+ vmovdqu 480(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%rdx), %ymm6
+ vmovdqu 480(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rdx)
+ vmovdqu %ymm1, 480(%rdx)
+ addq $0x200, %rdi
+ addq $0x200, %r8
+ subq $0x01, %r13
+ jg L_pointwise_acc_mont_start_encap_v
+L_pointwise_acc_mont_end_encap_v:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r15
+ vmovdqu (%rdi), %ymm2
+ vmovdqu 32(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%r8), %ymm4
+ vmovdqu 32(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r15), %ymm10
+ vmovdqu 32(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%rdx), %ymm6
+ vmovdqu 32(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%r8), %ymm4
+ vmovdqu 96(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r15), %ymm10
+ vmovdqu 96(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%rdx), %ymm6
+ vmovdqu 96(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rdx)
+ vmovdqu %ymm1, 96(%rdx)
+ vmovdqu 128(%rdi), %ymm2
+ vmovdqu 160(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%r8), %ymm4
+ vmovdqu 160(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%rdx), %ymm6
+ vmovdqu 160(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu 192(%rdi), %ymm2
+ vmovdqu 224(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%r8), %ymm4
+ vmovdqu 224(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r15), %ymm10
+ vmovdqu 224(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%rdx), %ymm6
+ vmovdqu 224(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rdx)
+ vmovdqu %ymm1, 224(%rdx)
+ vmovdqu 256(%rdi), %ymm2
+ vmovdqu 288(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%r8), %ymm4
+ vmovdqu 288(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%rdx), %ymm6
+ vmovdqu 288(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%r8), %ymm4
+ vmovdqu 352(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r15), %ymm10
+ vmovdqu 352(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%rdx), %ymm6
+ vmovdqu 352(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rdx)
+ vmovdqu %ymm1, 352(%rdx)
+ vmovdqu 384(%rdi), %ymm2
+ vmovdqu 416(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%r8), %ymm4
+ vmovdqu 416(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r15), %ymm10
+ vmovdqu 416(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%rdx), %ymm6
+ vmovdqu 416(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rdx)
+ vmovdqu %ymm1, 416(%rdx)
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%r8), %ymm4
+ vmovdqu 480(%r8), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r15), %ymm10
+ vmovdqu 480(%r15), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%rdx), %ymm6
+ vmovdqu 480(%rdx), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rdx)
+ vmovdqu %ymm1, 480(%rdx)
+ addq $0x200, %rdi
+ addq $0x200, %r8
+ movq %r11, %r13
+ shl $9, %r13d
+ subq %r13, %r8
+ # invntt
+ leaq L_kyber_avx2_zetas_inv(%rip), %r15
+ vmovdqu (%rdx), %ymm0
+ vmovdqu 32(%rdx), %ymm1
+ vmovdqu 64(%rdx), %ymm2
+ vmovdqu 96(%rdx), %ymm3
+ vmovdqu 128(%rdx), %ymm4
+ vmovdqu 160(%rdx), %ymm5
+ vmovdqu 192(%rdx), %ymm6
+ vmovdqu 224(%rdx), %ymm7
+ # 2: 1/2
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu (%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm9
+ vmovdqu 32(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm0
+ vpsrlq $32, %ymm8, %ymm1
+ vpblendd $0xaa, %ymm0, %ymm8, %ymm0
+ vpblendd $0x55, %ymm1, %ymm9, %ymm1
+ vperm2i128 $32, %ymm3, %ymm2, %ymm8
+ vmovdqu 64(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm9
+ vmovdqu 96(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm2
+ vpsrlq $32, %ymm8, %ymm3
+ vpblendd $0xaa, %ymm2, %ymm8, %ymm2
+ vpblendd $0x55, %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 4: 1/2
+ vmovdqu 128(%r15), %ymm10
+ vmovdqu 160(%r15), %ymm12
+ vmovdqu 192(%r15), %ymm11
+ vmovdqu 224(%r15), %ymm13
+ vpunpckldq %ymm1, %ymm8, %ymm0
+ vpunpckhdq %ymm1, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm9, %ymm2
+ vpunpckhdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm2
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm8
+ vpsubw %ymm2, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 8: 1/2
+ vmovdqu 256(%r15), %ymm10
+ vmovdqu 288(%r15), %ymm12
+ vmovdqu 320(%r15), %ymm11
+ vmovdqu 352(%r15), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 16: 1/2
+ vperm2i128 $32, %ymm1, %ymm8, %ymm0
+ vmovdqu 384(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm8, %ymm1
+ vmovdqu 416(%r15), %ymm12
+ vperm2i128 $32, %ymm3, %ymm9, %ymm2
+ vmovdqu 448(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm9, %ymm3
+ vmovdqu 480(%r15), %ymm13
+ vpsubw %ymm1, %ymm0, %ymm8
+ vpsubw %ymm3, %ymm2, %ymm9
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm2, %ymm2
+ vpmullw %ymm12, %ymm8, %ymm1
+ vpmullw %ymm13, %ymm9, %ymm3
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm1, %ymm8, %ymm1
+ vpsubw %ymm3, %ymm9, %ymm3
+ # 32: 1/2
+ vmovdqu 512(%r15), %ymm10
+ vmovdqu 544(%r15), %ymm12
+ vpaddw %ymm2, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm1, %ymm9
+ vpsubw %ymm2, %ymm0, %ymm2
+ vpsubw %ymm3, %ymm1, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm8, %ymm0
+ vpsubw %ymm1, %ymm9, %ymm1
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ # 2: 1/2
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 576(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm9
+ vmovdqu 608(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm4
+ vpsrlq $32, %ymm8, %ymm5
+ vpblendd $0xaa, %ymm4, %ymm8, %ymm4
+ vpblendd $0x55, %ymm5, %ymm9, %ymm5
+ vperm2i128 $32, %ymm7, %ymm6, %ymm8
+ vmovdqu 640(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm9
+ vmovdqu 672(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm6
+ vpsrlq $32, %ymm8, %ymm7
+ vpblendd $0xaa, %ymm6, %ymm8, %ymm6
+ vpblendd $0x55, %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 4: 1/2
+ vmovdqu 704(%r15), %ymm10
+ vmovdqu 736(%r15), %ymm12
+ vmovdqu 768(%r15), %ymm11
+ vmovdqu 800(%r15), %ymm13
+ vpunpckldq %ymm5, %ymm8, %ymm4
+ vpunpckhdq %ymm5, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm9, %ymm6
+ vpunpckhdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm6
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm6, %ymm6
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm8
+ vpsubw %ymm6, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 8: 1/2
+ vmovdqu 832(%r15), %ymm10
+ vmovdqu 864(%r15), %ymm12
+ vmovdqu 896(%r15), %ymm11
+ vmovdqu 928(%r15), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 16: 1/2
+ vperm2i128 $32, %ymm5, %ymm8, %ymm4
+ vmovdqu 960(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm8, %ymm5
+ vmovdqu 992(%r15), %ymm12
+ vperm2i128 $32, %ymm7, %ymm9, %ymm6
+ vmovdqu 1024(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm9, %ymm7
+ vmovdqu 1056(%r15), %ymm13
+ vpsubw %ymm5, %ymm4, %ymm8
+ vpsubw %ymm7, %ymm6, %ymm9
+ vpaddw %ymm5, %ymm4, %ymm4
+ vpaddw %ymm7, %ymm6, %ymm6
+ vpmullw %ymm12, %ymm8, %ymm5
+ vpmullw %ymm13, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm5, %ymm8, %ymm5
+ vpsubw %ymm7, %ymm9, %ymm7
+ # 32: 1/2
+ vmovdqu 1088(%r15), %ymm10
+ vmovdqu 1120(%r15), %ymm12
+ vpaddw %ymm6, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm5, %ymm9
+ vpsubw %ymm6, %ymm4, %ymm6
+ vpsubw %ymm7, %ymm5, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm5
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm5, %ymm5
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ # 64: 1/2
+ vmovdqu 1152(%r15), %ymm10
+ vmovdqu 1184(%r15), %ymm12
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu %ymm2, 64(%rdx)
+ vmovdqu %ymm3, 96(%rdx)
+ vmovdqu %ymm4, 128(%rdx)
+ vmovdqu %ymm5, 160(%rdx)
+ vmovdqu %ymm6, 192(%rdx)
+ vmovdqu %ymm7, 224(%rdx)
+ vmovdqu 256(%rdx), %ymm0
+ vmovdqu 288(%rdx), %ymm1
+ vmovdqu 320(%rdx), %ymm2
+ vmovdqu 352(%rdx), %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vmovdqu 448(%rdx), %ymm6
+ vmovdqu 480(%rdx), %ymm7
+ # 2: 2/2
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1216(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm9
+ vmovdqu 1248(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm0
+ vpsrlq $32, %ymm8, %ymm1
+ vpblendd $0xaa, %ymm0, %ymm8, %ymm0
+ vpblendd $0x55, %ymm1, %ymm9, %ymm1
+ vperm2i128 $32, %ymm3, %ymm2, %ymm8
+ vmovdqu 1280(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm9
+ vmovdqu 1312(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm2
+ vpsrlq $32, %ymm8, %ymm3
+ vpblendd $0xaa, %ymm2, %ymm8, %ymm2
+ vpblendd $0x55, %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 4: 2/2
+ vmovdqu 1344(%r15), %ymm10
+ vmovdqu 1376(%r15), %ymm12
+ vmovdqu 1408(%r15), %ymm11
+ vmovdqu 1440(%r15), %ymm13
+ vpunpckldq %ymm1, %ymm8, %ymm0
+ vpunpckhdq %ymm1, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm9, %ymm2
+ vpunpckhdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm2
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm8
+ vpsubw %ymm2, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 8: 2/2
+ vmovdqu 1472(%r15), %ymm10
+ vmovdqu 1504(%r15), %ymm12
+ vmovdqu 1536(%r15), %ymm11
+ vmovdqu 1568(%r15), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 16: 2/2
+ vperm2i128 $32, %ymm1, %ymm8, %ymm0
+ vmovdqu 1600(%r15), %ymm10
+ vperm2i128 $49, %ymm1, %ymm8, %ymm1
+ vmovdqu 1632(%r15), %ymm12
+ vperm2i128 $32, %ymm3, %ymm9, %ymm2
+ vmovdqu 1664(%r15), %ymm11
+ vperm2i128 $49, %ymm3, %ymm9, %ymm3
+ vmovdqu 1696(%r15), %ymm13
+ vpsubw %ymm1, %ymm0, %ymm8
+ vpsubw %ymm3, %ymm2, %ymm9
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm2, %ymm2
+ vpmullw %ymm12, %ymm8, %ymm1
+ vpmullw %ymm13, %ymm9, %ymm3
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm1, %ymm8, %ymm1
+ vpsubw %ymm3, %ymm9, %ymm3
+ # 32: 2/2
+ vmovdqu 1728(%r15), %ymm10
+ vmovdqu 1760(%r15), %ymm12
+ vpaddw %ymm2, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm1, %ymm9
+ vpsubw %ymm2, %ymm0, %ymm2
+ vpsubw %ymm3, %ymm1, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm8, %ymm0
+ vpsubw %ymm1, %ymm9, %ymm1
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ # 2: 2/2
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1792(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm9
+ vmovdqu 1824(%r15), %ymm12
+ vpsllq $32, %ymm9, %ymm4
+ vpsrlq $32, %ymm8, %ymm5
+ vpblendd $0xaa, %ymm4, %ymm8, %ymm4
+ vpblendd $0x55, %ymm5, %ymm9, %ymm5
+ vperm2i128 $32, %ymm7, %ymm6, %ymm8
+ vmovdqu 1856(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm9
+ vmovdqu 1888(%r15), %ymm13
+ vpsllq $32, %ymm9, %ymm6
+ vpsrlq $32, %ymm8, %ymm7
+ vpblendd $0xaa, %ymm6, %ymm8, %ymm6
+ vpblendd $0x55, %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 4: 2/2
+ vmovdqu 1920(%r15), %ymm10
+ vmovdqu 1952(%r15), %ymm12
+ vmovdqu 1984(%r15), %ymm11
+ vmovdqu 2016(%r15), %ymm13
+ vpunpckldq %ymm5, %ymm8, %ymm4
+ vpunpckhdq %ymm5, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm9, %ymm6
+ vpunpckhdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm6
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm6, %ymm6
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm8
+ vpsubw %ymm6, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 8: 2/2
+ vmovdqu 2048(%r15), %ymm10
+ vmovdqu 2080(%r15), %ymm12
+ vmovdqu 2112(%r15), %ymm11
+ vmovdqu 2144(%r15), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 16: 2/2
+ vperm2i128 $32, %ymm5, %ymm8, %ymm4
+ vmovdqu 2176(%r15), %ymm10
+ vperm2i128 $49, %ymm5, %ymm8, %ymm5
+ vmovdqu 2208(%r15), %ymm12
+ vperm2i128 $32, %ymm7, %ymm9, %ymm6
+ vmovdqu 2240(%r15), %ymm11
+ vperm2i128 $49, %ymm7, %ymm9, %ymm7
+ vmovdqu 2272(%r15), %ymm13
+ vpsubw %ymm5, %ymm4, %ymm8
+ vpsubw %ymm7, %ymm6, %ymm9
+ vpaddw %ymm5, %ymm4, %ymm4
+ vpaddw %ymm7, %ymm6, %ymm6
+ vpmullw %ymm12, %ymm8, %ymm5
+ vpmullw %ymm13, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm5, %ymm8, %ymm5
+ vpsubw %ymm7, %ymm9, %ymm7
+ # 32: 2/2
+ vmovdqu 2304(%r15), %ymm10
+ vmovdqu 2336(%r15), %ymm12
+ vpaddw %ymm6, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm5, %ymm9
+ vpsubw %ymm6, %ymm4, %ymm6
+ vpsubw %ymm7, %ymm5, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm5
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm5, %ymm5
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ # 64: 2/2
+ vmovdqu 2368(%r15), %ymm10
+ vmovdqu 2400(%r15), %ymm12
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu %ymm2, 320(%rdx)
+ vmovdqu %ymm3, 352(%rdx)
+ # 128
+ vmovdqu 2432(%r15), %ymm10
+ vmovdqu 2464(%r15), %ymm12
+ vmovdqu 2496(%r15), %ymm11
+ vmovdqu 2528(%r15), %ymm13
+ vmovdqu 128(%rdx), %ymm0
+ vmovdqu 160(%rdx), %ymm1
+ vmovdqu 192(%rdx), %ymm2
+ vmovdqu 224(%rdx), %ymm3
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm11, %ymm0, %ymm0
+ vpmulhw %ymm11, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm0
+ vpsubw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm11, %ymm2, %ymm2
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ vpmullw %ymm13, %ymm4, %ymm8
+ vpmullw %ymm13, %ymm5, %ymm9
+ vpmulhw %ymm11, %ymm4, %ymm4
+ vpmulhw %ymm11, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm4
+ vpsubw %ymm9, %ymm5, %ymm5
+ vpmullw %ymm13, %ymm6, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm11, %ymm6, %ymm6
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu %ymm2, 192(%rdx)
+ vmovdqu %ymm3, 224(%rdx)
+ vmovdqu %ymm4, 384(%rdx)
+ vmovdqu %ymm5, 416(%rdx)
+ vmovdqu %ymm6, 448(%rdx)
+ vmovdqu %ymm7, 480(%rdx)
+ vmovdqu (%rdx), %ymm0
+ vmovdqu 32(%rdx), %ymm1
+ vmovdqu 64(%rdx), %ymm2
+ vmovdqu 96(%rdx), %ymm3
+ vmovdqu 256(%rdx), %ymm4
+ vmovdqu 288(%rdx), %ymm5
+ vmovdqu 320(%rdx), %ymm6
+ vmovdqu 352(%rdx), %ymm7
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm11, %ymm0, %ymm0
+ vpmulhw %ymm11, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm0
+ vpsubw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm11, %ymm2, %ymm2
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ vpmullw %ymm13, %ymm4, %ymm8
+ vpmullw %ymm13, %ymm5, %ymm9
+ vpmulhw %ymm11, %ymm4, %ymm4
+ vpmulhw %ymm11, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm4
+ vpsubw %ymm9, %ymm5, %ymm5
+ vpmullw %ymm13, %ymm6, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm11, %ymm6, %ymm6
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu %ymm2, 64(%rdx)
+ vmovdqu %ymm3, 96(%rdx)
+ vmovdqu %ymm4, 256(%rdx)
+ vmovdqu %ymm5, 288(%rdx)
+ vmovdqu %ymm6, 320(%rdx)
+ vmovdqu %ymm7, 352(%rdx)
+ # Add Errors
+ vmovdqu (%rdx), %ymm0
+ vmovdqu 32(%rdx), %ymm1
+ vmovdqu 64(%rdx), %ymm2
+ vmovdqu 96(%rdx), %ymm3
+ vmovdqu (%rax), %ymm4
+ vmovdqu 32(%rax), %ymm5
+ vmovdqu 64(%rax), %ymm6
+ vmovdqu 96(%rax), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu %ymm2, 64(%rdx)
+ vmovdqu %ymm3, 96(%rdx)
+ vmovdqu 128(%rdx), %ymm0
+ vmovdqu 160(%rdx), %ymm1
+ vmovdqu 192(%rdx), %ymm2
+ vmovdqu 224(%rdx), %ymm3
+ vmovdqu 128(%rax), %ymm4
+ vmovdqu 160(%rax), %ymm5
+ vmovdqu 192(%rax), %ymm6
+ vmovdqu 224(%rax), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu %ymm2, 192(%rdx)
+ vmovdqu %ymm3, 224(%rdx)
+ vmovdqu 256(%rdx), %ymm0
+ vmovdqu 288(%rdx), %ymm1
+ vmovdqu 320(%rdx), %ymm2
+ vmovdqu 352(%rdx), %ymm3
+ vmovdqu 256(%rax), %ymm4
+ vmovdqu 288(%rax), %ymm5
+ vmovdqu 320(%rax), %ymm6
+ vmovdqu 352(%rax), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu %ymm2, 320(%rdx)
+ vmovdqu %ymm3, 352(%rdx)
+ vmovdqu 384(%rdx), %ymm0
+ vmovdqu 416(%rdx), %ymm1
+ vmovdqu 448(%rdx), %ymm2
+ vmovdqu 480(%rdx), %ymm3
+ vmovdqu 384(%rax), %ymm4
+ vmovdqu 416(%rax), %ymm5
+ vmovdqu 448(%rax), %ymm6
+ vmovdqu 480(%rax), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, 384(%rdx)
+ vmovdqu %ymm1, 416(%rdx)
+ vmovdqu %ymm2, 448(%rdx)
+ vmovdqu %ymm3, 480(%rdx)
+ # Add Errors
+ vmovdqu (%rdx), %ymm0
+ vmovdqu 32(%rdx), %ymm1
+ vmovdqu 64(%rdx), %ymm2
+ vmovdqu 96(%rdx), %ymm3
+ vmovdqu (%r10), %ymm4
+ vmovdqu 32(%r10), %ymm5
+ vmovdqu 64(%r10), %ymm6
+ vmovdqu 96(%r10), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, (%rdx)
+ vmovdqu %ymm1, 32(%rdx)
+ vmovdqu %ymm2, 64(%rdx)
+ vmovdqu %ymm3, 96(%rdx)
+ vmovdqu 128(%rdx), %ymm0
+ vmovdqu 160(%rdx), %ymm1
+ vmovdqu 192(%rdx), %ymm2
+ vmovdqu 224(%rdx), %ymm3
+ vmovdqu 128(%r10), %ymm4
+ vmovdqu 160(%r10), %ymm5
+ vmovdqu 192(%r10), %ymm6
+ vmovdqu 224(%r10), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 128(%rdx)
+ vmovdqu %ymm1, 160(%rdx)
+ vmovdqu %ymm2, 192(%rdx)
+ vmovdqu %ymm3, 224(%rdx)
+ vmovdqu 256(%rdx), %ymm0
+ vmovdqu 288(%rdx), %ymm1
+ vmovdqu 320(%rdx), %ymm2
+ vmovdqu 352(%rdx), %ymm3
+ vmovdqu 256(%r10), %ymm4
+ vmovdqu 288(%r10), %ymm5
+ vmovdqu 320(%r10), %ymm6
+ vmovdqu 352(%r10), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 256(%rdx)
+ vmovdqu %ymm1, 288(%rdx)
+ vmovdqu %ymm2, 320(%rdx)
+ vmovdqu %ymm3, 352(%rdx)
+ vmovdqu 384(%rdx), %ymm0
+ vmovdqu 416(%rdx), %ymm1
+ vmovdqu 448(%rdx), %ymm2
+ vmovdqu 480(%rdx), %ymm3
+ vmovdqu 384(%r10), %ymm4
+ vmovdqu 416(%r10), %ymm5
+ vmovdqu 448(%r10), %ymm6
+ vmovdqu 480(%r10), %ymm7
+ vpaddw %ymm4, %ymm0, %ymm4
+ vpaddw %ymm5, %ymm1, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpaddw %ymm6, %ymm2, %ymm6
+ vpaddw %ymm7, %ymm3, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 384(%rdx)
+ vmovdqu %ymm1, 416(%rdx)
+ vmovdqu %ymm2, 448(%rdx)
+ vmovdqu %ymm3, 480(%rdx)
+ vzeroupper
+ addq $48, %rsp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ repz retq
+#ifndef __APPLE__
+.size kyber_encapsulate_avx2,.-kyber_encapsulate_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_decapsulate_avx2
+.type kyber_decapsulate_avx2,@function
+.align 16
+kyber_decapsulate_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_decapsulate_avx2
+.p2align 4
+_kyber_decapsulate_avx2:
+#endif /* __APPLE__ */
+ vmovdqu kyber_q(%rip), %ymm14
+ vmovdqu kyber_v(%rip), %ymm15
+ movq %r8, %rax
+ movq %rdx, %r9
+L_kyber_decapsulate_avx2_trans:
+ # ntt
+ leaq L_kyber_avx2_zetas(%rip), %r10
+ vmovdqu (%r10), %ymm10
+ vmovdqu 32(%r10), %ymm12
+ vmovdqu 128(%r9), %ymm0
+ vmovdqu 160(%r9), %ymm1
+ vmovdqu 192(%r9), %ymm2
+ vmovdqu 224(%r9), %ymm3
+ vmovdqu 384(%r9), %ymm4
+ vmovdqu 416(%r9), %ymm5
+ vmovdqu 448(%r9), %ymm6
+ vmovdqu 480(%r9), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%r9)
+ vmovdqu %ymm1, 160(%r9)
+ vmovdqu %ymm2, 192(%r9)
+ vmovdqu %ymm3, 224(%r9)
+ vmovdqu %ymm4, 384(%r9)
+ vmovdqu %ymm5, 416(%r9)
+ vmovdqu %ymm6, 448(%r9)
+ vmovdqu %ymm7, 480(%r9)
+ vmovdqu (%r9), %ymm0
+ vmovdqu 32(%r9), %ymm1
+ vmovdqu 64(%r9), %ymm2
+ vmovdqu 96(%r9), %ymm3
+ vmovdqu 256(%r9), %ymm4
+ vmovdqu 288(%r9), %ymm5
+ vmovdqu 320(%r9), %ymm6
+ vmovdqu 352(%r9), %ymm7
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vmovdqu %ymm4, 256(%r9)
+ vmovdqu %ymm5, 288(%r9)
+ vmovdqu %ymm6, 320(%r9)
+ vmovdqu %ymm7, 352(%r9)
+ vmovdqu 128(%r9), %ymm4
+ vmovdqu 160(%r9), %ymm5
+ vmovdqu 192(%r9), %ymm6
+ vmovdqu 224(%r9), %ymm7
+ # 64: 0/3
+ vmovdqu 64(%r10), %ymm10
+ vmovdqu 96(%r10), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 0/3
+ vmovdqu 128(%r10), %ymm10
+ vmovdqu 160(%r10), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 0/3
+ vmovdqu 192(%r10), %ymm10
+ vmovdqu 224(%r10), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 0/3
+ vmovdqu 256(%r10), %ymm10
+ vmovdqu 288(%r10), %ymm12
+ vmovdqu 320(%r10), %ymm11
+ vmovdqu 352(%r10), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 0/3
+ vmovdqu 384(%r10), %ymm10
+ vmovdqu 416(%r10), %ymm12
+ vmovdqu 448(%r10), %ymm11
+ vmovdqu 480(%r10), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 0/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 512(%r10), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 544(%r10), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 576(%r10), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 608(%r10), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 640(%r10), %ymm10
+ vmovdqu 672(%r10), %ymm12
+ vmovdqu 704(%r10), %ymm11
+ vmovdqu 736(%r10), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 0/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 768(%r10), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 800(%r10), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 832(%r10), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 864(%r10), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 0/3
+ vmovdqu 896(%r10), %ymm10
+ vmovdqu 928(%r10), %ymm12
+ vmovdqu 960(%r10), %ymm11
+ vmovdqu 992(%r10), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 0/3
+ vmovdqu 1024(%r10), %ymm10
+ vmovdqu 1056(%r10), %ymm12
+ vmovdqu 1088(%r10), %ymm11
+ vmovdqu 1120(%r10), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 0/3
+ vmovdqu 1152(%r10), %ymm10
+ vmovdqu 1184(%r10), %ymm12
+ vmovdqu 1216(%r10), %ymm11
+ vmovdqu 1248(%r10), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vpmulhw %ymm15, %ymm0, %ymm8
+ vpmulhw %ymm15, %ymm1, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm8
+ vpsubw %ymm9, %ymm1, %ymm9
+ vmovdqu %ymm8, (%r9)
+ vmovdqu %ymm9, 32(%r9)
+ vpmulhw %ymm15, %ymm2, %ymm8
+ vpmulhw %ymm15, %ymm3, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vmovdqu %ymm8, 64(%r9)
+ vmovdqu %ymm9, 96(%r9)
+ vpmulhw %ymm15, %ymm4, %ymm8
+ vpmulhw %ymm15, %ymm5, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vmovdqu %ymm8, 128(%r9)
+ vmovdqu %ymm9, 160(%r9)
+ vpmulhw %ymm15, %ymm6, %ymm8
+ vpmulhw %ymm15, %ymm7, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vmovdqu %ymm8, 192(%r9)
+ vmovdqu %ymm9, 224(%r9)
+ vmovdqu 256(%r9), %ymm0
+ vmovdqu 288(%r9), %ymm1
+ vmovdqu 320(%r9), %ymm2
+ vmovdqu 352(%r9), %ymm3
+ vmovdqu 384(%r9), %ymm4
+ vmovdqu 416(%r9), %ymm5
+ vmovdqu 448(%r9), %ymm6
+ vmovdqu 480(%r9), %ymm7
+ # 64: 1/3
+ vmovdqu 1280(%r10), %ymm10
+ vmovdqu 1312(%r10), %ymm12
+ vpmullw %ymm12, %ymm4, %ymm8
+ vpmullw %ymm12, %ymm5, %ymm9
+ vpmulhw %ymm10, %ymm4, %ymm4
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm4
+ vpsubw %ymm9, %ymm1, %ymm5
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm6
+ vpsubw %ymm9, %ymm3, %ymm7
+ vpaddw %ymm8, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ # 32: 1/3
+ vmovdqu 1344(%r10), %ymm10
+ vmovdqu 1376(%r10), %ymm12
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm2
+ vpsubw %ymm9, %ymm1, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ # 32: 1/3
+ vmovdqu 1408(%r10), %ymm10
+ vmovdqu 1440(%r10), %ymm12
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm6
+ vpsubw %ymm9, %ymm5, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ # 16: 1/3
+ vmovdqu 1472(%r10), %ymm10
+ vmovdqu 1504(%r10), %ymm12
+ vmovdqu 1536(%r10), %ymm11
+ vmovdqu 1568(%r10), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 16: 1/3
+ vmovdqu 1600(%r10), %ymm10
+ vmovdqu 1632(%r10), %ymm12
+ vmovdqu 1664(%r10), %ymm11
+ vmovdqu 1696(%r10), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 8: 1/3
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1728(%r10), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm1
+ vmovdqu 1760(%r10), %ymm12
+ vperm2i128 $32, %ymm3, %ymm2, %ymm9
+ vmovdqu 1792(%r10), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm3
+ vmovdqu 1824(%r10), %ymm13
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm0
+ vpsubw %ymm2, %ymm3, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm1
+ vpsubw %ymm2, %ymm9, %ymm3
+ vpaddw %ymm0, %ymm8, %ymm8
+ vpaddw %ymm2, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 1856(%r10), %ymm10
+ vmovdqu 1888(%r10), %ymm12
+ vmovdqu 1920(%r10), %ymm11
+ vmovdqu 1952(%r10), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 8: 1/3
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1984(%r10), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm5
+ vmovdqu 2016(%r10), %ymm12
+ vperm2i128 $32, %ymm7, %ymm6, %ymm9
+ vmovdqu 2048(%r10), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm7
+ vmovdqu 2080(%r10), %ymm13
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm4
+ vpsubw %ymm6, %ymm7, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm5
+ vpsubw %ymm6, %ymm9, %ymm7
+ vpaddw %ymm4, %ymm8, %ymm8
+ vpaddw %ymm6, %ymm9, %ymm9
+ # 4: 1/3
+ vmovdqu 2112(%r10), %ymm10
+ vmovdqu 2144(%r10), %ymm12
+ vmovdqu 2176(%r10), %ymm11
+ vmovdqu 2208(%r10), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ # 2: 1/3
+ vmovdqu 2240(%r10), %ymm10
+ vmovdqu 2272(%r10), %ymm12
+ vmovdqu 2304(%r10), %ymm11
+ vmovdqu 2336(%r10), %ymm13
+ vpsllq $32, %ymm1, %ymm8
+ vpsrlq $32, %ymm0, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm0, %ymm0
+ vpblendd $0x55, %ymm9, %ymm1, %ymm1
+ vpsllq $32, %ymm3, %ymm8
+ vpsrlq $32, %ymm2, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm2, %ymm2
+ vpblendd $0x55, %ymm9, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm1, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm1
+ vpsubw %ymm9, %ymm2, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm2, %ymm2
+ # 2: 1/3
+ vmovdqu 2368(%r10), %ymm10
+ vmovdqu 2400(%r10), %ymm12
+ vmovdqu 2432(%r10), %ymm11
+ vmovdqu 2464(%r10), %ymm13
+ vpsllq $32, %ymm5, %ymm8
+ vpsrlq $32, %ymm4, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm4, %ymm4
+ vpblendd $0x55, %ymm9, %ymm5, %ymm5
+ vpsllq $32, %ymm7, %ymm8
+ vpsrlq $32, %ymm6, %ymm9
+ vpblendd $0xaa, %ymm8, %ymm6, %ymm6
+ vpblendd $0x55, %ymm9, %ymm7, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm5, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm5
+ vpsubw %ymm9, %ymm6, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm6, %ymm6
+ vpunpckldq %ymm1, %ymm0, %ymm8
+ vpunpckhdq %ymm1, %ymm0, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm0
+ vperm2i128 $49, %ymm9, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm2, %ymm8
+ vpunpckhdq %ymm3, %ymm2, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm2
+ vperm2i128 $49, %ymm9, %ymm8, %ymm3
+ vpunpckldq %ymm5, %ymm4, %ymm8
+ vpunpckhdq %ymm5, %ymm4, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm4
+ vperm2i128 $49, %ymm9, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm6, %ymm8
+ vpunpckhdq %ymm7, %ymm6, %ymm9
+ vperm2i128 $32, %ymm9, %ymm8, %ymm6
+ vperm2i128 $49, %ymm9, %ymm8, %ymm7
+ vpmulhw %ymm15, %ymm0, %ymm8
+ vpmulhw %ymm15, %ymm1, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm8
+ vpsubw %ymm9, %ymm1, %ymm9
+ vmovdqu %ymm8, 256(%r9)
+ vmovdqu %ymm9, 288(%r9)
+ vpmulhw %ymm15, %ymm2, %ymm8
+ vpmulhw %ymm15, %ymm3, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm8
+ vpsubw %ymm9, %ymm3, %ymm9
+ vmovdqu %ymm8, 320(%r9)
+ vmovdqu %ymm9, 352(%r9)
+ vpmulhw %ymm15, %ymm4, %ymm8
+ vpmulhw %ymm15, %ymm5, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm8
+ vpsubw %ymm9, %ymm5, %ymm9
+ vmovdqu %ymm8, 384(%r9)
+ vmovdqu %ymm9, 416(%r9)
+ vpmulhw %ymm15, %ymm6, %ymm8
+ vpmulhw %ymm15, %ymm7, %ymm9
+ vpsraw $10, %ymm8, %ymm8
+ vpsraw $10, %ymm9, %ymm9
+ vpmullw %ymm14, %ymm8, %ymm8
+ vpmullw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm8
+ vpsubw %ymm9, %ymm7, %ymm9
+ vmovdqu %ymm8, 448(%r9)
+ vmovdqu %ymm9, 480(%r9)
+ addq $0x200, %r9
+ subq $0x01, %rax
+ jg L_kyber_decapsulate_avx2_trans
+ vmovdqu kyber_qinv(%rip), %ymm12
+ # Pointwise acc mont
+ movq %r8, %rax
+ # Base mul mont
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r10
+ vmovdqu (%rdi), %ymm2
+ vmovdqu 32(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%rdx), %ymm4
+ vmovdqu 32(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r10), %ymm10
+ vmovdqu 32(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%rdx), %ymm4
+ vmovdqu 96(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r10), %ymm10
+ vmovdqu 96(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm1, 96(%rsi)
+ vmovdqu 128(%rdi), %ymm2
+ vmovdqu 160(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%rdx), %ymm4
+ vmovdqu 160(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r10), %ymm10
+ vmovdqu 160(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu 192(%rdi), %ymm2
+ vmovdqu 224(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%rdx), %ymm4
+ vmovdqu 224(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r10), %ymm10
+ vmovdqu 224(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rsi)
+ vmovdqu %ymm1, 224(%rsi)
+ vmovdqu 256(%rdi), %ymm2
+ vmovdqu 288(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%rdx), %ymm4
+ vmovdqu 288(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r10), %ymm10
+ vmovdqu 288(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%rdx), %ymm4
+ vmovdqu 352(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r10), %ymm10
+ vmovdqu 352(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rsi)
+ vmovdqu %ymm1, 352(%rsi)
+ vmovdqu 384(%rdi), %ymm2
+ vmovdqu 416(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r10), %ymm10
+ vmovdqu 416(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%rdx), %ymm4
+ vmovdqu 480(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r10), %ymm10
+ vmovdqu 480(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rsi)
+ vmovdqu %ymm1, 480(%rsi)
+ addq $0x200, %rdi
+ addq $0x200, %rdx
+ subq $2, %rax
+ jz L_pointwise_acc_mont_end_decap
+L_pointwise_acc_mont_start_decap:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r10
+ vmovdqu (%rdi), %ymm2
+ vmovdqu 32(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%rdx), %ymm4
+ vmovdqu 32(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r10), %ymm10
+ vmovdqu 32(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%rsi), %ymm6
+ vmovdqu 32(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%rdx), %ymm4
+ vmovdqu 96(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r10), %ymm10
+ vmovdqu 96(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%rsi), %ymm6
+ vmovdqu 96(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm1, 96(%rsi)
+ vmovdqu 128(%rdi), %ymm2
+ vmovdqu 160(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%rdx), %ymm4
+ vmovdqu 160(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r10), %ymm10
+ vmovdqu 160(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%rsi), %ymm6
+ vmovdqu 160(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu 192(%rdi), %ymm2
+ vmovdqu 224(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%rdx), %ymm4
+ vmovdqu 224(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r10), %ymm10
+ vmovdqu 224(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rsi)
+ vmovdqu %ymm1, 224(%rsi)
+ vmovdqu 256(%rdi), %ymm2
+ vmovdqu 288(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%rdx), %ymm4
+ vmovdqu 288(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r10), %ymm10
+ vmovdqu 288(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%rsi), %ymm6
+ vmovdqu 288(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%rdx), %ymm4
+ vmovdqu 352(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r10), %ymm10
+ vmovdqu 352(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%rsi), %ymm6
+ vmovdqu 352(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rsi)
+ vmovdqu %ymm1, 352(%rsi)
+ vmovdqu 384(%rdi), %ymm2
+ vmovdqu 416(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r10), %ymm10
+ vmovdqu 416(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%rsi), %ymm6
+ vmovdqu 416(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%rdx), %ymm4
+ vmovdqu 480(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r10), %ymm10
+ vmovdqu 480(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rsi)
+ vmovdqu %ymm1, 480(%rsi)
+ addq $0x200, %rdi
+ addq $0x200, %rdx
+ subq $0x01, %rax
+ jg L_pointwise_acc_mont_start_decap
+L_pointwise_acc_mont_end_decap:
+ # Base mul mont add
+ leaq L_kyber_avx2_zetas_basemul(%rip), %r10
+ vmovdqu (%rdi), %ymm2
+ vmovdqu 32(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu (%rdx), %ymm4
+ vmovdqu 32(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu (%r10), %ymm10
+ vmovdqu 32(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu (%rsi), %ymm6
+ vmovdqu 32(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 64(%rdx), %ymm4
+ vmovdqu 96(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 64(%r10), %ymm10
+ vmovdqu 96(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 64(%rsi), %ymm6
+ vmovdqu 96(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm1, 96(%rsi)
+ vmovdqu 128(%rdi), %ymm2
+ vmovdqu 160(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 128(%rdx), %ymm4
+ vmovdqu 160(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 128(%r10), %ymm10
+ vmovdqu 160(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 128(%rsi), %ymm6
+ vmovdqu 160(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu 192(%rdi), %ymm2
+ vmovdqu 224(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 192(%rdx), %ymm4
+ vmovdqu 224(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 192(%r10), %ymm10
+ vmovdqu 224(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 192(%rsi)
+ vmovdqu %ymm1, 224(%rsi)
+ vmovdqu 256(%rdi), %ymm2
+ vmovdqu 288(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 256(%rdx), %ymm4
+ vmovdqu 288(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 256(%r10), %ymm10
+ vmovdqu 288(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 256(%rsi), %ymm6
+ vmovdqu 288(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 320(%rdx), %ymm4
+ vmovdqu 352(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 320(%r10), %ymm10
+ vmovdqu 352(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 320(%rsi), %ymm6
+ vmovdqu 352(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 320(%rsi)
+ vmovdqu %ymm1, 352(%rsi)
+ vmovdqu 384(%rdi), %ymm2
+ vmovdqu 416(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 384(%rdx), %ymm4
+ vmovdqu 416(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 384(%r10), %ymm10
+ vmovdqu 416(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 384(%rsi), %ymm6
+ vmovdqu 416(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vpslld $16, %ymm3, %ymm6
+ vpsrld $16, %ymm2, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm2, %ymm2
+ vpblendw $0x55, %ymm7, %ymm3, %ymm3
+ vmovdqu 448(%rdx), %ymm4
+ vmovdqu 480(%rdx), %ymm5
+ vpslld $16, %ymm5, %ymm6
+ vpsrld $16, %ymm4, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm4, %ymm4
+ vpblendw $0x55, %ymm7, %ymm5, %ymm5
+ vmovdqu 448(%r10), %ymm10
+ vmovdqu 480(%r10), %ymm11
+ vpmullw %ymm5, %ymm3, %ymm0
+ vpmulhw %ymm5, %ymm3, %ymm6
+ vpmullw %ymm4, %ymm2, %ymm1
+ vpmulhw %ymm4, %ymm2, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm0, %ymm8
+ vpmullw %ymm12, %ymm1, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm0
+ vpsubw %ymm9, %ymm7, %ymm1
+ vpmullw %ymm11, %ymm0, %ymm6
+ vpmulhw %ymm10, %ymm0, %ymm7
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm6, %ymm7, %ymm0
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm2, %ymm1
+ vpmulhw %ymm5, %ymm2, %ymm6
+ vpmullw %ymm4, %ymm3, %ymm2
+ vpmulhw %ymm4, %ymm3, %ymm7
+ # Mont Reduce
+ vpmullw %ymm12, %ymm1, %ymm8
+ vpmullw %ymm12, %ymm2, %ymm9
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm1
+ vpsubw %ymm9, %ymm7, %ymm2
+ vpaddw %ymm2, %ymm1, %ymm1
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ vpaddw %ymm6, %ymm0, %ymm0
+ vpaddw %ymm7, %ymm1, %ymm1
+ vpslld $16, %ymm1, %ymm6
+ vpsrld $16, %ymm0, %ymm7
+ vpblendw $0xaa, %ymm6, %ymm0, %ymm0
+ vpblendw $0x55, %ymm7, %ymm1, %ymm1
+ vmovdqu %ymm0, 448(%rsi)
+ vmovdqu %ymm1, 480(%rsi)
+ addq $0x200, %rdi
+ addq $0x200, %rdx
+ movq %r8, %rax
+ shl $9, %eax
+ subq %rax, %rdx
+ # invntt
+ leaq L_kyber_avx2_zetas_inv(%rip), %r10
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu 128(%rsi), %ymm4
+ vmovdqu 160(%rsi), %ymm5
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ # 2: 1/2
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu (%r10), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm9
+ vmovdqu 32(%r10), %ymm12
+ vpsllq $32, %ymm9, %ymm0
+ vpsrlq $32, %ymm8, %ymm1
+ vpblendd $0xaa, %ymm0, %ymm8, %ymm0
+ vpblendd $0x55, %ymm1, %ymm9, %ymm1
+ vperm2i128 $32, %ymm3, %ymm2, %ymm8
+ vmovdqu 64(%r10), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm9
+ vmovdqu 96(%r10), %ymm13
+ vpsllq $32, %ymm9, %ymm2
+ vpsrlq $32, %ymm8, %ymm3
+ vpblendd $0xaa, %ymm2, %ymm8, %ymm2
+ vpblendd $0x55, %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 4: 1/2
+ vmovdqu 128(%r10), %ymm10
+ vmovdqu 160(%r10), %ymm12
+ vmovdqu 192(%r10), %ymm11
+ vmovdqu 224(%r10), %ymm13
+ vpunpckldq %ymm1, %ymm8, %ymm0
+ vpunpckhdq %ymm1, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm9, %ymm2
+ vpunpckhdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm2
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm8
+ vpsubw %ymm2, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 8: 1/2
+ vmovdqu 256(%r10), %ymm10
+ vmovdqu 288(%r10), %ymm12
+ vmovdqu 320(%r10), %ymm11
+ vmovdqu 352(%r10), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 16: 1/2
+ vperm2i128 $32, %ymm1, %ymm8, %ymm0
+ vmovdqu 384(%r10), %ymm10
+ vperm2i128 $49, %ymm1, %ymm8, %ymm1
+ vmovdqu 416(%r10), %ymm12
+ vperm2i128 $32, %ymm3, %ymm9, %ymm2
+ vmovdqu 448(%r10), %ymm11
+ vperm2i128 $49, %ymm3, %ymm9, %ymm3
+ vmovdqu 480(%r10), %ymm13
+ vpsubw %ymm1, %ymm0, %ymm8
+ vpsubw %ymm3, %ymm2, %ymm9
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm2, %ymm2
+ vpmullw %ymm12, %ymm8, %ymm1
+ vpmullw %ymm13, %ymm9, %ymm3
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm1, %ymm8, %ymm1
+ vpsubw %ymm3, %ymm9, %ymm3
+ # 32: 1/2
+ vmovdqu 512(%r10), %ymm10
+ vmovdqu 544(%r10), %ymm12
+ vpaddw %ymm2, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm1, %ymm9
+ vpsubw %ymm2, %ymm0, %ymm2
+ vpsubw %ymm3, %ymm1, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm8, %ymm0
+ vpsubw %ymm1, %ymm9, %ymm1
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ # 2: 1/2
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 576(%r10), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm9
+ vmovdqu 608(%r10), %ymm12
+ vpsllq $32, %ymm9, %ymm4
+ vpsrlq $32, %ymm8, %ymm5
+ vpblendd $0xaa, %ymm4, %ymm8, %ymm4
+ vpblendd $0x55, %ymm5, %ymm9, %ymm5
+ vperm2i128 $32, %ymm7, %ymm6, %ymm8
+ vmovdqu 640(%r10), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm9
+ vmovdqu 672(%r10), %ymm13
+ vpsllq $32, %ymm9, %ymm6
+ vpsrlq $32, %ymm8, %ymm7
+ vpblendd $0xaa, %ymm6, %ymm8, %ymm6
+ vpblendd $0x55, %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 4: 1/2
+ vmovdqu 704(%r10), %ymm10
+ vmovdqu 736(%r10), %ymm12
+ vmovdqu 768(%r10), %ymm11
+ vmovdqu 800(%r10), %ymm13
+ vpunpckldq %ymm5, %ymm8, %ymm4
+ vpunpckhdq %ymm5, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm9, %ymm6
+ vpunpckhdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm6
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm6, %ymm6
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm8
+ vpsubw %ymm6, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 8: 1/2
+ vmovdqu 832(%r10), %ymm10
+ vmovdqu 864(%r10), %ymm12
+ vmovdqu 896(%r10), %ymm11
+ vmovdqu 928(%r10), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 16: 1/2
+ vperm2i128 $32, %ymm5, %ymm8, %ymm4
+ vmovdqu 960(%r10), %ymm10
+ vperm2i128 $49, %ymm5, %ymm8, %ymm5
+ vmovdqu 992(%r10), %ymm12
+ vperm2i128 $32, %ymm7, %ymm9, %ymm6
+ vmovdqu 1024(%r10), %ymm11
+ vperm2i128 $49, %ymm7, %ymm9, %ymm7
+ vmovdqu 1056(%r10), %ymm13
+ vpsubw %ymm5, %ymm4, %ymm8
+ vpsubw %ymm7, %ymm6, %ymm9
+ vpaddw %ymm5, %ymm4, %ymm4
+ vpaddw %ymm7, %ymm6, %ymm6
+ vpmullw %ymm12, %ymm8, %ymm5
+ vpmullw %ymm13, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm5, %ymm8, %ymm5
+ vpsubw %ymm7, %ymm9, %ymm7
+ # 32: 1/2
+ vmovdqu 1088(%r10), %ymm10
+ vmovdqu 1120(%r10), %ymm12
+ vpaddw %ymm6, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm5, %ymm9
+ vpsubw %ymm6, %ymm4, %ymm6
+ vpsubw %ymm7, %ymm5, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm5
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm5, %ymm5
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ # 64: 1/2
+ vmovdqu 1152(%r10), %ymm10
+ vmovdqu 1184(%r10), %ymm12
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu %ymm4, 128(%rsi)
+ vmovdqu %ymm5, 160(%rsi)
+ vmovdqu %ymm6, 192(%rsi)
+ vmovdqu %ymm7, 224(%rsi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vmovdqu 320(%rsi), %ymm2
+ vmovdqu 352(%rsi), %ymm3
+ vmovdqu 384(%rsi), %ymm4
+ vmovdqu 416(%rsi), %ymm5
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ # 2: 2/2
+ vperm2i128 $32, %ymm1, %ymm0, %ymm8
+ vmovdqu 1216(%r10), %ymm10
+ vperm2i128 $49, %ymm1, %ymm0, %ymm9
+ vmovdqu 1248(%r10), %ymm12
+ vpsllq $32, %ymm9, %ymm0
+ vpsrlq $32, %ymm8, %ymm1
+ vpblendd $0xaa, %ymm0, %ymm8, %ymm0
+ vpblendd $0x55, %ymm1, %ymm9, %ymm1
+ vperm2i128 $32, %ymm3, %ymm2, %ymm8
+ vmovdqu 1280(%r10), %ymm11
+ vperm2i128 $49, %ymm3, %ymm2, %ymm9
+ vmovdqu 1312(%r10), %ymm13
+ vpsllq $32, %ymm9, %ymm2
+ vpsrlq $32, %ymm8, %ymm3
+ vpblendd $0xaa, %ymm2, %ymm8, %ymm2
+ vpblendd $0x55, %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 4: 2/2
+ vmovdqu 1344(%r10), %ymm10
+ vmovdqu 1376(%r10), %ymm12
+ vmovdqu 1408(%r10), %ymm11
+ vmovdqu 1440(%r10), %ymm13
+ vpunpckldq %ymm1, %ymm8, %ymm0
+ vpunpckhdq %ymm1, %ymm8, %ymm1
+ vpunpckldq %ymm3, %ymm9, %ymm2
+ vpunpckhdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm2
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm8, %ymm8
+ vpsubw %ymm2, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 8: 2/2
+ vmovdqu 1472(%r10), %ymm10
+ vmovdqu 1504(%r10), %ymm12
+ vmovdqu 1536(%r10), %ymm11
+ vmovdqu 1568(%r10), %ymm13
+ vpunpcklqdq %ymm1, %ymm8, %ymm0
+ vpunpckhqdq %ymm1, %ymm8, %ymm1
+ vpunpcklqdq %ymm3, %ymm9, %ymm2
+ vpunpckhqdq %ymm3, %ymm9, %ymm3
+ vpaddw %ymm1, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm2, %ymm9
+ vpsubw %ymm1, %ymm0, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpmullw %ymm12, %ymm1, %ymm0
+ vpmullw %ymm13, %ymm3, %ymm2
+ vpmulhw %ymm10, %ymm1, %ymm1
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm0, %ymm0
+ vpmulhw %ymm14, %ymm2, %ymm2
+ vpsubw %ymm0, %ymm1, %ymm1
+ vpsubw %ymm2, %ymm3, %ymm3
+ # 16: 2/2
+ vperm2i128 $32, %ymm1, %ymm8, %ymm0
+ vmovdqu 1600(%r10), %ymm10
+ vperm2i128 $49, %ymm1, %ymm8, %ymm1
+ vmovdqu 1632(%r10), %ymm12
+ vperm2i128 $32, %ymm3, %ymm9, %ymm2
+ vmovdqu 1664(%r10), %ymm11
+ vperm2i128 $49, %ymm3, %ymm9, %ymm3
+ vmovdqu 1696(%r10), %ymm13
+ vpsubw %ymm1, %ymm0, %ymm8
+ vpsubw %ymm3, %ymm2, %ymm9
+ vpaddw %ymm1, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm2, %ymm2
+ vpmullw %ymm12, %ymm8, %ymm1
+ vpmullw %ymm13, %ymm9, %ymm3
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm1, %ymm8, %ymm1
+ vpsubw %ymm3, %ymm9, %ymm3
+ # 32: 2/2
+ vmovdqu 1728(%r10), %ymm10
+ vmovdqu 1760(%r10), %ymm12
+ vpaddw %ymm2, %ymm0, %ymm8
+ vpaddw %ymm3, %ymm1, %ymm9
+ vpsubw %ymm2, %ymm0, %ymm2
+ vpsubw %ymm3, %ymm1, %ymm3
+ vpmulhw %ymm15, %ymm8, %ymm0
+ vpmulhw %ymm15, %ymm9, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm8, %ymm0
+ vpsubw %ymm1, %ymm9, %ymm1
+ vpmullw %ymm12, %ymm2, %ymm8
+ vpmullw %ymm12, %ymm3, %ymm9
+ vpmulhw %ymm10, %ymm2, %ymm2
+ vpmulhw %ymm10, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ # 2: 2/2
+ vperm2i128 $32, %ymm5, %ymm4, %ymm8
+ vmovdqu 1792(%r10), %ymm10
+ vperm2i128 $49, %ymm5, %ymm4, %ymm9
+ vmovdqu 1824(%r10), %ymm12
+ vpsllq $32, %ymm9, %ymm4
+ vpsrlq $32, %ymm8, %ymm5
+ vpblendd $0xaa, %ymm4, %ymm8, %ymm4
+ vpblendd $0x55, %ymm5, %ymm9, %ymm5
+ vperm2i128 $32, %ymm7, %ymm6, %ymm8
+ vmovdqu 1856(%r10), %ymm11
+ vperm2i128 $49, %ymm7, %ymm6, %ymm9
+ vmovdqu 1888(%r10), %ymm13
+ vpsllq $32, %ymm9, %ymm6
+ vpsrlq $32, %ymm8, %ymm7
+ vpblendd $0xaa, %ymm6, %ymm8, %ymm6
+ vpblendd $0x55, %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 4: 2/2
+ vmovdqu 1920(%r10), %ymm10
+ vmovdqu 1952(%r10), %ymm12
+ vmovdqu 1984(%r10), %ymm11
+ vmovdqu 2016(%r10), %ymm13
+ vpunpckldq %ymm5, %ymm8, %ymm4
+ vpunpckhdq %ymm5, %ymm8, %ymm5
+ vpunpckldq %ymm7, %ymm9, %ymm6
+ vpunpckhdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm6
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm6, %ymm6
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm8, %ymm8
+ vpsubw %ymm6, %ymm9, %ymm9
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 8: 2/2
+ vmovdqu 2048(%r10), %ymm10
+ vmovdqu 2080(%r10), %ymm12
+ vmovdqu 2112(%r10), %ymm11
+ vmovdqu 2144(%r10), %ymm13
+ vpunpcklqdq %ymm5, %ymm8, %ymm4
+ vpunpckhqdq %ymm5, %ymm8, %ymm5
+ vpunpcklqdq %ymm7, %ymm9, %ymm6
+ vpunpckhqdq %ymm7, %ymm9, %ymm7
+ vpaddw %ymm5, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm6, %ymm9
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpsubw %ymm7, %ymm6, %ymm7
+ vpmullw %ymm12, %ymm5, %ymm4
+ vpmullw %ymm13, %ymm7, %ymm6
+ vpmulhw %ymm10, %ymm5, %ymm5
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpsubw %ymm4, %ymm5, %ymm5
+ vpsubw %ymm6, %ymm7, %ymm7
+ # 16: 2/2
+ vperm2i128 $32, %ymm5, %ymm8, %ymm4
+ vmovdqu 2176(%r10), %ymm10
+ vperm2i128 $49, %ymm5, %ymm8, %ymm5
+ vmovdqu 2208(%r10), %ymm12
+ vperm2i128 $32, %ymm7, %ymm9, %ymm6
+ vmovdqu 2240(%r10), %ymm11
+ vperm2i128 $49, %ymm7, %ymm9, %ymm7
+ vmovdqu 2272(%r10), %ymm13
+ vpsubw %ymm5, %ymm4, %ymm8
+ vpsubw %ymm7, %ymm6, %ymm9
+ vpaddw %ymm5, %ymm4, %ymm4
+ vpaddw %ymm7, %ymm6, %ymm6
+ vpmullw %ymm12, %ymm8, %ymm5
+ vpmullw %ymm13, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm11, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm5, %ymm8, %ymm5
+ vpsubw %ymm7, %ymm9, %ymm7
+ # 32: 2/2
+ vmovdqu 2304(%r10), %ymm10
+ vmovdqu 2336(%r10), %ymm12
+ vpaddw %ymm6, %ymm4, %ymm8
+ vpaddw %ymm7, %ymm5, %ymm9
+ vpsubw %ymm6, %ymm4, %ymm6
+ vpsubw %ymm7, %ymm5, %ymm7
+ vpmulhw %ymm15, %ymm8, %ymm4
+ vpmulhw %ymm15, %ymm9, %ymm5
+ vpsraw $10, %ymm4, %ymm4
+ vpsraw $10, %ymm5, %ymm5
+ vpmullw %ymm14, %ymm4, %ymm4
+ vpmullw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpmullw %ymm12, %ymm6, %ymm8
+ vpmullw %ymm12, %ymm7, %ymm9
+ vpmulhw %ymm10, %ymm6, %ymm6
+ vpmulhw %ymm10, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ # 64: 2/2
+ vmovdqu 2368(%r10), %ymm10
+ vmovdqu 2400(%r10), %ymm12
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu %ymm2, 320(%rsi)
+ vmovdqu %ymm3, 352(%rsi)
+ # 128
+ vmovdqu 2432(%r10), %ymm10
+ vmovdqu 2464(%r10), %ymm12
+ vmovdqu 2496(%r10), %ymm11
+ vmovdqu 2528(%r10), %ymm13
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm1
+ vmovdqu 192(%rsi), %ymm2
+ vmovdqu 224(%rsi), %ymm3
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm11, %ymm0, %ymm0
+ vpmulhw %ymm11, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm0
+ vpsubw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm11, %ymm2, %ymm2
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ vpmullw %ymm13, %ymm4, %ymm8
+ vpmullw %ymm13, %ymm5, %ymm9
+ vpmulhw %ymm11, %ymm4, %ymm4
+ vpmulhw %ymm11, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm4
+ vpsubw %ymm9, %ymm5, %ymm5
+ vpmullw %ymm13, %ymm6, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm11, %ymm6, %ymm6
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu %ymm2, 192(%rsi)
+ vmovdqu %ymm3, 224(%rsi)
+ vmovdqu %ymm4, 384(%rsi)
+ vmovdqu %ymm5, 416(%rsi)
+ vmovdqu %ymm6, 448(%rsi)
+ vmovdqu %ymm7, 480(%rsi)
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu 256(%rsi), %ymm4
+ vmovdqu 288(%rsi), %ymm5
+ vmovdqu 320(%rsi), %ymm6
+ vmovdqu 352(%rsi), %ymm7
+ vpsubw %ymm4, %ymm0, %ymm8
+ vpsubw %ymm5, %ymm1, %ymm9
+ vpaddw %ymm4, %ymm0, %ymm0
+ vpaddw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm12, %ymm8, %ymm4
+ vpmullw %ymm12, %ymm9, %ymm5
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm4, %ymm4
+ vpmulhw %ymm14, %ymm5, %ymm5
+ vpsubw %ymm4, %ymm8, %ymm4
+ vpsubw %ymm5, %ymm9, %ymm5
+ vpsubw %ymm6, %ymm2, %ymm8
+ vpsubw %ymm7, %ymm3, %ymm9
+ vpaddw %ymm6, %ymm2, %ymm2
+ vpaddw %ymm7, %ymm3, %ymm3
+ vpmullw %ymm12, %ymm8, %ymm6
+ vpmullw %ymm12, %ymm9, %ymm7
+ vpmulhw %ymm10, %ymm8, %ymm8
+ vpmulhw %ymm10, %ymm9, %ymm9
+ vpmulhw %ymm14, %ymm6, %ymm6
+ vpmulhw %ymm14, %ymm7, %ymm7
+ vpsubw %ymm6, %ymm8, %ymm6
+ vpsubw %ymm7, %ymm9, %ymm7
+ vpmullw %ymm13, %ymm0, %ymm8
+ vpmullw %ymm13, %ymm1, %ymm9
+ vpmulhw %ymm11, %ymm0, %ymm0
+ vpmulhw %ymm11, %ymm1, %ymm1
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm0, %ymm0
+ vpsubw %ymm9, %ymm1, %ymm1
+ vpmullw %ymm13, %ymm2, %ymm8
+ vpmullw %ymm13, %ymm3, %ymm9
+ vpmulhw %ymm11, %ymm2, %ymm2
+ vpmulhw %ymm11, %ymm3, %ymm3
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm2, %ymm2
+ vpsubw %ymm9, %ymm3, %ymm3
+ vpmullw %ymm13, %ymm4, %ymm8
+ vpmullw %ymm13, %ymm5, %ymm9
+ vpmulhw %ymm11, %ymm4, %ymm4
+ vpmulhw %ymm11, %ymm5, %ymm5
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm4, %ymm4
+ vpsubw %ymm9, %ymm5, %ymm5
+ vpmullw %ymm13, %ymm6, %ymm8
+ vpmullw %ymm13, %ymm7, %ymm9
+ vpmulhw %ymm11, %ymm6, %ymm6
+ vpmulhw %ymm11, %ymm7, %ymm7
+ vpmulhw %ymm14, %ymm8, %ymm8
+ vpmulhw %ymm14, %ymm9, %ymm9
+ vpsubw %ymm8, %ymm6, %ymm6
+ vpsubw %ymm9, %ymm7, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu %ymm4, 256(%rsi)
+ vmovdqu %ymm5, 288(%rsi)
+ vmovdqu %ymm6, 320(%rsi)
+ vmovdqu %ymm7, 352(%rsi)
+ # Sub Errors
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu (%rcx), %ymm4
+ vmovdqu 32(%rcx), %ymm5
+ vmovdqu 64(%rcx), %ymm6
+ vmovdqu 96(%rcx), %ymm7
+ vpsubw %ymm0, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm5, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpsubw %ymm2, %ymm6, %ymm6
+ vpsubw %ymm3, %ymm7, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm1, 32(%rsi)
+ vmovdqu %ymm2, 64(%rsi)
+ vmovdqu %ymm3, 96(%rsi)
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm1
+ vmovdqu 192(%rsi), %ymm2
+ vmovdqu 224(%rsi), %ymm3
+ vmovdqu 128(%rcx), %ymm4
+ vmovdqu 160(%rcx), %ymm5
+ vmovdqu 192(%rcx), %ymm6
+ vmovdqu 224(%rcx), %ymm7
+ vpsubw %ymm0, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm5, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpsubw %ymm2, %ymm6, %ymm6
+ vpsubw %ymm3, %ymm7, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 128(%rsi)
+ vmovdqu %ymm1, 160(%rsi)
+ vmovdqu %ymm2, 192(%rsi)
+ vmovdqu %ymm3, 224(%rsi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vmovdqu 320(%rsi), %ymm2
+ vmovdqu 352(%rsi), %ymm3
+ vmovdqu 256(%rcx), %ymm4
+ vmovdqu 288(%rcx), %ymm5
+ vmovdqu 320(%rcx), %ymm6
+ vmovdqu 352(%rcx), %ymm7
+ vpsubw %ymm0, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm5, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpsubw %ymm2, %ymm6, %ymm6
+ vpsubw %ymm3, %ymm7, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 256(%rsi)
+ vmovdqu %ymm1, 288(%rsi)
+ vmovdqu %ymm2, 320(%rsi)
+ vmovdqu %ymm3, 352(%rsi)
+ vmovdqu 384(%rsi), %ymm0
+ vmovdqu 416(%rsi), %ymm1
+ vmovdqu 448(%rsi), %ymm2
+ vmovdqu 480(%rsi), %ymm3
+ vmovdqu 384(%rcx), %ymm4
+ vmovdqu 416(%rcx), %ymm5
+ vmovdqu 448(%rcx), %ymm6
+ vmovdqu 480(%rcx), %ymm7
+ vpsubw %ymm0, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm5, %ymm5
+ vpmulhw %ymm15, %ymm4, %ymm0
+ vpmulhw %ymm15, %ymm5, %ymm1
+ vpsraw $10, %ymm0, %ymm0
+ vpsraw $10, %ymm1, %ymm1
+ vpmullw %ymm14, %ymm0, %ymm0
+ vpmullw %ymm14, %ymm1, %ymm1
+ vpsubw %ymm0, %ymm4, %ymm0
+ vpsubw %ymm1, %ymm5, %ymm1
+ vpsubw %ymm2, %ymm6, %ymm6
+ vpsubw %ymm3, %ymm7, %ymm7
+ vpmulhw %ymm15, %ymm6, %ymm2
+ vpmulhw %ymm15, %ymm7, %ymm3
+ vpsraw $10, %ymm2, %ymm2
+ vpsraw $10, %ymm3, %ymm3
+ vpmullw %ymm14, %ymm2, %ymm2
+ vpmullw %ymm14, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm6, %ymm2
+ vpsubw %ymm3, %ymm7, %ymm3
+ vmovdqu %ymm0, 384(%rsi)
+ vmovdqu %ymm1, 416(%rsi)
+ vmovdqu %ymm2, 448(%rsi)
+ vmovdqu %ymm3, 480(%rsi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_decapsulate_avx2,.-kyber_decapsulate_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_csubq_avx2
+.type kyber_csubq_avx2,@function
+.align 16
+kyber_csubq_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_csubq_avx2
+.p2align 4
+_kyber_csubq_avx2:
+#endif /* __APPLE__ */
+ vmovdqu kyber_q(%rip), %ymm12
+ vmovdqu (%rdi), %ymm0
+ vmovdqu 32(%rdi), %ymm1
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vmovdqu 192(%rdi), %ymm6
+ vmovdqu 224(%rdi), %ymm7
+ vpsubw %ymm12, %ymm0, %ymm8
+ vpsubw %ymm12, %ymm1, %ymm9
+ vpsubw %ymm12, %ymm2, %ymm10
+ vpsubw %ymm12, %ymm3, %ymm11
+ vpsraw $15, %ymm8, %ymm0
+ vpsraw $15, %ymm9, %ymm1
+ vpsraw $15, %ymm10, %ymm2
+ vpsraw $15, %ymm11, %ymm3
+ vpand %ymm12, %ymm0, %ymm0
+ vpand %ymm12, %ymm1, %ymm1
+ vpand %ymm12, %ymm2, %ymm2
+ vpand %ymm12, %ymm3, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm10, %ymm2, %ymm2
+ vpaddw %ymm11, %ymm3, %ymm3
+ vpsubw %ymm12, %ymm4, %ymm8
+ vpsubw %ymm12, %ymm5, %ymm9
+ vpsubw %ymm12, %ymm6, %ymm10
+ vpsubw %ymm12, %ymm7, %ymm11
+ vpsraw $15, %ymm8, %ymm4
+ vpsraw $15, %ymm9, %ymm5
+ vpsraw $15, %ymm10, %ymm6
+ vpsraw $15, %ymm11, %ymm7
+ vpand %ymm12, %ymm4, %ymm4
+ vpand %ymm12, %ymm5, %ymm5
+ vpand %ymm12, %ymm6, %ymm6
+ vpand %ymm12, %ymm7, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ vpaddw %ymm10, %ymm6, %ymm6
+ vpaddw %ymm11, %ymm7, %ymm7
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, 128(%rdi)
+ vmovdqu %ymm5, 160(%rdi)
+ vmovdqu %ymm6, 192(%rdi)
+ vmovdqu %ymm7, 224(%rdi)
+ vmovdqu 256(%rdi), %ymm0
+ vmovdqu 288(%rdi), %ymm1
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vmovdqu 384(%rdi), %ymm4
+ vmovdqu 416(%rdi), %ymm5
+ vmovdqu 448(%rdi), %ymm6
+ vmovdqu 480(%rdi), %ymm7
+ vpsubw %ymm12, %ymm0, %ymm8
+ vpsubw %ymm12, %ymm1, %ymm9
+ vpsubw %ymm12, %ymm2, %ymm10
+ vpsubw %ymm12, %ymm3, %ymm11
+ vpsraw $15, %ymm8, %ymm0
+ vpsraw $15, %ymm9, %ymm1
+ vpsraw $15, %ymm10, %ymm2
+ vpsraw $15, %ymm11, %ymm3
+ vpand %ymm12, %ymm0, %ymm0
+ vpand %ymm12, %ymm1, %ymm1
+ vpand %ymm12, %ymm2, %ymm2
+ vpand %ymm12, %ymm3, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm10, %ymm2, %ymm2
+ vpaddw %ymm11, %ymm3, %ymm3
+ vpsubw %ymm12, %ymm4, %ymm8
+ vpsubw %ymm12, %ymm5, %ymm9
+ vpsubw %ymm12, %ymm6, %ymm10
+ vpsubw %ymm12, %ymm7, %ymm11
+ vpsraw $15, %ymm8, %ymm4
+ vpsraw $15, %ymm9, %ymm5
+ vpsraw $15, %ymm10, %ymm6
+ vpsraw $15, %ymm11, %ymm7
+ vpand %ymm12, %ymm4, %ymm4
+ vpand %ymm12, %ymm5, %ymm5
+ vpand %ymm12, %ymm6, %ymm6
+ vpand %ymm12, %ymm7, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ vpaddw %ymm10, %ymm6, %ymm6
+ vpaddw %ymm11, %ymm7, %ymm7
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm1, 288(%rdi)
+ vmovdqu %ymm2, 320(%rdi)
+ vmovdqu %ymm3, 352(%rdi)
+ vmovdqu %ymm4, 384(%rdi)
+ vmovdqu %ymm5, 416(%rdi)
+ vmovdqu %ymm6, 448(%rdi)
+ vmovdqu %ymm7, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_csubq_avx2,.-kyber_csubq_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_rej_idx:
+.quad 0xffffffffffffffff,0xffffffffffffff00
+.quad 0xffffffffffffff02,0xffffffffffff0200
+.quad 0xffffffffffffff04,0xffffffffffff0400
+.quad 0xffffffffffff0402,0xffffffffff040200
+.quad 0xffffffffffffff06,0xffffffffffff0600
+.quad 0xffffffffffff0602,0xffffffffff060200
+.quad 0xffffffffffff0604,0xffffffffff060400
+.quad 0xffffffffff060402,0xffffffff06040200
+.quad 0xffffffffffffff08,0xffffffffffff0800
+.quad 0xffffffffffff0802,0xffffffffff080200
+.quad 0xffffffffffff0804,0xffffffffff080400
+.quad 0xffffffffff080402,0xffffffff08040200
+.quad 0xffffffffffff0806,0xffffffffff080600
+.quad 0xffffffffff080602,0xffffffff08060200
+.quad 0xffffffffff080604,0xffffffff08060400
+.quad 0xffffffff08060402,0xffffff0806040200
+.quad 0xffffffffffffff0a,0xffffffffffff0a00
+.quad 0xffffffffffff0a02,0xffffffffff0a0200
+.quad 0xffffffffffff0a04,0xffffffffff0a0400
+.quad 0xffffffffff0a0402,0xffffffff0a040200
+.quad 0xffffffffffff0a06,0xffffffffff0a0600
+.quad 0xffffffffff0a0602,0xffffffff0a060200
+.quad 0xffffffffff0a0604,0xffffffff0a060400
+.quad 0xffffffff0a060402,0xffffff0a06040200
+.quad 0xffffffffffff0a08,0xffffffffff0a0800
+.quad 0xffffffffff0a0802,0xffffffff0a080200
+.quad 0xffffffffff0a0804,0xffffffff0a080400
+.quad 0xffffffff0a080402,0xffffff0a08040200
+.quad 0xffffffffff0a0806,0xffffffff0a080600
+.quad 0xffffffff0a080602,0xffffff0a08060200
+.quad 0xffffffff0a080604,0xffffff0a08060400
+.quad 0xffffff0a08060402,0xffff0a0806040200
+.quad 0xffffffffffffff0c,0xffffffffffff0c00
+.quad 0xffffffffffff0c02,0xffffffffff0c0200
+.quad 0xffffffffffff0c04,0xffffffffff0c0400
+.quad 0xffffffffff0c0402,0xffffffff0c040200
+.quad 0xffffffffffff0c06,0xffffffffff0c0600
+.quad 0xffffffffff0c0602,0xffffffff0c060200
+.quad 0xffffffffff0c0604,0xffffffff0c060400
+.quad 0xffffffff0c060402,0xffffff0c06040200
+.quad 0xffffffffffff0c08,0xffffffffff0c0800
+.quad 0xffffffffff0c0802,0xffffffff0c080200
+.quad 0xffffffffff0c0804,0xffffffff0c080400
+.quad 0xffffffff0c080402,0xffffff0c08040200
+.quad 0xffffffffff0c0806,0xffffffff0c080600
+.quad 0xffffffff0c080602,0xffffff0c08060200
+.quad 0xffffffff0c080604,0xffffff0c08060400
+.quad 0xffffff0c08060402,0xffff0c0806040200
+.quad 0xffffffffffff0c0a,0xffffffffff0c0a00
+.quad 0xffffffffff0c0a02,0xffffffff0c0a0200
+.quad 0xffffffffff0c0a04,0xffffffff0c0a0400
+.quad 0xffffffff0c0a0402,0xffffff0c0a040200
+.quad 0xffffffffff0c0a06,0xffffffff0c0a0600
+.quad 0xffffffff0c0a0602,0xffffff0c0a060200
+.quad 0xffffffff0c0a0604,0xffffff0c0a060400
+.quad 0xffffff0c0a060402,0xffff0c0a06040200
+.quad 0xffffffffff0c0a08,0xffffffff0c0a0800
+.quad 0xffffffff0c0a0802,0xffffff0c0a080200
+.quad 0xffffffff0c0a0804,0xffffff0c0a080400
+.quad 0xffffff0c0a080402,0xffff0c0a08040200
+.quad 0xffffffff0c0a0806,0xffffff0c0a080600
+.quad 0xffffff0c0a080602,0xffff0c0a08060200
+.quad 0xffffff0c0a080604,0xffff0c0a08060400
+.quad 0xffff0c0a08060402,0xff0c0a0806040200
+.quad 0xffffffffffffff0e,0xffffffffffff0e00
+.quad 0xffffffffffff0e02,0xffffffffff0e0200
+.quad 0xffffffffffff0e04,0xffffffffff0e0400
+.quad 0xffffffffff0e0402,0xffffffff0e040200
+.quad 0xffffffffffff0e06,0xffffffffff0e0600
+.quad 0xffffffffff0e0602,0xffffffff0e060200
+.quad 0xffffffffff0e0604,0xffffffff0e060400
+.quad 0xffffffff0e060402,0xffffff0e06040200
+.quad 0xffffffffffff0e08,0xffffffffff0e0800
+.quad 0xffffffffff0e0802,0xffffffff0e080200
+.quad 0xffffffffff0e0804,0xffffffff0e080400
+.quad 0xffffffff0e080402,0xffffff0e08040200
+.quad 0xffffffffff0e0806,0xffffffff0e080600
+.quad 0xffffffff0e080602,0xffffff0e08060200
+.quad 0xffffffff0e080604,0xffffff0e08060400
+.quad 0xffffff0e08060402,0xffff0e0806040200
+.quad 0xffffffffffff0e0a,0xffffffffff0e0a00
+.quad 0xffffffffff0e0a02,0xffffffff0e0a0200
+.quad 0xffffffffff0e0a04,0xffffffff0e0a0400
+.quad 0xffffffff0e0a0402,0xffffff0e0a040200
+.quad 0xffffffffff0e0a06,0xffffffff0e0a0600
+.quad 0xffffffff0e0a0602,0xffffff0e0a060200
+.quad 0xffffffff0e0a0604,0xffffff0e0a060400
+.quad 0xffffff0e0a060402,0xffff0e0a06040200
+.quad 0xffffffffff0e0a08,0xffffffff0e0a0800
+.quad 0xffffffff0e0a0802,0xffffff0e0a080200
+.quad 0xffffffff0e0a0804,0xffffff0e0a080400
+.quad 0xffffff0e0a080402,0xffff0e0a08040200
+.quad 0xffffffff0e0a0806,0xffffff0e0a080600
+.quad 0xffffff0e0a080602,0xffff0e0a08060200
+.quad 0xffffff0e0a080604,0xffff0e0a08060400
+.quad 0xffff0e0a08060402,0xff0e0a0806040200
+.quad 0xffffffffffff0e0c,0xffffffffff0e0c00
+.quad 0xffffffffff0e0c02,0xffffffff0e0c0200
+.quad 0xffffffffff0e0c04,0xffffffff0e0c0400
+.quad 0xffffffff0e0c0402,0xffffff0e0c040200
+.quad 0xffffffffff0e0c06,0xffffffff0e0c0600
+.quad 0xffffffff0e0c0602,0xffffff0e0c060200
+.quad 0xffffffff0e0c0604,0xffffff0e0c060400
+.quad 0xffffff0e0c060402,0xffff0e0c06040200
+.quad 0xffffffffff0e0c08,0xffffffff0e0c0800
+.quad 0xffffffff0e0c0802,0xffffff0e0c080200
+.quad 0xffffffff0e0c0804,0xffffff0e0c080400
+.quad 0xffffff0e0c080402,0xffff0e0c08040200
+.quad 0xffffffff0e0c0806,0xffffff0e0c080600
+.quad 0xffffff0e0c080602,0xffff0e0c08060200
+.quad 0xffffff0e0c080604,0xffff0e0c08060400
+.quad 0xffff0e0c08060402,0xff0e0c0806040200
+.quad 0xffffffffff0e0c0a,0xffffffff0e0c0a00
+.quad 0xffffffff0e0c0a02,0xffffff0e0c0a0200
+.quad 0xffffffff0e0c0a04,0xffffff0e0c0a0400
+.quad 0xffffff0e0c0a0402,0xffff0e0c0a040200
+.quad 0xffffffff0e0c0a06,0xffffff0e0c0a0600
+.quad 0xffffff0e0c0a0602,0xffff0e0c0a060200
+.quad 0xffffff0e0c0a0604,0xffff0e0c0a060400
+.quad 0xffff0e0c0a060402,0xff0e0c0a06040200
+.quad 0xffffffff0e0c0a08,0xffffff0e0c0a0800
+.quad 0xffffff0e0c0a0802,0xffff0e0c0a080200
+.quad 0xffffff0e0c0a0804,0xffff0e0c0a080400
+.quad 0xffff0e0c0a080402,0xff0e0c0a08040200
+.quad 0xffffff0e0c0a0806,0xffff0e0c0a080600
+.quad 0xffff0e0c0a080602,0xff0e0c0a08060200
+.quad 0xffff0e0c0a080604,0xff0e0c0a08060400
+.quad 0xff0e0c0a08060402,0xe0c0a0806040200
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_rej_q:
+.quad 0xd010d010d010d01, 0xd010d010d010d01
+.quad 0xd010d010d010d01, 0xd010d010d010d01
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_rej_ones:
+.quad 0x101010101010101, 0x101010101010101
+.quad 0x101010101010101, 0x101010101010101
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_rej_mask:
+.quad 0xfff0fff0fff0fff, 0xfff0fff0fff0fff
+.quad 0xfff0fff0fff0fff, 0xfff0fff0fff0fff
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_rej_shuffle:
+.quad 0x504040302010100, 0xb0a0a0908070706
+.quad 0x908080706050504, 0xf0e0e0d0c0b0b0a
+#ifndef __APPLE__
+.text
+.globl kyber_rej_uniform_n_avx2
+.type kyber_rej_uniform_n_avx2,@function
+.align 16
+kyber_rej_uniform_n_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_rej_uniform_n_avx2
+.p2align 4
+_kyber_rej_uniform_n_avx2:
+#endif /* __APPLE__ */
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ pushq %rbp
+ movq %rcx, %r8
+ movl %esi, %eax
+ vmovdqu L_kyber_rej_q(%rip), %ymm6
+ vmovdqu L_kyber_rej_ones(%rip), %ymm7
+ vmovdqu L_kyber_rej_mask(%rip), %ymm8
+ vmovdqu L_kyber_rej_shuffle(%rip), %ymm9
+ leaq L_kyber_rej_idx(%rip), %r9
+ movq $0x1111111111111111, %r14
+ movq $0xe0c0a0806040200, %rbp
+ movq $0x101010101010101, %r13
+ vpermq $0x94, (%rdx), %ymm0
+ vpermq $0x94, 24(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ vpermq $0x94, 48(%rdx), %ymm0
+ vpermq $0x94, 72(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ vpermq $0x94, 96(%rdx), %ymm0
+ vpermq $0x94, 120(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ vpermq $0x94, 144(%rdx), %ymm0
+ vpermq $0x94, 168(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ vpermq $0x94, 192(%rdx), %ymm0
+ vpermq $0x94, 216(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ vpermq $0x94, 240(%rdx), %ymm0
+ vpermq $0x94, 264(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ vpermq $0x94, 288(%rdx), %ymm0
+ vpermq $0x94, 312(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ addq $0x150, %rdx
+ subl $0x150, %r8d
+L_kyber_rej_uniform_n_avx2_start_256:
+ vpermq $0x94, (%rdx), %ymm0
+ vpermq $0x94, 24(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ addq $48, %rdx
+ subl $48, %r8d
+ cmpl $48, %r8d
+ jl L_kyber_rej_uniform_n_avx2_done_256
+ cmpl $32, %esi
+ jge L_kyber_rej_uniform_n_avx2_start_256
+L_kyber_rej_uniform_n_avx2_done_256:
+ cmpl $8, %esi
+ jl L_kyber_rej_uniform_n_avx2_done_128
+ cmpl $12, %r8d
+ jl L_kyber_rej_uniform_n_avx2_done_128
+L_kyber_rej_uniform_n_avx2_start_128:
+ vmovdqu (%rdx), %xmm0
+ vpshufb %xmm9, %xmm0, %xmm0
+ vpsrlw $4, %xmm0, %xmm2
+ vpblendw $0xaa, %xmm2, %xmm0, %xmm0
+ vpand %xmm8, %xmm0, %xmm0
+ vpcmpgtw %xmm0, %xmm6, %xmm2
+ vpmovmskb %xmm2, %rbx
+ movq $0x5555, %r10
+ pextl %r10d, %ebx, %ebx
+ movq (%r9,%rbx,8), %xmm3
+ vpaddb %xmm7, %xmm3, %xmm4
+ vpunpcklbw %xmm4, %xmm3, %xmm3
+ vpshufb %xmm3, %xmm0, %xmm0
+ vmovdqu %xmm0, (%rdi)
+ popcntl %ebx, %ecx
+ leaq (%rdi,%rcx,2), %rdi
+ subl %ecx, %esi
+ addq $12, %rdx
+ subl $12, %r8d
+ cmpl $12, %r8d
+ jl L_kyber_rej_uniform_n_avx2_done_128
+ cmpl $8, %esi
+ jge L_kyber_rej_uniform_n_avx2_start_128
+L_kyber_rej_uniform_n_avx2_done_128:
+ cmpl $0x00, %r8d
+ je L_kyber_rej_uniform_n_avx2_done_64
+ cmpl $0x00, %esi
+ je L_kyber_rej_uniform_n_avx2_done_64
+ movq $0xfff0fff0fff0fff, %r15
+ movq $0x2000200020002000, %r10
+ movq $0xd010d010d010d01, %r11
+ movq $0x1000100010001000, %r12
+L_kyber_rej_uniform_n_avx2_start_64:
+ movq (%rdx), %rcx
+ pdepq %r15, %rcx, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_0_avx2_rej_large_0
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_n_avx2_done_64
+L_kyber_rej_uniform_0_avx2_rej_large_0:
+ shrq $16, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_0_avx2_rej_large_1
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_n_avx2_done_64
+L_kyber_rej_uniform_0_avx2_rej_large_1:
+ shrq $16, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_0_avx2_rej_large_2
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_n_avx2_done_64
+L_kyber_rej_uniform_0_avx2_rej_large_2:
+ shrq $16, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_0_avx2_rej_large_3
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_n_avx2_done_64
+L_kyber_rej_uniform_0_avx2_rej_large_3:
+ addq $6, %rdx
+ subl $6, %r8d
+ jle L_kyber_rej_uniform_n_avx2_done_64
+ cmpl $0x00, %esi
+ jg L_kyber_rej_uniform_n_avx2_start_64
+L_kyber_rej_uniform_n_avx2_done_64:
+ vzeroupper
+ subl %esi, %eax
+ popq %rbp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ repz retq
+#ifndef __APPLE__
+.size kyber_rej_uniform_n_avx2,.-kyber_rej_uniform_n_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_rej_uniform_avx2
+.type kyber_rej_uniform_avx2,@function
+.align 16
+kyber_rej_uniform_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_rej_uniform_avx2
+.p2align 4
+_kyber_rej_uniform_avx2:
+#endif /* __APPLE__ */
+ pushq %rbx
+ pushq %r12
+ pushq %r13
+ pushq %r14
+ pushq %r15
+ pushq %rbp
+ movq %rcx, %r8
+ movl %esi, %eax
+ cmpl $0x00, %esi
+ je L_kyber_rej_uniform_avx2_done_64
+ cmpl $8, %esi
+ jl L_kyber_rej_uniform_avx2_done_128
+ vmovdqu L_kyber_rej_q(%rip), %ymm6
+ vmovdqu L_kyber_rej_ones(%rip), %ymm7
+ vmovdqu L_kyber_rej_mask(%rip), %ymm8
+ vmovdqu L_kyber_rej_shuffle(%rip), %ymm9
+ leaq L_kyber_rej_idx(%rip), %r9
+ movq $0x1111111111111111, %r14
+ movq $0xe0c0a0806040200, %rbp
+ movq $0x101010101010101, %r13
+ cmpl $32, %esi
+ jl L_kyber_rej_uniform_avx2_done_256
+ vpermq $0x94, (%rdx), %ymm0
+ vpermq $0x94, 24(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ addq $48, %rdx
+ subl $48, %r8d
+ cmpl $32, %esi
+ jl L_kyber_rej_uniform_avx2_done_256
+ vpermq $0x94, (%rdx), %ymm0
+ vpermq $0x94, 24(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ addq $48, %rdx
+ subl $48, %r8d
+ cmpl $32, %esi
+ jl L_kyber_rej_uniform_avx2_done_256
+L_kyber_rej_uniform_avx2_start_256:
+ vpermq $0x94, (%rdx), %ymm0
+ vpermq $0x94, 24(%rdx), %ymm1
+ vpshufb %ymm9, %ymm0, %ymm0
+ vpshufb %ymm9, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpblendw $0xaa, %ymm2, %ymm0, %ymm0
+ vpblendw $0xaa, %ymm3, %ymm1, %ymm1
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpcmpgtw %ymm0, %ymm6, %ymm2
+ vpcmpgtw %ymm1, %ymm6, %ymm3
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpmovmskb %ymm2, %rbx
+ movzbl %bl, %r10d
+ movzbl %bh, %ecx
+ movq %rbx, %r11
+ movq %rbx, %r12
+ shrq $16, %r11
+ shrq $24, %r12
+ andq $0xff, %r11
+ andq $0xff, %r12
+ movq (%r9,%r10,8), %xmm2
+ movq (%r9,%rcx,8), %xmm3
+ movq (%r9,%r11,8), %xmm4
+ movq (%r9,%r12,8), %xmm5
+ vinserti128 $0x01, %xmm4, %ymm2, %ymm2
+ vinserti128 $0x01, %xmm5, %ymm3, %ymm3
+ vpaddb %ymm7, %ymm2, %ymm4
+ vpaddb %ymm7, %ymm3, %ymm5
+ vpunpcklbw %ymm4, %ymm2, %ymm2
+ vpunpcklbw %ymm5, %ymm3, %ymm3
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpshufb %ymm3, %ymm1, %ymm1
+ movq %rbx, %r10
+ movq %rbx, %r11
+ movq %rbx, %r12
+ andq $0xff, %rbx
+ shrq $16, %r10
+ shrq $8, %r11
+ shrq $24, %r12
+ andq $0xff, %r10
+ andq $0xff, %r11
+ popcntl %ebx, %ebx
+ popcntl %r10d, %r10d
+ popcntl %r11d, %r11d
+ popcntl %r12d, %r12d
+ vmovdqu %xmm0, (%rdi)
+ vextracti128 $0x01, %ymm0, %xmm0
+ leaq (%rdi,%rbx,2), %rdi
+ subl %ebx, %esi
+ vmovdqu %xmm0, (%rdi)
+ leaq (%rdi,%r10,2), %rdi
+ subl %r10d, %esi
+ vmovdqu %xmm1, (%rdi)
+ vextracti128 $0x01, %ymm1, %xmm1
+ leaq (%rdi,%r11,2), %rdi
+ subl %r11d, %esi
+ vmovdqu %xmm1, (%rdi)
+ leaq (%rdi,%r12,2), %rdi
+ subl %r12d, %esi
+ addq $48, %rdx
+ subl $48, %r8d
+ cmpl $48, %r8d
+ jl L_kyber_rej_uniform_avx2_done_256
+ cmpl $32, %esi
+ jge L_kyber_rej_uniform_avx2_start_256
+L_kyber_rej_uniform_avx2_done_256:
+ cmpl $8, %esi
+ jl L_kyber_rej_uniform_avx2_done_128
+ cmpl $12, %r8d
+ jl L_kyber_rej_uniform_avx2_done_128
+L_kyber_rej_uniform_avx2_start_128:
+ vmovdqu (%rdx), %xmm0
+ vpshufb %xmm9, %xmm0, %xmm0
+ vpsrlw $4, %xmm0, %xmm2
+ vpblendw $0xaa, %xmm2, %xmm0, %xmm0
+ vpand %xmm8, %xmm0, %xmm0
+ vpcmpgtw %xmm0, %xmm6, %xmm2
+ vpmovmskb %xmm2, %rbx
+ movq $0x5555, %r10
+ pextl %r10d, %ebx, %ebx
+ movq (%r9,%rbx,8), %xmm3
+ vpaddb %xmm7, %xmm3, %xmm4
+ vpunpcklbw %xmm4, %xmm3, %xmm3
+ vpshufb %xmm3, %xmm0, %xmm0
+ vmovdqu %xmm0, (%rdi)
+ popcntl %ebx, %ecx
+ leaq (%rdi,%rcx,2), %rdi
+ subl %ecx, %esi
+ addq $12, %rdx
+ subl $12, %r8d
+ cmpl $12, %r8d
+ jl L_kyber_rej_uniform_avx2_done_128
+ cmpl $8, %esi
+ jge L_kyber_rej_uniform_avx2_start_128
+L_kyber_rej_uniform_avx2_done_128:
+ cmpl $0x00, %r8d
+ je L_kyber_rej_uniform_avx2_done_64
+ cmpl $0x00, %esi
+ je L_kyber_rej_uniform_avx2_done_64
+ movq $0xfff0fff0fff0fff, %r15
+ movq $0x2000200020002000, %r10
+ movq $0xd010d010d010d01, %r11
+ movq $0x1000100010001000, %r12
+L_kyber_rej_uniform_avx2_start_64:
+ movq (%rdx), %rcx
+ pdepq %r15, %rcx, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_avx2_rej_large_0
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_avx2_done_64
+L_kyber_rej_uniform_avx2_rej_large_0:
+ shrq $16, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_avx2_rej_large_1
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_avx2_done_64
+L_kyber_rej_uniform_avx2_rej_large_1:
+ shrq $16, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_avx2_rej_large_2
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_avx2_done_64
+L_kyber_rej_uniform_avx2_rej_large_2:
+ shrq $16, %rcx
+ cmpw $0xd01, %cx
+ jge L_kyber_rej_uniform_avx2_rej_large_3
+ movw %cx, (%rdi)
+ addq $2, %rdi
+ subl $0x01, %esi
+ je L_kyber_rej_uniform_avx2_done_64
+L_kyber_rej_uniform_avx2_rej_large_3:
+ addq $6, %rdx
+ subl $6, %r8d
+ jle L_kyber_rej_uniform_avx2_done_64
+ cmpl $0x00, %esi
+ jg L_kyber_rej_uniform_avx2_start_64
+L_kyber_rej_uniform_avx2_done_64:
+ vzeroupper
+ subl %esi, %eax
+ popq %rbp
+ popq %r15
+ popq %r14
+ popq %r13
+ popq %r12
+ popq %rbx
+ repz retq
+#ifndef __APPLE__
+.size kyber_rej_uniform_avx2,.-kyber_rej_uniform_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_249:
+.quad 0x24924900249249, 0x24924900249249
+.quad 0x24924900249249, 0x24924900249249
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_6db:
+.quad 0x6db6db006db6db, 0x6db6db006db6db
+.quad 0x6db6db006db6db, 0x6db6db006db6db
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_07:
+.quad 0x700000007, 0x700000007
+.quad 0x700000007, 0x700000007
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_70:
+.quad 0x7000000070000, 0x7000000070000
+.quad 0x7000000070000, 0x7000000070000
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_3:
+.quad 0x3000300030003, 0x3000300030003
+.quad 0x3000300030003, 0x3000300030003
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_shuff:
+.quad 0xff050403ff020100, 0xff0b0a09ff080706
+.quad 0xff090807ff060504, 0xff0f0e0dff0c0b0a
+#ifndef __APPLE__
+.text
+.globl kyber_cbd_eta3_avx2
+.type kyber_cbd_eta3_avx2,@function
+.align 16
+kyber_cbd_eta3_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_cbd_eta3_avx2
+.p2align 4
+_kyber_cbd_eta3_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_mask_249(%rip), %ymm8
+ vmovdqu L_kyber_mask_6db(%rip), %ymm9
+ vmovdqu L_kyber_mask_07(%rip), %ymm10
+ vmovdqu L_kyber_mask_70(%rip), %ymm11
+ vmovdqu L_kyber_mask_3(%rip), %ymm12
+ vmovdqu L_kyber_shuff(%rip), %ymm13
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 24(%rsi), %ymm1
+ vpermq $0x94, %ymm0, %ymm0
+ vpermq $0x94, %ymm1, %ymm1
+ vpshufb %ymm13, %ymm0, %ymm0
+ vpshufb %ymm13, %ymm1, %ymm1
+ vpsrld $0x01, %ymm0, %ymm2
+ vpsrld $0x01, %ymm1, %ymm3
+ vpsrld $2, %ymm0, %ymm4
+ vpsrld $2, %ymm1, %ymm5
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpand %ymm8, %ymm4, %ymm4
+ vpand %ymm8, %ymm5, %ymm5
+ vpaddd %ymm2, %ymm0, %ymm0
+ vpaddd %ymm3, %ymm1, %ymm1
+ vpaddd %ymm4, %ymm0, %ymm0
+ vpaddd %ymm5, %ymm1, %ymm1
+ vpsrld $3, %ymm0, %ymm2
+ vpsrld $3, %ymm1, %ymm3
+ vpaddd %ymm9, %ymm0, %ymm0
+ vpaddd %ymm9, %ymm1, %ymm1
+ vpsubd %ymm2, %ymm0, %ymm0
+ vpsubd %ymm3, %ymm1, %ymm1
+ vpslld $10, %ymm0, %ymm2
+ vpslld $10, %ymm1, %ymm3
+ vpsrld $12, %ymm0, %ymm4
+ vpsrld $12, %ymm1, %ymm5
+ vpsrld $2, %ymm0, %ymm6
+ vpsrld $2, %ymm1, %ymm7
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm10, %ymm4, %ymm4
+ vpand %ymm10, %ymm5, %ymm5
+ vpand %ymm11, %ymm6, %ymm6
+ vpand %ymm11, %ymm7, %ymm7
+ vpaddw %ymm2, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm4, %ymm2
+ vpaddw %ymm7, %ymm5, %ymm3
+ vpsubw %ymm12, %ymm0, %ymm0
+ vpsubw %ymm12, %ymm1, %ymm1
+ vpsubw %ymm12, %ymm2, %ymm2
+ vpsubw %ymm12, %ymm3, %ymm3
+ vpunpckldq %ymm2, %ymm0, %ymm4
+ vpunpckldq %ymm3, %ymm1, %ymm5
+ vpunpckhdq %ymm2, %ymm0, %ymm6
+ vpunpckhdq %ymm3, %ymm1, %ymm7
+ vperm2i128 $32, %ymm6, %ymm4, %ymm0
+ vperm2i128 $32, %ymm7, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm4, %ymm2
+ vperm2i128 $49, %ymm7, %ymm5, %ymm3
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu 48(%rsi), %ymm0
+ vmovdqu 72(%rsi), %ymm1
+ vpermq $0x94, %ymm0, %ymm0
+ vpermq $0x94, %ymm1, %ymm1
+ vpshufb %ymm13, %ymm0, %ymm0
+ vpshufb %ymm13, %ymm1, %ymm1
+ vpsrld $0x01, %ymm0, %ymm2
+ vpsrld $0x01, %ymm1, %ymm3
+ vpsrld $2, %ymm0, %ymm4
+ vpsrld $2, %ymm1, %ymm5
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpand %ymm8, %ymm4, %ymm4
+ vpand %ymm8, %ymm5, %ymm5
+ vpaddd %ymm2, %ymm0, %ymm0
+ vpaddd %ymm3, %ymm1, %ymm1
+ vpaddd %ymm4, %ymm0, %ymm0
+ vpaddd %ymm5, %ymm1, %ymm1
+ vpsrld $3, %ymm0, %ymm2
+ vpsrld $3, %ymm1, %ymm3
+ vpaddd %ymm9, %ymm0, %ymm0
+ vpaddd %ymm9, %ymm1, %ymm1
+ vpsubd %ymm2, %ymm0, %ymm0
+ vpsubd %ymm3, %ymm1, %ymm1
+ vpslld $10, %ymm0, %ymm2
+ vpslld $10, %ymm1, %ymm3
+ vpsrld $12, %ymm0, %ymm4
+ vpsrld $12, %ymm1, %ymm5
+ vpsrld $2, %ymm0, %ymm6
+ vpsrld $2, %ymm1, %ymm7
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm10, %ymm4, %ymm4
+ vpand %ymm10, %ymm5, %ymm5
+ vpand %ymm11, %ymm6, %ymm6
+ vpand %ymm11, %ymm7, %ymm7
+ vpaddw %ymm2, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm4, %ymm2
+ vpaddw %ymm7, %ymm5, %ymm3
+ vpsubw %ymm12, %ymm0, %ymm0
+ vpsubw %ymm12, %ymm1, %ymm1
+ vpsubw %ymm12, %ymm2, %ymm2
+ vpsubw %ymm12, %ymm3, %ymm3
+ vpunpckldq %ymm2, %ymm0, %ymm4
+ vpunpckldq %ymm3, %ymm1, %ymm5
+ vpunpckhdq %ymm2, %ymm0, %ymm6
+ vpunpckhdq %ymm3, %ymm1, %ymm7
+ vperm2i128 $32, %ymm6, %ymm4, %ymm0
+ vperm2i128 $32, %ymm7, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm4, %ymm2
+ vperm2i128 $49, %ymm7, %ymm5, %ymm3
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm2, 160(%rdi)
+ vmovdqu %ymm1, 192(%rdi)
+ vmovdqu %ymm3, 224(%rdi)
+ vmovdqu 96(%rsi), %ymm0
+ vmovdqu 120(%rsi), %ymm1
+ vpermq $0x94, %ymm0, %ymm0
+ vpermq $0x94, %ymm1, %ymm1
+ vpshufb %ymm13, %ymm0, %ymm0
+ vpshufb %ymm13, %ymm1, %ymm1
+ vpsrld $0x01, %ymm0, %ymm2
+ vpsrld $0x01, %ymm1, %ymm3
+ vpsrld $2, %ymm0, %ymm4
+ vpsrld $2, %ymm1, %ymm5
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpand %ymm8, %ymm4, %ymm4
+ vpand %ymm8, %ymm5, %ymm5
+ vpaddd %ymm2, %ymm0, %ymm0
+ vpaddd %ymm3, %ymm1, %ymm1
+ vpaddd %ymm4, %ymm0, %ymm0
+ vpaddd %ymm5, %ymm1, %ymm1
+ vpsrld $3, %ymm0, %ymm2
+ vpsrld $3, %ymm1, %ymm3
+ vpaddd %ymm9, %ymm0, %ymm0
+ vpaddd %ymm9, %ymm1, %ymm1
+ vpsubd %ymm2, %ymm0, %ymm0
+ vpsubd %ymm3, %ymm1, %ymm1
+ vpslld $10, %ymm0, %ymm2
+ vpslld $10, %ymm1, %ymm3
+ vpsrld $12, %ymm0, %ymm4
+ vpsrld $12, %ymm1, %ymm5
+ vpsrld $2, %ymm0, %ymm6
+ vpsrld $2, %ymm1, %ymm7
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm10, %ymm4, %ymm4
+ vpand %ymm10, %ymm5, %ymm5
+ vpand %ymm11, %ymm6, %ymm6
+ vpand %ymm11, %ymm7, %ymm7
+ vpaddw %ymm2, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm4, %ymm2
+ vpaddw %ymm7, %ymm5, %ymm3
+ vpsubw %ymm12, %ymm0, %ymm0
+ vpsubw %ymm12, %ymm1, %ymm1
+ vpsubw %ymm12, %ymm2, %ymm2
+ vpsubw %ymm12, %ymm3, %ymm3
+ vpunpckldq %ymm2, %ymm0, %ymm4
+ vpunpckldq %ymm3, %ymm1, %ymm5
+ vpunpckhdq %ymm2, %ymm0, %ymm6
+ vpunpckhdq %ymm3, %ymm1, %ymm7
+ vperm2i128 $32, %ymm6, %ymm4, %ymm0
+ vperm2i128 $32, %ymm7, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm4, %ymm2
+ vperm2i128 $49, %ymm7, %ymm5, %ymm3
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm2, 288(%rdi)
+ vmovdqu %ymm1, 320(%rdi)
+ vmovdqu %ymm3, 352(%rdi)
+ vmovdqu 144(%rsi), %ymm0
+ vmovdqu 168(%rsi), %ymm1
+ vpermq $0x94, %ymm0, %ymm0
+ vpermq $0x94, %ymm1, %ymm1
+ vpshufb %ymm13, %ymm0, %ymm0
+ vpshufb %ymm13, %ymm1, %ymm1
+ vpsrld $0x01, %ymm0, %ymm2
+ vpsrld $0x01, %ymm1, %ymm3
+ vpsrld $2, %ymm0, %ymm4
+ vpsrld $2, %ymm1, %ymm5
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpand %ymm8, %ymm4, %ymm4
+ vpand %ymm8, %ymm5, %ymm5
+ vpaddd %ymm2, %ymm0, %ymm0
+ vpaddd %ymm3, %ymm1, %ymm1
+ vpaddd %ymm4, %ymm0, %ymm0
+ vpaddd %ymm5, %ymm1, %ymm1
+ vpsrld $3, %ymm0, %ymm2
+ vpsrld $3, %ymm1, %ymm3
+ vpaddd %ymm9, %ymm0, %ymm0
+ vpaddd %ymm9, %ymm1, %ymm1
+ vpsubd %ymm2, %ymm0, %ymm0
+ vpsubd %ymm3, %ymm1, %ymm1
+ vpslld $10, %ymm0, %ymm2
+ vpslld $10, %ymm1, %ymm3
+ vpsrld $12, %ymm0, %ymm4
+ vpsrld $12, %ymm1, %ymm5
+ vpsrld $2, %ymm0, %ymm6
+ vpsrld $2, %ymm1, %ymm7
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm10, %ymm4, %ymm4
+ vpand %ymm10, %ymm5, %ymm5
+ vpand %ymm11, %ymm6, %ymm6
+ vpand %ymm11, %ymm7, %ymm7
+ vpaddw %ymm2, %ymm0, %ymm0
+ vpaddw %ymm3, %ymm1, %ymm1
+ vpaddw %ymm6, %ymm4, %ymm2
+ vpaddw %ymm7, %ymm5, %ymm3
+ vpsubw %ymm12, %ymm0, %ymm0
+ vpsubw %ymm12, %ymm1, %ymm1
+ vpsubw %ymm12, %ymm2, %ymm2
+ vpsubw %ymm12, %ymm3, %ymm3
+ vpunpckldq %ymm2, %ymm0, %ymm4
+ vpunpckldq %ymm3, %ymm1, %ymm5
+ vpunpckhdq %ymm2, %ymm0, %ymm6
+ vpunpckhdq %ymm3, %ymm1, %ymm7
+ vperm2i128 $32, %ymm6, %ymm4, %ymm0
+ vperm2i128 $32, %ymm7, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm4, %ymm2
+ vperm2i128 $49, %ymm7, %ymm5, %ymm3
+ vmovdqu %ymm0, 384(%rdi)
+ vmovdqu %ymm2, 416(%rdi)
+ vmovdqu %ymm1, 448(%rdi)
+ vmovdqu %ymm3, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_cbd_eta3_avx2,.-kyber_cbd_eta3_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_55:
+.quad 0x5555555555555555, 0x5555555555555555
+.quad 0x5555555555555555, 0x5555555555555555
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_33:
+.quad 0x3333333333333333, 0x3333333333333333
+.quad 0x3333333333333333, 0x3333333333333333
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_03:
+.quad 0x303030303030303, 0x303030303030303
+.quad 0x303030303030303, 0x303030303030303
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_mask_0f:
+.quad 0xf0f0f0f0f0f0f0f, 0xf0f0f0f0f0f0f0f
+.quad 0xf0f0f0f0f0f0f0f, 0xf0f0f0f0f0f0f0f
+#ifndef __APPLE__
+.text
+.globl kyber_cbd_eta2_avx2
+.type kyber_cbd_eta2_avx2,@function
+.align 16
+kyber_cbd_eta2_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_cbd_eta2_avx2
+.p2align 4
+_kyber_cbd_eta2_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_mask_55(%rip), %ymm8
+ vmovdqu L_kyber_mask_33(%rip), %ymm9
+ vmovdqu L_kyber_mask_03(%rip), %ymm10
+ vmovdqu L_kyber_mask_0f(%rip), %ymm11
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vpsrlw $0x01, %ymm0, %ymm2
+ vpsrlw $0x01, %ymm1, %ymm3
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpaddb %ymm2, %ymm0, %ymm0
+ vpaddb %ymm3, %ymm1, %ymm1
+ vpsrlw $2, %ymm0, %ymm2
+ vpsrlw $2, %ymm1, %ymm3
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpand %ymm9, %ymm2, %ymm2
+ vpand %ymm9, %ymm3, %ymm3
+ vpaddb %ymm9, %ymm0, %ymm0
+ vpaddb %ymm9, %ymm1, %ymm1
+ vpsubb %ymm2, %ymm0, %ymm0
+ vpsubb %ymm3, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpand %ymm11, %ymm0, %ymm0
+ vpand %ymm11, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpsubb %ymm10, %ymm0, %ymm0
+ vpsubb %ymm10, %ymm1, %ymm1
+ vpsubb %ymm10, %ymm2, %ymm2
+ vpsubb %ymm10, %ymm3, %ymm3
+ vpunpcklbw %ymm2, %ymm0, %ymm4
+ vpunpcklbw %ymm3, %ymm1, %ymm5
+ vpunpckhbw %ymm2, %ymm0, %ymm6
+ vpunpckhbw %ymm3, %ymm1, %ymm7
+ vpmovsxbw %xmm4, %ymm0
+ vpmovsxbw %xmm5, %ymm1
+ vextracti128 $0x01, %ymm4, %xmm2
+ vextracti128 $0x01, %ymm5, %xmm3
+ vpmovsxbw %xmm2, %ymm2
+ vpmovsxbw %xmm3, %ymm3
+ vpmovsxbw %xmm6, %ymm4
+ vpmovsxbw %xmm7, %ymm5
+ vextracti128 $0x01, %ymm6, %xmm6
+ vextracti128 $0x01, %ymm7, %xmm7
+ vpmovsxbw %xmm6, %ymm6
+ vpmovsxbw %xmm7, %ymm7
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm4, 32(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm6, 96(%rdi)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm5, 160(%rdi)
+ vmovdqu %ymm3, 192(%rdi)
+ vmovdqu %ymm7, 224(%rdi)
+ vmovdqu 64(%rsi), %ymm0
+ vmovdqu 96(%rsi), %ymm1
+ vpsrlw $0x01, %ymm0, %ymm2
+ vpsrlw $0x01, %ymm1, %ymm3
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpaddb %ymm2, %ymm0, %ymm0
+ vpaddb %ymm3, %ymm1, %ymm1
+ vpsrlw $2, %ymm0, %ymm2
+ vpsrlw $2, %ymm1, %ymm3
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpand %ymm9, %ymm2, %ymm2
+ vpand %ymm9, %ymm3, %ymm3
+ vpaddb %ymm9, %ymm0, %ymm0
+ vpaddb %ymm9, %ymm1, %ymm1
+ vpsubb %ymm2, %ymm0, %ymm0
+ vpsubb %ymm3, %ymm1, %ymm1
+ vpsrlw $4, %ymm0, %ymm2
+ vpsrlw $4, %ymm1, %ymm3
+ vpand %ymm11, %ymm0, %ymm0
+ vpand %ymm11, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpsubb %ymm10, %ymm0, %ymm0
+ vpsubb %ymm10, %ymm1, %ymm1
+ vpsubb %ymm10, %ymm2, %ymm2
+ vpsubb %ymm10, %ymm3, %ymm3
+ vpunpcklbw %ymm2, %ymm0, %ymm4
+ vpunpcklbw %ymm3, %ymm1, %ymm5
+ vpunpckhbw %ymm2, %ymm0, %ymm6
+ vpunpckhbw %ymm3, %ymm1, %ymm7
+ vpmovsxbw %xmm4, %ymm0
+ vpmovsxbw %xmm5, %ymm1
+ vextracti128 $0x01, %ymm4, %xmm2
+ vextracti128 $0x01, %ymm5, %xmm3
+ vpmovsxbw %xmm2, %ymm2
+ vpmovsxbw %xmm3, %ymm3
+ vpmovsxbw %xmm6, %ymm4
+ vpmovsxbw %xmm7, %ymm5
+ vextracti128 $0x01, %ymm6, %xmm6
+ vextracti128 $0x01, %ymm7, %xmm7
+ vpmovsxbw %xmm6, %ymm6
+ vpmovsxbw %xmm7, %ymm7
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm4, 288(%rdi)
+ vmovdqu %ymm2, 320(%rdi)
+ vmovdqu %ymm6, 352(%rdi)
+ vmovdqu %ymm1, 384(%rdi)
+ vmovdqu %ymm5, 416(%rdi)
+ vmovdqu %ymm3, 448(%rdi)
+ vmovdqu %ymm7, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_cbd_eta2_avx2,.-kyber_cbd_eta2_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_mask:
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+.value 0x3ff,0x3ff
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_shift:
+.quad 0x400000104000001, 0x400000104000001
+.quad 0x400000104000001, 0x400000104000001
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_shlv:
+.quad 0xc, 0xc
+.quad 0xc, 0xc
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_shuf:
+.value 0x100,0x302
+.value 0x804,0xa09
+.value 0xc0b,0xffff
+.value 0xffff,0xffff
+.value 0xa09,0xc0b
+.value 0xffff,0xffff
+.value 0xffff,0x100
+.value 0x302,0x804
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_v:
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_offset:
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_10_avx2_shift12:
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+.value 0x1000,0x1000
+#ifndef __APPLE__
+.text
+.globl kyber_compress_10_avx2
+.type kyber_compress_10_avx2,@function
+.align 16
+kyber_compress_10_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_compress_10_avx2
+.p2align 4
+_kyber_compress_10_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rsi), %ymm0
+ vmovdqu L_kyber_compress_10_avx2_mask(%rip), %ymm9
+ vmovdqu L_kyber_compress_10_avx2_shift(%rip), %ymm8
+ vmovdqu L_kyber_compress_10_avx2_shlv(%rip), %ymm10
+ vmovdqu L_kyber_compress_10_avx2_shuf(%rip), %ymm11
+ vmovdqu L_kyber_compress_10_avx2_v(%rip), %ymm6
+ vmovdqu L_kyber_compress_10_avx2_offset(%rip), %ymm12
+ vmovdqu L_kyber_compress_10_avx2_shift12(%rip), %ymm13
+ vpsllw $3, %ymm6, %ymm7
+L_kyber_compress_10_avx2_start:
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, (%rdi)
+ vmovdqu %xmm1, 20(%rdi)
+ vmovss %xmm2, 16(%rdi)
+ vmovss %xmm4, 36(%rdi)
+ vmovdqu 64(%rsi), %ymm0
+ vmovdqu 96(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 40(%rdi)
+ vmovdqu %xmm1, 60(%rdi)
+ vmovss %xmm2, 56(%rdi)
+ vmovss %xmm4, 76(%rdi)
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 80(%rdi)
+ vmovdqu %xmm1, 100(%rdi)
+ vmovss %xmm2, 96(%rdi)
+ vmovss %xmm4, 116(%rdi)
+ vmovdqu 192(%rsi), %ymm0
+ vmovdqu 224(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 120(%rdi)
+ vmovdqu %xmm1, 140(%rdi)
+ vmovss %xmm2, 136(%rdi)
+ vmovss %xmm4, 156(%rdi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 160(%rdi)
+ vmovdqu %xmm1, 180(%rdi)
+ vmovss %xmm2, 176(%rdi)
+ vmovss %xmm4, 196(%rdi)
+ vmovdqu 320(%rsi), %ymm0
+ vmovdqu 352(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 200(%rdi)
+ vmovdqu %xmm1, 220(%rdi)
+ vmovss %xmm2, 216(%rdi)
+ vmovss %xmm4, 236(%rdi)
+ vmovdqu 384(%rsi), %ymm0
+ vmovdqu 416(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 240(%rdi)
+ vmovdqu %xmm1, 260(%rdi)
+ vmovss %xmm2, 256(%rdi)
+ vmovss %xmm4, 276(%rdi)
+ vmovdqu 448(%rsi), %ymm0
+ vmovdqu 480(%rsi), %ymm1
+ vpmullw %ymm7, %ymm0, %ymm2
+ vpmullw %ymm7, %ymm1, %ymm4
+ vpaddw %ymm12, %ymm0, %ymm3
+ vpaddw %ymm12, %ymm1, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm1, %ymm1
+ vpmulhuw %ymm6, %ymm0, %ymm0
+ vpmulhuw %ymm6, %ymm1, %ymm1
+ vpsubw %ymm3, %ymm2, %ymm3
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm3, %ymm2, %ymm2
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm2, %ymm2
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm2, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm13, %ymm0, %ymm0
+ vpmulhrsw %ymm13, %ymm1, %ymm1
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpmaddwd %ymm8, %ymm0, %ymm0
+ vpmaddwd %ymm8, %ymm1, %ymm1
+ vpsllvd %ymm10, %ymm0, %ymm0
+ vpsllvd %ymm10, %ymm1, %ymm1
+ vpsrlq $12, %ymm0, %ymm0
+ vpsrlq $12, %ymm1, %ymm1
+ vpshufb %ymm11, %ymm0, %ymm0
+ vpshufb %ymm11, %ymm1, %ymm1
+ vextracti128 $0x01, %ymm0, %xmm2
+ vextracti128 $0x01, %ymm1, %xmm4
+ vpblendw $0xe0, %xmm2, %xmm0, %xmm0
+ vpblendw $0xe0, %xmm4, %xmm1, %xmm1
+ vmovdqu %xmm0, 280(%rdi)
+ vmovdqu %xmm1, 300(%rdi)
+ vmovss %xmm2, 296(%rdi)
+ vmovss %xmm4, 316(%rdi)
+ addq $0x140, %rdi
+ addq $0x200, %rsi
+ subl $0x01, %edx
+ jg L_kyber_compress_10_avx2_start
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_compress_10_avx2,.-kyber_compress_10_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_decompress_10_avx2_mask:
+.long 0x7fe01ff8,0x7fe01ff8,0x7fe01ff8,0x7fe01ff8
+.long 0x7fe01ff8,0x7fe01ff8,0x7fe01ff8,0x7fe01ff8
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_decompress_10_avx2_sllv:
+.quad 0x4, 0x4
+.quad 0x4, 0x4
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_decompress_10_avx2_q:
+.long 0xd013404,0xd013404,0xd013404,0xd013404
+.long 0xd013404,0xd013404,0xd013404,0xd013404
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_10_avx2_shuf:
+.value 0x100,0x201
+.value 0x302,0x403
+.value 0x605,0x706
+.value 0x807,0x908
+.value 0x302,0x403
+.value 0x504,0x605
+.value 0x807,0x908
+.value 0xa09,0xb0a
+#ifndef __APPLE__
+.text
+.globl kyber_decompress_10_avx2
+.type kyber_decompress_10_avx2,@function
+.align 16
+kyber_decompress_10_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_decompress_10_avx2
+.p2align 4
+_kyber_decompress_10_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_decompress_10_avx2_mask(%rip), %ymm4
+ vmovdqu L_kyber_decompress_10_avx2_q(%rip), %ymm5
+ vmovdqu L_kyber_decompress_10_avx2_shuf(%rip), %ymm6
+ vmovdqu L_kyber_decompress_10_avx2_sllv(%rip), %ymm7
+L_kyber_decompress_10_avx2_start:
+ vpermq $0x94, (%rsi), %ymm0
+ vpermq $0x94, 20(%rsi), %ymm1
+ vpermq $0x94, 40(%rsi), %ymm2
+ vpermq $0x94, 60(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm1, %ymm1
+ vpsllvd %ymm7, %ymm2, %ymm2
+ vpsllvd %ymm7, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm5, %ymm0, %ymm0
+ vpmulhrsw %ymm5, %ymm1, %ymm1
+ vpmulhrsw %ymm5, %ymm2, %ymm2
+ vpmulhrsw %ymm5, %ymm3, %ymm3
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vpermq $0x94, 80(%rsi), %ymm0
+ vpermq $0x94, 100(%rsi), %ymm1
+ vpermq $0x94, 120(%rsi), %ymm2
+ vpermq $0x94, 140(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm1, %ymm1
+ vpsllvd %ymm7, %ymm2, %ymm2
+ vpsllvd %ymm7, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm5, %ymm0, %ymm0
+ vpmulhrsw %ymm5, %ymm1, %ymm1
+ vpmulhrsw %ymm5, %ymm2, %ymm2
+ vpmulhrsw %ymm5, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, 160(%rdi)
+ vmovdqu %ymm2, 192(%rdi)
+ vmovdqu %ymm3, 224(%rdi)
+ vpermq $0x94, 160(%rsi), %ymm0
+ vpermq $0x94, 180(%rsi), %ymm1
+ vpermq $0x94, 200(%rsi), %ymm2
+ vpermq $0x94, 220(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm1, %ymm1
+ vpsllvd %ymm7, %ymm2, %ymm2
+ vpsllvd %ymm7, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm5, %ymm0, %ymm0
+ vpmulhrsw %ymm5, %ymm1, %ymm1
+ vpmulhrsw %ymm5, %ymm2, %ymm2
+ vpmulhrsw %ymm5, %ymm3, %ymm3
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm1, 288(%rdi)
+ vmovdqu %ymm2, 320(%rdi)
+ vmovdqu %ymm3, 352(%rdi)
+ vpermq $0x94, 240(%rsi), %ymm0
+ vpermq $0x94, 260(%rsi), %ymm1
+ vpermq $0x94, 280(%rsi), %ymm2
+ vpermq $0x94, 300(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm1, %ymm1
+ vpsllvd %ymm7, %ymm2, %ymm2
+ vpsllvd %ymm7, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm5, %ymm0, %ymm0
+ vpmulhrsw %ymm5, %ymm1, %ymm1
+ vpmulhrsw %ymm5, %ymm2, %ymm2
+ vpmulhrsw %ymm5, %ymm3, %ymm3
+ vmovdqu %ymm0, 384(%rdi)
+ vmovdqu %ymm1, 416(%rdi)
+ vmovdqu %ymm2, 448(%rdi)
+ vmovdqu %ymm3, 480(%rdi)
+ addq $0x140, %rsi
+ addq $0x200, %rdi
+ subl $0x01, %edx
+ jg L_kyber_decompress_10_avx2_start
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_decompress_10_avx2,.-kyber_decompress_10_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_v:
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_off:
+.value 0x24,0x24
+.value 0x24,0x24
+.value 0x24,0x24
+.value 0x24,0x24
+.value 0x24,0x24
+.value 0x24,0x24
+.value 0x24,0x24
+.value 0x24,0x24
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_shift13:
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+.value 0x2000,0x2000
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_mask:
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+.value 0x7ff,0x7ff
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_shift:
+.quad 0x800000108000001, 0x800000108000001
+.quad 0x800000108000001, 0x800000108000001
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_sllvd:
+.long 0xa,0x0,0xa,0x0
+.long 0xa,0x0,0xa,0x0
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_srlvq:
+.quad 0xa, 0x1e
+.quad 0xa, 0x1e
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_11_avx2_shuf:
+.value 0x100,0x302
+.value 0x504,0x706
+.value 0x908,0xff0a
+.value 0xffff,0xffff
+.value 0x605,0x807
+.value 0xa09,0xffff
+.value 0xffff,0x0
+.value 0x201,0x403
+#ifndef __APPLE__
+.text
+.globl kyber_compress_11_avx2
+.type kyber_compress_11_avx2,@function
+.align 16
+kyber_compress_11_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_compress_11_avx2
+.p2align 4
+_kyber_compress_11_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rsi), %ymm0
+ vmovdqu L_kyber_compress_11_avx2_v(%rip), %ymm7
+ vmovdqu L_kyber_compress_11_avx2_off(%rip), %ymm8
+ vmovdqu L_kyber_compress_11_avx2_shift13(%rip), %ymm9
+ vmovdqu L_kyber_compress_11_avx2_mask(%rip), %ymm10
+ vmovdqu L_kyber_compress_11_avx2_shift(%rip), %ymm11
+ vmovdqu L_kyber_compress_11_avx2_sllvd(%rip), %ymm12
+ vmovdqu L_kyber_compress_11_avx2_srlvq(%rip), %ymm13
+ vmovdqu L_kyber_compress_11_avx2_shuf(%rip), %ymm14
+ vpsllw $3, %ymm7, %ymm6
+L_kyber_compress_11_avx2_start:
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, (%rdi)
+ vmovq %xmm1, 16(%rdi)
+ vmovdqu %xmm3, 22(%rdi)
+ vmovq %xmm4, 38(%rdi)
+ vmovdqu 64(%rsi), %ymm0
+ vmovdqu 96(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 44(%rdi)
+ vmovq %xmm1, 60(%rdi)
+ vmovdqu %xmm3, 66(%rdi)
+ vmovq %xmm4, 82(%rdi)
+ vmovdqu 128(%rsi), %ymm0
+ vmovdqu 160(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 88(%rdi)
+ vmovq %xmm1, 104(%rdi)
+ vmovdqu %xmm3, 110(%rdi)
+ vmovq %xmm4, 126(%rdi)
+ vmovdqu 192(%rsi), %ymm0
+ vmovdqu 224(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 132(%rdi)
+ vmovq %xmm1, 148(%rdi)
+ vmovdqu %xmm3, 154(%rdi)
+ vmovq %xmm4, 170(%rdi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 176(%rdi)
+ vmovq %xmm1, 192(%rdi)
+ vmovdqu %xmm3, 198(%rdi)
+ vmovq %xmm4, 214(%rdi)
+ vmovdqu 320(%rsi), %ymm0
+ vmovdqu 352(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 220(%rdi)
+ vmovq %xmm1, 236(%rdi)
+ vmovdqu %xmm3, 242(%rdi)
+ vmovq %xmm4, 258(%rdi)
+ vmovdqu 384(%rsi), %ymm0
+ vmovdqu 416(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 264(%rdi)
+ vmovq %xmm1, 280(%rdi)
+ vmovdqu %xmm3, 286(%rdi)
+ vmovq %xmm4, 302(%rdi)
+ vmovdqu 448(%rsi), %ymm0
+ vmovdqu 480(%rsi), %ymm3
+ vpmullw %ymm6, %ymm0, %ymm1
+ vpmullw %ymm6, %ymm3, %ymm4
+ vpaddw %ymm8, %ymm0, %ymm2
+ vpaddw %ymm8, %ymm3, %ymm5
+ vpsllw $3, %ymm0, %ymm0
+ vpsllw $3, %ymm3, %ymm3
+ vpmulhw %ymm7, %ymm0, %ymm0
+ vpmulhw %ymm7, %ymm3, %ymm3
+ vpsubw %ymm2, %ymm1, %ymm2
+ vpsubw %ymm5, %ymm4, %ymm5
+ vpandn %ymm2, %ymm1, %ymm1
+ vpandn %ymm5, %ymm4, %ymm4
+ vpsrlw $15, %ymm1, %ymm1
+ vpsrlw $15, %ymm4, %ymm4
+ vpsubw %ymm1, %ymm0, %ymm0
+ vpsubw %ymm4, %ymm3, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm10, %ymm0, %ymm0
+ vpand %ymm10, %ymm3, %ymm3
+ vpmaddwd %ymm11, %ymm0, %ymm0
+ vpmaddwd %ymm11, %ymm3, %ymm3
+ vpsllvd %ymm12, %ymm0, %ymm0
+ vpsllvd %ymm12, %ymm3, %ymm3
+ vpsrldq $8, %ymm0, %ymm1
+ vpsrldq $8, %ymm3, %ymm4
+ vpsrlvq %ymm13, %ymm0, %ymm0
+ vpsrlvq %ymm13, %ymm3, %ymm3
+ vpsllq $34, %ymm1, %ymm1
+ vpsllq $34, %ymm4, %ymm4
+ vpaddq %ymm1, %ymm0, %ymm0
+ vpaddq %ymm4, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm3, %ymm3
+ vextracti128 $0x01, %ymm0, %xmm1
+ vextracti128 $0x01, %ymm3, %xmm4
+ vpblendvb %xmm14, %xmm1, %xmm0, %xmm0
+ vpblendvb %xmm14, %xmm4, %xmm3, %xmm3
+ vmovdqu %xmm0, 308(%rdi)
+ vmovq %xmm1, 324(%rdi)
+ vmovdqu %xmm3, 330(%rdi)
+ vmovq %xmm4, 346(%rdi)
+ addq $0x160, %rdi
+ addq $0x200, %rsi
+ subl $0x01, %edx
+ jg L_kyber_compress_11_avx2_start
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_compress_11_avx2,.-kyber_compress_11_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_11_avx2_q:
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_11_avx2_shuf:
+.value 0x100,0x201
+.value 0x302,0x504
+.value 0x605,0x706
+.value 0x908,0xa09
+.value 0x403,0x504
+.value 0x605,0x807
+.value 0x908,0xa09
+.value 0xc0b,0xd0c
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_decompress_11_avx2_sllv:
+.long 0x0,0x1,0x0,0x0
+.long 0x0,0x1,0x0,0x0
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_decompress_11_avx2_srlv:
+.quad 0x0, 0x2
+.quad 0x0, 0x2
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_11_avx2_shift:
+.value 0x20,0x4
+.value 0x1,0x20
+.value 0x8,0x1
+.value 0x20,0x4
+.value 0x20,0x4
+.value 0x1,0x20
+.value 0x8,0x1
+.value 0x20,0x4
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_11_avx2_mask:
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+.value 0x7ff0,0x7ff0
+#ifndef __APPLE__
+.text
+.globl kyber_decompress_11_avx2
+.type kyber_decompress_11_avx2,@function
+.align 16
+kyber_decompress_11_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_decompress_11_avx2
+.p2align 4
+_kyber_decompress_11_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_decompress_11_avx2_q(%rip), %ymm4
+ vmovdqu L_kyber_decompress_11_avx2_shuf(%rip), %ymm5
+ vmovdqu L_kyber_decompress_11_avx2_sllv(%rip), %ymm6
+ vmovdqu L_kyber_decompress_11_avx2_srlv(%rip), %ymm7
+ vmovdqu L_kyber_decompress_11_avx2_shift(%rip), %ymm8
+ vmovdqu L_kyber_decompress_11_avx2_mask(%rip), %ymm9
+L_kyber_decompress_11_avx2_start:
+ vpermq $0x94, (%rsi), %ymm0
+ vpermq $0x94, 22(%rsi), %ymm1
+ vpermq $0x94, 44(%rsi), %ymm2
+ vpermq $0x94, 66(%rsi), %ymm3
+ vpshufb %ymm5, %ymm0, %ymm0
+ vpshufb %ymm5, %ymm1, %ymm1
+ vpshufb %ymm5, %ymm2, %ymm2
+ vpshufb %ymm5, %ymm3, %ymm3
+ vpsrlvd %ymm6, %ymm0, %ymm0
+ vpsrlvd %ymm6, %ymm1, %ymm1
+ vpsrlvd %ymm6, %ymm2, %ymm2
+ vpsrlvd %ymm6, %ymm3, %ymm3
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm1, %ymm1
+ vpsrlvq %ymm7, %ymm2, %ymm2
+ vpsrlvq %ymm7, %ymm3, %ymm3
+ vpmullw %ymm8, %ymm0, %ymm0
+ vpmullw %ymm8, %ymm1, %ymm1
+ vpmullw %ymm8, %ymm2, %ymm2
+ vpmullw %ymm8, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpand %ymm9, %ymm2, %ymm2
+ vpand %ymm9, %ymm3, %ymm3
+ vpmulhrsw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm4, %ymm2, %ymm2
+ vpmulhrsw %ymm4, %ymm3, %ymm3
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vpermq $0x94, 88(%rsi), %ymm0
+ vpermq $0x94, 110(%rsi), %ymm1
+ vpermq $0x94, 132(%rsi), %ymm2
+ vpermq $0x94, 154(%rsi), %ymm3
+ vpshufb %ymm5, %ymm0, %ymm0
+ vpshufb %ymm5, %ymm1, %ymm1
+ vpshufb %ymm5, %ymm2, %ymm2
+ vpshufb %ymm5, %ymm3, %ymm3
+ vpsrlvd %ymm6, %ymm0, %ymm0
+ vpsrlvd %ymm6, %ymm1, %ymm1
+ vpsrlvd %ymm6, %ymm2, %ymm2
+ vpsrlvd %ymm6, %ymm3, %ymm3
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm1, %ymm1
+ vpsrlvq %ymm7, %ymm2, %ymm2
+ vpsrlvq %ymm7, %ymm3, %ymm3
+ vpmullw %ymm8, %ymm0, %ymm0
+ vpmullw %ymm8, %ymm1, %ymm1
+ vpmullw %ymm8, %ymm2, %ymm2
+ vpmullw %ymm8, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpand %ymm9, %ymm2, %ymm2
+ vpand %ymm9, %ymm3, %ymm3
+ vpmulhrsw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm4, %ymm2, %ymm2
+ vpmulhrsw %ymm4, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, 160(%rdi)
+ vmovdqu %ymm2, 192(%rdi)
+ vmovdqu %ymm3, 224(%rdi)
+ vpermq $0x94, 176(%rsi), %ymm0
+ vpermq $0x94, 198(%rsi), %ymm1
+ vpermq $0x94, 220(%rsi), %ymm2
+ vpermq $0x94, 242(%rsi), %ymm3
+ vpshufb %ymm5, %ymm0, %ymm0
+ vpshufb %ymm5, %ymm1, %ymm1
+ vpshufb %ymm5, %ymm2, %ymm2
+ vpshufb %ymm5, %ymm3, %ymm3
+ vpsrlvd %ymm6, %ymm0, %ymm0
+ vpsrlvd %ymm6, %ymm1, %ymm1
+ vpsrlvd %ymm6, %ymm2, %ymm2
+ vpsrlvd %ymm6, %ymm3, %ymm3
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm1, %ymm1
+ vpsrlvq %ymm7, %ymm2, %ymm2
+ vpsrlvq %ymm7, %ymm3, %ymm3
+ vpmullw %ymm8, %ymm0, %ymm0
+ vpmullw %ymm8, %ymm1, %ymm1
+ vpmullw %ymm8, %ymm2, %ymm2
+ vpmullw %ymm8, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpand %ymm9, %ymm2, %ymm2
+ vpand %ymm9, %ymm3, %ymm3
+ vpmulhrsw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm4, %ymm2, %ymm2
+ vpmulhrsw %ymm4, %ymm3, %ymm3
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm1, 288(%rdi)
+ vmovdqu %ymm2, 320(%rdi)
+ vmovdqu %ymm3, 352(%rdi)
+ vpermq $0x94, 264(%rsi), %ymm0
+ vpermq $0x94, 286(%rsi), %ymm1
+ vpermq $0x94, 308(%rsi), %ymm2
+ vpermq $0x94, 330(%rsi), %ymm3
+ vpshufb %ymm5, %ymm0, %ymm0
+ vpshufb %ymm5, %ymm1, %ymm1
+ vpshufb %ymm5, %ymm2, %ymm2
+ vpshufb %ymm5, %ymm3, %ymm3
+ vpsrlvd %ymm6, %ymm0, %ymm0
+ vpsrlvd %ymm6, %ymm1, %ymm1
+ vpsrlvd %ymm6, %ymm2, %ymm2
+ vpsrlvd %ymm6, %ymm3, %ymm3
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm1, %ymm1
+ vpsrlvq %ymm7, %ymm2, %ymm2
+ vpsrlvq %ymm7, %ymm3, %ymm3
+ vpmullw %ymm8, %ymm0, %ymm0
+ vpmullw %ymm8, %ymm1, %ymm1
+ vpmullw %ymm8, %ymm2, %ymm2
+ vpmullw %ymm8, %ymm3, %ymm3
+ vpsrlw $0x01, %ymm0, %ymm0
+ vpsrlw $0x01, %ymm1, %ymm1
+ vpsrlw $0x01, %ymm2, %ymm2
+ vpsrlw $0x01, %ymm3, %ymm3
+ vpand %ymm9, %ymm0, %ymm0
+ vpand %ymm9, %ymm1, %ymm1
+ vpand %ymm9, %ymm2, %ymm2
+ vpand %ymm9, %ymm3, %ymm3
+ vpmulhrsw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm4, %ymm1, %ymm1
+ vpmulhrsw %ymm4, %ymm2, %ymm2
+ vpmulhrsw %ymm4, %ymm3, %ymm3
+ vmovdqu %ymm0, 384(%rdi)
+ vmovdqu %ymm1, 416(%rdi)
+ vmovdqu %ymm2, 448(%rdi)
+ vmovdqu %ymm3, 480(%rdi)
+ addq $0x160, %rsi
+ addq $0x200, %rdi
+ subl $0x01, %edx
+ jg L_kyber_decompress_11_avx2_start
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_decompress_11_avx2,.-kyber_decompress_11_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_4_avx2_mask:
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+.value 0xf,0xf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_4_avx2_shift:
+.value 0x200,0x200
+.value 0x200,0x200
+.value 0x200,0x200
+.value 0x200,0x200
+.value 0x200,0x200
+.value 0x200,0x200
+.value 0x200,0x200
+.value 0x200,0x200
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_compress_4_avx2_perm:
+.long 0x0,0x4,0x1,0x5
+.long 0x2,0x6,0x3,0x7
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_4_avx2_v:
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_4_avx2_shift12:
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+.value 0x1001,0x1001
+#ifndef __APPLE__
+.text
+.globl kyber_compress_4_avx2
+.type kyber_compress_4_avx2,@function
+.align 16
+kyber_compress_4_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_compress_4_avx2
+.p2align 4
+_kyber_compress_4_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_compress_4_avx2_mask(%rip), %ymm8
+ vmovdqu L_kyber_compress_4_avx2_shift(%rip), %ymm9
+ vmovdqu L_kyber_compress_4_avx2_perm(%rip), %ymm10
+ vmovdqu L_kyber_compress_4_avx2_v(%rip), %ymm11
+ vmovdqu L_kyber_compress_4_avx2_shift12(%rip), %ymm12
+ vpmulhw (%rsi), %ymm11, %ymm0
+ vpmulhw 32(%rsi), %ymm11, %ymm1
+ vpmulhw 64(%rsi), %ymm11, %ymm2
+ vpmulhw 96(%rsi), %ymm11, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm1, %ymm1
+ vpmulhrsw %ymm9, %ymm2, %ymm2
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpackuswb %ymm3, %ymm2, %ymm2
+ vpmaddubsw %ymm12, %ymm0, %ymm0
+ vpmaddubsw %ymm12, %ymm2, %ymm2
+ vpackuswb %ymm2, %ymm0, %ymm0
+ vpmulhw 128(%rsi), %ymm11, %ymm4
+ vpmulhw 160(%rsi), %ymm11, %ymm5
+ vpmulhw 192(%rsi), %ymm11, %ymm6
+ vpmulhw 224(%rsi), %ymm11, %ymm7
+ vpmulhrsw %ymm9, %ymm4, %ymm4
+ vpmulhrsw %ymm9, %ymm5, %ymm5
+ vpmulhrsw %ymm9, %ymm6, %ymm6
+ vpmulhrsw %ymm9, %ymm7, %ymm7
+ vpand %ymm8, %ymm4, %ymm4
+ vpand %ymm8, %ymm5, %ymm5
+ vpand %ymm8, %ymm6, %ymm6
+ vpand %ymm8, %ymm7, %ymm7
+ vpackuswb %ymm5, %ymm4, %ymm4
+ vpackuswb %ymm7, %ymm6, %ymm6
+ vpmaddubsw %ymm12, %ymm4, %ymm4
+ vpmaddubsw %ymm12, %ymm6, %ymm6
+ vpackuswb %ymm6, %ymm4, %ymm4
+ vpermd %ymm0, %ymm10, %ymm0
+ vpermd %ymm4, %ymm10, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm4, 32(%rdi)
+ vpmulhw 256(%rsi), %ymm11, %ymm0
+ vpmulhw 288(%rsi), %ymm11, %ymm1
+ vpmulhw 320(%rsi), %ymm11, %ymm2
+ vpmulhw 352(%rsi), %ymm11, %ymm3
+ vpmulhrsw %ymm9, %ymm0, %ymm0
+ vpmulhrsw %ymm9, %ymm1, %ymm1
+ vpmulhrsw %ymm9, %ymm2, %ymm2
+ vpmulhrsw %ymm9, %ymm3, %ymm3
+ vpand %ymm8, %ymm0, %ymm0
+ vpand %ymm8, %ymm1, %ymm1
+ vpand %ymm8, %ymm2, %ymm2
+ vpand %ymm8, %ymm3, %ymm3
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpackuswb %ymm3, %ymm2, %ymm2
+ vpmaddubsw %ymm12, %ymm0, %ymm0
+ vpmaddubsw %ymm12, %ymm2, %ymm2
+ vpackuswb %ymm2, %ymm0, %ymm0
+ vpmulhw 384(%rsi), %ymm11, %ymm4
+ vpmulhw 416(%rsi), %ymm11, %ymm5
+ vpmulhw 448(%rsi), %ymm11, %ymm6
+ vpmulhw 480(%rsi), %ymm11, %ymm7
+ vpmulhrsw %ymm9, %ymm4, %ymm4
+ vpmulhrsw %ymm9, %ymm5, %ymm5
+ vpmulhrsw %ymm9, %ymm6, %ymm6
+ vpmulhrsw %ymm9, %ymm7, %ymm7
+ vpand %ymm8, %ymm4, %ymm4
+ vpand %ymm8, %ymm5, %ymm5
+ vpand %ymm8, %ymm6, %ymm6
+ vpand %ymm8, %ymm7, %ymm7
+ vpackuswb %ymm5, %ymm4, %ymm4
+ vpackuswb %ymm7, %ymm6, %ymm6
+ vpmaddubsw %ymm12, %ymm4, %ymm4
+ vpmaddubsw %ymm12, %ymm6, %ymm6
+ vpackuswb %ymm6, %ymm4, %ymm4
+ vpermd %ymm0, %ymm10, %ymm0
+ vpermd %ymm4, %ymm10, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm4, 96(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_compress_4_avx2,.-kyber_compress_4_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_decompress_4_avx2_mask:
+.long 0xf0000f,0xf0000f,0xf0000f,0xf0000f
+.long 0xf0000f,0xf0000f,0xf0000f,0xf0000f
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_decompress_4_avx2_shift:
+.long 0x800800,0x800800,0x800800,0x800800
+.long 0x800800,0x800800,0x800800,0x800800
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_4_avx2_q:
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_4_avx2_shuf:
+.value 0x0,0x0
+.value 0x101,0x101
+.value 0x202,0x202
+.value 0x303,0x303
+.value 0x404,0x404
+.value 0x505,0x505
+.value 0x606,0x606
+.value 0x707,0x707
+#ifndef __APPLE__
+.text
+.globl kyber_decompress_4_avx2
+.type kyber_decompress_4_avx2,@function
+.align 16
+kyber_decompress_4_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_decompress_4_avx2
+.p2align 4
+_kyber_decompress_4_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_decompress_4_avx2_mask(%rip), %ymm4
+ vmovdqu L_kyber_decompress_4_avx2_shift(%rip), %ymm5
+ vmovdqu L_kyber_decompress_4_avx2_shuf(%rip), %ymm6
+ vmovdqu L_kyber_decompress_4_avx2_q(%rip), %ymm7
+ vpbroadcastq (%rsi), %ymm0
+ vpbroadcastq 8(%rsi), %ymm1
+ vpbroadcastq 16(%rsi), %ymm2
+ vpbroadcastq 24(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmullw %ymm5, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm5, %ymm2, %ymm2
+ vpmullw %ymm5, %ymm3, %ymm3
+ vpmulhrsw %ymm7, %ymm0, %ymm0
+ vpmulhrsw %ymm7, %ymm1, %ymm1
+ vpmulhrsw %ymm7, %ymm2, %ymm2
+ vpmulhrsw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vpbroadcastq 32(%rsi), %ymm0
+ vpbroadcastq 40(%rsi), %ymm1
+ vpbroadcastq 48(%rsi), %ymm2
+ vpbroadcastq 56(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmullw %ymm5, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm5, %ymm2, %ymm2
+ vpmullw %ymm5, %ymm3, %ymm3
+ vpmulhrsw %ymm7, %ymm0, %ymm0
+ vpmulhrsw %ymm7, %ymm1, %ymm1
+ vpmulhrsw %ymm7, %ymm2, %ymm2
+ vpmulhrsw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, 160(%rdi)
+ vmovdqu %ymm2, 192(%rdi)
+ vmovdqu %ymm3, 224(%rdi)
+ vpbroadcastq 64(%rsi), %ymm0
+ vpbroadcastq 72(%rsi), %ymm1
+ vpbroadcastq 80(%rsi), %ymm2
+ vpbroadcastq 88(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmullw %ymm5, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm5, %ymm2, %ymm2
+ vpmullw %ymm5, %ymm3, %ymm3
+ vpmulhrsw %ymm7, %ymm0, %ymm0
+ vpmulhrsw %ymm7, %ymm1, %ymm1
+ vpmulhrsw %ymm7, %ymm2, %ymm2
+ vpmulhrsw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm1, 288(%rdi)
+ vmovdqu %ymm2, 320(%rdi)
+ vmovdqu %ymm3, 352(%rdi)
+ vpbroadcastq 96(%rsi), %ymm0
+ vpbroadcastq 104(%rsi), %ymm1
+ vpbroadcastq 112(%rsi), %ymm2
+ vpbroadcastq 120(%rsi), %ymm3
+ vpshufb %ymm6, %ymm0, %ymm0
+ vpshufb %ymm6, %ymm1, %ymm1
+ vpshufb %ymm6, %ymm2, %ymm2
+ vpshufb %ymm6, %ymm3, %ymm3
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpand %ymm4, %ymm2, %ymm2
+ vpand %ymm4, %ymm3, %ymm3
+ vpmullw %ymm5, %ymm0, %ymm0
+ vpmullw %ymm5, %ymm1, %ymm1
+ vpmullw %ymm5, %ymm2, %ymm2
+ vpmullw %ymm5, %ymm3, %ymm3
+ vpmulhrsw %ymm7, %ymm0, %ymm0
+ vpmulhrsw %ymm7, %ymm1, %ymm1
+ vpmulhrsw %ymm7, %ymm2, %ymm2
+ vpmulhrsw %ymm7, %ymm3, %ymm3
+ vmovdqu %ymm0, 384(%rdi)
+ vmovdqu %ymm1, 416(%rdi)
+ vmovdqu %ymm2, 448(%rdi)
+ vmovdqu %ymm3, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_decompress_4_avx2,.-kyber_decompress_4_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_v:
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+.value 0x4ebf,0x4ebf
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_shift:
+.value 0x400,0x400
+.value 0x400,0x400
+.value 0x400,0x400
+.value 0x400,0x400
+.value 0x400,0x400
+.value 0x400,0x400
+.value 0x400,0x400
+.value 0x400,0x400
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_mask:
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+.value 0x1f,0x1f
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_shift1:
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+.value 0x2001,0x2001
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_shift2:
+.long 0x4000001,0x4000001,0x4000001,0x4000001
+.long 0x4000001,0x4000001,0x4000001,0x4000001
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_shlv:
+.quad 0xc, 0xc
+.quad 0xc, 0xc
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_compress_5_avx2_shuffle:
+.value 0x100,0x302
+.value 0xff04,0xffff
+.value 0xffff,0x908
+.value 0xb0a,0xff0c
+.value 0xa09,0xc0b
+.value 0xff,0x201
+.value 0x403,0xffff
+.value 0xffff,0x8ff
+#ifndef __APPLE__
+.text
+.globl kyber_compress_5_avx2
+.type kyber_compress_5_avx2,@function
+.align 16
+kyber_compress_5_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_compress_5_avx2
+.p2align 4
+_kyber_compress_5_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rsi), %ymm0
+ vmovdqu L_kyber_compress_5_avx2_v(%rip), %ymm2
+ vmovdqu L_kyber_compress_5_avx2_shift(%rip), %ymm3
+ vmovdqu L_kyber_compress_5_avx2_mask(%rip), %ymm4
+ vmovdqu L_kyber_compress_5_avx2_shift1(%rip), %ymm5
+ vmovdqu L_kyber_compress_5_avx2_shift2(%rip), %ymm6
+ vmovdqu L_kyber_compress_5_avx2_shlv(%rip), %ymm7
+ vmovdqu L_kyber_compress_5_avx2_shuffle(%rip), %ymm8
+ vpmulhw (%rsi), %ymm2, %ymm0
+ vpmulhw 32(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, (%rdi)
+ movss %xmm1, 16(%rdi)
+ vpmulhw 64(%rsi), %ymm2, %ymm0
+ vpmulhw 96(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 20(%rdi)
+ movss %xmm1, 36(%rdi)
+ vpmulhw 128(%rsi), %ymm2, %ymm0
+ vpmulhw 160(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 40(%rdi)
+ movss %xmm1, 56(%rdi)
+ vpmulhw 192(%rsi), %ymm2, %ymm0
+ vpmulhw 224(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 60(%rdi)
+ movss %xmm1, 76(%rdi)
+ vpmulhw 256(%rsi), %ymm2, %ymm0
+ vpmulhw 288(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 80(%rdi)
+ movss %xmm1, 96(%rdi)
+ vpmulhw 320(%rsi), %ymm2, %ymm0
+ vpmulhw 352(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 100(%rdi)
+ movss %xmm1, 116(%rdi)
+ vpmulhw 384(%rsi), %ymm2, %ymm0
+ vpmulhw 416(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 120(%rdi)
+ movss %xmm1, 136(%rdi)
+ vpmulhw 448(%rsi), %ymm2, %ymm0
+ vpmulhw 480(%rsi), %ymm2, %ymm1
+ vpmulhrsw %ymm3, %ymm0, %ymm0
+ vpmulhrsw %ymm3, %ymm1, %ymm1
+ vpand %ymm4, %ymm0, %ymm0
+ vpand %ymm4, %ymm1, %ymm1
+ vpackuswb %ymm1, %ymm0, %ymm0
+ vpmaddubsw %ymm5, %ymm0, %ymm0
+ vpmaddwd %ymm6, %ymm0, %ymm0
+ vpsllvd %ymm7, %ymm0, %ymm0
+ vpsrlvq %ymm7, %ymm0, %ymm0
+ vpshufb %ymm8, %ymm0, %ymm0
+ vextracti128 $0x01, %ymm0, %xmm1
+ vpblendvb %xmm8, %xmm1, %xmm0, %xmm0
+ vmovdqu %xmm0, 140(%rdi)
+ movss %xmm1, 156(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_compress_5_avx2,.-kyber_compress_5_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_5_avx2_q:
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+.value 0xd01,0xd01
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_5_avx2_shuf:
+.value 0x0,0x100
+.value 0x101,0x201
+.value 0x302,0x303
+.value 0x403,0x404
+.value 0x505,0x605
+.value 0x606,0x706
+.value 0x807,0x808
+.value 0x908,0x909
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_5_avx2_mask:
+.value 0x1f,0x3e0
+.value 0x7c,0xf80
+.value 0x1f0,0x3e
+.value 0x7c0,0xfb
+.value 0x1f,0x3e0
+.value 0x7c,0xf80
+.value 0x1f0,0x3e
+.value 0x7c0,0xfb
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_decompress_5_avx2_shift:
+.value 0x400,0x20
+.value 0x100,0x8
+.value 0x40,0x200
+.value 0x10,0x80
+.value 0x400,0x20
+.value 0x100,0x8
+.value 0x40,0x200
+.value 0x10,0x80
+#ifndef __APPLE__
+.text
+.globl kyber_decompress_5_avx2
+.type kyber_decompress_5_avx2,@function
+.align 16
+kyber_decompress_5_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_decompress_5_avx2
+.p2align 4
+_kyber_decompress_5_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_decompress_5_avx2_q(%rip), %ymm1
+ vmovdqu L_kyber_decompress_5_avx2_shuf(%rip), %ymm2
+ vmovdqu L_kyber_decompress_5_avx2_mask(%rip), %ymm3
+ vmovdqu L_kyber_decompress_5_avx2_shift(%rip), %ymm4
+ vbroadcasti128 (%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, (%rdi)
+ vbroadcasti128 10(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 32(%rdi)
+ vbroadcasti128 20(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 64(%rdi)
+ vbroadcasti128 30(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 96(%rdi)
+ vbroadcasti128 40(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 128(%rdi)
+ vbroadcasti128 50(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 160(%rdi)
+ vbroadcasti128 60(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 192(%rdi)
+ vbroadcasti128 70(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 224(%rdi)
+ vbroadcasti128 80(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 256(%rdi)
+ vbroadcasti128 90(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 288(%rdi)
+ vbroadcasti128 100(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 320(%rdi)
+ vbroadcasti128 110(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 352(%rdi)
+ vbroadcasti128 120(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 384(%rdi)
+ vbroadcasti128 130(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 416(%rdi)
+ vbroadcasti128 140(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 448(%rdi)
+ vbroadcasti128 150(%rsi), %ymm0
+ vpshufb %ymm2, %ymm0, %ymm0
+ vpand %ymm3, %ymm0, %ymm0
+ vpmullw %ymm4, %ymm0, %ymm0
+ vpmulhrsw %ymm1, %ymm0, %ymm0
+ vmovdqu %ymm0, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_decompress_5_avx2,.-kyber_decompress_5_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_from_msg_avx2_shift:
+.long 0x3,0x2,0x1,0x0
+.long 0x3,0x2,0x1,0x0
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_from_msg_avx2_shuf:
+.value 0x100,0x504
+.value 0x908,0xd0c
+.value 0x302,0x706
+.value 0xb0a,0xf0e
+.value 0x100,0x504
+.value 0x908,0xd0c
+.value 0x302,0x706
+.value 0xb0a,0xf0e
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_from_msg_avx2_hqs:
+.value 0x681,0x681
+.value 0x681,0x681
+.value 0x681,0x681
+.value 0x681,0x681
+.value 0x681,0x681
+.value 0x681,0x681
+.value 0x681,0x681
+.value 0x681,0x681
+#ifndef __APPLE__
+.text
+.globl kyber_from_msg_avx2
+.type kyber_from_msg_avx2,@function
+.align 16
+kyber_from_msg_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_from_msg_avx2
+.p2align 4
+_kyber_from_msg_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rsi), %ymm0
+ vmovdqu L_kyber_from_msg_avx2_shift(%rip), %ymm9
+ vmovdqu L_kyber_from_msg_avx2_shuf(%rip), %ymm10
+ vmovdqu L_kyber_from_msg_avx2_hqs(%rip), %ymm11
+ vpshufd $0x00, %ymm0, %ymm4
+ vpsllvd %ymm9, %ymm4, %ymm4
+ vpshufb %ymm10, %ymm4, %ymm4
+ vpsllw $12, %ymm4, %ymm1
+ vpsllw $8, %ymm4, %ymm2
+ vpsllw $4, %ymm4, %ymm3
+ vpsraw $15, %ymm1, %ymm1
+ vpsraw $15, %ymm2, %ymm2
+ vpsraw $15, %ymm3, %ymm3
+ vpsraw $15, %ymm4, %ymm4
+ vpand %ymm11, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm11, %ymm4, %ymm4
+ vpunpcklqdq %ymm2, %ymm1, %ymm5
+ vpunpckhqdq %ymm2, %ymm1, %ymm7
+ vpunpcklqdq %ymm4, %ymm3, %ymm6
+ vpunpckhqdq %ymm4, %ymm3, %ymm8
+ vperm2i128 $32, %ymm6, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm5, %ymm3
+ vperm2i128 $32, %ymm8, %ymm7, %ymm2
+ vperm2i128 $49, %ymm8, %ymm7, %ymm4
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, 256(%rdi)
+ vmovdqu %ymm4, 288(%rdi)
+ vpshufd $0x55, %ymm0, %ymm4
+ vpsllvd %ymm9, %ymm4, %ymm4
+ vpshufb %ymm10, %ymm4, %ymm4
+ vpsllw $12, %ymm4, %ymm1
+ vpsllw $8, %ymm4, %ymm2
+ vpsllw $4, %ymm4, %ymm3
+ vpsraw $15, %ymm1, %ymm1
+ vpsraw $15, %ymm2, %ymm2
+ vpsraw $15, %ymm3, %ymm3
+ vpsraw $15, %ymm4, %ymm4
+ vpand %ymm11, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm11, %ymm4, %ymm4
+ vpunpcklqdq %ymm2, %ymm1, %ymm5
+ vpunpckhqdq %ymm2, %ymm1, %ymm7
+ vpunpcklqdq %ymm4, %ymm3, %ymm6
+ vpunpckhqdq %ymm4, %ymm3, %ymm8
+ vperm2i128 $32, %ymm6, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm5, %ymm3
+ vperm2i128 $32, %ymm8, %ymm7, %ymm2
+ vperm2i128 $49, %ymm8, %ymm7, %ymm4
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, 320(%rdi)
+ vmovdqu %ymm4, 352(%rdi)
+ vpshufd $0xaa, %ymm0, %ymm4
+ vpsllvd %ymm9, %ymm4, %ymm4
+ vpshufb %ymm10, %ymm4, %ymm4
+ vpsllw $12, %ymm4, %ymm1
+ vpsllw $8, %ymm4, %ymm2
+ vpsllw $4, %ymm4, %ymm3
+ vpsraw $15, %ymm1, %ymm1
+ vpsraw $15, %ymm2, %ymm2
+ vpsraw $15, %ymm3, %ymm3
+ vpsraw $15, %ymm4, %ymm4
+ vpand %ymm11, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm11, %ymm4, %ymm4
+ vpunpcklqdq %ymm2, %ymm1, %ymm5
+ vpunpckhqdq %ymm2, %ymm1, %ymm7
+ vpunpcklqdq %ymm4, %ymm3, %ymm6
+ vpunpckhqdq %ymm4, %ymm3, %ymm8
+ vperm2i128 $32, %ymm6, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm5, %ymm3
+ vperm2i128 $32, %ymm8, %ymm7, %ymm2
+ vperm2i128 $49, %ymm8, %ymm7, %ymm4
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, 160(%rdi)
+ vmovdqu %ymm3, 384(%rdi)
+ vmovdqu %ymm4, 416(%rdi)
+ vpshufd $0xff, %ymm0, %ymm4
+ vpsllvd %ymm9, %ymm4, %ymm4
+ vpshufb %ymm10, %ymm4, %ymm4
+ vpsllw $12, %ymm4, %ymm1
+ vpsllw $8, %ymm4, %ymm2
+ vpsllw $4, %ymm4, %ymm3
+ vpsraw $15, %ymm1, %ymm1
+ vpsraw $15, %ymm2, %ymm2
+ vpsraw $15, %ymm3, %ymm3
+ vpsraw $15, %ymm4, %ymm4
+ vpand %ymm11, %ymm1, %ymm1
+ vpand %ymm11, %ymm2, %ymm2
+ vpand %ymm11, %ymm3, %ymm3
+ vpand %ymm11, %ymm4, %ymm4
+ vpunpcklqdq %ymm2, %ymm1, %ymm5
+ vpunpckhqdq %ymm2, %ymm1, %ymm7
+ vpunpcklqdq %ymm4, %ymm3, %ymm6
+ vpunpckhqdq %ymm4, %ymm3, %ymm8
+ vperm2i128 $32, %ymm6, %ymm5, %ymm1
+ vperm2i128 $49, %ymm6, %ymm5, %ymm3
+ vperm2i128 $32, %ymm8, %ymm7, %ymm2
+ vperm2i128 $49, %ymm8, %ymm7, %ymm4
+ vmovdqu %ymm1, 192(%rdi)
+ vmovdqu %ymm2, 224(%rdi)
+ vmovdqu %ymm3, 448(%rdi)
+ vmovdqu %ymm4, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_from_msg_avx2,.-kyber_from_msg_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_to_msg_avx2_hqs:
+.value 0x680,0x680
+.value 0x680,0x680
+.value 0x680,0x680
+.value 0x680,0x680
+.value 0x680,0x680
+.value 0x680,0x680
+.value 0x680,0x680
+.value 0x680,0x680
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_to_msg_avx2_hhqs:
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+.value 0xfcc1,0xfcc1
+#ifndef __APPLE__
+.text
+.globl kyber_to_msg_avx2
+.type kyber_to_msg_avx2,@function
+.align 16
+kyber_to_msg_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_to_msg_avx2
+.p2align 4
+_kyber_to_msg_avx2:
+#endif /* __APPLE__ */
+ vmovdqu L_kyber_to_msg_avx2_hqs(%rip), %ymm8
+ vmovdqu L_kyber_to_msg_avx2_hhqs(%rip), %ymm9
+ vpsubw (%rsi), %ymm8, %ymm0
+ vpsubw 32(%rsi), %ymm8, %ymm1
+ vpsubw 64(%rsi), %ymm8, %ymm2
+ vpsubw 96(%rsi), %ymm8, %ymm3
+ vpsraw $15, %ymm0, %ymm4
+ vpsraw $15, %ymm1, %ymm5
+ vpsraw $15, %ymm2, %ymm6
+ vpsraw $15, %ymm3, %ymm7
+ vpxor %ymm4, %ymm0, %ymm0
+ vpxor %ymm5, %ymm1, %ymm1
+ vpxor %ymm6, %ymm2, %ymm2
+ vpxor %ymm7, %ymm3, %ymm3
+ vpaddw %ymm9, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm9, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vpacksswb %ymm1, %ymm0, %ymm0
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpermq $0xd8, %ymm0, %ymm0
+ vpermq $0xd8, %ymm2, %ymm2
+ vpmovmskb %ymm0, %edx
+ vpmovmskb %ymm2, %eax
+ movl %edx, (%rdi)
+ movl %eax, 4(%rdi)
+ vpsubw 128(%rsi), %ymm8, %ymm0
+ vpsubw 160(%rsi), %ymm8, %ymm1
+ vpsubw 192(%rsi), %ymm8, %ymm2
+ vpsubw 224(%rsi), %ymm8, %ymm3
+ vpsraw $15, %ymm0, %ymm4
+ vpsraw $15, %ymm1, %ymm5
+ vpsraw $15, %ymm2, %ymm6
+ vpsraw $15, %ymm3, %ymm7
+ vpxor %ymm4, %ymm0, %ymm0
+ vpxor %ymm5, %ymm1, %ymm1
+ vpxor %ymm6, %ymm2, %ymm2
+ vpxor %ymm7, %ymm3, %ymm3
+ vpaddw %ymm9, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm9, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vpacksswb %ymm1, %ymm0, %ymm0
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpermq $0xd8, %ymm0, %ymm0
+ vpermq $0xd8, %ymm2, %ymm2
+ vpmovmskb %ymm0, %edx
+ vpmovmskb %ymm2, %eax
+ movl %edx, 8(%rdi)
+ movl %eax, 12(%rdi)
+ vpsubw 256(%rsi), %ymm8, %ymm0
+ vpsubw 288(%rsi), %ymm8, %ymm1
+ vpsubw 320(%rsi), %ymm8, %ymm2
+ vpsubw 352(%rsi), %ymm8, %ymm3
+ vpsraw $15, %ymm0, %ymm4
+ vpsraw $15, %ymm1, %ymm5
+ vpsraw $15, %ymm2, %ymm6
+ vpsraw $15, %ymm3, %ymm7
+ vpxor %ymm4, %ymm0, %ymm0
+ vpxor %ymm5, %ymm1, %ymm1
+ vpxor %ymm6, %ymm2, %ymm2
+ vpxor %ymm7, %ymm3, %ymm3
+ vpaddw %ymm9, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm9, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vpacksswb %ymm1, %ymm0, %ymm0
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpermq $0xd8, %ymm0, %ymm0
+ vpermq $0xd8, %ymm2, %ymm2
+ vpmovmskb %ymm0, %edx
+ vpmovmskb %ymm2, %eax
+ movl %edx, 16(%rdi)
+ movl %eax, 20(%rdi)
+ vpsubw 384(%rsi), %ymm8, %ymm0
+ vpsubw 416(%rsi), %ymm8, %ymm1
+ vpsubw 448(%rsi), %ymm8, %ymm2
+ vpsubw 480(%rsi), %ymm8, %ymm3
+ vpsraw $15, %ymm0, %ymm4
+ vpsraw $15, %ymm1, %ymm5
+ vpsraw $15, %ymm2, %ymm6
+ vpsraw $15, %ymm3, %ymm7
+ vpxor %ymm4, %ymm0, %ymm0
+ vpxor %ymm5, %ymm1, %ymm1
+ vpxor %ymm6, %ymm2, %ymm2
+ vpxor %ymm7, %ymm3, %ymm3
+ vpaddw %ymm9, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm9, %ymm2, %ymm2
+ vpaddw %ymm9, %ymm3, %ymm3
+ vpacksswb %ymm1, %ymm0, %ymm0
+ vpacksswb %ymm3, %ymm2, %ymm2
+ vpermq $0xd8, %ymm0, %ymm0
+ vpermq $0xd8, %ymm2, %ymm2
+ vpmovmskb %ymm0, %edx
+ vpmovmskb %ymm2, %eax
+ movl %edx, 24(%rdi)
+ movl %eax, 28(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_to_msg_avx2,.-kyber_to_msg_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_from_bytes_avx2_shuf:
+.value 0x100,0xff02
+.value 0x403,0xff05
+.value 0x706,0xff08
+.value 0xa09,0xff0b
+.value 0x504,0xff06
+.value 0x807,0xff09
+.value 0xb0a,0xff0c
+.value 0xe0d,0xff0f
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_from_bytes_avx2_mask:
+.long 0xfff,0xfff,0xfff,0xfff
+.long 0xfff,0xfff,0xfff,0xfff
+#ifndef __APPLE__
+.text
+.globl kyber_from_bytes_avx2
+.type kyber_from_bytes_avx2,@function
+.align 16
+kyber_from_bytes_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_from_bytes_avx2
+.p2align 4
+_kyber_from_bytes_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rsi), %ymm0
+ vmovdqu L_kyber_from_bytes_avx2_shuf(%rip), %ymm12
+ vmovdqu L_kyber_from_bytes_avx2_mask(%rip), %ymm13
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu 128(%rsi), %ymm4
+ vmovdqu 160(%rsi), %ymm5
+ vpermq $0xe9, %ymm5, %ymm7
+ vpermq $0x00, %ymm5, %ymm8
+ vpermq $62, %ymm4, %ymm6
+ vpermq $0x40, %ymm4, %ymm9
+ vpermq $3, %ymm3, %ymm5
+ vpermq $0x94, %ymm3, %ymm4
+ vpermq $0xe9, %ymm2, %ymm3
+ vpermq $0x00, %ymm2, %ymm10
+ vpermq $62, %ymm1, %ymm2
+ vpermq $0x40, %ymm1, %ymm11
+ vpermq $3, %ymm0, %ymm1
+ vpermq $0x94, %ymm0, %ymm0
+ vpblendd $0xc0, %ymm8, %ymm6, %ymm6
+ vpblendd $0xfc, %ymm9, %ymm5, %ymm5
+ vpblendd $0xc0, %ymm10, %ymm2, %ymm2
+ vpblendd $0xfc, %ymm11, %ymm1, %ymm1
+ vpshufb %ymm12, %ymm0, %ymm0
+ vpshufb %ymm12, %ymm1, %ymm1
+ vpshufb %ymm12, %ymm2, %ymm2
+ vpshufb %ymm12, %ymm3, %ymm3
+ vpshufb %ymm12, %ymm4, %ymm4
+ vpshufb %ymm12, %ymm5, %ymm5
+ vpshufb %ymm12, %ymm6, %ymm6
+ vpshufb %ymm12, %ymm7, %ymm7
+ vpandn %ymm0, %ymm13, %ymm8
+ vpandn %ymm1, %ymm13, %ymm9
+ vpandn %ymm2, %ymm13, %ymm10
+ vpandn %ymm3, %ymm13, %ymm11
+ vpand %ymm0, %ymm13, %ymm0
+ vpand %ymm1, %ymm13, %ymm1
+ vpand %ymm2, %ymm13, %ymm2
+ vpand %ymm3, %ymm13, %ymm3
+ vpslld $4, %ymm8, %ymm8
+ vpslld $4, %ymm9, %ymm9
+ vpslld $4, %ymm10, %ymm10
+ vpslld $4, %ymm11, %ymm11
+ vpor %ymm8, %ymm0, %ymm0
+ vpor %ymm9, %ymm1, %ymm1
+ vpor %ymm10, %ymm2, %ymm2
+ vpor %ymm11, %ymm3, %ymm3
+ vpandn %ymm4, %ymm13, %ymm8
+ vpandn %ymm5, %ymm13, %ymm9
+ vpandn %ymm6, %ymm13, %ymm10
+ vpandn %ymm7, %ymm13, %ymm11
+ vpand %ymm4, %ymm13, %ymm4
+ vpand %ymm5, %ymm13, %ymm5
+ vpand %ymm6, %ymm13, %ymm6
+ vpand %ymm7, %ymm13, %ymm7
+ vpslld $4, %ymm8, %ymm8
+ vpslld $4, %ymm9, %ymm9
+ vpslld $4, %ymm10, %ymm10
+ vpslld $4, %ymm11, %ymm11
+ vpor %ymm8, %ymm4, %ymm4
+ vpor %ymm9, %ymm5, %ymm5
+ vpor %ymm10, %ymm6, %ymm6
+ vpor %ymm11, %ymm7, %ymm7
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, 128(%rdi)
+ vmovdqu %ymm5, 160(%rdi)
+ vmovdqu %ymm6, 192(%rdi)
+ vmovdqu %ymm7, 224(%rdi)
+ vmovdqu 192(%rsi), %ymm0
+ vmovdqu 224(%rsi), %ymm1
+ vmovdqu 256(%rsi), %ymm2
+ vmovdqu 288(%rsi), %ymm3
+ vmovdqu 320(%rsi), %ymm4
+ vmovdqu 352(%rsi), %ymm5
+ vpermq $0xe9, %ymm5, %ymm7
+ vpermq $0x00, %ymm5, %ymm8
+ vpermq $62, %ymm4, %ymm6
+ vpermq $0x40, %ymm4, %ymm9
+ vpermq $3, %ymm3, %ymm5
+ vpermq $0x94, %ymm3, %ymm4
+ vpermq $0xe9, %ymm2, %ymm3
+ vpermq $0x00, %ymm2, %ymm10
+ vpermq $62, %ymm1, %ymm2
+ vpermq $0x40, %ymm1, %ymm11
+ vpermq $3, %ymm0, %ymm1
+ vpermq $0x94, %ymm0, %ymm0
+ vpblendd $0xc0, %ymm8, %ymm6, %ymm6
+ vpblendd $0xfc, %ymm9, %ymm5, %ymm5
+ vpblendd $0xc0, %ymm10, %ymm2, %ymm2
+ vpblendd $0xfc, %ymm11, %ymm1, %ymm1
+ vpshufb %ymm12, %ymm0, %ymm0
+ vpshufb %ymm12, %ymm1, %ymm1
+ vpshufb %ymm12, %ymm2, %ymm2
+ vpshufb %ymm12, %ymm3, %ymm3
+ vpshufb %ymm12, %ymm4, %ymm4
+ vpshufb %ymm12, %ymm5, %ymm5
+ vpshufb %ymm12, %ymm6, %ymm6
+ vpshufb %ymm12, %ymm7, %ymm7
+ vpandn %ymm0, %ymm13, %ymm8
+ vpandn %ymm1, %ymm13, %ymm9
+ vpandn %ymm2, %ymm13, %ymm10
+ vpandn %ymm3, %ymm13, %ymm11
+ vpand %ymm0, %ymm13, %ymm0
+ vpand %ymm1, %ymm13, %ymm1
+ vpand %ymm2, %ymm13, %ymm2
+ vpand %ymm3, %ymm13, %ymm3
+ vpslld $4, %ymm8, %ymm8
+ vpslld $4, %ymm9, %ymm9
+ vpslld $4, %ymm10, %ymm10
+ vpslld $4, %ymm11, %ymm11
+ vpor %ymm8, %ymm0, %ymm0
+ vpor %ymm9, %ymm1, %ymm1
+ vpor %ymm10, %ymm2, %ymm2
+ vpor %ymm11, %ymm3, %ymm3
+ vpandn %ymm4, %ymm13, %ymm8
+ vpandn %ymm5, %ymm13, %ymm9
+ vpandn %ymm6, %ymm13, %ymm10
+ vpandn %ymm7, %ymm13, %ymm11
+ vpand %ymm4, %ymm13, %ymm4
+ vpand %ymm5, %ymm13, %ymm5
+ vpand %ymm6, %ymm13, %ymm6
+ vpand %ymm7, %ymm13, %ymm7
+ vpslld $4, %ymm8, %ymm8
+ vpslld $4, %ymm9, %ymm9
+ vpslld $4, %ymm10, %ymm10
+ vpslld $4, %ymm11, %ymm11
+ vpor %ymm8, %ymm4, %ymm4
+ vpor %ymm9, %ymm5, %ymm5
+ vpor %ymm10, %ymm6, %ymm6
+ vpor %ymm11, %ymm7, %ymm7
+ vmovdqu %ymm0, 256(%rdi)
+ vmovdqu %ymm1, 288(%rdi)
+ vmovdqu %ymm2, 320(%rdi)
+ vmovdqu %ymm3, 352(%rdi)
+ vmovdqu %ymm4, 384(%rdi)
+ vmovdqu %ymm5, 416(%rdi)
+ vmovdqu %ymm6, 448(%rdi)
+ vmovdqu %ymm7, 480(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_from_bytes_avx2,.-kyber_from_bytes_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_to_bytes_avx2_mask:
+.long 0xfff,0xfff,0xfff,0xfff
+.long 0xfff,0xfff,0xfff,0xfff
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_kyber_to_bytes_avx2_shuf:
+.value 0x100,0x402
+.value 0x605,0x908
+.value 0xc0a,0xe0d
+.value 0xffff,0xffff
+.value 0x605,0x908
+.value 0xc0a,0xe0d
+.value 0xffff,0xffff
+.value 0x100,0x402
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+L_kyber_to_bytes_avx2_perm:
+.long 0x0,0x1,0x2,0x7
+.long 0x4,0x5,0x3,0x6
+#ifndef __APPLE__
+.text
+.globl kyber_to_bytes_avx2
+.type kyber_to_bytes_avx2,@function
+.align 16
+kyber_to_bytes_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_to_bytes_avx2
+.p2align 4
+_kyber_to_bytes_avx2:
+#endif /* __APPLE__ */
+ vmovdqu kyber_q(%rip), %ymm12
+ vmovdqu L_kyber_to_bytes_avx2_mask(%rip), %ymm13
+ vmovdqu L_kyber_to_bytes_avx2_shuf(%rip), %ymm14
+ vmovdqu L_kyber_to_bytes_avx2_perm(%rip), %ymm15
+ vmovdqu (%rsi), %ymm0
+ vmovdqu 32(%rsi), %ymm1
+ vmovdqu 64(%rsi), %ymm2
+ vmovdqu 96(%rsi), %ymm3
+ vmovdqu 128(%rsi), %ymm4
+ vmovdqu 160(%rsi), %ymm5
+ vmovdqu 192(%rsi), %ymm6
+ vmovdqu 224(%rsi), %ymm7
+ vpsubw %ymm12, %ymm0, %ymm8
+ vpsubw %ymm12, %ymm1, %ymm9
+ vpsubw %ymm12, %ymm2, %ymm10
+ vpsubw %ymm12, %ymm3, %ymm11
+ vpsraw $15, %ymm8, %ymm0
+ vpsraw $15, %ymm9, %ymm1
+ vpsraw $15, %ymm10, %ymm2
+ vpsraw $15, %ymm11, %ymm3
+ vpand %ymm12, %ymm0, %ymm0
+ vpand %ymm12, %ymm1, %ymm1
+ vpand %ymm12, %ymm2, %ymm2
+ vpand %ymm12, %ymm3, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm10, %ymm2, %ymm2
+ vpaddw %ymm11, %ymm3, %ymm3
+ vpsubw %ymm12, %ymm4, %ymm8
+ vpsubw %ymm12, %ymm5, %ymm9
+ vpsubw %ymm12, %ymm6, %ymm10
+ vpsubw %ymm12, %ymm7, %ymm11
+ vpsraw $15, %ymm8, %ymm4
+ vpsraw $15, %ymm9, %ymm5
+ vpsraw $15, %ymm10, %ymm6
+ vpsraw $15, %ymm11, %ymm7
+ vpand %ymm12, %ymm4, %ymm4
+ vpand %ymm12, %ymm5, %ymm5
+ vpand %ymm12, %ymm6, %ymm6
+ vpand %ymm12, %ymm7, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ vpaddw %ymm10, %ymm6, %ymm6
+ vpaddw %ymm11, %ymm7, %ymm7
+ vpsrld $16, %ymm0, %ymm8
+ vpsrld $16, %ymm1, %ymm9
+ vpsrld $16, %ymm2, %ymm10
+ vpsrld $16, %ymm3, %ymm11
+ vpand %ymm0, %ymm13, %ymm0
+ vpand %ymm1, %ymm13, %ymm1
+ vpand %ymm2, %ymm13, %ymm2
+ vpand %ymm3, %ymm13, %ymm3
+ vpslld $12, %ymm8, %ymm8
+ vpslld $12, %ymm9, %ymm9
+ vpslld $12, %ymm10, %ymm10
+ vpslld $12, %ymm11, %ymm11
+ vpor %ymm8, %ymm0, %ymm0
+ vpor %ymm9, %ymm1, %ymm1
+ vpor %ymm10, %ymm2, %ymm2
+ vpor %ymm11, %ymm3, %ymm3
+ vpsrld $16, %ymm4, %ymm8
+ vpsrld $16, %ymm5, %ymm9
+ vpsrld $16, %ymm6, %ymm10
+ vpsrld $16, %ymm7, %ymm11
+ vpand %ymm4, %ymm13, %ymm4
+ vpand %ymm5, %ymm13, %ymm5
+ vpand %ymm6, %ymm13, %ymm6
+ vpand %ymm7, %ymm13, %ymm7
+ vpslld $12, %ymm8, %ymm8
+ vpslld $12, %ymm9, %ymm9
+ vpslld $12, %ymm10, %ymm10
+ vpslld $12, %ymm11, %ymm11
+ vpor %ymm8, %ymm4, %ymm4
+ vpor %ymm9, %ymm5, %ymm5
+ vpor %ymm10, %ymm6, %ymm6
+ vpor %ymm11, %ymm7, %ymm7
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm1, %ymm1
+ vpshufb %ymm14, %ymm2, %ymm2
+ vpshufb %ymm14, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm4, %ymm4
+ vpshufb %ymm14, %ymm5, %ymm5
+ vpshufb %ymm14, %ymm6, %ymm6
+ vpshufb %ymm14, %ymm7, %ymm7
+ vpermd %ymm0, %ymm15, %ymm0
+ vpermd %ymm1, %ymm15, %ymm1
+ vpermd %ymm2, %ymm15, %ymm2
+ vpermd %ymm3, %ymm15, %ymm3
+ vpermd %ymm4, %ymm15, %ymm4
+ vpermd %ymm5, %ymm15, %ymm5
+ vpermd %ymm6, %ymm15, %ymm6
+ vpermd %ymm7, %ymm15, %ymm7
+ vpermq $2, %ymm6, %ymm8
+ vpermq $0x90, %ymm7, %ymm7
+ vpermq $9, %ymm5, %ymm9
+ vpermq $0x40, %ymm6, %ymm6
+ vpermq $0x00, %ymm5, %ymm5
+ vpblendd $63, %ymm4, %ymm5, %ymm5
+ vpermq $2, %ymm2, %ymm10
+ vpermq $0x90, %ymm3, %ymm4
+ vpermq $9, %ymm1, %ymm11
+ vpermq $0x40, %ymm2, %ymm3
+ vpermq $0x00, %ymm1, %ymm2
+ vpblendd $63, %ymm0, %ymm2, %ymm2
+ vpblendd $3, %ymm8, %ymm7, %ymm7
+ vpblendd $15, %ymm9, %ymm6, %ymm6
+ vpblendd $3, %ymm10, %ymm4, %ymm4
+ vpblendd $15, %ymm11, %ymm3, %ymm3
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 64(%rdi)
+ vmovdqu %ymm5, 96(%rdi)
+ vmovdqu %ymm6, 128(%rdi)
+ vmovdqu %ymm7, 160(%rdi)
+ vmovdqu 256(%rsi), %ymm0
+ vmovdqu 288(%rsi), %ymm1
+ vmovdqu 320(%rsi), %ymm2
+ vmovdqu 352(%rsi), %ymm3
+ vmovdqu 384(%rsi), %ymm4
+ vmovdqu 416(%rsi), %ymm5
+ vmovdqu 448(%rsi), %ymm6
+ vmovdqu 480(%rsi), %ymm7
+ vpsubw %ymm12, %ymm0, %ymm8
+ vpsubw %ymm12, %ymm1, %ymm9
+ vpsubw %ymm12, %ymm2, %ymm10
+ vpsubw %ymm12, %ymm3, %ymm11
+ vpsraw $15, %ymm8, %ymm0
+ vpsraw $15, %ymm9, %ymm1
+ vpsraw $15, %ymm10, %ymm2
+ vpsraw $15, %ymm11, %ymm3
+ vpand %ymm12, %ymm0, %ymm0
+ vpand %ymm12, %ymm1, %ymm1
+ vpand %ymm12, %ymm2, %ymm2
+ vpand %ymm12, %ymm3, %ymm3
+ vpaddw %ymm8, %ymm0, %ymm0
+ vpaddw %ymm9, %ymm1, %ymm1
+ vpaddw %ymm10, %ymm2, %ymm2
+ vpaddw %ymm11, %ymm3, %ymm3
+ vpsubw %ymm12, %ymm4, %ymm8
+ vpsubw %ymm12, %ymm5, %ymm9
+ vpsubw %ymm12, %ymm6, %ymm10
+ vpsubw %ymm12, %ymm7, %ymm11
+ vpsraw $15, %ymm8, %ymm4
+ vpsraw $15, %ymm9, %ymm5
+ vpsraw $15, %ymm10, %ymm6
+ vpsraw $15, %ymm11, %ymm7
+ vpand %ymm12, %ymm4, %ymm4
+ vpand %ymm12, %ymm5, %ymm5
+ vpand %ymm12, %ymm6, %ymm6
+ vpand %ymm12, %ymm7, %ymm7
+ vpaddw %ymm8, %ymm4, %ymm4
+ vpaddw %ymm9, %ymm5, %ymm5
+ vpaddw %ymm10, %ymm6, %ymm6
+ vpaddw %ymm11, %ymm7, %ymm7
+ vpsrld $16, %ymm0, %ymm8
+ vpsrld $16, %ymm1, %ymm9
+ vpsrld $16, %ymm2, %ymm10
+ vpsrld $16, %ymm3, %ymm11
+ vpand %ymm0, %ymm13, %ymm0
+ vpand %ymm1, %ymm13, %ymm1
+ vpand %ymm2, %ymm13, %ymm2
+ vpand %ymm3, %ymm13, %ymm3
+ vpslld $12, %ymm8, %ymm8
+ vpslld $12, %ymm9, %ymm9
+ vpslld $12, %ymm10, %ymm10
+ vpslld $12, %ymm11, %ymm11
+ vpor %ymm8, %ymm0, %ymm0
+ vpor %ymm9, %ymm1, %ymm1
+ vpor %ymm10, %ymm2, %ymm2
+ vpor %ymm11, %ymm3, %ymm3
+ vpsrld $16, %ymm4, %ymm8
+ vpsrld $16, %ymm5, %ymm9
+ vpsrld $16, %ymm6, %ymm10
+ vpsrld $16, %ymm7, %ymm11
+ vpand %ymm4, %ymm13, %ymm4
+ vpand %ymm5, %ymm13, %ymm5
+ vpand %ymm6, %ymm13, %ymm6
+ vpand %ymm7, %ymm13, %ymm7
+ vpslld $12, %ymm8, %ymm8
+ vpslld $12, %ymm9, %ymm9
+ vpslld $12, %ymm10, %ymm10
+ vpslld $12, %ymm11, %ymm11
+ vpor %ymm8, %ymm4, %ymm4
+ vpor %ymm9, %ymm5, %ymm5
+ vpor %ymm10, %ymm6, %ymm6
+ vpor %ymm11, %ymm7, %ymm7
+ vpshufb %ymm14, %ymm0, %ymm0
+ vpshufb %ymm14, %ymm1, %ymm1
+ vpshufb %ymm14, %ymm2, %ymm2
+ vpshufb %ymm14, %ymm3, %ymm3
+ vpshufb %ymm14, %ymm4, %ymm4
+ vpshufb %ymm14, %ymm5, %ymm5
+ vpshufb %ymm14, %ymm6, %ymm6
+ vpshufb %ymm14, %ymm7, %ymm7
+ vpermd %ymm0, %ymm15, %ymm0
+ vpermd %ymm1, %ymm15, %ymm1
+ vpermd %ymm2, %ymm15, %ymm2
+ vpermd %ymm3, %ymm15, %ymm3
+ vpermd %ymm4, %ymm15, %ymm4
+ vpermd %ymm5, %ymm15, %ymm5
+ vpermd %ymm6, %ymm15, %ymm6
+ vpermd %ymm7, %ymm15, %ymm7
+ vpermq $2, %ymm6, %ymm8
+ vpermq $0x90, %ymm7, %ymm7
+ vpermq $9, %ymm5, %ymm9
+ vpermq $0x40, %ymm6, %ymm6
+ vpermq $0x00, %ymm5, %ymm5
+ vpblendd $63, %ymm4, %ymm5, %ymm5
+ vpermq $2, %ymm2, %ymm10
+ vpermq $0x90, %ymm3, %ymm4
+ vpermq $9, %ymm1, %ymm11
+ vpermq $0x40, %ymm2, %ymm3
+ vpermq $0x00, %ymm1, %ymm2
+ vpblendd $63, %ymm0, %ymm2, %ymm2
+ vpblendd $3, %ymm8, %ymm7, %ymm7
+ vpblendd $15, %ymm9, %ymm6, %ymm6
+ vpblendd $3, %ymm10, %ymm4, %ymm4
+ vpblendd $15, %ymm11, %ymm3, %ymm3
+ vmovdqu %ymm2, 192(%rdi)
+ vmovdqu %ymm3, 224(%rdi)
+ vmovdqu %ymm4, 256(%rdi)
+ vmovdqu %ymm5, 288(%rdi)
+ vmovdqu %ymm6, 320(%rdi)
+ vmovdqu %ymm7, 352(%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_to_bytes_avx2,.-kyber_to_bytes_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_cmp_avx2
+.type kyber_cmp_avx2,@function
+.align 16
+kyber_cmp_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_cmp_avx2
+.p2align 4
+_kyber_cmp_avx2:
+#endif /* __APPLE__ */
+ vpxor %ymm2, %ymm2, %ymm2
+ vpxor %ymm3, %ymm3, %ymm3
+ movl $0x00, %ecx
+ movl $-1, %r8d
+ vmovdqu (%rdi), %ymm0
+ vmovdqu 32(%rdi), %ymm1
+ vpxor (%rsi), %ymm0, %ymm0
+ vpxor 32(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 64(%rdi), %ymm0
+ vmovdqu 96(%rdi), %ymm1
+ vpxor 64(%rsi), %ymm0, %ymm0
+ vpxor 96(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 128(%rdi), %ymm0
+ vmovdqu 160(%rdi), %ymm1
+ vpxor 128(%rsi), %ymm0, %ymm0
+ vpxor 160(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 192(%rdi), %ymm0
+ vmovdqu 224(%rdi), %ymm1
+ vpxor 192(%rsi), %ymm0, %ymm0
+ vpxor 224(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 256(%rdi), %ymm0
+ vmovdqu 288(%rdi), %ymm1
+ vpxor 256(%rsi), %ymm0, %ymm0
+ vpxor 288(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 320(%rdi), %ymm0
+ vmovdqu 352(%rdi), %ymm1
+ vpxor 320(%rsi), %ymm0, %ymm0
+ vpxor 352(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 384(%rdi), %ymm0
+ vmovdqu 416(%rdi), %ymm1
+ vpxor 384(%rsi), %ymm0, %ymm0
+ vpxor 416(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 448(%rdi), %ymm0
+ vmovdqu 480(%rdi), %ymm1
+ vpxor 448(%rsi), %ymm0, %ymm0
+ vpxor 480(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 512(%rdi), %ymm0
+ vmovdqu 544(%rdi), %ymm1
+ vpxor 512(%rsi), %ymm0, %ymm0
+ vpxor 544(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 576(%rdi), %ymm0
+ vmovdqu 608(%rdi), %ymm1
+ vpxor 576(%rsi), %ymm0, %ymm0
+ vpxor 608(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 640(%rdi), %ymm0
+ vmovdqu 672(%rdi), %ymm1
+ vpxor 640(%rsi), %ymm0, %ymm0
+ vpxor 672(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 704(%rdi), %ymm0
+ vmovdqu 736(%rdi), %ymm1
+ vpxor 704(%rsi), %ymm0, %ymm0
+ vpxor 736(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ subl $0x300, %edx
+ jz L_kyber_cmp_avx2_done
+ vmovdqu 768(%rdi), %ymm0
+ vmovdqu 800(%rdi), %ymm1
+ vpxor 768(%rsi), %ymm0, %ymm0
+ vpxor 800(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 832(%rdi), %ymm0
+ vmovdqu 864(%rdi), %ymm1
+ vpxor 832(%rsi), %ymm0, %ymm0
+ vpxor 864(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 896(%rdi), %ymm0
+ vmovdqu 928(%rdi), %ymm1
+ vpxor 896(%rsi), %ymm0, %ymm0
+ vpxor 928(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 960(%rdi), %ymm0
+ vmovdqu 992(%rdi), %ymm1
+ vpxor 960(%rsi), %ymm0, %ymm0
+ vpxor 992(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1024(%rdi), %ymm0
+ vmovdqu 1056(%rdi), %ymm1
+ vpxor 1024(%rsi), %ymm0, %ymm0
+ vpxor 1056(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ subl $0x140, %edx
+ jz L_kyber_cmp_avx2_done
+ vmovdqu 1088(%rdi), %ymm0
+ vmovdqu 1120(%rdi), %ymm1
+ vpxor 1088(%rsi), %ymm0, %ymm0
+ vpxor 1120(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1152(%rdi), %ymm0
+ vmovdqu 1184(%rdi), %ymm1
+ vpxor 1152(%rsi), %ymm0, %ymm0
+ vpxor 1184(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1216(%rdi), %ymm0
+ vmovdqu 1248(%rdi), %ymm1
+ vpxor 1216(%rsi), %ymm0, %ymm0
+ vpxor 1248(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1280(%rdi), %ymm0
+ vmovdqu 1312(%rdi), %ymm1
+ vpxor 1280(%rsi), %ymm0, %ymm0
+ vpxor 1312(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1344(%rdi), %ymm0
+ vmovdqu 1376(%rdi), %ymm1
+ vpxor 1344(%rsi), %ymm0, %ymm0
+ vpxor 1376(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1408(%rdi), %ymm0
+ vmovdqu 1440(%rdi), %ymm1
+ vpxor 1408(%rsi), %ymm0, %ymm0
+ vpxor 1440(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+ vmovdqu 1472(%rdi), %ymm0
+ vmovdqu 1504(%rdi), %ymm1
+ vpxor 1472(%rsi), %ymm0, %ymm0
+ vpxor 1504(%rsi), %ymm1, %ymm1
+ vpor %ymm0, %ymm2, %ymm2
+ vpor %ymm1, %ymm3, %ymm3
+L_kyber_cmp_avx2_done:
+ vpor %ymm3, %ymm2, %ymm2
+ vptest %ymm2, %ymm2
+ cmovzl %ecx, %eax
+ cmovnzl %r8d, %eax
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_cmp_avx2,.-kyber_cmp_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_redistribute_21_rand_avx2
+.type kyber_redistribute_21_rand_avx2,@function
+.align 16
+kyber_redistribute_21_rand_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_redistribute_21_rand_avx2
+.p2align 4
+_kyber_redistribute_21_rand_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rdi), %ymm0
+ vmovdqu 32(%rdi), %ymm1
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vmovdqu 192(%rdi), %ymm6
+ vmovdqu 224(%rdi), %ymm7
+ vmovdqu 256(%rdi), %ymm8
+ vmovdqu 288(%rdi), %ymm9
+ vmovdqu 320(%rdi), %ymm10
+ vmovdqu 352(%rdi), %ymm11
+ vpunpcklqdq %ymm1, %ymm0, %ymm12
+ vpunpckhqdq %ymm1, %ymm0, %ymm13
+ vpunpcklqdq %ymm3, %ymm2, %ymm14
+ vpunpckhqdq %ymm3, %ymm2, %ymm15
+ vperm2i128 $32, %ymm14, %ymm12, %ymm0
+ vperm2i128 $32, %ymm15, %ymm13, %ymm1
+ vperm2i128 $49, %ymm14, %ymm12, %ymm2
+ vperm2i128 $49, %ymm15, %ymm13, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm12
+ vpunpckhqdq %ymm5, %ymm4, %ymm13
+ vpunpcklqdq %ymm7, %ymm6, %ymm14
+ vpunpckhqdq %ymm7, %ymm6, %ymm15
+ vperm2i128 $32, %ymm14, %ymm12, %ymm4
+ vperm2i128 $32, %ymm15, %ymm13, %ymm5
+ vperm2i128 $49, %ymm14, %ymm12, %ymm6
+ vperm2i128 $49, %ymm15, %ymm13, %ymm7
+ vpunpcklqdq %ymm9, %ymm8, %ymm12
+ vpunpckhqdq %ymm9, %ymm8, %ymm13
+ vpunpcklqdq %ymm11, %ymm10, %ymm14
+ vpunpckhqdq %ymm11, %ymm10, %ymm15
+ vperm2i128 $32, %ymm14, %ymm12, %ymm8
+ vperm2i128 $32, %ymm15, %ymm13, %ymm9
+ vperm2i128 $49, %ymm14, %ymm12, %ymm10
+ vperm2i128 $49, %ymm15, %ymm13, %ymm11
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm4, 32(%rsi)
+ vmovdqu %ymm8, 64(%rsi)
+ vmovdqu %ymm1, (%rdx)
+ vmovdqu %ymm5, 32(%rdx)
+ vmovdqu %ymm9, 64(%rdx)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm6, 32(%rcx)
+ vmovdqu %ymm10, 64(%rcx)
+ vmovdqu %ymm3, (%r8)
+ vmovdqu %ymm7, 32(%r8)
+ vmovdqu %ymm11, 64(%r8)
+ vmovdqu 384(%rdi), %ymm0
+ vmovdqu 416(%rdi), %ymm1
+ vmovdqu 448(%rdi), %ymm2
+ vmovdqu 480(%rdi), %ymm3
+ vmovdqu 512(%rdi), %ymm4
+ vmovdqu 544(%rdi), %ymm5
+ vmovdqu 576(%rdi), %ymm6
+ vmovdqu 608(%rdi), %ymm7
+ movq 640(%rdi), %rax
+ movq 648(%rdi), %r9
+ movq 656(%rdi), %r10
+ movq 664(%rdi), %r11
+ vpunpcklqdq %ymm1, %ymm0, %ymm12
+ vpunpckhqdq %ymm1, %ymm0, %ymm13
+ vpunpcklqdq %ymm3, %ymm2, %ymm14
+ vpunpckhqdq %ymm3, %ymm2, %ymm15
+ vperm2i128 $32, %ymm14, %ymm12, %ymm0
+ vperm2i128 $32, %ymm15, %ymm13, %ymm1
+ vperm2i128 $49, %ymm14, %ymm12, %ymm2
+ vperm2i128 $49, %ymm15, %ymm13, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm12
+ vpunpckhqdq %ymm5, %ymm4, %ymm13
+ vpunpcklqdq %ymm7, %ymm6, %ymm14
+ vpunpckhqdq %ymm7, %ymm6, %ymm15
+ vperm2i128 $32, %ymm14, %ymm12, %ymm4
+ vperm2i128 $32, %ymm15, %ymm13, %ymm5
+ vperm2i128 $49, %ymm14, %ymm12, %ymm6
+ vperm2i128 $49, %ymm15, %ymm13, %ymm7
+ vmovdqu %ymm0, 96(%rsi)
+ vmovdqu %ymm4, 128(%rsi)
+ movq %rax, 160(%rsi)
+ vmovdqu %ymm1, 96(%rdx)
+ vmovdqu %ymm5, 128(%rdx)
+ movq %r9, 160(%rdx)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm6, 128(%rcx)
+ movq %r10, 160(%rcx)
+ vmovdqu %ymm3, 96(%r8)
+ vmovdqu %ymm7, 128(%r8)
+ movq %r11, 160(%r8)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_redistribute_21_rand_avx2,.-kyber_redistribute_21_rand_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_redistribute_17_rand_avx2
+.type kyber_redistribute_17_rand_avx2,@function
+.align 16
+kyber_redistribute_17_rand_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_redistribute_17_rand_avx2
+.p2align 4
+_kyber_redistribute_17_rand_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rdi), %ymm0
+ vmovdqu 32(%rdi), %ymm1
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vmovdqu 192(%rdi), %ymm6
+ vmovdqu 224(%rdi), %ymm7
+ vpunpcklqdq %ymm1, %ymm0, %ymm8
+ vpunpckhqdq %ymm1, %ymm0, %ymm9
+ vpunpcklqdq %ymm3, %ymm2, %ymm10
+ vpunpckhqdq %ymm3, %ymm2, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm0
+ vperm2i128 $32, %ymm11, %ymm9, %ymm1
+ vperm2i128 $49, %ymm10, %ymm8, %ymm2
+ vperm2i128 $49, %ymm11, %ymm9, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm8
+ vpunpckhqdq %ymm5, %ymm4, %ymm9
+ vpunpcklqdq %ymm7, %ymm6, %ymm10
+ vpunpckhqdq %ymm7, %ymm6, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm4
+ vperm2i128 $32, %ymm11, %ymm9, %ymm5
+ vperm2i128 $49, %ymm10, %ymm8, %ymm6
+ vperm2i128 $49, %ymm11, %ymm9, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm4, 32(%rsi)
+ vmovdqu %ymm1, (%rdx)
+ vmovdqu %ymm5, 32(%rdx)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm6, 32(%rcx)
+ vmovdqu %ymm3, (%r8)
+ vmovdqu %ymm7, 32(%r8)
+ vmovdqu 256(%rdi), %ymm0
+ vmovdqu 288(%rdi), %ymm1
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vmovdqu 384(%rdi), %ymm4
+ vmovdqu 416(%rdi), %ymm5
+ vmovdqu 448(%rdi), %ymm6
+ vmovdqu 480(%rdi), %ymm7
+ movq 512(%rdi), %rax
+ movq 520(%rdi), %r9
+ movq 528(%rdi), %r10
+ movq 536(%rdi), %r11
+ vpunpcklqdq %ymm1, %ymm0, %ymm8
+ vpunpckhqdq %ymm1, %ymm0, %ymm9
+ vpunpcklqdq %ymm3, %ymm2, %ymm10
+ vpunpckhqdq %ymm3, %ymm2, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm0
+ vperm2i128 $32, %ymm11, %ymm9, %ymm1
+ vperm2i128 $49, %ymm10, %ymm8, %ymm2
+ vperm2i128 $49, %ymm11, %ymm9, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm8
+ vpunpckhqdq %ymm5, %ymm4, %ymm9
+ vpunpcklqdq %ymm7, %ymm6, %ymm10
+ vpunpckhqdq %ymm7, %ymm6, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm4
+ vperm2i128 $32, %ymm11, %ymm9, %ymm5
+ vperm2i128 $49, %ymm10, %ymm8, %ymm6
+ vperm2i128 $49, %ymm11, %ymm9, %ymm7
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm4, 96(%rsi)
+ movq %rax, 128(%rsi)
+ vmovdqu %ymm1, 64(%rdx)
+ vmovdqu %ymm5, 96(%rdx)
+ movq %r9, 128(%rdx)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm6, 96(%rcx)
+ movq %r10, 128(%rcx)
+ vmovdqu %ymm3, 64(%r8)
+ vmovdqu %ymm7, 96(%r8)
+ movq %r11, 128(%r8)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_redistribute_17_rand_avx2,.-kyber_redistribute_17_rand_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_redistribute_16_rand_avx2
+.type kyber_redistribute_16_rand_avx2,@function
+.align 16
+kyber_redistribute_16_rand_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_redistribute_16_rand_avx2
+.p2align 4
+_kyber_redistribute_16_rand_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rdi), %ymm0
+ vmovdqu 32(%rdi), %ymm1
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vmovdqu 192(%rdi), %ymm6
+ vmovdqu 224(%rdi), %ymm7
+ vpunpcklqdq %ymm1, %ymm0, %ymm8
+ vpunpckhqdq %ymm1, %ymm0, %ymm9
+ vpunpcklqdq %ymm3, %ymm2, %ymm10
+ vpunpckhqdq %ymm3, %ymm2, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm0
+ vperm2i128 $32, %ymm11, %ymm9, %ymm1
+ vperm2i128 $49, %ymm10, %ymm8, %ymm2
+ vperm2i128 $49, %ymm11, %ymm9, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm8
+ vpunpckhqdq %ymm5, %ymm4, %ymm9
+ vpunpcklqdq %ymm7, %ymm6, %ymm10
+ vpunpckhqdq %ymm7, %ymm6, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm4
+ vperm2i128 $32, %ymm11, %ymm9, %ymm5
+ vperm2i128 $49, %ymm10, %ymm8, %ymm6
+ vperm2i128 $49, %ymm11, %ymm9, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm4, 32(%rsi)
+ vmovdqu %ymm1, (%rdx)
+ vmovdqu %ymm5, 32(%rdx)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm6, 32(%rcx)
+ vmovdqu %ymm3, (%r8)
+ vmovdqu %ymm7, 32(%r8)
+ vmovdqu 256(%rdi), %ymm0
+ vmovdqu 288(%rdi), %ymm1
+ vmovdqu 320(%rdi), %ymm2
+ vmovdqu 352(%rdi), %ymm3
+ vmovdqu 384(%rdi), %ymm4
+ vmovdqu 416(%rdi), %ymm5
+ vmovdqu 448(%rdi), %ymm6
+ vmovdqu 480(%rdi), %ymm7
+ vpunpcklqdq %ymm1, %ymm0, %ymm8
+ vpunpckhqdq %ymm1, %ymm0, %ymm9
+ vpunpcklqdq %ymm3, %ymm2, %ymm10
+ vpunpckhqdq %ymm3, %ymm2, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm0
+ vperm2i128 $32, %ymm11, %ymm9, %ymm1
+ vperm2i128 $49, %ymm10, %ymm8, %ymm2
+ vperm2i128 $49, %ymm11, %ymm9, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm8
+ vpunpckhqdq %ymm5, %ymm4, %ymm9
+ vpunpcklqdq %ymm7, %ymm6, %ymm10
+ vpunpckhqdq %ymm7, %ymm6, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm4
+ vperm2i128 $32, %ymm11, %ymm9, %ymm5
+ vperm2i128 $49, %ymm10, %ymm8, %ymm6
+ vperm2i128 $49, %ymm11, %ymm9, %ymm7
+ vmovdqu %ymm0, 64(%rsi)
+ vmovdqu %ymm4, 96(%rsi)
+ vmovdqu %ymm1, 64(%rdx)
+ vmovdqu %ymm5, 96(%rdx)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm6, 96(%rcx)
+ vmovdqu %ymm3, 64(%r8)
+ vmovdqu %ymm7, 96(%r8)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_redistribute_16_rand_avx2,.-kyber_redistribute_16_rand_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.text
+.globl kyber_redistribute_8_rand_avx2
+.type kyber_redistribute_8_rand_avx2,@function
+.align 16
+kyber_redistribute_8_rand_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_redistribute_8_rand_avx2
+.p2align 4
+_kyber_redistribute_8_rand_avx2:
+#endif /* __APPLE__ */
+ vmovdqu (%rdi), %ymm0
+ vmovdqu 32(%rdi), %ymm1
+ vmovdqu 64(%rdi), %ymm2
+ vmovdqu 96(%rdi), %ymm3
+ vmovdqu 128(%rdi), %ymm4
+ vmovdqu 160(%rdi), %ymm5
+ vmovdqu 192(%rdi), %ymm6
+ vmovdqu 224(%rdi), %ymm7
+ vpunpcklqdq %ymm1, %ymm0, %ymm8
+ vpunpckhqdq %ymm1, %ymm0, %ymm9
+ vpunpcklqdq %ymm3, %ymm2, %ymm10
+ vpunpckhqdq %ymm3, %ymm2, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm0
+ vperm2i128 $32, %ymm11, %ymm9, %ymm1
+ vperm2i128 $49, %ymm10, %ymm8, %ymm2
+ vperm2i128 $49, %ymm11, %ymm9, %ymm3
+ vpunpcklqdq %ymm5, %ymm4, %ymm8
+ vpunpckhqdq %ymm5, %ymm4, %ymm9
+ vpunpcklqdq %ymm7, %ymm6, %ymm10
+ vpunpckhqdq %ymm7, %ymm6, %ymm11
+ vperm2i128 $32, %ymm10, %ymm8, %ymm4
+ vperm2i128 $32, %ymm11, %ymm9, %ymm5
+ vperm2i128 $49, %ymm10, %ymm8, %ymm6
+ vperm2i128 $49, %ymm11, %ymm9, %ymm7
+ vmovdqu %ymm0, (%rsi)
+ vmovdqu %ymm4, 32(%rsi)
+ vmovdqu %ymm1, (%rdx)
+ vmovdqu %ymm5, 32(%rdx)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm6, 32(%rcx)
+ vmovdqu %ymm3, (%r8)
+ vmovdqu %ymm7, 32(%r8)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_redistribute_8_rand_avx2,.-kyber_redistribute_8_rand_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 16
+#else
+.p2align 4
+#endif /* __APPLE__ */
+L_sha3_parallel_4_r:
+.quad 0x1,0x1
+.quad 0x1,0x1
+.quad 0x8082,0x8082
+.quad 0x8082,0x8082
+.quad 0x800000000000808a,0x800000000000808a
+.quad 0x800000000000808a,0x800000000000808a
+.quad 0x8000000080008000,0x8000000080008000
+.quad 0x8000000080008000,0x8000000080008000
+.quad 0x808b,0x808b
+.quad 0x808b,0x808b
+.quad 0x80000001,0x80000001
+.quad 0x80000001,0x80000001
+.quad 0x8000000080008081,0x8000000080008081
+.quad 0x8000000080008081,0x8000000080008081
+.quad 0x8000000000008009,0x8000000000008009
+.quad 0x8000000000008009,0x8000000000008009
+.quad 0x8a,0x8a
+.quad 0x8a,0x8a
+.quad 0x88,0x88
+.quad 0x88,0x88
+.quad 0x80008009,0x80008009
+.quad 0x80008009,0x80008009
+.quad 0x8000000a,0x8000000a
+.quad 0x8000000a,0x8000000a
+.quad 0x8000808b,0x8000808b
+.quad 0x8000808b,0x8000808b
+.quad 0x800000000000008b,0x800000000000008b
+.quad 0x800000000000008b,0x800000000000008b
+.quad 0x8000000000008089,0x8000000000008089
+.quad 0x8000000000008089,0x8000000000008089
+.quad 0x8000000000008003,0x8000000000008003
+.quad 0x8000000000008003,0x8000000000008003
+.quad 0x8000000000008002,0x8000000000008002
+.quad 0x8000000000008002,0x8000000000008002
+.quad 0x8000000000000080,0x8000000000000080
+.quad 0x8000000000000080,0x8000000000000080
+.quad 0x800a,0x800a
+.quad 0x800a,0x800a
+.quad 0x800000008000000a,0x800000008000000a
+.quad 0x800000008000000a,0x800000008000000a
+.quad 0x8000000080008081,0x8000000080008081
+.quad 0x8000000080008081,0x8000000080008081
+.quad 0x8000000000008080,0x8000000000008080
+.quad 0x8000000000008080,0x8000000000008080
+.quad 0x80000001,0x80000001
+.quad 0x80000001,0x80000001
+.quad 0x8000000080008008,0x8000000080008008
+.quad 0x8000000080008008,0x8000000080008008
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_sha3_128_blockx4_seed_avx2_end_mark:
+.quad 0x8000000000000000, 0x8000000000000000
+.quad 0x8000000000000000, 0x8000000000000000
+#ifndef __APPLE__
+.text
+.globl kyber_sha3_128_blocksx4_seed_avx2
+.type kyber_sha3_128_blocksx4_seed_avx2,@function
+.align 16
+kyber_sha3_128_blocksx4_seed_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_sha3_128_blocksx4_seed_avx2
+.p2align 4
+_kyber_sha3_128_blocksx4_seed_avx2:
+#endif /* __APPLE__ */
+ leaq L_sha3_parallel_4_r(%rip), %rdx
+ movq %rdi, %rax
+ movq %rdi, %rcx
+ vpbroadcastq (%rsi), %ymm15
+ addq $0x80, %rdi
+ vpbroadcastq 8(%rsi), %ymm11
+ addq $0x180, %rax
+ vpbroadcastq 16(%rsi), %ymm12
+ addq $0x280, %rcx
+ vpbroadcastq 24(%rsi), %ymm13
+ vmovdqu L_sha3_128_blockx4_seed_avx2_end_mark(%rip), %ymm5
+ vpxor %ymm6, %ymm6, %ymm6
+ vmovdqu %ymm11, -96(%rdi)
+ vmovdqu %ymm12, -64(%rdi)
+ vmovdqu %ymm13, -32(%rdi)
+ vmovdqu (%rdi), %ymm14
+ vmovdqu %ymm6, 32(%rdi)
+ vmovdqu %ymm6, 64(%rdi)
+ vmovdqu %ymm6, 96(%rdi)
+ vmovdqu %ymm6, 128(%rdi)
+ vmovdqu %ymm6, -96(%rax)
+ vmovdqu %ymm6, -64(%rax)
+ vmovdqu %ymm6, -32(%rax)
+ vmovdqu %ymm6, (%rax)
+ vmovdqu %ymm6, 32(%rax)
+ vmovdqu %ymm6, 64(%rax)
+ vmovdqu %ymm6, 96(%rax)
+ vmovdqu %ymm6, 128(%rax)
+ vmovdqu %ymm6, -96(%rcx)
+ vmovdqu %ymm6, -64(%rcx)
+ vmovdqu %ymm6, -32(%rcx)
+ vmovdqu %ymm5, (%rcx)
+ vmovdqu %ymm6, 32(%rcx)
+ vmovdqu %ymm6, 64(%rcx)
+ vmovdqu %ymm6, 96(%rcx)
+ vmovdqu %ymm6, 128(%rcx)
+ vpxor %ymm5, %ymm15, %ymm10
+ # Round 0
+ # Calc b[0..4]
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 64(%rdi), %ymm6, %ymm11
+ vpxor (%rax), %ymm7, %ymm12
+ vpxor -64(%rcx), %ymm8, %ymm13
+ vpxor 128(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor (%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 1
+ vpxor -32(%rdi), %ymm8, %ymm10
+ vpxor -96(%rax), %ymm9, %ymm11
+ vpxor -64(%rax), %ymm5, %ymm12
+ vpxor 128(%rax), %ymm6, %ymm13
+ vpxor 64(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 2
+ vpxor -96(%rdi), %ymm6, %ymm10
+ vpxor 96(%rdi), %ymm7, %ymm11
+ vpxor 32(%rax), %ymm8, %ymm12
+ vpxor -32(%rcx), %ymm9, %ymm13
+ vpxor (%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, (%rcx)
+ # Row 3
+ vpxor (%rdi), %ymm9, %ymm10
+ vpxor 32(%rdi), %ymm5, %ymm11
+ vpxor -32(%rax), %ymm6, %ymm12
+ vpxor -96(%rcx), %ymm7, %ymm13
+ vpxor 96(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 4
+ vpxor -64(%rdi), %ymm7, %ymm10
+ vpxor 128(%rdi), %ymm8, %ymm11
+ vpxor 64(%rax), %ymm9, %ymm12
+ vpxor 96(%rax), %ymm5, %ymm13
+ vpxor 32(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, 32(%rcx)
+ # Round 1
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm10, %ymm10
+ vpxor -32(%rdi), %ymm10, %ymm10
+ vpxor (%rdi), %ymm10, %ymm10
+ vpxor 32(%rdi), %ymm1, %ymm11
+ vpxor 64(%rdi), %ymm11, %ymm11
+ vpxor 96(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm2, %ymm12
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm12, %ymm12
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm3, %ymm13
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -64(%rcx), %ymm13, %ymm13
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm4, %ymm14
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm14, %ymm14
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -96(%rax), %ymm6, %ymm11
+ vpxor 32(%rax), %ymm7, %ymm12
+ vpxor -96(%rcx), %ymm8, %ymm13
+ vpxor 32(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 32(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 1
+ vpxor -64(%rcx), %ymm8, %ymm10
+ vpxor 64(%rcx), %ymm9, %ymm11
+ vpxor -96(%rdi), %ymm5, %ymm12
+ vpxor 32(%rdi), %ymm6, %ymm13
+ vpxor 64(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 2
+ vpxor 64(%rdi), %ymm6, %ymm10
+ vpxor -64(%rax), %ymm7, %ymm11
+ vpxor -32(%rcx), %ymm8, %ymm12
+ vpxor 96(%rcx), %ymm9, %ymm13
+ vpxor -64(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 3
+ vpxor 128(%rcx), %ymm9, %ymm10
+ vpxor -32(%rdi), %ymm5, %ymm11
+ vpxor 96(%rdi), %ymm6, %ymm12
+ vpxor -32(%rax), %ymm7, %ymm13
+ vpxor 96(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 4
+ vpxor (%rax), %ymm7, %ymm10
+ vpxor 128(%rax), %ymm8, %ymm11
+ vpxor (%rcx), %ymm9, %ymm12
+ vpxor (%rdi), %ymm5, %ymm13
+ vpxor 128(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, 128(%rdi)
+ # Round 2
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm3, %ymm13
+ vpxor 64(%rdi), %ymm10, %ymm10
+ vpxor 96(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm11, %ymm11
+ vpxor -32(%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 64(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -64(%rcx), %ymm10, %ymm10
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 64(%rcx), %ymm6, %ymm11
+ vpxor -32(%rcx), %ymm7, %ymm12
+ vpxor -32(%rax), %ymm8, %ymm13
+ vpxor 128(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 64(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 1
+ vpxor -96(%rcx), %ymm8, %ymm10
+ vpxor 64(%rax), %ymm9, %ymm11
+ vpxor 64(%rdi), %ymm5, %ymm12
+ vpxor -32(%rdi), %ymm6, %ymm13
+ vpxor (%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, (%rcx)
+ # Row 2
+ vpxor -96(%rax), %ymm6, %ymm10
+ vpxor -96(%rdi), %ymm7, %ymm11
+ vpxor 96(%rcx), %ymm8, %ymm12
+ vpxor 96(%rax), %ymm9, %ymm13
+ vpxor (%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, (%rax)
+ # Row 3
+ vpxor 32(%rcx), %ymm9, %ymm10
+ vpxor -64(%rcx), %ymm5, %ymm11
+ vpxor -64(%rax), %ymm6, %ymm12
+ vpxor 96(%rdi), %ymm7, %ymm13
+ vpxor (%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, (%rdi)
+ # Row 4
+ vpxor 32(%rax), %ymm7, %ymm10
+ vpxor 32(%rdi), %ymm8, %ymm11
+ vpxor -64(%rdi), %ymm9, %ymm12
+ vpxor 128(%rcx), %ymm5, %ymm13
+ vpxor 128(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, 128(%rax)
+ # Round 3
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm3, %ymm13
+ vpxor (%rdi), %ymm4, %ymm14
+ vpxor 64(%rdi), %ymm2, %ymm12
+ vpxor 96(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm14, %ymm14
+ vpxor -96(%rax), %ymm10, %ymm10
+ vpxor -64(%rax), %ymm12, %ymm12
+ vpxor -32(%rax), %ymm13, %ymm13
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm10, %ymm10
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm14, %ymm14
+ vpxor 32(%rcx), %ymm10, %ymm10
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 64(%rax), %ymm6, %ymm11
+ vpxor 96(%rcx), %ymm7, %ymm12
+ vpxor 96(%rdi), %ymm8, %ymm13
+ vpxor 128(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 96(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 1
+ vpxor -32(%rax), %ymm8, %ymm10
+ vpxor (%rcx), %ymm9, %ymm11
+ vpxor -96(%rax), %ymm5, %ymm12
+ vpxor -64(%rcx), %ymm6, %ymm13
+ vpxor -64(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 2
+ vpxor 64(%rcx), %ymm6, %ymm10
+ vpxor 64(%rdi), %ymm7, %ymm11
+ vpxor 96(%rax), %ymm8, %ymm12
+ vpxor (%rdi), %ymm9, %ymm13
+ vpxor 32(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 3
+ vpxor 128(%rdi), %ymm9, %ymm10
+ vpxor -96(%rcx), %ymm5, %ymm11
+ vpxor -96(%rdi), %ymm6, %ymm12
+ vpxor -64(%rax), %ymm7, %ymm13
+ vpxor 128(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 4
+ vpxor -32(%rcx), %ymm7, %ymm10
+ vpxor -32(%rdi), %ymm8, %ymm11
+ vpxor (%rax), %ymm9, %ymm12
+ vpxor 32(%rcx), %ymm5, %ymm13
+ vpxor 32(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 32(%rdi)
+ # Round 4
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 64(%rdi), %ymm1, %ymm11
+ vpxor 96(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm10, %ymm10
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor -32(%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm11, %ymm11
+ vpxor 64(%rcx), %ymm10, %ymm10
+ vpxor 96(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor (%rcx), %ymm6, %ymm11
+ vpxor 96(%rax), %ymm7, %ymm12
+ vpxor -64(%rax), %ymm8, %ymm13
+ vpxor 32(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 128(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 1
+ vpxor 96(%rdi), %ymm8, %ymm10
+ vpxor -64(%rdi), %ymm9, %ymm11
+ vpxor 64(%rcx), %ymm5, %ymm12
+ vpxor -96(%rcx), %ymm6, %ymm13
+ vpxor (%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, (%rax)
+ # Row 2
+ vpxor 64(%rax), %ymm6, %ymm10
+ vpxor -96(%rax), %ymm7, %ymm11
+ vpxor (%rdi), %ymm8, %ymm12
+ vpxor 128(%rcx), %ymm9, %ymm13
+ vpxor -32(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 3
+ vpxor 128(%rax), %ymm9, %ymm10
+ vpxor -32(%rax), %ymm5, %ymm11
+ vpxor 64(%rdi), %ymm6, %ymm12
+ vpxor -96(%rdi), %ymm7, %ymm13
+ vpxor 32(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 4
+ vpxor 96(%rcx), %ymm7, %ymm10
+ vpxor -64(%rcx), %ymm8, %ymm11
+ vpxor 32(%rax), %ymm9, %ymm12
+ vpxor 128(%rdi), %ymm5, %ymm13
+ vpxor -32(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, -32(%rdi)
+ # Round 5
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm4, %ymm14
+ vpxor 64(%rdi), %ymm12, %ymm12
+ vpxor 96(%rdi), %ymm10, %ymm10
+ vpxor -96(%rax), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor -32(%rax), %ymm11, %ymm11
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm10, %ymm10
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -32(%rcx), %ymm14, %ymm14
+ vpxor (%rcx), %ymm11, %ymm11
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -64(%rdi), %ymm6, %ymm11
+ vpxor (%rdi), %ymm7, %ymm12
+ vpxor -96(%rdi), %ymm8, %ymm13
+ vpxor -32(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 160(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 1
+ vpxor -64(%rax), %ymm8, %ymm10
+ vpxor (%rax), %ymm9, %ymm11
+ vpxor 64(%rax), %ymm5, %ymm12
+ vpxor -32(%rax), %ymm6, %ymm13
+ vpxor 32(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 2
+ vpxor (%rcx), %ymm6, %ymm10
+ vpxor 64(%rcx), %ymm7, %ymm11
+ vpxor 128(%rcx), %ymm8, %ymm12
+ vpxor 32(%rcx), %ymm9, %ymm13
+ vpxor 96(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 3
+ vpxor 32(%rdi), %ymm9, %ymm10
+ vpxor 96(%rdi), %ymm5, %ymm11
+ vpxor -96(%rax), %ymm6, %ymm12
+ vpxor 64(%rdi), %ymm7, %ymm13
+ vpxor 128(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 4
+ vpxor 96(%rax), %ymm7, %ymm10
+ vpxor -96(%rcx), %ymm8, %ymm11
+ vpxor -32(%rcx), %ymm9, %ymm12
+ vpxor 128(%rax), %ymm5, %ymm13
+ vpxor -64(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, -64(%rcx)
+ # Round 6
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm10, %ymm10
+ vpxor 64(%rdi), %ymm13, %ymm13
+ vpxor 96(%rdi), %ymm11, %ymm11
+ vpxor 128(%rdi), %ymm14, %ymm14
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -64(%rax), %ymm10, %ymm10
+ vpxor -32(%rax), %ymm13, %ymm13
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor (%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm14, %ymm14
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor (%rax), %ymm6, %ymm11
+ vpxor 128(%rcx), %ymm7, %ymm12
+ vpxor 64(%rdi), %ymm8, %ymm13
+ vpxor -64(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 192(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 1
+ vpxor -96(%rdi), %ymm8, %ymm10
+ vpxor 32(%rax), %ymm9, %ymm11
+ vpxor (%rcx), %ymm5, %ymm12
+ vpxor 96(%rdi), %ymm6, %ymm13
+ vpxor -32(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 2
+ vpxor -64(%rdi), %ymm6, %ymm10
+ vpxor 64(%rax), %ymm7, %ymm11
+ vpxor 32(%rcx), %ymm8, %ymm12
+ vpxor 128(%rdi), %ymm9, %ymm13
+ vpxor 96(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 3
+ vpxor -32(%rdi), %ymm9, %ymm10
+ vpxor -64(%rax), %ymm5, %ymm11
+ vpxor 64(%rcx), %ymm6, %ymm12
+ vpxor -96(%rax), %ymm7, %ymm13
+ vpxor 128(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 4
+ vpxor (%rdi), %ymm7, %ymm10
+ vpxor -32(%rax), %ymm8, %ymm11
+ vpxor 96(%rcx), %ymm9, %ymm12
+ vpxor 32(%rdi), %ymm5, %ymm13
+ vpxor -96(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, -96(%rcx)
+ # Round 7
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm10, %ymm10
+ vpxor -64(%rdi), %ymm10, %ymm10
+ vpxor -32(%rdi), %ymm10, %ymm10
+ vpxor 64(%rdi), %ymm3, %ymm13
+ vpxor 96(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm13, %ymm13
+ vpxor -96(%rax), %ymm13, %ymm13
+ vpxor -64(%rax), %ymm1, %ymm11
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm4, %ymm14
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm14, %ymm14
+ vpxor (%rcx), %ymm2, %ymm12
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 32(%rax), %ymm6, %ymm11
+ vpxor 32(%rcx), %ymm7, %ymm12
+ vpxor -96(%rax), %ymm8, %ymm13
+ vpxor -96(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 224(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 1
+ vpxor 64(%rdi), %ymm8, %ymm10
+ vpxor -32(%rcx), %ymm9, %ymm11
+ vpxor -64(%rdi), %ymm5, %ymm12
+ vpxor -64(%rax), %ymm6, %ymm13
+ vpxor 96(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 2
+ vpxor (%rax), %ymm6, %ymm10
+ vpxor (%rcx), %ymm7, %ymm11
+ vpxor 128(%rdi), %ymm8, %ymm12
+ vpxor 128(%rax), %ymm9, %ymm13
+ vpxor (%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, (%rdi)
+ # Row 3
+ vpxor -64(%rcx), %ymm9, %ymm10
+ vpxor -96(%rdi), %ymm5, %ymm11
+ vpxor 64(%rax), %ymm6, %ymm12
+ vpxor 64(%rcx), %ymm7, %ymm13
+ vpxor 32(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 4
+ vpxor 128(%rcx), %ymm7, %ymm10
+ vpxor 96(%rdi), %ymm8, %ymm11
+ vpxor 96(%rax), %ymm9, %ymm12
+ vpxor -32(%rdi), %ymm5, %ymm13
+ vpxor -32(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, -32(%rax)
+ # Round 8
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm1, %ymm11
+ vpxor -64(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm4, %ymm14
+ vpxor 32(%rdi), %ymm14, %ymm14
+ vpxor 64(%rdi), %ymm10, %ymm10
+ vpxor 128(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm3, %ymm13
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor (%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm10, %ymm10
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm11, %ymm11
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -32(%rcx), %ymm6, %ymm11
+ vpxor 128(%rdi), %ymm7, %ymm12
+ vpxor 64(%rcx), %ymm8, %ymm13
+ vpxor -32(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 256(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 1
+ vpxor -96(%rax), %ymm8, %ymm10
+ vpxor 96(%rcx), %ymm9, %ymm11
+ vpxor (%rax), %ymm5, %ymm12
+ vpxor -96(%rdi), %ymm6, %ymm13
+ vpxor 96(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 2
+ vpxor 32(%rax), %ymm6, %ymm10
+ vpxor -64(%rdi), %ymm7, %ymm11
+ vpxor 128(%rax), %ymm8, %ymm12
+ vpxor 32(%rdi), %ymm9, %ymm13
+ vpxor 128(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 3
+ vpxor -96(%rcx), %ymm9, %ymm10
+ vpxor 64(%rdi), %ymm5, %ymm11
+ vpxor (%rcx), %ymm6, %ymm12
+ vpxor 64(%rax), %ymm7, %ymm13
+ vpxor -32(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 4
+ vpxor 32(%rcx), %ymm7, %ymm10
+ vpxor -64(%rax), %ymm8, %ymm11
+ vpxor (%rdi), %ymm9, %ymm12
+ vpxor -64(%rcx), %ymm5, %ymm13
+ vpxor 96(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, 96(%rdi)
+ # Round 9
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor 32(%rdi), %ymm13, %ymm13
+ vpxor 64(%rdi), %ymm11, %ymm11
+ vpxor 128(%rdi), %ymm2, %ymm12
+ vpxor -96(%rax), %ymm10, %ymm10
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm12, %ymm12
+ vpxor 32(%rax), %ymm10, %ymm10
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm14, %ymm14
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -96(%rcx), %ymm10, %ymm10
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm11, %ymm11
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 96(%rcx), %ymm6, %ymm11
+ vpxor 128(%rax), %ymm7, %ymm12
+ vpxor 64(%rax), %ymm8, %ymm13
+ vpxor 96(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 288(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 1
+ vpxor 64(%rcx), %ymm8, %ymm10
+ vpxor 96(%rax), %ymm9, %ymm11
+ vpxor 32(%rax), %ymm5, %ymm12
+ vpxor 64(%rdi), %ymm6, %ymm13
+ vpxor (%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, (%rdi)
+ # Row 2
+ vpxor -32(%rcx), %ymm6, %ymm10
+ vpxor (%rax), %ymm7, %ymm11
+ vpxor 32(%rdi), %ymm8, %ymm12
+ vpxor -32(%rdi), %ymm9, %ymm13
+ vpxor 32(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 3
+ vpxor -32(%rax), %ymm9, %ymm10
+ vpxor -96(%rax), %ymm5, %ymm11
+ vpxor -64(%rdi), %ymm6, %ymm12
+ vpxor (%rcx), %ymm7, %ymm13
+ vpxor -64(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 4
+ vpxor 128(%rdi), %ymm7, %ymm10
+ vpxor -96(%rdi), %ymm8, %ymm11
+ vpxor 128(%rcx), %ymm9, %ymm12
+ vpxor -96(%rcx), %ymm5, %ymm13
+ vpxor -64(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Round 10
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm2, %ymm12
+ vpxor -32(%rdi), %ymm3, %ymm13
+ vpxor (%rdi), %ymm4, %ymm14
+ vpxor 32(%rdi), %ymm12, %ymm12
+ vpxor 64(%rdi), %ymm13, %ymm13
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor -96(%rax), %ymm1, %ymm11
+ vpxor -32(%rax), %ymm10, %ymm10
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm11, %ymm11
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm10, %ymm10
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm10, %ymm10
+ vpxor 96(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 96(%rax), %ymm6, %ymm11
+ vpxor 32(%rdi), %ymm7, %ymm12
+ vpxor (%rcx), %ymm8, %ymm13
+ vpxor -64(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 320(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 1
+ vpxor 64(%rax), %ymm8, %ymm10
+ vpxor (%rdi), %ymm9, %ymm11
+ vpxor -32(%rcx), %ymm5, %ymm12
+ vpxor -96(%rax), %ymm6, %ymm13
+ vpxor 128(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 2
+ vpxor 96(%rcx), %ymm6, %ymm10
+ vpxor 32(%rax), %ymm7, %ymm11
+ vpxor -32(%rdi), %ymm8, %ymm12
+ vpxor -64(%rcx), %ymm9, %ymm13
+ vpxor 128(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 3
+ vpxor 96(%rdi), %ymm9, %ymm10
+ vpxor 64(%rcx), %ymm5, %ymm11
+ vpxor (%rax), %ymm6, %ymm12
+ vpxor -64(%rdi), %ymm7, %ymm13
+ vpxor -96(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 4
+ vpxor 128(%rax), %ymm7, %ymm10
+ vpxor 64(%rdi), %ymm8, %ymm11
+ vpxor 32(%rcx), %ymm9, %ymm12
+ vpxor -32(%rax), %ymm5, %ymm13
+ vpxor -96(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, -96(%rdi)
+ # Round 11
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm12, %ymm12
+ vpxor 96(%rdi), %ymm10, %ymm10
+ vpxor 128(%rdi), %ymm4, %ymm14
+ vpxor -96(%rax), %ymm13, %ymm13
+ vpxor -64(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm12, %ymm12
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm11, %ymm11
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm13, %ymm13
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm10, %ymm10
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor (%rdi), %ymm6, %ymm11
+ vpxor -32(%rdi), %ymm7, %ymm12
+ vpxor -64(%rdi), %ymm8, %ymm13
+ vpxor -96(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 352(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 1
+ vpxor (%rcx), %ymm8, %ymm10
+ vpxor 128(%rcx), %ymm9, %ymm11
+ vpxor 96(%rcx), %ymm5, %ymm12
+ vpxor 64(%rcx), %ymm6, %ymm13
+ vpxor 32(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 2
+ vpxor 96(%rax), %ymm6, %ymm10
+ vpxor -32(%rcx), %ymm7, %ymm11
+ vpxor -64(%rcx), %ymm8, %ymm12
+ vpxor -96(%rcx), %ymm9, %ymm13
+ vpxor 128(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 3
+ vpxor -64(%rax), %ymm9, %ymm10
+ vpxor 64(%rax), %ymm5, %ymm11
+ vpxor 32(%rax), %ymm6, %ymm12
+ vpxor (%rax), %ymm7, %ymm13
+ vpxor -32(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 4
+ vpxor 32(%rdi), %ymm7, %ymm10
+ vpxor -96(%rax), %ymm8, %ymm11
+ vpxor 128(%rdi), %ymm9, %ymm12
+ vpxor 96(%rdi), %ymm5, %ymm13
+ vpxor 64(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, 64(%rdi)
+ # Round 12
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor -64(%rax), %ymm10, %ymm10
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm10, %ymm10
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 128(%rcx), %ymm6, %ymm11
+ vpxor -64(%rcx), %ymm7, %ymm12
+ vpxor (%rax), %ymm8, %ymm13
+ vpxor 64(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 384(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 1
+ vpxor -64(%rdi), %ymm8, %ymm10
+ vpxor 32(%rcx), %ymm9, %ymm11
+ vpxor 96(%rax), %ymm5, %ymm12
+ vpxor 64(%rax), %ymm6, %ymm13
+ vpxor 128(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 2
+ vpxor (%rdi), %ymm6, %ymm10
+ vpxor 96(%rcx), %ymm7, %ymm11
+ vpxor -96(%rcx), %ymm8, %ymm12
+ vpxor -32(%rax), %ymm9, %ymm13
+ vpxor 32(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 3
+ vpxor -96(%rdi), %ymm9, %ymm10
+ vpxor (%rcx), %ymm5, %ymm11
+ vpxor -32(%rcx), %ymm6, %ymm12
+ vpxor 32(%rax), %ymm7, %ymm13
+ vpxor 96(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 4
+ vpxor -32(%rdi), %ymm7, %ymm10
+ vpxor 64(%rcx), %ymm8, %ymm11
+ vpxor 128(%rax), %ymm9, %ymm12
+ vpxor -64(%rax), %ymm5, %ymm13
+ vpxor -96(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, -96(%rax)
+ # Round 13
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm10, %ymm10
+ vpxor -64(%rdi), %ymm10, %ymm10
+ vpxor (%rdi), %ymm10, %ymm10
+ vpxor 32(%rdi), %ymm4, %ymm14
+ vpxor 64(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor 128(%rdi), %ymm14, %ymm14
+ vpxor -32(%rax), %ymm3, %ymm13
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm13, %ymm13
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm2, %ymm12
+ vpxor -96(%rcx), %ymm12, %ymm12
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm1, %ymm11
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm11, %ymm11
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 32(%rcx), %ymm6, %ymm11
+ vpxor -96(%rcx), %ymm7, %ymm12
+ vpxor 32(%rax), %ymm8, %ymm13
+ vpxor -96(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 416(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 1
+ vpxor (%rax), %ymm8, %ymm10
+ vpxor 128(%rdi), %ymm9, %ymm11
+ vpxor (%rdi), %ymm5, %ymm12
+ vpxor (%rcx), %ymm6, %ymm13
+ vpxor 128(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 2
+ vpxor 128(%rcx), %ymm6, %ymm10
+ vpxor 96(%rax), %ymm7, %ymm11
+ vpxor -32(%rax), %ymm8, %ymm12
+ vpxor 96(%rdi), %ymm9, %ymm13
+ vpxor -32(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 3
+ vpxor 64(%rdi), %ymm9, %ymm10
+ vpxor -64(%rdi), %ymm5, %ymm11
+ vpxor 96(%rcx), %ymm6, %ymm12
+ vpxor -32(%rcx), %ymm7, %ymm13
+ vpxor -64(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 4
+ vpxor -64(%rcx), %ymm7, %ymm10
+ vpxor 64(%rax), %ymm8, %ymm11
+ vpxor 32(%rdi), %ymm9, %ymm12
+ vpxor -96(%rdi), %ymm5, %ymm13
+ vpxor 64(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, 64(%rcx)
+ # Round 14
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 64(%rdi), %ymm10, %ymm10
+ vpxor 96(%rdi), %ymm3, %ymm13
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm14, %ymm14
+ vpxor -64(%rax), %ymm14, %ymm14
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm11, %ymm11
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 128(%rdi), %ymm6, %ymm11
+ vpxor -32(%rax), %ymm7, %ymm12
+ vpxor -32(%rcx), %ymm8, %ymm13
+ vpxor 64(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 448(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 1
+ vpxor 32(%rax), %ymm8, %ymm10
+ vpxor 128(%rax), %ymm9, %ymm11
+ vpxor 128(%rcx), %ymm5, %ymm12
+ vpxor -64(%rdi), %ymm6, %ymm13
+ vpxor 32(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 2
+ vpxor 32(%rcx), %ymm6, %ymm10
+ vpxor (%rdi), %ymm7, %ymm11
+ vpxor 96(%rdi), %ymm8, %ymm12
+ vpxor -64(%rax), %ymm9, %ymm13
+ vpxor -64(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 3
+ vpxor -96(%rax), %ymm9, %ymm10
+ vpxor (%rax), %ymm5, %ymm11
+ vpxor 96(%rax), %ymm6, %ymm12
+ vpxor 96(%rcx), %ymm7, %ymm13
+ vpxor -96(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 4
+ vpxor -96(%rcx), %ymm7, %ymm10
+ vpxor (%rcx), %ymm8, %ymm11
+ vpxor -32(%rdi), %ymm9, %ymm12
+ vpxor 64(%rdi), %ymm5, %ymm13
+ vpxor 64(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, 64(%rax)
+ # Round 15
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm2, %ymm12
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm10, %ymm10
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm10, %ymm10
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 128(%rax), %ymm6, %ymm11
+ vpxor 96(%rdi), %ymm7, %ymm12
+ vpxor 96(%rcx), %ymm8, %ymm13
+ vpxor 64(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 480(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 1
+ vpxor -32(%rcx), %ymm8, %ymm10
+ vpxor 32(%rdi), %ymm9, %ymm11
+ vpxor 32(%rcx), %ymm5, %ymm12
+ vpxor (%rax), %ymm6, %ymm13
+ vpxor -32(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 2
+ vpxor 128(%rdi), %ymm6, %ymm10
+ vpxor 128(%rcx), %ymm7, %ymm11
+ vpxor -64(%rax), %ymm8, %ymm12
+ vpxor -96(%rdi), %ymm9, %ymm13
+ vpxor -96(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 3
+ vpxor 64(%rcx), %ymm9, %ymm10
+ vpxor 32(%rax), %ymm5, %ymm11
+ vpxor (%rdi), %ymm6, %ymm12
+ vpxor 96(%rax), %ymm7, %ymm13
+ vpxor 64(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 4
+ vpxor -32(%rax), %ymm7, %ymm10
+ vpxor -64(%rdi), %ymm8, %ymm11
+ vpxor -64(%rcx), %ymm9, %ymm12
+ vpxor -96(%rax), %ymm5, %ymm13
+ vpxor (%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, (%rcx)
+ # Round 16
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm1, %ymm11
+ vpxor 64(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm12, %ymm12
+ vpxor 128(%rdi), %ymm10, %ymm10
+ vpxor -64(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor 128(%rax), %ymm11, %ymm11
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm10, %ymm10
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 32(%rdi), %ymm6, %ymm11
+ vpxor -64(%rax), %ymm7, %ymm12
+ vpxor 96(%rax), %ymm8, %ymm13
+ vpxor (%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 512(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, (%rcx)
+ # Row 1
+ vpxor 96(%rcx), %ymm8, %ymm10
+ vpxor -32(%rdi), %ymm9, %ymm11
+ vpxor 128(%rdi), %ymm5, %ymm12
+ vpxor 32(%rax), %ymm6, %ymm13
+ vpxor -64(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 2
+ vpxor 128(%rax), %ymm6, %ymm10
+ vpxor 32(%rcx), %ymm7, %ymm11
+ vpxor -96(%rdi), %ymm8, %ymm12
+ vpxor 64(%rdi), %ymm9, %ymm13
+ vpxor -32(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 3
+ vpxor 64(%rax), %ymm9, %ymm10
+ vpxor -32(%rcx), %ymm5, %ymm11
+ vpxor 128(%rcx), %ymm6, %ymm12
+ vpxor (%rdi), %ymm7, %ymm13
+ vpxor -96(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 4
+ vpxor 96(%rdi), %ymm7, %ymm10
+ vpxor (%rax), %ymm8, %ymm11
+ vpxor -96(%rcx), %ymm9, %ymm12
+ vpxor 64(%rcx), %ymm5, %ymm13
+ vpxor -64(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, -64(%rdi)
+ # Round 17
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm11, %ymm11
+ vpxor 64(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm4, %ymm14
+ vpxor -64(%rax), %ymm12, %ymm12
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor 32(%rax), %ymm13, %ymm13
+ vpxor 64(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor 128(%rax), %ymm10, %ymm10
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm14, %ymm14
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm10, %ymm10
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -32(%rdi), %ymm6, %ymm11
+ vpxor -96(%rdi), %ymm7, %ymm12
+ vpxor (%rdi), %ymm8, %ymm13
+ vpxor -64(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 544(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 1
+ vpxor 96(%rax), %ymm8, %ymm10
+ vpxor -64(%rcx), %ymm9, %ymm11
+ vpxor 128(%rax), %ymm5, %ymm12
+ vpxor -32(%rcx), %ymm6, %ymm13
+ vpxor -96(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 2
+ vpxor 32(%rdi), %ymm6, %ymm10
+ vpxor 128(%rdi), %ymm7, %ymm11
+ vpxor 64(%rdi), %ymm8, %ymm12
+ vpxor -96(%rax), %ymm9, %ymm13
+ vpxor 96(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 3
+ vpxor (%rcx), %ymm9, %ymm10
+ vpxor 96(%rcx), %ymm5, %ymm11
+ vpxor 32(%rcx), %ymm6, %ymm12
+ vpxor 128(%rcx), %ymm7, %ymm13
+ vpxor 64(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 4
+ vpxor -64(%rax), %ymm7, %ymm10
+ vpxor 32(%rax), %ymm8, %ymm11
+ vpxor -32(%rax), %ymm9, %ymm12
+ vpxor 64(%rax), %ymm5, %ymm13
+ vpxor (%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, (%rax)
+ # Round 18
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm10, %ymm10
+ vpxor 64(%rdi), %ymm12, %ymm12
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm10, %ymm10
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm11, %ymm11
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -64(%rcx), %ymm6, %ymm11
+ vpxor 64(%rdi), %ymm7, %ymm12
+ vpxor 128(%rcx), %ymm8, %ymm13
+ vpxor (%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 576(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, (%rax)
+ # Row 1
+ vpxor (%rdi), %ymm8, %ymm10
+ vpxor -96(%rcx), %ymm9, %ymm11
+ vpxor 32(%rdi), %ymm5, %ymm12
+ vpxor 96(%rcx), %ymm6, %ymm13
+ vpxor -32(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 2
+ vpxor -32(%rdi), %ymm6, %ymm10
+ vpxor 128(%rax), %ymm7, %ymm11
+ vpxor -96(%rax), %ymm8, %ymm12
+ vpxor 64(%rcx), %ymm9, %ymm13
+ vpxor -64(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 3
+ vpxor -64(%rdi), %ymm9, %ymm10
+ vpxor 96(%rax), %ymm5, %ymm11
+ vpxor 128(%rdi), %ymm6, %ymm12
+ vpxor 32(%rcx), %ymm7, %ymm13
+ vpxor 64(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 4
+ vpxor -96(%rdi), %ymm7, %ymm10
+ vpxor -32(%rcx), %ymm8, %ymm11
+ vpxor 96(%rdi), %ymm9, %ymm12
+ vpxor (%rcx), %ymm5, %ymm13
+ vpxor 32(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, 32(%rax)
+ # Round 19
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm10, %ymm10
+ vpxor -32(%rdi), %ymm10, %ymm10
+ vpxor (%rdi), %ymm10, %ymm10
+ vpxor 32(%rdi), %ymm2, %ymm12
+ vpxor 64(%rdi), %ymm12, %ymm12
+ vpxor 128(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -64(%rax), %ymm4, %ymm14
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm1, %ymm11
+ vpxor 128(%rax), %ymm11, %ymm11
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor 32(%rcx), %ymm3, %ymm13
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -96(%rcx), %ymm6, %ymm11
+ vpxor -96(%rax), %ymm7, %ymm12
+ vpxor 32(%rcx), %ymm8, %ymm13
+ vpxor 32(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 608(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 1
+ vpxor 128(%rcx), %ymm8, %ymm10
+ vpxor -32(%rax), %ymm9, %ymm11
+ vpxor -32(%rdi), %ymm5, %ymm12
+ vpxor 96(%rax), %ymm6, %ymm13
+ vpxor 96(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 2
+ vpxor -64(%rcx), %ymm6, %ymm10
+ vpxor 32(%rdi), %ymm7, %ymm11
+ vpxor 64(%rcx), %ymm8, %ymm12
+ vpxor 64(%rax), %ymm9, %ymm13
+ vpxor -96(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 3
+ vpxor (%rax), %ymm9, %ymm10
+ vpxor (%rdi), %ymm5, %ymm11
+ vpxor 128(%rax), %ymm6, %ymm12
+ vpxor 128(%rdi), %ymm7, %ymm13
+ vpxor (%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, (%rcx)
+ # Row 4
+ vpxor 64(%rdi), %ymm7, %ymm10
+ vpxor 96(%rcx), %ymm8, %ymm11
+ vpxor -64(%rax), %ymm9, %ymm12
+ vpxor -64(%rdi), %ymm5, %ymm13
+ vpxor -32(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -32(%rcx)
+ # Round 20
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm11, %ymm11
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor 128(%rdi), %ymm3, %ymm13
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -32(%rax), %ymm11, %ymm11
+ vpxor (%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm10, %ymm10
+ vpxor (%rcx), %ymm14, %ymm14
+ vpxor 32(%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -32(%rax), %ymm6, %ymm11
+ vpxor 64(%rcx), %ymm7, %ymm12
+ vpxor 128(%rdi), %ymm8, %ymm13
+ vpxor -32(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 640(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 1
+ vpxor 32(%rcx), %ymm8, %ymm10
+ vpxor 96(%rdi), %ymm9, %ymm11
+ vpxor -64(%rcx), %ymm5, %ymm12
+ vpxor (%rdi), %ymm6, %ymm13
+ vpxor -64(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 2
+ vpxor -96(%rcx), %ymm6, %ymm10
+ vpxor -32(%rdi), %ymm7, %ymm11
+ vpxor 64(%rax), %ymm8, %ymm12
+ vpxor (%rcx), %ymm9, %ymm13
+ vpxor 64(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 3
+ vpxor 32(%rax), %ymm9, %ymm10
+ vpxor 128(%rcx), %ymm5, %ymm11
+ vpxor 32(%rdi), %ymm6, %ymm12
+ vpxor 128(%rax), %ymm7, %ymm13
+ vpxor -64(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 4
+ vpxor -96(%rax), %ymm7, %ymm10
+ vpxor 96(%rax), %ymm8, %ymm11
+ vpxor -96(%rdi), %ymm9, %ymm12
+ vpxor (%rax), %ymm5, %ymm13
+ vpxor 96(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, 96(%rcx)
+ # Round 21
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm2, %ymm12
+ vpxor 64(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm11, %ymm11
+ vpxor 128(%rdi), %ymm13, %ymm13
+ vpxor -64(%rax), %ymm14, %ymm14
+ vpxor -32(%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm10, %ymm10
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm10, %ymm10
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm14, %ymm14
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm10, %ymm10
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 96(%rdi), %ymm6, %ymm11
+ vpxor 64(%rax), %ymm7, %ymm12
+ vpxor 128(%rax), %ymm8, %ymm13
+ vpxor 96(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 672(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 1
+ vpxor 128(%rdi), %ymm8, %ymm10
+ vpxor -64(%rax), %ymm9, %ymm11
+ vpxor -96(%rcx), %ymm5, %ymm12
+ vpxor 128(%rcx), %ymm6, %ymm13
+ vpxor -96(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 2
+ vpxor -32(%rax), %ymm6, %ymm10
+ vpxor -64(%rcx), %ymm7, %ymm11
+ vpxor (%rcx), %ymm8, %ymm12
+ vpxor -64(%rdi), %ymm9, %ymm13
+ vpxor -96(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 3
+ vpxor -32(%rcx), %ymm9, %ymm10
+ vpxor 32(%rcx), %ymm5, %ymm11
+ vpxor -32(%rdi), %ymm6, %ymm12
+ vpxor 32(%rdi), %ymm7, %ymm13
+ vpxor (%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, (%rax)
+ # Row 4
+ vpxor 64(%rcx), %ymm7, %ymm10
+ vpxor (%rdi), %ymm8, %ymm11
+ vpxor 64(%rdi), %ymm9, %ymm12
+ vpxor 32(%rax), %ymm5, %ymm13
+ vpxor 96(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, 96(%rax)
+ # Round 22
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm13, %ymm13
+ vpxor 96(%rdi), %ymm1, %ymm11
+ vpxor 128(%rdi), %ymm10, %ymm10
+ vpxor -96(%rax), %ymm14, %ymm14
+ vpxor -64(%rax), %ymm11, %ymm11
+ vpxor -32(%rax), %ymm10, %ymm10
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm12, %ymm12
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor -32(%rcx), %ymm10, %ymm10
+ vpxor (%rcx), %ymm12, %ymm12
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm14, %ymm14
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -64(%rax), %ymm6, %ymm11
+ vpxor (%rcx), %ymm7, %ymm12
+ vpxor 32(%rdi), %ymm8, %ymm13
+ vpxor 96(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 704(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 1
+ vpxor 128(%rax), %ymm8, %ymm10
+ vpxor -96(%rdi), %ymm9, %ymm11
+ vpxor -32(%rax), %ymm5, %ymm12
+ vpxor 32(%rcx), %ymm6, %ymm13
+ vpxor 64(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 2
+ vpxor 96(%rdi), %ymm6, %ymm10
+ vpxor -96(%rcx), %ymm7, %ymm11
+ vpxor -64(%rdi), %ymm8, %ymm12
+ vpxor (%rax), %ymm9, %ymm13
+ vpxor 64(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 3
+ vpxor 96(%rcx), %ymm9, %ymm10
+ vpxor 128(%rdi), %ymm5, %ymm11
+ vpxor -64(%rcx), %ymm6, %ymm12
+ vpxor -32(%rdi), %ymm7, %ymm13
+ vpxor 32(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 4
+ vpxor 64(%rax), %ymm7, %ymm10
+ vpxor 128(%rcx), %ymm8, %ymm11
+ vpxor -96(%rax), %ymm9, %ymm12
+ vpxor -32(%rcx), %ymm5, %ymm13
+ vpxor (%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, (%rdi)
+ # Round 23
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm1, %ymm11
+ vpxor -64(%rdi), %ymm2, %ymm12
+ vpxor -32(%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm13, %ymm13
+ vpxor 64(%rdi), %ymm4, %ymm14
+ vpxor 96(%rdi), %ymm10, %ymm10
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm11, %ymm11
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm14, %ymm14
+ vpxor 128(%rax), %ymm10, %ymm10
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm12, %ymm12
+ vpxor 32(%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -96(%rdi), %ymm6, %ymm11
+ vpxor -64(%rdi), %ymm7, %ymm12
+ vpxor -32(%rdi), %ymm8, %ymm13
+ vpxor (%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 736(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, (%rdi)
+ # Row 1
+ vpxor 32(%rdi), %ymm8, %ymm10
+ vpxor 64(%rdi), %ymm9, %ymm11
+ vpxor 96(%rdi), %ymm5, %ymm12
+ vpxor 128(%rdi), %ymm6, %ymm13
+ vpxor -96(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 2
+ vpxor -64(%rax), %ymm6, %ymm10
+ vpxor -32(%rax), %ymm7, %ymm11
+ vpxor (%rax), %ymm8, %ymm12
+ vpxor 32(%rax), %ymm9, %ymm13
+ vpxor 64(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 3
+ vpxor 96(%rax), %ymm9, %ymm10
+ vpxor 128(%rax), %ymm5, %ymm11
+ vpxor -96(%rcx), %ymm6, %ymm12
+ vpxor -64(%rcx), %ymm7, %ymm13
+ vpxor -32(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 4
+ vpxor (%rcx), %ymm7, %ymm10
+ vpxor 32(%rcx), %ymm8, %ymm11
+ vpxor 64(%rcx), %ymm9, %ymm12
+ vpxor 96(%rcx), %ymm5, %ymm13
+ vpxor 128(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, 128(%rcx)
+ subq $0x80, %rdi
+ vmovdqu %ymm15, (%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_sha3_128_blocksx4_seed_avx2,.-kyber_sha3_128_blocksx4_seed_avx2
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.data
+#else
+.section __DATA,__data
+#endif /* __APPLE__ */
+#ifndef __APPLE__
+.align 32
+#else
+.p2align 5
+#endif /* __APPLE__ */
+L_sha3_256_blockx4_seed_avx2_end_mark:
+.quad 0x8000000000000000, 0x8000000000000000
+.quad 0x8000000000000000, 0x8000000000000000
+#ifndef __APPLE__
+.text
+.globl kyber_sha3_256_blocksx4_seed_avx2
+.type kyber_sha3_256_blocksx4_seed_avx2,@function
+.align 16
+kyber_sha3_256_blocksx4_seed_avx2:
+#else
+.section __TEXT,__text
+.globl _kyber_sha3_256_blocksx4_seed_avx2
+.p2align 4
+_kyber_sha3_256_blocksx4_seed_avx2:
+#endif /* __APPLE__ */
+ leaq L_sha3_parallel_4_r(%rip), %rdx
+ movq %rdi, %rax
+ movq %rdi, %rcx
+ vpbroadcastq (%rsi), %ymm15
+ addq $0x80, %rdi
+ vpbroadcastq 8(%rsi), %ymm11
+ addq $0x180, %rax
+ vpbroadcastq 16(%rsi), %ymm12
+ addq $0x280, %rcx
+ vpbroadcastq 24(%rsi), %ymm13
+ vmovdqu L_sha3_256_blockx4_seed_avx2_end_mark(%rip), %ymm5
+ vpxor %ymm6, %ymm6, %ymm6
+ vmovdqu %ymm11, -96(%rdi)
+ vmovdqu %ymm12, -64(%rdi)
+ vmovdqu %ymm13, -32(%rdi)
+ vmovdqu (%rdi), %ymm14
+ vmovdqu %ymm6, 32(%rdi)
+ vmovdqu %ymm6, 64(%rdi)
+ vmovdqu %ymm6, 96(%rdi)
+ vmovdqu %ymm6, 128(%rdi)
+ vmovdqu %ymm6, -96(%rax)
+ vmovdqu %ymm6, -64(%rax)
+ vmovdqu %ymm6, -32(%rax)
+ vmovdqu %ymm6, (%rax)
+ vmovdqu %ymm6, 32(%rax)
+ vmovdqu %ymm6, 64(%rax)
+ vmovdqu %ymm6, 96(%rax)
+ vmovdqu %ymm5, 128(%rax)
+ vmovdqu %ymm6, -96(%rcx)
+ vmovdqu %ymm6, -64(%rcx)
+ vmovdqu %ymm6, -32(%rcx)
+ vmovdqu %ymm6, (%rcx)
+ vmovdqu %ymm6, 32(%rcx)
+ vmovdqu %ymm6, 64(%rcx)
+ vmovdqu %ymm6, 96(%rcx)
+ vmovdqu %ymm6, 128(%rcx)
+ vmovdqu %ymm15, %ymm10
+ vpxor %ymm5, %ymm11, %ymm11
+ # Round 0
+ # Calc b[0..4]
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 64(%rdi), %ymm6, %ymm11
+ vpxor (%rax), %ymm7, %ymm12
+ vpxor -64(%rcx), %ymm8, %ymm13
+ vpxor 128(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor (%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 1
+ vpxor -32(%rdi), %ymm8, %ymm10
+ vpxor -96(%rax), %ymm9, %ymm11
+ vpxor -64(%rax), %ymm5, %ymm12
+ vpxor 128(%rax), %ymm6, %ymm13
+ vpxor 64(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 2
+ vpxor -96(%rdi), %ymm6, %ymm10
+ vpxor 96(%rdi), %ymm7, %ymm11
+ vpxor 32(%rax), %ymm8, %ymm12
+ vpxor -32(%rcx), %ymm9, %ymm13
+ vpxor (%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, (%rcx)
+ # Row 3
+ vpxor (%rdi), %ymm9, %ymm10
+ vpxor 32(%rdi), %ymm5, %ymm11
+ vpxor -32(%rax), %ymm6, %ymm12
+ vpxor -96(%rcx), %ymm7, %ymm13
+ vpxor 96(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 4
+ vpxor -64(%rdi), %ymm7, %ymm10
+ vpxor 128(%rdi), %ymm8, %ymm11
+ vpxor 64(%rax), %ymm9, %ymm12
+ vpxor 96(%rax), %ymm5, %ymm13
+ vpxor 32(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, 32(%rcx)
+ # Round 1
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm10, %ymm10
+ vpxor -32(%rdi), %ymm10, %ymm10
+ vpxor (%rdi), %ymm10, %ymm10
+ vpxor 32(%rdi), %ymm1, %ymm11
+ vpxor 64(%rdi), %ymm11, %ymm11
+ vpxor 96(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm2, %ymm12
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm12, %ymm12
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm3, %ymm13
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -64(%rcx), %ymm13, %ymm13
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm4, %ymm14
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm14, %ymm14
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -96(%rax), %ymm6, %ymm11
+ vpxor 32(%rax), %ymm7, %ymm12
+ vpxor -96(%rcx), %ymm8, %ymm13
+ vpxor 32(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 32(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 1
+ vpxor -64(%rcx), %ymm8, %ymm10
+ vpxor 64(%rcx), %ymm9, %ymm11
+ vpxor -96(%rdi), %ymm5, %ymm12
+ vpxor 32(%rdi), %ymm6, %ymm13
+ vpxor 64(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 2
+ vpxor 64(%rdi), %ymm6, %ymm10
+ vpxor -64(%rax), %ymm7, %ymm11
+ vpxor -32(%rcx), %ymm8, %ymm12
+ vpxor 96(%rcx), %ymm9, %ymm13
+ vpxor -64(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 3
+ vpxor 128(%rcx), %ymm9, %ymm10
+ vpxor -32(%rdi), %ymm5, %ymm11
+ vpxor 96(%rdi), %ymm6, %ymm12
+ vpxor -32(%rax), %ymm7, %ymm13
+ vpxor 96(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 4
+ vpxor (%rax), %ymm7, %ymm10
+ vpxor 128(%rax), %ymm8, %ymm11
+ vpxor (%rcx), %ymm9, %ymm12
+ vpxor (%rdi), %ymm5, %ymm13
+ vpxor 128(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, 128(%rdi)
+ # Round 2
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm3, %ymm13
+ vpxor 64(%rdi), %ymm10, %ymm10
+ vpxor 96(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm11, %ymm11
+ vpxor -32(%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 64(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -64(%rcx), %ymm10, %ymm10
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 64(%rcx), %ymm6, %ymm11
+ vpxor -32(%rcx), %ymm7, %ymm12
+ vpxor -32(%rax), %ymm8, %ymm13
+ vpxor 128(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 64(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 1
+ vpxor -96(%rcx), %ymm8, %ymm10
+ vpxor 64(%rax), %ymm9, %ymm11
+ vpxor 64(%rdi), %ymm5, %ymm12
+ vpxor -32(%rdi), %ymm6, %ymm13
+ vpxor (%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, (%rcx)
+ # Row 2
+ vpxor -96(%rax), %ymm6, %ymm10
+ vpxor -96(%rdi), %ymm7, %ymm11
+ vpxor 96(%rcx), %ymm8, %ymm12
+ vpxor 96(%rax), %ymm9, %ymm13
+ vpxor (%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, (%rax)
+ # Row 3
+ vpxor 32(%rcx), %ymm9, %ymm10
+ vpxor -64(%rcx), %ymm5, %ymm11
+ vpxor -64(%rax), %ymm6, %ymm12
+ vpxor 96(%rdi), %ymm7, %ymm13
+ vpxor (%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, (%rdi)
+ # Row 4
+ vpxor 32(%rax), %ymm7, %ymm10
+ vpxor 32(%rdi), %ymm8, %ymm11
+ vpxor -64(%rdi), %ymm9, %ymm12
+ vpxor 128(%rcx), %ymm5, %ymm13
+ vpxor 128(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, 128(%rax)
+ # Round 3
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm3, %ymm13
+ vpxor (%rdi), %ymm4, %ymm14
+ vpxor 64(%rdi), %ymm2, %ymm12
+ vpxor 96(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm14, %ymm14
+ vpxor -96(%rax), %ymm10, %ymm10
+ vpxor -64(%rax), %ymm12, %ymm12
+ vpxor -32(%rax), %ymm13, %ymm13
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm10, %ymm10
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm14, %ymm14
+ vpxor 32(%rcx), %ymm10, %ymm10
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 64(%rax), %ymm6, %ymm11
+ vpxor 96(%rcx), %ymm7, %ymm12
+ vpxor 96(%rdi), %ymm8, %ymm13
+ vpxor 128(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 96(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 1
+ vpxor -32(%rax), %ymm8, %ymm10
+ vpxor (%rcx), %ymm9, %ymm11
+ vpxor -96(%rax), %ymm5, %ymm12
+ vpxor -64(%rcx), %ymm6, %ymm13
+ vpxor -64(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 2
+ vpxor 64(%rcx), %ymm6, %ymm10
+ vpxor 64(%rdi), %ymm7, %ymm11
+ vpxor 96(%rax), %ymm8, %ymm12
+ vpxor (%rdi), %ymm9, %ymm13
+ vpxor 32(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 3
+ vpxor 128(%rdi), %ymm9, %ymm10
+ vpxor -96(%rcx), %ymm5, %ymm11
+ vpxor -96(%rdi), %ymm6, %ymm12
+ vpxor -64(%rax), %ymm7, %ymm13
+ vpxor 128(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 4
+ vpxor -32(%rcx), %ymm7, %ymm10
+ vpxor -32(%rdi), %ymm8, %ymm11
+ vpxor (%rax), %ymm9, %ymm12
+ vpxor 32(%rcx), %ymm5, %ymm13
+ vpxor 32(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 32(%rdi)
+ # Round 4
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 64(%rdi), %ymm1, %ymm11
+ vpxor 96(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm10, %ymm10
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor -32(%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm11, %ymm11
+ vpxor 64(%rcx), %ymm10, %ymm10
+ vpxor 96(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor (%rcx), %ymm6, %ymm11
+ vpxor 96(%rax), %ymm7, %ymm12
+ vpxor -64(%rax), %ymm8, %ymm13
+ vpxor 32(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 128(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 1
+ vpxor 96(%rdi), %ymm8, %ymm10
+ vpxor -64(%rdi), %ymm9, %ymm11
+ vpxor 64(%rcx), %ymm5, %ymm12
+ vpxor -96(%rcx), %ymm6, %ymm13
+ vpxor (%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, (%rax)
+ # Row 2
+ vpxor 64(%rax), %ymm6, %ymm10
+ vpxor -96(%rax), %ymm7, %ymm11
+ vpxor (%rdi), %ymm8, %ymm12
+ vpxor 128(%rcx), %ymm9, %ymm13
+ vpxor -32(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 3
+ vpxor 128(%rax), %ymm9, %ymm10
+ vpxor -32(%rax), %ymm5, %ymm11
+ vpxor 64(%rdi), %ymm6, %ymm12
+ vpxor -96(%rdi), %ymm7, %ymm13
+ vpxor 32(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 4
+ vpxor 96(%rcx), %ymm7, %ymm10
+ vpxor -64(%rcx), %ymm8, %ymm11
+ vpxor 32(%rax), %ymm9, %ymm12
+ vpxor 128(%rdi), %ymm5, %ymm13
+ vpxor -32(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, -32(%rdi)
+ # Round 5
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm4, %ymm14
+ vpxor 64(%rdi), %ymm12, %ymm12
+ vpxor 96(%rdi), %ymm10, %ymm10
+ vpxor -96(%rax), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor -32(%rax), %ymm11, %ymm11
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm10, %ymm10
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -32(%rcx), %ymm14, %ymm14
+ vpxor (%rcx), %ymm11, %ymm11
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -64(%rdi), %ymm6, %ymm11
+ vpxor (%rdi), %ymm7, %ymm12
+ vpxor -96(%rdi), %ymm8, %ymm13
+ vpxor -32(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 160(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 1
+ vpxor -64(%rax), %ymm8, %ymm10
+ vpxor (%rax), %ymm9, %ymm11
+ vpxor 64(%rax), %ymm5, %ymm12
+ vpxor -32(%rax), %ymm6, %ymm13
+ vpxor 32(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 2
+ vpxor (%rcx), %ymm6, %ymm10
+ vpxor 64(%rcx), %ymm7, %ymm11
+ vpxor 128(%rcx), %ymm8, %ymm12
+ vpxor 32(%rcx), %ymm9, %ymm13
+ vpxor 96(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 3
+ vpxor 32(%rdi), %ymm9, %ymm10
+ vpxor 96(%rdi), %ymm5, %ymm11
+ vpxor -96(%rax), %ymm6, %ymm12
+ vpxor 64(%rdi), %ymm7, %ymm13
+ vpxor 128(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 4
+ vpxor 96(%rax), %ymm7, %ymm10
+ vpxor -96(%rcx), %ymm8, %ymm11
+ vpxor -32(%rcx), %ymm9, %ymm12
+ vpxor 128(%rax), %ymm5, %ymm13
+ vpxor -64(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, -64(%rcx)
+ # Round 6
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm10, %ymm10
+ vpxor 64(%rdi), %ymm13, %ymm13
+ vpxor 96(%rdi), %ymm11, %ymm11
+ vpxor 128(%rdi), %ymm14, %ymm14
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -64(%rax), %ymm10, %ymm10
+ vpxor -32(%rax), %ymm13, %ymm13
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor (%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm14, %ymm14
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor (%rax), %ymm6, %ymm11
+ vpxor 128(%rcx), %ymm7, %ymm12
+ vpxor 64(%rdi), %ymm8, %ymm13
+ vpxor -64(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 192(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 1
+ vpxor -96(%rdi), %ymm8, %ymm10
+ vpxor 32(%rax), %ymm9, %ymm11
+ vpxor (%rcx), %ymm5, %ymm12
+ vpxor 96(%rdi), %ymm6, %ymm13
+ vpxor -32(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 2
+ vpxor -64(%rdi), %ymm6, %ymm10
+ vpxor 64(%rax), %ymm7, %ymm11
+ vpxor 32(%rcx), %ymm8, %ymm12
+ vpxor 128(%rdi), %ymm9, %ymm13
+ vpxor 96(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 3
+ vpxor -32(%rdi), %ymm9, %ymm10
+ vpxor -64(%rax), %ymm5, %ymm11
+ vpxor 64(%rcx), %ymm6, %ymm12
+ vpxor -96(%rax), %ymm7, %ymm13
+ vpxor 128(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 4
+ vpxor (%rdi), %ymm7, %ymm10
+ vpxor -32(%rax), %ymm8, %ymm11
+ vpxor 96(%rcx), %ymm9, %ymm12
+ vpxor 32(%rdi), %ymm5, %ymm13
+ vpxor -96(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, -96(%rcx)
+ # Round 7
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm10, %ymm10
+ vpxor -64(%rdi), %ymm10, %ymm10
+ vpxor -32(%rdi), %ymm10, %ymm10
+ vpxor 64(%rdi), %ymm3, %ymm13
+ vpxor 96(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm13, %ymm13
+ vpxor -96(%rax), %ymm13, %ymm13
+ vpxor -64(%rax), %ymm1, %ymm11
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm4, %ymm14
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm14, %ymm14
+ vpxor (%rcx), %ymm2, %ymm12
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 32(%rax), %ymm6, %ymm11
+ vpxor 32(%rcx), %ymm7, %ymm12
+ vpxor -96(%rax), %ymm8, %ymm13
+ vpxor -96(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 224(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 1
+ vpxor 64(%rdi), %ymm8, %ymm10
+ vpxor -32(%rcx), %ymm9, %ymm11
+ vpxor -64(%rdi), %ymm5, %ymm12
+ vpxor -64(%rax), %ymm6, %ymm13
+ vpxor 96(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 2
+ vpxor (%rax), %ymm6, %ymm10
+ vpxor (%rcx), %ymm7, %ymm11
+ vpxor 128(%rdi), %ymm8, %ymm12
+ vpxor 128(%rax), %ymm9, %ymm13
+ vpxor (%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, (%rdi)
+ # Row 3
+ vpxor -64(%rcx), %ymm9, %ymm10
+ vpxor -96(%rdi), %ymm5, %ymm11
+ vpxor 64(%rax), %ymm6, %ymm12
+ vpxor 64(%rcx), %ymm7, %ymm13
+ vpxor 32(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 4
+ vpxor 128(%rcx), %ymm7, %ymm10
+ vpxor 96(%rdi), %ymm8, %ymm11
+ vpxor 96(%rax), %ymm9, %ymm12
+ vpxor -32(%rdi), %ymm5, %ymm13
+ vpxor -32(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, -32(%rax)
+ # Round 8
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm1, %ymm11
+ vpxor -64(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm4, %ymm14
+ vpxor 32(%rdi), %ymm14, %ymm14
+ vpxor 64(%rdi), %ymm10, %ymm10
+ vpxor 128(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm3, %ymm13
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor (%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm10, %ymm10
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm11, %ymm11
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -32(%rcx), %ymm6, %ymm11
+ vpxor 128(%rdi), %ymm7, %ymm12
+ vpxor 64(%rcx), %ymm8, %ymm13
+ vpxor -32(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 256(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 1
+ vpxor -96(%rax), %ymm8, %ymm10
+ vpxor 96(%rcx), %ymm9, %ymm11
+ vpxor (%rax), %ymm5, %ymm12
+ vpxor -96(%rdi), %ymm6, %ymm13
+ vpxor 96(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 2
+ vpxor 32(%rax), %ymm6, %ymm10
+ vpxor -64(%rdi), %ymm7, %ymm11
+ vpxor 128(%rax), %ymm8, %ymm12
+ vpxor 32(%rdi), %ymm9, %ymm13
+ vpxor 128(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 3
+ vpxor -96(%rcx), %ymm9, %ymm10
+ vpxor 64(%rdi), %ymm5, %ymm11
+ vpxor (%rcx), %ymm6, %ymm12
+ vpxor 64(%rax), %ymm7, %ymm13
+ vpxor -32(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 4
+ vpxor 32(%rcx), %ymm7, %ymm10
+ vpxor -64(%rax), %ymm8, %ymm11
+ vpxor (%rdi), %ymm9, %ymm12
+ vpxor -64(%rcx), %ymm5, %ymm13
+ vpxor 96(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, 96(%rdi)
+ # Round 9
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor 32(%rdi), %ymm13, %ymm13
+ vpxor 64(%rdi), %ymm11, %ymm11
+ vpxor 128(%rdi), %ymm2, %ymm12
+ vpxor -96(%rax), %ymm10, %ymm10
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm12, %ymm12
+ vpxor 32(%rax), %ymm10, %ymm10
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm14, %ymm14
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -96(%rcx), %ymm10, %ymm10
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm11, %ymm11
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 96(%rcx), %ymm6, %ymm11
+ vpxor 128(%rax), %ymm7, %ymm12
+ vpxor 64(%rax), %ymm8, %ymm13
+ vpxor 96(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 288(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 1
+ vpxor 64(%rcx), %ymm8, %ymm10
+ vpxor 96(%rax), %ymm9, %ymm11
+ vpxor 32(%rax), %ymm5, %ymm12
+ vpxor 64(%rdi), %ymm6, %ymm13
+ vpxor (%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, (%rdi)
+ # Row 2
+ vpxor -32(%rcx), %ymm6, %ymm10
+ vpxor (%rax), %ymm7, %ymm11
+ vpxor 32(%rdi), %ymm8, %ymm12
+ vpxor -32(%rdi), %ymm9, %ymm13
+ vpxor 32(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 3
+ vpxor -32(%rax), %ymm9, %ymm10
+ vpxor -96(%rax), %ymm5, %ymm11
+ vpxor -64(%rdi), %ymm6, %ymm12
+ vpxor (%rcx), %ymm7, %ymm13
+ vpxor -64(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 4
+ vpxor 128(%rdi), %ymm7, %ymm10
+ vpxor -96(%rdi), %ymm8, %ymm11
+ vpxor 128(%rcx), %ymm9, %ymm12
+ vpxor -96(%rcx), %ymm5, %ymm13
+ vpxor -64(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Round 10
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm2, %ymm12
+ vpxor -32(%rdi), %ymm3, %ymm13
+ vpxor (%rdi), %ymm4, %ymm14
+ vpxor 32(%rdi), %ymm12, %ymm12
+ vpxor 64(%rdi), %ymm13, %ymm13
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor -96(%rax), %ymm1, %ymm11
+ vpxor -32(%rax), %ymm10, %ymm10
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm11, %ymm11
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm10, %ymm10
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm10, %ymm10
+ vpxor 96(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 96(%rax), %ymm6, %ymm11
+ vpxor 32(%rdi), %ymm7, %ymm12
+ vpxor (%rcx), %ymm8, %ymm13
+ vpxor -64(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 320(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 1
+ vpxor 64(%rax), %ymm8, %ymm10
+ vpxor (%rdi), %ymm9, %ymm11
+ vpxor -32(%rcx), %ymm5, %ymm12
+ vpxor -96(%rax), %ymm6, %ymm13
+ vpxor 128(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, 128(%rcx)
+ # Row 2
+ vpxor 96(%rcx), %ymm6, %ymm10
+ vpxor 32(%rax), %ymm7, %ymm11
+ vpxor -32(%rdi), %ymm8, %ymm12
+ vpxor -64(%rcx), %ymm9, %ymm13
+ vpxor 128(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 3
+ vpxor 96(%rdi), %ymm9, %ymm10
+ vpxor 64(%rcx), %ymm5, %ymm11
+ vpxor (%rax), %ymm6, %ymm12
+ vpxor -64(%rdi), %ymm7, %ymm13
+ vpxor -96(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 4
+ vpxor 128(%rax), %ymm7, %ymm10
+ vpxor 64(%rdi), %ymm8, %ymm11
+ vpxor 32(%rcx), %ymm9, %ymm12
+ vpxor -32(%rax), %ymm5, %ymm13
+ vpxor -96(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, -96(%rdi)
+ # Round 11
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm12, %ymm12
+ vpxor 96(%rdi), %ymm10, %ymm10
+ vpxor 128(%rdi), %ymm4, %ymm14
+ vpxor -96(%rax), %ymm13, %ymm13
+ vpxor -64(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm12, %ymm12
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm11, %ymm11
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm13, %ymm13
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm10, %ymm10
+ vpxor 128(%rcx), %ymm14, %ymm14
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor (%rdi), %ymm6, %ymm11
+ vpxor -32(%rdi), %ymm7, %ymm12
+ vpxor -64(%rdi), %ymm8, %ymm13
+ vpxor -96(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 352(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 1
+ vpxor (%rcx), %ymm8, %ymm10
+ vpxor 128(%rcx), %ymm9, %ymm11
+ vpxor 96(%rcx), %ymm5, %ymm12
+ vpxor 64(%rcx), %ymm6, %ymm13
+ vpxor 32(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, 32(%rcx)
+ # Row 2
+ vpxor 96(%rax), %ymm6, %ymm10
+ vpxor -32(%rcx), %ymm7, %ymm11
+ vpxor -64(%rcx), %ymm8, %ymm12
+ vpxor -96(%rcx), %ymm9, %ymm13
+ vpxor 128(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, -96(%rcx)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 3
+ vpxor -64(%rax), %ymm9, %ymm10
+ vpxor 64(%rax), %ymm5, %ymm11
+ vpxor 32(%rax), %ymm6, %ymm12
+ vpxor (%rax), %ymm7, %ymm13
+ vpxor -32(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 32(%rax)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 4
+ vpxor 32(%rdi), %ymm7, %ymm10
+ vpxor -96(%rax), %ymm8, %ymm11
+ vpxor 128(%rdi), %ymm9, %ymm12
+ vpxor 96(%rdi), %ymm5, %ymm13
+ vpxor 64(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, -96(%rax)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, 64(%rdi)
+ # Round 12
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor -64(%rax), %ymm10, %ymm10
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm12, %ymm12
+ vpxor 64(%rax), %ymm11, %ymm11
+ vpxor 96(%rax), %ymm10, %ymm10
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm13, %ymm13
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm14, %ymm14
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 128(%rcx), %ymm6, %ymm11
+ vpxor -64(%rcx), %ymm7, %ymm12
+ vpxor (%rax), %ymm8, %ymm13
+ vpxor 64(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 384(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 1
+ vpxor -64(%rdi), %ymm8, %ymm10
+ vpxor 32(%rcx), %ymm9, %ymm11
+ vpxor 96(%rax), %ymm5, %ymm12
+ vpxor 64(%rax), %ymm6, %ymm13
+ vpxor 128(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, 128(%rdi)
+ # Row 2
+ vpxor (%rdi), %ymm6, %ymm10
+ vpxor 96(%rcx), %ymm7, %ymm11
+ vpxor -96(%rcx), %ymm8, %ymm12
+ vpxor -32(%rax), %ymm9, %ymm13
+ vpxor 32(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, -32(%rax)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 3
+ vpxor -96(%rdi), %ymm9, %ymm10
+ vpxor (%rcx), %ymm5, %ymm11
+ vpxor -32(%rcx), %ymm6, %ymm12
+ vpxor 32(%rax), %ymm7, %ymm13
+ vpxor 96(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, -32(%rcx)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 4
+ vpxor -32(%rdi), %ymm7, %ymm10
+ vpxor 64(%rcx), %ymm8, %ymm11
+ vpxor 128(%rax), %ymm9, %ymm12
+ vpxor -64(%rax), %ymm5, %ymm13
+ vpxor -96(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, 64(%rcx)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, -96(%rax)
+ # Round 13
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm10, %ymm10
+ vpxor -64(%rdi), %ymm10, %ymm10
+ vpxor (%rdi), %ymm10, %ymm10
+ vpxor 32(%rdi), %ymm4, %ymm14
+ vpxor 64(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor 128(%rdi), %ymm14, %ymm14
+ vpxor -32(%rax), %ymm3, %ymm13
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm13, %ymm13
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm2, %ymm12
+ vpxor -96(%rcx), %ymm12, %ymm12
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm1, %ymm11
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm11, %ymm11
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 32(%rcx), %ymm6, %ymm11
+ vpxor -96(%rcx), %ymm7, %ymm12
+ vpxor 32(%rax), %ymm8, %ymm13
+ vpxor -96(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 416(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 1
+ vpxor (%rax), %ymm8, %ymm10
+ vpxor 128(%rdi), %ymm9, %ymm11
+ vpxor (%rdi), %ymm5, %ymm12
+ vpxor (%rcx), %ymm6, %ymm13
+ vpxor 128(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, 128(%rax)
+ # Row 2
+ vpxor 128(%rcx), %ymm6, %ymm10
+ vpxor 96(%rax), %ymm7, %ymm11
+ vpxor -32(%rax), %ymm8, %ymm12
+ vpxor 96(%rdi), %ymm9, %ymm13
+ vpxor -32(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, 96(%rdi)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 3
+ vpxor 64(%rdi), %ymm9, %ymm10
+ vpxor -64(%rdi), %ymm5, %ymm11
+ vpxor 96(%rcx), %ymm6, %ymm12
+ vpxor -32(%rcx), %ymm7, %ymm13
+ vpxor -64(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, 96(%rcx)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 4
+ vpxor -64(%rcx), %ymm7, %ymm10
+ vpxor 64(%rax), %ymm8, %ymm11
+ vpxor 32(%rdi), %ymm9, %ymm12
+ vpxor -96(%rdi), %ymm5, %ymm13
+ vpxor 64(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, 64(%rax)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, 64(%rcx)
+ # Round 14
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm1, %ymm11
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 64(%rdi), %ymm10, %ymm10
+ vpxor 96(%rdi), %ymm3, %ymm13
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm14, %ymm14
+ vpxor -64(%rax), %ymm14, %ymm14
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm11, %ymm11
+ vpxor 128(%rax), %ymm14, %ymm14
+ vpxor -96(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 128(%rdi), %ymm6, %ymm11
+ vpxor -32(%rax), %ymm7, %ymm12
+ vpxor -32(%rcx), %ymm8, %ymm13
+ vpxor 64(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 448(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 1
+ vpxor 32(%rax), %ymm8, %ymm10
+ vpxor 128(%rax), %ymm9, %ymm11
+ vpxor 128(%rcx), %ymm5, %ymm12
+ vpxor -64(%rdi), %ymm6, %ymm13
+ vpxor 32(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, 32(%rdi)
+ # Row 2
+ vpxor 32(%rcx), %ymm6, %ymm10
+ vpxor (%rdi), %ymm7, %ymm11
+ vpxor 96(%rdi), %ymm8, %ymm12
+ vpxor -64(%rax), %ymm9, %ymm13
+ vpxor -64(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, -64(%rax)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 3
+ vpxor -96(%rax), %ymm9, %ymm10
+ vpxor (%rax), %ymm5, %ymm11
+ vpxor 96(%rax), %ymm6, %ymm12
+ vpxor 96(%rcx), %ymm7, %ymm13
+ vpxor -96(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, 96(%rax)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 4
+ vpxor -96(%rcx), %ymm7, %ymm10
+ vpxor (%rcx), %ymm8, %ymm11
+ vpxor -32(%rdi), %ymm9, %ymm12
+ vpxor 64(%rdi), %ymm5, %ymm13
+ vpxor 64(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, (%rcx)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, 64(%rax)
+ # Round 15
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm2, %ymm12
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm10, %ymm10
+ vpxor -64(%rax), %ymm13, %ymm13
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm10, %ymm10
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 128(%rax), %ymm6, %ymm11
+ vpxor 96(%rdi), %ymm7, %ymm12
+ vpxor 96(%rcx), %ymm8, %ymm13
+ vpxor 64(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 480(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 1
+ vpxor -32(%rcx), %ymm8, %ymm10
+ vpxor 32(%rdi), %ymm9, %ymm11
+ vpxor 32(%rcx), %ymm5, %ymm12
+ vpxor (%rax), %ymm6, %ymm13
+ vpxor -32(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, -32(%rdi)
+ # Row 2
+ vpxor 128(%rdi), %ymm6, %ymm10
+ vpxor 128(%rcx), %ymm7, %ymm11
+ vpxor -64(%rax), %ymm8, %ymm12
+ vpxor -96(%rdi), %ymm9, %ymm13
+ vpxor -96(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, -96(%rdi)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 3
+ vpxor 64(%rcx), %ymm9, %ymm10
+ vpxor 32(%rax), %ymm5, %ymm11
+ vpxor (%rdi), %ymm6, %ymm12
+ vpxor 96(%rax), %ymm7, %ymm13
+ vpxor 64(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, (%rdi)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 4
+ vpxor -32(%rax), %ymm7, %ymm10
+ vpxor -64(%rdi), %ymm8, %ymm11
+ vpxor -64(%rcx), %ymm9, %ymm12
+ vpxor -96(%rax), %ymm5, %ymm13
+ vpxor (%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, -64(%rdi)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, (%rcx)
+ # Round 16
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm4, %ymm14
+ vpxor (%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm1, %ymm11
+ vpxor 64(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm12, %ymm12
+ vpxor 128(%rdi), %ymm10, %ymm10
+ vpxor -64(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm11, %ymm11
+ vpxor 64(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor 128(%rax), %ymm11, %ymm11
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm10, %ymm10
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 32(%rdi), %ymm6, %ymm11
+ vpxor -64(%rax), %ymm7, %ymm12
+ vpxor 96(%rax), %ymm8, %ymm13
+ vpxor (%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 512(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, (%rcx)
+ # Row 1
+ vpxor 96(%rcx), %ymm8, %ymm10
+ vpxor -32(%rdi), %ymm9, %ymm11
+ vpxor 128(%rdi), %ymm5, %ymm12
+ vpxor 32(%rax), %ymm6, %ymm13
+ vpxor -64(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, -64(%rcx)
+ # Row 2
+ vpxor 128(%rax), %ymm6, %ymm10
+ vpxor 32(%rcx), %ymm7, %ymm11
+ vpxor -96(%rdi), %ymm8, %ymm12
+ vpxor 64(%rdi), %ymm9, %ymm13
+ vpxor -32(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, 64(%rdi)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 3
+ vpxor 64(%rax), %ymm9, %ymm10
+ vpxor -32(%rcx), %ymm5, %ymm11
+ vpxor 128(%rcx), %ymm6, %ymm12
+ vpxor (%rdi), %ymm7, %ymm13
+ vpxor -96(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, 128(%rcx)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 4
+ vpxor 96(%rdi), %ymm7, %ymm10
+ vpxor (%rax), %ymm8, %ymm11
+ vpxor -96(%rcx), %ymm9, %ymm12
+ vpxor 64(%rcx), %ymm5, %ymm13
+ vpxor -64(%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, (%rax)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, -64(%rdi)
+ # Round 17
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm11, %ymm11
+ vpxor 64(%rdi), %ymm13, %ymm13
+ vpxor 128(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm4, %ymm14
+ vpxor -64(%rax), %ymm12, %ymm12
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor 32(%rax), %ymm13, %ymm13
+ vpxor 64(%rax), %ymm10, %ymm10
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor 128(%rax), %ymm10, %ymm10
+ vpxor -64(%rcx), %ymm14, %ymm14
+ vpxor -32(%rcx), %ymm11, %ymm11
+ vpxor (%rcx), %ymm14, %ymm14
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm10, %ymm10
+ vpxor 128(%rcx), %ymm12, %ymm12
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -32(%rdi), %ymm6, %ymm11
+ vpxor -96(%rdi), %ymm7, %ymm12
+ vpxor (%rdi), %ymm8, %ymm13
+ vpxor -64(%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 544(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 1
+ vpxor 96(%rax), %ymm8, %ymm10
+ vpxor -64(%rcx), %ymm9, %ymm11
+ vpxor 128(%rax), %ymm5, %ymm12
+ vpxor -32(%rcx), %ymm6, %ymm13
+ vpxor -96(%rcx), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, -96(%rcx)
+ # Row 2
+ vpxor 32(%rdi), %ymm6, %ymm10
+ vpxor 128(%rdi), %ymm7, %ymm11
+ vpxor 64(%rdi), %ymm8, %ymm12
+ vpxor -96(%rax), %ymm9, %ymm13
+ vpxor 96(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, -96(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 3
+ vpxor (%rcx), %ymm9, %ymm10
+ vpxor 96(%rcx), %ymm5, %ymm11
+ vpxor 32(%rcx), %ymm6, %ymm12
+ vpxor 128(%rcx), %ymm7, %ymm13
+ vpxor 64(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, 32(%rcx)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 4
+ vpxor -64(%rax), %ymm7, %ymm10
+ vpxor 32(%rax), %ymm8, %ymm11
+ vpxor -32(%rax), %ymm9, %ymm12
+ vpxor 64(%rax), %ymm5, %ymm13
+ vpxor (%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, 32(%rax)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, (%rax)
+ # Round 18
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm2, %ymm12
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm10, %ymm10
+ vpxor 64(%rdi), %ymm12, %ymm12
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -96(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm10, %ymm10
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -96(%rcx), %ymm14, %ymm14
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor -32(%rcx), %ymm13, %ymm13
+ vpxor (%rcx), %ymm10, %ymm10
+ vpxor 32(%rcx), %ymm12, %ymm12
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm11, %ymm11
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -64(%rcx), %ymm6, %ymm11
+ vpxor 64(%rdi), %ymm7, %ymm12
+ vpxor 128(%rcx), %ymm8, %ymm13
+ vpxor (%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 576(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, (%rax)
+ # Row 1
+ vpxor (%rdi), %ymm8, %ymm10
+ vpxor -96(%rcx), %ymm9, %ymm11
+ vpxor 32(%rdi), %ymm5, %ymm12
+ vpxor 96(%rcx), %ymm6, %ymm13
+ vpxor -32(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rdi)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, -32(%rax)
+ # Row 2
+ vpxor -32(%rdi), %ymm6, %ymm10
+ vpxor 128(%rax), %ymm7, %ymm11
+ vpxor -96(%rax), %ymm8, %ymm12
+ vpxor 64(%rcx), %ymm9, %ymm13
+ vpxor -64(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rdi)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, 64(%rcx)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 3
+ vpxor -64(%rdi), %ymm9, %ymm10
+ vpxor 96(%rax), %ymm5, %ymm11
+ vpxor 128(%rdi), %ymm6, %ymm12
+ vpxor 32(%rcx), %ymm7, %ymm13
+ vpxor 64(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rdi)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, 128(%rdi)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 4
+ vpxor -96(%rdi), %ymm7, %ymm10
+ vpxor -32(%rcx), %ymm8, %ymm11
+ vpxor 96(%rdi), %ymm9, %ymm12
+ vpxor (%rcx), %ymm5, %ymm13
+ vpxor 32(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rdi)
+ vmovdqu %ymm1, -32(%rcx)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, 32(%rax)
+ # Round 19
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm10, %ymm10
+ vpxor -32(%rdi), %ymm10, %ymm10
+ vpxor (%rdi), %ymm10, %ymm10
+ vpxor 32(%rdi), %ymm2, %ymm12
+ vpxor 64(%rdi), %ymm12, %ymm12
+ vpxor 128(%rdi), %ymm12, %ymm12
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -64(%rax), %ymm4, %ymm14
+ vpxor -32(%rax), %ymm14, %ymm14
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm1, %ymm11
+ vpxor 128(%rax), %ymm11, %ymm11
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor 32(%rcx), %ymm3, %ymm13
+ vpxor 64(%rcx), %ymm13, %ymm13
+ vpxor 96(%rcx), %ymm13, %ymm13
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -96(%rcx), %ymm6, %ymm11
+ vpxor -96(%rax), %ymm7, %ymm12
+ vpxor 32(%rcx), %ymm8, %ymm13
+ vpxor 32(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 608(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 1
+ vpxor 128(%rcx), %ymm8, %ymm10
+ vpxor -32(%rax), %ymm9, %ymm11
+ vpxor -32(%rdi), %ymm5, %ymm12
+ vpxor 96(%rax), %ymm6, %ymm13
+ vpxor 96(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rcx)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, 96(%rax)
+ vmovdqu %ymm4, 96(%rdi)
+ # Row 2
+ vpxor -64(%rcx), %ymm6, %ymm10
+ vpxor 32(%rdi), %ymm7, %ymm11
+ vpxor 64(%rcx), %ymm8, %ymm12
+ vpxor 64(%rax), %ymm9, %ymm13
+ vpxor -96(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rcx)
+ vmovdqu %ymm1, 32(%rdi)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, 64(%rax)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 3
+ vpxor (%rax), %ymm9, %ymm10
+ vpxor (%rdi), %ymm5, %ymm11
+ vpxor 128(%rax), %ymm6, %ymm12
+ vpxor 128(%rdi), %ymm7, %ymm13
+ vpxor (%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rax)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 128(%rax)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, (%rcx)
+ # Row 4
+ vpxor 64(%rdi), %ymm7, %ymm10
+ vpxor 96(%rcx), %ymm8, %ymm11
+ vpxor -64(%rax), %ymm9, %ymm12
+ vpxor -64(%rdi), %ymm5, %ymm13
+ vpxor -32(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rdi)
+ vmovdqu %ymm1, 96(%rcx)
+ vmovdqu %ymm2, -64(%rax)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -32(%rcx)
+ # Round 20
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor (%rdi), %ymm1, %ymm11
+ vpxor 32(%rdi), %ymm11, %ymm11
+ vpxor 96(%rdi), %ymm14, %ymm14
+ vpxor 128(%rdi), %ymm3, %ymm13
+ vpxor -96(%rax), %ymm12, %ymm12
+ vpxor -32(%rax), %ymm11, %ymm11
+ vpxor (%rax), %ymm10, %ymm10
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm13, %ymm13
+ vpxor 96(%rax), %ymm13, %ymm13
+ vpxor 128(%rax), %ymm12, %ymm12
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm10, %ymm10
+ vpxor (%rcx), %ymm14, %ymm14
+ vpxor 32(%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -32(%rax), %ymm6, %ymm11
+ vpxor 64(%rcx), %ymm7, %ymm12
+ vpxor 128(%rdi), %ymm8, %ymm13
+ vpxor -32(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 640(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 1
+ vpxor 32(%rcx), %ymm8, %ymm10
+ vpxor 96(%rdi), %ymm9, %ymm11
+ vpxor -64(%rcx), %ymm5, %ymm12
+ vpxor (%rdi), %ymm6, %ymm13
+ vpxor -64(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rcx)
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, (%rdi)
+ vmovdqu %ymm4, -64(%rax)
+ # Row 2
+ vpxor -96(%rcx), %ymm6, %ymm10
+ vpxor -32(%rdi), %ymm7, %ymm11
+ vpxor 64(%rax), %ymm8, %ymm12
+ vpxor (%rcx), %ymm9, %ymm13
+ vpxor 64(%rdi), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rcx)
+ vmovdqu %ymm1, -32(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, (%rcx)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 3
+ vpxor 32(%rax), %ymm9, %ymm10
+ vpxor 128(%rcx), %ymm5, %ymm11
+ vpxor 32(%rdi), %ymm6, %ymm12
+ vpxor 128(%rax), %ymm7, %ymm13
+ vpxor -64(%rdi), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rax)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, 32(%rdi)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, -64(%rdi)
+ # Row 4
+ vpxor -96(%rax), %ymm7, %ymm10
+ vpxor 96(%rax), %ymm8, %ymm11
+ vpxor -96(%rdi), %ymm9, %ymm12
+ vpxor (%rax), %ymm5, %ymm13
+ vpxor 96(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -96(%rax)
+ vmovdqu %ymm1, 96(%rax)
+ vmovdqu %ymm2, -96(%rdi)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, 96(%rcx)
+ # Round 21
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -64(%rdi), %ymm4, %ymm14
+ vpxor -32(%rdi), %ymm1, %ymm11
+ vpxor (%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm2, %ymm12
+ vpxor 64(%rdi), %ymm14, %ymm14
+ vpxor 96(%rdi), %ymm11, %ymm11
+ vpxor 128(%rdi), %ymm13, %ymm13
+ vpxor -64(%rax), %ymm14, %ymm14
+ vpxor -32(%rax), %ymm11, %ymm11
+ vpxor 32(%rax), %ymm10, %ymm10
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm10, %ymm10
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor -32(%rcx), %ymm14, %ymm14
+ vpxor (%rcx), %ymm13, %ymm13
+ vpxor 32(%rcx), %ymm10, %ymm10
+ vpxor 64(%rcx), %ymm12, %ymm12
+ vpxor 128(%rcx), %ymm11, %ymm11
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor 96(%rdi), %ymm6, %ymm11
+ vpxor 64(%rax), %ymm7, %ymm12
+ vpxor 128(%rax), %ymm8, %ymm13
+ vpxor 96(%rcx), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 672(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, 96(%rdi)
+ vmovdqu %ymm2, 64(%rax)
+ vmovdqu %ymm3, 128(%rax)
+ vmovdqu %ymm4, 96(%rcx)
+ # Row 1
+ vpxor 128(%rdi), %ymm8, %ymm10
+ vpxor -64(%rax), %ymm9, %ymm11
+ vpxor -96(%rcx), %ymm5, %ymm12
+ vpxor 128(%rcx), %ymm6, %ymm13
+ vpxor -96(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rdi)
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, 128(%rcx)
+ vmovdqu %ymm4, -96(%rdi)
+ # Row 2
+ vpxor -32(%rax), %ymm6, %ymm10
+ vpxor -64(%rcx), %ymm7, %ymm11
+ vpxor (%rcx), %ymm8, %ymm12
+ vpxor -64(%rdi), %ymm9, %ymm13
+ vpxor -96(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rax)
+ vmovdqu %ymm1, -64(%rcx)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, -64(%rdi)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 3
+ vpxor -32(%rcx), %ymm9, %ymm10
+ vpxor 32(%rcx), %ymm5, %ymm11
+ vpxor -32(%rdi), %ymm6, %ymm12
+ vpxor 32(%rdi), %ymm7, %ymm13
+ vpxor (%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -32(%rcx)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, -32(%rdi)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, (%rax)
+ # Row 4
+ vpxor 64(%rcx), %ymm7, %ymm10
+ vpxor (%rdi), %ymm8, %ymm11
+ vpxor 64(%rdi), %ymm9, %ymm12
+ vpxor 32(%rax), %ymm5, %ymm13
+ vpxor 96(%rax), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rcx)
+ vmovdqu %ymm1, (%rdi)
+ vmovdqu %ymm2, 64(%rdi)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, 96(%rax)
+ # Round 22
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm4, %ymm14
+ vpxor -64(%rdi), %ymm3, %ymm13
+ vpxor -32(%rdi), %ymm2, %ymm12
+ vpxor 32(%rdi), %ymm13, %ymm13
+ vpxor 96(%rdi), %ymm1, %ymm11
+ vpxor 128(%rdi), %ymm10, %ymm10
+ vpxor -96(%rax), %ymm14, %ymm14
+ vpxor -64(%rax), %ymm11, %ymm11
+ vpxor -32(%rax), %ymm10, %ymm10
+ vpxor (%rax), %ymm14, %ymm14
+ vpxor 64(%rax), %ymm12, %ymm12
+ vpxor 128(%rax), %ymm13, %ymm13
+ vpxor -96(%rcx), %ymm12, %ymm12
+ vpxor -64(%rcx), %ymm11, %ymm11
+ vpxor -32(%rcx), %ymm10, %ymm10
+ vpxor (%rcx), %ymm12, %ymm12
+ vpxor 32(%rcx), %ymm11, %ymm11
+ vpxor 96(%rcx), %ymm14, %ymm14
+ vpxor 128(%rcx), %ymm13, %ymm13
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -64(%rax), %ymm6, %ymm11
+ vpxor (%rcx), %ymm7, %ymm12
+ vpxor 32(%rdi), %ymm8, %ymm13
+ vpxor 96(%rax), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 704(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -64(%rax)
+ vmovdqu %ymm2, (%rcx)
+ vmovdqu %ymm3, 32(%rdi)
+ vmovdqu %ymm4, 96(%rax)
+ # Row 1
+ vpxor 128(%rax), %ymm8, %ymm10
+ vpxor -96(%rdi), %ymm9, %ymm11
+ vpxor -32(%rax), %ymm5, %ymm12
+ vpxor 32(%rcx), %ymm6, %ymm13
+ vpxor 64(%rdi), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 128(%rax)
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, -32(%rax)
+ vmovdqu %ymm3, 32(%rcx)
+ vmovdqu %ymm4, 64(%rdi)
+ # Row 2
+ vpxor 96(%rdi), %ymm6, %ymm10
+ vpxor -96(%rcx), %ymm7, %ymm11
+ vpxor -64(%rdi), %ymm8, %ymm12
+ vpxor (%rax), %ymm9, %ymm13
+ vpxor 64(%rcx), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rdi)
+ vmovdqu %ymm1, -96(%rcx)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, (%rax)
+ vmovdqu %ymm4, 64(%rcx)
+ # Row 3
+ vpxor 96(%rcx), %ymm9, %ymm10
+ vpxor 128(%rdi), %ymm5, %ymm11
+ vpxor -64(%rcx), %ymm6, %ymm12
+ vpxor -32(%rdi), %ymm7, %ymm13
+ vpxor 32(%rax), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rcx)
+ vmovdqu %ymm1, 128(%rdi)
+ vmovdqu %ymm2, -64(%rcx)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, 32(%rax)
+ # Row 4
+ vpxor 64(%rax), %ymm7, %ymm10
+ vpxor 128(%rcx), %ymm8, %ymm11
+ vpxor -96(%rax), %ymm9, %ymm12
+ vpxor -32(%rcx), %ymm5, %ymm13
+ vpxor (%rdi), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 64(%rax)
+ vmovdqu %ymm1, 128(%rcx)
+ vmovdqu %ymm2, -96(%rax)
+ vmovdqu %ymm3, -32(%rcx)
+ vmovdqu %ymm4, (%rdi)
+ # Round 23
+ # Calc b[0..4]
+ vpxor %ymm15, %ymm0, %ymm10
+ vpxor -96(%rdi), %ymm1, %ymm11
+ vpxor -64(%rdi), %ymm2, %ymm12
+ vpxor -32(%rdi), %ymm3, %ymm13
+ vpxor 32(%rdi), %ymm13, %ymm13
+ vpxor 64(%rdi), %ymm4, %ymm14
+ vpxor 96(%rdi), %ymm10, %ymm10
+ vpxor 128(%rdi), %ymm11, %ymm11
+ vpxor -64(%rax), %ymm11, %ymm11
+ vpxor -32(%rax), %ymm12, %ymm12
+ vpxor (%rax), %ymm13, %ymm13
+ vpxor 32(%rax), %ymm14, %ymm14
+ vpxor 96(%rax), %ymm14, %ymm14
+ vpxor 128(%rax), %ymm10, %ymm10
+ vpxor -96(%rcx), %ymm11, %ymm11
+ vpxor -64(%rcx), %ymm12, %ymm12
+ vpxor (%rcx), %ymm12, %ymm12
+ vpxor 32(%rcx), %ymm13, %ymm13
+ vpxor 64(%rcx), %ymm14, %ymm14
+ vpxor 96(%rcx), %ymm10, %ymm10
+ # Calc t[0..4]
+ vpsrlq $63, %ymm11, %ymm0
+ vpsrlq $63, %ymm12, %ymm1
+ vpsrlq $63, %ymm13, %ymm2
+ vpsrlq $63, %ymm14, %ymm3
+ vpsrlq $63, %ymm10, %ymm4
+ vpaddq %ymm11, %ymm11, %ymm5
+ vpaddq %ymm12, %ymm12, %ymm6
+ vpaddq %ymm13, %ymm13, %ymm7
+ vpaddq %ymm14, %ymm14, %ymm8
+ vpaddq %ymm10, %ymm10, %ymm9
+ vpor %ymm0, %ymm5, %ymm5
+ vpor %ymm1, %ymm6, %ymm6
+ vpor %ymm2, %ymm7, %ymm7
+ vpor %ymm3, %ymm8, %ymm8
+ vpor %ymm4, %ymm9, %ymm9
+ vpxor %ymm14, %ymm5, %ymm5
+ vpxor %ymm10, %ymm6, %ymm6
+ vpxor %ymm11, %ymm7, %ymm7
+ vpxor %ymm12, %ymm8, %ymm8
+ vpxor %ymm13, %ymm9, %ymm9
+ # Row Mix
+ # Row 0
+ vpxor %ymm15, %ymm5, %ymm10
+ vpxor -96(%rdi), %ymm6, %ymm11
+ vpxor -64(%rdi), %ymm7, %ymm12
+ vpxor -32(%rdi), %ymm8, %ymm13
+ vpxor (%rdi), %ymm9, %ymm14
+ vpsrlq $20, %ymm11, %ymm0
+ vpsrlq $21, %ymm12, %ymm1
+ vpsrlq $43, %ymm13, %ymm2
+ vpsrlq $50, %ymm14, %ymm3
+ vpsllq $44, %ymm11, %ymm11
+ vpsllq $43, %ymm12, %ymm12
+ vpsllq $21, %ymm13, %ymm13
+ vpsllq $14, %ymm14, %ymm14
+ vpor %ymm0, %ymm11, %ymm11
+ vpor %ymm1, %ymm12, %ymm12
+ vpor %ymm2, %ymm13, %ymm13
+ vpor %ymm3, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm15
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm15, %ymm15
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ # XOR in constant
+ vpxor 736(%rdx), %ymm15, %ymm15
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm1, -96(%rdi)
+ vmovdqu %ymm2, -64(%rdi)
+ vmovdqu %ymm3, -32(%rdi)
+ vmovdqu %ymm4, (%rdi)
+ # Row 1
+ vpxor 32(%rdi), %ymm8, %ymm10
+ vpxor 64(%rdi), %ymm9, %ymm11
+ vpxor 96(%rdi), %ymm5, %ymm12
+ vpxor 128(%rdi), %ymm6, %ymm13
+ vpxor -96(%rax), %ymm7, %ymm14
+ vpsrlq $36, %ymm10, %ymm0
+ vpsrlq $44, %ymm11, %ymm1
+ vpsrlq $61, %ymm12, %ymm2
+ vpsrlq $19, %ymm13, %ymm3
+ vpsrlq $3, %ymm14, %ymm4
+ vpsllq $28, %ymm10, %ymm10
+ vpsllq $20, %ymm11, %ymm11
+ vpsllq $3, %ymm12, %ymm12
+ vpsllq $45, %ymm13, %ymm13
+ vpsllq $61, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 32(%rdi)
+ vmovdqu %ymm1, 64(%rdi)
+ vmovdqu %ymm2, 96(%rdi)
+ vmovdqu %ymm3, 128(%rdi)
+ vmovdqu %ymm4, -96(%rax)
+ # Row 2
+ vpxor -64(%rax), %ymm6, %ymm10
+ vpxor -32(%rax), %ymm7, %ymm11
+ vpxor (%rax), %ymm8, %ymm12
+ vpxor 32(%rax), %ymm9, %ymm13
+ vpxor 64(%rax), %ymm5, %ymm14
+ vpsrlq $63, %ymm10, %ymm0
+ vpsrlq $58, %ymm11, %ymm1
+ vpsrlq $39, %ymm12, %ymm2
+ vpsrlq $56, %ymm13, %ymm3
+ vpsrlq $46, %ymm14, %ymm4
+ vpaddq %ymm10, %ymm10, %ymm10
+ vpsllq $6, %ymm11, %ymm11
+ vpsllq $25, %ymm12, %ymm12
+ vpsllq $8, %ymm13, %ymm13
+ vpsllq $18, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, -64(%rax)
+ vmovdqu %ymm1, -32(%rax)
+ vmovdqu %ymm2, (%rax)
+ vmovdqu %ymm3, 32(%rax)
+ vmovdqu %ymm4, 64(%rax)
+ # Row 3
+ vpxor 96(%rax), %ymm9, %ymm10
+ vpxor 128(%rax), %ymm5, %ymm11
+ vpxor -96(%rcx), %ymm6, %ymm12
+ vpxor -64(%rcx), %ymm7, %ymm13
+ vpxor -32(%rcx), %ymm8, %ymm14
+ vpsrlq $37, %ymm10, %ymm0
+ vpsrlq $28, %ymm11, %ymm1
+ vpsrlq $54, %ymm12, %ymm2
+ vpsrlq $49, %ymm13, %ymm3
+ vpsrlq $8, %ymm14, %ymm4
+ vpsllq $27, %ymm10, %ymm10
+ vpsllq $36, %ymm11, %ymm11
+ vpsllq $10, %ymm12, %ymm12
+ vpsllq $15, %ymm13, %ymm13
+ vpsllq $56, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, 96(%rax)
+ vmovdqu %ymm1, 128(%rax)
+ vmovdqu %ymm2, -96(%rcx)
+ vmovdqu %ymm3, -64(%rcx)
+ vmovdqu %ymm4, -32(%rcx)
+ # Row 4
+ vpxor (%rcx), %ymm7, %ymm10
+ vpxor 32(%rcx), %ymm8, %ymm11
+ vpxor 64(%rcx), %ymm9, %ymm12
+ vpxor 96(%rcx), %ymm5, %ymm13
+ vpxor 128(%rcx), %ymm6, %ymm14
+ vpsrlq $2, %ymm10, %ymm0
+ vpsrlq $9, %ymm11, %ymm1
+ vpsrlq $25, %ymm12, %ymm2
+ vpsrlq $23, %ymm13, %ymm3
+ vpsrlq $62, %ymm14, %ymm4
+ vpsllq $62, %ymm10, %ymm10
+ vpsllq $55, %ymm11, %ymm11
+ vpsllq $39, %ymm12, %ymm12
+ vpsllq $41, %ymm13, %ymm13
+ vpsllq $2, %ymm14, %ymm14
+ vpor %ymm0, %ymm10, %ymm10
+ vpor %ymm1, %ymm11, %ymm11
+ vpor %ymm2, %ymm12, %ymm12
+ vpor %ymm3, %ymm13, %ymm13
+ vpor %ymm4, %ymm14, %ymm14
+ vpandn %ymm12, %ymm11, %ymm0
+ vpandn %ymm13, %ymm12, %ymm1
+ vpandn %ymm14, %ymm13, %ymm2
+ vpandn %ymm10, %ymm14, %ymm3
+ vpandn %ymm11, %ymm10, %ymm4
+ vpxor %ymm10, %ymm0, %ymm0
+ vpxor %ymm11, %ymm1, %ymm1
+ vpxor %ymm12, %ymm2, %ymm2
+ vpxor %ymm13, %ymm3, %ymm3
+ vpxor %ymm14, %ymm4, %ymm4
+ vmovdqu %ymm0, (%rcx)
+ vmovdqu %ymm1, 32(%rcx)
+ vmovdqu %ymm2, 64(%rcx)
+ vmovdqu %ymm3, 96(%rcx)
+ vmovdqu %ymm4, 128(%rcx)
+ subq $0x80, %rdi
+ vmovdqu %ymm15, (%rdi)
+ vzeroupper
+ repz retq
+#ifndef __APPLE__
+.size kyber_sha3_256_blocksx4_seed_avx2,.-kyber_sha3_256_blocksx4_seed_avx2
+#endif /* __APPLE__ */
+#endif /* HAVE_INTEL_AVX2 */
+#endif /* WOLFSSL_WC_KYBER */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_poly.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_poly.c
index dfb10ace..fe140f40 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_poly.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_kyber_poly.c
@@ -1,6 +1,6 @@
/* wc_kyber_poly.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
@@ -19,8 +19,3020 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-#include <wolfssl/wolfcrypt/settings.h>
+/* Implementation based on NIST 3rd Round submission package.
+ * See link at:
+ * https://csrc.nist.gov/Projects/post-quantum-cryptography/post-quantum-cryptography-standardization/round-3-submissions
+ */
+
+/* Implementation of the functions that operate on polynomials or vectors of
+ * polynomials.
+ */
+
+#include <wolfssl/wolfcrypt/wc_kyber.h>
+#include <wolfssl/wolfcrypt/cpuid.h>
+#include <wolfssl/wolfcrypt/error-crypt.h>
+
+#ifdef WOLFSSL_WC_KYBER
+
+#ifdef USE_INTEL_SPEEDUP
+static word32 cpuid_flags = 0;
+#endif
+
+/* Half of Q plus one. Converted message bit value of 1. */
+#define KYBER_Q_1_HALF ((KYBER_Q + 1) / 2)
+/* Half of Q */
+#define KYBER_Q_HALF (KYBER_Q / 2)
+
+
+/* q^-1 mod 2^16 (inverse of 3329 mod 16384) */
+#define KYBER_QINV 62209
+
+/* Used in Barrett Reduction:
+ * r = a mod q
+ * => r = a - ((V * a) >> 26) * q), as V based on 2^26
+ * V is the mulitplier that gets the quotient after shifting.
+ */
+#define KYBER_V (((1U << 26) + (KYBER_Q / 2)) / KYBER_Q)
+
+/* Used in converting to Montgomery form.
+ * f is the normalizer = 2^k % m.
+ * 16-bit value cast to sword32 in use.
+ */
+#define KYBER_F ((1ULL << 32) % KYBER_Q)
+
+/* Number of bytes in an output block of SHA-3-128 */
+#define SHA3_128_BYTES (WC_SHA3_128_COUNT * 8)
+/* Number of bytes in an output block of SHA-3-256 */
+#define SHA3_256_BYTES (WC_SHA3_256_COUNT * 8)
+
+/* Number of blocks to generate for matrix. */
+#define GEN_MATRIX_NBLOCKS \
+ ((12 * KYBER_N / 8 * (1 << 12) / KYBER_Q + XOF_BLOCK_SIZE) / XOF_BLOCK_SIZE)
+/* Number of bytes to generate for matrix. */
+#define GEN_MATRIX_SIZE GEN_MATRIX_NBLOCKS * XOF_BLOCK_SIZE
+
+
+/* Number of random bytes to generate for ETA3. */
+#define ETA3_RAND_SIZE ((3 * KYBER_N) / 4)
+/* Number of random bytes to generate for ETA2. */
+#define ETA2_RAND_SIZE ((2 * KYBER_N) / 4)
+
+
+/* Montgomery reduce a.
+ *
+ * @param [in] a 32-bit value to be reduced.
+ * @return Montgomery reduction result.
+ */
+#define KYBER_MONT_RED(a) \
+ (sword16)(((a) - (sword32)(((sword16)((sword16)(a) * \
+ (sword16)KYBER_QINV)) * \
+ (sword32)KYBER_Q)) >> 16)
+
+/* Barrett reduce a. r = a mod q.
+ *
+ * Converted division to multiplication.
+ *
+ * @param [in] a 16-bit value to be reduced to range of q.
+ * @return Modulo result.
+ */
+#define KYBER_BARRETT_RED(a) \
+ (sword16)((sword16)(a) - (sword16)((sword16)( \
+ ((sword32)((sword32)KYBER_V * (sword16)(a))) >> 26) * (word16)KYBER_Q))
+
+
+/* Zetas for NTT. */
+const sword16 zetas[KYBER_N / 2] = {
+ 2285, 2571, 2970, 1812, 1493, 1422, 287, 202, 3158, 622, 1577, 182,
+ 962, 2127, 1855, 1468, 573, 2004, 264, 383, 2500, 1458, 1727, 3199,
+ 2648, 1017, 732, 608, 1787, 411, 3124, 1758, 1223, 652, 2777, 1015,
+ 2036, 1491, 3047, 1785, 516, 3321, 3009, 2663, 1711, 2167, 126, 1469,
+ 2476, 3239, 3058, 830, 107, 1908, 3082, 2378, 2931, 961, 1821, 2604,
+ 448, 2264, 677, 2054, 2226, 430, 555, 843, 2078, 871, 1550, 105,
+ 422, 587, 177, 3094, 3038, 2869, 1574, 1653, 3083, 778, 1159, 3182,
+ 2552, 1483, 2727, 1119, 1739, 644, 2457, 349, 418, 329, 3173, 3254,
+ 817, 1097, 603, 610, 1322, 2044, 1864, 384, 2114, 3193, 1218, 1994,
+ 2455, 220, 2142, 1670, 2144, 1799, 2051, 794, 1819, 2475, 2459, 478,
+ 3221, 3021, 996, 991, 958, 1869, 1522, 1628
+};
+
+/* Zetas for inverse NTT. */
+const sword16 zetas_inv[KYBER_N / 2] = {
+ 1701, 1807, 1460, 2371, 2338, 2333, 308, 108, 2851, 870, 854, 1510,
+ 2535, 1278, 1530, 1185, 1659, 1187, 3109, 874, 1335, 2111, 136, 1215,
+ 2945, 1465, 1285, 2007, 2719, 2726, 2232, 2512, 75, 156, 3000, 2911,
+ 2980, 872, 2685, 1590, 2210, 602, 1846, 777, 147, 2170, 2551, 246,
+ 1676, 1755, 460, 291, 235, 3152, 2742, 2907, 3224, 1779, 2458, 1251,
+ 2486, 2774, 2899, 1103, 1275, 2652, 1065, 2881, 725, 1508, 2368, 398,
+ 951, 247, 1421, 3222, 2499, 271, 90, 853, 1860, 3203, 1162, 1618,
+ 666, 320, 8, 2813, 1544, 282, 1838, 1293, 2314, 552, 2677, 2106,
+ 1571, 205, 2918, 1542, 2721, 2597, 2312, 681, 130, 1602, 1871, 829,
+ 2946, 3065, 1325, 2756, 1861, 1474, 1202, 2367, 3147, 1752, 2707, 171,
+ 3127, 3042, 1907, 1836, 1517, 359, 758, 1441
+};
+
+
+/* Number-Theoretic Transform.
+ *
+ * @param [in, out] r Polynomial to transform.
+ */
+static void kyber_ntt(sword16* r)
+{
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int len;
+ unsigned int k;
+ unsigned int j;
+
+ k = 1;
+ for (len = KYBER_N / 2; len >= 2; len >>= 1) {
+ unsigned int start;
+ for (start = 0; start < KYBER_N; start = j + len) {
+ sword16 zeta = zetas[k++];
+ for (j = start; j < start + len; ++j) {
+ sword32 p = (sword32)zeta * r[j + len];
+ sword16 t = KYBER_MONT_RED(p);
+ sword16 rj = r[j];
+ r[j + len] = rj - t;
+ r[j] = rj + t;
+ }
+ }
+ }
+
+ /* Reduce coefficients with quick algorithm. */
+ for (j = 0; j < KYBER_N; ++j) {
+ r[j] = KYBER_BARRETT_RED(r[j]);
+ }
+#else
+ unsigned int len;
+ unsigned int k = 1;
+ unsigned int j;
+ unsigned int start;
+ sword16 zeta = zetas[k++];
+
+ for (j = 0; j < KYBER_N / 2; ++j) {
+ sword32 p = (sword32)zeta * r[j + KYBER_N / 2];
+ sword16 t = KYBER_MONT_RED(p);
+ sword16 rj = r[j];
+ r[j + KYBER_N / 2] = rj - t;
+ r[j] = rj + t;
+ }
+ for (len = KYBER_N / 4; len >= 2; len >>= 1) {
+ for (start = 0; start < KYBER_N; start = j + len) {
+ zeta = zetas[k++];
+ for (j = start; j < start + len; ++j) {
+ sword32 p = (sword32)zeta * r[j + len];
+ sword16 t = KYBER_MONT_RED(p);
+ sword16 rj = r[j];
+ r[j + len] = rj - t;
+ r[j] = rj + t;
+ }
+ }
+ }
+
+ /* Reduce coefficients with quick algorithm. */
+ for (j = 0; j < KYBER_N; ++j) {
+ r[j] = KYBER_BARRETT_RED(r[j]);
+ }
+#endif
+}
+
+/* Inverse Number-Theoretic Transform.
+ *
+ * @param [in, out] r Polynomial to transform.
+ */
+static void kyber_invntt(sword16* r)
+{
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int len;
+ unsigned int k;
+ unsigned int j;
+ sword16 zeta;
+
+ k = 0;
+ for (len = 2; len <= KYBER_N / 2; len <<= 1) {
+ unsigned int start;
+ for (start = 0; start < KYBER_N; start = j + len) {
+ zeta = zetas_inv[k++];
+ for (j = start; j < start + len; ++j) {
+ sword32 p;
+ sword16 rj = r[j];
+ sword16 rjl = r[j + len];
+ sword16 t = rj + rjl;
+ r[j] = KYBER_BARRETT_RED(t);
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[j + len] = KYBER_MONT_RED(p);
+ }
+ }
+ }
+
+ zeta = zetas_inv[127];
+ for (j = 0; j < KYBER_N; ++j) {
+ sword32 p = (sword32)zeta * r[j];
+ r[j] = KYBER_MONT_RED(p);
+ }
+#else
+ unsigned int k;
+ unsigned int j;
+ unsigned int start;
+ sword16 zeta;
+ sword16 zeta2;
+
+ k = 0;
+ for (start = 0; start < KYBER_N; start += 2 * 2) {
+ zeta = zetas_inv[k++];
+ for (j = 0; j < 2; ++j) {
+ sword32 p;
+ sword16 rj = r[start + j];
+ sword16 rjl = r[start + j + 2];
+ sword16 t = rj + rjl;
+ r[start + j] = t;
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[start + j + 2] = KYBER_MONT_RED(p);
+ }
+ }
+ for (start = 0; start < KYBER_N; start += 2 * 4) {
+ zeta = zetas_inv[k++];
+ for (j = 0; j < 4; ++j) {
+ sword32 p;
+ sword16 rj = r[start + j];
+ sword16 rjl = r[start + j + 4];
+ sword16 t = rj + rjl;
+ r[start + j] = t;
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[start + j + 4] = KYBER_MONT_RED(p);
+ }
+ }
+ for (start = 0; start < KYBER_N; start += 2 * 8) {
+ zeta = zetas_inv[k++];
+ for (j = 0; j < 8; ++j) {
+ sword32 p;
+ sword16 rj = r[start + j];
+ sword16 rjl = r[start + j + 8];
+ sword16 t = rj + rjl;
+ /* Reduce. */
+ r[start + j] = KYBER_BARRETT_RED(t);
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[start + j + 8] = KYBER_MONT_RED(p);
+ }
+ }
+ for (start = 0; start < KYBER_N; start += 2 * 16) {
+ zeta = zetas_inv[k++];
+ for (j = 0; j < 16; ++j) {
+ sword32 p;
+ sword16 rj = r[start + j];
+ sword16 rjl = r[start + j + 16];
+ sword16 t = rj + rjl;
+ r[start + j] = t;
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[start + j + 16] = KYBER_MONT_RED(p);
+ }
+ }
+ for (start = 0; start < KYBER_N; start += 2 * 32) {
+ zeta = zetas_inv[k++];
+ for (j = 0; j < 32; ++j) {
+ sword32 p;
+ sword16 rj = r[start + j];
+ sword16 rjl = r[start + j + 32];
+ sword16 t = rj + rjl;
+ r[start + j] = t;
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[start + j + 32] = KYBER_MONT_RED(p);
+ }
+ }
+ for (start = 0; start < KYBER_N; start += 2 * 64) {
+ zeta = zetas_inv[k++];
+ for (j = 0; j < 64; ++j) {
+ sword32 p;
+ sword16 rj = r[start + j];
+ sword16 rjl = r[start + j + 64];
+ sword16 t = rj + rjl;
+ /* Reduce. */
+ r[start + j] = KYBER_BARRETT_RED(t);
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[start + j + 64] = KYBER_MONT_RED(p);
+ }
+ }
+ zeta = zetas_inv[126];
+ zeta2 = zetas_inv[127];
+ for (j = 0; j < KYBER_N / 2; ++j) {
+ sword32 p;
+ sword16 rj = r[j];
+ sword16 rjl = r[j + KYBER_N / 2];
+ sword16 t = rj + rjl;
+ rjl = rj - rjl;
+ p = (sword32)zeta * rjl;
+ r[j] = t;
+ r[j + KYBER_N / 2] = KYBER_MONT_RED(p);
+
+ p = (sword32)zeta2 * r[j];
+ r[j] = KYBER_MONT_RED(p);
+ p = (sword32)zeta2 * r[j + KYBER_N / 2];
+ r[j + KYBER_N / 2] = KYBER_MONT_RED(p);
+ }
+#endif
+}
+
+/* Multiplication of polynomials in Zq[X]/(X^2-zeta).
+ *
+ * Used for multiplication of elements in Rq in NTT domain.
+ *
+ * @param [out] r Result polynomial.
+ * @param [in] a First factor.
+ * @param [in] b Second factor.
+ * @param [in] zeta Integer defining the reduction polynomial.
+ */
+static void kyber_basemul(sword16* r, const sword16* a, const sword16* b,
+ sword16 zeta)
+{
+ sword16 r0;
+ sword16 a0 = a[0];
+ sword16 a1 = a[1];
+ sword16 b0 = b[0];
+ sword16 b1 = b[1];
+ sword32 p1;
+ sword32 p2;
+
+ p1 = (sword32)a1 * b1;
+ p2 = (sword32)a0 * b0;
+ r0 = KYBER_MONT_RED(p1);
+ p1 = (sword32)zeta * r0;
+ p1 += p2;
+ r[0] = KYBER_MONT_RED(p1);
+
+ p1 = (sword32)a0 * b1;
+ p2 = (sword32)a1 * b0;
+ p1 += p2;
+ r[1] = KYBER_MONT_RED(p1);
+}
+
+/* Multiply two polynomials in NTT domain. r = a * b.
+ *
+ * @param [out] r Result polynomial.
+ * @param [in] a First polynomial multiplier.
+ * @param [in] b Second polynomial multiplier.
+ */
+static void kyber_basemul_mont(sword16* r, const sword16* a, const sword16* b)
+{
+ unsigned int i;
+ const sword16* zeta = zetas + 64;
+
+#ifdef WOLFSSL_KYBER_SMALL
+ for (i = 0; i < KYBER_N; i += 4, zeta++) {
+ kyber_basemul(r + i + 0, a + i + 0, b + i + 0, zeta[0]);
+ kyber_basemul(r + i + 2, a + i + 2, b + i + 2, -zeta[0]);
+ }
+#else
+ for (i = 0; i < KYBER_N; i += 8, zeta += 2) {
+ kyber_basemul(r + i + 0, a + i + 0, b + i + 0, zeta[0]);
+ kyber_basemul(r + i + 2, a + i + 2, b + i + 2, -zeta[0]);
+ kyber_basemul(r + i + 4, a + i + 4, b + i + 4, zeta[1]);
+ kyber_basemul(r + i + 6, a + i + 6, b + i + 6, -zeta[1]);
+ }
+#endif
+}
+
+/* Multiply two polynomials in NTT domain and add to result. r += a * b.
+ *
+ * @param [in, out] r Result polynomial.
+ * @param [in] a First polynomial multiplier.
+ * @param [in] b Second polynomial multiplier.
+ */
+static void kyber_basemul_mont_add(sword16* r, const sword16* a,
+ const sword16* b)
+{
+ unsigned int i;
+ const sword16* zeta = zetas + 64;
+
+#ifdef WOLFSSL_KYBER_SMALL
+ for (i = 0; i < KYBER_N; i += 4, zeta++) {
+ sword16 t0[2];
+ sword16 t2[2];
+
+ kyber_basemul(t0, a + i + 0, b + i + 0, zeta[0]);
+ kyber_basemul(t2, a + i + 2, b + i + 2, -zeta[0]);
+
+ r[i + 0] += t0[0];
+ r[i + 1] += t0[1];
+ r[i + 2] += t2[0];
+ r[i + 3] += t2[1];
+ }
+#else
+ for (i = 0; i < KYBER_N; i += 8, zeta += 2) {
+ sword16 t0[2];
+ sword16 t2[2];
+ sword16 t4[2];
+ sword16 t6[2];
+
+ kyber_basemul(t0, a + i + 0, b + i + 0, zeta[0]);
+ kyber_basemul(t2, a + i + 2, b + i + 2, -zeta[0]);
+ kyber_basemul(t4, a + i + 4, b + i + 4, zeta[1]);
+ kyber_basemul(t6, a + i + 6, b + i + 6, -zeta[1]);
+
+ r[i + 0] += t0[0];
+ r[i + 1] += t0[1];
+ r[i + 2] += t2[0];
+ r[i + 3] += t2[1];
+ r[i + 4] += t4[0];
+ r[i + 5] += t4[1];
+ r[i + 6] += t6[0];
+ r[i + 7] += t6[1];
+ }
+#endif
+}
+
+/* Pointwise multiply elements of a and b, into r, and multiply by 2^-16.
+ *
+ * @param [out] r Result polynomial.
+ * @param [in] a First vector polynomial to multiply with.
+ * @param [in] b Second vector polynomial to multiply with.
+ * @param [in] kp Number of polynomials in vector.
+ */
+static void kyber_pointwise_acc_mont(sword16* r, const sword16* a,
+ const sword16* b, unsigned int kp)
+{
+ unsigned int i;
+
+ kyber_basemul_mont(r, a, b);
+ for (i = 1; i < kp - 1; ++i) {
+ kyber_basemul_mont_add(r, a + i * KYBER_N, b + i * KYBER_N);
+ }
+ kyber_basemul_mont_add(r, a + (kp - 1) * KYBER_N, b + (kp - 1) * KYBER_N);
+}
+
+/******************************************************************************/
+
+/* Initialize Kyber implementation.
+ */
+void kyber_init(void)
+{
+#ifdef USE_INTEL_SPEEDUP
+ cpuid_flags = cpuid_get_flags();
+#endif
+}
+
+/******************************************************************************/
+
+/* Generate a public-private key pair from randomly generated data.
+ *
+ * @param [in, out] priv Private key vector of polynomials.
+ * @param [out] pub Public key vector of polynomials.
+ * @param [in] e Error values as a vector of polynomials. Modified.
+ * @param [in] a Random values in an array of vectors of polynomials.
+ * @param [in] kp Number of polynomials in vector.
+ */
+static void kyber_keygen_c(sword16* priv, sword16* pub, sword16* e,
+ const sword16* a, int kp)
+{
+ int i;
+
+ /* Transform private key. All of result used in public key calculation */
+ for (i = 0; i < kp; ++i) {
+ kyber_ntt(priv + i * KYBER_N);
+ }
+
+ /* For each polynomial in the vectors. */
+ for (i = 0; i < kp; ++i) {
+ unsigned int j;
+
+ /* Multiply a by private into public polynomial. */
+ kyber_pointwise_acc_mont(pub + i * KYBER_N, a + i * kp * KYBER_N, priv,
+ kp);
+ /* Convert public polynomial to Montgomery form. */
+ for (j = 0; j < KYBER_N; ++j) {
+ sword32 t = pub[i * KYBER_N + j] * (sword32)KYBER_F;
+ pub[i * KYBER_N + j] = KYBER_MONT_RED(t);
+ }
+ /* Transform error values polynomial. */
+ kyber_ntt(e + i * KYBER_N);
+ /* Add errors to public key and reduce. */
+ for (j = 0; j < KYBER_N; ++j) {
+ sword16 t = pub[i * KYBER_N + j] + e[i * KYBER_N + j];
+ pub[i * KYBER_N + j] = KYBER_BARRETT_RED(t);
+ }
+ }
+}
+
+/* Generate a public-private key pair from randomly generated data.
+ *
+ * @param [in, out] priv Private key vector of polynomials.
+ * @param [out] pub Public key vector of polynomials.
+ * @param [in] e Error values as a vector of polynomials. Modified.
+ * @param [in] a Random values in an array of vectors of polynomials.
+ * @param [in] kp Number of polynomials in vector.
+ */
+void kyber_keygen(sword16* priv, sword16* pub, sword16* e, const sword16* a,
+ int kp)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_keygen_avx2(priv, pub, e, a, kp);
+ }
+ else
+#endif
+ {
+ kyber_keygen_c(priv, pub, e, a, kp);
+ }
+}
+
+/* Encapsuluate message.
+ *
+ * @param [in] pub Public key vector of polynomials.
+ * @param [out] bp Vector of polynomials.
+ * @param [out] v Polynomial.
+ * @param [in] at Array of vector of polynomials.
+ * @param [in] sp Vector of polynomials.
+ * @param [in] ep Error Vector of polynomials.
+ * @param [in] epp Error polynomial.
+ * @param [in] m Message polynomial.
+ * @param [in] kp Number of polynomials in vector.
+ */
+static void kyber_encapsulate_c(const sword16* pub, sword16* bp, sword16* v,
+ const sword16* at, sword16* sp, const sword16* ep, const sword16* epp,
+ const sword16* m, int kp)
+{
+ int i;
+
+ /* Transform sp. All of result used in calculation of bp and v. */
+ for (i = 0; i < kp; ++i) {
+ kyber_ntt(sp + i * KYBER_N);
+ }
+
+ /* For each polynomial in the vectors. */
+ for (i = 0; i < kp; ++i) {
+ unsigned int j;
+
+ /* Multiply at by sp into bp polynomial. */
+ kyber_pointwise_acc_mont(bp + i * KYBER_N, at + i * kp * KYBER_N, sp,
+ kp);
+ /* Inverse transform bp polynomial. */
+ kyber_invntt(bp + i * KYBER_N);
+ /* Add errors to bp and reduce. */
+ for (j = 0; j < KYBER_N; ++j) {
+ sword16 t = bp[i * KYBER_N + j] + ep[i * KYBER_N + j];
+ bp[i * KYBER_N + j] = KYBER_BARRETT_RED(t);
+ }
+ }
+
+ /* Multiply public key by sp into v polynomial. */
+ kyber_pointwise_acc_mont(v, pub, sp, kp);
+ /* Inverse transform v. */
+ kyber_invntt(v);
+ /* Add errors and message to v and reduce. */
+ for (i = 0; i < KYBER_N; ++i) {
+ sword16 t = v[i] + epp[i] + m[i];
+ v[i] = KYBER_BARRETT_RED(t);
+ }
+}
+
+
+/* Encapsulate message.
+ *
+ * @param [in] pub Public key vector of polynomials.
+ * @param [out] bp Vector of polynomials.
+ * @param [out] v Polynomial.
+ * @param [in] at Array of vector of polynomials.
+ * @param [in] sp Vector of polynomials.
+ * @param [in] ep Error Vector of polynomials.
+ * @param [in] epp Error polynomial.
+ * @param [in] m Message polynomial.
+ * @param [in] kp Number of polynomials in vector.
+ */
+void kyber_encapsulate(const sword16* pub, sword16* bp, sword16* v,
+ const sword16* at, sword16* sp, const sword16* ep, const sword16* epp,
+ const sword16* m, int kp)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_encapsulate_avx2(pub, bp, v, at, sp, ep, epp, m, kp);
+ }
+ else
+#endif
+ {
+ kyber_encapsulate_c(pub, bp, v, at, sp, ep, epp, m, kp);
+ }
+}
+
+/* Decapsulate message.
+ *
+ * @param [in] priv Private key vector of polynomials.
+ * @param [out] mp Message polynomial.
+ * @param [in] bp Vector of polynomials containing error.
+ * @param [in] v Encapsulated message polynomial.
+ * @param [in] kp Number of polynomials in vector.
+ */
+static void kyber_decapsulate_c(const sword16* priv, sword16* mp, sword16* bp,
+ const sword16* v, int kp)
+{
+ int i;
+
+ /* Transform bp. All of result used in calculation of mp. */
+ for (i = 0; i < kp; ++i) {
+ kyber_ntt(bp + i * KYBER_N);
+ }
+
+ /* Multiply private key by bp into mp polynomial. */
+ kyber_pointwise_acc_mont(mp, priv, bp, kp);
+ /* Inverse transform mp. */
+ kyber_invntt(mp);
+ /* Subtract errors (mp) out of v and reduce into mp. */
+ for (i = 0; i < KYBER_N; ++i) {
+ sword16 t = v[i] - mp[i];
+ mp[i] = KYBER_BARRETT_RED(t);
+ }
+}
+
+/* Decapsulate message.
+ *
+ * @param [in] priv Private key vector of polynomials.
+ * @param [out] mp Message polynomial.
+ * @param [in] bp Vector of polynomials containing error.
+ * @param [in] v Encapsulated message polynomial.
+ * @param [in] kp Number of polynomials in vector.
+ */
+void kyber_decapsulate(const sword16* priv, sword16* mp, sword16* bp,
+ const sword16* v, int kp)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_decapsulate_avx2(priv, mp, bp, v, kp);
+ }
+ else
+#endif
+ {
+ kyber_decapsulate_c(priv, mp, bp, v, kp);
+ }
+}
+
+/******************************************************************************/
+
+#ifdef USE_INTEL_SPEEDUP
+#ifdef WOLFSSL_KYBER512
+/* Deterministically generate a matrix (or transpose) of uniform integers mod q.
+ *
+ * Seed used with XOF to generate random bytes.
+ *
+ * @param [out] a Matrix of uniform integers.
+ * @param [in] seed Bytes to seed XOF generation.
+ * @param [in] transposed Whether A or A^T is generated.
+ * @return 0 on success.
+ * @return MEMORY_E when dynamic memory allocation fails. Only possible when
+ * WOLFSSL_SMALL_STACK is defined.
+ */
+static int kyber_gen_matrix_k2_avx2(sword16* a, byte* seed, int transposed)
+{
+ int i;
+ byte rand[4 * GEN_MATRIX_SIZE + 2];
+ word64 state[25 * 4];
+ unsigned int ctr0;
+ unsigned int ctr1;
+ unsigned int ctr2;
+ unsigned int ctr3;
+ byte* p;
+
+ /* Loading 64 bits, only using 48 bits. Loading 2 bytes more than used. */
+ rand[4 * GEN_MATRIX_SIZE + 0] = 0xff;
+ rand[4 * GEN_MATRIX_SIZE + 1] = 0xff;
+
+ if (!transposed) {
+ state[4*4 + 0] = 0x1f0000 + 0x000;
+ state[4*4 + 1] = 0x1f0000 + 0x001;
+ state[4*4 + 2] = 0x1f0000 + 0x100;
+ state[4*4 + 3] = 0x1f0000 + 0x101;
+ }
+ else {
+ state[4*4 + 0] = 0x1f0000 + 0x000;
+ state[4*4 + 1] = 0x1f0000 + 0x100;
+ state[4*4 + 2] = 0x1f0000 + 0x001;
+ state[4*4 + 3] = 0x1f0000 + 0x101;
+ }
+
+ kyber_sha3_128_blocksx4_seed_avx2(state, seed);
+ kyber_redistribute_21_rand_avx2(state, rand + 0 * GEN_MATRIX_SIZE,
+ rand + 1 * GEN_MATRIX_SIZE, rand + 2 * GEN_MATRIX_SIZE,
+ rand + 3 * GEN_MATRIX_SIZE);
+ for (i = SHA3_128_BYTES; i < GEN_MATRIX_SIZE; i += SHA3_128_BYTES) {
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_21_rand_avx2(state, rand + i + 0 * GEN_MATRIX_SIZE,
+ rand + i + 1 * GEN_MATRIX_SIZE, rand + i + 2 * GEN_MATRIX_SIZE,
+ rand + i + 3 * GEN_MATRIX_SIZE);
+ }
+
+ /* Sample random bytes to create a polynomial. */
+ p = rand;
+ ctr0 = kyber_rej_uniform_n_avx2(a + 0 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr1 = kyber_rej_uniform_n_avx2(a + 1 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr2 = kyber_rej_uniform_n_avx2(a + 2 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr3 = kyber_rej_uniform_n_avx2(a + 3 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ /* Create more blocks if too many rejected. */
+ while ((ctr0 < KYBER_N) || (ctr1 < KYBER_N) || (ctr2 < KYBER_N) ||
+ (ctr3 < KYBER_N)) {
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_21_rand_avx2(state, rand + 0 * GEN_MATRIX_SIZE,
+ rand + 1 * GEN_MATRIX_SIZE, rand + 2 * GEN_MATRIX_SIZE,
+ rand + 3 * GEN_MATRIX_SIZE);
+
+ p = rand;
+ ctr0 += kyber_rej_uniform_avx2(a + 0 * KYBER_N + ctr0, KYBER_N - ctr0,
+ p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr1 += kyber_rej_uniform_avx2(a + 1 * KYBER_N + ctr1, KYBER_N - ctr1,
+ p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr2 += kyber_rej_uniform_avx2(a + 2 * KYBER_N + ctr2, KYBER_N - ctr2,
+ p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr3 += kyber_rej_uniform_avx2(a + 3 * KYBER_N + ctr3, KYBER_N - ctr3,
+ p, XOF_BLOCK_SIZE);
+ }
+
+ return 0;
+}
+#endif
+
+#ifdef WOLFSSL_KYBER768
+/* Deterministically generate a matrix (or transpose) of uniform integers mod q.
+ *
+ * Seed used with XOF to generate random bytes.
+ *
+ * @param [out] a Matrix of uniform integers.
+ * @param [in] seed Bytes to seed XOF generation.
+ * @param [in] transposed Whether A or A^T is generated.
+ * @return 0 on success.
+ * @return MEMORY_E when dynamic memory allocation fails. Only possible when
+ * WOLFSSL_SMALL_STACK is defined.
+ */
+static int kyber_gen_matrix_k3_avx2(sword16* a, byte* seed, int transposed)
+{
+ int i;
+ int k;
+ byte rand[4 * GEN_MATRIX_SIZE + 2];
+ word64 state[25 * 4];
+ unsigned int ctr0;
+ unsigned int ctr1;
+ unsigned int ctr2;
+ unsigned int ctr3;
+ byte* p;
+
+ /* Loading 64 bits, only using 48 bits. Loading 2 bytes more than used. */
+ rand[4 * GEN_MATRIX_SIZE + 0] = 0xff;
+ rand[4 * GEN_MATRIX_SIZE + 1] = 0xff;
+
+ for (k = 0; k < 2; k++) {
+ for (i = 0; i < 4; i++) {
+ if (!transposed) {
+ state[4*4 + i] = 0x1f0000 + (((k*4+i)/3) << 8) + ((k*4+i)%3);
+ }
+ else {
+ state[4*4 + i] = 0x1f0000 + (((k*4+i)%3) << 8) + ((k*4+i)/3);
+ }
+ }
+
+ kyber_sha3_128_blocksx4_seed_avx2(state, seed);
+ kyber_redistribute_21_rand_avx2(state,
+ rand + 0 * GEN_MATRIX_SIZE, rand + 1 * GEN_MATRIX_SIZE,
+ rand + 2 * GEN_MATRIX_SIZE, rand + 3 * GEN_MATRIX_SIZE);
+ for (i = SHA3_128_BYTES; i < GEN_MATRIX_SIZE; i += SHA3_128_BYTES) {
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_21_rand_avx2(state,
+ rand + i + 0 * GEN_MATRIX_SIZE, rand + i + 1 * GEN_MATRIX_SIZE,
+ rand + i + 2 * GEN_MATRIX_SIZE, rand + i + 3 * GEN_MATRIX_SIZE);
+ }
+
+ /* Sample random bytes to create a polynomial. */
+ p = rand;
+ ctr0 = kyber_rej_uniform_n_avx2(a + 0 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr1 = kyber_rej_uniform_n_avx2(a + 1 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr2 = kyber_rej_uniform_n_avx2(a + 2 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr3 = kyber_rej_uniform_n_avx2(a + 3 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ /* Create more blocks if too many rejected. */
+ while ((ctr0 < KYBER_N) || (ctr1 < KYBER_N) || (ctr2 < KYBER_N) ||
+ (ctr3 < KYBER_N)) {
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_21_rand_avx2(state, rand + 0 * GEN_MATRIX_SIZE,
+ rand + 1 * GEN_MATRIX_SIZE, rand + 2 * GEN_MATRIX_SIZE,
+ rand + 3 * GEN_MATRIX_SIZE);
+
+ p = rand;
+ ctr0 += kyber_rej_uniform_avx2(a + 0 * KYBER_N + ctr0,
+ KYBER_N - ctr0, p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr1 += kyber_rej_uniform_avx2(a + 1 * KYBER_N + ctr1,
+ KYBER_N - ctr1, p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr2 += kyber_rej_uniform_avx2(a + 2 * KYBER_N + ctr2,
+ KYBER_N - ctr2, p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr3 += kyber_rej_uniform_avx2(a + 3 * KYBER_N + ctr3,
+ KYBER_N - ctr3, p, XOF_BLOCK_SIZE);
+ }
+
+ a += 4 * KYBER_N;
+ }
+
+ state[0] = ((word64*)seed)[0];
+ state[1] = ((word64*)seed)[1];
+ state[2] = ((word64*)seed)[2];
+ state[3] = ((word64*)seed)[3];
+ /* Transposed value same as not. */
+ state[4] = 0x1f0000 + (2 << 8) + 2;
+ XMEMSET(state + 5, 0, sizeof(*state) * (25 - 5));
+ state[20] = 0x8000000000000000UL;
+ for (i = 0; i < GEN_MATRIX_SIZE; i += SHA3_128_BYTES) {
+ if (IS_INTEL_BMI2(cpuid_flags)) {
+ sha3_block_bmi2(state);
+ }
+ else if (IS_INTEL_AVX2(cpuid_flags)) {
+ sha3_block_avx2(state);
+ }
+ else {
+ BlockSha3(state);
+ }
+ XMEMCPY(rand + i, state, SHA3_128_BYTES);
+ }
+ ctr0 = kyber_rej_uniform_n_avx2(a, KYBER_N, rand, GEN_MATRIX_SIZE);
+ while (ctr0 < KYBER_N) {
+ if (IS_INTEL_BMI2(cpuid_flags)) {
+ sha3_block_bmi2(state);
+ }
+ else if (IS_INTEL_AVX2(cpuid_flags)) {
+ sha3_block_avx2(state);
+ }
+ else {
+ BlockSha3(state);
+ }
+ XMEMCPY(rand, state, SHA3_128_BYTES);
+ ctr0 += kyber_rej_uniform_avx2(a + ctr0, KYBER_N - ctr0, rand,
+ XOF_BLOCK_SIZE);
+ }
+
+ return 0;
+}
+#endif
+#ifdef WOLFSSL_KYBER1024
+/* Deterministically generate a matrix (or transpose) of uniform integers mod q.
+ *
+ * Seed used with XOF to generate random bytes.
+ *
+ * @param [out] a Matrix of uniform integers.
+ * @param [in] seed Bytes to seed XOF generation.
+ * @param [in] transposed Whether A or A^T is generated.
+ * @return 0 on success.
+ * @return MEMORY_E when dynamic memory allocation fails. Only possible when
+ * WOLFSSL_SMALL_STACK is defined.
+ */
+static int kyber_gen_matrix_k4_avx2(sword16* a, byte* seed, int transposed)
+{
+ int i;
+ int k;
+ byte rand[4 * GEN_MATRIX_SIZE + 2];
+ word64 state[25 * 4];
+ unsigned int ctr0;
+ unsigned int ctr1;
+ unsigned int ctr2;
+ unsigned int ctr3;
+ byte* p;
+
+ /* Loading 64 bits, only using 48 bits. Loading 2 bytes more than used. */
+ rand[4 * GEN_MATRIX_SIZE + 0] = 0xff;
+ rand[4 * GEN_MATRIX_SIZE + 1] = 0xff;
+
+ for (k = 0; k < 4; k++) {
+ for (i = 0; i < 4; i++) {
+ if (!transposed) {
+ state[4*4 + i] = 0x1f0000 + (k << 8) + i;
+ }
+ else {
+ state[4*4 + i] = 0x1f0000 + (i << 8) + k;
+ }
+ }
+
+ kyber_sha3_128_blocksx4_seed_avx2(state, seed);
+ kyber_redistribute_21_rand_avx2(state,
+ rand + 0 * GEN_MATRIX_SIZE, rand + 1 * GEN_MATRIX_SIZE,
+ rand + 2 * GEN_MATRIX_SIZE, rand + 3 * GEN_MATRIX_SIZE);
+ for (i = SHA3_128_BYTES; i < GEN_MATRIX_SIZE; i += SHA3_128_BYTES) {
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_21_rand_avx2(state,
+ rand + i + 0 * GEN_MATRIX_SIZE, rand + i + 1 * GEN_MATRIX_SIZE,
+ rand + i + 2 * GEN_MATRIX_SIZE, rand + i + 3 * GEN_MATRIX_SIZE);
+ }
+
+ /* Sample random bytes to create a polynomial. */
+ p = rand;
+ ctr0 = kyber_rej_uniform_n_avx2(a + 0 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr1 = kyber_rej_uniform_n_avx2(a + 1 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr2 = kyber_rej_uniform_n_avx2(a + 2 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr3 = kyber_rej_uniform_n_avx2(a + 3 * KYBER_N, KYBER_N, p,
+ GEN_MATRIX_SIZE);
+ /* Create more blocks if too many rejected. */
+ while ((ctr0 < KYBER_N) || (ctr1 < KYBER_N) || (ctr2 < KYBER_N) ||
+ (ctr3 < KYBER_N)) {
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_21_rand_avx2(state, rand + 0 * GEN_MATRIX_SIZE,
+ rand + 1 * GEN_MATRIX_SIZE, rand + 2 * GEN_MATRIX_SIZE,
+ rand + 3 * GEN_MATRIX_SIZE);
+
+ p = rand;
+ ctr0 += kyber_rej_uniform_avx2(a + 0 * KYBER_N + ctr0,
+ KYBER_N - ctr0, p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr1 += kyber_rej_uniform_avx2(a + 1 * KYBER_N + ctr1,
+ KYBER_N - ctr1, p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr2 += kyber_rej_uniform_avx2(a + 2 * KYBER_N + ctr2,
+ KYBER_N - ctr2, p, XOF_BLOCK_SIZE);
+ p += GEN_MATRIX_SIZE;
+ ctr3 += kyber_rej_uniform_avx2(a + 3 * KYBER_N + ctr3,
+ KYBER_N - ctr3, p, XOF_BLOCK_SIZE);
+ }
+
+ a += 4 * KYBER_N;
+ }
+
+ return 0;
+}
+#endif /* KYBER1024 */
+#endif /* USE_INTEL_SPEEDUP */
+
+/* Absorb the seed data for squeezing out pseudo-random data.
+ *
+ * @param [in, out] shake128 SHAKE-128 object.
+ * @param [in] seed Data to absorb.
+ * @param [in] len Length of data to absorb in bytes.
+ * @return 0 on success always.
+ */
+static int kyber_xof_absorb(wc_Shake* shake128, byte* seed, int len)
+{
+ int ret;
+
+ ret = wc_InitShake128(shake128, NULL, INVALID_DEVID);
+ if (ret == 0) {
+ ret = wc_Shake128_Absorb(shake128, seed, len);
+ }
+
+ return ret;
+}
+
+/* Squeeze the state to produce pseudo-random data.
+ *
+ * @param [in, out] shake128 SHAKE-128 object.
+ * @param [out] out Buffer to write to.
+ * @param [in] blocks Number of blocks to write.
+ * @return 0 on success always.
+ */
+static int kyber_xof_squeezeblocks(wc_Shake* shake128, byte* out, int blocks)
+{
+ return wc_Shake128_SqueezeBlocks(shake128, out, blocks);
+}
+
+/* Initialize SHAKE-256 object.
+ *
+ * @param [in, out] shake256 SHAKE-256 object.
+ */
+void kyber_prf_init(wc_Shake* prf)
+{
+ XMEMSET(prf->s, 0, sizeof(prf->s));
+}
+
+/* New/Initialize SHAKE-256 object.
+ *
+ * @param [in, out] shake256 SHAKE-256 object.
+ * @param [in] heap Dynamic memory allocator hint.
+ * @param [in] devId Device id.
+ * @return 0 on success always.
+ */
+int kyber_prf_new(wc_Shake* prf, void* heap, int devId)
+{
+ return wc_InitShake256(prf, heap, devId);
+}
+
+/* Free SHAKE-256 object.
+ *
+ * @param [in, out] shake256 SHAKE-256 object.
+ */
+void kyber_prf_free(wc_Shake* prf)
+{
+ wc_Shake256_Free(prf);
+}
+
+/* Create pseudo-random data from the key using SHAKE-256.
+ *
+ * @param [in, out] shake256 SHAKE-256 object.
+ * @param [out] out Buffer to write to.
+ * @param [in] outLen Number of bytes to write.
+ * @param [in] key Data to derive from. Must be KYBER_SYM_SZ + 1
+ * bytes in length.
+ * @return 0 on success always.
+ */
+static int kyber_prf(wc_Shake* shake256, byte* out, unsigned int outLen,
+ const byte* key)
+{
+#ifdef USE_INTEL_SPEEDUP
+ int i;
+ word64 state[25];
+
+ (void)shake256;
+
+ for (i = 0; i < KYBER_SYM_SZ / 8; i++) {
+ state[i] = ((word64*)key)[i];
+ }
+ state[KYBER_SYM_SZ / 8] = 0x1f00 | key[KYBER_SYM_SZ];
+ XMEMSET(state + KYBER_SYM_SZ / 8 + 1, 0,
+ (25 - KYBER_SYM_SZ / 8 - 1) * sizeof(word64));
+ state[WC_SHA3_256_COUNT - 1] = 0x8000000000000000UL;
+
+ if (IS_INTEL_BMI2(cpuid_flags)) {
+ sha3_block_bmi2(state);
+ }
+ else if (IS_INTEL_AVX2(cpuid_flags)) {
+ sha3_block_avx2(state);
+ }
+ else {
+ BlockSha3(state);
+ }
+ XMEMCPY(out, state, outLen);
+
+ return 0;
+#else
+ int ret;
+
+ ret = wc_Shake256_Update(shake256, key, KYBER_SYM_SZ + 1);
+ if (ret == 0) {
+ ret = wc_Shake256_Final(shake256, out, outLen);
+ }
+
+ return ret;
+#endif
+}
+
+#ifdef USE_INTEL_SPEEDUP
+/* Create pseudo-random key from the seed using SHAKE-256.
+ *
+ * @param [in] seed Data to derive from.
+ * @param [in] seedLen Length of data to derive from in bytes.
+ * @param [out] out Buffer to write to.
+ * @param [in] outLen Number of bytes to derive.
+ * @return 0 on success always.
+ */
+int kyber_kdf(byte* seed, int seedLen, byte* out, int outLen)
+{
+ word64 state[25];
+ int i;
+ int len64 = seedLen / 8;
+
+ for (i = 0; i < len64; i++) {
+ state[i] = ((word64*)seed)[i];
+ }
+ state[len64] = 0x1f;
+ XMEMSET(state + len64 + 1, 0, (25 - len64 - 1) * sizeof(word64));
+ state[WC_SHA3_256_COUNT - 1] = 0x8000000000000000UL;
+
+ if (IS_INTEL_BMI2(cpuid_flags)) {
+ sha3_block_bmi2(state);
+ }
+ else if (IS_INTEL_AVX2(cpuid_flags)) {
+ sha3_block_avx2(state);
+ }
+ else {
+ BlockSha3(state);
+ }
+ XMEMCPY(out, state, outLen);
+
+ return 0;
+}
+#endif
+
+/* Rejection sampling on uniform random bytes to generate uniform random
+ * integers mod q.
+ *
+ * @param [out] p Uniform random integers mod q.
+ * @param [in] len Maximum number of integers.
+ * @param [in] r Uniform random bytes buffer.
+ * @param [in] rLen Length of random data in buffer.
+ * @return Number of integers sampled.
+ */
+static unsigned int kyber_rej_uniform_c(sword16* p, unsigned int len,
+ const byte* r, unsigned int rLen)
+{
+ unsigned int i;
+ unsigned int j;
+
+ /* Keep sampling until maximum number of integers reached or buffer used up.
+ */
+ for (i = 0, j = 0; (i < len) && (j <= rLen - 3); j += 3) {
+ /* Use 24 bits (3 bytes) as two 12 bits integers. */
+ sword16 v0 = ((r[0] >> 0) | ((word16)r[1] << 8)) & 0xFFF;
+ sword16 v1 = ((r[1] >> 4) | ((word16)r[2] << 4)) & 0xFFF;
+
+ /* Reject first 12-bit integer if greater than or equal to q. */
+ if (v0 < KYBER_Q) {
+ p[i++] = v0;
+ }
+ /* Check second if we don't have enough integers yet.
+ * Reject second 12-bit integer if greater than or equal to q. */
+ if ((i < len) && (v1 < KYBER_Q)) {
+ p[i++] = v1;
+ }
+
+ /* Move over used bytes. */
+ r += 3;
+ }
+
+ return i;
+}
+
+/* Deterministically generate a matrix (or transpose) of uniform integers mod q.
+ *
+ * Seed used with XOF to generate random bytes.
+ *
+ * @param [in] prf XOF object.
+ * @param [out] a Matrix of uniform integers.
+ * @param [in] kp Number of dimensions. kp x kp polynomials.
+ * @param [in] seed Bytes to seed XOF generation.
+ * @param [in] transposed Whether A or A^T is generated.
+ * @return 0 on success.
+ * @return MEMORY_E when dynamic memory allocation fails. Only possible when
+ * WOLFSSL_SMALL_STACK is defined.
+ */
+static int kyber_gen_matrix_c(KYBER_PRF_T* prf, sword16* a, int kp, byte* seed,
+ int transposed)
+{
+#ifdef WOLFSSL_SMALL_STACK
+ byte* rand;
+#else
+ byte rand[GEN_MATRIX_SIZE + 2];
+#endif
+ byte extSeed[KYBER_SYM_SZ + 2];
+ int ret = 0;
+ int i;
+
+ XMEMCPY(extSeed, seed, KYBER_SYM_SZ);
+
+#ifdef WOLFSSL_SMALL_STACK
+ /* Allocate large amount of memory to hold random bytes to be samples. */
+ rand = (byte*)XMALLOC(GEN_MATRIX_SIZE + 2, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+ if (rand == NULL) {
+ ret = MEMORY_E;
+ }
+#endif
+
+ /* Generate each vector of polynomials. */
+ for (i = 0; (ret == 0) && (i < kp); i++, a += kp * KYBER_N) {
+ int j;
+ /* Generate each polynomial in vector from seed with indices. */
+ for (j = 0; (ret == 0) && (j < kp); j++) {
+ if (transposed) {
+ extSeed[KYBER_SYM_SZ + 0] = i;
+ extSeed[KYBER_SYM_SZ + 1] = j;
+ }
+ else {
+ extSeed[KYBER_SYM_SZ + 0] = j;
+ extSeed[KYBER_SYM_SZ + 1] = i;
+ }
+ /* Absorb the index specific seed. */
+ ret = kyber_xof_absorb(prf, extSeed, sizeof(extSeed));
+ if (ret == 0) {
+ /* Create out based on the seed. */
+ ret = kyber_xof_squeezeblocks(prf, rand, GEN_MATRIX_NBLOCKS);
+ }
+ if (ret == 0) {
+ #if (GEN_MATRIX_SIZE % 3) != 0
+ unsigned int randLen;
+ #endif
+ unsigned int ctr;
+
+ /* Sample random bytes to create a polynomial. */
+ ctr = kyber_rej_uniform_c(a + j * KYBER_N, KYBER_N, rand,
+ GEN_MATRIX_SIZE);
+ /* Create more blocks if too many rejected. */
+ #if (GEN_MATRIX_SIZE % 3) != 0
+ randLen = GEN_MATRIX_SIZE;
+ while (ctr < KYBER_N) {
+ int off = randLen % 3;
+ int k;
+ for (k = 0; k < off; k++) {
+ rand[k] = rand[randLen - off + k];
+ }
+ kyber_xof_squeezeblocks(prf, rand + off, 1);
+ randLen = off + XOF_BLOCK_SIZE;
+ ctr += kyber_rej_uniform_c(a + j * KYBER_N + ctr,
+ KYBER_N - ctr, rand, randLen);
+ }
+ #else
+ while (ctr < KYBER_N) {
+ kyber_xof_squeezeblocks(prf, rand, 1);
+ ctr += kyber_rej_uniform_c(a + j * KYBER_N + ctr,
+ KYBER_N - ctr, rand, XOF_BLOCK_SIZE);
+ }
+ #endif
+ }
+ }
+ }
+
+#ifdef WOLFSSL_SMALL_STACK
+ /* Dispose of temporary buffer. */
+ XFREE(rand, NULL, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
+ return ret;
+}
+
+/* Deterministically generate a matrix (or transpose) of uniform integers mod q.
+ *
+ * Seed used with XOF to generate random bytes.
+ *
+ * @param [in] prf XOF object.
+ * @param [out] a Matrix of uniform integers.
+ * @param [in] kp Number of dimensions. kp x kp polynomials.
+ * @param [in] seed Bytes to seed XOF generation.
+ * @param [in] transposed Whether A or A^T is generated.
+ * @return 0 on success.
+ * @return MEMORY_E when dynamic memory allocation fails. Only possible when
+ * WOLFSSL_SMALL_STACK is defined.
+ */
+int kyber_gen_matrix(KYBER_PRF_T* prf, sword16* a, int kp, byte* seed,
+ int transposed)
+{
+ int ret;
+
+#ifdef WOLFSSL_KYBER512
+ if (kp == KYBER512_K) {
+ #ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ ret = kyber_gen_matrix_k2_avx2(a, seed, transposed);
+ }
+ else
+ #endif
+ {
+ ret = kyber_gen_matrix_c(prf, a, KYBER512_K, seed, transposed);
+ }
+ }
+ else
+#endif
+#ifdef WOLFSSL_KYBER768
+ if (kp == KYBER768_K) {
+ #ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ ret = kyber_gen_matrix_k3_avx2(a, seed, transposed);
+ }
+ else
+ #endif
+ {
+ ret = kyber_gen_matrix_c(prf, a, KYBER768_K, seed, transposed);
+ }
+ }
+ else
+#endif
+#ifdef WOLFSSL_KYBER1024
+ if (kp == KYBER1024_K) {
+ #ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ ret = kyber_gen_matrix_k4_avx2(a, seed, transposed);
+ }
+ else
+ #endif
+ {
+ ret = kyber_gen_matrix_c(prf, a, KYBER1024_K, seed, transposed);
+ }
+ }
+ else
+#endif
+ {
+ ret = BAD_STATE_E;
+ }
+
+ return ret;
+}
+
+/******************************************************************************/
+
+/* Subtract one 2 bit value from another out of a larger number.
+ *
+ * @param [in] d Value containing sequential 2 bit values.
+ * @param [in] i Start index of the two values in 2 bits each.
+ * @return Difference of the two values with range 0..2.
+ */
+#define ETA2_SUB(d, i) \
+ (((sword16)(((d) >> ((i) * 4 + 0)) & 0x3)) - \
+ ((sword16)(((d) >> ((i) * 4 + 2)) & 0x3)))
+
+/* Compute polynomial with coefficients distributed according to a centered
+ * binomial distribution with parameter eta2 from uniform random bytes.
+ *
+ * @param [out] p Polynomial computed.
+ * @param [in] r Random bytes.
+ */
+static void kyber_cbd_eta2(sword16* p, const byte* r)
+{
+ unsigned int i;
+
+#ifndef WORD64_AVAILABLE
+ /* Calculate eight integer coefficients at a time. */
+ for (i = 0; i < KYBER_N; i += 8) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ #endif
+ /* Take the next 4 bytes, little endian, as a 32 bit value. */
+ #ifdef BIG_ENDIAN_ORDER
+ word32 t = ByteReverseWord32(*(word32*)r);
+ #else
+ word32 t = *(word32*)r;
+ #endif
+ word32 d;
+ /* Add second bits to first. */
+ d = (t >> 0) & 0x55555555;
+ d += (t >> 1) & 0x55555555;
+ /* Values 0, 1 or 2 in consecutive 2 bits.
+ * 0 - 1/4, 1 - 2/4, 2 - 1/4. */
+
+ #ifdef WOLFSSL_KYBER_SMALL
+ for (j = 0; j < 8; j++) {
+ p[i + j] = ETA2_SUB(d, j);
+ }
+ #else
+ p[i + 0] = ETA2_SUB(d, 0);
+ p[i + 1] = ETA2_SUB(d, 1);
+ p[i + 2] = ETA2_SUB(d, 2);
+ p[i + 3] = ETA2_SUB(d, 3);
+ p[i + 4] = ETA2_SUB(d, 4);
+ p[i + 5] = ETA2_SUB(d, 5);
+ p[i + 6] = ETA2_SUB(d, 6);
+ p[i + 7] = ETA2_SUB(d, 7);
+ #endif
+ /* -2 - 1/16, -1 - 4/16, 0 - 6/16, 1 - 4/16, 2 - 1/16 */
+
+ /* Move over used bytes. */
+ r += 4;
+ }
+#else
+ /* Calculate sixteen integer coefficients at a time. */
+ for (i = 0; i < KYBER_N; i += 16) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ #endif
+ /* Take the next 8 bytes, little endian, as a 64 bit value. */
+ #ifdef BIG_ENDIAN_ORDER
+ word64 t = ByteReverseWord64(*(word64*)r);
+ #else
+ word64 t = *(word64*)r;
+ #endif
+ word64 d;
+ /* Add second bits to first. */
+ d = (t >> 0) & 0x5555555555555555L;
+ d += (t >> 1) & 0x5555555555555555L;
+ /* Values 0, 1 or 2 in consecutive 2 bits.
+ * 0 - 1/4, 1 - 2/4, 2 - 1/4. */
+
+ #ifdef WOLFSSL_KYBER_SMALL
+ for (j = 0; j < 16; j++) {
+ p[i + j] = ETA2_SUB(d, j);
+ }
+ #else
+ p[i + 0] = ETA2_SUB(d, 0);
+ p[i + 1] = ETA2_SUB(d, 1);
+ p[i + 2] = ETA2_SUB(d, 2);
+ p[i + 3] = ETA2_SUB(d, 3);
+ p[i + 4] = ETA2_SUB(d, 4);
+ p[i + 5] = ETA2_SUB(d, 5);
+ p[i + 6] = ETA2_SUB(d, 6);
+ p[i + 7] = ETA2_SUB(d, 7);
+ p[i + 8] = ETA2_SUB(d, 8);
+ p[i + 9] = ETA2_SUB(d, 9);
+ p[i + 10] = ETA2_SUB(d, 10);
+ p[i + 11] = ETA2_SUB(d, 11);
+ p[i + 12] = ETA2_SUB(d, 12);
+ p[i + 13] = ETA2_SUB(d, 13);
+ p[i + 14] = ETA2_SUB(d, 14);
+ p[i + 15] = ETA2_SUB(d, 15);
+ #endif
+ /* -2 - 1/16, -1 - 4/16, 0 - 6/16, 1 - 4/16, 2 - 1/16 */
+
+ /* Move over used bytes. */
+ r += 8;
+ }
+#endif
+}
+
+#ifdef WOLFSSL_KYBER512
+/* Subtract one 3 bit value from another out of a larger number.
+ *
+ * @param [in] d Value containing sequential 3 bit values.
+ * @param [in] i Start index of the two values in 3 bits each.
+ * @return Difference of the two values with range 0..3.
+ */
+#define ETA3_SUB(d, i) \
+ (((sword16)(((d) >> ((i) * 6 + 0)) & 0x7)) - \
+ ((sword16)(((d) >> ((i) * 6 + 3)) & 0x7)))
+
+/* Compute polynomial with coefficients distributed according to a centered
+ * binomial distribution with parameter eta3 from uniform random bytes.
+ *
+ * @param [out] p Polynomial computed.
+ * @param [in] r Random bytes.
+ */
+static void kyber_cbd_eta3(sword16* p, const byte* r)
+{
+ unsigned int i;
+
+#ifndef WORD64_AVAILABLE
+ /* Calculate four integer coefficients at a time. */
+ for (i = 0; i < KYBER_N; i += 4) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ #endif
+ /* Take the next 3 bytes, little endian, as a 24 bit value. */
+ word32 t = (((word32)(r[0])) << 0) |
+ (((word32)(r[1])) << 8) |
+ (((word32)(r[2])) << 16);
+ word32 d;
+ /* Add second and third bits to first. */
+ d = (t >> 0) & 0x00249249;
+ d += (t >> 1) & 0x00249249;
+ d += (t >> 2) & 0x00249249;
+ /* Values 0, 1, 2 or 3 in consecutive 3 bits.
+ * 0 - 1/8, 1 - 3/8, 2 - 3/8, 3 - 1/8. */
+
+ #ifdef WOLFSSL_KYBER_SMALL
+ for (j = 0; j < 4; j++) {
+ p[i + j] = ETA3_SUB(d, j);
+ }
+ #else
+ p[i + 0] = ETA3_SUB(d, 0);
+ p[i + 1] = ETA3_SUB(d, 1);
+ p[i + 2] = ETA3_SUB(d, 2);
+ p[i + 3] = ETA3_SUB(d, 3);
+ #endif
+ /* -3-1/64, -2-6/64, -1-15/64, 0-20/64, 1-15/64, 2-6/64, 3-1/64 */
+
+ /* Move over used bytes. */
+ r += 3;
+ }
+#else
+ /* Calculate eight integer coefficients at a time. */
+ for (i = 0; i < KYBER_N; i += 8) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ #endif
+ /* Take the next 6 bytes, little endian, as a 48 bit value. */
+ word64 t = (((word64)(r[0])) << 0) |
+ (((word64)(r[1])) << 8) |
+ (((word64)(r[2])) << 16) |
+ (((word64)(r[3])) << 24) |
+ (((word64)(r[4])) << 32) |
+ (((word64)(r[5])) << 40);
+ word64 d;
+ /* Add second and third bits to first. */
+ d = (t >> 0) & 0x0000249249249249L;
+ d += (t >> 1) & 0x0000249249249249L;
+ d += (t >> 2) & 0x0000249249249249L;
+ /* Values 0, 1, 2 or 3 in consecutive 3 bits.
+ * 0 - 1/8, 1 - 3/8, 2 - 3/8, 3 - 1/8. */
+
+ #ifdef WOLFSSL_KYBER_SMALL
+ for (j = 0; j < 8; j++) {
+ p[i + j] = ETA3_SUB(d, j);
+ }
+ #else
+ p[i + 0] = ETA3_SUB(d, 0);
+ p[i + 1] = ETA3_SUB(d, 1);
+ p[i + 2] = ETA3_SUB(d, 2);
+ p[i + 3] = ETA3_SUB(d, 3);
+ p[i + 4] = ETA3_SUB(d, 4);
+ p[i + 5] = ETA3_SUB(d, 5);
+ p[i + 6] = ETA3_SUB(d, 6);
+ p[i + 7] = ETA3_SUB(d, 7);
+ #endif
+ /* -3-1/64, -2-6/64, -1-15/64, 0-20/64, 1-15/64, 2-6/64, 3-1/64 */
+
+ /* Move over used bytes. */
+ r += 6;
+ }
+#endif
+}
+#endif
+
+/* Get noise/error by calculating random bytes and sampling to a binomial
+ * distribution.
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [out] p Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @param [in] eta1 Size of noise/error integers.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_eta1_c(KYBER_PRF_T* prf, sword16* p,
+ const byte* seed, byte eta1)
+{
+ int ret;
+
+ (void)eta1;
+
+#ifdef WOLFSSL_KYBER512
+ if (eta1 == KYBER_CBD_ETA3) {
+ byte rand[ETA3_RAND_SIZE];
+
+ /* Calculate random bytes from seed with PRF. */
+ ret = kyber_prf(prf, rand, sizeof(rand), seed);
+ if (ret == 0) {
+ /* Sample for values in range -3..3 from 3 bits of random. */
+ kyber_cbd_eta3(p, rand);
+ }
+ }
+ else
+#endif
+ {
+ byte rand[ETA2_RAND_SIZE];
+
+ /* Calculate random bytes from seed with PRF. */
+ ret = kyber_prf(prf, rand, sizeof(rand), seed);
+ if (ret == 0) {
+ /* Sample for values in range -2..2 from 2 bits of random. */
+ kyber_cbd_eta2(p, rand);
+ }
+ }
+
+ return ret;
+}
+
+/* Get noise/error by calculating random bytes and sampling to a binomial
+ * distribution. Values -2..2
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [out] p Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_eta2_c(KYBER_PRF_T* prf, sword16* p,
+ const byte* seed)
+{
+ int ret;
+ byte rand[ETA2_RAND_SIZE];
+
+ /* Calculate random bytes from seed with PRF. */
+ ret = kyber_prf(prf, rand, sizeof(rand), seed);
+ if (ret == 0) {
+ kyber_cbd_eta2(p, rand);
+ }
+
+ return ret;
+}
+
+#ifdef USE_INTEL_SPEEDUP
+#define PRF_RAND_SZ (2 * SHA3_256_BYTES)
+
+#if defined(WOLFSSL_KYBER768) || defined(WOLFSSL_KYBER1024)
+/* Get the noise/error by calculating random bytes.
+ *
+ * @param [out] rand Random number byte array.
+ * @param [in] seed Seed to generate random from.
+ * @param [in] o Offset of seed count.
+ */
+static void kyber_get_noise_x4_eta2_avx2(byte* rand, byte* seed, byte o)
+{
+ int i;
+ word64 state[25 * 4];
+
+ for (i = 0; i < 4; i++) {
+ state[4*4 + i] = 0x1f00 + i + o;
+ }
+
+ kyber_sha3_256_blocksx4_seed_avx2(state, seed);
+ kyber_redistribute_16_rand_avx2(state, rand + 0 * ETA2_RAND_SIZE,
+ rand + 1 * ETA2_RAND_SIZE, rand + 2 * ETA2_RAND_SIZE,
+ rand + 3 * ETA2_RAND_SIZE);
+}
+#endif
+
+#ifdef WOLFSSL_KYBER512
+/* Get the noise/error by calculating random bytes.
+ *
+ * @param [out] rand Random number byte array.
+ * @param [in] seed Seed to generate random from.
+ * @param [in] o Offset of seed count.
+ */
+static void kyber_get_noise_x4_eta3_avx2(byte* rand, byte* seed)
+{
+ word64 state[25 * 4];
+ int i;
+
+ state[4*4 + 0] = 0x1f00 + 0;
+ state[4*4 + 1] = 0x1f00 + 1;
+ state[4*4 + 2] = 0x1f00 + 2;
+ state[4*4 + 3] = 0x1f00 + 3;
+
+ kyber_sha3_256_blocksx4_seed_avx2(state, seed);
+ kyber_redistribute_17_rand_avx2(state, rand + 0 * PRF_RAND_SZ,
+ rand + 1 * PRF_RAND_SZ, rand + 2 * PRF_RAND_SZ,
+ rand + 3 * PRF_RAND_SZ);
+ i = SHA3_256_BYTES;
+ kyber_sha3_blocksx4_avx2(state);
+ kyber_redistribute_8_rand_avx2(state, rand + i + 0 * PRF_RAND_SZ,
+ rand + i + 1 * PRF_RAND_SZ, rand + i + 2 * PRF_RAND_SZ,
+ rand + i + 3 * PRF_RAND_SZ);
+}
+
+/* Get noise/error by calculating random bytes and sampling to a binomial
+ * distribution. Values -2..2
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [out] p Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_eta2_avx2(KYBER_PRF_T* prf, sword16* p,
+ const byte* seed)
+{
+ int ret;
+ byte rand[ETA2_RAND_SIZE];
+
+ /* Calculate random bytes from seed with PRF. */
+ ret = kyber_prf(prf, rand, sizeof(rand), seed);
+ if (ret == 0) {
+ kyber_cbd_eta2_avx2(p, rand);
+ }
+
+ return ret;
+}
+
+/* Get the noise/error by calculating random bytes and sampling to a binomial
+ * distribution.
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [out] vec1 First Vector of polynomials.
+ * @param [out] vec2 Second Vector of polynomials.
+ * @param [out] poly Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_k2_avx2(KYBER_PRF_T* prf, sword16* vec1,
+ sword16* vec2, sword16* poly, byte* seed)
+{
+ int ret = 0;
+ byte rand[4 * PRF_RAND_SZ];
+
+ kyber_get_noise_x4_eta3_avx2(rand, seed);
+ kyber_cbd_eta3_avx2(vec1 , rand + 0 * PRF_RAND_SZ);
+ kyber_cbd_eta3_avx2(vec1 + KYBER_N, rand + 1 * PRF_RAND_SZ);
+ if (poly == NULL) {
+ kyber_cbd_eta3_avx2(vec2 , rand + 2 * PRF_RAND_SZ);
+ kyber_cbd_eta3_avx2(vec2 + KYBER_N, rand + 3 * PRF_RAND_SZ);
+ }
+ else {
+ kyber_cbd_eta2_avx2(vec2 , rand + 2 * PRF_RAND_SZ);
+ kyber_cbd_eta2_avx2(vec2 + KYBER_N, rand + 3 * PRF_RAND_SZ);
+
+ seed[KYBER_SYM_SZ] = 4;
+ ret = kyber_get_noise_eta2_avx2(prf, poly, seed);
+ }
-#ifdef WOLFSSL_HAVE_KYBER
- #error "Contact wolfSSL to get the implementation of this file"
+ return ret;
+}
#endif
+
+#ifdef WOLFSSL_KYBER768
+/* Get the noise/error by calculating random bytes and sampling to a binomial
+ * distribution.
+ *
+ * @param [out] vec1 First Vector of polynomials.
+ * @param [out] vec2 Second Vector of polynomials.
+ * @param [out] poly Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_k3_avx2(sword16* vec1, sword16* vec2, sword16* poly,
+ byte* seed)
+{
+ byte rand[4 * ETA2_RAND_SIZE];
+
+ kyber_get_noise_x4_eta2_avx2(rand, seed, 0);
+ kyber_cbd_eta2_avx2(vec1 , rand + 0 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec1 + 1 * KYBER_N, rand + 1 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec1 + 2 * KYBER_N, rand + 2 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec2 , rand + 3 * ETA2_RAND_SIZE);
+ kyber_get_noise_x4_eta2_avx2(rand, seed, 4);
+ kyber_cbd_eta2_avx2(vec2 + 1 * KYBER_N, rand + 0 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec2 + 2 * KYBER_N, rand + 1 * ETA2_RAND_SIZE);
+ if (poly != NULL) {
+ kyber_cbd_eta2_avx2(poly, rand + 2 * ETA2_RAND_SIZE);
+ }
+
+ return 0;
+}
+#endif
+
+#ifdef WOLFSSL_KYBER1024
+/* Get the noise/error by calculating random bytes and sampling to a binomial
+ * distribution.
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [out] vec1 First Vector of polynomials.
+ * @param [out] vec2 Second Vector of polynomials.
+ * @param [out] poly Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_k4_avx2(KYBER_PRF_T* prf, sword16* vec1,
+ sword16* vec2, sword16* poly, byte* seed)
+{
+ int ret = 0;
+ byte rand[4 * ETA2_RAND_SIZE];
+
+ (void)prf;
+
+ kyber_get_noise_x4_eta2_avx2(rand, seed, 0);
+ kyber_cbd_eta2_avx2(vec1 , rand + 0 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec1 + 1 * KYBER_N, rand + 1 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec1 + 2 * KYBER_N, rand + 2 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec1 + 3 * KYBER_N, rand + 3 * ETA2_RAND_SIZE);
+ kyber_get_noise_x4_eta2_avx2(rand, seed, 4);
+ kyber_cbd_eta2_avx2(vec2 , rand + 0 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec2 + 1 * KYBER_N, rand + 1 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec2 + 2 * KYBER_N, rand + 2 * ETA2_RAND_SIZE);
+ kyber_cbd_eta2_avx2(vec2 + 3 * KYBER_N, rand + 3 * ETA2_RAND_SIZE);
+ if (poly != NULL) {
+ seed[KYBER_SYM_SZ] = 8;
+ ret = kyber_get_noise_eta2_c(prf, poly, seed);
+ }
+
+ return ret;
+}
+#endif
+#endif /* USE_INTEL_SPEEDUP */
+
+/* Get the noise/error by calculating random bytes and sampling to a binomial
+ * distribution.
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [in] kp Number of polynomials in vector.
+ * @param [out] vec1 First Vector of polynomials.
+ * @param [in] eta1 Size of noise/error integers with first vector.
+ * @param [out] vec2 Second Vector of polynomials.
+ * @param [in] eta2 Size of noise/error integers with second vector.
+ * @param [out] poly Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+static int kyber_get_noise_c(KYBER_PRF_T* prf, int kp, sword16* vec1, int eta1,
+ sword16* vec2, int eta2, sword16* poly, byte* seed)
+{
+ int ret = 0;
+ int i;
+
+ /* First noise generation has a seed with 0x00 appended. */
+ seed[KYBER_SYM_SZ] = 0;
+ /* Generate noise as private key. */
+ for (i = 0; (ret == 0) && (i < kp); i++) {
+ /* Generate noise for each dimension of vector. */
+ ret = kyber_get_noise_eta1_c(prf, vec1 + i * KYBER_N, seed, eta1);
+ /* Increment value of appended byte. */
+ seed[KYBER_SYM_SZ]++;
+ }
+ /* Generate noise for error. */
+ for (i = 0; (ret == 0) && (i < kp); i++) {
+ /* Generate noise for each dimension of vector. */
+ ret = kyber_get_noise_eta1_c(prf, vec2 + i * KYBER_N, seed, eta2);
+ /* Increment value of appended byte. */
+ seed[KYBER_SYM_SZ]++;
+ }
+ if ((ret == 0) && (poly != NULL)) {
+ /* Generating random error polynomial. */
+ ret = kyber_get_noise_eta2_c(prf, poly, seed);
+ }
+
+ return ret;
+}
+
+/* Get the noise/error by calculating random bytes and sampling to a binomial
+ * distribution.
+ *
+ * @param [in, out] prf Psuedo-random function object.
+ * @param [in] kp Number of polynomials in vector.
+ * @param [out] vec1 First Vector of polynomials.
+ * @param [out] vec2 Second Vector of polynomials.
+ * @param [out] poly Polynomial.
+ * @param [in] seed Seed to use when calculating random.
+ * @return 0 on success.
+ */
+int kyber_get_noise(KYBER_PRF_T* prf, int kp, sword16* vec1,
+ sword16* vec2, sword16* poly, byte* seed)
+{
+ int ret;
+
+#ifdef WOLFSSL_KYBER512
+ if (kp == KYBER512_K) {
+ #ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ ret = kyber_get_noise_k2_avx2(prf, vec1, vec2, poly, seed);
+ }
+ else
+ #endif
+ if (poly == NULL) {
+ ret = kyber_get_noise_c(prf, kp, vec1, KYBER_CBD_ETA3, vec2,
+ KYBER_CBD_ETA3, NULL, seed);
+ }
+ else {
+ ret = kyber_get_noise_c(prf, kp, vec1, KYBER_CBD_ETA3, vec2,
+ KYBER_CBD_ETA2, poly, seed);
+ }
+ }
+ else
+#endif
+#ifdef WOLFSSL_KYBER768
+ if (kp == KYBER768_K) {
+ #ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ ret = kyber_get_noise_k3_avx2(vec1, vec2, poly, seed);
+ }
+ else
+ #endif
+ {
+ ret = kyber_get_noise_c(prf, kp, vec1, KYBER_CBD_ETA2, vec2,
+ KYBER_CBD_ETA2, poly, seed);
+ }
+ }
+ else
+#endif
+#ifdef WOLFSSL_KYBER1024
+ if (kp == KYBER1024_K) {
+ #ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ ret = kyber_get_noise_k4_avx2(prf, vec1, vec2, poly, seed);
+ }
+ else
+ #endif
+ {
+ ret = kyber_get_noise_c(prf, kp, vec1, KYBER_CBD_ETA2, vec2,
+ KYBER_CBD_ETA2, poly, seed);
+ }
+ }
+ else
+#endif
+ {
+ ret = BAD_STATE_E;
+ }
+
+ return ret;
+}
+
+/******************************************************************************/
+
+/* Compare two byte arrays of equal size.
+ *
+ * @param [in] a First array to compare.
+ * @param [in] b Second array to compare.
+ * @param [in] sz Size of arrays in bytes.
+ * @return 0 on success.
+ * @return -1 on failure.
+ */
+static int kyber_cmp_c(const byte* a, const byte* b, int sz)
+{
+ int i;
+ byte r = 0;
+
+ /* Constant time comparison of the encapsulated message and cipher text. */
+ for (i = 0; i < sz; i++) {
+ r |= a[i] ^ b[i];
+ }
+ return 0 - ((-(word32)r) >> 31);
+}
+
+/* Compare two byte arrays of equal size.
+ *
+ * @param [in] a First array to compare.
+ * @param [in] b Second array to compare.
+ * @param [in] sz Size of arrays in bytes.
+ * @return 0 on success.
+ * @return -1 on failure.
+ */
+int kyber_cmp(const byte* a, const byte* b, int sz)
+{
+ int fail;
+
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ fail = kyber_cmp_avx2(a, b, sz);
+ }
+ else
+#endif
+ {
+ fail = kyber_cmp_c(a, b, sz);
+ }
+
+ return fail;
+}
+
+/******************************************************************************/
+
+/* Conditional subtraction of q to each coefficient of a polynomial.
+ *
+ * @param [in, out] p Polynomial.
+ */
+static KYBER_NOINLINE void kyber_csubq_c(sword16* p)
+{
+ unsigned int i;
+
+ for (i = 0; i < KYBER_N; ++i) {
+ sword16 t = p[i] - KYBER_Q;
+ /* When top bit set, -ve number - need to add q back. */
+ p[i] = ((t >> 15) & KYBER_Q) + t;
+ }
+}
+
+/******************************************************************************/
+
+#if defined(CONV_WITH_DIV) || !defined(WORD64_AVAILABLE)
+
+/* Compress value.
+ *
+ * Uses div operator that may be slow.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @param [in] s Shift amount to apply to value being compressed.
+ * @param [in] m Mask to apply get the require number of bits.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_VEC(v, i, j, k, s, m) \
+ ((((word32)v[i * KYBER_N + j + k] << s) + KYBER_Q_HALF) / KYBER_Q) & m
+
+/* Compress value to 10 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_10(v, i, j, k) \
+ TO_COMP_WORD_VEC(v, i, j, k, 10, 0x3ff)
+
+/* Compress value to 11 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_11(v, i, j, k) \
+ TO_COMP_WORD_VEC(v, i, j, k, 11, 0x7ff)
+
+#else
+
+/* Multiplier that does div q.
+ * ((1 << 53) + KYBER_Q_HALF) / KYBER_Q
+ */
+#define KYBER_V53 0x275f6ed0176UL
+/* Multiplier times half of q.
+ * KYBER_V53 * (KYBER_Q_HALF + 1)
+ */
+#define KYBER_V53_HALF 0x10013afb768076UL
+
+/* Multiplier that does div q.
+ * ((1 << 54) + KYBER_Q_HALF) / KYBER_Q
+ */
+#define KYBER_V54 0x4ebedda02ecUL
+/* Multiplier times half of q.
+ * KYBER_V54 * (KYBER_Q_HALF + 1)
+ */
+#define KYBER_V54_HALF 0x200275f6ed00ecUL
+
+/* Compress value to 10 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_10(v, i, j, k) \
+ ((((KYBER_V54 << 10) * (v)[(i) * KYBER_N + (j) + (k)]) + KYBER_V54_HALF) >> 54)
+
+/* Compress value to 11 bits.
+ *
+ * Uses mul instead of div.
+ * Only works for values in range: 0..3228
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_11(v, i, j, k) \
+ ((((KYBER_V53 << 11) * (v)[(i) * KYBER_N + (j) + (k)]) + KYBER_V53_HALF) >> 53)
+
+#endif /* CONV_WITH_DIV */
+
+#if defined(WOLFSSL_KYBER512) || defined(WOLFSSL_KYBER768)
+/* Compress the vector of polynomials into a byte array with 10 bits each.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] v Vector of polynomials.
+ * @param [in] kp Number of polynomials in vector.
+ */
+static void kyber_vec_compress_10_c(byte* r, sword16* v, unsigned int kp)
+{
+ unsigned int i;
+ unsigned int j;
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int k;
+#endif
+
+ for (i = 0; i < kp; i++) {
+ /* Reduce each coefficient to mod q. */
+ kyber_csubq_c(v + i * KYBER_N);
+ /* All values are now positive. */
+ }
+
+ /* Each polynomial. */
+ for (i = 0; i < kp; i++) {
+ /* Each 4 polynomial coefficients. */
+ for (j = 0; j < KYBER_N; j += 4) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ sword16 t[4];
+ /* Compress four polynomial values to 10 bits each. */
+ for (k = 0; k < 4; k++) {
+ t[k] = TO_COMP_WORD_10(v, i, j, k);
+ }
+
+ /* Pack four 10-bit values into byte array. */
+ r[ 0] = (t[0] >> 0);
+ r[ 1] = (t[0] >> 8) | (t[1] << 2);
+ r[ 2] = (t[1] >> 6) | (t[2] << 4);
+ r[ 3] = (t[2] >> 4) | (t[3] << 6);
+ r[ 4] = (t[3] >> 2);
+ #else
+ /* Compress four polynomial values to 10 bits each. */
+ sword16 t0 = TO_COMP_WORD_10(v, i, j, 0);
+ sword16 t1 = TO_COMP_WORD_10(v, i, j, 1);
+ sword16 t2 = TO_COMP_WORD_10(v, i, j, 2);
+ sword16 t3 = TO_COMP_WORD_10(v, i, j, 3);
+
+ /* Pack four 10-bit values into byte array. */
+ r[ 0] = (t0 >> 0);
+ r[ 1] = (t0 >> 8) | (t1 << 2);
+ r[ 2] = (t1 >> 6) | (t2 << 4);
+ r[ 3] = (t2 >> 4) | (t3 << 6);
+ r[ 4] = (t3 >> 2);
+ #endif
+
+ /* Move over set bytes. */
+ r += 5;
+ }
+ }
+}
+
+/* Compress the vector of polynomials into a byte array with 10 bits each.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] v Vector of polynomials.
+ * @param [in] kp Number of polynomials in vector.
+ */
+void kyber_vec_compress_10(byte* r, sword16* v, unsigned int kp)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_compress_10_avx2(r, v, kp);
+ }
+ else
+#endif
+ {
+ kyber_vec_compress_10_c(r, v, kp);
+ }
+}
+#endif
+
+#ifdef WOLFSSL_KYBER1024
+/* Compress the vector of polynomials into a byte array with 11 bits each.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] v Vector of polynomials.
+ */
+static void kyber_vec_compress_11_c(byte* r, sword16* v)
+{
+ unsigned int i;
+ unsigned int j;
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int k;
+#endif
+
+ for (i = 0; i < 4; i++) {
+ /* Reduce each coefficient to mod q. */
+ kyber_csubq_c(v + i * KYBER_N);
+ /* All values are now positive. */
+ }
+
+ /* Each polynomial. */
+ for (i = 0; i < 4; i++) {
+ /* Each 8 polynomial coefficients. */
+ for (j = 0; j < KYBER_N; j += 8) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ sword16 t[8];
+ /* Compress eight polynomial values to 11 bits each. */
+ for (k = 0; k < 8; k++) {
+ t[k] = TO_COMP_WORD_11(v, i, j, k);
+ }
+
+ /* Pack eight 11-bit values into byte array. */
+ r[ 0] = (t[0] >> 0);
+ r[ 1] = (t[0] >> 8) | (t[1] << 3);
+ r[ 2] = (t[1] >> 5) | (t[2] << 6);
+ r[ 3] = (t[2] >> 2);
+ r[ 4] = (t[2] >> 10) | (t[3] << 1);
+ r[ 5] = (t[3] >> 7) | (t[4] << 4);
+ r[ 6] = (t[4] >> 4) | (t[5] << 7);
+ r[ 7] = (t[5] >> 1);
+ r[ 8] = (t[5] >> 9) | (t[6] << 2);
+ r[ 9] = (t[6] >> 6) | (t[7] << 5);
+ r[10] = (t[7] >> 3);
+ #else
+ /* Compress eight polynomial values to 11 bits each. */
+ sword16 t0 = TO_COMP_WORD_11(v, i, j, 0);
+ sword16 t1 = TO_COMP_WORD_11(v, i, j, 1);
+ sword16 t2 = TO_COMP_WORD_11(v, i, j, 2);
+ sword16 t3 = TO_COMP_WORD_11(v, i, j, 3);
+ sword16 t4 = TO_COMP_WORD_11(v, i, j, 4);
+ sword16 t5 = TO_COMP_WORD_11(v, i, j, 5);
+ sword16 t6 = TO_COMP_WORD_11(v, i, j, 6);
+ sword16 t7 = TO_COMP_WORD_11(v, i, j, 7);
+
+ /* Pack eight 11-bit values into byte array. */
+ r[ 0] = (t0 >> 0);
+ r[ 1] = (t0 >> 8) | (t1 << 3);
+ r[ 2] = (t1 >> 5) | (t2 << 6);
+ r[ 3] = (t2 >> 2);
+ r[ 4] = (t2 >> 10) | (t3 << 1);
+ r[ 5] = (t3 >> 7) | (t4 << 4);
+ r[ 6] = (t4 >> 4) | (t5 << 7);
+ r[ 7] = (t5 >> 1);
+ r[ 8] = (t5 >> 9) | (t6 << 2);
+ r[ 9] = (t6 >> 6) | (t7 << 5);
+ r[10] = (t7 >> 3);
+ #endif
+
+ /* Move over set bytes. */
+ r += 11;
+ }
+ }
+}
+
+/* Compress the vector of polynomials into a byte array with 11 bits each.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] v Vector of polynomials.
+ */
+void kyber_vec_compress_11(byte* r, sword16* v)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_compress_11_avx2(r, v, 4);
+ }
+ else
+#endif
+ {
+ kyber_vec_compress_11_c(r, v);
+ }
+}
+#endif
+
+/* Decompress a 10 bit value.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @param [in] t Value to decompress.
+ * @return Decompressed value.
+ */
+#define DECOMP_10(v, i, j, k, t) \
+ v[(i) * KYBER_N + 4 * (j) + (k)] = \
+ (word16)((((word32)((t) & 0x3ff) * KYBER_Q) + 512) >> 10)
+
+/* Decompress an 11 bit value.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index of polynomial in vector.
+ * @param [in] j Index into polynomial.
+ * @param [in] k Offset from indices.
+ * @param [in] t Value to decompress.
+ * @return Decompressed value.
+ */
+#define DECOMP_11(v, i, j, k, t) \
+ v[(i) * KYBER_N + 8 * (j) + (k)] = \
+ (word16)((((word32)((t) & 0x7ff) * KYBER_Q) + 1024) >> 11)
+
+#if defined(WOLFSSL_KYBER512) || defined(WOLFSSL_KYBER768)
+/* Decompress the byte array of packed 10 bits into vector of polynomials.
+ *
+ * @param [out] v Vector of polynomials.
+ * @param [in] b Array of bytes.
+ * @param [in] kp Number of polynomials in vector.
+ */
+static void kyber_vec_decompress_10_c(sword16* v, const unsigned char* b,
+ unsigned int kp)
+{
+ unsigned int i;
+ unsigned int j;
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int k;
+#endif
+
+ /* Each polynomial. */
+ for (i = 0; i < kp; i++) {
+ /* Each 4 polynomial coefficients. */
+ for (j = 0; j < KYBER_N / 4; j++) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ word16 t[4];
+ /* Extract out 4 values of 10 bits each. */
+ t[0] = (b[0] >> 0) | ((word16)b[ 1] << 8);
+ t[1] = (b[1] >> 2) | ((word16)b[ 2] << 6);
+ t[2] = (b[2] >> 4) | ((word16)b[ 3] << 4);
+ t[3] = (b[3] >> 6) | ((word16)b[ 4] << 2);
+ b += 5;
+
+ /* Decompress 4 values. */
+ for (k = 0; k < 4; k++) {
+ DECOMP_10(v, i, j, k, t[k]);
+ }
+ #else
+ /* Extract out 4 values of 10 bits each. */
+ sword16 t0 = (b[0] >> 0) | ((word16)b[ 1] << 8);
+ sword16 t1 = (b[1] >> 2) | ((word16)b[ 2] << 6);
+ sword16 t2 = (b[2] >> 4) | ((word16)b[ 3] << 4);
+ sword16 t3 = (b[3] >> 6) | ((word16)b[ 4] << 2);
+ b += 5;
+
+ /* Decompress 4 values. */
+ DECOMP_10(v, i, j, 0, t0);
+ DECOMP_10(v, i, j, 1, t1);
+ DECOMP_10(v, i, j, 2, t2);
+ DECOMP_10(v, i, j, 3, t3);
+ #endif
+ }
+ }
+}
+
+/* Decompress the byte array of packed 10 bits into vector of polynomials.
+ *
+ * @param [out] v Vector of polynomials.
+ * @param [in] b Array of bytes.
+ * @param [in] kp Number of polynomials in vector.
+ */
+void kyber_vec_decompress_10(sword16* v, const unsigned char* b,
+ unsigned int kp)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_decompress_10_avx2(v, b, kp);
+ }
+ else
+#endif
+ {
+ kyber_vec_decompress_10_c(v, b, kp);
+ }
+}
+#endif
+#ifdef WOLFSSL_KYBER1024
+/* Decompress the byte array of packed 11 bits into vector of polynomials.
+ *
+ * @param [out] v Vector of polynomials.
+ * @param [in] b Array of bytes.
+ */
+static void kyber_vec_decompress_11_c(sword16* v, const unsigned char* b)
+{
+ unsigned int i;
+ unsigned int j;
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int k;
+#endif
+
+ /* Each polynomial. */
+ for (i = 0; i < 4; i++) {
+ /* Each 8 polynomial coefficients. */
+ for (j = 0; j < KYBER_N / 8; j++) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ word16 t[8];
+ /* Extract out 8 values of 11 bits each. */
+ t[0] = (b[0] >> 0) | ((word16)b[ 1] << 8);
+ t[1] = (b[1] >> 3) | ((word16)b[ 2] << 5);
+ t[2] = (b[2] >> 6) | ((word16)b[ 3] << 2) |
+ ((word16)b[4] << 10);
+ t[3] = (b[4] >> 1) | ((word16)b[ 5] << 7);
+ t[4] = (b[5] >> 4) | ((word16)b[ 6] << 4);
+ t[5] = (b[6] >> 7) | ((word16)b[ 7] << 1) |
+ ((word16)b[8] << 9);
+ t[6] = (b[8] >> 2) | ((word16)b[ 9] << 6);
+ t[7] = (b[9] >> 5) | ((word16)b[10] << 3);
+ b += 11;
+
+ /* Decompress 8 values. */
+ for (k = 0; k < 8; k++) {
+ DECOMP_11(v, i, j, k, t[k]);
+ }
+ #else
+ /* Extract out 8 values of 11 bits each. */
+ sword16 t0 = (b[0] >> 0) | ((word16)b[ 1] << 8);
+ sword16 t1 = (b[1] >> 3) | ((word16)b[ 2] << 5);
+ sword16 t2 = (b[2] >> 6) | ((word16)b[ 3] << 2) |
+ ((word16)b[4] << 10);
+ sword16 t3 = (b[4] >> 1) | ((word16)b[ 5] << 7);
+ sword16 t4 = (b[5] >> 4) | ((word16)b[ 6] << 4);
+ sword16 t5 = (b[6] >> 7) | ((word16)b[ 7] << 1) |
+ ((word16)b[8] << 9);
+ sword16 t6 = (b[8] >> 2) | ((word16)b[ 9] << 6);
+ sword16 t7 = (b[9] >> 5) | ((word16)b[10] << 3);
+ b += 11;
+
+ /* Decompress 8 values. */
+ DECOMP_11(v, i, j, 0, t0);
+ DECOMP_11(v, i, j, 1, t1);
+ DECOMP_11(v, i, j, 2, t2);
+ DECOMP_11(v, i, j, 3, t3);
+ DECOMP_11(v, i, j, 4, t4);
+ DECOMP_11(v, i, j, 5, t5);
+ DECOMP_11(v, i, j, 6, t6);
+ DECOMP_11(v, i, j, 7, t7);
+ #endif
+ }
+ }
+}
+
+/* Decompress the byte array of packed 11 bits into vector of polynomials.
+ *
+ * @param [out] v Vector of polynomials.
+ * @param [in] b Array of bytes.
+ */
+void kyber_vec_decompress_11(sword16* v, const unsigned char* b)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_decompress_11_avx2(v, b, 4);
+ }
+ else
+#endif
+ {
+ kyber_vec_decompress_11_c(v, b);
+ }
+}
+#endif
+
+#ifdef CONV_WITH_DIV
+
+/* Compress value.
+ *
+ * Uses div operator that may be slow.
+ *
+ * @param [in] v Vector of polynomials.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @param [in] s Shift amount to apply to value being compressed.
+ * @param [in] m Mask to apply get the require number of bits.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD(v, i, j, s, m) \
+ ((((word32)v[i + j] << s) + KYBER_Q_HALF) / KYBER_Q) & m
+
+/* Compress value to 4 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] p Polynomial.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_4(p, i, j) \
+ TO_COMP_WORD(p, i, j, 4, 0xf)
+
+/* Compress value to 5 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] p Polynomial.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_5(p, i, j) \
+ TO_COMP_WORD(p, i, j, 5, 0x1f)
+
+#else
+
+/* Multiplier that does div q. */
+#define KYBER_V28 ((word32)(((1U << 28) + KYBER_Q_HALF)) / KYBER_Q)
+/* Multiplier times half of q. */
+#define KYBER_V28_HALF ((word32)(KYBER_V28 * (KYBER_Q_HALF + 1)))
+
+/* Multiplier that does div q. */
+#define KYBER_V27 ((word32)(((1U << 27) + KYBER_Q_HALF)) / KYBER_Q)
+/* Multiplier times half of q. */
+#define KYBER_V27_HALF ((word32)(KYBER_V27 * KYBER_Q_HALF))
+
+/* Compress value to 4 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] p Polynomial.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_4(p, i, j) \
+ ((((KYBER_V28 << 4) * (p)[(i) + (j)]) + KYBER_V28_HALF) >> 28)
+
+/* Compress value to 5 bits.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [in] p Polynomial.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @return Compressed value.
+ */
+#define TO_COMP_WORD_5(p, i, j) \
+ ((((KYBER_V27 << 5) * (p)[(i) + (j)]) + KYBER_V27_HALF) >> 27)
+
+#endif /* CONV_WITH_DIV */
+
+#if defined(WOLFSSL_KYBER512) || defined(WOLFSSL_KYBER768)
+/* Compress a polynomial into byte array - on coefficients into 4 bits.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] p Polynomial.
+ */
+static void kyber_compress_4_c(byte* b, sword16* p)
+{
+ unsigned int i;
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ byte t[8];
+#endif
+
+ /* Reduce each coefficients to mod q. */
+ kyber_csubq_c(p);
+ /* All values are now positive. */
+
+ /* Each 8 polynomial coefficients. */
+ for (i = 0; i < KYBER_N; i += 8) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ /* Compress eight polynomial values to 4 bits each. */
+ for (j = 0; j < 8; j++) {
+ t[j] = TO_COMP_WORD_4(p, i, j);
+ }
+
+ b[0] = t[0] | (t[1] << 4);
+ b[1] = t[2] | (t[3] << 4);
+ b[2] = t[4] | (t[5] << 4);
+ b[3] = t[6] | (t[7] << 4);
+ #else
+ /* Compress eight polynomial values to 4 bits each. */
+ byte t0 = TO_COMP_WORD_4(p, i, 0);
+ byte t1 = TO_COMP_WORD_4(p, i, 1);
+ byte t2 = TO_COMP_WORD_4(p, i, 2);
+ byte t3 = TO_COMP_WORD_4(p, i, 3);
+ byte t4 = TO_COMP_WORD_4(p, i, 4);
+ byte t5 = TO_COMP_WORD_4(p, i, 5);
+ byte t6 = TO_COMP_WORD_4(p, i, 6);
+ byte t7 = TO_COMP_WORD_4(p, i, 7);
+
+ /* Pack eight 4-bit values into byte array. */
+ b[0] = t0 | (t1 << 4);
+ b[1] = t2 | (t3 << 4);
+ b[2] = t4 | (t5 << 4);
+ b[3] = t6 | (t7 << 4);
+ #endif
+
+ /* Move over set bytes. */
+ b += 4;
+ }
+}
+
+/* Compress a polynomial into byte array - on coefficients into 4 bits.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] p Polynomial.
+ */
+void kyber_compress_4(byte* b, sword16* p)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_compress_4_avx2(b, p);
+ }
+ else
+#endif
+ {
+ kyber_compress_4_c(b, p);
+ }
+}
+#endif
+#ifdef WOLFSSL_KYBER1024
+/* Compress a polynomial into byte array - on coefficients into 5 bits.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] p Polynomial.
+ */
+static void kyber_compress_5_c(byte* b, sword16* p)
+{
+ unsigned int i;
+#ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ byte t[8];
+#endif
+
+ /* Reduce each coefficients to mod q. */
+ kyber_csubq_c(p);
+ /* All values are now positive. */
+
+ for (i = 0; i < KYBER_N; i += 8) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ /* Compress eight polynomial values to 5 bits each. */
+ for (j = 0; j < 8; j++) {
+ t[j] = TO_COMP_WORD_5(p, i, j);
+ }
+
+ /* Pack 5 bits into byte array. */
+ b[0] = (t[0] >> 0) | (t[1] << 5);
+ b[1] = (t[1] >> 3) | (t[2] << 2) | (t[3] << 7);
+ b[2] = (t[3] >> 1) | (t[4] << 4);
+ b[3] = (t[4] >> 4) | (t[5] << 1) | (t[6] << 6);
+ b[4] = (t[6] >> 2) | (t[7] << 3);
+ #else
+ /* Compress eight polynomial values to 5 bits each. */
+ byte t0 = TO_COMP_WORD_5(p, i, 0);
+ byte t1 = TO_COMP_WORD_5(p, i, 1);
+ byte t2 = TO_COMP_WORD_5(p, i, 2);
+ byte t3 = TO_COMP_WORD_5(p, i, 3);
+ byte t4 = TO_COMP_WORD_5(p, i, 4);
+ byte t5 = TO_COMP_WORD_5(p, i, 5);
+ byte t6 = TO_COMP_WORD_5(p, i, 6);
+ byte t7 = TO_COMP_WORD_5(p, i, 7);
+
+ /* Pack eight 5-bit values into byte array. */
+ b[0] = (t0 >> 0) | (t1 << 5);
+ b[1] = (t1 >> 3) | (t2 << 2) | (t3 << 7);
+ b[2] = (t3 >> 1) | (t4 << 4);
+ b[3] = (t4 >> 4) | (t5 << 1) | (t6 << 6);
+ b[4] = (t6 >> 2) | (t7 << 3);
+ #endif
+
+ /* Move over set bytes. */
+ b += 5;
+ }
+}
+
+/* Compress a polynomial into byte array - on coefficients into 5 bits.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] p Polynomial.
+ */
+void kyber_compress_5(byte* b, sword16* p)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_compress_5_avx2(b, p);
+ }
+ else
+#endif
+ {
+ kyber_compress_5_c(b, p);
+ }
+}
+#endif
+
+/* Decompress a 4 bit value.
+ *
+ * @param [in] p Polynomial.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @param [in] t Value to decompress.
+ * @return Decompressed value.
+ */
+#define DECOMP_4(p, i, j, t) \
+ p[(i) + (j)] = ((word16)((t) * KYBER_Q) + 8) >> 4
+
+/* Decompress a 5 bit value.
+ *
+ * @param [in] p Polynomial.
+ * @param [in] i Index into polynomial.
+ * @param [in] j Offset from indices.
+ * @param [in] t Value to decompress.
+ * @return Decompressed value.
+ */
+#define DECOMP_5(p, i, j, t) \
+ p[(i) + (j)] = (((word32)((t) & 0x1f) * KYBER_Q) + 16) >> 5
+
+#if defined(WOLFSSL_KYBER512) || defined(WOLFSSL_KYBER768)
+/* Decompress the byte array of packed 4 bits into polynomial.
+ *
+ * @param [out] p Polynomial.
+ * @param [in] b Array of bytes.
+ */
+static void kyber_decompress_4_c(sword16* p, const unsigned char* b)
+{
+ unsigned int i;
+
+ /* 2 coefficients at a time. */
+ for (i = 0; i < KYBER_N; i += 2) {
+ /* 2 coefficients decompressed from one byte. */
+ DECOMP_4(p, i, 0, b[0] & 0xf);
+ DECOMP_4(p, i, 1, b[0] >> 4);
+ b += 1;
+ }
+}
+
+/* Decompress the byte array of packed 4 bits into polynomial.
+ *
+ * @param [out] p Polynomial.
+ * @param [in] b Array of bytes.
+ */
+void kyber_decompress_4(sword16* p, const unsigned char* b)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_decompress_4_avx2(p, b);
+ }
+ else
+#endif
+ {
+ kyber_decompress_4_c(p, b);
+ }
+}
+#endif
+#ifdef WOLFSSL_KYBER1024
+/* Decompress the byte array of packed 5 bits into polynomial.
+ *
+ * @param [out] p Polynomial.
+ * @param [in] b Array of bytes.
+ */
+static void kyber_decompress_5_c(sword16* p, const unsigned char* b)
+{
+ unsigned int i;
+
+ /* Each 8 polynomial coefficients. */
+ for (i = 0; i < KYBER_N; i += 8) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ byte t[8];
+
+ /* Extract out 8 values of 5 bits each. */
+ t[0] = (b[0] >> 0);
+ t[1] = (b[0] >> 5) | (b[1] << 3);
+ t[2] = (b[1] >> 2);
+ t[3] = (b[1] >> 7) | (b[2] << 1);
+ t[4] = (b[2] >> 4) | (b[3] << 4);
+ t[5] = (b[3] >> 1);
+ t[6] = (b[3] >> 6) | (b[4] << 2);
+ t[7] = (b[4] >> 3);
+ b += 5;
+
+ /* Decompress 8 values. */
+ for (j = 0; j < 8; j++) {
+ DECOMP_5(p, i, j, t[j]);
+ }
+ #else
+ /* Extract out 8 values of 5 bits each. */
+ byte t0 = (b[0] >> 0);
+ byte t1 = (b[0] >> 5) | (b[1] << 3);
+ byte t2 = (b[1] >> 2);
+ byte t3 = (b[1] >> 7) | (b[2] << 1);
+ byte t4 = (b[2] >> 4) | (b[3] << 4);
+ byte t5 = (b[3] >> 1);
+ byte t6 = (b[3] >> 6) | (b[4] << 2);
+ byte t7 = (b[4] >> 3);
+ b += 5;
+
+ /* Decompress 8 values. */
+ DECOMP_5(p, i, 0, t0);
+ DECOMP_5(p, i, 1, t1);
+ DECOMP_5(p, i, 2, t2);
+ DECOMP_5(p, i, 3, t3);
+ DECOMP_5(p, i, 4, t4);
+ DECOMP_5(p, i, 5, t5);
+ DECOMP_5(p, i, 6, t6);
+ DECOMP_5(p, i, 7, t7);
+ #endif
+ }
+}
+
+/* Decompress the byte array of packed 5 bits into polynomial.
+ *
+ * @param [out] p Polynomial.
+ * @param [in] b Array of bytes.
+ */
+void kyber_decompress_5(sword16* p, const unsigned char* b)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_decompress_5_avx2(p, b);
+ }
+ else
+#endif
+ {
+ kyber_decompress_5_c(p, b);
+ }
+}
+#endif
+
+/******************************************************************************/
+
+/* Convert bit from byte to 0 or (KYBER_Q + 1) / 2.
+ *
+ * Constant time implementation.
+ *
+ * @param [out] p Polynomial to hold converted value.
+ * @param [in] msg Message to get bit from byte from.
+ * @param [in] i Index of byte from message.
+ * @param [in] j Index of bit in byte.
+ */
+#define FROM_MSG_BIT(p, msg, i, j) \
+ p[8 * (i) + (j)] = ((sword16)0 - (sword16)(((msg)[i] >> (j)) & 1)) & KYBER_Q_1_HALF
+
+/* Convert message to polynomial.
+ *
+ * @param [out] p Polynomial.
+ * @param [in] msg Message as a byte array.
+ */
+static void kyber_from_msg_c(sword16* p, const byte* msg)
+{
+ unsigned int i;
+
+ /* For each byte of the message. */
+ for (i = 0; i < KYBER_N / 8; i++) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ /* For each bit of the message. */
+ for (j = 0; j < 8; j++) {
+ FROM_MSG_BIT(p, msg, i, j);
+ }
+ #else
+ FROM_MSG_BIT(p, msg, i, 0);
+ FROM_MSG_BIT(p, msg, i, 1);
+ FROM_MSG_BIT(p, msg, i, 2);
+ FROM_MSG_BIT(p, msg, i, 3);
+ FROM_MSG_BIT(p, msg, i, 4);
+ FROM_MSG_BIT(p, msg, i, 5);
+ FROM_MSG_BIT(p, msg, i, 6);
+ FROM_MSG_BIT(p, msg, i, 7);
+ #endif
+ }
+}
+
+/* Convert message to polynomial.
+ *
+ * @param [out] p Polynomial.
+ * @param [in] msg Message as a byte array.
+ */
+void kyber_from_msg(sword16* p, const byte* msg)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ kyber_from_msg_avx2(p, msg);
+ }
+ else
+#endif
+ {
+ kyber_from_msg_c(p, msg);
+ }
+}
+
+#ifdef CONV_WITH_DIV
+
+/* Convert to value to bit.
+ *
+ * Uses div operator that may be slow.
+ *
+ * @param [out] m Message.
+ * @param [in] p Polynomial.
+ * @param [in] i Index of byte in message.
+ * @param [in] j Index of bit in byte.
+ */
+#define TO_MSG_BIT(m, p, i, j) \
+ m[i] |= (((((sword16)p[8 * i + j] << 1) + KYBER_Q_HALF) / KYBER_Q) & 1) << j
+
+#else
+
+/* Multiplier that does div q. */
+#define KYBER_V31 (((1U << 31) + (KYBER_Q / 2)) / KYBER_Q)
+/* 2 * multiplier that does div q. Only need bit 32 of result. */
+#define KYBER_V31_2 ((word32)(KYBER_V31 * 2))
+/* Multiplier times half of q. */
+#define KYBER_V31_HALF ((word32)(KYBER_V31 * KYBER_Q_HALF))
+
+/* Convert to value to bit.
+ *
+ * Uses mul instead of div.
+ *
+ * @param [out] m Message.
+ * @param [in] p Polynomial.
+ * @param [in] i Index of byte in message.
+ * @param [in] j Index of bit in byte.
+ */
+#define TO_MSG_BIT(m, p, i, j) \
+ (m)[i] |= ((word32)((KYBER_V31_2 * (p)[8 * (i) + (j)]) + KYBER_V31_HALF) >> 31) << (j)
+
+#endif /* CONV_WITH_DIV */
+
+/* Convert polynomial to message.
+ *
+ * @param [out] msg Message as a byte array.
+ * @param [in] p Polynomial.
+ */
+static void kyber_to_msg_c(byte* msg, sword16* p)
+{
+ unsigned int i;
+
+ /* Reduce each coefficient to mod q. */
+ kyber_csubq_c(p);
+ /* All values are now positive. */
+
+ for (i = 0; i < KYBER_N / 8; i++) {
+ #ifdef WOLFSSL_KYBER_SMALL
+ unsigned int j;
+ msg[i] = 0;
+ for (j = 0; j < 8; j++) {
+ TO_MSG_BIT(msg, p, i, j);
+ }
+ #else
+ msg[i] = 0;
+ TO_MSG_BIT(msg, p, i, 0);
+ TO_MSG_BIT(msg, p, i, 1);
+ TO_MSG_BIT(msg, p, i, 2);
+ TO_MSG_BIT(msg, p, i, 3);
+ TO_MSG_BIT(msg, p, i, 4);
+ TO_MSG_BIT(msg, p, i, 5);
+ TO_MSG_BIT(msg, p, i, 6);
+ TO_MSG_BIT(msg, p, i, 7);
+ #endif
+ }
+}
+
+/* Convert polynomial to message.
+ *
+ * @param [out] msg Message as a byte array.
+ * @param [in] p Polynomial.
+ */
+void kyber_to_msg(byte* msg, sword16* p)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ /* Convert the polynomial into a array of bytes (message). */
+ kyber_to_msg_avx2(msg, p);
+ }
+ else
+#endif
+ {
+ kyber_to_msg_c(msg, p);
+ }
+}
+
+/******************************************************************************/
+
+/* Convert bytes to polynomial.
+ *
+ * Consecutive 12 bits hold each coefficient of polynomial.
+ * Used in decoding private and public keys.
+ *
+ * @param [out] p Vector of polynomials.
+ * @param [in] b Array of bytes.
+ * @param [in] k Number of polynomials in vector.
+ */
+static void kyber_from_bytes_c(sword16* p, const byte* b, int k)
+{
+ int i;
+ int j;
+
+ for (j = 0; j < k; j++) {
+ for (i = 0; i < KYBER_N / 2; i++) {
+ p[2 * i + 0] = ((b[3 * i + 0] >> 0) |
+ ((word16)b[3 * i + 1] << 8)) & 0xfff;
+ p[2 * i + 1] = ((b[3 * i + 1] >> 4) |
+ ((word16)b[3 * i + 2] << 4)) & 0xfff;
+ }
+ p += KYBER_N;
+ b += KYBER_POLY_SIZE;
+ }
+}
+
+/* Convert bytes to polynomial.
+ *
+ * Consecutive 12 bits hold each coefficient of polynomial.
+ * Used in decoding private and public keys.
+ *
+ * @param [out] p Vector of polynomials.
+ * @param [in] b Array of bytes.
+ * @param [in] k Number of polynomials in vector.
+ */
+void kyber_from_bytes(sword16* p, const byte* b, int k)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ int i;
+
+ for (i = 0; i < k; i++) {
+ kyber_from_bytes_avx2(p, b);
+ p += KYBER_N;
+ b += KYBER_POLY_SIZE;
+ }
+ }
+ else
+#endif
+ {
+ kyber_from_bytes_c(p, b, k);
+ }
+}
+
+/* Convert polynomial to bytes.
+ *
+ * Consecutive 12 bits hold each coefficient of polynomial.
+ * Used in encoding private and public keys.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] p Polynomial.
+ * @param [in] k Number of polynomials in vector.
+ */
+static void kyber_to_bytes_c(byte* b, sword16* p, int k)
+{
+ int i;
+ int j;
+
+ /* Reduce each coefficient to mod q. */
+ kyber_csubq_c(p);
+ /* All values are now positive. */
+
+ for (j = 0; j < k; j++) {
+ for (i = 0; i < KYBER_N / 2; i++) {
+ word16 t0 = p[2 * i];
+ word16 t1 = p[2 * i + 1];
+ b[3 * i + 0] = (t0 >> 0);
+ b[3 * i + 1] = (t0 >> 8) | t1 << 4;
+ b[3 * i + 2] = (t1 >> 4);
+ }
+ p += KYBER_N;
+ b += KYBER_POLY_SIZE;
+ }
+}
+
+/* Convert polynomial to bytes.
+ *
+ * Consecutive 12 bits hold each coefficient of polynomial.
+ * Used in encoding private and public keys.
+ *
+ * @param [out] b Array of bytes.
+ * @param [in] p Polynomial.
+ * @param [in] k Number of polynomials in vector.
+ */
+void kyber_to_bytes(byte* b, sword16* p, int k)
+{
+#ifdef USE_INTEL_SPEEDUP
+ if (IS_INTEL_AVX2(cpuid_flags)) {
+ int i;
+
+ for (i = 0; i < k; i++) {
+ kyber_to_bytes_avx2(b, p);
+ p += KYBER_N;
+ b += KYBER_POLY_SIZE;
+ }
+ }
+ else
+#endif
+ {
+ kyber_to_bytes_c(b, p, k);
+ }
+}
+
+#endif /* WOLFSSL_WC_KYBER */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms.c
index 60e8519d..cdc732f6 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms.c
@@ -1,6 +1,6 @@
/* wc_lms.c
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms_impl.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms_impl.c
new file mode 100644
index 00000000..dbd5ed68
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_lms_impl.c
@@ -0,0 +1,26 @@
+/* wc_lms_impl.c
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 <wolfssl/wolfcrypt/settings.h>
+
+#ifdef WOLFSSL_HAVE_LMS
+ #error "Contact wolfSSL to get the implementation of this file"
+#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_port.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_port.c
index ef61df84..a21cc2b9 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_port.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_port.c
@@ -36,12 +36,6 @@
#include <wolfssl/wolfcrypt/async.h>
#endif
-/* IPP header files for library initialization */
-#ifdef HAVE_FAST_RSA
- #include <ipp.h>
- #include <ippcp.h>
-#endif
-
#ifdef FREESCALE_LTC_TFM
#include <wolfssl/wolfcrypt/port/nxp/ksdk_port.h>
#endif
@@ -127,6 +121,16 @@
#include <wolfssl/wolfcrypt/port/psa/psa.h>
#endif
+#if defined(HAVE_LIBOQS)
+ #include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
+#endif
+
+#if defined(FREERTOS) && defined(WOLFSSL_ESPIDF)
+ #include <freertos/FreeRTOS.h>
+ #include <freertos/task.h>
+ /* The Espressif-specific platform include: */
+ #include <pthread.h>
+#endif
/* prevent multiple mutex initializations */
static volatile int initRefCount = 0;
@@ -228,20 +232,6 @@ int wolfCrypt_Init(void)
}
#endif
- /* if defined have fast RSA then initialize Intel IPP */
- #ifdef HAVE_FAST_RSA
- WOLFSSL_MSG("Attempting to use optimized IPP Library");
- if ((ret = ippInit()) != ippStsNoErr) {
- /* possible to get a CPU feature support status on optimized IPP
- library but still use default library and see competitive speeds */
- WOLFSSL_MSG("Warning when trying to set up optimization");
- WOLFSSL_MSG(ippGetStatusString(ret));
- WOLFSSL_MSG("Using default fast IPP library");
- ret = 0;
- (void)ret; /* suppress not read warning */
- }
- #endif
-
#if defined(FREESCALE_LTC_TFM) || defined(FREESCALE_LTC_ECC)
ret = ksdk_port_init();
if (ret != 0) {
@@ -386,6 +376,12 @@ int wolfCrypt_Init(void)
}
rpcmem_init();
#endif
+
+#if defined(HAVE_LIBOQS)
+ if ((ret = wolfSSL_liboqsInit()) != 0) {
+ return ret;
+ }
+#endif
}
initRefCount++;
@@ -497,6 +493,10 @@ int wolfCrypt_Cleanup(void)
#endif
}
+#if defined(HAVE_LIBOQS)
+ wolfSSL_liboqsClose();
+#endif
+
return ret;
}
@@ -1283,18 +1283,22 @@ void wolfSSL_RefDec(wolfSSL_Ref* ref, int* isZero, int* err)
#if WOLFSSL_CRYPT_HW_MUTEX
/* Mutex for protection of cryptography hardware */
-static wolfSSL_Mutex wcCryptHwMutex;
+static wolfSSL_Mutex wcCryptHwMutex WOLFSSL_MUTEX_INITIALIZER_CLAUSE(wcCryptHwMutex);
+#ifndef WOLFSSL_MUTEX_INITIALIZER
static int wcCryptHwMutexInit = 0;
+#endif
int wolfSSL_CryptHwMutexInit(void)
{
int ret = 0;
+#ifndef WOLFSSL_MUTEX_INITIALIZER
if (wcCryptHwMutexInit == 0) {
ret = wc_InitMutex(&wcCryptHwMutex);
if (ret == 0) {
wcCryptHwMutexInit = 1;
}
}
+#endif
return ret;
}
int wolfSSL_CryptHwMutexLock(void)
@@ -3426,6 +3430,7 @@ char* mystrnstr(const char* s1, const char* s2, unsigned int n)
#ifndef SINGLE_THREADED
+/* Environment-specific multi-thread implementation check */
#if defined(USE_WINDOWS_API) && !defined(WOLFSSL_PTHREADS)
int wolfSSL_NewThread(THREAD_TYPE* thread,
THREAD_CB cb, void* arg)
@@ -3724,7 +3729,8 @@ char* mystrnstr(const char* s1, const char* s2, unsigned int n)
#endif /* WOLFSSL_COND */
-#elif defined(WOLFSSL_PTHREADS)
+#elif defined(WOLFSSL_PTHREADS) || \
+ (defined(FREERTOS) && defined(WOLFSSL_ESPIDF))
int wolfSSL_NewThread(THREAD_TYPE* thread,
THREAD_CB cb, void* arg)
@@ -3738,18 +3744,18 @@ char* mystrnstr(const char* s1, const char* s2, unsigned int n)
return 0;
}
-#ifdef WOLFSSL_THREAD_NO_JOIN
- int wolfSSL_NewThreadNoJoin(THREAD_CB_NOJOIN cb, void* arg)
- {
- THREAD_TYPE thread;
- int ret;
- XMEMSET(&thread, 0, sizeof(thread));
- ret = wolfSSL_NewThread(&thread, cb, arg);
- if (ret == 0)
- ret = pthread_detach(thread);
- return ret;
- }
-#endif
+ #ifdef WOLFSSL_THREAD_NO_JOIN
+ int wolfSSL_NewThreadNoJoin(THREAD_CB_NOJOIN cb, void* arg)
+ {
+ THREAD_TYPE thread;
+ int ret;
+ XMEMSET(&thread, 0, sizeof(thread));
+ ret = wolfSSL_NewThread(&thread, cb, arg);
+ if (ret == 0)
+ ret = pthread_detach(thread);
+ return ret;
+ }
+ #endif
int wolfSSL_JoinThread(THREAD_TYPE thread)
{
@@ -3937,6 +3943,6 @@ char* mystrnstr(const char* s1, const char* s2, unsigned int n)
#endif /* __MACH__ */
#endif /* WOLFSSL_COND */
-#endif
+#endif /* Environment check */
-#endif /* SINGLE_THREADED */
+#endif /* not SINGLE_THREADED */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/src/wc_xmss_impl.c b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_xmss_impl.c
new file mode 100644
index 00000000..4a91f996
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfcrypt/src/wc_xmss_impl.c
@@ -0,0 +1,26 @@
+/* wc_xmss_impl.c
+ *
+ * Copyright (C) 2006-2023 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 <wolfssl/wolfcrypt/settings.h>
+
+#ifdef WOLFSSL_HAVE_XMSS
+ #error "Contact wolfSSL to get the implementation of this file"
+#endif
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/test/test.c b/extra/wolfssl/wolfssl/wolfcrypt/test/test.c
index 0d1bf239..feab257f 100644
--- a/extra/wolfssl/wolfssl/wolfcrypt/test/test.c
+++ b/extra/wolfssl/wolfssl/wolfcrypt/test/test.c
@@ -134,7 +134,8 @@ const byte const_byte_array[] = "A+Gd\0\0\0";
#include <time.h>
#include <sys/time.h>
#include <esp_log.h>
- #include <wolfcrypt/port/Espressif/esp32-crypt.h> /* */
+ #include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h>
+ #define ESPIDF_TAG "wc_test"
#elif defined(WOLFSSL_ZEPHYR)
#include <stdio.h>
@@ -212,7 +213,7 @@ const byte const_byte_array[] = "A+Gd\0\0\0";
int ret;
char tmpBuf[80];
- ret = XSNPRINTF(tmpBuf, sizeof(tmpBuf), format, args);
+ ret = XVSNPRINTF(tmpBuf, sizeof(tmpBuf), format, args);
printf(tmpBuf);
return ret;
@@ -316,12 +317,16 @@ const byte const_byte_array[] = "A+Gd\0\0\0";
#include <wolfssl/wolfcrypt/xmss.h>
#ifdef HAVE_LIBXMSS
#include <wolfssl/wolfcrypt/ext_xmss.h>
+#else
+ #include <wolfssl/wolfcrypt/wc_xmss.h>
#endif
#endif
#if defined(WOLFSSL_HAVE_LMS)
#include <wolfssl/wolfcrypt/lms.h>
#ifdef HAVE_LIBLMS
#include <wolfssl/wolfcrypt/ext_lms.h>
+#else
+ #include <wolfssl/wolfcrypt/wc_lms.h>
#endif
#endif
#ifdef WOLFCRYPT_HAVE_ECCSI
@@ -534,6 +539,12 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t XChaCha20Poly1305_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t des_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t des3_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void);
+#if defined(WOLFSSL_AES_CFB)
+WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_cfb_test(void);
+#endif
+#ifdef WOLFSSL_AES_XTS
+WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_xts_test(void);
+#endif
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesofb_test(void);
@@ -608,20 +619,22 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t scrypt_test(void);
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t kyber_test(void);
#endif
#if defined(WOLFSSL_HAVE_XMSS)
+ #if !defined(WOLFSSL_SMALL_STACK) && WOLFSSL_XMSS_MIN_HEIGHT <= 10
+ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void);
+ #endif
#if !defined(WOLFSSL_XMSS_VERIFY_ONLY)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test(void);
#endif
- #if defined(WOLFSSL_XMSS_VERIFY_ONLY) && !defined(WOLFSSL_SMALL_STACK)
- WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void);
- #endif
#endif
#if defined(WOLFSSL_HAVE_LMS)
+ #if !defined(WOLFSSL_SMALL_STACK)
+ #if defined(WOLFSSL_WC_LMS) && (LMS_MAX_HEIGHT >= 10)
+ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void);
+ #endif
+ #endif
#if !defined(WOLFSSL_LMS_VERIFY_ONLY)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test(void);
#endif
- #if defined(WOLFSSL_LMS_VERIFY_ONLY) && !defined(WOLFSSL_SMALL_STACK)
- WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void);
- #endif
#endif
#ifdef WOLFCRYPT_HAVE_ECCSI
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t eccsi_test(void);
@@ -720,19 +733,33 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_eax_test(void);
/* General big buffer size for many tests. */
#define FOURK_BUF 4096
+/* If not defined in user_settings, the ERROR_OUT pause is 120 seconds. */
+#ifndef WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION
+ #define WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION 120
+#endif
#if defined(WOLFSSL_ESPIDF_ERROR_PAUSE)
+ #if defined(CONFIG_FREERTOS_HZ)
+ #define WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION_TICKS \
+ (WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION * CONFIG_FREERTOS_HZ)
+ #else
+ /* If not defined, assume RTOS is 1000 ticks per second. */
+ #define WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION_TICKS \
+ (WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION * 1000)
+ #endif
/* When defined, pause at error condition rather than exit with error. */
- #define ERROR_OUT(err, eLabel) \
- do { \
- ret = (err); \
- esp_ShowExtendedSystemInfo(); \
- ESP_LOGE("wolfcrypt_test", "ESP Error! ret = %d ", err); \
- while (1) { \
- vTaskDelay(60000); \
- } \
- /* Just to appease compiler, don't actually go to eLabel */ \
- goto eLabel; \
- } while (0)
+ #define ERROR_OUT(err, eLabel) \
+ do { \
+ ret = (err); \
+ ESP_LOGE(ESPIDF_TAG, "Failed: Error = %d during %s, line %d", \
+ err, __FUNCTION__, __LINE__); \
+ ESP_LOGI(ESPIDF_TAG, "Extended system info:"); \
+ esp_ShowExtendedSystemInfo(); \
+ ESP_LOGW(ESPIDF_TAG, "Paused for %d seconds! " \
+ "WOLFSSL_ESPIDF_ERROR_PAUSE is enabled.", \
+ WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION); \
+ vTaskDelay(WOLFSSL_ESPIDF_ERROR_PAUSE_DURATION_TICKS); \
+ goto eLabel; \
+ } while (0)
#else
#define ERROR_OUT(err, eLabel) do { ret = (err); goto eLabel; } while (0)
#endif
@@ -1461,7 +1488,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
if ( (ret = aesofb_test()) != 0)
TEST_FAIL("AES-OFB test failed!\n", ret);
else
- TEST_PASS("AESOFB test passed!\n");
+ TEST_PASS("AES-OFB test passed!\n");
#endif
#ifdef HAVE_AESGCM
@@ -1488,6 +1515,21 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
else
TEST_PASS("AES-CCM test passed!\n");
#endif
+
+#ifdef WOLFSSL_AES_CFB
+ if ( (ret = aes_cfb_test()) != 0)
+ TEST_FAIL("AES-CFB test failed!\n", ret);
+ else
+ TEST_PASS("AES-CFB test passed!\n");
+#endif
+
+#ifdef WOLFSSL_AES_XTS
+ if ( (ret = aes_xts_test()) != 0)
+ TEST_FAIL("AES-XTS test failed!\n", ret);
+ else
+ TEST_PASS("AES-XTS test passed!\n");
+#endif
+
#ifdef HAVE_AES_KEYWRAP
if ( (ret = aeskeywrap_test()) != 0)
TEST_FAIL("AES Key Wrap test failed!\n", ret);
@@ -1699,15 +1741,15 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
#endif
#if defined(WOLFSSL_HAVE_XMSS)
- #if !defined(WOLFSSL_XMSS_VERIFY_ONLY)
- if ( (ret = xmss_test()) != 0)
- TEST_FAIL("XMSS test failed!\n", ret);
+ #if !defined(WOLFSSL_SMALL_STACK) && WOLFSSL_XMSS_MIN_HEIGHT <= 10
+ if ( (ret = xmss_test_verify_only()) != 0)
+ TEST_FAIL("XMSS Vfy test failed!\n", ret);
else
- TEST_PASS("XMSS test passed!\n");
+ TEST_PASS("XMSS Vfy test passed!\n");
#endif
- #if defined(WOLFSSL_XMSS_VERIFY_ONLY) && !defined(WOLFSSL_SMALL_STACK)
- if ( (ret = xmss_test_verify_only()) != 0)
+ #if !defined(WOLFSSL_XMSS_VERIFY_ONLY)
+ if ( (ret = xmss_test()) != 0)
TEST_FAIL("XMSS test failed!\n", ret);
else
TEST_PASS("XMSS test passed!\n");
@@ -1715,15 +1757,17 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
#endif /* if defined(WOLFSSL_HAVE_XMSS) */
#if defined(WOLFSSL_HAVE_LMS)
- #if !defined(WOLFSSL_LMS_VERIFY_ONLY)
- if ( (ret = lms_test()) != 0)
- TEST_FAIL("LMS test failed!\n", ret);
+ #if !defined(WOLFSSL_SMALL_STACK)
+ #if defined(WOLFSSL_WC_LMS) && (LMS_MAX_HEIGHT >= 10)
+ if ( (ret = lms_test_verify_only()) != 0)
+ TEST_FAIL("LMS Vfy test failed!\n", ret);
else
- TEST_PASS("LMS test passed!\n");
+ TEST_PASS("LMS Vfy test passed!\n");
+ #endif
#endif
- #if defined(WOLFSSL_LMS_VERIFY_ONLY) && !defined(WOLFSSL_SMALL_STACK)
- if ( (ret = lms_test_verify_only()) != 0)
+ #if !defined(WOLFSSL_LMS_VERIFY_ONLY)
+ if ( (ret = lms_test()) != 0)
TEST_FAIL("LMS test failed!\n", ret);
else
TEST_PASS("LMS test passed!\n");
@@ -1897,10 +1941,17 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
if (args)
((func_args*)args)->return_code = ret;
+/* If hardware acceleration and respective metrics tracked, show results: */
+#ifdef WOLFSSL_HW_METRICS
+ #if defined(WOLFSSL_ESP32_CRYPT_RSA_PRI) && defined(WOLFSSL_HW_METRICS)
+ esp_hw_show_mp_metrics();
+ #endif
+#endif
+
TEST_PASS("Test complete\n");
EXIT_TEST(ret);
-}
+} /* end of wolfcrypt_test() */
#ifndef NO_MAIN_DRIVER
@@ -1937,7 +1988,7 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
#endif
#ifdef WOLFSSL_APACHE_MYNEWT
#ifdef ARCH_sim
- mcu_sim_parse_args(argc, argv);
+ mcu_sim_parse_args(argc, argv);
#endif
sysinit();
@@ -1994,19 +2045,19 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
err_sys("Error with wolfCrypt_Init!\n", WC_TEST_RET_ENC_EC(ret));
}
- #ifdef HAVE_WC_INTROSPECTION
+#ifdef HAVE_WC_INTROSPECTION
printf("Math: %s\n", wc_GetMathInfo());
- #endif
+#endif
#ifdef WC_RNG_SEED_CB
- wc_SetSeed_Cb(wc_GenerateSeed);
+ wc_SetSeed_Cb(wc_GenerateSeed);
#endif
- #ifdef HAVE_STACK_SIZE
+#ifdef HAVE_STACK_SIZE
StackSizeCheck(&args, wolfcrypt_test);
- #else
+#else
wolfcrypt_test(&args);
- #endif
+#endif
if ((ret = wolfCrypt_Cleanup()) != 0) {
printf("wolfCrypt_Cleanup failed %d\n", (int)ret);
@@ -2026,7 +2077,14 @@ options: [-s max_relative_stack_bytes] [-m max_relative_heap_memory_bytes]\n\
while (1);
#endif
+#if defined(WOLFSSL_ESPIDF)
+ /* ESP_LOGI to print takes up a lot less memory than printf */
+ ESP_LOGI(ESPIDF_TAG, "Exiting main with return code: % d\n",
+ args.return_code);
+#else
+ /* gate this for target platforms wishing to avoid printf reference */
printf("Exiting main with return code: %ld\n", (long int)args.return_code);
+#endif
return args.return_code;
} /* wolfcrypt_test_main or wolf_test_task */
@@ -2124,6 +2182,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void)
/* Ensure a valid error code's string matches an invalid code's.
* The string is that error strings are not available.
*/
+ WOLFSSL_ENTER("error_test NO_ERROR_STRINGS");
errStr = wc_GetErrorString(OPEN_RAN_E);
wc_ErrorString(OPEN_RAN_E, out);
if (XSTRCMP(errStr, unknownStr) != 0)
@@ -2134,8 +2193,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void)
int i;
int j = 0;
/* Values that are not or no longer error codes. */
- int missing[] = { -123, -124, -128, -129, -159, -163, -164,
+ int missing[] = { -124, -128, -129, -159, -163, -164,
-165, -166, -167, -168, -169, -233, 0 };
+ WOLFSSL_ENTER("error_test !NO_ERROR_STRINGS");
/* Check that all errors have a string and it's the same through the two
* APIs. Check that the values that are not errors map to the unknown
@@ -2146,14 +2206,22 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t error_test(void)
wc_ErrorString(i, out);
if (i != missing[j]) {
- if (XSTRCMP(errStr, unknownStr) == 0)
+ if (XSTRCMP(errStr, unknownStr) == 0) {
+ WOLFSSL_MSG("errStr unknown");
return WC_TEST_RET_ENC_NC;
- if (XSTRCMP(out, unknownStr) == 0)
+ }
+ if (XSTRCMP(out, unknownStr) == 0) {
+ WOLFSSL_MSG("out unknown");
return WC_TEST_RET_ENC_NC;
- if (XSTRCMP(errStr, out) != 0)
+ }
+ if (XSTRCMP(errStr, out) != 0) {
+ WOLFSSL_MSG("errStr does not match output");
return WC_TEST_RET_ENC_NC;
- if (XSTRLEN(errStr) >= WOLFSSL_MAX_ERROR_SZ)
+ }
+ if (XSTRLEN(errStr) >= WOLFSSL_MAX_ERROR_SZ) {
+ WOLFSSL_MSG("errStr too long");
return WC_TEST_RET_ENC_NC;
+ }
}
else {
j++;
@@ -2203,6 +2271,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t base64_test(void)
"0123456789+/;";
byte charTest[] = "A+Gd\0\0\0";
int i;
+ WOLFSSL_ENTER("base64_test");
/* Good Base64 encodings. */
outLen = sizeof(out);
@@ -2334,6 +2403,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t base16_test(void)
word32 encodedLen;
byte plain[40];
word32 len;
+ WOLFSSL_ENTER("base16_test");
/* length returned includes null termination */
encodedLen = sizeof(encoded);
@@ -2377,6 +2447,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t asn_test(void)
struct tm timearg;
time_t now;
#endif
+ WOLFSSL_ENTER("asn_test");
ret = wc_GetDateInfo(dateBuf, (int)sizeof(dateBuf), &datePart, &format,
&length);
@@ -2418,6 +2489,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t md2_test(void)
testVector a, b, c, d, e, f, g;
testVector test_md2[7];
int times = sizeof(test_md2) / sizeof(testVector), i;
+ WOLFSSL_ENTER("md2_test");
a.input = "";
a.output = "\x83\x50\xe5\xa3\xe2\x4c\x15\x3d\xf2\x27\x5c\x9f\x80\x69"
@@ -2506,6 +2578,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t md5_test(void)
testVector a, b, c, d, e, f;
testVector test_md5[6];
int times = sizeof(test_md5) / sizeof(testVector), i;
+ WOLFSSL_ENTER("md5_test");
a.input = "";
a.output = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\x09\x98\xec\xf8\x42"
@@ -2635,6 +2708,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t md4_test(void)
testVector a, b, c, d, e, f, g;
testVector test_md4[7];
int times = sizeof(test_md4) / sizeof(testVector), i;
+ WOLFSSL_ENTER("md4_test");
a.input = "";
a.output = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31\xb7\x3c\x59\xd7\xe0\xc0\x89"
@@ -2714,6 +2788,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha_test(void)
testVector a, b, c, d, e;
testVector test_sha[5];
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha_test");
a.input = "";
a.output = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55\xbf\xef\x95\x60\x18"
@@ -2844,6 +2919,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ripemd_test(void)
testVector a, b, c, d;
testVector test_ripemd[4];
int times = sizeof(test_ripemd) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("ripemd_test");
a.input = "abc";
a.output = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04\x4a\x8e\x98\xc6"
@@ -2948,6 +3024,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t blake2b_test(void)
byte digest[64];
byte input[64];
int i, ret;
+ WOLFSSL_ENTER("blake2b_test");
for (i = 0; i < (int)sizeof(input); i++)
input[i] = (byte)i;
@@ -3009,6 +3086,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t blake2s_test(void)
byte digest[32];
byte input[64];
int i, ret;
+ WOLFSSL_ENTER("blake2s_test");
for (i = 0; i < (int)sizeof(input); i++)
input[i] = (byte)i;
@@ -3047,6 +3125,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha224_test(void)
testVector a, b, c;
testVector test_sha[3];
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha224_test");
a.input = "";
a.output = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9\x47\x61\x02\xbb\x28\x82\x34"
@@ -3118,9 +3197,25 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void)
byte hashcopy[WC_SHA256_DIGEST_SIZE];
wc_test_ret_t ret = 0;
- testVector a, b, c;
- testVector test_sha[3];
+ testVector a, b, c, d;
+ testVector test_sha[4];
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ byte i_hash[WC_SHA256_DIGEST_SIZE];
+ byte i_hashcopy[WC_SHA256_DIGEST_SIZE];
+ testVector interleave_test_sha[4];
+ wc_Sha256 i_sha, i_shaCopy;
+#endif
+#ifndef NO_LARGE_HASH_TEST
+#define LARGE_HASH_TEST_INPUT_SZ 1024
+#ifdef WOLFSSL_SMALL_STACK
+ byte *large_input = NULL;
+#else
+ byte large_input[LARGE_HASH_TEST_INPUT_SZ];
+#endif
+#endif
+
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha256_test");
a.input = "";
a.output = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14\x9a\xfb\xf4\xc8\x99\x6f\xb9"
@@ -3143,18 +3238,49 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void)
c.inLen = XSTRLEN(c.input);
c.outLen = WC_SHA256_DIGEST_SIZE;
+ d.input = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+ "aaaaaa"; /* this is BLOCKSIZE length */
+ d.output = "\xFF\xE0\x54\xFE\x7A\xE0\xCB\x6D\xC6\x5C\x3A\xF9\xB6\x1D\x52"
+ "\x09\xF4\x39\x85\x1D\xB4\x3D\x0B\xA5\x99\x73\x37\xDF\x15\x46"
+ "\x68\xEB";
+ d.inLen = XSTRLEN(d.input);
+ d.outLen = WC_SHA256_DIGEST_SIZE;
+
test_sha[0] = a;
test_sha[1] = b;
test_sha[2] = c;
+ test_sha[3] = d;
+
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ interleave_test_sha[0] = a;
+ interleave_test_sha[1] = b;
+ interleave_test_sha[2] = c;
+ interleave_test_sha[3] = d;
+#endif
ret = wc_InitSha256_ex(&sha, HEAP_HINT, devId);
if (ret != 0)
return WC_TEST_RET_ENC_EC(ret);
+
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ ret = wc_InitSha256_ex(&i_sha, HEAP_HINT, devId);
+ if (ret != 0)
+ return WC_TEST_RET_ENC_EC(ret);
+#endif
+
ret = wc_InitSha256_ex(&shaCopy, HEAP_HINT, devId);
if (ret != 0) {
wc_Sha256Free(&sha);
return WC_TEST_RET_ENC_EC(ret);
}
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ ret = wc_InitSha256_ex(&i_shaCopy, HEAP_HINT, devId);
+ if (ret != 0) {
+ wc_Sha256Free(&sha);
+ wc_Sha256Free(&i_sha);
+ return WC_TEST_RET_ENC_EC(ret);
+ }
+#endif
for (i = 0; i < times; ++i) {
ret = wc_Sha256Update(&sha, (byte*)test_sha[i].input,
@@ -3162,36 +3288,91 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void)
if (ret != 0) {
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
}
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ ret = wc_Sha256Update(&i_sha, (byte*)interleave_test_sha[i].input,
+ (word32)interleave_test_sha[i].inLen);
+ if (ret != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+#endif
+
ret = wc_Sha256GetHash(&sha, hashcopy);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ ret = wc_Sha256GetHash(&i_sha, i_hashcopy);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
ret = wc_Sha256Copy(&sha, &shaCopy);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ ret = wc_Sha256Copy(&i_sha, &i_shaCopy);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
ret = wc_Sha256Final(&sha, hash);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ ret = wc_Sha256Final(&i_sha, i_hash);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
wc_Sha256Free(&shaCopy);
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ wc_Sha256Free(&i_shaCopy);
+#endif
- if (XMEMCMP(hash, test_sha[i].output, WC_SHA256_DIGEST_SIZE) != 0)
+ if (XMEMCMP(hash, test_sha[i].output, WC_SHA256_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+ if (XMEMCMP(hash, hashcopy, WC_SHA256_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ if (XMEMCMP(i_hash, interleave_test_sha[i].output,
+ WC_SHA256_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+ if (XMEMCMP(i_hash, i_hashcopy, WC_SHA256_DIGEST_SIZE) != 0) {
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
- if (XMEMCMP(hash, hashcopy, WC_SHA256_DIGEST_SIZE) != 0)
+ }
+ if (XMEMCMP(i_hash, test_sha[i].output, WC_SHA256_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+ if (XMEMCMP(i_hash, hashcopy, WC_SHA256_DIGEST_SIZE) != 0) {
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+#endif
}
#ifndef NO_LARGE_HASH_TEST
/* BEGIN LARGE HASH TEST */ {
- byte large_input[1024];
#ifdef HASH_SIZE_LIMIT
- const char* large_digest =
+ WOLFSSL_SMALL_STACK_STATIC const char* large_digest =
"\xa4\x75\x9e\x7a\xa2\x03\x38\x32\x88\x66\xa2\xea\x17\xea\xf8\xc7"
"\xfe\x4e\xc6\xbb\xe3\xbb\x71\xce\xe7\xdf\x7c\x04\x61\xb3\xc2\x2f";
#else
- const char* large_digest =
+ WOLFSSL_SMALL_STACK_STATIC const char* large_digest =
"\x27\x78\x3e\x87\x96\x3a\x4e\xfb\x68\x29\xb5\x31\xc9\xba\x57\xb4"
"\x4f\x45\x79\x7f\x67\x70\xbd\x63\x7f\xbf\x0d\x80\x7c\xbd\xba\xe0";
#endif
- for (i = 0; i < (int)sizeof(large_input); i++) {
+
+#ifdef WOLFSSL_SMALL_STACK
+ large_input = (byte *)XMALLOC(LARGE_HASH_TEST_INPUT_SZ, HEAP_HINT,
+ DYNAMIC_TYPE_TMP_BUFFER);
+
+ if (large_input == NULL) {
+ ERROR_OUT(WC_TEST_RET_ENC_EC(MEMORY_E), exit);
+ }
+#endif
+
+ for (i = 0; i < LARGE_HASH_TEST_INPUT_SZ; i++) {
large_input[i] = (byte)(i & 0xFF);
}
#ifdef HASH_SIZE_LIMIT
@@ -3200,11 +3381,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void)
times = 100;
#endif
#ifdef WOLFSSL_PIC32MZ_HASH
- wc_Sha256SizeSet(&sha, times * sizeof(large_input));
+ wc_Sha256SizeSet(&sha, times * LARGE_HASH_TEST_INPUT_SZ);
#endif
for (i = 0; i < times; ++i) {
ret = wc_Sha256Update(&sha, (byte*)large_input,
- (word32)sizeof(large_input));
+ LARGE_HASH_TEST_INPUT_SZ);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
}
@@ -3214,13 +3395,49 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha256_test(void)
if (XMEMCMP(hash, large_digest, WC_SHA256_DIGEST_SIZE) != 0)
ERROR_OUT(WC_TEST_RET_ENC_NC, exit);
} /* END LARGE HASH TEST */
+#undef LARGE_HASH_TEST_INPUT_SZ
#endif /* NO_LARGE_HASH_TEST */
+#if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_FULL_HASH)
+ unsigned char data_hb[WC_SHA256_BLOCK_SIZE] = {
+ 0x61, 0x62, 0x63, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18
+ };
+
+ ret = wc_Sha256HashBlock(&sha, data_hb, hash);
+ if (ret != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
+ }
+ if (XMEMCMP(hash, b.output, WC_SHA256_DIGEST_SIZE) != 0) {
+{
+ for (int ii = 0; ii < WC_SHA256_DIGEST_SIZE; ii++)
+ fprintf(stderr, " %02x", hash[ii]);
+ fprintf(stderr, "\n");
+ for (int ii = 0; ii < WC_SHA256_DIGEST_SIZE; ii++)
+ fprintf(stderr, " %02x", b.output[ii]);
+ fprintf(stderr, "\n");
+}
+ ERROR_OUT(WC_TEST_RET_ENC_NC, exit);
+ }
+#endif
+
exit:
+#if !defined(NO_LARGE_HASH_TEST) && defined(WOLFSSL_SMALL_STACK)
+ XFREE(large_input, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
wc_Sha256Free(&sha);
wc_Sha256Free(&shaCopy);
-
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ wc_Sha256Free(&i_sha);
+ wc_Sha256Free(&i_shaCopy);
+#endif
return ret;
}
#endif
@@ -3239,7 +3456,23 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha512_test(void)
testVector a, b, c;
testVector test_sha[3];
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ wc_Sha512 i_sha, i_shaCopy;
+ byte i_hash[WC_SHA512_DIGEST_SIZE];
+ byte i_hashcopy[WC_SHA512_DIGEST_SIZE];
+ testVector interleave_test_sha[3];
+#endif
+#ifndef NO_LARGE_HASH_TEST
+#define LARGE_HASH_TEST_INPUT_SZ 1024
+#ifdef WOLFSSL_SMALL_STACK
+ byte *large_input = NULL;
+#else
+ byte large_input[LARGE_HASH_TEST_INPUT_SZ];
+#endif
+#endif
+
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha512_test");
a.input = "";
a.output = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd\xf1\x54\x28\x50\xd6\x6d\x80"
@@ -3273,55 +3506,127 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha512_test(void)
test_sha[1] = b;
test_sha[2] = c;
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ interleave_test_sha[0] = a;
+ interleave_test_sha[1] = b;
+ interleave_test_sha[2] = c;
+#endif
+
ret = wc_InitSha512_ex(&sha, HEAP_HINT, devId);
if (ret != 0)
return WC_TEST_RET_ENC_EC(ret);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ ret = wc_InitSha512_ex(&i_sha, HEAP_HINT, devId);
+ if (ret != 0)
+ return WC_TEST_RET_ENC_EC(ret);
+#endif
+
ret = wc_InitSha512_ex(&shaCopy, HEAP_HINT, devId);
if (ret != 0) {
wc_Sha512Free(&sha);
return WC_TEST_RET_ENC_EC(ret);
}
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ ret = wc_InitSha512_ex(&i_shaCopy, HEAP_HINT, devId);
+ if (ret != 0) {
+ wc_Sha512Free(&sha);
+ wc_Sha512Free(&i_sha);
+ return WC_TEST_RET_ENC_EC(ret);
+ }
+#endif
for (i = 0; i < times; ++i) {
ret = wc_Sha512Update(&sha, (byte*)test_sha[i].input,
(word32)test_sha[i].inLen);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ ret = wc_Sha512Update(&i_sha, (byte*)interleave_test_sha[i].input,
+ (word32)interleave_test_sha[i].inLen);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
ret = wc_Sha512GetHash(&sha, hashcopy);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ ret = wc_Sha512GetHash(&i_sha, i_hashcopy);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
ret = wc_Sha512Copy(&sha, &shaCopy);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ ret = wc_Sha512Copy(&i_sha, &i_shaCopy);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
ret = wc_Sha512Final(&sha, hash);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ ret = wc_Sha512Final(&i_sha, i_hash);
+ if (ret != 0)
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#endif
+
wc_Sha512Free(&shaCopy);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ wc_Sha512Free(&i_shaCopy);
+#endif
if (XMEMCMP(hash, test_sha[i].output, WC_SHA512_DIGEST_SIZE) != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
if (XMEMCMP(hash, hashcopy, WC_SHA512_DIGEST_SIZE) != 0)
ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+#ifndef NO_WOLFSSL_SHA512_INTERLEAVE
+ if (XMEMCMP(i_hash, interleave_test_sha[i].output,
+ WC_SHA512_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+ if (XMEMCMP(i_hash, i_hashcopy, WC_SHA512_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+ if (XMEMCMP(i_hash, test_sha[i].output, WC_SHA512_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+ if (XMEMCMP(i_hash, hashcopy, WC_SHA512_DIGEST_SIZE) != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_I(i), exit);
+ }
+#endif
+
}
#ifndef NO_LARGE_HASH_TEST
/* BEGIN LARGE HASH TEST */ {
- byte large_input[1024];
#ifdef HASH_SIZE_LIMIT
- const char* large_digest =
+ WOLFSSL_SMALL_STACK_STATIC const char* large_digest =
"\x30\x9B\x96\xA6\xE9\x43\x78\x30\xA3\x71\x51\x61\xC1\xEB\xE1\xBE"
"\xC8\xA5\xF9\x13\x5A\xD6\x6D\x9E\x46\x31\x31\x67\x8D\xE2\xC0\x0B"
"\x2A\x1A\x03\xE1\xF3\x48\xA7\x33\xBD\x49\xF8\xFF\xF1\xC2\xC2\x95"
"\xCB\xF0\xAF\x87\x61\x85\x58\x63\x6A\xCA\x70\x9C\x8B\x83\x3F\x5D";
#else
- const char* large_digest =
+ WOLFSSL_SMALL_STACK_STATIC const char* large_digest =
"\x5a\x1f\x73\x90\xbd\x8c\xe4\x63\x54\xce\xa0\x9b\xef\x32\x78\x2d"
"\x2e\xe7\x0d\x5e\x2f\x9d\x15\x1b\xdd\x2d\xde\x65\x0c\x7b\xfa\x83"
"\x5e\x80\x02\x13\x84\xb8\x3f\xff\x71\x62\xb5\x09\x89\x63\xe1\xdc"
"\xa5\xdc\xfc\xfa\x9d\x1a\x4d\xc0\xfa\x3a\x14\xf6\x01\x51\x90\xa4";
#endif
- for (i = 0; i < (int)sizeof(large_input); i++) {
+#ifdef WOLFSSL_SMALL_STACK
+ large_input = (byte *)XMALLOC(LARGE_HASH_TEST_INPUT_SZ, HEAP_HINT,
+ DYNAMIC_TYPE_TMP_BUFFER);
+
+ if (large_input == NULL) {
+ ERROR_OUT(WC_TEST_RET_ENC_EC(MEMORY_E), exit);
+ }
+#endif
+
+ for (i = 0; i < LARGE_HASH_TEST_INPUT_SZ; i++) {
large_input[i] = (byte)(i & 0xFF);
}
#ifdef HASH_SIZE_LIMIT
@@ -3331,7 +3636,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha512_test(void)
#endif
for (i = 0; i < times; ++i) {
ret = wc_Sha512Update(&sha, (byte*)large_input,
- (word32)sizeof(large_input));
+ LARGE_HASH_TEST_INPUT_SZ);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
}
@@ -3345,19 +3650,27 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha512_test(void)
/* Unaligned memory access test */
for (i = 1; i < 16; i++) {
ret = wc_Sha512Update(&sha, (byte*)large_input + i,
- (word32)sizeof(large_input) - i);
+ LARGE_HASH_TEST_INPUT_SZ - i);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
ret = wc_Sha512Final(&sha, hash);
}
#endif
} /* END LARGE HASH TEST */
+#undef LARGE_HASH_TEST_INPUT_SZ
#endif /* NO_LARGE_HASH_TEST */
exit:
+
+#if !defined(NO_LARGE_HASH_TEST) && defined(WOLFSSL_SMALL_STACK)
+ XFREE(large_input, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
wc_Sha512Free(&sha);
wc_Sha512Free(&shaCopy);
-
+#ifndef NO_WOLFSSL_SHA256_INTERLEAVE
+ wc_Sha512Free(&i_sha);
+ wc_Sha512Free(&i_shaCopy);
+#endif
return ret;
}
@@ -3379,6 +3692,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha512_224_test(void)
testVector a, b, c;
testVector test_sha[3];
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha512_224_test");
a.input = "";
a.output = "\x6e\xd0\xdd\x02"
@@ -3530,6 +3844,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha512_256_test(void)
testVector a, b, c;
testVector test_sha[3];
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha512_256_test");
a.input = "";
a.output = "\xc6\x72\xb8\xd1" "\xef\x56\xed\x28"
@@ -3677,6 +3992,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha384_test(void)
testVector a, b, c;
testVector test_sha[3];
int times = sizeof(test_sha) / sizeof(struct testVector), i;
+ WOLFSSL_ENTER("sha384_test");
a.input = "";
@@ -4223,6 +4539,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sha3_test(void)
wc_test_ret_t ret;
(void)ret;
+ WOLFSSL_ENTER("sha3_test");
#ifndef WOLFSSL_NOSHA3_224
if ((ret = sha3_224_test()) != 0)
@@ -4456,6 +4773,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t shake128_test(void)
"\x70\xd4\x7c\x19\x01\x1f\x6d\x37\xba\x7b\x74\xc2\xbc\xb6\xbc\x74"
"\xa3\x66\x6c\x9b\x11\x84\x9d\x4a\x36\xbc\x8a\x0d\x4c\xe3\x39\xfa"
"\xfa\x1b";
+ WOLFSSL_ENTER("shake128_test");
/*
@@ -4796,6 +5114,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t shake256_test(void)
"\x8c\x68\xb7\xfb\xac\x55\x8a\x9b\x4d\x91\xe4\x9f\x72\xbb\x6e\x38"
"\xaf\x21\x7d\x21\xaa\x98\x4e\x75\xc4\xb4\x1c\x7c\x50\x45\x54\xf9"
"\xea\x26";
+
+ WOLFSSL_ENTER("shake256_test");
/*
** https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/SHAKE256_Msg0.pdf
*/
@@ -4946,6 +5266,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sm3_test(void)
byte hashGet[WC_SM3_DIGEST_SIZE];
byte hashCopy[WC_SM3_DIGEST_SIZE];
wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("sm3_test");
testVector a, b, c;
testVector test_sm3[3];
@@ -5159,6 +5480,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hash_test(void)
WC_HASH_TYPE_BLAKE2B,
WC_HASH_TYPE_NONE };
+ WOLFSSL_ENTER("hash_test");
+
/* Parameter Validation testing. */
ret = wc_HashInit(NULL, WC_HASH_TYPE_SHA256);
if (ret != BAD_FUNC_ARG)
@@ -5427,6 +5750,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_md5_test(void)
wc_test_ret_t ret;
int times = sizeof(test_hmac) / sizeof(testVector), i;
+ WOLFSSL_ENTER("hmac_md5_test");
a.input = "Hi There";
a.output = "\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc"
@@ -5511,6 +5835,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha_test(void)
wc_test_ret_t ret;
int times = sizeof(test_hmac) / sizeof(testVector), i;
+ WOLFSSL_ENTER("hmac_sha_test");
a.input = "Hi There";
a.output = "\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c"
@@ -5599,6 +5924,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha224_test(void)
wc_test_ret_t ret;
int times = sizeof(test_hmac) / sizeof(testVector), i;
+ WOLFSSL_ENTER("hmac_sha224_test");
a.input = "Hi There";
a.output = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19\x68\x32\x10\x7c\xd4\x9d\xf3"
@@ -5691,6 +6017,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha256_test(void)
wc_test_ret_t ret;
int times = sizeof(test_hmac) / sizeof(testVector), i;
+ WOLFSSL_ENTER("hmac_sha256_test");
a.input = "Hi There";
a.output = "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1"
@@ -5804,6 +6131,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha384_test(void)
wc_test_ret_t ret;
int times = sizeof(test_hmac) / sizeof(testVector), i;
+ WOLFSSL_ENTER("hmac_sha384_test");
a.input = "Hi There";
a.output = "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90"
@@ -5911,6 +6239,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha512_test(void)
wc_test_ret_t ret;
int times = sizeof(test_hmac) / sizeof(testVector), i;
+ WOLFSSL_ENTER("hmac_sha512_test");
a.input = "Hi There";
a.output = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c"
@@ -6122,8 +6451,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hmac_sha3_test(void)
};
int i = 0, iMax = sizeof(input) / sizeof(input[0]),
- j, jMax = sizeof(hashType) / sizeof(hashType[0]),
- ret;
+ j, jMax = sizeof(hashType) / sizeof(hashType[0]);
+ int ret;
+ WOLFSSL_ENTER("hmac_sha3_test");
#ifdef HAVE_FIPS
/* FIPS requires a minimum length for HMAC keys, and "Jefe" is too
@@ -6492,6 +6822,7 @@ static wc_test_ret_t rc2_cbc_test(void)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rc2_test(void)
{
wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("rc2_test");
ret = rc2_ecb_test();
if (ret != 0) {
@@ -6522,6 +6853,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t arc4_test(void)
testVector test_arc4[4];
int times = sizeof(test_arc4) / sizeof(testVector), i;
+ WOLFSSL_ENTER("arc4_test");
a.input = "\x01\x23\x45\x67\x89\xab\xcd\xef";
a.output = "\x75\xb7\x87\x80\x99\xe0\xc5\x96";
@@ -6784,6 +7116,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t chacha_test(void)
test_chacha[2] = c;
test_chacha[3] = d;
+ WOLFSSL_ENTER("chacha_test");
+
#ifndef BENCH_EMBEDDED
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
cipher_big = (byte*)XMALLOC(CHACHA_BIG_TEST_SIZE, HEAP_HINT,
@@ -6980,8 +7314,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t chacha_test(void)
#ifdef HAVE_POLY1305
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t poly1305_test(void)
{
- wc_test_ret_t ret = 0;
- int i;
byte tag[16];
Poly1305 enc;
@@ -7139,6 +7471,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t poly1305_test(void)
const byte* keys[] = {key, key, key2, key2, key5, key};
const byte* tests[] = {correct0, correct1, correct2, correct3, correct5,
correct6};
+ int i;
+ wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("poly1305_test");
for (i = 0; i < 6; i++) {
ret = wc_Poly1305SetKey(&enc, keys[i], 32);
@@ -7354,7 +7689,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t chacha20_poly1305_aead_test(void)
byte generatedCiphertext[265]; /* max plaintext2/cipher2 */
byte generatedPlaintext[265]; /* max plaintext2/cipher2 */
byte generatedAuthTag[CHACHA20_POLY1305_AEAD_AUTHTAG_SIZE];
- wc_test_ret_t err;
ChaChaPoly_Aead aead;
@@ -7363,9 +7697,13 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t chacha20_poly1305_aead_test(void)
#else
#define TEST_SMALL_CHACHA_CHUNKS 64
#endif
- #ifdef TEST_SMALL_CHACHA_CHUNKS
+
+#ifdef TEST_SMALL_CHACHA_CHUNKS
word32 testLen;
- #endif
+#endif
+ wc_test_ret_t err;
+
+ WOLFSSL_ENTER("chacha20_poly1305_aead_test");
XMEMSET(generatedCiphertext, 0, sizeof(generatedCiphertext));
XMEMSET(generatedAuthTag, 0, sizeof(generatedAuthTag));
@@ -7740,6 +8078,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t des_test(void)
};
wc_test_ret_t ret;
+ WOLFSSL_ENTER("des_test");
ret = wc_Des_SetKey(&enc, key, iv, DES_ENCRYPTION);
if (ret != 0)
@@ -7842,7 +8181,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t des3_test(void)
#if defined(OPENSSL_EXTRA) && !defined(WOLFCRYPT_ONLY)
size_t i;
#endif
-
+ WOLFSSL_ENTER("des3_test");
ret = wc_Des3Init(&enc, HEAP_HINT, devId);
if (ret != 0)
@@ -8141,22 +8480,24 @@ EVP_TEST_END:
};
#endif /* WOLFSSL_AES_192 */
-#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
+ #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
Aes *enc = NULL;
-#else
+ #else
Aes enc[1];
-#endif
+ #endif
byte cipher[AES_BLOCK_SIZE * 4];
#ifdef HAVE_AES_DECRYPT
-#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
- Aes *dec = NULL;
-#else
- Aes dec[1];
-#endif
+ #if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
+ Aes *dec = NULL;
+ #else
+ Aes dec[1];
+ #endif
byte plain [AES_BLOCK_SIZE * 4];
#endif
wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("aesofb_test");
+
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((enc = (Aes *)XMALLOC(sizeof *enc, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
ERROR_OUT(-1, out);
@@ -8431,8 +8772,10 @@ EVP_TEST_END:
#endif /* WOLFSSL_AES_OFB */
#if defined(WOLFSSL_AES_CFB)
- /* Test cases from NIST SP 800-38A, Recommendation for Block Cipher Modes of Operation Methods an*/
- static wc_test_ret_t aescfb_test(void)
+ /* Test cases from NIST SP 800-38A, Recommendation for Block Cipher Modes of
+ * Operation Methods and Techniques
+ */
+ static wc_test_ret_t aescfb_test_0(void)
{
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
Aes *enc = NULL;
@@ -9358,7 +9701,7 @@ static wc_test_ret_t aes_key_size_test(void)
return ret;
}
-#if defined(WOLFSSL_AES_XTS) && (!defined(HAVE_FIPS) || FIPS_VERSION_GE(5,3))
+#if defined(WOLFSSL_AES_XTS)
/* test vectors from http://csrc.nist.gov/groups/STM/cavp/block-cipher-modes.html */
#ifdef WOLFSSL_AES_128
@@ -9436,6 +9779,7 @@ static wc_test_ret_t aes_xts_128_test(void)
0x77, 0x8a, 0xe8, 0xb4, 0x3c, 0xb9, 0x8d, 0x5a
};
+#ifndef HAVE_FIPS /* FIPS requires different keys for main and tweak. */
WOLFSSL_SMALL_STACK_STATIC unsigned char k3[] = {
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
@@ -9460,6 +9804,7 @@ static wc_test_ret_t aes_xts_128_test(void)
0xA0, 0x85, 0xD2, 0x69, 0x6E, 0x87, 0x0A, 0xBF,
0xB5, 0x5A, 0xDD, 0xCB, 0x80, 0xE0, 0xFC, 0xCD
};
+#endif /* HAVE_FIPS */
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((aes = (XtsAes *)XMALLOC(sizeof *aes, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
@@ -9567,7 +9912,11 @@ static wc_test_ret_t aes_xts_128_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecrypt(aes, buf, cipher, sizeof(pp), i1, sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -9579,7 +9928,11 @@ static wc_test_ret_t aes_xts_128_test(void)
XMEMSET(buf, 0, sizeof(buf));
ret = wc_AesXtsDecrypt(aes, buf, cipher, sizeof(pp), i1, sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
if (ret != 0)
@@ -9592,7 +9945,11 @@ static wc_test_ret_t aes_xts_128_test(void)
XMEMSET(buf, 0, sizeof(buf));
ret = wc_AesXtsDecrypt(aes, buf, c1, sizeof(c1), i1, sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -9604,7 +9961,11 @@ static wc_test_ret_t aes_xts_128_test(void)
XMEMSET(buf, 0, sizeof(buf));
ret = wc_AesXtsDecrypt(aes, buf, c1, sizeof(c1), i1, sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
if (ret != 0)
@@ -9617,7 +9978,11 @@ static wc_test_ret_t aes_xts_128_test(void)
XMEMSET(buf, 0, sizeof(buf));
ret = wc_AesXtsDecrypt(aes, buf, c2, sizeof(c2), i2, sizeof(i2));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -9631,13 +9996,19 @@ static wc_test_ret_t aes_xts_128_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecrypt(aes, buf, c2, sizeof(c2), i2, sizeof(i2));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
if (XMEMCMP(p2, buf, sizeof(p2)))
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
+#ifndef HAVE_FIPS
+
/* Test ciphertext stealing in-place. */
XMEMCPY(buf, p3, sizeof(p3));
ret = wc_AesXtsSetKeyNoInit(aes, k3, sizeof(k3), AES_ENCRYPTION);
@@ -9658,13 +10029,19 @@ static wc_test_ret_t aes_xts_128_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecrypt(aes, buf, buf, sizeof(c3), i3, sizeof(i3));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
if (XMEMCMP(p3, buf, sizeof(p3)))
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
+#endif /* !HAVE_FIPS */
+
#if !defined(BENCH_EMBEDDED) && !defined(HAVE_CAVIUM) && \
!defined(WOLFSSL_AFALG)
{
@@ -9703,7 +10080,12 @@ static wc_test_ret_t aes_xts_128_test(void)
ret = wc_AesXtsDecrypt(aes, large_input, large_input, j, i1,
sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev,
+ WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -9884,7 +10266,11 @@ static wc_test_ret_t aes_xts_256_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecrypt(aes, buf, cipher, sizeof(pp), i1, sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -9895,7 +10281,11 @@ static wc_test_ret_t aes_xts_256_test(void)
XMEMSET(buf, 0, sizeof(buf));
ret = wc_AesXtsDecrypt(aes, buf, c1, sizeof(c1), i1, sizeof(i1));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -9908,7 +10298,11 @@ static wc_test_ret_t aes_xts_256_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecrypt(aes, buf, c2, sizeof(c2), i2, sizeof(i2));
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -10139,7 +10533,11 @@ static wc_test_ret_t aes_xts_sector_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecryptSector(aes, buf, c1, sizeof(c1), s1);
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -10167,7 +10565,11 @@ static wc_test_ret_t aes_xts_sector_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecryptSector(aes, buf, c2, sizeof(c2), s2);
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -10199,7 +10601,11 @@ static wc_test_ret_t aes_xts_sector_test(void)
ret = wc_AesXtsDecryptConsecutiveSectors(aes, data, c3,
sizeof(c3), s3, sectorSz);
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -10296,14 +10702,22 @@ static wc_test_ret_t aes_xts_args_test(void)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
ret = wc_AesXtsDecryptSector(NULL, buf, c1, sizeof(c1), s1);
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret == 0)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
ret = wc_AesXtsDecryptSector(aes, NULL, c1, sizeof(c1), s1);
#if defined(WOLFSSL_ASYNC_CRYPT)
+ #ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ ret = wc_AsyncWait(ret, &aes->aes_decrypt.asyncDev, WC_ASYNC_FLAG_NONE);
+ #else
ret = wc_AsyncWait(ret, &aes->aes.asyncDev, WC_ASYNC_FLAG_NONE);
+ #endif
#endif
if (ret == 0)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
@@ -11269,6 +11683,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void)
byte key[] = "0123456789abcdef "; /* align */
#endif
WOLFSSL_SMALL_STACK_STATIC const byte iv[] = "1234567890abcdef "; /* align */
+ WOLFSSL_ENTER("aes_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
#if defined(HAVE_AES_CBC) || defined(WOLFSSL_AES_COUNTER) || defined(WOLFSSL_AES_DIRECT)
@@ -11314,8 +11729,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void)
#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
- if (XMEMCMP(cipher, verify_ecb, AES_BLOCK_SIZE))
+ if (XMEMCMP(cipher, verify_ecb, AES_BLOCK_SIZE)) {
+ WOLFSSL_MSG("aes_test cipher vs verify_ecb mismatch!");
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
+ }
#ifdef HAVE_AES_DECRYPT
XMEMSET(plain, 0, AES_BLOCK_SIZE * 4);
ret = wc_AesEcbDecrypt(dec, plain, cipher, AES_BLOCK_SIZE);
@@ -11343,16 +11760,22 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void)
#if defined(WOLFSSL_ASYNC_CRYPT)
ret = wc_AsyncWait(ret, &dec->asyncDev, WC_ASYNC_FLAG_NONE);
#endif
- if (ret != 0)
+ if (ret != 0) {
+ WOLFSSL_MSG("failed wc_AesCbcDecrypt");
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
+ }
- if (XMEMCMP(plain, msg, AES_BLOCK_SIZE))
+ if (XMEMCMP(plain, msg, AES_BLOCK_SIZE)) {
+ WOLFSSL_MSG("wc_AesCbcDecrypt failed plain compare");
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
+ }
#endif /* HAVE_AES_DECRYPT */
/* skipped because wrapped key use in case of renesas sm */
#ifndef HAVE_RENESAS_SYNC
- if (XMEMCMP(cipher, verify, AES_BLOCK_SIZE))
+ if (XMEMCMP(cipher, verify, AES_BLOCK_SIZE)) {
+ WOLFSSL_MSG("wc_AesCbcDecrypt failed cipher-verify compare");
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
+ }
#endif
#endif /* WOLFSSL_AES_128 */
@@ -11612,9 +12035,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void)
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
if (XMEMCMP(plain + AES_BLOCK_SIZE, msg2 + AES_BLOCK_SIZE,
- AES_BLOCK_SIZE))
+ AES_BLOCK_SIZE)) {
+ WOLFSSL_MSG("wc_AesCbcDecrypt failed plain-msg2 compare");
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
-
+ }
#endif /* HAVE_AES_DECRYPT */
}
#endif /* WOLFSSL_AES_128 && !HAVE_RENESAS_SYNC */
@@ -11697,44 +12121,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void)
goto out;
#endif
-#if defined(WOLFSSL_AES_XTS) && (!defined(HAVE_FIPS) || FIPS_VERSION_GE(5,3))
- #ifdef WOLFSSL_AES_128
- ret = aes_xts_128_test();
- if (ret != 0)
- goto out;
- #endif
- #ifdef WOLFSSL_AES_256
- ret = aes_xts_256_test();
- if (ret != 0)
- goto out;
- #endif
- #if defined(WOLFSSL_AES_128) && defined(WOLFSSL_AES_256)
- ret = aes_xts_sector_test();
- if (ret != 0)
- goto out;
- #endif
- #ifdef WOLFSSL_AES_128
- ret = aes_xts_args_test();
- if (ret != 0)
- goto out;
- #endif
-#endif
-
-#if defined(WOLFSSL_AES_CFB)
- ret = aescfb_test();
- if (ret != 0)
- goto out;
-#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
- ret = aescfb1_test();
- if (ret != 0)
- goto out;
-
- ret = aescfb8_test();
- if (ret != 0)
- goto out;
-#endif
-#endif
-
#if defined(HAVE_AES_ECB) && !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST)
ret = aesecb_test();
if (ret != 0)
@@ -11773,6 +12159,58 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_test(void)
return ret;
}
+#if defined(WOLFSSL_AES_CFB)
+WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_cfb_test(void)
+{
+ int ret;
+ WOLFSSL_ENTER("aes_cfb_test");
+
+ ret = aescfb_test_0();
+ if (ret != 0)
+ return ret;
+#if !defined(HAVE_SELFTEST) && !defined(HAVE_FIPS)
+ ret = aescfb1_test();
+ if (ret != 0)
+ return ret;
+
+ ret = aescfb8_test();
+ if (ret != 0)
+ return ret;
+#endif
+ return 0;
+}
+#endif
+
+#if defined(WOLFSSL_AES_XTS)
+WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_xts_test(void)
+{
+ int ret = 0;
+ WOLFSSL_ENTER("aes_xts_test");
+
+ #ifdef WOLFSSL_AES_128
+ ret = aes_xts_128_test();
+ if (ret != 0)
+ return ret;
+ #endif
+ #ifdef WOLFSSL_AES_256
+ ret = aes_xts_256_test();
+ if (ret != 0)
+ return ret;
+ #endif
+ #if defined(WOLFSSL_AES_128) && defined(WOLFSSL_AES_256)
+ ret = aes_xts_sector_test();
+ if (ret != 0)
+ return ret;
+ #endif
+ #ifdef WOLFSSL_AES_128
+ ret = aes_xts_args_test();
+ if (ret != 0)
+ return ret;
+ #endif
+ return 0;
+}
+#endif
+
#ifdef WOLFSSL_AES_192
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void)
{
@@ -11782,6 +12220,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void)
#else
Aes enc[1];
#endif
+ int enc_inited = 0;
byte cipher[AES_BLOCK_SIZE];
#ifdef HAVE_AES_DECRYPT
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
@@ -11789,6 +12228,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void)
#else
Aes dec[1];
#endif
+ int dec_inited = 0;
byte plain[AES_BLOCK_SIZE];
#endif
#endif /* HAVE_AES_CBC */
@@ -11809,15 +12249,16 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void)
0x71,0x78,0x18,0x3a,0x9f,0xa0,0x71,0xe8
};
- WOLFSSL_SMALL_STACK_STATIC byte key[] = {
+ WOLFSSL_SMALL_STACK_STATIC const byte key[] = {
0x8e,0x73,0xb0,0xf7,0xda,0x0e,0x64,0x52,
0xc8,0x10,0xf3,0x2b,0x80,0x90,0x79,0xe5,
0x62,0xf8,0xea,0xd2,0x52,0x2c,0x6b,0x7b
};
- WOLFSSL_SMALL_STACK_STATIC byte iv[] = {
+ WOLFSSL_SMALL_STACK_STATIC const byte iv[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F
};
+ WOLFSSL_ENTER("aes192_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((enc = (Aes *)XMALLOC(sizeof *enc, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
@@ -11831,11 +12272,13 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void)
ret = wc_AesInit(enc, HEAP_HINT, devId);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
+ enc_inited = 1;
#ifdef HAVE_AES_DECRYPT
ret = wc_AesInit(dec, HEAP_HINT, devId);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
#endif
+ dec_inited = 1;
ret = wc_AesSetKey(enc, key, (int) sizeof(key), iv, AES_ENCRYPTION);
if (ret != 0)
@@ -11865,23 +12308,30 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes192_test(void)
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
if (XMEMCMP(plain, msg, (int) sizeof(plain))) {
+ WOLFSSL_MSG("failed wc_AesCbcDecrypt plain-msg compare");
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
}
#endif
- wc_AesFree(enc);
-#ifdef HAVE_AES_DECRYPT
- wc_AesFree(dec);
-#endif
-
out:
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
- if (enc)
+ if (enc) {
+ if (enc_inited)
+ wc_AesFree(enc);
XFREE(enc, HEAP_HINT, DYNAMIC_TYPE_AES);
+ }
#ifdef HAVE_AES_DECRYPT
- if (dec)
+ if (dec) {
+ if (dec_inited)
+ wc_AesFree(dec);
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_AES);
+ }
#endif
+#else /* !WOLFSSL_SMALL_STACK || WOLFSSL_NO_MALLOC */
+ if (enc_inited)
+ wc_AesFree(enc);
+ if (dec_inited)
+ wc_AesFree(dec);
#endif
#endif /* HAVE_AES_CBC */
@@ -11898,6 +12348,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
#else
Aes enc[1];
#endif
+ int enc_inited = 0;
byte cipher[AES_BLOCK_SIZE];
#ifdef HAVE_AES_DECRYPT
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
@@ -11905,6 +12356,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
#else
Aes dec[1];
#endif
+ int dec_inited = 0;
byte plain[AES_BLOCK_SIZE];
#endif
#endif /* HAVE_AES_CBC */
@@ -11928,7 +12380,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
(byte*)guser_PKCbInfo.wrapped_key_aes256;
int keySz = (256/8);
#else
- WOLFSSL_SMALL_STACK_STATIC byte key[] = {
+ WOLFSSL_SMALL_STACK_STATIC const byte key[] = {
0x60,0x3d,0xeb,0x10,0x15,0xca,0x71,0xbe,
0x2b,0x73,0xae,0xf0,0x85,0x7d,0x77,0x81,
0x1f,0x35,0x2c,0x07,0x3b,0x61,0x08,0xd7,
@@ -11936,10 +12388,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
};
int keySz = (int)sizeof(key);
#endif
- WOLFSSL_SMALL_STACK_STATIC byte iv[] = {
+ WOLFSSL_SMALL_STACK_STATIC const byte iv[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F
};
+ WOLFSSL_ENTER("aes256_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((enc = (Aes *)XMALLOC(sizeof *enc, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
@@ -11953,11 +12406,13 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
ret = wc_AesInit(enc, HEAP_HINT, devId);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
+ enc_inited = 1;
#ifdef HAVE_AES_DECRYPT
ret = wc_AesInit(dec, HEAP_HINT, devId);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
#endif
+ dec_inited = 1;
ret = wc_AesSetKey(enc, key, keySz, iv, AES_ENCRYPTION);
if (ret != 0)
@@ -11991,10 +12446,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
if (XMEMCMP(cipher, verify, (int) sizeof(cipher)))
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
#endif
- wc_AesFree(enc);
-#ifdef HAVE_AES_DECRYPT
- wc_AesFree(dec);
-#endif
#if defined(DEBUG_VECTOR_REGISTER_ACCESS) && defined(WC_AES_C_DYNAMIC_FALLBACK)
ret = wc_AesSetKey(enc, key, keySz, iv, AES_ENCRYPTION);
@@ -12034,11 +12485,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
#endif
- wc_AesFree(enc);
-#ifdef HAVE_AES_DECRYPT
- wc_AesFree(dec);
-#endif
-
WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(SYSLIB_FAILED_E);
ret = wc_AesSetKey(enc, key, keySz, iv, AES_ENCRYPTION);
WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(0);
@@ -12076,21 +12522,28 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes256_test(void)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
#endif
- wc_AesFree(enc);
-#ifdef HAVE_AES_DECRYPT
- wc_AesFree(dec);
-#endif
-
-#endif
+#endif /* DEBUG_VECTOR_REGISTER_ACCESS && WC_AES_C_DYNAMIC_FALLBACK */
out:
+
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
- if (enc)
+ if (enc) {
+ if (enc_inited)
+ wc_AesFree(enc);
XFREE(enc, HEAP_HINT, DYNAMIC_TYPE_AES);
+ }
#ifdef HAVE_AES_DECRYPT
- if (dec)
+ if (dec) {
+ if (dec_inited)
+ wc_AesFree(dec);
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_AES);
+ }
#endif
+#else /* !WOLFSSL_SMALL_STACK || WOLFSSL_NO_MALLOC */
+ if (enc_inited)
+ wc_AesFree(enc);
+ if (dec_inited)
+ wc_AesFree(dec);
#endif
#endif /* HAVE_AES_CBC */
@@ -12229,7 +12682,7 @@ static wc_test_ret_t aesgcm_default_test_helper(byte* key, int keySz, byte* iv,
wc_AesFree(dec);
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_AES);
}
-#else
+#else /* !WOLFSSL_SMALL_STACK || WOLFSSL_NO_MALLOC */
if (enc_inited)
wc_AesFree(enc);
if (dec_inited)
@@ -12322,6 +12775,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_default_test(void)
};
wc_test_ret_t ret;
+ WOLFSSL_ENTER("aesgcm_default_test");
+
ret = aesgcm_default_test_helper(key1, sizeof(key1), iv1, sizeof(iv1),
plain1, sizeof(plain1), cipher1, sizeof(cipher1),
aad1, sizeof(aad1), tag1, sizeof(tag1));
@@ -12525,6 +12980,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_test(void)
byte resultP[sizeof(p) + AES_BLOCK_SIZE];
byte resultC[sizeof(p) + AES_BLOCK_SIZE];
wc_test_ret_t ret = 0;
+
#ifdef WOLFSSL_AES_256
#if !(defined(WOLF_CRYPTO_CB) && defined(HAVE_INTEL_QA_SYNC))
int alen;
@@ -12554,7 +13010,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_test(void)
#else
byte large_input[BENCH_AESGCM_LARGE];
- byte large_output[BENCH_AESGCM_LARGE];
+ byte large_output[BENCH_AESGCM_LARGE + AES_BLOCK_SIZE];
byte large_outdec[BENCH_AESGCM_LARGE];
#endif
@@ -12562,6 +13018,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_test(void)
XMEMSET(large_output, 0, BENCH_AESGCM_LARGE + AES_BLOCK_SIZE);
XMEMSET(large_outdec, 0, BENCH_AESGCM_LARGE);
#endif
+ WOLFSSL_ENTER("aesgcm_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((enc = (Aes *)XMALLOC(sizeof *enc, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
@@ -13184,12 +13641,12 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesgcm_test(void)
#ifdef WOLFSSL_AES_128
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t gmac_test(void)
{
- wc_test_ret_t ret;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
Gmac *gmac;
#else
Gmac gmac[1];
#endif
+ wc_test_ret_t ret;
WOLFSSL_SMALL_STACK_STATIC const byte k1[] =
{
@@ -13240,6 +13697,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t gmac_test(void)
#endif
byte tag[16];
+ WOLFSSL_ENTER("gmac_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((gmac = (Gmac *)XMALLOC(sizeof *gmac, HEAP_HINT, DYNAMIC_TYPE_AES)) == NULL)
@@ -13687,6 +14145,8 @@ static wc_test_ret_t aesccm_128_test(void)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aesccm_test(void)
{
wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("aesccm_test");
+
#ifdef WOLFSSL_AES_128
if (ret == 0)
ret = aesccm_128_test();
@@ -13798,9 +14258,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_eax_test(void)
WOLFSSL_SMALL_STACK_STATIC byte ciphertext[sizeof(vectors[0].ct)];
WOLFSSL_SMALL_STACK_STATIC byte authtag[sizeof(vectors[0].tag)];
- wc_test_ret_t ret;
int i;
int len;
+ wc_test_ret_t ret;
+ WOLFSSL_ENTER("aes_eax_test");
+
for (i = 0; i < (int)(sizeof(vectors)/sizeof(vectors[0])); i++) {
@@ -14026,6 +14488,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aeskeywrap_test(void)
{k6, d6, v6, sizeof(k6), sizeof(d6), sizeof(v6)}
#endif
};
+
+ WOLFSSL_ENTER("aeskeywrap_test");
+
testSz = sizeof(test_wrap) / sizeof(keywrapVector);
XMEMSET(output, 0, sizeof(output));
@@ -14076,7 +14541,6 @@ void printOutput(const char *strName, unsigned char *data, unsigned int dataSz)
WOLFSSL_TEST_SUBROUTINE int ariagcm_test(MC_ALGID algo)
{
- int ret = 0;
byte data[] = TEST_STRING;
word32 dataSz = TEST_STRING_SZ;
@@ -14089,6 +14553,9 @@ WOLFSSL_TEST_SUBROUTINE int ariagcm_test(MC_ALGID algo)
word32 keySz, adSz = 256, authTagSz = sizeof(authTag);
wc_Aria aria;
+ int ret = 0;
+ WOLFSSL_ENTER("ariagcm_test");
+
XMEMSET((void *)&aria, 0, sizeof(aria));
ret = wc_AriaInitCrypt(&aria, algo);
if (ret != 0) { ERROR_OUT(WC_TEST_RET_ENC_EC(ret),out); }
@@ -14264,7 +14731,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t camellia_test(void)
byte out[CAMELLIA_BLOCK_SIZE];
Camellia cam;
- int i, testsSz, ret;
WOLFSSL_SMALL_STACK_STATIC const test_vector_t testVectors[] =
{
{CAM_ECB_ENC, pte, ive, c1, k1, sizeof(k1), -114},
@@ -14280,6 +14746,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t camellia_test(void)
{CAM_CBC_DEC, ptc, ivc, c5, k5, sizeof(k5), -124},
{CAM_CBC_DEC, ptc, ivc, c6, k6, sizeof(k6), -125}
};
+ int i, testsSz;
+ int ret;
+ WOLFSSL_ENTER("camellia_test");
testsSz = sizeof(testVectors)/sizeof(test_vector_t);
for (i = 0; i < testsSz; i++) {
@@ -14842,6 +15311,7 @@ static int sm4_ccm_test(void)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sm4_test(void)
{
wc_test_ret_t ret;
+ WOLFSSL_ENTER("sm4_test");
#ifdef WOLFSSL_SM4_ECB
ret = sm4_ecb_test();
@@ -14875,7 +15345,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sm4_test(void)
#ifdef HAVE_XCHACHA
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t XChaCha_test(void) {
- wc_test_ret_t ret;
WOLFSSL_SMALL_STACK_STATIC const byte Plaintext[] = {
0x54, 0x68, 0x65, 0x20, 0x64, 0x68, 0x6f, 0x6c, 0x65, 0x20, 0x28, 0x70, 0x72, 0x6f, 0x6e, 0x6f, /* The dhole (prono */
@@ -14930,17 +15399,21 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t XChaCha_test(void) {
0x93, 0xb9, 0x31, 0x11, 0xc1, 0xa5, 0x5d, 0xd7, 0x42, 0x1a, 0x10, 0x18, 0x49, 0x74, 0xc7, 0xc5
};
+ wc_test_ret_t ret;
+
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
struct ChaCha *chacha = (struct ChaCha *)XMALLOC(sizeof *chacha, HEAP_HINT, DYNAMIC_TYPE_CIPHER);
byte *buf1 = (byte *)XMALLOC(sizeof Plaintext, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
byte *buf2 = (byte *)XMALLOC(sizeof Plaintext, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+ WOLFSSL_ENTER("XChaCha_test");
if ((chacha == NULL) || (buf1 == NULL) || (buf2 == NULL))
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
#else
struct ChaCha chacha[1];
byte buf1[sizeof Plaintext];
byte buf2[sizeof Plaintext];
+ WOLFSSL_ENTER("XChaCha_test");
#endif
ret = wc_XChacha_SetKey(chacha, Key, sizeof Key, IV, sizeof IV, 0);
@@ -14982,7 +15455,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t XChaCha_test(void) {
#if defined(HAVE_XCHACHA) && defined(HAVE_POLY1305)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t XChaCha20Poly1305_test(void) {
- wc_test_ret_t ret;
WOLFSSL_SMALL_STACK_STATIC const byte Plaintext[] = {
0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x6c, /* Ladies and Gentl */
@@ -15019,15 +15491,20 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t XChaCha20Poly1305_test(void) {
0xc0, 0x87, 0x59, 0x24, 0xc1, 0xc7, 0x98, 0x79, 0x47, 0xde, 0xaf, 0xd8, 0x78, 0x0a, 0xcf, 0x49
};
+ wc_test_ret_t ret;
+
+
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
byte *buf1 = (byte *)XMALLOC(sizeof Ciphertext + sizeof Tag, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
byte *buf2 = (byte *)XMALLOC(sizeof Plaintext, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+ WOLFSSL_ENTER("XChaCha20Poly1305_test");
if ((buf1 == NULL) || (buf2 == NULL))
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
#else
byte buf1[sizeof Ciphertext + sizeof Tag];
byte buf2[sizeof Plaintext];
+ WOLFSSL_ENTER("XChaCha20Poly1305_test");
#endif
ret = wc_XChaCha20Poly1305_Encrypt(buf1, sizeof Ciphertext + sizeof Tag,
@@ -15163,14 +15640,30 @@ static wc_test_ret_t random_rng_test(void)
#if !defined(HAVE_FIPS) && !defined(HAVE_SELFTEST) && !defined(WOLFSSL_NO_MALLOC)
{
byte nonce[8] = { 0 };
- /* Test dynamic RNG. */
+
+ /* Test dynamic RNG */
rng = wc_rng_new(nonce, (word32)sizeof(nonce), HEAP_HINT);
if (rng == NULL)
return WC_TEST_RET_ENC_ERRNO;
ret = _rng_test(rng, WC_TEST_RET_ENC_NC);
+ wc_rng_free(rng);
+ rng = NULL;
+
+ if (ret != 0)
+ return ret;
+ /* Test dynamic RNG using extended API */
+ ret = wc_rng_new_ex(&rng, nonce, (word32)sizeof(nonce),
+ HEAP_HINT, devId);
+ if (ret != 0)
+ return WC_TEST_RET_ENC_EC(ret);
+
+ ret = _rng_test(rng, WC_TEST_RET_ENC_NC);
wc_rng_free(rng);
+
+ if (ret != 0)
+ return ret;
}
#endif
@@ -15298,6 +15791,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t random_test(void)
byte output[WC_SHA256_DIGEST_SIZE * 4];
wc_test_ret_t ret;
+ WOLFSSL_ENTER("random_test");
ret = wc_RNG_HealthTest(0, test1Entropy, sizeof(test1Entropy), NULL, 0,
output, sizeof(output));
@@ -15364,6 +15858,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t random_test(void)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t random_test(void)
{
+ WOLFSSL_ENTER("random_test");
+
/* Basic RNG generate block test */
return random_rng_test();
}
@@ -15413,7 +15909,7 @@ static int simple_mem_test(int sz)
static wc_test_ret_t const_byte_ptr_test(const byte* in, word32 *outJ)
{
wc_test_ret_t ret = 0;
- volatile word32 j = -1; /* must be volatile to properly detect error */
+ volatile word32 j = (word32)-1; /* must be volatile to properly detect error */
ret = (wc_test_ret_t)*in; /* accessed *in value. */
(void)ret;
@@ -15437,6 +15933,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memory_test(void)
{
wc_test_ret_t ret = 0;
word32 j = 0; /* used in embedded const pointer test */
+ WOLFSSL_ENTER("memory_test");
#if defined(COMPLEX_MEM_TEST) || defined(WOLFSSL_STATIC_MEMORY)
int i;
@@ -15859,16 +16356,16 @@ static void initDefaultName(void)
#if !defined(NO_ASN_TIME) && !defined(NO_RSA) && defined(WOLFSSL_TEST_CERT) && \
!defined(NO_FILESYSTEM)
-static byte minSerial[] = { 0x02, 0x01, 0x01 };
-static byte minName[] = { 0x30, 0x00 };
-static byte nameBad[] = {
+static const byte minSerial[] = { 0x02, 0x01, 0x01 };
+static const byte minName[] = { 0x30, 0x00 };
+static const byte nameBad[] = {
0x30, 0x08,
0x31, 0x06,
0x30, 0x04,
0x06, 0x02,
0x55, 0x04,
};
-static byte minDates[] = {
+static const byte minDates[] = {
0x30, 0x1e,
0x17, 0x0d,
0x31, 0x38, 0x30, 0x34, 0x31, 0x33, 0x31, 0x35,
@@ -15877,7 +16374,7 @@ static byte minDates[] = {
0x32, 0x31, 0x30, 0x31, 0x30, 0x37, 0x31, 0x35,
0x32, 0x33, 0x31, 0x30, 0x5a
};
-static byte minPubKey[] = {
+static const byte minPubKey[] = {
0x30, 0x1c,
0x30, 0x0d,
0x06, 0x09,
@@ -15891,14 +16388,14 @@ static byte minPubKey[] = {
0x02, 0x03,
0x01, 0x00, 0x01
};
-static byte minSigAlg[] = {
+static const byte minSigAlg[] = {
0x30, 0x0d,
0x06, 0x09,
0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
0x0b,
0x05, 0x00
};
-static byte minSig[] = {
+static const byte minSig[] = {
0x03, 0x01,
0x00
};
@@ -15910,7 +16407,7 @@ static int add_seq(byte* certData, int offset, byte* data, byte length)
certData[offset++] = length;
return offset + length;
}
-static int add_data(byte* certData, int offset, byte* data, byte length)
+static int add_data(byte* certData, int offset, const byte* data, byte length)
{
XMEMCPY(certData + offset, data, length);
return offset + length;
@@ -15980,6 +16477,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cert_test(void)
size_t bytes;
XFILE file;
wc_test_ret_t ret;
+ WOLFSSL_ENTER("cert_test");
+
tmp = (byte*)XMALLOC(FOURK_BUF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (tmp == NULL)
@@ -16082,6 +16581,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t certext_test(void)
/* created from rsa_test : cert.der */
byte kid_ca[] = "\x33\xD8\x45\x66\xD7\x68\x87\x18\x7E\x54"
"\x0D\x70\x27\x91\xC7\x26\xD7\x85\x65\xC0";
+ WOLFSSL_ENTER("certext_test");
tmp = (byte*)XMALLOC(FOURK_BUF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (tmp == NULL)
@@ -16252,6 +16752,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t decodedCertCache_test(void)
FILE* file;
byte* der;
word32 derSz;
+ WOLFSSL_ENTER("decodedCertCache_test");
derSz = FOURK_BUF;
der = (byte *)XMALLOC(FOURK_BUF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
@@ -16405,87 +16906,45 @@ static wc_test_ret_t rsa_flatten_test(RsaKey* key)
/* Parameter Validation testing. */
ret = wc_RsaFlattenPublicKey(NULL, e, &eSz, n, &nSz);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != BAD_FUNC_ARG)
-#endif
return WC_TEST_RET_ENC_EC(ret);
+
ret = wc_RsaFlattenPublicKey(key, NULL, &eSz, n, &nSz);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != BAD_FUNC_ARG)
-#endif
return WC_TEST_RET_ENC_EC(ret);
+
ret = wc_RsaFlattenPublicKey(key, e, NULL, n, &nSz);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != BAD_FUNC_ARG)
-#endif
return WC_TEST_RET_ENC_EC(ret);
+
ret = wc_RsaFlattenPublicKey(key, e, &eSz, NULL, &nSz);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != BAD_FUNC_ARG)
-#endif
return WC_TEST_RET_ENC_EC(ret);
+
ret = wc_RsaFlattenPublicKey(key, e, &eSz, n, NULL);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != BAD_FUNC_ARG)
-#endif
return WC_TEST_RET_ENC_EC(ret);
+
ret = wc_RsaFlattenPublicKey(key, e, &eSz, n, &nSz);
if (ret != 0)
return WC_TEST_RET_ENC_EC(ret);
+
eSz = 0;
ret = wc_RsaFlattenPublicKey(key, e, &eSz, n, &nSz);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != RSA_BUFFER_E)
-#endif
return WC_TEST_RET_ENC_EC(ret);
+
eSz = sizeof(e);
nSz = 0;
ret = wc_RsaFlattenPublicKey(key, e, &eSz, n, &nSz);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#else
if (ret != RSA_BUFFER_E)
-#endif
return WC_TEST_RET_ENC_EC(ret);
return 0;
}
#endif /* NO_ASN */
-#if !defined(HAVE_FIPS) && !defined(HAVE_USER_RSA) && !defined(NO_ASN) \
+#if !defined(HAVE_FIPS) && !defined(NO_ASN) \
&& !defined(WOLFSSL_RSA_VERIFY_ONLY)
static wc_test_ret_t rsa_export_key_test(RsaKey* key)
{
@@ -16560,7 +17019,7 @@ static wc_test_ret_t rsa_export_key_test(RsaKey* key)
return 0;
}
-#endif /* !HAVE_FIPS && !USER_RSA && !NO_ASN */
+#endif /* !HAVE_FIPS && !NO_ASN && !WOLFSSL_RSA_VERIFY_ONLY */
#ifndef NO_SIG_WRAPPER
static wc_test_ret_t rsa_sig_test(RsaKey* key, word32 keyLen, int modLen, WC_RNG* rng)
@@ -16622,12 +17081,7 @@ static wc_test_ret_t rsa_sig_test(RsaKey* key, word32 keyLen, int modLen, WC_RNG
return WC_TEST_RET_ENC_EC(ret);
ret = wc_SignatureGenerate(WC_HASH_TYPE_SHA256, WC_SIGNATURE_TYPE_RSA, in,
inLen, out, &sigSz, key, keyLen, NULL);
-#ifdef HAVE_USER_RSA
- /* Implementation using IPP Libraries returns:
- * -101 = USER_CRYPTO_ERROR
- */
- if (ret == 0)
-#elif defined(WOLFSSL_AFALG_XILINX_RSA) || defined(WOLFSSL_XILINX_CRYPT)
+#if defined(WOLFSSL_AFALG_XILINX_RSA) || defined(WOLFSSL_XILINX_CRYPT)
/* blinding / rng handled with hardware acceleration */
if (ret != 0)
#elif defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLF_CRYPTO_CB)
@@ -16845,7 +17299,7 @@ static wc_test_ret_t rsa_nb_test(RsaKey* key, const byte* in, word32 inLen, byte
}
#endif
-#if !defined(HAVE_USER_RSA) && !defined(NO_ASN)
+#if !defined(NO_ASN)
static wc_test_ret_t rsa_decode_test(RsaKey* keyPub)
{
wc_test_ret_t ret;
@@ -17188,6 +17642,10 @@ static wc_test_ret_t rsa_pss_test(WC_RNG* rng, RsaKey* key)
WC_DECLARE_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
WC_DECLARE_VAR(sig, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(in, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(sig, byte, RSA_TEST_BYTES, HEAP_HINT);
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
if (in == NULL || out == NULL || sig == NULL)
ERROR_OUT(MEMORY_E, exit_rsa_pss);
@@ -17508,6 +17966,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_no_pad_test(void)
WC_DECLARE_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
WC_DECLARE_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(key, RsaKey, 1, HEAP_HINT);
+ WC_ALLOC_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WOLFSSL_ENTER("rsa_no_pad_test");
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
if (key == NULL || out == NULL || plain == NULL)
ERROR_OUT(MEMORY_E, exit_rsa_nopadding);
@@ -17738,6 +18201,12 @@ static wc_test_ret_t rsa_even_mod_test(WC_RNG* rng, RsaKey* key)
#ifndef WOLFSSL_RSA_PUBLIC_ONLY
WC_DECLARE_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
#endif
+
+ WC_ALLOC_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
+#ifndef WOLFSSL_RSA_PUBLIC_ONLY
+ WC_ALLOC_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+#endif
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
if (out == NULL
#ifndef WOLFSSL_RSA_PUBLIC_ONLY
@@ -18024,8 +18493,7 @@ static wc_test_ret_t rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng,
if (ret < 0) {
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit_rsa);
}
-
-#ifdef WOLFSSL_ALT_NAMES
+#if defined(WOLFSSL_ALT_NAMES) || defined(HAVE_PKCS7)
/* Get CA Cert for testing */
#ifdef USE_CERT_BUFFERS_1024
XMEMCPY(tmp, ca_cert_der_1024, sizeof_ca_cert_der_1024);
@@ -18044,6 +18512,7 @@ static wc_test_ret_t rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng,
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, exit_rsa);
#endif /* USE_CERT_BUFFERS */
+ #if defined(WOLFSSL_ALT_NAMES)
#if !defined(NO_FILESYSTEM) && !defined(USE_CERT_BUFFERS_1024) && \
!defined(USE_CERT_BUFFERS_2048) && !defined(NO_ASN)
ret = wc_SetAltNames(myCert, rsaCaCertFile);
@@ -18065,7 +18534,8 @@ static wc_test_ret_t rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng,
if (ret < 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit_rsa);
#endif
-#endif /* WOLFSSL_ALT_NAMES */
+ #endif /* WOLFSSL_ALT_NAMES */
+#endif /* WOLFSSL_ALT_NAMES || HAVE_PKCS7 */
/* Get CA Key */
#ifdef USE_CERT_BUFFERS_1024
@@ -18537,8 +19007,7 @@ exit_rsa:
#ifndef WOLFSSL_RSA_VERIFY_ONLY
#if !defined(WC_NO_RSA_OAEP) && !defined(WC_NO_RNG) && \
- !defined(HAVE_FAST_RSA) && !defined(HAVE_USER_RSA) && \
- (!defined(HAVE_FIPS) || \
+ (!defined(HAVE_FIPS) || \
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2))) \
&& !defined(WOLF_CRYPTO_CB_ONLY_RSA)
static wc_test_ret_t rsa_oaep_padding_test(RsaKey* key, WC_RNG* rng)
@@ -18555,6 +19024,10 @@ static wc_test_ret_t rsa_oaep_padding_test(RsaKey* key, WC_RNG* rng)
WC_DECLARE_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
WC_DECLARE_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(in, byte, TEST_STRING_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
if (in == NULL || out == NULL || plain == NULL)
ERROR_OUT(MEMORY_E, exit_rsa);
@@ -18915,6 +19388,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)
WC_DECLARE_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
WC_DECLARE_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(in, byte, TEST_STRING_SZ, HEAP_HINT);
+ WC_ALLOC_VAR(out, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(plain, byte, RSA_TEST_BYTES, HEAP_HINT);
+ WOLFSSL_ENTER("rsa_test");
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
if (in == NULL || out == NULL || plain == NULL)
ERROR_OUT(MEMORY_E, exit_rsa);
@@ -18942,7 +19420,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)
XMEMSET(keypub, 0, sizeof *keypub);
#endif
-#if !defined(HAVE_USER_RSA) && !defined(NO_ASN)
+#if !defined(NO_ASN)
ret = rsa_decode_test(key);
if (ret != 0)
ERROR_OUT(ret, exit_rsa);
@@ -19120,7 +19598,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)
#elif defined(WOLFSSL_PUBLIC_MP)
{
- static byte signature_2048[] = {
+ static const byte signature_2048[] = {
0x07, 0x6f, 0xc9, 0x85, 0x73, 0x9e, 0x21, 0x79,
0x47, 0xf1, 0xa3, 0xd7, 0xf4, 0x27, 0x29, 0xbe,
0x99, 0x5d, 0xac, 0xb2, 0x10, 0x3f, 0x95, 0xda,
@@ -19206,19 +19684,18 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rsa_test(void)
#ifndef WOLFSSL_RSA_VERIFY_ONLY
#if !defined(WC_NO_RSA_OAEP) && !defined(WC_NO_RNG)
- #if !defined(HAVE_FAST_RSA) && !defined(HAVE_USER_RSA) && \
- (!defined(HAVE_FIPS) || \
+ #if (!defined(HAVE_FIPS) || \
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2))) \
&& !defined(WOLF_CRYPTO_CB_ONLY_RSA)
ret = rsa_oaep_padding_test(key, &rng);
if (ret != 0)
return ret;
- #endif /* !HAVE_FAST_RSA && !HAVE_FIPS */
+ #endif /* !HAVE_FIPS */
#endif /* WC_NO_RSA_OAEP && !WC_NO_RNG */
#endif /* WOLFSSL_RSA_VERIFY_ONLY */
-#if !defined(HAVE_FIPS) && !defined(HAVE_USER_RSA) && !defined(NO_ASN) \
+#if !defined(HAVE_FIPS) && !defined(NO_ASN) \
&& !defined(WOLFSSL_RSA_VERIFY_ONLY)
ret = rsa_export_key_test(key);
if (ret != 0)
@@ -20075,7 +20552,8 @@ static wc_test_ret_t dh_ffdhe_test(WC_RNG *rng, int name)
ERROR_OUT(WC_TEST_RET_ENC_NC, done);
}
-#if defined(WOLFSSL_HAVE_SP_DH) || defined(USE_FAST_MATH)
+#if (defined(WOLFSSL_HAVE_SP_DH) || defined(USE_FAST_MATH)) && \
+ !defined(HAVE_INTEL_QA)
/* Make p even */
key->p.dp[0] &= (mp_digit)-2;
if (ret != 0)
@@ -20107,7 +20585,7 @@ static wc_test_ret_t dh_ffdhe_test(WC_RNG *rng, int name)
/* Getting here means success - set ret to 0. */
ret = 0;
-#endif
+#endif /* (SP DH or Fast Math) and not Intel QuickAssist */
done:
@@ -20198,6 +20676,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t dh_test(void)
#endif
#endif /* !WC_NO_RNG */
+ WOLFSSL_ENTER("dh_test");
+
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if (key == NULL || key2 == NULL || tmp == NULL) {
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, done);
@@ -20606,6 +21086,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t dsa_test(void)
DsaKey *derIn = (DsaKey *)XMALLOC(sizeof *derIn, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
DsaKey *genKey = (DsaKey *)XMALLOC(sizeof *genKey, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
#endif
+ WOLFSSL_ENTER("dsa_test");
+
if ((tmp == NULL) ||
(key == NULL)
@@ -20946,6 +21428,7 @@ static wc_test_ret_t srp_test_digest(SrpType dgstType)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t srp_test(void)
{
wc_test_ret_t ret;
+ WOLFSSL_ENTER("srp_test");
#ifndef NO_SHA
ret = srp_test_digest(SRP_TYPE_SHA);
@@ -21946,6 +22429,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_test(void)
EVP_MD_CTX md_ctx;
testVector a, b, c, d, e, f;
byte hash[WC_SHA256_DIGEST_SIZE*2]; /* max size */
+ WOLFSSL_ENTER("openssl_test");
a.inLen = 0;
b.inLen = c.inLen = d.inLen = e.inLen = f.inLen = a.inLen;
@@ -23133,6 +23617,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openSSL_evpMD_test(void)
#if !defined(NO_SHA256) && !defined(NO_SHA)
WOLFSSL_EVP_MD_CTX* ctx;
WOLFSSL_EVP_MD_CTX* ctx2;
+ WOLFSSL_ENTER("openSSL_evpMD_test");
ctx = EVP_MD_CTX_create();
ctx2 = EVP_MD_CTX_create();
@@ -23224,7 +23709,7 @@ static void show(const char *title, const char *p, unsigned int s) {
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_pkey0_test(void)
{
wc_test_ret_t ret = 0;
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA) && !defined(NO_SHA)
+#if !defined(NO_RSA) && !defined(NO_SHA)
byte* prvTmp;
byte* pubTmp;
int prvBytes;
@@ -23246,9 +23731,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_pkey0_test(void)
XFILE keypubFile;
char cliKey[] = "./certs/client-key.der";
char cliKeypub[] = "./certs/client-keyPub.der";
-
#endif
+ WOLFSSL_ENTER("openssl_pkey0_test");
+
prvTmp = (byte*)XMALLOC(FOURK_BUFF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (prvTmp == NULL)
return WC_TEST_RET_ENC_ERRNO;
@@ -23452,8 +23938,7 @@ openssl_pkey0_test_done:
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_pkey1_test(void)
{
wc_test_ret_t ret = 0;
-#if !defined(NO_FILESYSTEM) && !defined(NO_RSA) && !defined(HAVE_USER_RSA) && \
- !defined(NO_SHA)
+#if !defined(NO_FILESYSTEM) && !defined(NO_RSA) && !defined(NO_SHA)
EVP_PKEY_CTX* dec = NULL;
EVP_PKEY_CTX* enc = NULL;
EVP_PKEY* pubKey = NULL;
@@ -23482,6 +23967,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_pkey1_test(void)
unsigned char plain[RSA_TEST_BYTES];
#endif
+ WOLFSSL_ENTER("openssl_pkey1_test");
+
#if defined(USE_CERT_BUFFERS_1024)
XMEMCPY(tmp, client_key_der_1024, sizeof_client_key_der_1024);
cliKeySz = (long)sizeof_client_key_der_1024;
@@ -23648,7 +24135,7 @@ openssl_pkey1_test_done:
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_evpSig_test(void)
{
-#if !defined(NO_RSA) && !defined(NO_SHA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA) && !defined(NO_SHA)
byte* prvTmp;
byte* pubTmp;
int prvBytes;
@@ -23667,12 +24154,13 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t openssl_evpSig_test(void)
unsigned int count;
wc_test_ret_t ret, ret1, ret2;
- #if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
+#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
XFILE keyFile;
XFILE keypubFile;
char cliKey[] = "./certs/client-key.der";
char cliKeypub[] = "./certs/client-keyPub.der";
- #endif
+#endif
+ WOLFSSL_ENTER("openssl_evpSig_test");
prvTmp = (byte*)XMALLOC(FOURK_BUFF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (prvTmp == NULL)
@@ -23903,6 +24391,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t scrypt_test(void)
0xcb, 0xf4, 0x5c, 0x6f, 0xa7, 0x7a, 0x41, 0xa4
};
#endif
+ WOLFSSL_ENTER("scrypt_test");
ret = wc_scrypt(derived, NULL, 0, NULL, 0, 4, 1, 1, sizeof(verify1));
if (ret != 0)
@@ -23942,6 +24431,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t scrypt_test(void)
if (XMEMCMP(derived, verify4, sizeof(verify4)) != 0)
return WC_TEST_RET_ENC_NC;
#endif
+#else
+#ifdef SCRYPT_TEST_ALL
+ (void)verify4;
+#endif
#endif /* !BENCH_EMBEDDED && !defined(WOLFSSL_LINUXKM) && !HAVE_INTEL_QA */
#if !defined(BENCH_EMBEDDED)
@@ -23986,9 +24479,11 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs12_test(void)
int id = 1;
int kLen = 24;
int iterations = 1;
- wc_test_ret_t ret = wc_PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8,
- iterations, kLen, WC_SHA256, id);
+ wc_test_ret_t ret;
+ WOLFSSL_ENTER("pkcs12_test");
+ ret = wc_PKCS12_PBKDF(derived, passwd, sizeof(passwd), salt, 8,
+ iterations, kLen, WC_SHA256, id);
if (ret < 0)
return WC_TEST_RET_ENC_EC(ret);
@@ -24027,8 +24522,12 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pbkdf2_test(void)
0x2d, 0xd4, 0xf9, 0x37, 0xd4, 0x95, 0x16, 0xa7, 0x2a, 0x9a, 0x21, 0xd1
};
- wc_test_ret_t ret = wc_PBKDF2_ex(derived, (byte*)passwd, (int)XSTRLEN(passwd), salt,
- (int)sizeof(salt), iterations, kLen, WC_SHA256, HEAP_HINT, devId);
+ wc_test_ret_t ret;
+ WOLFSSL_ENTER("pbkdf2_test");
+
+ ret = wc_PBKDF2_ex(derived, (byte*)passwd, (int)XSTRLEN(passwd),
+ salt, (int)sizeof(salt), iterations,
+ kLen, WC_SHA256, HEAP_HINT, devId);
if (ret != 0)
return ret;
@@ -24054,9 +24553,12 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pbkdf1_test(void)
0xAF, 0x10, 0xEB, 0xFB, 0x4A, 0x3D, 0x2A, 0x20
};
- wc_test_ret_t ret = wc_PBKDF1_ex(derived, kLen, NULL, 0, (byte*)passwd,
- (int)XSTRLEN(passwd), salt, (int)sizeof(salt), iterations, WC_SHA,
- HEAP_HINT);
+ wc_test_ret_t ret;
+ WOLFSSL_ENTER("pbkdf1_test");
+
+ ret = wc_PBKDF1_ex(derived, kLen, NULL, 0, (byte*)passwd,
+ (int)XSTRLEN(passwd), salt, (int)sizeof(salt), iterations, WC_SHA,
+ HEAP_HINT);
if (ret != 0)
return ret;
@@ -24069,29 +24571,30 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pbkdf1_test(void)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pwdbased_test(void)
{
- wc_test_ret_t ret = 0;
+ wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("pwdbased_test");
#if defined(HAVE_PBKDF1) && !defined(NO_SHA)
- ret = pbkdf1_test();
- if (ret != 0)
- return ret;
+ ret = pbkdf1_test();
+ if (ret != 0)
+ return ret;
#endif
#if defined(HAVE_PBKDF2) && !defined(NO_SHA256) && !defined(NO_HMAC)
- ret = pbkdf2_test();
- if (ret != 0)
- return ret;
+ ret = pbkdf2_test();
+ if (ret != 0)
+ return ret;
#endif
#ifdef HAVE_PKCS12
- ret = pkcs12_test();
- if (ret != 0)
- return ret;
+ ret = pkcs12_test();
+ if (ret != 0)
+ return ret;
#endif
#ifdef HAVE_SCRYPT
- ret = scrypt_test();
- if (ret != 0)
- return ret;
+ ret = scrypt_test();
+ if (ret != 0)
+ return ret;
#endif
- return ret;
+ return ret;
}
#endif /* NO_PWDBASED */
@@ -24153,6 +24656,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hkdf_test(void)
0x58, 0x65 };
#endif
#endif /* !NO_SHA256 */
+ WOLFSSL_ENTER("hkdf_test");
XMEMSET(okm1, 0, sizeof(okm1));
L = (int)sizeof(okm1);
@@ -24335,13 +24839,14 @@ static const SshKdfTestVector sshKdfTestVectors[] = {
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sshkdf_test(void)
{
- wc_test_ret_t result = 0;
+ byte cKey[32]; /* Greater of SHA256_DIGEST_SIZE and AES_BLOCK_SIZE */
word32 i;
word32 tc = sizeof(sshKdfTestVectors)/sizeof(SshKdfTestVector);
const SshKdfTestVector* tv = NULL;
- byte cKey[32]; /* Greater of SHA256_DIGEST_SIZE and AES_BLOCK_SIZE */
- /* sId - Session ID, eKey - Expected Key, cKey - Calculated Key */
+ wc_test_ret_t result = 0;
+ WOLFSSL_ENTER("sshkdf_test");
+ /* sId - Session ID, eKey - Expected Key, cKey - Calculated Key */
for (i = 0, tv = sshKdfTestVectors; i < tc; i++, tv++) {
result = wc_SSH_KDF(tv->hashId, tv->keyId,
cKey, tv->expectedKeySz,
@@ -24926,6 +25431,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t tls13_kdf_test(void)
word32 i;
word32 tc = sizeof(tls13KdfTestVectors)/sizeof(Tls13KdfTestVector);
const Tls13KdfTestVector* tv = NULL;
+ WOLFSSL_ENTER("tls13_kdf_test");
for (i = 0, tv = tls13KdfTestVectors; i < tc; i++, tv++) {
byte output[WC_MAX_DIGEST_SIZE];
@@ -25163,6 +25669,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t x963kdf_test(void)
};
#endif
+ WOLFSSL_ENTER("x963kdf_test");
+
#ifndef NO_SHA
ret = wc_X963_KDF(WC_HASH_TYPE_SHA, Z, sizeof(Z), NULL, 0,
kek, sizeof(verify));
@@ -25312,6 +25820,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t hpke_test(void)
{
wc_test_ret_t ret = 0;
Hpke hpke[1];
+ WOLFSSL_ENTER("hpke_test");
#if defined(HAVE_ECC)
#if defined(WOLFSSL_SHA224) || !defined(NO_SHA256)
@@ -25594,6 +26103,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t srtpkdf_test(void)
unsigned char keyE[32];
unsigned char keyA[20];
unsigned char keyS[14];
+ WOLFSSL_ENTER("srtpkdf_test");
for (i = 0; (ret == 0) && (i < SRTP_TV_CNT); i++) {
#ifndef WOLFSSL_AES_128
@@ -25895,6 +26405,13 @@ static wc_test_ret_t ecc_test_vector_item(const eccVector* vector)
WC_DECLARE_VAR(s, byte, MAX_ECC_BYTES, HEAP_HINT);
#endif
+ WC_ALLOC_VAR(sig, byte, ECC_SIG_SIZE, HEAP_HINT);
+#if !defined(NO_ASN) && !defined(HAVE_SELFTEST)
+ WC_ALLOC_VAR(sigRaw, byte, ECC_SIG_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(r, byte, MAX_ECC_BYTES, HEAP_HINT);
+ WC_ALLOC_VAR(s, byte, MAX_ECC_BYTES, HEAP_HINT);
+#endif
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
if (sig == NULL)
ERROR_OUT(MEMORY_E, done);
@@ -27283,6 +27800,21 @@ static wc_test_ret_t ecc_test_curve_size(WC_RNG* rng, int keySize, int testVerif
int curveSize;
#endif
+#if defined(HAVE_ECC_DHE) && !defined(WC_NO_RNG) && \
+ !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A)
+ WC_ALLOC_VAR(sharedA, byte, ECC_SHARED_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(sharedB, byte, ECC_SHARED_SIZE, HEAP_HINT);
+#endif
+#ifdef HAVE_ECC_KEY_EXPORT
+ WC_ALLOC_VAR(exportBuf, byte, ECC_KEY_EXPORT_BUF_SIZE, HEAP_HINT);
+#endif
+#if !defined(ECC_TIMING_RESISTANT) || (defined(ECC_TIMING_RESISTANT) && \
+ !defined(WC_NO_RNG) && !defined(WOLFSSL_KCAPI_ECC)) && \
+ defined(HAVE_ECC_SIGN)
+ WC_ALLOC_VAR(sig, byte, ECC_SIG_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(digest, byte, ECC_DIGEST_SIZE, HEAP_HINT);
+#endif
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
#if (defined(HAVE_ECC_DHE) || defined(HAVE_ECC_CDH)) && !defined(WC_NO_RNG) && \
!defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A)
@@ -27690,6 +28222,7 @@ done:
static wc_test_ret_t ecc_test_curve(WC_RNG* rng, int keySize, int curve_id)
{
wc_test_ret_t ret;
+ WOLFSSL_MSG_EX("ecc_test_curve keySize = %d", keySize);
ret = ecc_test_curve_size(rng, keySize, ECC_TEST_VERIFY_COUNT, curve_id,
NULL);
@@ -28241,7 +28774,9 @@ done:
#endif
#if defined(HAVE_ECC_DHE) && !defined(WC_NO_RNG) && \
- !defined(WOLF_CRYPTO_CB_ONLY_ECC)
+ !defined(WOLF_CRYPTO_CB_ONLY_ECC) && !defined(WOLFSSL_ATECC508A) && \
+ !defined(WOLFSSL_ATECC608A) && !defined(PLUTON_CRYPTO_ECC) && \
+ !defined(WOLFSSL_CRYPTOCELL)
static wc_test_ret_t ecc_ssh_test(ecc_key* key, WC_RNG* rng)
{
wc_test_ret_t ret;
@@ -28933,6 +29468,18 @@ static int ecc_sm2_test_curve(WC_RNG* rng, int testVerifyCount)
int curveSize;
#endif
+#if (defined(HAVE_ECC_DHE) || defined(HAVE_ECC_CDH)) && !defined(WC_NO_RNG)
+ WC_ALLOC_VAR(sharedA, byte, ECC_SHARED_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(sharedB, byte, ECC_SHARED_SIZE, HEAP_HINT);
+#endif
+#ifdef HAVE_ECC_KEY_EXPORT
+ WC_ALLOC_VAR(exportBuf, byte, ECC_KEY_EXPORT_BUF_SIZE, HEAP_HINT);
+#endif
+#ifdef HAVE_ECC_SIGN
+ WC_ALLOC_VAR(sig, byte, ECC_SIG_SIZE, HEAP_HINT);
+ WC_ALLOC_VAR(digest, byte, ECC_DIGEST_SIZE, HEAP_HINT);
+#endif
+
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
#if (defined(HAVE_ECC_DHE) || defined(HAVE_ECC_CDH)) && !defined(WC_NO_RNG)
if (sharedA == NULL || sharedB == NULL)
@@ -30074,6 +30621,12 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ecc_test(void)
{
wc_test_ret_t ret;
WC_RNG rng;
+ WOLFSSL_ENTER("ecc_test");
+#if defined(ECC_MIN_KEY_SZ)
+ WOLFSSL_MSG_EX("ecc_test ECC_MIN_KEY_SZ = %d\n", ECC_MIN_KEY_SZ);
+#else
+ WOLFSSL_MSG("ecc_test ECC_MIN_KEY_SZ not defined.");
+#endif
#if defined(WOLFSSL_CERT_EXT) && \
(!defined(NO_ECC256) || defined(HAVE_ALL_CURVES)) && ECC_MIN_KEY_SZ <= 256
@@ -30117,8 +30670,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ecc_test(void)
#endif /* HAVE_ECC160 */
#if (defined(HAVE_ECC192) || defined(HAVE_ALL_CURVES)) && ECC_MIN_KEY_SZ <= 192
ret = ecc_test_curve(&rng, 24, ECC_CURVE_DEF);
- printf("keySize=24, Default\n");
if (ret < 0) {
+ printf("keySize=24, Default\n");
goto done;
}
#endif /* HAVE_ECC192 */
@@ -30958,6 +31511,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ecc_encrypt_test(void)
ecc_key userA[1];
ecc_key userB[1];
#endif
+ WOLFSSL_ENTER("ecc_encrypt_test");
#ifndef HAVE_FIPS
ret = wc_InitRng_ex(&rng, HEAP_HINT, devId);
@@ -31130,6 +31684,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ecc_test_buffers(void)
byte plain[256];
int verify = 0;
word32 x;
+ WOLFSSL_ENTER("ecc_test_buffers");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((cliKey == NULL) || (servKey == NULL) || (tmpKey == NULL))
@@ -31696,6 +32251,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve25519_test(void)
#endif /* HAVE_CURVE25519_SHARED_SECRET */
(void)x;
+ WOLFSSL_ENTER("curve25519_test");
#ifndef HAVE_FIPS
ret = wc_InitRng_ex(&rng, HEAP_HINT, devId);
@@ -32611,7 +33167,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed25519_test(void)
sizeof(msg4)
};
#ifndef NO_ASN
- static byte privateEd25519[] = {
+ static const byte privateEd25519[] = {
0x30,0x2e,0x02,0x01,0x00,0x30,0x05,0x06,
0x03,0x2b,0x65,0x70,0x04,0x22,0x04,0x20,
0x9d,0x61,0xb1,0x9d,0xef,0xfd,0x5a,0x60,
@@ -32619,7 +33175,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed25519_test(void)
0x44,0x49,0xc5,0x69,0x7b,0x32,0x69,0x19,
0x70,0x3b,0xac,0x03,0x1c,0xae,0x7f,0x60
};
- static byte badPrivateEd25519[] = {
+ static const byte badPrivateEd25519[] = {
0x30,0x52,0x02,0x01,0x00,0x30,0x05,0x06,
0x03,0x2b,0x65,0x70,0x04,0x22,0x04,0x20,
0x9d,0x61,0xb1,0x9d,0xef,0xfd,0x5a,0x60,
@@ -32633,7 +33189,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed25519_test(void)
0xf7,0x07,0x51,0x1a,
0x00 /* add additional bytes to make the pubkey bigger */
};
- static byte publicEd25519[] = {
+ static const byte publicEd25519[] = {
0x30,0x2a,0x30,0x05,0x06,0x03,0x2b,0x65,
0x70,0x03,0x21,0x00,0xd7,0x5a,0x98,0x01,
0x82,0xb1,0x0a,0xb7,0xd5,0x4b,0xfe,0xd3,
@@ -32643,7 +33199,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed25519_test(void)
};
/* size has been altered to catch if sanity check is done */
- static byte badPublicEd25519[] = {
+ static const byte badPublicEd25519[] = {
0x30,0x2a,0x30,0x05,0x06,0x03,0x2b,0x65,
0x70,0x03,0x21,0x00,0xd7,0x5a,0x98,0x01,
0x82,0xb1,0x0a,0xb7,0xd5,0x4b,0xfe,0xd3,
@@ -32652,7 +33208,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed25519_test(void)
0xf7,0x07,0x51,0x1a,
0x00 /* add an additional byte to make the pubkey appear bigger */
};
- static byte privPubEd25519[] = {
+ static const byte privPubEd25519[] = {
0x30,0x50,0x02,0x01,0x00,0x30,0x05,0x06,
0x03,0x2b,0x65,0x70,0x04,0x22,0x04,0x20,
0x9d,0x61,0xb1,0x9d,0xef,0xfd,0x5a,0x60,
@@ -32672,6 +33228,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed25519_test(void)
#if !defined(NO_ASN) && defined(HAVE_ED25519_SIGN)
ed25519_key key3;
#endif
+ WOLFSSL_ENTER("ed25519_test");
/* create ed25519 keys */
#ifndef HAVE_FIPS
@@ -33005,7 +33562,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve448_test(void)
#ifdef HAVE_CURVE448_KEY_EXPORT
byte exportBuf[CURVE448_KEY_SIZE];
#endif
- word32 x;
+ word32 x = 0;
curve448_key userA, userB, pubKey;
#if defined(HAVE_CURVE448_SHARED_SECRET) && \
@@ -33071,6 +33628,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t curve448_test(void)
#endif /* HAVE_CURVE448_SHARED_SECRET */
(void)x;
+ WOLFSSL_ENTER("curve448_test");
#ifndef HAVE_FIPS
ret = wc_InitRng_ex(&rng, HEAP_HINT, devId);
@@ -34129,6 +34687,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t ed448_test(void)
ed448_key key3[1];
#endif
#endif
+ WOLFSSL_ENTER("ed448_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
key = (ed448_key *)XMALLOC(sizeof(*key), HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
@@ -36452,6 +37011,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t kyber_test(void)
KYBER1024_CIPHER_TEXT_SIZE },
#endif
};
+ WOLFSSL_ENTER("kyber_test");
#ifndef HAVE_FIPS
ret = wc_InitRng_ex(&rng, HEAP_HINT, INVALID_DEVID);
@@ -36570,8 +37130,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test(void)
{
int i = 0;
int j = 0;
- int ret = -1;
- int ret2 = -1;
XmssKey signingKey;
XmssKey verifyKey;
WC_RNG rng;
@@ -36583,8 +37141,19 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test(void)
unsigned char * old_sk = NULL;
const char * msg = "XMSS post quantum signature test";
word32 msgSz = (word32) XSTRLEN(msg);
+#if WOLFSSL_XMSS_MIN_HEIGHT <= 10
+ const char * param = "XMSS-SHA2_10_256";
+#elif WOLFSSL_XMSS_MIN_HEIGHT <= 20
const char * param = "XMSSMT-SHA2_20/4_256";
+#elif WOLFSSL_XMSS_MIN_HEIGHT <= 40
+ const char * param = "XMSSMT-SHA2_40/8_256";
+#else
+ const char * param = "XMSSMT-SHA2_60/12_256";
+#endif
byte * sig = NULL;
+ int ret2 = -1;
+ int ret = -1;
+ WOLFSSL_ENTER("xmss_test");
#ifndef HAVE_FIPS
ret = wc_InitRng_ex(&rng, HEAP_HINT, INVALID_DEVID);
@@ -36683,7 +37252,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test(void)
ret2 = wc_XmssKey_Verify(&verifyKey, sig, sigSz, (byte *) msg,
msgSz);
- if (ret2 != -1) {
+ if ((ret2 != -1) && (ret2 != SIG_VERIFY_E)) {
/* Verify passed when it should have failed. */
return WC_TEST_RET_ENC_I(j);
}
@@ -36716,8 +37285,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test(void)
}
#endif /*if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_XMSS_VERIFY_ONLY)*/
-#if defined(WOLFSSL_HAVE_XMSS) && defined(WOLFSSL_XMSS_VERIFY_ONLY) && \
- !defined(WOLFSSL_SMALL_STACK)
+#if defined(WOLFSSL_HAVE_XMSS) && !defined(WOLFSSL_SMALL_STACK) && \
+ WOLFSSL_XMSS_MIN_HEIGHT <= 10
/* A simple xmss verify only test using:
* XMSS-SHA2_10_256
@@ -36730,7 +37299,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test(void)
* https://github.com/XMSS/xmss-reference
* */
-static byte xmss_pub[XMSS_SHA256_PUBLEN] =
+static const byte xmss_pub[XMSS_SHA256_PUBLEN] =
{
0x00,0x00,0x00,0x01,0xA5,0x41,0x31,0x96,
0x0A,0xF9,0xF3,0xB2,0x4B,0x2E,0x5B,0x3E,
@@ -36743,7 +37312,7 @@ static byte xmss_pub[XMSS_SHA256_PUBLEN] =
0xC9,0xB7,0x39,0x4E
};
-static byte xmss_msg[32] =
+static /* not const */ byte xmss_msg[32] =
{
0x07,0x9F,0x80,0x86,0xDB,0x76,0x27,0xDF,
0xED,0x5B,0x2A,0x81,0x60,0x60,0x7D,0xB4,
@@ -36753,7 +37322,7 @@ static byte xmss_msg[32] =
/* This was actually the 5th signature produced from
* xmss_fast test in xmss-reference. */
-static byte xmss_sig[2500] =
+static /* not const */ byte xmss_sig[2500] =
{
0x00,0x00,0x00,0x05,0xF0,0x15,0x34,0xBA,
0x92,0x03,0x6A,0xB9,0xA5,0x23,0x86,0x11,
@@ -37072,13 +37641,14 @@ static byte xmss_sig[2500] =
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void)
{
- int ret = -1;
- int ret2 = -1;
- int j = 0;
XmssKey verifyKey;
- word32 pkSz = 0;
+ word32 pkSz = 0;
word32 sigSz = 0;
const char * param = "XMSS-SHA2_10_256";
+ int j = 0;
+ int ret2 = -1;
+ int ret = -1;
+ WOLFSSL_ENTER("xmss_test_verify_only");
ret = wc_XmssKey_Init(&verifyKey, NULL, INVALID_DEVID);
if (ret != 0) { return WC_TEST_RET_ENC_EC(ret); }
@@ -37120,7 +37690,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void)
xmss_msg[sizeof(xmss_msg) / 2] ^= 1;
ret2 = wc_XmssKey_Verify(&verifyKey, xmss_sig, sizeof(xmss_sig),
(byte *) xmss_msg, sizeof(xmss_msg));
- if (ret2 != -1) {
+ if ((ret2 != -1) && (ret2 != SIG_VERIFY_E)) {
printf("error: wc_XmssKey_Verify returned %d, expected -1\n", ret2);
return WC_TEST_RET_ENC_EC(ret);
}
@@ -37141,7 +37711,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void)
ret2 = wc_XmssKey_Verify(&verifyKey, xmss_sig, sizeof(xmss_sig),
(byte *) xmss_msg, sizeof(xmss_msg));
- if (ret2 != -1) {
+ if ((ret2 != -1) && (ret2 != SIG_VERIFY_E)) {
/* Verify passed when it should have failed. */
return WC_TEST_RET_ENC_I(j);
}
@@ -37155,8 +37725,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t xmss_test_verify_only(void)
return ret;
}
-#endif /* if defined(WOLFSSL_HAVE_XMSS) && defined(WOLFSSL_XMSS_VERIFY_ONLY) &&
- * !defined(WOLFSSL_SMALL_STACK) */
+#endif /* WOLFSSL_HAVE_XMSS && !WOLFSSL_SMALL_STACK &&
+ * WOLFSSL_XMSS_MIN_HEIGHT <= 10 */
#if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_VERIFY_ONLY)
@@ -37205,6 +37775,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test(void)
#else
byte sig[WC_TEST_LMS_SIG_LEN];
#endif
+ WOLFSSL_ENTER("lms_test");
XMEMSET(priv, 0, sizeof(priv));
XMEMSET(old_priv, 0, sizeof(old_priv));
@@ -37256,7 +37827,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test(void)
if (ret != 0) { return WC_TEST_RET_ENC_EC(ret); }
if (sigSz != WC_TEST_LMS_SIG_LEN) {
- printf("error: got %d, expected %d\n", sigSz, WC_TEST_LMS_SIG_LEN);
+ printf("error: got %u, expected %d\n", sigSz, WC_TEST_LMS_SIG_LEN);
return WC_TEST_RET_ENC_EC(sigSz);
}
@@ -37290,7 +37861,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test(void)
ret2 = wc_LmsKey_Verify(&verifyKey, sig, sigSz, (byte *) msg,
msgSz);
- if (ret2 != -1) {
+ if ((ret2 != -1) && (ret2 != SIG_VERIFY_E)) {
/* Verify passed when it should have failed. */
return WC_TEST_RET_ENC_I(j);
}
@@ -37311,13 +37882,17 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test(void)
wc_FreeRng(&rng);
+#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
+ XFREE(sig, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+#endif
+
return ret;
}
#endif /* if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_VERIFY_ONLY) */
-#if defined(WOLFSSL_HAVE_LMS) && defined(WOLFSSL_LMS_VERIFY_ONLY) && \
- !defined(WOLFSSL_SMALL_STACK)
+#if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_SMALL_STACK)
+#if defined(WOLFSSL_WC_LMS) && (LMS_MAX_HEIGHT >= 10)
/* A simple LMS verify only test.
*
@@ -37339,7 +37914,7 @@ static byte lms_msg[28] =
0x61,0x67,0x65,0x21
};
-static byte lms_L1H10W8_pub[HSS_MAX_PUBLIC_KEY_LEN] =
+static const byte lms_L1H10W8_pub[HSS_MAX_PUBLIC_KEY_LEN] =
{
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,
0x00,0x00,0x00,0x04,0xA1,0x26,0x76,0xF8,
@@ -37551,6 +38126,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void)
int levels = 0;
int height = 0;
int winternitz = 0;
+ WOLFSSL_ENTER("lms_test_verify_only");
ret = wc_LmsKey_Init(&verifyKey, NULL, INVALID_DEVID);
if (ret != 0) { return WC_TEST_RET_ENC_EC(ret); }
@@ -37576,7 +38152,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void)
if (ret != 0) { return WC_TEST_RET_ENC_EC(ret); }
if (pubLen != HSS_MAX_PUBLIC_KEY_LEN) {
- printf("error: got %d, expected %d\n", pubLen, HSS_MAX_PUBLIC_KEY_LEN);
+ printf("error: got %u, expected %d\n", pubLen, HSS_MAX_PUBLIC_KEY_LEN);
return WC_TEST_RET_ENC_EC(pubLen);
}
@@ -37584,7 +38160,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void)
if (ret != 0) { return WC_TEST_RET_ENC_EC(ret); }
if (sigSz != LMS_L1H10W8_SIGLEN) {
- printf("error: got %d, expected %d\n", sigSz, LMS_L1H10W8_SIGLEN);
+ printf("error: got %u, expected %d\n", sigSz, LMS_L1H10W8_SIGLEN);
return WC_TEST_RET_ENC_EC(sigSz);
}
@@ -37599,7 +38175,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void)
lms_msg[msgSz / 2] ^= 1;
ret2 = wc_LmsKey_Verify(&verifyKey, lms_L1H10W8_sig, LMS_L1H10W8_SIGLEN,
(byte *) lms_msg, msgSz);
- if (ret2 != -1) {
+ if ((ret2 != -1) && (ret2 != SIG_VERIFY_E)) {
printf("error: wc_LmsKey_Verify returned %d, expected -1\n", ret2);
return WC_TEST_RET_ENC_EC(ret);
}
@@ -37621,7 +38197,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void)
ret2 = wc_LmsKey_Verify(&verifyKey, lms_L1H10W8_sig,
LMS_L1H10W8_SIGLEN,
(byte *) lms_msg, msgSz);
- if (ret2 != -1) {
+ if ((ret2 != -1) && (ret2 != SIG_VERIFY_E)) {
/* Verify passed when it should have failed. */
return WC_TEST_RET_ENC_I(j);
}
@@ -37634,8 +38210,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t lms_test_verify_only(void)
return ret;
}
-#endif /* if defined(WOLFSSL_HAVE_LMS) && defined(WOLFSSL_LMS_VERIFY_ONLY) &&
- * !defined(WOLFSSL_SMALL_STACK) */
+#endif
+#endif /* if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_SMALL_STACK) */
static const int fiducial3 = WC_TEST_RET_LN; /* source code reference point --
* see print_fiducials() below.
@@ -38551,6 +39127,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t eccsi_test(void)
EccsiKey* pub = NULL;
mp_int* ssk = NULL;
ecc_point* pvt = NULL;
+ WOLFSSL_ENTER("eccsi_test");
priv = (EccsiKey*)XMALLOC(sizeof(EccsiKey), HEAP_HINT,
DYNAMIC_TYPE_TMP_BUFFER);
@@ -39363,12 +39940,12 @@ static wc_test_ret_t sakke_kat_encapsulate_test(SakkeKey* key)
0x37, 0x30, 0x30, 0x39, 0x30, 0x30, 0x31, 0x32,
0x33, 0x00
};
- static word32 idSz = sizeof(id);
+ static const word32 idSz = sizeof(id);
byte ssv[] = {
0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0,
0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0
};
- static word16 ssvSz = sizeof(ssv);
+ static const word16 ssvSz = sizeof(ssv);
static const byte expAuth[] = {
0x04,
0x44, 0xE8, 0xAD, 0x44, 0xAB, 0x85, 0x92, 0xA6,
@@ -39706,6 +40283,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t sakke_test(void)
SakkeKey* pub = NULL;
SakkeKey* key = NULL;
ecc_point* rsk = NULL;
+ WOLFSSL_ENTER("sakke_test");
priv = (SakkeKey*)XMALLOC(sizeof(SakkeKey), HEAP_HINT,
DYNAMIC_TYPE_TMP_BUFFER);
@@ -39970,6 +40548,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cmac_test(void)
const CMAC_Test_Case* tc;
word32 i, tagSz;
wc_test_ret_t ret;
+ WOLFSSL_ENTER("cmac_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((cmac = (Cmac *)XMALLOC(sizeof *cmac, HEAP_HINT, DYNAMIC_TYPE_CMAC)) == NULL)
@@ -40016,16 +40595,42 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cmac_test(void)
XMEMSET(tag, 0, sizeof(tag));
tagSz = sizeof(tag);
+#if !defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)
+ ret = wc_AesCmacGenerate_ex(cmac, tag, &tagSz, tc->m, tc->mSz,
+ tc->k, tc->kSz, NULL, devId);
+#else
ret = wc_AesCmacGenerate(tag, &tagSz, tc->m, tc->mSz,
tc->k, tc->kSz);
+#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
if (XMEMCMP(tag, tc->t, AES_BLOCK_SIZE) != 0)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
+#if !defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)
+ ret = wc_AesCmacVerify_ex(cmac, tc->t, tc->tSz, tc->m, tc->mSz,
+ tc->k, tc->kSz, HEAP_HINT, devId);
+#else
ret = wc_AesCmacVerify(tc->t, tc->tSz, tc->m, tc->mSz,
tc->k, tc->kSz);
+#endif
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
+
+#if !defined(HAVE_FIPS) || FIPS_VERSION_GE(5, 3)
+ /* Test that keyless generate with init is the same */
+ XMEMSET(tag, 0, sizeof(tag));
+ tagSz = sizeof(tag);
+ ret = wc_InitCmac_ex(cmac, tc->k, tc->kSz, tc->type, NULL, HEAP_HINT, devId);
+ if (ret != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
+ }
+ ret = wc_AesCmacGenerate_ex(cmac, tag, &tagSz, tc->m, tc->mSz,
+ NULL, 0, HEAP_HINT, devId);
+ if (ret != 0) {
+ ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
+ }
+#endif
+
}
ret = 0;
@@ -40268,6 +40873,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t siphash_test(void)
unsigned char res[SIPHASH_MAC_SIZE_16];
unsigned char tmp[SIPHASH_MAC_SIZE_8];
SipHash siphash;
+ WOLFSSL_ENTER("siphash_test (1)");
for (i = 0; i < 64; i++) {
ret = wc_InitSipHash(&siphash, siphash_key, SIPHASH_MAC_SIZE_8);
@@ -40305,6 +40911,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t siphash_test(void)
if (XMEMCMP(res, siphash_r16[i], SIPHASH_MAC_SIZE_16) != 0)
return WC_TEST_RET_ENC_I(i);
}
+#else
+ WOLFSSL_ENTER("siphash_test (1)");
#endif
/* Testing bad parameters. */
@@ -40627,6 +41235,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t compress_test(void)
word32 cSz = (dSz + (word32)(dSz * 0.001) + 12);
byte *c;
byte *d;
+ WOLFSSL_ENTER("compress_test");
c = (byte *)XMALLOC(cSz * sizeof(byte), HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
d = (byte *)XMALLOC(dSz * sizeof(byte), HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
@@ -41751,6 +42360,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7enveloped_test(void)
byte* eccPrivKey = NULL;
word32 eccCertSz = 0;
word32 eccPrivKeySz = 0;
+ WOLFSSL_ENTER("pkcs7enveloped_test");
#ifndef NO_RSA
/* read client RSA cert and key in DER format */
@@ -42457,6 +43067,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7authenveloped_test(void)
byte* eccPrivKey = NULL;
word32 eccCertSz = 0;
word32 eccPrivKeySz = 0;
+ WOLFSSL_ENTER("pkcs7authenveloped_test");
#ifndef NO_RSA
/* read client RSA cert and key in DER format */
@@ -42918,6 +43529,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7callback_test(byte* cert, word32 cert
wc_test_ret_t ret = 0;
word32 derSz;
byte *derBuf = (byte *)XMALLOC(FOURK_BUF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
+ WOLFSSL_ENTER("pkcs7callback_test");
if (! derBuf)
ERROR_OUT(WC_TEST_RET_ENC_NC, out);
@@ -43042,8 +43654,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7encrypted_test(void)
/* Attribute example from RFC 4134, Section 7.2
* OID = 1.2.5555
* OCTET STRING = 'This is a test General ASN Attribute, number 1.' */
- static byte genAttrOid[] = { 0x06, 0x03, 0x2a, 0xab, 0x33 };
- static byte genAttr[] = { 0x04, 47,
+ static const byte genAttrOid[] = { 0x06, 0x03, 0x2a, 0xab, 0x33 };
+ static const byte genAttr[] = { 0x04, 47,
0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20,
0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41,
@@ -43051,8 +43663,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7encrypted_test(void)
0x62, 0x75, 0x74, 0x65, 0x2c, 0x20, 0x6e, 0x75,
0x6d, 0x62, 0x65, 0x72, 0x20, 0x31, 0x2e };
- static byte genAttrOid2[] = { 0x06, 0x03, 0x2a, 0xab, 0x34 };
- static byte genAttr2[] = { 0x04, 47,
+ static const byte genAttrOid2[] = { 0x06, 0x03, 0x2a, 0xab, 0x34 };
+ static const byte genAttr2[] = { 0x04, 47,
0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20,
0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x20, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41,
@@ -43114,6 +43726,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7encrypted_test(void)
#endif
#endif /* !NO_AES && HAVE_AES_CBC */
};
+ WOLFSSL_ENTER("pkcs7encrypted_test");
encrypted = (byte *)XMALLOC(PKCS7_BUF_SIZE, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
decoded = (byte *)XMALLOC(PKCS7_BUF_SIZE, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
@@ -43290,6 +43903,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7compressed_test(void)
ERROR_OUT(MEMORY_E, out);
}
#endif
+ WOLFSSL_ENTER("pkcs7compressed_test");
testSz = sizeof(testVectors) / sizeof(pkcs7CompressedVector);
@@ -43385,12 +43999,12 @@ typedef struct {
word32 signedAttribsSz;
const char* outFileName;
int contentOID;
- byte* contentType;
+ const byte* contentType;
word32 contentTypeSz;
int sidType;
int encryptOID; /* for single-shot encrypt alg OID */
int encCompFlag; /* for single-shot. 1 = enc, 2 = comp, 3 = both*/
- byte* encryptKey; /* for single-shot, encryptedData */
+ const byte* encryptKey; /* for single-shot, encryptedData */
word32 encryptKeySz; /* for single-shot, encryptedData */
PKCS7Attrib* unprotectedAttribs; /* for single-shot, encryptedData */
word32 unprotectedAttribsSz; /* for single-shot, encryptedData */
@@ -43424,24 +44038,24 @@ static wc_test_ret_t pkcs7signed_run_vectors(
0x72,0x6c,0x64
};
- static byte transIdOid[] =
+ static const byte transIdOid[] =
{ 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01,
0x09, 0x07 };
- static byte messageTypeOid[] =
+ static const byte messageTypeOid[] =
{ 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01,
0x09, 0x02 };
- static byte senderNonceOid[] =
+ static const byte senderNonceOid[] =
{ 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01,
0x09, 0x05 };
#ifndef NO_SHA
- static byte transId[(WC_SHA_DIGEST_SIZE + 1) * 2 + 1];
+ byte transId[(WC_SHA_DIGEST_SIZE + 1) * 2 + 1];
#else
- static byte transId[(WC_SHA256_DIGEST_SIZE + 1) * 2 + 1];
+ byte transId[(WC_SHA256_DIGEST_SIZE + 1) * 2 + 1];
#endif
- static byte messageType[] = { 0x13, 2, '1', '9' };
- static byte senderNonce[PKCS7_NONCE_SZ + 2];
+ static const byte messageType[] = { 0x13, 2, '1', '9' };
+ byte senderNonce[PKCS7_NONCE_SZ + 2];
- static PKCS7Attrib attribs[] =
+ PKCS7Attrib attribs[] =
{
{ transIdOid, sizeof(transIdOid), transId,
sizeof(transId) - 1 }, /* take off the null */
@@ -43452,13 +44066,13 @@ static wc_test_ret_t pkcs7signed_run_vectors(
};
/* for testing custom contentType, FirmwarePkgData */
- static byte customContentType[] = { 0x06, 0x0B, 0x2A, 0x86,
+ static const byte customContentType[] = { 0x06, 0x0B, 0x2A, 0x86,
0x48, 0x86, 0xF7, 0x0D,
0x01, 0x09, 0x10, 0x01, 0x10 };
#define MAX_TESTVECTORS_LEN 20
#define ADD_PKCS7SIGNEDVECTOR(...) { \
- pkcs7SignedVector _this_vector = { __VA_ARGS__ }; \
+ const pkcs7SignedVector _this_vector = { __VA_ARGS__ }; \
if (testSz == MAX_TESTVECTORS_LEN) { \
ret = WC_TEST_RET_ENC_NC; \
goto out; \
@@ -43715,7 +44329,8 @@ static wc_test_ret_t pkcs7signed_run_vectors(
/* optional custom contentType, default is DATA,
overrides contentOID if set */
if (testVectors[i].contentType != NULL) {
- ret = wc_PKCS7_SetContentType(pkcs7, testVectors[i].contentType,
+ ret = wc_PKCS7_SetContentType(pkcs7,
+ (byte *)testVectors[i].contentType,
testVectors[i].contentTypeSz);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), out);
@@ -43837,7 +44452,7 @@ static wc_test_ret_t pkcs7signed_run_vectors(
#else
byte buf[(WC_SHA256_DIGEST_SIZE + 1) * 2 + 1];
#endif
- byte* oidPt = transIdOid + 2; /* skip object id tag and size */
+ const byte* oidPt = transIdOid + 2; /* skip object id tag and size */
int oidSz = (int)sizeof(transIdOid) - 2;
int bufSz = 0;
@@ -43943,7 +44558,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
#if !defined(NO_PKCS7_ENCRYPTED_DATA) && \
defined(HAVE_AES_CBC) && defined(WOLFSSL_AES_256)
- static byte aes256Key[] = {
+ static const byte aes256Key[] = {
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
@@ -43951,10 +44566,10 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
};
#endif
- static byte messageTypeOid[] =
+ static const byte messageTypeOid[] =
{ 0x06, 0x0a, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01,
0x09, 0x02 };
- static byte messageType[] = { 0x13, 2, '1', '9' };
+ static const byte messageType[] = { 0x13, 2, '1', '9' };
PKCS7Attrib attribs[] =
{
@@ -44244,7 +44859,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
/* encode Signed Encrypted FirmwarePkgData */
encodedSz = wc_PKCS7_EncodeSignedEncryptedFPD(pkcs7,
- testVectors[i].encryptKey, testVectors[i].encryptKeySz,
+ (byte *)testVectors[i].encryptKey, testVectors[i].encryptKeySz,
testVectors[i].privateKey, testVectors[i].privateKeySz,
testVectors[i].encryptOID, testVectors[i].signOID,
testVectors[i].hashOID, (byte*)testVectors[i].content,
@@ -44276,7 +44891,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
/* encode Signed Encrypted Compressed FirmwarePkgData */
encodedSz = wc_PKCS7_EncodeSignedEncryptedCompressedFPD(pkcs7,
- testVectors[i].encryptKey, testVectors[i].encryptKeySz,
+ (byte*)testVectors[i].encryptKey, testVectors[i].encryptKeySz,
testVectors[i].privateKey, testVectors[i].privateKeySz,
testVectors[i].encryptOID, testVectors[i].signOID,
testVectors[i].hashOID, (byte*)testVectors[i].content,
@@ -44347,7 +44962,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
else if (testVectors[i].encCompFlag == 1) {
/* decrypt inner encryptedData */
- pkcs7->encryptionKey = testVectors[i].encryptKey;
+ pkcs7->encryptionKey = (byte *)testVectors[i].encryptKey;
pkcs7->encryptionKeySz = testVectors[i].encryptKeySz;
ret = wc_PKCS7_DecodeEncryptedData(pkcs7, pkcs7->content,
@@ -44385,7 +45000,7 @@ static wc_test_ret_t pkcs7signed_run_SingleShotVectors(
XMEMSET(encryptedTmp, 0, encryptedTmpSz);
/* decrypt inner encryptedData */
- pkcs7->encryptionKey = testVectors[i].encryptKey;
+ pkcs7->encryptionKey = (byte*)testVectors[i].encryptKey;
pkcs7->encryptionKeySz = testVectors[i].encryptKeySz;
encryptedTmpSz = wc_PKCS7_DecodeEncryptedData(pkcs7, pkcs7->content,
@@ -44471,6 +45086,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t pkcs7signed_test(void)
word32 rsaServerPrivKeyBufSz = 0;
word32 rsaCaPrivKeyBufSz = 0;
word32 eccClientPrivKeyBufSz = 0;
+ WOLFSSL_ENTER("pkcs7signed_test");
#ifndef NO_RSA
/* read client RSA cert and key in DER format */
@@ -44721,7 +45337,7 @@ static wc_test_ret_t mp_test_radix_10(mp_int* a, mp_int* r, WC_RNG* rng)
char str[30];
WOLFSSL_SMALL_STACK_STATIC const char* badStr1 = "A";
WOLFSSL_SMALL_STACK_STATIC const char* badStr2 = "a";
- WOLFSSL_SMALL_STACK_STATIC const char* badStr3 = " ";
+ WOLFSSL_SMALL_STACK_STATIC const char* empty2 = " ";
WOLFSSL_SMALL_STACK_STATIC const char* zeros = "000";
WOLFSSL_SMALL_STACK_STATIC const char* empty = "";
@@ -44753,8 +45369,8 @@ static wc_test_ret_t mp_test_radix_10(mp_int* a, mp_int* r, WC_RNG* rng)
ret = mp_read_radix(r, badStr2, MP_RADIX_DEC);
if (ret != MP_VAL)
return WC_TEST_RET_ENC_EC(ret);
- ret = mp_read_radix(r, badStr3, MP_RADIX_DEC);
- if (ret != MP_VAL)
+ ret = mp_read_radix(r, empty2, MP_RADIX_DEC);
+ if (ret != MP_OKAY)
return WC_TEST_RET_ENC_EC(ret);
ret = mp_read_radix(r, zeros, MP_RADIX_DEC);
@@ -44801,7 +45417,7 @@ static wc_test_ret_t mp_test_radix_16(mp_int* a, mp_int* r, WC_RNG* rng)
#if defined(WOLFSSL_SP_MATH) || defined(USE_FAST_MATH)
static char longStr[2 * sizeof(a->dp) + 2];
#endif
- WOLFSSL_SMALL_STACK_STATIC const char* badStr1 = " ";
+ WOLFSSL_SMALL_STACK_STATIC const char* empty2 = " ";
WOLFSSL_SMALL_STACK_STATIC const char* badStr2 = "}";
WOLFSSL_SMALL_STACK_STATIC const char* empty = "";
@@ -44821,8 +45437,8 @@ static wc_test_ret_t mp_test_radix_16(mp_int* a, mp_int* r, WC_RNG* rng)
}
}
- ret = mp_read_radix(r, badStr1, MP_RADIX_HEX);
- if (ret != MP_VAL)
+ ret = mp_read_radix(r, empty2, MP_RADIX_HEX);
+ if (ret != MP_OKAY)
return WC_TEST_RET_ENC_EC(ret);
ret = mp_read_radix(r, badStr2, MP_RADIX_HEX);
if (ret != MP_VAL)
@@ -47273,6 +47889,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t mp_test(void)
#endif
mp_digit d = 0;
#endif
+
#ifdef WOLFSSL_SMALL_STACK
mp_int *a = (mp_int *)XMALLOC(sizeof(mp_int), HEAP_HINT,
DYNAMIC_TYPE_TMP_BUFFER),
@@ -47295,6 +47912,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t mp_test(void)
#else
mp_int a[1], b[1], r1[1], r2[1], p[1];
#endif
+ WOLFSSL_ENTER("mp_test");
ret = mp_init_multi(a, b, r1, r2, NULL, NULL);
if (ret != 0)
@@ -47348,8 +47966,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t mp_test(void)
ret = mp_mulmod(a, a, p, r2);
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), done);
- if (mp_cmp(r1, r2) != 0)
+ if (mp_cmp(r1, r2) != 0) {
+ WOLFSSL_MSG("Fail: mp_mulmod result does not match mp_sqrmod!");
ERROR_OUT(WC_TEST_RET_ENC_NC, done);
+ }
#endif
#if defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)
@@ -47789,6 +48409,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t prime_test(void)
wc_test_ret_t ret;
int isPrime = 0;
WC_RNG rng;
+ WOLFSSL_ENTER("prime_test");
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((n == NULL) ||
@@ -47974,6 +48595,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t berder_test(void)
{ good4_in, sizeof(good4_in), good4_out, sizeof(good4_out) },
{ good5_in, sizeof(good5_in), good5_in , sizeof(good5_in ) },
};
+ WOLFSSL_ENTER("berder_test");
for (i = 0; i < (int)(sizeof(testData) / sizeof(*testData)); i++) {
ret = wc_BerToDer(testData[i].in, testData[i].inSz, NULL, &len);
@@ -48053,6 +48675,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t logging_test(void)
byte a[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
byte b[256];
int i;
+ WOLFSSL_ENTER("logging_test (debug)");
for (i = 0; i < (int)sizeof(b); i++)
b[i] = i;
@@ -48099,6 +48722,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t logging_test(void)
(void)b;
#else
+ WOLFSSL_ENTER("logging_test");
ret = wolfSSL_Debugging_ON();
if (ret != NOT_COMPILED_IN)
return WC_TEST_RET_ENC_EC(ret);
@@ -48123,20 +48747,23 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t mutex_test(void)
!defined(WOLFSSL_USER_MUTEX) && defined(WOLFSSL_STATIC_MEMORY))
wc_test_ret_t ret;
#endif
+
#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_USER_MUTEX)
- #ifndef WOLFSSL_STATIC_MEMORY
- wolfSSL_Mutex *mm = wc_InitAndAllocMutex();
- #else
- wolfSSL_Mutex *mm = (wolfSSL_Mutex*) XMALLOC(sizeof(wolfSSL_Mutex),
+ #ifndef WOLFSSL_STATIC_MEMORY
+ wolfSSL_Mutex *mm = wc_InitAndAllocMutex();
+ WOLFSSL_ENTER("[wolfcrypt_]mutex_test (1)");
+ #else
+ wolfSSL_Mutex *mm = (wolfSSL_Mutex*) XMALLOC(sizeof(wolfSSL_Mutex),
HEAP_HINT, DYNAMIC_TYPE_MUTEX);
- if (mm != NULL) {
- ret = wc_InitMutex(mm);
- if (ret != 0) {
- WOLFSSL_MSG("Init Mutex failed");
- XFREE(mm, HEAP_HINT, DYNAMIC_TYPE_MUTEX);
- return WC_TEST_RET_ENC_EC(ret);
+ WOLFSSL_ENTER("[wolfcrypt_]mutex_test (2)");
+ if (mm != NULL) {
+ ret = wc_InitMutex(mm);
+ if (ret != 0) {
+ WOLFSSL_MSG("Init Mutex failed");
+ XFREE(mm, HEAP_HINT, DYNAMIC_TYPE_MUTEX);
+ return WC_TEST_RET_ENC_EC(ret);
+ }
}
- }
#endif
if (mm == NULL)
return WC_TEST_RET_ENC_ERRNO;
@@ -48255,6 +48882,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void)
wolfSSL_Malloc_cb mc;
wolfSSL_Free_cb fc;
wolfSSL_Realloc_cb rc;
+ WOLFSSL_ENTER("memcb_test");
/* Save existing memory callbacks */
ret = wolfSSL_GetAllocators(&mc, &fc, &rc);
@@ -48340,7 +48968,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t blob_test(void)
0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17,
0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10
};
-
+ WOLFSSL_ENTER("blob_test");
XMEMSET(blob, 0, sizeof(blob));
XMEMSET(out, 0, sizeof(out));
@@ -49461,13 +50089,13 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
/* set devId to invalid, so software is used */
info->hmac.hmac->devId = INVALID_DEVID;
- if (info->hash.in != NULL) {
+ if (info->hmac.in != NULL) {
ret = wc_HmacUpdate(
info->hmac.hmac,
info->hmac.in,
info->hmac.inSz);
}
- else if (info->hash.digest != NULL) {
+ else if (info->hmac.digest != NULL) {
ret = wc_HmacFinal(
info->hmac.hmac,
info->hmac.digest);
@@ -49477,6 +50105,49 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
info->hmac.hmac->devId = devIdArg;
}
#endif
+#if defined(WOLFSSL_CMAC) && !defined(NO_AES)
+ else if (info->algo_type == WC_ALGO_TYPE_CMAC) {
+ if (info->cmac.cmac == NULL) {
+ return NOT_COMPILED_IN;
+ }
+
+ /* set devId to invalid so software is used */
+ info->cmac.cmac->devId = INVALID_DEVID;
+
+ /* Handle one-shot cases */
+ if (info->cmac.key != NULL && info->cmac.in != NULL
+ && info->cmac.out != NULL) {
+ ret = wc_AesCmacGenerate(info->cmac.out,
+ info->cmac.outSz,
+ info->cmac.in,
+ info->cmac.inSz,
+ info->cmac.key,
+ info->cmac.keySz);
+ /* Sequentially handle incremental cases */
+ } else {
+ if (info->cmac.key != NULL) {
+ ret = wc_InitCmac(info->cmac.cmac,
+ info->cmac.key,
+ info->cmac.keySz,
+ info->cmac.type,
+ NULL);
+ }
+ if ((ret == 0) && (info->cmac.in != NULL)) {
+ ret = wc_CmacUpdate(info->cmac.cmac,
+ info->cmac.in,
+ info->cmac.inSz);
+ }
+ if ((ret ==0) && (info->cmac.out != NULL)) {
+ ret = wc_CmacFinal(info->cmac.cmac,
+ info->cmac.out,
+ info->cmac.outSz);
+ }
+ }
+
+ /* reset devId */
+ info->cmac.cmac->devId = devIdArg;
+ }
+#endif /* WOLFSSL_CMAC && !(NO_AES) && WOLFSSL_AES_DIRECT */
(void)devIdArg;
(void)myCtx;
@@ -49516,6 +50187,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void)
wc_test_ret_t ret = 0;
int origDevId = devId;
myCryptoDevCtx myCtx;
+ WOLFSSL_ENTER("cryptocb_test");
/* example data for callback */
myCtx.exampleVar = 1;
@@ -49571,6 +50243,10 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t cryptocb_test(void)
if (ret == 0)
ret = aes_test();
#endif
+ #ifdef WOLFSSL_AES_XTS
+ if (ret == 0)
+ ret = aes_xts_test();
+ #endif
#if defined(HAVE_AESCCM) && defined(WOLFSSL_AES_128)
if (ret == 0)
ret = aesccm_test();
@@ -49649,6 +50325,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t certpiv_test(void)
0x71, 0x01, 0x04, /* Cert Info */
0xFE, 0x00, /* Error Detection */
};
+ WOLFSSL_ENTER("certpiv_test");
XMEMSET(&piv, 0, sizeof(piv));
/* Test with Identiv 0x0A, 0x0B and 0x0C markers */
@@ -49718,6 +50395,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t time_test(void)
{
time_t t;
wc_test_ret_t ret;
+ WOLFSSL_ENTER("time_test");
ret = wc_SetTimeCb(time_cb);
if (ret != 0)
@@ -49841,6 +50519,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t aes_siv_test(void)
byte computedPlaintext[82];
byte siv[AES_BLOCK_SIZE];
wc_test_ret_t ret = 0;
+ WOLFSSL_ENTER("aes_siv_test");
for (i = 0; i < AES_SIV_TEST_VECTORS; ++i) {
ret = wc_AesSivEncrypt(testVectors[i].key, testVectors[i].keySz,
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/Makefile.am b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/Makefile.am
deleted file mode 100644
index d9c3ae39..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-AM_CFLAGS=-I m4
-
-#add in wolfssl directory
-AM_CPPFLAGS+=-I$(abs_srcdir)/../../ -I$(srcdir)/include/
-lib_LTLIBRARIES = lib/libusercrypto.la
-lib_libusercrypto_la_CPPFLAGS = $(AM_CPPFLAGS)
-lib_libusercrypto_la_LDFLAGS = $(AM_LDFLAGS)
-lib_libusercrypto_la_SOURCES = src/rsa.c
-include_HEADERS = include/user_rsa.h
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/README.txt b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/README.txt
deleted file mode 100644
index 8afe87f6..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/README.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2006-2023 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free 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.
- *
- * wolfSSL 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
- */
-
-
-/*
- Created to use intel's IPP see their license for linking to intel's IPP library
- */
-
-
-##BUILDING ON 64BIT MAC OSX
-Tested and developed on MAC OSX linking to IPP v9.0
-
-for me exporting the IPP library was needed. As an example it was
-export DYLD_LIBRARY_PATH="/opt/intel/ipp/lib"
-
-first go to the root wolfssl dir and run ./autogen.sh && ./configure it with desired settings then make. This is to set up the define options and wolfssl library for the user crypto to link to.
-
-Then go to the wolfssl/user-crypto directory and run ./autogen.sh && ./configure then make make install this creates a usercrypto library to use
-
-Finally go back to the root wolfssl directory and follow these build instructions
-
-building wolfSSL add CPPFLAGS=-I/opt/intel/ipp/include for finding the IPP include files
-An example build would be
-./configure --with-user-crypto CPPFLAGS=-I/opt/intel/ipp/include --enable-lighty
-
-
-##BUILDING IN 32BIT UBUNTU
-Tested on UBUNTU 32 bit linking to IPP v9.0
-
-for me exporting the IPP library. As an example it was
-export LD_LIBRARY_PATH="/opt/intel/ipp/lib/ia32_lin/:$LD_LIBRARY_PATH"
-
-first go to the root wolfssl dir and configure it with desired settings and make install. This is to set up the define options and wolfssl library for the user crypto to link to.
-
-For me on Ubuntu the IPP libraries had been installed into /opt/intel/ipp/lib/ia32_lin/ so the ./configure LDFLAGS=-L/opt/intel/ipp/lib/ia32_lin was needed to be looking at that directory.
-Run make && make install from the directory wolfssl_root/wolfssl/user-crypto/ this creates a usercrypto library to use
-
-Finally go back to the root wolfssl directory and follow these build instructions
-
-building wolfSSL add CPPFLAGS=-I/opt/intel/ipp/include for finding the IPP include files
-
-./configure --with-user-crypto=root_wolfssl/wolfssl/user-crypto CPPFLAGS=-I/opt/intel/ipp/include (plus any desired additional flags)
-
-
-##THINGS TO CHECK FOR IF NOT ABLE TO LINK WITH USERCRYPTO LIB
-Check that the path has been exported for the IPP library. If usercrypto is unable to use the function to init an RSA key then the link to it will fail in configure. Check for this by $DYLD_LIBRARY_PATH on mac or $LD_LIBRARY_PATH on ubuntu. If the directory for the Intel IPP libraries are not displayed than use "export DYLD_LIBRARY_PATH=path_to_ipp_libraries:$DYLD_LIBRARY_PATH".
-
-
-##CREATING OWN RSA CRYPTO PLUGIN
-
-It is required to have a header file named user_rsa.h. This is what is looked for by wolfssl/wolfcrypt/rsa.h and should contain the user defined rsa key struct.
-
-It is required to have a library called usercrypto. This is linked to when configuring wolfSSL with the option --with-user-crypto
-
-It is required when compiled with RSA cert generation to have key struct elements named n and e containing the corresponding big numbers. And the three helper functions to work with the big numbers. These functions are called by wolfcrypt/src/asn.c when working with certificates.
-To view the needed functions look at wolfssl/wolfcrypt/rsa.h they will be extern functions surrounded by HAVE_USER_RSA define.
-Cert Generation for other sign and verify such as ECC are not yet supported.
-
-When building with openssl compatibility layer extra developent needs to be done, having the two functions SetRsaExernal and SetRsaInternal
-
-wolfSSL does not take responsibility for the strength of security of third party cryptography libraries plugged in by the user.
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/autogen.sh b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/autogen.sh
deleted file mode 100755
index 89e475c0..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/autogen.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# Create configure and makefile stuff...
-#
-
-# Git hooks should come before autoreconf.
-if test -d .git; then
- if ! test -d .git/hooks; then
- mkdir .git/hooks
- fi
- ln -s -f ../../pre-commit.sh .git/hooks/pre-commit
- ln -s -f ../../pre-push.sh .git/hooks/pre-push
-fi
-
-# If this is a source checkout then call autoreconf with error as well
-if test -d .git; then
- WARNINGS="all,error"
-else
- WARNINGS="all"
-fi
-
-autoreconf --install --force --verbose
-
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/configure.ac b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/configure.ac
deleted file mode 100644
index 561b9ccd..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/configure.ac
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.63])
-AC_INIT([usercypto], [0.1], [])
-AC_CONFIG_SRCDIR([src/rsa.c])
-
-AM_INIT_AUTOMAKE([1.11 -Wall -Werror -Wno-portability foreign tar-ustar subdir-objects no-define color-tests])
-
-LT_PREREQ([2.2])
-LT_INIT([disable-static])
-LT_LANG([C++])
-LT_LANG([C])
-
-# Checks for programs.
-AC_PROG_CC
-AC_CONFIG_MACRO_DIR([m4])
-
-# Checks for libraries.
-AM_LDFLAGS=$LDFLAGS
-LDFLAGS="$LDFLAGS -L/opt/intel/ipp/lib -lippcp -lippcore"
-
-# Path to find wolfssl/options and other includes
-AM_CPPFLAGS=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS -I../../ -I/opt/intel/ipp/include"
-AC_CHECK_LIB([ippcore], [ippGetStatusString], [], [AC_MSG_ERROR([ippcore library needed ./configure LDFLAGS=/path/to/ipp/lib])])
-AC_CHECK_LIB([ippcp], [ippsRSA_InitPublicKey], [], [AC_MSG_ERROR([ippcp library needed ./configure LDFLAGS=/path/to/ipp/lib])])
-
-# check headers
-AC_CHECK_HEADER([ippcp.h], [], [AC_MSG_ERROR([ippcp.h not found ./configure CPPFLAGS=-I/ipp/headers])])
-AC_CHECK_HEADER([ipp.h], [], [AC_MSG_ERROR([ipp.h not found ./configure CPPFLAGS=-I/ipp/headers])])
-
-LDFLAGS=$AM_LDFLAGS
-CPPFLAGS=$AM_CPPFLAGS
-
-AM_LDFLAGS="-L/opt/intel/ipp/lib -lippcp -lippcore"
-AM_CPPFLAGS="-I/opt/intel/ipp/include"
-
-AC_SUBST([AM_CPPFLAGS])
-AC_SUBST([AM_LDFLAGS])
-AC_C_INLINE
-
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include.am b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include.am
deleted file mode 100644
index 6cc8577a..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include.am
+++ /dev/null
@@ -1,13 +0,0 @@
-
-if BUILD_FAST_RSA
-include_HEADERS += wolfcrypt/user-crypto/include/user_rsa.h
-endif
-
-# user crypto plug in example
-EXTRA_DIST+= wolfcrypt/user-crypto/configure.ac
-EXTRA_DIST+= wolfcrypt/user-crypto/autogen.sh
-EXTRA_DIST+= wolfcrypt/user-crypto/include/user_rsa.h
-EXTRA_DIST+= wolfcrypt/user-crypto/src/rsa.c
-EXTRA_DIST+= wolfcrypt/user-crypto/lib/.gitkeep
-EXTRA_DIST+= wolfcrypt/user-crypto/README.txt
-EXTRA_DIST+= wolfcrypt/user-crypto/Makefile.am
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include/user_rsa.h b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include/user_rsa.h
deleted file mode 100644
index c850b779..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/include/user_rsa.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* user_rsa.h
- *
- * Copyright (C) 2006-2023 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free 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.
- *
- * wolfSSL 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
- */
-
-
-/*
- Created to use intel's IPP see their license for linking to intel's IPP library
- */
-
-#ifndef USER_WOLF_CRYPT_RSA_H
-#define USER_WOLF_CRYPT_RSA_H
-
-#include <wolfssl/wolfcrypt/settings.h>
-
-#ifndef NO_RSA
-
-#include <wolfssl/wolfcrypt/types.h>
-#include <wolfssl/wolfcrypt/random.h>
-
-/* intels crypto */
-#include <ipp.h>
-#include <ippcp.h>
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* needed for WOLFSSL_RSA type but use macro guard against redefine */
-#if defined(OPENSSL_EXTRA) && !defined(WOLFSSL_TYPES_DEFINED) \
- && !defined(WOLFSSL_RSA_TYPE_DEFINED)
- struct WOLFSSL_RSA;
- typedef struct WOLFSSL_RSA WOLFSSL_RSA;
- #define WOLFSSL_RSA_TYPE_DEFINED
-#endif
-
-
-enum {
- RSA_PUBLIC = 0,
- RSA_PRIVATE = 1,
-};
-
-/* RSA */
-struct RsaKey {
- IppsBigNumState* n;
- IppsBigNumState* e;
- IppsBigNumState* dipp;
- IppsBigNumState* pipp;
- IppsBigNumState* qipp;
- IppsBigNumState* dPipp;
- IppsBigNumState* dQipp;
- IppsBigNumState* uipp;
- int nSz, eSz, dSz;
- IppsRSAPublicKeyState* pPub;
- IppsRSAPrivateKeyState* pPrv;
- word32 prvSz; /* size of private key */
- word32 sz; /* size of signature */
- int type; /* public or private */
- void* heap; /* for user memory overrides */
-};
-
-#ifndef WC_RSAKEY_TYPE_DEFINED
- typedef struct RsaKey RsaKey;
- #define WC_RSAKEY_TYPE_DEFINED
-#endif
-
-WOLFSSL_API int wc_InitRsaKey(RsaKey* key, void*);
-WOLFSSL_API int wc_InitRsaKey_ex(RsaKey* key, void* heap, int devId);
-WOLFSSL_API int wc_FreeRsaKey(RsaKey* key);
-
-WOLFSSL_API int wc_RsaPublicEncrypt(const byte* in, word32 inLen, byte* out,
- word32 outLen, RsaKey* key, WC_RNG* rng);
-WOLFSSL_API int wc_RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out,
- RsaKey* key);
-WOLFSSL_API int wc_RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out,
- word32 outLen, RsaKey* key);
-WOLFSSL_API int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out,
- word32 outLen, RsaKey* key, WC_RNG* rng);
-WOLFSSL_API int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out,
- RsaKey* key);
-WOLFSSL_API int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out,
- word32 outLen, RsaKey* key);
-WOLFSSL_API int wc_RsaEncryptSize(RsaKey* key);
-
-WOLFSSL_API int wc_RsaPrivateKeyDecode(const byte* input, word32* inOutIdx,
- RsaKey*, word32);
-WOLFSSL_API int wc_RsaPublicKeyDecode_ex(const byte* input, word32* inOutIdx,
- word32 inSz, const byte** n, word32* nSz, const byte** e, word32* eSz);
-WOLFSSL_API int wc_RsaPublicKeyDecode(const byte* input, word32* inOutIdx,
- RsaKey*, word32);
-WOLFSSL_API int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz,
- const byte* e, word32 eSz, RsaKey* key);
-WOLFSSL_API int wc_RsaKeyToDer(RsaKey*, byte* output, word32 inLen);
-WOLFSSL_API int wc_RsaKeyToPublicDer(RsaKey*, byte* output, word32 inLen);
-#ifdef WOLFSSL_KEY_GEN
- WOLFSSL_API int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng);
-#endif
-WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*,
- word32*);
-WOLFSSL_API int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng);
-
-
-#if defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA)
- /* abstracted BN operations with RSA key */
- WOLFSSL_API int wc_Rsa_leading_bit(void* BN);
- WOLFSSL_API int wc_Rsa_unsigned_bin_size(void* BN);
-
- /* return MP_OKAY on success */
- WOLFSSL_API int wc_Rsa_to_unsigned_bin(void* BN, byte* in, int inLen);
-#endif
-
-#ifdef OPENSSL_EXTRA /* abstracted functions to deal with rsa key */
- WOLFSSL_API int SetRsaExternal(WOLFSSL_RSA* rsa);
- WOLFSSL_API int SetRsaInternal(WOLFSSL_RSA* rsa);
-#endif
-#ifdef __cplusplus
- } /* extern "C" */
-#endif
-
-#endif /* NO_RSA */
-#endif /* USER_WOLF_CRYPT_RSA_H */
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/lib/.gitkeep b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/lib/.gitkeep
deleted file mode 100644
index e69de29b..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/lib/.gitkeep
+++ /dev/null
diff --git a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/src/rsa.c b/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/src/rsa.c
deleted file mode 100644
index 66357372..00000000
--- a/extra/wolfssl/wolfssl/wolfcrypt/user-crypto/src/rsa.c
+++ /dev/null
@@ -1,2797 +0,0 @@
-/* rsa.c
- *
- * Copyright (C) 2006-2023 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free 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.
- *
- * wolfSSL 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
- */
-
-
-#ifdef HAVE_CONFIG_H /* configure options when using autoconf */
- #include <config.h>
-#endif
-
-#include <wolfssl/options.h>
-#include <wolfssl/wolfcrypt/types.h>
-
-#ifndef NO_RSA
-
-#define USER_CRYPTO_ERROR -101
-
-#ifdef OPENSSL_EXTRA
- #include <wolfssl/openssl/rsa.h> /* include for openssl compatibility */
- #include <wolfssl/openssl/bn.h>
-#endif
-#include "user_rsa.h"
-
-#ifdef DEBUG_WOLFSSL /* debug done without variadic to allow older compilers */
- #include <stdio.h>
- #define USER_DEBUG(x) printf x
-#else
- #define USER_DEBUG(x) WC_DO_NOTHING
-#endif
-
-#define ASN_INTEGER 0x02
-#define ASN_BIT_STRING 0x03
-#define ASN_TAG_NULL 0x05
-#define ASN_OBJECT_ID 0x06
-
-
-/* Make sure compiler doesn't skip -- used from wolfSSL */
-static inline void ForceZero(const void* mem, word32 len)
-{
- volatile byte* z = (volatile byte*)mem;
-
- while (len--) *z++ = 0;
-}
-
-enum {
- RSA_PUBLIC_ENCRYPT = 0,
- RSA_PUBLIC_DECRYPT = 1,
- RSA_PRIVATE_ENCRYPT = 2,
- RSA_PRIVATE_DECRYPT = 3,
-
- RSA_BLOCK_TYPE_1 = 1,
- RSA_BLOCK_TYPE_2 = 2,
-
- RSA_MIN_SIZE = 512,
- RSA_MAX_SIZE = 4096, /* max allowed in IPP library */
-
- RSA_MIN_PAD_SZ = 11 /* separator + 0 + pad value + 8 pads */
-};
-
-
-int wc_InitRsaKey_ex(RsaKey* key, void* heap, int devId)
-{
-
- USER_DEBUG(("Entering wc_InitRsaKey\n"));
-
- if (key == NULL)
- return USER_CRYPTO_ERROR;
-
- /* set full struct as 0 */
- ForceZero(key, sizeof(RsaKey));
-
- USER_DEBUG(("\tExit wc_InitRsaKey\n"));
-
- (void)devId;
- (void)heap;
- return 0;
-}
-
-int wc_InitRsaKey(RsaKey* key, void* heap)
-{
- return wc_InitRsaKey_ex(key, heap, INVALID_DEVID);
-}
-
-
-/* three functions needed for cert and key gen */
-#if defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA)
-/* return 1 if there is a leading bit*/
-int wc_Rsa_leading_bit(void* bn)
-{
- int ret = 0;
- int dataSz;
- Ipp32u* data;
- Ipp32u q;
- int qSz = sizeof(Ipp32u);
-
- if (ippsExtGet_BN(NULL, &dataSz, NULL, bn) != ippStsNoErr) {
- USER_DEBUG(("ippsExtGet_BN Rsa leading bit error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- /* convert from size in binary to Ipp32u */
- dataSz = dataSz / 32 + ((dataSz % 32)? 1 : 0);
- data = (Ipp32u*)XMALLOC(dataSz * sizeof(Ipp32u), NULL,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (data == NULL) {
- USER_DEBUG(("Rsa leading bit memory error\n"));
- return 0;
- }
-
- /* extract value from BN */
- if (ippsExtGet_BN(NULL, NULL, data, bn) != ippStsNoErr) {
- USER_DEBUG(("Rsa leading bit error\n"));
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return 0;
- }
-
- /* use method like what's used in wolfssl tfm.c */
- q = data[dataSz - 1];
-
- ret = 0;
- while (qSz > 0) {
- if (q != 0)
- ret = (q & 0x80) != 0;
- q >>= 8;
- qSz--;
- }
-
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return ret;
-}
-
-
-/* get the size in bytes of BN */
-int wc_Rsa_unsigned_bin_size(void* bn)
-{
- int ret = 0;
- if (ippsExtGet_BN(NULL, &ret, NULL, bn) != ippStsNoErr) {
- USER_DEBUG(("Rsa unsigned bin size error\n"));
- return USER_CRYPTO_ERROR;
- }
- return (ret / 8) + ((ret % 8)? 1: 0); /* size in bytes */
-}
-
-#ifndef MP_OKAY
-#define MP_OKAY 0
-#endif
-
-/* extract the bn value to a unsigned byte array and return MP_OKAY on success */
-int wc_Rsa_to_unsigned_bin(void* bn, byte* in, int inLen)
-{
- if (ippsGetOctString_BN((Ipp8u*)in, inLen, bn) != ippStsNoErr) {
- USER_DEBUG(("Rsa to unsigned bin error\n"));
- return USER_CRYPTO_ERROR;
- }
- return MP_OKAY;
-}
-#endif /* WOLFSSL_CERT_GEN || WOLFSSL_KEY_GEN || OPENSSL_EXTRA */
-
-
-#ifdef OPENSSL_EXTRA /* functions needed for openssl compatibility layer */
-static int SetIndividualExternal(WOLFSSL_BIGNUM** bn, IppsBigNumState* in)
-{
- IppStatus ret;
- byte* data;
- int sz;
-
- USER_DEBUG(("Entering SetIndividualExternal\n"));
-
- if (bn == NULL || in == NULL) {
- USER_DEBUG(("inputs NULL error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (*bn == NULL) {
- *bn = wolfSSL_BN_new();
- if (*bn == NULL) {
- USER_DEBUG(("SetIndividualExternal alloc failed\n"));
- return USER_CRYPTO_ERROR;
- }
- }
-
- /* get size of array needed and extract oct array of data */
- ret = ippsGetSize_BN(in, &sz);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- data = (byte*)XMALLOC(sz, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (data == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsGetOctString_BN(data, sz, in);
- if (ret != ippStsNoErr) {
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return USER_CRYPTO_ERROR;
- }
-
- /* store the data into a wolfSSL Big Number */
- *bn = wolfSSL_BN_bin2bn(data, sz, *bn);
-
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return 0;
-}
-
-
-static int SetIndividualInternal(WOLFSSL_BIGNUM* bn, IppsBigNumState** mpi)
-{
- int length, ctxSz, sz;
- IppStatus ret;
- Ipp8u* data;
-
- USER_DEBUG(("Entering SetIndividualInternal\n"));
-
- if (bn == NULL || bn->internal == NULL) {
- USER_DEBUG(("bn NULL error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- length = wolfSSL_BN_num_bytes(bn);
-
- /* if not IPP BN then create one */
- if (*mpi == NULL) {
- ret = ippsBigNumGetSize(length, &ctxSz);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- *mpi = (IppsBigNumState*)XMALLOC(ctxSz, 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (*mpi == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsBigNumInit(length, *mpi);
- if (ret != ippStsNoErr) {
- XFREE(*mpi, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return USER_CRYPTO_ERROR;
- }
-
- }
-
- /* get the size of array needed and check IPP BigNum */
- if (ippsGetSize_BN(*mpi, &sz) != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- if (sz < length) {
- USER_DEBUG(("big num size is too small\n"));
- return USER_CRYPTO_ERROR;
- }
-
- data = (Ipp8u*)XMALLOC(length, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (data == NULL)
- return USER_CRYPTO_ERROR;
-
- /* extract the wolfSSL BigNum and store it into IPP BigNum */
- if (wolfSSL_BN_bn2bin(bn, data) < 0) {
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- USER_DEBUG(("error in getting bin from wolfssl bn\n"));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsSetOctString_BN(data, length, *mpi);
- if (ret != ippStsNoErr) {
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return USER_CRYPTO_ERROR;
- }
-
- XFREE(data, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return 0;
-}
-
-
-/* WolfSSL -> OpenSSL */
-int SetRsaExternal(WOLFSSL_RSA* rsa)
-{
- RsaKey* key;
- USER_DEBUG(("Entering SetRsaExternal\n"));
-
- if (rsa == NULL || rsa->internal == NULL) {
- USER_DEBUG(("rsa key NULL error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- key = (RsaKey*)rsa->internal;
-
- if (SetIndividualExternal(&rsa->n, key->n) != 0) {
- USER_DEBUG(("rsa n key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualExternal(&rsa->e, key->e) != 0) {
- USER_DEBUG(("rsa e key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (key->type == RSA_PRIVATE) {
- if (SetIndividualExternal(&rsa->d, key->dipp) != 0) {
- USER_DEBUG(("rsa d key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualExternal(&rsa->p, key->pipp) != 0) {
- USER_DEBUG(("rsa p key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualExternal(&rsa->q, key->qipp) != 0) {
- USER_DEBUG(("rsa q key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualExternal(&rsa->dmp1, key->dPipp) != 0) {
- USER_DEBUG(("rsa dP key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualExternal(&rsa->dmq1, key->dQipp) != 0) {
- USER_DEBUG(("rsa dQ key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualExternal(&rsa->iqmp, key->uipp) != 0) {
- USER_DEBUG(("rsa u key error\n"));
- return USER_CRYPTO_ERROR;
- }
- }
-
- rsa->exSet = 1;
-
- /* SSL_SUCCESS */
- return 1;
-}
-
-
-/* Openssl -> WolfSSL */
-int SetRsaInternal(WOLFSSL_RSA* rsa)
-{
- int ctxSz, pSz, qSz;
- IppStatus ret;
- RsaKey* key;
- USER_DEBUG(("Entering SetRsaInternal\n"));
-
- if (rsa == NULL || rsa->internal == NULL) {
- USER_DEBUG(("rsa key NULL error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- key = (RsaKey*)rsa->internal;
-
- if (SetIndividualInternal(rsa->n, &key->n) != 0) {
- USER_DEBUG(("rsa n key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (SetIndividualInternal(rsa->e, &key->e) != 0) {
- USER_DEBUG(("rsa e key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- /* public key */
- key->type = RSA_PUBLIC;
-
- if (rsa->d != NULL) {
- if (SetIndividualInternal(rsa->d, &key->dipp) != 0) {
- USER_DEBUG(("rsa d key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- /* private key */
- key->type = RSA_PRIVATE;
- }
-
- if (rsa->p != NULL &&
- SetIndividualInternal(rsa->p, &key->pipp) != 0) {
- USER_DEBUG(("rsa p key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (rsa->q != NULL &&
- SetIndividualInternal(rsa->q, &key->qipp) != 0) {
- USER_DEBUG(("rsa q key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (rsa->dmp1 != NULL &&
- SetIndividualInternal(rsa->dmp1, &key->dPipp) != 0) {
- USER_DEBUG(("rsa dP key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (rsa->dmq1 != NULL &&
- SetIndividualInternal(rsa->dmq1, &key->dQipp) != 0) {
- USER_DEBUG(("rsa dQ key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (rsa->iqmp != NULL &&
- SetIndividualInternal(rsa->iqmp, &key->uipp) != 0) {
- USER_DEBUG(("rsa u key error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- rsa->inSet = 1;
-
- /* get sizes of IPP BN key states created from input */
- ret = ippsGetSize_BN(key->n, &key->nSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsGetSize_BN(key->e, &key->eSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->sz = key->nSz; /* set modulus size */
-
- /* convert to size in bits */
- key->nSz = key->nSz * 8;
- key->eSz = key->eSz * 8;
-
- /* set up public key state */
- ret = ippsRSA_GetSizePublicKey(key->nSz, key->eSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->pPub = (IppsRSAPublicKeyState*)XMALLOC(ctxSz, NULL,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPub == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSA_InitPublicKey(key->nSz, key->eSz, key->pPub, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsRSA_SetPublicKey(key->n, key->e, key->pPub);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_SetPublicKey error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- if (key->pipp != NULL && key->qipp != NULL && key->dipp != NULL &&
- key->dPipp != NULL && key->dQipp != NULL && key->uipp != NULL) {
- /* get bn sizes needed for private key set up */
- ret = ippsGetSize_BN(key->pipp, &pSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsGetSize_BN(key->qipp, &qSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* store sizes needed for creating tmp private keys */
- ret = ippsGetSize_BN(key->dipp, &key->dSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* convert to size in bits */
- key->dSz = key->dSz * 8;
- pSz = pSz * 8;
- qSz = qSz * 8;
-
- /* set up private key state */
- ret = ippsRSA_GetSizePrivateKeyType2(pSz, qSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->prvSz = ctxSz;
- key->pPrv = (IppsRSAPrivateKeyState*)XMALLOC(ctxSz, 0,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPrv == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSA_InitPrivateKeyType2(pSz, qSz, key->pPrv, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsRSA_SetPrivateKeyType2(key->pipp, key->qipp, key->dPipp,
- key->dQipp, key->uipp, key->pPrv);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_SetPrivateKey error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
- }
-
- /* SSL_SUCCESS */
- return 1;
-}
-#endif /* OPENSSLEXTRA */
-
-
-/* Padding scheme function used in wolfSSL for signing needed for matching
- existing API signing scheme
- input : the msg to be signed
- inputLen : length of input msg
- pkcsBlock : the outputted padded msg
- pkcsBlockLen : length of outputted padded msg buffer
- padValue : the padded value after first 00 , is either 01 or 02
- rng : random number generator structure
- */
-static int wc_RsaPad(const byte* input, word32 inputLen, byte* pkcsBlock,
- word32 pkcsBlockLen, byte padValue, WC_RNG* rng)
-{
- if (inputLen == 0 || pkcsBlockLen == 0) {
- return USER_CRYPTO_ERROR;
- }
-
- pkcsBlock[0] = 0x0; /* set first byte to zero and advance */
- pkcsBlock++; pkcsBlockLen--;
- pkcsBlock[0] = padValue; /* insert padValue */
-
- if (padValue == RSA_BLOCK_TYPE_1) {
- if (pkcsBlockLen < inputLen + 2) {
- return USER_CRYPTO_ERROR;
- }
-
- /* pad with 0xff bytes */
- XMEMSET(&pkcsBlock[1], 0xFF, pkcsBlockLen - inputLen - 2);
- }
- else {
- /* pad with non-zero random bytes */
- word32 padLen, i;
- int ret;
-
- if (pkcsBlockLen < inputLen + 1) {
- return USER_CRYPTO_ERROR;
- }
-
- padLen = pkcsBlockLen - inputLen - 1;
- ret = wc_RNG_GenerateBlock(rng, &pkcsBlock[1], padLen);
-
- if (ret != 0)
- return ret;
-
- /* remove zeros */
- for (i = 1; i < padLen; i++)
- if (pkcsBlock[i] == 0) pkcsBlock[i] = 0x01;
- }
-
- pkcsBlock[pkcsBlockLen-inputLen-1] = 0; /* separator */
- XMEMCPY(pkcsBlock+pkcsBlockLen-inputLen, input, inputLen);
-
- return 0;
-}
-
-
-/* UnPad plaintext, set start to *output, return length of plaintext,
- * < 0 on error */
-static int RsaUnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen,
- byte **output, byte padValue)
-{
- word32 maxOutputLen = (pkcsBlockLen > 10) ? (pkcsBlockLen - 10) : 0,
- invalid = 0,
- i = 1,
- outputLen;
-
- if (pkcsBlockLen == 0) {
- return USER_CRYPTO_ERROR;
- }
-
- if (pkcsBlock[0] != 0x0) /* skip past zero */
- invalid = 1;
- pkcsBlock++; pkcsBlockLen--;
-
- /* Require block type padValue */
- invalid = (pkcsBlock[0] != padValue) || invalid;
-
- /* verify the padding until we find the separator */
- if (padValue == RSA_BLOCK_TYPE_1) {
- while (i<pkcsBlockLen && pkcsBlock[i++] == 0xFF) {/* Null body */}
- }
- else {
- while (i<pkcsBlockLen && pkcsBlock[i++]) {/* Null body */}
- }
-
- if(!(i==pkcsBlockLen || pkcsBlock[i-1]==0)) {
- USER_DEBUG(("RsaUnPad error, bad formatting\n"));
- return USER_CRYPTO_ERROR;
- }
-
- outputLen = pkcsBlockLen - i;
- invalid = (outputLen > maxOutputLen) || invalid;
-
- if (invalid) {
- USER_DEBUG(("RsaUnPad error, bad formatting\n"));
- return USER_CRYPTO_ERROR;
- }
-
- *output = (byte *)(pkcsBlock + i);
- return outputLen;
-}
-
-
-/* Set up memory and structure for a Big Number
- * returns ippStsNoErr on success
- */
-static IppStatus init_bn(IppsBigNumState** in, int sz)
-{
- int ctxSz;
- IppStatus ret;
-
- ret = ippsBigNumGetSize(sz, &ctxSz);
- if (ret != ippStsNoErr) {
- return ret;
- }
-
- *in = (IppsBigNumState*)XMALLOC(ctxSz, 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (*in == NULL) {
- return ippStsNoMemErr;
- }
-
- ret = ippsBigNumInit(sz, *in);
- if (ret != ippStsNoErr) {
- XFREE(*in, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- *in = NULL;
- return ret;
- }
-
- return ippStsNoErr;
-}
-
-
-/* Set up memory and structure for a Montgomery struct
- * returns ippStsNoErr on success
- */
-static IppStatus init_mont(IppsMontState** mont, int* ctxSz,
- IppsBigNumState* modul)
-{
- int mSz;
- Ipp32u* m;
- IppStatus ret;
-
- ret = ippsExtGet_BN(NULL, ctxSz, NULL, modul);
- if (ret != ippStsNoErr) {
- return ret;
- }
-
- /* convert bits to Ipp32u array size and round up
- 32 is number of bits in type */
- mSz = (*ctxSz/32)+((*ctxSz % 32)? 1: 0);
- m = (Ipp32u*)XMALLOC(mSz * sizeof(Ipp32u), 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (m == NULL) {
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return ippStsNoMemErr;
- }
-
- ret = ippsExtGet_BN(NULL, NULL, m, modul);
- if (ret != ippStsNoErr) {
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return ret;
- }
-
- ret = ippsMontGetSize(IppsSlidingWindows, mSz, ctxSz);
- if (ret != ippStsNoErr) {
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return ret;
- }
-
- /* 2. Allocate working buffer using malloc */
- *mont = (IppsMontState*)XMALLOC(*ctxSz, 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (*mont == NULL) {
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return ippStsNoMemErr;
- }
- ret = ippsMontInit(IppsSlidingWindows, mSz, *mont);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsMontInit error of %s\n", ippGetStatusString(ret)));
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(*mont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- *mont = NULL;
- return ret;
- }
-
- /* 3. Call the function MontSet to set big number module */
- ret = ippsMontSet(m, mSz, *mont);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsMontSet error of %s\n", ippGetStatusString(ret)));
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(*mont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- *mont = NULL;
- return ret;
- }
-
- XFREE(m, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return ippStsNoErr;
-}
-
-
-
-int wc_FreeRsaKey(RsaKey* key)
-{
- if (key == NULL)
- return 0;
-
- USER_DEBUG(("Entering wc_FreeRsaKey\n"));
-
- if (key->pPub != NULL) {
- XFREE(key->pPub, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->pPub = NULL;
- }
-
- if (key->pPrv != NULL) {
- /* write over sensitive information */
- ForceZero(key->pPrv, key->prvSz);
- XFREE(key->pPrv, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->pPrv = NULL;
- }
-
- if (key->n != NULL) {
- XFREE(key->n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->n = NULL;
- }
-
- if (key->e != NULL) {
- XFREE(key->e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->e = NULL;
- }
-
- if (key->dipp != NULL) {
- XFREE(key->dipp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->dipp = NULL;
- }
-
- if (key->pipp != NULL) {
- XFREE(key->pipp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->pipp = NULL;
- }
-
- if (key->qipp != NULL) {
- XFREE(key->qipp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->qipp = NULL;
- }
-
- if (key->dPipp != NULL) {
- XFREE(key->dPipp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->dPipp = NULL;
- }
-
- if (key->dQipp != NULL) {
- XFREE(key->dQipp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->dQipp = NULL;
- }
-
- if (key->uipp != NULL) {
- XFREE(key->uipp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- key->uipp = NULL;
- }
-
- USER_DEBUG(("\tExit wc_FreeRsaKey\n"));
- (void)key;
-
- return 0;
-}
-
-
-/* Some parsing functions from wolfSSL code needed to match wolfSSL API used */
-static int GetLength(const byte* input, word32* inOutIdx, int* len,
- word32 maxIdx)
-{
- int length = 0;
- word32 idx = *inOutIdx;
- byte b;
-
- *len = 0; /* default length */
-
- if ((idx + 1) > maxIdx) { /* for first read */
- USER_DEBUG(("GetLength bad index on input\n"));
- return USER_CRYPTO_ERROR;
- }
-
- b = input[idx++];
- if (b >= 0x80) {
- word32 bytes = b & 0x7F;
-
- if ((idx + bytes) > maxIdx) { /* for reading bytes */
- USER_DEBUG(("GetLength bad long length\n"));
- return USER_CRYPTO_ERROR;
- }
-
- while (bytes--) {
- b = input[idx++];
- length = (length << 8) | b;
- }
- }
- else
- length = b;
-
- if ((idx + length) > maxIdx) { /* for user of length */
- USER_DEBUG(("GetLength value exceeds buffer length\n"));
- return USER_CRYPTO_ERROR;
- }
-
- *inOutIdx = idx;
- if (length > 0)
- *len = length;
-
- return length;
-}
-
-static int GetASNHeader(const byte* input, byte tag, word32* inOutIdx, int* len,
- word32 maxIdx)
-{
- word32 idx = *inOutIdx;
- byte b;
- int length;
-
- if ((idx + 1) > maxIdx)
- return USER_CRYPTO_ERROR;
-
- b = input[idx++];
- if (b != tag)
- return USER_CRYPTO_ERROR;
-
- if (GetLength(input, &idx, &length, maxIdx) < 0)
- return USER_CRYPTO_ERROR;
-
- *len = length;
- *inOutIdx = idx;
- return length;
-}
-
-static int GetASNInt(const byte* input, word32* inOutIdx, int* len,
- word32 maxIdx)
-{
- int ret;
-
- ret = GetASNHeader(input, ASN_INTEGER, inOutIdx, len, maxIdx);
- if (ret < 0)
- return ret;
-
- if (*len > 0) {
- /* remove leading zero, unless there is only one 0x00 byte */
- if ((input[*inOutIdx] == 0x00) && (*len > 1)) {
- (*inOutIdx)++;
- (*len)--;
-
- if (*len > 0 && (input[*inOutIdx] & 0x80) == 0)
- return USER_CRYPTO_ERROR;
- }
- }
-
- return 0;
-}
-
-static int GetInt(IppsBigNumState** mpi, const byte* input, word32* inOutIdx,
- word32 maxIdx)
-{
- IppStatus ret;
- word32 idx = *inOutIdx;
- int length;
- int ctxSz;
-
- if (GetASNInt(input, &idx, &length, maxIdx) < 0) {
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsBigNumGetSize(length, &ctxSz);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- *mpi = (IppsBigNumState*)XMALLOC(ctxSz, 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (*mpi == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsBigNumInit(length, *mpi);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- ret = ippsSetOctString_BN((Ipp8u*)input + idx, length, *mpi);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- *inOutIdx = idx + length;
- return 0;
-}
-
-
-static int GetSequence(const byte* input, word32* inOutIdx, int* len,
- word32 maxIdx)
-{
- int length = -1;
- word32 idx = *inOutIdx;
-
- if ((idx + 1) > maxIdx)
- return USER_CRYPTO_ERROR;
-
- if (input[idx++] != (0x10 | 0x20) ||
- GetLength(input, &idx, &length, maxIdx) < 0)
- return USER_CRYPTO_ERROR;
-
- *len = length;
- *inOutIdx = idx;
-
- return length;
-}
-
-
-static int GetMyVersion(const byte* input, word32* inOutIdx,
- int* version, word32 maxIdx)
-{
- word32 idx = *inOutIdx;
-
- if ((idx + 3) > maxIdx)
- return USER_CRYPTO_ERROR;
-
- if (input[idx++] != 0x02)
- return USER_CRYPTO_ERROR;
-
- if (input[idx++] != 0x01)
- return USER_CRYPTO_ERROR;
-
- *version = input[idx++];
- *inOutIdx = idx;
-
- return *version;
-}
-
-
-int wc_RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key,
- word32 inSz)
-{
- int version, length;
- int ctxSz, pSz, qSz;
- IppStatus ret;
-
- if (input == NULL || inOutIdx == NULL || key == NULL) {
- return USER_CRYPTO_ERROR;
- }
-
- USER_DEBUG(("Entering wc_RsaPrivateKeyDecode\n"));
-
- /* read in key information */
- if (GetSequence(input, inOutIdx, &length, inSz) < 0)
- return USER_CRYPTO_ERROR;
-
- if (GetMyVersion(input, inOutIdx, &version, inSz) < 0)
- return USER_CRYPTO_ERROR;
-
- key->type = RSA_PRIVATE;
-
- if (GetInt(&key->n, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->e, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->dipp, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->pipp, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->qipp, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->dPipp, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->dQipp, input, inOutIdx, inSz) < 0 ||
- GetInt(&key->uipp, input, inOutIdx, inSz) < 0 )
- return USER_CRYPTO_ERROR;
-
- /* get sizes of IPP BN key states created from input */
- ret = ippsGetSize_BN(key->n, &key->nSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsGetSize_BN(key->e, &key->eSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->sz = key->nSz; /* set modulus size */
-
- /* convert to size in bits */
- key->nSz = key->nSz * 8;
- key->eSz = key->eSz * 8;
-
- /* set up public key state */
- ret = ippsRSA_GetSizePublicKey(key->nSz, key->eSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->pPub = (IppsRSAPublicKeyState*)XMALLOC(ctxSz, NULL,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPub == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSA_InitPublicKey(key->nSz, key->eSz, key->pPub, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsRSA_SetPublicKey(key->n, key->e, key->pPub);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_SetPublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* get bn sizes needed for private key set up */
- ret = ippsGetSize_BN(key->pipp, &pSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsGetSize_BN(key->qipp, &qSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* store sizes needed for creating tmp private keys */
- ret = ippsGetSize_BN(key->dipp, &key->dSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* convert to size in bits */
- key->dSz = key->dSz * 8;
- pSz = pSz * 8;
- qSz = qSz * 8;
-
- /* set up private key state */
- ret = ippsRSA_GetSizePrivateKeyType2(pSz, qSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->prvSz = ctxSz;
- key->pPrv = (IppsRSAPrivateKeyState*)XMALLOC(ctxSz, 0,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPrv == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSA_InitPrivateKeyType2(pSz, qSz, key->pPrv, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsRSA_SetPrivateKeyType2(key->pipp, key->qipp, key->dPipp,
- key->dQipp, key->uipp, key->pPrv);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_SetPrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- USER_DEBUG(("\tExit wc_RsaPrivateKeyDecode\n"));
-
- return 0;
-}
-
-
-int wc_RsaPublicKeyDecode_ex(const byte* input, word32* inOutIdx,
- word32 inSz, const byte** n, word32* nSz, const byte** e, word32* eSz)
-{
- IppStatus ret = 0;
- int length;
-#if defined(OPENSSL_EXTRA) || defined(RSA_DECODE_EXTRA)
- byte b;
-#endif
-
- if (input == NULL || inOutIdx == NULL) {
- return USER_CRYPTO_ERROR;
- }
-
- USER_DEBUG(("Entering wc_RsaPublicKeyDecode_ex\n"));
-
- if (GetSequence(input, inOutIdx, &length, inSz) < 0)
- return USER_CRYPTO_ERROR;
-
-#if defined(OPENSSL_EXTRA) || defined(RSA_DECODE_EXTRA)
- if ((*inOutIdx + 1) > inSz)
- return USER_CRYPTO_ERROR;
-
- b = input[*inOutIdx];
- if (b != ASN_INTEGER) {
- /* not from decoded cert, will have algo id, skip past */
- if (GetSequence(input, inOutIdx, &length, inSz) < 0)
- return USER_CRYPTO_ERROR;
-
- b = input[(*inOutIdx)++];
- if (b != ASN_OBJECT_ID)
- return USER_CRYPTO_ERROR;
-
- if (GetLength(input, inOutIdx, &length, inSz) < 0)
- return USER_CRYPTO_ERROR;
-
- *inOutIdx += length; /* skip past */
-
- /* could have NULL tag and 0 terminator, but may not */
- b = input[(*inOutIdx)++];
-
- if (b == ASN_TAG_NULL) {
- b = input[(*inOutIdx)++];
- if (b != 0)
- return USER_CRYPTO_ERROR;
- }
- else {
- /* go back, didn't have it */
- (*inOutIdx)--;
- }
-
- /* should have bit tag length and seq next */
- b = input[(*inOutIdx)++];
- if (b != ASN_BIT_STRING)
- return USER_CRYPTO_ERROR;
-
- if (GetLength(input, inOutIdx, &length, inSz) <= 0)
- return USER_CRYPTO_ERROR;
-
- /* could have 0 */
- b = input[(*inOutIdx)++];
- if (b != 0)
- (*inOutIdx)--;
-
- if (GetSequence(input, inOutIdx, &length, inSz) < 0)
- return USER_CRYPTO_ERROR;
- }
-#endif /* OPENSSL_EXTRA || RSA_DECODE_EXTRA */
-
- /* Get modulus */
- ret = GetASNInt(input, inOutIdx, &length, inSz);
- if (ret < 0) {
- return USER_CRYPTO_ERROR;
- }
- if (nSz)
- *nSz = length;
- if (n)
- *n = &input[*inOutIdx];
- *inOutIdx += length;
-
- /* Get exponent */
- ret = GetASNInt(input, inOutIdx, &length, inSz);
- if (ret < 0) {
- return USER_CRYPTO_ERROR;
- }
- if (eSz)
- *eSz = length;
- if (e)
- *e = &input[*inOutIdx];
- *inOutIdx += length;
-
- USER_DEBUG(("\tExit wc_RsaPublicKeyDecode_ex\n"));
-
- return ret;
-}
-
-/* read in a public RSA key */
-int wc_RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key,
- word32 inSz)
-{
- IppStatus ret;
- const byte *n = NULL, *e = NULL;
- word32 nSz = 0, eSz = 0;
-
- if (key == NULL)
- return USER_CRYPTO_ERROR;
-
- USER_DEBUG(("Entering wc_RsaPublicKeyDecode\n"));
-
- ret = wc_RsaPublicKeyDecode_ex(input, inOutIdx, inSz, &n, &nSz, &e, &eSz);
- if (ret == 0) {
- ret = wc_RsaPublicKeyDecodeRaw(n, nSz, e, eSz, key);
- }
-
- USER_DEBUG(("\tExit RsaPublicKeyDecode\n"));
-
- return ret;
-}
-
-/* import RSA public key elements (n, e) into RsaKey structure (key) */
-int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e,
- word32 eSz, RsaKey* key)
-{
- IppStatus ret;
- int ctxSz;
-
- USER_DEBUG(("Entering wc_RsaPublicKeyDecodeRaw\n"));
-
- if (n == NULL || e == NULL || key == NULL)
- return USER_CRYPTO_ERROR;
-
- /* set up IPP key states -- read in n */
- ret = init_bn(&key->n, nSz);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- ret = ippsSetOctString_BN((Ipp8u*)n, nSz, key->n);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- /* read in e */
- ret = init_bn(&key->e, eSz);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- ret = ippsSetOctString_BN((Ipp8u*)e, eSz, key->e);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- /* store size and convert to binary */
- key->sz = nSz;
- nSz = nSz * 8;
- eSz = eSz * 8;
-
- /* set up public key state */
- ret = ippsRSA_GetSizePublicKey(nSz, eSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->pPub = (IppsRSAPublicKeyState*)XMALLOC(ctxSz, NULL,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPub == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSA_InitPublicKey(nSz, eSz, key->pPub, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsRSA_SetPublicKey(key->n,key->e, key->pPub);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_SetPublicKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- key->nSz = nSz;
- key->eSz = eSz;
- key->type = RSA_PUBLIC;
-
- return 0;
-}
-
-
-/* encrypt using PKCS v15 */
-int wc_RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, word32 outLen,
- RsaKey* key, WC_RNG* rng)
-{
- IppStatus ret;
- Ipp8u* scratchBuffer;
- int scratchSz;
-
- if (key == NULL || in == NULL || out == NULL)
- return USER_CRYPTO_ERROR;
-
- if (key->pPub == NULL || outLen < key->sz)
- return USER_CRYPTO_ERROR;
-
- /* set size of scratch buffer */
- ret = ippsRSA_GetBufferSizePublicKey(&scratchSz, key->pPub);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- scratchBuffer = (Ipp8u*)XMALLOC(scratchSz*(sizeof(Ipp8u)), 0,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (scratchBuffer == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSAEncrypt_PKCSv15((Ipp8u*)in, inLen, NULL, (Ipp8u*)out,
- key->pPub, scratchBuffer);
- if (ret != ippStsNoErr) {
- XFREE(scratchBuffer, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- USER_DEBUG(("encrypt error of %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- XFREE(scratchBuffer, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- (void)rng;
- return key->sz;
-}
-
-
-/* decrypt using PLCS v15 */
-int wc_RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, word32 outLen,
- RsaKey* key)
-{
- IppStatus ret;
- Ipp8u* scratchBuffer;
- int scratchSz;
- int outSz;
-
- if (in == NULL || out == NULL || key == NULL)
- return USER_CRYPTO_ERROR;
-
- if (key->pPrv == NULL || inLen != key->sz)
- return USER_CRYPTO_ERROR;
-
- outSz = outLen;
-
- /* set size of scratch buffer */
- ret = ippsRSA_GetBufferSizePrivateKey(&scratchSz, key->pPrv);
- if (ret != ippStsNoErr) {
- return USER_CRYPTO_ERROR;
- }
-
- scratchBuffer = (Ipp8u*)XMALLOC(scratchSz*(sizeof(Ipp8u)), 0,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (scratchBuffer == NULL) {
- return USER_CRYPTO_ERROR;
- }
-
- /* perform decryption using IPP */
- ret = ippsRSADecrypt_PKCSv15((Ipp8u*)in, (Ipp8u*)out, &outSz, key->pPrv,
- scratchBuffer);
- if (ret != ippStsNoErr) {
- XFREE(scratchBuffer, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- USER_DEBUG(("decrypt error of %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- XFREE(scratchBuffer, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return outSz;
-}
-
-
-/* out is a pointer that is set to the location in byte array "in" where input
- data has been decrypted */
-int wc_RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out, RsaKey* key)
-{
- int outSz;
- byte* tmp;
-
- USER_DEBUG(("Entering wc_RsaPrivateDecryptInline\n"));
-
- /* allocate a buffer for max decrypted text */
- tmp = (byte*)XMALLOC(key->sz, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (tmp == NULL)
- return USER_CRYPTO_ERROR;
-
- outSz = wc_RsaPrivateDecrypt(in, inLen, tmp, key->sz, key);
- if (outSz >= 0) {
- XMEMCPY(in, tmp, outSz);
- *out = in;
- }
- else {
- XFREE(tmp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return USER_CRYPTO_ERROR;
- }
-
- XFREE(tmp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- USER_DEBUG(("\tExit wc_RsaPrivateDecryptInline\n"));
-
- return outSz;
-}
-
-
-/* Used to clean up memory when exiting, clean up memory used */
-static int FreeHelper(IppsBigNumState* pTxt, IppsBigNumState* cTxt,
- Ipp8u* scratchBuffer, void* pPub)
-{
- if (pTxt != NULL)
- XFREE(pTxt, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (cTxt != NULL)
- XFREE(cTxt, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (scratchBuffer != NULL)
- XFREE(scratchBuffer, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (pPub != NULL)
- XFREE(pPub, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return 0;
-}
-
-
-/* for Rsa Verify
- in : byte array to be verified
- inLen : length of input array
- out : pointer to location of in byte array that has been verified
- */
-int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key)
-{
-
- int ctxSz;
- int scratchSz;
- Ipp8u* scratchBuffer = NULL;
- IppStatus ret;
- IppsRSAPrivateKeyState* pPub = NULL;
- IppsBigNumState* pTxt = NULL;
- IppsBigNumState* cTxt = NULL;
-
- USER_DEBUG(("Entering wc_RsaSSL_VerifyInline\n"));
-
- if (key == NULL || key->n == NULL || key->e == NULL) {
- USER_DEBUG(("n or e element was null\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (in == NULL || inLen == 0 || out == NULL)
- return USER_CRYPTO_ERROR;
-
- /* set up a private key state using public key values */
- ret = ippsRSA_GetSizePrivateKeyType1(key->nSz, key->eSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- pPub = (IppsRSAPrivateKeyState*)XMALLOC(ctxSz, 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (pPub == NULL)
- return USER_CRYPTO_ERROR;
-
- ret = ippsRSA_InitPrivateKeyType1(key->nSz, key->eSz, pPub, ctxSz);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- USER_DEBUG(("ippsRSA_InitPrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsRSA_SetPrivateKeyType1(key->n, key->e, pPub);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- USER_DEBUG(("ippsRSA_SetPrivateKey error %s\n",
- ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* set size of scratch buffer */
- ret = ippsRSA_GetBufferSizePrivateKey(&scratchSz, pPub);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- return USER_CRYPTO_ERROR;
- }
-
- scratchBuffer = (Ipp8u*)XMALLOC(scratchSz*(sizeof(Ipp8u)), 0,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (scratchBuffer == NULL) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- return USER_CRYPTO_ERROR;
- }
-
- /* load plain and cipher into big num states */
- ret = init_bn(&pTxt, key->sz);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- return USER_CRYPTO_ERROR;
- }
- ret = ippsSetOctString_BN((Ipp8u*)in, key->sz, pTxt);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- return USER_CRYPTO_ERROR;
- }
-
- /* set up cipher to hold signature */
- ret = init_bn(&cTxt, key->sz);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- return USER_CRYPTO_ERROR;
- }
- ret = ippsSetOctString_BN((Ipp8u*)in, key->sz, cTxt);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- return USER_CRYPTO_ERROR;
- }
-
- /* decrypt using public key information */
- ret = ippsRSA_Decrypt(cTxt, pTxt, pPub, scratchBuffer);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- USER_DEBUG(("decrypt error of %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- /* extract big num struct to octet string */
- ret = ippsGetOctString_BN((Ipp8u*)in, key->sz, pTxt);
- if (ret != ippStsNoErr) {
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
- USER_DEBUG(("BN get string error of %s\n", ippGetStatusString(ret)));
- return USER_CRYPTO_ERROR;
- }
-
- FreeHelper(pTxt, cTxt, scratchBuffer, pPub);
-
- /* unpad the decrypted information and return size of array */
- return RsaUnPad(in, inLen, out, RSA_BLOCK_TYPE_1);
-}
-
-
-/* sets up and call VerifyInline to verify a signature */
-int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen,
- RsaKey* key)
-{
- int plainLen;
- byte* tmp;
- byte* pad = 0;
-
- if (out == NULL || in == NULL || key == NULL)
- return USER_CRYPTO_ERROR;
-
- tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_USER_CRYPTO);
- if (tmp == NULL) {
- return USER_CRYPTO_ERROR;
- }
-
- XMEMCPY(tmp, in, inLen);
-
- /* verify signature and test if output buffer is large enough */
- plainLen = wc_RsaSSL_VerifyInline(tmp, inLen, &pad, key);
- if (plainLen < 0) {
- XFREE(tmp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return plainLen;
- }
-
- if (plainLen > (int)outLen)
- plainLen = USER_CRYPTO_ERROR;
- else
- XMEMCPY(out, pad, plainLen);
-
- ForceZero(tmp, inLen);
- XFREE(tmp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- return plainLen;
-}
-
-
-/* Check if a > b , if so c = a mod b
- return ippStsNoErr on success */
-static IppStatus reduce(IppsBigNumState* a, IppsBigNumState* b,
- IppsBigNumState* c)
-{
- IppStatus ret;
-
- if ((ret = ippsMod_BN(a, b, c)) != ippStsNoErr)
- return ret;
-
- return ippStsNoErr;
-}
-
-
-static IppStatus exptmod(IppsBigNumState* a, IppsBigNumState* b,
- IppsMontState* mont, IppsBigNumState* out, IppsBigNumState* one)
-{
- IppStatus ret;
-
- ret = ippsMontForm(a, mont, a);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsMontForm error of %s\n", ippGetStatusString(ret)));
- return ret;
- }
-
- /* a = a^b mod mont */
- ret = ippsMontExp(a, b, mont, out);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsMontExp error of %s\n", ippGetStatusString(ret)));
- return ret;
- }
-
- /* convert back from montgomery */
- ret = ippsMontMul(out, one, mont, out);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsMontMul error of %s\n", ippGetStatusString(ret)));
- return ret;
- }
-
- return ippStsNoErr;
-}
-
-
-static void Free_BN(IppsBigNumState* bn)
-{
- int sz, ctxSz;
- IppStatus ret;
-
- if (bn != NULL) {
- ret = ippStsNoErr;
- ret |= ippsGetSize_BN(bn, &sz);
- ret |= ippsBigNumGetSize(sz, &ctxSz);
- if (ret == ippStsNoErr) {
- ForceZero(bn, ctxSz);
- }
- else {
- USER_DEBUG(("Issue with clearing a struct in RsaSSL_Sign free\n"));
- }
- XFREE(bn, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- }
-}
-
-
-/* free up memory used during CRT sign operation */
-static void FreeSignHelper(IppsBigNumState* one, IppsBigNumState* tmp,
- IppsBigNumState* tmpP, IppsBigNumState* tmpQ, IppsBigNumState* tmpa,
- IppsBigNumState* tmpb)
-{
- Free_BN(one);
- Free_BN(tmp);
- Free_BN(tmpP);
- Free_BN(tmpQ);
- Free_BN(tmpa);
- Free_BN(tmpb);
-}
-
-
-/* for Rsa Sign */
-int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out, word32 outLen,
- RsaKey* key, WC_RNG* rng)
-{
- int sz, pSz, qSz;
- IppStatus ret;
- word32 outSz;
-
- IppsMontState* pMont = NULL;
- IppsMontState* qMont = NULL;
-
- IppsBigNumState* one = NULL;
- IppsBigNumState* tmp = NULL;
- IppsBigNumState* tmpP = NULL;
- IppsBigNumState* tmpQ = NULL;
- IppsBigNumState* tmpa = NULL;
- IppsBigNumState* tmpb = NULL;
-
- IppsBigNumSGN sa, sb;
-
- Ipp8u o[1];
- o[0] = 1;
-
- USER_DEBUG(("Entering wc_RsaSSL_Sign\n"));
-
- if (in == NULL || out == NULL || key == NULL || rng == NULL) {
- USER_DEBUG(("Bad argument to wc_RsaSSL_Sign\n"));
- return USER_CRYPTO_ERROR;
- }
-
- sz = key->sz;
-
-
- /* sanity check on key being used */
- if (key->pipp == NULL || key->qipp == NULL || key->uipp == NULL ||
- key->dPipp == NULL || key->dQipp == NULL) {
- USER_DEBUG(("Bad key argument to wc_RsaSSL_Sign\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (sz > (int)outLen) {
- USER_DEBUG(("Bad argument outLen to wc_RsaSSL_Sign\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (sz < RSA_MIN_PAD_SZ) {
- USER_DEBUG(("Key size is too small\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (inLen > (word32)(sz - RSA_MIN_PAD_SZ)) {
- USER_DEBUG(("Bad argument inLen to wc_RsaSSL_Sign\n"));
- return USER_CRYPTO_ERROR;
- }
-
- /* Set up needed pkcs v15 padding */
- if (wc_RsaPad(in, inLen, out, sz, RSA_BLOCK_TYPE_1, rng) != 0) {
- USER_DEBUG(("RSA Padding error\n"));
- return USER_CRYPTO_ERROR;
- }
-
- /* tmp = input to sign */
- ret = init_bn(&tmp, sz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_BN error of %s\n", ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
- ret = ippsSetOctString_BN(out, sz, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsSetOctString_BN error of %s\n",
- ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmpP = tmp mod p */
- ret = init_bn(&tmpP, sz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_BN error of %s\n", ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmpQ = tmp mod q */
- ret = init_bn(&tmpQ, sz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_BN error of %s\n", ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmpa */
- ret = init_bn(&tmpa, sz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_BN error of %s\n", ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmpb */
- ret = init_bn(&tmpb, sz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_BN error of %s\n", ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* one : used for conversion from Montgomery to classical */
- ret = init_bn(&one, sz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_BN error of %s\n", ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
- ret = ippsSetOctString_BN(o, 1, one);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsSetOctString_BN error of %s\n",
- ippGetStatusString(ret)));
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /**
- Set up Montgomery state
- */
- ret = init_mont(&pMont, &pSz, key->pipp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_mont error of %s\n", ippGetStatusString(ret)));
- if (pMont != NULL) {
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- }
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- ret = init_mont(&qMont, &qSz, key->qipp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("init_mont error of %s\n", ippGetStatusString(ret)));
- if (qMont != NULL) {
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- }
- ForceZero(pMont, pSz);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /**
- Check and reduce input
- This is needed for calls to MontExp since required value of a < modulus
- */
- ret = reduce(tmp, key->pipp, tmpP);
- if (ret != ippStsNoErr)
- {
- USER_DEBUG(("reduce error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- ret = reduce(tmp, key->qipp, tmpQ);
- if (ret != ippStsNoErr)
- {
- USER_DEBUG(("reduce error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmpa = (tmp mod p)^dP mod p */
- ret = exptmod(tmpP, key->dPipp, pMont, tmpa, one);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("exptmod error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmpb = (tmp mod q)^dQ mod q */
- ret = exptmod(tmpQ, key->dQipp, qMont, tmpb, one);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("exptmod error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* tmp = (tmpa - tmpb) * qInv (mod p) */
- ret = ippsSub_BN(tmpa, tmpb, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsSub_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- ret = ippsMul_BN(tmp, key->uipp, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsMul_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* mod performed the same was as wolfSSL fp_mod -- tmpa is just scratch */
- ret = ippsDiv_BN(tmp, key->pipp, tmpa, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsDiv_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* Check sign of values and perform conditional add */
- ret = ippsExtGet_BN(&sa, NULL, NULL, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsExtGet_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
- ret = ippsExtGet_BN(&sb, NULL, NULL, key->pipp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsExtGet_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
- if (sa != sb) {
- ret = ippsAdd_BN(tmp, key->pipp, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsAdd_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
- }
-
- /* tmp = tmpb + q * tmp */
- ret = ippsMul_BN(tmp, key->qipp, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsSub_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
-
- ret = ippsAdd_BN(tmp, tmpb, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsSub_BN error of %s\n", ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- /* Extract the output */
- ret = ippsGetOctString_BN(out, sz, tmp);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetOctString_BN error of %s\n",
- ippGetStatusString(ret)));
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
- return USER_CRYPTO_ERROR;
- }
-
- outSz = sz;
-
- /* clear memory and free */
- ForceZero(pMont, pSz);
- ForceZero(qMont, qSz);
- XFREE(qMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pMont, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- FreeSignHelper(one, tmp, tmpP, tmpQ, tmpa, tmpb);
-
- return outSz;
-}
-
-
-int wc_RsaEncryptSize(RsaKey* key)
-{
- if (key == NULL)
- return 0;
-
- return key->sz;
-}
-
-
-/* flatten RsaKey structure into individual elements (e, n) */
-int wc_RsaFlattenPublicKey(RsaKey* key, byte* e, word32* eSz, byte* n,
- word32* nSz)
-{
- int sz, bytSz;
- IppStatus ret;
-
- USER_DEBUG(("Entering wc_RsaFlattenPublicKey\n"));
-
- if (key == NULL || e == NULL || eSz == NULL || n == NULL || nSz == NULL)
- return USER_CRYPTO_ERROR;
-
- bytSz = sizeof(byte) * 8;
- ret = ippsExtGet_BN(NULL, &sz, NULL, key->e);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- /* sz is in bits change to bytes */
- sz = (sz / bytSz) + ((sz % bytSz)? 1 : 0);
-
- if (*eSz < (word32)sz)
- return USER_CRYPTO_ERROR;
-
- ret = ippsGetOctString_BN(e, sz, key->e);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- *eSz = (word32)sz;
-
- /* flatten n */
- ret = ippsExtGet_BN(NULL, &sz, NULL, key->n);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- /* sz is in bits change to bytes */
- sz = (sz / bytSz) + ((sz % bytSz)? 1: 0);
-
- if (*nSz < (word32)sz)
- return USER_CRYPTO_ERROR;
-
- ret = ippsGetOctString_BN(n, sz, key->n);
- if (ret != ippStsNoErr)
- return USER_CRYPTO_ERROR;
-
- *nSz = (word32)sz;
-
- return 0;
-}
-
-
-IppStatus wolfSSL_rng(Ipp32u* pData, int nBits, void* pEbsParams);
-IppStatus wolfSSL_rng(Ipp32u* pData, int nBits, void* pEbsParams)
-{
- int nBytes;
-
- if (pData == NULL) {
- USER_DEBUG(("error with wolfSSL_rng argument\n"));
- return ippStsErr;
- }
-
- nBytes = (nBits/8) + ((nBits % 8)? 1: 0);
- if (wc_RNG_GenerateBlock((WC_RNG*)pEbsParams, (byte*)pData, nBytes) != 0) {
- USER_DEBUG(("error in generating random wolfSSL block\n"));
- return ippStsErr;
- }
-
- return ippStsNoErr;
-}
-
-
-#ifdef WOLFSSL_KEY_GEN
-/* Make an RSA key for size bits, with e specified, 65537 is a good e */
-int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
-{
- IppStatus ret;
- int scratchSz;
- int i; /* for tries on calling make key */
- int ctxSz;
-
- IppsBigNumState* pSrcPublicExp = NULL;
- Ipp8u* scratchBuffer = NULL;
- Ipp8u eAry[8];
- int trys = 8; /* Miller-Rabin test parameter */
- IppsPrimeState* pPrime = NULL;
-
- int qBitSz; /* size of q factor */
- int bytSz; /* size of key in bytes */
- int leng;
-
- USER_DEBUG(("Entering wc_MakeRsaKey\n"));
-
- /* get byte size and individual private key size -- round up */
- qBitSz = (size / 2) + ((size % 2)? 1: 0);
- bytSz = (size / 8) + ((size % 8)? 1: 0);
-
- if (key == NULL || rng == NULL) {
- USER_DEBUG(("Error, NULL argument passed in\n"));
- return USER_CRYPTO_ERROR;
- }
-
- if (e < 3 || (e&1) == 0)
- return USER_CRYPTO_ERROR;
-
- if (size > RSA_MAX_SIZE || size < RSA_MIN_SIZE)
- return USER_CRYPTO_ERROR;
-
- key->type = RSA_PRIVATE;
- key->sz = bytSz;
-
- /* initialize prime number */
- ret = ippsPrimeGetSize(size, &ctxSz); /* size in bits */
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsPrimeGetSize error of %s\n", ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- pPrime = (IppsPrimeState*)XMALLOC(ctxSz, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (pPrime == NULL) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- ret = ippsPrimeInit(size, pPrime);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsPrimeInit error of %s\n", ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* define RSA privete key type 2 */
- /* length in bits of p and q factors */
- ret = ippsRSA_GetSizePrivateKeyType2(qBitSz, qBitSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePrivateKeyType2 error of %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- key->prvSz = ctxSz; /* used when freeing private key */
- key->pPrv = (IppsRSAPrivateKeyState*)XMALLOC(ctxSz, NULL,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPrv == NULL) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* length in bits of p and q factors */
- ret = ippsRSA_InitPrivateKeyType2(qBitSz, qBitSz, key->pPrv, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPrivateKeyType2 error of %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* allocate scratch buffer */
- ret = ippsRSA_GetBufferSizePrivateKey(&scratchSz, key->pPrv);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetBufferSizePrivateKey error of %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- scratchBuffer = (Ipp8u*)XMALLOC(scratchSz, 0, DYNAMIC_TYPE_USER_CRYPTO);
- if (scratchBuffer == NULL) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* set up initial value of pScrPublicExp */
- leng = (int)sizeof(long); /* # of Ipp32u in long */
-
- /* place the value of e into the array eAry then load into BN */
- for (i = 0; i < leng; i++) {
- eAry[i] = (e >> (8 * (leng - 1 - i))) & 0XFF;
- }
- ret = init_bn(&pSrcPublicExp, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- ret = ippsSetOctString_BN(eAry, leng, pSrcPublicExp);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* initializing key->n */
- ret = init_bn(&key->n, bytSz);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* initializing public exponent key->e */
- ret = init_bn(&key->e, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* private exponent key->dipp */
- ret = init_bn(&key->dipp, bytSz);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* call IPP to generate keys, if insufficient entropy error call again */
- ret = ippStsInsufficientEntropy;
- while (ret == ippStsInsufficientEntropy) {
- ret = ippsRSA_GenerateKeys(pSrcPublicExp, key->n, key->e,
- key->dipp, key->pPrv, scratchBuffer, trys, pPrime,
- wolfSSL_rng, rng);
- if (ret == ippStsNoErr) {
- break;
- }
-
- /* catch all errors other than entropy error */
- if (ret != ippStsInsufficientEntropy) {
- USER_DEBUG(("ippsRSA_GeneratKeys error of %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
- }
-
- /* get bn sizes needed for private key set up */
- ret = ippsExtGet_BN(NULL, &key->eSz, NULL, key->e);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- ret = ippsExtGet_BN(NULL, &key->nSz, NULL, key->n);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsGetSize_BN error %s\n", ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* set up public key state */
- ret = ippsRSA_GetSizePublicKey(key->nSz, key->eSz, &ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetSizePublicKey error %s nSz = %d eSz = %d\n",
- ippGetStatusString(ret), key->nSz, key->eSz));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- key->pPub = (IppsRSAPublicKeyState*)XMALLOC(ctxSz, NULL,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (key->pPub == NULL) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- ret = ippsRSA_InitPublicKey(key->nSz, key->eSz, key->pPub, ctxSz);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_InitPublicKey error %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- ret = ippsRSA_SetPublicKey(key->n, key->e, key->pPub);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_SetPublicKey error %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* get private key information for key struct */
- leng = size/16; /* size of q, p, u, dP, dQ */
- ret = init_bn(&key->pipp, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* set up q BN for key */
- ret = init_bn(&key->qipp, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* set up dP BN for key */
- ret = init_bn(&key->dPipp, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* set up dQ BN for key */
- ret = init_bn(&key->dQipp, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* set up u BN for key */
- ret = init_bn(&key->uipp, leng);
- if (ret != ippStsNoErr) {
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
-
- /* get values from created key */
- ret = ippsRSA_GetPrivateKeyType2(key->pipp, key->qipp, key->dPipp,
- key->dQipp, key->uipp, key->pPrv);
- if (ret != ippStsNoErr) {
- USER_DEBUG(("ippsRSA_GetPrivateKeyType2 error %s\n",
- ippGetStatusString(ret)));
- ret = USER_CRYPTO_ERROR;
- goto makeKeyEnd;
- }
- ret = 0; /* success case */
-
-makeKeyEnd:
- /* clean up memory used */
- XFREE(pSrcPublicExp, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(scratchBuffer, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(pPrime, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-
- if (ret != 0) { /* with fail case free RSA components created */
- wc_FreeRsaKey(key);
- }
-
- return ret;
-}
-
-#endif
-
-#if defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA)
-
-/********** duplicate code needed -- future refactor */
-#define MAX_VERSION_SZ 5
-#define MAX_SEQ_SZ 5
-#define ASN_CONTEXT_SPECIFIC 0x80
-#define ASN_CONSTRUCTED 0x20
-#define ASN_LONG_LENGTH 0x80
-#define ASN_SEQUENCE 0x10
-#define RSA_INTS 8
-#define FALSE 0
-#define TRUE 1
-
-#define MAX_LENGTH_SZ 4
-#define RSAk 645
-#define keyType 2
-#define MAX_RSA_INT_SZ 517
-#define MAX_RSA_E_SZ 16
-#define MAX_ALGO_SZ 20
-
-static word32 BytePrecision(word32 value)
-{
- word32 i;
- for (i = sizeof(value); i; --i)
- if (value >> ((i - 1) * WOLFSSL_BIT_SIZE))
- break;
-
- return i;
-}
-
-
-static int SetMyVersion(word32 version, byte* output, int header)
-{
- int i = 0;
-
- if (output == NULL)
- return USER_CRYPTO_ERROR;
-
- if (header) {
- output[i++] = ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED;
- output[i++] = ASN_BIT_STRING;
- }
- output[i++] = ASN_INTEGER;
- output[i++] = 0x01;
- output[i++] = (byte)version;
-
- return i;
-}
-
-
-static word32 SetLength(word32 length, byte* output)
-{
- word32 i = 0, j;
-
- if (length < 0x80)
- output[i++] = (byte)length;
- else {
- output[i++] = (byte)(BytePrecision(length) | ASN_LONG_LENGTH);
-
- for (j = BytePrecision(length); j; --j) {
- output[i] = (byte)(length >> ((j - 1) * WOLFSSL_BIT_SIZE));
- i++;
- }
- }
-
- return i;
-}
-
-
-static word32 SetSequence(word32 len, byte* output)
-{
- output[0] = ASN_SEQUENCE | ASN_CONSTRUCTED;
- return SetLength(len, output + 1) + 1;
-}
-
-
-static word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz)
-{
- /* adding TAG_NULL and 0 to end */
-
- /* RSA keyType */
- #ifndef NO_RSA
- static const byte RSA_AlgoID[] = { 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
- 0x01, 0x01, 0x01, 0x05, 0x00};
- #endif /* NO_RSA */
-
- int algoSz = 0;
- int tagSz = 2; /* tag null and terminator */
- word32 idSz, seqSz;
- const byte* algoName = 0;
- byte ID_Length[MAX_LENGTH_SZ];
- byte seqArray[MAX_SEQ_SZ + 1]; /* add object_id to end */
-
- if (type == keyType) { /* keyType */
- switch (algoOID) {
- #ifndef NO_RSA
- case RSAk:
- algoSz = sizeof(RSA_AlgoID);
- algoName = RSA_AlgoID;
- break;
- #endif /* NO_RSA */
- default:
- /* unknown key algo */
- return 0;
- }
- }
- else {
- /* unknown algo type */
- return 0;
- }
-
- idSz = SetLength(algoSz - tagSz, ID_Length); /* don't include tags */
- seqSz = SetSequence(idSz + algoSz + 1 + curveSz, seqArray);
- /* +1 for object id, curveID of curveSz follows for ecc */
- seqArray[seqSz++] = ASN_OBJECT_ID;
-
- XMEMCPY(output, seqArray, seqSz);
- XMEMCPY(output + seqSz, ID_Length, idSz);
- XMEMCPY(output + seqSz + idSz, algoName, algoSz);
-
- return seqSz + idSz + algoSz;
-
-}
-
-
-/* Write a public RSA key to output */
-static int SetRsaPublicKey(byte* output, RsaKey* key,
- int outLen, int with_header)
-{
-#ifdef WOLFSSL_SMALL_STACK
- byte* n = NULL;
- byte* e = NULL;
-#else
- byte n[MAX_RSA_INT_SZ];
- byte e[MAX_RSA_E_SZ];
-#endif
- byte seq[MAX_SEQ_SZ];
- byte len[MAX_LENGTH_SZ + 1]; /* trailing 0 */
- int nSz;
- int eSz;
- int seqSz;
- int lenSz;
- int idx;
- int rawLen;
- int leadingBit;
- int err;
-
- if (output == NULL || key == NULL || outLen < MAX_SEQ_SZ)
- return USER_CRYPTO_ERROR;
-
- /* n */
-#ifdef WOLFSSL_SMALL_STACK
- n = (byte*)XMALLOC(MAX_RSA_INT_SZ, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (n == NULL)
- return USER_CRYPTO_ERROR;
-#endif
-
- leadingBit = wc_Rsa_leading_bit(key->n);
- rawLen = wc_Rsa_unsigned_bin_size(key->n);
- if ((int)rawLen < 0) {
- return USER_CRYPTO_ERROR;
- }
-
- rawLen = rawLen + leadingBit;
- n[0] = ASN_INTEGER;
- nSz = SetLength(rawLen, n + 1) + 1; /* int tag */
-
- if ( (nSz + rawLen) < MAX_RSA_INT_SZ) {
- if (leadingBit)
- n[nSz] = 0;
- err = ippsGetOctString_BN((Ipp8u*)n + nSz, rawLen - leadingBit, key->n);
- if (err == ippStsNoErr)
- nSz += rawLen;
- else {
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- return USER_CRYPTO_ERROR;
- }
- }
- else {
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- return USER_CRYPTO_ERROR;
- }
-
- /* e */
-#ifdef WOLFSSL_SMALL_STACK
- e = (byte*)XMALLOC(MAX_RSA_E_SZ, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (e == NULL) {
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- return USER_CRYPTO_ERROR;
- }
-#endif
-
- leadingBit = wc_Rsa_leading_bit(key->e);
- rawLen = wc_Rsa_unsigned_bin_size(key->e);
- if ((int)rawLen < 0) {
- return USER_CRYPTO_ERROR;
- }
-
- rawLen = rawLen + leadingBit;
- e[0] = ASN_INTEGER;
- eSz = SetLength(rawLen, e + 1) + 1; /* int tag */
-
- if ( (eSz + rawLen) < MAX_RSA_E_SZ) {
- if (leadingBit)
- e[eSz] = 0;
- err = ippsGetOctString_BN((Ipp8u*)e + eSz, rawLen - leadingBit, key->e);
- if (err == ippStsNoErr)
- eSz += rawLen;
- else {
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- return USER_CRYPTO_ERROR;
- }
- }
- else {
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- return USER_CRYPTO_ERROR;
- }
-
- seqSz = SetSequence(nSz + eSz, seq);
-
- /* check output size */
- if ( (seqSz + nSz + eSz) > outLen) {
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- return USER_CRYPTO_ERROR;
- }
-
- /* headers */
- if (with_header) {
- int algoSz;
-#ifdef WOLFSSL_SMALL_STACK
- byte* algo;
-
- algo = (byte*)XMALLOC(MAX_ALGO_SZ, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- if (algo == NULL) {
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- return USER_CRYPTO_ERROR;
- }
-#else
- byte algo[MAX_ALGO_SZ];
-#endif
- algoSz = SetAlgoID(RSAk, algo, keyType, 0);
- lenSz = SetLength(seqSz + nSz + eSz + 1, len);
- len[lenSz++] = 0; /* trailing 0 */
-
- /* write, 1 is for ASN_BIT_STRING */
- idx = SetSequence(nSz + eSz + seqSz + lenSz + 1 + algoSz, output);
-
- /* check output size */
- if ( (idx + algoSz + 1 + lenSz + seqSz + nSz + eSz) > outLen) {
- #ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(algo, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- #endif
-
- return USER_CRYPTO_ERROR;
- }
-
- /* algo */
- XMEMCPY(output + idx, algo, algoSz);
- idx += algoSz;
- /* bit string */
- output[idx++] = ASN_BIT_STRING;
- /* length */
- XMEMCPY(output + idx, len, lenSz);
- idx += lenSz;
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(algo, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
- }
- else
- idx = 0;
-
- /* seq */
- XMEMCPY(output + idx, seq, seqSz);
- idx += seqSz;
- /* n */
- XMEMCPY(output + idx, n, nSz);
- idx += nSz;
- /* e */
- XMEMCPY(output + idx, e, eSz);
- idx += eSz;
-
-#ifdef WOLFSSL_SMALL_STACK
- XFREE(n, NULL, DYNAMIC_TYPE_USER_CRYPTO);
- XFREE(e, NULL, DYNAMIC_TYPE_USER_CRYPTO);
-#endif
-
- return idx;
-}
-
-
-static IppsBigNumState* GetRsaInt(RsaKey* key, int idx)
-{
- if (idx == 0)
- return key->n;
- if (idx == 1)
- return key->e;
- if (idx == 2)
- return key->dipp;
- if (idx == 3)
- return key->pipp;
- if (idx == 4)
- return key->qipp;
- if (idx == 5)
- return key->dPipp;
- if (idx == 6)
- return key->dQipp;
- if (idx == 7)
- return key->uipp;
-
- return NULL;
-}
-
-
-/* Release Tmp RSA resources */
-static WC_INLINE void FreeTmpRsas(byte** tmps, void* heap)
-{
- int i;
-
- (void)heap;
-
- for (i = 0; i < RSA_INTS; i++)
- XFREE(tmps[i], heap, DYNAMIC_TYPE_USER_CRYPTO);
-}
-
-
-/* Convert RsaKey key to DER format, write to output (inLen), return bytes
- written */
-int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
-{
- word32 seqSz, verSz, rawLen, intTotalLen = 0;
- word32 sizes[RSA_INTS];
- int i, j, outLen, ret = 0, lbit;
-
- byte seq[MAX_SEQ_SZ];
- byte ver[MAX_VERSION_SZ];
- byte* tmps[RSA_INTS];
-
- USER_DEBUG(("Entering RsaKeyToDer\n"));
-
- if (!key)
- return USER_CRYPTO_ERROR;
-
- if (key->type != RSA_PRIVATE)
- return USER_CRYPTO_ERROR;
-
- for (i = 0; i < RSA_INTS; i++)
- tmps[i] = NULL;
-
- /* write all big ints from key to DER tmps */
- for (i = 0; i < RSA_INTS; i++) {
- Ipp32u isZero;
- IppsBigNumState* keyInt = GetRsaInt(key, i);
-
- ippsCmpZero_BN(keyInt, &isZero); /* makes isZero 0 if true */
- rawLen = wc_Rsa_unsigned_bin_size(keyInt);
- if ((int)rawLen < 0) {
- return USER_CRYPTO_ERROR;
- }
-
- /* leading zero */
- if (!isZero || wc_Rsa_leading_bit(keyInt))
- lbit = 1;
- else
- lbit = 0;
-
- rawLen += lbit;
-
- tmps[i] = (byte*)XMALLOC(rawLen + MAX_SEQ_SZ, key->heap,
- DYNAMIC_TYPE_USER_CRYPTO);
- if (tmps[i] == NULL) {
- ret = USER_CRYPTO_ERROR;
- break;
- }
-
- tmps[i][0] = ASN_INTEGER;
- sizes[i] = SetLength(rawLen, tmps[i] + 1) + 1 + lbit; /* tag & lbit */
-
- if (sizes[i] <= MAX_SEQ_SZ) {
- int err;
-
- /* leading zero */
- if (lbit)
- tmps[i][sizes[i]-1] = 0x00;
-
- /* extract data*/
- err = ippsGetOctString_BN((Ipp8u*)(tmps[i] + sizes[i]),
- rawLen - lbit, keyInt);
- if (err == ippStsOk) {
- sizes[i] += (rawLen-lbit); /* lbit included in rawLen */
- intTotalLen += sizes[i];
- ret = 0;
- }
- else {
- ret = USER_CRYPTO_ERROR;
- USER_DEBUG(("ippsGetOctString_BN error %s\n",
- ippGetStatusString(err)));
- break;
- }
- }
- else {
- ret = USER_CRYPTO_ERROR;
- break;
- }
- }
-
- if (ret != 0) {
- FreeTmpRsas(tmps, key->heap);
- return ret;
- }
-
- /* make headers */
- verSz = SetMyVersion(0, ver, FALSE);
- seqSz = SetSequence(verSz + intTotalLen, seq);
-
- outLen = seqSz + verSz + intTotalLen;
- if (output) {
- if (outLen > (int)inLen) {
- return USER_CRYPTO_ERROR;
- }
-
- /* write to output */
- XMEMCPY(output, seq, seqSz);
- j = seqSz;
- XMEMCPY(output + j, ver, verSz);
- j += verSz;
-
- for (i = 0; i < RSA_INTS; i++) {
- XMEMCPY(output + j, tmps[i], sizes[i]);
- j += sizes[i];
- }
- }
- FreeTmpRsas(tmps, key->heap);
-
- return outLen;
-}
-
-
-/* Convert Rsa Public key to DER format, write to output (inLen), return bytes
- written
-*/
-int wc_RsaKeyToPublicDer(RsaKey* key, byte* output, word32 inLen)
-{
- return SetRsaPublicKey(output, key, inLen, 1);
-}
-
-/* Returns public DER version of the RSA key. If with_header is 0 then only a
- * seq + n + e is returned in ASN.1 DER format */
-int wc_RsaKeyToPublicDer_ex(RsaKey* key, byte* output, word32 inLen,
- int with_header)
-{
- return SetRsaPublicKey(output, key, inLen, with_header);
-}
-
-#endif /* WOLFSSL_KEY_GEN || OPENSSL_EXTRA */
-
-#ifdef WC_RSA_BLINDING
-
-int wc_RsaSetRNG(RsaKey* key, WC_RNG* rng)
-{
- if (key == NULL)
- return USER_CRYPTO_ERROR;
-
- (void)rng;
-
- return 0;
-}
-
-#endif /* WC_RSA_BLINDING */
-
-#endif /* NO_RSA */
-
diff --git a/extra/wolfssl/wolfssl/wolfssl.rc b/extra/wolfssl/wolfssl/wolfssl.rc
index d9a8b919..471de1e8 100644
--- a/extra/wolfssl/wolfssl/wolfssl.rc
+++ b/extra/wolfssl/wolfssl/wolfssl.rc
Binary files differ
diff --git a/extra/wolfssl/wolfssl/wolfssl/internal.h b/extra/wolfssl/wolfssl/wolfssl/internal.h
index f59da64f..258cb034 100644
--- a/extra/wolfssl/wolfssl/wolfssl/internal.h
+++ b/extra/wolfssl/wolfssl/wolfssl/internal.h
@@ -1549,7 +1549,8 @@ enum Misc {
#endif
#endif
#ifdef HAVE_PQC
- ENCRYPT_LEN = 4600, /* allow 4600 byte buffer for dilithium. */
+ ENCRYPT_LEN = 5120, /* Allow 5k byte buffer for dilithium and
+ * hybridization with other algs. */
#else
#ifndef NO_PSK
ENCRYPT_LEN = (ENCRYPT_BASE_BITS / 8) + MAX_PSK_ID_LEN + 2,
@@ -1779,11 +1780,11 @@ enum Misc {
PQC_SA_MAJOR = 0xFE,/* Most significant byte used with PQC sig algs */
- /* These values for falcon and dilithium match what OQS has defined in their OpenSSL fork. */
+ /* These values for falcon and dilithium match what OQS has defined. */
FALCON_LEVEL1_SA_MAJOR = 0xFE,
- FALCON_LEVEL1_SA_MINOR = 0x0B,
+ FALCON_LEVEL1_SA_MINOR = 0xAE,
FALCON_LEVEL5_SA_MAJOR = 0xFE,
- FALCON_LEVEL5_SA_MINOR = 0x0E,
+ FALCON_LEVEL5_SA_MINOR = 0xB1,
DILITHIUM_LEVEL2_SA_MAJOR = 0xFE,
DILITHIUM_LEVEL2_SA_MINOR = 0xA0,
@@ -1797,6 +1798,8 @@ enum Misc {
#if defined(HAVE_PQC)
MAX_CERT_VERIFY_SZ = 6000, /* For Dilithium */
+#elif defined(WOLFSSL_CERT_EXT)
+ MAX_CERT_VERIFY_SZ = 2048, /* For larger extensions */
#elif !defined(NO_RSA) && defined(WOLFSSL_MAX_RSA_BITS)
MAX_CERT_VERIFY_SZ = WOLFSSL_MAX_RSA_BITS / 8, /* max RSA bytes */
#elif defined(HAVE_ECC)
@@ -1847,7 +1850,8 @@ enum Misc {
(MIN_FFHDE_GROUP <= (group) && (group) <= MAX_FFHDE_GROUP)
#ifdef HAVE_PQC
#define WOLFSSL_NAMED_GROUP_IS_PQC(group) \
- (WOLFSSL_PQC_MIN <= (group) && (group) <= WOLFSSL_PQC_MAX)
+ ((WOLFSSL_PQC_SIMPLE_MIN <= (group) && (group) <= WOLFSSL_PQC_SIMPLE_MAX) || \
+ (WOLFSSL_PQC_HYBRID_MIN <= (group) && (group) <= WOLFSSL_PQC_HYBRID_MAX))
#else
#define WOLFSSL_NAMED_GROUP_IS_PQC(group) ((void)(group), 0)
#endif /* HAVE_PQC */
@@ -2172,6 +2176,9 @@ WOLFSSL_LOCAL int CreateDevPrivateKey(void** pkey, byte* data, word32 length,
void* heap, int devId);
#endif
WOLFSSL_LOCAL int DecodePrivateKey(WOLFSSL *ssl, word16* length);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+WOLFSSL_LOCAL int DecodeAltPrivateKey(WOLFSSL *ssl, word16* length);
+#endif
#ifdef WOLF_PRIVATE_KEY_ID
WOLFSSL_LOCAL int GetPrivateKeySigSize(WOLFSSL* ssl);
#ifndef NO_ASN
@@ -2333,7 +2340,7 @@ struct Suites {
word16 hashSigAlgoSz; /* SigAlgo extension length in bytes */
byte suites[WOLFSSL_MAX_SUITE_SZ];
byte hashSigAlgo[WOLFSSL_MAX_SIGALGO]; /* sig/algo to offer */
- byte setSuites; /* user set suites from default */
+ byte setSuites:1; /* user set suites from default */
};
typedef struct CipherSuite {
@@ -2371,7 +2378,9 @@ typedef struct TLSX TLSX;
WOLFSSL_LOCAL int MatchSuite_ex(const WOLFSSL* ssl, Suites* peerSuites,
CipherSuite* cs, TLSX* extensions);
WOLFSSL_LOCAL int MatchSuite(WOLFSSL* ssl, Suites* peerSuites);
-WOLFSSL_LOCAL int SetCipherList(WOLFSSL_CTX* ctx, Suites* suites,
+WOLFSSL_LOCAL int SetCipherList_ex(const WOLFSSL_CTX* ctx, const WOLFSSL* ssl,
+ Suites* suites, const char* list);
+WOLFSSL_LOCAL int SetCipherList(const WOLFSSL_CTX* ctx, Suites* suites,
const char* list);
WOLFSSL_LOCAL int SetCipherListFromBytes(WOLFSSL_CTX* ctx, Suites* suites,
const byte* list, const int listSz);
@@ -2499,6 +2508,10 @@ struct CRL_Entry {
word32 tbsSz;
word32 signatureSz;
word32 signatureOID;
+#ifdef WC_RSA_PSS
+ word32 sigParamsSz; /* length of signature parameters */
+ byte* sigParams; /* buffer with signature parameters */
+#endif
#if !defined(NO_SKID) && !defined(NO_ASN)
byte extAuthKeyIdSet;
byte extAuthKeyId[KEYID_SIZE];
@@ -2507,6 +2520,7 @@ struct CRL_Entry {
};
+#ifdef HAVE_CRL_MONITOR
typedef struct CRL_Monitor CRL_Monitor;
/* CRL directory monitor */
@@ -2532,6 +2546,7 @@ typedef HANDLE wolfSSL_CRL_mfd_t; /* monitor fd, INVALID_HANDLE_VALUE if
* no init yet */
#define WOLFSSL_CRL_MFD_INIT_VAL (INVALID_HANDLE_VALUE)
#endif
+#endif
/* wolfSSL CRL controller */
struct WOLFSSL_CRL {
@@ -2542,8 +2557,8 @@ struct WOLFSSL_CRL {
CbCrlIO crlIOCb;
#endif
wolfSSL_RwLock crlLock; /* CRL list lock */
- CRL_Monitor monitors[WOLFSSL_CRL_MONITORS_LEN];
#ifdef HAVE_CRL_MONITOR
+ CRL_Monitor monitors[WOLFSSL_CRL_MONITORS_LEN];
COND_TYPE cond; /* condition to signal setup */
THREAD_TYPE tid; /* monitoring thread */
wolfSSL_CRL_mfd_t mfd;
@@ -2617,10 +2632,13 @@ struct WOLFSSL_CERT_MANAGER {
#endif
wolfSSL_Ref ref;
#ifdef HAVE_PQC
- short minFalconKeySz; /* minimum allowed Falcon key size */
- short minDilithiumKeySz; /* minimum allowed Dilithium key size */
+ short minFalconKeySz; /* minimum allowed Falcon key size */
+ short minDilithiumKeySz; /* minimum allowed Dilithium key size */
+#endif
+#if defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ASN_TEMPLATE) \
+ && defined(HAVE_OID_DECODING)
+ wc_UnknownExtCallback unknownExtCallback;
#endif
-
};
WOLFSSL_LOCAL int CM_SaveCertCache(WOLFSSL_CERT_MANAGER* cm,
@@ -2845,6 +2863,10 @@ typedef enum {
#ifdef WOLFSSL_QUIC
TLSX_KEY_QUIC_TP_PARAMS = 0x0039, /* RFC 9001, ch. 8.2 */
#endif
+ #ifdef WOLFSSL_DUAL_ALG_CERTS
+ TLSX_CKS = 0xff92, /* X9.146; ff indcates personal
+ * use and 92 is hex for 146. */
+ #endif
#endif
TLSX_RENEGOTIATION_INFO = 0xff01,
#ifdef WOLFSSL_QUIC
@@ -3349,6 +3371,7 @@ typedef struct KeyShareEntry {
word32 pubKeyLen; /* Public key length */
#if !defined(NO_DH) || defined(HAVE_PQC)
byte* privKey; /* Private key - DH and PQ KEMs only */
+ word32 privKeyLen;/* Only for PQ KEMs. */
#endif
#ifdef WOLFSSL_ASYNC_CRYPT
int lastRet;
@@ -3372,8 +3395,11 @@ WOLFSSL_LOCAL int TLSX_KeyShare_Parse(WOLFSSL* ssl, const byte* input,
word16 length, byte msgType);
WOLFSSL_LOCAL int TLSX_KeyShare_Parse_ClientHello(const WOLFSSL* ssl,
const byte* input, word16 length, TLSX** extensions);
-
-
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+WOLFSSL_LOCAL int TLSX_CKS_Parse(WOLFSSL* ssl, byte* input,
+ word16 length, TLSX** extensions);
+WOLFSSL_LOCAL int TLSX_CKS_Set(WOLFSSL* ssl, TLSX** extensions);
+#endif
#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)
enum PskDecryptReturn {
@@ -3554,6 +3580,12 @@ struct WOLFSSL_CTX {
byte privateKeyLabel:1;
int privateKeySz;
int privateKeyDevId;
+
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ DerBuffer* altPrivateKey;
+ byte altPrivateKeyType;
+ int altPrivateKeySz;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#ifdef OPENSSL_ALL
WOLFSSL_EVP_PKEY* privateKeyPKey;
#endif
@@ -3739,7 +3771,7 @@ struct WOLFSSL_CTX {
word32 maxEarlyDataSz;
#endif
#ifdef HAVE_ANON
- byte haveAnon; /* User wants to allow Anon suites */
+ byte useAnon; /* User wants to allow Anon suites */
#endif /* HAVE_ANON */
#ifdef WOLFSSL_ENCRYPTED_KEYS
wc_pem_password_cb* passwd_cb;
@@ -3930,6 +3962,10 @@ struct WOLFSSL_CTX {
#if defined(__APPLE__) && defined(WOLFSSL_SYS_CA_CERTS)
byte doAppleNativeCertValidationFlag:1;
#endif /* defined(__APPLE__) && defined(WOLFSSL_SYS_CA_CERTS) */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ byte *sigSpec;
+ word16 sigSpecSz;
+#endif
};
WOLFSSL_LOCAL
@@ -4176,7 +4212,8 @@ typedef struct Hashes {
#if !defined(NO_MD5) && !defined(NO_OLD_TLS)
byte md5[WC_MD5_DIGEST_SIZE];
#endif
- #if !defined(NO_SHA)
+ #if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
byte sha[WC_SHA_DIGEST_SIZE];
#endif
#ifndef NO_SHA256
@@ -4496,7 +4533,10 @@ typedef struct Buffers {
when got WANT_WRITE */
byte weOwnCert; /* SSL own cert flag */
byte weOwnCertChain; /* SSL own cert chain flag */
- byte weOwnKey; /* SSL own key flag */
+ byte weOwnKey; /* SSL own key flag */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ byte weOwnAltKey; /* SSL own alt key flag */
+#endif
byte weOwnDH; /* SSL own dh (p,g) flag */
#ifndef NO_DH
buffer serverDH_P; /* WOLFSSL_CTX owns, unless we own */
@@ -4513,6 +4553,11 @@ typedef struct Buffers {
byte keyLabel:1; /* Key data is a label not data */
int keySz; /* Size of RSA key */
int keyDevId; /* Device Id for key */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ DerBuffer* altKey; /* WOLFSSL_CTX owns, unless we own */
+ byte altKeyType; /* Type of key: dilithium, falcon */
+ int altKeySz; /* Size of key */
+#endif
DerBuffer* certChain; /* WOLFSSL_CTX owns, unless we own */
/* chain after self, in DER, with leading size for each cert */
#ifdef WOLFSSL_TLS13
@@ -4662,7 +4707,7 @@ struct Options {
#ifdef HAVE_POLY1305
word16 oldPoly:1; /* set when to use old rfc way of poly*/
#endif
- word16 haveAnon:1; /* User wants to allow Anon suites */
+ word16 useAnon:1; /* User wants to allow Anon suites */
#ifdef HAVE_SESSION_TICKET
word16 createTicket:1; /* Server to create new Ticket */
word16 useTicket:1; /* Use Ticket not session cache */
@@ -4770,6 +4815,8 @@ struct Options {
byte cipherSuite; /* second byte, actual suite */
byte hashAlgo; /* selected hash algorithm */
byte sigAlgo; /* selected sig algorithm */
+ byte peerHashAlgo; /* peer's chosen hash algo */
+ byte peerSigAlgo; /* peer's chosen sig algo */
byte serverState;
byte clientState;
byte handShakeState;
@@ -5091,6 +5138,17 @@ struct WOLFSSL_X509 {
byte notBeforeData[CTC_DATE_SIZE];
byte notAfterData[CTC_DATE_SIZE];
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* Subject Alternative Public Key Info */
+ byte *sapkiDer;
+ int sapkiLen;
+ /* Alternative Signature Algorithm */
+ byte *altSigAlgDer;
+ int altSigAlgLen;
+ /* Alternative Signature Value */
+ byte *altSigValDer;
+ int altSigValLen;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
};
@@ -5189,7 +5247,8 @@ typedef struct MsgsReceived {
typedef struct HS_Hashes {
Hashes verifyHashes;
Hashes certHashes; /* for cert verify */
-#ifndef NO_SHA
+#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
+ defined(WOLFSSL_ALLOW_TLS_SHA1))
wc_Sha hashSha; /* sha hash of handshake msgs */
#endif
#if !defined(NO_MD5) && !defined(NO_OLD_TLS)
@@ -5456,6 +5515,11 @@ struct WOLFSSL {
* allocated from heap */
word32 hsType; /* Type of Handshake key (hsKey) */
WOLFSSL_CIPHER cipher;
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ void* hsAltKey; /* Handshake key (dilithium, falcon)
+ * allocated from heap */
+ word32 hsAltType; /* Type of Handshake key (hsAltKey) */
+#endif
#ifndef WOLFSSL_AEAD_ONLY
hmacfp hmac;
#endif
@@ -5877,7 +5941,12 @@ struct WOLFSSL {
#if defined(WOLFSSL_SNIFFER) && defined(WOLFSSL_SNIFFER_KEYLOGFILE)
SSLSnifferSecretCb snifferSecretCb;
#endif /* WOLFSSL_SNIFFER && WOLFSSL_SNIFFER_KEYLOGFILE */
-
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ byte *sigSpec; /* This pointer never owns the memory. */
+ word16 sigSpecSz;
+ byte *peerSigSpec; /* This pointer always owns the memory. */
+ word16 peerSigSpecSz;
+#endif
};
/*
@@ -6139,9 +6208,15 @@ WOLFSSL_LOCAL int SetECKeyExternal(WOLFSSL_EC_KEY* eckey);
#if defined(OPENSSL_EXTRA) || defined(HAVE_CURL)
WOLFSSL_LOCAL int wolfSSL_curve_is_disabled(const WOLFSSL* ssl,
- word16 named_curve);
+ word16 curve_id);
#else
-#define wolfSSL_curve_is_disabled(ssl, c) ((void)(ssl), (void)(c), 0)
+static WC_INLINE int wolfSSL_curve_is_disabled(const WOLFSSL* ssl,
+ word16 curve_id)
+{
+ (void)ssl;
+ (void)curve_id;
+ return 0;
+}
#endif
WOLFSSL_LOCAL WC_RNG* WOLFSSL_RSA_GetRNG(WOLFSSL_RSA *rsa, WC_RNG **tmpRNG,
@@ -6409,10 +6484,8 @@ WOLFSSL_LOCAL int SetKeysSide(WOLFSSL* ssl, enum encrypt_side side);
/* Set*Internal and Set*External functions */
WOLFSSL_LOCAL int SetDsaInternal(WOLFSSL_DSA* dsa);
WOLFSSL_LOCAL int SetDsaExternal(WOLFSSL_DSA* dsa);
-#ifndef HAVE_USER_RSA
WOLFSSL_LOCAL int SetRsaExternal(WOLFSSL_RSA* rsa);
WOLFSSL_LOCAL int SetRsaInternal(WOLFSSL_RSA* rsa);
-#endif
typedef enum elem_set {
ELEMENT_P = 0x01,
@@ -6639,7 +6712,7 @@ WOLFSSL_LOCAL int EncryptDerKey(byte *der, int *derSz, const EVP_CIPHER* cipher,
#endif
#endif
-#if !defined(NO_RSA) && !defined(HAVE_USER_RSA)
+#if !defined(NO_RSA)
WOLFSSL_LOCAL int wolfSSL_RSA_To_Der(WOLFSSL_RSA* rsa, byte** outBuf,
int publicKey, void* heap);
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/openssl/bio.h b/extra/wolfssl/wolfssl/wolfssl/openssl/bio.h
index e6f5a709..9206b092 100644
--- a/extra/wolfssl/wolfssl/wolfssl/openssl/bio.h
+++ b/extra/wolfssl/wolfssl/wolfssl/openssl/bio.h
@@ -25,6 +25,7 @@
#ifndef WOLFSSL_BIO_H_
#define WOLFSSL_BIO_H_
+#include <wolfssl/openssl/ssl.h>
#ifdef __cplusplus
extern "C" {
diff --git a/extra/wolfssl/wolfssl/wolfssl/openssl/crypto.h b/extra/wolfssl/wolfssl/wolfssl/openssl/crypto.h
index f57626f3..a787da28 100644
--- a/extra/wolfssl/wolfssl/wolfssl/openssl/crypto.h
+++ b/extra/wolfssl/wolfssl/wolfssl/openssl/crypto.h
@@ -96,13 +96,9 @@ WOLFSSL_API int wolfSSL_OPENSSL_init_crypto(word64 opts, const OPENSSL_INIT_SETT
#define SSLeay_version wolfSSLeay_version
#define SSLeay wolfSSLeay
#define OpenSSL_version_num wolfSSL_OpenSSL_version_num
+#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
+#define SSLEAY_VERSION OPENSSL_VERSION
-#if defined(WOLFSSL_QT) || defined(WOLFSSL_HITCH)
- #define SSLEAY_VERSION 0x10001000L
-#else
- #define SSLEAY_VERSION 0x0090600fL
-#endif
-#define SSLEAY_VERSION_NUMBER SSLEAY_VERSION
#define CRYPTO_lock wc_LockMutex_ex
/* this function was used to set the default malloc, free, and realloc */
diff --git a/extra/wolfssl/wolfssl/wolfssl/openssl/opensslv.h b/extra/wolfssl/wolfssl/wolfssl/openssl/opensslv.h
index c43e507b..57404c92 100644
--- a/extra/wolfssl/wolfssl/wolfssl/openssl/opensslv.h
+++ b/extra/wolfssl/wolfssl/wolfssl/openssl/opensslv.h
@@ -36,7 +36,8 @@
/* valid version */
#elif defined(WOLFSSL_APACHE_HTTPD) || defined(HAVE_LIBEST) || \
defined(WOLFSSL_BIND) || defined(WOLFSSL_NGINX) || \
- defined(WOLFSSL_RSYSLOG) || defined(WOLFSSL_KRB) || defined(HAVE_STUNNEL)
+ defined(WOLFSSL_RSYSLOG) || defined(WOLFSSL_KRB) || defined(HAVE_STUNNEL) || \
+ defined(WOLFSSL_OPENSSH)
/* For Apache httpd, Use 1.1.0 compatibility */
#define OPENSSL_VERSION_NUMBER 0x10100003L
#elif defined(WOLFSSL_QT) || defined(WOLFSSL_PYTHON) || defined(WOLFSSL_KRB)
@@ -45,7 +46,7 @@
#elif defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_FFMPEG)
#define OPENSSL_VERSION_NUMBER 0x1010000fL
#elif defined(OPENSSL_ALL) || defined(HAVE_LIGHTY) || \
- defined(WOLFSSL_NGINX) || defined(WOLFSSL_OPENSSH) || defined(WOLFSSL_OPENVPN)
+ defined(WOLFSSL_NGINX) || defined(WOLFSSL_OPENVPN)
/* version number can be increased for Lighty after compatibility for ECDH
is added */
#define OPENSSL_VERSION_NUMBER 0x10001040L
@@ -56,6 +57,10 @@
#define OPENSSL_VERSION_TEXT "wolfSSL " LIBWOLFSSL_VERSION_STRING
#define OPENSSL_VERSION 0
+#ifndef OPENSSL_IS_WOLFSSL
+#define OPENSSL_IS_WOLFSSL
+#endif
+
#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
#endif /* header */
diff --git a/extra/wolfssl/wolfssl/wolfssl/openssl/ssl.h b/extra/wolfssl/wolfssl/wolfssl/openssl/ssl.h
index 77874c77..5cd96e26 100644
--- a/extra/wolfssl/wolfssl/wolfssl/openssl/ssl.h
+++ b/extra/wolfssl/wolfssl/wolfssl/openssl/ssl.h
@@ -340,6 +340,9 @@ typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
#define SSL_CTX_set1_sigalgs_list wolfSSL_CTX_set1_sigalgs_list
#define SSL_set1_sigalgs_list wolfSSL_set1_sigalgs_list
#define SSL_get_signature_nid wolfSSL_get_signature_nid
+#define SSL_get_signature_type_nid wolfSSL_get_signature_type_nid
+#define SSL_get_peer_signature_nid wolfSSL_get_peer_signature_nid
+#define SSL_get_peer_signature_type_nid wolfSSL_get_peer_signature_type_nid
#define SSL_CTX_set1_groups wolfSSL_CTX_set1_groups
#define SSL_set1_groups wolfSSL_set1_groups
diff --git a/extra/wolfssl/wolfssl/wolfssl/quic.h b/extra/wolfssl/wolfssl/wolfssl/quic.h
index c1462cba..d4152423 100644
--- a/extra/wolfssl/wolfssl/wolfssl/quic.h
+++ b/extra/wolfssl/wolfssl/wolfssl/quic.h
@@ -32,6 +32,8 @@
#ifdef WOLFSSL_QUIC
+#include <stdint.h>
+
/* QUIC operates on three encryption levels which determine
* which keys/algos are used for de-/encryption. These are
* kept separately for incoming and outgoing data and.
@@ -288,6 +290,15 @@ int wolfSSL_quic_hkdf(uint8_t* dest, size_t destlen,
const uint8_t* salt, size_t saltlen,
const uint8_t* info, size_t infolen);
+/* most common QUIC packet size as of 2022 was 1,200 bytes
+ * largest packet size listed in the RFC is 1,392 bytes
+ * this gives plenty of breathing room for capacity of records but keeps sizes
+ * read from the wire sane */
+#ifndef WOLFSSL_QUIC_MAX_RECORD_CAPACITY
+ /* 1024*1024 -- 1 MB */
+ #define WOLFSSL_QUIC_MAX_RECORD_CAPACITY (1048576)
+#endif
+
#endif /* WOLFSSL_QUIC */
#ifdef __cplusplus
diff --git a/extra/wolfssl/wolfssl/wolfssl/ssl.h b/extra/wolfssl/wolfssl/wolfssl/ssl.h
index 907b3691..804ec44b 100644
--- a/extra/wolfssl/wolfssl/wolfssl/ssl.h
+++ b/extra/wolfssl/wolfssl/wolfssl/ssl.h
@@ -1056,8 +1056,11 @@ WOLFSSL_ABI WOLFSSL_API int wolfSSL_CTX_use_certificate_file(
WOLFSSL_CTX* ctx, const char* file, int format);
WOLFSSL_ABI WOLFSSL_API int wolfSSL_CTX_use_PrivateKey_file(
WOLFSSL_CTX* ctx, const char* file, int format);
-
-#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+WOLFSSL_API int wolfSSL_CTX_use_AltPrivateKey_file(
+ WOLFSSL_CTX* ctx, const char* file, int format);
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+#endif /* !NO_FILESYSTEM && !NO_CERTS */
#ifndef NO_CERTS
#define WOLFSSL_LOAD_FLAG_NONE 0x00000000
@@ -1129,6 +1132,10 @@ WOLFSSL_API int wolfSSL_CTX_up_ref(WOLFSSL_CTX* ctx);
#ifdef OPENSSL_EXTRA
WOLFSSL_API int wolfSSL_CTX_set_ecdh_auto(WOLFSSL_CTX* ctx, int onoff);
WOLFSSL_API int wolfSSL_get_signature_nid(WOLFSSL* ssl, int* nid);
+WOLFSSL_API int wolfSSL_get_signature_type_nid(const WOLFSSL* ssl, int* nid);
+WOLFSSL_API int wolfSSL_get_peer_signature_nid(WOLFSSL* ssl, int* nid);
+WOLFSSL_API int wolfSSL_get_peer_signature_type_nid(const WOLFSSL* ssl,
+ int* nid);
WOLFSSL_API int wolfSSL_CTX_set1_sigalgs_list(WOLFSSL_CTX* ctx,
const char* list);
WOLFSSL_API int wolfSSL_set1_sigalgs_list(WOLFSSL* ssl, const char* list);
@@ -1197,8 +1204,8 @@ WOLFSSL_API int wolfSSL_CTX_set1_groups(WOLFSSL_CTX* ctx, int* groups,
WOLFSSL_API int wolfSSL_set1_groups(WOLFSSL* ssl, int* groups, int count);
#ifdef HAVE_ECC
-WOLFSSL_API int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, char *list);
-WOLFSSL_API int wolfSSL_set1_groups_list(WOLFSSL *ssl, char *list);
+WOLFSSL_API int wolfSSL_CTX_set1_groups_list(WOLFSSL_CTX *ctx, const char *list);
+WOLFSSL_API int wolfSSL_set1_groups_list(WOLFSSL *ssl, const char *list);
#endif
#endif
@@ -1533,7 +1540,8 @@ WOLFSSL_API int wolfSSL_sk_push_node(WOLFSSL_STACK** stack, WOLFSSL_STACK* in);
WOLFSSL_API WOLFSSL_STACK* wolfSSL_sk_get_node(WOLFSSL_STACK* sk, int idx);
WOLFSSL_API int wolfSSL_sk_push(WOLFSSL_STACK *st, const void *data);
-#if defined(HAVE_OCSP) || defined(HAVE_CRL)
+#if defined(HAVE_OCSP) || defined(HAVE_CRL) || (defined(WOLFSSL_CUSTOM_OID) && \
+ defined(WOLFSSL_ASN_TEMPLATE) && defined(HAVE_OID_DECODING))
#include "wolfssl/wolfcrypt/asn.h"
#endif
@@ -1681,6 +1689,7 @@ WOLFSSL_API void wolfSSL_sk_CIPHER_free(WOLF_STACK_OF(WOLFSSL_CIPHER)* sk);
WOLFSSL_API WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl);
WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new(void);
+WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new_ex(void* heap);
WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_dup(WOLFSSL_X509* x);
#if defined(OPENSSL_EXTRA_X509_SMALL) || defined(OPENSSL_EXTRA)
WOLFSSL_API int wolfSSL_RSA_up_ref(WOLFSSL_RSA* rsa);
@@ -2885,6 +2894,9 @@ WOLFSSL_API WOLFSSL_X509* wolfSSL_d2i_X509(WOLFSSL_X509** x509,
const unsigned char** in, int len);
WOLFSSL_API WOLFSSL_X509*
wolfSSL_X509_d2i(WOLFSSL_X509** x509, const unsigned char* in, int len);
+WOLFSSL_API WOLFSSL_X509*
+ wolfSSL_X509_d2i_ex(WOLFSSL_X509** x509, const unsigned char* in, int len,
+ void* heap);
#ifdef WOLFSSL_CERT_REQ
WOLFSSL_API WOLFSSL_X509*
wolfSSL_X509_REQ_d2i(WOLFSSL_X509** x509, const unsigned char* in, int len);
@@ -3032,23 +3044,26 @@ WOLFSSL_API int wolfSSL_make_eap_keys(WOLFSSL* ssl, void* key, unsigned int len,
#ifdef __PPU
#include <sys/types.h>
#include <sys/socket.h>
- #elif !defined(WOLFSSL_MDK_ARM) && !defined(WOLFSSL_IAR_ARM) && \
+ #elif defined(ARDUINO)
+ /* TODO board specific */
+ #elif !defined(WOLFSSL_MDK_ARM) && !defined(WOLFSSL_IAR_ARM) && \
!defined(WOLFSSL_PICOTCP) && !defined(WOLFSSL_ROWLEY_ARM) && \
- !defined(WOLFSSL_EMBOS) && !defined(WOLFSSL_FROSTED) && \
- !defined(WOLFSSL_CHIBIOS) && !defined(WOLFSSL_CONTIKI) && \
- !defined(WOLFSSL_ZEPHYR) && !defined(NETOS)
+ !defined(WOLFSSL_EMBOS) && !defined(WOLFSSL_FROSTED) && \
+ !defined(WOLFSSL_CHIBIOS) && !defined(WOLFSSL_CONTIKI) && \
+ !defined(WOLFSSL_ZEPHYR) && !defined(NETOS)
#include <sys/uio.h>
#endif
/* allow writev style writing */
WOLFSSL_API int wolfSSL_writev(WOLFSSL* ssl, const struct iovec* iov,
int iovcnt);
- #endif
-#endif
+ #endif /* !NO_WRITEV */
+#endif /* !_WIN32 */
#ifndef NO_CERTS
/* SSL_CTX versions */
WOLFSSL_API int wolfSSL_CTX_UnloadCAs(WOLFSSL_CTX* ctx);
+ WOLFSSL_API int wolfSSL_CTX_UnloadIntermediateCerts(WOLFSSL_CTX* ctx);
#ifdef WOLFSSL_TRUST_PEER_CERT
WOLFSSL_API int wolfSSL_CTX_Unload_trust_peers(WOLFSSL_CTX* ctx);
#ifdef WOLFSSL_LOCAL_X509_STORE
@@ -3587,6 +3602,13 @@ WOLFSSL_API void wolfSSL_CTX_SetPerformTlsRecordProcessingCb(WOLFSSL_CTX* ctx,
WOLFSSL_API void wolfSSL_CertManagerFree(WOLFSSL_CERT_MANAGER* cm);
WOLFSSL_API int wolfSSL_CertManager_up_ref(WOLFSSL_CERT_MANAGER* cm);
+#if defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ASN_TEMPLATE) \
+ && defined(HAVE_OID_DECODING)
+ WOLFSSL_API void wolfSSL_CertManagerSetUnknownExtCallback(
+ WOLFSSL_CERT_MANAGER* cm,
+ wc_UnknownExtCallback cb);
+#endif
+
WOLFSSL_API int wolfSSL_CertManagerLoadCA(WOLFSSL_CERT_MANAGER* cm,
const char* f, const char* d);
WOLFSSL_API int wolfSSL_CertManagerLoadCABuffer_ex(WOLFSSL_CERT_MANAGER* cm,
@@ -3596,6 +3618,8 @@ WOLFSSL_API void wolfSSL_CTX_SetPerformTlsRecordProcessingCb(WOLFSSL_CTX* ctx,
const unsigned char* buff, long sz, int format);
WOLFSSL_API int wolfSSL_CertManagerUnloadCAs(WOLFSSL_CERT_MANAGER* cm);
+ WOLFSSL_API int wolfSSL_CertManagerUnloadIntermediateCerts(
+ WOLFSSL_CERT_MANAGER* cm);
#ifdef WOLFSSL_TRUST_PEER_CERT
WOLFSSL_API int wolfSSL_CertManagerUnload_trust_peers(
WOLFSSL_CERT_MANAGER* cm);
@@ -3980,7 +4004,7 @@ enum {
WOLFSSL_KYBER_LEVEL5 = 573, /* KYBER_1024 */
WOLFSSL_PQC_SIMPLE_MAX = 573,
- WOLFSSL_PQC_HYBRID_MIN = 12052,
+ WOLFSSL_PQC_HYBRID_MIN = 12090,
WOLFSSL_P256_KYBER_LEVEL1 = 12090,
WOLFSSL_P384_KYBER_LEVEL3 = 12092,
WOLFSSL_P521_KYBER_LEVEL5 = 12093,
@@ -4008,6 +4032,16 @@ WOLFSSL_API int wolfSSL_UseKeyShare(WOLFSSL* ssl, word16 group);
WOLFSSL_API int wolfSSL_NoKeyShares(WOLFSSL* ssl);
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+#define WOLFSSL_CKS_SIGSPEC_NATIVE 0x0001
+#define WOLFSSL_CKS_SIGSPEC_ALTERNATIVE 0x0002
+#define WOLFSSL_CKS_SIGSPEC_BOTH 0x0003
+#define WOLFSSL_CKS_SIGSPEC_EXTERNAL 0x0004
+
+WOLFSSL_API int wolfSSL_UseCKS(WOLFSSL* ssl, byte *sigSpec, word16 sigSpecSz);
+WOLFSSL_API int wolfSSL_CTX_UseCKS(WOLFSSL_CTX* ctx, byte *sigSpec,
+ word16 sigSpecSz);
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
/* Secure Renegotiation */
#if defined(HAVE_SECURE_RENEGOTIATION) || defined(HAVE_SERVER_RENEGOTIATION_INFO)
diff --git a/extra/wolfssl/wolfssl/wolfssl/test.h b/extra/wolfssl/wolfssl/wolfssl/test.h
index 5265e87f..47abb74a 100644
--- a/extra/wolfssl/wolfssl/wolfssl/test.h
+++ b/extra/wolfssl/wolfssl/wolfssl/test.h
@@ -110,7 +110,9 @@
#elif defined(WOLFSSL_TIRTOS)
#include <string.h>
#include <netdb.h>
- #include <sys/types.h>
+ #if !defined(__ti__) /* conflicts with sys/socket.h */
+ #include <sys/types.h>
+ #endif
#include <arpa/inet.h>
#include <sys/socket.h>
#include <ti/sysbios/knl/Task.h>
@@ -173,6 +175,8 @@
int h_length; /* length of address */
char** h_addr_list; /* list of addresses from the name server */
};
+#elif defined(ARDUINO)
+ /* TODO, define board-specific */
#else
#include <string.h>
#include <sys/types.h>
@@ -285,6 +289,14 @@
#endif
#endif
+
+#if defined(DEBUG_PK_CB) || defined(TEST_PK_PRIVKEY) || defined(TEST_PK_PSK)
+ #define WOLFSSL_PKMSG(...) printf(__VA_ARGS__)
+#else
+ #define WOLFSSL_PKMSG(...) WC_DO_NOTHING
+#endif
+
+
#ifndef MY_EX_USAGE
#define MY_EX_USAGE 2
#endif
@@ -654,6 +666,13 @@ int rem_dir(const char* dirName);
int rem_file(const char* fileName);
int copy_file(const char* in, const char* out);
+#if defined(__MACH__) || defined(__FreeBSD__)
+ int link_file(const char* in, const char* out);
+ #define STAGE_FILE(x,y) link_file((x),(y))
+#else
+ #define STAGE_FILE(x,y) copy_file((x),(y))
+#endif
+
void signal_ready(tcp_ready* ready);
/* wolfSSL */
@@ -1284,7 +1303,7 @@ static WC_INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
int err;
struct hostent* entry = gethostbyname(peer, &err);
#elif defined(WOLFSSL_TIRTOS)
- struct hostent* entry = DNSGetHostByName(peer);
+ struct hostent* entry = (struct hostent*)DNSGetHostByName(peer);
#elif defined(WOLFSSL_VXWORKS)
struct hostent* entry = (struct hostent*)hostGetByName((char*)peer);
#else
@@ -1796,7 +1815,6 @@ static WC_INLINE void tcp_set_blocking(SOCKET_T* sockfd)
#endif
}
-
#ifndef NO_PSK
/* identity is OpenSSL testing default for openssl s_client, keep same */
@@ -1806,6 +1824,8 @@ static WC_INLINE unsigned int my_psk_client_cb(WOLFSSL* ssl, const char* hint,
char* identity, unsigned int id_max_len, unsigned char* key,
unsigned int key_max_len)
{
+ unsigned int ret;
+
(void)ssl;
(void)hint;
(void)key_max_len;
@@ -1815,13 +1835,13 @@ static WC_INLINE unsigned int my_psk_client_cb(WOLFSSL* ssl, const char* hint,
if (wolfSSL_GetVersion(ssl) < WOLFSSL_TLSV1_3) {
/* test key in hex is 0x1a2b3c4d , in decimal 439,041,101 , we're using
- unsigned binary */
+ * unsigned binary */
key[0] = 0x1a;
key[1] = 0x2b;
key[2] = 0x3c;
key[3] = 0x4d;
- return 4; /* length of key in octets or 0 for error */
+ ret = 4; /* length of key in octets or 0 for error */
}
else {
int i;
@@ -1833,14 +1853,23 @@ static WC_INLINE unsigned int my_psk_client_cb(WOLFSSL* ssl, const char* hint,
key[i] = b;
}
- return 32; /* length of key in octets or 0 for error */
+ ret = 32; /* length of key in octets or 0 for error */
}
+
+#if defined(HAVE_PK_CALLBACKS) && defined(TEST_PK_PSK)
+ WOLFSSL_PKMSG("PSK Client using HW (Len %d, Hint %s)\n", ret, hint);
+ ret = (unsigned int)USE_HW_PSK;
+#endif
+
+ return ret;
}
static WC_INLINE unsigned int my_psk_server_cb(WOLFSSL* ssl, const char* identity,
unsigned char* key, unsigned int key_max_len)
{
+ unsigned int ret;
+
(void)ssl;
(void)key_max_len;
@@ -1850,13 +1879,13 @@ static WC_INLINE unsigned int my_psk_server_cb(WOLFSSL* ssl, const char* identit
if (wolfSSL_GetVersion(ssl) < WOLFSSL_TLSV1_3) {
/* test key in hex is 0x1a2b3c4d , in decimal 439,041,101 , we're using
- unsigned binary */
+ * unsigned binary */
key[0] = 0x1a;
key[1] = 0x2b;
key[2] = 0x3c;
key[3] = 0x4d;
- return 4; /* length of key in octets or 0 for error */
+ ret = 4; /* length of key in octets or 0 for error */
}
else {
int i;
@@ -1868,8 +1897,14 @@ static WC_INLINE unsigned int my_psk_server_cb(WOLFSSL* ssl, const char* identit
key[i] = b;
}
- return 32; /* length of key in octets or 0 for error */
+ ret = 32; /* length of key in octets or 0 for error */
}
+#if defined(HAVE_PK_CALLBACKS) && defined(TEST_PK_PSK)
+ WOLFSSL_PKMSG("PSK Server using HW (Len %d, Hint %s)\n", ret, identity);
+ ret = (unsigned int)USE_HW_PSK;
+#endif
+
+ return ret;
}
#ifdef WOLFSSL_TLS13
@@ -1877,6 +1912,7 @@ static WC_INLINE unsigned int my_psk_client_tls13_cb(WOLFSSL* ssl,
const char* hint, char* identity, unsigned int id_max_len,
unsigned char* key, unsigned int key_max_len, const char** ciphersuite)
{
+ unsigned int ret;
int i;
int b = 0x01;
const char* userCipher = (const char*)wolfSSL_get_psk_callback_ctx(ssl);
@@ -1896,7 +1932,14 @@ static WC_INLINE unsigned int my_psk_client_tls13_cb(WOLFSSL* ssl,
*ciphersuite = userCipher ? userCipher : "TLS13-AES128-GCM-SHA256";
- return 32; /* length of key in octets or 0 for error */
+ ret = 32; /* length of key in octets or 0 for error */
+
+#if defined(HAVE_PK_CALLBACKS) && defined(TEST_PK_PSK)
+ WOLFSSL_PKMSG("PSK Client TLS 1.3 using HW (Len %d, Hint %s)\n", ret, hint);
+ ret = (unsigned int)USE_HW_PSK;
+#endif
+
+ return ret;
}
@@ -1904,6 +1947,7 @@ static WC_INLINE unsigned int my_psk_server_tls13_cb(WOLFSSL* ssl,
const char* identity, unsigned char* key, unsigned int key_max_len,
const char** ciphersuite)
{
+ unsigned int ret;
int i;
int b = 0x01;
int kIdLen = (int)XSTRLEN(kIdentityStr);
@@ -1927,7 +1971,15 @@ static WC_INLINE unsigned int my_psk_server_tls13_cb(WOLFSSL* ssl,
*ciphersuite = userCipher ? userCipher : "TLS13-AES128-GCM-SHA256";
- return 32; /* length of key in octets or 0 for error */
+ ret = 32; /* length of key in octets or 0 for error */
+
+#if defined(HAVE_PK_CALLBACKS) && defined(TEST_PK_PSK)
+ WOLFSSL_PKMSG("PSK Server TLS 1.3 using HW (Len %d, Hint %s)\n",
+ ret, identity);
+ ret = (unsigned int)USE_HW_PSK;
+#endif
+
+ return ret;
}
#endif
@@ -2489,37 +2541,42 @@ static WC_INLINE void CRL_CallBack(const char* url)
#endif
#ifndef NO_DH
-static WC_INLINE void SetDH(WOLFSSL* ssl)
-{
- /* dh1024 p */
- static const unsigned char p[] =
+#if defined(WOLFSSL_SP_MATH) && !defined(WOLFSS_SP_MATH_ALL)
+ /* dh2048 p */
+ static const unsigned char test_dh_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,
+ 0xD3, 0xB2, 0x99, 0x84, 0x5C, 0x0A, 0x4C, 0xE7, 0x37, 0xCC, 0xFC, 0x18,
+ 0x37, 0x01, 0x2F, 0x5D, 0xC1, 0x4C, 0xF4, 0x5C, 0xC9, 0x82, 0x8D, 0xB7,
+ 0xF3, 0xD4, 0xA9, 0x8A, 0x9D, 0x34, 0xD7, 0x76, 0x57, 0xE5, 0xE5, 0xC3,
+ 0xE5, 0x16, 0x85, 0xCA, 0x4D, 0xD6, 0x5B, 0xC1, 0xF8, 0xCF, 0x89, 0x26,
+ 0xD0, 0x38, 0x8A, 0xEE, 0xF3, 0xCD, 0x33, 0xE5, 0x56, 0xBB, 0x90, 0x83,
+ 0x9F, 0x97, 0x8E, 0x71, 0xFB, 0x27, 0xE4, 0x35, 0x15, 0x45, 0x86, 0x09,
+ 0x71, 0xA8, 0x9A, 0xB9, 0x3E, 0x0F, 0x51, 0x8A, 0xC2, 0x75, 0x51, 0x23,
+ 0x12, 0xFB, 0x94, 0x31, 0x44, 0xBF, 0xCE, 0xF6, 0xED, 0xA6, 0x3A, 0xB7,
+ 0x92, 0xCE, 0x16, 0xA9, 0x14, 0xB3, 0x88, 0xB7, 0x13, 0x81, 0x71, 0x83,
+ 0x88, 0xCD, 0xB1, 0xA2, 0x37, 0xE1, 0x59, 0x5C, 0xD0, 0xDC, 0xCA, 0x82,
+ 0x87, 0xFA, 0x43, 0x44, 0xDD, 0x78, 0x3F, 0xCA, 0x27, 0x7E, 0xE1, 0x6B,
+ 0x93, 0x19, 0x7C, 0xD9, 0xA6, 0x96, 0x47, 0x0D, 0x12, 0xC1, 0x13, 0xD7,
+ 0xB9, 0x0A, 0x40, 0xD9, 0x1F, 0xFF, 0xB8, 0xB4, 0x00, 0xC8, 0xAA, 0x5E,
+ 0xD2, 0x66, 0x4A, 0x05, 0x8E, 0x9E, 0xF5, 0x34, 0xE7, 0xD7, 0x09, 0x7B,
+ 0x15, 0x49, 0x1D, 0x76, 0x31, 0xD6, 0x71, 0xEC, 0x13, 0x4E, 0x89, 0x8C,
+ 0x09, 0x22, 0xD8, 0xE7, 0xA3, 0xE9, 0x7D, 0x21, 0x51, 0x26, 0x6E, 0x9F,
+ 0x30, 0x8A, 0xBB, 0xBC, 0x74, 0xC1, 0xC3, 0x27, 0x6A, 0xCE, 0xA3, 0x12,
+ 0x60, 0x68, 0x01, 0xD2, 0x34, 0x07, 0x80, 0xCC, 0x2D, 0x7F, 0x5C, 0xAE,
+ 0xA2, 0x97, 0x40, 0xC8, 0x3C, 0xAC, 0xDB, 0x6F, 0xFE, 0x6C, 0x6D, 0xD2,
+ 0x06, 0x1C, 0x43, 0xA2, 0xB2, 0x2B, 0x82, 0xB7, 0xD0, 0xAB, 0x3F, 0x2C,
+ 0xE7, 0x9C, 0x19, 0x16, 0xD1, 0x5E, 0x26, 0x86, 0xC7, 0x92, 0xF9, 0x16,
+ 0x0B, 0xFA, 0x66, 0x83
};
- /* dh1024 g */
- static const unsigned char g[] =
+ /* dh2048 g */
+ static const unsigned char test_dh_g[] =
{
0x02,
};
-
- wolfSSL_SetTmpDH(ssl, p, sizeof(p), g, sizeof(g));
-}
-
-static WC_INLINE void SetDHCtx(WOLFSSL_CTX* ctx)
-{
+#else
/* dh1024 p */
- static const unsigned char p[] =
+ static const unsigned char test_dh_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,
@@ -2535,12 +2592,22 @@ static WC_INLINE void SetDHCtx(WOLFSSL_CTX* ctx)
};
/* dh1024 g */
- static const unsigned char g[] =
+ static const unsigned char test_dh_g[] =
{
0x02,
};
+#endif
+
+static WC_INLINE void SetDH(WOLFSSL* ssl)
+{
+ wolfSSL_SetTmpDH(ssl, test_dh_p, sizeof(test_dh_p), test_dh_g,
+ sizeof(test_dh_g));
+}
- wolfSSL_CTX_SetTmpDH(ctx, p, sizeof(p), g, sizeof(g));
+static WC_INLINE void SetDHCtx(WOLFSSL_CTX* ctx)
+{
+ wolfSSL_CTX_SetTmpDH(ctx, test_dh_p, sizeof(test_dh_p), test_dh_g,
+ sizeof(test_dh_g));
}
#endif /* NO_DH */
@@ -3075,12 +3142,6 @@ typedef struct PkCbInfo {
#endif
} PkCbInfo;
-#if defined(DEBUG_PK_CB) || defined(TEST_PK_PRIVKEY)
- #define WOLFSSL_PKMSG(...) printf(__VA_ARGS__)
-#else
- #define WOLFSSL_PKMSG(...) WC_DO_NOTHING
-#endif
-
#ifdef HAVE_ECC
static WC_INLINE int myEccKeyGen(WOLFSSL* ssl, ecc_key* key, word32 keySz,
diff --git a/extra/wolfssl/wolfssl/wolfssl/version.h b/extra/wolfssl/wolfssl/wolfssl/version.h
index c0cad152..d6193c4d 100644
--- a/extra/wolfssl/wolfssl/wolfssl/version.h
+++ b/extra/wolfssl/wolfssl/wolfssl/version.h
@@ -28,8 +28,8 @@
extern "C" {
#endif
-#define LIBWOLFSSL_VERSION_STRING "5.6.6"
-#define LIBWOLFSSL_VERSION_HEX 0x05006006
+#define LIBWOLFSSL_VERSION_STRING "5.7.0"
+#define LIBWOLFSSL_VERSION_HEX 0x05007000
#ifdef __cplusplus
}
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/aes.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/aes.h
index 75653bad..1c369cef 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/aes.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/aes.h
@@ -85,10 +85,14 @@ WOLFSSL_LOCAL void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c,
#ifdef WOLFSSL_XILINX_CRYPT_VERSAL
#include <wolfssl/wolfcrypt/port/xilinx/xil-versal-glue.h>
#include <xsecure_aesclient.h>
-#define WOLFSSL_XILINX_AES_KEY_SRC XSECURE_AES_USER_KEY_0
+#if !defined(WOLFSSL_XILINX_AES_KEY_SRC)
+ #define WOLFSSL_XILINX_AES_KEY_SRC XSECURE_AES_USER_KEY_0
+#endif
#else /* versal */
#include <xsecure_aes.h>
-#define WOLFSSL_XILINX_AES_KEY_SRC XSECURE_CSU_AES_KEY_SRC_KUP
+#if !defined(WOLFSSL_XILINX_AES_KEY_SRC)
+ #define WOLFSSL_XILINX_AES_KEY_SRC XSECURE_CSU_AES_KEY_SRC_KUP
+#endif
#endif /* !versal */
#endif /* WOLFSSL_XILINX_CRYPT */
@@ -175,6 +179,9 @@ enum {
AES_ENC_TYPE = WC_CIPHER_AES, /* cipher unique type */
AES_ENCRYPTION = 0,
AES_DECRYPTION = 1,
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ AES_ENCRYPTION_AND_DECRYPTION = 2,
+#endif
AES_BLOCK_SIZE = 16,
@@ -395,6 +402,9 @@ struct Aes {
#ifdef WOLFSSL_AES_XTS
typedef struct XtsAes {
Aes aes;
+#ifdef WC_AES_XTS_SUPPORT_SIMULTANEOUS_ENC_AND_DEC_KEYS
+ Aes aes_decrypt;
+#endif
Aes tweak;
} XtsAes;
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn.h
index 351517e4..01eb03c2 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn.h
@@ -932,7 +932,11 @@ enum Misc_ASN {
MIN_DATE_SIZE = 12,
MAX_DATE_SIZE = 32,
ASN_GEN_TIME_SZ = 15, /* 7 numbers * 2 + Zulu tag */
-#ifndef NO_RSA
+#ifdef HAVE_SPHINCS
+ MAX_ENCODED_SIG_SZ = 51200,
+#elif defined(HAVE_PQC)
+ MAX_ENCODED_SIG_SZ = 5120,
+#elif !defined(NO_RSA)
#ifdef WOLFSSL_HAPROXY
MAX_ENCODED_SIG_SZ = 1024, /* Supports 8192 bit keys */
#else
@@ -1019,6 +1023,7 @@ enum Misc_ASN {
#endif
TRAILING_ZERO = 1, /* Used for size of zero pad */
ASN_TAG_SZ = 1, /* single byte ASN.1 tag */
+ ASN_INDEF_END_SZ = 2, /* 0x00 0x00 at end of indef */
MIN_VERSION_SZ = 3, /* Min bytes needed for GetMyVersion */
MAX_X509_VERSION = 3, /* Max X509 version allowed */
MIN_X509_VERSION = 0, /* Min X509 version allowed */
@@ -1124,6 +1129,7 @@ enum Block_Sum {
enum Key_Sum {
+ ANONk = 0,
DSAk = 515,
RSAk = 645,
RSAPSSk = 654,
@@ -1135,8 +1141,8 @@ enum Key_Sum {
ED448k = 257, /* 1.3.101.113 */
X448k = 255, /* 1.3.101.111 */
DHk = 647, /* dhKeyAgreement OID: 1.2.840.113549.1.3.1 */
- FALCON_LEVEL1k = 268, /* 1.3.9999.3.1 */
- FALCON_LEVEL5k = 271, /* 1.3.9999.3.4 */
+ FALCON_LEVEL1k = 273, /* 1.3.9999.3.6 */
+ FALCON_LEVEL5k = 276, /* 1.3.9999.3.9 */
DILITHIUM_LEVEL2k = 213, /* 1.3.6.1.4.1.2.267.7.4.4 */
DILITHIUM_LEVEL3k = 216, /* 1.3.6.1.4.1.2.267.7.6.5 */
DILITHIUM_LEVEL5k = 220, /* 1.3.6.1.4.1.2.267.7.8.7 */
@@ -1220,7 +1226,12 @@ enum Extensions_Sum {
AKEY_PACKAGE_OID = 1048, /* 2.16.840.1.101.2.1.2.78.5
RFC 5958 - Asymmetric Key Packages */
FASCN_OID = 419, /* 2.16.840.1.101.3.6.6 Federal PKI Policy FASC-N */
- UPN_OID = 265 /* 1.3.6.1.4.1.311.20.2.3 UPN */
+ UPN_OID = 265, /* 1.3.6.1.4.1.311.20.2.3 UPN */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ SUBJ_ALT_PUB_KEY_INFO_OID = 186, /* 2.5.29.72 subject alt public key info */
+ ALT_SIG_ALG_OID = 187, /* 2.5.29.73 alt sig alg */
+ ALT_SIG_VAL_OID = 188 /* 2.5.29.74 alt sig val */
+#endif
};
enum CertificatePolicy_Sum {
@@ -1925,6 +1936,11 @@ struct DecodedCert {
#ifdef WOLFSSL_SUBJ_INFO_ACC
byte extSubjInfoAccSet : 1;
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ byte extSapkiSet : 1;
+ byte extAltSigAlgSet : 1;
+ byte extAltSigValSet : 1;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#if defined(WOLFSSL_SEP) || defined(WOLFSSL_QT)
byte extCertPolicyCrit : 1;
#endif
@@ -1938,6 +1954,19 @@ struct DecodedCert {
&& defined(HAVE_OID_DECODING)
wc_UnknownExtCallback unknownExtCallback;
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* Subject Alternative Public Key Info */
+ byte *sapkiDer;
+ int sapkiLen;
+ word32 sapkiOID;
+ /* Alternative Signature Algorithm */
+ byte *altSigAlgDer;
+ int altSigAlgLen;
+ word32 altSigAlgOID;
+ /* Alternative Signature Value */
+ byte *altSigValDer;
+ int altSigValLen;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
};
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)
@@ -1987,6 +2016,14 @@ struct Signer {
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_FSPSM_TLS)
word32 cm_idx;
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* The Subject Alternative Public Key Info (SAPKI) will NOT be cached.
+ * Caching of it is NOT SUPPORTED yet. */
+ byte *sapkiDer;
+ int sapkiLen;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
+ byte type;
+
Signer* next;
};
@@ -2065,6 +2102,8 @@ WOLFSSL_LOCAL int GetName(DecodedCert* cert, int nameType, int maxIdx);
WOLFSSL_ASN_API int wc_BerToDer(const byte* ber, word32 berSz, byte* der,
word32* derSz);
+WOLFSSL_LOCAL int StreamOctetString(const byte* inBuf, word32 inBufSz,
+ byte* out, word32* outSz, word32* idx);
WOLFSSL_ASN_API void FreeAltNames(DNS_entry* altNames, void* heap);
WOLFSSL_ASN_API DNS_entry* AltNameNew(void* heap);
@@ -2097,6 +2136,13 @@ WOLFSSL_API int wc_CheckCertSigPubKey(const byte* cert, word32 certSz,
void* heap, const byte* pubKey,
word32 pubKeySz, int pubKeyOID);
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+WOLFSSL_LOCAL int wc_ConfirmAltSignature(
+ const byte* buf, word32 bufSz,
+ const byte* key, word32 keySz, word32 keyOID,
+ const byte* sig, word32 sigSz, word32 sigOID,
+ void *heap);
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#if (defined(HAVE_ED25519) && defined(HAVE_ED25519_KEY_IMPORT) || \
(defined(HAVE_ED448) && defined(HAVE_ED448_KEY_IMPORT)))
WOLFSSL_LOCAL int wc_CertGetPubKey(const byte* cert, word32 certSz,
@@ -2122,6 +2168,8 @@ WOLFSSL_LOCAL const byte* OidFromId(word32 id, word32 type, word32* oidSz);
WOLFSSL_LOCAL Signer* MakeSigner(void* heap);
WOLFSSL_LOCAL void FreeSigner(Signer* signer, void* heap);
WOLFSSL_LOCAL void FreeSignerTable(Signer** table, int rows, void* heap);
+WOLFSSL_LOCAL void FreeSignerTableType(Signer** table, int rows, byte type,
+ void* heap);
#ifdef WOLFSSL_TRUST_PEER_CERT
WOLFSSL_LOCAL void FreeTrustedPeer(TrustedPeerCert* tp, void* heap);
WOLFSSL_LOCAL void FreeTrustedPeerTable(TrustedPeerCert** table, int rows,
@@ -2232,14 +2280,20 @@ WOLFSSL_LOCAL word32 SetASNExplicit(byte number, word32 len, byte* output);
WOLFSSL_LOCAL word32 SetASNSet(word32 len, byte* output);
WOLFSSL_LOCAL word32 SetLength(word32 length, byte* output);
+WOLFSSL_LOCAL word32 SetLengthEx(word32 length, byte* output, byte isIndef);
WOLFSSL_LOCAL word32 SetSequence(word32 len, byte* output);
+WOLFSSL_LOCAL word32 SetSequenceEx(word32 len, byte* output, byte isIndef);
+WOLFSSL_LOCAL word32 SetIndefEnd(byte* output);
WOLFSSL_LOCAL word32 SetOctetString(word32 len, byte* output);
+WOLFSSL_LOCAL word32 SetOctetStringEx(word32 len, byte* output, byte indef);
WOLFSSL_LOCAL int SetASNInt(int len, byte firstByte, byte* output);
WOLFSSL_LOCAL word32 SetBitString(word32 len, byte unusedBits, byte* output);
-WOLFSSL_LOCAL word32 SetImplicit(byte tag,byte number,word32 len,byte* output);
-WOLFSSL_LOCAL word32 SetExplicit(byte number, word32 len, byte* output);
+WOLFSSL_LOCAL word32 SetImplicit(byte tag,byte number,word32 len,byte* output,
+ byte isIndef);
+WOLFSSL_LOCAL word32 SetExplicit(byte number, word32 len, byte* output,
+ byte isIndef);
WOLFSSL_LOCAL word32 SetSet(word32 len, byte* output);
-WOLFSSL_LOCAL word32 SetAlgoID(int algoOID,byte* output,int type,int curveSz);
+WOLFSSL_API word32 SetAlgoID(int algoOID, byte* output, int type, int curveSz);
WOLFSSL_LOCAL int SetMyVersion(word32 version, byte* output, int header);
WOLFSSL_LOCAL int SetSerialNumber(const byte* sn, word32 snSz, byte* output,
word32 outputSz, int maxSnSz);
@@ -2547,6 +2601,10 @@ struct DecodedCRL {
word32 sigIndex; /* offset to start of signature */
word32 sigLength; /* length of signature */
word32 signatureOID; /* sum of algorithm object id */
+#ifdef WC_RSA_PSS
+ word32 sigParamsIndex; /* start of signature parameters */
+ word32 sigParamsLength; /* length of signature parameters */
+#endif
byte* signature; /* pointer into raw source, not owned */
byte issuerHash[SIGNER_DIGEST_SIZE]; /* issuer name hash */
byte crlHash[SIGNER_DIGEST_SIZE]; /* raw crl data hash */
@@ -2573,8 +2631,8 @@ WOLFSSL_LOCAL void InitDecodedCRL(DecodedCRL* dcrl, void* heap);
WOLFSSL_LOCAL int VerifyCRL_Signature(SignatureCtx* sigCtx,
const byte* toBeSigned, word32 tbsSz,
const byte* signature, word32 sigSz,
- word32 signatureOID, Signer *ca,
- void* heap);
+ word32 signatureOID, const byte* sigParams,
+ int sigParamsSz, Signer *ca, void* heap);
WOLFSSL_LOCAL int ParseCRL(RevokedCert* rcert, DecodedCRL* dcrl,
const byte* buff, word32 sz, int verify, void* cm);
WOLFSSL_LOCAL void FreeDecodedCRL(DecodedCRL* dcrl);
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn_public.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn_public.h
index a4395ed0..0f58152d 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn_public.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/asn_public.h
@@ -141,6 +141,7 @@ enum EncPkcs8Types {
enum CertType {
CERT_TYPE = 0,
PRIVATEKEY_TYPE,
+ ALT_PRIVATEKEY_TYPE,
DH_PARAM_TYPE,
DSA_PARAM_TYPE,
CRL_TYPE,
@@ -214,8 +215,8 @@ enum Ctc_SigType {
CTC_ED25519 = 256,
CTC_ED448 = 257,
- CTC_FALCON_LEVEL1 = 268,
- CTC_FALCON_LEVEL5 = 271,
+ CTC_FALCON_LEVEL1 = 273,
+ CTC_FALCON_LEVEL5 = 276,
CTC_DILITHIUM_LEVEL2 = 213,
CTC_DILITHIUM_LEVEL3 = 216,
@@ -513,6 +514,19 @@ typedef struct Cert {
byte issRaw[sizeof(CertName)]; /* raw issuer info */
byte sbjRaw[sizeof(CertName)]; /* raw subject info */
#endif
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+ /* These will not point to managed buffers. They will point to buffers that
+ * are managed by others. No cleanup neccessary. */
+ /* Subject Alternative Public Key Info */
+ byte *sapkiDer;
+ int sapkiLen;
+ /* Alternative Signature Algorithm */
+ byte *altSigAlgDer;
+ int altSigAlgLen;
+ /* Alternative Signature Value */
+ byte *altSigValDer;
+ int altSigValLen;
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
#ifdef WOLFSSL_CERT_REQ
char challengePw[CTC_NAME_SIZE];
char unstructuredName[CTC_NAME_SIZE];
@@ -572,6 +586,11 @@ WOLFSSL_API int wc_SignCert_ex(int requestSz, int sType, byte* buf,
WC_RNG* rng);
WOLFSSL_API int wc_SignCert(int requestSz, int sType, byte* buf, word32 buffSz,
RsaKey* rsaKey, ecc_key* eccKey, WC_RNG* rng);
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+WOLFSSL_API int wc_MakeSigWithBitStr(byte *sig, int sigSz, int sType, byte* buf,
+ word32 bufSz, int keyType, void* key,
+ WC_RNG* rng);
+#endif
WOLFSSL_ABI
WOLFSSL_API int wc_MakeSelfCert(Cert* cert, byte* buf, word32 buffSz,
RsaKey* key, WC_RNG* rng);
@@ -704,7 +723,6 @@ WOLFSSL_API void wc_FreeDer(DerBuffer** pDer);
#endif
#ifndef NO_RSA
- #if !defined(HAVE_USER_RSA)
WOLFSSL_API int wc_RsaPublicKeyDecode_ex(const byte* input, word32* inOutIdx,
word32 inSz, const byte** n, word32* nSz, const byte** e, word32* eSz);
/* For FIPS v1/v2 and selftest this is in rsa.h */
@@ -717,7 +735,6 @@ WOLFSSL_API void wc_FreeDer(DerBuffer** pDer);
(! ((HAVE_FIPS_VERSION == 5) && (HAVE_FIPS_VERSION_MINOR == 0)))))
WOLFSSL_API int wc_RsaKeyToPublicDer(RsaKey* key, byte* output, word32 inLen);
#endif
- #endif /* !HAVE_USER_RSA */
WOLFSSL_API int wc_RsaPublicKeyDerSize(RsaKey* key, int with_header);
WOLFSSL_API int wc_RsaKeyToPublicDer_ex(RsaKey* key, byte* output, word32 inLen,
int with_header);
@@ -943,6 +960,11 @@ WOLFSSL_API int wc_GetFASCNFromCert(struct DecodedCert* cert,
byte* fascn, word32* fascnSz);
#endif /* WOLFSSL_FPKI */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
+WOLFSSL_API int wc_GeneratePreTBS(struct DecodedCert* cert, byte *der,
+ int derSz);
+#endif
+
#if !defined(XFPRINTF) || defined(NO_FILESYSTEM) || \
defined(NO_STDIO_FILESYSTEM) && defined(WOLFSSL_ASN_PRINT)
#undef WOLFSSL_ASN_PRINT
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cmac.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cmac.h
index 5fbda43c..e59df284 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cmac.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cmac.h
@@ -111,11 +111,25 @@ WOLFSSL_API
int wc_AesCmacGenerate(byte* out, word32* outSz,
const byte* in, word32 inSz,
const byte* key, word32 keySz);
+WOLFSSL_API
+int wc_AesCmacGenerate_ex(Cmac *cmac,
+ byte* out, word32* outSz,
+ const byte* in, word32 inSz,
+ const byte* key, word32 keySz,
+ void* heap,
+ int devId);
WOLFSSL_API
int wc_AesCmacVerify(const byte* check, word32 checkSz,
const byte* in, word32 inSz,
const byte* key, word32 keySz);
+WOLFSSL_API
+int wc_AesCmacVerify_ex(Cmac* cmac,
+ const byte* check, word32 checkSz,
+ const byte* in, word32 inSz,
+ const byte* key, word32 keySz,
+ void* heap,
+ int devId);
WOLFSSL_LOCAL
void ShiftAndXorRb(byte* out, byte* in);
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cpuid.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cpuid.h
index 9e04328f..9d25dcf3 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cpuid.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cpuid.h
@@ -50,6 +50,7 @@
#define CPUID_ADX 0x0040 /* ADCX, ADOX */
#define CPUID_MOVBE 0x0080 /* Move and byte swap */
#define CPUID_BMI1 0x0100 /* ANDN */
+ #define CPUID_SHA 0x0200 /* SHA-1 and SHA-256 instructions */
#define IS_INTEL_AVX1(f) ((f) & CPUID_AVX1)
#define IS_INTEL_AVX2(f) ((f) & CPUID_AVX2)
@@ -60,6 +61,7 @@
#define IS_INTEL_ADX(f) ((f) & CPUID_ADX)
#define IS_INTEL_MOVBE(f) ((f) & CPUID_MOVBE)
#define IS_INTEL_BMI1(f) ((f) & CPUID_BMI1)
+ #define IS_INTEL_SHA(f) ((f) & CPUID_SHA)
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cryptocb.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cryptocb.h
index cf38444f..8f667775 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cryptocb.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/cryptocb.h
@@ -71,6 +71,21 @@
#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
#include <wolfssl/wolfcrypt/sha512.h>
#endif
+#ifdef HAVE_PQC
+ #include <wolfssl/wolfcrypt/kyber.h>
+#ifdef WOLFSSL_WC_KYBER
+ #include <wolfssl/wolfcrypt/wc_kyber.h>
+#elif defined(HAVE_LIBOQS) || defined(HAVE_PQM4)
+ #include <wolfssl/wolfcrypt/ext_kyber.h>
+#endif
+#endif
+#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
+ #include <wolfssl/wolfcrypt/dilithium.h>
+#endif
+#if defined(HAVE_PQC) && defined(HAVE_FALCON)
+ #include <wolfssl/wolfcrypt/falcon.h>
+#endif
+
#ifdef WOLF_CRYPTO_CB_CMD
/* CryptoCb Commands */
@@ -201,6 +216,64 @@ typedef struct wc_CryptoInfo {
byte contextLen;
} ed25519verify;
#endif
+ #if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER)
+ struct {
+ WC_RNG* rng;
+ int size;
+ void* key;
+ int type; /* enum wc_PqcKemType */
+ } pqc_kem_kg;
+ struct {
+ byte* ciphertext;
+ word32 ciphertextLen;
+ byte* sharedSecret;
+ word32 sharedSecretLen;
+ WC_RNG* rng;
+ void* key;
+ int type; /* enum wc_PqcKemType */
+ } pqc_encaps;
+ struct {
+ const byte* ciphertext;
+ word32 ciphertextLen;
+ byte* sharedSecret;
+ word32 sharedSecretLen;
+ void* key;
+ int type; /* enum wc_PqcKemType */
+ } pqc_decaps;
+ #endif
+ #if defined(HAVE_PQC) && \
+ (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM))
+ struct {
+ WC_RNG* rng;
+ int size;
+ void* key;
+ int type; /* enum wc_PqcSignatureType */
+ } pqc_sig_kg;
+ struct {
+ const byte* in;
+ word32 inlen;
+ byte* out;
+ word32* outlen;
+ WC_RNG* rng;
+ void* key;
+ int type; /* enum wc_PqcSignatureType */
+ } pqc_sign;
+ struct {
+ const byte* sig;
+ word32 siglen;
+ const byte* msg;
+ word32 msglen;
+ int* res;
+ void* key;
+ int type; /* enum wc_PqcSignatureType */
+ } pqc_verify;
+ struct {
+ void* key;
+ const byte* pubKey;
+ word32 pubKeySz;
+ int type; /* enum wc_PqcSignatureType */
+ } pqc_sig_check;
+ #endif
#if HAVE_ANONYMOUS_INLINE_AGGREGATES
};
#endif
@@ -296,6 +369,7 @@ typedef struct wc_CryptoInfo {
word32 sz;
} des3;
#endif
+ void* ctx;
#if HAVE_ANONYMOUS_INLINE_AGGREGATES
};
#endif
@@ -326,6 +400,7 @@ typedef struct wc_CryptoInfo {
#ifdef WOLFSSL_SHA512
wc_Sha512* sha512;
#endif
+ void* ctx;
#if HAVE_ANONYMOUS_INLINE_AGGREGATES
};
#endif
@@ -450,6 +525,37 @@ WOLFSSL_LOCAL int wc_CryptoCb_Ed25519Verify(const byte* sig, word32 sigLen,
const byte* context, byte contextLen);
#endif /* HAVE_ED25519 */
+#if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER)
+WOLFSSL_LOCAL int wc_CryptoCb_PqcKemGetDevId(int type, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_MakePqcKemKey(WC_RNG* rng, int type,
+ int keySize, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_PqcEncapsulate(byte* ciphertext,
+ word32 ciphertextLen, byte* sharedSecret, word32 sharedSecretLen,
+ WC_RNG* rng, int type, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_PqcDecapsulate(const byte* ciphertext,
+ word32 ciphertextLen, byte* sharedSecret, word32 sharedSecretLen,
+ int type, void* key);
+#endif /* HAVE_PQC && WOLFSSL_HAVE_KYBER */
+
+#if defined(HAVE_PQC) && (defined(HAVE_FALCON) || defined(HAVE_DILITHIUM))
+WOLFSSL_LOCAL int wc_CryptoCb_PqcSigGetDevId(int type, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_MakePqcSignatureKey(WC_RNG* rng, int type,
+ int keySize, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_PqcSign(const byte* in, word32 inlen, byte* out,
+ word32 *outlen, WC_RNG* rng, int type, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_PqcVerify(const byte* sig, word32 siglen,
+ const byte* msg, word32 msglen, int* res, int type, void* key);
+
+WOLFSSL_LOCAL int wc_CryptoCb_PqcSignatureCheckPrivKey(void* key, int type,
+ const byte* pubKey, word32 pubKeySz);
+#endif /* HAVE_PQC && (HAVE_FALCON || HAVE_DILITHIUM) */
+
#ifndef NO_AES
#ifdef HAVE_AESGCM
WOLFSSL_LOCAL int wc_CryptoCb_AesGcmEncrypt(Aes* aes, byte* out,
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/dilithium.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/dilithium.h
index 896976c5..5472d092 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/dilithium.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/dilithium.h
@@ -31,10 +31,15 @@
#include <wolfssl/wolfcrypt/types.h>
+#ifdef WOLF_CRYPTO_CB
+ #include <wolfssl/wolfcrypt/cryptocb.h>
+#endif
+
#if defined(HAVE_PQC) && defined(HAVE_DILITHIUM)
#ifdef HAVE_LIBOQS
#include <oqs/oqs.h>
+#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
#endif
#ifdef __cplusplus
@@ -60,17 +65,34 @@
#define DILITHIUM_LEVEL5_PRV_KEY_SIZE (DILITHIUM_LEVEL5_PUB_KEY_SIZE+DILITHIUM_LEVEL5_KEY_SIZE)
#endif
-#define DILITHIUM_MAX_KEY_SIZE DILITHIUM_LEVEL5_PRV_KEY_SIZE
+#define DILITHIUM_MAX_KEY_SIZE DILITHIUM_LEVEL5_KEY_SIZE
#define DILITHIUM_MAX_SIG_SIZE DILITHIUM_LEVEL5_SIG_SIZE
#define DILITHIUM_MAX_PUB_KEY_SIZE DILITHIUM_LEVEL5_PUB_KEY_SIZE
#define DILITHIUM_MAX_PRV_KEY_SIZE DILITHIUM_LEVEL5_PRV_KEY_SIZE
+#ifdef WOLF_PRIVATE_KEY_ID
+#define DILITHIUM_MAX_ID_LEN 32
+#define DILITHIUM_MAX_LABEL_LEN 32
+#endif
+
/* Structs */
struct dilithium_key {
bool pubKeySet;
bool prvKeySet;
byte level; /* 2,3 or 5 */
+
+#ifdef WOLF_CRYPTO_CB
+ void* devCtx;
+ int devId;
+#endif
+#ifdef WOLF_PRIVATE_KEY_ID
+ byte id[DILITHIUM_MAX_ID_LEN];
+ int idLen;
+ char label[DILITHIUM_MAX_LABEL_LEN];
+ int labelLen;
+#endif
+
byte p[DILITHIUM_MAX_PUB_KEY_SIZE];
byte k[DILITHIUM_MAX_PRV_KEY_SIZE];
};
@@ -84,13 +106,26 @@ struct dilithium_key {
WOLFSSL_API
int wc_dilithium_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen,
- dilithium_key* key);
+ dilithium_key* key, WC_RNG* rng);
WOLFSSL_API
int wc_dilithium_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
word32 msgLen, int* res, dilithium_key* key);
WOLFSSL_API
int wc_dilithium_init(dilithium_key* key);
+
+WOLFSSL_API
+int wc_dilithium_init_ex(dilithium_key* key, void* heap, int devId);
+
+#ifdef WOLF_PRIVATE_KEY_ID
+WOLFSSL_API
+int wc_dilithium_init_id(dilithium_key* key, const unsigned char* id, int len,
+ void* heap, int devId);
+WOLFSSL_API
+int wc_dilithium_init_label(dilithium_key* key, const char* label, void* heap,
+ int devId);
+#endif
+
WOLFSSL_API
int wc_dilithium_set_level(dilithium_key* key, byte level);
WOLFSSL_API
@@ -109,7 +144,7 @@ int wc_dilithium_import_private_key(const byte* priv, word32 privSz,
dilithium_key* key);
WOLFSSL_API
-int wc_dilithium_export_public(dilithium_key*, byte* out, word32* outLen);
+int wc_dilithium_export_public(dilithium_key* key, byte* out, word32* outLen);
WOLFSSL_API
int wc_dilithium_export_private_only(dilithium_key* key, byte* out, word32* outLen);
WOLFSSL_API
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ecc.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ecc.h
index 5f67d2d6..2d7ee320 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ecc.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ecc.h
@@ -659,10 +659,8 @@ WOLFSSL_LOCAL
int wc_ecc_shared_secret_gen_sync(ecc_key* private_key,
ecc_point* point, byte* out, word32* outlen);
-#if defined(WOLFSSL_ATECC508A) || defined(WOLFSSL_ATECC608A) || \
- defined(PLUTON_CRYPTO_ECC) || defined(WOLFSSL_CRYPTOCELL)
-#define wc_ecc_shared_secret_ssh wc_ecc_shared_secret
-#else
+#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
+ !defined(PLUTON_CRYPTO_ECC) && !defined(WOLFSSL_CRYPTOCELL)
#define wc_ecc_shared_secret_ssh wc_ecc_shared_secret_ex /* For backwards compat */
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed25519.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed25519.h
index 0d6ef49f..9748d6df 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed25519.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed25519.h
@@ -31,8 +31,6 @@
#ifdef HAVE_ED25519
-#include <wolfssl/wolfcrypt/fe_operations.h>
-#include <wolfssl/wolfcrypt/ge_operations.h>
#include <wolfssl/wolfcrypt/random.h>
#ifndef WOLFSSL_SHA512
#error ED25519 requires SHA512
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed448.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed448.h
index b45671d7..48011fce 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed448.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ed448.h
@@ -80,7 +80,7 @@ enum {
/* An ED448 Key */
struct ed448_key {
byte p[ED448_PUB_KEY_SIZE]; /* compressed public key */
- byte k[ED448_PRV_KEY_SIZE]; /* private key : 56 secret -- 56 public */
+ byte k[ED448_PRV_KEY_SIZE]; /* private key : 57 secret -- 57 public */
#ifdef FREESCALE_LTC_ECC
/* uncompressed point coordinates */
byte pointX[ED448_KEY_SIZE]; /* recovered X coordinate */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/error-crypt.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/error-crypt.h
index d29ac13b..99afb966 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/error-crypt.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/error-crypt.h
@@ -65,11 +65,17 @@ enum {
MP_ZERO_E = -121, /* got a mp zero result, not expected */
AES_EAX_AUTH_E = -122, /* AES-EAX Authentication check failure */
+ KEY_EXHAUSTED_E = -123, /* No longer usable for operation. */
+
+ /* -124 unused. */
MEMORY_E = -125, /* out of memory error */
VAR_STATE_CHANGE_E = -126, /* var state modified by different thread */
FIPS_DEGRADED_E = -127, /* FIPS Module in degraded mode */
+ /* -128 unused. */
+ /* -129 unused. */
+
RSA_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */
RSA_BUFFER_E = -131, /* RSA buffer error, output too small or
input too large */
@@ -101,10 +107,13 @@ enum {
ASN_SIG_HASH_E = -156, /* ASN sig error, unsupported hash type */
ASN_SIG_KEY_E = -157, /* ASN sig error, unsupported key type */
ASN_DH_KEY_E = -158, /* ASN key init error, invalid input */
+ /* -159 unused. */
ASN_CRIT_EXT_E = -160, /* ASN unsupported critical extension */
ASN_ALT_NAME_E = -161, /* ASN alternate name error */
ASN_NO_PEM_HEADER = -162, /* ASN no PEM header found */
+ /* -163..-169 unused. */
+
ECC_BAD_ARG_E = -170, /* ECC input argument of wrong type */
ASN_ECC_KEY_E = -171, /* ASN ECC bad input */
ECC_CURVE_OID_E = -172, /* Unsupported ECC OID curve type */
@@ -182,6 +191,8 @@ enum {
SIG_TYPE_E = -231, /* Signature Type not enabled/available */
HASH_TYPE_E = -232, /* Hash Type not enabled/available */
+ /* -233 unused. */
+
WC_KEY_SIZE_E = -234, /* Key size error, either too small or large */
ASN_COUNTRY_SIZE_E = -235, /* ASN Cert Gen, invalid country code size */
MISSING_RNG_E = -236, /* RNG required but not provided */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ext_kyber.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ext_kyber.h
index 53c175d7..0ea7108b 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ext_kyber.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ext_kyber.h
@@ -22,6 +22,10 @@
#ifndef EXT_KYBER_H
#define EXT_KYBER_H
+#ifdef WOLF_CRYPTO_CB
+ #include <wolfssl/wolfcrypt/cryptocb.h>
+#endif
+
#ifdef WOLFSSL_HAVE_KYBER
#include <wolfssl/wolfcrypt/kyber.h>
@@ -56,6 +60,12 @@ struct KyberKey {
* Note we don't save the variant (SHAKE vs AES) as that is decided at
* configuration time. */
int type;
+
+#ifdef WOLF_CRYPTO_CB
+ void* devCtx;
+ int devId;
+#endif
+
byte priv[EXT_KYBER_MAX_PRIV_SZ];
byte pub[EXT_KYBER_MAX_PUB_SZ];
};
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/falcon.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/falcon.h
index cced2b05..9d4bff8b 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/falcon.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/falcon.h
@@ -31,10 +31,15 @@
#include <wolfssl/wolfcrypt/types.h>
+#ifdef WOLF_CRYPTO_CB
+ #include <wolfssl/wolfcrypt/cryptocb.h>
+#endif
+
#if defined(HAVE_PQC) && defined(HAVE_FALCON)
#ifdef HAVE_LIBOQS
#include <oqs/oqs.h>
+#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
#endif
#ifdef __cplusplus
@@ -55,17 +60,35 @@
#define FALCON_LEVEL5_PRV_KEY_SIZE (FALCON_LEVEL5_PUB_KEY_SIZE+FALCON_LEVEL5_KEY_SIZE)
#endif
-#define FALCON_MAX_KEY_SIZE FALCON_LEVEL5_PRV_KEY_SIZE
+#define FALCON_MAX_KEY_SIZE FALCON_LEVEL5_KEY_SIZE
#define FALCON_MAX_SIG_SIZE FALCON_LEVEL5_SIG_SIZE
#define FALCON_MAX_PUB_KEY_SIZE FALCON_LEVEL5_PUB_KEY_SIZE
#define FALCON_MAX_PRV_KEY_SIZE FALCON_LEVEL5_PRV_KEY_SIZE
+#ifdef WOLF_PRIVATE_KEY_ID
+#define FALCON_MAX_ID_LEN 32
+#define FALCON_MAX_LABEL_LEN 32
+#endif
+
+
/* Structs */
struct falcon_key {
bool pubKeySet;
bool prvKeySet;
byte level;
+
+#ifdef WOLF_CRYPTO_CB
+ void* devCtx;
+ int devId;
+#endif
+#ifdef WOLF_PRIVATE_KEY_ID
+ byte id[FALCON_MAX_ID_LEN];
+ int idLen;
+ char label[FALCON_MAX_LABEL_LEN];
+ int labelLen;
+#endif
+
byte p[FALCON_MAX_PUB_KEY_SIZE];
byte k[FALCON_MAX_PRV_KEY_SIZE];
};
@@ -79,13 +102,26 @@ struct falcon_key {
WOLFSSL_API
int wc_falcon_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen,
- falcon_key* key);
+ falcon_key* key, WC_RNG* rng);
WOLFSSL_API
int wc_falcon_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
word32 msgLen, int* res, falcon_key* key);
WOLFSSL_API
int wc_falcon_init(falcon_key* key);
+
+WOLFSSL_API
+int wc_falcon_init_ex(falcon_key* key, void* heap, int devId);
+
+#ifdef WOLF_PRIVATE_KEY_ID
+WOLFSSL_API
+int wc_falcon_init_id(falcon_key* key, const unsigned char* id, int len,
+ void* heap, int devId);
+WOLFSSL_API
+int wc_falcon_init_label(falcon_key* key, const char* label, void* heap,
+ int devId);
+#endif
+
WOLFSSL_API
int wc_falcon_set_level(falcon_key* key, byte level);
WOLFSSL_API
@@ -104,7 +140,7 @@ int wc_falcon_import_private_key(const byte* priv, word32 privSz,
falcon_key* key);
WOLFSSL_API
-int wc_falcon_export_public(falcon_key*, byte* out, word32* outLen);
+int wc_falcon_export_public(falcon_key* key, byte* out, word32* outLen);
WOLFSSL_API
int wc_falcon_export_private_only(falcon_key* key, byte* out, word32* outLen);
WOLFSSL_API
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ge_448.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ge_448.h
index 760ef2f5..38ac71a2 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ge_448.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/ge_448.h
@@ -64,7 +64,7 @@ WOLFSSL_LOCAL int ge448_from_bytes_negate_vartime(ge448_p2 *r, const byte *b);
WOLFSSL_LOCAL int ge448_double_scalarmult_vartime(ge448_p2 *r, const byte *a,
const ge448_p2 *A, const byte *b);
-WOLFSSL_LOCAL void ge448_scalarmult_base(ge448_p2* h, const byte* a);
+WOLFSSL_LOCAL int ge448_scalarmult_base(ge448_p2* h, const byte* a);
WOLFSSL_LOCAL void sc448_reduce(byte* b);
WOLFSSL_LOCAL void sc448_muladd(byte* r, const byte* a, const byte* b, const byte* d);
WOLFSSL_LOCAL void ge448_to_bytes(byte *s, const ge448_p2 *h);
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hash.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hash.h
index b8079ba2..27b14237 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hash.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hash.h
@@ -170,6 +170,9 @@ WOLFSSL_API int wc_HashGetBlockSize(enum wc_HashType hash_type);
WOLFSSL_API int wc_Hash(enum wc_HashType hash_type,
const byte* data, word32 data_len,
byte* hash, word32 hash_len);
+WOLFSSL_API int wc_Hash_ex(enum wc_HashType hash_type,
+ const byte* data, word32 data_len,
+ byte* hash, word32 hash_len, void* heap, int devId);
/* generic hash operation wrappers */
WOLFSSL_API int wc_HashInit_ex(wc_HashAlg* hash, enum wc_HashType type,
@@ -191,26 +194,36 @@ WOLFSSL_API int wc_HashFree(wc_HashAlg* hash, enum wc_HashType type);
#ifndef NO_MD5
#include <wolfssl/wolfcrypt/md5.h>
WOLFSSL_API int wc_Md5Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Md5Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif
#ifndef NO_SHA
#include <wolfssl/wolfcrypt/sha.h>
WOLFSSL_API int wc_ShaHash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_ShaHash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif
#ifdef WOLFSSL_SHA224
#include <wolfssl/wolfcrypt/sha256.h>
WOLFSSL_API int wc_Sha224Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Sha224Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif /* defined(WOLFSSL_SHA224) */
#ifndef NO_SHA256
#include <wolfssl/wolfcrypt/sha256.h>
WOLFSSL_API int wc_Sha256Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Sha256Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif
#ifdef WOLFSSL_SHA384
#include <wolfssl/wolfcrypt/sha512.h>
WOLFSSL_API int wc_Sha384Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Sha384Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif /* defined(WOLFSSL_SHA384) */
#ifdef WOLFSSL_SHA512
@@ -218,6 +231,12 @@ WOLFSSL_API int wc_Sha384Hash(const byte* data, word32 len, byte* hash);
WOLFSSL_API int wc_Sha512Hash(const byte* data, word32 len, byte* hash);
WOLFSSL_API int wc_Sha512_224Hash(const byte* data, word32 len, byte* hash);
WOLFSSL_API int wc_Sha512_256Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Sha512Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
+WOLFSSL_API int wc_Sha512_224Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
+WOLFSSL_API int wc_Sha512_256Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif /* WOLFSSL_SHA512 */
#ifdef WOLFSSL_SHA3
@@ -226,18 +245,32 @@ WOLFSSL_API int wc_Sha3_224Hash(const byte* data, word32 len, byte* hash);
WOLFSSL_API int wc_Sha3_256Hash(const byte* data, word32 len, byte* hash);
WOLFSSL_API int wc_Sha3_384Hash(const byte* data, word32 len, byte* hash);
WOLFSSL_API int wc_Sha3_512Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Sha3_224Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
+WOLFSSL_API int wc_Sha3_256Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
+WOLFSSL_API int wc_Sha3_384Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
+WOLFSSL_API int wc_Sha3_512Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#ifdef WOLFSSL_SHAKE128
WOLFSSL_API int wc_Shake128Hash(const byte* data, word32 len, byte* hash,
word32 hashLen);
+WOLFSSL_API int wc_Shake128Hash_ex(const byte* data, word32 len, byte* hash,
+ word32 hashLen, void* heap, int devId);
#endif
#ifdef WOLFSSL_SHAKE256
WOLFSSL_API int wc_Shake256Hash(const byte* data, word32 len, byte* hash,
word32 hashLen);
+WOLFSSL_API int wc_Shake256Hash_ex(const byte* data, word32 len, byte* hash,
+ word32 hashLen, void* heap, int devId);
#endif
#endif /* WOLFSSL_SHA3 */
#ifdef WOLFSSL_SM3
WOLFSSL_API int wc_Sm3Hash(const byte* data, word32 len, byte* hash);
+WOLFSSL_API int wc_Sm3Hash_ex(const byte* data, word32 len, byte* hash,
+ void* heap, int devId);
#endif
#endif /* !NO_HASH_WRAPPER */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hmac.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hmac.h
index f325dd35..929d8b2b 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hmac.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/hmac.h
@@ -210,8 +210,16 @@ WOLFSSL_LOCAL int _InitHmac(Hmac* hmac, int type, void* heap);
#ifdef HAVE_HKDF
+WOLFSSL_API int wc_HKDF_Extract_ex(int type, const byte* salt, word32 saltSz,
+ const byte* inKey, word32 inKeySz, byte* out,
+ void* heap, int devId);
+
WOLFSSL_API int wc_HKDF_Extract(int type, const byte* salt, word32 saltSz,
const byte* inKey, word32 inKeySz, byte* out);
+
+WOLFSSL_API int wc_HKDF_Expand_ex(int type, const byte* inKey, word32 inKeySz,
+ const byte* info, word32 infoSz,
+ byte* out, word32 outSz, void* heap, int devId);
WOLFSSL_API int wc_HKDF_Expand(int type, const byte* inKey, word32 inKeySz,
const byte* info, word32 infoSz,
byte* out, word32 outSz);
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/include.am b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/include.am
index dfdc80ac..dbe67c59 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/include.am
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/include.am
@@ -144,6 +144,10 @@ nobase_include_HEADERS+= wolfssl/wolfcrypt/port/aria/aria-crypt.h
nobase_include_HEADERS+= wolfssl/wolfcrypt/port/aria/aria-cryptocb.h
endif
+if BUILD_LIBOQS
+nobase_include_HEADERS+= wolfssl/wolfcrypt/port/liboqs/liboqs.h
+endif
+
if BUILD_ASYNCCRYPT
nobase_include_HEADERS+= wolfssl/wolfcrypt/async.h
endif
@@ -218,3 +222,11 @@ endif
if BUILD_MAXQ10XX
nobase_include_HEADERS+= wolfssl/wolfcrypt/port/maxim/maxq10xx.h
endif
+
+if BUILD_AUTOSAR
+nobase_include_HEADERS+= wolfssl/wolfcrypt/port/autosar/Csm.h
+nobase_include_HEADERS+= wolfssl/wolfcrypt/port/autosar/CryIf.h
+nobase_include_HEADERS+= wolfssl/wolfcrypt/port/autosar/Crypto.h
+nobase_include_HEADERS+= wolfssl/wolfcrypt/port/autosar/StandardTypes.h
+endif
+
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kdf.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kdf.h
index 6a6a8569..7fa3c7e7 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kdf.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kdf.h
@@ -76,9 +76,20 @@ enum {
MAX_TLS13_HKDF_LABEL_SZ = 47 + WC_MAX_DIGEST_SIZE
};
+WOLFSSL_API int wc_Tls13_HKDF_Extract_ex(byte* prk, const byte* salt,
+ word32 saltLen, byte* ikm, word32 ikmLen, int digest,
+ void* heap, int devId);
+
WOLFSSL_API int wc_Tls13_HKDF_Extract(byte* prk, const byte* salt,
word32 saltLen, byte* ikm, word32 ikmLen, int digest);
+WOLFSSL_API int wc_Tls13_HKDF_Expand_Label_ex(byte* okm, word32 okmLen,
+ const byte* prk, word32 prkLen,
+ const byte* protocol, word32 protocolLen,
+ const byte* label, word32 labelLen,
+ const byte* info, word32 infoLen,
+ int digest, void* heap, int devId);
+
WOLFSSL_API int wc_Tls13_HKDF_Expand_Label(byte* okm, word32 okmLen,
const byte* prk, word32 prkLen,
const byte* protocol, word32 protocolLen,
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kyber.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kyber.h
index 7ac4ebd6..5132e127 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kyber.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/kyber.h
@@ -49,12 +49,12 @@
/* Size of a polynomial vector based on dimensions. */
-#define KYBER_POLY_VEC_SZ(k) (k * KYBER_POLY_SIZE)
+#define KYBER_POLY_VEC_SZ(k) ((k) * KYBER_POLY_SIZE)
/* Size of a compressed polynomial based on bits per coefficient. */
-#define KYBER_POLY_COMPRESSED_SZ(b) (b * (KYBER_N / 8))
+#define KYBER_POLY_COMPRESSED_SZ(b) ((b) * (KYBER_N / 8))
/* Size of a compressed vector polynomial based on dimensions and bits per
* coefficient. */
-#define KYBER_POLY_VEC_COMPRESSED_SZ(k, b) (k * (b * (KYBER_N / 8)))
+#define KYBER_POLY_VEC_COMPRESSED_SZ(k, b) ((k) * ((b) * (KYBER_N / 8)))
/* Kyber-512 parameters */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/logging.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/logging.h
index 498b605e..4eee1fa6 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/logging.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/logging.h
@@ -89,6 +89,11 @@ enum wc_FuncNum {
};
#endif
+#if defined(ARDUINO)
+/* implemented in Arduino wolfssl.h */
+extern WOLFSSL_API int wolfSSL_Arduino_Serial_Print(const char* const s);
+#endif /* ARDUINO */
+
typedef void (*wolfSSL_Logging_cb)(const int logLevel,
const char *const logMessage);
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/memory.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/memory.h
index cf832731..9a1d7b06 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/memory.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/memory.h
@@ -267,6 +267,13 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
((void)(CipherLifecycleTag), (void)(heap), (void)(abort_p), 0)
#endif
+#ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING
+ WOLFSSL_LOCAL int SAVE_VECTOR_REGISTERS2_fuzzer(void);
+ #ifndef WC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED
+ #define WC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED 0
+ #endif
+#endif
+
#ifdef DEBUG_VECTOR_REGISTER_ACCESS
WOLFSSL_API extern THREAD_LS_T int wc_svr_count;
WOLFSSL_API extern THREAD_LS_T const char *wc_svr_last_file;
@@ -276,27 +283,29 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
#define DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE abort();
#elif defined(DEBUG_VECTOR_REGISTERS_EXIT_ON_FAIL)
#define DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE exit(1);
- #else
+ #elif !defined(DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE)
#define DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE
#endif
#define SAVE_VECTOR_REGISTERS(fail_clause) { \
int _svr_ret = wc_debug_vector_registers_retval; \
if (_svr_ret != 0) { fail_clause } \
- ++wc_svr_count; \
- if (wc_svr_count > 5) { \
- fprintf(stderr, \
- ("%s @ L%d : incr : " \
- "wc_svr_count %d (last op %s L%d)\n"), \
- __FILE__, \
- __LINE__, \
- wc_svr_count, \
- wc_svr_last_file, \
- wc_svr_last_line); \
- DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE \
+ else { \
+ ++wc_svr_count; \
+ if (wc_svr_count > 5) { \
+ fprintf(stderr, \
+ ("%s @ L%d : incr : " \
+ "wc_svr_count %d (last op %s L%d)\n"), \
+ __FILE__, \
+ __LINE__, \
+ wc_svr_count, \
+ wc_svr_last_file, \
+ wc_svr_last_line); \
+ DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE \
+ } \
+ wc_svr_last_file = __FILE__; \
+ wc_svr_last_line = __LINE__; \
} \
- wc_svr_last_file = __FILE__; \
- wc_svr_last_line = __LINE__; \
}
WOLFSSL_API extern THREAD_LS_T int wc_debug_vector_registers_retval;
@@ -320,11 +329,6 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
} while (0)
#ifdef DEBUG_VECTOR_REGISTER_ACCESS_FUZZING
- #ifndef WC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED
- #define WC_DEBUG_VECTOR_REGISTERS_FUZZING_SEED 0
- #endif
- WOLFSSL_LOCAL int SAVE_VECTOR_REGISTERS2_fuzzer(void);
-
#define SAVE_VECTOR_REGISTERS2(...) ({ \
int _svr2_val = SAVE_VECTOR_REGISTERS2_fuzzer(); \
if (_svr2_val == 0) { \
@@ -430,6 +434,11 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
wc_svr_last_file = __FILE__; \
wc_svr_last_line = __LINE__; \
} while(0)
+
+#else /* !DEBUG_VECTOR_REGISTER_ACCESS */
+ #if !defined(SAVE_VECTOR_REGISTERS2) && defined(DEBUG_VECTOR_REGISTER_ACCESS_FUZZING)
+ #define SAVE_VECTOR_REGISTERS2(...) SAVE_VECTOR_REGISTERS2_fuzzer()
+ #endif
#endif
#ifdef __cplusplus
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/misc.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/misc.h
index 8901733f..2685c6cd 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/misc.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/misc.h
@@ -114,6 +114,7 @@ word32 btoi(byte b);
WOLFSSL_LOCAL signed char HexCharToByte(char ch);
WOLFSSL_LOCAL char ByteToHex(byte in);
WOLFSSL_LOCAL int ByteToHexStr(byte in, char* out);
+WOLFSSL_LOCAL int CharIsWhiteSpace(char ch);
WOLFSSL_LOCAL byte ctMaskGT(int a, int b);
WOLFSSL_LOCAL byte ctMaskGTE(int a, int b);
@@ -152,6 +153,8 @@ WOLFSSL_LOCAL byte w64GTE(w64wrapper a, w64wrapper b);
WOLFSSL_LOCAL byte w64LT(w64wrapper a, w64wrapper b);
WOLFSSL_LOCAL w64wrapper w64Sub(w64wrapper a, w64wrapper b);
WOLFSSL_LOCAL void w64Zero(w64wrapper *a);
+WOLFSSL_LOCAL w64wrapper w64ShiftRight(w64wrapper a, int shift);
+WOLFSSL_LOCAL w64wrapper w64ShiftLeft(w64wrapper a, int shift);
#else /* !NO_INLINE */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/pkcs7.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/pkcs7.h
index 1e2733c8..2af117dc 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/pkcs7.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/pkcs7.h
@@ -112,6 +112,7 @@ enum PKCS7_STATE {
WC_PKCS7_VERIFY_STAGE4,
WC_PKCS7_VERIFY_STAGE5,
WC_PKCS7_VERIFY_STAGE6,
+ WC_PKCS7_VERIFY_STAGE7,
/* parse info set */
WC_PKCS7_INFOSET_START,
@@ -224,6 +225,11 @@ typedef int (*CallbackWrapCEK)(PKCS7* pkcs7, byte* cek, word32 cekSz,
byte* out, word32 outSz,
int keyWrapAlgo, int type, int dir);
+/* Callbacks for supporting different stream cases */
+typedef int (*CallbackGetContent)(PKCS7* pkcs7, byte** content, void* ctx);
+typedef int (*CallbackStreamOut)(PKCS7* pkcs7, const byte* output,
+ word32 outputSz, void* ctx);
+
#if defined(HAVE_PKCS7_RSA_RAW_SIGN_CALLBACK) && !defined(NO_RSA)
/* RSA sign raw digest callback, user builds DigestInfo */
typedef int (*CallbackRsaSignRawDigest)(PKCS7* pkcs7, byte* digest,
@@ -247,7 +253,13 @@ struct PKCS7 {
#ifdef ASN_BER_TO_DER
byte* der; /* DER encoded version of message */
word32 derSz;
+ CallbackGetContent getContentCb;
+ CallbackStreamOut streamOutCb;
+ void* streamCtx; /* passed to getcontentCb and streamOutCb */
#endif
+ byte encodeStream:1; /* use BER when encoding */
+ byte noCerts:1; /* if certificates should be added into bundle
+ during creation */
byte* cert[MAX_PKCS7_CERTS]; /* array of certs parsed from bundle */
byte* verifyCert; /* cert from array used for verify */
word32 verifyCertSz;
@@ -495,6 +507,15 @@ WOLFSSL_API int wc_PKCS7_SetDecodeEncryptedCb(PKCS7* pkcs7,
WOLFSSL_API int wc_PKCS7_SetDecodeEncryptedCtx(PKCS7* pkcs7, void* ctx);
#endif /* NO_PKCS7_ENCRYPTED_DATA */
+/* stream and certs */
+WOLFSSL_LOCAL int wc_PKCS7_WriteOut(PKCS7* pkcs7, byte* output,
+ const byte* input, word32 inputSz);
+WOLFSSL_API int wc_PKCS7_SetStreamMode(PKCS7* pkcs7, byte flag,
+ CallbackGetContent getContentCb, CallbackStreamOut streamOutCb, void* ctx);
+WOLFSSL_API int wc_PKCS7_GetStreamMode(PKCS7* pkcs7);
+WOLFSSL_API int wc_PKCS7_SetNoCerts(PKCS7* pkcs7, byte flag);
+WOLFSSL_API int wc_PKCS7_GetNoCerts(PKCS7* pkcs7);
+
/* CMS/PKCS#7 CompressedData */
#if defined(HAVE_LIBZ) && !defined(NO_PKCS7_COMPRESSED_DATA)
WOLFSSL_API int wc_PKCS7_EncodeCompressedData(PKCS7* pkcs7, byte* output,
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h
index f8d88ef8..72905c93 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h
@@ -44,6 +44,20 @@
#include <esp_types.h>
#include <esp_log.h>
+#if ESP_IDF_VERSION_MAJOR >= 4
+ #define WOLFSSL_ESPIDF_BLANKLINE_MESSAGE ""
+#else
+ /* Older ESP-IDF such as that for ESP8266 do not support empty strings */
+ #define WOLFSSL_ESPIDF_BLANKLINE_MESSAGE "."
+#endif
+
+/* Optional exit message.
+ * The WOLFSSL_COMPLETE keyword exits wolfSSL test harness script. */
+#define WOLFSSL_ESPIDF_EXIT_MESSAGE \
+ "\n\nDone!" \
+ "\n\nWOLFSSL_COMPLETE" \
+ "\n\nIf running from idf.py monitor, press twice: Ctrl+]"
+
/* exit codes to be used in tfm.c, sp_int.c, integer.c, etc.
*
* see wolfssl/wolfcrypt/error-crypt.h
@@ -238,6 +252,11 @@ enum {
** See NO_HW_MATH_TEST.
**
*******************************************************************************
+** WOLFSSL_FULL_WOLFSSH_SUPPORT
+** TODO - there's a known, unresolved problem with SHA256 in wolfSSH
+** Until fixed by a release version or this macro being define once resolved,
+** this macro should remain undefined.
+**
*/
#ifdef WOLFSSL_ESP32_CRYPT_DEBUG
#undef LOG_LOCAL_LEVEL
@@ -452,7 +471,10 @@ enum {
#endif
#ifdef SINGLE_THREADED
- #undef ESP_MONITOR_HW_TASK_LOCK
+ #ifdef WOLFSSL_DEBUG_MUTEX
+ #undef ESP_MONITOR_HW_TASK_LOCK
+ #define ESP_MONITOR_HW_TASK_LOCK
+ #endif
#else
/* Unless explicitly disabled, monitor task lock when not single thread. */
#ifndef ESP_DISABLE_HW_TASK_LOCK
@@ -513,6 +535,8 @@ extern "C"
#ifndef NO_AES
#if ESP_IDF_VERSION_MAJOR >= 4
#include "esp32/rom/aes.h"
+ #elif defined(CONFIG_IDF_TARGET_ESP8266)
+ /* no hardware includes for ESP8266*/
#else
#include "rom/aes.h"
#endif
@@ -616,7 +640,7 @@ extern "C"
{
/* pointer to object the initialized HW; to track copies */
void* initializer;
-#ifndef SINGLE_THREADED
+#if !defined(SINGLE_THREADED) || defined(ESP_MONITOR_HW_TASK_LOCK)
void* task_owner;
#endif
@@ -857,6 +881,16 @@ extern "C"
}
#endif
+/* Compatibility checks */
+#if defined(DEBUG_WOLFSSH) || defined(ESP_ENABLE_WOLFSSH) || \
+ defined(WOLFSSH_TERM) || defined(WOLFSSH_TEST_SERVER)
+ #ifndef NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256
+ /* need to add this line to wolfssl component user_settings.h
+ * #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256 */
+ #error "ESP32_CRYPT_HASH_SHA256 not supported on wolfSSL at this time"
+ #endif
+#endif /* SSH SHA256 HW check */
+
#endif /* WOLFSSL_ESPIDF (entire contents excluded when not Espressif ESP-IDF) */
#endif /* __ESP32_CRYPT_H__ */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/CryIf.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/CryIf.h
new file mode 100644
index 00000000..9a75f4e8
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/CryIf.h
@@ -0,0 +1,49 @@
+/* CryIf.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 WOLFSSL_CRYIF_H
+#define WOLFSSL_CRYIF_H
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/types.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* implementation specific structure, for now not used */
+typedef struct CryIf_ConfigType {
+ void* heap;
+} CryIf_ConfigType;
+
+WOLFSSL_LOCAL void CryIf_Init(const CryIf_ConfigType* in);
+WOLFSSL_LOCAL void CryIf_GetVersionInfo(Std_VersionInfoType* ver);
+WOLFSSL_LOCAL Std_ReturnType CryIf_ProcessJob(uint32 id, Crypto_JobType* job);
+WOLFSSL_LOCAL Std_ReturnType CryIf_CancelJob(uint32 id, Crypto_JobType* job);
+WOLFSSL_LOCAL Std_ReturnType CryIf_KeyElementSet(uint32 keyId, uint32 eId,
+ const uint8* key, uint32 keySz);
+
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
+#endif /* WOLFSSL_CRYIF_H */
+
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Crypto.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Crypto.h
new file mode 100644
index 00000000..f7b41f10
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Crypto.h
@@ -0,0 +1,55 @@
+/* Crypto.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 WOLFSSL_CRYPTO_H
+#define WOLFSSL_CRYPTO_H
+
+#include <wolfssl/wolfcrypt/settings.h>
+#include <wolfssl/wolfcrypt/types.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* key format */
+enum {
+ CRYPTO_KE_FORMAT_BIN_OCTET = 0x01,
+ CRYPTO_KE_FORMAT_BIN_RSA_PRIVATEKEY = 0x05,
+ CRYPTO_KE_FORMAT_BIN_RSA_PUBLICKEY = 0x06
+};
+
+/* implementation specific structure, for now not used */
+typedef struct Crypto_ConfigType {
+ void* heap;
+} Crypto_ConfigType;
+
+WOLFSSL_LOCAL Std_ReturnType Crypto_KeyElementSet(uint32 keyId, uint32 eId,
+ const uint8* key, uint32 keySz);
+WOLFSSL_LOCAL void Crypto_Init(const Crypto_ConfigType* config);
+WOLFSSL_LOCAL Std_ReturnType Crypto_ProcessJob(uint32 objectId,
+ Crypto_JobType* job);
+
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
+#endif /* WOLFSSL_CRYPTO_H */
+
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Csm.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Csm.h
new file mode 100644
index 00000000..51356021
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/Csm.h
@@ -0,0 +1,295 @@
+/* csm.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+
+/* specifications from AUTOSAR_SWS_CryptoServiceManager Release 4.4.0 */
+/* naming scheme from 4.4 specifications, needed for applications to use
+ * standardized names when linking */
+
+
+#ifndef WOLFSSL_CSM_H
+#define WOLFSSL_CSM_H
+
+#ifdef WOLFSSL_AUTOSAR
+
+#include <wolfssl/wolfcrypt/types.h>
+#include <wolfssl/wolfcrypt/port/autosar/StandardTypes.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+
+/* Error values */
+#define WOLFSSL_CSM_E_PARAM_POINTER 0x01
+#define WOLFSSL_CSM_E_SMALL_BUFFER 0x03
+#define WOLFSSL_CSM_E_PARAM_HANDLE 0x04
+#define WOLFSSL_CSM_E_UNINIT 0x05
+#define WOLFSSL_CSM_E_INIT_FAILED 0x07
+#define WOLFSSL_CSM_E_PROCESSING_MOD 0x08
+
+
+#define Crypto_JobType WOLFSSL_JOBTYPE
+#define Crypto_JobPrimitiveInputOutputType WOLFSSL_JOBIO
+#define Crypto_JobStateType WOLFSSL_JOBSTATE
+#define Crypto_VerifyResultType WOLFSSL_VERIFY
+#define Crypto_OperationModeType WOLFSSL_OMODE_TYPE
+
+/* implementation specific structure, for now not used */
+typedef struct Csm_ConfigType {
+ void* heap;
+} Csm_ConfigType;
+
+typedef enum WOLFSSL_JOBSTATE {
+ CRYPTO_JOBSTATE_IDLE = 0x00,
+ CRYPTO_JOBSTATE_ACTIVE = 0x01
+} WOLFSSL_JOBSTATE;
+
+typedef enum WOLFSSL_VERIFY {
+ CRYPTO_E_VER_OK = 0x00,
+ CRYPTO_E_VER_NOT_OK = 0x01
+} WOLFSSL_VERIFY;
+
+/* operation modes <Rte_Csm_Type.h> */
+typedef enum WOLFSSL_OMODE_TYPE {
+ CRYPTO_OPERATIONMODE_START = 0x01,
+ CRYPTO_OPERATIONMODE_UPDATE = 0x02,
+ CRYPTO_OPERATIONMODE_STREAMSTART = 0x03,
+ CRYPTO_OPERATIONMODE_FINISH = 0x04,
+ CRYPTO_OPERATIONMODE_SINGLECALL = 0x07
+} WOLFSSL_OMODE_TYPE;
+
+
+typedef enum Crypto_ServiceInfoType {
+ CRYPTO_ENCRYPT = 0x03,
+ CRYPTO_DECRYPT = 0x04,
+ CRYPTO_RANDOMGENERATE = 0x0B,
+
+#ifdef CSM_UNSUPPORTED_ALGS
+ /* not yet supported */
+ CRYPTO_HASH = 0x00,
+ CRYPTO_MACGENERATE = 0x01,
+ CRYPTO_MACVERIFY = 0x02,
+ CRYPTO_AEADENCRYPT = 0x05,
+ CRYPTO_AEADDECRYPT = 0x06,
+ CRYPTO_SIGNATUREGENERATE = 0x07,
+ CRYPTO_SIGNATUREVERIFY = 0x08,
+ CRYPTO_RANDOMSEED = 0x0C,
+ CRYPTO_KEYGENERATE= 0x0D,
+ CRYPTO_KEYDERIVE = 0x0E,
+ CRYPTO_KEYEXCHANGECALCPUBVAL = 0x0F,
+ CRYPTO_KEYEXCHANGECALCSECRET = 0x10,
+ CRYPTO_CERTIFICATEPARSE = 0x11,
+ CRYPTO_CERTIFICATEVERIFY = 0x12,
+ CRYPTO_KEYSETVALID = 0x13,
+#endif
+} Crypto_ServiceInfoType;
+
+
+typedef enum Crypto_AlgorithmModeType {
+ CRYPTO_ALGOMODE_NOT_SET = 0x00,
+ CRYPTO_ALGOMODE_CBC = 0x02,
+
+#ifdef CSM_UNSUPPORTED_ALGS
+ /* not yet supported */
+ CRYPTO_ALGOMODE_ECB = 0x01,
+ CRYPTO_ALGOMODE_CFB = 0x03,
+ CRYPTO_ALGOMODE_OFB = 0x04,
+ CRYPTO_ALGOMODE_CTR = 0x05,
+ CRYPTO_ALGOMODE_GCM = 0x06,
+ CRYPTO_ALGOMODE_XTS = 0x07,
+ CRYPTO_ALGOMODE_RSAES_OAEP = 0x08,
+ CRYPTO_ALGOMODE_RSAAES_PKCS1_V1_5 = 0x09,
+ CRYPTO_ALGOMODE_RSAAES_PSS = 0x0A,
+ CRYPTO_ALGOMODE_RSAASA_PKCS1_V1_5 = 0x0B,
+ CRYPTO_ALGOMODE_8ROUNDS = 0x0C, /* ChaCha8 */
+ CRYPTO_ALGOMODE_12ROUNDS = 0x0D, /* ChaCha12 */
+ CRYPTO_ALGOMODE_20ROUNDS = 0x0E, /* ChaCha20 */
+ CRYPTO_ALGOMODE_HMAC = 0x0F,
+ CRYPTO_ALGOMODE_CMAC = 0x10,
+ CRYPTO_ALGOMODE_GMAC = 0x11,
+#endif
+} Crypto_AlgorithmModeType;
+
+typedef enum Crypto_AlgorithmFamilyType {
+ CRYPTO_ALGOFAM_NOT_SET = 0x00,
+ CRYPTO_ALGOFAM_SHA1 = 0x01,
+ CRYPTO_ALGOFAM_SHA2_224 = 0x02,
+ CRYPTO_ALGOFAM_SHA2_256 = 0x03,
+ CRYPTO_ALGOFAM_SHA2_384 = 0x04,
+ CRYPTO_ALGOFAM_SHA2_512 = 0x05,
+ CRYPTO_ALGOFAM_SHA2_512_224 = 0x06,
+ CRYPTO_ALGOFAM_SHA2_512_256 = 0x07,
+ CRYPTO_ALGOFAM_SHA3_224 = 0x08,
+ CRYPTO_ALGOFAM_SHA3_256 = 0x09,
+ CRYPTO_ALGOFAM_SHA3_384 = 0x0A,
+ CRYPTO_ALGOFAM_SHA3_512 = 0x0B,
+ CRYPTO_ALGOFAM_SHAKE128 = 0x0C,
+ CRYPTO_ALGOFAM_SHAKE256 = 0x0D,
+ CRYPTO_ALGOFAM_RIPEMD160 = 0x0E,
+ CRYPTO_ALGOFAM_BLAKE_1_256 = 0x0D,
+ CRYPTO_ALGOFAM_BLAKE_1_512 = 0x10,
+ CRYPTO_ALGOFAM_BLAKE_2s_256 = 0x11,
+ CRYPTO_ALGOFAM_BLAKE_2s_512 = 0x12,
+ CRYPTO_ALGOFAM_3DES = 0x13,
+ CRYPTO_ALGOFAM_AES = 0x14,
+ CRYPTO_ALGOFAM_CHACHA = 0x15,
+ CRYPTO_ALGOFAM_RSA = 0x16,
+ CRYPTO_ALGOFAM_ED25519 = 0x17,
+ CRYPTO_ALGOFAM_BRAINPOOL = 0x18,
+ CRYPTO_ALGOFAM_ECCNIST = 0x19,
+ CRYPTO_ALGOFAM_RNG = 0x1B,
+ CRYPTO_ALGOFAM_SIPHASH = 0x1C,
+ CRYPTO_ALGOFAM_ECIES = 0x1D,
+ CRYPTO_ALGOFAM_ECCANSI = 0x1E,
+ CRYPTO_ALGOFAM_ECCSEC = 0x1F,
+ CRYPTO_ALGOFAM_DRBG = 0x20,
+ CRYPTO_ALGOFAM_FIPS186 = 0x21, /* random number gen according to FIPS 186 */
+ CRYPTO_ALGOFAM_PADDING_PKCS7 = 0x22,
+ CRYPTO_ALGOFAM_PADDING_ONEWITHZEROS = 0x23 /* fill with 0's but first bit
+ * after data is 1 */
+} Crypto_AlgorithmFamilyType;
+
+typedef enum Crypto_KeyID {
+ /* Cipher/AEAD */
+ CRYPTO_KE_CIPHER_KEY = 0x01,
+ CRYPTO_KE_CIPHER_IV = 0x05,
+ CRYPTO_KE_CIPHER_PROOF = 0x06,
+ CRYPTO_KE_CIPHER_2NDKEY = 0x07
+} Crypto_KeyID;
+
+
+typedef enum Crypto_ProcessingType {
+ CRYPTO_PROCESSING_ASYNC = 0x00,
+ CRYPTO_PROCESSING_SYNC = 0x01
+} Crypto_ProcessingType;
+
+
+/* removed const on elements @TODO which is different than 8.2.8 in
+ * AUTOSAR_SWS_CryptoServiceManager.pdf */
+typedef struct Crypto_JobInfoType {
+ uint32 jobId;
+ uint32 jobPriority;
+} Crypto_JobInfoType;
+
+typedef struct Crypto_JobRedirectionInfoType {
+ uint8 redirectionConfig;
+ uint32 inputKeyId;
+ uint32 inputKeyElementId;
+ uint32 secondaryInputKeyId;
+ uint32 secondaryInputKeyElementId;
+ uint32 tertiaryInputKeyId;
+ uint32 tertiaryInputKeyElementId;
+ uint32 outputKeyId;
+ uint32 outputKeyElementId;
+ uint32 secondaryOutputKeyId;
+ uint32 secondaryOutputKeyElementId;
+} Crypto_JobRedirectionInfoType;
+
+
+enum Crypto_InputOutputRedirectionConfigType {
+ CRYPTO_REDIRECT_CONFIG_PRIMARY_INPUT = 0x01,
+ CRYPTO_REDIRECT_CONFIG_SECONDARY_INPUT = 0x02,
+ CRYPTO_REDIRECT_CONFIG_TERTIARY_INPUT = 0x04,
+ CRYPTO_REDIRECT_CONFIG_PRIMARY_OUTPUT = 0x10,
+ CRYPTO_REDIRECT_CONFIG_SECONDARY_OUTPUT = 0x20
+};
+
+
+typedef struct WOLFSSL_JOBIO {
+ const uint8 *inputPtr;
+ uint32 inputLength;
+ const uint8 *secondaryInputPtr; /* secondary data for verify */
+ uint32 secondaryInputLength;
+ const uint8 *tertiaryInputPtr; /* third input data for verify */
+ uint32 tertiaryInputLength;
+ uint8 *outputPtr;
+ uint32 *outputLengthPtr;
+ uint8 *secondaryOutputPtr;
+ uint32 *secondaryOutputLengthPtr;
+ uint64 input64; /* input parameter */
+ Crypto_VerifyResultType *verifyPtr;
+ uint64 *output64Ptr;
+ Crypto_OperationModeType mode;
+ uint32 cryIfKeyId;
+ uint32 targetCryIfKeyId;
+} WOLFSSL_JOBIO;
+
+
+typedef struct Crypto_AlgorithmInfoType {
+ Crypto_AlgorithmFamilyType family;
+ Crypto_AlgorithmFamilyType secondaryFamily; /* second algo type if needed */
+ uint32 keyLength;
+ Crypto_AlgorithmModeType mode; /* i.e. CBC / RSA OAEP */
+} Crypto_AlgorithmInfoType;
+
+
+/* removed const on all 3 elements which is slightly different than AutoSAR */
+typedef struct Crypto_PrimitiveInfoType {
+ uint32 resultLength;
+ Crypto_ServiceInfoType service;
+ Crypto_AlgorithmInfoType algorithm;
+} Crypto_PrimitiveInfoType;
+
+
+typedef struct Crypto_JobPrimitiveInfoType {
+ uint32 callbackId;
+ const Crypto_PrimitiveInfoType *primitiveInfo;
+ uint32 cryIfKeyId;
+ Crypto_ProcessingType processingType;
+ boolean callbackUpdateNotification;
+} Crypto_JobPrimitiveInfoType;
+
+
+typedef struct WOLFSSL_JOBTYPE {
+ uint32 jobId;
+ WOLFSSL_JOBSTATE jobState;
+ WOLFSSL_JOBIO jobPrimitiveInputOutput;
+ const Crypto_JobPrimitiveInfoType* jobPrimitiveInfo;
+ const Crypto_JobInfoType* jobInfo;
+ Crypto_JobRedirectionInfoType* jobRedirectionInfoRef;
+} WOLFSSL_JOBTYPE;
+
+
+WOLFSSL_API void Csm_Init(const Csm_ConfigType* config);
+
+/* can be called before init, all else return WOLFSSL_CSM_E_UNINIT */
+WOLFSSL_API void Csm_GetVersionInfo(Std_VersionInfoType* version);
+
+WOLFSSL_API Std_ReturnType Csm_Decrypt(uint32 jobId,
+ Crypto_OperationModeType mode, const uint8* dataPtr, uint32 dataLength,
+ uint8* resultPtr, uint32* resultLengthPtr);
+WOLFSSL_API Std_ReturnType Csm_Encrypt(uint32 jobId,
+ Crypto_OperationModeType mode, const uint8* dataPtr, uint32 dataLength,
+ uint8* resultPtr, uint32* resultLengthPtr);
+WOLFSSL_API Std_ReturnType Csm_KeyElementSet(uint32 keyId, uint32 keyElementId,
+ const uint8* keyPtr, uint32 keyLength);
+WOLFSSL_API Std_ReturnType Csm_RandomGenerate( uint32 jobId, uint8* resultPtr,
+ uint32* resultLengthPtr);
+WOLFSSL_LOCAL void ReportToDET(int err);
+
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
+#endif /* WOLFSSL_AUTOSAR */
+#endif /* WOLFSSL_CSM_H */
+
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/StandardTypes.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/StandardTypes.h
new file mode 100644
index 00000000..a3675f25
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/autosar/StandardTypes.h
@@ -0,0 +1,66 @@
+/* StandardTypes.h
+ *
+ * Copyright (C) 2006-2019 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
+
+#ifdef WOLFSSL_AUTOSAR
+
+#ifndef WOLFSSL_STANDARDTYPES_H
+#define WOLFSSL_STANDARDTYPES_H
+#include <wolfssl/wolfcrypt/types.h>
+
+/* remap primitives */
+typedef byte uint8;
+typedef byte boolean;
+typedef word16 uint16;
+typedef word32 uint32;
+typedef word64 uint64;
+
+#ifndef TRUE
+ #define TRUE 1
+#endif
+#ifndef FALSE
+ #define FALSE 0
+#endif
+
+/* return types */
+typedef enum Std_ReturnType {
+ E_OK = 0x00,
+ E_NOT_OK = 0x01,
+ E_SMALL_BUFFER = 0x02,
+ E_ENTROPY_EXHAUSTION = 0x03,
+ E_KEY_READ_FAIL = 0x04,
+ E_KEY_NOT_AVAILABLE = 0x05,
+ E_KEY_NOT_VALID = 0x06,
+ E_JOB_CANCELED = 0x07,
+ E_KEY_EMPTY = 0x08
+} Std_ReturnType;
+
+
+typedef struct Std_VersionInfoType {
+ uint16 vendorID;
+ uint16 moduleID;
+ uint8 sw_major_version;
+ uint8 sw_minor_version;
+ uint8 sw_patch_version;
+} Std_VersionInfoType;
+#endif /* WOLFSSL_AUTOSAR */
+
+#endif /* WOLFSSL_STANDARDTYPES_H */
+
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/iotsafe/iotsafe.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/iotsafe/iotsafe.h
index 8f452ce6..ba4d3bd7 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/iotsafe/iotsafe.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/iotsafe/iotsafe.h
@@ -93,6 +93,11 @@ struct wc_IOTSAFE {
word16 ecdh_keypair_slot;
word16 peer_pubkey_slot;
word16 peer_cert_slot;
+#elif (IOTSAFE_ID_SIZE == 4)
+ word32 privkey_id;
+ word32 ecdh_keypair_slot;
+ word32 peer_pubkey_slot;
+ word32 peer_cert_slot;
#else
#error "IOTSAFE: ID_SIZE not supported"
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/liboqs/liboqs.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/liboqs/liboqs.h
new file mode 100644
index 00000000..58da9ba2
--- /dev/null
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/liboqs/liboqs.h
@@ -0,0 +1,62 @@
+/* liboqs.h
+ *
+ * Copyright (C) 2006-2023 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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 wolfssl/wolfcrypt/port/liboqs/liboqs.h
+*/
+/*
+
+DESCRIPTION
+This library provides the support interfaces to the liboqs library providing
+implementations for Post-Quantum cryptography algorithms.
+*/
+
+#ifndef WOLF_CRYPT_LIBOQS_H
+#define WOLF_CRYPT_LIBOQS_H
+
+#include <wolfssl/wolfcrypt/types.h>
+#include <wolfssl/wolfcrypt/random.h>
+
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#if defined(HAVE_LIBOQS)
+
+#include "oqs/oqs.h"
+
+
+int wolfSSL_liboqsInit(void);
+
+void wolfSSL_liboqsClose(void);
+
+int wolfSSL_liboqsRngMutexLock(WC_RNG* rng);
+
+int wolfSSL_liboqsRngMutexUnlock(void);
+
+#endif /* HAVE_LIBOQS */
+
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
+#endif /* WOLF_CRYPT_LIBOQS_H */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/psa/psa.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/psa/psa.h
index 886d823a..6bde526c 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/psa/psa.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/port/psa/psa.h
@@ -44,13 +44,6 @@
#include <wolfssl/wolfcrypt/types.h>
-/* PSA implementation takes over the Sha struct and Sha functions implementation
- completely. Devoiding the struct of the DevId field and hooks to make
- crypto_cb work. */
-#if !defined(WOLFSSL_PSA_NO_HASH) && defined(WOLF_CRYPTO_CB)
-#error "WOLFSSL PSA is not supported with WOLF_CRYPTO_CB"
-#endif
-
#if defined(WOLFSSL_HAVE_PSA)
#include <psa/crypto.h>
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/random.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/random.h
index 8cd599bd..d4ab8e33 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/random.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/random.h
@@ -205,7 +205,10 @@ WOLFSSL_API int wc_GenerateSeed(OS_Seed* os, byte* seed, word32 sz);
#endif /* HAVE_WNR */
-WOLFSSL_ABI WOLFSSL_API WC_RNG* wc_rng_new(byte* nonce, word32 nonceSz, void* heap);
+WOLFSSL_ABI WOLFSSL_API WC_RNG* wc_rng_new(byte* nonce, word32 nonceSz,
+ void* heap);
+WOLFSSL_API int wc_rng_new_ex(WC_RNG **rng, byte* nonce, word32 nonceSz,
+ void* heap, int devId);
WOLFSSL_ABI WOLFSSL_API void wc_rng_free(WC_RNG* rng);
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/rsa.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/rsa.h
index acdc3bb7..3daa02c5 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/rsa.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/rsa.h
@@ -58,11 +58,6 @@ RSA keys can be used to encrypt, decrypt, sign and verify data.
#define NO_RSA_BOUNDS_CHECK
#endif
-/* allow for user to plug in own crypto */
-#if !defined(HAVE_FIPS) && (defined(HAVE_USER_RSA) || defined(HAVE_FAST_RSA))
- #include "user_rsa.h"
-#else
-
#include <wolfssl/wolfcrypt/wolfmath.h>
#include <wolfssl/wolfcrypt/random.h>
@@ -449,8 +444,8 @@ WOLFSSL_LOCAL int wc_RsaUnPad_ex(byte* pkcsBlock, word32 pkcsBlockLen, byte** ou
int bits, void* heap);
WOLFSSL_LOCAL int wc_hash2mgf(enum wc_HashType hType);
-
-#endif /* HAVE_USER_RSA */
+WOLFSSL_LOCAL int RsaFunctionCheckIn(const byte* in, word32 inLen, RsaKey* key,
+ int checkSmallCt);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/settings.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/settings.h
index 5eacd6c8..bc544c70 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/settings.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/settings.h
@@ -265,6 +265,37 @@
/* Uncomment next line if using MAXQ108x */
/* #define WOLFSSL_MAXQ108X */
+#if defined(ARDUINO)
+ /* Due to limited build control, we'll ignore file warnings. */
+ /* See https://github.com/arduino/arduino-cli/issues/631 */
+ #undef WOLFSSL_IGNORE_FILE_WARN
+ #define WOLFSSL_IGNORE_FILE_WARN
+
+ /* we don't have the luxury of compiler options, so manually define */
+ #if defined(__arm__)
+ #undef WOLFSSL_ARDUINO
+ #define WOLFSSL_ARDUINO
+ /* ESP32? */
+ #endif
+
+ #undef FREERTOS
+ #ifndef WOLFSSL_USER_SETTINGS
+ #define WOLFSSL_USER_SETTINGS
+ #endif /* WOLFSSL_USER_SETTINGS */
+
+ /* board-specific */
+ #if defined(__AVR__)
+ #define WOLFSSL_NO_SOCK
+ #define NO_WRITEV
+ #elif defined(__arm__)
+ #define WOLFSSL_NO_SOCK
+ #define NO_WRITEV
+ #elif defined(ESP32) || defined(ESP8266)
+ /* assume sockets available */
+ #else
+ #define WOLFSSL_NO_SOCK
+ #endif
+#endif
#ifdef WOLFSSL_USER_SETTINGS
#include "user_settings.h"
@@ -316,44 +347,43 @@
#endif
#endif
-/* OpenSSL compat layer */
-#if defined(OPENSSL_EXTRA) && !defined(OPENSSL_COEXIST)
-#undef WOLFSSL_ALWAYS_VERIFY_CB
-#define WOLFSSL_ALWAYS_VERIFY_CB
+/* ---------------------------------------------------------------------------
+ * Dual Algorithm Certificate Required Features.
+ * ---------------------------------------------------------------------------
+ */
+#ifdef WOLFSSL_DUAL_ALG_CERTS
-#undef WOLFSSL_VERIFY_CB_ALL_CERTS
-#define WOLFSSL_VERIFY_CB_ALL_CERTS
+#ifndef WOLFSSL_ASN_TEMPLATE
+ #error "Dual alg cert support requires the ASN.1 template feature."
+#endif
-#undef WOLFSSL_EXTRA_ALERTS
-#define WOLFSSL_EXTRA_ALERTS
+#ifdef NO_RSA
+ #error "Need RSA or else dual alg cert example will not work."
+#endif
-#undef HAVE_EXT_CACHE
-#define HAVE_EXT_CACHE
+#ifndef HAVE_ECC
+ #error "Need ECDSA or else dual alg cert example will not work."
+#endif
-#undef WOLFSSL_FORCE_CACHE_ON_TICKET
-#define WOLFSSL_FORCE_CACHE_ON_TICKET
+#undef WOLFSSL_CERT_GEN
+#define WOLFSSL_CERT_GEN
-#undef WOLFSSL_AKID_NAME
-#define WOLFSSL_AKID_NAME
+#undef WOLFSSL_CUSTOM_OID
+#define WOLFSSL_CUSTOM_OID
-#undef HAVE_CTS
-#define HAVE_CTS
+#undef HAVE_OID_ENCODING
+#define HAVE_OID_ENCODING
-#undef WOLFSSL_SESSION_ID_CTX
-#define WOLFSSL_SESSION_ID_CTX
-#endif /* OPENSSL_EXTRA && !OPENSSL_COEXIST */
+#undef WOLFSSL_CERT_EXT
+#define WOLFSSL_CERT_EXT
-/* Special small OpenSSL compat layer for certs */
-#ifdef OPENSSL_EXTRA_X509_SMALL
-#undef WOLFSSL_EKU_OID
-#define WOLFSSL_EKU_OID
+#undef OPENSSL_EXTRA
+#define OPENSSL_EXTRA
-#undef WOLFSSL_MULTI_ATTRIB
-#define WOLFSSL_MULTI_ATTRIB
+#undef HAVE_OID_DECODING
+#define HAVE_OID_DECODING
+#endif /* WOLFSSL_DUAL_ALG_CERTS */
-#undef WOLFSSL_NO_OPENSSL_RAND_CB
-#define WOLFSSL_NO_OPENSSL_RAND_CB
-#endif /* OPENSSL_EXTRA_X509_SMALL */
#if defined(_WIN32) && !defined(_M_X64) && \
defined(HAVE_AESGCM) && defined(WOLFSSL_AESNI)
@@ -381,6 +411,33 @@
#include <nx_api.h>
#endif
+#if defined(ARDUINO)
+ #if defined(ESP32)
+ #ifndef NO_ARDUINO_DEFAULT
+ #define SIZEOF_LONG_LONG 8
+ #ifdef FREERTOS
+ #undef FREERTOS
+ #endif
+
+ #define WOLFSSL_LWIP
+ #define NO_WRITEV
+ #define NO_WOLFSSL_DIR
+ #define WOLFSSL_NO_CURRDIR
+
+ #define TFM_TIMING_RESISTANT
+ #define ECC_TIMING_RESISTANT
+ #define WC_RSA_BLINDING
+ #define WC_NO_CACHE_RESISTANT
+ #endif /* !NO_ARDUINO_DEFAULT */
+ #elif defined(__arm__)
+ #define NO_WRITEV
+ #define NO_WOLFSSL_DIR
+ #define WOLFSSL_NO_CURRDIR
+ #elif defined(OTHERBOARD)
+ /* TODO: define other Arduino boards here */
+ #endif
+#endif
+
#if defined(WOLFSSL_ESPIDF)
#define SIZEOF_LONG_LONG 8
#ifndef NO_ESPIDF_DEFAULT
@@ -392,10 +449,22 @@
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
+
+ /* WC_RSA_BLINDING takes up extra space! */
#define WC_RSA_BLINDING
#define WC_NO_CACHE_RESISTANT
#endif /* !WOLFSSL_ESPIDF_NO_DEFAULT */
+ #if defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384) && \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512)
+ #error "NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384 cannot be defined without" \
+ "NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512 (enable or disable both)"
+ #endif
+ #if defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512) && \
+ !defined(NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384)
+ #error "NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512 cannot be defined without" \
+ "NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384 (enable or disable both)"
+ #endif
#if defined(WOLFSSL_ESPWROOM32)
/* WOLFSSL_ESPWROOM32 is a legacy macro gate.
** Not be be confused with WOLFSSL_ESPWROOM32SE, naming a specific board */
@@ -701,11 +770,20 @@
#ifdef WOLFSSL_ARDUINO
+ /* Define WOLFSSL_USER_IO here to avoid check in internal.c */
+ #define WOLFSSL_USER_IO
+
#define NO_WRITEV
#define NO_WOLFSSL_DIR
#define SINGLE_THREADED
#define NO_DEV_RANDOM
- #ifndef INTEL_GALILEO /* Galileo has time.h compatibility */
+ #if defined(INTEL_GALILEO) || defined(ESP32)
+ /* boards with has time.h compatibility */
+ #elif defined(__arm__)
+ /* TODO is time really missing from Arduino Due? */
+ /* This is a brute-force solution to make it work: */
+ #define NO_ASN_TIME
+ #else
#define TIME_OVERRIDES
#ifndef XTIME
#error "Must define XTIME externally see porting guide"
@@ -926,7 +1004,8 @@ extern void uITRON4_free(void *p) ;
#define XFREE(p, h, type) ((void)(h), (void)(type), vPortFree((p)))
#if defined(WOLFSSL_ESPIDF)
/* In IDF, realloc(p, n) is equivalent to
- * heap_caps_realloc(p, s, MALLOC_CAP_8BIT) */
+ * heap_caps_realloc(p, s, MALLOC_CAP_8BIT)
+ * there's no pvPortRealloc available */
#define XREALLOC(p, n, h, t) ((void)(h), (void)(t), realloc((p), (n)))
/* FreeRTOS pvPortRealloc() implementation can be found here:
* https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */
@@ -948,8 +1027,10 @@ extern void uITRON4_free(void *p) ;
#define NO_DH
#endif
#endif
- #ifndef NO_DSA
- #define NO_DSA
+ #ifndef HAVE_DSA
+ #ifndef NO_DSA
+ #define NO_DSA
+ #endif
#endif
#ifndef SINGLE_THREADED
@@ -972,12 +1053,6 @@ extern void uITRON4_free(void *p) ;
#define NO_MAIN_DRIVER
#endif
-#ifdef WOLFSSL_TI_CRYPT
- #define NO_GCM_ENCRYPT_EXTRA
- #define NO_PUBLIC_GCM_SET_IV
- #define NO_PUBLIC_CCM_SET_NONCE
-#endif
-
#ifdef WOLFSSL_TIRTOS
#define SIZEOF_LONG_LONG 8
#define NO_WRITEV
@@ -987,35 +1062,57 @@ extern void uITRON4_free(void *p) ;
* specified in user_settings.
*/
#ifndef USE_FAST_MATH
- #define WOLFSSL_HAVE_SP_ECC
#define SP_WORD_SIZE 32
- #define WOLFSSL_HAVE_SP_RSA
- #define WOLFSSL_SP_4096
+ #define WOLFSSL_HAVE_SP_ECC
+ #ifndef NO_RSA
+ #define WOLFSSL_HAVE_SP_RSA
+ #endif
+ #ifndef NO_DH
+ #define WOLFSSL_HAVE_SP_DH
+ #endif
+ #if !defined(NO_RSA) || !defined(NO_DH)
+ /* DH/RSA 2048, 3072 and 4096 */
+ #if defined(SP_INT_MAX_BITS) && SP_INT_MAX_BITS >= 4096
+ #define WOLFSSL_SP_4096
+ #endif
+ #endif
#endif
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define NO_DEV_RANDOM
#define NO_FILESYSTEM
- #define NO_SIG_WRAPPER
#define NO_MAIN_DRIVER
- #define USE_CERT_BUFFERS_2048
- #define NO_ERROR_STRINGS
- /* Uncomment this setting if your toolchain does not offer time.h header */
- /* #define USER_TIME */
+ #ifndef NO_CRYPT_TEST
+ #define USE_CERT_BUFFERS_2048
+ #endif
+ #ifndef DEBUG_WOLFSSL
+ #define NO_ERROR_STRINGS
+ #endif
+
#define HAVE_ECC
#define HAVE_ALPN
#define USE_WOLF_STRTOK /* use with HAVE_ALPN */
#define HAVE_TLS_EXTENSIONS
- #define HAVE_AESGCM
#define HAVE_SUPPORTED_CURVES
+
+ #define HAVE_AESGCM
+
#ifdef __IAR_SYSTEMS_ICC__
#pragma diag_suppress=Pa089
#elif !defined(__GNUC__)
/* Suppress the sslpro warning */
#pragma diag_suppress=11
#endif
+
+ /* Uncomment this setting if your toolchain does not offer time.h header */
+ /* #define USER_TIME */
#include <ti/sysbios/hal/Seconds.h>
+ #if defined(__ti__) && !defined(USER_TIME)
+ /* TI internal time() offsets by 2208988800 (1990 -> 1970),
+ * which overflows signed 32-bit */
+ #define NO_TIME_SIGNEDNESS_CHECK
+ #endif
#endif
#ifdef EBSNET
@@ -1177,7 +1274,12 @@ extern void uITRON4_free(void *p) ;
#if !defined(XMALLOC_OVERRIDE) && !defined(XMALLOC_USER)
#define XMALLOC_OVERRIDE
#define XMALLOC(s, h, t) ((void)(h), (void)(t), (void *)_mem_alloc_system((s)))
- #define XFREE(p, h, t) {void* xp = (p); (void)(h); (void)(t); if ((xp)) _mem_free((xp));}
+ #ifdef WOLFSSL_XFREE_NO_NULLNESS_CHECK
+ #define XFREE(p, h, t) {(void)(h); (void)(t); _mem_free(p);}
+ #else
+ #define XFREE(p, h, t) {void* xp = (p); (void)(h); (void)(t); if ((xp)) _mem_free((xp));}
+ #endif
+
/* Note: MQX has no realloc, using fastmath above */
#endif
#ifdef USE_FAST_MATH
@@ -1208,7 +1310,11 @@ extern void uITRON4_free(void *p) ;
#endif
#define XMALLOC(s, h, t) ((void)(h), (void)(t), (void *)_mem_alloc_system((s)))
- #define XFREE(p, h, t) {void* xp = (p); (void)(h); (void)(t); if ((xp)) _mem_free((xp));}
+ #ifdef WOLFSSL_XFREE_NO_NULLNESS_CHECK
+ #define XFREE(p, h, t) {(void)(h); (void)(t); _mem_free(p);}
+ #else
+ #define XFREE(p, h, t) {void* xp = (p); (void)(h); (void)(t); if ((xp)) _mem_free((xp));}
+ #endif
#define XREALLOC(p, n, h, t) _mem_realloc((p), (n)) /* since MQX 4.1.2 */
#define MQX_FILE_PTR FILE *
@@ -1819,7 +1925,10 @@ extern void uITRON4_free(void *p) ;
#if !defined(WOLFSSL_XILINX_CRYPT_VERSAL)
#define NO_DEV_RANDOM
#endif
+ #undef NO_WOLFSSL_DIR
#define NO_WOLFSSL_DIR
+
+ #undef HAVE_AESGCM
#define HAVE_AESGCM
#endif
@@ -1908,7 +2017,7 @@ extern void uITRON4_free(void *p) ;
void *z_realloc(void *ptr, size_t size);
#define realloc z_realloc
- #ifndef CONFIG_NET_SOCKETS_POSIX_NAMES
+ #if !defined(CONFIG_NET_SOCKETS_POSIX_NAMES) && !defined(CONFIG_POSIX_API)
#define CONFIG_NET_SOCKETS_POSIX_NAMES
#endif
#endif
@@ -2024,9 +2133,17 @@ extern void uITRON4_free(void *p) ;
#include "RTOS.h"
#if !defined(XMALLOC_USER) && !defined(NO_WOLFSSL_MEMORY) && \
!defined(WOLFSSL_STATIC_MEMORY)
- #define XMALLOC(s, h, type) ((void)(h), (void)(type), OS_HEAP_malloc((s)))
- #define XFREE(p, h, type) ((void)(h), (void)(type), OS_HEAP_free((p)))
- #define XREALLOC(p, n, h, t) ((void)(h), (void)(t), OS_HEAP_realloc(((p), (n)))
+ /* Per the user manual of embOS https://www.segger.com/downloads/embos/UM01001
+ * this API has changed with V5. */
+ #if (OS_VERSION >= 50000U)
+ #define XMALLOC(s, h, type) ((void)(h), (void)(type), OS_HEAP_malloc((s)))
+ #define XFREE(p, h, type) ((void)(h), (void)(type), OS_HEAP_free((p)))
+ #define XREALLOC(p, n, h, t) ((void)(h), (void)(t), OS_HEAP_realloc((p), (n)))
+ #else
+ #define XMALLOC(s, h, type) ((void)(h), (void)(type), OS_malloc((s)))
+ #define XFREE(p, h, type) ((void)(h), (void)(type), OS_free((p)))
+ #define XREALLOC(p, n, h, t) ((void)(h), (void)(t), OS_realloc((p), (n)))
+ #endif
#endif
#endif
@@ -2657,6 +2774,14 @@ extern void uITRON4_free(void *p) ;
#define WOLFSSL_IPV6
#endif
+/* ---------------------------------------------------------------------------
+ * ASN Library Selection (default to ASN_TEMPLATE)
+ * ---------------------------------------------------------------------------
+ */
+#if !defined(WOLFSSL_ASN_TEMPLATE) && !defined(WOLFSSL_ASN_ORIGINAL) && \
+ !defined(NO_ASN)
+ #define WOLFSSL_ASN_TEMPLATE
+#endif
#ifdef WOLFSSL_LINUXKM
#ifdef HAVE_CONFIG_H
@@ -2693,6 +2818,7 @@ extern void uITRON4_free(void *p) ;
#ifndef WOLFSSL_TEST_SUBROUTINE
#define WOLFSSL_TEST_SUBROUTINE static
#endif
+ #undef HAVE_PTHREAD
#undef HAVE_STRINGS_H
#undef HAVE_ERRNO_H
#undef HAVE_THREAD_LS
@@ -2746,6 +2872,51 @@ extern void uITRON4_free(void *p) ;
#define OPENSSL_EXTRA
#endif
+/* ---------------------------------------------------------------------------
+ * OpenSSL compat layer
+ * ---------------------------------------------------------------------------
+ */
+#if defined(OPENSSL_EXTRA) && !defined(OPENSSL_COEXIST)
+ #undef WOLFSSL_ALWAYS_VERIFY_CB
+ #define WOLFSSL_ALWAYS_VERIFY_CB
+
+ #undef WOLFSSL_VERIFY_CB_ALL_CERTS
+ #define WOLFSSL_VERIFY_CB_ALL_CERTS
+
+ #undef WOLFSSL_EXTRA_ALERTS
+ #define WOLFSSL_EXTRA_ALERTS
+
+ #undef HAVE_EXT_CACHE
+ #define HAVE_EXT_CACHE
+
+ #undef WOLFSSL_FORCE_CACHE_ON_TICKET
+ #define WOLFSSL_FORCE_CACHE_ON_TICKET
+
+ #undef WOLFSSL_AKID_NAME
+ #define WOLFSSL_AKID_NAME
+
+ #undef HAVE_CTS
+ #define HAVE_CTS
+
+ #undef WOLFSSL_SESSION_ID_CTX
+ #define WOLFSSL_SESSION_ID_CTX
+#endif /* OPENSSL_EXTRA && !OPENSSL_COEXIST */
+
+/* ---------------------------------------------------------------------------
+ * Special small OpenSSL compat layer for certs
+ * ---------------------------------------------------------------------------
+ */
+#ifdef OPENSSL_EXTRA_X509_SMALL
+ #undef WOLFSSL_EKU_OID
+ #define WOLFSSL_EKU_OID
+
+ #undef WOLFSSL_MULTI_ATTRIB
+ #define WOLFSSL_MULTI_ATTRIB
+
+ #undef WOLFSSL_NO_OPENSSL_RAND_CB
+ #define WOLFSSL_NO_OPENSSL_RAND_CB
+#endif /* OPENSSL_EXTRA_X509_SMALL */
+
#ifdef HAVE_SNI
#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
#endif
@@ -2903,7 +3074,7 @@ extern void uITRON4_free(void *p) ;
#if defined(WOLFCRYPT_ONLY) && defined(NO_AES) && !defined(WOLFSSL_SHA384) && \
!defined(WOLFSSL_SHA512) && defined(WC_NO_RNG) && \
!defined(WOLFSSL_SP_MATH) && !defined(WOLFSSL_SP_MATH_ALL) \
- && !defined(USE_FAST_MATH)
+ && !defined(USE_FAST_MATH) && defined(NO_SHA256)
#undef WOLFSSL_NO_FORCE_ZERO
#define WOLFSSL_NO_FORCE_ZERO
#endif
@@ -3091,6 +3262,15 @@ extern void uITRON4_free(void *p) ;
#define WOLFSSL_NO_KYBER1024
#endif
+#if (defined(HAVE_LIBOQS) || \
+ defined(WOLFSSL_WC_KYBER) || \
+ defined(HAVE_LIBXMSS) || \
+ defined(HAVE_LIBLMS) || \
+ defined(WOLFSSL_DUAL_ALG_CERTS)) && \
+ !defined(WOLFSSL_EXPERIMENTAL_SETTINGS)
+ #error Experimental settings without WOLFSSL_EXPERIMENTAL_SETTINGS
+#endif
+
#if defined(HAVE_PQC) && !defined(HAVE_LIBOQS) && !defined(HAVE_PQM4) && \
!defined(WOLFSSL_HAVE_KYBER)
#error Please do not define HAVE_PQC yourself.
@@ -3130,8 +3310,9 @@ extern void uITRON4_free(void *p) ;
#define NO_SESSION_CACHE_REF
#endif
-/* (D)TLS v1.3 requires 64-bit number wrappers */
-#if defined(WOLFSSL_TLS13) || defined(WOLFSSL_DTLS_DROP_STATS)
+/* (D)TLS v1.3 requires 64-bit number wrappers as does XMSS and LMS. */
+#if defined(WOLFSSL_TLS13) || defined(WOLFSSL_DTLS_DROP_STATS) || \
+ defined(WOLFSSL_WC_XMSS) || defined(WOLFSSL_WC_LMS)
#undef WOLFSSL_W64_WRAPPER
#define WOLFSSL_W64_WRAPPER
#endif
@@ -3161,7 +3342,6 @@ extern void uITRON4_free(void *p) ;
* RSA public only, CAVP selftest, fast RSA, user RSA, QAT or CryptoCell */
#if (defined(WOLFSSL_RSA_KEY_CHECK) || (defined(HAVE_FIPS) && FIPS_VERSION_GE(2,0))) && \
!defined(WOLFSSL_NO_RSA_KEY_CHECK) && !defined(WOLFSSL_RSA_PUBLIC_ONLY) && \
- !defined(HAVE_USER_RSA) && !defined(HAVE_FAST_RSA) && \
!defined(HAVE_INTEL_QA) && !defined(WOLFSSL_CRYPTOCELL) && \
!defined(HAVE_SELFTEST)
@@ -3253,6 +3433,22 @@ extern void uITRON4_free(void *p) ;
/* Ciphersuite check done in internal.h */
#endif
+/* Some final sanity checks */
+#if defined(WOLFSSL_ESPIDF) && defined(ARDUINO)
+ #error "Found both ESPIDF and ARDUINO. Pick one."
+#endif
+
+#if defined(WOLFSSL_CAAM_BLOB)
+ #ifndef WOLFSSL_CAAM
+ #error "WOLFSSL_CAAM_BLOB requires WOLFSSL_CAAM"
+ #endif
+#endif
+
+#if defined(HAVE_ED25519)
+ #ifndef WOLFSSL_SHA512
+ #error "HAVE_ED25519 requires WOLFSSL_SHA512"
+ #endif
+#endif
#ifdef __cplusplus
} /* extern "C" */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha.h
index 65cc60ec..e8bcc9b0 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha.h
@@ -122,48 +122,48 @@ enum {
/* Sha digest */
struct wc_Sha {
#ifdef FREESCALE_LTC_SHA
- ltc_hash_ctx_t ctx;
+ ltc_hash_ctx_t ctx;
#elif defined(WOLFSSL_SE050) && defined(WOLFSSL_SE050_HASH)
- SE050_HASH_Context se050Ctx;
+ SE050_HASH_Context se050Ctx;
#elif defined(STM32_HASH)
- STM32_HASH_Context stmCtx;
+ STM32_HASH_Context stmCtx;
#elif defined(WOLFSSL_SILABS_SE_ACCEL)
- wc_silabs_sha_t silabsCtx;
+ wc_silabs_sha_t silabsCtx;
#elif defined(WOLFSSL_IMXRT_DCP)
- dcp_handle_t handle;
- dcp_hash_ctx_t ctx;
+ dcp_handle_t handle;
+ dcp_hash_ctx_t ctx;
#elif defined(WOLFSSL_HAVE_PSA) && !defined(WOLFSSL_PSA_NO_HASH)
- psa_hash_operation_t psa_ctx;
+ psa_hash_operation_t psa_ctx;
#else
- word32 buffLen; /* in bytes */
- word32 loLen; /* length in bytes */
- word32 hiLen; /* length in bytes */
- word32 buffer[WC_SHA_BLOCK_SIZE / sizeof(word32)];
+ word32 buffLen; /* in bytes */
+ word32 loLen; /* length in bytes */
+ word32 hiLen; /* length in bytes */
+ word32 buffer[WC_SHA_BLOCK_SIZE / sizeof(word32)];
#ifdef WOLFSSL_PIC32MZ_HASH
- word32 digest[PIC32_DIGEST_SIZE / sizeof(word32)];
+ word32 digest[PIC32_DIGEST_SIZE / sizeof(word32)];
#else
- word32 digest[WC_SHA_DIGEST_SIZE / sizeof(word32)];
- #endif
- void* heap;
- #ifdef WOLFSSL_PIC32MZ_HASH
- hashUpdCache cache; /* cache for updates */
- #endif
- #ifdef WOLFSSL_ASYNC_CRYPT
- WC_ASYNC_DEV asyncDev;
- #endif /* WOLFSSL_ASYNC_CRYPT */
- #ifdef WOLF_CRYPTO_CB
- int devId;
- void* devCtx; /* generic crypto callback context */
- #endif
- #ifdef WOLFSSL_IMXRT1170_CAAM
- caam_hash_ctx_t ctx;
- caam_handle_t hndl;
- #endif
- #if defined(WOLFSSL_DEVCRYPTO_HASH) || defined(WOLFSSL_HASH_KEEP)
- byte* msg;
- word32 used;
- word32 len;
+ word32 digest[WC_SHA_DIGEST_SIZE / sizeof(word32)];
#endif
+ void* heap;
+#endif
+#ifdef WOLFSSL_PIC32MZ_HASH
+ hashUpdCache cache; /* cache for updates */
+#endif
+#ifdef WOLFSSL_ASYNC_CRYPT
+ WC_ASYNC_DEV asyncDev;
+#endif /* WOLFSSL_ASYNC_CRYPT */
+#ifdef WOLF_CRYPTO_CB
+ int devId;
+ void* devCtx; /* generic crypto callback context */
+#endif
+#ifdef WOLFSSL_IMXRT1170_CAAM
+ caam_hash_ctx_t ctx;
+ caam_handle_t hndl;
+#endif
+#if defined(WOLFSSL_DEVCRYPTO_HASH) || defined(WOLFSSL_HASH_KEEP)
+ byte* msg;
+ word32 used;
+ word32 len;
#endif
#if defined(WOLFSSL_ESP32_CRYPT) && \
!defined(NO_WOLFSSL_ESP32_CRYPT_HASH)
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha256.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha256.h
index 454290c4..323c53ad 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha256.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha256.h
@@ -164,7 +164,7 @@ struct wc_Sha256 {
#elif defined(STM32_HASH_SHA2)
STM32_HASH_Context stmCtx;
#elif defined(WOLFSSL_SILABS_SE_ACCEL)
- wc_silabs_sha_t silabsCtx;
+ wc_silabs_sha_t silabsCtx;
#elif defined(WOLFSSL_IMXRT_DCP)
dcp_handle_t handle;
dcp_hash_ctx_t ctx;
@@ -249,6 +249,10 @@ WOLFSSL_API void wc_Sha256Free(wc_Sha256* sha256);
#if defined(OPENSSL_EXTRA) || defined(HAVE_CURL)
WOLFSSL_API int wc_Sha256Transform(wc_Sha256* sha, const unsigned char* data);
#endif
+#if defined(WOLFSSL_HAVE_LMS) && !defined(WOLFSSL_LMS_FULL_HASH)
+WOLFSSL_API int wc_Sha256HashBlock(wc_Sha256* sha, const unsigned char* data,
+ unsigned char* hash);
+#endif
#if defined(WOLFSSL_HASH_KEEP)
WOLFSSL_API int wc_Sha256_Grow(wc_Sha256* sha256, const byte* in, int inSz);
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha512.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha512.h
index 1c943d94..7592c468 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha512.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sha512.h
@@ -159,7 +159,7 @@ struct wc_Sha512 {
WC_ESP32SHA ctx;
#endif
#if defined(WOLFSSL_SILABS_SE_ACCEL)
- wc_silabs_sha_t silabsCtx;
+ wc_silabs_sha_t silabsCtx;
#endif
#ifdef WOLFSSL_KCAPI_HASH
wolfssl_KCAPI_Hash kcapi;
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sp_int.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sp_int.h
index e768d0cd..cf7b8f28 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sp_int.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sp_int.h
@@ -1067,7 +1067,7 @@ MP_API int sp_rand_prime(sp_int* r, int len, WC_RNG* rng, void* heap);
MP_API int sp_prime_is_prime(const sp_int* a, int t, int* result);
MP_API int sp_prime_is_prime_ex(const sp_int* a, int t, int* result,
WC_RNG* rng);
-#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN)
+#if !defined(NO_RSA) || defined(WOLFSSL_KEY_GEN)
MP_API int sp_gcd(const sp_int* a, const sp_int* b, sp_int* r);
#endif
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && \
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sphincs.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sphincs.h
index 958d8529..84871f53 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sphincs.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/sphincs.h
@@ -41,6 +41,7 @@
#ifdef HAVE_LIBOQS
#include <oqs/oqs.h>
+#include <wolfssl/wolfcrypt/port/liboqs/liboqs.h>
#endif
#ifdef __cplusplus
@@ -99,7 +100,7 @@ struct sphincs_key {
WOLFSSL_API
int wc_sphincs_sign_msg(const byte* in, word32 inLen, byte* out, word32 *outLen,
- sphincs_key* key);
+ sphincs_key* key, WC_RNG* rng);
WOLFSSL_API
int wc_sphincs_verify_msg(const byte* sig, word32 sigLen, const byte* msg,
word32 msgLen, int* res, sphincs_key* key);
@@ -124,7 +125,7 @@ int wc_sphincs_import_private_key(const byte* priv, word32 privSz,
sphincs_key* key);
WOLFSSL_API
-int wc_sphincs_export_public(sphincs_key*, byte* out, word32* outLen);
+int wc_sphincs_export_public(sphincs_key* key, byte* out, word32* outLen);
WOLFSSL_API
int wc_sphincs_export_private_only(sphincs_key* key, byte* out, word32* outLen);
WOLFSSL_API
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/tfm.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/tfm.h
index dc6d55a1..915a3359 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/tfm.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/tfm.h
@@ -364,7 +364,7 @@ while (0)
/* Initialize an mp_int. */
#define INIT_MP_INT_SIZE(name, bits) \
mp_init(name)
-/* Type to cast to when using size marcos. */
+/* Type to cast to when using size macros. */
#define MP_INT_SIZE mp_int
@@ -877,8 +877,9 @@ MP_API int mp_radix_size (mp_int * a, int radix, int *size);
MP_API int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp);
MP_API int mp_montgomery_reduce_ex(fp_int *a, fp_int *m, fp_digit mp, int ct);
MP_API int mp_montgomery_setup(fp_int *a, fp_digit *rho);
+MP_API int mp_sqr(fp_int *a, fp_int *b);
+
#ifdef HAVE_ECC
- MP_API int mp_sqr(fp_int *a, fp_int *b);
MP_API int mp_div_2(fp_int * a, fp_int * b);
MP_API int mp_div_2_mod_ct(mp_int *a, mp_int *b, mp_int *c);
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/types.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/types.h
index 0d41354e..01ed929f 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/types.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/types.h
@@ -259,7 +259,9 @@ decouple library dependencies with standard string, memory and so on.
#endif
#elif defined(WC_16BIT_CPU)
+ #ifndef MICROCHIP_PIC24
#undef WORD64_AVAILABLE
+ #endif
typedef word16 wolfssl_word;
#define MP_16BIT /* for mp_int, mp_word needs to be twice as big as \
* mp_digit, no 64 bit type so make mp_digit 16 bit */
@@ -356,7 +358,7 @@ typedef struct w64wrapper {
#define WC_INLINE inline
#endif
#else
- #define WC_INLINE
+ #define WC_INLINE WC_MAYBE_UNUSED
#endif
#else
#define WC_INLINE WC_MAYBE_UNUSED
@@ -556,6 +558,10 @@ typedef struct w64wrapper {
#endif
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n), (h), (t))
#endif /* WOLFSSL_DEBUG_MEMORY */
+ #elif defined(WOLFSSL_EMBOS) && !defined(XMALLOC_USER) \
+ && !defined(NO_WOLFSSL_MEMORY) \
+ && !defined(WOLFSSL_STATIC_MEMORY)
+ /* settings.h solve this case already. Avoid redefinition. */
#elif (!defined(FREERTOS) && !defined(FREERTOS_TCP)) || defined(WOLFSSL_TRACK_MEMORY)
#ifdef WOLFSSL_DEBUG_MEMORY
#define XMALLOC(s, h, t) ((void)(h), (void)(t), wolfSSL_Malloc((s), __func__, __LINE__))
@@ -578,71 +584,94 @@ typedef struct w64wrapper {
#endif
/* declare/free variable handling for async and smallstack */
+ #ifndef WC_ALLOC_DO_ON_FAILURE
+ #define WC_ALLOC_DO_ON_FAILURE() WC_DO_NOTHING
+ #endif
+
+ #define WC_DECLARE_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ VAR_TYPE* VAR_NAME[VAR_ITEMS]; \
+ int idx##VAR_NAME = 0, inner_idx_##VAR_NAME
+ #define WC_HEAP_ARRAY_ARG(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE) \
+ VAR_TYPE* VAR_NAME[VAR_ITEMS]
+ #define WC_ALLOC_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
+ (VAR_NAME)[idx##VAR_NAME] = (VAR_TYPE*)XMALLOC(VAR_SIZE, (HEAP), DYNAMIC_TYPE_TMP_BUFFER); \
+ if ((VAR_NAME)[idx##VAR_NAME] == NULL) { \
+ for (inner_idx_##VAR_NAME = 0; inner_idx_##VAR_NAME < idx##VAR_NAME; inner_idx_##VAR_NAME++) { \
+ XFREE((VAR_NAME)[inner_idx_##VAR_NAME], (HEAP), DYNAMIC_TYPE_TMP_BUFFER); \
+ (VAR_NAME)[inner_idx_##VAR_NAME] = NULL; \
+ } \
+ for (inner_idx_##VAR_NAME = idx##VAR_NAME + 1; inner_idx_##VAR_NAME < (VAR_ITEMS); inner_idx_##VAR_NAME++) { \
+ (VAR_NAME)[inner_idx_##VAR_NAME] = NULL; \
+ } \
+ idx##VAR_NAME = 0; \
+ WC_ALLOC_DO_ON_FAILURE(); \
+ break; \
+ } \
+ }
+ #define WC_CALLOC_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ do { \
+ WC_ALLOC_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP); \
+ if (idx##VAR_NAME != 0) { \
+ for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
+ XMEMSET((VAR_NAME)[idx##VAR_NAME], 0, VAR_SIZE); \
+ } \
+ } \
+ } while (0)
+ #define WC_HEAP_ARRAY_OK(VAR_NAME) (idx##VAR_NAME != 0)
+ #define WC_FREE_HEAP_ARRAY(VAR_NAME, VAR_ITEMS, HEAP) \
+ if (WC_HEAP_ARRAY_OK(VAR_NAME)) { \
+ for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
+ XFREE((VAR_NAME)[idx##VAR_NAME], (HEAP), DYNAMIC_TYPE_TMP_BUFFER); \
+ } \
+ idx##VAR_NAME = 0; \
+ }
+
#if defined(WOLFSSL_ASYNC_CRYPT) || defined(WOLFSSL_SMALL_STACK)
#define WC_DECLARE_VAR_IS_HEAP_ALLOC
#define WC_DECLARE_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP) \
- VAR_TYPE* VAR_NAME = (VAR_TYPE*)XMALLOC(sizeof(VAR_TYPE) * (VAR_SIZE), (HEAP), DYNAMIC_TYPE_WOLF_BIGINT)
- #define WC_DECLARE_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- VAR_TYPE* VAR_NAME[VAR_ITEMS]; \
- int idx##VAR_NAME, inner_idx_##VAR_NAME
- #define WC_INIT_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
- (VAR_NAME)[idx##VAR_NAME] = (VAR_TYPE*)XMALLOC(VAR_SIZE, (HEAP), DYNAMIC_TYPE_WOLF_BIGINT); \
- if ((VAR_NAME)[idx##VAR_NAME] == NULL) { \
- for (inner_idx_##VAR_NAME = 0; inner_idx_##VAR_NAME < idx##VAR_NAME; inner_idx_##VAR_NAME++) { \
- XFREE((VAR_NAME)[inner_idx_##VAR_NAME], (HEAP), DYNAMIC_TYPE_WOLF_BIGINT); \
- (VAR_NAME)[inner_idx_##VAR_NAME] = NULL; \
- } \
- for (inner_idx_##VAR_NAME = idx##VAR_NAME + 1; inner_idx_##VAR_NAME < (VAR_ITEMS); inner_idx_##VAR_NAME++) { \
- (VAR_NAME)[inner_idx_##VAR_NAME] = NULL; \
- } \
- break; \
- } \
- }
+ VAR_TYPE* VAR_NAME = NULL
+ #define WC_ALLOC_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP) \
+ do { \
+ (VAR_NAME) = (VAR_TYPE*)XMALLOC(sizeof(VAR_TYPE) * (VAR_SIZE), (HEAP), DYNAMIC_TYPE_WOLF_BIGINT); \
+ if ((VAR_NAME) == NULL) { \
+ WC_ALLOC_DO_ON_FAILURE(); \
+ } \
+ } while (0)
+ #define WC_CALLOC_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP) \
+ do { \
+ WC_ALLOC_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP); \
+ XMEMSET(VAR_NAME, 0, sizeof(VAR_TYPE) * (VAR_SIZE)); \
+ } while (0)
#define WC_FREE_VAR(VAR_NAME, HEAP) \
XFREE(VAR_NAME, (HEAP), DYNAMIC_TYPE_WOLF_BIGINT)
+ #define WC_DECLARE_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ WC_DECLARE_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP)
+ #define WC_ARRAY_ARG(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE) \
+ WC_HEAP_ARRAY_ARG(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE)
+ #define WC_ALLOC_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ WC_ALLOC_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP)
+ #define WC_CALLOC_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ WC_CALLOC_HEAP_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP)
+ #define WC_ARRAY_OK(VAR_NAME) WC_HEAP_ARRAY_OK(VAR_NAME)
#define WC_FREE_ARRAY(VAR_NAME, VAR_ITEMS, HEAP) \
- for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
- XFREE((VAR_NAME)[idx##VAR_NAME], (HEAP), DYNAMIC_TYPE_WOLF_BIGINT); \
- }
-
- #define WC_DECLARE_ARRAY_DYNAMIC_DEC(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- WC_DECLARE_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP)
- #define WC_DECLARE_ARRAY_DYNAMIC_EXE(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- WC_INIT_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP)
- #define WC_FREE_ARRAY_DYNAMIC(VAR_NAME, VAR_ITEMS, HEAP) \
- WC_FREE_ARRAY(VAR_NAME, VAR_ITEMS, HEAP)
+ WC_FREE_HEAP_ARRAY(VAR_NAME, VAR_ITEMS, HEAP)
#else
#undef WC_DECLARE_VAR_IS_HEAP_ALLOC
#define WC_DECLARE_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP) \
VAR_TYPE VAR_NAME[VAR_SIZE]
- #define WC_DECLARE_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- VAR_TYPE VAR_NAME[VAR_ITEMS][VAR_SIZE]
- #define WC_INIT_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) WC_DO_NOTHING
+ #define WC_ALLOC_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP) WC_DO_NOTHING
+ #define WC_CALLOC_VAR(VAR_NAME, VAR_TYPE, VAR_SIZE, HEAP) \
+ XMEMSET(VAR_NAME, 0, sizeof(var))
#define WC_FREE_VAR(VAR_NAME, HEAP) WC_DO_NOTHING /* nothing to free, its stack */
+ #define WC_DECLARE_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
+ VAR_TYPE VAR_NAME[VAR_ITEMS][(VAR_SIZE) / sizeof(VAR_TYPE)] /* // NOLINT(bugprone-sizeof-expression) */
+ #define WC_ARRAY_ARG(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE) \
+ VAR_TYPE VAR_NAME[VAR_ITEMS][(VAR_SIZE) / sizeof(VAR_TYPE)] /* // NOLINT(bugprone-sizeof-expression) */
+ #define WC_ALLOC_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) WC_DO_NOTHING
+ #define WC_CALLOC_ARRAY(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) XMEMSET(VAR_NAME, 0, sizeof(VAR_NAME))
+ #define WC_ARRAY_OK(VAR_NAME) 1
#define WC_FREE_ARRAY(VAR_NAME, VAR_ITEMS, HEAP) WC_DO_NOTHING /* nothing to free, its stack */
-
- #define WC_DECLARE_ARRAY_DYNAMIC_DEC(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- VAR_TYPE* VAR_NAME[VAR_ITEMS]; \
- int idx##VAR_NAME, inner_idx_##VAR_NAME
- #define WC_DECLARE_ARRAY_DYNAMIC_EXE(VAR_NAME, VAR_TYPE, VAR_ITEMS, VAR_SIZE, HEAP) \
- for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
- (VAR_NAME)[idx##VAR_NAME] = (VAR_TYPE*)XMALLOC(VAR_SIZE, (HEAP), DYNAMIC_TYPE_TMP_BUFFER); \
- if ((VAR_NAME)[idx##VAR_NAME] == NULL) { \
- for (inner_idx_##VAR_NAME = 0; inner_idx_##VAR_NAME < idx##VAR_NAME; inner_idx_##VAR_NAME++) { \
- XFREE((VAR_NAME)[inner_idx_##VAR_NAME], HEAP, DYNAMIC_TYPE_TMP_BUFFER); \
- (VAR_NAME)[inner_idx_##VAR_NAME] = NULL; \
- } \
- for (inner_idx_##VAR_NAME = idx##VAR_NAME + 1; inner_idx_##VAR_NAME < (VAR_ITEMS); inner_idx_##VAR_NAME++) { \
- (VAR_NAME)[inner_idx_##VAR_NAME] = NULL; \
- } \
- break; \
- } \
- }
- #define WC_FREE_ARRAY_DYNAMIC(VAR_NAME, VAR_ITEMS, HEAP) \
- for (idx##VAR_NAME=0; idx##VAR_NAME<(VAR_ITEMS); idx##VAR_NAME++) { \
- XFREE((VAR_NAME)[idx##VAR_NAME], (HEAP), DYNAMIC_TYPE_TMP_BUFFER); \
- }
#endif
#if defined(HAVE_FIPS) || defined(HAVE_SELFTEST)
@@ -651,9 +680,9 @@ typedef struct w64wrapper {
#define DECLARE_ARRAY WC_DECLARE_ARRAY
#define FREE_VAR WC_FREE_VAR
#define FREE_ARRAY WC_FREE_ARRAY
- #define DECLARE_ARRAY_DYNAMIC_DEC WC_DECLARE_ARRAY_DYNAMIC_DEC
- #define DECLARE_ARRAY_DYNAMIC_EXE WC_DECLARE_ARRAY_DYNAMIC_EXE
- #define FREE_ARRAY_DYNAMIC WC_FREE_ARRAY_DYNAMIC
+ #define DECLARE_ARRAY_DYNAMIC_DEC WC_DECLARE_HEAP_ARRAY
+ #define DECLARE_ARRAY_DYNAMIC_EXE WC_ALLOC_HEAP_ARRAY
+ #define FREE_ARRAY_DYNAMIC WC_FREE_HEAP_ARRAY
#endif /* HAVE_FIPS */
#if !defined(USE_WOLF_STRTOK) && \
@@ -700,11 +729,11 @@ typedef struct w64wrapper {
#endif
#ifndef XSTRCASECMP
- #if defined(MICROCHIP_PIC32) && (__XC32_VERSION >= 1000)
- /* XC32 supports str[n]casecmp in version >= 1.0. */
+ #if defined(MICROCHIP_PIC32) && (__XC32_VERSION >= 1000) && (__XC32_VERSION < 4000)
+ /* XC32 supports str[n]casecmp in version >= 1.0 through 4.0. */
#define XSTRCASECMP(s1,s2) strcasecmp((s1),(s2))
#elif defined(MICROCHIP_PIC32) || defined(WOLFSSL_TIRTOS) || \
- defined(WOLFSSL_ZEPHYR)
+ defined(WOLFSSL_ZEPHYR) || defined(MICROCHIP_PIC24)
/* XC32 version < 1.0 does not support strcasecmp. */
#define USE_WOLF_STRCASECMP
#define XSTRCASECMP(s1,s2) wc_strcasecmp(s1,s2)
@@ -734,7 +763,7 @@ typedef struct w64wrapper {
/* XC32 supports str[n]casecmp in version >= 1.0. */
#define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
#elif defined(MICROCHIP_PIC32) || defined(WOLFSSL_TIRTOS) || \
- defined(WOLFSSL_ZEPHYR)
+ defined(WOLFSSL_ZEPHYR) || defined(MICROCHIP_PIC24)
/* XC32 version < 1.0 does not support strncasecmp. */
#define USE_WOLF_STRNCASECMP
#define XSTRNCASECMP(s1,s2) wc_strncasecmp(s1,s2)
@@ -882,8 +911,12 @@ typedef struct w64wrapper {
#if !defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)
#ifndef XGETENV
- #include <stdlib.h>
- #define XGETENV getenv
+ #ifdef NO_GETENV
+ #define XGETENV(x) (NULL)
+ #else
+ #include <stdlib.h>
+ #define XGETENV getenv
+ #endif
#endif
#endif /* !NO_FILESYSTEM && !NO_STDIO_FILESYSTEM */
@@ -898,7 +931,11 @@ typedef struct w64wrapper {
#endif
#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
#define XISALNUM(c) isalnum((c))
- #define XISASCII(c) isascii((c))
+ #ifdef NO_STDLIB_ISASCII
+ #define XISASCII(c) (((c) >= 0 && (c) <= 127) ? 1 : 0)
+ #else
+ #define XISASCII(c) isascii((c))
+ #endif
#define XISSPACE(c) isspace((c))
#endif
/* needed by wolfSSL_check_domain_name() */
@@ -1015,6 +1052,7 @@ typedef struct w64wrapper {
DYNAMIC_TYPE_SPHINCS = 98,
DYNAMIC_TYPE_SM4_BUFFER = 99,
DYNAMIC_TYPE_DEBUG_TAG = 100,
+ DYNAMIC_TYPE_LMS = 101,
DYNAMIC_TYPE_SNIFFER_SERVER = 1000,
DYNAMIC_TYPE_SNIFFER_SESSION = 1001,
DYNAMIC_TYPE_SNIFFER_PB = 1002,
@@ -1169,9 +1207,55 @@ typedef struct w64wrapper {
WC_PK_TYPE_ED25519_KEYGEN = 15,
WC_PK_TYPE_CURVE25519_KEYGEN = 16,
WC_PK_TYPE_RSA_GET_SIZE = 17,
- WC_PK_TYPE_MAX = WC_PK_TYPE_RSA_GET_SIZE
+ #define _WC_PK_TYPE_MAX WC_PK_TYPE_RSA_GET_SIZE
+ #if defined(HAVE_PQC) && defined(WOLFSSL_HAVE_KYBER)
+ WC_PK_TYPE_PQC_KEM_KEYGEN = 18,
+ WC_PK_TYPE_PQC_KEM_ENCAPS = 19,
+ WC_PK_TYPE_PQC_KEM_DECAPS = 20,
+ #undef _WC_PK_TYPE_MAX
+ #define _WC_PK_TYPE_MAX WC_PK_TYPE_PQC_KEM_DECAPS
+ #endif
+ #if defined(HAVE_PQC) && (defined(HAVE_DILITHIUM) || defined(HAVE_FALCON))
+ WC_PK_TYPE_PQC_SIG_KEYGEN = 21,
+ WC_PK_TYPE_PQC_SIG_SIGN = 22,
+ WC_PK_TYPE_PQC_SIG_VERIFY = 23,
+ WC_PK_TYPE_PQC_SIG_CHECK_PRIV_KEY = 24,
+ #undef _WC_PK_TYPE_MAX
+ #define _WC_PK_TYPE_MAX WC_PK_TYPE_PQC_SIG_CHECK_PRIV_KEY
+ #endif
+ WC_PK_TYPE_MAX = _WC_PK_TYPE_MAX
};
+ #if defined(HAVE_PQC)
+ /* Post quantum KEM algorithms */
+ enum wc_PqcKemType {
+ WC_PQC_KEM_TYPE_NONE = 0,
+ #define _WC_PQC_KEM_TYPE_MAX WC_PQC_KEM_TYPE_NONE
+ #if defined(WOLFSSL_HAVE_KYBER)
+ WC_PQC_KEM_TYPE_KYBER = 1,
+ #undef _WC_PQC_KEM_TYPE_MAX
+ #define _WC_PQC_KEM_TYPE_MAX WC_PQC_KEM_TYPE_KYBER
+ #endif
+ WC_PQC_KEM_TYPE_MAX = _WC_PQC_KEM_TYPE_MAX
+ };
+
+ /* Post quantum signature algorithms */
+ enum wc_PqcSignatureType {
+ WC_PQC_SIG_TYPE_NONE = 0,
+ #define _WC_PQC_SIG_TYPE_MAX WC_PQC_SIG_TYPE_NONE
+ #if defined(HAVE_DILITHIUM)
+ WC_PQC_SIG_TYPE_DILITHIUM = 1,
+ #undef _WC_PQC_SIG_TYPE_MAX
+ #define _WC_PQC_SIG_TYPE_MAX WC_PQC_SIG_TYPE_DILITHIUM
+ #endif
+ #if defined(HAVE_FALCON)
+ WC_PQC_SIG_TYPE_FALCON = 2,
+ #undef _WC_PQC_SIG_TYPE_MAX
+ #define _WC_PQC_SIG_TYPE_MAX WC_PQC_SIG_TYPE_FALCON
+ #endif
+ WC_PQC_SIG_TYPE_MAX = _WC_PQC_SIG_TYPE_MAX
+ };
+ #endif
/* settings detection for compile vs runtime math incompatibilities */
enum {
@@ -1237,87 +1321,57 @@ typedef struct w64wrapper {
#ifndef WOLFSSL_USE_ALIGN
#define WOLFSSL_USE_ALIGN
#endif
- #endif /* WOLFSSL_AESNI || WOLFSSL_ARMASM || USE_INTEL_SPEEDUP || WOLFSSL_AFALG_XILINX */
-
- #ifdef WOLFSSL_USE_ALIGN
- #if !defined(ALIGN16)
- #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || \
- defined(__llvm__)
- #define ALIGN16 __attribute__ ( (aligned (16)))
- #elif defined(_MSC_VER)
- /* disable align warning, we want alignment ! */
- #pragma warning(disable: 4324)
- #define ALIGN16 __declspec (align (16))
- #else
- #define ALIGN16
- #endif
- #endif /* !ALIGN16 */
-
- #if !defined (ALIGN32)
- #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || \
- defined(__llvm__)
- #define ALIGN32 __attribute__ ( (aligned (32)))
- #elif defined(_MSC_VER)
- /* disable align warning, we want alignment ! */
- #pragma warning(disable: 4324)
- #define ALIGN32 __declspec (align (32))
- #else
- #define ALIGN32
- #endif
- #endif /* !ALIGN32 */
-
- #if !defined(ALIGN64)
- #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || \
- defined(__llvm__)
- #define ALIGN64 __attribute__ ( (aligned (64)))
- #elif defined(_MSC_VER)
- /* disable align warning, we want alignment ! */
- #pragma warning(disable: 4324)
- #define ALIGN64 __declspec (align (64))
- #else
- #define ALIGN64
- #endif
- #endif /* !ALIGN64 */
-
- #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || \
- defined(__llvm__)
- #define ALIGN128 __attribute__ ( (aligned (128)))
+ #endif /* WOLFSSL_AESNI || WOLFSSL_ARMASM || USE_INTEL_SPEEDUP || \
+ * WOLFSSL_AFALG_XILINX */
+
+ /* Helpers for memory alignment */
+ #ifndef XALIGNED
+ #if defined(__GNUC__) || defined(__llvm__) || \
+ defined(__IAR_SYSTEMS_ICC__)
+ #define XALIGNED(x) __attribute__ ( (aligned (x)))
+ #elif defined(__KEIL__)
+ #define XALIGNED(x) __align(x)
#elif defined(_MSC_VER)
/* disable align warning, we want alignment ! */
#pragma warning(disable: 4324)
- #define ALIGN128 __declspec (align (128))
+ #define XALIGNED(x) __declspec (align (x))
#else
- #define ALIGN128
+ #define XALIGNED(x) /* null expansion */
#endif
+ #endif
- #if defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || \
- defined(__llvm__)
- #define ALIGN256 __attribute__ ( (aligned (256)))
- #elif defined(_MSC_VER)
- /* disable align warning, we want alignment ! */
- #pragma warning(disable: 4324)
- #define ALIGN256 __declspec (align (256))
+ /* Only use alignment in wolfSSL/wolfCrypt if WOLFSSL_USE_ALIGN is set */
+ #ifdef WOLFSSL_USE_ALIGN
+ /* For IAR ARM the maximum variable alignment on stack is 8-bytes.
+ * Variables declared outside stack (like static globals) can have
+ * higher alignment. */
+ #if defined(__ICCARM__)
+ #define WOLFSSL_ALIGN(x) XALIGNED(8)
#else
- #define ALIGN256
+ #define WOLFSSL_ALIGN(x) XALIGNED(x)
#endif
-
#else
- #ifndef ALIGN16
- #define ALIGN16
- #endif
- #ifndef ALIGN32
- #define ALIGN32
- #endif
- #ifndef ALIGN64
- #define ALIGN64
- #endif
- #ifndef ALIGN128
- #define ALIGN128
- #endif
- #ifndef ALIGN256
- #define ALIGN256
- #endif
- #endif /* WOLFSSL_USE_ALIGN */
+ #define WOLFSSL_ALIGN(x) /* null expansion */
+ #endif
+
+ #ifndef ALIGN8
+ #define ALIGN8 WOLFSSL_ALIGN(8)
+ #endif
+ #ifndef ALIGN16
+ #define ALIGN16 WOLFSSL_ALIGN(16)
+ #endif
+ #ifndef ALIGN32
+ #define ALIGN32 WOLFSSL_ALIGN(32)
+ #endif
+ #ifndef ALIGN64
+ #define ALIGN64 WOLFSSL_ALIGN(64)
+ #endif
+ #ifndef ALIGN128
+ #define ALIGN128 WOLFSSL_ALIGN(128)
+ #endif
+ #ifndef ALIGN256
+ #define ALIGN256 WOLFSSL_ALIGN(256)
+ #endif
#if !defined(PEDANTIC_EXTENSION)
#if defined(__GNUC__)
@@ -1399,6 +1453,10 @@ typedef struct w64wrapper {
#ifndef HAVE_SELFTEST
#define WOLFSSL_THREAD_NO_JOIN
#endif
+ #elif defined(FREERTOS) && defined(WOLFSSL_ESPIDF)
+ typedef void* THREAD_RETURN;
+ typedef pthread_t THREAD_TYPE;
+ #define WOLFSSL_THREAD
#elif defined(FREERTOS)
typedef unsigned int THREAD_RETURN;
typedef TaskHandle_t THREAD_TYPE;
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_kyber.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_kyber.h
index 62c3ed81..61fe8b2b 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_kyber.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_kyber.h
@@ -1,3 +1,281 @@
+/* wc_kyber.h
+ *
+ * Copyright (C) 2006-2024 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free 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.
+ *
+ * wolfSSL 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
+ */
-#error "Contact wolfSSL to get the implementation of this file"
+/*!
+ \file wolfssl/wolfcrypt/wc_kyber.h
+*/
+
+
+#ifndef WOLF_CRYPT_WC_KYBER_H
+#define WOLF_CRYPT_WC_KYBER_H
+
+#include <wolfssl/wolfcrypt/types.h>
+#include <wolfssl/wolfcrypt/random.h>
+#include <wolfssl/wolfcrypt/sha3.h>
+#include <wolfssl/wolfcrypt/kyber.h>
+
+#ifdef WOLFSSL_HAVE_KYBER
+
+#if defined(_MSC_VER)
+ #define KYBER_NOINLINE __declspec(noinline)
+#elif defined(__GNUC__)
+ #define KYBER_NOINLINE __attribute__((noinline))
+#else
+ #define KYBER_NOINLINE
+#endif
+
+/* Define algorithm type when not excluded. */
+
+#ifndef WOLFSSL_NO_KYBER512
+#define WOLFSSL_KYBER512
+#endif
+#ifndef WOLFSSL_NO_KYBER768
+#define WOLFSSL_KYBER768
+#endif
+#ifndef WOLFSSL_NO_KYBER1024
+#define WOLFSSL_KYBER1024
+#endif
+
+enum {
+ /* Flags of Kyber keys. */
+ KYBER_FLAG_PRIV_SET = 0x0001,
+ KYBER_FLAG_PUB_SET = 0x0002,
+ KYBER_FLAG_BOTH_SET = 0x0003,
+ KYBER_FLAG_H_SET = 0x0004,
+
+ /* 2 bits of random used to create noise value. */
+ KYBER_CBD_ETA2 = 2,
+ /* 3 bits of random used to create noise value. */
+ KYBER_CBD_ETA3 = 3,
+
+ /* Number of bits to compress to. */
+ KYBER_COMP_4BITS = 4,
+ KYBER_COMP_5BITS = 5,
+ KYBER_COMP_10BITS = 10,
+ KYBER_COMP_11BITS = 11,
+};
+
+
+/* SHAKE128 rate. */
+#define XOF_BLOCK_SIZE 168
+
+/* Modulus of co-efficients of polynomial. */
+#define KYBER_Q 3329
+
+
+/* Kyber-512 parameters */
+#ifdef WOLFSSL_KYBER512
+/* Number of bits of random to create noise from. */
+#define KYBER512_ETA1 KYBER_CBD_ETA3
+#endif /* WOLFSSL_KYBER512 */
+
+/* Kyber-768 parameters */
+#ifdef WOLFSSL_KYBER768
+/* Number of bits of random to create noise from. */
+#define KYBER768_ETA1 KYBER_CBD_ETA2
+#endif /* WOLFSSL_KYBER768 */
+
+/* Kyber-1024 parameters */
+#ifdef WOLFSSL_KYBER1024
+/* Number of bits of random to create noise from. */
+#define KYBER1024_ETA1 KYBER_CBD_ETA2
+#endif /* WOLFSSL_KYBER1024 */
+
+
+
+/* The data type of the pseudo-random function. */
+#define KYBER_PRF_T wc_Shake
+
+/* Kyber key. */
+struct KyberKey {
+ /* Type of key: KYBER512, KYBER768, KYBER1024 */
+ int type;
+ /* Dynamic memory allocation hint. */
+ void* heap;
+#if defined(WOLF_CRYPTO_CB)
+ /* Device Id. */
+ int devId;
+#endif
+ /* Flags indicating what is stored in the key. */
+ int flags;
+
+ /* A pseudo-random function object. */
+ KYBER_PRF_T prf;
+
+ /* Private key as a vector. */
+ sword16 priv[KYBER_MAX_K * KYBER_N];
+ /* Public key as a vector. */
+ sword16 pub[KYBER_MAX_K * KYBER_N];
+ /* Public seed. */
+ byte pubSeed[KYBER_SYM_SZ];
+ /* Public hash - hash of encoded public key. */
+ byte h[KYBER_SYM_SZ];
+ /* Randomizer for decapsulation. */
+ byte z[KYBER_SYM_SZ];
+};
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+WOLFSSL_LOCAL
+void kyber_init(void);
+WOLFSSL_LOCAL
+void kyber_keygen(sword16* priv, sword16* pub, sword16* e, const sword16* a,
+ int kp);
+WOLFSSL_LOCAL
+void kyber_encapsulate(const sword16* pub, sword16* bp, sword16* v,
+ const sword16* at, sword16* sp, const sword16* ep, const sword16* epp,
+ const sword16* m, int kp);
+WOLFSSL_LOCAL
+void kyber_decapsulate(const sword16* priv, sword16* mp, sword16* bp,
+ const sword16* v, int kp);
+
+WOLFSSL_LOCAL
+int kyber_gen_matrix(KYBER_PRF_T* prf, sword16* a, int kp, byte* seed,
+ int transposed);
+WOLFSSL_LOCAL
+int kyber_get_noise(KYBER_PRF_T* prf, int kp, sword16* vec1, sword16* vec2,
+ sword16* poly, byte* seed);
+
+#ifdef USE_INTEL_SPEEDUP
+WOLFSSL_LOCAL
+int kyber_kdf(byte* seed, int seedLen, byte* out, int outLen);
+#endif
+WOLFSSL_LOCAL
+void kyber_prf_init(KYBER_PRF_T* prf);
+WOLFSSL_LOCAL
+int kyber_prf_new(KYBER_PRF_T* prf, void* heap, int devId);
+WOLFSSL_LOCAL
+void kyber_prf_free(KYBER_PRF_T* prf);
+
+WOLFSSL_LOCAL
+int kyber_cmp(const byte* a, const byte* b, int sz);
+
+WOLFSSL_LOCAL
+void kyber_vec_compress_10(byte* r, sword16* v, unsigned int kp);
+WOLFSSL_LOCAL
+void kyber_vec_compress_11(byte* r, sword16* v);
+WOLFSSL_LOCAL
+void kyber_vec_decompress_10(sword16* v, const unsigned char* b,
+ unsigned int kp);
+WOLFSSL_LOCAL
+void kyber_vec_decompress_11(sword16* v, const unsigned char* b);
+
+WOLFSSL_LOCAL
+void kyber_compress_4(byte* b, sword16* p);
+WOLFSSL_LOCAL
+void kyber_compress_5(byte* b, sword16* p);
+WOLFSSL_LOCAL
+void kyber_decompress_4(sword16* p, const unsigned char* b);
+WOLFSSL_LOCAL
+void kyber_decompress_5(sword16* p, const unsigned char* b);
+
+WOLFSSL_LOCAL
+void kyber_from_msg(sword16* p, const byte* msg);
+WOLFSSL_LOCAL
+void kyber_to_msg(byte* msg, sword16* p);
+WOLFSSL_LOCAL
+void kyber_from_bytes(sword16* p, const byte* b, int k);
+WOLFSSL_LOCAL
+void kyber_to_bytes(byte* b, sword16* p, int k);
+
+#ifdef USE_INTEL_SPEEDUP
+WOLFSSL_LOCAL
+void kyber_keygen_avx2(sword16* priv, sword16* pub, sword16* e,
+ const sword16* a, int kp);
+WOLFSSL_LOCAL
+void kyber_encapsulate_avx2(const sword16* pub, sword16* bp, sword16* v,
+ const sword16* at, sword16* sp, const sword16* ep, const sword16* epp,
+ const sword16* m, int kp);
+WOLFSSL_LOCAL
+void kyber_decapsulate_avx2(const sword16* priv, sword16* mp, sword16* bp,
+ const sword16* v, int kp);
+
+WOLFSSL_LOCAL
+unsigned int kyber_rej_uniform_n_avx2(sword16* p, unsigned int len,
+ const byte* r, unsigned int rLen);
+WOLFSSL_LOCAL
+unsigned int kyber_rej_uniform_avx2(sword16* p, unsigned int len, const byte* r,
+ unsigned int rLen);
+WOLFSSL_LOCAL
+void kyber_redistribute_21_rand_avx2(const word64* s, byte* r0, byte* r1,
+ byte* r2, byte* r3);
+void kyber_redistribute_17_rand_avx2(const word64* s, byte* r0, byte* r1,
+ byte* r2, byte* r3);
+void kyber_redistribute_16_rand_avx2(const word64* s, byte* r0, byte* r1,
+ byte* r2, byte* r3);
+void kyber_redistribute_8_rand_avx2(const word64* s, byte* r0, byte* r1,
+ byte* r2, byte* r3);
+
+WOLFSSL_LOCAL
+void kyber_sha3_blocksx4_avx2(word64* s);
+WOLFSSL_LOCAL
+void kyber_sha3_128_blocksx4_seed_avx2(word64* s, byte* seed);
+WOLFSSL_LOCAL
+void kyber_sha3_256_blocksx4_seed_avx2(word64* s, byte* seed);
+
+WOLFSSL_LOCAL
+void kyber_cbd_eta2_avx2(sword16* p, const byte* r);
+WOLFSSL_LOCAL
+void kyber_cbd_eta3_avx2(sword16* p, const byte* r);
+
+WOLFSSL_LOCAL
+void kyber_from_msg_avx2(sword16* p, const byte* msg);
+WOLFSSL_LOCAL
+void kyber_to_msg_avx2(byte* msg, sword16* p);
+
+WOLFSSL_LOCAL
+void kyber_from_bytes_avx2(sword16* p, const byte* b);
+WOLFSSL_LOCAL
+void kyber_to_bytes_avx2(byte* b, sword16* p);
+
+WOLFSSL_LOCAL
+void kyber_compress_10_avx2(byte* r, const sword16* p, int n);
+WOLFSSL_LOCAL
+void kyber_decompress_10_avx2(sword16* p, const byte* r, int n);
+WOLFSSL_LOCAL
+void kyber_compress_11_avx2(byte* r, const sword16* p, int n);
+WOLFSSL_LOCAL
+void kyber_decompress_11_avx2(sword16* p, const byte* r, int n);
+
+WOLFSSL_LOCAL
+void kyber_compress_4_avx2(byte* r, const sword16* p);
+WOLFSSL_LOCAL
+void kyber_decompress_4_avx2(sword16* p, const byte* r);
+WOLFSSL_LOCAL
+void kyber_compress_5_avx2(byte* r, const sword16* p);
+WOLFSSL_LOCAL
+void kyber_decompress_5_avx2(sword16* p, const byte* r);
+
+
+WOLFSSL_LOCAL
+int kyber_cmp_avx2(const byte* a, const byte* b, int sz);
+#endif
+
+#ifdef __cplusplus
+ } /* extern "C" */
+#endif
+
+#endif /* WOLFSSL_HAVE_KYBER */
+
+#endif /* WOLF_CRYPT_WC_KYBER_H */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_lms.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_lms.h
index a0e06e41..f51dad7b 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_lms.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_lms.h
@@ -1,6 +1,6 @@
/* wc_lms.h
*
- * Copyright (C) 2006-2023 wolfSSL Inc.
+ * Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_port.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_port.h
index 5240effa..bf5ef6b3 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_port.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/wc_port.h
@@ -130,6 +130,7 @@
#include "cmsis_os.h"
#elif defined(WOLFSSL_TIRTOS)
#include <ti/sysbios/BIOS.h>
+ #include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Semaphore.h>
#elif defined(WOLFSSL_FROSTED)
#include <semaphore.h>
@@ -243,7 +244,7 @@
typedef pthread_rwlock_t wolfSSL_RwLock;
#endif
typedef pthread_mutex_t wolfSSL_Mutex;
- #define WOLFSSL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+ #define WOLFSSL_MUTEX_INITIALIZER(lockname) PTHREAD_MUTEX_INITIALIZER
#elif defined(THREADX)
typedef TX_MUTEX wolfSSL_Mutex;
#elif defined(WOLFSSL_DEOS)
@@ -305,6 +306,13 @@
#endif /* USE_WINDOWS_API */
#endif /* SINGLE_THREADED */
+
+#ifdef WOLFSSL_MUTEX_INITIALIZER
+ #define WOLFSSL_MUTEX_INITIALIZER_CLAUSE(lockname) = WOLFSSL_MUTEX_INITIALIZER(lockname)
+#else
+ #define WOLFSSL_MUTEX_INITIALIZER_CLAUSE(lockname) /* null expansion */
+#endif
+
#if !defined(WOLFSSL_USE_RWLOCK) || defined(SINGLE_THREADED)
typedef wolfSSL_Mutex wolfSSL_RwLock;
#endif
@@ -697,49 +705,59 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
#if !defined(NO_WOLFSSL_DIR)\
&& !defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
- #if defined(USE_WINDOWS_API)
- #include <sys/stat.h>
- #ifndef XSTAT
- #define XSTAT _stat
- #endif
- #define XS_ISREG(s) (s & _S_IFREG)
- #define SEPARATOR_CHAR ';'
+ #if defined(USE_WINDOWS_API)
+ #include <sys/stat.h>
+ #ifndef XSTAT
+ #define XSTAT _stat
+ #endif
+ #define XS_ISREG(s) (s & _S_IFREG)
+ #define SEPARATOR_CHAR ';'
- #elif defined(INTIME_RTOS)
- #include <sys/stat.h>
- #ifndef XSTAT
- #define XSTAT _stat64
- #endif
- #define XS_ISREG(s) S_ISREG(s)
- #define SEPARATOR_CHAR ';'
- #define XWRITE write
- #define XREAD read
- #define XCLOSE close
+ #elif defined(ARDUINO)
+ #ifndef XSTAT
+ #define XSTAT _stat
+ #endif
+ #define XS_ISREG(s) (s & _S_IFREG)
+ #define SEPARATOR_CHAR ';'
- #elif defined(WOLFSSL_TELIT_M2MB)
- #ifndef XSTAT
- #define XSTAT m2mb_fs_stat
- #endif
- #define XS_ISREG(s) (s & M2MB_S_IFREG)
- #define SEPARATOR_CHAR ':'
- #else
- #include <dirent.h>
- #include <unistd.h>
- #include <sys/stat.h>
- #define XWRITE write
- #define XREAD read
- #define XCLOSE close
- #ifndef XSTAT
- #define XSTAT stat
+ #elif defined(INTIME_RTOS)
+ #include <sys/stat.h>
+ #ifndef XSTAT
+ #define XSTAT _stat64
+ #endif
+ #define XS_ISREG(s) S_ISREG(s)
+ #define SEPARATOR_CHAR ';'
+ #define XWRITE write
+ #define XREAD read
+ #define XCLOSE close
+
+ #elif defined(WOLFSSL_TELIT_M2MB)
+ #ifndef XSTAT
+ #define XSTAT m2mb_fs_stat
+ #endif
+ #define XS_ISREG(s) (s & M2MB_S_IFREG)
+ #define SEPARATOR_CHAR ':'
+
+ #else
+ #ifndef NO_WOLFSSL_DIR
+ #include <dirent.h>
+ #endif
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #define XWRITE write
+ #define XREAD read
+ #define XCLOSE close
+ #ifndef XSTAT
+ #define XSTAT stat
+ #endif
+ #define XS_ISREG(s) S_ISREG(s)
+ #define SEPARATOR_CHAR ':'
#endif
- #define XS_ISREG(s) S_ISREG(s)
- #define SEPARATOR_CHAR ':'
- #endif
- #ifndef XSTAT_TYPE
- #define XSTAT_TYPE struct XSTAT
- #endif
- #endif
+ #ifndef XSTAT_TYPE
+ #define XSTAT_TYPE struct XSTAT
+ #endif
+ #endif /* !NO_WOLFSSL_DIR !WOLFSSL_NUCLEUS !WOLFSSL_NUCLEUS_1_2 */
#endif
#ifndef MAX_FILENAME_SZ
@@ -776,6 +794,8 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
#define IntimeFindNext(data) (0 == _findnext64(data))
#define IntimeFindClose(data) (0 == _findclose64(data))
#define IntimeFilename(ctx) ctx->FindFileData.f_filename
+ #elif defined(ARDUINO)
+ /* TODO: board specific features */
#else
struct dirent* entry;
DIR* dir;
@@ -1179,6 +1199,33 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
#endif
#endif
+#ifdef WOLF_C99
+ /* use alternate keyword for compatibility with -std=c99 */
+ #define XASM_VOLATILE(a) __asm__ volatile(a)
+#elif defined(__IAR_SYSTEMS_ICC__)
+ #define XASM_VOLATILE(a) asm volatile(a)
+#elif defined(__KEIL__)
+ #define XASM_VOLATILE(a) __asm volatile(a)
+#else
+ #define XASM_VOLATILE(a) __asm__ __volatile__(a)
+#endif
+
+#ifndef WOLFSSL_NO_FENCE
+ #if defined (__i386__) || defined(__x86_64__)
+ #define XFENCE() XASM_VOLATILE("lfence")
+ #elif (defined (__arm__) && (__ARM_ARCH > 6)) || defined(__aarch64__)
+ #define XFENCE() XASM_VOLATILE("isb")
+ #elif defined(__riscv)
+ #define XFENCE() XASM_VOLATILE("fence")
+ #elif defined(__PPC__)
+ #define XFENCE() XASM_VOLATILE("isync; sync")
+ #else
+ #define XFENCE() do{}while(0)
+ #endif
+#else
+ #define XFENCE() do{}while(0)
+#endif
+
/* AFTER user_settings.h is loaded,
** determine if POSIX multi-threaded: HAVE_PTHREAD */
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/xmss.h b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/xmss.h
index 70f26c48..7f19aee2 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/xmss.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfcrypt/xmss.h
@@ -89,6 +89,53 @@
#define XMSSMT_NAME_MIN_LEN (20) /* strlen("XMSSMT-SHA2_20/2_256") */
#define XMSSMT_NAME_MAX_LEN (21) /* strlen("XMSSMT-SHA2_60/12_256") */
+#if defined(HAVE_FIPS) || defined(HAVE_LIBXMSS)
+ #undef WOLFSSL_WC_XMSS_NO_SHA512
+ #define WOLFSSL_WC_XMSS_NO_SHA512
+ #undef WOLFSSL_WC_XMSS_NO_SHAKE128
+ #define WOLFSSL_WC_XMSS_NO_SHAKE128
+ #undef WOLFSSL_WC_XMSS_MAX_HASH_SIZE
+ #ifdef HAVE_LIBXMSS
+ #define WOLFSSL_WC_XMSS_MIN_HASH_SIZE 256
+ #else
+ #define WOLFSSL_WC_XMSS_MIN_HASH_SIZE 192
+ #endif
+ #define WOLFSSL_WC_XMSS_MAX_HASH_SIZE 256
+#endif
+
+#if !defined(NO_SHA256) && !defined(WOLFSSL_WC_XMSS_NO_SHA256)
+ #define WC_XMSS_SHA256
+#endif
+#if defined(WOLFSSL_SHA512) && !defined(WOLFSSL_WC_XMSS_NO_SHA512)
+ #define WC_XMSS_SHA512
+#endif
+#if defined(WOLFSSL_SHAKE128) && !defined(WOLFSSL_WC_XMSS_NO_SHAKE128)
+ #define WC_XMSS_SHAKE128
+#endif
+#if defined(WOLFSSL_SHAKE256) && !defined(WOLFSSL_WC_XMSS_NO_SHAKE256)
+ #define WC_XMSS_SHAKE256
+#endif
+
+#ifndef WOLFSSL_WC_XMSS_MIN_HASH_SIZE
+ #define WOLFSSL_WC_XMSS_MIN_HASH_SIZE 192
+#endif
+#ifndef WOLFSSL_WC_XMSS_MAX_HASH_SIZE
+ #define WOLFSSL_WC_XMSS_MAX_HASH_SIZE 512
+#endif
+#if WOLFSSL_WC_XMSS_MIN_HASH_SIZE > WOLFSSL_WC_XMSS_MAX_HASH_SIZE
+ #error "XMSS minimum hash size is greater than maximum hash size"
+#endif
+
+#ifndef WOLFSSL_XMSS_MIN_HEIGHT
+ #define WOLFSSL_XMSS_MIN_HEIGHT 10
+#endif
+#ifndef WOLFSSL_XMSS_MAX_HEIGHT
+ #define WOLFSSL_XMSS_MAX_HEIGHT 60
+#endif
+#if WOLFSSL_XMSS_MIN_HEIGHT > WOLFSSL_XMSS_MAX_HEIGHT
+ #error "XMSS minimum height is greater than maximum height"
+#endif
+
typedef struct XmssKey XmssKey;
/* Return codes returned by private key callbacks. */
@@ -113,37 +160,41 @@ enum wc_XmssState {
};
/* Private key write and read callbacks. */
-typedef enum wc_XmssRc (*write_private_key_cb)(const byte * priv, word32 privSz, void *context);
-typedef enum wc_XmssRc (*read_private_key_cb)(byte * priv, word32 privSz, void *context);
+typedef enum wc_XmssRc (*write_private_key_cb)(const byte* priv, word32 privSz,
+ void* context);
+typedef enum wc_XmssRc (*read_private_key_cb)(byte* priv, word32 privSz,
+ void* context);
#ifdef __cplusplus
extern "C" {
#endif
-WOLFSSL_API int wc_XmssKey_Init(XmssKey * key, void * heap, int devId);
-WOLFSSL_API int wc_XmssKey_SetParamStr(XmssKey * key, const char * str);
+
+WOLFSSL_API int wc_XmssKey_Init(XmssKey* key, void* heap, int devId);
+WOLFSSL_API int wc_XmssKey_SetParamStr(XmssKey* key, const char* str);
#ifndef WOLFSSL_XMSS_VERIFY_ONLY
-WOLFSSL_API int wc_XmssKey_SetWriteCb(XmssKey * key,
+WOLFSSL_API int wc_XmssKey_SetWriteCb(XmssKey* key,
write_private_key_cb write_cb);
-WOLFSSL_API int wc_XmssKey_SetReadCb(XmssKey * key,
+WOLFSSL_API int wc_XmssKey_SetReadCb(XmssKey* key,
read_private_key_cb read_cb);
-WOLFSSL_API int wc_XmssKey_SetContext(XmssKey * key, void * context);
-WOLFSSL_API int wc_XmssKey_MakeKey(XmssKey * key, WC_RNG * rng);
-WOLFSSL_API int wc_XmssKey_Reload(XmssKey * key);
-WOLFSSL_API int wc_XmssKey_GetPrivLen(const XmssKey * key, word32 * len);
-WOLFSSL_API int wc_XmssKey_Sign(XmssKey * key, byte * sig, word32 * sigSz,
- const byte * msg, int msgSz);
-WOLFSSL_API int wc_XmssKey_SigsLeft(XmssKey * key);
+WOLFSSL_API int wc_XmssKey_SetContext(XmssKey* key, void* context);
+WOLFSSL_API int wc_XmssKey_MakeKey(XmssKey* key, WC_RNG* rng);
+WOLFSSL_API int wc_XmssKey_Reload(XmssKey* key);
+WOLFSSL_API int wc_XmssKey_GetPrivLen(const XmssKey* key, word32* len);
+WOLFSSL_API int wc_XmssKey_Sign(XmssKey* key, byte* sig, word32* sigSz,
+ const byte* msg, int msgSz);
+WOLFSSL_API int wc_XmssKey_SigsLeft(XmssKey* key);
#endif /* ifndef WOLFSSL_XMSS_VERIFY_ONLY */
-WOLFSSL_API void wc_XmssKey_Free(XmssKey * key);
-WOLFSSL_API int wc_XmssKey_GetSigLen(const XmssKey * key, word32 * len);
-WOLFSSL_API int wc_XmssKey_GetPubLen(const XmssKey * key, word32 * len);
-WOLFSSL_API int wc_XmssKey_ExportPub(XmssKey * keyDst, const XmssKey * keySrc);
-WOLFSSL_API int wc_XmssKey_ExportPubRaw(const XmssKey * key, byte * out,
- word32 * outLen);
-WOLFSSL_API int wc_XmssKey_ImportPubRaw(XmssKey * key, const byte * in,
+WOLFSSL_API void wc_XmssKey_Free(XmssKey* key);
+WOLFSSL_API int wc_XmssKey_GetSigLen(const XmssKey* key, word32* len);
+WOLFSSL_API int wc_XmssKey_GetPubLen(const XmssKey* key, word32* len);
+WOLFSSL_API int wc_XmssKey_ExportPub(XmssKey* keyDst, const XmssKey* keySrc);
+WOLFSSL_API int wc_XmssKey_ExportPubRaw(const XmssKey* key, byte* out,
+ word32* outLen);
+WOLFSSL_API int wc_XmssKey_ImportPubRaw(XmssKey* key, const byte* in,
word32 inLen);
-WOLFSSL_API int wc_XmssKey_Verify(XmssKey * key, const byte * sig, word32 sigSz,
- const byte * msg, int msgSz);
+WOLFSSL_API int wc_XmssKey_Verify(XmssKey* key, const byte* sig, word32 sigSz,
+ const byte* msg, int msgSz);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/extra/wolfssl/wolfssl/wolfssl/wolfio.h b/extra/wolfssl/wolfssl/wolfssl/wolfio.h
index 9a8b5113..48646a50 100644
--- a/extra/wolfssl/wolfssl/wolfssl/wolfio.h
+++ b/extra/wolfssl/wolfssl/wolfssl/wolfio.h
@@ -66,6 +66,8 @@
#include <errno.h>
#define LWIP_PROVIDE_ERRNO 1
#endif
+ #elif defined(ARDUINO)
+ /* TODO Add specific boards */
#elif defined(FREESCALE_MQX)
#include <posix.h>
#include <rtcs.h>
@@ -118,8 +120,6 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
- #include <netdb.h>
- #include <sys/ioctl.h>
#elif defined(WOLFSSL_SGX)
#include <errno.h>
#elif defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
@@ -161,11 +161,9 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
- #include <netdb.h>
#ifdef __PPU
#include <netex/errno.h>
#else
- #include <sys/ioctl.h>
#endif
#endif
#endif
@@ -318,6 +316,12 @@
#include <network.h>
#define SEND_FUNCTION net_send
#define RECV_FUNCTION net_recv
+#elif defined(WOLFSSL_ESPIDF)
+ #define SEND_FUNCTION send
+ #define RECV_FUNCTION recv
+ #if !defined(HAVE_SOCKADDR) && !defined(WOLFSSL_NO_SOCK)
+ #define HAVE_SOCKADDR
+ #endif
#elif defined(WOLFSSL_LWIP) && !defined(WOLFSSL_APACHE_MYNEWT)
#define SEND_FUNCTION lwip_send
#define RECV_FUNCTION lwip_recv
diff --git a/extra/wolfssl/wolfssl/zephyr/CMakeLists.txt b/extra/wolfssl/wolfssl/zephyr/CMakeLists.txt
index bf8fe1a7..ec6dcba2 100644
--- a/extra/wolfssl/wolfssl/zephyr/CMakeLists.txt
+++ b/extra/wolfssl/wolfssl/zephyr/CMakeLists.txt
@@ -45,6 +45,7 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/curve448.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/des3.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/dh.c)
+ zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/dilithium.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/dsa.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/ecc.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/ecc_fp.c)
@@ -52,6 +53,7 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/ed25519.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/ed448.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/error.c)
+ zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/ext_kyber.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/falcon.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/fe_448.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/fe_low_mem.c)
@@ -95,6 +97,7 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/sp_dsp32.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/sp_int.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/sp_x86_64.c)
+ zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/sphincs.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/srp.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/tfm.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/wc_dsp.c)
@@ -106,6 +109,7 @@ if(CONFIG_WOLFSSL)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/wolfevent.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/wolfmath.c)
+ zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/liboqs/liboqs.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/psa/psa.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/psa/psa_aes.c)
zephyr_library_sources(${ZEPHYR_CURRENT_MODULE_DIR}/wolfcrypt/src/port/psa/psa_hash.c)
diff --git a/extra/wolfssl/wolfssl/zephyr/samples/wolfssl_benchmark/prj.conf b/extra/wolfssl/wolfssl/zephyr/samples/wolfssl_benchmark/prj.conf
index 15d4ebba..b7e4eee4 100644
--- a/extra/wolfssl/wolfssl/zephyr/samples/wolfssl_benchmark/prj.conf
+++ b/extra/wolfssl/wolfssl/zephyr/samples/wolfssl_benchmark/prj.conf
@@ -1,5 +1,6 @@
# Configure stack and heap sizes
CONFIG_MAIN_STACK_SIZE=32768
+CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=8192
# Pthreads
CONFIG_PTHREAD_IPC=y
diff --git a/include/my_attribute.h b/include/my_attribute.h
index c8e98070..25d21d5e 100644
--- a/include/my_attribute.h
+++ b/include/my_attribute.h
@@ -70,5 +70,19 @@
# endif /* GNUC >= 3.1 */
#endif
+/* Define pragmas to disable warnings for stack frame checking */
+#if defined(__clang__)
+#define PRAGMA_DISABLE_CHECK_STACK_FRAME \
+_Pragma("clang diagnostic push") \
+_Pragma("clang diagnostic ignored \"-Wframe-larger-than=\"")
+
+#define PRAGMA_REENABLE_CHECK_STACK_FRAME \
+_Pragma("clang diagnostic pop")
+
+#else
+#define PRAGMA_DISABLE_CHECK_STACK_FRAME
+#define PRAGMA_REENABLE_CHECK_STACK_FRAME
#endif
+
+#endif /* _my_attribute_h */
diff --git a/include/my_base.h b/include/my_base.h
index 9a5a4e94..3cbd4f7e 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -49,6 +49,7 @@
#define HA_OPEN_MERGE_TABLE 2048U
#define HA_OPEN_FOR_CREATE 4096U
#define HA_OPEN_FOR_DROP (1U << 13) /* Open part of drop */
+#define HA_OPEN_GLOBAL_TMP_TABLE (1U << 14) /* TMP table used by repliction */
/*
Allow opening even if table is incompatible as this is for ALTER TABLE which
@@ -369,6 +370,12 @@ enum ha_base_keytype {
#define HA_CREATE_INTERNAL_TABLE 256U
#define HA_PRESERVE_INSERT_ORDER 512U
#define HA_CREATE_NO_ROLLBACK 1024U
+/*
+ A temporary table that can be used by different threads, eg. replication
+ threads. This flag ensure that memory is not allocated with THREAD_SPECIFIC,
+ as we do for other temporary tables.
+*/
+#define HA_CREATE_GLOBAL_TMP_TABLE 2048U
/* Flags used by start_bulk_insert */
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index f88a6fe8..d5467065 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -22,14 +22,15 @@
#include <m_string.h>
#include <my_pthread.h>
-typedef uint32 my_bitmap_map;
+typedef ulonglong my_bitmap_map;
typedef struct st_bitmap
{
my_bitmap_map *bitmap;
my_bitmap_map *last_word_ptr;
- my_bitmap_map last_word_mask;
+ my_bitmap_map last_bit_mask;
uint32 n_bits; /* number of bits occupied by the above */
+ my_bool bitmap_allocated;
} MY_BITMAP;
#ifdef __cplusplus
@@ -39,7 +40,7 @@ extern "C" {
/* Reset memory. Faster then doing a full bzero */
#define my_bitmap_clear(A) ((A)->bitmap= 0)
-extern void create_last_word_mask(MY_BITMAP *map);
+extern void create_last_bit_mask(MY_BITMAP *map);
extern my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits);
extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size);
@@ -53,12 +54,12 @@ extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
extern my_bool bitmap_fast_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
extern my_bool bitmap_union_is_set_all(const MY_BITMAP *map1,
const MY_BITMAP *map2);
-extern my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array,
+extern my_bool bitmap_exists_intersection(MY_BITMAP **bitmap_array,
uint bitmap_count,
uint start_bit, uint end_bit);
extern uint bitmap_set_next(MY_BITMAP *map);
-extern uint bitmap_get_first(const MY_BITMAP *map);
+extern uint bitmap_get_first_clear(const MY_BITMAP *map);
extern uint bitmap_get_first_set(const MY_BITMAP *map);
extern uint bitmap_bits_set(const MY_BITMAP *map);
extern uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit);
@@ -71,54 +72,70 @@ extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2);
extern void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2);
extern void bitmap_invert(MY_BITMAP *map);
extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2);
+/* Functions to export/import bitmaps to an architecture independent format */
+extern void bitmap_export(uchar *to, MY_BITMAP *map);
+extern void bitmap_import(MY_BITMAP *map, uchar *from);
+
+#define my_bitmap_map_bytes sizeof(my_bitmap_map)
+#define my_bitmap_map_bits (my_bitmap_map_bytes*8)
+/* Size in bytes to store 'bits' number of bits */
+#define bitmap_buffer_size(bits) (MY_ALIGN((bits), my_bitmap_map_bits)/8)
+#define my_bitmap_buffer_size(map) bitmap_buffer_size((map)->n_bits)
+#define no_bytes_in_export_map(map) (((map)->n_bits + 7)/8)
+#define no_words_in_map(map) (((map)->n_bits + (my_bitmap_map_bits-1))/my_bitmap_map_bits)
/* Fast, not thread safe, bitmap functions */
-#define bitmap_buffer_size(bits) (((bits)+31)/32)*4
-#define no_bytes_in_map(map) (((map)->n_bits + 7)/8)
-#define no_words_in_map(map) (((map)->n_bits + 31)/32)
-#define bytes_word_aligned(bytes) (4*((bytes + 3)/4))
-/* The following functions must be compatible with create_last_word_mask()! */
+/* The following functions must be compatible with create_last_bit_mask()! */
static inline void
bitmap_set_bit(MY_BITMAP *map,uint bit)
{
- uchar *b= (uchar*) map->bitmap + bit / 8;
DBUG_ASSERT(bit < map->n_bits);
- *b= (uchar) (*b | 1U << (bit & 7));
+ map->bitmap[bit/my_bitmap_map_bits]|=
+ (1ULL << (bit & (my_bitmap_map_bits-1)));
}
static inline void
bitmap_flip_bit(MY_BITMAP *map,uint bit)
{
- uchar *b= (uchar*) map->bitmap + bit / 8;
DBUG_ASSERT(bit < map->n_bits);
- *b= (uchar) (*b ^ 1U << (bit & 7));
+ map->bitmap[bit/my_bitmap_map_bits]^=
+ (1ULL << (bit & (my_bitmap_map_bits-1)));
}
static inline void
bitmap_clear_bit(MY_BITMAP *map,uint bit)
{
- uchar *b= (uchar*) map->bitmap + bit / 8;
DBUG_ASSERT(bit < map->n_bits);
- *b= (uchar) (*b & ~(1U << (bit & 7)));
+ map->bitmap[bit/my_bitmap_map_bits]&=
+ ~(1ULL << (bit & (my_bitmap_map_bits-1)));
}
static inline uint
bitmap_is_set(const MY_BITMAP *map,uint bit)
{
- const uchar *b= (const uchar*) map->bitmap + bit / 8;
DBUG_ASSERT(bit < map->n_bits);
- return !!(*b & (1U << (bit & 7)));
+ return (!!(map->bitmap[bit/my_bitmap_map_bits] &
+ (1ULL << (bit & (my_bitmap_map_bits-1)))));
}
+/* Return true if bitmaps are equal */
static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
- if (memcmp(map1->bitmap, map2->bitmap, 4*(no_words_in_map(map1)-1)) != 0)
- return FALSE;
- return ((*map1->last_word_ptr | map1->last_word_mask) ==
- (*map2->last_word_ptr | map2->last_word_mask));
+ DBUG_ASSERT(map1->n_bits == map2->n_bits);
+ return (memcmp(map1->bitmap, map2->bitmap,
+ my_bitmap_buffer_size(map1)) == 0);
}
#define bitmap_clear_all(MAP) \
- { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); }
-#define bitmap_set_all(MAP) \
- (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))
+ { memset((MAP)->bitmap, 0, my_bitmap_buffer_size(MAP)); }
+
+static inline void
+bitmap_set_all(const MY_BITMAP *map)
+{
+ if (map->n_bits)
+ {
+ memset(map->bitmap, 0xFF, my_bitmap_map_bytes * (no_words_in_map(map)-1));
+ DBUG_ASSERT(map->bitmap + no_words_in_map(map)-1 == map->last_word_ptr);
+ *map->last_word_ptr= ~map->last_bit_mask;
+ }
+}
#ifdef __cplusplus
}
diff --git a/include/my_global.h b/include/my_global.h
index 54f76bf5..7da8b73c 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -973,6 +973,7 @@ typedef struct st_mysql_lex_string LEX_STRING;
#define SOCKET_ECONNRESET WSAECONNRESET
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
+#define SOCKET_CLOSED EIO
#else /* Unix */
#define socket_errno errno
#define closesocket(A) close(A)
@@ -982,6 +983,7 @@ typedef struct st_mysql_lex_string LEX_STRING;
#define SOCKET_EADDRINUSE EADDRINUSE
#define SOCKET_ETIMEDOUT ETIMEDOUT
#define SOCKET_ECONNRESET ECONNRESET
+#define SOCKET_CLOSED EIO
#define SOCKET_ENFILE ENFILE
#define SOCKET_EMFILE EMFILE
#endif
diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h
index 8b9b0046..21e44847 100644
--- a/include/my_rdtsc.h
+++ b/include/my_rdtsc.h
@@ -111,7 +111,7 @@ C_MODE_START
On AARCH64, we use the generic timer base register. We override clang
implementation for aarch64 as it access a PMU register which is not
guaranteed to be active.
- On RISC-V, we use the rdcycle instruction to read from mcycle register.
+ On RISC-V, we use the rdtime instruction to read from mtime register.
Sadly, we have nothing for the Digital Alpha, MIPS, Motorola m68k,
HP PA-RISC or other non-mainstream (or obsolete) processors.
@@ -211,15 +211,15 @@ static inline ulonglong my_timer_cycles(void)
}
#elif defined(__riscv)
#define MY_TIMER_ROUTINE_CYCLES MY_TIMER_ROUTINE_RISCV
- /* Use RDCYCLE (and RDCYCLEH on riscv32) */
+ /* Use RDTIME (and RDTIMEH on riscv32) */
{
# if __riscv_xlen == 32
ulong result_lo, result_hi0, result_hi1;
/* Implemented in assembly because Clang insisted on branching. */
__asm __volatile__(
- "rdcycleh %0\n"
- "rdcycle %1\n"
- "rdcycleh %2\n"
+ "rdtimeh %0\n"
+ "rdtime %1\n"
+ "rdtimeh %2\n"
"sub %0, %0, %2\n"
"seqz %0, %0\n"
"sub %0, zero, %0\n"
@@ -228,7 +228,7 @@ static inline ulonglong my_timer_cycles(void)
return (static_cast<ulonglong>(result_hi1) << 32) | result_lo;
# else
ulonglong result;
- __asm __volatile__("rdcycle %0" : "=r"(result));
+ __asm __volatile__("rdtime %0" : "=r"(result));
return result;
}
# endif
diff --git a/include/my_sys.h b/include/my_sys.h
index 540432ce..e4ab497a 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -154,7 +154,7 @@ char *guess_malloc_library();
void sf_report_leaked_memory(my_thread_id id);
int sf_sanity();
extern my_thread_id (*sf_malloc_dbug_id)(void);
-#define SAFEMALLOC_REPORT_MEMORY(X) sf_report_leaked_memory(X)
+#define SAFEMALLOC_REPORT_MEMORY(X) if (!sf_leaking_memory) sf_report_leaked_memory(X)
#else
#define SAFEMALLOC_REPORT_MEMORY(X) do {} while(0)
#endif
@@ -655,6 +655,7 @@ extern size_t my_fwrite(FILE *stream,const uchar *Buffer,size_t Count,
myf MyFlags);
extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_ftell(FILE *stream,myf MyFlags);
+extern void (*my_sleep_for_space)(unsigned int seconds);
/* implemented in my_memmem.c */
extern void *my_memmem(const void *haystack, size_t haystacklen,
diff --git a/include/mysql/service_print_check_msg.h b/include/mysql/service_print_check_msg.h
new file mode 100644
index 00000000..c2c7cf0a
--- /dev/null
+++ b/include/mysql/service_print_check_msg.h
@@ -0,0 +1,44 @@
+/* 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-1335 USA */
+
+#pragma once
+
+/**
+ @file include/mysql/service_print_check_msg.h
+ This service provides functions to write messages for check or repair
+*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern struct print_check_msg_service_st {
+ void (*print_check_msg)(MYSQL_THD, const char *db_name, const char *table_name,
+ const char *op, const char *msg_type, const char *message,
+ my_bool print_to_log);
+} *print_check_msg_service;
+
+#ifdef MYSQL_DYNAMIC_PLUGIN
+# define print_check_msg_context(_THD) print_check_msg_service->print_check_msg
+#else
+extern void print_check_msg(MYSQL_THD, const char *db_name, const char *table_name,
+ const char *op, const char *msg_type, const char *message,
+ my_bool print_to_log);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 4b07be8f..28627e38 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -478,6 +478,7 @@ typedef struct st_net {
my_bool thread_specific_malloc;
unsigned char compress;
my_bool pkt_nr_can_be_reset;
+ my_bool using_proxy_protocol;
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
diff --git a/include/service_versions.h b/include/service_versions.h
index 9abae740..c8169614 100644
--- a/include/service_versions.h
+++ b/include/service_versions.h
@@ -44,6 +44,7 @@
#define VERSION_wsrep 0x0500
#define VERSION_json 0x0100
#define VERSION_thd_mdl 0x0100
+#define VERSION_print_check_msg 0x0100
#define VERSION_sql_service 0x0101
#define VERSION_provider_bzip2 0x0100
diff --git a/include/source_revision.h b/include/source_revision.h
new file mode 100644
index 00000000..e93bf678
--- /dev/null
+++ b/include/source_revision.h
@@ -0,0 +1 @@
+#define SOURCE_REVISION "3a069644682e336e445039e48baae9693f9a08ee"
diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h
index 63d1a42c..be3fedd9 100644
--- a/include/sslopt-longopts.h
+++ b/include/sslopt-longopts.h
@@ -19,13 +19,12 @@
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
- {"ssl", OPT_SSL_SSL,
+ {"ssl", 0,
"Enable SSL for connection (automatically enabled with other flags).",
&opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
{"ssl-ca", OPT_SSL_CA,
"CA file in PEM format (check OpenSSL docs, implies --ssl).",
- &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG,
- 0, 0, 0, 0, 0, 0},
+ &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ssl-capath", OPT_SSL_CAPATH,
"CA directory (check OpenSSL docs, implies --ssl).",
&opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG,
@@ -46,13 +45,12 @@
"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.",
+ {"tls-version", 0, "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,
+ {"ssl-verify-server-cert", 0,
"Verify server's \"Common Name\" in its cert against hostname used "
"when connecting. This option is disabled by default.",
&opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert,
diff --git a/include/violite.h b/include/violite.h
index b823e62b..f1e5c95a 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -41,6 +41,13 @@ enum enum_vio_type
VIO_TYPE_SSL
/* see also vio_type_names[] */
};
+
+enum enum_vio_state
+{
+ VIO_STATE_NOT_INITIALIZED, VIO_STATE_ACTIVE, VIO_STATE_SHUTDOWN,
+ VIO_STATE_CLOSED
+};
+
#define FIRST_VIO_TYPE VIO_CLOSED
#define LAST_VIO_TYPE VIO_TYPE_SSL
@@ -244,6 +251,7 @@ struct st_vio
struct sockaddr_storage local; /* Local internet address */
struct sockaddr_storage remote; /* Remote internet address */
enum enum_vio_type type; /* Type of connection */
+ enum enum_vio_state state; /* State of the connection */
const char *desc; /* String description */
char *read_buffer; /* buffer for vio_read_buff */
char *read_pos; /* start of unfetched data in the
diff --git a/libmariadb/.gitattributes b/libmariadb/.gitattributes
new file mode 100644
index 00000000..09f80895
--- /dev/null
+++ b/libmariadb/.gitattributes
@@ -0,0 +1,9 @@
+# Normalise line endings:
+* text=auto
+
+# Prevent certain files from being exported:
+.gitattributes export-ignore
+.gitignore export-ignore
+
+# merge
+.travis.yml merge=cc
diff --git a/libmariadb/.gitignore b/libmariadb/.gitignore
new file mode 100644
index 00000000..bc8fa2af
--- /dev/null
+++ b/libmariadb/.gitignore
@@ -0,0 +1,116 @@
+CMakeCache.txt
+CMakeFiles/*
+Makefile
+include/my_config.h
+include/mysql_version.h
+CMakeFiles
+mysql_config/mysql_config.c
+examples/mysql_affected_rows
+examples/mysql_debug
+examples/test_output
+mysql_config/mysql_config
+mariadb_config/libmariadb.pc
+
+# Keep empty directories:
+# Keep empty directories: >> .gitignore/.git*
+
+# Compiled Static libraries
+*.lib
+*.a
+*.la
+*.lai
+*.lo
+
+# Compiled Dynamic libraries
+*.so
+*.so.*
+*.dylib
+*.dll
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+*.dgcov
+.*.swp
+.gdb_history
+CTestTestfile.cmake
+cmake_install.cmake
+bin/
+include/config.h
+include/ma_config.h
+include/mariadb/mariadb/
+include/mariadb/ma_errmsg.h
+include/mariadb/ma_list.h
+include/mariadb/ma_pvio.h
+include/mariadb/ma_tls.h
+include/mariadb/mariadb_com.h
+include/mariadb/mariadb_ctype.h
+include/mariadb/mariadb_dyncol.h
+include/mariadb/mariadb_stmt.h
+include/mariadb/mariadb_version.h
+include/mariadb/mysql.h
+include/mariadb/mysql/
+include/mariadb_version.h
+lib/
+libmariadb/home/
+libmariadb/ma_client_plugin.c
+libmariadb/mariadbclient.def
+mariadb_config/mariadb_config
+mariadb_config/mariadb_config.c
+manpages.list
+unittest/libmariadb/async
+unittest/libmariadb/basic-t
+unittest/libmariadb/bulk1
+unittest/libmariadb/charset
+unittest/libmariadb/connection
+unittest/libmariadb/cursor
+unittest/libmariadb/dyncol
+unittest/libmariadb/errors
+unittest/libmariadb/features-10_2
+unittest/libmariadb/fetch
+unittest/libmariadb/fingerprint.list
+unittest/libmariadb/logs
+unittest/libmariadb/misc
+unittest/libmariadb/performance
+unittest/libmariadb/ps
+unittest/libmariadb/ps_bugs
+unittest/libmariadb/ps_new
+unittest/libmariadb/result
+unittest/libmariadb/rpl_api
+unittest/libmariadb/sp
+unittest/libmariadb/sqlite3
+unittest/libmariadb/ssl
+unittest/libmariadb/t_aurora
+unittest/libmariadb/t_conc173
+unittest/libmariadb/thread
+unittest/libmariadb/view
+unittest/libmariadb/conc336
+
+benchmark/benchmark/
+benchmark/bld/
+benchmark/mariadb.json
+benchmark/mysql.json
+benchmark/main-benchmark
+
+#VS files/directories
+*.vcxproj
+*.filters
+*.user
+ipch
+*.sln
+*.suo
+*.sdf
+Win32
+x64
+*.dir
+Debug
+Release
+RelWithDebInfo
+
+#vim backups
+*.*~
diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
index 4aab676d..b987bc7f 100644
--- a/libmariadb/CMakeLists.txt
+++ b/libmariadb/CMakeLists.txt
@@ -36,7 +36,7 @@ SET(CC_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
SET(CPACK_PACKAGE_VERSION_MAJOR 3)
SET(CPACK_PACKAGE_VERSION_MINOR 3)
-SET(CPACK_PACKAGE_VERSION_PATCH 9)
+SET(CPACK_PACKAGE_VERSION_PATCH 10)
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
MATH(EXPR MARIADB_PACKAGE_VERSION_ID "${CPACK_PACKAGE_VERSION_MAJOR} * 10000 +
${CPACK_PACKAGE_VERSION_MINOR} * 100 +
@@ -395,7 +395,7 @@ ENDIF()
MESSAGE1(SYSTEM_LIBS "SYSTEM_LIBS ${SYSTEM_LIBS}")
MARK_AS_ADVANCED(SYSTEM_LIBS)
-IF(NOT IS_SUBPROJECT)
+IF(NOT IS_SUBPROJECT AND (NOT DEFINED CMAKE_COMPILE_WARNING_AS_ERROR))
IF ((NOT WIN32) AND (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU"))
SET(WARNING_AS_ERROR "-Werror")
ELSEIF(CMAKE_C_COMPILER_ID MATCHES "MSVC")
diff --git a/libmariadb/include/CMakeLists.txt b/libmariadb/include/CMakeLists.txt
index b9eed535..137cbe94 100644
--- a/libmariadb/include/CMakeLists.txt
+++ b/libmariadb/include/CMakeLists.txt
@@ -17,7 +17,6 @@ IF(NOT IS_SUBPROJECT)
ENDIF()
SET(MYSQL_ADDITIONAL_INCLUDES
${CC_SOURCE_DIR}/include/mysql/client_plugin.h
- ${CC_SOURCE_DIR}/include/mysql/plugin_auth_common.h
${CC_SOURCE_DIR}/include/mysql/plugin_auth.h
)
SET(MARIADB_ADDITIONAL_INCLUDES
diff --git a/libmariadb/include/errmsg.h b/libmariadb/include/errmsg.h
index 4afe8e8a..f22db164 100644
--- a/libmariadb/include/errmsg.h
+++ b/libmariadb/include/errmsg.h
@@ -114,10 +114,11 @@ extern const char *mariadb_client_errors[]; /* Error messages */
#define CR_BINLOG_ERROR 5021
#define CR_BINLOG_INVALID_FILE 5022
#define CR_BINLOG_SEMI_SYNC_ERROR 5023
+#define CR_INVALID_CLIENT_FLAG 5024
/* Always last, if you add new error codes please update the
value for CR_MARIADB_LAST_ERROR */
-#define CR_MARIADB_LAST_ERROR CR_BINLOG_INVALID_FILE
+#define CR_MARIADB_LAST_ERROR CR_INVALID_CLIENT_FLAG
#endif
diff --git a/libmariadb/include/ma_hash.h b/libmariadb/include/ma_hash.h
new file mode 100644
index 00000000..1a40d48a
--- /dev/null
+++ b/libmariadb/include/ma_hash.h
@@ -0,0 +1,22 @@
+#ifndef _ma_hash_h_
+#define _ma_hash_h_
+
+/*! Hash algorithms */
+#define MA_HASH_MD5 1
+#define MA_HASH_SHA1 2
+#define MA_HASH_SHA224 3
+#define MA_HASH_SHA256 4
+#define MA_HASH_SHA384 5
+#define MA_HASH_SHA512 6
+
+/*! Hash digest sizes */
+#define MA_MD5_HASH_SIZE 16
+#define MA_SHA1_HASH_SIZE 20
+#define MA_SHA224_HASH_SIZE 28
+#define MA_SHA256_HASH_SIZE 32
+#define MA_SHA384_HASH_SIZE 48
+#define MA_SHA512_HASH_SIZE 64
+
+#define MA_MAX_HASH_SIZE 64
+
+#endif
diff --git a/libmariadb/include/mariadb_com.h b/libmariadb/include/mariadb_com.h
index 67461b4f..01a13dab 100644
--- a/libmariadb/include/mariadb_com.h
+++ b/libmariadb/include/mariadb_com.h
@@ -205,11 +205,17 @@ enum enum_server_command
CLIENT_MULTI_STATEMENTS |\
CLIENT_MULTI_RESULTS |\
CLIENT_PROGRESS |\
- CLIENT_SSL_VERIFY_SERVER_CERT |\
+ CLIENT_SSL_VERIFY_SERVER_CERT |\
CLIENT_REMEMBER_OPTIONS |\
CLIENT_PLUGIN_AUTH |\
CLIENT_SESSION_TRACKING |\
CLIENT_CONNECT_ATTRS)
+#define CLIENT_ALLOWED_FLAGS (CLIENT_SUPPORTED_FLAGS |\
+ CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA |\
+ CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS |\
+ CLIENT_ZSTD_COMPRESSION |\
+ CLIENT_PS_MULTI_RESULTS |\
+ CLIENT_REMEMBER_OPTIONS)
#define CLIENT_CAPABILITIES (CLIENT_MYSQL | \
CLIENT_LONG_FLAG |\
CLIENT_TRANSACTIONS |\
diff --git a/libmariadb/include/mysql/client_plugin.h b/libmariadb/include/mysql/client_plugin.h
index 262fd4a0..667074ce 100644
--- a/libmariadb/include/mysql/client_plugin.h
+++ b/libmariadb/include/mysql/client_plugin.h
@@ -122,7 +122,7 @@ typedef struct st_mariadb_client_plugin_PVIO
} MARIADB_PVIO_PLUGIN;
/******** authentication plugin specific declarations *********/
-#include <mysql/plugin_auth_common.h>
+#include <mysql/plugin_auth.h>
struct st_mysql_client_plugin_AUTHENTICATION
{
diff --git a/libmariadb/include/mysql/plugin_auth_common.h b/libmariadb/include/mysql/plugin_auth_common.h
deleted file mode 100644
index ee4b8b9c..00000000
--- a/libmariadb/include/mysql/plugin_auth_common.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Copyright (C) 2010 Sergei Golubchik and Monty Program Ab
-
- 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; either
- version 2 of the License, or (at your option) any later version.
-
- 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 Street, Fifth Floor, Boston,
- MA 02111-1301, USA */
-
-
-#ifndef MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
-/**
- @file
-
- This file defines constants and data structures that are the same for
- both client- and server-side authentication plugins.
-*/
-#define MYSQL_PLUGIN_AUTH_COMMON_INCLUDED
-
-/** the max allowed length for a user name */
-#define MYSQL_USERNAME_LENGTH 512
-
-/**
- return values of the plugin authenticate_user() method.
-*/
-
-/**
- Authentication failed. Additionally, all other CR_xxx values
- (libmariadb error code) can be used too.
-
- The client plugin may set the error code and the error message directly
- in the MYSQL structure and return CR_ERROR. If a CR_xxx specific error
- code was returned, an error message in the MYSQL structure will be
- overwritten. If CR_ERROR is returned without setting the error in MYSQL,
- CR_UNKNOWN_ERROR will be user.
-*/
-#define CR_ERROR 0
-/**
- Authentication (client part) was successful. It does not mean that the
- authentication as a whole was successful, usually it only means
- that the client was able to send the user name and the password to the
- server. If CR_OK is returned, the libmariadb reads the next packet expecting
- it to be one of OK, ERROR, or CHANGE_PLUGIN packets.
-*/
-#define CR_OK -1
-/**
- Authentication was successful.
- It means that the client has done its part successfully and also that
- a plugin has read the last packet (one of OK, ERROR, CHANGE_PLUGIN).
- In this case, libmariadb will not read a packet from the server,
- but it will use the data at mysql->net.read_pos.
-
- A plugin may return this value if the number of roundtrips in the
- authentication protocol is not known in advance, and the client plugin
- needs to read one packet more to determine if the authentication is finished
- or not.
-*/
-#define CR_OK_HANDSHAKE_COMPLETE -2
-
-typedef struct st_plugin_vio_info
-{
- enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
- MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
-#ifndef _WIN32
- int socket; /**< it's set, if the protocol is SOCKET or TCP */
-#else
- SOCKET socket; /**< it's set, if the protocol is SOCKET or TCP */
- HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
-#endif
-} MYSQL_PLUGIN_VIO_INFO;
-
-/**
- Provides plugin access to communication channel
-*/
-typedef struct st_plugin_vio
-{
- /**
- Plugin provides a pointer reference and this function sets it to the
- contents of any incoming packet. Returns the packet length, or -1 if
- the plugin should terminate.
- */
- int (*read_packet)(struct st_plugin_vio *vio,
- unsigned char **buf);
-
- /**
- Plugin provides a buffer with data and the length and this
- function sends it as a packet. Returns 0 on success, 1 on failure.
- */
- int (*write_packet)(struct st_plugin_vio *vio,
- const unsigned char *packet,
- int packet_len);
-
- /**
- Fills in a st_plugin_vio_info structure, providing the information
- about the connection.
- */
- void (*info)(struct st_plugin_vio *vio, struct st_plugin_vio_info *info);
-
-} MYSQL_PLUGIN_VIO;
-
-#endif
-
diff --git a/libmariadb/libmariadb/ma_default.c b/libmariadb/libmariadb/ma_default.c
index 0f6921c1..80efe1c9 100644
--- a/libmariadb/libmariadb/ma_default.c
+++ b/libmariadb/libmariadb/ma_default.c
@@ -135,6 +135,7 @@ char **get_default_configuration_dirs()
end:
return configuration_dirs;
error:
+ release_configuration_dirs();
return NULL;
}
diff --git a/libmariadb/libmariadb/ma_errmsg.c b/libmariadb/libmariadb/ma_errmsg.c
index 888a41e3..90218573 100644
--- a/libmariadb/libmariadb/ma_errmsg.c
+++ b/libmariadb/libmariadb/ma_errmsg.c
@@ -53,7 +53,7 @@ const char *client_errors[]=
/* 2023 */ "",
/* 2024 */ "",
/* 2025 */ "",
-/* 2026 */ "TLS/SSL error: %-.100s",
+/* 2026 */ "TLS/SSL error: %s",
/* 2027 */ "Received malformed packet",
/* 2028 */ "",
/* 2029 */ "",
@@ -118,6 +118,7 @@ const char *mariadb_client_errors[] =
/* 5021 */ "Binary log error (File: %.*s start_pos=%ld): %s.",
/* 5022 */ "File '%s' is not a binary log file",
/* 5023 */ "Semi sync request error: %s",
+ /* 5024 */ "Invalid client flags (%lu) specified. Supported flags: %lu",
""
};
diff --git a/libmariadb/libmariadb/mariadb_async.c b/libmariadb/libmariadb/mariadb_async.c
index feb73329..5068f5c0 100644
--- a/libmariadb/libmariadb/mariadb_async.c
+++ b/libmariadb/libmariadb/mariadb_async.c
@@ -140,7 +140,7 @@ my_ssl_async_check_result(int res, struct mysql_async_context *b, MARIADB_SSL *c
{
int ssl_err;
b->events_to_wait_for= 0;
- if (res >= 0)
+ if (res > 0)
return 1;
ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ)
diff --git a/libmariadb/libmariadb/mariadb_lib.c b/libmariadb/libmariadb/mariadb_lib.c
index 36219385..c48ccdad 100644
--- a/libmariadb/libmariadb/mariadb_lib.c
+++ b/libmariadb/libmariadb/mariadb_lib.c
@@ -710,6 +710,7 @@ struct st_default_options mariadb_defaults[] =
{{MARIADB_OPT_TLS_PASSPHRASE}, MARIADB_OPTION_STR, "tls-passphrase"},
{{MYSQL_OPT_SSL_ENFORCE}, MARIADB_OPTION_BOOL, "tls-enforce"},
{{MYSQL_OPT_SSL_VERIFY_SERVER_CERT}, MARIADB_OPTION_BOOL,"tls-verify-peer"},
+ {{MARIADB_OPT_RESTRICTED_AUTH}, MARIADB_OPTION_STR, "restricted-auth"},
{{0}, 0, NULL}
};
@@ -1433,6 +1434,14 @@ mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
char *connection_handler= (mysql->options.extension) ?
mysql->options.extension->connection_handler : 0;
+ if ((client_flag & CLIENT_ALLOWED_FLAGS) != client_flag)
+ {
+ my_set_error(mysql, CR_INVALID_CLIENT_FLAG, SQLSTATE_UNKNOWN,
+ ER(CR_INVALID_CLIENT_FLAG),
+ client_flag, CLIENT_ALLOWED_FLAGS);
+ return NULL;
+ }
+
if (!mysql->methods)
mysql->methods= &MARIADB_DEFAULT_METHODS;
@@ -1808,10 +1817,14 @@ restart:
else if (IS_MYSQL_ERROR(code) || IS_MARIADB_ERROR(code))
; /* not forged - generated on the client side */
else if (mysql->options.use_ssl)
+ {
+ char last_error[sizeof(mysql->net.last_error)];
+ strcpy(last_error, mysql->net.last_error);
my_set_error(mysql, CR_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
"Received error packet before completion of TLS handshake. "
- "The authenticity of the following error cannot be verified:\n%d - %s",
- code, mysql->net.last_error);
+ "The authenticity of the following error cannot be verified: %d - %s",
+ code, last_error);
+ }
goto error;
}
diff --git a/libmariadb/libmariadb/secure/openssl.c b/libmariadb/libmariadb/secure/openssl.c
index 2a272504..edc90a3b 100644
--- a/libmariadb/libmariadb/secure/openssl.c
+++ b/libmariadb/libmariadb/secure/openssl.c
@@ -533,7 +533,7 @@ ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl)
{
int ssl_err;
b->events_to_wait_for= 0;
- if (res >= 0)
+ if (res > 0)
return 1;
ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ)
diff --git a/libmariadb/plugins/io/remote_io.c b/libmariadb/plugins/io/remote_io.c
index c06ecacd..eb5b5f37 100644
--- a/libmariadb/plugins/io/remote_io.c
+++ b/libmariadb/plugins/io/remote_io.c
@@ -279,11 +279,11 @@ MA_FILE *ma_rio_open(const char *url,const char *operation)
MA_REMOTE_FILE *rf;
(void)operation;
- if (!(file = (MA_FILE *)calloc(sizeof(MA_FILE), 1)))
+ if (!(file = (MA_FILE *)calloc(1, sizeof(MA_FILE))))
return NULL;
file->type= MA_FILE_REMOTE;
- if (!(file->ptr= rf= (MA_REMOTE_FILE *)calloc(sizeof(MA_REMOTE_FILE), 1)))
+ if (!(file->ptr= rf= (MA_REMOTE_FILE *)calloc(1, sizeof(MA_REMOTE_FILE))))
{
free(file);
return NULL;
diff --git a/libmariadb/plugins/pvio/pvio_socket.c b/libmariadb/plugins/pvio/pvio_socket.c
index 550fb831..b9c70940 100644
--- a/libmariadb/plugins/pvio/pvio_socket.c
+++ b/libmariadb/plugins/pvio/pvio_socket.c
@@ -39,7 +39,7 @@
#include <sys/un.h>
#endif
#ifdef HAVE_POLL
-#include <sys/poll.h>
+#include <poll.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
diff --git a/libmariadb/plugins/trace/trace_example.c b/libmariadb/plugins/trace/trace_example.c
index 1060542c..e177c206 100644
--- a/libmariadb/plugins/trace/trace_example.c
+++ b/libmariadb/plugins/trace/trace_example.c
@@ -132,7 +132,7 @@ static TRACE_INFO *get_trace_info(unsigned long thread_id)
info= (TRACE_INFO *)info->next;
}
- if (!(info= (TRACE_INFO *)calloc(sizeof(TRACE_INFO), 1)))
+ if (!(info= (TRACE_INFO *)calloc(1, sizeof(TRACE_INFO))))
return NULL;
info->thread_id= thread_id;
info->next= trace_info;
diff --git a/libmariadb/unittest/libmariadb/bulk1.c b/libmariadb/unittest/libmariadb/bulk1.c
index e1c31eaa..62267cd7 100644
--- a/libmariadb/unittest/libmariadb/bulk1.c
+++ b/libmariadb/unittest/libmariadb/bulk1.c
@@ -74,8 +74,8 @@ static int bulk1(MYSQL *mysql)
/* allocate memory */
buffer= calloc(TEST_ARRAY_SIZE, sizeof(char *));
- lengths= (unsigned long *)calloc(sizeof(long), TEST_ARRAY_SIZE);
- vals= (unsigned int *)calloc(sizeof(int), TEST_ARRAY_SIZE);
+ lengths= calloc(TEST_ARRAY_SIZE, sizeof *lengths);
+ vals= calloc(TEST_ARRAY_SIZE, sizeof *vals);
for (i=0; i < TEST_ARRAY_SIZE; i++)
{
diff --git a/libmariadb/unittest/libmariadb/connection.c b/libmariadb/unittest/libmariadb/connection.c
index fa232cad..a10e01bd 100644
--- a/libmariadb/unittest/libmariadb/connection.c
+++ b/libmariadb/unittest/libmariadb/connection.c
@@ -2307,7 +2307,33 @@ static int test_conc632(MYSQL *my __attribute__((unused)))
return OK;
}
+static int test_conc505(MYSQL *my __attribute__((unused)))
+{
+ MYSQL *mysql= mysql_init(NULL);
+
+#define CLIENT_DEPRECATE_EOF (1ULL << 24)
+
+ if (my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_DEPRECATE_EOF))
+ {
+ diag("Error expected: Invalid client flag");
+ mysql_close(mysql);
+ return FAIL;
+ }
+ diag("Error (expected): %s", mysql_error(mysql));
+ FAIL_IF(mysql_errno(mysql) != CR_INVALID_CLIENT_FLAG, "Wrong error number");
+ if (!my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS))
+ {
+ diag("Error: %s", mysql_error(mysql));
+ mysql_close(mysql);
+ return FAIL;
+ }
+
+ mysql_close(mysql);
+ return OK;
+}
+
struct my_tests_st my_tests[] = {
+ {"test_conc505", test_conc505, TEST_CONNECTION_NONE, 0, NULL, NULL},
{"test_conc632", test_conc632, TEST_CONNECTION_NONE, 0, NULL, NULL},
{"test_status_callback", test_status_callback, TEST_CONNECTION_NONE, 0, NULL, NULL},
{"test_conc365", test_conc365, TEST_CONNECTION_NONE, 0, NULL, NULL},
diff --git a/libmariadb/unittest/libmariadb/ps_bugs.c b/libmariadb/unittest/libmariadb/ps_bugs.c
index efe3d447..72af30b4 100644
--- a/libmariadb/unittest/libmariadb/ps_bugs.c
+++ b/libmariadb/unittest/libmariadb/ps_bugs.c
@@ -3257,7 +3257,7 @@ error:
static int test_mem_overun(MYSQL *mysql)
{
- char buffer[10000], field[12];
+ char buffer[10000], field[20];
MYSQL_STMT *stmt;
MYSQL_RES *field_res, *res;
int rc, i, length;
@@ -5159,7 +5159,7 @@ static int test_maxparam(MYSQL *mysql)
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
MYSQL_BIND* bind;
- bind = calloc(sizeof(MYSQL_BIND), 65535);
+ bind = calloc(65535, sizeof *bind);
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
check_mysql_rc(rc, mysql);
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 63cdd03e..345c212d 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -25,7 +25,7 @@ ${CMAKE_SOURCE_DIR}/tpool
${CMAKE_BINARY_DIR}/sql
${PCRE_INCLUDE_DIRS}
${LIBFMT_INCLUDE_DIR}
-${ZLIB_INCLUDE_DIR}
+${ZLIB_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
${SSL_INTERNAL_INCLUDE_DIRS}
)
@@ -180,7 +180,7 @@ ENDIF()
SET(LIBS
dbug strings mysys mysys_ssl pcre2-8 vio
- ${ZLIB_LIBRARY} ${SSL_LIBRARIES}
+ ${ZLIB_LIBRARIES} ${SSL_LIBRARIES}
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS}
${EMBEDDED_PLUGIN_LIBS}
sql_embedded
diff --git a/libmysqld/embedded_priv.h b/libmysqld/embedded_priv.h
index 22627062..345c3ebd 100644
--- a/libmysqld/embedded_priv.h
+++ b/libmysqld/embedded_priv.h
@@ -23,6 +23,8 @@ void init_embedded_mysql(MYSQL *mysql, ulong client_flag);
void *create_embedded_thd(ulong client_flag);
int check_embedded_connection(MYSQL *mysql, const char *db);
void free_old_query(MYSQL *mysql);
+THD *embedded_get_current_thd();
+void embedded_set_current_thd(THD *thd);
extern MYSQL_METHODS embedded_methods;
/* This one is used by embedded library to gather returning data */
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 0be844fb..cf958c4e 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -111,7 +111,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
MYSQL_STMT *stmt)
{
my_bool result= 1;
- THD *thd=(THD *) mysql->thd;
+ THD *thd=(THD *) mysql->thd, *old_current_thd= current_thd;
NET *net= &mysql->net;
my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE;
@@ -122,6 +122,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
else
{
free_embedded_thd(mysql);
+ if (old_current_thd == thd)
+ old_current_thd= 0;
thd= 0;
}
}
@@ -179,6 +181,8 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
end:
thd->reset_globals();
+ if (old_current_thd)
+ old_current_thd->store_globals();
return result;
}
@@ -265,6 +269,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
mysql->server_status|= SERVER_STATUS_IN_TRANS;
stmt->fields= mysql->fields;
+ free_root(&stmt->mem_root, MYF(0));
stmt->mem_root= res->alloc;
mysql->fields= NULL;
my_free(res);
@@ -374,6 +379,7 @@ int emb_read_binary_rows(MYSQL_STMT *stmt)
set_stmt_errmsg(stmt, &stmt->mysql->net);
return 1;
}
+ free_root(&stmt->result.alloc, MYF(0));
stmt->result= *data;
my_free(data);
set_stmt_errmsg(stmt, &stmt->mysql->net);
@@ -432,12 +438,15 @@ int emb_unbuffered_fetch(MYSQL *mysql, char **row)
static void free_embedded_thd(MYSQL *mysql)
{
- THD *thd= (THD*)mysql->thd;
+ THD *thd= (THD*)mysql->thd, *org_current_thd= current_thd;
server_threads.erase(thd);
thd->clear_data_list();
thd->store_globals();
delete thd;
- set_current_thd(nullptr);
+ if (thd == org_current_thd)
+ set_current_thd(nullptr);
+ else
+ set_current_thd(org_current_thd);
mysql->thd=0;
}
@@ -727,6 +736,17 @@ void *create_embedded_thd(ulong client_flag)
}
+THD *embedded_get_current_thd()
+{
+ return current_thd;
+}
+
+void embedded_set_current_thd(THD *thd)
+{
+ set_current_thd(thd);
+}
+
+
#ifdef NO_EMBEDDED_ACCESS_CHECKS
static void
emb_transfer_connect_attrs(MYSQL *mysql)
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 14cca6e0..444c1cfb 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -78,7 +78,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
uint port, const char *unix_socket,ulong client_flag)
{
char name_buff[USERNAME_LENGTH];
-
+ THD *org_current_thd= embedded_get_current_thd();
DBUG_ENTER("mysql_real_connect");
DBUG_PRINT("enter",("host: %s db: %s user: %s (libmysqld)",
host ? host : "(Null)",
@@ -200,6 +200,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
}
}
}
+ embedded_set_current_thd(org_current_thd);
DBUG_PRINT("exit",("Mysql handler: %p", mysql));
DBUG_RETURN(mysql);
@@ -216,6 +217,7 @@ error:
mysql_close(mysql);
mysql->free_me=free_me;
}
+ embedded_set_current_thd(org_current_thd);
DBUG_RETURN(0);
}
diff --git a/libservices/CMakeLists.txt b/libservices/CMakeLists.txt
index 8c559cb0..37c24646 100644
--- a/libservices/CMakeLists.txt
+++ b/libservices/CMakeLists.txt
@@ -25,6 +25,7 @@ SET(MYSQLSERVICES_SOURCES
my_crypt_service.c
my_md5_service.c
my_print_error_service.c
+ print_check_msg_service.c
my_sha1_service.c
my_sha2_service.c
my_snprintf_service.c
diff --git a/libservices/print_check_msg_service.c b/libservices/print_check_msg_service.c
new file mode 100644
index 00000000..12f7bc51
--- /dev/null
+++ b/libservices/print_check_msg_service.c
@@ -0,0 +1,18 @@
+/* Copyright (c) 2024, MariaDB Plc
+
+ This program is free 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 print_check_msg_context= (void*) VERSION_print_check_msg;
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index e6d7ab32..345cb439 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -14,7 +14,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
SET(MAN1_WSREP wsrep_sst_rsync.1 wsrep_sst_common.1 wsrep_sst_mariabackup.1
- wsrep_sst_mysqldump.1 wsrep_sst_rsync_wan.1 galera_recovery.1 galera_new_cluster.1)
+ wsrep_sst_mysqldump.1 wsrep_sst_rsync_wan.1 galera_recovery.1 galera_new_cluster.1
+ wsrep_sst_backup.1)
SET(MAN1_SERVER innochecksum.1 myisam_ftdump.1 myisamchk.1
aria_chk.1 aria_dump_log.1 aria_ftdump.1 aria_pack.1 aria_read_log.1
aria_s3_copy.1
diff --git a/man/my_print_defaults.1 b/man/my_print_defaults.1
index d519d89e..38f2c0a8 100644
--- a/man/my_print_defaults.1
+++ b/man/my_print_defaults.1
@@ -1,6 +1,6 @@
'\" t
.\"
-.TH "\fBMY_PRINT_DEFAULTS\fR" "1" "15 May 2020" "MariaDB 10.11" "MariaDB Database System"
+.TH "\fBMY_PRINT_DEFAULTS\fR" "1" "18 December 2023" "MariaDB 10.11" "MariaDB Database System"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -146,6 +146,22 @@ In addition to the groups named on the command line, read groups that have the g
.sp -1
.IP \(bu 2.3
.\}
+.\" my_print_defaults: --mariadbd option
+.\" mariadbd option: my_print_defaults
+\fB\-\-mariadbd\fR
+.sp
+Read the same set of groups that the mariadbd binary does.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+
.\" my_print_defaults: --mysqld option
.\" mysqld option: my_print_defaults
\fB\-\-mysqld\fR
diff --git a/man/wsrep_sst_backup.1 b/man/wsrep_sst_backup.1
new file mode 100644
index 00000000..d7b14557
--- /dev/null
+++ b/man/wsrep_sst_backup.1
@@ -0,0 +1,16 @@
+'\" t
+.\"
+.TH "\FBWSREP_SST_BACKUP\FR" "1" "22 May 2022" "MariaDB 10\&.3" "MariaDB Database System"
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.SH NAME
+wsrep_sst_backup \- backup helper script for the MariaDB Galera Cluster
+.SH DESCRIPTION
+Use: See source code of script\.
+.PP
+For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
diff --git a/mysql-test/collections/buildbot_suites.bat b/mysql-test/collections/buildbot_suites.bat
index d4a6e665..13ea5ddb 100644
--- a/mysql-test/collections/buildbot_suites.bat
+++ b/mysql-test/collections/buildbot_suites.bat
@@ -1,5 +1,5 @@
if "%MTR_PARALLEL%"=="" set MTR_PARALLEL=%NUMBER_OF_PROCESSORS%
-perl mysql-test-run.pl --verbose-restart --force --suite-timeout=120 --max-test-fail=10 --retry=3 --suite=^
+perl mysql-test-run.pl --force --suite-timeout=120 --max-test-fail=10 --retry=3 --suite=^
vcol,gcol,perfschema,^
main,^
innodb,^
diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl
index db3ce429..152b2f32 100755
--- a/mysql-test/dgcov.pl
+++ b/mysql-test/dgcov.pl
@@ -112,8 +112,7 @@ sub print_gcov_for_diff {
$acc.=sprintf '%9s:%5s:%s', '', $lnum, $' if /^ /;
++$printme, $acc.=sprintf '%9s:%5s:%s', gcov_prefix($fcov->{$lnum}), $lnum, $' if /^\+/;
die "$_^^^ dying", unless /^[- +]/;
- ++$lnum;
- --$cnt;
+ ++$lnum, --$cnt unless /^-/;
}
print $acc if $printme;
close PIPE or die "command '$cmd' failed: $!: $?";
diff --git a/mysql-test/include/aria_log_control_load.inc b/mysql-test/include/aria_log_control_load.inc
new file mode 100644
index 00000000..34db3aeb
--- /dev/null
+++ b/mysql-test/include/aria_log_control_load.inc
@@ -0,0 +1,11 @@
+#
+# This file loads aria_log_control file into a user variable @aria_log_control.
+# Set $ARIA_DATADIR before including this file
+#
+
+--disable_query_log
+--copy_file $ARIA_DATADIR/aria_log_control $MYSQLTEST_VARDIR/aria_log_control_tmp
+--chmod 0777 $MYSQLTEST_VARDIR/aria_log_control_tmp
+--eval SET @aria_log_control=(SELECT LOAD_FILE('$MYSQLTEST_VARDIR/aria_log_control_tmp'))
+--remove_file $MYSQLTEST_VARDIR/aria_log_control_tmp
+--enable_query_log
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test
index 078f6572..b43dffbf 100644
--- a/mysql-test/include/check-testcase.test
+++ b/mysql-test/include/check-testcase.test
@@ -32,7 +32,6 @@ if ($tmp)
--echo Relay_Master_Log_File #
--echo Slave_IO_Running No
--echo Slave_SQL_Running No
- --echo Replicate_Rewrite_DB #
--echo Replicate_Do_DB #
--echo Replicate_Ignore_DB #
--echo Replicate_Do_Table #
@@ -74,13 +73,22 @@ if ($tmp)
--echo Slave_DDL_Groups #
--echo Slave_Non_Transactional_Groups #
--echo Slave_Transactional_Groups #
+ --echo Replicate_Rewrite_DB #
}
if (!$tmp) {
# Note: after WL#5177, fields 13-18 shall not be filtered-out.
- --replace_column 4 # 5 # 6 # 7 # 8 # 9 # 10 # 13 # 14 # 15 # 16 # 17 # 18 # 19 # 23 # 24 # 25 # 26 # 27 # 41 # 42 # 43 # 45 # 52 # 53 # 54 #
+ --replace_column 4 # 5 # 6 # 7 # 8 # 9 # 10 # 13 # 14 # 15 # 16 # 17 # 18 # 22 # 23 # 24 # 25 # 26 # 40 # 41 # 42 # 44 # 51 # 52 # 53 # 54 #
query_vertical
SHOW SLAVE STATUS;
}
+#
+# Note, we must never, _ever_, add extra rows to this output of SHOW SLAVE
+# STATUS, except at the very end, as this breaks backwards compatibility
+# with applications or scripts that parse the output. This also means that
+# we cannot add _any_ new rows in a GA version if a different row was
+# already added in a later MariaDB version, as this would make it impossible
+# to merge the change up while preserving the order of rows.
+#
#
# Ensure that we don't get warnings from mysql.proc (used by check_mysqld)
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index c696613d..132fdcff 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -613,13 +613,17 @@ call p_verify_status_increment(2, 0, 2, 0);
drop table t2;
set sql_mode=no_engine_substitution;
create temporary table t2 (a int);
-call p_verify_status_increment(1, 0, 0, 0);
+# One commit for the create temporary table, and two for committing the
+# read of the stored procedure from Aria table (creating temporary table
+# clears the sp cache).
+call p_verify_status_increment(3, 0, 2, 0);
set sql_mode=default;
--echo # 19. A function changes temp-trans-table.
--echo #
select f1();
---echo # Two commits because a binary log record is written
-call p_verify_status_increment(2, 0, 1, 0);
+--echo # Two commits because a binary log record is written, and another two
+--echo # as the function f1() is reloaded after creating temporary table.
+call p_verify_status_increment(4, 0, 3, 0);
commit;
call p_verify_status_increment(2, 0, 1, 0);
@@ -672,9 +676,11 @@ call p_verify_status_increment(2, 0, 1, 0);
--echo # 25. DDL: DROP TEMPORARY TABLE, does not start a transaction
--echo #
drop temporary table t2;
-call p_verify_status_increment(1, 0, 1, 0);
+# Dropping temporary table clears SP caches, so get another two commit
+# increments from loading the p_verify_status_increment procedure.
+call p_verify_status_increment(3, 0, 2, 0);
commit;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(1, 0, 0, 0);
--echo # 26. Verify that SET AUTOCOMMIT issues an implicit commit
--echo #
@@ -721,7 +727,9 @@ call p_verify_status_increment(1, 0, 1, 0);
create table t2 (a int);
call p_verify_status_increment(0, 0, 0, 0);
do (select f1() from t1 where a=2);
-call p_verify_status_increment(2, 2, 2, 2);
+# Again extra 2 commit increments from re-loading function f1 after
+# dropping temporary table.
+call p_verify_status_increment(4, 2, 4, 2);
commit;
call p_verify_status_increment(2, 2, 2, 2);
diff --git a/mysql-test/include/crash_mysqld.inc b/mysql-test/include/crash_mysqld.inc
index 4190d24d..89bc8ced 100644
--- a/mysql-test/include/crash_mysqld.inc
+++ b/mysql-test/include/crash_mysqld.inc
@@ -4,7 +4,7 @@
--source include/not_embedded.inc
# Write file to make mysql-test-run.pl expect crash and restart
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Setup the mysqld to crash at shutdown
SET debug_dbug="d,crash_shutdown";
diff --git a/mysql-test/include/deadlock.inc b/mysql-test/include/deadlock.inc
index abf217ae..362d456e 100644
--- a/mysql-test/include/deadlock.inc
+++ b/mysql-test/include/deadlock.inc
@@ -103,7 +103,6 @@ connection con2;
# The following query should hang because con1 is locking the record
update t2 set a=2 where b = 0;
-select * from t2;
--send
update t1 set x=2 where id = 0;
--sleep 2
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 89d0d779..06a4ff15 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -71,7 +71,7 @@ loose-performance-schema-hosts-size=100
loose-performance-schema-users-size=100
loose-performance-schema-max-mutex-instances=5000
loose-performance-schema-max-rwlock-instances=5000
-loose-performance-schema-max-cond-instances=1000
+loose-performance-schema-max-cond-instances=1500
loose-performance-schema-max-file-instances=10000
loose-performance-schema-max-socket-instances=1000
loose-performance-schema-max-table-instances=500
@@ -91,7 +91,7 @@ loose-performance-schema-events-statements-history-size=10
loose-performance-schema-events-statements-history-long-size=1000
loose-performance-schema-events-transactions-history-size=10
loose-performance-schema-events-transactions-history-long-size=1000
-loose-performance-schema-max-thread-instances=200
+loose-performance-schema-max-thread-instances=400
loose-performance-schema-session-connect-attrs-size=2048
loose-performance-schema-max-metadata-locks=10000
diff --git a/mysql-test/include/expect_crash.inc b/mysql-test/include/expect_crash.inc
index b4bd9828..56abc88a 100644
--- a/mysql-test/include/expect_crash.inc
+++ b/mysql-test/include/expect_crash.inc
@@ -2,4 +2,4 @@
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
# There should be a debug crash after using this .inc file
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
diff --git a/mysql-test/include/have_innodb.combinations b/mysql-test/include/have_innodb.combinations
deleted file mode 100644
index f1131c44..00000000
--- a/mysql-test/include/have_innodb.combinations
+++ /dev/null
@@ -1,39 +0,0 @@
-[innodb_plugin]
-ignore-builtin-innodb
-plugin-load-add=$HA_INNODB_SO
-innodb
-innodb-cmpmem
-innodb-cmp-per-index
-innodb-trx
-innodb-locks
-innodb-lock-waits
-innodb-buffer-pool-stats
-innodb-buffer-page
-innodb-buffer-page-lru
-innodb-sys-columns
-innodb-sys-fields
-innodb-sys-foreign
-innodb-sys-foreign-cols
-innodb-sys-indexes
-innodb-sys-tables
-innodb-sys-virtual
-innodb-metrics
-
-[innodb]
-innodb
-innodb-cmpmem
-innodb-cmp-per-index
-innodb-trx
-innodb-locks
-innodb-lock-waits
-innodb-metrics
-innodb-buffer-pool-stats
-innodb-buffer-page
-innodb-buffer-page-lru
-innodb-sys-columns
-innodb-sys-fields
-innodb-sys-foreign
-innodb-sys-foreign-cols
-innodb-sys-indexes
-innodb-sys-tables
-innodb-sys-virtual
diff --git a/mysql-test/include/have_innodb.inc b/mysql-test/include/have_innodb.inc
index 8c9cdb54..1e853d18 100644
--- a/mysql-test/include/have_innodb.inc
+++ b/mysql-test/include/have_innodb.inc
@@ -3,6 +3,11 @@
# will be skipped unless innodb is enabled
#
--disable_query_log
+if (`select version() like '%debug%'`)
+{
+SET STATEMENT sql_log_bin=0 FOR
+call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations");
+}
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like 'MSAN%'`)
{
SET STATEMENT sql_log_bin=0 FOR
diff --git a/mysql-test/include/have_innodb.opt b/mysql-test/include/have_innodb.opt
new file mode 100644
index 00000000..0a6d4d9c
--- /dev/null
+++ b/mysql-test/include/have_innodb.opt
@@ -0,0 +1,17 @@
+--innodb
+--innodb-cmpmem
+--innodb-cmp-per-index
+--innodb-trx
+--innodb-locks
+--innodb-lock-waits
+--innodb-metrics
+--innodb-buffer-pool-stats
+--innodb-buffer-page
+--innodb-buffer-page-lru
+--innodb-sys-columns
+--innodb-sys-fields
+--innodb-sys-foreign
+--innodb-sys-foreign-cols
+--innodb-sys-indexes
+--innodb-sys-tables
+--innodb-sys-virtual
diff --git a/mysql-test/include/innodb_rollback_on_timeout.inc b/mysql-test/include/innodb_rollback_on_timeout.inc
index 274bbe12..d41e1f1e 100644
--- a/mysql-test/include/innodb_rollback_on_timeout.inc
+++ b/mysql-test/include/innodb_rollback_on_timeout.inc
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
#
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
# transaction timeout"
@@ -22,7 +21,6 @@ select * from t1;
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
# Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
# statement will time out; in 5.0.13+, it will not roll back transaction.
--error ER_LOCK_WAIT_TIMEOUT
diff --git a/mysql-test/include/kill_and_restart_mysqld.inc b/mysql-test/include/kill_and_restart_mysqld.inc
index b67fb735..50b28bcd 100644
--- a/mysql-test/include/kill_and_restart_mysqld.inc
+++ b/mysql-test/include/kill_and_restart_mysqld.inc
@@ -7,7 +7,7 @@ if (!$restart_parameters)
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--echo # Kill and $restart_parameters
---exec echo "$restart_parameters" > $_expect_file_name
+--write_line "$restart_parameters" $_expect_file_name
--shutdown_server 0
--source include/wait_until_disconnected.inc
--enable_reconnect
diff --git a/mysql-test/include/kill_galera.inc b/mysql-test/include/kill_galera.inc
index aba672d8..887e21f5 100644
--- a/mysql-test/include/kill_galera.inc
+++ b/mysql-test/include/kill_galera.inc
@@ -3,7 +3,7 @@
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
# Kill the connected server
--disable_reconnect
diff --git a/mysql-test/include/kill_mysqld.inc b/mysql-test/include/kill_mysqld.inc
index 01ee7f82..a41af2d7 100644
--- a/mysql-test/include/kill_mysqld.inc
+++ b/mysql-test/include/kill_mysqld.inc
@@ -2,6 +2,6 @@
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
--echo # Kill the server
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
--shutdown_server 0
--source include/wait_until_disconnected.inc
diff --git a/mysql-test/include/rpl_change_topology.inc b/mysql-test/include/rpl_change_topology.inc
index b63700b0..ddaf90a9 100644
--- a/mysql-test/include/rpl_change_topology.inc
+++ b/mysql-test/include/rpl_change_topology.inc
@@ -96,10 +96,11 @@
# Remove whitespace from $rpl_topology
--let $rpl_topology= `SELECT REPLACE('$rpl_topology', ' ', '')`
+--source include/slow_environ.inc
+
--let $include_filename= rpl_change_topology.inc [new topology=$rpl_topology]
--source include/begin_include_file.inc
-
if ($rpl_debug)
{
--echo ---- Check input ----
@@ -235,11 +236,11 @@ if (!$rpl_skip_change_master)
}
if ($rpl_master_log_file)
{
- eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1, MASTER_USE_GTID=NO;
+ eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_LOG_FILE = '$_rpl_master_log_file'$_rpl_master_log_pos, MASTER_CONNECT_RETRY = 1$_timeout_adjustment, MASTER_USE_GTID=NO;
}
if (!$rpl_master_log_file)
{
- eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_CONNECT_RETRY=1;
+ eval CHANGE MASTER TO MASTER_HOST = '127.0.0.1', MASTER_PORT = $_rpl_port, MASTER_USER = 'root', MASTER_CONNECT_RETRY=1$_timeout_adjustment;
}
}
if ($_rpl_master == '')
diff --git a/mysql-test/include/rpl_clone_slave_using_mariadb-backup.inc b/mysql-test/include/rpl_clone_slave_using_mariadb-backup.inc
new file mode 100644
index 00000000..96fcfa21
--- /dev/null
+++ b/mysql-test/include/rpl_clone_slave_using_mariadb-backup.inc
@@ -0,0 +1,297 @@
+if ($cnf == "galera2_to_mariadb")
+{
+ --let MASTER_MYPORT= $NODE_MYPORT_1
+ --connect master, 127.0.0.1, root, , test, $NODE_MYPORT_1
+ --connect slave, 127.0.0.1, root, , test, $NODE_MYPORT_3
+ --disable_query_log
+ --replace_result $MASTER_MYPORT ###
+ --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$MASTER_MYPORT, MASTER_USE_GTID=NO;
+ --enable_query_log
+ START SLAVE;
+ --source include/wait_for_slave_to_start.inc
+
+ --let XTRABACKUP_BACKUP_OPTIONS=--no-defaults --user=root --host='127.0.0.1' --port=$NODE_MYPORT_3
+ --let XTRABACKUP_COPY_BACK_OPTIONS= --no-defaults
+}
+
+if ($cnf == "mariadb_to_mariadb")
+{
+ --let XTRABACKUP_BACKUP_OPTIONS=--defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2
+ --let XTRABACKUP_COPY_BACK_OPTIONS=--defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2
+}
+
+--connection master
+--let $MYSQLD_DATADIR_MASTER= `select @@datadir`
+--connection slave
+--let $MYSQLD_DATADIR_SLAVE= `select @@datadir`
+
+# This test covers the filename:pos based synchronization
+# between the master and the slave.
+# If we ever need to test a GTID based synchronization,
+# it should be done in a separate test.
+
+
+--echo ##############################################################
+--echo ### Initial block with some transactions
+
+--echo ### Slave: Make sure replication is not using GTID
+--connection slave
+--let $value= query_get_value(SHOW SLAVE STATUS, "Using_Gtid", 1)
+--echo # Using_Gtid=$value
+
+--echo ### Master: Create and populate t1
+--connection master
+CREATE TABLE t1(a TEXT) ENGINE=InnoDB;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#00:stmt#00 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#00:stmt#01 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#00:stmt#02 - slave run#0, before backup');
+COMMIT;
+--sync_slave_with_master
+
+
+
+--echo ##############################################################
+--echo ### Run the last transaction before mariadb-backup --backup
+--echo ### Remember SHOW MASTER STATUS and @@gtid_binlog_pos
+--echo ### before and after the transaction.
+
+--echo ### Master: Rember MASTER STATUS and @@gtid_binlog_pos before tr#01
+--connection master
+--let $master_before_tr01_show_master_status_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_before_tr01_show_master_status_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $master_before_tr01_gtid_binlog_pos=`SELECT @@global.gtid_binlog_pos`
+
+--echo ### Slave: Remember MASTER STATUS and @@gtid_binlog_pos before tr#01
+--connection slave
+--let $slave_before_tr01_show_master_status_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $slave_before_tr01_show_master_status_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $slave_before_tr01_gtid_binlog_pos=`SELECT @@global.gtid_binlog_pos`
+
+--echo ### Master: Run the actual last transaction before the backup
+--connection master
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#01:stmt#00 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#01:stmt#01 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#01:stmt#02 - slave run#0, before backup');
+COMMIT;
+--sync_slave_with_master
+
+--echo ### Master: Remember MASTER STATUS and @@gtid_binlog_pos after tr#01
+--connection master
+--let $master_after_tr01_show_master_status_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_after_tr01_show_master_status_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $master_after_tr01_gtid_binlog_pos=`SELECT @@global.gtid_binlog_pos`
+
+--echo ### Slave: Remember MASTER STATUS and @@gtid_binlog_pos after tr#01
+--connection slave
+--let $slave_after_tr01_show_master_status_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $slave_after_tr01_show_master_status_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $slave_after_tr01_gtid_binlog_pos=`SELECT @@global.gtid_binlog_pos`
+
+
+--echo ##############################################################
+--echo ### Running `mariadb-backup --backup,--prepare` and checking
+--echo ### that xtrabackup_slave_info and xtrabackup_binlog_info are OK
+
+--echo ### Slave: Create a backup
+--let $backup_slave=$MYSQLTEST_VARDIR/tmp/backup-slave
+--disable_result_log
+--exec $XTRABACKUP $XTRABACKUP_BACKUP_OPTIONS --slave-info --backup --target-dir=$backup_slave
+--enable_result_log
+
+--echo ### Slave: Prepare the backup
+--exec $XTRABACKUP --prepare --target-dir=$backup_slave
+
+--echo ### Slave: xtrabackup files:
+--echo ############################ xtrabackup_slave_info
+--replace_result $master_after_tr01_show_master_status_file master_after_tr01_show_master_status_file $master_after_tr01_show_master_status_position master_after_tr01_show_master_status_position
+--cat_file $backup_slave/xtrabackup_slave_info
+--echo ############################ xtrabackup_binlog_info
+--replace_result $slave_after_tr01_show_master_status_file slave_after_tr01_show_master_status_file $slave_after_tr01_show_master_status_position slave_after_tr01_show_master_status_position $slave_after_tr01_gtid_binlog_pos slave_after_tr01_gtid_binlog_pos
+--cat_file $backup_slave/xtrabackup_binlog_info
+--echo ############################
+
+
+--echo ##############################################################
+--echo ### Run more transactions after the backup:
+--echo ### - while the slave is still running, then
+--echo ### - while the slave is shut down
+
+--echo ### Master: Run another transaction while the slave is still running
+--connection master
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup');
+INSERT INTO t1 VALUES ('tr#02:stmt#01 - slave run#0, after backup');
+INSERT INTO t1 VALUES ('tr#02:stmt@02 - slave run#0, after backup');
+COMMIT;
+--sync_slave_with_master
+
+--echo ### Master: Remember MASTER STATUS and @@gtid_binlog_pos after tr#02
+--connection master
+--let $master_after_tr02_show_master_status_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_after_tr02_show_master_status_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $master_after_tr02_gtid_binlog_pos=`SELECT @@global.gtid_binlog_pos`
+
+--echo ### Slave: Remember MASTER STATUS and @@gtid_binlog_pos after tr#02
+--connection slave
+--let $slave_after_tr02_show_master_status_file=query_get_value(SHOW MASTER STATUS, File, 1)
+--let $slave_after_tr02_show_master_status_position=query_get_value(SHOW MASTER STATUS, Position, 1)
+--let $slave_after_tr02_gtid_binlog_pos=`SELECT @@global.gtid_binlog_pos`
+
+
+--echo ### Master: Checking SHOW BINLOG EVENTS
+
+--connection master
+--vertical_results
+### The BEGIN event
+--replace_column 4 # 5 #
+--replace_result $master_after_tr01_show_master_status_file master_after_tr01_show_master_status_file $master_after_tr01_show_master_status_position master_after_tr01_show_master_status_position $master_after_tr02_gtid_binlog_pos master_after_tr02_gtid_binlog_pos
+--eval SHOW BINLOG EVENTS IN '$master_after_tr01_show_master_status_file' FROM $master_after_tr01_show_master_status_position LIMIT 0,1
+### The INSERT event
+--replace_column 2 # 4 # 5 #
+--replace_result $master_after_tr01_show_master_status_file master_after_tr01_show_master_status_file $master_after_tr01_show_master_status_position master_after_tr01_show_master_status_position
+# Hide the difference between row and stmt binary logging
+--replace_regex /use `test`; // /(Query|Annotate_rows)/Query_or_Annotate_rows/
+--eval SHOW BINLOG EVENTS IN '$master_after_tr01_show_master_status_file' FROM $master_after_tr01_show_master_status_position LIMIT 1,1
+--horizontal_results
+
+--echo ### Slave: Checking SHOW BINLOG EVENTS
+--connection slave
+--vertical_results
+### The BEGIN event
+--replace_column 2 # 5 #
+--replace_result $slave_after_tr01_show_master_status_file slave_after_tr01_show_master_status_file $slave_after_tr01_show_master_status_position slave_after_tr01_show_master_status_position $slave_after_tr02_gtid_binlog_pos slave_after_tr02_gtid_binlog_pos
+--eval SHOW BINLOG EVENTS IN '$slave_after_tr01_show_master_status_file' FROM $slave_after_tr01_show_master_status_position LIMIT 0,1
+### The INSERT event
+--replace_column 2 # 4 # 5 #
+--replace_result $slave_after_tr01_show_master_status_file slave_after_tr01_show_master_status_file $slave_after_tr01_show_master_status_position slave_after_tr01_show_master_status_position $slave_after_tr02_gtid_binlog_pos slave_after_tr02_gtid_binlog_pos
+# Hide the difference between row and stmt binary logging
+--replace_regex /use `test`; // /(Query|Annotate_rows)/Query_or_Annotate_rows/
+--eval SHOW BINLOG EVENTS IN '$slave_after_tr01_show_master_status_file' FROM $slave_after_tr01_show_master_status_position LIMIT 1,1
+--horizontal_results
+
+--echo ### Slave: Stop replication
+--connection slave
+STOP SLAVE;
+--source include/wait_for_slave_to_stop.inc
+RESET SLAVE;
+
+--echo ### Slave: Shutdown the server
+
+if ($cnf == "mariadb_to_mariadb")
+{
+ --let $rpl_server_number= 2
+ --source include/rpl_stop_server.inc
+}
+
+if ($cnf == "galera2_to_mariadb")
+{
+ --connection slave
+ --source $MYSQL_TEST_DIR/include/shutdown_mysqld.inc
+}
+
+--echo ### Master: Run a transaction while the slave is shut down
+--connection master
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#03:stmt#00 - after slave run#0, slave is shut down, after backup');
+INSERT INTO t1 VALUES ('tr#03:stmt#01 - after slave run#0, slave is shut down, after backup');
+INSERT INTO t1 VALUES ('tr#03:stmt#02 - after slave run#0, slave is shut down, after backup');
+COMMIT;
+
+
+--echo ##############################################################
+--echo ### Emulate starting a new virgin slave
+
+--echo ### Slave: Remove the data directory
+--rmdir $MYSQLD_DATADIR_SLAVE
+
+--echo ### Slave: Copy back the backup
+--exec $XTRABACKUP $XTRABACKUP_COPY_BACK_OPTIONS --copy-back --datadir=$MYSQLD_DATADIR_SLAVE --target-dir=$backup_slave
+
+--echo ### Slave: Restart the server
+if ($cnf == "mariadb_to_mariadb")
+{
+ --let $rpl_server_number= 2
+ --source include/rpl_start_server.inc
+ --source include/wait_until_connected_again.inc
+}
+
+if ($cnf == "galera2_to_mariadb")
+{
+ --connection slave
+ --source $MYSQL_TEST_DIR/include/start_mysqld.inc
+}
+
+--echo ### Slave: Display the restored data before START SLAVE
+--connection slave
+SELECT * FROM t1 ORDER BY a;
+
+--echo ### Slave: Execute the CHANGE MASTER statement to set up the host and port
+--replace_result $MASTER_MYPORT ###
+--eval CHANGE MASTER '' TO MASTER_USER='root', MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_CONNECT_RETRY=1
+
+--echo ### Slave: Execute the CHANGE MASTER statement from xtrabackup_slave_info
+--replace_result $master_after_tr01_show_master_status_file master_after_tr01_show_master_status_file $master_after_tr01_show_master_status_position master_after_tr01_show_master_status_position
+--source $backup_slave/xtrabackup_slave_info
+
+--echo ### Slave: Execute START SLAVE
+--source include/start_slave.inc
+
+--echo ### Master: Wait for the slave to apply all master events
+--connection master
+--sync_slave_with_master slave
+
+--echo ### Slave: Make sure replication is not using GTID after the slave restart
+--connection slave
+--let $value= query_get_value(SHOW SLAVE STATUS, "Using_Gtid", 1)
+--echo # Using_Gtid=$value
+
+--echo ### Slave: Display the restored data after START SLAVE
+--connection slave
+SELECT * FROM t1 ORDER BY a;
+
+
+--echo ##############################################################
+--echo ### Continue master transactions, check the new slave replicates well.
+
+--echo ### Master: Run a transaction after restarting replication
+--connection master
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#04:stmt#00 - slave run#1');
+INSERT INTO t1 VALUES ('tr#04:stmt#01 - slave run#1');
+INSERT INTO t1 VALUES ('tr#04:stmt#02 - slave run#1');
+COMMIT;
+--sync_slave_with_master
+
+--echo ### Slave: Display the restored data + new transactions
+--connection slave
+SELECT * FROM t1 ORDER BY a;
+
+
+--echo ##############################################################
+--echo ### Cleanup
+
+--echo ### Removing the backup directory
+--rmdir $backup_slave
+
+--connection master
+DROP TABLE t1;
+--sync_slave_with_master
+
+if ($cnf == "mariadb_to_mariadb")
+{
+ --source include/rpl_end.inc
+}
+
+if ($cnf == "galera2_to_mariadb")
+{
+ STOP SLAVE;
+ --source include/wait_for_slave_to_stop.inc
+ RESET SLAVE ALL;
+
+ --connection master
+ set global wsrep_on=OFF;
+ RESET MASTER;
+ set global wsrep_on=ON;
+}
diff --git a/mysql-test/include/rpl_start_server.inc b/mysql-test/include/rpl_start_server.inc
index 932fc9da..0479dbbd 100644
--- a/mysql-test/include/rpl_start_server.inc
+++ b/mysql-test/include/rpl_start_server.inc
@@ -49,7 +49,7 @@ if ($rpl_server_parameters)
--source include/rpl_connection.inc
# Write file to make mysql-test-run.pl start up the server again
---exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
+--write_line "$_rpl_start_server_command" $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
if (!$rpl_server_error)
{
diff --git a/mysql-test/include/rpl_stop_server.inc b/mysql-test/include/rpl_stop_server.inc
index 470e86a1..1e4a64cc 100644
--- a/mysql-test/include/rpl_stop_server.inc
+++ b/mysql-test/include/rpl_stop_server.inc
@@ -44,7 +44,7 @@ if ($rpl_debug)
# Write file to make mysql-test-run.pl expect the "crash", but don't start
# it until it's told to
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
# Send shutdown to the connected server and give
# it 60 seconds (of mysqltest's default) to die before zapping it
diff --git a/mysql-test/include/search_pattern_in_file.inc b/mysql-test/include/search_pattern_in_file.inc
index 3105f7f9..ab3c95fc 100644
--- a/mysql-test/include/search_pattern_in_file.inc
+++ b/mysql-test/include/search_pattern_in_file.inc
@@ -9,9 +9,6 @@
#
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
# before sourcing this routine.
-# SEARCH_TYPE can also be set to either NULL(default) or _gm_
-# NULL is equivalent of using m/SEARCH_PATTERN/gs
-# _gm_ is equivalent of using m/SEARCH_RANGE/gm
#
# Optionally, SEARCH_RANGE can be set to the max number of bytes of the file
# to search. If negative, it will search that many bytes at the end of the
@@ -25,6 +22,7 @@
# Supported formats:
# - (default) : "FOUND n /pattern/ in FILE " or "NOT FOUND ..."
# - "matches" : Each match is printed, on a separate line
+# - "count" : "FOUND n matches in FILE" or "NOT FOUND ..." (omit pattern)
#
# In case of
# - SEARCH_FILE and/or SEARCH_PATTERN is not set
@@ -38,7 +36,7 @@
# let SEARCH_FILE= $error_log;
# # Stop the server
# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
-# --exec echo "wait" > $restart_file
+# --write_line wait $restart_file
# --shutdown_server
# --source include/wait_until_disconnected.inc
#
@@ -51,15 +49,12 @@
# Created: 2011-11-11 mleich
#
---error 0,1
perl;
use strict;
die "SEARCH_FILE not set" unless $ENV{SEARCH_FILE};
my @search_files= glob($ENV{SEARCH_FILE});
my $search_pattern= $ENV{SEARCH_PATTERN} or die "SEARCH_PATTERN not set";
my $search_range= $ENV{SEARCH_RANGE};
- my $silent= $ENV{SEARCH_SILENT};
- my $search_result= 0;
my $content;
foreach my $search_file (@search_files) {
open(FILE, '<', $search_file) || die("Can't open file $search_file: $!");
@@ -83,48 +78,23 @@ perl;
close(FILE);
$content.= $file_content;
}
- my @matches;
- if (not defined($ENV{SEARCH_TYPE}))
- {
- @matches=($content =~ /$search_pattern/gs);
- }
- elsif($ENV{SEARCH_TYPE} == "_gm_")
- {
- @matches=($content =~ /$search_pattern/gm);
- }
- my $res;
- if (@matches)
- {
- $res="FOUND " . scalar(@matches);
- $search_result= 1;
- }
- else
- {
- $res= "NOT FOUND";
- }
+ my @matches= ($content =~ /$search_pattern/gs);
+ my $res=@matches ? "FOUND " . scalar(@matches) : "NOT FOUND";
+
$ENV{SEARCH_FILE} =~ s{^.*?([^/\\]+)$}{$1};
- if (!$silent || $search_result)
- {
- if ($ENV{SEARCH_OUTPUT} eq "matches")
- {
- foreach (@matches)
- {
- print $_ . "\n";
- }
- }
- else
- {
- print "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n";
+ if ($ENV{SEARCH_OUTPUT} eq "matches") {
+ foreach (@matches) {
+ print $_ . "\n";
}
}
- die "$ENV{SEARCH_ABORT}\n"
- if $ENV{SEARCH_ABORT} && $res =~ /^$ENV{SEARCH_ABORT}/;
- exit($search_result != 1);
+ elsif ($ENV{SEARCH_OUTPUT} eq "count")
+ {
+ print "$res matches in $ENV{SEARCH_FILE}\n";
+ }
+ elsif ($ENV{SEARCH_ABORT} and $res =~ /^$ENV{SEARCH_ABORT}/) {
+ die "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n";
+ } else {
+ print "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n";
+ }
EOF
-
-let $SEARCH_RESULT= 1; # Found pattern
-if ($errno)
-{
- let $SEARCH_RESULT= 0; # Did not find pattern
-}
diff --git a/mysql-test/include/shutdown_mysqld.inc b/mysql-test/include/shutdown_mysqld.inc
index fc297256..1684d819 100644
--- a/mysql-test/include/shutdown_mysqld.inc
+++ b/mysql-test/include/shutdown_mysqld.inc
@@ -24,18 +24,15 @@ if ($rpl_inited)
# Write file to make mysql-test-run.pl expect the "crash", but don't start it
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
# Avoid warnings from connection threads that does not have time to exit
--disable_query_log
set @@global.log_warnings=0;
--enable_query_log
---let $server_shutdown_timeout= 60
-if ($VALGRIND_TEST)
-{
- --let $server_shutdown_timeout= 300
-}
+--source include/slow_environ.inc
+--let $server_shutdown_timeout= 60$_timeout_adjustment
if ($shutdown_timeout)
{
diff --git a/mysql-test/include/slow_environ.inc b/mysql-test/include/slow_environ.inc
new file mode 100644
index 00000000..761147fd
--- /dev/null
+++ b/mysql-test/include/slow_environ.inc
@@ -0,0 +1,9 @@
+if (!$slow_environ_check)
+{
+ let $_timeout_adjustment=;
+ if (`select $VALGRIND_TEST + count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like '%SAN%'`)
+ {
+ let $_timeout_adjustment=0;
+ }
+ let $slow_environ_check=1;
+}
diff --git a/mysql-test/include/start_mysqld.inc b/mysql-test/include/start_mysqld.inc
index 6e448cb2..91b06997 100644
--- a/mysql-test/include/start_mysqld.inc
+++ b/mysql-test/include/start_mysqld.inc
@@ -21,7 +21,7 @@ if ($restart_bindir)
if ($restart_parameters)
{
- --exec echo "$restart_cmd: $restart_parameters" > $_expect_file_name
+ --write_line "$restart_cmd: $restart_parameters" $_expect_file_name
if (!$restart_noprint)
{
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
@@ -34,7 +34,7 @@ if ($restart_parameters)
}
if (!$restart_parameters)
{
- --exec echo "$restart_cmd" > $_expect_file_name
+ --write_line "$restart_cmd" $_expect_file_name
if ($restart_noprint < 2)
{
--exec echo "# $restart_cmd"
diff --git a/mysql-test/include/stop_slave_io.inc b/mysql-test/include/stop_slave_io.inc
index ddc83782..a9d97f2f 100644
--- a/mysql-test/include/stop_slave_io.inc
+++ b/mysql-test/include/stop_slave_io.inc
@@ -34,8 +34,17 @@ if (!$rpl_debug)
--disable_query_log
}
-
+let $_enable_warnings=0;
+if ($rpl_allow_error) {
+ if ($ENABLED_WARNINGS) {
+ let $_enable_warnings=1;
+ disable_warnings;
+ }
+}
STOP SLAVE IO_THREAD;
+if ($_enable_warnings) {
+ enable_warnings;
+}
--source include/wait_for_slave_io_to_stop.inc
diff --git a/mysql-test/include/sync_slave_sql_with_io.inc b/mysql-test/include/sync_slave_sql_with_io.inc
index 9efede9a..c16d28ed 100644
--- a/mysql-test/include/sync_slave_sql_with_io.inc
+++ b/mysql-test/include/sync_slave_sql_with_io.inc
@@ -25,11 +25,8 @@
let $_slave_timeout= $slave_timeout;
if (!$_slave_timeout)
{
- let $_slave_timeout= 300;
- if ($VALGRIND_TEST)
- {
- let $_slave_timeout= 1500;
- }
+ source include/slow_environ.inc;
+ let $_slave_timeout= 300$_timeout_adjustment;
}
--let $_master_log_file= query_get_value(SHOW SLAVE STATUS, Master_Log_File, 1)
diff --git a/mysql-test/include/sync_with_master_gtid.inc b/mysql-test/include/sync_with_master_gtid.inc
index 777711b9..0ca2c907 100644
--- a/mysql-test/include/sync_with_master_gtid.inc
+++ b/mysql-test/include/sync_with_master_gtid.inc
@@ -33,11 +33,8 @@
let $_slave_timeout= $slave_timeout;
if (!$_slave_timeout)
{
- let $_slave_timeout= 120;
- if ($VALGRIND_TEST)
- {
- let $_slave_timeout= 1200;
- }
+ source include/slow_environ.inc;
+ let $_slave_timeout= 120$_timeout_adjustment;
}
--let $_result= `SELECT master_gtid_wait('$master_pos', $_slave_timeout)`
diff --git a/mysql-test/include/wait_for_pattern_in_file.inc b/mysql-test/include/wait_for_pattern_in_file.inc
index 52226acd..a5517610 100644
--- a/mysql-test/include/wait_for_pattern_in_file.inc
+++ b/mysql-test/include/wait_for_pattern_in_file.inc
@@ -25,23 +25,23 @@ if (!$_timeout)
}
let $_timeout_counter=`SELECT $_timeout * 10`;
-let SEARCH_SILENT=1;
-
+let SEARCH_ABORT=NOT FOUND;
let $_continue= 1;
+disable_abort_on_error;
while ($_continue)
{
source include/search_pattern_in_file.inc;
- if ($SEARCH_RESULT)
+ if (!$errno)
{
# Found match
let $_continue= 0;
}
- if (!$SEARCH_RESULT)
+ if ($errno)
{
dec $_timeout_counter;
if ($_timeout_counter == 1)
{
- let $SEARCH_SILENT= 0;
+ enable_abort_on_error;
}
if (!$_timeout_counter)
{
@@ -49,8 +49,7 @@ while ($_continue)
}
}
}
-
-let SEARCH_SILENT=0;
+enable_abort_on_error;
--source include/end_include_file.inc
--let $keep_include_silent=$wait_save_keep_include_silent
diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc
index ed81c559..6802cd41 100644
--- a/mysql-test/include/wait_for_slave_param.inc
+++ b/mysql-test/include/wait_for_slave_param.inc
@@ -49,11 +49,8 @@
let $_slave_timeout= $slave_timeout;
if (!$_slave_timeout)
{
- let $_slave_timeout= 300;
- if ($VALGRIND_TEST)
- {
- let $_slave_timeout= 1500;
- }
+ source include/slow_environ.inc;
+ let $_slave_timeout= 300$_timeout_adjustment;
}
let $_slave_param_comparison= $slave_param_comparison;
diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc
index deb6ca13..2b20c780 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_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013,HA_ERR_NO_ENCRYPTION
+ --error 0,ER_ACCESS_DENIED_ERROR,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013,HA_ERR_NO_ENCRYPTION,2026
select 1;
dec $counter;
diff --git a/mysql-test/lib/My/Debugger.pm b/mysql-test/lib/My/Debugger.pm
index d129aa09..907638c9 100644
--- a/mysql-test/lib/My/Debugger.pm
+++ b/mysql-test/lib/My/Debugger.pm
@@ -263,6 +263,7 @@ sub pre_setup() {
$::opt_suite_timeout= 24 * 60; # in minutes
$::opt_shutdown_timeout= ($interactive ? 24 * 60 : 3) * 60; # in seconds
$::opt_start_timeout= $::opt_shutdown_timeout; # in seconds
+ $::opt_debug_sync_timeout= 3000; # in seconds
}
}
diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm
index 2b32ef87..f33875e1 100644
--- a/mysql-test/lib/My/Platform.pm
+++ b/mysql-test/lib/My/Platform.pm
@@ -23,7 +23,7 @@ use File::Path;
use Carp;
use base qw(Exporter);
-our @EXPORT= qw(IS_CYGWIN IS_MSYS IS_WINDOWS IS_WIN32PERL IS_AIX
+our @EXPORT= qw(IS_CYGWIN IS_MSYS IS_WINDOWS IS_WIN32PERL IS_AIX IS_MAC
native_path posix_path mixed_path
check_socket_path_length process_alive open_for_append);
@@ -70,6 +70,14 @@ BEGIN {
}
}
+BEGIN {
+ if ($^O eq "darwin") {
+ eval 'sub IS_MAC { 1 }';
+ }
+ else {
+ eval 'sub IS_MAC { 0 }';
+ }
+}
#
# native_path
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index 97c48c19..0c3c45f3 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -87,12 +87,16 @@ sub flush_out {
$out_line = "";
}
+use if $^O eq "MSWin32", "threads::shared";
+my $flush_lock :shared;
+
# Print to stdout
sub print_out {
if(IS_WIN32PERL) {
$out_line .= $_[0];
# Flush buffered output on new lines.
if (rindex($_[0], "\n") != -1) {
+ lock($flush_lock);
flush_out();
}
} else {
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result
index 2e7047f3..949f36e2 100644
--- a/mysql-test/main/alter_table.result
+++ b/mysql-test/main/alter_table.result
@@ -3124,6 +3124,14 @@ CREATE TEMPORARY TABLE t2 LIKE t1;
DROP TEMPORARY TABLE t2;
DROP TABLE t1;
#
+# MDEV-33313 Incorrect error message for "ALTER TABLE ... DROP CONSTRAINT ..., DROP col, DROP col"
+#
+create table t2(id int primary key) engine=innodb;
+create table t1(id int primary key, t2_id int, constraint t1_fk_t2_id foreign key(t2_id) references t2(id)) engine=innodb;
+alter table t1 drop constraint t1_fk_t2_id, drop t2_id, drop t2_id;
+ERROR 42000: Can't DROP COLUMN `t2_id`; check that it exists
+drop table t1, t2;
+#
# End of 10.6 tests
#
#
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index 17d71d8e..5ffa300f 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -2407,6 +2407,15 @@ DROP TEMPORARY TABLE t2;
DROP TABLE t1;
--echo #
+--echo # MDEV-33313 Incorrect error message for "ALTER TABLE ... DROP CONSTRAINT ..., DROP col, DROP col"
+--echo #
+create table t2(id int primary key) engine=innodb;
+create table t1(id int primary key, t2_id int, constraint t1_fk_t2_id foreign key(t2_id) references t2(id)) engine=innodb;
+--error ER_CANT_DROP_FIELD_OR_KEY
+alter table t1 drop constraint t1_fk_t2_id, drop t2_id, drop t2_id;
+drop table t1, t2;
+
+--echo #
--echo # End of 10.6 tests
--echo #
diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test
index 76d5ed00..68fbc001 100644
--- a/mysql-test/main/bootstrap.test
+++ b/mysql-test/main/bootstrap.test
@@ -74,7 +74,7 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
--echo # MDEV-13063 Server crashes in intern_plugin_lock or assertion `plugin_ptr->ref_count == 1' fails in plugin_init
--echo #
--error 1
---exec $MYSQLD_BOOTSTRAP_CMD --myisam_recover_options=NONE
+--exec $MYSQLD_BOOTSTRAP_CMD --myisam_recover_options=NONE 2>/dev/null
--echo #
--echo # MDEV-19349 mysql_install_db: segfault at tmp_file_prefix check
diff --git a/mysql-test/main/column_compression_parts.result b/mysql-test/main/column_compression_parts.result
index fa12217c..5f5539b7 100644
--- a/mysql-test/main/column_compression_parts.result
+++ b/mysql-test/main/column_compression_parts.result
@@ -12,7 +12,6 @@ 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/commit_1innodb.result b/mysql-test/main/commit_1innodb.result
index d090844c..973be9fd 100644
--- a/mysql-test/main/commit_1innodb.result
+++ b/mysql-test/main/commit_1innodb.result
@@ -634,7 +634,7 @@ SUCCESS
drop table t2;
set sql_mode=no_engine_substitution;
create temporary table t2 (a int);
-call p_verify_status_increment(1, 0, 0, 0);
+call p_verify_status_increment(3, 0, 2, 0);
SUCCESS
set sql_mode=default;
@@ -643,8 +643,9 @@ set sql_mode=default;
select f1();
f1()
2
-# Two commits because a binary log record is written
-call p_verify_status_increment(2, 0, 1, 0);
+# Two commits because a binary log record is written, and another two
+# as the function f1() is reloaded after creating temporary table.
+call p_verify_status_increment(4, 0, 3, 0);
SUCCESS
commit;
@@ -715,11 +716,11 @@ SUCCESS
# 25. DDL: DROP TEMPORARY TABLE, does not start a transaction
#
drop temporary table t2;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(3, 0, 2, 0);
SUCCESS
commit;
-call p_verify_status_increment(1, 0, 1, 0);
+call p_verify_status_increment(1, 0, 0, 0);
SUCCESS
# 26. Verify that SET AUTOCOMMIT issues an implicit commit
@@ -801,7 +802,7 @@ call p_verify_status_increment(0, 0, 0, 0);
SUCCESS
do (select f1() from t1 where a=2);
-call p_verify_status_increment(2, 2, 2, 2);
+call p_verify_status_increment(4, 2, 4, 2);
SUCCESS
commit;
diff --git a/mysql-test/main/constraints.result b/mysql-test/main/constraints.result
index 143c2232..d2a19040 100644
--- a/mysql-test/main/constraints.result
+++ b/mysql-test/main/constraints.result
@@ -235,3 +235,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop procedure sp;
drop table t1;
+#
+# MDEV-33768: Memory leak found in the test main.constraints run with --ps-protocol against a server built with the option -DWITH_PROTECT_STATEMENT_MEMROOT
+# This test case was added by reviewer's request.
+#
+PREPARE stmt FROM 'CREATE TABLE t1 (a INT)';
+EXECUTE stmt;
+DROP TABLE t1;
+EXECUTE stmt;
+EXECUTE stmt;
+ERROR 42S01: Table 't1' already exists
+# Clean up
+DROP TABLE t1;
+DEALLOCATE PREPARE stmt;
diff --git a/mysql-test/main/constraints.test b/mysql-test/main/constraints.test
index 5c673f9b..83f3394d 100644
--- a/mysql-test/main/constraints.test
+++ b/mysql-test/main/constraints.test
@@ -189,3 +189,18 @@ call sp;
show create table t1;
drop procedure sp;
drop table t1;
+
+--echo #
+--echo # MDEV-33768: Memory leak found in the test main.constraints run with --ps-protocol against a server built with the option -DWITH_PROTECT_STATEMENT_MEMROOT
+--echo # This test case was added by reviewer's request.
+--echo #
+PREPARE stmt FROM 'CREATE TABLE t1 (a INT)';
+EXECUTE stmt;
+DROP TABLE t1;
+EXECUTE stmt;
+--error ER_TABLE_EXISTS_ERROR
+EXECUTE stmt;
+
+--echo # Clean up
+DROP TABLE t1;
+DEALLOCATE PREPARE stmt;
diff --git a/mysql-test/main/crash_commit_before.test b/mysql-test/main/crash_commit_before.test
index 93b96de6..30b59ce4 100644
--- a/mysql-test/main/crash_commit_before.test
+++ b/mysql-test/main/crash_commit_before.test
@@ -17,7 +17,7 @@ insert into t1 values(9);
SET GLOBAL debug_dbug="d,crash_commit_before";
# Write file to make mysql-test-run.pl expect crash and restart
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Run the crashing query
--error 2013
diff --git a/mysql-test/main/create.result b/mysql-test/main/create.result
index d6c68fdd..9db7d5ca 100644
--- a/mysql-test/main/create.result
+++ b/mysql-test/main/create.result
@@ -1803,7 +1803,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`color` char(32) GENERATED ALWAYS AS (column_get(`dynamic_cols`,1 as char charset latin1)) STORED,
- `cl` char(32) GENERATED ALWAYS AS (column_get(column_add(column_create(1,'blue' AS char charset latin1 ),2,'ttt'),`i` as char charset latin1)) STORED,
+ `cl` char(32) GENERATED ALWAYS AS (column_get(column_add(column_create(1,'blue' AS char charset latin1 collate latin1_swedish_ci ),2,'ttt'),`i` as char charset latin1)) STORED,
`item_name` varchar(32) NOT NULL,
`i` int(11) DEFAULT NULL,
`dynamic_cols` blob DEFAULT NULL,
diff --git a/mysql-test/main/ctype_collate.result b/mysql-test/main/ctype_collate.result
index eafe7ff3..7b713df7 100644
--- a/mysql-test/main/ctype_collate.result
+++ b/mysql-test/main/ctype_collate.result
@@ -780,3 +780,27 @@ string
#
# End of 10.2 tests
#
+#
+# MDEV-33318 ORDER BY COLLATE improperly applied to non-character columns
+#
+set names utf8;
+create table t1 (ts datetime);
+insert t1 values ('2024-01-26 21:37:54'), ('2024-01-26 21:37:54'),
+('2024-01-26 21:37:54'), ('2024-01-26 21:37:54'),
+('2024-01-26 21:37:58'), ('2024-01-26 21:37:58'),
+('2024-01-26 21:37:58'), ('2024-01-26 21:38:02'),
+('2024-01-26 21:38:02'), ('2024-01-26 21:38:02');
+select * from t1 order by ts collate utf8_bin;
+ts
+2024-01-26 21:37:54
+2024-01-26 21:37:54
+2024-01-26 21:37:54
+2024-01-26 21:37:54
+2024-01-26 21:37:58
+2024-01-26 21:37:58
+2024-01-26 21:37:58
+2024-01-26 21:38:02
+2024-01-26 21:38:02
+2024-01-26 21:38:02
+drop table t1;
+# End of 10.6 tests
diff --git a/mysql-test/main/ctype_collate.test b/mysql-test/main/ctype_collate.test
index 2366b130..96ad216d 100644
--- a/mysql-test/main/ctype_collate.test
+++ b/mysql-test/main/ctype_collate.test
@@ -357,3 +357,18 @@ SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLL
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-33318 ORDER BY COLLATE improperly applied to non-character columns
+--echo #
+set names utf8;
+create table t1 (ts datetime);
+insert t1 values ('2024-01-26 21:37:54'), ('2024-01-26 21:37:54'),
+ ('2024-01-26 21:37:54'), ('2024-01-26 21:37:54'),
+ ('2024-01-26 21:37:58'), ('2024-01-26 21:37:58'),
+ ('2024-01-26 21:37:58'), ('2024-01-26 21:38:02'),
+ ('2024-01-26 21:38:02'), ('2024-01-26 21:38:02');
+select * from t1 order by ts collate utf8_bin;
+drop table t1;
+
+--echo # End of 10.6 tests
diff --git a/mysql-test/main/ctype_ucs.result b/mysql-test/main/ctype_ucs.result
index eb1220f9..cab41feb 100644
--- a/mysql-test/main/ctype_ucs.result
+++ b/mysql-test/main/ctype_ucs.result
@@ -6520,5 +6520,25 @@ SELECT 1 COLLATE latin1_swedish_ci;
ERROR 42000: COLLATION 'latin1_swedish_ci' is not valid for CHARACTER SET 'ucs2'
SET NAMES utf8;
#
+# MDEV-33772 Bad SEPARATOR value in GROUP_CONCAT on character set conversion
+#
+SET NAMES utf8mb3, @@collation_connection=ucs2_general_ci;
+CREATE TABLE t1 (c VARCHAR(10)) CHARACTER SET ucs2;
+INSERT INTO t1 VALUES ('a'),('A');
+CREATE OR REPLACE VIEW v1 AS
+SELECT COUNT(*) AS cnt, GROUP_CONCAT(c) AS c1 FROM t1 GROUP BY c;
+SELECT * FROM v1;
+cnt c1
+2 a,A
+SELECT HEX(c1) FROM v1;
+HEX(c1)
+0061002C0041
+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 count(0) AS `cnt`,group_concat(`t1`.`c` separator ',') AS `c1` from `t1` group by `t1`.`c` utf8mb3 ucs2_general_ci
+DROP VIEW v1;
+DROP TABLE t1;
+SET NAMES utf8mb3;
+#
# End of 10.5 tests
#
diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test
index 993f9be5..93ddcb86 100644
--- a/mysql-test/main/ctype_ucs.test
+++ b/mysql-test/main/ctype_ucs.test
@@ -1194,5 +1194,22 @@ SELECT 1 COLLATE latin1_swedish_ci;
SET NAMES utf8;
--echo #
+--echo # MDEV-33772 Bad SEPARATOR value in GROUP_CONCAT on character set conversion
+--echo #
+
+SET NAMES utf8mb3, @@collation_connection=ucs2_general_ci;
+CREATE TABLE t1 (c VARCHAR(10)) CHARACTER SET ucs2;
+INSERT INTO t1 VALUES ('a'),('A');
+CREATE OR REPLACE VIEW v1 AS
+ SELECT COUNT(*) AS cnt, GROUP_CONCAT(c) AS c1 FROM t1 GROUP BY c;
+SELECT * FROM v1;
+SELECT HEX(c1) FROM v1;
+SHOW CREATE VIEW v1;
+DROP VIEW v1;
+DROP TABLE t1;
+SET NAMES utf8mb3;
+
+
+--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/ddl_i18n_koi8r.result b/mysql-test/main/ddl_i18n_koi8r.result
index f588374a..bc4ef5ca 100644
--- a/mysql-test/main/ddl_i18n_koi8r.result
+++ b/mysql-test/main/ddl_i18n_koi8r.result
@@ -719,6 +719,7 @@ ca cb
utf8mb3_general_ci utf8mb3_general_ci
---> Dump of mysqltest1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -795,6 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql
---> Dump of mysqltest2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -1723,6 +1725,7 @@ koi8r_general_ci utf8mb3_general_ci koi8r_general_ci koi8r_general_ci utf8mb3_ge
DELETE FROM mysqltest2.log|
---> Dump of mysqltest1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -1805,6 +1808,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql
---> Dump of mysqltest2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -2491,6 +2495,7 @@ COLLATION( 'ÔÅËÓÔ') AS c4,
END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8mb3_unicode_ci
---> Dump of mysqltest1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -2558,6 +2563,7 @@ DELIMITER ;
---> Dumping mysqltest1 to ddl_i18n_koi8r.events.mysqltest1.sql
---> Dump of mysqltest2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
diff --git a/mysql-test/main/ddl_i18n_utf8.result b/mysql-test/main/ddl_i18n_utf8.result
index cb57bc5e..9561c914 100644
--- a/mysql-test/main/ddl_i18n_utf8.result
+++ b/mysql-test/main/ddl_i18n_utf8.result
@@ -719,6 +719,7 @@ ca cb
utf8mb3_general_ci utf8mb3_general_ci
---> Dump of mysqltest1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -795,6 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql
---> Dump of mysqltest2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -1723,6 +1725,7 @@ utf8mb3_general_ci utf8mb3_general_ci koi8r_general_ci utf8mb3_general_ci utf8mb
DELETE FROM mysqltest2.log|
---> Dump of mysqltest1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -1805,6 +1808,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ;
---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql
---> Dump of mysqltest2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -2491,6 +2495,7 @@ COLLATION( 'текÑÑ‚') AS c4,
END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8mb3 utf8mb3_general_ci utf8mb3_unicode_ci
---> Dump of mysqltest1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
@@ -2558,6 +2563,7 @@ DELIMITER ;
---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql
---> Dump of mysqltest2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */;
diff --git a/mysql-test/main/deadlock_innodb.result b/mysql-test/main/deadlock_innodb.result
index 09958bf0..9236f21c 100644
--- a/mysql-test/main/deadlock_innodb.result
+++ b/mysql-test/main/deadlock_innodb.result
@@ -89,11 +89,6 @@ id x
300 300
connection con2;
update t2 set a=2 where b = 0;
-select * from t2;
-b a
-0 2
-1 20
-2 30
update t1 set x=2 where id = 0;
connection con1;
update t1 set x=1 where id = 0;
diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result
index b9ee3f0a..6346b44d 100644
--- a/mysql-test/main/derived_split_innodb.result
+++ b/mysql-test/main/derived_split_innodb.result
@@ -877,5 +877,62 @@ SELECT * FROM t1 WHERE t1.a IN (SELECT b FROM
(SELECT t2.b FROM t2 WHERE NOT EXISTS (SELECT 1 FROM t3) GROUP BY b) sq);
a
DROP TABLE t1, t2, t3;
+#
+# MDEV-23878: Wrong result with semi-join and splittable derived table
+#
+CREATE TABLE t1 (
+groupId int,
+id int unsigned,
+PRIMARY KEY (groupId, id)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES
+(8,1),(8,2),(8,3),(8,4),(8,5),(8,6),(8,7),(8,8),(8,9),(8,10),
+(8,11),(8,12),(8,13),(8,14),(8,15),(8,16),(8,17),(8,18),(8,19);
+set statement in_predicate_conversion_threshold=2 for SELECT COUNT(*) AS cnt FROM t1
+JOIN
+(
+SELECT groupId, id
+FROM t1
+WHERE id IN (1,2,3,4,5,6)
+GROUP BY groupId, id
+) AS t2
+USING (groupId, id)
+WHERE id IN (1,2,3,4,5,6,7,8);
+cnt
+6
+set statement in_predicate_conversion_threshold=2 for EXPLAIN SELECT COUNT(*) AS cnt FROM t1
+JOIN
+(
+SELECT groupId, id
+FROM t1
+WHERE id IN (1,2,3,4,5,6)
+GROUP BY groupId, id
+) AS t2
+USING (groupId, id)
+WHERE id IN (1,2,3,4,5,6,7,8);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index PRIMARY PRIMARY 8 NULL 19 Using index
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
+1 PRIMARY <derived3> ref key0 key0 8 test.t1.groupId,test.t1.id 2
+4 MATERIALIZED <derived5> ALL NULL NULL NULL NULL 8
+5 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
+3 LATERAL DERIVED t1 eq_ref PRIMARY PRIMARY 8 test.t1.groupId,test.t1.id 1 Using index
+3 LATERAL DERIVED <derived7> ref key0 key0 4 test.t1.id 2 Using where; FirstMatch(t1)
+7 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
+set statement optimizer_switch='split_materialized=off, loosescan=off' for
+set statement in_predicate_conversion_threshold=2 for
+SELECT COUNT(*) AS cnt FROM t1
+JOIN
+(
+SELECT groupId, id
+FROM t1
+WHERE id IN (1,2,3,4,5,6)
+GROUP BY groupId, id
+) AS t2
+USING (groupId, id)
+WHERE id IN (1,2,3,4,5,6,7,8);
+cnt
+6
+DROP TABLE t1;
# End of 10.4 tests
SET GLOBAL innodb_stats_persistent=@save_innodb_stats_persistent;
diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test
index 075d6e81..67db02f7 100644
--- a/mysql-test/main/derived_split_innodb.test
+++ b/mysql-test/main/derived_split_innodb.test
@@ -505,6 +505,48 @@ SELECT * FROM t1 WHERE t1.a IN (SELECT b FROM
DROP TABLE t1, t2, t3;
+--echo #
+--echo # MDEV-23878: Wrong result with semi-join and splittable derived table
+--echo #
+
+CREATE TABLE t1 (
+ groupId int,
+ id int unsigned,
+ PRIMARY KEY (groupId, id)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+INSERT INTO t1 VALUES
+ (8,1),(8,2),(8,3),(8,4),(8,5),(8,6),(8,7),(8,8),(8,9),(8,10),
+ (8,11),(8,12),(8,13),(8,14),(8,15),(8,16),(8,17),(8,18),(8,19);
+
+let $query=
+SELECT COUNT(*) AS cnt FROM t1
+JOIN
+(
+ SELECT groupId, id
+ FROM t1
+ WHERE id IN (1,2,3,4,5,6)
+ GROUP BY groupId, id
+) AS t2
+USING (groupId, id)
+WHERE id IN (1,2,3,4,5,6,7,8);
+
+let $tvc_conversion_threshold =
+ set statement in_predicate_conversion_threshold=2 for;
+
+eval $tvc_conversion_threshold $query;
+eval $tvc_conversion_threshold EXPLAIN $query;
+
+let $no_split_materialized_loosescan=
+ set statement optimizer_switch='split_materialized=off, loosescan=off' for;
+
+# Correct result with split materializied optimization disabled
+eval $no_split_materialized_loosescan
+ $tvc_conversion_threshold
+ $query;
+
+DROP TABLE t1;
+
--echo # End of 10.4 tests
SET GLOBAL innodb_stats_persistent=@save_innodb_stats_persistent;
diff --git a/mysql-test/main/derived_view.result b/mysql-test/main/derived_view.result
index 3ac06c20..432d4e7d 100644
--- a/mysql-test/main/derived_view.result
+++ b/mysql-test/main/derived_view.result
@@ -4291,8 +4291,74 @@ a
drop table t1, t2;
drop view v1;
drop procedure aproc;
+#
+# MDEV-31305: Aggregation over materialized derived table
+#
+CREATE VIEW v AS
+SELECT seq1.seq AS dim1, seq2.seq AS dim2, seq3.seq AS dim3,
+FLOOR(RAND(13) * 5) AS p
+FROM seq_100_to_105 seq1
+JOIN seq_10_to_15 seq2
+JOIN seq_1_to_5 seq3;
+SELECT v.*, SUM(p) from v;
+dim1 dim2 dim3 p SUM(p)
+100 10 1 2 371
+SELECT d.*, SUM(p)
+FROM (
+SELECT seq1.seq AS dim1, seq2.seq AS dim2, seq3.seq AS dim3,
+FLOOR(RAND(13) * 5) AS p
+FROM seq_100_to_105 seq1
+JOIN seq_10_to_15 seq2
+JOIN seq_1_to_5 seq3
+) d;
+dim1 dim2 dim3 p SUM(p)
+100 10 1 2 371
+WITH demo AS
+(
+SELECT seq1.seq AS dim1, seq2.seq AS dim2, seq3.seq AS dim3,
+FLOOR(RAND(13) * 5) AS p
+FROM seq_100_to_105 seq1
+JOIN seq_10_to_15 seq2
+JOIN seq_1_to_5 seq3
+)
+SELECT d.*, SUM(p) FROM demo d;
+dim1 dim2 dim3 p SUM(p)
+100 10 1 2 371
+DROP VIEW v;
# End of 10.4 tests
#
+# MDEV-31277: 2-nd execution of PS to select from materialized view
+# specified as left join whose inner table is mergeable
+# derived containing a constant column
+#
+create table t1 (
+Election int(10) unsigned NOT NULL
+) engine=MyISAM;
+insert into t1 (Election) values (1), (4);
+create table t2 (
+VoteID int(10),
+ElectionID int(10),
+UserID int(10)
+);
+insert into t2 (ElectionID, UserID) values (2, 30), (3, 30);
+create view v1 as select * from t1
+left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T
+on T.ElectionID = t1.Election
+limit 9;
+prepare stmt1 from "select * from v1";
+execute stmt1;
+Election Voted ElectionID
+1 NULL NULL
+4 NULL NULL
+execute stmt1;
+Election Voted ElectionID
+1 NULL NULL
+4 NULL NULL
+deallocate prepare stmt1;
+drop view v1;
+drop table t1, t2;
+# End of 10.5 tests
+#
# MDEV-31143: view with ORDER BY used in query with rownum() in WHERE
#
create table t1 (id int primary key);
diff --git a/mysql-test/main/derived_view.test b/mysql-test/main/derived_view.test
index ddead30a..0f2c8d14 100644
--- a/mysql-test/main/derived_view.test
+++ b/mysql-test/main/derived_view.test
@@ -2795,9 +2795,81 @@ drop table t1, t2;
drop view v1;
drop procedure aproc;
+--echo #
+--echo # MDEV-31305: Aggregation over materialized derived table
+--echo #
+
+--source include/have_sequence.inc
+
+CREATE VIEW v AS
+ SELECT seq1.seq AS dim1, seq2.seq AS dim2, seq3.seq AS dim3,
+ FLOOR(RAND(13) * 5) AS p
+ FROM seq_100_to_105 seq1
+ JOIN seq_10_to_15 seq2
+ JOIN seq_1_to_5 seq3;
+
+SELECT v.*, SUM(p) from v;
+
+SELECT d.*, SUM(p)
+ FROM (
+ SELECT seq1.seq AS dim1, seq2.seq AS dim2, seq3.seq AS dim3,
+ FLOOR(RAND(13) * 5) AS p
+ FROM seq_100_to_105 seq1
+ JOIN seq_10_to_15 seq2
+ JOIN seq_1_to_5 seq3
+) d;
+
+WITH demo AS
+(
+ SELECT seq1.seq AS dim1, seq2.seq AS dim2, seq3.seq AS dim3,
+ FLOOR(RAND(13) * 5) AS p
+ FROM seq_100_to_105 seq1
+ JOIN seq_10_to_15 seq2
+ JOIN seq_1_to_5 seq3
+)
+SELECT d.*, SUM(p) FROM demo d;
+
+DROP VIEW v;
+
--echo # End of 10.4 tests
--echo #
+--echo # MDEV-31277: 2-nd execution of PS to select from materialized view
+--echo # specified as left join whose inner table is mergeable
+--echo # derived containing a constant column
+--echo #
+
+create table t1 (
+ Election int(10) unsigned NOT NULL
+) engine=MyISAM;
+
+insert into t1 (Election) values (1), (4);
+
+create table t2 (
+ VoteID int(10),
+ ElectionID int(10),
+ UserID int(10)
+);
+
+insert into t2 (ElectionID, UserID) values (2, 30), (3, 30);
+create view v1 as select * from t1
+ left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T
+ on T.ElectionID = t1.Election
+limit 9;
+
+prepare stmt1 from "select * from v1";
+
+execute stmt1;
+execute stmt1;
+
+deallocate prepare stmt1;
+
+drop view v1;
+drop table t1, t2;
+
+--echo # End of 10.5 tests
+
+--echo #
--echo # MDEV-31143: view with ORDER BY used in query with rownum() in WHERE
--echo #
diff --git a/mysql-test/main/distinct_notembedded.result b/mysql-test/main/distinct_notembedded.result
new file mode 100644
index 00000000..df81fe1c
--- /dev/null
+++ b/mysql-test/main/distinct_notembedded.result
@@ -0,0 +1,322 @@
+#
+# MDEV-30660 COUNT DISTINCT seems unnecessarily slow when run on a PK
+#
+set @save_optimizer_trace = @@optimizer_trace;
+SET optimizer_trace='enabled=on';
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT NOT NULL);
+INSERT INTO t1 VALUES (1,1), (2,1), (3,1);
+# Optimization is applied (aggregator=simple):
+SELECT COUNT(DISTINCT a) FROM t1;
+COUNT(DISTINCT a)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.a)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT AVG(DISTINCT a), SUM(DISTINCT b) FROM t1;
+AVG(DISTINCT a) SUM(DISTINCT b)
+2.0000 1
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "avg(distinct t1.a)",
+ "aggregator_type": "simple"
+ },
+ {
+ "function": "sum(distinct t1.b)",
+ "aggregator_type": "distinct"
+ }
+]
+# Only `a` is unique but it's enough to eliminate DISTINCT:
+SELECT COUNT(DISTINCT b, a) FROM t1;
+COUNT(DISTINCT b, a)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.b,t1.a)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT COUNT(DISTINCT a, a + b) FROM t1;
+COUNT(DISTINCT a, a + b)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.a,t1.a + t1.b)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT SUM(DISTINCT a), AVG(DISTINCT a), COUNT(DISTINCT a) FROM t1 WHERE a > 1;
+SUM(DISTINCT a) AVG(DISTINCT a) COUNT(DISTINCT a)
+5 2.5000 2
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "sum(distinct t1.a)",
+ "aggregator_type": "simple"
+ },
+ {
+ "function": "avg(distinct t1.a)",
+ "aggregator_type": "simple"
+ },
+ {
+ "function": "count(distinct t1.a)",
+ "aggregator_type": "simple"
+ }
+]
+# Optimization is not applied 'cause function argument is not a field
+# (aggregator=distinct):
+SELECT SUM(DISTINCT a + b) FROM t1;
+SUM(DISTINCT a + b)
+9
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "sum(distinct t1.a + t1.b)",
+ "aggregator_type": "distinct"
+ }
+]
+SELECT COUNT(DISTINCT b) FROM t1;
+COUNT(DISTINCT b)
+1
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.b)",
+ "aggregator_type": "distinct"
+ }
+]
+SELECT AVG(DISTINCT b / a) FROM t1;
+AVG(DISTINCT b / a)
+0.61110000
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "avg(distinct t1.b / t1.a)",
+ "aggregator_type": "distinct"
+ }
+]
+EXPLAIN SELECT COUNT(DISTINCT (SELECT a)) FROM t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 index NULL PRIMARY 4 NULL 3 Using index
+2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct (/* select#2 */ select t1.a))",
+ "aggregator_type": "distinct"
+ }
+]
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 VALUES (1), (2);
+# Optimization is not applied 'cause there is more than one table
+SELECT COUNT(DISTINCT t1.a) FROM t1, t2;
+COUNT(DISTINCT t1.a)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.a)",
+ "aggregator_type": "distinct"
+ }
+]
+SELECT AVG(DISTINCT t1.a) FROM t1, t2;
+AVG(DISTINCT t1.a)
+2.0000
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "avg(distinct t1.a)",
+ "aggregator_type": "distinct"
+ }
+]
+# Const tables, optimization is applied
+SELECT COUNT(DISTINCT a) FROM t1, (SELECT 1) AS t2;
+COUNT(DISTINCT a)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.a)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT AVG(DISTINCT t1.a) FROM (SELECT 1 AS a) AS t2, t1, (SELECT 2 AS a) AS t3;
+AVG(DISTINCT t1.a)
+2.0000
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "avg(distinct t1.a)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT COUNT(DISTINCT a) FROM t1, (SELECT 1 UNION SELECT 2) AS t2;
+COUNT(DISTINCT a)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.a)",
+ "aggregator_type": "distinct"
+ }
+]
+# Unique index on two columns
+CREATE TABLE t3 (a INT NOT NULL, b INT NOT NULL);
+INSERT INTO t3 VALUES (1,1), (1,2), (1,3), (2,1), (2,2), (3,1), (3,2);
+CREATE UNIQUE INDEX t3_a_b ON t3 (a, b);
+# Optimization is applied:
+SELECT COUNT(DISTINCT a, b) FROM t3;
+COUNT(DISTINCT a, b)
+7
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t3.a,t3.b)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT COUNT(DISTINCT b, a) FROM t3;
+COUNT(DISTINCT b, a)
+7
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t3.b,t3.a)",
+ "aggregator_type": "simple"
+ }
+]
+SELECT COUNT(DISTINCT b, a) FROM t3 WHERE a < 3;
+COUNT(DISTINCT b, a)
+5
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t3.b,t3.a)",
+ "aggregator_type": "simple"
+ }
+]
+# Optimization is applied to one of the functions:
+SELECT COUNT(DISTINCT b), SUM(DISTINCT a), SUM(DISTINCT a + b) FROM t3 GROUP BY a;
+COUNT(DISTINCT b) SUM(DISTINCT a) SUM(DISTINCT a + b)
+3 1 9
+2 2 7
+2 3 9
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t3.b)",
+ "aggregator_type": "simple"
+ },
+ {
+ "function": "sum(distinct t3.a)",
+ "aggregator_type": "distinct"
+ },
+ {
+ "function": "sum(distinct t3.a + t3.b)",
+ "aggregator_type": "distinct"
+ }
+]
+# Can't apply optimization 'cause GROUP BY argument is not a field:
+SELECT COUNT(DISTINCT b) FROM t3 GROUP BY a+b;
+COUNT(DISTINCT b)
+1
+2
+3
+1
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t3.b)",
+ "aggregator_type": "distinct"
+ }
+]
+# Test merged view
+CREATE VIEW v1 AS SELECT * FROM t1;
+# Optimization is applied
+SELECT COUNT(DISTINCT a, b) FROM v1;
+COUNT(DISTINCT a, b)
+3
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "count(distinct t1.a,t1.b)",
+ "aggregator_type": "simple"
+ }
+]
+# GROUP_CONCAT implements non-standard distinct aggregator
+SELECT GROUP_CONCAT(b) FROM t1;
+GROUP_CONCAT(b)
+1,1,1
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "group_concat(t1.b separator ',')",
+ "aggregator_type": "simple"
+ }
+]
+SELECT GROUP_CONCAT(DISTINCT b) FROM t1;
+GROUP_CONCAT(DISTINCT b)
+1
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '$**.prepare_sum_aggregators')) AS JS
+FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+JS
+[
+ {
+ "function": "group_concat(distinct t1.b separator ',')",
+ "aggregator_type": "distinct"
+ }
+]
+DROP TABLE t1, t2, t3;
+DROP VIEW v1;
+SET optimizer_trace = @save_optimizer_trace;
+#
+# end of 10.5 tests
+#
diff --git a/mysql-test/main/distinct_notembedded.test b/mysql-test/main/distinct_notembedded.test
new file mode 100644
index 00000000..9ef2f459
--- /dev/null
+++ b/mysql-test/main/distinct_notembedded.test
@@ -0,0 +1,109 @@
+# Embedded doesn't have optimizer trace:
+--source include/not_embedded.inc
+--source include/have_sequence.inc
+
+--echo #
+--echo # MDEV-30660 COUNT DISTINCT seems unnecessarily slow when run on a PK
+--echo #
+
+set @save_optimizer_trace = @@optimizer_trace;
+SET optimizer_trace='enabled=on';
+let $trace=
+SELECT JSON_DETAILED(JSON_EXTRACT(trace, '\$**.prepare_sum_aggregators')) AS JS
+ FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT NOT NULL);
+INSERT INTO t1 VALUES (1,1), (2,1), (3,1);
+
+--echo # Optimization is applied (aggregator=simple):
+SELECT COUNT(DISTINCT a) FROM t1;
+eval $trace;
+
+SELECT AVG(DISTINCT a), SUM(DISTINCT b) FROM t1;
+eval $trace;
+
+--echo # Only `a` is unique but it's enough to eliminate DISTINCT:
+SELECT COUNT(DISTINCT b, a) FROM t1;
+eval $trace;
+
+SELECT COUNT(DISTINCT a, a + b) FROM t1;
+eval $trace;
+
+SELECT SUM(DISTINCT a), AVG(DISTINCT a), COUNT(DISTINCT a) FROM t1 WHERE a > 1;
+eval $trace;
+
+--echo # Optimization is not applied 'cause function argument is not a field
+--echo # (aggregator=distinct):
+SELECT SUM(DISTINCT a + b) FROM t1;
+eval $trace;
+
+SELECT COUNT(DISTINCT b) FROM t1;
+eval $trace;
+
+SELECT AVG(DISTINCT b / a) FROM t1;
+eval $trace;
+
+EXPLAIN SELECT COUNT(DISTINCT (SELECT a)) FROM t1;
+eval $trace;
+
+CREATE TABLE t2 (a INT);
+INSERT INTO t2 VALUES (1), (2);
+
+--echo # Optimization is not applied 'cause there is more than one table
+SELECT COUNT(DISTINCT t1.a) FROM t1, t2;
+eval $trace;
+
+SELECT AVG(DISTINCT t1.a) FROM t1, t2;
+eval $trace;
+
+--echo # Const tables, optimization is applied
+SELECT COUNT(DISTINCT a) FROM t1, (SELECT 1) AS t2;
+eval $trace;
+
+SELECT AVG(DISTINCT t1.a) FROM (SELECT 1 AS a) AS t2, t1, (SELECT 2 AS a) AS t3;
+eval $trace;
+
+SELECT COUNT(DISTINCT a) FROM t1, (SELECT 1 UNION SELECT 2) AS t2;
+eval $trace;
+
+--echo # Unique index on two columns
+CREATE TABLE t3 (a INT NOT NULL, b INT NOT NULL);
+INSERT INTO t3 VALUES (1,1), (1,2), (1,3), (2,1), (2,2), (3,1), (3,2);
+CREATE UNIQUE INDEX t3_a_b ON t3 (a, b);
+--echo # Optimization is applied:
+SELECT COUNT(DISTINCT a, b) FROM t3;
+eval $trace;
+
+SELECT COUNT(DISTINCT b, a) FROM t3;
+eval $trace;
+
+SELECT COUNT(DISTINCT b, a) FROM t3 WHERE a < 3;
+eval $trace;
+
+--echo # Optimization is applied to one of the functions:
+SELECT COUNT(DISTINCT b), SUM(DISTINCT a), SUM(DISTINCT a + b) FROM t3 GROUP BY a;
+eval $trace;
+
+--echo # Can't apply optimization 'cause GROUP BY argument is not a field:
+SELECT COUNT(DISTINCT b) FROM t3 GROUP BY a+b;
+eval $trace;
+
+--echo # Test merged view
+CREATE VIEW v1 AS SELECT * FROM t1;
+--echo # Optimization is applied
+SELECT COUNT(DISTINCT a, b) FROM v1;
+eval $trace;
+
+--echo # GROUP_CONCAT implements non-standard distinct aggregator
+SELECT GROUP_CONCAT(b) FROM t1;
+eval $trace;
+
+SELECT GROUP_CONCAT(DISTINCT b) FROM t1;
+eval $trace;
+
+DROP TABLE t1, t2, t3;
+DROP VIEW v1;
+SET optimizer_trace = @save_optimizer_trace;
+--echo #
+--echo # end of 10.5 tests
+--echo #
diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result
index 88cec1c5..64ce60b4 100644
--- a/mysql-test/main/dyncol.result
+++ b/mysql-test/main/dyncol.result
@@ -150,7 +150,7 @@ select hex(COLUMN_CREATE(1, "afaf" AS char character set utf8,
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
Warnings:
-Note 1003 select hex(column_create(1,'afaf' AS char charset utf8mb3 ,2,1212 AS unsigned int,3,1212 AS int,4,12.12 AS double,4 + 1,12.12 AS decimal,6,'2011-04-05' AS date,7,'- 0:45:49.000001' AS time,8,'2011-04-05 0:45:49.000001' AS datetime)) AS `ex`
+Note 1003 select hex(column_create(1,'afaf' AS char charset utf8mb3 collate utf8mb3_general_ci ,2,1212 AS unsigned int,3,1212 AS int,4,12.12 AS double,4 + 1,12.12 AS decimal,6,'2011-04-05' AS date,7,'- 0:45:49.000001' AS time,8,'2011-04-05 0:45:49.000001' AS datetime)) AS `ex`
select hex(column_create(1, 0.0 AS decimal));
hex(column_create(1, 0.0 AS decimal))
000100010004
@@ -354,7 +354,7 @@ select column_get(column_create(1, "1212" AS char charset utf8), 1 as char chars
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
Warnings:
-Note 1003 select column_get(column_create(1,'1212' AS char charset utf8mb3 ),1 as char charset utf8mb3) AS `ex`
+Note 1003 select column_get(column_create(1,'1212' AS char charset utf8mb3 collate utf8mb3_general_ci ),1 as char charset utf8mb3) AS `ex`
select column_get(column_create(1, 1212 AS unsigned int), 1 as char charset utf8) as ex;
ex
1212
@@ -414,7 +414,7 @@ select column_get(column_create(1, "1212" AS char charset utf8), 1 as char chars
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
Warnings:
-Note 1003 select column_get(column_create(1,'1212' AS char charset utf8mb3 ),1 as char charset binary) AS `ex`
+Note 1003 select column_get(column_create(1,'1212' AS char charset utf8mb3 collate utf8mb3_general_ci ),1 as char charset binary) AS `ex`
#
# column get real
#
@@ -1882,7 +1882,7 @@ drop table t1;
create view v1 as select column_get(column_add(column_create(1 , 'blue' as char), 2, 'ttt'), 1 as char);
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 column_get(column_add(column_create(1,'blue' AS char charset utf8mb3 ),2,'ttt'),1 as char charset utf8mb3) AS `Name_exp_1` utf8mb3 utf8mb3_general_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select column_get(column_add(column_create(1,'blue' AS char charset utf8mb3 collate utf8mb3_general_ci ),2,'ttt'),1 as char charset utf8mb3) AS `Name_exp_1` utf8mb3 utf8mb3_general_ci
select * from v1;
Name_exp_1
blue
@@ -1949,3 +1949,23 @@ ex
#
# End of 10.4 tests
#
+#
+# Start of 10.5 tests
+#
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-33788 HEX(COLUMN_CREATE(.. AS CHAR ...)) fails with --view-protocol
+#
+SELECT hex(column_create(1,'a' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin)) AS ex;
+ex
+0001000100035361
+SELECT hex(column_add(column_create(
+1, 'a' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin),
+2, 'b' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci)) AS ex;
+ex
+00020001000302001353612162
+#
+# Start of 10.5 tests
+#
diff --git a/mysql-test/main/dyncol.test b/mysql-test/main/dyncol.test
index 8b316421..1343025d 100644
--- a/mysql-test/main/dyncol.test
+++ b/mysql-test/main/dyncol.test
@@ -1000,3 +1000,24 @@ SELECT HEX(COLUMN_ADD(COLUMN_CREATE(1,10),2,NULL,1,NULL)) as ex;
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-33788 HEX(COLUMN_CREATE(.. AS CHAR ...)) fails with --view-protocol
+--echo #
+
+SELECT hex(column_create(1,'a' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin)) AS ex;
+SELECT hex(column_add(column_create(
+ 1, 'a' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_bin),
+ 2, 'b' AS CHAR CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci)) AS ex;
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
diff --git a/mysql-test/main/empty_server_name-8224.test b/mysql-test/main/empty_server_name-8224.test
index 5c5140be..31760713 100644
--- a/mysql-test/main/empty_server_name-8224.test
+++ b/mysql-test/main/empty_server_name-8224.test
@@ -3,10 +3,10 @@
#
--source include/not_embedded.inc
create server '' foreign data wrapper w2 options (host '127.0.0.1');
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- enable_reconnect
-- source include/wait_until_connected_again.inc
diff --git a/mysql-test/main/empty_string_literal.result b/mysql-test/main/empty_string_literal.result
index 732e8e6d..447bad8a 100644
--- a/mysql-test/main/empty_string_literal.result
+++ b/mysql-test/main/empty_string_literal.result
@@ -64,7 +64,7 @@ SET sql_mode=@mode;
# Test litteral concat
#
SELECT 'a' 'b';
-a
+ab
ab
SELECT 'a' '';
a
@@ -76,13 +76,13 @@ SELECT '' '';
NULL
NULL
SELECT '' 'b' 'c';
-b
+bc
bc
SELECT '' '' 'c';
c
c
SELECT 'a' '' 'c';
-a
+ac
ac
SELECT 'a' '' '';
a
@@ -208,3 +208,23 @@ t1 CREATE TABLE `t1` (
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
+set sql_mode= default;
+#
+# MDEV-33460 select '123' 'x'; unexpected result
+#
+SELECT '';
+
+
+SELECT '' 'b' 'c';
+bc
+bc
+SELECT '' '' 'c';
+c
+c
+SELECT 'a' '' 'c';
+ac
+ac
+SELECT 'a' '' '';
+a
+a
+# End of 10.5 test
diff --git a/mysql-test/main/empty_string_literal.test b/mysql-test/main/empty_string_literal.test
index 9174a771..e3ae0094 100644
--- a/mysql-test/main/empty_string_literal.test
+++ b/mysql-test/main/empty_string_literal.test
@@ -25,3 +25,18 @@ flush tables;
update t1 set a = 2;
show create table t1;
drop table t1;
+set sql_mode= default;
+
+--echo #
+--echo # MDEV-33460 select '123' 'x'; unexpected result
+--echo #
+
+--disable_view_protocol
+SELECT '';
+--enable_view_protocol
+SELECT '' 'b' 'c';
+SELECT '' '' 'c';
+SELECT 'a' '' 'c';
+SELECT 'a' '' '';
+
+--echo # End of 10.5 test
diff --git a/mysql-test/main/func_encrypt_nossl.result b/mysql-test/main/func_encrypt_nossl.result
index b28d4811..7afc9fa6 100644
--- a/mysql-test/main/func_encrypt_nossl.result
+++ b/mysql-test/main/func_encrypt_nossl.result
@@ -3,56 +3,56 @@ des_encrypt("test", 'akeystr')
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_encrypt("test", 1);
des_encrypt("test", 1)
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_encrypt("test", 9);
des_encrypt("test", 9)
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_encrypt("test", 100);
des_encrypt("test", 100)
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_encrypt("test", NULL);
des_encrypt("test", NULL)
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_encrypt(NULL, NULL);
des_encrypt(NULL, NULL)
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt("test", 'anotherkeystr');
des_decrypt("test", 'anotherkeystr')
NULL
Warnings:
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt(1, 1);
des_decrypt(1, 1)
NULL
Warnings:
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt(des_encrypt("test", 'thekey'));
des_decrypt(des_encrypt("test", 'thekey'))
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello"))
NULL NULL
@@ -60,22 +60,22 @@ Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt(des_encrypt("hello",4));
des_decrypt(des_encrypt("hello",4))
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt(des_encrypt("hello",'test'),'test');
des_decrypt(des_encrypt("hello",'test'),'test')
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password'))
NULL NULL NULL
@@ -83,28 +83,28 @@ Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
-Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
+Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt(des_encrypt("hello"),'default_password');
des_decrypt(des_encrypt("hello"),'default_password')
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select des_decrypt(des_encrypt("hello",4),'password4');
des_decrypt(des_encrypt("hello",4),'password4')
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
SET @a=des_decrypt(des_encrypt("hello"));
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
flush des_key_file;
select @a = des_decrypt(des_encrypt("hello"));
@a = des_decrypt(des_encrypt("hello"))
@@ -121,11 +121,11 @@ NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
select hex(des_decrypt(des_encrypt("hello","hidden")));
hex(des_decrypt(des_encrypt("hello","hidden")))
NULL
Warnings:
Note 1287 'des_encrypt' is deprecated and will be removed in a future release
Note 1287 'des_decrypt' is deprecated and will be removed in a future release
-Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with '--with-ssl' to have it working
+Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
diff --git a/mysql-test/main/func_extract.result b/mysql-test/main/func_extract.result
index bebb8c71..dc71f6ae 100644
--- a/mysql-test/main/func_extract.result
+++ b/mysql-test/main/func_extract.result
@@ -590,3 +590,885 @@ 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;
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-33496 Out of range error in AVG(YEAR(datetime)) due to a wrong data type
+#
+CREATE FUNCTION select01() RETURNS TEXT RETURN 'SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?';
+CREATE FUNCTION select02() RETURNS TEXT RETURN 'SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)';
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('2001-12-31 10:20:30.999999');
+CREATE FUNCTION params(expr TEXT, count INT) RETURNS TEXT
+BEGIN
+RETURN CONCAT(expr, REPEAT(CONCAT(', ', expr), count-1));
+END;
+$$
+CREATE PROCEDURE show_drop()
+BEGIN
+SELECT TABLE_NAME, COLUMN_TYPE, COLUMN_NAME
+FROM INFORMATION_SCHEMA.COLUMNS
+WHERE TABLE_SCHEMA='test'
+ AND TABLE_NAME IN ('t1e_nm','t2e_nm','t1f_nm','t2f_nm',
+'t1e_ps','t1f_ps','t2e_ps','t2f_ps')
+ORDER BY LEFT(TABLE_NAME, 2), ORDINAL_POSITION, TABLE_NAME;
+FOR rec IN (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_SCHEMA='test'
+ AND TABLE_NAME IN ('t1e_nm','t2e_nm','t1f_nm','t2f_nm',
+'t1e_ps','t1f_ps','t2e_ps','t2f_ps'))
+DO
+EXECUTE IMMEDIATE CONCAT('DROP TABLE ', rec.TABLE_NAME);
+END FOR;
+END;
+$$
+CREATE PROCEDURE p1(unit VARCHAR(32))
+BEGIN
+DECLARE do_extract BOOL DEFAULT unit NOT IN('DAYOFYEAR');
+DECLARE query01 TEXT DEFAULT
+CONCAT('CREATE TABLE t2 AS ', select01(), ' FROM t1');
+DECLARE query02 TEXT DEFAULT
+CONCAT('CREATE TABLE t2 AS ', select02(), ' FROM t1');
+IF (do_extract)
+THEN
+EXECUTE IMMEDIATE REPLACE(REPLACE(query01,'t2','t1e_nm'),'?', CONCAT('EXTRACT(',unit,' FROM a)'));
+EXECUTE IMMEDIATE REPLACE(REPLACE(query02,'t2','t2e_nm'),'?', CONCAT('EXTRACT(',unit,' FROM a)'));
+END IF;
+EXECUTE IMMEDIATE REPLACE(REPLACE(query01,'t2','t1f_nm'),'?', CONCAT(unit,'(a)'));
+EXECUTE IMMEDIATE REPLACE(REPLACE(query02,'t2','t2f_nm'),'?', CONCAT(unit,'(a)'));
+END;
+$$
+
+
+# EXTRACT(YEAR FROM expr) and YEAR(expr) are equivalent
+CALL p1('YEAR');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(YEAR FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), YEAR(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(5) EXTRACT(YEAR FROM a)
+t1e_ps int(5) ?
+t1f_nm int(5) YEAR(a)
+t1f_ps int(5) ?
+t1e_nm int(4) unsigned CAST(EXTRACT(YEAR FROM a) AS UNSIGNED)
+t1e_ps int(4) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(4) unsigned CAST(YEAR(a) AS UNSIGNED)
+t1f_ps int(4) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(5) CAST(EXTRACT(YEAR FROM a) AS SIGNED)
+t1e_ps int(5) CAST(? AS SIGNED)
+t1f_nm int(5) CAST(YEAR(a) AS SIGNED)
+t1f_ps int(5) CAST(? AS SIGNED)
+t1e_nm int(5) ABS(EXTRACT(YEAR FROM a))
+t1e_ps int(5) ABS(?)
+t1f_nm int(5) ABS(YEAR(a))
+t1f_ps int(5) ABS(?)
+t1e_nm int(5) ROUND(EXTRACT(YEAR FROM a))
+t1e_ps int(5) ROUND(?)
+t1f_nm int(5) ROUND(YEAR(a))
+t1f_ps int(5) ROUND(?)
+t1e_nm int(5) -EXTRACT(YEAR FROM a)
+t1e_ps int(5) -?
+t1f_nm int(5) -YEAR(a)
+t1f_ps int(5) -?
+t1e_nm int(6) ROUND(EXTRACT(YEAR FROM a),-1)
+t1e_ps int(6) ROUND(?,-1)
+t1f_nm int(6) ROUND(YEAR(a),-1)
+t1f_ps int(6) ROUND(?,-1)
+t1e_nm int(6) EXTRACT(YEAR FROM a)+0
+t1e_ps int(6) ?+0
+t1f_nm int(6) YEAR(a)+0
+t1f_ps int(6) ?+0
+t1e_nm decimal(6,1) EXTRACT(YEAR FROM a)+0.0
+t1e_ps decimal(6,1) ?+0.0
+t1f_nm decimal(6,1) YEAR(a)+0.0
+t1f_ps decimal(6,1) ?+0.0
+t1e_nm varchar(4) CONCAT(EXTRACT(YEAR FROM a))
+t1e_ps varchar(4) CONCAT(?)
+t1f_nm varchar(4) CONCAT(YEAR(a))
+t1f_ps varchar(4) CONCAT(?)
+t1e_nm int(5) LEAST(EXTRACT(YEAR FROM a),EXTRACT(YEAR FROM a))
+t1e_ps int(5) LEAST(?,?)
+t1f_nm int(5) LEAST(YEAR(a),YEAR(a))
+t1f_ps int(5) LEAST(?,?)
+t1e_nm int(5) COALESCE(EXTRACT(YEAR FROM a))
+t1e_ps int(5) COALESCE(?)
+t1f_nm int(5) COALESCE(YEAR(a))
+t1f_ps int(5) COALESCE(?)
+t1e_nm int(5) COALESCE(EXTRACT(YEAR FROM a),CAST(1 AS SIGNED))
+t1e_ps int(5) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(5) COALESCE(YEAR(a),CAST(1 AS SIGNED))
+t1f_ps int(5) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(4,0) COALESCE(EXTRACT(YEAR FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(4,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(4,0) COALESCE(YEAR(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(4,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(5) @a:=EXTRACT(YEAR FROM a)
+t1e_ps int(5) @a:=?
+t1f_nm int(5) @a:=YEAR(a)
+t1f_ps int(5) @a:=?
+t2e_nm decimal(8,4) AVG(EXTRACT(YEAR FROM a))
+t2e_ps decimal(8,4) AVG(?)
+t2f_nm decimal(8,4) AVG(YEAR(a))
+t2f_ps decimal(8,4) AVG(?)
+t2e_nm bigint(5) MIN(EXTRACT(YEAR FROM a))
+t2e_ps bigint(5) MIN(?)
+t2f_nm bigint(5) MIN(YEAR(a))
+t2f_ps bigint(5) MIN(?)
+t2e_nm bigint(5) MAX(EXTRACT(YEAR FROM a))
+t2e_ps bigint(5) MAX(?)
+t2f_nm bigint(5) MAX(YEAR(a))
+t2f_ps bigint(5) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(YEAR FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(YEAR(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(QUARTER FROM expr) and QUARTER(expr) are equavalent
+CALL p1('QUARTER');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(QUARTER FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999'), QUARTER(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(2) EXTRACT(QUARTER FROM a)
+t1e_ps int(2) ?
+t1f_nm int(2) QUARTER(a)
+t1f_ps int(2) ?
+t1e_nm int(1) unsigned CAST(EXTRACT(QUARTER FROM a) AS UNSIGNED)
+t1e_ps int(1) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(1) unsigned CAST(QUARTER(a) AS UNSIGNED)
+t1f_ps int(1) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(2) CAST(EXTRACT(QUARTER FROM a) AS SIGNED)
+t1e_ps int(2) CAST(? AS SIGNED)
+t1f_nm int(2) CAST(QUARTER(a) AS SIGNED)
+t1f_ps int(2) CAST(? AS SIGNED)
+t1e_nm int(2) ABS(EXTRACT(QUARTER FROM a))
+t1e_ps int(2) ABS(?)
+t1f_nm int(2) ABS(QUARTER(a))
+t1f_ps int(2) ABS(?)
+t1e_nm int(2) ROUND(EXTRACT(QUARTER FROM a))
+t1e_ps int(2) ROUND(?)
+t1f_nm int(2) ROUND(QUARTER(a))
+t1f_ps int(2) ROUND(?)
+t1e_nm int(2) -EXTRACT(QUARTER FROM a)
+t1e_ps int(2) -?
+t1f_nm int(2) -QUARTER(a)
+t1f_ps int(2) -?
+t1e_nm int(3) ROUND(EXTRACT(QUARTER FROM a),-1)
+t1e_ps int(3) ROUND(?,-1)
+t1f_nm int(3) ROUND(QUARTER(a),-1)
+t1f_ps int(3) ROUND(?,-1)
+t1e_nm int(3) EXTRACT(QUARTER FROM a)+0
+t1e_ps int(3) ?+0
+t1f_nm int(3) QUARTER(a)+0
+t1f_ps int(3) ?+0
+t1e_nm decimal(3,1) EXTRACT(QUARTER FROM a)+0.0
+t1e_ps decimal(3,1) ?+0.0
+t1f_nm decimal(3,1) QUARTER(a)+0.0
+t1f_ps decimal(3,1) ?+0.0
+t1e_nm varchar(1) CONCAT(EXTRACT(QUARTER FROM a))
+t1e_ps varchar(1) CONCAT(?)
+t1f_nm varchar(1) CONCAT(QUARTER(a))
+t1f_ps varchar(1) CONCAT(?)
+t1e_nm int(2) LEAST(EXTRACT(QUARTER FROM a),EXTRACT(QUARTER FROM a))
+t1e_ps int(2) LEAST(?,?)
+t1f_nm int(2) LEAST(QUARTER(a),QUARTER(a))
+t1f_ps int(2) LEAST(?,?)
+t1e_nm int(2) COALESCE(EXTRACT(QUARTER FROM a))
+t1e_ps int(2) COALESCE(?)
+t1f_nm int(2) COALESCE(QUARTER(a))
+t1f_ps int(2) COALESCE(?)
+t1e_nm int(2) COALESCE(EXTRACT(QUARTER FROM a),CAST(1 AS SIGNED))
+t1e_ps int(2) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(2) COALESCE(QUARTER(a),CAST(1 AS SIGNED))
+t1f_ps int(2) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(1,0) COALESCE(EXTRACT(QUARTER FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(1,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(1,0) COALESCE(QUARTER(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(1,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(2) @a:=EXTRACT(QUARTER FROM a)
+t1e_ps int(2) @a:=?
+t1f_nm int(2) @a:=QUARTER(a)
+t1f_ps int(2) @a:=?
+t2e_nm decimal(5,4) AVG(EXTRACT(QUARTER FROM a))
+t2e_ps decimal(5,4) AVG(?)
+t2f_nm decimal(5,4) AVG(QUARTER(a))
+t2f_ps decimal(5,4) AVG(?)
+t2e_nm bigint(2) MIN(EXTRACT(QUARTER FROM a))
+t2e_ps bigint(2) MIN(?)
+t2f_nm bigint(2) MIN(QUARTER(a))
+t2f_ps bigint(2) MIN(?)
+t2e_nm bigint(2) MAX(EXTRACT(QUARTER FROM a))
+t2e_ps bigint(2) MAX(?)
+t2f_nm bigint(2) MAX(QUARTER(a))
+t2f_ps bigint(2) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(QUARTER FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(QUARTER(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(MONTH FROM expr) and MONTH(expr) are equavalent
+CALL p1('MONTH');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MONTH FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999'), MONTH(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(3) EXTRACT(MONTH FROM a)
+t1e_ps int(3) ?
+t1f_nm int(3) MONTH(a)
+t1f_ps int(3) ?
+t1e_nm int(2) unsigned CAST(EXTRACT(MONTH FROM a) AS UNSIGNED)
+t1e_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(2) unsigned CAST(MONTH(a) AS UNSIGNED)
+t1f_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(3) CAST(EXTRACT(MONTH FROM a) AS SIGNED)
+t1e_ps int(3) CAST(? AS SIGNED)
+t1f_nm int(3) CAST(MONTH(a) AS SIGNED)
+t1f_ps int(3) CAST(? AS SIGNED)
+t1e_nm int(3) ABS(EXTRACT(MONTH FROM a))
+t1e_ps int(3) ABS(?)
+t1f_nm int(3) ABS(MONTH(a))
+t1f_ps int(3) ABS(?)
+t1e_nm int(3) ROUND(EXTRACT(MONTH FROM a))
+t1e_ps int(3) ROUND(?)
+t1f_nm int(3) ROUND(MONTH(a))
+t1f_ps int(3) ROUND(?)
+t1e_nm int(3) -EXTRACT(MONTH FROM a)
+t1e_ps int(3) -?
+t1f_nm int(3) -MONTH(a)
+t1f_ps int(3) -?
+t1e_nm int(4) ROUND(EXTRACT(MONTH FROM a),-1)
+t1e_ps int(4) ROUND(?,-1)
+t1f_nm int(4) ROUND(MONTH(a),-1)
+t1f_ps int(4) ROUND(?,-1)
+t1e_nm int(4) EXTRACT(MONTH FROM a)+0
+t1e_ps int(4) ?+0
+t1f_nm int(4) MONTH(a)+0
+t1f_ps int(4) ?+0
+t1e_nm decimal(4,1) EXTRACT(MONTH FROM a)+0.0
+t1e_ps decimal(4,1) ?+0.0
+t1f_nm decimal(4,1) MONTH(a)+0.0
+t1f_ps decimal(4,1) ?+0.0
+t1e_nm varchar(2) CONCAT(EXTRACT(MONTH FROM a))
+t1e_ps varchar(2) CONCAT(?)
+t1f_nm varchar(2) CONCAT(MONTH(a))
+t1f_ps varchar(2) CONCAT(?)
+t1e_nm int(3) LEAST(EXTRACT(MONTH FROM a),EXTRACT(MONTH FROM a))
+t1e_ps int(3) LEAST(?,?)
+t1f_nm int(3) LEAST(MONTH(a),MONTH(a))
+t1f_ps int(3) LEAST(?,?)
+t1e_nm int(3) COALESCE(EXTRACT(MONTH FROM a))
+t1e_ps int(3) COALESCE(?)
+t1f_nm int(3) COALESCE(MONTH(a))
+t1f_ps int(3) COALESCE(?)
+t1e_nm int(3) COALESCE(EXTRACT(MONTH FROM a),CAST(1 AS SIGNED))
+t1e_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(3) COALESCE(MONTH(a),CAST(1 AS SIGNED))
+t1f_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(2,0) COALESCE(EXTRACT(MONTH FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(2,0) COALESCE(MONTH(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(3) @a:=EXTRACT(MONTH FROM a)
+t1e_ps int(3) @a:=?
+t1f_nm int(3) @a:=MONTH(a)
+t1f_ps int(3) @a:=?
+t2e_nm decimal(6,4) AVG(EXTRACT(MONTH FROM a))
+t2e_ps decimal(6,4) AVG(?)
+t2f_nm decimal(6,4) AVG(MONTH(a))
+t2f_ps decimal(6,4) AVG(?)
+t2e_nm bigint(3) MIN(EXTRACT(MONTH FROM a))
+t2e_ps bigint(3) MIN(?)
+t2f_nm bigint(3) MIN(MONTH(a))
+t2f_ps bigint(3) MIN(?)
+t2e_nm bigint(3) MAX(EXTRACT(MONTH FROM a))
+t2e_ps bigint(3) MAX(?)
+t2f_nm bigint(3) MAX(MONTH(a))
+t2f_ps bigint(3) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(MONTH FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(MONTH(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(WEEK FROM expr) and WEEK(expr) are equavalent
+CALL p1('WEEK');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(WEEK FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999'), WEEK(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(3) EXTRACT(WEEK FROM a)
+t1e_ps int(3) ?
+t1f_nm int(3) WEEK(a)
+t1f_ps int(3) ?
+t1e_nm int(2) unsigned CAST(EXTRACT(WEEK FROM a) AS UNSIGNED)
+t1e_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(2) unsigned CAST(WEEK(a) AS UNSIGNED)
+t1f_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(3) CAST(EXTRACT(WEEK FROM a) AS SIGNED)
+t1e_ps int(3) CAST(? AS SIGNED)
+t1f_nm int(3) CAST(WEEK(a) AS SIGNED)
+t1f_ps int(3) CAST(? AS SIGNED)
+t1e_nm int(3) ABS(EXTRACT(WEEK FROM a))
+t1e_ps int(3) ABS(?)
+t1f_nm int(3) ABS(WEEK(a))
+t1f_ps int(3) ABS(?)
+t1e_nm int(3) ROUND(EXTRACT(WEEK FROM a))
+t1e_ps int(3) ROUND(?)
+t1f_nm int(3) ROUND(WEEK(a))
+t1f_ps int(3) ROUND(?)
+t1e_nm int(3) -EXTRACT(WEEK FROM a)
+t1e_ps int(3) -?
+t1f_nm int(3) -WEEK(a)
+t1f_ps int(3) -?
+t1e_nm int(4) ROUND(EXTRACT(WEEK FROM a),-1)
+t1e_ps int(4) ROUND(?,-1)
+t1f_nm int(4) ROUND(WEEK(a),-1)
+t1f_ps int(4) ROUND(?,-1)
+t1e_nm int(4) EXTRACT(WEEK FROM a)+0
+t1e_ps int(4) ?+0
+t1f_nm int(4) WEEK(a)+0
+t1f_ps int(4) ?+0
+t1e_nm decimal(4,1) EXTRACT(WEEK FROM a)+0.0
+t1e_ps decimal(4,1) ?+0.0
+t1f_nm decimal(4,1) WEEK(a)+0.0
+t1f_ps decimal(4,1) ?+0.0
+t1e_nm varchar(2) CONCAT(EXTRACT(WEEK FROM a))
+t1e_ps varchar(2) CONCAT(?)
+t1f_nm varchar(2) CONCAT(WEEK(a))
+t1f_ps varchar(2) CONCAT(?)
+t1e_nm int(3) LEAST(EXTRACT(WEEK FROM a),EXTRACT(WEEK FROM a))
+t1e_ps int(3) LEAST(?,?)
+t1f_nm int(3) LEAST(WEEK(a),WEEK(a))
+t1f_ps int(3) LEAST(?,?)
+t1e_nm int(3) COALESCE(EXTRACT(WEEK FROM a))
+t1e_ps int(3) COALESCE(?)
+t1f_nm int(3) COALESCE(WEEK(a))
+t1f_ps int(3) COALESCE(?)
+t1e_nm int(3) COALESCE(EXTRACT(WEEK FROM a),CAST(1 AS SIGNED))
+t1e_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(3) COALESCE(WEEK(a),CAST(1 AS SIGNED))
+t1f_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(2,0) COALESCE(EXTRACT(WEEK FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(2,0) COALESCE(WEEK(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(3) @a:=EXTRACT(WEEK FROM a)
+t1e_ps int(3) @a:=?
+t1f_nm int(3) @a:=WEEK(a)
+t1f_ps int(3) @a:=?
+t2e_nm decimal(6,4) AVG(EXTRACT(WEEK FROM a))
+t2e_ps decimal(6,4) AVG(?)
+t2f_nm decimal(6,4) AVG(WEEK(a))
+t2f_ps decimal(6,4) AVG(?)
+t2e_nm bigint(3) MIN(EXTRACT(WEEK FROM a))
+t2e_ps bigint(3) MIN(?)
+t2f_nm bigint(3) MIN(WEEK(a))
+t2f_ps bigint(3) MIN(?)
+t2e_nm bigint(3) MAX(EXTRACT(WEEK FROM a))
+t2e_ps bigint(3) MAX(?)
+t2f_nm bigint(3) MAX(WEEK(a))
+t2f_ps bigint(3) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(WEEK FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(WEEK(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(DAY FROM expr) returns hours/24 and includes the sign for TIME
+# DAY(expr) returns the DD part of CAST(expr AS DATETIME)
+CALL p1('DAY');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(DAY FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999'), DAY(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(3) EXTRACT(DAY FROM a)
+t1e_ps int(3) ?
+t1f_nm int(3) DAY(a)
+t1f_ps int(3) ?
+t1e_nm bigint(20) unsigned CAST(EXTRACT(DAY FROM a) AS UNSIGNED)
+t1e_ps bigint(20) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(2) unsigned CAST(DAY(a) AS UNSIGNED)
+t1f_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(3) CAST(EXTRACT(DAY FROM a) AS SIGNED)
+t1e_ps int(3) CAST(? AS SIGNED)
+t1f_nm int(3) CAST(DAY(a) AS SIGNED)
+t1f_ps int(3) CAST(? AS SIGNED)
+t1e_nm int(3) ABS(EXTRACT(DAY FROM a))
+t1e_ps int(3) ABS(?)
+t1f_nm int(3) ABS(DAY(a))
+t1f_ps int(3) ABS(?)
+t1e_nm int(3) ROUND(EXTRACT(DAY FROM a))
+t1e_ps int(3) ROUND(?)
+t1f_nm int(3) ROUND(DAY(a))
+t1f_ps int(3) ROUND(?)
+t1e_nm int(4) -EXTRACT(DAY FROM a)
+t1e_ps int(4) -?
+t1f_nm int(3) -DAY(a)
+t1f_ps int(3) -?
+t1e_nm int(4) ROUND(EXTRACT(DAY FROM a),-1)
+t1e_ps int(4) ROUND(?,-1)
+t1f_nm int(4) ROUND(DAY(a),-1)
+t1f_ps int(4) ROUND(?,-1)
+t1e_nm int(4) EXTRACT(DAY FROM a)+0
+t1e_ps int(4) ?+0
+t1f_nm int(4) DAY(a)+0
+t1f_ps int(4) ?+0
+t1e_nm decimal(4,1) EXTRACT(DAY FROM a)+0.0
+t1e_ps decimal(4,1) ?+0.0
+t1f_nm decimal(4,1) DAY(a)+0.0
+t1f_ps decimal(4,1) ?+0.0
+t1e_nm varchar(3) CONCAT(EXTRACT(DAY FROM a))
+t1e_ps varchar(3) CONCAT(?)
+t1f_nm varchar(2) CONCAT(DAY(a))
+t1f_ps varchar(2) CONCAT(?)
+t1e_nm int(3) LEAST(EXTRACT(DAY FROM a),EXTRACT(DAY FROM a))
+t1e_ps int(3) LEAST(?,?)
+t1f_nm int(3) LEAST(DAY(a),DAY(a))
+t1f_ps int(3) LEAST(?,?)
+t1e_nm int(3) COALESCE(EXTRACT(DAY FROM a))
+t1e_ps int(3) COALESCE(?)
+t1f_nm int(3) COALESCE(DAY(a))
+t1f_ps int(3) COALESCE(?)
+t1e_nm int(3) COALESCE(EXTRACT(DAY FROM a),CAST(1 AS SIGNED))
+t1e_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(3) COALESCE(DAY(a),CAST(1 AS SIGNED))
+t1f_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(2,0) COALESCE(EXTRACT(DAY FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(2,0) COALESCE(DAY(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(3) @a:=EXTRACT(DAY FROM a)
+t1e_ps int(3) @a:=?
+t1f_nm int(3) @a:=DAY(a)
+t1f_ps int(3) @a:=?
+t2e_nm decimal(6,4) AVG(EXTRACT(DAY FROM a))
+t2e_ps decimal(6,4) AVG(?)
+t2f_nm decimal(6,4) AVG(DAY(a))
+t2f_ps decimal(6,4) AVG(?)
+t2e_nm bigint(3) MIN(EXTRACT(DAY FROM a))
+t2e_ps bigint(3) MIN(?)
+t2f_nm bigint(3) MIN(DAY(a))
+t2f_ps bigint(3) MIN(?)
+t2e_nm bigint(3) MAX(EXTRACT(DAY FROM a))
+t2e_ps bigint(3) MAX(?)
+t2f_nm bigint(3) MAX(DAY(a))
+t2f_ps bigint(3) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(DAY FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(DAY(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(HOUR FROM expr) returns hours%24 and includes the sign for TIME
+# HOUR(expr) returns the hh part of CAST(expr AS DATETIME)
+CALL p1('HOUR');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(HOUR FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999'), HOUR(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(3) EXTRACT(HOUR FROM a)
+t1e_ps int(3) ?
+t1f_nm int(3) HOUR(a)
+t1f_ps int(3) ?
+t1e_nm bigint(20) unsigned CAST(EXTRACT(HOUR FROM a) AS UNSIGNED)
+t1e_ps bigint(20) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(2) unsigned CAST(HOUR(a) AS UNSIGNED)
+t1f_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(3) CAST(EXTRACT(HOUR FROM a) AS SIGNED)
+t1e_ps int(3) CAST(? AS SIGNED)
+t1f_nm int(3) CAST(HOUR(a) AS SIGNED)
+t1f_ps int(3) CAST(? AS SIGNED)
+t1e_nm int(3) ABS(EXTRACT(HOUR FROM a))
+t1e_ps int(3) ABS(?)
+t1f_nm int(3) ABS(HOUR(a))
+t1f_ps int(3) ABS(?)
+t1e_nm int(3) ROUND(EXTRACT(HOUR FROM a))
+t1e_ps int(3) ROUND(?)
+t1f_nm int(3) ROUND(HOUR(a))
+t1f_ps int(3) ROUND(?)
+t1e_nm int(4) -EXTRACT(HOUR FROM a)
+t1e_ps int(4) -?
+t1f_nm int(3) -HOUR(a)
+t1f_ps int(3) -?
+t1e_nm int(4) ROUND(EXTRACT(HOUR FROM a),-1)
+t1e_ps int(4) ROUND(?,-1)
+t1f_nm int(4) ROUND(HOUR(a),-1)
+t1f_ps int(4) ROUND(?,-1)
+t1e_nm int(4) EXTRACT(HOUR FROM a)+0
+t1e_ps int(4) ?+0
+t1f_nm int(4) HOUR(a)+0
+t1f_ps int(4) ?+0
+t1e_nm decimal(4,1) EXTRACT(HOUR FROM a)+0.0
+t1e_ps decimal(4,1) ?+0.0
+t1f_nm decimal(4,1) HOUR(a)+0.0
+t1f_ps decimal(4,1) ?+0.0
+t1e_nm varchar(3) CONCAT(EXTRACT(HOUR FROM a))
+t1e_ps varchar(3) CONCAT(?)
+t1f_nm varchar(2) CONCAT(HOUR(a))
+t1f_ps varchar(2) CONCAT(?)
+t1e_nm int(3) LEAST(EXTRACT(HOUR FROM a),EXTRACT(HOUR FROM a))
+t1e_ps int(3) LEAST(?,?)
+t1f_nm int(3) LEAST(HOUR(a),HOUR(a))
+t1f_ps int(3) LEAST(?,?)
+t1e_nm int(3) COALESCE(EXTRACT(HOUR FROM a))
+t1e_ps int(3) COALESCE(?)
+t1f_nm int(3) COALESCE(HOUR(a))
+t1f_ps int(3) COALESCE(?)
+t1e_nm int(3) COALESCE(EXTRACT(HOUR FROM a),CAST(1 AS SIGNED))
+t1e_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(3) COALESCE(HOUR(a),CAST(1 AS SIGNED))
+t1f_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(2,0) COALESCE(EXTRACT(HOUR FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(2,0) COALESCE(HOUR(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(3) @a:=EXTRACT(HOUR FROM a)
+t1e_ps int(3) @a:=?
+t1f_nm int(3) @a:=HOUR(a)
+t1f_ps int(3) @a:=?
+t2e_nm decimal(6,4) AVG(EXTRACT(HOUR FROM a))
+t2e_ps decimal(6,4) AVG(?)
+t2f_nm decimal(6,4) AVG(HOUR(a))
+t2f_ps decimal(6,4) AVG(?)
+t2e_nm bigint(3) MIN(EXTRACT(HOUR FROM a))
+t2e_ps bigint(3) MIN(?)
+t2f_nm bigint(3) MIN(HOUR(a))
+t2f_ps bigint(3) MIN(?)
+t2e_nm bigint(3) MAX(EXTRACT(HOUR FROM a))
+t2e_ps bigint(3) MAX(?)
+t2f_nm bigint(3) MAX(HOUR(a))
+t2f_ps bigint(3) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(HOUR FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(HOUR(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(MINUTE FROM expr) includes the sign for TIME
+# MINUTE(expr) returns the absolute value
+CALL p1('MINUTE');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MINUTE FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999'), MINUTE(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(3) EXTRACT(MINUTE FROM a)
+t1e_ps int(3) ?
+t1f_nm int(3) MINUTE(a)
+t1f_ps int(3) ?
+t1e_nm bigint(20) unsigned CAST(EXTRACT(MINUTE FROM a) AS UNSIGNED)
+t1e_ps bigint(20) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(2) unsigned CAST(MINUTE(a) AS UNSIGNED)
+t1f_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(3) CAST(EXTRACT(MINUTE FROM a) AS SIGNED)
+t1e_ps int(3) CAST(? AS SIGNED)
+t1f_nm int(3) CAST(MINUTE(a) AS SIGNED)
+t1f_ps int(3) CAST(? AS SIGNED)
+t1e_nm int(3) ABS(EXTRACT(MINUTE FROM a))
+t1e_ps int(3) ABS(?)
+t1f_nm int(3) ABS(MINUTE(a))
+t1f_ps int(3) ABS(?)
+t1e_nm int(3) ROUND(EXTRACT(MINUTE FROM a))
+t1e_ps int(3) ROUND(?)
+t1f_nm int(3) ROUND(MINUTE(a))
+t1f_ps int(3) ROUND(?)
+t1e_nm int(4) -EXTRACT(MINUTE FROM a)
+t1e_ps int(4) -?
+t1f_nm int(3) -MINUTE(a)
+t1f_ps int(3) -?
+t1e_nm int(4) ROUND(EXTRACT(MINUTE FROM a),-1)
+t1e_ps int(4) ROUND(?,-1)
+t1f_nm int(4) ROUND(MINUTE(a),-1)
+t1f_ps int(4) ROUND(?,-1)
+t1e_nm int(4) EXTRACT(MINUTE FROM a)+0
+t1e_ps int(4) ?+0
+t1f_nm int(4) MINUTE(a)+0
+t1f_ps int(4) ?+0
+t1e_nm decimal(4,1) EXTRACT(MINUTE FROM a)+0.0
+t1e_ps decimal(4,1) ?+0.0
+t1f_nm decimal(4,1) MINUTE(a)+0.0
+t1f_ps decimal(4,1) ?+0.0
+t1e_nm varchar(3) CONCAT(EXTRACT(MINUTE FROM a))
+t1e_ps varchar(3) CONCAT(?)
+t1f_nm varchar(2) CONCAT(MINUTE(a))
+t1f_ps varchar(2) CONCAT(?)
+t1e_nm int(3) LEAST(EXTRACT(MINUTE FROM a),EXTRACT(MINUTE FROM a))
+t1e_ps int(3) LEAST(?,?)
+t1f_nm int(3) LEAST(MINUTE(a),MINUTE(a))
+t1f_ps int(3) LEAST(?,?)
+t1e_nm int(3) COALESCE(EXTRACT(MINUTE FROM a))
+t1e_ps int(3) COALESCE(?)
+t1f_nm int(3) COALESCE(MINUTE(a))
+t1f_ps int(3) COALESCE(?)
+t1e_nm int(3) COALESCE(EXTRACT(MINUTE FROM a),CAST(1 AS SIGNED))
+t1e_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(3) COALESCE(MINUTE(a),CAST(1 AS SIGNED))
+t1f_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(2,0) COALESCE(EXTRACT(MINUTE FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(2,0) COALESCE(MINUTE(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(3) @a:=EXTRACT(MINUTE FROM a)
+t1e_ps int(3) @a:=?
+t1f_nm int(3) @a:=MINUTE(a)
+t1f_ps int(3) @a:=?
+t2e_nm decimal(6,4) AVG(EXTRACT(MINUTE FROM a))
+t2e_ps decimal(6,4) AVG(?)
+t2f_nm decimal(6,4) AVG(MINUTE(a))
+t2f_ps decimal(6,4) AVG(?)
+t2e_nm bigint(3) MIN(EXTRACT(MINUTE FROM a))
+t2e_ps bigint(3) MIN(?)
+t2f_nm bigint(3) MIN(MINUTE(a))
+t2f_ps bigint(3) MIN(?)
+t2e_nm bigint(3) MAX(EXTRACT(MINUTE FROM a))
+t2e_ps bigint(3) MAX(?)
+t2f_nm bigint(3) MAX(MINUTE(a))
+t2f_ps bigint(3) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(MINUTE FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(MINUTE(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(SECONDS FROM expr) includes the sign for TIME
+# SECONDS(expr) returns the absolute value
+CALL p1('SECOND');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(SECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), SECOND(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(3) EXTRACT(SECOND FROM a)
+t1e_ps int(3) ?
+t1f_nm int(3) SECOND(a)
+t1f_ps int(3) ?
+t1e_nm bigint(20) unsigned CAST(EXTRACT(SECOND FROM a) AS UNSIGNED)
+t1e_ps bigint(20) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(2) unsigned CAST(SECOND(a) AS UNSIGNED)
+t1f_ps int(2) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(3) CAST(EXTRACT(SECOND FROM a) AS SIGNED)
+t1e_ps int(3) CAST(? AS SIGNED)
+t1f_nm int(3) CAST(SECOND(a) AS SIGNED)
+t1f_ps int(3) CAST(? AS SIGNED)
+t1e_nm int(3) ABS(EXTRACT(SECOND FROM a))
+t1e_ps int(3) ABS(?)
+t1f_nm int(3) ABS(SECOND(a))
+t1f_ps int(3) ABS(?)
+t1e_nm int(3) ROUND(EXTRACT(SECOND FROM a))
+t1e_ps int(3) ROUND(?)
+t1f_nm int(3) ROUND(SECOND(a))
+t1f_ps int(3) ROUND(?)
+t1e_nm int(4) -EXTRACT(SECOND FROM a)
+t1e_ps int(4) -?
+t1f_nm int(3) -SECOND(a)
+t1f_ps int(3) -?
+t1e_nm int(4) ROUND(EXTRACT(SECOND FROM a),-1)
+t1e_ps int(4) ROUND(?,-1)
+t1f_nm int(4) ROUND(SECOND(a),-1)
+t1f_ps int(4) ROUND(?,-1)
+t1e_nm int(4) EXTRACT(SECOND FROM a)+0
+t1e_ps int(4) ?+0
+t1f_nm int(4) SECOND(a)+0
+t1f_ps int(4) ?+0
+t1e_nm decimal(4,1) EXTRACT(SECOND FROM a)+0.0
+t1e_ps decimal(4,1) ?+0.0
+t1f_nm decimal(4,1) SECOND(a)+0.0
+t1f_ps decimal(4,1) ?+0.0
+t1e_nm varchar(3) CONCAT(EXTRACT(SECOND FROM a))
+t1e_ps varchar(3) CONCAT(?)
+t1f_nm varchar(2) CONCAT(SECOND(a))
+t1f_ps varchar(2) CONCAT(?)
+t1e_nm int(3) LEAST(EXTRACT(SECOND FROM a),EXTRACT(SECOND FROM a))
+t1e_ps int(3) LEAST(?,?)
+t1f_nm int(3) LEAST(SECOND(a),SECOND(a))
+t1f_ps int(3) LEAST(?,?)
+t1e_nm int(3) COALESCE(EXTRACT(SECOND FROM a))
+t1e_ps int(3) COALESCE(?)
+t1f_nm int(3) COALESCE(SECOND(a))
+t1f_ps int(3) COALESCE(?)
+t1e_nm int(3) COALESCE(EXTRACT(SECOND FROM a),CAST(1 AS SIGNED))
+t1e_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(3) COALESCE(SECOND(a),CAST(1 AS SIGNED))
+t1f_ps int(3) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(2,0) COALESCE(EXTRACT(SECOND FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(2,0) COALESCE(SECOND(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(2,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(3) @a:=EXTRACT(SECOND FROM a)
+t1e_ps int(3) @a:=?
+t1f_nm int(3) @a:=SECOND(a)
+t1f_ps int(3) @a:=?
+t2e_nm decimal(6,4) AVG(EXTRACT(SECOND FROM a))
+t2e_ps decimal(6,4) AVG(?)
+t2f_nm decimal(6,4) AVG(SECOND(a))
+t2f_ps decimal(6,4) AVG(?)
+t2e_nm bigint(3) MIN(EXTRACT(SECOND FROM a))
+t2e_ps bigint(3) MIN(?)
+t2f_nm bigint(3) MIN(SECOND(a))
+t2f_ps bigint(3) MIN(?)
+t2e_nm bigint(3) MAX(EXTRACT(SECOND FROM a))
+t2e_ps bigint(3) MAX(?)
+t2f_nm bigint(3) MAX(SECOND(a))
+t2f_ps bigint(3) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(SECOND FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(SECOND(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# EXTRACT(MICROSECONDS FROM expr) includes the sign for TIME
+# MICROSECONDS(expr) returns the absolute value
+CALL p1('MICROSECOND');
+EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999'), EXTRACT(MICROSECOND FROM TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999'), MICROSECOND(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1e_nm int(7) EXTRACT(MICROSECOND FROM a)
+t1e_ps int(7) ?
+t1f_nm int(7) MICROSECOND(a)
+t1f_ps int(7) ?
+t1e_nm bigint(20) unsigned CAST(EXTRACT(MICROSECOND FROM a) AS UNSIGNED)
+t1e_ps bigint(20) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(6) unsigned CAST(MICROSECOND(a) AS UNSIGNED)
+t1f_ps int(6) unsigned CAST(? AS UNSIGNED)
+t1e_nm int(7) CAST(EXTRACT(MICROSECOND FROM a) AS SIGNED)
+t1e_ps int(7) CAST(? AS SIGNED)
+t1f_nm int(7) CAST(MICROSECOND(a) AS SIGNED)
+t1f_ps int(7) CAST(? AS SIGNED)
+t1e_nm int(7) ABS(EXTRACT(MICROSECOND FROM a))
+t1e_ps int(7) ABS(?)
+t1f_nm int(7) ABS(MICROSECOND(a))
+t1f_ps int(7) ABS(?)
+t1e_nm int(7) ROUND(EXTRACT(MICROSECOND FROM a))
+t1e_ps int(7) ROUND(?)
+t1f_nm int(7) ROUND(MICROSECOND(a))
+t1f_ps int(7) ROUND(?)
+t1e_nm int(8) -EXTRACT(MICROSECOND FROM a)
+t1e_ps int(8) -?
+t1f_nm int(7) -MICROSECOND(a)
+t1f_ps int(7) -?
+t1e_nm int(8) ROUND(EXTRACT(MICROSECOND FROM a),-1)
+t1e_ps int(8) ROUND(?,-1)
+t1f_nm int(8) ROUND(MICROSECOND(a),-1)
+t1f_ps int(8) ROUND(?,-1)
+t1e_nm int(8) EXTRACT(MICROSECOND FROM a)+0
+t1e_ps int(8) ?+0
+t1f_nm int(8) MICROSECOND(a)+0
+t1f_ps int(8) ?+0
+t1e_nm decimal(8,1) EXTRACT(MICROSECOND FROM a)+0.0
+t1e_ps decimal(8,1) ?+0.0
+t1f_nm decimal(8,1) MICROSECOND(a)+0.0
+t1f_ps decimal(8,1) ?+0.0
+t1e_nm varchar(7) CONCAT(EXTRACT(MICROSECOND FROM a))
+t1e_ps varchar(7) CONCAT(?)
+t1f_nm varchar(6) CONCAT(MICROSECOND(a))
+t1f_ps varchar(6) CONCAT(?)
+t1e_nm int(7) LEAST(EXTRACT(MICROSECOND FROM a),EXTRACT(MICROSECOND FROM a))
+t1e_ps int(7) LEAST(?,?)
+t1f_nm int(7) LEAST(MICROSECOND(a),MICROSECOND(a))
+t1f_ps int(7) LEAST(?,?)
+t1e_nm int(7) COALESCE(EXTRACT(MICROSECOND FROM a))
+t1e_ps int(7) COALESCE(?)
+t1f_nm int(7) COALESCE(MICROSECOND(a))
+t1f_ps int(7) COALESCE(?)
+t1e_nm int(7) COALESCE(EXTRACT(MICROSECOND FROM a),CAST(1 AS SIGNED))
+t1e_ps int(7) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm int(7) COALESCE(MICROSECOND(a),CAST(1 AS SIGNED))
+t1f_ps int(7) COALESCE(?,CAST(1 AS SIGNED))
+t1e_nm decimal(6,0) COALESCE(EXTRACT(MICROSECOND FROM a),CAST(1 AS UNSIGNED))
+t1e_ps decimal(6,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm decimal(6,0) COALESCE(MICROSECOND(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(6,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1e_nm int(7) @a:=EXTRACT(MICROSECOND FROM a)
+t1e_ps int(7) @a:=?
+t1f_nm int(7) @a:=MICROSECOND(a)
+t1f_ps int(7) @a:=?
+t2e_nm decimal(10,4) AVG(EXTRACT(MICROSECOND FROM a))
+t2e_ps decimal(10,4) AVG(?)
+t2f_nm decimal(10,4) AVG(MICROSECOND(a))
+t2f_ps decimal(10,4) AVG(?)
+t2e_nm bigint(7) MIN(EXTRACT(MICROSECOND FROM a))
+t2e_ps bigint(7) MIN(?)
+t2f_nm bigint(7) MIN(MICROSECOND(a))
+t2f_ps bigint(7) MIN(?)
+t2e_nm bigint(7) MAX(EXTRACT(MICROSECOND FROM a))
+t2e_ps bigint(7) MAX(?)
+t2f_nm bigint(7) MAX(MICROSECOND(a))
+t2f_ps bigint(7) MAX(?)
+t2e_nm mediumtext GROUP_CONCAT(EXTRACT(MICROSECOND FROM a))
+t2e_ps mediumtext GROUP_CONCAT(?)
+t2f_nm mediumtext GROUP_CONCAT(MICROSECOND(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+
+
+# DAYOFYEAR
+CALL p1('DAYOFYEAR');
+EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?' USING DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999');
+EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?)' USING DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999'), DAYOFYEAR(TIMESTAMP'2001-12-13 10:20:30.999999');
+CALL show_drop;
+TABLE_NAME COLUMN_TYPE COLUMN_NAME
+t1f_nm int(4) DAYOFYEAR(a)
+t1f_ps int(4) ?
+t1f_nm int(3) unsigned CAST(DAYOFYEAR(a) AS UNSIGNED)
+t1f_ps int(3) unsigned CAST(? AS UNSIGNED)
+t1f_nm int(4) CAST(DAYOFYEAR(a) AS SIGNED)
+t1f_ps int(4) CAST(? AS SIGNED)
+t1f_nm int(4) ABS(DAYOFYEAR(a))
+t1f_ps int(4) ABS(?)
+t1f_nm int(4) ROUND(DAYOFYEAR(a))
+t1f_ps int(4) ROUND(?)
+t1f_nm int(4) -DAYOFYEAR(a)
+t1f_ps int(4) -?
+t1f_nm int(5) ROUND(DAYOFYEAR(a),-1)
+t1f_ps int(5) ROUND(?,-1)
+t1f_nm int(5) DAYOFYEAR(a)+0
+t1f_ps int(5) ?+0
+t1f_nm decimal(5,1) DAYOFYEAR(a)+0.0
+t1f_ps decimal(5,1) ?+0.0
+t1f_nm varchar(3) CONCAT(DAYOFYEAR(a))
+t1f_ps varchar(3) CONCAT(?)
+t1f_nm int(4) LEAST(DAYOFYEAR(a),DAYOFYEAR(a))
+t1f_ps int(4) LEAST(?,?)
+t1f_nm int(4) COALESCE(DAYOFYEAR(a))
+t1f_ps int(4) COALESCE(?)
+t1f_nm int(4) COALESCE(DAYOFYEAR(a),CAST(1 AS SIGNED))
+t1f_ps int(4) COALESCE(?,CAST(1 AS SIGNED))
+t1f_nm decimal(3,0) COALESCE(DAYOFYEAR(a),CAST(1 AS UNSIGNED))
+t1f_ps decimal(3,0) COALESCE(?,CAST(1 AS UNSIGNED))
+t1f_nm int(4) @a:=DAYOFYEAR(a)
+t1f_ps int(4) @a:=?
+t2f_nm decimal(7,4) AVG(DAYOFYEAR(a))
+t2f_ps decimal(7,4) AVG(?)
+t2f_nm bigint(4) MIN(DAYOFYEAR(a))
+t2f_ps bigint(4) MIN(?)
+t2f_nm bigint(4) MAX(DAYOFYEAR(a))
+t2f_ps bigint(4) MAX(?)
+t2f_nm mediumtext GROUP_CONCAT(DAYOFYEAR(a))
+t2f_ps mediumtext GROUP_CONCAT(?)
+DROP TABLE t1;
+DROP PROCEDURE p1;
+DROP PROCEDURE show_drop;
+DROP FUNCTION params;
+DROP FUNCTION select01;
+DROP FUNCTION select02;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/func_extract.test b/mysql-test/main/func_extract.test
index 97920f18..dd808443 100644
--- a/mysql-test/main/func_extract.test
+++ b/mysql-test/main/func_extract.test
@@ -263,3 +263,254 @@ SELECT
FROM t1;
DROP TABLE t1;
--enable_view_protocol
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-33496 Out of range error in AVG(YEAR(datetime)) due to a wrong data type
+--echo #
+
+let select01=SELECT ?, CAST(? AS UNSIGNED), CAST(? AS SIGNED), ABS(?), ROUND(?), -?, ROUND(?,-1), ?+0, ?+0.0, CONCAT(?), LEAST(?,?), COALESCE(?), COALESCE(?,CAST(1 AS SIGNED)), COALESCE(?,CAST(1 AS UNSIGNED)), @a:=?;
+let pcount01=16;
+let select02=SELECT AVG(?), MIN(?), MAX(?), GROUP_CONCAT(?);
+let pcount02=4;
+let ts=TIMESTAMP'2001-12-13 10:20:30.999999';
+
+eval CREATE FUNCTION select01() RETURNS TEXT RETURN '$select01';
+eval CREATE FUNCTION select02() RETURNS TEXT RETURN '$select02';
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('2001-12-31 10:20:30.999999');
+
+DELIMITER $$;
+CREATE FUNCTION params(expr TEXT, count INT) RETURNS TEXT
+BEGIN
+ RETURN CONCAT(expr, REPEAT(CONCAT(', ', expr), count-1));
+END;
+$$
+CREATE PROCEDURE show_drop()
+BEGIN
+ SELECT TABLE_NAME, COLUMN_TYPE, COLUMN_NAME
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE TABLE_SCHEMA='test'
+ AND TABLE_NAME IN ('t1e_nm','t2e_nm','t1f_nm','t2f_nm',
+ 't1e_ps','t1f_ps','t2e_ps','t2f_ps')
+ ORDER BY LEFT(TABLE_NAME, 2), ORDINAL_POSITION, TABLE_NAME;
+
+ FOR rec IN (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
+ WHERE TABLE_SCHEMA='test'
+ AND TABLE_NAME IN ('t1e_nm','t2e_nm','t1f_nm','t2f_nm',
+ 't1e_ps','t1f_ps','t2e_ps','t2f_ps'))
+ DO
+ EXECUTE IMMEDIATE CONCAT('DROP TABLE ', rec.TABLE_NAME);
+ END FOR;
+END;
+$$
+CREATE PROCEDURE p1(unit VARCHAR(32))
+BEGIN
+ DECLARE do_extract BOOL DEFAULT unit NOT IN('DAYOFYEAR');
+
+ DECLARE query01 TEXT DEFAULT
+ CONCAT('CREATE TABLE t2 AS ', select01(), ' FROM t1');
+
+ DECLARE query02 TEXT DEFAULT
+ CONCAT('CREATE TABLE t2 AS ', select02(), ' FROM t1');
+
+ IF (do_extract)
+ THEN
+ EXECUTE IMMEDIATE REPLACE(REPLACE(query01,'t2','t1e_nm'),'?', CONCAT('EXTRACT(',unit,' FROM a)'));
+ EXECUTE IMMEDIATE REPLACE(REPLACE(query02,'t2','t2e_nm'),'?', CONCAT('EXTRACT(',unit,' FROM a)'));
+ END IF;
+ EXECUTE IMMEDIATE REPLACE(REPLACE(query01,'t2','t1f_nm'),'?', CONCAT(unit,'(a)'));
+ EXECUTE IMMEDIATE REPLACE(REPLACE(query02,'t2','t2f_nm'),'?', CONCAT(unit,'(a)'));
+END;
+$$
+DELIMITER ;$$
+
+
+--echo
+--echo
+--echo # EXTRACT(YEAR FROM expr) and YEAR(expr) are equivalent
+
+CALL p1('YEAR');
+let extr=EXTRACT(YEAR FROM $ts);
+let func=YEAR($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+
+--echo
+--echo
+--echo # EXTRACT(QUARTER FROM expr) and QUARTER(expr) are equavalent
+
+CALL p1('QUARTER');
+let extr=EXTRACT(QUARTER FROM $ts);
+let func=QUARTER($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(MONTH FROM expr) and MONTH(expr) are equavalent
+
+CALL p1('MONTH');
+let extr=EXTRACT(MONTH FROM $ts);
+let func=MONTH($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(WEEK FROM expr) and WEEK(expr) are equavalent
+
+CALL p1('WEEK');
+let extr=EXTRACT(WEEK FROM $ts);
+let func=WEEK($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(DAY FROM expr) returns hours/24 and includes the sign for TIME
+--echo # DAY(expr) returns the DD part of CAST(expr AS DATETIME)
+
+CALL p1('DAY');
+let extr=EXTRACT(DAY FROM $ts);
+let func=DAY($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(HOUR FROM expr) returns hours%24 and includes the sign for TIME
+--echo # HOUR(expr) returns the hh part of CAST(expr AS DATETIME)
+
+CALL p1('HOUR');
+let extr=EXTRACT(HOUR FROM $ts);
+let func=HOUR($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(MINUTE FROM expr) includes the sign for TIME
+--echo # MINUTE(expr) returns the absolute value
+
+CALL p1('MINUTE');
+let extr=EXTRACT(MINUTE FROM $ts);
+let func=MINUTE($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(SECONDS FROM expr) includes the sign for TIME
+--echo # SECONDS(expr) returns the absolute value
+
+CALL p1('SECOND');
+let extr=EXTRACT(SECOND FROM $ts);
+let func=SECOND($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # EXTRACT(MICROSECONDS FROM expr) includes the sign for TIME
+--echo # MICROSECONDS(expr) returns the absolute value
+
+CALL p1('MICROSECOND');
+let extr=EXTRACT(MICROSECOND FROM $ts);
+let func=MICROSECOND($ts);
+let extr01=`SELECT params("$extr", $pcount01) AS p`;
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let extr02=`SELECT params("$extr", $pcount02) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1e_ps AS $select01' USING $extr01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2e_ps AS $select02' USING $extr02;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+--echo
+--echo
+--echo # DAYOFYEAR
+
+CALL p1('DAYOFYEAR');
+let func=DAYOFYEAR($ts);
+let func01=`SELECT params("$func", $pcount01) AS p`;
+let func02=`SELECT params("$func", $pcount02) AS p`;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t1f_ps AS $select01' USING $func01;
+eval EXECUTE IMMEDIATE 'CREATE TABLE t2f_ps AS $select02' USING $func02;
+CALL show_drop;
+
+
+DROP TABLE t1;
+DROP PROCEDURE p1;
+DROP PROCEDURE show_drop;
+DROP FUNCTION params;
+
+DROP FUNCTION select01;
+DROP FUNCTION select02;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/func_gconcat.result b/mysql-test/main/func_gconcat.result
index fea25124..f817a117 100644
--- a/mysql-test/main/func_gconcat.result
+++ b/mysql-test/main/func_gconcat.result
@@ -1443,3 +1443,98 @@ drop table t1;
#
# End of 10.3 tests
#
+#
+# MDEV-31276: Execution of PS from grouping query with join
+# and GROUP_CONCAT set function
+#
+create table t1 (a int, b varchar(20)) engine=myisam;
+create table t2 (a int, c varchar(20)) engine=myisam;
+insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
+insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
+insert into t2 values (1,"eeeeeee"),(2,"fffffff");
+set group_concat_max_len=5;
+select count(*), group_concat(t1.b,t2.c)
+from t1 join t2 on t1.a=t2.a group by t1.a;
+count(*) group_concat(t1.b,t2.c)
+2 aaaaa
+2 bbbbb
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+explain select count(*), group_concat(t1.b,t2.c)
+from t1 join t2 on t1.a=t2.a group by t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
+1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where; Using join buffer (flat, BNL join)
+prepare stmt from "select count(*), group_concat(t1.b,t2.c)
+from t1 join t2 on t1.a=t2.a group by t1.a";
+execute stmt;
+count(*) group_concat(t1.b,t2.c)
+2 aaaaa
+2 bbbbb
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+execute stmt;
+count(*) group_concat(t1.b,t2.c)
+2 aaaaa
+2 bbbbb
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+deallocate prepare stmt;
+set join_cache_level=0;
+select count(*), group_concat(t1.b,t2.c)
+from t1 join t2 on t1.a=t2.a group by t1.a;
+count(*) group_concat(t1.b,t2.c)
+2 aaaaa
+2 bbbbb
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+explain select count(*), group_concat(t1.b,t2.c)
+from t1 join t2 on t1.a=t2.a group by t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using filesort
+1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Using where
+prepare stmt from "select count(*), group_concat(t1.b,t2.c)
+from t1 join t2 on t1.a=t2.a group by t1.a";
+execute stmt;
+count(*) group_concat(t1.b,t2.c)
+2 aaaaa
+2 bbbbb
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+execute stmt;
+count(*) group_concat(t1.b,t2.c)
+2 aaaaa
+2 bbbbb
+Warnings:
+Warning 1260 Row 1 was cut by GROUP_CONCAT()
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+deallocate prepare stmt;
+set join_cache_level=default;
+set group_concat_max_len=default;
+drop table t1,t2;
+#
+# MDEV-33772 Bad SEPARATOR value in GROUP_CONCAT on character set conversion
+#
+SET NAMES utf8, @@collation_connection=latin1_swedish_ci;
+CREATE TABLE t1 (c VARCHAR(10)) CHARACTER SET latin1;
+INSERT INTO t1 VALUES ('a'),('A');
+CREATE OR REPLACE VIEW v1 AS
+SELECT GROUP_CONCAT(c SEPARATOR 'ß') AS c1 FROM t1 GROUP BY c;
+SELECT * FROM v1;
+c1
+aßA
+SELECT HEX(c1) FROM v1;
+HEX(c1)
+61DF41
+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 group_concat(`t1`.`c` separator 'ß') AS `c1` from `t1` group by `t1`.`c` utf8mb3 latin1_swedish_ci
+DROP VIEW v1;
+DROP TABLE t1;
+SET NAMES latin1;
+# End of 10.5 tests
diff --git a/mysql-test/main/func_gconcat.test b/mysql-test/main/func_gconcat.test
index cc5236a1..c9787ce4 100644
--- a/mysql-test/main/func_gconcat.test
+++ b/mysql-test/main/func_gconcat.test
@@ -1066,3 +1066,59 @@ drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-31276: Execution of PS from grouping query with join
+--echo # and GROUP_CONCAT set function
+--echo #
+
+create table t1 (a int, b varchar(20)) engine=myisam;
+create table t2 (a int, c varchar(20)) engine=myisam;
+insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
+insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
+insert into t2 values (1,"eeeeeee"),(2,"fffffff");
+
+let $q=
+select count(*), group_concat(t1.b,t2.c)
+ from t1 join t2 on t1.a=t2.a group by t1.a;
+
+set group_concat_max_len=5;
+
+eval $q;
+eval explain $q;
+eval prepare stmt from "$q";
+execute stmt;
+execute stmt;
+deallocate prepare stmt;
+
+set join_cache_level=0;
+
+eval $q;
+eval explain $q;
+eval prepare stmt from "$q";
+execute stmt;
+execute stmt;
+deallocate prepare stmt;
+
+set join_cache_level=default;
+set group_concat_max_len=default;
+
+drop table t1,t2;
+
+--echo #
+--echo # MDEV-33772 Bad SEPARATOR value in GROUP_CONCAT on character set conversion
+--echo #
+
+SET NAMES utf8, @@collation_connection=latin1_swedish_ci;
+CREATE TABLE t1 (c VARCHAR(10)) CHARACTER SET latin1;
+INSERT INTO t1 VALUES ('a'),('A');
+CREATE OR REPLACE VIEW v1 AS
+ SELECT GROUP_CONCAT(c SEPARATOR 'ß') AS c1 FROM t1 GROUP BY c;
+SELECT * FROM v1;
+SELECT HEX(c1) FROM v1;
+SHOW CREATE VIEW v1;
+DROP VIEW v1;
+DROP TABLE t1;
+SET NAMES latin1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index bf965a9f..e6c08dab 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -4313,5 +4313,30 @@ ERROR HY000: Illegal parameter data types bigint unsigned and row for operation
SELECT @@max_allowed_packet=ROW(1,1);
ERROR HY000: Illegal parameter data types bigint unsigned and row for operation '='
#
+# MDEV-21034 GREATEST() and LEAST() malfunction for NULL
+#
+SELECT 5 AS c1 FROM dual WHERE GREATEST(1, NULL);
+c1
+SELECT 5 AS c1 FROM dual WHERE LEAST(1, NULL);
+c1
+CREATE TABLE t0 (c0 INT);
+INSERT INTO t0 VALUES (1);
+SELECT * FROM t0 WHERE GREATEST(c0, NULL);
+c0
+SELECT * FROM t0 WHERE LEAST(c0, NULL);
+c0
+DROP TABLE t0;
+SELECT 5 AS c1 FROM dual WHERE GREATEST(1e0, NULL);
+c1
+SELECT 5 AS c1 FROM dual WHERE LEAST(1e0, NULL);
+c1
+CREATE TABLE t0 (c0 DOUBLE);
+INSERT INTO t0 VALUES (1);
+SELECT * FROM t0 WHERE GREATEST(c0, NULL);
+c0
+SELECT * FROM t0 WHERE LEAST(c0, NULL);
+c0
+DROP TABLE t0;
+#
# End of 10.5 tests
#
diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test
index 508cdcfb..2ebfb3cf 100644
--- a/mysql-test/main/func_hybrid_type.test
+++ b/mysql-test/main/func_hybrid_type.test
@@ -1116,5 +1116,28 @@ SELECT 0x20+ROW(1,1);
SELECT @@max_allowed_packet=ROW(1,1);
--echo #
+--echo # MDEV-21034 GREATEST() and LEAST() malfunction for NULL
+--echo #
+
+SELECT 5 AS c1 FROM dual WHERE GREATEST(1, NULL);
+SELECT 5 AS c1 FROM dual WHERE LEAST(1, NULL);
+
+CREATE TABLE t0 (c0 INT);
+INSERT INTO t0 VALUES (1);
+SELECT * FROM t0 WHERE GREATEST(c0, NULL);
+SELECT * FROM t0 WHERE LEAST(c0, NULL);
+DROP TABLE t0;
+
+SELECT 5 AS c1 FROM dual WHERE GREATEST(1e0, NULL);
+SELECT 5 AS c1 FROM dual WHERE LEAST(1e0, NULL);
+
+CREATE TABLE t0 (c0 DOUBLE);
+INSERT INTO t0 VALUES (1);
+SELECT * FROM t0 WHERE GREATEST(c0, NULL);
+SELECT * FROM t0 WHERE LEAST(c0, NULL);
+DROP TABLE t0;
+
+
+--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/func_in.result b/mysql-test/main/func_in.result
index b3865bab..1ddb5257 100644
--- a/mysql-test/main/func_in.result
+++ b/mysql-test/main/func_in.result
@@ -971,6 +971,84 @@ c1
9223372036854775808
drop table `a`;
#
+# MDEV-18319 BIGINT UNSIGNED Performance issue
+#
+CREATE OR REPLACE TABLE t1 (
+id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
+);
+FOR i IN 0..255
+DO
+INSERT INTO t1 VALUES ();
+END FOR
+$$
+SELECT MIN(id), MAX(id), COUNT(*) FROM t1;
+MIN(id) MAX(id) COUNT(*)
+1 256 256
+EXPLAIN SELECT id FROM t1 WHERE id IN (1,2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL 2 Using where; Using index
+EXPLAIN SELECT id FROM t1 WHERE id IN (9223372036854775806, 9223372036854775807);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL 2 Using where; Using index
+EXPLAIN SELECT id FROM t1 WHERE id IN (9223372036854775807, 9223372036854775808);
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL 2 Using where; Using index
+DROP TABLE t1;
+#
+# MDEV-18898 SELECT using wrong index when using operator IN with mixed types
+#
+CREATE TEMPORARY TABLE t1 (
+id int(10) unsigned NOT NULL AUTO_INCREMENT,
+name varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+PRIMARY KEY (`id`),
+UNIQUE KEY `name` (`name`)
+);
+FOR i IN 1..255
+DO
+INSERT INTO t1 VALUES (i, MD5(i));
+END FOR
+$$
+#
+# Constants alone
+#
+ANALYZE SELECT id, name FROM t1 WHERE id = 1;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 NULL 100.00 NULL
+ANALYZE SELECT id, name FROM t1 WHERE id = '2';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 NULL 100.00 NULL
+#
+# Two constants using IN
+#
+ANALYZE SELECT id, name FROM t1 WHERE id IN (1, 2);
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+ANALYZE SELECT id, name FROM t1 WHERE id IN ('1', 2) /* Used a wrong index */;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+ANALYZE SELECT id, name FROM t1 WHERE id IN (1, '2') /* Used a wrong index */;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+ANALYZE SELECT id, name FROM t1 WHERE id IN ('1', '2');
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+#
+# Two constants using OR
+#
+ANALYZE SELECT id, name FROM t1 WHERE id = 1 OR id = 2;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+ANALYZE SELECT id, name FROM t1 WHERE id = '1' OR id = '2';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+ANALYZE SELECT id, name FROM t1 WHERE id = 1 OR id = '2';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+ANALYZE SELECT id, name FROM t1 WHERE id = '1' OR id = 2;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 2.00 100.00 100.00 Using index condition
+DROP TABLE t1;
+#
# End of 10.5 tests
#
#
diff --git a/mysql-test/main/func_in.test b/mysql-test/main/func_in.test
index e39932a2..b88b68f2 100644
--- a/mysql-test/main/func_in.test
+++ b/mysql-test/main/func_in.test
@@ -743,6 +743,66 @@ SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775808 );
drop table `a`;
--echo #
+--echo # MDEV-18319 BIGINT UNSIGNED Performance issue
+--echo #
+
+CREATE OR REPLACE TABLE t1 (
+ id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
+);
+DELIMITER $$;
+FOR i IN 0..255
+DO
+ INSERT INTO t1 VALUES ();
+END FOR
+$$
+DELIMITER ;$$
+SELECT MIN(id), MAX(id), COUNT(*) FROM t1;
+EXPLAIN SELECT id FROM t1 WHERE id IN (1,2);
+EXPLAIN SELECT id FROM t1 WHERE id IN (9223372036854775806, 9223372036854775807);
+EXPLAIN SELECT id FROM t1 WHERE id IN (9223372036854775807, 9223372036854775808);
+DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-18898 SELECT using wrong index when using operator IN with mixed types
+--echo #
+
+CREATE TEMPORARY TABLE t1 (
+ id int(10) unsigned NOT NULL AUTO_INCREMENT,
+ name varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name` (`name`)
+);
+DELIMITER $$;
+FOR i IN 1..255
+DO
+ INSERT INTO t1 VALUES (i, MD5(i));
+END FOR
+$$
+DELIMITER ;$$
+--echo #
+--echo # Constants alone
+--echo #
+ANALYZE SELECT id, name FROM t1 WHERE id = 1;
+ANALYZE SELECT id, name FROM t1 WHERE id = '2';
+--echo #
+--echo # Two constants using IN
+--echo #
+ANALYZE SELECT id, name FROM t1 WHERE id IN (1, 2);
+ANALYZE SELECT id, name FROM t1 WHERE id IN ('1', 2) /* Used a wrong index */;
+ANALYZE SELECT id, name FROM t1 WHERE id IN (1, '2') /* Used a wrong index */;
+ANALYZE SELECT id, name FROM t1 WHERE id IN ('1', '2');
+--echo #
+--echo # Two constants using OR
+--echo #
+ANALYZE SELECT id, name FROM t1 WHERE id = 1 OR id = 2;
+ANALYZE SELECT id, name FROM t1 WHERE id = '1' OR id = '2';
+ANALYZE SELECT id, name FROM t1 WHERE id = 1 OR id = '2';
+ANALYZE SELECT id, name FROM t1 WHERE id = '1' OR id = 2;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index ea1767af..268a721a 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -272,7 +272,7 @@ create table t1 as select json_object('id', 87, 'name', 'carrot') as f;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f` varchar(32) DEFAULT NULL
+ `f` varchar(46) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
select * from t1;
f
@@ -1690,6 +1690,33 @@ select json_arrayagg('ä'), json_objectagg(1, 'ä');
json_arrayagg('ä') json_objectagg(1, 'ä')
["ä"] {"1":"ä"}
#
+# MDEV-32287: JSON_EXTRACT not returning multiple values for same path
+#
+select JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]');
+JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]')
+[40, 40]
+#
+# MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json
+#
+CREATE TABLE t (id CHAR AS (JSON_COMPACT (JSON_EXTRACT(doc,"$._id"))) UNIQUE KEY,doc JSON,CONSTRAINT notnu CHECK (id IS NOT NULL));
+INSERT INTO t (doc) VALUES ('{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" :0} ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] }');
+ERROR 22001: Data too long for column 'id' at row 1
+DROP TABLE t;
+#
+# MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER"
+#
+SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')) as x;
+x
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5
+#
+# MDEV-22141: JSON_REMOVE returns NULL on valid arguments
+#
+SELECT JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D');
+JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D')
+{"A": {"B": 1}}
+#
# End of 10.5 tests
#
#
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index f8a656c9..54d7d73d 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -87,15 +87,12 @@ select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]') as exp;
select json_extract('[10, 20, [30, 40], 1, 10]', '$[1]', '$[25]') as exp;
select json_extract( '[{"a": [3, 4]}, {"b": 2}]', '$[0].a', '$[1].a') as exp;
-#enable after MDEV-32454 fix
---disable_view_protocol
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.k1', 'word') as exp;
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.d[3]', 3) as exp;
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.a[2]', 2) as exp;
select json_insert('{"a":1, "b":{"c":1}, "d":[1, 2]}', '$.b.c', 'word') as exp;
select json_set('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') as exp;
---enable_view_protocol
select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.c', '[true, false]') as exp;
select json_replace('{ "a": 1, "b": [2, 3]}', '$.a', 10, '$.b', '[true, false]') as exp;
@@ -137,14 +134,11 @@ select json_merge('a','b');
select json_merge('{"a":"b"}','{"c":"d"}');
SELECT JSON_MERGE('[1, 2]', '{"id": 47}');
-#enable after MDEV-32454 fix
---disable_view_protocol
select json_type('{"k1":123, "k2":345}');
select json_type('[123, "k2", 345]');
select json_type("true");
select json_type('123');
select json_type('123.12');
---enable_view_protocol
select json_keys('{"a":{"c":1, "d":2}, "b":2}');
select json_keys('{"a":{"c":1, "d":2}, "b":2}', "$.a");
@@ -173,11 +167,8 @@ select json_search( json_col, 'all', 'foot' ) as ex from t1;
drop table t1;
-#enable after MDEV-32454 fix
---disable_view_protocol
select json_unquote('"abc"');
select json_unquote('abc');
---enable_view_protocol
#
# MDEV-13703 Illegal mix of collations for operation 'json_object' on using JSON_UNQUOTE as an argument.
#
@@ -188,13 +179,9 @@ select json_object('foo', json_unquote(json_object('bar', c)),'qux', c) as fld f
drop table t1;
-#enable after MDEV-32454 fix
---disable_view_protocol
select json_object("a", json_object("b", "abcd"));
select json_object("a", '{"b": "abcd"}');
select json_object("a", json_compact('{"b": "abcd"}'));
---enable_view_protocol
-
select json_compact(NULL);
select json_depth(json_compact(NULL));
@@ -270,11 +257,8 @@ select json_merge('{"a":{"u":12, "x":"b"}}', '{"a":{"x":"c"}}') as ex ;
select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') as ex ;
select json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex;
-#enable after MDEV-32454 fix
---disable_view_protocol
select json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex;
select json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}') as ex;
---enable_view_protocol
#
# MDEV-11856 json_search doesn't search for values with double quotes character (")
@@ -469,12 +453,9 @@ drop table t1;
--echo # MDEV-16750 JSON_SET mishandles unicode every second pair of arguments.
--echo #
-#enable after MDEV-32454 fix
---disable_view_protocol
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6) as exp;
SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6) as exp;
SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6') as exp;
---enable_view_protocol
--echo #
--echo # MDEV-17121 JSON_ARRAY_APPEND
@@ -1137,6 +1118,38 @@ set names latin1;
select json_arrayagg('ä'), json_objectagg(1, 'ä');
--enable_service_connection
+
+--echo #
+--echo # MDEV-32287: JSON_EXTRACT not returning multiple values for same path
+--echo #
+
+select JSON_EXTRACT("[1, 2, [30, 40]]", '$[2][1]', '$[2][1]');
+
+
+--echo #
+--echo # MDEV-31402: SIGSEGV in json_get_path_next | Item_func_json_extract::read_json
+--echo #
+
+CREATE TABLE t (id CHAR AS (JSON_COMPACT (JSON_EXTRACT(doc,"$._id"))) UNIQUE KEY,doc JSON,CONSTRAINT notnu CHECK (id IS NOT NULL));
+--error ER_DATA_TOO_LONG
+INSERT INTO t (doc) VALUES ('{ "_id" : { "$oid" : "0ca0b0f0" },"a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" : [ { "a" :0} ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] } ] }');
+
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-19487: JSON_TYPE doesnt detect the type of String Values (returns NULL) and for Date/DateTime returns "INTEGER"
+--echo #
+
+SELECT JSON_TYPE(json_value(JSON_OBJECT("id", 1, "name", 'Monty', "date", Cast('2019-01-01' as Date) ), '$.date')) as x;
+
+
+--echo #
+--echo # MDEV-22141: JSON_REMOVE returns NULL on valid arguments
+--echo #
+
+SELECT JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D');
+
+
--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/func_json_notembedded.result b/mysql-test/main/func_json_notembedded.result
index 756d2e85..ba4d38dd 100644
--- a/mysql-test/main/func_json_notembedded.result
+++ b/mysql-test/main/func_json_notembedded.result
@@ -10,6 +10,8 @@ select length(@obj), length(@arr);
length(@obj) length(@arr)
5000009 5000009
set max_statement_time=0.0001;
+SET @old_debug= @@debug_dbug;
+SET debug_dbug='+d,debug_max_statement_time exceeded';
select json_array_append(@arr, '$[0]', 1);
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
select json_array_insert(@arr, '$[0]', 1);
@@ -34,6 +36,7 @@ select json_replace(@obj,'$.foo',1);
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
select json_set(@arr,'$[1000]',1);
ERROR 70100: Query execution was interrupted (max_statement_time exceeded)
+SET debug_dbug= @old_debug;
disconnect u;
connection default;
set global max_allowed_packet=default;
diff --git a/mysql-test/main/func_json_notembedded.test b/mysql-test/main/func_json_notembedded.test
index 893b2483..1e05571e 100644
--- a/mysql-test/main/func_json_notembedded.test
+++ b/mysql-test/main/func_json_notembedded.test
@@ -1,6 +1,7 @@
source include/have_profiling.inc;
source include/not_embedded.inc;
source include/no_valgrind_without_big.inc;
+source include/have_debug.inc;
set global max_allowed_packet=1073741824;
connect u,localhost,root;
@@ -16,6 +17,8 @@ select length(@obj), length(@arr);
set max_statement_time=0.0001;
disable_abort_on_error;
+SET @old_debug= @@debug_dbug;
+SET debug_dbug='+d,debug_max_statement_time exceeded';
select json_array_append(@arr, '$[0]', 1);
select json_array_insert(@arr, '$[0]', 1);
select json_insert(@obj, '$.meta', 1);
@@ -29,6 +32,7 @@ select json_remove(@obj,'$.foo');
select json_replace(@obj,'$.foo',1);
select json_set(@arr,'$[1000]',1);
enable_abort_on_error;
+SET debug_dbug= @old_debug;
disconnect u;
connection default;
set global max_allowed_packet=default;
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index 1c6c780e..5422cae4 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -3711,5 +3711,20 @@ SELECT CRC32(ExtractValue('<a><b/></a>', '/a/b')) AS f;
f
0
#
+# MDEV-33534 UBSAN: Negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_double_round from sql/item_func.cc|
+#
+SELECT TRUNCATE(EXP(-1.e-2),-1.e+30) AS c1;
+c1
+0
+SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) AS c1;
+c1
+0
+SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
+c1
+0
+SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
+c1
+NULL
+#
# End of 10.5 tests
#
diff --git a/mysql-test/main/func_math.test b/mysql-test/main/func_math.test
index d4e85393..b32a1a46 100644
--- a/mysql-test/main/func_math.test
+++ b/mysql-test/main/func_math.test
@@ -1981,5 +1981,15 @@ SELECT CRC32(ExtractValue('<a><b/></a>', '/a/b')) AS f;
--echo #
+--echo # MDEV-33534 UBSAN: Negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_double_round from sql/item_func.cc|
+--echo #
+
+SELECT TRUNCATE(EXP(-1.e-2),-1.e+30) AS c1;
+SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) AS c1;
+SELECT (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
+SELECT(ASIN(-1)+ LN(-1)) % (ATAN(-1) MOD FLOOR(1)) * (TRUNCATE(EXP(-1.e-2),-1.e+30) % RADIANS(-1)) * (LAST_DAY('1-03-30 1:29:12') MOD 1 + COS(-1)) AS c1;
+
+
+--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/func_regexp.result b/mysql-test/main/func_regexp.result
index b883c818..7a9e24f8 100644
--- a/mysql-test/main/func_regexp.result
+++ b/mysql-test/main/func_regexp.result
@@ -110,7 +110,7 @@ R2
R3
deallocate prepare stmt1;
drop table t1;
-End of 4.1 tests
+# End of 4.1 tests
SELECT 1 REGEXP NULL;
1 REGEXP NULL
NULL
@@ -126,7 +126,7 @@ NULL
SELECT "ABC" REGEXP BINARY NULL;
"ABC" REGEXP BINARY NULL
NULL
-End of 5.0 tests
+# End of 5.0 tests
CREATE TABLE t1(a INT, b CHAR(4));
INSERT INTO t1 VALUES (1, '6.1'), (1, '7.0'), (1, '8.0');
PREPARE stmt1 FROM "SELECT a FROM t1 WHERE a=1 AND '7.0' REGEXP b LIMIT 1";
@@ -144,7 +144,7 @@ a
1
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
-End of 5.1 tests
+# End of 5.1 tests
SELECT ' ' REGEXP '[[:blank:]]';
' ' REGEXP '[[:blank:]]'
1
@@ -163,3 +163,49 @@ SELECT '\t' REGEXP '[[:space:]]';
SELECT REGEXP_INSTR('111222333',2);
REGEXP_INSTR('111222333',2)
4
+# End of 10.3 tests
+#
+# MDEV-33344 REGEXP empty string inconsistent
+#
+create table t1 (x char(5));
+insert t1 values (''), ('x');
+select 'foo' regexp x from t1 order by x asc;
+'foo' regexp x
+1
+0
+select 'foo' regexp x from t1 order by x desc;
+'foo' regexp x
+0
+1
+drop table t1;
+#
+# MDEV-21076 NOT NULL and UNIQUE constraints cause SUM() to yield an incorrect result
+#
+CREATE TABLE t0(c0 INT NOT NULL, c1 CHAR UNIQUE);
+INSERT INTO t0 VALUES (0, 1);
+INSERT INTO t0 VALUES (0, '');
+SELECT (c1 RLIKE c1), (c0 IS NULL) FROM t0;
+(c1 RLIKE c1) (c0 IS NULL)
+1 0
+1 0
+SELECT SUM(a.t) FROM (SELECT (c1 RLIKE c1) = (c0 IS NULL) as t FROM t0) as a;
+SUM(a.t)
+0
+DROP TABLE t0;
+#
+# MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt
+#
+CREATE TABLE t1 (c0 INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT ('' RLIKE '[') AS c1 FROM t1;
+ERROR 42000: Regex error 'missing terminating ] for character class at offset 1'
+SELECT REGEXP_INSTR('','[') AS c1 FROM t1;
+ERROR 42000: Regex error 'missing terminating ] for character class at offset 1'
+SELECT c0, '' RLIKE NULL AS c1, REGEXP_INSTR('', NULL) AS c2
+FROM t1 ORDER BY c0;
+c0 c1 c2
+1 NULL NULL
+2 NULL NULL
+3 NULL NULL
+DROP TABLE t1;
+# End of 10.5 tests
diff --git a/mysql-test/main/func_regexp.test b/mysql-test/main/func_regexp.test
index 6d518626..fb441bde 100644
--- a/mysql-test/main/func_regexp.test
+++ b/mysql-test/main/func_regexp.test
@@ -55,7 +55,7 @@ execute stmt1 using @a;
deallocate prepare stmt1;
drop table t1;
---echo End of 4.1 tests
+--echo # End of 4.1 tests
#
@@ -74,7 +74,7 @@ SELECT NULL REGEXP BINARY NULL;
SELECT 'A' REGEXP BINARY NULL;
SELECT "ABC" REGEXP BINARY NULL;
---echo End of 5.0 tests
+--echo # End of 5.0 tests
#
@@ -91,7 +91,7 @@ DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
---echo End of 5.1 tests
+--echo # End of 5.1 tests
#
# MDEV-5820 MySQL Bug #54805 definitions in regex/my_regex.h conflict with /usr/include/regex.h
@@ -110,3 +110,44 @@ SELECT '\t' REGEXP '[[:space:]]';
--echo #
SELECT REGEXP_INSTR('111222333',2);
+--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-33344 REGEXP empty string inconsistent
+--echo #
+create table t1 (x char(5));
+insert t1 values (''), ('x');
+select 'foo' regexp x from t1 order by x asc;
+select 'foo' regexp x from t1 order by x desc;
+drop table t1;
+
+--echo #
+--echo # MDEV-21076 NOT NULL and UNIQUE constraints cause SUM() to yield an incorrect result
+--echo #
+
+CREATE TABLE t0(c0 INT NOT NULL, c1 CHAR UNIQUE);
+INSERT INTO t0 VALUES (0, 1);
+INSERT INTO t0 VALUES (0, '');
+SELECT (c1 RLIKE c1), (c0 IS NULL) FROM t0;
+SELECT SUM(a.t) FROM (SELECT (c1 RLIKE c1) = (c0 IS NULL) as t FROM t0) as a;
+DROP TABLE t0;
+
+--echo #
+--echo # MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt
+--echo #
+
+CREATE TABLE t1 (c0 INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--error ER_REGEXP_ERROR
+SELECT ('' RLIKE '[') AS c1 FROM t1;
+
+--error ER_REGEXP_ERROR
+SELECT REGEXP_INSTR('','[') AS c1 FROM t1;
+
+SELECT c0, '' RLIKE NULL AS c1, REGEXP_INSTR('', NULL) AS c2
+FROM t1 ORDER BY c0;
+
+DROP TABLE t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/func_sformat.result b/mysql-test/main/func_sformat.result
index 9e8a1167..11825604 100644
--- a/mysql-test/main/func_sformat.result
+++ b/mysql-test/main/func_sformat.result
@@ -23,10 +23,8 @@ select sformat('{} {}', 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, 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);
-sformat('{} {}', 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, 0, 0, 0, 0, 0) as x;
+x
0 0
select sformat('{{{}}}', 0);
sformat('{{{}}}', 0)
@@ -78,10 +76,8 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
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);
-sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
- {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
- {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120) as x;
+x
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
@@ -97,10 +93,8 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
'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');
-sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
- {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
- {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+'115', '116', '117', '118', '119', '120') as x;
+x
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
@@ -159,8 +153,8 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
(0.0005, 5, 'B', DATE('2020-6-29')),
(5.5555, -5, 'C', DATE('200629')),
(-9, -9, 'D', DATE('20*06*29'));
-select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
-sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4)
+select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) x from t2;
+x
p1 0.0025 p2 25 p3 A p4 2020-06-29
p1 0.0005 p2 5 p3 B p4 2020-06-29
p1 5.5555 p2 -5 p3 C p4 2020-06-29
@@ -279,14 +273,14 @@ sformat('{: f}; {: f}', 3.14, -3.14)
select sformat('{:-f}; {:-f}', 3.14, -3.14);
sformat('{:-f}; {:-f}', 3.14, -3.14)
3.140000; -3.140000
-select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
-sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7)
+select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7) x;
+x
The temperature is between -3 and 7 degrees celsius.
-select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
-sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7)
+select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7) x;
+x
The temperature is between -3 and 7 degrees celsius.
-select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
-sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7)
+select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7) x;
+x
The temperature is between -3 and +7 degrees celsius.
select sformat('We have {:<8} chickens.', 49);
sformat('We have {:<8} chickens.', 49)
@@ -427,8 +421,8 @@ set names utf8;
select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')
=теÑÑ‚=
-select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
-hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'))
+select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')) x;
+x
003D0442043504410442003D
create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
show create table t1;
diff --git a/mysql-test/main/func_sformat.test b/mysql-test/main/func_sformat.test
index 65e4b639..4744229e 100644
--- a/mysql-test/main/func_sformat.test
+++ b/mysql-test/main/func_sformat.test
@@ -14,14 +14,11 @@ select sformat(0);
select sformat('C');
select sformat(-4.2);
select sformat(5, 5, 5);
-#enable after fix MDEV-27871
---disable_view_protocol
select sformat('{} {}', 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, 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);
---enable_view_protocol
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) as x;
select sformat('{{{}}}', 0);
select sformat('{{{}{{', 0);
select sformat('{{{{{}{{', 'param1');
@@ -29,18 +26,13 @@ select sformat(' {{ {{ {} {{ ', 'param1');
select sformat(' {{ {} {}', 'param1', 'param2');
select sformat('A{}C{}E{}', 'B', 'D', 'F');
select sformat('{} {}', FALSE, TRUE);
-#enable after fix MDEV-29601
---disable_service_connection
select sformat('Add € != {} != {}?', '$', '£');
select sformat('Check {} != {} != {}?', '€', '$', '£');
---enable_service_connection
select sformat('{}{}{}', 1, 2, 3);
select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
select sformat('SUM {} + {} = {}', 2, 3, 2+3);
select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
select sformat('what {} is {}?', 'time', 'it');
-#enable after fix MDEV-27871
---disable_view_protocol
select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
@@ -49,7 +41,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
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);
+ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120) as x;
select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
@@ -61,8 +53,7 @@ select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {
'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');
---enable_view_protocol
+ '115', '116', '117', '118', '119', '120') as x;
echo #;
echo # Error Test Cases;
@@ -92,10 +83,7 @@ insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
(0.0005, 5, 'B', DATE('2020-6-29')),
(5.5555, -5, 'C', DATE('200629')),
(-9, -9, 'D', DATE('20*06*29'));
-#enable after fix MDEV-27871
---disable_view_protocol
-select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
---enable_view_protocol
+select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) x from t2;
drop table t2;
set names utf8;
@@ -127,10 +115,7 @@ echo #;
echo # Format Test Cases;
echo #;
select sformat('Num {:L}', 13800000000);
-#enable after fix MDEV-29646
---disable_view_protocol
select sformat('Num [{:20}]', 42);
---enable_view_protocol
select sformat('Number: {:*^{}}', 4, 5);
select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
select sformat('Character {:c}', 104);
@@ -141,10 +126,7 @@ select sformat('Float {:.2f}', 42.0);
select sformat('Float {:f}', 42.0);
select sformat('Number {:d}', 42);
select sformat('Number {:{}}', 5, 5);
-#enable after fix MDEV-29646
---disable_view_protocol
select sformat('Number [{:10}]', 9999);
---enable_view_protocol
select sformat('Number {:.3}', 3.1416);
select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
select sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42);
@@ -155,16 +137,10 @@ select sformat('The binary version of {0} is {0:b}', 5);
select sformat('{:+f}; {:+f}', 3.14, -3.14);
select sformat('{: f}; {: f}', 3.14, -3.14);
select sformat('{:-f}; {:-f}', 3.14, -3.14);
-#enable after fix MDEV-27871
---disable_view_protocol
-select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
-select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
-select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
---enable_view_protocol
-#check after fix MDEV-29646
---disable_view_protocol
+select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7) x;
+select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7) x;
+select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7) x;
select sformat('We have {:<8} chickens.', 49);
---enable_view_protocol
select sformat('Center alimgn [{:*^10}]', 'data');
select sformat('Center aling [{:^10}].', 'data');
select sformat('Right aling [{:>10}].', 'data');
@@ -175,20 +151,31 @@ select sformat('Change Order {1} {0}', 'second', 'first');
echo #;
echo # Failed Format Test Cases;
echo #;
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('Test {:c}', 'word');
select sformat('Test {one} {two} {three}', 1, 2, 3);
select sformat('Number {:{<}', 8);
select sformat('Number {:10000000000}', 5);
select sformat('1={1} 2={2} 0={0}', 0, 1);
+--replace_regex /invalid format specifier/precision not allowed for this argument type/
select sformat('Number {:.2d}', 42);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('You scored {:.0%}', 0.25);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('You scored {:%}', 0.25);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('The price is {:f} dollars.', 45);
+--replace_regex /invalid format specifier/precision not allowed for this argument type/
select sformat('The price is {:.2f} dollars.', 45);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('We have {:E} chickens.', 5);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('We have {:e} chickens.', 5);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('The universe is {:,} years old.', 13800000000);
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('The universe is {:_} years old.', 13800000000);
+--replace_regex /invalid format specifier/format specifier requires numeric argument/
select sformat('String {:-}', 'hello');
echo #;
@@ -211,6 +198,7 @@ drop table t2;
echo #;
echo # Unsupported/disabled features;
echo #;
+--replace_regex /invalid format specifier/invalid type specifier/
select sformat('{:p}', '50');
echo #;
@@ -219,10 +207,7 @@ echo #;
select sformat('={}=', _ucs2 x'006100620063');
set names utf8;
select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
-#enable after fix MDEV-27871
---disable_view_protocol
-select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
---enable_view_protocol
+select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')) x;
create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
show create table t1;
drop table t1;
@@ -233,6 +218,7 @@ echo # ps parameters;
echo #;
prepare s from 'select sformat("={:d}=", ?)';
execute s using 100;
+--replace_regex /invalid format specifier/invalid type specifier/
execute s using 'abc';
echo #;
diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result
index 0d46453c..20817dba 100644
--- a/mysql-test/main/func_str.result
+++ b/mysql-test/main/func_str.result
@@ -7,7 +7,7 @@ select 'hello',"'hello'",'""hello""','''h''e''l''l''o''',"hel""lo",'hel\'lo';
hello 'hello' ""hello"" 'h'e'l'l'o' hel"lo hel'lo
hello 'hello' ""hello"" 'h'e'l'l'o' hel"lo hel'lo
select 'hello' 'monty';
-hello
+hellomonty
hellomonty
select length('\n\t\r\b\0\_\%\\');
length('\n\t\r\b\0\_\%\\')
@@ -5487,3 +5487,37 @@ Warning 1292 Truncated incorrect BINARY(2) value: '...random bytes...'
#
# End of 10.10 tests
#
+#
+# Start of 10.11 tests
+#
+#
+# MDEV-33392 Server crashes when using RANDOM_BYTES function and GROUP BY clause on a column with a negative value
+#
+SET sql_mode='';
+CREATE TABLE t1 (a VARCHAR(255)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (9494),(9495),(9496),(9497),(9498),(9499),(9500),(9501),(9502),(9503);
+SELECT RANDOM_BYTES (-1) f1,a f2 FROM t1 GROUP BY f1,f2;
+f1 f2
+NULL 9494
+NULL 9495
+NULL 9496
+NULL 9497
+NULL 9498
+NULL 9499
+NULL 9500
+NULL 9501
+NULL 9502
+NULL 9503
+CREATE TABLE t2 AS SELECT RANDOM_BYTES (-1) f1,a f2 FROM t1 GROUP BY f1,f2;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` binary(0) DEFAULT NULL,
+ `f2` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t2;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# End of 10.11 tests
+#
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index e939b21e..b34623d9 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -2457,3 +2457,25 @@ select "a" in ("abc", (convert(random_bytes(8) ,binary(2))));
--echo #
--echo # End of 10.10 tests
--echo #
+
+--echo #
+--echo # Start of 10.11 tests
+--echo #
+
+--echo #
+--echo # MDEV-33392 Server crashes when using RANDOM_BYTES function and GROUP BY clause on a column with a negative value
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (a VARCHAR(255)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (9494),(9495),(9496),(9497),(9498),(9499),(9500),(9501),(9502),(9503);
+SELECT RANDOM_BYTES (-1) f1,a f2 FROM t1 GROUP BY f1,f2;
+CREATE TABLE t2 AS SELECT RANDOM_BYTES (-1) f1,a f2 FROM t1 GROUP BY f1,f2;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # End of 10.11 tests
+--echo #
diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result
index 8b21906d..bf7d9748 100644
--- a/mysql-test/main/func_time.result
+++ b/mysql-test/main/func_time.result
@@ -3142,7 +3142,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t1 t1 a a 12 26 26 Y 128 6 63
def EXTRACT(YEAR FROM a) 3 4 4 Y 32896 0 63
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(QUARTER FROM a) 3 1 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 3 2 Y 32896 0 63
@@ -3230,11 +3230,11 @@ SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` datetime(6) DEFAULT NULL,
- `EXTRACT(YEAR FROM a)` int(4) DEFAULT NULL,
- `EXTRACT(YEAR_MONTH FROM a)` int(6) DEFAULT NULL,
+ `EXTRACT(YEAR FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(YEAR_MONTH FROM a)` int(7) DEFAULT NULL,
`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(MONTH FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(WEEK FROM a)` int(3) 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,
@@ -3281,7 +3281,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t1 t1 a a 11 17 17 Y 128 6 63
def EXTRACT(YEAR FROM a) 3 4 1 Y 32896 0 63
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(QUARTER FROM a) 3 1 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 3 3 Y 32896 0 63
@@ -3411,11 +3411,11 @@ SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` time(6) DEFAULT NULL,
- `EXTRACT(YEAR FROM a)` int(4) DEFAULT NULL,
- `EXTRACT(YEAR_MONTH FROM a)` int(6) DEFAULT NULL,
+ `EXTRACT(YEAR FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(YEAR_MONTH FROM a)` int(7) DEFAULT NULL,
`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(MONTH FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(WEEK FROM a)` int(3) 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,
@@ -6373,3 +6373,57 @@ NULL
SELECT FROM_UNIXTIME(LEAST(3696610869, NULL));
FROM_UNIXTIME(LEAST(3696610869, NULL))
NULL
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-29149 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed
+#
+SET @@timestamp= UNIX_TIMESTAMP('2022-07-21 23:00:00');
+SELECT DATE_SUB('2022-07-21 00:00:00', INTERVAL 800 HOUR) AS expected_result;
+expected_result
+2022-06-17 16:00:00
+SELECT
+IF(1,TIMEDIFF('38:59:59','839:00:00'),CAST('2022-12-12' AS DATE)) AS c1,
+IF(1,TIMEDIFF('-839:00:00','-38:59:59'),CAST('2022-12-12' AS DATE)) AS c2;
+c1 c2
+2022-06-17 16:00:00 2022-06-17 16:00:00
+Warnings:
+Warning 1292 Truncated incorrect time value: '839:00:00'
+Warning 1292 Truncated incorrect time value: '-839:00:00'
+SELECT
+IF(1,TIMEDIFF(385959,8390000),CAST('2022-12-12' AS DATE)) AS c1,
+IF(1,TIMEDIFF(-8390000,-385959),CAST('2022-12-12' AS DATE)) AS c2;
+c1 c2
+2022-06-17 16:00:00 2022-06-17 16:00:00
+Warnings:
+Warning 1292 Truncated incorrect time value: '8390000'
+Warning 1292 Truncated incorrect time value: '-8390000'
+SELECT
+TIMEDIFF('38:59:59','839:00:00') AS c1,
+CAST(TIMEDIFF('38:59:59','839:00:00') AS TIME(6)) AS c2,
+TIMEDIFF('839:00:00','38:59:59') AS c3,
+CAST(TIMEDIFF('839:00:00','38:59:59') AS TIME(6)) AS c4;
+c1 c2 c3 c4
+-800:00:00 -800:00:00.000000 800:00:00 800:00:00.000000
+Warnings:
+Warning 1292 Truncated incorrect time value: '839:00:00'
+Warning 1292 Truncated incorrect time value: '839:00:00'
+Warning 1292 Truncated incorrect time value: '839:00:00'
+Warning 1292 Truncated incorrect time value: '839:00:00'
+SELECT
+TIMEDIFF(385959,8390000) AS c1,
+CAST(TIMEDIFF(385959,8390000) AS TIME(6)) AS c2,
+TIMEDIFF(8390000,385959) AS c3,
+CAST(TIMEDIFF(8390000,385959) AS TIME(6)) AS c4;
+c1 c2 c3 c4
+-800:00:00 -800:00:00.000000 800:00:00 800:00:00.000000
+Warnings:
+Warning 1292 Truncated incorrect time value: '8390000'
+Warning 1292 Truncated incorrect time value: '8390000'
+Warning 1292 Truncated incorrect time value: '8390000'
+Warning 1292 Truncated incorrect time value: '8390000'
+SET @@timestamp= DEFAULT;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index fb184ab4..caf6ec1c 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -3218,3 +3218,42 @@ SELECT CONCAT(MAKETIME('01', '01', LEAST( -100, NULL )));
--echo #
SELECT FROM_UNIXTIME(LEAST(3696610869, NULL));
+
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-29149 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed
+--echo #
+
+SET @@timestamp= UNIX_TIMESTAMP('2022-07-21 23:00:00');
+
+SELECT DATE_SUB('2022-07-21 00:00:00', INTERVAL 800 HOUR) AS expected_result;
+
+SELECT
+ IF(1,TIMEDIFF('38:59:59','839:00:00'),CAST('2022-12-12' AS DATE)) AS c1,
+ IF(1,TIMEDIFF('-839:00:00','-38:59:59'),CAST('2022-12-12' AS DATE)) AS c2;
+
+SELECT
+ IF(1,TIMEDIFF(385959,8390000),CAST('2022-12-12' AS DATE)) AS c1,
+ IF(1,TIMEDIFF(-8390000,-385959),CAST('2022-12-12' AS DATE)) AS c2;
+
+SELECT
+ TIMEDIFF('38:59:59','839:00:00') AS c1,
+ CAST(TIMEDIFF('38:59:59','839:00:00') AS TIME(6)) AS c2,
+ TIMEDIFF('839:00:00','38:59:59') AS c3,
+ CAST(TIMEDIFF('839:00:00','38:59:59') AS TIME(6)) AS c4;
+
+SELECT
+ TIMEDIFF(385959,8390000) AS c1,
+ CAST(TIMEDIFF(385959,8390000) AS TIME(6)) AS c2,
+ TIMEDIFF(8390000,385959) AS c3,
+ CAST(TIMEDIFF(8390000,385959) AS TIME(6)) AS c4;
+
+SET @@timestamp= DEFAULT;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/function_defaults.result b/mysql-test/main/function_defaults.result
index d53e929c..5f5a4c87 100644
--- a/mysql-test/main/function_defaults.result
+++ b/mysql-test/main/function_defaults.result
@@ -3145,3 +3145,28 @@ a b c
2 2010-10-10 10:10:10 x
drop table t1;
set timestamp=default;
+#
+# MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE
+#
+create table t1 (
+a int,
+b timestamp default '2010-10-10 10:10:10' on update now(),
+c varchar(100) default 'x');
+create table t2 (a int primary key);
+insert t1 (a) values (1),(2);
+insert t2 (a) values (1),(2);
+select * from t1;
+a b c
+1 2010-10-10 10:10:10 x
+2 2010-10-10 10:10:10 x
+set timestamp=unix_timestamp('2011-11-11 11-11-11');
+update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a;
+select * from t1;
+a b c
+1 2010-10-10 10:10:10 2010-10-10 10:10:10
+2 2010-10-10 10:10:10 x
+drop table t1, t2;
+set timestamp=default;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/function_defaults.test b/mysql-test/main/function_defaults.test
index dd3ba109..59776118 100644
--- a/mysql-test/main/function_defaults.test
+++ b/mysql-test/main/function_defaults.test
@@ -67,3 +67,26 @@ update t1 set b=default, c=default(b) where a=1;
select * from t1;
drop table t1;
set timestamp=default;
+
+--echo #
+--echo # MDEV-33790: Incorrect DEFAULT expression evaluated in UPDATE
+--echo #
+
+create table t1 (
+ a int,
+ b timestamp default '2010-10-10 10:10:10' on update now(),
+ c varchar(100) default 'x');
+create table t2 (a int primary key);
+insert t1 (a) values (1),(2);
+insert t2 (a) values (1),(2);
+
+select * from t1;
+set timestamp=unix_timestamp('2011-11-11 11-11-11');
+update t1,t2 set b=default, c=default(b) where t1.a=1 and t1.a= t2.a;
+select * from t1;
+drop table t1, t2;
+set timestamp=default;
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index d8d42489..8097c7a8 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -5072,37 +5072,37 @@ ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(PO
# MDEV-20009 Add CAST(expr AS pluggable_type)
#
SELECT CAST(1 AS GEOMETRY);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometry)'
SELECT CAST(1 AS GEOMETRYCOLLECTION);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometrycollection)'
SELECT CAST(1 AS POINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS point)'
SELECT CAST(1 AS LINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS linestring)'
SELECT CAST(1 AS POLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS polygon)'
SELECT CAST(1 AS MULTIPOINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipoint)'
SELECT CAST(1 AS MULTILINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multilinestring)'
SELECT CAST(1 AS MULTIPOLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipolygon)'
SELECT CONVERT(1, GEOMETRY);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometry)'
SELECT CONVERT(1, GEOMETRYCOLLECTION);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometrycollection)'
SELECT CONVERT(1, POINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS point)'
SELECT CONVERT(1, LINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS linestring)'
SELECT CONVERT(1, POLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS polygon)'
SELECT CONVERT(1, MULTIPOINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipoint)'
SELECT CONVERT(1, MULTILINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multilinestring)'
SELECT CONVERT(1, MULTIPOLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipolygon)'
#
# MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRY
#
diff --git a/mysql-test/main/host_cache_size_functionality.test b/mysql-test/main/host_cache_size_functionality.test
index 9ec26010..f37b2ab8 100644
--- a/mysql-test/main/host_cache_size_functionality.test
+++ b/mysql-test/main/host_cache_size_functionality.test
@@ -43,10 +43,10 @@ select @@global.Host_Cache_Size > 0;
--echo # Restart server with Host_Cache_Size 1
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--shutdown_server
--source include/wait_until_disconnected.inc
--- exec echo "restart:--host_cache_size=1 " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "restart:--host_cache_size=1 " $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-- enable_reconnect
-- source include/wait_until_connected_again.inc
@@ -142,10 +142,10 @@ SELECT Host_Cache_Size = @@SESSION.Host_Cache_Size;
#--remove_file $MYSQL_TMP_DIR/bind_ip
#let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
-#--exec echo "wait" > $restart_file
+#--write_line wait $restart_file
#--shutdown_server
#--source include/wait_until_disconnected.inc
-#-- exec echo "restart:--bind-address=$bind_ip " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#-- write_line "restart:--bind-address=$bind_ip " $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#-- enable_reconnect
#-- source include/wait_until_connected_again.inc
diff --git a/mysql-test/main/information_schema2.result b/mysql-test/main/information_schema2.result
index e23e81b8..fa4d71bf 100644
--- a/mysql-test/main/information_schema2.result
+++ b/mysql-test/main/information_schema2.result
@@ -1,3 +1,6 @@
+#
+# MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling
+#
select variable_name from information_schema.session_status where variable_name =
(select variable_name from information_schema.session_status where variable_name = 'uptime');
variable_name
@@ -6,6 +9,9 @@ select variable_name from information_schema.session_variables where variable_na
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
variable_name
BASEDIR
+#
+# MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows
+#
create table t1 (x int);
create table t2 (x int);
create table t3 (x int);
@@ -18,3 +24,15 @@ t2
t3
t4
drop table t1, t2, t3, t4;
+# End of 5.5 tests
+# INFORMATION_SCHEMA.STATISTICS doesn't show if the index is disabled
+create table t1 (a int, key(a));
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+index_name comment
+a
+alter table t1 disable keys;
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+index_name comment
+a disabled
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/main/information_schema2.test b/mysql-test/main/information_schema2.test
index d2fa3da2..50ceec2c 100644
--- a/mysql-test/main/information_schema2.test
+++ b/mysql-test/main/information_schema2.test
@@ -1,15 +1,15 @@
-#
-# MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling
-#
+--echo #
+--echo # MDEV-4029 SELECT on information_schema using a subquery locks up the information_schema table due to incorrect mutexes handling
+--echo #
select variable_name from information_schema.session_status where variable_name =
(select variable_name from information_schema.session_status where variable_name = 'uptime');
select variable_name from information_schema.session_variables where variable_name =
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
-#
-# MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows
-#
+--echo #
+--echo # MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows
+--echo #
create table t1 (x int);
create table t2 (x int);
create table t3 (x int);
@@ -17,3 +17,14 @@ create table t4 AS select table_name from information_schema.TABLES where table_
delete from t4 where table_name not in (select table_name from information_schema.TABLES where table_schema = database() and table_type = 'BASE TABLE');
select * from t4 order by table_name;
drop table t1, t2, t3, t4;
+
+--echo # End of 5.5 tests
+
+--echo # INFORMATION_SCHEMA.STATISTICS doesn't show if the index is disabled
+create table t1 (a int, key(a));
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+alter table t1 disable keys;
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+drop table t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/init_file_set_password-7656.test b/mysql-test/main/init_file_set_password-7656.test
index 7bca34a0..ac5baa3b 100644
--- a/mysql-test/main/init_file_set_password-7656.test
+++ b/mysql-test/main/init_file_set_password-7656.test
@@ -15,12 +15,12 @@ EOF
--enable_reconnect
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart:--init-file=$MYSQLTEST_VARDIR/init.file " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "restart:--init-file=$MYSQLTEST_VARDIR/init.file " $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
select user,host,password,plugin,authentication_string from mysql.user where user='foo';
diff --git a/mysql-test/main/innodb_ext_key,covering,innodb,on.rdiff b/mysql-test/main/innodb_ext_key,covering,on.rdiff
index 0d8bcc6c..0d8bcc6c 100644
--- a/mysql-test/main/innodb_ext_key,covering,innodb,on.rdiff
+++ b/mysql-test/main/innodb_ext_key,covering,on.rdiff
diff --git a/mysql-test/main/innodb_ext_key,off.rdiff b/mysql-test/main/innodb_ext_key,off.rdiff
index 378c639e..f27df1d0 100644
--- a/mysql-test/main/innodb_ext_key,off.rdiff
+++ b/mysql-test/main/innodb_ext_key,off.rdiff
@@ -163,7 +163,7 @@
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
@@ -220,12 +220,12 @@
5959 3
- show status like 'handler_read_next';
+ show /*a*/ status like 'handler_read_next';
Variable_name Value
-Handler_read_next 3
+Handler_read_next 9
@@ -177,7 +177,7 @@
select max(l_orderkey) from lineitem
where l_partkey between 1 and 10 group by l_partkey;
@@ -243,9 +243,9 @@
- show status like 'handler_read%';
+ show /*b*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 21
@@ -199,7 +199,7 @@
select max(l_orderkey) from lineitem
where l_suppkey in (1,4) group by l_suppkey;
@@ -265,9 +265,9 @@
- show status like 'handler_read%';
+ show /*c*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 6
diff --git a/mysql-test/main/innodb_ext_key,innodb,on,unoptimized.rdiff b/mysql-test/main/innodb_ext_key,on,unoptimized.rdiff
index 0d8bcc6c..0d8bcc6c 100644
--- a/mysql-test/main/innodb_ext_key,innodb,on,unoptimized.rdiff
+++ b/mysql-test/main/innodb_ext_key,on,unoptimized.rdiff
diff --git a/mysql-test/main/innodb_ext_key.result b/mysql-test/main/innodb_ext_key.result
index 456513dc..ba91b57a 100644
--- a/mysql-test/main/innodb_ext_key.result
+++ b/mysql-test/main/innodb_ext_key.result
@@ -14,7 +14,7 @@ flush status;
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
count(*)
1
-show status like 'handler_read%';
+show /*1*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -35,7 +35,7 @@ select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
count(*)
1
-show status like 'handler_read%';
+show /*2*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -56,7 +56,7 @@ select count(*) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
count(*)
1
-show status like 'handler_read%';
+show /*3*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -79,7 +79,7 @@ l_orderkey l_linenumber
1088 3
1217 1
1221 3
-show status like 'handler_read%';
+show /*4*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -98,7 +98,7 @@ flush status;
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
min(l_orderkey)
130
-show status like 'handler_read%';
+show /*5*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -119,7 +119,7 @@ select min(l_orderkey) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
min(l_orderkey)
1088
-show status like 'handler_read%';
+show /*6*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -140,7 +140,7 @@ select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130;
max(l_linenumber)
2
-show status like 'handler_read%';
+show /*7*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 1
@@ -166,7 +166,7 @@ or l_receiptdate='1992-07-01' and l_orderkey=5603;
l_orderkey l_linenumber
130 2
5603 2
-show status like 'handler_read%';
+show /*8*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 2
@@ -193,7 +193,7 @@ l_orderkey l_linenumber
130 2
5603 2
5959 3
-show status like 'handler_read%';
+show /*9*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 2
@@ -218,7 +218,7 @@ l_orderkey l_linenumber
130 2
5603 2
5959 3
-show status like 'handler_read_next';
+show /*a*/ status like 'handler_read_next';
Variable_name Value
Handler_read_next 3
explain
@@ -240,7 +240,7 @@ max(l_orderkey)
5894
5859
5632
-show status like 'handler_read%';
+show /*b*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 21
@@ -262,7 +262,7 @@ where l_suppkey in (1,4) group by l_suppkey;
max(l_orderkey)
5988
5984
-show status like 'handler_read%';
+show /*c*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 6
@@ -292,7 +292,7 @@ where p_retailprice > 1100 and o_orderdate='1997-01-01'
and o_orderkey=l_orderkey and p_partkey=l_partkey;
o_orderkey p_partkey
5895 200
-show status like 'handler_read%';
+show /*d*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 3
@@ -457,7 +457,7 @@ select * from t1, t2 where t2.a=t1.a and t2.b < 2;
a pk a b
0 0 0 0
1 1 1 1
-show status like 'handler_read%';
+show /*e*/ status like 'handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 10
diff --git a/mysql-test/main/innodb_ext_key.test b/mysql-test/main/innodb_ext_key.test
index abec58a1..3d3a14c8 100644
--- a/mysql-test/main/innodb_ext_key.test
+++ b/mysql-test/main/innodb_ext_key.test
@@ -5,6 +5,8 @@
--source include/innodb_prefix_index_cluster_optimization.inc
--source include/no_valgrind_without_big.inc
+--source include/innodb_stable_estimates.inc
+
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
set @innodb_stats_persistent_save= @@innodb_stats_persistent;
@@ -32,7 +34,7 @@ explain
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
flush status;
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
-show status like 'handler_read%';
+show /*1*/ status like 'handler_read%';
explain
select count(*) from lineitem use index(primary)
@@ -40,7 +42,7 @@ select count(*) from lineitem use index(primary)
flush status;
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%';
+show /*2*/ status like 'handler_read%';
explain
select count(*) from lineitem
@@ -48,7 +50,7 @@ select count(*) from lineitem
flush status;
select count(*) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
-show status like 'handler_read%';
+show /*3*/ status like 'handler_read%';
explain
select l_orderkey, l_linenumber from lineitem
@@ -56,13 +58,13 @@ select l_orderkey, l_linenumber from lineitem
flush status;
select l_orderkey, l_linenumber from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
-show status like 'handler_read%';
+show /*4*/ status like 'handler_read%';
explain
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
flush status;
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
-show status like 'handler_read%';
+show /*5*/ status like 'handler_read%';
explain
select min(l_orderkey) from lineitem
@@ -70,7 +72,7 @@ select min(l_orderkey) from lineitem
flush status;
select min(l_orderkey) from lineitem
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
-show status like 'handler_read%';
+show /*6*/ status like 'handler_read%';
explain
select max(l_linenumber) from lineitem
@@ -78,7 +80,7 @@ select max(l_linenumber) from lineitem
flush status;
select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130;
-show status like 'handler_read%';
+show /*7*/ status like 'handler_read%';
explain
select l_orderkey, l_linenumber
@@ -90,7 +92,7 @@ select l_orderkey, l_linenumber
from lineitem use index (i_l_shipdate, i_l_receiptdate)
where l_shipdate='1992-07-01' and l_orderkey=130
or l_receiptdate='1992-07-01' and l_orderkey=5603;
-show status like 'handler_read%';
+show /*8*/ status like 'handler_read%';
--replace_column 7 #
explain
@@ -103,7 +105,7 @@ select l_orderkey, l_linenumber
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;
-show status like 'handler_read%';
+show /*9*/ status like 'handler_read%';
--replace_column 7 # 9 # 10 Using
explain
@@ -114,7 +116,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_next';
+show /*a*/ status like 'handler_read_next';
--replace_column 9 #
explain
@@ -123,7 +125,7 @@ select max(l_orderkey) from lineitem
flush status;
select max(l_orderkey) from lineitem
where l_partkey between 1 and 10 group by l_partkey;
-show status like 'handler_read%';
+show /*b*/ status like 'handler_read%';
--replace_column 9 #
explain
@@ -132,7 +134,7 @@ select max(l_orderkey) from lineitem
flush status;
select max(l_orderkey) from lineitem
where l_suppkey in (1,4) group by l_suppkey;
-show status like 'handler_read%';
+show /*c*/ status like 'handler_read%';
create index i_p_retailprice on part(p_retailprice);
@@ -149,7 +151,7 @@ select o_orderkey, p_partkey
lineitem use index (i_l_partkey), orders
where p_retailprice > 1100 and o_orderdate='1997-01-01'
and o_orderkey=l_orderkey and p_partkey=l_partkey;
-show status like 'handler_read%';
+show /*d*/ status like 'handler_read%';
--enable_ps2_protocol
--echo #
@@ -325,7 +327,7 @@ explain
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
flush status;
select * from t1, t2 where t2.a=t1.a and t2.b < 2;
-show status like 'handler_read%';
+show /*e*/ status like 'handler_read%';
--enable_ps2_protocol
drop table t1,t2;
diff --git a/mysql-test/main/insert_select.result b/mysql-test/main/insert_select.result
index 29618c6d..463f571b 100644
--- a/mysql-test/main/insert_select.result
+++ b/mysql-test/main/insert_select.result
@@ -973,7 +973,6 @@ select * from t1;
a
3
1
-2
delete from t1;
insert into t1 values (3), (1);
insert into t1
@@ -984,8 +983,6 @@ select * from t1;
a
3
1
-3
-2
delete from t1;
insert into t1 values (3), (1);
insert into t1
@@ -996,6 +993,7 @@ select * from t1;
a
3
1
+3
2
delete from t1;
insert into t1 values (3), (1);
@@ -1022,7 +1020,6 @@ select * from t1;
a
3
1
-2
delete from t1;
insert into t1 values (3), (1);
execute stmt;
@@ -1030,7 +1027,6 @@ select * from t1;
a
3
1
-2
delete from t1;
insert into t1 values (3), (1);
delete from t1
@@ -1040,6 +1036,8 @@ group by (select * from (select a from t1) dt
where a = 1)));
select * from t1;
a
+3
+1
deallocate prepare stmt;
drop table t1,t2,t3;
#
diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result
index fe195cd8..b5789142 100644
--- a/mysql-test/main/join.result
+++ b/mysql-test/main/join.result
@@ -894,7 +894,7 @@ show status like 'Last_query_cost';
Variable_name Value
Last_query_cost 4.016090
select 'The cost of accessing t1 (dont care if it changes' '^';
-The cost of accessing t1 (dont care if it changes
+The cost of accessing t1 (dont care if it changes^
The cost of accessing t1 (dont care if it changes^
select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' Z;
Z
@@ -3423,6 +3423,62 @@ SELECT COUNT(*) FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON t2.b = t3.c) ON t1.a = t2.
COUNT(*)
2
DROP TABLE t1, t2, t3;
+#
+# MDEV-30975: Wrong result with cross Join given join order
+#
+CREATE TABLE `t1` (
+`t1_seq` INT NOT NULL,
+`c1` VARCHAR(10) NOT NULL ,
+PRIMARY KEY (`t1_seq`) USING BTREE
+);
+CREATE TABLE `t2` (
+`t2_seq` INT NOT NULL,
+`t1_seq` INT NOT NULL,
+`c2` VARCHAR(10) NOT NULL ,
+PRIMARY KEY (`t2_seq`, `t1_seq`) USING BTREE
+);
+INSERT INTO t1 VALUES(1, 'A');
+INSERT INTO t2 VALUES(1, 1, 'T2-1-1');
+INSERT INTO t2 VALUES(2, 1, 'T2-1-2');
+INSERT INTO t2 VALUES(3, 1, 'T2-1-3');
+SELECT LPAD(@rownum := @rownum + 1, 8, 0) AS str_num
+, t1.t1_seq
+, t2.t2_seq
+, t1.c1
+, t2.c2
+FROM t1
+INNER JOIN t2 ON (t1.t1_seq = t2.t1_seq)
+CROSS JOIN ( SELECT @rownum := 0 ) X;
+str_num t1_seq t2_seq c1 c2
+00000001 1 1 A T2-1-1
+00000002 1 2 A T2-1-2
+00000003 1 3 A T2-1-3
+SELECT STRAIGHT_JOIN LPAD(@rownum := @rownum + 1, 8, 0) AS str_num
+, t1.t1_seq
+, t2.t2_seq
+, t1.c1
+, t2.c2
+FROM t1
+INNER JOIN t2 ON (t1.t1_seq = t2.t1_seq)
+CROSS JOIN ( SELECT @rownum := 0 ) X;
+str_num t1_seq t2_seq c1 c2
+00000001 1 1 A T2-1-1
+00000002 1 2 A T2-1-2
+00000003 1 3 A T2-1-3
+SELECT STRAIGHT_JOIN * FROM t1 JOIN t2 ON (t1.t1_seq = t2.t1_seq) JOIN (SELECT @a := 0) x;
+t1_seq c1 t2_seq t1_seq c2 @a := 0
+1 A 1 1 T2-1-1 0
+1 A 2 1 T2-1-2 0
+1 A 3 1 T2-1-3 0
+SELECT * FROM t1 JOIN t2 ON (t1.t1_seq = t2.t1_seq) JOIN (SELECT @a := 0) x;
+t1_seq c1 t2_seq t1_seq c2 @a := 0
+1 A 1 1 T2-1-1 0
+1 A 2 1 T2-1-2 0
+1 A 3 1 T2-1-3 0
+SELECT STRAIGHT_JOIN c1 FROM t1 JOIN (SELECT @a := 0) x;
+c1
+A
+DROP TABLE t1, t2;
# End of 10.5 tests
#
# MDEV-31449: Assertion s->table->opt_range_condition_rows <= s->found_records
diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test
index a59e53d8..a4d34f41 100644
--- a/mysql-test/main/join.test
+++ b/mysql-test/main/join.test
@@ -1838,6 +1838,52 @@ SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON t2.b = t3.c) ON t1.a = t2.b;
SELECT COUNT(*) FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON t2.b = t3.c) ON t1.a = t2.b;
DROP TABLE t1, t2, t3;
+--echo #
+--echo # MDEV-30975: Wrong result with cross Join given join order
+--echo #
+
+CREATE TABLE `t1` (
+ `t1_seq` INT NOT NULL,
+ `c1` VARCHAR(10) NOT NULL ,
+ PRIMARY KEY (`t1_seq`) USING BTREE
+);
+
+CREATE TABLE `t2` (
+ `t2_seq` INT NOT NULL,
+ `t1_seq` INT NOT NULL,
+ `c2` VARCHAR(10) NOT NULL ,
+ PRIMARY KEY (`t2_seq`, `t1_seq`) USING BTREE
+);
+
+INSERT INTO t1 VALUES(1, 'A');
+INSERT INTO t2 VALUES(1, 1, 'T2-1-1');
+INSERT INTO t2 VALUES(2, 1, 'T2-1-2');
+INSERT INTO t2 VALUES(3, 1, 'T2-1-3');
+
+SELECT LPAD(@rownum := @rownum + 1, 8, 0) AS str_num
+ , t1.t1_seq
+ , t2.t2_seq
+ , t1.c1
+ , t2.c2
+ FROM t1
+ INNER JOIN t2 ON (t1.t1_seq = t2.t1_seq)
+ CROSS JOIN ( SELECT @rownum := 0 ) X;
+
+SELECT STRAIGHT_JOIN LPAD(@rownum := @rownum + 1, 8, 0) AS str_num
+ , t1.t1_seq
+ , t2.t2_seq
+ , t1.c1
+ , t2.c2
+ FROM t1
+ INNER JOIN t2 ON (t1.t1_seq = t2.t1_seq)
+ CROSS JOIN ( SELECT @rownum := 0 ) X;
+
+SELECT STRAIGHT_JOIN * FROM t1 JOIN t2 ON (t1.t1_seq = t2.t1_seq) JOIN (SELECT @a := 0) x;
+SELECT * FROM t1 JOIN t2 ON (t1.t1_seq = t2.t1_seq) JOIN (SELECT @a := 0) x;
+SELECT STRAIGHT_JOIN c1 FROM t1 JOIN (SELECT @a := 0) x;
+
+DROP TABLE t1, t2;
+
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result
index b8dddff9..323c4a73 100644
--- a/mysql-test/main/join_cache.result
+++ b/mysql-test/main/join_cache.result
@@ -6401,5 +6401,27 @@ b b d c c
10 NULL NULL NULL NULL
DROP TABLE t1,t2,t3,t4;
#
+# MDEV-21102: Server crashes in JOIN_CACHE::write_record_data upon EXPLAIN with subqueries and constant tables
+#
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+CREATE TABLE t2 (c int, d int) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,10);
+CREATE TABLE t3 (e int, key (e)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (2),(3);
+# Must not crash, must use join buffer in subquery
+EXPLAIN
+SELECT * FROM t1
+WHERE a > b OR a IN (
+SELECT c FROM t2 WHERE EXISTS (
+SELECT * FROM t3 t3a JOIN t3 t3b WHERE t3a.e < d
+)
+);
+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 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1
+3 SUBQUERY t3a range e e 5 NULL 2 Using where; Using index
+3 SUBQUERY t3b index NULL e 5 NULL 2 Using index; Using join buffer (flat, BNL join)
+DROP TABLE t1,t2,t3;
+#
# End of 10.4 tests
#
diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test
index be33d116..4d13a96c 100644
--- a/mysql-test/main/join_cache.test
+++ b/mysql-test/main/join_cache.test
@@ -4305,5 +4305,26 @@ eval $q2;
DROP TABLE t1,t2,t3,t4;
--echo #
+--echo # MDEV-21102: Server crashes in JOIN_CACHE::write_record_data upon EXPLAIN with subqueries and constant tables
+--echo #
+CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
+
+CREATE TABLE t2 (c int, d int) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (1,10);
+
+CREATE TABLE t3 (e int, key (e)) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (2),(3);
+
+--echo # Must not crash, must use join buffer in subquery
+EXPLAIN
+SELECT * FROM t1
+WHERE a > b OR a IN (
+ SELECT c FROM t2 WHERE EXISTS (
+ SELECT * FROM t3 t3a JOIN t3 t3b WHERE t3a.e < d
+ )
+);
+DROP TABLE t1,t2,t3;
+
+--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test
index 857a9ced..83bb7fde 100644
--- a/mysql-test/main/join_outer.test
+++ b/mysql-test/main/join_outer.test
@@ -685,15 +685,9 @@ create table t1 (a int, b varchar(20));
create table t2 (a int, c varchar(20));
insert into t1 values (1,"aaaaaaaaaa"),(2,"bbbbbbbbbb");
insert into t2 values (1,"cccccccccc"),(2,"dddddddddd");
-#Enable after fix MDEV-31276
---disable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a;
---enable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a;
-#Enable after fix MDEV-31276
---disable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a;
---enable_ps2_protocol
select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a;
drop table t1, t2;
set group_concat_max_len=default;
@@ -2372,11 +2366,8 @@ create view v1 as select * from t1
left join ( select 'Y' AS Voted, ElectionID from t2 ) AS T
on T.ElectionID = t1.Election
limit 9;
-#enable after fix MDEV-31277
---disable_ps2_protocol
# limit X causes merge algorithm select as opposed to temp table
select * from v1;
---enable_ps2_protocol
drop table t1, t2;
drop view v1;
@@ -2391,10 +2382,7 @@ create view v10 as select *, 'U' as u from t10 left join (select 'Y' as y, t20.b
create table t30 (c int);
insert into t30 values (1),(3);
create view v20 as select * from t30 left join (select 'X' as x, v10.u, v10.y, v10.b from v10) dt2 on t30.c=dt2.b limit 6;
-#check after fix MDEV-31277
---disable_ps2_protocol
select * from v20 limit 9;
---enable_ps2_protocol
drop view v10, v20;
drop table t10, t20, t30;
@@ -2408,8 +2396,6 @@ insert into t3 values (3),(1);
create table t1 (a int);
insert into t1 values (1),(2),(7),(1);
-#check after fix MDEV-31277
---disable_ps2_protocol
select * from
(
select * from
@@ -2422,7 +2408,6 @@ select * from
on dt1.a=dt2.b
limit 9
) dt;
---enable_ps2_protocol
## Same as dt3 above
create view v3(x,c) as select * from (select 'X' as x, t3.c from t3) dt3;
@@ -2436,10 +2421,7 @@ create view v0(y,b,x,c) as select * from v2 left join v3 on v2.b=v3.c;
# Same as above select statement
create view v1 as select 'Z' as z, t1.a, v0.* from t1 left join v0 on t1.a=v0.b limit 9;
-#check after fix MDEV-31277
---disable_ps2_protocol
select * from v1;
---enable_ps2_protocol
set statement join_cache_level=0 for
select * from v1;
diff --git a/mysql-test/main/kill_processlist-6619.test b/mysql-test/main/kill_processlist-6619.test
index c272e68a..0f53034e 100644
--- a/mysql-test/main/kill_processlist-6619.test
+++ b/mysql-test/main/kill_processlist-6619.test
@@ -4,8 +4,18 @@
--source include/not_embedded.inc
--source include/have_debug_sync.inc
+--disable_ps_protocol
+# Ensure no lingering connections from an earlier test run, which can very
+# rarely still be visible in SHOW PROCESSLIST here.
+--let $wait_condition= SELECT COUNT(*) = 1 from information_schema.processlist
+--source include/wait_condition.inc
+
--connect (con1,localhost,root,,)
--let $con_id = `SELECT CONNECTION_ID()`
+
+let $wait_condition=select command = 'sleep' from information_schema.processlist where id != $con_id;
+source include/wait_condition.inc;
+
--replace_result Execute Query
--replace_column 1 # 3 # 6 # 7 #
SHOW PROCESSLIST;
@@ -25,9 +35,7 @@ reap;
SET DEBUG_SYNC='reset';
# Wait until default connection has reset query string
-let $wait_condition=
- SELECT COUNT(*) = 1 from information_schema.processlist
- WHERE info is NULL;
+let $wait_condition=select command = 'sleep' from information_schema.processlist where id != $con_id;
--source include/wait_condition.inc
--replace_result Execute Query
diff --git a/mysql-test/main/load_timezones_with_alter_algorithm_inplace.result b/mysql-test/main/load_timezones_with_alter_algorithm_inplace.result
new file mode 100644
index 00000000..4992e7ed
--- /dev/null
+++ b/mysql-test/main/load_timezones_with_alter_algorithm_inplace.result
@@ -0,0 +1,18 @@
+set global alter_algorithm=INPLACE;
+RENAME TABLE mysql.time_zone TO mysql.time_zone_BACKUP;
+RENAME TABLE mysql.time_zone_name TO mysql.time_zone_name_BACKUP;
+RENAME TABLE mysql.time_zone_transition TO mysql.time_zone_transition_BACKUP;
+RENAME TABLE mysql.time_zone_transition_type TO mysql.time_zone_transition_type_BACKUP;
+CREATE TABLE mysql.time_zone LIKE mysql.time_zone_BACKUP;
+CREATE TABLE mysql.time_zone_name LIKE mysql.time_zone_name_BACKUP;
+CREATE TABLE mysql.time_zone_transition LIKE mysql.time_zone_transition_BACKUP;
+CREATE TABLE mysql.time_zone_transition_type LIKE mysql.time_zone_transition_type_BACKUP;
+DROP TABLE mysql.time_zone;
+DROP TABLE mysql.time_zone_name;
+DROP TABLE mysql.time_zone_transition;
+DROP TABLE mysql.time_zone_transition_type;
+RENAME TABLE mysql.time_zone_BACKUP TO mysql.time_zone;
+RENAME TABLE mysql.time_zone_name_BACKUP TO mysql.time_zone_name;
+RENAME TABLE mysql.time_zone_transition_BACKUP TO mysql.time_zone_transition;
+RENAME TABLE mysql.time_zone_transition_type_BACKUP TO mysql.time_zone_transition_type;
+set global alter_algorithm=DEFAULT;
diff --git a/mysql-test/main/load_timezones_with_alter_algorithm_inplace.test b/mysql-test/main/load_timezones_with_alter_algorithm_inplace.test
new file mode 100644
index 00000000..809f147f
--- /dev/null
+++ b/mysql-test/main/load_timezones_with_alter_algorithm_inplace.test
@@ -0,0 +1,40 @@
+--source include/not_embedded.inc
+
+# MDEV-33044 Loading time zones does not work with alter_algorithm INPLACE
+
+set global alter_algorithm=INPLACE;
+
+# Because loading timezones alters the mysql tables,
+# this test will leave mysql in a different state than when it started.
+# Furthermore, checksums on the various mysql.timezone_x tables will fail.
+
+# Therefore we:
+# 1. Make "backups" of the existing tables by renaming them
+# 2. Make dummy clones of the tables we just backed up
+# 3. Load timezones with alterations made to the dummy clone tables
+# 4. Drop the newly made tables with changes made to them
+# 5. Restore the backed up tables so the checksums will pass
+
+RENAME TABLE mysql.time_zone TO mysql.time_zone_BACKUP;
+RENAME TABLE mysql.time_zone_name TO mysql.time_zone_name_BACKUP;
+RENAME TABLE mysql.time_zone_transition TO mysql.time_zone_transition_BACKUP;
+RENAME TABLE mysql.time_zone_transition_type TO mysql.time_zone_transition_type_BACKUP;
+
+CREATE TABLE mysql.time_zone LIKE mysql.time_zone_BACKUP;
+CREATE TABLE mysql.time_zone_name LIKE mysql.time_zone_name_BACKUP;
+CREATE TABLE mysql.time_zone_transition LIKE mysql.time_zone_transition_BACKUP;
+CREATE TABLE mysql.time_zone_transition_type LIKE mysql.time_zone_transition_type_BACKUP;
+
+--exec $MYSQL_TZINFO_TO_SQL std_data/zoneinfo | $MYSQL mysql
+
+DROP TABLE mysql.time_zone;
+DROP TABLE mysql.time_zone_name;
+DROP TABLE mysql.time_zone_transition;
+DROP TABLE mysql.time_zone_transition_type;
+
+RENAME TABLE mysql.time_zone_BACKUP TO mysql.time_zone;
+RENAME TABLE mysql.time_zone_name_BACKUP TO mysql.time_zone_name;
+RENAME TABLE mysql.time_zone_transition_BACKUP TO mysql.time_zone_transition;
+RENAME TABLE mysql.time_zone_transition_type_BACKUP TO mysql.time_zone_transition_type;
+
+set global alter_algorithm=DEFAULT;
diff --git a/mysql-test/main/lock_sync.result b/mysql-test/main/lock_sync.result
index 2d7a175e..6e665b35 100644
--- a/mysql-test/main/lock_sync.result
+++ b/mysql-test/main/lock_sync.result
@@ -26,28 +26,6 @@ ALWAYS
connect con1, localhost, root,,;
connect con2, localhost, root,,;
connection default;
-drop table if exists t0, t1, t2, t3, t4, t5;
-drop view if exists v1, v2;
-drop procedure if exists p1;
-drop procedure if exists p2;
-drop procedure if exists p3;
-drop function if exists f1;
-drop function if exists f2;
-drop function if exists f3;
-drop function if exists f4;
-drop function if exists f5;
-drop function if exists f6;
-drop function if exists f7;
-drop function if exists f8;
-drop function if exists f9;
-drop function if exists f10;
-drop function if exists f11;
-drop function if exists f12;
-drop function if exists f13;
-drop function if exists f14;
-drop function if exists f15;
-drop function if exists f16;
-drop function if exists f17;
create table t1 (i int primary key);
insert into t1 values (1), (2), (3), (4), (5);
create table t2 (j int primary key);
@@ -900,6 +878,6 @@ set debug_sync= 'now wait_for s1';
SELECT * FROM ( SELECT * FROM v1 ) sq;
COMMIT;
DROP VIEW v1;
-DROP FUNCTION f;
+DROP FUNCTION IF EXISTS f;
DROP TABLE t1, t2;
set debug_sync= 'reset';
diff --git a/mysql-test/main/lock_sync.test b/mysql-test/main/lock_sync.test
index 0d15f845..998c6529 100644
--- a/mysql-test/main/lock_sync.test
+++ b/mysql-test/main/lock_sync.test
@@ -44,30 +44,6 @@ select @@global.concurrent_insert;
connect (con1, localhost, root,,);
connect (con2, localhost, root,,);
connection default;
---disable_warnings
-drop table if exists t0, t1, t2, t3, t4, t5;
-drop view if exists v1, v2;
-drop procedure if exists p1;
-drop procedure if exists p2;
-drop procedure if exists p3;
-drop function if exists f1;
-drop function if exists f2;
-drop function if exists f3;
-drop function if exists f4;
-drop function if exists f5;
-drop function if exists f6;
-drop function if exists f7;
-drop function if exists f8;
-drop function if exists f9;
-drop function if exists f10;
-drop function if exists f11;
-drop function if exists f12;
-drop function if exists f13;
-drop function if exists f14;
-drop function if exists f15;
-drop function if exists f16;
-drop function if exists f17;
---enable_warnings
create table t1 (i int primary key);
insert into t1 values (1), (2), (3), (4), (5);
create table t2 (j int primary key);
@@ -1218,7 +1194,8 @@ COMMIT;
--disconnect con1
--disconnect con2
--connection default
+--source include/wait_until_count_sessions.inc
DROP VIEW v1;
-DROP FUNCTION f;
+DROP FUNCTION IF EXISTS f;
DROP TABLE t1, t2;
set debug_sync= 'reset';
diff --git a/mysql-test/main/lock_view.result b/mysql-test/main/lock_view.result
index 8137300f..e4c666bf 100644
--- a/mysql-test/main/lock_view.result
+++ b/mysql-test/main/lock_view.result
@@ -16,6 +16,7 @@ create definer=definer@localhost view mysqltest3.v3is as select schema_name from
create definer=definer@localhost view mysqltest3.v3ps as select user from performance_schema.users where current_connections>0 order by user;
create definer=definer@localhost view mysqltest3.v3nt as select 1;
create definer=definer@localhost sql security invoker view mysqltest3.v3i as select * from mysqltest1.t1;
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */;
@@ -234,6 +235,7 @@ create view v1 as select * from (select * from t1) dt;
lock table v1 read;
disconnect con1;
connection default;
+/*!999999\- enable the sandbox mode */
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `v1` AS SELECT
diff --git a/mysql-test/main/log_errchk.test b/mysql-test/main/log_errchk.test
index 1afc0e29..c64f6e3c 100644
--- a/mysql-test/main/log_errchk.test
+++ b/mysql-test/main/log_errchk.test
@@ -30,12 +30,12 @@
--echo # Case 2: Starting server with fifo file as general log file
--echo # and slow query log file.
# Restart server with fifo file as general log file.
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--enable_reconnect
# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart: --general-log-file=$gen_log_file --slow-query-log-file=$slow_query_log_file" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "restart: --general-log-file=$gen_log_file --slow-query-log-file=$slow_query_log_file" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
# Error 6 is reported, because the other end is closed
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result
index b8fbd40b..03d40be8 100644
--- a/mysql-test/main/long_unique_bugs.result
+++ b/mysql-test/main/long_unique_bugs.result
@@ -676,6 +676,59 @@ SELECT * FROM t1;
a b c
3 2 2
DROP TABLE t1;
+# MDEV-30046 wrong row targeted with "insert ... on duplicate" and
+# "replace", leading to data corruption
+create table t (s blob, n int, unique (s)) engine=innodb;
+insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1);
+replace into t values ('Hrecvx_0004mm-00',2);
+select * from t;
+s n
+Hrecvx_0004ln-00 1
+Hrecvx_0004mm-00 2
+drop table t;
+create table t (s blob, n int, unique (s)) engine=innodb;
+insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1);
+insert into t values ('Hrecvx_0004mm-00',2)
+on duplicate key update n = values (n);
+select * from t;
+s n
+Hrecvx_0004ln-00 1
+Hrecvx_0004mm-00 2
+drop table t;
#
-# End of 10.5 tests
+# MDEV-29345 update case insensitive (large) unique key with insensitive change of value - duplicate key
#
+create table t1 (a int, b text, unique (b));
+insert ignore t1 values (1, 'a'), (2, 'A');
+Warnings:
+Warning 1062 Duplicate entry 'A' for key 'b'
+select * from t1;
+a b
+1 a
+update t1 set b='A' where a=1;
+select * from t1;
+a b
+1 A
+drop table t1;
+create table t1 (a int, b blob, unique (b));
+insert t1 values (1, 'a'), (2, 'A');
+select * from t1;
+a b
+1 a
+2 A
+update t1 set b='A' where a=1;
+ERROR 23000: Duplicate entry 'A' for key 'b'
+drop table t1;
+#
+# MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS
+#
+create table t1 (i int, unique key (i) using hash);
+alter table t1 disable keys;
+insert into t1 values (1),(2);
+insert into t1 values (1);
+ERROR 23000: Duplicate entry '1' for key 'i'
+alter table t1 enable keys;
+insert into t1 values (2);
+ERROR 23000: Duplicate entry '2' for key 'i'
+drop table t1;
+# End of 10.5 tests
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index 01c3f736..8acb5e9e 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -503,7 +503,6 @@ start transaction;
alter table tmp alter column a set default 8;
unlock tables;
drop table t2;
---source include/have_innodb.inc
--echo #
--echo # MDEV-22218 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON upon LOAD DATA with NO_BACKSLASH_ESCAPES in SQL_MODE and unique blob in table
@@ -642,7 +641,6 @@ insert into t1 values (0);
check table t1 extended;
drop table t1;
-
--echo #
--echo # MDEV-32837 long unique does not work like unique key when using replace
--echo #
@@ -655,6 +653,49 @@ REPLACE INTO t1 VALUES (3,2,2);
SELECT * FROM t1;
DROP TABLE t1;
+--echo # MDEV-30046 wrong row targeted with "insert ... on duplicate" and
+--echo # "replace", leading to data corruption
+--source include/have_innodb.inc
+create table t (s blob, n int, unique (s)) engine=innodb;
+insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1);
+replace into t values ('Hrecvx_0004mm-00',2);
+select * from t;
+drop table t;
+
+create table t (s blob, n int, unique (s)) engine=innodb;
+insert into t values ('Hrecvx_0004ln-00',1), ('Hrecvx_0004mm-00',1);
+insert into t values ('Hrecvx_0004mm-00',2)
+ on duplicate key update n = values (n);
+select * from t;
+drop table t;
--echo #
---echo # End of 10.5 tests
+--echo # MDEV-29345 update case insensitive (large) unique key with insensitive change of value - duplicate key
--echo #
+create table t1 (a int, b text, unique (b));
+insert ignore t1 values (1, 'a'), (2, 'A');
+select * from t1;
+update t1 set b='A' where a=1;
+select * from t1;
+drop table t1;
+
+create table t1 (a int, b blob, unique (b));
+insert t1 values (1, 'a'), (2, 'A');
+select * from t1;
+--error ER_DUP_ENTRY
+update t1 set b='A' where a=1;
+drop table t1;
+
+--echo #
+--echo # MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS
+--echo #
+create table t1 (i int, unique key (i) using hash);
+alter table t1 disable keys;
+insert into t1 values (1),(2);
+--error ER_DUP_ENTRY
+insert into t1 values (1);
+alter table t1 enable keys;
+--error ER_DUP_ENTRY
+insert into t1 values (2);
+drop table t1;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/lowercase_fs_on.test b/mysql-test/main/lowercase_fs_on.test
index 1d306826..9a7fc369 100644
--- a/mysql-test/main/lowercase_fs_on.test
+++ b/mysql-test/main/lowercase_fs_on.test
@@ -16,7 +16,7 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
--remove_file $SEARCH_FILE
#Shutdown the server
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
@@ -30,7 +30,7 @@ let SEARCH_PATTERN= \[ERROR\] The server option \'lower_case_table_names\' is co
--source include/search_pattern_in_file.inc
#Restart the server
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
#Cleanup
diff --git a/mysql-test/main/lowercase_table2.result b/mysql-test/main/lowercase_table2.result
index 3a4c46eb..3a4c46eb 100755..100644
--- a/mysql-test/main/lowercase_table2.result
+++ b/mysql-test/main/lowercase_table2.result
diff --git a/mysql-test/main/mdl_sync.result b/mysql-test/main/mdl_sync.result
index 0324c261..c6b80c50 100644
--- a/mysql-test/main/mdl_sync.result
+++ b/mysql-test/main/mdl_sync.result
@@ -2431,6 +2431,9 @@ create table t1 (a int) engine=myisam;
create table t2 (a int) stats_persistent=0, engine=innodb;
insert into t1 values (1);
insert into t2 values (1);
+connect con1, localhost, root;
+start transaction with consistent snapshot;
+connection default;
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;
@@ -2462,6 +2465,7 @@ connection default;
SET DEBUG_SYNC= 'RESET';
drop table t1,t2;
disconnect con2;
+disconnect con1;
#
# Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
# failed in open_ltable()
diff --git a/mysql-test/main/mdl_sync.test b/mysql-test/main/mdl_sync.test
index 7a928a4c..29d95460 100644
--- a/mysql-test/main/mdl_sync.test
+++ b/mysql-test/main/mdl_sync.test
@@ -3115,6 +3115,12 @@ create table t2 (a int) stats_persistent=0, engine=innodb;
insert into t1 values (1);
insert into t2 values (1);
+connect (con1, localhost, root);
+# disable innodb purge thread, otherwise it might start purging t2,
+# and will take an mdl, affecting metadata_lock_info output.
+start transaction with consistent snapshot;
+connection default;
+
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
@@ -3160,6 +3166,7 @@ connection default;
SET DEBUG_SYNC= 'RESET';
drop table t1,t2;
disconnect con2;
+disconnect con1;
--echo #
--echo # Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result
index 4d79a851..7d930f1a 100644
--- a/mysql-test/main/myisam.result
+++ b/mysql-test/main/myisam.result
@@ -1,6 +1,5 @@
call mtr.add_suppression("Can't find record in '.*'");
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
-SET SQL_WARNINGS=1;
CREATE TABLE t1 (
STRING_DATA char(255) default NULL,
KEY string_data (STRING_DATA)
diff --git a/mysql-test/main/myisam.test b/mysql-test/main/myisam.test
index ec49e71b..538603c6 100644
--- a/mysql-test/main/myisam.test
+++ b/mysql-test/main/myisam.test
@@ -7,9 +7,6 @@
call mtr.add_suppression("Can't find record in '.*'");
call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
-# Initialise
-SET SQL_WARNINGS=1;
-
#
# Test problem with CHECK TABLE;
#
diff --git a/mysql-test/main/myisam_crash_before_flush_keys.test b/mysql-test/main/myisam_crash_before_flush_keys.test
index 791e43b0..c48f2b42 100644
--- a/mysql-test/main/myisam_crash_before_flush_keys.test
+++ b/mysql-test/main/myisam_crash_before_flush_keys.test
@@ -26,14 +26,14 @@ INSERT INTO t1 VALUES (1,2),(2,3),(3,4),(4,5),(5,6);
SET SESSION debug_dbug="d,crash_before_flush_keys";
--echo # Write file to make mysql-test-run.pl expect crash
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--echo # Run the crashing query
--error 2013
FLUSH TABLE t1;
--echo # Write file to make mysql-test-run.pl start the server
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--echo # Turn on reconnect
--enable_reconnect
diff --git a/mysql-test/main/mysql-interactive.test b/mysql-test/main/mysql-interactive.test
index 2015e9d6..0051d8e5 100644
--- a/mysql-test/main/mysql-interactive.test
+++ b/mysql-test/main/mysql-interactive.test
@@ -3,6 +3,8 @@
--echo #
source include/not_embedded.inc;
source include/not_windows.inc;
+# this would need an instrumented ncurses library
+source include/not_msan.inc;
error 0,1;
exec $MYSQL -V|grep -q readline;
diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result
index 0b91b513..ac716b46 100644
--- a/mysql-test/main/mysql.result
+++ b/mysql-test/main/mysql.result
@@ -552,6 +552,7 @@ Table Create Table
a1\`b1 CREATE TABLE `a1\``b1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `a1\``b1` (
@@ -583,6 +584,7 @@ Table Create Table
a1\"b1 CREATE TABLE "a1\""b1" (
"a" int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE "a1\""b1" (
@@ -607,11 +609,11 @@ set sql_mode=default;
create table t1 (a text);
select count(*) from t1;
count(*)
-43
+44
truncate table t1;
select count(*) from t1;
count(*)
-43
+44
truncate table t1;
select count(*) from t1;
count(*)
@@ -623,7 +625,7 @@ count(*)
truncate table t1;
select count(*) from t1;
count(*)
-43
+44
truncate table t1;
select count(*) from t1;
count(*)
@@ -637,3 +639,27 @@ drop table t1;
WARNING: option '--enable-cleartext-plugin' is obsolete.
1
1
+# End of 10.3 tests
+#
+# MDEV-21778 Disable system commands in mysql/mariadb client
+#
+ERROR at line 1: Not allowed in the sandbox mode
+1
+ERROR at line 1: Not allowed in the sandbox mode
+2
+ERROR at line 1: Not allowed in the sandbox mode
+3
+1
+entering sandbox
+system
+tee
+source
+^^^
+2
+entering sandbox
+system
+tee
+source
+^^^
+3
+# End of 10.5 tests
diff --git a/mysql-test/main/mysql.test b/mysql-test/main/mysql.test
index 0f41add8..2f189e70 100644
--- a/mysql-test/main/mysql.test
+++ b/mysql-test/main/mysql.test
@@ -610,6 +610,7 @@ EOF
create database `aa``bb````cc`;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/backticks.sql
drop database `aa``bb````cc`;
+--remove_file $MYSQLTEST_VARDIR/tmp/backticks.sql
#
# MySQL Bug#13639125 DELIMITER STRIPS THE NEXT NEW LINE IN A SQL STATEMENT
@@ -620,6 +621,7 @@ delimiter
<<" as a;
EOF
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/13639125.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/13639125.sql
#
# --skip-column-names and alignment
@@ -702,7 +704,7 @@ select count(*) from t1; truncate table t1;
--exec $MYSQL --disable-local-infile -e "/*q*/$ldli"
select count(*) from t1; truncate table t1;
drop table t1;
-
+--remove_file $MYSQLTEST_VARDIR/tmp/bug.sql
--echo #
--echo # MDEV-15538 '-N' Produce html output wrong
@@ -716,3 +718,43 @@ drop table t1;
#
--echo
--exec $MYSQL test --enable-cleartext-plugin -e "select 1"
+
+--echo # End of 10.3 tests
+
+--echo #
+--echo # MDEV-21778 Disable system commands in mysql/mariadb client
+--echo #
+
+--error 1
+--exec $MYSQL --sandbox -Ne "select 1; \! echo foo; select 0" 2>&1
+--error 1
+--exec $MYSQL --sandbox -Ne "select 2; \T echo foo; select 0" 2>&1
+--error 1
+--exec $MYSQL --sandbox -Ne "select 3; \. echo.foo; select 0" 2>&1
+
+--write_file $MYSQL_TMP_DIR/mysql_in
+select 'entering sandbox';
+\-
+select 'system';
+\! echo foo
+select 'tee';
+\T echo foo
+select 'source';
+\. echo.foo
+select '^^^';
+EOF
+
+write_line "select 1;
+source $MYSQL_TMP_DIR/mysql_in;
+select 2;
+source $MYSQL_TMP_DIR/mysql_in;
+sandbox;
+select 3;
+source $MYSQL_TMP_DIR/mysql_in;" $MYSQL_TMP_DIR/mysql_in2;
+
+--exec $MYSQL -fN <$MYSQL_TMP_DIR/mysql_in2
+
+--remove_file $MYSQL_TMP_DIR/mysql_in
+--remove_file $MYSQL_TMP_DIR/mysql_in2
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/mysql_client_test.result b/mysql-test/main/mysql_client_test.result
index dbc1feaa..dbd5aaea 100644
--- a/mysql-test/main/mysql_client_test.result
+++ b/mysql-test/main/mysql_client_test.result
@@ -261,3 +261,4 @@ SET @@global.character_set_server= @save_character_set_server;
SET @@global.collation_server= @save_collation_server;
SET @@global.character_set_client= @save_character_set_client;
SET @@global.collation_connection= @save_collation_connection;
+FOUND 1 /Aborted connection.*'u' host: '192.0.2.1' real ip: '(localhost|::1)'/ in mysqld.1.err
diff --git a/mysql-test/main/mysql_client_test.test b/mysql-test/main/mysql_client_test.test
index bcb246a8..d620f4c7 100644
--- a/mysql-test/main/mysql_client_test.test
+++ b/mysql-test/main/mysql_client_test.test
@@ -23,7 +23,7 @@ call mtr.add_suppression(" IP address .* could not be resolved");
# server or run mysql-test-run --debug mysql_client_test and check
# var/log/mysql_client_test.trace
---exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
+--write_line "$MYSQL_CLIENT_TEST" $MYSQLTEST_VARDIR/log/mysql_client_test.out.log
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
# End of 4.1 tests
@@ -57,3 +57,9 @@ SET @@global.character_set_server= @save_character_set_server;
SET @@global.collation_server= @save_collation_server;
SET @@global.character_set_client= @save_character_set_client;
SET @@global.collation_connection= @save_collation_connection;
+
+# Search for "real ip" in Aborted message
+# This is indicator for abort of the proxied connections.
+let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_PATTERN= Aborted connection.*'u' host: '192.0.2.1' real ip: '(localhost|::1)';
+source include/search_pattern_in_file.inc;
diff --git a/mysql-test/main/mysql_client_test_comp.test b/mysql-test/main/mysql_client_test_comp.test
index 36a12b66..f37d82a2 100644
--- a/mysql-test/main/mysql_client_test_comp.test
+++ b/mysql-test/main/mysql_client_test_comp.test
@@ -12,7 +12,7 @@ SET @old_slow_query_log= @@global.slow_query_log;
call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'");
call mtr.add_suppression(" IP address .* could not be resolved");
---exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test_comp.out.log 2>&1
+--write_line "$MYSQL_CLIENT_TEST" $MYSQLTEST_VARDIR/log/mysql_client_test_comp.out.log
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test_comp.out.log 2>&1
# End of test
diff --git a/mysql-test/main/mysql_client_test_nonblock.test b/mysql-test/main/mysql_client_test_nonblock.test
index 73e7a6d3..c4bc4304 100644
--- a/mysql-test/main/mysql_client_test_nonblock.test
+++ b/mysql-test/main/mysql_client_test_nonblock.test
@@ -19,7 +19,7 @@ call mtr.add_suppression(" IP address .* could not be resolved");
# server or run mysql-test-run --debug mysql_client_test and check
# var/log/mysql_client_test.trace
---exec echo "$MYSQL_CLIENT_TEST --non-blocking-api" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
+--write_line "$MYSQL_CLIENT_TEST --non-blocking-api" $MYSQLTEST_VARDIR/log/mysql_client_test.out.log
--exec $MYSQL_CLIENT_TEST --non-blocking-api --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1
# End of 4.1 tests
diff --git a/mysql-test/main/mysql_connector_net.test b/mysql-test/main/mysql_connector_net.test
index c1dce65a..ad048c20 100644
--- a/mysql-test/main/mysql_connector_net.test
+++ b/mysql-test/main/mysql_connector_net.test
@@ -4,7 +4,7 @@ let $sys_errno=0;
# Error 100 is returned by the powershell script
# if MySql.Data is not installed
--error 0,100
---exec powershell -NoLogo -NoProfile -File main\mysql_connector_net.ps1
+--exec powershell -ExecutionPolicy Bypass -NoLogo -NoProfile -File main\mysql_connector_net.ps1
if ($sys_errno != 0)
{
--skip Connector/NET is not installed
diff --git a/mysql-test/main/mysql_install_db_win_admin.result b/mysql-test/main/mysql_install_db_win_admin.result
index 06d3d677..dd0e4e3b 100644
--- a/mysql-test/main/mysql_install_db_win_admin.result
+++ b/mysql-test/main/mysql_install_db_win_admin.result
@@ -1,10 +1,4 @@
use mysql;
-Running bootstrap
-Creating my.ini file
-Removing default user
-Allowing remote access for user root
-Setting root password
-Creation of the database was successful
# Kill the server
# restart: --datadir=MYSQLTEST_VARDIR/tmp/ddir
connect root,localhost,root,wrongpass,mysql;
diff --git a/mysql-test/main/mysql_install_db_win_admin.test b/mysql-test/main/mysql_install_db_win_admin.test
index a6b98f97..28a2356c 100644
--- a/mysql-test/main/mysql_install_db_win_admin.test
+++ b/mysql-test/main/mysql_install_db_win_admin.test
@@ -6,12 +6,15 @@
# and start server from this directory.
let $ddir= $MYSQLTEST_VARDIR/tmp/ddir;
use mysql;
-exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R;
+--disable_result_log
+exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo --verbose-bootstrap -R;
+--enable_result_log
--source include/kill_mysqld.inc
let $restart_parameters=--datadir=$ddir;
--source include/start_mysqld.inc
# Check that connect with wrong password succeeds
+# (because it can alternatively connect with GSSAPI as admin)
connect (root,localhost,root,wrongpass,mysql);
--source include/kill_mysqld.inc
diff --git a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result
index 97548768..86ff8179 100644
--- a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result
+++ b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result
@@ -18,6 +18,8 @@ execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone_transition ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_transition_type_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone_transition_type''', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone_transition_type ENGINE=InnoDB', 'do 0');
+SET @old_alter_alg=@@SESSION.alter_algorithm;
+SET session alter_algorithm='COPY';
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
@@ -52,6 +54,7 @@ execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone E
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_name ENGINE=', @time_zone_name_engine), 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition ENGINE=', @time_zone_transition_engine, ', ORDER BY Time_zone_id, Transition_time'), 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition_type ENGINE=', @time_zone_transition_type_engine, ', ORDER BY Time_zone_id, Transition_type_id'), 'do 0');
+SET session alter_algorithm=@old_alter_alg;
#
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
#
@@ -67,6 +70,8 @@ execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone_transition ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_transition_type_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone_transition_type''', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone_transition_type ENGINE=InnoDB', 'do 0');
+SET @old_alter_alg=@@SESSION.alter_algorithm;
+SET session alter_algorithm='COPY';
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
@@ -98,6 +103,7 @@ execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone E
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_name ENGINE=', @time_zone_name_engine), 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition ENGINE=', @time_zone_transition_engine, ', ORDER BY Time_zone_id, Transition_time'), 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition_type ENGINE=', @time_zone_transition_type_engine, ', ORDER BY Time_zone_id, Transition_type_id'), 'do 0');
+SET session alter_algorithm=@old_alter_alg;
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
@@ -123,6 +129,8 @@ execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF'
SET @save_sql_log_bin=@@SQL_LOG_BIN;
SET SESSION SQL_LOG_BIN=0;
SET @wsrep_cannot_replicate_tz=0;
+SET @old_alter_alg=@@SESSION.alter_algorithm;
+SET session alter_algorithm='COPY';
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
@@ -152,6 +160,7 @@ execute immediate if(@wsrep_cannot_replicate_tz, 'do 0','ALTER TABLE time_zone_t
execute immediate if(@wsrep_cannot_replicate_tz, 'do 0','ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id');
SET SESSION SQL_LOG_BIN=@save_sql_log_bin;
execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0');
+SET session alter_algorithm=@old_alter_alg;
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
@@ -505,6 +514,8 @@ execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone_transition ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_transition_type_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone_transition_type''', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone_transition_type ENGINE=InnoDB', 'do 0');
+SET @old_alter_alg=@@SESSION.alter_algorithm;
+SET session alter_algorithm='COPY';
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
@@ -522,6 +533,7 @@ execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone E
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_name ENGINE=', @time_zone_name_engine), 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition ENGINE=', @time_zone_transition_engine, ', ORDER BY Time_zone_id, Transition_time'), 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition_type ENGINE=', @time_zone_transition_type_engine, ', ORDER BY Time_zone_id, Transition_type_id'), 'do 0');
+SET session alter_algorithm=@old_alter_alg;
DROP TABLE baseline;
DROP TABLE time_zone;
DROP TABLE time_zone_name;
diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result
index 2cf65265..410af544 100644
--- a/mysql-test/main/mysqlbinlog_row_compressed.result
+++ b/mysql-test/main/mysqlbinlog_row_compressed.result
@@ -1,3 +1,5 @@
+set pseudo_thread_id=5;
+reset master;
SET GLOBAL log_bin_compress=on;
SET GLOBAL log_bin_compress_min_len=10;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1));
@@ -15,21 +17,21 @@ FLUSH BINARY LOGS;
/*!40019 SET @@session.max_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
-# at 4
-#<date> server id 1 end_log_pos 256 CRC32 XXX Start: xxx
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Start: xxx
ROLLBACK/*!*/;
-# at 256
-#<date> server id 1 end_log_pos 285 CRC32 XXX Gtid list []
-# at 285
-#<date> server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001
-# at 329
-#<date> server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Gtid list []
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Binlog checkpoint master-bin.000001
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
-# at 371
-#<date> server id 1 end_log_pos 542 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
@@ -42,26 +44,26 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
-# at 542
-#<date> server id 1 end_log_pos 584 CRC32 XXX GTID 0-1-2 ddl
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
-# at 584
-#<date> server id 1 end_log_pos 745 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
-# at 745
-#<date> server id 1 end_log_pos 787 CRC32 XXX GTID 0-1-3
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
START TRANSACTION
/*!*/;
-# at 787
-# at 861
-#<date> server id 1 end_log_pos 861 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
-#<date> server id 1 end_log_pos 917 CRC32 XXX Table_map: `test`.`t1` mapped to number num
-# at 917
-#<date> server id 1 end_log_pos 985 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -74,23 +76,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 1
-# at 985
-#<date> server id 1 end_log_pos 1058 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1058
-#<date> server id 1 end_log_pos 1100 CRC32 XXX GTID 0-1-4
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
START TRANSACTION
/*!*/;
-# at 1100
-# at 1176
-#<date> server id 1 end_log_pos 1176 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
-#<date> server id 1 end_log_pos 1232 CRC32 XXX Table_map: `test`.`t1` mapped to number num
-# at 1232
-#<date> server id 1 end_log_pos 1299 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@@ -103,23 +105,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
# Number of rows: 1
-# at 1299
-#<date> server id 1 end_log_pos 1372 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1372
-#<date> server id 1 end_log_pos 1414 CRC32 XXX GTID 0-1-5
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
START TRANSACTION
/*!*/;
-# at 1414
-# at 1492
-#<date> server id 1 end_log_pos 1492 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
-#<date> server id 1 end_log_pos 1548 CRC32 XXX Table_map: `test`.`t1` mapped to number num
-# at 1548
-#<date> server id 1 end_log_pos 1614 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@@ -132,23 +134,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 1
-# at 1614
-#<date> server id 1 end_log_pos 1687 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1687
-#<date> server id 1 end_log_pos 1729 CRC32 XXX GTID 0-1-6
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
START TRANSACTION
/*!*/;
-# at 1729
-# at 1804
-#<date> server id 1 end_log_pos 1804 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
-#<date> server id 1 end_log_pos 1860 CRC32 XXX Table_map: `test`.`t1` mapped to number num
-# at 1860
-#<date> server id 1 end_log_pos 1927 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@@ -161,23 +163,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 1
-# at 1927
-#<date> server id 1 end_log_pos 2000 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2000
-#<date> server id 1 end_log_pos 2042 CRC32 XXX GTID 0-1-7
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
START TRANSACTION
/*!*/;
-# at 2042
-# at 2096
-#<date> server id 1 end_log_pos 2096 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> INSERT INTO t2 SELECT * FROM t1
-#<date> server id 1 end_log_pos 2152 CRC32 XXX Table_map: `test`.`t2` mapped to number num
-# at 2152
-#<date> server id 1 end_log_pos 2243 CRC32 XXX Write_compressed_rows: table id 33 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t2` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Write_compressed_rows: table id <tblid> flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -223,23 +225,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 4
-# at 2243
-#<date> server id 1 end_log_pos 2316 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2316
-#<date> server id 1 end_log_pos 2358 CRC32 XXX GTID 0-1-8
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
START TRANSACTION
/*!*/;
-# at 2358
-# at 2424
-#<date> server id 1 end_log_pos 2424 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
-#<date> server id 1 end_log_pos 2480 CRC32 XXX Table_map: `test`.`t2` mapped to number num
-# at 2480
-#<date> server id 1 end_log_pos 2579 CRC32 XXX Update_compressed_rows: table id 33 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t2` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Update_compressed_rows: table id <tblid> flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -304,23 +306,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 3
-# at 2579
-#<date> server id 1 end_log_pos 2652 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2652
-#<date> server id 1 end_log_pos 2694 CRC32 XXX GTID 0-1-9
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
START TRANSACTION
/*!*/;
-# at 2694
-# at 2731
-#<date> server id 1 end_log_pos 2731 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> DELETE FROM t1
-#<date> server id 1 end_log_pos 2787 CRC32 XXX Table_map: `test`.`t1` mapped to number num
-# at 2787
-#<date> server id 1 end_log_pos 2879 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t1` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Delete_compressed_rows: table id <tblid> flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -366,23 +368,23 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 4
-# at 2879
-#<date> server id 1 end_log_pos 2952 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2952
-#<date> server id 1 end_log_pos 2994 CRC32 XXX GTID 0-1-10
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
START TRANSACTION
/*!*/;
-# at 2994
-# at 3031
-#<date> server id 1 end_log_pos 3031 CRC32 XXX Annotate_rows:
+# at <pos>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Annotate_rows:
#Q> DELETE FROM t2
-#<date> server id 1 end_log_pos 3087 CRC32 XXX Table_map: `test`.`t2` mapped to number num
-# at 3087
-#<date> server id 1 end_log_pos 3172 CRC32 XXX Delete_compressed_rows: table id 33 flags: STMT_END_F
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Table_map: `test`.`t2` mapped to number num
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Delete_compressed_rows: table id <tblid> flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@@ -428,13 +430,13 @@ START TRANSACTION
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# Number of rows: 4
-# at 3172
-#<date> server id 1 end_log_pos 3245 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 3245
-#<date> server id 1 end_log_pos 3293 CRC32 XXX Rotate to master-bin.000002 pos: 4
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
diff --git a/mysql-test/main/mysqlbinlog_row_compressed.test b/mysql-test/main/mysqlbinlog_row_compressed.test
index 03868d3e..b3a6add4 100644
--- a/mysql-test/main/mysqlbinlog_row_compressed.test
+++ b/mysql-test/main/mysqlbinlog_row_compressed.test
@@ -4,13 +4,14 @@
--source include/have_log_bin.inc
--source include/have_binlog_format_row.inc
---source include/have_normal_zlib.inc
#
#
# mysqlbinlog: compressed row event
#
#
+set pseudo_thread_id=5;
+reset master;
SET GLOBAL log_bin_compress=on;
SET GLOBAL log_bin_compress_min_len=10;
@@ -30,7 +31,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/ /xid=\d*/xid=<xid>/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/ /xid=\d*/xid=<xid>/ /table id \d+/table id <tblid>/ /end_log_pos \d+/end_log_pos <pos>/ /# at \d+/# at <pos>/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
--echo
diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result
index 69aa91a8..f8795433 100644
--- a/mysql-test/main/mysqlbinlog_row_minimal.result
+++ b/mysql-test/main/mysqlbinlog_row_minimal.result
@@ -382,7 +382,7 @@ START TRANSACTION
#<date> server id 1 end_log_pos END_LOG_POS CRC32 XXX Annotate_rows:
#Q> UPDATE t1 t1 INNER JOIN t2 t2 ON t1.ref_id = t2.id
#Q> SET t1.is_deleted = TRUE
-#Q> WHERE t1.id =
+#Q> WHERE t1.id = 1
#<date> server id 1 end_log_pos END_LOG_POS CRC32 XXX Table_map: `test`.`t1` mapped to number TID
# at POS
#<date> server id 1 end_log_pos END_LOG_POS CRC32 XXX Update_rows: table id TID flags: STMT_END_F
diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.result b/mysql-test/main/mysqlbinlog_stmt_compressed.result
index c0d26f3f..471cb4b7 100644
--- a/mysql-test/main/mysqlbinlog_stmt_compressed.result
+++ b/mysql-test/main/mysqlbinlog_stmt_compressed.result
@@ -15,21 +15,21 @@ FLUSH BINARY LOGS;
/*!40019 SET @@session.max_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
-# at 4
-#<date> server id 1 end_log_pos 256 CRC32 XXX Start: xxx
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Start: xxx
ROLLBACK/*!*/;
-# at 256
-#<date> server id 1 end_log_pos 285 CRC32 XXX Gtid list []
-# at 285
-#<date> server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001
-# at 329
-#<date> server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Gtid list []
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Binlog checkpoint master-bin.000001
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
-# at 371
-#<date> server id 1 end_log_pos 542 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
@@ -42,136 +42,136 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
-# at 542
-#<date> server id 1 end_log_pos 584 CRC32 XXX GTID 0-1-2 ddl
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
-# at 584
-#<date> server id 1 end_log_pos 745 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
-# at 745
-#<date> server id 1 end_log_pos 787 CRC32 XXX GTID 0-1-3
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
START TRANSACTION
/*!*/;
-# at 787
-#<date> server id 1 end_log_pos 915 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "")
/*!*/;
-# at 915
-#<date> server id 1 end_log_pos 988 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 988
-#<date> server id 1 end_log_pos 1030 CRC32 XXX GTID 0-1-4
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
START TRANSACTION
/*!*/;
-# at 1030
-#<date> server id 1 end_log_pos 1158 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL)
/*!*/;
-# at 1158
-#<date> server id 1 end_log_pos 1231 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1231
-#<date> server id 1 end_log_pos 1273 CRC32 XXX GTID 0-1-5
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
START TRANSACTION
/*!*/;
-# at 1273
-#<date> server id 1 end_log_pos 1403 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A")
/*!*/;
-# at 1403
-#<date> server id 1 end_log_pos 1476 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1476
-#<date> server id 1 end_log_pos 1518 CRC32 XXX GTID 0-1-6
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
START TRANSACTION
/*!*/;
-# at 1518
-#<date> server id 1 end_log_pos 1645 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A")
/*!*/;
-# at 1645
-#<date> server id 1 end_log_pos 1718 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1718
-#<date> server id 1 end_log_pos 1760 CRC32 XXX GTID 0-1-7
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
START TRANSACTION
/*!*/;
-# at 1760
-#<date> server id 1 end_log_pos 1868 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
INSERT INTO t2 SELECT * FROM t1
/*!*/;
-# at 1868
-#<date> server id 1 end_log_pos 1941 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 1941
-#<date> server id 1 end_log_pos 1983 CRC32 XXX GTID 0-1-8
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
START TRANSACTION
/*!*/;
-# at 1983
-#<date> server id 1 end_log_pos 2100 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL
/*!*/;
-# at 2100
-#<date> server id 1 end_log_pos 2173 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2173
-#<date> server id 1 end_log_pos 2215 CRC32 XXX GTID 0-1-9
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
START TRANSACTION
/*!*/;
-# at 2215
-#<date> server id 1 end_log_pos 2306 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
DELETE FROM t1
/*!*/;
-# at 2306
-#<date> server id 1 end_log_pos 2379 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2379
-#<date> server id 1 end_log_pos 2421 CRC32 XXX GTID 0-1-10
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
START TRANSACTION
/*!*/;
-# at 2421
-#<date> server id 1 end_log_pos 2512 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
DELETE FROM t2
/*!*/;
-# at 2512
-#<date> server id 1 end_log_pos 2585 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Query thread_id=5 exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
-# at 2585
-#<date> server id 1 end_log_pos 2633 CRC32 XXX Rotate to master-bin.000002 pos: 4
+# at <pos>
+#<date> server id 1 end_log_pos <pos> CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.test b/mysql-test/main/mysqlbinlog_stmt_compressed.test
index 4a651243..5c3fb58c 100644
--- a/mysql-test/main/mysqlbinlog_stmt_compressed.test
+++ b/mysql-test/main/mysqlbinlog_stmt_compressed.test
@@ -4,7 +4,6 @@
--source include/have_log_bin.inc
--source include/have_binlog_format_statement.inc
---source include/have_normal_zlib.inc
#
#
# mysqlbinlog: compressed query event
@@ -29,7 +28,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/ /xid=\d*/xid=<xid>/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/ /@@session.sql_mode=\d+/@@session.sql_mode=#/ /collation_server=\d+/collation_server=#/ /xid=\d*/xid=<xid>/ /table id \d+/table id <tblid>/ /end_log_pos \d+/end_log_pos <pos>/ /# at \d+/# at <pos>/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
--echo
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 2a3a9f00..ebff8143 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -736,13 +736,17 @@ The following specify which files/extra groups are read (specified before remain
max_connections*5 or max_connections + table_cache*2
(whichever is larger) number of file descriptors
(Automatically configured unless set explicitly)
- --optimizer-adjust-secondary-key-costs=#
- 0 = No changes. 1 = Update secondary key costs for ranges
- to be at least 5x of clustered primary key costs. 2 =
- Remove 'max_seek optimization' for secondary keys and
- slight adjustment of filter cost. This option will be
- deleted in MariaDB 11.0 as it is not needed with the new
- 11.0 optimizer.
+ --optimizer-adjust-secondary-key-costs=name
+ A bit field with the following values:
+ adjust_secondary_key_cost = Update secondary key costs
+ for ranges to be at least 5x of clustered primary key
+ costs. disable_max_seek = Disable 'max_seek optimization'
+ for secondary keys and slight adjustment of filter cost.
+ disable_forced_index_in_group_by = Disable automatic
+ forced index in GROUP BY. This variable will be deleted
+ in MariaDB 11.0 as it is not needed with the new 11.0
+ optimizer.
+ Use 'ALL' to set all combinations.
--optimizer-extra-pruning-depth=#
If the optimizer needs to enumerate join prefix of this
size or larger, then it will try aggressively prune away
@@ -1732,7 +1736,7 @@ old-alter-table DEFAULT
old-mode UTF8_IS_UTF8MB3
old-passwords FALSE
old-style-user-limits FALSE
-optimizer-adjust-secondary-key-costs 0
+optimizer-adjust-secondary-key-costs
optimizer-extra-pruning-depth 8
optimizer-max-sel-arg-weight 32000
optimizer-max-sel-args 16000
@@ -1876,7 +1880,7 @@ slave-run-triggers-for-rbr NO
slave-skip-errors OFF
slave-sql-verify-checksum TRUE
slave-transaction-retries 10
-slave-transaction-retry-errors 1158,1159,1160,1161,1205,1213,1429,2013,12701
+slave-transaction-retry-errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701
slave-transaction-retry-interval 0
slave-type-conversions
slow-launch-time 2
diff --git a/mysql-test/main/mysqld_option_err.result b/mysql-test/main/mysqld_option_err.result
index 4afcc5e0..157edb58 100644
--- a/mysql-test/main/mysqld_option_err.result
+++ b/mysql-test/main/mysqld_option_err.result
@@ -3,6 +3,17 @@ Test bad binlog format.
Test bad default storage engine.
Test non-numeric value passed to number option.
Test that bad value for plugin enum option is rejected correctly.
+Test to see if multiple unknown options will be displayed in the error output
+FOUND 1 /unknown option '--nonexistentoption2'/ in mysqltest.log
+FOUND 1 /unknown option '--alsononexistent'/ in mysqltest.log
+FOUND 1 /unknown variable 'nonexistentvariable=1'/ in mysqltest.log
+Test to see if multiple ambiguous options and invalid arguments will be displayed in the error output
+FOUND 1 /Error while setting value 'invalid_value' to 'sql_mode'/ in mysqltest.log
+FOUND 1 /ambiguous option '--character'/ in mysqltest.log
+FOUND 1 /option '--bootstrap' cannot take an argument/ in mysqltest.log
+FOUND 1 /Integer value out of range for uint64: '18446744073709551616' for binlog_cache_size/ in mysqltest.log
+FOUND 1 /Unknown suffix 'y' used for variable 'bulk_insert_buffer_size' \(value '123y'\). Legal suffix characters are: K, M, G, T, P, E/ in mysqltest.log
+FOUND 1 /Error while setting value '123y' to 'bulk_insert_buffer_size'/ in mysqltest.log
Test that --help --verbose works
Test that --not-known-option --help --verbose gives error
Done.
diff --git a/mysql-test/main/mysqld_option_err.test b/mysql-test/main/mysqld_option_err.test
index e9655fd4..c2b943ba 100644
--- a/mysql-test/main/mysqld_option_err.test
+++ b/mysql-test/main/mysqld_option_err.test
@@ -25,7 +25,7 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
--echo Test bad binlog format.
---error 1
+--error 13
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --log-bin --binlog-format=badformat >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
@@ -35,7 +35,7 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
--echo Test non-numeric value passed to number option.
---error 1
+--error 9
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --min-examined-row-limit=notanumber >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
@@ -46,6 +46,36 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
--error 7
--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --plugin-dir=$MYSQLTEST_VARDIR/plugins --plugin-load=example=ha_example.so --plugin-example-enum-var=noexist >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+--let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log
+
+--echo Test to see if multiple unknown options will be displayed in the error output
+--error 7
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --nonexistentoption2 --alsononexistent --nonexistentvariable=1 >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+
+--let SEARCH_PATTERN=unknown option '--nonexistentoption2'
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=unknown option '--alsononexistent'
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=unknown variable 'nonexistentvariable=1'
+--source include/search_pattern_in_file.inc
+
+--echo Test to see if multiple ambiguous options and invalid arguments will be displayed in the error output
+--error 9
+--exec $MYSQLD_BOOTSTRAP_CMD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --getopt-prefix-matching --sql-mode=invalid_value --character --bootstrap=partstoob --binlog_cache_size=18446744073709551616 --bulk_insert_buffer_size=123y >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
+
+--let SEARCH_PATTERN=Error while setting value 'invalid_value' to 'sql_mode'
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=ambiguous option '--character'
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=option '--bootstrap' cannot take an argument
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=Integer value out of range for uint64: '18446744073709551616' for binlog_cache_size
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=Unknown suffix 'y' used for variable 'bulk_insert_buffer_size' \(value '123y'\). Legal suffix characters are: K, M, G, T, P, E
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN=Error while setting value '123y' to 'bulk_insert_buffer_size'
+--source include/search_pattern_in_file.inc
+
#
# Test that an wrong option with --help --verbose gives an error
#
diff --git a/mysql-test/main/mysqldump-compat-102.result b/mysql-test/main/mysqldump-compat-102.result
index 86a2ebc4..d5ed5457 100644
--- a/mysql-test/main/mysqldump-compat-102.result
+++ b/mysql-test/main/mysqldump-compat-102.result
@@ -58,6 +58,7 @@ BEGIN
log(0, 'Session ' || connection_id() || ' ' || current_user || ' started');
END;
$$
+/*!999999\- enable the sandbox mode */
-- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS
--
-- Host: localhost Database: db1_mdev17429
diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result
index 7dd1030e..e76193ac 100644
--- a/mysql-test/main/mysqldump-max.result
+++ b/mysql-test/main/mysqldump-max.result
@@ -77,6 +77,7 @@ id name
3 first value
4 first value
5 first value
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -102,7 +103,7 @@ CREATE TABLE `t1` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t1` VALUES
+INSERT DELAYED IGNORE INTO `t1` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -119,7 +120,7 @@ CREATE TABLE `t2` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t2` VALUES
+INSERT DELAYED IGNORE INTO `t2` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -136,7 +137,7 @@ CREATE TABLE `t3` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t3` VALUES
+INSERT DELAYED IGNORE INTO `t3` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -153,7 +154,7 @@ CREATE TABLE `t4` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t4` VALUES
+INSERT DELAYED IGNORE INTO `t4` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -170,7 +171,7 @@ CREATE TABLE `t5` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t5` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t5` VALUES
+INSERT DELAYED IGNORE INTO `t5` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -187,7 +188,7 @@ CREATE TABLE `t6` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t6` DISABLE KEYS */;
-INSERT IGNORE INTO `t6` VALUES
+INSERT IGNORE INTO `t6` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -204,6 +205,7 @@ INSERT IGNORE INTO `t6` VALUES
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -229,7 +231,7 @@ CREATE TABLE `t1` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT DELAYED INTO `t1` VALUES
+INSERT DELAYED INTO `t1` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -246,7 +248,7 @@ CREATE TABLE `t2` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT DELAYED INTO `t2` VALUES
+INSERT DELAYED INTO `t2` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -263,7 +265,7 @@ CREATE TABLE `t3` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
-INSERT DELAYED INTO `t3` VALUES
+INSERT DELAYED INTO `t3` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -280,7 +282,7 @@ CREATE TABLE `t4` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
-INSERT DELAYED INTO `t4` VALUES
+INSERT DELAYED INTO `t4` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
@@ -297,7 +299,7 @@ CREATE TABLE `t5` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t5` DISABLE KEYS */;
-INSERT DELAYED INTO `t5` VALUES
+INSERT DELAYED INTO `t5` VALUES
(1,'first value'),
(2,'first value'),
(3,'first value'),
diff --git a/mysql-test/main/mysqldump-nl.result b/mysql-test/main/mysqldump-nl.result
index 66902492..1e992830 100644
--- a/mysql-test/main/mysqldump-nl.result
+++ b/mysql-test/main/mysqldump-nl.result
@@ -12,6 +12,7 @@ create procedure sp() select * from `v1
1v`;
flush tables;
use test;
+/*!999999\- enable the sandbox mode */
--
-- Current Database: `mysqltest1
@@ -134,6 +135,7 @@ test\`
\! ls
#
test`
+/*!999999\- enable the sandbox mode */
--
-- Current Database: `test```
diff --git a/mysql-test/main/mysqldump-no-binlog.result b/mysql-test/main/mysqldump-no-binlog.result
index 223034d8..669675ff 100644
--- a/mysql-test/main/mysqldump-no-binlog.result
+++ b/mysql-test/main/mysqldump-no-binlog.result
@@ -1 +1,2 @@
mariadb-dump: Error: Binlogging on server not active
+/*!999999\- enable the sandbox mode */
diff --git a/mysql-test/main/mysqldump-order-by-size.result b/mysql-test/main/mysqldump-order-by-size.result
index 36185290..3bd953b8 100644
--- a/mysql-test/main/mysqldump-order-by-size.result
+++ b/mysql-test/main/mysqldump-order-by-size.result
@@ -21,6 +21,7 @@ test.t3 analyze status OK
test.t4 analyze status Engine-independent statistics collected
test.t4 analyze Warning Engine-independent statistics are not collected for column 'a'
test.t4 analyze status OK
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t4` (
diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result
index 559f6f29..240a8499 100644
--- a/mysql-test/main/mysqldump-system.result
+++ b/mysql-test/main/mysqldump-system.result
@@ -41,6 +41,7 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
#
# mysqldump of system tables with --system=all
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -632,6 +633,7 @@ UNLOCK TABLES;
#
# mysqldump of system tables with --system=all --replace
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1246,6 +1248,7 @@ UNLOCK TABLES;
#
# mysqldump of system tables with --system=all --insert-ignore
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1300,28 +1303,28 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `column_stats` VALUES
+INSERT IGNORE INTO `column_stats` VALUES
('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340966921, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"5\", \"size\": 0.002544529, \"ndv\": 1}]}');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `index_stats` WRITE;
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `index_stats` VALUES
+INSERT IGNORE INTO `index_stats` VALUES
('mysql','tz','PRIMARY',1,98.2500);
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `table_stats` WRITE;
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `table_stats` VALUES
+INSERT IGNORE INTO `table_stats` VALUES
('mysql','tz',393);
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_index_stats` WRITE;
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `innodb_index_stats` VALUES
+INSERT IGNORE INTO `innodb_index_stats` VALUES
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
@@ -1331,7 +1334,7 @@ UNLOCK TABLES;
LOCK TABLES `innodb_table_stats` WRITE;
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `innodb_table_stats` VALUES
+INSERT IGNORE INTO `innodb_table_stats` VALUES
('mysql','tz','2019-12-31 21:00:00',393,1,0);
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -1340,7 +1343,7 @@ USE mysql;
LOCK TABLES `time_zone` WRITE;
/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone` VALUES
+INSERT IGNORE INTO `time_zone` VALUES
(1,'N'),
(2,'N'),
(3,'N'),
@@ -1351,7 +1354,7 @@ UNLOCK TABLES;
LOCK TABLES `time_zone_name` WRITE;
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_name` VALUES
+INSERT IGNORE INTO `time_zone_name` VALUES
('Europe/Moscow',3),
('Japan',5),
('leap/Europe/Moscow',4),
@@ -1363,7 +1366,7 @@ UNLOCK TABLES;
LOCK TABLES `time_zone_leap_second` WRITE;
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_leap_second` VALUES
+INSERT IGNORE INTO `time_zone_leap_second` VALUES
(78796800,1),
(94694401,2),
(126230402,3),
@@ -1391,7 +1394,7 @@ UNLOCK TABLES;
LOCK TABLES `time_zone_transition` WRITE;
/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_transition` VALUES
+INSERT IGNORE INTO `time_zone_transition` VALUES
(1,-1693706400,0),
(1,-1680483600,1),
(1,-1663455600,2),
@@ -1790,7 +1793,7 @@ UNLOCK TABLES;
LOCK TABLES `time_zone_transition_type` WRITE;
/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_transition_type` VALUES
+INSERT IGNORE INTO `time_zone_transition_type` VALUES
(1,0,7200,1,'MEST'),
(1,1,3600,0,'MET'),
(1,2,7200,1,'MEST'),
diff --git a/mysql-test/main/mysqldump-timing.result b/mysql-test/main/mysqldump-timing.result
index 7fa11893..5e2851b8 100644
--- a/mysql-test/main/mysqldump-timing.result
+++ b/mysql-test/main/mysqldump-timing.result
@@ -7,6 +7,7 @@ CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (0);
LOCK TABLE t1 WRITE;
timeout without t1 contents expected
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -30,6 +31,7 @@ SET @save_max_statement_time=@@max_statement_time;
SET GLOBAL max_statement_time=0.1;
UNLOCK TABLES;;
This would be a race condition otherwise, but default max_statement_time=0 makes it succeed
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
diff --git a/mysql-test/main/mysqldump-utf8mb4.result b/mysql-test/main/mysqldump-utf8mb4.result
index 90477130..7c5aea5f 100644
--- a/mysql-test/main/mysqldump-utf8mb4.result
+++ b/mysql-test/main/mysqldump-utf8mb4.result
@@ -32,6 +32,7 @@ Testing XML format output
----
Testing text format output
----
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index 9fb5f0bd..b1279320 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -31,6 +31,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a decimal(64, 20));
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
("0987654321098765432109876543210987654321");
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -48,6 +49,7 @@ CREATE TABLE t1 (a double);
INSERT IGNORE INTO t1 VALUES ('-9e999999');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -70,6 +72,7 @@ INSERT INTO t1 VALUES ('1.2345', 2.3456);
INSERT INTO t1 VALUES ("1.2345", 2.3456);
ERROR 42S22: Unknown column '1.2345' in 'field list'
SET SQL_MODE=@OLD_SQL_MODE;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -83,6 +86,7 @@ INSERT INTO `t1` VALUES
(1.23450,2.3456),
(1.23450,2.3456),
(1.23450,2.3456);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -96,6 +100,7 @@ INSERT INTO `t1` VALUES
(1.23450,2.3456),
(1.23450,2.3456),
(1.23450,2.3456);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -136,6 +141,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -217,6 +223,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -258,6 +265,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2);
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -283,6 +291,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -313,6 +322,7 @@ DROP TABLE t1;
# Bug#2592 mysqldump doesn't quote "tricky" names correctly
#
create table ```a` (i int);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE ```a` (
@@ -324,6 +334,7 @@ drop table ```a`;
# Bug#2591 mysqldump quotes names inconsistently
#
create table t1(a int);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -357,6 +368,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -383,6 +395,7 @@ UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
set global sql_mode='ANSI_QUOTES';
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -416,6 +429,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -448,6 +462,7 @@ drop table t1;
#
create table t1(a int);
insert into t1 values (1),(2),(3);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -480,6 +495,7 @@ drop table t1;
#
# Bug#6101 create database problem
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -506,6 +522,7 @@ USE `test`;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
create database mysqldump_test_db character set latin2 collate latin2_bin;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -540,6 +557,7 @@ drop database mysqldump_test_db;
# if it is explicitly set.
CREATE TABLE t1 (a CHAR(10));
INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -582,6 +600,7 @@ UNLOCK TABLES;
# If the future we can move this command into a separate test with
# checking that "mysqldump" is compiled with "latin1"
#
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -606,6 +625,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -630,6 +650,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -662,6 +683,7 @@ CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t2 VALUES (4),(5),(6);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -706,6 +728,7 @@ DROP TABLE t2;
#
CREATE TABLE t1 (`b` blob);
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -747,6 +770,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t1 VALUES (4),(5),(6);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -768,7 +792,7 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT IGNORE INTO `t1` VALUES
+INSERT IGNORE INTO `t1` VALUES
(1),
(2),
(3),
@@ -787,6 +811,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -807,7 +832,7 @@ CREATE TABLE `t1` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t1` VALUES
+INSERT DELAYED IGNORE INTO `t1` VALUES
(1),
(2),
(3),
@@ -1162,6 +1187,7 @@ F_cd00692c3bfe59267d5ecfac5310286c int,
F_6faa8040da20ef399b63a72d0e4ab575 int,
F_fe73f687e5bc5280214e0486b273a5f9 int);
insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1531,6 +1557,7 @@ drop table t1;
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1584,6 +1611,7 @@ CREATE TABLE t1 ( a INT );
CREATE TABLE t2 ( a INT );
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1), (2);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1619,6 +1647,7 @@ CREATE TABLE `t2` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1691,21 +1720,35 @@ create table t3(a varchar(30) primary key, b int not null);
test_sequence
------ Testing with illegal table names ------
mariadb-dump: Couldn't find table: "\d-2-1.sql"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "\t1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "\t1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "\\t1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "t\1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "t\1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "t/1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "T_1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "T%1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "T'1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "T_1"
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't find table: "T_"
+/*!999999\- enable the sandbox mode */
test_sequence
------ Testing with illegal database names ------
mariadb-dump: Got error: 1049: "Unknown database 'mysqldump_test_d'" when selecting the database
+/*!999999\- enable the sandbox mode */
mariadb-dump: Got error: 1049: "Unknown database 'mysqld\ump_test_db'" when selecting the database
+/*!999999\- enable the sandbox mode */
drop table t1, t2, t3;
drop database mysqldump_test_db;
use test;
@@ -1767,6 +1810,7 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
</table_data>
</database>
</mysqldump>
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1805,6 +1849,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1930,6 +1975,7 @@ create table t1(a int);
create table t2(a int);
create table t3(a int);
mariadb-dump: Couldn't find table: "non_existing"
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -1979,6 +2025,7 @@ drop table t1, t2, t3;
create table t1 (a int);
mariadb-dump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ `a` FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064)
mariadb-dump: Got 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 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1" when retrieving data from server
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2020,6 +2067,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`a b`, `c"d`, `e``f`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
insert into t1 values (0815, 4711, 2006);
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -2050,6 +2098,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2105,6 +2154,7 @@ INSERT INTO t2 VALUES ('bingo');
INSERT INTO t2 VALUES ('waffle');
INSERT INTO t2 VALUES ('lemon');
create view v2 as select * from t2 where a like 'a%' with check option;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2204,6 +2254,7 @@ drop database db1;
use test;
create table t1(a int);
create view v1 as select * from t1;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2274,6 +2325,7 @@ INSERT INTO t2 VALUES ('bingo');
INSERT INTO t2 VALUES ('waffle');
INSERT INTO t2 VALUES ('lemon');
create view v2 as select * from t2 where a like 'a%' with check option;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2344,6 +2396,7 @@ use test;
#
CREATE TABLE t1 (a char(10));
INSERT INTO t1 VALUES ('\'');
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2391,6 +2444,7 @@ create view v1 as
select * from v3 where b in (1, 2, 3, 4, 5, 6, 7);
create view v2 as
select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2543,6 +2597,7 @@ end if;
end AFTER 0000-00-00 00:00:00 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
INSERT INTO t1 (a) VALUES (1),(2),(3),(22);
update t1 set a = 4 where a=3;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2676,6 +2731,7 @@ DELIMITER ;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2827,6 +2883,7 @@ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be
set sql_mode='ansi';
create procedure `a'b` () select 1;
set sql_mode='';
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2983,6 +3040,7 @@ d
2003-10-26 02:00:00
2003-10-26 02:00:00
set global time_zone='Europe/Moscow';
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3024,6 +3082,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3086,6 +3145,7 @@ a2
1
2
3
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -3166,6 +3226,7 @@ a b c
1 first value xxxx
2 second value tttt
3 third value vvv vvv
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3294,6 +3355,7 @@ BEGIN
SET new.a = 0;
END|
SET SQL_MODE = @old_sql_mode;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3357,6 +3419,7 @@ DROP TABLE t1;
#
create table t1 (a binary(1), b blob);
insert into t1 values ('','');
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3392,6 +3455,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3492,6 +3556,7 @@ insert into t values(5, 51);
create view v1 as select qty, price, qty*price as value from t;
create view v2 as select qty from v1;
mysqldump {
+/*!999999\- enable the sandbox mode */
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -3507,6 +3572,7 @@ mysqldump {
/*!50001 SET collation_connection = @saved_col_connection */;
} mysqldump {
+/*!999999\- enable the sandbox mode */
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -3552,6 +3618,7 @@ drop table t1;
mysqldump {
mariadb-dump: Got error: 1356: "View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
mariadb-dump: Couldn't execute 'SHOW FIELDS FROM `v1`': View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
+/*!999999\- enable the sandbox mode */
-- failed on view `v1`: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`id` AS `id` from `t1`
@@ -3568,6 +3635,7 @@ insert into t1 values (1232131);
insert into t1 values (4711);
insert into t1 values (3231);
insert into t1 values (0815);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3646,6 +3714,7 @@ create table basetable ( id serial, tag varchar(64) );
create database mysqldump_views;
use mysqldump_views;
create view nasishnasifu as select mysqldump_tables.basetable.id from mysqldump_tables.basetable;
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_tables` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */;
@@ -3731,10 +3800,14 @@ grant all on test.* to mysqltest_1@localhost;
create table t1(a int, b varchar(34));
reset master;
mariadb-dump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't execute 'FLUSH /*!40101 LOCAL */ TABLES': Access denied; you need (at least one of) the RELOAD privilege(s) for this operation (1227)
+/*!999999\- enable the sandbox mode */
grant RELOAD on *.* to mysqltest_1@localhost;
mariadb-dump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation (1227)
+/*!999999\- enable the sandbox mode */
mariadb-dump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need (at least one of) the SUPER, BINLOG MONITOR privilege(s) for this operation (1227)
+/*!999999\- enable the sandbox mode */
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
drop table t1;
drop user mysqltest_1@localhost;
@@ -3793,6 +3866,7 @@ use test;
#
# Bug #33762: mysqldump can not dump INFORMATION_SCHEMA
#
+/*!999999\- enable the sandbox mode */
DROP TABLE IF EXISTS `TABLES`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@@ -3857,6 +3931,7 @@ DROP TABLE t1;
CREATE TABLE t2 (a INT) ENGINE=MyISAM;
CREATE TABLE t3 (a INT) ENGINE=MyISAM;
CREATE TABLE t1 (a INT) ENGINE=merge UNION=(t2, t3);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -3947,10 +4022,12 @@ connect user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYS
connection user27293;
create procedure mysqldump_test_db.sp1() select 'hello';
mariadb-dump: user2 has insufficient privileges to SHOW CREATE PROCEDURE `sp1`!
+/*!999999\- enable the sandbox mode */
-- insufficient privileges to SHOW CREATE PROCEDURE `sp1`
-- does user2 have permissions on mysql.proc?
+/*!999999\- enable the sandbox mode */
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
@@ -3978,6 +4055,7 @@ drop database mysqldump_test_db;
#
CREATE TABLE t1 (c1 INT, c2 LONGBLOB);
INSERT INTO t1 SET c1=11, c2=REPEAT('q',509);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -4051,6 +4129,7 @@ use db42635;
create table t1 (id int);
create view db42635.v1 (c) as select * from db42635.t1;
create view db42635.v2 (c) as select * from db42635.t1;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -4111,6 +4190,7 @@ drop database db42635;
#
SET NAMES utf8;
CREATE TABLE `straße` ( f1 INT );
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -4133,6 +4213,7 @@ UNLOCK TABLES;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -4157,6 +4238,7 @@ UNLOCK TABLES;
DROP TABLE `straße`;
CREATE TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ( f1 INT );
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -4180,6 +4262,7 @@ UNLOCK TABLES;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
mariadb-dump: Got error: 1146: "Table 'test.???????????????????????' doesn't exist" when using LOCK TABLES
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -4196,6 +4279,7 @@ CREATE TABLE t1(a int, b int);
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (2,3);
INSERT INTO t1 VALUES (3,4), (4,5);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -4470,6 +4554,7 @@ insert into t1 values (1232131);
insert into t1 values (4711);
insert into t1 values (3231);
insert into t1 values (0815);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -4602,6 +4687,7 @@ CREATE DATABASE test;
create database `test-database`;
use `test-database`;
create table test (a int);
+/*!999999\- enable the sandbox mode */
DROP TABLE IF EXISTS `test`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@@ -4824,6 +4910,7 @@ CREATE TRIGGER `trig` BEFORE INSERT ON `test` FOR EACH ROW BEGIN
END |
ALTER DATABASE `test-database` CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test` (
@@ -5307,6 +5394,7 @@ USE test;
# Also verify that a prefix of the mode's name is enough.
#
CREATE TABLE t1 (a INT);
+/*!999999\- enable the sandbox mode */
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -5539,6 +5627,7 @@ CREATE DATABASE `a\"'``b`;
USE `a\"'``b`;
CREATE PROCEDURE p1() BEGIN END;
ALTER DATABASE `a\"'``b` COLLATE utf8_general_ci;
+/*!999999\- enable the sandbox mode */
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
ALTER DATABASE `a\"'``b` CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
@@ -5587,6 +5676,7 @@ CREATE VIEW nonunique_table_view_name AS SELECT 1;
##################################################
# --compact --databases db1 db2
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */;
@@ -5655,6 +5745,7 @@ USE `db2`;
##################################################
# --compact db2
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nonunique_table_name` (
@@ -5677,6 +5768,7 @@ INSERT INTO `nonunique_table_view_name` VALUES
##################################################
# --compact --delayed-insert --no-data-med=0 --databases db2 db1
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */;
@@ -5688,7 +5780,7 @@ CREATE TABLE `nonunique_table_name` (
UNIQUE KEY `i1` (`i1`)
) ENGINE=MEMORY AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT DELAYED INTO `nonunique_table_name` VALUES
+INSERT DELAYED INTO `nonunique_table_name` VALUES
(1),
(2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -5710,7 +5802,7 @@ CREATE TABLE `basetable` (
`id` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT DELAYED INTO `basetable` VALUES
+INSERT DELAYED INTO `basetable` VALUES
(5),
(6);
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -5811,6 +5903,7 @@ CREATE TABLE t1 (a int, b int);
CREATE TRIGGER tt1_t1 BEFORE INSERT ON t1 FOR EACH ROW
SET NEW.b=NEW.a + 10;
INSERT INTO t1 (a) VALUES (1),(2),(3);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -5859,6 +5952,7 @@ DROP TABLE t1;
#
# Without --replace and --insert-ignore
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -5954,6 +6048,7 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` (
#
# With --replace
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -6059,6 +6154,7 @@ CREATE TABLE IF NOT EXISTS `transaction_registry` (
#
# With --insert-ignore
#
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -6183,6 +6279,7 @@ insert into t3 values(2);
insert into t3(`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( ) _ - = +` ) values(1,2,3);
CREATE TABLE t4(ËÃÃŒÃÎËÃ1 INT);
insert into t4 values(1);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -6223,6 +6320,7 @@ CREATE TABLE `t4` (
INSERT INTO `t4` VALUES
(1);
#Check side effect on --complete insert
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -6468,7 +6566,7 @@ j integer
INSERT INTO t VALUES (1,1),(2,2),(3,3),(4,4);
# Dump database 1
# Restore from database 1 to database 2
-ERROR 1100 (HY000) at line 45: Table 'seq_t_i' was not locked with LOCK TABLES
+ERROR 1100 (HY000) at line 46: Table 'seq_t_i' was not locked with LOCK TABLES
SETVAL(`seq_t_i`, 1, 0)
1
DROP DATABASE IF EXISTS test1;
@@ -6589,10 +6687,8 @@ TABLE 1
SET GLOBAL LOG_OUTPUT=DEFAULT, GLOBAL GENERAL_LOG=@save_general_log;
TRUNCATE TABLE mysql.general_log;
DROP DATABASE test1;
-#
# End of 10.3 tests
#
-#
# MDEV-31092 mysqldump --force doesn't ignore error as it should
#
create function f1() returns int return 1;
@@ -6603,6 +6699,7 @@ Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
update mysql.event set body ='select not_a_value' where db='test' and name='e1';
create table t1 (i int);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -6650,7 +6747,24 @@ drop function f1;
drop function f2;
drop event e1;
drop table t1;
-#
# End of 10.4 tests
#
+# MDEV-33727 mariadb-dump trusts the server and does not validate the data
+#
+create table t1 (a int);
+/*!999999\- enable the sandbox mode */
+DROP TABLE IF EXISTS `t1`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+`a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+ERROR at line 9: Not allowed in the sandbox mode
+drop table t1;
+# End of 10.5 tests
+#
+# MDEV-16733 mysqldump --tab and --xml options are conflicting
+#
mariadb-dump: --xml can't be used with --tab.
+# End of 10.11 tests
diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test
index 1d479dde..0f513a7f 100644
--- a/mysql-test/main/mysqldump.test
+++ b/mysql-test/main/mysqldump.test
@@ -2989,9 +2989,7 @@ TRUNCATE TABLE mysql.general_log;
DROP DATABASE test1;
--remove_file $MYSQLTEST_VARDIR/tmp/dumptest1.sql
---echo #
--echo # End of 10.3 tests
---echo #
--echo #
--echo # MDEV-31092 mysqldump --force doesn't ignore error as it should
@@ -3010,13 +3008,34 @@ drop function f2;
drop event e1;
drop table t1;
---echo #
--echo # End of 10.4 tests
+
+--echo #
+--echo # MDEV-33727 mariadb-dump trusts the server and does not validate the data
--echo #
-#
-# MDEV-16733 mysqldump --tab and --xml options are conflicting
-#
+create table t1 (a int);
+--exec $MYSQL_DUMP --compact --add-drop-table test > $MYSQLTEST_VARDIR/tmp/mdev33727.sql
+
+# first let's verify it can be loaded not only by mariadb client
+--source $MYSQLTEST_VARDIR/tmp/mdev33727.sql
+
+# and now test the mariadb client sandbox protection
+--append_file $MYSQLTEST_VARDIR/tmp/mdev33727.sql
+\! echo foo
+EOF
+--error 1
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mdev33727.sql 2>&1
+--remove_file $MYSQLTEST_VARDIR/tmp/mdev33727.sql
+drop table t1;
+
+--echo # End of 10.5 tests
+
+--echo #
+--echo # MDEV-16733 mysqldump --tab and --xml options are conflicting
+--echo #
--replace_result mariadb-dump.exe mariadb-dump
--error 1
--exec $MYSQL_DUMP --xml --tab=$MYSQLTEST_VARDIR/tmp 2>&1
+
+--echo # End of 10.11 tests
diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result
index be6c2998..b022ce23 100644
--- a/mysql-test/main/openssl_1.result
+++ b/mysql-test/main/openssl_1.result
@@ -77,6 +77,7 @@ DROP TABLE thread_status;
SET GLOBAL event_scheduler=0;
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -113,6 +114,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -149,6 +151,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
diff --git a/mysql-test/main/openssl_1.test b/mysql-test/main/openssl_1.test
index 9232868b..24525287 100644
--- a/mysql-test/main/openssl_1.test
+++ b/mysql-test/main/openssl_1.test
@@ -68,7 +68,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a different cacert
#
---exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
+--write_line "this query should not execute;" $MYSQLTEST_VARDIR/tmp/test.sql
# Handle that openssl gives different error messages from YaSSL.
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result
index aeaff29a..3c90e97c 100644
--- a/mysql-test/main/opt_trace.result
+++ b/mysql-test/main/opt_trace.result
@@ -1609,6 +1609,12 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a {
},
{
"test_if_skip_sort_order": []
+ },
+ {
+ "prepare_sum_aggregators": {
+ "function": "min(t1.d)",
+ "aggregator_type": "simple"
+ }
}
]
}
@@ -1818,6 +1824,18 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id {
},
{
"test_if_skip_sort_order": []
+ },
+ {
+ "prepare_sum_aggregators": {
+ "function": "min(t1.a)",
+ "aggregator_type": "simple"
+ }
+ },
+ {
+ "prepare_sum_aggregators": {
+ "function": "max(t1.a)",
+ "aggregator_type": "simple"
+ }
}
]
}
@@ -10528,6 +10546,25 @@ JS
drop table t1,t2,t3,t10,t11;
set optimizer_trace=DEFAULT;
#
+# MDEV-29179 Condition pushdown from HAVING into WHERE is not shown in optimizer trace
+#
+CREATE TABLE t1 (a INT, b VARCHAR(1), KEY (a), KEY(b,a)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES (4,'n'),(1,'h'),(NULL,'w');
+SET optimizer_trace= 'enabled=on';
+SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7;
+b a
+h 1
+n 4
+SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ) exp1, JSON_VALID(trace) exp2 FROM information_schema.optimizer_trace;
+exp1 exp2
+[
+ {
+ "conds": "(t1.b <> 'p' or multiple equal(4, t1.a)) and t1.a <= 7",
+ "having": null
+ }
+] 1
+DROP TABLE t1;
+#
# End of 10.4 tests
#
set optimizer_trace='enabled=on';
diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test
index 7b0ee5be..58a6b23d 100644
--- a/mysql-test/main/opt_trace.test
+++ b/mysql-test/main/opt_trace.test
@@ -804,6 +804,16 @@ drop table t1,t2,t3,t10,t11;
set optimizer_trace=DEFAULT;
--echo #
+--echo # MDEV-29179 Condition pushdown from HAVING into WHERE is not shown in optimizer trace
+--echo #
+
+CREATE TABLE t1 (a INT, b VARCHAR(1), KEY (a), KEY(b,a)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES (4,'n'),(1,'h'),(NULL,'w');
+SET optimizer_trace= 'enabled=on';
+SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7; SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ) exp1, JSON_VALID(trace) exp2 FROM information_schema.optimizer_trace;
+DROP TABLE t1;
+
+--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/partition.result b/mysql-test/main/partition.result
index 4f2a55ad..4c762a1d 100644
--- a/mysql-test/main/partition.result
+++ b/mysql-test/main/partition.result
@@ -2063,7 +2063,6 @@ 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
diff --git a/mysql-test/main/partition_binlog.result b/mysql-test/main/partition_binlog.result
index 45cd636c..5ecccde4 100644
--- a/mysql-test/main/partition_binlog.result
+++ b/mysql-test/main/partition_binlog.result
@@ -27,7 +27,6 @@ Table Op Msg_type Msg_text
test.t1 repair error Wrong partition name or partition list
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/plugin_auth.result b/mysql-test/main/plugin_auth.result
index 12a5156e..9a13b9ba 100644
--- a/mysql-test/main/plugin_auth.result
+++ b/mysql-test/main/plugin_auth.result
@@ -338,6 +338,7 @@ FLUSH PRIVILEGES;
# Executing 'mysqladmin'
mysqld is alive
# Executing 'mysqldump'
+/*!999999\- enable the sandbox mode */
# Executing 'mysql_upgrade'
#
# Bug #59657: Move the client authentication_pam plugin into the
diff --git a/mysql-test/main/plugin_loaderr.test b/mysql-test/main/plugin_loaderr.test
index 85621ad0..1623630b 100644
--- a/mysql-test/main/plugin_loaderr.test
+++ b/mysql-test/main/plugin_loaderr.test
@@ -13,14 +13,14 @@ FROM INFORMATION_SCHEMA.PLUGINS WHERE plugin_name = 'innodb';
--echo #
--echo # MDEV-6351 --plugin=force has no effect for built-in plugins
--echo #
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--error 1
--exec $MYSQLD_CMD --innodb=force --innodb-page-size=6000 --disable-log-error
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index 7fd30f3e..fb3681ca 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -5812,5 +5812,186 @@ GROUP_CONCAT(@x)
0
DROP TABLE t;
#
+# MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT
+#
+PREPARE stmt FROM 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)';
+EXECUTE stmt USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+DEALLOCATE PREPARE stmt;
+PREPARE stmt FROM 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)';
+EXECUTE stmt USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+DEALLOCATE PREPARE stmt;
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'BEGIN NOT ATOMIC DECLARE a INT DEFAULT ?; END' USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'BEGIN NOT ATOMIC DECLARE a INT DEFAULT ?; END' USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+CREATE PROCEDURE p1(a INT) SELECT 1;
+EXECUTE IMMEDIATE 'CALL p1(?)' USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'CALL p1(?)' USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+DROP PROCEDURE p1;
+EXECUTE IMMEDIATE 'SELECT ? UNION SELECT 1' USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'SELECT ? UNION SELECT 1' USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION ALL SELECT 1) AS derived' USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION ALL SELECT 1) AS derived' USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION DISTINCT SELECT 1) AS derived' USING DEFAULT;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION DISTINCT SELECT 1) AS derived' USING IGNORE;
+ERROR HY000: Default/ignore value is not supported for such parameter usage
+# multi-update and DEFAULT
+CREATE TABLE t1 (a INT, b INT DEFAULT a);
+INSERT into t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT DEFAULT a);
+INSERT INTO t2 VALUES (1,10),(2,30);
+UPDATE t1,t2 SET t1.b = DEFAULT, t2.b = DEFAULT WHERE t1.a=t2.a;
+SELECT * FROM t1;
+a b
+1 1
+2 2
+SELECT * FROM t2;
+a b
+1 1
+2 2
+# re-check the case for Prepared Statement with parameters
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+INSERT INTO t1 VALUES (1,2),(2,3);
+INSERT INTO t2 VALUES (1,10),(2,30);
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING DEFAULT, DEFAULT;
+SELECT * FROM t1;
+a b
+1 1
+2 2
+SELECT * FROM t2;
+a b
+1 1
+2 2
+DROP TABLE t1, t2;
+# multi-update and IGNORE
+CREATE TABLE t1 (a INT, b INT default a);
+INSERT INTO t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT default a);
+INSERT INTO t2 VALUES (1,10),(2,30);
+UPDATE t1,t2 SET t1.b = IGNORE, t2.b = IGNORE WHERE t1.a=t2.a;
+SELECT * FROM t1;
+a b
+1 2
+2 3
+SELECT * FROM t2;
+a b
+1 NULL
+2 NULL
+# re-check the case for Prepared Statement with parameters
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+INSERT INTO t1 VALUES (1,2),(2,3);
+INSERT INTO t2 VALUES (1,10),(2,30);
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING IGNORE, IGNORE;
+SELECT * FROM t1;
+a b
+1 2
+2 3
+SELECT * FROM t2;
+a b
+1 10
+2 30
+DROP TABLE t1, t2;
+# multi-update and DEFAULT parameter (no default)
+CREATE TABLE t1 (a INT, b INT NOT NULL);
+INSERT INTO t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT NOT NULL);
+INSERT INTO t2 VALUES (1,10),(2,30);
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING DEFAULT, DEFAULT;
+ERROR HY000: Field 'b' doesn't have a default value
+DROP TABLE t1, t2;
+# multi-update and IGNORE parameter (no default)
+CREATE TABLE t1 (a INT, b INT NOT NULL);
+INSERT INTO t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT NOT NULL);
+INSERT INTO t2 VALUES (1,10),(2,30);
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING IGNORE, IGNORE;
+SELECT * FROM t1;
+a b
+1 2
+2 3
+SELECT * FROM t2;
+a b
+1 10
+2 30
+DROP TABLE t1, t2;
+#
+# MDEV-33549: Incorrect handling of UPDATE in PS mode in case a table's colum declared as NOT NULL
+#
+CREATE TABLE t1 (a INT, b INT DEFAULT NULL);
+INSERT INTO t1 VALUES (20, 30);
+EXECUTE IMMEDIATE 'UPDATE t1 SET b=?' USING DEFAULT;
+SELECT * FROM t1;
+a b
+20 NULL
+# Run twice the same update in PS mode to check
+# that no memory relating issues taken place.
+PREPARE stmt FROM 'UPDATE t1 SET b=?';
+EXECUTE stmt USING DEFAULT;
+EXECUTE stmt USING DEFAULT;
+# Clean up
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
+# The same test for multi-table update
+CREATE TABLE t1 (a INT, b INT DEFAULT NULL);
+CREATE TABLE t2 (a INT, c INT DEFAULT NULL);
+INSERT INTO t1 VALUES (20, 30);
+INSERT INTO t2 VALUES (20, 30);
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET b=? WHERE t1.a=t2.a' USING DEFAULT;
+SELECT * FROM t1;
+a b
+20 NULL
+# Run twice the same multi-table update in PS mode to check
+# that no memory relating issues taken place.
+PREPARE stmt FROM 'UPDATE t1,t2 SET b=? WHERE t1.a=t2.a';
+EXECUTE stmt USING DEFAULT;
+EXECUTE stmt USING DEFAULT;
+DEALLOCATE PREPARE stmt;
+# Clean up
+DROP TABLE t1;
+# This time checks that a default value for table's column
+# represented by a function call is handled correctly on UPDATE in PS mode
+CREATE TABLE t1 (a INT, b INT DEFAULT MOD(a, 3));
+INSERT INTO t1 VALUES (20, 30);
+EXECUTE IMMEDIATE 'UPDATE t1, t2 SET b=? WHERE t1.a=t2.a' USING DEFAULT;
+SELECT * FROM t1;
+a b
+20 2
+# Run twice the same multi-table update in PS mode to check
+# that no memory relating issues taken place.
+PREPARE stmt FROM 'UPDATE t1, t2 SET b=? WHERE t1.a=t2.a';
+EXECUTE stmt USING DEFAULT;
+EXECUTE stmt USING DEFAULT;
+# Clean up
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+# MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute() || active_arena->state == Query_arena::STMT_SP_QUERY_ARGUMENTS' failed. in st_select_lex::fix_prepare_information
+CREATE TABLE t1 AS SELECT 1 f;
+PREPARE stmt FROM 'SHOW CREATE TABLE t1';
+DROP TABLE t1;
+EXECUTE stmt;
+ERROR 42S02: Table 'test.t1' doesn't exist
+CREATE VIEW t1 AS SELECT 1;
+EXECUTE stmt;
+View Create View character_set_client collation_connection
+t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `t1` AS select 1 AS `1` latin1 latin1_swedish_ci
+# Clean up
+DEALLOCATE PREPARE stmt;
+DROP VIEW t1;
+#
# End of 10.4 tests
#
diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test
index 675c5102..c7568f73 100644
--- a/mysql-test/main/ps.test
+++ b/mysql-test/main/ps.test
@@ -5249,5 +5249,190 @@ EXECUTE IMMEDIATE 'SELECT GROUP_CONCAT(@x) FROM t GROUP BY @x := f';
DROP TABLE t;
--echo #
+--echo # MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT
+--echo #
+
+PREPARE stmt FROM 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)';
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE stmt USING DEFAULT;
+DEALLOCATE PREPARE stmt;
+
+PREPARE stmt FROM 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)';
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE stmt USING IGNORE;
+DEALLOCATE PREPARE stmt;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING IGNORE;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'BEGIN NOT ATOMIC DECLARE a INT DEFAULT ?; END' USING DEFAULT;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'BEGIN NOT ATOMIC DECLARE a INT DEFAULT ?; END' USING IGNORE;
+
+CREATE PROCEDURE p1(a INT) SELECT 1;
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'CALL p1(?)' USING DEFAULT;
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'CALL p1(?)' USING IGNORE;
+DROP PROCEDURE p1;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'SELECT ? UNION SELECT 1' USING DEFAULT;
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'SELECT ? UNION SELECT 1' USING IGNORE;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION ALL SELECT 1) AS derived' USING DEFAULT;
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION ALL SELECT 1) AS derived' USING IGNORE;
+
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION DISTINCT SELECT 1) AS derived' USING DEFAULT;
+--error ER_INVALID_DEFAULT_PARAM
+EXECUTE IMMEDIATE 'SELECT * FROM (SELECT ? UNION DISTINCT SELECT 1) AS derived' USING IGNORE;
+
+--echo # multi-update and DEFAULT
+CREATE TABLE t1 (a INT, b INT DEFAULT a);
+INSERT into t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT DEFAULT a);
+INSERT INTO t2 VALUES (1,10),(2,30);
+
+UPDATE t1,t2 SET t1.b = DEFAULT, t2.b = DEFAULT WHERE t1.a=t2.a;
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+--echo # re-check the case for Prepared Statement with parameters
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+INSERT INTO t1 VALUES (1,2),(2,3);
+INSERT INTO t2 VALUES (1,10),(2,30);
+
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING DEFAULT, DEFAULT;
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+# Cleanup
+DROP TABLE t1, t2;
+
+--echo # multi-update and IGNORE
+CREATE TABLE t1 (a INT, b INT default a);
+INSERT INTO t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT default a);
+INSERT INTO t2 VALUES (1,10),(2,30);
+
+UPDATE t1,t2 SET t1.b = IGNORE, t2.b = IGNORE WHERE t1.a=t2.a;
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+--echo # re-check the case for Prepared Statement with parameters
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+INSERT INTO t1 VALUES (1,2),(2,3);
+INSERT INTO t2 VALUES (1,10),(2,30);
+
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING IGNORE, IGNORE;
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+# Cleanup
+DROP TABLE t1, t2;
+
+--echo # multi-update and DEFAULT parameter (no default)
+CREATE TABLE t1 (a INT, b INT NOT NULL);
+INSERT INTO t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT NOT NULL);
+INSERT INTO t2 VALUES (1,10),(2,30);
+
+--error ER_NO_DEFAULT_FOR_FIELD
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING DEFAULT, DEFAULT;
+
+# Cleanup
+DROP TABLE t1, t2;
+
+--echo # multi-update and IGNORE parameter (no default)
+CREATE TABLE t1 (a INT, b INT NOT NULL);
+INSERT INTO t1 VALUES (1,2),(2,3);
+CREATE TABLE t2 (a INT, b INT NOT NULL);
+INSERT INTO t2 VALUES (1,10),(2,30);
+
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET t1.b = ?, t2.b = ? WHERE t1.a=t2.a' USING IGNORE, IGNORE;
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+# Cleanup
+DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-33549: Incorrect handling of UPDATE in PS mode in case a table's colum declared as NOT NULL
+--echo #
+
+CREATE TABLE t1 (a INT, b INT DEFAULT NULL);
+INSERT INTO t1 VALUES (20, 30);
+EXECUTE IMMEDIATE 'UPDATE t1 SET b=?' USING DEFAULT;
+SELECT * FROM t1;
+
+--echo # Run twice the same update in PS mode to check
+--echo # that no memory relating issues taken place.
+PREPARE stmt FROM 'UPDATE t1 SET b=?';
+EXECUTE stmt USING DEFAULT;
+EXECUTE stmt USING DEFAULT;
+
+--echo # Clean up
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1;
+
+--echo # The same test for multi-table update
+CREATE TABLE t1 (a INT, b INT DEFAULT NULL);
+CREATE TABLE t2 (a INT, c INT DEFAULT NULL);
+
+INSERT INTO t1 VALUES (20, 30);
+INSERT INTO t2 VALUES (20, 30);
+
+EXECUTE IMMEDIATE 'UPDATE t1,t2 SET b=? WHERE t1.a=t2.a' USING DEFAULT;
+SELECT * FROM t1;
+--echo # Run twice the same multi-table update in PS mode to check
+--echo # that no memory relating issues taken place.
+PREPARE stmt FROM 'UPDATE t1,t2 SET b=? WHERE t1.a=t2.a';
+EXECUTE stmt USING DEFAULT;
+EXECUTE stmt USING DEFAULT;
+DEALLOCATE PREPARE stmt;
+--echo # Clean up
+DROP TABLE t1;
+
+--echo # This time checks that a default value for table's column
+--echo # represented by a function call is handled correctly on UPDATE in PS mode
+CREATE TABLE t1 (a INT, b INT DEFAULT MOD(a, 3));
+INSERT INTO t1 VALUES (20, 30);
+EXECUTE IMMEDIATE 'UPDATE t1, t2 SET b=? WHERE t1.a=t2.a' USING DEFAULT;
+SELECT * FROM t1;
+
+--echo # Run twice the same multi-table update in PS mode to check
+--echo # that no memory relating issues taken place.
+PREPARE stmt FROM 'UPDATE t1, t2 SET b=? WHERE t1.a=t2.a';
+EXECUTE stmt USING DEFAULT;
+EXECUTE stmt USING DEFAULT;
+
+--echo # Clean up
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1, t2;
+
+--echo # MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute() || active_arena->state == Query_arena::STMT_SP_QUERY_ARGUMENTS' failed. in st_select_lex::fix_prepare_information
+CREATE TABLE t1 AS SELECT 1 f;
+PREPARE stmt FROM 'SHOW CREATE TABLE t1';
+DROP TABLE t1;
+--error ER_NO_SUCH_TABLE
+EXECUTE stmt;
+CREATE VIEW t1 AS SELECT 1;
+EXECUTE stmt;
+--echo # Clean up
+DEALLOCATE PREPARE stmt;
+DROP VIEW t1;
+
+--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/ps_2myisam.result b/mysql-test/main/ps_2myisam.result
index 256665ce..ec365498 100644
--- a/mysql-test/main/ps_2myisam.result
+++ b/mysql-test/main/ps_2myisam.result
@@ -1798,7 +1798,7 @@ t5 CREATE TABLE `t5` (
`param09` longtext DEFAULT NULL,
`const10` bigint(17) DEFAULT NULL,
`param10` bigint(20) DEFAULT NULL,
- `const11` int(4) DEFAULT NULL,
+ `const11` int(5) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
@@ -1828,7 +1828,7 @@ def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 8 17 9 Y 32768 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
-def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
+def test t5 t5 const11 const11 3 5 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
diff --git a/mysql-test/main/ps_3innodb.result b/mysql-test/main/ps_3innodb.result
index 675587e0..1c98a59c 100644
--- a/mysql-test/main/ps_3innodb.result
+++ b/mysql-test/main/ps_3innodb.result
@@ -1781,7 +1781,7 @@ t5 CREATE TABLE `t5` (
`param09` longtext DEFAULT NULL,
`const10` bigint(17) DEFAULT NULL,
`param10` bigint(20) DEFAULT NULL,
- `const11` int(4) DEFAULT NULL,
+ `const11` int(5) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
@@ -1811,7 +1811,7 @@ def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 8 17 9 Y 32768 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
-def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
+def test t5 t5 const11 const11 3 5 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
diff --git a/mysql-test/main/ps_4heap.result b/mysql-test/main/ps_4heap.result
index dcde7613..db182536 100644
--- a/mysql-test/main/ps_4heap.result
+++ b/mysql-test/main/ps_4heap.result
@@ -1782,7 +1782,7 @@ t5 CREATE TABLE `t5` (
`param09` longtext DEFAULT NULL,
`const10` bigint(17) DEFAULT NULL,
`param10` bigint(20) DEFAULT NULL,
- `const11` int(4) DEFAULT NULL,
+ `const11` int(5) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
@@ -1812,7 +1812,7 @@ def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 8 17 9 Y 32768 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
-def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
+def test t5 t5 const11 const11 3 5 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
diff --git a/mysql-test/main/ps_5merge.result b/mysql-test/main/ps_5merge.result
index c9d33dbb..963a3a60 100644
--- a/mysql-test/main/ps_5merge.result
+++ b/mysql-test/main/ps_5merge.result
@@ -1719,7 +1719,7 @@ t5 CREATE TABLE `t5` (
`param09` longtext DEFAULT NULL,
`const10` bigint(17) DEFAULT NULL,
`param10` bigint(20) DEFAULT NULL,
- `const11` int(4) DEFAULT NULL,
+ `const11` int(5) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
@@ -1749,7 +1749,7 @@ def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 8 17 9 Y 32768 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
-def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
+def test t5 t5 const11 const11 3 5 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
@@ -5087,7 +5087,7 @@ t5 CREATE TABLE `t5` (
`param09` longtext DEFAULT NULL,
`const10` bigint(17) DEFAULT NULL,
`param10` bigint(20) DEFAULT NULL,
- `const11` int(4) DEFAULT NULL,
+ `const11` int(5) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
@@ -5117,7 +5117,7 @@ def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 8 17 9 Y 32768 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
-def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
+def test t5 t5 const11 const11 3 5 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
diff --git a/mysql-test/main/query_cache.result b/mysql-test/main/query_cache.result
index f78a6ccc..f68f619f 100644
--- a/mysql-test/main/query_cache.result
+++ b/mysql-test/main/query_cache.result
@@ -2208,12 +2208,42 @@ Qcache_queries_in_cache 0
DROP FUNCTION foo;
drop table t1;
#
+# MDEV-33861: main.query_cache fails with embedded after
+# enabling WITH_PROTECT_STATEMENT_MEMROOT
+#
+create table t1 (s1 int);
+create procedure f3 () begin
+select * from t1;
+end;
+//
+create procedure f4 () begin
+select * from t1;
+end;
+//
+Call f4();
+s1
+cAll f3();
+s1
+insert into t1 values (2);
+caLl f3();
+s1
+2
+drop procedure f3;
+drop procedure f4;
+drop table t1;
+#
+# End of 10.4 tests
+#
+#
# MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
#
SET @qc= @@query_cache_size;
set global Query_cache_size=18446744073709547520;
SET GLOBAL query_cache_size= @qc;
#
+# End of 10.5 tests
+#
+#
# MDEV-22301 JSON_TABLE: Queries are not inserted into query cache.
#
create table t1 (a text);
@@ -2239,6 +2269,7 @@ DROP TABLE t;
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
+# End of 10.6 tests
#
# MDEV-29028: Queries using RANDOM_BYTES get stored in query cache
#
@@ -2261,6 +2292,4 @@ improbable
0
drop table t1;
set global query_cache_type= @qcache;
-#
# End of 10.10 tests
-#
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test
index 08756b80..feb9ecf5 100644
--- a/mysql-test/main/query_cache.test
+++ b/mysql-test/main/query_cache.test
@@ -1808,6 +1808,40 @@ DROP FUNCTION foo;
drop table t1;
--echo #
+--echo # MDEV-33861: main.query_cache fails with embedded after
+--echo # enabling WITH_PROTECT_STATEMENT_MEMROOT
+--echo #
+
+create table t1 (s1 int);
+--delimiter //
+create procedure f3 () begin
+select * from t1;
+end;
+//
+create procedure f4 () begin
+select * from t1;
+end;
+//
+--delimiter ;
+
+Call f4();
+
+cAll f3();
+
+insert into t1 values (2);
+
+caLl f3();
+
+drop procedure f3;
+drop procedure f4;
+drop table t1;
+
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
+
+--echo #
--echo # MDEV-24858 SIGABRT in DbugExit from my_malloc in Query_cache::init_cache Regression
--echo #
--disable_warnings
@@ -1817,6 +1851,10 @@ SET GLOBAL query_cache_size= @qc;
--enable_warnings
--echo #
+--echo # End of 10.5 tests
+--echo #
+
+--echo #
--echo # MDEV-22301 JSON_TABLE: Queries are not inserted into query cache.
--echo #
create table t1 (a text);
@@ -1838,6 +1876,8 @@ DROP TABLE t;
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size=@save_query_cache_size;
+--echo # End of 10.6 tests
+
--echo #
--echo # MDEV-29028: Queries using RANDOM_BYTES get stored in query cache
--echo #
@@ -1866,7 +1906,6 @@ select random_bytes(1024) = random_bytes(1024) as improbable;
drop table t1;
set global query_cache_type= @qcache;
---echo #
--echo # End of 10.10 tests
---echo #
+
--enable_ps2_protocol
diff --git a/mysql-test/main/read_only_innodb.result b/mysql-test/main/read_only_innodb.result
index cfc8f2ec..85aee640 100644
--- a/mysql-test/main/read_only_innodb.result
+++ b/mysql-test/main/read_only_innodb.result
@@ -70,7 +70,7 @@ UNLOCK TABLES;
DROP TABLE t1;
DROP USER test@localhost;
disconnect con1;
-echo End of 5.1 tests
+# End of 5.1 tests
#
# Bug#33669: Transactional temporary tables do not work under --read-only
#
@@ -244,3 +244,26 @@ connection default;
SET GLOBAL READ_ONLY = OFF;
DROP USER bug33669@localhost;
DROP DATABASE db1;
+# End of 5.5 tests
+#
+# MDEV-33889 Read only server throws error when running a create temporary table as select statement
+#
+create table t1(a int) engine=innodb;
+create user u1@localhost;
+grant insert, select, update, delete, create temporary tables on test.* to u1@localhost;
+insert into t1 values (1);
+set global read_only=1;
+connect u1,localhost,u1;
+set default_tmp_storage_engine=innodb;
+create temporary table tt1 (a int);
+create temporary table tt2 like t1;
+create temporary table tt3 as select * from t1;
+select * from tt3;
+a
+1
+disconnect u1;
+connection default;
+drop table t1;
+drop user u1@localhost;
+set global read_only=0;
+# End of 10.5 tests
diff --git a/mysql-test/main/read_only_innodb.test b/mysql-test/main/read_only_innodb.test
index e2c2979c..59af952d 100644
--- a/mysql-test/main/read_only_innodb.test
+++ b/mysql-test/main/read_only_innodb.test
@@ -103,7 +103,7 @@ DROP USER test@localhost;
disconnect con1;
---echo echo End of 5.1 tests
+--echo # End of 5.1 tests
--echo #
--echo # Bug#33669: Transactional temporary tables do not work under --read-only
@@ -250,3 +250,29 @@ SET GLOBAL READ_ONLY = OFF;
DROP USER bug33669@localhost;
DROP DATABASE db1;
+--echo # End of 5.5 tests
+
+--echo #
+--echo # MDEV-33889 Read only server throws error when running a create temporary table as select statement
+--echo #
+create table t1(a int) engine=innodb;
+create user u1@localhost;
+grant insert, select, update, delete, create temporary tables on test.* to u1@localhost;
+insert into t1 values (1);
+set global read_only=1;
+
+connect u1,localhost,u1;
+set default_tmp_storage_engine=innodb;
+
+create temporary table tt1 (a int);
+create temporary table tt2 like t1;
+create temporary table tt3 as select * from t1;
+select * from tt3;
+disconnect u1;
+
+connection default;
+drop table t1;
+drop user u1@localhost;
+set global read_only=0;
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result
index db52e4dc..85a3008c 100644
--- a/mysql-test/main/rowid_filter_innodb.result
+++ b/mysql-test/main/rowid_filter_innodb.result
@@ -4170,5 +4170,105 @@ 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` between 3 and 5 and trigcond(<cache>(`test`.`t1`.`c1`) = `test`.`t2`.`c1`))))
DROP TABLE t1,t2;
-set global innodb_stats_persistent= @stats.save;
+#
+# MDEV-31154: Fatal InnoDB error or assertion `!is_v' failure upon multi-update with indexed virtual column
+#
+# Test with auto generated Primary Key
+#
+SET @save_optimizer_switch= @@optimizer_switch;
+SET optimizer_switch='rowid_filter=on';
+CREATE TABLE t0(a int);
+INSERT INTO t0 SELECT seq FROM seq_1_to_20;
+ANALYZE TABLE t0 PERSISTENT FOR ALL;
+Table Op Msg_type Msg_text
+test.t0 analyze status Engine-independent statistics collected
+test.t0 analyze status OK
+CREATE TABLE t1 (
+a int,
+b int as (a * 2) VIRTUAL,
+f char(200), /* Filler */
+key (b),
+key (a)
+) engine=innodb;
+INSERT INTO t1 (a, f) SELECT seq, seq FROM seq_1_to_1000;
+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
+# Test for type 'ref|filter'
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 20 Using where
+1 SIMPLE t1 ref|filter b,a b|a 5|5 test.t0.a 1 (2%) Using where; Using rowid filter
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+count(*)
+10
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 20 Using where
+1 SIMPLE t1 ref|filter b,a b|a 5|5 test.t0.a 1 (2%) Using where; Using rowid filter
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+count(*)
+10
+# Test for type 'range|filter'
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range|filter b,a b|a 5|5 NULL 49 (10%) Using where; Using rowid filter
+SELECT count(*) FROM t1 WHERE a<100 and b <100;
+count(*)
+49
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range|filter b,a b|a 5|5 NULL 49 (10%) Using where; Using rowid filter
+SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+count(*)
+49
+# Test with Primary Key
+#
+DROP TABLE t1;
+CREATE TABLE t1 (
+p int PRIMARY KEY AUTO_INCREMENT,
+a int,
+b int as (a * 2) VIRTUAL,
+f char(200), /* Filler */
+key (b),
+key (a)
+) engine=innodb;
+INSERT INTO t1 (a, f) SELECT seq, seq FROM seq_1_to_1000;
+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
+# Test for type 'ref|filter'
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 20 Using where
+1 SIMPLE t1 ref|filter b,a b|a 5|5 test.t0.a 1 (2%) Using where; Using rowid filter
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+count(*)
+10
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 20 Using where
+1 SIMPLE t1 ref|filter b,a b|a 5|5 test.t0.a 1 (2%) Using where; Using rowid filter
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+count(*)
+10
+# Test for type 'range|filter'
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range|filter b,a b|a 5|5 NULL 49 (10%) Using where; Using rowid filter
+SELECT count(*) FROM t1 WHERE a<100 and b <100;
+count(*)
+49
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range|filter b,a b|a 5|5 NULL 49 (10%) Using where; Using rowid filter
+SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+count(*)
+49
+SET optimizer_switch=@save_optimizer_switch;
+DROP TABLE t0, t1;
# End of 10.4 tests
+# End of 10.6 tests
+set global innodb_stats_persistent= @stats.save;
diff --git a/mysql-test/main/rowid_filter_innodb.test b/mysql-test/main/rowid_filter_innodb.test
index 6777baf8..b0d65837 100644
--- a/mysql-test/main/rowid_filter_innodb.test
+++ b/mysql-test/main/rowid_filter_innodb.test
@@ -1,6 +1,8 @@
--source include/no_valgrind_without_big.inc
--source include/have_innodb.inc
--source include/have_debug.inc
+--source include/have_sequence.inc
+--source include/innodb_stable_estimates.inc
SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';
@@ -683,6 +685,82 @@ eval EXPLAIN EXTENDED $q;
DROP TABLE t1,t2;
-set global innodb_stats_persistent= @stats.save;
+--echo #
+--echo # MDEV-31154: Fatal InnoDB error or assertion `!is_v' failure upon multi-update with indexed virtual column
+--echo #
+
+--echo # Test with auto generated Primary Key
+--echo #
+
+SET @save_optimizer_switch= @@optimizer_switch;
+SET optimizer_switch='rowid_filter=on';
+
+CREATE TABLE t0(a int);
+INSERT INTO t0 SELECT seq FROM seq_1_to_20;
+ANALYZE TABLE t0 PERSISTENT FOR ALL;
+
+CREATE TABLE t1 (
+ a int,
+ b int as (a * 2) VIRTUAL,
+ f char(200), /* Filler */
+ key (b),
+ key (a)
+) engine=innodb;
+
+INSERT INTO t1 (a, f) SELECT seq, seq FROM seq_1_to_1000;
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+
+--echo # Test for type 'ref|filter'
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+
+--echo # Test for type 'range|filter'
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100;
+SELECT count(*) FROM t1 WHERE a<100 and b <100;
+
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+
+--echo # Test with Primary Key
+--echo #
+
+DROP TABLE t1;
+CREATE TABLE t1 (
+ p int PRIMARY KEY AUTO_INCREMENT,
+ a int,
+ b int as (a * 2) VIRTUAL,
+ f char(200), /* Filler */
+ key (b),
+ key (a)
+) engine=innodb;
+
+INSERT INTO t1 (a, f) SELECT seq, seq FROM seq_1_to_1000;
+ANALYZE TABLE t1 PERSISTENT FOR ALL;
+
+--echo # Test for type 'ref|filter'
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20;
+
+EXPLAIN SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+SELECT count(*) from t0,t1 WHERE t0.a=t1.b AND t1.a<20 FOR UPDATE;
+
+--echo # Test for type 'range|filter'
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100;
+SELECT count(*) FROM t1 WHERE a<100 and b <100;
+
+EXPLAIN SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+SELECT count(*) FROM t1 WHERE a<100 and b <100 FOR UPDATE;
+
+SET optimizer_switch=@save_optimizer_switch;
+
+DROP TABLE t0, t1;
--echo # End of 10.4 tests
+
+--echo # End of 10.6 tests
+
+set global innodb_stats_persistent= @stats.save;
+
diff --git a/mysql-test/main/rpl_mysqldump_slave.result b/mysql-test/main/rpl_mysqldump_slave.result
index 9f93e3c4..8d6f0994 100644
--- a/mysql-test/main/rpl_mysqldump_slave.result
+++ b/mysql-test/main/rpl_mysqldump_slave.result
@@ -7,25 +7,33 @@ connection slave;
connection master;
use test;
connection slave;
+/*!999999\- enable the sandbox mode */
-- SET GLOBAL gtid_slave_pos='';
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+/*!999999\- enable the sandbox mode */
STOP ALL SLAVES;
-- SET GLOBAL gtid_slave_pos='';
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
START ALL SLAVES;
+/*!999999\- enable the sandbox mode */
STOP ALL SLAVES;
-- SET GLOBAL gtid_slave_pos='';
CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
START ALL SLAVES;
start slave;
Warnings:
Note 1254 Slave is already running
+/*!999999\- enable the sandbox mode */
-- SET GLOBAL gtid_slave_pos='';
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
start slave;
Warnings:
Note 1254 Slave is already running
-*** Test mysqldump --dump-slave GTID functionality.
+*** Test mysqldump --dump-slave GTID/non-gtid functionality.
connection master;
SET gtid_seq_no = 1000;
CREATE TABLE t1 (a INT PRIMARY KEY);
@@ -35,36 +43,182 @@ connection slave;
CREATE TABLE t2 (a INT PRIMARY KEY);
DROP TABLE t2;
-1. --dump-slave=1
+1. --dump-slave=1 --gtid
+/*!999999\- enable the sandbox mode */
SET GLOBAL gtid_slave_pos='0-1-1001';
CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos;
-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
-2. --dump-slave=2
+1a. --dump-slave=1
+
+/*!999999\- enable the sandbox mode */
+-- SET GLOBAL gtid_slave_pos='0-1-1001';
+CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+
+2. --dump-slave=2 --gtid
+
+/*!999999\- enable the sandbox mode */
-- SET GLOBAL gtid_slave_pos='0-1-1001';
-- CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos;
-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
-*** Test mysqldump --master-data GTID functionality.
-1. --master-data=1
--- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+2. --dump-slave=2
+
+/*!999999\- enable the sandbox mode */
+-- SET GLOBAL gtid_slave_pos='0-1-1001';
+-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+*** Test mysqldump --master-data GTID/non-gtid functionality.
+
+1. --master-data=1 --gtid
+
+/*!999999\- enable the sandbox mode */
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
SET GLOBAL gtid_slave_pos='0-2-1003';
+-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
-2. --master-data=2
+1a. --master-data=1
--- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+/*!999999\- enable the sandbox mode */
+-- SET GLOBAL gtid_slave_pos='0-2-1003';
+CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+2. --master-data=2 --gtid
+
+/*!999999\- enable the sandbox mode */
-- CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
-- SET GLOBAL gtid_slave_pos='0-2-1003';
+-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
-3. --master-data --single-transaction
+2a. --master-data=2
+/*!999999\- enable the sandbox mode */
+-- SET GLOBAL gtid_slave_pos='0-2-1003';
-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+3. --master-data --single-transaction --gtid
+
+/*!999999\- enable the sandbox mode */
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
SET GLOBAL gtid_slave_pos='0-2-1003';
+-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+3a. --master-data --single-transaction
+
+/*!999999\- enable the sandbox mode */
+-- SET GLOBAL gtid_slave_pos='0-2-1003';
+CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+4. --master-data=2 --dump-slave=2 --single-transaction --gtid (MDEV-4827)
+
+/*!999999\- enable the sandbox mode */
+-- MariaDB dump--
+-- Host: localhost Database: test
+-- ------------------------------------------------------
+-- Server version
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!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 */;
+
+-- Preferably use GTID to start replication from GTID position:
+
+-- CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
+-- SET GLOBAL gtid_slave_pos='0-2-1003';
+
+--
+-- Alternately, following is the position of the binary logging from SHOW MASTER STATUS at point of backup.
+-- Use this when creating a replica of the primary server where the backup was made.
+-- The new server will be connecting to the primary server where the backup was taken.
+--
+
+-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+--
+-- The following is the SQL position of the replication taken from SHOW SLAVE STATUS at the time of backup.
+-- Use this position when creating a clone of, or replacement server, from where the backup was taken.
+-- This new server will connects to the same primary server(s).
+--
+-- GTID position to start replication:
+-- SET GLOBAL gtid_slave_pos='0-1-1001';
+
+-- Use only the MASTER_USE_GTID=slave_pos or MASTER_LOG_FILE/MASTER_LOG_POS in the statements below.
+
+-- CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos;
+-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed
+
+4a. --master-data=2 --dump-slave=2 --single-transaction (MDEV-4827)
+
+/*!999999\- enable the sandbox mode */
+-- MariaDB dump--
+-- Host: localhost Database: test
+-- ------------------------------------------------------
+-- Server version
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!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 */;
+
+-- Preferably use GTID to start replication from GTID position:
+
+-- SET GLOBAL gtid_slave_pos='0-2-1003';
+
+--
+-- Alternately, following is the position of the binary logging from SHOW MASTER STATUS at point of backup.
+-- Use this when creating a replica of the primary server where the backup was made.
+-- The new server will be connecting to the primary server where the backup was taken.
+--
+
+-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+--
+-- The following is the SQL position of the replication taken from SHOW SLAVE STATUS at the time of backup.
+-- Use this position when creating a clone of, or replacement server, from where the backup was taken.
+-- This new server will connects to the same primary server(s).
+--
+-- GTID position to start replication:
+-- SET GLOBAL gtid_slave_pos='0-1-1001';
+-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
+
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed
connection master;
CREATE TABLE t (
id int
@@ -77,8 +231,13 @@ include/stop_slave.inc
change master to master_use_gtid=slave_pos;
connection master;
# Ensuring the binlog dump thread is killed on primary...
--- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000002', MASTER_LOG_POS=BINLOG_START;
+/*!999999\- enable the sandbox mode */
-- SET GLOBAL gtid_slave_pos='0-1-1005';
+-- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000002', MASTER_LOG_POS=BINLOG_START;
connection slave;
include/start_slave.inc
+connection master;
+connection slave;
+connection master;
+FOUND 1 matches in MDEV-33212.sql
include/rpl_end.inc
diff --git a/mysql-test/main/rpl_mysqldump_slave.test b/mysql-test/main/rpl_mysqldump_slave.test
index 0273e196..75bb85db 100644
--- a/mysql-test/main/rpl_mysqldump_slave.test
+++ b/mysql-test/main/rpl_mysqldump_slave.test
@@ -37,7 +37,7 @@ start slave;
start slave;
---echo *** Test mysqldump --dump-slave GTID functionality.
+--echo *** Test mysqldump --dump-slave GTID/non-gtid functionality.
--connection master
SET gtid_seq_no = 1000;
@@ -52,37 +52,80 @@ CREATE TABLE t2 (a INT PRIMARY KEY);
DROP TABLE t2;
--echo
---echo 1. --dump-slave=1
+--echo 1. --dump-slave=1 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=1 --gtid test
--echo
---echo 2. --dump-slave=2
+--echo 1a. --dump-slave=1
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
+--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=1 test
+
+--echo
+--echo 2. --dump-slave=2 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=2 --gtid test
+--echo
+--echo 2. --dump-slave=2
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
+--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=2 test
+
---echo *** Test mysqldump --master-data GTID functionality.
+--echo *** Test mysqldump --master-data GTID/non-gtid functionality.
--echo
---echo 1. --master-data=1
+--echo 1. --master-data=1 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data=1 --gtid test
--echo
---echo 2. --master-data=2
+--echo 1a. --master-data=1
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
+--exec $MYSQL_DUMP_SLAVE --compact --master-data=1 test
+
+--echo
+--echo 2. --master-data=2 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data=2 --gtid test
--echo
---echo 3. --master-data --single-transaction
+--echo 2a. --master-data=2
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
+--exec $MYSQL_DUMP_SLAVE --compact --master-data=2 test
+
+--echo
+--echo 3. --master-data --single-transaction --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data --single-transaction --gtid test
+--echo
+--echo 3a. --master-data --single-transaction
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
+--exec $MYSQL_DUMP_SLAVE --compact --master-data --single-transaction test
+
+--echo
+--echo 4. --master-data=2 --dump-slave=2 --single-transaction --gtid (MDEV-4827)
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/ /MariaDB dump.*/MariaDB dump/ /Dump completed.*/Dump completed/ /Server version.*/Server version/
+--exec $MYSQL_DUMP_SLAVE --master-data=2 --dump-slave=2 --single-transaction --gtid test
+--echo
+
+--echo
+--echo 4a. --master-data=2 --dump-slave=2 --single-transaction (MDEV-4827)
+--echo
+--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/ /MariaDB dump.*/MariaDB dump/ /Dump completed.*/Dump completed/ /Server version.*/Server version/
+--exec $MYSQL_DUMP_SLAVE --master-data=2 --dump-slave=2 --single-transaction test
+--echo
#
# MDEV-32611 Added test for mysqldump --delete-master-logs option.
# This options is alias of
@@ -155,4 +198,20 @@ if ($postdump_first_binary_log_filename != $postdump_binlog_filename)
connection slave;
--source include/start_slave.inc
+# MDEV-33212: mysqldump uses MASTER_LOG_POS with dump-slave
+# The bug was that the MASTER_LOG_POS was wrong. So check that it is correct.
+--connection master
+--let $pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+--sync_slave_with_master
+--connection master
+--exec $MYSQL_DUMP_SLAVE --compact --dump-slave test >$MYSQLTEST_VARDIR/tmp/MDEV-33212.sql
+--let SEARCH_RANGE=500000000
+--let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-33212.sql
+--let SEARCH_PATTERN= MASTER_LOG_POS=$pos
+--let SEARCH_OUTPUT=count
+--source include/search_pattern_in_file.inc
+
+--remove_file $MYSQLTEST_VARDIR/tmp/MDEV-33212.sql
+
+
--source include/rpl_end.inc
diff --git a/mysql-test/main/secondary_key_costs.result b/mysql-test/main/secondary_key_costs.result
index 55c84705..dbdaaa3e 100644
--- a/mysql-test/main/secondary_key_costs.result
+++ b/mysql-test/main/secondary_key_costs.result
@@ -80,3 +80,38 @@ json_detailed(json_extract(@trace, '$**.considered_access_paths'))
]
]
drop table t1, name, flag2;
+select @@optimizer_adjust_secondary_key_costs;
+@@optimizer_adjust_secondary_key_costs
+
+set @@optimizer_adjust_secondary_key_costs=7;
+select @@optimizer_adjust_secondary_key_costs;
+@@optimizer_adjust_secondary_key_costs
+adjust_secondary_key_cost,disable_max_seek,disable_forced_index_in_group_by
+set @@optimizer_adjust_secondary_key_costs=default;
+#
+# MDEV-33306 Optimizer choosing incorrect index in 10.6, 10.5 but not in 10.4
+#
+create table t1 (a int primary key, b int, c int, d int, key(b),key(c)) engine=innodb;
+insert into t1 select seq, mod(seq,10), mod(seq,2), seq from seq_1_to_50000;
+explain select b, sum(d) from t1 where c=0 group by b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index c b 5 NULL # Using where
+select b, sum(d) from t1 where c=0 group by b;
+b sum(d)
+0 125025000
+2 124985000
+4 124995000
+6 125005000
+8 125015000
+set @@optimizer_adjust_secondary_key_costs="disable_forced_index_in_group_by";
+explain select b, sum(d) from t1 where c=0 group by b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL c NULL NULL NULL # Using where; Using temporary; Using filesort
+select b, sum(d) from t1 where c=0 group by b;
+b sum(d)
+0 125025000
+2 124985000
+4 124995000
+6 125005000
+8 125015000
+drop table t1;
diff --git a/mysql-test/main/secondary_key_costs.test b/mysql-test/main/secondary_key_costs.test
index d3db1376..bf662d40 100644
--- a/mysql-test/main/secondary_key_costs.test
+++ b/mysql-test/main/secondary_key_costs.test
@@ -1,5 +1,6 @@
--source include/have_sequence.inc
--source include/not_embedded.inc
+--source include/have_innodb.inc
#
# Show the costs for rowid filter
@@ -51,3 +52,23 @@ select json_detailed(json_extract(@trace, '$**.considered_access_paths'));
--enable_ps_protocol
drop table t1, name, flag2;
+
+select @@optimizer_adjust_secondary_key_costs;
+set @@optimizer_adjust_secondary_key_costs=7;
+select @@optimizer_adjust_secondary_key_costs;
+set @@optimizer_adjust_secondary_key_costs=default;
+
+--echo #
+--echo # MDEV-33306 Optimizer choosing incorrect index in 10.6, 10.5 but not in 10.4
+--echo #
+
+create table t1 (a int primary key, b int, c int, d int, key(b),key(c)) engine=innodb;
+insert into t1 select seq, mod(seq,10), mod(seq,2), seq from seq_1_to_50000;
+--replace_column 9 #
+explain select b, sum(d) from t1 where c=0 group by b;
+select b, sum(d) from t1 where c=0 group by b;
+set @@optimizer_adjust_secondary_key_costs="disable_forced_index_in_group_by";
+--replace_column 9 #
+explain select b, sum(d) from t1 where c=0 group by b;
+select b, sum(d) from t1 where c=0 group by b;
+drop table t1;
diff --git a/mysql-test/main/selectivity_innodb_notembedded.result b/mysql-test/main/selectivity_innodb_notembedded.result
index 8b06fe75..a387d241 100644
--- a/mysql-test/main/selectivity_innodb_notembedded.result
+++ b/mysql-test/main/selectivity_innodb_notembedded.result
@@ -88,15 +88,142 @@ sel
]
set optimizer_trace=@tmp;
drop table t0,t1,t10;
-set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set histogram_size=@save_histogram_size;
-set use_stat_tables= @save_use_stat_tables;
#
# End of 10.4 tests
#
#
+# MDEV-33314: Crash inside calculate_cond_selectivity_for_table() with many columns
+#
+set optimizer_use_condition_selectivity= 4;
+set use_stat_tables= preferably;
+#
+# create table t1 (col0 int, col1 int, col2 int, ...);
+#
+$create_tbl;
+#
+# insert into t1 select seq, ... seq from seq_1_to_10;
+#
+$insert_cmd;
+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
+set @trace_tmp=@@optimizer_trace;
+set optimizer_trace=1;
+#
+# Basic testcase: don't crash for many-column selectivity
+# explain extended select * from t1 where col0>1 and col1>1 and col2>1 and ...
+#
+$query_tbl;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 53.32928848,
+ "attached_condition": "t1.col0 > 1 and t1.col1 > 1 and t1.col2 > 1 and t1.col3 > 1 and t1.col4 > 1 and t1.col5 > 1 and t1.col6 > 1 and t1.col7 > 1 and t1.col8 > 1 and t1.col9 > 1 and t1.col10 > 1 and t1.col11 > 1 and t1.col12 > 1 and t1.col13 > 1 and t1.col14 > 1 and t1.col15 > 1 and t1.col16 > 1 and t1.col17 > 1 and t1.col18 > 1 and t1.col19 > 1 and t1.col20 > 1 and t1.col21 > 1 and t1.col22 > 1 and t1.col23 > 1 and t1.col24 > 1 and t1.col25 > 1 and t1.col26 > 1 and t1.col27 > 1 and t1.col28 > 1 and t1.col29 > 1 and t1.col30 > 1 and t1.col31 > 1 and t1.col32 > 1 and t1.col33 > 1 and t1.col34 > 1 and t1.col35 > 1 and t1.col36 > 1 and t1.col37 > 1 and t1.col38 > 1 and t1.col39 > 1 and t1.col40 > 1 and t1.col41 > 1 and t1.col42 > 1 and t1.col43 > 1 and t1.col44 > 1 and t1.col45 > 1 and t1.col46 > 1 and t1.col47 > 1 and t1.col48 > 1 and t1.col49 > 1 and t1.col50 > 1 and t1.col51 > 1 and t1.col52 > 1 and t1.col53 > 1 and t1.col54 > 1 and t1.col55 > 1 and t1.col56 > 1 and t1.col57 > 1 and t1.col58 > 1 and t1.col59 > 1 and t1.col60 > 1 and t1.col61 > 1 and t1.col62 > 1 and t1.col63 > 1 and t1.col64 > 1 and t1.col65 > 1 and t1.col66 > 1 and t1.col67 > 1 and t1.col68 > 1 and t1.col69 > 1 and t1.col70 > 1 and t1.col71 > 1 and t1.col72 > 1 and t1.col73 > 1 and t1.col74 > 1 and t1.col75 > 1 and t1.col76 > 1 and t1.col77 > 1 and t1.col78 > 1 and t1.col79 > 1 and t1.col80 > 1 and t1.col81 > 1 and t1.col82 > 1 and t1.col83 > 1 and t1.col84 > 1 and t1.col85 > 1 and t1.col86 > 1 and t1.col87 > 1 and t1.col88 > 1 and t1.col89 > 1 and t1.col90 > 1 and t1.col91 > 1 and t1.col92 > 1 and t1.col93 > 1 and t1.col94 > 1 and t1.col95 > 1 and t1.col96 > 1 and t1.col97 > 1 and t1.col98 > 1 and t1.col99 > 1 and t1.col100 > 1 and t1.col101 > 1 and t1.col102 > 1 and t1.col103 > 1 and t1.col104 > 1 and t1.col105 > 1 and t1.col106 > 1 and t1.col107 > 1 and t1.col108 > 1 and t1.col109 > 1 and t1.col110 > 1 and t1.col111 > 1 and t1.col112 > 1 and t1.col113 > 1 and t1.col114 > 1 and t1.col115 > 1 and t1.col116 > 1 and t1.col117 > 1 and t1.col118 > 1 and t1.col119 > 1 and t1.col120 > 1 and t1.col121 > 1 and t1.col122 > 1 and t1.col123 > 1 and t1.col124 > 1 and t1.col125 > 1 and t1.col126 > 1 and t1.col127 > 1 and t1.col128 > 1 and t1.col129 > 1 and t1.col130 > 1 and t1.col131 > 1 and t1.col132 > 1 and t1.col133 > 1 and t1.col134 > 1 and t1.col135 > 1 and t1.col136 > 1 and t1.col137 > 1 and t1.col138 > 1 and t1.col139 > 1 and t1.col140 > 1 and t1.col141 > 1 and t1.col142 > 1 and t1.col143 > 1 and t1.col144 > 1 and t1.col145 > 1 and t1.col146 > 1 and t1.col147 > 1 and t1.col148 > 1 and t1.col149 > 1 and t1.col150 > 1 and t1.col151 > 1 and t1.col152 > 1 and t1.col153 > 1 and t1.col154 > 1 and t1.col155 > 1 and t1.col156 > 1 and t1.col157 > 1 and t1.col158 > 1 and t1.col159 > 1"
+ }
+ }
+ ]
+ }
+}
+select
+json_detailed(json_extract(trace,'$**.selectivity_for_columns[0]')) as JS
+from
+information_schema.optimizer_trace;
+JS
+[
+ {
+ "column_name": "col0",
+ "ranges":
+ ["1 < col0"],
+ "selectivity_from_histogram": 0.996078431
+ }
+]
+$query_tbl;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 53.32928848,
+ "attached_condition": "t1.col0 > 1 and t1.col1 > 1 and t1.col2 > 1 and t1.col3 > 1 and t1.col4 > 1 and t1.col5 > 1 and t1.col6 > 1 and t1.col7 > 1 and t1.col8 > 1 and t1.col9 > 1 and t1.col10 > 1 and t1.col11 > 1 and t1.col12 > 1 and t1.col13 > 1 and t1.col14 > 1 and t1.col15 > 1 and t1.col16 > 1 and t1.col17 > 1 and t1.col18 > 1 and t1.col19 > 1 and t1.col20 > 1 and t1.col21 > 1 and t1.col22 > 1 and t1.col23 > 1 and t1.col24 > 1 and t1.col25 > 1 and t1.col26 > 1 and t1.col27 > 1 and t1.col28 > 1 and t1.col29 > 1 and t1.col30 > 1 and t1.col31 > 1 and t1.col32 > 1 and t1.col33 > 1 and t1.col34 > 1 and t1.col35 > 1 and t1.col36 > 1 and t1.col37 > 1 and t1.col38 > 1 and t1.col39 > 1 and t1.col40 > 1 and t1.col41 > 1 and t1.col42 > 1 and t1.col43 > 1 and t1.col44 > 1 and t1.col45 > 1 and t1.col46 > 1 and t1.col47 > 1 and t1.col48 > 1 and t1.col49 > 1 and t1.col50 > 1 and t1.col51 > 1 and t1.col52 > 1 and t1.col53 > 1 and t1.col54 > 1 and t1.col55 > 1 and t1.col56 > 1 and t1.col57 > 1 and t1.col58 > 1 and t1.col59 > 1 and t1.col60 > 1 and t1.col61 > 1 and t1.col62 > 1 and t1.col63 > 1 and t1.col64 > 1 and t1.col65 > 1 and t1.col66 > 1 and t1.col67 > 1 and t1.col68 > 1 and t1.col69 > 1 and t1.col70 > 1 and t1.col71 > 1 and t1.col72 > 1 and t1.col73 > 1 and t1.col74 > 1 and t1.col75 > 1 and t1.col76 > 1 and t1.col77 > 1 and t1.col78 > 1 and t1.col79 > 1 and t1.col80 > 1 and t1.col81 > 1 and t1.col82 > 1 and t1.col83 > 1 and t1.col84 > 1 and t1.col85 > 1 and t1.col86 > 1 and t1.col87 > 1 and t1.col88 > 1 and t1.col89 > 1 and t1.col90 > 1 and t1.col91 > 1 and t1.col92 > 1 and t1.col93 > 1 and t1.col94 > 1 and t1.col95 > 1 and t1.col96 > 1 and t1.col97 > 1 and t1.col98 > 1 and t1.col99 > 1 and t1.col100 > 1 and t1.col101 > 1 and t1.col102 > 1 and t1.col103 > 1 and t1.col104 > 1 and t1.col105 > 1 and t1.col106 > 1 and t1.col107 > 1 and t1.col108 > 1 and t1.col109 > 1 and t1.col110 > 1 and t1.col111 > 1 and t1.col112 > 1 and t1.col113 > 1 and t1.col114 > 1 and t1.col115 > 1 and t1.col116 > 1 and t1.col117 > 1 and t1.col118 > 1 and t1.col119 > 1 and t1.col120 > 1 and t1.col121 > 1 and t1.col122 > 1 and t1.col123 > 1 and t1.col124 > 1 and t1.col125 > 1 and t1.col126 > 1 and t1.col127 > 1 and t1.col128 > 1 and t1.col129 > 1 and t1.col130 > 1 and t1.col131 > 1 and t1.col132 > 1 and t1.col133 > 1 and t1.col134 > 1 and t1.col135 > 1 and t1.col136 > 1 and t1.col137 > 1 and t1.col138 > 1 and t1.col139 > 1 and t1.col140 > 1 and t1.col141 > 1 and t1.col142 > 1 and t1.col143 > 1 and t1.col144 > 1 and t1.col145 > 1 and t1.col146 > 1 and t1.col147 > 1 and t1.col148 > 1 and t1.col149 > 1 and t1.col150 > 1 and t1.col151 > 1 and t1.col152 > 1 and t1.col153 > 1 and t1.col154 > 1 and t1.col155 > 1 and t1.col156 > 1 and t1.col157 > 1 and t1.col158 > 1 and t1.col159 > 1"
+ }
+ }
+ ]
+ }
+}
+select
+json_detailed(json_extract(trace,'$**.selectivity_for_columns[159]')) as JS
+from
+information_schema.optimizer_trace;
+JS
+[
+ {
+ "column_name": "col159",
+ "ranges":
+ ["1 < col159"],
+ "selectivity_from_histogram": 0.996078431
+ }
+]
+#
+# Check if not being able to infer anything for the first MAX_KEY
+# columns doesn't prevent further inferences.
+#
+# explain extended select * from t1
+# where (1>2 or col0>1 or col1>1 or ...) and col99>1
+#
+$query_tbl;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 99.60784149,
+ "attached_condition": "(t1.col1 > 1 or t1.col2 > 1 or t1.col3 > 1 or t1.col4 > 1 or t1.col5 > 1 or t1.col6 > 1 or t1.col7 > 1 or t1.col8 > 1 or t1.col9 > 1 or t1.col10 > 1 or t1.col11 > 1 or t1.col12 > 1 or t1.col13 > 1 or t1.col14 > 1 or t1.col15 > 1 or t1.col16 > 1 or t1.col17 > 1 or t1.col18 > 1 or t1.col19 > 1 or t1.col20 > 1 or t1.col21 > 1 or t1.col22 > 1 or t1.col23 > 1 or t1.col24 > 1 or t1.col25 > 1 or t1.col26 > 1 or t1.col27 > 1 or t1.col28 > 1 or t1.col29 > 1 or t1.col30 > 1 or t1.col31 > 1 or t1.col32 > 1 or t1.col33 > 1 or t1.col34 > 1 or t1.col35 > 1 or t1.col36 > 1 or t1.col37 > 1 or t1.col38 > 1 or t1.col39 > 1 or t1.col40 > 1 or t1.col41 > 1 or t1.col42 > 1 or t1.col43 > 1 or t1.col44 > 1 or t1.col45 > 1 or t1.col46 > 1 or t1.col47 > 1 or t1.col48 > 1 or t1.col49 > 1 or t1.col50 > 1 or t1.col51 > 1 or t1.col52 > 1 or t1.col53 > 1 or t1.col54 > 1 or t1.col55 > 1 or t1.col56 > 1 or t1.col57 > 1 or t1.col58 > 1 or t1.col59 > 1 or t1.col60 > 1 or t1.col61 > 1 or t1.col62 > 1 or t1.col63 > 1 or t1.col64 > 1 or t1.col65 > 1 or t1.col66 > 1 or t1.col67 > 1 or t1.col68 > 1 or t1.col69 > 1 or t1.col70 > 1 or t1.col71 > 1 or t1.col72 > 1 or t1.col73 > 1 or t1.col74 > 1 or t1.col75 > 1 or t1.col76 > 1 or t1.col77 > 1 or t1.col78 > 1 or t1.col79 > 1 or t1.col80 > 1 or t1.col81 > 1 or t1.col82 > 1 or t1.col83 > 1 or t1.col84 > 1 or t1.col85 > 1 or t1.col86 > 1 or t1.col87 > 1 or t1.col88 > 1 or t1.col89 > 1 or t1.col90 > 1 or t1.col91 > 1 or t1.col92 > 1 or t1.col93 > 1 or t1.col94 > 1 or t1.col95 > 1 or t1.col96 > 1 or t1.col97 > 1 or t1.col98 > 1 or t1.col99 > 1 or t1.col100 > 1 or t1.col101 > 1 or t1.col102 > 1 or t1.col103 > 1 or t1.col104 > 1 or t1.col105 > 1 or t1.col106 > 1 or t1.col107 > 1 or t1.col108 > 1 or t1.col109 > 1 or t1.col110 > 1 or t1.col111 > 1 or t1.col112 > 1 or t1.col113 > 1 or t1.col114 > 1 or t1.col115 > 1 or t1.col116 > 1 or t1.col117 > 1 or t1.col118 > 1 or t1.col119 > 1 or t1.col120 > 1 or t1.col121 > 1 or t1.col122 > 1 or t1.col123 > 1 or t1.col124 > 1 or t1.col125 > 1 or t1.col126 > 1 or t1.col127 > 1 or t1.col128 > 1 or t1.col129 > 1 or t1.col130 > 1 or t1.col131 > 1 or t1.col132 > 1 or t1.col133 > 1 or t1.col134 > 1 or t1.col135 > 1 or t1.col136 > 1 or t1.col137 > 1 or t1.col138 > 1 or t1.col139 > 1 or t1.col140 > 1 or t1.col141 > 1 or t1.col142 > 1 or t1.col143 > 1 or t1.col144 > 1 or t1.col145 > 1 or t1.col146 > 1 or t1.col147 > 1 or t1.col148 > 1 or t1.col149 > 1 or t1.col150 > 1 or t1.col151 > 1 or t1.col152 > 1 or t1.col153 > 1 or t1.col154 > 1 or t1.col155 > 1 or t1.col156 > 1 or t1.col157 > 1 or t1.col158 > 1) and t1.col159 > 1"
+ }
+ }
+ ]
+ }
+}
+select
+json_detailed(json_extract(trace,'$**.selectivity_for_columns')) as JS
+from
+information_schema.optimizer_trace;
+JS
+[
+ [
+ {
+ "column_name": "col159",
+ "ranges":
+ ["1 < col159"],
+ "selectivity_from_histogram": 0.996078431
+ }
+ ]
+]
+set optimizer_trace=@trace_tmp;
+drop table t1;
+#
# Clean up
#
+set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set use_stat_tables= @save_use_stat_tables;
set @@global.histogram_size=@save_histogram_size;
set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/main/selectivity_notembedded.result b/mysql-test/main/selectivity_notembedded.result
index d2e90a19..ac8922a2 100644
--- a/mysql-test/main/selectivity_notembedded.result
+++ b/mysql-test/main/selectivity_notembedded.result
@@ -83,13 +83,140 @@ sel
]
set optimizer_trace=@tmp;
drop table t0,t1,t10;
-set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set histogram_size=@save_histogram_size;
-set use_stat_tables= @save_use_stat_tables;
#
# End of 10.4 tests
#
#
+# MDEV-33314: Crash inside calculate_cond_selectivity_for_table() with many columns
+#
+set optimizer_use_condition_selectivity= 4;
+set use_stat_tables= preferably;
+#
+# create table t1 (col0 int, col1 int, col2 int, ...);
+#
+$create_tbl;
+#
+# insert into t1 select seq, ... seq from seq_1_to_10;
+#
+$insert_cmd;
+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
+set @trace_tmp=@@optimizer_trace;
+set optimizer_trace=1;
+#
+# Basic testcase: don't crash for many-column selectivity
+# explain extended select * from t1 where col0>1 and col1>1 and col2>1 and ...
+#
+$query_tbl;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 53.32928848,
+ "attached_condition": "t1.col0 > 1 and t1.col1 > 1 and t1.col2 > 1 and t1.col3 > 1 and t1.col4 > 1 and t1.col5 > 1 and t1.col6 > 1 and t1.col7 > 1 and t1.col8 > 1 and t1.col9 > 1 and t1.col10 > 1 and t1.col11 > 1 and t1.col12 > 1 and t1.col13 > 1 and t1.col14 > 1 and t1.col15 > 1 and t1.col16 > 1 and t1.col17 > 1 and t1.col18 > 1 and t1.col19 > 1 and t1.col20 > 1 and t1.col21 > 1 and t1.col22 > 1 and t1.col23 > 1 and t1.col24 > 1 and t1.col25 > 1 and t1.col26 > 1 and t1.col27 > 1 and t1.col28 > 1 and t1.col29 > 1 and t1.col30 > 1 and t1.col31 > 1 and t1.col32 > 1 and t1.col33 > 1 and t1.col34 > 1 and t1.col35 > 1 and t1.col36 > 1 and t1.col37 > 1 and t1.col38 > 1 and t1.col39 > 1 and t1.col40 > 1 and t1.col41 > 1 and t1.col42 > 1 and t1.col43 > 1 and t1.col44 > 1 and t1.col45 > 1 and t1.col46 > 1 and t1.col47 > 1 and t1.col48 > 1 and t1.col49 > 1 and t1.col50 > 1 and t1.col51 > 1 and t1.col52 > 1 and t1.col53 > 1 and t1.col54 > 1 and t1.col55 > 1 and t1.col56 > 1 and t1.col57 > 1 and t1.col58 > 1 and t1.col59 > 1 and t1.col60 > 1 and t1.col61 > 1 and t1.col62 > 1 and t1.col63 > 1 and t1.col64 > 1 and t1.col65 > 1 and t1.col66 > 1 and t1.col67 > 1 and t1.col68 > 1 and t1.col69 > 1 and t1.col70 > 1 and t1.col71 > 1 and t1.col72 > 1 and t1.col73 > 1 and t1.col74 > 1 and t1.col75 > 1 and t1.col76 > 1 and t1.col77 > 1 and t1.col78 > 1 and t1.col79 > 1 and t1.col80 > 1 and t1.col81 > 1 and t1.col82 > 1 and t1.col83 > 1 and t1.col84 > 1 and t1.col85 > 1 and t1.col86 > 1 and t1.col87 > 1 and t1.col88 > 1 and t1.col89 > 1 and t1.col90 > 1 and t1.col91 > 1 and t1.col92 > 1 and t1.col93 > 1 and t1.col94 > 1 and t1.col95 > 1 and t1.col96 > 1 and t1.col97 > 1 and t1.col98 > 1 and t1.col99 > 1 and t1.col100 > 1 and t1.col101 > 1 and t1.col102 > 1 and t1.col103 > 1 and t1.col104 > 1 and t1.col105 > 1 and t1.col106 > 1 and t1.col107 > 1 and t1.col108 > 1 and t1.col109 > 1 and t1.col110 > 1 and t1.col111 > 1 and t1.col112 > 1 and t1.col113 > 1 and t1.col114 > 1 and t1.col115 > 1 and t1.col116 > 1 and t1.col117 > 1 and t1.col118 > 1 and t1.col119 > 1 and t1.col120 > 1 and t1.col121 > 1 and t1.col122 > 1 and t1.col123 > 1 and t1.col124 > 1 and t1.col125 > 1 and t1.col126 > 1 and t1.col127 > 1 and t1.col128 > 1 and t1.col129 > 1 and t1.col130 > 1 and t1.col131 > 1 and t1.col132 > 1 and t1.col133 > 1 and t1.col134 > 1 and t1.col135 > 1 and t1.col136 > 1 and t1.col137 > 1 and t1.col138 > 1 and t1.col139 > 1 and t1.col140 > 1 and t1.col141 > 1 and t1.col142 > 1 and t1.col143 > 1 and t1.col144 > 1 and t1.col145 > 1 and t1.col146 > 1 and t1.col147 > 1 and t1.col148 > 1 and t1.col149 > 1 and t1.col150 > 1 and t1.col151 > 1 and t1.col152 > 1 and t1.col153 > 1 and t1.col154 > 1 and t1.col155 > 1 and t1.col156 > 1 and t1.col157 > 1 and t1.col158 > 1 and t1.col159 > 1"
+ }
+ }
+ ]
+ }
+}
+select
+json_detailed(json_extract(trace,'$**.selectivity_for_columns[0]')) as JS
+from
+information_schema.optimizer_trace;
+JS
+[
+ {
+ "column_name": "col0",
+ "ranges":
+ ["1 < col0"],
+ "selectivity_from_histogram": 0.996078431
+ }
+]
+$query_tbl;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 53.32928848,
+ "attached_condition": "t1.col0 > 1 and t1.col1 > 1 and t1.col2 > 1 and t1.col3 > 1 and t1.col4 > 1 and t1.col5 > 1 and t1.col6 > 1 and t1.col7 > 1 and t1.col8 > 1 and t1.col9 > 1 and t1.col10 > 1 and t1.col11 > 1 and t1.col12 > 1 and t1.col13 > 1 and t1.col14 > 1 and t1.col15 > 1 and t1.col16 > 1 and t1.col17 > 1 and t1.col18 > 1 and t1.col19 > 1 and t1.col20 > 1 and t1.col21 > 1 and t1.col22 > 1 and t1.col23 > 1 and t1.col24 > 1 and t1.col25 > 1 and t1.col26 > 1 and t1.col27 > 1 and t1.col28 > 1 and t1.col29 > 1 and t1.col30 > 1 and t1.col31 > 1 and t1.col32 > 1 and t1.col33 > 1 and t1.col34 > 1 and t1.col35 > 1 and t1.col36 > 1 and t1.col37 > 1 and t1.col38 > 1 and t1.col39 > 1 and t1.col40 > 1 and t1.col41 > 1 and t1.col42 > 1 and t1.col43 > 1 and t1.col44 > 1 and t1.col45 > 1 and t1.col46 > 1 and t1.col47 > 1 and t1.col48 > 1 and t1.col49 > 1 and t1.col50 > 1 and t1.col51 > 1 and t1.col52 > 1 and t1.col53 > 1 and t1.col54 > 1 and t1.col55 > 1 and t1.col56 > 1 and t1.col57 > 1 and t1.col58 > 1 and t1.col59 > 1 and t1.col60 > 1 and t1.col61 > 1 and t1.col62 > 1 and t1.col63 > 1 and t1.col64 > 1 and t1.col65 > 1 and t1.col66 > 1 and t1.col67 > 1 and t1.col68 > 1 and t1.col69 > 1 and t1.col70 > 1 and t1.col71 > 1 and t1.col72 > 1 and t1.col73 > 1 and t1.col74 > 1 and t1.col75 > 1 and t1.col76 > 1 and t1.col77 > 1 and t1.col78 > 1 and t1.col79 > 1 and t1.col80 > 1 and t1.col81 > 1 and t1.col82 > 1 and t1.col83 > 1 and t1.col84 > 1 and t1.col85 > 1 and t1.col86 > 1 and t1.col87 > 1 and t1.col88 > 1 and t1.col89 > 1 and t1.col90 > 1 and t1.col91 > 1 and t1.col92 > 1 and t1.col93 > 1 and t1.col94 > 1 and t1.col95 > 1 and t1.col96 > 1 and t1.col97 > 1 and t1.col98 > 1 and t1.col99 > 1 and t1.col100 > 1 and t1.col101 > 1 and t1.col102 > 1 and t1.col103 > 1 and t1.col104 > 1 and t1.col105 > 1 and t1.col106 > 1 and t1.col107 > 1 and t1.col108 > 1 and t1.col109 > 1 and t1.col110 > 1 and t1.col111 > 1 and t1.col112 > 1 and t1.col113 > 1 and t1.col114 > 1 and t1.col115 > 1 and t1.col116 > 1 and t1.col117 > 1 and t1.col118 > 1 and t1.col119 > 1 and t1.col120 > 1 and t1.col121 > 1 and t1.col122 > 1 and t1.col123 > 1 and t1.col124 > 1 and t1.col125 > 1 and t1.col126 > 1 and t1.col127 > 1 and t1.col128 > 1 and t1.col129 > 1 and t1.col130 > 1 and t1.col131 > 1 and t1.col132 > 1 and t1.col133 > 1 and t1.col134 > 1 and t1.col135 > 1 and t1.col136 > 1 and t1.col137 > 1 and t1.col138 > 1 and t1.col139 > 1 and t1.col140 > 1 and t1.col141 > 1 and t1.col142 > 1 and t1.col143 > 1 and t1.col144 > 1 and t1.col145 > 1 and t1.col146 > 1 and t1.col147 > 1 and t1.col148 > 1 and t1.col149 > 1 and t1.col150 > 1 and t1.col151 > 1 and t1.col152 > 1 and t1.col153 > 1 and t1.col154 > 1 and t1.col155 > 1 and t1.col156 > 1 and t1.col157 > 1 and t1.col158 > 1 and t1.col159 > 1"
+ }
+ }
+ ]
+ }
+}
+select
+json_detailed(json_extract(trace,'$**.selectivity_for_columns[159]')) as JS
+from
+information_schema.optimizer_trace;
+JS
+[
+ {
+ "column_name": "col159",
+ "ranges":
+ ["1 < col159"],
+ "selectivity_from_histogram": 0.996078431
+ }
+]
+#
+# Check if not being able to infer anything for the first MAX_KEY
+# columns doesn't prevent further inferences.
+#
+# explain extended select * from t1
+# where (1>2 or col0>1 or col1>1 or ...) and col99>1
+#
+$query_tbl;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "nested_loop": [
+ {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 100,
+ "filtered": 99.60784149,
+ "attached_condition": "(t1.col1 > 1 or t1.col2 > 1 or t1.col3 > 1 or t1.col4 > 1 or t1.col5 > 1 or t1.col6 > 1 or t1.col7 > 1 or t1.col8 > 1 or t1.col9 > 1 or t1.col10 > 1 or t1.col11 > 1 or t1.col12 > 1 or t1.col13 > 1 or t1.col14 > 1 or t1.col15 > 1 or t1.col16 > 1 or t1.col17 > 1 or t1.col18 > 1 or t1.col19 > 1 or t1.col20 > 1 or t1.col21 > 1 or t1.col22 > 1 or t1.col23 > 1 or t1.col24 > 1 or t1.col25 > 1 or t1.col26 > 1 or t1.col27 > 1 or t1.col28 > 1 or t1.col29 > 1 or t1.col30 > 1 or t1.col31 > 1 or t1.col32 > 1 or t1.col33 > 1 or t1.col34 > 1 or t1.col35 > 1 or t1.col36 > 1 or t1.col37 > 1 or t1.col38 > 1 or t1.col39 > 1 or t1.col40 > 1 or t1.col41 > 1 or t1.col42 > 1 or t1.col43 > 1 or t1.col44 > 1 or t1.col45 > 1 or t1.col46 > 1 or t1.col47 > 1 or t1.col48 > 1 or t1.col49 > 1 or t1.col50 > 1 or t1.col51 > 1 or t1.col52 > 1 or t1.col53 > 1 or t1.col54 > 1 or t1.col55 > 1 or t1.col56 > 1 or t1.col57 > 1 or t1.col58 > 1 or t1.col59 > 1 or t1.col60 > 1 or t1.col61 > 1 or t1.col62 > 1 or t1.col63 > 1 or t1.col64 > 1 or t1.col65 > 1 or t1.col66 > 1 or t1.col67 > 1 or t1.col68 > 1 or t1.col69 > 1 or t1.col70 > 1 or t1.col71 > 1 or t1.col72 > 1 or t1.col73 > 1 or t1.col74 > 1 or t1.col75 > 1 or t1.col76 > 1 or t1.col77 > 1 or t1.col78 > 1 or t1.col79 > 1 or t1.col80 > 1 or t1.col81 > 1 or t1.col82 > 1 or t1.col83 > 1 or t1.col84 > 1 or t1.col85 > 1 or t1.col86 > 1 or t1.col87 > 1 or t1.col88 > 1 or t1.col89 > 1 or t1.col90 > 1 or t1.col91 > 1 or t1.col92 > 1 or t1.col93 > 1 or t1.col94 > 1 or t1.col95 > 1 or t1.col96 > 1 or t1.col97 > 1 or t1.col98 > 1 or t1.col99 > 1 or t1.col100 > 1 or t1.col101 > 1 or t1.col102 > 1 or t1.col103 > 1 or t1.col104 > 1 or t1.col105 > 1 or t1.col106 > 1 or t1.col107 > 1 or t1.col108 > 1 or t1.col109 > 1 or t1.col110 > 1 or t1.col111 > 1 or t1.col112 > 1 or t1.col113 > 1 or t1.col114 > 1 or t1.col115 > 1 or t1.col116 > 1 or t1.col117 > 1 or t1.col118 > 1 or t1.col119 > 1 or t1.col120 > 1 or t1.col121 > 1 or t1.col122 > 1 or t1.col123 > 1 or t1.col124 > 1 or t1.col125 > 1 or t1.col126 > 1 or t1.col127 > 1 or t1.col128 > 1 or t1.col129 > 1 or t1.col130 > 1 or t1.col131 > 1 or t1.col132 > 1 or t1.col133 > 1 or t1.col134 > 1 or t1.col135 > 1 or t1.col136 > 1 or t1.col137 > 1 or t1.col138 > 1 or t1.col139 > 1 or t1.col140 > 1 or t1.col141 > 1 or t1.col142 > 1 or t1.col143 > 1 or t1.col144 > 1 or t1.col145 > 1 or t1.col146 > 1 or t1.col147 > 1 or t1.col148 > 1 or t1.col149 > 1 or t1.col150 > 1 or t1.col151 > 1 or t1.col152 > 1 or t1.col153 > 1 or t1.col154 > 1 or t1.col155 > 1 or t1.col156 > 1 or t1.col157 > 1 or t1.col158 > 1) and t1.col159 > 1"
+ }
+ }
+ ]
+ }
+}
+select
+json_detailed(json_extract(trace,'$**.selectivity_for_columns')) as JS
+from
+information_schema.optimizer_trace;
+JS
+[
+ [
+ {
+ "column_name": "col159",
+ "ranges":
+ ["1 < col159"],
+ "selectivity_from_histogram": 0.996078431
+ }
+ ]
+]
+set optimizer_trace=@trace_tmp;
+drop table t1;
+#
# Clean up
#
+set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set use_stat_tables= @save_use_stat_tables;
set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/selectivity_notembedded.test b/mysql-test/main/selectivity_notembedded.test
index 6752bd3c..30e0b7f0 100644
--- a/mysql-test/main/selectivity_notembedded.test
+++ b/mysql-test/main/selectivity_notembedded.test
@@ -105,17 +105,113 @@ from information_schema.optimizer_trace;
set optimizer_trace=@tmp;
drop table t0,t1,t10;
-set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set histogram_size=@save_histogram_size;
-set use_stat_tables= @save_use_stat_tables;
-
--echo #
--echo # End of 10.4 tests
--echo #
--echo #
+--echo # MDEV-33314: Crash inside calculate_cond_selectivity_for_table() with many columns
+--echo #
+set optimizer_use_condition_selectivity= 4;
+set use_stat_tables= preferably;
+
+let $N_CONDS=160;
+let $N_LAST_COND=159;
+--echo #
+--echo # create table t1 (col0 int, col1 int, col2 int, ...);
+--echo #
+let $create_tbl= create table t1 ( col0 int;
+let $i=1;
+
+while ($i < $N_CONDS) {
+ let $create_tbl= $create_tbl, col$i int;
+ let $i=`select $i + 1`;
+}
+
+let $create_tbl= $create_tbl );
+#echo $create_tbl;
+evalp $create_tbl;
+
+
+--echo #
+--echo # insert into t1 select seq, ... seq from seq_1_to_10;
+--echo #
+let $insert_cmd= insert into t1 select seq;
+let $i=1;
+
+while ($i < $N_CONDS) {
+ let $insert_cmd = $insert_cmd ,seq;
+ let $i=`select $i + 1`;
+}
+let $insert_cmd= $insert_cmd from seq_1_to_100;
+
+# echo $insert_cmd;
+evalp $insert_cmd;
+
+analyze table t1 persistent for all;
+set @trace_tmp=@@optimizer_trace;
+set optimizer_trace=1;
+
+--echo #
+--echo # Basic testcase: don't crash for many-column selectivity
+--echo # explain extended select * from t1 where col0>1 and col1>1 and col2>1 and ...
+--echo #
+let $query_tbl= explain format=json select * from t1 where col0>1;
+
+let $i=1;
+while ($i < $N_CONDS) {
+ let $query_tbl= $query_tbl and col$i>1;
+ let $i=`select $i + 1`;
+}
+
+#echo $query_tbl;
+evalp $query_tbl;
+
+select
+ json_detailed(json_extract(trace,'$**.selectivity_for_columns[0]')) as JS
+from
+ information_schema.optimizer_trace;
+
+evalp $query_tbl;
+eval select
+ json_detailed(json_extract(trace,'\$**.selectivity_for_columns[$N_LAST_COND]')) as JS
+from
+ information_schema.optimizer_trace;
+
+
+--echo #
+--echo # Check if not being able to infer anything for the first MAX_KEY
+--echo # columns doesn't prevent further inferences.
+--echo #
+--echo # explain extended select * from t1
+--echo # where (1>2 or col0>1 or col1>1 or ...) and col99>1
+--echo #
+let $query_tbl= explain format=json select * from t1 where (1>2 ;
+
+let $i=1;
+while ($i < $N_LAST_COND) {
+ let $query_tbl= $query_tbl or col$i>1;
+ let $i=`select $i + 1`;
+}
+let $query_tbl= $query_tbl) and col$N_LAST_COND>1;
+
+#echo $query_tbl;
+evalp $query_tbl;
+
+select
+ json_detailed(json_extract(trace,'$**.selectivity_for_columns')) as JS
+from
+ information_schema.optimizer_trace;
+
+set optimizer_trace=@trace_tmp;
+drop table t1;
+
+--echo #
--echo # Clean up
--echo #
--source include/restore_charset.inc
+set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
+set use_stat_tables= @save_use_stat_tables;
set @@global.histogram_size=@save_histogram_size;
diff --git a/mysql-test/main/show_analyze.result b/mysql-test/main/show_analyze.result
index 77cfbc58..cc427b45 100644
--- a/mysql-test/main/show_analyze.result
+++ b/mysql-test/main/show_analyze.result
@@ -207,9 +207,12 @@ id select_type table type possible_keys key key_len ref rows r_rows filtered r_f
SET debug_dbug=@old_debug;
# Try to do SHOW ANALYZE for a query that runs a SET command:
#
-set @show_explain_probe_select_id=2;
+create table t2 (a int);
+insert into t2 values (1),(2);
+set @show_explain_probe_select_id=3;
SET debug_dbug='+d,show_explain_probe_join_exec_start';
-set @foo= (select max(a) from t0 where sin(a) >0);
+set @foo= (select max(a) from t2
+where a + (select max(a) from t0 where t0.a>t2.a) < 10000);
connection default;
show analyze for $thr2;
ERROR HY000: Target is not executing an operation with a query plan
@@ -217,6 +220,7 @@ kill query $thr2;
connection con1;
ERROR 70100: Query execution was interrupted
SET debug_dbug=@old_debug;
+drop table t2;
#
# Attempt SHOW ANALYZE for an UPDATE
#
diff --git a/mysql-test/main/show_analyze.test b/mysql-test/main/show_analyze.test
index 58d36d7d..c55aacda 100644
--- a/mysql-test/main/show_analyze.test
+++ b/mysql-test/main/show_analyze.test
@@ -213,9 +213,15 @@ SET debug_dbug=@old_debug;
--echo # Try to do SHOW ANALYZE for a query that runs a SET command:
--echo #
-set @show_explain_probe_select_id=2; # <---
+create table t2 (a int);
+insert into t2 values (1),(2);
+set @show_explain_probe_select_id=3; # Stop in the subquery.
SET debug_dbug='+d,show_explain_probe_join_exec_start';
-send set @foo= (select max(a) from t0 where sin(a) >0);
+# t2 has 2 rows so we will stop in the subquery twice:
+# - first one to serve the SHOW ANALYZE request
+# - second one when waiting to be KILLed.
+send set @foo= (select max(a) from t2
+ where a + (select max(a) from t0 where t0.a>t2.a) < 10000);
connection default;
--source include/wait_condition.inc
--error ER_TARGET_NOT_EXPLAINABLE
@@ -225,7 +231,7 @@ connection con1;
--error ER_QUERY_INTERRUPTED
reap;
SET debug_dbug=@old_debug;
-
+drop table t2;
--echo #
--echo # Attempt SHOW ANALYZE for an UPDATE
diff --git a/mysql-test/main/show_explain_json.result b/mysql-test/main/show_explain_json.result
index a5c441af..1a816597 100644
--- a/mysql-test/main/show_explain_json.result
+++ b/mysql-test/main/show_explain_json.result
@@ -518,9 +518,12 @@ SET debug_dbug=@old_debug;
# Try to do SHOW EXPLAIN for a query that runs a SET command:
# I've found experimentally that select_id==2 here...
#
-set @show_explain_probe_select_id=2;
+create table t2 (a int);
+insert into t2 values (1),(2);
+set @show_explain_probe_select_id=3;
SET debug_dbug='+d,show_explain_probe_join_exec_start';
-set @foo= (select max(a) from t0 where sin(a) >0);
+set @foo= (select max(a) from t2
+where a + (select max(a) from t0 where t0.a>t2.a) < 10000);
connection default;
show explain format=JSON for $thr2;
ERROR HY000: Target is not executing an operation with a query plan
@@ -528,6 +531,7 @@ kill query $thr2;
connection con1;
ERROR 70100: Query execution was interrupted
SET debug_dbug=@old_debug;
+drop table t2;
#
# Attempt SHOW EXPLAIN for an UPDATE
#
diff --git a/mysql-test/main/show_explain_json.test b/mysql-test/main/show_explain_json.test
index 8d2a6aa8..2426e095 100644
--- a/mysql-test/main/show_explain_json.test
+++ b/mysql-test/main/show_explain_json.test
@@ -271,9 +271,16 @@ SET debug_dbug=@old_debug;
--echo # Try to do SHOW EXPLAIN for a query that runs a SET command:
--echo # I've found experimentally that select_id==2 here...
--echo #
-set @show_explain_probe_select_id=2;
+
+create table t2 (a int);
+insert into t2 values (1),(2);
+set @show_explain_probe_select_id=3; # Stop in the subquery.
SET debug_dbug='+d,show_explain_probe_join_exec_start';
-send set @foo= (select max(a) from t0 where sin(a) >0);
+# t2 has 2 rows so we will stop in the subquery twice:
+# - first one to serve the SHOW ANALYZE request
+# - second one when waiting to be KILLed.
+send set @foo= (select max(a) from t2
+ where a + (select max(a) from t0 where t0.a>t2.a) < 10000);
connection default;
--source include/wait_condition.inc
--error ER_TARGET_NOT_EXPLAINABLE
@@ -283,6 +290,7 @@ connection con1;
--error ER_QUERY_INTERRUPTED
reap;
SET debug_dbug=@old_debug;
+drop table t2;
--echo #
--echo # Attempt SHOW EXPLAIN for an UPDATE
diff --git a/mysql-test/main/shutdown.test b/mysql-test/main/shutdown.test
index 71f2156a..b26a6d4b 100644
--- a/mysql-test/main/shutdown.test
+++ b/mysql-test/main/shutdown.test
@@ -20,13 +20,13 @@ drop procedure try_shutdown;
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
--send shutdown
--connection default
--source include/wait_until_disconnected.inc
---exec echo "restart" > $_expect_file_name
+--write_line restart $_expect_file_name
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/main/skip_grants.test b/mysql-test/main/skip_grants.test
index b74cd41b..5af697f6 100644
--- a/mysql-test/main/skip_grants.test
+++ b/mysql-test/main/skip_grants.test
@@ -176,12 +176,12 @@ drop user baz@baz;
SELECT @@skip_grant_tables AS EXPECT_1;
# Also check when the server starts without "--skip-grant-table" option
---let $restart_parameters = "--skip-skip-grant-tables"
+--let $restart_parameters = --skip-skip-grant-tables
--source include/restart_mysqld.inc
SELECT @@skip_grant_tables AS EXPECT_0;
# Need to restart the server to restore the "--skip-grant-tables" state
---let $restart_parameters = "--skip-grant-tables"
+--let $restart_parameters = --skip-grant-tables
--source include/restart_mysqld.inc
--echo #
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index 522c2ced..71268c5d 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -7179,15 +7179,14 @@ CREATE VIEW t1 AS SELECT 10 AS f1;
CALL p1(1);
ERROR HY000: The target table t1 of the INSERT is not insertable-into
CREATE TEMPORARY TABLE t1 (f1 INT);
-# t1 still refers to the view since it was inlined
CALL p1(2);
-ERROR HY000: The target table t1 of the INSERT is not insertable-into
DROP VIEW t1;
# t1 now refers to the temporary table
CALL p1(3);
# Check which values were inserted into the temp table.
SELECT * FROM t1;
f1
+2
3
DROP TEMPORARY TABLE t1;
DROP PROCEDURE p1;
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 4e9b4c78..2bc71bd1 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -8632,8 +8632,6 @@ CALL p1(1);
CREATE TEMPORARY TABLE t1 (f1 INT);
---echo # t1 still refers to the view since it was inlined
---error ER_NON_INSERTABLE_TABLE
CALL p1(2);
DROP VIEW t1;
diff --git a/mysql-test/main/ssl_and_innodb.test b/mysql-test/main/ssl_and_innodb.test
index 4966f05b..2104eb5c 100644
--- a/mysql-test/main/ssl_and_innodb.test
+++ b/mysql-test/main/ssl_and_innodb.test
@@ -1,5 +1,5 @@
-- source include/have_innodb.inc
--- source include/have_ssl_crypto_functs.inc
+-- source include/have_des.inc
CREATE TABLE t1(a int) engine=innodb;
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/main/ssl_crl.result b/mysql-test/main/ssl_crl.result
index d5603254..58e3e07f 100644
--- a/mysql-test/main/ssl_crl.result
+++ b/mysql-test/main/ssl_crl.result
@@ -2,4 +2,4 @@
Variable_name Value
Ssl_version TLS_VERSION
# try logging in with a certificate in the server's --ssl-crl : should fail
-ERROR 2026 (HY000): TLS/SSL error: sslv3 alert certificate revoked
+ERROR 2026 (HY000): TLS/SSL error: ssl/tls alert certificate revoked
diff --git a/mysql-test/main/ssl_crl.test b/mysql-test/main/ssl_crl.test
index 9b475857..a09490f2 100644
--- a/mysql-test/main/ssl_crl.test
+++ b/mysql-test/main/ssl_crl.test
@@ -7,7 +7,7 @@
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-new-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-new-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'"
--echo # try logging in with a certificate in the server's --ssl-crl : should fail
-# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different
---replace_regex /ERROR 2013 \(HY000\): Lost connection to server at '.*', system error: [0-9]+/ERROR 2026 (HY000): TLS\/SSL error: sslv3 alert certificate revoked/
+# OpenSSL 1.1.1a and later releases correctly rejects the certificate, but the error message is different
+--replace_regex /(ERROR 2013 \(HY000\): Lost connection to server at '.*', system error: [0-9]+|ERROR 2026 \(HY000\): TLS\/SSL error: sslv3 alert certificate revoked)/ERROR 2026 (HY000): TLS\/SSL error: ssl\/tls alert certificate revoked/
--error 1
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
diff --git a/mysql-test/main/ssl_timeout.result b/mysql-test/main/ssl_timeout.result
index 208be527..d94cfed8 100644
--- a/mysql-test/main/ssl_timeout.result
+++ b/mysql-test/main/ssl_timeout.result
@@ -1,5 +1,5 @@
# connect with read timeout so SLEEP() should timeout
-connect ssl_con,localhost,root,,,,,SSL read_timeout=5;
+connect ssl_con,localhost,root,,,,,SSL read_timeout=5$_timeout_adjustment;
# Check ssl turned on
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
have_ssl
diff --git a/mysql-test/main/ssl_timeout.test b/mysql-test/main/ssl_timeout.test
index f5965f87..d762ebc3 100644
--- a/mysql-test/main/ssl_timeout.test
+++ b/mysql-test/main/ssl_timeout.test
@@ -1,10 +1,11 @@
--source include/have_ssl_communication.inc
+--source include/slow_environ.inc
# Save the initial number of concurrent sessions
--source include/count_sessions.inc
--echo # connect with read timeout so SLEEP() should timeout
-connect (ssl_con,localhost,root,,,,,SSL read_timeout=5);
+connect (ssl_con,localhost,root,,,,,SSL read_timeout=5$_timeout_adjustment);
--echo # Check ssl turned on
SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
diff --git a/mysql-test/main/stat_tables_partition.result b/mysql-test/main/stat_tables_partition.result
index 2619026b..2dd63e85 100644
--- a/mysql-test/main/stat_tables_partition.result
+++ b/mysql-test/main/stat_tables_partition.result
@@ -34,13 +34,12 @@ set session use_stat_tables='preferably';
# Must NOT show "Engine-independent statistics collected":
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
# Should not have Handler_read_rnd_next=34
show session status like 'Handler_read_rnd%';
Variable_name Value
Handler_read_rnd 0
Handler_read_rnd_deleted 0
-Handler_read_rnd_next 34
+Handler_read_rnd_next 0
drop table t1;
SET use_stat_tables = DEFAULT;
diff --git a/mysql-test/main/stat_tables_rbr.result b/mysql-test/main/stat_tables_rbr.result
index 38f77441..9d5e7f85 100644
--- a/mysql-test/main/stat_tables_rbr.result
+++ b/mysql-test/main/stat_tables_rbr.result
@@ -17,7 +17,6 @@ SET use_stat_tables = PREFERABLY;
CREATE TABLE t1 ( a INT ) ENGINE=MyISAM PARTITION BY HASH(a) PARTITIONS 2;
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
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
diff --git a/mysql-test/main/subselect4.result b/mysql-test/main/subselect4.result
index 6d1e0dac..1e65bfc8 100644
--- a/mysql-test/main/subselect4.result
+++ b/mysql-test/main/subselect4.result
@@ -3001,34 +3001,31 @@ where a >= any (select b from t2 group by (select c from t3 where c = 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 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
+3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t1`.`a`)))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,<min>(/* select#2 */ select `test`.`t2`.`b` from `test`.`t2` group by (/* select#3 */ select `test`.`t3`.`c` from `test`.`t3` where `test`.`t3`.`c` = 1)) <= <cache>(`test`.`t1`.`a`)))
select a from t1
where a >= any (select b from t2 group by (select c from t3 where c = 1));
a
-3
-2
prepare stmt from "select a from t1
where a >= any (select b from t2 group by (select c from t3 where c = 1))";
execute stmt;
a
-3
-2
execute stmt;
a
-3
-2
deallocate prepare stmt;
explain extended select a from t1
where a <= all (select b from t2 group by (select c from t3 where c = 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 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
+3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <not>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) < <cache>(`test`.`t1`.`a`)))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <not>(<in_optimizer>(`test`.`t1`.`a`,<min>(/* select#2 */ select `test`.`t2`.`b` from `test`.`t2` group by (/* select#3 */ select `test`.`t3`.`c` from `test`.`t3` where `test`.`t3`.`c` = 1)) < <cache>(`test`.`t1`.`a`)))
select a from t1
where a <= all (select b from t2 group by (select c from t3 where c = 1));
a
+3
1
2
explain extended select a from t1
@@ -3036,13 +3033,12 @@ where a >= any (select b from t2 group by 1 + (select c from t3 where c = 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 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
+3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t1`.`a`)))
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,<min>(/* select#2 */ select `test`.`t2`.`b` from `test`.`t2` group by 1 + (/* select#3 */ select `test`.`t3`.`c` from `test`.`t3` where `test`.`t3`.`c` = 1)) <= <cache>(`test`.`t1`.`a`)))
select a from t1
where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
a
-3
-2
drop table t1,t2,t3;
#
# MDEV-29139: Redundant IN/ALL/ANY predicand in GROUP BY clause of
@@ -3062,8 +3058,10 @@ group by (select a from t1 where a = 1) in (select d from t4));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
+4 SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where 1
+Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <in_optimizer>(1,exists(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3` group by <in_optimizer>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1),<exists>(/* select#4 */ select `test`.`t4`.`d` from `test`.`t4` where trigcond(<cache>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)) = `test`.`t4`.`d` or `test`.`t4`.`d` is null) having trigcond(`test`.`t4`.`d` is null))) limit 1))
select b from t2
where exists (select c from t3
group by (select a from t1 where a = 1) in (select d from t4));
@@ -3089,8 +3087,10 @@ any (select d from t4));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
+4 SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where 1
+Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <in_optimizer>(1,exists(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3` group by <nop>(<expr_cache><(/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)>(<in_optimizer>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1),<exists>(/* select#4 */ select `test`.`t4`.`d` from `test`.`t4` where trigcond(<cache>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)) >= `test`.`t4`.`d` or `test`.`t4`.`d` is null) having trigcond(`test`.`t4`.`d` is null))))) limit 1))
select b from t2
where exists (select c from t3
group by (select a from t1 where a = 1) >=
@@ -3105,8 +3105,10 @@ all (select d from t4));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
+4 SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where 1
+Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <in_optimizer>(1,exists(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3` group by <not>(<expr_cache><(/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)>(<in_optimizer>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1),<exists>(/* select#4 */ select `test`.`t4`.`d` from `test`.`t4` where trigcond(<cache>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)) >= `test`.`t4`.`d` or `test`.`t4`.`d` is null) having trigcond(`test`.`t4`.`d` is null))))) limit 1))
select b from t2
where exists (select c from t3
group by (select a from t1 where a = 1) <
@@ -3118,16 +3120,17 @@ explain extended select b from t2
where b in (select c from t3
group by (select a from t1 where a = 1) in (select d from t4));
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
-1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
+1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 test.t2.b 1 100.00
2 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00
+4 SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 select `test`.`t2`.`b` AS `b` from `test`.`t2` semi join (`test`.`t3`) where 1
+Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from <materialize> (/* select#2 */ select `test`.`t3`.`c` from `test`.`t3` group by <in_optimizer>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1),<exists>(/* select#4 */ select `test`.`t4`.`d` from `test`.`t4` where trigcond(<cache>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)) = `test`.`t4`.`d` or `test`.`t4`.`d` is null) having trigcond(`test`.`t4`.`d` is null)))) join `test`.`t2` where `<subquery2>`.`c` = `test`.`t2`.`b`
select b from t2
where b in (select c from t3
group by (select a from t1 where a = 1) in (select d from t4));
b
-2
explain extended select b from t2
where b >= any (select c from t3
group by (select a from t1 where a = 1) in
@@ -3135,15 +3138,15 @@ group by (select a from t1 where a = 1) in
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
+4 SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <nop>(<in_optimizer>(`test`.`t2`.`b`,(/* select#2 */ select min(`test`.`t3`.`c`) from `test`.`t3`) <= <cache>(`test`.`t2`.`b`)))
+Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <nop>(<in_optimizer>(`test`.`t2`.`b`,<min>(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3` group by <in_optimizer>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1),<exists>(/* select#4 */ select `test`.`t4`.`d` from `test`.`t4` where trigcond(<cache>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)) = `test`.`t4`.`d` or `test`.`t4`.`d` is null) having trigcond(`test`.`t4`.`d` is null)))) <= <cache>(`test`.`t2`.`b`)))
select b from t2
where b >= any (select c from t3
group by (select a from t1 where a = 1) in
(select d from t4));
b
-3
-2
explain extended select b from t2
where b <= all (select c from t3
group by (select a from t1 where a = 1) in
@@ -3151,13 +3154,16 @@ group by (select a from t1 where a = 1) in
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00
+4 SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
-Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <not>(<in_optimizer>(`test`.`t2`.`b`,<min>(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3`) < <cache>(`test`.`t2`.`b`)))
+Note 1003 /* select#1 */ select `test`.`t2`.`b` AS `b` from `test`.`t2` where <not>(<in_optimizer>(`test`.`t2`.`b`,<min>(/* select#2 */ select `test`.`t3`.`c` from `test`.`t3` group by <in_optimizer>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1),<exists>(/* select#4 */ select `test`.`t4`.`d` from `test`.`t4` where trigcond(<cache>((/* select#3 */ select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` = 1)) = `test`.`t4`.`d` or `test`.`t4`.`d` is null) having trigcond(`test`.`t4`.`d` is null)))) < <cache>(`test`.`t2`.`b`)))
select b from t2
where b <= all (select c from t3
group by (select a from t1 where a = 1) in
(select d from t4));
b
+3
2
drop table t1,t2,t3,t4;
# End of 10.3 tests
@@ -3330,4 +3336,33 @@ a
2
DEALLOCATE PREPARE stmt;
DROP TABLE t1,t2,t3;
+#
+# MDEV-33747: Optimization of (SELECT) IN (SELECT ...) executes subquery at prepare stage
+#
+create table t1 (a int, b int);
+insert into t1 select seq, seq from seq_1_to_200;
+create table t2 as select * from t1;
+create table t3 as select * from t1;
+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 @@expensive_subquery_limit < 200 as DEFAULTS_ARE_SUITABLE;
+DEFAULTS_ARE_SUITABLE
+1
+flush status;
+explain select * from t1 where a<3 or (select max(a) from t2) in (select b from t3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 200 Using where
+3 SUBQUERY t3 ALL NULL NULL NULL NULL 200 Using where
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 200
+# Must show 0. If this shows 200, this means subquery was executed and you have a bug:
+show status like 'Handler_read_rnd_next%';
+Variable_name Value
+Handler_read_rnd_next 0
+drop table t1,t2,t3;
# End of 10.4 tests
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test
index 41fa9066..854b3736 100644
--- a/mysql-test/main/subselect4.test
+++ b/mysql-test/main/subselect4.test
@@ -2670,5 +2670,20 @@ DEALLOCATE PREPARE stmt;
DROP TABLE t1,t2,t3;
+--echo #
+--echo # MDEV-33747: Optimization of (SELECT) IN (SELECT ...) executes subquery at prepare stage
+--echo #
+create table t1 (a int, b int);
+insert into t1 select seq, seq from seq_1_to_200;
+create table t2 as select * from t1;
+create table t3 as select * from t1;
+analyze table t1,t2,t3;
+select @@expensive_subquery_limit < 200 as DEFAULTS_ARE_SUITABLE;
+flush status;
+explain select * from t1 where a<3 or (select max(a) from t2) in (select b from t3);
+--echo # Must show 0. If this shows 200, this means subquery was executed and you have a bug:
+show status like 'Handler_read_rnd_next%';
+drop table t1,t2,t3;
+
--echo # End of 10.4 tests
diff --git a/mysql-test/main/subselect_elimination.result b/mysql-test/main/subselect_elimination.result
new file mode 100644
index 00000000..17400e49
--- /dev/null
+++ b/mysql-test/main/subselect_elimination.result
@@ -0,0 +1,268 @@
+#
+# MDEV-28621 group by optimization incorrectly removing subquery where
+# subject buried in a function
+#
+CREATE TABLE t1 (i int) ;
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT 1 FROM t1
+WHERE i in
+( SELECT a+1
+FROM
+(SELECT (SELECT i FROM (SELECT 1 FROM t1) dt) AS a FROM t1) dt2
+GROUP BY a
+);
+ERROR 21000: Subquery returns more than 1 row
+DROP TABLE t1;
+create table t1 (a int, b int, c int);
+insert into t1 select seq, seq, seq from seq_1_to_10;
+create table t2 as select * from t1;
+create table t20 as select * from t1;
+create table t21 as select * from t1;
+create table t3 as select * from t1;
+select a, a in
+(
+select
+(
+select max(c) from t20 where t20.a<=t2.a
+) as SUBQ1 from t2 group by SUBQ1+1
+) as COL
+from t1;
+a COL
+1 1
+2 1
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+9 1
+10 1
+create view v2 as
+select
+a, b,
+(select max(c) from t20 where t20.a<=t2.a) as SUBQ1,
+(select max(c) from t21 where t21.a<=t2.a) as SUBQ2
+from t2;
+# test partial elimination
+explain
+select
+a,
+a in (select a from v2 where a>3 and v2.SUBQ2>=0 group by v2.SUBQ1, v2.SUBQ2)
+from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+5 DEPENDENT SUBQUERY t21 ALL NULL NULL NULL NULL 10 Using where
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+# test buried subselects in group by clause
+select a, a in
+(
+select
+(
+select max(c) from t20 where t20.a<=t2.a
+)*2 as SUBQ1 from t2 group by SUBQ1+1
+) as COL
+from t1;
+a COL
+1 0
+2 1
+3 0
+4 1
+5 0
+6 1
+7 0
+8 1
+9 0
+10 1
+drop view v2;
+drop table t1, t2, t20, t21, t3;
+# Testcase from MDEV-32311
+SELECT (
+( WITH x ( x ) AS
+(SELECT ( SELECT 'x' UNION SELECT 'x' ) FROM ( SELECT ( 'x' ) ) x)
+SELECT x FROM x
+WHERE x IN ( ( SELECT 'x' AND x GROUP BY x ) )
+)
+) AS SUBQ;
+SUBQ
+x
+# MDEV-32390:
+CREATE TABLE t0 ( c43 DECIMAL ( 31 ) DEFAULT ( 45 ) ) ;
+INSERT INTO t0 VALUES ( 13 ) , ( 29 ) ;
+ALTER TABLE t0 ADD COLUMN c24 INT AFTER c43 ;
+INSERT INTO t0 VALUES ( DEFAULT , DEFAULT ) , ( DEFAULT , DEFAULT ) ;
+SELECT t1 . c22 AS c9 FROM ( SELECT ( SELECT + EXISTS ( SELECT -128 AS c29 ) <<
+LOCATE ( t0 . c43 , t0 . c24 <= t0 . c24 NOT BETWEEN 4642475734208631537 AND
+-108 , NULLIF ( 57 , -8 ) SOUNDS LIKE TRIM( TRAILING FROM 6107036197732405580 )
+) - t0 . c43 AS c57 FROM t0 LIMIT 1 ) AS c22 FROM t0 ) AS t1 HAVING TRIM( CASE
+t1 . c22 WHEN -16 THEN RAND ( ) % HEX ( t1 . c22 ) - SUBSTRING_INDEX ( t1 . c22,
+':A9SEZxtjN,fKN*zR' , 'V*vhJb}&c%Op,[T[S,j`F9NDsK;\'8 4;m"
+P,ce}1r"3ID1DN' ) >> NULLIF ( t1 . c22 , -95 ) ELSE -2 END IS TRUE
+FROM t1 . c22 >= EXISTS ( SELECT t2 . c57 AS c59 FROM ( SELECT CASE c24 WHEN
+-103 THEN 85 ELSE 22 END IS TRUE AS c57 FROM t0 ) AS t2 WHERE MOD ( 64 , 46 ) =
+CONVERT ( 73 , BINARY ) % RAND ( ) IS NOT NULL = -65 GROUP BY c57 , c22 , c22
+WINDOW w0 AS ( PARTITION BY t2 . c57 ) ) & PI ( ) ) ;
+c9
+DROP TABLE t0;
+# MDEV-32309
+SELECT
+( WITH x ( x ) AS
+(
+WITH x ( x ) AS ( SELECT 1 ) SELECT ( SELECT x ) FROM x
+)
+SELECT x FROM x WHERE x IN ( SELECT NULL GROUP BY x )
+) as col1 ;
+col1
+NULL
+# MDEV-32391
+CREATE TABLE t0 ( c15 INT , c33 INT ) engine=innodb;
+INSERT INTO t0 ( c15 ) WITH t1 AS ( SELECT SQRT ( 123 ) NOT
+REGEXP MOD ( 91 , -121 ) = ALL ( SELECT c15 AS c33 FROM t0 ) AS c49 FROM t0 )
+SELECT t1 . c49 IS UNKNOWN AS c59 FROM t1 CROSS JOIN t0 AS t2
+WHERE t1 . c49 = + EXISTS ( SELECT -5839312620871436105 AS c17 GROUP BY c49 )
+BETWEEN -109 AND CHAR_LENGTH ( 2694839150676403988 ) - - LOWER ( -13 ) ;
+DROP TABLE t0;
+# MDEV-28620
+CREATE TABLE t1 ( a int);
+INSERT INTO t1 VALUES (1),(2);
+SELECT EXISTS
+( SELECT 1 FROM t1 GROUP BY 1 IN (SELECT a FROM t1)
+ORDER BY a + (SELECT 1 FROM t1 WHERE (1,2) NOT IN (SELECT 1,0))
+) as SUBQ;
+ERROR 21000: Subquery returns more than 1 row
+DROP TABLE t1;
+# MDEV-30842 Item_subselect::get_cache_parameters and UBSAN member
+# access within null pointer
+CREATE TABLE x (x INT) ENGINE=InnoDB;
+INSERT INTO x (x) VALUES (0);
+INSERT INTO x (x) VALUES (x IN (SELECT (SELECT x FROM (SELECT x FROM
+(SELECT 0 IN (SELECT x=0 FROM (SELECT x FROM (SELECT (SELECT (SELECT (SELECT
+(SELECT 0 AS x) FROM x AS x) IN (SELECT 0 AS x) AS x) FROM x AS x) IN
+(SELECT x WHERE x=0) AS x FROM x AS x) AS x) AS x GROUP BY x) AS x FROM x) AS x)
+AS x) IN (SELECT 0 AS x) AS x FROM x));
+ERROR HY000: Table 'x' is specified twice, both as a target for 'INSERT' and as a separate source for data
+DROP TABLE x;
+# MDEV-28622: Item_subselect eliminated flag set but Item still
+# evaluated/used.
+CREATE TABLE t1 ( a int) ;
+CREATE VIEW v1 (i) AS SELECT EXISTS(SELECT 1) FROM t1;
+SELECT 1 FROM v1 WHERE i NOT IN (SELECT i = 0 FROM v1 WHERE i = -1 GROUP BY i);
+1
+DROP TABLE t1;
+DROP VIEW v1;
+CREATE TABLE t(c1 INT);
+SELECT 0
+WHERE 0 IN
+(
+SELECT 0 FROM
+(
+SELECT 0 IN
+(
+SELECT
+(
+SELECT c1 FROM t
+)
+) AS c
+FROM t
+) AS dt
+WHERE c GROUP BY c
+);
+0
+DROP TABLE t;
+create table t1 (a int, b int, c int);
+insert into t1 select seq, seq, seq from seq_1_to_10;
+create table t2 as select * from t1;
+create table t20 as select * from t1;
+create table t3 as select * from t1;
+create view v2 as
+select
+a, b, (select max(c) from t20 where t20.a<=t2.a) as SUBQ1
+from t2;
+explain
+select
+a, a in (select a from v2 where a>3 group by v2.SUBQ1)
+from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+prepare s from '
+explain
+select
+ a, a in (select a from v2 where a>3 group by v2.SUBQ1)
+from t1';
+execute s;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+execute s;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+execute s;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+prepare s from '
+explain
+select
+ a, a in (select a from v2 where a>3 and SUBQ1+1 group by v2.SUBQ1)
+from t1';
+execute s;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+execute s;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+execute s;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+create procedure p1()
+begin
+explain
+select
+a, a in (select a from v2 where a>3 group by v2.SUBQ1)
+from t1;
+end//
+create procedure p2()
+begin
+explain
+select
+a, a in (select a from v2 where a>3 and SUBQ1+1 group by v2.SUBQ1)
+from t1;
+end//
+call p1();
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+call p1();
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+call p2();
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+call p2();
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 10
+2 MATERIALIZED t2 ALL NULL NULL NULL NULL 10 Using where; Using temporary
+4 DEPENDENT SUBQUERY t20 ALL NULL NULL NULL NULL 10 Using where
+drop procedure p1;
+drop procedure p2;
+drop view v2;
+drop table t1,t2,t3,t20;
+# end of 10.4 tests
diff --git a/mysql-test/main/subselect_elimination.test b/mysql-test/main/subselect_elimination.test
new file mode 100644
index 00000000..9d973477
--- /dev/null
+++ b/mysql-test/main/subselect_elimination.test
@@ -0,0 +1,242 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+
+--echo #
+--echo # MDEV-28621 group by optimization incorrectly removing subquery where
+--echo # subject buried in a function
+--echo #
+
+CREATE TABLE t1 (i int) ;
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--error ER_SUBQUERY_NO_1_ROW
+SELECT 1 FROM t1
+WHERE i in
+( SELECT a+1
+ FROM
+ (SELECT (SELECT i FROM (SELECT 1 FROM t1) dt) AS a FROM t1) dt2
+ GROUP BY a
+);
+
+DROP TABLE t1;
+
+create table t1 (a int, b int, c int);
+insert into t1 select seq, seq, seq from seq_1_to_10;
+create table t2 as select * from t1;
+create table t20 as select * from t1;
+create table t21 as select * from t1;
+create table t3 as select * from t1;
+select a, a in
+(
+ select
+ (
+ select max(c) from t20 where t20.a<=t2.a
+ ) as SUBQ1 from t2 group by SUBQ1+1
+) as COL
+from t1;
+
+create view v2 as
+select
+ a, b,
+ (select max(c) from t20 where t20.a<=t2.a) as SUBQ1,
+ (select max(c) from t21 where t21.a<=t2.a) as SUBQ2
+from t2;
+
+--echo # test partial elimination
+
+explain
+select
+ a,
+ a in (select a from v2 where a>3 and v2.SUBQ2>=0 group by v2.SUBQ1, v2.SUBQ2)
+from t1;
+
+--echo # test buried subselects in group by clause
+
+select a, a in
+(
+ select
+ (
+ select max(c) from t20 where t20.a<=t2.a
+ )*2 as SUBQ1 from t2 group by SUBQ1+1
+) as COL
+from t1;
+
+drop view v2;
+drop table t1, t2, t20, t21, t3;
+
+--echo # Testcase from MDEV-32311
+
+# some warning duplicated using ps-protocol
+--disable_warnings
+SELECT (
+ ( WITH x ( x ) AS
+ (SELECT ( SELECT 'x' UNION SELECT 'x' ) FROM ( SELECT ( 'x' ) ) x)
+ SELECT x FROM x
+ WHERE x IN ( ( SELECT 'x' AND x GROUP BY x ) )
+ )
+) AS SUBQ;
+--enable_warnings
+
+--echo # MDEV-32390:
+
+CREATE TABLE t0 ( c43 DECIMAL ( 31 ) DEFAULT ( 45 ) ) ;
+INSERT INTO t0 VALUES ( 13 ) , ( 29 ) ;
+ALTER TABLE t0 ADD COLUMN c24 INT AFTER c43 ;
+INSERT INTO t0 VALUES ( DEFAULT , DEFAULT ) , ( DEFAULT , DEFAULT ) ;
+SELECT t1 . c22 AS c9 FROM ( SELECT ( SELECT + EXISTS ( SELECT -128 AS c29 ) <<
+LOCATE ( t0 . c43 , t0 . c24 <= t0 . c24 NOT BETWEEN 4642475734208631537 AND
+-108 , NULLIF ( 57 , -8 ) SOUNDS LIKE TRIM( TRAILING FROM 6107036197732405580 )
+) - t0 . c43 AS c57 FROM t0 LIMIT 1 ) AS c22 FROM t0 ) AS t1 HAVING TRIM( CASE
+t1 . c22 WHEN -16 THEN RAND ( ) % HEX ( t1 . c22 ) - SUBSTRING_INDEX ( t1 . c22,
+':A9SEZxtjN,fKN*zR' , 'V*vhJb}&c%Op,[T[S,j`F9NDsK;\'8 4;m"
+P,ce}1r"3ID1DN' ) >> NULLIF ( t1 . c22 , -95 ) ELSE -2 END IS TRUE
+FROM t1 . c22 >= EXISTS ( SELECT t2 . c57 AS c59 FROM ( SELECT CASE c24 WHEN
+-103 THEN 85 ELSE 22 END IS TRUE AS c57 FROM t0 ) AS t2 WHERE MOD ( 64 , 46 ) =
+CONVERT ( 73 , BINARY ) % RAND ( ) IS NOT NULL = -65 GROUP BY c57 , c22 , c22
+WINDOW w0 AS ( PARTITION BY t2 . c57 ) ) & PI ( ) ) ;
+
+DROP TABLE t0;
+
+--echo # MDEV-32309
+
+SELECT
+ ( WITH x ( x ) AS
+ (
+ WITH x ( x ) AS ( SELECT 1 ) SELECT ( SELECT x ) FROM x
+ )
+ SELECT x FROM x WHERE x IN ( SELECT NULL GROUP BY x )
+) as col1 ;
+
+--echo # MDEV-32391
+
+CREATE TABLE t0 ( c15 INT , c33 INT ) engine=innodb;
+INSERT INTO t0 ( c15 ) WITH t1 AS ( SELECT SQRT ( 123 ) NOT
+REGEXP MOD ( 91 , -121 ) = ALL ( SELECT c15 AS c33 FROM t0 ) AS c49 FROM t0 )
+SELECT t1 . c49 IS UNKNOWN AS c59 FROM t1 CROSS JOIN t0 AS t2
+WHERE t1 . c49 = + EXISTS ( SELECT -5839312620871436105 AS c17 GROUP BY c49 )
+BETWEEN -109 AND CHAR_LENGTH ( 2694839150676403988 ) - - LOWER ( -13 ) ;
+DROP TABLE t0;
+
+--echo # MDEV-28620
+CREATE TABLE t1 ( a int);
+INSERT INTO t1 VALUES (1),(2);
+
+--error ER_SUBQUERY_NO_1_ROW
+SELECT EXISTS
+( SELECT 1 FROM t1 GROUP BY 1 IN (SELECT a FROM t1)
+ ORDER BY a + (SELECT 1 FROM t1 WHERE (1,2) NOT IN (SELECT 1,0))
+) as SUBQ;
+DROP TABLE t1;
+
+--echo # MDEV-30842 Item_subselect::get_cache_parameters and UBSAN member
+--echo # access within null pointer
+
+CREATE TABLE x (x INT) ENGINE=InnoDB;
+INSERT INTO x (x) VALUES (0);
+--error ER_UPDATE_TABLE_USED
+INSERT INTO x (x) VALUES (x IN (SELECT (SELECT x FROM (SELECT x FROM
+(SELECT 0 IN (SELECT x=0 FROM (SELECT x FROM (SELECT (SELECT (SELECT (SELECT
+(SELECT 0 AS x) FROM x AS x) IN (SELECT 0 AS x) AS x) FROM x AS x) IN
+(SELECT x WHERE x=0) AS x FROM x AS x) AS x) AS x GROUP BY x) AS x FROM x) AS x)
+AS x) IN (SELECT 0 AS x) AS x FROM x));
+DROP TABLE x;
+
+--echo # MDEV-28622: Item_subselect eliminated flag set but Item still
+--echo # evaluated/used.
+
+CREATE TABLE t1 ( a int) ;
+CREATE VIEW v1 (i) AS SELECT EXISTS(SELECT 1) FROM t1;
+
+SELECT 1 FROM v1 WHERE i NOT IN (SELECT i = 0 FROM v1 WHERE i = -1 GROUP BY i);
+DROP TABLE t1;
+DROP VIEW v1;
+
+CREATE TABLE t(c1 INT);
+
+SELECT 0
+WHERE 0 IN
+(
+ SELECT 0 FROM
+ (
+ SELECT 0 IN
+ (
+ SELECT
+ (
+ SELECT c1 FROM t
+ )
+ ) AS c
+ FROM t
+ ) AS dt
+ WHERE c GROUP BY c
+);
+
+DROP TABLE t;
+
+create table t1 (a int, b int, c int);
+insert into t1 select seq, seq, seq from seq_1_to_10;
+create table t2 as select * from t1;
+create table t20 as select * from t1;
+create table t3 as select * from t1;
+
+create view v2 as
+select
+ a, b, (select max(c) from t20 where t20.a<=t2.a) as SUBQ1
+from t2;
+
+explain
+select
+ a, a in (select a from v2 where a>3 group by v2.SUBQ1)
+from t1;
+
+prepare s from '
+explain
+select
+ a, a in (select a from v2 where a>3 group by v2.SUBQ1)
+from t1';
+
+execute s;
+execute s;
+execute s;
+
+prepare s from '
+explain
+select
+ a, a in (select a from v2 where a>3 and SUBQ1+1 group by v2.SUBQ1)
+from t1';
+
+execute s;
+execute s;
+execute s;
+
+delimiter //;
+
+create procedure p1()
+begin
+explain
+select
+ a, a in (select a from v2 where a>3 group by v2.SUBQ1)
+from t1;
+end//
+
+create procedure p2()
+begin
+explain
+select
+ a, a in (select a from v2 where a>3 and SUBQ1+1 group by v2.SUBQ1)
+from t1;
+end//
+
+delimiter ;//
+
+call p1();
+call p1();
+call p2();
+call p2();
+drop procedure p1;
+drop procedure p2;
+
+
+drop view v2;
+drop table t1,t2,t3,t20;
+
+--echo # end of 10.4 tests
diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test
index 00d2e95e..0222743d 100644
--- a/mysql-test/main/subselect_sj_mat.test
+++ b/mysql-test/main/subselect_sj_mat.test
@@ -523,8 +523,6 @@ where a1 in (select substring(b1,1,512) from t2_512 where b1 > '0');
# group_concat with a blob argument - depends on
# the variable group_concat_max_len, and
# convert_blob_length == max_len*collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB
-#Check after fix MDEV-31276
---disable_ps2_protocol
explain extended select left(a1,7), left(a2,7)
from t1_512
where a1 in (select group_concat(b1) from t2_512 group by b2);
@@ -542,7 +540,6 @@ where a1 in (select group_concat(b1) from t2_512 group by b2);
select left(a1,7), left(a2,7)
from t1_512
where a1 in (select group_concat(b1) from t2_512 group by b2);
---enable_ps2_protocol
drop table t1_512, t2_512, t3_512;
@@ -608,8 +605,6 @@ where a1 in (select substring(b1,1,1024) from t2_1024 where b1 > '0');
# group_concat with a blob argument - depends on
# the variable group_concat_max_len, and
# convert_blob_length == max_len*collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB
-#Check after fix MDEV-31276
---disable_ps2_protocol
explain extended select left(a1,7), left(a2,7)
from t1_1024
where a1 in (select group_concat(b1) from t2_1024 group by b2);
@@ -627,7 +622,6 @@ where a1 in (select group_concat(b1) from t2_1024 group by b2);
select left(a1,7), left(a2,7)
from t1_1024
where a1 in (select group_concat(b1) from t2_1024 group by b2);
---enable_ps2_protocol
drop table t1_1024, t2_1024, t3_1024;
@@ -693,8 +687,6 @@ where a1 in (select substring(b1,1,1025) from t2_1025 where b1 > '0');
# group_concat with a blob argument - depends on
# the variable group_concat_max_len, and
# convert_blob_length == max_len*collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB
-#Check after fix MDEV-31276
---disable_ps2_protocol
explain extended select left(a1,7), left(a2,7)
from t1_1025
where a1 in (select group_concat(b1) from t2_1025 group by b2);
@@ -712,7 +704,6 @@ where a1 in (select group_concat(b1) from t2_1025 group by b2);
select left(a1,7), left(a2,7)
from t1_1025
where a1 in (select group_concat(b1) from t2_1025 group by b2);
---enable_ps2_protocol
drop table t1_1025, t2_1025, t3_1025;
diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result
index 644d2b8a..10607be8 100644
--- a/mysql-test/main/system_mysql_db_fix50030.result
+++ b/mysql-test/main/system_mysql_db_fix50030.result
@@ -151,7 +151,7 @@ columns_priv CREATE TABLE `columns_priv` (
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
- `Host` char(60) NOT NULL DEFAULT '',
+ `Host` char(255) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`User` char(128) NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
diff --git a/mysql-test/main/system_mysql_db_fix50117.result b/mysql-test/main/system_mysql_db_fix50117.result
index 0a7cf2a9..391c4e5b 100644
--- a/mysql-test/main/system_mysql_db_fix50117.result
+++ b/mysql-test/main/system_mysql_db_fix50117.result
@@ -131,7 +131,7 @@ columns_priv CREATE TABLE `columns_priv` (
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
- `Host` char(60) NOT NULL DEFAULT '',
+ `Host` char(255) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`User` char(128) NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
diff --git a/mysql-test/main/system_mysql_db_fix50568.result b/mysql-test/main/system_mysql_db_fix50568.result
index 0598f0a5..8f3a1ff1 100644
--- a/mysql-test/main/system_mysql_db_fix50568.result
+++ b/mysql-test/main/system_mysql_db_fix50568.result
@@ -152,7 +152,7 @@ columns_priv CREATE TABLE `columns_priv` (
show create table procs_priv;
Table Create Table
procs_priv CREATE TABLE `procs_priv` (
- `Host` char(60) NOT NULL DEFAULT '',
+ `Host` char(255) NOT NULL DEFAULT '',
`Db` char(64) NOT NULL DEFAULT '',
`User` char(128) NOT NULL DEFAULT '',
`Routine_name` char(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result
index 1ed6953b..46bea606 100644
--- a/mysql-test/main/table_value_constr.result
+++ b/mysql-test/main/table_value_constr.result
@@ -2621,9 +2621,9 @@ ERROR HY000: 'ignore' is not allowed in this context
VALUES (DEFAULT);
ERROR HY000: 'default' is not allowed in this context
EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE;
-ERROR HY000: 'ignore' is not allowed in this context
+ERROR HY000: Default/ignore value is not supported for such parameter usage
EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT;
-ERROR HY000: 'default' is not allowed in this context
+ERROR HY000: Default/ignore value is not supported for such parameter usage
#
# MDEV-24675: TVC using subqueries
#
diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test
index bf660bb9..6fee71a5 100644
--- a/mysql-test/main/table_value_constr.test
+++ b/mysql-test/main/table_value_constr.test
@@ -1358,9 +1358,9 @@ DELIMITER ;$$
VALUES (IGNORE);
--error ER_NOT_ALLOWED_IN_THIS_CONTEXT
VALUES (DEFAULT);
---error ER_NOT_ALLOWED_IN_THIS_CONTEXT
+--error ER_INVALID_DEFAULT_PARAM
EXECUTE IMMEDIATE 'VALUES (?)' USING IGNORE;
---error ER_NOT_ALLOWED_IN_THIS_CONTEXT
+--error ER_INVALID_DEFAULT_PARAM
EXECUTE IMMEDIATE 'VALUES (?)' USING DEFAULT;
--echo #
diff --git a/mysql-test/main/temp_table.result b/mysql-test/main/temp_table.result
index 23052e03..61b78f96 100644
--- a/mysql-test/main/temp_table.result
+++ b/mysql-test/main/temp_table.result
@@ -614,6 +614,55 @@ Tables_in_test
# in 11.2 and above here should be listed above used temporary tables
DROP TEMPORARY TABLE t1, t2;
#
+# MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute() || active_arena->state == Query_arena::STMT_SP_QUERY_ARGUMENTS' failed. in st_select_lex::fix_prepare_information
+#
+CREATE VIEW v1 AS SELECT 5;
+CREATE PROCEDURE sp() SELECT * FROM v1;
+CREATE TEMPORARY TABLE v1 as SELECT 7;
+# sp() accesses the temporary table v1 that hides the view with the same name
+# Therefore expected output is the row (7)
+CALL sp();
+7
+7
+DROP TEMPORARY TABLE v1;
+# After the temporary table v1 has been dropped the next invocation of sp()
+# accesses the view v1. So, expected output is the row (5)
+CALL sp();
+5
+5
+# Clean up
+DROP VIEW v1;
+DROP PROCEDURE sp;
+# Another use case is when a temporary table hides a view is dropped
+# inside a stored routine being called.
+CREATE VIEW t1 AS SELECT 1;
+CREATE PROCEDURE p1()
+BEGIN
+DROP TEMPORARY TABLE t1;
+END
+|
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+CALL p1();
+RETURN 1;
+END
+|
+CREATE TEMPORARY TABLE t1 AS SELECT 1 AS a;
+PREPARE stmt FROM 'SELECT f1()';
+EXECUTE stmt;
+f1()
+1
+# The temporary table t1 has been dropped on first
+# execution of the prepared statement 'stmt',
+# next time this statement is run it results in issuing
+# the error ER_BAD_TABLE_ERROR
+EXECUTE stmt;
+ERROR 42S02: Unknown table 'test.t1'
+# Clean up
+DROP VIEW t1;
+DROP FUNCTION f1;
+DROP PROCEDURE p1;
+#
# End of 10.4 tests
#
create function f1() returns int
diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test
index 11a66743..529ce4a6 100644
--- a/mysql-test/main/temp_table.test
+++ b/mysql-test/main/temp_table.test
@@ -670,6 +670,60 @@ SHOW TABLES;
DROP TEMPORARY TABLE t1, t2;
--echo #
+--echo # MDEV-33218: Assertion `active_arena->is_stmt_prepare_or_first_stmt_execute() || active_arena->state == Query_arena::STMT_SP_QUERY_ARGUMENTS' failed. in st_select_lex::fix_prepare_information
+--echo #
+CREATE VIEW v1 AS SELECT 5;
+CREATE PROCEDURE sp() SELECT * FROM v1;
+CREATE TEMPORARY TABLE v1 as SELECT 7;
+--echo # sp() accesses the temporary table v1 that hides the view with the same name
+--echo # Therefore expected output is the row (7)
+CALL sp();
+DROP TEMPORARY TABLE v1;
+--echo # After the temporary table v1 has been dropped the next invocation of sp()
+--echo # accesses the view v1. So, expected output is the row (5)
+CALL sp();
+
+--echo # Clean up
+DROP VIEW v1;
+DROP PROCEDURE sp;
+
+--echo # Another use case is when a temporary table hides a view is dropped
+--echo # inside a stored routine being called.
+
+CREATE VIEW t1 AS SELECT 1;
+
+--delimiter |
+CREATE PROCEDURE p1()
+BEGIN
+ DROP TEMPORARY TABLE t1;
+END
+|
+
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+ CALL p1();
+ RETURN 1;
+END
+|
+
+--delimiter ;
+
+CREATE TEMPORARY TABLE t1 AS SELECT 1 AS a;
+PREPARE stmt FROM 'SELECT f1()';
+EXECUTE stmt;
+--echo # The temporary table t1 has been dropped on first
+--echo # execution of the prepared statement 'stmt',
+--echo # next time this statement is run it results in issuing
+--echo # the error ER_BAD_TABLE_ERROR
+--error ER_BAD_TABLE_ERROR
+EXECUTE stmt;
+
+--echo # Clean up
+DROP VIEW t1;
+DROP FUNCTION f1;
+DROP PROCEDURE p1;
+
+--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result
index 410c5a53..c824af66 100644
--- a/mysql-test/main/trigger.result
+++ b/mysql-test/main/trigger.result
@@ -1,9 +1,3 @@
-drop table if exists t1, t2, t3, t4;
-drop view if exists v1;
-drop database if exists mysqltest;
-drop function if exists f1;
-drop function if exists f2;
-drop procedure if exists p1;
connect addconroot1, localhost, root,,;
connect addconroot2, localhost, root,,;
connect addconwithoutdb, localhost, root,,*NO-ONE*;
diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test
index 466e9b8f..f54a09bf 100644
--- a/mysql-test/main/trigger.test
+++ b/mysql-test/main/trigger.test
@@ -7,15 +7,6 @@
# Basic triggers test
#
---disable_warnings
-drop table if exists t1, t2, t3, t4;
-drop view if exists v1;
-drop database if exists mysqltest;
-drop function if exists f1;
-drop function if exists f2;
-drop procedure if exists p1;
---enable_warnings
-
# Create additional connections used through test
connect (addconroot1, localhost, root,,);
connect (addconroot2, localhost, root,,);
diff --git a/mysql-test/main/trigger_wl3253.result b/mysql-test/main/trigger_wl3253.result
index ed08b336..e501b264 100644
--- a/mysql-test/main/trigger_wl3253.result
+++ b/mysql-test/main/trigger_wl3253.result
@@ -310,6 +310,7 @@ CREATE TABLE t1 (a INT);
CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
CREATE TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2;
CREATE TRIGGER tr1_bu BEFORE UPDATE ON t1 FOR EACH ROW SET @a:=3;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -372,6 +373,7 @@ CREATE TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2;
CREATE TRIGGER tr0_bi BEFORE INSERT ON t1 FOR EACH ROW PRECEDES tr1_bi SET @a:=0;
CREATE TRIGGER tr1_1_bi BEFORE INSERT ON t1 FOR EACH ROW FOLLOWS tr1_bi SET @a:=0;
# Expected order of triggers in the dump is: tr0_bi, tr1_bi, tr1_1_bi, tr2_i.
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
diff --git a/mysql-test/main/type_decimal.result b/mysql-test/main/type_decimal.result
index b2853f18..e219124a 100644
--- a/mysql-test/main/type_decimal.result
+++ b/mysql-test/main/type_decimal.result
@@ -1323,3 +1323,176 @@ SET sql_mode=DEFAULT;
#
# End of 10.4 tests
#
+#
+# Start of 10.11 tests
+#
+#
+# MDEV-33442 REPAIR TABLE corrupts UUIDs
+#
+CREATE PROCEDURE show_table()
+BEGIN
+SHOW CREATE TABLE t1;
+SELECT VERSION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+SELECT * FROM t1 ORDER BY a;
+END;
+$$
+# Upgrade using REPAIR
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a
+123.45
+123.46
+123.47
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a
+123.45
+123.46
+123.47
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a
+123.45
+123.46
+123.47
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+# Expect old decimal, as it does not implicitly upgrade to new decimal
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a
+123.45
+123.46
+123.47
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a
+123.45
+123.46
+123.47
+DROP TABLE t1;
+# Upgrade using ALTER, adding a table COMMENT
+# Upgrade a 10.11.4 table using ALTER, adding a table COMMENT
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a
+123.45
+123.46
+123.47
+# ALTER..INPLACE should fail - the FRM file is too old and needs upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test10';
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 COMMENT 'test11';
+# Expect old decimal, as it does not implicitly upgrade to new decimal
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='test11'
+VERSION
+10
+a
+123.45
+123.46
+123.47
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test12';
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='test12'
+VERSION
+10
+a
+123.45
+123.46
+123.47
+DROP TABLE t1;
+# Upgrade using ALTER, adding a column DEFAULT
+# Upgrade a 10.11.4 table using ALTER, adding a table COMMENT
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a
+123.45
+123.46
+123.47
+# ALTER..INPLACE should fail - the FRM file is too old and needs upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a DECIMAL(10,2) DEFAULT 10;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 MODIFY a DECIMAL(10,2) DEFAULT 11;
+# Expect new decimal, as we explicitly redefined the data type
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2) DEFAULT 11.00
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a
+123.45
+123.46
+123.47
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a DECIMAL(10,2) DEFAULT 12;
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(10,2) DEFAULT 12.00
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a
+123.45
+123.46
+123.47
+DROP TABLE t1;
+DROP PROCEDURE show_table;
+#
+# End of 10.11 tests
+#
diff --git a/mysql-test/main/type_decimal.test b/mysql-test/main/type_decimal.test
index 9e294410..5f02d16e 100644
--- a/mysql-test/main/type_decimal.test
+++ b/mysql-test/main/type_decimal.test
@@ -826,3 +826,93 @@ SET sql_mode=DEFAULT;
--echo #
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # Start of 10.11 tests
+--echo #
+
+--echo #
+--echo # MDEV-33442 REPAIR TABLE corrupts UUIDs
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE show_table()
+BEGIN
+ SHOW CREATE TABLE t1;
+ SELECT VERSION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+ SELECT * FROM t1 ORDER BY a;
+END;
+$$
+DELIMITER ;$$
+
+--echo # Upgrade using REPAIR
+
+--copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1.MYI
+CALL show_table;
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table;
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table;
+
+REPAIR TABLE t1;
+--echo # Expect old decimal, as it does not implicitly upgrade to new decimal
+CALL show_table;
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table;
+DROP TABLE t1;
+
+
+--echo # Upgrade using ALTER, adding a table COMMENT
+
+--echo # Upgrade a 10.11.4 table using ALTER, adding a table COMMENT
+--copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1.MYI
+CALL show_table;
+
+--echo # ALTER..INPLACE should fail - the FRM file is too old and needs upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test10';
+ALTER IGNORE TABLE t1 COMMENT 'test11';
+-- echo # Expect old decimal, as it does not implicitly upgrade to new decimal
+CALL show_table;
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test12';
+CALL show_table;
+
+DROP TABLE t1;
+
+
+--echo # Upgrade using ALTER, adding a column DEFAULT
+
+--echo # Upgrade a 10.11.4 table using ALTER, adding a table COMMENT
+--copy_file std_data/old_decimal/t1dec102.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/old_decimal/t1dec102.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/old_decimal/t1dec102.MYI $MYSQLD_DATADIR/test/t1.MYI
+CALL show_table;
+
+--echo # ALTER..INPLACE should fail - the FRM file is too old and needs upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a DECIMAL(10,2) DEFAULT 10;
+ALTER IGNORE TABLE t1 MODIFY a DECIMAL(10,2) DEFAULT 11;
+--echo # Expect new decimal, as we explicitly redefined the data type
+CALL show_table;
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a DECIMAL(10,2) DEFAULT 12;
+CALL show_table;
+
+DROP TABLE t1;
+
+DROP PROCEDURE show_table;
+
+
+--echo #
+--echo # End of 10.11 tests
+--echo #
diff --git a/mysql-test/main/type_json.result b/mysql-test/main/type_json.result
index 431a7f13..91686704 100644
--- a/mysql-test/main/type_json.result
+++ b/mysql-test/main/type_json.result
@@ -155,7 +155,7 @@ DROP TABLE t1;
#
SELECT json_object('a', (SELECT json_objectagg(b, c) FROM (SELECT 'b','c') d)) AS j FROM DUAL;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def j 250 (format=json) 9437283 16 Y 0 39 33
+def j 250 (format=json) 9437310 16 Y 0 39 33
j
{"a": {"b":"c"}}
#
diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result
index 243d223c..5ac7cd64 100644
--- a/mysql-test/main/type_timestamp.result
+++ b/mysql-test/main/type_timestamp.result
@@ -1368,6 +1368,122 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
drop table t1;
#
+# MDEV-34069 Zero datetime reinterprets as '1970-01-01 00:00:00' on field_datetime=field_timestamp
+#
+SET sql_mode='';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
+SELECT * FROM t1;
+a
+0000-00-00 00:00:00
+CREATE TABLE t2 (a DATETIME);
+INSERT INTO t2 SELECT a FROM t1;
+SELECT * FROM t2;
+a
+0000-00-00 00:00:00
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+INSERT INTO t2 VALUES ('0000-00-00 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+INSERT INTO t2 SELECT a FROM t1;
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+SELECT * FROM t2;
+a
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+DROP TABLE t2, t1;
+SET time_zone=DEFAULT;
+SET sql_mode=DEFAULT;
+#
+# MDEV-34061 unix_timestamp(coalesce(timestamp_column)) returns NULL on '1970-01-01 00:00:00.000001'
+#
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6) NULL);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.000001');
+SELECT unix_timestamp(a) AS c1, unix_timestamp(coalesce(a)) AS c2 FROM t1;
+c1 c2
+0.000001 0.000001
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+#
+# MDEV-34088 The TIMESTAMP value of '1970-01-01 00:00:00' can be indirectly inserted in strict mode
+#
+SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00' for column `test`.`t1`.`a` at row 1
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00.1' for column `test`.`t1`.`a` at row 1
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+INSERT INTO t1 SELECT a FROM t2;
+ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00 +00:00' for column `test`.`t1`.`a` at row 1
+DROP TABLE t2;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00' for column `test`.`t1`.`a` at row 1
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00.1' for column `test`.`t1`.`a` at row 1
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+INSERT INTO t1 SELECT a FROM t2;
+ERROR 22007: Incorrect datetime value: '1970-01-01 00:00:00 +00:00' for column `test`.`t1`.`a` at row 1
+DROP TABLE t2;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+SET sql_mode='';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+INSERT INTO t1 SELECT a FROM t2;
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+DROP TABLE t2;
+SELECT * FROM t1;
+a
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+INSERT INTO t1 SELECT a FROM t2;
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+DROP TABLE t2;
+SELECT * FROM t1;
+a
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
# End of 10.5 tests
#
#
diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test
index b3dfa192..b8568291 100644
--- a/mysql-test/main/type_timestamp.test
+++ b/mysql-test/main/type_timestamp.test
@@ -921,6 +921,98 @@ show create table t1;
drop table t1;
--echo #
+--echo # MDEV-34069 Zero datetime reinterprets as '1970-01-01 00:00:00' on field_datetime=field_timestamp
+--echo #
+
+SET sql_mode='';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
+SELECT * FROM t1;
+CREATE TABLE t2 (a DATETIME);
+INSERT INTO t2 SELECT a FROM t1;
+SELECT * FROM t2;
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+INSERT INTO t2 VALUES ('0000-00-00 00:00:00');
+INSERT INTO t2 SELECT a FROM t1;
+SELECT * FROM t2;
+DROP TABLE t2, t1;
+SET time_zone=DEFAULT;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # MDEV-34061 unix_timestamp(coalesce(timestamp_column)) returns NULL on '1970-01-01 00:00:00.000001'
+--echo #
+
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP(6) NULL);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.000001');
+SELECT unix_timestamp(a) AS c1, unix_timestamp(coalesce(a)) AS c2 FROM t1;
+DROP TABLE t1;
+SET time_zone=DEFAULT;
+
+--echo #
+--echo # MDEV-34088 The TIMESTAMP value of '1970-01-01 00:00:00' can be indirectly inserted in strict mode
+--echo #
+
+SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 SELECT a FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+
+SET sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 SELECT a FROM t2;
+DROP TABLE t2;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+SET sql_mode='';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+INSERT INTO t1 SELECT a FROM t2;
+DROP TABLE t2;
+SELECT * FROM t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE';
+SET time_zone='+00:00';
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00');
+INSERT INTO t1 VALUES ('1970-01-01 00:00:00.1');
+CREATE TABLE t2 (a TIMESTAMP(1)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES ('1970-01-01 00:00:00.1');
+INSERT INTO t1 SELECT a FROM t2;
+DROP TABLE t2;
+SELECT * FROM t1;
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/main/type_varchar_mysql41.result b/mysql-test/main/type_varchar_mysql41.result
index cc7f663d..eb8bafe0 100644
--- a/mysql-test/main/type_varchar_mysql41.result
+++ b/mysql-test/main/type_varchar_mysql41.result
@@ -111,3 +111,152 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1old;
DROP PROCEDURE p1;
+#
+# Start of 10.11 tests
+#
+#
+# MDEV-33442 REPAIR TABLE corrupts UUIDs
+#
+CREATE PROCEDURE show_table()
+BEGIN
+SHOW CREATE TABLE t1;
+SELECT VERSION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+SELECT * FROM t1 ORDER BY a,b;
+END;
+$$
+# Upgrade using REPAIR
+TRUNCATE TABLE t1;
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a b
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a b
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a b
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) DEFAULT NULL,
+ `b` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) DEFAULT NULL,
+ `b` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+DROP TABLE t1;
+# Upgrade using ALTER, adding a table COMMENT
+TRUNCATE TABLE t1;
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a b
+# ALTER..INPLACE should fail - the old columns need upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test10';
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 COMMENT 'test11';
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) DEFAULT NULL,
+ `b` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='test11'
+VERSION
+10
+a b
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test12';
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) DEFAULT NULL,
+ `b` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='test12'
+VERSION
+10
+a b
+DROP TABLE t1;
+# Upgrade using ALTER, adding a column DEFAULT
+TRUNCATE TABLE t1;
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255)/*old*/ DEFAULT NULL,
+ `b` varchar(255)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+9
+a b
+# ALTER..INPLACE should fail - the old columns need upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a VARBINARY(255) DEFAULT 'a10';
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 MODIFY a VARBINARY(255) DEFAULT 'a11';
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) DEFAULT 'a11',
+ `b` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 MODIFY a VARBINARY(255) DEFAULT 'a12';
+CALL show_table;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) DEFAULT 'a12',
+ `b` varchar(255) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+DROP TABLE t1;
+DROP PROCEDURE show_table;
+#
+# End of 10.11 tests
+#
diff --git a/mysql-test/main/type_varchar_mysql41.test b/mysql-test/main/type_varchar_mysql41.test
index 5624e9ed..c963d3a3 100644
--- a/mysql-test/main/type_varchar_mysql41.test
+++ b/mysql-test/main/type_varchar_mysql41.test
@@ -57,3 +57,88 @@ CALL p1('a');
DROP TABLE t1old;
DROP PROCEDURE p1;
+
+--echo #
+--echo # Start of 10.11 tests
+--echo #
+
+--echo #
+--echo # MDEV-33442 REPAIR TABLE corrupts UUIDs
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE show_table()
+BEGIN
+ SHOW CREATE TABLE t1;
+ SELECT VERSION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+ SELECT * FROM t1 ORDER BY a,b;
+END;
+$$
+DELIMITER ;$$
+
+
+--echo # Upgrade using REPAIR
+
+--copy_file $MYSQL_TEST_DIR/std_data/bug19371.frm $MYSQLD_DATADIR/test/t1.frm
+TRUNCATE TABLE t1;
+CALL show_table;
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table;
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table;
+
+REPAIR TABLE t1;
+CALL show_table;
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table;
+
+DROP TABLE t1;
+
+
+--echo # Upgrade using ALTER, adding a table COMMENT
+
+--copy_file $MYSQL_TEST_DIR/std_data/bug19371.frm $MYSQLD_DATADIR/test/t1.frm
+TRUNCATE TABLE t1;
+CALL show_table;
+
+--echo # ALTER..INPLACE should fail - the old columns need upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test10';
+ALTER IGNORE TABLE t1 COMMENT 'test11';
+CALL show_table;
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test12';
+CALL show_table;
+
+DROP TABLE t1;
+
+
+--echo # Upgrade using ALTER, adding a column DEFAULT
+
+--copy_file $MYSQL_TEST_DIR/std_data/bug19371.frm $MYSQLD_DATADIR/test/t1.frm
+TRUNCATE TABLE t1;
+CALL show_table;
+
+--echo # ALTER..INPLACE should fail - the old columns need upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a VARBINARY(255) DEFAULT 'a10';
+ALTER IGNORE TABLE t1 MODIFY a VARBINARY(255) DEFAULT 'a11';
+CALL show_table;
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 MODIFY a VARBINARY(255) DEFAULT 'a12';
+CALL show_table;
+
+DROP TABLE t1;
+
+
+DROP PROCEDURE show_table;
+
+
+--echo #
+--echo # End of 10.11 tests
+--echo #
diff --git a/mysql-test/main/udf.result b/mysql-test/main/udf.result
index 8dc24a8d..53abd9c1 100644
--- a/mysql-test/main/udf.result
+++ b/mysql-test/main/udf.result
@@ -607,4 +607,68 @@ drop table t1;
DROP FUNCTION avgcost;
DROP FUNCTION avg2;
DROP FUNCTION myfunc_double;
+#
+# MDEV-24507: Server Crash using UDF in WHERE clause of VIEW
+#
+CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
+create table t1(pk int primary key, a varchar(20));
+create table t2(pk int primary key, a varchar(20));
+create view v1 as select pk, a from t1 union select pk, a from t2;
+insert into t1 values (1, "One"), (3, "Three"), (5, "Five");
+insert into t2 values (2, "Dos"), (4, "Quatro"), (6, "Seis");
+select pk, myfunc_int(a) from t1;
+pk myfunc_int(a)
+1 3
+3 5
+5 4
+select pk, myfunc_int(a) from t2;
+pk myfunc_int(a)
+2 3
+4 6
+6 4
+select pk, myfunc_int(a) from v1;
+pk myfunc_int(a)
+1 3
+3 5
+5 4
+2 3
+4 6
+6 4
+select pk from t1 where myfunc_int(a) > 4;
+pk
+3
+select pk from (select pk, a from t1) A where myfunc_int(A.a) > 4;
+pk
+3
+set @save_optimizer_switch = @@optimizer_switch;
+set optimizer_switch = 'derived_merge=OFF';
+select pk, myfunc_int(a) from t1;
+pk myfunc_int(a)
+1 3
+3 5
+5 4
+select pk, myfunc_int(a) from t2;
+pk myfunc_int(a)
+2 3
+4 6
+6 4
+select pk, myfunc_int(a) from v1;
+pk myfunc_int(a)
+1 3
+3 5
+5 4
+2 3
+4 6
+6 4
+select pk from t1 where myfunc_int(a) > 4;
+pk
+3
+select pk from (select pk, a from t1) A where myfunc_int(A.a) > 4;
+pk
+3
+set optimizer_switch = @save_optimizer_switch;
+drop view v1;
+drop table t2;
+drop table t1;
+drop function myfunc_int;
# End of 10.4 tests
diff --git a/mysql-test/main/udf.test b/mysql-test/main/udf.test
index e9823a31..d87d446f 100644
--- a/mysql-test/main/udf.test
+++ b/mysql-test/main/udf.test
@@ -647,4 +647,38 @@ DROP FUNCTION avgcost;
DROP FUNCTION avg2;
DROP FUNCTION myfunc_double;
+--echo #
+--echo # MDEV-24507: Server Crash using UDF in WHERE clause of VIEW
+--echo #
+
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
+
+create table t1(pk int primary key, a varchar(20));
+create table t2(pk int primary key, a varchar(20));
+create view v1 as select pk, a from t1 union select pk, a from t2;
+
+insert into t1 values (1, "One"), (3, "Three"), (5, "Five");
+insert into t2 values (2, "Dos"), (4, "Quatro"), (6, "Seis");
+
+select pk, myfunc_int(a) from t1;
+select pk, myfunc_int(a) from t2;
+select pk, myfunc_int(a) from v1;
+select pk from t1 where myfunc_int(a) > 4;
+select pk from (select pk, a from t1) A where myfunc_int(A.a) > 4;
+
+set @save_optimizer_switch = @@optimizer_switch;
+set optimizer_switch = 'derived_merge=OFF';
+select pk, myfunc_int(a) from t1;
+select pk, myfunc_int(a) from t2;
+select pk, myfunc_int(a) from v1;
+select pk from t1 where myfunc_int(a) > 4;
+select pk from (select pk, a from t1) A where myfunc_int(A.a) > 4;
+
+set optimizer_switch = @save_optimizer_switch;
+drop view v1;
+drop table t2;
+drop table t1;
+drop function myfunc_int;
+
--echo # End of 10.4 tests
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl
index 8effcfeb..8bd45e5b 100755
--- a/mysql-test/mariadb-test-run.pl
+++ b/mysql-test/mariadb-test-run.pl
@@ -434,6 +434,10 @@ sub main {
{
$opt_parallel= $ENV{NUMBER_OF_PROCESSORS} || 1;
}
+ elsif (IS_MAC)
+ {
+ $opt_parallel= `sysctl -n hw.ncpu`;
+ }
else
{
my $sys_info= My::SysInfo->new();
@@ -3101,7 +3105,7 @@ sub mysql_install_db {
mtr_add_arg($args, "--core-file");
mtr_add_arg($args, "--console");
mtr_add_arg($args, "--character-set-server=latin1");
- mtr_add_arg($args, "--disable-performance-schema");
+ mtr_add_arg($args, "--loose-disable-performance-schema");
if ( $opt_debug )
{
@@ -4486,6 +4490,14 @@ sub extract_warning_lines ($$) {
qr/Slave I\/0: Master command COM_BINLOG_DUMP failed/,
qr/Error reading packet/,
qr/Lost connection to MariaDB server at 'reading initial communication packet'/,
+ qr/Could not read packet:.* state: [2-3] /,
+ qr/Could not read packet:.* errno: 104 /,
+ qr/Could not read packet:.* errno: 0 .* length: 0/,
+ qr/Could not write packet:.* errno: 32 /,
+ qr/Could not write packet:.* errno: 104 /,
+ qr/Semisync ack receiver got error 1158/,
+ qr/Semisync ack receiver got hangup/,
+ qr/Connection was killed/,
qr/Failed on request_dump/,
qr/Slave: Can't drop database.* database doesn't exist/,
qr/Slave: Operation DROP USER failed for 'create_rout_db'/,
@@ -4541,8 +4553,7 @@ sub extract_warning_lines ($$) {
qr/WSREP: Failed to guess base node address/,
qr/WSREP: Guessing address for incoming client/,
- # for UBSAN
- qr/decimal\.c.*: runtime error: signed integer overflow/,
+ qr/InnoDB: Difficult to find free blocks in the buffer pool*/,
# 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'/,
@@ -5702,6 +5713,8 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--result-file=%s", $tinfo->{'result_file'});
}
+ mtr_add_arg($args, "--wait-for-pos-timeout=%d", $opt_debug_sync_timeout);
+
client_debug_arg($args, "mysqltest");
if ( $opt_record )
diff --git a/mysql-test/std_data/autoinc_import_101.frm b/mysql-test/std_data/autoinc_import_101.frm
new file mode 100644
index 00000000..b16ae91b
--- /dev/null
+++ b/mysql-test/std_data/autoinc_import_101.frm
Binary files differ
diff --git a/mysql-test/std_data/autoinc_import_57.frm b/mysql-test/std_data/autoinc_import_57.frm
new file mode 100644
index 00000000..a333931b
--- /dev/null
+++ b/mysql-test/std_data/autoinc_import_57.frm
Binary files differ
diff --git a/mysql-test/std_data/mdev-25731.dat b/mysql-test/std_data/mdev-25731.dat
new file mode 100644
index 00000000..e6c779a8
--- /dev/null
+++ b/mysql-test/std_data/mdev-25731.dat
@@ -0,0 +1,6 @@
+1
+2
+3
+1
+5
+6
diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm
index f30cc5ec..c9eea9b6 100644
--- a/mysql-test/suite.pm
+++ b/mysql-test/suite.pm
@@ -4,14 +4,7 @@ use My::Platform;
@ISA = qw(My::Suite);
sub skip_combinations {
- my @combinations;
-
- # disable innodb combinations for configurations that were not built
- push @combinations, 'innodb_plugin' unless $ENV{HA_INNODB_SO};
-
- push @combinations, 'innodb' unless $::mysqld_variables{'innodb'} eq "ON";
-
- my %skip = ( 'include/have_innodb.combinations' => [ @combinations ]);
+ my %skip;
$skip{'include/innodb_encrypt_log.combinations'} = [ 'crypt' ]
unless $ENV{DEBUG_KEY_MANAGEMENT_SO};
diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test
index 430bdd66..1367a30c 100644
--- a/mysql-test/suite/archive/archive.test
+++ b/mysql-test/suite/archive/archive.test
@@ -1609,7 +1609,7 @@ SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM
INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
INSERT INTO t1 VALUES(1, 'sampleblob1'),(2, 'sampleblob2');
# Compression length depends on zip library
---replace_result 583 584 291 292
+--replace_result 583 584 585 584 291 292
SELECT DATA_LENGTH, AVG_ROW_LENGTH FROM
INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
DROP TABLE t1;
diff --git a/mysql-test/suite/archive/archive_bitfield.result b/mysql-test/suite/archive/archive_bitfield.result
index 8c30a5f8..8cb4190e 100644
--- a/mysql-test/suite/archive/archive_bitfield.result
+++ b/mysql-test/suite/archive/archive_bitfield.result
@@ -180,6 +180,7 @@ INSERT INTO `t1` VALUES
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1),
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1),
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
+/*!999999\- enable the sandbox mode */
INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1);
INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1);
INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1);
diff --git a/mysql-test/suite/atomic/alter_table.test b/mysql-test/suite/atomic/alter_table.test
index 1f87b7e7..aa265c92 100644
--- a/mysql-test/suite/atomic/alter_table.test
+++ b/mysql-test/suite/atomic/alter_table.test
@@ -1,7 +1,12 @@
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
---source include/not_valgrind.inc
+
+if (!$BIG_TEST)
+{
+ --source include/not_valgrind.inc
+ --source include/not_msan.inc
+}
#
# Testing of atomic create table with crashes in a lot of different places
diff --git a/mysql-test/suite/binlog/include/binlog_index.inc b/mysql-test/suite/binlog/include/binlog_index.inc
index da6cac18..69498f42 100644
--- a/mysql-test/suite/binlog/include/binlog_index.inc
+++ b/mysql-test/suite/binlog/include/binlog_index.inc
@@ -98,7 +98,7 @@ reset master;
--echo # crash_purge_before_update_index
flush logs;
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug_dbug="+d,crash_purge_before_update_index";
--source include/wait_for_binlog_checkpoint.inc
--error 2013
@@ -119,7 +119,7 @@ SELECT @index;
--echo # crash_purge_non_critical_after_update_index
flush logs;
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug_dbug="+d,crash_purge_non_critical_after_update_index";
--source include/wait_for_binlog_checkpoint.inc
--error 2013
@@ -143,7 +143,7 @@ SELECT @index;
--echo # crash_purge_critical_after_update_index
flush logs;
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug_dbug="+d,crash_purge_critical_after_update_index";
--source include/wait_for_binlog_checkpoint.inc
--error 2013
@@ -167,7 +167,7 @@ file_exists $MYSQLD_DATADIR/master-bin.000008;
SELECT @index;
--echo # crash_create_non_critical_before_update_index
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug_dbug="+d,crash_create_non_critical_before_update_index";
--error 2013
flush logs;
@@ -185,7 +185,7 @@ file_exists $MYSQLD_DATADIR/master-bin.000009;
SELECT @index;
--echo # crash_create_critical_before_update_index
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug_dbug="+d,crash_create_critical_before_update_index";
--error 2013
flush logs;
@@ -205,7 +205,7 @@ file_exists $MYSQLD_DATADIR/master-bin.000011;
SELECT @index;
--echo # crash_create_after_update_index
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET SESSION debug_dbug="+d,crash_create_after_update_index";
--error 2013
flush logs;
diff --git a/mysql-test/suite/binlog/include/print_optional_metadata.inc b/mysql-test/suite/binlog/include/print_optional_metadata.inc
index 739903ab..47feede8 100644
--- a/mysql-test/suite/binlog/include/print_optional_metadata.inc
+++ b/mysql-test/suite/binlog/include/print_optional_metadata.inc
@@ -16,10 +16,9 @@ if ($stop_position)
--exec $MYSQL_BINLOG -F --print-table-metadata $_stop_position_opt $binlog_file > $output_file
---let SEARCH_PATTERN= # (?:Columns\(| {8}).*
+--let SEARCH_PATTERN= (?m-s:# (?:Columns\(| {8}).*)
--let SEARCH_FILE= $output_file
--let SEARCH_OUTPUT=matches
---let SEARCH_TYPE="_gm_"
--source include/search_pattern_in_file.inc
if ($print_primary_key)
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
index 7cb67660..9e88917c 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result
@@ -2460,7 +2460,10 @@ START TRANSACTION
#Q> '', -- c76
#Q> #
#Q> 'a', -- c77
-#Q> '',
+#Q> '', -- c78
+#Q> #
+#Q> 1 -- crn -- row number
+#Q> )
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -2642,7 +2645,10 @@ START TRANSACTION
#Q> 'longtext-ucs2', -- c76 not using maximum value here
#Q> #
#Q> 'c', -- c77
-#Q> 'a,b,c
+#Q> 'a,b,c', -- c78
+#Q> #
+#Q> 2 -- crn -- row number
+#Q> )
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -2909,7 +2915,13 @@ START TRANSACTION
#Q> 'mediumtext-ucs2', -- c73
#Q> 'longblob', -- c74
#Q> 'longtext', -- c75
-#Q> 'longtext
+#Q> 'longtext-ucs2', -- c76
+#Q> #
+#Q> 'b', -- c77
+#Q> 'b,c', -- c78
+#Q> #
+#Q> 4 -- crn -- row number
+#Q> )
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -3250,7 +3262,21 @@ START TRANSACTION
#Q> #
#Q> c65 = '' AND
#Q> c66 = '' AND
-#Q> c67 =
+#Q> c67 = '' AND
+#Q> c68 = '' AND
+#Q> c69 = '' AND
+#Q> c70 = '' AND
+#Q> c71 = '' AND
+#Q> c72 = '' AND
+#Q> c73 = '' AND
+#Q> c74 = '' AND
+#Q> c75 = '' AND
+#Q> c76 = '' AND
+#Q> #
+#Q> c77 = 'a' AND
+#Q> c78 = '' AND
+#Q> #
+#Q> crn = 1
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -3595,7 +3621,17 @@ START TRANSACTION
#Q> c68 = 'blob' AND
#Q> c69 = 'text' AND
#Q> c70 = 'text-ucs2' AND
-#Q> c71 = 'mediumblob
+#Q> c71 = 'mediumblob' AND
+#Q> c72 = 'mediumtext' AND
+#Q> c73 = 'mediumtext-ucs2' AND
+#Q> c74 = 'longblob' AND
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'c' AND
+#Q> c78 = 'a,b,c' AND
+#Q> #
+#Q> crn = 2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -3938,7 +3974,18 @@ START TRANSACTION
#Q> c67 IS NULL AND
#Q> c68 IS NULL AND
#Q> c69 IS NULL AND
-#Q> c70 IS NULL
+#Q> c70 IS NULL AND
+#Q> c71 IS NULL AND
+#Q> c72 IS NULL AND
+#Q> c73 IS NULL AND
+#Q> c74 IS NULL AND
+#Q> c75 IS NULL AND
+#Q> c76 IS NULL AND
+#Q> #
+#Q> c77 IS NULL AND
+#Q> c78 IS NULL AND
+#Q> #
+#Q> crn = 3
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -4284,7 +4331,16 @@ START TRANSACTION
#Q> c69 = 'text' AND
#Q> c70 = 'text-ucs2' AND
#Q> c71 = 'mediumblob' AND
-#Q> c72 = 'me
+#Q> c72 = 'mediumtext' AND
+#Q> c73 = 'mediumtext-ucs2' AND
+#Q> c74 = 'longblob' AND
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'b' AND
+#Q> c78 = 'b,c' AND
+#Q> #
+#Q> crn = 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -4544,7 +4600,13 @@ START TRANSACTION
#Q> c72 = 'mediumtext' AND
#Q> c73 = 'mediumtext-ucs2' AND
#Q> c74 = 'longblob' AND
-#Q> c75 = '
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'c' AND
+#Q> c78 = 'a,b,c' AND
+#Q> #
+#Q> crn = 1
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -4721,7 +4783,15 @@ START TRANSACTION
#Q> c70 = '' AND
#Q> c71 = '' AND
#Q> c72 = '' AND
-#Q> c73 = '' A
+#Q> c73 = '' AND
+#Q> c74 = '' AND
+#Q> c75 = '' AND
+#Q> c76 = '' AND
+#Q> #
+#Q> c77 = 'a' AND
+#Q> c78 = '' AND
+#Q> #
+#Q> crn = 2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -4901,7 +4971,13 @@ START TRANSACTION
#Q> c72 = 'mediumtext' AND
#Q> c73 = 'mediumtext-ucs2' AND
#Q> c74 = 'longblob' AND
-#Q> c75 = 'longtext'
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'b' AND
+#Q> c78 = 'b,c' AND
+#Q> #
+#Q> crn = 3
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -5079,7 +5155,14 @@ START TRANSACTION
#Q> c71 IS NULL AND
#Q> c72 IS NULL AND
#Q> c73 IS NULL AND
-#Q> c74 IS NUL
+#Q> c74 IS NULL AND
+#Q> c75 IS NULL AND
+#Q> c76 IS NULL AND
+#Q> #
+#Q> c77 IS NULL AND
+#Q> c78 IS NULL AND
+#Q> #
+#Q> crn = 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -5309,7 +5392,7 @@ START TRANSACTION
#Q> ('2008-08-06','VARCHAR-06',6),
#Q> ('2008-08-07','VARCHAR-07',7),
#Q> ('2008-08-08','VARCHAR-08',8),
-#Q> ('2008-08-09','VARCH
+#Q> ('2008-08-09','VARCHAR-09',9)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5733,7 +5816,7 @@ START TRANSACTION
#Q> ('2008-01-06','VARCHAR-01-06',6),
#Q> ('2008-01-07','VARCHAR-01-07',7),
#Q> ('2008-01-08','VARCHAR-01-08',18),
-#Q> ('2008-01-09','VARCHAR-0
+#Q> ('2008-01-09','VARCHAR-01-09',19)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5803,7 +5886,7 @@ START TRANSACTION
#Q> ('2008-02-06','VARCHAR-02-06',6),
#Q> ('2008-02-07','VARCHAR-02-07',7),
#Q> ('2008-02-08','VARCHAR-02-08',28),
-#Q> ('2008-02-09','VARCHAR-0
+#Q> ('2008-02-09','VARCHAR-02-09',29)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5873,7 +5956,7 @@ START TRANSACTION
#Q> ('2008-03-06','VARCHAR-03-06',6),
#Q> ('2008-03-07','VARCHAR-03-07',7),
#Q> ('2008-03-08','VARCHAR-03-08',38),
-#Q> ('2008-03-09','VARCHAR-0
+#Q> ('2008-03-09','VARCHAR-03-09',39)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5938,7 +6021,7 @@ START TRANSACTION
#Q> c_1_1 = ADDDATE(c_1_1,INTERVAL 10 YEAR),
#Q> c_2_1 = ADDDATE(c_2_1,INTERVAL 20 YEAR),
#Q> c_3_1 = ADDDATE(c_3_1,INTERVAL 30 YEAR)
-#Q> WHERE c_1_n = c_2_n AND c_2_n = c
+#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_n
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
@@ -6125,7 +6208,7 @@ START TRANSACTION
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows:
#Q> DELETE FROM t1,t2,t3 USING t1 INNER JOIN t2 INNER JOIN t3
-#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_
+#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_n
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
@@ -6340,7 +6423,7 @@ START TRANSACTION
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows:
#Q> LOAD DATA INFILE '../../std_data/loaddata5.dat'
#Q> INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (c1,c2)
-#Q> SET c3 = 'Wo
+#Q> SET c3 = 'Wow'
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
index 2bd600f3..916bed0c 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result
@@ -2458,7 +2458,10 @@ START TRANSACTION
#Q> '', -- c76
#Q> #
#Q> 'a', -- c77
-#Q> '',
+#Q> '', -- c78
+#Q> #
+#Q> 1 -- crn -- row number
+#Q> )
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -2643,7 +2646,10 @@ START TRANSACTION
#Q> 'longtext-ucs2', -- c76 not using maximum value here
#Q> #
#Q> 'c', -- c77
-#Q> 'a,b,c
+#Q> 'a,b,c', -- c78
+#Q> #
+#Q> 2 -- crn -- row number
+#Q> )
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -2912,7 +2918,13 @@ START TRANSACTION
#Q> 'mediumtext-ucs2', -- c73
#Q> 'longblob', -- c74
#Q> 'longtext', -- c75
-#Q> 'longtext
+#Q> 'longtext-ucs2', -- c76
+#Q> #
+#Q> 'b', -- c77
+#Q> 'b,c', -- c78
+#Q> #
+#Q> 4 -- crn -- row number
+#Q> )
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -3255,7 +3267,21 @@ START TRANSACTION
#Q> #
#Q> c65 = '' AND
#Q> c66 = '' AND
-#Q> c67 =
+#Q> c67 = '' AND
+#Q> c68 = '' AND
+#Q> c69 = '' AND
+#Q> c70 = '' AND
+#Q> c71 = '' AND
+#Q> c72 = '' AND
+#Q> c73 = '' AND
+#Q> c74 = '' AND
+#Q> c75 = '' AND
+#Q> c76 = '' AND
+#Q> #
+#Q> c77 = 'a' AND
+#Q> c78 = '' AND
+#Q> #
+#Q> crn = 1
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -3602,7 +3628,17 @@ START TRANSACTION
#Q> c68 = 'blob' AND
#Q> c69 = 'text' AND
#Q> c70 = 'text-ucs2' AND
-#Q> c71 = 'mediumblob
+#Q> c71 = 'mediumblob' AND
+#Q> c72 = 'mediumtext' AND
+#Q> c73 = 'mediumtext-ucs2' AND
+#Q> c74 = 'longblob' AND
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'c' AND
+#Q> c78 = 'a,b,c' AND
+#Q> #
+#Q> crn = 2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -3947,7 +3983,18 @@ START TRANSACTION
#Q> c67 IS NULL AND
#Q> c68 IS NULL AND
#Q> c69 IS NULL AND
-#Q> c70 IS NULL
+#Q> c70 IS NULL AND
+#Q> c71 IS NULL AND
+#Q> c72 IS NULL AND
+#Q> c73 IS NULL AND
+#Q> c74 IS NULL AND
+#Q> c75 IS NULL AND
+#Q> c76 IS NULL AND
+#Q> #
+#Q> c77 IS NULL AND
+#Q> c78 IS NULL AND
+#Q> #
+#Q> crn = 3
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -4295,7 +4342,16 @@ START TRANSACTION
#Q> c69 = 'text' AND
#Q> c70 = 'text-ucs2' AND
#Q> c71 = 'mediumblob' AND
-#Q> c72 = 'me
+#Q> c72 = 'mediumtext' AND
+#Q> c73 = 'mediumtext-ucs2' AND
+#Q> c74 = 'longblob' AND
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'b' AND
+#Q> c78 = 'b,c' AND
+#Q> #
+#Q> crn = 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
@@ -4557,7 +4613,13 @@ START TRANSACTION
#Q> c72 = 'mediumtext' AND
#Q> c73 = 'mediumtext-ucs2' AND
#Q> c74 = 'longblob' AND
-#Q> c75 = '
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'c' AND
+#Q> c78 = 'a,b,c' AND
+#Q> #
+#Q> crn = 1
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -4736,7 +4798,15 @@ START TRANSACTION
#Q> c70 = '' AND
#Q> c71 = '' AND
#Q> c72 = '' AND
-#Q> c73 = '' A
+#Q> c73 = '' AND
+#Q> c74 = '' AND
+#Q> c75 = '' AND
+#Q> c76 = '' AND
+#Q> #
+#Q> c77 = 'a' AND
+#Q> c78 = '' AND
+#Q> #
+#Q> crn = 2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -4918,7 +4988,13 @@ START TRANSACTION
#Q> c72 = 'mediumtext' AND
#Q> c73 = 'mediumtext-ucs2' AND
#Q> c74 = 'longblob' AND
-#Q> c75 = 'longtext'
+#Q> c75 = 'longtext' AND
+#Q> c76 = 'longtext-ucs2' AND
+#Q> #
+#Q> c77 = 'b' AND
+#Q> c78 = 'b,c' AND
+#Q> #
+#Q> crn = 3
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -5098,7 +5174,14 @@ START TRANSACTION
#Q> c71 IS NULL AND
#Q> c72 IS NULL AND
#Q> c73 IS NULL AND
-#Q> c74 IS NUL
+#Q> c74 IS NULL AND
+#Q> c75 IS NULL AND
+#Q> c76 IS NULL AND
+#Q> #
+#Q> c77 IS NULL AND
+#Q> c78 IS NULL AND
+#Q> #
+#Q> crn = 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
@@ -5330,7 +5413,7 @@ START TRANSACTION
#Q> ('2008-08-06','VARCHAR-06',6),
#Q> ('2008-08-07','VARCHAR-07',7),
#Q> ('2008-08-08','VARCHAR-08',8),
-#Q> ('2008-08-09','VARCH
+#Q> ('2008-08-09','VARCHAR-09',9)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5760,7 +5843,7 @@ START TRANSACTION
#Q> ('2008-01-06','VARCHAR-01-06',6),
#Q> ('2008-01-07','VARCHAR-01-07',7),
#Q> ('2008-01-08','VARCHAR-01-08',18),
-#Q> ('2008-01-09','VARCHAR-0
+#Q> ('2008-01-09','VARCHAR-01-09',19)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5832,7 +5915,7 @@ START TRANSACTION
#Q> ('2008-02-06','VARCHAR-02-06',6),
#Q> ('2008-02-07','VARCHAR-02-07',7),
#Q> ('2008-02-08','VARCHAR-02-08',28),
-#Q> ('2008-02-09','VARCHAR-0
+#Q> ('2008-02-09','VARCHAR-02-09',29)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5904,7 +5987,7 @@ START TRANSACTION
#Q> ('2008-03-06','VARCHAR-03-06',6),
#Q> ('2008-03-07','VARCHAR-03-07',7),
#Q> ('2008-03-08','VARCHAR-03-08',38),
-#Q> ('2008-03-09','VARCHAR-0
+#Q> ('2008-03-09','VARCHAR-03-09',39)
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -5971,7 +6054,7 @@ START TRANSACTION
#Q> c_1_1 = ADDDATE(c_1_1,INTERVAL 10 YEAR),
#Q> c_2_1 = ADDDATE(c_2_1,INTERVAL 20 YEAR),
#Q> c_3_1 = ADDDATE(c_3_1,INTERVAL 30 YEAR)
-#Q> WHERE c_1_n = c_2_n AND c_2_n = c
+#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_n
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
@@ -6160,7 +6243,7 @@ START TRANSACTION
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows:
#Q> DELETE FROM t1,t2,t3 USING t1 INNER JOIN t2 INNER JOIN t3
-#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_
+#Q> WHERE c_1_n = c_2_n AND c_2_n = c_3_n
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
@@ -6377,7 +6460,7 @@ START TRANSACTION
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows:
#Q> LOAD DATA INFILE '../../std_data/loaddata5.dat'
#Q> INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (c1,c2)
-#Q> SET c3 = 'Wo
+#Q> SET c3 = 'Wow'
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result
index bb4d318b..edf8f4e7 100644
--- a/mysql-test/suite/binlog/r/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result
@@ -232,7 +232,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE test1.t1, test2.t2
#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
@@ -301,7 +301,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE xtest1.xt1, test2.t2
#Q> FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
@@ -434,7 +434,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE test1.t1, test2.t2
#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
# at #
@@ -855,7 +855,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE test1.t1, test2.t2
#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
@@ -924,7 +924,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE xtest1.xt1, test2.t2
#Q> FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
@@ -1057,7 +1057,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE test1.t1, test2.t2
#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
# at #
diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
index a0cf5b2d..07e46933 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
@@ -204,7 +204,7 @@ START TRANSACTION
# at #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
#Q> LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
-#Q> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n
+#Q> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
@@ -445,7 +445,7 @@ START TRANSACTION
# at #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
#Q> LOAD DATA INFILE '../../std_data/loaddata7.dat' INTO TABLE t1
-#Q> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n
+#Q> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n'
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
diff --git a/mysql-test/suite/binlog/t/binlog_autocommit_off_no_hang.test b/mysql-test/suite/binlog/t/binlog_autocommit_off_no_hang.test
index 8f1dbb2a..149b1a8d 100644
--- a/mysql-test/suite/binlog/t/binlog_autocommit_off_no_hang.test
+++ b/mysql-test/suite/binlog/t/binlog_autocommit_off_no_hang.test
@@ -26,10 +26,10 @@
ALTER TABLE mysql.gtid_slave_pos ENGINE=innodb;
--echo # Restart the server so mysqld reads the gtid_slave_pos using innodb
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/binlog/t/binlog_rotate_perf.test b/mysql-test/suite/binlog/t/binlog_rotate_perf.test
index 74c91fec..512471e2 100644
--- a/mysql-test/suite/binlog/t/binlog_rotate_perf.test
+++ b/mysql-test/suite/binlog/t/binlog_rotate_perf.test
@@ -68,10 +68,10 @@ while ($loop_times) {
# 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"
+--let $restart_parameters=--log-bin=new_log_bin
--echo #begin to restart mysqld
--source include/restart_mysqld.inc
---let $restart_parameters= ""
+--let $restart_parameters=
--source include/show_binary_logs.inc
let $loop_times= 10;
diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
index 583d9a30..2a20f939 100644
--- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
@@ -236,7 +236,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE test1.t1, test2.t2
#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
@@ -305,7 +305,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE xtest1.xt1, test2.t2
#Q> FROM xtest1.xt1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE xtest1.xt1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
@@ -441,7 +441,7 @@ START TRANSACTION
#010909 4:46:40 server id # end_log_pos # Annotate_rows:
#Q> DELETE test1.t1, test2.t2
#Q> FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
-#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3
+#Q> WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
# at #
diff --git a/mysql-test/suite/binlog_encryption/restart_server.inc b/mysql-test/suite/binlog_encryption/restart_server.inc
index 8f0fe7d8..f71858be 100644
--- a/mysql-test/suite/binlog_encryption/restart_server.inc
+++ b/mysql-test/suite/binlog_encryption/restart_server.inc
@@ -20,7 +20,7 @@
--connection $_cur_con
--enable_reconnect
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
shutdown_server;
@@ -31,5 +31,5 @@ if ($rpl_server_parameters)
{
--let $_rpl_start_server_command= restart:$rpl_server_parameters
}
---exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
+--write_line "$_rpl_start_server_command" $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
index fde37036..99721813 100644
--- a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
+++ b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
@@ -69,8 +69,6 @@ INSERT INTO t2 VALUES (5, "i1a");
connection server_4;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a b
@@ -91,8 +89,6 @@ connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4,
MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
connection server_4;
UPDATE t2 SET b="j1a" WHERE a=5;
@@ -121,8 +117,6 @@ include/save_master_gtid.inc
connection server_3;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4,
MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t2 ORDER BY a;
diff --git a/mysql-test/suite/binlog_encryption/rpl_packet.result b/mysql-test/suite/binlog_encryption/rpl_packet.result
index 4a2a5d70..bb626960 100644
--- a/mysql-test/suite/binlog_encryption/rpl_packet.result
+++ b/mysql-test/suite/binlog_encryption/rpl_packet.result
@@ -2,6 +2,8 @@ include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
+call mtr.add_suppression("Could not write packet:");
+call mtr.add_suppression("Got a packet bigger than 'max_allowed_packet' bytes");
drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
connection master;
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result b/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result
index ba131ea0..6b75dbf6 100644
--- a/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.result
@@ -206,10 +206,12 @@ RETURN x;
END
||
SET sql_log_bin=1;
+include/stop_slave_io.inc
connection server_1;
INSERT INTO t3 VALUES (49,0);
connection server_2;
-START SLAVE SQL_THREAD;
+CHANGE MASTER TO master_use_gtid=no;
+include/start_slave.inc
SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
a b
41 41
@@ -239,10 +241,6 @@ SET GLOBAL slave_parallel_threads=0;
SET GLOBAL slave_parallel_threads=10;
include/start_slave.inc
*** 3. Same as (2), but not using gtid mode ***
-connection server_2;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-include/start_slave.inc
connection server_1;
connection con_temp3;
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
diff --git a/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
index 0c810d2a..b0a4fa59 100644
--- a/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
+++ b/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.result
@@ -37,7 +37,9 @@ connection con_temp1;
BEGIN;
INSERT INTO t2 VALUES (21);
connection server_2;
-START SLAVE;
+START SLAVE IO_THREAD;
+include/wait_for_slave_param.inc [Read_Master_Log_Pos]
+START SLAVE SQL_THREAD;
connection con_temp2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
diff --git a/mysql-test/suite/compat/oracle/r/empty_string_literal.result b/mysql-test/suite/compat/oracle/r/empty_string_literal.result
index 4af576e9..1260c7aa 100644
--- a/mysql-test/suite/compat/oracle/r/empty_string_literal.result
+++ b/mysql-test/suite/compat/oracle/r/empty_string_literal.result
@@ -64,7 +64,7 @@ SET sql_mode=@mode;
# Test litteral concat
#
SELECT 'a' 'b';
-a
+ab
ab
SELECT 'a' '';
a
@@ -76,13 +76,13 @@ SELECT '' '';
NULL
NULL
SELECT '' 'b' 'c';
-b
+bc
bc
SELECT '' '' 'c';
c
c
SELECT 'a' '' 'c';
-a
+ac
ac
SELECT 'a' '' '';
a
diff --git a/mysql-test/suite/compat/oracle/r/gis.result b/mysql-test/suite/compat/oracle/r/gis.result
index 113cb0ea..8145b97d 100644
--- a/mysql-test/suite/compat/oracle/r/gis.result
+++ b/mysql-test/suite/compat/oracle/r/gis.result
@@ -33,37 +33,37 @@ ERROR 42000: Incorrect parameter count in the call to native function 'WITHIN(PO
# MDEV-20009 Add CAST(expr AS pluggable_type)
#
SELECT CAST(1 AS GEOMETRY);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometry)'
SELECT CAST(1 AS GEOMETRYCOLLECTION);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometrycollection)'
SELECT CAST(1 AS POINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS point)'
SELECT CAST(1 AS LINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS linestring)'
SELECT CAST(1 AS POLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS polygon)'
SELECT CAST(1 AS MULTIPOINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipoint)'
SELECT CAST(1 AS MULTILINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multilinestring)'
SELECT CAST(1 AS MULTIPOLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipolygon)'
SELECT CONVERT(1, GEOMETRY);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometry)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometry)'
SELECT CONVERT(1, GEOMETRYCOLLECTION);
-ERROR HY000: Operator does not exists: 'CAST(expr AS geometrycollection)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS geometrycollection)'
SELECT CONVERT(1, POINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS point)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS point)'
SELECT CONVERT(1, LINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS linestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS linestring)'
SELECT CONVERT(1, POLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS polygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS polygon)'
SELECT CONVERT(1, MULTIPOINT);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipoint)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipoint)'
SELECT CONVERT(1, MULTILINESTRING);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multilinestring)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multilinestring)'
SELECT CONVERT(1, MULTIPOLYGON);
-ERROR HY000: Operator does not exists: 'CAST(expr AS multipolygon)'
+ERROR HY000: Operator does not exist: 'CAST(expr AS multipolygon)'
#
# End of 10.5 tests
#
diff --git a/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result b/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result
index fd3dd787..c01524b3 100644
--- a/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result
+++ b/mysql-test/suite/compat/oracle/r/mysqldump_restore_func_qualified.result
@@ -24,6 +24,7 @@ b1 VARCHAR(64) AS (LPAD(b0,10)) PERSISTENT
CREATE VIEW v2 AS SELECT
LTRIM(now()) AS a0,
LPAD(now(),10) AS b0;
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
diff --git a/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result b/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result
index 24211c63..508aea0e 100644
--- a/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result
+++ b/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result
@@ -34,6 +34,7 @@ PROCEDURE p1;
FUNCTION f1 RETURN INT;
END;
$$
+/*!999999\- enable the sandbox mode */
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
index 7329999d..8fef209e 100644
--- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result
+++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
@@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2);
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
-Got one of the listed errors
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT * FROM t2;
a
2
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 e2034f14..e69d427e 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -32,7 +32,7 @@ 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
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt
DROP TABLE t1;
# Start server with keys3.txt
@@ -44,31 +44,31 @@ 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
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
SELECT * FROM t2 where id = 1;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
SELECT * FROM t2 where b = 1;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
INSERT INTO t2 VALUES ('tmp',3,3);
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
DELETE FROM t2 where b = 3;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
DELETE FROM t2 where id = 3;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
UPDATE t2 set b = b +1;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
OPTIMIZE TABLE t2;
Table Op Msg_type Msg_text
-test.t2 optimize Error Table test/t2 is corrupted. Please drop the table and recreate.
+test.t2 optimize Error Table `test`.`t2` is corrupted. Please drop the table and recreate.
test.t2 optimize error Corrupt
ALTER TABLE t2 ADD COLUMN d INT;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
-test.t2 analyze Error Table test/t2 is corrupted. Please drop the table and recreate.
+test.t2 analyze Error Table `test`.`t2` is corrupted. Please drop the table and recreate.
test.t2 analyze error Corrupt
TRUNCATE TABLE t2;
-ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
DROP TABLE t2;
# Start server with 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 3cda2bd5..c02c543a 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
@@ -14,24 +14,24 @@ 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
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SHOW WARNINGS;
Level Code Message
-Error 1932 Table 'test.t1' doesn't exist in engine
+Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
ALTER TABLE t1 ENGINE=InnoDB;
-ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SHOW WARNINGS;
Level Code Message
-Error 1877 Table test/t1 is corrupted. Please drop the table and recreate.
+Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Table test/t1 is corrupted. Please drop the table and recreate.
+test.t1 optimize Error Table `test`.`t1` is corrupted. Please drop the table and recreate.
test.t1 optimize error Corrupt
SHOW WARNINGS;
Level Code Message
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate.
+test.t1 check Error Table `test`.`t1` is corrupted. Please drop the table and recreate.
test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
@@ -41,7 +41,7 @@ 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
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
@@ -62,7 +62,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `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")
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
ALTER TABLE t1 RENAME TO t1new;
-ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
DROP 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 e808d50b..40b377e6 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -12,13 +12,13 @@ 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
-test.t1 optimize status Operation failed
+test.t1 optimize Error Table `test`.`t1` is corrupted. Please drop the table and recreate.
+test.t1 optimize error Corrupt
SHOW WARNINGS;
Level Code Message
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate.
+test.t1 check Error Table `test`.`t1` is corrupted. Please drop the table and recreate.
test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
index 0dc873b9..6c645ecf 100644
--- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result
+++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result
@@ -1,7 +1,7 @@
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
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");
+call mtr.add_suppression("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;
@@ -17,9 +17,9 @@ 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
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate.
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
count(*)
1
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index 179bc550..86c6d636 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -1,8 +1,7 @@
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
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 (
@@ -24,9 +23,9 @@ 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
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
select * from t5;
-ERROR 42S02: Table 'test.t5' doesn't exist in engine
+ERROR HY000: Table `test`.`t5` is corrupted. Please drop the table and recreate.
# 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-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
index ad75df95..16cce1d2 100644
--- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result
+++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("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=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
@@ -18,11 +18,11 @@ COMMIT;
# Corrupt tables
# restart
SELECT * FROM t1;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT * FROM t2;
Got one of the listed errors
SELECT * FROM t3;
-ERROR 42S02: Table 'test.t3' doesn't exist in engine
+ERROR HY000: Table `test`.`t3` is corrupted. Please drop the table and recreate.
# Restore the original tables
# restart
DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result
index d5c1e079..83c9166d 100644
--- a/mysql-test/suite/encryption/r/innodb-missing-key.result
+++ b/mysql-test/suite/encryption/r/innodb-missing-key.result
@@ -38,11 +38,11 @@ SELECT COUNT(1) FROM t2;
COUNT(1)
2048
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT COUNT(1) FROM t1 where b = 'ab';
-ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
SELECT COUNT(1) FROM t1;
-ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
# 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-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
index b7d6eb50..78c2a200 100644
--- a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
+++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result
@@ -23,6 +23,15 @@ insert into t2 select * from t1;
insert into t3 select * from t1;
insert into t4 select * from t1;
commit;
+
+# Flush all dirty pages from buffer pool
+SET @no_checkpoint_save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
+SET @no_checkpoint_save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
+SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+SET GLOBAL innodb_max_dirty_pages_pct= @no_checkpoint_save_pct;
+SET GLOBAL innodb_max_dirty_pages_pct_lwm= @no_checkpoint_save_pct_lwm;
+
CREATE TABLE t5 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
begin;
@@ -42,6 +51,6 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
-FOUND 1 /\[ERROR\] InnoDB: Encryption key is not found for .*test.t1.ibd/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Encryption key is not found for .*test.t[1-5].ibd/ in mysqld.1.err
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
drop table t1,t2,t3,t4,t5;
diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
index 1240ee1a..e4a31a0b 100644
--- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
@@ -60,7 +60,7 @@ call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and r
let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup;
--source include/restart_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE,ER_TABLE_CORRUPT
+--error ER_TABLE_CORRUPT
SELECT * FROM t1;
SELECT * FROM t2;
CHECK TABLE t2;
diff --git a/mysql-test/suite/encryption/t/encrypt_and_grep.test b/mysql-test/suite/encryption/t/encrypt_and_grep.test
index 687f14e8..12593837 100644
--- a/mysql-test/suite/encryption/t/encrypt_and_grep.test
+++ b/mysql-test/suite/encryption/t/encrypt_and_grep.test
@@ -24,8 +24,9 @@ insert t2 values (repeat('tempsecret', 12));
insert t3 values (repeat('dummysecret', 12));
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $tables_count= `select count(*) + @@global.innodb_undo_tablespaces from information_schema.tables where engine = 'InnoDB'`
--let $wait_timeout= 600
---let $wait_condition=SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
+--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
@@ -95,8 +96,9 @@ UNLOCK TABLES;
SET GLOBAL innodb_encrypt_tables = on;
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
+--let $tables_count= `select count(*) + @@global.innodb_undo_tablespaces from information_schema.tables where engine = 'InnoDB'`
--let $wait_timeout= 600
---let $wait_condition=SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
+--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
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 05a3b5f4..e9537847 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -43,7 +43,7 @@ SELECT * FROM t1;
-- source include/restart_mysqld.inc
--disable_warnings
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t1;
--enable_warnings
@@ -72,7 +72,7 @@ INSERT INTO t2 VALUES ('foobar',1,2);
-- source include/restart_mysqld.inc
--disable_warnings
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t2;
--error ER_TABLE_CORRUPT
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 21a9ddb2..9ae3c722 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
@@ -32,7 +32,7 @@ INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
--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
+--error ER_TABLE_CORRUPT
SELECT * FROM t1;
--replace_regex /key_id [1-9][0-9]*/\1 /
SHOW WARNINGS;
@@ -63,7 +63,7 @@ UNLOCK TABLES;
--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
+--error ER_TABLE_CORRUPT
ALTER TABLE t1 DISCARD TABLESPACE;
# Drop table will succeed.
DROP TABLE t1;
@@ -95,7 +95,7 @@ SHOW CREATE TABLE t1;
--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
+--error ER_TABLE_CORRUPT
RENAME TABLE t1 TO t1new;
--error ER_TABLE_CORRUPT
ALTER TABLE t1 RENAME TO t1new;
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 9c2918f3..f4065290 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
@@ -16,7 +16,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau
--let $MYSQLD_DATADIR = `SELECT @@datadir`
--let SEARCH_RANGE = 10000000
--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
@@ -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 --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "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
@@ -47,7 +47,7 @@ UNLOCK TABLES;
ALTER TABLE t1 DISCARD TABLESPACE;
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.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 --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "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
@@ -80,7 +80,7 @@ SELECT * FROM t1;
-- let SEARCH_FILE=$t1_IBD
-- source include/search_pattern_in_file.inc
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--remove_file $MYSQLTEST_VARDIR/keys1.txt
@@ -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 --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "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-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test
index 12d061a8..645c7235 100644
--- a/mysql-test/suite/encryption/t/innodb-compressed-blob.test
+++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test
@@ -7,7 +7,7 @@
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
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");
+call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted");
--echo # Restart mysqld --file-key-management-filename=keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
@@ -28,9 +28,9 @@ insert into t3 values (1, repeat('secret',6000));
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt
-- source include/restart_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index 939ad2b5..7a7e590e 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -7,11 +7,10 @@
# MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table
#
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
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");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
@@ -43,9 +42,9 @@ alter table t1 encrypted='yes' `encryption_key_id`=1;
--let $restart_parameters=--innodb-encrypt-tables=OFF
--source include/restart_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
select * from t1;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
select * from t5;
--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
diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
index 51771f1e..861cc78c 100644
--- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test
+++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test
@@ -7,7 +7,7 @@
# Don't test under embedded
-- 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("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=");
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it");
@@ -68,11 +68,11 @@ EOF
--source include/start_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t1;
--error ER_GET_ERRMSG,ER_NOT_KEYFILE
SELECT * FROM t2;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t3;
--source include/shutdown_mysqld.inc
diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test
index 53fc820a..0c7a1df9 100644
--- a/mysql-test/suite/encryption/t/innodb-missing-key.test
+++ b/mysql-test/suite/encryption/t/innodb-missing-key.test
@@ -46,7 +46,7 @@ CREATE TABLE t4(a int not null primary key auto_increment, b varchar(128)) engin
SELECT SLEEP(5);
SELECT COUNT(1) FROM t3;
SELECT COUNT(1) FROM t2;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
--error ER_TABLE_CORRUPT
SELECT COUNT(1) FROM t1 where b = 'ab';
diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
index 52c12761..9cf515f5 100644
--- a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
+++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test
@@ -44,7 +44,9 @@ insert into t3 select * from t1;
insert into t4 select * from t1;
commit;
+let $no_checkpoint_flush= 1;
--source ../../suite/innodb/include/no_checkpoint_start.inc
+
#
# We test redo log page read at recv_read_page using
# keys that are not in std_data/keys.txt. If checkpoint
@@ -77,7 +79,7 @@ WHERE engine = 'innodb'
AND support IN ('YES', 'DEFAULT', 'ENABLED');
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
-let SEARCH_PATTERN = \[ERROR\] InnoDB: Encryption key is not found for .*test.t1.ibd;
+let SEARCH_PATTERN = \[ERROR\] InnoDB: Encryption key is not found for .*test.t[1-5].ibd;
--source include/search_pattern_in_file.inc
#
diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
index 7ba0b5a2..26c1e8df 100644
--- a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
+++ b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test
@@ -21,7 +21,7 @@ CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null,
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";
+let $restart_parameters=--debug=d,ib_log_checkpoint_avoid;
--source include/restart_mysqld.inc
# Stop the purge
diff --git a/mysql-test/suite/engines/funcs/r/rpl_change_master.result b/mysql-test/suite/engines/funcs/r/rpl_change_master.result
index 88801b07..48cec72d 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_change_master.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_change_master.result
@@ -26,9 +26,4 @@ connection master;
CHANGE MASTER TO MASTER_USER='root', MASTER_SSL=0, MASTER_SSL_CA='', MASTER_SSL_CERT='',
MASTER_SSL_KEY='', MASTER_SSL_CRL='', MASTER_SSL_CRLPATH='';
CHANGE MASTER TO MASTER_USER='root', MASTER_PASSWORD='', MASTER_SSL=0;
-"Usage of CURRENT_POS in CHANGE MASTER MASTER_USE_GTID is dreprecated.
-CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
-CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
include/rpl_end.inc
diff --git a/mysql-test/suite/engines/funcs/r/rpl_get_lock.result b/mysql-test/suite/engines/funcs/r/rpl_get_lock.result
index b852546e..cbb02a32 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_get_lock.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_get_lock.result
@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
-CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+SET GLOBAL LOG_WARNINGS=4;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
disconnect master;
@@ -35,4 +35,5 @@ NULL
connection master1;
drop table t1;
connection slave;
+connection default;
include/rpl_end.inc
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 cd4a0294..ae3305b3 100644
--- a/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
+++ b/mysql-test/suite/engines/funcs/r/tc_partition_analyze.result
@@ -33,7 +33,6 @@ 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/federated/federatedx.result b/mysql-test/suite/federated/federatedx.result
index 49deff81..3054060b 100644
--- a/mysql-test/suite/federated/federatedx.result
+++ b/mysql-test/suite/federated/federatedx.result
@@ -2243,6 +2243,7 @@ connection master;
CREATE TABLE t1(id VARCHAR(20) NOT NULL, PRIMARY KEY(id)) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
# Dump table t1 using mysqldump tool
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.result b/mysql-test/suite/federated/federatedx_create_handlers.result
index 1a2f8c5d..7288c520 100644
--- a/mysql-test/suite/federated/federatedx_create_handlers.result
+++ b/mysql-test/suite/federated/federatedx_create_handlers.result
@@ -521,6 +521,23 @@ use federated;
SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
WHERE id=2) dt2) dt;
id name
+PREPARE stmt FROM "
+SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+ WHERE id=3) dt2) dt;
+";
+EXECUTE stmt;
+id name
+3 xxx
+EXECUTE stmt;
+id name
+3 xxx
+DEALLOCATE PREPARE stmt;
+EXPLAIN
+SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+WHERE id=3) dt2) dt;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 5 Using where
+4 PUSHED DERIVED NULL NULL NULL NULL NULL NULL NULL NULL
connection slave;
CREATE TABLE federated.t10 (a INT,b INT);
CREATE TABLE federated.t11 (a INT, b INT);
@@ -541,6 +558,54 @@ WHERE id=2) dt2) dt
a b a b id name
1 1 NULL NULL NULL NULL
2 2 NULL NULL NULL NULL
+#
+# MDEV-31361: Second execution of PS for query with derived table
+#
+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');
+connection master;
+DROP TABLE IF EXISTS 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';
+use federated;
+SELECT * FROM
+(SELECT * FROM
+(SELECT * FROM
+(SELECT * FROM t1 where id>3) dt3
+WHERE id>3) dt2
+) dt;
+id name
+7 yyy
+4 xxx
+5 yyy
+PREPARE stmt FROM "SELECT * FROM
+(SELECT * FROM
+(SELECT * FROM
+(SELECT * FROM t1 where id>3) dt3
+WHERE id>3) dt2
+) dt";
+EXECUTE stmt;
+id name
+7 yyy
+4 xxx
+5 yyy
+EXECUTE stmt;
+id name
+7 yyy
+4 xxx
+5 yyy
+DEALLOCATE PREPARE stmt;
set global federated_pushdown=0;
connection master;
DROP TABLE IF EXISTS federated.t1;
diff --git a/mysql-test/suite/federated/federatedx_create_handlers.test b/mysql-test/suite/federated/federatedx_create_handlers.test
index 61dc32a2..c5ac36de 100644
--- a/mysql-test/suite/federated/federatedx_create_handlers.test
+++ b/mysql-test/suite/federated/federatedx_create_handlers.test
@@ -94,12 +94,9 @@ DEFAULT CHARSET=latin1;
INSERT INTO federated.t3 VALUES
('yyy'), ('www'), ('yyy'), ('xxx'), ('www'), ('yyy'), ('www');
-#Enable after fix MDEV-31361
---disable_ps2_protocol
SELECT *
FROM federated.t3, (SELECT * FROM federated.t1 WHERE id > 3) t
WHERE federated.t3.name=t.name;
---enable_ps2_protocol
EXPLAIN
SELECT *
@@ -354,6 +351,18 @@ use federated;
SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
WHERE id=2) dt2) dt;
+PREPARE stmt FROM "
+SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+ WHERE id=3) dt2) dt;
+";
+EXECUTE stmt;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+
+EXPLAIN
+SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT * FROM t1 where id=3) dt3
+ WHERE id=3) dt2) dt;
+
connection slave;
CREATE TABLE federated.t10 (a INT,b INT);
CREATE TABLE federated.t11 (a INT, b INT);
@@ -379,6 +388,52 @@ SELECT * FROM t10 LEFT JOIN
WHERE id=2) dt2) dt
) ON t10.a=t11.a;
+--echo #
+--echo # MDEV-31361: Second execution of PS for query with derived table
+--echo #
+
+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');
+
+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';
+
+use federated;
+
+let $q=
+SELECT * FROM
+ (SELECT * FROM
+ (SELECT * FROM
+ (SELECT * FROM t1 where id>3) dt3
+ WHERE id>3) dt2
+ ) dt;
+
+eval $q;
+
+eval PREPARE stmt FROM "$q";
+EXECUTE stmt;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+
+
set global federated_pushdown=0;
source include/federated_cleanup.inc;
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index d6b30bba..752994c4 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -17,14 +17,10 @@ galera_ssl_upgrade : [Warning] Failed to load slave replication state from table
galera_parallel_simple : timeout related to wsrep_sync_wait
galera_insert_bulk : MDEV-30536 no expected deadlock in galera_insert_bulk test
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
-galera_shutdown_nonprim : MDEV-32635 galera_shutdown_nonprim: mysql_shutdown failed
-versioning_trx_id : MDEV-18590 : galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()
galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed
-mdev-31285 : MDEV-25089 Assertion `error.len > 0' failed in galera::ReplicatorSMM::handle_apply_error()
galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes
-MW-402 : temporarily disabled at the request of Codership
-MDEV-22232 : temporarily disabled at the request of Codership
galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch
+galera_create_table_as_select : MDEV-33952 fails sporadically
diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf
index 66238a8e..3ad1a66b 100644
--- a/mysql-test/suite/galera/galera_4nodes.cnf
+++ b/mysql-test/suite/galera/galera_4nodes.cnf
@@ -21,6 +21,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#gale
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'
+auto-increment-offset=1
[mysqld.2]
wsrep-on=1
@@ -32,6 +33,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale
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'
+auto-increment-offset=2
[mysqld.3]
wsrep-on=1
@@ -43,6 +45,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.3.#gale
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'
+auto-increment-offset=3
[mysqld.4]
wsrep-on=1
@@ -54,6 +57,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.4.#gale
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'
+auto-increment-offset=4
[ENV]
NODE_MYPORT_1= @mysqld.1.port
diff --git a/mysql-test/suite/galera/include/kill_galera.inc b/mysql-test/suite/galera/include/kill_galera.inc
index 28a1b0f3..3c218a19 100644
--- a/mysql-test/suite/galera/include/kill_galera.inc
+++ b/mysql-test/suite/galera/include/kill_galera.inc
@@ -8,7 +8,7 @@ if (!$kill_signal)
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
# Kill the connected server
--disable_reconnect
diff --git a/mysql-test/suite/galera/include/shutdown_mysqld.inc b/mysql-test/suite/galera/include/shutdown_mysqld.inc
deleted file mode 100644
index 793be8d7..00000000
--- a/mysql-test/suite/galera/include/shutdown_mysqld.inc
+++ /dev/null
@@ -1,18 +0,0 @@
-# This is the first half of include/restart_mysqld.inc.
-if ($rpl_inited)
-{
- if (!$allow_rpl_inited)
- {
- --die ERROR IN TEST: When using the replication test framework (master-slave.inc, rpl_init.inc etc), use rpl_restart_server.inc instead of restart_mysqld.inc. If you know what you are doing and you really have to use restart_mysqld.inc, set allow_rpl_inited=1 before you source restart_mysqld.inc
- }
-}
-
-# Write file to make mysql-test-run.pl expect the "crash", but don't start it
---let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
---let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
-
-# Send shutdown to the connected server
---shutdown_server
---source include/wait_until_disconnected.inc
-
diff --git a/mysql-test/suite/galera/include/start_mysqld.inc b/mysql-test/suite/galera/include/start_mysqld.inc
index 57af9203..c9bed71f 100644
--- a/mysql-test/suite/galera/include/start_mysqld.inc
+++ b/mysql-test/suite/galera/include/start_mysqld.inc
@@ -4,12 +4,12 @@
if ($galera_wsrep_start_position != '') {
--echo Using --wsrep-start-position when starting mysqld ...
- --exec echo "restart:$start_mysqld_params --wsrep-start-position=$galera_wsrep_start_position" > $_expect_file_name
+ --write_line "restart:$start_mysqld_params --wsrep-start-position=$galera_wsrep_start_position" $_expect_file_name
--let $galera_wsrep_start_position = 0
}
if ($galera_wsrep_start_position == '') {
- --exec echo "restart:$start_mysqld_params" > $_expect_file_name
+ --write_line "restart:$start_mysqld_params" $_expect_file_name
}
--source include/galera_wait_ready.inc
diff --git a/mysql-test/suite/galera/r/MDEV-22232.result b/mysql-test/suite/galera/r/MDEV-22232.result
index a6a61945..79db271b 100644
--- a/mysql-test/suite/galera/r/MDEV-22232.result
+++ b/mysql-test/suite/galera/r/MDEV-22232.result
@@ -3,21 +3,21 @@ connection node_1;
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
--- CTAS with empty result set ---
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
-SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
+SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
CREATE TABLE t2 SELECT * FROM t1;
connection node_1;
-SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
-ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
+SET DEBUG_SYNC = 'now WAIT_FOR may_run';
+TRUNCATE TABLE t1;
connection con1;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'RESET';
--- CTAS with non-empty result set ---
INSERT INTO t1 VALUES (10), (20), (30);
-SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
+SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
CREATE TABLE t2 SELECT * FROM t1;
connection node_1;
-SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
-ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
+SET DEBUG_SYNC = 'now WAIT_FOR may_run';
+TRUNCATE TABLE t1;
connection con1;
ERROR 70100: Query execution was interrupted
SET DEBUG_SYNC = 'RESET';
diff --git a/mysql-test/suite/galera/r/MDEV-24143.result b/mysql-test/suite/galera/r/MDEV-24143.result
index 860d8a35..879e7d9c 100644
--- a/mysql-test/suite/galera/r/MDEV-24143.result
+++ b/mysql-test/suite/galera/r/MDEV-24143.result
@@ -14,7 +14,7 @@ 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
+ERROR 42000: This version of MariaDB doesn't yet support 'non-InnoDB sequences in Galera cluster'
ALTER TABLE t1 DROP COLUMN c2;
ERROR 42000: Can't DROP COLUMN `c2`; check that it exists
SELECT get_lock ('test', 1.5);
diff --git a/mysql-test/suite/galera/r/MDEV-25731.result b/mysql-test/suite/galera/r/MDEV-25731.result
new file mode 100644
index 00000000..11a72730
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-25731.result
@@ -0,0 +1,47 @@
+connection node_2;
+connection node_1;
+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
+SET GLOBAL wsrep_mode=REPLICATE_MYISAM;
+CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
+LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
+Warnings:
+Warning 1235 wsrep_load_data_splitting for other than InnoDB tables
+SELECT COUNT(*) AS EXPECT_6 FROM t1;
+EXPECT_6
+6
+connection node_2;
+SELECT COUNT(*) AS EXPECT_6 FROM t1;
+EXPECT_6
+6
+connection node_1;
+ALTER TABLE t1 ENGINE=Aria;
+SET GLOBAL wsrep_mode=REPLICATE_ARIA;
+LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
+Warnings:
+Warning 1235 wsrep_load_data_splitting for other than InnoDB tables
+SELECT COUNT(*) AS EXPECT_12 FROM t1;
+EXPECT_12
+12
+connection node_2;
+SELECT COUNT(*) AS EXPECT_12 FROM t1;
+EXPECT_12
+12
+connection node_1;
+ALTER TABLE t1 ENGINE=InnoDB;
+LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+EXPECT_18
+18
+connection node_2;
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+EXPECT_18
+18
+connection node_1;
+DROP TABLE t1;
+SET GLOBAL wsrep_load_data_splitting=OFF;
+Warnings:
+Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release
+SET GLOBAL wsrep_mode=DEFAULT;
diff --git a/mysql-test/suite/galera/r/MDEV-26499.result b/mysql-test/suite/galera/r/MDEV-26499.result
new file mode 100644
index 00000000..15d37247
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-26499.result
@@ -0,0 +1,6 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_2;
+SET GLOBAL debug_dbug="+d,simulate_slow_client_at_shutdown";
diff --git a/mysql-test/suite/galera/r/MDEV-27276.result b/mysql-test/suite/galera/r/MDEV-27276.result
index 7e5b29fa..38e217a9 100644
--- a/mysql-test/suite/galera/r/MDEV-27276.result
+++ b/mysql-test/suite/galera/r/MDEV-27276.result
@@ -16,17 +16,15 @@ 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_1a;
+SET SESSION DEBUG_SYNC = "RESET";
connection node_2;
SELECT * FROM p;
id f2
diff --git a/mysql-test/suite/galera/r/MDEV-27806.result b/mysql-test/suite/galera/r/MDEV-27806.result
index 0f7ac79e..6fe288f4 100644
--- a/mysql-test/suite/galera/r/MDEV-27806.result
+++ b/mysql-test/suite/galera/r/MDEV-27806.result
@@ -37,7 +37,7 @@ mysqld-bin.000002 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE `ts1` (
`f1` int(11) NOT NULL
)
-mysqld-bin.000002 # Xid # # COMMIT /* XID */
+mysqld-bin.000002 # Query # # COMMIT
connection node_2;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
diff --git a/mysql-test/suite/galera/r/MDEV-33136.result b/mysql-test/suite/galera/r/MDEV-33136.result
new file mode 100644
index 00000000..36159fa0
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-33136.result
@@ -0,0 +1,21 @@
+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;
+connection node_1a;
+TRUNCATE TABLE t1;
+SET SESSION wsrep_retry_autocommit = 0;
+SET DEBUG_SYNC = 'dict_stats_mdl_acquired SIGNAL may_toi WAIT_FOR bf_abort';
+INSERT INTO t1 VALUES (1);
+connection node_1;
+SET DEBUG_SYNC = 'now WAIT_FOR may_toi';
+TRUNCATE TABLE t1;
+connection node_1a;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+disconnect node_1a;
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera/r/MDEV-33828.result b/mysql-test/suite/galera/r/MDEV-33828.result
new file mode 100644
index 00000000..a3ce6816
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-33828.result
@@ -0,0 +1,41 @@
+connection node_2;
+connection node_1;
+SET AUTOCOMMIT=ON;
+SELECT @@autocommit;
+@@autocommit
+1
+SET LOCAL enforce_storage_engine=InnoDB;
+CREATE TABLE t1(id int not null primary key auto_increment, name varchar(64)) ENGINE=InnoDB;
+INSERT INTO t1(name) VALUES ('name1'),('name3'),('name6'),('name2');
+CREATE PROCEDURE sel_proc()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+SELECT * FROM t1;
+END|
+CREATE PROCEDURE ins_proc()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+INSERT INTO t1 VALUES ('name_proc');
+END|
+SET AUTOCOMMIT=OFF;
+SELECT @@autocommit;
+@@autocommit
+0
+START TRANSACTION;
+insert into t1(name) values('name10');
+select param_list, returns, db, type from mysql.proc where name='sel_proc';
+param_list returns db type
+ test PROCEDURE
+call ins_proc();
+COMMIT;
+SET AUTOCOMMIT=ON;
+SELECT * FROM t1;
+id name
+1 name1
+3 name3
+5 name6
+7 name2
+9 name10
+DROP TABLE t1;
+DROP PROCEDURE sel_proc;
+DROP PROCEDURE ins_proc;
diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
index 8996b85c..e0cb1ee0 100644
--- a/mysql-test/suite/galera/r/MW-336.result
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -1,7 +1,8 @@
connection node_2;
connection node_1;
connection node_1;
-CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+SET @wsrep_slave_threads_orig = @@wsrep_slave_threads;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 1
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
@@ -9,7 +10,7 @@ EXPECT_10
10
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
-INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (NULL);
connection node_1;
# Wait until one of the appliers has exited
SELECT VARIABLE_VALUE AS EXPECT_9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
@@ -27,33 +28,14 @@ EXPECT_20
20
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
-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);
-INSERT INTO t1 VALUES (8);
-INSERT INTO t1 VALUES (9);
-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);
-INSERT INTO t1 VALUES (16);
-INSERT INTO t1 VALUES (17);
-INSERT INTO t1 VALUES (18);
-INSERT INTO t1 VALUES (19);
-INSERT INTO t1 VALUES (20);
connection node_1;
# Wait until 19 of the appliers has exited
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
EXPECT_1
1
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-20
+SELECT COUNT(*) AS EXPECT_51 FROM t1;
+EXPECT_51
+51
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 3
SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
@@ -62,22 +44,12 @@ EXPECT_10
connection node_1;
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
-INSERT INTO t1 VALUES (21);
-INSERT INTO t1 VALUES (22);
-INSERT INTO t1 VALUES (23);
-INSERT INTO t1 VALUES (24);
-INSERT INTO t1 VALUES (25);
-INSERT INTO t1 VALUES (26);
-INSERT INTO t1 VALUES (27);
-INSERT INTO t1 VALUES (28);
-INSERT INTO t1 VALUES (29);
-INSERT INTO t1 VALUES (30);
connection node_1;
# Wait until slave threads back to 1
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
EXPECT_1
1
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-30
+SELECT COUNT(*) AS EXPECT_101 FROM t1;
+EXPECT_101
+101
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-369.result b/mysql-test/suite/galera/r/MW-369.result
index 9f0a77ed..b4fb8668 100644
--- a/mysql-test/suite/galera/r/MW-369.result
+++ b/mysql-test/suite/galera/r/MW-369.result
@@ -12,22 +12,20 @@ START TRANSACTION;
DELETE FROM p WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
-SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
INSERT INTO c VALUES (1, 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -54,22 +52,20 @@ START TRANSACTION;
UPDATE p 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE c SET f2 = 1 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM p;
@@ -94,22 +90,20 @@ START TRANSACTION;
UPDATE p 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
DELETE FROM c 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM p;
@@ -130,22 +124,20 @@ START TRANSACTION;
UPDATE p 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
INSERT INTO c VALUES (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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -170,22 +162,20 @@ START TRANSACTION;
DELETE FROM p WHERE f1 = 1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
-SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE c SET f2 = 1 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -215,22 +205,20 @@ 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM pf;
@@ -255,22 +243,20 @@ 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM pg;
diff --git a/mysql-test/suite/galera/r/MW-402.result b/mysql-test/suite/galera/r/MW-402.result
index f692c90d..e936b835 100644
--- a/mysql-test/suite/galera/r/MW-402.result
+++ b/mysql-test/suite/galera/r/MW-402.result
@@ -15,22 +15,20 @@ START TRANSACTION;
UPDATE c 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
DELETE FROM p 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -55,22 +53,20 @@ START TRANSACTION;
UPDATE c SET f2=2 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
-SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE p set f1=11 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -97,22 +93,20 @@ START TRANSACTION;
UPDATE c SET p_id=2 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
-SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE p set f1=11 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -130,22 +124,20 @@ START TRANSACTION;
UPDATE p set f1=21 WHERE f1 = 11;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
-SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
connection node_2;
UPDATE c SET p_id=2 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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
@@ -176,22 +168,20 @@ START TRANSACTION;
UPDATE p2 SET f2=2 where f1=1;
connection node_1a;
SET SESSION wsrep_sync_wait = 0;
-SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
connection node_2;
SELECT * FROM p1;
@@ -223,22 +213,20 @@ 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';
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
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';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
connection node_1;
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
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=';
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_mariabackup.result b/mysql-test/suite/galera/r/galera_bf_abort_mariabackup.result
index 88c200ee..fa056803 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_mariabackup.result
@@ -12,9 +12,9 @@ connection node_1;
connection node_2;
Starting server ...
connection node_1;
-# Both should return FOUND 2 as we have bootstrap and SST
-FOUND 2 /Desyncing and pausing the provider/ in mysqld.1.err
-FOUND 2 /Resuming and resyncing the provider/ in mysqld.1.err
+# Both should return NOT FOUND as we have mariabackup with backup locks
+NOT FOUND /Desyncing and pausing the provider/ in mysqld.1.err
+NOT FOUND /Resuming and resyncing the provider/ in mysqld.1.err
connection node_1;
SET GLOBAL wsrep_mode = "BF_ABORT_MARIABACKUP";
# Restart node_2, force SST.
@@ -25,9 +25,9 @@ connection node_2;
Starting server ...
connection node_2;
connection node_1;
-# Both should return FOUND 3 as we have 1 new SST
-FOUND 3 /Desyncing and pausing the provider/ in mysqld.1.err
-FOUND 3 /Resuming and resyncing the provider/ in mysqld.1.err
+# Both should return NOT FOUND as we have mariabackup with backup locks
+NOT FOUND /Desyncing and pausing the provider/ in mysqld.1.err
+NOT FOUND /Resuming and resyncing the provider/ in mysqld.1.err
SET GLOBAL wsrep_mode = "";
DROP TABLE t;
# Case 2: MariaBackup backup from node_2
@@ -46,11 +46,13 @@ SET GLOBAL wsrep_mode = "BF_ABORT_MARIABACKUP";
SELECT @@wsrep_mode;
@@wsrep_mode
BF_ABORT_MARIABACKUP
-# Both should return FOUND 1 as node should not desync
-FOUND 1 /Desyncing and pausing the provider/ in mysqld.2.err
-FOUND 1 /Resuming and resyncing the provider/ in mysqld.2.err
-# Should return FOUND 1 because only last backup does not desync
-FOUND 1 /Server not desynched from group because WSREP_MODE_BF_MARIABACKUP used./ in mysqld.2.err
+# Both should return FOUND 2 because both backups do desync but on different points
+FOUND 2 /Desyncing and pausing the provider/ in mysqld.2.err
+FOUND 2 /Resuming and resyncing the provider/ in mysqld.2.err
+# Should return FOUND 1 as server did not desync at BLOCK_DDL
+FOUND 1 /Server not desynched from group at BLOCK_DDL because WSREP_MODE_BF_MARIABACKUP is used./ in mysqld.2.err
+# Should return FOUND 1 as server did desync and pause at BLOCK_COMMIT
+FOUND 1 /Server desynched from group during BACKUP STAGE BLOCK_COMMIT./ in mysqld.2.err
SET GLOBAL wsrep_mode = "";
connection node_1;
DROP TABLE t;
diff --git a/mysql-test/suite/galera/r/galera_load_data.result b/mysql-test/suite/galera/r/galera_load_data.result
index 84e96f8a..c275eb02 100644
--- a/mysql-test/suite/galera/r/galera_load_data.result
+++ b/mysql-test/suite/galera/r/galera_load_data.result
@@ -26,9 +26,308 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1324 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;
LOCK TABLES cardtest_tbl WRITE;
ALTER TABLE cardtest_tbl DISABLE KEYS;
-Warnings:
-Note 1031 Storage engine InnoDB of the table `cardtest02`.`cardtest_tbl` doesn't have this option
-INSERT INTO cardtest_tbl VALUES (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL);
+INSERT INTO cardtest_tbl VALUES
+(1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+(301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL);
ALTER TABLE cardtest_tbl ENABLE KEYS;
Warnings:
Note 1031 Storage engine InnoDB of the table `cardtest02`.`cardtest_tbl` doesn't have this option
diff --git a/mysql-test/suite/galera/r/galera_mdl_race.result b/mysql-test/suite/galera/r/galera_mdl_race.result
index cf747ed8..a7f0bc8e 100644
--- a/mysql-test/suite/galera/r/galera_mdl_race.result
+++ b/mysql-test/suite/galera/r/galera_mdl_race.result
@@ -1,44 +1,68 @@
connection node_2;
connection node_1;
+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');
INSERT INTO t1 VALUES (2, 'a');
-connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1a;
+SET SESSION wsrep_sync_wait=0;
LOCK TABLE t2 WRITE;
connection node_1;
-SET @@debug_dbug = "d,sync.wsrep_before_mdl_wait";
+SET DEBUG_SYNC= 'wsrep_before_mdl_wait SIGNAL before_mdl_wait WAIT_FOR mdl_wait_continue';
SELECT * FROM t2;;
connection node_1a;
+# Wait until select is blocked before MDL lock wait
+SET DEBUG_SYNC= 'now WAIT_FOR before_mdl_wait';
+connection node_1a;
SET @@debug_dbug = "d,sync.wsrep_after_BF_victim_lock";
connection node_2;
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
-connection node_1a;
-SET @@debug_dbug = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
+connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1b;
+SET SESSION wsrep_sync_wait=0;
+# Wait for conflicting update to block
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
+connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connection node_1c;
+connection node_1a;
+SET DEBUG_SYNC = "now SIGNAL BF_victim_continue";
UNLOCK TABLES;
connection node_1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
-COUNT(*) = 1
+connection node_1;
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
+EXPECT_1
1
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
+EXPECT_1
1
+SELECT * FROM t1;
+f1 f2
+1 c
+2 a
connection node_2;
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
+EXPECT_1
1
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
+EXPECT_1
1
+SELECT * FROM t1;
+f1 f2
+1 c
+2 a
DROP TABLE t1;
DROP TABLE t2;
connection node_1a;
SET DEBUG_SYNC = "RESET";
+connection node_1b;
+SET DEBUG_SYNC = "RESET";
+connection node_1;
+disconnect node_1a;
+disconnect node_1b;
+disconnect node_1c;
diff --git a/mysql-test/suite/galera/r/galera_myisam_autocommit.result b/mysql-test/suite/galera/r/galera_myisam_autocommit.result
index b80af779..23883ef3 100644
--- a/mysql-test/suite/galera/r/galera_myisam_autocommit.result
+++ b/mysql-test/suite/galera/r/galera_myisam_autocommit.result
@@ -15,16 +15,37 @@ UPDATE t1 SET f1 = 9;
UPDATE t2 SET f1 = 9 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 9;
DELETE FROM t2 WHERE f1 = 9;
+SELECT * FROM t1 ORDER BY f1;
+f1
+SELECT * FROM t2 ORDER BY f1;
+f1
+2
+3
+4
+5
+6
+connection node_2;
+SELECT * FROM t1 ORDER BY f1;
+f1
+SELECT * FROM t2 ORDER BY f1;
+f1
+2
+3
+4
+5
+6
TRUNCATE TABLE t1;
-TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+SELECT * FROM t1 ORDER BY f1;
+f1
+SELECT * FROM t2 ORDER BY f1;
+f1
connection node_2;
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM t2;
-COUNT(*) = 0
-0
+SELECT * FROM t1 ORDER BY f1;
+f1
+SELECT * FROM t2 ORDER BY f1;
+f1
connection node_1;
+SET GLOBAL wsrep_mode=DEFAULT;
DROP TABLE t1;
DROP TABLE t2;
-SET GLOBAL wsrep_mode=DEFAULT;
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 a15b0c7d..bc61cfb4 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
@@ -10,7 +10,7 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
connection node_2a;
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committing%' or STATE = 'Waiting for certification');
+SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE 'Commit' or STATE = 'Waiting for certification');
EXPECT_1
1
SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
diff --git a/mysql-test/suite/galera/r/galera_query_cache_invalidate.result b/mysql-test/suite/galera/r/galera_query_cache_invalidate.result
index 4a6b61e4..fc23c0f1 100644
--- a/mysql-test/suite/galera/r/galera_query_cache_invalidate.result
+++ b/mysql-test/suite/galera/r/galera_query_cache_invalidate.result
@@ -8,8 +8,6 @@ connection node_4;
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node.");
connection node_3;
CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos;;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
START SLAVE;
include/wait_for_slave_to_start.inc
connection node_1;
diff --git a/mysql-test/suite/galera/r/galera_sequence_engine.result b/mysql-test/suite/galera/r/galera_sequence_engine.result
new file mode 100644
index 00000000..93e6c46b
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_sequence_engine.result
@@ -0,0 +1,12 @@
+connection node_2;
+connection node_1;
+SET GLOBAL wsrep_ignore_apply_errors=0;
+SET SESSION AUTOCOMMIT=0;
+SET SESSION max_error_count=0;
+CREATE TABLE t0 (id GEOMETRY,parent_id GEOMETRY)ENGINE=SEQUENCE;
+ERROR 42000: This version of MariaDB doesn't yet support 'non-InnoDB sequences in Galera cluster'
+connection node_2;
+SHOW CREATE TABLE t0;
+ERROR 42S02: Table 'test.t0' doesn't exist
+connection node_1;
+SET GLOBAL wsrep_ignore_apply_errors=DEFAULT;
diff --git a/mysql-test/suite/galera/r/galera_shutdown_nonprim.result b/mysql-test/suite/galera/r/galera_shutdown_nonprim.result
index 8b769743..d577eab9 100644
--- a/mysql-test/suite/galera/r/galera_shutdown_nonprim.result
+++ b/mysql-test/suite/galera/r/galera_shutdown_nonprim.result
@@ -5,7 +5,12 @@ connection node_2;
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.weight=2';
connection node_2;
-SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
SET SESSION wsrep_sync_wait = 0;
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+connection node_1;
+connection node_2;
+SHOW STATUS LIKE 'wsrep_cluster_status';
+Variable_name Value
+wsrep_cluster_status non-Primary
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.weight = 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 3aad611c..9dc84549 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
@@ -1,6 +1,6 @@
---- r/galera_sst_mariabackup.result
-+++ r/galera_sst_mariabackup.reject
-@@ -516,5 +516,189 @@
+--- galera/r/galera_sst_mariabackup.result 2024-04-11 09:53:12.950512316 +0300
++++ galera/r/galera_sst_mariabackup,debug.reject 2024-04-11 10:00:36.771144955 +0300
+@@ -524,6 +524,190 @@
1
DROP TABLE t1;
COMMIT;
@@ -188,5 +188,6 @@
+DROP TABLE t1;
+COMMIT;
+SET GLOBAL debug_dbug = $debug_orig;
- disconnect node_2;
- disconnect node_1;
+ connection node_2;
+ Shutting down server ...
+ connection 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 caf602c0..374f714e 100644
--- a/mysql-test/suite/galera/r/galera_sst_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_sst_mariabackup.result
@@ -2,6 +2,14 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
+connection node_1;
+select @@innodb_undo_tablespaces;
+@@innodb_undo_tablespaces
+0
+connection node_2;
+select @@innodb_undo_tablespaces;
+@@innodb_undo_tablespaces
+3
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;
@@ -516,5 +524,17 @@ COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
+connection node_2;
+Shutting down server ...
+connection node_1;
+connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+connection node_1;
+connection node_2;
+select @@innodb_undo_tablespaces;
+@@innodb_undo_tablespaces
+3
+call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=3 because previous shutdown was not with innodb_fast_shutdown=0");
disconnect node_2;
disconnect node_1;
diff --git a/mysql-test/suite/galera/r/galera_table_with_hyphen.result b/mysql-test/suite/galera/r/galera_table_with_hyphen.result
new file mode 100644
index 00000000..c9993004
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_table_with_hyphen.result
@@ -0,0 +1,52 @@
+connection node_2;
+connection node_1;
+connection node_1;
+set wsrep_sync_wait=0;
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET SESSION wsrep_sync_wait = 0;
+connection node_1;
+SET GLOBAL wsrep_slave_threads=2;
+CREATE TABLE `par-ent` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB;
+CREATE TABLE `child` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `par-ent`(id)) ENGINE=InnoDB;
+INSERT INTO `par-ent` VALUES (23,0);
+connection node_2;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
+connection node_2;
+INSERT INTO `child` VALUES (21,23,0),(22,23,0),(23,23,0);
+connection node_1a;
+SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
+connection node_2;
+UPDATE `par-ent` SET j=2 WHERE id=23;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
+SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
+SET GLOBAL DEBUG_DBUG="RESET";
+SET DEBUG_SYNC = 'RESET';
+SET GLOBAL wsrep_slave_threads=DEFAULT;
+connection node_2;
+drop table `child`;
+drop table `par-ent`;
+connection node_1;
+SET GLOBAL wsrep_slave_threads=2;
+CREATE TABLE `p-arent-` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB;
+CREATE TABLE `c-hild` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `p-arent-`(id)) ENGINE=InnoDB;
+INSERT INTO `p-arent-` VALUES (23,0);
+connection node_2;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
+connection node_2;
+INSERT INTO `c-hild` VALUES (21,23,0),(22,23,0),(23,23,0);
+connection node_1a;
+SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
+connection node_2;
+UPDATE `p-arent-` SET j=2 WHERE id=23;
+connection node_1a;
+SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
+SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
+SET GLOBAL DEBUG_DBUG="RESET";
+SET DEBUG_SYNC = 'RESET';
+SET GLOBAL wsrep_slave_threads=DEFAULT;
+connection node_2;
+drop table `c-hild`;
+drop table `p-arent-`;
diff --git a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result
index c6b3d8fa..ff0063fb 100644
--- a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result
+++ b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result
@@ -1,7 +1,5 @@
connection node_2;
connection node_1;
-connection node_1;
-connection node_2;
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;
@@ -55,6 +53,7 @@ expect_0
SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
expect_1
1
+CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster.");
connection node_4;
SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
expect_0
@@ -64,3 +63,5 @@ expect_1
1
CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster.");
DROP TABLE t2;
+disconnect node_3;
+disconnect node_4;
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 2433a1d9..edaefe0e 100644
--- a/mysql-test/suite/galera/r/galera_wan_restart_sst.result
+++ b/mysql-test/suite/galera/r/galera_wan_restart_sst.result
@@ -10,7 +10,7 @@ SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VA
EXPECT_4
4
connection node_1;
-CREATE TABLE t1 (f1 INTEGER);
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES (1);
connection node_2;
INSERT INTO t1 VALUES (2);
@@ -20,6 +20,8 @@ connection node_4;
INSERT INTO t1 VALUES (4);
connection node_3;
INSERT INTO t1 VALUES (13);
+connection node_1;
+connection node_3;
Killing server ...
connection node_1;
INSERT INTO t1 VALUES (11);
@@ -29,8 +31,11 @@ connection node_4;
INSERT INTO t1 VALUES (14);
connection node_3;
INSERT INTO t1 VALUES (131);
+connection node_1;
connection node_2;
INSERT INTO t1 VALUES (22);
+connection node_1;
+connection node_2;
Killing server ...
connection node_1;
INSERT INTO t1 VALUES (21);
@@ -42,6 +47,8 @@ connection node_2;
INSERT INTO t1 VALUES (221);
connection node_4;
INSERT INTO t1 VALUES (34);
+connection node_1;
+connection node_4;
Killing server ...
connection node_1;
INSERT INTO t1 VALUES (31);
diff --git a/mysql-test/suite/galera/r/mdev-22063.result b/mysql-test/suite/galera/r/mdev-22063.result
new file mode 100644
index 00000000..155d1ebb
--- /dev/null
+++ b/mysql-test/suite/galera/r/mdev-22063.result
@@ -0,0 +1,241 @@
+connection node_2;
+connection node_1;
+# Case 1 CREATE SEQUENCE with no NOCACHE
+CREATE SEQUENCE s ENGINE=InnoDB;
+ERROR 42000: This version of MariaDB doesn't yet support 'CACHE without INCREMENT BY 0 in Galera cluster'
+CREATE SEQUENCE s NOCACHE ENGINE=InnoDB;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+START TRANSACTION;
+REPLACE INTO s VALUES (1,1,9223372036854775806,1,1,1000,0,0);
+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
+SELECT * FROM t1;
+a
+SELECT * FROM s;
+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
+connection node_2;
+SELECT * FROM t1;
+a
+SELECT * FROM s;
+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
+connection node_1;
+DROP TABLE t1;
+DROP SEQUENCE s;
+# Case 2 REPLACE INTO ... SELECT with error
+CREATE TABLE t (id INT KEY,a YEAR,INDEX (id,a)) engine=innodb;
+REPLACE INTO t (id,a)SELECT /*!99997 */ 1;
+ERROR 21S01: Column count doesn't match value count at row 1
+REPLACE INTO t (id,a)SELECT /*!99997 */ 1,2;
+SELECT * FROM t;
+id a
+1 2002
+CREATE TABLE t2 (id INT KEY,a YEAR,INDEX (id,a)) engine=myisam;
+REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1;
+ERROR 21S01: Column count doesn't match value count at row 1
+REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1,2;
+Warnings:
+Warning 138 Galera cluster does support consistency check only for InnoDB tables.
+SELECT * FROM t2;
+id a
+1 2002
+CREATE TABLE t3 (id INT KEY,a YEAR,INDEX (id,a)) engine=aria;
+REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1;
+ERROR 21S01: Column count doesn't match value count at row 1
+REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1,2;
+Warnings:
+Warning 138 Galera cluster does support consistency check only for InnoDB tables.
+SELECT * FROM t3;
+id a
+1 2002
+connection node_2;
+SELECT * FROM t;
+id a
+1 2002
+SELECT * FROM t2;
+id a
+1 2002
+SELECT * FROM t3;
+id a
+1 2002
+connection node_1;
+DROP TABLE t,t2,t3;
+# Bigger REPLACE ... AS SELECT test
+CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
+CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
+INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
+REPLACE INTO t4 SELECT * FROM t1;
+REPLACE INTO t5 SELECT * FROM t2;
+REPLACE INTO t6 SELECT * FROM t3;
+REPLACE INTO t7 SELECT * FROM t2;
+REPLACE INTO t8 SELECT * FROM t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+EXPECT_1000
+1000
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+EXPECT_1000
+1000
+connection node_1;
+DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+# Bigger INSERT INTO ... SELECT test
+CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
+CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
+INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t4 SELECT * FROM t1;
+INSERT INTO t5 SELECT * FROM t2;
+INSERT INTO t6 SELECT * FROM t3;
+INSERT INTO t7 SELECT * FROM t2;
+INSERT INTO t8 SELECT * FROM t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+EXPECT_1000
+1000
+connection node_2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+EXPECT_1000
+1000
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+EXPECT_1000
+1000
+connection node_1;
+DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+CREATE TABLE t1(pk int not null primary key) engine=innodb;
+INSERT INTO t1 values (1),(2),(3),(4);
+CREATE VIEW view_t1 AS SELECT * FROM t1;
+INSERT INTO view_t1 VALUES (5);
+SELECT * FROM t1;
+pk
+1
+2
+3
+4
+5
+DROP TABLE t1;
+DROP VIEW view_t1;
+CREATE TABLE t1(pk int not null primary key) engine=myisam;
+INSERT INTO t1 values (1),(2),(3),(4);
+CREATE VIEW view_t1 AS SELECT * FROM t1;
+INSERT INTO view_t1 VALUES (5);
+SELECT * FROM t1;
+pk
+1
+2
+3
+4
+5
+DROP TABLE t1;
+DROP VIEW view_t1;
+CREATE TABLE t1(pk int not null primary key) engine=aria;
+INSERT INTO t1 values (1),(2),(3),(4);
+CREATE VIEW view_t1 AS SELECT * FROM t1;
+INSERT INTO view_t1 VALUES (5);
+SELECT * FROM t1;
+pk
+1
+2
+3
+4
+5
+DROP TABLE t1;
+DROP VIEW view_t1;
+SET GLOBAL wsrep_mode=DEFAULT;
diff --git a/mysql-test/suite/galera/r/mdev-31285.result b/mysql-test/suite/galera/r/mdev-31285.result
index 228f62fa..58fcb385 100644
--- a/mysql-test/suite/galera/r/mdev-31285.result
+++ b/mysql-test/suite/galera/r/mdev-31285.result
@@ -1,23 +1,8 @@
connection node_2;
connection node_1;
connection node_1;
-connection node_2;
-connection node_1;
CREATE TABLE t ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 1 AS i;
-SHOW CREATE TABLE t;
-Table Create Table
-t CREATE TABLE `t` (
- `i` int(1) NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
-SELECT * from t;
-i
-1
-DROP TABLE IF EXISTS t;
-COMMIT;
+ERROR 42000: This version of MariaDB doesn't yet support 'SYSTEM VERSIONING AS SELECT in Galera cluster'
connection node_2;
-SET SESSION wsrep_sync_wait=0;
-Killing server ...
-Starting server ...
-connection node_2;
-call mtr.add_suppression("WSREP: Event .*Write_rows_v1 apply failed:.*");
-call mtr.add_suppression("SREP: Failed to apply write set: gtid:.*");
+SHOW CREATE TABLE t;
+ERROR 42S02: Table 'test.t' doesn't exist
diff --git a/mysql-test/suite/galera/r/mysql-wsrep#332.result b/mysql-test/suite/galera/r/mysql-wsrep#332.result
index 565979a9..16b07817 100644
--- a/mysql-test/suite/galera/r/mysql-wsrep#332.result
+++ b/mysql-test/suite/galera/r/mysql-wsrep#332.result
@@ -21,14 +21,10 @@ 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
@@ -64,14 +60,10 @@ 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
@@ -112,14 +104,10 @@ 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
diff --git a/mysql-test/suite/galera/r/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.result b/mysql-test/suite/galera/r/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.result
new file mode 100644
index 00000000..76c13fa7
--- /dev/null
+++ b/mysql-test/suite/galera/r/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.result
@@ -0,0 +1,211 @@
+connection node_2;
+connection node_1;
+#
+# MDEV-33355 Add a Galera-2-node-to-MariaDB replication MTR test cloning the slave with mariadb-backup
+#
+connect master, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+connect slave, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+START SLAVE;
+include/wait_for_slave_to_start.inc
+connection master;
+connection slave;
+##############################################################
+### Initial block with some transactions
+### Slave: Make sure replication is not using GTID
+connection slave;
+# Using_Gtid=No
+### Master: Create and populate t1
+connection master;
+CREATE TABLE t1(a TEXT) ENGINE=InnoDB;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#00:stmt#00 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#00:stmt#01 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#00:stmt#02 - slave run#0, before backup');
+COMMIT;
+connection slave;
+##############################################################
+### Run the last transaction before mariadb-backup --backup
+### Remember SHOW MASTER STATUS and @@gtid_binlog_pos
+### before and after the transaction.
+### Master: Rember MASTER STATUS and @@gtid_binlog_pos before tr#01
+connection master;
+### Slave: Remember MASTER STATUS and @@gtid_binlog_pos before tr#01
+connection slave;
+### Master: Run the actual last transaction before the backup
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#01:stmt#00 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#01:stmt#01 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#01:stmt#02 - slave run#0, before backup');
+COMMIT;
+connection slave;
+### Master: Remember MASTER STATUS and @@gtid_binlog_pos after tr#01
+connection master;
+### Slave: Remember MASTER STATUS and @@gtid_binlog_pos after tr#01
+connection slave;
+##############################################################
+### Running `mariadb-backup --backup,--prepare` and checking
+### that xtrabackup_slave_info and xtrabackup_binlog_info are OK
+### Slave: Create a backup
+### Slave: Prepare the backup
+### Slave: xtrabackup files:
+############################ xtrabackup_slave_info
+CHANGE MASTER TO MASTER_LOG_FILE='master_after_tr01_show_master_status_file', MASTER_LOG_POS=master_after_tr01_show_master_status_position;
+############################ xtrabackup_binlog_info
+slave_after_tr01_show_master_status_file slave_after_tr01_show_master_status_position slave_after_tr01_gtid_binlog_pos
+############################
+##############################################################
+### Run more transactions after the backup:
+### - while the slave is still running, then
+### - while the slave is shut down
+### Master: Run another transaction while the slave is still running
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup');
+INSERT INTO t1 VALUES ('tr#02:stmt#01 - slave run#0, after backup');
+INSERT INTO t1 VALUES ('tr#02:stmt@02 - slave run#0, after backup');
+COMMIT;
+connection slave;
+### Master: Remember MASTER STATUS and @@gtid_binlog_pos after tr#02
+connection master;
+### Slave: Remember MASTER STATUS and @@gtid_binlog_pos after tr#02
+connection slave;
+### Master: Checking SHOW BINLOG EVENTS
+connection master;
+SHOW BINLOG EVENTS IN 'master_after_tr01_show_master_status_file' FROM master_after_tr01_show_master_status_position LIMIT 0,1;
+Log_name master_after_tr01_show_master_status_file
+Pos master_after_tr01_show_master_status_position
+Event_type Gtid
+Server_id #
+End_log_pos #
+Info BEGIN GTID master_after_tr02_gtid_binlog_pos
+SHOW BINLOG EVENTS IN 'master_after_tr01_show_master_status_file' FROM master_after_tr01_show_master_status_position LIMIT 1,1;
+Log_name master_after_tr01_show_master_status_file
+Pos #
+Event_type Query_or_Annotate_rows
+Server_id #
+End_log_pos #
+Info INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup')
+### Slave: Checking SHOW BINLOG EVENTS
+connection slave;
+SHOW BINLOG EVENTS IN 'slave_after_tr01_show_master_status_file' FROM slave_after_tr01_show_master_status_position LIMIT 0,1;
+Log_name slave_after_tr01_show_master_status_file
+Pos #
+Event_type Gtid
+Server_id 1
+End_log_pos #
+Info BEGIN GTID slave_after_tr02_gtid_binlog_pos
+SHOW BINLOG EVENTS IN 'slave_after_tr01_show_master_status_file' FROM slave_after_tr01_show_master_status_position LIMIT 1,1;
+Log_name slave_after_tr01_show_master_status_file
+Pos #
+Event_type Query_or_Annotate_rows
+Server_id #
+End_log_pos #
+Info INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup')
+### Slave: Stop replication
+connection slave;
+STOP SLAVE;
+include/wait_for_slave_to_stop.inc
+RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
+### Slave: Shutdown the server
+connection slave;
+### Master: Run a transaction while the slave is shut down
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#03:stmt#00 - after slave run#0, slave is shut down, after backup');
+INSERT INTO t1 VALUES ('tr#03:stmt#01 - after slave run#0, slave is shut down, after backup');
+INSERT INTO t1 VALUES ('tr#03:stmt#02 - after slave run#0, slave is shut down, after backup');
+COMMIT;
+##############################################################
+### Emulate starting a new virgin slave
+### Slave: Remove the data directory
+### Slave: Copy back the backup
+### Slave: Restart the server
+connection slave;
+# restart
+### Slave: Display the restored data before START SLAVE
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a
+tr#00:stmt#00 - slave run#0, before backup
+tr#00:stmt#01 - slave run#0, before backup
+tr#00:stmt#02 - slave run#0, before backup
+tr#01:stmt#00 - slave run#0, before backup
+tr#01:stmt#01 - slave run#0, before backup
+tr#01:stmt#02 - slave run#0, before backup
+### Slave: Execute the CHANGE MASTER statement to set up the host and port
+CHANGE MASTER '' TO MASTER_USER='root', MASTER_HOST='127.0.0.1', MASTER_PORT=###, MASTER_CONNECT_RETRY=1;
+### Slave: Execute the CHANGE MASTER statement from xtrabackup_slave_info
+CHANGE MASTER TO MASTER_LOG_FILE='master_after_tr01_show_master_status_file', MASTER_LOG_POS=master_after_tr01_show_master_status_position;
+Warnings:
+Note 4190 CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'Slave_Pos' to 'No'
+### Slave: Execute START SLAVE
+include/start_slave.inc
+### Master: Wait for the slave to apply all master events
+connection master;
+connection slave;
+### Slave: Make sure replication is not using GTID after the slave restart
+connection slave;
+# Using_Gtid=No
+### Slave: Display the restored data after START SLAVE
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a
+tr#00:stmt#00 - slave run#0, before backup
+tr#00:stmt#01 - slave run#0, before backup
+tr#00:stmt#02 - slave run#0, before backup
+tr#01:stmt#00 - slave run#0, before backup
+tr#01:stmt#01 - slave run#0, before backup
+tr#01:stmt#02 - slave run#0, before backup
+tr#02:stmt#00 - slave run#0, after backup
+tr#02:stmt#01 - slave run#0, after backup
+tr#02:stmt@02 - slave run#0, after backup
+tr#03:stmt#00 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#01 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#02 - after slave run#0, slave is shut down, after backup
+##############################################################
+### Continue master transactions, check the new slave replicates well.
+### Master: Run a transaction after restarting replication
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#04:stmt#00 - slave run#1');
+INSERT INTO t1 VALUES ('tr#04:stmt#01 - slave run#1');
+INSERT INTO t1 VALUES ('tr#04:stmt#02 - slave run#1');
+COMMIT;
+connection slave;
+### Slave: Display the restored data + new transactions
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a
+tr#00:stmt#00 - slave run#0, before backup
+tr#00:stmt#01 - slave run#0, before backup
+tr#00:stmt#02 - slave run#0, before backup
+tr#01:stmt#00 - slave run#0, before backup
+tr#01:stmt#01 - slave run#0, before backup
+tr#01:stmt#02 - slave run#0, before backup
+tr#02:stmt#00 - slave run#0, after backup
+tr#02:stmt#01 - slave run#0, after backup
+tr#02:stmt@02 - slave run#0, after backup
+tr#03:stmt#00 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#01 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#02 - after slave run#0, slave is shut down, after backup
+tr#04:stmt#00 - slave run#1
+tr#04:stmt#01 - slave run#1
+tr#04:stmt#02 - slave run#1
+##############################################################
+### Cleanup
+### Removing the backup directory
+connection master;
+DROP TABLE t1;
+connection slave;
+STOP SLAVE;
+include/wait_for_slave_to_stop.inc
+RESET SLAVE ALL;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
+connection master;
+set global wsrep_on=OFF;
+RESET MASTER;
+set global wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result
index df92d088..c28662dc 100644
--- a/mysql-test/suite/galera/r/versioning_trx_id.result
+++ b/mysql-test/suite/galera/r/versioning_trx_id.result
@@ -17,7 +17,7 @@ a
select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0';
count(*)
0
-select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
+select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp;
count(*)
0
connection node_3;
@@ -34,7 +34,7 @@ a
select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0';
count(*)
0
-select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
+select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp;
count(*)
0
connection node_1;
@@ -50,7 +50,7 @@ a
select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0';
count(*)
0
-select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp;
+select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp;
count(*)
0
drop table t1;
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index f6caecdc..4c4d26db 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -1,5 +1,6 @@
package My::Suite::Galera;
+use warnings;
use lib 'suite';
use wsrep::common;
@@ -63,6 +64,7 @@ push @::global_suppressions,
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: Send action \{.* STATE_REQUEST} returned -107 \(Transport endpoint is not connected\)|,
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|,
qr|WSREP: Failed to report last committed|,
diff --git a/mysql-test/suite/galera/t/MDEV-22232.test b/mysql-test/suite/galera/t/MDEV-22232.test
index dbd9ed1e..087d6417 100644
--- a/mysql-test/suite/galera/t/MDEV-22232.test
+++ b/mysql-test/suite/galera/t/MDEV-22232.test
@@ -18,19 +18,16 @@
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
# Run CTAS until the resulting table gets created,
-# then it gets BF aborted by ALTER.
-SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
+# then it gets BF aborted by other DDL.
+SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
--send
CREATE TABLE t2 SELECT * FROM t1;
# Wait for CTAS to reach the table create point,
-# start executing ALTER and BF abort CTAS.
+# start executing other DDL and BF abort CTAS.
--connection node_1
-SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
---disable_result_log
---error ER_CANT_DROP_FIELD_OR_KEY
-ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
---enable_result_log
+SET DEBUG_SYNC = 'now WAIT_FOR may_run';
+TRUNCATE TABLE t1;
--connection con1
# CTAS gets BF aborted.
@@ -46,19 +43,16 @@ SET DEBUG_SYNC = 'RESET';
INSERT INTO t1 VALUES (10), (20), (30);
# Run CTAS until the resulting table gets created,
-# then it gets BF aborted by ALTER.
-SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_alter WAIT_FOR bf_abort';
+# then it gets BF aborted by other DDL.
+SET DEBUG_SYNC = 'create_table_select_before_create SIGNAL may_run WAIT_FOR bf_abort';
--send
CREATE TABLE t2 SELECT * FROM t1;
# Wait for CTAS to reach the table create point,
-# start executing ALTER and BF abort CTAS.
+# start executing other DDL and BF abort CTAS.
--connection node_1
-SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
---disable_result_log
---error ER_ERROR_ON_RENAME
-ALTER TABLE t1 DROP FOREIGN KEY b, ALGORITHM=COPY;
---enable_result_log
+SET DEBUG_SYNC = 'now WAIT_FOR may_run';
+TRUNCATE TABLE t1;
--connection con1
# CTAS gets BF aborted.
diff --git a/mysql-test/suite/galera/t/MDEV-24143.test b/mysql-test/suite/galera/t/MDEV-24143.test
index e58f147c..3aecac8c 100644
--- a/mysql-test/suite/galera/t/MDEV-24143.test
+++ b/mysql-test/suite/galera/t/MDEV-24143.test
@@ -11,7 +11,11 @@ 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
+#
+# This is because support for CREATE TABLE ENGINE=SEQUENCE
+# is done before we check does table exists already.
+#
+--error ER_NOT_SUPPORTED_YET
CREATE TABLE t1 (pk INT PRIMARY KEY, b INT) ENGINE=SEQUENCE;
--error ER_CANT_DROP_FIELD_OR_KEY
ALTER TABLE t1 DROP COLUMN c2;
diff --git a/mysql-test/suite/galera/t/MDEV-25731.test b/mysql-test/suite/galera/t/MDEV-25731.test
new file mode 100644
index 00000000..893cccbb
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-25731.test
@@ -0,0 +1,34 @@
+--source include/galera_cluster.inc
+--source include/have_aria.inc
+
+--connection node_1
+SET GLOBAL wsrep_load_data_splitting=ON;
+SET GLOBAL wsrep_mode=REPLICATE_MYISAM;
+CREATE TABLE t1 (c1 int) ENGINE=MYISAM;
+LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
+SELECT COUNT(*) AS EXPECT_6 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_6 FROM t1;
+
+--connection node_1
+ALTER TABLE t1 ENGINE=Aria;
+SET GLOBAL wsrep_mode=REPLICATE_ARIA;
+LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
+SELECT COUNT(*) AS EXPECT_12 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_12 FROM t1;
+
+--connection node_1
+ALTER TABLE t1 ENGINE=InnoDB;
+LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n';
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+
+--connection node_2
+SELECT COUNT(*) AS EXPECT_18 FROM t1;
+
+--connection node_1
+DROP TABLE t1;
+SET GLOBAL wsrep_load_data_splitting=OFF;
+SET GLOBAL wsrep_mode=DEFAULT;
diff --git a/mysql-test/suite/galera/t/MDEV-26499.test b/mysql-test/suite/galera/t/MDEV-26499.test
new file mode 100644
index 00000000..824b28c1
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-26499.test
@@ -0,0 +1,20 @@
+#
+# MDEV-26499
+#
+# This test reproduces some failure on mysql_shutdown() call
+# which manifests sporadically in some galera MTR tests during
+# restart of a node.
+#
+
+--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
+
+--connection node_2
+SET GLOBAL debug_dbug="+d,simulate_slow_client_at_shutdown";
+--source include/restart_mysqld.inc
+
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/MDEV-26597.test b/mysql-test/suite/galera/t/MDEV-26597.test
index 783a52ca..465f1130 100644
--- a/mysql-test/suite/galera/t/MDEV-26597.test
+++ b/mysql-test/suite/galera/t/MDEV-26597.test
@@ -18,7 +18,7 @@ SHOW WARNINGS;
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
---let $start_mysqld_params = ""
+--let $start_mysqld_params =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/galera/t/MDEV-27276.test b/mysql-test/suite/galera/t/MDEV-27276.test
index 1c589c9e..bdce0d91 100644
--- a/mysql-test/suite/galera/t/MDEV-27276.test
+++ b/mysql-test/suite/galera/t/MDEV-27276.test
@@ -17,7 +17,7 @@
# 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
+# Open connection node_1a here, we will use it later
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
# create FK parent table
@@ -28,14 +28,51 @@ CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
--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
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+--eval $mw_369_parent_query
+
+#
+# Block the $mw_369_child_query from node_2
+#
+# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# insert client row, which will make it impossible to replay the
+# delete on parent
+#
+--connection node_2
+--eval $mw_369_child_query
+
+#
+# Wait until $mw_369_child_query from node_2 reaches the sync point and
+# block the 'COMMIT' from node_1 before it certifies.
+#
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_1
+--send COMMIT
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
# Expect certification failure
--connection node_1
--error ER_LOCK_DEADLOCK
--reap
+--connection node_1a
+SET SESSION DEBUG_SYNC = "RESET";
+
--connection node_2
SELECT * FROM p;
SELECT * FROM c;
diff --git a/mysql-test/suite/galera/t/MDEV-29142.test b/mysql-test/suite/galera/t/MDEV-29142.test
index 7e9776b0..f7a8b329 100644
--- a/mysql-test/suite/galera/t/MDEV-29142.test
+++ b/mysql-test/suite/galera/t/MDEV-29142.test
@@ -50,12 +50,12 @@ 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 $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 $start_mysqld_params =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/galera/t/MDEV-33136.test b/mysql-test/suite/galera/t/MDEV-33136.test
new file mode 100644
index 00000000..12765ef6
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-33136.test
@@ -0,0 +1,44 @@
+#
+# MDEV-33136: Properly BF-abort user transactions with explicit locks
+#
+# User transactions may acquire explicit MDL locks from InnoDB level
+# when persistent statistics is re-read for a table.
+# If such a transaction would be subject to BF-abort, it was improperly
+# detected as a system transaction and wouldn't get aborted.
+#
+# The fix: Check if a transaction holding explicit MDL locks is a user
+# transaction in the MDL conflict handling code.
+
+--source include/galera_cluster.inc
+--source include/have_debug_sync.inc
+--source include/have_debug.inc
+
+--connect node_1a,127.0.0.1,root,,test,$NODE_MYPORT_1
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
+
+--connection node_1a
+TRUNCATE TABLE t1;
+# TRUNCATE forces the next statement to re-read statistics from persistent storage,
+# which will acquire MDL locks on the statistics tables in InnoDB.
+SET SESSION wsrep_retry_autocommit = 0;
+SET DEBUG_SYNC = 'dict_stats_mdl_acquired SIGNAL may_toi WAIT_FOR bf_abort';
+--send
+ INSERT INTO t1 VALUES (1);
+
+--connection node_1
+SET DEBUG_SYNC = 'now WAIT_FOR may_toi';
+TRUNCATE TABLE t1;
+
+--connection node_1a
+# Local INSERT gets aborted.
+--error ER_LOCK_DEADLOCK
+--reap
+
+# Cleanup
+--connection node_1
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1;
+--disconnect node_1a
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/MDEV-33828.cnf b/mysql-test/suite/galera/t/MDEV-33828.cnf
new file mode 100644
index 00000000..4c62448f
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-33828.cnf
@@ -0,0 +1,4 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin
diff --git a/mysql-test/suite/galera/t/MDEV-33828.test b/mysql-test/suite/galera/t/MDEV-33828.test
new file mode 100644
index 00000000..8e30481b
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-33828.test
@@ -0,0 +1,45 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_aria.inc
+
+SET AUTOCOMMIT=ON;
+SELECT @@autocommit;
+
+SET LOCAL enforce_storage_engine=InnoDB;
+
+CREATE TABLE t1(id int not null primary key auto_increment, name varchar(64)) ENGINE=InnoDB;
+INSERT INTO t1(name) VALUES ('name1'),('name3'),('name6'),('name2');
+
+DELIMITER |;
+CREATE PROCEDURE sel_proc()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+ SELECT * FROM t1;
+END|
+
+CREATE PROCEDURE ins_proc()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
+ INSERT INTO t1 VALUES ('name_proc');
+END|
+DELIMITER ;|
+
+SET AUTOCOMMIT=OFF;
+SELECT @@autocommit;
+
+START TRANSACTION;
+
+insert into t1(name) values('name10');
+
+select param_list, returns, db, type from mysql.proc where name='sel_proc';
+
+call ins_proc();
+
+COMMIT;
+
+SET AUTOCOMMIT=ON;
+
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP PROCEDURE sel_proc;
+DROP PROCEDURE ins_proc;
diff --git a/mysql-test/suite/galera/t/MW-336.cnf b/mysql-test/suite/galera/t/MW-336.cnf
index e68f8917..da97be5f 100644
--- a/mysql-test/suite/galera/t/MW-336.cnf
+++ b/mysql-test/suite/galera/t/MW-336.cnf
@@ -2,6 +2,8 @@
[mysqld.1]
wsrep-debug=SERVER
+loose-wsrep-mw-336=1
[mysqld.2]
wsrep-debug=SERVER
+loose-wsrep-mw-336=2
diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test
index 83943c7d..29a70978 100644
--- a/mysql-test/suite/galera/t/MW-336.test
+++ b/mysql-test/suite/galera/t/MW-336.test
@@ -3,11 +3,12 @@
#
--source include/galera_cluster.inc
---source include/have_innodb.inc
--source include/force_restart.inc
+--source include/have_sequence.inc
--connection node_1
-CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+SET @wsrep_slave_threads_orig = @@wsrep_slave_threads;
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
@@ -22,7 +23,7 @@ SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE V
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
-INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (NULL);
--connection node_1
--echo # Wait until one of the appliers has exited
@@ -54,27 +55,19 @@ SELECT VARIABLE_VALUE AS EXPECT_20 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE V
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
-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);
-INSERT INTO t1 VALUES (8);
-INSERT INTO t1 VALUES (9);
-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);
-INSERT INTO t1 VALUES (16);
-INSERT INTO t1 VALUES (17);
-INSERT INTO t1 VALUES (18);
-INSERT INTO t1 VALUES (19);
-INSERT INTO t1 VALUES (20);
+--disable_query_log
+let $c = 50;
+while ($c) {
+INSERT INTO t1 VALUES(NULL); COMMIT;
+dec $c;
+}
+--enable_query_log
--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 51 FROM t1;
+--let $wait_condition_on_error_output = SELECT COUNT(*) FROM t1;
+--source include/wait_condition_with_debug.inc
+
--echo # Wait until 19 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
@@ -82,7 +75,7 @@ INSERT INTO t1 VALUES (20);
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) AS EXPECT_51 FROM t1;
SET GLOBAL wsrep_slave_threads = 10;
--echo # Set slave threads to 10 step 3
@@ -96,16 +89,13 @@ SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE V
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
-INSERT INTO t1 VALUES (21);
-INSERT INTO t1 VALUES (22);
-INSERT INTO t1 VALUES (23);
-INSERT INTO t1 VALUES (24);
-INSERT INTO t1 VALUES (25);
-INSERT INTO t1 VALUES (26);
-INSERT INTO t1 VALUES (27);
-INSERT INTO t1 VALUES (28);
-INSERT INTO t1 VALUES (29);
-INSERT INTO t1 VALUES (30);
+--disable_query_log
+let $c = 50;
+while ($c) {
+INSERT INTO t1 VALUES(NULL); COMMIT;
+dec $c;
+}
+--enable_query_log
--connection node_1
--echo # Wait until slave threads back to 1
@@ -115,6 +105,10 @@ INSERT INTO t1 VALUES (30);
SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
-SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) AS EXPECT_101 FROM t1;
DROP TABLE t1;
+
+--disable_query_log
+SET GLOBAL wsrep_slave_threads = @wsrep_slave_threads_orig;
+--enable_query_log
diff --git a/mysql-test/suite/galera/t/MW-369.inc b/mysql-test/suite/galera/t/MW-369.inc
index 71df979d..f080d99f 100644
--- a/mysql-test/suite/galera/t/MW-369.inc
+++ b/mysql-test/suite/galera/t/MW-369.inc
@@ -12,9 +12,9 @@
# START TRANSACTION;
# $mw_369_parent_query
# node_2
-# $mw_369_child_query - will be blocked on node_1 in apply monitor
+# $mw_369_child_query - will be blocked on node_1 in wsrep_apply_cb
# node_1:
-# COMMIT; - will be blocked on node_1 in local monitor
+# COMMIT; - will be blocked on node_1 in wsrep_after_certification
#
# The $mw_369_child_query is always expected to succeed. The caller is
# responsible for checking if the final COMMIT on connection node_1
@@ -32,8 +32,7 @@ START TRANSACTION;
# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET SESSION wsrep_sync_wait = 0;
---let $galera_sync_point = apply_monitor_slave_enter_sync
---source include/galera_set_sync_point.inc
+SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
#
# insert client row, which will make it impossible to replay the
@@ -47,28 +46,37 @@ SET SESSION wsrep_sync_wait = 0;
# block the 'COMMIT' from node_1 before it certifies.
#
--connection node_1a
---source include/galera_wait_sync_point.inc
---source include/galera_clear_sync_point.inc
-
---let $galera_sync_point = local_monitor_master_enter_sync
---source include/galera_set_sync_point.inc
+SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
--connection node_1
+SET DEBUG_SYNC = "wsrep_after_certification SIGNAL after_certification_reached WAIT_FOR continue_after_certification";
--send COMMIT
#
# Wait until both sync points have been reached
#
--connection node_1a
---let $galera_sync_point = apply_monitor_slave_enter_sync local_monitor_master_enter_sync
---source include/galera_wait_sync_point.inc
+SET SESSION DEBUG_SYNC = "now WAIT_FOR after_certification_reached";
#
# both threads are now parked in sync points, signal them to continue
#
---let $galera_sync_point = apply_monitor_slave_enter_sync
---source include/galera_signal_sync_point.inc
---let $galera_sync_point = local_monitor_master_enter_sync
---source include/galera_signal_sync_point.inc
---source include/galera_clear_sync_point.inc
+--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%'
+--let $wait_condition_on_error_output = SELECT STATE FROM INFORMATION_SCHEMA.PROCESSLIST
+--source include/wait_condition_with_debug.inc
+
+SET DEBUG_SYNC = 'now SIGNAL continue_after_certification';
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%'
+--let $wait_condition_on_error_output = SELECT STATE FROM INFORMATION_SCHEMA.PROCESSLIST
+--source include/wait_condition_with_debug.inc
+
+SET DEBUG_SYNC = 'now SIGNAL signal.wsrep_apply_cb';
+
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'debug sync point:%'
+--let $wait_condition_on_error_output = SELECT STATE FROM INFORMATION_SCHEMA.PROCESSLIST
+--source include/wait_condition_with_debug.inc
+
+SET GLOBAL DEBUG_DBUG = "";
+SET DEBUG_SYNC = 'RESET';
diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test
index c8f8c974..0efac20d 100644
--- a/mysql-test/suite/galera/t/MW-369.test
+++ b/mysql-test/suite/galera/t/MW-369.test
@@ -24,7 +24,6 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/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,
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_mariabackup.test b/mysql-test/suite/galera/t/galera_bf_abort_mariabackup.test
index 34c3f5d3..ed16ac39 100644
--- a/mysql-test/suite/galera/t/galera_bf_abort_mariabackup.test
+++ b/mysql-test/suite/galera/t/galera_bf_abort_mariabackup.test
@@ -13,7 +13,7 @@
CREATE TABLE t(i INT NOT NULL PRIMARY KEY) ENGINE INNODB;
INSERT INTO t VALUES(1);
#
-# In default settings donor should desync
+# In default settings donor should not desync
#
--echo # Restart node_2, force SST.
--connection node_2
@@ -37,7 +37,7 @@ let $restart_noprint=2;
--connection node_1
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
---echo # Both should return FOUND 2 as we have bootstrap and SST
+--echo # Both should return NOT FOUND as we have mariabackup with backup locks
let SEARCH_PATTERN = Desyncing and pausing the provider;
--source include/search_pattern_in_file.inc
let SEARCH_PATTERN = Resuming and resyncing the provider;
@@ -76,7 +76,7 @@ let $restart_noprint=2;
--connection node_1
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
---echo # Both should return FOUND 3 as we have 1 new SST
+--echo # Both should return NOT FOUND as we have mariabackup with backup locks
let SEARCH_PATTERN = Desyncing and pausing the provider;
--source include/search_pattern_in_file.inc
let SEARCH_PATTERN = Resuming and resyncing the provider;
@@ -117,13 +117,16 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup2;
--enable_result_log
let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.2.err;
---echo # Both should return FOUND 1 as node should not desync
+--echo # Both should return FOUND 2 because both backups do desync but on different points
let SEARCH_PATTERN = Desyncing and pausing the provider;
--source include/search_pattern_in_file.inc
let SEARCH_PATTERN = Resuming and resyncing the provider;
--source include/search_pattern_in_file.inc
---echo # Should return FOUND 1 because only last backup does not desync
-let SEARCH_PATTERN = Server not desynched from group because WSREP_MODE_BF_MARIABACKUP used.;
+--echo # Should return FOUND 1 as server did not desync at BLOCK_DDL
+let SEARCH_PATTERN = Server not desynched from group at BLOCK_DDL because WSREP_MODE_BF_MARIABACKUP is used.;
+--source include/search_pattern_in_file.inc
+--echo # Should return FOUND 1 as server did desync and pause at BLOCK_COMMIT
+let SEARCH_PATTERN = Server desynched from group during BACKUP STAGE BLOCK_COMMIT.;
--source include/search_pattern_in_file.inc
SET GLOBAL wsrep_mode = "";
diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf
index f2187b83..ffd2306b 100644
--- a/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf
+++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf
@@ -10,9 +10,11 @@ ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
+innodb-log-file-buffering
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
+innodb-log-file-buffering
[sst]
ssl-mode=VERIFY_CA
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 b36a0de5..940b511f 100644
--- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
+++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
@@ -37,7 +37,7 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
diff --git a/mysql-test/suite/galera/t/galera_load_data.test b/mysql-test/suite/galera/t/galera_load_data.test
index c37920a4..252580f9 100644
--- a/mysql-test/suite/galera/t/galera_load_data.test
+++ b/mysql-test/suite/galera/t/galera_load_data.test
@@ -30,8 +30,308 @@ CREATE TABLE cardtest_tbl (
LOCK TABLES cardtest_tbl WRITE;
ALTER TABLE cardtest_tbl DISABLE KEYS;
-INSERT INTO cardtest_tbl VALUES (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),(301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL);
-
+INSERT INTO cardtest_tbl VALUES
+ (1,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (2,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (3,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (4,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (5,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (6,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (7,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (8,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (9,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (10,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (11,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (12,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (13,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (14,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (15,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (16,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (17,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (18,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (19,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (20,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (21,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (22,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (23,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (24,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (25,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (26,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (27,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (28,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (29,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (30,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (31,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (32,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (33,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (34,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (35,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (36,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (37,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (38,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (39,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (40,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (41,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (42,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (43,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (44,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (45,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (46,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (47,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (48,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (49,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (50,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (51,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (52,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (53,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (54,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (55,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (56,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (57,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (58,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (59,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (60,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (61,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (62,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (63,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (64,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (65,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (66,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (67,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (68,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (69,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (70,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (71,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (72,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (73,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (74,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (75,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (76,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (77,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (78,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (79,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (80,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (81,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (82,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (83,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (84,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (85,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (86,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (87,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (88,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (89,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (90,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (91,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (92,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (93,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (94,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (95,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (96,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (97,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (98,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (99,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (100,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (101,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (102,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (103,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (104,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (105,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (106,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (107,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (108,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (109,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (110,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (111,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (112,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (113,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (114,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (115,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (116,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (117,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (118,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (119,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (120,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (121,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (122,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (123,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (124,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (125,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (126,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (127,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (128,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (129,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (130,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (131,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (132,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (133,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (134,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (135,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (136,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (137,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (138,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (139,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (140,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (141,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (142,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (143,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (144,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (145,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (146,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (147,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (148,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (149,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (150,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (151,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (152,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (153,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (154,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (155,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (156,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (157,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (158,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (159,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (160,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (161,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (162,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (163,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (164,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (165,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (166,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (167,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (168,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (169,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (170,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (171,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (172,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (173,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (174,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (175,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (176,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (177,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (178,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (179,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (180,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (181,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (182,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (183,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (184,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (185,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (186,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (187,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (188,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (189,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (190,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (191,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (192,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (193,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (194,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (195,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (196,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (197,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (198,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (199,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (200,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (201,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (202,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (203,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (204,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (205,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (206,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (207,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (208,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (209,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (210,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (211,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (212,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (213,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (214,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (215,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (216,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (217,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (218,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (219,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (220,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (221,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (222,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (223,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (224,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (225,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (226,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (227,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (228,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (229,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (230,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (231,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (232,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (233,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (234,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (235,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (236,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (237,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (238,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (239,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (240,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (241,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (242,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (243,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (244,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (245,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (246,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (247,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (248,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (249,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (250,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (251,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (252,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (253,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (254,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (255,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (256,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (257,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (258,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (259,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (260,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (261,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (262,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (263,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (264,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (265,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (266,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (267,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (268,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (269,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (270,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (271,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (272,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (273,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (274,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (275,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (276,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (277,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (278,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (279,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (280,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (281,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (282,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (283,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (284,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (285,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (286,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (287,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (288,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (289,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (290,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (291,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (292,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (293,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (294,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (295,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (296,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (297,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (298,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (299,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (300,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL),
+ (301,1,'','',1,1466430455,1471454450,NULL,10.00000,1,NULL,'','',NULL,NULL,1,NULL,NULL);
ALTER TABLE cardtest_tbl ENABLE KEYS;
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/galera_mdl_race.test b/mysql-test/suite/galera/t/galera_mdl_race.test
index ad6770f9..3341a379 100644
--- a/mysql-test/suite/galera/t/galera_mdl_race.test
+++ b/mysql-test/suite/galera/t/galera_mdl_race.test
@@ -3,70 +3,92 @@
#
--source include/galera_cluster.inc
+--source include/have_debug.inc
--source include/have_debug_sync.inc
+--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');
INSERT INTO t1 VALUES (2, 'a');
---connection node_1
SET AUTOCOMMIT=ON;
START TRANSACTION;
-
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
# block access to t2
--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.TABLES WHERE TABLE_NAME = 't2'
+--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.TABLES
+--source include/wait_condition_with_debug.inc
LOCK TABLE t2 WRITE;
-# Block before MLD lock wait
+# Block before MDL lock wait
--connection node_1
- SET @@debug_dbug = "d,sync.wsrep_before_mdl_wait";
+SET DEBUG_SYNC= 'wsrep_before_mdl_wait SIGNAL before_mdl_wait WAIT_FOR mdl_wait_continue';
--send SELECT * FROM t2;
-# Wait for SELECT to be blocked
--connection node_1a
-#--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIS WHERE STATE = 'System lock';
-#--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
+--echo # Wait until select is blocked before MDL lock wait
+SET DEBUG_SYNC= 'now WAIT_FOR before_mdl_wait';
# block applier to wait after BF victim is locked
+--connection node_1a
SET @@debug_dbug = "d,sync.wsrep_after_BF_victim_lock";
# Issue a conflicting update on node #2
--connection node_2
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET SESSION wsrep_sync_wait=0;
+--echo # Wait for conflicting update to block
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event:%';
+--source include/wait_condition.inc
+
# Unblock the SELECT, to enter wsrep_thd_is_BF
---connection node_1a
-SET @@debug_dbug = "";
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
+SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
+
+--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1c
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event:%';
+--source include/wait_condition.inc
+--connection node_1a
# unblock applier to try to BF the SELECT
-SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
+SET DEBUG_SYNC = "now SIGNAL BF_victim_continue";
# table lock is not needed anymore
UNLOCK TABLES;
-# SELECT succeeds
+# SELECT returns deadlock
--connection node_1
-
--error ER_LOCK_DEADLOCK
--reap
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+--connection node_1
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
+SELECT * FROM t1;
--connection node_2
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
-SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'a';
+SELECT COUNT(*) AS EXPECT_1 FROM t1 WHERE f2 = 'c';
+SELECT * FROM t1;
DROP TABLE t1;
DROP TABLE t2;
--connection node_1a
SET DEBUG_SYNC = "RESET";
+--connection node_1b
+SET DEBUG_SYNC = "RESET";
+
+--connection node_1
+--disconnect node_1a
+--disconnect node_1b
+--disconnect node_1c
diff --git a/mysql-test/suite/galera/t/galera_myisam_autocommit.test b/mysql-test/suite/galera/t/galera_myisam_autocommit.test
index 3452a06a..0612aabb 100644
--- a/mysql-test/suite/galera/t/galera_myisam_autocommit.test
+++ b/mysql-test/suite/galera/t/galera_myisam_autocommit.test
@@ -2,22 +2,24 @@
--source include/have_innodb.inc
#
-# This tests simple autocommit replication of MyISAM tables. No updates arrive on the slave.
+# This tests simple autocommit replication of MyISAM tables.
#
-# Without a PK
-
SET GLOBAL wsrep_mode=REPLICATE_MYISAM;
+# Without a PK
+
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2), (3);
+# This is TOI
INSERT INTO t1 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1);
INSERT INTO t2 VALUES (2), (3);
+# This is TOI
INSERT INTO t2 SELECT 4 FROM DUAL UNION ALL SELECT 5 FROM DUAL;
# Error
@@ -34,16 +36,26 @@ UPDATE t2 SET f1 = 9 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 9;
DELETE FROM t2 WHERE f1 = 9;
+SELECT * FROM t1 ORDER BY f1;
+SELECT * FROM t2 ORDER BY f1;
+
+--connection node_2
+SELECT * FROM t1 ORDER BY f1;
+SELECT * FROM t2 ORDER BY f1;
+
# TRUNCATE
TRUNCATE TABLE t1;
-TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+
+SELECT * FROM t1 ORDER BY f1;
+SELECT * FROM t2 ORDER BY f1;
--connection node_2
-SELECT COUNT(*) = 0 FROM t1;
-SELECT COUNT(*) = 0 FROM t2;
+SELECT * FROM t1 ORDER BY f1;
+SELECT * FROM t2 ORDER BY f1;
--connection node_1
+SET GLOBAL wsrep_mode=DEFAULT;
DROP TABLE t1;
DROP TABLE t2;
-SET GLOBAL wsrep_mode=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 2e9f05cb..b49253ef 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,7 +32,7 @@ INSERT INTO t2 VALUES (1);
--connection node_2a
--sleep 1
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committing%' or STATE = 'Waiting for certification');
+SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE 'Commit' or STATE = 'Waiting for certification');
SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
SELECT COUNT(*) AS EXPECT_0 FROM t1;
SELECT COUNT(*) AS EXPECT_0 FROM t2;
diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test
index d49dc0ae..89adaf8c 100644
--- a/mysql-test/suite/galera/t/galera_parallel_simple.test
+++ b/mysql-test/suite/galera/t/galera_parallel_simple.test
@@ -51,7 +51,7 @@ 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 'committing%';
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Commit';
--source include/wait_condition.inc
UNLOCK TABLES;
diff --git a/mysql-test/suite/galera/t/galera_pc_recovery.test b/mysql-test/suite/galera/t/galera_pc_recovery.test
index 1621414a..16abe6fc 100644
--- a/mysql-test/suite/galera/t/galera_pc_recovery.test
+++ b/mysql-test/suite/galera/t/galera_pc_recovery.test
@@ -27,8 +27,8 @@ INSERT INTO t1 VALUES (1);
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
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line 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
@@ -66,8 +66,8 @@ if ($galera_wsrep_start_position2 == '') {
# 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
+--write_line "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
+--write_line "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
diff --git a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
index 6a0f24db..e3a8b749 100644
--- a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
+++ b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test
@@ -62,7 +62,7 @@ SELECT * FROM t1;
--let $start_mysqld_params=--galera-unknown-option
--echo Starting server ...
---exec echo "try:$start_mysqld_params" > $_expect_file_name
+--write_line "try:$start_mysqld_params" $_expect_file_name
# Sleep to ensure that server exited...
@@ -107,7 +107,7 @@ SELECT * FROM t1;
--let $start_mysqld_params=--galera-unknown-option
--echo Starting server ...
---exec echo "try:$start_mysqld_params" > $_expect_file_name
+--write_line "try:$start_mysqld_params" $_expect_file_name
# Sleep to ensure that server exited...
diff --git a/mysql-test/suite/galera/t/galera_sequence_engine.test b/mysql-test/suite/galera/t/galera_sequence_engine.test
new file mode 100644
index 00000000..47107dcc
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_sequence_engine.test
@@ -0,0 +1,16 @@
+--source include/galera_cluster.inc
+--source include/have_sequence.inc
+
+SET GLOBAL wsrep_ignore_apply_errors=0;
+SET SESSION AUTOCOMMIT=0;
+SET SESSION max_error_count=0;
+--error ER_NOT_SUPPORTED_YET
+CREATE TABLE t0 (id GEOMETRY,parent_id GEOMETRY)ENGINE=SEQUENCE;
+
+--connection node_2
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE t0;
+
+--connection node_1
+SET GLOBAL wsrep_ignore_apply_errors=DEFAULT;
+
diff --git a/mysql-test/suite/galera/t/galera_shutdown_nonprim.test b/mysql-test/suite/galera/t/galera_shutdown_nonprim.test
index cf7018cd..d1a1c914 100644
--- a/mysql-test/suite/galera/t/galera_shutdown_nonprim.test
+++ b/mysql-test/suite/galera/t/galera_shutdown_nonprim.test
@@ -16,21 +16,27 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=2';
--connection node_2
# Isolate node_2 from the group and wait until wsrep_ready becomes OFF.
-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'
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 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
+--connection node_2
+--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_status';
# Verify that graceful shutdown succeeds.
--source include/shutdown_mysqld.inc
---source include/start_mysqld.inc
---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/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
# Restore original settings.
SET GLOBAL wsrep_provider_options = 'pc.weight = 1';
+
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf b/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
index 857a4101..6cb80831 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
@@ -7,9 +7,14 @@ wsrep_debug=1
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
+innodb_fast_shutdown=0
+innodb_undo_tablespaces=0
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
+innodb_fast_shutdown=0
+innodb_undo_tablespaces=3
+innodb_log_file_buffering
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup.test b/mysql-test/suite/galera/t/galera_sst_mariabackup.test
index bcb9ade3..7dead49e 100644
--- a/mysql-test/suite/galera/t/galera_sst_mariabackup.test
+++ b/mysql-test/suite/galera/t/galera_sst_mariabackup.test
@@ -8,12 +8,39 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
+--connection node_1
+select @@innodb_undo_tablespaces;
+
+--connection node_2
+select @@innodb_undo_tablespaces;
+
--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 Shutting down server ...
+--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
+
+--connection node_2
+--echo Starting server ...
+--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
+
+--connection node_2
+select @@innodb_undo_tablespaces;
+
+call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=3 because previous shutdown was not with innodb_fast_shutdown=0");
+
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_table_with_hyphen.inc b/mysql-test/suite/galera/t/galera_table_with_hyphen.inc
new file mode 100644
index 00000000..ac79d864
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_table_with_hyphen.inc
@@ -0,0 +1,48 @@
+#
+# parameters:
+# $fk_child - child table name
+# $fk_parent - parent table name
+#
+--connection node_1
+SET GLOBAL wsrep_slave_threads=2;
+
+--eval CREATE TABLE `$fk_parent` ( id INT AUTO_INCREMENT PRIMARY KEY, j INT) ENGINE=InnoDB
+
+--eval CREATE TABLE `$fk_child` (id INT AUTO_INCREMENT PRIMARY KEY, parent_id INT, j INT, FOREIGN KEY (parent_id) REFERENCES `$fk_parent`(id)) ENGINE=InnoDB
+
+--eval INSERT INTO `$fk_parent` VALUES (23,0)
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM `$fk_parent`;
+--source include/wait_condition.inc
+
+--connection node_1a
+SET GLOBAL DEBUG_DBUG='+d,wsrep_ha_write_row';
+
+--connection node_2
+--eval INSERT INTO `$fk_child` VALUES (21,23,0),(22,23,0),(23,23,0)
+
+--connection node_1a
+SET DEBUG_SYNC='now WAIT_FOR wsrep_ha_write_row_reached';
+
+--let $wsrep_received_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_received'`
+
+--connection node_2
+--eval UPDATE `$fk_parent` SET j=2 WHERE id=23
+
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $wsrep_received_before + 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_received'
+--source include/wait_condition.inc
+
+SET GLOBAL DEBUG_DBUG='-d,wsrep_ha_write_row';
+SET DEBUG_SYNC='now SIGNAL wsrep_ha_write_row_continue';
+
+SET GLOBAL DEBUG_DBUG="RESET";
+SET DEBUG_SYNC = 'RESET';
+
+SET GLOBAL wsrep_slave_threads=DEFAULT;
+
+--connection node_2
+--eval drop table `$fk_child`
+--eval drop table `$fk_parent`
+
diff --git a/mysql-test/suite/galera/t/galera_table_with_hyphen.test b/mysql-test/suite/galera/t/galera_table_with_hyphen.test
new file mode 100644
index 00000000..1b28bdeb
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_table_with_hyphen.test
@@ -0,0 +1,34 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+#
+# Testing how tables and databases with special characters
+# are treated in certification
+#
+# The test creates two tables having foreign key constraint
+# reference and executes two transactions which modify
+# same rows. The same test is executed with different names
+# containin special characters to see if the certification
+# can detect the conflicts
+#
+# Actual test is in include file galera_table_with_hyphen.inc
+# It create the test tables from parameters $fk_child and
+# $fk_parent
+#
+--connection node_1
+set wsrep_sync_wait=0;
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+SET SESSION wsrep_sync_wait = 0;
+
+--let $fk_child = child
+--let $fk_parent = par-ent
+
+--source galera_table_with_hyphen.inc
+
+--let $fk_child = c-hild
+--let $fk_parent = p-arent-
+
+--source galera_table_with_hyphen.inc
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf
index 022cfcdc..b2cba42c 100644
--- a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.cnf
@@ -2,9 +2,3 @@
[mysqld]
wsrep-ignore-apply-errors=0
-
-[mysqld.3]
-auto_increment_offset=3
-
-[mysqld.4]
-auto_increment_offset=4
diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
index 5e74af4a..e21c271c 100644
--- a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
+++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test
@@ -6,25 +6,15 @@
--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 include/auto_increment_offset_save.inc
-# The following has to be set hard as these connection doesn't yet exists and
-# the auto_increment_offset value changes during the lifetime of the servers.
---let $node_3=node_3
---let $auto_increment_offset_node_3 = 3;
---let $node_4=node_4
---let $auto_increment_offset_node_4 = 4;
-
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
+# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
--let $node_4=node_4
---source suite/galera/include/auto_increment_offset_save.inc
+--source include/auto_increment_offset_save.inc
--connection node_3
# Isolate node #3
@@ -92,6 +82,7 @@ CALL mtr.add_suppression("Slave SQL: Error 'Unknown table");
--connection node_3
SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
+CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster.");
--connection node_4
SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
@@ -105,3 +96,6 @@ DROP TABLE t2;
--let $node_4=node_4
--let $auto_increment_offset_node_4 = 4;
--source suite/galera/include/auto_increment_offset_restore.inc
+
+--disconnect node_3
+--disconnect node_4
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 7a8c0df4..e904f46c 100644
--- a/mysql-test/suite/galera/t/galera_wan_restart_sst.test
+++ b/mysql-test/suite/galera/t/galera_wan_restart_sst.test
@@ -11,6 +11,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/force_restart.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
@@ -27,7 +28,7 @@
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
-CREATE TABLE t1 (f1 INTEGER);
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES (1);
--connection node_2
@@ -45,10 +46,20 @@ INSERT INTO t1 VALUES (4);
--connection node_3
INSERT INTO t1 VALUES (13);
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
+--source include/wait_condition.inc
+--connection node_3
--source include/kill_galera.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat
--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
INSERT INTO t1 VALUES (11);
--connection node_2
@@ -62,6 +73,10 @@ INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (131);
+--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
+
#
# Restart node #2
#
@@ -69,9 +84,17 @@ INSERT INTO t1 VALUES (131);
--connection node_2
INSERT INTO t1 VALUES (22);
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 10 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_2
--source include/kill_galera.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
--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
INSERT INTO t1 VALUES (21);
--connection node_3
@@ -90,11 +113,21 @@ INSERT INTO t1 VALUES (221);
#
--connection node_4
+--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 (34);
+--connection node_1
+--let $wait_condition = SELECT COUNT(*) = 15 FROM t1;
+--source include/wait_condition.inc
+
+--connection node_4
--source include/kill_galera.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.4/data/grastate.dat
--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
INSERT INTO t1 VALUES (31);
--connection node_2
@@ -105,6 +138,7 @@ INSERT INTO t1 VALUES (33);
--connection node_4
--source include/start_mysqld.inc
+--remove_file $MYSQLTEST_VARDIR/mysqld.4/data/grastate.dat
INSERT INTO t1 VALUES (341);
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 94ea008c..cfa5f8bc 100644
--- a/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
+++ b/mysql-test/suite/galera/t/galera_wsrep_new_cluster.test
@@ -30,7 +30,7 @@
--echo Starting server ...
--let $restart_noprint=2
---let $start_mysqld_params="--wsrep-new-cluster"
+--let $start_mysqld_params=--wsrep-new-cluster
--source include/start_mysqld.inc
--source include/wait_until_ready.inc
diff --git a/mysql-test/suite/galera/t/mdev-22063.test b/mysql-test/suite/galera/t/mdev-22063.test
new file mode 100644
index 00000000..d0f3e3bc
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev-22063.test
@@ -0,0 +1,184 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_log_bin.inc
+--source include/have_sequence.inc
+--source include/have_aria.inc
+
+--echo # Case 1 CREATE SEQUENCE with no NOCACHE
+--error ER_NOT_SUPPORTED_YET
+CREATE SEQUENCE s ENGINE=InnoDB;
+CREATE SEQUENCE s NOCACHE ENGINE=InnoDB;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+START TRANSACTION;
+REPLACE INTO s VALUES (1,1,9223372036854775806,1,1,1000,0,0);
+OPTIMIZE TABLE t1;
+SELECT * FROM t1;
+SELECT * FROM s;
+
+--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 INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 's'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM test.s;
+--source include/wait_condition.inc
+
+SELECT * FROM t1;
+SELECT * FROM s;
+
+--connection node_1
+DROP TABLE t1;
+DROP SEQUENCE s;
+
+--echo # Case 2 REPLACE INTO ... SELECT with error
+CREATE TABLE t (id INT KEY,a YEAR,INDEX (id,a)) engine=innodb;
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+REPLACE INTO t (id,a)SELECT /*!99997 */ 1;
+REPLACE INTO t (id,a)SELECT /*!99997 */ 1,2;
+SELECT * FROM t;
+
+CREATE TABLE t2 (id INT KEY,a YEAR,INDEX (id,a)) engine=myisam;
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1;
+REPLACE INTO t2 (id,a)SELECT /*!99997 */ 1,2;
+SELECT * FROM t2;
+
+CREATE TABLE t3 (id INT KEY,a YEAR,INDEX (id,a)) engine=aria;
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1;
+REPLACE INTO t3 (id,a)SELECT /*!99997 */ 1,2;
+SELECT * FROM t3;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't3'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1 FROM test.t3;
+--source include/wait_condition.inc
+
+SELECT * FROM t;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+--connection node_1
+DROP TABLE t,t2,t3;
+
+--echo # Bigger REPLACE ... AS SELECT test
+
+CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
+CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
+
+INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
+
+REPLACE INTO t4 SELECT * FROM t1;
+REPLACE INTO t5 SELECT * FROM t2;
+REPLACE INTO t6 SELECT * FROM t3;
+REPLACE INTO t7 SELECT * FROM t2;
+REPLACE INTO t8 SELECT * FROM t3;
+
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 8 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't_'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1000 FROM test.t8;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+
+--connection node_1
+DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+
+--echo # Bigger INSERT INTO ... SELECT test
+
+CREATE TABLE t1(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t2(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t3(id int not null primary key ,b int) ENGINE=Aria;
+CREATE TABLE t4(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t5(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t6(id int not null primary key ,b int) ENGINE=InnoDB;
+CREATE TABLE t7(id int not null primary key ,b int) ENGINE=MyISAM;
+CREATE TABLE t8(id int not null primary key ,b int) ENGINE=Aria;
+
+INSERT INTO t1(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t2(id) SELECT seq FROM seq_1_to_1000;
+INSERT INTO t3(id) SELECT seq FROM seq_1_to_1000;
+
+INSERT INTO t4 SELECT * FROM t1;
+INSERT INTO t5 SELECT * FROM t2;
+INSERT INTO t6 SELECT * FROM t3;
+INSERT INTO t7 SELECT * FROM t2;
+INSERT INTO t8 SELECT * FROM t3;
+
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 8 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME LIKE 't_'
+--source include/wait_condition.inc
+--let $wait_condition = SELECT COUNT(*) = 1000 FROM test.t8;
+--source include/wait_condition.inc
+
+SELECT COUNT(*) AS EXPECT_1000 FROM t1;
+SELECT COUNT(*) AS EXPECT_1000 FROM t2;
+SELECT COUNT(*) AS EXPECT_1000 FROM t3;
+SELECT COUNT(*) AS EXPECT_1000 FROM t4;
+SELECT COUNT(*) AS EXPECT_1000 FROM t5;
+SELECT COUNT(*) AS EXPECT_1000 FROM t6;
+SELECT COUNT(*) AS EXPECT_1000 FROM t7;
+SELECT COUNT(*) AS EXPECT_1000 FROM t8;
+
+--connection node_1
+DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+#
+# View
+#
+CREATE TABLE t1(pk int not null primary key) engine=innodb;
+INSERT INTO t1 values (1),(2),(3),(4);
+CREATE VIEW view_t1 AS SELECT * FROM t1;
+INSERT INTO view_t1 VALUES (5);
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP VIEW view_t1;
+CREATE TABLE t1(pk int not null primary key) engine=myisam;
+INSERT INTO t1 values (1),(2),(3),(4);
+CREATE VIEW view_t1 AS SELECT * FROM t1;
+INSERT INTO view_t1 VALUES (5);
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP VIEW view_t1;
+CREATE TABLE t1(pk int not null primary key) engine=aria;
+INSERT INTO t1 values (1),(2),(3),(4);
+CREATE VIEW view_t1 AS SELECT * FROM t1;
+INSERT INTO view_t1 VALUES (5);
+SELECT * FROM t1;
+DROP TABLE t1;
+DROP VIEW view_t1;
+SET GLOBAL wsrep_mode=DEFAULT;
diff --git a/mysql-test/suite/galera/t/mdev-22543.test b/mysql-test/suite/galera/t/mdev-22543.test
index 1e7d3712..26257b28 100644
--- a/mysql-test/suite/galera/t/mdev-22543.test
+++ b/mysql-test/suite/galera/t/mdev-22543.test
@@ -36,7 +36,7 @@ SET DEBUG_SYNC = "now WAIT_FOR sync_point_reached";
# Restart without waiting. The UPDATE should block FTWRL on node_1,
# so the SST cannot be completed and node_2 cannot join before
# UPDATE connection is signalled to continue.
---exec echo "restart:$start_mysqld_params" > $_expect_file_name
+--write_line "restart:$start_mysqld_params" $_expect_file_name
# If the bug is present, FTWRL times out on node_1 in couple of
# seconds and node_2 fails to join.
--sleep 10
diff --git a/mysql-test/suite/galera/t/mdev-30013.test b/mysql-test/suite/galera/t/mdev-30013.test
index 038b6660..3795dd32 100644
--- a/mysql-test/suite/galera/t/mdev-30013.test
+++ b/mysql-test/suite/galera/t/mdev-30013.test
@@ -1,4 +1,5 @@
--source include/galera_cluster.inc
+--source include/force_restart.inc # ARCHIVE plugin must be uninstalled
if (!$HA_ARCHIVE_SO) {
skip Needs Archive loadable plugin;
diff --git a/mysql-test/suite/galera/t/mdev-31285.test b/mysql-test/suite/galera/t/mdev-31285.test
index d2749165..5abef37c 100644
--- a/mysql-test/suite/galera/t/mdev-31285.test
+++ b/mysql-test/suite/galera/t/mdev-31285.test
@@ -1,34 +1,15 @@
--source include/galera_cluster.inc
---let $node_1 = node_1
---let $node_2 = node_2
---source include/auto_increment_offset_save.inc
-
--connection node_1
-CREATE TABLE t ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 1 AS i;
-SHOW CREATE TABLE t;
-SELECT * from t;
-DROP TABLE IF EXISTS t;
-COMMIT;
-
#
-# Restart node_2, force SST because database is inconsistent compared to node_1
+# Below should not cause nodes to be inconsistent (they could if we
+# allow TOI as some error are ignored on applier
#
---connection node_2
-SET SESSION wsrep_sync_wait=0;
---source include/kill_galera.inc
---remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
---echo Starting server ...
-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';
---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
+--error ER_NOT_SUPPORTED_YET
+CREATE TABLE t ENGINE=InnoDB WITH SYSTEM VERSIONING AS SELECT 1 AS i;
--connection node_2
-call mtr.add_suppression("WSREP: Event .*Write_rows_v1 apply failed:.*");
-call mtr.add_suppression("SREP: Failed to apply write set: gtid:.*");
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE t;
+
---source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-test/suite/galera/t/mysql-wsrep#332.test
index e216dfe7..464156e8 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#332.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#332.test
@@ -3,7 +3,7 @@
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
-# Open connection node_1a here, MW-369.inc will use it later
+# Open connection node_1a here, will use it later
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
#
@@ -27,7 +27,42 @@ INSERT INTO c VALUES (2, 2);
--let $mw_369_parent_query = UPDATE p SET f1 = f1 + 100
--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1)
---source MW-369.inc
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+--eval $mw_369_parent_query
+
+#
+# Block the $mw_369_child_query from node_2
+#
+# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# insert client row, which will make it impossible to replay the
+# delete on parent
+#
+--connection node_2
+--eval $mw_369_child_query
+
+#
+# Wait until $mw_369_child_query from node_2 reaches the sync point and
+# block the 'COMMIT' from node_1 before it certifies.
+#
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_1
+--send COMMIT
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
# Expect certification failure
--connection node_1
@@ -62,7 +97,42 @@ INSERT INTO c VALUES (2, 2, 2);
--let $mw_369_parent_query = UPDATE p1 SET f1 = f1 + 100
--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1)
---source MW-369.inc
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+--eval $mw_369_parent_query
+
+#
+# Block the $mw_369_child_query from node_2
+#
+# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# insert client row, which will make it impossible to replay the
+# delete on parent
+#
+--connection node_2
+--eval $mw_369_child_query
+
+#
+# Wait until $mw_369_child_query from node_2 reaches the sync point and
+# block the 'COMMIT' from node_1 before it certifies.
+#
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_1
+--send COMMIT
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
# Expect certification failure
--connection node_1
@@ -96,7 +166,42 @@ INSERT INTO c VALUES (2, 2, 2);
--let $mw_369_parent_query = UPDATE p2 SET f1 = f1 + 100
--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1)
---source MW-369.inc
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+--eval $mw_369_parent_query
+
+#
+# Block the $mw_369_child_query from node_2
+#
+# --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_set_sync_point.inc
+
+#
+# insert client row, which will make it impossible to replay the
+# delete on parent
+#
+--connection node_2
+--eval $mw_369_child_query
+
+#
+# Wait until $mw_369_child_query from node_2 reaches the sync point and
+# block the 'COMMIT' from node_1 before it certifies.
+#
+--connection node_1a
+--source include/galera_wait_sync_point.inc
+--source include/galera_clear_sync_point.inc
+
+--connection node_1
+--send COMMIT
+
+--connection node_1a
+--let $galera_sync_point = apply_monitor_slave_enter_sync
+--source include/galera_signal_sync_point.inc
+--source include/galera_clear_sync_point.inc
# Expect certification failure
--connection node_1
diff --git a/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf b/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf
new file mode 100644
index 00000000..ebe1d47f
--- /dev/null
+++ b/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf
@@ -0,0 +1,10 @@
+!include ../galera_2nodes_as_master.cnf
+
+[mysqld.1]
+innodb-log-file-buffering
+
+[mysqld.2]
+innodb-log-file-buffering
+
+[mysqld.3]
+innodb-log-file-buffering
diff --git a/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.test b/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.test
new file mode 100644
index 00000000..29590e32
--- /dev/null
+++ b/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.test
@@ -0,0 +1,9 @@
+--source include/have_innodb.inc
+--source include/galera_cluster.inc
+
+--echo #
+--echo # MDEV-33355 Add a Galera-2-node-to-MariaDB replication MTR test cloning the slave with mariadb-backup
+--echo #
+
+--let cnf=galera2_to_mariadb
+--source include/rpl_clone_slave_using_mariadb-backup.inc
diff --git a/mysql-test/suite/galera/t/versioning_trx_id.test b/mysql-test/suite/galera/t/versioning_trx_id.test
index 017379c3..fc9ea18e 100644
--- a/mysql-test/suite/galera/t/versioning_trx_id.test
+++ b/mysql-test/suite/galera/t/versioning_trx_id.test
@@ -13,29 +13,29 @@ 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`) {
+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;
+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`) {
+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;
+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`) {
+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;
+select count(*) from mysql.transaction_registry where begin_timestamp>commit_timestamp;
drop table t1;
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index 728500f4..f71f726c 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -19,3 +19,4 @@ galera_ipv6_mariabackup_section : temporarily disabled at the request of Codersh
# Opensuse/suse/rocky9/rocky84/rhel9/rhel8-ppc64le .. - all same IPv6 isn't configured right or skipping or galera
galera_ipv6_rsync : Can't connect to server on '::1' (115)
galera_ipv6_rsync_section : Can't connect to server on '::1' (115)
+GCF-354 : MDEV-25614 Galera test failure on GCF-354
diff --git a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result
index 371ce006..55513ff5 100644
--- a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result
+++ b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result
@@ -19,20 +19,40 @@ connection node_2;
connection node_1;
connection node_1;
# restart: --wsrep_new_cluster --wsrep_gtid_domain_id=200
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE
+Primary
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+VARIABLE_VALUE
+Synced
show variables like 'wsrep_gtid_domain_id';
Variable_name Value
wsrep_gtid_domain_id 200
connection node_2;
# restart
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE
+Primary
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+VARIABLE_VALUE
+Synced
show variables like 'wsrep_gtid_domain_id';
Variable_name Value
wsrep_gtid_domain_id 200
+connection node_1;
connection node_3;
# restart: --wsrep_sst_donor=node2
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+VARIABLE_VALUE
+Primary
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+VARIABLE_VALUE
+Synced
show variables like 'wsrep_gtid_domain_id';
Variable_name Value
wsrep_gtid_domain_id 200
connection node_1;
+connection node_1;
set global wsrep_gtid_domain_id=100;
connection node_2;
set global wsrep_gtid_domain_id=100;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_allowlist.result b/mysql-test/suite/galera_3nodes/r/galera_allowlist.result
index 471444d8..a3fb6cf7 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_allowlist.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_allowlist.result
@@ -7,6 +7,9 @@ connection node_2;
SELECT COUNT(*) = 3 FROM mysql.wsrep_allowlist;
COUNT(*) = 3
1
+connection node_1;
+connection node_2;
+connection node_3;
connection node_3;
SET @@global.wsrep_desync = 1;
SET SESSION wsrep_sync_wait = 0;
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 9f1d3fec..a69cef11 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
@@ -9,6 +9,7 @@ INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
connection node_2;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
+connection node_1;
connection node_3;
Unloading wsrep provider ...
SET GLOBAL wsrep_cluster_address = '';
@@ -33,14 +34,16 @@ SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=ist_sender_send_after_get_buffers';
INSERT INTO t1 VALUES (51), (52), (53), (54), (55);
connection node_2;
+connection node_1;
connection node_3;
+connection node_1;
connection node_2;
-SELECT COUNT(*) = 30 FROM t1;
-COUNT(*) = 30
-1
-SELECT COUNT(*) = 3 FROM t2;
-COUNT(*) = 3
-1
+SELECT COUNT(*) AS EXPECT_30 FROM t1;
+EXPECT_30
+30
+SELECT COUNT(*) AS EXPECT_3 FROM t2;
+EXPECT_3
+3
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
LENGTH(f1) = 512 * 1024
1
@@ -48,12 +51,12 @@ LENGTH(f1) = 512 * 1024
1
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
connection node_3;
-SELECT COUNT(*) = 30 FROM t1;
-COUNT(*) = 30
-1
-SELECT COUNT(*) = 3 FROM t2;
-COUNT(*) = 3
-1
+SELECT COUNT(*) AS EXPECT_30 FROM t1;
+EXPECT_30
+30
+SELECT COUNT(*) AS EXPECT_3 FROM t2;
+EXPECT_3
+3
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
LENGTH(f1) = 512 * 1024
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 732385a3..a88909f4 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
@@ -92,3 +92,7 @@ connection node_2;
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
connection node_3;
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
+disconnect node_1a;
+disconnect node_3;
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
index bfb7abf9..1ce33bee 100644
--- a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
+++ b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
@@ -50,6 +50,16 @@ select @@wsrep_gtid_domain_id,@@wsrep_node_name;
--connection node_1
--let $restart_parameters = --wsrep_new_cluster --wsrep_gtid_domain_id=200
--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--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 = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
show variables like 'wsrep_gtid_domain_id';
#
@@ -59,8 +69,21 @@ show variables like 'wsrep_gtid_domain_id';
--let $restart_parameters =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--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 = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
show variables like 'wsrep_gtid_domain_id';
+--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
#
# Restart node_3, select node_2 as donor
@@ -70,9 +93,23 @@ show variables like 'wsrep_gtid_domain_id';
--let $restart_parameters = --wsrep_sst_donor="node2"
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
--source include/start_mysqld.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
+--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 = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+
# Expect domain id 200
show variables like 'wsrep_gtid_domain_id';
+--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
#
# Cleanup
diff --git a/mysql-test/suite/galera_3nodes/t/galera_allowlist.test b/mysql-test/suite/galera_3nodes/t/galera_allowlist.test
index 74fff61c..de80965a 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_allowlist.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_allowlist.test
@@ -12,6 +12,12 @@ SELECT COUNT(*) = 3 FROM mysql.wsrep_allowlist;
--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
+--source ../galera/include/auto_increment_offset_save.inc
+
--connection node_3
# Desync and disconnect node 3 from the PC:
SET @@global.wsrep_desync = 1;
@@ -64,3 +70,6 @@ CALL mtr.add_suppression('WSREP: Connection not allowed');
--connection node_3
CALL mtr.add_suppression('WSREP: Ignoring lack of quorum');
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf
index 5bd03178..c27490fa 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.cnf
@@ -33,3 +33,6 @@ log_slave_updates=ON
log_bin=mariadb-bin-log
binlog-format=row
wsrep-gtid-mode=ON
+
+[sst]
+transferfmt=@ENV.MTR_GALERA_TFMT
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf
index 303087df..29563657 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf
+++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.cnf
@@ -2,10 +2,22 @@
[mysqld.1]
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.ignore_sb=true;gcache.size=1M'
+auto_increment_increment=1
+auto_increment_offset=1
+# this will force server restarts before this test
+loose-galera-ist-gcache-rollover=1
+wsrep-debug=1
[mysqld.2]
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.ignore_sb=true;gcache.size=1M'
+auto_increment_increment=2
+auto_increment_offset=2
+loose-galera-ist-gcache-rollover=2
+wsrep-debug=1
[mysqld.3]
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.ignore_sb=true;gcache.size=1M'
-
+auto_increment_increment=3
+auto_increment_offset=3
+loose-galera-ist-gcache-rollover=3
+wsrep-debug=1
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 210a4c23..16b9bdb2 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
@@ -12,6 +12,7 @@
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
+--source include/force_restart.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
@@ -24,6 +25,9 @@
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep%'; show processlist
+--source include/wait_condition_with_debug.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
@@ -32,12 +36,15 @@ INSERT INTO t1 VALUES (01), (02), (03), (04), (05);
--let $wsrep_cluster_address_orig2 = `select @@wsrep_cluster_address`
--source suite/galera/include/galera_stop_replication.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
+
--connection node_3
--let $wsrep_cluster_address_orig3 = `select @@wsrep_cluster_address`
--source suite/galera/include/galera_stop_replication.inc
--connection node_1
---source include/wait_until_connected_again.inc
INSERT INTO t1 VALUES (11), (12), (13), (14), (15);
# Wait until nodes #2 and #3 have left
@@ -88,29 +95,39 @@ INSERT INTO t1 VALUES (51), (52), (53), (54), (55);
--connection node_2
--source include/wait_until_connected_again.inc
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 OR VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
+--source include/wait_condition.inc
+
--connection node_3
--source include/wait_until_connected_again.inc
-sleep 5;
+--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
# Final checks
--connection node_2
-SELECT COUNT(*) = 30 FROM t1;
-SELECT COUNT(*) = 3 FROM t2;
+--let $wait_condition = SELECT COUNT(*) = 30 FROM t1
+--source include/wait_condition.inc
+
+SELECT COUNT(*) AS EXPECT_30 FROM t1;
+SELECT COUNT(*) AS EXPECT_3 FROM t2;
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
# Final checks
--connection node_3
-SELECT COUNT(*) = 30 FROM t1;
-SELECT COUNT(*) = 3 FROM t2;
+--let $wait_condition = SELECT COUNT(*) = 30 FROM t1
+--source include/wait_condition.inc
+SELECT COUNT(*) AS EXPECT_30 FROM t1;
+SELECT COUNT(*) AS EXPECT_3 FROM t2;
SELECT LENGTH(f1) = 512 * 1024 FROM t2;
CALL mtr.add_suppression("WSREP: Unsupported protocol downgrade: incremental data collection disabled");
DROP TABLE t1, t2;
# Restore original auto_increment_offset values.
---source ../galera/include/auto_increment_offset_restore.inc
-
--let $galera_cluster_size=3
+--source ../galera/include/auto_increment_offset_restore.inc
--source include/galera_end.inc
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 55d6b458..d06cdcc8 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
@@ -278,4 +278,9 @@ call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State T
--connection node_3
call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required.");
+--disconnect node_1a
+
+# Restore original auto_increment_offset values.
+--let $galera_cluster_size=3
--source ../galera/include/auto_increment_offset_restore.inc
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
index eeccfa3b..8fc853f8 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-336.result
@@ -25,6 +25,8 @@ SET SESSION wsrep_sync_wait=0;
connection node_2;
INSERT INTO t1 VALUES (2);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+connection node_2a;
+connection node_2;
COMMIT;
ERROR 08S01: WSREP has not yet prepared node for application use
connection node_2a;
diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
index 9043c668..ef21e4ca 100644
--- a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
+++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
@@ -6,20 +6,26 @@ 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;
+CREATE TABLE t1 (f1 VARCHAR(30) not null primary key) ENGINE=InnoDB;
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 ('primary1'),('primary2'),('primary3'),('primary4'),('primary5');
COMMIT;
Got one of the listed errors
+connection node_1;
+connection node_2;
# restart
connection node_1;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
+SELECT * FROM t1;
+f1
connection node_2;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
1
+SELECT * FROM t1;
+f1
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
index 933038e0..08e3fc6c 100644
--- 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
@@ -7,11 +7,11 @@ 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
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
connection node_1;
-CREATE TABLE t2 (f1 INTEGER);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
LOCK TABLE t2 WRITE;
connection node_1;
@@ -37,13 +37,14 @@ count_match
count_match
1
connection node_1;
-SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
-COUNT(*)
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
0
connection node_2;
-SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
-COUNT(*)
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+EXPECT_0
0
+call mtr.add_suppression("WSREP: node uuid:.*");
connection node_1;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
index ba85aa52..20d5955e 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test
@@ -27,6 +27,12 @@ SET SESSION wsrep_sync_wait=0;
--connection node_2
--error ER_LOCK_DEADLOCK
INSERT INTO t1 VALUES (2);
+
+--connection node_2a
+--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+--connection node_2
--error ER_UNKNOWN_COM_ERROR
COMMIT;
diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
index 5da080a6..700b3c38 100644
--- a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
+++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
@@ -4,6 +4,7 @@
#
--source include/galera_cluster.inc
--source include/have_debug_sync.inc
+--source include/force_restart.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
# Save original auto_increment_offset values.
@@ -13,30 +14,42 @@
--source ../galera/include/auto_increment_offset_save.inc
--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
+
SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal";
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo "wait" > $_expect_file_name
+--write_line wait $_expect_file_name
-CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 VARCHAR(30) not null primary key) ENGINE=InnoDB;
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 ('primary1'),('primary2'),('primary3'),('primary4'),('primary5');
--error 2013,2026
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
--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
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT * FROM t1;
--connection node_2
--enable_reconnect
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
+SELECT * FROM t1;
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
index 08a59296..58d744e7 100644
--- 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
@@ -6,6 +6,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/force_restart.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
# Save original auto_increment_offset values.
@@ -15,18 +16,23 @@
--source ../galera/include/auto_increment_offset_save.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
+
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;
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
--connection node_1
-CREATE TABLE t2 (f1 INTEGER);
+CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--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
@@ -77,10 +83,12 @@ if ($mysql_errno == 1213) {
--enable_query_log
--connection node_1
-SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_2
-SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
+SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
+# As noted above sometimes node delivers the same view twice
+call mtr.add_suppression("WSREP: node uuid:.*");
--connection node_1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/r/galera_sr_bf_abort_idle.result b/mysql-test/suite/galera_sr/r/galera_sr_bf_abort_idle.result
new file mode 100644
index 00000000..a1495f1c
--- /dev/null
+++ b/mysql-test/suite/galera_sr/r/galera_sr_bf_abort_idle.result
@@ -0,0 +1,33 @@
+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, f2 INTEGER);
+INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
+SET SESSION wsrep_trx_fragment_size=10;
+SET SESSION wsrep_trx_fragment_unit='rows';
+START TRANSACTION;
+UPDATE t1 SET f2 = f2 + 10;
+connection node_2;
+INSERT INTO t1 VALUES (10,2);
+connection node_1a;
+connection node_1;
+INSERT INTO t1 VALUES (9,1);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+DROP TABLE t1;
+connection node_1;
+CREATE TABLE t1(f1 INTEGER PRIMARY KEY, f2 INTEGER);
+INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
+SET SESSION wsrep_trx_fragment_size=5;
+SET SESSION wsrep_trx_fragment_unit='rows';
+START TRANSACTION;
+UPDATE t1 SET f2 = f2 + 10;
+connection node_2;
+INSERT INTO t1 VALUES (10,2);
+connection node_1a;
+connection node_1;
+INSERT INTO t1 VALUES (9,1);
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+ROLLBACK;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_sr/t/MDEV-25718.test b/mysql-test/suite/galera_sr/t/MDEV-25718.test
index 9aebbdc7..037cd300 100644
--- a/mysql-test/suite/galera_sr/t/MDEV-25718.test
+++ b/mysql-test/suite/galera_sr/t/MDEV-25718.test
@@ -43,8 +43,9 @@ 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
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = "INSERT INTO t1 VALUES (1)" AND (STATE = "Freeing items" OR STATE = 'Rollback');
+--let $wait_condition_on_error_output = SELECT INFO, STATE FROM INFORMATION_SCHEMA.PROCESSLIST
+--source include/wait_condition_with_debug.inc
# Resume the DDL in streaming_rollback
SET SESSION debug_sync = "now SIGNAL wsrep_streaming_rollback_continue";
diff --git a/mysql-test/suite/galera_sr/t/galera_sr_bf_abort_idle.test b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort_idle.test
new file mode 100644
index 00000000..66259b79
--- /dev/null
+++ b/mysql-test/suite/galera_sr/t/galera_sr_bf_abort_idle.test
@@ -0,0 +1,68 @@
+#
+# Test BF abort for idle SR transactions
+#
+
+--source include/galera_cluster.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+#
+# Case 1: BF abort idle SR transaction that has not yet replicated any fragments
+#
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER);
+INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
+
+--let $bf_count = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.global_status WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+SET SESSION wsrep_trx_fragment_size=10;
+SET SESSION wsrep_trx_fragment_unit='rows';
+START TRANSACTION;
+UPDATE t1 SET f2 = f2 + 10;
+
+--connection node_2
+INSERT INTO t1 VALUES (10,2);
+
+# Wait for SR transaction to be BF aborted
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $bf_count + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'
+--source include/wait_condition.inc
+
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (9,1);
+ROLLBACK;
+
+DROP TABLE t1;
+
+
+#
+# Case 2: BF abort idle SR transaction that has already replicated a fragment
+#
+--connection node_1
+CREATE TABLE t1(f1 INTEGER PRIMARY KEY, f2 INTEGER);
+INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1);
+
+--let $bf_count = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.global_status WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
+
+
+SET SESSION wsrep_trx_fragment_size=5;
+SET SESSION wsrep_trx_fragment_unit='rows';
+START TRANSACTION;
+UPDATE t1 SET f2 = f2 + 10;
+
+--connection node_2
+INSERT INTO t1 VALUES (10,2);
+
+# Wait for SR transaction to be BF aborted
+--connection node_1a
+--let $wait_condition = SELECT VARIABLE_VALUE = $bf_count + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'
+--source include/wait_condition.inc
+
+--connection node_1
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1 VALUES (9,1);
+ROLLBACK;
+
+DROP TABLE t1;
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
index 5332b1a1..f6f50fd5 100644
--- 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
@@ -38,12 +38,12 @@ 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 $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 $start_mysqld_params =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/gcol/inc/innodb_v_large_col.inc b/mysql-test/suite/gcol/inc/innodb_v_large_col.inc
index 70e18863..8ba6920f 100644
--- a/mysql-test/suite/gcol/inc/innodb_v_large_col.inc
+++ b/mysql-test/suite/gcol/inc/innodb_v_large_col.inc
@@ -1,5 +1,3 @@
---source include/have_innodb.inc
-
eval CREATE TABLE `t` (
`a` VARCHAR(10000), `b` VARCHAR(3000),
`c` VARCHAR(14000) GENERATED ALWAYS AS (CONCAT(a,b)) VIRTUAL,
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 63ea5b1d..505afb9b 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -96,11 +96,8 @@ a b c
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT, c INT GENERATED ALWAYS AS(a+b));
INSERT INTO t1(a, b) VALUES (1, 1), (2, 2), (3, 3), (4, 4);
-connection con1;
-# disable purge
-BEGIN;
-SELECT * FROM t0;
-a
+connect stop_purge,localhost,root,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
DELETE FROM t1 WHERE a = 1;
UPDATE t1 SET a = 2, b = 2 WHERE a = 5;
@@ -109,10 +106,11 @@ SET DEBUG_SYNC= 'inplace_after_index_build SIGNAL uncommitted WAIT_FOR purged';
ALTER TABLE t1 ADD INDEX idx (c), ALGORITHM=INPLACE, LOCK=NONE;
connection con1;
SET DEBUG_SYNC= 'now WAIT_FOR uncommitted';
+BEGIN;
DELETE FROM t1 WHERE a = 3;
UPDATE t1 SET a = 7, b = 7 WHERE a = 4;
INSERT INTO t1(a, b) VALUES (8, 8);
-# enable purge
+disconnect stop_purge;
COMMIT;
# wait for purge to process the deleted/updated records.
InnoDB 2 transactions not purged
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 09fba028..79669535 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -131,9 +131,8 @@ CREATE TABLE t1 (a INT, b INT, c INT GENERATED ALWAYS AS(a+b));
INSERT INTO t1(a, b) VALUES (1, 1), (2, 2), (3, 3), (4, 4);
-connection con1;
---echo # disable purge
-BEGIN; SELECT * FROM t0;
+connect (stop_purge,localhost,root,,);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
DELETE FROM t1 WHERE a = 1;
@@ -148,13 +147,14 @@ send ALTER TABLE t1 ADD INDEX idx (c), ALGORITHM=INPLACE, LOCK=NONE;
connection con1;
SET DEBUG_SYNC= 'now WAIT_FOR uncommitted';
+BEGIN;
DELETE FROM t1 WHERE a = 3;
UPDATE t1 SET a = 7, b = 7 WHERE a = 4;
INSERT INTO t1(a, b) VALUES (8, 8);
---echo # enable purge
+disconnect stop_purge;
COMMIT;
--echo # wait for purge to process the deleted/updated records.
diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc
index 8c60cd6e..7d7188aa 100644
--- a/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc
+++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_delete.inc
@@ -5,9 +5,6 @@
# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;"
#
---source include/have_innodb.inc
---source include/have_innodb_16k.inc
-
# turn on flags
--disable_query_log
SET GLOBAL innodb_monitor_enable=index_page_merge_attempts;
diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc
index 8e821365..1d3aca87 100644
--- a/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc
+++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_secondary.inc
@@ -6,9 +6,6 @@
# "create index index1 on tab1(b(750));"
#
---source include/have_innodb.inc
---source include/have_innodb_16k.inc
-
# turn on flags
--disable_query_log
SET GLOBAL innodb_monitor_enable=index_page_merge_attempts;
diff --git a/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc b/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc
index 61e961ac..f91a796d 100644
--- a/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc
+++ b/mysql-test/suite/innodb/include/innodb_merge_threshold_update.inc
@@ -5,9 +5,6 @@
# "create table tab1 (a bigint primary key, b varchar(2048)) engine=InnoDB;"
#
---source include/have_innodb.inc
---source include/have_innodb_16k.inc
-
# turn on flags
--disable_query_log
SET GLOBAL innodb_monitor_enable=index_page_merge_attempts;
diff --git a/mysql-test/suite/innodb/include/no_checkpoint_start.inc b/mysql-test/suite/innodb/include/no_checkpoint_start.inc
index a903fee6..69823dd0 100644
--- a/mysql-test/suite/innodb/include/no_checkpoint_start.inc
+++ b/mysql-test/suite/innodb/include/no_checkpoint_start.inc
@@ -1,5 +1,28 @@
# Preparation for using no_checkpoint_end.inc
+# no_checkpoint_flush: Set to trigger flushing the dirty pages from buffer pool
+# and checkpoint before the "no checkpoint" block.
+
+if ($no_checkpoint_flush) {
+ --echo
+ --echo # Flush all dirty pages from buffer pool
+ SET @no_checkpoint_save_pct= @@GLOBAL.innodb_max_dirty_pages_pct;
+ SET @no_checkpoint_save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
+
+ SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
+ SET GLOBAL innodb_max_dirty_pages_pct=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
+
+ SET GLOBAL innodb_max_dirty_pages_pct= @no_checkpoint_save_pct;
+ SET GLOBAL innodb_max_dirty_pages_pct_lwm= @no_checkpoint_save_pct_lwm;
+ --echo
+}
+
let MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /.*Last checkpoint at[ ]*([0-9]+).*/\1/
let CHECKPOINT_LSN=`SHOW ENGINE INNODB STATUS`;
diff --git a/mysql-test/suite/innodb/r/alter_copy.result b/mysql-test/suite/innodb/r/alter_copy.result
index 8c9e5966..72ae28e9 100644
--- a/mysql-test/suite/innodb/r/alter_copy.result
+++ b/mysql-test/suite/innodb/r/alter_copy.result
@@ -51,7 +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 --debug_dbug=+d,recv_ran_out_of_buffer
+# restart: --innodb-force-recovery=3
disconnect hang;
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
diff --git a/mysql-test/suite/innodb/r/alter_kill.result b/mysql-test/suite/innodb/r/alter_kill.result
index 51814088..209a711d 100644
--- a/mysql-test/suite/innodb/r/alter_kill.result
+++ b/mysql-test/suite/innodb/r/alter_kill.result
@@ -15,9 +15,9 @@ disconnect con1;
# and recompute innodb_checksum_algorithm=crc32
# restart
SELECT COUNT(*) FROM bug16720368;
-ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
+ERROR HY000: Table `test`.`bug16720368` is corrupted. Please drop the table and recreate.
INSERT INTO bug16720368 VALUES(1);
-ERROR HY000: Table test/bug16720368 is corrupted. Please drop the table and recreate.
+ERROR HY000: Table `test`.`bug16720368` is corrupted. Please drop the table and recreate.
INSERT INTO bug16720368_1 VALUES(1);
# Shut down the server to uncorrupt the data.
# restart
diff --git a/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff b/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
index 01db97e5..7c32d38a 100644
--- a/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
+++ b/mysql-test/suite/innodb/r/alter_not_null,COPY,NON-STRICT.rdiff
@@ -1,42 +1,79 @@
-7,8c7,8
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-21,22c21,22
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-35,36c35,36
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-49,50c49,50
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-63,64c63,64
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-77,78c77,78
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
-98,99c98,99
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
+--- alter_not_null.result
++++ alter_not_null,COPY,NON-STRICT.result~
+@@ -4,8 +4,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -18,8 +18,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -32,8 +32,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -46,8 +46,8 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc';
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+@@ -60,8 +60,8 @@
+ f1 f2 f3
+ 2 2 NULL
+ ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'f3' at row 1
+ SELECT * FROM t1;
+@@ -74,8 +74,8 @@
+ f1 b
+ 10 NULL
+ ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'b' at row 1
+ SELECT * FROM t1;
+@@ -95,8 +95,8 @@
+ CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(1, NULL);
+ ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'c2' at row 1
+ SELECT * FROM t1;
diff --git a/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff b/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
index e02d235c..37e97169 100644
--- a/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
+++ b/mysql-test/suite/innodb/r/alter_not_null,COPY,STRICT.rdiff
@@ -1,72 +1,109 @@
-7,10c7
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-13c10
-< 0
----
-> NULL
-21,24c18
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-27c21
-<
----
-> NULL
-35,38c29
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-41c32
-<
----
-> NULL
-49,52c40
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-55c43
-<
----
-> NULL
-63,66c51
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f3' at row 1
----
-> ERROR 01000: Data truncated for column 'f3' at row 1
-69c54
-< 2 2 0
----
-> 2 2 NULL
-77,80c62
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'b' at row 1
----
-> ERROR 01000: Data truncated for column 'b' at row 1
-83c65
-< 10 0
----
-> 10 NULL
-98,99c80,81
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
----
-> affected rows: 1
-> info: Records: 1 Duplicates: 0 Warnings: 1
+--- alter_not_null.result
++++ alter_not_null,COPY,STRICT.result~
+@@ -4,13 +4,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-0
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -18,13 +15,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -32,13 +26,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 TEXT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -46,13 +37,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc';
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(2, 2, NULL);
+@@ -60,13 +48,10 @@
+ f1 f2 f3
+ 2 2 NULL
+ ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f3' at row 1
++ERROR 01000: Data truncated for column 'f3' at row 1
+ SELECT * FROM t1;
+ f1 f2 f3
+-2 2 0
++2 2 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB;
+ INSERT INTO t1 VALUES(10, NULL);
+@@ -74,13 +59,10 @@
+ f1 b
+ 10 NULL
+ ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'b' at row 1
++ERROR 01000: Data truncated for column 'b' at row 1
+ SELECT * FROM t1;
+ f1 b
+-10 0
++10 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB;
+ ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL;
+@@ -95,8 +77,8 @@
+ CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(1, NULL);
+ ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
++affected rows: 1
++info: Records: 1 Duplicates: 0 Warnings: 1
+ Warnings:
+ Warning 1265 Data truncated for column 'c2' at row 1
+ SELECT * FROM t1;
diff --git a/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff b/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff
index ec97b174..555f4cdb 100644
--- a/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff
+++ b/mysql-test/suite/innodb/r/alter_not_null,INPLACE,STRICT.rdiff
@@ -1,66 +1,98 @@
-7,10c7
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-13c10
-< 0
----
-> NULL
-21,24c18
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-27c21
-<
----
-> NULL
-35,38c29
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-41c32
-<
----
-> NULL
-49,52c40
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f1' at row 1
----
-> ERROR 01000: Data truncated for column 'f1' at row 1
-55c43
-<
----
-> NULL
-63,66c51
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'f3' at row 1
----
-> ERROR 01000: Data truncated for column 'f3' at row 1
-69c54
-< 2 2 0
----
-> 2 2 NULL
-77,80c62
-< affected rows: 0
-< info: Records: 0 Duplicates: 0 Warnings: 1
-< Warnings:
-< Warning 1265 Data truncated for column 'b' at row 1
----
-> ERROR 01000: Data truncated for column 'b' at row 1
-83c65
-< 10 0
----
-> 10 NULL
+--- alter_not_null.result
++++ alter_not_null,INPLACE,STRICT.result~
+@@ -4,13 +4,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-0
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -18,13 +15,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -32,13 +26,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL;
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 TEXT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(NULL);
+@@ -46,13 +37,10 @@
+ f1
+ NULL
+ ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc';
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f1' at row 1
++ERROR 01000: Data truncated for column 'f1' at row 1
+ SELECT * FROM t1;
+ f1
+-
++NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB;
+ INSERT INTO t1 VALUES(2, 2, NULL);
+@@ -60,13 +48,10 @@
+ f1 f2 f3
+ 2 2 NULL
+ ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'f3' at row 1
++ERROR 01000: Data truncated for column 'f3' at row 1
+ SELECT * FROM t1;
+ f1 f2 f3
+-2 2 0
++2 2 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB;
+ INSERT INTO t1 VALUES(10, NULL);
+@@ -74,13 +59,10 @@
+ f1 b
+ 10 NULL
+ ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 1
+-Warnings:
+-Warning 1265 Data truncated for column 'b' at row 1
++ERROR 01000: Data truncated for column 'b' at row 1
+ SELECT * FROM t1;
+ f1 b
+-10 0
++10 NULL
+ DROP TABLE t1;
+ CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB;
+ ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL;
diff --git a/mysql-test/suite/innodb/r/autoinc_debug.result b/mysql-test/suite/innodb/r/autoinc_debug.result
index b3b7a469..59740e43 100644
--- a/mysql-test/suite/innodb/r/autoinc_debug.result
+++ b/mysql-test/suite/innodb/r/autoinc_debug.result
@@ -105,3 +105,60 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
SET DEBUG_SYNC='RESET';
+#
+# MDEV-33593: Auto increment deadlock error causes ASSERT in subsequent save point
+#
+CREATE TABLE t1(col1 INT PRIMARY KEY AUTO_INCREMENT, col2 INT) ENGINE=InnoDB;
+CREATE TABLE t2(col1 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1(col2) values(100);
+connect con1, localhost, root,,;
+START TRANSACTION;
+# T1: Acquiring Row X lock on table t2
+INSERT INTO t2 values(100);
+connect con2, localhost, root,,;
+START TRANSACTION;
+# T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
+UPDATE t1 SET col2 = 20 where col1 = 10;
+SET DEBUG_SYNC='lock_wait_before_suspend SIGNAL t2_waiting';
+INSERT INTO t2 values(100);
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
+# T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
+SET DEBUG_SYNC='lock_wait_before_suspend SIGNAL t3_waiting';
+INSERT INTO t1(col2) SELECT col2 from t1;
+connection con1;
+SAVEPOINT s1;
+SET DEBUG_SYNC='now WAIT_FOR t3_waiting';
+# T1: Wait for (T3) auto increment lock on t1 causing T1 -> T3 -> T2 -> T1 deadlock
+SET debug_dbug = '+d,innodb_deadlock_victim_self';
+INSERT INTO t1(col2) VALUES(200);
+ERROR HY000: Failed to read auto-increment value from storage engine
+# The transaction should have been rolled back
+SELECT * FROM t1;
+col1 col2
+1 100
+SELECT * FROM t2;
+col1
+# Release the previous savepoint using the same name
+SAVEPOINT s1;
+COMMIT;
+connection con2;
+COMMIT;
+connection default;
+COMMIT;
+disconnect con1;
+disconnect con2;
+# Cleanup
+SELECT * FROM t1;
+col1 col2
+1 100
+2 100
+DROP TABLE t1;
+SELECT * FROM t2;
+col1
+100
+DROP TABLE t2;
+SET DEBUG_SYNC='RESET';
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/innodb/r/autoinc_import.result b/mysql-test/suite/innodb/r/autoinc_import.result
new file mode 100644
index 00000000..4a8ddd02
--- /dev/null
+++ b/mysql-test/suite/innodb/r/autoinc_import.result
@@ -0,0 +1,232 @@
+CREATE TABLE t1 (id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(42);
+CREATE TABLE t1b LIKE t1;
+INSERT INTO t1b VALUES(3);
+CREATE TABLE t1z LIKE t1;
+CREATE TABLE t1t (id TINYINT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t0t LIKE t1t;
+INSERT INTO t1t VALUES(123);
+FLUSH TABLES t1,t1b,t1t FOR EXPORT;
+UNLOCK TABLES;
+CREATE TABLE t5_7 LIKE t1;
+CREATE TABLE t5_7b LIKE t1b;
+CREATE TABLE t10_1 LIKE t1;
+CREATE TABLE t10_1b LIKE t1b;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1b DISCARD TABLESPACE;
+ALTER TABLE t1z DISCARD TABLESPACE;
+ALTER TABLE t1t DISCARD TABLESPACE;
+ALTER TABLE t0t DISCARD TABLESPACE;
+ALTER TABLE t5_7 DISCARD TABLESPACE;
+ALTER TABLE t5_7b DISCARD TABLESPACE;
+ALTER TABLE t10_1 DISCARD TABLESPACE;
+ALTER TABLE t10_1b DISCARD TABLESPACE;
+FLUSH TABLES;
+ALTER TABLE t0t IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t0t.cfg', will attempt to import without schema verification
+INSERT INTO t0t VALUES(NULL);
+SELECT * FROM t0t;
+id
+123
+124
+DROP TABLE t0t;
+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
+ALTER TABLE t1b IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1b.cfg', will attempt to import without schema verification
+ALTER TABLE t1z IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1z.cfg', will attempt to import without schema verification
+ALTER TABLE t1t IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1t.cfg', will attempt to import without schema verification
+ALTER TABLE t5_7 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t5_7.cfg', will attempt to import without schema verification
+ALTER TABLE t5_7b IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t5_7b.cfg', will attempt to import without schema verification
+ALTER TABLE t10_1 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t10_1.cfg', will attempt to import without schema verification
+ALTER TABLE t10_1b IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t10_1b.cfg', will attempt to import without schema verification
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 128 to 123 on table `test`\.`t0t`/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 42 on table `test`\.`t1z`/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 128 to 123 on table `test`\.`t1t`/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 3 to 42 on table `test`\.`t5_7` \(created with version 50744\)/ in mysqld.1.err
+FOUND 1 /InnoDB: Resetting PAGE_ROOT_AUTO_INC from 3 to 42 on table `test`\.`t10_1` \(created with version 100149\)/ in mysqld.1.err
+FOUND 5 /InnoDB: Resetting PAGE_ROOT_AUTO_INC/ in mysqld.1.err
+# restart: --read-only
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+# restart: --innodb-read-only --read-only
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment will be checked on each open until CHECK TABLE FOR UPGRADE is executed
+test.t10_1b check status OK
+# restart: --innodb-read-only
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check status Operation failed
+test.t5_7b check status Operation failed
+test.t10_1 check status Operation failed
+test.t10_1b check status Operation failed
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check status Operation failed
+test.t5_7b check status Operation failed
+test.t10_1 check status Operation failed
+test.t10_1b check status Operation failed
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1b;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1t;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1z;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t5_7;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t5_7b;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t10_1;
+COUNT(*)
+1
+SELECT COUNT(*) FROM t10_1b;
+COUNT(*)
+1
+# restart
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check note Auto_increment checked and .frm file version updated
+test.t5_7 check status OK
+test.t5_7b check note Auto_increment checked and .frm file version updated
+test.t5_7b check status OK
+test.t10_1 check note Auto_increment checked and .frm file version updated
+test.t10_1 check status OK
+test.t10_1b check note Auto_increment checked and .frm file version updated
+test.t10_1b check status OK
+INSERT INTO t1 VALUES(NULL);
+INSERT INTO t1b VALUES(NULL);
+INSERT INTO t1t VALUES(NULL);
+INSERT INTO t1z VALUES(NULL);
+INSERT INTO t5_7 VALUES(NULL);
+INSERT INTO t5_7b VALUES(NULL);
+INSERT INTO t10_1 VALUES(NULL);
+INSERT INTO t10_1b VALUES(NULL);
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t1b check status OK
+test.t1t check status OK
+test.t1z check status OK
+test.t5_7 check status OK
+test.t5_7b check status OK
+test.t10_1 check status OK
+test.t10_1b check status OK
+SELECT * FROM t1;
+id
+4
+42
+SELECT * FROM t1b;
+id
+3
+347
+SELECT * FROM t1t;
+id
+123
+124
+SELECT * FROM t1z;
+id
+42
+43
+SELECT * FROM t5_7;
+id
+42
+43
+SELECT * FROM t5_7b;
+id
+3
+347
+SELECT * FROM t10_1;
+id
+42
+43
+SELECT * FROM t10_1b;
+id
+3
+347
+DROP TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
index 44446602..ad1f3a44 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:29:25.129637040 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -14,7 +14,7 @@
-# bytes: 65536
+# bytes: 131072
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
--# bytes: 4194304
+-# bytes: 2097152
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
index ef55ad97..1412df39 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:31:39.288769153 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -13,7 +13,7 @@
-# bytes: 65536
+# bytes: 16384
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
- # bytes: 4194304
+ # bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
index bcdcea31..15692559 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:30:28.957174270 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -14,7 +14,7 @@
-# bytes: 65536
+# bytes: 262144
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
--# bytes: 4194304
+-# bytes: 2097152
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
index 7b699ef4..55cf5973 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
@@ -1,5 +1,5 @@
---- mysql-test/suite/innodb/r/check_ibd_filesize.result 2022-08-16 17:28:06.462350465 +0530
-+++ mysql-test/suite/innodb/r/check_ibd_filesize.reject 2022-08-16 17:31:03.516962339 +0530
+--- mysql-test/suite/innodb/r/check_ibd_filesize.result
++++ mysql-test/suite/innodb/r/check_ibd_filesize.reject
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
@@ -13,7 +13,7 @@
-# bytes: 65536
+# bytes: 32768
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
- # bytes: 4194304
+ # bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize.result b/mysql-test/suite/innodb/r/check_ibd_filesize.result
index 0d224d6a..b0f37618 100644
--- a/mysql-test/suite/innodb/r/check_ibd_filesize.result
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize.result
@@ -10,7 +10,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
# bytes: 65536
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 4194304
+# bytes: 2097152
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
diff --git a/mysql-test/suite/innodb/r/cursor-restore-unique-null.result b/mysql-test/suite/innodb/r/cursor-restore-unique-null.result
new file mode 100644
index 00000000..29edc47a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/cursor-restore-unique-null.result
@@ -0,0 +1,24 @@
+CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, UNIQUE KEY `b_c` (`b`,`c`))
+ENGINE=InnoDB, STATS_PERSISTENT=0;
+INSERT INTO t SET a = 1, c = 2;
+connect con1,localhost,root;
+BEGIN;
+INSERT INTO t SET a=2, c=2;
+connection default;
+BEGIN;
+SET DEBUG_SYNC="lock_wait_start SIGNAL select_locked";
+SELECT * FROM t FORCE INDEX(b) FOR UPDATE;
+connection con1;
+SET DEBUG_SYNC="now WAIT_FOR select_locked";
+ROLLBACK;
+connection default;
+# If the bug is not fixed, and the both unique index key fields are
+# NULL, there will be two (1, NULL, 2) rows in the result,
+# because cursor will be restored to (NULL, 2, 1) position for
+# secondary key instead of "supremum".
+a b c
+1 NULL 2
+COMMIT;
+SET DEBUG_SYNC="RESET";
+disconnect con1;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result
index 808e2270..80a0afb8 100644
--- a/mysql-test/suite/innodb/r/foreign_key.result
+++ b/mysql-test/suite/innodb/r/foreign_key.result
@@ -1035,9 +1035,22 @@ BEGIN;
INSERT INTO child SET a=1;
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`))
connection default;
+TRUNCATE TABLE parent;
+ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`parent` (`a`))
+DROP TABLE parent;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+SET innodb_lock_wait_timeout=0;
+RENAME TABLE parent TO transparent;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ALTER TABLE parent FORCE, ALGORITHM=COPY;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET innodb_lock_wait_timeout=0, foreign_key_checks=0;
TRUNCATE TABLE parent;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DROP TABLE parent;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ALTER TABLE parent FORCE, ALGORITHM=COPY;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
@@ -1052,7 +1065,13 @@ TRUNCATE TABLE parent;
ALTER TABLE parent FORCE, ALGORITHM=COPY;
ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
ALTER TABLE parent ADD COLUMN b INT, ALGORITHM=INSTANT;
-DROP TABLE child, parent;
+SET foreign_key_checks=ON;
+TRUNCATE TABLE parent;
+ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`parent` (`a`))
+ALTER TABLE parent FORCE, ALGORITHM=COPY;
+ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
+RENAME TABLE parent TO transparent;
+DROP TABLE child, transparent;
#
# MDEV-26217 Failing assertion: list.count > 0 in ut_list_remove
# or Assertion `lock->trx == this' failed in dberr_t trx_t::drop_table
diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result
index 548e69c1..416f607c 100644
--- a/mysql-test/suite/innodb/r/full_crc32_import.result
+++ b/mysql-test/suite/innodb/r/full_crc32_import.result
@@ -50,7 +50,15 @@ t1 CREATE TABLE `t1` (
`b` blob DEFAULT NULL,
`c` blob DEFAULT NULL,
PRIMARY KEY (`a`)
-) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+# Auto increment value must be more than maximum column value
+SELECT MAX(a) FROM t1;
+MAX(a)
+45
+SELECT auto_increment FROM information_schema.tables
+WHERE table_name like 't1';
+auto_increment
+46
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
@@ -132,7 +140,15 @@ t1 CREATE TABLE `t1` (
`c2` point NOT NULL,
`c3` linestring NOT NULL,
PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=16372 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=14325 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
+# Auto increment value must be more than maximum column value
+SELECT MAX(c1) FROM t1;
+MAX(c1)
+14324
+SELECT auto_increment FROM information_schema.tables
+WHERE table_name like 't1';
+auto_increment
+14325
UPDATE t1 SET C2 = ST_GeomFromText('POINT(0 0)');
SELECT COUNT(*) FROM t1;
COUNT(*)
diff --git a/mysql-test/suite/innodb/r/import_bugs.result b/mysql-test/suite/innodb/r/import_bugs.result
index 98f3e767..26845e55 100644
--- a/mysql-test/suite/innodb/r/import_bugs.result
+++ b/mysql-test/suite/innodb/r/import_bugs.result
@@ -15,6 +15,58 @@ CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
DROP TABLE imp_t1, t1;
SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
#
+# MDEV-33400 Adaptive hash index corruption after DISCARD TABLESPACE
+#
+SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
+SET GLOBAL innodb_adaptive_hash_index=ON;
+CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t SELECT * FROM seq_1_to_131;
+ALTER TABLE t ADD hid INT DEFAULT 2;
+INSERT INTO t VALUES (251,1);
+ALTER TABLE t DISCARD TABLESPACE;
+CHECK TABLE mysql.innodb_table_stats;
+Table Op Msg_type Msg_text
+mysql.innodb_table_stats check status OK
+DROP TABLE t;
+SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;
+# End of 10.4 tests
+#
+# MDEV-18288: Transportable Tablespaces leave AUTO_INCREMENT in mismatched
+# state, causing INSERT errors in newly imported tables when .cfg is not used.
+#
+CREATE TABLE t1(
+id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+PRIMARY KEY (id)
+) ENGINE=INNODB;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+INSERT INTO t1() VALUES();
+INSERT INTO t1() VALUES();
+FLUSH TABLES test.t1 FOR EXPORT;
+# Copy data file
+# Skip CFG file copy
+UNLOCK TABLES;
+DROP TABLE t1;
+ALTER TABLE t2 IMPORT TABLESPACE;
+Warnings:
+Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
+SELECT * FROM t2 ORDER BY id;
+id
+1
+2
+INSERT INTO t2() VALUES();
+INSERT INTO t2() VALUES();
+INSERT INTO t2() VALUES();
+SELECT * FROM t2 ORDER BY id;
+id
+1
+2
+3
+4
+5
+DROP TABLE t2;
+# End of 10.5 tests
+#
# MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)'
# failed in dberr_t row_discard_tablespace_for_mysql
# (dict_table_t*, trx_t*)
diff --git a/mysql-test/suite/innodb/r/import_hidden_fts.result b/mysql-test/suite/innodb/r/import_hidden_fts.result
new file mode 100644
index 00000000..69120898
--- /dev/null
+++ b/mysql-test/suite/innodb/r/import_hidden_fts.result
@@ -0,0 +1,45 @@
+call mtr.add_suppression("InnoDB: Added system generated FTS_DOC_ID and FTS_DOC_ID_INDEX while importing the tablespace");
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) not null, fulltext f_idx(f2),
+f3 INT as (f1) VIRTUAL, INDEX(f3),
+f4 INT as (f1) STORED, INDEX(f4),
+f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1, f2) VALUES(1, "on");
+INSERT INTO t1(f1, f2) SELECT seq, "si" FROM seq_2_to_256;
+ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL;
+ALTER TABLE t1 DROP COLUMN f6;
+ALTER TABLE t1 DROP INDEX f_idx;
+connect con1,localhost,root,,;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+connection default;
+DELETE FROM t1 WHERE f1 > 1;
+FLUSH TABLE t1 FOR EXPORT;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+backup: t1
+UNLOCK TABLES;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) not null,
+f3 INT as (f1) VIRTUAL, INDEX(f3),
+f4 INT as (f1) STORED, INDEX(f4),
+f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` char(2) NOT NULL,
+ `f3` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
+ `f4` int(11) GENERATED ALWAYS AS (`f1`) STORED,
+ `f5` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
+ PRIMARY KEY (`f1`),
+ KEY `f3` (`f3`),
+ KEY `f4` (`f4`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/import_hidden_fts_debug.result b/mysql-test/suite/innodb/r/import_hidden_fts_debug.result
new file mode 100644
index 00000000..2cf1746e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/import_hidden_fts_debug.result
@@ -0,0 +1,76 @@
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL, FULLTEXT f_idx(f2),
+f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB;
+INSERT INTO t1(f1, f2) VALUES(1, "on");
+ALTER TABLE t1 DROP INDEX f_idx;
+FLUSH TABLE t1 FOR EXPORT;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+backup: t1
+UNLOCK TABLES;
+Warnings:
+Warning 1235 This version of MariaDB doesn't yet support 'FLUSH TABLES on a table that had an FTS index, created on a hidden column, the auxiliary tables haven't been dropped as yet. FTS auxiliary tables will not be flushed.'
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL,
+f3 CHAR(2) NOT NULL,
+f4 INT AS (f1) VIRTUAL, INDEX(f4))ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Number of indexes don't match, table has 2 indexes but the tablespace meta-data file has 3 indexes)
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL,
+f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+SET DEBUG_DBUG="+d,ib_import_set_index_root_failure";
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Too many active concurrent transactions
+SET DEBUG_DBUG="-d,ib_import_set_index_root_failure";
+SET DEBUG_DBUG="+d,ib_import_vcol_update_fail";
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR 23000: Can't write; duplicate key in table 't1'
+SET DEBUG_DBUG="-d,ib_import_vcol_update_fail";
+restore: t1 .ibd and .cfg files
+SET DEBUG_DBUG="+d,ib_import_fts_error";
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR 23000: Can't write; duplicate key in table 't1'
+SET DEBUG_DBUG="-d,ib_import_fts_error";
+unlink: t1.ibd
+unlink: t1.cfg
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id IN (SELECT table_id FROM information_schema.innodb_sys_tables where name="test/t1");
+NAME
+f1
+f2
+f3
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f2` char(2) NOT NULL,
+ `f3` int(11) GENERATED ALWAYS AS (`f1`) VIRTUAL,
+ PRIMARY KEY (`f1`),
+ KEY `f3` (`f3`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+FTS_DOC_ID BIGINT SIGNED NOT NULL,
+f2 CHAR(2) NOT NULL,
+FULLTEXT f_idx(f2))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1, "on");
+ALTER TABLE t1 DROP INDEX f_idx;
+FLUSH TABLE t1 FOR EXPORT;
+backup: t1
+UNLOCK TABLES;
+DROP TABLE t1;
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+f2 CHAR(2) NOT NULL)ENGINE=InnoDB;
+ALTER TABLE t1 DISCARD TABLESPACE;
+restore: t1 .ibd and .cfg files
+ALTER TABLE t1 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Column f2 ordinal value mismatch, it's at 1 in the table and 2 in the tablespace meta-data file)
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/index_length.result b/mysql-test/suite/innodb/r/index_length.result
index cc92780a..e0d6a735 100644
--- a/mysql-test/suite/innodb/r/index_length.result
+++ b/mysql-test/suite/innodb/r/index_length.result
@@ -20,4 +20,12 @@ FLOOR(index_length/@@innodb_page_size)
2
disconnect stop_purge;
DROP TABLE t1;
+#
+# MDEV-22855 Assertion (!field->prefix_len ||
+# field->fixed_len == field->prefix_len)
+# failed in btr_node_ptr_max_size
+#
+CREATE TABLE t1(c CHAR(194) CHARACTER SET UTF32, KEY k1(c(193)))ENGINE=InnoDB;
+INSERT INTO t1 SET c='';
+DROP TABLE t1;
# End of 10.4 tests
diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result
index c55b4a3d..fd33581f 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result
@@ -108,11 +108,11 @@ DROP TABLE t;
# MDEV-26772 InnoDB DDL fails with DUPLICATE KEY error
#
create table t1(f1 int not null primary key,
-f2 int not null, index idx(f2))engine=innodb;
+f2 int not null, index idx(f2), index i(f2,f1))engine=innodb;
insert into t1 values(1, 1);
connect con1,localhost,root,,,;
SET DEBUG_SYNC='before_delete_table_stats SIGNAL blocked WAIT_FOR go';
-SET innodb_lock_wait_timeout=0;
+SET STATEMENT innodb_lock_wait_timeout=0 FOR
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR blocked';
@@ -124,6 +124,17 @@ connection con1;
connection default;
COMMIT;
SET DEBUG_SYNC=RESET;
+RENAME TABLE mysql.innodb_table_stats TO mysql.innodb_table_stats_hidden;
+connection con1;
+SET DEBUG_SYNC='innodb_commit_inplace_before_lock SIGNAL blocked WAIT_FOR go';
+ALTER TABLE t1 DROP INDEX i;
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR blocked';
+RENAME TABLE mysql.innodb_table_stats_hidden TO mysql.innodb_table_stats;
+SET DEBUG_SYNC='now SIGNAL go';
+connection con1;
+connection default;
+SET DEBUG_SYNC=RESET;
connection con1;
ALTER TABLE t1 RENAME KEY idx TO idx1, ALGORITHM=COPY;
disconnect con1;
diff --git a/mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result b/mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result
deleted file mode 100644
index 09e53b59..00000000
--- a/mysql-test/suite/innodb/r/innodb-lru-force-no-free-page.result
+++ /dev/null
@@ -1,10 +0,0 @@
-call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
-SET @saved_debug = @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,ib_lru_force_no_free_page";
-CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB;
-BEGIN;
-INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
-COMMIT;
-SET debug_dbug = @saved_debug;
-DROP TABLE t1;
-FOUND 1 /InnoDB: Difficult to find free blocks / in mysqld.1.err
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff b/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff
deleted file mode 100644
index bb902e18..00000000
--- a/mysql-test/suite/innodb/r/innodb-wl5522,crc32.rdiff
+++ /dev/null
@@ -1,5 +0,0 @@
-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
index bb902e18..283bbe96 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
+++ b/mysql-test/suite/innodb/r/innodb-wl5522,strict_crc32.rdiff
@@ -1,5 +1,12 @@
-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*.)
+--- innodb-wl5522.result
++++ innodb-wl5522,strict_crc32.result~
+@@ -131,8 +131,7 @@
+ 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;
+-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*.)
+ DROP TABLE t2;
+ SET GLOBAL innodb_file_per_table = 1;
+ SELECT @@innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/r/innodb_bug30113362.result b/mysql-test/suite/innodb/r/innodb_bug30113362.result
index cb0f5091..5d30c5c0 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30113362.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30113362.result
@@ -37,7 +37,7 @@ 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
-1856
+1792
connection con2;
DELETE FROM t1 WHERE a00 = 'cnm';
COMMIT;
@@ -80,7 +80,7 @@ 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
-1856
+1792
DELETE FROM t1 WHERE a00 = 'dpn';
COMMIT;
INSERT INTO t1 SET a00 = 'dpn';
@@ -117,6 +117,6 @@ 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
-1856
+1792
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index d142c0e4..9d8ead7a 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -431,10 +431,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
@@ -509,10 +505,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
@@ -1217,10 +1209,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
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 832a4800..94e40ee5 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
@@ -86,7 +86,6 @@ buffer_flush_n_to_flush_by_age buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NUL
buffer_flush_adaptive_avg_time buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Avg time (ms) spent for adaptive flushing recently.
buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of adaptive flushes passed during the recent Avg period.
buffer_LRU_get_free_loops buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total loops in LRU get free.
-buffer_LRU_get_free_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total sleep waits in LRU get free.
buffer_flush_avg_page_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average number of pages at which flushing is happening
buffer_flush_lsn_avg_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average redo generation rate
buffer_flush_pct_for_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Percent of IO capacity used to avoid max dirty page limit
@@ -106,7 +105,6 @@ buffer_LRU_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NUL
buffer_LRU_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages scanned per LRU batch call
buffer_LRU_batch_flush_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Total pages flushed as part of LRU batches
buffer_LRU_batch_evict_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Total pages evicted as part of LRU batches
-buffer_LRU_single_flush_failure_count Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times attempt to flush a single page from LRU failed
buffer_LRU_get_free_search Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of searches performed for a clean page
buffer_LRU_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of LRU search
buffer_LRU_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times LRU search is performed
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch.result b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
index df6bc4b0..cb205b18 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch.result
@@ -174,3 +174,10 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5;
DROP TABLE t1;
+#
+# MDEV-33462 Disallow LOCK=NONE operation on statistics table
+#
+ALTER TABLE mysql.innodb_table_stats FORCE, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: innodb_table_stats. Try LOCK=SHARED
+ALTER TABLE mysql.innodb_index_stats FORCE, LOCK=NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: innodb_index_stats. Try LOCK=SHARED
diff --git a/mysql-test/suite/innodb/r/innodb_timeout_rollback.result b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
index 30db5a21..5f99ad75 100644
--- a/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
+++ b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
@@ -17,10 +17,6 @@ a
connection con1;
begin work;
insert into t1 values (5);
-select * from t1;
-a
-1
-5
insert into t1 values (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select * from t1;
@@ -41,4 +37,4 @@ a
drop table t1;
disconnect con1;
disconnect con2;
-End of 5.0 tests
+# End of 5.0 tests
diff --git a/mysql-test/suite/innodb/r/innodb_ut_format_name.result b/mysql-test/suite/innodb/r/innodb_ut_format_name.result
deleted file mode 100644
index 41a5b0f7..00000000
--- a/mysql-test/suite/innodb/r/innodb_ut_format_name.result
+++ /dev/null
@@ -1,5 +0,0 @@
-CREATE TABLE t (c INT) ENGINE=INNODB;
-SET @save_dbug = @@debug_dbug;
-SET debug_dbug = '+d,test_ut_format_name';
-DROP TABLE t;
-SET debug_dbug = @save_dbug;
diff --git a/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff b/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
index baa017ec..ad3d03a7 100644
--- a/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
+++ b/mysql-test/suite/innodb/r/insert_into_empty,4k.rdiff
@@ -1,2 +1,10 @@
-423a424
-> ERROR 42000: 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.
+--- a/mysql-test/suite/innodb/r/insert_into_empty.result
++++ b/mysql-test/suite/innodb/r/insert_into_empty.result
+@@ -430,6 +430,7 @@
+ INSERT IGNORE INTO t1 VALUES
+ (1, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107)),
+ (2, REPEAT('x',4805), REPEAT('t',2211), REPEAT('u',974), REPEAT('e',871), REPEAT('z',224), REPEAT('j',978), REPEAT('n',190), REPEAT('t',888), REPEAT('x',32768), REPEAT('e',968), REPEAT('b',913), REPEAT('x',12107));
++ERROR 42000: 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.
+ CHECK TABLE t1;
+ Table Op Msg_type Msg_text
+ test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result
index 0cdee172..78d93494 100644
--- a/mysql-test/suite/innodb/r/insert_into_empty.result
+++ b/mysql-test/suite/innodb/r/insert_into_empty.result
@@ -251,6 +251,15 @@ c1
1984
3331
DROP TABLE t1;
+#
+# MDEV-33979 Disallow bulk insert operation during
+# partition update statement
+#
+CREATE TABLE t1(a INT KEY)ENGINE=InnoDB
+PARTITION BY KEY(a) PARTITIONS 16;
+INSERT INTO t1 VALUES(1);
+UPDATE t1 SET a = 2 WHERE a = 1;
+DROP TABLE t1;
# End of 10.6 tests
#
# MDEV-26947 UNIQUE column checks fail in InnoDB resulting
@@ -467,3 +476,47 @@ DROP TABLE t1;
CREATE TABLE t (a CHAR CHARACTER SET utf8) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT t SELECT left(seq,1) FROM seq_1_to_43691;
DROP TABLE t;
+#
+# MDEV-32453 Bulk insert fails to apply when trigger
+# does insert operation
+#
+CREATE TABLE t(c INT)ENGINE=InnoDB;
+CREATE TRIGGER t2_ai AFTER INSERT ON t FOR EACH ROW SET @a:=(SELECT * FROM t);
+BEGIN;
+INSERT INTO t VALUES (1),(1);
+ERROR 21000: Subquery returns more than 1 row
+COMMIT;
+DROP TABLE t;
+#
+# MDEV-33868 Assertion `trx->bulk_insert' failed in
+# innodb_prepare_commit_versioned
+#
+CREATE TABLE t (id INT) ENGINE=InnoDB;
+select 1 into outfile "VARDIR/tmp/t.outfile";
+BEGIN;
+LOAD DATA INFILE 'VARDIR/tmp/t.outfile' INTO TABLE t;
+COMMIT;
+DROP TABLE t;
+#
+# MDEV-33934 Assertion `!check_foreigns' failed in
+# trx_t::bulk_insert_apply_for_table(dict_table_t*)
+#
+CREATE TABLE t1(f1 INT,f2 INT,KEY(f1))engine=innodb;
+BEGIN;
+INSERT INTO t1 VALUES();
+SET STATEMENT FOREIGN_KEY_CHECKS=1 FOR SELECT * FROM t1;
+f1 f2
+NULL NULL
+COMMIT;
+DROP TABLE t1;
+#
+# MDEV-33970 Assertion `!m.first->second.is_bulk_insert()'
+# failed in trx_undo_report_row_operation()
+#
+CREATE TABLE t1(c1 INT,c2 CHAR) ENGINE=INNODB PARTITION BY KEY(c1) PARTITIONS 2;
+begin;
+INSERT INTO t1 VALUES(2,0);
+DELETE FROM t1;
+commit;
+DROP TABLE t1;
+# End of 10.11 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result
index e423afe1..565f7e4b 100644
--- a/mysql-test/suite/innodb/r/instant_alter_crash.result
+++ b/mysql-test/suite/innodb/r/instant_alter_crash.result
@@ -202,27 +202,3 @@ Table Op Msg_type Msg_text
test.t2 check status OK
DROP TABLE t1,t2;
db.opt
-#
-# MDEV-26198 Assertion `0' failed in row_log_table_apply_op during
-# ADD PRIMARY KEY or OPTIMIZE TABLE
-#
-CREATE TABLE t1(f1 year default null, f2 year default null,
-f3 text, f4 year default null, f5 year default null,
-f6 year default null, f7 year default null,
-f8 year default null)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
-INSERT INTO t1 VALUES(1, 1, 1, 1, 1, 1, 1, 1);
-ALTER TABLE t1 ADD COLUMN f9 year default null, ALGORITHM=INPLACE;
-set DEBUG_SYNC="row_log_table_apply1_before SIGNAL con1_insert WAIT_FOR con1_finish";
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ADD COLUMN f10 YEAR DEFAULT NULL, ALGORITHM=INPLACE;
-connect con1,localhost,root,,,;
-SET DEBUG_SYNC="now WAIT_FOR con1_insert";
-INSERT IGNORE INTO t1 (f3) VALUES ( 'b' );
-INSERT IGNORE INTO t1 (f3) VALUES ( 'l' );
-SET DEBUG_SYNC="now SIGNAL con1_finish";
-connection default;
-disconnect con1;
-SET DEBUG_SYNC=RESET;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff b/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
index f442e406..cf72c37b 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter_debug,redundant.rdiff
@@ -2,7 +2,7 @@
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
--35
-+36
+-37
++38
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
# End of 10.6 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result
index d6d49047..733a85aa 100644
--- a/mysql-test/suite/innodb/r/instant_alter_debug.result
+++ b/mysql-test/suite/innodb/r/instant_alter_debug.result
@@ -477,10 +477,59 @@ 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;
+#
+# MDEV-26198 Assertion `0' failed in row_log_table_apply_op during
+# ADD PRIMARY KEY or OPTIMIZE TABLE
+#
+CREATE TABLE t1(f1 year default null, f2 year default null,
+f3 text, f4 year default null, f5 year default null,
+f6 year default null, f7 year default null,
+f8 year default null)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1, 1, 1, 1, 1, 1, 1);
+ALTER TABLE t1 ADD COLUMN f9 year default null, ALGORITHM=INPLACE;
+set DEBUG_SYNC="row_log_table_apply1_before SIGNAL con1_insert WAIT_FOR con1_finish";
+ALTER TABLE t1 ADD COLUMN f10 YEAR DEFAULT NULL, FORCE, ALGORITHM=INPLACE;
+connection con1;
+SET DEBUG_SYNC="now WAIT_FOR con1_insert";
+INSERT IGNORE INTO t1 (f3) VALUES ( 'b' );
+INSERT IGNORE INTO t1 (f3) VALUES ( 'l' );
+SET DEBUG_SYNC="now SIGNAL con1_finish";
+connection default;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
+#
+# MDEV-19044 Alter table corrupts while applying the
+# modification log
+#
+CREATE TABLE t1 (
+f1 INT,
+f2 INT,
+f3 char(19) CHARACTER SET utf8mb3,
+f4 VARCHAR(500),
+f5 TEXT)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(3, 1, REPEAT('a', 2), REPEAT("b", 20),'a');
+ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL, ALGORITHM=INSTANT;
+INSERT INTO t1 VALUES(1, 2, REPEAT('InnoDB', 2),
+REPEAT("MariaDB", 20), REPEAT('a', 8000), 12);
+INSERT INTO t1 VALUES(1, 2, REPEAT('MYSQL', 2),
+REPEAT("MariaDB", 20), REPEAT('a', 8000), 12);
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL con1_begin WAIT_FOR con1_update';
+ALTER TABLE t1 MODIFY COLUMN f2 INT NOT NULL, FORCE, ALGORITHM=INPLACE;
+connection con1;
+SET DEBUG_SYNC='now WAIT_FOR con1_begin';
+UPDATE t1 SET f2=204 order by f1 limit 2;
+SET DEBUG_SYNC='now SIGNAL con1_update';
+connection default;
+disconnect con1;
SET DEBUG_SYNC=reset;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
# End of 10.4 tests
#
# MDEV-22867 Assertion instant.n_core_fields == n_core_fields
@@ -525,6 +574,6 @@ SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
-35
+37
SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
# End of 10.6 tests
diff --git a/mysql-test/suite/innodb/r/instant_alter_extend.result b/mysql-test/suite/innodb/r/instant_alter_extend.result
index 33a5f57c..c22043ec 100644
--- a/mysql-test/suite/innodb/r/instant_alter_extend.result
+++ 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 3e7ee35f..6fe48fb6 100644
--- a/mysql-test/suite/innodb/r/instant_alter_import.result
+++ b/mysql-test/suite/innodb/r/instant_alter_import.result
@@ -64,6 +64,7 @@ alter table t1 discard tablespace;
flush tables t2 for export;
unlock tables;
alter table t1 import tablespace;
+# restart
select * from t1;
z
42
diff --git a/mysql-test/suite/innodb/r/lock_insert_into_empty.result b/mysql-test/suite/innodb/r/lock_insert_into_empty.result
index c1dea2fc..97369b58 100644
--- a/mysql-test/suite/innodb/r/lock_insert_into_empty.result
+++ b/mysql-test/suite/innodb/r/lock_insert_into_empty.result
@@ -47,6 +47,9 @@ CREATE TABLE t1 (k INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SET k=1;
START TRANSACTION;
INSERT INTO t1 SET k=2;
+SELECT count(*) > 0 FROM mysql.innodb_index_stats lock in share mode;
+count(*) > 0
+1
connect con1,localhost,root,,test;
SET innodb_lock_wait_timeout=0;
CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB
@@ -54,4 +57,6 @@ AS SELECT k FROM t1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
disconnect con1;
connection default;
+SET innodb_lock_wait_timeout=default;
DROP TABLE t1;
+DROP TABLE IF EXISTS t2;
diff --git a/mysql-test/suite/innodb/r/lock_isolation.result b/mysql-test/suite/innodb/r/lock_isolation.result
new file mode 100644
index 00000000..31843266
--- /dev/null
+++ b/mysql-test/suite/innodb/r/lock_isolation.result
@@ -0,0 +1,136 @@
+#
+# MDEV-26642 Weird SELECT view when a record is
+# modified to the same value by two transactions
+# MDEV-32898 Phantom rows caused by updates of PRIMARY KEY
+#
+CREATE TABLE t(a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t VALUES (1,1),(2,2);
+BEGIN;
+SELECT * FROM t LOCK IN SHARE MODE;
+a b
+1 1
+2 2
+connect con_weird,localhost,root;
+BEGIN;
+SELECT * FROM t;
+a b
+1 1
+2 2
+connect consistent,localhost,root;
+SET innodb_snapshot_isolation=ON;
+BEGIN;
+SELECT * FROM t;
+a b
+1 1
+2 2
+connection default;
+UPDATE t SET a=3 WHERE b=2;
+COMMIT;
+connection consistent;
+UPDATE t SET b=3;
+ERROR HY000: Record has changed since last read in table 't'
+SELECT * FROM t;
+a b
+1 1
+3 2
+COMMIT;
+connection con_weird;
+UPDATE t SET b=3;
+SELECT * FROM t;
+a b
+1 3
+2 2
+3 3
+COMMIT;
+connection default;
+SELECT * FROM t;
+a b
+1 3
+3 3
+DROP TABLE t;
+#
+# MDEV-26643 Inconsistent behaviors of UPDATE under
+# READ UNCOMMITTED and READ COMMITTED isolation level
+#
+CREATE TABLE t(a INT, b INT) ENGINE=InnoDB;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+BEGIN;
+UPDATE t SET a = 10;
+connection consistent;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+UPDATE t SET b = 20 WHERE a;
+connection default;
+COMMIT;
+connection consistent;
+SELECT * FROM t;
+a b
+10 20
+10 20
+connection default;
+TRUNCATE TABLE t;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+BEGIN;
+UPDATE t SET a = 10;
+connection consistent;
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+UPDATE t SET b = 20 WHERE a;
+connection default;
+COMMIT;
+connection consistent;
+SELECT * FROM t;
+a b
+10 20
+10 20
+connection default;
+TRUNCATE TABLE t;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+BEGIN;
+UPDATE t SET a = 10;
+connection con_weird;
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+UPDATE t SET b = 20 WHERE a;
+connection default;
+SELECT * FROM t;
+a b
+10 1
+10 2
+COMMIT;
+connection con_weird;
+COMMIT;
+connection default;
+SELECT * FROM t;
+a b
+10 1
+10 20
+DROP TABLE t;
+#
+# MDEV-33802 Weird read view after ROLLBACK of other transactions
+#
+CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t SET a=1;
+BEGIN;
+INSERT INTO t SET a=2;
+connection consistent;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+ERROR HY000: Record has changed since last read in table 't'
+connection con_weird;
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+connection default;
+ROLLBACK;
+connection con_weird;
+a b
+1 NULL
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+a b
+1 NULL
+disconnect con_weird;
+connection consistent;
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+a b
+1 NULL
+disconnect consistent;
+connection default;
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/log_upgrade_101_flags.result b/mysql-test/suite/innodb/r/log_upgrade_101_flags.result
new file mode 100644
index 00000000..6ae7c848
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_upgrade_101_flags.result
@@ -0,0 +1,12 @@
+call mtr.add_suppression("InnoDB: The change buffer is corrupted");
+call mtr.add_suppression("InnoDB: Tablespace size stored in header is 768 pages, but the sum of data file sizes is 384 pages");
+call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file");
+# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/log_upgrade --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/log_upgrade --innodb-force-recovery=5 --innodb-log-file-size=4m --innodb_page_size=32k --innodb_buffer_pool_size=10M
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+COUNT(*)
+1
+FOUND 1 /InnoDB: Upgrading redo log:/ in mysqld.1.err
+# restart
+# End of 10.5 tests
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff
index 118145be..118145be 100644
--- a/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff
index 33067866..33067866 100644
--- a/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff
index e50e4d2b..e50e4d2b 100644
--- a/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff
index 1bc03a5d..1bc03a5d 100644
--- a/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff
index 71c4c2e4..71c4c2e4 100644
--- a/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff
index e42b3de8..e42b3de8 100644
--- a/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff
index 6f08dab3..6f08dab3 100644
--- a/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff
index bd37d435..bd37d435 100644
--- a/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff
index 93c39ff6..93c39ff6 100644
--- a/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff
index 5e6c6221..5e6c6221 100644
--- a/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff
index 2cbf4cd9..2cbf4cd9 100644
--- a/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff
index c324969f..c324969f 100644
--- a/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,redundant.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff
index 4db669a8..4db669a8 100644
--- a/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,8k,compact.rdiff
diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff
index 5f79d77e..5f79d77e 100644
--- a/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic.rdiff
diff --git a/mysql-test/suite/innodb/r/monitor.result b/mysql-test/suite/innodb/r/monitor.result
index d99dd69e..1834032e 100644
--- a/mysql-test/suite/innodb/r/monitor.result
+++ b/mysql-test/suite/innodb/r/monitor.result
@@ -51,7 +51,6 @@ buffer_flush_n_to_flush_by_age disabled
buffer_flush_adaptive_avg_time disabled
buffer_flush_adaptive_avg_pass disabled
buffer_LRU_get_free_loops disabled
-buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -71,7 +70,6 @@ buffer_LRU_batch_num_scan disabled
buffer_LRU_batch_scanned_per_call disabled
buffer_LRU_batch_flush_total_pages enabled
buffer_LRU_batch_evict_total_pages enabled
-buffer_LRU_single_flush_failure_count disabled
buffer_LRU_get_free_search disabled
buffer_LRU_search_scanned disabled
buffer_LRU_search_num_scan disabled
@@ -198,6 +196,7 @@ icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
+create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
set global innodb_monitor_disable = All;
select name from information_schema.innodb_metrics where enabled;
name
@@ -431,7 +430,7 @@ set global innodb_monitor_reset_all = default;
# MONITORS
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*1*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 0
@@ -439,13 +438,13 @@ SET GLOBAL innodb_monitor_enable='module_buffer_page';
INSERT INTO t1 VALUES (1), (2), (3), (4);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*2*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
SET GLOBAL innodb_monitor_disable='module_buffer_page';
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*3*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 0
@@ -455,13 +454,13 @@ ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value o
INSERT INTO t1 VALUES (5), (6), (7), (8);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*4*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
SET GLOBAL innodb_monitor_disable='%';
SET GLOBAL innodb_monitor_reset_all='%';
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*5*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 0
@@ -469,7 +468,7 @@ SET GLOBAL innodb_monitor_enable='ALL';
INSERT INTO t1 VALUES (9), (10), (11), (12);
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*6*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
NAME COUNT > 0
buffer_page_written_index_leaf 1
@@ -599,6 +598,41 @@ DROP TABLE t1;
DROP TABLE fl2;
DROP TABLE fl1;
DROP TABLE fl0;
-SET GLOBAL innodb_monitor_enable=default;
-SET GLOBAL innodb_monitor_disable=default;
-SET GLOBAL innodb_monitor_reset_all=default;
+set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
+set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
+set global innodb_monitor_disable = 'buffer\\_f%';
+set global innodb_monitor_disable = 'buffer\\_page\\_%';
+set global innodb_monitor_disable = 'c%';
+set global innodb_monitor_disable = 'ddl%';
+set global innodb_monitor_disable = 'icp%';
+set global innodb_monitor_disable = 'index\\_p%';
+set global innodb_monitor_disable = 'innodb\\_di%';
+set global innodb_monitor_disable = 'innodb\\_l%';
+set global innodb_monitor_disable = 'innodb\\_m%';
+set global innodb_monitor_disable = 'lock\\_re%';
+set global innodb_monitor_disable = 'lock\\_ta%';
+set global innodb_monitor_disable = 'log%';
+set global innodb_monitor_disable = 'm%';
+set global innodb_monitor_disable = 'p%';
+set global innodb_monitor_disable = 't%';
+set global innodb_monitor_enable = 'log\\_w%';
+set global innodb_monitor_enable = 'trx_rseg_history_len';
+set global innodb_monitor_enable = 'trx_undo_slots_cached';
+set global innodb_monitor_enable=default;
+Warnings:
+Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
+set global innodb_monitor_disable=default;
+Warnings:
+Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
+set global innodb_monitor_reset_all=default;
+Warnings:
+Warning 1230 Default value is not defined for this set option. Please specify correct counter or module name.
+select name, orig.enabled, new.enabled from
+orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
+where orig.enabled != new.enabled;
+name enabled enabled
diff --git a/mysql-test/suite/innodb/r/rename_table.result b/mysql-test/suite/innodb/r/rename_table.result
index 0ed56005..a3bf5910 100644
--- a/mysql-test/suite/innodb/r/rename_table.result
+++ b/mysql-test/suite/innodb/r/rename_table.result
@@ -21,11 +21,17 @@ path
DROP DATABASE abc_def;
# restart
DROP DATABASE abc_def2;
-call mtr.add_suppression("InnoDB: (Operating system error|Error number \\d+ means|Cannot rename file)");
+call mtr.add_suppression("InnoDB: Cannot rename '.*t1.ibd' to '.*non_existing_db.*' because the target schema directory doesn't exist");
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(100);
RENAME TABLE t1 TO non_existing_db.t1;
ERROR HY000: Error on rename of './test/t1' to './non_existing_db/t1' (errno: 168 "Unknown (generic) error from engine")
-FOUND 1 /\[ERROR\] InnoDB: Cannot rename file '.*t1\.ibd' to '.*non_existing_db/ in mysqld.1.err
+FOUND 1 /\[ERROR\] InnoDB: Cannot rename '.*t1\.ibd' to '.*non_existing_db/ in mysqld.1.err
+SET GLOBAL innodb_fast_shutdown=2;
+# restart
+SELECT * FROM t1;
+a
+100
DROP TABLE t1;
#
# MDEV-25509 Atomic DDL: Assertion `err != DB_DUPLICATE_KEY'
diff --git a/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,16k.rdiff
index b36ed067..b36ed067 100644
--- a/mysql-test/suite/innodb/r/restart,16k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,16k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,32k.rdiff
index 8fa05781..8fa05781 100644
--- a/mysql-test/suite/innodb/r/restart,32k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,32k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,4k.rdiff
index 7d084636..7d084636 100644
--- a/mysql-test/suite/innodb/r/restart,4k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,4k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,64k.rdiff
index 3ac9f45b..3ac9f45b 100644
--- a/mysql-test/suite/innodb/r/restart,64k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,64k.rdiff
diff --git a/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff b/mysql-test/suite/innodb/r/restart,8k.rdiff
index 4da55ebf..4da55ebf 100644
--- a/mysql-test/suite/innodb/r/restart,8k,innodb.rdiff
+++ b/mysql-test/suite/innodb/r/restart,8k.rdiff
diff --git a/mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff
new file mode 100644
index 00000000..812632ac
--- /dev/null
+++ b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3,4k.rdiff
@@ -0,0 +1,2 @@
+91a92
+> ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1982. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
diff --git a/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
index 21085e4c..1fde89ac 100644
--- a/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
+++ b/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result
@@ -82,3 +82,11 @@ f29(10), f30(10), f31(10), f32(10),
f33(10)))
ENGINE=InnoDB;
ERROR 42000: Too many key parts specified; max 32 parts allowed
+#
+# MDEV-31161 Assertion failures upon adding a too long key
+# to table with COMPRESSED row format
+#
+CREATE TABLE t1(pk INT PRIMARY KEY, f1 INT, f2 TEXT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+INSERT INTO t1 (pk) VALUES (1);
+ALTER TABLE t1 ADD KEY (f1), ADD KEY (f2(1000));
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/undo_space_dblwr.result b/mysql-test/suite/innodb/r/undo_space_dblwr.result
index d6822b20..4466df98 100644
--- a/mysql-test/suite/innodb/r/undo_space_dblwr.result
+++ b/mysql-test/suite/innodb/r/undo_space_dblwr.result
@@ -4,15 +4,14 @@ Variable_name Value
innodb_doublewrite ON
create table t1(f1 int not null, f2 int not null)engine=innodb;
insert into t1 values (1, 1);
-InnoDB 0 transactions not purged
-set GLOBAL innodb_log_checkpoint_now=1;
+SET GLOBAL innodb_fast_shutdown = 0;
+# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
# Make the first page dirty for undo tablespace
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = 1;
-SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
-SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+SET GLOBAL innodb_buf_flush_list_now = 1;
# Kill the server
-# restart
+# restart: --debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0
FOUND 1 /Checksum mismatch in the first page of file/ in mysqld.1.err
check table t1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/suite/innodb/r/undo_truncate.result b/mysql-test/suite/innodb/r/undo_truncate.result
index f90bef94..6d77baa9 100644
--- a/mysql-test/suite/innodb/r/undo_truncate.result
+++ b/mysql-test/suite/innodb/r/undo_truncate.result
@@ -27,6 +27,7 @@ delete from t1;
connection con2;
delete from t2;
connection con1;
+SET GLOBAL innodb_max_undo_log_size = @@GLOBAL.innodb_page_size * 4294967296;
SET GLOBAL innodb_undo_log_truncate = 1;
commit;
disconnect con1;
@@ -35,6 +36,8 @@ commit;
disconnect con2;
connection default;
SET GLOBAL innodb_max_purge_lag_wait=0;
+SET GLOBAL innodb_max_undo_log_size=DEFAULT;
+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/t/alter_copy.test b/mysql-test/suite/innodb/t/alter_copy.test
index b62f812f..90f2171d 100644
--- a/mysql-test/suite/innodb/t/alter_copy.test
+++ b/mysql-test/suite/innodb/t/alter_copy.test
@@ -57,7 +57,7 @@ ALTER TABLE t ADD INDEX(b,c,d,a),ADD INDEX(b,c,a,d),ADD INDEX(b,a,c,d),ADD INDEX
connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
let $shutdown_timeout=0;
---let $restart_parameters= --innodb-force-recovery=3 --debug_dbug="+d,recv_ran_out_of_buffer"
+--let $restart_parameters= --innodb-force-recovery=3
--source include/restart_mysqld.inc
disconnect hang;
let $shutdown_timeout=;
diff --git a/mysql-test/suite/innodb/t/alter_crash.test b/mysql-test/suite/innodb/t/alter_crash.test
index 164ff877..f56dcf2c 100644
--- a/mysql-test/suite/innodb/t/alter_crash.test
+++ b/mysql-test/suite/innodb/t/alter_crash.test
@@ -70,7 +70,7 @@ let $orig_table_id = `SELECT table_id
WHERE name = 'test/t1'`;
# Write file to make mysql-test-run.pl expect crash
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
@@ -110,7 +110,7 @@ let $orig_table_id = `SELECT table_id
WHERE name = 'test/t2'`;
# Write file to make mysql-test-run.pl expect crash
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
@@ -150,7 +150,7 @@ let $orig_table_id = `select table_id from
information_schema.innodb_sys_tables where name = 'test/t1'`;
# Write file to make mysql-test-run.pl expect crash
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
#
--error 2013
ALTER TABLE t1 ADD INDEX (b), CHANGE c d int, ALGORITHM=INPLACE;
diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test
index 7d83e7e3..100beb76 100644
--- a/mysql-test/suite/innodb/t/alter_kill.test
+++ b/mysql-test/suite/innodb/t/alter_kill.test
@@ -76,7 +76,7 @@ EOF
-- source include/start_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT COUNT(*) FROM bug16720368;
--error ER_TABLE_CORRUPT
INSERT INTO bug16720368 VALUES(1);
diff --git a/mysql-test/suite/innodb/t/alter_rename_existing.test b/mysql-test/suite/innodb/t/alter_rename_existing.test
index 556d8e66..f09456e7 100644
--- a/mysql-test/suite/innodb/t/alter_rename_existing.test
+++ b/mysql-test/suite/innodb/t/alter_rename_existing.test
@@ -18,7 +18,7 @@ INSERT INTO t1(b) VALUES('one'), ('two'), ('three');
--echo #
--echo # Create a file called MYSQLD_DATADIR/test/t1.ibd
---exec echo "This is not t1.ibd" > $MYSQLD_DATADIR/test/t1.ibd
+--write_line "This is not t1.ibd" $MYSQLD_DATADIR/test/t1.ibd
--echo # Directory listing of test/*.ibd
--echo #
diff --git a/mysql-test/suite/innodb/t/autoinc_debug.test b/mysql-test/suite/innodb/t/autoinc_debug.test
index 7722b848..d38a70b3 100644
--- a/mysql-test/suite/innodb/t/autoinc_debug.test
+++ b/mysql-test/suite/innodb/t/autoinc_debug.test
@@ -92,3 +92,69 @@ SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
SET DEBUG_SYNC='RESET';
+
+--echo #
+--echo # MDEV-33593: Auto increment deadlock error causes ASSERT in subsequent save point
+--echo #
+
+CREATE TABLE t1(col1 INT PRIMARY KEY AUTO_INCREMENT, col2 INT) ENGINE=InnoDB;
+CREATE TABLE t2(col1 INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1(col2) values(100);
+
+--connect(con1, localhost, root,,)
+START TRANSACTION;
+--echo # T1: Acquiring Row X lock on table t2
+INSERT INTO t2 values(100);
+
+--connect(con2, localhost, root,,)
+START TRANSACTION;
+--echo # T2: Wait for (T1) row lock on t2 after acquiring GAP Lock on t1
+UPDATE t1 SET col2 = 20 where col1 = 10;
+SET DEBUG_SYNC='lock_wait_before_suspend SIGNAL t2_waiting';
+--send INSERT INTO t2 values(100)
+
+--connection default
+SET DEBUG_SYNC='now WAIT_FOR t2_waiting';
+--echo # T3: Wait for (T2) II row Lock on t1 after acquiring Auto Increment Lock on t1
+SET DEBUG_SYNC='lock_wait_before_suspend SIGNAL t3_waiting';
+--send INSERT INTO t1(col2) SELECT col2 from t1
+
+--connection con1
+SAVEPOINT s1;
+SET DEBUG_SYNC='now WAIT_FOR t3_waiting';
+--echo # T1: Wait for (T3) auto increment lock on t1 causing T1 -> T3 -> T2 -> T1 deadlock
+SET debug_dbug = '+d,innodb_deadlock_victim_self';
+--error ER_AUTOINC_READ_FAILED
+INSERT INTO t1(col2) VALUES(200);
+
+--echo # The transaction should have been rolled back
+SELECT * FROM t1;
+SELECT * FROM t2;
+
+--echo # Release the previous savepoint using the same name
+SAVEPOINT s1;
+COMMIT;
+
+--connection con2
+--reap
+COMMIT;
+
+--connection default
+--reap
+COMMIT;
+
+--disconnect con1
+--disconnect con2
+
+--echo # Cleanup
+SELECT * FROM t1;
+DROP TABLE t1;
+
+SELECT * FROM t2;
+DROP TABLE t2;
+
+SET DEBUG_SYNC='RESET';
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/autoinc_import.test b/mysql-test/suite/innodb/t/autoinc_import.test
new file mode 100644
index 00000000..e137413d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/autoinc_import.test
@@ -0,0 +1,168 @@
+--source include/have_innodb.inc
+
+CREATE TABLE t1 (id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(42);
+CREATE TABLE t1b LIKE t1;
+INSERT INTO t1b VALUES(3);
+CREATE TABLE t1z LIKE t1;
+CREATE TABLE t1t (id TINYINT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t0t LIKE t1t;
+INSERT INTO t1t VALUES(123);
+--let DATADIR=`select @@datadir`
+--let PAGE_SIZE=`select @@innodb_page_size`
+FLUSH TABLES t1,t1b,t1t FOR EXPORT;
+--copy_file $DATADIR/test/t1.ibd $DATADIR/test/t.ibd
+--copy_file $DATADIR/test/t1.ibd $DATADIR/test/tz.ibd
+--copy_file $DATADIR/test/t1b.ibd $DATADIR/test/tb.ibd
+--copy_file $DATADIR/test/t1t.ibd $DATADIR/test/tt.ibd
+UNLOCK TABLES;
+CREATE TABLE t5_7 LIKE t1;
+CREATE TABLE t5_7b LIKE t1b;
+CREATE TABLE t10_1 LIKE t1;
+CREATE TABLE t10_1b LIKE t1b;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1b DISCARD TABLESPACE;
+ALTER TABLE t1z DISCARD TABLESPACE;
+ALTER TABLE t1t DISCARD TABLESPACE;
+ALTER TABLE t0t DISCARD TABLESPACE;
+ALTER TABLE t5_7 DISCARD TABLESPACE;
+ALTER TABLE t5_7b DISCARD TABLESPACE;
+ALTER TABLE t10_1 DISCARD TABLESPACE;
+ALTER TABLE t10_1b DISCARD TABLESPACE;
+FLUSH TABLES;
+
+# Update the PAGE_ROOT_AUTO_INC field of a few files.
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
+sub update_autoinc
+{
+ my ($file, $value) = @_;
+ 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,56,8)=pack("NN",0,$value);
+ my $polynomial = 0x82f63b78; # CRC-32C
+ 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, 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";
+}
+update_autoinc("$ENV{DATADIR}/test/tz.ibd", 0);
+update_autoinc("$ENV{DATADIR}/test/t.ibd", 3);
+update_autoinc("$ENV{DATADIR}/test/tb.ibd", 346);
+update_autoinc("$ENV{DATADIR}/test/tt.ibd", 128);
+EOF
+
+--remove_file $DATADIR/test/t5_7.frm
+--remove_file $DATADIR/test/t5_7b.frm
+--copy_file $MYSQL_TEST_DIR/std_data/autoinc_import_57.frm $DATADIR/test/t5_7.frm
+--copy_file $MYSQL_TEST_DIR/std_data/autoinc_import_57.frm $DATADIR/test/t5_7b.frm
+--remove_file $DATADIR/test/t10_1.frm
+--remove_file $DATADIR/test/t10_1b.frm
+--copy_file $MYSQL_TEST_DIR/std_data/autoinc_import_101.frm $DATADIR/test/t10_1.frm
+--copy_file $MYSQL_TEST_DIR/std_data/autoinc_import_101.frm $DATADIR/test/t10_1b.frm
+--copy_file $DATADIR/test/t.ibd $DATADIR/test/t5_7.ibd
+--copy_file $DATADIR/test/tb.ibd $DATADIR/test/t5_7b.ibd
+--copy_file $DATADIR/test/t.ibd $DATADIR/test/t10_1.ibd
+--copy_file $DATADIR/test/tb.ibd $DATADIR/test/t10_1b.ibd
+--move_file $DATADIR/test/t.ibd $DATADIR/test/t1.ibd
+--move_file $DATADIR/test/tb.ibd $DATADIR/test/t1b.ibd
+--copy_file $DATADIR/test/tt.ibd $DATADIR/test/t0t.ibd
+--move_file $DATADIR/test/tt.ibd $DATADIR/test/t1t.ibd
+--move_file $DATADIR/test/tz.ibd $DATADIR/test/t1z.ibd
+
+ALTER TABLE t0t IMPORT TABLESPACE;
+INSERT INTO t0t VALUES(NULL);
+SELECT * FROM t0t;
+DROP TABLE t0t;
+ALTER TABLE t1 IMPORT TABLESPACE;
+ALTER TABLE t1b IMPORT TABLESPACE;
+ALTER TABLE t1z IMPORT TABLESPACE;
+ALTER TABLE t1t IMPORT TABLESPACE;
+ALTER TABLE t5_7 IMPORT TABLESPACE;
+ALTER TABLE t5_7b IMPORT TABLESPACE;
+ALTER TABLE t10_1 IMPORT TABLESPACE;
+ALTER TABLE t10_1b IMPORT TABLESPACE;
+
+--let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN= InnoDB: Resetting PAGE_ROOT_AUTO_INC from 128 to 123 on table `test`\.`t0t`
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= InnoDB: Resetting PAGE_ROOT_AUTO_INC from 0 to 42 on table `test`\.`t1z`
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= InnoDB: Resetting PAGE_ROOT_AUTO_INC from 128 to 123 on table `test`\.`t1t`
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= InnoDB: Resetting PAGE_ROOT_AUTO_INC from 3 to 42 on table `test`\.`t5_7` \(created with version 50744\)
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= InnoDB: Resetting PAGE_ROOT_AUTO_INC from 3 to 42 on table `test`\.`t10_1` \(created with version 100149\)
+--source include/search_pattern_in_file.inc
+--let SEARCH_PATTERN= InnoDB: Resetting PAGE_ROOT_AUTO_INC
+--source include/search_pattern_in_file.inc
+
+# Restart, so that the InnoDB tables will be loaded into the data dictionary.
+--let $restart_parameters=--read-only
+--source include/restart_mysqld.inc
+
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+
+--let $restart_parameters=--innodb-read-only --read-only
+--source include/restart_mysqld.inc
+
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+
+--let $restart_parameters=--innodb-read-only
+--source include/restart_mysqld.inc
+
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+
+SELECT COUNT(*) FROM t1;
+SELECT COUNT(*) FROM t1b;
+SELECT COUNT(*) FROM t1t;
+SELECT COUNT(*) FROM t1z;
+SELECT COUNT(*) FROM t5_7;
+SELECT COUNT(*) FROM t5_7b;
+SELECT COUNT(*) FROM t10_1;
+SELECT COUNT(*) FROM t10_1b;
+
+--let $restart_parameters=
+--source include/restart_mysqld.inc
+
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+
+INSERT INTO t1 VALUES(NULL);
+INSERT INTO t1b VALUES(NULL);
+INSERT INTO t1t VALUES(NULL);
+INSERT INTO t1z VALUES(NULL);
+INSERT INTO t5_7 VALUES(NULL);
+INSERT INTO t5_7b VALUES(NULL);
+INSERT INTO t10_1 VALUES(NULL);
+INSERT INTO t10_1b VALUES(NULL);
+
+CHECK TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b FOR UPGRADE;
+
+SELECT * FROM t1;
+SELECT * FROM t1b;
+SELECT * FROM t1t;
+SELECT * FROM t1z;
+SELECT * FROM t5_7;
+SELECT * FROM t5_7b;
+SELECT * FROM t10_1;
+SELECT * FROM t10_1b;
+DROP TABLE t1, t1b, t1t, t1z, t5_7, t5_7b, t10_1, t10_1b;
diff --git a/mysql-test/suite/innodb/t/corrupted_during_recovery.test b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
index 1f410246..83240549 100644
--- a/mysql-test/suite/innodb/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
@@ -7,7 +7,7 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page .*, page number=3\\]");
-call mtr.add_suppression("Table test/t1 is corrupted. Please drop the table and recreate\\.");
+call mtr.add_suppression("Table `test`.`t1` is corrupted. Please drop the table and recreate.");
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
call mtr.add_suppression("InnoDB: A long wait .* was observed for dict_sys");
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/cursor-restore-unique-null.test b/mysql-test/suite/innodb/t/cursor-restore-unique-null.test
new file mode 100644
index 00000000..409694d6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/cursor-restore-unique-null.test
@@ -0,0 +1,36 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/count_sessions.inc
+
+
+CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, UNIQUE KEY `b_c` (`b`,`c`))
+ ENGINE=InnoDB, STATS_PERSISTENT=0;
+INSERT INTO t SET a = 1, c = 2;
+
+--connect con1,localhost,root
+BEGIN;
+ INSERT INTO t SET a=2, c=2;
+
+--connection default
+BEGIN;
+SET DEBUG_SYNC="lock_wait_start SIGNAL select_locked";
+--send SELECT * FROM t FORCE INDEX(b) FOR UPDATE
+
+--connection con1
+SET DEBUG_SYNC="now WAIT_FOR select_locked";
+ROLLBACK;
+
+--connection default
+--echo # If the bug is not fixed, and the both unique index key fields are
+--echo # NULL, there will be two (1, NULL, 2) rows in the result,
+--echo # because cursor will be restored to (NULL, 2, 1) position for
+--echo # secondary key instead of "supremum".
+--reap
+COMMIT;
+
+SET DEBUG_SYNC="RESET";
+
+--disconnect con1
+DROP TABLE t;
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/doublewrite_debug.test b/mysql-test/suite/innodb/t/doublewrite_debug.test
index ab7fd8eb..b8dcd506 100644
--- a/mysql-test/suite/innodb/t/doublewrite_debug.test
+++ b/mysql-test/suite/innodb/t/doublewrite_debug.test
@@ -45,7 +45,7 @@ commit work;
# Slow shutdown and restart to make sure ibuf merge is finished
SET GLOBAL innodb_fast_shutdown = 0;
let $shutdown_timeout=;
-let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
+let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
--source include/restart_mysqld.inc
--source ../include/no_checkpoint_start.inc
begin;
@@ -95,7 +95,7 @@ select f1, f2 from t1;
--echo # Test Begin: Test if recovery works if 1st page of
--echo # system tablespace is corrupted and 2nd page as corrupted.
-let $restart_parameters="--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0";
+let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
--source include/restart_mysqld.inc
--source ../include/no_checkpoint_start.inc
begin;
diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test
index 0db3a7ca..e793e261 100644
--- a/mysql-test/suite/innodb/t/foreign_key.test
+++ b/mysql-test/suite/innodb/t/foreign_key.test
@@ -1077,10 +1077,23 @@ BEGIN;
--error ER_NO_REFERENCED_ROW_2
INSERT INTO child SET a=1;
connection default;
+--error ER_TRUNCATE_ILLEGAL_FK
+TRUNCATE TABLE parent;
+--error ER_ROW_IS_REFERENCED_2
+DROP TABLE parent;
+SET innodb_lock_wait_timeout=0;
+--error ER_LOCK_WAIT_TIMEOUT
+RENAME TABLE parent TO transparent;
+--error ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE parent FORCE, ALGORITHM=COPY;
+--error ER_LOCK_WAIT_TIMEOUT
+ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
SET innodb_lock_wait_timeout=0, foreign_key_checks=0;
--error ER_LOCK_WAIT_TIMEOUT
TRUNCATE TABLE parent;
--error ER_LOCK_WAIT_TIMEOUT
+DROP TABLE parent;
+--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE parent FORCE, ALGORITHM=COPY;
--error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
@@ -1095,7 +1108,13 @@ TRUNCATE TABLE parent;
ALTER TABLE parent FORCE, ALGORITHM=COPY;
ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
ALTER TABLE parent ADD COLUMN b INT, ALGORITHM=INSTANT;
-DROP TABLE child, parent;
+SET foreign_key_checks=ON;
+--error ER_TRUNCATE_ILLEGAL_FK
+TRUNCATE TABLE parent;
+ALTER TABLE parent FORCE, ALGORITHM=COPY;
+ALTER TABLE parent FORCE, ALGORITHM=INPLACE;
+RENAME TABLE parent TO transparent;
+DROP TABLE child, transparent;
--echo #
--echo # MDEV-26217 Failing assertion: list.count > 0 in ut_list_remove
diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test
index 0eb31f8d..6f02b2ab 100644
--- a/mysql-test/suite/innodb/t/full_crc32_import.test
+++ b/mysql-test/suite/innodb/t/full_crc32_import.test
@@ -63,6 +63,12 @@ ALTER TABLE t1 DROP INDEX b;
ALTER TABLE t1 IMPORT TABLESPACE;
--enable_warnings
SHOW CREATE TABLE t1;
+
+--echo # Auto increment value must be more than maximum column value
+SELECT MAX(a) FROM t1;
+SELECT auto_increment FROM information_schema.tables
+WHERE table_name like '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);
@@ -145,6 +151,12 @@ ALTER TABLE t1 DROP INDEX idx1;
ALTER TABLE t1 IMPORT TABLESPACE;
--disable_warnings
SHOW CREATE TABLE t1;
+
+--echo # Auto increment value must be more than maximum column value
+SELECT MAX(c1) FROM t1;
+SELECT auto_increment FROM information_schema.tables
+WHERE table_name like 't1';
+
UPDATE t1 SET C2 = ST_GeomFromText('POINT(0 0)');
SELECT COUNT(*) FROM t1;
DELETE FROM t1;
diff --git a/mysql-test/suite/innodb/t/group_commit_crash.test b/mysql-test/suite/innodb/t/group_commit_crash.test
index 12f7ba20..b0ed854f 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash.test
+++ b/mysql-test/suite/innodb/t/group_commit_crash.test
@@ -51,7 +51,7 @@ while ($numtests)
START TRANSACTION;
insert into t1 select * from t2;
# Write file to make mysql-test-run.pl expect crash
- --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
eval call setcrash($numtests);
diff --git a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
index 6115e3f0..9b7de7ce 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
+++ b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
@@ -51,7 +51,7 @@ while ($numtests)
START TRANSACTION;
insert into t1 select * from t2;
# Write file to make mysql-test-run.pl expect crash
- --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
eval call setcrash($numtests);
diff --git a/mysql-test/suite/innodb/t/import_bugs.test b/mysql-test/suite/innodb/t/import_bugs.test
index 7fcab9f9..d22b4b67 100644
--- a/mysql-test/suite/innodb/t/import_bugs.test
+++ b/mysql-test/suite/innodb/t/import_bugs.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+--source include/have_sequence.inc
call mtr.add_suppression("Index for table 'imp_t1' is corrupt; try to repair it");
@@ -23,6 +24,67 @@ DROP TABLE imp_t1, t1;
SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
--echo #
+--echo # MDEV-33400 Adaptive hash index corruption after DISCARD TABLESPACE
+--echo #
+
+SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
+SET GLOBAL innodb_adaptive_hash_index=ON;
+
+CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
+INSERT INTO t SELECT * FROM seq_1_to_131;
+ALTER TABLE t ADD hid INT DEFAULT 2;
+INSERT INTO t VALUES (251,1);
+ALTER TABLE t DISCARD TABLESPACE;
+CHECK TABLE mysql.innodb_table_stats;
+DROP TABLE t;
+SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;
+
+--echo # End of 10.4 tests
+
+--echo #
+--echo # MDEV-18288: Transportable Tablespaces leave AUTO_INCREMENT in mismatched
+--echo # state, causing INSERT errors in newly imported tables when .cfg is not used.
+--echo #
+
+CREATE TABLE t1(
+ id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (id)
+) ENGINE=INNODB;
+
+CREATE TABLE t2 LIKE t1;
+
+ALTER TABLE t2 DISCARD TABLESPACE;
+
+INSERT INTO t1() VALUES();
+INSERT INTO t1() VALUES();
+
+FLUSH TABLES test.t1 FOR EXPORT;
+
+--echo # Copy data file
+--copy_file $datadir/test/t1.ibd $datadir/test/t2.ibd
+
+--echo # Skip CFG file copy
+#--copy_file $datadir/test/t1.cfg $datadir/test/t2.cfg
+--remove_file $datadir/test/t1.cfg
+
+UNLOCK TABLES;
+DROP TABLE t1;
+
+--replace_regex /opening '.*\/test\//opening '.\/test\//
+ALTER TABLE t2 IMPORT TABLESPACE;
+
+SELECT * FROM t2 ORDER BY id;
+
+INSERT INTO t2() VALUES();
+INSERT INTO t2() VALUES();
+INSERT INTO t2() VALUES();
+
+SELECT * FROM t2 ORDER BY id;
+DROP TABLE t2;
+
+--echo # End of 10.5 tests
+
+--echo #
--echo # MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)'
--echo # failed in dberr_t row_discard_tablespace_for_mysql
--echo # (dict_table_t*, trx_t*)
diff --git a/mysql-test/suite/innodb/t/import_hidden_fts.test b/mysql-test/suite/innodb/t/import_hidden_fts.test
new file mode 100644
index 00000000..4129e258
--- /dev/null
+++ b/mysql-test/suite/innodb/t/import_hidden_fts.test
@@ -0,0 +1,46 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+# Table with virtual, fulltext, instant add, instant drop column
+# and purgeable rows
+call mtr.add_suppression("InnoDB: Added system generated FTS_DOC_ID and FTS_DOC_ID_INDEX while importing the tablespace");
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ f2 CHAR(2) not null, fulltext f_idx(f2),
+ f3 INT as (f1) VIRTUAL, INDEX(f3),
+ f4 INT as (f1) STORED, INDEX(f4),
+ f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
+INSERT INTO t1(f1, f2) VALUES(1, "on");
+INSERT INTO t1(f1, f2) SELECT seq, "si" FROM seq_2_to_256;
+ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL;
+ALTER TABLE t1 DROP COLUMN f6;
+ALTER TABLE t1 DROP INDEX f_idx;
+connect(con1,localhost,root,,);
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+
+connection default;
+DELETE FROM t1 WHERE f1 > 1;
+FLUSH TABLE t1 FOR EXPORT;
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+UNLOCK TABLES;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ f2 CHAR(2) not null,
+ f3 INT as (f1) VIRTUAL, INDEX(f3),
+ f4 INT as (f1) STORED, INDEX(f4),
+ f5 INT as (f1) VIRTUAL)ENGINE=InnoDB;
+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
+
+--disable_warnings
+ALTER TABLE t1 IMPORT TABLESPACE;
+--enable_warnings
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/import_hidden_fts_debug.test b/mysql-test/suite/innodb/t/import_hidden_fts_debug.test
new file mode 100644
index 00000000..e3d8680d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/import_hidden_fts_debug.test
@@ -0,0 +1,101 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ f2 CHAR(2) NOT NULL, FULLTEXT f_idx(f2),
+ f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB;
+INSERT INTO t1(f1, f2) VALUES(1, "on");
+ALTER TABLE t1 DROP INDEX f_idx;
+FLUSH TABLE t1 FOR EXPORT;
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+UNLOCK TABLES;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ f2 CHAR(2) NOT NULL,
+ f3 CHAR(2) NOT NULL,
+ f4 INT AS (f1) VIRTUAL, INDEX(f4))ENGINE=InnoDB;
+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
+--error ER_TABLE_SCHEMA_MISMATCH
+ALTER TABLE t1 IMPORT TABLESPACE;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ f2 CHAR(2) NOT NULL,
+ f3 INT as (f1) VIRTUAL, INDEX(f3))ENGINE=InnoDB;
+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
+
+--disable_warnings
+SET DEBUG_DBUG="+d,ib_import_set_index_root_failure";
+--error ER_TOO_MANY_CONCURRENT_TRXS
+ALTER TABLE t1 IMPORT TABLESPACE;
+SET DEBUG_DBUG="-d,ib_import_set_index_root_failure";
+
+SET DEBUG_DBUG="+d,ib_import_vcol_update_fail";
+--error ER_DUP_KEY
+ALTER TABLE t1 IMPORT TABLESPACE;
+SET DEBUG_DBUG="-d,ib_import_vcol_update_fail";
+
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "t1");
+ib_restore_tablespaces("test", "t1");
+EOF
+
+SET DEBUG_DBUG="+d,ib_import_fts_error";
+--error ER_DUP_KEY
+ALTER TABLE t1 IMPORT TABLESPACE;
+SET DEBUG_DBUG="-d,ib_import_fts_error";
+--enable_warnings
+
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_unlink_tablespace("test", "t1");
+EOF
+
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id IN (SELECT table_id FROM information_schema.innodb_sys_tables where name="test/t1");
+
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+# Manually add the FTS_DOC_ID Column with mismatched data type
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ FTS_DOC_ID BIGINT SIGNED NOT NULL,
+ f2 CHAR(2) NOT NULL,
+ FULLTEXT f_idx(f2))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1, "on");
+ALTER TABLE t1 DROP INDEX f_idx;
+FLUSH TABLE t1 FOR EXPORT;
+let MYSQLD_DATADIR =`SELECT @@datadir`;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "t1");
+EOF
+UNLOCK TABLES;
+DROP TABLE t1;
+
+CREATE TABLE t1(f1 INT NOT NULL PRIMARY KEY,
+ f2 CHAR(2) NOT NULL)ENGINE=InnoDB;
+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
+--error ER_TABLE_SCHEMA_MISMATCH
+ALTER TABLE t1 IMPORT TABLESPACE;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/index_length.test b/mysql-test/suite/innodb/t/index_length.test
index bf4940d4..03e61a5a 100644
--- a/mysql-test/suite/innodb/t/index_length.test
+++ b/mysql-test/suite/innodb/t/index_length.test
@@ -20,4 +20,12 @@ WHERE table_schema = 'test' AND table_name = 't1';
disconnect stop_purge;
DROP TABLE t1;
+--echo #
+--echo # MDEV-22855 Assertion (!field->prefix_len ||
+--echo # field->fixed_len == field->prefix_len)
+--echo # failed in btr_node_ptr_max_size
+--echo #
+CREATE TABLE t1(c CHAR(194) CHARACTER SET UTF32, KEY k1(c(193)))ENGINE=InnoDB;
+INSERT INTO t1 SET c='';
+DROP TABLE t1;
--echo # End of 10.4 tests
diff --git a/mysql-test/suite/innodb/t/index_merge_threshold.test b/mysql-test/suite/innodb/t/index_merge_threshold.test
index cb8e117d..acadf4f0 100644
--- a/mysql-test/suite/innodb/t/index_merge_threshold.test
+++ b/mysql-test/suite/innodb/t/index_merge_threshold.test
@@ -10,6 +10,7 @@
#
# Check actual behavior for table, partitioned table and temporary table
# #############################################################
+--source include/have_innodb.inc
--source include/have_innodb_16k.inc
--source include/have_partition.inc
diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test
index c4a68ac7..6b94bfd2 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test
@@ -144,15 +144,14 @@ DROP TABLE t;
--echo #
create table t1(f1 int not null primary key,
-
- f2 int not null, index idx(f2))engine=innodb;
+ f2 int not null, index idx(f2), index i(f2,f1))engine=innodb;
insert into t1 values(1, 1);
connect(con1,localhost,root,,,);
SET DEBUG_SYNC='before_delete_table_stats SIGNAL blocked WAIT_FOR go';
-SET innodb_lock_wait_timeout=0;
-send ALTER TABLE t1 FORCE, ALGORITHM=COPY;
+send SET STATEMENT innodb_lock_wait_timeout=0 FOR
+ALTER TABLE t1 FORCE, ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR blocked';
@@ -167,6 +166,21 @@ connection default;
COMMIT;
SET DEBUG_SYNC=RESET;
+RENAME TABLE mysql.innodb_table_stats TO mysql.innodb_table_stats_hidden;
+connection con1;
+SET DEBUG_SYNC='innodb_commit_inplace_before_lock SIGNAL blocked WAIT_FOR go';
+send ALTER TABLE t1 DROP INDEX i;
+
+connection default;
+SET DEBUG_SYNC='now WAIT_FOR blocked';
+RENAME TABLE mysql.innodb_table_stats_hidden TO mysql.innodb_table_stats;
+SET DEBUG_SYNC='now SIGNAL go';
+
+connection con1;
+reap;
+connection default;
+SET DEBUG_SYNC=RESET;
+
connection con1;
ALTER TABLE t1 RENAME KEY idx TO idx1, ALGORITHM=COPY;
disconnect con1;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
index 2534f03d..0b6cbabb 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
@@ -35,7 +35,7 @@ let datadir= `select @@datadir`;
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
SET debug_dbug='+d,innodb_alter_commit_crash_before_commit';
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
ALTER TABLE t1 ADD PRIMARY KEY (f2, f1);
diff --git a/mysql-test/suite/innodb/t/innodb-corrupted-table.test b/mysql-test/suite/innodb/t/innodb-corrupted-table.test
index a064f08d..dcdaa618 100644
--- a/mysql-test/suite/innodb/t/innodb-corrupted-table.test
+++ b/mysql-test/suite/innodb/t/innodb-corrupted-table.test
@@ -23,14 +23,14 @@ alter table t1 add primary key (pk);
--echo # Stop the server, replace the frm with the old one and restart the server
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
--remove_file $datadir/test/t1.frm
--copy_file $MYSQLTEST_VARDIR/tmp/t1.frm $datadir/test/t1.frm
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/innodb/t/innodb-lru-force-no-free-page.test b/mysql-test/suite/innodb/t/innodb-lru-force-no-free-page.test
deleted file mode 100644
index d4f08b5a..00000000
--- a/mysql-test/suite/innodb/t/innodb-lru-force-no-free-page.test
+++ /dev/null
@@ -1,24 +0,0 @@
---source include/have_innodb.inc
---source include/have_debug.inc
---source include/not_embedded.inc
-
-call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
-
-SET @saved_debug = @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,ib_lru_force_no_free_page";
-
-CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB;
-BEGIN;
-INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
-COMMIT;
-
-SET debug_dbug = @saved_debug;
-
-DROP TABLE t1;
-
-#
-# There should be only one message
-#
-let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
---let SEARCH_PATTERN=InnoDB: Difficult to find free blocks
---source include/search_pattern_in_file.inc
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index e642a949..2d3b5b3f 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -43,7 +43,7 @@ INSERT INTO t1 VALUES(1),(2),(3);
--let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect
---exec echo wait > $_expect_file_name
+--write_line wait $_expect_file_name
SET SESSION debug_dbug="+d,ib_discard_before_commit_crash";
--error 2013
ALTER TABLE t1 DISCARD TABLESPACE;
@@ -57,7 +57,7 @@ SET GLOBAL innodb_file_per_table = 1;
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO t1 VALUES(1),(2),(3);
---exec echo wait > $_expect_file_name
+--write_line wait $_expect_file_name
SET SESSION debug_dbug="+d,ib_discard_after_commit_crash";
--error 2013
ALTER TABLE t1 DISCARD TABLESPACE;
@@ -101,7 +101,7 @@ EOF
--error ER_TABLESPACE_DISCARDED
SELECT * FROM t1;
---exec echo wait > $_expect_file_name
+--write_line wait $_expect_file_name
SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
--error 2013
ALTER TABLE t1 IMPORT TABLESPACE;
diff --git a/mysql-test/suite/innodb/t/innodb_bug60196.test b/mysql-test/suite/innodb/t/innodb_bug60196.test
index 7f1f5c40..41b9a4d8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60196.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60196.test
@@ -58,7 +58,7 @@ SELECT * FROM bug_60196;
--echo # Restart server.
# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Turn on reconnect
--enable_reconnect
@@ -132,7 +132,7 @@ SELECT * FROM Bug_60309;
--echo # Restart server.
# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Turn on reconnect
--enable_reconnect
diff --git a/mysql-test/suite/innodb/t/innodb_defrag_stats.test b/mysql-test/suite/innodb/t/innodb_defrag_stats.test
index ef79d8d6..3730eb65 100644
--- a/mysql-test/suite/innodb/t/innodb_defrag_stats.test
+++ b/mysql-test/suite/innodb/t/innodb_defrag_stats.test
@@ -35,7 +35,7 @@ SELECT @@GLOBAL.innodb_force_recovery<2 "have background defragmentation";
# Wait for defrag_pool to be processed.
let $wait_timeout=30;
-let $wait_condition = SELECT COUNT(*)>0 FROM mysql.innodb_index_stats;
+let $wait_condition = SELECT COUNT(*)>5 FROM mysql.innodb_index_stats;
--source include/wait_condition.inc
--sorted_result
diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch.test b/mysql-test/suite/innodb/t/innodb_stats_fetch.test
index 99fc115a..d02cd3b8 100644
--- a/mysql-test/suite/innodb/t/innodb_stats_fetch.test
+++ b/mysql-test/suite/innodb/t/innodb_stats_fetch.test
@@ -96,3 +96,11 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-33462 Disallow LOCK=NONE operation on statistics table
+--echo #
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE mysql.innodb_table_stats FORCE, LOCK=NONE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE mysql.innodb_index_stats FORCE, LOCK=NONE;
diff --git a/mysql-test/suite/innodb/t/innodb_timeout_rollback.test b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
index 44e8acdd..aa282352 100644
--- a/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
+++ b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
@@ -1,4 +1,5 @@
+--source include/have_innodb.inc
--source include/innodb_rollback_on_timeout.inc
---echo End of 5.0 tests
+--echo # End of 5.0 tests
diff --git a/mysql-test/suite/innodb/t/innodb_ut_format_name.test b/mysql-test/suite/innodb/t/innodb_ut_format_name.test
deleted file mode 100644
index 6e4023c7..00000000
--- a/mysql-test/suite/innodb/t/innodb_ut_format_name.test
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Test ut_format_name()
-#
-
--- source include/have_debug.inc
--- source include/have_innodb.inc
-
-CREATE TABLE t (c INT) ENGINE=INNODB;
-
-# This will invoke test_ut_format_name() in debug builds
-
-SET @save_dbug = @@debug_dbug;
-SET debug_dbug = '+d,test_ut_format_name';
-
-DROP TABLE t;
-
-SET debug_dbug = @save_dbug;
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
index baba5a14..cc631bca 100644
--- a/mysql-test/suite/innodb/t/insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/insert_into_empty.test
@@ -271,6 +271,16 @@ connection default;
disconnect con1;
SELECT * FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-33979 Disallow bulk insert operation during
+--echo # partition update statement
+--echo #
+CREATE TABLE t1(a INT KEY)ENGINE=InnoDB
+ PARTITION BY KEY(a) PARTITIONS 16;
+INSERT INTO t1 VALUES(1);
+UPDATE t1 SET a = 2 WHERE a = 1;
+DROP TABLE t1;
--echo # End of 10.6 tests
--echo #
@@ -495,3 +505,54 @@ DROP TABLE t1;
CREATE TABLE t (a CHAR CHARACTER SET utf8) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT t SELECT left(seq,1) FROM seq_1_to_43691;
DROP TABLE t;
+
+--echo #
+--echo # MDEV-32453 Bulk insert fails to apply when trigger
+--echo # does insert operation
+--echo #
+CREATE TABLE t(c INT)ENGINE=InnoDB;
+CREATE TRIGGER t2_ai AFTER INSERT ON t FOR EACH ROW SET @a:=(SELECT * FROM t);
+BEGIN;
+--error ER_SUBQUERY_NO_1_ROW
+INSERT INTO t VALUES (1),(1);
+COMMIT;
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-33868 Assertion `trx->bulk_insert' failed in
+--echo # innodb_prepare_commit_versioned
+--echo #
+CREATE TABLE t (id INT) ENGINE=InnoDB;
+--replace_result $MYSQLTEST_VARDIR VARDIR
+--disable_ps2_protocol
+eval select 1 into outfile "$MYSQLTEST_VARDIR/tmp/t.outfile";
+--enable_ps2_protocol
+BEGIN;
+--replace_result $MYSQLTEST_VARDIR VARDIR
+eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t.outfile' INTO TABLE t;
+COMMIT;
+DROP TABLE t;
+--remove_file $MYSQLTEST_VARDIR/tmp/t.outfile
+
+--echo #
+--echo # MDEV-33934 Assertion `!check_foreigns' failed in
+--echo # trx_t::bulk_insert_apply_for_table(dict_table_t*)
+--echo #
+CREATE TABLE t1(f1 INT,f2 INT,KEY(f1))engine=innodb;
+BEGIN;
+INSERT INTO t1 VALUES();
+SET STATEMENT FOREIGN_KEY_CHECKS=1 FOR SELECT * FROM t1;
+COMMIT;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-33970 Assertion `!m.first->second.is_bulk_insert()'
+--echo # failed in trx_undo_report_row_operation()
+--echo #
+CREATE TABLE t1(c1 INT,c2 CHAR) ENGINE=INNODB PARTITION BY KEY(c1) PARTITIONS 2;
+begin;
+INSERT INTO t1 VALUES(2,0);
+DELETE FROM t1;
+commit;
+DROP TABLE t1;
+--echo # End of 10.11 tests
diff --git a/mysql-test/suite/innodb/t/instant_alter_crash.test b/mysql-test/suite/innodb/t/instant_alter_crash.test
index f51f61e3..76b85b77 100644
--- a/mysql-test/suite/innodb/t/instant_alter_crash.test
+++ b/mysql-test/suite/innodb/t/instant_alter_crash.test
@@ -230,29 +230,3 @@ CHECK TABLE t2;
DROP TABLE t1,t2;
--list_files $MYSQLD_DATADIR/test
-
---echo #
---echo # MDEV-26198 Assertion `0' failed in row_log_table_apply_op during
---echo # ADD PRIMARY KEY or OPTIMIZE TABLE
---echo #
-CREATE TABLE t1(f1 year default null, f2 year default null,
- f3 text, f4 year default null, f5 year default null,
- f6 year default null, f7 year default null,
- f8 year default null)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
-INSERT INTO t1 VALUES(1, 1, 1, 1, 1, 1, 1, 1);
-ALTER TABLE t1 ADD COLUMN f9 year default null, ALGORITHM=INPLACE;
-set DEBUG_SYNC="row_log_table_apply1_before SIGNAL con1_insert WAIT_FOR con1_finish";
-send ALTER TABLE t1 ROW_FORMAT=REDUNDANT, ADD COLUMN f10 YEAR DEFAULT NULL, ALGORITHM=INPLACE;
-
-connect(con1,localhost,root,,,);
-SET DEBUG_SYNC="now WAIT_FOR con1_insert";
-INSERT IGNORE INTO t1 (f3) VALUES ( 'b' );
-INSERT IGNORE INTO t1 (f3) VALUES ( 'l' );
-SET DEBUG_SYNC="now SIGNAL con1_finish";
-
-connection default;
-reap;
-disconnect con1;
-SET DEBUG_SYNC=RESET;
-CHECK TABLE t1;
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test
index f11d0bd0..953f7663 100644
--- a/mysql-test/suite/innodb/t/instant_alter_debug.test
+++ b/mysql-test/suite/innodb/t/instant_alter_debug.test
@@ -551,11 +551,62 @@ 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;
+
+--echo #
+--echo # MDEV-26198 Assertion `0' failed in row_log_table_apply_op during
+--echo # ADD PRIMARY KEY or OPTIMIZE TABLE
+--echo #
+CREATE TABLE t1(f1 year default null, f2 year default null,
+ f3 text, f4 year default null, f5 year default null,
+ f6 year default null, f7 year default null,
+ f8 year default null)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 1, 1, 1, 1, 1, 1, 1);
+ALTER TABLE t1 ADD COLUMN f9 year default null, ALGORITHM=INPLACE;
+set DEBUG_SYNC="row_log_table_apply1_before SIGNAL con1_insert WAIT_FOR con1_finish";
+send ALTER TABLE t1 ADD COLUMN f10 YEAR DEFAULT NULL, FORCE, ALGORITHM=INPLACE;
+
+connection con1;
+SET DEBUG_SYNC="now WAIT_FOR con1_insert";
+INSERT IGNORE INTO t1 (f3) VALUES ( 'b' );
+INSERT IGNORE INTO t1 (f3) VALUES ( 'l' );
+SET DEBUG_SYNC="now SIGNAL con1_finish";
+
+connection default;
+reap;
+CHECK TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-19044 Alter table corrupts while applying the
+--echo # modification log
+--echo #
+CREATE TABLE t1 (
+ f1 INT,
+ f2 INT,
+ f3 char(19) CHARACTER SET utf8mb3,
+ f4 VARCHAR(500),
+ f5 TEXT)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(3, 1, REPEAT('a', 2), REPEAT("b", 20),'a');
+ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL, ALGORITHM=INSTANT;
+INSERT INTO t1 VALUES(1, 2, REPEAT('InnoDB', 2),
+ REPEAT("MariaDB", 20), REPEAT('a', 8000), 12);
+INSERT INTO t1 VALUES(1, 2, REPEAT('MYSQL', 2),
+ REPEAT("MariaDB", 20), REPEAT('a', 8000), 12);
+SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL con1_begin WAIT_FOR con1_update';
+send ALTER TABLE t1 MODIFY COLUMN f2 INT NOT NULL, FORCE, ALGORITHM=INPLACE;
+connection con1;
+SET DEBUG_SYNC='now WAIT_FOR con1_begin';
+UPDATE t1 SET f2=204 order by f1 limit 2;
+SET DEBUG_SYNC='now SIGNAL con1_update';
+connection default;
+reap;
+disconnect con1;
SET DEBUG_SYNC=reset;
+CHECK TABLE t1;
+DROP TABLE t1;
--echo # End of 10.4 tests
diff --git a/mysql-test/suite/innodb/t/instant_alter_extend.test b/mysql-test/suite/innodb/t/instant_alter_extend.test
index 7258ba6d..636527e5 100644
--- a/mysql-test/suite/innodb/t/instant_alter_extend.test
+++ b/mysql-test/suite/innodb/t/instant_alter_extend.test
@@ -256,3 +256,16 @@ select * from t1;
check table t1;
drop database best;
+
+--echo #
+--echo # MDEV-33214 Table is getting rebuild with
+--echo # ALTER TABLE ADD COLUMN
+--echo #
+use test;
+CREATE TABLE t1(f1 INT, f2 VARCHAR(10)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
+INSERT INTO t1 VALUES(1,'abc'),(2,'def');
+ALTER TABLE t1 ADD (f3 VARCHAR(5000), f4 VARCHAR(20)), ALGORITHM=instant;
+ALTER TABLE t1 ADD f5 TEXT, ALGORITHM=INSTANT;
+DROP TABLE t1;
+
+--echo # End of 10.4 tests
diff --git a/mysql-test/suite/innodb/t/instant_alter_import.test b/mysql-test/suite/innodb/t/instant_alter_import.test
index 3a811def..fa35c582 100644
--- a/mysql-test/suite/innodb/t/instant_alter_import.test
+++ b/mysql-test/suite/innodb/t/instant_alter_import.test
@@ -83,6 +83,7 @@ flush tables t2 for export;
unlock tables;
alter table t1 import tablespace;
+--source include/restart_mysqld.inc
select * from t1;
--remove_file $MYSQLD_DATADIR/test/t1.ibd
diff --git a/mysql-test/suite/innodb/t/lock_insert_into_empty.test b/mysql-test/suite/innodb/t/lock_insert_into_empty.test
index 91d2bcdd..42409e8c 100644
--- a/mysql-test/suite/innodb/t/lock_insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/lock_insert_into_empty.test
@@ -51,6 +51,7 @@ CREATE TABLE t1 (k INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SET k=1;
START TRANSACTION;
INSERT INTO t1 SET k=2;
+SELECT count(*) > 0 FROM mysql.innodb_index_stats lock in share mode;
--connect (con1,localhost,root,,test)
SET innodb_lock_wait_timeout=0;
@@ -59,5 +60,6 @@ CREATE TABLE t2 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB
AS SELECT k FROM t1;
--disconnect con1
--connection default
-
+SET innodb_lock_wait_timeout=default;
DROP TABLE t1;
+DROP TABLE IF EXISTS t2;
diff --git a/mysql-test/suite/innodb/t/lock_isolation.test b/mysql-test/suite/innodb/t/lock_isolation.test
new file mode 100644
index 00000000..5c60f6e7
--- /dev/null
+++ b/mysql-test/suite/innodb/t/lock_isolation.test
@@ -0,0 +1,149 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-26642 Weird SELECT view when a record is
+--echo # modified to the same value by two transactions
+--echo # MDEV-32898 Phantom rows caused by updates of PRIMARY KEY
+--echo #
+
+CREATE TABLE t(a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t VALUES (1,1),(2,2);
+BEGIN; SELECT * FROM t LOCK IN SHARE MODE;
+--connect con_weird,localhost,root
+BEGIN;
+SELECT * FROM t;
+--connect consistent,localhost,root
+SET innodb_snapshot_isolation=ON;
+BEGIN;
+SELECT * FROM t;
+--connection default
+UPDATE t SET a=3 WHERE b=2;
+COMMIT;
+--connection consistent
+--error ER_CHECKREAD
+UPDATE t SET b=3;
+SELECT * FROM t;
+COMMIT;
+--connection con_weird
+UPDATE t SET b=3;
+SELECT * FROM t;
+COMMIT;
+--connection default
+SELECT * FROM t;
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-26643 Inconsistent behaviors of UPDATE under
+--echo # READ UNCOMMITTED and READ COMMITTED isolation level
+--echo #
+
+CREATE TABLE t(a INT, b INT) ENGINE=InnoDB;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+BEGIN; UPDATE t SET a = 10;
+
+--connection consistent
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+--send UPDATE t SET b = 20 WHERE a
+
+--connection default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = 'Updating'
+ and info = 'UPDATE t SET b = 20 WHERE a';
+--source include/wait_condition.inc
+
+COMMIT;
+
+--connection consistent
+--reap
+SELECT * FROM t;
+
+--connection default
+TRUNCATE TABLE t;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+BEGIN; UPDATE t SET a = 10;
+
+--connection consistent
+SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
+--send UPDATE t SET b = 20 WHERE a
+
+--connection default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where info = 'UPDATE t SET b = 20 WHERE a';
+--source include/wait_condition.inc
+
+COMMIT;
+
+--connection consistent
+--reap
+SELECT * FROM t;
+
+--connection default
+TRUNCATE TABLE t;
+INSERT INTO t VALUES(NULL, 1), (2, 2);
+BEGIN; UPDATE t SET a = 10;
+
+--connection con_weird
+SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+send UPDATE t SET b = 20 WHERE a;
+
+--connection default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = 'Updating'
+ and info = 'UPDATE t SET b = 20 WHERE a';
+--source include/wait_condition.inc
+
+SELECT * FROM t;
+COMMIT;
+
+--connection con_weird
+--reap
+COMMIT;
+
+--connection default
+SELECT * FROM t;
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-33802 Weird read view after ROLLBACK of other transactions
+--echo #
+
+CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t SET a=1;
+
+BEGIN; INSERT INTO t SET a=2;
+
+--connection consistent
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+--disable_ps2_protocol
+--error ER_CHECKREAD
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+--enable_ps2_protocol
+
+--connection con_weird
+START TRANSACTION WITH CONSISTENT SNAPSHOT;
+send
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+
+--connection default
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = 'Sending data'
+ and info LIKE 'SELECT * FROM t %';
+--source include/wait_condition.inc
+ROLLBACK;
+
+--connection con_weird
+--reap
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+--disconnect con_weird
+
+--connection consistent
+SELECT * FROM t FORCE INDEX (b) FOR UPDATE;
+--disconnect consistent
+
+--connection default
+DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test
index f88a13db..371d10c9 100644
--- a/mysql-test/suite/innodb/t/log_file_name.test
+++ b/mysql-test/suite/innodb/t/log_file_name.test
@@ -206,7 +206,7 @@ print FILE "\0" x 16384;
close(FILE);
EOF
---exec echo "" > $MYSQLD_DATADIR/test/u2.ibd
+--write_line "" $MYSQLD_DATADIR/test/u2.ibd
--copy_file $MYSQLD_DATADIR/test/u6.ibd $MYSQLD_DATADIR/test/u4.ibd
diff --git a/mysql-test/suite/innodb/t/log_upgrade_101_flags.test b/mysql-test/suite/innodb/t/log_upgrade_101_flags.test
new file mode 100644
index 00000000..4358ccfa
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_upgrade_101_flags.test
@@ -0,0 +1,91 @@
+--source include/have_innodb.inc
+--source include/big_test.inc
+--source include/not_embedded.inc
+call mtr.add_suppression("InnoDB: The change buffer is corrupted");
+call mtr.add_suppression("InnoDB: Tablespace size stored in header is 768 pages, but the sum of data file sizes is 384 pages");
+call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file");
+--source include/shutdown_mysqld.inc
+let bugdir= $MYSQLTEST_VARDIR/tmp/log_upgrade;
+--mkdir $bugdir
+--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $dirs= --innodb-data-home-dir=$bugdir --innodb-log-group-home-dir=$bugdir
+
+# Test case similar to log_upgrade.test
+perl;
+do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl";
+my $polynomial = 0x82f63b78; # CRC-32C
+
+die unless open OUT, ">", "$ENV{bugdir}/ibdata1";
+binmode OUT;
+
+my $head = pack("Nx[18]", 0);
+# Add FSP_SPACE_FLAGS as 49152 (10.1.0...10.1.20), page_size = 32k
+my $body = pack("x[8]Nx[4]Nx[2]Nx[32696]", 768, 49152, 97937874);
+my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
+print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck);
+# Dummy pages 1..6.
+print OUT chr(0) x (6 * 32768);
+# Dictionary header page (page 7).
+$head = pack("Nx[18]", 7);
+$body = pack("x[32]Nx[8]Nx[32674]", 8, 9);
+$ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
+print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck);
+
+# Empty SYS_TABLES page (page 8).
+$head = pack("NNNx[8]n", 8, ~0, ~0, 17855);
+$body = pack("nnx[31]Cx[20]", 2, 124, 1);
+$body .= pack("nxnn", 0x801, 3, 116) . "infimum";
+$body .= pack("xnxnxx", 0x901, 0x803) . "supremum";
+$body .= pack("x[32632]nn", 116, 101);
+$ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
+print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck);
+
+# Empty SYS_INDEXES page (page 9).
+$head = pack("NNNx[8]n", 9, ~0, ~0, 17855);
+$body = pack("nnx[31]Cx[20]", 2, 124, 3);
+$body .= pack("nxnn", 0x801, 3, 116) . "infimum";
+$body .= pack("xnxnxx", 0x901, 0x803) . "supremum";
+$body .= pack("x[32632]nn", 116, 101);
+$ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial);
+print OUT pack("N",$ck).$head.pack("x[12]").$body.pack("Nx[4]",$ck);
+
+die unless seek(OUT, 768 * 16384 - 1, 0);
+print OUT chr(0);
+close OUT or die;
+
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile0";
+binmode OUT;
+$_= pack("Nx[5]nx[5]", 1, 0x1286) . "BogoDB 4.3.2.1" . chr(0) x 478;
+print OUT $_, pack("N", mycrc32($_, 0, $polynomial));
+# checkpoint page 1 and all-zero checkpoint 2
+$_= pack("x[13]nCNNx[484]", 0x1286, 12, 2, 0x80c);
+print OUT $_, pack("N", mycrc32($_, 0, $polynomial));
+die unless seek(OUT, 0x1FFFFFFFF, 0);
+print OUT chr(0);
+close OUT or die;
+die unless open OUT, ">", "$ENV{bugdir}/ib_logfile1";
+binmode OUT;
+die unless seek(OUT, 0x800, 0); # the first 2048 bytes are unused!
+$_= pack("Nnnx[500]", 0x80000944, 12, 12);
+print OUT $_, pack("N", mycrc32($_, 0, $polynomial));
+die unless seek(OUT, 0x1FFFFFFFF, 0);
+print OUT chr(0);
+close OUT or die;
+EOF
+
+--let $restart_parameters= $dirs --innodb-force-recovery=5 --innodb-log-file-size=4m --innodb_page_size=32k --innodb_buffer_pool_size=10M
+--source include/start_mysqld.inc
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+--source include/shutdown_mysqld.inc
+--let SEARCH_PATTERN= InnoDB: Upgrading redo log:
+--source include/search_pattern_in_file.inc
+--let $restart_parameters= $dirs
+
+--remove_files_wildcard $bugdir
+--rmdir $bugdir
+--let $restart_parameters=
+--source include/start_mysqld.inc
+
+--echo # End of 10.5 tests
diff --git a/mysql-test/suite/innodb/t/monitor.test b/mysql-test/suite/innodb/t/monitor.test
index 77483d62..69545c9c 100644
--- a/mysql-test/suite/innodb/t/monitor.test
+++ b/mysql-test/suite/innodb/t/monitor.test
@@ -5,11 +5,11 @@
# sys_vars.innodb_monitor_enable_basic
--source include/have_innodb.inc
-# Test turn on/off the monitor counter with "all" option
-# By default, they will be off.
select name, if(enabled,'enabled','disabled') status
from information_schema.innodb_metrics;
+create temporary table orig_innodb_metrics as select name, enabled from information_schema.innodb_metrics;
+
set global innodb_monitor_disable = All;
select name from information_schema.innodb_metrics where enabled;
@@ -315,18 +315,22 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB STATS_PERSISTENT=0;
let $innodb_monitor_enable = `SELECT @@innodb_monitor_enable`;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*1*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_enable='module_buffer_page';
INSERT INTO t1 VALUES (1), (2), (3), (4); FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+
+let $wait_condition= select count > 0 from information_schema.innodb_metrics where name like 'buffer_page_written_index_leaf';
+source include/wait_condition.inc;
+
+SELECT /*2*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_disable='module_buffer_page';
SET GLOBAL innodb_monitor_reset_all='module_buffer_page';
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*3*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_enable='%';
@@ -334,18 +338,22 @@ SET GLOBAL innodb_monitor_enable='%';
SET GLOBAL innodb_monitor_reset_all= '%', innodb_compression_algorithm= foo;
INSERT INTO t1 VALUES (5), (6), (7), (8); FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+
+let $wait_condition= select count > 0 from information_schema.innodb_metrics where name like 'buffer_page_written_index_leaf';
+source include/wait_condition.inc;
+
+SELECT /*4*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_disable='%';
SET GLOBAL innodb_monitor_reset_all='%';
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*5*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
SET GLOBAL innodb_monitor_enable='ALL';
INSERT INTO t1 VALUES (9), (10), (11), (12); FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
-SELECT NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
+SELECT /*6*/ NAME, COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME
LIKE 'buffer_page_written_index_leaf';
DROP TABLE t1;
@@ -462,8 +470,36 @@ DROP TABLE fl2;
DROP TABLE fl1;
DROP TABLE fl0;
---disable_warnings
-SET GLOBAL innodb_monitor_enable=default;
-SET GLOBAL innodb_monitor_disable=default;
-SET GLOBAL innodb_monitor_reset_all=default;
---enable_warnings
+set global innodb_monitor_disable = 'adaptive\\_hash\\_p%';
+set global innodb_monitor_disable = 'adaptive\\_hash\\_r%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_n%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_batch\\_s%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_g%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_s%';
+set global innodb_monitor_disable = 'buffer\\_LRU\\_u%';
+set global innodb_monitor_disable = 'buffer\\_f%';
+set global innodb_monitor_disable = 'buffer\\_page\\_%';
+set global innodb_monitor_disable = 'c%';
+set global innodb_monitor_disable = 'ddl%';
+set global innodb_monitor_disable = 'icp%';
+set global innodb_monitor_disable = 'index\\_p%';
+set global innodb_monitor_disable = 'innodb\\_di%';
+set global innodb_monitor_disable = 'innodb\\_l%';
+set global innodb_monitor_disable = 'innodb\\_m%';
+set global innodb_monitor_disable = 'lock\\_re%';
+set global innodb_monitor_disable = 'lock\\_ta%';
+set global innodb_monitor_disable = 'log%';
+set global innodb_monitor_disable = 'm%';
+set global innodb_monitor_disable = 'p%';
+set global innodb_monitor_disable = 't%';
+set global innodb_monitor_enable = 'log\\_w%';
+set global innodb_monitor_enable = 'trx_rseg_history_len';
+set global innodb_monitor_enable = 'trx_undo_slots_cached';
+
+set global innodb_monitor_enable=default;
+set global innodb_monitor_disable=default;
+set global innodb_monitor_reset_all=default;
+
+select name, orig.enabled, new.enabled from
+ orig_innodb_metrics orig join information_schema.innodb_metrics new using(name)
+ where orig.enabled != new.enabled;
diff --git a/mysql-test/suite/innodb/t/purge_secondary.test b/mysql-test/suite/innodb/t/purge_secondary.test
index 8a38a418..ec02c726 100644
--- a/mysql-test/suite/innodb/t/purge_secondary.test
+++ b/mysql-test/suite/innodb/t/purge_secondary.test
@@ -4,10 +4,6 @@
SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent = 0;
---disable_query_log
-call mtr.add_suppression("InnoDB: Difficult to find free blocks in the buffer pool");
---enable_query_log
-
CREATE TABLE t1 (
a SERIAL, b CHAR(255) NOT NULL DEFAULT '', c BOOLEAN DEFAULT false,
l LINESTRING NOT NULL DEFAULT ST_linefromtext('linestring(448 -689,
diff --git a/mysql-test/suite/innodb/t/rename_table.test b/mysql-test/suite/innodb/t/rename_table.test
index 654f8809..a6181342 100644
--- a/mysql-test/suite/innodb/t/rename_table.test
+++ b/mysql-test/suite/innodb/t/rename_table.test
@@ -32,17 +32,22 @@ DROP DATABASE abc_def;
DROP DATABASE abc_def2;
-call mtr.add_suppression("InnoDB: (Operating system error|Error number \\d+ means|Cannot rename file)");
+call mtr.add_suppression("InnoDB: Cannot rename '.*t1.ibd' to '.*non_existing_db.*' because the target schema directory doesn't exist");
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(100);
--replace_result "\\" "/"
--error ER_ERROR_ON_RENAME
RENAME TABLE t1 TO non_existing_db.t1;
---let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot rename file '.*t1\.ibd' to '.*non_existing_db
+--let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot rename '.*t1\.ibd' to '.*non_existing_db
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/search_pattern_in_file.inc
+SET GLOBAL innodb_fast_shutdown=2;
+--source include/restart_mysqld.inc
+
+SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test b/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test
index 24029a48..47fedc52 100644
--- a/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test
+++ b/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test
@@ -85,3 +85,19 @@ CREATE TABLE t1(f1 char(200), f2 char(200), f3 char(200),
f29(10), f30(10), f31(10), f32(10),
f33(10)))
ENGINE=InnoDB;
+
+--echo #
+--echo # MDEV-31161 Assertion failures upon adding a too long key
+--echo # to table with COMPRESSED row format
+--echo #
+--let $page_size= `SELECT @@GLOBAL.innodb_page_size`
+CREATE TABLE t1(pk INT PRIMARY KEY, f1 INT, f2 TEXT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+INSERT INTO t1 (pk) VALUES (1);
+let $error_code = 0;
+if ($page_size == 4096) {
+let $error_code = ER_TOO_BIG_ROWSIZE;
+}
+
+--error $error_code
+ALTER TABLE t1 ADD KEY (f1), ADD KEY (f2(1000));
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test
index b09ff7c7..ee1474bb 100644
--- a/mysql-test/suite/innodb/t/temporary_table.test
+++ b/mysql-test/suite/innodb/t/temporary_table.test
@@ -135,7 +135,7 @@ AND support IN ('YES', 'DEFAULT', 'ENABLED');
# We cannot use include/restart_mysqld.inc in this particular test,
# because SHOW STATUS would fail due to unwritable (nonexistent) tmpdir.
--source include/shutdown_mysqld.inc
---exec echo "restart: --tmpdir=/dev/null/$MYSQL_TMP_DIR --skip-innodb-fast-shutdown" > $_expect_file_name
+--write_line "restart: --tmpdir=/dev/null/$MYSQL_TMP_DIR --skip-innodb-fast-shutdown" $_expect_file_name
--enable_reconnect
--disable_result_log
--disable_query_log
diff --git a/mysql-test/suite/innodb/t/undo_space_dblwr.test b/mysql-test/suite/innodb/t/undo_space_dblwr.test
index b6fd6738..52b19a4b 100644
--- a/mysql-test/suite/innodb/t/undo_space_dblwr.test
+++ b/mysql-test/suite/innodb/t/undo_space_dblwr.test
@@ -9,19 +9,19 @@ show variables like 'innodb_doublewrite';
create table t1(f1 int not null, f2 int not null)engine=innodb;
insert into t1 values (1, 1);
---source include/wait_all_purged.inc
+# Slow shutdown and restart to make sure ibuf merge is finished
+SET GLOBAL innodb_fast_shutdown = 0;
+let $shutdown_timeout=;
+let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
+--source include/restart_mysqld.inc
-set GLOBAL innodb_log_checkpoint_now=1;
--source ../include/no_checkpoint_start.inc
-
--echo # Make the first page dirty for undo tablespace
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = 1;
-SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
-SET GLOBAL innodb_max_dirty_pages_pct=0.0;
+SET GLOBAL innodb_buf_flush_list_now = 1;
-sleep 1;
--let CLEANUP_IF_CHECKPOINT=drop table t1;
--source ../include/no_checkpoint_end.inc
diff --git a/mysql-test/suite/innodb/t/undo_truncate.test b/mysql-test/suite/innodb/t/undo_truncate.test
index 18cc4f36..9abf08ff 100644
--- a/mysql-test/suite/innodb/t/undo_truncate.test
+++ b/mysql-test/suite/innodb/t/undo_truncate.test
@@ -13,7 +13,7 @@ call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operation
# Re-create the undo log tablespaces after slow shutdown
SET GLOBAL innodb_fast_shutdown=0;
-let $restart_parameters="--innodb_undo_tablespaces=2";
+let $restart_parameters=--innodb_undo_tablespaces=2;
--source include/restart_mysqld.inc
SET GLOBAL innodb_undo_log_truncate = 0;
@@ -46,6 +46,7 @@ connection con1; reap; send delete from t1;
connection con2; reap; delete from t2;
connection con1; reap;
+SET GLOBAL innodb_max_undo_log_size = @@GLOBAL.innodb_page_size * 4294967296;
SET GLOBAL innodb_undo_log_truncate = 1;
commit; disconnect con1;
connection con2; commit; disconnect con2;
@@ -57,6 +58,8 @@ let $trx_before= `SHOW ENGINE INNODB STATUS`;
let $trx_before= `select substr('$trx_before',9)+2`;
SET GLOBAL innodb_max_purge_lag_wait=0;
+SET GLOBAL innodb_max_undo_log_size=DEFAULT;
+SET GLOBAL innodb_max_purge_lag_wait=0;
set global innodb_fast_shutdown=0;
let $restart_parameters=;
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.test b/mysql-test/suite/innodb/t/undo_truncate_recover.test
index 148c3f93..988b28f7 100644
--- a/mysql-test/suite/innodb/t/undo_truncate_recover.test
+++ b/mysql-test/suite/innodb/t/undo_truncate_recover.test
@@ -13,7 +13,7 @@
# Re-create the undo log tablespaces after slow shutdown
SET GLOBAL innodb_fast_shutdown=0;
-let $restart_parameters="--innodb_undo_tablespaces=2";
+let $restart_parameters=--innodb_undo_tablespaces=2;
--source include/restart_mysqld.inc
SET GLOBAL innodb_undo_log_truncate = 1;
diff --git a/mysql-test/suite/innodb_fts/r/create,orig.rdiff b/mysql-test/suite/innodb_fts/r/create,orig.rdiff
new file mode 100644
index 00000000..e7191646
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/create,orig.rdiff
@@ -0,0 +1,11 @@
+--- create.result
++++ create.reject
+@@ -207,7 +207,7 @@
+ UNIQUE KEY `FTS_DOC_ID_INDEX` (`FTS_DOC_ID` DESC)
+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=INPLACE;
+-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
++ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index
+ ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=COPY;
+ ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index
+ DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/create.result b/mysql-test/suite/innodb_fts/r/create.result
index 4334344a..04fc2019 100644
--- a/mysql-test/suite/innodb_fts/r/create.result
+++ b/mysql-test/suite/innodb_fts/r/create.result
@@ -207,7 +207,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `FTS_DOC_ID_INDEX` (`FTS_DOC_ID` DESC)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=INPLACE;
-ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=COPY;
ERROR HY000: Index 'FTS_DOC_ID_INDEX' is of wrong type for an InnoDB FULLTEXT index
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/foreign_key_update.result b/mysql-test/suite/innodb_fts/r/foreign_key_update.result
index f2d47da7..87c21c0b 100644
--- a/mysql-test/suite/innodb_fts/r/foreign_key_update.result
+++ b/mysql-test/suite/innodb_fts/r/foreign_key_update.result
@@ -32,3 +32,15 @@ database
database
DROP TABLE t1_fk;
DROP TABLE t1;
+#
+# MDEV-32346 Assertion failure sym_node->table != NULL
+# in pars_retrieve_table_def on UPDATE
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT, b TEXT, FOREIGN KEY(a) REFERENCES t1(a),
+FULLTEXT (b))ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+UPDATE t1 SET a=2;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
+DROP TABLE t2,t1;
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers.rdiff b/mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers.rdiff
new file mode 100644
index 00000000..d46275ff
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers.rdiff
@@ -0,0 +1,57 @@
+--- innodb-fts-ddl.result
++++ innodb-fts-ddl.reject
+@@ -11,8 +11,10 @@
+ ('MySQL vs. YourSQL','In the following database comparison ...'),
+ ('MySQL Security','When configured properly, MySQL ...');
+ ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
+-ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
+-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
++ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
++ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
++affected rows: 6
++info: Records: 6 Duplicates: 0 Warnings: 0
+ SELECT * FROM fts_test WHERE MATCH (title, body)
+ AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
+ id title body
+@@ -26,7 +28,9 @@
+ ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
+ ('MySQL vs. YourSQL','In the following database comparison ...'),
+ ('MySQL Security','When configured properly, MySQL ...');
+-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
++ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
++affected rows: 12
++info: Records: 12 Duplicates: 0 Warnings: 0
+ SELECT * FROM fts_test WHERE MATCH (title, body)
+ AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
+ id title body
+@@ -76,8 +80,10 @@
+ ('MySQL vs. YourSQL','In the following database comparison ...'),
+ ('MySQL Security','When configured properly, MySQL ...');
+ CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
+-ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
+-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
++ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED
++ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
++affected rows: 6
++info: Records: 6 Duplicates: 0 Warnings: 0
+ ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
+ ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
+ ALTER TABLE fts_test ROW_FORMAT=REDUNDANT;
+@@ -162,7 +168,7 @@
+ (20, 'MySQL Security','When configured properly, MySQL ...');
+ ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
+ ADD FULLTEXT INDEX idx3 (title), ALGORITHM=INPLACE;
+-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
++ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
+ ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
+ ADD FULLTEXT INDEX idx3 (title);
+ affected rows: 6
+@@ -274,7 +280,7 @@
+ call mtr.add_suppression("InnoDB: Failed to create");
+ CREATE TABLE t1(a TEXT, FTS_DOC_ID BIGINT UNSIGNED NOT NULL UNIQUE) ENGINE=InnoDB;
+ ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
+-ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine InnoDB
++ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
+ DROP TABLE t1;
+ CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
+ ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b);
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers_trx.rdiff b/mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers_trx.rdiff
new file mode 100644
index 00000000..d46275ff
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers_trx.rdiff
@@ -0,0 +1,57 @@
+--- innodb-fts-ddl.result
++++ innodb-fts-ddl.reject
+@@ -11,8 +11,10 @@
+ ('MySQL vs. YourSQL','In the following database comparison ...'),
+ ('MySQL Security','When configured properly, MySQL ...');
+ ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
+-ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
+-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
++ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
++ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
++affected rows: 6
++info: Records: 6 Duplicates: 0 Warnings: 0
+ SELECT * FROM fts_test WHERE MATCH (title, body)
+ AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
+ id title body
+@@ -26,7 +28,9 @@
+ ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
+ ('MySQL vs. YourSQL','In the following database comparison ...'),
+ ('MySQL Security','When configured properly, MySQL ...');
+-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
++ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
++affected rows: 12
++info: Records: 12 Duplicates: 0 Warnings: 0
+ SELECT * FROM fts_test WHERE MATCH (title, body)
+ AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
+ id title body
+@@ -76,8 +80,10 @@
+ ('MySQL vs. YourSQL','In the following database comparison ...'),
+ ('MySQL Security','When configured properly, MySQL ...');
+ CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
+-ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
+-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
++ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED
++ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
++affected rows: 6
++info: Records: 6 Duplicates: 0 Warnings: 0
+ ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
+ ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
+ ALTER TABLE fts_test ROW_FORMAT=REDUNDANT;
+@@ -162,7 +168,7 @@
+ (20, 'MySQL Security','When configured properly, MySQL ...');
+ ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
+ ADD FULLTEXT INDEX idx3 (title), ALGORITHM=INPLACE;
+-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
++ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
+ ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
+ ADD FULLTEXT INDEX idx3 (title);
+ affected rows: 6
+@@ -274,7 +280,7 @@
+ call mtr.add_suppression("InnoDB: Failed to create");
+ CREATE TABLE t1(a TEXT, FTS_DOC_ID BIGINT UNSIGNED NOT NULL UNIQUE) ENGINE=InnoDB;
+ ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
+-ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine InnoDB
++ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
+ DROP TABLE t1;
+ CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
+ ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b);
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers.rdiff b/mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers.rdiff
new file mode 100644
index 00000000..f9ba2177
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers.rdiff
@@ -0,0 +1,10 @@
+--- innodb-fts-fic.result
++++ innodb-fts-fic.reject
+@@ -172,7 +172,6 @@
+ (1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
+ (2, 'How To Use MySQL Well','After you went through a ...');
+ CREATE FULLTEXT INDEX idx ON wp(title, text);
+-ERROR HY000: Column 'FTS_DOC_ID' is of wrong type for an InnoDB FULLTEXT index
+ DROP TABLE wp;
+ CREATE TABLE wp(
+ FTS_DOC_ID bigint unsigned PRIMARY KEY,
diff --git a/mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers_trx.rdiff b/mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers_trx.rdiff
new file mode 100644
index 00000000..f9ba2177
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers_trx.rdiff
@@ -0,0 +1,10 @@
+--- innodb-fts-fic.result
++++ innodb-fts-fic.reject
+@@ -172,7 +172,6 @@
+ (1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
+ (2, 'How To Use MySQL Well','After you went through a ...');
+ CREATE FULLTEXT INDEX idx ON wp(title, text);
+-ERROR HY000: Column 'FTS_DOC_ID' is of wrong type for an InnoDB FULLTEXT index
+ DROP TABLE wp;
+ CREATE TABLE wp(
+ FTS_DOC_ID bigint unsigned PRIMARY KEY,
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug,vers.rdiff b/mysql-test/suite/innodb_fts/r/misc_debug,vers.rdiff
new file mode 100644
index 00000000..69294a5a
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/misc_debug,vers.rdiff
@@ -0,0 +1,66 @@
+--- misc_debug.result
++++ misc_debug.reject
+@@ -7,14 +7,14 @@
+ SET @saved_debug_dbug = @@SESSION.debug_dbug;
+ SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
+ CREATE FULLTEXT INDEX idx ON articles(body);
+-ERROR HY000: Out of memory.
++ERROR HY000: Can't create table `test`.`articles` (errno: 128 "Out of memory in engine")
+ SET SESSION debug_dbug=@saved_debug_dbug;
+ ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
+ DROP TABLE articles;
+ CREATE TABLE t (a INT, b TEXT) engine=innodb;
+ SET debug_dbug='+d,alter_table_rollback_new_index';
+-ALTER TABLE t ADD FULLTEXT INDEX (b(64));
+-ERROR HY000: Unknown error
++ALTER TABLE t ADD FULLTEXT INDEX (b(64)), ALGORITHM=INPLACE;
++ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
+ SET SESSION debug_dbug=@saved_debug_dbug;
+ DROP TABLE t;
+ CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
+@@ -28,32 +28,6 @@
+ DROP TABLE t2, t1;
+ SET SESSION debug_dbug=@saved_debug_dbug;
+ #
+-# 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';
+-ALTER TABLE t1 ADD FULLTEXT(c);
+-connection default;
+-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.
+-disconnect con1;
+-connection default;
+-SET DEBUG_SYNC=RESET;
+-ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
+-CHECK TABLE t1;
+-Table Op Msg_type Msg_text
+-test.t1 check status OK
+-DROP TABLE t1;
+-#
+ # MDEV-25663 Double free of transaction during TRUNCATE
+ #
+ call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
+@@ -65,12 +39,3 @@
+ SET debug_dbug=@saved_debug_dbug;
+ DROP TABLE t1;
+ # End of 10.3 tests
+-CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(100))ENGINE=InnoDB;
+-SET DEBUG_DBUG="+d,stats_lock_fail";
+-ALTER TABLE t1 ADD FULLTEXT(f2);
+-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+-SET debug_dbug=@saved_debug_dbug;
+-ALTER TABLE t1 DISCARD TABLESPACE;
+-ALTER TABLE t1 ADD FULLTEXT(f2);
+-ERROR HY000: Tablespace has been discarded for table `t1`
+-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug,vers_trx.rdiff b/mysql-test/suite/innodb_fts/r/misc_debug,vers_trx.rdiff
new file mode 100644
index 00000000..69294a5a
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/misc_debug,vers_trx.rdiff
@@ -0,0 +1,66 @@
+--- misc_debug.result
++++ misc_debug.reject
+@@ -7,14 +7,14 @@
+ SET @saved_debug_dbug = @@SESSION.debug_dbug;
+ SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
+ CREATE FULLTEXT INDEX idx ON articles(body);
+-ERROR HY000: Out of memory.
++ERROR HY000: Can't create table `test`.`articles` (errno: 128 "Out of memory in engine")
+ SET SESSION debug_dbug=@saved_debug_dbug;
+ ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
+ DROP TABLE articles;
+ CREATE TABLE t (a INT, b TEXT) engine=innodb;
+ SET debug_dbug='+d,alter_table_rollback_new_index';
+-ALTER TABLE t ADD FULLTEXT INDEX (b(64));
+-ERROR HY000: Unknown error
++ALTER TABLE t ADD FULLTEXT INDEX (b(64)), ALGORITHM=INPLACE;
++ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
+ SET SESSION debug_dbug=@saved_debug_dbug;
+ DROP TABLE t;
+ CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
+@@ -28,32 +28,6 @@
+ DROP TABLE t2, t1;
+ SET SESSION debug_dbug=@saved_debug_dbug;
+ #
+-# 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';
+-ALTER TABLE t1 ADD FULLTEXT(c);
+-connection default;
+-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.
+-disconnect con1;
+-connection default;
+-SET DEBUG_SYNC=RESET;
+-ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
+-CHECK TABLE t1;
+-Table Op Msg_type Msg_text
+-test.t1 check status OK
+-DROP TABLE t1;
+-#
+ # MDEV-25663 Double free of transaction during TRUNCATE
+ #
+ call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
+@@ -65,12 +39,3 @@
+ SET debug_dbug=@saved_debug_dbug;
+ DROP TABLE t1;
+ # End of 10.3 tests
+-CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(100))ENGINE=InnoDB;
+-SET DEBUG_DBUG="+d,stats_lock_fail";
+-ALTER TABLE t1 ADD FULLTEXT(f2);
+-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+-SET debug_dbug=@saved_debug_dbug;
+-ALTER TABLE t1 DISCARD TABLESPACE;
+-ALTER TABLE t1 ADD FULLTEXT(f2);
+-ERROR HY000: Tablespace has been discarded for table `t1`
+-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/sync_ddl,vers.rdiff b/mysql-test/suite/innodb_fts/r/sync_ddl,vers.rdiff
new file mode 100644
index 00000000..7834e04c
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/sync_ddl,vers.rdiff
@@ -0,0 +1,12 @@
+--- sync_ddl.result
++++ sync_ddl.reject
+@@ -100,7 +100,7 @@
+ ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ DROP INDEX idx1,
+ ADD FULLTEXT INDEX idx2(value);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++affected rows: 2
++info: Records: 2 Duplicates: 0 Warnings: 0
+ DROP TABLE t1;
+ SET GLOBAL debug_dbug = @save_debug;
diff --git a/mysql-test/suite/innodb_fts/r/sync_ddl,vers_trx.rdiff b/mysql-test/suite/innodb_fts/r/sync_ddl,vers_trx.rdiff
new file mode 100644
index 00000000..7834e04c
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/sync_ddl,vers_trx.rdiff
@@ -0,0 +1,12 @@
+--- sync_ddl.result
++++ sync_ddl.reject
+@@ -100,7 +100,7 @@
+ ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ DROP INDEX idx1,
+ ADD FULLTEXT INDEX idx2(value);
+-affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++affected rows: 2
++info: Records: 2 Duplicates: 0 Warnings: 0
+ DROP TABLE t1;
+ SET GLOBAL debug_dbug = @save_debug;
diff --git a/mysql-test/suite/innodb_fts/r/sync_ddl.result b/mysql-test/suite/innodb_fts/r/sync_ddl.result
index 441954dc..5ebe1575 100644
--- a/mysql-test/suite/innodb_fts/r/sync_ddl.result
+++ b/mysql-test/suite/innodb_fts/r/sync_ddl.result
@@ -99,7 +99,8 @@ ALTER TABLE t1
DROP COLUMN id1,
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
DROP INDEX idx1,
-ADD FULLTEXT INDEX idx2(value),
-ALGORITHM=INPLACE;
+ADD FULLTEXT INDEX idx2(value);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
DROP TABLE t1;
SET GLOBAL debug_dbug = @save_debug;
diff --git a/mysql-test/suite/innodb_fts/t/create.test b/mysql-test/suite/innodb_fts/t/create.test
index e6a7e993..9d88c1ed 100644
--- a/mysql-test/suite/innodb_fts/t/create.test
+++ b/mysql-test/suite/innodb_fts/t/create.test
@@ -131,8 +131,14 @@ ENGINE=InnoDB;
CREATE TABLE t1(a INT PRIMARY KEY, b TEXT, FTS_DOC_ID BIGINT UNSIGNED NOT NULL,
UNIQUE KEY FTS_DOC_ID_INDEX(FTS_DOC_ID DESC)) ENGINE=InnoDB;
SHOW CREATE TABLE t1;
+if ($MTR_COMBINATION_ORIG) {
--error ER_INNODB_FT_WRONG_DOCID_INDEX
ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=INPLACE;
+}
+if (!$MTR_COMBINATION_ORIG) {
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=INPLACE;
+}
--error ER_INNODB_FT_WRONG_DOCID_INDEX
ALTER TABLE t1 ADD FULLTEXT INDEX(b), ALGORITHM=COPY;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/t/foreign_key_update.test b/mysql-test/suite/innodb_fts/t/foreign_key_update.test
index 1f74e640..8a64ac33 100644
--- a/mysql-test/suite/innodb_fts/t/foreign_key_update.test
+++ b/mysql-test/suite/innodb_fts/t/foreign_key_update.test
@@ -32,3 +32,16 @@ SELECT * FROM t1_fk WHERE MATCH(a) AGAINST('database');
DROP TABLE t1_fk;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-32346 Assertion failure sym_node->table != NULL
+--echo # in pars_retrieve_table_def on UPDATE
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT, b TEXT, FOREIGN KEY(a) REFERENCES t1(a),
+ FULLTEXT (b))ENGINE=InnoDB;
+INSERT INTO t1 SET a=1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+--error ER_ROW_IS_REFERENCED_2
+UPDATE t1 SET a=2;
+DROP TABLE t2,t1;
diff --git a/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test b/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
index cef8df2d..11d2d493 100644
--- a/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
+++ b/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test
@@ -20,11 +20,20 @@ INSERT INTO fts_test (title,body) VALUES
('MySQL Security','When configured properly, MySQL ...');
# Table does rebuild when fts index builds for the first time
+# Create the FTS index
+
+if ($MTR_COMBINATION_ORIG) {
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
-
-# Create the FTS index
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
+}
+if (!$MTR_COMBINATION_ORIG) {
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
+--enable_info
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
+--disable_info
+}
# Select word "tutorial" in the table
SELECT * FROM fts_test WHERE MATCH (title, body)
@@ -43,7 +52,14 @@ INSERT INTO fts_test (title,body) VALUES
('MySQL Security','When configured properly, MySQL ...');
# FTS_DOC_ID hidden column and FTS_DOC_ID index exist
+if ($MTR_COMBINATION_ORIG) {
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
+}
+if (!$MTR_COMBINATION_ORIG) {
+--enable_info
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
+--disable_info
+}
# Select word "tutorial" in the table
SELECT * FROM fts_test WHERE MATCH (title, body)
@@ -112,7 +128,14 @@ INSERT INTO fts_test (title,body) VALUES
# column already exists. This has not been implemented yet.
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
+if ($MTR_COMBINATION_ORIG) {
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
+}
+if (!$MTR_COMBINATION_ORIG) {
+--enable_info
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
+--disable_info
+}
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
@@ -349,8 +372,14 @@ let $fts_aux_file= `select concat('FTS_',right(concat(repeat('0',16), lower(hex(
write_file $MYSQLD_DATADIR/test/$fts_aux_file;
EOF
--replace_regex /".*" from/"Resource temporarily unavailable" from/
+if ($MTR_COMBINATION_ORIG) {
--error ER_GET_ERRNO
ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
+}
+if (!$MTR_COMBINATION_ORIG) {
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
+}
DROP TABLE t1;
remove_file $MYSQLD_DATADIR/test/$fts_aux_file;
diff --git a/mysql-test/suite/innodb_fts/t/innodb-fts-fic.test b/mysql-test/suite/innodb_fts/t/innodb-fts-fic.test
index 2d94c213..05855106 100644
--- a/mysql-test/suite/innodb_fts/t/innodb-fts-fic.test
+++ b/mysql-test/suite/innodb_fts/t/innodb-fts-fic.test
@@ -211,8 +211,13 @@ INSERT INTO wp (FTS_DOC_ID, title, text) VALUES
(1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
(2, 'How To Use MySQL Well','After you went through a ...');
+if ($MTR_COMBINATION_ORIG) {
--error ER_INNODB_FT_WRONG_DOCID_COLUMN
CREATE FULLTEXT INDEX idx ON wp(title, text);
+}
+if (!$MTR_COMBINATION_ORIG) {
+CREATE FULLTEXT INDEX idx ON wp(title, text);
+}
DROP TABLE wp;
CREATE TABLE wp(
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index 08581768..8e4ec5d9 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -23,8 +23,14 @@ CREATE TABLE articles (
# The newly create dict_index_t should be removed from fts cache
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
+if ($MTR_COMBINATION_ORIG) {
--error ER_OUT_OF_RESOURCES
CREATE FULLTEXT INDEX idx ON articles(body);
+}
+if (!$MTR_COMBINATION_ORIG) {
+--error ER_CANT_CREATE_TABLE
+CREATE FULLTEXT INDEX idx ON articles(body);
+}
SET SESSION debug_dbug=@saved_debug_dbug;
# This simply go through ha_innobase::commit_inplace_alter_table
@@ -37,8 +43,14 @@ DROP TABLE articles;
CREATE TABLE t (a INT, b TEXT) engine=innodb;
SET debug_dbug='+d,alter_table_rollback_new_index';
+if ($MTR_COMBINATION_ORIG) {
-- error ER_UNKNOWN_ERROR
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
+}
+if (!$MTR_COMBINATION_ORIG) {
+-- error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t ADD FULLTEXT INDEX (b(64)), ALGORITHM=INPLACE;
+}
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
@@ -57,6 +69,7 @@ ALTER TABLE t1 FORCE;
DROP TABLE t2, t1;
SET SESSION debug_dbug=@saved_debug_dbug;
+if ($MTR_COMBINATION_ORIG) {
--echo #
--echo # MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
--echo #
@@ -82,6 +95,7 @@ ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
CHECK TABLE t1;
DROP TABLE t1;
--source include/wait_until_count_sessions.inc
+}
--echo #
--echo # MDEV-25663 Double free of transaction during TRUNCATE
@@ -104,6 +118,7 @@ SET debug_dbug=@saved_debug_dbug;
DROP TABLE t1;
--echo # End of 10.3 tests
+if ($MTR_COMBINATION_ORIG) {
# Fulltext fails in commit phase
CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(100))ENGINE=InnoDB;
@@ -115,3 +130,4 @@ ALTER TABLE t1 DISCARD TABLESPACE;
--error ER_TABLESPACE_DISCARDED
ALTER TABLE t1 ADD FULLTEXT(f2);
DROP TABLE t1;
+}
diff --git a/mysql-test/suite/innodb_fts/t/sync.test b/mysql-test/suite/innodb_fts/t/sync.test
index 168309a5..56b9052a 100644
--- a/mysql-test/suite/innodb_fts/t/sync.test
+++ b/mysql-test/suite/innodb_fts/t/sync.test
@@ -115,7 +115,7 @@ CREATE TABLE t1 (
INSERT INTO t1(title) VALUES('database');
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
SET debug_dbug = '+d,fts_instrument_sync_debug,fts_write_node_crash';
diff --git a/mysql-test/suite/innodb_fts/t/sync_ddl.test b/mysql-test/suite/innodb_fts/t/sync_ddl.test
index 6a16ecec..9a0451e9 100644
--- a/mysql-test/suite/innodb_fts/t/sync_ddl.test
+++ b/mysql-test/suite/innodb_fts/t/sync_ddl.test
@@ -182,12 +182,13 @@ INSERT INTO t1 (value) VALUES
('collation of latin1_bin to make it case sensitive')
;
+--enable_info
ALTER TABLE t1
DROP COLUMN id1,
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
DROP INDEX idx1,
- ADD FULLTEXT INDEX idx2(value),
- ALGORITHM=INPLACE;
+ ADD FULLTEXT INDEX idx2(value);
+--disable_info
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_gis/t/rollback.test b/mysql-test/suite/innodb_gis/t/rollback.test
index fcfe71e2..a0998669 100644
--- a/mysql-test/suite/innodb_gis/t/rollback.test
+++ b/mysql-test/suite/innodb_gis/t/rollback.test
@@ -463,7 +463,7 @@ rollback;
# Test partial update rollback after recovered.
# Crash the server in partial update.
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
set session debug="+d,row_mysql_crash_if_error";
--error 2013
update t1 set a=point(5,5), b=point(5,5), c=5 where i < 3;
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
index 62e792c1..57926d92 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum_2.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
@@ -9,11 +9,6 @@
--source include/not_embedded.inc
-- source include/big_test.inc
---disable_query_log
-# This warning occurs due to small buffer pool size(i.e. 8MB). It doesn't occur
-# with --mysqld=--innodb_buffer_pool_size=10MB
-call mtr.add_suppression("\\[Warning\\] InnoDB: Difficult to find free blocks in the buffer pool.*");
---enable_query_log
let MYSQLD_BASEDIR= `SELECT @@basedir`;
let MYSQLD_DATADIR= `SELECT @@datadir`;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
diff --git a/mysql-test/suite/innodb_zip/t/restart.test b/mysql-test/suite/innodb_zip/t/restart.test
index c442b919..0c8073b8 100644
--- a/mysql-test/suite/innodb_zip/t/restart.test
+++ b/mysql-test/suite/innodb_zip/t/restart.test
@@ -412,13 +412,13 @@ SHOW CREATE TABLE t77_restart;
--echo # Moving tablespace 't4_restart' from MYSQL_DATA_DIR to MYSQL_TMP_DIR/new_dir
--copy_file $MYSQL_DATA_DIR/test/t4_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
--remove_file $MYSQL_DATA_DIR/test/t4_restart.ibd
---exec echo $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd > $MYSQL_DATA_DIR/test/t4_restart.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd $MYSQL_DATA_DIR/test/t4_restart.isl
--echo # Moving tablespace 't55_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
--copy_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
--remove_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
--remove_file $MYSQL_DATA_DIR/test/t55_restart.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd > $MYSQL_DATA_DIR/test/t55_restart.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd $MYSQL_DATA_DIR/test/t55_restart.isl
--echo # Moving tablespace 't66_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
--copy_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p0.ibd $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd
@@ -430,9 +430,9 @@ SHOW CREATE TABLE t77_restart;
--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
--echo # Moving tablespace 't77_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p0#SP#s0.ibd $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd
@@ -447,10 +447,10 @@ SHOW CREATE TABLE t77_restart;
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
---exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
+--write_line $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
--echo ---- MYSQL_DATA_DIR/test
--list_files_write_file $MYSQLD_DATADIR.files.txt $MYSQL_DATA_DIR/test
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 36dcd1e4..47b53b71 100644
--- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
+++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test
@@ -75,7 +75,7 @@ SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
SELECT * FROM t1;
# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Execute the statement that causes the crash
--error 2013
@@ -96,7 +96,7 @@ SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
SELECT COUNT(*) FROM t1;
# Don't start up the server right away.
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Execute the statement that causes the crash
--error 2013
@@ -113,7 +113,7 @@ EOF
--echo # Restart and reconnect to the server
--enable_reconnect
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--disable_reconnect
diff --git a/mysql-test/suite/json/r/json_no_table.result b/mysql-test/suite/json/r/json_no_table.result
index 375b29d5..df8ce6f6 100644
--- a/mysql-test/suite/json/r/json_no_table.result
+++ b/mysql-test/suite/json/r/json_no_table.result
@@ -1002,19 +1002,27 @@ DOUBLE
error ER_INVALID_JSON_TEXT_IN_PARAM
select json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8'));
json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8'))
-INTEGER
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5
# ----------------------------------------------------------------------
# Test of json_compact(literal)
# ----------------------------------------------------------------------
select json_type(json_compact(cast('2014-11-25 18:00' as datetime)));
json_type(json_compact(cast('2014-11-25 18:00' as datetime)))
-INTEGER
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5
select json_type(json_compact(cast('2014-11-25' as date)));
json_type(json_compact(cast('2014-11-25' as date)))
-INTEGER
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 5
select json_type(json_compact(cast('18:00:59' as time)));
json_type(json_compact(cast('18:00:59' as time)))
-INTEGER
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 3
select json_type(json_compact(127));
json_type(json_compact(127))
INTEGER
@@ -1064,7 +1072,9 @@ json_type(json_compact(3.14E30))
DOUBLE
select json_type(json_compact(cast('10101abcde' as binary)));
json_type(json_compact(cast('10101abcde' as binary)))
-INTEGER
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 6
select json_type(json_compact(ST_GeomFromText('POINT(1 1)')));
json_type(json_compact(ST_GeomFromText('POINT(1 1)')))
NULL
diff --git a/mysql-test/suite/json/r/type_json.result b/mysql-test/suite/json/r/type_json.result
index 333e933e..44e14978 100644
--- a/mysql-test/suite/json/r/type_json.result
+++ b/mysql-test/suite/json/r/type_json.result
@@ -2880,5 +2880,13 @@ DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP TABLE t1, t1c, t2;
#
+# MDEV-30646 View created via JSON_ARRAYAGG returns incorrect json object
+#
+CREATE VIEW v1 AS SELECT JSON_OBJECT('plugin','unix_socket') as v1_json;
+SELECT JSON_ARRAYAGG(v1_json) FROM v1;
+JSON_ARRAYAGG(v1_json)
+[{"plugin": "unix_socket"}]
+DROP VIEW v1;
+#
# End of 10.5 tests
#
diff --git a/mysql-test/suite/json/t/type_json.test b/mysql-test/suite/json/t/type_json.test
index f84bef78..03236070 100644
--- a/mysql-test/suite/json/t/type_json.test
+++ b/mysql-test/suite/json/t/type_json.test
@@ -139,5 +139,14 @@ DROP PROCEDURE p2;
DROP TABLE t1, t1c, t2;
--echo #
+--echo # MDEV-30646 View created via JSON_ARRAYAGG returns incorrect json object
+--echo #
+
+CREATE VIEW v1 AS SELECT JSON_OBJECT('plugin','unix_socket') as v1_json;
+SELECT JSON_ARRAYAGG(v1_json) FROM v1;
+DROP VIEW v1;
+
+
+--echo #
--echo # End of 10.5 tests
--echo #
diff --git a/mysql-test/suite/large_tests/r/maria_recover_encrypted.result b/mysql-test/suite/large_tests/r/maria_recover_encrypted.result
index a7293d45..fb7f1ef1 100644
--- a/mysql-test/suite/large_tests/r/maria_recover_encrypted.result
+++ b/mysql-test/suite/large_tests/r/maria_recover_encrypted.result
@@ -36,7 +36,7 @@ CALL proc_insert_many();
UNLOCK TABLES;
SET debug_dbug="d,crash_shutdown";
shutdown;
-ERROR HY000: Lost connection to MySQL server during query
+ERROR HY000: Lost connection to server during query
SELECT * FROM t1 ORDER BY 1 DESC LIMIT 10;
field1 field2 field3
1069999 2069999 3069999
diff --git a/mysql-test/suite/large_tests/t/maria_recover_encrypted.test b/mysql-test/suite/large_tests/t/maria_recover_encrypted.test
index 4c590e5e..1064c2c0 100644
--- a/mysql-test/suite/large_tests/t/maria_recover_encrypted.test
+++ b/mysql-test/suite/large_tests/t/maria_recover_encrypted.test
@@ -3,6 +3,8 @@
--source include/have_maria.inc
--source include/default_charset.inc
+--source include/not_embedded.inc
+--source include/have_debug.inc
# Cleanup
--disable_warnings
@@ -13,7 +15,7 @@ DROP PROCEDURE IF EXISTS proc_insert_many;
# --------
# Configure encryption
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
@@ -21,7 +23,7 @@ DROP PROCEDURE IF EXISTS proc_insert_many;
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
+--write_line "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
@@ -73,7 +75,7 @@ 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
+--write_line "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;
diff --git a/mysql-test/suite/maria/alter.result b/mysql-test/suite/maria/alter.result
index cc035426..17164343 100644
--- a/mysql-test/suite/maria/alter.result
+++ b/mysql-test/suite/maria/alter.result
@@ -193,3 +193,29 @@ ALTER TABLE t1 DISABLE KEYS;
INSERT INTO t1 VALUES (1, 'Nine chars or more');
ALTER TABLE t1 ENABLE KEYS;
DROP TABLE t1;
+#
+# MDEV-25923 Memory not freed or Assertion `old_flags == ((my_flags &
+# 0x10000U) ? 1 : 0)' failed in my_realloc upon ALTER on Aria table
+# with GIS column
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY, a POINT DEFAULT ST_GEOMFROMTEXT('Point(1 1)')) ENGINE=Aria;
+INSERT INTO t1 (pk) SELECT seq FROM seq_1_to_100;
+SET @old_threads= @@SESSION.aria_repair_threads;
+SET SESSION aria_repair_threads= 2;
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+DROP TABLE t1;
+#
+# MDEV-33562: Assertion `(old_flags & 1) == ((my_flags & 0x10000U) ?
+# 1 : 0)' failed in my_realloc from sort_get_next_record on INSERT
+#
+SET @old_mode= @@SESSION.sql_mode;
+SET sql_mode='';
+CREATE TEMPORARY TABLE t (b TEXT, INDEX s(b(300))) ROW_FORMAT=DYNAMIC ENGINE=Aria;
+INSERT INTO t VALUES (REPEAT ('a',10000000));
+Warnings:
+Warning 1265 Data truncated for column 'b' at row 1
+CREATE TABLE ti LIKE t;
+INSERT INTO ti SELECT * FROM t;
+DROP TABLE t, ti;
+SET SESSION aria_repair_threads= @old_threads;
+SET SESSION sql_mode= @old_mode;
diff --git a/mysql-test/suite/maria/alter.test b/mysql-test/suite/maria/alter.test
index 525cd80f..a68b5f2e 100644
--- a/mysql-test/suite/maria/alter.test
+++ b/mysql-test/suite/maria/alter.test
@@ -203,3 +203,31 @@ ALTER TABLE t1 DISABLE KEYS;
INSERT INTO t1 VALUES (1, 'Nine chars or more');
ALTER TABLE t1 ENABLE KEYS;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-25923 Memory not freed or Assertion `old_flags == ((my_flags &
+--echo # 0x10000U) ? 1 : 0)' failed in my_realloc upon ALTER on Aria table
+--echo # with GIS column
+--echo #
+
+CREATE TABLE t1 (pk INT PRIMARY KEY, a POINT DEFAULT ST_GEOMFROMTEXT('Point(1 1)')) ENGINE=Aria;
+INSERT INTO t1 (pk) SELECT seq FROM seq_1_to_100;
+SET @old_threads= @@SESSION.aria_repair_threads;
+SET SESSION aria_repair_threads= 2;
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-33562: Assertion `(old_flags & 1) == ((my_flags & 0x10000U) ?
+--echo # 1 : 0)' failed in my_realloc from sort_get_next_record on INSERT
+--echo #
+
+SET @old_mode= @@SESSION.sql_mode;
+SET sql_mode='';
+CREATE TEMPORARY TABLE t (b TEXT, INDEX s(b(300))) ROW_FORMAT=DYNAMIC ENGINE=Aria;
+INSERT INTO t VALUES (REPEAT ('a',10000000));
+CREATE TABLE ti LIKE t;
+INSERT INTO ti SELECT * FROM t;
+DROP TABLE t, ti;
+SET SESSION aria_repair_threads= @old_threads;
+SET SESSION sql_mode= @old_mode;
diff --git a/mysql-test/suite/maria/bulk_insert_crash.test b/mysql-test/suite/maria/bulk_insert_crash.test
index d9167c3f..04f3a148 100644
--- a/mysql-test/suite/maria/bulk_insert_crash.test
+++ b/mysql-test/suite/maria/bulk_insert_crash.test
@@ -12,7 +12,7 @@
#
# Write file to make mysql-test-run.pl expect crash and restart
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
create table t1 (a int primary key, b int, c int, unique key(b), key(c)) engine=aria transactional=1;
insert into t1 values (1000,1000,1000);
diff --git a/mysql-test/suite/maria/encrypt-no-key.test b/mysql-test/suite/maria/encrypt-no-key.test
index 45744122..e1d67409 100644
--- a/mysql-test/suite/maria/encrypt-no-key.test
+++ b/mysql-test/suite/maria/encrypt-no-key.test
@@ -29,10 +29,10 @@ CREATE TABLE t1 (a INT KEY,b INT,KEY(b)) ENGINE=Aria;
--echo # Restart with encryption enabled
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
---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
+--write_line "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
@@ -43,10 +43,10 @@ LOAD INDEX INTO CACHE t1;
# Restart without encryption. Above table should be unreadable
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart:--aria-encrypt-tables=0" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "restart:--aria-encrypt-tables=0" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/maria/encrypt-wrong-key.test b/mysql-test/suite/maria/encrypt-wrong-key.test
index ac060c4e..274a165c 100644
--- a/mysql-test/suite/maria/encrypt-wrong-key.test
+++ b/mysql-test/suite/maria/encrypt-wrong-key.test
@@ -9,7 +9,7 @@ call mtr.add_suppression("System key id 1 is missing");
call mtr.add_suppression("Unknown key id 1");
call mtr.add_suppression("Initialization of encryption failed.*");
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
@@ -17,14 +17,14 @@ call mtr.add_suppression("Initialization of encryption failed.*");
1;770A8A65DA156D24EE2A093277530142
EOF
---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
+--write_line "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
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=Aria;
INSERT INTO t1 VALUES (1);
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.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 --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "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
@@ -43,11 +43,11 @@ repair table t1;
--error HA_ERR_NO_ENCRYPTION
INSERT INTO t1 VALUES (2);
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
---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
+--write_line "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/ps_maria.result b/mysql-test/suite/maria/ps_maria.result
index 5c128a32..3f806c43 100644
--- a/mysql-test/suite/maria/ps_maria.result
+++ b/mysql-test/suite/maria/ps_maria.result
@@ -1798,7 +1798,7 @@ t5 CREATE TABLE `t5` (
`param09` longtext DEFAULT NULL,
`const10` bigint(17) DEFAULT NULL,
`param10` bigint(20) DEFAULT NULL,
- `const11` int(4) DEFAULT NULL,
+ `const11` int(5) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
@@ -1828,7 +1828,7 @@ def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
def test t5 t5 const10 const10 8 17 9 Y 32768 0 63
def test t5 t5 param10 param10 8 20 9 Y 32768 0 63
-def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
+def test t5 t5 const11 const11 3 5 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
diff --git a/mysql-test/suite/maria/repair.result b/mysql-test/suite/maria/repair.result
index 458b5503..7905cb02 100644
--- a/mysql-test/suite/maria/repair.result
+++ b/mysql-test/suite/maria/repair.result
@@ -62,3 +62,26 @@ SET SESSION aria_sort_buffer_size=default;
#
# End of 10.3 tests
#
+#
+# MDEV-34055 Assertion `readbytes != (size_t)-1 ||
+# (*__errno_location ()) != 9' failure or corruption errors upon
+# REPAIR on Aria tables
+#
+CREATE OR REPLACE TABLE t1 (a INT, b INT, UNIQUE(b), UNIQUE(a)) ENGINE=Aria;
+INSERT INTO t1 VALUES (1,2);
+REPAIR TABLE t1 EXTENDED QUICK USE_FRM;
+Table Op Msg_type Msg_text
+test.t1 repair warning Number of rows changed from 0 to 1
+test.t1 repair status OK
+CREATE TABLE t2 (c INT) ENGINE=Aria;
+SELECT * FROM t2;
+c
+REPLACE INTO t1 VALUES (1,3);
+REPAIR TABLE t2, t1 QUICK;
+Table Op Msg_type Msg_text
+test.t2 repair status OK
+test.t1 repair status OK
+DROP TABLE t1, t2;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/maria/repair.test b/mysql-test/suite/maria/repair.test
index 688ac076..08234a5a 100644
--- a/mysql-test/suite/maria/repair.test
+++ b/mysql-test/suite/maria/repair.test
@@ -74,3 +74,22 @@ SET SESSION aria_sort_buffer_size=default;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-34055 Assertion `readbytes != (size_t)-1 ||
+--echo # (*__errno_location ()) != 9' failure or corruption errors upon
+--echo # REPAIR on Aria tables
+--echo #
+
+CREATE OR REPLACE TABLE t1 (a INT, b INT, UNIQUE(b), UNIQUE(a)) ENGINE=Aria;
+INSERT INTO t1 VALUES (1,2);
+REPAIR TABLE t1 EXTENDED QUICK USE_FRM;
+CREATE TABLE t2 (c INT) ENGINE=Aria;
+SELECT * FROM t2;
+REPLACE INTO t1 VALUES (1,3);
+REPAIR TABLE t2, t1 QUICK;
+DROP TABLE t1, t2;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/mariabackup/absolute_ibdata_paths.test b/mysql-test/suite/mariabackup/absolute_ibdata_paths.test
index fa304f0b..f4d0e2a5 100644
--- a/mysql-test/suite/mariabackup/absolute_ibdata_paths.test
+++ b/mysql-test/suite/mariabackup/absolute_ibdata_paths.test
@@ -30,7 +30,7 @@ let $_innodb_data_file_path=`select @@innodb_data_file_path`;
let $_innodb_data_home_dir=`select @@innodb_data_home_dir`;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
diff --git a/mysql-test/suite/mariabackup/alter_copy_race.result b/mysql-test/suite/mariabackup/alter_copy_race.result
index 82202249..ae58ac28 100644
--- a/mysql-test/suite/mariabackup/alter_copy_race.result
+++ b/mysql-test/suite/mariabackup/alter_copy_race.result
@@ -4,7 +4,7 @@ INSERT into t1 values(1);
connect con2, localhost, root,,;
connection con2;
set lock_wait_timeout=1;
-SET debug_sync='copy_data_between_tables_before_reset_backup_lock SIGNAL go WAIT_FOR after_backup_stage_block_commit';
+SET debug_sync='copy_data_between_tables_before_reset_backup_lock SIGNAL go WAIT_FOR after_backup_stage_block_ddl';
SET debug_sync='alter_table_after_temp_table_drop SIGNAL temp_table_dropped';
SET debug_sync='now WAIT_FOR after_backup_stage_start';ALTER TABLE test.t1 FORCE, algorithm=COPY;|
connection default;
diff --git a/mysql-test/suite/mariabackup/alter_copy_race.test b/mysql-test/suite/mariabackup/alter_copy_race.test
index 553643bf..cfabd76c 100644
--- a/mysql-test/suite/mariabackup/alter_copy_race.test
+++ b/mysql-test/suite/mariabackup/alter_copy_race.test
@@ -18,7 +18,7 @@ INSERT into t1 values(1);
connect con2, localhost, root,,;
connection con2;
set lock_wait_timeout=1;
-SET debug_sync='copy_data_between_tables_before_reset_backup_lock SIGNAL go WAIT_FOR after_backup_stage_block_commit';
+SET debug_sync='copy_data_between_tables_before_reset_backup_lock SIGNAL go WAIT_FOR after_backup_stage_block_ddl';
SET debug_sync='alter_table_after_temp_table_drop SIGNAL temp_table_dropped';
DELIMITER |;
send SET debug_sync='now WAIT_FOR after_backup_stage_start';ALTER TABLE test.t1 FORCE, algorithm=COPY;|
@@ -27,7 +27,7 @@ connection default;
# setup mariabackup events
let after_backup_stage_start=SET debug_sync='now SIGNAL after_backup_stage_start WAIT_FOR go';
-let after_backup_stage_block_commit=SET debug_sync='now SIGNAL after_backup_stage_block_commit';
+let after_backup_stage_block_ddl=SET debug_sync='now SIGNAL after_backup_stage_block_ddl';
let backup_fix_ddl=SET debug_sync='now WAIT_FOR temp_table_dropped';
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
diff --git a/mysql-test/suite/mariabackup/apply-log-only-incr.test b/mysql-test/suite/mariabackup/apply-log-only-incr.test
index 01b74af2..1da2be09 100644
--- a/mysql-test/suite/mariabackup/apply-log-only-incr.test
+++ b/mysql-test/suite/mariabackup/apply-log-only-incr.test
@@ -19,7 +19,7 @@ dec $n;
}
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
let $n=100;
while ($n) {
@@ -36,7 +36,7 @@ disconnect flush_log;
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 --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir ;
exec $XTRABACKUP --prepare --verbose --target-dir=$basedir ;
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/apply-log-only.test b/mysql-test/suite/mariabackup/apply-log-only.test
index 7ffed071..dbae77b7 100644
--- a/mysql-test/suite/mariabackup/apply-log-only.test
+++ b/mysql-test/suite/mariabackup/apply-log-only.test
@@ -8,7 +8,7 @@ start transaction;
INSERT INTO t VALUES(1);
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
exec $XTRABACKUP --prepare --target-dir=$basedir ;
diff --git a/mysql-test/suite/mariabackup/aria_backup.opt b/mysql-test/suite/mariabackup/aria_backup.opt
new file mode 100644
index 00000000..3565e3f1
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_backup.opt
@@ -0,0 +1 @@
+--loose-partition --loose-aria-log-file-size=8388608
diff --git a/mysql-test/suite/mariabackup/aria_backup.result b/mysql-test/suite/mariabackup/aria_backup.result
new file mode 100644
index 00000000..e8c73f0a
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_backup.result
@@ -0,0 +1,780 @@
+###
+# Test for backup to stream
+#####
+###
+# Test for mix of online/offline backup tables
+#####
+CREATE TABLE t_default(i INT PRIMARY KEY)
+ENGINE ARIA;
+INSERT INTO t_default VALUES (1);
+CREATE TABLE t_tr_p_ch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_tr_p_ch VALUES (1);
+CREATE TABLE t_tr_p_nch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=0;
+INSERT INTO t_tr_p_nch VALUES (1);
+CREATE TABLE t_p_ch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_p_ch VALUES (1);
+CREATE TABLE t_p_nch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=PAGE PAGE_CHECKSUM=0;
+INSERT INTO t_p_nch VALUES (1);
+CREATE TABLE t_fixed(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=FIXED PAGE_CHECKSUM=1;
+INSERT INTO t_fixed VALUES (1);
+CREATE TABLE t_dyn(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=DYNAMIC PAGE_CHECKSUM=1;
+INSERT INTO t_dyn VALUES (1);
+# Test for partitioned table
+CREATE TABLE t_part_online(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL = 1 PAGE_CHECKSUM = 1
+PARTITION BY RANGE( i ) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN (20),
+PARTITION p2 VALUES LESS THAN (30)
+);
+INSERT INTO t_part_online VALUES(5);
+INSERT INTO t_part_online VALUES(15);
+INSERT INTO t_part_online VALUES(25);
+SELECT * FROM t_part_online;
+i
+5
+15
+25
+CREATE TABLE t_part_offline(i INT)
+ENGINE ARIA TRANSACTIONAL = 0 PAGE_CHECKSUM = 0
+PARTITION BY RANGE( i ) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN (20),
+PARTITION p2 VALUES LESS THAN (30)
+);
+INSERT INTO t_part_offline VALUES(5);
+INSERT INTO t_part_offline VALUES(15);
+INSERT INTO t_part_offline VALUES(25);
+# Test for filename to tablename mapping
+CREATE TABLE `t 1 t-1`(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO `t 1 t-1` VALUES (1);
+CREATE TABLE `t-part online`(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL = 1 PAGE_CHECKSUM = 1
+PARTITION BY RANGE( i ) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN (20),
+PARTITION p2 VALUES LESS THAN (30)
+);
+INSERT INTO `t-part online` VALUES(5);
+INSERT INTO `t-part online` VALUES(15);
+INSERT INTO `t-part online` VALUES(25);
+###
+# Test for redo log files backup;
+#####
+CREATE TABLE t_logs_1(i INT)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+CREATE TABLE t_logs_2 LIKE t_logs_1;
+CREATE TABLE t_bulk_ins LIKE t_logs_1;
+INSERT INTO t_logs_1 VALUES
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+# Generate several log files
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+###
+# Test for DML during backup for online backup
+#####
+CREATE TABLE t_dml_ins(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_ins VALUES(1);
+CREATE TABLE t_dml_upd(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_upd VALUES(1);
+CREATE TABLE t_dml_del(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_del VALUES(1);
+###
+# Test for DDL during backup for online backup
+#####
+CREATE DATABASE test_for_db_drop;
+CREATE TABLE test_for_db_drop.t(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_db_create(i INT PRIMARY KEY) ENGINE ARIA;
+SHOW DATABASES;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+sys
+test
+test_for_db_drop
+CREATE TABLE t_alter(i INT PRIMARY KEY) ENGINE ARIA;
+INSERT INTO t_alter VALUES (1);
+CREATE TABLE t_trunc(i INT PRIMARY KEY) ENGINE ARIA;
+INSERT INTO t_trunc VALUES (1);
+CREATE TABLE t_ch_i (i int(10), index(i) ) ENGINE=Aria;
+INSERT INTO t_ch_i VALUES(1);
+CREATE TABLE t_change_engine(i INT PRIMARY KEY) ENGINE InnoDB;
+INSERT INTO t_change_engine VALUES (1);
+CREATE TABLE t_rename(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE DATABASE test_for_rename;
+CREATE TABLE t_rename_2(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_3(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_4(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_delete(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_delete_2(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_alter(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_create(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_part_create(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_part_add_part(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_part_change_eng(i INT PRIMARY KEY) ENGINE ARIA PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_change_eng_2(i INT PRIMARY KEY) ENGINE InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_change_eng_3(i INT PRIMARY KEY) ENGINE Aria;
+CREATE TABLE t_part_alter(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_alter_2(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 3;
+CREATE TABLE t_part_drop(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_rename(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_rename_3(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_rm_part(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+SET SESSION debug_dbug="+d,maria_flush_whole_log";
+SET GLOBAL aria_checkpoint_interval=10000;
+### Backup to stream
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+### Result for DDL test
+SHOW CREATE TABLE t_alter;
+Table Create Table
+t_alter CREATE TABLE `t_alter` (
+ `i` int(11) NOT NULL,
+ `c` int(11) DEFAULT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_alter;
+i c
+1 NULL
+SHOW CREATE TABLE t_change_engine;
+Table Create Table
+t_change_engine CREATE TABLE `t_change_engine` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_change_engine;
+i
+1
+SELECT * FROM t_trunc;
+i
+1
+SELECT * FROM t_ch_i;
+i
+1
+SELECT * FROM t_rename_new;
+i
+SELECT * FROM test_for_rename.t_rename_new_2;
+i
+SELECT * FROM t_rename_new_new_3;
+i
+SELECT * FROM t_rename_new_4;
+i
+SELECT * FROM t_delete;
+ERROR 42S02: Table 'test.t_delete' doesn't exist
+SHOW CREATE TABLE t_delete_2;
+Table Create Table
+t_delete_2 CREATE TABLE `t_delete_2` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_rename_alter_2;
+i c
+SELECT * FROM t_rename_create;
+d
+SELECT * FROM t_rename_create_new;
+i
+SHOW CREATE TABLE t_part_create_2;
+Table Create Table
+t_part_create_2 CREATE TABLE `t_part_create_2` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_create_2;
+i
+SHOW CREATE TABLE t_part_add_part;
+Table Create Table
+t_part_add_part CREATE TABLE `t_part_add_part` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_add_part;
+i
+SHOW CREATE TABLE t_part_change_eng;
+Table Create Table
+t_part_change_eng CREATE TABLE `t_part_change_eng` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_change_eng;
+i
+SHOW CREATE TABLE t_part_change_eng_2;
+Table Create Table
+t_part_change_eng_2 CREATE TABLE `t_part_change_eng_2` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_change_eng_2;
+i
+SELECT * FROM t_part_alter;
+i c
+SHOW CREATE TABLE t_part_alter_2;
+Table Create Table
+t_part_alter_2 CREATE TABLE `t_part_alter_2` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_alter_2;
+i
+SELECT * FROM t_part_drop;
+ERROR 42S02: Table 'test.t_part_drop' doesn't exist
+SELECT * FROM t_part_rename;
+ERROR 42S02: Table 'test.t_part_rename' doesn't exist
+SELECT * FROM t_part_rename_2;
+i
+SELECT * FROM t_part_rename_3;
+ERROR 42S02: Table 'test.t_part_rename_3' doesn't exist
+SELECT * FROM test_for_rename.t_part_rename_4;
+i
+SHOW CREATE TABLE t_part_rm_part;
+Table Create Table
+t_part_rm_part CREATE TABLE `t_part_rm_part` (
+ `i` int(11) NOT NULL,
+ `c` int(11) DEFAULT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_part_rm_part;
+i c
+SHOW DATABASES;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+sys
+test
+test_for_db_create
+test_for_rename
+### Clean up for DDL test
+DROP DATABASE test_for_db_create;
+DROP TABLE t_db_create;
+DROP TABLE t_change_engine;
+DROP TABLE t_alter;
+DROP TABLE t_trunc;
+DROP TABLE t_ch_i;
+DROP TABLE t_rename_new;
+DROP TABLE t_rename_new_new_3;
+DROP TABLE t_rename_new_4;
+DROP TABLE t_delete_2;
+DROP TABLE t_rename_alter_2;
+DROP TABLE t_rename_create;
+DROP TABLE t_rename_create_new;
+DROP TABLE t_part_create;
+DROP TABLE t_part_create_2;
+DROP TABLE t_part_add_part;
+DROP TABLE t_part_change_eng;
+DROP TABLE t_part_change_eng_2;
+DROP TABLE t_part_change_eng_3;
+DROP TABLE t_part_alter;
+DROP TABLE t_part_alter_2;
+DROP TABLE t_part_rename_2;
+DROP TABLE t_part_rm_part;
+DROP DATABASE test_for_rename;
+### Result for DML test
+SELECT * FROM t_dml_ins;
+i
+1
+2
+SELECT * FROM t_dml_upd;
+i
+2
+SELECT * FROM t_dml_del;
+i
+### Clean up for DML test
+DROP TABLE t_dml_ins;
+DROP TABLE t_dml_upd;
+DROP TABLE t_dml_del;
+### Result for redo log files backup
+# ok
+# ok
+# ok
+### Cleanup for redo log files backup
+DROP TABLE t_logs_1;
+DROP TABLE t_logs_2;
+DROP TABLE t_bulk_ins;
+### Result for online/offline tables test
+SELECT * FROM t_default;
+i
+1
+SELECT * FROM t_tr_p_ch;
+i
+1
+SELECT * FROM t_tr_p_nch;
+i
+1
+SELECT * FROM t_p_ch;
+i
+1
+SELECT * FROM t_p_nch;
+i
+1
+SELECT * FROM t_fixed;
+i
+1
+SELECT * FROM t_dyn;
+i
+1
+SELECT * FROM t_part_online;
+i
+5
+15
+25
+SELECT * FROM t_part_offline;
+i
+5
+15
+25
+SELECT * FROM `t 1 t-1`;
+i
+1
+SELECT * FROM `t-part online`;
+i
+5
+15
+25
+### Cleanup for online/offline tables test
+DROP TABLE t_default;
+DROP TABLE t_tr_p_ch;
+DROP TABLE t_tr_p_nch;
+DROP TABLE t_p_ch;
+DROP TABLE t_p_nch;
+DROP TABLE t_fixed;
+DROP TABLE t_dyn;
+DROP TABLE t_part_online;
+DROP TABLE t_part_offline;
+DROP TABLE `t 1 t-1`;
+DROP TABLE `t-part online`;
+###
+# Test for backup to directory
+#####
+###
+# Test for mix of online/offline backup tables
+#####
+CREATE TABLE t_default(i INT PRIMARY KEY)
+ENGINE ARIA;
+INSERT INTO t_default VALUES (1);
+CREATE TABLE t_tr_p_ch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_tr_p_ch VALUES (1);
+CREATE TABLE t_tr_p_nch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=0;
+INSERT INTO t_tr_p_nch VALUES (1);
+CREATE TABLE t_p_ch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_p_ch VALUES (1);
+CREATE TABLE t_p_nch(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=PAGE PAGE_CHECKSUM=0;
+INSERT INTO t_p_nch VALUES (1);
+CREATE TABLE t_fixed(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=FIXED PAGE_CHECKSUM=1;
+INSERT INTO t_fixed VALUES (1);
+CREATE TABLE t_dyn(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=DYNAMIC PAGE_CHECKSUM=1;
+INSERT INTO t_dyn VALUES (1);
+# Test for partitioned table
+CREATE TABLE t_part_online(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL = 1 PAGE_CHECKSUM = 1
+PARTITION BY RANGE( i ) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN (20),
+PARTITION p2 VALUES LESS THAN (30)
+);
+INSERT INTO t_part_online VALUES(5);
+INSERT INTO t_part_online VALUES(15);
+INSERT INTO t_part_online VALUES(25);
+SELECT * FROM t_part_online;
+i
+5
+15
+25
+CREATE TABLE t_part_offline(i INT)
+ENGINE ARIA TRANSACTIONAL = 0 PAGE_CHECKSUM = 0
+PARTITION BY RANGE( i ) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN (20),
+PARTITION p2 VALUES LESS THAN (30)
+);
+INSERT INTO t_part_offline VALUES(5);
+INSERT INTO t_part_offline VALUES(15);
+INSERT INTO t_part_offline VALUES(25);
+# Test for filename to tablename mapping
+CREATE TABLE `t 1 t-1`(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO `t 1 t-1` VALUES (1);
+CREATE TABLE `t-part online`(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL = 1 PAGE_CHECKSUM = 1
+PARTITION BY RANGE( i ) (
+PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN (20),
+PARTITION p2 VALUES LESS THAN (30)
+);
+INSERT INTO `t-part online` VALUES(5);
+INSERT INTO `t-part online` VALUES(15);
+INSERT INTO `t-part online` VALUES(25);
+###
+# Test for redo log files backup;
+#####
+CREATE TABLE t_logs_1(i INT)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+CREATE TABLE t_logs_2 LIKE t_logs_1;
+CREATE TABLE t_bulk_ins LIKE t_logs_1;
+INSERT INTO t_logs_1 VALUES
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+# Generate several log files
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+###
+# Test for DML during backup for online backup
+#####
+CREATE TABLE t_dml_ins(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_ins VALUES(1);
+CREATE TABLE t_dml_upd(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_upd VALUES(1);
+CREATE TABLE t_dml_del(i INT PRIMARY KEY)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_del VALUES(1);
+###
+# Test for DDL during backup for online backup
+#####
+CREATE DATABASE test_for_db_drop;
+CREATE TABLE test_for_db_drop.t(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_db_create(i INT PRIMARY KEY) ENGINE ARIA;
+SHOW DATABASES;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+sys
+test
+test_for_db_drop
+CREATE TABLE t_alter(i INT PRIMARY KEY) ENGINE ARIA;
+INSERT INTO t_alter VALUES (1);
+CREATE TABLE t_trunc(i INT PRIMARY KEY) ENGINE ARIA;
+INSERT INTO t_trunc VALUES (1);
+CREATE TABLE t_ch_i (i int(10), index(i) ) ENGINE=Aria;
+INSERT INTO t_ch_i VALUES(1);
+CREATE TABLE t_change_engine(i INT PRIMARY KEY) ENGINE InnoDB;
+INSERT INTO t_change_engine VALUES (1);
+CREATE TABLE t_rename(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE DATABASE test_for_rename;
+CREATE TABLE t_rename_2(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_3(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_4(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_delete(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_delete_2(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_alter(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_rename_create(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_part_create(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_part_add_part(i INT PRIMARY KEY) ENGINE ARIA;
+CREATE TABLE t_part_change_eng(i INT PRIMARY KEY) ENGINE ARIA PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_change_eng_2(i INT PRIMARY KEY) ENGINE InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_change_eng_3(i INT PRIMARY KEY) ENGINE Aria;
+CREATE TABLE t_part_alter(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_alter_2(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 3;
+CREATE TABLE t_part_drop(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_rename(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_rename_3(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_rm_part(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+SET SESSION debug_dbug="+d,maria_flush_whole_log";
+SET GLOBAL aria_checkpoint_interval=10000;
+### Backup to dir
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+### Result for DDL test
+SHOW CREATE TABLE t_alter;
+Table Create Table
+t_alter CREATE TABLE `t_alter` (
+ `i` int(11) NOT NULL,
+ `c` int(11) DEFAULT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_alter;
+i c
+1 NULL
+SHOW CREATE TABLE t_change_engine;
+Table Create Table
+t_change_engine CREATE TABLE `t_change_engine` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_change_engine;
+i
+1
+SELECT * FROM t_trunc;
+i
+1
+SELECT * FROM t_ch_i;
+i
+1
+SELECT * FROM t_rename_new;
+i
+SELECT * FROM test_for_rename.t_rename_new_2;
+i
+SELECT * FROM t_rename_new_new_3;
+i
+SELECT * FROM t_rename_new_4;
+i
+SELECT * FROM t_delete;
+ERROR 42S02: Table 'test.t_delete' doesn't exist
+SHOW CREATE TABLE t_delete_2;
+Table Create Table
+t_delete_2 CREATE TABLE `t_delete_2` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_rename_alter_2;
+i c
+SELECT * FROM t_rename_create;
+d
+SELECT * FROM t_rename_create_new;
+i
+SHOW CREATE TABLE t_part_create_2;
+Table Create Table
+t_part_create_2 CREATE TABLE `t_part_create_2` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_create_2;
+i
+SHOW CREATE TABLE t_part_add_part;
+Table Create Table
+t_part_add_part CREATE TABLE `t_part_add_part` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_add_part;
+i
+SHOW CREATE TABLE t_part_change_eng;
+Table Create Table
+t_part_change_eng CREATE TABLE `t_part_change_eng` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_change_eng;
+i
+SHOW CREATE TABLE t_part_change_eng_2;
+Table Create Table
+t_part_change_eng_2 CREATE TABLE `t_part_change_eng_2` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_change_eng_2;
+i
+SELECT * FROM t_part_alter;
+i c
+SHOW CREATE TABLE t_part_alter_2;
+Table Create Table
+t_part_alter_2 CREATE TABLE `t_part_alter_2` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY HASH (`i`)
+PARTITIONS 2
+SELECT * FROM t_part_alter_2;
+i
+SELECT * FROM t_part_drop;
+ERROR 42S02: Table 'test.t_part_drop' doesn't exist
+SELECT * FROM t_part_rename;
+ERROR 42S02: Table 'test.t_part_rename' doesn't exist
+SELECT * FROM t_part_rename_2;
+i
+SELECT * FROM t_part_rename_3;
+ERROR 42S02: Table 'test.t_part_rename_3' doesn't exist
+SELECT * FROM test_for_rename.t_part_rename_4;
+i
+SHOW CREATE TABLE t_part_rm_part;
+Table Create Table
+t_part_rm_part CREATE TABLE `t_part_rm_part` (
+ `i` int(11) NOT NULL,
+ `c` int(11) DEFAULT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+SELECT * FROM t_part_rm_part;
+i c
+SHOW DATABASES;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+sys
+test
+test_for_db_create
+test_for_rename
+### Clean up for DDL test
+DROP DATABASE test_for_db_create;
+DROP TABLE t_db_create;
+DROP TABLE t_change_engine;
+DROP TABLE t_alter;
+DROP TABLE t_trunc;
+DROP TABLE t_ch_i;
+DROP TABLE t_rename_new;
+DROP TABLE t_rename_new_new_3;
+DROP TABLE t_rename_new_4;
+DROP TABLE t_delete_2;
+DROP TABLE t_rename_alter_2;
+DROP TABLE t_rename_create;
+DROP TABLE t_rename_create_new;
+DROP TABLE t_part_create;
+DROP TABLE t_part_create_2;
+DROP TABLE t_part_add_part;
+DROP TABLE t_part_change_eng;
+DROP TABLE t_part_change_eng_2;
+DROP TABLE t_part_change_eng_3;
+DROP TABLE t_part_alter;
+DROP TABLE t_part_alter_2;
+DROP TABLE t_part_rename_2;
+DROP TABLE t_part_rm_part;
+DROP DATABASE test_for_rename;
+### Result for DML test
+SELECT * FROM t_dml_ins;
+i
+1
+2
+SELECT * FROM t_dml_upd;
+i
+2
+SELECT * FROM t_dml_del;
+i
+### Clean up for DML test
+DROP TABLE t_dml_ins;
+DROP TABLE t_dml_upd;
+DROP TABLE t_dml_del;
+### Result for redo log files backup
+# ok
+# ok
+# ok
+### Cleanup for redo log files backup
+DROP TABLE t_logs_1;
+DROP TABLE t_logs_2;
+DROP TABLE t_bulk_ins;
+### Result for online/offline tables test
+SELECT * FROM t_default;
+i
+1
+SELECT * FROM t_tr_p_ch;
+i
+1
+SELECT * FROM t_tr_p_nch;
+i
+1
+SELECT * FROM t_p_ch;
+i
+1
+SELECT * FROM t_p_nch;
+i
+1
+SELECT * FROM t_fixed;
+i
+1
+SELECT * FROM t_dyn;
+i
+1
+SELECT * FROM t_part_online;
+i
+5
+15
+25
+SELECT * FROM t_part_offline;
+i
+5
+15
+25
+SELECT * FROM `t 1 t-1`;
+i
+1
+SELECT * FROM `t-part online`;
+i
+5
+15
+25
+### Cleanup for online/offline tables test
+DROP TABLE t_default;
+DROP TABLE t_tr_p_ch;
+DROP TABLE t_tr_p_nch;
+DROP TABLE t_p_ch;
+DROP TABLE t_p_nch;
+DROP TABLE t_fixed;
+DROP TABLE t_dyn;
+DROP TABLE t_part_online;
+DROP TABLE t_part_offline;
+DROP TABLE `t 1 t-1`;
+DROP TABLE `t-part online`;
diff --git a/mysql-test/suite/mariabackup/aria_backup.test b/mysql-test/suite/mariabackup/aria_backup.test
new file mode 100644
index 00000000..b844518b
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_backup.test
@@ -0,0 +1,425 @@
+--source include/have_aria.inc
+--source include/have_partition.inc
+--source include/have_debug.inc
+--source include/big_test.inc
+# This test timeouts with msan
+--source include/not_msan.inc
+
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+--let $backup_stream=2
+--let $backup_dir=1
+--let $backup_variant=$backup_stream
+
+while ($backup_variant) {
+if ($backup_variant == $backup_stream) {
+--echo ###
+--echo # Test for backup to stream
+--echo #####
+}
+if ($backup_variant == $backup_dir) {
+--echo ###
+--echo # Test for backup to directory
+--echo #####
+}
+
+--echo ###
+--echo # Test for mix of online/offline backup tables
+--echo #####
+
+CREATE TABLE t_default(i INT PRIMARY KEY)
+ ENGINE ARIA;
+INSERT INTO t_default VALUES (1);
+
+CREATE TABLE t_tr_p_ch(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_tr_p_ch VALUES (1);
+
+CREATE TABLE t_tr_p_nch(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=0;
+INSERT INTO t_tr_p_nch VALUES (1);
+
+CREATE TABLE t_p_ch(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_p_ch VALUES (1);
+
+CREATE TABLE t_p_nch(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=PAGE PAGE_CHECKSUM=0;
+INSERT INTO t_p_nch VALUES (1);
+
+CREATE TABLE t_fixed(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=FIXED PAGE_CHECKSUM=1;
+INSERT INTO t_fixed VALUES (1);
+
+CREATE TABLE t_dyn(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=0 ROW_FORMAT=DYNAMIC PAGE_CHECKSUM=1;
+INSERT INTO t_dyn VALUES (1);
+
+--echo # Test for partitioned table
+CREATE TABLE t_part_online(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL = 1 PAGE_CHECKSUM = 1
+ PARTITION BY RANGE( i ) (
+ PARTITION p0 VALUES LESS THAN (10),
+ PARTITION p1 VALUES LESS THAN (20),
+ PARTITION p2 VALUES LESS THAN (30)
+ );
+
+INSERT INTO t_part_online VALUES(5);
+INSERT INTO t_part_online VALUES(15);
+INSERT INTO t_part_online VALUES(25);
+SELECT * FROM t_part_online;
+
+CREATE TABLE t_part_offline(i INT)
+ ENGINE ARIA TRANSACTIONAL = 0 PAGE_CHECKSUM = 0
+ PARTITION BY RANGE( i ) (
+ PARTITION p0 VALUES LESS THAN (10),
+ PARTITION p1 VALUES LESS THAN (20),
+ PARTITION p2 VALUES LESS THAN (30)
+ );
+
+INSERT INTO t_part_offline VALUES(5);
+INSERT INTO t_part_offline VALUES(15);
+INSERT INTO t_part_offline VALUES(25);
+
+--echo # Test for filename to tablename mapping
+CREATE TABLE `t 1 t-1`(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO `t 1 t-1` VALUES (1);
+
+CREATE TABLE `t-part online`(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL = 1 PAGE_CHECKSUM = 1
+ PARTITION BY RANGE( i ) (
+ PARTITION p0 VALUES LESS THAN (10),
+ PARTITION p1 VALUES LESS THAN (20),
+ PARTITION p2 VALUES LESS THAN (30)
+ );
+
+INSERT INTO `t-part online` VALUES(5);
+INSERT INTO `t-part online` VALUES(15);
+INSERT INTO `t-part online` VALUES(25);
+
+
+--echo ###
+--echo # Test for redo log files backup;
+--echo #####
+CREATE TABLE t_logs_1(i INT)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+CREATE TABLE t_logs_2 LIKE t_logs_1;
+CREATE TABLE t_bulk_ins LIKE t_logs_1;
+INSERT INTO t_logs_1 VALUES
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
+ (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+--echo # Generate several log files
+--let $i = 0
+while ($i < 14) {
+INSERT INTO t_logs_1 SELECT * FROM t_logs_1;
+--inc $i
+}
+
+--echo ###
+--echo # Test for DML during backup for online backup
+--echo #####
+CREATE TABLE t_dml_ins(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_ins VALUES(1);
+--let after_aria_table_copy_test_t_dml_ins=INSERT INTO test.t_dml_ins VALUES(2)
+CREATE TABLE t_dml_upd(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_upd VALUES(1);
+--let after_aria_table_copy_test_t_dml_upd=UPDATE test.t_dml_upd SET i = 2
+CREATE TABLE t_dml_del(i INT PRIMARY KEY)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+INSERT INTO t_dml_del VALUES(1);
+--let after_aria_table_copy_test_t_dml_del=DELETE FROM test.t_dml_del
+
+--echo ###
+--echo # Test for DDL during backup for online backup
+--echo #####
+CREATE DATABASE test_for_db_drop;
+CREATE TABLE test_for_db_drop.t(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_for_db_drop_t=DROP DATABASE test_for_db_drop
+CREATE TABLE t_db_create(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_db_create=CREATE DATABASE test_for_db_create
+--sorted_result
+SHOW DATABASES;
+
+CREATE TABLE t_alter(i INT PRIMARY KEY) ENGINE ARIA;
+INSERT INTO t_alter VALUES (1);
+--let after_aria_table_copy_test_t_alter=ALTER TABLE test.t_alter ADD COLUMN c INT
+
+CREATE TABLE t_trunc(i INT PRIMARY KEY) ENGINE ARIA;
+INSERT INTO t_trunc VALUES (1);
+--let after_aria_table_copy_test_t_trunc=TRUNCATE TABLE test.t_trunc
+
+CREATE TABLE t_ch_i (i int(10), index(i) ) ENGINE=Aria;
+INSERT INTO t_ch_i VALUES(1);
+--let after_aria_table_copy_test_t_ch_i=ALTER TABLE test.t_ch_i DISABLE KEYS
+
+CREATE TABLE t_change_engine(i INT PRIMARY KEY) ENGINE InnoDB;
+INSERT INTO t_change_engine VALUES (1);
+--let after_aria_background=begin not atomic ALTER TABLE test.t_change_engine ENGINE = ARIA; INSERT INTO test.t_logs_1 SELECT * FROM test.t_logs_1; INSERT INTO test.t_bulk_ins SELECT * FROM test.t_logs_1; INSERT INTO test.t_logs_2 SET i = 1; end
+
+CREATE TABLE t_rename(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_rename=RENAME TABLE test.t_rename TO test.t_rename_new
+CREATE DATABASE test_for_rename;
+CREATE TABLE t_rename_2(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_rename_2=RENAME TABLE test.t_rename_2 TO test_for_rename.t_rename_new_2
+
+CREATE TABLE t_rename_3(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_rename_3=begin not atomic RENAME TABLE test.t_rename_3 TO test.t_rename_new_3; RENAME TABLE test.t_rename_new_3 TO test.t_rename_new_new_3; end
+
+CREATE TABLE t_rename_4(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_rename_4=begin not atomic RENAME TABLE test.t_rename_4 TO test.t_rename_new_4; RENAME TABLE test.t_rename_new_4 TO test.t_rename_new_new_4; RENAME TABLE test.t_rename_new_new_4 TO test.t_rename_new_4; end
+
+CREATE TABLE t_delete(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_delete=DROP TABLE test.t_delete
+
+CREATE TABLE t_delete_2(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_delete_2=ALTER TABLE test.t_delete_2 ENGINE=Innodb
+
+CREATE TABLE t_rename_alter(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_rename_alter=begin not atomic RENAME TABLE test.t_rename_alter TO test.t_rename_alter_2; ALTER TABLE test.t_rename_alter_2 ADD COLUMN c INT; end
+
+CREATE TABLE t_rename_create(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_rename_create=begin not atomic RENAME TABLE test.t_rename_create TO test.t_rename_create_new; CREATE TABLE test.t_rename_create(d INT PRIMARY KEY) ENGINE ARIA; end
+
+CREATE TABLE t_part_create(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_part_create=create table test.t_part_create_2 (i int) engine=Aria PARTITION BY HASH(i) PARTITIONS 2
+
+CREATE TABLE t_part_add_part(i INT PRIMARY KEY) ENGINE ARIA;
+--let after_aria_table_copy_test_t_part_add_part=alter table test.t_part_add_part PARTITION BY HASH(i) PARTITIONS 2
+
+CREATE TABLE t_part_change_eng(i INT PRIMARY KEY) ENGINE ARIA PARTITION BY HASH(i) PARTITIONS 2;
+--let after_aria_table_copy_test_t_part_change_eng=alter table test.t_part_change_eng ENGINE=InnoDB
+
+CREATE TABLE t_part_change_eng_2(i INT PRIMARY KEY) ENGINE InnoDB PARTITION BY HASH(i) PARTITIONS 2;
+CREATE TABLE t_part_change_eng_3(i INT PRIMARY KEY) ENGINE Aria;
+--let after_aria_table_copy_test_t_part_change_eng_3=alter table test.t_part_change_eng_2 ENGINE=Aria
+
+CREATE TABLE t_part_alter(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+--let after_aria_table_copy_test_t_part_alter=alter table test.t_part_alter ADD COLUMN c INT
+
+CREATE TABLE t_part_alter_2(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 3;
+--let after_aria_table_copy_test_t_part_alter_2=alter table test.t_part_alter_2 COALESCE PARTITION 1
+
+CREATE TABLE t_part_drop(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+--let after_aria_table_copy_test_t_part_drop=DROP table test.t_part_drop
+
+CREATE TABLE t_part_rename(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+--let after_aria_table_copy_test_t_part_rename=RENAME TABLE test.t_part_rename TO test.t_part_rename_2
+
+CREATE TABLE t_part_rename_3(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+--let after_aria_table_copy_test_t_part_rename_3=RENAME TABLE test.t_part_rename_3 TO test_for_rename.t_part_rename_4
+
+CREATE TABLE t_part_rm_part(i INT PRIMARY KEY) ENGINE Aria PARTITION BY HASH(i) PARTITIONS 2;
+--let after_aria_table_copy_test_t_part_rm_part=begin not atomic ALTER TABLE test.t_part_rm_part REMOVE PARTITIONING; ALTER TABLE test.t_part_rm_part ADD COLUMN c INT; end
+
+SET SESSION debug_dbug="+d,maria_flush_whole_log";
+SET GLOBAL aria_checkpoint_interval=10000;
+
+--mkdir $targetdir
+
+if ($backup_variant == $backup_stream) {
+--echo ### Backup to stream
+--let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
+--disable_result_log
+exec $XBSTREAM -x -C $targetdir < $streamfile;
+--enable_result_log
+}
+
+if ($backup_variant == $backup_dir) {
+--echo ### Backup to dir
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events
+--enable_result_log
+}
+
+--let $t_logs_1_records_count_before_backup=`SELECT COUNT(*) FROM t_logs_1`
+--let $t_logs_2_records_count_before_backup=`SELECT COUNT(*) FROM t_logs_2`
+--let $t_bulk_ins_records_count_before_backup=`SELECT COUNT(*) FROM t_bulk_ins`
+
+--echo # xtrabackup prepare
+--disable_result_log
+--exec $XTRABACKUP --prepare --target-dir=$targetdir
+--source include/restart_and_restore.inc
+--enable_result_log
+
+--echo ### Result for DDL test
+SHOW CREATE TABLE t_alter;
+SELECT * FROM t_alter;
+SHOW CREATE TABLE t_change_engine;
+SELECT * FROM t_change_engine;
+SELECT * FROM t_trunc;
+SELECT * FROM t_ch_i;
+SELECT * FROM t_rename_new;
+SELECT * FROM test_for_rename.t_rename_new_2;
+SELECT * FROM t_rename_new_new_3;
+SELECT * FROM t_rename_new_4;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t_delete;
+SHOW CREATE TABLE t_delete_2;
+SELECT * FROM t_rename_alter_2;
+SELECT * FROM t_rename_create;
+SELECT * FROM t_rename_create_new;
+SHOW CREATE TABLE t_part_create_2;
+SELECT * FROM t_part_create_2;
+SHOW CREATE TABLE t_part_add_part;
+SELECT * FROM t_part_add_part;
+SHOW CREATE TABLE t_part_change_eng;
+SELECT * FROM t_part_change_eng;
+SHOW CREATE TABLE t_part_change_eng_2;
+SELECT * FROM t_part_change_eng_2;
+SELECT * FROM t_part_alter;
+SHOW CREATE TABLE t_part_alter_2;
+SELECT * FROM t_part_alter_2;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t_part_drop;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t_part_rename;
+SELECT * FROM t_part_rename_2;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t_part_rename_3;
+SELECT * FROM test_for_rename.t_part_rename_4;
+SHOW CREATE TABLE t_part_rm_part;
+SELECT * FROM t_part_rm_part;
+--sorted_result
+SHOW DATABASES;
+
+--echo ### Clean up for DDL test
+DROP DATABASE test_for_db_create;
+DROP TABLE t_db_create;
+DROP TABLE t_change_engine;
+DROP TABLE t_alter;
+DROP TABLE t_trunc;
+DROP TABLE t_ch_i;
+DROP TABLE t_rename_new;
+DROP TABLE t_rename_new_new_3;
+DROP TABLE t_rename_new_4;
+DROP TABLE t_delete_2;
+DROP TABLE t_rename_alter_2;
+DROP TABLE t_rename_create;
+DROP TABLE t_rename_create_new;
+DROP TABLE t_part_create;
+DROP TABLE t_part_create_2;
+DROP TABLE t_part_add_part;
+DROP TABLE t_part_change_eng;
+DROP TABLE t_part_change_eng_2;
+DROP TABLE t_part_change_eng_3;
+DROP TABLE t_part_alter;
+DROP TABLE t_part_alter_2;
+DROP TABLE t_part_rename_2;
+DROP TABLE t_part_rm_part;
+DROP DATABASE test_for_rename;
+--let after_aria_table_copy_test_for_db_drop_t=
+--let after_aria_table_copy_test_t_db_create=
+--let after_aria_table_copy_test_t_alter=
+--let after_aria_background=
+--let after_aria_table_copy_test_t_trunc=
+--let after_aria_table_copy_test_t_ch_i=
+--let after_aria_table_copy_test_t_rename=
+--let after_aria_table_copy_test_t_rename_2=
+--let after_aria_table_copy_test_t_rename_3=
+--let after_aria_table_copy_test_t_rename_4=
+--let after_aria_table_copy_test_t_delete=
+--let after_aria_table_copy_test_t_delete_2=
+--let after_aria_table_copy_test_t_rename_alter=
+--let after_aria_table_copy_test_t_rename_create=
+--let after_aria_table_copy_test_t_part_create=
+--let after_aria_table_copy_test_t_part_add_part=
+--let after_aria_table_copy_test_t_part_change_eng=
+--let after_aria_table_copy_test_t_part_change_eng_3=
+--let after_aria_table_copy_test_t_part_alter=
+--let after_aria_table_copy_test_t_part_alter_2=
+--let after_aria_table_copy_test_t_part_drop=
+--let after_aria_table_copy_test_t_part_rename=
+--let after_aria_table_copy_test_t_part_rename_3=
+--let after_aria_table_copy_test_t_part_rm_part=
+
+--echo ### Result for DML test
+SELECT * FROM t_dml_ins;
+SELECT * FROM t_dml_upd;
+SELECT * FROM t_dml_del;
+
+--echo ### Clean up for DML test
+DROP TABLE t_dml_ins;
+DROP TABLE t_dml_upd;
+DROP TABLE t_dml_del;
+--let after_aria_table_copy_test_t_dml_ins=
+--let after_aria_table_copy_test_t_dml_upd=
+--let after_aria_table_copy_test_t_dml_del=
+
+--echo ### Result for redo log files backup
+--let $t_logs_1_records_count_after_backup=`SELECT COUNT(*) FROM t_logs_1`
+--let $t_logs_2_records_count_after_backup=`SELECT COUNT(*) FROM t_logs_2`
+--let $t_bulk_ins_records_count_after_backup=`SELECT COUNT(*) FROM t_bulk_ins`
+if ($t_logs_1_records_count_after_backup == $t_logs_1_records_count_before_backup) {
+--echo # ok
+}
+if ($t_logs_1_records_count_after_backup != $t_logs_1_records_count_before_backup) {
+--echo # failed
+}
+if ($t_logs_2_records_count_after_backup == $t_logs_2_records_count_before_backup) {
+--echo # ok
+}
+if ($t_logs_2_records_count_after_backup != $t_logs_2_records_count_before_backup) {
+--echo # failed
+}
+if ($t_bulk_ins_records_count_after_backup == $t_bulk_ins_records_count_before_backup) {
+--echo # ok
+}
+if ($t_bulk_ins_records_count_after_backup != $t_bulk_ins_records_count_before_backup) {
+--echo # failed
+}
+
+--echo ### Cleanup for redo log files backup
+DROP TABLE t_logs_1;
+DROP TABLE t_logs_2;
+DROP TABLE t_bulk_ins;
+--let $t_logs_1_records_count_before_backup=
+--let $t_logs_1_records_count_after_backup=
+--let $t_logs_2_records_count_before_backup=
+--let $t_logs_2_records_count_after_backup=
+--let $t_bulk_ins_records_count_before_backup=
+--let $t_bulk_ins_records_count_after_backup=
+
+--echo ### Result for online/offline tables test
+SELECT * FROM t_default;
+SELECT * FROM t_tr_p_ch;
+SELECT * FROM t_tr_p_nch;
+SELECT * FROM t_p_ch;
+SELECT * FROM t_p_nch;
+SELECT * FROM t_fixed;
+SELECT * FROM t_dyn;
+SELECT * FROM t_part_online;
+SELECT * FROM t_part_offline;
+SELECT * FROM `t 1 t-1`;
+SELECT * FROM `t-part online`;
+
+--echo ### Cleanup for online/offline tables test
+DROP TABLE t_default;
+DROP TABLE t_tr_p_ch;
+DROP TABLE t_tr_p_nch;
+DROP TABLE t_p_ch;
+DROP TABLE t_p_nch;
+DROP TABLE t_fixed;
+DROP TABLE t_dyn;
+DROP TABLE t_part_online;
+DROP TABLE t_part_offline;
+DROP TABLE `t 1 t-1`;
+DROP TABLE `t-part online`;
+
+if ($backup_variant == $backup_stream) {
+--remove_file $streamfile
+}
+--rmdir $targetdir
+--dec $backup_variant
+}
+
diff --git a/mysql-test/suite/mariabackup/aria_log.opt b/mysql-test/suite/mariabackup/aria_log.opt
new file mode 100644
index 00000000..f226499f
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_log.opt
@@ -0,0 +1 @@
+--loose-aria-log-file-size=8388608
diff --git a/mysql-test/suite/mariabackup/aria_log_dir_path.result b/mysql-test/suite/mariabackup/aria_log_dir_path.result
index 1a877321..ead4b836 100644
--- a/mysql-test/suite/mariabackup/aria_log_dir_path.result
+++ b/mysql-test/suite/mariabackup/aria_log_dir_path.result
@@ -35,7 +35,6 @@ DROP TABLE t1;
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/;
SHOW ENGINE aria logs;
Type Name Status
-Aria aria_log.00000001 free
Aria aria_log.00000002 in use
# Restarting mariadbd with default parameters
# restart
diff --git a/mysql-test/suite/mariabackup/aria_log_dir_path.test b/mysql-test/suite/mariabackup/aria_log_dir_path.test
index 0178cd4e..40bc3944 100644
--- a/mysql-test/suite/mariabackup/aria_log_dir_path.test
+++ b/mysql-test/suite/mariabackup/aria_log_dir_path.test
@@ -48,7 +48,6 @@ SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/;
--replace_regex /Size +[0-9]+ ; .+aria_log/aria_log/
SHOW ENGINE aria logs;
-
--echo # mariadb-backup --backup
--disable_result_log
--mkdir $targetdir
@@ -61,7 +60,6 @@ SHOW ENGINE aria logs;
--exec $XTRABACKUP --prepare --target-dir=$targetdir
--enable_result_log
-
--echo # shutdown server
--disable_result_log
--source include/shutdown_mysqld.inc
@@ -70,12 +68,14 @@ SHOW ENGINE aria logs;
--echo # remove aria-log-dir-path
--rmdir $ARIA_LOGDIR_FS
+
--echo # mariadb-backup --copy-back
--let $mariadb_backup_parameters=--defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$datadir --target-dir=$targetdir --parallel=2 --throttle=1 --aria-log-dir-path=$ARIA_LOGDIR_MARIADB
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec echo "# with parameters: $mariadb_backup_parameters"
--exec $XTRABACKUP $mariadb_backup_parameters
+
--echo # starting server
--let $restart_parameters=$server_parameters
--source include/start_mysqld.inc
@@ -91,7 +91,7 @@ DROP TABLE t1;
--echo # Testing aria log files after --copy-back
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/;
--file_exists $ARIA_LOGDIR_FS/aria_log_control
---file_exists $ARIA_LOGDIR_FS/aria_log.00000001
+#--file_exists $ARIA_LOGDIR_FS/aria_log.00000001
--file_exists $ARIA_LOGDIR_FS/aria_log.00000002
--error 1
--file_exists $ARIA_LOGDIR_FS/aria_log.00000003
diff --git a/mysql-test/suite/mariabackup/aria_log_dir_path_rel.result b/mysql-test/suite/mariabackup/aria_log_dir_path_rel.result
index 7fef2609..736bc556 100644
--- a/mysql-test/suite/mariabackup/aria_log_dir_path_rel.result
+++ b/mysql-test/suite/mariabackup/aria_log_dir_path_rel.result
@@ -35,7 +35,6 @@ DROP TABLE t1;
SET @@global.aria_checkpoint_interval=DEFAULT /*Force checkpoint*/;
SHOW ENGINE aria logs;
Type Name Status
-Aria aria_log.00000001 free
Aria aria_log.00000002 in use
# Restarting mariadbd with default parameters
# restart
diff --git a/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.opt b/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.opt
new file mode 100644
index 00000000..7c3ebe42
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.opt
@@ -0,0 +1,2 @@
+--loose-aria-log-file-size=8388608
+--loose-restart-for-aria_log_rotate_during_backup="This is needed to recreate datadir, to have Aria start logs from aria_log.00000001"
diff --git a/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.result b/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.result
new file mode 100644
index 00000000..0691bce8
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.result
@@ -0,0 +1,58 @@
+SHOW VARIABLES LIKE 'aria_log_file_size';
+Variable_name Value
+aria_log_file_size 8388608
+CREATE PROCEDURE display_aria_log_control(ctrl BLOB)
+BEGIN
+SELECT HEX(REVERSE(SUBSTRING(ctrl, 42, 4))) AS last_logno;
+END;
+$$
+CREATE PROCEDURE populate_t1()
+BEGIN
+FOR id IN 0..9 DO
+INSERT INTO test.t1 (id, txt) VALUES (id, REPEAT(id,1024*1024));
+END FOR;
+END;
+$$
+CREATE TABLE test.t1(id INT, txt LONGTEXT) ENGINE=Aria;
+# MYSQLD_DATADIR/aria_log_control before --backup
+CALL display_aria_log_control(@aria_log_control);
+last_logno
+00000001
+# Running --backup
+# MYSQLD_DATADIR/aria_log_control after --backup
+CALL display_aria_log_control(@aria_log_control);
+last_logno
+00000002
+# targetdir/aria_log_control after --backup
+CALL display_aria_log_control(@aria_log_control);
+last_logno
+00000001
+# Running --prepare
+# targetdir/aria_log_control after --prepare
+CALL display_aria_log_control(@aria_log_control);
+last_logno
+00000002
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+# MYSQLD_DATADIR/aria_log_control after --copy-back
+CALL display_aria_log_control(@aria_log_control);
+last_logno
+00000002
+# Checking that after --restore all t1 data is there
+SELECT id, LENGTH(txt) FROM t1 ORDER BY id;
+id LENGTH(txt)
+0 1048576
+1 1048576
+2 1048576
+3 1048576
+4 1048576
+5 1048576
+6 1048576
+7 1048576
+8 1048576
+9 1048576
+DROP TABLE t1;
+DROP PROCEDURE populate_t1;
+DROP PROCEDURE display_aria_log_control;
diff --git a/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.test b/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.test
new file mode 100644
index 00000000..172ade33
--- /dev/null
+++ b/mysql-test/suite/mariabackup/aria_log_rotate_during_backup.test
@@ -0,0 +1,82 @@
+--source include/have_debug.inc
+--source include/have_aria.inc
+
+SHOW VARIABLES LIKE 'aria_log_file_size';
+
+--let $MYSQLD_DATADIR= `select @@datadir`
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+mkdir $targetdir;
+
+
+DELIMITER $$;
+CREATE PROCEDURE display_aria_log_control(ctrl BLOB)
+BEGIN
+ SELECT HEX(REVERSE(SUBSTRING(ctrl, 42, 4))) AS last_logno;
+END;
+$$
+DELIMITER ;$$
+
+DELIMITER $$;
+CREATE PROCEDURE populate_t1()
+BEGIN
+ FOR id IN 0..9 DO
+ INSERT INTO test.t1 (id, txt) VALUES (id, REPEAT(id,1024*1024));
+ END FOR;
+END;
+$$
+DELIMITER ;$$
+
+
+CREATE TABLE test.t1(id INT, txt LONGTEXT) ENGINE=Aria;
+
+--echo # MYSQLD_DATADIR/aria_log_control before --backup
+--let ARIA_DATADIR=$MYSQLD_DATADIR
+--source include/aria_log_control_load.inc
+CALL display_aria_log_control(@aria_log_control);
+
+
+--echo # Running --backup
+--let after_scanning_log_files=CALL test.populate_t1
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events 2>&1
+--let after_scanning_log_files=
+--enable_result_log
+
+--echo # MYSQLD_DATADIR/aria_log_control after --backup
+--let ARIA_DATADIR=$MYSQLD_DATADIR
+--source include/aria_log_control_load.inc
+CALL display_aria_log_control(@aria_log_control);
+
+--echo # targetdir/aria_log_control after --backup
+--let ARIA_DATADIR=$targetdir
+--source include/aria_log_control_load.inc
+CALL display_aria_log_control(@aria_log_control);
+
+
+--echo # Running --prepare
+--disable_result_log
+--exec $XTRABACKUP --prepare --target-dir=$targetdir
+--enable_result_log
+
+--echo # targetdir/aria_log_control after --prepare
+--let ARIA_DATADIR=$targetdir
+--source include/aria_log_control_load.inc
+CALL display_aria_log_control(@aria_log_control);
+
+
+--disable_result_log
+--source include/restart_and_restore.inc
+--enable_result_log
+
+--echo # MYSQLD_DATADIR/aria_log_control after --copy-back
+--let ARIA_DATADIR=$MYSQLD_DATADIR
+--source include/aria_log_control_load.inc
+CALL display_aria_log_control(@aria_log_control);
+
+--echo # Checking that after --restore all t1 data is there
+SELECT id, LENGTH(txt) FROM t1 ORDER BY id;
+DROP TABLE t1;
+rmdir $targetdir;
+
+DROP PROCEDURE populate_t1;
+DROP PROCEDURE display_aria_log_control;
diff --git a/mysql-test/suite/mariabackup/auth_plugin_win.test b/mysql-test/suite/mariabackup/auth_plugin_win.test
index 70ae74b7..7c0ba047 100644
--- a/mysql-test/suite/mariabackup/auth_plugin_win.test
+++ b/mysql-test/suite/mariabackup/auth_plugin_win.test
@@ -22,7 +22,7 @@ eval GRANT ALL PRIVILEGES ON *.* to '$USERNAME';
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf -u $USERNAME --backup --protocol=pipe --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf -u $USERNAME --backup --parallel=10 --protocol=pipe --target-dir=$targetdir;
--enable_result_log
--replace_result $USERNAME USERNAME
eval DROP USER '$USERNAME';
diff --git a/mysql-test/suite/mariabackup/backup_grants.result b/mysql-test/suite/mariabackup/backup_grants.result
index 6bd6c9f4..3407d288 100644
--- a/mysql-test/suite/mariabackup/backup_grants.result
+++ b/mysql-test/suite/mariabackup/backup_grants.result
@@ -1,4 +1,4 @@
-CREATE user backup@localhost;
+CREATE user backup@localhost IDENTIFIED BY 'xyz';
FOUND 1 /missing required privilege RELOAD/ in backup.log
FOUND 1 /missing required privilege PROCESS/ in backup.log
FOUND 1 /GRANT USAGE ON/ in backup.log
@@ -6,8 +6,6 @@ GRANT RELOAD, PROCESS on *.* to backup@localhost;
FOUND 1 /missing required privilege REPLICA MONITOR/ in backup.log
GRANT REPLICA MONITOR ON *.* TO backup@localhost;
REVOKE REPLICA MONITOR ON *.* FROM backup@localhost;
-FOUND 1 /missing required privilege CONNECTION ADMIN/ in backup.log
-GRANT CONNECTION ADMIN ON *.* TO backup@localhost;
FOUND 1 /missing required privilege REPLICATION SLAVE ADMIN/ in backup.log
FOUND 1 /missing required privilege REPLICA MONITOR/ in backup.log
GRANT REPLICATION SLAVE ADMIN ON *.* TO backup@localhost;
diff --git a/mysql-test/suite/mariabackup/backup_grants.test b/mysql-test/suite/mariabackup/backup_grants.test
index 18db3489..a90b4678 100644
--- a/mysql-test/suite/mariabackup/backup_grants.test
+++ b/mysql-test/suite/mariabackup/backup_grants.test
@@ -1,16 +1,16 @@
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
-CREATE user backup@localhost;
+CREATE user backup@localhost IDENTIFIED BY 'xyz';
# backup possible for unprivileges user, with --no-lock
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --no-lock --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 -ubackup -pxyz --no-lock --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
# backup fails without --no-lock, because of FTWRL
--disable_result_log
error 1;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 -ubackup -pxyz --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
--enable_result_log
let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log;
@@ -23,7 +23,7 @@ let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/backup.log;
# backup succeeds with RELOAD privilege
GRANT RELOAD, PROCESS on *.* to backup@localhost;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --user=backup --password=xyz --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
@@ -31,7 +31,7 @@ rmdir $targetdir;
# --slave-info and galera info require REPLICA MONITOR
--disable_result_log
error 1;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --slave-info --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user=backup --password=xyz --slave-info --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
--enable_result_log
rmdir $targetdir;
@@ -40,33 +40,15 @@ rmdir $targetdir;
GRANT REPLICA MONITOR ON *.* TO backup@localhost;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --slave-info --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user backup --password xyz --slave-info --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
REVOKE REPLICA MONITOR ON *.* FROM backup@localhost;
-# TODO need a query that would delay a BACKUP STAGE START/ BACKUP STAGE BLOCK_COMMIT longer than the kill-long-queries-timeout
-#--send SELECT SLEEP(9) kill_me
-
-# kill-long-query-type=(not empty) requires CONNECTION ADMIN
---disable_result_log
---exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --kill-long-query-type=ALL --kill-long-queries-timeout=4 --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log 2>&1;
---enable_result_log
-rmdir $targetdir;
-
---let SEARCH_PATTERN= missing required privilege CONNECTION ADMIN
---source include/search_pattern_in_file.inc
-
-GRANT CONNECTION ADMIN ON *.* TO backup@localhost;
---disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --kill-long-query-type=all --kill-long-queries-timeout=1 --target-dir=$targetdir;
---enable_result_log
-rmdir $targetdir;
-
# --safe-slave-backup requires REPLICATION SLAVE ADMIN, and REPLICA MONITOR
--disable_result_log
error 1;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --safe-slave-backup --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --user backup --password xyz --safe-slave-backup --target-dir=$targetdir > $MYSQLTEST_VARDIR/tmp/backup.log;
--enable_result_log
rmdir $targetdir;
@@ -78,7 +60,7 @@ rmdir $targetdir;
GRANT REPLICATION SLAVE ADMIN ON *.* TO backup@localhost;
GRANT REPLICA MONITOR ON *.* TO backup@localhost;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup --safe-slave-backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup -ubackup -pxyz --safe-slave-backup --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/backup_ssl.test b/mysql-test/suite/mariabackup/backup_ssl.test
index e858c834..b38073cf 100644
--- a/mysql-test/suite/mariabackup/backup_ssl.test
+++ b/mysql-test/suite/mariabackup/backup_ssl.test
@@ -3,7 +3,7 @@ FLUSH PRIVILEGES;
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --user=backup_user --password=x --ssl --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --user=backup_user --password=x --ssl --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
echo # xtrabackup prepare;
diff --git a/mysql-test/suite/mariabackup/binlog.test b/mysql-test/suite/mariabackup/binlog.test
index 9d62e5f8..d02d135e 100644
--- a/mysql-test/suite/mariabackup/binlog.test
+++ b/mysql-test/suite/mariabackup/binlog.test
@@ -9,7 +9,7 @@ INSERT INTO t VALUES(1);
SHOW VARIABLES like 'log_bin';
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
exec $XTRABACKUP --prepare --binlog-info=1 --target-dir=$basedir ;
diff --git a/mysql-test/suite/mariabackup/compress_qpress.test b/mysql-test/suite/mariabackup/compress_qpress.test
index c7762f8e..263fc55e 100644
--- a/mysql-test/suite/mariabackup/compress_qpress.test
+++ b/mysql-test/suite/mariabackup/compress_qpress.test
@@ -4,7 +4,7 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --compress --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --compress --target-dir=$targetdir;
--enable_result_log
INSERT INTO t VALUES(2);
diff --git a/mysql-test/suite/mariabackup/create_during_backup.test b/mysql-test/suite/mariabackup/create_during_backup.test
index 985a5a3e..16d47a64 100644
--- a/mysql-test/suite/mariabackup/create_during_backup.test
+++ b/mysql-test/suite/mariabackup/create_during_backup.test
@@ -7,7 +7,7 @@ mkdir $targetdir;
echo # xtrabackup backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events;
--enable_result_log
--let after_load_tables=
diff --git a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test
index f01028b6..aa7d6de2 100644
--- a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test
+++ b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test
@@ -8,7 +8,7 @@ mkdir $table_data_dir;
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events;
--enable_result_log
--source include/shutdown_mysqld.inc
echo # xtrabackup prepare;
diff --git a/mysql-test/suite/mariabackup/data_directory.test b/mysql-test/suite/mariabackup/data_directory.test
index ffb3ab30..96d76ba0 100644
--- a/mysql-test/suite/mariabackup/data_directory.test
+++ b/mysql-test/suite/mariabackup/data_directory.test
@@ -7,7 +7,7 @@ INSERT INTO t VALUES(1);
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
--source include/shutdown_mysqld.inc
echo # xtrabackup prepare;
@@ -21,6 +21,7 @@ rmdir $table_data_dir;
SELECT * FROM t;
DROP TABLE t;
rmdir $targetdir;
+rmdir $table_data_dir;
--echo #
--echo # MDEV-18200 MariaBackup full backup failed with InnoDB: Failing assertion: success
@@ -32,8 +33,8 @@ chmod 0000 $DATADIR/ibdata1;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
chmod 0755 $DATADIR/ibdata1;
-rmdir $table_data_dir;
rmdir $targetdir;
+
--echo #
--echo # End of 10.4 tests
--echo #
diff --git a/mysql-test/suite/mariabackup/ddl_for_common_engine.result b/mysql-test/suite/mariabackup/ddl_for_common_engine.result
new file mode 100644
index 00000000..27a2f288
--- /dev/null
+++ b/mysql-test/suite/mariabackup/ddl_for_common_engine.result
@@ -0,0 +1,67 @@
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=CSV;
+CREATE TABLE t2 (a INT NOT NULL) ENGINE=CSV;
+CREATE TABLE t3 (a INT NOT NULL) ENGINE=CSV;
+### Backup to dir
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM t4;
+a
+SELECT * FROM t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+SELECT * FROM t3;
+ERROR 42S02: Table 'test.t3' doesn't exist
+SELECT * FROM t5;
+a
+SELECT * FROM t1;
+a
+DROP TABLE t4, t5, t1;
+CREATE TABLE t1_m1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t1_m2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=MERGE UNION=(t1_m1, t1_m2) INSERT_METHOD=LAST;
+CREATE TABLE t2_m1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t2_m2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t2 (a INT NOT NULL) ENGINE=MERGE UNION=(t2_m1, t2_m2) INSERT_METHOD=LAST;
+CREATE TABLE t3_m1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t3_m2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t3 (a INT NOT NULL) ENGINE=MERGE UNION=(t3_m1, t3_m2) INSERT_METHOD=LAST;
+### Backup to dir
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM t4;
+a
+SELECT * FROM t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+SELECT * FROM t3;
+ERROR 42S02: Table 'test.t3' doesn't exist
+SELECT * FROM t5;
+a
+SELECT * FROM t1;
+a
+DROP TABLE t4, t5, t1;
+DROP TABLE t1_m1, t1_m2, t2_m1, t2_m2, t3_m1, t3_m2;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t3 (a INT NOT NULL) ENGINE=MyISAM;
+### Backup to dir
+# xtrabackup prepare
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM t4;
+a
+SELECT * FROM t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+SELECT * FROM t3;
+ERROR 42S02: Table 'test.t3' doesn't exist
+SELECT * FROM t5;
+a
+SELECT * FROM t1;
+a
+DROP TABLE t4, t5, t1;
diff --git a/mysql-test/suite/mariabackup/ddl_for_common_engine.test b/mysql-test/suite/mariabackup/ddl_for_common_engine.test
new file mode 100644
index 00000000..045c2320
--- /dev/null
+++ b/mysql-test/suite/mariabackup/ddl_for_common_engine.test
@@ -0,0 +1,79 @@
+# This test is just to ensure the DDL processing works for common engines like
+# MyISAM, ARCHIVE, CSV etc. The more complex test for different cases is
+# implemented in aria_backup.test.
+--source include/have_archive.inc
+--source include/have_csv.inc
+--source include/have_debug.inc
+
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+
+--let $e_myisam = 1
+--let $e_merge = 2
+--let $e_csv = 3
+--let $e_archive = 4
+# 'rename' is not logged in $e_archive, return when fix
+--let $e_var = $e_csv
+
+while ($e_var) {
+if ($e_var == $e_csv) {
+--let $engine = CSV
+}
+if ($e_var == $e_archive) {
+--let $engine = ARCHIVE
+}
+if ($e_var == $e_merge) {
+--let $engine = MERGE
+}
+if ($e_var == $e_myisam) {
+--let $engine = MyISAM
+}
+
+if ($e_var == $e_merge) {
+CREATE TABLE t1_m1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t1_m2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t1 (a INT NOT NULL) ENGINE=MERGE UNION=(t1_m1, t1_m2) INSERT_METHOD=LAST;
+CREATE TABLE t2_m1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t2_m2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t2 (a INT NOT NULL) ENGINE=MERGE UNION=(t2_m1, t2_m2) INSERT_METHOD=LAST;
+CREATE TABLE t3_m1 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t3_m2 (a INT NOT NULL) ENGINE=MyISAM;
+CREATE TABLE t3 (a INT NOT NULL) ENGINE=MERGE UNION=(t3_m1, t3_m2) INSERT_METHOD=LAST;
+}
+if ($e_var != $e_merge) {
+eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=$engine;
+eval CREATE TABLE t2 (a INT NOT NULL) ENGINE=$engine;
+eval CREATE TABLE t3 (a INT NOT NULL) ENGINE=$engine;
+}
+
+--let after_ce_table_copy_test_t1=begin not atomic CREATE TABLE test.t4 LIKE test.t1; DROP TABLE test.t2; RENAME TABLE test.t3 TO test.t5; end
+
+--mkdir $targetdir
+--echo ### Backup to dir
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events
+--enable_result_log
+
+--echo # xtrabackup prepare
+--disable_result_log
+--exec $XTRABACKUP --prepare --target-dir=$targetdir
+--source include/restart_and_restore.inc
+--enable_result_log
+--rmdir $targetdir
+
+SELECT * FROM t4;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t2;
+--error ER_NO_SUCH_TABLE
+SELECT * FROM t3;
+SELECT * FROM t5;
+SELECT * FROM t1;
+
+DROP TABLE t4, t5, t1;
+
+if ($e_var == $e_merge) {
+DROP TABLE t1_m1, t1_m2, t2_m1, t2_m2, t3_m1, t3_m2;
+}
+--let after_ce_table_copy_test_t1=
+--dec $e_var
+}
+
diff --git a/mysql-test/suite/mariabackup/disabled.def b/mysql-test/suite/mariabackup/disabled.def
index d272540c..f8a34181 100644
--- a/mysql-test/suite/mariabackup/disabled.def
+++ b/mysql-test/suite/mariabackup/disabled.def
@@ -1 +1,3 @@
log_page_corruption : MDEV-26210
+mariabackup.xb_compressed_encrypted : MDEV-26154 (error 194 "Tablespace is missing for a table")
+innodb_ddl_on_intermediate_table : MENT-1213
diff --git a/mysql-test/suite/mariabackup/encrypted_export.opt b/mysql-test/suite/mariabackup/encrypted_export.opt
new file mode 100644
index 00000000..227c2e03
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_export.opt
@@ -0,0 +1,6 @@
+--innodb_encrypt_tables=1
+--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
+--loose-file-key-management
+--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key
+--loose-file-key-management-filename=$MTR_SUITE_DIR/filekeys-data.enc
+--loose-file-key-management-encryption-algorithm=aes_cbc
diff --git a/mysql-test/suite/mariabackup/encrypted_export.result b/mysql-test/suite/mariabackup/encrypted_export.result
new file mode 100644
index 00000000..b2add8e6
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_export.result
@@ -0,0 +1,14 @@
+CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB;
+insert into t1 values(repeat('a',100));
+select @@innodb_encrypt_tables;
+@@innodb_encrypt_tables
+ON
+# xtrabackup backup
+# xtrabackup prepare export
+# restart
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1 IMPORT TABLESPACE;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/encrypted_export.test b/mysql-test/suite/mariabackup/encrypted_export.test
new file mode 100644
index 00000000..d1802118
--- /dev/null
+++ b/mysql-test/suite/mariabackup/encrypted_export.test
@@ -0,0 +1,29 @@
+--source include/have_file_key_management.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB;
+insert into t1 values(repeat('a',100));
+
+select @@innodb_encrypt_tables;
+echo # xtrabackup backup;
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
+--enable_result_log
+--source include/shutdown_mysqld.inc
+
+echo # xtrabackup prepare export;
+--disable_result_log
+exec $XTRABACKUP --prepare --export --target-dir=$targetdir;
+--enable_result_log
+
+--source include/start_mysqld.inc
+let MYSQLD_DATADIR=`select @@datadir`;
+ALTER TABLE t1 DISCARD TABLESPACE;
+copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
+copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
+ALTER TABLE t1 IMPORT TABLESPACE;
+CHECK TABLE t1;
+DROP TABLE t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/encrypted_page_compressed.test b/mysql-test/suite/mariabackup/encrypted_page_compressed.test
index 54fffb7d..245fcc31 100644
--- a/mysql-test/suite/mariabackup/encrypted_page_compressed.test
+++ b/mysql-test/suite/mariabackup/encrypted_page_compressed.test
@@ -37,7 +37,7 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
--error 1
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --core-file > $backuplog;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --core-file > $backuplog;
--enable_result_log
--let SEARCH_PATTERN=Database page corruption detected.*
diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.test b/mysql-test/suite/mariabackup/encrypted_page_corruption.test
index 1beb020b..9ba958c6 100644
--- a/mysql-test/suite/mariabackup/encrypted_page_corruption.test
+++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.test
@@ -65,7 +65,7 @@ if (`select @@innodb_checksum_algorithm LIKE '%full_crc32'`)
}
--disable_result_log
--error $expect_error
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --extended-validation --target-dir=$targetdir --core-file > $backuplog;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --extended-validation --target-dir=$targetdir --core-file > $backuplog;
--enable_result_log
@@ -77,7 +77,7 @@ rmdir $targetdir;
# Due to very constructed nature of the "corruption" (faking checksums), the "corruption" won't be found without --extended-validation
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
drop table t1;
diff --git a/mysql-test/suite/mariabackup/extra_lsndir.test b/mysql-test/suite/mariabackup/extra_lsndir.test
index 092ee34c..f880edbe 100644
--- a/mysql-test/suite/mariabackup/extra_lsndir.test
+++ b/mysql-test/suite/mariabackup/extra_lsndir.test
@@ -2,7 +2,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $extra_lsndir=$MYSQLTEST_VARDIR/tmp/extra_lsndir;
mkdir $extra_lsndir;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --extra-lsndir=$extra_lsndir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --extra-lsndir=$extra_lsndir;
--enable_result_log
list_files $extra_lsndir;
rmdir $extra_lsndir;
diff --git a/mysql-test/suite/mariabackup/full_backup.test b/mysql-test/suite/mariabackup/full_backup.test
index c6a21112..385f3b87 100644
--- a/mysql-test/suite/mariabackup/full_backup.test
+++ b/mysql-test/suite/mariabackup/full_backup.test
@@ -7,7 +7,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--let $backup_log=$MYSQLTEST_VARDIR/tmp/backup.log
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $backup_log 2>&1;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --parallel=10 > $backup_log 2>&1;
--enable_result_log
# The following warning must not appear after MDEV-27343 fix
diff --git a/mysql-test/suite/mariabackup/huge_lsn.test b/mysql-test/suite/mariabackup/huge_lsn.test
index 8850e9d8..0da67744 100644
--- a/mysql-test/suite/mariabackup/huge_lsn.test
+++ b/mysql-test/suite/mariabackup/huge_lsn.test
@@ -79,7 +79,7 @@ INSERT INTO t VALUES(1);
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
SET GLOBAL innodb_flush_log_at_trx_commit=1;
INSERT INTO t VALUES(2);
diff --git a/mysql-test/suite/mariabackup/incremental_encrypted.test b/mysql-test/suite/mariabackup/incremental_encrypted.test
index d5570f20..d4619e1f 100644
--- a/mysql-test/suite/mariabackup/incremental_encrypted.test
+++ b/mysql-test/suite/mariabackup/incremental_encrypted.test
@@ -7,6 +7,12 @@ if (!$EXAMPLE_KEY_MANAGEMENT_SO)
}
call mtr.add_suppression("InnoDB: New log files created");
+if (`select @@innodb_page_size=65536`)
+{
+ # this needs too much memory for 32bit
+ source include/have_64bit.inc;
+}
+
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
@@ -18,7 +24,7 @@ INSERT INTO t VALUES(1);
echo # Create full backup , modify table, then create incremental/differential backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
SET GLOBAL innodb_flush_log_at_trx_commit = 1;
@@ -26,7 +32,7 @@ INSERT INTO t VALUES(2);
SELECT * FROM t;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$incremental_dir --incremental-basedir=$basedir;
echo # Prepare full backup, apply incremental one;
exec $XTRABACKUP --prepare --target-dir=$basedir;
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir;
diff --git a/mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.result b/mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.result
new file mode 100644
index 00000000..46fdfe77
--- /dev/null
+++ b/mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.result
@@ -0,0 +1,5 @@
+CREATE TABLE IF NOT EXISTS t1 ( col1 INT, col_text TEXT ) ENGINE = InnoDB;
+ALTER TABLE t1 ADD FULLTEXT KEY `ftidx1` ( col_text );
+# xtrabackup backup
+SET debug_sync='RESET';
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.test b/mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.test
new file mode 100644
index 00000000..d4c4d70d
--- /dev/null
+++ b/mysql-test/suite/mariabackup/innodb_ddl_on_intermediate_table.test
@@ -0,0 +1,18 @@
+--source include/have_debug.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+--mkdir $targetdir
+
+CREATE TABLE IF NOT EXISTS t1 ( col1 INT, col_text TEXT ) ENGINE = InnoDB;
+ALTER TABLE t1 ADD FULLTEXT KEY `ftidx1` ( col_text );
+
+echo # xtrabackup backup;
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events,emulate_ddl_on_intermediate_table;
+--enable_result_log
+
+SET debug_sync='RESET';
+rmdir $targetdir;
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/lock_ddl_per_table.test b/mysql-test/suite/mariabackup/lock_ddl_per_table.test
index 18c20771..98e7c5ea 100644
--- a/mysql-test/suite/mariabackup/lock_ddl_per_table.test
+++ b/mysql-test/suite/mariabackup/lock_ddl_per_table.test
@@ -16,7 +16,7 @@ CREATE TABLE `bobby``tables` (id INT, name VARCHAR(50), purchased DATE) ENGINE I
set global innodb_log_checkpoint_now = 1;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table=1 --dbug=+d,check_mdl_lock_works;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --lock-ddl-per-table=1 --dbug=+d,check_mdl_lock_works;
--enable_result_log
DROP TABLE t;
DROP TABLE `bobby``tables`;
diff --git a/mysql-test/suite/mariabackup/log_checksum_mismatch.test b/mysql-test/suite/mariabackup/log_checksum_mismatch.test
index c8baf66e..6cf4b354 100644
--- a/mysql-test/suite/mariabackup/log_checksum_mismatch.test
+++ b/mysql-test/suite/mariabackup/log_checksum_mismatch.test
@@ -7,7 +7,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,log_intermittent_checksum_mismatch --core-file > $backuplog;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,log_intermittent_checksum_mismatch --core-file > $backuplog;
--enable_result_log
--let SEARCH_RANGE = 10000000
diff --git a/mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.result b/mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.result
new file mode 100644
index 00000000..51b4dfc5
--- /dev/null
+++ b/mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.result
@@ -0,0 +1,20 @@
+#
+# Start of 10.5 tests
+#
+#
+# MENT-1587 mariabackup failing due to aria log file copy
+#
+CREATE TABLE t1(i INT PRIMARY KEY) ENGINE=ARIA;
+INSERT INTO t1 VALUES (10);
+# Prepare full backup
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM t1;
+i
+10
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.test b/mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.test
new file mode 100644
index 00000000..7fef9d61
--- /dev/null
+++ b/mysql-test/suite/mariabackup/log_file_unexpected_large_number_in_name.test
@@ -0,0 +1,47 @@
+--let $MYSQLD_DATADIR=`select @@datadir`
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MENT-1587 mariabackup failing due to aria log file copy
+--echo #
+
+
+--let $basedir=$MYSQLTEST_VARDIR/tmp/backup
+--let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1
+
+CREATE TABLE t1(i INT PRIMARY KEY) ENGINE=ARIA;
+INSERT INTO t1 VALUES (10);
+
+#
+# Add a log file with a number outside of last_log_number
+# specified in aria_log_control.
+# The actual file number written in the header is 4.
+# Let's rename it to 100 for test purposes.
+# Hopefully 100 should be enough.
+#
+--copy_file suite/mariabackup/std_data/ment1587_aria_log.00000004 $MYSQLD_DATADIR/aria_log.00000100
+
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir
+--enable_result_log
+
+--disable_result_log
+--echo # Prepare full backup
+--exec $XTRABACKUP --prepare --target-dir=$basedir
+--enable_result_log
+
+--let $targetdir=$basedir
+--source include/restart_and_restore.inc
+--enable_result_log
+--rmdir $basedir
+
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/mariabackup/log_tables.result b/mysql-test/suite/mariabackup/log_tables.result
new file mode 100644
index 00000000..840efc71
--- /dev/null
+++ b/mysql-test/suite/mariabackup/log_tables.result
@@ -0,0 +1,24 @@
+CREATE TABLE t(i INT)
+ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+SET GLOBAL general_log = 1;
+SET GLOBAL log_output = 'TABLE';
+INSERT INTO t VALUES (1);
+SELECT * FROM mysql.general_log
+WHERE argument LIKE "INSERT INTO %" AND
+(command_type = "Query" OR command_type = "Execute") ;
+event_time user_host thread_id server_id command_type argument
+TIMESTAMP USER_HOST THREAD_ID 1 Query INSERT INTO t VALUES (1)
+# Insert new row into general_log table after it has been copied on BLOCK_DDL.
+# Backup to dir.
+# Xtrabackup prepare.
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+SELECT * FROM mysql.general_log
+WHERE argument LIKE "INSERT INTO %" AND
+(command_type = "Query" OR command_type = "Execute") ;
+event_time user_host thread_id server_id command_type argument
+TIMESTAMP USER_HOST THREAD_ID 1 Query INSERT INTO t VALUES (1)
+TIMESTAMP USER_HOST THREAD_ID 1 Query INSERT INTO test.t VALUES (2)
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/log_tables.test b/mysql-test/suite/mariabackup/log_tables.test
new file mode 100644
index 00000000..fe540a1c
--- /dev/null
+++ b/mysql-test/suite/mariabackup/log_tables.test
@@ -0,0 +1,49 @@
+# Test for copying log tables tail
+--source include/have_aria.inc
+--source include/have_debug.inc
+
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+
+CREATE TABLE t(i INT)
+ ENGINE ARIA TRANSACTIONAL=1 ROW_FORMAT=PAGE PAGE_CHECKSUM=1;
+
+--let $general_log_old = `SELECT @@global.general_log`
+--let $log_output_old = `SELECT @@global.log_output`
+
+SET GLOBAL general_log = 1;
+SET GLOBAL log_output = 'TABLE';
+
+INSERT INTO t VALUES (1);
+
+--replace_column 1 TIMESTAMP 2 USER_HOST 3 THREAD_ID 5 Query
+--sorted_result
+SELECT * FROM mysql.general_log
+ WHERE argument LIKE "INSERT INTO %" AND
+ (command_type = "Query" OR command_type = "Execute") ;
+
+--echo # Insert new row into general_log table after it has been copied on BLOCK_DDL.
+--let after_stage_block_ddl=INSERT INTO test.t VALUES (2)
+
+--echo # Backup to dir.
+--disable_result_log
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events
+--enable_result_log
+
+--echo # Xtrabackup prepare.
+--disable_result_log
+--exec $XTRABACKUP --prepare --target-dir=$targetdir
+--source include/restart_and_restore.inc
+--enable_result_log
+
+--replace_column 1 TIMESTAMP 2 USER_HOST 3 THREAD_ID 5 Query
+--sorted_result
+SELECT * FROM mysql.general_log
+ WHERE argument LIKE "INSERT INTO %" AND
+ (command_type = "Query" OR command_type = "Execute") ;
+
+--rmdir $targetdir
+DROP TABLE t;
+--disable_query_log
+--eval SET GLOBAL general_log = $general_log_old
+--eval SET GLOBAL log_output = $log_output_old
+--enable_query_log
diff --git a/mysql-test/suite/mariabackup/mdev-14447.test b/mysql-test/suite/mariabackup/mdev-14447.test
index 79a0d075..74ae1378 100644
--- a/mysql-test/suite/mariabackup/mdev-14447.test
+++ b/mysql-test/suite/mariabackup/mdev-14447.test
@@ -11,7 +11,7 @@ CREATE TABLE t(a varchar(40) PRIMARY KEY, b varchar(40), c varchar(40), d varcha
echo # Create full backup , modify table, then create incremental/differential backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
SET debug_dbug='+d,skip_page_checksum',foreign_key_checks=0,unique_checks=0;
diff --git a/mysql-test/suite/mariabackup/missing_ibd.test b/mysql-test/suite/mariabackup/missing_ibd.test
index f406a555..76d5a4ff 100644
--- a/mysql-test/suite/mariabackup/missing_ibd.test
+++ b/mysql-test/suite/mariabackup/missing_ibd.test
@@ -24,7 +24,7 @@ call mtr.add_suppression('InnoDB: Ignoring tablespace for test/t1 because it cou
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
index f6bc51bd..c75c063a 100644
--- a/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
+++ b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
@@ -9,6 +9,6 @@ CREATE TABLE t1(i int) ENGINE=INNODB;
echo # xtrabackup backup;
--disable_result_log
error 1;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --no-lock --dbug=+d,mariabackup_events;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --no-lock --dbug=+d,mariabackup_events;
--enable_result_log
rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/partial.result b/mysql-test/suite/mariabackup/partial.result
index 981bef4e..9ff3a20c 100644
--- a/mysql-test/suite/mariabackup/partial.result
+++ b/mysql-test/suite/mariabackup/partial.result
@@ -14,6 +14,14 @@ ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
i
1
+# MDEV-33023 Crash in mariadb-backup --prepare --export after --prepare
+t1.cfg
+t21.cfg
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t1 IMPORT TABLESPACE;
+SELECT * FROM t1;
+i
+1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t21;
diff --git a/mysql-test/suite/mariabackup/partial.test b/mysql-test/suite/mariabackup/partial.test
index d0d07daf..af6da274 100644
--- a/mysql-test/suite/mariabackup/partial.test
+++ b/mysql-test/suite/mariabackup/partial.test
@@ -14,7 +14,7 @@ echo # xtrabackup backup;
let targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.*1" --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 "--tables=test.*1" --target-dir=$targetdir;
--enable_result_log
list_files $targetdir/test *.ibd;
list_files $targetdir/test *.new;
@@ -55,6 +55,25 @@ copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
ALTER TABLE t1 IMPORT TABLESPACE;
SELECT * FROM t1;
+
+--echo # MDEV-33023 Crash in mariadb-backup --prepare --export after --prepare
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$server_cnf --defaults-group-suffix=.1 --prepare --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$server_cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir;
+--enable_result_log
+
+list_files $targetdir/test *.cfg;
+# There must not be binary logs created on --prepare step
+list_files $targetdir/ mysqld-bin.*;
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+ALTER TABLE t1 DISCARD TABLESPACE;
+copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
+copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
+ALTER TABLE t1 IMPORT TABLESPACE;
+
+SELECT * FROM t1;
+
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t21;
diff --git a/mysql-test/suite/mariabackup/partial_exclude.test b/mysql-test/suite/mariabackup/partial_exclude.test
index 6a1ae13b..973e7a4f 100644
--- a/mysql-test/suite/mariabackup/partial_exclude.test
+++ b/mysql-test/suite/mariabackup/partial_exclude.test
@@ -28,7 +28,7 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables-exclude=test.*2" "--databases-exclude=db2" --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 "--tables-exclude=test.*2" "--databases-exclude=db2" --target-dir=$targetdir;
--enable_result_log
COMMIT;
diff --git a/mysql-test/suite/mariabackup/partition_datadir.test b/mysql-test/suite/mariabackup/partition_datadir.test
index 36520d33..078055a5 100644
--- a/mysql-test/suite/mariabackup/partition_datadir.test
+++ b/mysql-test/suite/mariabackup/partition_datadir.test
@@ -14,7 +14,7 @@ PARTITION BY RANGE (i)
PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata',
PARTITION p4 VALUES LESS THAN MAXVALUE);
INSERT INTO t VALUES (1), (101), (201), (301), (401);
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
exec $XTRABACKUP --prepare --target-dir=$targetdir;
DROP TABLE t;
rmdir $MYSQLTEST_VARDIR/partitdata;
diff --git a/mysql-test/suite/mariabackup/partition_partial.test b/mysql-test/suite/mariabackup/partition_partial.test
index 7ccc42c0..30e31a9d 100644
--- a/mysql-test/suite/mariabackup/partition_partial.test
+++ b/mysql-test/suite/mariabackup/partition_partial.test
@@ -16,7 +16,7 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.t1" --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 "--tables=test.t1" --target-dir=$targetdir;
--enable_result_log
INSERT INTO t1 VALUES (1), (101), (201), (301);
diff --git a/mysql-test/suite/mariabackup/rename_during_backup.result b/mysql-test/suite/mariabackup/rename_during_backup.result
index e071b6b2..ba509efe 100644
--- a/mysql-test/suite/mariabackup/rename_during_backup.result
+++ b/mysql-test/suite/mariabackup/rename_during_backup.result
@@ -61,3 +61,15 @@ SELECT * from t6;
i
5
DROP TABLE t6;
+#
+# MDEV-33011 mariabackup --backup: FATAL ERROR: ... Can't open datafile cool_down/t3
+#
+# Simulate zero initialized page to defer tablespace load after rename log is found
+SET @save_dbug = @@SESSION.debug_dbug;
+SET DEBUG_DBUG="+d,checkpoint_after_file_create";
+CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+# RENAME that fails after redo log entry is written and flushed
+RENAME TABLE t1 TO non_existing_db.t1;
+ERROR HY000: Error on rename of './test/t1' to './non_existing_db/t1' (errno: 168 "Unknown (generic) error from engine")
+DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/rename_during_backup.test b/mysql-test/suite/mariabackup/rename_during_backup.test
index d8e40b28..44036691 100644
--- a/mysql-test/suite/mariabackup/rename_during_backup.test
+++ b/mysql-test/suite/mariabackup/rename_during_backup.test
@@ -92,4 +92,31 @@ SELECT * from t6;
DROP TABLE t6;
rmdir $targetdir;
+--echo #
+--echo # MDEV-33011 mariabackup --backup: FATAL ERROR: ... Can't open datafile cool_down/t3
+--echo #
+--disable_query_log
+call mtr.add_suppression("InnoDB: Cannot rename '.*t1.ibd' to '.*non_existing_db.*' because the target schema directory doesn't exist");
+--enable_query_log
+
+mkdir $targetdir;
+
+--echo # Simulate zero initialized page to defer tablespace load after rename log is found
+SET @save_dbug = @@SESSION.debug_dbug;
+SET DEBUG_DBUG="+d,checkpoint_after_file_create";
+CREATE TABLE t1(f1 INT NOT NULL)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+
+--echo # RENAME that fails after redo log entry is written and flushed
+--replace_result "\\" "/"
+--error ER_ERROR_ON_RENAME
+RENAME TABLE t1 TO non_existing_db.t1;
+
+--disable_result_log
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+--enable_result_log
+
+DROP TABLE t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/rename_during_mdl_lock.test b/mysql-test/suite/mariabackup/rename_during_mdl_lock.test
index 212b7aab..b14b04a5 100644
--- a/mysql-test/suite/mariabackup/rename_during_mdl_lock.test
+++ b/mysql-test/suite/mariabackup/rename_during_mdl_lock.test
@@ -3,7 +3,7 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
mkdir $targetdir;
CREATE TABLE t1(i int) ENGINE INNODB;
set global innodb_log_checkpoint_now = 1;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table --dbug=+d,rename_during_mdl_lock_table;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --lock-ddl-per-table --dbug=+d,rename_during_mdl_lock_table;
echo # xtrabackup prepare;
--disable_result_log
diff --git a/mysql-test/suite/mariabackup/rpl_clone_slave.result b/mysql-test/suite/mariabackup/rpl_clone_slave.result
new file mode 100644
index 00000000..2e6c2701
--- /dev/null
+++ b/mysql-test/suite/mariabackup/rpl_clone_slave.result
@@ -0,0 +1,202 @@
+include/master-slave.inc
+[connection master]
+#
+# MDEV-33342 Add a replication MTR test cloning the slave with mariadb-backup
+#
+connection slave;
+stop slave;
+change master to master_use_gtid=no;
+start slave;
+connection master;
+connection slave;
+##############################################################
+### Initial block with some transactions
+### Slave: Make sure replication is not using GTID
+connection slave;
+# Using_Gtid=No
+### Master: Create and populate t1
+connection master;
+CREATE TABLE t1(a TEXT) ENGINE=InnoDB;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#00:stmt#00 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#00:stmt#01 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#00:stmt#02 - slave run#0, before backup');
+COMMIT;
+connection slave;
+##############################################################
+### Run the last transaction before mariadb-backup --backup
+### Remember SHOW MASTER STATUS and @@gtid_binlog_pos
+### before and after the transaction.
+### Master: Rember MASTER STATUS and @@gtid_binlog_pos before tr#01
+connection master;
+### Slave: Remember MASTER STATUS and @@gtid_binlog_pos before tr#01
+connection slave;
+### Master: Run the actual last transaction before the backup
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#01:stmt#00 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#01:stmt#01 - slave run#0, before backup');
+INSERT INTO t1 VALUES ('tr#01:stmt#02 - slave run#0, before backup');
+COMMIT;
+connection slave;
+### Master: Remember MASTER STATUS and @@gtid_binlog_pos after tr#01
+connection master;
+### Slave: Remember MASTER STATUS and @@gtid_binlog_pos after tr#01
+connection slave;
+##############################################################
+### Running `mariadb-backup --backup,--prepare` and checking
+### that xtrabackup_slave_info and xtrabackup_binlog_info are OK
+### Slave: Create a backup
+### Slave: Prepare the backup
+### Slave: xtrabackup files:
+############################ xtrabackup_slave_info
+CHANGE MASTER TO MASTER_LOG_FILE='master_after_tr01_show_master_status_file', MASTER_LOG_POS=master_after_tr01_show_master_status_position;
+############################ xtrabackup_binlog_info
+slave_after_tr01_show_master_status_file slave_after_tr01_show_master_status_position slave_after_tr01_gtid_binlog_pos
+############################
+##############################################################
+### Run more transactions after the backup:
+### - while the slave is still running, then
+### - while the slave is shut down
+### Master: Run another transaction while the slave is still running
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup');
+INSERT INTO t1 VALUES ('tr#02:stmt#01 - slave run#0, after backup');
+INSERT INTO t1 VALUES ('tr#02:stmt@02 - slave run#0, after backup');
+COMMIT;
+connection slave;
+### Master: Remember MASTER STATUS and @@gtid_binlog_pos after tr#02
+connection master;
+### Slave: Remember MASTER STATUS and @@gtid_binlog_pos after tr#02
+connection slave;
+### Master: Checking SHOW BINLOG EVENTS
+connection master;
+SHOW BINLOG EVENTS IN 'master_after_tr01_show_master_status_file' FROM master_after_tr01_show_master_status_position LIMIT 0,1;
+Log_name master_after_tr01_show_master_status_file
+Pos master_after_tr01_show_master_status_position
+Event_type Gtid
+Server_id #
+End_log_pos #
+Info BEGIN GTID master_after_tr02_gtid_binlog_pos
+SHOW BINLOG EVENTS IN 'master_after_tr01_show_master_status_file' FROM master_after_tr01_show_master_status_position LIMIT 1,1;
+Log_name master_after_tr01_show_master_status_file
+Pos #
+Event_type Query_or_Annotate_rows
+Server_id #
+End_log_pos #
+Info INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup')
+### Slave: Checking SHOW BINLOG EVENTS
+connection slave;
+SHOW BINLOG EVENTS IN 'slave_after_tr01_show_master_status_file' FROM slave_after_tr01_show_master_status_position LIMIT 0,1;
+Log_name slave_after_tr01_show_master_status_file
+Pos #
+Event_type Gtid
+Server_id 1
+End_log_pos #
+Info BEGIN GTID slave_after_tr02_gtid_binlog_pos
+SHOW BINLOG EVENTS IN 'slave_after_tr01_show_master_status_file' FROM slave_after_tr01_show_master_status_position LIMIT 1,1;
+Log_name slave_after_tr01_show_master_status_file
+Pos #
+Event_type Query_or_Annotate_rows
+Server_id #
+End_log_pos #
+Info INSERT INTO t1 VALUES ('tr#02:stmt#00 - slave run#0, after backup')
+### Slave: Stop replication
+connection slave;
+STOP SLAVE;
+include/wait_for_slave_to_stop.inc
+RESET SLAVE;
+Warnings:
+Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
+### Slave: Shutdown the server
+include/rpl_stop_server.inc [server_number=2]
+### Master: Run a transaction while the slave is shut down
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#03:stmt#00 - after slave run#0, slave is shut down, after backup');
+INSERT INTO t1 VALUES ('tr#03:stmt#01 - after slave run#0, slave is shut down, after backup');
+INSERT INTO t1 VALUES ('tr#03:stmt#02 - after slave run#0, slave is shut down, after backup');
+COMMIT;
+##############################################################
+### Emulate starting a new virgin slave
+### Slave: Remove the data directory
+### Slave: Copy back the backup
+### Slave: Restart the server
+include/rpl_start_server.inc [server_number=2]
+### Slave: Display the restored data before START SLAVE
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a
+tr#00:stmt#00 - slave run#0, before backup
+tr#00:stmt#01 - slave run#0, before backup
+tr#00:stmt#02 - slave run#0, before backup
+tr#01:stmt#00 - slave run#0, before backup
+tr#01:stmt#01 - slave run#0, before backup
+tr#01:stmt#02 - slave run#0, before backup
+### Slave: Execute the CHANGE MASTER statement to set up the host and port
+CHANGE MASTER '' TO MASTER_USER='root', MASTER_HOST='127.0.0.1', MASTER_PORT=###, MASTER_CONNECT_RETRY=1;
+### Slave: Execute the CHANGE MASTER statement from xtrabackup_slave_info
+CHANGE MASTER TO MASTER_LOG_FILE='master_after_tr01_show_master_status_file', MASTER_LOG_POS=master_after_tr01_show_master_status_position;
+Warnings:
+Note 4190 CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'Slave_Pos' to 'No'
+### Slave: Execute START SLAVE
+include/start_slave.inc
+### Master: Wait for the slave to apply all master events
+connection master;
+connection slave;
+### Slave: Make sure replication is not using GTID after the slave restart
+connection slave;
+# Using_Gtid=No
+### Slave: Display the restored data after START SLAVE
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a
+tr#00:stmt#00 - slave run#0, before backup
+tr#00:stmt#01 - slave run#0, before backup
+tr#00:stmt#02 - slave run#0, before backup
+tr#01:stmt#00 - slave run#0, before backup
+tr#01:stmt#01 - slave run#0, before backup
+tr#01:stmt#02 - slave run#0, before backup
+tr#02:stmt#00 - slave run#0, after backup
+tr#02:stmt#01 - slave run#0, after backup
+tr#02:stmt@02 - slave run#0, after backup
+tr#03:stmt#00 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#01 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#02 - after slave run#0, slave is shut down, after backup
+##############################################################
+### Continue master transactions, check the new slave replicates well.
+### Master: Run a transaction after restarting replication
+connection master;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('tr#04:stmt#00 - slave run#1');
+INSERT INTO t1 VALUES ('tr#04:stmt#01 - slave run#1');
+INSERT INTO t1 VALUES ('tr#04:stmt#02 - slave run#1');
+COMMIT;
+connection slave;
+### Slave: Display the restored data + new transactions
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a
+tr#00:stmt#00 - slave run#0, before backup
+tr#00:stmt#01 - slave run#0, before backup
+tr#00:stmt#02 - slave run#0, before backup
+tr#01:stmt#00 - slave run#0, before backup
+tr#01:stmt#01 - slave run#0, before backup
+tr#01:stmt#02 - slave run#0, before backup
+tr#02:stmt#00 - slave run#0, after backup
+tr#02:stmt#01 - slave run#0, after backup
+tr#02:stmt@02 - slave run#0, after backup
+tr#03:stmt#00 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#01 - after slave run#0, slave is shut down, after backup
+tr#03:stmt#02 - after slave run#0, slave is shut down, after backup
+tr#04:stmt#00 - slave run#1
+tr#04:stmt#01 - slave run#1
+tr#04:stmt#02 - slave run#1
+##############################################################
+### Cleanup
+### Removing the backup directory
+connection master;
+DROP TABLE t1;
+connection slave;
+include/rpl_end.inc
diff --git a/mysql-test/suite/mariabackup/rpl_clone_slave.test b/mysql-test/suite/mariabackup/rpl_clone_slave.test
new file mode 100644
index 00000000..7d93f723
--- /dev/null
+++ b/mysql-test/suite/mariabackup/rpl_clone_slave.test
@@ -0,0 +1,17 @@
+#
+# Cloning a slave using mariadb-backup
+#
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # MDEV-33342 Add a replication MTR test cloning the slave with mariadb-backup
+--echo #
+
+connection slave;
+stop slave;
+change master to master_use_gtid=no;
+start slave;
+
+--let cnf=mariadb_to_mariadb
+--source include/rpl_clone_slave_using_mariadb-backup.inc
diff --git a/mysql-test/suite/mariabackup/small_ibd.test b/mysql-test/suite/mariabackup/small_ibd.test
index e8175fce..bb476b87 100644
--- a/mysql-test/suite/mariabackup/small_ibd.test
+++ b/mysql-test/suite/mariabackup/small_ibd.test
@@ -13,7 +13,7 @@ echo #backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
remove_file $_datadir/test/small.ibd;
rmdir $targetdir;
diff --git a/extra/wolfssl/wolfssl/IPP/.gitkeep b/mysql-test/suite/mariabackup/std_data/ment1587_aria_log.00000004
index e69de29b..e69de29b 100644
--- a/extra/wolfssl/wolfssl/IPP/.gitkeep
+++ b/mysql-test/suite/mariabackup/std_data/ment1587_aria_log.00000004
diff --git a/mysql-test/suite/mariabackup/suite.opt b/mysql-test/suite/mariabackup/suite.opt
index 1df46435..e6b20c32 100644
--- a/mysql-test/suite/mariabackup/suite.opt
+++ b/mysql-test/suite/mariabackup/suite.opt
@@ -1 +1 @@
---innodb --loose-changed_page_bitmaps --innodb-sys-tables --innodb-flush-log-at-trx-commit=2 --sequence
+--innodb --innodb-sys-tables --innodb-flush-log-at-trx-commit=2 --sequence
diff --git a/mysql-test/suite/mariabackup/system_versioning.test b/mysql-test/suite/mariabackup/system_versioning.test
index 1ced00b4..04a5f72a 100644
--- a/mysql-test/suite/mariabackup/system_versioning.test
+++ b/mysql-test/suite/mariabackup/system_versioning.test
@@ -5,7 +5,7 @@ update t set a=2;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
insert into t values (3);
@@ -32,7 +32,7 @@ insert into t values (1);
update t set a=2;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
insert into t values (3);
diff --git a/mysql-test/suite/mariabackup/truncate_during_backup.test b/mysql-test/suite/mariabackup/truncate_during_backup.test
index 46ee244d..8928fc4e 100644
--- a/mysql-test/suite/mariabackup/truncate_during_backup.test
+++ b/mysql-test/suite/mariabackup/truncate_during_backup.test
@@ -7,7 +7,7 @@ CREATE TABLE t1 ENGINE=InnoDB SELECT 1;
--let after_load_tablespaces=TRUNCATE test.t1
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --dbug=+d,mariabackup_events;
--enable_result_log
--let after_load_tablespaces=
diff --git a/mysql-test/suite/mariabackup/undo_space_id.result b/mysql-test/suite/mariabackup/undo_space_id.result
index b03b9705..fd720d12 100644
--- a/mysql-test/suite/mariabackup/undo_space_id.result
+++ b/mysql-test/suite/mariabackup/undo_space_id.result
@@ -11,3 +11,10 @@ undo002
undo001
undo002
DROP TABLE t1;
+#
+# MDEV-33980 mariadb-backup --backup is missing
+# retry logic for undo tablespaces
+#
+# xtrabackup backup
+# Display undo log files from target directory
+FOUND 5 /Retrying to read undo tablespace*/ in backup.log
diff --git a/mysql-test/suite/mariabackup/undo_space_id.test b/mysql-test/suite/mariabackup/undo_space_id.test
index 2c56492f..32782354 100644
--- a/mysql-test/suite/mariabackup/undo_space_id.test
+++ b/mysql-test/suite/mariabackup/undo_space_id.test
@@ -11,7 +11,7 @@ INSERT INTO t1 VALUES(1);
--echo # xtrabackup backup
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
--echo # Display undo log files from target directory
list_files $basedir undo*;
@@ -23,3 +23,22 @@ list_files $basedir undo*;
DROP TABLE t1;
rmdir $basedir;
+
+--echo #
+--echo # MDEV-33980 mariadb-backup --backup is missing
+--echo # retry logic for undo tablespaces
+--echo #
+let $backuplog= $MYSQLTEST_VARDIR/tmp/backup.log;
+--echo # xtrabackup backup
+--disable_result_log
+--error 1
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir --dbug=+d,undo_space_read_fail > $backuplog;
+--enable_result_log
+--echo # Display undo log files from target directory
+list_files $basedir undo*;
+
+--let SEARCH_PATTERN=Retrying to read undo tablespace*
+--let SEARCH_FILE=$backuplog
+--source include/search_pattern_in_file.inc
+rmdir $basedir;
+remove_file $backuplog;
diff --git a/mysql-test/suite/mariabackup/unencrypted_page_compressed.test b/mysql-test/suite/mariabackup/unencrypted_page_compressed.test
index 700c4dd2..31e8323b 100644
--- a/mysql-test/suite/mariabackup/unencrypted_page_compressed.test
+++ b/mysql-test/suite/mariabackup/unencrypted_page_compressed.test
@@ -38,7 +38,7 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
--error 1
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --core-file > $backuplog;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --core-file > $backuplog;
--enable_result_log
--let SEARCH_PATTERN=Database page corruption detected.*
diff --git a/mysql-test/suite/mariabackup/unsupported_redo.test b/mysql-test/suite/mariabackup/unsupported_redo.test
index 97e1cad2..38cceb2f 100644
--- a/mysql-test/suite/mariabackup/unsupported_redo.test
+++ b/mysql-test/suite/mariabackup/unsupported_redo.test
@@ -15,7 +15,7 @@ ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
echo # No longer fails during full backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
DROP TABLE t1;
@@ -29,13 +29,13 @@ INSERT INTO t1(a) select 1 union select 2 union select 3;
--echo # Create full backup , modify table, then fails during creation of
--echo # incremental/differential backup
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
--enable_result_log
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$incremental_dir --incremental-basedir=$basedir;
--enable_result_log
DROP TABLE t1;
@@ -58,7 +58,7 @@ ALTER TABLE t21 FORCE, ALGORITHM=INPLACE;
--echo # unsupported redo log for the table t21.
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables-exclude=test.t21" --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 "--tables-exclude=test.t21" --target-dir=$targetdir;
--enable_result_log
--list_files $targetdir/test *.ibd
--list_files $targetdir/test *.new
diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.test b/mysql-test/suite/mariabackup/xb_aws_key_management.test
index c8a12f6e..a2e407d3 100644
--- a/mysql-test/suite/mariabackup/xb_aws_key_management.test
+++ b/mysql-test/suite/mariabackup/xb_aws_key_management.test
@@ -10,7 +10,7 @@ INSERT INTO t VALUES('foobar1');
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
exec $XTRABACKUP --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/xb_file_key_management.test b/mysql-test/suite/mariabackup/xb_file_key_management.test
index 4d27b2df..eca69c97 100644
--- a/mysql-test/suite/mariabackup/xb_file_key_management.test
+++ b/mysql-test/suite/mariabackup/xb_file_key_management.test
@@ -8,7 +8,7 @@ DELETE FROM t LIMIT 1;
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
--let SEARCH_RANGE = 10000000
diff --git a/mysql-test/suite/mariabackup/xb_history.test b/mysql-test/suite/mariabackup/xb_history.test
index f9374a1a..e05b7721 100644
--- a/mysql-test/suite/mariabackup/xb_history.test
+++ b/mysql-test/suite/mariabackup/xb_history.test
@@ -6,7 +6,7 @@ DROP TABLE IF EXISTS mysql.mariadb_backup_history;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --history=foo --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --history=foo --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/xb_page_compress.test b/mysql-test/suite/mariabackup/xb_page_compress.test
index 7e806e6d..e2819e26 100644
--- a/mysql-test/suite/mariabackup/xb_page_compress.test
+++ b/mysql-test/suite/mariabackup/xb_page_compress.test
@@ -27,7 +27,7 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.*1" --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 "--tables=test.*1" --target-dir=$targetdir;
echo # xtrabackup prepare;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir;
--enable_result_log
diff --git a/mysql-test/suite/mariabackup/xb_partition.test b/mysql-test/suite/mariabackup/xb_partition.test
index 1c8eeaa1..13ce8fa2 100644
--- a/mysql-test/suite/mariabackup/xb_partition.test
+++ b/mysql-test/suite/mariabackup/xb_partition.test
@@ -39,7 +39,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 --backup --target-dir=$targetdir/full;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir/full;
--enable_result_log
DROP TABLE t1;
diff --git a/mysql-test/suite/mariabackup/xb_rocksdb.test b/mysql-test/suite/mariabackup/xb_rocksdb.test
index e41f3b2b..6c23fe3d 100644
--- a/mysql-test/suite/mariabackup/xb_rocksdb.test
+++ b/mysql-test/suite/mariabackup/xb_rocksdb.test
@@ -8,9 +8,9 @@ echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
let $stream=$MYSQLTEST_VARDIR/tmp/backup.xb;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir $backup_extra_param;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir $backup_extra_param;
--enable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --stream=xbstream > $stream 2>$MYSQLTEST_VARDIR/tmp/backup_stream.log;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --stream=xbstream > $stream 2>$MYSQLTEST_VARDIR/tmp/backup_stream.log;
INSERT INTO t VALUES(2);
diff --git a/mysql-test/suite/mariabackup/xb_rocksdb_datadir.test b/mysql-test/suite/mariabackup/xb_rocksdb_datadir.test
index c2e90d90..2a0b2a46 100644
--- a/mysql-test/suite/mariabackup/xb_rocksdb_datadir.test
+++ b/mysql-test/suite/mariabackup/xb_rocksdb_datadir.test
@@ -9,7 +9,7 @@ INSERT INTO t VALUES(1);
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
INSERT INTO t VALUES(2);
diff --git a/mysql-test/suite/mariabackup/xbstream.test b/mysql-test/suite/mariabackup/xbstream.test
index 212ac598..8429a3b5 100644
--- a/mysql-test/suite/mariabackup/xbstream.test
+++ b/mysql-test/suite/mariabackup/xbstream.test
@@ -8,7 +8,7 @@ mkdir $targetdir;
let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb;
echo # xtrabackup backup to stream;
-exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --databases-exclude=foobar --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --databases-exclude=foobar --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
echo # xbstream extract;
--disable_result_log
exec $XBSTREAM -x -C $targetdir < $streamfile;
diff --git a/mysql-test/suite/multi_source/gtid_ignore_duplicates.result b/mysql-test/suite/multi_source/gtid_ignore_duplicates.result
index e142ff8b..88b525e2 100644
--- a/mysql-test/suite/multi_source/gtid_ignore_duplicates.result
+++ b/mysql-test/suite/multi_source/gtid_ignore_duplicates.result
@@ -174,6 +174,105 @@ a
10
11
12
+*** MDEV-33475: --gtid-ignore-duplicate can double-apply event in case of parallel replication retry
+connection server_2;
+STOP SLAVE "c2b";
+SET default_master_connection = "c2b";
+include/wait_for_slave_to_stop.inc
+STOP SLAVE "a2b";
+SET default_master_connection = "a2b";
+include/wait_for_slave_to_stop.inc
+connection server_1;
+CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t2 VALUES (0, 0);
+INSERT INTO t2 VALUES (1, 0);
+INSERT INTO t2 VALUES (2, 0);
+INSERT INTO t2 VALUES (3, 0);
+INSERT INTO t2 VALUES (4, 0);
+INSERT INTO t2 VALUES (5, 0);
+INSERT INTO t2 VALUES (6, 0);
+INSERT INTO t2 VALUES (7, 0);
+INSERT INTO t2 VALUES (8, 0);
+INSERT INTO t2 VALUES (9, 0);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (0+10, 100);
+UPDATE t2 SET b=0 WHERE a<10;
+INSERT INTO t2 VALUES (0+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (1+10, 100);
+UPDATE t2 SET b=1 WHERE a<10;
+INSERT INTO t2 VALUES (1+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (2+10, 100);
+UPDATE t2 SET b=2 WHERE a<10;
+INSERT INTO t2 VALUES (2+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (3+10, 100);
+UPDATE t2 SET b=3 WHERE a<10;
+INSERT INTO t2 VALUES (3+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (4+10, 100);
+UPDATE t2 SET b=4 WHERE a<10;
+INSERT INTO t2 VALUES (4+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (5+10, 100);
+UPDATE t2 SET b=5 WHERE a<10;
+INSERT INTO t2 VALUES (5+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (6+10, 100);
+UPDATE t2 SET b=6 WHERE a<10;
+INSERT INTO t2 VALUES (6+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (7+10, 100);
+UPDATE t2 SET b=7 WHERE a<10;
+INSERT INTO t2 VALUES (7+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (8+10, 100);
+UPDATE t2 SET b=8 WHERE a<10;
+INSERT INTO t2 VALUES (8+20, 200);
+COMMIT;
+BEGIN;
+INSERT INTO t2 VALUES (9+10, 100);
+UPDATE t2 SET b=9 WHERE a<10;
+INSERT INTO t2 VALUES (9+20, 200);
+COMMIT;
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+COUNT(*) SUM(a) SUM(b)
+30 435 3090
+include/save_master_gtid.inc
+connection server_2;
+SET @old_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode=aggressive;
+SET default_master_connection = "a2b";
+START SLAVE;
+include/wait_for_slave_to_start.inc
+SET default_master_connection = "c2b";
+START SLAVE;
+include/wait_for_slave_to_start.inc
+include/sync_with_master_gtid.inc
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+COUNT(*) SUM(a) SUM(b)
+30 435 3090
+connection server_3;
+include/sync_with_master_gtid.inc
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+COUNT(*) SUM(a) SUM(b)
+30 435 3090
+connection server_4;
+include/sync_with_master_gtid.inc
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+COUNT(*) SUM(a) SUM(b)
+30 435 3090
*** Test also with not using parallel replication.
connection server_1;
SET default_master_connection = "b2a";
@@ -474,6 +573,7 @@ Warnings:
Note 1938 SLAVE 'a2b' stopped
Note 1938 SLAVE 'c2b' stopped
SET GLOBAL slave_parallel_threads= @old_parallel;
+SET GLOBAL slave_parallel_mode= @old_mode;
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
connection server_3;
SET GLOBAL gtid_domain_id=0;
@@ -491,22 +591,22 @@ Note 1938 SLAVE 'a2d' stopped
SET GLOBAL slave_parallel_threads= @old_parallel;
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
connection server_1;
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_1;
connection server_2;
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_2;
connection server_3;
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
include/reset_master_slave.inc
disconnect server_3;
connection server_4;
-DROP TABLE t1;
+DROP TABLE t1, t2;
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 3d2d151b..cbc06920 100644
--- a/mysql-test/suite/multi_source/gtid_ignore_duplicates.test
+++ b/mysql-test/suite/multi_source/gtid_ignore_duplicates.test
@@ -173,6 +173,65 @@ SET default_master_connection = "a2b";
SELECT * FROM t1 WHERE a >= 10 ORDER BY a;
+--echo *** MDEV-33475: --gtid-ignore-duplicate can double-apply event in case of parallel replication retry
+
+# Create a bunch of transactions that will cause conflicts and retries.
+# The bug was that the retry code was not handling the --gtid-ignore-duplicates
+# option, so events could be doubly-applied.
+
+--connection server_2
+STOP SLAVE "c2b";
+SET default_master_connection = "c2b";
+--source include/wait_for_slave_to_stop.inc
+STOP SLAVE "a2b";
+SET default_master_connection = "a2b";
+--source include/wait_for_slave_to_stop.inc
+
+--connection server_1
+CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+BEGIN;
+--let $i= 0
+while ($i < 10) {
+ eval INSERT INTO t2 VALUES ($i, 0);
+ inc $i;
+}
+COMMIT;
+
+--let $i= 0
+while ($i < 10) {
+ BEGIN;
+ eval INSERT INTO t2 VALUES ($i+10, 100);
+ eval UPDATE t2 SET b=$i WHERE a<10;
+ eval INSERT INTO t2 VALUES ($i+20, 200);
+ COMMIT;
+ inc $i;
+}
+
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+--source include/save_master_gtid.inc
+
+--connection server_2
+SET @old_mode= @@GLOBAL.slave_parallel_mode;
+SET GLOBAL slave_parallel_mode=aggressive;
+SET default_master_connection = "a2b";
+START SLAVE;
+--source include/wait_for_slave_to_start.inc
+SET default_master_connection = "c2b";
+START SLAVE;
+--source include/wait_for_slave_to_start.inc
+
+--source include/sync_with_master_gtid.inc
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+
+--connection server_3
+--source include/sync_with_master_gtid.inc
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+
+--connection server_4
+--source include/sync_with_master_gtid.inc
+SELECT COUNT(*), SUM(a), SUM(b) FROM t2;
+
+
--echo *** Test also with not using parallel replication.
--connection server_1
@@ -414,6 +473,7 @@ SET GLOBAL gtid_domain_id=0;
--sorted_result
STOP ALL SLAVES;
SET GLOBAL slave_parallel_threads= @old_parallel;
+SET GLOBAL slave_parallel_mode= @old_mode;
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
--connection server_3
@@ -431,25 +491,25 @@ SET GLOBAL slave_parallel_threads= @old_parallel;
SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates;
--connection server_1
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_1
--connection server_2
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_2
--connection server_3
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_3
--connection server_4
-DROP TABLE t1;
+DROP TABLE t1, t2;
ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria;
--source include/reset_master_slave.inc
--disconnect server_4
diff --git a/mysql-test/suite/multi_source/info_logs.result b/mysql-test/suite/multi_source/info_logs.result
index a35a20bd..6f3fd7e7 100644
--- a/mysql-test/suite/multi_source/info_logs.result
+++ b/mysql-test/suite/multi_source/info_logs.result
@@ -94,17 +94,17 @@ MASTER 2.2
# EOF
#
show all slaves status;
-Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
-MASTER 2.2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
+Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
+ Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
+MASTER 2.2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000002 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 7 0 60.000
include/wait_for_slave_to_start.inc
set default_master_connection = 'MASTER 2.2';
include/wait_for_slave_to_start.inc
set default_master_connection = '';
show all slaves status;
-Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
- Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 6 0 60.000
-MASTER 2.2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 6 0 60.000
+Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
+ Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> relay.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space1> None 0 No 0 No 0 0 1 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 6 0 60.000
+MASTER 2.2 Slave has read all relay log; waiting for more updates Waiting for master to send event 127.0.0.1 root MYPORT_2 60 master-bin.000001 <read_master_log_pos> relay-master@00202@002e2.000004 <relay_log_pos> master-bin.000001 Yes Yes 0 0 <read_master_log_pos> <relay_log_space2> None 0 No 0 No 0 0 2 No optimistic 0 NULL Slave has read all relay log; waiting for more updates 0 0 0 0 1073741824 6 0 60.000
#
# List of files matching '*info*' pattern
# after slave server restart
diff --git a/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result b/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result
index 355919de..ce6efc26 100644
--- a/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result
+++ b/mysql-test/suite/multi_source/multi_source_slave_alias_replica.result
@@ -34,7 +34,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -76,6 +75,7 @@ Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -96,7 +96,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -138,6 +137,7 @@ Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
diff --git a/mysql-test/suite/multi_source/reset_slave.result b/mysql-test/suite/multi_source/reset_slave.result
index 2e9ce5e8..6ff1f5a9 100644
--- a/mysql-test/suite/multi_source/reset_slave.result
+++ b/mysql-test/suite/multi_source/reset_slave.result
@@ -13,15 +13,15 @@ insert into t1 values (1),(2);
connection slave;
stop slave 'master1';
show slave 'master1' status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups
- 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-master1.000002 <relay_log_pos> master-bin.000001 No No 0 0 <read_master_log_pos> <relay_log_space> None 0 No NULL No 0 0 1 Slave_Pos 0-1-3 optimistic 0 NULL 2 1 0
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB
+ 127.0.0.1 root MYPORT_1 60 master-bin.000001 <read_master_log_pos> mysqld-relay-bin-master1.000002 <relay_log_pos> master-bin.000001 No No 0 0 <read_master_log_pos> <relay_log_space> None 0 No NULL No 0 0 1 Slave_Pos 0-1-3 optimistic 0 NULL 2 1 0
mysqld-relay-bin-master1.000001
mysqld-relay-bin-master1.000002
mysqld-relay-bin-master1.index
reset slave 'master1';
show slave 'master1' status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups
- 127.0.0.1 root MYPORT_1 60 4 <relay_log_pos> No No 0 0 0 <relay_log_space> None 0 No NULL No 0 0 1 Slave_Pos optimistic 0 NULL 2 1 0
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB
+ 127.0.0.1 root MYPORT_1 60 4 <relay_log_pos> No No 0 0 0 <relay_log_space> None 0 No NULL No 0 0 1 Slave_Pos optimistic 0 NULL 2 1 0
reset slave 'master1' all;
show slave 'master1' status;
ERROR HY000: There is no master connection 'master1'
diff --git a/mysql-test/suite/multi_source/simple.result b/mysql-test/suite/multi_source/simple.result
index 65c25b88..61932184 100644
--- a/mysql-test/suite/multi_source/simple.result
+++ b/mysql-test/suite/multi_source/simple.result
@@ -32,7 +32,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -74,6 +73,7 @@ Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -94,7 +94,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -136,6 +135,7 @@ Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -221,7 +221,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -263,6 +262,7 @@ Slave_SQL_Running_State
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
reset slave 'slave1';
show all slaves status;
Connection_name slave1
@@ -279,7 +279,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running No
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -321,6 +320,7 @@ Slave_SQL_Running_State
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -341,7 +341,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -383,6 +382,7 @@ Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -405,7 +405,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -447,6 +446,7 @@ Slave_SQL_Running_State Slave has read all relay log; waiting for more updates
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
@@ -471,7 +471,6 @@ Relay_Log_Pos <relay_log_pos>
Relay_Master_Log_File master-bin.000001
Slave_IO_Running No
Slave_SQL_Running No
-Replicate_Rewrite_DB
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
@@ -513,6 +512,7 @@ Slave_SQL_Running_State
Slave_DDL_Groups 0
Slave_Non_Transactional_Groups 0
Slave_Transactional_Groups 0
+Replicate_Rewrite_DB
Retried_transactions 0
Max_relay_log_size 1073741824
Executed_log_entries 7
diff --git a/mysql-test/suite/multi_source/syntax.result b/mysql-test/suite/multi_source/syntax.result
index 3c7c91c3..6b214fe3 100644
--- a/mysql-test/suite/multi_source/syntax.result
+++ b/mysql-test/suite/multi_source/syntax.result
@@ -1,11 +1,11 @@
include/master-slave.inc
[connection master]
show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB
show slave '' status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB
show all slaves status;
-Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Rewrite_DB Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
+Connection_name Slave_SQL_State Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_SSL_Crl Master_SSL_Crlpath Using_Gtid Gtid_IO_Pos Replicate_Do_Domain_Ids Replicate_Ignore_Domain_Ids Parallel_Mode SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Slave_DDL_Groups Slave_Non_Transactional_Groups Slave_Transactional_Groups Replicate_Rewrite_DB Retried_transactions Max_relay_log_size Executed_log_entries Slave_received_heartbeats Slave_heartbeat_period Gtid_Slave_Pos
#
# Check error handling
#
diff --git a/mysql-test/suite/parts/inc/partition_crash.inc b/mysql-test/suite/parts/inc/partition_crash.inc
index c657ba88..bd00f6ca 100644
--- a/mysql-test/suite/parts/inc/partition_crash.inc
+++ b/mysql-test/suite/parts/inc/partition_crash.inc
@@ -11,7 +11,7 @@
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--disable_reconnect
# CR_SERVER_LOST
--error 2013
@@ -22,7 +22,7 @@ SELECT * FROM t1;
--replace_regex /sql-exchange.*\./sql-exchange./ /sql-shadow-[0-9a-f]*-/sql-shadow-/
--cat_file $DATADIR.files.txt
--remove_file $DATADIR.files.txt
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
--echo # State after crash recovery
diff --git a/mysql-test/suite/parts/r/alter_table.result b/mysql-test/suite/parts/r/alter_table.result
index fa458c97..8f633370 100644
--- a/mysql-test/suite/parts/r/alter_table.result
+++ b/mysql-test/suite/parts/r/alter_table.result
@@ -1,3 +1,6 @@
+#
+# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
+#
set @save_alter_algorithm= @@session.alter_algorithm;
SET SESSION alter_algorithm=4;
CREATE TABLE t1(a INT) engine=myisam PARTITION BY RANGE(a) SUBPARTITION BY KEY(a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION s0,SUBPARTITION s1), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION s2,SUBPARTITION s3));
@@ -18,9 +21,16 @@ ALTER TABLE t1 ADD COLUMN c INT;
ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=COPY
DROP table if exists t1;
set @@session.alter_algorithm= @save_alter_algorithm;
+#
+# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
+# ERROR 1507 (HY000): Error in list of partitions to DROP
+#
CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
ALTER TABLE t1 DROP PARTITION p;
DROP TABLE if exists t1;
+#
+# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
+#
CREATE TABLE t1 (i INT);
CREATE VIEW v1 as SELECT * FROM t1;
CREATE TABLE t2 (i INT);
@@ -28,6 +38,7 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
ERROR 42000: Can't open table
DROP VIEW v1;
DROP TABLE t1, t2;
+# End of 10.5 tests
#
# MDEV-22165 CONVERT PARTITION: move in partition from existing table
#
@@ -358,3 +369,4 @@ disconnect con1;
connection default;
drop user u@localhost;
drop database db;
+# End of 10.11 tests
diff --git a/mysql-test/suite/parts/r/mdev_21007.result b/mysql-test/suite/parts/r/mdev_21007.result
new file mode 100644
index 00000000..fb2417ac
--- /dev/null
+++ b/mysql-test/suite/parts/r/mdev_21007.result
@@ -0,0 +1,5 @@
+CREATE TABLE t1 (a INT) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (1), PARTITION p1 VALUES LESS THAN (MAXVALUE));
+INSERT INTO t1 VALUES (1),(2);
+ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
+UPDATE t1 PARTITION (p1) SET a=9 ORDER BY a LIMIT 1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index aab121f2..d4efb87a 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -60,7 +60,6 @@ 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
@@ -521,7 +520,6 @@ 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
@@ -993,7 +991,6 @@ 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
@@ -1466,7 +1463,6 @@ 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
@@ -1933,7 +1929,6 @@ 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
@@ -2406,7 +2401,6 @@ 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
@@ -2884,7 +2878,6 @@ 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
@@ -3360,7 +3353,6 @@ 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
@@ -3826,7 +3818,6 @@ 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
@@ -4287,7 +4278,6 @@ 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
@@ -4759,7 +4749,6 @@ 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
@@ -5232,7 +5221,6 @@ 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
@@ -5699,7 +5687,6 @@ 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
@@ -6172,7 +6159,6 @@ 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
@@ -6650,7 +6636,6 @@ 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
@@ -7126,7 +7111,6 @@ 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
@@ -15108,7 +15092,6 @@ 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
@@ -15569,7 +15552,6 @@ 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
@@ -16041,7 +16023,6 @@ 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
@@ -16514,7 +16495,6 @@ 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
@@ -16981,7 +16961,6 @@ 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
@@ -17454,7 +17433,6 @@ 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
@@ -17932,7 +17910,6 @@ 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
@@ -18408,7 +18385,6 @@ 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
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index c863d479..3c06585e 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -60,7 +60,6 @@ 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
@@ -530,7 +529,6 @@ 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
@@ -1017,7 +1015,6 @@ 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
@@ -1511,7 +1508,6 @@ 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
@@ -1995,7 +1991,6 @@ 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
@@ -2489,7 +2484,6 @@ 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
@@ -2988,7 +2982,6 @@ 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
@@ -3485,7 +3478,6 @@ 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
@@ -3974,7 +3966,6 @@ 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
@@ -4444,7 +4435,6 @@ 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
@@ -4931,7 +4921,6 @@ 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
@@ -5425,7 +5414,6 @@ 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
@@ -5909,7 +5897,6 @@ 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
@@ -6403,7 +6390,6 @@ 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
@@ -6902,7 +6888,6 @@ 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
@@ -7399,7 +7384,6 @@ 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
@@ -15700,7 +15684,6 @@ 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
@@ -16170,7 +16153,6 @@ 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
@@ -16657,7 +16639,6 @@ 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
@@ -17151,7 +17132,6 @@ 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
@@ -17635,7 +17615,6 @@ 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
@@ -18129,7 +18108,6 @@ 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
@@ -18628,7 +18606,6 @@ 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
@@ -19125,7 +19102,6 @@ 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
diff --git a/mysql-test/suite/parts/r/partition_alter_myisam.result b/mysql-test/suite/parts/r/partition_alter_myisam.result
index ec6cbe92..c76c6aba 100644
--- a/mysql-test/suite/parts/r/partition_alter_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter_myisam.result
@@ -88,3 +88,25 @@ insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1;
alter online table t1 delay_key_write=0;
alter online table t1 delay_key_write=1;
drop table t1;
+#
+# MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS
+#
+create table t1 (i1 int primary key, i2 int, d1 date, key(i2))
+partition by hash(i1) partitions 3;
+insert into t1 values(0, 1, '2010-10-10');
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+index_name comment
+PRIMARY
+i2
+alter table t1 disable keys;
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+index_name comment
+PRIMARY
+i2 disabled
+alter table t1 add partition (partition p4);
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+index_name comment
+PRIMARY
+i2 disabled
+drop table t1;
+# End of 10.11 tests
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 88784224..28dcddd9 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
@@ -1020,7 +1020,6 @@ 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 92457a21..204ef94d 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
@@ -1020,7 +1020,6 @@ 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 fea80a3f..10f8fbe1 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
@@ -1020,7 +1020,6 @@ 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 418650eb..d9b677ac 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
@@ -987,7 +987,6 @@ 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 96e72cbf..601f6cb7 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
@@ -987,7 +987,6 @@ 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 0ab07cdc..936f972d 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
@@ -987,7 +987,6 @@ 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 1eddf51b..129e84e5 100644
--- a/mysql-test/suite/parts/r/partition_recover_myisam.result
+++ b/mysql-test/suite/parts/r/partition_recover_myisam.result
@@ -1,3 +1,6 @@
+call mtr.add_suppression("..test.t1_will_crash");
+call mtr.add_suppression("Got an error from unknown thread");
+call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired");
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
FLUSH TABLES;
diff --git a/mysql-test/suite/parts/t/alter_table.test b/mysql-test/suite/parts/t/alter_table.test
index 9b75add3..9c131c73 100644
--- a/mysql-test/suite/parts/t/alter_table.test
+++ b/mysql-test/suite/parts/t/alter_table.test
@@ -1,12 +1,18 @@
# Permissions don't work with embedded
--source include/not_embedded.inc
+
+#
+# General bugs with ALTER TABLE and partitions that doesn't have to be run
+# on all engines
+#
+
--source include/have_partition.inc
--source include/lcase_names.inc
--source suite/parts/inc/engines.inc
-#
-# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
-#
+--echo #
+--echo # MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
+--echo #
set @save_alter_algorithm= @@session.alter_algorithm;
SET SESSION alter_algorithm=4;
@@ -18,18 +24,18 @@ DROP table if exists t1;
set @@session.alter_algorithm= @save_alter_algorithm;
-#
-# MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
-# ERROR 1507 (HY000): Error in list of partitions to DROP
-#
+--echo #
+--echo # MDEV-22804 SIGSEGV in ha_partition::create_partitioning_metadata |
+--echo # ERROR 1507 (HY000): Error in list of partitions to DROP
+--echo #
CREATE TABLE t1 (a INT) PARTITION BY RANGE(a) SUBPARTITION BY HASH(a) (PARTITION p VALUES LESS THAN (5) (SUBPARTITION sp, SUBPARTITION sp1), PARTITION p1 VALUES LESS THAN MAXVALUE (SUBPARTITION sp2, SUBPARTITION sp3));
ALTER TABLE t1 DROP PARTITION p;
DROP TABLE if exists t1;
-#
-# MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
-#
+--echo #
+--echo # MDEV-23357 Server crashes in Sql_cmd_alter_table_exchange_partition::exchange_partition
+--echo #
CREATE TABLE t1 (i INT);
CREATE VIEW v1 as SELECT * FROM t1;
CREATE TABLE t2 (i INT);
@@ -38,6 +44,8 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
DROP VIEW v1;
DROP TABLE t1, t2;
+--echo # End of 10.5 tests
+
--echo #
--echo # MDEV-22165 CONVERT PARTITION: move in partition from existing table
--echo #
@@ -319,3 +327,5 @@ alter table t1 convert table tp to partition p2 values less than (1000);
--connection default
drop user u@localhost;
drop database db;
+
+--echo # End of 10.11 tests
diff --git a/mysql-test/suite/parts/t/mdev_21007.test b/mysql-test/suite/parts/t/mdev_21007.test
new file mode 100644
index 00000000..ec6fbe4d
--- /dev/null
+++ b/mysql-test/suite/parts/t/mdev_21007.test
@@ -0,0 +1,9 @@
+--source include/have_partition.inc
+
+CREATE TABLE t1 (a INT) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (1), PARTITION p1 VALUES LESS THAN (MAXVALUE));
+INSERT INTO t1 VALUES (1),(2);
+ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
+UPDATE t1 PARTITION (p1) SET a=9 ORDER BY a LIMIT 1;
+
+# Cleanup
+DROP TABLE t1;
diff --git a/mysql-test/suite/parts/t/partition_alter_myisam.test b/mysql-test/suite/parts/t/partition_alter_myisam.test
index d3abb884..794c0779 100644
--- a/mysql-test/suite/parts/t/partition_alter_myisam.test
+++ b/mysql-test/suite/parts/t/partition_alter_myisam.test
@@ -22,3 +22,18 @@ insert into t1 select rand()*1000, rand()*1000, repeat('b', 100) from t1;
alter online table t1 delay_key_write=0;
alter online table t1 delay_key_write=1;
drop table t1;
+
+--echo #
+--echo # MDEV-25102 UNIQUE USING HASH error after ALTER ... DISABLE KEYS
+--echo #
+create table t1 (i1 int primary key, i2 int, d1 date, key(i2))
+partition by hash(i1) partitions 3;
+insert into t1 values(0, 1, '2010-10-10');
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+alter table t1 disable keys;
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+alter table t1 add partition (partition p4);
+select index_name, comment from information_schema.statistics where table_schema='test' and table_name='t1';
+drop table t1;
+
+--echo # End of 10.11 tests
diff --git a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt b/mysql-test/suite/parts/t/partition_recover_myisam-master.opt
deleted file mode 100644
index ddbd7a0a..00000000
--- a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---myisam-recover-options
diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.opt b/mysql-test/suite/parts/t/partition_recover_myisam.opt
new file mode 100644
index 00000000..ca3d0cdd
--- /dev/null
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.opt
@@ -0,0 +1 @@
+--safe-mode
diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test
index 91a14a51..3106407b 100644
--- a/mysql-test/suite/parts/t/partition_recover_myisam.test
+++ b/mysql-test/suite/parts/t/partition_recover_myisam.test
@@ -1,18 +1,10 @@
# test the auto-recover (--myisam-recover) of partitioned myisam tables
---disable_query_log
call mtr.add_suppression("..test.t1_will_crash");
call mtr.add_suppression("Got an error from unknown thread");
call mtr.add_suppression("Table 't1_will_crash' is marked as crashed and should be repaired");
---enable_query_log
--source include/have_partition.inc
---disable_warnings
---disable_query_log
-drop table if exists t1_will_crash;
---enable_query_log
---enable_warnings
-
CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM;
INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
diff --git a/mysql-test/suite/perfschema/include/memory_aggregate_load.inc b/mysql-test/suite/perfschema/include/memory_aggregate_load.inc
index 7a54d252..c6e58d09 100644
--- a/mysql-test/suite/perfschema/include/memory_aggregate_load.inc
+++ b/mysql-test/suite/perfschema/include/memory_aggregate_load.inc
@@ -274,7 +274,6 @@ execute dump_users;
execute dump_hosts;
--disconnect con1
---disconnect con5
--connection default
@@ -283,6 +282,8 @@ let $wait_condition=
select count(*) = 0 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
--source include/wait_condition.inc
+
+--disconnect con5
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
diff --git a/mysql-test/suite/perfschema/include/program_execution.inc b/mysql-test/suite/perfschema/include/program_execution.inc
index 8c0bc691..f774a4d7 100644
--- a/mysql-test/suite/perfschema/include/program_execution.inc
+++ b/mysql-test/suite/perfschema/include/program_execution.inc
@@ -32,7 +32,7 @@ SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
DELIMITER |;
-CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|
diff --git a/mysql-test/suite/perfschema/include/stage_setup.inc b/mysql-test/suite/perfschema/include/stage_setup.inc
index 683c4561..ba97d909 100644
--- a/mysql-test/suite/perfschema/include/stage_setup.inc
+++ b/mysql-test/suite/perfschema/include/stage_setup.inc
@@ -121,12 +121,23 @@ begin
where thread_id = my_thread_id
and nesting_event_id = my_statement_id
order by event_id asc;
- # Ignore query cache as it may not be enabled
- select username, event_name, nesting_event_type
- from performance_schema.events_stages_history
- where thread_id = my_thread_id
- and nesting_event_id = my_statement_id and
- event_name not like "%query cache%"
+ # 1. Ignore query cache as it may not be enabled
+ # 2. MDL wait consists of short 1 second waits (this is not configurable)
+ # repeated until lock_wait_timeout is reached. The stage is changed
+ # to Waiting and back every second. To have predictable result here
+ # the query filters all sequences of X, "Waiting for MDL", X,
+ # leaving just X.
+ with h as (
+ select event_id, username, event_name, nesting_event_type,
+ lag(event_name) over (order by event_id) = lead(event_name) over (order by event_id)
+ and event_name = "stage/sql/Waiting for stored function metadata lock" as v1,
+ lag(event_name, 2) over (order by event_id) = event_name
+ and lag(event_name, 1) over (order by event_id) = "stage/sql/Waiting for stored function metadata lock" as v2
+ from performance_schema.events_stages_history
+ where thread_id = my_thread_id
+ and nesting_event_id = my_statement_id and
+ event_name not like "%query cache%"
+ ) select username, event_name, nesting_event_type from h where v1 is not true and v2 is not true
order by event_id asc;
end;
else
diff --git a/mysql-test/suite/perfschema/r/alter_table_progress.result b/mysql-test/suite/perfschema/r/alter_table_progress.result
index 08c2c3a6..caca7378 100644
--- a/mysql-test/suite/perfschema/r/alter_table_progress.result
+++ b/mysql-test/suite/perfschema/r/alter_table_progress.result
@@ -82,11 +82,10 @@ stage/sql/Unlocking tables NULL NULL
stage/sql/Rename result table NULL NULL
stage/sql/End of update loop NULL NULL
stage/sql/Query end NULL NULL
-stage/sql/Commit NULL NULL
stage/sql/closing tables NULL NULL
stage/sql/Unlocking tables NULL NULL
stage/sql/closing tables NULL NULL
-stage/sql/Commit implicit NULL NULL
+stage/sql/Query end NULL NULL
stage/sql/Starting cleanup NULL NULL
stage/sql/Freeing items NULL NULL
stage/sql/Reset for next command NULL NULL
diff --git a/mysql-test/suite/perfschema/r/event_aggregate.result b/mysql-test/suite/perfschema/r/event_aggregate.result
index 805378f5..abc3b205 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate.result
@@ -251,35 +251,35 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -383,7 +383,7 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 0
user2 localhost stage/sql/closing tables 0
user2 localhost stage/sql/init 0
@@ -395,7 +395,7 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 0
user2 stage/sql/closing tables 0
user2 stage/sql/init 0
@@ -407,21 +407,21 @@ localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -551,45 +551,45 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -712,12 +712,12 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 0
user3 localhost stage/sql/closing tables 0
user3 localhost stage/sql/init 0
@@ -729,12 +729,12 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 0
user3 stage/sql/closing tables 0
user3 stage/sql/init 0
@@ -746,21 +746,21 @@ localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -909,55 +909,55 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1099,17 +1099,17 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 0
user4 localhost stage/sql/closing tables 0
user4 localhost stage/sql/init 0
@@ -1121,17 +1121,17 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 0
user4 stage/sql/closing tables 0
user4 stage/sql/init 0
@@ -1143,21 +1143,21 @@ localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1325,65 +1325,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 24
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1538,65 +1538,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 25
+localhost stage/sql/starting 29
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1751,65 +1751,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 26
+localhost stage/sql/starting 30
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1963,65 +1963,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 27
+localhost stage/sql/starting 31
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2174,65 +2174,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2386,65 +2386,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2597,65 +2597,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2808,65 +2808,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3019,65 +3019,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3230,65 +3230,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3441,65 +3441,65 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3674,43 +3674,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3907,21 +3907,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4125,14 +4125,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4343,7 +4343,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4554,7 +4554,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4765,7 +4765,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4976,7 +4976,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5187,7 +5187,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5398,7 +5398,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5609,7 +5609,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5820,7 +5820,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -6031,7 +6031,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -6242,7 +6242,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -6453,7 +6453,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -6636,7 +6636,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -6763,7 +6763,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -6862,7 +6862,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 30948c2e..eb2ac32f 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
@@ -235,28 +235,28 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -350,7 +350,7 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 0
user2 stage/sql/closing tables 0
user2 stage/sql/init 0
@@ -362,21 +362,21 @@ localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -489,33 +489,33 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -619,12 +619,12 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 0
user3 stage/sql/closing tables 0
user3 stage/sql/init 0
@@ -636,21 +636,21 @@ localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -773,38 +773,38 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -918,17 +918,17 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 0
user4 stage/sql/closing tables 0
user4 stage/sql/init 0
@@ -940,21 +940,21 @@ localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1087,43 +1087,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 24
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1243,43 +1243,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 25
+localhost stage/sql/starting 29
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1399,43 +1399,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 26
+localhost stage/sql/starting 30
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1554,43 +1554,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 27
+localhost stage/sql/starting 31
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1708,43 +1708,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1863,43 +1863,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2017,43 +2017,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2171,43 +2171,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2325,43 +2325,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2479,43 +2479,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2633,43 +2633,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2787,43 +2787,43 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2963,21 +2963,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3124,14 +3124,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3285,7 +3285,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3439,7 +3439,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3593,7 +3593,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3747,7 +3747,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3901,7 +3901,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4055,7 +4055,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4209,7 +4209,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4363,7 +4363,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4517,7 +4517,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4671,7 +4671,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4825,7 +4825,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4979,7 +4979,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5105,7 +5105,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5203,7 +5203,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 956ea6c6..8dbe393e 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
@@ -205,7 +205,7 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -214,14 +214,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -306,7 +306,7 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 0
user2 stage/sql/closing tables 0
user2 stage/sql/init 0
@@ -320,14 +320,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -431,12 +431,12 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -445,14 +445,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -547,12 +547,12 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 0
user3 stage/sql/closing tables 0
user3 stage/sql/init 0
@@ -566,14 +566,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -687,17 +687,17 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -706,14 +706,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -818,17 +818,17 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 0
user4 stage/sql/closing tables 0
user4 stage/sql/init 0
@@ -842,14 +842,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -973,22 +973,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -997,14 +997,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1115,22 +1115,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1139,14 +1139,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1257,22 +1257,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1281,14 +1281,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1398,22 +1398,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1422,14 +1422,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1538,22 +1538,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1562,14 +1562,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1679,22 +1679,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1703,14 +1703,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1819,22 +1819,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1843,14 +1843,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1959,22 +1959,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1983,14 +1983,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2099,22 +2099,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2123,14 +2123,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2239,22 +2239,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2263,14 +2263,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2379,22 +2379,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2403,14 +2403,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2519,22 +2519,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2543,14 +2543,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2683,14 +2683,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2823,14 +2823,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2970,7 +2970,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3110,7 +3110,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3250,7 +3250,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3390,7 +3390,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3530,7 +3530,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3670,7 +3670,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3810,7 +3810,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3950,7 +3950,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4090,7 +4090,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4230,7 +4230,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4370,7 +4370,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4510,7 +4510,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4622,7 +4622,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4706,7 +4706,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 fbaa9a8d..f44c3bf9 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
@@ -219,21 +219,21 @@ localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -317,21 +317,21 @@ localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -427,21 +427,21 @@ localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -526,21 +526,21 @@ localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -637,21 +637,21 @@ localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -737,21 +737,21 @@ localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -849,21 +849,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 24
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -948,21 +948,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 25
+localhost stage/sql/starting 29
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1047,21 +1047,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 26
+localhost stage/sql/starting 30
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1145,21 +1145,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 27
+localhost stage/sql/starting 31
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1242,21 +1242,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1340,21 +1340,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1437,21 +1437,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1534,21 +1534,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1631,21 +1631,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1728,21 +1728,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1825,21 +1825,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1922,21 +1922,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2019,21 +2019,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2123,14 +2123,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2227,7 +2227,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2324,7 +2324,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2421,7 +2421,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2518,7 +2518,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2615,7 +2615,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2712,7 +2712,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2809,7 +2809,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2906,7 +2906,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3003,7 +3003,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3100,7 +3100,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3197,7 +3197,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3294,7 +3294,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3391,7 +3391,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -3488,7 +3488,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 af535623..887c74d3 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
@@ -191,14 +191,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -275,14 +275,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -371,14 +371,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -456,14 +456,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -553,14 +553,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -639,14 +639,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -737,14 +737,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -822,14 +822,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -907,14 +907,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -991,14 +991,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1074,14 +1074,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1158,14 +1158,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1241,14 +1241,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1324,14 +1324,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1407,14 +1407,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1490,14 +1490,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1573,14 +1573,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1656,14 +1656,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1739,14 +1739,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1822,14 +1822,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1912,7 +1912,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -1995,7 +1995,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2078,7 +2078,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2161,7 +2161,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2244,7 +2244,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2327,7 +2327,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2410,7 +2410,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2493,7 +2493,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2576,7 +2576,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2659,7 +2659,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2742,7 +2742,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2825,7 +2825,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2908,7 +2908,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -2991,7 +2991,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 1209d376..b9a885f6 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
@@ -221,14 +221,14 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -237,14 +237,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -339,7 +339,7 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 0
user2 localhost stage/sql/closing tables 0
user2 localhost stage/sql/init 0
@@ -351,7 +351,7 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 0
user2 stage/sql/closing tables 0
user2 stage/sql/init 0
@@ -365,14 +365,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -493,24 +493,24 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -519,14 +519,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -640,12 +640,12 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 0
user3 localhost stage/sql/closing tables 0
user3 localhost stage/sql/init 0
@@ -657,12 +657,12 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 0
user3 stage/sql/closing tables 0
user3 stage/sql/init 0
@@ -676,14 +676,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -823,34 +823,34 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -859,14 +859,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -999,17 +999,17 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 0
user4 localhost stage/sql/closing tables 0
user4 localhost stage/sql/init 0
@@ -1021,17 +1021,17 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 0
user4 stage/sql/closing tables 0
user4 stage/sql/init 0
@@ -1045,14 +1045,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1211,44 +1211,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 6
+user1 stage/sql/starting 7
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1257,14 +1257,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1410,44 +1410,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 6
+user2 stage/sql/starting 7
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1456,14 +1456,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1609,44 +1609,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 6
+user3 stage/sql/starting 7
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1655,14 +1655,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1807,44 +1807,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 6
+user4 stage/sql/starting 7
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -1853,14 +1853,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2004,44 +2004,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2050,14 +2050,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2202,44 +2202,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2248,14 +2248,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2399,44 +2399,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2445,14 +2445,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2596,44 +2596,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2642,14 +2642,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2793,44 +2793,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -2839,14 +2839,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2990,44 +2990,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -3036,14 +3036,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3187,44 +3187,44 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -3233,14 +3233,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3406,22 +3406,22 @@ user1 stage/sql/checking permissions 4
user1 stage/sql/closing tables 11
user1 stage/sql/init 3
user1 stage/sql/Opening tables 7
-user1 stage/sql/starting 7
+user1 stage/sql/starting 8
user2 stage/sql/checking permissions 4
user2 stage/sql/closing tables 10
user2 stage/sql/init 3
user2 stage/sql/Opening tables 6
-user2 stage/sql/starting 7
+user2 stage/sql/starting 8
user3 stage/sql/checking permissions 4
user3 stage/sql/closing tables 10
user3 stage/sql/init 3
user3 stage/sql/Opening tables 6
-user3 stage/sql/starting 7
+user3 stage/sql/starting 8
user4 stage/sql/checking permissions 4
user4 stage/sql/closing tables 10
user4 stage/sql/init 3
user4 stage/sql/Opening tables 6
-user4 stage/sql/starting 7
+user4 stage/sql/starting 8
execute dump_stages_host;
host event_name count_star
execute dump_stages_global;
@@ -3430,14 +3430,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3627,14 +3627,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3824,14 +3824,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4028,7 +4028,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4225,7 +4225,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4422,7 +4422,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4619,7 +4619,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4816,7 +4816,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5013,7 +5013,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5210,7 +5210,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5407,7 +5407,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5604,7 +5604,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5801,7 +5801,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -5998,7 +5998,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -6167,7 +6167,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -6280,7 +6280,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -6365,7 +6365,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 39da9783..da99aa54 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
@@ -233,7 +233,7 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -242,21 +242,21 @@ localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -348,7 +348,7 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 0
user2 localhost stage/sql/closing tables 0
user2 localhost stage/sql/init 0
@@ -362,21 +362,21 @@ localhost stage/sql/checking permissions 4
localhost stage/sql/closing tables 11
localhost stage/sql/init 3
localhost stage/sql/Opening tables 7
-localhost stage/sql/starting 6
+localhost stage/sql/starting 7
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -487,12 +487,12 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -501,21 +501,21 @@ localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -617,12 +617,12 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 0
user3 localhost stage/sql/closing tables 0
user3 localhost stage/sql/init 0
@@ -636,21 +636,21 @@ localhost stage/sql/checking permissions 8
localhost stage/sql/closing tables 21
localhost stage/sql/init 6
localhost stage/sql/Opening tables 13
-localhost stage/sql/starting 12
+localhost stage/sql/starting 14
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -771,17 +771,17 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -790,21 +790,21 @@ localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -916,17 +916,17 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 0
user4 localhost stage/sql/closing tables 0
user4 localhost stage/sql/init 0
@@ -940,21 +940,21 @@ localhost stage/sql/checking permissions 12
localhost stage/sql/closing tables 31
localhost stage/sql/init 9
localhost stage/sql/Opening tables 19
-localhost stage/sql/starting 18
+localhost stage/sql/starting 21
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1085,22 +1085,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1109,21 +1109,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 24
+localhost stage/sql/starting 28
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1241,22 +1241,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1265,21 +1265,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 25
+localhost stage/sql/starting 29
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1397,22 +1397,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1421,21 +1421,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 26
+localhost stage/sql/starting 30
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1552,22 +1552,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1576,21 +1576,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 27
+localhost stage/sql/starting 31
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1706,22 +1706,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1730,21 +1730,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1861,22 +1861,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1885,21 +1885,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2015,22 +2015,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2039,21 +2039,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2169,22 +2169,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2193,21 +2193,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2323,22 +2323,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2347,21 +2347,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2477,22 +2477,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2501,21 +2501,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2631,22 +2631,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2655,21 +2655,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2809,21 +2809,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2963,21 +2963,21 @@ localhost stage/sql/checking permissions 16
localhost stage/sql/closing tables 41
localhost stage/sql/init 12
localhost stage/sql/Opening tables 25
-localhost stage/sql/starting 28
+localhost stage/sql/starting 32
execute dump_stages_global;
event_name count_star
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3124,14 +3124,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3285,7 +3285,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3439,7 +3439,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3593,7 +3593,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3747,7 +3747,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3901,7 +3901,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4055,7 +4055,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4209,7 +4209,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4363,7 +4363,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4517,7 +4517,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4671,7 +4671,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4825,7 +4825,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4951,7 +4951,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5049,7 +5049,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -5147,7 +5147,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
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 818c61e0..064b6e45 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
@@ -203,7 +203,7 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -214,14 +214,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -304,7 +304,7 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 0
user2 localhost stage/sql/closing tables 0
user2 localhost stage/sql/init 0
@@ -320,14 +320,14 @@ stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 4
stage/sql/closing tables 11
stage/sql/init 3
stage/sql/Opening tables 7
-stage/sql/starting 6
+stage/sql/starting 7
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -429,12 +429,12 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -445,14 +445,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -545,12 +545,12 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 0
user3 localhost stage/sql/closing tables 0
user3 localhost stage/sql/init 0
@@ -566,14 +566,14 @@ stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 8
stage/sql/closing tables 21
stage/sql/init 6
stage/sql/Opening tables 13
-stage/sql/starting 12
+stage/sql/starting 14
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -685,17 +685,17 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -706,14 +706,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -816,17 +816,17 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 0
user4 localhost stage/sql/closing tables 0
user4 localhost stage/sql/init 0
@@ -842,14 +842,14 @@ stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 12
stage/sql/closing tables 31
stage/sql/init 9
stage/sql/Opening tables 19
-stage/sql/starting 18
+stage/sql/starting 21
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -971,22 +971,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 6
+user1 localhost stage/sql/starting 7
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -997,14 +997,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 24
+stage/sql/starting 28
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1113,22 +1113,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 6
+user2 localhost stage/sql/starting 7
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1139,14 +1139,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 25
+stage/sql/starting 29
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1255,22 +1255,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 6
+user3 localhost stage/sql/starting 7
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1281,14 +1281,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 26
+stage/sql/starting 30
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1396,22 +1396,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 6
+user4 localhost stage/sql/starting 7
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1422,14 +1422,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 27
+stage/sql/starting 31
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1536,22 +1536,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1562,14 +1562,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1677,22 +1677,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1703,14 +1703,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1817,22 +1817,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1843,14 +1843,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -1957,22 +1957,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -1983,14 +1983,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2097,22 +2097,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2123,14 +2123,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2237,22 +2237,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2263,14 +2263,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2377,22 +2377,22 @@ user1 localhost stage/sql/checking permissions 4
user1 localhost stage/sql/closing tables 11
user1 localhost stage/sql/init 3
user1 localhost stage/sql/Opening tables 7
-user1 localhost stage/sql/starting 7
+user1 localhost stage/sql/starting 8
user2 localhost stage/sql/checking permissions 4
user2 localhost stage/sql/closing tables 10
user2 localhost stage/sql/init 3
user2 localhost stage/sql/Opening tables 6
-user2 localhost stage/sql/starting 7
+user2 localhost stage/sql/starting 8
user3 localhost stage/sql/checking permissions 4
user3 localhost stage/sql/closing tables 10
user3 localhost stage/sql/init 3
user3 localhost stage/sql/Opening tables 6
-user3 localhost stage/sql/starting 7
+user3 localhost stage/sql/starting 8
user4 localhost stage/sql/checking permissions 4
user4 localhost stage/sql/closing tables 10
user4 localhost stage/sql/init 3
user4 localhost stage/sql/Opening tables 6
-user4 localhost stage/sql/starting 7
+user4 localhost stage/sql/starting 8
execute dump_stages_user;
user event_name count_star
execute dump_stages_host;
@@ -2403,14 +2403,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2543,14 +2543,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2683,14 +2683,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2823,14 +2823,14 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_stages_history;
event_name count(event_name)
stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -2970,7 +2970,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3110,7 +3110,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3250,7 +3250,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3390,7 +3390,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3530,7 +3530,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3670,7 +3670,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3810,7 +3810,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -3950,7 +3950,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4090,7 +4090,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4230,7 +4230,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4370,7 +4370,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
user1 localhost statement/com/Error 0
@@ -4482,7 +4482,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4566,7 +4566,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
@@ -4650,7 +4650,7 @@ stage/sql/checking permissions 16
stage/sql/closing tables 41
stage/sql/init 12
stage/sql/Opening tables 25
-stage/sql/starting 28
+stage/sql/starting 32
execute dump_statements_account;
user host event_name count_star
execute dump_statements_user;
diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result
index 5435efb3..0e2928bd 100644
--- a/mysql-test/suite/perfschema/r/max_program_zero.result
+++ b/mysql-test/suite/perfschema/r/max_program_zero.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate.result b/mysql-test/suite/perfschema/r/memory_aggregate.result
index 69eb033e..1d963dd8 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate.result
@@ -2507,8 +2507,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result b/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result
index 2b8ee675..387af11f 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_32bit.result
@@ -2507,8 +2507,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result
index b5c8e1cd..abac503b 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a.result
@@ -1903,8 +1903,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result
index cc0e0c03..f63e6f1d 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_h.result
@@ -1653,8 +1653,8 @@ user4 2 2
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result
index 8b24b5b5..32785952 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u.result
@@ -1343,8 +1343,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result
index 45cbaf88..e68f0e1b 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_a_no_u_no_h.result
@@ -1093,8 +1093,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result
index 35d528bf..e3b7cd0f 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_h.result
@@ -2257,8 +2257,8 @@ user4 2 2
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result
index 1f800ce4..fd9f2c69 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_u.result
@@ -1947,8 +1947,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result
index b1ac5f24..fdbd2d75 100644
--- a/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/memory_aggregate_no_u_no_h.result
@@ -1697,8 +1697,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
-disconnect con5;
connection default;
+disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index 2258cbce..6bc0fa32 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -94,7 +94,7 @@ test t_60905 NULL 5 5 0 1
DROP TABLE t_60905;
show global variables like "performance_schema_max_thread_instances";
Variable_name Value
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
explain select * from performance_schema.threads;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE threads ALL NULL NULL NULL NULL 256
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index 9e18e5ac..f17a6462 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -127,10 +127,10 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
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 15 stage/sql/Commit (stage) STATEMENT 0
-15 15 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 14
-16 16 stage/sql/closing tables (stage) STATEMENT 0
+13 14 stage/sql/Query end (stage) STATEMENT 0
+14 14 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 13
+15 15 stage/sql/closing tables (stage) STATEMENT 0
+16 16 stage/sql/Query end (stage) STATEMENT 0
17 17 stage/sql/Starting cleanup (stage) STATEMENT 0
18 18 stage/sql/Freeing items (stage) STATEMENT 0
19 19 wait/io/socket/sql/client_connection send STATEMENT 0
@@ -151,10 +151,10 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
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 39 stage/sql/Commit (stage) STATEMENT 24
-39 39 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 38
-40 40 stage/sql/closing tables (stage) STATEMENT 24
+37 38 stage/sql/Query end (stage) STATEMENT 24
+38 38 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 37
+39 39 stage/sql/closing tables (stage) STATEMENT 24
+40 40 stage/sql/Query end (stage) STATEMENT 24
41 41 stage/sql/Starting cleanup (stage) STATEMENT 24
42 42 stage/sql/Freeing items (stage) STATEMENT 24
43 43 wait/io/socket/sql/client_connection send STATEMENT 24
@@ -175,10 +175,10 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
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 63 stage/sql/Commit (stage) STATEMENT 48
-63 63 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 62
-64 64 stage/sql/closing tables (stage) STATEMENT 48
+61 62 stage/sql/Query end (stage) STATEMENT 48
+62 62 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 61
+63 63 stage/sql/closing tables (stage) STATEMENT 48
+64 64 stage/sql/Query end (stage) STATEMENT 48
65 65 stage/sql/Starting cleanup (stage) STATEMENT 48
66 66 stage/sql/Freeing items (stage) STATEMENT 48
67 67 wait/io/socket/sql/client_connection send STATEMENT 48
@@ -202,10 +202,10 @@ select "With a third part to make things complete" as payload NULL NULL
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 88 stage/sql/Commit (stage) STATEMENT 72
-88 88 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 87
-89 89 stage/sql/closing tables (stage) STATEMENT 72
+86 87 stage/sql/Query end (stage) STATEMENT 72
+87 87 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 86
+88 88 stage/sql/closing tables (stage) STATEMENT 72
+89 89 stage/sql/Query end (stage) STATEMENT 72
90 90 stage/sql/Starting cleanup (stage) STATEMENT 72
91 92 stage/sql/Freeing items (stage) STATEMENT 72
92 92 wait/io/socket/sql/client_connection send STAGE 91
@@ -221,10 +221,10 @@ select "With a third part to make things complete" as payload NULL NULL
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 106 stage/sql/Commit (stage) STATEMENT 93
-106 106 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 105
-107 107 stage/sql/closing tables (stage) STATEMENT 93
+104 105 stage/sql/Query end (stage) STATEMENT 93
+105 105 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 104
+106 106 stage/sql/closing tables (stage) STATEMENT 93
+107 107 stage/sql/Query end (stage) STATEMENT 93
108 108 stage/sql/Starting cleanup (stage) STATEMENT 93
109 110 stage/sql/Freeing items (stage) STATEMENT 93
110 110 wait/io/socket/sql/client_connection send STAGE 109
@@ -238,10 +238,10 @@ select "With a third part to make things complete" as payload NULL NULL
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 123 stage/sql/Commit (stage) STATEMENT 111
-123 123 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 122
-124 124 stage/sql/closing tables (stage) STATEMENT 111
+121 122 stage/sql/Query end (stage) STATEMENT 111
+122 122 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 121
+123 123 stage/sql/closing tables (stage) STATEMENT 111
+124 124 stage/sql/Query end (stage) STATEMENT 111
125 125 stage/sql/Starting cleanup (stage) STATEMENT 111
126 126 stage/sql/Freeing items (stage) STATEMENT 111
127 127 wait/io/socket/sql/client_connection send STATEMENT 111
@@ -262,10 +262,10 @@ select "With a third part to make things complete" as payload NULL NULL
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 147 stage/sql/Commit (stage) STATEMENT 132
-147 147 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 146
-148 148 stage/sql/closing tables (stage) STATEMENT 132
+145 146 stage/sql/Query end (stage) STATEMENT 132
+146 146 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 145
+147 147 stage/sql/closing tables (stage) STATEMENT 132
+148 148 stage/sql/Query end (stage) STATEMENT 132
149 149 stage/sql/Starting cleanup (stage) STATEMENT 132
150 150 stage/sql/Freeing items (stage) STATEMENT 132
151 151 wait/io/socket/sql/client_connection send STATEMENT 132
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 9489c104..4eee0622 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -237,7 +237,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -261,7 +261,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 8be4b958..9e5e0ad3 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -39,7 +39,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -63,7 +63,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
index b9eda506..48aca9e5 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_global.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -10,10 +10,10 @@ username event_name nesting_event_type
username event_name nesting_event_type
user1 stage/sql/starting STATEMENT
user1 stage/sql/starting STATEMENT
+user1 stage/sql/starting STATEMENT
user1 stage/sql/Query end STATEMENT
-user1 stage/sql/Commit STATEMENT
user1 stage/sql/closing tables STATEMENT
-user1 stage/sql/Commit implicit STATEMENT
+user1 stage/sql/Query end STATEMENT
user1 stage/sql/Starting cleanup STATEMENT
user1 stage/sql/Freeing items STATEMENT
user1 stage/sql/Reset for next command STATEMENT
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_table.result b/mysql-test/suite/perfschema/r/stage_mdl_table.result
index 5ba0ba04..b9b2dc12 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_table.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_table.result
@@ -19,10 +19,10 @@ username event_name nesting_event_type
user1 stage/sql/Sending data STATEMENT
user1 stage/sql/End of update loop STATEMENT
user1 stage/sql/Query end STATEMENT
-user1 stage/sql/Commit STATEMENT
user1 stage/sql/closing tables STATEMENT
user1 stage/sql/Unlocking tables STATEMENT
user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/Query end STATEMENT
user1 stage/sql/Starting cleanup STATEMENT
user1 stage/sql/Freeing items STATEMENT
user1 stage/sql/Reset for next command STATEMENT
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
index bfc49fd3..dcd8feb3 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
index e9f20398..d2a1d3e2 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
index ffb45f4f..fc50aecd 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
index e271d5a1..4cd5aad2 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
index 833da225..4665083f 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index e3ff0f51..0101b370 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_low_index.result b/mysql-test/suite/perfschema/r/start_server_low_index.result
index ffdf9d65..a8706c47 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_index.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_index.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
index dbb404f6..37db1bb6 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 1
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
index f92b0e6b..a05cb9c5 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
index fefad55c..d2e2bc9d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
@@ -117,7 +117,7 @@ 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 0
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
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 0c2f65f6..d2a84d67 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
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
index c3f06b53..bf0e7bfc 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 0
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
index fd39807d..b0c690ca 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
index 43111c5e..10c882cc 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -117,7 +117,7 @@ performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 0
performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_index.result b/mysql-test/suite/perfschema/r/start_server_no_index.result
index 15d1184b..4ac8fbaf 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_index.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_index.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mdl.result b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
index b8de9045..25f9ea1d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
index 60066264..7283733d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
index 3353b46b..2904bc21 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
index d41da361..17acca63 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
index 4919de6b..e559d72e 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
index 02a119bd..3c1da2a1 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
index ead01ce2..6da9ed12 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
index a99f1c0f..20385607 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
index 7c148889..ad9e2ebe 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
index dec0680c..e7b1235e 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
index 20adf1a9..0ca5fe86 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
index 044f9475..75c9fb95 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
index 350f2c66..160188e7 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
index d2d7063c..07b31f49 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
index ca7c49cd..61609361 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
index 8bcb3c56..1eb8e625 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
index 2a2bf5d3..94996587 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
index ec6e40ac..17d0b2c0 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 0
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
index b3f1e4cb..c72093c1 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 0
performance_schema_max_table_lock_stat 0
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
index baf9f761..b093b796 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 0
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
index cd204f3d..b13140ac 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 0
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
index d083484c..a4d17b27 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
index f5a12e54..ffe68605 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
index 76ae9d5f..78570f98 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
index 4bd472a2..7971e8dd 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
index f59b156c..0fa5c751 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -117,7 +117,7 @@ performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 0
performance_schema_hosts_size 100
performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
index cc70572c..cc90ffb4 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
@@ -117,7 +117,7 @@ performance_schema_events_waits_history_long_size 0
performance_schema_events_waits_history_size 10
performance_schema_hosts_size 100
performance_schema_max_cond_classes 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index a53d5919..b409d7ff 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index e3ff0f51..0101b370 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/start_server_variables.result b/mysql-test/suite/perfschema/r/start_server_variables.result
index 7d1d1e05..2adfc99b 100644
--- a/mysql-test/suite/perfschema/r/start_server_variables.result
+++ b/mysql-test/suite/perfschema/r/start_server_variables.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
@@ -165,7 +165,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -188,7 +188,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
index 05ec7b0b..44ab0998 100644
--- a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
+++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
@@ -117,7 +117,7 @@ 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 90
-performance_schema_max_cond_instances 1000
+performance_schema_max_cond_instances 1500
performance_schema_max_digest_length 1024
performance_schema_max_file_classes 80
performance_schema_max_file_handles 32768
@@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 200
+performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
diff --git a/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result b/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result
index 5e376a12..1a973c94 100644
--- a/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result
+++ b/mysql-test/suite/perfschema/r/statement_program_nesting_event_check.result
@@ -145,7 +145,7 @@ Bollywood
# Event
SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
-CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|
@@ -165,7 +165,7 @@ statement/sql/call_procedure CALL SampleProc1(30,40,50) NULL NULL 0
statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) NULL NULL 0
statement/sql/call_procedure CALL SampleProc3() NULL NULL 0
statement/sql/call_procedure CALL SampleProc4() NULL NULL 0
-statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END NULL NULL 0
diff --git a/mysql-test/suite/perfschema/r/statement_program_non_nested.result b/mysql-test/suite/perfschema/r/statement_program_non_nested.result
index af9807cb..1c75dac1 100644
--- a/mysql-test/suite/perfschema/r/statement_program_non_nested.result
+++ b/mysql-test/suite/perfschema/r/statement_program_non_nested.result
@@ -145,7 +145,7 @@ Bollywood
# Event
SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
-CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|
@@ -182,7 +182,7 @@ statement/sql/call_procedure CALL SampleProc1(30,40,50) stored_programs NULL NUL
statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) stored_programs NULL NULL NULL NULL 0
statement/sql/call_procedure CALL SampleProc3() stored_programs NULL NULL NULL NULL 0
statement/sql/call_procedure CALL SampleProc4() stored_programs NULL NULL NULL NULL 0
-statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END stored_programs NULL NULL NULL NULL 0
@@ -553,7 +553,7 @@ Bollywood
# Event
SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
-CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
+CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|
diff --git a/mysql-test/suite/perfschema/r/threads_history.result b/mysql-test/suite/perfschema/r/threads_history.result
index aaf2cd09..d72ace62 100644
--- a/mysql-test/suite/perfschema/r/threads_history.result
+++ b/mysql-test/suite/perfschema/r/threads_history.result
@@ -24,27 +24,22 @@ events_waits_history_long YES
global_instrumentation YES
thread_instrumentation YES
statements_digest YES
-# Switch to (con1, localhost, user1, , )
connect con1, localhost, user1, , ;
update performance_schema.threads
set INSTRUMENTED='YES', HISTORY='YES'
where PROCESSLIST_ID = connection_id();
-# Switch to (con2, localhost, user2, , )
connect con2, localhost, user2, , ;
update performance_schema.threads
set INSTRUMENTED='YES', HISTORY='NO'
where PROCESSLIST_ID = connection_id();
-# Switch to (con3, localhost, user3, , )
connect con3, localhost, user3, , ;
update performance_schema.threads
set INSTRUMENTED='NO', HISTORY='YES'
where PROCESSLIST_ID = connection_id();
-# Switch to (con4, localhost, user4, , )
connect con4, localhost, user4, , ;
update performance_schema.threads
set INSTRUMENTED='NO', HISTORY='NO'
where PROCESSLIST_ID = connection_id();
-# Switch to connection default
connection default;
truncate table performance_schema.events_transactions_current;
truncate table performance_schema.events_transactions_history;
@@ -58,7 +53,6 @@ truncate table performance_schema.events_stages_history_long;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
-# Switch to connection con1
connection con1;
XA START 'XA_CON1', 'XA_BQUAL', 12;
select "Hi from con1";
@@ -67,7 +61,6 @@ Hi from con1
XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
-# Switch to connection con2
connection con2;
XA START 'XA_CON2', 'XA_BQUAL', 12;
select "Hi from con2";
@@ -76,7 +69,6 @@ Hi from con2
XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
-# Switch to connection con3
connection con3;
XA START 'XA_CON3', 'XA_BQUAL', 12;
select "Hi from con3";
@@ -85,7 +77,6 @@ Hi from con3
XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
-# Switch to connection con4
connection con4;
XA START 'XA_CON4', 'XA_BQUAL', 12;
select "Hi from con4";
@@ -95,88 +86,142 @@ XA END 'XA_CON4', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
connection default;
-"=========================== Transactions user 1"
+########################### Transactions user 1 - 1
+select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
+select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
+select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
-"=========================== Transactions user 2"
+########################### Transactions user 2 - 1
+select /*2-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+where THREAD_ID = $con2_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON2 XA_BQUAL
+select /*2-1*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-1*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Transactions user 3"
+########################### Transactions user 3 - 1
+select /*3-1*/ count(*) from performance_schema.events_transactions_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Transactions user 4"
+########################### Transactions user 4 - 1
+select /*4-1*/ count(*) from performance_schema.events_transactions_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Statements user 1"
+########################### Statements user 1 - 1
+select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
-"=========================== Statements user 2"
+########################### Statements user 2 - 1
+select /*2-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
+select /*2-1*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-1*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Statements user 3"
+########################### Statements user 3 - 1
+select /*3-1*/ count(*) from performance_schema.events_statements_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Statements user 4"
+########################### Statements user 4 - 1
+select /*4-1*/ count(*) from performance_schema.events_statements_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Stages user 1"
+########################### Stages user 1 - 1
+select /*1-1*/ EVENT_NAME from performance_schema.events_stages_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
+select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
+select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history_long
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
@@ -189,81 +234,122 @@ stage/sql/Optimizing
stage/sql/Executing
stage/sql/End of update loop
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
-"=========================== Stages user 2"
+########################### Stages user 2 - 1
+select /*2-1*/ EVENT_NAME from performance_schema.events_stages_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
+select /*2-1*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-1*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Stages user 3"
+########################### Stages user 3 - 1
+select /*3-1*/ count(*) from performance_schema.events_stages_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Stages user 4"
+########################### Stages user 4 - 1
+select /*4-1*/ count(*) from performance_schema.events_stages_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Waits user 1"
+########################### Waits user 1 - 1
+select /*1-1*/ EVENT_NAME from performance_schema.events_waits_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
+select /*1-1*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
+where THREAD_ID = $con1_thread_id;
has_waits
1
+select /*1-1*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
+where THREAD_ID = $con1_thread_id;
has_waits
1
-"=========================== Waits user 2"
+########################### Waits user 2 - 1
+select /*2-1*/ EVENT_NAME from performance_schema.events_waits_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
+select /*2-1*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-1*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Waits user 3"
+########################### Waits user 3 - 1
+select /*3-1*/ count(*) from performance_schema.events_waits_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-1*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Waits user 4"
+########################### Waits user 4 - 1
+select /*4-1*/ count(*) from performance_schema.events_waits_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-1*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-# Switch to connection default, disable consumers
connection default;
update performance_schema.setup_consumers
set enabled='NO' where name like "%history%";
@@ -296,7 +382,6 @@ truncate table performance_schema.events_stages_history_long;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
-# Switch to connection con1
connection con1;
XA START 'XA_CON1', 'XA_BQUAL', 12;
select "Hi from con1";
@@ -305,7 +390,6 @@ Hi from con1
XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
-# Switch to connection con2
connection con2;
XA START 'XA_CON2', 'XA_BQUAL', 12;
select "Hi from con2";
@@ -314,7 +398,6 @@ Hi from con2
XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
-# Switch to connection con3
connection con3;
XA START 'XA_CON3', 'XA_BQUAL', 12;
select "Hi from con3";
@@ -323,7 +406,6 @@ Hi from con3
XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
-# Switch to connection con4
connection con4;
XA START 'XA_CON4', 'XA_BQUAL', 12;
select "Hi from con4";
@@ -333,117 +415,212 @@ XA END 'XA_CON4', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
connection default;
-"=========================== Transactions user 1"
+########################### Transactions user 1 - 2
+select /*1-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
+select /*1-2*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con1_thread_id;
count(*)
0
+select /*1-2*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con1_thread_id;
count(*)
0
-"=========================== Transactions user 2"
+########################### Transactions user 2 - 2
+select /*2-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+where THREAD_ID = $con2_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON2 XA_BQUAL
+select /*2-2*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-2*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Transactions user 3"
+########################### Transactions user 3 - 2
+select /*3-2*/ count(*) from performance_schema.events_transactions_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Transactions user 4"
+########################### Transactions user 4 - 2
+select /*4-2*/ count(*) from performance_schema.events_transactions_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Statements user 1"
+########################### Statements user 1 - 2
+select /*1-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+select /*1-2*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con1_thread_id;
count(*)
0
+select /*1-2*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con1_thread_id;
count(*)
0
-"=========================== Statements user 2"
+########################### Statements user 2 - 2
+select /*2-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
+select /*2-2*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-2*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Statements user 3"
+########################### Statements user 3 - 2
+select /*3-2*/ count(*) from performance_schema.events_statements_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Statements user 4"
+########################### Statements user 4 - 2
+select /*4-2*/ count(*) from performance_schema.events_statements_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Stages user 1"
+########################### Stages user 1 - 2
+select /*1-2*/ EVENT_NAME from performance_schema.events_stages_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
+select /*1-2*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con1_thread_id;
count(*)
0
+select /*1-2*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con1_thread_id;
count(*)
0
-"=========================== Stages user 2"
+########################### Stages user 2 - 2
+select /*2-2*/ EVENT_NAME from performance_schema.events_stages_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
+select /*2-2*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-2*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Stages user 3"
+########################### Stages user 3 - 2
+select /*3-2*/ count(*) from performance_schema.events_stages_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Stages user 4"
+########################### Stages user 4 - 2
+select /*4-2*/ count(*) from performance_schema.events_stages_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Waits user 1"
+########################### Waits user 1 - 2
+select /*1-2*/ EVENT_NAME from performance_schema.events_waits_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
+select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history
+where THREAD_ID = $con1_thread_id;
has_waits
0
+select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history_long
+where THREAD_ID = $con1_thread_id;
has_waits
0
-"=========================== Waits user 2"
+########################### Waits user 2 - 2
+select /*2-2*/ EVENT_NAME from performance_schema.events_waits_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
+select /*2-2*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-2*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Waits user 3"
+########################### Waits user 3 - 2
+select /*3-2*/ count(*) from performance_schema.events_waits_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-2*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Waits user 4"
+########################### Waits user 4 - 2
+select /*4-2*/ count(*) from performance_schema.events_waits_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-2*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-# Switch to connection default, enable consumers
connection default;
update performance_schema.setup_consumers
set enabled='YES' where name like "%history%";
@@ -476,7 +653,6 @@ truncate table performance_schema.events_stages_history_long;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
-# Switch to connection con1
connection con1;
XA START 'XA_CON1', 'XA_BQUAL', 12;
select "Hi from con1";
@@ -485,7 +661,6 @@ Hi from con1
XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
-# Switch to connection con2
connection con2;
XA START 'XA_CON2', 'XA_BQUAL', 12;
select "Hi from con2";
@@ -494,7 +669,6 @@ Hi from con2
XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
-# Switch to connection con3
connection con3;
XA START 'XA_CON3', 'XA_BQUAL', 12;
select "Hi from con3";
@@ -503,7 +677,6 @@ Hi from con3
XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
-# Switch to connection con4
connection con4;
XA START 'XA_CON4', 'XA_BQUAL', 12;
select "Hi from con4";
@@ -513,88 +686,142 @@ XA END 'XA_CON4', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
connection default;
-"=========================== Transactions user 1"
+########################### Transactions user 1 - 3
+select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
+select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
+select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
+where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
-"=========================== Transactions user 2"
+########################### Transactions user 2 - 3
+select /*2-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+where THREAD_ID = $con2_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON2 XA_BQUAL
+select /*2-3*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-3*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Transactions user 3"
+########################### Transactions user 3 - 3
+select /*3-3*/ count(*) from performance_schema.events_transactions_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Transactions user 4"
+########################### Transactions user 4 - 3
+select /*4-3*/ count(*) from performance_schema.events_transactions_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_transactions_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_transactions_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Statements user 1"
+########################### Statements user 1 - 3
+select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
+select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
-"=========================== Statements user 2"
+########################### Statements user 2 - 3
+select /*2-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
+select /*2-3*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-3*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Statements user 3"
+########################### Statements user 3 - 3
+select /*3-3*/ count(*) from performance_schema.events_statements_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Statements user 4"
+########################### Statements user 4 - 3
+select /*4-3*/ count(*) from performance_schema.events_statements_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_statements_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_statements_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Stages user 1"
+########################### Stages user 1 - 3
+select /*1-3*/ EVENT_NAME from performance_schema.events_stages_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
+select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
+select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history_long
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
@@ -607,81 +834,122 @@ stage/sql/Optimizing
stage/sql/Executing
stage/sql/End of update loop
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
stage/sql/starting
stage/sql/Query end
-stage/sql/Commit
stage/sql/closing tables
+stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
-"=========================== Stages user 2"
+########################### Stages user 2 - 3
+select /*2-3*/ EVENT_NAME from performance_schema.events_stages_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
+select /*2-3*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-3*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Stages user 3"
+########################### Stages user 3 - 3
+select /*3-3*/ count(*) from performance_schema.events_stages_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Stages user 4"
+########################### Stages user 4 - 3
+select /*4-3*/ count(*) from performance_schema.events_stages_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_stages_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_stages_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-"=========================== Waits user 1"
+########################### Waits user 1 - 3
+select /*1-3*/ EVENT_NAME from performance_schema.events_waits_current
+where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
+select /*1-3*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
+where THREAD_ID = $con1_thread_id;
has_waits
1
+select /*1-3*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
+where THREAD_ID = $con1_thread_id;
has_waits
1
-"=========================== Waits user 2"
+########################### Waits user 2 - 3
+select /*2-3*/ EVENT_NAME from performance_schema.events_waits_current
+where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
+select /*2-3*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con2_thread_id;
count(*)
0
+select /*2-3*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con2_thread_id;
count(*)
0
-"=========================== Waits user 3"
+########################### Waits user 3 - 3
+select /*3-3*/ count(*) from performance_schema.events_waits_current
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con3_thread_id;
count(*)
0
+select /*3-3*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con3_thread_id;
count(*)
0
-"=========================== Waits user 4"
+########################### Waits user 4 - 3
+select /*4-3*/ count(*) from performance_schema.events_waits_current
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_waits_history
+where THREAD_ID = $con4_thread_id;
count(*)
0
+select /*4-3*/ count(*) from performance_schema.events_waits_history_long
+where THREAD_ID = $con4_thread_id;
count(*)
0
-# Switch to connection default
connection default;
revoke all privileges, grant option from user1@localhost;
revoke all privileges, grant option from user2@localhost;
diff --git a/mysql-test/suite/perfschema/t/bad_option.test b/mysql-test/suite/perfschema/t/bad_option.test
index 4feb0468..3eee669b 100644
--- a/mysql-test/suite/perfschema/t/bad_option.test
+++ b/mysql-test/suite/perfschema/t/bad_option.test
@@ -14,7 +14,7 @@ let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
let SEARCH_FILE= $error_log;
# Stop the server
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--shutdown_server
--source include/wait_until_disconnected.inc
--error 7
@@ -62,7 +62,7 @@ let SEARCH_PATTERN= Can.t change dir to .*bad_option_h_param;
--remove_file $error_log
# Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $restart_file
+--write_line restart $restart_file
# Turn on reconnect
--enable_reconnect
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index 79c23c65..e8b9691f 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -175,6 +175,7 @@ DROP TABLE t_60905;
#
show global variables like "performance_schema_max_thread_instances";
+replace_result 512 256;
explain select * from performance_schema.threads;
#
diff --git a/mysql-test/suite/perfschema/t/processlist_57.test b/mysql-test/suite/perfschema/t/processlist_57.test
index 748d8b74..fe8898ed 100644
--- a/mysql-test/suite/perfschema/t/processlist_57.test
+++ b/mysql-test/suite/perfschema/t/processlist_57.test
@@ -23,7 +23,7 @@ DROP TABLE performance_schema.processlist;
SHOW CREATE TABLE performance_schema.processlist;
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@@ -93,7 +93,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--error ER_BAD_FIELD_ERROR
SHOW PROCESSLIST;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@@ -166,7 +166,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
# Works and returns no data, innodb table is empty.
SHOW PROCESSLIST;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@@ -231,7 +231,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
# Works and returns no data, innodb table is empty.
SHOW PROCESSLIST;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@@ -306,7 +306,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 3 [HOST:PORT] 6 [TIME]
SHOW PROCESSLIST;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
diff --git a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
index ea59cd4f..bd33c559 100644
--- a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
+++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
@@ -69,7 +69,7 @@ SELECT * FROM performance_schema.setup_instruments
WHERE name like "%wait/io/table/sql/handler%";
# Write file to make mysql-test-run.pl wait for the server to stop
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Restart the server
--echo #
@@ -79,7 +79,7 @@ WHERE name like "%wait/io/table/sql/handler%";
--echo # Restart server with wait/io/table/sql/handler disabled
---exec echo "restart:--loose-performance-schema-instrument=%wait/io/table/sql/%=off" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line "restart:--loose-performance-schema-instrument=%wait/io/table/sql/%=off" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Turn on reconnect
--echo # Enable reconnect
diff --git a/mysql-test/suite/perfschema/t/statement_program_lost_inst.test b/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
index 023180b9..0742043b 100644
--- a/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
+++ b/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
@@ -19,10 +19,10 @@
--source include/have_perfschema.inc
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
---exec echo "wait" > $restart_file
+--write_line wait $restart_file
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2 --thread_stack=655360">$restart_file
+--write_line "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2 --thread_stack=655360" $restart_file
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/perfschema/t/threads_history.test b/mysql-test/suite/perfschema/t/threads_history.test
index f42dd6d0..aee98333 100644
--- a/mysql-test/suite/perfschema/t/threads_history.test
+++ b/mysql-test/suite/perfschema/t/threads_history.test
@@ -23,7 +23,6 @@ flush privileges;
select * from performance_schema.setup_consumers;
---echo # Switch to (con1, localhost, user1, , )
connect (con1, localhost, user1, , );
update performance_schema.threads
@@ -33,7 +32,6 @@ update performance_schema.threads
let $con1_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
---echo # Switch to (con2, localhost, user2, , )
connect (con2, localhost, user2, , );
update performance_schema.threads
@@ -43,7 +41,6 @@ update performance_schema.threads
let $con2_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
---echo # Switch to (con3, localhost, user3, , )
connect (con3, localhost, user3, , );
update performance_schema.threads
@@ -53,7 +50,6 @@ update performance_schema.threads
let $con3_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
---echo # Switch to (con4, localhost, user4, , )
connect (con4, localhost, user4, , );
update performance_schema.threads
@@ -63,7 +59,6 @@ update performance_schema.threads
let $con4_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
---echo # Switch to connection default
--connection default
truncate table performance_schema.events_transactions_current;
@@ -79,7 +74,6 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
---echo # Switch to connection con1
--connection con1
XA START 'XA_CON1', 'XA_BQUAL', 12;
@@ -88,7 +82,6 @@ XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
---echo # Switch to connection con2
--connection con2
XA START 'XA_CON2', 'XA_BQUAL', 12;
@@ -97,7 +90,6 @@ XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
---echo # Switch to connection con3
--connection con3
XA START 'XA_CON3', 'XA_BQUAL', 12;
@@ -106,7 +98,6 @@ XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
---echo # Switch to connection con4
--connection con4
XA START 'XA_CON4', 'XA_BQUAL', 12;
@@ -117,165 +108,150 @@ XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
--connection default
---disable_query_log
+echo ########################### Transactions user 1 - 1;
-echo "=========================== Transactions user 1";
-
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+evalp select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
+evalp select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
+evalp select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Transactions user 2";
+echo ########################### Transactions user 2 - 1;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+evalp select /*2-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*2-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*2-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Transactions user 3";
+echo ########################### Transactions user 3 - 1;
-eval select count(*) from performance_schema.events_transactions_current
+evalp select /*3-1*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*3-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*3-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Transactions user 4";
+echo ########################### Transactions user 4 - 1;
-eval select count(*) from performance_schema.events_transactions_current
+evalp select /*4-1*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*4-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*4-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Statements user 1";
+echo ########################### Statements user 1 - 1;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
-echo "=========================== Statements user 2";
+echo ########################### Statements user 2 - 1;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*2-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*2-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Statements user 3";
+echo ########################### Statements user 3 - 1;
-eval select count(*) from performance_schema.events_statements_current
+evalp select /*3-1*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*3-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*3-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Statements user 4";
+echo ########################### Statements user 4 - 1;
-eval select count(*) from performance_schema.events_statements_current
+evalp select /*4-1*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*4-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*4-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Stages user 1";
+echo ########################### Stages user 1 - 1;
-eval select EVENT_NAME from performance_schema.events_stages_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME from performance_schema.events_stages_history
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME from performance_schema.events_stages_history_long
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history_long
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
-echo "=========================== Stages user 2";
+echo ########################### Stages user 2 - 1;
-eval select EVENT_NAME from performance_schema.events_stages_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*2-1*/ EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*2-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Stages user 3";
+echo ########################### Stages user 3 - 1;
-eval select count(*) from performance_schema.events_stages_current
+evalp select /*3-1*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*3-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*3-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Stages user 4";
+echo ########################### Stages user 4 - 1;
-eval select count(*) from performance_schema.events_stages_current
+evalp select /*4-1*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*4-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*4-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Waits user 1";
+echo ########################### Waits user 1 - 1;
-eval select EVENT_NAME from performance_schema.events_waits_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select (count(*) > 5) as has_waits from performance_schema.events_waits_history
+evalp select /*1-1*/ EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-1*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
-eval select (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
+evalp select /*1-1*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Waits user 2";
+echo ########################### Waits user 2 - 1;
-eval select EVENT_NAME from performance_schema.events_waits_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*2-1*/ EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*2-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Waits user 3";
+echo ########################### Waits user 3 - 1;
-eval select count(*) from performance_schema.events_waits_current
+evalp select /*3-1*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*3-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*3-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Waits user 4";
+echo ########################### Waits user 4 - 1;
-eval select count(*) from performance_schema.events_waits_current
+evalp select /*4-1*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*4-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*4-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
---enable_query_log
-
---echo # Switch to connection default, disable consumers
--connection default
update performance_schema.setup_consumers
@@ -296,7 +272,6 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
---echo # Switch to connection con1
--connection con1
XA START 'XA_CON1', 'XA_BQUAL', 12;
@@ -305,7 +280,6 @@ XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
---echo # Switch to connection con2
--connection con2
XA START 'XA_CON2', 'XA_BQUAL', 12;
@@ -314,7 +288,6 @@ XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
---echo # Switch to connection con3
--connection con3
XA START 'XA_CON3', 'XA_BQUAL', 12;
@@ -323,7 +296,6 @@ XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
---echo # Switch to connection con4
--connection con4
XA START 'XA_CON4', 'XA_BQUAL', 12;
@@ -334,161 +306,150 @@ XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
--connection default
---disable_query_log
-
-echo "=========================== Transactions user 1";
+echo ########################### Transactions user 1 - 2;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+evalp select /*1-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*1-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*1-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Transactions user 2";
+echo ########################### Transactions user 2 - 2;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+evalp select /*2-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*2-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*2-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Transactions user 3";
+echo ########################### Transactions user 3 - 2;
-eval select count(*) from performance_schema.events_transactions_current
+evalp select /*3-2*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*3-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*3-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Transactions user 4";
+echo ########################### Transactions user 4 - 2;
-eval select count(*) from performance_schema.events_transactions_current
+evalp select /*4-2*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*4-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*4-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Statements user 1";
+echo ########################### Statements user 1 - 2;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*1-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*1-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Statements user 2";
+echo ########################### Statements user 2 - 2;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*2-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*2-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Statements user 3";
+echo ########################### Statements user 3 - 2;
-eval select count(*) from performance_schema.events_statements_current
+evalp select /*3-2*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*3-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*3-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Statements user 4";
+echo ########################### Statements user 4 - 2;
-eval select count(*) from performance_schema.events_statements_current
+evalp select /*4-2*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*4-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*4-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Stages user 1";
+echo ########################### Stages user 1 - 2;
-eval select EVENT_NAME from performance_schema.events_stages_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*1-2*/ EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*1-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Stages user 2";
+echo ########################### Stages user 2 - 2;
-eval select EVENT_NAME from performance_schema.events_stages_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*2-2*/ EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*2-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Stages user 3";
+echo ########################### Stages user 3 - 2;
-eval select count(*) from performance_schema.events_stages_current
+evalp select /*3-2*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*3-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*3-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Stages user 4";
+echo ########################### Stages user 4 - 2;
-eval select count(*) from performance_schema.events_stages_current
+evalp select /*4-2*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*4-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*4-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Waits user 1";
+echo ########################### Waits user 1 - 2;
-eval select EVENT_NAME from performance_schema.events_waits_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) as has_waits from performance_schema.events_waits_history
+evalp select /*1-2*/ EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
-eval select count(*) as has_waits from performance_schema.events_waits_history_long
+evalp select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Waits user 2";
+echo ########################### Waits user 2 - 2;
-eval select EVENT_NAME from performance_schema.events_waits_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*2-2*/ EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*2-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Waits user 3";
+echo ########################### Waits user 3 - 2;
-eval select count(*) from performance_schema.events_waits_current
+evalp select /*3-2*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*3-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*3-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Waits user 4";
+echo ########################### Waits user 4 - 2;
-eval select count(*) from performance_schema.events_waits_current
+evalp select /*4-2*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*4-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*4-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
---enable_query_log
-
---echo # Switch to connection default, enable consumers
--connection default
update performance_schema.setup_consumers
@@ -509,7 +470,6 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
---echo # Switch to connection con1
--connection con1
XA START 'XA_CON1', 'XA_BQUAL', 12;
@@ -518,7 +478,6 @@ XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
---echo # Switch to connection con2
--connection con2
XA START 'XA_CON2', 'XA_BQUAL', 12;
@@ -527,7 +486,6 @@ XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
---echo # Switch to connection con3
--connection con3
XA START 'XA_CON3', 'XA_BQUAL', 12;
@@ -536,7 +494,6 @@ XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
---echo # Switch to connection con4
--connection con4
XA START 'XA_CON4', 'XA_BQUAL', 12;
@@ -547,165 +504,150 @@ XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
--connection default
---disable_query_log
-
-echo "=========================== Transactions user 1";
+echo ########################### Transactions user 1 - 3;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+evalp select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
+evalp select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
+evalp select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Transactions user 2";
+echo ########################### Transactions user 2 - 3;
-eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
+evalp select /*2-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*2-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*2-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Transactions user 3";
+echo ########################### Transactions user 3 - 3;
-eval select count(*) from performance_schema.events_transactions_current
+evalp select /*3-3*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*3-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*3-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Transactions user 4";
+echo ########################### Transactions user 4 - 3;
-eval select count(*) from performance_schema.events_transactions_current
+evalp select /*4-3*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_transactions_history
+evalp select /*4-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_transactions_history_long
+evalp select /*4-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Statements user 1";
+echo ########################### Statements user 1 - 3;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
-echo "=========================== Statements user 2";
+echo ########################### Statements user 2 - 3;
-eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*2-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*2-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Statements user 3";
+echo ########################### Statements user 3 - 3;
-eval select count(*) from performance_schema.events_statements_current
+evalp select /*3-3*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*3-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*3-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Statements user 4";
+echo ########################### Statements user 4 - 3;
-eval select count(*) from performance_schema.events_statements_current
+evalp select /*4-3*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_statements_history
+evalp select /*4-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_statements_history_long
+evalp select /*4-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Stages user 1";
+echo ########################### Stages user 1 - 3;
-eval select EVENT_NAME from performance_schema.events_stages_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME from performance_schema.events_stages_history
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select EVENT_NAME from performance_schema.events_stages_history_long
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history_long
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
-echo "=========================== Stages user 2";
+echo ########################### Stages user 2 - 3;
-eval select EVENT_NAME from performance_schema.events_stages_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*2-3*/ EVENT_NAME from performance_schema.events_stages_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*2-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Stages user 3";
+echo ########################### Stages user 3 - 3;
-eval select count(*) from performance_schema.events_stages_current
+evalp select /*3-3*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*3-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*3-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Stages user 4";
+echo ########################### Stages user 4 - 3;
-eval select count(*) from performance_schema.events_stages_current
+evalp select /*4-3*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_stages_history
+evalp select /*4-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_stages_history_long
+evalp select /*4-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
-echo "=========================== Waits user 1";
+echo ########################### Waits user 1 - 3;
-eval select EVENT_NAME from performance_schema.events_waits_current
- where THREAD_ID = $con1_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select (count(*) > 5) as has_waits from performance_schema.events_waits_history
+evalp select /*1-3*/ EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*1-3*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
-eval select (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
+evalp select /*1-3*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
-echo "=========================== Waits user 2";
+echo ########################### Waits user 2 - 3;
-eval select EVENT_NAME from performance_schema.events_waits_current
- where THREAD_ID = $con2_thread_id
- order by THREAD_ID, EVENT_ID;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*2-3*/ EVENT_NAME from performance_schema.events_waits_current
+ where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
+evalp select /*2-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*2-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
-echo "=========================== Waits user 3";
+echo ########################### Waits user 3 - 3;
-eval select count(*) from performance_schema.events_waits_current
+evalp select /*3-3*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*3-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*3-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
-echo "=========================== Waits user 4";
+echo ########################### Waits user 4 - 3;
-eval select count(*) from performance_schema.events_waits_current
+evalp select /*4-3*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_waits_history
+evalp select /*4-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
-eval select count(*) from performance_schema.events_waits_history_long
+evalp select /*4-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
---enable_query_log
-
---echo # Switch to connection default
--connection default
revoke all privileges, grant option from user1@localhost;
diff --git a/mysql-test/suite/period/r/overlaps.result b/mysql-test/suite/period/r/overlaps.result
index 78b1ac18..36a9086f 100644
--- a/mysql-test/suite/period/r/overlaps.result
+++ b/mysql-test/suite/period/r/overlaps.result
@@ -449,3 +449,85 @@ VALUES
('2000-01-01 00:00:00.000000', '2001-01-01 00:00:00.000000', 'abc');
ERROR 23000: Duplicate entry 'abc-2001-01-01 00:00:00.000000-2000-01-01 00:00:00.000000' for key 'index_name'
DROP TABLE t1;
+# MDEV-25370 Update for portion changes autoincrement key in period table
+create or replace table cars(id int auto_increment,
+price int, s date, e date,
+period for p(s,e),
+primary key(id, p without overlaps));
+insert into cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+select * from cars;
+id price s e
+1 1000 2018-01-01 2020-01-01
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+select * from cars;
+id price s e
+1 1000 2018-01-01 2019-01-01
+1 1000 2019-12-01 2020-01-01
+1 1100 2019-01-01 2019-12-01
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+select * from cars;
+id price s e
+1 1000 2018-01-01 2019-01-01
+1 1000 2019-12-01 2019-12-10
+1 1000 2019-12-20 2020-01-01
+1 1100 2019-01-01 2019-12-01
+# AUTO_INCREMENT field is separate from WITHOUT OVERLAPS
+create or replace table cars(id int primary key auto_increment,
+car_id int,
+price int, s date, e date,
+period for p(s,e),
+unique(car_id, p without overlaps));
+insert cars(car_id, price, s, e) values (1, 1000, '2018-01-01', '2020-01-01');
+select * from cars;
+id car_id price s e
+1 1 1000 2018-01-01 2020-01-01
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+select * from cars;
+id car_id price s e
+1 1 1100 2019-01-01 2019-12-01
+2 1 1000 2018-01-01 2019-01-01
+3 1 1000 2019-12-01 2020-01-01
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+select * from cars;
+id car_id price s e
+1 1 1100 2019-01-01 2019-12-01
+2 1 1000 2018-01-01 2019-01-01
+4 1 1000 2019-12-01 2019-12-10
+5 1 1000 2019-12-20 2020-01-01
+# AUTO_INCREMENT field is both standalone and in WITHOUT OVERLAPS
+create or replace table cars(id int primary key auto_increment,
+price int, s date, e date,
+period for p(s,e),
+unique(id, p without overlaps));
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+insert cars(price, s, e) values (1000, '2021-01-01', '2022-01-01');
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+# autoincrement index is: id int primary key
+# id increments each time.
+select * from cars;
+id price s e
+1 1100 2019-01-01 2019-12-01
+2 1000 2021-01-01 2022-01-01
+3 1000 2018-01-01 2019-01-01
+4 1000 2019-12-01 2020-01-01
+truncate cars;
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+select * from cars;
+id price s e
+2 1000 2018-01-01 2019-12-10
+3 1000 2019-12-20 2020-01-01
+create or replace table cars(id int unique auto_increment,
+price int, s date, e date,
+period for p(s,e),
+primary key (id, p without overlaps));
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+# autoincrement index is: primary key (id, p without overlaps)
+# id is not incremented, hence duplication error
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+ERROR 23000: Duplicate entry '1' for key 'id'
+truncate cars;
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+ERROR 23000: Duplicate entry '1' for key 'id'
+drop table cars;
diff --git a/mysql-test/suite/period/t/overlaps.test b/mysql-test/suite/period/t/overlaps.test
index 4e71d64d..b762743b 100644
--- a/mysql-test/suite/period/t/overlaps.test
+++ b/mysql-test/suite/period/t/overlaps.test
@@ -458,3 +458,80 @@ VALUES
('2000-01-01 00:00:00.000000', '2001-01-01 00:00:00.000000', 'abc '),
('2000-01-01 00:00:00.000000', '2001-01-01 00:00:00.000000', 'abc');
DROP TABLE t1;
+
+--echo # MDEV-25370 Update for portion changes autoincrement key in period table
+create or replace table cars(id int auto_increment,
+ price int, s date, e date,
+ period for p(s,e),
+ primary key(id, p without overlaps));
+
+insert into cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+select * from cars;
+
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+--sorted_result
+select * from cars;
+
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+--sorted_result
+select * from cars;
+
+--echo # AUTO_INCREMENT field is separate from WITHOUT OVERLAPS
+create or replace table cars(id int primary key auto_increment,
+ car_id int,
+ price int, s date, e date,
+ period for p(s,e),
+ unique(car_id, p without overlaps));
+
+insert cars(car_id, price, s, e) values (1, 1000, '2018-01-01', '2020-01-01');
+select * from cars;
+
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+--sorted_result
+select * from cars;
+
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+--sorted_result
+select * from cars;
+
+
+--echo # AUTO_INCREMENT field is both standalone and in WITHOUT OVERLAPS
+create or replace table cars(id int primary key auto_increment,
+ price int, s date, e date,
+ period for p(s,e),
+ unique(id, p without overlaps));
+
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+insert cars(price, s, e) values (1000, '2021-01-01', '2022-01-01');
+
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+--echo # autoincrement index is: id int primary key
+--echo # id increments each time.
+--sorted_result
+select * from cars;
+
+truncate cars;
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+--sorted_result
+select * from cars;
+
+create or replace table cars(id int unique auto_increment,
+ price int, s date, e date,
+ period for p(s,e),
+ primary key (id, p without overlaps));
+
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+--echo # autoincrement index is: primary key (id, p without overlaps)
+--echo # id is not incremented, hence duplication error
+--error ER_DUP_ENTRY
+update cars for portion of p from '2019-01-01' to '2019-12-01' set price= 1100;
+
+truncate cars;
+insert cars(price, s, e) values (1000, '2018-01-01', '2020-01-01');
+
+--error ER_DUP_ENTRY
+delete from cars for portion of p from '2019-12-10' to '2019-12-20';
+
+drop table cars;
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
index 791aecda..00abc196 100644
--- a/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
+++ b/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
@@ -18,11 +18,11 @@
-# restart: --disable-provider-bzip2
+# restart: --disable-provider-lz4
select a, left(b, 9), length(b) from t1;
- ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
show warnings;
Level Code Message
-Warning 4185 MariaDB tried to use the BZip2 compression, but its provider plugin is not loaded
+Warning 4185 MariaDB tried to use the LZ4 compression, but its provider plugin is not loaded
- Error 1932 Table 'test.t1' doesn't exist in engine
+ Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
drop table t1;
# restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
index 13c42f82..0119adc7 100644
--- a/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
+++ b/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
@@ -18,11 +18,11 @@
-# restart: --disable-provider-bzip2
+# restart: --disable-provider-lzma
select a, left(b, 9), length(b) from t1;
- ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
show warnings;
Level Code Message
-Warning 4185 MariaDB tried to use the BZip2 compression, but its provider plugin is not loaded
+Warning 4185 MariaDB tried to use the LZMA compression, but its provider plugin is not loaded
- Error 1932 Table 'test.t1' doesn't exist in engine
+ Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
drop table t1;
# restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
index cc7783cc..52a794a9 100644
--- a/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
+++ b/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
@@ -18,11 +18,11 @@
-# restart: --disable-provider-bzip2
+# restart: --disable-provider-lzo
select a, left(b, 9), length(b) from t1;
- ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
show warnings;
Level Code Message
-Warning 4185 MariaDB tried to use the BZip2 compression, but its provider plugin is not loaded
+Warning 4185 MariaDB tried to use the LZO compression, but its provider plugin is not loaded
- Error 1932 Table 'test.t1' doesn't exist in engine
+ Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
drop table t1;
# restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff b/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
index 98c4427a..cbbd754a 100644
--- a/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
+++ b/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
@@ -18,11 +18,11 @@
-# restart: --disable-provider-bzip2
+# restart: --disable-provider-snappy
select a, left(b, 9), length(b) from t1;
- ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
show warnings;
Level Code Message
-Warning 4185 MariaDB tried to use the BZip2 compression, but its provider plugin is not loaded
+Warning 4185 MariaDB tried to use the Snappy compression, but its provider plugin is not loaded
- Error 1932 Table 'test.t1' doesn't exist in engine
+ Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
drop table t1;
# restart
diff --git a/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff b/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
index ac186d3c..3f449220 100644
--- a/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
+++ b/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
@@ -23,11 +23,11 @@
-# restart: --disable-provider-bzip2
+# restart: --disable-provider-lz4
select a, left(b, 9), length(b) from t1;
--ERROR 42S02: Table 'test.t1' doesn't exist in engine
+-ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
-show warnings;
-Level Code Message
-Warning 4185 MariaDB tried to use the BZip2 compression, but its provider plugin is not loaded
--Error 1932 Table 'test.t1' doesn't exist in engine
+-Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
+a left(b, 9) length(b)
+0 0
+1 0
diff --git a/mysql-test/suite/plugins/r/compression.result b/mysql-test/suite/plugins/r/compression.result
index d7c11abc..07bfbc0b 100644
--- a/mysql-test/suite/plugins/r/compression.result
+++ b/mysql-test/suite/plugins/r/compression.result
@@ -18,10 +18,10 @@ a left(b, 9) length(b)
2 ghighighi 30000
# restart: --disable-provider-bzip2
select a, left(b, 9), length(b) from t1;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
show warnings;
Level Code Message
Warning 4185 MariaDB tried to use the BZip2 compression, but its provider plugin is not loaded
-Error 1932 Table 'test.t1' doesn't exist in engine
+Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate.
drop table t1;
# restart
diff --git a/mysql-test/suite/plugins/t/compression.test b/mysql-test/suite/plugins/t/compression.test
index df892acf..95ae2df9 100644
--- a/mysql-test/suite/plugins/t/compression.test
+++ b/mysql-test/suite/plugins/t/compression.test
@@ -40,7 +40,7 @@ let $restart_parameters = --disable-provider-$alg;
source include/restart_mysqld.inc;
if ($engine == "innodb") {
- error ER_NO_SUCH_TABLE_IN_ENGINE;
+ error ER_TABLE_CORRUPT;
select a, left(b, 9), length(b) from t1;
show warnings;
}
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index 091ba255..38242c81 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -279,6 +279,7 @@ a b c
111 4 0
2 20 200
delete from t1 where a=111;
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */;
diff --git a/mysql-test/suite/rpl/include/rpl_extra_col_master.test b/mysql-test/suite/rpl/include/rpl_extra_col_master.test
index a7abe69d..3fef3cc1 100644
--- a/mysql-test/suite/rpl/include/rpl_extra_col_master.test
+++ b/mysql-test/suite/rpl/include/rpl_extra_col_master.test
@@ -59,6 +59,10 @@
#VARCHAR(M)
#
+--disable_query_log
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+--enable_query_log
+
--let $_saved_conn= $CURRENT_CONNECTION
let $binformat = `SHOW VARIABLES LIKE '%binlog_format%'`;
diff --git a/mysql-test/suite/rpl/r/parallel_backup.result b/mysql-test/suite/rpl/r/parallel_backup.result
index 83c7a916..36183892 100644
--- a/mysql-test/suite/rpl/r/parallel_backup.result
+++ b/mysql-test/suite/rpl/r/parallel_backup.result
@@ -125,7 +125,7 @@ include/save_master_gtid.inc
connection slave;
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
-SET @@global.innodb_lock_wait_timeout =1;
+SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
include/start_slave.inc
connection aux_slave;
@@ -168,7 +168,7 @@ include/save_master_gtid.inc
connection slave;
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
-SET @@global.innodb_lock_wait_timeout =1;
+SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
include/start_slave.inc
connection aux_slave;
diff --git a/mysql-test/suite/rpl/r/parallel_backup_lsu_off.result b/mysql-test/suite/rpl/r/parallel_backup_lsu_off.result
index e1fd7701..08955a77 100644
--- a/mysql-test/suite/rpl/r/parallel_backup_lsu_off.result
+++ b/mysql-test/suite/rpl/r/parallel_backup_lsu_off.result
@@ -128,7 +128,7 @@ include/save_master_gtid.inc
connection slave;
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
-SET @@global.innodb_lock_wait_timeout =1;
+SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
include/start_slave.inc
connection aux_slave;
@@ -171,7 +171,7 @@ include/save_master_gtid.inc
connection slave;
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
-SET @@global.innodb_lock_wait_timeout =1;
+SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
include/start_slave.inc
connection aux_slave;
diff --git a/mysql-test/suite/rpl/r/parallel_backup_slave_binlog_off.result b/mysql-test/suite/rpl/r/parallel_backup_slave_binlog_off.result
index 9e29e5a3..bb00bf9c 100644
--- a/mysql-test/suite/rpl/r/parallel_backup_slave_binlog_off.result
+++ b/mysql-test/suite/rpl/r/parallel_backup_slave_binlog_off.result
@@ -128,7 +128,7 @@ include/save_master_gtid.inc
connection slave;
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
-SET @@global.innodb_lock_wait_timeout =1;
+SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
include/start_slave.inc
connection aux_slave;
@@ -171,7 +171,7 @@ include/save_master_gtid.inc
connection slave;
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
-SET @@global.innodb_lock_wait_timeout =1;
+SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
include/start_slave.inc
connection aux_slave;
diff --git a/mysql-test/suite/rpl/r/rpl_auditing.result b/mysql-test/suite/rpl/r/rpl_auditing.result
new file mode 100644
index 00000000..1861beb4
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_auditing.result
@@ -0,0 +1,64 @@
+include/master-slave.inc
+[connection master]
+drop table if exists t1;
+connection slave;
+reset master;
+CREATE TABLE IF NOT EXISTS mysql.server_audit_filters (
+filtername char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+rule longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'true' CHECK (json_valid(rule)),
+CONSTRAINT c_filtername UNIQUE (filtername)
+) ENGINE=Aria;
+CREATE TABLE IF NOT EXISTS mysql.server_audit_users (host char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+user char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+filtername char(80) NOT NULL DEFAULT '',
+CONSTRAINT c_host_user UNIQUE (host, user)
+) ENGINE=Aria;
+INSERT INTO mysql.server_audit_filters VALUES ('ignore_sys', '{"ignore_tables" : "mysql.*"}');
+INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','ignore_sys');
+INSERT INTO mysql.server_audit_users VALUES ('%','root','ignore_sys');
+install plugin server_audit soname 'server_audit2';
+set global server_audit_logging=on;
+connection master;
+create table t1 (a int);
+insert into t1 values (1);
+truncate t1;
+drop table t1;
+connection slave;
+set global server_audit_logging=off;
+truncate mysql.server_audit_filters;
+truncate mysql.server_audit_users;
+INSERT INTO mysql.server_audit_filters VALUES ('no_logging','false');
+INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','no_logging');
+set global server_audit_logging=on;
+connection master;
+create table t1 (a int);
+insert into t1 values (1);
+truncate t1;
+drop table t1;
+connection slave;
+set global server_audit_logging=off;
+uninstall plugin server_audit;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+truncate mysql.server_audit_filters;
+truncate mysql.server_audit_users;
+TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_path=server_audit.log,0
+TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,rotate_size=1000000,0
+TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_rotations=9,0
+TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=ON,0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
+TIME,HOSTNAME,<replication_slave>,,ID,ID,CREATE,test,t1,
+TIME,HOSTNAME,<replication_slave>,,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,<replication_slave>,,ID,ID,CREATE,test,t1,
+TIME,HOSTNAME,<replication_slave>,,ID,ID,DROP,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select master_pos_wait(\'master-bin.#', POS, 300, \'\')',0
+TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=OFF,0
+TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_path=server_audit.log,0
+TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,rotate_size=1000000,0
+TIME,HOSTNAME,,,0,0,AUDIT_CONFIG,,file_rotations=9,0
+TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=ON,0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select master_pos_wait(\'master-bin.#', POS, 300, \'\')',0
+TIME,HOSTNAME,root,localhost,ID,0,AUDIT_CONFIG,test,logging=OFF,0
+connection master;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result b/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result
index af79b482..20dd9076 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_dump_slave_gtid_state_info.result
@@ -1,6 +1,7 @@
include/master-slave.inc
[connection master]
connection master;
+SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
SET GLOBAL LOG_WARNINGS=2;
connection slave;
include/stop_slave.inc
@@ -41,11 +42,11 @@ connection master;
include/wait_for_pattern_in_file.inc
FOUND 1 /using_gtid\(1\), gtid\(\'0-1-2,10-1-1\'\).*/ in mysqld.1.err
"===== Clean up ====="
+SET GLOBAL LOG_WARNINGS=@org_log_warnings;
connection slave;
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=no;
include/start_slave.inc
connection master;
DROP TABLE t;
-SET GLOBAL LOG_WARNINGS=default;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result
index 88801b07..48cec72d 100644
--- a/mysql-test/suite/rpl/r/rpl_change_master.result
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result
@@ -26,9 +26,4 @@ connection master;
CHANGE MASTER TO MASTER_USER='root', MASTER_SSL=0, MASTER_SSL_CA='', MASTER_SSL_CERT='',
MASTER_SSL_KEY='', MASTER_SSL_CRL='', MASTER_SSL_CRLPATH='';
CHANGE MASTER TO MASTER_USER='root', MASTER_PASSWORD='', MASTER_SSL=0;
-"Usage of CURRENT_POS in CHANGE MASTER MASTER_USE_GTID is dreprecated.
-CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
-CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_change_master_demote.result b/mysql-test/suite/rpl/r/rpl_change_master_demote.result
index 70d141ef..2114ac4a 100644
--- a/mysql-test/suite/rpl/r/rpl_change_master_demote.result
+++ b/mysql-test/suite/rpl/r/rpl_change_master_demote.result
@@ -683,6 +683,23 @@ connection master;
CHANGE MASTER TO master_host='127.0.0.1', master_port=SLAVE_PORT, master_user='root', master_use_gtid=Slave_Pos, master_demote_to_slave=invalid;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'invalid' at line 1
#
+# MDEV-31768
+# Ensure MASTER_DEMOTE_TO_REPLICA aliases MASTER_DEMOTE_TO_SLAVE
+#
+connection slave;
+RESET MASTER;
+include/reset_slave.inc
+CREATE TABLE t_mdev_31768 (a int);
+CHANGE MASTER TO master_use_gtid=Replica_Pos, master_demote_to_replica=1;
+# Validating alias MASTER_DEMOTE_TO_REPLICA provides intended behavior..
+# ..success
+DROP TABLE t_mdev_31768;
+RESET MASTER;
+include/reset_slave.inc
+# Clear primary binlog state to match replica
+connection master;
+RESET MASTER;
+#
# Cleanup
#
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result
index 5250c4bb..9d3b2ccd 100644
--- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result
@@ -11,6 +11,7 @@ SELECT * FROM t1;
i
1
connection slave;
+include/save_master_gtid.inc
connection slave;
call mtr.add_suppression("Slave I/O: Relay log write failure: could not queue event from master.*");
# Case 0 : Start slave with IGNORE_DOMAIN_IDS=(), then restart
@@ -24,6 +25,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) :
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) :
SET @saved_dbug = @@GLOBAL.debug_dbug;
@@ -33,6 +35,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
COMMIT;
+include/save_master_gtid.inc
SELECT * FROM t1;
i
1
@@ -46,6 +49,7 @@ i
SET @@global.debug_dbug=@saved_dbug;
START SLAVE io_thread;
include/wait_for_slave_io_to_start.inc
+include/sync_with_master_gtid.inc
SELECT * FROM t1;
i
1
@@ -59,6 +63,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) :
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) : 1
SET @@global.debug_dbug="d,kill_slave_io_before_commit";
@@ -67,6 +72,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(4);
INSERT INTO t1 VALUES(5);
COMMIT;
+include/save_master_gtid.inc
SELECT * FROM t1;
i
1
@@ -84,6 +90,7 @@ i
SET @@global.debug_dbug=@saved_dbug;
START SLAVE io_thread;
include/wait_for_slave_io_to_start.inc
+include/sync_with_master_gtid.inc
SELECT * FROM t1;
i
1
@@ -97,6 +104,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) : 1
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) :
SET @@global.debug_dbug="d,kill_slave_io_before_commit";
@@ -114,6 +122,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(10);
INSERT INTO t1 VALUES(11);
COMMIT;
+include/save_master_gtid.inc
SELECT * FROM t1;
i
1
@@ -140,6 +149,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) :
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) : 1
SELECT * FROM t1;
@@ -157,6 +167,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) : 1
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) : 1
SET @@global.debug_dbug="d,kill_slave_io_before_commit";
@@ -166,6 +177,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(12);
INSERT INTO t1 VALUES(13);
COMMIT;
+include/save_master_gtid.inc
START TRANSACTION;
INSERT INTO t1 VALUES(14);
INSERT INTO t1 VALUES(15);
@@ -204,11 +216,16 @@ i
10
11
SET @@global.debug_dbug=@saved_dbug;
+include/sync_with_master_gtid.inc
include/stop_slave_sql.inc
DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) : 1
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
+connection master;
+include/save_master_gtid.inc
+connection slave;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) :
SELECT * FROM t1;
@@ -230,6 +247,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) :
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) : 1
SET @@global.debug_dbug="d,kill_slave_io_after_2_events";
@@ -239,6 +257,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(18);
INSERT INTO t1 VALUES(19);
COMMIT;
+include/save_master_gtid.inc
START TRANSACTION;
INSERT INTO t1 VALUES(20);
INSERT INTO t1 VALUES(21);
@@ -287,11 +306,16 @@ i
16
17
SET @@global.debug_dbug=@saved_dbug;
+include/sync_with_master_gtid.inc
include/stop_slave_sql.inc
DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) : 1
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
+connection master;
+include/save_master_gtid.inc
+connection slave;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) :
SELECT * FROM t1;
@@ -317,6 +341,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) :
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) :
SET @@global.debug_dbug="d,kill_slave_io_after_2_events";
@@ -335,6 +360,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(28);
INSERT INTO t1 VALUES(29);
COMMIT;
+include/save_master_gtid.inc
SELECT * FROM t1;
i
1
@@ -389,6 +415,7 @@ DO_DOMAIN_IDS (BEFORE) :
IGNORE_DOMAIN_IDS (BEFORE) :
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
include/start_slave.inc
+include/sync_with_master_gtid.inc
DO_DOMAIN_IDS (AFTER) :
IGNORE_DOMAIN_IDS (AFTER) : 1
SELECT * FROM t1;
diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result
index a54ff99b..cd13590b 100644
--- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result
@@ -1,9 +1,6 @@
include/master-slave.inc
[connection master]
connection master;
-call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired");
-call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'");
-call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly");
SET @@session.gtid_domain_id= 0;
create table ti (a int auto_increment primary key) engine=innodb;
create table tm (a int auto_increment primary key) engine=myisam;
diff --git a/mysql-test/suite/rpl/r/rpl_domain_id_filter_restart.result b/mysql-test/suite/rpl/r/rpl_domain_id_filter_restart.result
index f6eff3f9..948b4f48 100644
--- a/mysql-test/suite/rpl/r/rpl_domain_id_filter_restart.result
+++ b/mysql-test/suite/rpl/r/rpl_domain_id_filter_restart.result
@@ -21,8 +21,9 @@ INSERT INTO t2 VALUES(1);
SELECT * FROM t2;
i
1
+include/save_master_gtid.inc
connection slave;
-connection slave;
+include/sync_with_master_gtid.inc
SELECT * FROM t1;
i
1
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
index be98b7e3..145b269a 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
@@ -657,7 +657,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-103. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -697,7 +697,7 @@ Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default databas
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t15 ***
DROP TABLE t15;
@@ -716,7 +716,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
@@ -756,7 +756,7 @@ Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Defau
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t16 ***
DROP TABLE t16;
@@ -775,7 +775,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-108. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='InnoDB';
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
index 53b20b18..dae497d5 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
@@ -657,7 +657,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-103. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t15 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -697,7 +697,7 @@ Last_SQL_Error = 'Error 'Unknown column 'c7' in 't15'' on query. Default databas
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-104. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t15 ***
DROP TABLE t15;
@@ -716,7 +716,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-105. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t16 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
@@ -756,7 +756,7 @@ Last_SQL_Error = 'Error 'Key column 'c6' doesn't exist in table' on query. Defau
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-106. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
*** Drop t16 ***
DROP TABLE t16;
@@ -775,7 +775,7 @@ START SLAVE;
STOP SLAVE;
include/reset_slave.inc
Warnings:
-Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-107. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
+Warning 1948 Specified value for @@gtid_slave_pos contains no value for replication domain 0. This conflicts with the binary log which contains GTID 0-2-108. If MASTER_GTID_POS=CURRENT_POS is used, the binlog position will override the new value of @@gtid_slave_pos
CREATE TABLE t17 (c1 INT PRIMARY KEY, c4 BLOB, c5 CHAR(5)
) ENGINE='MyISAM';
diff --git a/mysql-test/suite/rpl/r/rpl_get_lock.result b/mysql-test/suite/rpl/r/rpl_get_lock.result
index b852546e..cbb02a32 100644
--- a/mysql-test/suite/rpl/r/rpl_get_lock.result
+++ b/mysql-test/suite/rpl/r/rpl_get_lock.result
@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
-CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+SET GLOBAL LOG_WARNINGS=4;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
disconnect master;
@@ -35,4 +35,5 @@ NULL
connection master1;
drop table t1;
connection slave;
+connection default;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_basic.result b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
index a7da7010..afc700a7 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_basic.result
@@ -69,8 +69,6 @@ INSERT INTO t2 VALUES (5, "i1a");
connection server_4;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
SELECT * FROM t1 ORDER BY a;
a b
@@ -91,8 +89,6 @@ connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4,
MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
connection server_4;
UPDATE t2 SET b="j1a" WHERE a=5;
@@ -121,8 +117,6 @@ include/save_master_gtid.inc
connection server_3;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_4,
MASTER_USE_GTID=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
include/sync_with_master_gtid.inc
SELECT * FROM t2 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
index 179461ad..c47beacf 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
@@ -4,6 +4,7 @@ connection server_1;
call mtr.add_suppression("Checking table:");
call mtr.add_suppression("client is using or hasn't closed the table properly");
call mtr.add_suppression("Table .* is marked as crashed and should be repaired");
+call mtr.add_suppression("Could not read packet:.* errno: 11");
flush tables;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result
index a7cb710c..4c35d42d 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result
@@ -75,8 +75,6 @@ INSERT INTO t1 VALUES (2);
SET sql_log_bin = 1;
INSERT INTO t1 VALUES (3);
CHANGE MASTER TO master_use_gtid=current_pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
BEGIN;
SET GLOBAL gtid_slave_pos = "100-100-100";
ERROR 25000: You are not allowed to execute this command in a transaction
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_grouping.result b/mysql-test/suite/rpl/r/rpl_gtid_grouping.result
index ad7d6116..1b4d86dd 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_grouping.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_grouping.result
@@ -50,5 +50,4 @@ CHANGE MASTER TO MASTER_USE_GTID=no;
include/start_slave.inc
connection master;
DROP TABLE t;
-SET GLOBAL LOG_WARNINGS=default;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_header_valid.result b/mysql-test/suite/rpl/r/rpl_gtid_header_valid.result
new file mode 100644
index 00000000..6731abc2
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_gtid_header_valid.result
@@ -0,0 +1,146 @@
+include/master-slave.inc
+[connection master]
+#
+# Initialize test data
+connection master;
+create table t1 (a int) engine=innodb;
+include/save_master_gtid.inc
+set @@SESSION.debug_dbug= "+d,binlog_force_commit_id";
+connection slave;
+set SQL_LOG_BIN= 0;
+call mtr.add_suppression('Found invalid event in binary log');
+call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
+set SQL_LOG_BIN= 1;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+include/start_slave.inc
+#
+# Test FL_PREPARED_XA
+connection master;
+set @@SESSION.debug_dbug= "+d,negate_xid_from_gtid";
+set @commit_id= 100;
+XA START 'x1';
+insert into t1 values (1);
+XA END 'x1';
+XA PREPARE 'x1';
+set @@SESSION.debug_dbug= "-d,negate_xid_from_gtid";
+XA COMMIT 'x1';
+include/save_master_gtid.inc
+# Waiting for slave to find invalid event..
+connection slave;
+include/wait_for_slave_sql_error.inc [errno=1594]
+STOP SLAVE IO_THREAD;
+# Reset master binlogs (as there is an invalid event) and slave state
+connection master;
+RESET MASTER;
+connection slave;
+RESET MASTER;
+RESET SLAVE;
+set @@global.gtid_slave_pos="";
+include/start_slave.inc
+#
+# Test FL_COMPLETED_XA
+connection master;
+set @commit_id= 101;
+XA START 'x1';
+insert into t1 values (2);
+XA END 'x1';
+XA PREPARE 'x1';
+set @@SESSION.debug_dbug= "+d,negate_xid_from_gtid";
+XA COMMIT 'x1';
+set @@SESSION.debug_dbug= "-d,negate_xid_from_gtid";
+include/save_master_gtid.inc
+# Waiting for slave to find invalid event..
+connection slave;
+include/wait_for_slave_sql_error.inc [errno=1594]
+STOP SLAVE IO_THREAD;
+# Cleanup hanging XA PREPARE on slave
+set statement SQL_LOG_BIN=0 for XA COMMIT 'x1';
+# Reset master binlogs (as there is an invalid event) and slave state
+connection master;
+RESET MASTER;
+connection slave;
+RESET MASTER;
+RESET SLAVE;
+set @@global.gtid_slave_pos="";
+include/start_slave.inc
+#
+# Test Missing xid.data (but has format id and length description parts)
+connection master;
+set @commit_id= 101;
+XA START 'x1';
+insert into t1 values (1);
+XA END 'x1';
+XA PREPARE 'x1';
+set @@SESSION.debug_dbug= "+d,negate_xid_data_from_gtid";
+XA COMMIT 'x1';
+set @@SESSION.debug_dbug= "-d,negate_xid_data_from_gtid";
+include/save_master_gtid.inc
+# Waiting for slave to find invalid event..
+connection slave;
+include/wait_for_slave_sql_error.inc [errno=1594]
+STOP SLAVE IO_THREAD;
+# Cleanup hanging XA PREPARE on slave
+set statement SQL_LOG_BIN=0 for XA COMMIT 'x1';
+# Reset master binlogs (as there is an invalid event) and slave state
+connection master;
+RESET MASTER;
+connection slave;
+RESET MASTER;
+RESET SLAVE;
+set @@global.gtid_slave_pos="";
+include/start_slave.inc
+#
+# Test FL_EXTRA_MULTI_ENGINE
+connection master;
+set @old_dbug= @@SESSION.debug_dbug;
+set @@SESSION.debug_dbug= "+d,inject_fl_extra_multi_engine_into_gtid";
+set @commit_id= 102;
+insert into t1 values (3);
+include/save_master_gtid.inc
+set @@SESSION.debug_dbug=@old_dbug;
+connection slave;
+# Waiting for slave to find invalid event..
+include/wait_for_slave_sql_error.inc [errno=1594]
+STOP SLAVE IO_THREAD;
+# Reset master binlogs (as there is an invalid event) and slave state
+connection master;
+RESET MASTER;
+connection slave;
+RESET SLAVE;
+RESET MASTER;
+set @@global.gtid_slave_pos="";
+include/start_slave.inc
+#
+# Test FL_COMMIT_ALTER
+connection master;
+set @old_dbug= @@SESSION.debug_dbug;
+set @@SESSION.debug_dbug= "+d,negate_alter_fl_from_gtid";
+set @old_alter_tp= @@SESSION.binlog_alter_two_phase;
+set @@SESSION.binlog_alter_two_phase= 1;
+alter table t1 add column (nc int);
+include/save_master_gtid.inc
+set @@SESSION.debug_dbug=@old_dbug;
+set @@SESSION.binlog_alter_two_phase=@old_alter_tp;
+connection slave;
+# Waiting for slave to find invalid event..
+include/wait_for_slave_sql_error.inc [errno=1594]
+STOP SLAVE IO_THREAD;
+# Reset master binlogs (as there is an invalid event) and slave state
+connection master;
+RESET MASTER;
+connection slave;
+SET STATEMENT sql_log_bin=0 FOR alter table t1 add column (nc int);
+RESET SLAVE;
+RESET MASTER;
+set @@global.gtid_slave_pos="";
+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
+# End of rpl_gtid_header_valid.test
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
index cea5aaae..665fc536 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4820.result
@@ -45,8 +45,6 @@ SET GLOBAL gtid_slave_pos= '0-2-10';
connection server_1;
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_2,
master_user= 'root', master_use_gtid=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
START SLAVE;
connection server_2;
INSERT INTO t1 VALUES (11);
@@ -76,8 +74,6 @@ connection server_2;
INSERT INTO t1 VALUES (22);
CHANGE MASTER TO master_host = '127.0.0.1', master_port = SERVER_MYPORT_1,
master_user= 'root', master_use_gtid=CURRENT_POS;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
START SLAVE;
SET sql_log_bin= 0;
CALL mtr.add_suppression("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");
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 ae0050c3..e8633cd4 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result
@@ -111,6 +111,10 @@ a
6
7
*** MDEV-4486: Allow to start old-style replication even if mysql.gtid_slave_pos is unavailable
+connection server_1;
+INSERT INTO t1 VALUES (8);
+DELETE FROM t1 WHERE a=8;
+connection server_2;
connection server_2;
include/stop_slave.inc
CHANGE MASTER TO master_use_gtid= no;
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result
index 2a578245..c9baf960 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result
@@ -1,8 +1,9 @@
-connect master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
-connect slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK;
+include/master-slave.inc
+[connection master]
connection master;
reset master;
connection slave;
+include/stop_slave.inc
set @restore_slave_net_timeout= @@global.slave_net_timeout;
set @@global.slave_net_timeout= 10;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
@@ -68,5 +69,5 @@ connection master;
drop table t1;
connection slave;
set @@global.slave_net_timeout= @restore_slave_net_timeout;
-include/stop_slave.inc
+include/rpl_end.inc
End of tests
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result b/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result
index dc45c0b9..a89010cd 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result
@@ -9,8 +9,6 @@ Variable_name Slave_heartbeat_period
Value 60.000
SET @saved_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
-CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
-CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
include/start_slave.inc
connection master;
drop table if exists t1;
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 9aa31a73..09edd288 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
@@ -55,7 +55,6 @@ 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_mdev33798.result b/mysql-test/suite/rpl/r/rpl_mdev33798.result
new file mode 100644
index 00000000..8796e948
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_mdev33798.result
@@ -0,0 +1,143 @@
+include/rpl_init.inc [topology=1->2,1->3]
+connect server_2b,127.0.0.1,root,,,$SERVER_MYPORT_2;
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+SET @old_timeout= @@GLOBAL.lock_wait_timeout;
+SET @old_innodb_timeout= @@GLOBAL.innodb_lock_wait_timeout;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=5;
+set global slave_parallel_mode= aggressive;
+SET GLOBAL lock_wait_timeout= 86400;
+SET GLOBAL innodb_lock_wait_timeout= 86400;
+SET STATEMENT sql_log_bin=0 FOR ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+include/start_slave.inc
+connection server_1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0);
+connection server_2;
+include/stop_slave.inc
+connection server_2b;
+BEGIN;
+SELECT * FROM t1 WHERE a=1 FOR UPDATE;
+a b
+1 0
+SELECT * FROM t1 WHERE a=5 FOR UPDATE;
+a b
+5 0
+connection server_1;
+SET SESSION gtid_domain_id= 1;
+BEGIN;
+UPDATE t1 SET b=1 WHERE a=1;
+UPDATE t1 SET b=1 WHERE a=7;
+COMMIT;
+UPDATE t1 SET b=2 WHERE a=3;
+SET SESSION gtid_domain_id=2;
+BEGIN;
+UPDATE t1 SET b=3 WHERE a=5;
+UPDATE t1 SET b=3 WHERE a=3;
+COMMIT;
+UPDATE t1 SET b=4 WHERE a=7;
+SET SESSION gtid_domain_id= 0;
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+connection server_2b;
+ROLLBACK;
+connection server_2;
+include/sync_with_master_gtid.inc
+SELECT a, (
+(a=1 AND b=1) OR
+(a=3 AND (b=2 OR b=3)) OR
+(a=5 AND b=3) OR
+(a=7 AND (b=1 OR b=4)) OR
+((a MOD 2)=0 AND b=0)) AS `ok`
+ FROM t1
+ORDER BY a;
+a ok
+1 1
+2 1
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+connection server_3;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+connection server_2;
+include/stop_slave.inc
+CHANGE MASTER 'm2' to master_port=MYPORT_3 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+connection server_1;
+SET SESSION gtid_domain_id= 1;
+BEGIN;
+UPDATE t1 SET b=11 WHERE a=1;
+UPDATE t1 SET b=11 WHERE a=7;
+COMMIT;
+UPDATE t1 SET b=12 WHERE a=3;
+SET SESSION gtid_domain_id= 1;
+connection server_3;
+SET SESSION gtid_domain_id=3;
+BEGIN;
+UPDATE t1 SET b=13 WHERE a=5;
+UPDATE t1 SET b=13 WHERE a=3;
+COMMIT;
+UPDATE t1 SET b=14 WHERE a=7;
+include/save_master_gtid.inc
+connection server_2b;
+BEGIN;
+SELECT * FROM t1 WHERE a=1 FOR UPDATE;
+a b
+1 1
+SELECT * FROM t1 WHERE a=5 FOR UPDATE;
+a b
+5 3
+START ALL SLAVES;
+Warnings:
+Note 1937 SLAVE 'm2' started
+Note 1937 SLAVE '' started
+connection server_2b;
+ROLLBACK;
+connection server_1;
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+connection server_3;
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+SELECT a, (
+(a=1 AND b=11) OR
+(a=3 AND (b=12 OR b=13)) OR
+(a=5 AND b=13) OR
+(a=7 AND (b=11 OR b=14)) OR
+((a MOD 2)=0 AND b=0)) AS `ok`
+ FROM t1
+ORDER BY a;
+a ok
+1 1
+2 1
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+SET default_master_connection = 'm2';
+include/stop_slave.inc
+RESET SLAVE 'm2' ALL;
+SET default_master_connection = '';
+connection server_3;
+include/start_slave.inc
+disconnect server_2b;
+connection server_1;
+DROP TABLE t1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+set global slave_parallel_mode= @old_parallel_mode;
+SET GLOBAL lock_wait_timeout= @old_timeout;
+SET GLOBAL innodb_lock_wait_timeout= @old_innodb_timeout;
+include/start_slave.inc
+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
index 1172d8e3..740d1ddf 100644
--- a/mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result
+++ b/mysql-test/suite/rpl/r/rpl_mysql_manager_race_condition.result
@@ -17,6 +17,36 @@ include/sync_with_master_gtid.inc
include/rpl_restart_server.inc [server_number=2 parameters: --debug_dbug="+d,delay_start_handle_manager"]
include/start_slave.inc
#
+# MDEV-33799
+# Ensure that when the binary log is used for recovery (as tc log), that
+# the recovery process cannot start the binlog background thread before
+# the mysql handle manager has started.
+connection slave;
+# Add test suppresssions so crash recovery messages don't fail the test
+set session sql_log_bin=0;
+call mtr.add_suppression("mariadbd: Got error '145.*");
+call mtr.add_suppression("Checking table:.*");
+call mtr.add_suppression("mysql.gtid_slave_pos:.*hasn't closed the table properly");
+call mtr.add_suppression("Can't init tc log");
+call mtr.add_suppression("Aborting");
+set session sql_log_bin=1;
+# Create slave-side only table
+create table t2 (a int) engine=innodb;
+# Crash mariadbd when binlogging transaction to corrupt database state
+connection slave1;
+set @@session.debug_dbug="+d,crash_before_writing_xid";
+insert into t2 values (1);
+connection slave;
+connection slave1;
+Got one of the listed errors
+# Restart mariadbd in recovery mode. Note --tc-heuristic-recover
+# forces mysqld to exit with error, so we run mariadbd via CLI
+# MYSQLD_LAST_CMD --debug_dbug="+d,delay_start_handle_manager" --tc-heuristic-recover=COMMIT
+connection server_2;
+connection slave1;
+connection slave;
+include/start_slave.inc
+#
# Cleanup
#
connection master;
@@ -24,4 +54,5 @@ drop table t1;
include/save_master_gtid.inc
connection slave;
include/sync_with_master_gtid.inc
+drop table t2;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result
index 4a2a5d70..bb626960 100644
--- a/mysql-test/suite/rpl/r/rpl_packet.result
+++ b/mysql-test/suite/rpl/r/rpl_packet.result
@@ -2,6 +2,8 @@ include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
+call mtr.add_suppression("Could not write packet:");
+call mtr.add_suppression("Got a packet bigger than 'max_allowed_packet' bytes");
drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_multi_domain_xa.result b/mysql-test/suite/rpl/r/rpl_parallel_multi_domain_xa.result
new file mode 100644
index 00000000..1993d098
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_multi_domain_xa.result
@@ -0,0 +1,58 @@
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+connection master;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+connection slave;
+include/stop_slave.inc
+SET @old_transaction_retries = @@GLOBAL.slave_transaction_retries;
+SET @@global.slave_transaction_retries = 1000;
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+SET @old_slave_domain_parallel_threads = @@GLOBAL.slave_domain_parallel_threads;
+SET @@global.slave_parallel_threads = 5;
+SET @@global.slave_domain_parallel_threads = 3;
+SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
+CHANGE MASTER TO master_use_gtid=slave_pos;
+connection master;
+CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0);
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET @@global.slave_parallel_mode ='optimistic';
+connection master;
+include/save_master_gtid.inc
+connection slave;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+connection master;
+include/save_master_gtid.inc
+connection slave;
+SET @@global.slave_parallel_mode ='conservative';
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+include/save_master_gtid.inc
+connection slave;
+SET @@global.slave_parallel_mode = 'optimistic';
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+include/diff_tables.inc [master:t1, slave:t1]
+connection slave;
+include/stop_slave.inc
+SET @@global.slave_parallel_mode = @old_parallel_mode;
+SET @@global.slave_parallel_threads = @old_parallel_threads;
+SET @@global.slave_domain_parallel_threads = @old_slave_domain_parallel_threads;
+SET @@global.slave_transaction_retries = @old_transaction_retries;
+include/start_slave.inc
+connection master;
+DROP TABLE t1;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+connection master;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
index eff93951..0b317c46 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result
@@ -626,6 +626,7 @@ include/save_master_gtid.inc
connection server_2;
include/sync_with_master_gtid.inc
connection server_2;
+SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
set global log_warnings=2;
BEGIN;
INSERT INTO t1 SET a=1;
@@ -651,7 +652,7 @@ connection server_2;
include/sync_with_master_gtid.inc
connection server_2;
include/stop_slave.inc
-set global log_warnings=default;
+set global log_warnings=@org_log_warnings;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result
index 4136f188..90c3e5db 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa.result
@@ -32,7 +32,6 @@ include/diff_tables.inc [master:t0, slave:t0]
include/diff_tables.inc [master:t1, slave:t1]
connection slave;
include/stop_slave.inc
-set global log_warnings=default;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result
index 4136f188..90c3e5db 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic_xa_lsu_off.result
@@ -32,7 +32,6 @@ include/diff_tables.inc [master:t0, slave:t0]
include/diff_tables.inc [master:t1, slave:t1]
connection slave;
include/stop_slave.inc
-set global log_warnings=default;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
include/start_slave.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_retry.result b/mysql-test/suite/rpl/r/rpl_parallel_retry.result
index 2cc4044a..4c7effd7 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_retry.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_retry.result
@@ -339,6 +339,28 @@ connection server_1;
DROP TABLE t1, t2, t3, t4;
DROP function foo;
connection server_2;
+connection server_2;
+include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=4;
+connection server_1;
+CREATE TABLE t1 (a INT, b VARCHAR(123)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 'asdf');
+UPDATE t1 SET b='zxf1' WHERE a=1;
+UPDATE t1 SET b='\n' WHERE a=1;
+connection server_2;
+SET @old_dbug=@@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,write_row_inject_sleep_before_ha_write_row";
+include/start_slave.inc
+connection server_1;
+connection server_2;
+connection server_1;
+DROP TABLE t1;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+include/start_slave.inc
connection server_1;
CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES(100, 100);
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_sbm.result b/mysql-test/suite/rpl/r/rpl_parallel_sbm.result
index 7990a663..75012c93 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_sbm.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_sbm.result
@@ -27,12 +27,19 @@ connection slave;
# delaying a transaction; then when the reciprocal START SLAVE occurs,
# if the event is still to be delayed, SBM should resume accordingly
include/stop_slave.inc
+# Lock t1 on slave to ensure the event can't finish (and thereby update
+# Seconds_Behind_Master) so slow running servers don't accidentally
+# catch up to the master before checking SBM.
+connection server_2;
+LOCK TABLES t1 WRITE;
include/start_slave.inc
connection slave;
-# Waiting for replica to resume the delay for the transaction
+# Waiting for replica to get blocked by the table lock
# Sleeping 1s to increment SBM
# Ensuring Seconds_Behind_Master increases after sleeping..
# ..done
+connection server_2;
+UNLOCK TABLES;
include/sync_with_master_gtid.inc
#
# Pt 2) If the worker threads have not entered an idle state, ensure
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_seq.result b/mysql-test/suite/rpl/r/rpl_parallel_seq.result
index 8f55f52e..02287d54 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_seq.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_seq.result
@@ -127,4 +127,14 @@ CREATE SEQUENCE s4;
DROP SEQUENCE s2,s3,s4;
DROP TABLE ti;
connection slave;
+connection master;
+CREATE SEQUENCE s;
+SELECT NEXTVAL(s);
+NEXTVAL(s)
+1
+flush binary logs;
+DROP SEQUENCE s;
+DROP SEQUENCE s;
+connection slave;
+connection master;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result b/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result
index ba131ea0..6b75dbf6 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_slave_bgc_kill.result
@@ -206,10 +206,12 @@ RETURN x;
END
||
SET sql_log_bin=1;
+include/stop_slave_io.inc
connection server_1;
INSERT INTO t3 VALUES (49,0);
connection server_2;
-START SLAVE SQL_THREAD;
+CHANGE MASTER TO master_use_gtid=no;
+include/start_slave.inc
SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
a b
41 41
@@ -239,10 +241,6 @@ SET GLOBAL slave_parallel_threads=0;
SET GLOBAL slave_parallel_threads=10;
include/start_slave.inc
*** 3. Same as (2), but not using gtid mode ***
-connection server_2;
-include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
-include/start_slave.inc
connection server_1;
connection con_temp3;
SET debug_sync='commit_after_release_LOCK_prepare_ordered SIGNAL master_queued1 WAIT_FOR master_cont1';
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result b/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
index 0c810d2a..b0a4fa59 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_stop_slave.result
@@ -37,7 +37,9 @@ connection con_temp1;
BEGIN;
INSERT INTO t2 VALUES (21);
connection server_2;
-START SLAVE;
+START SLAVE IO_THREAD;
+include/wait_for_slave_param.inc [Read_Master_Log_Pos]
+START SLAVE SQL_THREAD;
connection con_temp2;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,rpl_parallel_wait_for_done_trigger";
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_temptable.result b/mysql-test/suite/rpl/r/rpl_parallel_temptable.result
index e9bff03b..0f7af253 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel_temptable.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel_temptable.result
@@ -202,6 +202,24 @@ a b
include/stop_slave.inc
SET GLOBAL slave_parallel_mode=@old_mode;
include/start_slave.inc
+*** MDEV33426: Memory allocation accounting incorrect for replicated temptable
+connection server_1;
+CREATE TEMPORARY TABLE t5 (a int) ENGINE=Aria;
+CREATE TEMPORARY TABLE t6 (a int) ENGINE=Heap;
+INSERT INTO t5 VALUES (1);
+INSERT INTO t6 VALUES (2);
+connection server_2;
+include/stop_slave.inc
+connection server_1;
+INSERT INTO t1 SELECT a+40, 5 FROM t5;
+INSERT INTO t1 SELECT a+40, 6 FROM t6;
+DROP TABLE t5, t6;
+connection server_2;
+include/start_slave.inc
+SELECT * FROM t1 WHERE a>=40 ORDER BY a;
+a b
+41 5
+42 6
connection server_2;
include/stop_slave.inc
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
diff --git a/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result b/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result
index 27cb29d3..4ace84ff 100644
--- a/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result
+++ b/mysql-test/suite/rpl/r/rpl_perfschema_connect_config.result
@@ -87,8 +87,6 @@ include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be
change master to
master_user = 'root',
master_use_gtid= CURRENT_POS;
-Warnings:
-Warning #### 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/assert.inc [Value returned by SSS and PS table for Using_Gtid should be same.]
# 3) Test for Auto_position= SLAVE_POS
diff --git a/mysql-test/suite/rpl/r/rpl_rewrite_db_sys_vars.result b/mysql-test/suite/rpl/r/rpl_rewrite_db_sys_vars.result
index 5720f647..1734b200 100644
--- a/mysql-test/suite/rpl/r/rpl_rewrite_db_sys_vars.result
+++ b/mysql-test/suite/rpl/r/rpl_rewrite_db_sys_vars.result
@@ -12,11 +12,9 @@ select @@session.server_id;
create database replica_db1;
create database y;
create database test_replica;
-SELECT @@GLOBAL.replicate_rewrite_db;
-@@GLOBAL.replicate_rewrite_db
-primary_db1->replica_db1,x->y
-# Ensuring SHOW SLAVE STATUS produces correct value for Replicate_Rewrite_DB...
-# ...success
+SELECT @@GLOBAL.replicate_rewrite_db, 'primary_db1->replica_db1,x->y' as 'Replicate_Rewrite_DB from SHOW SLAVE STATUS';
+@@GLOBAL.replicate_rewrite_db Replicate_Rewrite_DB from SHOW SLAVE STATUS
+primary_db1->replica_db1,x->y primary_db1->replica_db1,x->y
# Create DBs and tables on primary
connection master;
create database primary_db1;
@@ -60,15 +58,13 @@ SELECT @@GLOBAL.replicate_rewrite_db;
@@GLOBAL.replicate_rewrite_db
primary_db1->replica_db1,x->y
SET @@GLOBAL.replicate_rewrite_db="test_master->test_replica";
-SELECT @@GLOBAL.replicate_rewrite_db;
-@@GLOBAL.replicate_rewrite_db
-test_master->test_replica
SHOW DATABASES like 'test_replica';
Database (test_replica)
test_replica
include/start_slave.inc
-# Ensuring SHOW SLAVE STATUS produces correct value for Replicate_Rewrite_DB...
-# ...success
+SELECT @@GLOBAL.replicate_rewrite_db, 'test_master->test_replica' as 'Replicate_Rewrite_DB from SHOW SLAVE STATUS';
+@@GLOBAL.replicate_rewrite_db Replicate_Rewrite_DB from SHOW SLAVE STATUS
+test_master->test_replica test_master->test_replica
# Create DB and tables on primary
connection master;
create database test_master;
@@ -94,6 +90,8 @@ t
3
include/diff_tables.inc [master:test_master.my_table,slave:test_replica.my_table]
# Update of values on primary for DB not set in replication_rewrite_db
+include/stop_slave.inc
+include/reset_slave.inc
connection master;
use x;
insert into my_table values (314);
@@ -104,8 +102,6 @@ t
314
include/save_master_gtid.inc
connection slave;
-include/stop_slave.inc
-include/reset_slave.inc
include/start_slave.inc
SELECT @@GLOBAL.replicate_rewrite_db;
@@GLOBAL.replicate_rewrite_db
diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result
index f1a0059a..c2bb256a 100644
--- a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result
+++ b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result
@@ -20,6 +20,5 @@ FOUND 1 /The slave is applying a ROW event on behalf of an UPDATE statement on t
FOUND 1 /The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/ in mysqld.2.err
include/stop_slave.inc
SET @@GLOBAL.debug_dbug = @saved_dbug;
-SET GLOBAL log_warnings = 2;
include/start_slave.inc
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result b/mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result
new file mode 100644
index 00000000..08f60144
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_cond_var_per_thd.result
@@ -0,0 +1,32 @@
+include/master-slave.inc
+[connection master]
+connection master;
+call mtr.add_suppression("Got an error reading communication packets");
+set @save_bgc_count= @@global.binlog_commit_wait_count;
+set @save_bgc_usec= @@global.binlog_commit_wait_usec;
+set @save_debug_dbug= @@global.debug_dbug;
+set @@global.binlog_commit_wait_count=3;
+set @@global.binlog_commit_wait_usec=10000000;
+set @@global.debug_dbug="+d,testing_cond_var_per_thd";
+# Ensure semi-sync is on
+connection slave;
+connection master;
+# Create three transactions to binlog group commit together
+connection master;
+create table t1 (a int);
+connection server_1;
+create table t2 (a int);
+connection default;
+create table t3 (a int);
+connection master;
+connection server_1;
+connection default;
+include/assert_grep.inc [Check that there is no 'Thread awaiting semi-sync ACK was awoken before its ACK' warning in error log.]
+#
+# Cleanup
+connection master;
+set @@global.binlog_commit_wait_count=@save_bgc_count;
+set @@global.binlog_commit_wait_usec=@save_bgc_usec;
+set @@global.debug_dbug=@save_debug_dbug;
+drop table t1, t2, t3;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_fail_over.result b/mysql-test/suite/rpl/r/rpl_semi_sync_fail_over.result
index 1c94c239..49fdb485 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_fail_over.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_fail_over.result
@@ -44,13 +44,19 @@ SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
connection server_2;
include/wait_for_slave_param.inc [Slave_SQL_Running_State]
include/stop_slave.inc
-include/assert.inc [Table t1 should have 2 rows.]
+select count(*) 'on slave must be 2' from t1;
+on slave must be 2
+2
SELECT @@GLOBAL.gtid_current_pos;
@@GLOBAL.gtid_current_pos
0-1-4
# restart: --skip-slave-start=1 --rpl-semi-sync-slave-enabled=1
connection server_1;
-include/assert.inc [Table t1 should have 1 rows.]
+# Ensuring variable rpl_semi_sync_slave_enabled is ON..
+# Ensuring status rpl_semi_sync_slave_status is OFF..
+select count(*) 'on master must be 1' from t1;
+on master must be 1
+1
FOUND 1 /truncated binlog file:.*master.*000001/ in mysqld.1.err
disconnect conn_client;
connection server_2;
@@ -77,9 +83,9 @@ SHOW VARIABLES LIKE 'gtid_slave_pos';
Variable_name Value
gtid_slave_pos 0-1-4
connection server_1;
-SELECT COUNT(*) = 3 as 'true' FROM t1;
-true
-1
+SELECT COUNT(*) 'must be 3' FROM t1;
+must be 3
+3
# ... the gtid states on the slave:
SHOW VARIABLES LIKE 'gtid_slave_pos';
Variable_name Value
@@ -111,24 +117,32 @@ connection server_2;
#=================================================================
connect conn_client,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL con1_ready WAIT_FOR con1_go";
+SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync WAIT_FOR con1_go1";
SET STATEMENT server_id=1 FOR INSERT INTO t1 VALUES (4, REPEAT("x", 4100));
connect conn_client_2,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
-SET GLOBAL debug_dbug="d,Notify_binlog_EOF";
+SET DEBUG_SYNC= "commit_before_get_LOCK_after_binlog_sync SIGNAL con1_go";
+SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL con2_ready";
INSERT INTO t1 VALUES (5, REPEAT("x", 4100));
connection server_2;
-SET DEBUG_SYNC= "now WAIT_FOR eof_reached";
+SET DEBUG_SYNC= "now WAIT_FOR con2_ready";
# Kill the server
connection server_1;
include/wait_for_slave_param.inc [Slave_SQL_Running_State]
include/stop_slave.inc
-include/assert.inc [Table t1 should have 5 rows.]
+select count(*) 'on slave must be 5' from t1;
+on slave must be 5
+5
SELECT @@GLOBAL.gtid_current_pos;
@@GLOBAL.gtid_current_pos
0-2-7
# restart: --skip-slave-start=1 --rpl-semi-sync-slave-enabled=1
connection server_2;
-include/assert.inc [Table t1 should have 3 rows.]
+# Ensuring variable rpl_semi_sync_slave_enabled is ON..
+# Ensuring status rpl_semi_sync_slave_status is OFF..
+select count(*) 'on master must be 3' from t1;
+on master must be 3
+3
FOUND 1 /truncated binlog file:.*slave.*000002.* to remove transactions starting from GTID 0-1-6/ in mysqld.2.err
disconnect conn_client;
connection server_1;
@@ -155,9 +169,9 @@ SHOW VARIABLES LIKE 'gtid_slave_pos';
Variable_name Value
gtid_slave_pos 0-2-7
connection server_2;
-SELECT COUNT(*) = 6 as 'true' FROM t1;
-true
-1
+SELECT COUNT(*) 'must be 6 as' FROM t1;
+must be 6 as
+6
# ... the gtid states on the slave:
SHOW VARIABLES LIKE 'gtid_slave_pos';
Variable_name Value
@@ -201,13 +215,19 @@ SET DEBUG_SYNC= "now WAIT_FOR con3_ready";
connection server_2;
include/wait_for_slave_param.inc [Slave_SQL_Running_State]
include/stop_slave.inc
-include/assert.inc [Table t1 should have 7 rows.]
+select count(*) 'on slave must be 7' from t1;
+on slave must be 7
+7
SELECT @@GLOBAL.gtid_current_pos;
@@GLOBAL.gtid_current_pos
0-1-9
# restart: --skip-slave-start=1 --rpl-semi-sync-slave-enabled=1
connection server_1;
-include/assert.inc [Table t1 should have 6 rows.]
+# Ensuring variable rpl_semi_sync_slave_enabled is ON..
+# Ensuring status rpl_semi_sync_slave_status is OFF..
+select count(*) 'on master must be 6' from t1;
+on master must be 6
+6
FOUND 1 /truncated binlog file:.*master.*000002.* to remove transactions starting from GTID 0-1-9/ in mysqld.1.err
disconnect conn_client;
connection server_2;
@@ -236,9 +256,9 @@ Variable_name Value
gtid_slave_pos 0-1-9
connection server_1;
include/sync_with_master_gtid.inc
-SELECT COUNT(*) = 8 as 'true' FROM t1;
-true
-1
+SELECT COUNT(*) 'must be 8' FROM t1;
+must be 8
+8
# ... the gtid states on the slave:
SHOW VARIABLES LIKE 'gtid_slave_pos';
Variable_name Value
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result b/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result
index 6124ba01..8803b4c3 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result
@@ -4,7 +4,7 @@ connection master;
SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
connection slave;
include/stop_slave.inc
-SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc
connection master;
CREATE TABLE t1 (a INT);
@@ -21,7 +21,6 @@ connection slave;
include/wait_for_slave_sql_to_start.inc
include/wait_for_slave_io_to_start.inc
connection master;
-SET @@GLOBAL.debug_dbug="";
SET @@GLOBAL. rpl_semi_sync_master_enabled = 0;
connection master;
DROP TABLE t1;
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
index 394a7aca..3048b6b5 100644
--- 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
@@ -15,13 +15,17 @@ 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");
+set @sav_enabled_server_2= @@GLOBAL.rpl_semi_sync_slave_enabled;
+set @sav_server_2_dbug= @@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");
+set @sav_enabled_server_3= @@GLOBAL.rpl_semi_sync_slave_enabled;
+set @sav_server_3_dbug= @@GLOBAL.debug_dbug;
connection server_1;
-CREATE TABLE t1 (a int);
+CREATE TABLE t1 (a int) engine=innodb;
connection server_2;
connection server_3;
connect server_1_con2, localhost, root,,;
@@ -30,8 +34,8 @@ connect server_1_con2, localhost, root,,;
#############################
#
# 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).
+# allowed timeout, the primary should delay killing the Ack_thread
+# until an ACK is received.
#
connection server_1;
#--
@@ -40,15 +44,15 @@ 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
+set global rpl_semi_sync_slave_enabled = 1;
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
+set global rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc
show status like 'Rpl_semi_sync_slave_status';
Variable_name Value
@@ -67,35 +71,22 @@ 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_con2;
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;
+ERROR HY000: Lost connection to server during query
# 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
@@ -111,22 +102,19 @@ count(*)=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
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_2;
connection server_3;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_3;
#-- 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;
@@ -147,8 +135,8 @@ 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).
+# the primary should delay killing the Ack_thread until the
+# timeout is reached.
#
connection server_1;
#--
@@ -157,15 +145,15 @@ 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
+set global rpl_semi_sync_slave_enabled = 1;
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
+set global rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc
show status like 'Rpl_semi_sync_slave_status';
Variable_name Value
@@ -184,35 +172,22 @@ 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";
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141";
connection server_3;
-SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event";
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141";
#--
#-- Test begins
+connection server_1_con2;
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;
+ERROR HY000: Lost connection to server during query
# 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
@@ -226,24 +201,33 @@ count(*)=0
1
#
#-- Re-synchronize slaves with master and disable semi-sync
+#-- FIXME: workaround for MDEV-28141, preventing errored replicas from
+# killing their semi-sync connections
+connection server_2;
+set debug_sync= "now wait_for at_semisync_kill_connection";
+set debug_sync= "now signal continue_semisync_kill_connection";
+# Wait for debug_sync signal to have been received before issuing RESET
+set debug_sync= "reset";
+connection server_3;
+set debug_sync= "now wait_for at_semisync_kill_connection";
+set debug_sync= "now signal continue_semisync_kill_connection";
+# Wait for debug_sync signal to have been received before issuing RESET
+set debug_sync= "reset";
#-- Stop slaves
connection server_2;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_2;
connection server_3;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_3;
#-- 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;
@@ -265,8 +249,8 @@ COUNT(*)=0
#
# 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).
+# primary should delay killing the Ack_thread until it receives an
+# ACK from the delayed slave.
#
connection server_1;
#--
@@ -275,15 +259,15 @@ 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
+set global rpl_semi_sync_slave_enabled = 1;
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
+set global rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc
show status like 'Rpl_semi_sync_slave_status';
Variable_name Value
@@ -302,35 +286,22 @@ 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";
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141";
connection server_3;
SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
#--
#-- Test begins
+connection server_1_con2;
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;
+ERROR HY000: Lost connection to server during query
# 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
@@ -344,24 +315,28 @@ count(*)=1
1
#
#-- Re-synchronize slaves with master and disable semi-sync
+#-- FIXME: workaround for MDEV-28141, preventing errored replicas from
+# killing their semi-sync connections
+connection server_2;
+set debug_sync= "now wait_for at_semisync_kill_connection";
+set debug_sync= "now signal continue_semisync_kill_connection";
+# Wait for debug_sync signal to have been received before issuing RESET
+set debug_sync= "reset";
#-- Stop slaves
connection server_2;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_2;
connection server_3;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_3;
#-- 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;
@@ -389,8 +364,7 @@ COUNT(*)=0
# 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).
+# slave does not send a `QUIT` in this case.
#
connection server_1;
#--
@@ -399,15 +373,15 @@ 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
+set global rpl_semi_sync_slave_enabled = 1;
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
+set global rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc
show status like 'Rpl_semi_sync_slave_status';
Variable_name Value
@@ -426,35 +400,22 @@ 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";
+SET @@GLOBAL.debug_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141";
connection server_3;
SET @@GLOBAL.debug_dbug= "+d,simulate_delay_semisync_slave_reply";
#--
#-- Test begins
+connection server_1_con2;
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;
+ERROR HY000: Lost connection to server during query
# 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
@@ -468,24 +429,28 @@ count(*)=1
1
#
#-- Re-synchronize slaves with master and disable semi-sync
+#-- FIXME: workaround for MDEV-28141, preventing errored replicas from
+# killing their semi-sync connections
+connection server_2;
+set debug_sync= "now wait_for at_semisync_kill_connection";
+set debug_sync= "now signal continue_semisync_kill_connection";
+# Wait for debug_sync signal to have been received before issuing RESET
+set debug_sync= "reset";
#-- Stop slaves
connection server_2;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_2;
connection server_3;
-SET @@GLOBAL.debug_dbug= "";
-SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0;
-include/stop_slave.inc
+include/stop_slave_io.inc
+include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_3;
#-- 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;
@@ -504,14 +469,62 @@ Rpl_semi_sync_slave_status OFF
SELECT COUNT(*)=0 from t1;
COUNT(*)=0
1
+#
+# Test Case 5) If a waiting-for-ACK user thread is killed (disconnected)
+# during SHUTDOWN WAIT FOR ALL SLAVES, ensure the primary will still
+# await the ACK from the replica before killing the Ack_receiver thread
+#
+connection server_1;
+insert into t1 values (1);
+include/save_master_gtid.inc
+connection server_2;
+include/sync_with_master_gtid.inc
+include/stop_slave.inc
+SET GLOBAL rpl_semi_sync_slave_enabled= 1;
+include/start_slave.inc
+connection server_1;
+SET GLOBAL rpl_semi_sync_master_enabled= 1;
+SET GLOBAL rpl_semi_sync_master_timeout= 2000;
+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 1
+connection server_2;
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,simulate_delay_semisync_slave_reply";
+connect con1, localhost, root,,;
+connect con2, localhost, root,,;
+connection con1;
+insert into t1 values (2);
+connection server_1;
+# Wait for thd to begin semi-sync wait..
+# ..done
+disconnect con1;
+connection default;
+connection con2;
+SHUTDOWN WAIT FOR ALL SLAVES;
+# Ensure the primary waited for the ACK of the killed thread
+FOUND 5 /Delaying shutdown to await semi-sync ACK/ in mysqld.1.err
+connection default;
+connection server_1;
+connection server_2;
+include/stop_slave.inc
+connection server_3;
+include/stop_slave.inc
+connection default;
+connection server_1;
#############################
# Cleanup
#############################
connection server_2;
-include/stop_slave.inc
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_2;
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
include/start_slave.inc
connection server_3;
-include/stop_slave.inc
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_3;
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
include/start_slave.inc
connection server_1;
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_slave_enabled_consistent.result b/mysql-test/suite/rpl/r/rpl_semi_sync_slave_enabled_consistent.result
index 99c31249..4195acb9 100644
--- a/mysql-test/suite/rpl/r/rpl_semi_sync_slave_enabled_consistent.result
+++ b/mysql-test/suite/rpl/r/rpl_semi_sync_slave_enabled_consistent.result
@@ -2,6 +2,9 @@ include/master-slave.inc
[connection master]
call mtr.add_suppression("Replication event checksum verification failed");
call mtr.add_suppression("could not queue event from master");
+call mtr.add_suppression("Semisync ack receiver.*error reading communication packets");
+call mtr.add_suppression("Semisync ack receiver got hangup");
+connection slave;
#
# Set up a semisync connection
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_status.result b/mysql-test/suite/rpl/r/rpl_show_slave_status.result
new file mode 100644
index 00000000..e32b2f55
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_show_slave_status.result
@@ -0,0 +1,75 @@
+include/master-slave.inc
+[connection master]
+*
+* The purpose of this test is to prevent incorrect additions to SHOW
+* SLAVE STATUS, which has happened several times in the past.
+*
+* We must never, _ever_, add extra rows to this output of SHOW SLAVE
+* STATUS, except at the very end, as this breaks backwards compatibility
+* with applications or scripts that parse the output. This also means that
+* we cannot add _any_ new rows in a GA version if a different row was
+* already added in a later MariaDB version, as this would make it impossible
+* to merge the change up while preserving the order of rows.
+*
+connection slave;
+SHOW SLAVE STATUS;
+Slave_IO_State #
+Master_Host #
+Master_User #
+Master_Port #
+Connect_Retry #
+Master_Log_File #
+Read_Master_Log_Pos #
+Relay_Log_File #
+Relay_Log_Pos #
+Relay_Master_Log_File #
+Slave_IO_Running #
+Slave_SQL_Running #
+Replicate_Do_DB #
+Replicate_Ignore_DB #
+Replicate_Do_Table #
+Replicate_Ignore_Table #
+Replicate_Wild_Do_Table #
+Replicate_Wild_Ignore_Table #
+Last_Errno #
+Last_Error #
+Skip_Counter #
+Exec_Master_Log_Pos #
+Relay_Log_Space #
+Until_Condition #
+Until_Log_File #
+Until_Log_Pos #
+Master_SSL_Allowed #
+Master_SSL_CA_File #
+Master_SSL_CA_Path #
+Master_SSL_Cert #
+Master_SSL_Cipher #
+Master_SSL_Key #
+Seconds_Behind_Master #
+Master_SSL_Verify_Server_Cert #
+Last_IO_Errno #
+Last_IO_Error #
+Last_SQL_Errno #
+Last_SQL_Error #
+Replicate_Ignore_Server_Ids #
+Master_Server_Id #
+Master_SSL_Crl #
+Master_SSL_Crlpath #
+Using_Gtid #
+Gtid_IO_Pos #
+Replicate_Do_Domain_Ids #
+Replicate_Ignore_Domain_Ids #
+Parallel_Mode #
+SQL_Delay #
+SQL_Remaining_Delay #
+Slave_SQL_Running_State #
+Slave_DDL_Groups #
+Slave_Non_Transactional_Groups #
+Slave_Transactional_Groups #
+Replicate_Rewrite_DB #
+*
+* When modifying this test after adding a column to SHOW SLAVE STATUS,
+* _only_ additions at the end are allowed, the column number of existing
+* columns must _not_ change!
+*
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_shutdown_sighup.result b/mysql-test/suite/rpl/r/rpl_shutdown_sighup.result
new file mode 100644
index 00000000..01b35f1d
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_shutdown_sighup.result
@@ -0,0 +1,50 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+set statement sql_log_bin=0 for call mtr.add_suppression("Signal handler thread did not exit in a timely manner");
+#
+# Main test
+connection master;
+create table t1 (a int);
+insert into t1 values (1);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+set @@global.debug_dbug= "+d,hold_sighup_log_refresh";
+# Waiting for sighup to reach reload_acl_and_cache..
+set debug_sync="now wait_for in_reload_acl_and_cache";
+# Signalling signal handler to proceed to sleep before REFRESH_HOSTS
+set debug_sync="now signal refresh_logs";
+# Starting shutdown (note this will take 3+ seconds due to DBUG my_sleep in reload_acl_and_cache)
+shutdown;
+connection server_2;
+connection slave;
+include/assert_grep.inc [Ensure Mariadbd did not segfault when shutting down]
+connection master;
+connection slave;
+#
+# Error testcase to ensure an error message is shown if the signal
+# takes longer than the timeout while processing the SIGHUP
+connection slave;
+set @@global.debug_dbug= "+d,force_sighup_processing_timeout";
+set @@global.debug_dbug= "+d,hold_sighup_log_refresh";
+connection master;
+insert into t1 values (1);
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+# Waiting for sighup to reach reload_acl_and_cache..
+set debug_sync="now wait_for in_reload_acl_and_cache";
+# Signalling signal handler to proceed to sleep before REFRESH_HOSTS
+set debug_sync="now signal refresh_logs";
+# Starting shutdown (note this will take 3+ seconds due to DBUG my_sleep in reload_acl_and_cache)
+shutdown;
+connection server_2;
+connection slave;
+include/assert_grep.inc [Ensure warning is issued that signal handler thread is still processing]
+#
+# Cleanup
+connection master;
+drop table t1;
+include/rpl_end.inc
+# End of rpl_shutdown_sighup.test
diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result
index eb6324ff..03fc8a78 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result
@@ -122,6 +122,31 @@ connection slave;
# Slave_skipped_errros = 5
**** We cannot execute a select as there are differences in the
**** behavior between STMT and RBR.
+****
+**** Ensure transactions which are skipped due to encountering a
+**** non-deadlock error which is present in --slave-skip-errors result
+**** in partially committed transactions
+connection master;
+CREATE TABLE t3 (a INT UNIQUE) ENGINE=InnoDB;
+connection slave;
+connection slave;
+INSERT INTO t3 VALUES (3);
+connection master;
+BEGIN;
+INSERT INTO t3 VALUES (1);
+INSERT INTO t3 VALUES (2);
+INSERT INTO t3 VALUES (3);
+INSERT INTO t3 VALUES (4);
+COMMIT;
+connection slave;
+**** Master and slave tables should have the same data, due to the
+**** partially replicated transaction's data overlapping with the data
+**** that pre-existed on the slave. That is, despite the transaction
+**** consisting of 4 statements, the errored statement should be ignored
+**** and the other 3 should commit successfully.
+include/diff_tables.inc [master:t3,slave:t3]
+connection master;
+DROP TABLE t3;
==== Clean Up ====
connection master;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_start_alter_options.result b/mysql-test/suite/rpl/r/rpl_start_alter_options.result
index 4c6135aa..c150c18a 100644
--- a/mysql-test/suite/rpl/r/rpl_start_alter_options.result
+++ b/mysql-test/suite/rpl/r/rpl_start_alter_options.result
@@ -3,8 +3,6 @@ include/master-slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -96,8 +94,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -189,8 +185,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -321,8 +315,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -377,8 +369,6 @@ connection master;
alter table t1 add column f varchar(100) after b,add column g varchar(100) first ,add column h char, force , algorithm=instant;
alter table t1 add index if not exists index_1(f), force , algorithm=instant;
alter table t1 disable keys, force , algorithm=copy;
-Warnings:
-Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option
alter table t1 enable keys, force , algorithm=copy;
Warnings:
Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option
@@ -414,8 +404,6 @@ include/start_slave.inc
connection slave;
stop slave;
change master to master_use_gtid= current_pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
SET GLOBAL slave_parallel_threads=4;
set global slave_parallel_mode=optimistic;
set global gtid_strict_mode=1;
@@ -470,8 +458,6 @@ connection master;
alter table t1 add column f varchar(100) after b,add column g varchar(100) first ,add column h char, force , algorithm=nocopy;
alter table t1 add index if not exists index_1(f), force , algorithm=nocopy;
alter table t1 disable keys, force , algorithm=copy;
-Warnings:
-Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option
alter table t1 enable keys, force , algorithm=copy;
Warnings:
Note 1031 Storage engine InnoDB of the table `test`.`t1` doesn't have this option
diff --git a/mysql-test/suite/rpl/r/rpl_temporary_error2_skip_all.result b/mysql-test/suite/rpl/r/rpl_temporary_error2_skip_all.result
new file mode 100644
index 00000000..9819aafa
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_temporary_error2_skip_all.result
@@ -0,0 +1,64 @@
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
+*** Provoke a deadlock on the slave, check that transaction retry succeeds. ***
+connection master;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+INSERT INTO t1(a) VALUES (1), (2), (3), (4), (5);
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a b
+1 NULL
+2 NULL
+3 NULL
+4 NULL
+5 NULL
+SET sql_log_bin=0;
+ALTER TABLE t2 ENGINE=MyISAM;
+SET sql_log_bin=1;
+connect con_temp1,127.0.0.1,root,,test,$SERVER_MYPORT_2,;
+connection con_temp1;
+BEGIN;
+UPDATE t1 SET b=2 WHERE a=4;
+INSERT INTO t2 VALUES (2);
+DELETE FROM t2 WHERE a=2;
+connection master;
+BEGIN;
+UPDATE t1 SET b=1 WHERE a=2;
+INSERT INTO t2 VALUES (1);
+UPDATE t1 SET b=1 WHERE a=4;
+COMMIT;
+connection slave;
+connection con_temp1;
+UPDATE t1 SET b=2 WHERE a=2;
+SELECT * FROM t1 WHERE a<10 ORDER BY a;
+a b
+1 NULL
+2 2
+3 NULL
+4 2
+5 NULL
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+connection slave;
+SELECT * FROM t1 ORDER BY a;
+a b
+1 NULL
+2 NULL
+3 NULL
+4 NULL
+5 NULL
+* There will be one row in t2 because the ignored deadlock does not retry.
+SELECT * FROM t2 ORDER BY a;
+a
+1
+retries
+0
+Last_SQL_Errno = '0'
+Last_SQL_Error = ''
+connection master;
+DROP TABLE t1;
+DROP TABLE t2;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_using_gtid_default.result b/mysql-test/suite/rpl/r/rpl_using_gtid_default.result
index 3bdc9d47..24a316de 100644
--- a/mysql-test/suite/rpl/r/rpl_using_gtid_default.result
+++ b/mysql-test/suite/rpl/r/rpl_using_gtid_default.result
@@ -58,8 +58,6 @@ include/start_slave.inc
# to its default of Slave_Pos after RESET SLAVE.
include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=Current_Pos;
-Warnings:
-Warning 1681 'master_use_gtid=current_pos' is deprecated and will be removed in a future release. Please use master_demote_to_slave=1 instead
include/start_slave.inc
include/stop_slave.inc
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
index 999d9417..35cb3fcd 100644
--- a/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
+++ b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
@@ -1,6 +1,5 @@
include/master-slave.inc
[connection master]
-call mtr.add_suppression("Master is configured to log replication events");
connection slave;
connection slave;
include/wait_for_slave_to_stop.inc
diff --git a/mysql-test/suite/rpl/t/parallel_backup_xa.inc b/mysql-test/suite/rpl/t/parallel_backup_xa.inc
index 83a6fb79..5f287aa0 100644
--- a/mysql-test/suite/rpl/t/parallel_backup_xa.inc
+++ b/mysql-test/suite/rpl/t/parallel_backup_xa.inc
@@ -41,7 +41,7 @@ if ($slave_ooo_error)
{
SET @sav_innodb_lock_wait_timeout = @@global.innodb_lock_wait_timeout;
SET @sav_slave_transaction_retries = @@global.slave_transaction_retries;
- SET @@global.innodb_lock_wait_timeout =1;
+ SET @@global.innodb_lock_wait_timeout =5;
SET @@global.slave_transaction_retries=0;
}
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_auditing.test b/mysql-test/suite/rpl/t/rpl_auditing.test
new file mode 100644
index 00000000..3d3cee9a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_auditing.test
@@ -0,0 +1,77 @@
+if (!$SERVER_AUDIT2_SO) {
+ skip No SERVER_AUDIT2 plugin;
+}
+
+source include/master-slave.inc;
+
+--disable_warnings
+drop table if exists t1;
+sync_slave_with_master;
+reset master;
+--enable_warnings
+
+--disable_warnings
+CREATE TABLE IF NOT EXISTS mysql.server_audit_filters (
+ filtername char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ rule longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT 'true' CHECK (json_valid(rule)),
+ CONSTRAINT c_filtername UNIQUE (filtername)
+) ENGINE=Aria;
+
+CREATE TABLE IF NOT EXISTS mysql.server_audit_users (host char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+ user char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
+ filtername char(80) NOT NULL DEFAULT '',
+ CONSTRAINT c_host_user UNIQUE (host, user)
+) ENGINE=Aria;
+--enable_warnings
+
+INSERT INTO mysql.server_audit_filters VALUES ('ignore_sys', '{"ignore_tables" : "mysql.*"}');
+INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','ignore_sys');
+INSERT INTO mysql.server_audit_users VALUES ('%','root','ignore_sys');
+
+install plugin server_audit soname 'server_audit2';
+set global server_audit_logging=on;
+
+# this is done to make test deterministic
+# so the above 'set' command is always logged before the 'create table t1'
+-- disable_query_log
+-- disable_result_log
+select * from mysql.server_audit_filters;
+select * from mysql.server_audit_users;
+-- enable_result_log
+-- enable_query_log
+
+connection master;
+create table t1 (a int);
+insert into t1 values (1);
+truncate t1;
+drop table t1;
+sync_slave_with_master;
+
+set global server_audit_logging=off;
+
+truncate mysql.server_audit_filters;
+truncate mysql.server_audit_users;
+INSERT INTO mysql.server_audit_filters VALUES ('no_logging','false');
+INSERT INTO mysql.server_audit_users VALUES ('%','<replication_slave>','no_logging');
+
+set global server_audit_logging=on;
+
+connection master;
+create table t1 (a int);
+insert into t1 values (1);
+truncate t1;
+drop table t1;
+sync_slave_with_master;
+
+set global server_audit_logging=off;
+uninstall plugin server_audit;
+truncate mysql.server_audit_filters;
+truncate mysql.server_audit_users;
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+# replace the timestamp and the hostname with constant values
+--replace_regex /[0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\,[^,]*\,/TIME,HOSTNAME,/ /\,[1-9][0-9]*\,/,1,/ /\,[1-9][0-9]*/,ID/ /000001\\', [0-9]*,/#', POS,/
+cat_file $MYSQLD_DATADIR/server_audit.log;
+remove_file $MYSQLD_DATADIR/server_audit.log;
+
+connection master;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_binlog_dump_slave_gtid_state_info.test b/mysql-test/suite/rpl/t/rpl_binlog_dump_slave_gtid_state_info.test
index 02b31c06..4f0eafc4 100644
--- a/mysql-test/suite/rpl/t/rpl_binlog_dump_slave_gtid_state_info.test
+++ b/mysql-test/suite/rpl/t/rpl_binlog_dump_slave_gtid_state_info.test
@@ -39,6 +39,7 @@
--source include/master-slave.inc
--connection master
+SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
SET GLOBAL LOG_WARNINGS=2;
--connection slave
@@ -110,6 +111,7 @@ CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
--source include/wait_for_pattern_in_file.inc
--echo "===== Clean up ====="
+SET GLOBAL LOG_WARNINGS=@org_log_warnings;
--connection slave
--source include/stop_slave.inc
CHANGE MASTER TO MASTER_USE_GTID=no;
@@ -117,5 +119,4 @@ CHANGE MASTER TO MASTER_USE_GTID=no;
--connection master
DROP TABLE t;
-SET GLOBAL LOG_WARNINGS=default;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test
index 2758f9d6..992e2390 100644
--- a/mysql-test/suite/rpl/t/rpl_change_master.test
+++ b/mysql-test/suite/rpl/t/rpl_change_master.test
@@ -109,9 +109,4 @@ CHANGE MASTER TO MASTER_USER='root', MASTER_SSL=0, MASTER_SSL_CA='', MASTER_SSL_
CHANGE MASTER TO MASTER_USER='root', MASTER_PASSWORD='', MASTER_SSL=0;
-# MDEV-20122: Deprecate MASTER_USE_GTID=Current_Pos to favor new MASTER_DEMOTE_TO_SLAVE option
---echo "Usage of CURRENT_POS in CHANGE MASTER MASTER_USE_GTID is dreprecated.
-CHANGE MASTER TO MASTER_USE_GTID=CURRENT_POS;
-CHANGE MASTER TO MASTER_USE_GTID=SLAVE_POS;
-
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_change_master_demote.test b/mysql-test/suite/rpl/t/rpl_change_master_demote.test
index 15b55014..6304d352 100644
--- a/mysql-test/suite/rpl/t/rpl_change_master_demote.test
+++ b/mysql-test/suite/rpl/t/rpl_change_master_demote.test
@@ -73,6 +73,9 @@
# non-boolean value.
#
#
+# Additionally ensure MASTER_DEMOTE_TO_REPLICA aliases MASTER_DEMOTE_TO_SLAVE
+#
+#
# References:
# MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based
# replication is used by default if master supports it
@@ -455,6 +458,37 @@ EOF
--echo #
+--echo # MDEV-31768
+--echo # Ensure MASTER_DEMOTE_TO_REPLICA aliases MASTER_DEMOTE_TO_SLAVE
+--echo #
+--connection slave
+RESET MASTER;
+--source include/reset_slave.inc
+CREATE TABLE t_mdev_31768 (a int);
+--let $gtid_binlog_pos= `SELECT @@GLOBAL.gtid_binlog_pos`
+CHANGE MASTER TO master_use_gtid=Replica_Pos, master_demote_to_replica=1;
+--let $gtid_slave_pos= `SELECT @@GLOBAL.gtid_slave_pos`
+
+--echo # Validating alias MASTER_DEMOTE_TO_REPLICA provides intended behavior..
+if (`SELECT strcmp("$gtid_binlog_pos","$gtid_slave_pos") != 0`)
+{
+ --echo # ..failed
+ --echo # Binlog pos: $gtid_binlog_pos
+ --echo # Replica pos: $gtid_slave_pos
+ die MASTER_DEMOTE_TO_REPLICA does not alias MASTER_DEMOTE_TO_SLAVE correctly;
+}
+--echo # ..success
+
+DROP TABLE t_mdev_31768;
+RESET MASTER;
+--source include/reset_slave.inc
+
+--echo # Clear primary binlog state to match replica
+--connection master
+RESET MASTER;
+
+
+--echo #
--echo # Cleanup
--echo #
--connection master
diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test
index 95fac6c2..c7ef3a4e 100644
--- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test
+++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test
@@ -9,6 +9,7 @@ CREATE TABLE t1(i INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
sync_slave_with_master;
+--source include/save_master_gtid.inc
connection slave;
@@ -28,7 +29,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -44,7 +45,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES(2);
INSERT INTO t1 VALUES(3);
COMMIT;
-save_master_pos;
+--source include/save_master_gtid.inc
SELECT * FROM t1;
connection slave;
@@ -55,7 +56,7 @@ SET @@global.debug_dbug=@saved_dbug;
START SLAVE io_thread;
--source include/wait_for_slave_io_to_start.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
SELECT * FROM t1;
--echo # Case 1 : Start slave with IGNORE_DOMAIN_IDS=(1), then restart
@@ -70,7 +71,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -86,7 +87,7 @@ INSERT INTO t1 VALUES(4);
INSERT INTO t1 VALUES(5);
COMMIT;
-save_master_pos;
+--source include/save_master_gtid.inc
SELECT * FROM t1;
connection slave;
@@ -97,7 +98,7 @@ SET @@global.debug_dbug=@saved_dbug;
START SLAVE io_thread;
--source include/wait_for_slave_io_to_start.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
SELECT * FROM t1;
--echo # Case 2 : Start slave with IGNORE_DOMAIN_IDS=(), then restart
@@ -112,7 +113,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -140,7 +141,7 @@ INSERT INTO t1 VALUES(10);
INSERT INTO t1 VALUES(11);
COMMIT;
-save_master_pos;
+--source include/save_master_gtid.inc
SELECT * FROM t1;
connection slave;
@@ -157,7 +158,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -178,7 +179,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -196,6 +197,15 @@ INSERT INTO t1 VALUES(12);
INSERT INTO t1 VALUES(13);
COMMIT; # IO thread gets killed here.
+# MDEV-14357
+# As the prior transaction will be ignored on slave because its domain id is
+# ignored, the replica's gtid_slave_pos will be updated to have seen it,
+# despite its eventual failure to queue the whole transaction to the relay log.
+# So for test consistency, we need to synchronize the SQL thread with this
+# position; otherwise, when restarting the server after resetting
+# IGNORE_DOMAIN_IDS, we will re-fetch this event and execute it.
+--source include/save_master_gtid.inc
+
START TRANSACTION;
INSERT INTO t1 VALUES(14);
INSERT INTO t1 VALUES(15);
@@ -207,7 +217,6 @@ INSERT INTO t1 VALUES(16);
INSERT INTO t1 VALUES(17);
COMMIT;
-save_master_pos;
SELECT * FROM t1;
connection slave;
@@ -217,6 +226,11 @@ SELECT * FROM t1;
SET @@global.debug_dbug=@saved_dbug;
+# MDEV-14357
+# Ensure the SQL thread is updated with the GTID of the ignored transaction
+# so we don't fetch it and execute it after restarting without any ignored
+# domain ids.
+--source include/sync_with_master_gtid.inc
--source include/stop_slave_sql.inc
let $do_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -224,8 +238,12 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
--echo IGNORE_DOMAIN_IDS (BEFORE) : $ignore_domain_ids_before
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
+
+--connection master
+--source include/save_master_gtid.inc
+--connection slave
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -246,7 +264,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -264,6 +282,11 @@ INSERT INTO t1 VALUES(18);
INSERT INTO t1 VALUES(19); # IO thread gets killed here.
COMMIT;
+# MDEV-14357
+# Synchronize gtid_slave_pos with the ignored event. See prior comments about
+# MDEV-14357 for details.
+--source include/save_master_gtid.inc
+
START TRANSACTION;
INSERT INTO t1 VALUES(20);
INSERT INTO t1 VALUES(21);
@@ -275,7 +298,6 @@ INSERT INTO t1 VALUES(22);
INSERT INTO t1 VALUES(23);
COMMIT;
-save_master_pos;
SELECT * FROM t1;
connection slave;
@@ -285,6 +307,10 @@ SELECT * FROM t1;
SET @@global.debug_dbug=@saved_dbug;
+# MDEV-14357
+# Synchronize gtid_slave_pos with the ignored event. See prior comments about
+# MDEV-14357 for details.
+--source include/sync_with_master_gtid.inc
--source include/stop_slave_sql.inc
let $do_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -292,8 +318,12 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
--echo IGNORE_DOMAIN_IDS (BEFORE) : $ignore_domain_ids_before
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
+
+--connection master
+--source include/save_master_gtid.inc
+--connection slave
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -314,7 +344,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
@@ -343,7 +373,7 @@ INSERT INTO t1 VALUES(28);
INSERT INTO t1 VALUES(29);
COMMIT;
-save_master_pos;
+--source include/save_master_gtid.inc
SELECT * FROM t1;
connection slave;
@@ -361,7 +391,7 @@ let $ignore_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Igno
CHANGE MASTER TO IGNORE_DOMAIN_IDS=(1), MASTER_USE_GTID=slave_pos;
--source include/start_slave.inc
-sync_with_master;
+--source include/sync_with_master_gtid.inc
let $do_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
let $ignore_domain_ids_after= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Domain_Ids, 1);
diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test
index cdfdc098..19074ce9 100644
--- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test
+++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test
@@ -6,9 +6,12 @@
connection master;
+--disable_query_log
call mtr.add_suppression("mysqld: Table '.*gtid_slave_pos' is marked as crashed and should be repaired");
call mtr.add_suppression("Checking table: './mysql/gtid_slave_pos'");
call mtr.add_suppression("mysql.gtid_slave_pos: 1 client is using or hasn't closed the table properly");
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+--enable_query_log
SET @@session.gtid_domain_id= 0;
create table ti (a int auto_increment primary key) engine=innodb;
@@ -39,7 +42,7 @@ insert into ti set a=null;
insert into tm set a=null;
set @@global.debug_dbug="+d,crash_before_send_xid";
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
connection slave;
let $do_domain_ids_before= query_get_value(SHOW SLAVE STATUS, Replicate_Do_Domain_Ids, 1);
@@ -61,7 +64,7 @@ connection master;
--enable_reconnect
--let $rpl_server_number=1
--source include/rpl_start_server.inc
-#--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+#--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/wait_until_connected_again.inc
--echo # Master has restarted successfully
save_master_pos;
diff --git a/mysql-test/suite/rpl/t/rpl_domain_id_filter_restart.test b/mysql-test/suite/rpl/t/rpl_domain_id_filter_restart.test
index 8083b8f2..38cbbdec 100644
--- a/mysql-test/suite/rpl/t/rpl_domain_id_filter_restart.test
+++ b/mysql-test/suite/rpl/t/rpl_domain_id_filter_restart.test
@@ -35,9 +35,10 @@ SET @@session.gtid_domain_id= 1;
INSERT INTO t2 VALUES(1);
SELECT * FROM t2;
-sync_slave_with_master;
+source include/save_master_gtid.inc;
connection slave;
+source include/sync_with_master_gtid.inc;
SELECT * FROM t1;
SELECT * FROM t2;
diff --git a/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test b/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test
index 1ee04362..633071a8 100644
--- a/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test
+++ b/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test
@@ -30,6 +30,10 @@
--let $rpl_skip_start_slave=1
--source include/master-slave.inc
+--disable_query_log
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+--enable_query_log
+
# Do an insert on master
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES(1);
diff --git a/mysql-test/suite/rpl/t/rpl_get_lock.test b/mysql-test/suite/rpl/t/rpl_get_lock.test
index b5c08858..c6f2f6ec 100644
--- a/mysql-test/suite/rpl/t/rpl_get_lock.test
+++ b/mysql-test/suite/rpl/t/rpl_get_lock.test
@@ -1,6 +1,17 @@
source include/master-slave.inc;
+--disable_query_log
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+call mtr.add_suppression("Could not read packet:.* errno: 11 ");
+# The following one comes from calling dirty_close on client side
+call mtr.add_suppression("Could not read packet:.* errno: 2 ");
+call mtr.add_suppression("Could not read packet:.* errno: 35 ");
+--enable_query_log
+
+let $org_log_warnings=`select @@global.log_warnings`;
+
+# Test extended warnings
+SET GLOBAL LOG_WARNINGS=4;
create table t1(n int);
# Use of get_lock gives a warning for unsafeness if binlog_format=statement
@@ -41,6 +52,10 @@ connection master1;
drop table t1;
sync_slave_with_master;
+connection default;
+--disable_query_log
+--eval SET GLOBAL LOG_WARNINGS=$org_log_warnings;
+--enable_query_log
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt b/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt
index 69c1a64e..5b3fb44c 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash-slave.opt
@@ -1 +1 @@
---master-retry-count=100
+--master-retry-count=100 --slave-net-timeout=10
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test
index 28329831..e1a57f4b 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test
@@ -12,6 +12,7 @@
call mtr.add_suppression("Checking table:");
call mtr.add_suppression("client is using or hasn't closed the table properly");
call mtr.add_suppression("Table .* is marked as crashed and should be repaired");
+call mtr.add_suppression("Could not read packet:.* errno: 11");
flush tables;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam.test b/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam.test
index faf388f5..e113e17b 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash_myisam.test
@@ -5,6 +5,10 @@
--let $rpl_topology=1->2
--source include/rpl_init.inc
+--disable_query_log
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+--enable_query_log
+
--echo *** Test crashing master with InnoDB disabled, the binlog gtid state should still be correctly recovered. ***
--connection server_1
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_grouping.test b/mysql-test/suite/rpl/t/rpl_gtid_grouping.test
index 66448c4f..bb1057a6 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_grouping.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_grouping.test
@@ -93,5 +93,4 @@ CHANGE MASTER TO MASTER_USE_GTID=no;
--connection master
DROP TABLE t;
-SET GLOBAL LOG_WARNINGS=default;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_header_valid.test b/mysql-test/suite/rpl/t/rpl_gtid_header_valid.test
new file mode 100644
index 00000000..d4d75ba8
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_gtid_header_valid.test
@@ -0,0 +1,213 @@
+#
+# This test ensures that, when a GTID event is constructed by reading its
+# content from a binlog file, the reader (e.g. replica, in this test) cannot
+# read beyond the length of the GTID event. That is, we ensure that the
+# structure indicated by its flags and extra_flags are consistent with the
+# actual content of the event.
+#
+# To spoof a broken GTID log event, we use the DEBUG_DBUG mechanism to inject
+# the master to write invalid GTID events for each flag. The transaction is
+# given a commit id to ensure the event is not shorter than GTID_HEADER_LEN,
+# which would result in zero padding up to GTID_HEADER_LEN.
+#
+#
+# References:
+# MDEV-33672: Gtid_log_event Construction from File Should Ensure Event
+# Length When Using Extra Flags
+#
+
+--source include/have_debug.inc
+
+# GTID event extra_flags are format independent
+--source include/have_binlog_format_row.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+--echo #
+--echo # Initialize test data
+--connection master
+create table t1 (a int) engine=innodb;
+--source include/save_master_gtid.inc
+set @@SESSION.debug_dbug= "+d,binlog_force_commit_id";
+
+--connection slave
+set SQL_LOG_BIN= 0;
+call mtr.add_suppression('Found invalid event in binary log');
+call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
+set SQL_LOG_BIN= 1;
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+--source include/start_slave.inc
+--let $cid_ctr= 100
+
+
+--echo #
+--echo # Test FL_PREPARED_XA
+--connection master
+set @@SESSION.debug_dbug= "+d,negate_xid_from_gtid";
+--eval set @commit_id= $cid_ctr
+
+XA START 'x1';
+insert into t1 values (1);
+XA END 'x1';
+XA PREPARE 'x1';
+set @@SESSION.debug_dbug= "-d,negate_xid_from_gtid";
+XA COMMIT 'x1';
+--source include/save_master_gtid.inc
+
+--echo # Waiting for slave to find invalid event..
+--connection slave
+let $slave_sql_errno= 1594; # ER_SLAVE_RELAY_LOG_READ_FAILURE
+source include/wait_for_slave_sql_error.inc;
+STOP SLAVE IO_THREAD;
+
+--echo # Reset master binlogs (as there is an invalid event) and slave state
+--connection master
+RESET MASTER;
+--connection slave
+RESET MASTER;
+RESET SLAVE;
+set @@global.gtid_slave_pos="";
+--source include/start_slave.inc
+
+
+--echo #
+--echo # Test FL_COMPLETED_XA
+--connection master
+--inc $cid_ctr
+--eval set @commit_id= $cid_ctr
+XA START 'x1';
+--let $next_val = `SELECT max(a)+1 FROM t1`
+--eval insert into t1 values ($next_val)
+XA END 'x1';
+XA PREPARE 'x1';
+set @@SESSION.debug_dbug= "+d,negate_xid_from_gtid";
+XA COMMIT 'x1';
+set @@SESSION.debug_dbug= "-d,negate_xid_from_gtid";
+--source include/save_master_gtid.inc
+
+--echo # Waiting for slave to find invalid event..
+--connection slave
+let $slave_sql_errno= 1594; # ER_SLAVE_RELAY_LOG_READ_FAILURE
+source include/wait_for_slave_sql_error.inc;
+STOP SLAVE IO_THREAD;
+
+--echo # Cleanup hanging XA PREPARE on slave
+set statement SQL_LOG_BIN=0 for XA COMMIT 'x1';
+
+--echo # Reset master binlogs (as there is an invalid event) and slave state
+--connection master
+RESET MASTER;
+--connection slave
+RESET MASTER;
+RESET SLAVE;
+set @@global.gtid_slave_pos="";
+--source include/start_slave.inc
+
+
+--echo #
+--echo # Test Missing xid.data (but has format id and length description parts)
+
+--connection master
+--eval set @commit_id= $cid_ctr
+
+XA START 'x1';
+insert into t1 values (1);
+XA END 'x1';
+XA PREPARE 'x1';
+set @@SESSION.debug_dbug= "+d,negate_xid_data_from_gtid";
+XA COMMIT 'x1';
+set @@SESSION.debug_dbug= "-d,negate_xid_data_from_gtid";
+--source include/save_master_gtid.inc
+
+--echo # Waiting for slave to find invalid event..
+--connection slave
+let $slave_sql_errno= 1594; # ER_SLAVE_RELAY_LOG_READ_FAILURE
+source include/wait_for_slave_sql_error.inc;
+STOP SLAVE IO_THREAD;
+
+--echo # Cleanup hanging XA PREPARE on slave
+set statement SQL_LOG_BIN=0 for XA COMMIT 'x1';
+
+--echo # Reset master binlogs (as there is an invalid event) and slave state
+--connection master
+RESET MASTER;
+--connection slave
+RESET MASTER;
+RESET SLAVE;
+set @@global.gtid_slave_pos="";
+--source include/start_slave.inc
+
+
+--echo #
+--echo # Test FL_EXTRA_MULTI_ENGINE
+--connection master
+set @old_dbug= @@SESSION.debug_dbug;
+set @@SESSION.debug_dbug= "+d,inject_fl_extra_multi_engine_into_gtid";
+--inc $cid_ctr
+--eval set @commit_id= $cid_ctr
+--let $next_val = `SELECT max(a)+1 FROM t1`
+--eval insert into t1 values ($next_val)
+--source include/save_master_gtid.inc
+set @@SESSION.debug_dbug=@old_dbug;
+
+--connection slave
+--echo # Waiting for slave to find invalid event..
+let $slave_sql_errno= 1594; # ER_SLAVE_RELAY_LOG_READ_FAILURE
+source include/wait_for_slave_sql_error.inc;
+STOP SLAVE IO_THREAD;
+
+--echo # Reset master binlogs (as there is an invalid event) and slave state
+--connection master
+RESET MASTER;
+
+--connection slave
+RESET SLAVE;
+RESET MASTER;
+set @@global.gtid_slave_pos="";
+--source include/start_slave.inc
+
+
+--echo #
+--echo # Test FL_COMMIT_ALTER
+--connection master
+set @old_dbug= @@SESSION.debug_dbug;
+set @@SESSION.debug_dbug= "+d,negate_alter_fl_from_gtid";
+set @old_alter_tp= @@SESSION.binlog_alter_two_phase;
+set @@SESSION.binlog_alter_two_phase= 1;
+alter table t1 add column (nc int);
+--source include/save_master_gtid.inc
+set @@SESSION.debug_dbug=@old_dbug;
+set @@SESSION.binlog_alter_two_phase=@old_alter_tp;
+
+--connection slave
+--echo # Waiting for slave to find invalid event..
+let $slave_sql_errno= 1594; # ER_SLAVE_RELAY_LOG_READ_FAILURE
+source include/wait_for_slave_sql_error.inc;
+STOP SLAVE IO_THREAD;
+
+--echo # Reset master binlogs (as there is an invalid event) and slave state
+--connection master
+RESET MASTER;
+
+--connection slave
+# Just to keep tables consistent between master/slave
+SET STATEMENT sql_log_bin=0 FOR alter table t1 add column (nc int);
+RESET SLAVE;
+RESET MASTER;
+set @@global.gtid_slave_pos="";
+--source include/start_slave.inc
+
+
+--echo #
+--echo # Cleanup
+
+--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
+--echo # End of rpl_gtid_header_valid.test
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 b5ff2949..acce6651 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
@@ -173,6 +173,24 @@ SELECT * FROM t1 ORDER BY a;
--echo *** MDEV-4486: Allow to start old-style replication even if mysql.gtid_slave_pos is unavailable
+# In GTID mode, the old-style replication position is also updated. But during
+# GTID connect, the old-style position is not known until receiving the fake
+# GTID list event, which contains the required position value. If we happened
+# to stop the slave above before this fake GTID list event, the test could fail
+# with duplicate key errors due to switching to non-GTID mode at a wrong
+# position too far back in the binlog.
+#
+# Work-around this by injecting an extra dummt event and syncing the slave to
+# it, ensuring the old-style position will be updated.
+#
+# This work-around could be removed after MDEV-33996 is fixed.
+--connection server_1
+INSERT INTO t1 VALUES (8);
+DELETE FROM t1 WHERE a=8;
+--save_master_pos
+--connection server_2
+--sync_with_master
+
--connection server_2
--source include/stop_slave.inc
CHANGE MASTER TO master_use_gtid= no;
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat.test b/mysql-test/suite/rpl/t/rpl_heartbeat.test
index e4753b7b..8a852fd3 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test
@@ -8,14 +8,13 @@
# - SHOW STATUS like 'Slave_heartbeat_period' report
-- source include/have_log_bin.inc
-
-connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
+-- source include/master-slave.inc
connection master;
reset master;
connection slave;
+-- source include/stop_slave.inc
set @restore_slave_net_timeout= @@global.slave_net_timeout;
--disable_warnings
set @@global.slave_net_timeout= 10;
@@ -170,6 +169,5 @@ set @@global.slave_net_timeout= @restore_slave_net_timeout;
--disable_prepare_warnings
---source include/stop_slave.inc
-
+--source include/rpl_end.inc
--echo End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
index bd66a249..e5937866 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
@@ -3,6 +3,12 @@
--source include/have_debug.inc
--source include/master-slave.inc
+--disable_query_log
+CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
+CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+--enable_query_log
+
connection slave;
--source include/stop_slave.inc
set @restore_slave_net_timeout= @@global.slave_net_timeout;
@@ -14,14 +20,13 @@ set @@global.slave_net_timeout= 10;
### Checking the range
###
-#
+
# default period slave_net_timeout/2
#
--query_vertical show status like 'Slave_heartbeat_period';
SET @saved_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
-CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
-CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
+
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mdev33798.cnf b/mysql-test/suite/rpl/t/rpl_mdev33798.cnf
new file mode 100644
index 00000000..8e5125ea
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mdev33798.cnf
@@ -0,0 +1,17 @@
+!include suite/rpl/my.cnf
+
+[mysqld.1]
+log-slave-updates
+loose-innodb
+
+[mysqld.2]
+log-slave-updates
+loose-innodb
+
+[mysqld.3]
+log-slave-updates
+loose-innodb
+
+[ENV]
+SERVER_MYPORT_3= @mysqld.3.port
+SERVER_MYSOCK_3= @mysqld.3.socket
diff --git a/mysql-test/suite/rpl/t/rpl_mdev33798.test b/mysql-test/suite/rpl/t/rpl_mdev33798.test
new file mode 100644
index 00000000..1448ed91
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mdev33798.test
@@ -0,0 +1,182 @@
+--source include/have_innodb.inc
+--source include/have_log_bin.inc
+--let $rpl_topology=1->2,1->3
+--source include/rpl_init.inc
+--connect (server_2b,127.0.0.1,root,,,$SERVER_MYPORT_2)
+
+--connection server_2
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET @old_parallel_mode= @@GLOBAL.slave_parallel_mode;
+SET @old_timeout= @@GLOBAL.lock_wait_timeout;
+SET @old_innodb_timeout= @@GLOBAL.innodb_lock_wait_timeout;
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=5;
+set global slave_parallel_mode= aggressive;
+# High timeout so we get replication sync error and test failure if the
+# conflict handling is insufficient and lock wait timeout occurs.
+SET GLOBAL lock_wait_timeout= 86400;
+SET GLOBAL innodb_lock_wait_timeout= 86400;
+SET STATEMENT sql_log_bin=0 FOR ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+--source include/start_slave.inc
+
+--connection server_1
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+
+# Test the following scenario:
+#
+# Transactions T1, T2 in domain 1, U1, U2 in domain 2.
+# Wait cycle T1->U2->U1->T2->T1 as follows:
+# T1 row lock wait on U2
+# U2 wait_for_prior_commit on U1
+# U1 row lock wait on T2
+# T2 wait_for_prior_commit on T1
+#
+# Test that the wait cycle is broken correctly with deadlock kill.
+
+--connection server_2b
+# Temporarily block T1 and U1.
+BEGIN;
+SELECT * FROM t1 WHERE a=1 FOR UPDATE;
+SELECT * FROM t1 WHERE a=5 FOR UPDATE;
+
+--connection server_1
+
+SET SESSION gtid_domain_id= 1;
+# T1 in domain 1
+BEGIN;
+UPDATE t1 SET b=1 WHERE a=1;
+UPDATE t1 SET b=1 WHERE a=7;
+COMMIT;
+# T2 in domain 1
+UPDATE t1 SET b=2 WHERE a=3;
+
+SET SESSION gtid_domain_id=2;
+# U1 in domain 2
+BEGIN;
+UPDATE t1 SET b=3 WHERE a=5;
+UPDATE t1 SET b=3 WHERE a=3;
+COMMIT;
+# U2 in domain 2
+UPDATE t1 SET b=4 WHERE a=7;
+SET SESSION gtid_domain_id= 0;
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/start_slave.inc
+# Wait until T2, U2 are holding the row locks.
+--let $wait_condition= SELECT COUNT(*)=2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state LIKE '%Waiting for prior transaction to commit%'
+--source include/wait_condition.inc
+
+# Then let T1, U1 continue to conflict on the row locks, and check that
+# replication correctly handles the conflict.
+--connection server_2b
+ROLLBACK;
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+
+# Allow either domain to "win" on the conflicting updates.
+SELECT a, (
+ (a=1 AND b=1) OR
+ (a=3 AND (b=2 OR b=3)) OR
+ (a=5 AND b=3) OR
+ (a=7 AND (b=1 OR b=4)) OR
+ ((a MOD 2)=0 AND b=0)) AS `ok`
+ FROM t1
+ ORDER BY a;
+
+# Now try the same thing with multi-source replication.
+
+# Make server_3 a second master
+--connection server_3
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+
+--connection server_2
+--source include/stop_slave.inc
+--replace_result $SERVER_MYPORT_3 MYPORT_3
+eval CHANGE MASTER 'm2' to master_port=$SERVER_MYPORT_3 , master_host='127.0.0.1', master_user='root', master_use_gtid=slave_pos;
+
+--connection server_1
+
+SET SESSION gtid_domain_id= 1;
+# T1 in domain 1
+BEGIN;
+UPDATE t1 SET b=11 WHERE a=1;
+UPDATE t1 SET b=11 WHERE a=7;
+COMMIT;
+# T2 in domain 1
+UPDATE t1 SET b=12 WHERE a=3;
+SET SESSION gtid_domain_id= 1;
+
+--connection server_3
+SET SESSION gtid_domain_id=3;
+# U1 in domain 3
+BEGIN;
+UPDATE t1 SET b=13 WHERE a=5;
+UPDATE t1 SET b=13 WHERE a=3;
+COMMIT;
+# U2 in domain 3
+UPDATE t1 SET b=14 WHERE a=7;
+--source include/save_master_gtid.inc
+
+--connection server_2b
+# Temporarily block T1 and U1.
+BEGIN;
+SELECT * FROM t1 WHERE a=1 FOR UPDATE;
+SELECT * FROM t1 WHERE a=5 FOR UPDATE;
+
+START ALL SLAVES;
+# Wait until T2, U2 are holding the row locks.
+--let $wait_condition= SELECT COUNT(*)=2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state LIKE '%Waiting for prior transaction to commit%'
+--source include/wait_condition.inc
+
+--connection server_2b
+ROLLBACK;
+
+--connection server_1
+--source include/save_master_gtid.inc
+--connection server_2
+--source include/sync_with_master_gtid.inc
+--connection server_3
+--source include/save_master_gtid.inc
+--connection server_2
+--source include/sync_with_master_gtid.inc
+
+SELECT a, (
+ (a=1 AND b=11) OR
+ (a=3 AND (b=12 OR b=13)) OR
+ (a=5 AND b=13) OR
+ (a=7 AND (b=11 OR b=14)) OR
+ ((a MOD 2)=0 AND b=0)) AS `ok`
+ FROM t1
+ ORDER BY a;
+
+SET default_master_connection = 'm2';
+--source include/stop_slave.inc
+RESET SLAVE 'm2' ALL;
+SET default_master_connection = '';
+
+--connection server_3
+--source include/start_slave.inc
+
+# Cleanup
+
+--disconnect server_2b
+--connection server_1
+DROP TABLE t1;
+--connection server_2
+--source include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+set global slave_parallel_mode= @old_parallel_mode;
+SET GLOBAL lock_wait_timeout= @old_timeout;
+SET GLOBAL innodb_lock_wait_timeout= @old_innodb_timeout;
+--source include/start_slave.inc
+
+--source include/rpl_end.inc
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
index 751da315..dd4a0fbb 100644
--- a/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test
+++ b/mysql-test/suite/rpl/t/rpl_mysql_manager_race_condition.test
@@ -18,8 +18,14 @@
# associated with this test should enforce that the binlog background thread is
# not created before the handle manager is initialized.
#
+# Addendum 1) This test is extended for MDEV-33799, as the original fix
+# left out the possibility that the binlog background thread can be
+# started during recovery if the binary log is used as the transaction
+# coordinator. This resulted in similar segfaults as seen by MDEV-26473.
+#
# References:
# MDEV-26473 mysqld got exception 0xc0000005 (rpl_slave_state/rpl_load_gtid_slave_state)
+# MDEV-33799 mysql_manager_submit Segfault at Startup Still Possible During Recovery
#
--source include/have_debug.inc
@@ -54,6 +60,63 @@ create table t1 (a int);
--echo #
+--echo # MDEV-33799
+--echo # Ensure that when the binary log is used for recovery (as tc log), that
+--echo # the recovery process cannot start the binlog background thread before
+--echo # the mysql handle manager has started.
+--connection slave
+
+--echo # Add test suppresssions so crash recovery messages don't fail the test
+set session sql_log_bin=0;
+call mtr.add_suppression("mariadbd: Got error '145.*");
+call mtr.add_suppression("Checking table:.*");
+call mtr.add_suppression("mysql.gtid_slave_pos:.*hasn't closed the table properly");
+call mtr.add_suppression("Can't init tc log");
+call mtr.add_suppression("Aborting");
+set session sql_log_bin=1;
+
+--echo # Create slave-side only table
+create table t2 (a int) engine=innodb;
+
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+wait
+EOF
+
+--echo # Crash mariadbd when binlogging transaction to corrupt database state
+--connection slave1
+set @@session.debug_dbug="+d,crash_before_writing_xid";
+--send insert into t2 values (1)
+
+--connection slave
+--source include/wait_until_disconnected.inc
+
+--connection slave1
+--error 2013,ER_CONNECTION_KILLED
+--reap
+
+--echo # Restart mariadbd in recovery mode. Note --tc-heuristic-recover
+--echo # forces mysqld to exit with error, so we run mariadbd via CLI
+--echo # MYSQLD_LAST_CMD --debug_dbug="+d,delay_start_handle_manager" --tc-heuristic-recover=COMMIT
+--error 1
+--exec $MYSQLD_LAST_CMD --debug_dbug="+d,delay_start_handle_manager" --tc-heuristic-recover=COMMIT
+
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+restart
+EOF
+
+--connection server_2
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--connection slave1
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--connection slave
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--source include/start_slave.inc
+
+
+--echo #
--echo # Cleanup
--echo #
@@ -63,5 +126,6 @@ drop table t1;
--connection slave
--source include/sync_with_master_gtid.inc
+drop table t2;
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test
index cbde486b..f1814e61 100644
--- a/mysql-test/suite/rpl/t/rpl_packet.test
+++ b/mysql-test/suite/rpl/t/rpl_packet.test
@@ -20,6 +20,9 @@ source include/master-slave.inc;
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
+call mtr.add_suppression("Could not write packet:");
+call mtr.add_suppression("Got a packet bigger than 'max_allowed_packet' bytes");
+
let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
disable_warnings;
eval drop database if exists $db;
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test b/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test
index c5d2b85c..c34c4f20 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test
@@ -300,7 +300,7 @@ SET GLOBAL slave_parallel_threads=10;
# Find the thread id of the driver SQL thread that we want to kill.
--let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'
--source include/wait_condition.inc
---let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Slave has read all relay log%'`
+--let $thd_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%relay log%'`
SET @old_max_queued= @@GLOBAL.slave_parallel_max_queued;
SET GLOBAL slave_parallel_max_queued=9000;
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_multi_domain_xa.test b/mysql-test/suite/rpl/t/rpl_parallel_multi_domain_xa.test
new file mode 100644
index 00000000..f17634d4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_multi_domain_xa.test
@@ -0,0 +1,181 @@
+# Similar to rpl_parallel_optimistic_xa to verify XA
+# parallel execution with multiple gtid domain.
+# References:
+# MDEV-33668 Adapt parallel slave's round-robin scheduling to XA events
+
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+--source include/master-slave.inc
+
+# Tests' global declarations
+--let $trx = _trx_
+--let $slave_timeout= -1
+
+call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
+call mtr.add_suppression("WSREP: handlerton rollback failed");
+
+--connection master
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+--save_master_pos
+
+# Prepare to restart slave into optimistic parallel mode
+--connection slave
+--sync_with_master
+--source include/stop_slave.inc
+# This test runs huge number of transactions independently in parallel that
+# all conflict on a single row. This requires a large number of retries, as a
+# transaction can repeatedly conflict/deadlock with a large number of other
+# transactions (in a different domain) one by one.
+SET @old_transaction_retries = @@GLOBAL.slave_transaction_retries;
+SET @@global.slave_transaction_retries = 1000;
+SET @old_parallel_threads = @@GLOBAL.slave_parallel_threads;
+SET @old_slave_domain_parallel_threads = @@GLOBAL.slave_domain_parallel_threads;
+SET @@global.slave_parallel_threads = 5;
+SET @@global.slave_domain_parallel_threads = 3;
+SET @old_parallel_mode = @@GLOBAL.slave_parallel_mode;
+
+CHANGE MASTER TO master_use_gtid=slave_pos;
+
+--connection master
+CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1, 0);
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+
+--let $mode = 2
+# mode = 2 is optimistic
+SET @@global.slave_parallel_mode ='optimistic';
+while ($mode)
+{
+ --connection master
+ #
+ # create XA events alternating gtid domains to run them in parallel on slave.
+ #
+ --let $domain_num = 3
+ --let $trx_num = 777
+ --let $i = $trx_num
+ --let $conn = master
+ --disable_query_log
+ while($i > 0)
+ {
+ --let $domain_id = `SELECT $i % $domain_num`
+ --eval set @@gtid_domain_id = $domain_id
+ # 'decision' to commit 0, or rollback 1
+ --let $decision = `SELECT $i % 2`
+ --eval XA START '$conn$trx$i'
+ --eval UPDATE t1 SET b = 1 - 2 * $decision WHERE a = 1
+ --eval XA END '$conn$trx$i'
+ --eval XA PREPARE '$conn$trx$i'
+ --let $term = COMMIT
+ if ($decision)
+ {
+ --let $term = ROLLBACK
+ }
+ --eval XA $term '$conn$trx$i'
+
+ --dec $i
+ }
+ --enable_query_log
+ --source include/save_master_gtid.inc
+
+ --connection slave
+ if (`select $mode = 1`)
+ {
+ SET @@global.slave_parallel_mode ='conservative';
+ }
+ --source include/start_slave.inc
+ --source include/sync_with_master_gtid.inc
+ --source include/stop_slave.inc
+
+ --dec $mode
+}
+
+
+# Generations test.
+# Create few ranges of XAP groups length of greater than
+# 3 * slave_parallel_threads + 1
+# terminated upon each range.
+--let $iter = 3
+--let $generation_len = @@global.slave_parallel_threads
+--let $domain_num = 3
+--disable_query_log
+--connection master
+while ($iter)
+{
+ --let $k = `select 3 * 3 * $generation_len`
+ --let $_k = $k
+ while ($k)
+ {
+ --source include/count_sessions.inc
+ --connect(con$k,localhost,root,,)
+ #
+ # create XA events alternating gtid domains to run them in parallel on slave.
+ #
+ --let $domain_id = `SELECT $k % $domain_num`
+ --eval set @@gtid_domain_id = $domain_id
+ --eval XA START '$trx$k'
+ --eval INSERT INTO t1 VALUES ($k + 1, $iter)
+ --eval XA END '$trx$k'
+ --eval XA PREPARE '$trx$k'
+
+ --disconnect con$k
+ --connection master
+ --source include/wait_until_count_sessions.inc
+
+ --dec $k
+ }
+
+ --connection master
+ --let $k = $_k
+ while ($k)
+ {
+ --let $term = COMMIT
+ --let $decision = `SELECT $k % 2`
+ if ($decision)
+ {
+ --let $term = ROLLBACK
+ }
+ --eval XA $term '$trx$k'
+ }
+ --dec $iter
+}
+--enable_query_log
+--source include/save_master_gtid.inc
+
+--connection slave
+SET @@global.slave_parallel_mode = 'optimistic';
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+
+
+#
+# Overall consistency check
+#
+--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_mode = @old_parallel_mode;
+SET @@global.slave_parallel_threads = @old_parallel_threads;
+SET @@global.slave_domain_parallel_threads = @old_slave_domain_parallel_threads;
+SET @@global.slave_transaction_retries = @old_transaction_retries;
+--source include/start_slave.inc
+
+--connection master
+DROP TABLE t1;
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+--connection master
+--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 f5e48282..09da8c2d 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test
@@ -508,6 +508,7 @@ DELETE FROM t2;
# The 1st of the following two trx:s a blocker on slave
--connection server_2
+SET @org_log_warnings=@@GLOBAL.LOG_WARNINGS;
set global log_warnings=2;
BEGIN;
INSERT INTO t1 SET a=1;
@@ -555,7 +556,7 @@ DELETE FROM t2;
#
--connection server_2
--source include/stop_slave.inc
-set global log_warnings=default;
+set global log_warnings=@org_log_warnings;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test
index 35c22d1e..6e5cf436 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_xa.test
@@ -206,7 +206,6 @@ while($i > 0)
#
--connection slave
--source include/stop_slave.inc
-set global log_warnings=default;
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
--source include/start_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_retry.test b/mysql-test/suite/rpl/t/rpl_parallel_retry.test
index fe6f40d2..1e87c85c 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_retry.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_retry.test
@@ -411,6 +411,44 @@ DROP function foo;
--sync_slave_with_master server_2
#
+# MDEV-33303: slave_parallel_mode=optimistic should not report the mode's
+# specific temporary errors.
+#
+
+--connection server_2
+--source include/stop_slave.inc
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+SET GLOBAL slave_parallel_threads=4;
+
+--connection server_1
+# The problem occurred in the code path for row-based updates in tables
+# with no primary/unique key, where a scan is needed.
+CREATE TABLE t1 (a INT, b VARCHAR(123)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1, 'asdf');
+UPDATE t1 SET b='zxf1' WHERE a=1;
+UPDATE t1 SET b='\n' WHERE a=1;
+
+--connection server_2
+# Inject a small sleep in the code that makes the race easier to hit.
+SET @old_dbug=@@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,write_row_inject_sleep_before_ha_write_row";
+--source include/start_slave.inc
+
+--connection server_1
+# Here, we would get errors in the slave's error log:
+# [ERROR] mariadbd: Can't find record in 't1'
+--sync_slave_with_master server_2
+
+--connection server_1
+DROP TABLE t1;
+--sync_slave_with_master server_2
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+--source include/start_slave.inc
+
+
+#
# MDEV-12746 rpl.rpl_parallel_optimistic_nobinlog fails committing out of order at retry
#
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
index 58c0db15..90753caf 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_sbm.test
@@ -1,9 +1,9 @@
#
# Ensure that Seconds_Behind_Master works correctly on the parallel replica.
#
---source include/master-slave.inc
--source include/have_log_bin.inc
--source include/have_debug.inc
+--source include/master-slave.inc
--echo #
--echo # MDEV-29639: Seconds_Behind_Master is incorrect for Delayed, Parallel Replicas
@@ -67,11 +67,18 @@ if (`SELECT $sbm_trx1_arrive > ($seconds_since_idling + 1)`)
--echo # if the event is still to be delayed, SBM should resume accordingly
--source include/stop_slave.inc
+
+--echo # Lock t1 on slave to ensure the event can't finish (and thereby update
+--echo # Seconds_Behind_Master) so slow running servers don't accidentally
+--echo # catch up to the master before checking SBM.
+--connection server_2
+LOCK TABLES t1 WRITE;
+
--source include/start_slave.inc
--connection slave
---echo # Waiting for replica to resume the delay for the transaction
---let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting until MASTER_DELAY seconds after master executed event';
+--echo # Waiting for replica to get blocked by the table lock
+--let $wait_condition= SELECT count(*) FROM information_schema.processlist WHERE state LIKE 'Waiting for table metadata lock';
--source include/wait_condition.inc
--echo # Sleeping 1s to increment SBM
@@ -86,6 +93,9 @@ if (`SELECT $sbm_trx1_after_1s_sleep <= $sbm_trx1_arrive`)
}
--echo # ..done
+--connection server_2
+UNLOCK TABLES;
+
--source include/sync_with_master_gtid.inc
--echo #
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_seq.test b/mysql-test/suite/rpl/t/rpl_parallel_seq.test
index b1b15412..cc361a7b 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_seq.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_seq.test
@@ -195,4 +195,22 @@ DROP TABLE ti;
--sync_slave_with_master
+# MDEV-31779 server crash in Rows_log_event::update_sequence at replaying binlog
+--connection master
+--let $binlog_file = query_get_value(SHOW MASTER STATUS, File, 1)
+--let $binlog_start = query_get_value(SHOW MASTER STATUS, Position, 1)
+CREATE SEQUENCE s;
+--disable_ps2_protocol
+SELECT NEXTVAL(s);
+--enable_ps2_protocol
+flush binary logs;
+DROP SEQUENCE s;
+--exec $MYSQL_BINLOG $datadir/$binlog_file | $MYSQL test
+DROP SEQUENCE s;
+
+--sync_slave_with_master
+
+--connection master
+
+
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test b/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test
index efb998b0..94f19a6c 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test
@@ -295,13 +295,14 @@ CREATE FUNCTION foo(x INT, d1 VARCHAR(500), d2 VARCHAR(500))
||
--delimiter ;
SET sql_log_bin=1;
-
+--source include/stop_slave_io.inc
--connection server_1
INSERT INTO t3 VALUES (49,0);
--save_master_pos
--connection server_2
-START SLAVE SQL_THREAD;
+CHANGE MASTER TO master_use_gtid=no;
+--source include/start_slave.inc
--sync_with_master
SELECT * FROM t3 WHERE a >= 40 ORDER BY a;
# Restore the foo() function.
@@ -334,11 +335,6 @@ SET GLOBAL slave_parallel_threads=10;
--echo *** 3. Same as (2), but not using gtid mode ***
---connection server_2
---source include/stop_slave.inc
-CHANGE MASTER TO master_use_gtid=no;
---source include/start_slave.inc
-
--connection server_1
# Set up three transactions on the master that will be group-committed
# together so they can be replicated in parallel on the slave.
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test b/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
index 35879e98..1610292e 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test
@@ -57,6 +57,7 @@ COMMIT;
INSERT INTO t3 VALUES(21, 21);
INSERT INTO t3 VALUES(22, 22);
--save_master_pos
+--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
# Start a connection that will block the replicated transaction halfway.
--connection con_temp1
@@ -64,7 +65,27 @@ BEGIN;
INSERT INTO t2 VALUES (21);
--connection server_2
-START SLAVE;
+
+#
+# Parallel replication will complete any in-progress event group at STOP SLAVE,
+# but only if the event group is already queued up for the worker thread. If
+# the SQL driver thread is delayed in queueing up events, the parallel worker
+# thread can abort the event group, leaving the non-transactional update to the
+# MyISAM table that cannot be rolled back (MDEV-7432). If this happens the test
+# would fail with duplicate key error after slave restart.
+#
+# To avoid this, we here wait for the IO thread to read all master events, and
+# for the SQL driver thread to queue all the events for workers. This wait
+# should be removed if/when MDEV-7432 is fixed.
+#
+START SLAVE IO_THREAD;
+--let $slave_param= Read_Master_Log_Pos
+--let $slave_param_value= $master_pos
+--source include/wait_for_slave_param.inc
+START SLAVE SQL_THREAD;
+--let $wait_condition= SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State LIKE '%Slave has read all relay log; waiting for more updates%'
+--source include/wait_condition.inc
+
# Wait for the MyISAM change to be visible, after which replication will wait
# for con_temp1 to roll back.
--let $wait_condition= SELECT COUNT(*) = 1 FROM t1 WHERE a=20
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_temptable.test b/mysql-test/suite/rpl/t/rpl_parallel_temptable.test
index 3684763d..8bab4af2 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel_temptable.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel_temptable.test
@@ -264,6 +264,30 @@ SET GLOBAL slave_parallel_mode=@old_mode;
--source include/start_slave.inc
+--echo *** MDEV33426: Memory allocation accounting incorrect for replicated temptable
+--connection server_1
+CREATE TEMPORARY TABLE t5 (a int) ENGINE=Aria;
+CREATE TEMPORARY TABLE t6 (a int) ENGINE=Heap;
+INSERT INTO t5 VALUES (1);
+INSERT INTO t6 VALUES (2);
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+
+--connection server_1
+INSERT INTO t1 SELECT a+40, 5 FROM t5;
+INSERT INTO t1 SELECT a+40, 6 FROM t6;
+DROP TABLE t5, t6;
+
+--save_master_pos
+
+--connection server_2
+--source include/start_slave.inc
+--sync_with_master
+SELECT * FROM t1 WHERE a>=40 ORDER BY a;
+
# Clean up.
--connection server_2
diff --git a/mysql-test/suite/rpl/t/rpl_relay_max_extension.test b/mysql-test/suite/rpl/t/rpl_relay_max_extension.test
index acca2f69..b6a8ccb5 100644
--- a/mysql-test/suite/rpl/t/rpl_relay_max_extension.test
+++ b/mysql-test/suite/rpl/t/rpl_relay_max_extension.test
@@ -47,7 +47,7 @@ RESET SLAVE;
--echo #
--let $datadir = `select @@datadir`
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
@@ -64,7 +64,7 @@ RESET SLAVE;
--echo # Restart slave server
--echo #
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
diff --git a/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test b/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test
index 27710063..fab78a92 100644
--- a/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test
+++ b/mysql-test/suite/rpl/t/rpl_rewrite_db_sys_vars.test
@@ -19,15 +19,8 @@ create database replica_db1;
create database y;
# This DB will be rewrited from test case
create database test_replica;
-SELECT @@GLOBAL.replicate_rewrite_db;
let $rewrite_db_sss= query_get_value(SHOW SLAVE STATUS, Replicate_Rewrite_DB, 1);
---echo # Ensuring SHOW SLAVE STATUS produces correct value for Replicate_Rewrite_DB...
-if (`SELECT strcmp(@@global.replicate_rewrite_db, "$rewrite_db_sss") != 0`)
-{
- die SHOW SLAVE STATUS Replicate_Rewrite_DB value $rewrite_db_sss does not match variable @@GLOBAL.replicate_rewrite_db;
-}
---echo # ...success
-
+eval SELECT @@GLOBAL.replicate_rewrite_db, '$rewrite_db_sss' as 'Replicate_Rewrite_DB from SHOW SLAVE STATUS';
--echo # Create DBs and tables on primary
connection master;
@@ -63,16 +56,10 @@ source include/stop_slave.inc;
SET @save_replicate_rewrite_db = @@GLOBAL.replicate_rewrite_db;
SELECT @@GLOBAL.replicate_rewrite_db;
SET @@GLOBAL.replicate_rewrite_db="test_master->test_replica";
-SELECT @@GLOBAL.replicate_rewrite_db;
SHOW DATABASES like 'test_replica';
source include/start_slave.inc;
let $rewrite_db_sss= query_get_value(SHOW SLAVE STATUS, Replicate_Rewrite_DB, 1);
---echo # Ensuring SHOW SLAVE STATUS produces correct value for Replicate_Rewrite_DB...
-if (`SELECT strcmp(@@global.replicate_rewrite_db, "$rewrite_db_sss") != 0`)
-{
- die SHOW SLAVE STATUS Replicate_Rewrite_DB value $rewrite_db_sss does not match variable @@GLOBAL.replicate_rewrite_db;
-}
---echo # ...success
+eval SELECT @@GLOBAL.replicate_rewrite_db, '$rewrite_db_sss' as 'Replicate_Rewrite_DB from SHOW SLAVE STATUS';
--echo # Create DB and tables on primary
connection master;
@@ -101,6 +88,9 @@ select * from test_replica.my_table;
--source include/diff_tables.inc
--echo # Update of values on primary for DB not set in replication_rewrite_db
+--source include/stop_slave.inc
+--source include/reset_slave.inc
+
connection master;
use x;
insert into my_table values (314);
@@ -108,9 +98,6 @@ select * from my_table;
--source include/save_master_gtid.inc
connection slave;
---let $rpl_only_running_threads=1
---source include/stop_slave.inc
---source include/reset_slave.inc
--source include/start_slave.inc
SELECT @@GLOBAL.replicate_rewrite_db;
--source include/sync_with_master_gtid.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
index e3edabe2..f06b2982 100644
--- a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
+++ b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test
@@ -51,7 +51,9 @@ DROP TABLE t1;
# cleanup
--source include/stop_slave.inc
SET @@GLOBAL.debug_dbug = @saved_dbug;
+--disable_query_log
--eval SET GLOBAL log_warnings = $log_warnings_save
+--enable_query_log
--source include/start_slave.inc
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf
new file mode 100644
index 00000000..e8e03e71
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.cnf
@@ -0,0 +1,10 @@
+!include ../my.cnf
+
+[mysqld.1]
+log-warnings=9
+rpl_semi_sync_master_enabled=1
+rpl_semi_sync_master_wait_point=AFTER_COMMIT
+
+[mysqld.2]
+log-warnings=9
+rpl_semi_sync_slave_enabled=1
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
new file mode 100644
index 00000000..65b6e8b4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_cond_var_per_thd.test
@@ -0,0 +1,77 @@
+#
+# This test ensures that, when using semi-sync with the wait_point
+# AFTER_COMMIT, each thread awaiting an ACK is only woken up when its ACK (or
+# an ACK for a later commit in binlog) has been received from the slave.
+#
+# Prior to MDEV-33551, all threads would be woken up for each ACK received,
+# leading to large slowdowns, as each thread would check if the ACK was for it
+# in mutual exclusion from the others.
+#
+# To ensure this, a debug-build-only log warning is added into
+# Repl_semi_sync_master::commit_trx() at wakeup time, which will complain if
+# the awoken thread's binlog wait coordinates are after the coordinate of the
+# last ACK coordinates. Then, we use binlog group commit to commit a series of
+# transactions, such that each will await an ACK concurrently. After all
+# transactions have been finished (i.e. ACKed and committed), we check the log
+# for the expected absence of the added debug warning message.
+#
+#
+# References:
+# MDEV-33551: Semi-sync Wait Point AFTER_COMMIT Slow on Workloads with Heavy
+# Concurrency
+#
+--source include/have_binlog_format_row.inc
+--source include/have_debug.inc
+--source include/master-slave.inc
+
+--connection master
+call mtr.add_suppression("Got an error reading communication packets");
+set @save_bgc_count= @@global.binlog_commit_wait_count;
+set @save_bgc_usec= @@global.binlog_commit_wait_usec;
+set @save_debug_dbug= @@global.debug_dbug;
+set @@global.binlog_commit_wait_count=3;
+set @@global.binlog_commit_wait_usec=10000000;
+set @@global.debug_dbug="+d,testing_cond_var_per_thd";
+
+--echo # Ensure semi-sync is on
+--connection slave
+let $status_var= rpl_semi_sync_slave_status;
+let $status_var_value= ON;
+source include/wait_for_status_var.inc;
+
+--connection master
+let $status_var= rpl_semi_sync_master_status;
+let $status_var_value= ON;
+source include/wait_for_status_var.inc;
+
+--echo # Create three transactions to binlog group commit together
+--connection master
+--send create table t1 (a int)
+--connection server_1
+--send create table t2 (a int)
+--connection default
+--send create table t3 (a int)
+
+--connection master
+--reap
+--connection server_1
+--reap
+--connection default
+--reap
+
+--let $assert_text= Check that there is no 'Thread awaiting semi-sync ACK was awoken before its ACK' warning in error log.
+--let $assert_select=Thread awaiting semi-sync ACK was awoken before its ACK
+--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let $assert_count= 0
+--let $assert_only_after=CURRENT_TEST
+--source include/assert_grep.inc
+
+--echo #
+--echo # Cleanup
+--connection master
+set @@global.binlog_commit_wait_count=@save_bgc_count;
+set @@global.binlog_commit_wait_usec=@save_bgc_usec;
+set @@global.debug_dbug=@save_debug_dbug;
+drop table t1, t2, t3;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc b/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc
index 01b0d0e5..bb705d39 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_crash.inc
@@ -34,14 +34,16 @@ if ($case == 1)
if ($case == 2)
{
SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL con1_ready WAIT_FOR con1_go";
+ SET DEBUG_SYNC= "commit_after_release_LOCK_after_binlog_sync WAIT_FOR con1_go1";
--send_eval $query_to_crash
--connect (conn_client_2,127.0.0.1,root,,test,$SERVER_MYPORT_2,)
# use the same signal with $query_to_crash
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
- SET GLOBAL debug_dbug="d,Notify_binlog_EOF";
+ SET DEBUG_SYNC= "commit_before_get_LOCK_after_binlog_sync SIGNAL con1_go";
+ SET DEBUG_SYNC= "commit_before_get_LOCK_commit_ordered SIGNAL con2_ready";
--send_eval $query2_to_crash
--connection server_$server_to_crash
- SET DEBUG_SYNC= "now WAIT_FOR eof_reached";
+ SET DEBUG_SYNC= "now WAIT_FOR con2_ready";
--source include/kill_mysqld.inc
}
@@ -68,9 +70,7 @@ source include/wait_for_slave_param.inc;
--error 2003
--source include/stop_slave.inc
---let $assert_cond= COUNT(*) = $expected_rows_on_slave FROM t1
---let $assert_text= Table t1 should have $expected_rows_on_slave rows.
---source include/assert.inc
+--eval select count(*) 'on slave must be $expected_rows_on_slave' from t1
SELECT @@GLOBAL.gtid_current_pos;
@@ -81,9 +81,21 @@ SELECT @@GLOBAL.gtid_current_pos;
--enable_reconnect
--source include/wait_until_connected_again.inc
---let $assert_cond= COUNT(*) = $expected_rows_on_master FROM t1
---let $assert_text= Table t1 should have $expected_rows_on_master rows.
---source include/assert.inc
+--let $slave_semi_sync_enabled= query_get_value(SHOW VARIABLES LIKE 'Rpl_semi_sync_slave_enabled', Value, 1)
+--echo # Ensuring variable rpl_semi_sync_slave_enabled is ON..
+if (`SELECT strcmp("ON", "$slave_semi_sync_enabled") != 0`)
+{
+ --die Slave started with rpl_semi_sync_slave_enabled=1 yet it is OFF in the variable output
+}
+
+--let $slave_semi_sync_status= query_get_value(SHOW STATUS LIKE 'Rpl_semi_sync_slave_status', Value, 1)
+--echo # Ensuring status rpl_semi_sync_slave_status is OFF..
+if (`SELECT strcmp("OFF", "$slave_semi_sync_status") != 0`)
+{
+ --die Slave started with skip-slave-start yet started with rpl_semi_sync_slave_status=ON
+}
+
+--eval select count(*) 'on master must be $expected_rows_on_master' from t1
# Check error log for correct messages.
let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.$server_to_crash.err;
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_fail_over.test b/mysql-test/suite/rpl/t/rpl_semi_sync_fail_over.test
index 17d7b50d..e4d0bc0a 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_fail_over.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_fail_over.test
@@ -10,6 +10,11 @@
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
+--disable_query_log
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+flush tables;
+--enable_query_log
+
# Initial slave
--connection server_2
--source include/stop_slave.inc
@@ -78,7 +83,7 @@ SHOW VARIABLES LIKE 'gtid_slave_pos';
--connection server_1
--sync_with_master
---eval SELECT COUNT(*) = $rows_so_far as 'true' FROM t1
+--eval SELECT COUNT(*) 'must be $rows_so_far' FROM t1
--echo # ... the gtid states on the slave:
SHOW VARIABLES LIKE 'gtid_slave_pos';
SHOW VARIABLES LIKE 'gtid_binlog_pos';
@@ -129,7 +134,7 @@ SHOW VARIABLES LIKE 'gtid_slave_pos';
--connection server_2
--sync_with_master
---eval SELECT COUNT(*) = $rows_so_far as 'true' FROM t1
+--eval SELECT COUNT(*) 'must be $rows_so_far as' FROM t1
--echo # ... the gtid states on the slave:
SHOW VARIABLES LIKE 'gtid_slave_pos';
SHOW VARIABLES LIKE 'gtid_binlog_pos';
@@ -180,7 +185,7 @@ SHOW VARIABLES LIKE 'gtid_slave_pos';
--connection server_1
--source include/sync_with_master_gtid.inc
---eval SELECT COUNT(*) = $rows_so_far as 'true' FROM t1
+--eval SELECT COUNT(*) 'must be $rows_so_far' FROM t1
--echo # ... the gtid states on the slave:
SHOW VARIABLES LIKE 'gtid_slave_pos';
SHOW VARIABLES LIKE 'gtid_binlog_pos';
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test b/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test
index 05e6fcca..d653d84c 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test
@@ -4,19 +4,17 @@
# finishes off as specified in particular trying to connect even to a shut down
# master for a semisync firewell routine.
-source include/not_embedded.inc;
-source include/have_debug.inc;
source include/master-slave.inc;
--connection master
---let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled `
+--let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled`
SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
--connection slave
source include/stop_slave.inc;
---let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled `
-SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1;
+--let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled`
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = 1;
source include/start_slave.inc;
--connection master
@@ -52,7 +50,6 @@ source include/rpl_start_server.inc;
#--source include/start_slave.inc
--connection master
-SET @@GLOBAL.debug_dbug="";
--eval SET @@GLOBAL. rpl_semi_sync_master_enabled = $sav_enabled_master
--connection master
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
index 2cf1b178..5f69b557 100644
--- 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
@@ -1,13 +1,13 @@
!include ../my.cnf
[mysqld.1]
-log_warnings=9
+log_warnings=3
[mysqld.2]
-log_warnings=9
+log_warnings=3
[mysqld.3]
-log_warnings=9
+log_warnings=3
[ENV]
SERVER_MYPORT_3= @mysqld.3.port
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
index 252541ae..d20ef628 100644
--- 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
@@ -3,7 +3,6 @@
# 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
@@ -32,8 +31,8 @@ while (`SELECT $i <= $slave_last`)
--connection server_$i
--sync_with_master
- set global rpl_semi_sync_slave_enabled = 1;
source include/stop_slave.inc;
+ set global rpl_semi_sync_slave_enabled = 1;
source include/start_slave.inc;
show status like 'Rpl_semi_sync_slave_status';
@@ -56,8 +55,6 @@ 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
@@ -66,6 +63,11 @@ show status like 'Rpl_semi_sync_master_clients';
--echo #--
--echo #-- Test begins
+--connection server_1_con2
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+wait
+EOF
+
--connection server_1
--echo #-- Begin semi-sync transaction
--send INSERT INTO t1 VALUES (1)
@@ -75,25 +77,13 @@ show status like 'Rpl_semi_sync_master_clients';
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
+SHUTDOWN WAIT FOR ALL SLAVES;
+--source include/wait_until_disconnected.inc
--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
+--error 2013
--reap
--source include/wait_until_disconnected.inc
@@ -111,19 +101,72 @@ show status like 'Rpl_semi_sync_master_no_tx';
--echo #
--echo #-- Re-synchronize slaves with master and disable semi-sync
+if (`SELECT ($server_2_expect_row_count + $server_3_expect_row_count) < 2`)
+{
+--echo #-- FIXME: workaround for MDEV-28141, preventing errored replicas from
+--echo # killing their semi-sync connections
+# I.e. we can't create a new kill connection to the primary if we know that the
+# primary is shutting down for risk of Packets out of order error. So we wait
+# to hit a debug_sync point before the creation of the new kill_connection, and
+# don't progress until the primary has been shutdown, so no new connection can
+# be formed.
+# Note this is only needed in the error case (using corrupt_queue_event), as
+# the running io_thread will otherwise automatically detect that the primary
+# has shutdown before progressing to the cleanup of the io thread.
+}
+
+if (!$server_2_expect_row_count)
+{
+ --connection server_2
+ set debug_sync= "now wait_for at_semisync_kill_connection";
+ set debug_sync= "now signal continue_semisync_kill_connection";
+ --echo # Wait for debug_sync signal to have been received before issuing RESET
+ let $wait_condition= select count(*)=0 from information_schema.processlist where state like "debug sync point%";
+ source include/wait_condition.inc;
+ set debug_sync= "reset";
+}
+if (!$server_3_expect_row_count)
+{
+ --connection server_3
+ set debug_sync= "now wait_for at_semisync_kill_connection";
+ set debug_sync= "now signal continue_semisync_kill_connection";
+ --echo # Wait for debug_sync signal to have been received before issuing RESET
+ let $wait_condition= select count(*)=0 from information_schema.processlist where state like "debug sync point%";
+ source include/wait_condition.inc;
+ set debug_sync= "reset";
+}
+
--echo #-- Stop slaves
--connection server_2
---eval SET @@GLOBAL.debug_dbug= "$sav_server_2_dbug"
---eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0
---let $rpl_only_running_threads= 1
-source include/stop_slave.inc;
+# If server_2_expect_row_count is 0, we are simulating an error on the replica
+# and the IO thread will end with errno 1595.
+# Otherwise, we still expect error, because the master has shutdown at this
+# point, and the IO thread may or may not have realized the shutdown, and
+# started to try to automatically reconnect. This may result in the IO thread
+# giving a 2003 error if the slave tries to reconnect to a shutdown master.
+# Additionally disable warnings because the slave may have stopped in err
+# automatically, and we don't want a sporadic "Slave is already stopped"
+# warning.
+--disable_warnings
+--let $rpl_allow_error= 1
+--source include/stop_slave_io.inc
+--enable_warnings
+--let $rpl_allow_error=
+--source include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_2;
--connection server_3
---eval SET @@GLOBAL.debug_dbug= "$sav_server_3_dbug"
---eval SET @@GLOBAL.rpl_semi_sync_slave_enabled= 0
---let $rpl_only_running_threads= 1
-source include/stop_slave.inc;
+# Expect error for IO thread, see above comment for stopping server_2
+--disable_warnings
+--let $rpl_allow_error= 1
+--source include/stop_slave_io.inc
+--enable_warnings
+--let $rpl_allow_error=
+--source include/stop_slave_sql.inc
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled= @sav_enabled_server_3;
--echo #-- Bring the master back up
--connection server_1_con2
@@ -142,13 +185,6 @@ EOF
--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
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
index 6c088c57..4ed9ca0a 100644
--- 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
@@ -5,7 +5,7 @@
# 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
+# kill the Ack_thread 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
@@ -15,23 +15,18 @@
# 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.
+# `SHUTDOWN WAIT FOR SLAVES`. We create four test cases to ensure the
+# Ack_thread is 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).
+# timeout, the primary should delay killing the Ack_thread
+# until an ACK is received.
# 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).
+# primary should delay killing the Ack_thread until the
+# the timeout is reached.
# 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).
+# primary should delay killing the Ack_thread until it
+# receives an ACK from the delayed slave.
# 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
@@ -41,9 +36,11 @@
# 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).
+# send a `QUIT` in this case.
+# Test Case 5) If a waiting-for-ACK user thread is killed (disconnected)
+# during SHUTDOWN WAIT FOR ALL SLAVES, ensure the primary will
+# still await the ACK from the replica before killing the
+# Ack_thread.
#
# References:
# MDEV-11853: semisync thread can be killed after sync binlog but before ACK
@@ -58,6 +55,7 @@
--echo # Note: Simulated slave delay is hardcoded to 800 milliseconds
--echo # Note: Simulated master shutdown delay is hardcoded to 500 milliseconds
+--source include/have_innodb.inc
--source include/have_debug.inc
--let $rpl_topology=1->2, 1->3
--source include/rpl_init.inc
@@ -69,9 +67,8 @@ call mtr.add_suppression("Timeout waiting");
call mtr.add_suppression("did not exit");
call mtr.add_suppression("Got an error reading communication packets");
---let $sav_master_timeout= `SELECT @@global.rpl_semi_sync_master_timeout`
+--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
@@ -79,19 +76,19 @@ 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`
+set @sav_enabled_server_2= @@GLOBAL.rpl_semi_sync_slave_enabled;
+set @sav_server_2_dbug= @@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`
+set @sav_enabled_server_3= @@GLOBAL.rpl_semi_sync_slave_enabled;
+set @sav_server_3_dbug= @@GLOBAL.debug_dbug;
--connection server_1
-CREATE TABLE t1 (a int);
+CREATE TABLE t1 (a int) engine=innodb;
--save_master_pos
--let i= 2
@@ -113,10 +110,9 @@ while (`SELECT $i <= $slave_last`)
--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 # allowed timeout, the primary should delay killing the Ack_thread
+--echo # until an ACK is received.
--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
@@ -126,12 +122,11 @@ while (`SELECT $i <= $slave_last`)
--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 # the primary should delay killing the Ack_thread until the
+--echo # timeout is reached.
--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 server_2_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
+--let server_3_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
--let semisync_timeout= 500
--let server_2_expect_row_count= 0
--let server_3_expect_row_count= 0
@@ -140,11 +135,10 @@ while (`SELECT $i <= $slave_last`)
--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 # primary should delay killing the Ack_thread until it receives an
+--echo # ACK from the delayed slave.
--echo #
---let server_1_dbug= "+d,mysqld_delay_kill_threads_phase_1"
---let server_2_dbug= "+d,corrupt_queue_event"
+--let server_2_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
--let server_3_dbug= "+d,simulate_delay_semisync_slave_reply"
--let semisync_timeout= 1600
--let server_2_expect_row_count= 0
@@ -160,56 +154,123 @@ while (`SELECT $i <= $slave_last`)
--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 # slave does not send a `QUIT` in this case.
--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_2_dbug= "+d,corrupt_queue_event,delay_semisync_kill_connection_for_mdev_28141"
--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
+#
+# Added with MDEV-33551
+#
+--echo #
+--echo # Test Case 5) If a waiting-for-ACK user thread is killed (disconnected)
+--echo # during SHUTDOWN WAIT FOR ALL SLAVES, ensure the primary will still
+--echo # await the ACK from the replica before killing the Ack_receiver thread
+--echo #
+--connection server_1
+insert into t1 values (1);
+--source include/save_master_gtid.inc
+
+--connection server_2
+--source include/sync_with_master_gtid.inc
+--source include/stop_slave.inc
+SET GLOBAL rpl_semi_sync_slave_enabled= 1;
+--source include/start_slave.inc
+
+--connection server_1
+SET GLOBAL rpl_semi_sync_master_enabled= 1;
+SET GLOBAL rpl_semi_sync_master_timeout= 2000;
+
+--let $status_var= Rpl_semi_sync_master_clients
+--let $status_var_value= 1
+source include/wait_for_status_var.inc;
+
+show status like 'Rpl_semi_sync_master_status';
+show status like 'Rpl_semi_sync_master_clients';
+
+--connection server_2
+SET @old_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,simulate_delay_semisync_slave_reply";
+
+--connect(con1, localhost, root,,)
+--connect(con2, localhost, root,,)
+
+--connection con1
+--send insert into t1 values (2)
+
+--connection server_1
+--echo # Wait for thd to begin semi-sync wait..
+--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE state = 'Waiting for semi-sync ACK from slave'
+--source include/wait_condition.inc
+--echo # ..done
+
+--disconnect con1
+
+--connection default
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+wait
+EOF
+
+--connection con2
+SHUTDOWN WAIT FOR ALL SLAVES;
+--source include/wait_until_disconnected.inc
+
+--echo # Ensure the primary waited for the ACK of the killed thread
+--let $SEARCH_PATTERN= Delaying shutdown to await semi-sync ACK
+--let $SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err
+--source include/search_pattern_in_file.inc
+
+--connection default
+--source include/wait_until_disconnected.inc
+
+--connection server_1
+--source include/wait_until_disconnected.inc
+
+--connection server_2
+--let $rpl_allow_error= 1
+source include/stop_slave.inc;
+--connection server_3
+source include/stop_slave.inc;
+--let $rpl_allow_error=
+
+--connection default
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+restart
+EOF
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--connection server_1
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+
--echo #############################
--echo # Cleanup
--echo #############################
--connection server_2
-source include/stop_slave.inc;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_2;
+SET @@GLOBAL.debug_dbug= @sav_server_2_dbug;
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;
+SET @@GLOBAL.rpl_semi_sync_slave_enabled = @sav_enabled_server_3;
+SET @@GLOBAL.debug_dbug= @sav_server_3_dbug;
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"
+--eval SET @@GLOBAL.rpl_semi_sync_master_timeout= $sav_master_timeout;
+--eval SET @@GLOBAL.rpl_semi_sync_master_enabled= $sav_enabled_master;
--enable_query_log
drop table t1;
diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_slave_enabled_consistent.test b/mysql-test/suite/rpl/t/rpl_semi_sync_slave_enabled_consistent.test
index 9e388ab4..ca7e7887 100644
--- a/mysql-test/suite/rpl/t/rpl_semi_sync_slave_enabled_consistent.test
+++ b/mysql-test/suite/rpl/t/rpl_semi_sync_slave_enabled_consistent.test
@@ -14,6 +14,9 @@
call mtr.add_suppression("Replication event checksum verification failed");
call mtr.add_suppression("could not queue event from master");
+call mtr.add_suppression("Semisync ack receiver.*error reading communication packets");
+call mtr.add_suppression("Semisync ack receiver got hangup");
+--sync_slave_with_master
--echo #
--echo # Set up a semisync connection
diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_status.test b/mysql-test/suite/rpl/t/rpl_show_slave_status.test
new file mode 100644
index 00000000..f4bbb5fa
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_show_slave_status.test
@@ -0,0 +1,27 @@
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+--echo *
+--echo * The purpose of this test is to prevent incorrect additions to SHOW
+--echo * SLAVE STATUS, which has happened several times in the past.
+--echo *
+--echo * We must never, _ever_, add extra rows to this output of SHOW SLAVE
+--echo * STATUS, except at the very end, as this breaks backwards compatibility
+--echo * with applications or scripts that parse the output. This also means that
+--echo * we cannot add _any_ new rows in a GA version if a different row was
+--echo * already added in a later MariaDB version, as this would make it impossible
+--echo * to merge the change up while preserving the order of rows.
+--echo *
+
+--connection slave
+--replace_column 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 #
+query_vertical
+SHOW SLAVE STATUS;
+
+--echo *
+--echo * When modifying this test after adding a column to SHOW SLAVE STATUS,
+--echo * _only_ additions at the end are allowed, the column number of existing
+--echo * columns must _not_ change!
+--echo *
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_shutdown_sighup.test b/mysql-test/suite/rpl/t/rpl_shutdown_sighup.test
new file mode 100644
index 00000000..d1940f81
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_shutdown_sighup.test
@@ -0,0 +1,154 @@
+#
+# The signal handler thread can use various different runtime resources when
+# processing a SIGHUP (e.g. master-info information), as the logic calls into
+# reload_acl_and_cache(). This test ensures that SIGHUP processing, when
+# concurrent with server shutdown, the shutdown logic must wait for the SIGHUP
+# processing to finish before cleaning up any resources.
+#
+# Additionally, the error case is tested such that the signal handler thread
+# takes too long processing a SIGHUP, and the main mysqld thread must skip its
+# wait and output a warning.
+#
+# Note the SIGHUP is sent via the command-line kill program via a perl script.
+#
+# References:
+# MDEV-30260: Slave crashed:reload_acl_and_cache during shutdown
+#
+
+--source include/not_windows.inc
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+# Binlog format doesn't matter
+--source include/have_binlog_format_statement.inc
+--source include/master-slave.inc
+
+# For error test case which forces timeout
+--connection slave
+set statement sql_log_bin=0 for call mtr.add_suppression("Signal handler thread did not exit in a timely manner");
+
+
+--echo #
+--echo # Main test
+--connection master
+create table t1 (a int);
+insert into t1 values (1);
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+# Make signal handler handle SIGHUP..
+set @@global.debug_dbug= "+d,hold_sighup_log_refresh";
+--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
+--perl
+ my $kill_sig = $ENV{'KILL_SIGNAL_VALUE'};
+ my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
+ my $mysqld_pid = `cat $pid_filename`;
+ chomp($mysqld_pid);
+ system("kill -HUP $mysqld_pid");
+ exit(0);
+EOF
+
+--echo # Waiting for sighup to reach reload_acl_and_cache..
+set debug_sync="now wait_for in_reload_acl_and_cache";
+--echo # Signalling signal handler to proceed to sleep before REFRESH_HOSTS
+set debug_sync="now signal refresh_logs";
+
+# ..while we are shutting down
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+wait
+EOF
+--echo # Starting shutdown (note this will take 3+ seconds due to DBUG my_sleep in reload_acl_and_cache)
+shutdown;
+
+--source include/wait_until_disconnected.inc
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+restart: --skip-slave-start=0
+EOF
+
+--connection server_2
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--connection slave
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--let $assert_text= Ensure Mariadbd did not segfault when shutting down
+--let $assert_select= got signal 11
+--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_count= 0
+--let $assert_only_after = CURRENT_TEST: rpl.rpl_shutdown_sighup
+--source include/assert_grep.inc
+
+--connection master
+--sync_slave_with_master
+
+
+--echo #
+--echo # Error testcase to ensure an error message is shown if the signal
+--echo # takes longer than the timeout while processing the SIGHUP
+
+--connection slave
+set @@global.debug_dbug= "+d,force_sighup_processing_timeout";
+set @@global.debug_dbug= "+d,hold_sighup_log_refresh";
+
+--connection master
+insert into t1 values (1);
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+# Make signal handler handle SIGHUP..
+--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
+--perl
+ my $kill_sig = $ENV{'KILL_SIGNAL_VALUE'};
+ my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
+ my $mysqld_pid = `cat $pid_filename`;
+ chomp($mysqld_pid);
+ system("kill -HUP $mysqld_pid");
+ exit(0);
+EOF
+--echo # Waiting for sighup to reach reload_acl_and_cache..
+set debug_sync="now wait_for in_reload_acl_and_cache";
+--echo # Signalling signal handler to proceed to sleep before REFRESH_HOSTS
+set debug_sync="now signal refresh_logs";
+
+# ..while we are shutting down
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+wait
+EOF
+--echo # Starting shutdown (note this will take 3+ seconds due to DBUG my_sleep in reload_acl_and_cache)
+shutdown;
+
+--source include/wait_until_disconnected.inc
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+restart: --skip-slave-start=0
+EOF
+
+--connection server_2
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--connection slave
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--let $assert_text= Ensure warning is issued that signal handler thread is still processing
+--let $assert_select= Signal handler thread did not exit in a timely manner.
+--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_count= 1
+--let $assert_only_after = CURRENT_TEST: rpl.rpl_shutdown_sighup
+--source include/assert_grep.inc
+
+
+--echo #
+--echo # Cleanup
+--connection master
+drop table t1;
+
+--source include/rpl_end.inc
+--echo # End of rpl_shutdown_sighup.test
diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test
index d3ef834e..ee11ce5a 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_error.test
+++ b/mysql-test/suite/rpl/t/rpl_skip_error.test
@@ -3,7 +3,11 @@
# Verify that --slave-skip-errors works correctly. The error messages
# specified by --slave-skip-errors on slave should be ignored. If
# such errors occur, they should not be reported and not cause the
-# slave to stop.
+# slave to stop. If a skipped-due-to-error statement is a part of a
+# larger transaction, and the error is not a deadlock error, the rest
+# of the transaction should still commit, with just the errored statement
+# ignored (note transactions which are skipped due to deadlocks are
+# rolled back fully, see rpl_temporary_error2_skip_all.test).
#
# ==== Method ====
#
@@ -164,6 +168,42 @@ let $current_skipped_error= query_get_value(show global status like "Slave_skipp
--echo **** We cannot execute a select as there are differences in the
--echo **** behavior between STMT and RBR.
+
+--echo ****
+--echo **** Ensure transactions which are skipped due to encountering a
+--echo **** non-deadlock error which is present in --slave-skip-errors result
+--echo **** in partially committed transactions
+# Slave will insert 3 first, and master will insert 3 within a larger trx
+--let $value_preexisting_on_slave= 3
+
+--connection master
+CREATE TABLE t3 (a INT UNIQUE) ENGINE=InnoDB;
+
+--sync_slave_with_master
+--connection slave
+--eval INSERT INTO t3 VALUES ($value_preexisting_on_slave)
+
+--connection master
+BEGIN;
+INSERT INTO t3 VALUES (1);
+INSERT INTO t3 VALUES (2);
+--eval INSERT INTO t3 VALUES ($value_preexisting_on_slave)
+INSERT INTO t3 VALUES (4);
+COMMIT;
+--sync_slave_with_master
+
+--echo **** Master and slave tables should have the same data, due to the
+--echo **** partially replicated transaction's data overlapping with the data
+--echo **** that pre-existed on the slave. That is, despite the transaction
+--echo **** consisting of 4 statements, the errored statement should be ignored
+--echo **** and the other 3 should commit successfully.
+let $diff_tables=master:t3,slave:t3;
+source include/diff_tables.inc;
+
+--connection master
+DROP TABLE t3;
+
+
--echo ==== Clean Up ====
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_sync.test b/mysql-test/suite/rpl/t/rpl_sync.test
index 1e2ec2ca..3dd99e73 100644
--- a/mysql-test/suite/rpl/t/rpl_sync.test
+++ b/mysql-test/suite/rpl/t/rpl_sync.test
@@ -82,7 +82,7 @@ print FILE "failure";
close ($file);
EOF
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
SET SESSION debug_dbug="d,crash_before_rotate_relaylog";
--error 2013
FLUSH LOGS;
@@ -130,7 +130,7 @@ print FILE @content;
close FILE;
EOF
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+--write_line restart $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
SET SESSION debug_dbug="d,crash_before_rotate_relaylog";
--error 2013
FLUSH LOGS;
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_error2.test b/mysql-test/suite/rpl/t/rpl_temporary_error2.test
index 49194c5d..3537499d 100644
--- a/mysql-test/suite/rpl/t/rpl_temporary_error2.test
+++ b/mysql-test/suite/rpl/t/rpl_temporary_error2.test
@@ -64,7 +64,14 @@ ROLLBACK;
--connection slave
--sync_with_master
SELECT * FROM t1 ORDER BY a;
---echo * There will be two rows in t2 due to the retry.
+if (!$ignored_db_deadlock)
+{
+ --echo * There will be two rows in t2 due to the retry.
+}
+if ($ignored_db_deadlock)
+{
+ --echo * There will be one row in t2 because the ignored deadlock does not retry.
+}
SELECT * FROM t2 ORDER BY a;
let $new_retry= query_get_value(SHOW STATUS LIKE 'Slave_retried_transactions', Value, 1);
--disable_query_log
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all-slave.opt b/mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all-slave.opt
new file mode 100644
index 00000000..a9ddd735
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all-slave.opt
@@ -0,0 +1 @@
+--slave-skip-errors=all
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all.test b/mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all.test
new file mode 100644
index 00000000..6801bf18
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_temporary_error2_skip_all.test
@@ -0,0 +1,3 @@
+--source include/have_binlog_format_row.inc
+--let $ignored_db_deadlock= 1
+--source rpl_temporary_error2.test
diff --git a/mysql-test/suite/rpl/t/rpl_using_gtid_default.test b/mysql-test/suite/rpl/t/rpl_using_gtid_default.test
index c14695f9..1557fcdc 100644
--- a/mysql-test/suite/rpl/t/rpl_using_gtid_default.test
+++ b/mysql-test/suite/rpl/t/rpl_using_gtid_default.test
@@ -42,10 +42,9 @@
# replication is used by default if master supports it
#
--source include/have_debug.inc
---source include/master-slave.inc
-
# Format independent test so just use one
--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
--echo #
--echo # Slave default configuration should be Slave_Pos
diff --git a/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
index cd0f8aad..815b2537 100644
--- a/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
+++ b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
@@ -3,7 +3,10 @@
#
--source include/master-slave.inc
+--disable_query_log
call mtr.add_suppression("Master is configured to log replication events");
+call mtr.add_suppression("Could not read packet:.* errno: 11");
+--enable_query_log
--connection slave
diff --git a/mysql-test/suite/s3/mysqldump.result b/mysql-test/suite/s3/mysqldump.result
index 3f4c2081..e0c0caf6 100644
--- a/mysql-test/suite/s3/mysqldump.result
+++ b/mysql-test/suite/s3/mysqldump.result
@@ -4,6 +4,7 @@ alter table t1 engine=S3;
#####
# mysqldump with --copy-s3-tables=0 (by default)
###
+/*!999999\- enable the sandbox mode */
#####
# mysqldump with --copy-s3-tables=0 (by default) XML
###
@@ -15,6 +16,7 @@ alter table t1 engine=S3;
#####
# mysqldump with --copy-s3-tables=1
###
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
diff --git a/mysql-test/suite/s3/partition.result b/mysql-test/suite/s3/partition.result
index 9face3ec..20530bd3 100644
--- a/mysql-test/suite/s3/partition.result
+++ b/mysql-test/suite/s3/partition.result
@@ -55,8 +55,6 @@ ERROR HY000: Table 't2' is read only
ALTER TABLE t2 ANALYZE PARTITION p3;
Table Op Msg_type Msg_text
s3.t2 analyze status Table 's3.t2' is read only
-s3.t2 analyze status Engine-independent statistics collected
-s3.t2 analyze status OK
SELECT count(*) FROM t2;
count(*)
6
diff --git a/mysql-test/suite/sql_sequence/mysqldump.result b/mysql-test/suite/sql_sequence/mysqldump.result
index 0199bb71..72828043 100644
--- a/mysql-test/suite/sql_sequence/mysqldump.result
+++ b/mysql-test/suite/sql_sequence/mysqldump.result
@@ -3,6 +3,7 @@ CREATE TABLE t1(a INT, KEY (a)) KEY_BLOCK_SIZE=1024;
insert into t1 values (1),(2);
CREATE SEQUENCE x1 engine=innodb;
# dump whole database
+/*!999999\- enable the sandbox mode */
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB;
@@ -18,6 +19,7 @@ INSERT INTO `t1` VALUES
(1),
(2);
# dump by tables order 1
+/*!999999\- enable the sandbox mode */
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB;
@@ -33,6 +35,7 @@ INSERT INTO `t1` VALUES
(1),
(2);
# dump by tables order 2
+/*!999999\- enable the sandbox mode */
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB;
@@ -48,6 +51,7 @@ INSERT INTO `t1` VALUES
(1),
(2);
# dump by tables only tables
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -59,6 +63,7 @@ INSERT INTO `t1` VALUES
(1),
(2);
# dump by tables only sequences
+/*!999999\- enable the sandbox mode */
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
CREATE SEQUENCE `x1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB;
diff --git a/mysql-test/suite/sys_vars/r/debug_dbug_utf16le.result b/mysql-test/suite/sys_vars/r/debug_dbug_utf16le.result
new file mode 100644
index 00000000..83b378f2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/debug_dbug_utf16le.result
@@ -0,0 +1,31 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-28366 GLOBAL debug_dbug setting affected by collation_connection=utf16...
+#
+SET NAMES utf8;
+SET collation_connection=utf16le_general_ci;
+SET debug_dbug='d,any_random_string';
+SELECT @@debug_dbug;
+@@debug_dbug
+d,any_random_string
+SET debug_dbug=CONCAT('d,', _latin1 0xDF);
+SELECT @@debug_dbug;
+@@debug_dbug
+d,ß
+SELECT HEX(@@debug_dbug);
+HEX(@@debug_dbug)
+642CC39F
+SET @@debug_dbug=NULL;
+SELECT @@debug_dbug;
+@@debug_dbug
+
+SET @@debug_dbug=DEFAULT;
+SELECT @@debug_dbug;
+@@debug_dbug
+
+SET NAMES latin1;
+#
+# End of 10.5 tests
+#
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 477eb7fc..db0de5e3 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
@@ -22,7 +22,4 @@ Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be
set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = @space_id;
drop table t1;
-# Must always be 0.
-SELECT @@global.innodb_fil_make_page_dirty_debug;
-@@global.innodb_fil_make_page_dirty_debug
-0
+set global innodb_fil_make_page_dirty_debug = 0;
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 b306749d..2096e65f 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
@@ -23,6 +23,7 @@ set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = @space_id;
drop table t1;
set global innodb_saved_page_number_debug = 0;
+set global innodb_fil_make_page_dirty_debug = 0;
SELECT @@global.innodb_saved_page_number_debug;
@@global.innodb_saved_page_number_debug
0
diff --git a/mysql-test/suite/sys_vars/r/replicate_rewrite_db.result b/mysql-test/suite/sys_vars/r/replicate_rewrite_db.result
index 2dfe3a65..7a15a270 100644
--- a/mysql-test/suite/sys_vars/r/replicate_rewrite_db.result
+++ b/mysql-test/suite/sys_vars/r/replicate_rewrite_db.result
@@ -85,15 +85,13 @@ SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate
VARIABLE_NAME VARIABLE_VALUE
REPLICATE_REWRITE_DB db1->db2,db3->db4
# Check restart with appending the value
-# restart: --replicate_rewrite_db=X->Y
+# restart: --replicate_rewrite_db='X->Y'
SELECT @@GLOBAL.replicate_rewrite_db;
@@GLOBAL.replicate_rewrite_db
-test->rewrite,mysqltest1->test,a->b,X->Y
+test->rewrite,mysqltest1->test,a->b,'X->Y'
# Check restart with wrong value on CLI
[ERROR] Bad syntax in replicate-rewrite-db.Expected syntax is FROM->TO.
-# restart:
+# restart
SELECT @@GLOBAL.replicate_rewrite_db;
@@GLOBAL.replicate_rewrite_db
test->rewrite,mysqltest1->test,a->b
-# Cleanup.
-SET @@GLOBAL.replicate_rewrite_db = @save_replicate_rewrite_db;
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 72b40415..43988a81 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
-1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
+1158,1159,1160,1161,1205,1213,1020,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 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701,10,20,5000,400
show session variables like 'slave_transaction_retry_errors';
Variable_name Value
-slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1020,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 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
+SLAVE_TRANSACTION_RETRY_ERRORS 1158,1159,1160,1161,1205,1213,1020,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 1158,1159,1160,1161,1205,1213,1429,2013,12701,10,20,5000,400
+SLAVE_TRANSACTION_RETRY_ERRORS 1158,1159,1160,1161,1205,1213,1020,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/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
index 9ae5049b..81db8629 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -1,4 +1,6 @@
-@@ -49,7 +49,7 @@
+--- sysvars_innodb.result
++++ sysvars_innodb.result,32bit
+@@ -47,7 +47,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
@@ -7,7 +9,7 @@
VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8)
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -73,7 +73,7 @@
+@@ -71,7 +71,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -16,7 +18,7 @@
VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -85,10 +85,10 @@
+@@ -83,10 +83,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -29,7 +31,7 @@
NUMERIC_BLOCK_SIZE 1048576
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -121,7 +121,7 @@
+@@ -119,7 +119,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
@@ -38,7 +40,7 @@
VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
-@@ -205,7 +205,7 @@
+@@ -203,7 +203,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -47,7 +49,7 @@
VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -325,7 +325,7 @@
+@@ -323,7 +323,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 5
VARIABLE_SCOPE GLOBAL
@@ -56,7 +58,7 @@
VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -349,7 +349,7 @@
+@@ -347,7 +347,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
@@ -65,7 +67,7 @@
VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 75
-@@ -625,7 +625,7 @@
+@@ -623,7 +623,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 600
VARIABLE_SCOPE GLOBAL
@@ -74,7 +76,7 @@
VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -673,7 +673,7 @@
+@@ -671,7 +671,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
@@ -83,7 +85,7 @@
VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1000
-@@ -697,7 +697,7 @@
+@@ -695,7 +695,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -92,7 +94,7 @@
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 3
-@@ -721,7 +721,7 @@
+@@ -719,7 +719,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
@@ -101,7 +103,7 @@
VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
-@@ -757,7 +757,7 @@
+@@ -755,7 +755,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -110,7 +112,7 @@
VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt. Value 5 can return bogus data, and 6 can permanently corrupt data.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 6
-@@ -781,10 +781,10 @@
+@@ -779,10 +779,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 8000000
VARIABLE_SCOPE GLOBAL
@@ -123,7 +125,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -817,7 +817,7 @@
+@@ -815,7 +815,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 84
VARIABLE_SCOPE GLOBAL
@@ -132,7 +134,7 @@
VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 84
-@@ -829,7 +829,7 @@
+@@ -827,7 +827,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 3
VARIABLE_SCOPE GLOBAL
@@ -141,7 +143,7 @@
VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16
-@@ -841,7 +841,7 @@
+@@ -839,7 +839,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
@@ -150,7 +152,7 @@
VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
NUMERIC_MIN_VALUE 1000
NUMERIC_MAX_VALUE 10000
-@@ -853,10 +853,10 @@
+@@ -851,10 +851,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 2000000000
VARIABLE_SCOPE GLOBAL
@@ -163,7 +165,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -877,7 +877,7 @@
+@@ -875,7 +875,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
@@ -172,7 +174,7 @@
VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 16
-@@ -889,10 +889,10 @@
+@@ -887,10 +887,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 640000000
VARIABLE_SCOPE GLOBAL
@@ -185,7 +187,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -937,22 +937,22 @@
+@@ -935,22 +935,22 @@
SESSION_VALUE NULL
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
@@ -213,20 +215,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -985,10 +985,10 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 16777216
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Redo log buffer size in bytes.
- NUMERIC_MIN_VALUE 2097152
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 4096
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
-@@ -1033,10 +1033,10 @@
+@@ -1043,10 +1043,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 32
VARIABLE_SCOPE GLOBAL
@@ -239,7 +228,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1045,10 +1045,10 @@
+@@ -1055,10 +1055,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1536
VARIABLE_SCOPE GLOBAL
@@ -252,7 +241,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1081,10 +1081,10 @@
+@@ -1091,10 +1091,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -265,7 +254,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1093,7 +1093,7 @@
+@@ -1103,7 +1103,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -274,7 +263,7 @@
VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 10000000
-@@ -1225,10 +1225,10 @@
+@@ -1235,10 +1235,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
@@ -287,7 +276,7 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -1249,7 +1249,7 @@
+@@ -1259,7 +1259,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 16384
VARIABLE_SCOPE GLOBAL
@@ -296,7 +285,7 @@
VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 65536
-@@ -1285,7 +1285,7 @@
+@@ -1295,7 +1295,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1000
VARIABLE_SCOPE GLOBAL
@@ -305,7 +294,7 @@
VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5000
-@@ -1297,7 +1297,7 @@
+@@ -1307,7 +1307,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 128
VARIABLE_SCOPE GLOBAL
@@ -314,7 +303,7 @@
VARIABLE_COMMENT Deprecated parameter with no effect
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 128
-@@ -1333,7 +1333,7 @@
+@@ -1343,7 +1343,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 56
VARIABLE_SCOPE GLOBAL
@@ -323,7 +312,7 @@
VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-@@ -1405,7 +1405,7 @@
+@@ -1427,7 +1427,7 @@
SESSION_VALUE NULL
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
@@ -332,7 +321,7 @@
VARIABLE_COMMENT Memory buffer size for index creation
NUMERIC_MIN_VALUE 65536
NUMERIC_MAX_VALUE 67108864
-@@ -1573,10 +1573,10 @@
+@@ -1595,10 +1595,10 @@
SESSION_VALUE NULL
DEFAULT_VALUE 30
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index e0ce1f69..6a7e184f 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -983,10 +983,10 @@ VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 16777216
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Redo log buffer size in bytes.
NUMERIC_MIN_VALUE 2097152
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 2147479552
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -1027,6 +1027,18 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_SPIN_WAIT_DELAY
+SESSION_VALUE NULL
+DEFAULT_VALUE 0
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Delay between log buffer spin lock polls (0 to use a blocking latch)
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 6000
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LRU_FLUSH_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 32
@@ -1399,6 +1411,18 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SNAPSHOT_ISOLATION
+SESSION_VALUE OFF
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Use snapshot isolation (write-write conflict detection).
+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 INNODB_SORT_BUFFER_SIZE
SESSION_VALUE NULL
DEFAULT_VALUE 1048576
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 96e1c92c..b58d18fb 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -2324,12 +2324,12 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_ADJUST_SECONDARY_KEY_COSTS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT 0 = No changes. 1 = Update secondary key costs for ranges to be at least 5x of clustered primary key costs. 2 = Remove 'max_seek optimization' for secondary keys and slight adjustment of filter cost. This option will be deleted in MariaDB 11.0 as it is not needed with the new 11.0 optimizer.
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 2
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT A bit field with the following values: adjust_secondary_key_cost = Update secondary key costs for ranges to be at least 5x of clustered primary key costs. disable_max_seek = Disable 'max_seek optimization' for secondary keys and slight adjustment of filter cost. disable_forced_index_in_group_by = Disable automatic forced index in GROUP BY. This variable will be deleted in MariaDB 11.0 as it is not needed with the new 11.0 optimizer.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST adjust_secondary_key_cost,disable_max_seek,disable_forced_index_in_group_by
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_EXTRA_PRUNING_DEPTH
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 4e79d858..2c31e5f5 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -2494,12 +2494,12 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_ADJUST_SECONDARY_KEY_COSTS
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT 0 = No changes. 1 = Update secondary key costs for ranges to be at least 5x of clustered primary key costs. 2 = Remove 'max_seek optimization' for secondary keys and slight adjustment of filter cost. This option will be deleted in MariaDB 11.0 as it is not needed with the new 11.0 optimizer.
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 2
-NUMERIC_BLOCK_SIZE 1
-ENUM_VALUE_LIST NULL
+VARIABLE_TYPE SET
+VARIABLE_COMMENT A bit field with the following values: adjust_secondary_key_cost = Update secondary key costs for ranges to be at least 5x of clustered primary key costs. disable_max_seek = Disable 'max_seek optimization' for secondary keys and slight adjustment of filter cost. disable_forced_index_in_group_by = Disable automatic forced index in GROUP BY. This variable will be deleted in MariaDB 11.0 as it is not needed with the new 11.0 optimizer.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST adjust_secondary_key_cost,disable_max_seek,disable_forced_index_in_group_by
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_EXTRA_PRUNING_DEPTH
diff --git a/mysql-test/suite/sys_vars/t/allow_suspicious_udfs.test b/mysql-test/suite/sys_vars/t/allow_suspicious_udfs.test
index 9179cfbe..f5645e01 100644
--- a/mysql-test/suite/sys_vars/t/allow_suspicious_udfs.test
+++ b/mysql-test/suite/sys_vars/t/allow_suspicious_udfs.test
@@ -5,10 +5,10 @@
SELECT @@allow_suspicious_udfs AS EXPECT_0;
# Restart the server the server with "--allow-suspicious-udfs" option
---let $restart_parameters = "--allow-suspicious-udfs"
+--let $restart_parameters = --allow-suspicious-udfs
--source include/restart_mysqld.inc
SELECT @@allow_suspicious_udfs AS EXPECT_1;
# Disable "--allow-suspicious-udfs" to restore the original state
---let $restart_parameters = "--skip-allow-suspicious-udfs"
+--let $restart_parameters = --skip-allow-suspicious-udfs
--source include/restart_mysqld.inc
diff --git a/mysql-test/suite/sys_vars/t/debug_dbug_utf16le.test b/mysql-test/suite/sys_vars/t/debug_dbug_utf16le.test
new file mode 100644
index 00000000..0c4d8f92
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/debug_dbug_utf16le.test
@@ -0,0 +1,29 @@
+--source include/have_debug.inc
+--source include/have_utf16.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-28366 GLOBAL debug_dbug setting affected by collation_connection=utf16...
+--echo #
+
+SET NAMES utf8;
+SET collation_connection=utf16le_general_ci;
+SET debug_dbug='d,any_random_string';
+SELECT @@debug_dbug;
+SET debug_dbug=CONCAT('d,', _latin1 0xDF);
+SELECT @@debug_dbug;
+SELECT HEX(@@debug_dbug);
+
+SET @@debug_dbug=NULL;
+SELECT @@debug_dbug;
+
+SET @@debug_dbug=DEFAULT;
+SELECT @@debug_dbug;
+SET NAMES latin1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test
index 396d30c7..8bc7bd2d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test
@@ -31,6 +31,4 @@ set global innodb_saved_page_number_debug = 0;
set global innodb_fil_make_page_dirty_debug = @space_id;
drop table t1;
---echo # Must always be 0.
-SELECT @@global.innodb_fil_make_page_dirty_debug;
-
+set global innodb_fil_make_page_dirty_debug = 0;
diff --git a/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test
index d0996ae9..29b84518 100644
--- a/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test
@@ -32,6 +32,7 @@ set global innodb_fil_make_page_dirty_debug = @space_id;
drop table t1;
set global innodb_saved_page_number_debug = 0;
+set global innodb_fil_make_page_dirty_debug = 0;
SELECT @@global.innodb_saved_page_number_debug;
diff --git a/mysql-test/suite/sys_vars/t/replicate_rewrite_db.test b/mysql-test/suite/sys_vars/t/replicate_rewrite_db.test
index 7fbaab1f..5a9537f1 100644
--- a/mysql-test/suite/sys_vars/t/replicate_rewrite_db.test
+++ b/mysql-test/suite/sys_vars/t/replicate_rewrite_db.test
@@ -63,7 +63,7 @@ SELECT @@GLOBAL.replicate_rewrite_db;
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='replicate_rewrite_db';
--echo # Check restart with appending the value
---let $restart_parameters = "--replicate_rewrite_db='X->Y'"
+--let $restart_parameters = --replicate_rewrite_db='X->Y'
--source include/restart_mysqld.inc
SELECT @@GLOBAL.replicate_rewrite_db;
@@ -76,9 +76,6 @@ SELECT @@GLOBAL.replicate_rewrite_db;
--replace_regex /mysqld/mariadbd/ /\d\d\d\d-\d*-\d* *\d*:\d*:\d* \d* //
--cat_file $MYSQL_TMP_DIR/mysqld--replicate.err
# Restart the server with the default options
---let $restart_parameters = ""
+--let $restart_parameters =
--source include/start_mysqld.inc
SELECT @@GLOBAL.replicate_rewrite_db;
-
---echo # Cleanup.
-SET @@GLOBAL.replicate_rewrite_db = @save_replicate_rewrite_db;
diff --git a/mysql-test/suite/sysschema/t/fn_ps_thread_trx_info.test b/mysql-test/suite/sysschema/t/fn_ps_thread_trx_info.test
index ddf46247..19ea013f 100644
--- a/mysql-test/suite/sysschema/t/fn_ps_thread_trx_info.test
+++ b/mysql-test/suite/sysschema/t/fn_ps_thread_trx_info.test
@@ -78,7 +78,7 @@ SELECT JSON_CONTAINS(@json_doc, '"COMMIT"', '$[0].statements_executed[1].sql_tex
SET @sys.ps_thread_trx_info.max_length = 100;
# Should return an error JSON object
---replace_regex /Row 1[1-2] was/Row 1X was/
+--replace_regex /Row \d+ was/Row 1X was/
SELECT sys.ps_thread_trx_info(@ps_thread_id);
# Setting the user variable back to NULL should reset to 65535 from sys_config, and no truncation
diff --git a/mysql-test/suite/vcol/r/func_regexp.result b/mysql-test/suite/vcol/r/func_regexp.result
new file mode 100644
index 00000000..f7ae11f7
--- /dev/null
+++ b/mysql-test/suite/vcol/r/func_regexp.result
@@ -0,0 +1,24 @@
+#
+# Start of 10.5 tests
+#
+#
+# MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt
+#
+CREATE TABLE t1 (c0 INT AS(('' RLIKE '[')));
+ERROR 42000: Regex error 'missing terminating ] for character class at offset 1'
+CREATE TABLE t1 (c0 INT AS(REGEXP_INSTR('','[')));
+ERROR 42000: Regex error 'missing terminating ] for character class at offset 1'
+CREATE TABLE t1
+(
+c0 INT,
+c1 INT AS(('' RLIKE NULL)),
+c2 INT AS(REGEXP_INSTR('',NULL))
+);
+INSERT INTO t1 (c0) VALUES (0);
+SELECT * FROM t1;
+c0 c1 c2
+0 NULL NULL
+DROP TABLE t1;
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/suite/vcol/t/func_regexp.test b/mysql-test/suite/vcol/t/func_regexp.test
new file mode 100644
index 00000000..5e97009a
--- /dev/null
+++ b/mysql-test/suite/vcol/t/func_regexp.test
@@ -0,0 +1,30 @@
+--source inc/vcol_init_vars.pre
+--source inc/vcol_cleanup.inc
+
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-21058 CREATE TABLE with generated column and RLIKE results in sigabrt
+--echo #
+
+--error ER_REGEXP_ERROR
+CREATE TABLE t1 (c0 INT AS(('' RLIKE '[')));
+
+--error ER_REGEXP_ERROR
+CREATE TABLE t1 (c0 INT AS(REGEXP_INSTR('','[')));
+
+CREATE TABLE t1
+(
+ c0 INT,
+ c1 INT AS(('' RLIKE NULL)),
+ c2 INT AS(REGEXP_INSTR('',NULL))
+);
+INSERT INTO t1 (c0) VALUES (0);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result
index b3c342fd..52c35f47 100644
--- a/mysql-test/suite/versioning/r/alter.result
+++ b/mysql-test/suite/versioning/r/alter.result
@@ -846,8 +846,17 @@ Note 1060 Duplicate column name 'v'
alter table `b` add column if not exists ( p bit );
drop table `b`;
#
-# End of 10.4 tests
+# MDEV-30528 Assertion !mbmaxlen || ... failed
+# in dtype_get_at_most_n_mbchars()
#
+CREATE TABLE t(f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
+INSERT INTO t VALUES ('foo');
+DELETE FROM t;
+ALTER TABLE t ADD FULLTEXT (f);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
+DROP TABLE t;
+# End of 10.4 tests
#
# MDEV-21941 RENAME doesn't work for system time or period fields
#
@@ -871,6 +880,4 @@ t1 CREATE TABLE `t1` (
PERIOD FOR SYSTEM_TIME (`x`, `y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
drop table t1;
-#
# End of 10.5 tests
-#
diff --git a/mysql-test/suite/versioning/r/data.result b/mysql-test/suite/versioning/r/data.result
index c7fe141c..08ab03ff 100644
--- a/mysql-test/suite/versioning/r/data.result
+++ b/mysql-test/suite/versioning/r/data.result
@@ -10,6 +10,7 @@ set timestamp=unix_timestamp('1991-01-02 00:00');
delete from t1 where x=2;
set timestamp=default;
#MYSQL_DUMP --compact test
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -19,6 +20,7 @@ CREATE TABLE `t1` (
INSERT INTO `t1` VALUES
(3);
#MYSQL_DUMP --compact --as-of="1990-01-02 00:00" test
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -30,6 +32,7 @@ INSERT INTO `t1` VALUES
(2),
(3);
#MYSQL_DUMP --compact --as-of="1990-08-02 00:00" --databases test
+/*!999999\- enable the sandbox mode */
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */;
@@ -45,6 +48,7 @@ INSERT INTO `t1` VALUES
(2),
(3);
#MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -87,6 +91,7 @@ select x, check_fields(x, row_start, row_end) from t2 for system_time all order
x check_fields(x, row_start, row_end)
1 [CORRECT]
2 [CORRECT]
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -194,6 +199,7 @@ insert t1 (x) values (2);
delete from t1 where x=1;
mariadb-dump: Cannot use --dump-history for table `t1` with transaction-precise history
mariadb-dump: Cannot use --dump-history for table `t1` with transaction-precise history
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index 4c1486d0..02cecea6 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -3447,4 +3447,27 @@ ERROR HY000: Maybe missing parameters: no rotation condition for multiple HISTOR
#
# End of 10.5 tests
#
+#
+# MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions
+#
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create table t1 (x int) engine=aria with system versioning partition by system_time interval 1 hour auto partitions 3;
+insert into t1 values (1);
+create table t2 (x int) engine=aria;
+create trigger tr after insert on t2 for each row update t1 set x= x + 11;
+lock tables t1 write, t2 write;
+update t1 set x= x + 1;
+set timestamp= unix_timestamp('2000-01-01 13:00:00');
+insert into t2 values (5);
+unlock tables;
+drop table t1, t2;
+set timestamp= default;
+#
+# MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition
+#
+create table t (a int) with system versioning partition by system_time limit 100 partitions 3;
+drop table t;
+#
+# End of 10.9 tests
+#
set global innodb_stats_persistent= @save_persistent;
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 44f52ddf..85448d21 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -743,9 +743,20 @@ alter table `b` add column if not exists ( p bit );
drop table `b`;
--echo #
---echo # End of 10.4 tests
+--echo # MDEV-30528 Assertion !mbmaxlen || ... failed
+--echo # in dtype_get_at_most_n_mbchars()
--echo #
+CREATE TABLE t(f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
+INSERT INTO t VALUES ('foo');
+DELETE FROM t;
+--enable_info
+ALTER TABLE t ADD FULLTEXT (f);
+--disable_info
+DROP TABLE t;
+
+--echo # End of 10.4 tests
+
--echo #
--echo # MDEV-21941 RENAME doesn't work for system time or period fields
--echo #
@@ -767,6 +778,4 @@ show create table t1;
# cleanup
drop table t1;
---echo #
--echo # End of 10.5 tests
---echo #
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 3699ac28..5707746f 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -2673,5 +2673,43 @@ create table t (a int) with system versioning partition by system_time partition
--echo # End of 10.5 tests
--echo #
+--echo #
+--echo # MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions
+--echo #
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create table t1 (x int) engine=aria with system versioning partition by system_time interval 1 hour auto partitions 3;
+insert into t1 values (1);
+
+create table t2 (x int) engine=aria;
+create trigger tr after insert on t2 for each row update t1 set x= x + 11;
+lock tables t1 write, t2 write;
+update t1 set x= x + 1;
+set timestamp= unix_timestamp('2000-01-01 13:00:00');
+insert into t2 values (5);
+unlock tables;
+drop table t1, t2;
+set timestamp= default;
+
+--echo #
+--echo # MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition
+--echo #
+create table t (a int) with system versioning partition by system_time limit 100 partitions 3;
+let $emb= `select if(version() like '%embedded%', 1, 0)`;
+if (!$emb)
+{
+ --disable_result_log
+ --disable_query_log
+ --error ER_DELAYED_NOT_SUPPORTED
+ insert delayed into t () values ();
+ --enable_query_log
+ --enable_result_log
+}
+# cleanup
+drop table t;
+
+--echo #
+--echo # End of 10.9 tests
+--echo #
+
set global innodb_stats_persistent= @save_persistent;
--source suite/versioning/common_finish.inc
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 758243df..ab6d9edf 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -14,7 +14,7 @@
# 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(${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)
+INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)
SET(MYSYS_SOURCES array.c charset-def.c charset.c my_default.c
get_password.c
@@ -59,29 +59,21 @@ IF (WIN32)
ENDIF()
IF(MSVC_INTEL)
- SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c)
+ SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c crc32/crc32c_x86.cc)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc)
ENDIF()
- ADD_DEFINITIONS(-DHAVE_SSE42 -DHAVE_PCLMUL)
- IF(CLANG_CL)
- SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul")
- ENDIF()
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686")
- MY_CHECK_CXX_COMPILER_FLAG(-msse4.2)
- MY_CHECK_CXX_COMPILER_FLAG(-mpclmul)
- CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H)
- CHECK_INCLUDE_FILE(x86intrin.h HAVE_X86INTRIN_H)
- IF(have_CXX__msse4.2 AND HAVE_CPUID_H)
- ADD_DEFINITIONS(-DHAVE_SSE42)
- IF (have_CXX__mpclmul AND HAVE_X86INTRIN_H)
- ADD_DEFINITIONS(-DHAVE_PCLMUL)
- SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c)
- SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul")
- IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
- SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc)
- SET_SOURCE_FILES_PROPERTIES(crc32/crc32c_amd64.cc PROPERTIES COMPILE_FLAGS "-msse4.2 -mpclmul")
- ENDIF()
+ SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c crc32/crc32c_x86.cc)
+ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5")
+ SET_SOURCE_FILES_PROPERTIES(crc32/crc32_x86.c PROPERTIES
+ COMPILE_FLAGS "-msse4.2 -mpclmul")
+ ENDIF()
+ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32c_amd64.cc)
+ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "5")
+ SET_SOURCE_FILES_PROPERTIES(crc32/crc32c_amd64.cc PROPERTIES
+ COMPILE_FLAGS "-msse4.2 -mpclmul")
ENDIF()
ENDIF()
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
@@ -164,7 +156,7 @@ ENDIF()
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
MAYBE_DISABLE_IPO(mysys)
-TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
+TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARIES}
${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO})
DTRACE_INSTRUMENT(mysys)
diff --git a/mysys/crc32/crc32_arm64.c b/mysys/crc32/crc32_arm64.c
index 0e70c218..6588606a 100644
--- a/mysys/crc32/crc32_arm64.c
+++ b/mysys/crc32/crc32_arm64.c
@@ -1,13 +1,18 @@
#include <my_global.h>
#include <string.h>
#include <stdint.h>
+#include <stddef.h>
-static int pmull_supported;
+typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t);
-#if defined(HAVE_ARMV8_CRC)
+#ifdef HAVE_ARMV8_CRC
-#if defined(__APPLE__)
-#include <sys/sysctl.h>
+# ifdef HAVE_ARMV8_CRYPTO
+static unsigned crc32c_aarch64_pmull(unsigned, const void *, size_t);
+# endif
+
+# ifdef __APPLE__
+# include <sys/sysctl.h>
int crc32_aarch64_available(void)
{
@@ -18,17 +23,17 @@ int crc32_aarch64_available(void)
return ret;
}
-const char *crc32c_aarch64_available(void)
+my_crc32_t crc32c_aarch64_available(void)
{
- if (crc32_aarch64_available() == 0)
- return NULL;
- pmull_supported = 1;
- return "Using ARMv8 crc32 + pmull instructions";
+# ifdef HAVE_ARMV8_CRYPTO
+ if (crc32_aarch64_available())
+ return crc32c_aarch64_pmull;
+# endif
+ return NULL;
}
-
-#else
-#include <sys/auxv.h>
-#if defined(__FreeBSD__)
+# else
+# include <sys/auxv.h>
+# ifdef __FreeBSD__
static unsigned long getauxval(unsigned int key)
{
unsigned long val;
@@ -36,17 +41,17 @@ static unsigned long getauxval(unsigned int key)
return 0ul;
return val;
}
-#else
-# include <asm/hwcap.h>
-#endif
+# else
+# include <asm/hwcap.h>
+# endif
-#ifndef HWCAP_CRC32
-# define HWCAP_CRC32 (1 << 7)
-#endif
+# ifndef HWCAP_CRC32
+# define HWCAP_CRC32 (1 << 7)
+# endif
-#ifndef HWCAP_PMULL
-# define HWCAP_PMULL (1 << 4)
-#endif
+# ifndef HWCAP_PMULL
+# define HWCAP_PMULL (1 << 4)
+# endif
/* ARM made crc32 default from ARMv8.1 but optional in ARMv8A
* Runtime check API.
@@ -56,22 +61,37 @@ int crc32_aarch64_available(void)
unsigned long auxv= getauxval(AT_HWCAP);
return (auxv & HWCAP_CRC32) != 0;
}
+# endif
+
+# ifndef __APPLE__
+static unsigned crc32c_aarch64(unsigned, const void *, size_t);
-const char *crc32c_aarch64_available(void)
+my_crc32_t crc32c_aarch64_available(void)
{
unsigned long auxv= getauxval(AT_HWCAP);
-
if (!(auxv & HWCAP_CRC32))
return NULL;
+# ifdef HAVE_ARMV8_CRYPTO
+ /* Raspberry Pi 4 supports crc32 but doesn't support pmull (MDEV-23030). */
+ if (auxv & HWCAP_PMULL)
+ return crc32c_aarch64_pmull;
+# endif
+ return crc32c_aarch64;
+}
+# endif
- pmull_supported= (auxv & HWCAP_PMULL) != 0;
- if (pmull_supported)
+const char *crc32c_aarch64_impl(my_crc32_t c)
+{
+# ifdef HAVE_ARMV8_CRYPTO
+ if (c == crc32c_aarch64_pmull)
return "Using ARMv8 crc32 + pmull instructions";
- else
+# endif
+# ifndef __APPLE__
+ if (c == crc32c_aarch64)
return "Using ARMv8 crc32 instructions";
+# endif
+ return NULL;
}
-
-#endif /* __APPLE__ */
#endif /* HAVE_ARMV8_CRC */
#ifndef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
@@ -157,131 +177,14 @@ asm(".arch_extension crypto");
PREF4X64L2(buffer,(PREF_OFFSET), 8) \
PREF4X64L2(buffer,(PREF_OFFSET), 12)
-uint32_t crc32c_aarch64(uint32_t crc, const unsigned char *buffer, uint64_t len)
+#ifndef __APPLE__
+static unsigned crc32c_aarch64(unsigned crc, const void *buf, size_t len)
{
- uint32_t crc0, crc1, crc2;
int64_t length= (int64_t)len;
+ const unsigned char *buffer= buf;
crc^= 0xffffffff;
- /* Pmull runtime check here.
- * Raspberry Pi 4 supports crc32 but doesn't support pmull (MDEV-23030).
- *
- * Consider the condition that the target platform does support hardware crc32
- * but not support PMULL. In this condition, it should leverage the aarch64
- * crc32 instruction (__crc32c) and just only skip parallel computation (pmull/vmull)
- * rather than skip all hardware crc32 instruction of computation.
- */
- if (pmull_supported)
- {
-/* The following Macro (HAVE_ARMV8_CRYPTO) is used for compiling check */
-#ifdef HAVE_ARMV8_CRYPTO
-
-/* Crypto extension Support
- * Parallel computation with 1024 Bytes (per block)
- * Intrinsics Support
- */
-# ifdef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
- const poly64_t k1= 0xe417f38a, k2= 0x8f158014;
- uint64_t t0, t1;
-
- /* Process per block size of 1024 Bytes
- * A block size = 8 + 42*3*sizeof(uint64_t) + 8
- */
- while ((length-= 1024) >= 0)
- {
- /* Prefetch 3*1024 data for avoiding L2 cache miss */
- PREF1KL2(buffer, 1024*3);
- /* Do first 8 bytes here for better pipelining */
- crc0= __crc32cd(crc, *(const uint64_t *)buffer);
- crc1= 0;
- crc2= 0;
- buffer+= sizeof(uint64_t);
-
- /* Process block inline
- * Process crc0 last to avoid dependency with above
- */
- CRC32C7X3X8(buffer, 0);
- CRC32C7X3X8(buffer, 1);
- CRC32C7X3X8(buffer, 2);
- CRC32C7X3X8(buffer, 3);
- CRC32C7X3X8(buffer, 4);
- CRC32C7X3X8(buffer, 5);
-
- buffer+= 42*3*sizeof(uint64_t);
- /* Prefetch data for following block to avoid L1 cache miss */
- PREF1KL1(buffer, 1024);
-
- /* Last 8 bytes
- * Merge crc0 and crc1 into crc2
- * crc1 multiply by K2
- * crc0 multiply by K1
- */
- t1= (uint64_t)vmull_p64(crc1, k2);
- t0= (uint64_t)vmull_p64(crc0, k1);
- crc= __crc32cd(crc2, *(const uint64_t *)buffer);
- crc1= __crc32cd(0, t1);
- crc^= crc1;
- crc0= __crc32cd(0, t0);
- crc^= crc0;
-
- buffer+= sizeof(uint64_t);
- }
-
-# else /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */
-
- /*No intrinsics*/
- __asm__("mov x16, #0xf38a \n\t"
- "movk x16, #0xe417, lsl 16 \n\t"
- "mov v1.2d[0], x16 \n\t"
- "mov x16, #0x8014 \n\t"
- "movk x16, #0x8f15, lsl 16 \n\t"
- "mov v0.2d[0], x16 \n\t"
- :::"x16");
-
- while ((length-= 1024) >= 0)
- {
- PREF1KL2(buffer, 1024*3);
- __asm__("crc32cx %w[c0], %w[c], %x[v]\n\t"
- :[c0]"=r"(crc0):[c]"r"(crc), [v]"r"(*(const uint64_t *)buffer):);
- crc1= 0;
- crc2= 0;
- buffer+= sizeof(uint64_t);
-
- CRC32C7X3X8(buffer, 0);
- CRC32C7X3X8(buffer, 1);
- CRC32C7X3X8(buffer, 2);
- CRC32C7X3X8(buffer, 3);
- CRC32C7X3X8(buffer, 4);
- CRC32C7X3X8(buffer, 5);
-
- buffer+= 42*3*sizeof(uint64_t);
- PREF1KL1(buffer, 1024);
- __asm__("mov v2.2d[0], %x[c1] \n\t"
- "pmull v2.1q, v2.1d, v0.1d \n\t"
- "mov v3.2d[0], %x[c0] \n\t"
- "pmull v3.1q, v3.1d, v1.1d \n\t"
- "crc32cx %w[c], %w[c2], %x[v] \n\t"
- "mov %x[c1], v2.2d[0] \n\t"
- "crc32cx %w[c1], wzr, %x[c1] \n\t"
- "eor %w[c], %w[c], %w[c1] \n\t"
- "mov %x[c0], v3.2d[0] \n\t"
- "crc32cx %w[c0], wzr, %x[c0] \n\t"
- "eor %w[c], %w[c], %w[c0] \n\t"
- :[c1]"+r"(crc1), [c0]"+r"(crc0), [c2]"+r"(crc2), [c]"+r"(crc)
- :[v]"r"(*((const uint64_t *)buffer)));
- buffer+= sizeof(uint64_t);
- }
-# endif /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */
-
- /* Done if Input data size is aligned with 1024 */
- if (!(length+= 1024))
- return ~crc;
-
-#endif /* HAVE_ARMV8_CRYPTO */
-
- } // end if pmull_supported
-
while ((length-= sizeof(uint64_t)) >= 0)
{
CRC32CX(crc, *(uint64_t *)buffer);
@@ -306,6 +209,143 @@ uint32_t crc32c_aarch64(uint32_t crc, const unsigned char *buffer, uint64_t len)
return ~crc;
}
+#endif
+
+#ifdef HAVE_ARMV8_CRYPTO
+static unsigned crc32c_aarch64_pmull(unsigned crc, const void *buf, size_t len)
+{
+ int64_t length= (int64_t)len;
+ const unsigned char *buffer= buf;
+
+ crc^= 0xffffffff;
+
+ /* Crypto extension Support
+ * Parallel computation with 1024 Bytes (per block)
+ * Intrinsics Support
+ */
+# ifdef HAVE_ARMV8_CRC_CRYPTO_INTRINSICS
+ /* Process per block size of 1024 Bytes
+ * A block size = 8 + 42*3*sizeof(uint64_t) + 8
+ */
+ for (const poly64_t k1= 0xe417f38a, k2= 0x8f158014; (length-= 1024) >= 0; )
+ {
+ uint32_t crc0, crc1, crc2;
+ uint64_t t0, t1;
+ /* Prefetch 3*1024 data for avoiding L2 cache miss */
+ PREF1KL2(buffer, 1024*3);
+ /* Do first 8 bytes here for better pipelining */
+ crc0= __crc32cd(crc, *(const uint64_t *)buffer);
+ crc1= 0;
+ crc2= 0;
+ buffer+= sizeof(uint64_t);
+
+ /* Process block inline
+ * Process crc0 last to avoid dependency with above
+ */
+ CRC32C7X3X8(buffer, 0);
+ CRC32C7X3X8(buffer, 1);
+ CRC32C7X3X8(buffer, 2);
+ CRC32C7X3X8(buffer, 3);
+ CRC32C7X3X8(buffer, 4);
+ CRC32C7X3X8(buffer, 5);
+
+ buffer+= 42*3*sizeof(uint64_t);
+ /* Prefetch data for following block to avoid L1 cache miss */
+ PREF1KL1(buffer, 1024);
+
+ /* Last 8 bytes
+ * Merge crc0 and crc1 into crc2
+ * crc1 multiply by K2
+ * crc0 multiply by K1
+ */
+ t1= (uint64_t)vmull_p64(crc1, k2);
+ t0= (uint64_t)vmull_p64(crc0, k1);
+ crc= __crc32cd(crc2, *(const uint64_t *)buffer);
+ crc1= __crc32cd(0, t1);
+ crc^= crc1;
+ crc0= __crc32cd(0, t0);
+ crc^= crc0;
+
+ buffer+= sizeof(uint64_t);
+ }
+
+# else /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */
+ /*No intrinsics*/
+ __asm__("mov x16, #0xf38a \n\t"
+ "movk x16, #0xe417, lsl 16 \n\t"
+ "mov v1.2d[0], x16 \n\t"
+ "mov x16, #0x8014 \n\t"
+ "movk x16, #0x8f15, lsl 16 \n\t"
+ "mov v0.2d[0], x16 \n\t"
+ :::"x16");
+
+ while ((length-= 1024) >= 0)
+ {
+ uint32_t crc0, crc1, crc2;
+
+ PREF1KL2(buffer, 1024*3);
+ __asm__("crc32cx %w[c0], %w[c], %x[v]\n\t"
+ :[c0]"=r"(crc0):[c]"r"(crc), [v]"r"(*(const uint64_t *)buffer):);
+ crc1= 0;
+ crc2= 0;
+ buffer+= sizeof(uint64_t);
+
+ CRC32C7X3X8(buffer, 0);
+ CRC32C7X3X8(buffer, 1);
+ CRC32C7X3X8(buffer, 2);
+ CRC32C7X3X8(buffer, 3);
+ CRC32C7X3X8(buffer, 4);
+ CRC32C7X3X8(buffer, 5);
+
+ buffer+= 42*3*sizeof(uint64_t);
+ PREF1KL1(buffer, 1024);
+ __asm__("mov v2.2d[0], %x[c1] \n\t"
+ "pmull v2.1q, v2.1d, v0.1d \n\t"
+ "mov v3.2d[0], %x[c0] \n\t"
+ "pmull v3.1q, v3.1d, v1.1d \n\t"
+ "crc32cx %w[c], %w[c2], %x[v] \n\t"
+ "mov %x[c1], v2.2d[0] \n\t"
+ "crc32cx %w[c1], wzr, %x[c1] \n\t"
+ "eor %w[c], %w[c], %w[c1] \n\t"
+ "mov %x[c0], v3.2d[0] \n\t"
+ "crc32cx %w[c0], wzr, %x[c0] \n\t"
+ "eor %w[c], %w[c], %w[c0] \n\t"
+ :[c1]"+r"(crc1), [c0]"+r"(crc0), [c2]"+r"(crc2), [c]"+r"(crc)
+ :[v]"r"(*((const uint64_t *)buffer)));
+ buffer+= sizeof(uint64_t);
+ }
+# endif /* HAVE_ARMV8_CRC_CRYPTO_INTRINSICS */
+
+ /* Done if Input data size is aligned with 1024 */
+ length+= 1024;
+ if (length)
+ {
+ while ((length-= sizeof(uint64_t)) >= 0)
+ {
+ CRC32CX(crc, *(uint64_t *)buffer);
+ buffer+= sizeof(uint64_t);
+ }
+
+ /* The following is more efficient than the straight loop */
+ if (length & sizeof(uint32_t))
+ {
+ CRC32CW(crc, *(uint32_t *)buffer);
+ buffer+= sizeof(uint32_t);
+ }
+
+ if (length & sizeof(uint16_t))
+ {
+ CRC32CH(crc, *(uint16_t *)buffer);
+ buffer+= sizeof(uint16_t);
+ }
+
+ if (length & sizeof(uint8_t))
+ CRC32CB(crc, *buffer);
+ }
+
+ return ~crc;
+}
+#endif /* HAVE_ARMV8_CRYPTO */
/* There are multiple approaches to calculate crc.
Approach-1: Process 8 bytes then 4 bytes then 2 bytes and then 1 bytes
diff --git a/mysys/crc32/crc32_x86.c b/mysys/crc32/crc32_x86.c
index f077399c..ab2522d6 100644
--- a/mysys/crc32/crc32_x86.c
+++ b/mysys/crc32/crc32_x86.c
@@ -56,11 +56,16 @@
#include <stddef.h>
#ifdef __GNUC__
-#include <x86intrin.h>
+# include <emmintrin.h>
+# include <smmintrin.h>
+# include <tmmintrin.h>
+# include <wmmintrin.h>
+# define USE_PCLMUL __attribute__((target("sse4.2,pclmul")))
#elif defined(_MSC_VER)
-#include <intrin.h>
+# include <intrin.h>
+# define USE_PCLMUL /* nothing */
#else
-#error "unknown compiler"
+# error "unknown compiler"
#endif
/**
@@ -71,6 +76,7 @@
*
* @return \a reg << (\a num * 8)
*/
+USE_PCLMUL
static inline __m128i xmm_shift_left(__m128i reg, const unsigned int num)
{
static const MY_ALIGNED(16) uint8_t crc_xmm_shift_tab[48]= {
@@ -111,6 +117,7 @@ struct crcr_pclmulqdq_ctx
*
* @return New 16 byte folded data
*/
+USE_PCLMUL
static inline __m128i crcr32_folding_round(const __m128i data_block,
const __m128i precomp, const __m128i fold)
{
@@ -128,6 +135,7 @@ static inline __m128i crcr32_folding_round(const __m128i data_block,
*
* @return data reduced to 64 bits
*/
+USE_PCLMUL
static inline __m128i crcr32_reduce_128_to_64(__m128i data128, const __m128i precomp)
{
__m128i tmp0, tmp1, tmp2;
@@ -152,6 +160,7 @@ static inline __m128i crcr32_reduce_128_to_64(__m128i data128, const __m128i pre
*
* @return data reduced to 32 bits
*/
+USE_PCLMUL
static inline uint32_t crcr32_reduce_64_to_32(__m128i data64, const __m128i precomp)
{
static const MY_ALIGNED(16) uint32_t mask1[4]= {
@@ -188,6 +197,7 @@ static inline uint32_t crcr32_reduce_64_to_32(__m128i data64, const __m128i prec
*
* @return CRC for given \a data block (32 bits wide).
*/
+USE_PCLMUL
static inline uint32_t crcr32_calc_pclmulqdq(const uint8_t *data, uint32_t data_len,
uint32_t crc,
const struct crcr_pclmulqdq_ctx *params)
diff --git a/mysys/crc32/crc32c.cc b/mysys/crc32/crc32c.cc
index 2bec041e..32a45478 100644
--- a/mysys/crc32/crc32c.cc
+++ b/mysys/crc32/crc32c.cc
@@ -19,52 +19,23 @@
#include <stddef.h>
#include <stdint.h>
#include <my_global.h>
-#include <my_byteorder.h>
-static inline uint32_t DecodeFixed32(const char *ptr)
-{
- return uint4korr(ptr);
-}
-
-#include <stdint.h>
-#ifdef _MSC_VER
-#include <intrin.h>
-#endif
-
-#ifdef HAVE_SSE42
-# ifdef __GNUC__
-# include <cpuid.h>
-# if __GNUC__ < 5 && !defined __clang__
-/* the headers do not really work in GCC before version 5 */
-# define _mm_crc32_u8(crc,data) __builtin_ia32_crc32qi(crc,data)
-# define _mm_crc32_u32(crc,data) __builtin_ia32_crc32si(crc,data)
-# define _mm_crc32_u64(crc,data) __builtin_ia32_crc32di(crc,data)
-# else
-# include <nmmintrin.h>
-# endif
-# define USE_SSE42 __attribute__((target("sse4.2")))
-# else
-# define USE_SSE42 /* nothing */
-# endif
-#endif
-
#ifdef __powerpc64__
-#include "crc32c_ppc.h"
-
-#if __linux__
-#include <sys/auxv.h>
+# include "crc32c_ppc.h"
+# ifdef __linux__
+# include <sys/auxv.h>
-#ifndef PPC_FEATURE2_VEC_CRYPTO
-#define PPC_FEATURE2_VEC_CRYPTO 0x02000000
-#endif
+# ifndef PPC_FEATURE2_VEC_CRYPTO
+# define PPC_FEATURE2_VEC_CRYPTO 0x02000000
+# endif
-#ifndef AT_HWCAP2
-#define AT_HWCAP2 26
+# ifndef AT_HWCAP2
+# define AT_HWCAP2 26
+# endif
+# endif
#endif
-#endif /* __linux__ */
-
-#endif
+typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t);
namespace mysys_namespace {
namespace crc32c {
@@ -75,6 +46,7 @@ static int arch_ppc_crc32 = 0;
#endif /* __powerpc64__ */
#endif
+alignas(CPU_LEVEL1_DCACHE_LINESIZE)
static const uint32_t table0_[256] = {
0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,
0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,
@@ -341,8 +313,9 @@ static const uint32_t table3_[256] = {
};
// Used to fetch a naturally-aligned 32-bit word in little endian byte-order
-static inline uint32_t LE_LOAD32(const uint8_t *p) {
- return DecodeFixed32(reinterpret_cast<const char*>(p));
+static inline uint32_t LE_LOAD32(const uint8_t *p)
+{
+ return uint4korr(reinterpret_cast<const char*>(p));
}
static inline void Slow_CRC32(uint64_t* l, uint8_t const **p)
@@ -362,10 +335,7 @@ static inline void Slow_CRC32(uint64_t* l, uint8_t const **p)
table0_[c >> 24];
}
-#ifdef ALIGN
#undef ALIGN
-#endif
-
// Align n to (1 << m) byte boundary
#define ALIGN(n, m) ((n + ((1 << m) - 1)) & ~((1 << m) - 1))
@@ -374,70 +344,30 @@ static inline void Slow_CRC32(uint64_t* l, uint8_t const **p)
l = table0_[c] ^ (l >> 8); \
} while (0)
-static uint32_t crc32c_slow(uint32_t crc, const char* buf, size_t size)
-{
- const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
- const uint8_t *e = p + size;
- uint64_t l = crc ^ 0xffffffffu;
-
- // Point x at first 16-byte aligned byte in string. This might be
- // just past the end of the string.
- const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
- const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
- if (x <= e)
- // Process bytes until finished or p is 16-byte aligned
- while (p != x)
- STEP1;
- // Process bytes 16 at a time
- while ((e-p) >= 16)
- {
- Slow_CRC32(&l, &p);
- Slow_CRC32(&l, &p);
- }
- // Process bytes 8 at a time
- while ((e-p) >= 8)
- Slow_CRC32(&l, &p);
- // Process the last few bytes
- while (p != e)
- STEP1;
- return static_cast<uint32_t>(l ^ 0xffffffffu);
-}
-
-#if defined HAVE_POWER8
-#elif defined HAVE_ARMV8_CRC
-#elif defined HAVE_SSE42
-constexpr uint32_t cpuid_ecx_SSE42= 1U << 20;
-constexpr uint32_t cpuid_ecx_SSE42_AND_PCLMUL= cpuid_ecx_SSE42 | 1U<<1;
-
-static uint32_t cpuid_ecx()
-{
-#ifdef __GNUC__
- uint32_t reax= 0, rebx= 0, recx= 0, redx= 0;
- __cpuid(1, reax, rebx, recx, redx);
- return recx;
-#elif defined _MSC_VER
- int regs[4];
- __cpuid(regs, 1);
- return regs[2];
-#else
-# error "unknown compiler"
+#undef USE_SSE42
+#if defined _MSC_VER && (defined _M_X64 || defined _M_IX86)
+# include <intrin.h>
+# include <immintrin.h>
+# define USE_SSE42 /* nothing */
+#elif defined __GNUC__ && (defined __i386__||defined __x86_64__)
+# if __GNUC__ < 5 && !defined __clang_major__
+/* the headers do not really work in GCC before version 5 */
+# define _mm_crc32_u8(crc,data) __builtin_ia32_crc32qi(crc,data)
+# define _mm_crc32_u32(crc,data) __builtin_ia32_crc32si(crc,data)
+# define _mm_crc32_u64(crc,data) __builtin_ia32_crc32di(crc,data)
+# else
+# include <nmmintrin.h>
+# endif
+# define USE_SSE42 __attribute__((target("sse4.2")))
#endif
-}
-
-extern "C" int crc32_pclmul_enabled(void)
-{
- return !(~cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL);
-}
-
-#if SIZEOF_SIZE_T == 8
-extern "C" uint32_t crc32c_3way(uint32_t crc, const char *buf, size_t len);
-USE_SSE42
+#ifdef USE_SSE42
+# if SIZEOF_SIZE_T == 8
static inline uint64_t LE_LOAD64(const uint8_t *ptr)
{
return uint8korr(reinterpret_cast<const char*>(ptr));
}
-#endif
+# endif
USE_SSE42
static inline void Fast_CRC32(uint64_t* l, uint8_t const **p)
@@ -453,10 +383,11 @@ static inline void Fast_CRC32(uint64_t* l, uint8_t const **p)
# endif
}
+extern "C"
USE_SSE42
-static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size)
+unsigned crc32c_sse42(unsigned crc, const void* buf, size_t size)
{
- const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
+ const uint8_t *p = static_cast<const uint8_t *>(buf);
const uint8_t *e = p + size;
uint64_t l = crc ^ 0xffffffffu;
@@ -484,107 +415,111 @@ static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size)
}
#endif
-typedef uint32_t (*Function)(uint32_t, const char*, size_t);
+static unsigned crc32c_slow(unsigned crc, const void* buf, size_t size)
+{
+ const uint8_t *p = static_cast<const uint8_t *>(buf);
+ const uint8_t *e = p + size;
+ uint64_t l = crc ^ 0xffffffffu;
-#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
-uint32_t ExtendPPCImpl(uint32_t crc, const char *buf, size_t size) {
- return crc32c_ppc(crc, (const unsigned char *)buf, size);
+ // Point x at first 16-byte aligned byte in string. This might be
+ // just past the end of the string.
+ const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
+ const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
+ if (x <= e)
+ // Process bytes until finished or p is 16-byte aligned
+ while (p != x)
+ STEP1;
+ // Process bytes 16 at a time
+ while ((e-p) >= 16)
+ {
+ Slow_CRC32(&l, &p);
+ Slow_CRC32(&l, &p);
+ }
+ // Process bytes 8 at a time
+ while ((e-p) >= 8)
+ Slow_CRC32(&l, &p);
+ // Process the last few bytes
+ while (p != e)
+ STEP1;
+ return static_cast<uint32_t>(l ^ 0xffffffffu);
}
-#if __linux__
+#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
+# ifdef __linux__
static int arch_ppc_probe(void) {
arch_ppc_crc32 = 0;
-#if defined(__powerpc64__)
+# if defined(__powerpc64__)
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) arch_ppc_crc32 = 1;
-#endif /* __powerpc64__ */
+# endif /* __powerpc64__ */
return arch_ppc_crc32;
}
-#elif __FreeBSD_version >= 1200000
-#include <machine/cpu.h>
-#include <sys/auxv.h>
-#include <sys/elf_common.h>
+# elif defined __FreeBSD_version && __FreeBSD_version >= 1200000
+# include <machine/cpu.h>
+# include <sys/auxv.h>
+# include <sys/elf_common.h>
static int arch_ppc_probe(void) {
unsigned long cpufeatures;
arch_ppc_crc32 = 0;
-#if defined(__powerpc64__)
+# if defined(__powerpc64__)
elf_aux_info(AT_HWCAP2, &cpufeatures, sizeof(cpufeatures));
if (cpufeatures & PPC_FEATURE2_HAS_VEC_CRYPTO) arch_ppc_crc32 = 1;
-#endif /* __powerpc64__ */
+# endif /* __powerpc64__ */
return arch_ppc_crc32;
}
-#elif defined(_AIX) || defined(__OpenBSD__)
+# elif defined(_AIX) || defined(__OpenBSD__)
static int arch_ppc_probe(void) {
arch_ppc_crc32 = 0;
-#if defined(__powerpc64__)
+# if defined(__powerpc64__)
// AIX 7.1+/OpenBSD has vector crypto features on all POWER 8+
arch_ppc_crc32 = 1;
-#endif /* __powerpc64__ */
+# endif /* __powerpc64__ */
return arch_ppc_crc32;
}
-#endif // __linux__
+# endif
#endif
#if defined(HAVE_ARMV8_CRC)
-extern "C" const char *crc32c_aarch64_available(void);
-extern "C" uint32_t crc32c_aarch64(uint32_t crc, const unsigned char *buffer, uint64_t len);
-
-static uint32_t ExtendARMImpl(uint32_t crc, const char *buf, size_t size) {
- return crc32c_aarch64(crc, (const unsigned char *)buf, (size_t) size);
-}
+extern "C" my_crc32_t crc32c_aarch64_available(void);
+extern "C" const char *crc32c_aarch64_impl(my_crc32_t);
+#elif defined __i386__||defined __x86_64__||defined _M_X64||defined _M_IX86
+extern "C" my_crc32_t crc32c_x86_available(void);
+extern "C" const char *crc32c_x86_impl(my_crc32_t);
#endif
-static inline Function Choose_Extend()
+static inline my_crc32_t Choose_Extend()
{
#if defined HAVE_POWER8 && defined HAS_ALTIVEC
if (arch_ppc_probe())
- return ExtendPPCImpl;
-#elif defined(HAVE_ARMV8_CRC)
- if (crc32c_aarch64_available())
- return ExtendARMImpl;
-#elif HAVE_SSE42
-# if defined HAVE_PCLMUL && SIZEOF_SIZE_T == 8
- switch (cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) {
- case cpuid_ecx_SSE42_AND_PCLMUL:
- return crc32c_3way;
- case cpuid_ecx_SSE42:
- return crc32c_sse42;
- }
-# else
- if (cpuid_ecx() & cpuid_ecx_SSE42)
- return crc32c_sse42;
-# endif
+ return crc32c_ppc;
+#elif defined HAVE_ARMV8_CRC
+ if (my_crc32_t crc= crc32c_aarch64_available())
+ return crc;
+#elif defined __i386__||defined __x86_64__||defined _M_X64||defined _M_IX86
+ if (my_crc32_t crc= crc32c_x86_available())
+ return crc;
#endif
return crc32c_slow;
}
-static const Function ChosenExtend= Choose_Extend();
-
-static inline uint32_t Extend(uint32_t crc, const char* buf, size_t size)
-{
- return ChosenExtend(crc, buf, size);
-}
+static const my_crc32_t ChosenExtend= Choose_Extend();
extern "C" const char *my_crc32c_implementation()
{
-#if defined(HAVE_POWER8) && defined(HAS_ALTIVEC)
- if (ChosenExtend == ExtendPPCImpl)
+#if defined HAVE_POWER8 && defined HAS_ALTIVEC
+ if (ChosenExtend == crc32c_ppc)
return "Using POWER8 crc32 instructions";
-#elif defined(HAVE_ARMV8_CRC)
- if (const char *ret= crc32c_aarch64_available())
+#elif defined HAVE_ARMV8_CRC
+ if (const char *ret= crc32c_aarch64_impl(ChosenExtend))
+ return ret;
+#elif defined __i386__||defined __x86_64__||defined _M_X64||defined _M_IX86
+ if (const char *ret= crc32c_x86_impl(ChosenExtend))
return ret;
-#elif HAVE_SSE42
-# if defined HAVE_PCLMUL && SIZEOF_SIZE_T == 8
- if (ChosenExtend == crc32c_3way)
- return "Using crc32 + pclmulqdq instructions";
-# endif
- if (ChosenExtend == crc32c_sse42)
- return "Using SSE4.2 crc32 instructions";
#endif
return "Using generic crc32 instructions";
}
@@ -593,5 +528,5 @@ extern "C" const char *my_crc32c_implementation()
extern "C" unsigned my_crc32c(unsigned int crc, const char *buf, size_t size)
{
- return mysys_namespace::crc32c::Extend(crc,buf, size);
+ return mysys_namespace::crc32c::ChosenExtend(crc,buf, size);
}
diff --git a/mysys/crc32/crc32c_amd64.cc b/mysys/crc32/crc32c_amd64.cc
index 22c492b4..147c0cca 100644
--- a/mysys/crc32/crc32c_amd64.cc
+++ b/mysys/crc32/crc32c_amd64.cc
@@ -47,6 +47,11 @@
#include <nmmintrin.h>
#include <wmmintrin.h>
+#ifdef _MSC_VER
+# define USE_PCLMUL /* nothing */
+#else
+# define USE_PCLMUL __attribute__((target("sse4.2,pclmul")))
+#endif
#define CRCtriplet(crc, buf, offset) \
crc##0 = _mm_crc32_u64(crc##0, *(buf##0 + offset)); \
@@ -131,6 +136,7 @@ static const uint64_t clmul_constants alignas(16) [] = {
};
// Compute the crc32c value for buffer smaller than 8
+USE_PCLMUL
static inline void align_to_8(
size_t len,
uint64_t& crc0, // crc so far, updated on return
@@ -155,6 +161,7 @@ static inline void align_to_8(
// CombineCRC performs pclmulqdq multiplication of 2 partial CRC's and a well
// chosen constant and xor's these with the remaining CRC.
//
+USE_PCLMUL
static inline uint64_t CombineCRC(
size_t block_size,
uint64_t crc0,
@@ -176,6 +183,7 @@ static inline uint64_t CombineCRC(
// Compute CRC-32C using the Intel hardware instruction.
extern "C"
+USE_PCLMUL
uint32_t crc32c_3way(uint32_t crc, const char *buf, size_t len)
{
const unsigned char* next = (const unsigned char*)buf;
diff --git a/mysys/crc32/crc32c_ppc.h b/mysys/crc32/crc32c_ppc.h
index c359061c..797e849b 100644
--- a/mysys/crc32/crc32c_ppc.h
+++ b/mysys/crc32/crc32c_ppc.h
@@ -11,8 +11,7 @@
extern "C" {
#endif
-extern uint32_t crc32c_ppc(uint32_t crc, unsigned char const *buffer,
- unsigned len);
+extern unsigned crc32c_ppc(unsigned crc, const void *buffer, size_t len);
#ifdef __cplusplus
}
diff --git a/mysys/crc32/crc32c_x86.cc b/mysys/crc32/crc32c_x86.cc
new file mode 100644
index 00000000..02dbf292
--- /dev/null
+++ b/mysys/crc32/crc32c_x86.cc
@@ -0,0 +1,457 @@
+/* Copyright (c) 2024, MariaDB plc
+
+ This program is free 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 <cstddef>
+#include <cstdint>
+
+#ifdef _MSC_VER
+# include <intrin.h>
+# if 0 /* So far, we have no environment where this could be tested. */
+# define USE_VPCLMULQDQ /* nothing */
+# endif
+#else
+# include <cpuid.h>
+# if __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 8)
+# define TARGET "pclmul,avx512f,avx512dq,avx512bw,avx512vl,vpclmulqdq"
+# define USE_VPCLMULQDQ __attribute__((target(TARGET)))
+# endif
+#endif
+
+extern "C" unsigned crc32c_sse42(unsigned crc, const void* buf, size_t size);
+
+constexpr uint32_t cpuid_ecx_SSE42= 1U << 20;
+constexpr uint32_t cpuid_ecx_SSE42_AND_PCLMUL= cpuid_ecx_SSE42 | 1U << 1;
+
+static uint32_t cpuid_ecx()
+{
+#ifdef __GNUC__
+ uint32_t reax= 0, rebx= 0, recx= 0, redx= 0;
+ __cpuid(1, reax, rebx, recx, redx);
+ return recx;
+#elif defined _MSC_VER
+ int regs[4];
+ __cpuid(regs, 1);
+ return regs[2];
+#else
+# error "unknown compiler"
+#endif
+}
+
+typedef unsigned (*my_crc32_t)(unsigned, const void *, size_t);
+extern "C" unsigned int crc32_pclmul(unsigned int, const void *, size_t);
+extern "C" unsigned int crc32c_3way(unsigned int, const void *, size_t);
+
+#ifdef USE_VPCLMULQDQ
+# include <immintrin.h>
+
+# ifdef _MSC_VER
+/* MSVC does not seem to define this intrinsic for vmovdqa */
+# define _mm_load_epi32(x) *reinterpret_cast<const __m128i*>(x)
+# endif
+
+/*
+ This implementation is based on
+ crc32_by16_vclmul_avx512 and crc32_refl_by16_vclmul_avx512
+ in https://github.com/intel/intel-ipsec-mb/ with some optimizations.
+ The // comments in crc32_avx512() correspond to assembler labels.
+*/
+
+/** table of constants corresponding to a CRC polynomial up to degree 32 */
+struct alignas(64) crc32_tab
+{
+ const uint64_t b2048[2], b1024[2];
+ alignas(64) const uint64_t b896[6]; /* includes b786, b640 */
+ const uint64_t b512[2];
+ const uint64_t b384[2], b256[2], b128[2], zeropad_for_b384[2];
+ const uint64_t b64[2], b32[2];
+};
+
+/** ISO 3309 CRC-32 (reflected polynomial 0x04C11DB7); zlib crc32() */
+static const crc32_tab refl32 = {
+ { 0x00000000e95c1271, 0x00000000ce3371cb },
+ { 0x00000000910eeec1, 0x0000000033fff533 },
+ { 0x000000000cbec0ed, 0x0000000031f8303f,
+ 0x0000000057c54819, 0x00000000df068dc2,
+ 0x00000000ae0b5394, 0x000000001c279815 },
+ { 0x000000001d9513d7, 0x000000008f352d95 },
+ { 0x00000000af449247, 0x000000003db1ecdc },
+ { 0x0000000081256527, 0x00000000f1da05aa },
+ { 0x00000000ccaa009e, 0x00000000ae689191 },
+ { 0, 0 },
+ { 0x00000000ccaa009e, 0x00000000b8bc6765 },
+ { 0x00000001f7011640, 0x00000001db710640 }
+};
+
+/** Castagnoli CRC-32C (reflected polynomial 0x1EDC6F41) */
+static const crc32_tab refl32c = {
+ { 0x00000000b9e02b86, 0x00000000dcb17aa4 },
+ { 0x000000000d3b6092, 0x000000006992cea2 },
+ { 0x0000000047db8317, 0x000000002ad91c30,
+ 0x000000000715ce53, 0x00000000c49f4f67,
+ 0x0000000039d3b296, 0x00000000083a6eec },
+ { 0x000000009e4addf8, 0x00000000740eef02 },
+ { 0x00000000ddc0152b, 0x000000001c291d04 },
+ { 0x00000000ba4fc28e, 0x000000003da6d0cb },
+ { 0x00000000493c7d27, 0x00000000f20c0dfe },
+ { 0, 0 },
+ { 0x00000000493c7d27, 0x00000000dd45aab8 },
+ { 0x00000000dea713f0, 0x0000000105ec76f0 }
+};
+
+/** Some ternary functions */
+class ternary
+{
+ static constexpr uint8_t A = 0b11110000;
+ static constexpr uint8_t B = 0b11001100;
+ static constexpr uint8_t C = 0b10101010;
+public:
+ static constexpr uint8_t XOR3 = A ^ B ^ C;
+ static constexpr uint8_t XNOR3 = uint8_t(~(A ^ B ^ C));
+ static constexpr uint8_t XOR2_AND = (A ^ B) & C;
+};
+
+USE_VPCLMULQDQ
+/** @return a^b^c */
+static inline __m128i xor3_128(__m128i a, __m128i b, __m128i c)
+{
+ return _mm_ternarylogic_epi64(a, b, c, ternary::XOR3);
+}
+
+USE_VPCLMULQDQ
+/** @return ~(a^b^c) */
+static inline __m128i xnor3_128(__m128i a, __m128i b, __m128i c)
+{
+ return _mm_ternarylogic_epi64(a, b, c, ternary::XNOR3);
+}
+
+USE_VPCLMULQDQ
+/** @return a^b^c */
+static inline __m512i xor3_512(__m512i a, __m512i b, __m512i c)
+{
+ return _mm512_ternarylogic_epi64(a, b, c, ternary::XOR3);
+}
+
+USE_VPCLMULQDQ
+/** @return (a^b)&c */
+static inline __m128i xor2_and_128(__m128i a, __m128i b, __m128i c)
+{
+ return _mm_ternarylogic_epi64(a, b, c, ternary::XOR2_AND);
+}
+
+USE_VPCLMULQDQ
+/** Load 64 bytes */
+static inline __m512i load512(const char *b) { return _mm512_loadu_epi8(b); }
+
+USE_VPCLMULQDQ
+/** Load 16 bytes */
+static inline __m128i load128(const char *b) { return _mm_loadu_epi64(b); }
+
+/** Combine 512 data bits with CRC */
+USE_VPCLMULQDQ
+static inline __m512i combine512(__m512i a, __m512i tab, __m512i b)
+{
+ return xor3_512(b, _mm512_clmulepi64_epi128(a, tab, 0x01),
+ _mm512_clmulepi64_epi128(a, tab, 0x10));
+}
+
+# define xor512(a, b) _mm512_xor_epi64(a, b)
+# define xor256(a, b) _mm256_xor_epi64(a, b)
+# define xor128(a, b) _mm_xor_epi64(a, b)
+# define and128(a, b) _mm_and_si128(a, b)
+
+template<uint8_t bits> USE_VPCLMULQDQ
+/** Pick a 128-bit component of a 512-bit vector */
+static inline __m512i extract512_128(__m512i a)
+{
+ static_assert(bits <= 3, "usage");
+# if defined __GNUC__ && __GNUC__ >= 11
+ /* While technically incorrect, this would seem to translate into a
+ vextracti32x4 instruction, which actually outputs a ZMM register
+ (anything above the XMM range is cleared). */
+ return _mm512_castsi128_si512(_mm512_extracti64x2_epi64(a, bits));
+# else
+ /* On clang, this is needed in order to get a correct result. */
+ return _mm512_maskz_shuffle_i64x2(3, a, a, bits);
+# endif
+}
+
+alignas(16) static const uint64_t shuffle128[4] = {
+ 0x8786858483828100, 0x8f8e8d8c8b8a8988,
+ 0x0706050403020100, 0x000e0d0c0b0a0908
+};
+
+static const __mmask16 size_mask[16] = {
+ 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
+ 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
+};
+
+alignas(16) static const uint64_t shift128[4] = {
+ 0x8786858483828100, 0x8f8e8d8c8b8a8988,
+ 0x0706050403020100, 0x000e0d0c0b0a0908
+};
+
+static const char shift_1_to_3_reflect[7 + 11] = {
+ -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+};
+
+USE_VPCLMULQDQ
+static unsigned crc32_avx512(unsigned crc, const char *buf, size_t size,
+ const crc32_tab &tab)
+{
+ const __m512i crc_in = _mm512_castsi128_si512(_mm_cvtsi32_si128(~crc)),
+ b512 = _mm512_broadcast_i32x4(_mm_load_epi32(tab.b512));
+ __m128i crc_out;
+ __m512i lo;
+
+ if (size >= 256) {
+ lo = xor512(load512(buf), crc_in);
+ __m512i l1 = load512(buf + 64);
+
+ const __m512i b1024 = _mm512_broadcast_i32x4(_mm_load_epi32(&tab.b1024));
+ size -= 256;
+ if (size >= 256) {
+ __m512i h0 = load512(buf + 128),
+ hi = load512(buf + 192);
+ const __m512i b2048 = _mm512_broadcast_i32x4(_mm_load_epi32(&tab.b2048));
+ size -= 256;
+ do {
+ buf += 256;
+ lo = combine512(lo, b2048, load512(buf));
+ l1 = combine512(l1, b2048, load512(buf + 64));
+ h0 = combine512(h0, b2048, load512(buf + 128));
+ hi = combine512(hi, b2048, load512(buf + 192));
+ size -= 256;
+ } while (ssize_t(size) >= 0);
+
+ buf += 256;
+ lo = combine512(lo, b1024, h0);
+ l1 = combine512(l1, b1024, hi);
+ size += 128;
+ } else {
+ do {
+ buf += 128;
+ lo = combine512(lo, b1024, load512(buf));
+ l1 = combine512(l1, b1024, load512(buf + 64));
+ size -= 128;
+ } while (ssize_t(size) >= 0);
+
+ buf += 128;
+ }
+
+ if (ssize_t(size) >= -64) {
+ size += 128;
+ lo = combine512(lo, b512, l1);
+ goto fold_64_B_loop;
+ }
+
+ const __m512i
+ b896 = _mm512_load_epi32(&tab.b896),
+ b384 = _mm512_load_epi32(&tab.b384);
+
+ __m512i c4 = xor3_512(_mm512_clmulepi64_epi128(lo, b896, 1),
+ _mm512_clmulepi64_epi128(lo, b896, 0x10),
+ _mm512_clmulepi64_epi128(l1, b384, 1));
+ c4 = xor3_512(c4, _mm512_clmulepi64_epi128(l1, b384, 0x10),
+ extract512_128<3>(l1));
+
+ __m256i c2 = _mm512_castsi512_si256(_mm512_shuffle_i64x2(c4, c4, 0b01001110));
+ c2 = xor256(c2, _mm512_castsi512_si256(c4));
+ crc_out = xor128(_mm256_extracti64x2_epi64(c2, 1),
+ _mm256_castsi256_si128(c2));
+ size += 128 - 16;
+ goto final_reduction;
+ }
+
+ __m128i b;
+
+ // less_than_256
+ if (size >= 32) {
+ if (size >= 64) {
+ lo = xor512(load512(buf), crc_in);
+
+ while (buf += 64, (size -= 64) >= 64)
+ fold_64_B_loop:
+ lo = combine512(lo, b512, load512(buf));
+
+ // reduce_64B
+ const __m512i b384 = _mm512_load_epi32(&tab.b384);
+ __m512i crc512 =
+ xor3_512(_mm512_clmulepi64_epi128(lo, b384, 1),
+ _mm512_clmulepi64_epi128(lo, b384, 0x10),
+ extract512_128<3>(lo));
+ crc512 = xor512(crc512, _mm512_shuffle_i64x2(crc512, crc512, 0b01001110));
+ const __m256i crc256 = _mm512_castsi512_si256(crc512);
+ crc_out = xor128(_mm256_extracti64x2_epi64(crc256, 1),
+ _mm256_castsi256_si128(crc256));
+ size -= 16;
+ } else {
+ // less_than_64
+ crc_out = xor128(load128(buf),
+ _mm512_castsi512_si128(crc_in));
+ buf += 16;
+ size -= 32;
+ }
+
+ final_reduction:
+ b = _mm_load_epi32(&tab.b128);
+
+ while (ssize_t(size) >= 0) {
+ // reduction_loop_16B
+ crc_out = xor3_128(load128(buf),
+ _mm_clmulepi64_si128(crc_out, b, 1),
+ _mm_clmulepi64_si128(crc_out, b, 0x10));
+ buf += 16;
+ size -= 16;
+ }
+ // final_reduction_for_128
+
+ size += 16;
+ if (size) {
+ get_last_two_xmms:
+ const __m128i crc2 = crc_out, d = load128(buf + (size - 16));
+ __m128i S = load128(reinterpret_cast<const char*>(shuffle128) + size);
+ crc_out = _mm_shuffle_epi8(crc_out, S);
+ S = xor128(S, _mm_set1_epi32(0x80808080));
+ crc_out = xor3_128(_mm_blendv_epi8(_mm_shuffle_epi8(crc2, S), d, S),
+ _mm_clmulepi64_si128(crc_out, b, 1),
+ _mm_clmulepi64_si128(crc_out, b, 0x10));
+ }
+
+ done_128:
+ __m128i crc_tmp;
+ b = _mm_load_epi32(&tab.b64);
+ crc_tmp = xor128(_mm_clmulepi64_si128(crc_out, b, 0x00),
+ _mm_srli_si128(crc_out, 8));
+ crc_out = _mm_slli_si128(crc_tmp, 4);
+ crc_out = _mm_clmulepi64_si128(crc_out, b, 0x10);
+ crc_out = xor128(crc_out, crc_tmp);
+
+ barrett:
+ b = _mm_load_epi32(&tab.b32);
+ crc_tmp = crc_out;
+ crc_out = and128(crc_out, _mm_set_epi64x(~0ULL, ~0xFFFFFFFFULL));
+ crc_out = _mm_clmulepi64_si128(crc_out, b, 0);
+ crc_out = xor2_and_128(crc_out, crc_tmp, _mm_set_epi64x(0, ~0ULL));
+ crc_out = xnor3_128(crc_out, crc_tmp,
+ _mm_clmulepi64_si128(crc_out, b, 0x10));
+ return _mm_extract_epi32(crc_out, 2);
+ } else {
+ // less_than_32
+ if (size > 0) {
+ if (size > 16) {
+ crc_out = xor128(load128(buf),
+ _mm512_castsi512_si128(crc_in));
+ buf += 16;
+ size -= 16;
+ b = _mm_load_epi32(&tab.b128);
+ goto get_last_two_xmms;
+ } else if (size < 16) {
+ crc_out = _mm_maskz_loadu_epi8(size_mask[size - 1], buf);
+ crc_out = xor128(crc_out, _mm512_castsi512_si128(crc_in));
+
+ if (size >= 4) {
+ crc_out = _mm_shuffle_epi8
+ (crc_out,
+ load128(reinterpret_cast<const char*>(shift128) + size));
+ goto done_128;
+ } else {
+ // only_less_than_4
+ /* Shift, zero-filling 5 to 7 of the 8-byte crc_out */
+ crc_out = _mm_shuffle_epi8(crc_out,
+ load128(shift_1_to_3_reflect + size - 1));
+ goto barrett;
+ }
+ } else {
+ crc_out = xor128(load128(buf), _mm512_castsi512_si128(crc_in));
+ goto done_128;
+ }
+ } else
+ return crc;
+ }
+}
+
+static ATTRIBUTE_NOINLINE int have_vpclmulqdq()
+{
+# ifdef _MSC_VER
+ int regs[4];
+ __cpuidex(regs, 7, 0);
+ uint32_t ebx = regs[1], ecx = regs[2];
+# else
+ uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
+ __cpuid_count(7, 0, eax, ebx, ecx, edx);
+# endif
+ return ecx & 1U<<10/*VPCLMULQDQ*/ &&
+ !(~ebx & ((1U<<16/*AVX512F*/ | 1U<<17/*AVX512DQ*/ |
+ 1U<<30/*AVX512BW*/ | 1U<<31/*AVX512VL*/)));
+}
+
+static unsigned crc32_vpclmulqdq(unsigned crc, const void *buf, size_t size)
+{
+ return crc32_avx512(crc, static_cast<const char*>(buf), size, refl32);
+}
+
+static unsigned crc32c_vpclmulqdq(unsigned crc, const void *buf, size_t size)
+{
+ return crc32_avx512(crc, static_cast<const char*>(buf), size, refl32c);
+}
+#endif
+
+extern "C" my_crc32_t crc32_pclmul_enabled(void)
+{
+ if (~cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL)
+ return nullptr;
+#ifdef USE_VPCLMULQDQ
+ if (have_vpclmulqdq())
+ return crc32_vpclmulqdq;
+#endif
+ return crc32_pclmul;
+}
+
+extern "C" my_crc32_t crc32c_x86_available(void)
+{
+#ifdef USE_VPCLMULQDQ
+ if (have_vpclmulqdq())
+ return crc32c_vpclmulqdq;
+#endif
+#if SIZEOF_SIZE_T == 8
+ switch (cpuid_ecx() & cpuid_ecx_SSE42_AND_PCLMUL) {
+ case cpuid_ecx_SSE42_AND_PCLMUL:
+ return crc32c_3way;
+ case cpuid_ecx_SSE42:
+ return crc32c_sse42;
+ }
+#else
+ if (cpuid_ecx() & cpuid_ecx_SSE42)
+ return crc32c_sse42;
+#endif
+ return nullptr;
+}
+
+extern "C" const char *crc32c_x86_impl(my_crc32_t c)
+{
+#ifdef USE_VPCLMULQDQ
+ if (c == crc32c_vpclmulqdq)
+ return "Using AVX512 instructions";
+#endif
+#if SIZEOF_SIZE_T == 8
+ if (c == crc32c_3way)
+ return "Using crc32 + pclmulqdq instructions";
+#endif
+ if (c == crc32c_sse42)
+ return "Using SSE4.2 crc32 instructions";
+ return nullptr;
+}
diff --git a/mysys/crc32/crc_ppc64.h b/mysys/crc32/crc_ppc64.h
index eb9379ab..81bbc16d 100644
--- a/mysys/crc32/crc_ppc64.h
+++ b/mysys/crc32/crc_ppc64.h
@@ -28,7 +28,7 @@
* any later version, or
* b) the Apache License, Version 2.0
*/
-
+#include <stddef.h>
#include <altivec.h>
@@ -57,12 +57,13 @@ static unsigned int __attribute__ ((aligned (32)))
__crc32_vpmsum(unsigned int crc, const void* p, unsigned long len);
-unsigned int CRC32_FUNCTION(unsigned int crc, const unsigned char *p,
- unsigned long len)
+unsigned CRC32_FUNCTION(unsigned crc, const void *buffer, size_t len)
{
unsigned int prealign;
unsigned int tail;
+ const unsigned char *p = buffer;
+
#ifdef CRC_XOR
crc ^= 0xffffffff;
#endif
diff --git a/mysys/crc32ieee.cc b/mysys/crc32ieee.cc
index 14e8017d..c11bdacf 100644
--- a/mysys/crc32ieee.cc
+++ b/mysys/crc32ieee.cc
@@ -26,23 +26,22 @@ static unsigned int my_crc32_zlib(unsigned int crc, const void *data,
return (unsigned int) crc32(crc, (const Bytef *)data, (unsigned int) len);
}
-#ifdef HAVE_PCLMUL
-extern "C" int crc32_pclmul_enabled();
-extern "C" unsigned int crc32_pclmul(unsigned int, const void *, size_t);
-#elif defined(__GNUC__) && defined(HAVE_ARMV8_CRC)
+typedef unsigned int (*my_crc32_t)(unsigned int, const void *, size_t);
+
+#if defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__
+extern "C" my_crc32_t crc32_pclmul_enabled();
+#elif defined HAVE_ARMV8_CRC
extern "C" int crc32_aarch64_available();
extern "C" unsigned int crc32_aarch64(unsigned int, const void *, size_t);
#endif
-typedef unsigned int (*my_crc32_t)(unsigned int, const void *, size_t);
-
static my_crc32_t init_crc32()
{
-#ifdef HAVE_PCLMUL
- if (crc32_pclmul_enabled())
- return crc32_pclmul;
-#elif defined(__GNUC__) && defined(HAVE_ARMV8_CRC)
+#if defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__
+ if (my_crc32_t crc= crc32_pclmul_enabled())
+ return crc;
+#elif defined HAVE_ARMV8_CRC
if (crc32_aarch64_available())
return crc32_aarch64;
#endif
diff --git a/mysys/errors.c b/mysys/errors.c
index d88540fe..a8be37bf 100644
--- a/mysys/errors.c
+++ b/mysys/errors.c
@@ -112,6 +112,13 @@ void init_glob_errs()
}
#endif
+static void my_space_sleep(uint seconds)
+{
+ sleep(seconds);
+}
+
+void (*my_sleep_for_space)(uint seconds)= my_space_sleep;
+
void wait_for_free_space(const char *filename, int errors)
{
if (errors == 0)
@@ -123,7 +130,7 @@ void wait_for_free_space(const char *filename, int errors)
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);
+ my_sleep_for_space(MY_WAIT_FOR_USER_TO_FIX_PANIC);
}
const char **get_global_errmsgs(int nr __attribute__((unused)))
diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c
index fc3f320a..4dc41645 100644
--- a/mysys/lf_alloc-pin.c
+++ b/mysys/lf_alloc-pin.c
@@ -291,7 +291,7 @@ static int harvest_pins(LF_PINS *el, struct st_harvester *hv)
{
for (i= 0; i < LF_PINBOX_PINS; i++)
{
- void *p= el->pin[i];
+ void *p= my_atomic_loadptr((void **)&el->pin[i]);
if (p)
*hv->granary++= p;
}
@@ -316,7 +316,7 @@ static int match_pins(LF_PINS *el, void *addr)
LF_PINS *el_end= el+LF_DYNARRAY_LEVEL_LENGTH;
for (; el < el_end; el++)
for (i= 0; i < LF_PINBOX_PINS; i++)
- if (el->pin[i] == addr)
+ if (my_atomic_loadptr((void **)&el->pin[i]) == addr)
return 1;
return 0;
}
@@ -501,7 +501,8 @@ void *lf_alloc_new(LF_PINS *pins)
{
node= allocator->top;
lf_pin(pins, 0, node);
- } while (node != allocator->top && LF_BACKOFF());
+ } while (node != my_atomic_loadptr((void **)(char *)&allocator->top)
+ && LF_BACKOFF());
if (!node)
{
node= (void *)my_malloc(key_memory_lf_node, allocator->element_size,
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index 0f1c6d6b..3393b610 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -66,7 +66,11 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
DBUG_ENTER("create_temp_file");
DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir ? dir : "(null)", prefix));
+#if !defined _WIN32 && defined O_DIRECT
+ DBUG_ASSERT((mode & (O_EXCL | O_TRUNC | O_CREAT | O_RDWR | O_DIRECT)) == 0);
+#else
DBUG_ASSERT((mode & (O_EXCL | O_TRUNC | O_CREAT | O_RDWR)) == 0);
+#endif
mode|= O_TRUNC | O_CREAT | O_RDWR; /* not O_EXCL, see Windows code below */
@@ -118,16 +122,41 @@ File create_temp_file(char *to, const char *dir, const char *prefix,
if ((MyFlags & MY_TEMPORARY) && O_TMPFILE_works)
{
- /* explictly don't use O_EXCL here has it has a different
- meaning with O_TMPFILE
+ /*
+ explicitly 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)
+ const int flags= (mode & ~O_CREAT) | O_TMPFILE | O_CLOEXEC;
+ const mode_t open_mode= S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
+# ifdef O_DIRECT
+ static int O_TMPFILE_works_with_O_DIRECT= O_DIRECT;
+ const int try_O_DIRECT= mode & O_TMPFILE_works_with_O_DIRECT;
+ if (try_O_DIRECT)
+ file= open(dir, flags | O_DIRECT, open_mode);
+ else
+# endif
+ file= open(dir, flags, open_mode);
+
+ if (file >= 0)
{
+# ifdef O_DIRECT
+ O_TMPFILE_works:
+# endif
my_snprintf(to, FN_REFLEN, "%s/#sql/fd=%d", dir, file);
file=my_register_filename(file, to, FILE_BY_O_TMPFILE,
EE_CANTCREATEFILE, MyFlags);
}
+# ifdef O_DIRECT
+ else if (errno == EINVAL && try_O_DIRECT)
+ {
+ file= open(dir, flags, open_mode);
+ if (file >= 0)
+ {
+ O_TMPFILE_works_with_O_DIRECT= 0;
+ goto O_TMPFILE_works;
+ }
+ }
+# endif
else if (errno == EOPNOTSUPP || errno == EINVAL)
{
my_printf_error(EE_CANTCREATEFILE, "O_TMPFILE is not supported on %s "
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c
index 9893c7e4..c9bbcc4b 100644
--- a/mysys/my_bitmap.c
+++ b/mysys/my_bitmap.c
@@ -13,17 +13,28 @@
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 02110-1335
+ USA
+ */
/*
- Handling of uchar arrays as large bitmaps.
+ Handling of my_bitmap_map (ulonglong) arrays as large bitmaps.
API limitations (or, rather asserted safety assumptions,
to encourage correct programming)
- * the internal size is a set of 32 bit words
+ * the internal storage is a set of 64 bit words
* the number of bits specified in creation can be any number > 0
+ Implementation notes:
+ * MY_BITMAP includes a pointer, last_word_ptr, to the last word.
+ The implication is that if one copies bitmaps to another memory
+ location, one has to call create_last_bit_mask() on the bitmap to
+ fix the internal pointer.
+ * The not used part of a the last word should always be 0.
+ This avoids special handling of the last bitmap in several cases.
+ This is checked for most calls to bitmap functions.
+
TODO:
Make assembler thread safe versions of these using test-and-set instructions
@@ -31,117 +42,97 @@
New version written and test program added and some changes to the interface
was made by Mikael Ronstrom 2005, with assistance of Tomas Ulin and Mats
Kindahl.
+ Updated to 64 bits and use my_find_first_bit() to speed up
+ bitmap_get_next_set() by Monty in 2024
*/
#include "mysys_priv.h"
#include <my_bitmap.h>
#include <m_string.h>
#include <my_bit.h>
+#include <my_byteorder.h>
+
+
+/* Defines to check bitmaps */
+
+#define DBUG_ASSERT_BITMAP(M) \
+ DBUG_ASSERT((M)->bitmap); \
+ DBUG_ASSERT((M)->n_bits > 0); \
+ DBUG_ASSERT((M)->last_word_ptr == (M)->bitmap + no_words_in_map(M)-1); \
+ DBUG_ASSERT((*(M)->last_word_ptr & (M)->last_bit_mask) == 0);
+
+#define DBUG_ASSERT_BITMAP_AND_BIT(M,B) \
+ DBUG_ASSERT_BITMAP(M); \
+ DBUG_ASSERT((B) < (M)->n_bits);
+
+#define DBUG_ASSERT_DIFFERENT_BITMAPS(M,N) \
+ DBUG_ASSERT_BITMAP(M); \
+ DBUG_ASSERT_BITMAP(N);
+
+#define DBUG_ASSERT_IDENTICAL_BITMAPS(M,N) \
+ DBUG_ASSERT_BITMAP(M); \
+ DBUG_ASSERT_BITMAP(N); \
+ DBUG_ASSERT((M)->n_bits == (N)->n_bits);
/*
- 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.
+ Create a mask for the usable bits on the LAST my_bitmap_map position for
+ a bitmap with 'bits' number of bits.
+
+ The lowest 'bits' bits are set to zero and the rest bits are set to 1.
+ For (bits & 63) == 0 , 0 is returned as in this case all bits in the
+ my_bitmap_position are significant. (This example assumes the
+ storage is ulonglong).
+
+ For 'bits & 63' it will return values from the series
+ 0, 0xfffffffffffffffe,.... 0x8000000000000000
*/
-static inline uchar invers_last_byte_mask(uint bits)
-{
- return last_byte_mask(bits) ^ 255;
-}
-
-
-void create_last_word_mask(MY_BITMAP *map)
-{
- unsigned char const mask= invers_last_byte_mask(map->n_bits);
-
- /*
- The first bytes are to be set to zero since they represent real bits
- in the bitvector. The last bytes are set to 0xFF since they represent
- bytes not used by the bitvector. Finally the last byte contains bits
- as set by the mask above.
- */
- unsigned char *ptr= (unsigned char*)&map->last_word_mask;
-
- map->last_word_ptr= map->bitmap + no_words_in_map(map)-1;
- switch (no_bytes_in_map(map) & 3) {
- case 1:
- map->last_word_mask= ~0U;
- ptr[0]= mask;
- return;
- case 2:
- map->last_word_mask= ~0U;
- ptr[0]= 0;
- ptr[1]= mask;
- return;
- case 3:
- map->last_word_mask= 0U;
- ptr[2]= mask;
- ptr[3]= 0xFFU;
- return;
- case 0:
- map->last_word_mask= 0U;
- ptr[3]= mask;
- return;
- }
+static inline my_bitmap_map last_bit_mask(uint bits)
+{
+ uint bits_in_last_map= (bits & (my_bitmap_map_bits-1));
+ return bits_in_last_map ? ~((1ULL << bits_in_last_map)-1) : 0ULL;
}
-static inline my_bitmap_map last_word_mask(uint bit)
-{
- my_bitmap_map last_word_mask;
- uint n_bits= bit + 1;
- unsigned char const mask= invers_last_byte_mask(n_bits);
-
- /*
- The first bytes are to be set to zero since they represent real bits
- in the bitvector. The last bytes are set to 0xFF since they represent
- bytes not used by the bitvector. Finally the last byte contains bits
- as set by the mask above.
- */
- unsigned char *ptr= (unsigned char*)&last_word_mask;
-
- switch ((n_bits + 7)/8 & 3) {
- case 1:
- last_word_mask= ~0U;
- ptr[0]= mask;
- break;
- case 2:
- last_word_mask= ~0U;
- ptr[0]= 0;
- ptr[1]= mask;
- break;
- case 3:
- last_word_mask= 0U;
- ptr[2]= mask;
- ptr[3]= 0xFFU;
- break;
- case 0:
- last_word_mask= 0U;
- ptr[3]= mask;
- break;
- }
- return last_word_mask;
-}
+/*
+ Get a mask of the bits that are to be considered as 'on' at location
+ starting with 'bits'.
+ This function has _inv in it's name as it's usage is invers compared
+ to last_bit_mask().
+ For (bits & 63) it will return values from the series
+ 0xffffffffffffffff, 0xfffffffffffffffe,.... 0x8000000000000000
+*/
-static inline uint get_first_set(my_bitmap_map value, uint word_pos)
+static inline my_bitmap_map first_bit_mask_inv(uint bits)
{
- uchar *byte_ptr= (uchar*)&value;
- uchar byte_value;
- uint byte_pos, bit_pos;
+ uint bits_in_last_map= (bits & (my_bitmap_map_bits-1));
+ return ~((1ULL << bits_in_last_map)-1);
+}
+
+
+/*
+ Update the bitmap's last_word_ptr and last_bit_mask
+ Also ensure that the last world is all zero to make it
+ easy to find the next set bit.
+
+ Note that if n_bits is 0, then last_word_ptr will point to
+ bitmap (safely). The bitmap will not be usable for almost any operation.
+*/
- DBUG_ASSERT(value);
- for (byte_pos=0; ; byte_pos++, byte_ptr++)
+void create_last_bit_mask(MY_BITMAP *map)
+{
+ my_bitmap_map mask= last_bit_mask(map->n_bits);
+ map->last_bit_mask= mask;
+ map->last_word_ptr= map->bitmap + MY_MAX(no_words_in_map(map),1) -1;
+ if (map->n_bits > 0)
{
- if ((byte_value= *byte_ptr))
- {
- for (bit_pos=0; ; bit_pos++)
- if (byte_value & (1 << bit_pos))
- return (word_pos*32) + (byte_pos*8) + bit_pos;
- }
+ *map->last_word_ptr&= ~mask; /* Set not used bits to 0 */
+ DBUG_ASSERT_BITMAP(map);
}
- return MY_BIT_NONE; /* Impossible */
}
+
/*
Initialize a bitmap object. All bits will be set to zero
*/
@@ -149,17 +140,24 @@ static inline uint get_first_set(my_bitmap_map value, uint word_pos)
my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits)
{
DBUG_ENTER("my_bitmap_init");
+
if (!buf)
{
uint size_in_bytes= bitmap_buffer_size(n_bits);
if (!(buf= (my_bitmap_map*) my_malloc(key_memory_MY_BITMAP_bitmap,
size_in_bytes, MYF(MY_WME))))
+ {
+ map->bitmap= 0;
DBUG_RETURN(1);
+ }
+ map->bitmap_allocated= 1;
}
+ else
+ map->bitmap_allocated= 0;
map->bitmap= buf;
map->n_bits= n_bits;
- create_last_word_mask(map);
+ create_last_bit_mask(map);
bitmap_clear_all(map);
DBUG_RETURN(0);
}
@@ -170,7 +168,8 @@ void my_bitmap_free(MY_BITMAP *map)
DBUG_ENTER("my_bitmap_free");
if (map->bitmap)
{
- my_free(map->bitmap);
+ if (map->bitmap_allocated)
+ my_free(map->bitmap);
map->bitmap=0;
}
DBUG_VOID_RETURN;
@@ -192,11 +191,14 @@ void my_bitmap_free(MY_BITMAP *map)
my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
- uchar *value= ((uchar*) map->bitmap) + (bitmap_bit / 8);
- uchar bit= 1 << ((bitmap_bit) & 7);
- uchar res= (*value) & bit;
+ my_bitmap_map *value, bit, res;
+ DBUG_ASSERT_BITMAP_AND_BIT(map, bitmap_bit);
+
+ value= map->bitmap + (bitmap_bit/my_bitmap_map_bits);
+ bit= 1ULL << (bitmap_bit & (my_bitmap_map_bits-1));
+ res= *value & bit;
*value|= bit;
- return res;
+ return MY_TEST(res);
}
@@ -215,8 +217,7 @@ my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit)
my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(bitmap_bit < map->n_bits);
+ DBUG_ASSERT_BITMAP_AND_BIT(map, bitmap_bit);
return bitmap_fast_test_and_set(map, bitmap_bit);
}
@@ -235,18 +236,20 @@ my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit)
my_bool bitmap_fast_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
- uchar *byte= (uchar*) map->bitmap + (bitmap_bit / 8);
- uchar bit= 1 << ((bitmap_bit) & 7);
- uchar res= (*byte) & bit;
- *byte&= ~bit;
- return res;
+ my_bitmap_map *value, bit, res;
+ DBUG_ASSERT_BITMAP_AND_BIT(map, bitmap_bit);
+
+ value= map->bitmap + (bitmap_bit/my_bitmap_map_bits);
+ bit= 1ULL << (bitmap_bit & (my_bitmap_map_bits-1));
+ res= *value & bit;
+ *value&= ~bit;
+ return MY_TEST(res);
}
my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(bitmap_bit < map->n_bits);
+ DBUG_ASSERT_BITMAP_AND_BIT(map, bitmap_bit);
return bitmap_fast_test_and_clear(map, bitmap_bit);
}
@@ -254,8 +257,8 @@ my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
uint bitmap_set_next(MY_BITMAP *map)
{
uint bit_found;
- DBUG_ASSERT(map->bitmap);
- if ((bit_found= bitmap_get_first(map)) != MY_BIT_NONE)
+ DBUG_ASSERT_BITMAP(map);
+ if ((bit_found= bitmap_get_first_clear(map)) != MY_BIT_NONE)
bitmap_set_bit(map, bit_found);
return bit_found;
}
@@ -265,58 +268,69 @@ uint bitmap_set_next(MY_BITMAP *map)
Set the specified number of bits in the bitmap buffer.
@param map [IN] Bitmap
- @param prefix_size [IN] Number of bits to be set
+ @param prefix_size [IN] Number of bits to be set or (uint) ~0 for all
*/
+
void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size)
{
- uint prefix_bytes, prefix_bits, d;
- uchar *m= (uchar *)map->bitmap;
-
- DBUG_ASSERT(map->bitmap);
+ uint prefix, prefix_bits;
+ my_bitmap_map *value= map->bitmap;
+ DBUG_ASSERT_BITMAP(map);
DBUG_ASSERT(prefix_size <= map->n_bits || prefix_size == (uint) ~0);
set_if_smaller(prefix_size, map->n_bits);
- if ((prefix_bytes= prefix_size / 8))
- memset(m, 0xff, prefix_bytes);
- m+= prefix_bytes;
- if ((prefix_bits= prefix_size & 7))
+
+ if ((prefix= prefix_size / my_bitmap_map_bits))
{
- *(m++)= (1 << prefix_bits)-1;
- // As the prefix bits are set, lets count this byte too as a prefix byte.
- prefix_bytes ++;
+ my_bitmap_map *end= value+prefix;
+ do
+ {
+ *value++= ~(my_bitmap_map) 0;
+ } while (value < end);
}
- if ((d= no_bytes_in_map(map)-prefix_bytes))
- memset(m, 0, d);
+ if ((prefix_bits= prefix_size & (my_bitmap_map_bits-1)))
+ *value++= (1ULL << prefix_bits)-1;
+ while (value <= map->last_word_ptr)
+ *value++= 0;
+ DBUG_ASSERT_BITMAP(map);
}
+/**
+ Check if bitmap is a bitmap of prefix bits set in the beginning
+
+ @param map bitmap
+ @param prefix_size number of bits that should be set. 0 is allowed.
+
+ @return 1 Yes, prefix bits where set or prefix_size == 0.
+ @return 0 No
+*/
+
my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
{
- uint prefix_mask= last_byte_mask(prefix_size);
- uchar *m= (uchar*) map->bitmap;
- uchar *end_prefix= m+(prefix_size-1)/8;
- uchar *end;
- DBUG_ASSERT(m);
- DBUG_ASSERT(prefix_size <= map->n_bits);
+ my_bitmap_map *value= map->bitmap;
+ my_bitmap_map *end= value+ (prefix_size/my_bitmap_map_bits);
+ uint prefix_bits;
/* Empty prefix is always true */
if (!prefix_size)
return 1;
- while (m < end_prefix)
- if (*m++ != 0xff)
- return 0;
+ DBUG_ASSERT_BITMAP_AND_BIT(map, prefix_size-1);
- end= ((uchar*) map->bitmap) + no_bytes_in_map(map) - 1;
- if (m == end)
- return ((*m & last_byte_mask(map->n_bits)) == prefix_mask);
-
- if (*m != prefix_mask)
- return 0;
+ while (value < end)
+ if (*value++ != ~(my_bitmap_map) 0)
+ return 0;
- while (++m < end)
- if (*m != 0)
+ if ((prefix_bits= prefix_size & (my_bitmap_map_bits-1)))
+ {
+ if (*value++ != (1ULL << prefix_bits)-1)
+ return 0;
+ }
+ end= map->last_word_ptr;
+ while (value <= end)
+ if (*value++ != 0)
return 0;
- return ((*m & last_byte_mask(map->n_bits)) == 0);
+ return 1;
}
@@ -324,10 +338,12 @@ my_bool bitmap_is_set_all(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
+ DBUG_ASSERT_BITMAP(map);
+
for (; data_ptr < end; data_ptr++)
- if (*data_ptr != 0xFFFFFFFF)
+ if (*data_ptr != ~(my_bitmap_map)0)
return FALSE;
- return (*data_ptr | map->last_word_mask) == 0xFFFFFFFF;
+ return (*data_ptr | map->last_bit_mask) == ~(my_bitmap_map)0;
}
@@ -335,61 +351,58 @@ my_bool bitmap_is_clear_all(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
+ DBUG_ASSERT_BITMAP(map);
- DBUG_ASSERT(map->n_bits > 0);
- for (; data_ptr < end; data_ptr++)
+ for (; data_ptr <= end; data_ptr++)
if (*data_ptr)
return FALSE;
- return (*data_ptr & ~map->last_word_mask) == 0;
+ return TRUE;
}
+
/* Return TRUE if map1 is a subset of map2 */
my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
- my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
+ my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end= map1->last_word_ptr;
+ DBUG_ASSERT_IDENTICAL_BITMAPS(map1,map2);
- DBUG_ASSERT(map1->bitmap && map2->bitmap);
- DBUG_ASSERT(map1->n_bits==map2->n_bits);
-
- end= map1->last_word_ptr;
- while (m1 < end)
+ while (m1 <= end)
{
if ((*m1++) & ~(*m2++))
return 0;
}
- /* here both maps have the same number of bits - see assert above */
- return ((*m1 & ~*m2 & ~map1->last_word_mask) ? 0 : 1);
+ return 1;
}
/* True if bitmaps has any common bits */
my_bool bitmap_is_overlapping(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
- my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
+ my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end= map1->last_word_ptr;
+ DBUG_ASSERT_IDENTICAL_BITMAPS(map1,map2);
- DBUG_ASSERT(map1->bitmap);
- DBUG_ASSERT(map2->bitmap);
- DBUG_ASSERT(map1->n_bits==map2->n_bits);
-
- end= map1->last_word_ptr;
- while (m1 < end)
+ while (m1 <= end)
{
if ((*m1++) & (*m2++))
return 1;
}
- /* here both maps have the same number of bits - see assert above */
- return ((*m1 & *m2 & ~map1->last_word_mask) ? 1 : 0);
+ return 0;
}
+/*
+ Create intersection of two bitmaps
+
+ @param map map1. Result is stored here
+ @param map2 map2
+*/
+
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
uint len= no_words_in_map(map), len2 = no_words_in_map(map2);
-
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(map2->bitmap);
+ DBUG_ASSERT_DIFFERENT_BITMAPS(map,map2);
end= to+MY_MIN(len,len2);
while (to < end)
@@ -397,7 +410,7 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
if (len2 <= len)
{
- to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */
+ to[-1]&= ~map2->last_bit_mask; /* Clear last not relevant bits */
end+= len-len2;
while (to < end)
*to++= 0;
@@ -407,50 +420,51 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
/*
Check if there is some bit index between start_bit and end_bit, such that
- this is bit is set for all bitmaps in bitmap_list.
+ this is at least on bit that set for all bitmaps in bitmap_list.
SYNOPSIS
bitmap_exists_intersection()
bitmpap_array [in] a set of MY_BITMAPs
- bitmap_count [in] number of elements in bitmpap_array
+ bitmap_count [in] number of elements in bitmap_array
start_bit [in] beginning (inclusive) of the range of bits to search
end_bit [in] end (inclusive) of the range of bits to search, must be
no bigger than the bits of the shortest bitmap.
- NOTES
- This function assumes that for at least one of the bitmaps in bitmap_array all
- bits outside the range [start_bit, end_bit] are 0. As a result is not
- necessary to take care of the bits outside the range [start_bit, end_bit].
-
RETURN
TRUE if an intersecion exists
FALSE no intersection
*/
-my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array,
+my_bool bitmap_exists_intersection(MY_BITMAP **bitmap_array,
uint bitmap_count,
uint start_bit, uint end_bit)
{
uint i, j, start_idx, end_idx;
- my_bitmap_map cur_res;
+ my_bitmap_map cur_res, first_map;
DBUG_ASSERT(bitmap_count);
DBUG_ASSERT(end_bit >= start_bit);
for (j= 0; j < bitmap_count; j++)
- DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits);
+ {
+ DBUG_ASSERT_BITMAP_AND_BIT(bitmap_array[j], end_bit);
+ }
start_idx= start_bit/8/sizeof(my_bitmap_map);
end_idx= end_bit/8/sizeof(my_bitmap_map);
+ first_map= first_bit_mask_inv(start_bit);
+ cur_res= first_map;
for (i= start_idx; i < end_idx; i++)
{
- cur_res= ~0;
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[i];
if (cur_res)
return TRUE;
+ cur_res= ~(my_bitmap_map) 0;
}
- cur_res= ~last_word_mask(end_bit);
+ cur_res= ~last_bit_mask(end_bit+1);
+ if (start_idx == end_idx)
+ cur_res&= first_map;
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[end_idx];
return cur_res != 0;
@@ -461,60 +475,21 @@ my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array,
my_bool bitmap_union_is_set_all(const MY_BITMAP *map1, const MY_BITMAP *map2)
{
- my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end;
+ my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end= map1->last_word_ptr;
+ DBUG_ASSERT_IDENTICAL_BITMAPS(map1,map2);
- DBUG_ASSERT(map1->bitmap);
- DBUG_ASSERT(map2->bitmap);
- DBUG_ASSERT(map1->n_bits==map2->n_bits);
- end= map1->last_word_ptr;
while ( m1 < end)
- if ((*m1++ | *m2++) != 0xFFFFFFFF)
+ if ((*m1++ | *m2++) != ~(my_bitmap_map)0)
return FALSE;
/* here both maps have the same number of bits - see assert above */
- return ((*m1 | *m2 | map1->last_word_mask) != 0xFFFFFFFF);
-}
-
-
-
-/*
- Set/clear all bits above a bit.
-
- SYNOPSIS
- bitmap_set_above()
- map RETURN The bitmap to change.
- from_byte The bitmap buffer byte offset to start with.
- use_bit The bit value (1/0) to use for all upper bits.
-
- NOTE
- You can only set/clear full bytes.
- The function is meant for the situation that you copy a smaller bitmap
- to a bigger bitmap. Bitmap lengths are always multiple of eigth (the
- size of a byte). Using 'from_byte' saves multiplication and division
- by eight during parameter passing.
-
- RETURN
- void
-*/
-
-void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit)
-{
- uchar use_byte= use_bit ? 0xff : 0;
- uchar *to= (uchar *)map->bitmap + from_byte;
- uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8;
-
- while (to < end)
- *to++= use_byte;
+ return ((*m1 | *m2 | map1->last_bit_mask) != ~(my_bitmap_map)0);
}
void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
{
- my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(map2->bitmap);
- DBUG_ASSERT(map->n_bits==map2->n_bits);
-
- end= map->last_word_ptr;
+ my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr;
+ DBUG_ASSERT_IDENTICAL_BITMAPS(map,map2);
while (to <= end)
*to++ &= ~(*from++);
@@ -523,12 +498,8 @@ void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
{
- my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
-
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(map2->bitmap);
- DBUG_ASSERT(map->n_bits == map2->n_bits);
- end= map->last_word_ptr;
+ my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr;
+ DBUG_ASSERT_IDENTICAL_BITMAPS(map,map2);
while (to <= end)
*to++ |= *from++;
@@ -538,9 +509,8 @@ void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr;
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(map2->bitmap);
- DBUG_ASSERT(map->n_bits == map2->n_bits);
+ DBUG_ASSERT_IDENTICAL_BITMAPS(map,map2);
+
while (to <= end)
*to++ ^= *from++;
}
@@ -548,13 +518,14 @@ void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_invert(MY_BITMAP *map)
{
- my_bitmap_map *to= map->bitmap, *end;
+ my_bitmap_map *to= map->bitmap, *end= map->last_word_ptr;
+ DBUG_ASSERT_BITMAP(map);
- DBUG_ASSERT(map->bitmap);
- end= map->last_word_ptr;
+ while (to < end)
+ *to++ ^= ~(my_bitmap_map)0;
- while (to <= end)
- *to++ ^= 0xFFFFFFFF;
+ *to ^= (~(my_bitmap_map)0 & ~map->last_bit_mask);
+ DBUG_ASSERT_BITMAP(map);
}
@@ -563,45 +534,54 @@ uint bitmap_bits_set(const MY_BITMAP *map)
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
uint res= 0;
- DBUG_ASSERT(map->bitmap);
+ DBUG_ASSERT_BITMAP(map);
- for (; data_ptr < end; data_ptr++)
- res+= my_count_bits_uint32(*data_ptr);
+ for (; data_ptr <= end; data_ptr++)
+ res+= my_count_bits(*data_ptr);
- /*Reset last bits to zero*/
- res+= my_count_bits_uint32(*map->last_word_ptr & ~map->last_word_mask);
return res;
}
-void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2)
-{
- my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
- DBUG_ASSERT(map->bitmap);
- DBUG_ASSERT(map2->bitmap);
- DBUG_ASSERT(map->n_bits == map2->n_bits);
- end= map->last_word_ptr;
+/**
+ Copy bitmaps
- while (to <= end)
- *to++ = *from++;
+ @param map1 to-bitmap
+ @param map2 from-bitmap
+
+ @notes
+ Code will work even of the bitmaps are of different size.
+ In this case, only up to to->n_bits will be copied.
+*/
+
+void bitmap_copy(MY_BITMAP *map1, const MY_BITMAP *map2)
+{
+ my_bitmap_map *to= map1->bitmap, *from= map2->bitmap;
+ uint map1_length= no_words_in_map(map1)*sizeof(my_bitmap_map);
+ uint map2_length= no_words_in_map(map2)*sizeof(my_bitmap_map);
+ uint length= MY_MIN(map1_length, map2_length);
+ DBUG_ASSERT_DIFFERENT_BITMAPS(map1,map2);
+
+ memcpy(to, from, length);
+ if (length < map1_length)
+ bzero(to + length, map1_length - length);
+ *map1->last_word_ptr&= ~map1->last_bit_mask;
}
+/*
+ Find first set bit in the bitmap
+*/
+
uint bitmap_get_first_set(const MY_BITMAP *map)
{
- uint i;
my_bitmap_map *data_ptr= map->bitmap, *end= map->last_word_ptr;
+ DBUG_ASSERT_BITMAP(map);
- DBUG_ASSERT(map->bitmap);
-
- for (i=0; data_ptr < end; data_ptr++, i++)
+ for (uint i=0; data_ptr <= end; data_ptr++, i++)
if (*data_ptr)
- goto found;
- if (!(*data_ptr & ~map->last_word_mask))
- return MY_BIT_NONE;
-
-found:
- return get_first_set(*data_ptr, i);
+ return my_find_first_bit(*data_ptr) + i * sizeof(my_bitmap_map)*8;
+ return MY_BIT_NONE;
}
@@ -616,80 +596,113 @@ found:
uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit)
{
- uint word_pos, byte_to_mask, i;
- union { my_bitmap_map bitmap ; uchar bitmap_buff[sizeof(my_bitmap_map)]; }
- first_word;
- uchar *ptr= &first_word.bitmap_buff[0];
- my_bitmap_map *data_ptr, *end= map->last_word_ptr;
-
- DBUG_ASSERT(map->bitmap);
+ uint word_pos;
+ my_bitmap_map first_word, *data_ptr, *end= map->last_word_ptr;
+ DBUG_ASSERT_BITMAP(map);
/* Look for the next bit */
bitmap_bit++;
if (bitmap_bit >= map->n_bits)
return MY_BIT_NONE;
- word_pos= bitmap_bit / 32;
+
+ word_pos= bitmap_bit / 64;
data_ptr= map->bitmap + word_pos;
- first_word.bitmap= *data_ptr;
- /* Mask out previous bits from first_word */
- byte_to_mask= (bitmap_bit % 32) / 8;
- for (i= 0; i < byte_to_mask; i++)
- ptr[i]= 0;
- ptr[byte_to_mask]&= 0xFFU << (bitmap_bit & 7);
+ first_word= *data_ptr & first_bit_mask_inv(bitmap_bit);
- if (data_ptr == end)
+ if (first_word)
{
- if (first_word.bitmap & ~map->last_word_mask)
- return get_first_set(first_word.bitmap, word_pos);
- else
- return MY_BIT_NONE;
+ /* Optimize common case when most bits are set */
+ if (first_word & (1ULL << ((bitmap_bit & (my_bitmap_map_bits-1)))))
+ return bitmap_bit;
+ return my_find_first_bit(first_word) + (bitmap_bit & ~(my_bitmap_map_bits-1));
}
-
- if (first_word.bitmap)
- return get_first_set(first_word.bitmap, word_pos);
- for (data_ptr++, word_pos++; data_ptr < end; data_ptr++, word_pos++)
+ for (data_ptr++; data_ptr <= end; data_ptr++)
+ {
+ bitmap_bit+= 64;
if (*data_ptr)
- return get_first_set(*data_ptr, word_pos);
-
- if (!(*end & ~map->last_word_mask))
- return MY_BIT_NONE;
- return get_first_set(*end, word_pos);
+ return my_find_first_bit(*data_ptr) + (bitmap_bit & ~(my_bitmap_map_bits-1));
+ }
+ return MY_BIT_NONE;
}
-/* Get first free bit */
+/* Get first clear bit */
-uint bitmap_get_first(const MY_BITMAP *map)
+uint bitmap_get_first_clear(const MY_BITMAP *map)
{
- uchar *byte_ptr;
- uint i,j,k;
- my_bitmap_map *data_ptr, *end= map->last_word_ptr;
-
- DBUG_ASSERT(map->bitmap);
- data_ptr= map->bitmap;
- *map->last_word_ptr|= map->last_word_mask;
+ uint i;
+ my_bitmap_map *data_ptr= map->bitmap, *end= map->last_word_ptr;
+ DBUG_ASSERT_BITMAP(map);
- for (i=0; data_ptr < end; data_ptr++, i++)
- if (*data_ptr != 0xFFFFFFFF)
+ for (i= 0; data_ptr < end; data_ptr++, i++)
+ if (*data_ptr != ~(my_bitmap_map)0)
goto found;
- if ((*data_ptr | map->last_word_mask) == 0xFFFFFFFF)
+ if ((*data_ptr | map->last_bit_mask) == ~(my_bitmap_map)0)
return MY_BIT_NONE;
-
found:
- byte_ptr= (uchar*)data_ptr;
- for (j=0; ; j++, byte_ptr++)
+ /* find first zero bit by reverting all bits and find first bit */
+ return my_find_first_bit(~*data_ptr) + i * sizeof(my_bitmap_map)*8;
+}
+/*
+ Functions to export/import bitmaps to an architecture independent format
+ (low_byte_first)
+*/
+
+#ifdef WORDS_BIGENDIAN
+/* Big endian machines, like powerpc or s390x */
+
+void bitmap_export(uchar *to, MY_BITMAP *map)
+{
+ my_bitmap_map *value;
+ uint length;
+ uchar buff[my_bitmap_map_bytes];
+
+ for (value= map->bitmap ; value < map->last_word_ptr ; value++)
{
- if (*byte_ptr != 0xFF)
- {
- for (k=0; ; k++)
- {
- if (!(*byte_ptr & (1 << k)))
- return (i*32) + (j*8) + k;
- }
- }
+ int8store(to, *value);
+ to+= 8;
}
- DBUG_ASSERT(0);
- return MY_BIT_NONE; /* Impossible */
+ int8store(buff, *value);
+
+ /* We want length & 7 to return a serie 8,2,3,4,5,6,7, 8,2,3,... */
+ length= 1+ ((no_bytes_in_export_map(map) + 7) & 7);
+ memcpy(to, buff, length);
+}
+
+
+void bitmap_import(MY_BITMAP *map, uchar *from)
+{
+ my_bitmap_map *value;
+ uint length;
+ uchar buff[my_bitmap_map_bytes];
+
+ for (value= map->bitmap ; value < map->last_word_ptr ; value++)
+ {
+ *value= uint8korr(from);
+ from+= 8;
+ }
+ bzero(buff, sizeof(buff));
+
+ /* We want length & 7 to return a serie 8,2,3,4,5,6,7, 8,2,3,... */
+ length= 1+ ((no_bytes_in_export_map(map) + 7) & 7);
+ memcpy(buff, from, length);
+ *value= uint8korr(buff) & ~map->last_bit_mask;
+}
+
+#else
+
+/* Little endian machines, like intel and amd */
+
+void bitmap_export(uchar *to, MY_BITMAP *map)
+{
+ memcpy(to, (uchar*) map->bitmap, no_bytes_in_export_map(map));
+}
+
+void bitmap_import(MY_BITMAP *map, uchar *from)
+{
+ memcpy((uchar*) map->bitmap, from, no_bytes_in_export_map(map));
+ *map->last_word_ptr&= ~map->last_bit_mask;
}
+#endif /* WORDS_BIGENDIAN */
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index eb665b1e..6b480dae 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -172,6 +172,8 @@ static void validate_value(const char *key, const char *value,
#define validate_value(key, value, filename) (void)filename
#endif
+#define SET_HO_ERROR_AND_CONTINUE(e) { ho_error= (e); (*argc)--; continue; }
+
/**
Handle command line options.
Sort options.
@@ -241,7 +243,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
const char *UNINIT_VAR(prev_found);
const struct my_option *optp;
void *value;
- int error, i;
+ int ho_error= 0, error, i;
my_bool is_cmdline_arg= 1;
DBUG_ENTER("handle_options");
@@ -255,7 +257,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
is_cmdline_arg= !is_file_marker(**argv);
- for (pos= *argv, pos_end=pos+ *argc; pos != pos_end ; pos++)
+ for (pos= *argv, pos_end=pos+ *argc; pos < pos_end ; pos++)
{
char **first= pos;
char *cur_arg= *pos;
@@ -344,7 +346,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
my_progname, special_opt_prefix[i],
opt_str, special_opt_prefix[i],
prev_found);
- DBUG_RETURN(EXIT_AMBIGUOUS_OPTION);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_AMBIGUOUS_OPTION)
}
switch (i) {
case OPT_SKIP:
@@ -389,7 +391,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
"%s: unknown variable '%s'",
my_progname, cur_arg);
if (!option_is_loose)
- DBUG_RETURN(EXIT_UNKNOWN_VARIABLE);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNKNOWN_VARIABLE)
}
else
{
@@ -399,7 +401,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
"%s: unknown option '--%s'",
my_progname, cur_arg);
if (!option_is_loose)
- DBUG_RETURN(EXIT_UNKNOWN_OPTION);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNKNOWN_OPTION)
}
if (option_is_loose)
{
@@ -416,7 +418,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
my_getopt_error_reporter(ERROR_LEVEL,
"%s: variable prefix '%s' is not unique",
my_progname, opt_str);
- DBUG_RETURN(EXIT_VAR_PREFIX_NOT_UNIQUE);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_VAR_PREFIX_NOT_UNIQUE)
}
else
{
@@ -425,7 +427,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
"%s: ambiguous option '--%s' (%s, %s)",
my_progname, opt_str, prev_found,
optp->name);
- DBUG_RETURN(EXIT_AMBIGUOUS_OPTION);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_AMBIGUOUS_OPTION)
}
}
if ((optp->var_type & GET_TYPE_MASK) == GET_DISABLED)
@@ -439,14 +441,14 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
(*argc)--;
continue;
}
- DBUG_RETURN(EXIT_OPTION_DISABLED);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_OPTION_DISABLED)
}
error= 0;
value= optp->var_type & GET_ASK_ADDR
? (*my_getopt_get_addr)(key_name, (uint)strlen(key_name), optp, &error)
: optp->value;
if (error)
- DBUG_RETURN(error);
+ SET_HO_ERROR_AND_CONTINUE(error)
if (optp->arg_type == NO_ARG)
{
@@ -461,7 +463,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
my_getopt_error_reporter(ERROR_LEVEL,
"%s: option '--%s' cannot take an argument",
my_progname, optp->name);
- DBUG_RETURN(EXIT_NO_ARGUMENT_ALLOWED);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_NO_ARGUMENT_ALLOWED)
}
if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL)
{
@@ -490,7 +492,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
if (get_one_option(optp, *((my_bool*) value) ?
enabled_my_option : disabled_my_option,
filename))
- DBUG_RETURN(EXIT_ARGUMENT_INVALID);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_ARGUMENT_INVALID)
continue;
}
argument= optend;
@@ -504,7 +506,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
"option '--%s' cannot take an argument",
my_progname, optp->name);
- DBUG_RETURN(EXIT_NO_ARGUMENT_ALLOWED);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_NO_ARGUMENT_ALLOWED)
}
if (!(optp->var_type & GET_AUTO))
{
@@ -514,7 +516,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
"unsupported by option '--%s'",
my_progname, optp->name);
if (!option_is_loose)
- DBUG_RETURN(EXIT_ARGUMENT_INVALID);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_ARGUMENT_INVALID)
continue;
}
else
@@ -533,7 +535,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
my_getopt_error_reporter(ERROR_LEVEL,
"%s: option '--%s' requires an argument",
my_progname, optp->name);
- DBUG_RETURN(EXIT_ARGUMENT_REQUIRED);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_ARGUMENT_REQUIRED)
}
argument= *pos;
(*argc)--;
@@ -558,14 +560,14 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
fprintf(stderr,
"%s: ERROR: Option '-%c' used, but is disabled\n",
my_progname, optp->id);
- DBUG_RETURN(EXIT_OPTION_DISABLED);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_OPTION_DISABLED)
}
if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL &&
optp->arg_type == NO_ARG)
{
*((my_bool*) optp->value)= (my_bool) 1;
if (get_one_option(optp, argument, filename))
- DBUG_RETURN(EXIT_UNSPECIFIED_ERROR);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNSPECIFIED_ERROR)
continue;
}
else if (optp->arg_type == REQUIRED_ARG ||
@@ -585,7 +587,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
if (optp->var_type == GET_BOOL)
*((my_bool*) optp->value)= (my_bool) 1;
if (get_one_option(optp, argument, filename))
- DBUG_RETURN(EXIT_UNSPECIFIED_ERROR);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNSPECIFIED_ERROR)
continue;
}
/* Check if there are more arguments after this one */
@@ -595,7 +597,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
my_getopt_error_reporter(ERROR_LEVEL,
"%s: option '-%c' requires an argument",
my_progname, optp->id);
- DBUG_RETURN(EXIT_ARGUMENT_REQUIRED);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_ARGUMENT_REQUIRED)
}
argument= *++pos;
(*argc)--;
@@ -603,10 +605,10 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
}
}
if ((error= setval(optp, optp->value, argument,
- set_maximum_value,filename)))
- DBUG_RETURN(error);
+ set_maximum_value,filename)))
+ SET_HO_ERROR_AND_CONTINUE(error)
if (get_one_option(optp, argument, filename))
- DBUG_RETURN(EXIT_UNSPECIFIED_ERROR);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNSPECIFIED_ERROR)
break;
}
}
@@ -640,7 +642,7 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
my_getopt_error_reporter(ERROR_LEVEL,
"%s: unknown option '-%c'",
my_progname, *optend);
- DBUG_RETURN(EXIT_UNKNOWN_OPTION);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNKNOWN_OPTION)
}
}
}
@@ -651,15 +653,17 @@ int handle_options(int *argc, char ***argv, const struct my_option *longopts,
if ((!option_is_autoset) &&
((error= setval(optp, value, argument, set_maximum_value,filename))) &&
!option_is_loose)
- DBUG_RETURN(error);
+ SET_HO_ERROR_AND_CONTINUE(error)
if (get_one_option(optp, argument, filename))
- DBUG_RETURN(EXIT_UNSPECIFIED_ERROR);
+ SET_HO_ERROR_AND_CONTINUE(EXIT_UNSPECIFIED_ERROR)
(*argc)--; /* option handled (long), decrease argument count */
}
else /* non-option found */
(*argv)[argvpos++]= cur_arg;
}
+ if (ho_error)
+ DBUG_RETURN(ho_error);
/*
Destroy the first, already handled option, so that programs that look
for arguments in 'argv', without checking 'argc', know when to stop.
@@ -899,7 +903,7 @@ static int setval(const struct my_option *opts, void *value, char *argument,
}
if (err)
{
- res= EXIT_UNKNOWN_SUFFIX;
+ res= err;
goto ret;
};
}
@@ -1034,7 +1038,7 @@ static inline ulonglong eval_num_suffix(char *suffix, int *error)
case 'E':
return 1ULL << 60;
default:
- *error= 1;
+ *error= EXIT_UNKNOWN_SUFFIX;
return 0ULL;
}
}
@@ -1060,15 +1064,18 @@ static longlong eval_num_suffix_ll(char *argument,
if (errno == ERANGE)
{
my_getopt_error_reporter(ERROR_LEVEL,
- "Incorrect integer value: '%s'", argument);
- *error= 1;
+ "Integer value out of range for int64:"
+ " '%s' for %s",
+ argument, option_name);
+ *error= EXIT_ARGUMENT_INVALID;
DBUG_RETURN(0);
}
num*= eval_num_suffix(endchar, error);
if (*error)
- fprintf(stderr,
- "Unknown suffix '%c' used for variable '%s' (value '%s')\n",
- *endchar, option_name, argument);
+ my_getopt_error_reporter(ERROR_LEVEL,
+ "Unknown suffix '%c' used for variable '%s' (value '%s'). "
+ "Legal suffix characters are: K, M, G, T, P, E",
+ *endchar, option_name, argument);
DBUG_RETURN(num);
}
@@ -1091,7 +1098,7 @@ static ulonglong eval_num_suffix_ull(char *argument,
my_getopt_error_reporter(ERROR_LEVEL,
"Incorrect unsigned value: '%s' for %s",
argument, option_name);
- *error= 1;
+ *error= EXIT_ARGUMENT_INVALID;
DBUG_RETURN(0);
}
*error= 0;
@@ -1100,15 +1107,18 @@ static ulonglong eval_num_suffix_ull(char *argument,
if (errno == ERANGE)
{
my_getopt_error_reporter(ERROR_LEVEL,
- "Incorrect integer value: '%s' for %s",
+ "Integer value out of range for uint64:"
+ " '%s' for %s",
argument, option_name);
- *error= 1;
+ *error= EXIT_ARGUMENT_INVALID;
DBUG_RETURN(0);
}
num*= eval_num_suffix(endchar, error);
if (*error)
my_getopt_error_reporter(ERROR_LEVEL,
- "Unknown suffix '%c' used for variable '%s' (value '%s')",
+ "Unknown suffix '%c' used for variable '%s'"
+ " (value '%s')."
+ " Legal suffix characters are: K, M, G, T, P, E",
*endchar, option_name, argument);
DBUG_RETURN(num);
}
@@ -1128,6 +1138,8 @@ static ulonglong eval_num_suffix_ull(char *argument,
static longlong getopt_ll(char *arg, const struct my_option *optp, int *err)
{
longlong num=eval_num_suffix_ll(arg, err, (char*) optp->name);
+ if (*err)
+ return(0);
return getopt_ll_limit_value(num, optp, NULL);
}
@@ -1205,6 +1217,8 @@ longlong getopt_ll_limit_value(longlong num, const struct my_option *optp,
static ulonglong getopt_ull(char *arg, const struct my_option *optp, int *err)
{
ulonglong num= eval_num_suffix_ull(arg, err, (char*) optp->name);
+ if (*err)
+ return(0);
return getopt_ull_limit_value(num, optp, NULL);
}
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 2e8decd7..b2436d2b 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -220,7 +220,11 @@ void my_thread_global_end(void)
fprintf(stderr,
"Error in my_thread_global_end(): %d threads didn't exit\n",
THR_thread_count);
-#endif
+#endif /* HAVE_PTHREAD_KILL */
+#ifdef SAFEMALLOC
+ /* We know we will have memoryleaks, suppress the leak report */
+ sf_leaking_memory= 1;
+#endif /* SAFEMALLOC */
all_threads_killed= 0;
break;
}
@@ -234,9 +238,7 @@ void my_thread_global_end(void)
that could use them.
*/
if (all_threads_killed)
- {
my_thread_destroy_internal_mutex();
- }
my_thread_global_init_done= 0;
}
diff --git a/plugin/auth_ed25519/ref10/fe_mul.c b/plugin/auth_ed25519/ref10/fe_mul.c
index 26ca8b36..8ccad3c3 100644
--- a/plugin/auth_ed25519/ref10/fe_mul.c
+++ b/plugin/auth_ed25519/ref10/fe_mul.c
@@ -1,5 +1,6 @@
#include "fe.h"
#include "crypto_int64.h"
+#include "crypto_uint64.h"
/*
h = f * g
@@ -179,16 +180,16 @@ void fe_mul(fe h,const fe f,const fe g)
crypto_int64 h7 = f0g7+f1g6 +f2g5 +f3g4 +f4g3 +f5g2 +f6g1 +f7g0 +f8g9_19+f9g8_19;
crypto_int64 h8 = f0g8+f1g7_2 +f2g6 +f3g5_2 +f4g4 +f5g3_2 +f6g2 +f7g1_2 +f8g0 +f9g9_38;
crypto_int64 h9 = f0g9+f1g8 +f2g7 +f3g6 +f4g5 +f5g4 +f6g3 +f7g2 +f8g1 +f9g0 ;
- crypto_int64 carry0;
- crypto_int64 carry1;
- crypto_int64 carry2;
- crypto_int64 carry3;
- crypto_int64 carry4;
- crypto_int64 carry5;
- crypto_int64 carry6;
- crypto_int64 carry7;
- crypto_int64 carry8;
- crypto_int64 carry9;
+ crypto_uint64 carry0;
+ crypto_uint64 carry1;
+ crypto_uint64 carry2;
+ crypto_uint64 carry3;
+ crypto_uint64 carry4;
+ crypto_uint64 carry5;
+ crypto_uint64 carry6;
+ crypto_uint64 carry7;
+ crypto_uint64 carry8;
+ crypto_uint64 carry9;
/*
|h0| <= (1.65*1.65*2^52*(1+19+19+19+19)+1.65*1.65*2^50*(38+38+38+38+38))
diff --git a/plugin/auth_ed25519/ref10/fe_sq.c b/plugin/auth_ed25519/ref10/fe_sq.c
index 8dd11984..3c718033 100644
--- a/plugin/auth_ed25519/ref10/fe_sq.c
+++ b/plugin/auth_ed25519/ref10/fe_sq.c
@@ -1,5 +1,6 @@
#include "fe.h"
#include "crypto_int64.h"
+#include "crypto_uint64.h"
/*
h = f * f
@@ -106,16 +107,16 @@ void fe_sq(fe h,const fe f)
crypto_int64 h7 = f0f7_2+f1f6_2 +f2f5_2 +f3f4_2 +f8f9_38;
crypto_int64 h8 = f0f8_2+f1f7_4 +f2f6_2 +f3f5_4 +f4f4 +f9f9_38;
crypto_int64 h9 = f0f9_2+f1f8_2 +f2f7_2 +f3f6_2 +f4f5_2;
- crypto_int64 carry0;
- crypto_int64 carry1;
- crypto_int64 carry2;
- crypto_int64 carry3;
- crypto_int64 carry4;
- crypto_int64 carry5;
- crypto_int64 carry6;
- crypto_int64 carry7;
- crypto_int64 carry8;
- crypto_int64 carry9;
+ crypto_uint64 carry0;
+ crypto_uint64 carry1;
+ crypto_uint64 carry2;
+ crypto_uint64 carry3;
+ crypto_uint64 carry4;
+ crypto_uint64 carry5;
+ crypto_uint64 carry6;
+ crypto_uint64 carry7;
+ crypto_uint64 carry8;
+ crypto_uint64 carry9;
carry0 = (h0 + (crypto_int64) (1<<25)) >> 26; h1 += carry0; h0 -= carry0 << 26;
carry4 = (h4 + (crypto_int64) (1<<25)) >> 26; h5 += carry4; h4 -= carry4 << 26;
diff --git a/plugin/auth_ed25519/ref10/fe_sq2.c b/plugin/auth_ed25519/ref10/fe_sq2.c
index 026ed3aa..97c03cf4 100644
--- a/plugin/auth_ed25519/ref10/fe_sq2.c
+++ b/plugin/auth_ed25519/ref10/fe_sq2.c
@@ -1,5 +1,6 @@
#include "fe.h"
#include "crypto_int64.h"
+#include "crypto_uint64.h"
/*
h = 2 * f * f
@@ -106,16 +107,16 @@ void fe_sq2(fe h,const fe f)
crypto_int64 h7 = f0f7_2+f1f6_2 +f2f5_2 +f3f4_2 +f8f9_38;
crypto_int64 h8 = f0f8_2+f1f7_4 +f2f6_2 +f3f5_4 +f4f4 +f9f9_38;
crypto_int64 h9 = f0f9_2+f1f8_2 +f2f7_2 +f3f6_2 +f4f5_2;
- crypto_int64 carry0;
- crypto_int64 carry1;
- crypto_int64 carry2;
- crypto_int64 carry3;
- crypto_int64 carry4;
- crypto_int64 carry5;
- crypto_int64 carry6;
- crypto_int64 carry7;
- crypto_int64 carry8;
- crypto_int64 carry9;
+ crypto_uint64 carry0;
+ crypto_uint64 carry1;
+ crypto_uint64 carry2;
+ crypto_uint64 carry3;
+ crypto_uint64 carry4;
+ crypto_uint64 carry5;
+ crypto_uint64 carry6;
+ crypto_uint64 carry7;
+ crypto_uint64 carry8;
+ crypto_uint64 carry9;
h0 += h0;
h1 += h1;
diff --git a/plugin/auth_ed25519/ref10/fe_tobytes.c b/plugin/auth_ed25519/ref10/fe_tobytes.c
index 0a63baf9..a4dff2c1 100644
--- a/plugin/auth_ed25519/ref10/fe_tobytes.c
+++ b/plugin/auth_ed25519/ref10/fe_tobytes.c
@@ -1,4 +1,5 @@
#include "fe.h"
+#include "crypto_uint32.h"
/*
Preconditions:
@@ -38,16 +39,16 @@ void fe_tobytes(unsigned char *s,const fe h)
crypto_int32 h8 = h[8];
crypto_int32 h9 = h[9];
crypto_int32 q;
- crypto_int32 carry0;
- crypto_int32 carry1;
- crypto_int32 carry2;
- crypto_int32 carry3;
- crypto_int32 carry4;
- crypto_int32 carry5;
- crypto_int32 carry6;
- crypto_int32 carry7;
- crypto_int32 carry8;
- crypto_int32 carry9;
+ crypto_uint32 carry0;
+ crypto_uint32 carry1;
+ crypto_uint32 carry2;
+ crypto_uint32 carry3;
+ crypto_uint32 carry4;
+ crypto_uint32 carry5;
+ crypto_uint32 carry6;
+ crypto_uint32 carry7;
+ crypto_uint32 carry8;
+ crypto_uint32 carry9;
q = (19 * h9 + (((crypto_int32) 1) << 24)) >> 25;
q = (h0 + q) >> 26;
@@ -87,32 +88,32 @@ void fe_tobytes(unsigned char *s,const fe h)
s[0] = h0 >> 0;
s[1] = h0 >> 8;
s[2] = h0 >> 16;
- s[3] = (h0 >> 24) | (h1 << 2);
+ s[3] = (h0 >> 24) | ((crypto_uint32)h1 << 2);
s[4] = h1 >> 6;
s[5] = h1 >> 14;
- s[6] = (h1 >> 22) | (h2 << 3);
+ s[6] = (h1 >> 22) | ((crypto_uint32)h2 << 3);
s[7] = h2 >> 5;
s[8] = h2 >> 13;
- s[9] = (h2 >> 21) | (h3 << 5);
+ s[9] = (h2 >> 21) | ((crypto_uint32)h3 << 5);
s[10] = h3 >> 3;
s[11] = h3 >> 11;
- s[12] = (h3 >> 19) | (h4 << 6);
+ s[12] = (h3 >> 19) | ((crypto_uint32)h4 << 6);
s[13] = h4 >> 2;
s[14] = h4 >> 10;
s[15] = h4 >> 18;
s[16] = h5 >> 0;
s[17] = h5 >> 8;
s[18] = h5 >> 16;
- s[19] = (h5 >> 24) | (h6 << 1);
+ s[19] = (h5 >> 24) | ((crypto_uint32)h6 << 1);
s[20] = h6 >> 7;
s[21] = h6 >> 15;
- s[22] = (h6 >> 23) | (h7 << 3);
+ s[22] = (h6 >> 23) | ((crypto_uint32)h7 << 3);
s[23] = h7 >> 5;
s[24] = h7 >> 13;
- s[25] = (h7 >> 21) | (h8 << 4);
+ s[25] = (h7 >> 21) | ((crypto_uint32)h8 << 4);
s[26] = h8 >> 4;
s[27] = h8 >> 12;
- s[28] = (h8 >> 20) | (h9 << 6);
+ s[28] = (h8 >> 20) | ((crypto_uint32)h9 << 6);
s[29] = h9 >> 2;
s[30] = h9 >> 10;
s[31] = h9 >> 18;
diff --git a/plugin/auth_ed25519/ref10/ge_scalarmult_base.c b/plugin/auth_ed25519/ref10/ge_scalarmult_base.c
index 421e4fa0..9a4ced21 100644
--- a/plugin/auth_ed25519/ref10/ge_scalarmult_base.c
+++ b/plugin/auth_ed25519/ref10/ge_scalarmult_base.c
@@ -35,7 +35,7 @@ static void select(ge_precomp *t,int pos,signed char b)
{
ge_precomp minust;
unsigned char bnegative = negative(b);
- unsigned char babs = b - (((-bnegative) & b) << 1);
+ unsigned char babs = b - ((unsigned char)((-bnegative) & b) << 1);
ge_precomp_0(t);
cmov(t,&base[pos][0],equal(babs,1));
diff --git a/plugin/auth_ed25519/ref10/sc_muladd.c b/plugin/auth_ed25519/ref10/sc_muladd.c
index 6f1e9d02..7bf222be 100644
--- a/plugin/auth_ed25519/ref10/sc_muladd.c
+++ b/plugin/auth_ed25519/ref10/sc_muladd.c
@@ -95,29 +95,29 @@ void sc_muladd(unsigned char *s,const unsigned char *a,const unsigned char *b,co
crypto_int64 s21;
crypto_int64 s22;
crypto_int64 s23;
- crypto_int64 carry0;
- crypto_int64 carry1;
- crypto_int64 carry2;
- crypto_int64 carry3;
- crypto_int64 carry4;
- crypto_int64 carry5;
- crypto_int64 carry6;
- crypto_int64 carry7;
- crypto_int64 carry8;
- crypto_int64 carry9;
- crypto_int64 carry10;
- crypto_int64 carry11;
- crypto_int64 carry12;
- crypto_int64 carry13;
- crypto_int64 carry14;
- crypto_int64 carry15;
- crypto_int64 carry16;
- crypto_int64 carry17;
- crypto_int64 carry18;
- crypto_int64 carry19;
- crypto_int64 carry20;
- crypto_int64 carry21;
- crypto_int64 carry22;
+ crypto_uint64 carry0;
+ crypto_uint64 carry1;
+ crypto_uint64 carry2;
+ crypto_uint64 carry3;
+ crypto_uint64 carry4;
+ crypto_uint64 carry5;
+ crypto_uint64 carry6;
+ crypto_uint64 carry7;
+ crypto_uint64 carry8;
+ crypto_uint64 carry9;
+ crypto_uint64 carry10;
+ crypto_uint64 carry11;
+ crypto_uint64 carry12;
+ crypto_uint64 carry13;
+ crypto_uint64 carry14;
+ crypto_uint64 carry15;
+ crypto_uint64 carry16;
+ crypto_uint64 carry17;
+ crypto_uint64 carry18;
+ crypto_uint64 carry19;
+ crypto_uint64 carry20;
+ crypto_uint64 carry21;
+ crypto_uint64 carry22;
s0 = c0 + a0*b0;
s1 = c1 + a0*b1 + a1*b0;
diff --git a/plugin/auth_ed25519/ref10/sc_reduce.c b/plugin/auth_ed25519/ref10/sc_reduce.c
index d01f5a57..422d94b6 100644
--- a/plugin/auth_ed25519/ref10/sc_reduce.c
+++ b/plugin/auth_ed25519/ref10/sc_reduce.c
@@ -58,23 +58,23 @@ void sc_reduce(unsigned char *s)
crypto_int64 s21 = 2097151 & (load_3(s + 55) >> 1);
crypto_int64 s22 = 2097151 & (load_4(s + 57) >> 6);
crypto_int64 s23 = (load_4(s + 60) >> 3);
- crypto_int64 carry0;
- crypto_int64 carry1;
- crypto_int64 carry2;
- crypto_int64 carry3;
- crypto_int64 carry4;
- crypto_int64 carry5;
- crypto_int64 carry6;
- crypto_int64 carry7;
- crypto_int64 carry8;
- crypto_int64 carry9;
- crypto_int64 carry10;
- crypto_int64 carry11;
- crypto_int64 carry12;
- crypto_int64 carry13;
- crypto_int64 carry14;
- crypto_int64 carry15;
- crypto_int64 carry16;
+ crypto_uint64 carry0;
+ crypto_uint64 carry1;
+ crypto_uint64 carry2;
+ crypto_uint64 carry3;
+ crypto_uint64 carry4;
+ crypto_uint64 carry5;
+ crypto_uint64 carry6;
+ crypto_uint64 carry7;
+ crypto_uint64 carry8;
+ crypto_uint64 carry9;
+ crypto_uint64 carry10;
+ crypto_uint64 carry11;
+ crypto_uint64 carry12;
+ crypto_uint64 carry13;
+ crypto_uint64 carry14;
+ crypto_uint64 carry15;
+ crypto_uint64 carry16;
s11 += s23 * 666643;
s12 += s23 * 470296;
diff --git a/plugin/auth_gssapi/README.md b/plugin/auth_gssapi/README.md
index ea8deaaf..63598223 100644
--- a/plugin/auth_gssapi/README.md
+++ b/plugin/auth_gssapi/README.md
@@ -49,7 +49,7 @@ Usually nothing need to be done. MariaDB server should to run on a domain joine
Creating service principal is not required here (but you can still do it using [_setspn_](https://technet.microsoft.com/en-us/library/cc731241.aspx) tool)
-# Installing plugin
+## Installing plugin
- Start the server
- On Unix, edit my the my.cnf/my.ini configuration file, set the parameter gssapi-keytab-path to point to previously
@@ -72,7 +72,7 @@ configure alternative principal name with
INSTALL SONAME 'auth_gssapi'
```
-#Creating users
+## Creating users
Now, you can create a user for GSSAPI/SSPI authentication. CREATE USER command, for Kerberos user
would be like this (*long* form, see below for short one)
@@ -94,7 +94,7 @@ CREATE USER usr1 IDENTIFIED WITH gssapi;
If this syntax is used, realm part is *not* used for comparison
thus 'usr1@EXAMPLE.COM', 'usr1@EXAMPLE.CO.UK' and 'mymachine\usr1' will all identify as 'usr1'.
-#Login as GSSAPI user with command line clients
+## Login as GSSAPI user with command line clients
Using command line client, do
@@ -102,7 +102,7 @@ Using command line client, do
mysql --plugin-dir=/path/to/plugin-dir -u usr1
```
-#Plugin variables
+## Plugin variables
- **gssapi-keytab-path** (Unix only) - Path to the server keytab file
- **gssapi-principal-name** - name of the service principal.
- **gssapi-mech-name** (Windows only) - Name of the SSPI package used by server. Can be either 'Kerberos' or 'Negotiate'.
@@ -111,7 +111,7 @@ mysql --plugin-dir=/path/to/plugin-dir -u usr1
to allow non-domain environment (e.g if server does not run in domain environment).
-#Implementation
+## Implementation
Overview of the protocol between client and server
diff --git a/plugin/auth_pam/auth_pam_base.c b/plugin/auth_pam/auth_pam_base.c
index 1e8f4a08..153712df 100644
--- a/plugin/auth_pam/auth_pam_base.c
+++ b/plugin/auth_pam/auth_pam_base.c
@@ -99,7 +99,7 @@ static int conv(int n, const struct pam_message **msg,
freeing it is the responsibility of the caller */
if (*resp == 0)
{
- *resp = calloc(sizeof(struct pam_response), n);
+ *resp = calloc(n, sizeof(struct pam_response));
if (*resp == 0)
return PAM_BUF_ERR;
}
diff --git a/plugin/cracklib_password_check/CMakeLists.txt b/plugin/cracklib_password_check/CMakeLists.txt
index 79b3b80f..26349583 100644
--- a/plugin/cracklib_password_check/CMakeLists.txt
+++ b/plugin/cracklib_password_check/CMakeLists.txt
@@ -32,11 +32,12 @@ IF (HAVE_ALLOCA_H AND HAVE_CRACK_H AND HAVE_LIBCRACK AND HAVE_MEMCPY)
IF(CHECKMODULE AND SEMODULE_PACKAGE)
FOREACH(pol mariadb-plugin-cracklib-password-check)
SET(src ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.te)
- SET(tmp ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${pol}-pp.dir/${pol}.mod)
+ SET(tmp ${CMAKE_CURRENT_BINARY_DIR}/${pol}.mod)
SET(out ${CMAKE_CURRENT_BINARY_DIR}/${pol}.pp)
ADD_CUSTOM_COMMAND(OUTPUT ${out}
COMMAND ${CHECKMODULE} -M -m ${src} -o ${tmp}
COMMAND ${SEMODULE_PACKAGE} -m ${tmp} -o ${out}
+ COMMAND ${CMAKE_COMMAND} -E remove ${tmp}
DEPENDS ${src})
ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out})
INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT cracklib-password-check)
diff --git a/plugin/feedback/feedback.cc b/plugin/feedback/feedback.cc
index ba4850f4..845e40cc 100644
--- a/plugin/feedback/feedback.cc
+++ b/plugin/feedback/feedback.cc
@@ -339,6 +339,10 @@ static int free(void *p)
shutdown_plugin= true;
mysql_cond_signal(&sleep_condition);
mysql_mutex_unlock(&sleep_mutex);
+
+ for (uint i= 0; i < url_count; i++)
+ urls[i]->abort();
+
pthread_join(sender_thread, NULL);
mysql_mutex_destroy(&sleep_mutex);
diff --git a/plugin/feedback/feedback.h b/plugin/feedback/feedback.h
index 04fe1ab6..6021eb85 100644
--- a/plugin/feedback/feedback.h
+++ b/plugin/feedback/feedback.h
@@ -52,6 +52,7 @@ class Url {
const char *url() { return full_url.str; }
size_t url_length() { return full_url.length; }
+ virtual void abort() = 0;
virtual int send(const char* data, size_t data_length) = 0;
virtual int set_proxy(const char *proxy, size_t proxy_len)
{
diff --git a/plugin/feedback/url_http.cc b/plugin/feedback/url_http.cc
index 98116dd0..590bb06c 100644
--- a/plugin/feedback/url_http.cc
+++ b/plugin/feedback/url_http.cc
@@ -37,8 +37,9 @@ static const uint FOR_WRITING= 1;
class Url_http: public Url {
protected:
const LEX_STRING host, port, path;
- bool ssl;
LEX_STRING proxy_host, proxy_port;
+ my_socket fd;
+ bool ssl;
bool use_proxy()
{
@@ -47,7 +48,8 @@ class Url_http: public Url {
Url_http(LEX_STRING &url_arg, LEX_STRING &host_arg,
LEX_STRING &port_arg, LEX_STRING &path_arg, bool ssl_arg) :
- Url(url_arg), host(host_arg), port(port_arg), path(path_arg), ssl(ssl_arg)
+ Url(url_arg), host(host_arg), port(port_arg), path(path_arg),
+ fd(INVALID_SOCKET), ssl(ssl_arg)
{
proxy_host.length= 0;
}
@@ -60,6 +62,7 @@ class Url_http: public Url {
}
public:
+ void abort();
int send(const char* data, size_t data_length);
int set_proxy(const char *proxy, size_t proxy_len)
{
@@ -158,13 +161,18 @@ Url* http_create(const char *url, size_t url_length)
return new Url_http(full_url, host, port, path, ssl);
}
+void Url_http::abort()
+{
+ if (fd != INVALID_SOCKET)
+ closesocket(fd); // interrupt I/O waits
+}
+
/* do the vio_write and check that all data were sent ok */
#define write_check(VIO, DATA, LEN) \
(vio_write((VIO), (uchar*)(DATA), (LEN)) != (LEN))
int Url_http::send(const char* data, size_t data_length)
{
- my_socket fd= INVALID_SOCKET;
char buf[1024];
size_t len= 0;
@@ -180,6 +188,7 @@ int Url_http::send(const char* data, size_t data_length)
return 1;
}
+ DBUG_ASSERT(fd == INVALID_SOCKET);
for (addr= addrs; addr != NULL; addr= addr->ai_next)
{
fd= socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
@@ -208,6 +217,7 @@ int Url_http::send(const char* data, size_t data_length)
sql_print_error("feedback plugin: vio_new failed for url '%s'",
full_url.str);
closesocket(fd);
+ fd= INVALID_SOCKET;
return 1;
}
@@ -236,6 +246,7 @@ int Url_http::send(const char* data, size_t data_length)
free_vio_ssl_acceptor_fd(ssl_fd);
closesocket(fd);
vio_delete(vio);
+ fd= INVALID_SOCKET;
return 1;
}
}
@@ -334,6 +345,7 @@ int Url_http::send(const char* data, size_t data_length)
}
#endif
+ fd= INVALID_SOCKET;
return res;
}
diff --git a/plugin/hashicorp_key_management/CMakeLists.txt b/plugin/hashicorp_key_management/CMakeLists.txt
index bd1eee84..809b480f 100644
--- a/plugin/hashicorp_key_management/CMakeLists.txt
+++ b/plugin/hashicorp_key_management/CMakeLists.txt
@@ -1,10 +1,13 @@
-INCLUDE(FindCURL)
+FIND_PACKAGE(CURL)
IF(NOT CURL_FOUND)
# Can't build plugin
+ MESSAGE_ONCE(WARNING "Hashicorp Key Management plugin requires curl development package")
RETURN()
ENDIF()
-INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
+SET_PACKAGE_PROPERTIES(CURL PROPERTIES TYPE REQUIRED)
+
+INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
set(CPACK_RPM_hashicorp-key-management_PACKAGE_SUMMARY "Hashicorp Key Management plugin for MariaDB" PARENT_SCOPE)
set(CPACK_RPM_hashicorp-key-management_PACKAGE_DESCRIPTION "This encryption plugin uses Hashicorp Vault for storing encryption
diff --git a/plugin/hashicorp_key_management/hashicorp_key_management_plugin.cc b/plugin/hashicorp_key_management/hashicorp_key_management_plugin.cc
index bdc2f734..dfeb1aca 100644
--- a/plugin/hashicorp_key_management/hashicorp_key_management_plugin.cc
+++ b/plugin/hashicorp_key_management/hashicorp_key_management_plugin.cc
@@ -13,28 +13,21 @@
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_encryption.h>
#include <mysqld_error.h>
+#include <my_alloca.h>
#include <string.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <time.h>
#include <errno.h>
#include <string>
#include <sstream>
#include <curl/curl.h>
-#ifdef _WIN32
-#include <malloc.h>
-#define alloca _alloca
-#endif
#include <algorithm>
#include <unordered_map>
#include <mutex>
-#if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)
-#define HASHICORP_HAVE_EXCEPTIONS 1
-#else
-#define HASHICORP_HAVE_EXCEPTIONS 0
-#endif
-
#define HASHICORP_DEBUG_LOGGING 0
#define PLUGIN_ERROR_HEADER "hashicorp: "
@@ -209,15 +202,6 @@ unsigned int
if (key_version == ENCRYPTION_KEY_VERSION_INVALID)
{
clock_t timestamp;
-#if HASHICORP_HAVE_EXCEPTIONS
- try
- {
- VER_INFO &ver_info = latest_version_cache.at(key_id);
- version = ver_info.key_version;
- timestamp = ver_info.timestamp;
- }
- catch (const std::out_of_range &e)
-#else
VER_MAP::const_iterator ver_iter = latest_version_cache.find(key_id);
if (ver_iter != latest_version_cache.end())
{
@@ -225,7 +209,6 @@ unsigned int
timestamp = ver_iter->second.timestamp;
}
else
-#endif
{
mtx.unlock();
return ENCRYPTION_KEY_VERSION_INVALID;
@@ -246,13 +229,6 @@ unsigned int
}
}
KEY_INFO info;
-#if HASHICORP_HAVE_EXCEPTIONS
- try
- {
- info = key_info_cache.at(KEY_ID_AND_VERSION(key_id, version));
- }
- catch (const std::out_of_range &e)
-#else
KEY_MAP::const_iterator key_iter =
key_info_cache.find(KEY_ID_AND_VERSION(key_id, version));
if (key_iter != key_info_cache.end())
@@ -260,7 +236,6 @@ unsigned int
info = key_iter->second;
}
else
-#endif
{
mtx.unlock();
return ENCRYPTION_KEY_VERSION_INVALID;
@@ -305,20 +280,12 @@ unsigned int HCData::cache_get_version (unsigned int key_id)
{
unsigned int version;
mtx.lock();
-#if HASHICORP_HAVE_EXCEPTIONS
- try
- {
- version = latest_version_cache.at(key_id).key_version;
- }
- catch (const std::out_of_range &e)
-#else
VER_MAP::const_iterator ver_iter = latest_version_cache.find(key_id);
if (ver_iter != latest_version_cache.end())
{
version = ver_iter->second.key_version;
}
else
-#endif
{
version = ENCRYPTION_KEY_VERSION_INVALID;
}
@@ -331,15 +298,6 @@ unsigned int HCData::cache_check_version (unsigned int key_id)
unsigned int version;
clock_t timestamp;
mtx.lock();
-#if HASHICORP_HAVE_EXCEPTIONS
- try
- {
- VER_INFO &ver_info = latest_version_cache.at(key_id);
- version = ver_info.key_version;
- timestamp = ver_info.timestamp;
- }
- catch (const std::out_of_range &e)
-#else
VER_MAP::const_iterator ver_iter = latest_version_cache.find(key_id);
if (ver_iter != latest_version_cache.end())
{
@@ -347,7 +305,6 @@ unsigned int HCData::cache_check_version (unsigned int key_id)
timestamp = ver_iter->second.timestamp;
}
else
-#endif
{
mtx.unlock();
#if HASHICORP_DEBUG_LOGGING
@@ -978,29 +935,6 @@ struct st_mariadb_encryption hashicorp_key_management_plugin= {
0, 0, 0, 0, 0
};
-#ifdef _MSC_VER
-
-static int setenv (const char *name, const char *value, int overwrite)
-{
- if (!overwrite)
- {
- size_t len= 0;
- int rc= getenv_s(&len, NULL, 0, name);
- if (rc)
- {
- return rc;
- }
- if (len)
- {
- errno = EINVAL;
- return EINVAL;
- }
- }
- return _putenv_s(name, value);
-}
-
-#endif
-
#define MAX_URL_SIZE 32768
int HCData::init ()
@@ -1053,7 +987,11 @@ int HCData::init ()
bool not_equal= token_env != NULL && strcmp(token_env, token) != 0;
if (token_env == NULL || not_equal)
{
- setenv("VAULT_TOKEN", token, 1);
+#if defined(HAVE_SETENV) || !defined(_WIN32)
+ setenv("VAULT_TOKEN", token, 1);
+#else
+ _putenv_s("VAULT_TOKEN", token);
+#endif
if (not_equal)
{
my_printf_error(ER_UNKNOWN_ERROR, PLUGIN_ERROR_HEADER
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/suite.pm b/plugin/hashicorp_key_management/mysql-test/vault/suite.pm
index fce17373..bd08ff4f 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/suite.pm
+++ b/plugin/hashicorp_key_management/mysql-test/vault/suite.pm
@@ -1,9 +1,13 @@
package My::Suite::Vault;
+use My::Platform;
@ISA = qw(My::Suite);
use strict;
+return "Hashicorp Key Management plugin tests are currently not available on Windows"
+ if IS_WINDOWS;
+
return "You need to set the value of the VAULT_ADDR variable"
unless $ENV{VAULT_ADDR};
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_cache_after_recreate.test b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_cache_after_recreate.test
index 9dee7376..925e89a3 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_cache_after_recreate.test
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_cache_after_recreate.test
@@ -11,7 +11,7 @@
--exec vault kv put /bug/1 data=01234567890123456789012345678901 > /dev/null
--exec vault kv put /bug/4 data=01234567890123456789012345678904 > /dev/null
---let $restart_parameters=--plugin-load-add=hashicorp_key_management --hashicorp-key-management-vault-url="$VAULT_ADDR/v1/bug/" --hashicorp-key-management-token="$VAULT_TOKEN"
+--let $restart_parameters=--plugin-load-add=hashicorp_key_management --hashicorp-key-management-vault-url=$VAULT_ADDR/v1/bug/ --hashicorp-key-management-token=$VAULT_TOKEN
--let $restart_noprint=1
--source include/restart_mysqld.inc
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_check_kv_version.test b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_check_kv_version.test
index c108781b..7d9a952f 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_check_kv_version.test
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_check_kv_version.test
@@ -20,7 +20,7 @@
--error 0,1
--remove_file $LOG_FILE
---let $vault_defaults=--plugin-load-add=hashicorp_key_management --hashicorp_key_management=force --hashicorp-key-management-check-kv-version=on --hashicorp-key-management-token="$VAULT_TOKEN"
+--let $vault_defaults=--plugin-load-add=hashicorp_key_management --hashicorp_key_management=force --hashicorp-key-management-check-kv-version=on --hashicorp-key-management-token=$VAULT_TOKEN
--let $defaults=--defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf $vault_defaults --log-error=$LOG_FILE
--error 1
@@ -30,14 +30,14 @@
--remove_file $LOG_FILE
---let $restart_parameters=$vault_defaults --hashicorp-key-management-vault-url="$VAULT_ADDR/v1/good"
+--let $restart_parameters=$vault_defaults --hashicorp-key-management-vault-url=$VAULT_ADDR/v1/good
--let $restart_noprint=1
--source include/start_mysqld.inc
CREATE TABLE t1 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
INSERT INTO t1 VALUES ('foo'),('bar');
---let $restart_parameters=$vault_defaults --hashicorp-key-management-vault-url="$VAULT_ADDR/v1/good//"
+--let $restart_parameters=$vault_defaults --hashicorp-key-management-vault-url=$VAULT_ADDR/v1/good//
--source include/restart_mysqld.inc
CREATE TABLE t2 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_migration.test b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_migration.test
index 2e67c2cc..62253cd7 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_migration.test
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_migration.test
@@ -24,7 +24,7 @@ SELECT * FROM t1;
--exec vault secrets disable bug > /dev/null
--exec vault secrets enable -path /bug -version=2 kv > /dev/null
--exec vault kv put /bug/1 data=$my_key > /dev/null
---let $restart_parameters=--plugin-load-add=hashicorp_key_management --hashicorp-key-management-vault-url="$VAULT_ADDR/v1/bug/" --hashicorp-key-management-token="$VAULT_TOKEN"
+--let $restart_parameters=--plugin-load-add=hashicorp_key_management --hashicorp-key-management-vault-url=$VAULT_ADDR/v1/bug/ --hashicorp-key-management-token=$VAULT_TOKEN
--source include/restart_mysqld.inc
CREATE TABLE t2 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_rotation_age.test b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_rotation_age.test
index ce99406a..4cdeb227 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_rotation_age.test
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_key_rotation_age.test
@@ -8,7 +8,7 @@ replace_result $VAULT_ADDR VAULT_ADDR;
SHOW GLOBAL variables LIKE "hashicorp%";
--echo # Restart the server with encryption
-let $default_parameters="--innodb-tablespaces-encryption --innodb_encrypt_tables=ON";
+let $default_parameters=--innodb-tablespaces-encryption --innodb_encrypt_tables=ON;
let $restart_noprint=1;
let $restart_parameters=$default_parameters;
--source include/restart_mysqld.inc
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.opt b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.opt
new file mode 100644
index 00000000..1df46435
--- /dev/null
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.opt
@@ -0,0 +1 @@
+--innodb --loose-changed_page_bitmaps --innodb-sys-tables --innodb-flush-log-at-trx-commit=2 --sequence
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.test b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.test
index 6ade4e11..97753555 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.test
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_mariabackup.test
@@ -8,9 +8,13 @@
CREATE TABLE t(i INT) ENGINE INNODB encrypted=yes encryption_key_id=1;
INSERT INTO t VALUES(1);
-echo # mariabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+--error 0,1
+rmdir $targetdir;
+
+echo # mariabackup backup;
+
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
diff --git a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_url_prefix.test b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_url_prefix.test
index 4d26affb..ef88b61c 100644
--- a/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_url_prefix.test
+++ b/plugin/hashicorp_key_management/mysql-test/vault/t/hashicorp_url_prefix.test
@@ -16,7 +16,7 @@
--error 0,1
--remove_file $LOG_FILE
---let $vault_defaults=--plugin-load-add=hashicorp_key_management --hashicorp_key_management=force --hashicorp-key-management-check-kv-version=off --hashicorp-key-management-token="$VAULT_TOKEN"
+--let $vault_defaults=--plugin-load-add=hashicorp_key_management --hashicorp_key_management=force --hashicorp-key-management-check-kv-version=off --hashicorp-key-management-token=$VAULT_TOKEN
--let $defaults=--defaults-group-suffix=.1 --defaults-file=$MYSQLTEST_VARDIR/my.cnf $vault_defaults --log-error=$LOG_FILE
--error 1
@@ -76,7 +76,7 @@
--remove_file $LOG_FILE
---let $restart_parameters=$vault_defaults --hashicorp-key-management-vault-url="$VAULT_ADDR/v1/bug///"
+--let $restart_parameters=$vault_defaults --hashicorp-key-management-vault-url=$VAULT_ADDR/v1/bug///
--let $restart_noprint=1
--source include/start_mysqld.inc
diff --git a/plugin/test_sql_service/test_sql_service.c b/plugin/test_sql_service/test_sql_service.c
index 8b326c6f..8a9b3dab 100644
--- a/plugin/test_sql_service/test_sql_service.c
+++ b/plugin/test_sql_service/test_sql_service.c
@@ -129,7 +129,7 @@ void auditing(MYSQL_THD thd, unsigned int event_class, const void *ev)
static int run_test(MYSQL_THD thd, struct st_mysql_sys_var *var, void *save,
struct st_mysql_value *value)
{
- *(my_bool*) save= 0; /* Set value for sql_service_run_test */
+ *(my_bool*)save= 1; // must initialize the return value
return (test_passed= (do_tests() == 0)) == 0;
}
@@ -140,6 +140,7 @@ static int run_sql(MYSQL *mysql, void *save, struct st_mysql_value *value)
int len= 0;
MYSQL_RES *res;
+ *(my_bool*)save= 1; // must initialize the return value
str= value->val_str(value, NULL, &len);
if (mysql_real_query(mysql, str, len))
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.result b/plugin/type_inet/mysql-test/type_inet/type_inet6.result
index 5ac2657f..d43352df 100644
--- a/plugin/type_inet/mysql-test/type_inet/type_inet6.result
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.result
@@ -2359,6 +2359,18 @@ Warning 1292 Incorrect inet6 value: ''
Warning 1292 Incorrect inet6 value: ''
DROP TABLE t1;
#
+# MDEV-32458 ASAN unknown-crash in Inet6::ascii_to_fbt when casting character string to inet6
+#
+CREATE TABLE t1 (c CHAR(3));
+INSERT INTO t1 VALUES ('1:0'),('00:');
+SELECT * FROM t1 WHERE c>CAST('::1' AS INET6);
+c
+Warnings:
+Warning 1292 Incorrect inet6 value: '1:0'
+Warning 1292 Incorrect inet6 value: '00:'
+DROP TABLE t1;
+# End of 10.6 tests
+#
# MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string
#
SET sql_mode='';
diff --git a/plugin/type_inet/mysql-test/type_inet/type_inet6.test b/plugin/type_inet/mysql-test/type_inet/type_inet6.test
index 0c56ecfe..cb3d226f 100644
--- a/plugin/type_inet/mysql-test/type_inet/type_inet6.test
+++ b/plugin/type_inet/mysql-test/type_inet/type_inet6.test
@@ -1702,6 +1702,17 @@ SELECT 1.00 + (b IN (a,'')) AS f FROM t1 ORDER BY f;
DROP TABLE t1;
--echo #
+--echo # MDEV-32458 ASAN unknown-crash in Inet6::ascii_to_fbt when casting character string to inet6
+--echo #
+
+CREATE TABLE t1 (c CHAR(3));
+INSERT INTO t1 VALUES ('1:0'),('00:');
+SELECT * FROM t1 WHERE c>CAST('::1' AS INET6);
+DROP TABLE t1;
+
+--echo # End of 10.6 tests
+
+--echo #
--echo # MDEV-22256 Assertion `length == pack_length()' failed in Field_timestamp_with_dec::sort_string
--echo #
diff --git a/plugin/type_inet/sql_type_inet.cc b/plugin/type_inet/sql_type_inet.cc
index 03c8d813..d23073d2 100644
--- a/plugin/type_inet/sql_type_inet.cc
+++ b/plugin/type_inet/sql_type_inet.cc
@@ -229,7 +229,7 @@ bool Inet6::ascii_to_fbt(const char *str, size_t str_length)
continue;
}
- if (!*p || p >= str_end)
+ if (p >= str_end || !*p)
{
DBUG_PRINT("error", ("ascii_to_ipv6(%.*s): invalid IPv6 address: "
"ending at ':'.", (int) str_length, str));
diff --git a/plugin/type_mysql_timestamp/plugin.cc b/plugin/type_mysql_timestamp/plugin.cc
index a524c5c0..6cbd76d8 100644
--- a/plugin/type_mysql_timestamp/plugin.cc
+++ b/plugin/type_mysql_timestamp/plugin.cc
@@ -103,7 +103,19 @@ public:
Field_mysql_timestampf(*name, rec, attr->unireg_check, share,
attr->temporal_dec(MAX_DATETIME_WIDTH));
}
- void Column_definition_implicit_upgrade(Column_definition *c) const override
+ const Type_handler *type_handler_for_implicit_upgrade() const override
+ {
+ /*
+ The derived method as of 10.11.8 does "return this;" anyway.
+ However, in the future this may change to return a
+ opt_mysql56_temporal_format dependent handler.
+ Here in this class we need to make sure to do "return this;"
+ not to depend on the derived method changes.
+ */
+ return this;
+ }
+ void Column_definition_implicit_upgrade_to_this(Column_definition *old)
+ const override
{
/*
Suppress the automatic upgrade depending on opt_mysql56_temporal_format,
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.result b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.result
new file mode 100644
index 00000000..b22e7851
--- /dev/null
+++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.result
@@ -0,0 +1,422 @@
+#
+# Start of 10.11 tests
+#
+#
+# MDEV-33442 REPAIR TABLE corrupts UUIDs
+#
+CREATE PROCEDURE show_table(long_version INT)
+BEGIN
+SHOW CREATE TABLE t1;
+SELECT VERSION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+IF long_version>0 THEN
+SELECT * FROM t1 ORDER BY b;
+ELSE
+SELECT * FROM t1 ORDER BY a DESC LIMIT 5;
+END IF;
+END;
+$$
+# Upgrade a 10.11.4 table using REPAIR
+CALL show_table(1);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+00001234-5566-0777-0888-99aabbccddee 0
+10101234-5566-0777-8888-99aabbccddee 1
+00201234-5566-0777-c888-99aabbccddee 2
+10301234-5566-0777-e888-99aabbccddee 3
+00401234-5566-1777-0888-99aabbccddee 4
+10501234-5566-1777-8888-99aabbccddee 5
+00601234-5566-1777-c888-99aabbccddee 6
+10701234-5566-1777-e888-99aabbccddee 7
+00801234-5566-2777-0888-99aabbccddee 8
+10901234-5566-2777-8888-99aabbccddee 9
+01001234-5566-2777-c888-99aabbccddee 10
+11101234-5566-2777-e888-99aabbccddee 11
+01201234-5566-3777-0888-99aabbccddee 12
+11301234-5566-3777-8888-99aabbccddee 13
+01401234-5566-3777-c888-99aabbccddee 14
+11501234-5566-3777-e888-99aabbccddee 15
+01601234-5566-4777-0888-99aabbccddee 16
+11701234-5566-4777-8888-99aabbccddee 17
+01801234-5566-4777-c888-99aabbccddee 18
+11901234-5566-4777-e888-99aabbccddee 19
+02001234-5566-5777-0888-99aabbccddee 20
+12101234-5566-5777-8888-99aabbccddee 21
+02201234-5566-5777-c888-99aabbccddee 22
+12301234-5566-5777-e888-99aabbccddee 23
+02401234-5566-6777-0888-99aabbccddee 24
+12501234-5566-6777-8888-99aabbccddee 25
+02601234-5566-6777-c888-99aabbccddee 26
+12701234-5566-6777-e888-99aabbccddee 27
+02801234-5566-7777-0888-99aabbccddee 28
+12901234-5566-7777-8888-99aabbccddee 29
+03001234-5566-7777-c888-99aabbccddee 30
+13101234-5566-7777-e888-99aabbccddee 31
+03201234-5566-8777-0888-99aabbccddee 32
+13301234-5566-8777-8888-99aabbccddee 33
+03401234-5566-8777-c888-99aabbccddee 34
+13501234-5566-8777-e888-99aabbccddee 35
+03601234-5566-9777-0888-99aabbccddee 36
+13701234-5566-9777-8888-99aabbccddee 37
+03801234-5566-9777-c888-99aabbccddee 38
+13901234-5566-9777-e888-99aabbccddee 39
+04001234-5566-a777-0888-99aabbccddee 40
+14101234-5566-a777-8888-99aabbccddee 41
+04201234-5566-a777-c888-99aabbccddee 42
+14301234-5566-a777-e888-99aabbccddee 43
+04401234-5566-b777-0888-99aabbccddee 44
+14501234-5566-b777-8888-99aabbccddee 45
+04601234-5566-b777-c888-99aabbccddee 46
+14701234-5566-b777-e888-99aabbccddee 47
+04801234-5566-c777-0888-99aabbccddee 48
+14901234-5566-c777-8888-99aabbccddee 49
+05001234-5566-c777-c888-99aabbccddee 50
+15101234-5566-c777-e888-99aabbccddee 51
+05201234-5566-d777-0888-99aabbccddee 52
+15301234-5566-d777-8888-99aabbccddee 53
+05401234-5566-d777-c888-99aabbccddee 54
+15501234-5566-d777-e888-99aabbccddee 55
+05601234-5566-e777-0888-99aabbccddee 56
+15701234-5566-e777-8888-99aabbccddee 57
+05801234-5566-e777-c888-99aabbccddee 58
+15901234-5566-e777-e888-99aabbccddee 59
+06001234-5566-f777-0888-99aabbccddee 60
+16101234-5566-f777-8888-99aabbccddee 61
+06201234-5566-f777-c888-99aabbccddee 62
+16301234-5566-f777-e888-99aabbccddee 63
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+16301234-5566-f777-e888-99aabbccddee 63
+15901234-5566-e777-e888-99aabbccddee 59
+15501234-5566-d777-e888-99aabbccddee 55
+15101234-5566-c777-e888-99aabbccddee 51
+14701234-5566-b777-e888-99aabbccddee 47
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+16301234-5566-f777-e888-99aabbccddee 63
+15901234-5566-e777-e888-99aabbccddee 59
+15501234-5566-d777-e888-99aabbccddee 55
+15101234-5566-c777-e888-99aabbccddee 51
+14701234-5566-b777-e888-99aabbccddee 47
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair Warning Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 33
+test.t1 repair Warning Incorrect uuid value: '03601234-5566-9777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 37
+test.t1 repair Warning Incorrect uuid value: '04001234-5566-a777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 41
+test.t1 repair Warning Incorrect uuid value: '04401234-5566-b777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 45
+test.t1 repair Warning Incorrect uuid value: '04801234-5566-c777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 49
+test.t1 repair Warning Incorrect uuid value: '05201234-5566-d777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 53
+test.t1 repair Warning Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 57
+test.t1 repair Warning Incorrect uuid value: '06001234-5566-f777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 61
+test.t1 repair status OK
+CALL show_table(1);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+00001234-5566-0777-0888-99aabbccddee 0
+10101234-5566-0777-8888-99aabbccddee 1
+00201234-5566-0777-c888-99aabbccddee 2
+10301234-5566-0777-e888-99aabbccddee 3
+00401234-5566-1777-0888-99aabbccddee 4
+10501234-5566-1777-8888-99aabbccddee 5
+00601234-5566-1777-c888-99aabbccddee 6
+10701234-5566-1777-e888-99aabbccddee 7
+00801234-5566-2777-0888-99aabbccddee 8
+10901234-5566-2777-8888-99aabbccddee 9
+01001234-5566-2777-c888-99aabbccddee 10
+11101234-5566-2777-e888-99aabbccddee 11
+01201234-5566-3777-0888-99aabbccddee 12
+11301234-5566-3777-8888-99aabbccddee 13
+01401234-5566-3777-c888-99aabbccddee 14
+11501234-5566-3777-e888-99aabbccddee 15
+01601234-5566-4777-0888-99aabbccddee 16
+11701234-5566-4777-8888-99aabbccddee 17
+01801234-5566-4777-c888-99aabbccddee 18
+11901234-5566-4777-e888-99aabbccddee 19
+02001234-5566-5777-0888-99aabbccddee 20
+12101234-5566-5777-8888-99aabbccddee 21
+02201234-5566-5777-c888-99aabbccddee 22
+12301234-5566-5777-e888-99aabbccddee 23
+02401234-5566-6777-0888-99aabbccddee 24
+12501234-5566-6777-8888-99aabbccddee 25
+02601234-5566-6777-c888-99aabbccddee 26
+12701234-5566-6777-e888-99aabbccddee 27
+02801234-5566-7777-0888-99aabbccddee 28
+12901234-5566-7777-8888-99aabbccddee 29
+03001234-5566-7777-c888-99aabbccddee 30
+13101234-5566-7777-e888-99aabbccddee 31
+NULL 32
+13301234-5566-8777-8888-99aabbccddee 33
+03401234-5566-8777-c888-99aabbccddee 34
+13501234-5566-8777-e888-99aabbccddee 35
+NULL 36
+13701234-5566-9777-8888-99aabbccddee 37
+03801234-5566-9777-c888-99aabbccddee 38
+13901234-5566-9777-e888-99aabbccddee 39
+NULL 40
+14101234-5566-a777-8888-99aabbccddee 41
+04201234-5566-a777-c888-99aabbccddee 42
+14301234-5566-a777-e888-99aabbccddee 43
+NULL 44
+14501234-5566-b777-8888-99aabbccddee 45
+04601234-5566-b777-c888-99aabbccddee 46
+14701234-5566-b777-e888-99aabbccddee 47
+NULL 48
+14901234-5566-c777-8888-99aabbccddee 49
+05001234-5566-c777-c888-99aabbccddee 50
+15101234-5566-c777-e888-99aabbccddee 51
+NULL 52
+15301234-5566-d777-8888-99aabbccddee 53
+05401234-5566-d777-c888-99aabbccddee 54
+15501234-5566-d777-e888-99aabbccddee 55
+NULL 56
+15701234-5566-e777-8888-99aabbccddee 57
+05801234-5566-e777-c888-99aabbccddee 58
+15901234-5566-e777-e888-99aabbccddee 59
+NULL 60
+16101234-5566-f777-8888-99aabbccddee 61
+06201234-5566-f777-c888-99aabbccddee 62
+16301234-5566-f777-e888-99aabbccddee 63
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+DROP TABLE t1;
+# Upgrade a 10.11.4 table using ALTER, adding a table COMMENT
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+16301234-5566-f777-e888-99aabbccddee 63
+15901234-5566-e777-e888-99aabbccddee 59
+15501234-5566-d777-e888-99aabbccddee 55
+15101234-5566-c777-e888-99aabbccddee 51
+14701234-5566-b777-e888-99aabbccddee 47
+# ALTER..INPLACE should fail - the old column 'b UUID' needs upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test10';
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 COMMENT 'test11';
+Warnings:
+Warning 1292 Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 33
+Warning 1292 Incorrect uuid value: '03601234-5566-9777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 37
+Warning 1292 Incorrect uuid value: '04001234-5566-a777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 41
+Warning 1292 Incorrect uuid value: '04401234-5566-b777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 45
+Warning 1292 Incorrect uuid value: '04801234-5566-c777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 49
+Warning 1292 Incorrect uuid value: '05201234-5566-d777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 53
+Warning 1292 Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 57
+Warning 1292 Incorrect uuid value: '06001234-5566-f777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 61
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='test11'
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test12';
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='test12'
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+DROP TABLE t1;
+# Upgrade a 10.11.4 table using ALTER, adding a DEFAULT for 'b INT'
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+16301234-5566-f777-e888-99aabbccddee 63
+15901234-5566-e777-e888-99aabbccddee 59
+15501234-5566-d777-e888-99aabbccddee 55
+15101234-5566-c777-e888-99aabbccddee 51
+14701234-5566-b777-e888-99aabbccddee 47
+# ALTER..INPLACE should fail - the old column 'b UUID' needs upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY b INT NOT NULL DEFAULT 10;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 MODIFY b INT NOT NULL DEFAULT 11;
+Warnings:
+Warning 1292 Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 33
+Warning 1292 Incorrect uuid value: '03601234-5566-9777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 37
+Warning 1292 Incorrect uuid value: '04001234-5566-a777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 41
+Warning 1292 Incorrect uuid value: '04401234-5566-b777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 45
+Warning 1292 Incorrect uuid value: '04801234-5566-c777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 49
+Warning 1292 Incorrect uuid value: '05201234-5566-d777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 53
+Warning 1292 Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 57
+Warning 1292 Incorrect uuid value: '06001234-5566-f777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 61
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL DEFAULT 11,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY b INT NOT NULL DEFAULT 12;
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL DEFAULT 12,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+DROP TABLE t1;
+# Upgrade a 10.11.4 table using ALTER, adding a DEFAULT for 'a UUID'
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT NULL,
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+16301234-5566-f777-e888-99aabbccddee 63
+15901234-5566-e777-e888-99aabbccddee 59
+15501234-5566-d777-e888-99aabbccddee 55
+15101234-5566-c777-e888-99aabbccddee 51
+14701234-5566-b777-e888-99aabbccddee 47
+# ALTER..INPLACE should fail - the old column 'b UUID' needs upgrade
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a UUID DEFAULT '16301234-5566-f777-e888-99aabbccdd00';
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+ALTER IGNORE TABLE t1 MODIFY a UUID DEFAULT '16301234-5566-f777-e888-99aabbccdd01';
+Warnings:
+Warning 1292 Incorrect uuid value: '03201234-5566-8777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 33
+Warning 1292 Incorrect uuid value: '03601234-5566-9777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 37
+Warning 1292 Incorrect uuid value: '04001234-5566-a777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 41
+Warning 1292 Incorrect uuid value: '04401234-5566-b777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 45
+Warning 1292 Incorrect uuid value: '04801234-5566-c777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 49
+Warning 1292 Incorrect uuid value: '05201234-5566-d777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 53
+Warning 1292 Incorrect uuid value: '05601234-5566-e777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 57
+Warning 1292 Incorrect uuid value: '06001234-5566-f777-0888-99aabbccddee' for column `test`.`t1`.`a` at row 61
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT '16301234-5566-f777-e888-99aabbccdd01',
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+# Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 MODIFY a UUID DEFAULT '16301234-5566-f777-e888-99aabbccdd02';
+CALL show_table(0);
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` uuid DEFAULT '16301234-5566-f777-e888-99aabbccdd02',
+ `b` int(11) NOT NULL,
+ KEY `a` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+VERSION
+10
+a b
+12301234-5566-5777-e888-99aabbccddee 23
+11901234-5566-4777-e888-99aabbccddee 19
+11501234-5566-3777-e888-99aabbccddee 15
+11101234-5566-2777-e888-99aabbccddee 11
+10701234-5566-1777-e888-99aabbccddee 7
+DROP TABLE t1;
+DROP PROCEDURE show_table;
+#
+# End of 10.11 tests
+#
diff --git a/plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.test b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.test
new file mode 100644
index 00000000..6181f6ef
--- /dev/null
+++ b/plugin/type_uuid/mysql-test/type_uuid/type_uuid_mariadb101104.test
@@ -0,0 +1,110 @@
+let $datadir= `select @@datadir`;
+
+--echo #
+--echo # Start of 10.11 tests
+--echo #
+
+--echo #
+--echo # MDEV-33442 REPAIR TABLE corrupts UUIDs
+--echo #
+
+DELIMITER $$;
+CREATE PROCEDURE show_table(long_version INT)
+BEGIN
+ SHOW CREATE TABLE t1;
+ SELECT VERSION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
+ IF long_version>0 THEN
+ SELECT * FROM t1 ORDER BY b;
+ ELSE
+ SELECT * FROM t1 ORDER BY a DESC LIMIT 5;
+ END IF;
+END;
+$$
+DELIMITER ;$$
+
+
+--echo # Upgrade a 10.11.4 table using REPAIR
+
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.frm $datadir/test/t1.frm
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYI $datadir/test/t1.MYI
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYD $datadir/test/t1.MYD
+CALL show_table(1);
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table(0);
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table(0);
+
+REPAIR TABLE t1;
+CALL show_table(1);
+
+CHECK TABLE t1 FOR UPGRADE;
+CALL show_table(0);
+
+DROP TABLE t1;
+
+--echo # Upgrade a 10.11.4 table using ALTER, adding a table COMMENT
+
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.frm $datadir/test/t1.frm
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYI $datadir/test/t1.MYI
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYD $datadir/test/t1.MYD
+CALL show_table(0);
+
+--echo # ALTER..INPLACE should fail - the old column 'b UUID' needs upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test10';
+ALTER IGNORE TABLE t1 COMMENT 'test11';
+CALL show_table(0);
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, COMMENT 'test12';
+CALL show_table(0);
+
+DROP TABLE t1;
+
+
+--echo # Upgrade a 10.11.4 table using ALTER, adding a DEFAULT for 'b INT'
+
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.frm $datadir/test/t1.frm
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYI $datadir/test/t1.MYI
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYD $datadir/test/t1.MYD
+CALL show_table(0);
+
+--echo # ALTER..INPLACE should fail - the old column 'b UUID' needs upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY b INT NOT NULL DEFAULT 10;
+ALTER IGNORE TABLE t1 MODIFY b INT NOT NULL DEFAULT 11;
+CALL show_table(0);
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY b INT NOT NULL DEFAULT 12;
+CALL show_table(0);
+
+DROP TABLE t1;
+
+
+--echo # Upgrade a 10.11.4 table using ALTER, adding a DEFAULT for 'a UUID'
+
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.frm $datadir/test/t1.frm
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYI $datadir/test/t1.MYI
+--copy_file $MTR_SUITE_DIR/std_data/mdev-29959.MYD $datadir/test/t1.MYD
+CALL show_table(0);
+
+--echo # ALTER..INPLACE should fail - the old column 'b UUID' needs upgrade
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER IGNORE TABLE t1 ALGORITHM=INPLACE, MODIFY a UUID DEFAULT '16301234-5566-f777-e888-99aabbccdd00';
+ALTER IGNORE TABLE t1 MODIFY a UUID DEFAULT '16301234-5566-f777-e888-99aabbccdd01';
+CALL show_table(0);
+
+--echo # Now ALTER..INPLACE should work
+ALTER IGNORE TABLE t1 MODIFY a UUID DEFAULT '16301234-5566-f777-e888-99aabbccdd02';
+CALL show_table(0);
+
+DROP TABLE t1;
+
+DROP PROCEDURE show_table;
+
+--echo #
+--echo # End of 10.11 tests
+--echo #
diff --git a/plugin/type_uuid/plugin.cc b/plugin/type_uuid/plugin.cc
index 499019e9..a1bde541 100644
--- a/plugin/type_uuid/plugin.cc
+++ b/plugin/type_uuid/plugin.cc
@@ -98,6 +98,14 @@ const Type_handler *Type_collection_uuid::find_in_array(const Type_handler *a,
return NULL;
}
+
+const Type_handler *Type_collection_uuid::type_handler_for_implicit_upgrade(
+ const Type_handler *from) const
+{
+ return Type_handler_uuid_new::singleton();
+}
+
+
/*************************************************************************/
class Create_func_uuid : public Create_func_arg0
diff --git a/plugin/type_uuid/sql_type_uuid.h b/plugin/type_uuid/sql_type_uuid.h
index 67d7471d..05d6cef6 100644
--- a/plugin/type_uuid/sql_type_uuid.h
+++ b/plugin/type_uuid/sql_type_uuid.h
@@ -316,6 +316,9 @@ public:
const override
{ return NULL; }
+ const Type_handler *type_handler_for_implicit_upgrade(
+ const Type_handler *from) const;
+
static Type_collection_uuid *singleton()
{
static Type_collection_uuid tc;
diff --git a/plugin/versioning/versioning.cc b/plugin/versioning/versioning.cc
index 38ebf762..a4916e2f 100644
--- a/plugin/versioning/versioning.cc
+++ b/plugin/versioning/versioning.cc
@@ -36,8 +36,8 @@ public:
static Create_func_trt<TRT_FIELD> s_singleton;
protected:
- Create_func_trt<TRT_FIELD>() = default;
- virtual ~Create_func_trt<TRT_FIELD>() = default;
+ Create_func_trt() = default;
+ virtual ~Create_func_trt() = default;
};
template<TR_table::field_id_t TRT_FIELD>
@@ -132,8 +132,8 @@ public:
static Create_func_trt_trx_sees<Item_func_trt_trx_seesX> s_singleton;
protected:
- Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() = default;
- virtual ~Create_func_trt_trx_sees<Item_func_trt_trx_seesX>() = default;
+ Create_func_trt_trx_sees() = default;
+ virtual ~Create_func_trt_trx_sees() = default;
};
template<class X>
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 742eb1e1..f38c1d7f 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -344,33 +344,13 @@ then
pamtooldir="$builddir/plugin/auth_pam"
elif test -n "$basedir"
then
- bindir="$basedir/bin" # only used in the help text
- resolveip=`find_in_dirs resolveip @resolveip_locations@`
- if test -z "$resolveip"
- then
- cannot_find_file resolveip @resolveip_locations@
- exit 1
- fi
- mysqld=`find_in_dirs mariadbd @mysqld_locations@`
- if test -z "$mysqld"
- then
- cannot_find_file mariadbd @mysqld_locations@
- exit 1
- fi
- langdir=`find_in_dirs --dir errmsg.sys @errmsg_locations@`
- if test -z "$langdir"
- then
- cannot_find_file errmsg.sys @errmsg_locations@
- exit 1
- fi
- srcpkgdatadir=`find_in_dirs --dir fill_help_tables.sql @pkgdata_locations@`
- buildpkgdatadir=$srcpkgdatadir
- if test -z "$srcpkgdatadir"
- then
- cannot_find_file fill_help_tables.sql @pkgdata_locations@
- exit 1
- fi
- plugindir=`find_in_dirs --dir auth_pam.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin $basedir/lib/*/mariadb19/plugin`
+ bindir="$basedir/@INSTALL_BINDIR@"
+ resolveip="$bindir/resolveip"
+ mysqld="$basedir/@INSTALL_SBINDIR@/mariadbd"
+ langdir="$basedir/@INSTALL_MYSQLSHAREDIR@/english"
+ srcpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
+ buildpkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
+ plugindir="$basedir/@INSTALL_PLUGINDIR@"
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@/mariadbd"
diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql
index 64b92fb4..73b72f6c 100644
--- a/scripts/mysql_system_tables_fix.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -773,19 +773,22 @@ if @have_innodb then
end if //
DELIMITER ;
-# MDEV-4332 longer user names
+# MDEV-4332 longer user names, extended by MDEV-24312 to longer again.
alter table user modify User char(128) binary not null default '';
alter table db modify User char(128) binary not null default '';
alter table tables_priv modify User char(128) binary not null default '';
alter table columns_priv modify User char(128) binary not null default '';
-alter table procs_priv modify User char(128) binary not null default '';
+alter table procs_priv modify User char(128) binary not null default '', modify Host char(255) binary DEFAULT '';
alter table proc modify definer varchar(384) collate utf8mb3_bin not null default '';
-alter table proxies_priv modify User char(128) COLLATE utf8mb3_bin not null default '';
+alter table proxies_priv modify User char(128) COLLATE utf8mb3_bin not null default '', modify Host char(255) binary DEFAULT '';
alter table proxies_priv modify Proxied_user char(128) COLLATE utf8mb3_bin not null default '';
alter table proxies_priv modify Grantor varchar(384) COLLATE utf8mb3_bin not null default '';
alter table servers modify Username char(128) not null default '';
alter table procs_priv modify Grantor varchar(384) COLLATE utf8mb3_bin not null default '';
alter table tables_priv modify Grantor varchar(384) COLLATE utf8mb3_bin not null default '';
+# MDEV-33726 longer names from MDEV-24312 extension
+alter table if exists global_priv modify Host char(255) binary DEFAULT '', modify User char(128) binary not null default '';
+alter table if exists roles_mapping modify Host char(255) binary not null DEFAULT '', modify User char(128) binary not null default '';
# Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 2b540581..dbbffee7 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -23,6 +23,22 @@ trap 'exit 3' INT QUIT TERM
# Setting the path for some utilities on CentOS
export PATH="$PATH:/usr/sbin:/usr/bin:/sbin:/bin"
+commandex()
+{
+ if [ -n "$BASH_VERSION" ]; then
+ command -v "$1" || :
+ elif [ -x "$1" ]; then
+ echo "$1"
+ else
+ which "$1" || :
+ fi
+}
+
+with_printf=1
+if [ -z "$BASH_VERSION" ]; then
+ [ -z "$(commandex printf)" ] && with_printf=0
+fi
+
trim_string()
{
if [ -n "$BASH_VERSION" ]; then
@@ -35,9 +51,9 @@ trim_string()
y=${#y}
x=$(( z-x-1 ))
y=$(( y-x+1 ))
- printf '%s' "${1:$x:$y}"
+ echo "${1:$x:$y}"
else
- printf ''
+ echo ''
fi
else
local pattern="[[:space:]${2:-}]"
@@ -59,9 +75,9 @@ trim_dir()
y=$(( y-x+1 ))
x="${1:$x:$y}"
[ -z "$x" ] && x='.'
- printf '%s' "$x"
+ echo "$x"
else
- printf ''
+ echo ''
fi
else
local pattern="[:space:]${2:-}"
@@ -85,9 +101,9 @@ trim_right()
y=${#y}
if [ $y -ne $z ]; then
y=$(( y+1 ))
- printf '%s' "${1:0:$y}"
+ echo "${1:0:$y}"
else
- printf ''
+ echo ''
fi
else
local pattern="[[:space:]${2:-}]"
@@ -95,6 +111,25 @@ trim_right()
fi
}
+trim_left()
+{
+ if [ -n "$BASH_VERSION" ]; then
+ local pattern="[![:space:]${2:-}]"
+ local x="${1#*$pattern}"
+ local z=${#1}
+ x=${#x}
+ if [ $x -ne $z ]; then
+ x=$(( z-x-1 ))
+ echo "${1:$x:$z}"
+ else
+ echo ''
+ fi
+ else
+ local pattern="[[:space:]${2:-}]"
+ echo "$1" | sed -E "s/^$pattern+//g"
+ fi
+}
+
to_minuses()
{
local x="$1"
@@ -105,11 +140,7 @@ to_minuses()
x="$t"
t="${t#*_}"
done
- if [ -n "$BASH_VERSION" ]; then
- printf '%s' "$r$x"
- else
- echo "$r$x"
- fi
+ echo "$r$x"
}
WSREP_SST_OPT_BYPASS=0
@@ -383,9 +414,11 @@ case "$1" in
# option name:
if [ -n "$BASH_VERSION" ]; then
option="${options:0:1}"
+ elif [ $with_printf -ne 0 ]; then
+ option=$(printf '%.1s' "$options")
else
- # If it's not bash, then we need to use slow
- # external utilities:
+ # If it's not bash and without printf,
+ # then we need to use slow external utilities:
option=$(echo "$options" | cut -c1)
fi
# And the subsequent characters consider option value:
@@ -788,17 +821,6 @@ WSREP_SST_OPT_ADDR="$WSREP_SST_OPT_HOST:$WSREP_SST_OPT_PORT$sst_path"
readonly WSREP_SST_OPT_ADDR
readonly WSREP_SST_OPT_ADDR_PORT
-commandex()
-{
- if [ -n "$BASH_VERSION" ]; then
- command -v "$1" || :
- elif [ -x "$1" ]; then
- echo "$1"
- else
- which "$1" || :
- fi
-}
-
# try to use my_print_defaults, mysql and mysqldump that come
# with the sources (for MTR suite):
script_binary=$(dirname "$0")
@@ -929,11 +951,7 @@ parse_cnf()
# Truncate spaces:
[ -n "$reval" ] && reval=$(trim_string "$reval")
- if [ -n "$BASH_VERSION" ]; then
- printf '%s' "$reval"
- else
- echo "$reval"
- fi
+ echo "$reval"
}
#
@@ -986,11 +1004,8 @@ in_config()
break
fi
done
- if [ -n "$BASH_VERSION" ]; then
- printf '%s' $found
- else
- echo $found
- fi
+
+ echo $found
}
wsrep_auth_not_set()
@@ -1128,9 +1143,7 @@ wsrep_gen_secret()
printf '%04x%04x%04x%04x%04x%04x%04x%04x' \
$RANDOM $RANDOM $RANDOM $RANDOM \
$RANDOM $RANDOM $RANDOM $RANDOM
- elif [ -n "$(commandex cksum)" -a \
- -n "$(commandex printf)" ]
- then
+ elif [ $with_printf -ne 0 -a -n "$(commandex cksum)" ]; then
printf '%08x%08x%08x%08x' \
$(head -8 /dev/urandom | cksum | cut -d ' ' -f1) \
$(head -8 /dev/urandom | cksum | cut -d ' ' -f1) \
@@ -1569,6 +1582,139 @@ check_server_ssl_config()
fi
}
+# Get Common Name (CN) from the certificate:
+openssl_getCN()
+{
+ get_openssl
+ if [ -z "$OPENSSL_BINARY" ]; then
+ wsrep_log_error \
+ 'openssl not found but it is required for authentication'
+ exit 42
+ fi
+
+ local bug=0
+ local CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$1" 2>&1) || bug=1
+
+ if [ $bug -ne 0 ]; then
+ wsrep_log_info "run: \"$OPENSSL_BINARY\" x509 -noout -subject -in \"$1\""
+ wsrep_log_info "output: $CN"
+ wsrep_log_error "******** FATAL ERROR **********************************************"
+ wsrep_log_error "* Unable to parse the certificate file to obtain the common name. *"
+ wsrep_log_error "*******************************************************************"
+ exit 22
+ fi
+
+ CN=$(trim_string "$CN")
+
+ if [ -n "$CN" ]; then
+ # If the string begins with the "subject" prefix
+ # then we need to remove it:
+ local saved="$CN"
+ local remain="${CN#subject}"
+ if [ "$remain" != "$saved" ]; then
+ remain=$(trim_left "$remain")
+ # Now let's check for the presence of "=" character
+ # after the "subject":
+ saved="$remain"
+ remain="${remain#=}"
+ if [ "$remain" != "$saved" ]; then
+ remain=$(trim_left "$remain")
+ else
+ remain=""
+ bug=1
+ fi
+ fi
+ while [ -n "$remain" ]; do
+ local value=""
+ # Let's extract the option name - all characters
+ # up to the first '=' or ',' character (if present):
+ local option="${remain%%[=,]*}"
+ if [ "$option" != "$remain" ]; then
+ option=$(trim_right "$option")
+ # These variables will be needed to determine
+ # which separator comes first:
+ local x="${remain#*=}"
+ local y="${remain#*,}"
+ local z=${#remain}
+ x=${#x}; [ $x -eq $z ] && x=0
+ y=${#y}; [ $y -eq $z ] && y=0
+ # The remaining string is everything that follows
+ # the separator character:
+ remain=$(trim_left "${remain#*[=,]}")
+ # Let's check what we are dealing with - an equal
+ # sign or a comma?
+ if [ $x -gt $y ]; then
+ # If the remainder begins with a double quote,
+ # then there is a string containing commas and
+ # we need to parse it:
+ saved="$remain"
+ remain="${remain#\"}"
+ if [ "$remain" != "$saved" ]; then
+ while :; do
+ # We need to find the closing quote:
+ local prefix="$remain"
+ remain="${remain#*\"}"
+ # Let's check if there is a closing quote?
+ if [ "$remain" = "$prefix" ]; then
+ bug=1
+ break
+ fi
+ # Everything up to the closing quote is
+ # the next part of the value:
+ value="$value${prefix%%\"*}"
+ # But if the last character of the value
+ # is a backslash, then it is a quoted quotation
+ # mark and we need to add it to the value:
+ if [ "${value%\\}" != "$value" ]; then
+ value="$value\""
+ else
+ break
+ fi
+ done
+ [ $bug -ne 0 ] && break
+ # Now we have to remove "," if it is present
+ # in the string after the value:
+ saved=$(trim_left "$remain")
+ remain="${saved#,}"
+ if [ "$remain" != "$saved" ]; then
+ remain=$(trim_left "$remain")
+ elif [ -n "$remain" ]; then
+ bug=1
+ break
+ fi
+ else
+ # We are dealing with a simple unquoted string value,
+ # therefore we need to take everything up to the end
+ # of the string, or up to the next comma character:
+ value="${remain%%,*}"
+ if [ "$value" != "$remain" ]; then
+ remain=$(trim_left "${remain#*,}")
+ else
+ remain=""
+ fi
+ value=$(trim_right "$value")
+ fi
+ if [ "$option" = 'CN' -a -n "$value" ]; then
+ echo "$value"
+ return
+ fi
+ fi
+ else
+ remain=""
+ fi
+ done
+ fi
+
+ if [ $bug -ne 0 ]; then
+ wsrep_log_error "******** FATAL ERROR **********************************************"
+ wsrep_log_error "* Unable to parse the certificate options: '$CN'"
+ wsrep_log_error "*******************************************************************"
+ exit 22
+ fi
+
+ echo ''
+}
+
simple_cleanup()
{
# Since this is invoked just after exit NNN
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 2b05326e..fcae6dd9 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -803,7 +803,8 @@ recv_joiner()
if [ $tmt -gt 0 ]; then
if [ -n "$(commandex timeout)" ]; then
local koption=0
- if [ "$OS" = 'FreeBSD' ]; then
+ if [ "$OS" = 'FreeBSD' -o "$OS" = 'NetBSD' -o "$OS" = 'OpenBSD' -o \
+ "$OS" = 'DragonFly' ]; then
if timeout 2>&1 | grep -qw -F -- '-k'; then
koption=1
fi
@@ -1166,12 +1167,6 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
iopts="--databases-exclude='lost+found'${iopts:+ }$iopts"
- if [ ${FORCE_FTWRL:-0} -eq 1 ]; then
- wsrep_log_info "Forcing FTWRL due to environment variable" \
- "FORCE_FTWRL equal to $FORCE_FTWRL"
- iopts="--no-backup-locks${iopts:+ }$iopts"
- fi
-
# if compression is enabled for backup files, then add the
# appropriate options to the mariadb-backup command line:
if [ "$compress" != 'none' ]; then
@@ -1209,11 +1204,11 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
else # BYPASS FOR IST
wsrep_log_info "Bypassing the SST for IST"
- echo "continue" # now server can resume updating data
+ echo 'continue' # now server can resume updating data
send_magic
- echo "1" > "$DATA/$IST_FILE"
+ echo '1' > "$DATA/$IST_FILE"
if [ -n "$scomp" ]; then
tcmd="$scomp | $tcmd"
@@ -1324,7 +1319,7 @@ else # joiner
check_round=0
while check_pid "$SST_PID" 0; do
wsrep_log_info "previous SST is not completed, waiting for it to exit"
- check_round=$(( check_round + 1 ))
+ check_round=$(( check_round+1 ))
if [ $check_round -eq 10 ]; then
wsrep_log_error "previous SST script still running."
exit 114 # EALREADY
@@ -1351,16 +1346,7 @@ else # joiner
# backward-incompatible behavior:
CN=""
if [ -n "$tpem" ]; then
- # find out my Common Name
- get_openssl
- if [ -z "$OPENSSL_BINARY" ]; then
- wsrep_log_error \
- 'openssl not found but it is required for authentication'
- exit 42
- fi
- CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$tpem" | \
- tr ',' '\n' | grep -F 'CN =' | cut -d '=' -f2 | sed s/^\ // | \
- sed s/\ %//)
+ CN=$(openssl_getCN "$tpem")
fi
MY_SECRET="$(wsrep_gen_secret)"
# Add authentication data to address
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index aabf5bd3..0d92a3c0 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -354,7 +354,7 @@ SST_PID="$DATA/wsrep_sst.pid"
check_round=0
while check_pid "$SST_PID" 0; do
wsrep_log_info "Previous SST is not completed, waiting for it to exit"
- check_round=$(( check_round + 1 ))
+ check_round=$(( check_round+1 ))
if [ $check_round -eq 20 ]; then
wsrep_log_error "previous SST script still running."
exit 114 # EALREADY
@@ -370,7 +370,7 @@ check_round=0
while check_pid "$STUNNEL_PID" 1 "$STUNNEL_CONF"; do
wsrep_log_info "Lingering stunnel daemon found at startup," \
"waiting for it to exit"
- check_round=$(( check_round + 1 ))
+ check_round=$(( check_round+1 ))
if [ $check_round -eq 10 ]; then
wsrep_log_error "stunnel daemon still running."
exit 114 # EALREADY
@@ -388,7 +388,7 @@ check_round=0
while check_pid "$RSYNC_PID" 1 "$RSYNC_CONF"; do
wsrep_log_info "Lingering rsync daemon found at startup," \
"waiting for it to exit"
- check_round=$(( check_round + 1 ))
+ check_round=$(( check_round+1 ))
if [ $check_round -eq 10 ]; then
wsrep_log_error "rsync daemon still running."
exit 114 # EALREADY
@@ -481,11 +481,7 @@ EOF
tar_type=2
fi
if [ $tar_type -eq 2 ]; then
- if [ -n "$BASH_VERSION" ]; then
- printf '%s' "$binlog_files" >&2
- else
- echo "$binlog_files" >&2
- fi
+ echo "$binlog_files" >&2
fi
if [ $tar_type -ne 0 ]; then
# Preparing list of the binlog file names:
@@ -854,16 +850,7 @@ EOF
# backward-incompatible behavior:
CN=""
if [ -n "$SSTCERT" ]; then
- # find out my Common Name
- get_openssl
- if [ -z "$OPENSSL_BINARY" ]; then
- wsrep_log_error \
- 'openssl not found but it is required for authentication'
- exit 42
- fi
- CN=$("$OPENSSL_BINARY" x509 -noout -subject -in "$SSTCERT" | \
- tr ',' '\n' | grep -F 'CN =' | cut -d '=' -f2 | sed s/^\ // | \
- sed s/\ %//)
+ CN=$(openssl_getCN "$SSTCERT")
fi
MY_SECRET="$(wsrep_gen_secret)"
# Add authentication data to address
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 66c7e385..a16d1972 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -56,7 +56,7 @@ ${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${LIBFMT_INCLUDE_DIR}
${PCRE_INCLUDE_DIRS}
-${ZLIB_INCLUDE_DIR}
+${ZLIB_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/sql
${CMAKE_SOURCE_DIR}/tpool
diff --git a/sql/backup.cc b/sql/backup.cc
index 5ce770c3..f634a11f 100644
--- a/sql/backup.cc
+++ b/sql/backup.cc
@@ -39,6 +39,7 @@
#ifdef WITH_WSREP
#include "wsrep_server_state.h"
#include "wsrep_mysqld.h"
+#include "wsrep_sst.h"
#endif /* WITH_WSREP */
static const char *stage_names[]=
@@ -293,29 +294,40 @@ static bool backup_block_ddl(THD *thd)
#ifdef WITH_WSREP
DBUG_ASSERT(thd->wsrep_desynced_backup_stage == false);
- /*
- if user is specifically choosing to allow BF aborting for BACKUP STAGE BLOCK_DDL lock
- holder, then do not desync and pause the node from cluster replication.
- e.g. mariabackup uses BACKUP STATE BLOCK_DDL; and will be abortable by this.
- But, If node is processing as SST donor or WSREP_MODE_BF_MARIABACKUP mode is not set,
- 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 (!wsrep_check_mode(WSREP_MODE_BF_MARIABACKUP) ||
- server_state.state() == Wsrep_server_state::s_donor)
+ /*
+ If user is specifically choosing to allow BF aborting for
+ BACKUP STAGE BLOCK_DDL lock holder, then do not desync and
+ pause the node from cluster replication. e.g. mariabackup
+ uses BACKUP STATE BLOCK_DDL; and will be abortable by this.
+ */
+ bool mariabackup= (server_state.state() == Wsrep_server_state::s_donor
+ && !strcmp(wsrep_sst_method, "mariabackup"));
+ bool allow_bf= wsrep_check_mode(WSREP_MODE_BF_MARIABACKUP);
+ bool pause_and_desync= true;
+
+ if ((allow_bf) || (mariabackup))
+ {
+ pause_and_desync= false;
+ }
+
+ if (pause_and_desync)
{
- if (server_state.desync_and_pause().is_undefined()) {
+ if (server_state.desync_and_pause().is_undefined())
DBUG_RETURN(1);
- }
+
+ WSREP_INFO("Server desynched from group during BACKUP STAGE BLOCK_DDL.");
DEBUG_SYNC(thd, "wsrep_backup_stage_after_desync_and_pause");
thd->wsrep_desynced_backup_stage= true;
}
else
- WSREP_INFO("Server not desynched from group because WSREP_MODE_BF_MARIABACKUP used.");
+ {
+ WSREP_INFO("Server not desynched from group at BLOCK_DDL because %s is used.",
+ allow_bf ? "WSREP_MODE_BF_MARIABACKUP" : wsrep_sst_method);
+ }
}
#endif /* WITH_WSREP */
@@ -399,6 +411,28 @@ static bool backup_block_commit(THD *thd)
}
thd->clear_error();
+#ifdef WITH_WSREP
+ if (WSREP_NNULL(thd) && !thd->wsrep_desynced_backup_stage)
+ {
+ Wsrep_server_state &server_state= Wsrep_server_state::instance();
+ bool mariabackup= (server_state.state() == Wsrep_server_state::s_donor
+ && !strcmp(wsrep_sst_method, "mariabackup"));
+
+ /* If this node is donor and mariabackup is not used
+ we desync and pause provider here if it is not yet done.
+ */
+ if (!mariabackup)
+ {
+ if (server_state.desync_and_pause().is_undefined())
+ DBUG_RETURN(1);
+
+ WSREP_INFO("Server desynched from group during BACKUP STAGE BLOCK_COMMIT.");
+ thd->wsrep_desynced_backup_stage= true;
+ DEBUG_SYNC(thd, "wsrep_backup_stage_commit_after_desync_and_pause");
+ }
+ }
+#endif /* WITH_WSREP */
+
DBUG_RETURN(0);
}
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index 362463a7..9d95b3c7 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -1152,7 +1152,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str, char *action_end)
st_debug_sync_action *action= NULL;
const char *errmsg;
char *ptr;
- char *token;
+ char *token= nullptr;
uint token_length= 0;
DBUG_ENTER("debug_sync_eval_action");
DBUG_ASSERT(thd);
diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc
index bfbe04f6..776be8a5 100644
--- a/sql/des_key_file.cc
+++ b/sql/des_key_file.cc
@@ -19,7 +19,7 @@
#include "log.h" // sql_print_error
#include <m_ctype.h>
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
struct st_des_keyschedule des_keyschedule[10];
uint des_default_key;
@@ -103,4 +103,4 @@ error:
mysql_mutex_unlock(&LOCK_des_key_file);
DBUG_RETURN(result);
}
-#endif /* HAVE_OPENSSL */
+#endif /* HAVE_des */
diff --git a/sql/des_key_file.h b/sql/des_key_file.h
index 847cd767..58ed2f87 100644
--- a/sql/des_key_file.h
+++ b/sql/des_key_file.h
@@ -16,7 +16,7 @@
#ifndef DES_KEY_FILE_INCLUDED
#define DES_KEY_FILE_INCLUDED
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
#include <openssl/des.h>
#include "violite.h" /* DES_cblock, DES_key_schedule */
@@ -35,6 +35,6 @@ extern struct st_des_keyschedule des_keyschedule[10];
extern uint des_default_key;
bool load_des_key_file(const char *file_name);
-#endif /* HAVE_OPENSSL */
+#endif /* HAVE_des */
#endif /* DES_KEY_FILE_INCLUDED */
diff --git a/sql/field.cc b/sql/field.cc
index 76b7ff61..4fbcc181 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1502,6 +1502,9 @@ bool Field::sp_prepare_and_store_item(THD *thd, Item **value)
if (!(expr_item= thd->sp_fix_func_item_for_assignment(this, value)))
goto error;
+ if (expr_item->check_is_evaluable_expression_or_error())
+ goto error;
+
/* Save the value in the field. Convert the value if needed. */
expr_item->save_in_field(this, 0);
@@ -5277,6 +5280,8 @@ int Field_timestamp::save_in_field(Field *to)
{
ulong sec_part;
my_time_t ts= get_timestamp(&sec_part);
+ if (!ts && !sec_part)
+ return to->store_time_dec(Datetime::zero().get_mysql_time(), decimals());
return to->store_timestamp_dec(Timeval(ts, sec_part), decimals());
}
@@ -5398,11 +5403,33 @@ int Field_timestamp::store(longlong nr, bool unsigned_val)
}
-int Field_timestamp::store_timestamp_dec(const timeval &ts, uint dec)
+int Field_timestamp::store_timestamp_dec(const timeval &tv, uint dec)
{
int warn= 0;
time_round_mode_t mode= Datetime::default_round_mode(get_thd());
- store_TIMESTAMP(Timestamp(ts).round(decimals(), mode, &warn));
+ const Timestamp ts= Timestamp(tv).round(decimals(), mode, &warn);
+ store_TIMESTAMP(ts);
+ if (ts.tv().tv_sec == 0 && ts.tv().tv_usec == 0)
+ {
+ /*
+ The value {tv_sec==0, tv_usec==0} here means '1970-01-01 00:00:00 +00'.
+ It does not mean zero datetime! because store_timestamp_dec() knows
+ nothing about zero dates. It inserts only real timeval values.
+ Zero ts={0,0} here is possible in two scenarios:
+ - the passed tv was already {0,0} meaning '1970-01-01 00:00:00 +00'
+ - the passed tv had some microseconds but they were rounded/truncated
+ to zero: '1970-01-01 00:00:00.1 +00' -> '1970-01-01 00:00:00 +00'.
+ It does not matter whether rounding/truncation really happened.
+ In both cases the call for store_TIMESTAMP(ts) above re-interpreted
+ '1970-01-01 00:00:00 +00:00' to zero date. Return 1 no matter what
+ sql_mode is. Even if sql_mode allows zero dates, there is still a problem
+ here: '1970-01-01 00:00:00 +00' could not be stored as-is!
+ */
+ ErrConvString str(STRING_WITH_LEN("1970-01-01 00:00:00 +00:00"),
+ system_charset_info);
+ set_datetime_warning(ER_WARN_DATA_OUT_OF_RANGE, &str, "datetime", 1);
+ return 1; // '1970-01-01 00:00:00 +00' was converted to a zero date
+ }
if (warn)
{
/*
@@ -5416,9 +5443,6 @@ int Field_timestamp::store_timestamp_dec(const timeval &ts, uint dec)
*/
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;
}
@@ -5789,8 +5813,10 @@ my_time_t Field_timestampf::get_timestamp(const uchar *pos,
bool Field_timestampf::val_native(Native *to)
{
DBUG_ASSERT(marked_for_read());
+ char zero[8]= "\0\0\0\0\0\0\0";
+ DBUG_ASSERT(pack_length () <= sizeof(zero));
// 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)
+ if (!memcmp(ptr, zero, pack_length()))
{
to->length(0);
return false;
@@ -11481,6 +11507,30 @@ bool Field::validate_value_in_record_with_warn(THD *thd, const uchar *record)
}
+/**
+ Find which reaction should be for IGNORE value.
+*/
+
+ignore_value_reaction find_ignore_reaction(THD *thd)
+{
+ enum_sql_command com= thd->lex->sql_command;
+
+ // All insert-like commands
+ if (com == SQLCOM_INSERT || com == SQLCOM_REPLACE ||
+ com == SQLCOM_INSERT_SELECT || com == SQLCOM_REPLACE_SELECT ||
+ com == SQLCOM_LOAD)
+ {
+ return IGNORE_MEANS_DEFAULT;
+ }
+ // Update commands
+ if (com == SQLCOM_UPDATE || com == SQLCOM_UPDATE_MULTI)
+ {
+ return IGNORE_MEANS_FIELD_VALUE;
+ }
+ return IGNORE_MEANS_ERROR;
+}
+
+
bool Field::save_in_field_default_value(bool view_error_processing)
{
THD *thd= table->in_use;
diff --git a/sql/field.h b/sql/field.h
index 8563375f..16cf689d 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -63,6 +63,15 @@ enum enum_check_fields
CHECK_FIELD_ERROR_FOR_NULL,
};
+enum ignore_value_reaction
+{
+ IGNORE_MEANS_ERROR,
+ IGNORE_MEANS_DEFAULT,
+ IGNORE_MEANS_FIELD_VALUE
+};
+
+ignore_value_reaction find_ignore_reaction(THD *thd);
+
enum enum_conv_type
{
@@ -5745,7 +5754,8 @@ public:
{
List_iterator<Create_field> it(list);
while (Create_field *f= it++)
- f->type_handler()->Column_definition_implicit_upgrade(f);
+ f->type_handler()->type_handler_for_implicit_upgrade()->
+ Column_definition_implicit_upgrade_to_this(f);
}
};
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index e86badd5..8cd1cb47 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -398,6 +398,7 @@ void ha_partition::init_handler_variables()
m_start_key.length= 0;
m_myisam= FALSE;
m_innodb= FALSE;
+ m_myisammrg= FALSE;
m_extra_cache= FALSE;
m_extra_cache_size= 0;
m_extra_prepare_for_update= FALSE;
@@ -692,6 +693,7 @@ int ha_partition::create_partitioning_metadata(const char *path,
partition_element *part;
DBUG_ENTER("ha_partition::create_partitioning_metadata");
+ mark_trx_read_write();
/*
We need to update total number of parts since we might write the handler
file as part of a partition management command
@@ -1677,10 +1679,10 @@ bool ha_partition::is_crashed() const
int ha_partition::prepare_new_partition(TABLE *tbl,
HA_CREATE_INFO *create_info,
handler *file, const char *part_name,
- partition_element *p_elem,
- uint disable_non_uniq_indexes)
+ partition_element *p_elem)
{
int error;
+ key_map keys_in_use= table->s->keys_in_use;
DBUG_ENTER("prepare_new_partition");
/*
@@ -1736,8 +1738,8 @@ int ha_partition::prepare_new_partition(TABLE *tbl,
goto error_external_lock;
DBUG_PRINT("info", ("partition %s external locked", part_name));
- if (disable_non_uniq_indexes)
- file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ if (!keys_in_use.is_prefix(table->s->keys))
+ file->ha_disable_indexes(keys_in_use, true);
DBUG_RETURN(0);
error_external_lock:
@@ -2033,13 +2035,6 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
calls
*/
- /*
- Before creating new partitions check whether indexes are disabled
- in the partitions.
- */
-
- uint disable_non_uniq_indexes= indexes_are_disabled();
-
i= 0;
part_count= 0;
part_it.rewind();
@@ -2081,8 +2076,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
prepare_new_partition(table, create_info,
new_file_array[part],
(const char *)part_name_buff,
- sub_elem,
- disable_non_uniq_indexes))))
+ sub_elem))))
{
cleanup_new_partition(part_count);
DBUG_RETURN(error);
@@ -2108,8 +2102,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
prepare_new_partition(table, create_info,
new_file_array[i],
(const char *)part_name_buff,
- part_elem,
- disable_non_uniq_indexes))))
+ part_elem))))
{
cleanup_new_partition(part_count);
DBUG_RETURN(error);
@@ -3040,6 +3033,10 @@ bool ha_partition::create_handlers(MEM_ROOT *mem_root)
DBUG_PRINT("info", ("InnoDB"));
m_innodb= TRUE;
}
+ else if (ha_legacy_type(hton0) == DB_TYPE_MRG_MYISAM)
+ {
+ m_myisammrg= TRUE;
+ }
DBUG_RETURN(FALSE);
}
@@ -3306,10 +3303,12 @@ handlerton *ha_partition::get_def_part_engine(const char *name)
goto err;
if (state.st_size <= 64)
goto err;
+ if ((ulonglong)state.st_size >= SIZE_T_MAX) /* Whole file need to fit into memory*/
+ goto err;
if (!(frm_image= (uchar*)my_malloc(key_memory_Partition_share,
- state.st_size, MYF(MY_WME))))
+ (size_t)state.st_size, MYF(MY_WME))))
goto err;
- if (mysql_file_read(file, frm_image, state.st_size, MYF(MY_NABP)))
+ if (mysql_file_read(file, frm_image, (size_t)state.st_size, MYF(MY_NABP)))
goto err;
if (frm_image[64] != '/')
@@ -8638,7 +8637,7 @@ int ha_partition::info(uint flag)
file->stats.auto_increment_value);
} while (*(++file_array));
- DBUG_ASSERT(auto_increment_value);
+ DBUG_ASSERT(!all_parts_opened || auto_increment_value);
stats.auto_increment_value= auto_increment_value;
if (all_parts_opened && auto_inc_is_first_in_idx)
{
@@ -9316,8 +9315,9 @@ int ha_partition::extra(enum ha_extra_function operation)
switch (operation) {
/* Category 1), used by most handlers */
case HA_EXTRA_NO_KEYREAD:
- DBUG_RETURN(loop_partitions(end_keyread_cb, NULL));
+ DBUG_RETURN(loop_read_partitions(end_keyread_cb, NULL));
case HA_EXTRA_KEYREAD:
+ DBUG_RETURN(loop_read_partitions(extra_cb, &operation));
case HA_EXTRA_FLUSH:
case HA_EXTRA_PREPARE_FOR_FORCED_CLOSE:
DBUG_RETURN(loop_partitions(extra_cb, &operation));
@@ -9426,9 +9426,14 @@ int ha_partition::extra(enum ha_extra_function operation)
}
/* Category 9) Operations only used by MERGE */
case HA_EXTRA_ADD_CHILDREN_LIST:
+ if (!m_myisammrg)
+ DBUG_RETURN(0);
DBUG_RETURN(loop_partitions(extra_cb, &operation));
case HA_EXTRA_ATTACH_CHILDREN:
{
+ if (!m_myisammrg)
+ DBUG_RETURN(0);
+
int result;
uint num_locks;
handler **file;
@@ -9447,8 +9452,9 @@ int ha_partition::extra(enum ha_extra_function operation)
break;
}
case HA_EXTRA_IS_ATTACHED_CHILDREN:
- DBUG_RETURN(loop_partitions(extra_cb, &operation));
case HA_EXTRA_DETACH_CHILDREN:
+ if (!m_myisammrg)
+ DBUG_RETURN(0);
DBUG_RETURN(loop_partitions(extra_cb, &operation));
case HA_EXTRA_MARK_AS_LOG_TABLE:
/*
@@ -9533,7 +9539,7 @@ int ha_partition::extra_opt(enum ha_extra_function operation, ulong arg)
switch (operation)
{
case HA_EXTRA_KEYREAD:
- DBUG_RETURN(loop_partitions(start_keyread_cb, &arg));
+ DBUG_RETURN(loop_read_partitions(start_keyread_cb, &arg));
case HA_EXTRA_CACHE:
prepare_extra_cache(arg);
DBUG_RETURN(0);
@@ -9622,13 +9628,52 @@ int ha_partition::loop_extra_alter(enum ha_extra_function operation)
int ha_partition::loop_partitions(handler_callback callback, void *param)
{
+ int result= loop_partitions_over_map(&m_part_info->lock_partitions,
+ callback, param);
+ /* Add all used partitions to be called in reset(). */
+ bitmap_union(&m_partitions_to_reset, &m_part_info->lock_partitions);
+ return result;
+}
+
+
+/*
+ Call callback(part, param) on read_partitions (the ones used by the query)
+*/
+
+int ha_partition::loop_read_partitions(handler_callback callback, void *param)
+{
+ /*
+ There is no need to record partitions on m_partitions_to_reset as
+ read_partitions were opened, etc - they will be reset anyway.
+ */
+ return loop_partitions_over_map(&m_part_info->read_partitions, callback,
+ param);
+}
+
+
+/**
+ Call callback(part, param) on specified set of partitions
+
+ @part_map The set of partitions to call callback for
+ @param callback a callback to call for each partition
+ @param param a void*-parameter passed to callback
+
+ @return Operation status
+ @retval >0 Error code
+ @retval 0 Success
+*/
+
+int ha_partition::loop_partitions_over_map(const MY_BITMAP *part_map,
+ handler_callback callback,
+ void *param)
+{
int result= 0, tmp;
uint i;
- DBUG_ENTER("ha_partition::loop_partitions");
+ DBUG_ENTER("ha_partition::loop_partitions_over_map");
- for (i= bitmap_get_first_set(&m_part_info->lock_partitions);
+ for (i= bitmap_get_first_set(part_map);
i < m_tot_parts;
- i= bitmap_get_next_set(&m_part_info->lock_partitions, i))
+ i= bitmap_get_next_set(part_map, i))
{
/*
This can be called after an error in ha_open.
@@ -9638,8 +9683,6 @@ int ha_partition::loop_partitions(handler_callback callback, void *param)
(tmp= callback(m_file[i], param)))
result= tmp;
}
- /* Add all used partitions to be called in reset(). */
- bitmap_union(&m_partitions_to_reset, &m_part_info->lock_partitions);
DBUG_RETURN(result);
}
@@ -10875,18 +10918,19 @@ int ha_partition::update_next_auto_inc_val()
bool ha_partition::need_info_for_auto_inc()
{
- handler **file= m_file;
DBUG_ENTER("ha_partition::need_info_for_auto_inc");
- do
+ for (uint i= bitmap_get_first_set(&m_locked_partitions);
+ i < m_tot_parts;
+ i= bitmap_get_next_set(&m_locked_partitions, i))
{
- if ((*file)->need_info_for_auto_inc())
+ if ((m_file[i])->need_info_for_auto_inc())
{
/* We have to get new auto_increment values from handler */
part_share->auto_inc_initialized= FALSE;
DBUG_RETURN(TRUE);
}
- } while (*(++file));
+ }
DBUG_RETURN(FALSE);
}
@@ -11172,7 +11216,7 @@ int ha_partition::calculate_checksum()
!= 0 Error
*/
-int ha_partition::disable_indexes(uint mode)
+int ha_partition::disable_indexes(key_map map, bool persist)
{
handler **file;
int error= 0;
@@ -11180,7 +11224,7 @@ int ha_partition::disable_indexes(uint mode)
DBUG_ASSERT(bitmap_is_set_all(&(m_part_info->lock_partitions)));
for (file= m_file; *file; file++)
{
- if (unlikely((error= (*file)->ha_disable_indexes(mode))))
+ if (unlikely((error= (*file)->ha_disable_indexes(map, persist))))
break;
}
return error;
@@ -11197,7 +11241,7 @@ int ha_partition::disable_indexes(uint mode)
!= 0 Error
*/
-int ha_partition::enable_indexes(uint mode)
+int ha_partition::enable_indexes(key_map map, bool persist)
{
handler **file;
int error= 0;
@@ -11205,7 +11249,7 @@ int ha_partition::enable_indexes(uint mode)
DBUG_ASSERT(bitmap_is_set_all(&(m_part_info->lock_partitions)));
for (file= m_file; *file; file++)
{
- if (unlikely((error= (*file)->ha_enable_indexes(mode))))
+ if (unlikely((error= (*file)->ha_enable_indexes(map, persist))))
break;
}
return error;
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 4b82bfb3..a252b0e9 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -399,6 +399,7 @@ private:
*/
bool m_innodb; // Are all underlying handlers
// InnoDB
+ bool m_myisammrg; // Are any of the handlers of type MERGE
/*
When calling extra(HA_EXTRA_CACHE) we do not pass this to the underlying
handlers immediately. Instead we cache it and call the underlying
@@ -577,8 +578,7 @@ private:
void cleanup_new_partition(uint part_count);
int prepare_new_partition(TABLE *table, HA_CREATE_INFO *create_info,
handler *file, const char *part_name,
- partition_element *p_elem,
- uint disable_non_uniq_indexes);
+ partition_element *p_elem);
/*
delete_table and rename_table uses very similar logic which
is packed into this routine.
@@ -988,6 +988,10 @@ private:
handler *file, uint *n);
static const uint NO_CURRENT_PART_ID= NOT_A_PARTITION_ID;
int loop_partitions(handler_callback callback, void *param);
+ int loop_partitions_over_map(const MY_BITMAP *map,
+ handler_callback callback,
+ void *param);
+ int loop_read_partitions(handler_callback callback, void *param);
int loop_extra_alter(enum ha_extra_function operations);
void late_extra_cache(uint partition_id);
void late_extra_no_cache(uint partition_id);
@@ -1580,8 +1584,8 @@ public:
Enable/Disable Indexes are only supported by HEAP and MyISAM.
-------------------------------------------------------------------------
*/
- int disable_indexes(uint mode) override;
- int enable_indexes(uint mode) override;
+ int disable_indexes(key_map map, bool persist) override;
+ int enable_indexes(key_map map, bool persist) override;
int indexes_are_disabled() override;
/*
diff --git a/sql/handler.cc b/sql/handler.cc
index 17cf018b..db25d254 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -645,13 +645,6 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
hton->slot= HA_SLOT_UNDEF;
/* Historical Requirement */
plugin->data= hton; // shortcut for the future
- /* [remove after merge] notes on merge conflict (MDEV-31400):
- 10.6-10.11: 13ba00ff4933cfc1712676f323587504e453d1b5
- 11.0-11.2: 42f8be10f18163c4025710cf6a212e82bddb2f62
- The 10.11->11.0 conflict is trivial, but the reference commit also
- contains different non-conflict changes needs to be applied to 11.0
- (and beyond).
- */
if (plugin->plugin->init && (ret= plugin->plugin->init(hton)))
goto err;
@@ -1617,6 +1610,29 @@ ha_check_and_coalesce_trx_read_only(THD *thd, Ha_trx_info *ha_list,
return rw_ha_count;
}
+#ifdef WITH_WSREP
+/**
+ Check if transaction contains storage engine not supporting
+ two-phase commit and transaction is read-write.
+
+ @retval
+ true Transaction contains storage engine not supporting
+ two phase commit and transaction is read-write
+ @retval
+ false otherwise
+*/
+static bool wsrep_have_no2pc_rw_ha(Ha_trx_info* ha_list)
+{
+ for (Ha_trx_info *ha_info=ha_list; ha_info; ha_info= ha_info->next())
+ {
+ handlerton *ht= ha_info->ht();
+ // Transaction is read-write and handler does not support 2pc
+ if (ha_info->is_trx_read_write() && ht->prepare==0)
+ return true;
+ }
+ return false;
+}
+#endif /* WITH_WSREP */
/**
@retval
@@ -1829,17 +1845,26 @@ int ha_commit_trans(THD *thd, bool all)
*/
if (run_wsrep_hooks)
{
- // This commit involves more than one storage engine and requires
- // two phases, but some engines don't support it.
- // Issue a message to the client and roll back the transaction.
- if (trans->no_2pc && rw_ha_count > 1)
+ // This commit involves storage engines that do not support two phases.
+ // We allow read only transactions to such storage engines but not
+ // read write transactions.
+ if (trans->no_2pc && rw_ha_count > 1 && wsrep_have_no2pc_rw_ha(trans->ha_list))
{
- my_message(ER_ERROR_DURING_COMMIT, "Transactional commit not supported "
- "by involved engine(s)", MYF(0));
- error= 1;
+ // This commit involves more than one storage engine and requires
+ // two phases, but some engines don't support it.
+ // Issue a message to the client and roll back the transaction.
+
+ // REPLACE|INSERT INTO ... SELECT uses TOI for MyISAM|Aria
+ if (WSREP(thd) && thd->wsrep_cs().mode() != wsrep::client_state::m_toi)
+ {
+ my_message(ER_ERROR_DURING_COMMIT, "Transactional commit not supported "
+ "by involved engine(s)", MYF(0));
+ error= 1;
+ }
}
- else
- error= wsrep_before_commit(thd, all);
+
+ if (!error)
+ error= wsrep_before_commit(thd, all);
}
if (error)
{
@@ -2212,8 +2237,12 @@ int ha_rollback_trans(THD *thd, bool all)
}
#ifdef WITH_WSREP
- (void) wsrep_before_rollback(thd, all);
+ // REPLACE|INSERT INTO ... SELECT uses TOI in consistency check
+ if (thd->wsrep_consistency_check != CONSISTENCY_CHECK_RUNNING)
+ if (thd->wsrep_cs().mode() != wsrep::client_state::m_toi)
+ (void) wsrep_before_rollback(thd, all);
#endif /* WITH_WSREP */
+
if (ha_info)
{
/* Close all cursors that can not survive ROLLBACK */
@@ -2250,7 +2279,11 @@ int ha_rollback_trans(THD *thd, bool all)
thd->thread_id, all?"TRUE":"FALSE", wsrep_thd_query(thd),
thd->get_stmt_da()->message(), is_real_trans);
}
- (void) wsrep_after_rollback(thd, all);
+
+ // REPLACE|INSERT INTO ... SELECT uses TOI in consistency check
+ if (thd->wsrep_consistency_check != CONSISTENCY_CHECK_RUNNING)
+ if (thd->wsrep_cs().mode() != wsrep::client_state::m_toi)
+ (void) wsrep_after_rollback(thd, all);
#endif /* WITH_WSREP */
if (all || !thd->in_active_multi_stmt_transaction())
@@ -3376,6 +3409,17 @@ int handler::ha_open(TABLE *table_arg, const char *name, int mode,
DBUG_ASSERT(alloc_root_inited(&table->mem_root));
set_partitions_to_open(partitions_to_open);
+ internal_tmp_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE);
+
+ if (!internal_tmp_table && (test_if_locked & HA_OPEN_TMP_TABLE) &&
+ current_thd->slave_thread)
+ {
+ /*
+ This is a temporary table used by replication that is not attached
+ to a THD. Mark it as a global temporary table.
+ */
+ test_if_locked|= HA_OPEN_GLOBAL_TMP_TABLE;
+ }
if (unlikely((error=open(name,mode,test_if_locked))))
{
@@ -3421,7 +3465,6 @@ int handler::ha_open(TABLE *table_arg, const char *name, int mode,
cached_table_flags= table_flags();
}
reset_statistics();
- internal_tmp_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE);
DBUG_RETURN(error);
}
@@ -4754,7 +4797,8 @@ int handler::ha_check_for_upgrade(HA_CHECK_OPT *check_opt)
KEY *keyinfo, *keyend;
KEY_PART_INFO *keypart, *keypartend;
- if (table->s->incompatible_version)
+ if (table->s->incompatible_version ||
+ check_old_types())
return HA_ADMIN_NEEDS_ALTER;
if (!table->s->mysql_version)
@@ -4780,6 +4824,12 @@ int handler::ha_check_for_upgrade(HA_CHECK_OPT *check_opt)
}
}
}
+
+ /*
+ True VARCHAR appeared in MySQL-5.0.3.
+ If the FRM is older than 5.0.3, force alter even if the check_old_type()
+ call above did not find data types that want upgrade.
+ */
if (table->s->frm_version < FRM_VER_TRUE_VARCHAR)
return HA_ADMIN_NEEDS_ALTER;
@@ -4793,26 +4843,15 @@ int handler::ha_check_for_upgrade(HA_CHECK_OPT *check_opt)
}
-int handler::check_old_types()
+bool handler::check_old_types() const
{
- Field** field;
-
- if (!table->s->mysql_version)
+ for (Field **field= table->field; (*field); field++)
{
- /* check for bad DECIMAL field */
- for (field= table->field; (*field); field++)
- {
- if ((*field)->type() == MYSQL_TYPE_NEWDECIMAL)
- {
- return HA_ADMIN_NEEDS_ALTER;
- }
- if ((*field)->type() == MYSQL_TYPE_VAR_STRING)
- {
- return HA_ADMIN_NEEDS_ALTER;
- }
- }
+ const Type_handler *th= (*field)->type_handler();
+ if (th != th->type_handler_for_implicit_upgrade())
+ return true;
}
- return 0;
+ return false;
}
@@ -4880,6 +4919,12 @@ uint handler::get_dup_key(int error)
DBUG_RETURN(errkey);
}
+bool handler::has_dup_ref() const
+{
+ DBUG_ASSERT(lookup_errkey != (uint)-1 || errkey != (uint)-1);
+ return ha_table_flags() & HA_DUPLICATE_POS || lookup_errkey != (uint)-1;
+}
+
/**
Delete all files with extension from bas_ext().
@@ -5013,8 +5058,6 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
if (table->s->mysql_version < 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;
@@ -5024,7 +5067,7 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
if (unlikely((error= check(thd, check_opt))))
return error;
/* Skip updating frm version if not main handler. */
- if (table->file != this)
+ if (table->file != this || opt_readonly)
return error;
return update_frm_version(table);
}
@@ -5073,7 +5116,7 @@ int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt)
DBUG_ASSERT(result == HA_ADMIN_NOT_IMPLEMENTED ||
ha_table_flags() & HA_CAN_REPAIR);
- if (result == HA_ADMIN_OK)
+ if (result == HA_ADMIN_OK && !opt_readonly)
result= update_frm_version(table);
return result;
}
@@ -5215,34 +5258,48 @@ handler::ha_check_and_repair(THD *thd)
/**
Disable indexes: public interface.
+ @param map has 0 for all indexes that should be disabled
+ @param persist indexes should stay disabled after server restart
+
+ Currently engines don't support disabling an arbitrary subset of indexes.
+
+ In particular, if the change is persistent:
+ * auto-increment index should not be disabled
+ * unique indexes should not be disabled
+
+ if unique or auto-increment indexes are disabled (non-persistently),
+ the caller should only insert data that does not require
+ auto-inc generation and does not violate uniqueness
+
@sa handler::disable_indexes()
*/
int
-handler::ha_disable_indexes(uint mode)
+handler::ha_disable_indexes(key_map map, bool persist)
{
- DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
- m_lock_type != F_UNLCK);
+ DBUG_ASSERT(table->s->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK);
mark_trx_read_write();
- return disable_indexes(mode);
+ return disable_indexes(map, persist);
}
/**
Enable indexes: public interface.
+ @param map has 1 for all indexes that should be enabled
+ @param persist indexes should stay enabled after server restart
+
@sa handler::enable_indexes()
*/
int
-handler::ha_enable_indexes(uint mode)
+handler::ha_enable_indexes(key_map map, bool persist)
{
- DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
- m_lock_type != F_UNLCK);
+ DBUG_ASSERT(table->s->tmp_table != NO_TMP_TABLE || m_lock_type != F_UNLCK);
mark_trx_read_write();
- return enable_indexes(mode);
+ return enable_indexes(map, persist);
}
@@ -5518,6 +5575,9 @@ handler::ha_create(const char *name, TABLE *form, HA_CREATE_INFO *info_arg)
{
DBUG_ASSERT(m_lock_type == F_UNLCK);
mark_trx_read_write();
+ if ((info_arg->options & HA_LEX_CREATE_TMP_TABLE) &&
+ current_thd->slave_thread)
+ info_arg->options|= HA_LEX_CREATE_GLOBAL_TMP_TABLE;
int error= create(name, form, info_arg);
if (!error &&
!(info_arg->options & (HA_LEX_CREATE_TMP_TABLE | HA_CREATE_TMP_ALTER)))
@@ -5545,8 +5605,6 @@ handler::ha_create_partitioning_metadata(const char *name,
DBUG_ASSERT(m_lock_type == F_UNLCK ||
(!old_name && strcmp(name, table_share->path.str)));
-
- mark_trx_read_write();
return create_partitioning_metadata(name, old_name, action_flag);
}
@@ -6007,7 +6065,7 @@ err:
void st_ha_check_opt::init()
{
- flags= sql_flags= 0;
+ flags= sql_flags= handler_flags= 0;
start_time= my_time(0);
}
@@ -7336,11 +7394,8 @@ exit:
if (error == HA_ERR_FOUND_DUPP_KEY)
{
table->file->lookup_errkey= key_no;
- if (ha_table_flags() & HA_DUPLICATE_POS)
- {
- lookup_handler->position(table->record[0]);
- memcpy(table->file->dup_ref, lookup_handler->ref, ref_length);
- }
+ lookup_handler->position(table->record[0]);
+ memcpy(table->file->dup_ref, lookup_handler->ref, ref_length);
}
restore_record(table, file->lookup_buffer);
table->restore_blob_values(blob_storage);
@@ -7419,7 +7474,7 @@ int handler::check_duplicate_long_entries_update(const uchar *new_rec)
So also check for that too
*/
if((field->is_null(0) != field->is_null(reclength)) ||
- field->cmp_binary_offset(reclength))
+ field->cmp_offset(reclength))
{
if((error= check_duplicate_long_entry_key(new_rec, i)))
return error;
@@ -7628,7 +7683,16 @@ int handler::ha_write_row(const uchar *buf)
m_lock_type == F_WRLCK);
DBUG_ENTER("handler::ha_write_row");
DEBUG_SYNC_C("ha_write_row_start");
-
+#ifdef WITH_WSREP
+ DBUG_EXECUTE_IF("wsrep_ha_write_row",
+ {
+ const char act[]=
+ "now "
+ "SIGNAL wsrep_ha_write_row_reached "
+ "WAIT_FOR wsrep_ha_write_row_continue";
+ DBUG_ASSERT(!debug_sync_set_action(ha_thd(), STRING_WITH_LEN(act)));
+ });
+#endif /* WITH_WSREP */
if ((error= ha_check_overlaps(NULL, buf)))
DBUG_RETURN(error);
diff --git a/sql/handler.h b/sql/handler.h
index a8484e2a..6958692e 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -451,12 +451,6 @@ enum chf_create_flags {
#define HA_FAST_CHANGE_PARTITION (1UL << 13)
#define HA_PARTITION_ONE_PHASE (1UL << 14)
-/* operations for disable/enable indexes */
-#define HA_KEY_SWITCH_NONUNIQ 0
-#define HA_KEY_SWITCH_ALL 1
-#define HA_KEY_SWITCH_NONUNIQ_SAVE 2
-#define HA_KEY_SWITCH_ALL_SAVE 3
-
/*
Note: the following includes binlog and closing 0.
TODO remove the limit, use dynarrays
@@ -495,6 +489,12 @@ enum chf_create_flags {
#define HA_LEX_CREATE_SEQUENCE 16U
#define HA_VERSIONED_TABLE 32U
#define HA_SKIP_KEY_SORT 64U
+/*
+ A temporary table that can be used by different threads, eg. replication
+ threads. This flag ensure that memory is not allocated with THREAD_SPECIFIC,
+ as we do for other temporary tables.
+*/
+#define HA_LEX_CREATE_GLOBAL_TMP_TABLE 128U
#define HA_MAX_REC_LENGTH 65535
@@ -2673,6 +2673,7 @@ typedef struct st_ha_check_opt
st_ha_check_opt() = default; /* Remove gcc warning */
uint flags; /* isam layer flags (e.g. for myisamchk) */
uint sql_flags; /* sql layer flags - for something myisamchk cannot do */
+ uint handler_flags; /* Reserved for handler usage */
time_t start_time; /* When check/repair starts */
KEY_CACHE *key_cache; /* new key cache when changing key cache */
void init();
@@ -3360,6 +3361,7 @@ public:
("handler created F_UNLCK %d F_RDLCK %d F_WRLCK %d",
F_UNLCK, F_RDLCK, F_WRLCK));
reset_statistics();
+ active_handler_stats.active= 0;
}
virtual ~handler(void)
{
@@ -3500,8 +3502,8 @@ public:
int ha_optimize(THD* thd, HA_CHECK_OPT* check_opt);
int ha_analyze(THD* thd, HA_CHECK_OPT* check_opt);
bool ha_check_and_repair(THD *thd);
- int ha_disable_indexes(uint mode);
- int ha_enable_indexes(uint mode);
+ int ha_disable_indexes(key_map map, bool persist);
+ int ha_enable_indexes(key_map map, bool persist);
int ha_discard_or_import_tablespace(my_bool discard);
int ha_rename_table(const char *from, const char *to);
void ha_drop_table(const char *name);
@@ -3525,6 +3527,7 @@ public:
virtual void print_error(int error, myf errflag);
virtual bool get_error_message(int error, String *buf);
uint get_dup_key(int error);
+ bool has_dup_ref() const;
/**
Retrieves the names of the table and the key for which there was a
duplicate entry in the case of HA_ERR_FOREIGN_DUPLICATE_KEY.
@@ -4092,7 +4095,6 @@ public:
}
virtual void update_create_info(HA_CREATE_INFO *create_info) {}
- int check_old_types();
virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT* check_opt)
{ return HA_ADMIN_NOT_IMPLEMENTED; }
virtual int preload_keys(THD* thd, HA_CHECK_OPT* check_opt)
@@ -4783,9 +4785,12 @@ public:
}
inline void ha_handler_stats_disable()
{
- handler_stats= 0;
- active_handler_stats.active= 0;
- handler_stats_updated();
+ if (handler_stats)
+ {
+ handler_stats= 0;
+ active_handler_stats.active= 0;
+ handler_stats_updated();
+ }
}
private:
@@ -4800,6 +4805,7 @@ private:
}
private:
+ bool check_old_types() const;
void mark_trx_read_write_internal();
bool check_table_binlog_row_based_internal();
@@ -5039,8 +5045,8 @@ public:
virtual int analyze(THD* thd, HA_CHECK_OPT* check_opt)
{ return HA_ADMIN_NOT_IMPLEMENTED; }
virtual bool check_and_repair(THD *thd) { return TRUE; }
- virtual int disable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; }
- virtual int enable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; }
+ virtual int disable_indexes(key_map map, bool persist) { return HA_ERR_WRONG_COMMAND; }
+ virtual int enable_indexes(key_map map, bool persist) { return HA_ERR_WRONG_COMMAND; }
virtual int discard_or_import_tablespace(my_bool discard)
{ return (my_errno=HA_ERR_WRONG_COMMAND); }
virtual void drop_table(const char *name);
diff --git a/sql/item.cc b/sql/item.cc
index 6f9eb9d1..aacacaa9 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -27,6 +27,7 @@
#include "sp_rcontext.h"
#include "sp_head.h"
#include "sql_trigger.h"
+#include "sql_parse.h"
#include "sql_select.h"
#include "sql_show.h" // append_identifier
#include "sql_view.h" // VIEW_ANY_SQL
@@ -494,7 +495,10 @@ void Item::print_parenthesised(String *str, enum_query_type query_type,
bool need_parens= precedence() < parent_prec;
if (need_parens)
str->append('(');
- print(str, query_type);
+ if (check_stack_overrun(current_thd, STACK_MIN_SIZE, NULL))
+ str->append(STRING_WITH_LEN("<STACK OVERRUN>"));
+ else
+ print(str, query_type);
if (need_parens)
str->append(')');
}
@@ -4103,7 +4107,9 @@ Item_param::Item_param(THD *thd, const LEX_CSTRING *name_arg,
as an actual parameter. See Item_param::set_from_item().
*/
m_is_settable_routine_parameter(true),
- m_clones(thd->mem_root)
+ m_clones(thd->mem_root),
+ m_associated_field(nullptr),
+ m_default_field(nullptr)
{
name= *name_arg;
/*
@@ -4510,10 +4516,29 @@ int Item_param::save_in_field(Field *field, bool no_conversions)
case NULL_VALUE:
return set_field_to_null_with_conversions(field, no_conversions);
case DEFAULT_VALUE:
+ if (m_associated_field)
+ return assign_default(field);
return field->save_in_field_default_value(field->table->pos_in_table_list->
top_table() !=
field->table->pos_in_table_list);
case IGNORE_VALUE:
+ if (m_associated_field)
+ {
+ switch (find_ignore_reaction(field->table->in_use))
+ {
+ case IGNORE_MEANS_DEFAULT:
+ DBUG_ASSERT(0); // impossible now, but fully working code if needed
+ return assign_default(field);
+ case IGNORE_MEANS_FIELD_VALUE:
+ m_associated_field->save_val(field);
+ return false;
+ default:
+ ; // fall through to error
+ }
+ DBUG_ASSERT(0); //impossible
+ my_error(ER_INVALID_DEFAULT_PARAM, MYF(0));
+ return true;
+ }
return field->save_in_field_ignore_value(field->table->pos_in_table_list->
top_table() !=
field->table->pos_in_table_list);
@@ -5097,6 +5122,92 @@ bool Item_param::append_for_log(THD *thd, String *str)
}
+/**
+ Allocate a memory and create on it a copy of Field object.
+
+ @param thd thread handler
+ @param field_arg an instance of Field the new Field object be based on
+
+ @return a new created Field object on success, nullptr on error.
+*/
+
+static Field *make_default_field(THD *thd, Field *field_arg)
+{
+ Field *def_field;
+
+ if (!(def_field= (Field*) thd->alloc(field_arg->size_of())))
+ return nullptr;
+
+ memcpy((void *)def_field, (void *)field_arg, field_arg->size_of());
+ def_field->reset_fields();
+ // If non-constant default value expression or a blob
+ if (def_field->default_value &&
+ (def_field->default_value->flags || (def_field->flags & BLOB_FLAG)))
+ {
+ uchar *newptr= (uchar*) thd->alloc(1+def_field->pack_length());
+ if (!newptr)
+ return nullptr;
+
+ if (should_mark_column(thd->column_usage))
+ def_field->default_value->expr->update_used_tables();
+ def_field->move_field(newptr + 1, def_field->maybe_null() ? newptr : 0, 1);
+ }
+ else
+ def_field->move_field_offset((my_ptrdiff_t)
+ (def_field->table->s->default_values -
+ def_field->table->record[0]));
+ return def_field;
+}
+
+
+/**
+ Assign a default value of a table column to the positional parameter that
+ is performed on execution of a prepared statement with the clause
+ 'USING DEFAULT'
+
+ @param field a field that should be assigned an actual value of positional
+ parameter passed via the clause 'USING DEFAULT'
+
+ @return false on success, true on failure
+*/
+
+bool Item_param::assign_default(Field *field)
+{
+ DBUG_ASSERT(m_associated_field);
+
+ if (m_associated_field->field->flags & NO_DEFAULT_VALUE_FLAG)
+ {
+ my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0),
+ m_associated_field->field->field_name.str);
+ return true;
+ }
+
+ if (!m_default_field)
+ {
+ m_default_field= make_default_field(field->table->in_use,
+ m_associated_field->field);
+
+ if (!m_default_field)
+ return true;
+ }
+
+ if (m_default_field->default_value)
+ {
+ return m_default_field->default_value->expr->save_in_field(field, 0);
+ }
+ else if (m_default_field->is_null())
+ {
+ field->set_null();
+ return false;
+ }
+ else
+ {
+ field->set_notnull();
+ return field_conv(field, m_default_field);
+ }
+}
+
+
/****************************************************************************
Item_copy_string
****************************************************************************/
@@ -6904,6 +7015,7 @@ Item_basic_constant *
Item_string::make_string_literal_concat(THD *thd, const LEX_CSTRING *str)
{
append(str->str, (uint32) str->length);
+ set_name(thd, &str_value);
if (!(collation.repertoire & MY_REPERTOIRE_EXTENDED))
{
// If the string has been pure ASCII so far, check the new part.
@@ -9596,69 +9708,10 @@ bool Item_default_value::update_func_default_processor(void *)
bool Item_default_value::fix_fields(THD *thd, Item **items)
{
- Item *real_arg;
- Item_field *field_arg;
- Field *def_field;
DBUG_ASSERT(fixed() == 0);
DBUG_ASSERT(arg);
- /*
- DEFAULT() do not need table field so should not ask handler to bring
- field value (mark column for read)
- */
- enum_column_usage save_column_usage= thd->column_usage;
- /*
- Fields which has defult value could be read, so it is better hide system
- invisible columns.
- */
- thd->column_usage= COLUMNS_WRITE;
- if (arg->fix_fields_if_needed(thd, &arg))
- {
- thd->column_usage= save_column_usage;
- goto error;
- }
- thd->column_usage= save_column_usage;
-
- real_arg= arg->real_item();
- if (real_arg->type() != FIELD_ITEM)
- {
- my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0), arg->name.str);
- goto error;
- }
-
- field_arg= (Item_field *)real_arg;
- if ((field_arg->field->flags & NO_DEFAULT_VALUE_FLAG))
- {
- my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0),
- field_arg->field->field_name.str);
- goto error;
- }
- if (!(def_field= (Field*) thd->alloc(field_arg->field->size_of())))
- goto error;
- memcpy((void *)def_field, (void *)field_arg->field,
- field_arg->field->size_of());
- def_field->reset_fields();
- // If non-constant default value expression or a blob
- if (def_field->default_value &&
- (def_field->default_value->flags || (def_field->flags & BLOB_FLAG)))
- {
- uchar *newptr= (uchar*) thd->alloc(1+def_field->pack_length());
- if (!newptr)
- goto error;
- if (should_mark_column(thd->column_usage))
- def_field->default_value->expr->update_used_tables();
- def_field->move_field(newptr+1, def_field->maybe_null() ? newptr : 0, 1);
- }
- else
- def_field->move_field_offset((my_ptrdiff_t)
- (def_field->table->s->default_values -
- def_field->table->record[0]));
- set_field(def_field);
- return FALSE;
-
-error:
- context->process_error(thd);
- return TRUE;
+ return tie_field(thd);
}
void Item_default_value::cleanup()
@@ -9847,6 +9900,79 @@ Item *Item_default_value::transform(THD *thd, Item_transformer transformer,
}
+bool Item_default_value::
+ associate_with_target_field(THD *thd,
+ Item_field *field __attribute__((unused)))
+{
+ m_associated= true;
+ /*
+ arg set correctly in constructor (can also differ from field if
+ it is function with an argument)
+ */
+ return tie_field(thd);
+}
+
+
+/**
+ Call fix_fields for an item representing the default value, create
+ an instance of Field for representing the default value and assign it
+ to the Item_field::field.
+
+ @param thd thread handler
+
+ @return false on success, true on error
+*/
+
+bool Item_default_value::tie_field(THD *thd)
+{
+ Item *real_arg;
+ Item_field *field_arg;
+ Field *def_field;
+
+ /*
+ DEFAULT() do not need table field so should not ask handler to bring
+ field value (mark column for read)
+ */
+ enum_column_usage save_column_usage= thd->column_usage;
+ /*
+ Fields which has defult value could be read, so it is better hide system
+ invisible columns.
+ */
+ thd->column_usage= COLUMNS_WRITE;
+ if (arg->fix_fields_if_needed(thd, &arg))
+ {
+ thd->column_usage= save_column_usage;
+ goto error;
+ }
+ thd->column_usage= save_column_usage;
+
+ real_arg= arg->real_item();
+ if (real_arg->type() != FIELD_ITEM)
+ {
+ my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0), arg->name.str);
+ goto error;
+ }
+
+ field_arg= (Item_field *)real_arg;
+ if ((field_arg->field->flags & NO_DEFAULT_VALUE_FLAG))
+ {
+ my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0),
+ field_arg->field->field_name.str);
+ goto error;
+ }
+ def_field= make_default_field(thd, field_arg->field);
+ if (!def_field)
+ goto error;
+
+ set_field(def_field);
+ return false;
+
+error:
+ context->process_error(thd);
+ return true;
+
+}
+
bool Item_insert_value::eq(const Item *item, bool binary_cmp) const
{
return item->type() == INSERT_VALUE_ITEM &&
diff --git a/sql/item.h b/sql/item.h
index 6f552385..be41878a 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -946,7 +946,7 @@ protected:
const Tmp_field_param *param,
bool is_explicit_null);
- void raise_error_not_evaluable();
+ virtual void raise_error_not_evaluable();
void push_note_converted_to_negative_complement(THD *thd);
void push_note_converted_to_positive_complement(THD *thd);
@@ -2735,6 +2735,18 @@ public:
Checks if this item consists in the left part of arg IN subquery predicate
*/
bool pushable_equality_checker_for_subquery(uchar *arg);
+
+ /**
+ This method is to set relationship between a positional parameter
+ represented by the '?' and an actual argument value passed to the
+ call of PS/SP by the USING clause. The method is overridden in classes
+ Item_param and Item_default_value.
+ */
+ virtual bool associate_with_target_field(THD *, Item_field *)
+ {
+ DBUG_ASSERT(fixed());
+ return false;
+ }
};
MEM_ROOT *get_thd_memroot(THD *thd);
@@ -4136,6 +4148,12 @@ public:
Item_param(THD *thd, const LEX_CSTRING *name_arg,
uint pos_in_query_arg, uint len_in_query_arg);
+ void cleanup() override
+ {
+ m_default_field= NULL;
+ Item::cleanup();
+ }
+
Type type() const override
{
// Don't pretend to be a constant unless value for this item is set.
@@ -4340,6 +4358,10 @@ public:
void sync_clones();
bool register_clone(Item_param *i) { return m_clones.push_back(i); }
+ void raise_error_not_evaluable() override
+ {
+ invalid_default_param();
+ }
private:
void invalid_default_param() const;
bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override;
@@ -4350,6 +4372,17 @@ public:
Item_param *get_item_param() override { return this; }
void make_send_field(THD *thd, Send_field *field) override;
+ /**
+ See comments on @see Item::associate_with_target_field for method
+ description
+ */
+ bool associate_with_target_field(THD *, Item_field *field) override
+ {
+ m_associated_field= field;
+ return false;
+ }
+ bool assign_default(Field *field);
+
private:
Send_field *m_out_param_info;
bool m_is_settable_routine_parameter;
@@ -4359,6 +4392,8 @@ private:
synchronize the actual value of the parameter with the values of the clones.
*/
Mem_root_array<Item_param *, true> m_clones;
+ Item_field *m_associated_field;
+ Field *m_default_field;
};
@@ -6054,6 +6089,8 @@ class Item_direct_view_ref :public Item_direct_ref
if (!view->is_inner_table_of_outer_join() ||
!(null_ref_table= view->get_real_join_table()))
null_ref_table= NO_NULL_TABLE;
+ if (null_ref_table && null_ref_table != NO_NULL_TABLE)
+ set_maybe_null();
}
bool check_null_ref()
@@ -6693,6 +6730,8 @@ public:
class Item_default_value : public Item_field
{
bool vcol_assignment_ok;
+ bool m_associated= false;
+
void calculate();
public:
Item *arg= nullptr;
@@ -6761,6 +6800,15 @@ public:
override;
Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src,
const Tmp_field_param *param) override;
+
+ /**
+ See comments on @see Item::associate_with_target_field for method
+ description
+ */
+ bool associate_with_target_field(THD *thd, Item_field *field) override;
+
+private:
+ bool tie_field(THD *thd);
};
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index c1654bfd..9d76c9e4 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1404,7 +1404,13 @@ bool Item_in_optimizer::fix_left(THD *thd)
eval_not_null_tables(NULL);
with_flags|= (args[0]->with_flags |
(args[1]->with_flags & item_with_t::SP_VAR));
- if ((const_item_cache= args[0]->const_item()))
+
+ /*
+ If left expression is a constant, cache its value.
+ But don't do that if that involves computing a subquery, as we are in a
+ prepare-phase rewrite.
+ */
+ if ((const_item_cache= args[0]->const_item()) && !args[0]->with_subquery())
{
cache->store(args[0]);
cache->cache_value();
@@ -6136,8 +6142,8 @@ bool Regexp_processor_pcre::compile(String *pattern, bool send_error)
if (!stringcmp(pattern, &m_prev_pattern))
return false;
cleanup();
- m_prev_pattern.copy(*pattern);
}
+ m_prev_pattern.copy(*pattern);
if (!(pattern= convert_if_needed(pattern, &pattern_converter)))
return true;
@@ -6283,7 +6289,17 @@ bool Regexp_processor_pcre::exec(Item *item, int offset,
}
-void Regexp_processor_pcre::fix_owner(Item_func *owner,
+/*
+ This method determines the owner's maybe_null flag.
+ Generally, the result is NULL-able. However, in case
+ of a constant pattern and a NOT NULL subject, the
+ result can also be NOT NULL.
+ @return true - in case if the constant regex compilation failed
+ (e.g. due to a wrong regex syntax in the pattern).
+ The compilation error message is put to the DA in this case.
+ false - otherwise.
+*/
+bool Regexp_processor_pcre::fix_owner(Item_func *owner,
Item *subject_arg,
Item *pattern_arg)
{
@@ -6291,16 +6307,30 @@ void Regexp_processor_pcre::fix_owner(Item_func *owner,
pattern_arg->const_item() &&
!pattern_arg->is_expensive())
{
- if (compile(pattern_arg, true))
+ if (compile(pattern_arg, true/* raise errors to DA, e.g. on bad syntax */))
{
owner->set_maybe_null(); // Will always return NULL
- return;
+ if (pattern_arg->null_value)
+ {
+ /*
+ The pattern evaluated to NULL. Regex compilation did not happen.
+ No errors were put to DA. Continue with maybe_null==true.
+ The function will return NULL per row.
+ */
+ return false;
+ }
+ /*
+ A syntax error in the pattern, an error was raised to the DA.
+ Let's abort the query. The caller will send the error to the client.
+ */
+ return true;
}
set_const(true);
owner->base_flags|= subject_arg->base_flags & item_base_t::MAYBE_NULL;
}
else
owner->set_maybe_null();
+ return false;
}
@@ -6312,8 +6342,7 @@ Item_func_regex::fix_length_and_dec(THD *thd)
return TRUE;
re.init(cmp_collation.collation, 0);
- re.fix_owner(this, args[0], args[1]);
- return FALSE;
+ return re.fix_owner(this, args[0], args[1]);
}
@@ -6337,9 +6366,8 @@ Item_func_regexp_instr::fix_length_and_dec(THD *thd)
return TRUE;
re.init(cmp_collation.collation, 0);
- re.fix_owner(this, args[0], args[1]);
max_length= MY_INT32_NUM_DECIMAL_DIGITS; // See also Item_func_locate
- return FALSE;
+ return re.fix_owner(this, args[0], args[1]);
}
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 3d5710cd..59cc5c5e 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -3048,7 +3048,7 @@ public:
{}
int default_regex_flags();
void init(CHARSET_INFO *data_charset, int extra_flags);
- void fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg);
+ bool fix_owner(Item_func *owner, Item *subject_arg, Item *pattern_arg);
bool compile(String *pattern, bool send_error);
bool compile(Item *item, bool send_error);
bool recompile(Item *item)
@@ -3516,13 +3516,11 @@ template <template<class> class LI, typename T> class Item_equal_iterator
{
protected:
Item_equal *item_equal;
- Item *curr_item;
+ Item *curr_item= nullptr;
public:
Item_equal_iterator(Item_equal &item_eq)
- :LI<T> (item_eq.equal_items)
+ :LI<T> (item_eq.equal_items), item_equal(&item_eq)
{
- curr_item= NULL;
- item_equal= &item_eq;
if (item_eq.with_const)
{
LI<T> *list_it= this;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index dd056ac4..9743c9a2 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -72,6 +72,9 @@ bool check_reserved_words(const LEX_CSTRING *name)
return FALSE;
}
+void pause_execution(THD *thd, double timeout);
+static int do_pause(THD *thd, Interruptible_wait *timed_cond,
+ mysql_cond_t *cond, double timeout);
/**
Test if the sum of arguments overflows the ulonglong range.
@@ -1917,6 +1920,18 @@ void Item_func_abs::fix_length_and_dec_int()
set_handler(type_handler_long_or_longlong());
}
+void Item_func_abs::fix_length_and_dec_sint_ge0()
+{
+ /*
+ We're converting slong_ge0 to slong/slonglong.
+ Add one character for the sign into max_length.
+ */
+ max_length= args[0]->decimal_precision() + 1/*sign*/;
+ DBUG_ASSERT(!args[0]->unsigned_flag);
+ unsigned_flag= false;
+ set_handler(type_handler_long_or_longlong());
+}
+
void Item_func_abs::fix_length_and_dec_double()
{
@@ -2594,6 +2609,22 @@ void Item_func_round::fix_arg_int(const Type_handler *preferred,
}
+void Item_func_round::fix_arg_slong_ge0()
+{
+ DBUG_ASSERT(!args[0]->unsigned_flag);
+ DBUG_ASSERT(args[0]->decimals == 0);
+ Type_std_attributes::set(args[0]);
+ /*
+ We're converting the data type from slong_ge0 to slong/slonglong.
+ Add one character for the sign,
+ to change max_length notation from "max_length digits" to
+ "max_length-1 digits and the sign".
+ */
+ max_length+= 1/*sign*/ + test_if_length_can_increase();
+ set_handler(type_handler_long_or_longlong());
+}
+
+
void Item_func_round::fix_arg_hex_hybrid()
{
DBUG_ASSERT(args[0]->decimals == 0);
@@ -2610,12 +2641,12 @@ void Item_func_round::fix_arg_hex_hybrid()
}
-double my_double_round(double value, longlong dec, bool dec_unsigned,
+double my_double_round(double value, longlong dec_value, bool dec_unsigned,
bool truncate)
{
double tmp;
- bool dec_negative= (dec < 0) && !dec_unsigned;
- ulonglong abs_dec= dec_negative ? -dec : dec;
+ const Longlong_hybrid dec(dec_value, dec_unsigned);
+ const ulonglong abs_dec= dec.abs();
/*
tmp2 is here to avoid return the value with 80 bit precision
This will fix that the test round(0.1,1) = round(0.1,1) is true
@@ -2630,22 +2661,24 @@ double my_double_round(double value, longlong dec, bool dec_unsigned,
volatile double value_div_tmp= value / tmp;
volatile double value_mul_tmp= value * tmp;
- if (!dec_negative && std::isinf(tmp)) // "dec" is too large positive number
+ if (!dec.neg() && std::isinf(tmp)) // "dec" is a too large positive number
return value;
- if (dec_negative && std::isinf(tmp))
- tmp2= 0.0;
- else if (!dec_negative && std::isinf(value_mul_tmp))
+ if (dec.neg() && std::isinf(tmp)) // "dec" is a too small negative number
+ return 0.0;
+
+ // Handle "dec" with a reasonably small absolute value
+ if (!dec.neg() && std::isinf(value_mul_tmp))
tmp2= value;
else if (truncate)
{
if (value >= 0.0)
- tmp2= dec < 0 ? floor(value_div_tmp) * tmp : floor(value_mul_tmp) / tmp;
+ tmp2= dec.neg() ? floor(value_div_tmp) * tmp : floor(value_mul_tmp) / tmp;
else
- tmp2= dec < 0 ? ceil(value_div_tmp) * tmp : ceil(value_mul_tmp) / tmp;
+ tmp2= dec.neg() ? ceil(value_div_tmp) * tmp : ceil(value_mul_tmp) / tmp;
}
else
- tmp2=dec < 0 ? rint(value_div_tmp) * tmp : rint(value_mul_tmp) / tmp;
+ tmp2=dec.neg() ? rint(value_div_tmp) * tmp : rint(value_mul_tmp) / tmp;
return tmp2;
}
@@ -2994,7 +3027,7 @@ double Item_func_min_max::val_real_native()
value=tmp;
}
if ((null_value= args[i]->null_value))
- break;
+ return 0;
}
return value;
}
@@ -3015,7 +3048,7 @@ longlong Item_func_min_max::val_int_native()
value=tmp;
}
if ((null_value= args[i]->null_value))
- break;
+ return 0;
}
return value;
}
@@ -3540,6 +3573,7 @@ udf_handler::fix_fields(THD *thd, Item_func_or_sum *func,
initid.const_item=func->const_item_cache;
initid.decimals=func->decimals;
initid.ptr=0;
+ not_original=0;
for (uint i1= 0 ; i1 < arg_count ; i1++)
buffers[i1].set_thread_specific();
@@ -4583,32 +4617,7 @@ longlong Item_func_sleep::val_int()
if (timeout < 0.00001)
return 0;
- timed_cond.set_timeout((ulonglong) (timeout * 1000000000.0));
-
- mysql_cond_init(key_item_func_sleep_cond, &cond, NULL);
- mysql_mutex_lock(&LOCK_item_func_sleep);
-
- THD_STAGE_INFO(thd, stage_user_sleep);
- thd->mysys_var->current_mutex= &LOCK_item_func_sleep;
- thd->mysys_var->current_cond= &cond;
-
- error= 0;
- thd_wait_begin(thd, THD_WAIT_SLEEP);
- while (!thd->killed)
- {
- error= timed_cond.wait(&cond, &LOCK_item_func_sleep);
- if (error == ETIMEDOUT || error == ETIME)
- break;
- error= 0;
- }
- thd_wait_end(thd);
- mysql_mutex_unlock(&LOCK_item_func_sleep);
- 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_cond_destroy(&cond);
+ error= do_pause(thd, &timed_cond, &cond, timeout);
#ifdef ENABLED_DEBUG_SYNC
DBUG_EXECUTE_IF("sleep_inject_query_done_debug_sync", {
@@ -4793,7 +4802,9 @@ Item_func_set_user_var::fix_length_and_dec(THD *thd)
if (args[0]->collation.derivation == DERIVATION_NUMERIC)
{
collation.set(DERIVATION_NUMERIC);
- fix_length_and_charset(args[0]->max_char_length(), &my_charset_numeric);
+ uint sign_length= args[0]->type_handler() == &type_handler_slong_ge0 ? 1: 0;
+ fix_length_and_charset(args[0]->max_char_length() + sign_length,
+ &my_charset_numeric);
}
else
{
@@ -7327,3 +7338,43 @@ void fix_rownum_pointers(THD *thd, SELECT_LEX *select_lex, ha_rows *ptr)
((Item_func_rownum*) item)->store_pointer_to_row_counter(ptr);
}
}
+
+static int do_pause(THD *thd, Interruptible_wait *timed_cond, mysql_cond_t *cond, double timeout)
+{
+ int error= 0;
+ timed_cond->set_timeout((ulonglong) (timeout * 1000000000.0));
+
+ mysql_cond_init(key_item_func_sleep_cond, cond, NULL);
+ mysql_mutex_lock(&LOCK_item_func_sleep);
+
+ THD_STAGE_INFO(thd, stage_user_sleep);
+ thd->mysys_var->current_mutex= &LOCK_item_func_sleep;
+ thd->mysys_var->current_cond= cond;
+
+ thd_wait_begin(thd, THD_WAIT_SLEEP);
+ while (!thd->killed)
+ {
+ error= timed_cond->wait(cond, &LOCK_item_func_sleep);
+ if (error == ETIMEDOUT || error == ETIME)
+ break;
+ error= 0;
+ }
+ thd_wait_end(thd);
+ mysql_mutex_unlock(&LOCK_item_func_sleep);
+ 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_cond_destroy(cond);
+
+ return error;
+}
+
+void pause_execution(THD *thd, double timeout)
+{
+ Interruptible_wait timed_cond(thd);
+ mysql_cond_t cond;
+
+ do_pause(thd, &timed_cond, &cond, timeout);
+}
diff --git a/sql/item_func.h b/sql/item_func.h
index 1f185eff..749c8fc4 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -89,7 +89,7 @@ public:
static void wrong_param_count_error(const LEX_CSTRING &schema_name,
const LEX_CSTRING &func_name);
- table_map not_null_tables_cache;
+ table_map not_null_tables_cache= 0;
enum Functype { UNKNOWN_FUNC,EQ_FUNC,EQUAL_FUNC,NE_FUNC,LT_FUNC,LE_FUNC,
GE_FUNC,GT_FUNC,FT_FUNC,
@@ -1263,6 +1263,24 @@ public:
};
+class Item_long_ge0_func: public Item_int_func
+{
+public:
+ Item_long_ge0_func(THD *thd): Item_int_func(thd) { }
+ Item_long_ge0_func(THD *thd, Item *a): Item_int_func(thd, a) {}
+ Item_long_ge0_func(THD *thd, Item *a, Item *b): Item_int_func(thd, a, b) {}
+ Item_long_ge0_func(THD *thd, Item *a, Item *b, Item *c): Item_int_func(thd, a, b, c) {}
+ Item_long_ge0_func(THD *thd, List<Item> &list): Item_int_func(thd, list) { }
+ Item_long_ge0_func(THD *thd, Item_long_ge0_func *item) :Item_int_func(thd, item) {}
+ const Type_handler *type_handler() const override
+ {
+ DBUG_ASSERT(!unsigned_flag);
+ return &type_handler_slong_ge0;
+ }
+ bool fix_length_and_dec(THD *) override { max_length= 10; return FALSE; }
+};
+
+
class Item_func_hash: public Item_int_func
{
public:
@@ -1407,6 +1425,13 @@ public:
{
fix_char_length(MAX_BIGINT_WIDTH);
}
+ void fix_length_and_dec_sint_ge0()
+ {
+ uint32 digits= args[0]->decimal_precision();
+ DBUG_ASSERT(digits > 0);
+ DBUG_ASSERT(digits <= MY_INT64_NUM_DECIMAL_DIGITS);
+ fix_char_length(digits + (unsigned_flag ? 0 : 1/*sign*/));
+ }
void fix_length_and_dec_generic()
{
uint32 char_length= MY_MIN(args[0]->max_char_length(),
@@ -1823,6 +1848,7 @@ public:
return name;
}
void fix_length_and_dec_int();
+ void fix_length_and_dec_sint_ge0();
void fix_length_and_dec_double();
void fix_length_and_dec_decimal();
bool fix_length_and_dec(THD *thd) override;
@@ -2152,6 +2178,7 @@ public:
void fix_arg_int(const Type_handler *preferred,
const Type_std_attributes *preferred_attributes,
bool use_decimal_on_length_increase);
+ void fix_arg_slong_ge0();
void fix_arg_hex_hybrid();
void fix_arg_double();
void fix_arg_time();
@@ -4285,6 +4312,7 @@ public:
{ return get_item_copy<Item_func_setval>(thd, this); }
};
+class Interruptible_wait;
Item *get_system_var(THD *thd, enum_var_type var_type,
const LEX_CSTRING *name, const LEX_CSTRING *component);
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc
index 97d7b89f..87197371 100644
--- a/sql/item_jsonfunc.cc
+++ b/sql/item_jsonfunc.cc
@@ -20,6 +20,17 @@
#include "item.h"
#include "sql_parse.h" // For check_stack_overrun
+#ifndef DBUG_OFF
+static int dbug_json_check_min_stack_requirement()
+{
+ my_error(ER_STACK_OVERRUN_NEED_MORE, MYF(ME_FATAL),
+ my_thread_stack_size, my_thread_stack_size, STACK_MIN_SIZE);
+ return 1;
+}
+#endif
+
+extern void pause_execution(THD *thd, double timeout);
+
/*
Allocating memory and *also* using it (reading and
writing from it) because some build instructions cause
@@ -28,12 +39,12 @@
correctly and causes json_debug_nonembedded to fail
( --error ER_STACK_OVERRUN_NEED_MORE does not occur).
*/
-#define ALLOCATE_MEM_ON_STACK(A) do \
- { \
- uchar *array= (uchar*)alloca(A); \
- bzero(array, A); \
- my_checksum(0, array, A); \
- } while(0)
+
+#define JSON_DO_PAUSE_EXECUTION(A, B) do \
+ { \
+ DBUG_EXECUTE_IF("json_pause_execution", \
+ { pause_execution(A, B); }); \
+ } while(0)
/*
Compare ASCII string against the string with the specified
@@ -152,11 +163,8 @@ int json_path_parts_compare(
const json_path_step_t *temp_b= b;
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
- ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
- });
+ return dbug_json_check_min_stack_requirement(););
+
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -845,7 +853,7 @@ bool Item_func_json_unquote::fix_length_and_dec(THD *thd)
{
collation.set(&my_charset_utf8mb3_general_ci,
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII);
- max_length= args[0]->max_length;
+ max_length= args[0]->max_char_length() * collation.collation->mbmaxlen;
set_maybe_null();
return FALSE;
}
@@ -998,16 +1006,17 @@ bool Item_func_json_extract::fix_length_and_dec(THD *thd)
}
-static bool path_exact(const json_path_with_flags *paths_list, int n_paths,
+static int path_exact(const json_path_with_flags *paths_list, int n_paths,
const json_path_t *p, json_value_types vt,
const int *array_size_counter)
{
+ int count_path= 0;
for (; n_paths > 0; n_paths--, paths_list++)
{
if (json_path_compare(&paths_list->p, p, vt, array_size_counter) == 0)
- return TRUE;
+ count_path++;
}
- return FALSE;
+ return count_path;
}
@@ -1032,7 +1041,7 @@ String *Item_func_json_extract::read_json(String *str,
json_engine_t je, sav_je;
json_path_t p;
const uchar *value;
- int not_first_value= 0;
+ int not_first_value= 0, count_path= 0;
uint n_arg;
size_t v_len;
int possible_multiple_values;
@@ -1091,7 +1100,8 @@ String *Item_func_json_extract::read_json(String *str,
array_size_counter + (p.last_step - p.steps)))
goto error;
- if (!path_exact(paths, arg_count-1, &p, je.value_type, array_size_counter))
+ if (!(count_path= path_exact(paths, arg_count-1, &p, je.value_type,
+ array_size_counter)))
continue;
value= je.value_begin;
@@ -1121,9 +1131,12 @@ String *Item_func_json_extract::read_json(String *str,
je= sav_je;
}
- if ((not_first_value && str->append(", ", 2)) ||
- str->append((const char *) value, v_len))
- goto error; /* Out of memory. */
+ for (int count= 0; count < count_path; count++)
+ {
+ if (str->append((const char *) value, v_len) ||
+ str->append(", ", 2))
+ goto error; /* Out of memory. */
+ }
not_first_value= 1;
@@ -1144,6 +1157,11 @@ String *Item_func_json_extract::read_json(String *str,
goto return_null;
}
+ if (str->length()>2)
+ {
+ str->chop();
+ str->chop();
+ }
if (possible_multiple_values && str->append(']'))
goto error; /* Out of memory. */
@@ -1306,11 +1324,7 @@ static int check_contains(json_engine_t *js, json_engine_t *value)
json_engine_t loc_js;
bool set_js;
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
- ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
- });
+ return dbug_json_check_min_stack_requirement(););
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -1912,7 +1926,23 @@ bool Item_func_json_array::fix_length_and_dec(THD *thd)
return TRUE;
for (n_arg=0 ; n_arg < arg_count ; n_arg++)
- char_length+= static_cast<ulonglong>(args[n_arg]->max_char_length()) + 4;
+ {
+ ulonglong arg_length;
+ Item *arg= args[n_arg];
+
+ if (arg->result_type() == STRING_RESULT &&
+ !Type_handler_json_common::is_json_type_handler(arg->type_handler()))
+ arg_length= arg->max_char_length() * 2; /*escaping possible */
+ else if (arg->type_handler()->is_bool_type())
+ arg_length= 5;
+ else
+ arg_length= arg->max_char_length();
+
+ if (arg_length < 4)
+ arg_length= 4; /* can be 'null' */
+
+ char_length+= arg_length + 4;
+ }
fix_char_length_ulonglong(char_length);
tmp_val.set_charset(collation.collation);
@@ -1962,6 +1992,8 @@ err_return:
bool Item_func_json_array_append::fix_length_and_dec(THD *thd)
{
+ JSON_DO_PAUSE_EXECUTION(thd, 0.0002);
+
uint n_arg;
ulonglong char_length;
@@ -2120,6 +2152,8 @@ String *Item_func_json_array_insert::val_str(String *str)
uint n_arg, n_path;
THD *thd= current_thd;
+ JSON_DO_PAUSE_EXECUTION(thd, 0.0002);
+
DBUG_ASSERT(fixed());
if ((null_value= args[0]->null_value))
@@ -2309,13 +2343,8 @@ err_return:
static int do_merge(String *str, json_engine_t *je1, json_engine_t *je2)
{
-
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
- ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
- });
+ return dbug_json_check_min_stack_requirement(););
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -2530,6 +2559,8 @@ String *Item_func_json_merge::val_str(String *str)
THD *thd= current_thd;
LINT_INIT(js2);
+ JSON_DO_PAUSE_EXECUTION(thd, 0.0002);
+
if (args[0]->null_value)
goto null_return;
@@ -2654,11 +2685,7 @@ static int do_merge_patch(String *str, json_engine_t *je1, json_engine_t *je2,
bool *empty_result)
{
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
- ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
- });
+ return dbug_json_check_min_stack_requirement(););
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -2843,6 +2870,8 @@ String *Item_func_json_merge_patch::val_str(String *str)
bool empty_result, merge_to_null;
THD *thd= current_thd;
+ JSON_DO_PAUSE_EXECUTION(thd, 0.0002);
+
/* To report errors properly if some JSON is invalid. */
je1.s.error= je2.s.error= 0;
merge_to_null= args[0]->null_value;
@@ -3120,6 +3149,12 @@ String *Item_func_json_type::val_str(String *str)
break;
}
+ /* ensure the json is at least valid. */
+ while(json_scan_next(&je) == 0) {}
+
+ if (je.s.error)
+ goto error;
+
str->set(type, strlen(type), &my_charset_utf8mb3_general_ci);
return str;
@@ -3135,14 +3170,20 @@ bool Item_func_json_insert::fix_length_and_dec(THD *thd)
uint n_arg;
ulonglong char_length;
+ JSON_DO_PAUSE_EXECUTION(thd, 0.0002);
+
collation.set(args[0]->collation);
char_length= args[0]->max_char_length();
for (n_arg= 1; n_arg < arg_count; n_arg+= 2)
{
paths[n_arg/2].set_constant_flag(args[n_arg]->const_item());
- char_length+=
- static_cast<ulonglong>(args[n_arg+1]->max_char_length()) + 4;
+ /*
+ In the resulting JSON we can insert the property
+ name from the path, and the value itself.
+ */
+ char_length+= args[n_arg/2]->max_char_length() + 6;
+ char_length+= args[n_arg/2+1]->max_char_length() + 4;
}
fix_char_length_ulonglong(char_length);
@@ -3425,6 +3466,8 @@ String *Item_func_json_remove::val_str(String *str)
DBUG_ASSERT(fixed());
+ JSON_DO_PAUSE_EXECUTION(thd, 0.0002);
+
if (args[0]->null_value)
goto null_return;
@@ -3476,6 +3519,7 @@ String *Item_func_json_remove::val_str(String *str)
{
if (je.s.error)
goto js_error;
+ continue;
}
if (json_read_value(&je))
@@ -3987,7 +4031,20 @@ bool Item_func_json_format::fix_length_and_dec(THD *thd)
{
decimals= 0;
collation.set(args[0]->collation);
- max_length= args[0]->max_length;
+ switch (fmt)
+ {
+ case COMPACT:
+ max_length= args[0]->max_length;
+ break;
+ case LOOSE:
+ max_length= args[0]->max_length * 2;
+ break;
+ case DETAILED:
+ max_length= MAX_BLOB_WIDTH;
+ break;
+ default:
+ DBUG_ASSERT(0);
+ };
set_maybe_null();
return FALSE;
}
@@ -4705,11 +4762,7 @@ int json_find_overlap_with_object(json_engine_t *js, json_engine_t *value,
int check_overlaps(json_engine_t *js, json_engine_t *value, bool compare_whole)
{
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
- ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
- });
+ return dbug_json_check_min_stack_requirement(););
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index ce094bec..19e011d5 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -748,7 +748,7 @@ bool Item_func_des_encrypt::fix_length_and_dec(THD *thd)
String *Item_func_des_encrypt::val_str(String *str)
{
DBUG_ASSERT(fixed());
-#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+#if defined(HAVE_des) && !defined(EMBEDDED_LIBRARY)
uint code= ER_WRONG_PARAMETERS_TO_PROCEDURE;
DES_cblock ivec;
struct st_des_keyblock keyblock;
@@ -837,8 +837,8 @@ error:
THD *thd= current_thd;
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_FEATURE_DISABLED, ER_THD(thd, ER_FEATURE_DISABLED),
- "des_encrypt", "--with-ssl");
-#endif /* defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) */
+ "des_encrypt", "openssl des cipher (HAVE_des)");
+#endif /* defined(HAVE_des) && !defined(EMBEDDED_LIBRARY) */
null_value=1;
return 0;
}
@@ -861,7 +861,7 @@ bool Item_func_des_decrypt::fix_length_and_dec(THD *thd)
String *Item_func_des_decrypt::val_str(String *str)
{
DBUG_ASSERT(fixed());
-#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
+#if defined(HAVE_des) && !defined(EMBEDDED_LIBRARY)
uint code= ER_WRONG_PARAMETERS_TO_PROCEDURE;
DES_cblock ivec;
struct st_des_keyblock keyblock;
@@ -936,9 +936,9 @@ wrong_key:
THD *thd= current_thd;
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_FEATURE_DISABLED, ER_THD(thd, ER_FEATURE_DISABLED),
- "des_decrypt", "--with-ssl");
+ "des_decrypt", "openssl des cipher (HAVE_des)");
}
-#endif /* defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) */
+#endif /* defined(HAVE_des) && !defined(EMBEDDED_LIBRARY) */
null_value=1;
return 0;
}
@@ -1499,6 +1499,7 @@ String *Item_func_sformat::val_str(String *res)
bool Item_func_random_bytes::fix_length_and_dec(THD *thd)
{
+ set_maybe_null();
used_tables_cache|= RAND_TABLE_BIT;
if (args[0]->can_eval_in_optimize())
{
@@ -1640,15 +1641,16 @@ String *Item_func_regexp_replace::val_str_internal(String *str,
LEX_CSTRING src, rpl;
size_t startoffset= 0;
- if ((null_value=
- (!(source= args[0]->val_str(&tmp0)) ||
- !(replace= args[2]->val_str_null_to_empty(&tmp2, null_to_empty)) ||
- re.recompile(args[1]))))
- return (String *) 0;
-
+ source= args[0]->val_str(&tmp0);
+ if (!source)
+ goto err;
+ replace= args[2]->val_str_null_to_empty(&tmp2, null_to_empty);
+ if (!replace || re.recompile(args[1]))
+ goto err;
if (!(source= re.convert_if_needed(source, &re.subject_converter)) ||
!(replace= re.convert_if_needed(replace, &re.replace_converter)))
goto err;
+ null_value= false;
source->get_value(&src);
replace->get_value(&rpl);
@@ -1694,7 +1696,7 @@ String *Item_func_regexp_replace::val_str_internal(String *str,
err:
null_value= true;
- return (String *) 0;
+ return nullptr;
}
@@ -1830,13 +1832,21 @@ bool Item_func_insert::fix_length_and_dec(THD *thd)
String *Item_str_conv::val_str(String *str)
{
DBUG_ASSERT(fixed());
- String *res;
- size_t alloced_length, len;
+ String *res= args[0]->val_str(&tmp_value);
- if ((null_value= (!(res= args[0]->val_str(&tmp_value)) ||
- str->alloc((alloced_length= res->length() * multiply)))))
- return 0;
+ if (!res)
+ {
+ err:
+ null_value= true;
+ return nullptr;
+ }
+
+ size_t alloced_length= res->length() * multiply, len;
+
+ if (str->alloc((alloced_length)))
+ goto err;
+ null_value= false;
len= converter(collation.collation, (char*) res->ptr(), res->length(),
(char*) str->ptr(), alloced_length);
DBUG_ASSERT(len <= alloced_length);
@@ -3877,7 +3887,9 @@ bool Item_func_set_collation::fix_length_and_dec(THD *thd)
return true;
collation.set(cl.collation().charset_info(), DERIVATION_EXPLICIT,
args[0]->collation.repertoire);
- max_length= args[0]->max_length;
+ ulonglong max_char_length= (ulonglong) args[0]->max_char_length();
+ fix_char_length_ulonglong(max_char_length * collation.collation->mbmaxlen);
+
return FALSE;
}
@@ -4961,6 +4973,11 @@ void Item_func_dyncol_create::print_arguments(String *str,
{
str->append(STRING_WITH_LEN(" charset "));
str->append(defs[i].cs->cs_name);
+ if (Charset(defs[i].cs).can_have_collate_clause())
+ {
+ str->append(STRING_WITH_LEN(" collate "));
+ str->append(defs[i].cs->coll_name);
+ }
str->append(' ');
}
break;
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 7d1a72b9..0a37a2ec 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -568,6 +568,9 @@ void Item_subselect::recalc_used_tables(st_select_lex *new_parent,
This measure is used instead of JOIN::read_time, because it is considered
to be much more reliable than the cost estimate.
+ Note: the logic in this function must agree with
+ JOIN::init_join_cache_and_keyread().
+
@return true if the subquery is expensive
@return false otherwise
*/
@@ -6716,9 +6719,10 @@ exists_complementing_null_row(MY_BITMAP *keys_to_complement)
return FALSE;
}
- return bitmap_exists_intersection((const MY_BITMAP**) null_bitmaps,
+ return bitmap_exists_intersection(null_bitmaps,
count_null_keys,
- (uint)highest_min_row, (uint)lowest_max_row);
+ (uint)highest_min_row,
+ (uint)lowest_max_row);
}
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index bcaf229d..275451ab 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1223,6 +1223,21 @@ bool Item_sum_hybrid::fix_length_and_dec_numeric(const Type_handler *handler)
}
+bool Item_sum_hybrid::fix_length_and_dec_sint_ge0()
+{
+ // We don't have Item_field's of "ge0" type handlers.
+ DBUG_ASSERT(args[0]->real_item()->type() != FIELD_ITEM);
+ Type_std_attributes::set(args[0]);
+ /*
+ We're converting from e.g. slong_ge0 to slonglong
+ and need to add one extra character for the sign.
+ */
+ max_length++;
+ set_handler(&type_handler_slonglong);
+ return false;
+}
+
+
/**
MAX(str_field) converts ENUM/SET to CHAR, and preserve all other types
for Fields.
@@ -4061,6 +4076,7 @@ void Item_func_group_concat::cleanup()
unique_filter= NULL;
}
}
+ row_count= 0;
DBUG_ASSERT(tree == 0);
}
/*
@@ -4586,7 +4602,7 @@ void Item_func_group_concat::print(String *str, enum_query_type query_type)
if (sum_func() == GROUP_CONCAT_FUNC)
{
str->append(STRING_WITH_LEN(" separator \'"));
- str->append_for_single_quote(separator->ptr(), separator->length());
+ str->append_for_single_quote_opt_convert(*separator);
str->append(STRING_WITH_LEN("\'"));
}
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 73087340..bba93f6f 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -599,6 +599,17 @@ public:
bool is_window_func_sum_expr() { return window_func_sum_expr_flag; }
virtual void setup_caches(THD *thd) {};
virtual void set_partition_row_count(ulonglong count) { DBUG_ASSERT(0); }
+
+ /*
+ While most Item_sum descendants employ standard aggregators configured
+ through Item_sum::set_aggregator() call, there are exceptions like
+ Item_func_group_concat, which implements its own custom aggregators for
+ deduplication values.
+ This function distinguishes between the use of standard and custom
+ aggregators by the object
+ */
+ virtual bool uses_non_standard_aggregator_for_distinct() const
+ { return false; }
};
@@ -1127,6 +1138,7 @@ public:
{ return Type_handler_hybrid_field_type::type_handler(); }
bool fix_length_and_dec_generic();
bool fix_length_and_dec_numeric(const Type_handler *h);
+ bool fix_length_and_dec_sint_ge0();
bool fix_length_and_dec_string();
};
@@ -2015,6 +2027,9 @@ protected:
{ return f->val_str(tmp, key + offset); }
virtual void cut_max_length(String *result,
uint old_length, uint max_length) const;
+ bool uses_non_standard_aggregator_for_distinct() const override
+ { return distinct; }
+
public:
// Methods used by ColumnStore
bool get_distinct() const { return distinct; }
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index db38e44d..0ac75f90 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2942,7 +2942,7 @@ bool Item_extract::fix_length_and_dec(THD *thd)
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_QUARTER: set_date_length(1); 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_day_length(daylen); break; // DD
@@ -3507,6 +3507,24 @@ bool Item_func_timediff::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzy
if (l_time1.neg != l_time2.neg)
l_sign= -l_sign;
+ if (l_time1.time_type == MYSQL_TIMESTAMP_TIME)
+ {
+ /*
+ In case of TIME-alike arguments:
+ TIMEDIFF('38:59:59', '839:00:00')
+ let's truncate extra fractional seconds that might appear if the argument
+ values were out of the supported TIME range. For example, args[n]->get_time()
+ for the string literal '839:00:00' returns TIME'838:59:59.999999'.
+ The fractional part must be truncated according to this->decimals,
+ to avoid returning more fractional seconds than it was detected
+ during this->fix_length_and_dec().
+ Note, the thd rounding mode should not be important here, as we're removing
+ redundant digits from the maximum possible value: '838:59:59.999999'.
+ */
+ my_time_trunc(&l_time1, decimals);
+ my_time_trunc(&l_time2, decimals);
+ }
+
if (calc_time_diff(&l_time1, &l_time2, l_sign, &l_time3, fuzzydate))
return (null_value= 1);
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 083eb7ba..5485f6c1 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -30,23 +30,23 @@ bool get_interval_value(THD *thd, Item *args,
interval_type int_type, INTERVAL *interval);
-class Item_long_func_date_field: public Item_long_func
+class Item_long_func_date_field: public Item_long_ge0_func
{
bool check_arguments() const override
{ return args[0]->check_type_can_return_date(func_name_cstring()); }
public:
Item_long_func_date_field(THD *thd, Item *a)
- :Item_long_func(thd, a) { }
+ :Item_long_ge0_func(thd, a) { }
};
-class Item_long_func_time_field: public Item_long_func
+class Item_long_func_time_field: public Item_long_ge0_func
{
bool check_arguments() const override
{ return args[0]->check_type_can_return_time(func_name_cstring()); }
public:
Item_long_func_time_field(THD *thd, Item *a)
- :Item_long_func(thd, a) { }
+ :Item_long_ge0_func(thd, a) { }
};
@@ -186,10 +186,10 @@ public:
};
-class Item_func_month :public Item_long_func
+class Item_func_month :public Item_long_ge0_func
{
public:
- Item_func_month(THD *thd, Item *a): Item_long_func(thd, a)
+ Item_func_month(THD *thd, Item *a): Item_long_ge0_func(thd, a)
{ }
longlong val_int() override;
LEX_CSTRING func_name_cstring() const override
@@ -381,7 +381,7 @@ public:
};
-class Item_func_week :public Item_long_func
+class Item_func_week :public Item_long_ge0_func
{
bool check_arguments() const override
{
@@ -389,8 +389,8 @@ class Item_func_week :public Item_long_func
(arg_count > 1 && args[1]->check_type_can_return_int(func_name_cstring()));
}
public:
- Item_func_week(THD *thd, Item *a): Item_long_func(thd, a) {}
- Item_func_week(THD *thd, Item *a, Item *b): Item_long_func(thd, a, b) {}
+ Item_func_week(THD *thd, Item *a): Item_long_ge0_func(thd, a) {}
+ Item_func_week(THD *thd, Item *a, Item *b): Item_long_ge0_func(thd, a, b) {}
longlong val_int() override;
LEX_CSTRING func_name_cstring() const override
{
@@ -1166,12 +1166,17 @@ class Item_extract :public Item_int_func,
void set_date_length(uint32 length)
{
/*
- Although DATE components (e.g. YEAR, YEAR_MONTH, QUARTER, MONTH, WEEK)
- cannot have a sign, we should probably still add +1,
- because all around the code we assume that max_length is sign inclusive.
- Another options is to set unsigned_flag to "true".
+ DATE components (e.g. YEAR, YEAR_MONTH, QUARTER, MONTH, WEEK)
+ return non-negative values but historically EXTRACT for date
+ components always returned the signed int data type.
+ So do equivalent functions YEAR(), QUARTER(), MONTH(), WEEK().
+ Let's set the data type to "signed int, but not negative",
+ so "this" produces better data types in VARCHAR and DECIMAL context
+ by using the fact that all of the max_length characters are spent
+ for digits (non of them are spent for the sign).
*/
- set_handler(handler_by_length(max_length= length, 10)); // QQ: see above
+ set_handler(&type_handler_slong_ge0);
+ fix_char_length(length);
m_date_mode= date_mode_t(0);
}
void set_day_length(uint32 length)
diff --git a/sql/lex.h b/sql/lex.h
index b1f5718d..ad37c39b 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -385,6 +385,7 @@ SYMBOL symbols[] = {
{ "MASTER_SSL_VERIFY_SERVER_CERT", SYM(MASTER_SSL_VERIFY_SERVER_CERT_SYM)},
{ "MASTER_USER", SYM(MASTER_USER_SYM)},
{ "MASTER_USE_GTID", SYM(MASTER_USE_GTID_SYM)},
+ { "MASTER_DEMOTE_TO_REPLICA", SYM(MASTER_DEMOTE_TO_SLAVE_SYM)},
{ "MASTER_DEMOTE_TO_SLAVE", SYM(MASTER_DEMOTE_TO_SLAVE_SYM)},
{ "MASTER_HEARTBEAT_PERIOD", SYM(MASTER_HEARTBEAT_PERIOD_SYM)},
{ "MATCH", SYM(MATCH)},
diff --git a/sql/log.cc b/sql/log.cc
index 4b9e5ebc..0c3475d9 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -7024,8 +7024,8 @@ err:
mysql_mutex_assert_not_owner(&LOCK_after_binlog_sync);
mysql_mutex_assert_not_owner(&LOCK_commit_ordered);
#ifdef HAVE_REPLICATION
- if (repl_semisync_master.report_binlog_update(thd, log_file_name,
- file->pos_in_file))
+ if (repl_semisync_master.report_binlog_update(
+ thd, thd, log_file_name, file->pos_in_file))
{
sql_print_error("Failed to run 'after_flush' hooks");
error= 1;
@@ -8183,9 +8183,9 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
if (entry->cache_mngr->using_xa)
{
- DEBUG_SYNC(entry->thd, "commit_before_prepare_ordered");
+ DEBUG_SYNC(orig_entry->thd, "commit_before_prepare_ordered");
run_prepare_ordered(entry->thd, entry->all);
- DEBUG_SYNC(entry->thd, "commit_after_prepare_ordered");
+ DEBUG_SYNC(orig_entry->thd, "commit_after_prepare_ordered");
}
if (cur)
@@ -8619,9 +8619,19 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
for (current= queue; current != NULL; current= current->next)
{
#ifdef HAVE_REPLICATION
+ /*
+ The thread which will await the ACK from the replica can change
+ depending on the wait-point. If AFTER_COMMIT, then the user thread
+ will perform the wait. If AFTER_SYNC, the binlog group commit leader
+ will perform the wait on behalf of the user thread.
+ */
+ THD *waiter_thd= (repl_semisync_master.wait_point() ==
+ SEMI_SYNC_MASTER_WAIT_POINT_AFTER_STORAGE_COMMIT)
+ ? current->thd
+ : leader->thd;
if (likely(!current->error) &&
unlikely(repl_semisync_master.
- report_binlog_update(current->thd,
+ report_binlog_update(current->thd, waiter_thd,
current->cache_mngr->
last_commit_pos_file,
current->cache_mngr->
@@ -11172,7 +11182,7 @@ Recovery_context::Recovery_context() :
prev_event_pos(0),
last_gtid_standalone(false), last_gtid_valid(false), last_gtid_no2pc(false),
last_gtid_engines(0),
- do_truncate(repl_semisync_slave.get_slave_enabled()),
+ do_truncate(global_rpl_semi_sync_slave_enabled),
truncate_validated(false), truncate_reset_done(false),
truncate_set_in_1st(false), id_binlog(MAX_binlog_id),
checksum_alg(BINLOG_CHECKSUM_ALG_UNDEF), gtid_maybe_to_truncate(NULL)
diff --git a/sql/log.h b/sql/log.h
index ae813f75..bcccd3e4 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -426,6 +426,7 @@ struct wait_for_commit;
class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
{
+#ifdef HAVE_PSI_INTERFACE
/** The instrumentation key to use for @ LOCK_index. */
PSI_mutex_key m_key_LOCK_index;
/** The instrumentation key to use for @ COND_relay_log_updated */
@@ -440,6 +441,16 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
PSI_cond_key m_key_COND_queue_busy;
/** The instrumentation key to use for LOCK_binlog_end_pos. */
PSI_mutex_key m_key_LOCK_binlog_end_pos;
+#else
+ static constexpr PSI_mutex_key m_key_LOCK_index= 0;
+ static constexpr PSI_cond_key m_key_relay_log_update= 0;
+ static constexpr PSI_cond_key m_key_bin_log_update= 0;
+ static constexpr PSI_file_key m_key_file_log= 0, m_key_file_log_cache= 0;
+ static constexpr PSI_file_key m_key_file_log_index= 0;
+ static constexpr PSI_file_key m_key_file_log_index_cache= 0;
+ static constexpr PSI_cond_key m_key_COND_queue_busy= 0;
+ static constexpr PSI_mutex_key m_key_LOCK_binlog_end_pos= 0;
+#endif
struct group_commit_entry
{
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 336b032f..09a11219 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2645,6 +2645,11 @@ Gtid_log_event::Gtid_log_event(const uchar *buf, uint event_len,
}
if (flags2 & (FL_PREPARED_XA | FL_COMPLETED_XA))
{
+ if (event_len < static_cast<uint>(buf - buf_0) + 6)
+ {
+ seq_no= 0;
+ return;
+ }
xid.formatID= uint4korr(buf);
buf+= 4;
@@ -2653,6 +2658,11 @@ Gtid_log_event::Gtid_log_event(const uchar *buf, uint event_len,
buf+= 2;
long data_length= xid.bqual_length + xid.gtrid_length;
+ if (event_len < static_cast<uint>(buf - buf_0) + data_length)
+ {
+ seq_no= 0;
+ return;
+ }
memcpy(xid.data, buf, data_length);
buf+= data_length;
}
@@ -2667,14 +2677,22 @@ Gtid_log_event::Gtid_log_event(const uchar *buf, uint event_len,
*/
if (flags_extra & FL_EXTRA_MULTI_ENGINE_E1)
{
- DBUG_ASSERT(static_cast<uint>(buf - buf_0) < event_len);
-
+ if (event_len < static_cast<uint>(buf - buf_0) + 1)
+ {
+ seq_no= 0;
+ return;
+ }
extra_engines= *buf++;
DBUG_ASSERT(extra_engines > 0);
}
if (flags_extra & (FL_COMMIT_ALTER_E1 | FL_ROLLBACK_ALTER_E1))
{
+ if (event_len < static_cast<uint>(buf - buf_0) + 8)
+ {
+ seq_no= 0;
+ return;
+ }
sa_seq_no= uint8korr(buf);
buf+= 8;
}
@@ -3422,21 +3440,16 @@ Rows_log_event::Rows_log_event(const uchar *buf, uint event_len,
/* if my_bitmap_init fails, caught in is_valid() */
if (likely(!my_bitmap_init(&m_cols,
- m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
- m_width)))
+ m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
+ m_width)))
{
DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
- memcpy(m_cols.bitmap, ptr_after_width, (m_width + 7) / 8);
- create_last_word_mask(&m_cols);
+ bitmap_import(&m_cols, ptr_after_width);
+ DBUG_DUMP("m_cols", (uchar*) ptr_after_width, no_bytes_in_export_map(&m_cols));
ptr_after_width+= (m_width + 7) / 8;
- DBUG_DUMP("m_cols", (uchar*) m_cols.bitmap, no_bytes_in_map(&m_cols));
}
else
- {
- // Needed because my_bitmap_init() does not set it to null on failure
- m_cols.bitmap= NULL;
DBUG_VOID_RETURN;
- }
m_cols_ai.bitmap= m_cols.bitmap; /* See explanation in is_valid() */
@@ -3446,22 +3459,17 @@ Rows_log_event::Rows_log_event(const uchar *buf, uint event_len,
/* if my_bitmap_init fails, caught in is_valid() */
if (likely(!my_bitmap_init(&m_cols_ai,
- m_width <= sizeof(m_bitbuf_ai)*8 ? m_bitbuf_ai : NULL,
- m_width)))
+ m_width <= sizeof(m_bitbuf_ai)*8 ? m_bitbuf_ai :
+ NULL,
+ m_width)))
{
DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
- memcpy(m_cols_ai.bitmap, ptr_after_width, (m_width + 7) / 8);
- create_last_word_mask(&m_cols_ai);
+ bitmap_import(&m_cols_ai, ptr_after_width);
+ DBUG_DUMP("m_cols_ai", ptr_after_width, no_bytes_in_export_map(&m_cols_ai));
ptr_after_width+= (m_width + 7) / 8;
- DBUG_DUMP("m_cols_ai", (uchar*) m_cols_ai.bitmap,
- no_bytes_in_map(&m_cols_ai));
}
else
- {
- // Needed because my_bitmap_init() does not set it to null on failure
- m_cols_ai.bitmap= 0;
DBUG_VOID_RETURN;
- }
}
const uchar* const ptr_rows_data= (const uchar*) ptr_after_width;
@@ -3524,8 +3532,6 @@ void Rows_log_event::uncompress_buf()
Rows_log_event::~Rows_log_event()
{
- if (m_cols.bitmap == m_bitbuf) // no my_malloc happened
- m_cols.bitmap= 0; // so no my_free in my_bitmap_free
my_bitmap_free(&m_cols); // To pair with my_bitmap_init().
my_free(m_rows_buf);
my_free(m_extra_row_data);
@@ -3539,9 +3545,10 @@ int Rows_log_event::get_data_size()
uchar *end= net_store_length(buf, m_width);
DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
- return (int)(6 + no_bytes_in_map(&m_cols) + (end - buf) +
- (general_type_code == UPDATE_ROWS_EVENT ? no_bytes_in_map(&m_cols_ai) : 0) +
- m_rows_cur - m_rows_buf););
+ return (int) (6 + no_bytes_in_export_map(&m_cols) + (end - buf) +
+ (general_type_code == UPDATE_ROWS_EVENT ?
+ no_bytes_in_export_map(&m_cols_ai) : 0) +
+ m_rows_cur - m_rows_buf););
int data_size= 0;
Log_event_type type= get_type_code();
bool is_v2_event= LOG_EVENT_IS_ROW_V2(type);
@@ -3556,11 +3563,11 @@ int Rows_log_event::get_data_size()
{
data_size= ROWS_HEADER_LEN_V1;
}
- data_size+= no_bytes_in_map(&m_cols);
+ data_size+= no_bytes_in_export_map(&m_cols);
data_size+= (uint) (end - buf);
if (general_type_code == UPDATE_ROWS_EVENT)
- data_size+= no_bytes_in_map(&m_cols_ai);
+ data_size+= no_bytes_in_export_map(&m_cols_ai);
data_size+= (uint) (m_rows_cur - m_rows_buf);
return data_size;
@@ -4091,12 +4098,7 @@ Delete_rows_compressed_log_event::Delete_rows_compressed_log_event(
Update_rows_log_event::~Update_rows_log_event()
{
- if (m_cols_ai.bitmap)
- {
- if (m_cols_ai.bitmap == m_bitbuf_ai) // no my_malloc happened
- m_cols_ai.bitmap= 0; // so no my_free in my_bitmap_free
- my_bitmap_free(&m_cols_ai); // To pair with my_bitmap_init().
- }
+ my_bitmap_free(&m_cols_ai); // To pair with my_bitmap_init().
}
diff --git a/sql/log_event.h b/sql/log_event.h
index f6101eb7..2d9b7ceb 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -3733,7 +3733,16 @@ public:
{
return GTID_HEADER_LEN + ((flags2 & FL_GROUP_COMMIT_ID) ? 2 : 0);
}
- bool is_valid() const { return seq_no != 0; }
+
+ bool is_valid() const
+ {
+ /*
+ seq_no is set to 0 if the structure of a serialized GTID event does not
+ align with that as indicated by flags and extra_flags.
+ */
+ return seq_no != 0;
+ }
+
#ifdef MYSQL_SERVER
bool write();
static int make_compatible_event(String *packet, bool *need_dummy_event,
@@ -5230,8 +5239,8 @@ protected:
ulong m_master_reclength; /* Length of record on master side */
/* Bit buffers in the same memory as the class */
- uint32 m_bitbuf[128/(sizeof(uint32)*8)];
- uint32 m_bitbuf_ai[128/(sizeof(uint32)*8)];
+ my_bitmap_map m_bitbuf[128/(sizeof(my_bitmap_map)*8)];
+ my_bitmap_map m_bitbuf_ai[128/(sizeof(my_bitmap_map)*8)];
uchar *m_rows_buf; /* The rows in packed format */
uchar *m_rows_cur; /* One-after the end of the data */
diff --git a/sql/log_event_client.cc b/sql/log_event_client.cc
index ddd62b08..d9f7d52a 100644
--- a/sql/log_event_client.cc
+++ b/sql/log_event_client.cc
@@ -3087,7 +3087,7 @@ bool Annotate_rows_log_event::print(FILE *file, PRINT_EVENT_INFO *pinfo)
{
char *pbeg; // beginning of the next line
char *pend; // end of the next line
- uint cnt= 0; // characters counter
+ char *qend= m_query_txt + m_query_len;
if (!pinfo->short_form)
{
@@ -3098,28 +3098,21 @@ bool Annotate_rows_log_event::print(FILE *file, PRINT_EVENT_INFO *pinfo)
else if (my_b_printf(&pinfo->head_cache, "# Annotate_rows:\n"))
goto err;
- for (pbeg= m_query_txt; ; pbeg= pend)
+ for (pbeg= m_query_txt; pbeg < qend; pbeg= pend)
{
// skip all \r's and \n's at the beginning of the next line
- for (;; pbeg++)
- {
- if (++cnt > m_query_len)
- return 0;
-
- if (*pbeg != '\r' && *pbeg != '\n')
- break;
- }
+ for (; pbeg < qend && (*pbeg == '\r' || *pbeg == '\n'); pbeg++)
+ ;
// find end of the next line
- for (pend= pbeg + 1;
- ++cnt <= m_query_len && *pend != '\r' && *pend != '\n';
- pend++)
+ for (pend= pbeg + 1; pend < qend && *pend != '\r' && *pend != '\n'; pend++)
;
// print next line
- if (my_b_write(&pinfo->head_cache, (const uchar*) "#Q> ", 4) ||
- my_b_write(&pinfo->head_cache, (const uchar*) pbeg, pend - pbeg) ||
- my_b_write(&pinfo->head_cache, (const uchar*) "\n", 1))
+ if (pbeg < qend &&
+ (my_b_write(&pinfo->head_cache, (const uchar*) "#Q> ", 4) ||
+ my_b_write(&pinfo->head_cache, (const uchar*) pbeg, pend - pbeg) ||
+ my_b_write(&pinfo->head_cache, (const uchar*) "\n", 1)))
goto err;
}
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index c02c22f4..3ae832c0 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -31,6 +31,9 @@
#include "log_event_old.h"
#include "rpl_record_old.h"
#include "transaction.h"
+#ifdef WITH_WSREP
+#include "wsrep_mysqld.h"
+#endif /* WITH_WSREP */
PSI_memory_key key_memory_log_event_old;
@@ -205,7 +208,10 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, rpl_group_info *rgi)
TIMESTAMP column to a table with one.
So we call set_time(), like in SBR. Presently it changes nothing.
*/
- ev_thd->set_time(ev->when, ev->when_sec_part);
+#ifdef WITH_WSREP
+ if (!wsrep_thd_is_applying(thd))
+#endif
+ ev_thd->set_time(ev->when, ev->when_sec_part);
/*
There are a few flags that are replicated with each row event.
Make sure to set/clear them before executing the main body of
@@ -1156,20 +1162,12 @@ Old_rows_log_event::Old_rows_log_event(THD *thd_arg, TABLE *tbl_arg,
set_flags(RELAXED_UNIQUE_CHECKS_F);
/* if my_bitmap_init fails, caught in is_valid() */
if (likely(!my_bitmap_init(&m_cols,
- m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
- m_width)))
+ m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
+ m_width)))
{
/* Cols can be zero if this is a dummy binrows event */
if (likely(cols != NULL))
- {
- memcpy(m_cols.bitmap, cols->bitmap, no_bytes_in_map(cols));
- create_last_word_mask(&m_cols);
- }
- }
- else
- {
- // Needed because my_bitmap_init() does not set it to null on failure
- m_cols.bitmap= 0;
+ bitmap_copy(&m_cols, cols);
}
}
#endif
@@ -1231,21 +1229,16 @@ Old_rows_log_event::Old_rows_log_event(const uchar *buf, uint event_len,
/* if my_bitmap_init fails, caught in is_valid() */
if (likely(!my_bitmap_init(&m_cols,
- m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
- m_width)))
+ m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
+ m_width)))
{
DBUG_PRINT("debug", ("Reading from %p", ptr_after_width));
- memcpy(m_cols.bitmap, ptr_after_width, (m_width + 7) / 8);
- create_last_word_mask(&m_cols);
+ bitmap_import(&m_cols, ptr_after_width);
+ DBUG_DUMP("m_cols", ptr_after_width, no_bytes_in_export_map(&m_cols));
ptr_after_width+= (m_width + 7) / 8;
- DBUG_DUMP("m_cols", (uchar*) m_cols.bitmap, no_bytes_in_map(&m_cols));
}
else
- {
- // Needed because my_bitmap_init() does not set it to null on failure
- m_cols.bitmap= NULL;
DBUG_VOID_RETURN;
- }
const uchar* const ptr_rows_data= (const uchar*) ptr_after_width;
size_t const data_size= event_len - (ptr_rows_data - (const uchar *) buf);
@@ -1263,8 +1256,6 @@ Old_rows_log_event::Old_rows_log_event(const uchar *buf, uint event_len,
m_rows_cur= m_rows_end;
memcpy(m_rows_buf, ptr_rows_data, data_size);
}
- else
- m_cols.bitmap= 0; // to not free it
DBUG_VOID_RETURN;
}
@@ -1272,8 +1263,6 @@ Old_rows_log_event::Old_rows_log_event(const uchar *buf, uint event_len,
Old_rows_log_event::~Old_rows_log_event()
{
- if (m_cols.bitmap == m_bitbuf) // no my_malloc happened
- m_cols.bitmap= 0; // so no my_free in my_bitmap_free
my_bitmap_free(&m_cols); // To pair with my_bitmap_init().
my_free(m_rows_buf);
}
@@ -1285,10 +1274,10 @@ int Old_rows_log_event::get_data_size()
uchar *end= net_store_length(buf, (m_width + 7) / 8);
DBUG_EXECUTE_IF("old_row_based_repl_4_byte_map_id_master",
- return (int)(6 + no_bytes_in_map(&m_cols) + (end - buf) +
- m_rows_cur - m_rows_buf););
+ return (int)(6 + no_bytes_in_export_map(&m_cols) + (end - buf) +
+ m_rows_cur - m_rows_buf););
int data_size= ROWS_HEADER_LEN;
- data_size+= no_bytes_in_map(&m_cols);
+ data_size+= no_bytes_in_export_map(&m_cols);
data_size+= (uint) (end - buf);
data_size+= (uint) (m_rows_cur - m_rows_buf);
@@ -1508,7 +1497,10 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi)
TIMESTAMP column to a table with one.
So we call set_time(), like in SBR. Presently it changes nothing.
*/
- thd->set_time(when, when_sec_part);
+#ifdef WITH_WSREP
+ if (!wsrep_thd_is_applying(thd))
+#endif
+ thd->set_time(when, when_sec_part);
/*
There are a few flags that are replicated with each row event.
Make sure to set/clear them before executing the main body of
@@ -1806,6 +1798,8 @@ bool Old_rows_log_event::write_data_body()
*/
uchar sbuf[MAX_INT_WIDTH];
my_ptrdiff_t const data_size= m_rows_cur - m_rows_buf;
+ uint bitmap_size= no_bytes_in_export_map(&m_cols);
+ uchar *bitmap;
// This method should not be reached.
assert(0);
@@ -1817,10 +1811,14 @@ bool Old_rows_log_event::write_data_body()
DBUG_DUMP("m_width", sbuf, (size_t) (sbuf_end - sbuf));
res= res || write_data(sbuf, (size_t) (sbuf_end - sbuf));
- DBUG_DUMP("m_cols", (uchar*) m_cols.bitmap, no_bytes_in_map(&m_cols));
- res= res || write_data((uchar*)m_cols.bitmap, no_bytes_in_map(&m_cols));
+ bitmap= (uchar*) my_alloca(bitmap_size);
+ bitmap_export(bitmap, &m_cols);
+
+ DBUG_DUMP("m_cols", bitmap, no_bytes_in_export_map(&m_cols));
+ res= res || write_data(bitmap, no_bytes_in_export_map(&m_cols));
DBUG_DUMP("rows", m_rows_buf, data_size);
res= res || write_data(m_rows_buf, (size_t) data_size);
+ my_afree(bitmap);
return res;
diff --git a/sql/log_event_old.h b/sql/log_event_old.h
index 1afe9aba..1281cb95 100644
--- a/sql/log_event_old.h
+++ b/sql/log_event_old.h
@@ -183,8 +183,8 @@ protected:
ulong m_master_reclength; /* Length of record on master side */
/* Bit buffers in the same memory as the class */
- uint32 m_bitbuf[128/(sizeof(uint32)*8)];
- uint32 m_bitbuf_ai[128/(sizeof(uint32)*8)];
+ my_bitmap_map m_bitbuf[128/(sizeof(my_bitmap_map)*8)];
+ my_bitmap_map m_bitbuf_ai[128/(sizeof(my_bitmap_map)*8)];
uchar *m_rows_buf; /* The rows in packed format */
uchar *m_rows_cur; /* One-after the end of the data */
diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc
index 84a00b5d..6e22a3ab 100644
--- a/sql/log_event_server.cc
+++ b/sql/log_event_server.cc
@@ -1972,7 +1972,10 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
{
bool is_rb_alter= gtid_flags_extra & Gtid_log_event::FL_ROLLBACK_ALTER_E1;
- thd->set_time(when, when_sec_part);
+#ifdef WITH_WSREP
+ if (!wsrep_thd_is_applying(thd))
+#endif
+ thd->set_time(when, when_sec_part);
thd->set_query_and_id((char*)query_arg, q_len_arg,
thd->charset(), next_query_id());
thd->variables.pseudo_thread_id= thread_id; // for temp tables
@@ -3134,7 +3137,7 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
thd->lex->local_file= local_fname;
thd->reset_for_next_command(0); // Errors are cleared above
- /*
+ /*
We test replicate_*_db rules. Note that we have already prepared
the file to load, even if we are going to ignore and delete it
now. So it is possible that we did a lot of disk writes for
@@ -3147,7 +3150,6 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
filtering in the I/O thread (more efficient: no disk writes at
all).
-
Note: We do not need to execute reset_one_shot_variables() if this
db_ok() test fails.
Reason: The db stored in binlog events is the same for SET and for
@@ -3159,7 +3161,10 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
*/
if (rpl_filter->db_ok(thd->db.str))
{
- thd->set_time(when, when_sec_part);
+#ifdef WITH_WSREP
+ if (!wsrep_thd_is_applying(thd))
+#endif
+ thd->set_time(when, when_sec_part);
thd->set_query_id(next_query_id());
thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
@@ -3725,28 +3730,43 @@ Gtid_log_event::write()
write_len= GTID_HEADER_LEN + 2;
}
- if (flags2 & (FL_PREPARED_XA | FL_COMPLETED_XA))
+ if (flags2 & (FL_PREPARED_XA | FL_COMPLETED_XA)
+ && !DBUG_IF("negate_xid_from_gtid"))
{
int4store(&buf[write_len], xid.formatID);
buf[write_len +4]= (uchar) xid.gtrid_length;
buf[write_len +4+1]= (uchar) xid.bqual_length;
write_len+= 6;
long data_length= xid.bqual_length + xid.gtrid_length;
- memcpy(buf+write_len, xid.data, data_length);
- write_len+= data_length;
+
+ if (!DBUG_IF("negate_xid_data_from_gtid"))
+ {
+ memcpy(buf+write_len, xid.data, data_length);
+ write_len+= data_length;
+ }
}
+
+ DBUG_EXECUTE_IF("inject_fl_extra_multi_engine_into_gtid", {
+ flags_extra|= FL_EXTRA_MULTI_ENGINE_E1;
+ });
if (flags_extra > 0)
{
buf[write_len]= flags_extra;
write_len++;
}
+ DBUG_EXECUTE_IF("inject_fl_extra_multi_engine_into_gtid", {
+ flags_extra&= ~FL_EXTRA_MULTI_ENGINE_E1;
+ });
+
if (flags_extra & FL_EXTRA_MULTI_ENGINE_E1)
{
buf[write_len]= extra_engines;
write_len++;
}
- if (flags_extra & (FL_COMMIT_ALTER_E1 | FL_ROLLBACK_ALTER_E1))
+ if (flags_extra & (FL_COMMIT_ALTER_E1 | FL_ROLLBACK_ALTER_E1)
+ && !DBUG_IF("negate_alter_fl_from_gtid")
+ )
{
int8store(buf + write_len, sa_seq_no);
write_len+= 8;
@@ -4389,6 +4409,9 @@ int Xid_apply_log_event::do_apply_event(rpl_group_info *rgi)
thd->wsrep_affected_rows= 0;
#endif
+#ifndef DBUG_OFF
+ bool record_gtid_delayed_for_xa= false;
+#endif
if (rgi->gtid_pending)
{
sub_id= rgi->gtid_sub_id;
@@ -4407,6 +4430,10 @@ int Xid_apply_log_event::do_apply_event(rpl_group_info *rgi)
return 1;
});
}
+#ifndef DBUG_OFF
+ else
+ record_gtid_delayed_for_xa= true;
+#endif
}
general_log_print(thd, COM_QUERY, get_query());
@@ -4416,6 +4443,22 @@ int Xid_apply_log_event::do_apply_event(rpl_group_info *rgi)
{
DBUG_ASSERT(!thd->transaction->xid_state.is_explicit_XA());
+ DBUG_ASSERT(record_gtid_delayed_for_xa);
+ if (thd->rgi_slave->is_parallel_exec)
+ {
+ /*
+ With XA, since the transaction is prepared/committed without updating
+ the GTID pos (MDEV-32020...), we need here to clear any pending
+ deadlock kill.
+
+ Otherwise if the kill happened after the prepare/commit completed, it
+ might end up killing the subsequent GTID position update, causing the
+ slave to fail with error.
+ */
+ wait_for_pending_deadlock_kill(thd, thd->rgi_slave);
+ thd->reset_killed();
+ }
+
if ((err= do_record_gtid(thd, rgi, false, &hton, true)))
return err;
}
@@ -4522,7 +4565,8 @@ int XA_prepare_log_event::do_commit()
thd->lex->xid= &xid;
if (!one_phase)
{
- if ((res= thd->wait_for_prior_commit()))
+ if (thd->is_current_stmt_binlog_disabled() &&
+ (res= thd->wait_for_prior_commit()))
return res;
thd->lex->sql_command= SQLCOM_XA_PREPARE;
@@ -5634,20 +5678,12 @@ Rows_log_event::Rows_log_event(THD *thd_arg, TABLE *tbl_arg,
set_flags(NO_CHECK_CONSTRAINT_CHECKS_F);
/* if my_bitmap_init fails, caught in is_valid() */
if (likely(!my_bitmap_init(&m_cols,
- m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
- m_width)))
+ m_width <= sizeof(m_bitbuf)*8 ? m_bitbuf : NULL,
+ m_width)))
{
/* Cols can be zero if this is a dummy binrows event */
if (likely(cols != NULL))
- {
- memcpy(m_cols.bitmap, cols->bitmap, no_bytes_in_map(cols));
- create_last_word_mask(&m_cols);
- }
- }
- else
- {
- // Needed because my_bitmap_init() does not set it to null on failure
- m_cols.bitmap= 0;
+ bitmap_copy(&m_cols, cols);
}
}
@@ -6082,21 +6118,21 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
which tested replicate-* rules).
*/
- if (m_width == table->s->fields && bitmap_is_set_all(&m_cols))
+ if (m_width == table->s->fields && bitmap_is_set_all(&m_cols))
set_flags(COMPLETE_ROWS_F);
- /*
+ /*
Set tables write and read sets.
-
+
Read_set contains all slave columns (in case we are going to fetch
- a complete record from slave)
-
- Write_set equals the m_cols bitmap sent from master but it can be
- longer if slave has extra columns.
- */
+ a complete record from slave).
+
+ Write_set equals the m_cols bitmap sent from master but it can be
+ longer if slave has extra columns.
+ */
DBUG_PRINT_BITSET("debug", "Setting table's read_set from: %s", &m_cols);
-
+
bitmap_set_all(table->read_set);
if (get_general_type_code() == DELETE_ROWS_EVENT ||
get_general_type_code() == UPDATE_ROWS_EVENT)
@@ -6112,9 +6148,12 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
if (table->versioned())
{
+ bitmap_set_bit(table->read_set, table->s->vers.start_fieldno);
bitmap_set_bit(table->write_set, table->s->vers.start_fieldno);
+ bitmap_set_bit(table->read_set, table->s->vers.end_fieldno);
bitmap_set_bit(table->write_set, table->s->vers.end_fieldno);
}
+ m_table->mark_columns_per_binlog_row_image();
this->slave_exec_mode= slave_exec_mode_options; // fix the mode
@@ -6345,11 +6384,13 @@ static int rows_event_stmt_cleanup(rpl_group_info *rgi, THD * thd)
Xid_log_event will come next which will, if some transactional engines
are involved, commit the transaction and flush the pending event to the
binlog.
- If there was a deadlock the transaction should have been rolled back
- already. So there should be no need to rollback the transaction.
+ We check for thd->transaction_rollback_request because it is possible
+ there was a deadlock that was ignored by slave-skip-errors. Normally, the
+ deadlock would have been rolled back already.
*/
- DBUG_ASSERT(! thd->transaction_rollback_request);
- error|= (int)(error ? trans_rollback_stmt(thd) : trans_commit_stmt(thd));
+ error|= (int) ((error || thd->transaction_rollback_request)
+ ? trans_rollback_stmt(thd)
+ : trans_commit_stmt(thd));
/*
Now what if this is not a transactional engine? we still need to
@@ -6460,30 +6501,37 @@ bool Rows_log_event::write_data_body()
my_ptrdiff_t const data_size= m_rows_cur - m_rows_buf;
bool res= false;
uchar *const sbuf_end= net_store_length(sbuf, (size_t) m_width);
+ uint bitmap_size= no_bytes_in_export_map(&m_cols);
+ uchar *bitmap;
DBUG_ASSERT(static_cast<size_t>(sbuf_end - sbuf) <= sizeof(sbuf));
DBUG_DUMP("m_width", sbuf, (size_t) (sbuf_end - sbuf));
res= res || write_data(sbuf, (size_t) (sbuf_end - sbuf));
- DBUG_DUMP("m_cols", (uchar*) m_cols.bitmap, no_bytes_in_map(&m_cols));
- res= res || write_data((uchar*)m_cols.bitmap, no_bytes_in_map(&m_cols));
+ bitmap= (uchar*) my_alloca(bitmap_size);
+ bitmap_export(bitmap, &m_cols);
+
+ DBUG_DUMP("m_cols", bitmap, bitmap_size);
+ res= res || write_data(bitmap, bitmap_size);
/*
TODO[refactor write]: Remove the "down cast" here (and elsewhere).
*/
if (get_general_type_code() == UPDATE_ROWS_EVENT)
{
- DBUG_DUMP("m_cols_ai", (uchar*) m_cols_ai.bitmap,
- no_bytes_in_map(&m_cols_ai));
- res= res || write_data((uchar*)m_cols_ai.bitmap,
- no_bytes_in_map(&m_cols_ai));
+ DBUG_ASSERT(m_cols.n_bits == m_cols_ai.n_bits);
+ bitmap_export(bitmap, &m_cols_ai);
+
+ DBUG_DUMP("m_cols_ai", bitmap, bitmap_size);
+ res= res || write_data(bitmap, bitmap_size);
}
DBUG_DUMP("rows", m_rows_buf, data_size);
res= res || write_data(m_rows_buf, (size_t) data_size);
+ my_afree(bitmap);
return res;
-
}
+
bool Rows_log_event::write_compressed()
{
uchar *m_rows_buf_tmp= m_rows_buf;
@@ -7767,6 +7815,8 @@ Rows_log_event::write_row(rpl_group_info *rgi,
TODO: Add safety measures against infinite looping.
*/
+ DBUG_EXECUTE_IF("write_row_inject_sleep_before_ha_write_row",
+ my_sleep(20000););
if (table->s->sequence)
error= update_sequence();
else while (unlikely(error= table->file->ha_write_row(table->record[0])))
@@ -7962,6 +8012,7 @@ int Rows_log_event::update_sequence()
#if defined(WITH_WSREP)
! WSREP(thd) &&
#endif
+ table->in_use->rgi_slave &&
!(table->in_use->rgi_slave->gtid_ev_flags2 & Gtid_log_event::FL_DDL) &&
!(old_master=
rpl_master_has_bug(thd->rgi_slave->rli,
@@ -8264,6 +8315,12 @@ static int row_not_found_error(rpl_group_info *rgi)
? HA_ERR_KEY_NOT_FOUND : HA_ERR_RECORD_CHANGED;
}
+static int end_of_file_error(rpl_group_info *rgi)
+{
+ return rgi->speculation != rpl_group_info::SPECULATE_OPTIMISTIC
+ ? HA_ERR_END_OF_FILE : HA_ERR_RECORD_CHANGED;
+}
+
/**
Locate the current row in event's table.
@@ -8508,6 +8565,8 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
while ((error= table->file->ha_index_next(table->record[0])))
{
DBUG_PRINT("info",("no record matching the given row found"));
+ if (error == HA_ERR_END_OF_FILE)
+ error= end_of_file_error(rgi);
table->file->print_error(error, MYF(0));
table->file->ha_index_end();
goto end;
@@ -8544,6 +8603,7 @@ int Rows_log_event::find_row(rpl_group_info *rgi)
break;
case HA_ERR_END_OF_FILE:
+ error= end_of_file_error(rgi);
DBUG_PRINT("info", ("Record not found"));
table->file->ha_rnd_end();
goto end;
@@ -8759,10 +8819,7 @@ void Update_rows_log_event::init(MY_BITMAP const *cols)
{
/* Cols can be zero if this is a dummy binrows event */
if (likely(cols != NULL))
- {
- memcpy(m_cols_ai.bitmap, cols->bitmap, no_bytes_in_map(cols));
- create_last_word_mask(&m_cols_ai);
- }
+ bitmap_copy(&m_cols_ai, cols);
}
}
@@ -8826,11 +8883,6 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
#endif /* WSREP_PROC_INFO */
thd_proc_info(thd, message);
- // Temporary fix to find out why it fails [/Matz]
- memcpy(m_table->read_set->bitmap, m_cols.bitmap, (m_table->read_set->n_bits + 7) / 8);
- memcpy(m_table->write_set->bitmap, m_cols_ai.bitmap, (m_table->write_set->n_bits + 7) / 8);
-
- m_table->mark_columns_per_binlog_row_image();
int error= find_row(rgi);
if (unlikely(error))
@@ -8936,7 +8988,6 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
error= vers_insert_history_row(m_table);
restore_record(m_table, record[2]);
}
- m_table->default_column_bitmaps();
if (invoke_triggers && likely(!error) &&
unlikely(process_triggers(TRG_EVENT_UPDATE, TRG_ACTION_AFTER, TRUE)))
diff --git a/sql/mdl.cc b/sql/mdl.cc
index 32374415..13a97b8e 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -1195,15 +1195,8 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout,
{
#ifdef WITH_WSREP
# ifdef ENABLED_DEBUG_SYNC
- // Allow tests to block the applier thread using the DBUG facilities
- DBUG_EXECUTE_IF("sync.wsrep_before_mdl_wait",
- {
- const char act[]=
- "now "
- "wait_for signal.wsrep_before_mdl_wait";
- DBUG_ASSERT(!debug_sync_set_action((owner->get_thd()),
- STRING_WITH_LEN(act)));
- };);
+ // Allow tests to block thread before MDL-wait
+ DEBUG_SYNC(owner->get_thd(), "wsrep_before_mdl_wait");
# endif
if (WSREP_ON && wsrep_thd_is_BF(owner->get_thd(), false))
{
diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h
index 57cfd217..5e7879d9 100644
--- a/sql/multi_range_read.h
+++ b/sql/multi_range_read.h
@@ -556,10 +556,6 @@ class DsMrr_impl
public:
typedef void (handler::*range_check_toggle_func_t)(bool on);
- DsMrr_impl()
- : secondary_file(NULL),
- rowid_filter(NULL) {};
-
void init(handler *h_arg, TABLE *table_arg)
{
primary_file= h_arg;
@@ -581,7 +577,7 @@ public:
int dsmrr_explain_info(uint mrr_mode, char *str, size_t size);
private:
/* Buffer to store (key, range_id) pairs */
- Lifo_buffer *key_buffer;
+ Lifo_buffer *key_buffer= nullptr;
/*
The "owner" handler object (the one that is expected to "own" this object
@@ -594,13 +590,13 @@ private:
Secondary handler object. (created when needed, we need it when we need
to run both index scan and rnd_pos() scan at the same time)
*/
- handler *secondary_file;
+ handler *secondary_file= nullptr;
/*
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;
+ Rowid_filter *rowid_filter= nullptr;
uint keyno; /* index we're running the scan on */
/* TRUE <=> need range association, buffers hold {rowid, range_id} pairs */
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 738fd73e..d0619aa2 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -302,7 +302,8 @@ static TYPELIB tc_heuristic_recover_typelib=
};
const char *first_keyword= "first";
-const char *my_localhost= "localhost", *delayed_user= "DELAYED";
+const char *my_localhost= "localhost",
+ *delayed_user= "delayed", *slave_user= "<replication_slave>";
bool opt_large_files= sizeof(my_off_t) > 4;
static my_bool opt_autocommit; ///< for --autocommit command-line option
@@ -737,9 +738,6 @@ mysql_mutex_t LOCK_thread_id;
server may be fairly high, we need a dedicated lock.
*/
mysql_mutex_t LOCK_prepared_stmt_count;
-#ifdef HAVE_OPENSSL
-mysql_mutex_t LOCK_des_key_file;
-#endif
mysql_mutex_t LOCK_backup_log;
mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
mysql_rwlock_t LOCK_ssl_refresh;
@@ -883,7 +881,7 @@ static struct my_option pfs_early_options[]=
PSI_file_key key_file_binlog, key_file_binlog_cache, key_file_binlog_index,
key_file_binlog_index_cache, key_file_casetest,
- key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file,
+ key_file_dbopt, key_file_ERRMSG, key_select_to_file,
key_file_fileparser, key_file_frm, key_file_global_ddl_log, key_file_load,
key_file_loadfile, key_file_log_event_data, key_file_log_event_info,
key_file_log_ddl,
@@ -895,16 +893,19 @@ PSI_file_key key_file_relaylog, key_file_relaylog_index,
key_file_relaylog_cache, key_file_relaylog_index_cache;
PSI_file_key key_file_binlog_state;
+#ifdef HAVE_des
+char *des_key_file;
+PSI_file_key key_file_des_key_file;
+PSI_mutex_key key_LOCK_des_key_file;
+mysql_mutex_t LOCK_des_key_file;
+#endif /* HAVE_des */
+
#ifdef HAVE_PSI_INTERFACE
#ifdef HAVE_MMAP
PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active, key_LOCK_pool,
key_LOCK_pending_checkpoint;
#endif /* HAVE_MMAP */
-#ifdef HAVE_OPENSSL
-PSI_mutex_key key_LOCK_des_key_file;
-#endif /* HAVE_OPENSSL */
-
PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_BINLOG_LOCK_binlog_background_thread,
key_LOCK_binlog_end_pos,
@@ -962,9 +963,9 @@ static PSI_mutex_info all_server_mutexes[]=
{ &key_LOCK_pool, "TC_LOG_MMAP::LOCK_pending_checkpoint", 0},
#endif /* HAVE_MMAP */
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
{ &key_LOCK_des_key_file, "LOCK_des_key_file", PSI_FLAG_GLOBAL},
-#endif /* HAVE_OPENSSL */
+#endif /* HAVE_des */
{ &key_BINLOG_LOCK_index, "MYSQL_BIN_LOG::LOCK_index", 0},
{ &key_BINLOG_LOCK_xid_list, "MYSQL_BIN_LOG::LOCK_xid_list", 0},
@@ -1491,7 +1492,6 @@ static void openssl_dynlock_destroy(openssl_lock_t *, const char *, int);
static void openssl_lock_function(int, int, const char *, int);
static void openssl_lock(int, openssl_lock_t *, const char *, int);
#endif /* HAVE_OPENSSL10 */
-char *des_key_file;
#ifndef EMBEDDED_LIBRARY
struct st_VioSSLFd *ssl_acceptor_fd;
#endif
@@ -1567,15 +1567,12 @@ static void kill_thread(THD *thd)
/**
First shutdown everything but slave threads and binlog dump connections
*/
-static my_bool kill_thread_phase_1(THD *thd, int *n_threads_awaiting_ack)
+static my_bool kill_thread_phase_1(THD *thd, void *)
{
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)))
+ if (thd->slave_thread || thd->is_binlog_dump_thread())
return 0;
if (DBUG_IF("only_kill_system_threads") && !thd->system_thread)
@@ -1773,31 +1770,20 @@ static void close_connections(void)
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);
+ server_threads.iterate(kill_thread_phase_1);
/*
If we are waiting on any ACKs, delay killing the thread until either an ACK
is received or the timeout is hit.
-
- 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())
{
- int waiting_threads= repl_semisync_master.sync_get_master_wait_sessions();
- if (waiting_threads)
- sql_print_information("Delaying shutdown to await semi-sync ACK");
-
- while (waiting_threads-- > 0)
- repl_semisync_master.await_slave_reply();
+ repl_semisync_master.await_all_slave_replies(
+ "Delaying shutdown to await semi-sync ACK");
}
- DBUG_EXECUTE_IF("delay_shutdown_phase_2_after_semisync_wait",
- my_sleep(500000););
-
- Events::deinit();
+ if (Events::inited)
+ Events::stop();
slave_prepare_for_shutdown();
ack_receiver.stop();
@@ -1817,8 +1803,7 @@ static void close_connections(void)
*/
DBUG_PRINT("info", ("THD_count: %u", THD_count::value()));
- for (int i= 0; THD_count::connection_thd_count() - n_threads_awaiting_ack
- && i < 1000; i++)
+ for (int i= 0; THD_count::connection_thd_count() && i < 1000; i++)
{
if (DBUG_IF("only_kill_system_threads_no_loop"))
break;
@@ -1837,9 +1822,9 @@ static void close_connections(void)
#endif
/* All threads has now been aborted */
DBUG_PRINT("quit", ("Waiting for threads to die (count=%u)",
- THD_count::connection_thd_count() - n_threads_awaiting_ack));
+ THD_count::connection_thd_count()));
- while (THD_count::connection_thd_count() - n_threads_awaiting_ack)
+ while (THD_count::connection_thd_count())
{
if (DBUG_IF("only_kill_system_threads_no_loop"))
break;
@@ -1860,6 +1845,12 @@ static void close_connections(void)
}
/* End of kill phase 2 */
+ /*
+ The signal thread can use server resources, e.g. when processing SIGHUP,
+ and it must end gracefully before clean_up()
+ */
+ wait_for_signal_thread_to_end();
+
DBUG_PRINT("quit",("close_connections thread"));
DBUG_VOID_RETURN;
}
@@ -1928,6 +1919,7 @@ extern "C" void unireg_abort(int exit_code)
wsrep_sst_auth_free();
#endif // WITH_WSREP
+ wait_for_signal_thread_to_end();
clean_up(!opt_abort && (exit_code || !opt_bootstrap)); /* purecov: inspected */
DBUG_PRINT("quit",("done with cleanup in unireg_abort"));
mysqld_exit(exit_code);
@@ -1936,14 +1928,8 @@ extern "C" void unireg_abort(int exit_code)
static void mysqld_exit(int exit_code)
{
DBUG_ENTER("mysqld_exit");
- /*
- Important note: we wait for the signal thread to end,
- but if a kill -15 signal was sent, the signal thread did
- spawn the kill_server_thread thread, which is running concurrently.
- */
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();
@@ -2025,6 +2011,9 @@ static void clean_up(bool print_message)
free_status_vars();
end_thr_alarm(1); /* Free allocated memory */
end_thr_timer();
+#ifndef EMBEDDED_LIBRARY
+ Events::deinit();
+#endif
my_free_open_file_info();
if (defaults_argv)
free_defaults(defaults_argv);
@@ -2095,16 +2084,31 @@ static void clean_up(bool print_message)
*/
static void wait_for_signal_thread_to_end()
{
- uint i;
+ uint i, n_waits= DBUG_IF("force_sighup_processing_timeout") ? 5 : 100;
+ int err= 0;
/*
Wait up to 10 seconds for signal thread to die. We use this mainly to
avoid getting warnings that my_thread_end has not been called
*/
- for (i= 0 ; i < 100 && signal_thread_in_use; i++)
+ for (i= 0 ; i < n_waits && signal_thread_in_use; i++)
{
- if (pthread_kill(signal_thread, MYSQL_KILL_SIGNAL) == ESRCH)
+ err= pthread_kill(signal_thread, MYSQL_KILL_SIGNAL);
+ if (err)
break;
- my_sleep(100); // Give it time to die
+ my_sleep(100000); // Give it time to die, .1s per iteration
+ }
+
+ if (err && err != ESRCH)
+ {
+ sql_print_error("Failed to send kill signal to signal handler thread, "
+ "pthread_kill() errno: %d", err);
+ }
+
+ if (i == n_waits && signal_thread_in_use && !opt_bootstrap)
+ {
+ sql_print_warning("Signal handler thread did not exit in a timely manner. "
+ "Continuing to wait for it to stop..");
+ pthread_join(signal_thread, NULL);
}
}
#endif /*EMBEDDED_LIBRARY*/
@@ -2129,7 +2133,9 @@ static void clean_up_mutexes()
mysql_mutex_destroy(&LOCK_global_table_stats);
mysql_mutex_destroy(&LOCK_global_index_stats);
#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
mysql_mutex_destroy(&LOCK_des_key_file);
+#endif /* HAVE_des */
#if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL)
for (int i= 0; i < CRYPTO_num_locks(); ++i)
mysql_rwlock_destroy(&openssl_stdlocks[i].lock);
@@ -3140,10 +3146,8 @@ void init_signals(void)
(void) sigemptyset(&set);
my_sigset(SIGPIPE,SIG_IGN);
sigaddset(&set,SIGPIPE);
-#ifndef IGNORE_SIGHUP_SIGQUIT
sigaddset(&set,SIGQUIT);
sigaddset(&set,SIGHUP);
-#endif
sigaddset(&set,SIGTERM);
/* Fix signals if blocked by parents (can happen on Mac OS X) */
@@ -3183,7 +3187,6 @@ static void start_signal_handler(void)
(void) pthread_attr_init(&thr_attr);
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
- (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
(void) my_setstacksize(&thr_attr,my_thread_stack_size);
mysql_mutex_lock(&LOCK_start_thread);
@@ -3203,18 +3206,6 @@ 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)))
@@ -3222,7 +3213,6 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
sigset_t set;
int sig;
my_thread_init(); // Init new thread
- DBUG_ENTER("signal_hand");
signal_thread_in_use= 1;
/*
@@ -3239,20 +3229,20 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
(void) sigaddset(&set,SIGINT);
(void) pthread_sigmask(SIG_UNBLOCK,&set,NULL);
}
- (void) sigemptyset(&set); // Setup up SIGINT for debug
+ (void) sigemptyset(&set);
#ifdef USE_ONE_SIGNAL_HAND
(void) sigaddset(&set,THR_SERVER_ALARM); // For alarms
#endif
-#ifndef IGNORE_SIGHUP_SIGQUIT
(void) sigaddset(&set,SIGQUIT);
- (void) sigaddset(&set,SIGHUP);
-#endif
(void) sigaddset(&set,SIGTERM);
(void) sigaddset(&set,SIGTSTP);
/* Save pid to this process (or thread on Linux) */
if (!opt_bootstrap)
+ {
+ (void) sigaddset(&set,SIGHUP);
create_pid_file();
+ }
/*
signal to start_signal_handler that we are ready
@@ -3272,11 +3262,10 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
int origin;
while ((error= my_sigwait(&set, &sig, &origin)) == EINTR) /* no-op */;
- if (cleanup_done)
+ if (abort_loop)
{
DBUG_PRINT("quit",("signal_handler: calling my_thread_end()"));
my_thread_end();
- DBUG_LEAVE; // Must match DBUG_ENTER()
signal_thread_in_use= 0;
pthread_exit(0); // Safety
return 0; // Avoid compiler warnings
@@ -3296,18 +3285,8 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
{
/* Delete the instrumentation for the signal thread */
PSI_CALL_delete_current_thread();
-#ifdef USE_ONE_SIGNAL_HAND
- pthread_t tmp;
- if (unlikely((error= mysql_thread_create(0, /* Not instrumented */
- &tmp, &connection_attrib,
- kill_server_thread,
- (void*) &sig))))
- sql_print_error("Can't create thread to kill server (errno= %d)",
- error);
-#else
my_sigset(sig, SIG_IGN);
break_connect_loop(); // MIT THREAD has a alarm thread
-#endif
}
break;
case SIGHUP:
@@ -3794,20 +3773,35 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific)
thd->status_var.local_memory_used > (int64)thd->variables.max_mem_used &&
likely(!thd->killed) && !thd->get_stmt_da()->is_set())
{
- /* Ensure we don't get called here again */
- char buf[50], *buf2;
- thd->set_killed(KILL_QUERY);
- my_snprintf(buf, sizeof(buf), "--max-session-mem-used=%llu",
- thd->variables.max_mem_used);
- if ((buf2= (char*) thd->alloc(256)))
- {
- my_snprintf(buf2, 256, ER_THD(thd, ER_OPTION_PREVENTS_STATEMENT), buf);
- thd->set_killed(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT, buf2);
- }
- else
- {
- thd->set_killed(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT,
- "--max-session-mem-used");
+ /*
+ Ensure we don't get called here again.
+
+ It is not safe to wait for LOCK_thd_kill here, as we could be called
+ from almost any context. For example while LOCK_plugin is being held;
+ but THD::awake() locks LOCK_thd_kill and LOCK_plugin in the opposite
+ order (MDEV-33443).
+
+ So ignore the max_mem_used limit in the unlikely case we cannot obtain
+ LOCK_thd_kill here (the limit will be enforced on the next allocation).
+ */
+ if (!mysql_mutex_trylock(&thd->LOCK_thd_kill)) {
+ char buf[50], *buf2;
+ thd->set_killed_no_mutex(KILL_QUERY);
+ my_snprintf(buf, sizeof(buf), "--max-session-mem-used=%llu",
+ thd->variables.max_mem_used);
+ if ((buf2= (char*) thd->alloc(256)))
+ {
+ my_snprintf(buf2, 256,
+ ER_THD(thd, ER_OPTION_PREVENTS_STATEMENT), buf);
+ thd->set_killed_no_mutex(KILL_QUERY,
+ ER_OPTION_PREVENTS_STATEMENT, buf2);
+ }
+ else
+ {
+ thd->set_killed_no_mutex(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT,
+ "--max-session-mem-used");
+ }
+ mysql_mutex_unlock(&thd->LOCK_thd_kill);
}
}
DBUG_ASSERT((longlong) thd->status_var.local_memory_used >= 0 ||
@@ -4117,8 +4111,9 @@ static int init_common_variables()
SQLCOM_END + 10);
#endif
- if (get_options(&remaining_argc, &remaining_argv))
- exit(1);
+ int opt_err;
+ if ((opt_err= get_options(&remaining_argc, &remaining_argv)))
+ exit(opt_err);
if (IS_SYSVAR_AUTOSIZE(&server_version_ptr))
set_server_version(server_version, sizeof(server_version));
@@ -4520,8 +4515,10 @@ static int init_thread_environment()
mysql_mutex_init(key_LOCK_temp_pool, &LOCK_temp_pool, MY_MUTEX_INIT_FAST);
#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
mysql_mutex_init(key_LOCK_des_key_file,
&LOCK_des_key_file, MY_MUTEX_INIT_FAST);
+#endif /* HAVE_des */
#if defined(HAVE_OPENSSL10) && !defined(HAVE_WOLFSSL)
openssl_stdlocks= (openssl_lock_t*) OPENSSL_malloc(CRYPTO_num_locks() *
sizeof(openssl_lock_t));
@@ -4740,8 +4737,10 @@ static void init_ssl()
{
have_ssl= SHOW_OPTION_DISABLED;
}
+#ifdef HAVE_des
if (des_key_file)
load_des_key_file(des_key_file);
+#endif /* HAVE_des */
#endif /* HAVE_OPENSSL */
#endif /* !EMBEDDED_LIBRARY */
}
@@ -4982,10 +4981,13 @@ static int init_server_components()
error_handler_hook= my_message_sql;
proc_info_hook= set_thd_stage_info;
+ /* Set up hook to handle disk full */
+ my_sleep_for_space= mariadb_sleep_for_space;
+
/*
- Print source revision hash, as one of the first lines, if not the
- first in error log, for troubleshooting and debugging purposes
- */
+ Print source revision hash, as one of the first lines, if not the
+ first in error log, for troubleshooting and debugging purposes
+ */
if (!opt_help)
sql_print_information("Starting MariaDB %s source revision %s as process %lu",
server_version, SOURCE_REVISION, (ulong) getpid());
@@ -5013,6 +5015,19 @@ static int init_server_components()
xid_cache_init();
+ /*
+ Do not open binlong when doing bootstrap.
+ This ensures that rpl_load_gtid_slave_state() will not fail with an error
+ as the mysql schema does not yet exists.
+ This also ensures that we don't get an empty binlog file if the user has
+ log-bin in his config files.
+ */
+ if (opt_bootstrap)
+ {
+ opt_bin_log= opt_bin_log_used= binlog_format_used= 0;
+ opt_log_slave_updates= 0;
+ }
+
/* need to configure logging before initializing storage engines */
if (!opt_bin_log_used && !WSREP_ON)
{
@@ -5473,6 +5488,10 @@ static int init_server_components()
}
#endif
+#ifndef EMBEDDED_LIBRARY
+ start_handle_manager();
+#endif
+
tc_log= get_tc_log_implementation();
if (tc_log->open(opt_bin_log ? opt_bin_logname : opt_tc_log_file))
@@ -5484,9 +5503,6 @@ static int init_server_components()
if (ha_recover(0))
unireg_abort(1);
-#ifndef EMBEDDED_LIBRARY
- start_handle_manager();
-#endif
if (opt_bin_log)
{
int error;
@@ -6587,12 +6603,12 @@ struct my_option my_long_options[]=
&opt_debug_sync_timeout, 0,
0, GET_UINT, OPT_ARG, 0, 0, UINT_MAX, 0, 0, 0},
#endif /* defined(ENABLED_DEBUG_SYNC) */
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
{"des-key-file", 0,
"Load keys for des_encrypt() and des_encrypt from given file.",
&des_key_file, &des_key_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
-#endif /* HAVE_OPENSSL */
+#endif /* HAVE_des */
#ifdef HAVE_STACKTRACE
{"stack-trace", 0 , "Print a symbolic stack trace on failure",
&opt_stack_trace, &opt_stack_trace, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
@@ -7942,7 +7958,9 @@ static int mysql_init_variables(void)
libwrapName= NullS;
#endif
#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
des_key_file = 0;
+#endif /* HAVE_des */
#ifndef EMBEDDED_LIBRARY
ssl_acceptor_fd= 0;
#endif /* ! EMBEDDED_LIBRARY */
@@ -8239,7 +8257,7 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument,
case (int) OPT_SAFE:
opt_specialflag|= SPECIAL_SAFE_MODE | SPECIAL_NO_NEW_FUNC;
SYSVAR_AUTOSIZE(delay_key_write_options, (uint) DELAY_KEY_WRITE_NONE);
- SYSVAR_AUTOSIZE(myisam_recover_options, HA_RECOVER_DEFAULT);
+ myisam_recover_options= HA_RECOVER_DEFAULT;
ha_open_options&= ~(HA_OPEN_DELAY_KEY_WRITE);
#ifdef HAVE_QUERY_CACHE
SYSVAR_AUTOSIZE(query_cache_size, 0);
@@ -9158,7 +9176,9 @@ static PSI_file_info all_server_files[]=
{ &key_file_io_cache, "io_cache", 0},
{ &key_file_casetest, "casetest", 0},
{ &key_file_dbopt, "dbopt", 0},
+#ifdef HAVE_des
{ &key_file_des_key_file, "des_key_file", 0},
+#endif
{ &key_file_ERRMSG, "ERRMSG", 0},
{ &key_select_to_file, "select_to_file", 0},
{ &key_file_fileparser, "file_parser", 0},
@@ -9285,6 +9305,7 @@ PSI_stage_info stage_user_lock= { 0, "User lock", 0};
PSI_stage_info stage_user_sleep= { 0, "User sleep", 0};
PSI_stage_info stage_verifying_table= { 0, "Verifying table", 0};
PSI_stage_info stage_waiting_for_delay_list= { 0, "Waiting for delay_list", 0};
+PSI_stage_info stage_waiting_for_disk_space= {0, "Waiting for someone to free space", 0};
PSI_stage_info stage_waiting_for_gtid_to_be_written_to_binary_log= { 0, "Waiting for GTID to be written to binary log", 0};
PSI_stage_info stage_waiting_for_handler_insert= { 0, "Waiting for handler insert", 0};
PSI_stage_info stage_waiting_for_handler_lock= { 0, "Waiting for handler lock", 0};
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 13b824d1..749c0bd1 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -267,7 +267,7 @@ extern time_t server_start_time, flush_status_time;
extern char *opt_mysql_tmpdir, mysql_charsets_dir[];
extern size_t mysql_unpacked_real_data_home_len;
extern MYSQL_PLUGIN_IMPORT MY_TMPDIR mysql_tmpdir_list;
-extern const char *first_keyword, *delayed_user;
+extern const char *first_keyword, *delayed_user, *slave_user;
extern MYSQL_PLUGIN_IMPORT const char *my_localhost;
extern MYSQL_PLUGIN_IMPORT const char **errmesg; /* Error messages */
extern const char *myisam_recover_options_str;
@@ -316,10 +316,6 @@ extern PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active,
key_LOCK_pool, key_LOCK_pending_checkpoint;
#endif /* HAVE_MMAP */
-#ifdef HAVE_OPENSSL
-extern PSI_mutex_key key_LOCK_des_key_file;
-#endif
-
extern PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_BINLOG_LOCK_binlog_background_thread,
key_LOCK_binlog_end_pos,
@@ -399,7 +395,7 @@ extern PSI_thread_key key_thread_delayed_insert,
extern PSI_file_key key_file_binlog, key_file_binlog_cache,
key_file_binlog_index, key_file_binlog_index_cache, key_file_casetest,
- key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file,
+ key_file_dbopt, key_file_ERRMSG, key_select_to_file,
key_file_fileparser, key_file_frm, key_file_global_ddl_log, key_file_load,
key_file_loadfile, key_file_log_event_data, key_file_log_event_info,
key_file_master_info, key_file_misc, key_file_partition_ddl_log,
@@ -412,6 +408,13 @@ extern PSI_socket_key key_socket_tcpip, key_socket_unix,
key_socket_client_connection;
extern PSI_file_key key_file_binlog_state;
+#ifdef HAVE_des
+extern char* des_key_file;
+extern PSI_file_key key_file_des_key_file;
+extern PSI_mutex_key key_LOCK_des_key_file;
+extern mysql_mutex_t LOCK_des_key_file;
+#endif
+
#ifdef HAVE_PSI_INTERFACE
void init_server_psi_keys();
#endif /* HAVE_PSI_INTERFACE */
@@ -651,6 +654,7 @@ extern PSI_stage_info stage_user_sleep;
extern PSI_stage_info stage_verifying_table;
extern PSI_stage_info stage_waiting_for_ddl;
extern PSI_stage_info stage_waiting_for_delay_list;
+extern PSI_stage_info stage_waiting_for_disk_space;
extern PSI_stage_info stage_waiting_for_flush;
extern PSI_stage_info stage_waiting_for_gtid_to_be_written_to_binary_log;
extern PSI_stage_info stage_waiting_for_handler_insert;
@@ -766,10 +770,6 @@ extern mysql_mutex_t
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;
-extern mysql_mutex_t LOCK_des_key_file;
-#endif
extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_server_started;
extern MYSQL_PLUGIN_IMPORT mysql_cond_t COND_server_started;
extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 3dff8442..af65d92c 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -74,7 +74,13 @@ static int inline EXTRA_DEBUG_fflush(...) { return 0; }
#ifdef MYSQL_SERVER
#include <sql_class.h>
#include <sql_connect.h>
-#define MYSQL_SERVER_my_error my_error
+
+static void inline MYSQL_SERVER_my_error(uint error, myf flags)
+{
+ my_error(error,
+ flags | MYF(global_system_variables.log_warnings > 3 ? ME_ERROR_LOG : 0));
+}
+
#else
static void inline MYSQL_SERVER_my_error(...) {}
#endif
@@ -157,6 +163,7 @@ my_bool my_net_init(NET *net, Vio *vio, void *thd, uint my_flags)
net->net_skip_rest_factor= 0;
net->last_errno=0;
net->pkt_nr_can_be_reset= 0;
+ net->using_proxy_protocol= 0;
net->thread_specific_malloc= MY_TEST(my_flags & MY_THREAD_SPECIFIC);
net->thd= 0;
#ifdef MYSQL_SERVER
@@ -211,6 +218,7 @@ void net_end(NET *net)
DBUG_ENTER("net_end");
my_free(net->buff);
net->buff=0;
+ net->using_proxy_protocol= 0;
DBUG_VOID_RETURN;
}
@@ -766,7 +774,19 @@ net_real_write(NET *net,const uchar *packet, size_t len)
#endif /* !defined(MYSQL_SERVER) */
net->error= 2; /* Close socket */
net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED :
- ER_NET_ERROR_ON_WRITE);
+ ER_NET_ERROR_ON_WRITE);
+#ifdef MYSQL_SERVER
+ if (global_system_variables.log_warnings > 3)
+ {
+ my_printf_error(net->last_errno,
+ "Could not write packet: fd: %lld state: %d "
+ "errno: %d vio_errno: %d length: %ld",
+ MYF(ME_ERROR_LOG),
+ (longlong) vio_fd(net->vio), (int) net->vio->state,
+ vio_errno(net->vio), net->last_errno, (ulong) (end-pos));
+ break;
+ }
+#endif
MYSQL_SERVER_my_error(net->last_errno, MYF(0));
break;
}
@@ -937,6 +957,7 @@ static handle_proxy_header_result handle_proxy_header(NET *net)
return RETRY;
/* Change peer address in THD and ACL structures.*/
uint host_errors;
+ net->using_proxy_protocol= 1;
return (handle_proxy_header_result)thd_set_peer_addr(thd,
&(peer_info.peer_addr), NULL, peer_info.port,
false, &host_errors);
@@ -1064,20 +1085,34 @@ retry:
(longlong) vio_fd(net->vio));
}
#ifndef MYSQL_SERVER
- if (length != 0 && vio_errno(net->vio) == SOCKET_EINTR)
+ if (length != 0 && vio_should_retry(net->vio))
{
DBUG_PRINT("warning",("Interrupted read. Retrying..."));
continue;
}
#endif
- DBUG_PRINT("error",("Couldn't read packet: remain: %u errno: %d length: %ld",
+ DBUG_PRINT("error",("Could not read packet: remain: %u errno: %d length: %ld",
remain, vio_errno(net->vio), (long) length));
len= packet_error;
net->error= 2; /* Close socket */
net->last_errno= (vio_was_timeout(net->vio) ?
- ER_NET_READ_INTERRUPTED :
- ER_NET_READ_ERROR);
- MYSQL_SERVER_my_error(net->last_errno, MYF(0));
+ ER_NET_READ_INTERRUPTED :
+ ER_NET_READ_ERROR);
+#ifdef MYSQL_SERVER
+ if (global_system_variables.log_warnings > 3)
+ {
+ my_printf_error(net->last_errno,
+ "Could not read packet: fd: %lld state: %d "
+ "remain: %u errno: %d vio_errno: %d "
+ "length: %lld",
+ MYF(ME_ERROR_LOG),
+ (longlong) vio_fd(net->vio), (int) net->vio->state,
+ remain, vio_errno(net->vio), net->last_errno,
+ (longlong) length);
+ }
+ else
+ my_error(net->last_errno, MYF(0));
+#endif /* MYSQL_SERVER */
goto end;
}
remain -= (uint32) length;
@@ -1282,7 +1317,10 @@ ulong
my_net_read_packet(NET *net, my_bool read_from_server)
{
ulong reallen = 0;
- return my_net_read_packet_reallen(net, read_from_server, &reallen);
+ ulong length;
+ DBUG_ENTER("my_net_read_packet");
+ length= my_net_read_packet_reallen(net, read_from_server, &reallen);
+ DBUG_RETURN(length);
}
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 42afc930..e6911a03 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3136,6 +3136,53 @@ SQL_SELECT::test_quick_select(THD *thd,
/*
+ @brief
+ Create a bitmap of columns for which to perform Range Analysis for EITS
+ condition selectivity estimates.
+
+ @detail
+ Walk through the bitmap of fields used in the query, and
+ - pick columns for which EITS data is usable (see is_eits_usable() call)
+ - do not produce more than MAX_KEY columns. Range Analyzer cannot handle
+ more than that. If there are more than MAX_KEY eligible columns,
+ this function should be called multiple times to produce multiple
+ bitmaps.
+
+ @param used_fields Columns used by the query
+ @param col_no Start from this column
+ @param out OUT Filled column bitmap
+
+ @return
+ (uint)-1 If there are no more columns for range analysis.
+ Other Index of the last considered column. Pass this to next call to
+ this function
+*/
+
+uint get_columns_for_pseudo_indexes(const TABLE *table,
+ const MY_BITMAP *used_fields, int col_no,
+ MY_BITMAP *out)
+{
+ bitmap_clear_all(out);
+ int n_bits= 0;
+
+ for (; table->field[col_no]; col_no++)
+ {
+ if (bitmap_is_set(used_fields, col_no) &&
+ is_eits_usable(table->field[col_no]))
+ {
+ bitmap_set_bit(out, col_no);
+ if (++n_bits == MAX_KEY)
+ {
+ col_no++;
+ break;
+ }
+ }
+ }
+ return n_bits? col_no: (uint)-1;
+}
+
+
+/*
Build descriptors of pseudo-indexes over columns to perform range analysis
SYNOPSIS
@@ -3160,22 +3207,11 @@ bool create_key_parts_for_pseudo_indexes(RANGE_OPT_PARAM *param,
{
Field **field_ptr;
TABLE *table= param->table;
- uint parts= 0;
-
- for (field_ptr= table->field; *field_ptr; field_ptr++)
- {
- Field *field= *field_ptr;
- if (bitmap_is_set(used_fields, field->field_index) &&
- is_eits_usable(field))
- parts++;
- }
+ uint parts= bitmap_bits_set(used_fields);
KEY_PART *key_part;
uint keys= 0;
- if (!parts)
- return TRUE;
-
if (!(key_part= (KEY_PART *) alloc_root(param->mem_root,
sizeof(KEY_PART) * parts)))
return TRUE;
@@ -3187,9 +3223,6 @@ bool create_key_parts_for_pseudo_indexes(RANGE_OPT_PARAM *param,
Field *field= *field_ptr;
if (bitmap_is_set(used_fields, field->field_index))
{
- if (!is_eits_usable(field))
- continue;
-
uint16 store_length;
uint16 max_key_part_length= (uint16) table->file->max_key_part_length();
key_part->key= keys;
@@ -3534,8 +3567,6 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
PARAM param;
MEM_ROOT alloc;
SEL_TREE *tree;
- double rows;
-
init_sql_alloc(key_memory_quick_range_select_root, &alloc,
thd->variables.range_alloc_block_size, 0, MYF(MY_THREAD_SPECIFIC));
bzero((void*) &param, sizeof(param));
@@ -3545,67 +3576,90 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
param.table= table;
param.remove_false_where_parts= true;
- if (create_key_parts_for_pseudo_indexes(&param, used_fields))
- goto free_alloc;
-
param.prev_tables= param.read_tables= 0;
param.current_table= table->map;
param.using_real_indexes= FALSE;
- param.real_keynr[0]= 0;
+ MEM_UNDEFINED(&param.real_keynr, sizeof(param.real_keynr));
+
param.alloced_sel_args= 0;
param.max_key_parts= 0;
- thd->no_errors=1;
+ thd->no_errors=1;
+ table->reginfo.impossible_range= 0;
- tree= cond[0]->get_mm_tree(&param, cond);
+ uint used_fields_buff_size= bitmap_buffer_size(table->s->fields);
+ my_bitmap_map *used_fields_buff= (my_bitmap_map*)thd->alloc(used_fields_buff_size);
+ MY_BITMAP cols_for_indexes;
+ (void) my_bitmap_init(&cols_for_indexes, used_fields_buff, table->s->fields);
+ bitmap_clear_all(&cols_for_indexes);
- if (!tree)
- goto free_alloc;
-
- table->reginfo.impossible_range= 0;
- if (tree->type == SEL_TREE::IMPOSSIBLE)
- {
- rows= 0;
- table->reginfo.impossible_range= 1;
- goto free_alloc;
- }
- else if (tree->type == SEL_TREE::ALWAYS)
- {
- rows= table_records;
- goto free_alloc;
- }
- else if (tree->type == SEL_TREE::MAYBE)
- {
- rows= table_records;
- goto free_alloc;
- }
+ uint column_no= 0; // Start looping from the first column.
+ /*
+ Try getting selectivity estimates for every field that is used in the
+ query and has EITS statistics. We do this:
- for (uint idx= 0; idx < param.keys; idx++)
+ for every usable field col
+ create a pseudo INDEX(col);
+ Run the range analyzer (get_mm_tree) for these pseudo-indexes;
+ Look at produced ranges and get their selectivity estimates;
+
+ Note that the range analyzer can process at most MAX_KEY indexes. If
+ the table has >MAX_KEY eligible columns, we will do several range
+ analyzer runs.
+ */
+
+ while (1)
{
- SEL_ARG *key= tree->keys[idx];
- if (key)
+ column_no= get_columns_for_pseudo_indexes(table, used_fields, column_no,
+ &cols_for_indexes);
+ if (column_no == (uint)-1)
+ break; /* Couldn't create any pseudo-indexes. This means we're done */
+
+ if (create_key_parts_for_pseudo_indexes(&param, &cols_for_indexes))
+ goto free_alloc;
+
+ tree= cond[0]->get_mm_tree(&param, cond);
+
+ if (!tree ||
+ tree->type == SEL_TREE::ALWAYS ||
+ tree->type == SEL_TREE::MAYBE)
{
- 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
+ /* Couldn't infer anything. But there could be more fields, so continue */
+ continue;
+ }
+
+ if (tree->type == SEL_TREE::IMPOSSIBLE)
+ {
+ table->reginfo.impossible_range= 1;
+ goto free_alloc;
+ }
+
+ for (uint idx= 0; idx < param.keys; idx++)
+ {
+ SEL_ARG *key= tree->keys[idx];
+ if (key)
{
- enum_check_fields save_count_cuted_fields= thd->count_cuted_fields;
- thd->count_cuted_fields= CHECK_FIELD_IGNORE;
- rows= records_in_column_ranges(&param, idx, key);
- thd->count_cuted_fields= save_count_cuted_fields;
- if (rows != DBL_MAX)
+ Json_writer_object selectivity_for_column(thd);
+ selectivity_for_column.add("column_name", key->field->field_name);
+ if (key->type == SEL_ARG::IMPOSSIBLE)
+ {
+ table->reginfo.impossible_range= 1;
+ selectivity_for_column.add("selectivity_from_histogram", 0);
+ selectivity_for_column.add("cause", "impossible range");
+ goto free_alloc;
+ }
+ else
{
- key->field->cond_selectivity= rows/table_records;
- selectivity_for_column.add("selectivity_from_histogram",
- key->field->cond_selectivity);
+ enum_check_fields save_count_cuted_fields= thd->count_cuted_fields;
+ thd->count_cuted_fields= CHECK_FIELD_IGNORE;
+ double rows= records_in_column_ranges(&param, idx, key);
+ thd->count_cuted_fields= save_count_cuted_fields;
+ if (rows != DBL_MAX)
+ {
+ key->field->cond_selectivity= rows/table_records;
+ selectivity_for_column.add("selectivity_from_histogram",
+ key->field->cond_selectivity);
+ }
}
}
}
@@ -6733,8 +6787,7 @@ ROR_INTERSECT_INFO* ror_intersect_init(const PARAM *param)
void ror_intersect_cpy(ROR_INTERSECT_INFO *dst, const ROR_INTERSECT_INFO *src)
{
dst->param= src->param;
- memcpy(dst->covered_fields.bitmap, src->covered_fields.bitmap,
- no_bytes_in_map(&src->covered_fields));
+ bitmap_copy(&dst->covered_fields, &src->covered_fields);
dst->out_rows= src->out_rows;
dst->is_covering= src->is_covering;
dst->index_records= src->index_records;
@@ -7391,7 +7444,7 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
(*scan)->used_fields_covered=
bitmap_bits_set(&(*scan)->covered_fields);
(*scan)->first_uncovered_field=
- bitmap_get_first(&(*scan)->covered_fields);
+ bitmap_get_first_clear(&(*scan)->covered_fields);
}
my_qsort(ror_scan_mark, ror_scans_end-ror_scan_mark, sizeof(ROR_SCAN_INFO*),
diff --git a/sql/opt_split.cc b/sql/opt_split.cc
index 85ca234f..8e2b7e12 100644
--- a/sql/opt_split.cc
+++ b/sql/opt_split.cc
@@ -1335,6 +1335,7 @@ bool JOIN::fix_all_splittings_in_plan()
{
table_map prev_tables= 0;
table_map all_tables= (table_map(1) << table_count) - 1;
+ table_map prev_sjm_lookup_tables= 0;
for (uint tablenr= 0; tablenr < table_count; tablenr++)
{
POSITION *cur_pos= &best_positions[tablenr];
@@ -1343,7 +1344,7 @@ bool JOIN::fix_all_splittings_in_plan()
{
SplM_plan_info *spl_plan= cur_pos->spl_plan;
table_map excluded_tables= (all_tables & ~prev_tables) |
- sjm_lookup_tables;
+ prev_sjm_lookup_tables;
;
if (spl_plan)
{
@@ -1361,6 +1362,8 @@ bool JOIN::fix_all_splittings_in_plan()
return true;
}
prev_tables|= tab->table->map;
+ if (cur_pos->sj_strategy == SJ_OPT_MATERIALIZE)
+ prev_sjm_lookup_tables|= tab->table->map;
}
return false;
}
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 333a3960..bbfc0211 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -131,12 +131,13 @@ handle_queued_pos_update(THD *thd, rpl_parallel_thread::queued_event *qev)
asynchronously, we need to be sure they will be completed before starting a
new transaction. Otherwise the new transaction might suffer a spurious kill.
*/
-static void
+void
wait_for_pending_deadlock_kill(THD *thd, rpl_group_info *rgi)
{
PSI_stage_info old_stage;
mysql_mutex_lock(&thd->LOCK_wakeup_ready);
+ thd->set_time_for_next_stage();
thd->ENTER_COND(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
&stage_waiting_for_deadlock_kill, &old_stage);
while (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING)
@@ -214,6 +215,13 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
signal_error_to_sql_driver_thread(thd, rgi, err);
thd->wait_for_commit_ptr= NULL;
+ /*
+ Calls to check_duplicate_gtid() must match up with
+ record_and_update_gtid() (or release_domain_owner() in error case). This
+ assertion tries to catch any missing release of the domain.
+ */
+ DBUG_ASSERT(rgi->gtid_ignore_duplicate_state != rpl_group_info::GTID_DUPLICATE_OWNER);
+
mysql_mutex_lock(&entry->LOCK_parallel_entry);
/*
We need to mark that this event group started its commit phase, in case we
@@ -399,12 +407,12 @@ do_gco_wait(rpl_group_info *rgi, group_commit_orderer *gco,
if (wait_count > entry->count_committing_event_groups)
{
DEBUG_SYNC(thd, "rpl_parallel_start_waiting_for_prior");
+ thd->set_time_for_next_stage();
thd->ENTER_COND(&gco->COND_group_commit_orderer,
&entry->LOCK_parallel_entry,
&stage_waiting_for_prior_transaction_to_start_commit,
old_stage);
*did_enter_cond= true;
- thd->set_time_for_next_stage();
do
{
if (!rgi->worker_error && unlikely(thd->check_killed(1)))
@@ -492,10 +500,10 @@ do_ftwrl_wait(rpl_group_info *rgi,
*/
if (unlikely(sub_id > entry->pause_sub_id))
{
+ thd->set_time_for_next_stage();
thd->ENTER_COND(&entry->COND_parallel_entry, &entry->LOCK_parallel_entry,
&stage_waiting_for_ftwrl, old_stage);
*did_enter_cond= true;
- thd->set_time_for_next_stage();
do
{
if (entry->force_abort || rgi->worker_error)
@@ -558,9 +566,9 @@ pool_mark_busy(rpl_parallel_thread_pool *pool, THD *thd)
mysql_mutex_lock(&pool->LOCK_rpl_thread_pool);
if (thd)
{
+ thd->set_time_for_next_stage();
thd->ENTER_COND(&pool->COND_rpl_thread_pool, &pool->LOCK_rpl_thread_pool,
&stage_waiting_for_rpl_thread_pool, &old_stage);
- thd->set_time_for_next_stage();
}
while (pool->busy)
{
@@ -700,9 +708,9 @@ rpl_pause_for_ftwrl(THD *thd)
mysql_mutex_lock(&e->LOCK_parallel_entry);
});
}
+ thd->set_time_for_next_stage();
thd->ENTER_COND(&e->COND_parallel_entry, &e->LOCK_parallel_entry,
&stage_waiting_for_ftwrl_threads_to_pause, &old_stage);
- thd->set_time_for_next_stage();
while (e->pause_sub_id < (uint64)ULONGLONG_MAX &&
e->last_committed_sub_id < e->pause_sub_id &&
!err)
@@ -907,7 +915,13 @@ do_retry:
});
#endif
- rgi->cleanup_context(thd, 1);
+ /*
+ We are still applying the event group, even though we will roll it back
+ and retry it. So for --gtid-ignore-duplicates, keep ownership of the
+ domain during the retry so another master connection will not try to take
+ over and duplicate apply the same event group (MDEV-33475).
+ */
+ rgi->cleanup_context(thd, 1, 1 /* keep_domain_owner */);
wait_for_pending_deadlock_kill(thd, rgi);
thd->reset_killed();
thd->clear_error();
@@ -2404,13 +2418,17 @@ rpl_parallel_thread_pool::copy_pool_for_pfs(Relay_log_info *rli)
false Worker not allocated (choose_thread_internal not called)
*/
static bool handle_split_alter(rpl_parallel_entry *e,
- Gtid_log_event *gtid_ev, uint32 *idx,
+ Gtid_log_event *gtid_ev,
+ //uint32 *idx,
+ rpl_parallel_entry::sched_bucket **ptr_cur_thr,
//choose_thread_internal specific
bool *did_enter_cond, rpl_group_info* rgi,
PSI_stage_info *old_stage)
{
uint16 flags_extra= gtid_ev->flags_extra;
bool thread_allocated= false;
+ uint32 i= 0, *idx= &i;
+
//Step 1
if (flags_extra & Gtid_log_event::FL_START_ALTER_E1 ||
//This will arrange finding threads for CA/RA as well
@@ -2421,11 +2439,12 @@ static bool handle_split_alter(rpl_parallel_entry *e,
j is needed for round robin scheduling, we will start with rpl_thread_idx
go till rpl_thread_max and then start with 0 to rpl_thread_idx
*/
- int j= e->rpl_thread_idx;
+ auto j= static_cast<uint32>(e->thread_sched_fifo->head() - e->rpl_threads); // formerly e->rpl_thread_idx;
for(uint i= 0; i < e->rpl_thread_max; i++)
{
- if (!e->rpl_threads[j] || e->rpl_threads[j]->current_owner
- != &e->rpl_threads[j] || !e->rpl_threads[j]->current_start_alter_id)
+ if (!e->rpl_threads[j].thr ||
+ e->rpl_threads[j].thr->current_owner != &e->rpl_threads[j].thr ||
+ !e->rpl_threads[j].thr->current_start_alter_id)
{
//This condition will hit atleast one time no matter what happens
*idx= j;
@@ -2436,17 +2455,26 @@ static bool handle_split_alter(rpl_parallel_entry *e,
j= j % e->rpl_thread_max;
}
//We did not find and idx
- DBUG_ASSERT(0);
- return false;
+ DBUG_ASSERT(0);
+
+ return false;
+
idx_found:
- e->rpl_thread_idx= *idx;
- e->choose_thread_internal(*idx, did_enter_cond, rgi, old_stage);
+ //e->rpl_thread_idx= *idx;
+ /* place the found *idx index into the head */
+ *ptr_cur_thr= &e->rpl_threads[*idx];
+ (*ptr_cur_thr)->unlink();
+ e->thread_sched_fifo->append(*ptr_cur_thr);
+ *ptr_cur_thr= e->thread_sched_fifo->head();
+
+ e->choose_thread_internal(*ptr_cur_thr, did_enter_cond, rgi,
+ old_stage);
thread_allocated= true;
if (flags_extra & Gtid_log_event::FL_START_ALTER_E1)
{
- mysql_mutex_assert_owner(&e->rpl_threads[*idx]->LOCK_rpl_thread);
- e->rpl_threads[e->rpl_thread_idx]->current_start_alter_id= gtid_ev->seq_no;
- e->rpl_threads[e->rpl_thread_idx]->current_start_alter_domain_id=
+ mysql_mutex_assert_owner(&e->rpl_threads[*idx].thr->LOCK_rpl_thread);
+ e->rpl_threads[*idx].thr->current_start_alter_id= gtid_ev->seq_no;
+ e->rpl_threads[*idx].thr->current_start_alter_domain_id=
gtid_ev->domain_id;
/*
We are locking LOCK_rpl_thread_pool becuase we are going to update
@@ -2462,9 +2490,9 @@ idx_found:
}
else
{
- e->rpl_threads[*idx]->reserved_start_alter_thread= true;
- e->rpl_threads[*idx]->current_start_alter_id= 0;
- e->rpl_threads[*idx]->current_start_alter_domain_id= 0;
+ e->rpl_threads[*idx].thr->reserved_start_alter_thread= true;
+ e->rpl_threads[*idx].thr->current_start_alter_id= 0;
+ e->rpl_threads[*idx].thr->current_start_alter_domain_id= 0;
}
mysql_mutex_unlock(&global_rpl_thread_pool.LOCK_rpl_thread_pool);
}
@@ -2475,13 +2503,13 @@ idx_found:
//Free the corrosponding rpt current_start_alter_id
for(uint i= 0; i < e->rpl_thread_max; i++)
{
- if(e->rpl_threads[i] &&
- e->rpl_threads[i]->current_start_alter_id == gtid_ev->sa_seq_no &&
- e->rpl_threads[i]->current_start_alter_domain_id == gtid_ev->domain_id)
+ if(e->rpl_threads[i].thr &&
+ e->rpl_threads[i].thr->current_start_alter_id == gtid_ev->sa_seq_no &&
+ e->rpl_threads[i].thr->current_start_alter_domain_id == gtid_ev->domain_id)
{
mysql_mutex_lock(&global_rpl_thread_pool.LOCK_rpl_thread_pool);
- e->rpl_threads[i]->current_start_alter_id= 0;
- e->rpl_threads[i]->current_start_alter_domain_id= 0;
+ e->rpl_threads[i].thr->current_start_alter_id= 0;
+ e->rpl_threads[i].thr->current_start_alter_domain_id= 0;
global_rpl_thread_pool.current_start_alters--;
e->pending_start_alters--;
DBUG_PRINT("info", ("Commit/Rollback alter id %d", i));
@@ -2497,6 +2525,79 @@ idx_found:
/*
+ Check when we have done a complete round of scheduling for workers
+ 0, 1, ..., (rpl_thread_max-1), in this order.
+ This often occurs every rpl_thread_max event group, but XA XID dependency
+ restrictions can cause insertion of extra out-of-order worker scheduling
+ in-between the normal round-robin scheduling.
+*/
+void
+rpl_parallel_entry::check_scheduling_generation(sched_bucket *cur)
+{
+ uint32 idx= static_cast<uint32>(cur - rpl_threads);
+ DBUG_ASSERT(cur >= rpl_threads);
+ DBUG_ASSERT(cur < rpl_threads + rpl_thread_max);
+ if (idx == current_generation_idx)
+ {
+ ++idx;
+ if (idx >= rpl_thread_max)
+ {
+ /* A new generation; all workers have been scheduled at least once. */
+ idx= 0;
+ ++current_generation;
+ }
+ current_generation_idx= idx;
+ }
+}
+
+
+rpl_parallel_entry::sched_bucket *
+rpl_parallel_entry::check_xa_xid_dependency(xid_t *xid)
+{
+ uint64 cur_gen= current_generation;
+ my_off_t i= 0;
+ while (i < maybe_active_xid.elements)
+ {
+ /*
+ Purge no longer active XID from the list:
+
+ - In generation N, XID might have been scheduled for worker W.
+ - Events in generation (N+1) might run freely in parallel with W.
+ - Events in generation (N+2) will have done wait_for_prior_commit for
+ the event group with XID (or a later one), but the XID might still be
+ active for a bit longer after wakeup_prior_commit().
+ - Events in generation (N+3) will have done wait_for_prior_commit() for
+ an event in W _after_ the XID, so are sure not to see the XID active.
+
+ Therefore, XID can be safely scheduled to a different worker in
+ generation (N+3) when last prior use was in generation N (or earlier).
+ */
+ xid_active_generation *a=
+ dynamic_element(&maybe_active_xid, i, xid_active_generation *);
+ if (a->generation + 3 <= cur_gen)
+ {
+ *a= *((xid_active_generation *)pop_dynamic(&maybe_active_xid));
+ continue;
+ }
+ if (xid->eq(&a->xid))
+ {
+ /* Update the last used generation and return the match. */
+ a->generation= cur_gen;
+ return a->thr;
+ }
+ ++i;
+ }
+ /* try to keep allocated memory in the range of [2,10] * initial_chunk_size */
+ if (maybe_active_xid.elements <= 2 * active_xid_init_alloc() &&
+ maybe_active_xid.max_element > 10 * active_xid_init_alloc())
+ freeze_size(&maybe_active_xid);
+
+ /* No matching XID conflicts. */
+ return nullptr;
+}
+
+
+/*
Obtain a worker thread that we can queue an event to.
Each invocation allocates a new worker thread, to maximise
@@ -2528,40 +2629,70 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
PSI_stage_info *old_stage,
Gtid_log_event *gtid_ev)
{
- uint32 idx;
+ sched_bucket *cur_thr;
- idx= rpl_thread_idx;
if (gtid_ev)
{
- if (++idx >= rpl_thread_max)
- idx= 0;
+ /* New event group; cycle the thread scheduling buckets round-robin. */
+ thread_sched_fifo->push_back(thread_sched_fifo->get());
+
//rpl_thread_idx will be updated handle_split_alter
- if (handle_split_alter(this, gtid_ev, &idx, did_enter_cond, rgi, old_stage))
- return rpl_threads[idx];
+ if (handle_split_alter(this, gtid_ev, &cur_thr, did_enter_cond, rgi,
+ old_stage))
+ return cur_thr->thr;
+
if (gtid_ev->flags2 &
(Gtid_log_event::FL_COMPLETED_XA | Gtid_log_event::FL_PREPARED_XA))
- {
- idx= my_hash_sort(&my_charset_bin, gtid_ev->xid.key(),
- gtid_ev->xid.key_length()) % rpl_thread_max;
+ {
+ if ((cur_thr= check_xa_xid_dependency(&gtid_ev->xid)))
+ {
+ /*
+ A previously scheduled event group with the same XID might still be
+ active in a worker, so schedule this event group in the same worker
+ to avoid a conflict.
+ */
+ cur_thr->unlink();
+ thread_sched_fifo->append(cur_thr);
+ }
+ else
+ {
+ /* Record this XID now active. */
+ xid_active_generation *a=
+ (xid_active_generation *)alloc_dynamic(&maybe_active_xid);
+ if (!a)
+ return NULL;
+ a->thr= cur_thr= thread_sched_fifo->head();
+ a->generation= current_generation;
+ a->xid.set(&gtid_ev->xid);
+ }
}
- rpl_thread_idx= idx;
+ else
+ cur_thr= thread_sched_fifo->head();
+
+ check_scheduling_generation(cur_thr);
}
- return choose_thread_internal(idx, did_enter_cond, rgi, old_stage);
+ else
+ cur_thr= thread_sched_fifo->head();
+
+ return choose_thread_internal(cur_thr /*idx*/, did_enter_cond, rgi, old_stage);
}
-rpl_parallel_thread * rpl_parallel_entry::choose_thread_internal(uint idx,
- bool *did_enter_cond, rpl_group_info *rgi,
- PSI_stage_info *old_stage)
+rpl_parallel_thread *
+rpl_parallel_entry::choose_thread_internal(sched_bucket *cur_thr,
+ bool *did_enter_cond,
+ rpl_group_info *rgi,
+ PSI_stage_info *old_stage)
{
- rpl_parallel_thread* thr= rpl_threads[idx];
Relay_log_info *rli= rgi->rli;
+ rpl_parallel_thread *thr= cur_thr->thr;
+
if (thr)
{
*did_enter_cond= false;
mysql_mutex_lock(&thr->LOCK_rpl_thread);
for (;;)
{
- if (thr->current_owner != &rpl_threads[idx])
+ if (thr->current_owner != &cur_thr->thr)
{
/*
The worker thread became idle, and returned to the free list and
@@ -2593,16 +2724,16 @@ rpl_parallel_thread * rpl_parallel_entry::choose_thread_internal(uint idx,
and this can cause THD::awake to use the wrong mutex.
*/
#ifdef ENABLED_DEBUG_SYNC
- DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
- {
- debug_sync_set_action(rli->sql_driver_thd,
- STRING_WITH_LEN("now SIGNAL wait_queue_ready"));
- };);
+ DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", {
+ debug_sync_set_action(
+ rli->sql_driver_thd,
+ STRING_WITH_LEN("now SIGNAL wait_queue_ready"));
+ };);
#endif
- rli->sql_driver_thd->ENTER_COND(&thr->COND_rpl_thread_queue,
- &thr->LOCK_rpl_thread,
- &stage_waiting_for_room_in_worker_thread,
- old_stage);
+ rli->sql_driver_thd->set_time_for_next_stage();
+ rli->sql_driver_thd->ENTER_COND(
+ &thr->COND_rpl_thread_queue, &thr->LOCK_rpl_thread,
+ &stage_waiting_for_room_in_worker_thread, old_stage);
*did_enter_cond= true;
}
@@ -2612,11 +2743,11 @@ rpl_parallel_thread * rpl_parallel_entry::choose_thread_internal(uint idx,
did_enter_cond, old_stage);
my_error(ER_CONNECTION_KILLED, MYF(0));
#ifdef ENABLED_DEBUG_SYNC
- DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
- {
- debug_sync_set_action(rli->sql_driver_thd,
- STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
- };);
+ DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max", {
+ debug_sync_set_action(
+ rli->sql_driver_thd,
+ STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
+ };);
#endif
slave_output_error_info(rgi, rli->sql_driver_thd);
return NULL;
@@ -2626,9 +2757,10 @@ rpl_parallel_thread * rpl_parallel_entry::choose_thread_internal(uint idx,
}
}
}
+
if (!thr)
- rpl_threads[idx]= thr= global_rpl_thread_pool.get_thread(&rpl_threads[idx],
- this);
+ cur_thr->thr= thr=
+ global_rpl_thread_pool.get_thread(&cur_thr->thr, this);
return thr;
}
@@ -2643,6 +2775,7 @@ free_rpl_parallel_entry(void *element)
dealloc_gco(e->current_gco);
e->current_gco= prev_gco;
}
+ delete_dynamic(&e->maybe_active_xid);
mysql_cond_destroy(&e->COND_parallel_entry);
mysql_mutex_destroy(&e->LOCK_parallel_entry);
my_free(e);
@@ -2686,17 +2819,37 @@ rpl_parallel::find(uint32 domain_id, Relay_log_info *rli)
ulong count= opt_slave_domain_parallel_threads;
if (count == 0 || count > opt_slave_parallel_threads)
count= opt_slave_parallel_threads;
- rpl_parallel_thread **p;
+ rpl_parallel_entry::sched_bucket *p;
+ I_List<rpl_parallel_entry::sched_bucket> *fifo;
if (!my_multi_malloc(PSI_INSTRUMENT_ME, MYF(MY_WME|MY_ZEROFILL),
&e, sizeof(*e),
&p, count*sizeof(*p),
+ &fifo, sizeof(*fifo),
NULL))
{
my_error(ER_OUTOFMEMORY, MYF(0), (int)(sizeof(*e)+count*sizeof(*p)));
return NULL;
}
+ /* Initialize a FIFO of scheduled worker threads. */
+ e->thread_sched_fifo = new (fifo) I_List<rpl_parallel_entry::sched_bucket>;
+ /*
+ (We cycle the FIFO _before_ allocating next entry in
+ rpl_parallel_entry::choose_thread(). So initialize the FIFO with the
+ highest element at the front, just so that the first event group gets
+ scheduled on entry 0).
+ */
+ e->thread_sched_fifo->
+ push_back(::new (p+count-1) rpl_parallel_entry::sched_bucket);
+ for (ulong i= 0; i < count-1; ++i)
+ e->thread_sched_fifo->
+ push_back(::new (p+i) rpl_parallel_entry::sched_bucket);
e->rpl_threads= p;
e->rpl_thread_max= count;
+ e->current_generation = 0;
+ e->current_generation_idx = 0;
+ init_dynamic_array2(PSI_INSTRUMENT_ME, &e->maybe_active_xid,
+ sizeof(rpl_parallel_entry::xid_active_generation),
+ 0, e->active_xid_init_alloc(), 0, MYF(0));
e->domain_id= domain_id;
e->stop_on_error_sub_id= (uint64)ULONGLONG_MAX;
e->pause_sub_id= (uint64)ULONGLONG_MAX;
@@ -2766,10 +2919,10 @@ rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli)
mysql_mutex_unlock(&e->LOCK_parallel_entry);
for (j= 0; j < e->rpl_thread_max; ++j)
{
- if ((rpt= e->rpl_threads[j]))
+ if ((rpt= e->rpl_threads[j].thr))
{
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
- if (rpt->current_owner == &e->rpl_threads[j])
+ if (rpt->current_owner == &e->rpl_threads[j].thr)
mysql_cond_signal(&rpt->COND_rpl_thread);
mysql_mutex_unlock(&rpt->LOCK_rpl_thread);
}
@@ -2828,10 +2981,10 @@ rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli)
e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i);
for (j= 0; j < e->rpl_thread_max; ++j)
{
- if ((rpt= e->rpl_threads[j]))
+ if ((rpt= e->rpl_threads[j].thr))
{
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
- while (rpt->current_owner == &e->rpl_threads[j])
+ while (rpt->current_owner == &e->rpl_threads[j].thr)
mysql_cond_wait(&rpt->COND_rpl_thread_stop, &rpt->LOCK_rpl_thread);
mysql_mutex_unlock(&rpt->LOCK_rpl_thread);
}
@@ -2889,7 +3042,7 @@ int
rpl_parallel_entry::queue_master_restart(rpl_group_info *rgi,
Format_description_log_event *fdev)
{
- uint32 idx;
+ sched_bucket *cur_thr;
rpl_parallel_thread *thr;
rpl_parallel_thread::queued_event *qev;
Relay_log_info *rli= rgi->rli;
@@ -2904,12 +3057,12 @@ rpl_parallel_entry::queue_master_restart(rpl_group_info *rgi,
Thus there is no need for the full complexity of choose_thread(). We only
need to check if we have a current worker thread, and queue for it if so.
*/
- idx= rpl_thread_idx;
- thr= rpl_threads[idx];
+ cur_thr= thread_sched_fifo->head();
+ thr= cur_thr->thr;
if (!thr)
return 0;
mysql_mutex_lock(&thr->LOCK_rpl_thread);
- if (thr->current_owner != &rpl_threads[idx])
+ if (thr->current_owner != &cur_thr->thr)
{
/* No active worker thread, so no need to queue the master restart. */
mysql_mutex_unlock(&thr->LOCK_rpl_thread);
@@ -2953,6 +3106,7 @@ rpl_parallel::wait_for_workers_idle(THD *thd)
e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i);
mysql_mutex_lock(&e->LOCK_parallel_entry);
++e->need_sub_id_signal;
+ thd->set_time_for_next_stage();
thd->ENTER_COND(&e->COND_parallel_entry, &e->LOCK_parallel_entry,
&stage_waiting_for_workers_idle, &old_stage);
while (e->current_sub_id > e->last_committed_sub_id)
diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h
index 307d0e3b..ef872dec 100644
--- a/sql/rpl_parallel.h
+++ b/sql/rpl_parallel.h
@@ -344,6 +344,27 @@ struct rpl_parallel_thread_pool {
struct rpl_parallel_entry {
+ /*
+ A small struct to put worker threads references into a FIFO (using an
+ I_List) for round-robin scheduling.
+ */
+ struct sched_bucket : public ilink {
+ sched_bucket() : thr(nullptr) { }
+ rpl_parallel_thread *thr;
+ };
+ /*
+ A struct to keep track of into which "generation" an XA XID was last
+ scheduled. A "generation" means that we know that every worker thread
+ slot in the rpl_parallel_entry was scheduled at least once. When more
+ that two generations have passed, we can safely reuse the XID in a
+ different worker.
+ */
+ struct xid_active_generation {
+ uint64 generation;
+ sched_bucket *thr;
+ xid_t xid;
+ };
+
mysql_mutex_t LOCK_parallel_entry;
mysql_cond_t COND_parallel_entry;
uint32 domain_id;
@@ -374,17 +395,36 @@ struct rpl_parallel_entry {
uint64 stop_sub_id;
/*
- Cyclic array recording the last rpl_thread_max worker threads that we
+ Array recording the last rpl_thread_max worker threads that we
queued event for. This is used to limit how many workers a single domain
can occupy (--slave-domain-parallel-threads).
+ The array is structured as a FIFO using an I_List thread_sched_fifo.
+
Note that workers are never explicitly deleted from the array. Instead,
we need to check (under LOCK_rpl_thread) that the thread still belongs
to us before re-using (rpl_thread::current_owner).
*/
- rpl_parallel_thread **rpl_threads;
+ sched_bucket *rpl_threads;
+ I_List<sched_bucket> *thread_sched_fifo;
uint32 rpl_thread_max;
- uint32 rpl_thread_idx;
+ /*
+ Keep track of all XA XIDs that may still be active in a worker thread.
+ The elements are of type xid_active_generation.
+ */
+ DYNAMIC_ARRAY maybe_active_xid;
+ /*
+ Keeping track of the current scheduling generation.
+
+ A new generation means that every worker thread in the rpl_threads array
+ have been scheduled at least one event group.
+
+ When we have scheduled to slot current_generation_idx= 0, 1, ..., N-1 in this
+ order, we know that (at least) one generation has passed.
+ */
+ uint64 current_generation;
+ uint32 current_generation_idx;
+
/*
The sub_id of the last transaction to commit within this domain_id.
Must be accessed under LOCK_parallel_entry protection.
@@ -440,14 +480,22 @@ struct rpl_parallel_entry {
/* Relay log info of replication source for this entry. */
Relay_log_info *rli;
+ void check_scheduling_generation(sched_bucket *cur);
+ sched_bucket *check_xa_xid_dependency(xid_t *xid);
rpl_parallel_thread * choose_thread(rpl_group_info *rgi, bool *did_enter_cond,
PSI_stage_info *old_stage,
Gtid_log_event *gtid_ev);
rpl_parallel_thread *
- choose_thread_internal(uint idx, bool *did_enter_cond, rpl_group_info *rgi,
- PSI_stage_info *old_stage);
+ choose_thread_internal(sched_bucket *cur_thr, bool *did_enter_cond,
+ rpl_group_info *rgi, PSI_stage_info *old_stage);
int queue_master_restart(rpl_group_info *rgi,
Format_description_log_event *fdev);
+ /*
+ the initial size of maybe_ array corresponds to the case of
+ each worker receives perhaps unlikely XA-PREPARE and XA-COMMIT within
+ the same generation.
+ */
+ inline uint active_xid_init_alloc() { return 3 * 2 * rpl_thread_max; }
};
struct rpl_parallel {
HASH domain_hash;
@@ -470,6 +518,7 @@ struct rpl_parallel {
extern struct rpl_parallel_thread_pool global_rpl_thread_pool;
+extern void wait_for_pending_deadlock_kill(THD *thd, rpl_group_info *rgi);
extern int rpl_parallel_resize_pool_if_no_slaves(void);
extern int rpl_parallel_activate_pool(rpl_parallel_thread_pool *pool);
extern int rpl_parallel_inactivate_pool(rpl_parallel_thread_pool *pool);
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 68f42494..a8e59f28 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -44,8 +44,6 @@ rpl_slave_state *rpl_global_gtid_slave_state;
/* Object used for MASTER_GTID_WAIT(). */
gtid_waiting rpl_global_gtid_waiting;
-const char *const Relay_log_info::state_delaying_string = "Waiting until MASTER_DELAY seconds after master executed event";
-
Relay_log_info::Relay_log_info(bool is_slave_recovery, const char* thread_name)
:Slave_reporting_capability(thread_name),
replicate_same_server_id(::replicate_same_server_id),
@@ -2262,7 +2260,7 @@ delete_or_keep_event_post_apply(rpl_group_info *rgi,
}
-void rpl_group_info::cleanup_context(THD *thd, bool error)
+void rpl_group_info::cleanup_context(THD *thd, bool error, bool keep_domain_owner)
{
DBUG_ENTER("rpl_group_info::cleanup_context");
DBUG_PRINT("enter", ("error: %d", (int) error));
@@ -2317,7 +2315,7 @@ void rpl_group_info::cleanup_context(THD *thd, bool error)
Ensure we always release the domain for others to process, when using
--gtid-ignore-duplicates.
*/
- if (gtid_ignore_duplicate_state != GTID_DUPLICATE_NULL)
+ if (gtid_ignore_duplicate_state != GTID_DUPLICATE_NULL && !keep_domain_owner)
rpl_global_gtid_slave_state->release_domain_owner(this);
}
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index 30e1bb45..cf991584 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -506,11 +506,6 @@ public:
m_flags&= ~flag;
}
- /**
- Text used in THD::proc_info when the slave SQL thread is delaying.
- */
- static const char *const state_delaying_string;
-
bool flush();
/**
@@ -533,7 +528,7 @@ public:
{
mysql_mutex_assert_owner(&data_lock);
sql_delay_end= delay_end;
- thd_proc_info(sql_driver_thd, state_delaying_string);
+ THD_STAGE_INFO(sql_driver_thd, stage_sql_thd_waiting_until_delay);
}
int32 get_sql_delay() { return sql_delay; }
@@ -564,6 +559,10 @@ private:
Guarded by data_lock. Written by the sql thread. Read by client
threads executing SHOW SLAVE STATUS.
+
+ This is calculated as:
+ clock_time_for_event_on_master + clock_difference_between_master_and_slave +
+ SQL_DELAY.
*/
time_t sql_delay_end;
@@ -959,7 +958,7 @@ struct rpl_group_info
}
void clear_tables_to_lock();
- void cleanup_context(THD *, bool);
+ void cleanup_context(THD *, bool, bool keep_domain_owner= false);
void slave_close_thread_tables(THD *);
void mark_start_commit_no_lock();
void mark_start_commit();
diff --git a/sql/semisync_master.cc b/sql/semisync_master.cc
index 9f30a820..aa1056c8 100644
--- a/sql/semisync_master.cc
+++ b/sql/semisync_master.cc
@@ -68,6 +68,19 @@ static ulonglong timespec_to_usec(const struct timespec *ts)
return (ulonglong) ts->tv_sec * TIME_MILLION + ts->tv_nsec / TIME_THOUSAND;
}
+int signal_waiting_transaction(THD *waiting_thd, const char *binlog_file,
+ my_off_t binlog_pos)
+{
+ /*
+ It is possible that the connection thd waiting for an ACK was killed. In
+ such circumstance, the connection thread will nullify the thd member of its
+ Active_tranx node. So before we try to signal, ensure the THD exists.
+ */
+ if (waiting_thd)
+ mysql_cond_signal(&waiting_thd->COND_wakeup_ready);
+ return 0;
+}
+
/*******************************************************************************
*
* <Active_tranx> class : manage all active transaction nodes
@@ -75,12 +88,14 @@ static ulonglong timespec_to_usec(const struct timespec *ts)
******************************************************************************/
Active_tranx::Active_tranx(mysql_mutex_t *lock,
+ mysql_cond_t *cond,
ulong trace_level)
: Trace(trace_level), m_allocator(max_connections),
m_num_entries(max_connections << 1), /* Transaction hash table size
* is set to double the size
* of max_connections */
- m_lock(lock)
+ m_lock(lock),
+ m_cond_empty(cond)
{
/* No transactions are in the list initially. */
m_trx_front = NULL;
@@ -142,7 +157,8 @@ int Active_tranx::compare(const char *log_file_name1, my_off_t log_file_pos1,
return 0;
}
-int Active_tranx::insert_tranx_node(const char *log_file_name,
+int Active_tranx::insert_tranx_node(THD *thd_to_wait,
+ const char *log_file_name,
my_off_t log_file_pos)
{
Tranx_node *ins_node;
@@ -165,6 +181,7 @@ int Active_tranx::insert_tranx_node(const char *log_file_name,
strncpy(ins_node->log_name, log_file_name, FN_REFLEN-1);
ins_node->log_name[FN_REFLEN-1] = 0; /* make sure it ends properly */
ins_node->log_pos = log_file_pos;
+ ins_node->thd= thd_to_wait;
if (!m_trx_front)
{
@@ -232,28 +249,22 @@ bool Active_tranx::is_tranx_end_pos(const char *log_file_name,
DBUG_RETURN(entry != NULL);
}
-void Active_tranx::clear_active_tranx_nodes(const char *log_file_name,
- my_off_t log_file_pos)
+void Active_tranx::clear_active_tranx_nodes(
+ const char *log_file_name, my_off_t log_file_pos,
+ active_tranx_action pre_delete_hook)
{
Tranx_node *new_front;
DBUG_ENTER("Active_tranx::::clear_active_tranx_nodes");
- if (log_file_name != NULL)
- {
- new_front = m_trx_front;
-
- while (new_front)
- {
- if (compare(new_front, log_file_name, log_file_pos) > 0)
- break;
- new_front = new_front->next;
- }
- }
- else
+ new_front= m_trx_front;
+ while (new_front)
{
- /* If log_file_name is NULL, clear everything. */
- new_front = NULL;
+ if ((log_file_name != NULL) &&
+ compare(new_front, log_file_name, log_file_pos) > 0)
+ break;
+ pre_delete_hook(new_front->thd, new_front->log_name, new_front->log_pos);
+ new_front = new_front->next;
}
if (new_front == NULL)
@@ -315,9 +326,66 @@ void Active_tranx::clear_active_tranx_nodes(const char *log_file_name,
m_trx_front->log_name, (ulong)m_trx_front->log_pos));
}
+ /*
+ m_cond_empty aliases Repl_semi_sync_master::COND_binlog, which holds the
+ condition variable to notify that we have cleared all nodes, e.g. used by
+ SHUTDOWN WAIT FOR ALL SLAVES.
+ */
+ if (is_empty())
+ mysql_cond_signal(m_cond_empty);
+
DBUG_VOID_RETURN;
}
+void Active_tranx::unlink_thd_as_waiter(const char *log_file_name,
+ my_off_t log_file_pos)
+{
+ DBUG_ENTER("Active_tranx::unlink_thd_as_waiter");
+ mysql_mutex_assert_owner(m_lock);
+
+ unsigned int hash_val = get_hash_value(log_file_name, log_file_pos);
+ Tranx_node *entry = m_trx_htb[hash_val];
+
+ while (entry != NULL)
+ {
+ if (compare(entry, log_file_name, log_file_pos) == 0)
+ break;
+
+ entry = entry->hash_next;
+ }
+
+ if (entry)
+ entry->thd= NULL;
+
+ DBUG_VOID_RETURN;
+}
+
+#ifndef DBUG_OFF
+void Active_tranx::assert_thd_is_waiter(THD *thd_to_check,
+ const char *log_file_name,
+ my_off_t log_file_pos)
+{
+ DBUG_ENTER("Active_tranx::assert_thd_is_waiter");
+ mysql_mutex_assert_owner(m_lock);
+
+ unsigned int hash_val = get_hash_value(log_file_name, log_file_pos);
+ Tranx_node *entry = m_trx_htb[hash_val];
+
+ while (entry != NULL)
+ {
+ if (compare(entry, log_file_name, log_file_pos) == 0)
+ break;
+
+ entry = entry->hash_next;
+ }
+
+ DBUG_ASSERT(entry);
+ DBUG_ASSERT(entry->thd);
+ DBUG_ASSERT(entry->thd->thread_id == thd_to_check->thread_id);
+
+ DBUG_VOID_RETURN;
+}
+#endif
/*******************************************************************************
*
@@ -397,7 +465,8 @@ int Repl_semi_sync_master::enable_master()
if (!get_master_enabled())
{
- m_active_tranxs = new Active_tranx(&LOCK_binlog, m_trace_level);
+ m_active_tranxs=
+ new Active_tranx(&LOCK_binlog, &COND_binlog_send, m_trace_level);
if (m_active_tranxs != NULL)
{
m_commit_file_name_inited = false;
@@ -459,15 +528,6 @@ 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)
{
@@ -500,23 +560,6 @@ void Repl_semi_sync_master::unlock()
mysql_mutex_unlock(&LOCK_binlog);
}
-void Repl_semi_sync_master::cond_broadcast()
-{
- mysql_cond_broadcast(&COND_binlog_send);
-}
-
-int Repl_semi_sync_master::cond_timewait(struct timespec *wait_time)
-{
- int wait_res;
-
- DBUG_ENTER("Repl_semi_sync_master::cond_timewait()");
-
- wait_res= mysql_cond_timedwait(&COND_binlog_send,
- &LOCK_binlog, wait_time);
-
- DBUG_RETURN(wait_res);
-}
-
void Repl_semi_sync_master::add_slave()
{
lock();
@@ -533,7 +576,8 @@ void Repl_semi_sync_master::remove_slave()
Signal transactions waiting in commit_trx() that they do not have to
wait anymore.
*/
- cond_broadcast();
+ m_active_tranxs->clear_active_tranx_nodes(NULL, 0,
+ signal_waiting_transaction);
}
unlock();
}
@@ -616,7 +660,6 @@ int Repl_semi_sync_master::report_reply_binlog(uint32 server_id,
my_off_t log_file_pos)
{
int cmp;
- bool can_release_threads = false;
bool need_copy_send_pos = true;
DBUG_ENTER("Repl_semi_sync_master::report_reply_binlog");
@@ -668,45 +711,26 @@ int Repl_semi_sync_master::report_reply_binlog(uint32 server_id,
/* Remove all active transaction nodes before this point. */
DBUG_ASSERT(m_active_tranxs != NULL);
- m_active_tranxs->clear_active_tranx_nodes(log_file_name, log_file_pos);
+ m_active_tranxs->clear_active_tranx_nodes(log_file_name, log_file_pos,
+ signal_waiting_transaction);
+ if (m_active_tranxs->is_empty())
+ m_wait_file_name_inited= false;
DBUG_PRINT("semisync", ("%s: Got reply at (%s, %lu)",
"Repl_semi_sync_master::report_reply_binlog",
log_file_name, (ulong)log_file_pos));
}
- if (rpl_semi_sync_master_wait_sessions > 0)
- {
- /* Let us check if some of the waiting threads doing a trx
- * commit can now proceed.
- */
- cmp = Active_tranx::compare(m_reply_file_name, m_reply_file_pos,
- m_wait_file_name, m_wait_file_pos);
- if (cmp >= 0)
- {
- /* Yes, at least one waiting thread can now proceed:
- * let us release all waiting threads with a broadcast
- */
- can_release_threads = true;
- m_wait_file_name_inited = false;
- }
- }
l_end:
unlock();
- if (can_release_threads)
- {
- DBUG_PRINT("semisync", ("%s: signal all waiting threads.",
- "Repl_semi_sync_master::report_reply_binlog"));
-
- cond_broadcast();
- }
DBUG_RETURN(0);
}
-int Repl_semi_sync_master::wait_after_sync(const char *log_file, my_off_t log_pos)
+int Repl_semi_sync_master::wait_after_sync(const char *log_file,
+ my_off_t log_pos)
{
if (!get_master_enabled())
return 0;
@@ -762,24 +786,27 @@ int Repl_semi_sync_master::wait_after_rollback(THD *thd, bool all)
/**
The method runs after flush to binary log is done.
*/
-int Repl_semi_sync_master::report_binlog_update(THD* thd, const char *log_file,
+int Repl_semi_sync_master::report_binlog_update(THD *trans_thd,
+ THD *waiter_thd,
+ const char *log_file,
my_off_t log_pos)
{
if (get_master_enabled())
{
Trans_binlog_info *log_info;
- if (!(log_info= thd->semisync_info))
+ if (!(log_info= trans_thd->semisync_info))
{
if(!(log_info= (Trans_binlog_info*)my_malloc(PSI_INSTRUMENT_ME,
sizeof(Trans_binlog_info), MYF(0))))
return 1;
- thd->semisync_info= log_info;
+ trans_thd->semisync_info= log_info;
}
strcpy(log_info->log_file, log_file + dirname_length(log_file));
log_info->log_pos = log_pos;
- return write_tranx_in_binlog(log_info->log_file, log_pos);
+ return write_tranx_in_binlog(waiter_thd, log_info->log_file,
+ log_pos);
}
return 0;
@@ -825,7 +852,7 @@ void Repl_semi_sync_master::dump_end(THD* thd)
ack_receiver.remove_slave(thd);
}
-int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
+int Repl_semi_sync_master::commit_trx(const char *trx_wait_binlog_name,
my_off_t trx_wait_binlog_pos)
{
bool success= 0;
@@ -844,7 +871,7 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
int wait_result;
PSI_stage_info old_stage;
THD *thd= current_thd;
- bool aborted= 0;
+ bool aborted __attribute__((unused)) = 0;
set_timespec(start_ts, 0);
DEBUG_SYNC(thd, "rpl_semisync_master_commit_trx_before_lock");
@@ -852,9 +879,8 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
lock();
/* This must be called after acquired the lock */
- THD_ENTER_COND(thd, &COND_binlog_send, &LOCK_binlog,
- & stage_waiting_for_semi_sync_ack_from_slave,
- & old_stage);
+ THD_ENTER_COND(thd, &thd->COND_wakeup_ready, &LOCK_binlog,
+ &stage_waiting_for_semi_sync_ack_from_slave, &old_stage);
/* This is the real check inside the mutex. */
if (!get_master_enabled() || !is_on())
@@ -865,7 +891,7 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
trx_wait_binlog_name, (ulong)trx_wait_binlog_pos,
(int)is_on()));
- while (is_on() && !thd_killed(thd))
+ while (is_on() && !(aborted= thd_killed(thd)))
{
/* We have to check these again as things may have changed */
if (!rpl_semi_sync_master_clients && !rpl_semi_sync_master_wait_no_slave)
@@ -902,7 +928,7 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
trx_wait_binlog_pos,
m_wait_file_name, m_wait_file_pos);
if (cmp <= 0)
- {
+ {
/* This thd has a lower position, let's update the minimum info. */
strmake_buf(m_wait_file_name, trx_wait_binlog_name);
m_wait_file_pos = trx_wait_binlog_pos;
@@ -934,20 +960,18 @@ 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));
+#ifndef DBUG_OFF
+ m_active_tranxs->assert_thd_is_waiter(thd, trx_wait_binlog_name,
+ trx_wait_binlog_pos);
+#endif
create_timeout(&abstime, &start_ts);
- wait_result = cond_timewait(&abstime);
-
- set_thd_awaiting_semisync_ack(thd, FALSE);
+ wait_result= mysql_cond_timedwait(&thd->COND_wakeup_ready, &LOCK_binlog,
+ &abstime);
rpl_semi_sync_master_wait_sessions--;
if (wait_result != 0)
@@ -979,17 +1003,49 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
{
rpl_semi_sync_master_trx_wait_num++;
rpl_semi_sync_master_trx_wait_time += wait_time;
+
+ DBUG_EXECUTE_IF("testing_cond_var_per_thd", {
+ /*
+ DBUG log warning to ensure we have either recieved our ACK; or
+ have timed out and are awoken in an off state. Test
+ rpl.rpl_semi_sync_cond_var_per_thd scans the logs to ensure this
+ warning is not present.
+ */
+ bool valid_wakeup=
+ (!get_master_enabled() || !is_on() || thd->is_killed() ||
+ 0 <= Active_tranx::compare(
+ m_reply_file_name, m_reply_file_pos,
+ trx_wait_binlog_name, trx_wait_binlog_pos));
+ if (!valid_wakeup)
+ {
+ sql_print_warning(
+ "Thread awaiting semi-sync ACK was awoken before its "
+ "ACK. THD (%llu), Wait coord: (%s, %llu), ACK coord: (%s, "
+ "%llu)",
+ thd->thread_id, trx_wait_binlog_name, trx_wait_binlog_pos,
+ m_reply_file_name, m_reply_file_pos);
+ }
+ });
}
}
}
/*
+ If our THD was killed (rather than awoken from an ACK) notify the
+ Active_tranx cache that we are no longer waiting for the ACK, so nobody
+ signals our COND var invalidly.
+ */
+ if (aborted)
+ m_active_tranxs->unlink_thd_as_waiter(trx_wait_binlog_name,
+ trx_wait_binlog_pos);
+
+ /*
At this point, the binlog file and position of this transaction
must have been removed from Active_tranx.
m_active_tranxs may be NULL if someone disabled semi sync during
- cond_timewait()
+ mysql_cond_timedwait
*/
- DBUG_ASSERT(thd_killed(thd) || !m_active_tranxs || aborted ||
+ DBUG_ASSERT(aborted || !m_active_tranxs || m_active_tranxs->is_empty() ||
!m_active_tranxs->is_tranx_end_pos(trx_wait_binlog_name,
trx_wait_binlog_pos));
@@ -1030,20 +1086,21 @@ void Repl_semi_sync_master::switch_off()
{
DBUG_ENTER("Repl_semi_sync_master::switch_off");
+ /* Clear the active transaction list. */
+ if (m_active_tranxs)
+ m_active_tranxs->clear_active_tranx_nodes(NULL, 0,
+ signal_waiting_transaction);
+
if (m_state)
{
m_state = false;
- /* Clear the active transaction list. */
- DBUG_ASSERT(m_active_tranxs != NULL);
- m_active_tranxs->clear_active_tranx_nodes(NULL, 0);
rpl_semi_sync_master_off_times++;
m_wait_file_name_inited = false;
m_reply_file_name_inited = false;
sql_print_information("Semi-sync replication switched OFF.");
}
- cond_broadcast(); /* wake up all waiting threads */
DBUG_VOID_RETURN;
}
@@ -1190,7 +1247,8 @@ int Repl_semi_sync_master::update_sync_header(THD* thd, unsigned char *packet,
DBUG_RETURN(0);
}
-int Repl_semi_sync_master::write_tranx_in_binlog(const char* log_file_name,
+int Repl_semi_sync_master::write_tranx_in_binlog(THD *thd,
+ const char *log_file_name,
my_off_t log_file_pos)
{
int result = 0;
@@ -1233,7 +1291,7 @@ int Repl_semi_sync_master::write_tranx_in_binlog(const char* log_file_name,
if (is_on())
{
DBUG_ASSERT(m_active_tranxs != NULL);
- if(m_active_tranxs->insert_tranx_node(log_file_name, log_file_pos))
+ if(m_active_tranxs->insert_tranx_node(thd, log_file_name, log_file_pos))
{
/*
if insert tranx_node failed, print a warning message
@@ -1362,21 +1420,34 @@ void Repl_semi_sync_master::set_export_stats()
unlock();
}
-void Repl_semi_sync_master::await_slave_reply()
+void Repl_semi_sync_master::await_all_slave_replies(const char *msg)
{
- struct timespec abstime;
+ struct timespec timeout;
+ int wait_result= 0;
+ bool first= true;
+ DBUG_ENTER("Repl_semi_sync_master::::await_all_slave_replies");
- 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;
+ /*
+ Wait for all transactions that need ACKS to have received them; or timeout.
+ If it is a timeout, the connection thread should attempt to turn off
+ semi-sync and broadcast to all other waiting threads to move on.
- create_timeout(&abstime, NULL);
- cond_timewait(&abstime);
+ COND_binlog_send is only signalled after the Active_tranx cache has been
+ emptied.
+ */
+ create_timeout(&timeout, NULL);
+ lock();
+ while (get_master_enabled() && is_on() && !m_active_tranxs->is_empty() && !wait_result)
+ {
+ if (msg && first)
+ {
+ first= false;
+ sql_print_information(msg);
+ }
-end:
+ wait_result=
+ mysql_cond_timedwait(&COND_binlog_send, &LOCK_binlog, &timeout);
+ }
unlock();
DBUG_VOID_RETURN;
}
diff --git a/sql/semisync_master.h b/sql/semisync_master.h
index 99f46869..3978d21a 100644
--- a/sql/semisync_master.h
+++ b/sql/semisync_master.h
@@ -31,6 +31,7 @@ extern PSI_cond_key key_COND_binlog_send;
struct Tranx_node {
char log_name[FN_REFLEN];
my_off_t log_pos;
+ THD *thd; /* The thread awaiting an ACK */
struct Tranx_node *next; /* the next node in the sorted list */
struct Tranx_node *hash_next; /* the next node during hash collision */
};
@@ -289,6 +290,18 @@ private:
};
/**
+ Function pointer type to run on the contents of an Active_tranx node.
+
+ Return 0 for success, 1 for error.
+
+ Note Repl_semi_sync_master::LOCK_binlog is not guaranteed to be held for
+ its invocation. See the context in which it is called to know.
+*/
+
+typedef int (*active_tranx_action)(THD *trx_thd, const char *log_file_name,
+ my_off_t trx_log_file_pos);
+
+/**
This class manages memory for active transaction list.
We record each active transaction with a Tranx_node, each session
@@ -308,6 +321,7 @@ private:
int m_num_entries; /* maximum hash table entries */
mysql_mutex_t *m_lock; /* mutex lock */
+ mysql_cond_t *m_cond_empty; /* signalled when cleared all Tranx_node */
inline void assert_lock_owner();
@@ -330,7 +344,8 @@ private:
}
public:
- Active_tranx(mysql_mutex_t *lock, unsigned long trace_level);
+ Active_tranx(mysql_mutex_t *lock, mysql_cond_t *cond,
+ unsigned long trace_level);
~Active_tranx();
/* Insert an active transaction node with the specified position.
@@ -338,15 +353,38 @@ public:
* Return:
* 0: success; non-zero: error
*/
- int insert_tranx_node(const char *log_file_name, my_off_t log_file_pos);
+ int insert_tranx_node(THD *thd_to_wait, const char *log_file_name,
+ my_off_t log_file_pos);
/* Clear the active transaction nodes until(inclusive) the specified
* position.
* If log_file_name is NULL, everything will be cleared: the sorted
* list and the hash table will be reset to empty.
+ *
+ * The pre_delete_hook parameter is a function pointer that will be invoked
+ * for each Active_tranx node, in order, from m_trx_front to m_trx_rear,
+ * e.g. to signal their wakeup condition. Repl_semi_sync_binlog::LOCK_binlog
+ * is held while this is invoked.
*/
void clear_active_tranx_nodes(const char *log_file_name,
- my_off_t log_file_pos);
+ my_off_t log_file_pos,
+ active_tranx_action pre_delete_hook);
+
+ /* Unlinks a thread from a Tranx_node, so it will not be referenced/signalled
+ * if it is separately killed. Note that this keeps the Tranx_node itself in
+ * the cache so it can still be awaited by await_all_slave_replies(), e.g.
+ * as is done by SHUTDOWN WAIT FOR ALL SLAVES.
+ */
+ void unlink_thd_as_waiter(const char *log_file_name, my_off_t log_file_pos);
+
+#ifndef DBUG_OFF
+ /* Uses DBUG_ASSERT statements to ensure that the argument thd_to_check
+ * matches the thread of the respective Tranx_node::thd of the passed in
+ * log_file_name and log_file_pos.
+ */
+ void assert_thd_is_waiter(THD *thd_to_check, const char *log_file_name,
+ my_off_t log_file_pos);
+#endif
/* Given a position, check to see whether the position is an active
* transaction's ending position by probing the hash table.
@@ -359,6 +397,12 @@ public:
static int compare(const char *log_file_name1, my_off_t log_file_pos1,
const char *log_file_name2, my_off_t log_file_pos2);
+
+ /* Check if there are no transactions actively awaiting ACKs. Returns true
+ * if the internal linked list has no entries, false otherwise.
+ */
+ bool is_empty() { return m_trx_front == NULL; }
+
};
/**
@@ -433,8 +477,6 @@ class Repl_semi_sync_master
void lock();
void unlock();
- void cond_broadcast();
- int cond_timewait(struct timespec *wait_time);
/* Is semi-sync replication on? */
bool is_on() {
@@ -472,8 +514,6 @@ 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
@@ -482,10 +522,15 @@ class Repl_semi_sync_master
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)
+ Blocks the calling thread until the ack_receiver either receives ACKs for
+ all transactions awaiting ACKs, or times out (from
+ rpl_semi_sync_master_timeout).
+
+ If info_msg is provided, it will be output via sql_print_information when
+ there are transactions awaiting ACKs; info_msg is not output if there are
+ no transasctions to await.
*/
- void await_slave_reply();
+ void await_all_slave_replies(const char *msg);
/*set the ACK point, after binlog sync or after transaction commit*/
void set_wait_point(unsigned long ack_point)
@@ -561,9 +606,23 @@ class Repl_semi_sync_master
/*Wait after the transaction is rollback*/
int wait_after_rollback(THD *thd, bool all);
- /*Store the current binlog position in m_active_tranxs. This position should
- * be acked by slave*/
- int report_binlog_update(THD *thd, const char *log_file,my_off_t log_pos);
+ /* Store the current binlog position in m_active_tranxs. This position should
+ * be acked by slave.
+ *
+ * Inputs:
+ * trans_thd Thread of the transaction which is executing the
+ * transaction.
+ * waiter_thd Thread that will wait for the ACK from the replica,
+ * which depends on the semi-sync wait point. If AFTER_SYNC,
+ * and also using binlog group commit, this will be the leader
+ * thread of the binlog commit. Otherwise, it is the thread that
+ * is executing the transaction, i.e. the same as trans_thd.
+ * log_file Name of the binlog file that the transaction is written into
+ * log_pos Offset within the binlog file that the transaction is written
+ * at
+ */
+ int report_binlog_update(THD *trans_thd, THD *waiter_thd,
+ const char *log_file, my_off_t log_pos);
int dump_start(THD* thd,
const char *log_file,
@@ -609,13 +668,19 @@ class Repl_semi_sync_master
* semi-sync is on
*
* Input: (the transaction events' ending binlog position)
+ * THD - (IN) thread that will wait for an ACK. This can be the
+ * binlog leader thread when using wait_point
+ * AFTER_SYNC with binlog group commit. In all other
+ * cases, this is the user thread executing the
+ * transaction.
* log_file_name - (IN) transaction ending position's file name
* log_file_pos - (IN) transaction ending position's file offset
*
* Return:
* 0: success; non-zero: error
*/
- int write_tranx_in_binlog(const char* log_file_name, my_off_t log_file_pos);
+ int write_tranx_in_binlog(THD *thd, const char *log_file_name,
+ my_off_t log_file_pos);
/* Read the slave's reply so that we know how much progress the slave makes
* on receive replication events.
@@ -633,30 +698,6 @@ class Repl_semi_sync_master
/*called before reset master*/
int before_reset_master();
- /*
- 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 a311599c..29fa5fd5 100644
--- a/sql/semisync_master_ack_receiver.cc
+++ b/sql/semisync_master_ack_receiver.cc
@@ -149,7 +149,7 @@ bool Ack_receiver::add_slave(THD *thd)
slave->thd= thd;
slave->vio= *thd->net.vio;
slave->vio.mysql_socket.m_psi= NULL;
- slave->vio.read_timeout= 1;
+ slave->vio.read_timeout= 1; // 1 ms
mysql_mutex_lock(&m_mutex);
@@ -338,6 +338,17 @@ void Ack_receiver::run()
*/
net.compress= slave->thd->net.compress;
+ if (unlikely(listener.is_socket_hangup(slave)))
+ {
+ if (global_system_variables.log_warnings > 2)
+ sql_print_warning("Semisync ack receiver got hangup "
+ "from slave server-id %d",
+ slave->server_id());
+ it.remove();
+ m_slaves_changed= true;
+ continue;
+ }
+
len= my_net_read(&net);
if (likely(len != packet_error))
{
diff --git a/sql/semisync_master_ack_receiver.h b/sql/semisync_master_ack_receiver.h
index eacb4b20..6b3ff369 100644
--- a/sql/semisync_master_ack_receiver.h
+++ b/sql/semisync_master_ack_receiver.h
@@ -186,7 +186,7 @@ public:
char buff[100];
/* Clear the signal message */
#ifndef _WIN32
- read(local_read_signal, buff, sizeof(buff));
+ (void) !read(local_read_signal, buff, sizeof(buff));
#else
recv(local_read_signal, buff, sizeof(buff), 0);
#endif /* _WIN32 */
@@ -228,6 +228,11 @@ public:
return m_fds[slave->m_fds_index].revents & POLLIN;
}
+ bool is_socket_hangup(const Slave *slave)
+ {
+ return m_fds[slave->m_fds_index].revents & POLLHUP;
+ }
+
void clear_socket_info(const Slave *slave)
{
m_fds[slave->m_fds_index].fd= -1;
@@ -296,6 +301,11 @@ public:
return FD_ISSET(slave->sock_fd(), &m_fds);
}
+ bool is_socket_hangup(const Slave *slave)
+ {
+ return 0;
+ }
+
bool has_signal_data() override
{
return FD_ISSET(local_read_signal, &m_fds);
diff --git a/sql/semisync_slave.cc b/sql/semisync_slave.cc
index 4314b116..d10754ad 100644
--- a/sql/semisync_slave.cc
+++ b/sql/semisync_slave.cc
@@ -17,6 +17,7 @@
#include <my_global.h>
#include "semisync_slave.h"
+#include "debug_sync.h"
Repl_semi_sync_slave repl_semisync_slave;
@@ -33,7 +34,6 @@ int Repl_semi_sync_slave::init_object()
m_init_done = true;
/* References to the parameter works after set_options(). */
- set_slave_enabled(global_rpl_semi_sync_slave_enabled);
set_trace_level(rpl_semi_sync_slave_trace_level);
set_delay_master(rpl_semi_sync_slave_delay_master);
set_kill_conn_timeout(rpl_semi_sync_slave_kill_conn_timeout);
@@ -128,7 +128,21 @@ void Repl_semi_sync_slave::slave_start(Master_info *mi)
void Repl_semi_sync_slave::slave_stop(Master_info *mi)
{
if (get_slave_enabled())
+ {
+#ifdef ENABLED_DEBUG_SYNC
+ /*
+ TODO: Remove after MDEV-28141
+ */
+ DBUG_EXECUTE_IF("delay_semisync_kill_connection_for_mdev_28141", {
+ const char act[]= "now "
+ "signal at_semisync_kill_connection "
+ "wait_for continue_semisync_kill_connection";
+ DBUG_ASSERT(debug_sync_service);
+ DBUG_ASSERT(!debug_sync_set_action(mi->io_thd, STRING_WITH_LEN(act)));
+ };);
+#endif
kill_connection(mi->mysql);
+ }
set_slave_enabled(0);
}
@@ -167,8 +181,6 @@ void Repl_semi_sync_slave::kill_connection(MYSQL *mysql)
goto failed_graceful_kill;
}
- 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))
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc
index 17240fd4..f8c6ddaa 100644
--- a/sql/service_wsrep.cc
+++ b/sql/service_wsrep.cc
@@ -1,4 +1,4 @@
-/* Copyright 2018-2023 Codership Oy <info@codership.com>
+/* Copyright 2018-2024 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
@@ -201,11 +201,11 @@ extern "C" void wsrep_handle_SR_rollback(THD *bf_thd,
/* Note: do not store/reset globals before wsrep_bf_abort() call
to avoid losing BF thd context. */
- mysql_mutex_lock(&victim_thd->LOCK_thd_data);
if (!(bf_thd && bf_thd != victim_thd))
{
DEBUG_SYNC(victim_thd, "wsrep_before_SR_rollback");
}
+ mysql_mutex_lock(&victim_thd->LOCK_thd_data);
if (bf_thd)
{
wsrep_bf_abort(bf_thd, victim_thd);
@@ -263,12 +263,28 @@ extern "C" my_bool wsrep_thd_order_before(const THD *left, const THD *right)
return FALSE;
}
+/** Check if wsrep transaction is aborting state.
+
+Calling function should make sure that wsrep transaction state
+can't change during this function.
+
+This function is called from
+wsrep_abort_thd where we hold THD::LOCK_thd_data
+wsrep_handle_mdl_conflict we hold THD::LOCK_thd_data
+wsrep_assert_no_bf_bf_wait we hold lock_sys.latch
+innobase_kill_query we hold THD::LOCK_thd_data (THD::awake_no_mutex)
+
+@param thd thread handle
+
+@return true if wsrep transaction is aborting
+@return false if not
+
+*/
extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd)
{
- mysql_mutex_assert_owner(&thd->LOCK_thd_data);
-
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:
@@ -277,7 +293,7 @@ extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd)
case wsrep::transaction::s_aborting:
return true;
default:
- return false;
+ break;
}
return false;
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 0922beba..0a570892 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -4440,23 +4440,23 @@ 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)"
- 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)"
- geo "შეწყდრკáƒáƒ•áƒ¨áƒ˜áƒ áƒ˜ %lld ბáƒáƒ–áƒáƒ›áƒ“ე: '%-.192s' მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი: '%-.48s' ჰáƒáƒ¡áƒ¢áƒ˜: '%-.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)"
- spa "Abortada conexión %lld a la base de datos: '%-.192s' usuario: '%-.48s' equipo: '%-.64s' (%-.64s)"
- 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)"
+ chi "终止的连接 %lld 到数æ®åº“: '%-.192s' 用户: '%-.48s' 主机: '%-.64s'%-.64s (%-.64s)"
+ cze "Spojení %lld do databáze: '%-.192s' uživatel: '%-.48s' stroj: '%-.64s'%-.64s (%-.64s) bylo přerušeno"
+ dan "Afbrød forbindelsen %lld til databasen '%-.192s' bruger: '%-.48s' vært: '%-.64s'%-.64s (%-.64s)"
+ eng "Aborted connection %lld to db: '%-.192s' user: '%-.48s' host: '%-.64s'%-.64s (%-.64s)"
+ est "Ãœhendus katkestatud %lld andmebaas: '%-.192s' kasutaja: '%-.48s' masin: '%-.64s'%-.64s (%-.64s)"
+ fre "Connection %lld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' hôte: '%-.64s'%-.64s (%-.64s)"
+ ger "Abbruch der Verbindung %lld zur Datenbank '%-.192s'. Benutzer: '%-.48s', Host: '%-.64s'%-.64s (%-.64s)"
+ geo "შეწყდრკáƒáƒ•áƒ¨áƒ˜áƒ áƒ˜ %lld ბáƒáƒ–áƒáƒ›áƒ“ე: '%-.192s' მáƒáƒ›áƒ®áƒ›áƒáƒ áƒ”ბელი: '%-.48s' ჰáƒáƒ¡áƒ¢áƒ˜: '%-.64s'%-.64s (%-.64s)"
+ ita "Interrotta la connessione %lld al db: ''%-.192s' utente: '%-.48s' host: '%-.64s'%-.64s (%-.64s)"
+ jpn "接続 %lld ãŒä¸­æ–­ã•ã‚Œã¾ã—ãŸã€‚データベース: '%-.192s' ユーザー: '%-.48s' ホスト: '%-.64s'%-.64s (%-.64s)"
+ nla "Afgebroken verbinding %lld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s'%-.64s (%-.64s)"
+ por "Conexão %lld abortada para banco de dados '%-.192s' - usuário '%-.48s' - 'host' '%-.64s'%-.64s ('%-.64s')"
+ rus "Прервано Ñоединение %lld к базе данных '%-.192s' Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ '%-.48s' Ñ Ñ…Ð¾Ñта '%-.64s'%-.64s (%-.64s)"
+ serbian "Prekinuta konekcija broj %lld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s'%-.64s (%-.64s)"
+ spa "Abortada conexión %lld a la base de datos: '%-.192s' usuario: '%-.48s' equipo: '%-.64s'%-.64s (%-.64s)"
+ swe "Avbröt länken för tråd %lld till db '%-.192s', användare '%-.48s', host '%-.64s'%-.64s (%-.64s)"
+ ukr "Перервано з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ %lld до бази данних: '%-.192s' кориÑтувач: '%-.48s' хоÑÑ‚: '%-.64s'%-.64s (%-.64s)"
ER_UNUSED_10
eng "You should never see it"
geo "ეს ვერáƒáƒ¡áƒ“რáƒáƒ¡ უნდრდáƒáƒ˜áƒœáƒáƒ®áƒáƒ—"
@@ -10673,7 +10673,7 @@ ER_UNKNOWN_DATA_TYPE
eng "Unknown data type: '%-.64s'"
spa "Tipo de datos desconocido: '%-.64s'"
ER_UNKNOWN_OPERATOR
- eng "Operator does not exists: '%-.128s'"
+ eng "Operator does not exist: '%-.128s'"
spa "El operador no existe: '%-.128s'"
ER_UNUSED_29
eng "You should never see it"
diff --git a/sql/slave.cc b/sql/slave.cc
index 27721e1b..9ac467cc 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -858,7 +858,7 @@ static void make_slave_transaction_retry_errors_printable(void)
}
-#define DEFAULT_SLAVE_RETRY_ERRORS 9
+static constexpr uint DEFAULT_SLAVE_RETRY_ERRORS= 10;
bool init_slave_transaction_retry_errors(const char* arg)
{
@@ -900,9 +900,10 @@ bool init_slave_transaction_retry_errors(const char* arg)
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 */
+ slave_transaction_retry_errors[6]= ER_CHECKREAD;
+ slave_transaction_retry_errors[7]= ER_CONNECT_TO_FOREIGN_DATA_SOURCE;
+ slave_transaction_retry_errors[8]= 2013; /* CR_SERVER_LOST */
+ slave_transaction_retry_errors[9]= 12701; /* ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM */
/* Add user codes after this */
for (p= arg, i= DEFAULT_SLAVE_RETRY_ERRORS; *p; )
@@ -1340,6 +1341,8 @@ static bool io_slave_killed(Master_info* mi)
DBUG_ENTER("io_slave_killed");
DBUG_ASSERT(mi->slave_running); // tracking buffer overrun
+ if (mi->abort_slave || mi->io_thd->killed)
+ DBUG_PRINT("info", ("killed"));
DBUG_RETURN(mi->abort_slave || mi->io_thd->killed);
}
@@ -2958,9 +2961,6 @@ void show_master_info_get_fields(THD *thd, List<Item> *field_list,
Item_empty_string(thd, "Slave_SQL_Running", 3),
mem_root);
field_list->push_back(new (mem_root)
- Item_empty_string(thd, "Replicate_Rewrite_DB", 23),
- mem_root);
- field_list->push_back(new (mem_root)
Item_empty_string(thd, "Replicate_Do_DB", 20),
mem_root);
field_list->push_back(new (mem_root)
@@ -3108,6 +3108,21 @@ void show_master_info_get_fields(THD *thd, List<Item> *field_list,
Item_return_int(thd, "Slave_Transactional_Groups", 20,
MYSQL_TYPE_LONGLONG),
mem_root);
+ field_list->push_back(new (mem_root)
+ Item_empty_string(thd, "Replicate_Rewrite_DB", 23),
+ mem_root);
+
+ /*
+ Note, we must never, _ever_, add extra rows to this output of SHOW SLAVE
+ STATUS, except here at the end before the extra rows of SHOW ALL SLAVES
+ STATUS. Otherwise, we break backwards compatibility with applications or
+ scripts that parse the output!
+
+ This also means that we cannot add _any_ new rows in a GA version if a
+ different row was already added in a later MariaDB version, as this would
+ make it impossible to merge the change up while preserving the order of
+ rows.
+ */
if (full)
{
@@ -3223,7 +3238,6 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
&my_charset_bin);
protocol->store(&slave_running[mi->slave_running], &my_charset_bin);
protocol->store(mi->rli.slave_running ? &msg_yes : &msg_no, &my_charset_bin);
- protocol->store(rpl_filter->get_rewrite_db());
protocol->store(rpl_filter->get_do_db());
protocol->store(rpl_filter->get_ignore_db());
@@ -3370,7 +3384,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
// to ensure that we use the same value throughout this function.
const char *slave_sql_running_state=
mi->rli.sql_driver_thd ? mi->rli.sql_driver_thd->proc_info : "";
- if (slave_sql_running_state == Relay_log_info::state_delaying_string)
+ if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name)
{
time_t t= my_time(0), sql_delay_end= mi->rli.get_sql_delay_end();
protocol->store((uint32)(t < sql_delay_end ? sql_delay_end - t : 0));
@@ -3383,6 +3397,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
protocol->store(mi->total_ddl_groups);
protocol->store(mi->total_non_trans_groups);
protocol->store(mi->total_trans_groups);
+ protocol->store(rpl_filter->get_rewrite_db());
if (full)
{
@@ -3557,6 +3572,7 @@ static int init_slave_thread(THD* thd, Master_info *mi,
}
thd->security_ctx->skip_grants();
+ thd->security_ctx->user=(char*) slave_user;
thd->slave_thread= 1;
thd->connection_name= mi->connection_name;
thd->variables.sql_log_slow= !MY_TEST(thd->variables.log_slow_disabled_statements & LOG_SLOW_DISABLE_SLAVE);
@@ -3940,7 +3956,7 @@ apply_event_and_update_pos_apply(Log_event* ev, THD* thd, rpl_group_info *rgi,
if (thd->system_thread == SYSTEM_THREAD_SLAVE_SQL &&
((rli->mi->using_parallel() &&
rli->mi->parallel_mode <= SLAVE_PARALLEL_CONSERVATIVE) ||
- wsrep_ready == 0)) {
+ !wsrep_ready_get())) {
rli->abort_slave= 1;
rli->report(ERROR_LEVEL, ER_UNKNOWN_COM_ERROR, rgi->gtid_info(),
"Node has dropped from cluster");
@@ -4407,6 +4423,13 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
rli->last_inuse_relaylog->dequeued_count))) &&
event_can_update_last_master_timestamp(ev))
{
+ /*
+ This is the first event from the master after the slave was up to date
+ and has been waiting for new events.
+ We update last_master_timestamp before executing the event to not
+ have Seconds_after_master == 0 while executing the event.
+ last_master_timestamp will be updated again when the event is commited.
+ */
if (rli->last_master_timestamp < ev->when)
{
rli->last_master_timestamp= ev->when;
@@ -4443,7 +4466,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
Seconds_Behind_Master is zero.
*/
if (ev->get_type_code() != FORMAT_DESCRIPTION_EVENT &&
- rli->last_master_timestamp < ev->when)
+ rli->last_master_timestamp < ev->when + (time_t) ev->exec_time)
rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
DBUG_ASSERT(rli->last_master_timestamp >= 0);
@@ -7584,9 +7607,6 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
default_client_charset_info->cs_name.str);
}
- /* This one is not strictly needed but we have it here for completeness */
- mysql_options(mysql, MYSQL_SET_CHARSET_DIR, (char *) charsets_dir);
-
/* Set MYSQL_PLUGIN_DIR in case master asks for an external authentication plugin */
if (opt_plugin_dir_ptr && *opt_plugin_dir_ptr)
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr);
@@ -7730,8 +7750,6 @@ MYSQL *rpl_connect_master(MYSQL *mysql)
mysql_options(mysql, MYSQL_SET_CHARSET_NAME,
default_charset_info->cs_name.str);
- /* This one is not strictly needed but we have it here for completeness */
- mysql_options(mysql, MYSQL_SET_CHARSET_DIR, (char *) charsets_dir);
if (mi->user == NULL
|| mi->user[0] == 0
diff --git a/sql/sp.cc b/sql/sp.cc
index 32353435..4f82b983 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1944,7 +1944,7 @@ Sp_handler::sp_show_create_routine(THD *thd,
DBUG_EXECUTE_IF("cache_sp_in_show_create",
/* Some tests need just need a way to cache SP without other side-effects.*/
- sp_cache_routine(thd, name, false, &sp);
+ sp_cache_routine(thd, name, &sp);
sp->show_create_routine(thd, this);
DBUG_RETURN(false);
);
@@ -2368,7 +2368,7 @@ Sp_handler::sp_cache_routine_reentrant(THD *thd,
int ret;
Parser_state *oldps= thd->m_parser_state;
thd->m_parser_state= NULL;
- ret= sp_cache_routine(thd, name, false, sp);
+ ret= sp_cache_routine(thd, name, sp);
thd->m_parser_state= oldps;
return ret;
}
@@ -2775,7 +2775,6 @@ void sp_update_stmt_used_routines(THD *thd, Query_tables_list *prelocking_ctx,
*/
int Sroutine_hash_entry::sp_cache_routine(THD *thd,
- bool lookup_only,
sp_head **sp) const
{
char qname_buff[NAME_LEN*2+1+1];
@@ -2788,7 +2787,7 @@ int Sroutine_hash_entry::sp_cache_routine(THD *thd,
*/
DBUG_ASSERT(mdl_request.ticket || this == thd->lex->sroutines_list.first);
- return m_handler->sp_cache_routine(thd, &name, lookup_only, sp);
+ return m_handler->sp_cache_routine(thd, &name, sp);
}
@@ -2800,9 +2799,6 @@ int Sroutine_hash_entry::sp_cache_routine(THD *thd,
@param[in] thd Thread context.
@param[in] name Name of routine.
- @param[in] lookup_only Only check that the routine is in the cache.
- If it's not, don't try to load. If it is present,
- but old, don't try to reload.
@param[out] sp Pointer to sp_head object for routine, NULL if routine was
not found.
@@ -2813,7 +2809,6 @@ int Sroutine_hash_entry::sp_cache_routine(THD *thd,
int Sp_handler::sp_cache_routine(THD *thd,
const Database_qualified_name *name,
- bool lookup_only,
sp_head **sp) const
{
int ret= 0;
@@ -2825,9 +2820,6 @@ int Sp_handler::sp_cache_routine(THD *thd,
*sp= sp_cache_lookup(spc, name);
- if (lookup_only)
- DBUG_RETURN(SP_OK);
-
if (*sp)
{
sp_cache_flush_obsolete(spc, sp);
@@ -2879,7 +2871,6 @@ int Sp_handler::sp_cache_routine(THD *thd,
* name->m_db is a database name, e.g. "dbname"
* name->m_name is a package-qualified name,
e.g. "pkgname.spname"
- @param lookup_only - don't load mysql.proc if not cached
@param [OUT] sp - the result is returned here.
@retval false - loaded or does not exists
@retval true - error while loading mysql.proc
@@ -2889,14 +2880,13 @@ int
Sp_handler::sp_cache_package_routine(THD *thd,
const LEX_CSTRING &pkgname_cstr,
const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const
+ sp_head **sp) const
{
DBUG_ENTER("sp_cache_package_routine");
DBUG_ASSERT(type() == SP_TYPE_FUNCTION || type() == SP_TYPE_PROCEDURE);
sp_name pkgname(&name->m_db, &pkgname_cstr, false);
sp_head *ph= NULL;
int ret= sp_handler_package_body.sp_cache_routine(thd, &pkgname,
- lookup_only,
&ph);
if (!ret)
{
@@ -2931,12 +2921,12 @@ Sp_handler::sp_cache_package_routine(THD *thd,
int Sp_handler::sp_cache_package_routine(THD *thd,
const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const
+ sp_head **sp) const
{
DBUG_ENTER("Sp_handler::sp_cache_package_routine");
Prefix_name_buf pkgname(thd, name->m_name);
DBUG_ASSERT(pkgname.length);
- DBUG_RETURN(sp_cache_package_routine(thd, pkgname, name, lookup_only, sp));
+ DBUG_RETURN(sp_cache_package_routine(thd, pkgname, name, sp));
}
diff --git a/sql/sp.h b/sql/sp.h
index c73ff287..698b576e 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -102,10 +102,10 @@ protected:
int sp_cache_package_routine(THD *thd,
const LEX_CSTRING &pkgname_cstr,
const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const;
+ sp_head **sp) const;
int sp_cache_package_routine(THD *thd,
const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const;
+ sp_head **sp) const;
sp_head *sp_find_package_routine(THD *thd,
const LEX_CSTRING pkgname_str,
const Database_qualified_name *name,
@@ -202,7 +202,7 @@ public:
const Database_qualified_name *name,
bool cache_only) const;
virtual int sp_cache_routine(THD *thd, const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const;
+ sp_head **sp) const;
int sp_cache_routine_reentrant(THD *thd,
const Database_qualified_name *nm,
@@ -283,9 +283,9 @@ class Sp_handler_package_procedure: public Sp_handler_procedure
{
public:
int sp_cache_routine(THD *thd, const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const
+ sp_head **sp) const
{
- return sp_cache_package_routine(thd, name, lookup_only, sp);
+ return sp_cache_package_routine(thd, name, sp);
}
sp_head *sp_find_routine(THD *thd,
const Database_qualified_name *name,
@@ -332,9 +332,9 @@ class Sp_handler_package_function: public Sp_handler_function
{
public:
int sp_cache_routine(THD *thd, const Database_qualified_name *name,
- bool lookup_only, sp_head **sp) const
+ sp_head **sp) const
{
- return sp_cache_package_routine(thd, name, lookup_only, sp);
+ return sp_cache_package_routine(thd, name, sp);
}
sp_head *sp_find_routine(THD *thd,
const Database_qualified_name *name,
@@ -632,7 +632,7 @@ public:
const Sp_handler *m_handler;
- int sp_cache_routine(THD *thd, bool lookup_only, sp_head **sp) const;
+ int sp_cache_routine(THD *thd, sp_head **sp) const;
};
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc
index 1da807e9..f67ef421 100644
--- a/sql/sp_cache.cc
+++ b/sql/sp_cache.cc
@@ -78,6 +78,8 @@ private:
/* All routines in this cache */
HASH m_hashtable;
+public:
+ void clear();
}; // class sp_cache
#ifdef HAVE_PSI_INTERFACE
@@ -313,6 +315,10 @@ sp_cache::cleanup()
my_hash_free(&m_hashtable);
}
+void sp_cache::clear()
+{
+ my_hash_reset(&m_hashtable);
+}
void Sp_caches::sp_caches_clear()
{
@@ -321,3 +327,15 @@ void Sp_caches::sp_caches_clear()
sp_cache_clear(&sp_package_spec_cache);
sp_cache_clear(&sp_package_body_cache);
}
+
+void Sp_caches::sp_caches_empty()
+{
+ if (sp_proc_cache)
+ sp_proc_cache->clear();
+ if (sp_func_cache)
+ sp_func_cache->clear();
+ if (sp_package_spec_cache)
+ sp_package_spec_cache->clear();
+ if (sp_package_body_cache)
+ sp_package_body_cache->clear();
+}
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 58235055..b7a9ba4c 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3862,6 +3862,9 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
thd->update_stats();
thd->lex->sql_command= save_sql_command;
*nextp= m_ip+1;
+#ifdef PROTECT_STATEMENT_MEMROOT
+ mark_as_qc_used();
+#endif
}
thd->set_query(query_backup);
thd->query_name_consts= 0;
diff --git a/sql/sp_head.h b/sql/sp_head.h
index da4e5763..b418ef25 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -1138,7 +1138,7 @@ public:
sp_instr(uint ip, sp_pcontext *ctx)
:Query_arena(0, STMT_INITIALIZED_FOR_SP), marked(0), m_ip(ip), m_ctx(ctx)
#ifdef PROTECT_STATEMENT_MEMROOT
- , m_has_been_run(false)
+ , m_has_been_run(NON_RUN)
#endif
{}
@@ -1233,21 +1233,29 @@ public:
#ifdef PROTECT_STATEMENT_MEMROOT
bool has_been_run() const
{
- return m_has_been_run;
+ return m_has_been_run == RUN;
+ }
+
+ void mark_as_qc_used()
+ {
+ m_has_been_run= QC;
}
void mark_as_run()
{
- m_has_been_run= true;
+ if (m_has_been_run == QC)
+ m_has_been_run= NON_RUN; // answer was from WC => not really executed
+ else
+ m_has_been_run= RUN;
}
void mark_as_not_run()
{
- m_has_been_run= false;
+ m_has_been_run= NON_RUN;
}
private:
- bool m_has_been_run;
+ enum {NON_RUN, QC, RUN} m_has_been_run;
#endif
}; // class sp_instr : public Sql_alloc
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index c6080e5b..0fbf11ce 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2951,6 +2951,7 @@ bool acl_reload(THD *thd)
}
acl_cache->clear(0);
+ mysql_mutex_record_order(&acl_cache->lock, &LOCK_status);
mysql_mutex_lock(&acl_cache->lock);
old_acl_hosts= acl_hosts;
@@ -7631,7 +7632,7 @@ static bool can_grant_role(THD *thd, ACL_ROLE *role)
{
Security_context *sctx= thd->security_ctx;
- if (!sctx->user) // replication
+ if (!sctx->is_user_defined()) // galera
return true;
ACL_USER *grantee= find_user_exact(sctx->priv_host, sctx->priv_user);
@@ -13354,8 +13355,27 @@ static bool send_server_handshake_packet(MPVIO_EXT *mpvio,
*end++= 0;
int2store(end, thd->client_capabilities);
+
+ CHARSET_INFO *handshake_cs= default_charset_info;
+ if (handshake_cs->number > 0xFF)
+ {
+ /*
+ A workaround for a 2-byte collation ID: translate it into
+ the ID of the primary collation of this character set.
+ */
+ CHARSET_INFO *cs= get_charset_by_csname(handshake_cs->cs_name.str,
+ MY_CS_PRIMARY, MYF(MY_WME));
+ /*
+ cs should not normally be NULL, however it may be possible
+ with a dynamic character set incorrectly defined in Index.xml.
+ For safety let's fallback to latin1 in case cs is NULL.
+ */
+ handshake_cs= cs ? cs : &my_charset_latin1;
+ }
+
/* write server characteristics: up to 16 bytes allowed */
- end[2]= (char) default_charset_info->number;
+ end[2]= (char) handshake_cs->number;
+
int2store(end+3, mpvio->auth_info.thd->server_status);
int2store(end+5, thd->client_capabilities >> 16);
end[7]= data_len;
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index a3b9bbd4..983070a9 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -863,11 +863,9 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
!(check_opt->sql_flags & TT_USEFRM))
{
handler *file= table->table->file;
- int check_old_types= file->check_old_types();
int check_for_upgrade= file->ha_check_for_upgrade(check_opt);
- if (check_old_types == HA_ADMIN_NEEDS_ALTER ||
- check_for_upgrade == HA_ADMIN_NEEDS_ALTER)
+ if (check_for_upgrade == HA_ADMIN_NEEDS_ALTER)
{
/* We use extra_open_options to be able to open crashed tables */
thd->open_options|= extra_open_options;
@@ -876,7 +874,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
thd->open_options&= ~extra_open_options;
goto send_result;
}
- if (check_old_types || check_for_upgrade)
+ if (check_for_upgrade)
{
/* If repair is not implemented for the engine, run ALTER TABLE */
need_repair_or_alter= 1;
@@ -905,7 +903,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) &&
+ !(lex->alter_info.partition_flags & ALTER_PARTITION_ADMIN) &&
(check_eits_collection_allowed(thd) ||
lex->with_persistent_for_clause));
}
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 7b9ffc2e..c593035f 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -814,8 +814,10 @@ int close_thread_tables(THD *thd)
{
TABLE *table;
int error= 0;
+ PSI_stage_info org_stage;
DBUG_ENTER("close_thread_tables");
+ thd->backup_stage(&org_stage);
THD_STAGE_INFO(thd, stage_closing_tables);
#ifdef EXTRA_DEBUG
@@ -931,7 +933,10 @@ int close_thread_tables(THD *thd)
we will exit this function a few lines below.
*/
if (! thd->lex->requires_prelocking())
- DBUG_RETURN(0);
+ {
+ error= 0;
+ goto end;
+ }
/*
We are in the top-level statement of a prelocked statement,
@@ -942,7 +947,10 @@ int close_thread_tables(THD *thd)
thd->locked_tables_mode= LTM_LOCK_TABLES;
if (thd->locked_tables_mode == LTM_LOCK_TABLES)
- DBUG_RETURN(0);
+ {
+ error= 0;
+ goto end;
+ }
thd->leave_locked_tables_mode();
@@ -971,6 +979,8 @@ int close_thread_tables(THD *thd)
while (thd->open_tables)
(void) close_thread_table(thd, &thd->open_tables);
+end:
+ THD_STAGE_INFO(thd, org_stage);
DBUG_RETURN(error);
}
@@ -3770,7 +3780,7 @@ open_and_process_routine(THD *thd, Query_tables_list *prelocking_ctx,
DBUG_RETURN(TRUE);
/* Ensures the routine is up-to-date and cached, if exists. */
- if (rt->sp_cache_routine(thd, has_prelocking_list, &sp))
+ if (rt->sp_cache_routine(thd, &sp))
DBUG_RETURN(TRUE);
/* Remember the version of the routine in the parse tree. */
@@ -3811,7 +3821,7 @@ open_and_process_routine(THD *thd, Query_tables_list *prelocking_ctx,
Validating routine version is unnecessary, since CALL
does not affect the prepared statement prelocked list.
*/
- if (rt->sp_cache_routine(thd, false, &sp))
+ if (rt->sp_cache_routine(thd, &sp))
DBUG_RETURN(TRUE);
}
}
@@ -5005,6 +5015,9 @@ prepare_fk_prelocking_list(THD *thd, Query_tables_list *prelocking_ctx,
Query_arena *arena, backup;
TABLE *table= table_list->table;
+ if (!table->file->referenced_by_foreign_key())
+ DBUG_RETURN(FALSE);
+
arena= thd->activate_stmt_arena_if_needed(&backup);
table->file->get_parent_foreign_key_list(thd, &fk_list);
@@ -5090,16 +5103,12 @@ bool DML_prelocking_strategy::handle_table(THD *thd,
return TRUE;
}
- if (table->file->referenced_by_foreign_key())
- {
- if (prepare_fk_prelocking_list(thd, prelocking_ctx, table_list,
- need_prelocking,
- table_list->trg_event_map))
- return TRUE;
- }
+ if (prepare_fk_prelocking_list(thd, prelocking_ctx, table_list,
+ need_prelocking,
+ table_list->trg_event_map))
+ return TRUE;
}
- else if (table_list->slave_fk_event_map &&
- table->file->referenced_by_foreign_key())
+ else if (table_list->slave_fk_event_map)
{
if (prepare_fk_prelocking_list(thd, prelocking_ctx, table_list,
need_prelocking,
@@ -5843,13 +5852,23 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count, uint flags)
}
}
- DEBUG_SYNC(thd, "before_lock_tables_takes_lock");
+#ifdef ENABLED_DEBUG_SYNC
+ if (!tables ||
+ !(strcmp(tables->db.str, "mysql") == 0 &&
+ strcmp(tables->table_name.str, "proc") == 0))
+ DEBUG_SYNC(thd, "before_lock_tables_takes_lock");
+#endif
if (! (thd->lock= mysql_lock_tables(thd, start, (uint) (ptr - start),
flags)))
DBUG_RETURN(TRUE);
- DEBUG_SYNC(thd, "after_lock_tables_takes_lock");
+#ifdef ENABLED_DEBUG_SYNC
+ if (!tables ||
+ !(strcmp(tables->db.str, "mysql") == 0 &&
+ strcmp(tables->table_name.str, "proc") == 0))
+ DEBUG_SYNC(thd, "after_lock_tables_takes_lock");
+#endif
if (thd->lex->requires_prelocking() &&
thd->lex->sql_command != SQLCOM_LOCK_TABLES &&
@@ -9212,6 +9231,9 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table,
@param values values to fill with
@param ignore_errors TRUE if we should ignore errors
@param use_value forces usage of value of the items instead of result
+ @param check_for_computability whether to check for ability to invoke val_*()
+ methods (val_int () etc) against supplied
+ values
@details
fill_record() may set table->auto_increment_field_not_null and a
@@ -9225,7 +9247,7 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table,
bool
fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
- bool ignore_errors, bool use_value)
+ bool ignore_errors, bool use_value, bool check_for_computability)
{
List_iterator_fast<Item> v(values);
List<TABLE> tbl_list;
@@ -9265,6 +9287,10 @@ fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
/* Ensure the end of the list of values is not reached */
DBUG_ASSERT(value);
+ if (check_for_computability &&
+ value->check_is_evaluable_expression_or_error())
+ goto err;
+
const bool skip_sys_field= field->vers_sys_field() &&
!thd->vers_insert_history_fast(table);
@@ -9341,7 +9367,7 @@ fill_record_n_invoke_before_triggers(THD *thd, TABLE *table, Field **ptr,
bool result;
Table_triggers_list *triggers= table->triggers;
- result= fill_record(thd, table, ptr, values, ignore_errors, FALSE);
+ result= fill_record(thd, table, ptr, values, ignore_errors, false, false);
if (!result && triggers && *ptr)
result= triggers->process_triggers(thd, event, TRG_ACTION_BEFORE, TRUE) ||
diff --git a/sql/sql_base.h b/sql/sql_base.h
index ac7024a1..81413d00 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -194,7 +194,8 @@ void unfix_fields(List<Item> &items);
bool fill_record(THD * thd, TABLE *table_arg, List<Item> &fields,
List<Item> &values, bool ignore_errors, bool update);
bool fill_record(THD *thd, TABLE *table, Field **field, List<Item> &values,
- bool ignore_errors, bool use_value);
+ bool ignore_errors, bool use_value,
+ bool check_for_evaluability);
Field *
find_field_in_tables(THD *thd, Item_ident *item,
diff --git a/sql/sql_bootstrap.cc b/sql/sql_bootstrap.cc
index b39d7a57..72821384 100644
--- a/sql/sql_bootstrap.cc
+++ b/sql/sql_bootstrap.cc
@@ -33,26 +33,35 @@ extern "C" int read_bootstrap_query(char *query, int *query_length,
fgets_input_t input, fgets_fn_t fgets_fn,
int preserve_delimiter, int *error)
{
- char line_buffer[MAX_BOOTSTRAP_LINE_SIZE];
+ char *line_buffer;
const char *line;
size_t len;
size_t query_len= 0;
int fgets_error= 0;
+ int exit_code= 0;
*error= 0;
+ line_buffer= (char*) malloc(MAX_BOOTSTRAP_LINE_SIZE);
+
*query_length= 0;
for ( ; ; )
{
- line= (*fgets_fn)(line_buffer, sizeof(line_buffer), input, &fgets_error);
+ line= (*fgets_fn)(line_buffer, MAX_BOOTSTRAP_LINE_SIZE, input, &fgets_error);
if (error)
*error= fgets_error;
if (fgets_error != 0)
- return READ_BOOTSTRAP_ERROR;
+ {
+ exit_code= READ_BOOTSTRAP_ERROR;
+ break;
+ }
if (line == NULL)
- return (query_len == 0) ? READ_BOOTSTRAP_EOF : READ_BOOTSTRAP_ERROR;
+ {
+ exit_code= (query_len == 0) ? READ_BOOTSTRAP_EOF : READ_BOOTSTRAP_ERROR;
+ break;
+ }
len= strlen(line);
@@ -98,7 +107,8 @@ extern "C" int read_bootstrap_query(char *query, int *query_length,
if (!p || !p[1])
{
/* Invalid DELIMITER specifier */
- return READ_BOOTSTRAP_ERROR;
+ exit_code= READ_BOOTSTRAP_ERROR;
+ break;
}
delimiter.assign(p+1);
if (preserve_delimiter)
@@ -106,7 +116,8 @@ extern "C" int read_bootstrap_query(char *query, int *query_length,
memcpy(query,line,len);
query[len]=0;
*query_length = (int)len;
- return READ_BOOTSTRAP_SUCCESS;
+ exit_code= READ_BOOTSTRAP_SUCCESS;
+ break;
}
continue;
}
@@ -125,7 +136,8 @@ extern "C" int read_bootstrap_query(char *query, int *query_length,
}
query[query_len]= '\0';
*query_length= (int)query_len;
- return READ_BOOTSTRAP_QUERY_SIZE;
+ exit_code= READ_BOOTSTRAP_QUERY_SIZE;
+ break;
}
if (query_len != 0)
@@ -152,8 +164,11 @@ extern "C" int read_bootstrap_query(char *query, int *query_length,
}
query[query_len]= 0;
*query_length= (int)query_len;
- return READ_BOOTSTRAP_SUCCESS;
+ exit_code= READ_BOOTSTRAP_SUCCESS;
+ break;
}
}
+ free(line_buffer);
+ return exit_code;
}
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index b284189d..34d063fc 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -2530,14 +2530,9 @@ void Query_cache::destroy()
void Query_cache::disable_query_cache(THD *thd)
{
+ lock(thd);
m_cache_status= DISABLE_REQUEST;
- /*
- If there is no requests in progress try to free buffer.
- try_lock(TRY) will exit immediately if there is lock.
- unlock() should free block.
- */
- if (m_requests_in_progress == 0 && !try_lock(thd, TRY))
- unlock();
+ unlock();
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 17d89188..711ffb1b 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -680,8 +680,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
#ifdef HAVE_REPLICATION
,
current_linfo(0),
- slave_info(0),
- is_awaiting_semisync_ack(0)
+ slave_info(0)
#endif
#ifdef WITH_WSREP
,
@@ -894,6 +893,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
prepare_derived_at_open= FALSE;
create_tmp_table_for_derived= FALSE;
save_prep_leaf_list= FALSE;
+ reset_sp_cache= false;
org_charset= 0;
/* Restore THR_THD */
set_current_thd(old_THR_THD);
@@ -4479,7 +4479,7 @@ void Security_context::destroy()
my_free((char*) host);
host= NULL;
}
- if (user != delayed_user)
+ if (is_user_defined())
{
my_free((char*) user);
user= NULL;
@@ -5301,14 +5301,6 @@ extern "C" enum enum_server_command thd_current_command(MYSQL_THD thd)
return thd->get_command();
}
-#ifdef HAVE_REPLICATION /* Working around MDEV-24622 */
-/** @return whether the current thread is for applying binlog in a replica */
-extern "C" int thd_is_slave(const MYSQL_THD thd)
-{
- return thd && thd->slave_thread;
-}
-#endif /* HAVE_REPLICATION */
-
/* Returns high resolution timestamp for the start
of the current query. */
extern "C" unsigned long long thd_start_utime(const MYSQL_THD thd)
@@ -5392,14 +5384,38 @@ thd_rpl_deadlock_check(MYSQL_THD thd, MYSQL_THD other_thd)
return 0;
if (!rgi->is_parallel_exec)
return 0;
- if (rgi->rli != other_rgi->rli)
- return 0;
- if (!rgi->gtid_sub_id || !other_rgi->gtid_sub_id)
- return 0;
- if (rgi->current_gtid.domain_id != other_rgi->current_gtid.domain_id)
- return 0;
- if (rgi->gtid_sub_id > other_rgi->gtid_sub_id)
- return 0;
+ if (rgi->rli == other_rgi->rli &&
+ rgi->current_gtid.domain_id == other_rgi->current_gtid.domain_id)
+ {
+ /*
+ Within the same master connection and domain, we can compare transaction
+ order on the GTID sub_id, and rollback the later transaction to allow the
+ earlier transaction to commit first.
+ */
+ if (!rgi->gtid_sub_id || !other_rgi->gtid_sub_id ||
+ rgi->gtid_sub_id > other_rgi->gtid_sub_id)
+ return 0;
+ }
+ else
+ {
+ /*
+ Lock conflicts between different master connections or domains should
+ usually not occur, but could still happen if user is running some
+ special setup that tolerates conflicting updates (or in case of user
+ error). We do not have a pre-defined ordering of transactions in this
+ case, but we still need to handle conflicts in _some_ way to avoid
+ undetected deadlocks and hangs.
+
+ We do this by rolling back and retrying any transaction that is being
+ _optimistically_ applied. This can be overly conservative in some cases,
+ but should be fine as conflicts between different master connections /
+ domains are not common. And it ensures that we won't end up in a
+ deadlock and hang due to a transaction doing wait_for_prior_commit while
+ holding locks that block something in another master connection.
+ */
+ if (other_rgi->speculation != rpl_group_info::SPECULATE_OPTIMISTIC)
+ return 0;
+ }
if (rgi->finish_event_group_called || other_rgi->finish_event_group_called)
{
/*
@@ -5707,6 +5723,40 @@ extern "C" void *thd_mdl_context(MYSQL_THD thd)
return &thd->mdl_context;
}
+/**
+ Send check/repair message to the user
+
+ @param op one of check or repair
+ @param msg_type one of info, warning or error
+ @param print_to_log <> 0 if we should also print the message to error log.
+*/
+
+extern "C" void
+print_check_msg(THD *thd, const char *db_name, const char *table_name, const char *op,
+ const char *msg_type, const char *message, my_bool print_to_log)
+{
+ char name[NAME_LEN * 2 + 2];
+ Protocol *protocol= thd->protocol;
+
+ DBUG_ASSERT(strlen(db_name) <= NAME_LEN);
+ DBUG_ASSERT(strlen(table_name) <= NAME_LEN);
+
+ size_t length= size_t(strxnmov(name, sizeof name - 1,
+ db_name, ".", table_name, NullS) -
+ name);
+ protocol->prepare_for_resend();
+ protocol->store(name, length, system_charset_info);
+ protocol->store(op, strlen(op), system_charset_info);
+ protocol->store(msg_type, strlen(msg_type), system_charset_info);
+ protocol->store(message, strlen(message), system_charset_info);
+ if (protocol->write())
+ sql_print_error("Failed on my_net_write, writing to stderr instead: %s: %s\n",
+ table_name, message);
+ else if (thd->variables.log_warnings > 2 && print_to_log)
+ sql_print_error("%s: table '%s' got '%s' during %s",
+ msg_type, table_name, message, op);
+}
+
/****************************************************************************
Handling of statement states in functions and triggers.
@@ -8308,6 +8358,34 @@ wait_for_commit::unregister_wait_for_prior_commit2()
mysql_mutex_unlock(&LOCK_wait_commit);
}
+/*
+ Wait # seconds or until someone sends a signal (through kill)
+
+ Note that this must have same prototype as my_sleep_for_space()
+*/
+
+C_MODE_START
+
+void mariadb_sleep_for_space(unsigned int seconds)
+{
+ THD *thd= current_thd;
+ PSI_stage_info old_stage;
+ if (!thd)
+ {
+ sleep(seconds);
+ return;
+ }
+ mysql_mutex_lock(&thd->LOCK_wakeup_ready);
+ thd->ENTER_COND(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
+ &stage_waiting_for_disk_space, &old_stage);
+ if (!thd->killed)
+ mysql_cond_wait(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready);
+ thd->EXIT_COND(&old_stage);
+ return;
+}
+
+C_MODE_END
+
bool Discrete_intervals_list::append(ulonglong start, ulonglong val,
ulonglong incr)
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 7543df39..9cca3c17 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1,5 +1,4 @@
/*
- Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2009, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
@@ -717,6 +716,11 @@ typedef struct system_variables
ulonglong sortbuff_size;
ulonglong default_regex_flags;
ulonglong max_mem_used;
+ /*
+ A bitmap of OPTIMIZER_ADJ_* flags (defined in sql_priv.h).
+ See sys_vars.cc:adjust_secondary_key_cost for symbolic names.
+ */
+ ulonglong optimizer_adjust_secondary_key_costs;
/**
Place holders to store Multi-source variables in sys_var.cc during
@@ -767,7 +771,6 @@ typedef struct system_variables
ulong optimizer_max_sel_arg_weight;
ulong optimizer_max_sel_args;
ulong optimizer_trace_max_mem_size;
- ulong optimizer_adjust_secondary_key_costs;
ulong use_stat_tables;
double sample_percentage;
ulong histogram_size;
@@ -1573,6 +1576,8 @@ public:
*/
bool check_access(const privilege_t want_access, bool match_any = false);
bool is_priv_user(const char *user, const char *host);
+ bool is_user_defined() const
+ { return user && user != delayed_user && user != slave_user; };
};
@@ -2464,6 +2469,11 @@ public:
swap_variables(sp_cache*, sp_package_body_cache, rhs.sp_package_body_cache);
}
void sp_caches_clear();
+ /**
+ Clear content of sp related caches.
+ Don't delete cache objects itself.
+ */
+ void sp_caches_empty();
};
@@ -2954,6 +2964,12 @@ public:
bool save_prep_leaf_list;
+ /**
+ The data member reset_sp_cache is to signal that content of sp_cache
+ must be reset (all items be removed from it).
+ */
+ bool reset_sp_cache;
+
/* container for handler's private per-connection data */
Ha_data ha_data[MAX_HA];
@@ -4828,24 +4844,24 @@ public:
*/
bool copy_db_to(LEX_CSTRING *to)
{
- if (db.str == NULL)
+ if (db.str)
{
- /*
- No default database is set. In this case if it's guaranteed that
- no CTE can be used in the statement then we can throw an error right
- now at the parser stage. Otherwise the decision about throwing such
- a message must be postponed until a post-parser stage when we are able
- to resolve all CTE names as we don't need this message to be thrown
- for any CTE references.
- */
- if (!lex->with_cte_resolution)
- my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
- return TRUE;
+ to->str= strmake(db.str, db.length);
+ to->length= db.length;
+ return to->str == NULL; /* True on error */
}
- to->str= strmake(db.str, db.length);
- to->length= db.length;
- return to->str == NULL; /* True on error */
+ /*
+ No default database is set. In this case if it's guaranteed that
+ no CTE can be used in the statement then we can throw an error right
+ now at the parser stage. Otherwise the decision about throwing such
+ a message must be postponed until a post-parser stage when we are able
+ to resolve all CTE names as we don't need this message to be thrown
+ for any CTE references.
+ */
+ if (!lex->with_cte_resolution)
+ my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0));
+ return TRUE;
}
/* Get db name or "". Use for printing current db */
const char *get_db()
@@ -5186,11 +5202,29 @@ public:
{
if (global_system_variables.log_warnings > threshold)
{
+ char real_ip_str[64];
+ real_ip_str[0]= 0;
+
+ /* For proxied connections, add the real IP to the warning message */
+ if (net.using_proxy_protocol && net.vio)
+ {
+ if(net.vio->localhost)
+ snprintf(real_ip_str, sizeof(real_ip_str), " real ip: 'localhost'");
+ else
+ {
+ char buf[INET6_ADDRSTRLEN];
+ if (!vio_getnameinfo((sockaddr *)&(net.vio->remote), buf,
+ sizeof(buf),NULL, 0, NI_NUMERICHOST))
+ {
+ snprintf(real_ip_str, sizeof(real_ip_str), " real ip: '%s'",buf);
+ }
+ }
+ }
Security_context *sctx= &main_security_ctx;
sql_print_warning(ER_THD(this, ER_NEW_ABORTING_CONNECTION),
thread_id, (db.str ? db.str : "unconnected"),
sctx->user ? sctx->user : "unauthenticated",
- sctx->host_or_ip, reason);
+ sctx->host_or_ip, real_ip_str, reason);
}
}
@@ -5288,8 +5322,18 @@ public:
Flag, mutex and condition for a thread to wait for a signal from another
thread.
- Currently used to wait for group commit to complete, can also be used for
- other purposes.
+ Currently used to wait for group commit to complete, and COND_wakeup_ready
+ is used for threads to wait on semi-sync ACKs (though is protected by
+ Repl_semi_sync_master::LOCK_binlog). Note the following relationships
+ between these two use-cases when using
+ rpl_semi_sync_master_wait_point=AFTER_SYNC during group commit:
+ 1) Non-leader threads use COND_wakeup_ready to wait for the leader thread
+ to complete binlog commit.
+ 2) The leader thread uses COND_wakeup_ready to await ACKs from the
+ replica before signalling the non-leader threads to wake up.
+
+ With wait_point=AFTER_COMMIT, there is no overlap as binlogging has
+ finished, so COND_wakeup_ready is safe to re-use.
*/
bool wakeup_ready;
mysql_mutex_t LOCK_wakeup_ready;
@@ -5417,14 +5461,6 @@ public:
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(ulong binlog_format) const
{
#ifdef WITH_WSREP
@@ -8173,6 +8209,10 @@ extern THD_list server_threads;
void setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps,
uint field_count);
+C_MODE_START
+void mariadb_sleep_for_space(unsigned int seconds);
+C_MODE_END
+
#ifdef WITH_WSREP
extern void wsrep_to_isolation_end(THD*);
#endif
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 8878c722..6149cc49 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1274,7 +1274,7 @@ void prepare_new_connection_state(THD* thd)
thd->thread_id,
thd->db.str ? thd->db.str : "unconnected",
sctx->user ? sctx->user : "unauthenticated",
- sctx->host_or_ip, "init_connect command failed");
+ sctx->host_or_ip, "", "init_connect command failed");
thd->server_status&= ~SERVER_STATUS_CLEAR_SET;
thd->protocol->end_statement();
thd->killed = KILL_CONNECTION;
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 202dde11..c55b8789 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -263,7 +263,10 @@ int update_portion_of_time(THD *thd, TABLE *table,
res= src->save_in_field(table->field[dst_fieldno], true);
if (likely(!res))
+ {
+ table->period_prepare_autoinc();
res= table->update_generated_fields();
+ }
if(likely(!res))
res= table->file->ha_update_row(table->record[1], table->record[0]);
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index afcbb7f8..de5a1f63 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -1217,8 +1217,12 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
(derived->alias.str ? derived->alias.str : "<NULL>"),
derived->get_unit()));
- if (unit->executed && !unit->uncacheable && !unit->describe &&
- !derived_is_recursive)
+ /*
+ Only fill derived tables once, unless the derived table is dependent in
+ which case we will delete all of its rows and refill it below.
+ */
+ if (unit->executed && !(unit->uncacheable & UNCACHEABLE_DEPENDENT) &&
+ !unit->describe && !derived_is_recursive)
DBUG_RETURN(FALSE);
/*check that table creation passed without problems. */
DBUG_ASSERT(derived->table && derived->table->is_created());
@@ -1233,7 +1237,9 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
/* Execute the query that specifies the derived table by a foreign engine */
res= derived->pushdown_derived->execute();
unit->executed= true;
+ if (res)
DBUG_RETURN(res);
+ goto after_exec;
}
if (unit->executed && !derived_is_recursive &&
@@ -1275,6 +1281,7 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
}
else
{
+ DBUG_ASSERT(!unit->executed || (unit->uncacheable & UNCACHEABLE_DEPENDENT));
SELECT_LEX *first_select= unit->first_select();
unit->set_limit(unit->global_parameters());
if (unit->lim.is_unlimited())
@@ -1294,6 +1301,7 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
derived_result, unit, first_select);
}
+ after_exec:
if (!res && !derived_is_recursive)
{
if (derived_result->flush())
diff --git a/sql/sql_expression_cache.cc b/sql/sql_expression_cache.cc
index 8681e08e..8b511b25 100644
--- a/sql/sql_expression_cache.cc
+++ b/sql/sql_expression_cache.cc
@@ -272,7 +272,8 @@ my_bool Expression_cache_tmptable::put_value(Item *value)
}
*(items.head_ref())= value;
- fill_record(table_thd, cache_table, cache_table->field, items, TRUE, TRUE);
+ fill_record(table_thd, cache_table, cache_table->field, items, true, true,
+ true);
if (unlikely(table_thd->is_error()))
goto err;;
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 97e1c102..e16ac1c1 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1452,7 +1452,7 @@ static bool check_view_insertability(THD *thd, TABLE_LIST *view,
*trans_end= trans_start + num;
Field_translator *trans;
uint used_fields_buff_size= bitmap_buffer_size(table->s->fields);
- uint32 *used_fields_buff= (uint32*)thd->alloc(used_fields_buff_size);
+ my_bitmap_map *used_fields_buff= (my_bitmap_map*)thd->alloc(used_fields_buff_size);
MY_BITMAP used_fields;
enum_column_usage saved_column_usage= thd->column_usage;
List_iterator_fast<Item> it(fields);
@@ -1951,14 +1951,31 @@ int write_record(THD *thd, TABLE *table, COPY_INFO *info, select_result *sink)
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 &&
+ if (info->handle_duplicates == DUP_REPLACE &&
key_nr == table->s->next_number_index && insert_id_for_cur_row > 0)
goto err;
- if (table->file->ha_table_flags() & HA_DUPLICATE_POS)
+ if (table->file->has_dup_ref())
{
+ /*
+ If engine doesn't support HA_DUPLICATE_POS, the handler may init to
+ INDEX, but dup_ref could also be set by lookup_handled (and then,
+ lookup_errkey is set, f.ex. long unique duplicate).
+
+ In such case, handler would stay uninitialized, so do it here.
+ */
+ bool init_lookup_handler= table->file->lookup_errkey != (uint)-1 &&
+ table->file->inited == handler::NONE;
+ if (init_lookup_handler && table->file->ha_rnd_init_with_error(false))
+ goto err;
+
DBUG_ASSERT(table->file->inited == handler::RND);
- if (table->file->ha_rnd_pos(table->record[1],table->file->dup_ref))
- goto err;
+ int rnd_pos_err= table->file->ha_rnd_pos(table->record[1],
+ table->file->dup_ref);
+
+ if (init_lookup_handler)
+ table->file->ha_rnd_end();
+ if (rnd_pos_err)
+ goto err;
}
else
{
@@ -2401,7 +2418,7 @@ public:
passed from connection thread to the handler thread.
*/
MDL_request grl_protection;
- Delayed_insert(SELECT_LEX *current_select)
+ Delayed_insert(LEX *lex)
:locks_in_memory(0), thd(next_thread_id()),
table(0),tables_in_use(0), stacked_inserts(0),
status(0), retry(0), handler_thread_initialized(FALSE), group_count(0)
@@ -2414,8 +2431,9 @@ public:
strmake_buf(thd.security_ctx->priv_user, thd.security_ctx->user);
thd.current_tablenr=0;
thd.set_command(COM_DELAYED_INSERT);
- thd.lex->current_select= current_select;
- thd.lex->sql_command= SQLCOM_INSERT; // For innodb::store_lock()
+ thd.lex->current_select= lex->current_select;
+ thd.lex->sql_command= lex->sql_command; // For innodb::store_lock()
+ thd.lex->duplicates= lex->duplicates;
/*
Prevent changes to global.lock_wait_timeout from affecting
delayed insert threads as any timeouts in delayed inserts
@@ -2591,7 +2609,7 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request,
*/
if (! (di= find_handler(thd, table_list)))
{
- if (!(di= new Delayed_insert(thd->lex->current_select)))
+ if (!(di= new Delayed_insert(thd->lex)))
goto end_create;
/*
@@ -2892,6 +2910,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
copy->def_read_set.bitmap= (my_bitmap_map*) bitmap;
copy->def_write_set.bitmap= ((my_bitmap_map*)
(bitmap + share->column_bitmap_size));
+ create_last_bit_mask(&copy->def_read_set);
+ create_last_bit_mask(&copy->def_write_set);
bitmaps_used= 2;
if (share->default_fields || share->default_expressions)
{
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index f8ac6516..2ee63171 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -1590,6 +1590,7 @@ bool JOIN_CACHE::put_record()
{
bool is_full;
uchar *link= 0;
+ DBUG_ASSERT(!for_explain_only);
if (prev_cache)
link= prev_cache->get_curr_rec_link();
write_record_data(link, &is_full);
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index e6db1456..38232622 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4264,17 +4264,18 @@ uint8 LEX::get_effective_with_check(TABLE_LIST *view)
bool LEX::copy_db_to(LEX_CSTRING *to)
{
- if (sphead && sphead->m_name.str)
- {
- DBUG_ASSERT(sphead->m_db.str && sphead->m_db.length);
- /*
- It is safe to assign the string by-pointer, both sphead and
- its statements reside in the same memory root.
- */
- *to= sphead->m_db;
- return FALSE;
- }
- return thd->copy_db_to(to);
+ if (!sphead || !sphead->m_name.str)
+ return thd->copy_db_to(to);
+
+ DBUG_ASSERT(sphead->m_db.str);
+ DBUG_ASSERT(sphead->m_db.length);
+
+ /*
+ It is safe to assign the string by-pointer, both sphead and
+ its statements reside in the same memory root.
+ */
+ *to= sphead->m_db;
+ return FALSE;
}
/**
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 3151f237..f785d286 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -3280,7 +3280,7 @@ public:
Table_type table_type; /* Used for SHOW CREATE */
List<Key_part_spec> ref_list;
List<LEX_USER> users_list;
- List<Item> *insert_list,field_list,value_list,update_list;
+ List<Item> *insert_list= nullptr,field_list,value_list,update_list;
List<List_item> many_values;
List<set_var_base> var_list;
List<set_var_base> stmt_var_list; //SET_STATEMENT values
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index be3063e5..7a82e0ce 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -107,23 +107,41 @@ public:
class Wsrep_load_data_split
{
public:
- Wsrep_load_data_split(THD *thd)
+ Wsrep_load_data_split(THD *thd, TABLE *table)
: m_thd(thd)
- , m_load_data_splitting(wsrep_load_data_splitting)
+ , m_load_data_splitting(false)
, m_fragment_unit(thd->wsrep_trx().streaming_context().fragment_unit())
, m_fragment_size(thd->wsrep_trx().streaming_context().fragment_size())
{
- if (WSREP(m_thd) && m_load_data_splitting)
+ /*
+ We support load data splitting for InnoDB only as it will use
+ streaming replication (SR).
+ */
+ if (WSREP(thd) && wsrep_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);
+ handlerton *ht= table->s->db_type();
+ // For partitioned tables find underlying hton
+ if (table->file->partition_ht())
+ ht= table->file->partition_ht();
+ if (ht->db_type != DB_TYPE_INNODB)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_NOT_SUPPORTED_YET,
+ "wsrep_load_data_splitting for other than InnoDB tables");
+ }
+ else
+ {
+ /* Override streaming settings with backward compatible values for
+ load data splitting */
+ m_thd->wsrep_cs().streaming_params(wsrep::streaming_context::row, 10000);
+ m_load_data_splitting= true;
+ }
}
}
~Wsrep_load_data_split()
{
- if (WSREP(m_thd) && m_load_data_splitting)
+ if (m_load_data_splitting)
{
/* Restore original settings */
m_thd->wsrep_cs().streaming_params(m_fragment_unit, m_fragment_size);
@@ -348,6 +366,7 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list,
bool is_concurrent;
#endif
const char *db= table_list->db.str; // This is never null
+
/*
If path for file is not defined, we will use the current database.
If this is not set, we will use the directory where the table to be
@@ -358,9 +377,6 @@ 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
@@ -425,6 +441,11 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list,
{
DBUG_RETURN(TRUE);
}
+
+#ifdef WITH_WSREP
+ Wsrep_load_data_split wsrep_load_data_split(thd, table_list->table);
+#endif /* WITH_WSREP */
+
thd_proc_info(thd, "Executing");
/*
Let us emit an error if we are loading data to table which is used
diff --git a/sql/sql_manager.cc b/sql/sql_manager.cc
index 3d3728b9..b3d95c9e 100644
--- a/sql/sql_manager.cc
+++ b/sql/sql_manager.cc
@@ -26,7 +26,11 @@
#include "sql_manager.h"
#include "sql_base.h" // flush_tables
-static bool volatile manager_thread_in_use = 0;
+/*
+ Values for manager_thread_in_use: 0 means "not started". 1 means "started
+ and active". 2 means "stopped".
+*/
+static int volatile manager_thread_in_use = 0;
static bool abort_manager = false;
pthread_t manager_thread;
@@ -44,7 +48,7 @@ static struct handler_cb *cb_list; // protected by LOCK_manager
bool mysql_manager_submit(void (*action)(void *), void *data)
{
bool result= FALSE;
- DBUG_ASSERT(manager_thread_in_use);
+ DBUG_ASSERT(manager_thread_in_use == 1);
struct handler_cb **cb;
mysql_mutex_lock(&LOCK_manager);
cb= &cb_list;
@@ -76,7 +80,9 @@ pthread_handler_t handle_manager(void *arg __attribute__((unused)))
pthread_detach_this_thread();
manager_thread = pthread_self();
mysql_mutex_lock(&LOCK_manager);
- while (!abort_manager)
+ manager_thread_in_use = 1;
+ mysql_cond_signal(&COND_manager);
+ while (!abort_manager || cb_list)
{
/* XXX: This will need to be made more general to handle different
* polling needs. */
@@ -116,7 +122,8 @@ pthread_handler_t handle_manager(void *arg __attribute__((unused)))
}
mysql_mutex_lock(&LOCK_manager);
}
- manager_thread_in_use = 0;
+ DBUG_ASSERT(cb_list == NULL);
+ manager_thread_in_use = 2;
mysql_mutex_unlock(&LOCK_manager);
mysql_mutex_destroy(&LOCK_manager);
mysql_cond_destroy(&COND_manager);
@@ -135,12 +142,28 @@ 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);
if ((err= mysql_thread_create(key_thread_handle_manager, &hThread,
&connection_attrib, handle_manager, 0)))
+ {
sql_print_warning("Can't create handle_manager thread (errno: %M)", err);
+ DBUG_VOID_RETURN;
+ }
+
+ mysql_mutex_lock(&LOCK_manager);
+ /*
+ Wait for manager thread to have started, otherwise in extreme cases the
+ server may start up and have initiated shutdown at the time the manager
+ thread even starts to run.
+
+ Allow both values 1 and 2 for manager_thread_in_use, so that we will not
+ get stuck here if the manager thread somehow manages to start up and
+ abort again before we have time to test it here.
+ */
+ while (!manager_thread_in_use)
+ mysql_cond_wait(&COND_manager, &LOCK_manager);
+ mysql_mutex_unlock(&LOCK_manager);
}
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index f9da2c40..339fea26 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2250,6 +2250,7 @@ dispatch_command_return dispatch_command(enum enum_server_command command, THD *
my_eof(thd);
kill_mysql(thd);
error=TRUE;
+ DBUG_EXECUTE_IF("simulate_slow_client_at_shutdown", my_sleep(2000000););
break;
}
#endif
@@ -2407,6 +2408,11 @@ resume:
}
#endif /* WITH_WSREP */
+ if (thd->reset_sp_cache)
+ {
+ thd->sp_caches_empty();
+ thd->reset_sp_cache= false;
+ }
if (do_end_of_statement)
{
@@ -2483,6 +2489,7 @@ resume:
MYSQL_COMMAND_DONE(res);
}
DEBUG_SYNC(thd,"dispatch_command_end");
+ DEBUG_SYNC(thd,"dispatch_command_end2");
/* Check that some variables are reset properly */
DBUG_ASSERT(thd->abort_on_warning == 0);
@@ -4649,10 +4656,15 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
if ((res= insert_precheck(thd, all_tables)))
break;
+
#ifdef WITH_WSREP
- if (WSREP(thd) && thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED)
+ bool wsrep_toi= false;
+ const bool wsrep= WSREP(thd);
+
+ if (wsrep && thd->wsrep_consistency_check == CONSISTENCY_CHECK_DECLARED)
{
thd->wsrep_consistency_check = CONSISTENCY_CHECK_RUNNING;
+ wsrep_toi= true;
WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL);
}
#endif /* WITH_WSREP */
@@ -4687,6 +4699,27 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
if (!(res=open_and_lock_tables(thd, all_tables, TRUE, 0)))
{
MYSQL_INSERT_SELECT_START(thd->query());
+
+#ifdef WITH_WSREP
+ if (wsrep && !first_table->view)
+ {
+ bool is_innodb= (first_table->table->file->ht->db_type == DB_TYPE_INNODB);
+
+ // For consistency check inserted table needs to be InnoDB
+ if (!is_innodb && thd->wsrep_consistency_check != NO_CONSISTENCY_CHECK)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ HA_ERR_UNSUPPORTED,
+ "Galera cluster does support consistency check only"
+ " for InnoDB tables.");
+ thd->wsrep_consistency_check= NO_CONSISTENCY_CHECK;
+ }
+
+ // For !InnoDB we start TOI if it is not yet started and hope for the best
+ if (!is_innodb && !wsrep_toi)
+ WSREP_TO_ISOLATION_BEGIN(first_table->db.str, first_table->table_name.str, NULL);
+ }
+#endif /* WITH_WSREP */
/*
Only the INSERT table should be merged. Other will be handled by
select.
@@ -5864,7 +5897,7 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
if (sph->sp_resolve_package_routine(thd, thd->lex->sphead,
lex->spname, &sph, &pkgname))
return true;
- if (sph->sp_cache_routine(thd, lex->spname, false, &sp))
+ if (sph->sp_cache_routine(thd, lex->spname, &sp))
goto error;
if (!sp || sp->show_routine_code(thd))
{
@@ -6141,13 +6174,11 @@ finish:
if (unlikely(thd->is_error()) ||
(thd->variables.option_bits & OPTION_MASTER_SQL_ERROR))
{
- THD_STAGE_INFO(thd, stage_rollback);
trans_rollback_stmt(thd);
}
else
{
/* If commit fails, we should be able to reset the OK status. */
- THD_STAGE_INFO(thd, stage_commit);
thd->get_stmt_da()->set_overwrite_status(true);
trans_commit_stmt(thd);
thd->get_stmt_da()->set_overwrite_status(false);
@@ -6174,7 +6205,6 @@ finish:
one of storage engines (e.g. due to deadlock). Rollback transaction in
all storage engines including binary log.
*/
- THD_STAGE_INFO(thd, stage_rollback_implicit);
trans_rollback_implicit(thd);
thd->release_transactional_locks();
}
@@ -6184,7 +6214,6 @@ finish:
DBUG_ASSERT(! thd->in_sub_stmt);
if (!(thd->variables.option_bits & OPTION_GTID_BEGIN))
{
- THD_STAGE_INFO(thd, stage_commit_implicit);
/* If commit fails, we should be able to reset the OK status. */
thd->get_stmt_da()->set_overwrite_status(true);
/* Commit the normal transaction if one is active. */
@@ -8241,10 +8270,6 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
List<String> *partition_names,
LEX_STRING *option)
{
- TABLE_LIST *ptr;
- TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */
- 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),
@@ -8254,9 +8279,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
if (unlikely(!table))
DBUG_RETURN(0); // End of memory
- alias_str= alias ? *alias : table->table;
- DBUG_ASSERT(alias_str.str);
- if (!MY_TEST(table_options & TL_OPTION_ALIAS) &&
+ if (!(table_options & TL_OPTION_ALIAS) &&
unlikely(check_table_name(table->table.str, table->table.length, FALSE)))
{
my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
@@ -8271,6 +8294,34 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
DBUG_RETURN(0);
}
+ LEX_CSTRING db{0, 0};
+ bool fqtn= false;
+ LEX *lex= thd->lex;
+ if (table->db.str)
+ {
+ fqtn= TRUE;
+ db= table->db;
+ }
+ else if (!lex->with_cte_resolution && lex->copy_db_to(&db))
+ DBUG_RETURN(0);
+ else
+ fqtn= FALSE;
+ bool info_schema= is_infoschema_db(&db);
+ if (!table->sel && info_schema &&
+ (table_options & TL_OPTION_UPDATING) &&
+ /* Special cases which are processed by commands itself */
+ lex->sql_command != SQLCOM_CHECK &&
+ lex->sql_command != SQLCOM_CHECKSUM)
+ {
+ my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
+ thd->security_ctx->priv_user,
+ thd->security_ctx->priv_host,
+ INFORMATION_SCHEMA_NAME.str);
+ DBUG_RETURN(0);
+ }
+
+ LEX_CSTRING alias_str= alias ? *alias : table->table;
+ DBUG_ASSERT(alias_str.str);
if (!alias) /* Alias is case sensitive */
{
if (unlikely(table->sel))
@@ -8283,65 +8334,15 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
if (unlikely(!(alias_str.str= (char*) thd->memdup(alias_str.str, alias_str.length+1))))
DBUG_RETURN(0);
}
- if (unlikely(!(ptr = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST)))))
- DBUG_RETURN(0); /* purecov: inspected */
- if (table->db.str)
- {
- ptr->is_fqtn= TRUE;
- ptr->db= table->db;
- }
- else if (!lex->with_cte_resolution && lex->copy_db_to(&ptr->db))
- DBUG_RETURN(0);
- else
- ptr->is_fqtn= FALSE;
-
- ptr->alias= alias_str;
- ptr->is_alias= alias ? TRUE : FALSE;
- if (lower_case_table_names)
- {
- if (table->table.length)
- table->table.length= my_casedn_str(files_charset_info,
- (char*) table->table.str);
- if (ptr->db.length && ptr->db.str != any_db.str)
- ptr->db.length= my_casedn_str(files_charset_info, (char*) ptr->db.str);
- }
-
- ptr->table_name= table->table;
- ptr->lock_type= lock_type;
- ptr->mdl_type= mdl_type;
- ptr->table_options= table_options;
- ptr->updating= MY_TEST(table_options & TL_OPTION_UPDATING);
- /* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */
- ptr->force_index= MY_TEST(table_options & TL_OPTION_FORCE_INDEX);
- ptr->ignore_leaves= MY_TEST(table_options & TL_OPTION_IGNORE_LEAVES);
- ptr->sequence= MY_TEST(table_options & TL_OPTION_SEQUENCE);
- ptr->derived= table->sel;
- if (!ptr->derived && is_infoschema_db(&ptr->db))
- {
- if (ptr->updating &&
- /* Special cases which are processed by commands itself */
- lex->sql_command != SQLCOM_CHECK &&
- lex->sql_command != SQLCOM_CHECKSUM)
- {
- my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
- thd->security_ctx->priv_user,
- thd->security_ctx->priv_host,
- INFORMATION_SCHEMA_NAME.str);
- DBUG_RETURN(0);
- }
- ST_SCHEMA_TABLE *schema_table;
- schema_table= find_schema_table(thd, &ptr->table_name);
- ptr->schema_table_name= ptr->table_name;
- ptr->schema_table= schema_table;
- }
- ptr->select_lex= this;
- /*
- We can't cache internal temporary tables between prepares as the
- table may be deleted before next exection.
- */
- ptr->cacheable_table= !table->is_derived_table();
- ptr->index_hints= index_hints_arg;
- ptr->option= option ? option->str : 0;
+
+ bool has_alias_ptr= alias != nullptr;
+ void *memregion= thd->calloc(sizeof(TABLE_LIST));
+ TABLE_LIST *ptr= new (memregion) TABLE_LIST(thd, db, fqtn, alias_str,
+ has_alias_ptr, table, lock_type,
+ mdl_type, table_options,
+ info_schema, this,
+ index_hints_arg, option);
+
/* check that used name is unique. Sequences are ignored */
if (lock_type != TL_IGNORE && !ptr->sequence)
{
@@ -8364,6 +8365,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
}
}
/* Store the table reference preceding the current one. */
+ TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */
if (table_list.elements > 0 && likely(!ptr->sequence))
{
/*
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 3c1a803c..590c2a50 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -1080,7 +1080,7 @@ void check_range_capable_PF(TABLE *table)
static bool set_up_partition_bitmaps(THD *thd, partition_info *part_info)
{
- uint32 *bitmap_buf;
+ my_bitmap_map *bitmap_buf;
uint bitmap_bits= part_info->num_subparts?
(part_info->num_subparts* part_info->num_parts):
part_info->num_parts;
@@ -1091,14 +1091,15 @@ static bool set_up_partition_bitmaps(THD *thd, partition_info *part_info)
/* Allocate for both read and lock_partitions */
if (unlikely(!(bitmap_buf=
- (uint32*) alloc_root(&part_info->table->mem_root,
- bitmap_bytes * 2))))
+ (my_bitmap_map*) alloc_root(&part_info->table->mem_root,
+ bitmap_bytes * 2))))
DBUG_RETURN(TRUE);
my_bitmap_init(&part_info->read_partitions, bitmap_buf, bitmap_bits);
/* Use the second half of the allocated buffer for lock_partitions */
- my_bitmap_init(&part_info->lock_partitions, bitmap_buf + (bitmap_bytes / 4),
- bitmap_bits);
+ my_bitmap_init(&part_info->lock_partitions,
+ (my_bitmap_map*) (((char*) bitmap_buf) + bitmap_bytes),
+ bitmap_bits);
part_info->bitmaps_are_initialized= TRUE;
part_info->set_partition_bitmaps(NULL);
DBUG_RETURN(FALSE);
@@ -7752,7 +7753,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
ERROR_INJECT("add_partition_1") ||
mysql_write_frm(lpt, WFRM_WRITE_SHADOW) ||
ERROR_INJECT("add_partition_2") ||
- wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) ||
+ wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME) ||
ERROR_INJECT("add_partition_3") ||
write_log_add_change_partition(lpt) ||
ERROR_INJECT("add_partition_4") ||
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index c968637d..f4ce4a4d 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1505,7 +1505,7 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin,
else
ret= plugin_do_initialize(plugin, state);
- if (ret)
+ if (ret && ret != HA_ERR_RETRY_INIT)
plugin_variables_deinit(plugin);
mysql_mutex_lock(&LOCK_plugin);
@@ -1786,6 +1786,7 @@ int plugin_init(int *argc, char **argv, int flags)
uint state= plugin_ptr->state;
mysql_mutex_unlock(&LOCK_plugin);
error= plugin_do_initialize(plugin_ptr, state);
+ DBUG_EXECUTE_IF("fail_spider_init_retry", error= 1;);
mysql_mutex_lock(&LOCK_plugin);
plugin_ptr->state= state;
if (error == HA_ERR_RETRY_INIT)
@@ -4261,7 +4262,7 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
if (unlikely(error))
{
- sql_print_error("Parsing options for plugin '%s' failed.",
+ sql_print_error("Parsing options for plugin '%s' failed. Disabling plugin",
tmp->name.str);
goto err;
}
diff --git a/sql/sql_plugin_services.inl b/sql/sql_plugin_services.inl
index 5ac06e76..b291bf5c 100644
--- a/sql/sql_plugin_services.inl
+++ b/sql/sql_plugin_services.inl
@@ -18,6 +18,7 @@
#include <service_versions.h>
#include <mysql/service_wsrep.h>
#include <mysql/service_thd_mdl.h>
+#include <mysql/service_print_check_msg.h>
struct st_service_ref {
const char *name;
@@ -219,6 +220,11 @@ static struct my_print_error_service_st my_print_error_handler=
my_printv_error
};
+static struct print_check_msg_service_st print_check_msg_handler=
+{
+ print_check_msg
+};
+
static struct json_service_st json_handler=
{
json_type,
@@ -336,6 +342,7 @@ static struct st_service_ref list_of_services[]=
{ "my_crypt_service", VERSION_my_crypt, &crypt_handler},
{ "my_md5_service", VERSION_my_md5, &my_md5_handler},
{ "my_print_error_service", VERSION_my_print_error, &my_print_error_handler},
+ { "print_check_msg_service", VERSION_print_check_msg, &print_check_msg_handler},
{ "my_sha1_service", VERSION_my_sha1, &my_sha1_handler},
{ "my_sha2_service", VERSION_my_sha2, &my_sha2_handler},
{ "my_snprintf_service", VERSION_my_snprintf, &my_snprintf_handler },
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 99e1d65d..adddca3d 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -273,6 +273,13 @@
OPTIMIZER_SWITCH_OPTIMIZE_JOIN_BUFFER_SIZE)
/*
+ See adjust_secondary_key_cost in sys_vars.cc for symbolic names.
+*/
+#define OPTIMIZER_ADJ_SEC_KEY_COST (1)
+#define OPTIMIZER_ADJ_DISABLE_MAX_SEEKS (2)
+#define OPTIMIZER_ADJ_DISABLE_FORCE_INDEX_GROUP_BY (4)
+
+/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
use strictly more than 64 bits by adding one more define above, you should
contact the replication team because the replication code should then be
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 8f0f15a9..f6f5cf20 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -68,6 +68,15 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
bool result=0;
select_errors=0; /* Write if more errors */
int tmp_write_to_binlog= *write_to_binlog= 1;
+#ifndef DBUG_OFF
+ /*
+ When invoked for handling a SIGHUP by rpl_shutdown_sighup.test, we need to
+ force the signal handler to wait after REFRESH_TABLES, as that will check
+ for a killed server, and we need to call hostname_cache_refresh after
+ server cleanup has happened to trigger MDEV-30260.
+ */
+ int do_dbug_sleep= 0;
+#endif
DBUG_ASSERT(!thd || !thd->in_sub_stmt);
@@ -100,6 +109,15 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
*/
my_error(ER_UNKNOWN_ERROR, MYF(0));
}
+
+#ifndef DBUG_OFF
+ DBUG_EXECUTE_IF("hold_sighup_log_refresh", {
+ DBUG_ASSERT(!debug_sync_set_action(
+ thd, STRING_WITH_LEN("now SIGNAL in_reload_acl_and_cache "
+ "WAIT_FOR refresh_logs")));
+ do_dbug_sleep= 1;
+ });
+#endif
}
opt_noacl= 0;
@@ -352,6 +370,11 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
my_dbopt_cleanup();
}
+
+#ifndef DBUG_OFF
+ if (do_dbug_sleep)
+ my_sleep(3000000); // 3s
+#endif
if (options & REFRESH_HOSTS)
hostname_cache_refresh();
if (thd && (options & REFRESH_STATUS))
@@ -370,7 +393,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
}
#endif
-#ifdef HAVE_OPENSSL
+#ifdef HAVE_des
if (options & REFRESH_DES_KEY_FILE)
{
if (des_key_file && load_des_key_file(des_key_file))
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index ad71bf6f..114c36a5 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -221,7 +221,7 @@ static int fake_rotate_event(binlog_send_info *info, ulonglong position,
char* p = info->log_file_name+dirname_length(info->log_file_name);
uint ident_len = (uint) strlen(p);
String *packet= info->packet;
- ha_checksum crc;
+ ha_checksum crc= 0;
/* reset transmit packet for the fake rotate event below */
if (reset_transmit_packet(info, info->flags, &ev_offset, &info->errmsg))
@@ -262,7 +262,7 @@ static int fake_gtid_list_event(binlog_send_info *info,
{
my_bool do_checksum;
int err;
- ha_checksum crc;
+ ha_checksum crc= 0;
char buf[128];
String str(buf, sizeof(buf), system_charset_info);
String* packet= info->packet;
@@ -2828,12 +2828,6 @@ static int send_one_binlog_file(binlog_send_info *info,
*/
if (send_events(info, log, linfo, end_pos))
return 1;
- DBUG_EXECUTE_IF("Notify_binlog_EOF",
- {
- const char act[]= "now signal eof_reached";
- DBUG_ASSERT(!debug_sync_set_action(current_thd,
- STRING_WITH_LEN(act)));
- };);
}
return 1;
@@ -3876,13 +3870,7 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
if (lex_mi->use_gtid_opt == LEX_MASTER_INFO::LEX_GTID_SLAVE_POS)
mi->using_gtid= Master_info::USE_GTID_SLAVE_POS;
else if (lex_mi->use_gtid_opt == LEX_MASTER_INFO::LEX_GTID_CURRENT_POS)
- {
mi->using_gtid= Master_info::USE_GTID_CURRENT_POS;
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
- ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT,
- ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
- "master_use_gtid=current_pos", "master_demote_to_slave=1");
- }
else if (lex_mi->use_gtid_opt == LEX_MASTER_INFO::LEX_GTID_NO ||
lex_mi->log_file_name || lex_mi->pos ||
lex_mi->relay_log_name || lex_mi->relay_log_pos)
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index c3ce21d1..593ee900 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -289,8 +289,6 @@ static void update_tmptable_sum_func(Item_sum **func,TABLE *tmp_table);
static void copy_sum_funcs(Item_sum **func_ptr, Item_sum **end);
static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab);
static bool setup_sum_funcs(THD *thd, Item_sum **func_ptr);
-static bool prepare_sum_aggregators(THD *thd, Item_sum **func_ptr,
- bool need_distinct);
static bool init_sum_functions(Item_sum **func, Item_sum **end);
static bool update_sum_func(Item_sum **func);
static void select_describe(JOIN *join, bool need_tmp_table,bool need_order,
@@ -810,37 +808,57 @@ void remove_redundant_subquery_clauses(st_select_lex *subq_select_lex)
if (subq_select_lex->group_list.elements &&
!subq_select_lex->with_sum_func && !subq_select_lex->join->having)
{
+ /*
+ Temporary workaround for MDEV-28621: Do not remove GROUP BY expression
+ if it has any subqueries in it.
+ */
+ bool have_subquery= false;
for (ORDER *ord= subq_select_lex->group_list.first; ord; ord= ord->next)
{
- /*
- Do not remove the item if it is used in select list and then referred
- from GROUP BY clause by its name or number. Example:
-
- select (select ... ) as SUBQ ... group by SUBQ
+ if ((*ord->item)->with_subquery())
+ {
+ have_subquery= true;
+ break;
+ }
+ }
- Here SUBQ cannot be removed.
- */
- if (!ord->in_field_list)
+ if (!have_subquery)
+ {
+ for (ORDER *ord= subq_select_lex->group_list.first; ord; ord= ord->next)
{
- (*ord->item)->walk(&Item::eliminate_subselect_processor, FALSE, NULL);
/*
- Remove from the JOIN::all_fields list any reference to the elements
- of the eliminated GROUP BY list unless it is 'in_field_list'.
- This is needed in order not to confuse JOIN::make_aggr_tables_info()
- when it constructs different structure for execution phase.
- */
- List_iterator<Item> li(subq_select_lex->join->all_fields);
- Item *item;
- while ((item= li++))
- {
- if (item == *ord->item)
- li.remove();
- }
+ Do not remove the item if it is used in select list and then referred
+ from GROUP BY clause by its name or number. Example:
+
+ select (select ... ) as SUBQ ... group by SUBQ
+
+ Here SUBQ cannot be removed.
+ */
+ if (!ord->in_field_list)
+ {
+ /*
+ Not necessary due to workaround for MDEV-28621:
+ (*ord->item)->walk(&Item::eliminate_subselect_processor, FALSE, NULL);
+ */
+ /*
+ Remove from the JOIN::all_fields list any reference to the elements
+ of the eliminated GROUP BY list unless it is 'in_field_list'.
+ This is needed in order not to confuse JOIN::make_aggr_tables_info()
+ when it constructs different structure for execution phase.
+ */
+ List_iterator<Item> li(subq_select_lex->join->all_fields);
+ Item *item;
+ while ((item= li++))
+ {
+ if (item == *ord->item)
+ li.remove();
+ }
+ }
}
+ subq_select_lex->join->group_list= NULL;
+ subq_select_lex->group_list.empty();
+ DBUG_PRINT("info", ("GROUP BY removed"));
}
- subq_select_lex->join->group_list= NULL;
- subq_select_lex->group_list.empty();
- DBUG_PRINT("info", ("GROUP BY removed"));
}
/*
@@ -2351,6 +2369,10 @@ JOIN::optimize_inner()
select_lex->attach_to_conds,
&cond_value);
sel->attach_to_conds.empty();
+ Json_writer_object wrapper(thd);
+ Json_writer_object pushd(thd, "condition_pushdown_from_having");
+ pushd.add("conds", conds);
+ pushd.add("having", having);
}
}
@@ -3594,7 +3616,7 @@ bool JOIN::make_aggr_tables_info()
distinct in the engine, so we do this for all queries, not only
GROUP BY queries.
*/
- if (tables_list && top_join_tab_count && !procedure)
+ if (tables_list && top_join_tab_count && !only_const_tables() && !procedure)
{
/*
At the moment we only support push down for queries where
@@ -4225,7 +4247,7 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
if (make_sum_func_list(all_fields, fields_list, true))
goto err;
if (prepare_sum_aggregators(thd, sum_funcs,
- !(tables_list &&
+ !(tables_list &&
join_tab->is_using_agg_loose_index_scan())))
goto err;
if (setup_sum_funcs(thd, sum_funcs))
@@ -5948,7 +5970,8 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
*/
/* Largest integer that can be stored in double (no compiler warning) */
s->worst_seeks= (double) (1ULL << 53);
- if (thd->variables.optimizer_adjust_secondary_key_costs != 2)
+ if ((thd->variables.optimizer_adjust_secondary_key_costs &
+ OPTIMIZER_ADJ_DISABLE_MAX_SEEKS) == 0)
{
s->worst_seeks= MY_MIN((double) s->found_records / 10,
(double) s->read_time*3);
@@ -7935,7 +7958,8 @@ double cost_for_index_read(const THD *thd, const TABLE *table, uint key,
{
cost= ((file->keyread_time(key, 0, records) +
file->read_time(key, 1, MY_MIN(records, worst_seeks))));
- if (thd->variables.optimizer_adjust_secondary_key_costs == 1 &&
+ if ((thd->variables.optimizer_adjust_secondary_key_costs &
+ OPTIMIZER_ADJ_SEC_KEY_COST) &&
file->is_clustering_key(0))
{
/*
@@ -8131,8 +8155,9 @@ best_access_path(JOIN *join,
higher to ensure that ref|filter is not less than range over same
number of rows
*/
- double filter_setup_cost= (thd->variables.
- optimizer_adjust_secondary_key_costs == 2 ?
+ double filter_setup_cost= ((thd->variables.
+ optimizer_adjust_secondary_key_costs &
+ OPTIMIZER_ADJ_DISABLE_MAX_SEEKS) ?
1.0 : 0.0);
MY_BITMAP *eq_join_set= &s->table->eq_join_set;
KEYUSE *hj_start_key= 0;
@@ -13884,7 +13909,8 @@ end_sj_materialize(JOIN *join, JOIN_TAB *join_tab, bool end_of_records)
if (item->is_null())
DBUG_RETURN(NESTED_LOOP_OK);
}
- fill_record(thd, table, table->field, sjm->sjm_table_cols, TRUE, FALSE);
+ fill_record(thd, table, table->field, sjm->sjm_table_cols, true, false,
+ true);
if (unlikely(thd->is_error()))
DBUG_RETURN(NESTED_LOOP_ERROR); /* purecov: inspected */
if (unlikely((error= table->file->ha_write_tmp_row(table->record[0]))))
@@ -17249,6 +17275,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
if (!eq_item || eq_item->set_cmp_func(thd))
return 0;
+ eq_item->eval_not_null_tables(0);
eq_item->quick_fix_field();
}
current_sjm= field_sjm;
@@ -17306,6 +17333,7 @@ Item *eliminate_item_equal(THD *thd, COND *cond, COND_EQUAL *upper_levels,
{
res->quick_fix_field();
res->update_used_tables();
+ res->eval_not_null_tables(0);
}
return res;
@@ -18939,6 +18967,12 @@ Item_cond::remove_eq_conds(THD *thd, Item::cond_result *cond_value,
bool and_level= functype() == Item_func::COND_AND_FUNC;
List<Item> *cond_arg_list= argument_list();
+ if (check_stack_overrun(thd, STACK_MIN_SIZE, NULL))
+ {
+ *cond_value= Item::COND_FALSE;
+ return (COND*) 0; // Fatal error flag is set!
+ }
+
if (and_level)
{
/*
@@ -21502,7 +21536,7 @@ create_internal_tmp_table_from_heap(THD *thd, TABLE *table,
if (open_tmp_table(&new_table))
goto err1;
if (table->file->indexes_are_disabled())
- new_table.file->ha_disable_indexes(HA_KEY_SWITCH_ALL);
+ new_table.file->ha_disable_indexes(key_map(0), false);
table->file->ha_index_or_rnd_end();
if (table->file->ha_rnd_init_with_error(1))
DBUG_RETURN(1);
@@ -27668,15 +27702,86 @@ static bool setup_sum_funcs(THD *thd, Item_sum **func_ptr)
}
-static bool prepare_sum_aggregators(THD *thd,Item_sum **func_ptr,
- bool need_distinct)
+/*
+ @brief
+ Setup aggregate functions.
+
+ @param thd Thread descriptor
+ @param func_ptr Array of pointers to aggregate functions
+ @param need_distinct FALSE means that the table access method already
+ guarantees that arguments of all aggregate functions
+ will be unique. (This is the case for Loose Scan)
+ TRUE - Otherwise.
+ @return
+ false Ok
+ true Error
+*/
+
+bool JOIN::prepare_sum_aggregators(THD *thd, Item_sum **func_ptr,
+ bool need_distinct)
{
Item_sum *func;
DBUG_ENTER("prepare_sum_aggregators");
while ((func= *(func_ptr++)))
{
- if (func->set_aggregator(thd,
- need_distinct && func->has_with_distinct() ?
+ bool need_distinct_aggregator= need_distinct && func->has_with_distinct();
+ if (need_distinct_aggregator && table_count - const_tables == 1)
+ {
+ /*
+ We are doing setup for an aggregate with DISTINCT, like
+
+ SELECT agg_func(DISTINCT col1, col2 ...) FROM ...
+
+ In general case, agg_func will need to use Aggregator_distinct to
+ remove duplicates from its arguments.
+ We won't have to remove duplicates if we know the arguments are already
+ unique. This is true when
+ 1. the join operation has only one non-const table (checked above)
+ 2. the argument list covers a PRIMARY or a UNIQUE index.
+
+ Example: here the values of t1.pk are unique:
+
+ SELECT agg_func(DISTINCT t1.pk, ...) FROM t1
+
+ and so the whole argument of agg_func is unique.
+ */
+ List<Item> arg_fields;
+ for (uint i= 0; i < func->argument_count(); i++)
+ {
+ if (func->arguments()[i]->real_item()->type() == Item::FIELD_ITEM)
+ arg_fields.push_back(func->arguments()[i]);
+ }
+
+ /*
+ If the query has a GROUP BY, then it's sufficient that a unique
+ key is covered by a concatenation of {argument_list, group_by_list}.
+
+ Example: Suppose t1 has PRIMARY KEY(pk1, pk2). Then:
+
+ SELECT agg_func(DISTINCT t1.pk1, ...) FROM t1 GROUP BY t1.pk2
+
+ Each GROUP BY group will have t1.pk2 fixed. Then, the values of t1.pk1
+ will be unique, and no de-duplication will be needed.
+ */
+ for (ORDER *group= group_list; group ; group= group->next)
+ {
+ if ((*group->item)->real_item()->type() == Item::FIELD_ITEM)
+ arg_fields.push_back(*group->item);
+ }
+
+ if (list_contains_unique_index(join_tab[const_tables].table,
+ find_field_in_item_list,
+ (void *) &arg_fields))
+ need_distinct_aggregator= false;
+ }
+ Json_writer_object trace_wrapper(thd);
+ Json_writer_object trace_aggr(thd, "prepare_sum_aggregators");
+ trace_aggr.add("function", func);
+ trace_aggr.add("aggregator_type",
+ (need_distinct_aggregator ||
+ func->uses_non_standard_aggregator_for_distinct()) ?
+ "distinct" : "simple");
+ if (func->set_aggregator(thd, need_distinct_aggregator ?
Aggregator::DISTINCT_AGGREGATOR :
Aggregator::SIMPLE_AGGREGATOR))
DBUG_RETURN(TRUE);
@@ -30604,12 +30709,13 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
uint best_key_parts= 0;
int best_key_direction= 0;
ha_rows best_records= 0;
- double read_time;
+ double read_time, records;
int best_key= -1;
bool is_best_covering= FALSE;
double fanout= 1;
ha_rows table_records= table->stat_records();
bool group= join && join->group && order == join->group_list;
+ bool group_forces_index_usage= group;
ha_rows refkey_rows_estimate= table->opt_range_condition_rows;
const bool has_limit= (select_limit_arg != HA_POS_ERROR);
THD* thd= join ? join->thd : table->in_use;
@@ -30646,6 +30752,7 @@ 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;
+ records= join->best_positions[tablenr].records_read;
for (uint i= tablenr+1; i < join->table_count; i++)
{
fanout*= join->best_positions[i].records_read; // fanout is always >= 1
@@ -30654,8 +30761,23 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
}
}
else
+ {
read_time= table->file->scan_time();
+ records= rows2double(table_records);
+ }
+ if ((thd->variables.optimizer_adjust_secondary_key_costs &
+ OPTIMIZER_ADJ_DISABLE_FORCE_INDEX_GROUP_BY) && group)
+ {
+ /*
+ read_time does not include TIME_FOR_COMPARE while opt_range.cost, which
+ is used by index_scan_time contains it.
+ Ensure that read_time and index_scan_time always include it to make
+ costs comparable.
+ */
+ read_time+= records/TIME_FOR_COMPARE;
+ }
+
trace_cheaper_ordering.add("fanout", fanout);
/*
TODO: add cost of sorting here.
@@ -30847,30 +30969,62 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
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);
- /*
- Here we take into account the fact that rows are
- accessed in sequences rec_per_key records in each.
- Rows in such a sequence are supposed to be ordered
- by rowid/primary key. When reading the data
- in a sequence we'll touch not more pages than the
- table file contains.
- TODO. Use the formula for a disk sweep sequential access
- to calculate the cost of accessing data rows for one
- index entry.
- */
- 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, table_records, nr,
- select_limit, &range_scan_time))
+
+ if ((thd->variables.optimizer_adjust_secondary_key_costs &
+ OPTIMIZER_ADJ_DISABLE_FORCE_INDEX_GROUP_BY) && group)
{
- possible_key.add("range_scan_time", range_scan_time);
- if (range_scan_time < index_scan_time)
- index_scan_time= range_scan_time;
+ /* Special optimization to avoid forcing an index when group by is used */
+ group_forces_index_usage= 0;
+
+ if (table->opt_range_keys.is_set(nr))
+ {
+ /* opt_range includes TIME_FOR_COMPARE */
+ index_scan_time= (double) table->opt_range[nr].cost;
+ }
+ else
+ {
+ /* Enable secondary_key_cost and disable max_seek option */
+ ulonglong save= thd->variables.optimizer_adjust_secondary_key_costs;
+ thd->variables.optimizer_adjust_secondary_key_costs|=
+ OPTIMIZER_ADJ_SEC_KEY_COST | OPTIMIZER_ADJ_DISABLE_MAX_SEEKS;
+
+ index_scan_time= cost_for_index_read(thd, table, nr,
+ table_records, HA_ROWS_MAX);
+ index_scan_time+= rows2double(table_records) / TIME_FOR_COMPARE;
+ thd->variables.optimizer_adjust_secondary_key_costs= save;
+ }
+ /* Assume data is proportionalyl distributed */
+ index_scan_time*= MY_MIN(select_limit, rec_per_key) / rec_per_key;
+ }
+ else
+ {
+ /*
+ Here we take into account the fact that rows are
+ accessed in sequences rec_per_key records in each.
+ Rows in such a sequence are supposed to be ordered
+ by rowid/primary key. When reading the data
+ in a sequence we'll touch not more pages than the
+ table file contains.
+ TODO. Use the formula for a disk sweep sequential access
+ to calculate the cost of accessing data rows for one
+ index entry.
+ */
+ 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, 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)) ||
+ if ((ref_key < 0 &&
+ (group_forces_index_usage || table->force_index || is_covering)) ||
index_scan_time < read_time)
{
ha_rows quick_records= table_records;
@@ -30892,6 +31046,7 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
possible_key.add("cause", "ref estimates better");
continue;
}
+
if (table->opt_range_keys.is_set(nr))
quick_records= table->opt_range[nr].rows;
possible_key.add("records", quick_records);
@@ -30910,6 +31065,9 @@ test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table,
is_best_covering= is_covering;
best_key_direction= direction;
best_select_limit= select_limit;
+ if ((thd->variables.optimizer_adjust_secondary_key_costs &
+ OPTIMIZER_ADJ_DISABLE_FORCE_INDEX_GROUP_BY) && group)
+ set_if_smaller(read_time, index_scan_time);
}
else
{
@@ -31772,7 +31930,26 @@ void JOIN::init_join_cache_and_keyread()
if (!(table->file->index_flags(table->file->keyread, 0, 1) & HA_CLUSTERED_INDEX))
table->mark_index_columns(table->file->keyread, table->read_set);
}
- if (tab->cache && tab->cache->init(select_options & SELECT_DESCRIBE))
+ bool init_for_explain= false;
+
+ /*
+ Can we use lightweight initalization mode just for EXPLAINs? We can if
+ we're certain that the optimizer will not execute the subquery.
+ The optimzier will not execute the subquery if it's too expensive. For
+ the exact criteria, see Item_subselect::is_expensive().
+ Note that the subquery might be a UNION and we might not yet know if it
+ is expensive.
+ What we do know is that if this SELECT is too expensive, then the whole
+ subquery will be too expensive as well.
+ So, we can use lightweight initialization (init_for_explain=true) if this
+ SELECT examines more than @@expensive_subquery_limit rows.
+ */
+ if ((select_options & SELECT_DESCRIBE) &&
+ get_examined_rows() >= thd->variables.expensive_subquery_limit)
+ {
+ init_for_explain= true;
+ }
+ if (tab->cache && tab->cache->init(init_for_explain))
revise_cache_usage(tab);
else
tab->remove_redundant_bnl_scan_conds();
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 4f2719f1..6d1d4626 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1866,6 +1866,8 @@ private:
bool add_fields_for_current_rowid(JOIN_TAB *cur, List<Item> *fields);
void free_pushdown_handlers(List<TABLE_LIST>& join_list);
void init_join_cache_and_keyread();
+ bool prepare_sum_aggregators(THD *thd,Item_sum **func_ptr,
+ bool need_distinct);
bool transform_in_predicates_into_equalities(THD *thd);
bool transform_all_conds_and_on_exprs(THD *thd,
Item_transformer transformer);
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index f6d7c310..b1d59aac 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -28,6 +28,9 @@
#include "sql_acl.h"
#ifdef WITH_WSREP
#include "wsrep_mysqld.h"
+bool wsrep_check_sequence(THD* thd,
+ const sequence_definition *seq,
+ const bool used_engine);
#endif
struct Field_definition
@@ -942,7 +945,8 @@ bool Sql_cmd_alter_sequence::execute(THD *thd)
#ifdef WITH_WSREP
if (WSREP(thd) && wsrep_thd_is_local(thd))
{
- if (wsrep_check_sequence(thd, new_seq))
+ const bool used_engine= lex->create_info.used_fields & HA_CREATE_USED_ENGINE;
+ if (wsrep_check_sequence(thd, new_seq, used_engine))
DBUG_RETURN(TRUE);
if (wsrep_to_isolation_begin(thd, first_table->db.str,
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 980c2fa7..c09de58c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2805,9 +2805,10 @@ static my_bool list_callback(THD *tmp, list_callback_arg *arg)
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"));
+ thd_info->user= arg->thd->strdup(tmp_sctx->user && tmp_sctx->user != slave_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])
{
@@ -3029,7 +3030,7 @@ int select_result_explain_buffer::send_data(List<Item> &items)
Show_explain_request::call_in_target_thread, is this necessary anymore?)
*/
set_current_thd(thd);
- fill_record(thd, dst_table, dst_table->field, items, TRUE, FALSE);
+ fill_record(thd, dst_table, dst_table->field, items, true, false, false);
res= dst_table->file->ha_write_tmp_row(dst_table->record[0]);
set_current_thd(cur_thd);
DBUG_RETURN(MY_TEST(res));
@@ -3310,7 +3311,7 @@ static my_bool processlist_callback(THD *tmp, processlist_callback_arg *arg)
/* ID */
arg->table->field[0]->store((longlong) tmp->thread_id, TRUE);
/* USER */
- val= tmp_sctx->user ? tmp_sctx->user :
+ val= tmp_sctx->user && tmp_sctx->user != slave_user ? tmp_sctx->user :
(tmp->system_thread ? "system user" : "unauthenticated user");
arg->table->field[1]->store(val, strlen(val), cs);
/* HOST */
@@ -9608,7 +9609,7 @@ ST_FIELD_INFO stat_fields_info[]=
Column("PACKED", Varchar(10), NULLABLE, "Packed", OPEN_FRM_ONLY),
Column("NULLABLE", Varchar(3), NOT_NULL, "Null", OPEN_FRM_ONLY),
Column("INDEX_TYPE", Varchar(16), NOT_NULL, "Index_type", OPEN_FULL_TABLE),
- Column("COMMENT", Varchar(16), NULLABLE, "Comment", OPEN_FRM_ONLY),
+ Column("COMMENT", Varchar(16), NULLABLE, "Comment", OPEN_FULL_TABLE),
Column("INDEX_COMMENT", Varchar(INDEX_COMMENT_MAXLEN),
NOT_NULL, "Index_comment",OPEN_FRM_ONLY),
Column("IGNORED", Varchar(3), NOT_NULL, "Ignored", OPEN_FRM_ONLY),
@@ -10196,6 +10197,7 @@ ST_SCHEMA_TABLE schema_tables[]=
int initialize_schema_table(st_plugin_int *plugin)
{
ST_SCHEMA_TABLE *schema_table;
+ int err;
DBUG_ENTER("initialize_schema_table");
if (!(schema_table= (ST_SCHEMA_TABLE *)my_malloc(key_memory_ST_SCHEMA_TABLE,
@@ -10212,12 +10214,15 @@ int initialize_schema_table(st_plugin_int *plugin)
/* Make the name available to the init() function. */
schema_table->table_name= plugin->name.str;
- if (plugin->plugin->init(schema_table))
+ if ((err= plugin->plugin->init(schema_table)))
{
- sql_print_error("Plugin '%s' init function returned error.",
- plugin->name.str);
+ if (err != HA_ERR_RETRY_INIT)
+ sql_print_error("Plugin '%s' init function returned error.",
+ plugin->name.str);
plugin->data= NULL;
my_free(schema_table);
+ if (err == HA_ERR_RETRY_INIT)
+ DBUG_RETURN(err);
DBUG_RETURN(1);
}
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index ec369006..e552bab0 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -2906,6 +2906,9 @@ int collect_statistics_for_table(THD *thd, TABLE *table)
After having been updated the statistical system tables are closed.
*/
+/* Stack usage 20248 from clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int update_statistics_for_table(THD *thd, TABLE *table)
{
TABLE_LIST tables[STATISTICS_TABLES];
@@ -2990,6 +2993,7 @@ int update_statistics_for_table(THD *thd, TABLE *table)
new_trans.restore_old_transaction();
DBUG_RETURN(rc);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/**
@@ -3397,6 +3401,9 @@ end:
The function is called when executing the statement DROP TABLE 'tab'.
*/
+/* Stack size 20248 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db,
const LEX_CSTRING *tab)
{
@@ -3465,6 +3472,7 @@ int delete_statistics_for_table(THD *thd, const LEX_CSTRING *db,
new_trans.restore_old_transaction();
DBUG_RETURN(rc);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/**
@@ -4009,6 +4017,9 @@ int rename_indexes_in_stat_table(THD *thd, TABLE *tab,
The function is called when executing any statement that renames a table
*/
+/* Stack size 20968 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db,
const LEX_CSTRING *tab,
const LEX_CSTRING *new_db,
@@ -4086,6 +4097,7 @@ int rename_table_in_stat_tables(THD *thd, const LEX_CSTRING *db,
new_trans.restore_old_transaction();
DBUG_RETURN(rc);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/**
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 25521bb3..f5edb1a5 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -1145,26 +1145,45 @@ bool String::append_for_single_quote(const char *st, size_t len)
int chlen;
for (; st < end; st++)
{
- switch (*st)
+ char ch2= (char) (uchar) escaped_wc_for_single_quote((uchar) *st);
+ if (ch2)
{
- case '\\': APPEND(STRING_WITH_LEN("\\\\")); break;
- case '\0': APPEND(STRING_WITH_LEN("\\0")); break;
- case '\'': APPEND(STRING_WITH_LEN("\\'")); break;
- case '\n': APPEND(STRING_WITH_LEN("\\n")); break;
- case '\r': APPEND(STRING_WITH_LEN("\\r")); break;
- case '\032': APPEND(STRING_WITH_LEN("\\Z")); break;
- default: if ((chlen=charset()->charlen(st, end)) > 0)
- {
- APPEND(st, chlen);
- st+= chlen-1;
- }
- else
- APPEND(*st);
+ if (append('\\') || append(ch2))
+ return true;
+ continue;
}
+ if ((chlen= charset()->charlen(st, end)) > 0)
+ {
+ APPEND(st, chlen);
+ st+= chlen-1;
+ }
+ else
+ APPEND(*st);
}
return 0;
}
+
+bool String::append_for_single_quote_using_mb_wc(const char *src,
+ size_t length,
+ CHARSET_INFO *cs)
+{
+ DBUG_ASSERT(&my_charset_bin != charset());
+ DBUG_ASSERT(&my_charset_bin != cs);
+ const uchar *str= (const uchar *) src;
+ const uchar *end= (const uchar *) src + length;
+ int chlen;
+ my_wc_t wc;
+ for ( ; (chlen= cs->cset->mb_wc(cs, &wc, str, end)) > 0; str+= chlen)
+ {
+ my_wc_t wc2= escaped_wc_for_single_quote(wc);
+ if (wc2 ? (append_wc('\\') || append_wc(wc2)) : append_wc(wc))
+ return true;
+ }
+ return false;
+}
+
+
void String::print(String *str) const
{
str->append_for_single_quote(Ptr, str_length);
diff --git a/sql/sql_string.h b/sql/sql_string.h
index 20073592..3b90f2c4 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -1188,6 +1188,42 @@ public:
print_with_conversion(to, cs);
}
+ static my_wc_t escaped_wc_for_single_quote(my_wc_t ch)
+ {
+ switch (ch)
+ {
+ case '\\': return '\\';
+ case '\0': return '0';
+ case '\'': return '\'';
+ case '\n': return 'n';
+ case '\r': return 'r';
+ case '\032': return 'Z';
+ }
+ return 0;
+ }
+
+ // Append for single quote using mb_wc/wc_mb Unicode conversion
+ bool append_for_single_quote_using_mb_wc(const char *str, size_t length,
+ CHARSET_INFO *cs);
+
+ // Append for single quote with optional mb_wc/wc_mb conversion
+ bool append_for_single_quote_opt_convert(const char *str,
+ size_t length,
+ CHARSET_INFO *cs)
+ {
+ return charset() == &my_charset_bin || cs == &my_charset_bin ||
+ my_charset_same(charset(), cs) ?
+ append_for_single_quote(str, length) :
+ append_for_single_quote_using_mb_wc(str, length, cs);
+ }
+
+ bool append_for_single_quote_opt_convert(const String &str)
+ {
+ return append_for_single_quote_opt_convert(str.ptr(),
+ str.length(),
+ str.charset());
+ }
+
bool append_for_single_quote(const char *st, size_t len);
bool append_for_single_quote(const String *s)
{
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 7e4d271b..c2306c53 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1468,6 +1468,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables,
temporary_table_was_dropped= 1;
}
is_temporary= 1;
+ thd->reset_sp_cache= true;
}
if ((drop_temporary && if_exists) || temporary_table_was_dropped)
@@ -1841,8 +1842,11 @@ report_error:
}
DBUG_PRINT("table", ("table: %p s: %p", table->table,
table->table ? table->table->s : NULL));
+ if (is_temporary_table(table))
+ thd->reset_sp_cache= true;
}
DEBUG_SYNC(thd, "rm_table_no_locks_before_binlog");
+
thd->used|= THD::THREAD_SPECIFIC_USED;
error= 0;
@@ -4678,6 +4682,7 @@ int create_table_impl(THD *thd,
if (is_trans != NULL)
*is_trans= table->file->has_transactions();
+ thd->reset_sp_cache= true;
thd->used|= THD::THREAD_SPECIFIC_USED;
create_info->table= table; // Store pointer to table
}
@@ -4804,18 +4809,21 @@ int mysql_create_table_no_lock(THD *thd,
#ifdef WITH_WSREP
/** Additional sequence checks for Galera cluster.
-@param thd thread handle
-@param seq sequence definition
+@param thd thread handle
+@param seq sequence definition
+@param used_engine create used ENGINE=
@retval false success
@retval true failure
*/
-bool wsrep_check_sequence(THD* thd, const sequence_definition *seq)
+bool wsrep_check_sequence(THD* thd,
+ const sequence_definition *seq,
+ const bool used_engine)
{
enum legacy_db_type db_type;
DBUG_ASSERT(WSREP(thd));
- if (thd->lex->create_info.used_fields & HA_CREATE_USED_ENGINE)
+ if (used_engine)
{
db_type= thd->lex->create_info.db_type->db_type;
}
@@ -4846,6 +4854,57 @@ bool wsrep_check_sequence(THD* thd, const sequence_definition *seq)
return (false);
}
+
+/** Additional CREATE TABLE/SEQUENCE checks for Galera cluster.
+
+@param thd thread handle
+@param wsrep_ctas CREATE TABLE AS SELECT ?
+@param used_engine CREATE TABLE ... ENGINE = ?
+@param create_info Create information
+
+@retval false Galera cluster does support used clause
+@retval true Galera cluster does not support used clause
+*/
+static
+bool wsrep_check_support(THD* thd,
+ const bool wsrep_ctas,
+ const bool used_engine,
+ const HA_CREATE_INFO* create_info)
+{
+ /* CREATE TABLE ... AS SELECT */
+ if (wsrep_ctas &&
+ thd->variables.wsrep_trx_fragment_size > 0)
+ {
+ my_message(ER_NOT_ALLOWED_COMMAND,
+ "CREATE TABLE AS SELECT is not supported with streaming replication",
+ MYF(0));
+ return true;
+ }
+ /* CREATE TABLE .. WITH SYSTEM VERSIONING AS SELECT
+ is not supported in Galera cluster.
+ */
+ if (wsrep_ctas &&
+ create_info->versioned())
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "SYSTEM VERSIONING AS SELECT in Galera cluster");
+ return true;
+ }
+ /*
+ CREATE TABLE ... ENGINE=SEQUENCE is not supported in
+ Galera cluster.
+ CREATE SEQUENCE ... ENGINE=xxx Galera cluster supports
+ only InnoDB-sequences.
+ */
+ if (((used_engine && create_info->db_type &&
+ (create_info->db_type->db_type == DB_TYPE_SEQUENCE ||
+ create_info->db_type->db_type >= DB_TYPE_FIRST_DYNAMIC)) ||
+ thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE) &&
+ wsrep_check_sequence(thd, create_info->seq_create_info, used_engine))
+ return true;
+
+ return false;
+}
#endif /* WITH_WSREP */
/**
@@ -4921,15 +4980,6 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table,
if (!(thd->variables.option_bits & OPTION_EXPLICIT_DEF_TIMESTAMP))
promote_first_timestamp_column(&alter_info->create_list);
-#ifdef WITH_WSREP
- if (thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE &&
- WSREP(thd) && wsrep_thd_is_local_toi(thd))
- {
- if (wsrep_check_sequence(thd, create_info->seq_create_info))
- DBUG_RETURN(true);
- }
-#endif /* WITH_WSREP */
-
/* We can abort create table for any table type */
thd->abort_on_warning= thd->is_strict_mode();
@@ -5121,7 +5171,8 @@ static bool make_unique_constraint_name(THD *thd, LEX_CSTRING *name,
if (!check) // Found unique name
{
name->length= (size_t) (real_end - buff);
- name->str= strmake_root(thd->stmt_arena->mem_root, buff, name->length);
+ name->str= thd->strmake(buff, name->length);
+
return (name->str == NULL);
}
}
@@ -6556,8 +6607,6 @@ static KEY *find_key_ci(const char *key_name, KEY *key_start, KEY *key_end)
@param thd Thread
@param table The original table.
- @param varchar Indicates that new definition has new
- VARCHAR column.
@param[in/out] ha_alter_info Data structure which already contains
basic information about create options,
field and keys for the new version of
@@ -6592,7 +6641,7 @@ static KEY *find_key_ci(const char *key_name, KEY *key_start, KEY *key_end)
@retval false success
*/
-static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
+static bool fill_alter_inplace_info(THD *thd, TABLE *table,
Alter_inplace_info *ha_alter_info)
{
Field **f_ptr, *field;
@@ -6642,13 +6691,6 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
if (alter_info->flags & ALTER_CHANGE_COLUMN)
ha_alter_info->handler_flags|= ALTER_COLUMN_DEFAULT;
- /*
- If we altering table with old VARCHAR fields we will be automatically
- upgrading VARCHAR column types.
- */
- if (table->s->frm_version < FRM_VER_TRUE_VARCHAR && varchar)
- ha_alter_info->handler_flags|= ALTER_STORED_COLUMN_TYPE;
-
DBUG_PRINT("info", ("handler_flags: %llu", ha_alter_info->handler_flags));
/*
@@ -6690,6 +6732,30 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
Check if type of column has changed.
*/
bool is_equal= field->is_equal(*new_field);
+
+ if (is_equal)
+ {
+ const Type_handler *th= field->type_handler();
+ if (th != th->type_handler_for_implicit_upgrade())
+ {
+ /*
+ The field data type says it wants upgrade.
+ This should not be possible:
+ - if this is a new column definition, e.g. from statements like:
+ ALTER TABLE t1 ADD a INT;
+ ALTER TABLE t1 MODIFY a INT;
+ then it's coming from the parser, which returns
+ only up-to-date data types.
+ - if this is an old column definition, e.g. from:
+ ALTER TABLE t1 COMMENT 'new comment';
+ it should have ealier called Column_definition_implicit_upgrade(),
+ which replaces old data types to up-to-date data types.
+ */
+ DBUG_ASSERT(0);
+ is_equal= false;
+ }
+ }
+
if (!is_equal)
{
if (field->table->file->can_convert_nocopy(*field, *new_field))
@@ -7341,14 +7407,28 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
switch (keys_onoff) {
case Alter_info::ENABLE:
DEBUG_SYNC(table->in_use, "alter_table_enable_indexes");
- error= table->file->ha_enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ error= table->file->ha_enable_indexes(key_map(table->s->keys), true);
break;
case Alter_info::LEAVE_AS_IS:
if (!indexes_were_disabled)
break;
/* fall through */
case Alter_info::DISABLE:
- error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ {
+ key_map map= table->s->keys_in_use;
+ bool do_clear= false;
+ for (uint i=0; i < table->s->keys; i++)
+ {
+ if (!(table->s->key_info[i].flags & HA_NOSAME) &&
+ i != table->s->next_number_index)
+ {
+ map.clear_bit(i);
+ do_clear= true;
+ }
+ }
+ if (do_clear)
+ error= table->file->ha_disable_indexes(map, true);
+ }
}
if (unlikely(error))
@@ -9093,7 +9173,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
case Alter_drop::CHECK_CONSTRAINT:
case Alter_drop::PERIOD:
my_error(ER_CANT_DROP_FIELD_OR_KEY, MYF(0), drop->type_name(),
- alter_info->drop_list.head()->name);
+ drop->name);
goto err;
case Alter_drop::FOREIGN_KEY:
// Leave the DROP FOREIGN KEY names in the alter_info->drop_list.
@@ -10060,12 +10140,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
*/
KEY *key_info;
uint key_count;
- /*
- Remember if the new definition has new VARCHAR column;
- create_info->varchar will be reset in create_table_impl()/
- mysql_prepare_create_table().
- */
- bool varchar= create_info->varchar, table_creation_was_logged= 0;
+ bool table_creation_was_logged= 0;
bool binlog_as_create_select= 0, log_if_exists= 0;
uint tables_opened;
handlerton *new_db_type= create_info->db_type, *old_db_type;
@@ -10095,6 +10170,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
TODO: this design is obsolete and will be removed.
*/
int table_kind= check_if_log_table(table_list, FALSE, NullS);
+ const bool used_engine= create_info->used_fields & HA_CREATE_USED_ENGINE;
if (table_kind)
{
@@ -10106,7 +10182,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
}
/* Disable alter of log tables to unsupported engine */
- if ((create_info->used_fields & HA_CREATE_USED_ENGINE) &&
+ if ((used_engine) &&
(!create_info->db_type || /* unknown engine */
!(create_info->db_type->flags & HTON_SUPPORT_LOG_TABLES)))
{
@@ -10196,14 +10272,14 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
if we can support implementing storage engine.
*/
if (WSREP(thd) && table && table->s->sequence &&
- wsrep_check_sequence(thd, thd->lex->create_info.seq_create_info))
+ wsrep_check_sequence(thd, create_info->seq_create_info, used_engine))
DBUG_RETURN(TRUE);
- if (WSREP(thd) &&
+ if (WSREP(thd) && table &&
(thd->lex->sql_command == SQLCOM_ALTER_TABLE ||
thd->lex->sql_command == SQLCOM_CREATE_INDEX ||
thd->lex->sql_command == SQLCOM_DROP_INDEX) &&
- !wsrep_should_replicate_ddl(thd, table_list->table->s->db_type()))
+ !wsrep_should_replicate_ddl(thd, table->s->db_type()))
DBUG_RETURN(true);
#endif /* WITH_WSREP */
@@ -10701,12 +10777,10 @@ do_continue:;
#endif
#ifdef WITH_WSREP
+ // ALTER TABLE for sequence object, check can we support it
if (table->s->sequence && WSREP(thd) &&
- wsrep_thd_is_local_toi(thd))
- {
- if (wsrep_check_sequence(thd, create_info->seq_create_info))
+ wsrep_check_sequence(thd, create_info->seq_create_info, used_engine))
DBUG_RETURN(TRUE);
- }
#endif /* WITH_WSREP */
/*
@@ -10884,7 +10958,7 @@ do_continue:;
bool use_inplace= true;
/* Fill the Alter_inplace_info structure. */
- if (fill_alter_inplace_info(thd, table, varchar, &ha_alter_info))
+ if (fill_alter_inplace_info(thd, table, &ha_alter_info))
goto err_new_table_cleanup;
alter_ctx.tmp_storage_engine_name_partitioned=
@@ -12501,17 +12575,11 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
#endif
#ifdef WITH_WSREP
- if (wsrep_ctas)
+ if (WSREP(thd) &&
+ wsrep_check_support(thd, wsrep_ctas, used_engine, &create_info))
{
- if (thd->variables.wsrep_trx_fragment_size > 0)
- {
- my_message(
- ER_NOT_ALLOWED_COMMAND,
- "CREATE TABLE AS SELECT is not supported with streaming replication",
- MYF(0));
- res= 1;
- goto end_with_restore_list;
- }
+ res= 1;
+ goto end_with_restore_list;
}
#endif /* WITH_WSREP */
@@ -12663,6 +12731,7 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
create_table->table_name, create_table->db))
goto end_with_restore_list;
+#ifdef WITH_WSREP
/*
In STATEMENT format, we probably have to replicate also temporary
tables, like mysql replication does. Also check if the requested
@@ -12671,33 +12740,32 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
if (WSREP(thd))
{
handlerton *orig_ht= create_info.db_type;
+
if (!check_engine(thd, create_table->db.str,
create_table->table_name.str,
&create_info) &&
(!thd->is_current_stmt_binlog_format_row() ||
!create_info.tmp_table()))
{
-#ifdef WITH_WSREP
if (thd->lex->sql_command == SQLCOM_CREATE_SEQUENCE &&
- wsrep_check_sequence(thd, lex->create_info.seq_create_info))
+ wsrep_check_sequence(thd, lex->create_info.seq_create_info, used_engine))
DBUG_RETURN(true);
- WSREP_TO_ISOLATION_BEGIN_ALTER(create_table->db.str,
- create_table->table_name.str,
- first_table, &alter_info, NULL,
- &create_info)
- {
- WSREP_WARN("CREATE TABLE isolation failure");
+ WSREP_TO_ISOLATION_BEGIN_ALTER(create_table->db.str, create_table->table_name.str,
+ first_table, &alter_info, NULL, &create_info)
+ {
+ WSREP_WARN("CREATE TABLE isolation failure");
res= true;
goto end_with_restore_list;
- }
-#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);
}
diff --git a/sql/sql_table.h b/sql/sql_table.h
index fded8353..a75fa58a 100644
--- a/sql/sql_table.h
+++ b/sql/sql_table.h
@@ -216,8 +216,4 @@ extern MYSQL_PLUGIN_IMPORT const LEX_CSTRING primary_key_name;
bool check_engine(THD *, const char *, const char *, HA_CREATE_INFO *);
-#ifdef WITH_WSREP
-bool wsrep_check_sequence(THD* thd, const class sequence_definition *seq);
-#endif
-
#endif /* SQL_TABLE_INCLUDED */
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index a086e338..b1911c79 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -41,6 +41,7 @@ Named_type_handler<Type_handler_bool> type_handler_bool("boolean");
Named_type_handler<Type_handler_tiny> type_handler_stiny("tinyint");
Named_type_handler<Type_handler_short> type_handler_sshort("smallint");
Named_type_handler<Type_handler_long> type_handler_slong("int");
+Named_type_handler<Type_handler_long_ge0> type_handler_slong_ge0("int");
Named_type_handler<Type_handler_int24> type_handler_sint24("mediumint");
Named_type_handler<Type_handler_longlong> type_handler_slonglong("bigint");
Named_type_handler<Type_handler_utiny> type_handler_utiny("tiny unsigned");
@@ -4620,6 +4621,10 @@ bool Type_handler_general_purpose_int::
bool unsigned_flag= items[0]->unsigned_flag;
for (uint i= 1; i < nitems; i++)
{
+ /*
+ TODO: avoid creating DECIMAL for a mix of ulong and slong_ge0.
+ It's too late for 10.5. Let's do it in a higher version.
+ */
if (unsigned_flag != items[i]->unsigned_flag)
{
// Convert a mixture of signed and unsigned int to decimal
@@ -4629,6 +4634,21 @@ bool Type_handler_general_purpose_int::
}
}
func->aggregate_attributes_int(items, nitems);
+ for (uint i= 0; i < nitems; i++)
+ {
+ if (items[i]->type_handler() == &type_handler_slong_ge0)
+ {
+ /*
+ A slong_ge0 argument found.
+ We need to add an extra character for the sign.
+ TODO: rewrite aggregate_attributes_int() to find
+ the maximum decimal_precision() instead of the maximum max_length.
+ This change is too late for 10.5, so let's do it in a higher version.
+ */
+ uint digits_and_sign= items[i]->decimal_precision() + 1;
+ set_if_bigger(func->max_length, digits_and_sign);
+ }
+ }
handler->set_handler(func->unsigned_flag ?
handler->type_handler()->type_handler_unsigned() :
handler->type_handler()->type_handler_signed());
@@ -4924,6 +4944,13 @@ bool Type_handler_real_result::
/*************************************************************************/
+bool Type_handler_long_ge0::
+ Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const
+{
+ return func->fix_length_and_dec_sint_ge0();
+}
+
+
bool Type_handler_int_result::
Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const
{
@@ -6366,6 +6393,14 @@ bool Type_handler_int_result::
}
+bool Type_handler_long_ge0::
+ Item_func_round_fix_length_and_dec(Item_func_round *item) const
+{
+ item->fix_arg_slong_ge0();
+ return false;
+}
+
+
bool Type_handler_year::
Item_func_round_fix_length_and_dec(Item_func_round *item) const
{
@@ -6587,6 +6622,14 @@ bool Type_handler_int_result::
}
+bool Type_handler_long_ge0::
+ Item_func_abs_fix_length_and_dec(Item_func_abs *item) const
+{
+ item->fix_length_and_dec_sint_ge0();
+ return false;
+}
+
+
bool Type_handler_real_result::
Item_func_abs_fix_length_and_dec(Item_func_abs *item) const
{
@@ -6697,6 +6740,22 @@ bool Type_handler::
}
+bool Type_handler_long_ge0::
+ Item_func_signed_fix_length_and_dec(Item_func_signed *item) const
+{
+ item->fix_length_and_dec_sint_ge0();
+ return false;
+}
+
+
+bool Type_handler_long_ge0::
+ Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *item) const
+{
+ item->fix_length_and_dec_sint_ge0();
+ return false;
+}
+
+
bool Type_handler_string_result::
Item_func_signed_fix_length_and_dec(Item_func_signed *item) const
{
@@ -7182,6 +7241,18 @@ decimal_digits_t Type_handler_int_result::Item_decimal_precision(const Item *ite
return (decimal_digits_t) MY_MIN(prec, DECIMAL_MAX_PRECISION);
}
+decimal_digits_t Type_handler_long_ge0::Item_decimal_precision(const Item *item) const
+{
+ DBUG_ASSERT(item->max_length);
+ DBUG_ASSERT(!item->decimals);
+ /*
+ Unlinke in Type_handler_long, Type_handler_long_ge does
+ not reserve one character for the sign. All max_length
+ characters are digits.
+ */
+ return MY_MIN(item->max_length, DECIMAL_MAX_PRECISION);
+}
+
decimal_digits_t Type_handler_time_common::Item_decimal_precision(const Item *item) const
{
return (decimal_digits_t) (7 + MY_MIN(item->decimals, TIME_SECOND_PART_DIGITS));
@@ -8183,6 +8254,26 @@ Field *Type_handler_long::
}
+Field *Type_handler_long_ge0::
+ 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
+{
+ /*
+ We're converting signed long_ge0 to signed long.
+ So add one character for the sign.
+ */
+ return new (mem_root)
+ Field_long(rec.ptr(), (uint32) attr->length + 1/*sign*/,
+ 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,
@@ -8804,41 +8895,48 @@ bool Type_handler_string_result::union_element_finalize(Item_type_holder* item)
/***************************************************************************/
-void Type_handler_var_string::
- Column_definition_implicit_upgrade(Column_definition *c) const
+
+const Type_handler *
+Type_handler_var_string::type_handler_for_implicit_upgrade() const
+{
+ return &type_handler_varchar;
+}
+
+
+void Type_handler::
+ Column_definition_implicit_upgrade_to_this(Column_definition *old) const
{
- // Change old VARCHAR to new VARCHAR
- c->set_handler(&type_handler_varchar);
+ old->set_handler(this);
}
void Type_handler_time_common::
- Column_definition_implicit_upgrade(Column_definition *c) const
+ Column_definition_implicit_upgrade_to_this(Column_definition *old) const
{
if (opt_mysql56_temporal_format)
- c->set_handler(&type_handler_time2);
+ old->set_handler(&type_handler_time2);
else
- c->set_handler(&type_handler_time);
+ old->set_handler(&type_handler_time);
}
void Type_handler_datetime_common::
- Column_definition_implicit_upgrade(Column_definition *c) const
+ Column_definition_implicit_upgrade_to_this(Column_definition *old) const
{
if (opt_mysql56_temporal_format)
- c->set_handler(&type_handler_datetime2);
+ old->set_handler(&type_handler_datetime2);
else
- c->set_handler(&type_handler_datetime);
+ old->set_handler(&type_handler_datetime);
}
void Type_handler_timestamp_common::
- Column_definition_implicit_upgrade(Column_definition *c) const
+ Column_definition_implicit_upgrade_to_this(Column_definition *old) const
{
if (opt_mysql56_temporal_format)
- c->set_handler(&type_handler_timestamp2);
+ old->set_handler(&type_handler_timestamp2);
else
- c->set_handler(&type_handler_timestamp);
+ old->set_handler(&type_handler_timestamp);
}
diff --git a/sql/sql_type.h b/sql/sql_type.h
index 5ce17447..b092433b 100644
--- a/sql/sql_type.h
+++ b/sql/sql_type.h
@@ -3836,6 +3836,16 @@ public:
const Type_handler *res= type_handler_base();
return res ? res : this;
}
+ /*
+ In 10.11.8 the semantics of this method has changed to the opposite.
+ It used to be called with the old data type handler as "this".
+ Now it's called with the new data type hander as "this".
+ To avoid problems during merges, the method name was renamed.
+ */
+ virtual const Type_handler *type_handler_for_implicit_upgrade() const
+ {
+ return this;
+ }
virtual const Type_handler *type_handler_for_comparison() const= 0;
virtual const Type_handler *type_handler_for_native_format() const
{
@@ -3981,9 +3991,13 @@ public:
virtual bool validate_implicit_default_value(THD *thd,
const Column_definition &def)
const;
- // Automatic upgrade, e.g. for ALTER TABLE t1 FORCE
- virtual void Column_definition_implicit_upgrade(Column_definition *c) const
- { }
+ /*
+ Automatic upgrade, e.g. for REPAIR or ALTER TABLE t1 FORCE
+ - from the data type specified in old->type_handler()
+ - to the data type specified in "this"
+ */
+ virtual void Column_definition_implicit_upgrade_to_this(
+ Column_definition *old) const;
// Validate CHECK constraint after the parser
virtual bool Column_definition_validate_check_constraint(THD *thd,
Column_definition *c)
@@ -5773,6 +5787,38 @@ public:
};
+/*
+ The expression of this type reports itself as signed,
+ however it's known not to return negative values.
+ Items of this data type count only digits in Item::max_length,
+ without adding +1 for the sign. This allows expressions
+ of this type convert nicely to VARCHAR and DECIMAL.
+ For example, YEAR(now()) is:
+ - VARCHAR(4) in a string context
+ - DECIMAL(4,0) in a decimal context
+ - but INT(5) in an integer context
+*/
+class Type_handler_long_ge0: public Type_handler_long
+{
+public:
+ decimal_digits_t Item_decimal_precision(const Item *item) const override;
+ bool Item_func_signed_fix_length_and_dec(Item_func_signed *item)
+ const override;
+ bool Item_func_unsigned_fix_length_and_dec(Item_func_unsigned *item)
+ const override;
+ bool Item_func_abs_fix_length_and_dec(Item_func_abs *) const override;
+ bool Item_func_round_fix_length_and_dec(Item_func_round *) const override;
+ bool Item_sum_hybrid_fix_length_and_dec(Item_sum_hybrid *func) const override;
+ 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 override;
+};
+
+
class Type_handler_ulong: public Type_handler_long
{
public:
@@ -6188,7 +6234,8 @@ public:
const Type_handler *type_handler_for_comparison() const override;
int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
const override;
- void Column_definition_implicit_upgrade(Column_definition *c) const override;
+ void Column_definition_implicit_upgrade_to_this(
+ Column_definition *old) const override;
bool Column_definition_fix_attributes(Column_definition *c) const override;
bool
Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
@@ -6512,7 +6559,8 @@ public:
const Type_cast_attributes &attr) const override;
bool validate_implicit_default_value(THD *thd, const Column_definition &def)
const override;
- void Column_definition_implicit_upgrade(Column_definition *c) const override;
+ void Column_definition_implicit_upgrade_to_this(
+ Column_definition *old) const override;
bool Column_definition_fix_attributes(Column_definition *c) const override;
bool
Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
@@ -6650,7 +6698,8 @@ public:
{
return true;
}
- void Column_definition_implicit_upgrade(Column_definition *c) const override;
+ void Column_definition_implicit_upgrade_to_this(
+ Column_definition *old) const override;
bool
Column_definition_attributes_frm_unpack(Column_definition_attributes *attr,
TABLE_SHARE *share,
@@ -7000,6 +7049,7 @@ public:
{
return MYSQL_TYPE_VARCHAR;
}
+ const Type_handler *type_handler_for_implicit_upgrade() const override;
const Type_handler *type_handler_for_tmp_table(const Item *item) const override
{
return varstring_type_handler(item);
@@ -7007,7 +7057,6 @@ public:
uint32 max_display_length_for_field(const Conv_source &src) const override;
void show_binlog_type(const Conv_source &src, const Field &dst, String *str)
const override;
- void Column_definition_implicit_upgrade(Column_definition *c) const override;
bool Column_definition_fix_attributes(Column_definition *c) const override;
bool Column_definition_prepare_stage2(Column_definition *c,
handler *file,
@@ -7607,6 +7656,7 @@ extern MYSQL_PLUGIN_IMPORT Named_type_handler<Type_handler_tiny> type_han
extern MYSQL_PLUGIN_IMPORT Named_type_handler<Type_handler_short> type_handler_sshort;
extern MYSQL_PLUGIN_IMPORT Named_type_handler<Type_handler_int24> type_handler_sint24;
extern MYSQL_PLUGIN_IMPORT Named_type_handler<Type_handler_long> type_handler_slong;
+extern MYSQL_PLUGIN_IMPORT Named_type_handler<Type_handler_long_ge0> type_handler_slong_ge0;
extern MYSQL_PLUGIN_IMPORT Named_type_handler<Type_handler_longlong> type_handler_slonglong;
extern Named_type_handler<Type_handler_utiny> type_handler_utiny;
diff --git a/sql/sql_type_fixedbin.h b/sql/sql_type_fixedbin.h
index 65418c34..a05b0849 100644
--- a/sql/sql_type_fixedbin.h
+++ b/sql/sql_type_fixedbin.h
@@ -1125,6 +1125,11 @@ public:
return FbtImpl::max_char_length();
}
+ const Type_handler *type_handler_for_implicit_upgrade() const override
+ {
+ return TypeCollectionImpl::singleton()->
+ type_handler_for_implicit_upgrade(this);
+ }
const Type_handler *type_handler_for_comparison() const override
{
return this;
@@ -1943,6 +1948,12 @@ public:
return NULL;
}
+ const Type_handler *type_handler_for_implicit_upgrade(
+ const Type_handler *from) const
+ {
+ return from;
+ }
+
static Type_collection_fbt *singleton()
{
static Type_collection_fbt tc;
diff --git a/sql/sql_udf.h b/sql/sql_udf.h
index cb195435..5bd2c6e5 100644
--- a/sql/sql_udf.h
+++ b/sql/sql_udf.h
@@ -147,6 +147,20 @@ class udf_handler :public Sql_alloc
*null_value= (my_bool) (is_null || error);
}
String *val_str(String *str,String *save_str);
+
+ udf_handler(const udf_handler &orig)
+ {
+ u_d = orig.u_d;
+ buffers = orig.buffers;
+ f_args = orig.f_args;
+ initid = orig.initid;
+ num_buffer = orig.num_buffer;
+ error = orig.error;
+ is_null = orig.is_null;
+ initialized = orig.initialized;
+ args = orig.args;
+ not_original = true;
+ }
};
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 6e839409..3413b840 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -116,12 +116,12 @@ int select_unit::send_data(List<Item> &values)
if (table->no_rows_with_nulls)
table->null_catch_flags= CHECK_ROW_FOR_NULLS_TO_REJECT;
- fill_record(thd, table, table->field + addon_cnt, values, true, false);
+ fill_record(thd, table, table->field + addon_cnt, values, true, false, true);
/* set up initial values for records to be written */
if (addon_cnt && step == UNION_TYPE)
{
DBUG_ASSERT(addon_cnt == 1);
- table->field[0]->store((longlong) curr_step, 1);
+ table->field[0]->store((ulonglong) curr_step, 1);
}
if (unlikely(thd->is_error()))
@@ -485,7 +485,7 @@ bool select_unit_ext::disable_index_if_needed(SELECT_LEX *curr_sl)
!curr_sl->next_select()) )
{
is_index_enabled= false;
- if (table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL))
+ if (table->file->ha_disable_indexes(key_map(0), false))
return false;
table->no_keyread=1;
return true;
@@ -619,7 +619,7 @@ int select_unit_ext::send_data(List<Item> &values)
if (table->no_rows_with_nulls)
table->null_catch_flags= CHECK_ROW_FOR_NULLS_TO_REJECT;
- fill_record(thd, table, table->field + addon_cnt, values, true, false);
+ fill_record(thd, table, table->field + addon_cnt, values, true, false, true);
/* set up initial values for records to be written */
if ( step == UNION_TYPE )
{
@@ -1003,7 +1003,7 @@ int select_union_direct::send_data(List<Item> &items)
}
send_records++;
- fill_record(thd, table, table->field, items, true, false);
+ fill_record(thd, table, table->field, items, true, false, true);
if (unlikely(thd->is_error()))
return true; /* purecov: inspected */
@@ -1265,26 +1265,21 @@ bool st_select_lex_unit::join_union_item_types(THD *thd_arg,
}
-bool init_item_int(THD* thd, Item_int* &item)
+static bool init_item_int(THD* thd, Item_int* &item)
{
if (!item)
{
- Query_arena *arena, backup_arena;
- arena= thd->activate_stmt_arena_if_needed(&backup_arena);
-
item= new (thd->mem_root) Item_int(thd, 0);
- if (arena)
- thd->restore_active_arena(arena, &backup_arena);
-
if (!item)
- return false;
+ return true;
}
else
{
item->value= 0;
}
- return true;
+
+ return false;
}
@@ -1760,8 +1755,12 @@ cont:
for(uint i= 0; i< hidden; i++)
{
- init_item_int(thd, addon_fields[i]);
- types.push_front(addon_fields[i]);
+ if (init_item_int(thd, addon_fields[i]) ||
+ types.push_front(addon_fields[i]))
+ {
+ types.empty();
+ goto err;
+ }
addon_fields[i]->name.str= i ? "__CNT_1" : "__CNT_2";
addon_fields[i]->name.length= 7;
}
@@ -2085,7 +2084,7 @@ bool st_select_lex_unit::optimize()
/* re-enabling indexes for next subselect iteration */
if ((union_result->force_enable_index_if_needed() || union_distinct))
{
- if(table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL))
+ if(table->file->ha_enable_indexes(key_map(table->s->keys), false))
DBUG_ASSERT(0);
else
table->no_keyread= 0;
@@ -2185,7 +2184,7 @@ bool st_select_lex_unit::exec()
union_result->table && union_result->table->is_created())
{
union_result->table->file->ha_delete_all_rows();
- union_result->table->file->ha_enable_indexes(HA_KEY_SWITCH_ALL);
+ union_result->table->file->ha_enable_indexes(key_map(table->s->keys), false);
}
}
@@ -2252,7 +2251,7 @@ bool st_select_lex_unit::exec()
{
// This is UNION DISTINCT, so there should be a fake_select_lex
DBUG_ASSERT(fake_select_lex != NULL);
- if (unlikely(table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL)))
+ if (table->file->ha_disable_indexes(key_map(0), false))
DBUG_RETURN(TRUE);
table->no_keyread=1;
}
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 145299ac..6acea2d5 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -257,7 +257,7 @@ static void prepare_record_for_error_message(int error, TABLE *table)
Field *field;
uint keynr;
MY_BITMAP unique_map; /* Fields in offended unique. */
- my_bitmap_map unique_map_buf[bitmap_buffer_size(MAX_FIELDS)];
+ my_bitmap_map unique_map_buf[bitmap_buffer_size(MAX_FIELDS)/sizeof(my_bitmap_map)];
DBUG_ENTER("prepare_record_for_error_message");
/*
@@ -2182,6 +2182,10 @@ int multi_update::prepare(List<Item> &not_used_values,
{
Item *value= value_it++;
uint offset= item->field->table->pos_in_table_list->shared;
+
+ if (value->associate_with_target_field(thd, item))
+ DBUG_RETURN(1);
+
fields_for_table[offset]->push_back(item, thd->mem_root);
values_for_table[offset]->push_back(value, thd->mem_root);
}
@@ -2680,7 +2684,7 @@ int multi_update::send_data(List<Item> &not_used_values)
tmp_table_param[offset].func_count);
fill_record(thd, tmp_table,
tmp_table->field + 1 + unupdated_check_opt_tables.elements,
- *values_for_table[offset], TRUE, FALSE);
+ *values_for_table[offset], true, false, false);
/* Write row, ignoring duplicated updates to a row */
error= tmp_table->file->ha_write_tmp_row(tmp_table->record[0]);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index dcf0e995..577c90e6 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -80,6 +80,9 @@
#pragma GCC diagnostic ignored "-Wunused-label" /* yyexhaustedlab: */
#endif
+/* Stack size 28200 with clang for MYSQLparse() and ORAparse() */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int yylex(void *yylval, void *yythd);
#define yyoverflow(A,B,C,D,E,F) \
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index dce04c59..0b873777 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -2937,17 +2937,28 @@ static Sys_var_ulong Sys_optimizer_trace_max_mem_size(
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_ulong Sys_optimizer_adjust_secondary_key_costs(
+
+/*
+ Symbolic names for OPTIMIZER_ADJ_* flags in sql_priv.h
+*/
+static const char *adjust_secondary_key_cost[]=
+{
+ "adjust_secondary_key_cost", "disable_max_seek", "disable_forced_index_in_group_by", 0
+};
+
+
+static Sys_var_set Sys_optimizer_adjust_secondary_key_costs(
"optimizer_adjust_secondary_key_costs",
- "0 = No changes. "
- "1 = Update secondary key costs for ranges to be at least 5x of clustered "
- "primary key costs. "
- "2 = Remove 'max_seek optimization' for secondary keys and slight "
+ "A bit field with the following values: "
+ "adjust_secondary_key_cost = Update secondary key costs for ranges to be at least "
+ "5x of clustered primary key costs. "
+ "disable_max_seek = Disable 'max_seek optimization' for secondary keys and slight "
"adjustment of filter cost. "
- "This option will be deleted in MariaDB 11.0 as it is not needed with the "
+ "disable_forced_index_in_group_by = Disable automatic forced index in GROUP BY. "
+ "This variable will be deleted in MariaDB 11.0 as it is not needed with the "
"new 11.0 optimizer.",
SESSION_VAR(optimizer_adjust_secondary_key_costs), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(0, 2), DEFAULT(0), BLOCK_SIZE(1));
+ adjust_secondary_key_cost, DEFAULT(0));
static Sys_var_charptr_fscs Sys_pid_file(
diff --git a/sql/sys_vars.inl b/sql/sys_vars.inl
index 2fd6d042..932b12fc 100644
--- a/sql/sys_vars.inl
+++ b/sql/sys_vars.inl
@@ -947,21 +947,10 @@ public:
{ option.var_type|= GET_STR; }
bool do_check(THD *thd, set_var *var)
{
- char buff[STRING_BUFFER_USUAL_SIZE];
- String str(buff, sizeof(buff), system_charset_info), *res;
-
- if (!(res=var->value->val_str(&str)))
- {
+ bool rc= Sys_var_charptr::do_string_check(thd, var, charset(thd));
+ if (var->save_result.string_value.str == nullptr)
var->save_result.string_value.str= const_cast<char*>("");
- var->save_result.string_value.length= 0;
- }
- else
- {
- size_t len= res->length();
- var->save_result.string_value.str= thd->strmake(res->ptr(), len);
- var->save_result.string_value.length= len;
- }
- return false;
+ return rc;
}
bool session_update(THD *thd, set_var *var)
{
diff --git a/sql/table.cc b/sql/table.cc
index 88b65fe0..3f4b529f 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -50,6 +50,7 @@
#include "wsrep_schema.h"
#endif
#include "log_event.h" // MAX_TABLE_MAP_ID
+#include "sql_class.h"
/* For MySQL 5.7 virtual fields */
#define MYSQL57_GENERATED_FIELD 128
@@ -3331,6 +3332,8 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
goto err; // Wrong field definition
reg_field->flags |= AUTO_INCREMENT_FLAG;
}
+ else
+ share->next_number_index= MAX_KEY;
if (share->blob_fields)
{
@@ -5868,6 +5871,59 @@ void TABLE::reset_item_list(List<Item> *item_list, uint skip) const
}
}
+TABLE_LIST::TABLE_LIST(THD *thd,
+ LEX_CSTRING db_str,
+ bool fqtn,
+ LEX_CSTRING alias_str,
+ bool has_alias_ptr,
+ Table_ident *table_ident,
+ thr_lock_type lock_t,
+ enum_mdl_type mdl_t,
+ ulong table_opts,
+ bool info_schema,
+ st_select_lex *sel,
+ List<Index_hint> *index_hints_ptr,
+ LEX_STRING *option_ptr)
+{
+ db= db_str;
+ is_fqtn= fqtn;
+ alias= alias_str;
+ is_alias= has_alias_ptr;
+ if (lower_case_table_names)
+ {
+ if (table_ident->table.length)
+ table_ident->table.length= my_casedn_str(files_charset_info,
+ (char*) table_ident->table.str);
+ if (db.length && db.str != any_db.str)
+ db.length= my_casedn_str(files_charset_info, (char*) db.str);
+ }
+
+ table_name= table_ident->table;
+ lock_type= lock_t;
+ mdl_type= mdl_t;
+ table_options= table_opts;
+ updating= table_options & TL_OPTION_UPDATING;
+ /* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */
+ force_index= table_options & TL_OPTION_FORCE_INDEX;
+ ignore_leaves= table_options & TL_OPTION_IGNORE_LEAVES;
+ sequence= table_options & TL_OPTION_SEQUENCE;
+ derived= table_ident->sel;
+
+ if (!table_ident->sel && info_schema)
+ {
+ schema_table= find_schema_table(thd, &table_name);
+ schema_table_name= table_name;
+ }
+ select_lex= sel;
+ /*
+ We can't cache internal temporary tables between prepares as the
+ table may be deleted before next exection.
+ */
+ cacheable_table= !table_ident->is_derived_table();
+ index_hints= index_hints_ptr;
+ option= option_ptr ? option_ptr->str : 0;
+}
+
/*
calculate md5 of query
@@ -9159,10 +9215,9 @@ int TABLE::update_default_fields(bool ignore_errors)
int TABLE::update_generated_fields()
{
int res= 0;
- if (found_next_number_field)
+ if (next_number_field)
{
- next_number_field= found_next_number_field;
- res= found_next_number_field->set_default();
+ res= next_number_field->set_default();
if (likely(!res))
res= file->update_auto_increment();
next_number_field= NULL;
@@ -9177,6 +9232,18 @@ int TABLE::update_generated_fields()
return res;
}
+void TABLE::period_prepare_autoinc()
+{
+ if (!found_next_number_field)
+ return;
+ /* Don't generate a new value if the autoinc index is WITHOUT OVERLAPS */
+ DBUG_ASSERT(s->next_number_index < MAX_KEY);
+ if (key_info[s->next_number_index].without_overlaps)
+ return;
+
+ next_number_field= found_next_number_field;
+}
+
int TABLE::period_make_insert(Item *src, Field *dst)
{
THD *thd= in_use;
@@ -9186,7 +9253,10 @@ int TABLE::period_make_insert(Item *src, Field *dst)
int res= src->save_in_field(dst, true);
if (likely(!res))
+ {
+ period_prepare_autoinc();
res= update_generated_fields();
+ }
if (likely(!res) && triggers)
res= triggers->process_triggers(thd, TRG_EVENT_INSERT,
@@ -9511,7 +9581,8 @@ bool TABLE::insert_all_rows_into_tmp_table(THD *thd,
}
if (file->indexes_are_disabled())
- tmp_table->file->ha_disable_indexes(HA_KEY_SWITCH_ALL);
+ tmp_table->file->ha_disable_indexes(key_map(0), false);
+
file->ha_index_or_rnd_end();
if (unlikely(file->ha_rnd_init_with_error(1)))
diff --git a/sql/table.h b/sql/table.h
index ebf582c1..b0b0f032 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1840,6 +1840,7 @@ public:
#endif
int update_generated_fields();
+ void period_prepare_autoinc();
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);
@@ -2219,8 +2220,23 @@ struct TABLE_CHAIN
void set_end_pos(TABLE_LIST **pos) { end_pos= pos; }
};
+class Table_ident;
struct TABLE_LIST
{
+ TABLE_LIST(THD *thd,
+ LEX_CSTRING db_str,
+ bool fqtn,
+ LEX_CSTRING alias_str,
+ bool has_alias_ptr,
+ Table_ident *table_ident,
+ thr_lock_type lock_t,
+ enum_mdl_type mdl_t,
+ ulong table_opts,
+ bool info_schema,
+ st_select_lex *sel,
+ List<Index_hint> *index_hints_ptr,
+ LEX_STRING *option_ptr);
+
TABLE_LIST() = default; /* Remove gcc warning */
enum prelocking_types
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
index fa9abf7b..a018ba5a 100644
--- a/sql/temporary_tables.cc
+++ b/sql/temporary_tables.cc
@@ -1128,11 +1128,16 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
DBUG_RETURN(NULL); /* Out of memory */
}
+ uint flags= ha_open_options | (open_options & HA_OPEN_FOR_CREATE);
+ /*
+ In replication, temporary tables are not confined to a single
+ thread/THD.
+ */
+ if (slave_thread)
+ flags|= HA_OPEN_GLOBAL_TMP_TABLE;
if (open_table_from_share(this, share, &alias,
(uint) HA_OPEN_KEYFILE,
- EXTRA_RECORD,
- (ha_open_options |
- (open_options & HA_OPEN_FOR_CREATE)),
+ EXTRA_RECORD, flags,
table, false))
{
my_free(table);
diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc
index 7261eabf..0a653474 100644
--- a/sql/threadpool_generic.cc
+++ b/sql/threadpool_generic.cc
@@ -107,7 +107,7 @@ struct pool_timer_t
mysql_cond_t cond;
volatile uint64 current_microtime;
std::atomic<uint64_t> next_timeout_check;
- int tick_interval;
+ uint tick_interval;
bool shutdown;
pthread_t timer_thread_id;
};
@@ -569,7 +569,7 @@ static void* timer_thread(void *param)
struct timespec ts;
int err;
- set_timespec_nsec(ts,timer->tick_interval*1000000);
+ set_timespec_nsec(ts, timer->tick_interval*1000000LL);
mysql_mutex_lock(&timer->mutex);
err= mysql_cond_timedwait(&timer->cond, &timer->mutex, &ts);
if (timer->shutdown)
diff --git a/sql/threadpool_win.cc b/sql/threadpool_win.cc
index ed68e31c..65e40598 100644
--- a/sql/threadpool_win.cc
+++ b/sql/threadpool_win.cc
@@ -355,10 +355,13 @@ int TP_pool_win::init()
if (IS_SYSVAR_AUTOSIZE(&threadpool_max_threads))
{
/*
- Nr 500 comes from Microsoft documentation,
- there is no API for GetThreadpoolThreadMaxThreads()
+ Default 500 comes from Microsoft documentation,
+ there is no API for GetThreadpoolThreadMaxThreads().
+
+ To avoid deadlocks, allow at least max_connections + safety
+ margin threads in the pool.
*/
- SYSVAR_AUTOSIZE(threadpool_max_threads,500);
+ SYSVAR_AUTOSIZE(threadpool_max_threads,std::max(500U,(uint)max_connections + 10));
}
else
{
diff --git a/sql/transaction.cc b/sql/transaction.cc
index a6dbf57c..f34307ac 100644
--- a/sql/transaction.cc
+++ b/sql/transaction.cc
@@ -255,11 +255,15 @@ bool trans_begin(THD *thd, uint flags)
bool trans_commit(THD *thd)
{
int res;
+ PSI_stage_info org_stage;
DBUG_ENTER("trans_commit");
if (trans_check(thd))
DBUG_RETURN(TRUE);
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_commit);
+
thd->server_status&=
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
@@ -288,6 +292,7 @@ bool trans_commit(THD *thd)
DBUG_ASSERT(thd->m_transaction_psi == NULL);
trans_track_end_trx(thd);
+ THD_STAGE_INFO(thd, org_stage);
DBUG_RETURN(MY_TEST(res));
}
@@ -320,6 +325,10 @@ bool trans_commit_implicit(THD *thd)
if (thd->in_multi_stmt_transaction_mode() ||
(thd->variables.option_bits & OPTION_TABLE_LOCK))
{
+ PSI_stage_info org_stage;
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_commit_implicit);
+
/* Safety if one did "drop table" on locked tables */
if (!thd->locked_tables_mode)
thd->variables.option_bits&= ~OPTION_TABLE_LOCK;
@@ -327,6 +336,8 @@ bool trans_commit_implicit(THD *thd)
~(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));
+
+ THD_STAGE_INFO(thd, org_stage);
}
thd->variables.option_bits&= ~(OPTION_BEGIN | OPTION_BINLOG_THIS_TRX);
@@ -361,11 +372,15 @@ bool trans_commit_implicit(THD *thd)
bool trans_rollback(THD *thd)
{
int res;
+ PSI_stage_info org_stage;
DBUG_ENTER("trans_rollback");
if (trans_check(thd))
DBUG_RETURN(TRUE);
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_rollback);
+
thd->server_status&=
~(SERVER_STATUS_IN_TRANS | SERVER_STATUS_IN_TRANS_READONLY);
DBUG_PRINT("info", ("clearing SERVER_STATUS_IN_TRANS"));
@@ -384,6 +399,7 @@ bool trans_rollback(THD *thd)
trans_track_end_trx(thd);
+ THD_STAGE_INFO(thd, org_stage);
DBUG_RETURN(MY_TEST(res));
}
@@ -406,8 +422,12 @@ bool trans_rollback(THD *thd)
bool trans_rollback_implicit(THD *thd)
{
int res;
+ PSI_stage_info org_stage;
DBUG_ENTER("trans_rollback_implict");
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_rollback_implicit);
+
/*
Always commit/rollback statement transaction before manipulating
with the normal one.
@@ -434,6 +454,7 @@ bool trans_rollback_implicit(THD *thd)
trans_track_end_trx(thd);
+ THD_STAGE_INFO(thd, org_stage);
DBUG_RETURN(MY_TEST(res));
}
@@ -469,11 +490,17 @@ bool trans_commit_stmt(THD *thd)
if (thd->transaction->stmt.ha_list)
{
+ PSI_stage_info org_stage;
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_commit);
+
res= ha_commit_trans(thd, FALSE);
if (! thd->in_active_multi_stmt_transaction())
{
trans_reset_one_shot_chistics(thd);
}
+
+ THD_STAGE_INFO(thd, org_stage);
}
mysql_mutex_assert_not_owner(&LOCK_prepare_ordered);
@@ -532,9 +559,15 @@ bool trans_rollback_stmt(THD *thd)
if (thd->transaction->stmt.ha_list)
{
+ PSI_stage_info org_stage;
+ thd->backup_stage(&org_stage);
+ THD_STAGE_INFO(thd, stage_rollback);
+
ha_rollback_trans(thd, FALSE);
if (! thd->in_active_multi_stmt_transaction())
trans_reset_one_shot_chistics(thd);
+
+ THD_STAGE_INFO(thd, org_stage);
}
#ifdef HAVE_REPLICATION
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 8ddb9f0e..e6cebbbd 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -2725,6 +2725,8 @@ static const char *lock_tables=
" time_zone_transition WRITE,\n"
" time_zone_transition_type WRITE";
static const char *trunc_tables_const=
+ "SET @old_alter_alg=@@SESSION.alter_algorithm;\n"
+ "SET session alter_algorithm='COPY';\n"
"TRUNCATE TABLE time_zone;\n"
"TRUNCATE TABLE time_zone_name;\n"
"TRUNCATE TABLE time_zone_transition;\n"
@@ -2873,6 +2875,9 @@ main(int argc, char **argv)
"concat('ALTER TABLE time_zone_transition_type ENGINE=', "
"@time_zone_transition_type_engine, ', ORDER BY Time_zone_id, Transition_type_id'), 'do 0');\n");
+ if (argc == 1 && !opt_leap)
+ printf("SET session alter_algorithm=@old_alter_alg;\n");
+
free_allocated_data();
my_end(0);
return 0;
diff --git a/sql/unireg.cc b/sql/unireg.cc
index ea0b94eb..05a4fbb1 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -806,7 +806,15 @@ static bool pack_vcols(THD *thd, String *buf, List<Create_field> &create_fields,
? VCOL_GENERATED_STORED : VCOL_GENERATED_VIRTUAL))
return 1;
if (field->has_default_expression() && !field->has_default_now_unireg_check())
- if (pack_expression(buf, field->default_value, field_nr, VCOL_DEFAULT))
+ if (pack_expression(buf, field->default_value, field_nr, VCOL_DEFAULT) ||
+ /*
+ field->has_default_expression() can return error (e.g. because
+ the method Item_param::basic_const_item invokes
+ invalid_default_param()
+ in case either DEFAULT_VALUE or IGNORE_VALUE is handled).
+ Take this fact into account and return error in this case.
+ */
+ thd->is_error())
return 1;
if (field->check_constraint)
if (pack_expression(buf, field->check_constraint, field_nr,
diff --git a/sql/unireg.h b/sql/unireg.h
index 1eec3585..fa657a26 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -217,7 +217,7 @@ LEX_CUSTRING build_frm_image(THD *thd, const LEX_CSTRING &table,
#define FRM_FORMINFO_SIZE 288
#define FRM_MAX_SIZE (1024*1024)
-static inline bool is_binary_frm_header(uchar *head)
+static inline bool is_binary_frm_header(const uchar *head)
{
return head[0] == 254
&& head[1] == 1
diff --git a/sql/winmain.cc b/sql/winmain.cc
index 2ed43130..ff409a6d 100644
--- a/sql/winmain.cc
+++ b/sql/winmain.cc
@@ -221,6 +221,25 @@ static const char *get_svc_name(const char *arg)
}
/*
+ Disable CPU throttling for the process.
+
+ Windows 11 heuristics misdetects server as a background process and runs it
+ on "efficiency" cores, in hybrid architectures such as Alder Lake (12th
+ generation Intel Core).This results in serious performance degradation.
+*/
+void disable_cpu_throttling()
+{
+#ifdef PROCESS_POWER_THROTTLING_EXECUTION_SPEED
+ PROCESS_POWER_THROTTLING_STATE power_throttling{};
+ power_throttling.Version= PROCESS_POWER_THROTTLING_CURRENT_VERSION;
+ power_throttling.ControlMask= PROCESS_POWER_THROTTLING_EXECUTION_SPEED;
+ power_throttling.StateMask= 0;
+ SetProcessInformation(GetCurrentProcess(), ProcessPowerThrottling,
+ &power_throttling, sizeof(power_throttling));
+#endif
+}
+
+/*
Main function on Windows.
Runs mysqld as normal process, or as a service.
@@ -231,6 +250,7 @@ __declspec(dllexport) int mysqld_win_main(int argc, char **argv)
save_argv= argv;
save_argc= argc;
+ disable_cpu_throttling();
/*
If no special arguments are given, service name is nor present
run as normal program.
diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc
index 8767f698..eee9dc02 100644
--- a/sql/wsrep_applier.cc
+++ b/sql/wsrep_applier.cc
@@ -177,8 +177,7 @@ int wsrep_apply_events(THD* thd,
break;
}
-
- if (!thd->variables.gtid_seq_no && wsrep_thd_is_toi(thd) &&
+ if (!thd->variables.gtid_seq_no && wsrep_thd_is_toi(thd) &&
(ev->get_type_code() == QUERY_EVENT))
{
uint64 seqno= wsrep_gtid_server.seqno_inc();
@@ -188,18 +187,10 @@ int wsrep_apply_events(THD* thd,
thd->variables.gtid_seq_no= seqno;
}
}
+
/* Use the original server id for logging. */
thd->set_server_id(ev->server_id);
- thd->set_time(); // time the query
- thd->transaction->start_time.reset(thd);
thd->lex->current_select= 0;
- if (!ev->when)
- {
- my_hrtime_t hrtime= my_hrtime();
- ev->when= hrtime_to_my_time(hrtime);
- ev->when_sec_part= hrtime_sec_part(hrtime);
- }
-
thd->variables.option_bits=
(thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |
(ev->flags & LOG_EVENT_SKIP_REPLICATION_F ? OPTION_SKIP_REPLICATION : 0);
diff --git a/sql/wsrep_client_service.h b/sql/wsrep_client_service.h
index 253d2f43..b74c52b0 100644
--- a/sql/wsrep_client_service.h
+++ b/sql/wsrep_client_service.h
@@ -57,6 +57,10 @@ public:
{
return false;
}
+ bool is_prepared_xa()
+ {
+ return false;
+ }
bool is_xa_rollback()
{
return false;
diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc
index ecb0e487..7eb3f078 100644
--- a/sql/wsrep_high_priority_service.cc
+++ b/sql/wsrep_high_priority_service.cc
@@ -214,6 +214,7 @@ 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");
+ m_thd->set_time();
DBUG_RETURN(m_thd->wsrep_cs().start_transaction(ws_handle, ws_meta) ||
trans_begin(m_thd));
}
@@ -425,6 +426,7 @@ int Wsrep_high_priority_service::apply_toi(const wsrep::ws_meta& ws_meta,
};);
#endif
+ thd->set_time();
int ret= apply_events(thd, m_rli, data, err);
wsrep_thd_set_ignored_error(thd, false);
trans_commit(thd);
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 68649a95..5c2e0cb9 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1128,10 +1128,8 @@ void wsrep_recover()
}
}
-
-void wsrep_stop_replication(THD *thd)
+static void wsrep_stop_replication_common(THD *thd)
{
- WSREP_INFO("Stop replication by %llu", (thd) ? thd->thread_id : 0);
if (Wsrep_server_state::instance().state() !=
Wsrep_server_state::s_disconnected)
{
@@ -1144,10 +1142,10 @@ void wsrep_stop_replication(THD *thd)
}
}
- /* my connection, should not terminate with wsrep_close_client_connection(),
- make transaction to rollback
- */
- if (thd && !thd->wsrep_applier) trans_rollback(thd);
+ /* my connection, should not terminate with
+ wsrep_close_client_connections(), make transaction to rollback */
+ if (thd && !thd->wsrep_applier)
+ trans_rollback(thd);
wsrep_close_client_connections(TRUE, thd);
/* wait until appliers have stopped */
@@ -1156,26 +1154,16 @@ void wsrep_stop_replication(THD *thd)
node_uuid= WSREP_UUID_UNDEFINED;
}
+void wsrep_stop_replication(THD *thd)
+{
+ WSREP_INFO("Stop replication by %llu", (thd) ? thd->thread_id : 0);
+ wsrep_stop_replication_common(thd);
+}
+
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();
- if (Wsrep_server_state::instance().wait_until_state(
- Wsrep_server_state::s_disconnected))
- {
- WSREP_WARN("Wsrep interrupted while waiting for disconnected state");
- }
- }
-
- wsrep_close_client_connections(TRUE);
-
- /* wait until appliers have stopped */
- wsrep_wait_appliers_close(NULL);
- node_uuid= WSREP_UUID_UNDEFINED;
-
+ wsrep_stop_replication_common(nullptr);
/* Undocking the thread specific data. */
set_current_thd(nullptr);
}
@@ -3243,7 +3231,9 @@ void wsrep_handle_mdl_conflict(MDL_context *requestor_ctx,
}
}
else if (granted_thd->lex->sql_command == SQLCOM_FLUSH ||
- granted_thd->mdl_context.has_explicit_locks())
+ /* System transactions with explicit locks are BACKUP. */
+ (granted_thd->system_thread != NON_SYSTEM_THREAD &&
+ granted_thd->mdl_context.has_explicit_locks()))
{
WSREP_DEBUG("BF thread waiting for FLUSH for %s",
wsrep_thd_query(request_thd));
@@ -3348,14 +3338,20 @@ static my_bool have_client_connections(THD *thd, void*)
{
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 ||
- thd->killed == KILL_CONNECTION_HARD))
+ if (is_client_connection(thd))
{
- (void)abort_replicated(thd);
- return 1;
+ if (thd->killed == KILL_CONNECTION ||
+ thd->killed == KILL_CONNECTION_HARD)
+ {
+ (void)abort_replicated(thd);
+ return true;
+ }
+ if (thd->get_stmt_da()->is_eof())
+ {
+ return true;
+ }
}
- return 0;
+ return false;
}
static void wsrep_close_thread(THD *thd)
@@ -3393,14 +3389,24 @@ static my_bool kill_all_threads(THD *thd, THD *caller_thd)
/* We skip slave threads & scheduler on this first loop through. */
if (is_client_connection(thd) && thd != caller_thd)
{
+ if (thd->get_stmt_da()->is_eof())
+ {
+ return 0;
+ }
+
if (is_replaying_connection(thd))
+ {
thd->set_killed(KILL_CONNECTION_HARD);
- else if (!abort_replicated(thd))
+ return 0;
+ }
+
+ if (!abort_replicated(thd))
{
/* 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_HARD);
+ return 0;
}
}
return 0;
@@ -3412,6 +3418,7 @@ static my_bool kill_remaining_threads(THD *thd, THD *caller_thd)
if (is_client_connection(thd) &&
!abort_replicated(thd) &&
!is_replaying_connection(thd) &&
+ !thd->get_stmt_da()->is_eof() &&
thd_is_connection_alive(thd) &&
thd != caller_thd)
{
@@ -3906,7 +3913,7 @@ void wsrep_ready_set(bool ready_value)
mysql_mutex_lock(&LOCK_wsrep_ready);
wsrep_ready= ready_value;
// Signal if we have reached ready state
- if (wsrep_ready)
+ if (ready_value)
mysql_cond_signal(&COND_wsrep_ready);
mysql_mutex_unlock(&LOCK_wsrep_ready);
}
@@ -3921,21 +3928,11 @@ void wsrep_ready_set(bool ready_value)
step is performed to leave the wsrep transaction in the state as it
never existed.
- This should not be an inline functions as it requires a lot of stack space
- because of WSREP_DBUG() usage. It's also not a function that is
- frequently called.
*/
void wsrep_commit_empty(THD* thd, bool all)
{
DBUG_ENTER("wsrep_commit_empty");
- WSREP_DEBUG("wsrep_commit_empty for %llu client_state %s client_mode"
- " %s trans_state %s sql %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()),
- wsrep_thd_query(thd));
if (wsrep_is_real(thd, all) &&
wsrep_thd_is_local(thd) &&
@@ -3943,14 +3940,40 @@ void wsrep_commit_empty(THD* thd, bool all)
!thd->internal_transaction() &&
thd->wsrep_trx().state() != wsrep::transaction::s_committed)
{
- /* Here transaction is either empty (i.e. no changes) or
- it was CREATE TABLE with no row binlog format or
- we have already aborted transaction e.g. because max writeset size
- has been reached. */
- DBUG_ASSERT(!wsrep_has_changes(thd) ||
- (thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
- !thd->is_current_stmt_binlog_format_row()) ||
- thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted);
+#ifndef DBUG_OFF
+ const bool empty= !wsrep_has_changes(thd);
+ const bool create= thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
+ !thd->is_current_stmt_binlog_format_row();
+ const bool aborted= thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted;
+ const bool ddl_replay= ((sql_command_flags[thd->lex->sql_command] &
+ (CF_SCHEMA_CHANGE | CF_ADMIN_COMMAND)) &&
+ thd->wsrep_cs().transaction().state() == wsrep::transaction::s_must_replay);
+ /* Here transaction is either
+ (1) empty (i.e. no changes) or
+ (2) it was CREATE TABLE with no row binlog format or
+ (3) we have already aborted transaction e.g. because max writeset size
+ has been reached or
+ (4) it was DDL and got BF aborted and must replay.
+ */
+ if(!(empty || create || aborted || ddl_replay))
+ {
+ WSREP_DEBUG("wsrep_commit_empty: thread: %llu client_state: %s client_mode:"
+ " %s trans_state: %s error: %s empty: %d create: %d aborted:"
+ " %d ddl_replay: %d sql: %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()),
+ wsrep::to_c_string(thd->wsrep_cs().current_error()),
+ empty, create, aborted, ddl_replay,
+ wsrep_thd_query(thd));
+
+ DBUG_ASSERT(empty || // 1
+ create || // 2
+ aborted || // 3
+ ddl_replay); // 4
+ }
+#endif /* DBUG_OFF */
bool have_error= wsrep_current_error(thd);
int ret= wsrep_before_rollback(thd, all) ||
wsrep_after_rollback(thd, all) ||
@@ -3964,10 +3987,10 @@ void wsrep_commit_empty(THD* thd, bool all)
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));
- }
+ WSREP_DEBUG("wsrep_commit_empty failed: %s",
+ wsrep::to_c_string(thd->wsrep_cs().current_error()));
}
DBUG_VOID_RETURN;
}
diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc
index 6cf4fc4c..fd086ce4 100644
--- a/sql/wsrep_notify.cc
+++ b/sql/wsrep_notify.cc
@@ -28,7 +28,7 @@ void wsrep_notify_status(enum wsrep::server_state::state status,
if (!view)
{
WSREP_DEBUG("wsrep_notify_status server not yet ready : wsrep_ready=%d status %d",
- wsrep_ready, (int)status);
+ (int) wsrep_ready_get(), (int)status);
return;
}
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc
index c6e45340..d9baf699 100644
--- a/sql/wsrep_schema.cc
+++ b/sql/wsrep_schema.cc
@@ -272,25 +272,17 @@ static void finish_stmt(THD* 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;
-
+static int open_table(THD *thd, const LEX_CSTRING *schema_name,
+ const LEX_CSTRING *table_name,
+ enum thr_lock_type const lock_type,
+ TABLE_LIST *table_list)
+{
+ assert(table_list);
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);
+ const uint flags= (MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK |
+ MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY |
+ MYSQL_OPEN_IGNORE_FLUSH | MYSQL_LOCK_IGNORE_TIMEOUT);
+ table_list->init_one_table(schema_name, table_name, NULL, lock_type);
thd->lex->query_tables_own_last= 0;
// No need to open table if the query was bf aborted,
@@ -300,37 +292,39 @@ static int open_table(THD* thd,
(thd->get_stmt_da()->sql_errno() == ER_QUERY_INTERRUPTED));
if (interrupted ||
- !open_n_lock_single_table(thd, &tables, tables.lock_type, flags)) {
+ !open_n_lock_single_table(thd, table_list, table_list->lock_type, flags))
+ {
close_thread_tables(thd);
DBUG_RETURN(1);
}
- *table= tables.table;
- (*table)->use_all_columns();
+ table_list->table->use_all_columns();
DBUG_RETURN(0);
}
-
-static int open_for_write(THD* thd, const char* table_name, TABLE** table) {
+static int open_for_write(THD* thd, const char* table_name, TABLE_LIST* table_list)
+{
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)) {
+ table_list))
+ {
// 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) {
+ 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);
+ empty_record(table_list->table);
+ table_list->table->use_all_columns();
+ restore_record(table_list->table, s->default_values);
return 0;
}
@@ -479,19 +473,21 @@ static int delete_row(TABLE* table) {
return 0;
}
-static int open_for_read(THD* thd, const char* table_name, TABLE** table) {
-
+static int open_for_read(THD *thd, const char *table_name,
+ TABLE_LIST *table_list)
+{
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)) {
+ table_list))
+ {
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);
+ empty_record(table_list->table);
+ table_list->table->use_all_columns();
+ restore_record(table_list->table, s->default_values);
return 0;
}
@@ -752,8 +748,10 @@ int Wsrep_schema::store_view(THD* thd, const Wsrep_view& view)
assert(view.status() == Wsrep_view::primary);
int ret= 1;
int error;
+ TABLE_LIST cluster_table_l;
TABLE* cluster_table= 0;
- TABLE* members_table= 0;
+ TABLE_LIST members_table_l;
+ TABLE* members_table = 0;
#ifdef WSREP_SCHEMA_MEMBERS_HISTORY
TABLE* members_history_table= 0;
#endif /* WSREP_SCHEMA_MEMBERS_HISTORY */
@@ -778,11 +776,13 @@ int Wsrep_schema::store_view(THD* thd, const Wsrep_view& view)
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))
+ if (Wsrep_schema_impl::open_for_write(thd, cluster_table_str.c_str(), &cluster_table_l))
{
goto out;
}
+ cluster_table= cluster_table_l.table;
+
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());
@@ -802,12 +802,14 @@ int Wsrep_schema::store_view(THD* thd, const Wsrep_view& view)
*/
Wsrep_schema_impl::init_stmt(thd);
if (Wsrep_schema_impl::open_for_write(thd, members_table_str.c_str(),
- &members_table))
+ &members_table_l))
{
WSREP_ERROR("failed to open wsrep.members table");
goto out;
}
+ members_table= members_table_l.table;
+
for (size_t i= 0; i < view.members().size(); ++i)
{
Wsrep_schema_impl::store(members_table, 0, view.members()[i].id());
@@ -861,8 +863,10 @@ Wsrep_view Wsrep_schema::restore_view(THD* thd, const Wsrep_id& own_id) const {
int ret= 1;
int error;
+ TABLE_LIST cluster_table_l;
TABLE* cluster_table= 0;
bool end_cluster_scan= false;
+ TABLE_LIST members_table_l;
TABLE* members_table= 0;
bool end_members_scan= false;
@@ -888,8 +892,12 @@ Wsrep_view Wsrep_schema::restore_view(THD* thd, const Wsrep_id& own_id) const {
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)) {
+ if (Wsrep_schema_impl::open_for_read(thd, cluster_table_str.c_str(), &cluster_table_l)) {
+ goto out;
+ }
+ cluster_table = cluster_table_l.table;
+
+ if (Wsrep_schema_impl::init_for_scan(cluster_table)) {
goto out;
}
@@ -913,8 +921,14 @@ Wsrep_view Wsrep_schema::restore_view(THD* thd, const Wsrep_id& own_id) const {
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)) {
+ if (Wsrep_schema_impl::open_for_read(thd, members_table_str.c_str(),
+ &members_table_l))
+ {
+ goto out;
+ }
+
+ members_table= members_table_l.table;
+ if (Wsrep_schema_impl::init_for_scan(members_table)) {
goto out;
}
end_members_scan= true;
@@ -1018,14 +1032,15 @@ int Wsrep_schema::append_fragment(THD* 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))
+ TABLE_LIST frag_table_l;
+ if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table_l))
{
trans_rollback_stmt(thd);
thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
DBUG_RETURN(1);
}
+ TABLE* frag_table= frag_table_l.table;
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());
@@ -1069,13 +1084,15 @@ int Wsrep_schema::update_fragment_meta(THD* thd,
uchar *key=NULL;
key_part_map key_map= 0;
TABLE* frag_table= 0;
+ TABLE_LIST frag_table_l;
Wsrep_schema_impl::init_stmt(thd);
- if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table))
+ if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table_l))
{
thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
DBUG_RETURN(1);
}
+ frag_table= frag_table_l.table;
/* Find record with the given uuid, trx id, and seqno -1 */
Wsrep_schema_impl::store(frag_table, 0, ws_meta.server_id());
@@ -1163,7 +1180,10 @@ static int remove_fragment(THD* thd,
seqno.get(),
error);
}
- ret= error;
+ else
+ {
+ ret= error;
+ }
}
else if (Wsrep_schema_impl::delete_row(frag_table))
{
@@ -1195,12 +1215,14 @@ int Wsrep_schema::remove_fragments(THD* thd,
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))
+ TABLE_LIST frag_table_l;
+ if (Wsrep_schema_impl::open_for_write(thd, sr_table_str.c_str(), &frag_table_l))
{
ret= 1;
}
else
{
+ frag_table= frag_table_l.table;
for (std::vector<wsrep::seqno>::const_iterator i= fragments.begin();
i != fragments.end(); ++i)
{
@@ -1243,40 +1265,35 @@ int Wsrep_schema::remove_fragments(THD* 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)
+static int replay_transaction(THD* thd,
+ 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);
+ 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;
+ TABLE_LIST frag_table_l;
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_schema_impl::init_stmt(thd);
+ if ((error= Wsrep_schema_impl::open_for_read(thd, sr_table_str.c_str(), &frag_table_l)))
{
WSREP_WARN("Could not open SR table for read: %d", error);
- Wsrep_schema_impl::finish_stmt(&thd);
- DBUG_RETURN(1);
+ Wsrep_schema_impl::finish_stmt(thd);
+ return 1;
}
+ frag_table= frag_table_l.table;
Wsrep_schema_impl::store(frag_table, 0, ws_meta.server_id());
Wsrep_schema_impl::store(frag_table, 1, ws_meta.transaction_id().get());
@@ -1305,7 +1322,7 @@ int Wsrep_schema::replay_transaction(THD* orig_thd,
frag_table->field[4]->val_str(&buf);
{
- Wsrep_schema_impl::thd_context_switch thd_context_switch(&thd, orig_thd);
+ Wsrep_schema_impl::thd_context_switch thd_context_switch(thd, orig_thd);
ret= wsrep_apply_events(orig_thd, rli, buf.ptr(), buf.length());
if (ret)
@@ -1316,18 +1333,20 @@ int Wsrep_schema::replay_transaction(THD* orig_thd,
}
Wsrep_schema_impl::end_index_scan(frag_table);
- Wsrep_schema_impl::finish_stmt(&thd);
+ Wsrep_schema_impl::finish_stmt(thd);
- Wsrep_schema_impl::init_stmt(&thd);
+ Wsrep_schema_impl::init_stmt(thd);
- if ((error= Wsrep_schema_impl::open_for_write(&thd,
+ if ((error= Wsrep_schema_impl::open_for_write(thd,
sr_table_str.c_str(),
- &frag_table)))
+ &frag_table_l)))
{
WSREP_WARN("Could not open SR table for write: %d", error);
- Wsrep_schema_impl::finish_stmt(&thd);
- DBUG_RETURN(1);
+ Wsrep_schema_impl::finish_stmt(thd);
+ ret= 1;
+ break;
}
+ frag_table= frag_table_l.table;
error= Wsrep_schema_impl::init_for_index_scan(frag_table,
key,
@@ -1351,86 +1370,120 @@ int Wsrep_schema::replay_transaction(THD* orig_thd,
break;
}
Wsrep_schema_impl::end_index_scan(frag_table);
- Wsrep_schema_impl::finish_stmt(&thd);
+ Wsrep_schema_impl::finish_stmt(thd);
my_free(key);
key= NULL;
}
if (key)
my_free(key);
+
+ 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= new THD(next_thread_id(), true);
+ if (!thd)
+ {
+ WSREP_WARN("Could not allocate memory for THD");
+ DBUG_RETURN(1);
+ }
+
+ thd->thread_stack= (orig_thd ? orig_thd->thread_stack : (char *) &thd);
+ wsrep_assign_from_threadvars(thd);
+
+ int ret= ::replay_transaction(thd, orig_thd, rli, ws_meta, fragments);
+
+ delete thd;
DBUG_RETURN(ret);
}
-int Wsrep_schema::recover_sr_transactions(THD *orig_thd)
+static int recover_sr_transactions(THD* storage_thd, 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_LIST frag_table_l;
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);
+ TABLE_LIST cluster_table_l;
+ 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);
+ 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::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_l))
{
- Wsrep_schema_impl::finish_stmt(&storage_thd);
- DBUG_RETURN(1);
+ Wsrep_schema_impl::finish_stmt(storage_thd);
+ return 1;
+ }
+ cluster_table= cluster_table_l.table;
+
+ if (Wsrep_schema_impl::init_for_scan(cluster_table))
+ {
+ Wsrep_schema_impl::finish_stmt(storage_thd);
+ 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);
+ 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);
+ return 0;
}
else
{
WSREP_ERROR("Failed to read cluster table: %d", error);
- DBUG_RETURN(1);
+ 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);
+ 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);
+ 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))
+ if (Wsrep_schema_impl::open_for_write(storage_thd, sr_table_str.c_str(),
+ &frag_table_l))
{
WSREP_ERROR("Failed to open SR table for write");
goto out;
}
+ frag_table= frag_table_l.table;
+
+ if (Wsrep_schema_impl::init_for_scan(frag_table))
+ {
+ WSREP_ERROR("Failed to init for index scan");
+ goto out;
+ }
while (0 == error)
{
@@ -1474,7 +1527,7 @@ int Wsrep_schema::recover_sr_transactions(THD *orig_thd)
transaction_id)))
{
DBUG_ASSERT(wsrep::starts_transaction(flags));
- applier = wsrep_create_streaming_applier(&storage_thd, "recovery");
+ 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),
@@ -1502,10 +1555,30 @@ int Wsrep_schema::recover_sr_transactions(THD *orig_thd)
}
}
Wsrep_schema_impl::end_scan(frag_table);
- Wsrep_schema_impl::finish_stmt(&storage_thd);
- trans_commit(&storage_thd);
- storage_thd.set_mysys_var(0);
+ Wsrep_schema_impl::finish_stmt(storage_thd);
+ trans_commit(storage_thd);
+ storage_thd->set_mysys_var(0);
out:
+ return ret;
+}
+
+int Wsrep_schema::recover_sr_transactions(THD *orig_thd)
+{
+ DBUG_ENTER("Wsrep_schema::recover_sr_transactions");
+
+ THD *storage_thd= new THD(next_thread_id(), true);
+ if (!storage_thd)
+ {
+ WSREP_WARN("Could not allocate memory for THD");
+ DBUG_RETURN(1);
+ }
+ storage_thd->thread_stack=
+ (orig_thd ? orig_thd->thread_stack : (char *) &storage_thd);
+ wsrep_assign_from_threadvars(storage_thd);
+
+ int ret= ::recover_sr_transactions(storage_thd, orig_thd);
+
+ delete storage_thd;
DBUG_RETURN(ret);
}
@@ -1521,13 +1594,15 @@ void Wsrep_schema::clear_allowlist()
thd->thread_stack= (char*)&thd;
wsrep_init_thd_for_schema(thd);
TABLE* allowlist_table= 0;
+ TABLE_LIST allowlist_table_l;
int error= 0;
Wsrep_schema_impl::init_stmt(thd);
if (Wsrep_schema_impl::open_for_write(thd, allowlist_table_str.c_str(),
- &allowlist_table) ||
- Wsrep_schema_impl::init_for_scan(allowlist_table))
+ &allowlist_table_l) ||
+ (allowlist_table= allowlist_table_l.table,
+ Wsrep_schema_impl::init_for_scan(allowlist_table)))
{
WSREP_ERROR("Failed to open mysql.wsrep_allowlist table");
goto out;
@@ -1567,14 +1642,16 @@ void Wsrep_schema::store_allowlist(std::vector<std::string>& ip_allowlist)
thd->thread_stack= (char*)&thd;
wsrep_init_thd_for_schema(thd);
TABLE* allowlist_table= 0;
+ TABLE_LIST allowlist_table_l;
int error;
Wsrep_schema_impl::init_stmt(thd);
if (Wsrep_schema_impl::open_for_write(thd, allowlist_table_str.c_str(),
- &allowlist_table))
+ &allowlist_table_l))
{
WSREP_ERROR("Failed to open mysql.wsrep_allowlist table");
goto out;
}
+ allowlist_table= allowlist_table_l.table;
for (size_t i= 0; i < ip_allowlist.size(); ++i)
{
Wsrep_schema_impl::store(allowlist_table, 0, ip_allowlist[i]);
@@ -1618,6 +1695,7 @@ static void *allowlist_check_thread(void *param)
int error;
TABLE *allowlist_table= 0;
+ TABLE_LIST allowlist_table_l;
bool match_found_or_empty= false;
bool table_have_rows= false;
char row[64]= {
@@ -1629,8 +1707,9 @@ static void *allowlist_check_thread(void *param)
*/
Wsrep_schema_impl::init_stmt(&thd);
if (Wsrep_schema_impl::open_for_read(&thd, allowlist_table_str.c_str(),
- &allowlist_table) ||
- Wsrep_schema_impl::init_for_scan(allowlist_table))
+ &allowlist_table_l) ||
+ (allowlist_table= allowlist_table_l.table,
+ Wsrep_schema_impl::init_for_scan(allowlist_table)))
{
goto out;
}
diff --git a/sql/wsrep_server_service.cc b/sql/wsrep_server_service.cc
index c3df6e9f..19fa4470 100644
--- a/sql/wsrep_server_service.cc
+++ b/sql/wsrep_server_service.cc
@@ -345,7 +345,6 @@ void Wsrep_server_service::log_state_change(
switch (current_state)
{
case Wsrep_server_state::s_synced:
- wsrep_ready= TRUE;
WSREP_INFO("Synchronized with group, ready for connections");
wsrep_ready_set(true);
/* fall through */
diff --git a/sql/yy_mariadb.cc b/sql/yy_mariadb.cc
new file mode 100644
index 00000000..0223e459
--- /dev/null
+++ b/sql/yy_mariadb.cc
@@ -0,0 +1,52206 @@
+/* A Bison parser, made by GNU Bison 3.8.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
+ Inc.
+
+ This program is free 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 3 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, see <https://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output, and Bison version. */
+#define YYBISON 30802
+
+/* Bison version string. */
+#define YYBISON_VERSION "3.8.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "/home/buildbot/git/mkdist/sql/myskel.m4"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse MYSQLparse
+#define yylex MYSQLlex
+#define yyerror MYSQLerror
+#define yydebug MYSQLdebug
+#define yynerrs MYSQLnerrs
+
+/* First part of user prologue. */
+#line 25 "/home/buildbot/git/sql/sql_yacc.yy"
+
+#define YYLIP (& thd->m_parser_state->m_lip)
+#define YYPS (& thd->m_parser_state->m_yacc)
+#define YYCSCL (thd->variables.character_set_client)
+
+#define MYSQL_YACC
+#define YYINITDEPTH 100
+#define YYMAXDEPTH 3200 /* Because of 64K stack */
+#define Lex (thd->lex)
+
+#define Select Lex->current_select
+#include "mariadb.h"
+#include "sql_priv.h"
+#include "sql_parse.h" /* comp_*_creator */
+#include "sql_table.h" /* primary_key_name */
+#include "sql_partition.h" /* partition_info, HASH_PARTITION */
+#include "sql_class.h" /* Key_part_spec, enum_filetype, Diag_condition_item_name */
+#include "slave.h"
+#include "lex_symbol.h"
+#include "item_create.h"
+#include "sp_head.h"
+#include "sp_rcontext.h"
+#include "sp.h"
+#include "sql_show.h"
+#include "sql_alter.h" // Sql_cmd_alter_table*
+#include "sql_truncate.h" // Sql_cmd_truncate_table
+#include "sql_admin.h" // Sql_cmd_analyze/Check..._table
+#include "sql_partition_admin.h" // Sql_cmd_alter_table_*_part.
+#include "sql_handler.h" // Sql_cmd_handler_*
+#include "sql_signal.h"
+#include "sql_get_diagnostics.h" // Sql_cmd_get_diagnostics
+#include "sql_cte.h"
+#include "sql_window.h"
+#include "item_windowfunc.h"
+#include "event_parse_data.h"
+#include "create_options.h"
+#include <myisam.h>
+#include <myisammrg.h>
+#include "keycaches.h"
+#include "set_var.h"
+#include "rpl_mi.h"
+#include "lex_token.h"
+#include "sql_lex.h"
+#include "sql_sequence.h"
+#include "my_base.h"
+#include "sql_type_json.h"
+#include "json_table.h"
+
+/* this is to get the bison compilation windows warnings out */
+#ifdef _MSC_VER
+/* warning C4065: switch statement contains 'default' but no 'case' labels */
+/* warning C4102: 'yyexhaustedlab': unreferenced label */
+#pragma warning (disable : 4065 4102)
+#endif
+#if defined (__GNUC__) || defined (__clang__)
+#pragma GCC diagnostic ignored "-Wunused-label" /* yyexhaustedlab: */
+#endif
+
+/* Stack size 28200 with clang for MYSQLparse() and ORAparse() */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
+int yylex(void *yylval, void *yythd);
+
+#define yyoverflow(A,B,C,D,E,F) \
+ { \
+ size_t val= *(F); \
+ if (unlikely(my_yyoverflow((B), (D), &val))) \
+ { \
+ yyerror(thd, (char*) (A)); \
+ return 2; \
+ } \
+ else \
+ { \
+ *(F)= (YYSIZE_T)val; \
+ } \
+ }
+
+#define MYSQL_YYABORT \
+ do \
+ { \
+ YYABORT; \
+ } while (0)
+
+#define MYSQL_YYABORT_UNLESS(A) \
+ if (unlikely(!(A))) \
+ { \
+ thd->parse_error(); \
+ MYSQL_YYABORT; \
+ }
+
+#define my_yyabort_error(A) \
+ do { my_error A; MYSQL_YYABORT; } while(0)
+
+#ifndef DBUG_OFF
+#define YYDEBUG 1
+#else
+#define YYDEBUG 0
+#endif
+
+
+static Item* escape(THD *thd)
+{
+ thd->lex->escape_used= false;
+ const char *esc= thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES ? "" : "\\";
+ return new (thd->mem_root) Item_string_ascii(thd, esc, MY_TEST(esc[0]));
+}
+
+
+/**
+ @brief Bison callback to report a syntax/OOM error
+
+ This function is invoked by the bison-generated parser
+ when a syntax error, a parse error or an out-of-memory
+ condition occurs. This function is not invoked when the
+ parser is requested to abort by semantic action code
+ by means of YYABORT or YYACCEPT macros. This is why these
+ macros should not be used (use MYSQL_YYABORT/MYSQL_YYACCEPT
+ instead).
+
+ The parser will abort immediately after invoking this callback.
+
+ This function is not for use in semantic actions and is internal to
+ the parser, as it performs some pre-return cleanup.
+ In semantic actions, please use thd->parse_error() or my_error to
+ push an error into the error stack and MYSQL_YYABORT
+ to abort from the parser.
+*/
+
+static void yyerror(THD *thd, const char *s)
+{
+ /* "parse error" changed into "syntax error" between bison 1.75 and 1.875 */
+ if (strcmp(s,"parse error") == 0 || strcmp(s,"syntax error") == 0)
+ s= ER_THD(thd, ER_SYNTAX_ERROR);
+ thd->parse_error(s, 0);
+}
+
+
+#ifndef DBUG_OFF
+#define __CONCAT_UNDERSCORED(x,y) x ## _ ## y
+#define _CONCAT_UNDERSCORED(x,y) __CONCAT_UNDERSCORED(x,y)
+void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
+{
+ /*
+ MYSQLdebug is in sql/yy_*.cc, in bison generated code.
+ Turning this option on is **VERY** verbose, and should be
+ used when investigating a syntax error problem only.
+
+ The syntax to run with bison traces is as follows :
+ - Starting a server manually :
+ mysqld --debug-dbug="d,parser_debug" ...
+ - Running a test :
+ mysql-test-run.pl --mysqld="--debug-dbug=d,parser_debug" ...
+
+ The result will be in the process stderr (var/log/master.err)
+ */
+
+#ifndef _AIX
+ extern int yydebug;
+#else
+ static int yydebug;
+#endif
+ yydebug= 1;
+}
+#endif
+
+
+
+#line 244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+# else
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+# endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+#include "yy_mariadb.hh"
+/* Symbol kind. */
+enum yysymbol_kind_t
+{
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_3_ = 3, /* '@' */
+ YYSYMBOL_ABORT_SYM = 4, /* ABORT_SYM */
+ YYSYMBOL_IMPOSSIBLE_ACTION = 5, /* IMPOSSIBLE_ACTION */
+ YYSYMBOL_FORCE_LOOKAHEAD = 6, /* FORCE_LOOKAHEAD */
+ YYSYMBOL_END_OF_INPUT = 7, /* END_OF_INPUT */
+ YYSYMBOL_COLON_ORACLE_SYM = 8, /* COLON_ORACLE_SYM */
+ YYSYMBOL_PARAM_MARKER = 9, /* PARAM_MARKER */
+ YYSYMBOL_FOR_SYSTEM_TIME_SYM = 10, /* FOR_SYSTEM_TIME_SYM */
+ YYSYMBOL_LEFT_PAREN_ALT = 11, /* LEFT_PAREN_ALT */
+ YYSYMBOL_LEFT_PAREN_WITH = 12, /* LEFT_PAREN_WITH */
+ YYSYMBOL_LEFT_PAREN_LIKE = 13, /* LEFT_PAREN_LIKE */
+ YYSYMBOL_ORACLE_CONCAT_SYM = 14, /* ORACLE_CONCAT_SYM */
+ YYSYMBOL_PERCENT_ORACLE_SYM = 15, /* PERCENT_ORACLE_SYM */
+ YYSYMBOL_WITH_CUBE_SYM = 16, /* WITH_CUBE_SYM */
+ YYSYMBOL_WITH_ROLLUP_SYM = 17, /* WITH_ROLLUP_SYM */
+ YYSYMBOL_WITH_SYSTEM_SYM = 18, /* WITH_SYSTEM_SYM */
+ YYSYMBOL_IDENT = 19, /* IDENT */
+ YYSYMBOL_IDENT_QUOTED = 20, /* IDENT_QUOTED */
+ YYSYMBOL_LEX_HOSTNAME = 21, /* LEX_HOSTNAME */
+ YYSYMBOL_UNDERSCORE_CHARSET = 22, /* UNDERSCORE_CHARSET */
+ YYSYMBOL_BIN_NUM = 23, /* BIN_NUM */
+ YYSYMBOL_DECIMAL_NUM = 24, /* DECIMAL_NUM */
+ YYSYMBOL_FLOAT_NUM = 25, /* FLOAT_NUM */
+ YYSYMBOL_HEX_NUM = 26, /* HEX_NUM */
+ YYSYMBOL_HEX_STRING = 27, /* HEX_STRING */
+ YYSYMBOL_LONG_NUM = 28, /* LONG_NUM */
+ YYSYMBOL_NCHAR_STRING = 29, /* NCHAR_STRING */
+ YYSYMBOL_NUM = 30, /* NUM */
+ YYSYMBOL_TEXT_STRING = 31, /* TEXT_STRING */
+ YYSYMBOL_ULONGLONG_NUM = 32, /* ULONGLONG_NUM */
+ YYSYMBOL_AND_AND_SYM = 33, /* AND_AND_SYM */
+ YYSYMBOL_DOT_DOT_SYM = 34, /* DOT_DOT_SYM */
+ YYSYMBOL_EQUAL_SYM = 35, /* EQUAL_SYM */
+ YYSYMBOL_GE = 36, /* GE */
+ YYSYMBOL_LE = 37, /* LE */
+ YYSYMBOL_MYSQL_CONCAT_SYM = 38, /* MYSQL_CONCAT_SYM */
+ YYSYMBOL_NE = 39, /* NE */
+ YYSYMBOL_NOT2_SYM = 40, /* NOT2_SYM */
+ YYSYMBOL_OR2_SYM = 41, /* OR2_SYM */
+ YYSYMBOL_SET_VAR = 42, /* SET_VAR */
+ YYSYMBOL_SHIFT_LEFT = 43, /* SHIFT_LEFT */
+ YYSYMBOL_SHIFT_RIGHT = 44, /* SHIFT_RIGHT */
+ YYSYMBOL_ACCESSIBLE_SYM = 45, /* ACCESSIBLE_SYM */
+ YYSYMBOL_ADD = 46, /* ADD */
+ YYSYMBOL_ALL = 47, /* ALL */
+ YYSYMBOL_ALTER = 48, /* ALTER */
+ YYSYMBOL_ANALYZE_SYM = 49, /* ANALYZE_SYM */
+ YYSYMBOL_AND_SYM = 50, /* AND_SYM */
+ YYSYMBOL_ASC = 51, /* ASC */
+ YYSYMBOL_ASENSITIVE_SYM = 52, /* ASENSITIVE_SYM */
+ YYSYMBOL_AS = 53, /* AS */
+ YYSYMBOL_BEFORE_SYM = 54, /* BEFORE_SYM */
+ YYSYMBOL_BETWEEN_SYM = 55, /* BETWEEN_SYM */
+ YYSYMBOL_BIGINT = 56, /* BIGINT */
+ YYSYMBOL_BINARY = 57, /* BINARY */
+ YYSYMBOL_BIT_AND = 58, /* BIT_AND */
+ YYSYMBOL_BIT_OR = 59, /* BIT_OR */
+ YYSYMBOL_BIT_XOR = 60, /* BIT_XOR */
+ YYSYMBOL_BLOB_MARIADB_SYM = 61, /* BLOB_MARIADB_SYM */
+ YYSYMBOL_BLOB_ORACLE_SYM = 62, /* BLOB_ORACLE_SYM */
+ YYSYMBOL_BODY_ORACLE_SYM = 63, /* BODY_ORACLE_SYM */
+ YYSYMBOL_BOTH = 64, /* BOTH */
+ YYSYMBOL_BY = 65, /* BY */
+ YYSYMBOL_CALL_SYM = 66, /* CALL_SYM */
+ YYSYMBOL_CASCADE = 67, /* CASCADE */
+ YYSYMBOL_CASE_SYM = 68, /* CASE_SYM */
+ YYSYMBOL_CAST_SYM = 69, /* CAST_SYM */
+ YYSYMBOL_CHANGE = 70, /* CHANGE */
+ YYSYMBOL_CHAR_SYM = 71, /* CHAR_SYM */
+ YYSYMBOL_CHECK_SYM = 72, /* CHECK_SYM */
+ YYSYMBOL_COLLATE_SYM = 73, /* COLLATE_SYM */
+ YYSYMBOL_CONDITION_SYM = 74, /* CONDITION_SYM */
+ YYSYMBOL_CONSTRAINT = 75, /* CONSTRAINT */
+ YYSYMBOL_CONTINUE_MARIADB_SYM = 76, /* CONTINUE_MARIADB_SYM */
+ YYSYMBOL_CONTINUE_ORACLE_SYM = 77, /* CONTINUE_ORACLE_SYM */
+ YYSYMBOL_CONVERT_SYM = 78, /* CONVERT_SYM */
+ YYSYMBOL_COUNT_SYM = 79, /* COUNT_SYM */
+ YYSYMBOL_CREATE = 80, /* CREATE */
+ YYSYMBOL_CROSS = 81, /* CROSS */
+ YYSYMBOL_CUME_DIST_SYM = 82, /* CUME_DIST_SYM */
+ YYSYMBOL_CURDATE = 83, /* CURDATE */
+ YYSYMBOL_CURRENT_ROLE = 84, /* CURRENT_ROLE */
+ YYSYMBOL_CURRENT_USER = 85, /* CURRENT_USER */
+ YYSYMBOL_CURSOR_SYM = 86, /* CURSOR_SYM */
+ YYSYMBOL_CURTIME = 87, /* CURTIME */
+ YYSYMBOL_DATABASE = 88, /* DATABASE */
+ YYSYMBOL_DATABASES = 89, /* DATABASES */
+ YYSYMBOL_DATE_ADD_INTERVAL = 90, /* DATE_ADD_INTERVAL */
+ YYSYMBOL_DATE_SUB_INTERVAL = 91, /* DATE_SUB_INTERVAL */
+ YYSYMBOL_DAY_HOUR_SYM = 92, /* DAY_HOUR_SYM */
+ YYSYMBOL_DAY_MICROSECOND_SYM = 93, /* DAY_MICROSECOND_SYM */
+ YYSYMBOL_DAY_MINUTE_SYM = 94, /* DAY_MINUTE_SYM */
+ YYSYMBOL_DAY_SECOND_SYM = 95, /* DAY_SECOND_SYM */
+ YYSYMBOL_DECIMAL_SYM = 96, /* DECIMAL_SYM */
+ YYSYMBOL_DECLARE_MARIADB_SYM = 97, /* DECLARE_MARIADB_SYM */
+ YYSYMBOL_DECLARE_ORACLE_SYM = 98, /* DECLARE_ORACLE_SYM */
+ YYSYMBOL_DEFAULT = 99, /* DEFAULT */
+ YYSYMBOL_DELETE_DOMAIN_ID_SYM = 100, /* DELETE_DOMAIN_ID_SYM */
+ YYSYMBOL_DELETE_SYM = 101, /* DELETE_SYM */
+ YYSYMBOL_DENSE_RANK_SYM = 102, /* DENSE_RANK_SYM */
+ YYSYMBOL_DESCRIBE = 103, /* DESCRIBE */
+ YYSYMBOL_DESC = 104, /* DESC */
+ YYSYMBOL_DETERMINISTIC_SYM = 105, /* DETERMINISTIC_SYM */
+ YYSYMBOL_DISTINCT = 106, /* DISTINCT */
+ YYSYMBOL_DIV_SYM = 107, /* DIV_SYM */
+ YYSYMBOL_DO_DOMAIN_IDS_SYM = 108, /* DO_DOMAIN_IDS_SYM */
+ YYSYMBOL_DOUBLE_SYM = 109, /* DOUBLE_SYM */
+ YYSYMBOL_DROP = 110, /* DROP */
+ YYSYMBOL_DUAL_SYM = 111, /* DUAL_SYM */
+ YYSYMBOL_EACH_SYM = 112, /* EACH_SYM */
+ YYSYMBOL_ELSEIF_MARIADB_SYM = 113, /* ELSEIF_MARIADB_SYM */
+ YYSYMBOL_ELSE = 114, /* ELSE */
+ YYSYMBOL_ELSIF_ORACLE_SYM = 115, /* ELSIF_ORACLE_SYM */
+ YYSYMBOL_EMPTY_SYM = 116, /* EMPTY_SYM */
+ YYSYMBOL_ENCLOSED = 117, /* ENCLOSED */
+ YYSYMBOL_ESCAPED = 118, /* ESCAPED */
+ YYSYMBOL_EXCEPT_SYM = 119, /* EXCEPT_SYM */
+ YYSYMBOL_EXISTS = 120, /* EXISTS */
+ YYSYMBOL_EXTRACT_SYM = 121, /* EXTRACT_SYM */
+ YYSYMBOL_FALSE_SYM = 122, /* FALSE_SYM */
+ YYSYMBOL_FETCH_SYM = 123, /* FETCH_SYM */
+ YYSYMBOL_FIRST_VALUE_SYM = 124, /* FIRST_VALUE_SYM */
+ YYSYMBOL_FLOAT_SYM = 125, /* FLOAT_SYM */
+ YYSYMBOL_FOREIGN = 126, /* FOREIGN */
+ YYSYMBOL_FOR_SYM = 127, /* FOR_SYM */
+ YYSYMBOL_FROM = 128, /* FROM */
+ YYSYMBOL_FULLTEXT_SYM = 129, /* FULLTEXT_SYM */
+ YYSYMBOL_GOTO_ORACLE_SYM = 130, /* GOTO_ORACLE_SYM */
+ YYSYMBOL_GRANT = 131, /* GRANT */
+ YYSYMBOL_GROUP_CONCAT_SYM = 132, /* GROUP_CONCAT_SYM */
+ YYSYMBOL_JSON_ARRAYAGG_SYM = 133, /* JSON_ARRAYAGG_SYM */
+ YYSYMBOL_JSON_OBJECTAGG_SYM = 134, /* JSON_OBJECTAGG_SYM */
+ YYSYMBOL_JSON_TABLE_SYM = 135, /* JSON_TABLE_SYM */
+ YYSYMBOL_GROUP_SYM = 136, /* GROUP_SYM */
+ YYSYMBOL_HAVING = 137, /* HAVING */
+ YYSYMBOL_HOUR_MICROSECOND_SYM = 138, /* HOUR_MICROSECOND_SYM */
+ YYSYMBOL_HOUR_MINUTE_SYM = 139, /* HOUR_MINUTE_SYM */
+ YYSYMBOL_HOUR_SECOND_SYM = 140, /* HOUR_SECOND_SYM */
+ YYSYMBOL_IF_SYM = 141, /* IF_SYM */
+ YYSYMBOL_IGNORE_DOMAIN_IDS_SYM = 142, /* IGNORE_DOMAIN_IDS_SYM */
+ YYSYMBOL_IGNORE_SYM = 143, /* IGNORE_SYM */
+ YYSYMBOL_IGNORED_SYM = 144, /* IGNORED_SYM */
+ YYSYMBOL_INDEX_SYM = 145, /* INDEX_SYM */
+ YYSYMBOL_INFILE = 146, /* INFILE */
+ YYSYMBOL_INNER_SYM = 147, /* INNER_SYM */
+ YYSYMBOL_INOUT_SYM = 148, /* INOUT_SYM */
+ YYSYMBOL_INSENSITIVE_SYM = 149, /* INSENSITIVE_SYM */
+ YYSYMBOL_INSERT = 150, /* INSERT */
+ YYSYMBOL_IN_SYM = 151, /* IN_SYM */
+ YYSYMBOL_INTERSECT_SYM = 152, /* INTERSECT_SYM */
+ YYSYMBOL_INTERVAL_SYM = 153, /* INTERVAL_SYM */
+ YYSYMBOL_INTO = 154, /* INTO */
+ YYSYMBOL_INT_SYM = 155, /* INT_SYM */
+ YYSYMBOL_IS = 156, /* IS */
+ YYSYMBOL_ITERATE_SYM = 157, /* ITERATE_SYM */
+ YYSYMBOL_JOIN_SYM = 158, /* JOIN_SYM */
+ YYSYMBOL_KEYS = 159, /* KEYS */
+ YYSYMBOL_KEY_SYM = 160, /* KEY_SYM */
+ YYSYMBOL_KILL_SYM = 161, /* KILL_SYM */
+ YYSYMBOL_LAG_SYM = 162, /* LAG_SYM */
+ YYSYMBOL_LEADING = 163, /* LEADING */
+ YYSYMBOL_LEAD_SYM = 164, /* LEAD_SYM */
+ YYSYMBOL_LEAVE_SYM = 165, /* LEAVE_SYM */
+ YYSYMBOL_LEFT = 166, /* LEFT */
+ YYSYMBOL_LIKE = 167, /* LIKE */
+ YYSYMBOL_LIMIT = 168, /* LIMIT */
+ YYSYMBOL_LINEAR_SYM = 169, /* LINEAR_SYM */
+ YYSYMBOL_LINES = 170, /* LINES */
+ YYSYMBOL_LOAD = 171, /* LOAD */
+ YYSYMBOL_LOCATOR_SYM = 172, /* LOCATOR_SYM */
+ YYSYMBOL_LOCK_SYM = 173, /* LOCK_SYM */
+ YYSYMBOL_LONGBLOB = 174, /* LONGBLOB */
+ YYSYMBOL_LONG_SYM = 175, /* LONG_SYM */
+ YYSYMBOL_LONGTEXT = 176, /* LONGTEXT */
+ YYSYMBOL_LOOP_SYM = 177, /* LOOP_SYM */
+ YYSYMBOL_LOW_PRIORITY = 178, /* LOW_PRIORITY */
+ YYSYMBOL_MASTER_SSL_VERIFY_SERVER_CERT_SYM = 179, /* MASTER_SSL_VERIFY_SERVER_CERT_SYM */
+ YYSYMBOL_MATCH = 180, /* MATCH */
+ YYSYMBOL_MAX_SYM = 181, /* MAX_SYM */
+ YYSYMBOL_MAXVALUE_SYM = 182, /* MAXVALUE_SYM */
+ YYSYMBOL_MEDIAN_SYM = 183, /* MEDIAN_SYM */
+ YYSYMBOL_MEDIUMBLOB = 184, /* MEDIUMBLOB */
+ YYSYMBOL_MEDIUMINT = 185, /* MEDIUMINT */
+ YYSYMBOL_MEDIUMTEXT = 186, /* MEDIUMTEXT */
+ YYSYMBOL_MIN_SYM = 187, /* MIN_SYM */
+ YYSYMBOL_MINUS_ORACLE_SYM = 188, /* MINUS_ORACLE_SYM */
+ YYSYMBOL_MINUTE_MICROSECOND_SYM = 189, /* MINUTE_MICROSECOND_SYM */
+ YYSYMBOL_MINUTE_SECOND_SYM = 190, /* MINUTE_SECOND_SYM */
+ YYSYMBOL_MODIFIES_SYM = 191, /* MODIFIES_SYM */
+ YYSYMBOL_MOD_SYM = 192, /* MOD_SYM */
+ YYSYMBOL_NATURAL = 193, /* NATURAL */
+ YYSYMBOL_NEG = 194, /* NEG */
+ YYSYMBOL_NESTED_SYM = 195, /* NESTED_SYM */
+ YYSYMBOL_NOT_SYM = 196, /* NOT_SYM */
+ YYSYMBOL_NO_WRITE_TO_BINLOG = 197, /* NO_WRITE_TO_BINLOG */
+ YYSYMBOL_NOW_SYM = 198, /* NOW_SYM */
+ YYSYMBOL_NTH_VALUE_SYM = 199, /* NTH_VALUE_SYM */
+ YYSYMBOL_NTILE_SYM = 200, /* NTILE_SYM */
+ YYSYMBOL_NULL_SYM = 201, /* NULL_SYM */
+ YYSYMBOL_NUMERIC_SYM = 202, /* NUMERIC_SYM */
+ YYSYMBOL_ON = 203, /* ON */
+ YYSYMBOL_OPTIMIZE = 204, /* OPTIMIZE */
+ YYSYMBOL_OPTIONALLY = 205, /* OPTIONALLY */
+ YYSYMBOL_ORDER_SYM = 206, /* ORDER_SYM */
+ YYSYMBOL_ORDINALITY_SYM = 207, /* ORDINALITY_SYM */
+ YYSYMBOL_OR_SYM = 208, /* OR_SYM */
+ YYSYMBOL_OTHERS_ORACLE_SYM = 209, /* OTHERS_ORACLE_SYM */
+ YYSYMBOL_OUTER = 210, /* OUTER */
+ YYSYMBOL_OUTFILE = 211, /* OUTFILE */
+ YYSYMBOL_OUT_SYM = 212, /* OUT_SYM */
+ YYSYMBOL_OVER_SYM = 213, /* OVER_SYM */
+ YYSYMBOL_PACKAGE_ORACLE_SYM = 214, /* PACKAGE_ORACLE_SYM */
+ YYSYMBOL_PAGE_CHECKSUM_SYM = 215, /* PAGE_CHECKSUM_SYM */
+ YYSYMBOL_PARSE_VCOL_EXPR_SYM = 216, /* PARSE_VCOL_EXPR_SYM */
+ YYSYMBOL_PARTITION_SYM = 217, /* PARTITION_SYM */
+ YYSYMBOL_PATH_SYM = 218, /* PATH_SYM */
+ YYSYMBOL_PERCENTILE_CONT_SYM = 219, /* PERCENTILE_CONT_SYM */
+ YYSYMBOL_PERCENTILE_DISC_SYM = 220, /* PERCENTILE_DISC_SYM */
+ YYSYMBOL_PERCENT_RANK_SYM = 221, /* PERCENT_RANK_SYM */
+ YYSYMBOL_PORTION_SYM = 222, /* PORTION_SYM */
+ YYSYMBOL_POSITION_SYM = 223, /* POSITION_SYM */
+ YYSYMBOL_PRECISION = 224, /* PRECISION */
+ YYSYMBOL_PRIMARY_SYM = 225, /* PRIMARY_SYM */
+ YYSYMBOL_PROCEDURE_SYM = 226, /* PROCEDURE_SYM */
+ YYSYMBOL_PURGE = 227, /* PURGE */
+ YYSYMBOL_RAISE_ORACLE_SYM = 228, /* RAISE_ORACLE_SYM */
+ YYSYMBOL_RANGE_SYM = 229, /* RANGE_SYM */
+ YYSYMBOL_RANK_SYM = 230, /* RANK_SYM */
+ YYSYMBOL_READS_SYM = 231, /* READS_SYM */
+ YYSYMBOL_READ_SYM = 232, /* READ_SYM */
+ YYSYMBOL_READ_WRITE_SYM = 233, /* READ_WRITE_SYM */
+ YYSYMBOL_REAL = 234, /* REAL */
+ YYSYMBOL_RECURSIVE_SYM = 235, /* RECURSIVE_SYM */
+ YYSYMBOL_REFERENCES = 236, /* REFERENCES */
+ YYSYMBOL_REF_SYSTEM_ID_SYM = 237, /* REF_SYSTEM_ID_SYM */
+ YYSYMBOL_REGEXP = 238, /* REGEXP */
+ YYSYMBOL_RELEASE_SYM = 239, /* RELEASE_SYM */
+ YYSYMBOL_RENAME = 240, /* RENAME */
+ YYSYMBOL_REPEAT_SYM = 241, /* REPEAT_SYM */
+ YYSYMBOL_REQUIRE_SYM = 242, /* REQUIRE_SYM */
+ YYSYMBOL_RESIGNAL_SYM = 243, /* RESIGNAL_SYM */
+ YYSYMBOL_RESTRICT = 244, /* RESTRICT */
+ YYSYMBOL_RETURNING_SYM = 245, /* RETURNING_SYM */
+ YYSYMBOL_RETURN_MARIADB_SYM = 246, /* RETURN_MARIADB_SYM */
+ YYSYMBOL_RETURN_ORACLE_SYM = 247, /* RETURN_ORACLE_SYM */
+ YYSYMBOL_REVOKE = 248, /* REVOKE */
+ YYSYMBOL_RIGHT = 249, /* RIGHT */
+ YYSYMBOL_ROW_NUMBER_SYM = 250, /* ROW_NUMBER_SYM */
+ YYSYMBOL_ROWS_SYM = 251, /* ROWS_SYM */
+ YYSYMBOL_ROWTYPE_ORACLE_SYM = 252, /* ROWTYPE_ORACLE_SYM */
+ YYSYMBOL_SECOND_MICROSECOND_SYM = 253, /* SECOND_MICROSECOND_SYM */
+ YYSYMBOL_SELECT_SYM = 254, /* SELECT_SYM */
+ YYSYMBOL_SENSITIVE_SYM = 255, /* SENSITIVE_SYM */
+ YYSYMBOL_SEPARATOR_SYM = 256, /* SEPARATOR_SYM */
+ YYSYMBOL_SERVER_OPTIONS = 257, /* SERVER_OPTIONS */
+ YYSYMBOL_SET = 258, /* SET */
+ YYSYMBOL_SHOW = 259, /* SHOW */
+ YYSYMBOL_SIGNAL_SYM = 260, /* SIGNAL_SYM */
+ YYSYMBOL_SMALLINT = 261, /* SMALLINT */
+ YYSYMBOL_SPATIAL_SYM = 262, /* SPATIAL_SYM */
+ YYSYMBOL_SPECIFIC_SYM = 263, /* SPECIFIC_SYM */
+ YYSYMBOL_SQL_BIG_RESULT = 264, /* SQL_BIG_RESULT */
+ YYSYMBOL_SQLEXCEPTION_SYM = 265, /* SQLEXCEPTION_SYM */
+ YYSYMBOL_SQL_SMALL_RESULT = 266, /* SQL_SMALL_RESULT */
+ YYSYMBOL_SQLSTATE_SYM = 267, /* SQLSTATE_SYM */
+ YYSYMBOL_SQL_SYM = 268, /* SQL_SYM */
+ YYSYMBOL_SQLWARNING_SYM = 269, /* SQLWARNING_SYM */
+ YYSYMBOL_SSL_SYM = 270, /* SSL_SYM */
+ YYSYMBOL_STARTING = 271, /* STARTING */
+ YYSYMBOL_STATS_AUTO_RECALC_SYM = 272, /* STATS_AUTO_RECALC_SYM */
+ YYSYMBOL_STATS_PERSISTENT_SYM = 273, /* STATS_PERSISTENT_SYM */
+ YYSYMBOL_STATS_SAMPLE_PAGES_SYM = 274, /* STATS_SAMPLE_PAGES_SYM */
+ YYSYMBOL_STDDEV_SAMP_SYM = 275, /* STDDEV_SAMP_SYM */
+ YYSYMBOL_STD_SYM = 276, /* STD_SYM */
+ YYSYMBOL_STRAIGHT_JOIN = 277, /* STRAIGHT_JOIN */
+ YYSYMBOL_SUM_SYM = 278, /* SUM_SYM */
+ YYSYMBOL_SYSDATE = 279, /* SYSDATE */
+ YYSYMBOL_TABLE_REF_PRIORITY = 280, /* TABLE_REF_PRIORITY */
+ YYSYMBOL_TABLE_SYM = 281, /* TABLE_SYM */
+ YYSYMBOL_TERMINATED = 282, /* TERMINATED */
+ YYSYMBOL_THEN_SYM = 283, /* THEN_SYM */
+ YYSYMBOL_TINYBLOB = 284, /* TINYBLOB */
+ YYSYMBOL_TINYINT = 285, /* TINYINT */
+ YYSYMBOL_TINYTEXT = 286, /* TINYTEXT */
+ YYSYMBOL_TO_SYM = 287, /* TO_SYM */
+ YYSYMBOL_TRAILING = 288, /* TRAILING */
+ YYSYMBOL_TRIGGER_SYM = 289, /* TRIGGER_SYM */
+ YYSYMBOL_TRUE_SYM = 290, /* TRUE_SYM */
+ YYSYMBOL_UNDO_SYM = 291, /* UNDO_SYM */
+ YYSYMBOL_UNION_SYM = 292, /* UNION_SYM */
+ YYSYMBOL_UNIQUE_SYM = 293, /* UNIQUE_SYM */
+ YYSYMBOL_UNLOCK_SYM = 294, /* UNLOCK_SYM */
+ YYSYMBOL_UNSIGNED = 295, /* UNSIGNED */
+ YYSYMBOL_UPDATE_SYM = 296, /* UPDATE_SYM */
+ YYSYMBOL_USAGE = 297, /* USAGE */
+ YYSYMBOL_USE_SYM = 298, /* USE_SYM */
+ YYSYMBOL_USING = 299, /* USING */
+ YYSYMBOL_UTC_DATE_SYM = 300, /* UTC_DATE_SYM */
+ YYSYMBOL_UTC_TIMESTAMP_SYM = 301, /* UTC_TIMESTAMP_SYM */
+ YYSYMBOL_UTC_TIME_SYM = 302, /* UTC_TIME_SYM */
+ YYSYMBOL_VALUES_IN_SYM = 303, /* VALUES_IN_SYM */
+ YYSYMBOL_VALUES_LESS_SYM = 304, /* VALUES_LESS_SYM */
+ YYSYMBOL_VALUES = 305, /* VALUES */
+ YYSYMBOL_VARBINARY = 306, /* VARBINARY */
+ YYSYMBOL_VARCHAR = 307, /* VARCHAR */
+ YYSYMBOL_VARIANCE_SYM = 308, /* VARIANCE_SYM */
+ YYSYMBOL_VAR_SAMP_SYM = 309, /* VAR_SAMP_SYM */
+ YYSYMBOL_VARYING = 310, /* VARYING */
+ YYSYMBOL_WHEN_SYM = 311, /* WHEN_SYM */
+ YYSYMBOL_WHERE = 312, /* WHERE */
+ YYSYMBOL_WHILE_SYM = 313, /* WHILE_SYM */
+ YYSYMBOL_WITH = 314, /* WITH */
+ YYSYMBOL_XOR = 315, /* XOR */
+ YYSYMBOL_YEAR_MONTH_SYM = 316, /* YEAR_MONTH_SYM */
+ YYSYMBOL_ZEROFILL = 317, /* ZEROFILL */
+ YYSYMBOL_BODY_MARIADB_SYM = 318, /* BODY_MARIADB_SYM */
+ YYSYMBOL_ELSEIF_ORACLE_SYM = 319, /* ELSEIF_ORACLE_SYM */
+ YYSYMBOL_ELSIF_MARIADB_SYM = 320, /* ELSIF_MARIADB_SYM */
+ YYSYMBOL_EXCEPTION_ORACLE_SYM = 321, /* EXCEPTION_ORACLE_SYM */
+ YYSYMBOL_GOTO_MARIADB_SYM = 322, /* GOTO_MARIADB_SYM */
+ YYSYMBOL_OTHERS_MARIADB_SYM = 323, /* OTHERS_MARIADB_SYM */
+ YYSYMBOL_PACKAGE_MARIADB_SYM = 324, /* PACKAGE_MARIADB_SYM */
+ YYSYMBOL_RAISE_MARIADB_SYM = 325, /* RAISE_MARIADB_SYM */
+ YYSYMBOL_ROWTYPE_MARIADB_SYM = 326, /* ROWTYPE_MARIADB_SYM */
+ YYSYMBOL_ROWNUM_SYM = 327, /* ROWNUM_SYM */
+ YYSYMBOL_REPLACE = 328, /* REPLACE */
+ YYSYMBOL_SUBSTRING = 329, /* SUBSTRING */
+ YYSYMBOL_TRIM = 330, /* TRIM */
+ YYSYMBOL_ACCOUNT_SYM = 331, /* ACCOUNT_SYM */
+ YYSYMBOL_ACTION = 332, /* ACTION */
+ YYSYMBOL_ADMIN_SYM = 333, /* ADMIN_SYM */
+ YYSYMBOL_ADDDATE_SYM = 334, /* ADDDATE_SYM */
+ YYSYMBOL_AFTER_SYM = 335, /* AFTER_SYM */
+ YYSYMBOL_AGAINST = 336, /* AGAINST */
+ YYSYMBOL_AGGREGATE_SYM = 337, /* AGGREGATE_SYM */
+ YYSYMBOL_ALGORITHM_SYM = 338, /* ALGORITHM_SYM */
+ YYSYMBOL_ALWAYS_SYM = 339, /* ALWAYS_SYM */
+ YYSYMBOL_ANY_SYM = 340, /* ANY_SYM */
+ YYSYMBOL_ASCII_SYM = 341, /* ASCII_SYM */
+ YYSYMBOL_AT_SYM = 342, /* AT_SYM */
+ YYSYMBOL_ATOMIC_SYM = 343, /* ATOMIC_SYM */
+ YYSYMBOL_AUTHORS_SYM = 344, /* AUTHORS_SYM */
+ YYSYMBOL_AUTOEXTEND_SIZE_SYM = 345, /* AUTOEXTEND_SIZE_SYM */
+ YYSYMBOL_AUTO_INC = 346, /* AUTO_INC */
+ YYSYMBOL_AUTO_SYM = 347, /* AUTO_SYM */
+ YYSYMBOL_AVG_ROW_LENGTH = 348, /* AVG_ROW_LENGTH */
+ YYSYMBOL_AVG_SYM = 349, /* AVG_SYM */
+ YYSYMBOL_BACKUP_SYM = 350, /* BACKUP_SYM */
+ YYSYMBOL_BEGIN_MARIADB_SYM = 351, /* BEGIN_MARIADB_SYM */
+ YYSYMBOL_BEGIN_ORACLE_SYM = 352, /* BEGIN_ORACLE_SYM */
+ YYSYMBOL_BINLOG_SYM = 353, /* BINLOG_SYM */
+ YYSYMBOL_BIT_SYM = 354, /* BIT_SYM */
+ YYSYMBOL_BLOCK_SYM = 355, /* BLOCK_SYM */
+ YYSYMBOL_BOOL_SYM = 356, /* BOOL_SYM */
+ YYSYMBOL_BOOLEAN_SYM = 357, /* BOOLEAN_SYM */
+ YYSYMBOL_BTREE_SYM = 358, /* BTREE_SYM */
+ YYSYMBOL_BYTE_SYM = 359, /* BYTE_SYM */
+ YYSYMBOL_CACHE_SYM = 360, /* CACHE_SYM */
+ YYSYMBOL_CASCADED = 361, /* CASCADED */
+ YYSYMBOL_CATALOG_NAME_SYM = 362, /* CATALOG_NAME_SYM */
+ YYSYMBOL_CHAIN_SYM = 363, /* CHAIN_SYM */
+ YYSYMBOL_CHANGED = 364, /* CHANGED */
+ YYSYMBOL_CHANNEL_SYM = 365, /* CHANNEL_SYM */
+ YYSYMBOL_CHARSET = 366, /* CHARSET */
+ YYSYMBOL_CHECKPOINT_SYM = 367, /* CHECKPOINT_SYM */
+ YYSYMBOL_CHECKSUM_SYM = 368, /* CHECKSUM_SYM */
+ YYSYMBOL_CIPHER_SYM = 369, /* CIPHER_SYM */
+ YYSYMBOL_CLASS_ORIGIN_SYM = 370, /* CLASS_ORIGIN_SYM */
+ YYSYMBOL_CLIENT_SYM = 371, /* CLIENT_SYM */
+ YYSYMBOL_CLOB_MARIADB_SYM = 372, /* CLOB_MARIADB_SYM */
+ YYSYMBOL_CLOB_ORACLE_SYM = 373, /* CLOB_ORACLE_SYM */
+ YYSYMBOL_CLOSE_SYM = 374, /* CLOSE_SYM */
+ YYSYMBOL_COALESCE = 375, /* COALESCE */
+ YYSYMBOL_CODE_SYM = 376, /* CODE_SYM */
+ YYSYMBOL_COLLATION_SYM = 377, /* COLLATION_SYM */
+ YYSYMBOL_COLUMNS = 378, /* COLUMNS */
+ YYSYMBOL_COLUMN_ADD_SYM = 379, /* COLUMN_ADD_SYM */
+ YYSYMBOL_COLUMN_CHECK_SYM = 380, /* COLUMN_CHECK_SYM */
+ YYSYMBOL_COLUMN_CREATE_SYM = 381, /* COLUMN_CREATE_SYM */
+ YYSYMBOL_COLUMN_DELETE_SYM = 382, /* COLUMN_DELETE_SYM */
+ YYSYMBOL_COLUMN_GET_SYM = 383, /* COLUMN_GET_SYM */
+ YYSYMBOL_COLUMN_SYM = 384, /* COLUMN_SYM */
+ YYSYMBOL_COLUMN_NAME_SYM = 385, /* COLUMN_NAME_SYM */
+ YYSYMBOL_COMMENT_SYM = 386, /* COMMENT_SYM */
+ YYSYMBOL_COMMITTED_SYM = 387, /* COMMITTED_SYM */
+ YYSYMBOL_COMMIT_SYM = 388, /* COMMIT_SYM */
+ YYSYMBOL_COMPACT_SYM = 389, /* COMPACT_SYM */
+ YYSYMBOL_COMPLETION_SYM = 390, /* COMPLETION_SYM */
+ YYSYMBOL_COMPRESSED_SYM = 391, /* COMPRESSED_SYM */
+ YYSYMBOL_CONCURRENT = 392, /* CONCURRENT */
+ YYSYMBOL_CONNECTION_SYM = 393, /* CONNECTION_SYM */
+ YYSYMBOL_CONSISTENT_SYM = 394, /* CONSISTENT_SYM */
+ YYSYMBOL_CONSTRAINT_CATALOG_SYM = 395, /* CONSTRAINT_CATALOG_SYM */
+ YYSYMBOL_CONSTRAINT_NAME_SYM = 396, /* CONSTRAINT_NAME_SYM */
+ YYSYMBOL_CONSTRAINT_SCHEMA_SYM = 397, /* CONSTRAINT_SCHEMA_SYM */
+ YYSYMBOL_CONTAINS_SYM = 398, /* CONTAINS_SYM */
+ YYSYMBOL_CONTEXT_SYM = 399, /* CONTEXT_SYM */
+ YYSYMBOL_CONTRIBUTORS_SYM = 400, /* CONTRIBUTORS_SYM */
+ YYSYMBOL_CPU_SYM = 401, /* CPU_SYM */
+ YYSYMBOL_CUBE_SYM = 402, /* CUBE_SYM */
+ YYSYMBOL_CURRENT_SYM = 403, /* CURRENT_SYM */
+ YYSYMBOL_CURRENT_POS_SYM = 404, /* CURRENT_POS_SYM */
+ YYSYMBOL_CURSOR_NAME_SYM = 405, /* CURSOR_NAME_SYM */
+ YYSYMBOL_CYCLE_SYM = 406, /* CYCLE_SYM */
+ YYSYMBOL_DATAFILE_SYM = 407, /* DATAFILE_SYM */
+ YYSYMBOL_DATA_SYM = 408, /* DATA_SYM */
+ YYSYMBOL_DATETIME = 409, /* DATETIME */
+ YYSYMBOL_DATE_SYM = 410, /* DATE_SYM */
+ YYSYMBOL_DAY_SYM = 411, /* DAY_SYM */
+ YYSYMBOL_DEALLOCATE_SYM = 412, /* DEALLOCATE_SYM */
+ YYSYMBOL_DEFINER_SYM = 413, /* DEFINER_SYM */
+ YYSYMBOL_DELAYED_SYM = 414, /* DELAYED_SYM */
+ YYSYMBOL_DELAY_KEY_WRITE_SYM = 415, /* DELAY_KEY_WRITE_SYM */
+ YYSYMBOL_DES_KEY_FILE = 416, /* DES_KEY_FILE */
+ YYSYMBOL_DIAGNOSTICS_SYM = 417, /* DIAGNOSTICS_SYM */
+ YYSYMBOL_DIRECTORY_SYM = 418, /* DIRECTORY_SYM */
+ YYSYMBOL_DISABLE_SYM = 419, /* DISABLE_SYM */
+ YYSYMBOL_DISCARD = 420, /* DISCARD */
+ YYSYMBOL_DISK_SYM = 421, /* DISK_SYM */
+ YYSYMBOL_DO_SYM = 422, /* DO_SYM */
+ YYSYMBOL_DUMPFILE = 423, /* DUMPFILE */
+ YYSYMBOL_DUPLICATE_SYM = 424, /* DUPLICATE_SYM */
+ YYSYMBOL_DYNAMIC_SYM = 425, /* DYNAMIC_SYM */
+ YYSYMBOL_ENABLE_SYM = 426, /* ENABLE_SYM */
+ YYSYMBOL_END = 427, /* END */
+ YYSYMBOL_ENDS_SYM = 428, /* ENDS_SYM */
+ YYSYMBOL_ENGINES_SYM = 429, /* ENGINES_SYM */
+ YYSYMBOL_ENGINE_SYM = 430, /* ENGINE_SYM */
+ YYSYMBOL_ENUM = 431, /* ENUM */
+ YYSYMBOL_ERROR_SYM = 432, /* ERROR_SYM */
+ YYSYMBOL_ERRORS = 433, /* ERRORS */
+ YYSYMBOL_ESCAPE_SYM = 434, /* ESCAPE_SYM */
+ YYSYMBOL_EVENTS_SYM = 435, /* EVENTS_SYM */
+ YYSYMBOL_EVENT_SYM = 436, /* EVENT_SYM */
+ YYSYMBOL_EVERY_SYM = 437, /* EVERY_SYM */
+ YYSYMBOL_EXCHANGE_SYM = 438, /* EXCHANGE_SYM */
+ YYSYMBOL_EXAMINED_SYM = 439, /* EXAMINED_SYM */
+ YYSYMBOL_EXCLUDE_SYM = 440, /* EXCLUDE_SYM */
+ YYSYMBOL_EXECUTE_SYM = 441, /* EXECUTE_SYM */
+ YYSYMBOL_EXCEPTION_MARIADB_SYM = 442, /* EXCEPTION_MARIADB_SYM */
+ YYSYMBOL_EXIT_MARIADB_SYM = 443, /* EXIT_MARIADB_SYM */
+ YYSYMBOL_EXIT_ORACLE_SYM = 444, /* EXIT_ORACLE_SYM */
+ YYSYMBOL_EXPANSION_SYM = 445, /* EXPANSION_SYM */
+ YYSYMBOL_EXPIRE_SYM = 446, /* EXPIRE_SYM */
+ YYSYMBOL_EXPORT_SYM = 447, /* EXPORT_SYM */
+ YYSYMBOL_EXTENDED_SYM = 448, /* EXTENDED_SYM */
+ YYSYMBOL_EXTENT_SIZE_SYM = 449, /* EXTENT_SIZE_SYM */
+ YYSYMBOL_FAST_SYM = 450, /* FAST_SYM */
+ YYSYMBOL_FAULTS_SYM = 451, /* FAULTS_SYM */
+ YYSYMBOL_FEDERATED_SYM = 452, /* FEDERATED_SYM */
+ YYSYMBOL_FILE_SYM = 453, /* FILE_SYM */
+ YYSYMBOL_FIRST_SYM = 454, /* FIRST_SYM */
+ YYSYMBOL_FIXED_SYM = 455, /* FIXED_SYM */
+ YYSYMBOL_FLUSH_SYM = 456, /* FLUSH_SYM */
+ YYSYMBOL_FOLLOWS_SYM = 457, /* FOLLOWS_SYM */
+ YYSYMBOL_FOLLOWING_SYM = 458, /* FOLLOWING_SYM */
+ YYSYMBOL_FORCE_SYM = 459, /* FORCE_SYM */
+ YYSYMBOL_FORMAT_SYM = 460, /* FORMAT_SYM */
+ YYSYMBOL_FOUND_SYM = 461, /* FOUND_SYM */
+ YYSYMBOL_FULL = 462, /* FULL */
+ YYSYMBOL_FUNCTION_SYM = 463, /* FUNCTION_SYM */
+ YYSYMBOL_GENERAL = 464, /* GENERAL */
+ YYSYMBOL_GENERATED_SYM = 465, /* GENERATED_SYM */
+ YYSYMBOL_GET_FORMAT = 466, /* GET_FORMAT */
+ YYSYMBOL_GET_SYM = 467, /* GET_SYM */
+ YYSYMBOL_GLOBAL_SYM = 468, /* GLOBAL_SYM */
+ YYSYMBOL_GRANTS = 469, /* GRANTS */
+ YYSYMBOL_HANDLER_SYM = 470, /* HANDLER_SYM */
+ YYSYMBOL_HARD_SYM = 471, /* HARD_SYM */
+ YYSYMBOL_HASH_SYM = 472, /* HASH_SYM */
+ YYSYMBOL_HELP_SYM = 473, /* HELP_SYM */
+ YYSYMBOL_HIGH_PRIORITY = 474, /* HIGH_PRIORITY */
+ YYSYMBOL_HISTORY_SYM = 475, /* HISTORY_SYM */
+ YYSYMBOL_HOST_SYM = 476, /* HOST_SYM */
+ YYSYMBOL_HOSTS_SYM = 477, /* HOSTS_SYM */
+ YYSYMBOL_HOUR_SYM = 478, /* HOUR_SYM */
+ YYSYMBOL_ID_SYM = 479, /* ID_SYM */
+ YYSYMBOL_IDENTIFIED_SYM = 480, /* IDENTIFIED_SYM */
+ YYSYMBOL_IGNORE_SERVER_IDS_SYM = 481, /* IGNORE_SERVER_IDS_SYM */
+ YYSYMBOL_IMMEDIATE_SYM = 482, /* IMMEDIATE_SYM */
+ YYSYMBOL_IMPORT = 483, /* IMPORT */
+ YYSYMBOL_INCREMENT_SYM = 484, /* INCREMENT_SYM */
+ YYSYMBOL_INDEXES = 485, /* INDEXES */
+ YYSYMBOL_INITIAL_SIZE_SYM = 486, /* INITIAL_SIZE_SYM */
+ YYSYMBOL_INSERT_METHOD = 487, /* INSERT_METHOD */
+ YYSYMBOL_INSTALL_SYM = 488, /* INSTALL_SYM */
+ YYSYMBOL_INVOKER_SYM = 489, /* INVOKER_SYM */
+ YYSYMBOL_IO_SYM = 490, /* IO_SYM */
+ YYSYMBOL_IPC_SYM = 491, /* IPC_SYM */
+ YYSYMBOL_ISOLATION = 492, /* ISOLATION */
+ YYSYMBOL_ISOPEN_SYM = 493, /* ISOPEN_SYM */
+ YYSYMBOL_ISSUER_SYM = 494, /* ISSUER_SYM */
+ YYSYMBOL_INVISIBLE_SYM = 495, /* INVISIBLE_SYM */
+ YYSYMBOL_JSON_SYM = 496, /* JSON_SYM */
+ YYSYMBOL_KEY_BLOCK_SIZE = 497, /* KEY_BLOCK_SIZE */
+ YYSYMBOL_LANGUAGE_SYM = 498, /* LANGUAGE_SYM */
+ YYSYMBOL_LAST_SYM = 499, /* LAST_SYM */
+ YYSYMBOL_LAST_VALUE = 500, /* LAST_VALUE */
+ YYSYMBOL_LASTVAL_SYM = 501, /* LASTVAL_SYM */
+ YYSYMBOL_LEAVES = 502, /* LEAVES */
+ YYSYMBOL_LESS_SYM = 503, /* LESS_SYM */
+ YYSYMBOL_LEVEL_SYM = 504, /* LEVEL_SYM */
+ YYSYMBOL_LIST_SYM = 505, /* LIST_SYM */
+ YYSYMBOL_LOCAL_SYM = 506, /* LOCAL_SYM */
+ YYSYMBOL_LOCKED_SYM = 507, /* LOCKED_SYM */
+ YYSYMBOL_LOCKS_SYM = 508, /* LOCKS_SYM */
+ YYSYMBOL_LOGFILE_SYM = 509, /* LOGFILE_SYM */
+ YYSYMBOL_LOGS_SYM = 510, /* LOGS_SYM */
+ YYSYMBOL_MASTER_CONNECT_RETRY_SYM = 511, /* MASTER_CONNECT_RETRY_SYM */
+ YYSYMBOL_MASTER_DELAY_SYM = 512, /* MASTER_DELAY_SYM */
+ YYSYMBOL_MASTER_GTID_POS_SYM = 513, /* MASTER_GTID_POS_SYM */
+ YYSYMBOL_MASTER_HOST_SYM = 514, /* MASTER_HOST_SYM */
+ YYSYMBOL_MASTER_LOG_FILE_SYM = 515, /* MASTER_LOG_FILE_SYM */
+ YYSYMBOL_MASTER_LOG_POS_SYM = 516, /* MASTER_LOG_POS_SYM */
+ YYSYMBOL_MASTER_PASSWORD_SYM = 517, /* MASTER_PASSWORD_SYM */
+ YYSYMBOL_MASTER_PORT_SYM = 518, /* MASTER_PORT_SYM */
+ YYSYMBOL_MASTER_SERVER_ID_SYM = 519, /* MASTER_SERVER_ID_SYM */
+ YYSYMBOL_MASTER_SSL_CAPATH_SYM = 520, /* MASTER_SSL_CAPATH_SYM */
+ YYSYMBOL_MASTER_SSL_CA_SYM = 521, /* MASTER_SSL_CA_SYM */
+ YYSYMBOL_MASTER_SSL_CERT_SYM = 522, /* MASTER_SSL_CERT_SYM */
+ YYSYMBOL_MASTER_SSL_CIPHER_SYM = 523, /* MASTER_SSL_CIPHER_SYM */
+ YYSYMBOL_MASTER_SSL_CRL_SYM = 524, /* MASTER_SSL_CRL_SYM */
+ YYSYMBOL_MASTER_SSL_CRLPATH_SYM = 525, /* MASTER_SSL_CRLPATH_SYM */
+ YYSYMBOL_MASTER_SSL_KEY_SYM = 526, /* MASTER_SSL_KEY_SYM */
+ YYSYMBOL_MASTER_SSL_SYM = 527, /* MASTER_SSL_SYM */
+ YYSYMBOL_MASTER_SYM = 528, /* MASTER_SYM */
+ YYSYMBOL_MASTER_USER_SYM = 529, /* MASTER_USER_SYM */
+ YYSYMBOL_MASTER_USE_GTID_SYM = 530, /* MASTER_USE_GTID_SYM */
+ YYSYMBOL_MASTER_HEARTBEAT_PERIOD_SYM = 531, /* MASTER_HEARTBEAT_PERIOD_SYM */
+ YYSYMBOL_MASTER_DEMOTE_TO_SLAVE_SYM = 532, /* MASTER_DEMOTE_TO_SLAVE_SYM */
+ YYSYMBOL_MAX_CONNECTIONS_PER_HOUR = 533, /* MAX_CONNECTIONS_PER_HOUR */
+ YYSYMBOL_MAX_QUERIES_PER_HOUR = 534, /* MAX_QUERIES_PER_HOUR */
+ YYSYMBOL_MAX_ROWS = 535, /* MAX_ROWS */
+ YYSYMBOL_MAX_SIZE_SYM = 536, /* MAX_SIZE_SYM */
+ YYSYMBOL_MAX_UPDATES_PER_HOUR = 537, /* MAX_UPDATES_PER_HOUR */
+ YYSYMBOL_MAX_STATEMENT_TIME_SYM = 538, /* MAX_STATEMENT_TIME_SYM */
+ YYSYMBOL_MAX_USER_CONNECTIONS_SYM = 539, /* MAX_USER_CONNECTIONS_SYM */
+ YYSYMBOL_MEDIUM_SYM = 540, /* MEDIUM_SYM */
+ YYSYMBOL_MEMORY_SYM = 541, /* MEMORY_SYM */
+ YYSYMBOL_MERGE_SYM = 542, /* MERGE_SYM */
+ YYSYMBOL_MESSAGE_TEXT_SYM = 543, /* MESSAGE_TEXT_SYM */
+ YYSYMBOL_MICROSECOND_SYM = 544, /* MICROSECOND_SYM */
+ YYSYMBOL_MIGRATE_SYM = 545, /* MIGRATE_SYM */
+ YYSYMBOL_MINUTE_SYM = 546, /* MINUTE_SYM */
+ YYSYMBOL_MINVALUE_SYM = 547, /* MINVALUE_SYM */
+ YYSYMBOL_MIN_ROWS = 548, /* MIN_ROWS */
+ YYSYMBOL_MODE_SYM = 549, /* MODE_SYM */
+ YYSYMBOL_MODIFY_SYM = 550, /* MODIFY_SYM */
+ YYSYMBOL_MONITOR_SYM = 551, /* MONITOR_SYM */
+ YYSYMBOL_MONTH_SYM = 552, /* MONTH_SYM */
+ YYSYMBOL_MUTEX_SYM = 553, /* MUTEX_SYM */
+ YYSYMBOL_MYSQL_SYM = 554, /* MYSQL_SYM */
+ YYSYMBOL_MYSQL_ERRNO_SYM = 555, /* MYSQL_ERRNO_SYM */
+ YYSYMBOL_NAMES_SYM = 556, /* NAMES_SYM */
+ YYSYMBOL_NAME_SYM = 557, /* NAME_SYM */
+ YYSYMBOL_NATIONAL_SYM = 558, /* NATIONAL_SYM */
+ YYSYMBOL_NCHAR_SYM = 559, /* NCHAR_SYM */
+ YYSYMBOL_NEVER_SYM = 560, /* NEVER_SYM */
+ YYSYMBOL_NEXT_SYM = 561, /* NEXT_SYM */
+ YYSYMBOL_NEXTVAL_SYM = 562, /* NEXTVAL_SYM */
+ YYSYMBOL_NOCACHE_SYM = 563, /* NOCACHE_SYM */
+ YYSYMBOL_NOCYCLE_SYM = 564, /* NOCYCLE_SYM */
+ YYSYMBOL_NODEGROUP_SYM = 565, /* NODEGROUP_SYM */
+ YYSYMBOL_NONE_SYM = 566, /* NONE_SYM */
+ YYSYMBOL_NOTFOUND_SYM = 567, /* NOTFOUND_SYM */
+ YYSYMBOL_NO_SYM = 568, /* NO_SYM */
+ YYSYMBOL_NOMAXVALUE_SYM = 569, /* NOMAXVALUE_SYM */
+ YYSYMBOL_NOMINVALUE_SYM = 570, /* NOMINVALUE_SYM */
+ YYSYMBOL_NO_WAIT_SYM = 571, /* NO_WAIT_SYM */
+ YYSYMBOL_NOWAIT_SYM = 572, /* NOWAIT_SYM */
+ YYSYMBOL_NUMBER_MARIADB_SYM = 573, /* NUMBER_MARIADB_SYM */
+ YYSYMBOL_NUMBER_ORACLE_SYM = 574, /* NUMBER_ORACLE_SYM */
+ YYSYMBOL_NVARCHAR_SYM = 575, /* NVARCHAR_SYM */
+ YYSYMBOL_OF_SYM = 576, /* OF_SYM */
+ YYSYMBOL_OFFSET_SYM = 577, /* OFFSET_SYM */
+ YYSYMBOL_OLD_PASSWORD_SYM = 578, /* OLD_PASSWORD_SYM */
+ YYSYMBOL_ONE_SYM = 579, /* ONE_SYM */
+ YYSYMBOL_ONLY_SYM = 580, /* ONLY_SYM */
+ YYSYMBOL_ONLINE_SYM = 581, /* ONLINE_SYM */
+ YYSYMBOL_OPEN_SYM = 582, /* OPEN_SYM */
+ YYSYMBOL_OPTIONS_SYM = 583, /* OPTIONS_SYM */
+ YYSYMBOL_OPTION = 584, /* OPTION */
+ YYSYMBOL_OVERLAPS_SYM = 585, /* OVERLAPS_SYM */
+ YYSYMBOL_OWNER_SYM = 586, /* OWNER_SYM */
+ YYSYMBOL_PACK_KEYS_SYM = 587, /* PACK_KEYS_SYM */
+ YYSYMBOL_PAGE_SYM = 588, /* PAGE_SYM */
+ YYSYMBOL_PARSER_SYM = 589, /* PARSER_SYM */
+ YYSYMBOL_PARTIAL = 590, /* PARTIAL */
+ YYSYMBOL_PARTITIONS_SYM = 591, /* PARTITIONS_SYM */
+ YYSYMBOL_PARTITIONING_SYM = 592, /* PARTITIONING_SYM */
+ YYSYMBOL_PASSWORD_SYM = 593, /* PASSWORD_SYM */
+ YYSYMBOL_PERIOD_SYM = 594, /* PERIOD_SYM */
+ YYSYMBOL_PERSISTENT_SYM = 595, /* PERSISTENT_SYM */
+ YYSYMBOL_PHASE_SYM = 596, /* PHASE_SYM */
+ YYSYMBOL_PLUGINS_SYM = 597, /* PLUGINS_SYM */
+ YYSYMBOL_PLUGIN_SYM = 598, /* PLUGIN_SYM */
+ YYSYMBOL_PORT_SYM = 599, /* PORT_SYM */
+ YYSYMBOL_PRECEDES_SYM = 600, /* PRECEDES_SYM */
+ YYSYMBOL_PRECEDING_SYM = 601, /* PRECEDING_SYM */
+ YYSYMBOL_PREPARE_SYM = 602, /* PREPARE_SYM */
+ YYSYMBOL_PRESERVE_SYM = 603, /* PRESERVE_SYM */
+ YYSYMBOL_PREV_SYM = 604, /* PREV_SYM */
+ YYSYMBOL_PREVIOUS_SYM = 605, /* PREVIOUS_SYM */
+ YYSYMBOL_PRIVILEGES = 606, /* PRIVILEGES */
+ YYSYMBOL_PROCESS = 607, /* PROCESS */
+ YYSYMBOL_PROCESSLIST_SYM = 608, /* PROCESSLIST_SYM */
+ YYSYMBOL_PROFILE_SYM = 609, /* PROFILE_SYM */
+ YYSYMBOL_PROFILES_SYM = 610, /* PROFILES_SYM */
+ YYSYMBOL_PROXY_SYM = 611, /* PROXY_SYM */
+ YYSYMBOL_QUARTER_SYM = 612, /* QUARTER_SYM */
+ YYSYMBOL_QUERY_SYM = 613, /* QUERY_SYM */
+ YYSYMBOL_QUICK = 614, /* QUICK */
+ YYSYMBOL_RAW_MARIADB_SYM = 615, /* RAW_MARIADB_SYM */
+ YYSYMBOL_RAW_ORACLE_SYM = 616, /* RAW_ORACLE_SYM */
+ YYSYMBOL_READ_ONLY_SYM = 617, /* READ_ONLY_SYM */
+ YYSYMBOL_REBUILD_SYM = 618, /* REBUILD_SYM */
+ YYSYMBOL_RECOVER_SYM = 619, /* RECOVER_SYM */
+ YYSYMBOL_REDOFILE_SYM = 620, /* REDOFILE_SYM */
+ YYSYMBOL_REDO_BUFFER_SIZE_SYM = 621, /* REDO_BUFFER_SIZE_SYM */
+ YYSYMBOL_REDUNDANT_SYM = 622, /* REDUNDANT_SYM */
+ YYSYMBOL_RELAY = 623, /* RELAY */
+ YYSYMBOL_RELAYLOG_SYM = 624, /* RELAYLOG_SYM */
+ YYSYMBOL_RELAY_LOG_FILE_SYM = 625, /* RELAY_LOG_FILE_SYM */
+ YYSYMBOL_RELAY_LOG_POS_SYM = 626, /* RELAY_LOG_POS_SYM */
+ YYSYMBOL_RELAY_THREAD = 627, /* RELAY_THREAD */
+ YYSYMBOL_RELOAD = 628, /* RELOAD */
+ YYSYMBOL_REMOVE_SYM = 629, /* REMOVE_SYM */
+ YYSYMBOL_REORGANIZE_SYM = 630, /* REORGANIZE_SYM */
+ YYSYMBOL_REPAIR = 631, /* REPAIR */
+ YYSYMBOL_REPEATABLE_SYM = 632, /* REPEATABLE_SYM */
+ YYSYMBOL_REPLAY_SYM = 633, /* REPLAY_SYM */
+ YYSYMBOL_REPLICATION = 634, /* REPLICATION */
+ YYSYMBOL_RESET_SYM = 635, /* RESET_SYM */
+ YYSYMBOL_RESTART_SYM = 636, /* RESTART_SYM */
+ YYSYMBOL_RESOURCES = 637, /* RESOURCES */
+ YYSYMBOL_RESTORE_SYM = 638, /* RESTORE_SYM */
+ YYSYMBOL_RESUME_SYM = 639, /* RESUME_SYM */
+ YYSYMBOL_RETURNED_SQLSTATE_SYM = 640, /* RETURNED_SQLSTATE_SYM */
+ YYSYMBOL_RETURNS_SYM = 641, /* RETURNS_SYM */
+ YYSYMBOL_REUSE_SYM = 642, /* REUSE_SYM */
+ YYSYMBOL_REVERSE_SYM = 643, /* REVERSE_SYM */
+ YYSYMBOL_ROLE_SYM = 644, /* ROLE_SYM */
+ YYSYMBOL_ROLLBACK_SYM = 645, /* ROLLBACK_SYM */
+ YYSYMBOL_ROLLUP_SYM = 646, /* ROLLUP_SYM */
+ YYSYMBOL_ROUTINE_SYM = 647, /* ROUTINE_SYM */
+ YYSYMBOL_ROWCOUNT_SYM = 648, /* ROWCOUNT_SYM */
+ YYSYMBOL_ROW_SYM = 649, /* ROW_SYM */
+ YYSYMBOL_ROW_COUNT_SYM = 650, /* ROW_COUNT_SYM */
+ YYSYMBOL_ROW_FORMAT_SYM = 651, /* ROW_FORMAT_SYM */
+ YYSYMBOL_RTREE_SYM = 652, /* RTREE_SYM */
+ YYSYMBOL_SAVEPOINT_SYM = 653, /* SAVEPOINT_SYM */
+ YYSYMBOL_SCHEDULE_SYM = 654, /* SCHEDULE_SYM */
+ YYSYMBOL_SCHEMA_NAME_SYM = 655, /* SCHEMA_NAME_SYM */
+ YYSYMBOL_SECOND_SYM = 656, /* SECOND_SYM */
+ YYSYMBOL_SECURITY_SYM = 657, /* SECURITY_SYM */
+ YYSYMBOL_SEQUENCE_SYM = 658, /* SEQUENCE_SYM */
+ YYSYMBOL_SERIALIZABLE_SYM = 659, /* SERIALIZABLE_SYM */
+ YYSYMBOL_SERIAL_SYM = 660, /* SERIAL_SYM */
+ YYSYMBOL_SESSION_SYM = 661, /* SESSION_SYM */
+ YYSYMBOL_SERVER_SYM = 662, /* SERVER_SYM */
+ YYSYMBOL_SETVAL_SYM = 663, /* SETVAL_SYM */
+ YYSYMBOL_SHARE_SYM = 664, /* SHARE_SYM */
+ YYSYMBOL_SHUTDOWN = 665, /* SHUTDOWN */
+ YYSYMBOL_SIGNED_SYM = 666, /* SIGNED_SYM */
+ YYSYMBOL_SIMPLE_SYM = 667, /* SIMPLE_SYM */
+ YYSYMBOL_SKIP_SYM = 668, /* SKIP_SYM */
+ YYSYMBOL_SLAVE = 669, /* SLAVE */
+ YYSYMBOL_SLAVES = 670, /* SLAVES */
+ YYSYMBOL_SLAVE_POS_SYM = 671, /* SLAVE_POS_SYM */
+ YYSYMBOL_SLOW = 672, /* SLOW */
+ YYSYMBOL_SNAPSHOT_SYM = 673, /* SNAPSHOT_SYM */
+ YYSYMBOL_SOCKET_SYM = 674, /* SOCKET_SYM */
+ YYSYMBOL_SOFT_SYM = 675, /* SOFT_SYM */
+ YYSYMBOL_SONAME_SYM = 676, /* SONAME_SYM */
+ YYSYMBOL_SOUNDS_SYM = 677, /* SOUNDS_SYM */
+ YYSYMBOL_SOURCE_SYM = 678, /* SOURCE_SYM */
+ YYSYMBOL_SQL_BUFFER_RESULT = 679, /* SQL_BUFFER_RESULT */
+ YYSYMBOL_SQL_CACHE_SYM = 680, /* SQL_CACHE_SYM */
+ YYSYMBOL_SQL_CALC_FOUND_ROWS = 681, /* SQL_CALC_FOUND_ROWS */
+ YYSYMBOL_SQL_NO_CACHE_SYM = 682, /* SQL_NO_CACHE_SYM */
+ YYSYMBOL_SQL_THREAD = 683, /* SQL_THREAD */
+ YYSYMBOL_STAGE_SYM = 684, /* STAGE_SYM */
+ YYSYMBOL_STARTS_SYM = 685, /* STARTS_SYM */
+ YYSYMBOL_START_SYM = 686, /* START_SYM */
+ YYSYMBOL_STATEMENT_SYM = 687, /* STATEMENT_SYM */
+ YYSYMBOL_STATUS_SYM = 688, /* STATUS_SYM */
+ YYSYMBOL_STOP_SYM = 689, /* STOP_SYM */
+ YYSYMBOL_STORAGE_SYM = 690, /* STORAGE_SYM */
+ YYSYMBOL_STORED_SYM = 691, /* STORED_SYM */
+ YYSYMBOL_STRING_SYM = 692, /* STRING_SYM */
+ YYSYMBOL_SUBCLASS_ORIGIN_SYM = 693, /* SUBCLASS_ORIGIN_SYM */
+ YYSYMBOL_SUBDATE_SYM = 694, /* SUBDATE_SYM */
+ YYSYMBOL_SUBJECT_SYM = 695, /* SUBJECT_SYM */
+ YYSYMBOL_SUBPARTITIONS_SYM = 696, /* SUBPARTITIONS_SYM */
+ YYSYMBOL_SUBPARTITION_SYM = 697, /* SUBPARTITION_SYM */
+ YYSYMBOL_SUPER_SYM = 698, /* SUPER_SYM */
+ YYSYMBOL_SUSPEND_SYM = 699, /* SUSPEND_SYM */
+ YYSYMBOL_SWAPS_SYM = 700, /* SWAPS_SYM */
+ YYSYMBOL_SWITCHES_SYM = 701, /* SWITCHES_SYM */
+ YYSYMBOL_SYSTEM = 702, /* SYSTEM */
+ YYSYMBOL_SYSTEM_TIME_SYM = 703, /* SYSTEM_TIME_SYM */
+ YYSYMBOL_TABLES = 704, /* TABLES */
+ YYSYMBOL_TABLESPACE = 705, /* TABLESPACE */
+ YYSYMBOL_TABLE_CHECKSUM_SYM = 706, /* TABLE_CHECKSUM_SYM */
+ YYSYMBOL_TABLE_NAME_SYM = 707, /* TABLE_NAME_SYM */
+ YYSYMBOL_TEMPORARY = 708, /* TEMPORARY */
+ YYSYMBOL_TEMPTABLE_SYM = 709, /* TEMPTABLE_SYM */
+ YYSYMBOL_TEXT_SYM = 710, /* TEXT_SYM */
+ YYSYMBOL_THAN_SYM = 711, /* THAN_SYM */
+ YYSYMBOL_TIES_SYM = 712, /* TIES_SYM */
+ YYSYMBOL_TIMESTAMP = 713, /* TIMESTAMP */
+ YYSYMBOL_TIMESTAMP_ADD = 714, /* TIMESTAMP_ADD */
+ YYSYMBOL_TIMESTAMP_DIFF = 715, /* TIMESTAMP_DIFF */
+ YYSYMBOL_TIME_SYM = 716, /* TIME_SYM */
+ YYSYMBOL_TRANSACTION_SYM = 717, /* TRANSACTION_SYM */
+ YYSYMBOL_TRANSACTIONAL_SYM = 718, /* TRANSACTIONAL_SYM */
+ YYSYMBOL_THREADS_SYM = 719, /* THREADS_SYM */
+ YYSYMBOL_TRIGGERS_SYM = 720, /* TRIGGERS_SYM */
+ YYSYMBOL_TRIM_ORACLE = 721, /* TRIM_ORACLE */
+ YYSYMBOL_TRUNCATE_SYM = 722, /* TRUNCATE_SYM */
+ YYSYMBOL_TYPE_SYM = 723, /* TYPE_SYM */
+ YYSYMBOL_UDF_RETURNS_SYM = 724, /* UDF_RETURNS_SYM */
+ YYSYMBOL_UNBOUNDED_SYM = 725, /* UNBOUNDED_SYM */
+ YYSYMBOL_UNCOMMITTED_SYM = 726, /* UNCOMMITTED_SYM */
+ YYSYMBOL_UNDEFINED_SYM = 727, /* UNDEFINED_SYM */
+ YYSYMBOL_UNDOFILE_SYM = 728, /* UNDOFILE_SYM */
+ YYSYMBOL_UNDO_BUFFER_SIZE_SYM = 729, /* UNDO_BUFFER_SIZE_SYM */
+ YYSYMBOL_UNICODE_SYM = 730, /* UNICODE_SYM */
+ YYSYMBOL_UNINSTALL_SYM = 731, /* UNINSTALL_SYM */
+ YYSYMBOL_UNKNOWN_SYM = 732, /* UNKNOWN_SYM */
+ YYSYMBOL_UNTIL_SYM = 733, /* UNTIL_SYM */
+ YYSYMBOL_UPGRADE_SYM = 734, /* UPGRADE_SYM */
+ YYSYMBOL_USER_SYM = 735, /* USER_SYM */
+ YYSYMBOL_USE_FRM = 736, /* USE_FRM */
+ YYSYMBOL_VALUE_SYM = 737, /* VALUE_SYM */
+ YYSYMBOL_VARCHAR2_MARIADB_SYM = 738, /* VARCHAR2_MARIADB_SYM */
+ YYSYMBOL_VARCHAR2_ORACLE_SYM = 739, /* VARCHAR2_ORACLE_SYM */
+ YYSYMBOL_VARIABLES = 740, /* VARIABLES */
+ YYSYMBOL_VERSIONING_SYM = 741, /* VERSIONING_SYM */
+ YYSYMBOL_VIA_SYM = 742, /* VIA_SYM */
+ YYSYMBOL_VIEW_SYM = 743, /* VIEW_SYM */
+ YYSYMBOL_VISIBLE_SYM = 744, /* VISIBLE_SYM */
+ YYSYMBOL_VIRTUAL_SYM = 745, /* VIRTUAL_SYM */
+ YYSYMBOL_WAIT_SYM = 746, /* WAIT_SYM */
+ YYSYMBOL_WARNINGS = 747, /* WARNINGS */
+ YYSYMBOL_WEEK_SYM = 748, /* WEEK_SYM */
+ YYSYMBOL_WEIGHT_STRING_SYM = 749, /* WEIGHT_STRING_SYM */
+ YYSYMBOL_WINDOW_SYM = 750, /* WINDOW_SYM */
+ YYSYMBOL_WITHIN = 751, /* WITHIN */
+ YYSYMBOL_WITHOUT = 752, /* WITHOUT */
+ YYSYMBOL_WORK_SYM = 753, /* WORK_SYM */
+ YYSYMBOL_WRAPPER_SYM = 754, /* WRAPPER_SYM */
+ YYSYMBOL_WRITE_SYM = 755, /* WRITE_SYM */
+ YYSYMBOL_X509_SYM = 756, /* X509_SYM */
+ YYSYMBOL_XA_SYM = 757, /* XA_SYM */
+ YYSYMBOL_XML_SYM = 758, /* XML_SYM */
+ YYSYMBOL_YEAR_SYM = 759, /* YEAR_SYM */
+ YYSYMBOL_CONDITIONLESS_JOIN = 760, /* CONDITIONLESS_JOIN */
+ YYSYMBOL_ON_SYM = 761, /* ON_SYM */
+ YYSYMBOL_PREC_BELOW_NOT = 762, /* PREC_BELOW_NOT */
+ YYSYMBOL_763_ = 763, /* '=' */
+ YYSYMBOL_764_ = 764, /* '>' */
+ YYSYMBOL_765_ = 765, /* '<' */
+ YYSYMBOL_766_ = 766, /* '|' */
+ YYSYMBOL_767_ = 767, /* '&' */
+ YYSYMBOL_768_ = 768, /* '-' */
+ YYSYMBOL_769_ = 769, /* '+' */
+ YYSYMBOL_770_ = 770, /* '*' */
+ YYSYMBOL_771_ = 771, /* '/' */
+ YYSYMBOL_772_ = 772, /* '%' */
+ YYSYMBOL_773_ = 773, /* '^' */
+ YYSYMBOL_774_ = 774, /* '~' */
+ YYSYMBOL_SUBQUERY_AS_EXPR = 775, /* SUBQUERY_AS_EXPR */
+ YYSYMBOL_PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE = 776, /* PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE */
+ YYSYMBOL_USER = 777, /* USER */
+ YYSYMBOL_PREC_BELOW_CONTRACTION_TOKEN2 = 778, /* PREC_BELOW_CONTRACTION_TOKEN2 */
+ YYSYMBOL_779_ = 779, /* '(' */
+ YYSYMBOL_780_ = 780, /* ')' */
+ YYSYMBOL_EMPTY_FROM_CLAUSE = 781, /* EMPTY_FROM_CLAUSE */
+ YYSYMBOL_782_ = 782, /* ',' */
+ YYSYMBOL_783_ = 783, /* '!' */
+ YYSYMBOL_784_ = 784, /* '{' */
+ YYSYMBOL_785_ = 785, /* '}' */
+ YYSYMBOL_786_ = 786, /* ';' */
+ YYSYMBOL_787_ = 787, /* '.' */
+ YYSYMBOL_788_ = 788, /* ':' */
+ YYSYMBOL_YYACCEPT = 789, /* $accept */
+ YYSYMBOL_query = 790, /* query */
+ YYSYMBOL_791_1 = 791, /* $@1 */
+ YYSYMBOL_opt_end_of_input = 792, /* opt_end_of_input */
+ YYSYMBOL_directly_executable_statement = 793, /* directly_executable_statement */
+ YYSYMBOL_verb_clause = 794, /* verb_clause */
+ YYSYMBOL_deallocate = 795, /* deallocate */
+ YYSYMBOL_deallocate_or_drop = 796, /* deallocate_or_drop */
+ YYSYMBOL_prepare = 797, /* prepare */
+ YYSYMBOL_798_2 = 798, /* $@2 */
+ YYSYMBOL_execute = 799, /* execute */
+ YYSYMBOL_800_3 = 800, /* $@3 */
+ YYSYMBOL_801_4 = 801, /* $@4 */
+ YYSYMBOL_execute_using = 802, /* execute_using */
+ YYSYMBOL_803_5 = 803, /* $@5 */
+ YYSYMBOL_execute_params = 804, /* execute_params */
+ YYSYMBOL_help = 805, /* help */
+ YYSYMBOL_806_6 = 806, /* $@6 */
+ YYSYMBOL_change = 807, /* change */
+ YYSYMBOL_808_7 = 808, /* $@7 */
+ YYSYMBOL_master_defs = 809, /* master_defs */
+ YYSYMBOL_master_def = 810, /* master_def */
+ YYSYMBOL_ignore_server_id_list = 811, /* ignore_server_id_list */
+ YYSYMBOL_ignore_server_id = 812, /* ignore_server_id */
+ YYSYMBOL_do_domain_id_list = 813, /* do_domain_id_list */
+ YYSYMBOL_do_domain_id = 814, /* do_domain_id */
+ YYSYMBOL_ignore_domain_id_list = 815, /* ignore_domain_id_list */
+ YYSYMBOL_ignore_domain_id = 816, /* ignore_domain_id */
+ YYSYMBOL_master_file_def = 817, /* master_file_def */
+ YYSYMBOL_optional_connection_name = 818, /* optional_connection_name */
+ YYSYMBOL_connection_name = 819, /* connection_name */
+ YYSYMBOL_optional_for_channel = 820, /* optional_for_channel */
+ YYSYMBOL_for_channel = 821, /* for_channel */
+ YYSYMBOL_create = 822, /* create */
+ YYSYMBOL_823_8 = 823, /* $@8 */
+ YYSYMBOL_824_9 = 824, /* $@9 */
+ YYSYMBOL_825_10 = 825, /* $@10 */
+ YYSYMBOL_826_11 = 826, /* $@11 */
+ YYSYMBOL_827_12 = 827, /* $@12 */
+ YYSYMBOL_828_13 = 828, /* $@13 */
+ YYSYMBOL_829_14 = 829, /* $@14 */
+ YYSYMBOL_830_15 = 830, /* $@15 */
+ YYSYMBOL_831_16 = 831, /* $@16 */
+ YYSYMBOL_832_17 = 832, /* $@17 */
+ YYSYMBOL_833_18 = 833, /* $@18 */
+ YYSYMBOL_834_19 = 834, /* $@19 */
+ YYSYMBOL_835_20 = 835, /* $@20 */
+ YYSYMBOL_836_21 = 836, /* $@21 */
+ YYSYMBOL_837_22 = 837, /* $@22 */
+ YYSYMBOL_838_23 = 838, /* $@23 */
+ YYSYMBOL_839_24 = 839, /* $@24 */
+ YYSYMBOL_opt_sequence = 840, /* opt_sequence */
+ YYSYMBOL_sequence_defs = 841, /* sequence_defs */
+ YYSYMBOL_sequence_def = 842, /* sequence_def */
+ YYSYMBOL_force_lookahead = 843, /* force_lookahead */
+ YYSYMBOL_server_def = 844, /* server_def */
+ YYSYMBOL_845_25 = 845, /* $@25 */
+ YYSYMBOL_server_options_list = 846, /* server_options_list */
+ YYSYMBOL_server_option = 847, /* server_option */
+ YYSYMBOL_event_tail = 848, /* event_tail */
+ YYSYMBOL_849_26 = 849, /* $@26 */
+ YYSYMBOL_ev_schedule_time = 850, /* ev_schedule_time */
+ YYSYMBOL_851_27 = 851, /* $@27 */
+ YYSYMBOL_opt_ev_status = 852, /* opt_ev_status */
+ YYSYMBOL_ev_starts = 853, /* ev_starts */
+ YYSYMBOL_ev_ends = 854, /* ev_ends */
+ YYSYMBOL_opt_ev_on_completion = 855, /* opt_ev_on_completion */
+ YYSYMBOL_ev_on_completion = 856, /* ev_on_completion */
+ YYSYMBOL_opt_ev_comment = 857, /* opt_ev_comment */
+ YYSYMBOL_ev_sql_stmt = 858, /* ev_sql_stmt */
+ YYSYMBOL_859_28 = 859, /* $@28 */
+ YYSYMBOL_clear_privileges = 860, /* clear_privileges */
+ YYSYMBOL_opt_aggregate = 861, /* opt_aggregate */
+ YYSYMBOL_sp_handler = 862, /* sp_handler */
+ YYSYMBOL_sp_name = 863, /* sp_name */
+ YYSYMBOL_sp_a_chistics = 864, /* sp_a_chistics */
+ YYSYMBOL_sp_c_chistics = 865, /* sp_c_chistics */
+ YYSYMBOL_sp_chistic = 866, /* sp_chistic */
+ YYSYMBOL_sp_c_chistic = 867, /* sp_c_chistic */
+ YYSYMBOL_sp_suid = 868, /* sp_suid */
+ YYSYMBOL_call = 869, /* call */
+ YYSYMBOL_870_29 = 870, /* $@29 */
+ YYSYMBOL_871_30 = 871, /* $@30 */
+ YYSYMBOL_872_31 = 872, /* $@31 */
+ YYSYMBOL_opt_sp_cparam_list = 873, /* opt_sp_cparam_list */
+ YYSYMBOL_opt_sp_cparams = 874, /* opt_sp_cparams */
+ YYSYMBOL_sp_cparams = 875, /* sp_cparams */
+ YYSYMBOL_sp_fdparam_list = 876, /* sp_fdparam_list */
+ YYSYMBOL_877_32 = 877, /* $@32 */
+ YYSYMBOL_sp_fdparams = 878, /* sp_fdparams */
+ YYSYMBOL_sp_param_name = 879, /* sp_param_name */
+ YYSYMBOL_sp_pdparam_list = 880, /* sp_pdparam_list */
+ YYSYMBOL_sp_pdparams = 881, /* sp_pdparams */
+ YYSYMBOL_sp_parameter_type = 882, /* sp_parameter_type */
+ YYSYMBOL_sp_parenthesized_pdparam_list = 883, /* sp_parenthesized_pdparam_list */
+ YYSYMBOL_884_33 = 884, /* $@33 */
+ YYSYMBOL_sp_parenthesized_fdparam_list = 885, /* sp_parenthesized_fdparam_list */
+ YYSYMBOL_sp_proc_stmts = 886, /* sp_proc_stmts */
+ YYSYMBOL_sp_proc_stmts1 = 887, /* sp_proc_stmts1 */
+ YYSYMBOL_optionally_qualified_column_ident = 888, /* optionally_qualified_column_ident */
+ YYSYMBOL_row_field_definition = 889, /* row_field_definition */
+ YYSYMBOL_row_field_definition_list = 890, /* row_field_definition_list */
+ YYSYMBOL_row_type_body = 891, /* row_type_body */
+ YYSYMBOL_sp_decl_idents_init_vars = 892, /* sp_decl_idents_init_vars */
+ YYSYMBOL_sp_decl_variable_list = 893, /* sp_decl_variable_list */
+ YYSYMBOL_894_34 = 894, /* $@34 */
+ YYSYMBOL_sp_decl_handler = 895, /* sp_decl_handler */
+ YYSYMBOL_896_35 = 896, /* $@35 */
+ YYSYMBOL_opt_parenthesized_cursor_formal_parameters = 897, /* opt_parenthesized_cursor_formal_parameters */
+ YYSYMBOL_sp_cursor_stmt_lex = 898, /* sp_cursor_stmt_lex */
+ YYSYMBOL_sp_cursor_stmt = 899, /* sp_cursor_stmt */
+ YYSYMBOL_900_36 = 900, /* $@36 */
+ YYSYMBOL_sp_handler_type = 901, /* sp_handler_type */
+ YYSYMBOL_sp_hcond_list = 902, /* sp_hcond_list */
+ YYSYMBOL_sp_hcond_element = 903, /* sp_hcond_element */
+ YYSYMBOL_sp_cond = 904, /* sp_cond */
+ YYSYMBOL_sqlstate = 905, /* sqlstate */
+ YYSYMBOL_opt_value = 906, /* opt_value */
+ YYSYMBOL_sp_hcond = 907, /* sp_hcond */
+ YYSYMBOL_raise_stmt_oracle = 908, /* raise_stmt_oracle */
+ YYSYMBOL_signal_stmt = 909, /* signal_stmt */
+ YYSYMBOL_signal_value = 910, /* signal_value */
+ YYSYMBOL_opt_signal_value = 911, /* opt_signal_value */
+ YYSYMBOL_opt_set_signal_information = 912, /* opt_set_signal_information */
+ YYSYMBOL_signal_information_item_list = 913, /* signal_information_item_list */
+ YYSYMBOL_signal_allowed_expr = 914, /* signal_allowed_expr */
+ YYSYMBOL_signal_condition_information_item_name = 915, /* signal_condition_information_item_name */
+ YYSYMBOL_resignal_stmt = 916, /* resignal_stmt */
+ YYSYMBOL_get_diagnostics = 917, /* get_diagnostics */
+ YYSYMBOL_which_area = 918, /* which_area */
+ YYSYMBOL_diagnostics_information = 919, /* diagnostics_information */
+ YYSYMBOL_statement_information = 920, /* statement_information */
+ YYSYMBOL_statement_information_item = 921, /* statement_information_item */
+ YYSYMBOL_simple_target_specification = 922, /* simple_target_specification */
+ YYSYMBOL_statement_information_item_name = 923, /* statement_information_item_name */
+ YYSYMBOL_condition_number = 924, /* condition_number */
+ YYSYMBOL_condition_information = 925, /* condition_information */
+ YYSYMBOL_condition_information_item = 926, /* condition_information_item */
+ YYSYMBOL_condition_information_item_name = 927, /* condition_information_item_name */
+ YYSYMBOL_sp_decl_ident = 928, /* sp_decl_ident */
+ YYSYMBOL_sp_decl_idents = 929, /* sp_decl_idents */
+ YYSYMBOL_sp_proc_stmt_if = 930, /* sp_proc_stmt_if */
+ YYSYMBOL_931_37 = 931, /* $@37 */
+ YYSYMBOL_sp_proc_stmt_statement = 932, /* sp_proc_stmt_statement */
+ YYSYMBOL_933_38 = 933, /* $@38 */
+ YYSYMBOL_RETURN_ALLMODES_SYM = 934, /* RETURN_ALLMODES_SYM */
+ YYSYMBOL_sp_proc_stmt_return = 935, /* sp_proc_stmt_return */
+ YYSYMBOL_936_39 = 936, /* $@39 */
+ YYSYMBOL_sp_proc_stmt_exit_oracle = 937, /* sp_proc_stmt_exit_oracle */
+ YYSYMBOL_938_40 = 938, /* $@40 */
+ YYSYMBOL_939_41 = 939, /* $@41 */
+ YYSYMBOL_sp_proc_stmt_continue_oracle = 940, /* sp_proc_stmt_continue_oracle */
+ YYSYMBOL_941_42 = 941, /* $@42 */
+ YYSYMBOL_942_43 = 942, /* $@43 */
+ YYSYMBOL_sp_proc_stmt_leave = 943, /* sp_proc_stmt_leave */
+ YYSYMBOL_sp_proc_stmt_iterate = 944, /* sp_proc_stmt_iterate */
+ YYSYMBOL_sp_proc_stmt_goto_oracle = 945, /* sp_proc_stmt_goto_oracle */
+ YYSYMBOL_expr_lex = 946, /* expr_lex */
+ YYSYMBOL_947_44 = 947, /* @44 */
+ YYSYMBOL_assignment_source_lex = 948, /* assignment_source_lex */
+ YYSYMBOL_assignment_source_expr = 949, /* assignment_source_expr */
+ YYSYMBOL_950_45 = 950, /* $@45 */
+ YYSYMBOL_for_loop_bound_expr = 951, /* for_loop_bound_expr */
+ YYSYMBOL_952_46 = 952, /* $@46 */
+ YYSYMBOL_cursor_actual_parameters = 953, /* cursor_actual_parameters */
+ YYSYMBOL_opt_parenthesized_cursor_actual_parameters = 954, /* opt_parenthesized_cursor_actual_parameters */
+ YYSYMBOL_sp_proc_stmt_with_cursor = 955, /* sp_proc_stmt_with_cursor */
+ YYSYMBOL_sp_proc_stmt_open = 956, /* sp_proc_stmt_open */
+ YYSYMBOL_sp_proc_stmt_fetch_head = 957, /* sp_proc_stmt_fetch_head */
+ YYSYMBOL_sp_proc_stmt_fetch = 958, /* sp_proc_stmt_fetch */
+ YYSYMBOL_sp_proc_stmt_close = 959, /* sp_proc_stmt_close */
+ YYSYMBOL_sp_fetch_list = 960, /* sp_fetch_list */
+ YYSYMBOL_sp_if = 961, /* sp_if */
+ YYSYMBOL_962_47 = 962, /* $@47 */
+ YYSYMBOL_963_48 = 963, /* $@48 */
+ YYSYMBOL_sp_elseifs = 964, /* sp_elseifs */
+ YYSYMBOL_case_stmt_specification = 965, /* case_stmt_specification */
+ YYSYMBOL_966_49 = 966, /* $@49 */
+ YYSYMBOL_case_stmt_body = 967, /* case_stmt_body */
+ YYSYMBOL_968_50 = 968, /* $@50 */
+ YYSYMBOL_simple_when_clause_list = 969, /* simple_when_clause_list */
+ YYSYMBOL_searched_when_clause_list = 970, /* searched_when_clause_list */
+ YYSYMBOL_simple_when_clause = 971, /* simple_when_clause */
+ YYSYMBOL_972_51 = 972, /* $@51 */
+ YYSYMBOL_searched_when_clause = 973, /* searched_when_clause */
+ YYSYMBOL_974_52 = 974, /* $@52 */
+ YYSYMBOL_else_clause_opt = 975, /* else_clause_opt */
+ YYSYMBOL_sp_opt_label = 976, /* sp_opt_label */
+ YYSYMBOL_opt_sp_for_loop_direction = 977, /* opt_sp_for_loop_direction */
+ YYSYMBOL_sp_for_loop_index_and_bounds = 978, /* sp_for_loop_index_and_bounds */
+ YYSYMBOL_sp_for_loop_bounds = 979, /* sp_for_loop_bounds */
+ YYSYMBOL_loop_body = 980, /* loop_body */
+ YYSYMBOL_repeat_body = 981, /* repeat_body */
+ YYSYMBOL_pop_sp_loop_label = 982, /* pop_sp_loop_label */
+ YYSYMBOL_sp_labeled_control = 983, /* sp_labeled_control */
+ YYSYMBOL_984_53 = 984, /* $@53 */
+ YYSYMBOL_985_54 = 985, /* $@54 */
+ YYSYMBOL_986_55 = 986, /* $@55 */
+ YYSYMBOL_987_56 = 987, /* $@56 */
+ YYSYMBOL_988_57 = 988, /* $@57 */
+ YYSYMBOL_989_58 = 989, /* $@58 */
+ YYSYMBOL_sp_unlabeled_control = 990, /* sp_unlabeled_control */
+ YYSYMBOL_991_59 = 991, /* $@59 */
+ YYSYMBOL_992_60 = 992, /* $@60 */
+ YYSYMBOL_993_61 = 993, /* $@61 */
+ YYSYMBOL_994_62 = 994, /* $@62 */
+ YYSYMBOL_995_63 = 995, /* $@63 */
+ YYSYMBOL_trg_action_time = 996, /* trg_action_time */
+ YYSYMBOL_trg_event = 997, /* trg_event */
+ YYSYMBOL_create_body = 998, /* create_body */
+ YYSYMBOL_999_64 = 999, /* $@64 */
+ YYSYMBOL_create_like = 1000, /* create_like */
+ YYSYMBOL_opt_create_select = 1001, /* opt_create_select */
+ YYSYMBOL_create_select_query_expression = 1002, /* create_select_query_expression */
+ YYSYMBOL_opt_create_partitioning = 1003, /* opt_create_partitioning */
+ YYSYMBOL_opt_partitioning = 1004, /* opt_partitioning */
+ YYSYMBOL_partitioning = 1005, /* partitioning */
+ YYSYMBOL_1006_65 = 1006, /* $@65 */
+ YYSYMBOL_have_partitioning = 1007, /* have_partitioning */
+ YYSYMBOL_partition_entry = 1008, /* partition_entry */
+ YYSYMBOL_1009_66 = 1009, /* $@66 */
+ YYSYMBOL_partition = 1010, /* partition */
+ YYSYMBOL_1011_67 = 1011, /* $@67 */
+ YYSYMBOL_part_type_def = 1012, /* part_type_def */
+ YYSYMBOL_1013_68 = 1013, /* $@68 */
+ YYSYMBOL_1014_69 = 1014, /* $@69 */
+ YYSYMBOL_1015_70 = 1015, /* $@70 */
+ YYSYMBOL_opt_linear = 1016, /* opt_linear */
+ YYSYMBOL_opt_key_algo = 1017, /* opt_key_algo */
+ YYSYMBOL_part_field_list = 1018, /* part_field_list */
+ YYSYMBOL_part_field_item_list = 1019, /* part_field_item_list */
+ YYSYMBOL_part_field_item = 1020, /* part_field_item */
+ YYSYMBOL_part_column_list = 1021, /* part_column_list */
+ YYSYMBOL_part_func = 1022, /* part_func */
+ YYSYMBOL_sub_part_func = 1023, /* sub_part_func */
+ YYSYMBOL_opt_num_parts = 1024, /* opt_num_parts */
+ YYSYMBOL_opt_sub_part = 1025, /* opt_sub_part */
+ YYSYMBOL_1026_71 = 1026, /* $@71 */
+ YYSYMBOL_1027_72 = 1027, /* $@72 */
+ YYSYMBOL_sub_part_field_list = 1028, /* sub_part_field_list */
+ YYSYMBOL_sub_part_field_item = 1029, /* sub_part_field_item */
+ YYSYMBOL_part_func_expr = 1030, /* part_func_expr */
+ YYSYMBOL_opt_num_subparts = 1031, /* opt_num_subparts */
+ YYSYMBOL_part_defs = 1032, /* part_defs */
+ YYSYMBOL_part_def_list = 1033, /* part_def_list */
+ YYSYMBOL_opt_partition = 1034, /* opt_partition */
+ YYSYMBOL_part_definition = 1035, /* part_definition */
+ YYSYMBOL_1036_73 = 1036, /* $@73 */
+ YYSYMBOL_part_name = 1037, /* part_name */
+ YYSYMBOL_opt_part_values = 1038, /* opt_part_values */
+ YYSYMBOL_1039_74 = 1039, /* $@74 */
+ YYSYMBOL_1040_75 = 1040, /* $@75 */
+ YYSYMBOL_part_func_max = 1041, /* part_func_max */
+ YYSYMBOL_part_values_in = 1042, /* part_values_in */
+ YYSYMBOL_part_value_list = 1043, /* part_value_list */
+ YYSYMBOL_part_value_item = 1044, /* part_value_item */
+ YYSYMBOL_1045_76 = 1045, /* $@76 */
+ YYSYMBOL_1046_77 = 1046, /* $@77 */
+ YYSYMBOL_part_value_item_list = 1047, /* part_value_item_list */
+ YYSYMBOL_part_value_expr_item = 1048, /* part_value_expr_item */
+ YYSYMBOL_opt_sub_partition = 1049, /* opt_sub_partition */
+ YYSYMBOL_sub_part_list = 1050, /* sub_part_list */
+ YYSYMBOL_sub_part_definition = 1051, /* sub_part_definition */
+ YYSYMBOL_1052_78 = 1052, /* $@78 */
+ YYSYMBOL_sub_name = 1053, /* sub_name */
+ YYSYMBOL_opt_part_options = 1054, /* opt_part_options */
+ YYSYMBOL_part_option_list = 1055, /* part_option_list */
+ YYSYMBOL_part_option = 1056, /* part_option */
+ YYSYMBOL_opt_subpart_options = 1057, /* opt_subpart_options */
+ YYSYMBOL_subpart_option_list = 1058, /* subpart_option_list */
+ YYSYMBOL_server_part_option = 1059, /* server_part_option */
+ YYSYMBOL_opt_versioning_rotation = 1060, /* opt_versioning_rotation */
+ YYSYMBOL_1061_79 = 1061, /* $@79 */
+ YYSYMBOL_opt_versioning_interval_start = 1062, /* opt_versioning_interval_start */
+ YYSYMBOL_opt_vers_auto_part = 1063, /* opt_vers_auto_part */
+ YYSYMBOL_opt_as = 1064, /* opt_as */
+ YYSYMBOL_opt_create_database_options = 1065, /* opt_create_database_options */
+ YYSYMBOL_create_database_options = 1066, /* create_database_options */
+ YYSYMBOL_create_database_option = 1067, /* create_database_option */
+ YYSYMBOL_opt_if_not_exists_table_element = 1068, /* opt_if_not_exists_table_element */
+ YYSYMBOL_opt_if_not_exists = 1069, /* opt_if_not_exists */
+ YYSYMBOL_create_or_replace = 1070, /* create_or_replace */
+ YYSYMBOL_opt_create_table_options = 1071, /* opt_create_table_options */
+ YYSYMBOL_create_table_options_space_separated = 1072, /* create_table_options_space_separated */
+ YYSYMBOL_create_table_options = 1073, /* create_table_options */
+ YYSYMBOL_create_table_option = 1074, /* create_table_option */
+ YYSYMBOL_1075_80 = 1075, /* $@80 */
+ YYSYMBOL_engine_defined_option = 1076, /* engine_defined_option */
+ YYSYMBOL_opt_versioning_option = 1077, /* opt_versioning_option */
+ YYSYMBOL_versioning_option = 1078, /* versioning_option */
+ YYSYMBOL_default_charset = 1079, /* default_charset */
+ YYSYMBOL_default_collation = 1080, /* default_collation */
+ YYSYMBOL_storage_engines = 1081, /* storage_engines */
+ YYSYMBOL_known_storage_engines = 1082, /* known_storage_engines */
+ YYSYMBOL_row_types = 1083, /* row_types */
+ YYSYMBOL_merge_insert_types = 1084, /* merge_insert_types */
+ YYSYMBOL_udf_type = 1085, /* udf_type */
+ YYSYMBOL_create_field_list = 1086, /* create_field_list */
+ YYSYMBOL_create_field_list_parens = 1087, /* create_field_list_parens */
+ YYSYMBOL_field_list = 1088, /* field_list */
+ YYSYMBOL_field_list_item = 1089, /* field_list_item */
+ YYSYMBOL_column_def = 1090, /* column_def */
+ YYSYMBOL_key_def = 1091, /* key_def */
+ YYSYMBOL_1092_81 = 1092, /* $@81 */
+ YYSYMBOL_1093_82 = 1093, /* $@82 */
+ YYSYMBOL_1094_83 = 1094, /* $@83 */
+ YYSYMBOL_1095_84 = 1095, /* $@84 */
+ YYSYMBOL_1096_85 = 1096, /* $@85 */
+ YYSYMBOL_1097_86 = 1097, /* $@86 */
+ YYSYMBOL_1098_87 = 1098, /* $@87 */
+ YYSYMBOL_constraint_def = 1099, /* constraint_def */
+ YYSYMBOL_period_for_system_time = 1100, /* period_for_system_time */
+ YYSYMBOL_period_for_application_time = 1101, /* period_for_application_time */
+ YYSYMBOL_opt_check_constraint = 1102, /* opt_check_constraint */
+ YYSYMBOL_check_constraint = 1103, /* check_constraint */
+ YYSYMBOL_opt_constraint_no_id = 1104, /* opt_constraint_no_id */
+ YYSYMBOL_opt_constraint = 1105, /* opt_constraint */
+ YYSYMBOL_constraint = 1106, /* constraint */
+ YYSYMBOL_field_spec = 1107, /* field_spec */
+ YYSYMBOL_1108_88 = 1108, /* @88 */
+ YYSYMBOL_field_type_or_serial = 1109, /* field_type_or_serial */
+ YYSYMBOL_1110_89 = 1110, /* $@89 */
+ YYSYMBOL_1111_90 = 1111, /* $@90 */
+ YYSYMBOL_opt_serial_attribute = 1112, /* opt_serial_attribute */
+ YYSYMBOL_opt_serial_attribute_list = 1113, /* opt_serial_attribute_list */
+ YYSYMBOL_opt_asrow_attribute = 1114, /* opt_asrow_attribute */
+ YYSYMBOL_opt_asrow_attribute_list = 1115, /* opt_asrow_attribute_list */
+ YYSYMBOL_field_def = 1116, /* field_def */
+ YYSYMBOL_1117_91 = 1117, /* $@91 */
+ YYSYMBOL_opt_generated_always = 1118, /* opt_generated_always */
+ YYSYMBOL_vcol_opt_specifier = 1119, /* vcol_opt_specifier */
+ YYSYMBOL_vcol_opt_attribute = 1120, /* vcol_opt_attribute */
+ YYSYMBOL_vcol_opt_attribute_list = 1121, /* vcol_opt_attribute_list */
+ YYSYMBOL_vcol_attribute = 1122, /* vcol_attribute */
+ YYSYMBOL_parse_vcol_expr = 1123, /* parse_vcol_expr */
+ YYSYMBOL_1124_92 = 1124, /* $@92 */
+ YYSYMBOL_parenthesized_expr = 1125, /* parenthesized_expr */
+ YYSYMBOL_virtual_column_func = 1126, /* virtual_column_func */
+ YYSYMBOL_expr_or_literal = 1127, /* expr_or_literal */
+ YYSYMBOL_column_default_expr = 1128, /* column_default_expr */
+ YYSYMBOL_field_type = 1129, /* field_type */
+ YYSYMBOL_qualified_field_type = 1130, /* qualified_field_type */
+ YYSYMBOL_udt_name = 1131, /* udt_name */
+ YYSYMBOL_field_type_all = 1132, /* field_type_all */
+ YYSYMBOL_field_type_numeric = 1133, /* field_type_numeric */
+ YYSYMBOL_opt_binary_and_compression = 1134, /* opt_binary_and_compression */
+ YYSYMBOL_field_type_string = 1135, /* field_type_string */
+ YYSYMBOL_field_type_temporal = 1136, /* field_type_temporal */
+ YYSYMBOL_field_type_lob = 1137, /* field_type_lob */
+ YYSYMBOL_field_type_misc = 1138, /* field_type_misc */
+ YYSYMBOL_char = 1139, /* char */
+ YYSYMBOL_nchar = 1140, /* nchar */
+ YYSYMBOL_varchar = 1141, /* varchar */
+ YYSYMBOL_nvarchar = 1142, /* nvarchar */
+ YYSYMBOL_int_type = 1143, /* int_type */
+ YYSYMBOL_real_type = 1144, /* real_type */
+ YYSYMBOL_srid_option = 1145, /* srid_option */
+ YYSYMBOL_float_options = 1146, /* float_options */
+ YYSYMBOL_precision = 1147, /* precision */
+ YYSYMBOL_field_options = 1148, /* field_options */
+ YYSYMBOL_last_field_options = 1149, /* last_field_options */
+ YYSYMBOL_field_length_str = 1150, /* field_length_str */
+ YYSYMBOL_field_length = 1151, /* field_length */
+ YYSYMBOL_field_scale = 1152, /* field_scale */
+ YYSYMBOL_opt_field_length = 1153, /* opt_field_length */
+ YYSYMBOL_opt_field_scale = 1154, /* opt_field_scale */
+ YYSYMBOL_opt_precision = 1155, /* opt_precision */
+ YYSYMBOL_attribute_list = 1156, /* attribute_list */
+ YYSYMBOL_attribute = 1157, /* attribute */
+ YYSYMBOL_opt_compression_method = 1158, /* opt_compression_method */
+ YYSYMBOL_opt_compressed = 1159, /* opt_compressed */
+ YYSYMBOL_opt_enable = 1160, /* opt_enable */
+ YYSYMBOL_compressed = 1161, /* compressed */
+ YYSYMBOL_compressed_deprecated_data_type_attribute = 1162, /* compressed_deprecated_data_type_attribute */
+ YYSYMBOL_compressed_deprecated_column_attribute = 1163, /* compressed_deprecated_column_attribute */
+ YYSYMBOL_asrow_attribute = 1164, /* asrow_attribute */
+ YYSYMBOL_serial_attribute = 1165, /* serial_attribute */
+ YYSYMBOL_with_or_without_system = 1166, /* with_or_without_system */
+ YYSYMBOL_charset = 1167, /* charset */
+ YYSYMBOL_charset_name = 1168, /* charset_name */
+ YYSYMBOL_charset_name_or_default = 1169, /* charset_name_or_default */
+ YYSYMBOL_opt_load_data_charset = 1170, /* opt_load_data_charset */
+ YYSYMBOL_old_or_new_charset_name = 1171, /* old_or_new_charset_name */
+ YYSYMBOL_old_or_new_charset_name_or_default = 1172, /* old_or_new_charset_name_or_default */
+ YYSYMBOL_collation_name = 1173, /* collation_name */
+ YYSYMBOL_collation_name_or_default = 1174, /* collation_name_or_default */
+ YYSYMBOL_opt_default = 1175, /* opt_default */
+ YYSYMBOL_charset_or_alias = 1176, /* charset_or_alias */
+ YYSYMBOL_opt_binary = 1177, /* opt_binary */
+ YYSYMBOL_binary = 1178, /* binary */
+ YYSYMBOL_opt_bin_mod = 1179, /* opt_bin_mod */
+ YYSYMBOL_ws_nweights = 1180, /* ws_nweights */
+ YYSYMBOL_1181_93 = 1181, /* $@93 */
+ YYSYMBOL_ws_level_flag_desc = 1182, /* ws_level_flag_desc */
+ YYSYMBOL_ws_level_flag_reverse = 1183, /* ws_level_flag_reverse */
+ YYSYMBOL_ws_level_flags = 1184, /* ws_level_flags */
+ YYSYMBOL_ws_level_number = 1185, /* ws_level_number */
+ YYSYMBOL_ws_level_list_item = 1186, /* ws_level_list_item */
+ YYSYMBOL_ws_level_list = 1187, /* ws_level_list */
+ YYSYMBOL_ws_level_range = 1188, /* ws_level_range */
+ YYSYMBOL_ws_level_list_or_range = 1189, /* ws_level_list_or_range */
+ YYSYMBOL_opt_ws_levels = 1190, /* opt_ws_levels */
+ YYSYMBOL_opt_primary = 1191, /* opt_primary */
+ YYSYMBOL_references = 1192, /* references */
+ YYSYMBOL_opt_ref_list = 1193, /* opt_ref_list */
+ YYSYMBOL_ref_list = 1194, /* ref_list */
+ YYSYMBOL_opt_match_clause = 1195, /* opt_match_clause */
+ YYSYMBOL_opt_on_update_delete = 1196, /* opt_on_update_delete */
+ YYSYMBOL_delete_option = 1197, /* delete_option */
+ YYSYMBOL_constraint_key_type = 1198, /* constraint_key_type */
+ YYSYMBOL_key_or_index = 1199, /* key_or_index */
+ YYSYMBOL_opt_key_or_index = 1200, /* opt_key_or_index */
+ YYSYMBOL_keys_or_index = 1201, /* keys_or_index */
+ YYSYMBOL_fulltext = 1202, /* fulltext */
+ YYSYMBOL_spatial = 1203, /* spatial */
+ YYSYMBOL_normal_key_options = 1204, /* normal_key_options */
+ YYSYMBOL_fulltext_key_options = 1205, /* fulltext_key_options */
+ YYSYMBOL_spatial_key_options = 1206, /* spatial_key_options */
+ YYSYMBOL_normal_key_opts = 1207, /* normal_key_opts */
+ YYSYMBOL_spatial_key_opts = 1208, /* spatial_key_opts */
+ YYSYMBOL_fulltext_key_opts = 1209, /* fulltext_key_opts */
+ YYSYMBOL_opt_USING_key_algorithm = 1210, /* opt_USING_key_algorithm */
+ YYSYMBOL_opt_key_algorithm_clause = 1211, /* opt_key_algorithm_clause */
+ YYSYMBOL_key_using_alg = 1212, /* key_using_alg */
+ YYSYMBOL_all_key_opt = 1213, /* all_key_opt */
+ YYSYMBOL_normal_key_opt = 1214, /* normal_key_opt */
+ YYSYMBOL_spatial_key_opt = 1215, /* spatial_key_opt */
+ YYSYMBOL_fulltext_key_opt = 1216, /* fulltext_key_opt */
+ YYSYMBOL_btree_or_rtree = 1217, /* btree_or_rtree */
+ YYSYMBOL_ignorability = 1218, /* ignorability */
+ YYSYMBOL_key_list = 1219, /* key_list */
+ YYSYMBOL_opt_without_overlaps = 1220, /* opt_without_overlaps */
+ YYSYMBOL_key_part = 1221, /* key_part */
+ YYSYMBOL_opt_ident = 1222, /* opt_ident */
+ YYSYMBOL_string_list = 1223, /* string_list */
+ YYSYMBOL_alter = 1224, /* alter */
+ YYSYMBOL_1225_94 = 1225, /* $@94 */
+ YYSYMBOL_1226_95 = 1226, /* $@95 */
+ YYSYMBOL_1227_96 = 1227, /* $@96 */
+ YYSYMBOL_1228_97 = 1228, /* $@97 */
+ YYSYMBOL_1229_98 = 1229, /* $@98 */
+ YYSYMBOL_1230_99 = 1230, /* $@99 */
+ YYSYMBOL_1231_100 = 1231, /* $@100 */
+ YYSYMBOL_1232_101 = 1232, /* $@101 */
+ YYSYMBOL_1233_102 = 1233, /* $@102 */
+ YYSYMBOL_1234_103 = 1234, /* $@103 */
+ YYSYMBOL_1235_104 = 1235, /* $@104 */
+ YYSYMBOL_1236_105 = 1236, /* $@105 */
+ YYSYMBOL_1237_106 = 1237, /* $@106 */
+ YYSYMBOL_account_locking_option = 1238, /* account_locking_option */
+ YYSYMBOL_opt_password_expire_option = 1239, /* opt_password_expire_option */
+ YYSYMBOL_opt_account_locking_and_opt_password_expiration = 1240, /* opt_account_locking_and_opt_password_expiration */
+ YYSYMBOL_ev_alter_on_schedule_completion = 1241, /* ev_alter_on_schedule_completion */
+ YYSYMBOL_opt_ev_rename_to = 1242, /* opt_ev_rename_to */
+ YYSYMBOL_opt_ev_sql_stmt = 1243, /* opt_ev_sql_stmt */
+ YYSYMBOL_ident_or_empty = 1244, /* ident_or_empty */
+ YYSYMBOL_alter_commands = 1245, /* alter_commands */
+ YYSYMBOL_1246_107 = 1246, /* $@107 */
+ YYSYMBOL_1247_108 = 1247, /* $@108 */
+ YYSYMBOL_1248_109 = 1248, /* $@109 */
+ YYSYMBOL_1249_110 = 1249, /* $@110 */
+ YYSYMBOL_remove_partitioning = 1250, /* remove_partitioning */
+ YYSYMBOL_all_or_alt_part_name_list = 1251, /* all_or_alt_part_name_list */
+ YYSYMBOL_add_partition_rule = 1252, /* add_partition_rule */
+ YYSYMBOL_1253_111 = 1253, /* $@111 */
+ YYSYMBOL_add_part_extra = 1254, /* add_part_extra */
+ YYSYMBOL_reorg_partition_rule = 1255, /* reorg_partition_rule */
+ YYSYMBOL_1256_112 = 1256, /* $@112 */
+ YYSYMBOL_reorg_parts_rule = 1257, /* reorg_parts_rule */
+ YYSYMBOL_1258_113 = 1258, /* $@113 */
+ YYSYMBOL_alt_part_name_list = 1259, /* alt_part_name_list */
+ YYSYMBOL_alt_part_name_item = 1260, /* alt_part_name_item */
+ YYSYMBOL_alter_list = 1261, /* alter_list */
+ YYSYMBOL_add_column = 1262, /* add_column */
+ YYSYMBOL_alter_list_item = 1263, /* alter_list_item */
+ YYSYMBOL_opt_index_lock_algorithm = 1264, /* opt_index_lock_algorithm */
+ YYSYMBOL_alter_algorithm_option = 1265, /* alter_algorithm_option */
+ YYSYMBOL_alter_lock_option = 1266, /* alter_lock_option */
+ YYSYMBOL_opt_column = 1267, /* opt_column */
+ YYSYMBOL_opt_ignore = 1268, /* opt_ignore */
+ YYSYMBOL_alter_options = 1269, /* alter_options */
+ YYSYMBOL_1270_114 = 1270, /* $@114 */
+ YYSYMBOL_alter_options_part2 = 1271, /* alter_options_part2 */
+ YYSYMBOL_alter_option_list = 1272, /* alter_option_list */
+ YYSYMBOL_alter_option = 1273, /* alter_option */
+ YYSYMBOL_opt_restrict = 1274, /* opt_restrict */
+ YYSYMBOL_opt_place = 1275, /* opt_place */
+ YYSYMBOL_opt_to = 1276, /* opt_to */
+ YYSYMBOL_slave = 1277, /* slave */
+ YYSYMBOL_1278_115 = 1278, /* $@115 */
+ YYSYMBOL_1279_116 = 1279, /* $@116 */
+ YYSYMBOL_start = 1280, /* start */
+ YYSYMBOL_opt_start_transaction_option_list = 1281, /* opt_start_transaction_option_list */
+ YYSYMBOL_start_transaction_option_list = 1282, /* start_transaction_option_list */
+ YYSYMBOL_start_transaction_option = 1283, /* start_transaction_option */
+ YYSYMBOL_slave_thread_opts = 1284, /* slave_thread_opts */
+ YYSYMBOL_1285_117 = 1285, /* $@117 */
+ YYSYMBOL_slave_thread_opt_list = 1286, /* slave_thread_opt_list */
+ YYSYMBOL_slave_thread_opt = 1287, /* slave_thread_opt */
+ YYSYMBOL_slave_until = 1288, /* slave_until */
+ YYSYMBOL_slave_until_opts = 1289, /* slave_until_opts */
+ YYSYMBOL_checksum = 1290, /* checksum */
+ YYSYMBOL_1291_118 = 1291, /* $@118 */
+ YYSYMBOL_opt_checksum_type = 1292, /* opt_checksum_type */
+ YYSYMBOL_repair_table_or_view = 1293, /* repair_table_or_view */
+ YYSYMBOL_1294_119 = 1294, /* $@119 */
+ YYSYMBOL_repair = 1295, /* repair */
+ YYSYMBOL_1296_120 = 1296, /* $@120 */
+ YYSYMBOL_opt_mi_repair_type = 1297, /* opt_mi_repair_type */
+ YYSYMBOL_mi_repair_types = 1298, /* mi_repair_types */
+ YYSYMBOL_mi_repair_type = 1299, /* mi_repair_type */
+ YYSYMBOL_opt_view_repair_type = 1300, /* opt_view_repair_type */
+ YYSYMBOL_analyze = 1301, /* analyze */
+ YYSYMBOL_1302_121 = 1302, /* $@121 */
+ YYSYMBOL_analyze_table_list = 1303, /* analyze_table_list */
+ YYSYMBOL_analyze_table_elem_spec = 1304, /* analyze_table_elem_spec */
+ YYSYMBOL_opt_persistent_stat_clause = 1305, /* opt_persistent_stat_clause */
+ YYSYMBOL_persistent_stat_spec = 1306, /* persistent_stat_spec */
+ YYSYMBOL_persistent_column_stat_spec = 1307, /* persistent_column_stat_spec */
+ YYSYMBOL_1308_122 = 1308, /* $@122 */
+ YYSYMBOL_persistent_index_stat_spec = 1309, /* persistent_index_stat_spec */
+ YYSYMBOL_1310_123 = 1310, /* $@123 */
+ YYSYMBOL_table_column_list = 1311, /* table_column_list */
+ YYSYMBOL_table_index_list = 1312, /* table_index_list */
+ YYSYMBOL_table_index_name = 1313, /* table_index_name */
+ YYSYMBOL_binlog_base64_event = 1314, /* binlog_base64_event */
+ YYSYMBOL_check_view_or_table = 1315, /* check_view_or_table */
+ YYSYMBOL_1316_124 = 1316, /* $@124 */
+ YYSYMBOL_check = 1317, /* check */
+ YYSYMBOL_1318_125 = 1318, /* $@125 */
+ YYSYMBOL_opt_mi_check_type = 1319, /* opt_mi_check_type */
+ YYSYMBOL_mi_check_types = 1320, /* mi_check_types */
+ YYSYMBOL_mi_check_type = 1321, /* mi_check_type */
+ YYSYMBOL_opt_view_check_type = 1322, /* opt_view_check_type */
+ YYSYMBOL_optimize = 1323, /* optimize */
+ YYSYMBOL_1324_126 = 1324, /* $@126 */
+ YYSYMBOL_opt_no_write_to_binlog = 1325, /* opt_no_write_to_binlog */
+ YYSYMBOL_rename = 1326, /* rename */
+ YYSYMBOL_1327_127 = 1327, /* $@127 */
+ YYSYMBOL_rename_list = 1328, /* rename_list */
+ YYSYMBOL_table_to_table_list = 1329, /* table_to_table_list */
+ YYSYMBOL_table_to_table = 1330, /* table_to_table */
+ YYSYMBOL_keycache = 1331, /* keycache */
+ YYSYMBOL_1332_128 = 1332, /* $@128 */
+ YYSYMBOL_keycache_list_or_parts = 1333, /* keycache_list_or_parts */
+ YYSYMBOL_keycache_list = 1334, /* keycache_list */
+ YYSYMBOL_assign_to_keycache = 1335, /* assign_to_keycache */
+ YYSYMBOL_assign_to_keycache_parts = 1336, /* assign_to_keycache_parts */
+ YYSYMBOL_key_cache_name = 1337, /* key_cache_name */
+ YYSYMBOL_preload = 1338, /* preload */
+ YYSYMBOL_1339_129 = 1339, /* $@129 */
+ YYSYMBOL_preload_list_or_parts = 1340, /* preload_list_or_parts */
+ YYSYMBOL_preload_list = 1341, /* preload_list */
+ YYSYMBOL_preload_keys = 1342, /* preload_keys */
+ YYSYMBOL_preload_keys_parts = 1343, /* preload_keys_parts */
+ YYSYMBOL_adm_partition = 1344, /* adm_partition */
+ YYSYMBOL_1345_130 = 1345, /* $@130 */
+ YYSYMBOL_cache_keys_spec = 1346, /* cache_keys_spec */
+ YYSYMBOL_1347_131 = 1347, /* $@131 */
+ YYSYMBOL_cache_key_list_or_empty = 1348, /* cache_key_list_or_empty */
+ YYSYMBOL_opt_ignore_leaves = 1349, /* opt_ignore_leaves */
+ YYSYMBOL_select = 1350, /* select */
+ YYSYMBOL_1351_132 = 1351, /* $@132 */
+ YYSYMBOL_1352_133 = 1352, /* $@133 */
+ YYSYMBOL_select_into = 1353, /* select_into */
+ YYSYMBOL_1354_134 = 1354, /* $@134 */
+ YYSYMBOL_1355_135 = 1355, /* $@135 */
+ YYSYMBOL_simple_table = 1356, /* simple_table */
+ YYSYMBOL_table_value_constructor = 1357, /* table_value_constructor */
+ YYSYMBOL_1358_136 = 1358, /* $@136 */
+ YYSYMBOL_query_specification_start = 1359, /* query_specification_start */
+ YYSYMBOL_1360_137 = 1360, /* $@137 */
+ YYSYMBOL_1361_138 = 1361, /* $@138 */
+ YYSYMBOL_query_specification = 1362, /* query_specification */
+ YYSYMBOL_select_into_query_specification = 1363, /* select_into_query_specification */
+ YYSYMBOL_query_expression = 1364, /* query_expression */
+ YYSYMBOL_query_expression_no_with_clause = 1365, /* query_expression_no_with_clause */
+ YYSYMBOL_query_expression_body_ext = 1366, /* query_expression_body_ext */
+ YYSYMBOL_1367_139 = 1367, /* $@139 */
+ YYSYMBOL_1368_140 = 1368, /* $@140 */
+ YYSYMBOL_query_expression_body_ext_parens = 1369, /* query_expression_body_ext_parens */
+ YYSYMBOL_query_expression_body = 1370, /* query_expression_body */
+ YYSYMBOL_1371_141 = 1371, /* $@141 */
+ YYSYMBOL_query_primary = 1372, /* query_primary */
+ YYSYMBOL_query_simple = 1373, /* query_simple */
+ YYSYMBOL_subselect = 1374, /* subselect */
+ YYSYMBOL_subquery = 1375, /* subquery */
+ YYSYMBOL_opt_from_clause = 1376, /* opt_from_clause */
+ YYSYMBOL_from_clause = 1377, /* from_clause */
+ YYSYMBOL_table_reference_list = 1378, /* table_reference_list */
+ YYSYMBOL_select_options = 1379, /* select_options */
+ YYSYMBOL_opt_history_unit = 1380, /* opt_history_unit */
+ YYSYMBOL_history_point = 1381, /* history_point */
+ YYSYMBOL_for_portion_of_time_clause = 1382, /* for_portion_of_time_clause */
+ YYSYMBOL_opt_for_portion_of_time_clause = 1383, /* opt_for_portion_of_time_clause */
+ YYSYMBOL_opt_for_system_time_clause = 1384, /* opt_for_system_time_clause */
+ YYSYMBOL_system_time_expr = 1385, /* system_time_expr */
+ YYSYMBOL_select_option_list = 1386, /* select_option_list */
+ YYSYMBOL_select_option = 1387, /* select_option */
+ YYSYMBOL_select_lock_type = 1388, /* select_lock_type */
+ YYSYMBOL_opt_select_lock_type = 1389, /* opt_select_lock_type */
+ YYSYMBOL_opt_lock_wait_timeout_new = 1390, /* opt_lock_wait_timeout_new */
+ YYSYMBOL_select_item_list = 1391, /* select_item_list */
+ YYSYMBOL_select_item = 1392, /* select_item */
+ YYSYMBOL_remember_tok_start = 1393, /* remember_tok_start */
+ YYSYMBOL_remember_name = 1394, /* remember_name */
+ YYSYMBOL_remember_end = 1395, /* remember_end */
+ YYSYMBOL_select_alias = 1396, /* select_alias */
+ YYSYMBOL_opt_default_time_precision = 1397, /* opt_default_time_precision */
+ YYSYMBOL_opt_time_precision = 1398, /* opt_time_precision */
+ YYSYMBOL_optional_braces = 1399, /* optional_braces */
+ YYSYMBOL_expr = 1400, /* expr */
+ YYSYMBOL_boolean_test = 1401, /* boolean_test */
+ YYSYMBOL_predicate = 1402, /* predicate */
+ YYSYMBOL_bit_expr = 1403, /* bit_expr */
+ YYSYMBOL_or = 1404, /* or */
+ YYSYMBOL_and = 1405, /* and */
+ YYSYMBOL_not = 1406, /* not */
+ YYSYMBOL_not2 = 1407, /* not2 */
+ YYSYMBOL_comp_op = 1408, /* comp_op */
+ YYSYMBOL_all_or_any = 1409, /* all_or_any */
+ YYSYMBOL_opt_dyncol_type = 1410, /* opt_dyncol_type */
+ YYSYMBOL_dyncol_type = 1411, /* dyncol_type */
+ YYSYMBOL_numeric_dyncol_type = 1412, /* numeric_dyncol_type */
+ YYSYMBOL_temporal_dyncol_type = 1413, /* temporal_dyncol_type */
+ YYSYMBOL_string_dyncol_type = 1414, /* string_dyncol_type */
+ YYSYMBOL_dyncall_create_element = 1415, /* dyncall_create_element */
+ YYSYMBOL_dyncall_create_list = 1416, /* dyncall_create_list */
+ YYSYMBOL_plsql_cursor_attr = 1417, /* plsql_cursor_attr */
+ YYSYMBOL_explicit_cursor_attr = 1418, /* explicit_cursor_attr */
+ YYSYMBOL_trim_operands = 1419, /* trim_operands */
+ YYSYMBOL_trim_operands_regular = 1420, /* trim_operands_regular */
+ YYSYMBOL_trim_operands_special = 1421, /* trim_operands_special */
+ YYSYMBOL_column_default_non_parenthesized_expr = 1422, /* column_default_non_parenthesized_expr */
+ YYSYMBOL_primary_expr = 1423, /* primary_expr */
+ YYSYMBOL_string_factor_expr = 1424, /* string_factor_expr */
+ YYSYMBOL_simple_expr = 1425, /* simple_expr */
+ YYSYMBOL_mysql_concatenation_expr = 1426, /* mysql_concatenation_expr */
+ YYSYMBOL_function_call_keyword_timestamp = 1427, /* function_call_keyword_timestamp */
+ YYSYMBOL_function_call_keyword = 1428, /* function_call_keyword */
+ YYSYMBOL_substring_operands = 1429, /* substring_operands */
+ YYSYMBOL_substring_operands_regular = 1430, /* substring_operands_regular */
+ YYSYMBOL_substring_operands_special = 1431, /* substring_operands_special */
+ YYSYMBOL_function_call_nonkeyword = 1432, /* function_call_nonkeyword */
+ YYSYMBOL_function_call_conflict = 1433, /* function_call_conflict */
+ YYSYMBOL_function_call_generic = 1434, /* function_call_generic */
+ YYSYMBOL_1435_142 = 1435, /* @142 */
+ YYSYMBOL_fulltext_options = 1436, /* fulltext_options */
+ YYSYMBOL_opt_natural_language_mode = 1437, /* opt_natural_language_mode */
+ YYSYMBOL_opt_query_expansion = 1438, /* opt_query_expansion */
+ YYSYMBOL_opt_udf_expr_list = 1439, /* opt_udf_expr_list */
+ YYSYMBOL_udf_expr_list = 1440, /* udf_expr_list */
+ YYSYMBOL_udf_expr = 1441, /* udf_expr */
+ YYSYMBOL_sum_expr = 1442, /* sum_expr */
+ YYSYMBOL_1443_143 = 1443, /* $@143 */
+ YYSYMBOL_1444_144 = 1444, /* $@144 */
+ YYSYMBOL_1445_145 = 1445, /* $@145 */
+ YYSYMBOL_1446_146 = 1446, /* $@146 */
+ YYSYMBOL_1447_147 = 1447, /* $@147 */
+ YYSYMBOL_window_func_expr = 1448, /* window_func_expr */
+ YYSYMBOL_window_func = 1449, /* window_func */
+ YYSYMBOL_simple_window_func = 1450, /* simple_window_func */
+ YYSYMBOL_inverse_distribution_function = 1451, /* inverse_distribution_function */
+ YYSYMBOL_percentile_function = 1452, /* percentile_function */
+ YYSYMBOL_1453_148 = 1453, /* $@148 */
+ YYSYMBOL_inverse_distribution_function_def = 1454, /* inverse_distribution_function_def */
+ YYSYMBOL_order_by_single_element_list = 1455, /* order_by_single_element_list */
+ YYSYMBOL_window_name = 1456, /* window_name */
+ YYSYMBOL_variable = 1457, /* variable */
+ YYSYMBOL_1458_149 = 1458, /* $@149 */
+ YYSYMBOL_variable_aux = 1459, /* variable_aux */
+ YYSYMBOL_opt_distinct = 1460, /* opt_distinct */
+ YYSYMBOL_opt_gconcat_separator = 1461, /* opt_gconcat_separator */
+ YYSYMBOL_opt_gorder_clause = 1462, /* opt_gorder_clause */
+ YYSYMBOL_gorder_list = 1463, /* gorder_list */
+ YYSYMBOL_opt_glimit_clause = 1464, /* opt_glimit_clause */
+ YYSYMBOL_glimit_clause = 1465, /* glimit_clause */
+ YYSYMBOL_glimit_options = 1466, /* glimit_options */
+ YYSYMBOL_in_sum_expr = 1467, /* in_sum_expr */
+ YYSYMBOL_1468_150 = 1468, /* $@150 */
+ YYSYMBOL_cast_type = 1469, /* cast_type */
+ YYSYMBOL_cast_type_numeric = 1470, /* cast_type_numeric */
+ YYSYMBOL_cast_type_temporal = 1471, /* cast_type_temporal */
+ YYSYMBOL_opt_expr_list = 1472, /* opt_expr_list */
+ YYSYMBOL_expr_list = 1473, /* expr_list */
+ YYSYMBOL_ident_list_arg = 1474, /* ident_list_arg */
+ YYSYMBOL_ident_list = 1475, /* ident_list */
+ YYSYMBOL_when_list = 1476, /* when_list */
+ YYSYMBOL_when_list_opt_else = 1477, /* when_list_opt_else */
+ YYSYMBOL_table_ref = 1478, /* table_ref */
+ YYSYMBOL_json_text_literal = 1479, /* json_text_literal */
+ YYSYMBOL_json_text_literal_or_num = 1480, /* json_text_literal_or_num */
+ YYSYMBOL_join_table_list = 1481, /* join_table_list */
+ YYSYMBOL_json_table_columns_clause = 1482, /* json_table_columns_clause */
+ YYSYMBOL_json_table_columns_list = 1483, /* json_table_columns_list */
+ YYSYMBOL_json_table_column = 1484, /* json_table_column */
+ YYSYMBOL_1485_151 = 1485, /* $@151 */
+ YYSYMBOL_1486_152 = 1486, /* $@152 */
+ YYSYMBOL_json_table_column_type = 1487, /* json_table_column_type */
+ YYSYMBOL_json_table_field_type = 1488, /* json_table_field_type */
+ YYSYMBOL_json_opt_on_empty_or_error = 1489, /* json_opt_on_empty_or_error */
+ YYSYMBOL_json_on_response = 1490, /* json_on_response */
+ YYSYMBOL_json_on_error_response = 1491, /* json_on_error_response */
+ YYSYMBOL_json_on_empty_response = 1492, /* json_on_empty_response */
+ YYSYMBOL_table_function = 1493, /* table_function */
+ YYSYMBOL_1494_153 = 1494, /* $@153 */
+ YYSYMBOL_1495_154 = 1495, /* $@154 */
+ YYSYMBOL_esc_table_ref = 1496, /* esc_table_ref */
+ YYSYMBOL_derived_table_list = 1497, /* derived_table_list */
+ YYSYMBOL_join_table = 1498, /* join_table */
+ YYSYMBOL_1499_155 = 1499, /* $@155 */
+ YYSYMBOL_1500_156 = 1500, /* $@156 */
+ YYSYMBOL_1501_157 = 1501, /* $@157 */
+ YYSYMBOL_1502_158 = 1502, /* $@158 */
+ YYSYMBOL_1503_159 = 1503, /* $@159 */
+ YYSYMBOL_1504_160 = 1504, /* $@160 */
+ YYSYMBOL_inner_join = 1505, /* inner_join */
+ YYSYMBOL_normal_join = 1506, /* normal_join */
+ YYSYMBOL_opt_use_partition = 1507, /* opt_use_partition */
+ YYSYMBOL_use_partition = 1508, /* use_partition */
+ YYSYMBOL_table_factor = 1509, /* table_factor */
+ YYSYMBOL_table_primary_ident_opt_parens = 1510, /* table_primary_ident_opt_parens */
+ YYSYMBOL_table_primary_derived_opt_parens = 1511, /* table_primary_derived_opt_parens */
+ YYSYMBOL_table_reference_list_parens = 1512, /* table_reference_list_parens */
+ YYSYMBOL_nested_table_reference_list = 1513, /* nested_table_reference_list */
+ YYSYMBOL_join_table_parens = 1514, /* join_table_parens */
+ YYSYMBOL_table_primary_ident = 1515, /* table_primary_ident */
+ YYSYMBOL_table_primary_derived = 1516, /* table_primary_derived */
+ YYSYMBOL_opt_outer = 1517, /* opt_outer */
+ YYSYMBOL_index_hint_clause = 1518, /* index_hint_clause */
+ YYSYMBOL_index_hint_type = 1519, /* index_hint_type */
+ YYSYMBOL_index_hint_definition = 1520, /* index_hint_definition */
+ YYSYMBOL_1521_161 = 1521, /* $@161 */
+ YYSYMBOL_1522_162 = 1522, /* $@162 */
+ YYSYMBOL_index_hints_list = 1523, /* index_hints_list */
+ YYSYMBOL_opt_index_hints_list = 1524, /* opt_index_hints_list */
+ YYSYMBOL_1525_163 = 1525, /* $@163 */
+ YYSYMBOL_opt_key_definition = 1526, /* opt_key_definition */
+ YYSYMBOL_1527_164 = 1527, /* $@164 */
+ YYSYMBOL_opt_key_usage_list = 1528, /* opt_key_usage_list */
+ YYSYMBOL_key_usage_element = 1529, /* key_usage_element */
+ YYSYMBOL_key_usage_list = 1530, /* key_usage_list */
+ YYSYMBOL_using_list = 1531, /* using_list */
+ YYSYMBOL_interval = 1532, /* interval */
+ YYSYMBOL_interval_time_stamp = 1533, /* interval_time_stamp */
+ YYSYMBOL_date_time_type = 1534, /* date_time_type */
+ YYSYMBOL_table_alias = 1535, /* table_alias */
+ YYSYMBOL_opt_table_alias_clause = 1536, /* opt_table_alias_clause */
+ YYSYMBOL_table_alias_clause = 1537, /* table_alias_clause */
+ YYSYMBOL_opt_all = 1538, /* opt_all */
+ YYSYMBOL_opt_where_clause = 1539, /* opt_where_clause */
+ YYSYMBOL_1540_165 = 1540, /* $@165 */
+ YYSYMBOL_opt_having_clause = 1541, /* opt_having_clause */
+ YYSYMBOL_1542_166 = 1542, /* $@166 */
+ YYSYMBOL_opt_group_clause = 1543, /* opt_group_clause */
+ YYSYMBOL_group_list = 1544, /* group_list */
+ YYSYMBOL_olap_opt = 1545, /* olap_opt */
+ YYSYMBOL_opt_window_clause = 1546, /* opt_window_clause */
+ YYSYMBOL_window_def_list = 1547, /* window_def_list */
+ YYSYMBOL_window_def = 1548, /* window_def */
+ YYSYMBOL_window_spec = 1549, /* window_spec */
+ YYSYMBOL_1550_167 = 1550, /* $@167 */
+ YYSYMBOL_opt_window_ref = 1551, /* opt_window_ref */
+ YYSYMBOL_opt_window_partition_clause = 1552, /* opt_window_partition_clause */
+ YYSYMBOL_opt_window_order_clause = 1553, /* opt_window_order_clause */
+ YYSYMBOL_opt_window_frame_clause = 1554, /* opt_window_frame_clause */
+ YYSYMBOL_window_frame_units = 1555, /* window_frame_units */
+ YYSYMBOL_window_frame_extent = 1556, /* window_frame_extent */
+ YYSYMBOL_window_frame_start = 1557, /* window_frame_start */
+ YYSYMBOL_window_frame_bound = 1558, /* window_frame_bound */
+ YYSYMBOL_opt_window_frame_exclusion = 1559, /* opt_window_frame_exclusion */
+ YYSYMBOL_alter_order_clause = 1560, /* alter_order_clause */
+ YYSYMBOL_alter_order_list = 1561, /* alter_order_list */
+ YYSYMBOL_alter_order_item = 1562, /* alter_order_item */
+ YYSYMBOL_opt_order_clause = 1563, /* opt_order_clause */
+ YYSYMBOL_order_clause = 1564, /* order_clause */
+ YYSYMBOL_1565_168 = 1565, /* $@168 */
+ YYSYMBOL_order_list = 1566, /* order_list */
+ YYSYMBOL_order_dir = 1567, /* order_dir */
+ YYSYMBOL_opt_limit_clause = 1568, /* opt_limit_clause */
+ YYSYMBOL_limit_clause = 1569, /* limit_clause */
+ YYSYMBOL_fetch_first_clause = 1570, /* fetch_first_clause */
+ YYSYMBOL_first_or_next = 1571, /* first_or_next */
+ YYSYMBOL_row_or_rows = 1572, /* row_or_rows */
+ YYSYMBOL_only_or_with_ties = 1573, /* only_or_with_ties */
+ YYSYMBOL_opt_global_limit_clause = 1574, /* opt_global_limit_clause */
+ YYSYMBOL_limit_options = 1575, /* limit_options */
+ YYSYMBOL_limit_option = 1576, /* limit_option */
+ YYSYMBOL_limit_rows_option = 1577, /* limit_rows_option */
+ YYSYMBOL_delete_limit_clause = 1578, /* delete_limit_clause */
+ YYSYMBOL_order_limit_lock = 1579, /* order_limit_lock */
+ YYSYMBOL_opt_order_limit_lock = 1580, /* opt_order_limit_lock */
+ YYSYMBOL_query_expression_tail = 1581, /* query_expression_tail */
+ YYSYMBOL_opt_query_expression_tail = 1582, /* opt_query_expression_tail */
+ YYSYMBOL_opt_procedure_or_into = 1583, /* opt_procedure_or_into */
+ YYSYMBOL_order_or_limit = 1584, /* order_or_limit */
+ YYSYMBOL_opt_plus = 1585, /* opt_plus */
+ YYSYMBOL_int_num = 1586, /* int_num */
+ YYSYMBOL_ulong_num = 1587, /* ulong_num */
+ YYSYMBOL_real_ulong_num = 1588, /* real_ulong_num */
+ YYSYMBOL_longlong_num = 1589, /* longlong_num */
+ YYSYMBOL_ulonglong_num = 1590, /* ulonglong_num */
+ YYSYMBOL_real_ulonglong_num = 1591, /* real_ulonglong_num */
+ YYSYMBOL_dec_num_error = 1592, /* dec_num_error */
+ YYSYMBOL_dec_num = 1593, /* dec_num */
+ YYSYMBOL_choice = 1594, /* choice */
+ YYSYMBOL_bool = 1595, /* bool */
+ YYSYMBOL_procedure_clause = 1596, /* procedure_clause */
+ YYSYMBOL_1597_169 = 1597, /* $@169 */
+ YYSYMBOL_procedure_list = 1598, /* procedure_list */
+ YYSYMBOL_procedure_list2 = 1599, /* procedure_list2 */
+ YYSYMBOL_procedure_item = 1600, /* procedure_item */
+ YYSYMBOL_select_var_list_init = 1601, /* select_var_list_init */
+ YYSYMBOL_1602_170 = 1602, /* $@170 */
+ YYSYMBOL_select_var_list = 1603, /* select_var_list */
+ YYSYMBOL_select_var_ident = 1604, /* select_var_ident */
+ YYSYMBOL_select_outvar = 1605, /* select_outvar */
+ YYSYMBOL_into = 1606, /* into */
+ YYSYMBOL_into_destination = 1607, /* into_destination */
+ YYSYMBOL_1608_171 = 1608, /* $@171 */
+ YYSYMBOL_1609_172 = 1609, /* $@172 */
+ YYSYMBOL_do = 1610, /* do */
+ YYSYMBOL_1611_173 = 1611, /* $@173 */
+ YYSYMBOL_drop = 1612, /* drop */
+ YYSYMBOL_1613_174 = 1613, /* $@174 */
+ YYSYMBOL_1614_175 = 1614, /* $@175 */
+ YYSYMBOL_1615_176 = 1615, /* $@176 */
+ YYSYMBOL_1616_177 = 1616, /* $@177 */
+ YYSYMBOL_table_list = 1617, /* table_list */
+ YYSYMBOL_table_name = 1618, /* table_name */
+ YYSYMBOL_table_name_with_opt_use_partition = 1619, /* table_name_with_opt_use_partition */
+ YYSYMBOL_table_alias_ref_list = 1620, /* table_alias_ref_list */
+ YYSYMBOL_table_alias_ref = 1621, /* table_alias_ref */
+ YYSYMBOL_opt_if_exists_table_element = 1622, /* opt_if_exists_table_element */
+ YYSYMBOL_opt_if_exists = 1623, /* opt_if_exists */
+ YYSYMBOL_opt_temporary = 1624, /* opt_temporary */
+ YYSYMBOL_insert = 1625, /* insert */
+ YYSYMBOL_1626_178 = 1626, /* $@178 */
+ YYSYMBOL_1627_179 = 1627, /* $@179 */
+ YYSYMBOL_replace = 1628, /* replace */
+ YYSYMBOL_1629_180 = 1629, /* $@180 */
+ YYSYMBOL_1630_181 = 1630, /* $@181 */
+ YYSYMBOL_insert_start = 1631, /* insert_start */
+ YYSYMBOL_stmt_end = 1632, /* stmt_end */
+ YYSYMBOL_insert_lock_option = 1633, /* insert_lock_option */
+ YYSYMBOL_replace_lock_option = 1634, /* replace_lock_option */
+ YYSYMBOL_insert_replace_option = 1635, /* insert_replace_option */
+ YYSYMBOL_opt_into = 1636, /* opt_into */
+ YYSYMBOL_insert_table = 1637, /* insert_table */
+ YYSYMBOL_1638_182 = 1638, /* $@182 */
+ YYSYMBOL_insert_field_spec = 1639, /* insert_field_spec */
+ YYSYMBOL_1640_183 = 1640, /* $@183 */
+ YYSYMBOL_insert_field_list = 1641, /* insert_field_list */
+ YYSYMBOL_opt_fields = 1642, /* opt_fields */
+ YYSYMBOL_fields = 1643, /* fields */
+ YYSYMBOL_insert_values = 1644, /* insert_values */
+ YYSYMBOL_values_list = 1645, /* values_list */
+ YYSYMBOL_ident_eq_list = 1646, /* ident_eq_list */
+ YYSYMBOL_ident_eq_value = 1647, /* ident_eq_value */
+ YYSYMBOL_equal = 1648, /* equal */
+ YYSYMBOL_opt_equal = 1649, /* opt_equal */
+ YYSYMBOL_opt_with = 1650, /* opt_with */
+ YYSYMBOL_opt_by = 1651, /* opt_by */
+ YYSYMBOL_no_braces = 1652, /* no_braces */
+ YYSYMBOL_1653_184 = 1653, /* $@184 */
+ YYSYMBOL_no_braces_with_names = 1654, /* no_braces_with_names */
+ YYSYMBOL_1655_185 = 1655, /* $@185 */
+ YYSYMBOL_opt_values = 1656, /* opt_values */
+ YYSYMBOL_opt_values_with_names = 1657, /* opt_values_with_names */
+ YYSYMBOL_values = 1658, /* values */
+ YYSYMBOL_values_with_names = 1659, /* values_with_names */
+ YYSYMBOL_expr_or_ignore = 1660, /* expr_or_ignore */
+ YYSYMBOL_expr_or_ignore_or_default = 1661, /* expr_or_ignore_or_default */
+ YYSYMBOL_opt_insert_update = 1662, /* opt_insert_update */
+ YYSYMBOL_1663_186 = 1663, /* $@186 */
+ YYSYMBOL_1664_187 = 1664, /* $@187 */
+ YYSYMBOL_update_table_list = 1665, /* update_table_list */
+ YYSYMBOL_update = 1666, /* update */
+ YYSYMBOL_1667_188 = 1667, /* $@188 */
+ YYSYMBOL_1668_189 = 1668, /* $@189 */
+ YYSYMBOL_1669_190 = 1669, /* $@190 */
+ YYSYMBOL_update_list = 1670, /* update_list */
+ YYSYMBOL_update_elem = 1671, /* update_elem */
+ YYSYMBOL_insert_update_list = 1672, /* insert_update_list */
+ YYSYMBOL_insert_update_elem = 1673, /* insert_update_elem */
+ YYSYMBOL_opt_low_priority = 1674, /* opt_low_priority */
+ YYSYMBOL_delete = 1675, /* delete */
+ YYSYMBOL_1676_191 = 1676, /* $@191 */
+ YYSYMBOL_opt_delete_system_time = 1677, /* opt_delete_system_time */
+ YYSYMBOL_delete_part2 = 1678, /* delete_part2 */
+ YYSYMBOL_delete_single_table = 1679, /* delete_single_table */
+ YYSYMBOL_delete_single_table_for_period = 1680, /* delete_single_table_for_period */
+ YYSYMBOL_single_multi = 1681, /* single_multi */
+ YYSYMBOL_1682_192 = 1682, /* $@192 */
+ YYSYMBOL_1683_193 = 1683, /* $@193 */
+ YYSYMBOL_1684_194 = 1684, /* $@194 */
+ YYSYMBOL_1685_195 = 1685, /* $@195 */
+ YYSYMBOL_opt_returning = 1686, /* opt_returning */
+ YYSYMBOL_1687_196 = 1687, /* $@196 */
+ YYSYMBOL_table_wild_list = 1688, /* table_wild_list */
+ YYSYMBOL_table_wild_one = 1689, /* table_wild_one */
+ YYSYMBOL_opt_wild = 1690, /* opt_wild */
+ YYSYMBOL_opt_delete_options = 1691, /* opt_delete_options */
+ YYSYMBOL_opt_delete_option = 1692, /* opt_delete_option */
+ YYSYMBOL_truncate = 1693, /* truncate */
+ YYSYMBOL_1694_197 = 1694, /* $@197 */
+ YYSYMBOL_1695_198 = 1695, /* $@198 */
+ YYSYMBOL_opt_table_sym = 1696, /* opt_table_sym */
+ YYSYMBOL_opt_profile_defs = 1697, /* opt_profile_defs */
+ YYSYMBOL_profile_defs = 1698, /* profile_defs */
+ YYSYMBOL_profile_def = 1699, /* profile_def */
+ YYSYMBOL_opt_profile_args = 1700, /* opt_profile_args */
+ YYSYMBOL_show = 1701, /* show */
+ YYSYMBOL_1702_199 = 1702, /* $@199 */
+ YYSYMBOL_show_param = 1703, /* show_param */
+ YYSYMBOL_1704_200 = 1704, /* $@200 */
+ YYSYMBOL_1705_201 = 1705, /* $@201 */
+ YYSYMBOL_show_engine_param = 1706, /* show_engine_param */
+ YYSYMBOL_master_or_binary = 1707, /* master_or_binary */
+ YYSYMBOL_opt_storage = 1708, /* opt_storage */
+ YYSYMBOL_opt_db = 1709, /* opt_db */
+ YYSYMBOL_opt_full = 1710, /* opt_full */
+ YYSYMBOL_from_or_in = 1711, /* from_or_in */
+ YYSYMBOL_binlog_in = 1712, /* binlog_in */
+ YYSYMBOL_binlog_from = 1713, /* binlog_from */
+ YYSYMBOL_wild_and_where = 1714, /* wild_and_where */
+ YYSYMBOL_describe = 1715, /* describe */
+ YYSYMBOL_1716_202 = 1716, /* $@202 */
+ YYSYMBOL_1717_203 = 1717, /* $@203 */
+ YYSYMBOL_explainable_command = 1718, /* explainable_command */
+ YYSYMBOL_describe_command = 1719, /* describe_command */
+ YYSYMBOL_analyze_stmt_command = 1720, /* analyze_stmt_command */
+ YYSYMBOL_opt_extended_describe = 1721, /* opt_extended_describe */
+ YYSYMBOL_opt_format_json = 1722, /* opt_format_json */
+ YYSYMBOL_opt_describe_column = 1723, /* opt_describe_column */
+ YYSYMBOL_explain_for_connection = 1724, /* explain_for_connection */
+ YYSYMBOL_flush = 1725, /* flush */
+ YYSYMBOL_1726_204 = 1726, /* $@204 */
+ YYSYMBOL_flush_options = 1727, /* flush_options */
+ YYSYMBOL_1728_205 = 1728, /* $@205 */
+ YYSYMBOL_opt_flush_lock = 1729, /* opt_flush_lock */
+ YYSYMBOL_flush_lock = 1730, /* flush_lock */
+ YYSYMBOL_1731_206 = 1731, /* $@206 */
+ YYSYMBOL_flush_options_list = 1732, /* flush_options_list */
+ YYSYMBOL_flush_option = 1733, /* flush_option */
+ YYSYMBOL_opt_table_list = 1734, /* opt_table_list */
+ YYSYMBOL_backup = 1735, /* backup */
+ YYSYMBOL_backup_statements = 1736, /* backup_statements */
+ YYSYMBOL_1737_207 = 1737, /* $@207 */
+ YYSYMBOL_opt_delete_gtid_domain = 1738, /* opt_delete_gtid_domain */
+ YYSYMBOL_delete_domain_id_list = 1739, /* delete_domain_id_list */
+ YYSYMBOL_delete_domain_id = 1740, /* delete_domain_id */
+ YYSYMBOL_optional_flush_tables_arguments = 1741, /* optional_flush_tables_arguments */
+ YYSYMBOL_reset = 1742, /* reset */
+ YYSYMBOL_1743_208 = 1743, /* $@208 */
+ YYSYMBOL_reset_options = 1744, /* reset_options */
+ YYSYMBOL_reset_option = 1745, /* reset_option */
+ YYSYMBOL_1746_209 = 1746, /* $@209 */
+ YYSYMBOL_1747_210 = 1747, /* $@210 */
+ YYSYMBOL_slave_reset_options = 1748, /* slave_reset_options */
+ YYSYMBOL_master_reset_options = 1749, /* master_reset_options */
+ YYSYMBOL_purge = 1750, /* purge */
+ YYSYMBOL_1751_211 = 1751, /* $@211 */
+ YYSYMBOL_kill = 1752, /* kill */
+ YYSYMBOL_1753_212 = 1753, /* $@212 */
+ YYSYMBOL_kill_type = 1754, /* kill_type */
+ YYSYMBOL_kill_option = 1755, /* kill_option */
+ YYSYMBOL_opt_connection = 1756, /* opt_connection */
+ YYSYMBOL_kill_expr = 1757, /* kill_expr */
+ YYSYMBOL_shutdown = 1758, /* shutdown */
+ YYSYMBOL_1759_213 = 1759, /* $@213 */
+ YYSYMBOL_shutdown_option = 1760, /* shutdown_option */
+ YYSYMBOL_use = 1761, /* use */
+ YYSYMBOL_load = 1762, /* load */
+ YYSYMBOL_1763_214 = 1763, /* $@214 */
+ YYSYMBOL_1764_215 = 1764, /* $@215 */
+ YYSYMBOL_1765_216 = 1765, /* $@216 */
+ YYSYMBOL_1766_217 = 1766, /* $@217 */
+ YYSYMBOL_data_or_xml = 1767, /* data_or_xml */
+ YYSYMBOL_opt_local = 1768, /* opt_local */
+ YYSYMBOL_load_data_lock = 1769, /* load_data_lock */
+ YYSYMBOL_opt_duplicate = 1770, /* opt_duplicate */
+ YYSYMBOL_opt_field_term = 1771, /* opt_field_term */
+ YYSYMBOL_field_term_list = 1772, /* field_term_list */
+ YYSYMBOL_field_term = 1773, /* field_term */
+ YYSYMBOL_opt_line_term = 1774, /* opt_line_term */
+ YYSYMBOL_line_term_list = 1775, /* line_term_list */
+ YYSYMBOL_line_term = 1776, /* line_term */
+ YYSYMBOL_opt_xml_rows_identified_by = 1777, /* opt_xml_rows_identified_by */
+ YYSYMBOL_opt_ignore_lines = 1778, /* opt_ignore_lines */
+ YYSYMBOL_lines_or_rows = 1779, /* lines_or_rows */
+ YYSYMBOL_opt_field_or_var_spec = 1780, /* opt_field_or_var_spec */
+ YYSYMBOL_fields_or_vars = 1781, /* fields_or_vars */
+ YYSYMBOL_field_or_var = 1782, /* field_or_var */
+ YYSYMBOL_opt_load_data_set_spec = 1783, /* opt_load_data_set_spec */
+ YYSYMBOL_load_data_set_list = 1784, /* load_data_set_list */
+ YYSYMBOL_load_data_set_elem = 1785, /* load_data_set_elem */
+ YYSYMBOL_text_literal = 1786, /* text_literal */
+ YYSYMBOL_text_string = 1787, /* text_string */
+ YYSYMBOL_hex_or_bin_String = 1788, /* hex_or_bin_String */
+ YYSYMBOL_param_marker = 1789, /* param_marker */
+ YYSYMBOL_signed_literal = 1790, /* signed_literal */
+ YYSYMBOL_literal = 1791, /* literal */
+ YYSYMBOL_NUM_literal = 1792, /* NUM_literal */
+ YYSYMBOL_temporal_literal = 1793, /* temporal_literal */
+ YYSYMBOL_with_clause = 1794, /* with_clause */
+ YYSYMBOL_1795_218 = 1795, /* $@218 */
+ YYSYMBOL_opt_recursive = 1796, /* opt_recursive */
+ YYSYMBOL_with_list = 1797, /* with_list */
+ YYSYMBOL_with_list_element = 1798, /* with_list_element */
+ YYSYMBOL_opt_cycle = 1799, /* opt_cycle */
+ YYSYMBOL_1800_219 = 1800, /* $@219 */
+ YYSYMBOL_opt_with_column_list = 1801, /* opt_with_column_list */
+ YYSYMBOL_with_column_list = 1802, /* with_column_list */
+ YYSYMBOL_ident_sys_alloc = 1803, /* ident_sys_alloc */
+ YYSYMBOL_comma_separated_ident_list = 1804, /* comma_separated_ident_list */
+ YYSYMBOL_with_element_head = 1805, /* with_element_head */
+ YYSYMBOL_insert_ident = 1806, /* insert_ident */
+ YYSYMBOL_table_wild = 1807, /* table_wild */
+ YYSYMBOL_select_sublist_qualified_asterisk = 1808, /* select_sublist_qualified_asterisk */
+ YYSYMBOL_order_ident = 1809, /* order_ident */
+ YYSYMBOL_simple_ident = 1810, /* simple_ident */
+ YYSYMBOL_simple_ident_nospvar = 1811, /* simple_ident_nospvar */
+ YYSYMBOL_field_ident = 1812, /* field_ident */
+ YYSYMBOL_table_ident = 1813, /* table_ident */
+ YYSYMBOL_table_ident_opt_wild = 1814, /* table_ident_opt_wild */
+ YYSYMBOL_table_ident_nodb = 1815, /* table_ident_nodb */
+ YYSYMBOL_IDENT_cli = 1816, /* IDENT_cli */
+ YYSYMBOL_ident_cli = 1817, /* ident_cli */
+ YYSYMBOL_IDENT_sys = 1818, /* IDENT_sys */
+ YYSYMBOL_ident_cli_func = 1819, /* ident_cli_func */
+ YYSYMBOL_ident_func = 1820, /* ident_func */
+ YYSYMBOL_TEXT_STRING_sys = 1821, /* TEXT_STRING_sys */
+ YYSYMBOL_TEXT_STRING_literal = 1822, /* TEXT_STRING_literal */
+ YYSYMBOL_TEXT_STRING_filesystem = 1823, /* TEXT_STRING_filesystem */
+ YYSYMBOL_ident_table_alias = 1824, /* ident_table_alias */
+ YYSYMBOL_ident_cli_set_usual_case = 1825, /* ident_cli_set_usual_case */
+ YYSYMBOL_ident_sysvar_name = 1826, /* ident_sysvar_name */
+ YYSYMBOL_ident = 1827, /* ident */
+ YYSYMBOL_label_ident = 1828, /* label_ident */
+ YYSYMBOL_ident_or_text = 1829, /* ident_or_text */
+ YYSYMBOL_user_maybe_role = 1830, /* user_maybe_role */
+ YYSYMBOL_user_or_role = 1831, /* user_or_role */
+ YYSYMBOL_user = 1832, /* user */
+ YYSYMBOL_keyword_table_alias = 1833, /* keyword_table_alias */
+ YYSYMBOL_keyword_ident = 1834, /* keyword_ident */
+ YYSYMBOL_keyword_sysvar_name = 1835, /* keyword_sysvar_name */
+ YYSYMBOL_keyword_set_usual_case = 1836, /* keyword_set_usual_case */
+ YYSYMBOL_non_reserved_keyword_udt = 1837, /* non_reserved_keyword_udt */
+ YYSYMBOL_keyword_sp_var_not_label = 1838, /* keyword_sp_var_not_label */
+ YYSYMBOL_keyword_sp_head = 1839, /* keyword_sp_head */
+ YYSYMBOL_keyword_verb_clause = 1840, /* keyword_verb_clause */
+ YYSYMBOL_keyword_set_special_case = 1841, /* keyword_set_special_case */
+ YYSYMBOL_keyword_sysvar_type = 1842, /* keyword_sysvar_type */
+ YYSYMBOL_keyword_data_type = 1843, /* keyword_data_type */
+ YYSYMBOL_keyword_cast_type = 1844, /* keyword_cast_type */
+ YYSYMBOL_keyword_func_sp_var_and_label = 1845, /* keyword_func_sp_var_and_label */
+ YYSYMBOL_keyword_func_sp_var_not_label = 1846, /* keyword_func_sp_var_not_label */
+ YYSYMBOL_keyword_sp_var_and_label = 1847, /* keyword_sp_var_and_label */
+ YYSYMBOL_reserved_keyword_udt_not_param_type = 1848, /* reserved_keyword_udt_not_param_type */
+ YYSYMBOL_set = 1849, /* set */
+ YYSYMBOL_1850_220 = 1850, /* $@220 */
+ YYSYMBOL_set_param = 1851, /* set_param */
+ YYSYMBOL_1852_221 = 1852, /* $@221 */
+ YYSYMBOL_1853_222 = 1853, /* $@222 */
+ YYSYMBOL_1854_223 = 1854, /* $@223 */
+ YYSYMBOL_set_stmt_option_list = 1855, /* set_stmt_option_list */
+ YYSYMBOL_start_option_value_list_following_option_type = 1856, /* start_option_value_list_following_option_type */
+ YYSYMBOL_1857_224 = 1857, /* $@224 */
+ YYSYMBOL_option_value_list = 1858, /* option_value_list */
+ YYSYMBOL_option_value = 1859, /* option_value */
+ YYSYMBOL_1860_225 = 1860, /* $@225 */
+ YYSYMBOL_option_type = 1861, /* option_type */
+ YYSYMBOL_opt_var_type = 1862, /* opt_var_type */
+ YYSYMBOL_opt_var_ident_type = 1863, /* opt_var_ident_type */
+ YYSYMBOL_set_stmt_option = 1864, /* set_stmt_option */
+ YYSYMBOL_1865_226 = 1865, /* $@226 */
+ YYSYMBOL_1866_227 = 1866, /* $@227 */
+ YYSYMBOL_1867_228 = 1867, /* $@228 */
+ YYSYMBOL_option_value_following_option_type = 1868, /* option_value_following_option_type */
+ YYSYMBOL_1869_229 = 1869, /* $@229 */
+ YYSYMBOL_1870_230 = 1870, /* $@230 */
+ YYSYMBOL_1871_231 = 1871, /* $@231 */
+ YYSYMBOL_option_value_no_option_type = 1872, /* option_value_no_option_type */
+ YYSYMBOL_1873_232 = 1873, /* $@232 */
+ YYSYMBOL_1874_233 = 1874, /* $@233 */
+ YYSYMBOL_1875_234 = 1875, /* $@234 */
+ YYSYMBOL_1876_235 = 1876, /* $@235 */
+ YYSYMBOL_1877_236 = 1877, /* $@236 */
+ YYSYMBOL_1878_237 = 1878, /* $@237 */
+ YYSYMBOL_1879_238 = 1879, /* $@238 */
+ YYSYMBOL_1880_239 = 1880, /* $@239 */
+ YYSYMBOL_1881_240 = 1881, /* $@240 */
+ YYSYMBOL_1882_241 = 1882, /* $@241 */
+ YYSYMBOL_transaction_characteristics = 1883, /* transaction_characteristics */
+ YYSYMBOL_transaction_access_mode = 1884, /* transaction_access_mode */
+ YYSYMBOL_isolation_level = 1885, /* isolation_level */
+ YYSYMBOL_transaction_access_mode_types = 1886, /* transaction_access_mode_types */
+ YYSYMBOL_isolation_types = 1887, /* isolation_types */
+ YYSYMBOL_text_or_password = 1888, /* text_or_password */
+ YYSYMBOL_set_expr_or_default = 1889, /* set_expr_or_default */
+ YYSYMBOL_lock = 1890, /* lock */
+ YYSYMBOL_1891_242 = 1891, /* $@242 */
+ YYSYMBOL_opt_lock_wait_timeout = 1892, /* opt_lock_wait_timeout */
+ YYSYMBOL_table_or_tables = 1893, /* table_or_tables */
+ YYSYMBOL_table_lock_list = 1894, /* table_lock_list */
+ YYSYMBOL_table_lock = 1895, /* table_lock */
+ YYSYMBOL_lock_option = 1896, /* lock_option */
+ YYSYMBOL_unlock = 1897, /* unlock */
+ YYSYMBOL_1898_243 = 1898, /* $@243 */
+ YYSYMBOL_handler = 1899, /* handler */
+ YYSYMBOL_1900_244 = 1900, /* $@244 */
+ YYSYMBOL_handler_tail = 1901, /* handler_tail */
+ YYSYMBOL_1902_245 = 1902, /* $@245 */
+ YYSYMBOL_handler_read_or_scan = 1903, /* handler_read_or_scan */
+ YYSYMBOL_handler_scan_function = 1904, /* handler_scan_function */
+ YYSYMBOL_handler_rkey_function = 1905, /* handler_rkey_function */
+ YYSYMBOL_1906_246 = 1906, /* $@246 */
+ YYSYMBOL_handler_rkey_mode = 1907, /* handler_rkey_mode */
+ YYSYMBOL_revoke = 1908, /* revoke */
+ YYSYMBOL_revoke_command = 1909, /* revoke_command */
+ YYSYMBOL_admin_option_for_role = 1910, /* admin_option_for_role */
+ YYSYMBOL_grant = 1911, /* grant */
+ YYSYMBOL_grant_command = 1912, /* grant_command */
+ YYSYMBOL_opt_with_admin = 1913, /* opt_with_admin */
+ YYSYMBOL_opt_with_admin_option = 1914, /* opt_with_admin_option */
+ YYSYMBOL_role_list = 1915, /* role_list */
+ YYSYMBOL_current_role = 1916, /* current_role */
+ YYSYMBOL_role_name = 1917, /* role_name */
+ YYSYMBOL_grant_role = 1918, /* grant_role */
+ YYSYMBOL_opt_table = 1919, /* opt_table */
+ YYSYMBOL_grant_privileges = 1920, /* grant_privileges */
+ YYSYMBOL_opt_privileges = 1921, /* opt_privileges */
+ YYSYMBOL_object_privilege_list = 1922, /* object_privilege_list */
+ YYSYMBOL_column_list_privilege = 1923, /* column_list_privilege */
+ YYSYMBOL_column_privilege = 1924, /* column_privilege */
+ YYSYMBOL_object_privilege = 1925, /* object_privilege */
+ YYSYMBOL_opt_and = 1926, /* opt_and */
+ YYSYMBOL_require_list = 1927, /* require_list */
+ YYSYMBOL_require_list_element = 1928, /* require_list_element */
+ YYSYMBOL_grant_ident = 1929, /* grant_ident */
+ YYSYMBOL_user_list = 1930, /* user_list */
+ YYSYMBOL_grant_list = 1931, /* grant_list */
+ YYSYMBOL_user_and_role_list = 1932, /* user_and_role_list */
+ YYSYMBOL_via_or_with = 1933, /* via_or_with */
+ YYSYMBOL_using_or_as = 1934, /* using_or_as */
+ YYSYMBOL_grant_user = 1935, /* grant_user */
+ YYSYMBOL_auth_expression = 1936, /* auth_expression */
+ YYSYMBOL_auth_token = 1937, /* auth_token */
+ YYSYMBOL_opt_auth_str = 1938, /* opt_auth_str */
+ YYSYMBOL_opt_require_clause = 1939, /* opt_require_clause */
+ YYSYMBOL_resource_option = 1940, /* resource_option */
+ YYSYMBOL_resource_option_list = 1941, /* resource_option_list */
+ YYSYMBOL_opt_resource_options = 1942, /* opt_resource_options */
+ YYSYMBOL_opt_grant_options = 1943, /* opt_grant_options */
+ YYSYMBOL_opt_grant_option = 1944, /* opt_grant_option */
+ YYSYMBOL_grant_option_list = 1945, /* grant_option_list */
+ YYSYMBOL_grant_option = 1946, /* grant_option */
+ YYSYMBOL_begin_stmt_mariadb = 1947, /* begin_stmt_mariadb */
+ YYSYMBOL_1948_247 = 1948, /* $@247 */
+ YYSYMBOL_compound_statement = 1949, /* compound_statement */
+ YYSYMBOL_opt_not = 1950, /* opt_not */
+ YYSYMBOL_opt_work = 1951, /* opt_work */
+ YYSYMBOL_opt_chain = 1952, /* opt_chain */
+ YYSYMBOL_opt_release = 1953, /* opt_release */
+ YYSYMBOL_commit = 1954, /* commit */
+ YYSYMBOL_rollback = 1955, /* rollback */
+ YYSYMBOL_savepoint = 1956, /* savepoint */
+ YYSYMBOL_release = 1957, /* release */
+ YYSYMBOL_unit_type_decl = 1958, /* unit_type_decl */
+ YYSYMBOL_union_option = 1959, /* union_option */
+ YYSYMBOL_query_expression_option = 1960, /* query_expression_option */
+ YYSYMBOL_definer_opt = 1961, /* definer_opt */
+ YYSYMBOL_no_definer = 1962, /* no_definer */
+ YYSYMBOL_definer = 1963, /* definer */
+ YYSYMBOL_view_algorithm = 1964, /* view_algorithm */
+ YYSYMBOL_opt_view_suid = 1965, /* opt_view_suid */
+ YYSYMBOL_view_suid = 1966, /* view_suid */
+ YYSYMBOL_view_list_opt = 1967, /* view_list_opt */
+ YYSYMBOL_view_list = 1968, /* view_list */
+ YYSYMBOL_view_select = 1969, /* view_select */
+ YYSYMBOL_1970_248 = 1970, /* $@248 */
+ YYSYMBOL_view_check_option = 1971, /* view_check_option */
+ YYSYMBOL_trigger_action_order = 1972, /* trigger_action_order */
+ YYSYMBOL_trigger_follows_precedes_clause = 1973, /* trigger_follows_precedes_clause */
+ YYSYMBOL_trigger_tail = 1974, /* trigger_tail */
+ YYSYMBOL_1975_249 = 1975, /* $@249 */
+ YYSYMBOL_1976_250 = 1976, /* $@250 */
+ YYSYMBOL_1977_251 = 1977, /* $@251 */
+ YYSYMBOL_1978_252 = 1978, /* $@252 */
+ YYSYMBOL_1979_253 = 1979, /* $@253 */
+ YYSYMBOL_sf_return_type = 1980, /* sf_return_type */
+ YYSYMBOL_1981_254 = 1981, /* $@254 */
+ YYSYMBOL_xa = 1982, /* xa */
+ YYSYMBOL_opt_format_xid = 1983, /* opt_format_xid */
+ YYSYMBOL_xid = 1984, /* xid */
+ YYSYMBOL_begin_or_start = 1985, /* begin_or_start */
+ YYSYMBOL_opt_join_or_resume = 1986, /* opt_join_or_resume */
+ YYSYMBOL_opt_one_phase = 1987, /* opt_one_phase */
+ YYSYMBOL_opt_suspend = 1988, /* opt_suspend */
+ YYSYMBOL_1989_255 = 1989, /* $@255 */
+ YYSYMBOL_opt_migrate = 1990, /* opt_migrate */
+ YYSYMBOL_install = 1991, /* install */
+ YYSYMBOL_uninstall = 1992, /* uninstall */
+ YYSYMBOL_keep_gcc_happy = 1993, /* keep_gcc_happy */
+ YYSYMBOL__empty = 1994, /* _empty */
+ YYSYMBOL_statement = 1995, /* statement */
+ YYSYMBOL_sp_statement = 1996, /* sp_statement */
+ YYSYMBOL_sp_if_then_statements = 1997, /* sp_if_then_statements */
+ YYSYMBOL_sp_case_then_statements = 1998, /* sp_case_then_statements */
+ YYSYMBOL_reserved_keyword_udt_param_type = 1999, /* reserved_keyword_udt_param_type */
+ YYSYMBOL_reserved_keyword_udt = 2000, /* reserved_keyword_udt */
+ YYSYMBOL_keyword_sp_block_section = 2001, /* keyword_sp_block_section */
+ YYSYMBOL_keyword_label = 2002, /* keyword_label */
+ YYSYMBOL_keyword_sp_decl = 2003, /* keyword_sp_decl */
+ YYSYMBOL_opt_truncate_table_storage_clause = 2004, /* opt_truncate_table_storage_clause */
+ YYSYMBOL_ident_for_loop_index = 2005, /* ident_for_loop_index */
+ YYSYMBOL_row_field_name = 2006, /* row_field_name */
+ YYSYMBOL_while_body = 2007, /* while_body */
+ YYSYMBOL_2008_256 = 2008, /* $@256 */
+ YYSYMBOL_for_loop_statements = 2009, /* for_loop_statements */
+ YYSYMBOL_sp_label = 2010, /* sp_label */
+ YYSYMBOL_sp_control_label = 2011, /* sp_control_label */
+ YYSYMBOL_sp_block_label = 2012, /* sp_block_label */
+ YYSYMBOL_sp_opt_default = 2013, /* sp_opt_default */
+ YYSYMBOL_sp_decl_variable_list_anchored = 2014, /* sp_decl_variable_list_anchored */
+ YYSYMBOL_sp_param_name_and_mode = 2015, /* sp_param_name_and_mode */
+ YYSYMBOL_sp_param = 2016, /* sp_param */
+ YYSYMBOL_sp_param_anchored = 2017, /* sp_param_anchored */
+ YYSYMBOL_sf_c_chistics_and_body_standalone = 2018, /* sf_c_chistics_and_body_standalone */
+ YYSYMBOL_2019_257 = 2019, /* $@257 */
+ YYSYMBOL_sp_tail_standalone = 2020, /* sp_tail_standalone */
+ YYSYMBOL_2021_258 = 2021, /* $@258 */
+ YYSYMBOL_2022_259 = 2022, /* $@259 */
+ YYSYMBOL_drop_routine = 2023, /* drop_routine */
+ YYSYMBOL_create_routine = 2024, /* create_routine */
+ YYSYMBOL_2025_260 = 2025, /* $@260 */
+ YYSYMBOL_2026_261 = 2026, /* $@261 */
+ YYSYMBOL_2027_262 = 2027, /* $@262 */
+ YYSYMBOL_sp_decls = 2028, /* sp_decls */
+ YYSYMBOL_sp_decl = 2029, /* sp_decl */
+ YYSYMBOL_sp_decl_body = 2030, /* sp_decl_body */
+ YYSYMBOL_2031_263 = 2031, /* $@263 */
+ YYSYMBOL_sp_proc_stmt_in_returns_clause = 2032, /* sp_proc_stmt_in_returns_clause */
+ YYSYMBOL_sp_proc_stmt = 2033, /* sp_proc_stmt */
+ YYSYMBOL_sp_proc_stmt_compound_ok = 2034, /* sp_proc_stmt_compound_ok */
+ YYSYMBOL_sp_labeled_block = 2035, /* sp_labeled_block */
+ YYSYMBOL_2036_264 = 2036, /* $@264 */
+ YYSYMBOL_sp_unlabeled_block = 2037, /* sp_unlabeled_block */
+ YYSYMBOL_2038_265 = 2038, /* $@265 */
+ YYSYMBOL_sp_unlabeled_block_not_atomic = 2039, /* sp_unlabeled_block_not_atomic */
+ YYSYMBOL_2040_266 = 2040 /* $@266 */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
+
+
+/* Second part of user prologue. */
+#line 330 "/home/buildbot/git/sql/sql_yacc.yy"
+
+/* 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);
+
+#line 2324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+
+
+#ifdef short
+# undef short
+#endif
+
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_STDINT_H
+# endif
+#endif
+
+/* Narrow types that promote to a signed type and that can represent a
+ signed or unsigned integer of at least N bits. In tables they can
+ save space and decrease cache pressure. Promoting to a signed type
+ helps avoid bugs in integer arithmetic. */
+
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+/* Work around bug in HP-UX 11.23, which defines these macros
+ incorrectly for preprocessor constants. This workaround can likely
+ be removed in 2023, as HPE has promised support for HP-UX 11.23
+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
+ <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
+#ifdef __hpux
+# undef UINT_LEAST8_MAX
+# undef UINT_LEAST16_MAX
+# define UINT_LEAST8_MAX 255
+# define UINT_LEAST16_MAX 65535
+#endif
+
+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
+#else
+typedef short yytype_uint8;
+#endif
+
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
+#else
+typedef int yytype_uint16;
+#endif
+
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+# define YYPTRDIFF_T __PTRDIFF_TYPE__
+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+# ifndef ptrdiff_t
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# endif
+# define YYPTRDIFF_T ptrdiff_t
+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+# define YYPTRDIFF_T long
+# define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM \
+ YY_CAST (YYPTRDIFF_T, \
+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
+ ? YYPTRDIFF_MAXIMUM \
+ : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_int16 yy_state_t;
+
+/* State numbers in computations. */
+typedef int yy_state_fast_t;
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+
+#ifndef YY_ATTRIBUTE_PURE
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define YY_ATTRIBUTE_PURE
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define YY_ATTRIBUTE_UNUSED
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YY_USE(E) ((void) (E))
+#else
+# define YY_USE(E) /* empty */
+#endif
+
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
+# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
+# else
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# endif
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END \
+ _Pragma ("GCC diagnostic pop")
+#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
+
+#define YY_ASSERT(E) ((void) (0 && (E)))
+
+#if !defined yyoverflow
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* !defined yyoverflow */
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yy_state_t yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYPTRDIFF_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYPTRDIFF_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 740
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 112981
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 789
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 1252
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 3718
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 6225
+
+/* YYMAXUTOK -- Last valid token kind. */
+#define YYMAXUTOK 1021
+
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_int16 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 783, 2, 2, 2, 772, 767, 2,
+ 779, 780, 770, 769, 782, 768, 787, 771, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 788, 786,
+ 765, 763, 764, 2, 3, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 773, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 784, 766, 785, 774, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 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, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, 755,
+ 756, 757, 758, 759, 760, 761, 762, 775, 776, 777,
+ 778, 781
+};
+
+#if YYDEBUG
+/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_int16 yyrline[] =
+{
+ 0, 1975, 1975, 1985, 1984, 2009, 2016, 2018, 2022, 2023,
+ 2024, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037,
+ 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047,
+ 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057,
+ 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067,
+ 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077,
+ 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087,
+ 2088, 2092, 2099, 2100, 2105, 2104, 2115, 2121, 2123, 2120,
+ 2132, 2134, 2133, 2143, 2148, 2160, 2159, 2176, 2175, 2185,
+ 2186, 2190, 2194, 2198, 2202, 2206, 2210, 2220, 2225, 2229,
+ 2233, 2237, 2241, 2245, 2250, 2254, 2259, 2287, 2291, 2295,
+ 2300, 2303, 2305, 2306, 2310, 2316, 2318, 2319, 2323, 2329,
+ 2331, 2332, 2336, 2343, 2347, 2362, 2366, 2372, 2378, 2384,
+ 2390, 2398, 2402, 2406, 2418, 2421, 2426, 2448, 2460, 2447,
+ 2483, 2482, 2538, 2545, 2537, 2557, 2564, 2556, 2577, 2583,
+ 2576, 2595, 2601, 2594, 2613, 2612, 2626, 2624, 2640, 2638,
+ 2652, 2651, 2662, 2661, 2671, 2678, 2685, 2685, 2688, 2692,
+ 2693, 2697, 2698, 2702, 2707, 2713, 2719, 2727, 2733, 2739,
+ 2747, 2755, 2763, 2771, 2779, 2787, 2799, 2815, 2815, 2819,
+ 2818, 2830, 2831, 2835, 2840, 2845, 2850, 2855, 2860, 2865,
+ 2873, 2872, 2905, 2904, 2911, 2918, 2919, 2925, 2931, 2941,
+ 2947, 2953, 2955, 2962, 2963, 2967, 2977, 2978, 2986, 2986,
+ 3028, 3037, 3038, 3043, 3044, 3045, 3046, 3051, 3056, 3064,
+ 3065, 3069, 3070, 3075, 3077, 3079, 3081, 3083, 3085, 3087,
+ 3093, 3094, 3098, 3099, 3104, 3103, 3114, 3113, 3124, 3123,
+ 3136, 3138, 3141, 3143, 3147, 3151, 3160, 3165, 3165, 3175,
+ 3176, 3180, 3188, 3190, 3194, 3195, 3199, 3200, 3201, 3206,
+ 3205, 3217, 3221, 3222, 3226, 3227, 3232, 3238, 3244, 3254,
+ 3262, 3267, 3275, 3279, 3288, 3286, 3300, 3308, 3313, 3312,
+ 3326, 3328, 3333, 3343, 3342, 3361, 3362, 3363, 3364, 3369,
+ 3371, 3376, 3391, 3399, 3403, 3423, 3424, 3428, 3432, 3438,
+ 3444, 3450, 3456, 3466, 3471, 3479, 3487, 3492, 3498, 3499,
+ 3505, 3508, 3512, 3520, 3537, 3539, 3557, 3563, 3565, 3567,
+ 3569, 3571, 3573, 3575, 3577, 3579, 3581, 3583, 3585, 3587,
+ 3592, 3600, 3616, 3617, 3622, 3628, 3637, 3644, 3653, 3662,
+ 3667, 3681, 3683, 3685, 3694, 3699, 3706, 3715, 3724, 3726,
+ 3728, 3730, 3732, 3734, 3736, 3738, 3740, 3742, 3744, 3746,
+ 3748, 3750, 3755, 3756, 3764, 3776, 3792, 3791, 3802, 3802,
+ 3824, 3825, 3830, 3829, 3837, 3848, 3853, 3859, 3858, 3865,
+ 3864, 3873, 3878, 3884, 3883, 3890, 3889, 3899, 3907, 3915,
+ 3924, 3924, 3947, 3957, 3956, 3977, 3976, 3996, 4002, 4010,
+ 4011, 4015, 4016, 4017, 4021, 4029, 4034, 4039, 4047, 4048,
+ 4056, 4074, 4090, 4110, 4115, 4109, 4127, 4129, 4130, 4131,
+ 4136, 4135, 4206, 4205, 4212, 4217, 4218, 4222, 4223, 4228,
+ 4227, 4243, 4242, 4257, 4267, 4271, 4272, 4277, 4278, 4282,
+ 4290, 4295, 4302, 4311, 4325, 4333, 4342, 4341, 4349, 4348,
+ 4356, 4361, 4368, 4355, 4378, 4377, 4388, 4387, 4397, 4396,
+ 4406, 4413, 4405, 4428, 4427, 4439, 4441, 4446, 4448, 4450,
+ 4456, 4455, 4458, 4459, 4473, 4474, 4478, 4479, 4489, 4494,
+ 4505, 4542, 4543, 4548, 4547, 4563, 4578, 4577, 4599, 4598,
+ 4604, 4612, 4611, 4614, 4616, 4619, 4618, 4627, 4630, 4629,
+ 4638, 4639, 4645, 4646, 4663, 4664, 4668, 4669, 4673, 4687,
+ 4697, 4708, 4717, 4718, 4731, 4733, 4732, 4737, 4735, 4746,
+ 4747, 4751, 4765, 4777, 4778, 4791, 4800, 4822, 4823, 4826,
+ 4828, 4833, 4832, 4856, 4868, 4884, 4883, 4898, 4897, 4911,
+ 4918, 4925, 4945, 4963, 4967, 4994, 5006, 5007, 5012, 5021,
+ 5011, 5046, 5047, 5051, 5062, 5081, 5094, 5120, 5121, 5126,
+ 5125, 5162, 5171, 5172, 5176, 5177, 5181, 5182, 5190, 5191,
+ 5195, 5196, 5200, 5202, 5208, 5214, 5216, 5218, 5220, 5222,
+ 5224, 5229, 5230, 5230, 5239, 5251, 5254, 5262, 5265, 5275,
+ 5276, 5280, 5281, 5285, 5286, 5290, 5291, 5292, 5301, 5304,
+ 5312, 5315, 5322, 5326, 5332, 5334, 5338, 5339, 5343, 5344,
+ 5345, 5349, 5364, 5369, 5374, 5379, 5384, 5389, 5394, 5409,
+ 5415, 5430, 5435, 5450, 5456, 5474, 5479, 5484, 5489, 5494,
+ 5499, 5505, 5504, 5530, 5531, 5532, 5537, 5542, 5547, 5549,
+ 5551, 5553, 5559, 5564, 5569, 5573, 5578, 5582, 5589, 5596,
+ 5601, 5608, 5610, 5614, 5633, 5641, 5650, 5660, 5671, 5672,
+ 5673, 5674, 5675, 5676, 5677, 5681, 5682, 5683, 5687, 5688,
+ 5689, 5690, 5695, 5702, 5709, 5710, 5714, 5715, 5716, 5717,
+ 5718, 5722, 5724, 5735, 5734, 5742, 5741, 5749, 5748, 5756,
+ 5755, 5765, 5762, 5773, 5771, 5780, 5779, 5798, 5806, 5814,
+ 5822, 5823, 5827, 5837, 5838, 5842, 5843, 5847, 5852, 5851,
+ 5890, 5889, 5902, 5901, 5912, 5913, 5917, 5918, 5922, 5923,
+ 5927, 5928, 5932, 5933, 5934, 5935, 5941, 5940, 5948, 5954,
+ 5963, 5964, 5969, 5972, 5976, 5980, 5987, 5988, 5992, 5993,
+ 5997, 6003, 6009, 6010, 6018, 6017, 6039, 6040, 6050, 6058,
+ 6070, 6070, 6073, 6074, 6081, 6088, 6092, 6100, 6101, 6102,
+ 6106, 6107, 6108, 6109, 6110, 6111, 6119, 6123, 6124, 6138,
+ 6142, 6146, 6150, 6152, 6159, 6161, 6167, 6168, 6169, 6170,
+ 6174, 6178, 6183, 6187, 6191, 6195, 6200, 6204, 6211, 6227,
+ 6228, 6235, 6242, 6250, 6254, 6258, 6262, 6266, 6270, 6274,
+ 6278, 6280, 6282, 6284, 6286, 6288, 6290, 6292, 6299, 6301,
+ 6306, 6310, 6311, 6315, 6316, 6320, 6321, 6322, 6323, 6324,
+ 6328, 6329, 6330, 6331, 6332, 6336, 6342, 6343, 6348, 6350,
+ 6357, 6358, 6359, 6363, 6367, 6368, 6369, 6370, 6371, 6372,
+ 6376, 6380, 6381, 6382, 6383, 6386, 6390, 6395, 6396, 6400,
+ 6401, 6405, 6406, 6411, 6416, 6420, 6426, 6431, 6439, 6440,
+ 6447, 6451, 6455, 6456, 6460, 6461, 6465, 6466, 6470, 6478,
+ 6486, 6495, 6499, 6505, 6509, 6510, 6514, 6527, 6533, 6543,
+ 6544, 6548, 6555, 6559, 6560, 6564, 6565, 6569, 6578, 6582,
+ 6583, 6587, 6595, 6596, 6600, 6601, 6605, 6606, 6607, 6615,
+ 6616, 6620, 6624, 6628, 6633, 6634, 6639, 6643, 6649, 6653,
+ 6660, 6661, 6666, 6665, 6678, 6679, 6683, 6686, 6687, 6688,
+ 6689, 6693, 6701, 6708, 6709, 6713, 6723, 6724, 6728, 6729,
+ 6732, 6734, 6738, 6750, 6751, 6755, 6762, 6775, 6776, 6778,
+ 6780, 6786, 6791, 6797, 6803, 6810, 6820, 6821, 6822, 6823,
+ 6824, 6828, 6829, 6833, 6834, 6838, 6839, 6843, 6844, 6845,
+ 6849, 6853, 6865, 6866, 6870, 6871, 6875, 6876, 6880, 6881,
+ 6885, 6886, 6890, 6891, 6895, 6896, 6901, 6902, 6903, 6907,
+ 6909, 6914, 6919, 6921, 6925, 6929, 6936, 6937, 6941, 6945,
+ 6946, 6956, 6957, 6958, 6962, 6963, 6967, 6972, 6980, 6981,
+ 6989, 6995, 7007, 7008, 7012, 7014, 7024, 7040, 7023, 7063,
+ 7062, 7079, 7078, 7093, 7102, 7101, 7109, 7108, 7116, 7115,
+ 7129, 7123, 7137, 7136, 7176, 7175, 7182, 7189, 7197, 7207,
+ 7188, 7216, 7220, 7228, 7231, 7235, 7239, 7247, 7249, 7250,
+ 7251, 7252, 7256, 7257, 7258, 7259, 7263, 7264, 7276, 7277,
+ 7282, 7283, 7286, 7288, 7296, 7304, 7306, 7308, 7309, 7317,
+ 7318, 7324, 7333, 7331, 7344, 7357, 7356, 7369, 7367, 7380,
+ 7387, 7397, 7398, 7404, 7416, 7415, 7455, 7462, 7466, 7472,
+ 7470, 7487, 7489, 7494, 7502, 7501, 7515, 7519, 7518, 7530,
+ 7531, 7535, 7548, 7549, 7553, 7557, 7564, 7569, 7573, 7580,
+ 7587, 7591, 7596, 7604, 7612, 7622, 7633, 7643, 7654, 7664,
+ 7670, 7676, 7683, 7693, 7698, 7704, 7709, 7719, 7724, 7730,
+ 7735, 7739, 7744, 7745, 7746, 7751, 7756, 7760, 7770, 7772,
+ 7773, 7774, 7775, 7779, 7784, 7792, 7797, 7805, 7806, 7810,
+ 7811, 7815, 7815, 7818, 7820, 7824, 7825, 7829, 7830, 7838,
+ 7839, 7840, 7844, 7845, 7850, 7859, 7860, 7861, 7862, 7867,
+ 7866, 7876, 7875, 7883, 7890, 7900, 7917, 7920, 7927, 7931,
+ 7938, 7942, 7946, 7953, 7953, 7959, 7960, 7964, 7965, 7966,
+ 7970, 7971, 7980, 7987, 7988, 7993, 7992, 8004, 8005, 8006,
+ 8010, 8012, 8011, 8018, 8017, 8038, 8039, 8043, 8044, 8048,
+ 8049, 8050, 8054, 8055, 8056, 8061, 8060, 8081, 8082, 8086,
+ 8091, 8092, 8099, 8101, 8106, 8108, 8107, 8120, 8122, 8121,
+ 8135, 8136, 8141, 8150, 8151, 8152, 8156, 8163, 8173, 8181,
+ 8190, 8192, 8191, 8197, 8196, 8219, 8220, 8224, 8225, 8229,
+ 8230, 8231, 8232, 8233, 8234, 8238, 8239, 8244, 8243, 8264,
+ 8265, 8266, 8271, 8270, 8281, 8288, 8294, 8303, 8304, 8308,
+ 8324, 8323, 8336, 8337, 8341, 8342, 8346, 8357, 8368, 8369,
+ 8374, 8373, 8388, 8389, 8393, 8394, 8398, 8409, 8421, 8420,
+ 8428, 8428, 8437, 8438, 8443, 8444, 8454, 8453, 8468, 8467,
+ 8486, 8485, 8502, 8500, 8521, 8522, 8527, 8526, 8540, 8549,
+ 8539, 8559, 8571, 8635, 8640, 8655, 8656, 8671, 8670, 8686,
+ 8685, 8698, 8700, 8715, 8723, 8721, 8736, 8754, 8756, 8766,
+ 8770, 8811, 8820, 8830, 8831, 8835, 8839, 8845, 8852, 8854,
+ 8863, 8867, 8871, 8878, 8887, 8891, 8898, 8915, 8918, 8926,
+ 8929, 8936, 8940, 8944, 8948, 8955, 8956, 8960, 8961, 8970,
+ 8983, 8989, 9000, 9003, 9011, 9014, 9020, 9026, 9035, 9036,
+ 9037, 9057, 9062, 9084, 9090, 9096, 9102, 9103, 9104, 9105,
+ 9106, 9110, 9111, 9112, 9116, 9117, 9118, 9122, 9123, 9128,
+ 9179, 9186, 9229, 9235, 9239, 9245, 9251, 9257, 9263, 9269,
+ 9275, 9281, 9287, 9293, 9299, 9305, 9309, 9315, 9324, 9330,
+ 9338, 9344, 9353, 9359, 9367, 9377, 9383, 9390, 9397, 9405,
+ 9411, 9420, 9424, 9430, 9436, 9442, 9448, 9455, 9461, 9467,
+ 9473, 9479, 9486, 9492, 9498, 9504, 9510, 9516, 9522, 9528,
+ 9534, 9538, 9539, 9543, 9544, 9548, 9549, 9553, 9554, 9558,
+ 9559, 9560, 9561, 9562, 9563, 9567, 9568, 9573, 9576, 9580,
+ 9581, 9582, 9586, 9587, 9588, 9589, 9590, 9591, 9595, 9596,
+ 9597, 9601, 9606, 9613, 9635, 9642, 9651, 9652, 9653, 9654,
+ 9658, 9667, 9668, 9672, 9676, 9677, 9678, 9679, 9680, 9681,
+ 9682, 9714, 9715, 9716, 9717, 9718, 9719, 9720, 9721, 9722,
+ 9730, 9738, 9739, 9746, 9752, 9757, 9767, 9772, 9777, 9783,
+ 9788, 9794, 9805, 9812, 9817, 9822, 9827, 9832, 9837, 9842,
+ 9850, 9851, 9852, 9853, 9861, 9862, 9871, 9872, 9878, 9882,
+ 9888, 9894, 9903, 9904, 9913, 9920, 9934, 9940, 9946, 9955,
+ 9964, 9970, 9976, 9982, 9988, 10003, 10014, 10020, 10026, 10032,
+ 10038, 10044, 10052, 10059, 10063, 10069, 10077, 10086, 10087, 10091,
+ 10095, 10102, 10106, 10126, 10133, 10139, 10146, 10153, 10159, 10165,
+ 10171, 10177, 10184, 10190, 10201, 10208, 10214, 10227, 10232, 10237,
+ 10243, 10249, 10254, 10261, 10268, 10276, 10283, 10290, 10297, 10312,
+ 10318, 10324, 10333, 10344, 10351, 10357, 10365, 10371, 10377, 10383,
+ 10389, 10397, 10409, 10429, 10428, 10504, 10510, 10516, 10522, 10527,
+ 10532, 10537, 10542, 10547, 10552, 10572, 10574, 10579, 10580, 10584,
+ 10585, 10589, 10590, 10594, 10601, 10609, 10636, 10642, 10648, 10654,
+ 10660, 10666, 10675, 10682, 10684, 10681, 10691, 10702, 10708, 10714,
+ 10720, 10726, 10732, 10738, 10744, 10750, 10757, 10756, 10777, 10776,
+ 10807, 10806, 10820, 10829, 10847, 10849, 10851, 10866, 10873, 10880,
+ 10887, 10894, 10901, 10908, 10915, 10922, 10929, 10940, 10947, 10958,
+ 10969, 10989, 10988, 10994, 11011, 11017, 11026, 11035, 11045, 11044,
+ 11056, 11071, 11084, 11089, 11097, 11098, 11103, 11108, 11111, 11113,
+ 11117, 11122, 11130, 11131, 11136, 11143, 11153, 11152, 11169, 11171,
+ 11177, 11183, 11189, 11193, 11194, 11195, 11203, 11204, 11205, 11206,
+ 11207, 11208, 11209, 11210, 11214, 11215, 11216, 11217, 11224, 11225,
+ 11229, 11234, 11242, 11243, 11247, 11254, 11262, 11271, 11281, 11282,
+ 11293, 11294, 11306, 11310, 11314, 11322, 11323, 11327, 11331, 11335,
+ 11342, 11346, 11351, 11352, 11358, 11357, 11386, 11385, 11401, 11410,
+ 11422, 11434, 11435, 11436, 11437, 11442, 11443, 11444, 11445, 11446,
+ 11450, 11454, 11458, 11468, 11475, 11483, 11489, 11482, 11535, 11536,
+ 11542, 11547, 11561, 11569, 11567, 11587, 11585, 11598, 11610, 11608,
+ 11628, 11627, 11639, 11652, 11650, 11671, 11670, 11683, 11697, 11698,
+ 11699, 11703, 11704, 11712, 11713, 11717, 11726, 11727, 11728, 11733,
+ 11734, 11738, 11739, 11743, 11744, 11748, 11749, 11757, 11765, 11773,
+ 11774, 11787, 11803, 11822, 11823, 11828, 11832, 11833, 11834, 11838,
+ 11839, 11844, 11843, 11849, 11848, 11856, 11857, 11860, 11862, 11862,
+ 11866, 11866, 11871, 11872, 11876, 11878, 11883, 11884, 11888, 11899,
+ 11913, 11914, 11915, 11916, 11917, 11918, 11919, 11920, 11921, 11922,
+ 11923, 11924, 11928, 11929, 11930, 11931, 11932, 11933, 11934, 11935,
+ 11936, 11940, 11941, 11942, 11943, 11946, 11948, 11949, 11953, 11954,
+ 11958, 11966, 11968, 11972, 11974, 11973, 11987, 11990, 11989, 12007,
+ 12009, 12013, 12018, 12026, 12027, 12044, 12067, 12068, 12074, 12075,
+ 12079, 12092, 12091, 12100, 12101, 12110, 12111, 12115, 12116, 12120,
+ 12121, 12135, 12136, 12140, 12150, 12159, 12166, 12173, 12183, 12184,
+ 12191, 12201, 12202, 12204, 12206, 12208, 12210, 12219, 12223, 12224,
+ 12228, 12242, 12243, 12249, 12248, 12259, 12265, 12274, 12275, 12276,
+ 12282, 12283, 12288, 12295, 12301, 12306, 12317, 12327, 12338, 12345,
+ 12353, 12363, 12364, 12368, 12369, 12373, 12374, 12379, 12386, 12393,
+ 12400, 12410, 12415, 12420, 12424, 12430, 12436, 12445, 12453, 12457,
+ 12464, 12465, 12469, 12474, 12479, 12492, 12496, 12500, 12504, 12509,
+ 12512, 12516, 12530, 12538, 12549, 12551, 12555, 12556, 12560, 12561,
+ 12562, 12563, 12564, 12565, 12569, 12570, 12571, 12572, 12573, 12577,
+ 12578, 12579, 12580, 12584, 12585, 12586, 12587, 12588, 12592, 12593,
+ 12594, 12595, 12596, 12600, 12605, 12606, 12610, 12611, 12615, 12616,
+ 12617, 12622, 12621, 12653, 12654, 12658, 12659, 12663, 12673, 12673,
+ 12685, 12686, 12689, 12709, 12719, 12724, 12732, 12738, 12749, 12737,
+ 12751, 12766, 12778, 12777, 12800, 12799, 12809, 12808, 12831, 12837,
+ 12841, 12846, 12845, 12854, 12859, 12865, 12872, 12870, 12881, 12885,
+ 12886, 12890, 12902, 12915, 12916, 12920, 12934, 12938, 12947, 12950,
+ 12957, 12958, 12966, 12973, 12965, 12986, 12993, 12985, 13004, 13013,
+ 13022, 13030, 13031, 13035, 13036, 13040, 13041, 13049, 13049, 13052,
+ 13052, 13065, 13066, 13068, 13067, 13080, 13086, 13088, 13092, 13094,
+ 13100, 13104, 13105, 13109, 13110, 13114, 13124, 13125, 13129, 13130,
+ 13134, 13135, 13139, 13140, 13145, 13144, 13161, 13160, 13176, 13177,
+ 13181, 13182, 13186, 13191, 13199, 13207, 13218, 13219, 13228, 13229,
+ 13237, 13239, 13241, 13239, 13251, 13263, 13270, 13280, 13299, 13269,
+ 13306, 13307, 13311, 13318, 13326, 13327, 13331, 13341, 13342, 13349,
+ 13348, 13369, 13372, 13379, 13380, 13390, 13405, 13413, 13426, 13432,
+ 13425, 13437, 13443, 13436, 13451, 13455, 13454, 13488, 13489, 13493,
+ 13508, 13526, 13527, 13531, 13532, 13536, 13537, 13538, 13543, 13554,
+ 13542, 13564, 13566, 13569, 13571, 13574, 13575, 13578, 13582, 13586,
+ 13590, 13594, 13598, 13602, 13606, 13610, 13618, 13621, 13631, 13630,
+ 13649, 13656, 13664, 13672, 13680, 13688, 13696, 13703, 13710, 13716,
+ 13718, 13720, 13729, 13733, 13738, 13737, 13744, 13743, 13750, 13759,
+ 13766, 13771, 13776, 13781, 13786, 13791, 13793, 13795, 13797, 13804,
+ 13812, 13814, 13822, 13829, 13836, 13844, 13850, 13855, 13863, 13871,
+ 13879, 13883, 13887, 13894, 13901, 13908, 13915, 13921, 13927, 13933,
+ 13939, 13945, 13953, 13958, 13965, 13972, 13979, 13986, 13993, 14000,
+ 14005, 14010, 14015, 14020, 14025, 14037, 14045, 14067, 14069, 14071,
+ 14076, 14077, 14080, 14082, 14086, 14087, 14091, 14092, 14096, 14097,
+ 14101, 14102, 14106, 14107, 14111, 14112, 14121, 14133, 14132, 14151,
+ 14150, 14160, 14161, 14162, 14163, 14164, 14165, 14169, 14170, 14174,
+ 14181, 14182, 14184, 14185, 14189, 14190, 14203, 14204, 14205, 14221,
+ 14245, 14244, 14256, 14255, 14267, 14272, 14273, 14286, 14289, 14288,
+ 14301, 14302, 14307, 14309, 14311, 14313, 14315, 14317, 14325, 14327,
+ 14329, 14331, 14336, 14338, 14346, 14348, 14350, 14352, 14354, 14356,
+ 14373, 14374, 14378, 14382, 14395, 14394, 14409, 14419, 14420, 14423,
+ 14425, 14426, 14430, 14446, 14447, 14452, 14451, 14461, 14462, 14466,
+ 14466, 14471, 14470, 14476, 14480, 14481, 14485, 14486, 14493, 14498,
+ 14497, 14512, 14511, 14526, 14527, 14528, 14532, 14533, 14534, 14543,
+ 14544, 14548, 14552, 14560, 14560, 14565, 14566, 14575, 14587, 14601,
+ 14612, 14625, 14586, 14636, 14637, 14641, 14642, 14646, 14647, 14655,
+ 14659, 14660, 14661, 14664, 14666, 14670, 14671, 14675, 14680, 14687,
+ 14692, 14699, 14701, 14705, 14706, 14710, 14715, 14723, 14724, 14728,
+ 14730, 14738, 14739, 14743, 14744, 14745, 14749, 14751, 14756, 14757,
+ 14772, 14773, 14777, 14778, 14782, 14795, 14800, 14805, 14810, 14818,
+ 14826, 14831, 14839, 14847, 14862, 14869, 14875, 14885, 14886, 14894,
+ 14895, 14896, 14897, 14911, 14917, 14923, 14929, 14935, 14941, 14962,
+ 14972, 14982, 14988, 14995, 15005, 15012, 15019, 15030, 15029, 15054,
+ 15055, 15060, 15061, 15066, 15090, 15093, 15092, 15108, 15112, 15117,
+ 15121, 15128, 15134, 15143, 15161, 15162, 15166, 15171, 15179, 15184,
+ 15192, 15197, 15202, 15207, 15213, 15218, 15226, 15231, 15236, 15241,
+ 15247, 15255, 15256, 15267, 15275, 15279, 15285, 15291, 15301, 15307,
+ 15316, 15326, 15327, 15331, 15332, 15333, 15337, 15345, 15346, 15347,
+ 15348, 15352, 15361, 15369, 15377, 15385, 15386, 15394, 15395, 15399,
+ 15400, 15405, 15414, 15415, 15423, 15424, 15432, 15433, 15434, 15438,
+ 15449, 15478, 15487, 15487, 15489, 15499, 15500, 15501, 15502, 15503,
+ 15504, 15505, 15506, 15507, 15508, 15509, 15510, 15515, 15516, 15517,
+ 15518, 15519, 15520, 15521, 15522, 15523, 15524, 15525, 15526, 15527,
+ 15531, 15532, 15533, 15534, 15535, 15536, 15537, 15538, 15539, 15540,
+ 15541, 15542, 15543, 15547, 15548, 15549, 15550, 15551, 15552, 15553,
+ 15554, 15555, 15556, 15557, 15558, 15559, 15563, 15564, 15565, 15566,
+ 15567, 15568, 15569, 15570, 15583, 15584, 15585, 15586, 15587, 15588,
+ 15589, 15590, 15591, 15592, 15593, 15594, 15595, 15596, 15597, 15598,
+ 15599, 15600, 15601, 15602, 15603, 15604, 15605, 15606, 15607, 15608,
+ 15609, 15610, 15611, 15612, 15613, 15614, 15615, 15616, 15617, 15618,
+ 15619, 15620, 15621, 15622, 15623, 15624, 15625, 15626, 15627, 15628,
+ 15629, 15630, 15631, 15632, 15633, 15634, 15635, 15676, 15677, 15678,
+ 15679, 15680, 15681, 15692, 15693, 15694, 15695, 15696, 15697, 15698,
+ 15699, 15700, 15701, 15705, 15706, 15707, 15711, 15712, 15713, 15722,
+ 15723, 15724, 15725, 15726, 15727, 15728, 15729, 15730, 15731, 15732,
+ 15733, 15734, 15735, 15736, 15737, 15738, 15739, 15740, 15741, 15742,
+ 15743, 15744, 15745, 15746, 15747, 15752, 15757, 15758, 15759, 15760,
+ 15761, 15762, 15763, 15764, 15765, 15766, 15767, 15768, 15769, 15770,
+ 15771, 15772, 15773, 15774, 15775, 15776, 15777, 15778, 15779, 15780,
+ 15781, 15782, 15783, 15784, 15785, 15786, 15787, 15788, 15789, 15790,
+ 15791, 15792, 15793, 15794, 15795, 15796, 15797, 15798, 15799, 15800,
+ 15805, 15806, 15807, 15808, 15809, 15810, 15811, 15812, 15813, 15814,
+ 15815, 15816, 15817, 15818, 15819, 15820, 15821, 15822, 15823, 15824,
+ 15825, 15826, 15827, 15828, 15829, 15830, 15831, 15832, 15833, 15834,
+ 15835, 15836, 15837, 15838, 15839, 15840, 15841, 15842, 15843, 15844,
+ 15845, 15846, 15847, 15848, 15849, 15850, 15851, 15852, 15853, 15854,
+ 15855, 15856, 15857, 15858, 15859, 15860, 15861, 15862, 15863, 15864,
+ 15865, 15866, 15867, 15868, 15869, 15870, 15871, 15872, 15873, 15874,
+ 15875, 15876, 15877, 15878, 15879, 15880, 15881, 15882, 15883, 15884,
+ 15885, 15886, 15887, 15888, 15889, 15890, 15891, 15892, 15893, 15894,
+ 15895, 15896, 15897, 15898, 15899, 15900, 15901, 15902, 15903, 15904,
+ 15905, 15906, 15907, 15908, 15909, 15910, 15911, 15912, 15913, 15914,
+ 15915, 15917, 15919, 15920, 15921, 15922, 15923, 15924, 15925, 15926,
+ 15927, 15928, 15929, 15930, 15931, 15932, 15933, 15934, 15935, 15936,
+ 15937, 15938, 15939, 15940, 15941, 15942, 15943, 15944, 15945, 15946,
+ 15947, 15948, 15949, 15950, 15951, 15952, 15953, 15954, 15955, 15956,
+ 15957, 15958, 15959, 15960, 15961, 15962, 15963, 15964, 15965, 15966,
+ 15967, 15968, 15969, 15970, 15971, 15972, 15973, 15974, 15975, 15976,
+ 15977, 15978, 15979, 15980, 15981, 15982, 15983, 15984, 15985, 15986,
+ 15987, 15988, 15989, 15990, 15991, 15992, 15993, 15994, 15995, 15996,
+ 15997, 15998, 15999, 16000, 16001, 16002, 16003, 16004, 16005, 16006,
+ 16007, 16008, 16009, 16010, 16011, 16012, 16013, 16014, 16015, 16016,
+ 16017, 16018, 16019, 16020, 16021, 16022, 16023, 16024, 16025, 16026,
+ 16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034, 16035, 16036,
+ 16037, 16038, 16039, 16040, 16041, 16042, 16043, 16044, 16045, 16046,
+ 16047, 16048, 16049, 16050, 16051, 16052, 16053, 16054, 16055, 16056,
+ 16057, 16058, 16059, 16060, 16061, 16062, 16063, 16064, 16068, 16069,
+ 16075, 16076, 16077, 16078, 16079, 16080, 16081, 16082, 16083, 16084,
+ 16085, 16086, 16087, 16088, 16089, 16091, 16093, 16094, 16095, 16096,
+ 16098, 16100, 16101, 16102, 16103, 16104, 16105, 16110, 16111, 16112,
+ 16113, 16114, 16115, 16116, 16117, 16118, 16119, 16120, 16121, 16122,
+ 16123, 16124, 16125, 16126, 16127, 16128, 16129, 16130, 16131, 16132,
+ 16133, 16134, 16135, 16136, 16137, 16138, 16139, 16140, 16141, 16142,
+ 16143, 16144, 16145, 16146, 16147, 16148, 16149, 16150, 16151, 16152,
+ 16153, 16154, 16155, 16156, 16157, 16158, 16159, 16160, 16161, 16162,
+ 16163, 16164, 16165, 16166, 16167, 16168, 16169, 16170, 16171, 16172,
+ 16173, 16174, 16175, 16176, 16177, 16178, 16179, 16180, 16181, 16182,
+ 16183, 16184, 16185, 16186, 16187, 16188, 16189, 16190, 16191, 16192,
+ 16193, 16194, 16195, 16196, 16197, 16198, 16199, 16200, 16201, 16202,
+ 16203, 16204, 16205, 16206, 16207, 16208, 16209, 16210, 16211, 16212,
+ 16213, 16214, 16215, 16216, 16217, 16218, 16219, 16220, 16221, 16222,
+ 16223, 16224, 16225, 16226, 16227, 16228, 16229, 16233, 16234, 16235,
+ 16236, 16237, 16238, 16239, 16240, 16241, 16242, 16243, 16244, 16245,
+ 16246, 16247, 16248, 16249, 16250, 16251, 16252, 16253, 16254, 16255,
+ 16256, 16257, 16258, 16259, 16260, 16261, 16262, 16263, 16264, 16265,
+ 16266, 16267, 16268, 16269, 16270, 16271, 16272, 16273, 16274, 16275,
+ 16276, 16277, 16278, 16279, 16280, 16281, 16282, 16283, 16284, 16285,
+ 16286, 16287, 16288, 16289, 16290, 16291, 16292, 16293, 16294, 16295,
+ 16296, 16297, 16298, 16299, 16300, 16301, 16302, 16303, 16304, 16305,
+ 16306, 16307, 16308, 16309, 16310, 16311, 16312, 16313, 16314, 16315,
+ 16316, 16317, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325,
+ 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335,
+ 16336, 16337, 16338, 16339, 16340, 16341, 16342, 16343, 16344, 16345,
+ 16346, 16347, 16359, 16358, 16371, 16372, 16374, 16373, 16385, 16384,
+ 16391, 16389, 16409, 16410, 16415, 16416, 16418, 16417, 16431, 16432,
+ 16438, 16437, 16442, 16446, 16447, 16448, 16452, 16453, 16454, 16455,
+ 16459, 16460, 16461, 16462, 16471, 16470, 16484, 16483, 16498, 16497,
+ 16515, 16514, 16528, 16527, 16541, 16540, 16556, 16555, 16569, 16568,
+ 16582, 16581, 16594, 16593, 16611, 16610, 16622, 16621, 16633, 16632,
+ 16643, 16661, 16672, 16679, 16688, 16710, 16726, 16738, 16737, 16751,
+ 16750, 16762, 16761, 16775, 16776, 16777, 16778, 16782, 16801, 16819,
+ 16820, 16824, 16825, 16826, 16827, 16832, 16837, 16842, 16853, 16854,
+ 16855, 16861, 16867, 16879, 16878, 16892, 16893, 16899, 16908, 16909,
+ 16913, 16914, 16918, 16937, 16938, 16939, 16944, 16945, 16950, 16949,
+ 16967, 16966, 16978, 16987, 16997, 16996, 17039, 17040, 17044, 17045,
+ 17049, 17050, 17051, 17052, 17054, 17053, 17066, 17067, 17068, 17069,
+ 17070, 17076, 17081, 17086, 17091, 17095, 17100, 17109, 17111, 17116,
+ 17121, 17127, 17133, 17138, 17150, 17151, 17155, 17156, 17160, 17165,
+ 17173, 17182, 17203, 17203, 17205, 17207, 17211, 17212, 17219, 17221,
+ 17225, 17230, 17237, 17241, 17250, 17257, 17258, 17259, 17260, 17264,
+ 17265, 17266, 17267, 17268, 17269, 17270, 17271, 17272, 17273, 17274,
+ 17275, 17276, 17277, 17278, 17279, 17280, 17281, 17282, 17283, 17284,
+ 17285, 17286, 17287, 17288, 17289, 17290, 17291, 17292, 17293, 17294,
+ 17295, 17296, 17297, 17298, 17299, 17300, 17301, 17302, 17303, 17304,
+ 17305, 17309, 17310, 17314, 17315, 17319, 17326, 17333, 17343, 17352,
+ 17358, 17365, 17373, 17378, 17386, 17391, 17399, 17404, 17411, 17411,
+ 17412, 17412, 17415, 17421, 17427, 17432, 17439, 17445, 17452, 17461,
+ 17465, 17471, 17479, 17481, 17485, 17489, 17493, 17500, 17505, 17510,
+ 17515, 17520, 17528, 17529, 17533, 17534, 17539, 17540, 17544, 17545,
+ 17549, 17550, 17554, 17555, 17560, 17559, 17569, 17578, 17579, 17583,
+ 17584, 17589, 17590, 17591, 17596, 17597, 17598, 17602, 17614, 17623,
+ 17629, 17638, 17647, 17660, 17662, 17664, 17672, 17673, 17674, 17678,
+ 17679, 17685, 17686, 17687, 17688, 17689, 17690, 17691, 17701, 17702,
+ 17707, 17720, 17734, 17735, 17736, 17740, 17741, 17745, 17746, 17751,
+ 17752, 17756, 17762, 17771, 17771, 17785, 17786, 17787, 17788, 17798,
+ 17800, 17806, 17812, 17822, 17831, 17837, 17842, 17846, 17820, 17895,
+ 17895, 17910, 17914, 17918, 17922, 17926, 17930, 17938, 17939, 17955,
+ 17962, 17969, 17982, 17983, 17984, 17988, 17989, 17990, 17994, 17995,
+ 18000, 18002, 18001, 18007, 18008, 18012, 18017, 18024, 18029, 18038,
+ 18044, 18052, 18056, 18060, 18064, 18068, 18069, 18070, 18074, 18075,
+ 18080, 18081, 18087, 18088, 18089, 18090, 18091, 18092, 18093, 18097,
+ 18098, 18099, 18100, 18101, 18102, 18103, 18104, 18105, 18106, 18107,
+ 18108, 18112, 18117, 18121, 18130, 18129, 18142, 18147, 18151, 18155,
+ 18164, 18165, 18169, 18177, 18188, 18193, 18197, 18202, 18207, 18211,
+ 18218, 18224, 18229, 18239, 18238, 18253, 18261, 18252, 18273, 18278,
+ 18283, 18293, 18292, 18303, 18301, 18315, 18313, 18325, 18336, 18340,
+ 18352, 18357, 18358, 18365, 18367, 18366, 18394, 18395, 18396, 18397,
+ 18398, 18402, 18403, 18404, 18405, 18406, 18407, 18408, 18409, 18413,
+ 18414, 18415, 18416, 18423, 18421, 18438, 18437, 18452, 18451
+};
+#endif
+
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "\"end of file\"", "error", "\"invalid token\"", "'@'", "ABORT_SYM",
+ "IMPOSSIBLE_ACTION", "FORCE_LOOKAHEAD", "END_OF_INPUT",
+ "COLON_ORACLE_SYM", "PARAM_MARKER", "FOR_SYSTEM_TIME_SYM",
+ "LEFT_PAREN_ALT", "LEFT_PAREN_WITH", "LEFT_PAREN_LIKE",
+ "ORACLE_CONCAT_SYM", "PERCENT_ORACLE_SYM", "WITH_CUBE_SYM",
+ "WITH_ROLLUP_SYM", "WITH_SYSTEM_SYM", "IDENT", "IDENT_QUOTED",
+ "LEX_HOSTNAME", "UNDERSCORE_CHARSET", "BIN_NUM", "DECIMAL_NUM",
+ "FLOAT_NUM", "HEX_NUM", "HEX_STRING", "LONG_NUM", "NCHAR_STRING", "NUM",
+ "TEXT_STRING", "ULONGLONG_NUM", "AND_AND_SYM", "DOT_DOT_SYM",
+ "EQUAL_SYM", "GE", "LE", "MYSQL_CONCAT_SYM", "NE", "NOT2_SYM", "OR2_SYM",
+ "SET_VAR", "SHIFT_LEFT", "SHIFT_RIGHT", "ACCESSIBLE_SYM", "ADD", "ALL",
+ "ALTER", "ANALYZE_SYM", "AND_SYM", "ASC", "ASENSITIVE_SYM", "AS",
+ "BEFORE_SYM", "BETWEEN_SYM", "BIGINT", "BINARY", "BIT_AND", "BIT_OR",
+ "BIT_XOR", "BLOB_MARIADB_SYM", "BLOB_ORACLE_SYM", "BODY_ORACLE_SYM",
+ "BOTH", "BY", "CALL_SYM", "CASCADE", "CASE_SYM", "CAST_SYM", "CHANGE",
+ "CHAR_SYM", "CHECK_SYM", "COLLATE_SYM", "CONDITION_SYM", "CONSTRAINT",
+ "CONTINUE_MARIADB_SYM", "CONTINUE_ORACLE_SYM", "CONVERT_SYM",
+ "COUNT_SYM", "CREATE", "CROSS", "CUME_DIST_SYM", "CURDATE",
+ "CURRENT_ROLE", "CURRENT_USER", "CURSOR_SYM", "CURTIME", "DATABASE",
+ "DATABASES", "DATE_ADD_INTERVAL", "DATE_SUB_INTERVAL", "DAY_HOUR_SYM",
+ "DAY_MICROSECOND_SYM", "DAY_MINUTE_SYM", "DAY_SECOND_SYM", "DECIMAL_SYM",
+ "DECLARE_MARIADB_SYM", "DECLARE_ORACLE_SYM", "DEFAULT",
+ "DELETE_DOMAIN_ID_SYM", "DELETE_SYM", "DENSE_RANK_SYM", "DESCRIBE",
+ "DESC", "DETERMINISTIC_SYM", "DISTINCT", "DIV_SYM", "DO_DOMAIN_IDS_SYM",
+ "DOUBLE_SYM", "DROP", "DUAL_SYM", "EACH_SYM", "ELSEIF_MARIADB_SYM",
+ "ELSE", "ELSIF_ORACLE_SYM", "EMPTY_SYM", "ENCLOSED", "ESCAPED",
+ "EXCEPT_SYM", "EXISTS", "EXTRACT_SYM", "FALSE_SYM", "FETCH_SYM",
+ "FIRST_VALUE_SYM", "FLOAT_SYM", "FOREIGN", "FOR_SYM", "FROM",
+ "FULLTEXT_SYM", "GOTO_ORACLE_SYM", "GRANT", "GROUP_CONCAT_SYM",
+ "JSON_ARRAYAGG_SYM", "JSON_OBJECTAGG_SYM", "JSON_TABLE_SYM", "GROUP_SYM",
+ "HAVING", "HOUR_MICROSECOND_SYM", "HOUR_MINUTE_SYM", "HOUR_SECOND_SYM",
+ "IF_SYM", "IGNORE_DOMAIN_IDS_SYM", "IGNORE_SYM", "IGNORED_SYM",
+ "INDEX_SYM", "INFILE", "INNER_SYM", "INOUT_SYM", "INSENSITIVE_SYM",
+ "INSERT", "IN_SYM", "INTERSECT_SYM", "INTERVAL_SYM", "INTO", "INT_SYM",
+ "IS", "ITERATE_SYM", "JOIN_SYM", "KEYS", "KEY_SYM", "KILL_SYM",
+ "LAG_SYM", "LEADING", "LEAD_SYM", "LEAVE_SYM", "LEFT", "LIKE", "LIMIT",
+ "LINEAR_SYM", "LINES", "LOAD", "LOCATOR_SYM", "LOCK_SYM", "LONGBLOB",
+ "LONG_SYM", "LONGTEXT", "LOOP_SYM", "LOW_PRIORITY",
+ "MASTER_SSL_VERIFY_SERVER_CERT_SYM", "MATCH", "MAX_SYM", "MAXVALUE_SYM",
+ "MEDIAN_SYM", "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MIN_SYM",
+ "MINUS_ORACLE_SYM", "MINUTE_MICROSECOND_SYM", "MINUTE_SECOND_SYM",
+ "MODIFIES_SYM", "MOD_SYM", "NATURAL", "NEG", "NESTED_SYM", "NOT_SYM",
+ "NO_WRITE_TO_BINLOG", "NOW_SYM", "NTH_VALUE_SYM", "NTILE_SYM",
+ "NULL_SYM", "NUMERIC_SYM", "ON", "OPTIMIZE", "OPTIONALLY", "ORDER_SYM",
+ "ORDINALITY_SYM", "OR_SYM", "OTHERS_ORACLE_SYM", "OUTER", "OUTFILE",
+ "OUT_SYM", "OVER_SYM", "PACKAGE_ORACLE_SYM", "PAGE_CHECKSUM_SYM",
+ "PARSE_VCOL_EXPR_SYM", "PARTITION_SYM", "PATH_SYM",
+ "PERCENTILE_CONT_SYM", "PERCENTILE_DISC_SYM", "PERCENT_RANK_SYM",
+ "PORTION_SYM", "POSITION_SYM", "PRECISION", "PRIMARY_SYM",
+ "PROCEDURE_SYM", "PURGE", "RAISE_ORACLE_SYM", "RANGE_SYM", "RANK_SYM",
+ "READS_SYM", "READ_SYM", "READ_WRITE_SYM", "REAL", "RECURSIVE_SYM",
+ "REFERENCES", "REF_SYSTEM_ID_SYM", "REGEXP", "RELEASE_SYM", "RENAME",
+ "REPEAT_SYM", "REQUIRE_SYM", "RESIGNAL_SYM", "RESTRICT", "RETURNING_SYM",
+ "RETURN_MARIADB_SYM", "RETURN_ORACLE_SYM", "REVOKE", "RIGHT",
+ "ROW_NUMBER_SYM", "ROWS_SYM", "ROWTYPE_ORACLE_SYM",
+ "SECOND_MICROSECOND_SYM", "SELECT_SYM", "SENSITIVE_SYM", "SEPARATOR_SYM",
+ "SERVER_OPTIONS", "SET", "SHOW", "SIGNAL_SYM", "SMALLINT", "SPATIAL_SYM",
+ "SPECIFIC_SYM", "SQL_BIG_RESULT", "SQLEXCEPTION_SYM", "SQL_SMALL_RESULT",
+ "SQLSTATE_SYM", "SQL_SYM", "SQLWARNING_SYM", "SSL_SYM", "STARTING",
+ "STATS_AUTO_RECALC_SYM", "STATS_PERSISTENT_SYM",
+ "STATS_SAMPLE_PAGES_SYM", "STDDEV_SAMP_SYM", "STD_SYM", "STRAIGHT_JOIN",
+ "SUM_SYM", "SYSDATE", "TABLE_REF_PRIORITY", "TABLE_SYM", "TERMINATED",
+ "THEN_SYM", "TINYBLOB", "TINYINT", "TINYTEXT", "TO_SYM", "TRAILING",
+ "TRIGGER_SYM", "TRUE_SYM", "UNDO_SYM", "UNION_SYM", "UNIQUE_SYM",
+ "UNLOCK_SYM", "UNSIGNED", "UPDATE_SYM", "USAGE", "USE_SYM", "USING",
+ "UTC_DATE_SYM", "UTC_TIMESTAMP_SYM", "UTC_TIME_SYM", "VALUES_IN_SYM",
+ "VALUES_LESS_SYM", "VALUES", "VARBINARY", "VARCHAR", "VARIANCE_SYM",
+ "VAR_SAMP_SYM", "VARYING", "WHEN_SYM", "WHERE", "WHILE_SYM", "WITH",
+ "XOR", "YEAR_MONTH_SYM", "ZEROFILL", "BODY_MARIADB_SYM",
+ "ELSEIF_ORACLE_SYM", "ELSIF_MARIADB_SYM", "EXCEPTION_ORACLE_SYM",
+ "GOTO_MARIADB_SYM", "OTHERS_MARIADB_SYM", "PACKAGE_MARIADB_SYM",
+ "RAISE_MARIADB_SYM", "ROWTYPE_MARIADB_SYM", "ROWNUM_SYM", "REPLACE",
+ "SUBSTRING", "TRIM", "ACCOUNT_SYM", "ACTION", "ADMIN_SYM", "ADDDATE_SYM",
+ "AFTER_SYM", "AGAINST", "AGGREGATE_SYM", "ALGORITHM_SYM", "ALWAYS_SYM",
+ "ANY_SYM", "ASCII_SYM", "AT_SYM", "ATOMIC_SYM", "AUTHORS_SYM",
+ "AUTOEXTEND_SIZE_SYM", "AUTO_INC", "AUTO_SYM", "AVG_ROW_LENGTH",
+ "AVG_SYM", "BACKUP_SYM", "BEGIN_MARIADB_SYM", "BEGIN_ORACLE_SYM",
+ "BINLOG_SYM", "BIT_SYM", "BLOCK_SYM", "BOOL_SYM", "BOOLEAN_SYM",
+ "BTREE_SYM", "BYTE_SYM", "CACHE_SYM", "CASCADED", "CATALOG_NAME_SYM",
+ "CHAIN_SYM", "CHANGED", "CHANNEL_SYM", "CHARSET", "CHECKPOINT_SYM",
+ "CHECKSUM_SYM", "CIPHER_SYM", "CLASS_ORIGIN_SYM", "CLIENT_SYM",
+ "CLOB_MARIADB_SYM", "CLOB_ORACLE_SYM", "CLOSE_SYM", "COALESCE",
+ "CODE_SYM", "COLLATION_SYM", "COLUMNS", "COLUMN_ADD_SYM",
+ "COLUMN_CHECK_SYM", "COLUMN_CREATE_SYM", "COLUMN_DELETE_SYM",
+ "COLUMN_GET_SYM", "COLUMN_SYM", "COLUMN_NAME_SYM", "COMMENT_SYM",
+ "COMMITTED_SYM", "COMMIT_SYM", "COMPACT_SYM", "COMPLETION_SYM",
+ "COMPRESSED_SYM", "CONCURRENT", "CONNECTION_SYM", "CONSISTENT_SYM",
+ "CONSTRAINT_CATALOG_SYM", "CONSTRAINT_NAME_SYM", "CONSTRAINT_SCHEMA_SYM",
+ "CONTAINS_SYM", "CONTEXT_SYM", "CONTRIBUTORS_SYM", "CPU_SYM", "CUBE_SYM",
+ "CURRENT_SYM", "CURRENT_POS_SYM", "CURSOR_NAME_SYM", "CYCLE_SYM",
+ "DATAFILE_SYM", "DATA_SYM", "DATETIME", "DATE_SYM", "DAY_SYM",
+ "DEALLOCATE_SYM", "DEFINER_SYM", "DELAYED_SYM", "DELAY_KEY_WRITE_SYM",
+ "DES_KEY_FILE", "DIAGNOSTICS_SYM", "DIRECTORY_SYM", "DISABLE_SYM",
+ "DISCARD", "DISK_SYM", "DO_SYM", "DUMPFILE", "DUPLICATE_SYM",
+ "DYNAMIC_SYM", "ENABLE_SYM", "END", "ENDS_SYM", "ENGINES_SYM",
+ "ENGINE_SYM", "ENUM", "ERROR_SYM", "ERRORS", "ESCAPE_SYM", "EVENTS_SYM",
+ "EVENT_SYM", "EVERY_SYM", "EXCHANGE_SYM", "EXAMINED_SYM", "EXCLUDE_SYM",
+ "EXECUTE_SYM", "EXCEPTION_MARIADB_SYM", "EXIT_MARIADB_SYM",
+ "EXIT_ORACLE_SYM", "EXPANSION_SYM", "EXPIRE_SYM", "EXPORT_SYM",
+ "EXTENDED_SYM", "EXTENT_SIZE_SYM", "FAST_SYM", "FAULTS_SYM",
+ "FEDERATED_SYM", "FILE_SYM", "FIRST_SYM", "FIXED_SYM", "FLUSH_SYM",
+ "FOLLOWS_SYM", "FOLLOWING_SYM", "FORCE_SYM", "FORMAT_SYM", "FOUND_SYM",
+ "FULL", "FUNCTION_SYM", "GENERAL", "GENERATED_SYM", "GET_FORMAT",
+ "GET_SYM", "GLOBAL_SYM", "GRANTS", "HANDLER_SYM", "HARD_SYM", "HASH_SYM",
+ "HELP_SYM", "HIGH_PRIORITY", "HISTORY_SYM", "HOST_SYM", "HOSTS_SYM",
+ "HOUR_SYM", "ID_SYM", "IDENTIFIED_SYM", "IGNORE_SERVER_IDS_SYM",
+ "IMMEDIATE_SYM", "IMPORT", "INCREMENT_SYM", "INDEXES",
+ "INITIAL_SIZE_SYM", "INSERT_METHOD", "INSTALL_SYM", "INVOKER_SYM",
+ "IO_SYM", "IPC_SYM", "ISOLATION", "ISOPEN_SYM", "ISSUER_SYM",
+ "INVISIBLE_SYM", "JSON_SYM", "KEY_BLOCK_SIZE", "LANGUAGE_SYM",
+ "LAST_SYM", "LAST_VALUE", "LASTVAL_SYM", "LEAVES", "LESS_SYM",
+ "LEVEL_SYM", "LIST_SYM", "LOCAL_SYM", "LOCKED_SYM", "LOCKS_SYM",
+ "LOGFILE_SYM", "LOGS_SYM", "MASTER_CONNECT_RETRY_SYM",
+ "MASTER_DELAY_SYM", "MASTER_GTID_POS_SYM", "MASTER_HOST_SYM",
+ "MASTER_LOG_FILE_SYM", "MASTER_LOG_POS_SYM", "MASTER_PASSWORD_SYM",
+ "MASTER_PORT_SYM", "MASTER_SERVER_ID_SYM", "MASTER_SSL_CAPATH_SYM",
+ "MASTER_SSL_CA_SYM", "MASTER_SSL_CERT_SYM", "MASTER_SSL_CIPHER_SYM",
+ "MASTER_SSL_CRL_SYM", "MASTER_SSL_CRLPATH_SYM", "MASTER_SSL_KEY_SYM",
+ "MASTER_SSL_SYM", "MASTER_SYM", "MASTER_USER_SYM", "MASTER_USE_GTID_SYM",
+ "MASTER_HEARTBEAT_PERIOD_SYM", "MASTER_DEMOTE_TO_SLAVE_SYM",
+ "MAX_CONNECTIONS_PER_HOUR", "MAX_QUERIES_PER_HOUR", "MAX_ROWS",
+ "MAX_SIZE_SYM", "MAX_UPDATES_PER_HOUR", "MAX_STATEMENT_TIME_SYM",
+ "MAX_USER_CONNECTIONS_SYM", "MEDIUM_SYM", "MEMORY_SYM", "MERGE_SYM",
+ "MESSAGE_TEXT_SYM", "MICROSECOND_SYM", "MIGRATE_SYM", "MINUTE_SYM",
+ "MINVALUE_SYM", "MIN_ROWS", "MODE_SYM", "MODIFY_SYM", "MONITOR_SYM",
+ "MONTH_SYM", "MUTEX_SYM", "MYSQL_SYM", "MYSQL_ERRNO_SYM", "NAMES_SYM",
+ "NAME_SYM", "NATIONAL_SYM", "NCHAR_SYM", "NEVER_SYM", "NEXT_SYM",
+ "NEXTVAL_SYM", "NOCACHE_SYM", "NOCYCLE_SYM", "NODEGROUP_SYM", "NONE_SYM",
+ "NOTFOUND_SYM", "NO_SYM", "NOMAXVALUE_SYM", "NOMINVALUE_SYM",
+ "NO_WAIT_SYM", "NOWAIT_SYM", "NUMBER_MARIADB_SYM", "NUMBER_ORACLE_SYM",
+ "NVARCHAR_SYM", "OF_SYM", "OFFSET_SYM", "OLD_PASSWORD_SYM", "ONE_SYM",
+ "ONLY_SYM", "ONLINE_SYM", "OPEN_SYM", "OPTIONS_SYM", "OPTION",
+ "OVERLAPS_SYM", "OWNER_SYM", "PACK_KEYS_SYM", "PAGE_SYM", "PARSER_SYM",
+ "PARTIAL", "PARTITIONS_SYM", "PARTITIONING_SYM", "PASSWORD_SYM",
+ "PERIOD_SYM", "PERSISTENT_SYM", "PHASE_SYM", "PLUGINS_SYM", "PLUGIN_SYM",
+ "PORT_SYM", "PRECEDES_SYM", "PRECEDING_SYM", "PREPARE_SYM",
+ "PRESERVE_SYM", "PREV_SYM", "PREVIOUS_SYM", "PRIVILEGES", "PROCESS",
+ "PROCESSLIST_SYM", "PROFILE_SYM", "PROFILES_SYM", "PROXY_SYM",
+ "QUARTER_SYM", "QUERY_SYM", "QUICK", "RAW_MARIADB_SYM", "RAW_ORACLE_SYM",
+ "READ_ONLY_SYM", "REBUILD_SYM", "RECOVER_SYM", "REDOFILE_SYM",
+ "REDO_BUFFER_SIZE_SYM", "REDUNDANT_SYM", "RELAY", "RELAYLOG_SYM",
+ "RELAY_LOG_FILE_SYM", "RELAY_LOG_POS_SYM", "RELAY_THREAD", "RELOAD",
+ "REMOVE_SYM", "REORGANIZE_SYM", "REPAIR", "REPEATABLE_SYM", "REPLAY_SYM",
+ "REPLICATION", "RESET_SYM", "RESTART_SYM", "RESOURCES", "RESTORE_SYM",
+ "RESUME_SYM", "RETURNED_SQLSTATE_SYM", "RETURNS_SYM", "REUSE_SYM",
+ "REVERSE_SYM", "ROLE_SYM", "ROLLBACK_SYM", "ROLLUP_SYM", "ROUTINE_SYM",
+ "ROWCOUNT_SYM", "ROW_SYM", "ROW_COUNT_SYM", "ROW_FORMAT_SYM",
+ "RTREE_SYM", "SAVEPOINT_SYM", "SCHEDULE_SYM", "SCHEMA_NAME_SYM",
+ "SECOND_SYM", "SECURITY_SYM", "SEQUENCE_SYM", "SERIALIZABLE_SYM",
+ "SERIAL_SYM", "SESSION_SYM", "SERVER_SYM", "SETVAL_SYM", "SHARE_SYM",
+ "SHUTDOWN", "SIGNED_SYM", "SIMPLE_SYM", "SKIP_SYM", "SLAVE", "SLAVES",
+ "SLAVE_POS_SYM", "SLOW", "SNAPSHOT_SYM", "SOCKET_SYM", "SOFT_SYM",
+ "SONAME_SYM", "SOUNDS_SYM", "SOURCE_SYM", "SQL_BUFFER_RESULT",
+ "SQL_CACHE_SYM", "SQL_CALC_FOUND_ROWS", "SQL_NO_CACHE_SYM", "SQL_THREAD",
+ "STAGE_SYM", "STARTS_SYM", "START_SYM", "STATEMENT_SYM", "STATUS_SYM",
+ "STOP_SYM", "STORAGE_SYM", "STORED_SYM", "STRING_SYM",
+ "SUBCLASS_ORIGIN_SYM", "SUBDATE_SYM", "SUBJECT_SYM", "SUBPARTITIONS_SYM",
+ "SUBPARTITION_SYM", "SUPER_SYM", "SUSPEND_SYM", "SWAPS_SYM",
+ "SWITCHES_SYM", "SYSTEM", "SYSTEM_TIME_SYM", "TABLES", "TABLESPACE",
+ "TABLE_CHECKSUM_SYM", "TABLE_NAME_SYM", "TEMPORARY", "TEMPTABLE_SYM",
+ "TEXT_SYM", "THAN_SYM", "TIES_SYM", "TIMESTAMP", "TIMESTAMP_ADD",
+ "TIMESTAMP_DIFF", "TIME_SYM", "TRANSACTION_SYM", "TRANSACTIONAL_SYM",
+ "THREADS_SYM", "TRIGGERS_SYM", "TRIM_ORACLE", "TRUNCATE_SYM", "TYPE_SYM",
+ "UDF_RETURNS_SYM", "UNBOUNDED_SYM", "UNCOMMITTED_SYM", "UNDEFINED_SYM",
+ "UNDOFILE_SYM", "UNDO_BUFFER_SIZE_SYM", "UNICODE_SYM", "UNINSTALL_SYM",
+ "UNKNOWN_SYM", "UNTIL_SYM", "UPGRADE_SYM", "USER_SYM", "USE_FRM",
+ "VALUE_SYM", "VARCHAR2_MARIADB_SYM", "VARCHAR2_ORACLE_SYM", "VARIABLES",
+ "VERSIONING_SYM", "VIA_SYM", "VIEW_SYM", "VISIBLE_SYM", "VIRTUAL_SYM",
+ "WAIT_SYM", "WARNINGS", "WEEK_SYM", "WEIGHT_STRING_SYM", "WINDOW_SYM",
+ "WITHIN", "WITHOUT", "WORK_SYM", "WRAPPER_SYM", "WRITE_SYM", "X509_SYM",
+ "XA_SYM", "XML_SYM", "YEAR_SYM", "CONDITIONLESS_JOIN", "ON_SYM",
+ "PREC_BELOW_NOT", "'='", "'>'", "'<'", "'|'", "'&'", "'-'", "'+'", "'*'",
+ "'/'", "'%'", "'^'", "'~'", "SUBQUERY_AS_EXPR",
+ "PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE", "USER",
+ "PREC_BELOW_CONTRACTION_TOKEN2", "'('", "')'", "EMPTY_FROM_CLAUSE",
+ "','", "'!'", "'{'", "'}'", "';'", "'.'", "':'", "$accept", "query",
+ "$@1", "opt_end_of_input", "directly_executable_statement",
+ "verb_clause", "deallocate", "deallocate_or_drop", "prepare", "$@2",
+ "execute", "$@3", "$@4", "execute_using", "$@5", "execute_params",
+ "help", "$@6", "change", "$@7", "master_defs", "master_def",
+ "ignore_server_id_list", "ignore_server_id", "do_domain_id_list",
+ "do_domain_id", "ignore_domain_id_list", "ignore_domain_id",
+ "master_file_def", "optional_connection_name", "connection_name",
+ "optional_for_channel", "for_channel", "create", "$@8", "$@9", "$@10",
+ "$@11", "$@12", "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19",
+ "$@20", "$@21", "$@22", "$@23", "$@24", "opt_sequence", "sequence_defs",
+ "sequence_def", "force_lookahead", "server_def", "$@25",
+ "server_options_list", "server_option", "event_tail", "$@26",
+ "ev_schedule_time", "$@27", "opt_ev_status", "ev_starts", "ev_ends",
+ "opt_ev_on_completion", "ev_on_completion", "opt_ev_comment",
+ "ev_sql_stmt", "$@28", "clear_privileges", "opt_aggregate", "sp_handler",
+ "sp_name", "sp_a_chistics", "sp_c_chistics", "sp_chistic",
+ "sp_c_chistic", "sp_suid", "call", "$@29", "$@30", "$@31",
+ "opt_sp_cparam_list", "opt_sp_cparams", "sp_cparams", "sp_fdparam_list",
+ "$@32", "sp_fdparams", "sp_param_name", "sp_pdparam_list", "sp_pdparams",
+ "sp_parameter_type", "sp_parenthesized_pdparam_list", "$@33",
+ "sp_parenthesized_fdparam_list", "sp_proc_stmts", "sp_proc_stmts1",
+ "optionally_qualified_column_ident", "row_field_definition",
+ "row_field_definition_list", "row_type_body", "sp_decl_idents_init_vars",
+ "sp_decl_variable_list", "$@34", "sp_decl_handler", "$@35",
+ "opt_parenthesized_cursor_formal_parameters", "sp_cursor_stmt_lex",
+ "sp_cursor_stmt", "$@36", "sp_handler_type", "sp_hcond_list",
+ "sp_hcond_element", "sp_cond", "sqlstate", "opt_value", "sp_hcond",
+ "raise_stmt_oracle", "signal_stmt", "signal_value", "opt_signal_value",
+ "opt_set_signal_information", "signal_information_item_list",
+ "signal_allowed_expr", "signal_condition_information_item_name",
+ "resignal_stmt", "get_diagnostics", "which_area",
+ "diagnostics_information", "statement_information",
+ "statement_information_item", "simple_target_specification",
+ "statement_information_item_name", "condition_number",
+ "condition_information", "condition_information_item",
+ "condition_information_item_name", "sp_decl_ident", "sp_decl_idents",
+ "sp_proc_stmt_if", "$@37", "sp_proc_stmt_statement", "$@38",
+ "RETURN_ALLMODES_SYM", "sp_proc_stmt_return", "$@39",
+ "sp_proc_stmt_exit_oracle", "$@40", "$@41",
+ "sp_proc_stmt_continue_oracle", "$@42", "$@43", "sp_proc_stmt_leave",
+ "sp_proc_stmt_iterate", "sp_proc_stmt_goto_oracle", "expr_lex", "@44",
+ "assignment_source_lex", "assignment_source_expr", "$@45",
+ "for_loop_bound_expr", "$@46", "cursor_actual_parameters",
+ "opt_parenthesized_cursor_actual_parameters", "sp_proc_stmt_with_cursor",
+ "sp_proc_stmt_open", "sp_proc_stmt_fetch_head", "sp_proc_stmt_fetch",
+ "sp_proc_stmt_close", "sp_fetch_list", "sp_if", "$@47", "$@48",
+ "sp_elseifs", "case_stmt_specification", "$@49", "case_stmt_body",
+ "$@50", "simple_when_clause_list", "searched_when_clause_list",
+ "simple_when_clause", "$@51", "searched_when_clause", "$@52",
+ "else_clause_opt", "sp_opt_label", "opt_sp_for_loop_direction",
+ "sp_for_loop_index_and_bounds", "sp_for_loop_bounds", "loop_body",
+ "repeat_body", "pop_sp_loop_label", "sp_labeled_control", "$@53", "$@54",
+ "$@55", "$@56", "$@57", "$@58", "sp_unlabeled_control", "$@59", "$@60",
+ "$@61", "$@62", "$@63", "trg_action_time", "trg_event", "create_body",
+ "$@64", "create_like", "opt_create_select",
+ "create_select_query_expression", "opt_create_partitioning",
+ "opt_partitioning", "partitioning", "$@65", "have_partitioning",
+ "partition_entry", "$@66", "partition", "$@67", "part_type_def", "$@68",
+ "$@69", "$@70", "opt_linear", "opt_key_algo", "part_field_list",
+ "part_field_item_list", "part_field_item", "part_column_list",
+ "part_func", "sub_part_func", "opt_num_parts", "opt_sub_part", "$@71",
+ "$@72", "sub_part_field_list", "sub_part_field_item", "part_func_expr",
+ "opt_num_subparts", "part_defs", "part_def_list", "opt_partition",
+ "part_definition", "$@73", "part_name", "opt_part_values", "$@74",
+ "$@75", "part_func_max", "part_values_in", "part_value_list",
+ "part_value_item", "$@76", "$@77", "part_value_item_list",
+ "part_value_expr_item", "opt_sub_partition", "sub_part_list",
+ "sub_part_definition", "$@78", "sub_name", "opt_part_options",
+ "part_option_list", "part_option", "opt_subpart_options",
+ "subpart_option_list", "server_part_option", "opt_versioning_rotation",
+ "$@79", "opt_versioning_interval_start", "opt_vers_auto_part", "opt_as",
+ "opt_create_database_options", "create_database_options",
+ "create_database_option", "opt_if_not_exists_table_element",
+ "opt_if_not_exists", "create_or_replace", "opt_create_table_options",
+ "create_table_options_space_separated", "create_table_options",
+ "create_table_option", "$@80", "engine_defined_option",
+ "opt_versioning_option", "versioning_option", "default_charset",
+ "default_collation", "storage_engines", "known_storage_engines",
+ "row_types", "merge_insert_types", "udf_type", "create_field_list",
+ "create_field_list_parens", "field_list", "field_list_item",
+ "column_def", "key_def", "$@81", "$@82", "$@83", "$@84", "$@85", "$@86",
+ "$@87", "constraint_def", "period_for_system_time",
+ "period_for_application_time", "opt_check_constraint",
+ "check_constraint", "opt_constraint_no_id", "opt_constraint",
+ "constraint", "field_spec", "@88", "field_type_or_serial", "$@89",
+ "$@90", "opt_serial_attribute", "opt_serial_attribute_list",
+ "opt_asrow_attribute", "opt_asrow_attribute_list", "field_def", "$@91",
+ "opt_generated_always", "vcol_opt_specifier", "vcol_opt_attribute",
+ "vcol_opt_attribute_list", "vcol_attribute", "parse_vcol_expr", "$@92",
+ "parenthesized_expr", "virtual_column_func", "expr_or_literal",
+ "column_default_expr", "field_type", "qualified_field_type", "udt_name",
+ "field_type_all", "field_type_numeric", "opt_binary_and_compression",
+ "field_type_string", "field_type_temporal", "field_type_lob",
+ "field_type_misc", "char", "nchar", "varchar", "nvarchar", "int_type",
+ "real_type", "srid_option", "float_options", "precision",
+ "field_options", "last_field_options", "field_length_str",
+ "field_length", "field_scale", "opt_field_length", "opt_field_scale",
+ "opt_precision", "attribute_list", "attribute", "opt_compression_method",
+ "opt_compressed", "opt_enable", "compressed",
+ "compressed_deprecated_data_type_attribute",
+ "compressed_deprecated_column_attribute", "asrow_attribute",
+ "serial_attribute", "with_or_without_system", "charset", "charset_name",
+ "charset_name_or_default", "opt_load_data_charset",
+ "old_or_new_charset_name", "old_or_new_charset_name_or_default",
+ "collation_name", "collation_name_or_default", "opt_default",
+ "charset_or_alias", "opt_binary", "binary", "opt_bin_mod", "ws_nweights",
+ "$@93", "ws_level_flag_desc", "ws_level_flag_reverse", "ws_level_flags",
+ "ws_level_number", "ws_level_list_item", "ws_level_list",
+ "ws_level_range", "ws_level_list_or_range", "opt_ws_levels",
+ "opt_primary", "references", "opt_ref_list", "ref_list",
+ "opt_match_clause", "opt_on_update_delete", "delete_option",
+ "constraint_key_type", "key_or_index", "opt_key_or_index",
+ "keys_or_index", "fulltext", "spatial", "normal_key_options",
+ "fulltext_key_options", "spatial_key_options", "normal_key_opts",
+ "spatial_key_opts", "fulltext_key_opts", "opt_USING_key_algorithm",
+ "opt_key_algorithm_clause", "key_using_alg", "all_key_opt",
+ "normal_key_opt", "spatial_key_opt", "fulltext_key_opt",
+ "btree_or_rtree", "ignorability", "key_list", "opt_without_overlaps",
+ "key_part", "opt_ident", "string_list", "alter", "$@94", "$@95", "$@96",
+ "$@97", "$@98", "$@99", "$@100", "$@101", "$@102", "$@103", "$@104",
+ "$@105", "$@106", "account_locking_option", "opt_password_expire_option",
+ "opt_account_locking_and_opt_password_expiration",
+ "ev_alter_on_schedule_completion", "opt_ev_rename_to", "opt_ev_sql_stmt",
+ "ident_or_empty", "alter_commands", "$@107", "$@108", "$@109", "$@110",
+ "remove_partitioning", "all_or_alt_part_name_list", "add_partition_rule",
+ "$@111", "add_part_extra", "reorg_partition_rule", "$@112",
+ "reorg_parts_rule", "$@113", "alt_part_name_list", "alt_part_name_item",
+ "alter_list", "add_column", "alter_list_item",
+ "opt_index_lock_algorithm", "alter_algorithm_option",
+ "alter_lock_option", "opt_column", "opt_ignore", "alter_options",
+ "$@114", "alter_options_part2", "alter_option_list", "alter_option",
+ "opt_restrict", "opt_place", "opt_to", "slave", "$@115", "$@116",
+ "start", "opt_start_transaction_option_list",
+ "start_transaction_option_list", "start_transaction_option",
+ "slave_thread_opts", "$@117", "slave_thread_opt_list",
+ "slave_thread_opt", "slave_until", "slave_until_opts", "checksum",
+ "$@118", "opt_checksum_type", "repair_table_or_view", "$@119", "repair",
+ "$@120", "opt_mi_repair_type", "mi_repair_types", "mi_repair_type",
+ "opt_view_repair_type", "analyze", "$@121", "analyze_table_list",
+ "analyze_table_elem_spec", "opt_persistent_stat_clause",
+ "persistent_stat_spec", "persistent_column_stat_spec", "$@122",
+ "persistent_index_stat_spec", "$@123", "table_column_list",
+ "table_index_list", "table_index_name", "binlog_base64_event",
+ "check_view_or_table", "$@124", "check", "$@125", "opt_mi_check_type",
+ "mi_check_types", "mi_check_type", "opt_view_check_type", "optimize",
+ "$@126", "opt_no_write_to_binlog", "rename", "$@127", "rename_list",
+ "table_to_table_list", "table_to_table", "keycache", "$@128",
+ "keycache_list_or_parts", "keycache_list", "assign_to_keycache",
+ "assign_to_keycache_parts", "key_cache_name", "preload", "$@129",
+ "preload_list_or_parts", "preload_list", "preload_keys",
+ "preload_keys_parts", "adm_partition", "$@130", "cache_keys_spec",
+ "$@131", "cache_key_list_or_empty", "opt_ignore_leaves", "select",
+ "$@132", "$@133", "select_into", "$@134", "$@135", "simple_table",
+ "table_value_constructor", "$@136", "query_specification_start", "$@137",
+ "$@138", "query_specification", "select_into_query_specification",
+ "query_expression", "query_expression_no_with_clause",
+ "query_expression_body_ext", "$@139", "$@140",
+ "query_expression_body_ext_parens", "query_expression_body", "$@141",
+ "query_primary", "query_simple", "subselect", "subquery",
+ "opt_from_clause", "from_clause", "table_reference_list",
+ "select_options", "opt_history_unit", "history_point",
+ "for_portion_of_time_clause", "opt_for_portion_of_time_clause",
+ "opt_for_system_time_clause", "system_time_expr", "select_option_list",
+ "select_option", "select_lock_type", "opt_select_lock_type",
+ "opt_lock_wait_timeout_new", "select_item_list", "select_item",
+ "remember_tok_start", "remember_name", "remember_end", "select_alias",
+ "opt_default_time_precision", "opt_time_precision", "optional_braces",
+ "expr", "boolean_test", "predicate", "bit_expr", "or", "and", "not",
+ "not2", "comp_op", "all_or_any", "opt_dyncol_type", "dyncol_type",
+ "numeric_dyncol_type", "temporal_dyncol_type", "string_dyncol_type",
+ "dyncall_create_element", "dyncall_create_list", "plsql_cursor_attr",
+ "explicit_cursor_attr", "trim_operands", "trim_operands_regular",
+ "trim_operands_special", "column_default_non_parenthesized_expr",
+ "primary_expr", "string_factor_expr", "simple_expr",
+ "mysql_concatenation_expr", "function_call_keyword_timestamp",
+ "function_call_keyword", "substring_operands",
+ "substring_operands_regular", "substring_operands_special",
+ "function_call_nonkeyword", "function_call_conflict",
+ "function_call_generic", "@142", "fulltext_options",
+ "opt_natural_language_mode", "opt_query_expansion", "opt_udf_expr_list",
+ "udf_expr_list", "udf_expr", "sum_expr", "$@143", "$@144", "$@145",
+ "$@146", "$@147", "window_func_expr", "window_func",
+ "simple_window_func", "inverse_distribution_function",
+ "percentile_function", "$@148", "inverse_distribution_function_def",
+ "order_by_single_element_list", "window_name", "variable", "$@149",
+ "variable_aux", "opt_distinct", "opt_gconcat_separator",
+ "opt_gorder_clause", "gorder_list", "opt_glimit_clause", "glimit_clause",
+ "glimit_options", "in_sum_expr", "$@150", "cast_type",
+ "cast_type_numeric", "cast_type_temporal", "opt_expr_list", "expr_list",
+ "ident_list_arg", "ident_list", "when_list", "when_list_opt_else",
+ "table_ref", "json_text_literal", "json_text_literal_or_num",
+ "join_table_list", "json_table_columns_clause",
+ "json_table_columns_list", "json_table_column", "$@151", "$@152",
+ "json_table_column_type", "json_table_field_type",
+ "json_opt_on_empty_or_error", "json_on_response",
+ "json_on_error_response", "json_on_empty_response", "table_function",
+ "$@153", "$@154", "esc_table_ref", "derived_table_list", "join_table",
+ "$@155", "$@156", "$@157", "$@158", "$@159", "$@160", "inner_join",
+ "normal_join", "opt_use_partition", "use_partition", "table_factor",
+ "table_primary_ident_opt_parens", "table_primary_derived_opt_parens",
+ "table_reference_list_parens", "nested_table_reference_list",
+ "join_table_parens", "table_primary_ident", "table_primary_derived",
+ "opt_outer", "index_hint_clause", "index_hint_type",
+ "index_hint_definition", "$@161", "$@162", "index_hints_list",
+ "opt_index_hints_list", "$@163", "opt_key_definition", "$@164",
+ "opt_key_usage_list", "key_usage_element", "key_usage_list",
+ "using_list", "interval", "interval_time_stamp", "date_time_type",
+ "table_alias", "opt_table_alias_clause", "table_alias_clause", "opt_all",
+ "opt_where_clause", "$@165", "opt_having_clause", "$@166",
+ "opt_group_clause", "group_list", "olap_opt", "opt_window_clause",
+ "window_def_list", "window_def", "window_spec", "$@167",
+ "opt_window_ref", "opt_window_partition_clause",
+ "opt_window_order_clause", "opt_window_frame_clause",
+ "window_frame_units", "window_frame_extent", "window_frame_start",
+ "window_frame_bound", "opt_window_frame_exclusion", "alter_order_clause",
+ "alter_order_list", "alter_order_item", "opt_order_clause",
+ "order_clause", "$@168", "order_list", "order_dir", "opt_limit_clause",
+ "limit_clause", "fetch_first_clause", "first_or_next", "row_or_rows",
+ "only_or_with_ties", "opt_global_limit_clause", "limit_options",
+ "limit_option", "limit_rows_option", "delete_limit_clause",
+ "order_limit_lock", "opt_order_limit_lock", "query_expression_tail",
+ "opt_query_expression_tail", "opt_procedure_or_into", "order_or_limit",
+ "opt_plus", "int_num", "ulong_num", "real_ulong_num", "longlong_num",
+ "ulonglong_num", "real_ulonglong_num", "dec_num_error", "dec_num",
+ "choice", "bool", "procedure_clause", "$@169", "procedure_list",
+ "procedure_list2", "procedure_item", "select_var_list_init", "$@170",
+ "select_var_list", "select_var_ident", "select_outvar", "into",
+ "into_destination", "$@171", "$@172", "do", "$@173", "drop", "$@174",
+ "$@175", "$@176", "$@177", "table_list", "table_name",
+ "table_name_with_opt_use_partition", "table_alias_ref_list",
+ "table_alias_ref", "opt_if_exists_table_element", "opt_if_exists",
+ "opt_temporary", "insert", "$@178", "$@179", "replace", "$@180", "$@181",
+ "insert_start", "stmt_end", "insert_lock_option", "replace_lock_option",
+ "insert_replace_option", "opt_into", "insert_table", "$@182",
+ "insert_field_spec", "$@183", "insert_field_list", "opt_fields",
+ "fields", "insert_values", "values_list", "ident_eq_list",
+ "ident_eq_value", "equal", "opt_equal", "opt_with", "opt_by",
+ "no_braces", "$@184", "no_braces_with_names", "$@185", "opt_values",
+ "opt_values_with_names", "values", "values_with_names", "expr_or_ignore",
+ "expr_or_ignore_or_default", "opt_insert_update", "$@186", "$@187",
+ "update_table_list", "update", "$@188", "$@189", "$@190", "update_list",
+ "update_elem", "insert_update_list", "insert_update_elem",
+ "opt_low_priority", "delete", "$@191", "opt_delete_system_time",
+ "delete_part2", "delete_single_table", "delete_single_table_for_period",
+ "single_multi", "$@192", "$@193", "$@194", "$@195", "opt_returning",
+ "$@196", "table_wild_list", "table_wild_one", "opt_wild",
+ "opt_delete_options", "opt_delete_option", "truncate", "$@197", "$@198",
+ "opt_table_sym", "opt_profile_defs", "profile_defs", "profile_def",
+ "opt_profile_args", "show", "$@199", "show_param", "$@200", "$@201",
+ "show_engine_param", "master_or_binary", "opt_storage", "opt_db",
+ "opt_full", "from_or_in", "binlog_in", "binlog_from", "wild_and_where",
+ "describe", "$@202", "$@203", "explainable_command", "describe_command",
+ "analyze_stmt_command", "opt_extended_describe", "opt_format_json",
+ "opt_describe_column", "explain_for_connection", "flush", "$@204",
+ "flush_options", "$@205", "opt_flush_lock", "flush_lock", "$@206",
+ "flush_options_list", "flush_option", "opt_table_list", "backup",
+ "backup_statements", "$@207", "opt_delete_gtid_domain",
+ "delete_domain_id_list", "delete_domain_id",
+ "optional_flush_tables_arguments", "reset", "$@208", "reset_options",
+ "reset_option", "$@209", "$@210", "slave_reset_options",
+ "master_reset_options", "purge", "$@211", "kill", "$@212", "kill_type",
+ "kill_option", "opt_connection", "kill_expr", "shutdown", "$@213",
+ "shutdown_option", "use", "load", "$@214", "$@215", "$@216", "$@217",
+ "data_or_xml", "opt_local", "load_data_lock", "opt_duplicate",
+ "opt_field_term", "field_term_list", "field_term", "opt_line_term",
+ "line_term_list", "line_term", "opt_xml_rows_identified_by",
+ "opt_ignore_lines", "lines_or_rows", "opt_field_or_var_spec",
+ "fields_or_vars", "field_or_var", "opt_load_data_set_spec",
+ "load_data_set_list", "load_data_set_elem", "text_literal",
+ "text_string", "hex_or_bin_String", "param_marker", "signed_literal",
+ "literal", "NUM_literal", "temporal_literal", "with_clause", "$@218",
+ "opt_recursive", "with_list", "with_list_element", "opt_cycle", "$@219",
+ "opt_with_column_list", "with_column_list", "ident_sys_alloc",
+ "comma_separated_ident_list", "with_element_head", "insert_ident",
+ "table_wild", "select_sublist_qualified_asterisk", "order_ident",
+ "simple_ident", "simple_ident_nospvar", "field_ident", "table_ident",
+ "table_ident_opt_wild", "table_ident_nodb", "IDENT_cli", "ident_cli",
+ "IDENT_sys", "ident_cli_func", "ident_func", "TEXT_STRING_sys",
+ "TEXT_STRING_literal", "TEXT_STRING_filesystem", "ident_table_alias",
+ "ident_cli_set_usual_case", "ident_sysvar_name", "ident", "label_ident",
+ "ident_or_text", "user_maybe_role", "user_or_role", "user",
+ "keyword_table_alias", "keyword_ident", "keyword_sysvar_name",
+ "keyword_set_usual_case", "non_reserved_keyword_udt",
+ "keyword_sp_var_not_label", "keyword_sp_head", "keyword_verb_clause",
+ "keyword_set_special_case", "keyword_sysvar_type", "keyword_data_type",
+ "keyword_cast_type", "keyword_func_sp_var_and_label",
+ "keyword_func_sp_var_not_label", "keyword_sp_var_and_label",
+ "reserved_keyword_udt_not_param_type", "set", "$@220", "set_param",
+ "$@221", "$@222", "$@223", "set_stmt_option_list",
+ "start_option_value_list_following_option_type", "$@224",
+ "option_value_list", "option_value", "$@225", "option_type",
+ "opt_var_type", "opt_var_ident_type", "set_stmt_option", "$@226",
+ "$@227", "$@228", "option_value_following_option_type", "$@229", "$@230",
+ "$@231", "option_value_no_option_type", "$@232", "$@233", "$@234",
+ "$@235", "$@236", "$@237", "$@238", "$@239", "$@240", "$@241",
+ "transaction_characteristics", "transaction_access_mode",
+ "isolation_level", "transaction_access_mode_types", "isolation_types",
+ "text_or_password", "set_expr_or_default", "lock", "$@242",
+ "opt_lock_wait_timeout", "table_or_tables", "table_lock_list",
+ "table_lock", "lock_option", "unlock", "$@243", "handler", "$@244",
+ "handler_tail", "$@245", "handler_read_or_scan", "handler_scan_function",
+ "handler_rkey_function", "$@246", "handler_rkey_mode", "revoke",
+ "revoke_command", "admin_option_for_role", "grant", "grant_command",
+ "opt_with_admin", "opt_with_admin_option", "role_list", "current_role",
+ "role_name", "grant_role", "opt_table", "grant_privileges",
+ "opt_privileges", "object_privilege_list", "column_list_privilege",
+ "column_privilege", "object_privilege", "opt_and", "require_list",
+ "require_list_element", "grant_ident", "user_list", "grant_list",
+ "user_and_role_list", "via_or_with", "using_or_as", "grant_user",
+ "auth_expression", "auth_token", "opt_auth_str", "opt_require_clause",
+ "resource_option", "resource_option_list", "opt_resource_options",
+ "opt_grant_options", "opt_grant_option", "grant_option_list",
+ "grant_option", "begin_stmt_mariadb", "$@247", "compound_statement",
+ "opt_not", "opt_work", "opt_chain", "opt_release", "commit", "rollback",
+ "savepoint", "release", "unit_type_decl", "union_option",
+ "query_expression_option", "definer_opt", "no_definer", "definer",
+ "view_algorithm", "opt_view_suid", "view_suid", "view_list_opt",
+ "view_list", "view_select", "$@248", "view_check_option",
+ "trigger_action_order", "trigger_follows_precedes_clause",
+ "trigger_tail", "$@249", "$@250", "$@251", "$@252", "$@253",
+ "sf_return_type", "$@254", "xa", "opt_format_xid", "xid",
+ "begin_or_start", "opt_join_or_resume", "opt_one_phase", "opt_suspend",
+ "$@255", "opt_migrate", "install", "uninstall", "keep_gcc_happy",
+ "_empty", "statement", "sp_statement", "sp_if_then_statements",
+ "sp_case_then_statements", "reserved_keyword_udt_param_type",
+ "reserved_keyword_udt", "keyword_sp_block_section", "keyword_label",
+ "keyword_sp_decl", "opt_truncate_table_storage_clause",
+ "ident_for_loop_index", "row_field_name", "while_body", "$@256",
+ "for_loop_statements", "sp_label", "sp_control_label", "sp_block_label",
+ "sp_opt_default", "sp_decl_variable_list_anchored",
+ "sp_param_name_and_mode", "sp_param", "sp_param_anchored",
+ "sf_c_chistics_and_body_standalone", "$@257", "sp_tail_standalone",
+ "$@258", "$@259", "drop_routine", "create_routine", "$@260", "$@261",
+ "$@262", "sp_decls", "sp_decl", "sp_decl_body", "$@263",
+ "sp_proc_stmt_in_returns_clause", "sp_proc_stmt",
+ "sp_proc_stmt_compound_ok", "sp_labeled_block", "$@264",
+ "sp_unlabeled_block", "$@265", "sp_unlabeled_block_not_atomic", "$@266", YY_NULLPTR
+};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
+#endif
+
+#define YYPACT_NINF (-5341)
+
+#define yypact_value_is_default(Yyn) \
+ ((Yyn) == YYPACT_NINF)
+
+#define YYTABLE_NINF (-3660)
+
+#define yytable_value_is_error(Yyn) \
+ 0
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const int yypact[] =
+{
+ 7647, -5341, -5341, 2971, 1711, 93552, -5341, 116, -5341, 1031,
+ -5341, -5341, -5341, 3395, -5341, -5341, -5341, -5341, -5341, 198,
+ 463, -5341, 326, -5341, -5341, 353, 80214, 634, 580, -5341,
+ 83178, -5341, -5341, -5341, -5341, 83178, -5341, -5341, 93552, -5341,
+ -5341, 1436, -5341, 172, 1568, 2263, 1565, 463, 1074, -5341,
+ -5341, 94293, 326, 1603, -5341, -5341, 1251, 93552, 326, -5341,
+ 1074, 93552, -5341, 313, 279, -5341, 1342, 4371, 133, 2180,
+ 2197, -5341, -5341, 1640, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 4703, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 1891, -5341, -5341, -5341,
+ -5341, 4408, 1835, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, 45266, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 133, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 95034, 93552, 1543, 1584,
+ 93552, 2226, 80955, 2226, -5341, 126, -5341, -5341, 1971, -5341,
+ 1630, -5341, 463, 2744, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, 1718, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 2204, 2508,
+ 536, 2237, 278, 2226, -5341, 2226, 2226, 2226, 2226, 2226,
+ 2226, -5341, 2226, 2226, 943, 93552, 67617, -5341, -5341, 108,
+ 2417, -5341, -5341, -5341, -5341, -5341, -5341,108132, 463, 23317,
+ 2512, -5341, -5341, 2074, 3711, 1871, -5341, 2356, -5341, -5341,
+ 93552, -5341, 2226,108132, -5341, 2356, 68358, 3781, 49723, 7733,
+ 2356, 463, 2453, -5341, 1882, -5341, -5341, -5341, -5341, -5341,
+ -5341, 93552, -5341, -5341, -5341, 2338, 1074, 80955, -5341, -5341,
+ -5341, -5341, -5341, 2625, 23317, 243, 2385, -5341, -5341, 2304,
+ 46007, 80955, 2583, 2508, 2606, -5341, 1528, 572, -5341, 1998,
+ 2077, 2508, 1514, 2091, 2508, 2497, 2226, 2226, -5341, -5341,
+ 3364, 3364, 3364, 2333, 3364, -5341, 3364, 2673, 2022, 447,
+ -5341, -5341, 2028, 93552, 2583, -5341, 2583, -5341, 2668, 2583,
+ 2583, 2166, 2682, 2695, 160, 1531, 187, 187, 1971, 40820,
+ 1148, 2531, -5341, 2673, 2078, 1905, 2119, 2119, 2119, 2078,
+ 133, 2078, -5341, 2861, 1630, 2895, 93552, -5341, 2729, -5341,
+ 2070, -5341, -5341, 239, -5341, 2133, -5341, 2092, 1415, 69840,
+ -5341, 2763, -5341, -5341, -5341, -5341, -5341, -5341, 2589, 259,
+ 2235, 2457, 2161, -5341, 2642, 80955, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 93552, 2132, -5341, -5341, 23317, 2801,
+ 2204, -5341, 2632, -5341, -5341, -5341, -5341, 46007, -5341, -5341,
+ -5341, 2800, -5341, -5341, 83919, 663, 93552, 2813, 93552, 93552,
+ 93552, 93552, -5341, 80955, -5341, -5341, 2226, 2226, -5341, -5341,
+ 2795, 2350, 2316, 1553, 2203, 2511, -5341, 2399, -5341, 2210,
+ 2289, 2420, 2227, 2230, 2283, 211, -5341, 2242, -5341, 929,
+ 2692, 146, 154, 2696, 162, 424, 2847, 2705, 454, 971,
+ 466, 2503, 470, -5341, -5341, -5341, -5341, 2780, 2867, 2309,
+ -5341, 2323, -5341, 2812, 2646, 1149, -5341, -5341, 895, 2748,
+ 1213, 46007,110200, 81696,111492, -5341,111492,111492, -5341, 245,
+ -5341, 1568, 93552,110846, -5341, 93552,103866, -5341, 11694, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 93552, -5341,
+ -5341, -5341, -5341, -5341, 2321, -5341, -5341, -5341, -5341, -5341,
+ 2765, 2247, 2772, -5341, 2345, -5341, -5341, -5341, -5341, -5341,
+ 84660, -5341, 190, 205, 3475, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 29469, 2357, 2360, 2363,
+ 18703, 2366, 2372, 2376, 2390, 2394, 2203, 2203, 2203, 2395,
+ 2400, 2414, 2422, 2423, 2434, 2477, -5341, 2478, 2482, 2506,
+ 2518, 2527, 2551, 24086, 2555, 2560, 2561, 37103, 2567, 2568,
+ 2578, 2579, 23317, 2395, 2610, 2622, -5341, 2629, 2644, 2657,
+ 2674, 2693, 2711, 2720, 2726, 3149, 2730, 2738, 2745, 2746,
+ -5341, 2203, 2395, 2395, 2755, 2758, 2759, 2773, 2776, 2781,
+ 2788, 2799, 2811, 2830, 2833, 2844, 2845, 2853, 2855, 201,
+ 2859, 2866, 2868, 2869, 2872, 2873, 2875, 2461, 2884, 2886,
+ 2887, 2504, 2888, 2889, 2891, 2899, 206, 2902, 2903, 210,
+ 2904, 2908, 2910, 2913, 2914, 2920, 2921, 30238, 31007, 29469,
+ 16396, -5341, 93552, 95775, -5341, -5341, 4197, 1112, 3315, 2082,
+ 29469, -5341, -5341, -5341, 3126, -5341, 3243, -5341, -5341, -5341,
+ -5341, 3077, 3097, -5341, 3108, -5341, -5341, 3138, 2660, -5341,
+ 3448, -5341, -5341, -5341, -5341, -5341, 2721, -5341, 2926, 3514,
+ 3536, 2933, 2934, -5341, -5341, 479, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 2792,
+ 2864, -5341, 3448, -5341, -5341, 72804, -5341,108843, -5341, -5341,
+ 2350, 3007, 3413, -5341, 3518, -5341, 3452, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 3781,
+ -5341, -5341, 51227, 3458, -105, -5341, -5341, 186, -5341, 196,
+ 240, 63171, -5341, 305, 63912, 260, 85401, 949, -5341, 70581,
+ -5341, 316, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 2935, -5341, 3051, 3262, 2944, 3317, 1571, -5341,
+ -5341, 384, 537, 3038, 115, -5341, 62, -5341, 1571, -5341,
+ 73545, 725, 2169, -5341, 801, -5341, 3601, -5341, -5341, 3043,
+ 3029, 3059, -5341, 3276, -5341, 2508, -5341, 539, -5341, 725,
+ 1571, 2169, -5341, 3226, 3308, 1383, 3262, -5341, 1084, -5341,
+ -5341, -5341, 3597, -5341, 2959, -5341, 3321, -5341, 93552, 1217,
+ 46007, -5341, -5341, -5341, 2963, 46007, 46007, 1221, 299, 4197,
+ 2965, 23317, -5341, -5341, 4092, 53483, 3166, 368, 1085, -5341,
+ -5341, 1568, 93552, -5341, -5341, 624, -5341, 3389, -5341, 2968,
+ -5341, 96516, 299, 3628, -5341, -5341, -5341, 774, 3362, -5341,
+ 2977, -5341, -5341, -5341, -5341, 46007, 93552, 2508, -5341, -5341,
+ -5341, -5341, 2979, -5341, -5341, 3183, 3065, -5341, 3003, -5341,
+ -5341, 225, -5341, -5341, 3761, -5341, 93552, -5341, 2583, -5341,
+ -5341, 2583, -5341, -5341, -5341, 2583, 2583, 2583, -5341, -5341,
+ 3031, -5341, 3313, 3314, 2642, -5341, 3002, 40079, 93552, 3777,
+ -5341, 3572, -5341, -5341, -5341, 3009, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 3575, 3762, 3762, -5341, 51979, -5341,
+ -5341, 3660, 2531, 1589, 3501, 54987, 3649, 3737, 57243, -5341,
+ 725, -5341, -5341, -5341, -5341, 2249, 93552, -5341, 2249, 2249,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 133, -5341, -5341, 2744, 3410, 71322, 93552, 2078,
+ 1905, -5341, -5341, -5341, 2508, 369, 3406, -5341, 93552, -5341,
+ -5341, -5341, 2203, 3812, -5341, -5341, -5341, -5341, -5341, 46007,
+ 3235, 69840, 2226, -5341, -5341, -5341, 259, -5341, 1596, 93552,
+ 46007, 3076, -5341, 46007, 3037, 23317, -5341, -5341, 3515, 4197,
+ 108132, 3398, -5341, -5341, 46007, 1686, -5341, -5341, 46007, 3773,
+ 46007, 3707, 2531, -5341, 3053, -5341, 3052, -5341, -5341, 3721,
+ 93552, -5341, -5341, -5341, 3055, 74286, -5341, 72804, 46007, -5341,
+ -5341, 3424, 3205, -5341, -5341, -5341, -5341, -5341, -5341, 3146,
+ -5341, -5341, 3071, -5341, -5341, -5341, -5341, 3519, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 72804, -5341, -5341, 3520,
+ 3523, -5341, 69840, 1506, 5228, 95775, -5341, 3718, -5341, -5341,
+ -5341, 3597, -5341, -5341, 24855, -5341, 25624, -5341, -5341, -5341,
+ 3354, 549, 1062, -5341, -5341, 3550, 93552, 3301, 3746, 3725,
+ -5341, -5341, -5341, -5341, -5341, -5341, 3569, 3102, 3706, 3099,
+ -5341, -5341, -5341, 3104, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 46007, 52731, -5341, -5341, -5341, 3110, -5341, -5341,
+ -5341, 3116, 29469, 29469, -5341, 3842, 3842, 3842, 23317, 2919,
+ 396, 3471, 23317, 23317, 23317, 2143, 3123, -5341, -5341, -5341,
+ 284, -5341, 23317, 23317, 37850, 3150, 987, 5096, 23317, 3820,
+ 3820, -5341, 23317, 23317, 16396, 3454, 23317, 23317, 23317, 95775,
+ 37850, 3595, 3152, -5341, 3156, 2151, 23317, 2184, 23317, -5341,
+ -5341, 23317, 23317, 23317, 23317, 3155, 31776, 3159, 23317, 23317,
+ 3169, 3303, 3842, 3842, 2277, 293, -5341, -5341, -5341, 3842,
+ 3842, 3177, 23317, 23317, 17165, 23317, 23317, 2291, 23317, 23317,
+ 23317, 23317, 23317, 23317, -5341, 23317, 23317, 1009, 23317, 23317,
+ 46007, 23317, 23317, 3831, 46007, 23317, 23317, 3832, 23317, 23317,
+ 46007, 23317, -5341, 23317, 3942, 3942, -5341, 23317, 17165, 23317,
+ 3184, 38597, 23317, 23317, 23317, 24086, -5341, 24086, -5341, -5341,
+ 3188, 3393, 355, 133, 23317, 3178, -5341, -5341, -5341, -5341,
+ 23317, 23317, 23317, 31776, -5341, -5341, -5341, 432, -5341, -5341,
+ -5341, 26393, 31776, 3193, 31776, 31776, 3806, 2112, 31776, 31776,
+ 31776, 31776, 31776, 31776, 31776, 32545, 33314, 31776, 31776, 31776,
+ 31776, -5341, 80955, 29469, 48971, 3199, 3845, -5341, 75027, -5341,
+ 1591, 645, -5341, 2508, 3711, 34852, -5341, 3206, -5341, 3703,
+ 46007, 3203, 3211, 3868, 72804, 69840, 1506, 3229, -5341, 1300,
+ 234, -5341, 74286, 93552, -5341, -5341, -5341, 3928, 23317, -5341,
+ -5341, -5341, -5341, -5341, 3222, 383, 3230, -5341, 1040, -5341,
+ -5341, -5341, -5341, -5341, 93552, -5341, 86142, 50475, 3333, 3892,
+ 3252, 2583, 86883, 93552, 46007, 93552, 97257, 93552, 93552, 46007,
+ 72804, 46007, -5341, -5341, -5341, 818, 1571, 93552, 1571, 2169,
+ 852, 1571, 3874, -5341, -5341, 937, 937, -5341, -5341, -5341,
+ -5341, -5341, -5341, 1571, 93552, 93552, 1571, 69840, -5341, 2169,
+ 1479, -5341, 3539, 3330, -5341, -5341, -5341, 3581, -5341, -5341,
+ 3907, 3254, -5341, 3603, -5341, 3352, -5341, -5341, 46007, -5341,
+ -5341, 2169, -5341, 2169, 2169, 3919, 1571, 1571, 1571, -5341,
+ 41561, 3275, 3280, -5341, 3282, -5341, 3283, -5341, 3911, -5341,
+ -5341, -5341, 4064, 3924, 3289, -5341, -5341, 3859, 890, -5341,
+ 3715, -5341, 3840, -5341, 23317, 4197, 19472, 3570, -5341, -5341,
+ 3573, 3577, 3583, -5341, -5341, -5341, -5341, 3722, 3585, -5341,
+ 2508, 3587, -5341, -5341, -5341, 3319, -5341, -5341, -5341, 80955,
+ 34852, -5341, 3322, -5341, 3336, -5341, 208, -5341, -5341, 3989,
+ 3437, 23317, -5341, -5341, 46007, 3835, -5341, 2508, 1528, 93552,
+ -5341, -5341, 4072, -5341, 1440, 3999, -5341, -5341, 3460, 1514,
+ -5341, 3999, -21, -5341, -5341, 3364, 3531, -5341, -5341, -5341,
+ 80955, -5341, -5341, -5341, -5341, -5341, -5341, 93552, -5341, 74286,
+ 69840, 80955, 2583, 2583, -5341, 46007, -5341, -5341, -5341, 2583,
+ 2583, 2583, 3388, -5341, 2876, 3361, 3365, 3366, 3370, 2027,
+ 3371, 42302, 2341, 291, 3976, 3994, -5341, 3945, 2700, 3945,
+ -5341, -5341, 42302, 41561, 3377, 3777, -5341, -5341, -5341, -5341,
+ 80955, 3375, -5341, -5341, 3374, -5341, 23317, 4097, 4021, 3660,
+ -5341, -5341, 55739, 1465, 84660, -5341, -5341, -5341, 3729, 3913,
+ 1166, -5341, 3383, 3510, -5341, 444, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 23317, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, 234, 229, -5341, -5341, -5341, 1397, 3767,
+ 2573, -5341, -5341, 80955, 2573, -5341, 3407, 3713, -5341, 3716,
+ 122, -5341, 46007, -5341, -5341, -5341, -5341, -5341, 46007, 3405,
+ -5341, 3596, 93552, 2132, 3420, 3421, 4197, 3918, -5341, 3515,
+ -5341,103155, -5341, 4136, 5255, 139, 3472, -5341, -5341, -5341,
+ -5341, -5341, 46007, -5341, -5341, 338, 3575, 3504, -5341, 3427,
+ -5341, -5341, 563, 4007, -5341, -5341, 4005, 93552, 4107, 58725,
+ -5341, -5341, 4040, 93552, 3462, -5341, -5341, 3466, 193, 46007,
+ 46007,108132, -5341, -5341, 3470, -5341, -5341, -5341, 3971, -5341,
+ -5341, 68, 4198, -5341, -5341, -5341, 43043, 43043, 929, 2692,
+ -5341, -5341, 2696, -5341, -5341, 2705, -5341, 971, -5341, 2503,
+ -5341, -5341, -5341, -5341, 2083, -5341,108132, -5341, 3911, 23317,
+ 48230, 4197, -5341, -5341, 46007, -5341, 4116, -5341, -5341,100221,
+ 185, -5341, -5341, 230, 46007, -5341, -5341, -5341, 4111, 3618,
+ 93552, -5341, -5341, 4171, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 93552, 93552,108132,108132, -5341, -5341, 1091, 1300, -5341,
+ 4229, 95775, 23317, -5341, 3497, -5341, 3499, 3500, 2972, 3858,
+ 23317, 23317, -5341, 2925, 67, 309, -5341, 3506, 3517, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, 3509, -5341, -5341,
+ 379, 413, 3513, -5341, -5341, -5341, 3516, 133, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 4162, -5341,
+ 263, -5341, -5341, -5341, 23317, 493, 511, 612, 3528, 417,
+ 455, 931, 3110, 2095, 3522, 37850, 95775, 3842, 3524, 378,
+ 3842, 3525, 1329, 1461, 515, 766, 893, -5341, 348, -5341,
+ 1483, 1516, -5341, -5341, 3526, 3527, 3842, 3529, -5341, 3532,
+ 3533, 3534, -5341, 1520, 296, 3537, -5341, -5341, 20241, 21010,
+ 21779, 3185, 3538, -5341, -5341, 1526, 905, 3842, 3540, 1188,
+ 1580, 1610, -5341, 2106, 1624, 1712, 3543, 2965, 1536, 1878,
+ -5341, -5341, -5341, -5341, 3542, 1966, 2120, 3544, 3552, 2123,
+ 2272, 46007, 3556, 3560, 2294, 46007, 1793, 2332, 3548, 1813,
+ 813, 3559, 3561, 2398, 3562, 1860, -5341, 95775, 93552, 3564,
+ 3511, 298, 3565, 2480, 3454, 3454, -5341, 23317, 3566, 274,
+ 95775, 581, 1323, -5341, 3315, -5341, -5341, -5341, -5341, 458,
+ -5341, 3568, 3315, 3576, 3112, 16396, -5341, 1382, 1568, 31776,
+ 31776, 3578, 31776, 31776, 809, 354, 354, 3586, 3586, 488,
+ 446, 24086, 809, 24086, 809, 3586, 3586, 3586, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 4083, 3584, 3589, 3591,
+ 3592, -144, 3574, -5341, -5341, -5341, -5341, -5341, -5341, 40,
+ 3933, -5341, 3757, 450, 23317, -5341, 3553, 4271, 4325, 4329,
+ -5341, -5341, -5341, -5341, 72804, 72804, 3579, -5341, -21, 3937,
+ 4243, 74286, 4247, -5341, 3598, 43043, 43043, -5341, 3599, -5341,
+ 23317, 3590, 3600, 3604, 97998, -5341, 4251, 234, 75768, 4197,
+ 72804, 618, 17934, 93552, 93552, -5341, 85401, 4252, 855, 3879,
+ -5341, 3606, 3610, -5341, 234, 17934, 3612, 1140, 400, -5341,
+ 3611, 3615, -5341, -5341, -5341, -5341, 23317, 3621, 93552, 93552,
+ -5341, -5341, -5341, -5341, 93552, -5341, -5341, -5341, -5341, -5341,
+ -5341, 2508, 23317, 93552, 1571, -5341, -5341, -5341, 1571, 93552,
+ 1571, -5341, 2508, 4258, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 1571, -5341, -5341, -5341, -5341, -5341,
+ 3790, 725, 3276, 3874, 3999, 2169, 46007, 1571, 1571, 23317,
+ -5341, -5341, -5341, -5341, 4150, 3575, 19472, 3632, 3631, -5341,
+ -5341,108132, 93552, 95775, 4363, -5341, -5341, 4171, 80955, 87624,
+ 46007, -5341, -5341, -5341, 2218, -5341, -5341, -5341, -5341, -5341,
+ 4197, 2385, 2422, -5341, 3635, 4197, -5341, -5341, 4322, -5341,
+ -5341, -5341, -5341, 2508, -5341, -5341, 4217, -5341, 46007, -5341,
+ -5341, 54235, 54235, 1763, -5341, 98739, -5341, 2508, 4197, 46007,
+ 1151, 230, -5341, 4376, -5341, -5341, 3756, -5341, -5341, -5341,
+ 3642, -5341, 4066, -5341, -5341, -5341, -5341, -5341, -5341, 3653,
+ -5341, 4309, -5341, 1597, 212, 93552, 90, 122, -5341, 93552,
+ 93552, 46007, -5341, 93552, 2583, -5341, -5341, 2583, 46007, 93552,
+ 93552, 2583, 23317, 42302, -5341, -5341, -5341, -5341, -5341, 42302,
+ -5341, 2966, -5341, 3861, 1812, 1812, -5341, -5341, -5341, -5341,
+ -5341, 4280, 3945, 3945, 42302, 4281, 4248, -5341, 93552, 6410,
+ 545, -5341, 51979, 93552, 4197, 23317, -5341, 3690, 4021, -5341,
+ 215, 783, 444, -5341, 3936, 230, -5341, -5341, 57243, 4009,
+ 57243, 57243, 95775, 3897, 23317, -5341, 4326, 3675, 4197, 1597,
+ 2508, -5341, 234, 234, 3895, 4187, 4188, 3800, 2508, 4190,
+ 4196, 4200, -5341, -5341, -5341, -5341, -5341, 3663, 1055, 315,
+ 1019, 69840, 4151, -21, 4266, 3692, -5341, 46007, 4345, -5341,
+ -5341, -5341, -5341, 23317,108132, -5341, -5341, -5341, 3710, 3712,
+ 3714, 3717, 3726, 3730, 3740, 3741, 3742, 3743, 3744, 3755,
+ 3758, 3760, 3763, 3765, 3766, 3770, 3775, 3779, 3785, 3788,
+ 3789, 3796, 3798, 157, -5341, -5341, 3750, -5341, -5341, -5341,
+ -5341, -5341, 1812, 93552, 4186, 58725, -5341, 3916, 4328, -5341,
+ -5341, 41561, -5341, 3732, 46007, -5341, 74286, 72804, -5341, -5341,
+ -5341, 3764, 1091,104577, -5341, -5341, 4502, 69840, 4207, -5341,
+ -5341, 3778, -5341, 3780, 4277, 4279, -5341, 95775,102444, -5341,
+ -5341, 4197, -5341, -5341, 3771, -5341, -5341, 3859, 3762, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 3816, 4069, 4180, -5341, -5341, -5341,
+ 3160, -5341, -5341, -5341, -5341, -5341, -5341, 4423, 76509,105288,
+ 3792, -5341, -5341, -5341, -5341, 2165, -5341, -5341,111492,111492,
+ 111492, 4171, -5341,100962, 23317, -5341, 1872, -5341, 23317, -5341,
+ -5341, 23317, -5341, 4197, 3822,112223, 77250, -5341, 77250,112223,
+ 23317, -5341, 3799, -5341, 4427, 4430, -5341, -5341, -5341, 23317,
+ -5341, 23317, 23317, 1932, 23317, 23317, 23317, 23317, -5341, 23317,
+ -5341, 23317, 23317, -5341, 31776, -5341, 3797, 3807, -5341, -5341,
+ 3808, -5341, 23317, 23317, -5341, -5341, -5341, 23317, 23317, 23317,
+ -5341, -5341, 3810, -5341, -5341, -5341, -5341, 23317, 23317, 23317,
+ -5341, 23317, 3486, 23317, 3521, 23317, 4020, 23317, -5341, 27162,
+ -5341, 3811, -5341, -5341, 23317, 23317, -5341, 23317, 23317, 23317,
+ -5341, -5341, -5341, 23317, -5341, 4379, 23317, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, 23317, -5341, 302, 27931, -5341,
+ 23317, 23317, 23317, -5341, -5341, 23317, 3809, 3813, -5341, 93552,
+ 2435, 3843, 230, 3815, -5341, -5341, 3824, 3830, 2965, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 987, 31776, 827, 31776,
+ 1568, 3733, 16396, -5341, 1431, 1568, 3454, 3454, 93552, 4536,
+ 3826, -5341, 23317, 23317, 17165, 23317, 95775, 23317, 3828, 3836,
+ -5341, 3834, 31776, -5341, -5341, 3838, -5341, 2299, 3843, 3929,
+ 4283, -5341, 4197, 34852, 4338, -5341, 46007, 4340, 4387, 4045,
+ -5341, 72804, 69840, 4503, 4507, -5341, 4197, -5341, 3850, -5341,
+ -5341, -5341, 3851, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 402, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 23317, 72804, -5341, -5341, -5341, -5341, 234, -5341, 3860, 3862,
+ -5341, -5341, 29469, 2422, -5341, 4197, -5341, 234, 234, 17934,
+ -5341, 8887, -5341, -5341, 1021, 4138, 4410, -5341, -5341, 93552,
+ 1040, 93552, -5341, 50475, 50475, 88365, 4197, 143, -5341, -5341,
+ -5341, -5341, 4197, -5341, -5341, -5341, -5341, -5341, -5341, 3875,
+ -5341, -5341, -5341, 4613, -5341, -5341, 4258, -5341, 2531, 2169,
+ -5341, -5341, 4197, 38597, 564, -5341, -5341, -5341, 19472,105999,
+ -5341, 3866, 3869, 3873, -5341, 46007,106710, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, 3878, -5341, -5341,
+ 19472, 3885, -5341, 3999, -5341, 3764, 1412, 3890, 3872, -5341,
+ -5341, -5341, -5341, -5341, -5341, 233, 248, 1915, 2531, -5341,
+ -5341, 287, -5341, -5341, -5341, -5341, -5341, 878, -5341, -5341,
+ 3999, -5341, 1440, 2508, 3927, -5341, 230, 4118, -5341, -5341,
+ 1597, 1165, 1165, 4458, 212, 4331, -5341, 4151, 4540, 4464,
+ 4466, -5341, 3663, -5341, -5341, -5341, 93552, -5341, -5341, 1068,
+ -5341, 46007, 1947, 3572, 3572, -5341, 1812, 227, -5341, 31776,
+ 4620, -5341, 4384, 42302, 4514, 4516, -5341, 42302, -5341, -5341,
+ 2173, -5341, -5341, 72063, -5341, -5341, -5341, 4197, 195, 2178,
+ 23317, 93552, -5341, 3690, 3963, -5341, -5341, 783, -5341, -5341,
+ -5341, -5341, 57243, -5341, -5341, -5341, 1465, 3896, 2178, 1589,
+ 3899, -5341, -5341, 75768, 72063, -5341, 4269, 4272, 1659, -5341,
+ -5341, -5341, -5341, 234, 234, -5341, 311, 234, -5341, -5341,
+ 518, -5341, -5341, 1688, 337, 3663, -5341, 2508, 2508, 2508,
+ 2508, 230, 2508, 2508, 2190, -5341, 321, -5341, -5341, 80955,
+ -5341, 4651, 4652, -5341, 4653, -5341, -5341, 841, -5341, 2778,
+ 933, -5341, 961, -5341, 4446, 93552, 4635, 3692, -5341, 461,
+ 2132, 4197, -5341, 4404, 3910, 3912, 230, 3917, 230, 230,
+ 2508, 2508, 3875, 2508, 230, 2508, 2508, 2508, 2508, 2508,
+ 2508, 2508, 230, 2508, 1486, 3754, 414, 2508, 230, 5255,
+ -5341, -5341, -5341, -5341, 3908, 41561, 633, -5341, 56491, 4452,
+ 2531, 3932, -5341, -21, -5341, -5341, 434, 4572, -5341, 3923,
+ 23317, -5341, 113, 4120, 3938, 59466, 69840, 69840, -5341, 2594,
+ -5341, 46007, -5341, 4564, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 65394, -5341, -5341, 4241, 1782, 3931, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 3934, -5341, -5341, 23317, -5341, -5341, 3424, -5341,
+ -5341, -5341, -5341, -5341,107421, 3930, 4197, 23317, 4197, 4197,
+ 23317, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 3939, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 3939, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 3940, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 3947,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 4626, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 4569, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, 3939, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, 3939, -5341, 3939,
+ -5341, 4575, 3939, 3939, -5341, 3952, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 3953, 3954, 3955, 2965, -5341, 23317, 23317, 2491, 169, 169,
+ 23317, 2008, 2056, 838, -5341, 2493, 2509, 2572, 2311, 95775,
+ -5341, -5341, 2612, 2623, 2624, 2652, 2653, -5341, 2060, 3286,
+ 2096, 4197, 23317, 4197, 23317, 4197, 23317, 4197, 24086, 2753,
+ -5341, 2219, 4130, -5341, 2250, 4219, 2784, 2789, 2253, -5341,
+ 2805, 4706, 2264, 24086, 2796, 2831, 2102, 2158, 2835, 95775,
+ 93552, 3951, 3960, 3960, 194, -5341, 3958, -5341, -5341, -5341,
+ 3959, -5341, 23317, 23317, 3966, 3315, -5341, 23317, 1568, 31776,
+ 1025, 31776, -5341, -5341, 4083, -5341, 23317, -5341, 4538, 3967,
+ 4164, 3969, 3970, 3185, 3972, 3975, 3977, 3983, 4197, -5341,
+ -5341, 93552, 3985, 2082, -5341, 3875, -5341, 4598, -5341, 4701,
+ 3991, 4011, 3993, 3838, -5341, 72804, -5341, 46007, -5341, 4648,
+ 3466, -5341, 69840, 69840, -5341, 82437, -5341, 57984, 93552, 93552,
+ -5341, 4197, -5341, 17934, 618, 4747, 4750, -5341, -5341, -5341,
+ -5341, 72, 4550, -5341, -5341, -5341, -5341, 17934, 234, -5341,
+ 234, 17934, 3615, -5341, -5341, -5341, -5341, 4093, -5341, 725,
+ -5341, -5341, -5341, 1571, 4001, -5341, 234, 1344, -5341, 19472,
+ 4006, 4003, -5341, 4475, -5341, 987, 283, -5341, 3575, -5341,
+ 4016, 89106, -5341, 4018, -5341, -5341, 4558, -5341, -5341, 4649,
+ 54235, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 725, 4065, 4246, -5341, -5341, -5341, -5341, -5341,
+ 2174, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 46007, 4602, 69840, 933, 4393, 46007, 46007, 6731, 9105,
+ 3663, 4027, 93552, -5341, 3692, 4028, 481, 4028, -5341, -5341,
+ -5341, -5341, 2082, 1812, 1812, 3125, 4509, 42302, 42302, 3605,
+ 4510, 23317, 4031, -5341, 93552, -5341, 1083, -5341, 4434, -5341,
+ -5341, 23317, -5341, -5341, -5341, -5341, 4197, 4761, 4033, -5341,
+ -5341, -5341, -5341, -5341, -5341, 23317, -5341, 55739, 23317, 4037,
+ 4038, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 302, 302,
+ -5341, -5341, 302, 302, -5341, -5341, -5341, -5341, 302, 302,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 1055, -5341, 4788, 474, -5341, 4614, -5341, -5341, -5341, -5341,
+ 118, 230, 230, 230, 3754, 1727, -5341, 2778, 1685, 4375,
+ -5341, 6390, 1568, 1654, 4537, 1759, -5341, 2273, -5341, 4772,
+ -5341, 200, -5341, -5341,108132, 218, 238, -5341, 257, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 58725, 2531, -5341, 93552,
+ 4388, 4577, -5341, -5341, -5341, -5341, -5341, -5341, 987, -5341,
+ 4197, -5341, 4695, -5341, -5341, -5341, -5341, 122, 122, -5341,
+ 108132, -5341, -5341, 283, -5341, -5341, 4564, 4327, -5341, 1384,
+ -5341, 3939, 3939, 48, -5341, 3940, 4607, 3940, -5341, -5341,
+ 4443, 3148, 2220, 4443, -5341, 2220, 3940, -5341, 4058, -5341,
+ 4443, -5341, 2220, 3939, -5341, 3939, -5341, -5341, 2220, 3939,
+ -5341, 4059, 3940, 4443, 1355, 2330, 3940, -5341, 3939, 1499,
+ 3939, 3939, 3939, 4260, 3939, 3939, -5341, 3940, -5341, -5341,
+ -5341, -5341, -5341, -5341, 138, 3939, 3939, 3939, 3939, 3947,
+ 4712, 4715, -5341, 93552, -5341, 4197, -5341, -5341,111492, 93552,
+ 838, 4197, 3090, -5341, -5341, -5341, 604, 3246, -5341, -5341,
+ -5341, 4814, -5341, -5341, 3939, -5341, 604, -5341, -5341, -5341,
+ -5341, -5341, -5341, 604, -5341, -5341, -5341, -5341, 4070, 3454,
+ 3454, -5341, 4780, 4590, 4683, 2856, 23317, 23317, -5341, 23317,
+ -5341, -5341, -5341, 1350, 4073, 4541, -5341, -5341, -5341, -5341,
+ -5341, -5341, 23317, 23317, 23317, 4197, 4197, 4197, 3454, -5341,
+ -5341, 4057, -5341, -5341,112223, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 414, 3454, -5341, -5341, 23317, 23317, -5341, -5341,
+ -5341, 93552, 3843, 4077, 4348, -5341, -5341, -5341, 3843, 4215,
+ -5341, -5341, 3843, 230, -5341, -5341, -5341, 2280, 3315, -5341,
+ 23317, 1568, 4655, 4078, 4799, 4085, -5341, -5341, -5341, -5341,
+ -5341, -5341, 23317, 82437, -5341, 4086, 4089, -5341, -5341, -5341,
+ 4521, 23317, 4705, 4658, -5341, 3843, 93552, -5341, -5341, -5341,
+ 69840, 3598, 3598, 89847, -5341, -5341, -5341, -5341, 680, 234,
+ 234, 17934, -5341, -5341, 4096, 4099, 17934, 17934, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 725, -5341, 38597, 2531, 22548, -5341, -5341, -5341, 19472,
+ -5341, 4104, 38597, 4563, -5341, -5341, -5341, 4452, 189, -5341,
+ -5341, 90588, -5341, 4110, -5341, 4090, -5341, 1809, 4440, 4718,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 4113, -5341, -5341, -5341,
+ 4131, -5341, 4115, -5341, 46007, -5341, -5341, 4139, -5341, -5341,
+ 39338, 4728, 4157, 4482, 46007, 234, 234, 234, 234, 234,
+ 234, 234, 234, 234, 234, 4483, 234, 234, 234, 234,
+ 234, 234, 234, 234, 234, 234, 1653, 93552, 234, 234,
+ -5341, -5341, 4685, -5341, 6520, -5341, -5341, -5341, -5341, -5341,
+ 234, -5341, -5341, -5341, 847, 4704, 4851, 4132, 4270, -5341,
+ -5341, -5341, -5341, 4237, 4273, 3692, 2468, -5341, -5341, -5341,
+ 4616, -5341, -5341, -5341, 4617, 4197, 93552, -5341, -5341, -5341,
+ 1163, 2066, 4748, 2178, 4142, 93552, 2178, 783, 444, 4197,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, 551, -5341, 80955, -5341, -5341, -5341, -5341,
+ -5341, 4887, 4892, -5341, -5341, -5341, -5341, 4330, 632, 4372,
+ 1370, 4709, 4544, 4713, 2053, 3582, 234, 4716, 4867, -5341,
+ 459, 234, 4717, 4776, 4235, 4782, 4725, -5341, 4239, 4544,
+ 4729, 4355, 4731, 4733, 4735, -5341, -5341, 9105, -5341, -5341,
+ -5341, -5341, 420, 43784, -5341, -5341, -5341, -5341, -5341, 4350,
+ 23317, 23317, 4752, 93552, 4753, -5341, 4571, -5341, 93552, -5341,
+ 987, -5341, -5341, -5341, 4476, -5341, 2281, -5341, -5341, 2339,
+ -5341, -5341, 2374, -5341, -5341, 3732, -5341, 4834, -5341, 4524,
+ 3229, -5341, -5341, 133, 4383, 4660, 4660, -5341, -5341, -5341,
+ 4765, -5341, -5341, -5341, -5341, 4815, -5341, 4443, 234, 4443,
+ -5341, -5341, 158, -5341, 158, -5341, 217, 3458, 77991, 4443,
+ -5341, -5341, -5341, -5341, 4662, 2220, 604, 77250, 1629, 4584,
+ -5341, -5341, -5341, 158, 3364, -5341, -5341, 4443, -5341, -5341,
+ -5341, 3364, 158, -5341, 4668, -5341, -5341, -5341, 158, 4443,
+ 4405, 93552, 4884, 2220, -5341, -5341,101703, 2220, 158, 4884,
+ 4749, -5341, 604, 4930, 2220, 4443, 158, 158, -5341, 197,
+ 4209, -5341,111492, -5341, -5341, 4213, 4214, 4218, 4220, -5341,
+ -5341, 2383, 4221, -5341, -5341, -5341, -5341, 4222, 4225, 23317,
+ 3364, 4683, 57243, 4226, -5341, -5341, 2857, 2162, 2432, 4491,
+ 4448, -5341, 4382, -5341, 2879, 4197, 4197, 1769, 3940, -5341,
+ -5341, -5341, -5341, 4846, 3939, -5341, 4936, -5341, 3939, 604,
+ -5341, -5341, -5341, -5341, -5341, 4232, 2442, 1776, 2880, 2881,
+ -5341, -5341, -5341, 4234, -5341, -5341, 418, -5341, 4227, -5341,
+ 2445, 4950, 2110, 23317, -5341, 4240, -5341, -5341, 93552, -5341,
+ -5341, 3454, 1118, -5341, 2449, -5341, -5341, -5341, 4244, 3598,
+ -5341, -5341, 60207, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 17934, 17934, 3999, -5341, 4005, 2422, -5341, -5341, -5341, -5341,
+ 4611, 4245, 4249, -5341, -5341, -5341, 4236, 133, 38597, -5341,
+ -5341, -5341, 4253, 4250, -5341, -5341, -5341, 89106, -5341, 2462,
+ -5341, -5341, 4971, 19472, 2508, 2628, 4256, -5341, 80955, 4257,
+ 4259, 46748, 1625, 93552, 2484, -5341, -5341, -5341, -5341, -5341,
+ 1463, -5341, 484, 2583, 2218, 2218, -5341, 4255, 46007, -5341,
+ 234, -5341, 273, 275, 294, 335, -5341, 3875, 230, 230,
+ 2508, 2508, 234, 230, 80955, 1708, 230, 3875, 3875, 387,
+ 2508, 2329, 273, -5341, -5341, -5341, 230, 273, 265, -5341,
+ -5341, 4495, -5341, 9105, 69099, 78732, 3783, -5341, -5341, 1592,
+ 4373, -5341, 4267, 78732, -5341, 2508, -5341, 4984, 5008, -5341,
+ -5341, 4670, 23317, 4261, 23317, 4274, 2502, -5341, 2218, -5341,
+ 2218, -5341, 1163, 4985, 4986, 4932, 4987, 2066, -5341, 2240,
+ -5341, -5341, -5341, -5341, -5341, -5341, 783, -5341, -5341, 4276,
+ -5341, -5341, -5341, -5341, 4612, -5341, 5030, -5341, 4730, 44525,
+ 2583, -5341, 1739, 4321, -5341, -5341, -5341, 4924, 2813, 2813,
+ 326, 2813, 90588, 93552, 46007, 545, 443, 4907, 2226, 1869,
+ 4332, 4845, 2813, 2813, 91329, 326, 38597, -5341, -5341, -5341,
+ 2813, -5341, 2813, 46007, 92070, 326, -5341, -5341, -5341, 93552,
+ -5341, 2813, 326, -5341, 326, 326, 90588, -5341, 10320, -5341,
+ -5341, 39338, 1406, -5341, 4197, 3454, 4682, -5341, -5341, 4406,
+ 2508, 4656, -5341, -5341, 4762, -5341, 93552, 226, -5341, 230,
+ -5341, 230, -5341, 230, -5341, 31776, -5341, 3599, -5341, -5341,
+ 2065, -5341, -5341, 4657, 4452, 4802, -5341, -5341, 93552, -5341,
+ 4763, 4789, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 79473, 234, -5341, -5341, 2516, -5341,
+ -5341, 2523, -5341, -5341, -5341, -5341,101703, -5341, 2542, -5341,
+ 66876, 23317, -5341, -5341, -5341, 4884, 4298, -5341, -5341, -5341,
+ 4323, -5341, -5341, -5341, -5341, -5341, 4930, -5341, -5341, 62430,
+ -5341, -5341, -5341, 78732, 4960, -5341, -5341, -5341, -5341, -5341,
+ 5059, -5341, -5341, 4308, 2178, -5341, 4311, -5341, -5341, -5341,
+ -5341, 23317, -5341, 4543, -5341, 4650, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 3875, -5341, -5341, -5341,
+ 4313, -5341, 230, -5341, 23317, -5341, -5341, 4314, 3419, 2178,
+ -5341, -5341, 4411, 4283, 4318, -5341, 4658, 93552, -5341, -5341,
+ 17934, 17934, -5341, -5341, -5341, 4328, -5341, -5341, -5341, 38597,
+ 60948, 4319, 4316, -5341, 234, -5341, -5341, 93552, -5341, -5341,
+ 3875, 4681, -5341, 2553, -5341, -5341, 93552, 4324, 4518, 93552,
+ 93552, -5341, -5341, 4333, 93552, -5341, -5341, -5341, 39338, 4334,
+ 4942, 4944, 2218, -5341, 2583, 4869, 46748, -5341, 2583, 2583,
+ 64653, 93552, 4335, 2508, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, 4339, -5341, -5341, -5341, -5341, -5341, 2508,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 5053, -5341, 4685, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 4341, 4337, 93552, -5341, 66135, -5341, -5341, -5341, -5341, 5002,
+ 108132, -5341, -5341, -5341, 4905, 1654, -5341, -5341, 4342, -5341,
+ -5341, 66876, -5341, -5341, -5341, -5341, 4344, 4346, 4197, 93552,
+ 4197, 93552, -5341, 4982, 4982, -5341, 3364, 3364, 5049, 3364,
+ -5341, 5055, 5060, 2240, -5341, -5341, 5097, 632, 4719, 1685,
+ 1568, 326, 1568, 5000, -5341, -5341, 93552, 46748, 90588, 46748,
+ -5341, 4842, -5341, 72063, 46748, 2813, 93552, -5341, 5004, -5341,
+ 4972, 46748, 46748, -5341, -5341, 90588, 4351, -5341, 2178, 2512,
+ 93552, 46748, -5341, -5341, -5341, 3843, 4822, 46748, 90588, -5341,
+ 90588, -5341, 4634, 4850, 3331, -5341, 4358, 4357, 93552, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 846, -5341, -5341, 2574,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 1346, 4557,
+ -5341, 2065, -5341, -5341, -5341, 46007, -5341, -5341, -5341, -5341,
+ -5341, -5341, 604, 3364, 604, 4884, -5341, 93552, -5341, 4197,
+ -5341, 93552, 5113, -5341, -5341, -5341, -5341, 47489, -5341, -5341,
+ -5341, 4684, -5341, 2581, -5341, 4367, 23317, -5341, -5341, 2892,
+ -5341, -5341, 4368, -5341, 4369, 3896, -5341, 3557, 4501, 4271,
+ 4325, 4329, 4551, 4720, -5341, 4555, -5341, 4193, 4521, 4378,
+ 31776, -5341, -5341, 1600, -5341, -5341, -5341, -5341, 95775, -5341,
+ -5341, 4374, -5341, 38597, 19472, -5341, -5341, 4795, -5341, 2597,
+ 2178, 4385, 93552, 4386, 2603, 2617, 93552, 4389, -5341, 23317,
+ 2583, -5341, -5341, 46748, 46007, -5341, 4868, 708, 46748, 46748,
+ 4392, 1381, 4394, 4396, 2550, 1663, 4397, 4059, 1687, 58,
+ 1355, 462, 1765, 4399, 1785, 4400, 1801, 1831, 1840, 1862,
+ 1864, 4409, 5094, -5341, -5341, 4412, 4415, 4416, 4418, 4419,
+ 4420, 4421, 4422, 4424, -5341, -5341, 46007, -5341, -5341, 189,
+ 265, -5341, 78732, -5341, 1714, 4593, -5341, -5341, 5164, -5341,
+ 4752, 78732, 3783, -5341, -5341, -5341, -5341, 99480, 6991, 2648,
+ 2649, 2241, -5341, -5341, -5341, -5341, 3364, -5341, 3364, 3364,
+ -5341, 4413, -5341, -5341, -5341, 5052, -5341, 5054, -5341, 2071,
+ 1501, -5341, 46748, 338, 4899, 4886, 5122, -5341, 46748, 4250,
+ 93552, -5341, -5341, 434, -5341, 38597, -5341, -5341, 4910, 4911,
+ -5341, 4929, 1406, -5341, 93552, -5341, -5341, -5341, 4527, -5341,
+ 108132, 4630, 5143, 5144, -5341, 93552, 92811, 31776, -5341, -5341,
+ 5058, -5341, 3575, -5341, -5341, -5341, -5341, -5341, 4439, -5341,
+ 62430, -5341, -5341, -5341, -5341, -5341, 2178, -5341, -5341, -5341,
+ 151, -5341, 5171, 1546, -5341, -5341, 253, -5341, -5341, -5341,
+ -5341, 93552, 4447, 4533, -5341, -5341, 4519, -5341, -5341, 2945,
+ -5341, 137, 61689, -5341, -5341, -5341, -21, 93552, -5341, 5201,
+ 4450, 1055, -21, -21, 4451, 93552, 2893, 46748, 4868, 1289,
+ 4459, 1165, -5341, 1165, -5341, -5341, 3008, 66876, -5341, -5341,
+ 3325, 93552, 4460, 5221, -5341, -5341, 4665, -5341, 93552, -5341,
+ -5341, -5341, 1759, -5341, -5341,109554, 5024, 2655, -5341, -5341,
+ -5341, -5341, -5341, 5178, -5341, 5179, 4467, 4468, -5341, -5341,
+ -5341, -5341, 46748, -98, -5341, -5341, 5101, -5341, 5149, 5151,
+ 1406, -5341, 46007, 5036, 75768, -5341, -5341, -5341, 326, -5341,
+ 93552, 46748, 46007, -5341, -5341, 4250, 878, 23317, 4826, 5164,
+ -5341, 4671, 4672, -5341, -5341, 2676, -5341, -5341, 2082, 4961,
+ -5341, 93552, -5341, -5341, -5341, 3557, -5341, -5341, 4609, 360,
+ -5341, 2679, -5341, -5341, -5341, 3843, -5341, 4481, -5341, 4843,
+ 234, 234, 4844, 234, 234, 234, 234, 4484, 2945, -5341,
+ -5341, -5341, 4835, -5341, -5341, -5341, 2752, 2178, 4487, 93552,
+ 4489, 2687, 1675, 2791, 93552, 4488, -5341, -5341, -5341, 1165,
+ 93552, 5091, -5341, 4493, -5341, 4494, 4496, -5341, -5341, 5114,
+ 2508, -5341, 4576, -5341, -5341, 3008, -5341, -5341, -5341, 4539,
+ 5119, 5080, -5341, 80955, 34083, -5341, 4988, -5341, 4943, 5184,
+ -5341, 5234, 3793, -5341, -5341, -5341, -5341, -5341, -5341, 93552,
+ 4508, 46007, 4571, 5164, 2468, -5341, 99480, 9273, -5341, -5341,
+ 89106, 89106, 5094, 3843, 4658, -5341, -5341, -5341, 34083, -5341,
+ -5341, 4658, -5341, -5341, -5341, -5341, -5341, 5134, -5341, 4197,
+ 23317, -5341, -5341, -5341, -5341, -5341, 92811, -5341, 545, -5341,
+ -5341, -5341, -5341, -5341, -5341, 93552, -5341, 4511, -5341, -5341,
+ 188, 234, 2508, 2508, 234, 3920, 3920, 3843, 80955, 4603,
+ -5341, -5341, 234, 1165, 2508, 234, 1165, -5341, -5341, 1256,
+ 2752, -5341, -5341, -5341, -5341, -5341, -5341, 1612, -21, -5341,
+ 4714, 1256, 1675, -5341, -5341, 1256, 2791, -5341, -5341, 4522,
+ 93552, 4526, 4530, -5341, 2691, -5341, 1088, 5108, 93552, 4535,
+ 93552, 93552, -5341, -5341, -5341, -5341, -5341, -5341, 4891, -5341,
+ 4542, 4545, 3754, 3754, 16396, -5341, -5341, -5341, -5341, -5341,
+ -5341, 5120, -5341, 4582, 849, 234, -5341, 3964, 4525, 93552,
+ 5193, 4904, -5341, -5341, -5341, 5121, -5341, -5341, -5341, -5341,
+ -5341, 2000, 4547, 2706, -5341, -5341, 2733, -5341, -5341, -5341,
+ -5341, 4552, 4197, -5341, 38597, -5341, 4533, -5341, -5341, 2750,
+ -5341, 28700, -5341, -5341, -5341, 2508, -5341, -5341, 2508, -5341,
+ -5341, -5341, -5341, -5341, 2762, -5341, 80955, -5341, -5341, 230,
+ -5341, -5341, 5157, 4994, -5341, 4754, 2752, 2650, -5341, -5341,
+ -5341, -5341, -5341, 4554, 93552, 93552, 4556, -5341, 93552, -5341,
+ -5341, -5341, 1363, -5341, 2790, 93552, 2815, 2820, -5341, -5341,
+ -5341, -5341, 4561, 4565, -5341, 24, -5341, -5341, 3964, 93552,
+ 4559, -5341, -5341, 4670, -5341, 5130, 2468, -5341, -5341, -5341,
+ 4658, 4568, -5341, 234, 5086, -5341, -5341, 4511, -5341, 4570,
+ -5341, 2082, -5341, -5341, 80955, -5341, 4603, -5341, -5341, -5341,
+ -5341, -5341, -5341, 1256, -5341, -5341, 2825, 4450, 93552, -5341,
+ 600, 600, 2752, 2828, 1675, 2791, -5341, 308, -5341, 1644,
+ 1644, 1326, -5341, 93552, -5341, -5341, -5341, 2468, 346, 2837,
+ 38597, 19472, 4873, 4434, -5341, 28700, 4586, 4177, -5341, -5341,
+ -5341, 4869, 4587, 4450, -5341, -5341, 1599, 5023, 5154, 5159,
+ -5341, 2752, -5341, -5341, -5341, 4588, -5341, 1644, -5341, -5341,
+ -5341, -5341, -5341, 1758, -5341, 5252, -5341, 3673, -5341, -5341,
+ -5341, 5166, 346, 346, -5341, -5341, -5341, 5305, 4748, -5341,
+ -5341, -5341, 4177, -5341, -5341, 2752, 4591, -5341, -5341, -5341,
+ 5078, 5274, -5341, -5341, -5341, -5341, 1758, -5341, 4732, -5341,
+ -5341, -5341, -5341, -5341, -5341, 391, 5174, -5341, 5176, -5341,
+ 3364, 5237, -5341, -5341, 2752, 600, 600, -5341, -5341, -5341,
+ -5341, 5266, 4951, -5341, 5354, 4606, -5341, -5341, -5341, 1413,
+ 421, 35604, 5129, -5341, -5341, 80955, -5341, -5341, -5341, -5341,
+ 80955, -5341, 2848, -5341, -5341, 38597, -5341, -5341,108132, -5341,
+ -5341, 36356, 4608, -5341, 234, -5341, 5164, -5341, 38597, -5341,
+ -5341, -5341, 19472, -5341, -5341
+};
+
+/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_int16 yydefact[] =
+{
+ 0, 3619, 2, 1016, 2294, 0, 430, 0, 1243, 612,
+ 2139, 2288, 2287, 2060, 470, 220, 376, 2062, 2361, 0,
+ 0, 466, 1259, 754, 496, 0, 320, 0, 0, 473,
+ 318, 220, 1308, 3262, 2188, 0, 3368, 2126, 0, 1306,
+ 468, 2459, 2065, 0, 3524, 0, 0, 0, 3529, 72,
+ 2032, 0, 1259, 342, 3370, 85, 0, 0, 1259, 2345,
+ 3529, 0, 2373, 0, 0, 2168, 0, 0, 0, 0,
+ 3, 3621, 22, 0, 45, 27, 33, 17, 21, 16,
+ 47, 60, 53, 30, 3709, 3710, 3712, 43, 3560, 42,
+ 11, 63, 64, 19, 50, 12, 15, 18, 41, 49,
+ 37, 44, 57, 58, 1329, 1305, 1333, 1304, 1300, 1296,
+ 1315, 1316, 1317, 1323, 25, 26, 34, 51, 68, 23,
+ 65, 61, 24, 2294, 13, 28, 29, 14, 52, 46,
+ 38, 62, 69, 39, 0, 59, 40, 67, 32, 54,
+ 31, 9, 10, 20, 55, 56, 48, 70, 35, 66,
+ 36, 8, 2048, 168, 3526, 3711, 1060, 0, 0, 0,
+ 0, 2058, 0, 2058, 1151, 1374, 3558, 3559, 3560, 1260,
+ 0, 1261, 0, 0, 2501, 2502, 2744, 2759, 2807, 2559,
+ 2851, 2861, 2878, 2885, 3020, 2712, 2757, 2758, 2558, 2787,
+ 2620, 2879, 2902, 2930, 3015, 2697, 2696, 2698, 3001, 2699,
+ 2700, 2701, 2702, 2703, 3002, 2595, 2704, 2705, 2706, 2708,
+ 2707, 2709, 2710, 3003, 2596, 3630, 2597, 2669, 2711, 2671,
+ 2670, 2713, 2598, 2599, 2714, 2715, 2716, 2718, 2717, 2650,
+ 2601, 2600, 2719, 2721, 2720, 2672, 2673, 2653, 2722, 3004,
+ 2723, 2725, 2602, 2999, 2603, 2604, 2605, 2724, 2606, 2726,
+ 2654, 2727, 2728, 2607, 2729, 2730, 2731, 2732, 2734, 2733,
+ 2647, 2735, 2736, 2738, 2739, 2740, 2737, 2741, 2742, 2745,
+ 2743, 2675, 2674, 3005, 2608, 2746, 2747, 2748, 2749, 2751,
+ 2752, 2750, 2753, 2655, 2754, 2755, 2756, 2764, 3631, 2765,
+ 2767, 2766, 2676, 2768, 2769, 2770, 2772, 2771, 2773, 2775,
+ 2609, 2610, 2611, 2774, 2776, 2760, 2761, 2762, 2763, 2778,
+ 2777, 2779, 2780, 2781, 2677, 2612, 2651, 2613, 2998, 2782,
+ 2783, 2556, 2784, 2785, 3006, 2614, 2666, 2786, 2656, 2789,
+ 2788, 2615, 2790, 2616, 2791, 3007, 3008, 2792, 2793, 2795,
+ 2797, 2794, 2798, 2799, 2805, 2617, 2796, 2800, 2801, 2802,
+ 2803, 2804, 2806, 2678, 2808, 2648, 2809, 3009, 3010, 2810,
+ 2811, 2812, 2813, 2667, 2814, 2815, 2816, 2817, 2830, 2831,
+ 2821, 2822, 2824, 2825, 2828, 2823, 2829, 2834, 2833, 2835,
+ 2836, 2837, 2838, 2839, 2832, 2819, 2826, 2827, 2820, 2840,
+ 2841, 2818, 2842, 2844, 2843, 2845, 2679, 2846, 2847, 2848,
+ 2849, 2850, 3011, 2852, 2853, 2855, 2854, 2856, 3012, 2857,
+ 2858, 2859, 2663, 2860, 2680, 2681, 2862, 2863, 3013, 2864,
+ 2865, 2870, 2871, 2872, 2649, 2867, 2866, 2868, 2869, 2682,
+ 2683, 2684, 2873, 2874, 2875, 2877, 2876, 2657, 2619, 2618,
+ 3014, 2621, 2880, 2881, 2622, 2882, 2884, 2883, 2665, 2623,
+ 2886, 2887, 2889, 2888, 2624, 2652, 2625, 2626, 2890, 2891,
+ 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901,
+ 2685, 2686, 2903, 2904, 2905, 2907, 2906, 2908, 2909, 2913,
+ 2910, 2911, 2912, 2914, 2627, 2915, 2658, 2916, 2917, 2918,
+ 2628, 2920, 2919, 2629, 2921, 2922, 2923, 2924, 2925, 2664,
+ 2659, 2926, 2927, 2929, 2687, 2928, 2931, 2932, 2660, 2933,
+ 2934, 3016, 2630, 2935, 2936, 2688, 2668, 2631, 3017, 2938,
+ 2661, 2695, 2937, 2939, 2633, 2634, 2940, 2941, 2942, 2632,
+ 2943, 2635, 3018, 2944, 2946, 2945, 2947, 2948, 2949, 2950,
+ 2636, 2951, 2952, 2637, 2953, 2638, 2954, 2955, 3019, 2956,
+ 2958, 2957, 2959, 2960, 2961, 2962, 2963, 2964, 2966, 2968,
+ 2967, 2965, 2969, 2970, 2689, 2971, 2639, 2690, 3022, 3023,
+ 2691, 2972, 2973, 2974, 2975, 3021, 2662, 2976, 2977, 2642,
+ 2978, 2979, 2981, 2980, 2640, 2641, 2982, 2983, 2646, 3024,
+ 2984, 3025, 2692, 2693, 2985, 2986, 2996, 2987, 2989, 2988,
+ 2991, 2990, 2997, 3026, 2557, 2643, 2992, 2993, 2644, 2994,
+ 2645, 2995, 2694, 2506, 2522, 244, 2523, 2553, 2551, 2555,
+ 2549, 2554, 2547, 2548, 3000, 2594, 2552, 2550, 400, 131,
+ 0, 0, 2163, 2058, 2036, 2058, 2058, 2058, 2058, 2058,
+ 2058, 2061, 2058, 2058, 0, 0, 0, 400, 2068, 2363,
+ 0, 2383, 2384, 2378, 3358, 3359, 3353, 378, 0, 0,
+ 0, 2261, 2260, 0, 0, 305, 317, 320, 313, 316,
+ 0, 220, 2058, 378, 319, 320, 0, 1338, 0, 2266,
+ 320, 0, 2137, 2377, 0, 400, 2460, 2457, 2068, 2334,
+ 2336, 0, 2332, 1446, 1445, 0, 3529, 0, 2512, 1238,
+ 1270, 1195, 3530, 3531, 0, 77, 80, 2300, 343, 0,
+ 0, 0, 610, 0, 0, 1203, 0, 3531, 3541, 2375,
+ 0, 131, 1176, 0, 131, 2171, 2058, 2058, 3602, 3603,
+ 0, 0, 0, 3597, 0, 3604, 0, 1333, 0, 1319,
+ 1, 5, 0, 0, 610, 970, 610, 971, 0, 610,
+ 610, 0, 0, 0, 0, 3565, 3558, 3559, 3560, 0,
+ 2018, 1873, 1334, 1333, 1965, 1969, 3546, 3546, 3546, 0,
+ 0, 1965, 1324, 2762, 2998, 2884, 0, 2279, 2293, 2277,
+ 2495, 1302, 1298, 2606, 1019, 1061, 1024, 228, 0, 0,
+ 1026, 0, 1037, 2528, 2527, 2526, 1034, 220, 0, 1153,
+ 0, 0, 0, 3566, 3565, 0, 1215, 2281, 2282, 2283,
+ 2284, 2285, 2286, 2289, 0, 250, 400, 432, 0, 443,
+ 434, 437, 0, 132, 133, 1241, 1244, 0, 613, 2167,
+ 2166, 0, 2165, 2140, 0, 2163, 0, 2056, 0, 0,
+ 0, 0, 220, 0, 220, 2041, 2058, 2058, 471, 3652,
+ 0, 3418, 3436, 3437, 1387, 3433, 3438, 0, 3435, 3430,
+ 0, 0, 3432, 3429, 0, 0, 3457, 3431, 3434, 2597,
+ 2730, 2771, 2611, 2779, 2780, 2894, 2898, 2903, 2914, 2918,
+ 2661, 2633, 2959, 3411, 3399, 3413, 3412, 0, 0, 3416,
+ 3421, 0, 3420, 0, 0, 2070, 2364, 2365, 2369, 0,
+ 2387, 0, 391, 0, 0, 3638, 0, 0, 380, 381,
+ 3637, 3715, 0, 385, 3636, 0, 378, 3702, 0, 400,
+ 3696, 3704, 3703, 3705, 3706, 3707, 3708, 411, 0, 412,
+ 413, 467, 3699, 2524, 0, 3633, 3635, 3632, 3634, 2525,
+ 3658, 0, 0, 3701, 0, 3700, 3697, 3698, 1257, 1678,
+ 0, 2434, 2503, 2504, 0, 2447, 2452, 2453, 2445, 2446,
+ 2450, 2426, 2449, 2425, 2451, 1448, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1387, 1387, 1387, 1384,
+ 0, 0, 0, 0, 0, 0, 2443, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1384, 0, 0, 2442, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3020,
+ 2444, 1387, 1384, 1384, 0, 0, 3015, 0, 0, 0,
+ 3001, 2595, 3003, 2650, 2602, 2603, 2604, 2605, 2647, 2674,
+ 3005, 3006, 3007, 3009, 3010, 3011, 3012, 2863, 3013, 3014,
+ 2665, 2892, 2687, 3016, 3017, 3019, 2690, 3022, 3023, 2691,
+ 3021, 2662, 3024, 3025, 3026, 2643, 2694, 0, 0, 0,
+ 0, 1447, 0, 0, 1331, 1523, 755, 1393, 1405, 1421,
+ 0, 1521, 1520, 1524, 1526, 1532, 1440, 1553, 1492, 1493,
+ 1495, 1494, 1499, 1500, 0, 1654, 1501, 0, 0, 1498,
+ 2439, 1497, 1496, 2440, 2441, 1491, 2481, 2511, 0, 0,
+ 2505, 3000, 2594, 498, 497, 0, 339, 332, 327, 335,
+ 329, 331, 330, 336, 337, 338, 333, 328, 334, 321,
+ 0, 306, 0, 314, 3542, 0, 1262, 378, 474, 340,
+ 3418, 2698, 2898, 3391, 0, 3398, 0, 3557, 3551, 3554,
+ 3553, 3549, 3552, 3550, 3555, 1359, 3556, 1358, 1309, 1339,
+ 1356, 1357, 0, 0, 0, 2584, 2583, 890, 2581, 3283,
+ 3284, 0, 2585, 0, 0, 3285, 2951, 2972, 2582, 0,
+ 2517, 0, 2518, 2578, 2576, 2580, 2579, 2573, 2574, 2577,
+ 3263, 3268, 3264, 2575, 0, 2294, 0, 0, 2274, 968,
+ 967, 0, 0, 0, 0, 2210, 0, 890, 2274, 2211,
+ 0, 1930, 2264, 2267, 0, 3287, 2224, 969, 3288, 2260,
+ 0, 2196, 2212, 2173, 2217, 131, 3289, 131, 2263, 1930,
+ 2274, 0, 2189, 0, 0, 0, 2294, 1373, 0, 315,
+ 3369, 2138, 1149, 2106, 1307, 2092, 0, 469, 0, 2073,
+ 0, 2333, 3717, 3525, 0, 0, 0, 0, 3534, 1720,
+ 2033, 0, 81, 76, 0, 0, 0, 0, 2500, 3371,
+ 86, 0, 0, 3616, 74, 0, 2351, 0, 2349, 2346,
+ 2348, 0, 3534, 0, 2374, 1183, 1183, 0, 0, 1175,
+ 1177, 1178, 1183, 1183, 2172, 0, 0, 0, 2433, 2431,
+ 2432, 2513, 3599, 2430, 2429, 3608, 3610, 3593, 0, 3596,
+ 3595, 3605, 1322, 1321, 6, 71, 0, 142, 610, 220,
+ 220, 610, 167, 148, 151, 610, 610, 610, 160, 162,
+ 0, 222, 0, 0, 3565, 1337, 2807, 0, 0, 1349,
+ 1335, 1768, 1336, 1800, 1770, 1740, 1731, 1730, 1796, 1797,
+ 1799, 1798, 1801, 1803, 1793, 0, 0, 2031, 0, 2026,
+ 1874, 1879, 1873, 0, 0, 0, 0, 0, 0, 1964,
+ 1930, 1973, 1935, 1966, 1301, 1962, 0, 1297, 1362, 1362,
+ 3548, 3547, 3545, 3544, 3543, 1967, 1320, 1328, 1326, 1327,
+ 1968, 1318, 0, 2291, 2497, 0, 0, 2296, 0, 1965,
+ 1969, 2097, 2096, 2099, 0, 904, 0, 229, 0, 3563,
+ 3564, 3562, 1387, 2529, 2532, 3561, 2533, 229, 2059, 0,
+ 0, 0, 2058, 1157, 1158, 1152, 1154, 1156, 0, 0,
+ 0, 0, 2295, 0, 246, 252, 245, 441, 0, 401,
+ 378, 0, 438, 87, 0, 1245, 2049, 2051, 0, 2141,
+ 0, 1347, 1873, 2143, 2148, 2157, 2161, 2164, 2038, 0,
+ 0, 3680, 2044, 2043, 3679, 0, 2045, 0, 0, 2046,
+ 2034, 0, 447, 449, 3419, 3417, 3454, 3453, 3458, 0,
+ 3455, 3451, 0, 3410, 3459, 3444, 3448, 0, 3460, 3445,
+ 3452, 3466, 3465, 3467, 3462, 3461, 0, 3464, 3450, 0,
+ 3449, 3470, 0, 3414, 0, 0, 423, 0, 2075, 2076,
+ 2072, 1149, 2071, 2370, 0, 2362, 0, 1280, 2389, 2388,
+ 2385, 1865, 3355, 3360, 400, 392, 0, 0, 2863, 0,
+ 399, 398, 397, 3620, 420, 400, 386, 409, 0, 0,
+ 3622, 379, 382, 418, 421, 3657, 460, 456, 464, 458,
+ 3713, 274, 0, 0, 2503, 2504, 2436, 2435, 2505, 2427,
+ 2448, 0, 0, 0, 1527, 1871, 1871, 1871, 0, 0,
+ 1728, 0, 0, 0, 0, 1871, 0, 1565, 1539, 1538,
+ 0, 1566, 0, 0, 0, 0, 0, 0, 0, 1684,
+ 1684, 1650, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1722, 1724, 2481, 1871, 0, 1871, 0, 1392,
+ 1571, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1871, 1871, 1871, 0, 1582, 1584, 1583, 1871,
+ 1871, 0, 0, 0, 0, 0, 0, 1871, 0, 0,
+ 0, 0, 0, 1718, 2454, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1718, 0, 0, 0, 0,
+ 0, 0, 2456, 0, 0, 0, 2455, 0, 0, 0,
+ 0, 0, 0, 1718, 0, 0, 1529, 0, 1528, 1530,
+ 0, 1331, 756, 0, 0, 0, 1444, 1442, 1443, 1441,
+ 0, 0, 0, 0, 1450, 1452, 1454, 0, 1449, 1451,
+ 1453, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1531, 0, 0, 0, 0, 0, 2428, 0, 1603,
+ 0, 510, 2359, 0, 0, 0, 304, 1264, 2534, 0,
+ 0, 400, 3417, 0, 0, 0, 3414, 1374, 1355, 3290,
+ 0, 889, 0, 0, 892, 894, 893, 3322, 0, 891,
+ 3331, 3329, 3327, 3326, 0, 0, 3270, 3272, 0, 898,
+ 900, 899, 3320, 897, 0, 3306, 0, 0, 0, 0,
+ 0, 610, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2241, 0, 1373, 1373, 2190, 0, 2274, 0, 2274, 2264,
+ 0, 2274, 2270, 2230, 2223, 0, 0, 667, 1947, 1931,
+ 2216, 2268, 2269, 2274, 0, 0, 2274, 0, 2231, 2264,
+ 2274, 2185, 0, 0, 2177, 2182, 2178, 0, 2184, 2183,
+ 2186, 2174, 2175, 0, 2203, 0, 2215, 2222, 0, 2202,
+ 2209, 0, 2220, 2264, 2264, 0, 2274, 2274, 2274, 1150,
+ 0, 1374, 0, 3654, 2458, 2461, 2467, 2473, 2077, 2074,
+ 2335, 3620, 0, 0, 1272, 1274, 1273, 1290, 1197, 3533,
+ 0, 3535, 0, 3537, 0, 78, 0, 0, 2327, 2325,
+ 0, 0, 0, 2319, 2321, 2324, 2320, 0, 0, 2326,
+ 131, 0, 2322, 2328, 2301, 2304, 2311, 1373, 2302, 0,
+ 0, 341, 344, 346, 0, 349, 1865, 3374, 3373, 0,
+ 0, 0, 1201, 1204, 0, 2356, 2353, 131, 0, 2660,
+ 3540, 3538, 0, 1171, 1187, 134, 1181, 1182, 0, 0,
+ 1174, 134, 3355, 3617, 3618, 0, 0, 3594, 3611, 3592,
+ 0, 3606, 3607, 3591, 7, 4, 154, 0, 145, 0,
+ 0, 0, 610, 610, 137, 0, 3681, 1374, 1374, 610,
+ 610, 610, 0, 1765, 0, 1731, 1796, 1797, 1799, 0,
+ 1798, 0, 0, 1865, 0, 0, 1788, 1813, 0, 1813,
+ 1790, 1791, 0, 0, 0, 1349, 1794, 2514, 2027, 2030,
+ 0, 2019, 2021, 2022, 2526, 2024, 0, 0, 1876, 1879,
+ 1941, 1942, 0, 1364, 0, 1955, 1956, 1954, 0, 1932,
+ 1948, 1953, 1951, 0, 1923, 0, 1972, 1963, 2011, 1363,
+ 1970, 1971, 1325, 2280, 0, 2278, 2297, 2298, 2496, 1303,
+ 1299, 1021, 905, 2098, 904, 603, 606, 605, 0, 0,
+ 2069, 227, 2531, 0, 2069, 1038, 0, 2532, 3495, 0,
+ 3502, 3484, 0, 1155, 3567, 3568, 1032, 1030, 0, 1216,
+ 1217, 1220, 0, 250, 0, 253, 255, 0, 400, 433,
+ 435, 378, 444, 0, 0, 1255, 0, 1253, 1252, 1250,
+ 1251, 1249, 0, 1240, 1246, 1247, 1793, 0, 2144, 2151,
+ 2053, 2055, 2495, 0, 1348, 2146, 1921, 0, 0, 0,
+ 2159, 2057, 0, 0, 2040, 3408, 3482, 2039, 1159, 0,
+ 0, 378, 472, 448, 402, 3447, 1388, 3463, 0, 3468,
+ 3469, 3406, 225, 224, 3415, 223, 0, 0, 0, 0,
+ 3456, 3439, 0, 3443, 3442, 0, 3440, 0, 3441, 0,
+ 3446, 3423, 3422, 2471, 0, 2470, 378, 377, 2077, 3008,
+ 3024, 2371, 2367, 2366, 0, 2386, 0, 1866, 1867, 0,
+ 0, 1869, 3357, 1974, 0, 3354, 393, 400, 0, 0,
+ 0, 415, 3688, 272, 387, 400, 402, 414, 453, 275,
+ 383, 0, 0, 378, 378, 400, 3620, 3355, 3290, 1679,
+ 1681, 0, 0, 1872, 0, 1696, 0, 0, 0, 0,
+ 0, 0, 1507, 0, 0, 0, 1633, 0, 1696, 1661,
+ 2004, 2005, 1985, 1986, 1984, 1987, 1385, 0, 1988, 2003,
+ 0, 0, 0, 1659, 1330, 1313, 0, 0, 1841, 1842,
+ 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852,
+ 1854, 1859, 1855, 1856, 1857, 1858, 1853, 1860, 0, 1840,
+ 0, 1685, 1646, 1648, 0, 0, 0, 756, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1871, 0, 0,
+ 1871, 0, 0, 0, 0, 0, 0, 1660, 0, 1658,
+ 0, 0, 1657, 1551, 0, 0, 1871, 0, 1577, 0,
+ 0, 0, 1573, 0, 0, 0, 1557, 1558, 0, 0,
+ 0, 1483, 0, 1481, 1482, 0, 0, 1871, 0, 0,
+ 0, 0, 1474, 0, 0, 0, 0, 1719, 0, 0,
+ 1863, 1861, 1864, 1862, 0, 0, 1720, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1555, 0, 0, 0,
+ 2486, 938, 0, 0, 0, 0, 1522, 0, 0, 0,
+ 0, 1390, 1389, 1391, 1402, 1396, 1400, 1394, 1398, 0,
+ 1455, 3002, 1403, 0, 0, 0, 1406, 1415, 1419, 0,
+ 0, 0, 0, 0, 1426, 1424, 1425, 1437, 1438, 1422,
+ 1423, 0, 1428, 0, 1427, 1434, 1435, 1436, 1439, 1525,
+ 901, 1533, 1891, 1652, 1653, 1677, 1895, 0, 0, 0,
+ 0, 2482, 1374, 1477, 1476, 1478, 1479, 1480, 511, 0,
+ 505, 508, 522, 0, 0, 2358, 0, 2674, 2690, 2691,
+ 322, 325, 324, 326, 0, 0, 1263, 1267, 3355, 0,
+ 0, 0, 0, 3486, 3396, 0, 0, 1370, 1310, 1369,
+ 0, 0, 0, 0, 0, 3312, 3324, 0, 0, 3321,
+ 0, 0, 0, 0, 0, 3294, 0, 0, 0, 0,
+ 3267, 3333, 3334, 3337, 0, 0, 0, 2972, 0, 3269,
+ 3274, 3265, 3278, 3280, 3282, 2232, 0, 0, 0, 0,
+ 2237, 2234, 2227, 2240, 2712, 2236, 2253, 2235, 2229, 2242,
+ 2228, 0, 0, 0, 2274, 2246, 2249, 2243, 2274, 0,
+ 2274, 2245, 0, 2272, 2259, 2258, 2257, 2200, 2199, 2193,
+ 2265, 2250, 2244, 220, 2274, 2198, 2197, 2179, 2180, 2181,
+ 0, 1930, 0, 2270, 134, 2264, 0, 2274, 2274, 0,
+ 2256, 2219, 2221, 2125, 0, 1793, 0, 0, 2111, 2104,
+ 2091, 378, 0, 0, 0, 2078, 2079, 272, 0, 0,
+ 0, 495, 1290, 1276, 1292, 1199, 1198, 1196, 3532, 3536,
+ 1721, 80, 2119, 2117, 82, 2116, 2118, 83, 2337, 2313,
+ 2312, 2314, 2318, 131, 2323, 2315, 0, 2329, 2330, 350,
+ 354, 0, 0, 0, 3372, 0, 611, 0, 75, 0,
+ 1205, 1974, 2352, 2354, 2347, 3539, 0, 1172, 1189, 1188,
+ 1184, 1185, 0, 1169, 135, 1180, 1179, 1173, 2169, 3600,
+ 3609, 3613, 3598, 601, 986, 0, 3404, 3502, 189, 0,
+ 0, 0, 140, 0, 610, 161, 163, 610, 0, 0,
+ 0, 610, 0, 0, 1810, 1802, 1804, 1805, 1806, 0,
+ 1809, 0, 1352, 0, 1340, 1340, 1350, 1812, 1792, 1789,
+ 1814, 0, 1813, 1813, 0, 0, 1772, 1771, 0, 1865,
+ 895, 2023, 0, 0, 1875, 0, 1877, 1886, 1876, 1944,
+ 2687, 0, 0, 1366, 0, 1974, 1360, 2435, 0, 0,
+ 0, 0, 0, 0, 0, 1943, 1940, 0, 2299, 601,
+ 0, 604, 2098, 2098, 0, 0, 0, 0, 0, 0,
+ 0, 0, 230, 239, 1025, 2530, 1027, 0, 0, 0,
+ 0, 0, 3514, 3355, 1052, 3569, 1028, 0, 0, 1219,
+ 248, 247, 251, 0, 378, 439, 436, 431, 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, 134, 89, 110, 0, 1242, 1254, 2050,
+ 1248, 2145, 1340, 0, 0, 0, 2498, 0, 1958, 1922,
+ 2158, 0, 2162, 2161, 0, 3678, 0, 0, 1161, 1160,
+ 2042, 2047, 3355, 378, 292, 405, 451, 0, 0, 3403,
+ 226, 3478, 3481, 2495, 0, 0, 3424, 0, 378, 424,
+ 2079, 2368, 2372, 1281, 1283, 1284, 1282, 1290, 0, 2546,
+ 2545, 2544, 2515, 1870, 2516, 2541, 2539, 2543, 2537, 2542,
+ 2535, 2536, 2540, 2538, 0, 3363, 3364, 3362, 1979, 1975,
+ 0, 3356, 3361, 394, 395, 416, 419, 0, 0, 378,
+ 0, 388, 389, 403, 407, 0, 422, 461, 445, 445,
+ 445, 272, 1258, 0, 0, 2485, 0, 1628, 0, 1629,
+ 1630, 0, 1508, 1729, 0, 0, 0, 1536, 0, 0,
+ 0, 1632, 0, 1386, 0, 0, 1511, 1503, 1314, 0,
+ 1663, 0, 0, 0, 0, 0, 0, 0, 1668, 0,
+ 1666, 0, 0, 1723, 0, 1725, 2482, 0, 1638, 1673,
+ 0, 1636, 0, 0, 1662, 1674, 1675, 0, 0, 0,
+ 1642, 1640, 0, 1644, 1578, 1641, 1643, 0, 0, 0,
+ 1576, 0, 0, 0, 0, 0, 0, 0, 1554, 0,
+ 1589, 0, 1626, 1590, 0, 0, 1587, 0, 0, 0,
+ 1605, 1540, 1541, 0, 1542, 1592, 0, 1516, 1547, 1548,
+ 1513, 1514, 1606, 1595, 1515, 0, 1550, 1974, 0, 1534,
+ 0, 0, 0, 1552, 1581, 0, 0, 0, 1512, 0,
+ 0, 0, 1974, 0, 1607, 1556, 0, 0, 757, 1332,
+ 1504, 2483, 1397, 1401, 1395, 1399, 0, 0, 0, 0,
+ 1414, 0, 0, 1407, 1417, 1420, 0, 0, 1893, 0,
+ 0, 1671, 1718, 1718, 1718, 1718, 0, 0, 0, 1622,
+ 1623, 0, 0, 504, 503, 0, 507, 591, 0, 524,
+ 512, 501, 2360, 0, 0, 1265, 0, 0, 0, 0,
+ 3397, 0, 0, 0, 0, 1374, 1375, 1375, 2481, 3291,
+ 3292, 3293, 0, 2571, 2570, 2568, 2572, 2569, 2519, 2521,
+ 0, 2520, 2566, 2564, 2567, 2562, 2560, 2561, 2565, 2563,
+ 0, 0, 3310, 903, 902, 3323, 0, 3345, 0, 0,
+ 3330, 3351, 3352, 3349, 3350, 3348, 3328, 0, 0, 0,
+ 3273, 0, 3339, 3340, 0, 0, 0, 3308, 3307, 0,
+ 0, 0, 3300, 0, 0, 0, 2255, 0, 2226, 2239,
+ 2238, 2275, 2276, 2252, 2248, 2194, 2251, 2247, 2271, 1974,
+ 2204, 2225, 2195, 0, 2218, 2176, 2272, 2233, 1873, 2264,
+ 2191, 2192, 2254, 0, 1349, 1375, 2107, 1374, 2108, 378,
+ 2462, 0, 2469, 0, 2066, 0, 378, 1239, 1279, 1271,
+ 1278, 1275, 1290, 1288, 1277, 964, 963, 0, 1291, 79,
+ 0, 0, 2316, 134, 2310, 2331, 2305, 0, 345, 355,
+ 347, 351, 352, 353, 348, 2781, 2863, 0, 1873, 3376,
+ 3615, 1212, 1210, 1209, 1211, 1200, 1206, 1207, 2357, 2355,
+ 134, 2376, 1187, 0, 1190, 3620, 1974, 0, 3612, 155,
+ 602, 0, 0, 0, 986, 0, 165, 3514, 0, 0,
+ 0, 138, 169, 3675, 3682, 3583, 0, 156, 3685, 228,
+ 3683, 0, 0, 1807, 1808, 1769, 1340, 1342, 1341, 0,
+ 0, 1344, 0, 0, 0, 0, 1777, 0, 1773, 1775,
+ 0, 1838, 1830, 0, 2028, 2020, 2025, 2480, 1883, 1927,
+ 0, 0, 1311, 1886, 0, 1945, 1936, 0, 1367, 1365,
+ 1957, 1934, 0, 1950, 1949, 1952, 1364, 1924, 1927, 0,
+ 1374, 1022, 607, 0, 0, 1023, 0, 0, 0, 233,
+ 236, 234, 235, 2098, 2098, 183, 2098, 2098, 182, 184,
+ 0, 178, 175, 185, 2098, 1039, 171, 0, 0, 0,
+ 0, 1974, 0, 0, 0, 191, 0, 3489, 3488, 0,
+ 3504, 0, 0, 3506, 0, 3505, 3503, 3474, 3485, 0,
+ 1047, 1017, 0, 1054, 1056, 0, 0, 3569, 1218, 0,
+ 250, 254, 442, 0, 0, 0, 1974, 0, 1974, 1974,
+ 0, 0, 1974, 0, 1974, 0, 0, 0, 0, 0,
+ 0, 0, 1974, 0, 0, 0, 1974, 0, 1974, 0,
+ 88, 1256, 2142, 2054, 2161, 0, 2496, 1373, 0, 2154,
+ 1873, 0, 2160, 3355, 3409, 3483, 1159, 0, 293, 0,
+ 0, 402, 3518, 0, 0, 0, 0, 0, 2472, 426,
+ 2063, 0, 1290, 1294, 2379, 3366, 3367, 3365, 1982, 1983,
+ 1980, 1978, 1981, 396, 417, 296, 298, 3650, 295, 297,
+ 3648, 3649, 0, 3691, 3693, 0, 374, 283, 372, 3645,
+ 3643, 3647, 3641, 3646, 3639, 3640, 3644, 3642, 373, 287,
+ 3690, 3716, 0, 3689, 390, 0, 410, 402, 0, 455,
+ 457, 446, 465, 459, 378, 1682, 1680, 0, 1697, 1726,
+ 0, 3027, 3028, 3029, 3030, 3031, 3032, 3034, 3035, 3033,
+ 3036, 3037, 857, 3038, 3039, 3040, 3041, 3042, 3043, 3044,
+ 3045, 3046, 3047, 3048, 857, 3049, 3050, 3051, 3052, 3053,
+ 3054, 3055, 3056, 3057, 3058, 3059, 3061, 3060, 3062, 3063,
+ 3064, 3065, 3066, 3067, 3068, 3069, 840, 3070, 3071, 3072,
+ 3073, 3074, 3075, 3077, 3076, 3078, 3079, 3080, 3081, 861,
+ 3082, 3083, 3084, 3086, 3085, 3087, 3088, 3089, 3090, 3091,
+ 3092, 3093, 3094, 3095, 1712, 3096, 3097, 3098, 3099, 3100,
+ 3102, 3101, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112,
+ 3113, 3114, 3115, 3625, 3116, 3117, 3626, 3118, 3119, 3120,
+ 1706, 3121, 3122, 3123, 3124, 3125, 3126, 3103, 3127, 3104,
+ 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137,
+ 3138, 3139, 3140, 3141, 3142, 3143, 3146, 3144, 3145, 3147,
+ 3148, 3149, 3150, 3151, 3153, 3152, 3156, 3154, 3155, 3157,
+ 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3627, 3165, 3166,
+ 3167, 3168, 3169, 3171, 3172, 3170, 3173, 3174, 3175, 3176,
+ 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3187,
+ 3186, 3188, 3189, 3190, 3191, 3193, 3194, 3195, 3196, 3197,
+ 3198, 3199, 3200, 3203, 3201, 3202, 3204, 3205, 3206, 3207,
+ 3208, 3209, 3210, 3211, 3212, 3216, 3213, 3217, 3214, 3218,
+ 3215, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3228,
+ 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3237, 3238, 3239,
+ 3240, 3241, 1709, 3242, 3243, 3244, 3245, 3246, 3247, 3248,
+ 3250, 3251, 3249, 0, 3252, 3254, 3253, 3255, 3256, 3257,
+ 3258, 3259, 3260, 3261, 3192, 3227, 3236, 859, 1714, 857,
+ 2593, 1707, 859, 0, 1705, 0, 1703, 1704, 767, 769,
+ 2586, 2587, 2588, 2589, 2591, 2592, 3628, 3629, 768, 2590,
+ 0, 0, 0, 1634, 1631, 0, 0, 0, 1688, 1688,
+ 0, 0, 0, 0, 1431, 0, 0, 0, 1617, 0,
+ 1639, 1637, 0, 0, 0, 0, 0, 1645, 0, 1562,
+ 1560, 1489, 0, 1487, 0, 1488, 0, 1490, 0, 0,
+ 1627, 0, 1457, 1475, 0, 0, 0, 1721, 0, 1990,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2487, 0, 0, 927, 933, 936, 937, 939, 931,
+ 0, 1599, 0, 0, 0, 1412, 1408, 0, 1416, 0,
+ 0, 0, 1430, 1429, 1895, 1894, 0, 1670, 0, 0,
+ 1720, 0, 0, 1720, 0, 0, 0, 2484, 1375, 1604,
+ 1374, 514, 0, 532, 506, 1974, 509, 0, 523, 0,
+ 535, 0, 0, 0, 323, 0, 1268, 0, 454, 0,
+ 3395, 3487, 0, 0, 1368, 1376, 1371, 0, 0, 0,
+ 3314, 3313, 3325, 0, 0, 0, 0, 3298, 3296, 3295,
+ 3271, 0, 0, 3344, 3338, 3335, 3336, 0, 0, 3277,
+ 0, 0, 3275, 3279, 3281, 2214, 2213, 0, 2273, 1930,
+ 2187, 2206, 2208, 2274, 2127, 2131, 0, 1865, 2115, 0,
+ 0, 2109, 2113, 0, 2468, 0, 0, 2080, 1793, 3718,
+ 0, 1832, 84, 0, 2317, 2308, 0, 2303, 2306, 0,
+ 0, 3387, 3388, 3380, 3383, 3381, 3382, 3386, 3389, 3390,
+ 3377, 3384, 1930, 0, 0, 1202, 1208, 2350, 1186, 136,
+ 0, 1170, 3651, 2170, 3601, 3614, 1001, 1003, 1002, 987,
+ 988, 0, 0, 0, 1047, 0, 0, 0, 614, 614,
+ 170, 0, 0, 200, 3569, 0, 0, 0, 158, 1766,
+ 1351, 1343, 1345, 1340, 1340, 0, 1730, 0, 0, 0,
+ 1730, 0, 0, 495, 0, 1811, 1827, 896, 2393, 1884,
+ 1885, 0, 1880, 1928, 1929, 1882, 1878, 0, 1887, 1889,
+ 1312, 1946, 1938, 1933, 1361, 0, 1926, 0, 0, 0,
+ 2014, 2016, 665, 664, 238, 237, 242, 243, 1974, 1974,
+ 2103, 2102, 1974, 1974, 177, 174, 2101, 2100, 1974, 1974,
+ 172, 2069, 195, 194, 196, 197, 199, 198, 193, 1035,
+ 0, 3492, 0, 3499, 3494, 3497, 3477, 3476, 3475, 3472,
+ 0, 1974, 1974, 1974, 0, 1974, 3513, 3515, 0, 0,
+ 1036, 904, 3527, 0, 0, 205, 3571, 0, 3573, 0,
+ 1222, 0, 1221, 249, 378, 1974, 1974, 103, 1974, 95,
+ 96, 91, 123, 124, 93, 94, 99, 98, 100, 101,
+ 104, 105, 102, 97, 92, 127, 129, 128, 106, 2010,
+ 2009, 2008, 130, 125, 126, 90, 0, 1873, 2499, 0,
+ 0, 1959, 2155, 2147, 2149, 2037, 2035, 3656, 0, 452,
+ 406, 450, 0, 3402, 3407, 3480, 3479, 3502, 3502, 400,
+ 378, 400, 425, 0, 1285, 1290, 1294, 0, 1286, 2390,
+ 834, 857, 857, 874, 820, 840, 836, 840, 3119, 830,
+ 874, 786, 786, 874, 833, 786, 840, 835, 0, 832,
+ 874, 831, 786, 857, 824, 857, 780, 781, 786, 857,
+ 799, 0, 840, 874, 0, 821, 840, 826, 857, 0,
+ 857, 857, 857, 2976, 857, 857, 284, 840, 764, 770,
+ 772, 771, 773, 774, 857, 857, 857, 857, 857, 861,
+ 0, 0, 3694, 0, 273, 404, 408, 462, 445, 0,
+ 0, 1727, 0, 855, 858, 1698, 909, 0, 1711, 842,
+ 841, 0, 862, 1713, 0, 1710, 909, 856, 860, 1716,
+ 1702, 1708, 1715, 909, 1506, 1537, 1510, 1509, 0, 0,
+ 0, 1569, 0, 1686, 1692, 0, 0, 0, 1544, 0,
+ 1669, 1667, 1546, 0, 0, 1619, 2484, 1594, 1665, 1572,
+ 1596, 1549, 0, 0, 0, 1486, 1484, 1485, 0, 1563,
+ 1585, 0, 1473, 1586, 0, 1570, 1593, 1502, 1992, 1991,
+ 1989, 1517, 1974, 0, 1574, 1535, 0, 0, 1598, 2488,
+ 2489, 0, 0, 0, 938, 924, 925, 926, 0, 928,
+ 930, 932, 0, 1974, 1433, 1432, 1404, 0, 1413, 1410,
+ 0, 1418, 1897, 1896, 0, 0, 1610, 1612, 1611, 1614,
+ 1613, 1608, 1718, 1376, 1624, 0, 515, 516, 518, 520,
+ 597, 0, 510, 539, 499, 0, 514, 502, 1266, 1269,
+ 0, 3393, 3392, 0, 1372, 1380, 1379, 2478, 2482, 0,
+ 0, 0, 3311, 3332, 0, 0, 0, 0, 3342, 3341,
+ 3343, 3309, 3304, 3302, 3301, 1996, 1997, 1995, 1993, 1994,
+ 2205, 1930, 2201, 0, 1873, 0, 1830, 1375, 2105, 0,
+ 3655, 0, 2086, 0, 2083, 2090, 488, 2154, 0, 2081,
+ 2052, 0, 1835, 0, 1836, 1833, 1834, 1974, 0, 0,
+ 371, 363, 358, 366, 360, 362, 361, 367, 368, 369,
+ 370, 364, 359, 365, 357, 356, 0, 3375, 1213, 1214,
+ 0, 1193, 1191, 143, 0, 3405, 164, 0, 149, 152,
+ 715, 0, 0, 0, 0, 2098, 2098, 2098, 2098, 2098,
+ 2098, 2098, 2098, 2098, 2098, 0, 2098, 2098, 2098, 2098,
+ 2098, 2098, 2098, 2098, 2098, 2098, 0, 0, 2098, 2098,
+ 139, 483, 491, 615, 618, 654, 656, 643, 644, 480,
+ 0, 141, 269, 231, 0, 0, 0, 257, 0, 680,
+ 681, 679, 678, 0, 0, 3569, 0, 1354, 1353, 1778,
+ 0, 1782, 1787, 1783, 0, 1774, 0, 1795, 1839, 1831,
+ 0, 0, 2401, 1927, 0, 0, 1927, 0, 0, 1375,
+ 2012, 1374, 176, 181, 180, 173, 186, 179, 1040, 192,
+ 3493, 3491, 3490, 0, 3498, 0, 3473, 3509, 3507, 3508,
+ 3511, 0, 0, 3510, 3512, 1041, 1042, 1048, 1043, 1147,
+ 1147, 0, 1147, 0, 0, 1147, 2098, 0, 0, 495,
+ 1165, 2098, 0, 0, 0, 0, 0, 1130, 0, 1147,
+ 0, 0, 0, 0, 0, 1068, 1129, 616, 1018, 1067,
+ 1069, 1081, 491, 0, 1102, 1132, 1133, 1131, 3528, 0,
+ 0, 0, 1053, 0, 208, 206, 216, 3570, 0, 2069,
+ 0, 3573, 1224, 1225, 0, 440, 0, 116, 118, 0,
+ 120, 122, 0, 112, 114, 2161, 2152, 0, 1960, 0,
+ 1374, 2069, 294, 0, 0, 3516, 3516, 427, 429, 428,
+ 2120, 1287, 1295, 2392, 2391, 0, 792, 874, 872, 874,
+ 806, 875, 844, 837, 844, 808, 914, 820, 0, 874,
+ 907, 911, 908, 816, 0, 786, 909, 0, 912, 787,
+ 814, 807, 813, 844, 0, 803, 811, 874, 779, 815,
+ 802, 0, 844, 817, 822, 825, 827, 829, 844, 874,
+ 0, 0, 3620, 786, 801, 800, 0, 786, 844, 3620,
+ 838, 823, 909, 920, 786, 874, 844, 844, 288, 1974,
+ 290, 375, 445, 3714, 1683, 0, 0, 0, 0, 1699,
+ 910, 0, 0, 1717, 1700, 1701, 1635, 0, 0, 0,
+ 0, 1692, 0, 0, 1693, 1651, 0, 0, 0, 0,
+ 0, 1505, 0, 1615, 0, 1561, 1559, 0, 840, 1464,
+ 1466, 1462, 1465, 0, 859, 1468, 0, 821, 859, 909,
+ 1472, 1458, 1459, 1460, 1461, 0, 0, 0, 0, 0,
+ 2490, 922, 1601, 0, 935, 929, 927, 934, 0, 1409,
+ 0, 0, 1899, 0, 1672, 0, 1625, 519, 0, 598,
+ 594, 0, 0, 540, 0, 541, 537, 513, 0, 3394,
+ 1378, 1377, 0, 3318, 3316, 3315, 3347, 3346, 3299, 3297,
+ 0, 0, 134, 2130, 1921, 2132, 2133, 2124, 2114, 2112,
+ 2464, 0, 2087, 2089, 2475, 2474, 2486, 0, 0, 2069,
+ 2082, 1087, 0, 1088, 1099, 1101, 1293, 0, 2342, 0,
+ 2340, 2309, 2343, 0, 0, 0, 0, 146, 0, 0,
+ 0, 1012, 2623, 0, 0, 684, 686, 687, 688, 689,
+ 0, 716, 691, 610, 965, 965, 718, 2491, 0, 663,
+ 2098, 484, 1974, 1974, 1974, 1974, 641, 1974, 1974, 1974,
+ 0, 0, 2098, 1974, 0, 0, 1974, 1974, 1974, 1974,
+ 0, 0, 1974, 649, 650, 648, 1974, 1974, 2390, 490,
+ 492, 904, 619, 614, 0, 262, 3676, 475, 476, 0,
+ 0, 3573, 0, 0, 3589, 0, 3589, 0, 0, 1733,
+ 1732, 0, 0, 0, 0, 0, 0, 1820, 0, 1819,
+ 0, 1825, 1829, 0, 0, 0, 0, 2394, 2396, 0,
+ 2029, 1881, 1890, 1888, 1925, 1937, 0, 2017, 2015, 0,
+ 3500, 3496, 1977, 1976, 0, 1045, 0, 1044, 1049, 1012,
+ 610, 1148, 608, 0, 1106, 1110, 1107, 608, 2056, 2056,
+ 1259, 2056, 0, 0, 0, 0, 2056, 0, 2058, 2056,
+ 0, 0, 2056, 2056, 0, 1259, 0, 493, 1168, 1166,
+ 2056, 1167, 2056, 0, 0, 1259, 1119, 1063, 1120, 0,
+ 1064, 2056, 1259, 1086, 1259, 1259, 0, 617, 904, 1065,
+ 1066, 715, 1162, 215, 204, 0, 0, 1055, 1057, 0,
+ 0, 1058, 3572, 1031, 3575, 2069, 1230, 0, 108, 1974,
+ 109, 1974, 107, 1974, 2069, 0, 1961, 2156, 2150, 3519,
+ 0, 3401, 3400, 0, 2154, 0, 804, 878, 0, 805,
+ 846, 847, 845, 850, 782, 778, 915, 919, 918, 809,
+ 810, 789, 906, 913, 0, 872, 788, 784, 0, 1014,
+ 796, 0, 785, 828, 783, 797, 0, 280, 0, 3653,
+ 0, 0, 3660, 286, 812, 3620, 276, 794, 798, 285,
+ 0, 775, 790, 921, 791, 793, 920, 776, 777, 1974,
+ 3692, 303, 302, 0, 0, 463, 853, 851, 854, 852,
+ 0, 1567, 1568, 1689, 1927, 1687, 0, 1694, 1695, 1649,
+ 1591, 0, 1545, 0, 1616, 0, 1597, 1564, 1467, 1463,
+ 1470, 822, 1469, 1471, 1588, 1518, 1974, 1575, 1579, 1580,
+ 0, 1600, 1974, 1411, 0, 1902, 1901, 0, 0, 1927,
+ 1609, 517, 595, 512, 0, 536, 539, 0, 500, 2479,
+ 0, 0, 3305, 3303, 2207, 1958, 2465, 2463, 2085, 0,
+ 0, 0, 2084, 2094, 0, 2067, 1289, 0, 1837, 2338,
+ 1974, 0, 2307, 0, 1192, 1194, 0, 0, 0, 0,
+ 0, 717, 1013, 0, 0, 690, 2494, 683, 715, 0,
+ 0, 0, 965, 707, 610, 0, 1012, 966, 610, 610,
+ 0, 0, 0, 0, 2007, 2006, 638, 631, 630, 633,
+ 632, 635, 634, 0, 627, 624, 636, 626, 651, 0,
+ 639, 621, 676, 677, 675, 645, 652, 622, 623, 629,
+ 628, 625, 668, 673, 671, 670, 669, 674, 672, 640,
+ 655, 637, 653, 482, 599, 620, 491, 2000, 2001, 1998,
+ 1999, 660, 659, 2002, 657, 658, 268, 266, 267, 3665,
+ 0, 263, 0, 261, 0, 265, 3668, 240, 232, 0,
+ 378, 479, 477, 478, 0, 0, 157, 271, 258, 260,
+ 231, 0, 3687, 231, 3573, 1734, 0, 0, 1779, 0,
+ 1784, 0, 1776, 1815, 1815, 1826, 0, 0, 0, 0,
+ 2395, 0, 0, 2402, 2404, 1939, 0, 1043, 0, 0,
+ 0, 1259, 0, 0, 1134, 1104, 0, 0, 0, 0,
+ 1075, 0, 1084, 0, 0, 2056, 0, 1136, 0, 1135,
+ 0, 0, 0, 1145, 1146, 0, 1917, 1919, 1927, 0,
+ 0, 0, 1124, 1143, 1144, 0, 0, 0, 0, 1094,
+ 0, 1080, 1147, 0, 1147, 1103, 0, 682, 0, 1164,
+ 1105, 202, 207, 217, 218, 1033, 0, 3574, 1029, 0,
+ 1231, 1227, 1228, 1223, 117, 121, 113, 2153, 0, 0,
+ 3523, 3517, 3521, 2121, 2069, 0, 873, 848, 849, 916,
+ 917, 879, 909, 0, 909, 3620, 282, 0, 279, 3661,
+ 3662, 0, 0, 795, 312, 311, 309, 378, 299, 307,
+ 301, 0, 308, 0, 292, 0, 0, 1691, 1647, 0,
+ 1618, 1620, 0, 923, 0, 1898, 1892, 0, 0, 0,
+ 0, 0, 0, 1911, 1903, 0, 1676, 0, 597, 0,
+ 0, 525, 538, 544, 543, 3319, 3317, 2128, 0, 2088,
+ 2476, 2487, 489, 0, 0, 1100, 2341, 0, 3385, 0,
+ 1927, 1010, 0, 0, 0, 0, 0, 0, 685, 0,
+ 610, 961, 962, 1012, 0, 692, 984, 2491, 1012, 1012,
+ 3112, 857, 780, 781, 786, 857, 799, 2676, 840, 874,
+ 2680, 821, 840, 826, 857, 722, 857, 857, 857, 857,
+ 857, 0, 710, 720, 765, 767, 2586, 2587, 2588, 2589,
+ 2591, 2592, 2590, 2493, 485, 647, 2330, 646, 600, 0,
+ 2390, 270, 0, 3664, 0, 2976, 3666, 241, 187, 1374,
+ 213, 0, 3673, 3686, 3590, 3684, 159, 0, 1865, 0,
+ 0, 0, 1823, 1821, 2399, 2400, 0, 2397, 0, 0,
+ 2403, 0, 1050, 1046, 1051, 0, 1089, 0, 1108, 0,
+ 0, 1074, 0, 1245, 0, 0, 1127, 1115, 0, 1070,
+ 0, 1117, 1118, 1159, 1072, 0, 1920, 494, 0, 0,
+ 1079, 0, 1162, 1071, 1096, 1077, 1109, 1163, 209, 1059,
+ 378, 0, 0, 0, 1226, 0, 1233, 0, 3522, 3520,
+ 0, 2064, 1793, 819, 1015, 818, 3663, 281, 277, 839,
+ 1974, 289, 310, 291, 3695, 843, 1927, 1543, 1519, 1602,
+ 0, 1908, 0, 0, 1906, 1905, 0, 1900, 1907, 596,
+ 593, 0, 0, 533, 551, 547, 0, 549, 550, 572,
+ 2069, 0, 0, 2093, 2095, 2344, 3355, 0, 1007, 0,
+ 1008, 0, 3355, 3355, 0, 0, 0, 1012, 984, 2491,
+ 943, 0, 693, 0, 697, 699, 724, 0, 719, 711,
+ 732, 0, 0, 661, 481, 264, 0, 3667, 0, 188,
+ 3677, 3584, 205, 214, 259, 0, 2861, 0, 1742, 1744,
+ 1767, 1781, 1786, 0, 1816, 0, 0, 0, 2398, 2406,
+ 2405, 3501, 0, 1091, 609, 1004, 0, 1122, 0, 0,
+ 1162, 1076, 0, 0, 0, 1116, 1137, 1114, 1259, 1918,
+ 0, 0, 0, 1113, 1095, 1097, 1205, 0, 211, 187,
+ 3576, 0, 0, 1232, 1237, 0, 1234, 1236, 1346, 0,
+ 2380, 0, 300, 1690, 1909, 0, 1910, 1913, 0, 0,
+ 1914, 0, 529, 531, 521, 0, 526, 0, 545, 0,
+ 2098, 2098, 0, 2098, 2098, 2098, 2098, 565, 573, 575,
+ 576, 577, 0, 2129, 2466, 2477, 972, 1927, 0, 0,
+ 0, 0, 974, 976, 0, 0, 712, 705, 701, 0,
+ 0, 947, 985, 0, 695, 0, 0, 887, 941, 750,
+ 0, 753, 0, 885, 723, 725, 883, 884, 727, 0,
+ 0, 0, 766, 0, 0, 865, 0, 868, 0, 0,
+ 721, 0, 733, 864, 871, 2492, 642, 487, 662, 0,
+ 0, 0, 216, 187, 0, 1741, 0, 0, 1818, 1817,
+ 1832, 0, 0, 0, 539, 1090, 1005, 1123, 0, 1112,
+ 495, 539, 1128, 1073, 1125, 1126, 495, 0, 1078, 210,
+ 0, 203, 219, 3577, 3578, 1229, 0, 2122, 895, 278,
+ 1904, 1912, 1916, 1915, 527, 0, 534, 558, 548, 554,
+ 0, 2098, 0, 0, 2098, 0, 0, 0, 0, 0,
+ 542, 574, 2098, 0, 0, 2098, 0, 993, 995, 1138,
+ 973, 997, 996, 978, 994, 1006, 1011, 1010, 3355, 190,
+ 0, 1138, 975, 999, 982, 1138, 977, 998, 980, 0,
+ 0, 0, 0, 703, 0, 946, 0, 951, 0, 0,
+ 0, 0, 751, 752, 888, 726, 886, 882, 876, 870,
+ 2503, 2504, 0, 0, 0, 762, 763, 866, 759, 760,
+ 761, 0, 741, 0, 0, 872, 863, 734, 3671, 0,
+ 0, 0, 3674, 1746, 1743, 0, 1751, 1753, 1752, 1754,
+ 1745, 0, 0, 0, 1111, 1093, 0, 1121, 1083, 1085,
+ 1082, 0, 212, 1235, 0, 2381, 533, 530, 558, 0,
+ 556, 0, 552, 546, 553, 0, 590, 584, 0, 586,
+ 587, 585, 582, 569, 0, 567, 0, 989, 992, 1974,
+ 990, 144, 1140, 1139, 979, 0, 972, 0, 150, 983,
+ 153, 981, 708, 0, 0, 0, 0, 944, 0, 948,
+ 949, 950, 0, 942, 0, 0, 0, 0, 877, 881,
+ 2438, 2437, 0, 1381, 869, 0, 736, 880, 735, 0,
+ 3669, 1374, 218, 0, 1748, 0, 0, 1824, 1822, 1092,
+ 539, 2123, 2135, 0, 2407, 528, 555, 0, 563, 559,
+ 561, 564, 589, 588, 0, 566, 0, 583, 666, 991,
+ 1142, 1141, 1009, 1138, 1000, 709, 0, 1008, 0, 945,
+ 0, 0, 972, 0, 974, 976, 758, 0, 867, 728,
+ 728, 742, 3672, 0, 3585, 201, 1747, 0, 1755, 0,
+ 0, 0, 0, 2393, 557, 0, 0, 578, 571, 568,
+ 147, 0, 0, 1008, 957, 956, 0, 0, 953, 952,
+ 694, 972, 698, 700, 1382, 0, 739, 729, 731, 738,
+ 744, 745, 743, 746, 3670, 0, 1750, 0, 1761, 1760,
+ 1749, 0, 1756, 1758, 1098, 2134, 2136, 0, 2401, 562,
+ 560, 570, 579, 581, 706, 972, 0, 960, 958, 959,
+ 0, 0, 696, 1383, 730, 737, 747, 749, 0, 1738,
+ 1739, 1737, 1736, 1735, 1762, 0, 0, 1757, 0, 1759,
+ 0, 2409, 580, 702, 972, 0, 0, 748, 3586, 1764,
+ 1763, 0, 0, 2408, 0, 2413, 704, 955, 954, 3581,
+ 0, 0, 2420, 3579, 3580, 0, 3587, 2411, 2412, 2410,
+ 0, 2415, 0, 2417, 2418, 0, 2069, 3582, 378, 2419,
+ 2414, 0, 2421, 2423, 0, 2382, 187, 2416, 0, 1374,
+ 3588, 2422, 0, 1375, 2424
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -5341, -5341, -5341, -5341, 2297, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, 2818, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 2032, -5341, 389, -5341, 394, -5341, 393, -3726, -593,
+ -5341, -1880, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 2183, -2922, -5340, -5341, -5341, -235, 1368, -5341,
+ -5341, 144, -5341, -262, -5341, -5341, -5341, -4405, -410, -629,
+ -5341, 45, 4647, 3659, -82, 3990, 945, -4381, -5341, -5341,
+ -5341, -5341, -5341, -5341, -1919, -5341, -5341, -5341, -5341, 333,
+ 167, -5341, -5341, -5341, -5341, -5341, 1453, -2126, -628, 367,
+ 37, -5341, -89, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 22, -5341, -5341, -5341, -173, 739, -4505, -5341, -5341, -5341,
+ -5341, 2419, -5341, 1834, -5341, -1747, 3685, -5341, -5341, -5341,
+ -5341, -5341, 2829, -2466, -5341, -5341, -5341, 1510, -5341, -2790,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -301, -5341, -2031,
+ 1985, -5341, 2042, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -1220, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 3355, -5341, 4605, -5341, -5341, 1228, -5341, 3245,
+ -5341, 3247, 3248, -2766, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -71, -68, 207, 873, 1385, -5341, -3887, -5341,
+ -5341, 120, -5341, -5341, -5341, -5341, -5341, 1120, 317, 1117,
+ -5341, 686, 3025, -2825, -5341, -5341, -5341, -5341, -5341, -5341,
+ -409, 27, -516, -5341, -4382, -5341, -4835, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -4018, -5341, -5341, -5341, -644,
+ -5341, -5341, -604, -5341, -5341, -5341, -5341, -293, -5341, -5341,
+ -3828, -5341, -5341, -5341, 38, -5341, 2760, 4052, -1887, 521,
+ -679, -5341, -3767, 904, -3962, -3891, -5341, -3849, -5341, -191,
+ -1300, -1294, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 482,
+ 297, 903, -4323, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -4322, -4320, 174, -5341, -5030, -5341, 636, -5341, -4857, -5341,
+ -5341, -5341, -5341, -5341, -5341, -611, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -3864, -5341, -5341, -454, -461, -5341, -354,
+ -3414, -5341, -2742, -4795, -342, -1415, -341, -340, -339, -5341,
+ -2110, 1218, 1339, -5341, -5341, -5341, -5341, -3372, -3229, -5341,
+ -2076, -3524, -3280, 1269, -3076, -3540, 1295, -452, -4346, -4849,
+ -575, -5341, -3899, -5341, -5341, -3636, -4034, -5341, -670, -2770,
+ -3171, -360, -5341, -5341, -1705, -3212, -5341, 863, -4055, -4074,
+ 426, 1707, -5341, -5341, 1204, -5341, -1642, 1202, -5341, -5341,
+ -5341, 1211, -5341, -605, -5341, -5341, -5341, -5341, -4097, -5341,
+ -2475, -4344, -5341, 5410, 5411, -2786, -574, -573, -5341, -5341,
+ -5341, -137, 2300, -5341, -3080, -377, -387, -384, -3133, -29,
+ -4870, -3687, -4250, -3722, 860, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 224,
+ 228, 1570, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 954, -1966, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -4785, -3009, -5341, -5341, 540, -5301, -3967, -3964, -4301, 4008,
+ -5341, -5341, -5341, -5341, 4094, -3312, -4244, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 3593, 1439, -5341, -5341, 2331, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -180, 2340,
+ -5341, -5341, -5341, -5341, -5341, 2802, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -318, -5341, -5341, -5341, -5341, -5341,
+ -13, 3446, -5341, -5341, -5341, -5341, 5, -5341, -5341, -5341,
+ -5341, 2496, -5341, -5341, -5341, -5341, 2973, -5341, -5341, -5341,
+ -5341, -5341, -5341, 2144, -5341, 2717, -5341, -2450, -5341, -5341,
+ 1410, -153, -5341, -5341, -19, -5341, -5341, -5341, -5341, -5341,
+ 35, -5341, -5341, -5341, 5404, -1539, 7, -66, -5341, -5341,
+ 6, -5341, -5341, 4147, -435, 2544, -717, 4778, -5341, -5341,
+ -5341, -5341, -2485, 2408, -5341, 4205, -5341, -5341, 4395, 1641,
+ 4167, 2282, 947, 2507, -1670, -164, -3006, 1238, -5341, 1423,
+ 596, 10618, -5341, -1480, -1521, -5341, -5341, -41, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 2608, 2609, -5341, -5341,
+ 3888, -5341, 2543, -3755, -5341, -5341, -850, -5341, -2479, -5341,
+ -5341, -5341, 2545, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, 1740, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, 3837, -1597, -5341,
+ -5341, 3973, -5341, 1833, -5341, 864, -5341, -5341, 1670, -5341,
+ -2759, -5341, -5341, -1538, -636, -5341, 3978, -5341, 3995, -1191,
+ -4064, -5341, -1749, -467, -5341, -249, -5341, -5341, -5341, -5341,
+ -5341, -3437, -561, -559, -5341, -5341, -5341, 3594, -5341, 4238,
+ -5341, -5341, -5341, -5341, -5341, -5341, 3602, -5341, -2060, -5341,
+ -2534, 4242, 4254, 4262, -5341, 4263, -5341, -5341, -1522, 310,
+ -5341, 674, -5341, -5341, -5341, -5341, -5341, 1216, -5341, -237,
+ 779, -234, -4276, -1558, 1092, -5341, -5341, -1892, 3617, 4013,
+ -1271, -5341, 2915, -5341, 3608, 1786, -5341, 2342, -5341, 1099,
+ 1103, -5341, -5341, 1794, -5341, -5341, -5341, -5341, 483, -123,
+ -5341, -5341, -5341, 53, 819, -2046, -5341, 496, -3188, 4264,
+ -168, -5341, 2344, -1961, -3142, -1174, 909, -1278, 2352, 480,
+ 4847, -449, -5341, -5341, 4223, -5341, -2833, -5341, -603, -1540,
+ -1028, -3036, -3077, -4711, -5341, -2250, 1347, -5341, -5341, -5341,
+ -5341, 1124, -5341, -5341, -5341, 2946, -5341, 5520, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -701, -1176,
+ -5341, -5341, 2854, -936, -159, 5541, -17, -5341, -5341, -15,
+ -5341, -5341, 4945, -2016, -5341, -5341, 4390, 3483, 2826, -5341,
+ 1512, -5341, -5341, -5341, -5341, 1259, -5341, -5341, 216, -1158,
+ -521, 2347, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 825,
+ -5341, 1278, -1857, -5341, -5341, -5341, -5341, -9, -5341, -5341,
+ -5341, -5341, 1281, -5341, -445, -5341, -8, -5341, -5341, -5341,
+ 4816, -5341, -5341, -5341, -5341, -5341, -5341, -4085, -5341, -5341,
+ 3558, -1425, 4819, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ 3127, -5341, -5341, -5341, -5341, -5341, -5341, 3852, 4978, 4981,
+ -1660, -5341, -926, 3128, 2536, -1087, -5341, -5341, -5341, 4268,
+ 4989, -5341, -5341, 49, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 3079, 170, -5341, -5341, -5341, -5341,
+ -5341, 520, -5341, -5341, -5341, -5341, 3753, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 4156, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 1544, -419, -5341, 768, -462, -5341, 395, -5341, -5341,
+ -5341, -5341, -5341, -532, -5341, -5341, -536, -5341, -1386, 4734,
+ -1306, -5341, -1697, -3307, -5341, 12, -5341, -5341, -5341, 3131,
+ -5341, -5341, -5341, -5341, 2877, -2504, -5341, 547, -5341, -5341,
+ -2651, -924, -1661, -3990, 231, -5341, -5341, -586, 1742, 9697,
+ -5341, -5341, 69, -474, -1243, -5341, -5341, 2827, -5, -825,
+ -126, -757, -767, -1060, -5341, 4654, -5341, -5341, -5341, -625,
+ -576, -568, -388, -507, 946, -618, 7026, 8611, -639, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, 2588,
+ 2590, -5341, 5014, -5341, 3505, 3232, -5341, -5341, -5341, 2595,
+ -5341, -5341, -5341, 5021, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, 2602, 2611, 2614, -5341, -5341, 1850,
+ -2371, -5341, -5341, -1908, 250, -5341, 3541, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -5341, 3768, -580, 4532, -549,
+ 3965, 5034, 4573, -5341, 4208, -5341, 4210, -5341, 1678, -5341,
+ -858, 2678, -1393, -3465, -5341, -5341, 2994, 1205, -5341, -5341,
+ -2520, -3086, -5341, 2519, 1119, -5341, -5341, 370, -5341, -5341,
+ -5341, 1676, 440, 5012, 4453, -5341, -5341, -5341, -5341, 5618,
+ 2030, -5341, 267, 5644, 5645, 5649, -414, -5341, -3150, -5341,
+ -4306, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341,
+ -5341, 854, -5341, -5341, -5341, 2087, -5341, -5341, -5341, -5341,
+ -5341, -5341, -5341, -5341, -5341, -1435, 4820, -5341, 1621, -2598,
+ -5341, -5341, -530, -5341, -5341, -5341, -5341, -5341, 3563, -5341,
+ 2305, -5341, -5341, -5341, -4358, -5341, -5341, -4340, -5341, 486,
+ -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -5341, -1399,
+ -5341, -5341, -5341, 80, -911, 44, -5341, -5341, -5341, -5341,
+ -5341, -5341
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ 0, 69, 742, 1945, 70, 71, 72, 73, 74, 1911,
+ 75, 1261, 2571, 1263, 1876, 2574, 76, 711, 77, 2074,
+ 2763, 2764, 4592, 4593, 4586, 4587, 4589, 4590, 2765, 822,
+ 823, 2613, 2614, 78, 2631, 3948, 3212, 1947, 4816, 2625,
+ 5157, 1952, 4819, 1953, 4820, 2623, 3954, 4475, 1957, 1958,
+ 751, 3949, 3295, 3296, 5660, 1322, 3208, 3304, 3305, 2636,
+ 4465, 4572, 5568, 4576, 5708, 5841, 5662, 3323, 4991, 5569,
+ 5570, 646, 1332, 2126, 786, 2040, 5512, 2712, 5248, 2713,
+ 79, 815, 2063, 3330, 1436, 2064, 2065, 4882, 4883, 5258,
+ 5239, 5240, 5241, 5242, 4463, 4875, 4468, 2849, 2071, 5055,
+ 5047, 5048, 4662, 3412, 3413, 4669, 3414, 5069, 5074, 3378,
+ 3379, 4108, 3415, 5387, 5388, 5389, 666, 1132, 5390, 80,
+ 81, 667, 675, 668, 1129, 2430, 1130, 82, 83, 709,
+ 1901, 1902, 1903, 1904, 3174, 2591, 3168, 3169, 4404, 5056,
+ 3417, 84, 647, 917, 918, 919, 920, 2180, 921, 2851,
+ 3434, 922, 2843, 3403, 923, 924, 925, 893, 818, 2795,
+ 2854, 3435, 2796, 3380, 2855, 2177, 926, 927, 928, 929,
+ 930, 1543, 894, 2146, 3389, 4122, 85, 628, 819, 1438,
+ 2069, 820, 2070, 3333, 821, 2067, 1441, 3439, 2114, 848,
+ 1473, 931, 1138, 3440, 932, 2183, 2185, 2182, 3438, 4682,
+ 2184, 86, 657, 685, 645, 1471, 673, 4879, 5254, 4450,
+ 4873, 4451, 5223, 4375, 4868, 4869, 4870, 5319, 3153, 87,
+ 660, 1114, 1731, 2422, 3833, 3025, 3027, 2423, 3832, 4315,
+ 4316, 4317, 3023, 3024, 5421, 3029, 3830, 5613, 5966, 5731,
+ 5732, 3822, 5736, 4324, 4764, 4765, 4766, 5127, 5423, 5619,
+ 5860, 5737, 5973, 5858, 5969, 5859, 5971, 6096, 6049, 6050,
+ 5870, 5984, 5985, 6054, 6097, 5747, 5748, 5749, 6141, 6142,
+ 5750, 3826, 3827, 5418, 4760, 5499, 3199, 3200, 2035, 5293,
+ 1272, 88, 4452, 4556, 4453, 4454, 5193, 5878, 5807, 4456,
+ 4457, 4458, 6057, 1806, 5219, 5205, 4473, 5336, 4459, 4824,
+ 4825, 4826, 4827, 5773, 5909, 5775, 5776, 5902, 6006, 5901,
+ 4828, 4829, 5165, 5648, 5173, 4951, 4830, 4831, 4832, 5180,
+ 5482, 5650, 5646, 5784, 5785, 6116, 6117, 5800, 6081, 5801,
+ 6123, 6155, 6156, 5786, 89, 659, 1680, 5925, 5926, 5927,
+ 4176, 5483, 4177, 4178, 4179, 4649, 4180, 4181, 4182, 4183,
+ 4184, 4185, 4186, 4187, 4188, 4189, 5061, 4652, 4209, 5023,
+ 5024, 4203, 4204, 4218, 4648, 4219, 4213, 5802, 5803, 5017,
+ 4653, 6019, 4621, 5036, 5937, 5787, 5804, 5789, 4637, 1756,
+ 1757, 3244, 1771, 1772, 3074, 3075, 2038, 4638, 4689, 4639,
+ 5064, 4283, 5110, 4289, 4290, 4291, 3784, 3785, 3786, 3787,
+ 3788, 2983, 5790, 5455, 5771, 5904, 5907, 6013, 6108, 5174,
+ 4833, 5178, 1231, 4834, 4835, 5879, 5891, 5895, 5880, 5896,
+ 5892, 5642, 3203, 5881, 5882, 5883, 5898, 5894, 3939, 5884,
+ 5439, 5760, 5440, 5161, 5038, 90, 164, 4051, 1405, 2699,
+ 1407, 1417, 3327, 2725, 2724, 1420, 1419, 2717, 4021, 4527,
+ 4928, 4050, 3324, 4055, 5345, 784, 4558, 5698, 5543, 5706,
+ 5545, 4559, 4802, 4560, 5683, 5825, 4561, 5564, 5704, 5837,
+ 4803, 4804, 4562, 4563, 4564, 5991, 5992, 5993, 4937, 1850,
+ 798, 799, 1425, 1426, 1427, 2790, 5340, 4963, 91, 3194,
+ 2607, 92, 1289, 1290, 1291, 1923, 1924, 2610, 2611, 3931,
+ 4412, 93, 1256, 2567, 1913, 2599, 94, 1275, 3185, 3186,
+ 3187, 3925, 95, 1433, 2059, 2060, 2729, 4062, 4584, 4996,
+ 5353, 5576, 5349, 5715, 5716, 96, 826, 1444, 97, 630,
+ 2083, 2084, 2085, 2767, 98, 1552, 172, 99, 1740, 1737,
+ 2436, 2437, 100, 1255, 1863, 1864, 1865, 1866, 3149, 101,
+ 2154, 2813, 2814, 2815, 2816, 2562, 3900, 2563, 2564, 3158,
+ 4128, 102, 765, 1400, 103, 764, 1399, 104, 105, 684,
+ 737, 677, 1747, 107, 108, 4376, 2225, 110, 771, 769,
+ 1074, 112, 1392, 1388, 113, 2226, 1075, 761, 762, 1340,
+ 1158, 3229, 3230, 2094, 2095, 2669, 2656, 1159, 1160, 1369,
+ 2020, 2686, 2448, 2449, 1846, 2450, 3845, 4334, 6078, 1581,
+ 1483, 1259, 1077, 1078, 1079, 1691, 1692, 1707, 1080, 1701,
+ 2373, 4262, 4731, 4732, 4733, 4734, 2312, 2313, 2417, 1081,
+ 2302, 2303, 2304, 1082, 1083, 1084, 1085, 1086, 1087, 1088,
+ 2295, 2296, 2297, 1089, 1090, 1091, 2412, 4244, 4245, 4713,
+ 3018, 3019, 3020, 1092, 2880, 4228, 2891, 2892, 2254, 1093,
+ 1094, 1095, 1096, 1097, 3808, 1098, 4305, 3987, 1099, 1553,
+ 2189, 2252, 4701, 4233, 5083, 4703, 4704, 5087, 2194, 2868,
+ 3705, 3706, 3707, 2316, 2317, 1601, 1602, 1570, 1571, 1341,
+ 4891, 6164, 1342, 5267, 5667, 5668, 5817, 6033, 5950, 5951,
+ 6130, 6131, 6132, 6133, 1343, 2642, 4476, 1344, 1345, 1346,
+ 3971, 3972, 4892, 4480, 4894, 4484, 1981, 1982, 1985, 1986,
+ 1347, 1348, 1349, 1350, 1969, 1351, 1352, 1353, 2661, 5522,
+ 4900, 4901, 5677, 5676, 4902, 4489, 4490, 3975, 3976, 4383,
+ 4384, 4385, 3240, 2248, 2249, 2324, 2159, 2160, 2161, 2195,
+ 1361, 1996, 2677, 3250, 1998, 3248, 3982, 3252, 3988, 3989,
+ 2404, 3008, 3804, 3010, 4752, 5117, 5118, 5413, 5601, 5602,
+ 5607, 4567, 5316, 5317, 2778, 1370, 2694, 3267, 3985, 1808,
+ 1809, 1372, 2002, 2681, 3256, 1810, 2009, 2010, 3261, 3369,
+ 1373, 1374, 1386, 1391, 1377, 1375, 2840, 4523, 5072, 3789,
+ 3772, 4808, 5232, 2218, 2219, 5186, 4092, 1378, 2697, 3999,
+ 4000, 4001, 1357, 1358, 1991, 1992, 1993, 1379, 1359, 2670,
+ 3978, 114, 704, 115, 2110, 837, 1468, 2109, 3165, 1446,
+ 3897, 2089, 2090, 1460, 792, 644, 116, 648, 4123, 117,
+ 688, 3896, 895, 2714, 1511, 1858, 1512, 2556, 3144, 3145,
+ 4377, 4798, 4378, 4791, 4792, 4379, 1244, 5142, 5143, 1403,
+ 4017, 4018, 4012, 2550, 3138, 1245, 1851, 3890, 2547, 3891,
+ 2548, 2576, 3892, 5014, 5580, 5964, 2544, 118, 682, 4364,
+ 5620, 3884, 3885, 6041, 6042, 1242, 119, 632, 2088, 833,
+ 1449, 1452, 1453, 2098, 4601, 2774, 5004, 4103, 4600, 1454,
+ 1455, 2776, 834, 835, 120, 725, 3195, 1295, 1830, 1831,
+ 1832, 2531, 121, 679, 1232, 3879, 4361, 2517, 663, 5752,
+ 1813, 1235, 1814, 2513, 3120, 1794, 122, 1397, 1395, 813,
+ 123, 124, 777, 173, 2025, 125, 126, 1264, 1894, 2588,
+ 3907, 3908, 4388, 1895, 1896, 3166, 127, 692, 1250, 3162,
+ 4809, 4810, 5152, 128, 716, 1279, 1280, 1917, 1915, 3190,
+ 2602, 129, 2424, 130, 649, 898, 1515, 1516, 2152, 131,
+ 719, 1284, 132, 133, 900, 4129, 5848, 6044, 653, 2156,
+ 1520, 5224, 4492, 4907, 4908, 4910, 5283, 5284, 6093, 6185,
+ 6199, 6192, 6202, 6203, 6206, 6212, 6213, 1100, 1302, 1303,
+ 1101, 5930, 1102, 1103, 1104, 2227, 1248, 687, 1854, 1855,
+ 5137, 5428, 2554, 3141, 2143, 2144, 1856, 4793, 4794, 3047,
+ 3249, 1105, 3886, 5162, 1447, 2091, 1267, 613, 1106, 614,
+ 1107, 1108, 794, 1304, 1988, 2823, 1181, 3060, 1109, 934,
+ 1413, 1738, 2048, 2049, 2824, 616, 3061, 1182, 3709, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 3716,
+ 135, 678, 1190, 1768, 1776, 2467, 1766, 2479, 3100, 2481,
+ 2482, 3105, 2483, 1238, 2454, 1767, 3089, 4347, 4346, 2480,
+ 3871, 4781, 4780, 2484, 2475, 3867, 3853, 3070, 4341, 5131,
+ 5130, 2462, 2461, 2460, 2470, 2471, 2472, 2473, 3864, 3080,
+ 3086, 136, 901, 2165, 656, 1522, 1523, 2837, 137, 681,
+ 138, 710, 1269, 2595, 3178, 3179, 3920, 4406, 3921, 139,
+ 1143, 1144, 140, 884, 3206, 2799, 2104, 1416, 886, 2105,
+ 2127, 888, 1475, 889, 890, 891, 892, 4040, 3316, 3317,
+ 2804, 2107, 2050, 2444, 3309, 4513, 2051, 4034, 4035, 4514,
+ 2722, 5360, 4047, 3320, 5011, 4113, 5361, 5362, 141, 696,
+ 142, 5249, 703, 1258, 1873, 143, 144, 145, 146, 770,
+ 1382, 1161, 165, 166, 167, 168, 802, 803, 3326, 4057,
+ 4579, 4580, 5347, 6195, 6196, 2635, 3952, 5811, 6125, 6189,
+ 6208, 5260, 5261, 147, 1309, 1305, 736, 1943, 1937, 1939,
+ 2621, 3198, 148, 149, 150, 5052, 151, 1541, 2809, 2072,
+ 3717, 3718, 627, 939, 3428, 3933, 850, 5050, 1247, 2551,
+ 2112, 940, 941, 942, 5053, 3429, 5244, 5259, 5246, 5513,
+ 5665, 3214, 3951, 5250, 152, 153, 2633, 3957, 3955, 2173,
+ 2850, 3430, 4680, 943, 944, 945, 946, 2186, 947, 1533,
+ 155, 1861
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 615, 801, 738, 695, 797, 1539, 111, 109, 1179, 1230,
+ 2349, 2026, 134, 1758, 2594, 1761, 1762, 2399, 938, 2577,
+ 807, 669, 1415, 1775, 2618, 669, 2771, 658, 2716, 916,
+ 669, 2100, 1414, 683, 938, 106, 796, 2258, 2432, 1189,
+ 2217, 3846, 1339, 3268, 154, 1137, 706, 2224, 4088, 3142,
+ 2779, 2617, 714, 1183, 2696, 1836, 718, 707, 3416, 2011,
+ 1188, 4002, 2011, 715, 4106, 1316, 885, 1317, 1260, 3940,
+ 1319, 1320, 3977, 1603, 739, 1739, 676, 1525, 790, 1530,
+ 3996, 1531, 1532, 3878, 4565, 2289, 4487, 4566, 1536, 3157,
+ 2015, 1999, 1180, 3442, 3443, 2278, 885, 887, 2172, 4455,
+ 4455, 2543, 1184, 4003, 3098, 2036, 3720, 3207, 3721, 2121,
+ 1185, 2037, 3154, 1989, 699, 3992, 1564, 2333, 780, 1932,
+ 3722, 1804, 2501, 2502, 4208, 3167, 1445, 1145, 1286, 3888,
+ 3236, 1293, 4690, 3704, 3771, 2352, 3332, 3704, 2431, 2508,
+ 111, 782, 4690, 1837, 2731, 2853, 1964, 2701, 1193, 4690,
+ 936, 785, 787, 2590, 808, 787, 809, 795, 810, 2524,
+ 4557, 4694, 4222, 5233, 811, 812, 936, 4987, 4695, 106,
+ 3232, 1186, 778, 4217, 5071, 3231, 3231, 4059, 4217, 111,
+ 109, 2096, 4461, 2537, 2538, 134, 5371, 2384, 2385, 2386,
+ 2387, 2388, 2389, 2390, 2392, 2394, 2395, 2396, 2397, 2398,
+ 3824, 4373, 4455, 2432, 4411, -2501, 4934, 4935, 106, 4936,
+ 4896, 3979, 3980, 2364, -1868, -1868, 4210, 1676, 1678, 1679,
+ -2502, 2372, 2374, 2838, 2377, 2378, 1539, 2587, -2650, 4939,
+ 1721, 4941, 1644, 4046, 4953, -1020, -1020, 1662, -2666, -3378,
+ -3378, 1666, 4636, 4636, 2838, 4285, 4636, 4582, 4971, -2795,
+ -2795, -384, -384, 4636, -3379, -3379, 2838, 2061, 3961, 4636,
+ 2788, 2157, 1404, 938, 2838, 938, 2766, 938, 938, 935,
+ -2098, -486, -486, 5351, 938, 4995, 1401, 938, 672, 2862,
+ 4212, 1401, -2667, 2838, 2612, 935, 3877, 3362, 1163, 5444,
+ 5445, 5422, 4799, 3231, 4372, 4373, 1686, 701, 4286, 2838,
+ 1489, 2838, -2668, 2431, 1687, 1838, 4073, 1686, 2210, 2211,
+ 2212, 5059, 2213, 1688, 2214, 1687, 2215, 2210, 2211, 2212,
+ 2838, 2213, 1390, 2214, 1688, 2215, 723, 817, 2032, 1686,
+ 3769, 1686, 2210, 2211, 2212, 1389, 2213, 1687, 2214, 1687,
+ 2215, 1330, 1686, 650, 2157, 689, 1688, 1401, 1688, -3456,
+ 1687, 2980, 4031, 1401, 779, 755, -3378, -3439, 1401, 1688,
+ 720, 2838, 1708, 2834, 2720, -3443, 2876, 3393, 1708, 5842,
+ 5972, -3379, 5184, 4020, 5187, 4232, 4010, 4331, 4332, 1401,
+ 3306, 5754, 2798, 1941, 1246, 5484, 4205, 32, 1686, 5727,
+ 1431, 1709, 1710, 5189, 800, 936, 1687, 936, 4206, 936,
+ 936, -3378, 1423, 4216, 3205, 1688, 936, 2106, 4613, 936,
+ 661, 1686, 1686, 2838, 3923, 3924, -3379, 2835, 3021, 1687,
+ 1687, 829, 806, 4223, 2928, 1401, 2172, 4112, 1688, 1688,
+ 4836, 3146, 1760, 1800, 5191, 804, 2118, 2789, 39, 4618,
+ 2838, 1325, 1401, 32, 1401, 6127, 1686, 1795, 4671, 4618,
+ 1686, 6079, 5649, 5020, 1687, 1711, 830, 2665, 1687, 4348,
+ 1708, 1711, 2557, 1688, 665, 2076, 690, 1688, 2032, 4285,
+ 5562, 1689, 693, 5942, 836, 5021, 838, 839, 840, 841,
+ 842, 843, 1689, 844, 845, 3134, 5209, 3311, 1686, 1709,
+ 1710, 5179, 4872, 5823, 39, 5247, 1687, 1802, 938, 2917,
+ 717, 2788, 1708, 41, 1689, 1688, 1689, 6179, 4060, 3877,
+ 2200, 3201, 4958, 1136, 935, 1437, 935, 1689, 935, 935,
+ 883, 5549, 4286, 169, 1331, 935, 1686, 4511, 935, -1943,
+ 3037, 1709, 1710, 1732, 1687, 5245, 4089, 32, 1871, 1752,
+ 1712, 4374, -2795, 1688, 1686, -3378, 1712, 6128, 1686, 2619,
+ 883, 2162, 1687, 1711, 2365, 1868, 1687, 2627, 4630, 4821,
+ -3379, 1688, 4690, 1689, 5071, 1688, 766, 1296, 1297, 5852,
+ 698, 1254, 5630, 4836, 1972, 5256, 3875, 4469, 1690, 896,
+ 2992, 5031, 698, 1207, 1459, 1270, 1689, 1689, 39, 1690,
+ 5998, 6197, 2455, 4614, 6000, 1711, 1371, 41, 4690, 767,
+ 1907, 1371, 2157, 1371, 3155, 4455, 651, 2465, 2878, 5724,
+ 3030, 1690, 3312, 1690, 1686, 2033, 1163, 5062, 1542, 3156,
+ 1339, 1689, 1257, 4220, 1690, 1689, 1727, -3442, 694, 3307,
+ 936, 1688, 1833, 2366, 1835, 3015, 4470, 4539, 1712, 1948,
+ 849, 795, 1951, 3016, 629, 1686, 1954, 1955, 1956, 3077,
+ -221, 4016, 4957, 1687, 3127, 4690, 5728, -3440, 1736, 2993,
+ 2222, 4626, 1688, 1689, 2047, 1134, 4557, 6104, -714, -3441,
+ 1690, 795, 6198, -3446, 5103, 1163, 1603, 4628, 2789, 1432,
+ 1712, 5824, 1753, 5853, 2442, 5690, 1251, 1469, 1470, 3135,
+ 4217, 2093, 795, 1690, 1690, 2679, 2011, 5380, 824, 3966,
+ 4014, 1689, 2077, 3970, 4090, 1268, 795, 2201, 4455, 2505,
+ 6080, 2507, 1676, 1678, 2511, 4471, 1135, 1466, 3859, 1689,
+ -715, 3257, 2367, 1689, 2682, 2163, 2519, -1868, 1690, 2522,
+ 2499, 4925, 1690, 2525, 2036, 3444, 4636, 4520, 1315, 768,
+ 2037, 3960, 1908, 2075, 654, 2047, 4959, 3231, 2994, 935,
+ 1803, 2172, 5605, 831, 780, 2033, 1461, 1462, 1463, 2540,
+ 2541, 2542, 6100, 4622, 4636, 4624, 1733, 2108, 4636, 4656,
+ 1690, 1394, 4657, 4512, 4643, 4636, 1387, 3242, 6129, 5705,
+ 2651, -1868, 1273, 897, 795, 4926, 2078, 2861, 2079, 4320,
+ 824, 2666, 5954, 824, 4658, -1943, 2986, 2987, 4349, 1686,
+ 795, 938, 2981, 1801, 4466, 4670, 829, 1687, 1690, 1434,
+ -3378, 2433, 4313, 3314, 2418, 3321, 1688, 654, 1326, 3022,
+ 1689, 5729, 780, 6180, 5022, -3379, 1690, 4202, 5452, 1456,
+ 1690, 1458, 171, 787, 787, 787, 1464, 4287, 795, 4061,
+ 1424, 830, 1421, 4960, 6105, -2678, 1686, 2877, 1363, 1874,
+ 2721, 2187, 5792, 4619, 1687, 4210, 691, 4210, 6106, 1281,
+ 1686, 654, -2161, 1688, 1942, 4769, 4210, 1872, 1687, -3565,
+ 695, 1686, 2786, 2401, 2419, 3128, 6220, 1688, 2080, 1687,
+ 827, 662, 4210, 3360, 3376, 885, 4210, 1465, 1688, 1467,
+ 3876, 4039, 832, 1365, 847, 2721, 780, 4210, 1529, 3000,
+ 3001, 4877, 3004, 3005, 2721, 654, 2769, 1534, 948, 5225,
+ 1537, 1207, 68, 1797, 4032, 2536, 1711, 4202, 5571, 2807,
+ 1962, 2082, 3031, 1544, 111, 109, 1686, 1690, -3456, 5364,
+ 134, 1240, -2161, 936, 1687, 3202, -3439, 2204, 1686, 3359,
+ 2836, 1266, 4126, 1688, -3443, 4630, 1687, 4632, 724, -2650,
+ 2029, 1874, 2081, 106, 1490, 1688, 652, 1389, 5516, -2666,
+ 4212, 4524, 4288, 4631, 1686, 5730, 2839, 5968, 68, -2507,
+ 1207, 2158, 1687, -2650, 1689, 2082, 2433, 3981, 2443, 4583,
+ 1645, 1688, 721, -2666, -2508, 1663, 2376, 2839, 1414, 1667,
+ 1354, 4836, 3877, 5519, -1868, 5520, 5959, 1402, -115, 2839,
+ -115, 1712, 1402, -2667, 738, 5352, 1663, 2839, 4327, 4934,
+ 4935, 4565, 4936, 2327, 4566, -1020, 1834, 5586, -119, -3378,
+ -119, 1689, 4455, -2668, 4455, 1334, 2839, -2667, 4020, -2795,
+ 722, -384, 3370, 4953, -3379, 1689, 1750, -111, 6014, -111,
+ 6016, 6017, 2839, 2890, 2839, 1759, 1689, -2668, 883, 4551,
+ 2523, -486, 935, 1773, 2158, 4616, 4617, 3308, 1686, 2990,
+ 1414, 4287, 68, 2839, 2216, 4015, 1687, 1684, 1402, 2082,
+ 3770, 2839, 1796, 2288, 1402, 1688, 1681, 4647, 2929, 1402,
+ 2982, 1690, 1683, 4650, 1807, 5071, 6027, 4557, 6114, 5155,
+ 2812, 2879, 4659, 2695, 4663, 4664, 4665, 3254, 4667, 4668,
+ 1402, 1689, 2488, 1774, 2839, 5663, 5226, 1179, 4672, 4673,
+ 4674, 4675, 4676, 1689, 1713, 1714, 1715, 1716, 1717, 1718,
+ 1719, 1720, 1715, 1716, 1717, 1718, 1719, 1720, 1690, 4455,
+ 795, 5247, 1521, 1339, 6066, 6067, 1253, 2357, 1189, 1689,
+ 3234, 3235, 1690, 3297, 4919, 6073, 1402, 1693, 1694, 1695,
+ 2420, 1696, 1183, 1690, 5233, 5233, 2839, 795, 2909, 1188,
+ 1539, 2884, 5655, 1402, 2368, 1402, 795, 655, 6107, 795,
+ 2464, 5664, 885, 4472, 795, 3771, 3771, 1815, 4836, 3771,
+ 3771, -3266, 4878, 2839, 5100, 3771, 3771, 3101, 5102, 3849,
+ 2995, 1180, 4927, 2047, 2503, 2885, 3078, 2898, 6103, 2899,
+ 4217, 1184, 4978, 2456, 4217, 795, -3442, 5572, 1690, 1185,
+ -3471, 3079, 4522, 2600, 1715, 1716, 1717, 1718, 1719, 1720,
+ 1690, 1686, 4961, 2166, 654, 1798, -1828, 1313, 2509, 1687,
+ 1909, 1371, 1995, 1689, 2174, 2900, -3440, 2901, 1688, 631,
+ 655, 32, 807, 1857, 1779, 780, 1690, 1193, -3441, -2681,
+ 780, 780, -3446, 3861, 1339, 1714, 1715, 1716, 1717, 1718,
+ 1719, 1720, 1491, 2052, 4048, 1339, 1339, 1910, 1697, 2805,
+ 1186, 738, 2468, 2629, 2630, 2894, 1920, 832, 5123, 825,
+ 2638, 2639, 2640, 3904, 655, 1845, 3834, 670, 1513, 3310,
+ 780, 1933, 39, 2895, 824, 2914, 824, 2584, 4690, 3072,
+ 4690, 41, 1368, 3902, -1868, 4911, 4897, 5540, 4914, 5542,
+ 3927, 1946, 2158, 2701, 5547, 671, 3097, 5583, 5703, 5585,
+ 3102, 5552, 5553, 2036, 2603, 4887, 3182, 1508, 655, 2037,
+ 4493, 5559, 780, 1971, 4632, -3471, 2432, 4836, 2565, 883,
+ 1690, 2905, 1498, 1681, 4496, -2161, 5098, 2056, 2421, 1683,
+ 2775, 4052, 5573, 1994, 1926, 4915, 1686, 3124, 3372, 1355,
+ 1708, 4788, 1686, 3255, 1949, 1950, 1934, 1912, 2703, 885,
+ 1687, 2018, -3276, 1688, 3034, 3035, 808, 5757, 809, 1688,
+ 810, -1828, 2011, 3738, 2011, 2011, 811, 812, 3311, 1709,
+ 1710, 1518, 2027, 2028, 2896, 1508, 1689, 2157, 1387, 2036,
+ 3076, 111, 109, 2041, 3382, 2037, 2853, 134, 2791, 2792,
+ 3260, 4063, 3263, 3264, 780, -2161, 795, 3114, 2320, 2321,
+ 3371, 3115, 693, 3117, 787, 780, 4654, 2190, 780, 4536,
+ 106, 5643, 938, 4481, 4482, 3092, 2431, 3122, 4210, 780,
+ 2439, -3266, 5956, 780, 3167, 2092, 5829, 2514, 3802, 3803,
+ 3130, 3131, 3223, 1711, 5456, 2102, 5936, 2224, 3224, 3015,
+ 795, 4898, 795, 780, 6070, 4105, 4585, 4772, 1163, 3883,
+ 2702, 693, 938, 2031, 3809, 3812, 3815, 3816, 4477, 4478,
+ 1492, 1860, 4342, 2793, 3231, 3231, 1867, -1868, 3828, 1816,
+ 2515, 795, 3183, 4917, 1686, 5181, 4351, 795, 6025, 1499,
+ 4354, 3823, 1687, 1690, 2566, 4735, 2504, 938, 1514, 5757,
+ 698, 1688, 2700, 3312, 1898, 3155, 1686, 3795, 2808, 3798,
+ 2832, 2168, 3704, 3936, 1687, 1914, 4049, 4613, 738, 1927,
+ 3156, 3298, 2469, 1688, 2825, 5169, -3471, 1689, 1712, 3905,
+ 2510, 2831, -1828, 4709, 938, 938, 2915, 780, 795, 1686,
+ 6009, 2061, 4836, 1686, 3877, 916, 1137, 1687, 5695, 1686,
+ 2841, 1687, 1493, 1509, 936, 4636, 1688, 1687, 1354, 1686,
+ 1688, 1356, 1577, 1578, 1579, 3394, 1688, 1687, 694, 1717,
+ 1718, 1719, 1720, 2826, 1869, 3313, 1688, 3043, 3044, 5170,
+ 5124, 2827, 111, 2969, 4541, 2970, 2400, 4605, 4606, 3182,
+ 1681, 846, -1868, 937, 936, 1519, 1683, 3796, 693, 3797,
+ 3093, 5688, 5788, 1686, 3184, 4053, 4097, 1626, 4238, 937,
+ 4239, 1687, 4899, 1510, 1187, 2516, 883, 694, 5924, 2833,
+ 1688, 1509, -3276, 5577, 2162, 5163, 5378, 3937, 1690, 936,
+ 1500, 3299, -1868, 1686, 1690, 780, 1792, 655, 3300, 780,
+ 2045, 1687, 2829, 3862, 3301, 780, 2369, 1686, 6089, 6071,
+ 1688, 2057, 4655, 2162, 3003, 1687, 2350, -2495, -904, 1689,
+ -904, 686, 2082, 2916, 1688, 3393, 936, 936, 6010, 2086,
+ 3863, 2086, 5936, 935, 693, 2940, 5033, 2546, 5171, 111,
+ 2358, 1689, 5822, 5251, 174, 175, 2032, 4099, 6147, 5614,
+ 2490, 2491, 5034, 2493, 2495, 2496, 2497, 4710, 3962, 3956,
+ 700, 5835, 4614, 2902, 3314, 2506, -2098, 795, -2098, 2405,
+ 2122, 2988, 2322, 935, 1689, 2323, 3906, 3375, 1689, 3302,
+ 1401, 5638, 2123, 2521, 1689, 780, 5644, 5645, 1792, 795,
+ 795, 5338, 5252, 2690, 1689, 1686, 1287, 795, 2457, 5163,
+ 5943, 5915, 5164, 1687, 4931, 6011, 5172, 1327, 935, 5689,
+ 3932, 1841, 1688, 1207, 694, 3183, 68, 2735, 2451, 2474,
+ 5751, 2828, 1847, 2589, 5285, 3315, 1690, 787, 787, 780,
+ 787, 787, 787, 787, 780, 795, 780, 2124, 1689, 1870,
+ 3303, 1793, 787, 2634, 2637, 935, 935, 5783, 1690, 800,
+ 6148, 5783, 2425, -1868, -940, 4299, 2452, 4300, 2163, 2520,
+ 787, 5194, 795, 2076, 2622, 3068, 2999, 3938, 1689, 5685,
+ 1328, 5207, 5208, 883, 1848, 2628, 1686, 702, 1288, 3062,
+ 5506, 1690, 1689, 780, 1687, 1690, 3067, 2163, 4380, 5970,
+ 694, 1690, 5974, 1688, 2164, 780, 1686, 5514, 937, 712,
+ 937, 1690, 937, 937, 1687, 1408, 4191, 3882, 4525, 937,
+ 5339, 885, 937, 1688, 2671, 3801, 2844, 5032, 4192, 5778,
+ 6193, 5686, 1398, 2082, 2852, 1698, 1699, 1700, 3063, 5307,
+ 5292, 2328, 1539, 1793, 1246, 2332, 3064, 3184, 5253, 2526,
+ 4085, 2338, 3040, 1686, 795, 1690, 5397, 1539, 3181, 5751,
+ 2036, 1687, 3850, 5615, 5616, 1686, 2037, 3922, 169, 780,
+ 1688, 1686, 938, 1687, 2605, 5767, 5075, 2715, 3854, 1687,
+ 1689, 6120, 1688, 3139, 3069, 1690, 1339, 713, 1688, 3857,
+ 3858, 5416, 1339, 2082, 5301, 795, 5783, 5779, 3432, 1690,
+ 726, 4098, 2624, 5958, 795, 795, 795, 1339, 2691, 5960,
+ 780, 3911, 3912, 5783, 766, 3215, 2011, 1409, 3216, 824,
+ 5326, 2453, 3221, -904, 2047, 1686, 780, 1329, 2943, 2125,
+ 4775, 2438, 6088, 1687, 6109, 4778, 4779, 780, 780, 4526,
+ 1686, 2106, 1688, 2033, 3260, 795, 824, 767, 1687, 5890,
+ 3163, 1842, -1259, 4117, 4118, 4366, 4570, 1688, 3188, 1686,
+ 3243, 1689, 4016, 5617, 5726, 4508, 708, 1687, 2042, 2054,
+ 1459, 3852, 5769, 6194, 3877, 2492, 1688, 6121, 727, 759,
+ 2498, 1689, 2500, 6126, 3877, 3877, 6061, 1690, 6060, 6094,
+ 5780, 4634, 4367, 3441, 3441, 3441, 4497, 2683, 795, 5929,
+ 2047, 1686, 3965, 2000, 936, 760, 3969, 780, 5084, 1687,
+ 2077, 5779, 2413, 780, 4086, 4938, 1276, 2730, 1688, 760,
+ 4952, 5874, 2011, 6163, 1339, 4962, 3065, 2608, 1689, 2535,
+ 5402, 6122, 4006, 5929, 4863, 5618, 5181, 780, 6187, 6188,
+ 1689, 2545, 3259, 937, 2414, 2055, 1689, 1843, 5783, 1686,
+ 4101, 4571, 1456, 1686, 2783, 938, 1708, 1687, 2785, 4104,
+ 4658, 1687, 5119, 1844, 780, 780, 1688, 2158, 1690, 2433,
+ 1688, 2912, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720,
+ 6035, 2803, 2803, 2609, 1410, 1709, 1710, 768, 1690, 1686,
+ 5556, 1376, 5546, 2684, 2078, 1686, 2079, 1687, 5435, 5781,
+ 1689, 1277, 1411, 1687, 5780, 795, 1688, 5608, 4007, 780,
+ 2001, 4729, 1688, 1686, 938, 1689, 1686, 4087, 2415, 780,
+ 4202, 1687, 5202, 935, 1687, 2847, 1380, 2380, -2669, 938,
+ 1688, 170, 5875, 1688, 1689, 1690, 2856, 849, 4574, 5783,
+ 740, 3273, 3274, 4903, 4904, 4575, 2632, 1690, 4210, 1711,
+ 2193, 1686, 4210, 1690, 4864, 1686, 5359, 1278, 2193, 1687,
+ 1477, 1363, 1354, 1687, 741, 1364, 885, 5203, 1688, 3426,
+ 938, 2685, 1688, 1354, 1354, 5685, 1689, 171, 6036, 938,
+ 938, 938, 4660, 3419, 3068, 1381, 2080, 936, 1539, 3983,
+ 3425, 2193, 1564, 111, 2888, 3432, 3715, 3374, 3062, 2416,
+ 3715, 5697, 743, 2913, 3723, 3067, 1365, 1690, 3017, 2206,
+ 3710, 1366, 5628, 5781, 3710, 3728, 3729, 2267, 1478, 6157,
+ 2988, 1479, 1690, 2381, 1689, 2918, 697, 5686, 1689, 6143,
+ 4943, 4905, 3420, 3877, 1712, 3841, 5204, 4626, 4661, 2382,
+ 3421, 1690, 3984, 2723, 1367, 1414, 936, 3063, 1480, 2726,
+ 2270, 1163, 6177, 4628, 698, 3064, 1481, 1811, 2919, 3711,
+ 2081, 936, 2927, 3711, 1689, 1686, 788, 3712, 2939, 738,
+ 1689, 3712, 3764, 1687, 6172, 883, 2951, 3877, 3427, 4298,
+ 1812, 4301, 1688, 1690, 2193, 1708, 780, 1686, 1689, 3768,
+ 780, 1689, 2400, 3069, 4944, 1687, 3171, 3172, 2193, 5115,
+ 4945, 3423, 936, 2977, 1688, 3719, 935, 789, 4906, 3719,
+ 2383, 936, 936, 936, 1709, 1710, 4371, 2802, 2802, 5177,
+ 5177, 5116, 2944, 3155, 5995, 1686, 1689, 791, 3714, 3913,
+ 1689, 1690, 3714, 1687, 1546, 1690, 1364, 5673, 3156, 3790,
+ 6102, 1681, 1688, 2286, 159, 2817, 937, 1683, 2652, 4650,
+ 5481, 5629, 2945, 805, 2653, 1521, 2654, 2307, 4659, 5674,
+ 4663, 4664, 4665, 4667, 4668, 935, 2948, 3109, 5723, 5132,
+ 5133, 1690, 3110, 3173, 3914, -1259, 6146, 1690, 1711, 5877,
+ 935, 3113, 1366, 5273, 1547, 5274, 1610, 3116, 5212, 795,
+ 795, 1686, 3147, 1179, 1179, 1690, 795, 5656, 1690, 1687,
+ 2803, 2803, 4202, 6118, 6118, 1627, 1628, 5675, 1688, 674,
+ -2675, 1402, -592, 795, 680, 795, -2098, -2098, 3087, 3088,
+ 3422, 935, 4243, 3268, 1189, 1189, 4207, 3825, 2082, 2655,
+ 935, 935, 935, 1690, -2677, 3065, 3915, 1690, 1183, 1183,
+ 1689, 6154, 5832, 3108, 787, 1188, 1188, 3713, 1548, 787,
+ 4888, 3713, 3782, 4661, 2949, 4521, 2839, 4889, 787, 4890,
+ 938, 1133, 1689, 1712, 787, 814, 3783, 938, 5772, 1139,
+ 5774, 5281, 4789, 1686, 1239, 816, 1339, 1180, 1180, 3916,
+ 1339, 1687, 5282, 3059, 1686, 3227, 1686, 1184, 1184, 3228,
+ 1688, 780, 1687, 3432, 1687, 1185, 1185, 4916, 2897, 698,
+ 1689, 1688, 1686, 1688, 4207, 2897, 1995, 1857, 5025, 5097,
+ 1687, 3213, -2683, 795, 3150, 780, 5107, 3218, 3220, 1688,
+ 1549, 4630, 2960, 4993, 4202, 828, 2964, 5037, 3121, 5885,
+ 3111, 899, -2686, 1193, 1193, 2965, 5042, 1113, 2839, 4631,
+ 4202, 3118, 5044, 780, 1115, 5008, 1207, 1690, -2689, -2339,
+ 3177, -2339, 5058, 3934, 780, 2968, 1186, 1186, 4041, 4042,
+ 5067, 5068, 4043, 4044, 4045, 1686, 1689, 4626, 1131, 1690,
+ 4202, 4618, 5220, 1687, 664, 6020, 6021, 5222, -2690, 4202,
+ 3204, 1163, 1688, 4628, 3209, 3210, 780, -2691, 787, 2047,
+ 2047, 1241, 936, 780, 3219, 787, 5903, 4656, 780, 936,
+ 4657, 4202, 2975, 4202, 780, 1686, 4744, 1690, 1339, -2693,
+ 4746, -2694, 824, 1687, 3447, 1368, 1686, 1686, 2952, 780,
+ 883, 1243, 1688, 3241, 1687, 1687, 3180, 1994, 3246, 174,
+ 175, 4697, 4698, 1688, 1688, 1257, 2802, 2802, 3917, 3918,
+ 3919, 1252, 5893, 5897, 1262, 1686, 1686, 4410, 1689, 2745,
+ 2746, 2011, 1557, 1687, 1687, 6166, 6168, 5177, 4026, 1689,
+ 4717, 1689, 1688, 1688, 2758, 4360, 2760, 4119, 4120, 4121,
+ 4352, 4795, 4353, 1690, 3730, 4737, 795, 1689, 5213, 4498,
+ 5214, 1265, 780, 1187, 1271, 1925, 4633, 4640, 4365, 3959,
+ 4642, 1930, 1931, 4067, 1274, 4069, 4070, 4646, 2779, 1604,
+ 5987, 4075, 4741, 5990, 1283, 5596, 2954, 1285, 4407, 4083,
+ 1759, 935, 1759, 4091, 5215, 4094, 2341, 2342, 935, 5425,
+ 5426, 1292, 4008, 4009, 2705, 4011, 4013, 3129, 3364, 3272,
+ 3366, 174, 175, 3715, 4755, 4328, 780, 3279, 1294, 780,
+ 1689, 795, 795, 5145, 5216, 4767, 1686, 3710, 5979, 5980,
+ 4236, 3152, 795, 1308, 1687, 1690, 4362, 1383, 1384, 2761,
+ 2762, 759, 1312, 1688, 2706, 938, 1690, 2648, 1690, 2649,
+ 174, 175, 5893, 1318, 1314, 1685, 5897, 1686, 1306, 1307,
+ 1689, 1310, 1686, 1311, 1690, 1687, 4596, 1323, 1321, 1686,
+ 1687, 1689, 1689, 4268, 1688, 4269, 3711, 1687, 4237, 1688,
+ 1324, 2707, 4252, 1360, 3712, 10, 1688, 1975, 1713, 1714,
+ 1715, 1716, 1717, 1718, 1719, 1720, 1396, 1398, 1976, 4952,
+ 1689, 1689, 3211, 2806, 1686, 2807, 2662, 1406, 1686, 3217,
+ 1422, 795, 1687, 795, 1354, 2903, 1687, 2265, 4254, 1408,
+ 1354, 1688, 3719, 1418, 4276, 1688, 2946, 1690, 2947, 1686,
+ 1686, 4630, 1428, 1429, 17, 1354, 5685, 1687, 1687, 4607,
+ 2955, 4609, 5134, 2958, 1430, 3714, 1688, 1688, 1393, 4631,
+ 800, 1435, 1686, 1686, 1686, 1440, 1207, 5217, 1765, 1443,
+ 1687, 1687, 1687, 5028, 5621, 1686, 1686, 1690, 1448, 1688,
+ 1688, 1688, 3059, 1687, 1687, 5685, 738, 936, 1690, 1690,
+ 4277, 4618, 1688, 1688, 5091, 3436, 1472, 3437, 5686, 2663,
+ 4632, 5218, 1686, 3973, 1459, 3974, 1474, 1974, 1686, 2708,
+ 1687, 1689, -2290, 1476, 174, 175, 1687, 1690, 1690, 1688,
+ 4029, 2709, 4030, 3889, 3781, 1688, 5300, 1980, 2875, 5348,
+ 4502, 4503, 1482, 1485, 4504, 4505, 1484, 5686, 5357, -3426,
+ 4506, 4507, 1689, 1486, 5893, 5897, -2292, 1689, 32, 4260,
+ 1487, 2947, 111, 3805, 1689, 1686, -3428, 1905, 1681, -3425,
+ 5331, -2290, 1354, 1687, 1683, 3373, 2017, 937, 1488, 2019,
+ 2019, -3427, 1688, 1975, 3713, 1494, 5777, 174, 175, 1495,
+ 4263, 780, 1874, 4267, 1976, 1874, 795, 795, 1497, 1689,
+ 37, 4994, 1977, 1689, 4271, -2292, 4272, 1974, 693, 39,
+ 1496, 5873, 2959, 4577, 1501, 4578, 935, 937, 41, 156,
+ 4749, 4998, 1874, 4999, 1689, 1689, 795, 1502, 1690, 1978,
+ 1503, 2710, 42, 1507, 2963, 2443, 2443, 1713, 1714, 1715,
+ 1716, 1717, 1718, 1719, 1720, 1414, 1414, 1689, 1689, 1689,
+ 5739, 1504, 937, 4784, 3868, 1506, 3870, 111, 109, 1690,
+ 1689, 1689, 1505, 134, 1690, 2830, 3998, 2012, 1517, 1545,
+ 2012, 1690, 2966, 1975, 4685, -2290, -3659, 1759, 4686, 5000,
+ 4687, 5001, 4688, 1550, 1976, 1979, 106, 1689, 2350, 937,
+ 937, 1551, 1977, 1689, 3953, 154, 1565, 5144, 5874, 1566,
+ 780, 2711, 1567, 2745, 2746, 1572, 1690, 2400, 1759, -2292,
+ 1690, 1573, 693, 1980, 5002, 1574, 5003, -2290, 2758, 1978,
+ 2760, 4297, 2997, 5078, 1621, 5080, -2290, 1702, -940, 1575,
+ 4098, 1690, 1690, 1576, 1580, -2290, 4415, 5874, 2973, 1582,
+ 1689, 4773, 4774, 4033, 3398, 3399, 1414, 4782, 3400, -2290,
+ 3401, -2292, 3402, 1583, 1690, 1690, 1690, 157, 1653, 1722,
+ -2292, 1584, 1585, 5122, 694, 4626, 1974, 1690, 1690, -2292,
+ 6063, 787, 5092, 1586, 1874, 1979, 780, 6224, 1686, 4627,
+ 5030, 4628, 5105, -2292, 5106, 5113, 1687, 1874, 780, 5125,
+ 1568, 5126, 780, 5778, 1690, 1688, 2196, 2197, 795, -3560,
+ 1690, 1657, 5149, 1980, 5150, 2207, 2405, 2145, 5054, 5875,
+ 1339, 1339, 5057, 2761, 2762, 2871, 1587, 1588, 5039, 5065,
+ 2985, 1589, 3929, 1703, 5167, 5039, 5168, 2438, 795, 795,
+ 4685, 4231, 1975, 4240, 4686, 2268, 4691, 2271, 4688, 1704,
+ 4632, 1723, 5272, 1976, 3974, 1590, 6110, 1690, 5875, 4241,
+ -1656, 1977, 2284, 2285, 2287, 5318, 5372, 1591, 5373, 2290,
+ 2291, 5779, 4874, 5374, 795, 5373, 1592, 2308, 694, 158,
+ -1655, 4041, 4042, 2937, 5085, 4043, 4044, 4045, 1978, 1686,
+ 4056, 1724, 5376, 1821, 5377, 6152, 1604, 1687, 4479, 5370,
+ 1593, 5740, 5541, 5438, 1596, 4369, 1688, -2673, 5741, 1597,
+ 1598, 2262, 1604, 5777, 174, 175, 1605, 1606, 5581, 5554,
+ 1705, 1725, 4242, 5742, 5574, 693, 5575, 1607, 1608, 6173,
+ 780, 5593, 5563, 5511, 5565, 693, 4022, 4023, 4024, 4025,
+ 1702, 4027, 4028, 3441, 1979, -2262, 3898, 5626, -740, 5627,
+ 2028, 795, 795, 5632, 159, 5627, 780, 1298, 6186, 1611,
+ 1299, 1300, 4247, 1689, 5780, 1301, 2011, 5633, 5793, 5627,
+ 3066, 1612, 1980, 4248, 4249, 1781, 4946, -3560, 1613, 4071,
+ 4072, 1726, 4074, 4253, 4076, 4077, 4078, 4079, 4080, 4081,
+ 4082, 5415, 4084, 1614, 5794, 938, 4093, 5341, 5671, 5672,
+ 3974, 3974, 4250, 4251, 160, 5815, 1615, 5816, 4517, 4518,
+ 4519, 954, 955, 956, 957, 958, 959, 960, 961, 962,
+ 963, 964, 3958, 1616, 4629, 4154, 5845, 4947, 5846, 5854,
+ 5018, 5855, 4588, 4591, 1354, 4594, 1703, 5889, 1354, 4030,
+ 2411, 6007, 1617, 6008, 5407, 5876, 3155, 1604, 4795, 1301,
+ 5743, 938, 1704, 633, 5358, -940, 6038, 1686, 4807, 4630,
+ 1618, 3156, 2808, 5744, 1689, 1687, 5877, 937, 1298, 1619,
+ 1690, 1299, 1300, 5781, 1688, 1620, 1559, 4631, 1728, 1622,
+ 5745, 694, 766, 6039, 1207, 5126, -1319, 1623, 2478, 1686,
+ -1319, 694, 5720, 68, 1624, 1625, 5795, 1687, 5796, 1730,
+ 6046, 1782, 6047, 4259, 1629, 5877, 1688, 1630, 1631, 4618,
+ 634, 986, 6055, 1783, 6056, 767, 2228, 2229, 2230, 2231,
+ 5778, -2523, 1632, 1705, 1686, 1633, -713, 936, 4620, 938,
+ 1634, -1319, 1687, 2443, 4265, 4625, -1319, 1635, 4641, 4266,
+ 6072, 1688, 5627, 1414, 1734, 4645, 4274, 5624, 1636, 954,
+ 955, 956, 957, 958, 959, 960, 961, 962, 963, 964,
+ 1637, 1743, 2232, 2233, 2234, 6074, 1354, 5627, 1784, -1319,
+ 6075, 1690, 5627, 4708, 5753, 6101, 1785, 5627, 6111, 1638,
+ 5627, 4275, 1639, 936, 3752, 4278, 1744, 6134, 5779, 5126,
+ 1006, 635, 4125, 1640, 1641, 3715, 5670, 1735, 6210, 161,
+ 6211, 1822, 1642, 162, 1643, 1228, 4705, 5090, 1646, 3710,
+ -2290, 1786, 1604, 2235, 2236, 1647, 1745, 1648, 1649, 3754,
+ 5746, 1650, 1651, 1974, 1652, 1746, 3017, 4946, 2643, 5096,
+ 5108, 5109, 1689, 1654, 4750, 1655, 1656, 1658, 1659, 4091,
+ 1660, 5797, 5597, 5766, -2292, 1823, 935, 1824, 1661, 986,
+ 937, 1664, 1665, 1668, 636, 768, 1974, 1669, 3711, 1670,
+ 4748, 936, 1671, 1672, 1689, 4888, 3712, 6159, 6160, 1673,
+ 1674, 6161, 4889, 6162, 4890, 1729, 163, 2237, 4947, 1020,
+ 5603, 5780, -2509, -2510, -3560, 4931, 1751, 1777, 5756, 1975,
+ 5609, 1778, 170, 1780, 5762, 5763, 1799, 3155, 1817, 1689,
+ 1976, 1818, 935, 1819, 3719, 1820, 1839, 1840, 1977, 937,
+ 1849, 1852, 3156, 1853, 2012, 1862, 2687, 1874, 1906, 1916,
+ 1918, 3225, 1975, 1787, 937, 1922, 1928, 3714, 1006, 1929,
+ 5782, 1935, 1936, 1976, 1938, 1978, 1940, 1825, 1944, 1690,
+ 2238, 1977, 5144, 693, 1959, 4280, 1960, 1961, 956, 957,
+ 1788, 1963, 960, 3799, 962, 5560, 964, 1972, 1702, 1706,
+ 5798, 1983, 1984, 1987, 3424, 937, 1997, 2003, 1978, 4948,
+ 2013, 1690, 2014, 2024, 937, 937, 937, -713, 4483, 3066,
+ 935, 5777, 174, 175, 2039, 2043, 4318, 1826, 2046, 2058,
+ 5781, 1979, 5408, 693, 2062, 2073, 2068, 2087, 1147, 5409,
+ 795, 637, 780, 693, 2093, 2097, 1690, 795, 795, 2099,
+ 4336, 2101, 2103, 4339, 4340, 3283, 2111, 1020, 2113, 1980,
+ 2115, 2116, 2117, 2119, 1979, 1686, 2120, 3441, 638, 2147,
+ 2155, 2167, 2169, 1687, 1827, 2239, 5793, 2210, 2211, 2212,
+ 4464, 2213, 1688, 2214, 2170, 2215, 3713, 5018, 4632, 2171,
+ 2175, 2176, 1980, 2178, 1703, 2179, 2181, 1148, -3527, 2193,
+ 5524, 5525, 5794, 5527, 5318, 2192, 4386, 2191, 2202, 3823,
+ 1704, 111, 111, 2209, 4842, 4843, 4844, 4845, 4846, 4847,
+ 4848, 4849, 4850, 4851, 4335, 4853, 4854, 4855, 4856, 4857,
+ 4858, 4859, 4860, 4861, 4862, 4949, 2251, 4866, 4867, 694,
+ 2223, 2264, 2240, 2865, 2265, 2277, 780, 2907, 795, 2279,
+ 2910, 780, 780, 2266, 2210, 2211, 5227, 787, 5228, 2282,
+ 5229, 2283, 5230, -940, 1828, 4602, 2922, 2292, 2331, 2335,
+ 5408, 1116, 780, 780, 2346, 2360, 4931, 5409, 2356, 4488,
+ -1319, 1705, 2375, 2379, 2705, 1789, 1829, 2941, 2406, 694,
+ 5996, 2407, 5777, 174, 175, 5799, 5434, 5584, 2434, 694,
+ 2435, -2983, 1706, 2440, 5795, 2441, 5796, -73, 2241, 2447,
+ 2242, 2458, 5296, 5297, 693, 5299, 2243, 1604, 2906, 2463,
+ 5304, 4568, 2466, 5308, 2706, 4954, 5311, 5312, 5778, 2486,
+ 4964, 2485, 2487, 3284, 5320, 2512, 5321, 3426, 5603, 2527,
+ 1689, 2528, 2529, 4950, 2530, 5327, 2532, 5793, 2533, 639,
+ 2534, 3419, 5016, 938, 5019, 1149, 2539, 1150, 3425, 1187,
+ 1187, 2707, 1790, 1686, 5029, -2110, 5718, 640, 1151, 2549,
+ 1791, 1687, 2553, 5794, 2552, 2555, 2244, 2558, 4329, 3285,
+ 1688, 2560, 5040, 1117, 1152, 2559, 2561, 5782, 2568, 2569,
+ 2578, 1118, 2582, 2579, 5045, 937, 5779, 2580, 5919, 2976,
+ 3420, 4595, 937, 2581, 4597, 2583, 1119, 2585, 3421, 2593,
+ 5066, 2586, 2991, 641, 2592, 3450, 1120, 1121, 1122, 2596,
+ 2245, 174, 175, 2597, 111, 109, 1123, 4355, 4356, 2606,
+ 4603, 4357, 2601, 4358, -940, 4359, 2612, 2620, 4134, 111,
+ 642, 2641, 5410, 2615, 2658, 5411, 3427, 1690, 643, 5797,
+ 5678, 2644, 5679, 5680, 5412, 2645, 2646, 3286, 3756, 1877,
+ 2647, 2650, 2659, 4718, 5176, 2660, 2668, 2672, 2676, 3423,
+ 694, 2673, 2675, 1686, 2689, 5795, 4719, 5796, 2688, 2708,
+ 2692, 1687, 4413, 1313, 2693, 936, 4949, 4418, 4419, 5780,
+ 1688, 2709, 4720, 4261, 5935, 2704, 2718, 2727, 4681, 5778,
+ 6215, 2728, 3048, -2534, 4684, 5856, 2719, 1686, 1354, 1354,
+ 2732, 2734, 2246, 2733, 2737, 1687, 2768, 2772, 1765, 2773,
+ 3287, 1367, 4721, 2247, 1688, 954, 955, 956, 957, 958,
+ 959, 960, 961, 962, 963, 964, 3288, 3289, 1689, 2777,
+ 1686, 3290, 3291, 3292, 6136, 2781, 174, 175, 1687, 5185,
+ 5188, 5190, 5192, 2784, 2786, 5195, 5196, 1688, 2787, 2794,
+ 5200, 5291, 1686, 5206, 1124, 1153, 5210, 5779, 2797, 5185,
+ 1687, 2800, 2818, 5221, 5185, 2845, 1125, 2846, 2848, 1688,
+ 5410, 2864, 4264, 5411, 1877, 5303, 4740, 2867, 3422, 2869,
+ 2870, 2710, 5600, 5955, 4950, 2872, 2881, 2882, 5781, 2883,
+ 2889, 4722, 2928, 2886, 935, 2145, 2887, 2897, 2979, 3293,
+ 3009, 2904, 1644, 6043, 2908, 2911, 2920, 2921, 4336, 2923,
+ 5797, 3021, 2924, 2925, 2926, 986, 3033, 2930, 2938, 5183,
+ 2942, 4318, 5739, 2950, 2953, 795, 2956, 5981, 4771, 1974,
+ 2967, 5199, 2957, 1905, 1905, 1690, 2961, 3998, 1689, 5508,
+ 2962, 2971, 2974, 2972, 2978, 2984, 2989, -1456, 3028, 3294,
+ 5780, 2711, 4723, 2239, -1621, 2996, 1662, 3002, 2350, 1720,
+ 1666, 3036, 1878, 3011, 3038, 6223, 1126, 4796, 3012, 5548,
+ 3013, 3014, 1689, 654, 3039, 3041, 4805, 3049, 3071, 3091,
+ 3042, 3045, 4335, 3094, 111, 4797, 3119, 3050, 3095, 4033,
+ 937, 3051, 3096, 3103, 1006, 1975, 4588, 3104, 4591, 3099,
+ 4594, 3107, 4770, 3123, 1127, 1689, 1976, 3426, 3133, 780,
+ 1706, 3715, 3136, 3137, 1977, 4837, 3143, 3160, 1128, 780,
+ 2240, 3419, 3161, 3189, 3192, 3710, 3191, 1689, 3425, 6043,
+ 2012, 3193, 2012, 2012, 3265, 3196, 3197, 3226, 3233, 3237,
+ 3251, 1978, 4865, 3258, -715, 1690, 3266, 4929, 3262, 3269,
+ 6051, 3238, 3275, 5799, 3270, 3276, 3277, 3278, 3280, 5781,
+ 1154, 1155, 1156, 1157, 3281, 3319, 4724, 4725, 3282, 3322,
+ 3420, 3325, 3329, 3334, 3711, 3335, 5591, 3336, 3421, 1690,
+ 3337, 3241, 3712, 1020, 3361, 3365, 2241, 1878, 2242, 3338,
+ 2405, 4988, 3367, 3339, 2243, 5453, 3368, 1979, -715, 5458,
+ 5459, 745, 2400, 3340, 3341, 3342, 3343, 3344, 1879, 5404,
+ 795, 1759, 1690, 4422, 174, 175, 3427, 3155, 3345, 3371,
+ 3719, 3346, 1880, 3347, 1881, 1980, 3348, 766, 3349, 3350,
+ 6204, -1319, 3156, 3351, 1690, -1319, 3381, 6115, 3352, 3423,
+ 3383, 5491, 3353, 3714, 6214, 5782, 2082, 3239, 3354, 2145,
+ 6204, 3355, 3356, 3391, 2244, 5486, 1882, 6214, 4837, 3357,
+ 767, 3358, 3425, 5740, 3386, 3384, 3387, 3385, 787, 1883,
+ 5741, 3395, 3397, 4992, 6051, 3396, -1319, 3404, 3433, 3724,
+ 3725, -1319, 4920, 3726, 3739, 5742, 111, 3740, 3741, 4930,
+ 3747, 3760, -1664, 3792, 2032, 3791, 3779, -715, 2245, 3793,
+ 3780, 3806, 1884, 5409, 5487, 3715, 3807, -2262, 3819, 111,
+ 782, 938, 5488, 3821, -1319, 4726, 4727, 3022, 3820, 3710,
+ 1885, 3831, 3715, 795, 5799, 3835, 3829, 3837, 3838, 3839,
+ 2469, 3842, 795, 1879, 747, 3843, 3710, 3847, 3848, 3855,
+ 4423, 3856, 2468, 3880, 2839, 4817, 3894, 1880, 3903, 1881,
+ 5492, 2807, 3895, 3909, 3910, 4841, 5049, 3901, 3422, 5709,
+ 3930, 3941, 3713, 3935, 3943, -715, 3945, 3946, 3711, 3947,
+ 3963, 3964, 3967, 5490, 3968, 3991, 3712, 4004, 3995, -2013,
+ 4005, 1882, 4036, 4037, 4038, 3711, 4054, 4064, 4058, 4065,
+ 2246, 4066, 5158, 3712, 1883, 4096, 4068, 4102, 1886, 4107,
+ 768, 2247, 2782, 4109, 4114, 1887, -715, 4127, 4115, 4929,
+ 4425, 4190, 5743, 4193, 3719, 1888, 5782, 4199, 4202, 4207,
+ 4194, 4214, 728, 729, 4215, 5744, 4211, 1884, 5201, 1889,
+ 4221, 3719, 4224, 4225, 4226, 4227, 4270, 3714, 4281, 4282,
+ 4292, 4293, 5745, 936, 4304, 1885, 4296, 4306, 938, 4307,
+ 4308, 4321, 4309, 4318, 3714, 4310, 4931, 4311, 3817, 730,
+ -715, 1890, 4312, 745, 1891, 4319, 4322, 4426, 4427, 4428,
+ 4323, 5637, 4326, 4728, 4325, 1604, 4330, 5018, 4344, 3155,
+ 1892, 4345, 4350, 4363, 6183, 4369, 4368, 4429, 4370, 5306,
+ 4389, 744, 5489, 2350, 3156, 4381, 655, 4387, 731, 4408,
+ 4409, 4417, 4386, 111, 5141, 4414, 4462, 4467, -1780, -1785,
+ 4486, 1893, 4491, 795, 4494, 4495, 4837, 4500, 5166, 4510,
+ 4501, 4528, 4515, 1886, 4573, 4581, 4604, 4598, 4599, 4612,
+ 1887, 4623, 745, 780, 4618, 4568, 4666, 4644, 4651, 4678,
+ 1888, 4430, 4679, 4431, 4692, 4699, 4700, 2478, 746, 795,
+ 4696, 4702, 2981, 4711, 1889, 4712, 3713, 4742, 4287, -715,
+ 3981, 4751, 935, 4432, 4753, 4754, 4757, 1228, 4759, 5235,
+ 5243, 4758, 4807, 3713, 2418, 4763, 4776, 41, 5243, 4777,
+ 936, 4433, 5746, 5154, 4790, 6091, 1890, 4811, 4434, 1891,
+ 4806, 4812, 4813, 4818, 4814, 4838, 747, 4815, 4839, 4390,
+ 4840, 4852, 4539, 4435, 4881, 1892, 5410, 4880, 2400, 5411,
+ 4436, 4884, -256, 4885, 4886, 4893, 4895, 4922, 4909, 5197,
+ 5198, 2402, 4923, 4924, 4837, 4437, 4940, -715, 4931, 5211,
+ 4942, 938, 4956, 4955, 4965, 4966, 1893, 4805, 4805, 780,
+ 4967, 4968, 4969, 5234, 4970, 5298, 4972, 4973, 4974, 5314,
+ 4975, 2350, 4976, 4983, 5262, 4986, 4989, 4990, 780, 5324,
+ 5315, 4997, 5005, 5006, 4805, 747, 4932, 5009, 5013, 5015,
+ 5325, 4805, 4671, 732, 5010, 5035, 4837, 5328, 5043, 5329,
+ 5330, 5046, 4438, 5051, -2060, -1319, 5060, 5063, 5073, 5093,
+ 733, 5350, 4439, 5076, 5077, 5095, 748, 5094, 5078, 935,
+ 5079, 5099, 5081, 5080, 2012, 5082, 5089, 5101, 3715, 5112,
+ 937, 4391, 5104, 5366, 5111, 5114, 734, 5136, 4931, 4392,
+ 5120, 5151, 3710, 5140, 5128, 5138, 938, 5255, 5391, 795,
+ 4440, 5139, 5147, 5146, 4393, 5156, 5159, 5264, 5160, 5265,
+ 5269, 158, 5181, 4441, 4394, 4395, 4396, 5257, 5266, 5278,
+ 5276, 5277, 5279, 5271, 4397, 5286, 6219, 735, 5287, 5343,
+ 5288, 5289, 5294, 936, 5392, 5292, 937, 5305, 5243, 5182,
+ 5310, 3711, 4052, 5309, 4933, 5342, 5346, 5928, 5344, 3712,
+ 5367, 5363, 4442, 5365, 5368, 5381, 5382, 5394, 4443, 5395,
+ 5396, 5398, 5400, 5403, 5406, 5401, 5417, 5420, 5433, 5432,
+ 5437, 5443, 5450, 5442, 5451, 5454, 5498, 5507, 5509, 5521,
+ 2012, 5928, 5446, 5449, 5526, 5494, 159, 3719, 5496, 5502,
+ 5528, 5501, 5424, 5517, 5511, 5529, 5518, 5164, 5531, 5544,
+ 5533, 5550, 5551, 5555, 4796, 5431, 5561, 4945, 5566, 5168,
+ 3714, 5578, 4805, 5589, 937, 5592, 4444, 5595, 5598, 5599,
+ 5604, 5441, 5605, 4445, 5441, 5441, 5608, 5611, 936, 5447,
+ 5606, 5622, 5625, 4837, 5629, 5631, 5169, 5641, 5635, 5658,
+ 5659, 5457, 5682, 5693, 5684, 5302, 5493, 1759, 3243, -3650,
+ 5692, -2671, 935, -2670, -2674, 4446, -2684, -2688, 2228, 2229,
+ 2230, 2231, 4398, 5681, 5322, 5694, 5647, 5700, 5701, -372,
+ 4447, 4448, -3645, -3643, 4399, -3647, -3641, -3646, -3644, -3642,
+ 5702, 5651, 5707, 4449, 5710, 5711, 5712, 5928, 5719, 5862,
+ 5863, 5725, 5865, 5866, 5867, 5868, 5721, 5734, 4932, 5735,
+ 5738, 5758, 5759, 5764, 2232, 2233, 2234, 5243, 5770, 4422,
+ 5806, 5809, 5814, 5818, 5819, 5826, 5820, 5821, 5827, 5535,
+ 5828, 5537, 5495, 5831, 5840, 5843, 5844, 5847, 5851, 3713,
+ 5857, 5861, 5864, 5869, 3241, 5872, 3241, 5886, 5497, 5888,
+ 5900, 5906, 5908, 5910, 5912, 5911, 852, 935, 5914, 5917,
+ 5916, 5918, 5932, 5933, 5931, 2235, 2236, 5934, 5961, 4400,
+ 5968, 5539, 4837, 4805, 4837, 5939, 5536, 6216, 795, 4837,
+ 5983, 4805, 6002, 5997, 4401, 6004, 4837, 4837, 853, 6005,
+ 4805, 6012, 6029, 1110, 6015, 5558, 4837, 6018, 6023, 6024,
+ 6031, -2507, 4837, 4805, -2508, 4805, 6032, 6037, 6034, 855,
+ 4536, 6040, 4541, 5567, 6065, 6068, 4933, 6092, 856, 6062,
+ 5975, 6076, 4402, 5978, 6077, 5661, 6083, 749, 6087, 2237,
+ 6090, 5986, 6095, 6137, 5989, 6149, 4403, 6150, 1110, 857,
+ 780, -2060, 6151, 2738, 6158, -166, 6140, 6145, 6153, 6165,
+ 6170, 6174, 5049, 858, 6175, 6176, 5588, 6181, 859, 6182,
+ 6184, 6178, 6179, 6180, 6190, 6191, 6059, 6205, 3860, 3159,
+ 6218, 4095, 5356, 5354, 5355, 3950, 5761, 2739, 4509, 5510,
+ 5812, 860, 5941, 6085, 1333, 2445, 5393, 2044, 4876, 5503,
+ 4474, 641, 2238, 5375, 5587, 5657, 5594, 5722, 5070, 2426,
+ 4405, 3170, 4196, 4111, 2736, 1442, 4683, 2857, 2350, 5654,
+ 2858, 5653, 2859, 5500, 2740, 4979, 4555, 5441, 750, 5557,
+ 5419, 5634, 4762, 4768, 5121, 3026, 5967, 5612, 5639, 780,
+ 6045, 6139, 6099, 4837, 4837, 5871, 5610, 2034, 5295, 3271,
+ 861, 4977, 5808, 5337, 862, 5448, 4982, 5538, 5175, 6119,
+ 6022, 4568, 1110, 6026, 5957, 5946, 5947, 5948, 5949, 4730,
+ 4635, 4246, 863, 4693, 4677, 6028, 864, 865, 5965, 5026,
+ 4284, 780, 5383, 4745, 4747, 4743, 6144, 5243, 752, 753,
+ 6112, 5768, 6113, 5994, 3942, 111, 5243, 2239, 5999, 6001,
+ 5687, 5041, 5669, 5534, 4416, 5532, 4980, 866, 5335, 2148,
+ 2053, 4279, 2616, 3928, 867, 868, 5838, 3926, 5963, 3328,
+ 5691, 2770, 3836, 3151, 3392, 4124, 4611, 4837, 781, 2022,
+ 3794, 1362, 3887, 4837, 1973, 5696, 2021, 5007, 3994, 5391,
+ 2350, 4756, 3844, 3761, 1748, 3763, 2344, 3814, 3811, 4805,
+ 4314, 2403, 4234, 2253, 2199, 5086, 6086, 5944, 2400, 938,
+ 5713, 5717, 6169, 6167, 2240, 1965, 5275, 2667, 2263, 1966,
+ 2664, 2128, 4787, 5952, 5523, 5392, 5148, 5953, 2208, 4338,
+ 2657, 1967, 4303, 3253, 4913, 3990, 5582, 4912, 4302, 1968,
+ 1970, 5414, 5850, 5135, 1558, 5791, 5733, 2678, 5699, 5791,
+ 5405, 5088, 3424, 3997, 3993, 5427, 1385, 4740, 3245, 4736,
+ 1110, 2129, 5441, 2030, 1110, 4918, 763, 3363, 937, 754,
+ 5765, 2810, 4837, 1249, 2016, 4610, 3390, 4800, 5153, 1859,
+ 2241, 4019, 2242, 4786, 4783, 6135, 5805, 1110, 2243, 5623,
+ 1451, 1558, 1905, 5810, 1457, 2780, 1110, 1233, 2518, 3125,
+ 1234, 3126, 3881, 2023, 2130, 3164, 5652, 2400, 1236, 2131,
+ 5436, 2604, 2153, 4615, 6138, 5280, 6171, 4837, 5530, 6217,
+ 2132, 2133, 6221, 3140, 3388, 5640, 5429, 780, 1560, 795,
+ 3445, 3872, 1191, 2863, 3873, 5834, 4837, 780, 3090, 1192,
+ 3874, 936, 3869, 5833, 4343, 2842, 1763, 3866, 2244, 3865,
+ 1146, 2446, 2141, 1742, 2142, 3318, 5849, 2626, 4516, 3840,
+ 4921, 1110, 1110, 1110, 1110, 5012, 3944, 1558, 4569, 1282,
+ 772, 5579, 756, 757, 1110, 1921, 2741, 758, 1540, 2012,
+ 5263, 4608, 5982, 4197, 5791, 5813, 0, 0, 2860, 5515,
+ 0, 0, 2245, 0, 5887, 0, 0, 0, 0, 5899,
+ 0, 5791, 0, 0, 0, 5905, 2742, 2743, 0, 2744,
+ 2745, 2746, 2747, 2748, 0, 2749, 2750, 2751, 2752, 2753,
+ 2754, 2755, 2756, 0, 2757, 2758, 2759, 2760, 795, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5938, 0, 780, 0, 0, 0,
+ 0, 5669, 0, 0, 0, 4386, 4386, 0, 0, 0,
+ 935, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1558, 0, 0, 0, 0, 2134, 0, 0, 0, 0,
+ 0, 5717, 0, 0, 2246, 2135, 0, 0, 0, 5913,
+ 5733, 0, 0, 0, 0, 2247, 2136, 0, 738, 0,
+ 6058, 0, 2137, 795, 0, 0, 0, 6084, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2761, 2762, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2138, 0, 6003, 5791, 2139, 0, 0,
+ 0, 0, 0, 5441, 0, 5441, 5441, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1110, 0, 0, 0, 1558,
+ 0, 0, 0, 5830, 0, 0, 2140, 0, 6098, 0,
+ 1681, 5976, 5977, 5836, 6030, 0, 1683, 0, 0, 0,
+ 0, 0, 0, 5988, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2350,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 795, 0, 0, 0, 0, 0, 5791, 0, 0,
+ 0, 0, 3424, 0, 0, 0, 0, 0, 0, 5441,
+ 5441, 0, 0, 6069, 0, 0, 0, 0, 0, 0,
+ 5441, 0, 0, 0, 0, 0, 0, 0, 0, 1558,
+ 0, 0, 1558, 0, 6082, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5791, 5791,
+ 0, 0, 5940, 0, 6052, 0, 0, 6053, 0, 795,
+ 0, 0, 0, 0, 0, 6222, 0, 0, 0, 0,
+ 0, 0, 0, 5441, 0, 0, 0, 0, 0, 6207,
+ 0, 0, 0, 0, 6209, 0, 5791, 0, 6124, 0,
+ 0, 0, 0, 0, 0, 2350, 0, 0, 0, 1110,
+ 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, 3424, 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, 1558,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1110, 0,
+ 1110, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2350, 0, 0, 0,
+ 795, 0, 0, 0, 0, 795, 937, 0, 0, 0,
+ 2350, 0, 0, 0, 0, 0, 2350, 0, 0, 0,
+ 0, 0, 0, 2350, 0, 0, 1110, 1110, 0, 0,
+ 0, 0, 1110, 0, 0, 0, 1110, 1110, 1110, 0,
+ 0, 0, 0, 0, 0, 0, 1110, 1110, 1558, 0,
+ 0, 0, 1110, 0, 0, 0, 1110, 1110, 1110, 0,
+ 1110, 1110, 1110, 1558, 1558, 0, 0, 0, 0, 0,
+ 1110, 0, 1110, 0, 0, 1110, 1110, 1110, 1110, 0,
+ 1110, 0, 1110, 1110, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1110, 1110, 1110, 1110,
+ 1110, 0, 1110, 1110, 1110, 1110, 1110, 1110, 0, 1110,
+ 1110, 0, 1110, 1110, 0, 1110, 1110, 0, 0, 1110,
+ 1110, 0, 1110, 1110, 0, 1110, 0, 1110, 0, 0,
+ 0, 1110, 1110, 1110, 0, 0, 1110, 1110, 1110, 1110,
+ 0, 1110, 0, 937, 0, 0, 0, 0, 1110, 0,
+ 0, 0, 0, 0, 1110, 1110, 1110, 1110, 0, 0,
+ 0, 0, 0, 0, 0, 1110, 1110, 0, 1110, 1110,
+ 0, 0, 1110, 1110, 1110, 1110, 1110, 1110, 1110, 1110,
+ 1110, 1110, 1110, 1110, 1110, 0, 0, 1110, 0, 0,
+ 0, 0, 1558, 0, 0, 0, 0, 0, 0, 1558,
+ 0, 0, 0, 0, 0, 0, -1062, -1062, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4422, 174,
+ 175, 0, 1110, 0, 0, 0, -1868, -1868, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -1868, 0,
+ 1558, 0, 0, 0, 0, 0, 4529, 0, 4530, 4531,
+ 0, 0, 0, 0, 2012, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4532, 0, 4533, 2157, 0, 0, 0, 0, 4534, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2032,
+ 0, -1868, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4535, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3817, 0, 937, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1110, -1868,
+ 1110, 0, 0, -1868, 0, 4423, 0, -1868, 4422, 174,
+ 175, 0, 0, 0, 0, 0, -1868, -1868, 0, 0,
+ 0, 0, 0, -1868, 1558, 0, 0, -1868, 0, 0,
+ 0, 0, -1868, 4536, -1868, 1110, 0, 0, -1868, 0,
+ 0, 0, 0, 0, 0, 0, -1868, 0, -1868, 0,
+ 0, 0, 0, -1868, 0, 0, 0, 0, 0, 0,
+ 0, -904, 0, -904, 4537, 0, 4538, 0, 0, 0,
+ 0, 0, 0, -1868, 0, 4425, 0, 4539, 0, 0,
+ 0, 937, 0, -1868, 0, 0, -1868, 0, 0, 2032,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4540, 0, 0, 0, 0, 0, -1868, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1110, 0, 0, 0, 0, -1868, 1558, 0, 1558, -1868,
+ 0, 0, 4426, 4427, 4428, 4423, 0, 0, -1868, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1110, 0,
+ 0, 0, 4429, 0, 0, 0, 0, -1868, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -1868, 0, 0, 0, 0, 0, -1868, -1868,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -1868, 0, -1868, 0, 0, 0, 4541, 0,
+ 0, 0, 0, 0, 0, 4425, 4430, 0, 4431, 0,
+ 0, 0, 4420, 0, 4421, 0, 0, 0, 0, 4422,
+ 174, 175, 0, 0, 0, 0, 0, 0, 4432, 0,
+ 0, 0, 0, 0, 0, 4542, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4433, 0, 0, 0,
+ 0, 0, 0, 4434, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4426, 4427, 4428, 0, 0, 0, 4435, 0,
+ 0, 0, -904, 1110, -904, 4436, 0, 0, 0, 4543,
+ 4544, 0, 4429, 0, 0, 0, 4545, 0, 0, 0,
+ 4437, 0, 0, 0, 0, 0, 0, 0, 4546, 0,
+ 2032, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1558, 1110, 0, 0, 4547,
+ 0, 0, 0, 0, 1110, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4430, 0, 4431, -1868,
+ 0, 0, 0, 4548, 0, 0, 4423, 4438, 0, 0,
+ 0, 0, 0, 0, 0, 0, -904, 4439, 4432, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4424, 0,
+ 0, 0, 0, 0, 0, 0, 4433, 0, 1110, 0,
+ 0, 0, 0, 4434, 0, 0, 0, 0, 0, 1558,
+ 1558, 0, 0, 0, 0, 4440, 0, 0, 4435, 0,
+ 0, 0, 0, 0, 0, 4436, 0, 0, 4441, 0,
+ 4549, 0, 0, 0, 0, 0, 4425, 0, 0, 0,
+ 4437, 0, 1110, 1110, 1110, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4442, 0, 0,
+ 0, 0, 0, 4443, 0, 0, 0, -1868, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -1868, -1868, 0,
+ 0, 1558, 0, 4426, 4427, 4428, 0, 4438, 4550, -1868,
+ 0, 1110, 0, 0, 1558, 0, 0, 4439, 0, 4551,
+ 4552, 4553, 0, 4429, 0, 0, 0, 0, 0, 1110,
+ 0, 0, 0, 1110, 1110, 0, 1110, 1110, 0, 0,
+ 0, 4444, 0, 0, 2157, 1110, 0, 1110, 4445, 0,
+ 0, 0, 0, 0, 0, 4440, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4441, 0,
+ 0, 0, -1868, 0, 0, 0, 0, 4430, 1110, 4431,
+ 4446, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4447, 4448, -904, 0, 4432,
+ 0, 0, 0, 0, 1110, 0, 0, 4442, 4449, 0,
+ -1868, 0, 4554, 4443, -1868, 0, 1110, 4433, -1868, 0,
+ 1558, 0, 0, 0, 4434, 0, 0, -1868, -1868, 1110,
+ 0, 0, 0, 0, 0, 0, 0, 0, -1868, 4435,
+ 1110, 0, 0, -1868, 0, -1868, 4436, 0, 0, -1868,
+ 0, 0, 0, 0, 937, 0, 1110, -1868, 0, -1868,
+ -1868, 4437, 0, 0, -1868, 0, 0, 0, 0, 0,
+ 2145, 4444, 0, 2158, 0, 0, -1062, 0, 4445, 0,
+ 0, 0, 0, 0, -1868, 0, 0, 0, 0, 0,
+ -1868, 0, -1868, 1110, -1868, -1868, -1868, -1868, 0, 0,
+ 1110, 0, 0, 0, 0, 0, 0, 1558, 0, 0,
+ 4446, 0, 0, 0, 0, 0, 0, -1868, 4438, 0,
+ 0, 0, 0, 0, 0, 4447, 4448, 0, 4439, 0,
+ 0, 0, 0, 0, 0, 0, -1868, 0, 4449, 0,
+ -1868, 0, 0, 0, 0, 1558, 1558, 0, 0, -1868,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4440, 0, -1868, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4441,
+ 0, 0, 0, -1868, 0, 0, 0, 0, 0, 0,
+ -1868, 0, 0, 0, 0, 0, 1110, 0, 0, 0,
+ 0, 0, 4871, -1868, 0, -1868, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4442, 0,
+ 0, 0, 0, 0, 4443, 0, 0, 0, 0, 1110,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1558, 0, 1558, 1558, 1558, 0, 1110, 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, 4444, 0, 0, 0, 0, 1110, 0, 4445,
+ 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, 4446, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4447, 4448, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4449,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1558, 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, 1110, 0,
+ 0, 0, 1110, 0, 0, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1110, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1110, 0, 1110, 1110, 0, 1110, 1110,
+ 1110, 1110, 0, 1110, 0, 1110, 1110, 0, 1110, 0,
+ 0, 0, 0, 0, 0, 0, 1110, 1110, -1868, 0,
+ 0, 1110, 1110, 1110, 0, 0, 0, 0, 0, 0,
+ 0, 1110, 1110, 1110, 0, 1110, 0, 1110, 0, 1110,
+ 0, 1110, 0, 1110, 0, 0, 0, 0, 1110, 1110,
+ 0, 1110, 1110, 1110, 0, 0, 0, 1110, 0, 0,
+ 1110, 0, 0, 0, 0, 0, 0, 0, 0, 1110,
+ 0, 0, 1110, 0, 1110, 1110, 1110, 0, 0, 1110,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1110, 1, 1110, 2, 0, 1110, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1110, 1110, 1110, 1110,
+ 1558, 1110, 0, 0, 0, 0, 1110, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1111, 0, 1558, 0, 0,
+ 0, 0, 0, 0, 0, 3, 4, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5, 0, 6, 0, 7, 0, 8,
+ 0, 0, 0, 0, 1110, 0, 0, 9, 0, 0,
+ 1111, 0, 0, 0, 0, 0, 1110, 0, 0, 0,
+ 0, -1868, 0, 1110, 0, 0, 0, 0, 10, 0,
+ 11, 12, 174, 175, 2158, 0, 0, 13, 0, 1558,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1868, 0, -1868, 14, 0, -1868, -1868, 15, 0,
+ 1194, 0, 1195, 0, 0, 0, 0, 0, 16, 0,
+ 661, 0, 1110, 0, 0, 0, 0, 17, 0, 0,
+ 0, 0, 0, 0, 1163, 0, 0, 0, 18, 0,
+ 0, 0, 1196, 1197, 1110, 0, 0, 0, 19, 0,
+ 20, 0, 1198, 0, 21, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 11, 12, 0, 0,
+ 0, 0, 0, 0, 1111, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 23, 24, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 26, 0, 0, 1199, 0,
+ 0, 0, 0, 1110, 0, 0, 27, 28, 29, 0,
+ 30, 0, 1200, 0, 0, 31, 0, 0, 0, 0,
+ 0, 32, 0, 0, 1110, 33, 34, 35, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1558, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 36, 0, 37, 0, 38, 0, 1201, 0, 0,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 1202,
+ 40, 41, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 42, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1111, 0, 0, 0, 1111, 43, 44, 0,
+ 45, 0, 0, 0, 0, 0, 0, 46, 0, 0,
+ 0, 0, 0, 0, 1203, 47, 0, 0, 0, 1111,
+ 0, 0, 1558, 0, 0, 0, 0, 0, 1111, 0,
+ 0, 0, 0, 0, 1110, 48, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1204, 0, 49,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
+ 0, 0, 0, 0, 0, 0, 0, 1205, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1206, 0, 51, 1110,
+ 0, 0, 0, 1111, 1111, 1111, 1111, 0, 0, 1207,
+ 0, 1110, 0, 52, 1110, 0, 1111, 0, 0, 0,
+ 1208, 0, 0, 0, 53, 0, 0, 54, 0, 0,
+ 55, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1209, 0, 56, 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, -2262, 1210, 0, 0, 1211, 0, 1212, 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, 1213, 1214, 0, 0, 0,
+ 0, 1215, 1216, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1217, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1218,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 57,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1219, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 58, 0,
+ 0, 0, 59, 0, 0, 0, 0, 1111, 0, 0,
+ 0, 0, 60, 0, 0, 0, 0, 0, 0, 0,
+ 61, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 62, 0, 0, 1220, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1221, 0, 0, 63, 0, 0, 64, 0, 0, 1222,
+ 0, 0, 1223, 1224, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1225, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 66, 1110,
+ 1110, 0, 0, 0, 1110, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1558, 1226, 0, 0, 0, 0, 0,
+ 0, 0, 1227, 0, 67, 0, 1110, 0, 1110, 0,
+ 1110, 0, 1110, 0, 0, 0, 0, 0, 0, 0,
+ 0, -3286, 0, 1228, 0, 0, 68, 1110, 0, 0,
+ 0, 0, 0, 1558, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1110, 1110, 0, 0,
+ 0, 1110, 0, 1110, 0, 1110, 0, 0, 0, 0,
+ 1110, 1111, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -3286, 0, 0, 0, 0, 0, 0,
+ 1229, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1558, 0, 0, 0, 0, 0, 1110, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1110, 0, 0, 0, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1111, 0, 1111, 1110, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1558, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1111, 1111,
+ 0, 0, 0, 0, 1111, 0, 0, 0, 1111, 1111,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 1111, 1111,
+ 0, 0, 0, 0, 1111, 0, 0, 0, 1111, 1111,
+ 1111, 0, 1111, 1111, 1111, 1110, 0, 0, 0, 0,
+ 0, 0, 1111, 0, 1111, 1110, 0, 1111, 1111, 1111,
+ 1111, 0, 1111, 0, 1111, 1111, 0, 0, 0, 1110,
+ 0, 1558, 1110, 0, 0, 0, 0, 0, 1111, 1111,
+ 1111, 1111, 1111, 0, 1111, 1111, 1111, 1111, 1111, 1111,
+ 0, 1111, 1111, 0, 1111, 1111, 0, 1111, 1111, 0,
+ 0, 1111, 1111, 0, 1111, 1111, 0, 1111, 0, 1111,
+ 0, 0, 0, 1111, 1111, 1111, 0, 0, 1111, 1111,
+ 1111, 1111, 0, 1111, 0, 0, 0, 0, 0, 0,
+ 1111, 0, 0, 0, 0, 0, 1111, 1111, 1111, 1111,
+ 0, 0, 0, 0, 0, 0, 0, 1111, 1111, 0,
+ 1111, 1111, 0, 0, 1111, 1111, 1111, 1111, 1111, 1111,
+ 1111, 1111, 1111, 1111, 1111, 1111, 1111, 0, 0, 1111,
+ 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, 1111, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1110, 1110, 1, 1110, 0, 0, 0, 0, 0, 0,
+ 1111, 0, 1111, 0, 0, 0, 1110, 1110, 1110, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1110, 1110, 0, 0, 0, 3, 4, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5, 1110, 6, 0, 7, 0, 8,
+ 0, 0, 0, 0, 0, 0, 1110, 9, 0, 0,
+ 0, 0, 0, 0, 0, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10, 0,
+ 11, 12, 0, 0, 0, 1110, 0, 13, 0, 0,
+ 1110, 1110, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 14, 0, 0, 0, 15, 1110,
+ 0, 0, 1111, 1110, 0, 0, 0, 0, 16, 0,
+ 0, 0, 0, 0, 0, 0, 0, 17, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 18, 0,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 20, 0, 0, 0, 21, 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, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 23, 24, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 26, 0, 0, 0, 0,
+ 0, 0, 0, 4422, 174, 175, 27, 28, 29, 0,
+ 30, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 32, 0, 0, 0, 33, 34, 35, 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, 1111, -904, 0, -904, 0,
+ 0, 36, 0, 37, 0, 38, 0, 0, 0, 0,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
+ 40, 41, 0, 0, 2032, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 42, 0, 0, 1111, 0,
+ 0, 0, 0, 0, 1110, 1110, 1111, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 43, 44, 0,
+ 45, 0, 0, 0, 0, 0, 0, 46, 0, 0,
+ 4423, 0, 0, 0, 0, 47, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1112, 0, 0, 0, 0, 48, 0, 0, 0, 0,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
+ 4425, 0, 0, 0, 1111, 1111, 1111, 0, 51, 4130,
+ 4131, 0, 0, 0, 4132, 4133, 0, 0, 0, 0,
+ 0, 0, 0, 52, 4134, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1110, 53, 0, 1558, 54, 0, 0,
+ 55, 0, 0, 0, 0, 0, 0, 0, 0, 4135,
+ 0, 0, 0, 0, 0, 56, 0, 4426, 4427, 4428,
+ 0, 0, 4136, 1111, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4429, 4137, 0,
+ 5945, 1111, 0, 0, 0, 1111, 1111, 1110, 1111, 1111,
+ 0, 0, 0, 0, 0, 0, 0, 1111, 0, 1111,
+ 0, 0, 0, 0, 0, 0, 1558, 0, 4139, 1112,
+ 0, 0, 0, 0, 1110, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4140, 4141, 4142,
+ 1111, 4430, 0, 4431, 0, 0, 0, 4143, 4144, 4145,
+ 0, 0, 0, 0, 0, 0, 0, 1110, 0, 0,
+ 0, -904, 0, 4432, 0, 4146, 1111, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1111, 57,
+ 0, 4433, 0, 0, 0, 0, 0, 0, 4434, 0,
+ 0, 1111, 0, 0, 0, 0, 0, 4147, 0, 0,
+ 0, 0, 1111, 4435, 0, 0, 0, 0, 58, 0,
+ 4436, 0, 59, 0, 0, 0, 0, 0, 1111, 0,
+ 0, 0, 60, 0, 4149, 4437, 0, 0, 0, 0,
+ 61, 0, 0, 0, 0, 0, 1110, 0, 1110, 0,
+ 0, 0, 62, 0, 0, 0, 0, 4150, 4151, 4152,
+ 0, 0, 0, 0, 0, 1111, 0, 0, 0, 0,
+ 0, 0, 1111, 63, 0, 0, 64, 1112, 0, 4153,
+ 4154, 1112, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4438, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4439, 0, 1112, 0, 0, 0, 0, 65,
+ 0, 0, 0, 1112, 0, 0, 0, 0, 66, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4155, 0, 4156,
+ 4157, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4440, 0, 0, 0, 67, 0, 4158, 0, 0, 0,
+ 0, 0, 0, 4441, 0, 0, 0, 0, 0, 1110,
+ 0, 0, 0, 0, 0, 0, 68, 0, 1111, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1112, 1112,
+ 1112, 1112, 4159, 4160, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 4442, 0, 0, 0, 0, 0, 4443, 0,
+ 0, 1111, 0, 0, 0, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 4162, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4444, 0, 0, 1111,
+ 0, 0, 0, 4445, 0, 0, 0, 0, 1110, 4163,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1110, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4446, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4447, 4448, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4449, 0, 0, 0, 0, 0, 0,
+ 0, 4164, 4165, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4166, 4167, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4168,
+ 1111, 0, 0, 0, 1111, 0, 0, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1111, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1111, 0, 1111, 1111, 0,
+ 1111, 1111, 1111, 1111, 0, 1111, 0, 1111, 1111, 0,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 1111, 1111,
+ 0, 0, 0, 1111, 1111, 1111, 0, 0, 0, 0,
+ 0, 0, 0, 1111, 1111, 1111, 0, 1111, 0, 1111,
+ 0, 1111, 0, 1111, 0, 1111, 0, 0, 0, 0,
+ 1111, 1111, 0, 1111, 1111, 1111, 0, 0, 0, 1111,
+ 0, 0, 1111, 4170, 0, 0, 4171, 0, 0, 4172,
+ 0, 1111, 0, 0, 1111, 0, 1111, 1111, 1111, 0,
+ 0, 1111, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4174, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1111, 0, 1111, 0, 0, 1111, 0,
+ 0, 0, 4175, 0, 0, 0, 0, 0, 1111, 1111,
+ 1111, 1111, 0, 1111, 0, 0, 1112, 0, 1111, 0,
+ 1110, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1110, 0, 0, 0, 0, 0,
+ 0, 0, 1558, 0, 0, 0, 0, 0, 1110, 0,
+ 0, 0, 0, 0, 0, 0, 1111, 0, 0, 0,
+ 0, 0, 0, 1110, 0, 0, 0, 0, 1111, 0,
+ 0, 0, 0, 0, 0, 1111, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 1112, 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, 1111, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 1112, 0, 0, 0, 0, 1112,
+ 0, 0, 0, 1112, 1112, 1112, 1111, 0, 0, 0,
+ 0, 0, 0, 1112, 1112, 0, 0, 0, 0, 1112,
+ 0, 0, 0, 1112, 1112, 1112, 0, 1112, 1112, 1112,
+ 0, 0, 0, 0, 0, 0, 0, 1112, 0, 1112,
+ 0, 0, 1112, 1112, 1112, 1112, 0, 1112, 0, 1112,
+ 1112, 1110, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 1112, 1112, 1112, 1112, 0, 1112,
+ 1112, 1112, 1112, 1112, 1112, 1111, 1112, 1112, 0, 1112,
+ 1112, 0, 1112, 1112, 0, 0, 1112, 1112, 0, 1112,
+ 1112, 0, 1112, 0, 1112, 0, 1111, 0, 1112, 1112,
+ 1112, 0, 0, 1112, 1112, 1112, 1112, 0, 1112, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
+ 0, 1112, 1112, 1112, 1112, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 1112, 0, 1112, 1112, 0, 0, 1112,
+ 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112,
+ 1112, 1112, 0, 0, 1112, 0, 0, 0, 4422, 174,
+ 175, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 933, 0, 0, 0, 0, 0,
+ 0, 1110, 0, 0, 0, 0, 5332, 0, 4530, 1112,
+ 933, 0, 0, 0, 0, 0, 1237, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4532, 0, 0, 0, 0, 0, 0, 0, 5333, 0,
+ 0, 0, 0, 0, 0, 0, 1111, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2032,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5334, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1558, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1111, 0, 0, 0, 4423, 0, 0, 0, 0,
+ 0, 0, 0, 1111, 0, 0, 1111, 0, 0, 0,
+ 0, 0, 1558, 0, 0, 1112, 0, 1112, 0, 0,
+ 0, 0, 0, 4536, 1110, 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, 1112, 0, 0, 0, 4538, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4425, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4540, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1110, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4426, 4427, 4428, 0, 0, 0, 0, 933,
+ 0, 933, 0, 933, 933, 0, 0, 1112, 0, 0,
+ 933, 0, 4429, 933, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1110, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4541, 0,
+ 0, 0, 0, 0, 0, 0, 4430, 0, 4431, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4432, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4433, 0, 0, 0,
+ 0, 0, 0, 4434, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4435, 0,
+ 0, 0, 0, 0, 0, 4436, 0, 0, 0, 4543,
+ 0, 0, 0, 0, 0, 1110, 4545, 0, 0, 1110,
+ 4437, 1111, 1111, 0, 0, 0, 1111, 0, 0, 0,
+ 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1111, 4547,
+ 1111, 0, 1111, 0, 1111, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1111,
+ 0, 0, 0, 1112, 0, 0, 0, 4438, 0, 0,
+ 0, 1112, 1112, 0, 0, 0, 0, 4439, 1111, 1111,
+ 0, 0, 0, 1111, 0, 1111, 0, 1111, 0, 0,
+ 0, 0, 1111, 0, 933, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4440, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 4441, 0,
+ 4549, 0, 0, 0, 0, 0, 1110, 0, 0, 1111,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1111, 0, 0, 0, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4442, 0, 1112,
+ 1112, 1112, 0, 4443, 0, 1111, 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, 1897, 0, 0, 0, 0, 0, 0, 1112, 0,
+ 0, 4444, 0, 0, 0, 0, 0, 0, 4445, 0,
+ 0, 0, 0, 0, 0, 0, 1112, 0, 0, 0,
+ 1112, 1112, 0, 1112, 1112, 0, 0, 1111, 0, 0,
+ 0, 0, 1112, 0, 1112, 0, 0, 1111, 0, 0,
+ 4446, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1111, 0, 0, 1111, 4447, 4448, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 4449, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1112, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1112, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 933, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1112, 0, 0, 0, 0, 0, 0, 1112, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1111, 1111, 0, 1111, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1076, 1111, 1111,
+ 1111, 0, 0, 0, 0, 0, 1112, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1111, 1111, 0, 1112, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1111, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1111, 0,
+ 0, 0, 0, 0, 1112, 0, 0, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1111, 0, 0,
+ 0, 0, 1111, 1111, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1111, 0, 0, 0, 1111, 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, 1439, 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, 1112, 0, 0, 0, 1112,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1112, 0, 1112, 1112, 0, 1112, 1112, 1112, 1112, 0,
+ 1112, 0, 1112, 1112, 0, 1112, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 1112, 0, 0, 0, 1112, 1112,
+ 1112, 0, 0, 0, 0, 0, 0, 0, 1112, 1112,
+ 1112, 0, 1112, 0, 1112, 0, 1112, 0, 1112, 0,
+ 1112, 0, 0, 0, 0, 1112, 1112, 0, 1112, 1112,
+ 1112, 0, 0, 0, 1112, 0, 0, 1112, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1112, 0, 0, 1112,
+ 0, 1112, 1112, 1112, 0, 0, 1112, 0, 1569, 0,
+ 0, 0, 0, 0, 0, 0, 1111, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1112, 0,
+ 1112, 1595, 0, 1112, 0, 0, 0, 0, 0, 0,
+ 1609, 0, 0, 1112, 1112, 1112, 1112, 0, 1112, 0,
+ 0, 0, 0, 1112, 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, 1112, 0, 0, 0, 0, 0, 0, 1682, 0,
+ 0, 0, 0, 1112, 0, 0, 0, 0, 0, 1,
+ 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1111, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3, 4, 0, 0, 0, 0, 0, 1112,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 0, 0, 0, 7, 0, 8, 0, 933, 0,
+ 0, 1112, 0, 0, 9, 0, 0, 0, 0, 1111,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 10, 0, 11, 12, 0,
+ 0, 0, 0, 0, 13, 0, 1111, 1111, 933, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 15, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1111,
+ 1112, 0, 0, 933, 17, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 18, 2822, 0, 0, 0,
+ 0, 1112, 0, 0, 0, 19, 0, 20, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1875,
+ 933, 933, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 23, 24, 0, 0, 0, 0, 0, 0, 1111, 0,
+ 1111, 25, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 27, 28, 0, 0, 30, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 32, 0,
+ 0, 0, 33, 34, 35, 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, 36, 0,
+ 37, 1112, 38, 0, 0, 0, 0, 0, 0, 39,
+ 0, 0, 0, 0, 0, 0, 0, 0, 41, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 42, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1111, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 43, 0, 1112, 45, 0, 0,
+ 0, 0, 0, 2066, 46, 0, 0, 0, 1112, 0,
+ 0, 1112, 47, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1111, 0, 0,
+ 0, 0, 48, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 49, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 50, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2151, 0, 2151, 51, 0, 0, 0, 0,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 3058, 0, 0, 0, 0, 1111, 1111, 0, 0,
+ 0, 53, 0, 0, 54, 0, 0, 55, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 56, 0, 0, 0, 2198, 0, 0, 0,
+ 2203, 0, 2205, 0, 0, 0, 0, 0, 0, 0,
+ 2220, 2221, 0, 0, 0, 0, 2250, 0, 0, 0,
+ 2255, 2256, 2257, 0, 2259, 2260, 2261, 0, 0, 0,
+ 0, 0, 0, 0, 2269, 0, 2272, 0, 0, 2273,
+ 2274, 2275, 2276, 0, 0, 0, 2280, 2281, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 933, 0,
+ 2293, 2294, 2301, 2305, 2306, 0, 2309, 2310, 2311, 2314,
+ 2315, 0, 0, 2318, 2319, 0, 2325, 2326, 0, 2329,
+ 2330, 0, 0, 0, 2334, 0, 2336, 2337, 0, 2339,
+ 0, 2340, 0, 1897, 0, 2343, 2301, 2345, 0, 0,
+ 2351, 0, 2353, 2354, 0, 2355, 57, 0, 0, 0,
+ 0, 0, 2359, 0, 0, 0, 0, 0, 2361, 2362,
+ 2363, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 58, 0, 0, 0, 59,
+ 0, 0, 0, 0, 0, 0, 1112, 1112, 0, 60,
+ 0, 1112, 0, 0, 0, 0, 0, 61, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
+ 0, 0, 0, 1112, 0, 1112, 0, 1112, 0, 1112,
+ 0, 0, 0, 0, 0, 0, 2459, 0, 0, 0,
+ 63, 0, 0, 64, 1112, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 1112, 0, 0, 0, 1112, 0,
+ 1112, 0, 1112, 0, 0, 0, 65, 1112, 0, 0,
+ 0, 0, 1111, 0, 0, 66, 0, 0, 0, 0,
+ 0, 933, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1111, 0, 0, 0,
+ 0, 67, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1111, 0, 0, 0, 1112, 0, 0, 0, 0, 0,
+ 0, 0, 0, 68, 0, 1111, 0, 0, 1112, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0,
+ 933, 0, 2570, 0, 2575, 0, 0, 0, 0, 0,
+ 1112, 0, 0, 0, 0, 933, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2598,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3418, 933, 0, 0, 0,
+ 0, 0, 0, 0, 0, 933, 933, 933, 0, 0,
+ 3058, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3708, 0, 0, 0, 3708, 0, 0, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1111, 0, 0, 1112, 0, 0, 1112,
+ 0, 0, 0, 0, 2674, 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, 2698, 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, 0,
+ 0, 0, 0, 1111, 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, 2811, 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,
+ 2866, 0, 0, 0, 0, 0, 0, 0, 2873, 2874,
+ 1111, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 933, 0, 0, 0,
+ 0, 0, 0, 933, 0, 0, 0, 1112, 1112, 0,
+ 1112, 0, 0, 0, 1111, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 1112, 1112, 1111, 0, 0, 0,
+ 0, 0, 2893, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1112, 1112, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 0, 0, 0, 0, 2932, 2934, 2936, 0,
+ 0, 0, 0, 1112, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1111, 0, 1112, 0, 0, 0, 0, 1112, 1112, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1112, 0, 0, 0,
+ 1112, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2998, 0, 0, 0, 1111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3006,
+ 0, 3007, 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, 3032, 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, 3046, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3085, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3085, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3106, 0, 0, 0, 0, 3708,
+ 0, 0, 0, 0, 0, 0, 0, 1111, 0, 0,
+ 3112, 1111, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 933, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3132, 0, 0,
+ 0, 0, 0, 0, 2575, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 1112, 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, 1111, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3222, 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, 3247, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1112, 0, 3247, 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, 3331, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1112, 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, 1112, 1112, 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, 1112, 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, 3446, 0, 0, 0, 3448, 0, 0, 3449,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1112, 0, 1112, 0, 3727, 0, 0,
+ 0, 0, 3731, 3732, 3733, 3734, 0, 3735, 0, 3736,
+ 3737, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3742, 3743, 0, 0, 0, 3744, 3745, 3746, 0, 0,
+ 0, 0, 0, 0, 0, 3748, 3749, 3750, 0, 3751,
+ 0, 3753, 0, 3755, 0, 3757, 0, 3759, 0, 0,
+ 0, 0, 2311, 3762, 0, 2311, 0, 3765, 0, 0,
+ 0, 3766, 0, 0, 3767, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3774, 0, 3775, 3776,
+ 3777, 0, 0, 3778, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1112, 0, 0, 0,
+ 3800, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3810, 3813, 0, 0, 3818, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4460, 4460, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 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, 3851, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 3085, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 1112, 0, 0, 0, 0, 0, 4460, 0,
+ 0, 0, 0, 0, 0, 0, 2575, 0, 0, 0,
+ 0, 933, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2575, 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, 933, 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, 3986, 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, 933, 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, 3708, 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, 4110, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1112, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
+ 0, 0, 0, 4195, 0, 0, 0, 0, 0, 0,
+ 1112, 0, 0, 0, 0, 4200, 0, 0, 4201, 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, 4460, 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, 1112, 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, 4460, 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, 1112, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4229, 4230, 0, 0, 0, 4235, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3418, 0, 0, 0, 0, 0, 0,
+ 4255, 0, 4256, 0, 4257, 0, 4258, 0, 0, 933,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4273, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1112, 0, 0, 0, 0,
+ 4294, 4295, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3247, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1112,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1112, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3085, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3085, 0, 0, 0, 3085,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2575, 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, 1112, 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, 4460, 0,
+ 4460, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1112, 0, 0, 0, 0, 0, 0, 4485,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3247,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3247, 0, 0, 4499, 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, 4460, 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, 1112, 0, 0, 0, 1112, 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, 3418, 0, 0, 0, 3708, 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, 1112, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4706, 4707, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4714, 4715, 4716, 0, 0, 0, 0, 5485, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4738, 4739, 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, 4761,
+ 0, 3708, 0, 0, 0, 0, 0, 933, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3708, 3085,
+ 0, 0, 0, 0, 3085, 3085, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2575, 0, 0, 0, 2575, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 933, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4984, 4985,
+ 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, 933, 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, 4460, 3247, 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, 4460, 3708, 0, 0, 4460, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 933, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3247, 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, 3085, 3085,
+ 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, 2575, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4460, 0, 0, 0, 0,
+ 0, 0, 0, 4460, 0, 0, 0, 0, 0, 4460,
+ 4460, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4460, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4460,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5268, 0, 5270, 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, 4460, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4460,
+ 0, 0, 0, 4460, 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, 4460, 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, 5379,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4460, 6064, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5399,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4460, 0, 0, 0, 0,
+ 0, 0, 3247, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3085, 3085,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4460,
+ 0, 4460, 4460, 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, 4460, 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, 4460, 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, 4460, 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, 933, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3247, 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, 2575, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5636, 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, 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,
+ 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, 5839, 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, 949,
+ 0, 0, 0, 0, 950, 951, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 952, 953, 0, 954, 955,
+ 956, 957, 958, 959, 960, 961, 962, 963, 964, 0,
+ 0, 0, 0, 0, 0, 0, 965, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 966, 967, 968, 969, 0, 5962, 0,
+ 0, 0, 0, 0, 970, 971, 0, 972, 0, 0,
+ 0, 0, 0, 0, 973, 974, 0, 0, 975, 976,
+ 977, 978, 0, 979, 176, 0, 980, 981, 0, 0,
+ 0, 0, 0, 0, 0, 982, 0, 0, 983, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 177, 0, 0, 0, 984, 985, 986, 0,
+ 987, 0, 0, 0, 0, 0, 0, 0, 988, 989,
+ 990, 178, 0, 0, 0, 0, 0, 991, 0, 0,
+ 179, 0, 1682, 0, 0, 0, 992, 0, 0, 993,
+ 0, 0, 0, 0, 0, 0, 0, 0, 994, 0,
+ 995, 0, 996, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 997, 998, 0, 999,
+ 0, 0, 0, 1000, 180, 0, 0, 0, 1001, 0,
+ 0, 181, 1002, 0, 1003, 1004, 1005, 1006, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 1007, 1008, 1009, 0, 1010,
+ 0, 0, 0, 0, 0, 0, 1011, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1012, 0, 0,
+ 0, 0, 0, 0, 0, 1013, 1014, 0, 0, 0,
+ 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1015, 0, 0, 0, 0, 0,
+ 0, 1016, 1017, 0, 1018, 1019, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1020, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1021, 1022, 1023, 0,
+ 0, 39, 0, 0, 1024, 1025, 0, 0, 0, 2575,
+ 41, 0, 0, 0, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 1026, 1027, 1028, 1029, 195, 196, 197,
+ 1030, 199, 200, 201, 202, 203, 204, 1031, 206, 207,
+ 208, 209, 210, 211, 212, 1032, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 1033, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 1034, 243, 1035, 1036, 1037,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 1038, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 1039, 1040, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 2575, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 1041, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 1042, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 1043, 1044, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 1045, 403, 404, 405, 406, 407, 1046, 409,
+ 410, 411, 412, 413, 414, 415, 416, 1047, 1048, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 1049, 441, 442, 443, 444, 445, 446, 447, 1050,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 1051, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 1052, 505, 506, 507, 508,
+ 509, 510, 1053, 512, 513, 514, 515, 516, 517, 1054,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 1055, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 1056,
+ 1057, 1058, 1059, 571, 572, 573, 574, 1060, 1061, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 1062, 590, 1063, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 1064, 604, 1065, 606, 607,
+ 608, 0, 609, 610, 611, 1066, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1067, 1068, 0, 0, 949, 0,
+ 1069, 0, 0, 950, 951, 1070, 0, 0, 0, 1071,
+ 1072, 0, 0, 1073, 952, 953, 0, 954, 955, 956,
+ 957, 958, 959, 960, 961, 962, 963, 964, 0, 0,
+ 0, 0, 0, 0, 0, 965, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 966, 967, 968, 969, 0, 0, 0, 2298,
+ 0, 0, 0, 970, 971, 0, 972, 0, 0, 0,
+ 0, 0, 0, 973, 974, 0, 0, 975, 976, 977,
+ 978, 0, 979, 176, 0, 980, 981, 0, 0, 0,
+ 0, 0, 0, 0, 982, 0, 0, 983, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 177, 0, 0, 0, 984, 985, 986, 0, 987,
+ 0, 0, 0, 0, 0, 0, 0, 988, 989, 990,
+ 178, 0, 0, 0, 0, 0, 991, 0, 0, 179,
+ 0, 0, 0, 0, 0, 992, 0, 0, 993, 0,
+ 0, 0, 0, 0, 0, 0, 0, 994, 2299, 995,
+ 0, 996, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 997, 998, 0, 999, 0,
+ 0, 0, 1000, 180, 0, 0, 0, 1001, 0, 0,
+ 181, 1002, 0, 1003, 1004, 1005, 1006, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 1007, 1008, 1009, 0, 1010, 0,
+ 0, 0, 0, 0, 0, 1011, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1012, 0, 0, 0,
+ 0, 0, 0, 0, 1013, 1014, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1015, 0, 0, 0, 0, 0, 0,
+ 1016, 1017, 0, 1018, 1019, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2300, 0, 1020, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1021, 1022, 1023, 0, 0,
+ 0, 0, 0, 1024, 1025, 0, 0, 0, 0, 0,
+ 0, 0, 0, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 1026, 1027, 1028, 1029, 195, 196, 197, 1030,
+ 199, 200, 201, 202, 203, 204, 1031, 206, 207, 208,
+ 209, 210, 211, 212, 1032, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 1033, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 1034, 243, 1035, 1036, 1037, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 1038, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 1039, 1040, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 1041, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 1042, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 1043, 1044, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 1045, 403, 404, 405, 406, 407, 1046, 409, 410,
+ 411, 412, 413, 414, 415, 416, 1047, 1048, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 1049, 441, 442, 443, 444, 445, 446, 447, 1050, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 1051, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 1052, 505, 506, 507, 508, 509,
+ 510, 1053, 512, 513, 514, 515, 516, 517, 1054, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 1055,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 1056, 1057,
+ 1058, 1059, 571, 572, 573, 574, 1060, 1061, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 1062, 590, 1063, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 1064, 604, 1065, 606, 607, 608,
+ 0, 609, 610, 611, 1066, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1067, 1068, 0, 0, 949, 0, 1069,
+ 0, 0, 950, 951, 1070, 0, 0, 0, 1071, 1072,
+ 0, 0, 1073, 952, 953, 0, 954, 955, 956, 957,
+ 958, 959, 960, 961, 962, 963, 964, 0, 0, 0,
+ 0, 0, 0, 0, 965, 0, 0, 0, 0, 0,
+ 0, 3081, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3082, 967, 968, 969, 0, 0, 0, 0, 0,
+ 0, 0, 970, 971, 0, 972, 0, 0, 0, 0,
+ 0, 0, 973, 974, 0, 0, 975, 976, 977, 978,
+ 0, 979, 176, 0, 980, 981, 0, 0, 0, 0,
+ 0, 0, 0, 3083, 0, 0, 983, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 177, 0, 0, 0, 984, 985, 986, 0, 987, 0,
+ 0, 0, 0, 0, 0, 0, 988, 989, 990, 178,
+ 0, 0, 0, 0, 0, 991, 0, 0, 179, 0,
+ 0, 0, 0, 0, 992, 0, 0, 993, 0, 0,
+ 0, 0, 0, 0, 0, 0, 994, 0, 995, 0,
+ 996, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 997, 998, 0, 999, 0, 0,
+ 0, 1000, 180, 0, 0, 0, 1001, 0, 0, 181,
+ 1002, 0, 1003, 1004, 1005, 1006, 0, 3084, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 1007, 1008, 1009, 0, 1010, 0, 0,
+ 0, 0, 0, 0, 1011, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1012, 0, 0, 0, 0,
+ 0, 0, 0, 1013, 1014, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1015, 0, 0, 0, 0, 0, 0, 1016,
+ 1017, 0, 1018, 1019, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1020, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1021, 1022, 1023, 0, 0, 0,
+ 0, 0, 1024, 1025, 0, 0, 0, 0, 0, 0,
+ 0, 0, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 1026, 1027, 1028, 1029, 195, 196, 197, 1030, 199,
+ 200, 201, 202, 203, 204, 1031, 206, 207, 208, 209,
+ 210, 211, 212, 1032, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 1033, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 1034, 243, 1035, 1036, 1037, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 1038, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 1039, 1040, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 1041, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 1042, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 1043, 1044, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 1045, 403, 404, 405, 406, 407, 1046, 409, 410, 411,
+ 412, 413, 414, 415, 416, 1047, 1048, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 1049,
+ 441, 442, 443, 444, 445, 446, 447, 1050, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 1051,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 1052, 505, 506, 507, 508, 509, 510,
+ 1053, 512, 513, 514, 515, 516, 517, 1054, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 1055, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 1056, 1057, 1058,
+ 1059, 571, 572, 573, 574, 1060, 1061, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 1062,
+ 590, 1063, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 1064, 604, 1065, 606, 607, 608, 0,
+ 609, 610, 611, 1066, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1067, 1068, 0, 0, 949, 0, 1069, 0,
+ 0, 950, 951, 1070, 0, 0, 0, 1071, 1072, 0,
+ 0, 1073, 952, 953, 0, 954, 955, 956, 957, 958,
+ 959, 960, 961, 962, 963, 964, 0, 0, 0, 0,
+ 0, 0, 0, 965, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 966, 967, 968, 969, 0, 0, 0, 0, 0, 0,
+ 0, 970, 971, 0, 972, 0, 0, 0, 0, 0,
+ 0, 973, 974, 0, 0, 975, 976, 977, 978, 0,
+ 979, 176, 0, 980, 981, 0, 0, 0, 0, 0,
+ 0, 0, 982, 0, 0, 983, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 984, 985, 986, 0, 987, 0, 0,
+ 0, 0, 0, 0, 0, 988, 989, 990, 178, 0,
+ 0, 0, 0, 0, 991, 0, 0, 179, 0, 0,
+ 0, 0, 0, 992, 0, 0, 993, 0, 0, 0,
+ 0, 0, 0, 0, 0, 994, 0, 995, 0, 996,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 997, 998, 0, 999, 0, 0, 0,
+ 1000, 180, 0, 0, 0, 1001, 0, 0, 181, 1002,
+ 0, 1003, 1004, 1005, 1006, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 1007, 1008, 1009, 0, 1010, 0, 0, 0,
+ 0, 0, 0, 1011, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1012, 0, 0, 0, 0, 0,
+ 0, 0, 1013, 1014, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1015, 0, 0, 0, 0, 0, 0, 1016, 1017,
+ 0, 1018, 1019, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1020, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1021, 1022, 1023, 0, 0, 0, 0,
+ 0, 1024, 1025, 0, 1568, 0, 0, 0, 0, 0,
+ 0, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 1026, 1027, 1028, 1029, 195, 196, 197, 1030, 199, 200,
+ 201, 202, 203, 204, 1031, 206, 207, 208, 209, 210,
+ 211, 212, 1032, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 1033,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 1034, 243, 1035, 1036, 1037, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 1038, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 1039, 1040, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 1041,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 1042, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 1043, 1044, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 1045,
+ 403, 404, 405, 406, 407, 1046, 409, 410, 411, 412,
+ 413, 414, 415, 416, 1047, 1048, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 1049, 441,
+ 442, 443, 444, 445, 446, 447, 1050, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 1051, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 1052, 505, 506, 507, 508, 509, 510, 1053,
+ 512, 513, 514, 515, 516, 517, 1054, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 1055, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 1056, 1057, 1058, 1059,
+ 571, 572, 573, 574, 1060, 1061, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 1062, 590,
+ 1063, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 1064, 604, 1065, 606, 607, 608, 0, 609,
+ 610, 611, 1066, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1067, 1068, 0, 0, 949, 0, 1069, 0, 0,
+ 950, 951, 1070, 0, 0, 0, 1071, 1072, 0, 0,
+ 1073, 952, 953, 0, 954, 955, 956, 957, 958, 959,
+ 960, 961, 962, 963, 964, 0, 0, 0, 0, 0,
+ 0, 0, 965, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 966,
+ 967, 968, 969, 0, 0, 0, 0, 0, 0, 0,
+ 970, 971, 0, 972, 0, 0, 0, 0, 0, 0,
+ 973, 974, 0, 0, 975, 976, 977, 978, 0, 979,
+ 176, 0, 980, 981, 0, 0, 0, 0, 0, 0,
+ 0, 2572, 0, 0, 983, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
+ 0, 0, 984, 985, 986, 0, 987, 0, 0, 0,
+ 0, 0, 0, 0, 988, 989, 990, 178, 0, 0,
+ 0, 0, 0, 991, 0, 2573, 179, 0, 0, 0,
+ 0, 0, 992, 0, 0, 993, 0, 0, 0, 0,
+ 0, 0, 0, 0, 994, 0, 995, 0, 996, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 997, 998, 0, 999, 0, 0, 0, 1000,
+ 180, 0, 0, 0, 1001, 0, 0, 181, 1002, 0,
+ 1003, 1004, 1005, 1006, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 1007, 1008, 1009, 0, 1010, 0, 0, 0, 0,
+ 0, 0, 1011, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1012, 0, 0, 0, 0, 0, 0,
+ 0, 1013, 1014, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1015, 0, 0, 0, 0, 0, 0, 1016, 1017, 0,
+ 1018, 1019, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1020, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1021, 1022, 1023, 0, 0, 0, 0, 0,
+ 1024, 1025, 0, 0, 0, 0, 0, 0, 0, 0,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 1026,
+ 1027, 1028, 1029, 195, 196, 197, 1030, 199, 200, 201,
+ 202, 203, 204, 1031, 206, 207, 208, 209, 210, 211,
+ 212, 1032, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 1033, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 1034, 243, 1035, 1036, 1037, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 1038, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 1039, 1040, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 1041, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 1042, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 1043, 1044, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 1045, 403,
+ 404, 405, 406, 407, 1046, 409, 410, 411, 412, 413,
+ 414, 415, 416, 1047, 1048, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 1049, 441, 442,
+ 443, 444, 445, 446, 447, 1050, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 1051, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 1052, 505, 506, 507, 508, 509, 510, 1053, 512,
+ 513, 514, 515, 516, 517, 1054, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 1055, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 1056, 1057, 1058, 1059, 571,
+ 572, 573, 574, 1060, 1061, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 1062, 590, 1063,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 1064, 604, 1065, 606, 607, 608, 0, 609, 610,
+ 611, 1066, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1067, 1068, 0, 0, 949, 0, 1069, 0, 0, 950,
+ 951, 1070, 0, 0, 0, 1071, 1072, 0, 0, 1073,
+ 952, 953, 0, 954, 955, 956, 957, 958, 959, 960,
+ 961, 962, 963, 964, 0, 0, 0, 0, 0, 0,
+ 0, 965, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 966, 967,
+ 968, 969, 0, 0, 0, 0, 0, 0, 0, 970,
+ 971, 0, 972, 0, 0, 0, 0, 0, 0, 973,
+ 974, 0, 0, 975, 976, 977, 978, 0, 979, 176,
+ 0, 980, 981, 0, 0, 0, 0, 0, 0, 0,
+ 982, 0, 0, 983, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
+ 0, 984, 985, 986, 0, 987, 0, 0, 0, 2931,
+ 0, 0, 0, 988, 989, 990, 178, 0, 0, 0,
+ 0, 0, 991, 0, 0, 179, 0, 0, 0, 0,
+ 0, 992, 0, 0, 993, 0, 0, 0, 0, 0,
+ 0, 0, 0, 994, 0, 995, 0, 996, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 997, 998, 0, 999, 0, 0, 0, 1000, 180,
+ 0, 0, 0, 1001, 0, 0, 181, 1002, 0, 1003,
+ 1004, 1005, 1006, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 1007, 1008, 1009, 0, 1010, 0, 0, 0, 0, 0,
+ 0, 1011, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1012, 0, 0, 0, 0, 0, 0, 0,
+ 1013, 1014, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1015,
+ 0, 0, 0, 0, 0, 0, 1016, 1017, 0, 1018,
+ 1019, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1020, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1021, 1022, 1023, 0, 0, 0, 0, 0, 1024,
+ 1025, 0, 0, 0, 0, 0, 0, 0, 0, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 1026, 1027,
+ 1028, 1029, 195, 196, 197, 1030, 199, 200, 201, 202,
+ 203, 204, 1031, 206, 207, 208, 209, 210, 211, 212,
+ 1032, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 1033, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 1034, 243, 1035, 1036, 1037, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 1038,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 1039, 1040, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 1041, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 1042,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 1043, 1044, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 1045, 403, 404,
+ 405, 406, 407, 1046, 409, 410, 411, 412, 413, 414,
+ 415, 416, 1047, 1048, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 1049, 441, 442, 443,
+ 444, 445, 446, 447, 1050, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 1051, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 1052, 505, 506, 507, 508, 509, 510, 1053, 512, 513,
+ 514, 515, 516, 517, 1054, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 1055, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 1056, 1057, 1058, 1059, 571, 572,
+ 573, 574, 1060, 1061, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 1062, 590, 1063, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 1064, 604, 1065, 606, 607, 608, 0, 609, 610, 611,
+ 1066, 0, 0, 0, 0, 0, 0, 0, 0, 1067,
+ 1068, 0, 0, 949, 0, 1069, 0, 0, 950, 951,
+ 1070, 0, 0, 0, 1071, 1072, 0, 0, 1073, 952,
+ 953, 0, 954, 955, 956, 957, 958, 959, 960, 961,
+ 962, 963, 964, 0, 0, 0, 0, 0, 0, 0,
+ 965, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 966, 967, 968,
+ 969, 0, 0, 0, 0, 0, 0, 0, 970, 971,
+ 0, 972, 0, 0, 0, 0, 0, 0, 973, 974,
+ 0, 0, 975, 976, 977, 978, 0, 979, 176, 0,
+ 980, 981, 0, 0, 0, 0, 0, 0, 0, 982,
+ 0, 0, 983, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 177, 0, 0, 0,
+ 984, 985, 986, 0, 987, 0, 0, 0, 2933, 0,
+ 0, 0, 988, 989, 990, 178, 0, 0, 0, 0,
+ 0, 991, 0, 0, 179, 0, 0, 0, 0, 0,
+ 992, 0, 0, 993, 0, 0, 0, 0, 0, 0,
+ 0, 0, 994, 0, 995, 0, 996, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 997, 998, 0, 999, 0, 0, 0, 1000, 180, 0,
+ 0, 0, 1001, 0, 0, 181, 1002, 0, 1003, 1004,
+ 1005, 1006, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 1007,
+ 1008, 1009, 0, 1010, 0, 0, 0, 0, 0, 0,
+ 1011, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1012, 0, 0, 0, 0, 0, 0, 0, 1013,
+ 1014, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1015, 0,
+ 0, 0, 0, 0, 0, 1016, 1017, 0, 1018, 1019,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1020, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1021, 1022, 1023, 0, 0, 0, 0, 0, 1024, 1025,
+ 0, 0, 0, 0, 0, 0, 0, 0, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 1026, 1027, 1028,
+ 1029, 195, 196, 197, 1030, 199, 200, 201, 202, 203,
+ 204, 1031, 206, 207, 208, 209, 210, 211, 212, 1032,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 1033, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 1034,
+ 243, 1035, 1036, 1037, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 1038, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 1039, 1040, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 1041, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 1042, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 1043, 1044, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 1045, 403, 404, 405,
+ 406, 407, 1046, 409, 410, 411, 412, 413, 414, 415,
+ 416, 1047, 1048, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 1049, 441, 442, 443, 444,
+ 445, 446, 447, 1050, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 1051, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 1052,
+ 505, 506, 507, 508, 509, 510, 1053, 512, 513, 514,
+ 515, 516, 517, 1054, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 1055, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 1056, 1057, 1058, 1059, 571, 572, 573,
+ 574, 1060, 1061, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 1062, 590, 1063, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 1064,
+ 604, 1065, 606, 607, 608, 0, 609, 610, 611, 1066,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1067, 1068,
+ 0, 0, 949, 0, 1069, 0, 0, 950, 951, 1070,
+ 0, 0, 0, 1071, 1072, 0, 0, 1073, 952, 953,
+ 0, 954, 955, 956, 957, 958, 959, 960, 961, 962,
+ 963, 964, 0, 0, 0, 0, 0, 0, 0, 965,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 966, 967, 968, 969,
+ 0, 0, 0, 0, 0, 0, 0, 970, 971, 0,
+ 972, 0, 0, 0, 0, 0, 0, 973, 974, 0,
+ 0, 975, 976, 977, 978, 0, 979, 176, 0, 980,
+ 981, 0, 0, 0, 0, 0, 0, 0, 982, 0,
+ 0, 983, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 177, 0, 0, 0, 984,
+ 985, 986, 0, 987, 0, 0, 0, 2935, 0, 0,
+ 0, 988, 989, 990, 178, 0, 0, 0, 0, 0,
+ 991, 0, 0, 179, 0, 0, 0, 0, 0, 992,
+ 0, 0, 993, 0, 0, 0, 0, 0, 0, 0,
+ 0, 994, 0, 995, 0, 996, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 997,
+ 998, 0, 999, 0, 0, 0, 1000, 180, 0, 0,
+ 0, 1001, 0, 0, 181, 1002, 0, 1003, 1004, 1005,
+ 1006, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 1007, 1008,
+ 1009, 0, 1010, 0, 0, 0, 0, 0, 0, 1011,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1012, 0, 0, 0, 0, 0, 0, 0, 1013, 1014,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1015, 0, 0,
+ 0, 0, 0, 0, 1016, 1017, 0, 1018, 1019, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1020,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1021,
+ 1022, 1023, 0, 0, 0, 0, 0, 1024, 1025, 0,
+ 0, 0, 0, 0, 0, 0, 0, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 1026, 1027, 1028, 1029,
+ 195, 196, 197, 1030, 199, 200, 201, 202, 203, 204,
+ 1031, 206, 207, 208, 209, 210, 211, 212, 1032, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 1033, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 1034, 243,
+ 1035, 1036, 1037, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 1038, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 1039,
+ 1040, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 1041, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 1042, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 1043,
+ 1044, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 1045, 403, 404, 405, 406,
+ 407, 1046, 409, 410, 411, 412, 413, 414, 415, 416,
+ 1047, 1048, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 1049, 441, 442, 443, 444, 445,
+ 446, 447, 1050, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 1051, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 1052, 505,
+ 506, 507, 508, 509, 510, 1053, 512, 513, 514, 515,
+ 516, 517, 1054, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 1055, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 1056, 1057, 1058, 1059, 571, 572, 573, 574,
+ 1060, 1061, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 1062, 590, 1063, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 1064, 604,
+ 1065, 606, 607, 608, 0, 609, 610, 611, 1066, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1067, 1068, 0,
+ 0, 949, 0, 1069, 0, 0, 950, 951, 1070, 0,
+ 0, 0, 1071, 1072, 0, 0, 1073, 952, 953, 0,
+ 954, 955, 956, 957, 958, 959, 960, 961, 962, 963,
+ 964, 0, 0, 0, 0, 0, 0, 0, 965, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 966, 967, 968, 969, 0,
+ 0, 0, 0, 0, 0, 0, 970, 971, 0, 972,
+ 0, 0, 0, 0, 0, 0, 973, 974, 0, 0,
+ 975, 976, 977, 978, 0, 979, 176, 0, 980, 981,
+ 0, 0, 0, 0, 0, 0, 0, 4785, 0, 0,
+ 983, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 177, 0, 0, 0, 984, 985,
+ 986, 0, 987, 0, 0, 0, 0, 0, 0, 0,
+ 988, 989, 990, 178, 0, 0, 0, 0, 0, 991,
+ 0, 2573, 179, 0, 0, 0, 0, 0, 992, 0,
+ 0, 993, 0, 0, 0, 0, 0, 0, 0, 0,
+ 994, 0, 995, 0, 996, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 997, 998,
+ 0, 999, 0, 0, 0, 1000, 180, 0, 0, 0,
+ 1001, 0, 0, 181, 1002, 0, 1003, 1004, 1005, 1006,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 1007, 1008, 1009,
+ 0, 1010, 0, 0, 0, 0, 0, 0, 1011, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1012,
+ 0, 0, 0, 0, 0, 0, 0, 1013, 1014, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1015, 0, 0, 0,
+ 0, 0, 0, 1016, 1017, 0, 1018, 1019, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1020, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1021, 1022,
+ 1023, 0, 0, 0, 0, 0, 1024, 1025, 0, 0,
+ 0, 0, 0, 0, 0, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 1026, 1027, 1028, 1029, 195,
+ 196, 197, 1030, 199, 200, 201, 202, 203, 204, 1031,
+ 206, 207, 208, 209, 210, 211, 212, 1032, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 1033, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 1034, 243, 1035,
+ 1036, 1037, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 1038, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 1039, 1040,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 1041, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 1042, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 1043, 1044,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 1045, 403, 404, 405, 406, 407,
+ 1046, 409, 410, 411, 412, 413, 414, 415, 416, 1047,
+ 1048, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 1049, 441, 442, 443, 444, 445, 446,
+ 447, 1050, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 1051, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 1052, 505, 506,
+ 507, 508, 509, 510, 1053, 512, 513, 514, 515, 516,
+ 517, 1054, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 1055, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 1056, 1057, 1058, 1059, 571, 572, 573, 574, 1060,
+ 1061, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 1062, 590, 1063, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 1064, 604, 1065,
+ 606, 607, 608, 0, 609, 610, 611, 1066, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1067, 1068, 0, 0,
+ 949, 0, 1069, 0, 0, 950, 951, 1070, 0, 0,
+ 0, 1071, 1072, 0, 0, 1073, 952, 953, 0, 954,
+ 955, 956, 957, 958, 959, 960, 961, 962, 963, 964,
+ 0, 0, 0, 0, 0, 0, 0, 965, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 966, 967, 968, 969, 0, 0,
+ 0, 0, 0, 0, 0, 970, 971, 0, 972, 0,
+ 0, 0, 0, 0, 0, 973, 974, 0, 0, 975,
+ 976, 977, 978, 0, 979, 176, 0, 980, 981, 0,
+ 0, 0, 0, 0, 0, 0, 982, 0, 0, 983,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 177, 0, 0, 0, 984, 985, 986,
+ 0, 987, 0, 0, 0, 0, 0, 0, 0, 988,
+ 989, 990, 178, 0, 0, 0, 0, 0, 991, 0,
+ 0, 179, 0, 0, 0, 0, 0, 992, 0, 0,
+ 993, 0, 0, 0, 0, 0, 0, 0, 0, 994,
+ 0, 995, 0, 996, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 997, 998, 0,
+ 999, 0, 0, 0, 1000, 180, 0, 0, 0, 1001,
+ 0, 0, 181, 1002, 0, 1003, 1004, 1005, 1006, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 1007, 1008, 1009, 0,
+ 1010, 0, 0, 0, 0, 0, 0, 1011, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1012, 0,
+ 0, 0, 0, 0, 0, 0, 1013, 1014, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1015, 0, 0, 0, 0,
+ 0, 0, 1016, 1017, 0, 1018, 1019, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1020, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1021, 1022, 1023,
+ 0, 0, 0, 0, 0, 1024, 1025, 0, 0, 0,
+ 0, 0, 0, 0, 0, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 1026, 1027, 1028, 1029, 195, 196,
+ 197, 1030, 199, 200, 201, 202, 203, 204, 1031, 206,
+ 207, 208, 209, 210, 211, 212, 1032, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 1033, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 1034, 243, 1035, 1036,
+ 1037, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 1038, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 1039, 1040, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 1041, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 1042, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 1043, 1044, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 1045, 403, 404, 405, 406, 407, 1046,
+ 409, 410, 411, 412, 413, 414, 415, 416, 1047, 1048,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 1049, 441, 442, 443, 444, 445, 446, 447,
+ 1050, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 1051, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 1052, 505, 506, 507,
+ 508, 509, 510, 1053, 512, 513, 514, 515, 516, 517,
+ 1054, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 1055, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 1056, 1057, 1058, 1059, 571, 572, 573, 574, 1060, 1061,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 1062, 590, 1063, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 1064, 604, 1065, 606,
+ 607, 608, 0, 609, 610, 611, 1066, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1067, 1068, 0, 0, 949,
+ 0, 1069, 0, 0, 950, 951, 1070, 0, 0, 0,
+ 1071, 1072, 0, 0, 1073, 952, 953, 0, 954, 955,
+ 956, 957, 958, 959, 960, 961, 962, 963, 964, 0,
+ 0, 0, 0, 0, 0, 0, 965, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 966, 967, 968, 969, 0, 0, 0,
+ 0, 0, 0, 0, 970, 971, 0, 972, 0, 0,
+ 0, 0, 0, 0, 973, 974, 0, 0, 975, 976,
+ 977, 978, 0, 979, 176, 0, 980, 981, 0, 0,
+ 0, 0, 0, 0, 0, 982, 0, 0, 983, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 177, 0, 0, 0, 984, 985, 986, 0,
+ 987, 0, 0, 0, 0, 0, 0, 0, 988, 989,
+ 990, 178, 0, 0, 0, 0, 0, 991, 0, 0,
+ 179, 0, 0, 0, 0, 0, 992, 0, 0, 993,
+ 0, 0, 0, 0, 0, 0, 0, 0, 994, 0,
+ 995, 0, 996, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 997, 998, 0, 999,
+ 0, 0, 0, 1000, 180, 0, 0, 0, 1001, 0,
+ 0, 181, 1002, 0, 1003, 1004, 1005, 1006, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 1007, 1008, 1009, 0, 1010,
+ 0, 0, 0, 0, 0, 0, 1011, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1012, 0, 0,
+ 0, 0, 0, 0, 0, 1013, 1014, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1015, 0, 0, 0, 0, 0,
+ 0, 1016, 1017, 0, 1018, 1019, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1020, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1021, 1022, 1023, 0,
+ 0, 0, 0, 0, 1024, 1025, 0, 0, 0, 0,
+ 0, 0, 0, 0, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 1026, 1027, 1028, 1029, 195, 196, 197,
+ 1030, 199, 200, 201, 202, 203, 204, 1031, 206, 207,
+ 208, 209, 210, 211, 212, 1032, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 1033, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 1034, 243, 1035, 1036, 1037,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 1038, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 1039, 1040, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 1041, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 1042, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 1043, 1044, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 1045, 403, 404, 405, 406, 407, 1046, 409,
+ 410, 411, 412, 413, 414, 415, 416, 1047, 1048, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 1049, 441, 442, 443, 444, 445, 446, 447, 1050,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 1051, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 1052, 505, 506, 507, 508,
+ 509, 510, 1053, 512, 513, 514, 515, 516, 517, 1054,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 1055, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 1056,
+ 1057, 1058, 1059, 571, 572, 573, 574, 1060, 1061, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 1062, 590, 1063, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 1064, 604, 1065, 606, 607,
+ 608, 0, 609, 610, 611, 1066, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1067, 1068, 0, 0, 949, 0,
+ 1069, 0, 0, 950, 951, 1594, 0, 0, 0, 1071,
+ 1072, 0, 0, 1073, 952, 953, 0, 954, 955, 956,
+ 957, 958, 959, 960, 961, 962, 963, 964, 0, 0,
+ 0, 0, 0, 0, 0, 965, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 966, 967, 968, 969, 0, 0, 0, 0,
+ 0, 0, 0, 970, 971, 0, 972, 0, 0, 0,
+ 0, 0, 0, 973, 974, 0, 0, 975, 976, 977,
+ 978, 0, 979, 176, 0, 980, 981, 0, 0, 0,
+ 0, 0, 0, 0, 982, 0, 0, 983, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 177, 0, 0, 0, 984, 985, 986, 0, 987,
+ 0, 0, 0, 0, 0, 0, 0, 988, 989, 990,
+ 178, 0, 0, 0, 0, 0, 991, 0, 0, 179,
+ 0, 0, 0, 0, 0, 992, 0, 0, 993, 0,
+ 0, 0, 0, 0, 0, 0, 0, 994, 0, 995,
+ 0, 996, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 997, 998, 0, 999, 0,
+ 0, 0, 1000, 180, 0, 0, 0, 1001, 0, 0,
+ 181, 1002, 0, 1003, 1004, 1005, 1006, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 1007, 1008, 1009, 0, 1010, 0,
+ 0, 0, 0, 0, 0, 1011, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1012, 0, 0, 0,
+ 0, 0, 0, 0, 1013, 1014, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1015, 0, 0, 0, 0, 0, 0,
+ 1016, 1017, 0, 1018, 1019, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1020, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1021, 1022, 1023, 0, 0,
+ 0, 0, 0, 1024, 1025, 0, 0, 0, 0, 0,
+ 0, 0, 0, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 1026, 1027, 1028, 1029, 195, 196, 197, 1030,
+ 199, 200, 201, 202, 203, 204, 1031, 206, 207, 208,
+ 209, 210, 211, 212, 1032, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 1033, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 1034, 243, 1035, 1036, 1037, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 1038, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 1039, 1040, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 1041, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 1042, 2149, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 1043, 1044, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 1045, 403, 404, 405, 406, 407, 1046, 409, 410,
+ 411, 412, 413, 414, 415, 416, 1047, 1048, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 1049, 441, 442, 443, 444, 445, 446, 447, 1050, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 1051, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 1052, 505, 506, 507, 508, 509,
+ 510, 1053, 512, 513, 514, 515, 516, 517, 1054, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 1055,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 1056, 1057,
+ 1058, 1059, 571, 572, 573, 574, 1060, 1061, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 2150, 590, 1063, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 1064, 604, 1065, 606, 607, 608,
+ 0, 609, 610, 611, 1066, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1067, 1068, 0, 0, 949, 0, 1069,
+ 0, 0, 950, 951, 1070, 0, 0, 0, 1071, 1072,
+ 0, 0, 1073, 952, 953, 0, 954, 955, 956, 957,
+ 958, 959, 960, 961, 962, 963, 964, 0, 0, 0,
+ 0, 0, 0, 0, 965, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 966, 967, 968, 969, 0, 0, 0, 0, 0,
+ 0, 0, 970, 971, 0, 972, 0, 0, 0, 0,
+ 0, 0, 973, 974, 0, 0, 975, 976, 977, 978,
+ 0, 979, 176, 0, 980, 981, 0, 0, 0, 0,
+ 0, 0, 0, 982, 0, 0, 983, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 177, 0, 0, 0, 984, 985, 986, 0, 987, 0,
+ 0, 0, 0, 0, 0, 0, 988, 989, 990, 178,
+ 0, 0, 0, 0, 0, 991, 0, 0, 179, 0,
+ 0, 0, 0, 0, 992, 0, 0, 993, 0, 0,
+ 0, 0, 0, 0, 0, 0, 994, 0, 995, 0,
+ 996, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 997, 998, 0, 999, 0, 0,
+ 0, 1000, 180, 0, 0, 0, 1001, 0, 0, 181,
+ 1002, 0, 1003, 1004, 1005, 1006, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 1007, 1008, 1009, 0, 1010, 0, 0,
+ 0, 0, 0, 0, 1011, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1012, 0, 0, 0, 0,
+ 0, 0, 0, 1013, 1014, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1015, 0, 0, 0, 0, 0, 0, 1016,
+ 1017, 0, 1018, 1019, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1020, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1021, 1022, 1023, 0, 0, 0,
+ 0, 0, 1024, 1025, 0, 0, 0, 0, 0, 0,
+ 0, 0, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 1026, 1027, 1028, 1029, 195, 196, 197, 1030, 199,
+ 200, 201, 202, 203, 204, 1031, 206, 207, 208, 209,
+ 210, 211, 212, 1032, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 1033, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 1034, 243, 1035, 1036, 1037, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 1038, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 1039, 1040, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 1041, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 1042, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 1043, 1044, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 1045, 403, 404, 405, 406, 407, 1046, 409, 410, 411,
+ 412, 413, 414, 415, 416, 1047, 1048, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 1049,
+ 441, 442, 443, 444, 445, 446, 447, 1050, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 1051,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 1052, 505, 506, 507, 508, 509, 510,
+ 1053, 512, 513, 514, 515, 516, 517, 1054, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 1055, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 1056, 1057, 1058,
+ 1059, 571, 572, 573, 574, 1060, 1061, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 2150,
+ 590, 1063, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 1064, 604, 1065, 606, 607, 608, 0,
+ 609, 610, 611, 1066, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1067, 1068, 0, 0, 949, 0, 1069, 0,
+ 0, 950, 951, 1070, 0, 0, 0, 1071, 1072, 0,
+ 0, 1073, 952, 953, 0, 954, 955, 956, 957, 958,
+ 959, 960, 961, 962, 963, 964, 0, 0, 0, 0,
+ 0, 0, 0, 965, 0, 0, 0, 0, 0, 0,
+ 2370, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 966, 967, 968, 969, 0, 0, 0, 0, 0, 0,
+ 0, 970, 971, 0, 972, 0, 0, 0, 0, 0,
+ 0, 973, 974, 0, 0, 975, 976, 977, 978, 0,
+ 979, 176, 0, 980, 981, 0, 0, 0, 0, 0,
+ 0, 0, 982, 0, 0, 983, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 984, 985, 986, 0, 987, 0, 0,
+ 0, 0, 0, 0, 0, 988, 989, 990, 178, 0,
+ 0, 0, 0, 0, 991, 0, 0, 179, 0, 0,
+ 0, 0, 0, 992, 0, 0, 993, 0, 0, 0,
+ 0, 0, 0, 0, 0, 994, 0, 995, 0, 996,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 997, 998, 0, 999, 0, 0, 0,
+ 1000, 180, 0, 0, 0, 1001, 0, 0, 181, 0,
+ 0, 1003, 1004, 1005, 1006, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 1007, 1008, 1009, 0, 1010, 0, 0, 0,
+ 0, 0, 0, 1011, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1012, 0, 0, 0, 0, 0,
+ 0, 0, 1013, 1014, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1015, 0, 0, 0, 0, 0, 0, 1016, 1017,
+ 0, 1018, 1019, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1020, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1021, 1022, 1023, 0, 0, 0, 0,
+ 0, 1024, 1025, 0, 0, 0, 0, 0, 0, 0,
+ 0, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 1026, 1027, 1028, 1029, 195, 196, 197, 1030, 199, 200,
+ 201, 202, 203, 2371, 1031, 206, 207, 208, 209, 210,
+ 211, 212, 1032, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 1033,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 1034, 243, 1035, 1036, 1037, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 1038, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 1039, 1040, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 1041,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 1042, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 1043, 1044, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 1045,
+ 403, 404, 405, 406, 407, 1046, 409, 410, 411, 412,
+ 413, 414, 415, 416, 1047, 1048, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 1049, 441,
+ 442, 443, 444, 445, 446, 447, 1050, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 1051, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 1052, 505, 506, 507, 508, 509, 510, 1053,
+ 512, 513, 514, 515, 516, 517, 1054, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 1055, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 1056, 1057, 1058, 1059,
+ 571, 572, 573, 574, 1060, 1061, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 1062, 590,
+ 1063, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 1064, 604, 1065, 606, 607, 608, 0, 609,
+ 610, 611, 1066, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1067, 1068, 0, 0, 949, 0, 1069, 0, 0,
+ 950, 951, 1070, 0, 0, 0, 1071, 1072, 0, 0,
+ 1073, 952, 953, 0, 954, 955, 956, 957, 958, 959,
+ 960, 961, 962, 963, 964, 0, 0, 0, 0, 0,
+ 0, 0, 965, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 966,
+ 967, 968, 969, 0, 0, 0, 0, 0, 0, 0,
+ 970, 971, 0, 972, 0, 0, 0, 0, 0, 0,
+ 973, 974, 0, 0, 975, 976, 977, 978, 0, 979,
+ 176, 0, 980, 981, 0, 0, 0, 0, 0, 0,
+ 0, 982, 0, 0, 983, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
+ 0, 0, 984, 985, 986, 0, 987, 0, 0, 0,
+ 0, 0, 0, 0, 988, 989, 990, 178, 0, 0,
+ 0, 0, 0, 991, 0, 0, 179, 0, 0, 0,
+ 0, 0, 992, 0, 0, 3758, 0, 0, 0, 0,
+ 0, 0, 0, 0, 994, 0, 995, 0, 996, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 997, 998, 0, 999, 0, 0, 0, 1000,
+ 180, 0, 0, 0, 1001, 0, 0, 181, 1002, 0,
+ 1003, 1004, 1005, 1006, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 1007, 1008, 1009, 0, 1010, 0, 0, 0, 0,
+ 0, 0, 1011, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1012, 0, 0, 0, 0, 0, 0,
+ 0, 1013, 1014, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1015, 0, 0, 0, 0, 0, 0, 1016, 1017, 0,
+ 1018, 1019, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1020, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1021, 1022, 1023, 0, 0, 0, 0, 0,
+ 1024, 1025, 0, 0, 0, 0, 0, 0, 0, 0,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 1026,
+ 1027, 1028, 1029, 195, 196, 197, 1030, 199, 200, 201,
+ 202, 203, 204, 1031, 206, 207, 208, 209, 210, 211,
+ 212, 1032, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 1033, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 1034, 243, 1035, 1036, 1037, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 1038, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 1039, 1040, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 1041, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 1042, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 1043, 1044, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 1045, 403,
+ 404, 405, 406, 407, 1046, 409, 410, 411, 412, 413,
+ 414, 415, 416, 1047, 1048, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 1049, 441, 442,
+ 443, 444, 445, 446, 447, 1050, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 1051, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 1052, 505, 506, 507, 508, 509, 510, 1053, 512,
+ 513, 514, 515, 516, 517, 1054, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 1055, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 1056, 1057, 1058, 1059, 571,
+ 572, 573, 574, 1060, 1061, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 1062, 590, 1063,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 1064, 604, 1065, 606, 607, 608, 0, 609, 610,
+ 611, 1066, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1067, 1068, 0, 0, 949, 0, 1069, 0, 0, 950,
+ 951, 1070, 0, 0, 0, 1071, 1072, 0, 0, 1073,
+ 952, 953, 0, 954, 955, 956, 957, 958, 959, 960,
+ 961, 962, 963, 964, 0, 0, 0, 0, 0, 0,
+ 0, 965, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 966, 967,
+ 968, 969, 0, 0, 0, 0, 0, 0, 0, 970,
+ 971, 0, 972, 0, 0, 0, 0, 0, 0, 973,
+ 974, 0, 0, 975, 976, 977, 978, 0, 979, 176,
+ 0, 980, 981, 0, 0, 0, 0, 0, 0, 0,
+ 982, 0, 0, 983, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
+ 0, 984, 985, 986, 0, 987, 0, 0, 0, 0,
+ 0, 0, 0, 988, 989, 990, 178, 0, 0, 0,
+ 0, 0, 991, 0, 0, 179, 0, 0, 0, 0,
+ 0, 992, 0, 0, 3773, 0, 0, 0, 0, 0,
+ 0, 0, 0, 994, 0, 995, 0, 996, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 997, 998, 0, 999, 0, 0, 0, 1000, 180,
+ 0, 0, 0, 1001, 0, 0, 181, 1002, 0, 1003,
+ 1004, 1005, 1006, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 1007, 1008, 1009, 0, 1010, 0, 0, 0, 0, 0,
+ 0, 1011, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1012, 0, 0, 0, 0, 0, 0, 0,
+ 1013, 1014, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1015,
+ 0, 0, 0, 0, 0, 0, 1016, 1017, 0, 1018,
+ 1019, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1020, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1021, 1022, 1023, 0, 0, 0, 0, 0, 1024,
+ 1025, 0, 0, 0, 0, 0, 0, 0, 0, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 1026, 1027,
+ 1028, 1029, 195, 196, 197, 1030, 199, 200, 201, 202,
+ 203, 204, 1031, 206, 207, 208, 209, 210, 211, 212,
+ 1032, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 1033, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 1034, 243, 1035, 1036, 1037, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 1038,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 1039, 1040, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 1041, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 1042,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 1043, 1044, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 1045, 403, 404,
+ 405, 406, 407, 1046, 409, 410, 411, 412, 413, 414,
+ 415, 416, 1047, 1048, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 1049, 441, 442, 443,
+ 444, 445, 446, 447, 1050, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 1051, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 1052, 505, 506, 507, 508, 509, 510, 1053, 512, 513,
+ 514, 515, 516, 517, 1054, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 1055, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 1056, 1057, 1058, 1059, 571, 572,
+ 573, 574, 1060, 1061, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 1062, 590, 1063, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 1064, 604, 1065, 606, 607, 608, 0, 609, 610, 611,
+ 1066, 0, 0, 0, 0, 0, 0, 0, 0, 1067,
+ 1068, 0, 0, 949, 0, 1069, 0, 0, 950, 951,
+ 1070, 0, 0, 0, 1071, 1072, 0, 0, 1073, 952,
+ 953, 0, 954, 955, 956, 957, 958, 959, 960, 961,
+ 962, 963, 964, 0, 0, 0, 0, 0, 0, 0,
+ 965, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 966, 967, 968,
+ 969, 0, 0, 0, 0, 0, 0, 0, 970, 971,
+ 0, 972, 0, 0, 0, 0, 0, 0, 973, 974,
+ 0, 0, 975, 976, 977, 978, 0, 979, 176, 0,
+ 980, 981, 0, 0, 0, 0, 0, 0, 0, 982,
+ 0, 0, 983, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 177, 0, 0, 0,
+ 984, 985, 986, 0, 987, 0, 0, 0, 0, 0,
+ 0, 0, 988, 989, 990, 178, 0, 0, 0, 0,
+ 0, 991, 0, 0, 179, 0, 0, 0, 0, 0,
+ 992, 0, 0, 993, 0, 0, 0, 0, 0, 0,
+ 0, 0, 994, 0, 995, 0, 996, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 997, 998, 6048, 999, 0, 0, 0, 1000, 180, 0,
+ 0, 0, 1001, 0, 0, 181, 0, 0, 1003, 1004,
+ 1005, 1006, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 1007,
+ 1008, 1009, 0, 1010, 0, 0, 0, 0, 0, 0,
+ 1011, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1012, 0, 0, 0, 0, 0, 0, 0, 1013,
+ 1014, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1015, 0,
+ 0, 0, 0, 0, 0, 1016, 1017, 0, 1018, 1019,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1020, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1021, 1022, 1023, 0, 0, 0, 0, 0, 1024, 1025,
+ 0, 0, 0, 0, 0, 0, 0, 0, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 1026, 1027, 1028,
+ 1029, 195, 196, 197, 1030, 199, 200, 201, 202, 203,
+ 204, 1031, 206, 207, 208, 209, 210, 211, 212, 1032,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 1033, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 1034,
+ 243, 1035, 1036, 1037, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 1038, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 1039, 1040, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 1041, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 1042, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 1043, 1044, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 1045, 403, 404, 405,
+ 406, 407, 1046, 409, 410, 411, 412, 413, 414, 415,
+ 416, 1047, 1048, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 1049, 441, 442, 443, 444,
+ 445, 446, 447, 1050, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 1051, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 1052,
+ 505, 506, 507, 508, 509, 510, 1053, 512, 513, 514,
+ 515, 516, 517, 1054, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 1055, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 1056, 1057, 1058, 1059, 571, 572, 573,
+ 574, 1060, 1061, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 1062, 590, 1063, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 1064,
+ 604, 1065, 606, 607, 608, 0, 609, 610, 611, 1066,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1067, 1068,
+ 0, 0, 949, 0, 1069, 0, 0, 950, 951, 1070,
+ 0, 0, 0, 1071, 1072, 0, 0, 1073, 952, 953,
+ 0, 954, 955, 956, 957, 958, 959, 960, 961, 962,
+ 963, 964, 0, 0, 0, 0, 0, 0, 0, 965,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 966, 967, 968, 969,
+ 0, 0, 0, 0, 0, 0, 0, 970, 971, 0,
+ 972, 0, 0, 0, 0, 0, 0, 973, 974, 0,
+ 0, 975, 976, 977, 978, 0, 979, 176, 0, 980,
+ 981, 0, 0, 0, 0, 0, 0, 0, 982, 0,
+ 0, 983, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 177, 0, 0, 0, 984,
+ 985, 986, 0, 987, 0, 0, 0, 0, 0, 0,
+ 0, 988, 989, 990, 178, 0, 0, 0, 0, 0,
+ 991, 0, 0, 179, 0, 0, 0, 0, 0, 992,
+ 0, 0, 1561, 0, 0, 0, 0, 0, 0, 0,
+ 0, 994, 0, 995, 0, 996, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 997,
+ 998, 0, 999, 0, 0, 0, 1000, 180, 0, 0,
+ 0, 1001, 0, 0, 181, 0, 0, 1003, 1004, 1005,
+ 1006, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 1007, 1008,
+ 1009, 0, 1010, 0, 0, 0, 0, 0, 0, 1011,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1012, 0, 0, 0, 0, 0, 0, 0, 1013, 1014,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1015, 0, 0,
+ 0, 0, 0, 0, 1016, 1017, 0, 1018, 1019, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1020,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1021,
+ 1022, 1023, 0, 0, 0, 0, 0, 1024, 1025, 0,
+ 0, 0, 0, 0, 0, 0, 0, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 1026, 1027, 1028, 1029,
+ 195, 196, 197, 1030, 199, 200, 201, 202, 203, 204,
+ 1031, 206, 207, 208, 209, 210, 211, 212, 1032, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 1033, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 1034, 243,
+ 1035, 1036, 1037, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 1038, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 1039,
+ 1040, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 1041, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 1042, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 1043,
+ 1044, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 1045, 403, 404, 405, 406,
+ 407, 1046, 409, 410, 411, 412, 413, 414, 415, 416,
+ 1047, 1048, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 1049, 441, 442, 443, 444, 445,
+ 446, 447, 1050, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 1051, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 1052, 505,
+ 506, 507, 508, 509, 510, 1053, 512, 513, 514, 515,
+ 516, 517, 1054, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 1055, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 1056, 1057, 1058, 1059, 571, 572, 573, 574,
+ 1060, 1061, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 1062, 590, 1063, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 1064, 604,
+ 1065, 606, 607, 608, 0, 609, 610, 611, 1066, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1562, 1563, 0,
+ 0, 949, 0, 1069, 0, 0, 950, 951, 1070, 0,
+ 0, 0, 1071, 1072, 0, 0, 1073, 952, 953, 0,
+ 954, 955, 956, 957, 958, 959, 960, 961, 962, 963,
+ 964, 0, 0, 0, 0, 0, 0, 0, 965, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 966, 967, 968, 969, 0,
+ 0, 0, 0, 0, 0, 0, 970, 971, 0, 972,
+ 0, 0, 0, 0, 0, 0, 973, 974, 0, 0,
+ 975, 976, 977, 978, 0, 979, 176, 0, 980, 981,
+ 0, 0, 0, 0, 0, 0, 0, 982, 0, 0,
+ 983, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 177, 0, 0, 0, 984, 985,
+ 986, 0, 987, 0, 0, 0, 0, 0, 0, 0,
+ 988, 989, 990, 178, 0, 0, 0, 0, 0, 991,
+ 0, 0, 179, 0, 0, 0, 0, 0, 992, 0,
+ 0, 1675, 0, 0, 0, 0, 0, 0, 0, 0,
+ 994, 0, 995, 0, 996, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 997, 998,
+ 0, 999, 0, 0, 0, 1000, 180, 0, 0, 0,
+ 1001, 0, 0, 181, 0, 0, 1003, 1004, 1005, 1006,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 1007, 1008, 1009,
+ 0, 1010, 0, 0, 0, 0, 0, 0, 1011, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1012,
+ 0, 0, 0, 0, 0, 0, 0, 1013, 1014, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1015, 0, 0, 0,
+ 0, 0, 0, 1016, 1017, 0, 1018, 1019, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1020, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1021, 1022,
+ 1023, 0, 0, 0, 0, 0, 1024, 1025, 0, 0,
+ 0, 0, 0, 0, 0, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 1026, 1027, 1028, 1029, 195,
+ 196, 197, 1030, 199, 200, 201, 202, 203, 204, 1031,
+ 206, 207, 208, 209, 210, 211, 212, 1032, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 1033, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 1034, 243, 1035,
+ 1036, 1037, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 1038, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 1039, 1040,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 1041, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 1042, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 1043, 1044,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 1045, 403, 404, 405, 406, 407,
+ 1046, 409, 410, 411, 412, 413, 414, 415, 416, 1047,
+ 1048, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 1049, 441, 442, 443, 444, 445, 446,
+ 447, 1050, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 1051, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 1052, 505, 506,
+ 507, 508, 509, 510, 1053, 512, 513, 514, 515, 516,
+ 517, 1054, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 1055, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 1056, 1057, 1058, 1059, 571, 572, 573, 574, 1060,
+ 1061, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 1062, 590, 1063, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 1064, 604, 1065,
+ 606, 607, 608, 0, 609, 610, 611, 1066, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1562, 1563, 0, 0,
+ 949, 0, 1069, 0, 0, 950, 951, 1070, 0, 0,
+ 0, 1071, 1072, 0, 0, 1073, 952, 953, 0, 954,
+ 955, 956, 957, 958, 959, 960, 961, 962, 963, 964,
+ 0, 0, 0, 0, 0, 0, 0, 965, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 966, 967, 968, 969, 0, 0,
+ 0, 0, 0, 0, 0, 970, 971, 0, 972, 0,
+ 0, 0, 0, 0, 0, 973, 974, 0, 0, 975,
+ 976, 977, 978, 0, 979, 176, 0, 980, 981, 0,
+ 0, 0, 0, 0, 0, 0, 982, 0, 0, 983,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 177, 0, 0, 0, 984, 985, 986,
+ 0, 987, 0, 0, 0, 0, 0, 0, 0, 988,
+ 989, 990, 178, 0, 0, 0, 0, 0, 991, 0,
+ 0, 179, 0, 0, 0, 0, 0, 992, 0, 0,
+ 1677, 0, 0, 0, 0, 0, 0, 0, 0, 994,
+ 0, 995, 0, 996, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 997, 998, 0,
+ 999, 0, 0, 0, 1000, 180, 0, 0, 0, 1001,
+ 0, 0, 181, 0, 0, 1003, 1004, 1005, 1006, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 1007, 1008, 1009, 0,
+ 1010, 0, 0, 0, 0, 0, 0, 1011, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1012, 0,
+ 0, 0, 0, 0, 0, 0, 1013, 1014, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1015, 0, 0, 0, 0,
+ 0, 0, 1016, 1017, 0, 1018, 1019, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1020, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1021, 1022, 1023,
+ 0, 0, 0, 0, 0, 1024, 1025, 0, 0, 0,
+ 0, 0, 0, 0, 0, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 1026, 1027, 1028, 1029, 195, 196,
+ 197, 1030, 199, 200, 201, 202, 203, 204, 1031, 206,
+ 207, 208, 209, 210, 211, 212, 1032, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 1033, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 1034, 243, 1035, 1036,
+ 1037, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 1038, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 1039, 1040, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 1041, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 1042, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 1043, 1044, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 1045, 403, 404, 405, 406, 407, 1046,
+ 409, 410, 411, 412, 413, 414, 415, 416, 1047, 1048,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 1049, 441, 442, 443, 444, 445, 446, 447,
+ 1050, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 1051, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 1052, 505, 506, 507,
+ 508, 509, 510, 1053, 512, 513, 514, 515, 516, 517,
+ 1054, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 1055, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 1056, 1057, 1058, 1059, 571, 572, 573, 574, 1060, 1061,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 1062, 590, 1063, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 1064, 604, 1065, 606,
+ 607, 608, 0, 609, 610, 611, 1066, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1562, 1563, 0, 0, 949,
+ 0, 1069, 0, 0, 950, 951, 1070, 0, 0, 0,
+ 1071, 1072, 0, 0, 1073, 952, 953, 0, 954, 955,
+ 956, 957, 958, 959, 960, 961, 962, 963, 964, 0,
+ 0, 0, 0, 0, 0, 0, 965, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 966, 967, 968, 969, 0, 0, 0,
+ 0, 0, 0, 0, 970, 971, 0, 972, 0, 0,
+ 0, 0, 0, 0, 973, 974, 0, 0, 975, 976,
+ 977, 978, 0, 979, 176, 0, 980, 981, 0, 0,
+ 0, 0, 0, 0, 0, 982, 0, 0, 983, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 177, 0, 0, 0, 984, 985, 986, 0,
+ 987, 0, 0, 0, 0, 0, 0, 0, 988, 989,
+ 990, 178, 0, 0, 0, 0, 0, 991, 0, 0,
+ 179, 0, 0, 0, 0, 0, 992, 0, 0, 993,
+ 0, 0, 0, 0, 0, 0, 0, 0, 994, 0,
+ 995, 0, 996, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 997, 998, 0, 999,
+ 0, 0, 0, 1000, 180, 0, 0, 0, 1001, 0,
+ 0, 181, 0, 0, 1003, 1004, 1005, 1006, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 1007, 1008, 1009, 0, 1010,
+ 0, 0, 0, 0, 0, 0, 1011, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1012, 0, 0,
+ 0, 0, 0, 0, 0, 1013, 1014, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1015, 0, 0, 0, 0, 0,
+ 0, 1016, 1017, 0, 1018, 1019, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1020, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1021, 1022, 1023, 0,
+ 0, 0, 0, 0, 1024, 1025, 0, 0, 0, 0,
+ 0, 0, 0, 0, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 1026, 1027, 1028, 1029, 195, 196, 197,
+ 1030, 199, 200, 201, 202, 203, 204, 1031, 206, 207,
+ 208, 209, 210, 211, 212, 1032, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 1033, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 1034, 243, 1035, 1036, 1037,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 1038, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 1039, 1040, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 1041, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 1042, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 1043, 1044, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 1045, 403, 404, 405, 406, 407, 1046, 409,
+ 410, 411, 412, 413, 414, 415, 416, 1047, 1048, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 1049, 441, 442, 443, 444, 445, 446, 447, 1050,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 1051, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 1052, 505, 506, 507, 508,
+ 509, 510, 1053, 512, 513, 514, 515, 516, 517, 1054,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 1055, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 1056,
+ 1057, 1058, 1059, 571, 572, 573, 574, 1060, 1061, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 1062, 590, 1063, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 1064, 604, 1065, 606, 607,
+ 608, 0, 609, 610, 611, 1066, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1067, 1068, 0, 0, 949, 0,
+ 1069, 0, 0, 950, 951, 1070, 0, 0, 0, 1071,
+ 1072, 0, 0, 1073, 952, 953, 0, 954, 955, 956,
+ 957, 958, 959, 960, 961, 962, 963, 964, 0, 0,
+ 0, 0, 0, 0, 0, 965, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 966, 967, 968, 969, 0, 0, 0, 0,
+ 0, 0, 0, 970, 971, 0, 972, 0, 0, 0,
+ 0, 0, 0, 973, 974, 0, 0, 975, 976, 977,
+ 978, 0, 979, 176, 0, 980, 981, 0, 0, 0,
+ 0, 0, 0, 0, 982, 0, 0, 983, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 177, 0, 0, 0, 984, 985, 986, 0, 987,
+ 0, 0, 0, 0, 0, 0, 0, 988, 989, 990,
+ 178, 0, 0, 0, 0, 0, 991, 0, 0, 179,
+ 0, 0, 0, 0, 0, 992, 0, 0, 2391, 0,
+ 0, 0, 0, 0, 0, 0, 0, 994, 0, 995,
+ 0, 996, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 997, 998, 0, 999, 0,
+ 0, 0, 1000, 180, 0, 0, 0, 1001, 0, 0,
+ 181, 0, 0, 1003, 1004, 1005, 1006, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 1007, 1008, 1009, 0, 1010, 0,
+ 0, 0, 0, 0, 0, 1011, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1012, 0, 0, 0,
+ 0, 0, 0, 0, 1013, 1014, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1015, 0, 0, 0, 0, 0, 0,
+ 1016, 1017, 0, 1018, 1019, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1020, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1021, 1022, 1023, 0, 0,
+ 0, 0, 0, 1024, 1025, 0, 0, 0, 0, 0,
+ 0, 0, 0, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 1026, 1027, 1028, 1029, 195, 196, 197, 1030,
+ 199, 200, 201, 202, 203, 204, 1031, 206, 207, 208,
+ 209, 210, 211, 212, 1032, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 1033, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 1034, 243, 1035, 1036, 1037, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 1038, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 1039, 1040, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 1041, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 1042, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 1043, 1044, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 1045, 403, 404, 405, 406, 407, 1046, 409, 410,
+ 411, 412, 413, 414, 415, 416, 1047, 1048, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 1049, 441, 442, 443, 444, 445, 446, 447, 1050, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 1051, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 1052, 505, 506, 507, 508, 509,
+ 510, 1053, 512, 513, 514, 515, 516, 517, 1054, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 1055,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 1056, 1057,
+ 1058, 1059, 571, 572, 573, 574, 1060, 1061, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 1062, 590, 1063, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 1064, 604, 1065, 606, 607, 608,
+ 0, 609, 610, 611, 1066, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1067, 1068, 0, 0, 949, 0, 1069,
+ 0, 0, 950, 951, 1070, 0, 0, 0, 1071, 1072,
+ 0, 0, 1073, 952, 953, 0, 954, 955, 956, 957,
+ 958, 959, 960, 961, 962, 963, 964, 0, 0, 0,
+ 0, 0, 0, 0, 965, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 966, 967, 968, 969, 0, 0, 0, 0, 0,
+ 0, 0, 970, 971, 0, 972, 0, 0, 0, 0,
+ 0, 0, 973, 974, 0, 0, 975, 976, 977, 978,
+ 0, 979, 176, 0, 980, 981, 0, 0, 0, 0,
+ 0, 0, 0, 982, 0, 0, 983, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 177, 0, 0, 0, 984, 985, 986, 0, 987, 0,
+ 0, 0, 0, 0, 0, 0, 988, 989, 990, 178,
+ 0, 0, 0, 0, 0, 991, 0, 0, 179, 0,
+ 0, 0, 0, 0, 992, 0, 0, 2393, 0, 0,
+ 0, 0, 0, 0, 0, 0, 994, 0, 995, 0,
+ 996, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 997, 998, 0, 999, 0, 0,
+ 0, 1000, 180, 0, 0, 0, 1001, 0, 0, 181,
+ 0, 0, 1003, 1004, 1005, 1006, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 1007, 1008, 1009, 0, 1010, 0, 0,
+ 0, 0, 0, 0, 1011, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1012, 0, 0, 0, 0,
+ 0, 0, 0, 1013, 1014, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1015, 0, 0, 0, 0, 0, 0, 1016,
+ 1017, 0, 1018, 1019, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1020, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1021, 1022, 1023, 0, 0, 0,
+ 0, 0, 1024, 1025, 0, 0, 0, 0, 0, 0,
+ 0, 0, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 1026, 1027, 1028, 1029, 195, 196, 197, 1030, 199,
+ 200, 201, 202, 203, 204, 1031, 206, 207, 208, 209,
+ 210, 211, 212, 1032, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 1033, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 1034, 243, 1035, 1036, 1037, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 1038, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 1039, 1040, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 1041, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 1042, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 1043, 1044, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 1045, 403, 404, 405, 406, 407, 1046, 409, 410, 411,
+ 412, 413, 414, 415, 416, 1047, 1048, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 1049,
+ 441, 442, 443, 444, 445, 446, 447, 1050, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 1051,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 1052, 505, 506, 507, 508, 509, 510,
+ 1053, 512, 513, 514, 515, 516, 517, 1054, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 1055, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 1056, 1057, 1058,
+ 1059, 571, 572, 573, 574, 1060, 1061, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 1062,
+ 590, 1063, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 1064, 604, 1065, 606, 607, 608, 0,
+ 609, 610, 611, 1066, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1067, 1068, 0, 0, 949, 0, 1069, 0,
+ 0, 950, 951, 1070, 0, 0, 0, 1071, 1072, 0,
+ 0, 1073, 5920, 5921, 0, 954, 955, 956, 957, 958,
+ 959, 960, 961, 962, 963, 964, 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, 967, 968, 969, 0, 0, 0, 0, 0, 0,
+ 0, 970, 971, 0, 972, 0, 0, 0, 0, 0,
+ 0, 973, 974, 0, 0, 975, 976, 977, 978, 0,
+ 979, 176, 0, 980, 981, 0, 0, 0, 0, 0,
+ 0, 0, 982, 0, 0, 983, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 984, 985, 986, 0, 987, 0, 0,
+ 0, 0, 0, 0, 0, 988, 989, 990, 178, 0,
+ 0, 0, 0, 0, 991, 0, 0, 179, 0, 0,
+ 0, 0, 0, 992, 0, 0, 1561, 0, 0, 0,
+ 0, 0, 0, 0, 0, 994, 0, 995, 0, 996,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 997, 998, 0, 999, 0, 0, 0,
+ 1000, 180, 0, 0, 0, 1001, 0, 0, 181, 0,
+ 0, 1003, 1004, 1005, 1006, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 1007, 1008, 1009, 0, 1010, 0, 0, 0,
+ 0, 0, 0, 1011, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1012, 0, 0, 0, 0, 0,
+ 0, 0, 1013, 1014, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1015, 0, 0, 0, 0, 0, 0, 1016, 1017,
+ 0, 1018, 1019, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1020, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1021, 1022, 1023, 0, 0, 0, 0,
+ 0, 1024, 1025, 0, 0, 0, 0, 0, 0, 0,
+ 0, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 1026, 1027, 1028, 1029, 195, 196, 197, 1030, 199, 200,
+ 201, 202, 203, 204, 1031, 206, 207, 208, 209, 210,
+ 211, 212, 1032, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 1033,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 1034, 243, 1035, 1036, 1037, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 1038, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 1039, 1040, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 1041,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 1042, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 1043, 1044, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 1045,
+ 403, 404, 405, 406, 407, 1046, 409, 410, 411, 412,
+ 413, 414, 415, 416, 1047, 1048, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 1049, 441,
+ 442, 443, 444, 445, 446, 447, 1050, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 1051, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 1052, 505, 506, 507, 508, 509, 510, 1053,
+ 512, 513, 514, 515, 516, 517, 1054, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 1055, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 1056, 1057, 1058, 1059,
+ 571, 572, 573, 574, 1060, 1061, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 1062, 590,
+ 1063, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 1064, 604, 1065, 606, 607, 608, 0, 609,
+ 610, 611, 1066, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5922, 5923, 0, 0, 949, 0, 0, 0, 0,
+ 1599, 0, 5924, 0, 0, 0, 0, 1072, 0, 0,
+ 1073, 1554, 1555, 0, 954, 955, 956, 957, 958, 959,
+ 960, 961, 962, 963, 964, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 986, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 1006, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1020, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 2427, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 2428, 568, 569, 2429, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 6200, 609, 610,
+ 611, 612, 2347, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 174, 175, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1073,
+ 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, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 6200,
+ 609, 610, 611, 612, 2347, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 174, 175, 0, 0, 0,
+ 0, 0, 0, 0, 6201, 0, 0, 0, 0, 0,
+ 0, 2348, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 1599, 609, 610, 611, 612, 0, 0, 0, 0,
+ 0, 0, 1554, 1555, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2348, 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, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 1599, 609,
+ 610, 611, 612, 0, 0, 0, 0, 0, 0, 1554,
+ 1555, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1600, 0, 0, 0, 0, 0, 0, 0,
+ 1073, 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, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 2347, 609, 610, 611, 612,
+ 0, 0, 0, 0, 0, 0, 174, 175, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1073, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 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, 2348, 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, 4821, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 3155, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3156, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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,
+ 747, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 184, 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, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 4822, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 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, 4823, 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, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1336, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 32, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 184, 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, 39, 0, 0, 0, 0, 0,
+ 0, 0, 0, 41, 0, 0, 0, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 174,
+ 175, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1337, 0,
+ 0, 0, 0, 0, 0, 0, 776, 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, 176, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1335, 0, 0, 0, 0, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1336, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1337,
+ 0, 0, 0, 0, 1338, 0, 0, 776, 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, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1336, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 174, 175, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1337, 0, 0, 0, 0, 1338, 0, 0, 776, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1336, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1337, 0, 0, 0, 0, 0, 0, 0, 776,
+ 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, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 174, 175, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2801, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 776, 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, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 0,
+ 609, 610, 611, 612, 174, 175, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4981, 0, 0, 0, 0, 0, 0,
+ 0, 4823, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 5290, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 174, 175, 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, 4823, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 773, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 774, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 775, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 0, 609, 610, 611, 612, 174, 175, 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, 776, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 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, 776, 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, 176, 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, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 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, 4823, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6, 0, 0,
+ 0, 0, 0, 0, 0, 0, 902, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 903, 0, 0, 0, 14, 0, 0, 904,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 16, 0, 0, 905, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 906, 0, 0, 0,
+ 0, 0, 0, 0, 907, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 21, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 29, 0, 0, 0, 0, 908, 909, 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, 184, 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, 40, 0, 0, 0, 0, 185, 186, 187,
+ 910, 189, 0, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 0, 206, 207, 208, 209, 210, 211, 212, 213, 0,
+ 911, 0, 0, 217, 218, 219, 220, 221, 0, 0,
+ 224, 225, 226, 227, 228, 0, 0, 0, 232, 233,
+ 234, 235, 236, 912, 238, 239, 240, 241, 0, 0,
+ 0, 0, 0, 0, 247, 0, 249, 0, 251, 252,
+ 0, 254, 255, 256, 257, 258, 259, 0, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 0, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 0, 284, 285, 286, 287, 0, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 0, 0,
+ 0, 303, 0, 913, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 0, 0, 0, 0, 0,
+ 319, 320, 914, 322, 323, 324, 0, 326, 327, 0,
+ 329, 330, 0, 0, 332, 0, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 0, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 0, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 0, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 915, 0, 0, 440, 0, 442, 443, 0, 445,
+ 446, 447, 448, 0, 450, 451, 452, 453, 0, 0,
+ 0, 0, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 0, 485,
+ 0, 487, 488, 489, 0, 491, 492, 0, 494, 495,
+ 496, 497, 498, 499, 0, 501, 502, 503, 504, 505,
+ 506, 507, 0, 509, 510, 511, 0, 513, 514, 515,
+ 516, 0, 518, 519, 0, 0, 522, 523, 0, 0,
+ 526, 527, 528, 0, 530, 0, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 0, 541, 542, 0, 544,
+ 0, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 0, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 0, 577, 578, 0, 580, 581, 582, 583, 0,
+ 0, 586, 587, 0, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 0,
+ 0, 606, 607, 0, 0, 609, 0, 611, 612, 174,
+ 175, 793, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 698, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5590, 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, 1412, 0, 0, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 0, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1670,
+ 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, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 1162, 609, 610, 611,
+ 612, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 174, 175, 0, 0, 0, 0, 0, 0,
+ 2402, 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, 1163, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 176, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1164, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1165, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 1166, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 1167,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 1168, 322, 323, 324,
+ 325, 1169, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 1170,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 1171,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 1172, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 1173, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 1174, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 1175, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 1176, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 1177, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 1178, 605, 606, 607, 608, 1162, 609,
+ 610, 611, 612, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 174, 175, 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, 1163, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 176, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1164, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 1165,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 1166, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 1167, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 1168, 322,
+ 323, 324, 325, 1169, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 1170, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 1171, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 1172, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 1173, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 1174,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 1175, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 1178, 605, 606, 607, 608,
+ 1749, 609, 610, 611, 612, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 174, 175, 793, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 698, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 1990, 609, 610, 611, 612, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 174, 175,
+ 793, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 698, 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, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 2188, 609, 610, 611, 612, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 174, 175, 793, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 698, 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, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 1899, 609, 610, 611,
+ 612, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1554, 1555, 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, 1900, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 1899, 609,
+ 610, 611, 612, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1554, 1555, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 2004, 951, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1554, 1555, 0, 0,
+ 0, 0, 0, 0, 0, 2005, 0, 2006, 0, 2007,
+ 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 2008, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 2004, 951, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1554, 1555,
+ 0, 0, 0, 0, 0, 0, 0, 2005, 0, 2006,
+ 0, 2007, 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, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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,
+ 2679, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 2680, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 2004,
+ 951, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1554, 1555, 0, 0, 0, 0, 0, 0, 0, 2005,
+ 0, 2006, 0, 2007, 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, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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, 4100, 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 2004, 951, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1554, 1555, 0, 0, 0, 0, 0, 0,
+ 0, 2005, 0, 2006, 0, 2007, 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, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 1554, 1555, 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, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 2408, 2409, 2410, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 0,
+ 609, 610, 611, 612, 174, 175, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4337, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 174, 175, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2782, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 0, 609, 610, 611, 612, 1554, 1555, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4116, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5129, 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, 176, 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, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5430, 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, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 174,
+ 175, 0, 0, 0, 0, 0, 2838, 0, 0, 5755,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 693, 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, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 694, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 5384,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 5385, 0, 665, 0, 5386,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 793, 0, 0, 0, 0, 0, 0, 2839,
+ 0, 0, 698, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1401, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1754, 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, 176,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1755, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 174, 175, 793, 1402, 0, 0, 0, 0, 0,
+ 0, 0, 0, 698, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1401, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 0, 1402, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3451, 3452,
+ 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 4130,
+ 4131, 3463, 3464, 3465, 4132, 4133, 3466, 3467, 3468, 3469,
+ 3470, 3471, 3472, 3473, 4134, 3475, 3476, 0, 3477, 3478,
+ 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 0,
+ 3488, 176, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 4135,
+ 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506,
+ 3507, 3508, 4136, 3510, 3511, 3512, 3513, 3514, 3515, 177,
+ 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 4137, 3525,
+ 0, 3526, 3527, 3528, 3529, 3530, 0, 0, 178, 3531,
+ 3532, 3533, 3534, 3535, 3536, 3537, 3538, 5460, 3540, 3541,
+ 3542, 3543, 3544, 3545, 3546, 3547, 4138, 3549, 4139, 3551,
+ 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561,
+ 3562, 3563, 3564, 3565, 3566, 3567, 3568, 4140, 4141, 4142,
+ 3569, 3570, 3571, 3572, 3573, 3574, 3575, 4143, 4144, 4145,
+ 3576, 180, 3577, 3578, 3579, 3580, 3581, 3582, 181, 3583,
+ 3584, 3585, 3586, 3587, 3588, 4146, 3589, 3590, 3591, 3592,
+ 182, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601,
+ 3602, 183, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610,
+ 3611, 3612, 3613, 3614, 3615, 3616, 3617, 4147, 3618, 3619,
+ 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629,
+ 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639,
+ 3640, 4148, 3641, 3642, 4149, 3643, 3644, 3645, 3646, 3647,
+ 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657,
+ 3658, 3659, 184, 3660, 3661, 3662, 3663, 4150, 4151, 4152,
+ 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 0, 3673,
+ 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 4153,
+ 4154, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692,
+ 3693, 185, 186, 187, 0, 189, 190, 191, 192, 193,
+ 194, 3694, 3695, 3696, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 5461, 218, 5462,
+ 5463, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 5464, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 5465, 5466, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 5467, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 5468, 315,
+ 316, 317, 0, 318, 319, 320, 3410, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 5469,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 5470, 5471, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 5472, 5473, 432,
+ 3700, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 5474,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 5475, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 5476, 565, 566, 5477, 568, 569, 5478,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 5479, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 3411, 605, 606, 607, 608, 0, 609,
+ 610, 611, 5480, 174, 175, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3451,
+ 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461,
+ 4130, 4131, 3463, 3464, 3465, 4132, 4133, 3466, 3467, 3468,
+ 3469, 3470, 3471, 3472, 3473, 4134, 3475, 3476, 0, 3477,
+ 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487,
+ 0, 3488, 176, 3489, 3490, 3491, 3492, 3493, 3494, 3495,
+ 4135, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505,
+ 3506, 3507, 3508, 4136, 3510, 3511, 3512, 3513, 3514, 3515,
+ 177, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 4137,
+ 3525, 0, 3526, 3527, 3528, 3529, 3530, 0, 0, 178,
+ 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540,
+ 3541, 3542, 3543, 3544, 3545, 3546, 3547, 4138, 3549, 4139,
+ 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560,
+ 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 4140, 4141,
+ 4142, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 4143, 4144,
+ 4145, 3576, 180, 3577, 3578, 3579, 3580, 3581, 3582, 181,
+ 3583, 3584, 3585, 3586, 3587, 3588, 4146, 3589, 3590, 3591,
+ 3592, 182, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600,
+ 3601, 3602, 183, 3603, 3604, 3605, 3606, 3607, 3608, 3609,
+ 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 4147, 3618,
+ 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628,
+ 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638,
+ 3639, 3640, 4148, 3641, 3642, 4149, 3643, 3644, 3645, 3646,
+ 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656,
+ 3657, 3658, 3659, 184, 3660, 3661, 3662, 3663, 4150, 4151,
+ 4152, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 0,
+ 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682,
+ 4153, 4154, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691,
+ 3692, 3693, 185, 186, 187, 0, 189, 190, 191, 192,
+ 193, 194, 3694, 3695, 3696, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 4155, 218,
+ 4156, 4157, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 0, 4158, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 4159, 4160, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 4161, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 4162,
+ 315, 316, 317, 0, 318, 319, 320, 0, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 4163, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 0, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 4164, 4165, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 0, 4166, 4167,
+ 432, 3700, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 0,
+ 4168, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 4169, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 0, 516, 517, 518, 519, 520,
+ 0, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 4170, 565, 566, 4171, 568, 569,
+ 4172, 571, 572, 573, 574, 575, 576, 4173, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 0, 4174, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 0, 605, 606, 607, 608, 0,
+ 609, 610, 611, 4175, 174, 175, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460,
+ 3461, 4130, 4131, 3463, 3464, 3465, 4132, 4133, 3466, 3467,
+ 3468, 3469, 3470, 3471, 3472, 3473, 4134, 3475, 3476, 0,
+ 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486,
+ 3487, 0, 3488, 176, 3489, 3490, 3491, 3492, 3493, 3494,
+ 3495, 4135, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504,
+ 3505, 3506, 3507, 3508, 4136, 3510, 3511, 3512, 3513, 3514,
+ 3515, 177, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523,
+ 4137, 3525, 0, 3526, 3527, 3528, 3529, 3530, 0, 0,
+ 178, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539,
+ 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 4138, 3549,
+ 4139, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559,
+ 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 4140,
+ 4141, 4142, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 4143,
+ 4144, 4145, 3576, 180, 3577, 3578, 3579, 3580, 3581, 3582,
+ 181, 3583, 3584, 3585, 3586, 3587, 3588, 4146, 3589, 3590,
+ 3591, 3592, 182, 3593, 3594, 3595, 3596, 3597, 3598, 3599,
+ 3600, 3601, 3602, 183, 3603, 3604, 3605, 3606, 3607, 3608,
+ 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 4147,
+ 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627,
+ 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637,
+ 3638, 3639, 3640, 4148, 3641, 3642, 4149, 3643, 3644, 3645,
+ 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655,
+ 3656, 3657, 3658, 3659, 184, 3660, 3661, 3662, 3663, 4150,
+ 4151, 4152, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671,
+ 0, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681,
+ 3682, 4153, 4154, 3684, 3685, 3686, 3687, 3688, 3689, 3690,
+ 3691, 3692, 3693, 185, 186, 187, 0, 189, 190, 191,
+ 192, 193, 194, 3694, 3695, 3696, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 4155,
+ 218, 4156, 4157, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 0, 4158, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 4159, 4160, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 4161, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 4162, 315, 316, 317, 0, 318, 319, 320, 0, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 4163, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 0, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 4164, 4165, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 0, 4166,
+ 4167, 432, 3700, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 0, 4168, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 5504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 0, 516, 517, 518, 519,
+ 520, 0, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 4170, 565, 566, 4171, 568,
+ 569, 4172, 571, 572, 573, 574, 575, 576, 5505, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 0, 4174, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 0, 605, 606, 607, 608,
+ 0, 609, 610, 611, 4175, 174, 175, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459,
+ 3460, 3461, 4130, 4131, 3463, 3464, 3465, 4132, 4133, 3466,
+ 3467, 3468, 3469, 3470, 3471, 3472, 3473, 4134, 3475, 3476,
+ 0, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485,
+ 3486, 3487, 0, 3488, 176, 3489, 3490, 3491, 3492, 3493,
+ 3494, 3495, 4135, 3497, 3498, 3499, 3500, 3501, 3502, 3503,
+ 3504, 3505, 3506, 3507, 3508, 4136, 3510, 3511, 3512, 3513,
+ 3514, 3515, 177, 3516, 3517, 3518, 3519, 3520, 3521, 3522,
+ 3523, 4137, 3525, 0, 3526, 3527, 3528, 3529, 3530, 0,
+ 0, 178, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538,
+ 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 4138,
+ 3549, 4139, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558,
+ 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568,
+ 4140, 4141, 4142, 3569, 3570, 3571, 3572, 3573, 3574, 3575,
+ 4143, 4144, 4145, 3576, 180, 3577, 3578, 3579, 3580, 3581,
+ 3582, 181, 3583, 3584, 3585, 3586, 3587, 3588, 4146, 3589,
+ 3590, 3591, 3592, 182, 3593, 3594, 3595, 3596, 3597, 3598,
+ 3599, 3600, 3601, 3602, 183, 3603, 3604, 3605, 3606, 3607,
+ 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617,
+ 4147, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626,
+ 3627, 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636,
+ 3637, 3638, 3639, 3640, 4148, 3641, 3642, 4149, 3643, 3644,
+ 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654,
+ 3655, 3656, 3657, 3658, 3659, 184, 3660, 3661, 3662, 3663,
+ 4150, 4151, 4152, 3664, 3665, 3666, 3667, 3668, 3669, 3670,
+ 3671, 0, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680,
+ 3681, 3682, 4153, 4154, 3684, 3685, 3686, 3687, 3688, 3689,
+ 3690, 3691, 3692, 3693, 185, 186, 187, 0, 189, 190,
+ 191, 192, 193, 194, 3694, 3695, 3696, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 4155, 218, 4156, 4157, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 0, 4158,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 4159, 4160, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 4161, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 4162, 315, 316, 317, 0, 318, 319, 320, 0,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 4163, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 0, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 4164, 4165, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 0,
+ 4166, 4167, 432, 3700, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 0, 4168, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 0, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 0, 516, 517, 518,
+ 519, 520, 0, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 4170, 565, 566, 4171,
+ 568, 569, 4172, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 0, 4174, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 0, 605, 606, 607,
+ 608, 0, 609, 610, 611, 4175, 174, 175, 793, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 698, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 851, 852, 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, 853, 0, 0,
+ 0, 854, 0, 0, 0, 176, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 855, 0,
+ 0, 0, 0, 0, 0, 0, 0, 856, 0, 0,
+ 0, 0, 0, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 857, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 858, 0, 0, 0, 0, 859, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 860, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 861,
+ 0, 0, 0, 862, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 863, 0, 0, 0, 864, 865, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 184, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 866, 0, 0, 0,
+ 0, 0, 0, 867, 868, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 869, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 870, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 871, 298, 299, 300, 301, 872, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 873,
+ 874, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 875, 463, 464, 465, 876, 467,
+ 468, 469, 470, 471, 877, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 878, 484, 485, 486, 487,
+ 488, 879, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 880, 521, 522, 523, 881, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 882, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 793,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 698,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1140, 852, 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, 853, 0,
+ 0, 0, 854, 0, 0, 0, 176, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 855,
+ 0, 0, 0, 0, 0, 0, 0, 0, 856, 0,
+ 0, 0, 0, 0, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 857,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 858, 0, 0, 0, 0, 859, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 860, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 861, 0, 0, 0, 862, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 863, 0, 0, 0, 864, 865, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 184, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 866, 0, 0,
+ 0, 0, 0, 0, 867, 868, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 1141, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 869, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 870, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 871, 298, 299, 300, 301, 872,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 873, 874, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 875, 463, 464, 465, 1142,
+ 467, 468, 469, 470, 471, 877, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 878, 484, 485, 486,
+ 487, 488, 879, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 880, 521, 522, 523, 881, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 882, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 0, 0, 0, 2210, 2211, 5227, 0, 5228, 0, 5229,
+ 698, 5230, 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, 176, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5231, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 174,
+ 175, 793, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 698, 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, 854, 1412, 0, 0, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 793, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 698, 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, 1769, 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, 176,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1770, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 174, 175, 0, 0, 1298, 0, 0, 1299, 1300,
+ 0, 0, 0, 1301, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 793, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 698, 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,
+ 1754, 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, 176, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1755, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 174, 175, 793, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 698, 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, 1412,
+ 0, 0, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 0,
+ 609, 610, 611, 612, 174, 175, 793, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 698, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1805, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 174, 175, 793, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 698, 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,
+ 854, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 0, 609, 610, 611, 612, 1554, 1555, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 2408, 2409, 2410, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 793,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 698,
+ 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, 176, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3073, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 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, 3405, 3406, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3407, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 0, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 3408, 3409, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 3410, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 3411,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 174,
+ 175, 793, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 698, 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, 1754, 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, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 793, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 698, 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, 176,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5027, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 174, 175, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 0, 0, 0,
+ 5236, 0, 0, 5237, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 5238, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 793, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 698, 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, 176, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5369, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 174, 175, 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, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 664, 0, 0, 0, 0, 0, 0, 0,
+ 0, 665, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 0,
+ 609, 610, 611, 612, 174, 175, 793, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 698, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 174, 175, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 0, 178, 1527, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 1528, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 0, 609, 610, 611, 612, 174, 175, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 698, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4333, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 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, 176, 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, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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, 665, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 184, 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, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 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, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1450, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 1554,
+ 1555, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1556, 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, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 1554, 1555, 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, 176,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1764, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 1554, 1555, 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,
+ 176, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2476, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 2477,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 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, 2489, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 174, 175, 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, 176, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3148, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 0,
+ 609, 610, 611, 612, 1554, 1555, 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, 176, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2476, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 174, 175, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 0, 0, 0, 0, 0,
+ 0, 4382, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 0, 609, 610, 611, 612, 174, 175, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 698, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 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, 4801, 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, 176, 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, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 179, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 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, 176, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5313, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 174,
+ 175, 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, 176, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5323,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 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, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 179, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 0, 0, 0, 0, 0, 0, 5714, 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,
+ 184, 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, 185,
+ 186, 187, 188, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 174, 175, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 179, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 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, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 705, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 174, 175, 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, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 0, 0, 0, 179, 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, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 0, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
+ 783, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 0, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 0, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 0,
+ 609, 610, 611, 612, 1554, 1555, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 0, 0, 0, 179,
+ 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, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 215, 0, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 0, 0,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 0, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 0,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 577, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 0, 609, 610, 611, 612, 174, 175, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 179, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, 212, 213, 214, 215, 0, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 0, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 0, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 0, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 1919,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 0, 609, 610, 611, 612, 174, 175, 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, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 0, 0,
+ 0, 179, 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, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 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, 184, 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, 2494, 186, 187, 188, 189,
+ 190, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 0,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 0, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 0, 0, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 0, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 0, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 0, 609, 610, 611, 612, 174, 175, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 698,
+ 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, 176, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3052, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 177, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3053, 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, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187, 3054,
+ 189, 190, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 0, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 0, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 0, 0, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 0, 318, 319,
+ 320, 3055, 322, 323, 324, 325, 0, 327, 328, 329,
+ 330, 331, 0, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 0, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 3056, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 0,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 3057, 605,
+ 606, 607, 608, 0, 609, 610, 611, 612, 174, 175,
+ 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, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 0, 0, 0, 179, 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, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 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, 184, 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, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 0, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 0, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
+ 302, 303, 0, 0, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 3175, 314, 315, 316, 317, 0, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 0, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 3176, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 0, 609, 610, 611, 612, 174,
+ 175, 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, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 179, 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, 180, 0,
+ 0, 0, 0, 0, 0, 5666, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 185, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 0, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 0, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 300,
+ 301, 302, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 0,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 0, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 0, 609, 610, 611, 612,
+ 174, 175, 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, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2819, 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, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 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,
+ 184, 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, 185,
+ 186, 187, 2820, 189, 190, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 0, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 0, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 0, 0, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 0, 318, 319, 320, 2821, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 0, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 0, 605, 606, 607, 608, 0, 609, 610, 611,
+ 612, 174, 175, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 698, 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,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3053, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 3054, 189, 190, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 0, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 0, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 0, 318, 319, 320, 3055, 322, 323, 324, 325,
+ 0, 327, 328, 329, 330, 331, 0, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 0, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 3056,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 0, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 3057, 605, 606, 607, 608, 0, 609, 610,
+ 611, 612, 174, 175, 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, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3407, 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, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 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, 184, 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, 185, 186, 187, 0, 189, 190, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 0, 318, 319, 320, 3410, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 3411, 605, 606, 607, 608, 0, 609,
+ 610, 611, 612, 174, 175, 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, 6, 0, 0, 0, 0, 0, 0, 0,
+ 0, 902, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 176, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -3623, -3623, -3623,
+ 177, 0, 0, 0, 0, 0, 0, 903, 0, 0,
+ 0, 14, 0, 0, 904, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 16, 0, 0, 905, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 906, 0, 0, 0, 0, 0, 0, 0, 907,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 21, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 29, 0, 0, 0, 0,
+ 908, 909, 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, 184, 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, 40, 0, 0,
+ 0, 0, 185, 186, 187, 910, 189, 0, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 0, 206, 207, 208, 209,
+ 210, 211, 212, 213, 0, 911, 0, 0, 217, 218,
+ 219, 220, 221, 0, 0, 224, 225, 226, 227, 228,
+ 0, 0, 0, 232, 233, 234, 235, 236, 912, 238,
+ 239, 240, 241, 0, 0, 0, 0, 0, 0, 247,
+ 0, 249, 0, 251, 252, 0, 254, 255, 256, 257,
+ 258, 259, 0, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 0, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 0, 284, 285, 286,
+ 287, -3623, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 0, 0, 0, 303, 0, 913, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 0, 0, 0, 0, 0, 319, 320, 914, 322, 323,
+ 324, 0, 326, 327, 0, 329, 330, 0, 0, 332,
+ 0, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 0, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 0, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 0, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 915, 0, 0, 440,
+ 0, 442, 443, 0, 445, 446, 447, 448, 0, 450,
+ 451, 452, 453, 0, 0, 0, 0, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 0, 485, 0, 487, 488, 489, 0,
+ 491, 492, 0, 494, 495, 496, 497, 498, 499, 0,
+ 501, 502, 503, 504, 505, 506, 507, 0, 509, 510,
+ 511, 0, 513, 514, 515, 516, 0, 518, 519, 0,
+ 0, 522, 523, 0, 0, 526, 527, 528, 0, 530,
+ 0, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 0, 541, 542, 0, 544, 0, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 0, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 0, 577, 578, 0,
+ 580, 581, 582, 583, 174, 175, 586, 587, 0, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 0, 0, 606, 607, 0, 0,
+ 609, 0, 611, 612, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6, 0, 0, 0, 0, 0, 0,
+ 0, 0, 902, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 176, 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, -3624,
+ 0, 177, 0, 0, 0, 0, 0, 0, 903, 0,
+ 0, 0, 14, 0, 0, 904, 0, 0, 0, 0,
+ 178, 0, 0, 0, 0, 0, 16, 0, 0, 905,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 906, 0, 0, 0, 0, 0, 0, 0,
+ 907, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 21, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 180, 0, 0, 0, 0, 0, 0,
+ 181, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 182, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 183, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 29, 0, 0, 0,
+ 0, 908, 909, 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, 184, 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, -3624, 0, 40, 0,
+ 0, 0, 0, 185, 186, 187, 910, 189, 0, 191,
+ 192, 193, 194, 0, 0, 0, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 0, 206, 207, 208,
+ 209, 210, 211, 212, 213, 0, 911, 0, 0, 217,
+ 218, 219, 220, 221, 0, 0, 224, 225, 226, 227,
+ 228, 0, 0, 0, 232, 233, 234, 235, 236, 912,
+ 238, 239, 240, 241, 0, 0, 0, 0, 0, 0,
+ 247, 0, 249, 0, 251, 252, 0, 254, 255, 256,
+ 257, 258, 259, 0, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 0, 275, 0,
+ 276, 277, 278, 279, 280, 281, 282, 0, 284, 285,
+ 286, 287, -3624, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 0, 0, 0, 303, 0, 913,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 0, 0, 0, 0, 0, 319, 320, 914, 322,
+ 323, 324, 0, 326, 327, 0, 329, 330, 0, 0,
+ 332, 0, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 0, 346, 347, 348, 349, 350, 351,
+ 352, 353, 354, 0, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 0, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 0, 425, 426, 427, 428, 429, 430,
+ 431, 432, 0, 433, 434, 435, 436, 915, 0, 0,
+ 440, 0, 442, 443, 0, 445, 446, 447, 448, 0,
+ 450, 451, 452, 453, 0, 0, 0, 0, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 474, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 0, 485, 0, 487, 488, 489,
+ 0, 491, 492, 0, 494, 495, 496, 497, 498, 499,
+ 0, 501, 502, 503, 504, 505, 506, 507, 0, 509,
+ 510, 511, 0, 513, 514, 515, 516, 0, 518, 519,
+ 0, 0, 522, 523, 0, 0, 526, 527, 528, 0,
+ 530, 0, 532, 533, 534, 535, 0, 536, 537, 538,
+ 539, 0, 541, 542, 0, 544, 0, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 0, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 0, 577, 578,
+ 0, 580, 581, 582, 583, 174, 175, 586, 587, 0,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 0, 0, 606, 607, 0,
+ 0, 609, 0, 611, 612, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
+ 0, 0, 0, 902, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0, 0, 0, 903,
+ 0, 0, 0, 14, 0, 0, 904, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 16, 0, 0,
+ 905, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 906, 0, 0, 0, 0, 0, 0,
+ 0, 907, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 21, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 29, 0, 0,
+ 0, 0, 908, 909, 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, 184, 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, 40,
+ 0, 0, 0, 0, 185, 186, 187, 910, 189, 0,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 0, 206, 207,
+ 208, 209, 210, 211, 212, 213, 0, 911, 0, 0,
+ 217, 218, 219, 220, 221, 0, 0, 224, 225, 226,
+ 227, 228, 0, 0, 0, 232, 233, 234, 235, 236,
+ 912, 238, 239, 240, 241, 0, 0, 0, 0, 0,
+ 0, 247, 0, 249, 0, 251, 252, 0, 254, 255,
+ 256, 257, 258, 259, 0, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 0, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 0, 284,
+ 285, 286, 287, 1538, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 0, 0, 0, 303, 0,
+ 913, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 0, 0, 0, 0, 0, 319, 320, 914,
+ 322, 323, 324, 0, 326, 327, 0, 329, 330, 0,
+ 0, 332, 0, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 0, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 0, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 0, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 915, 0,
+ 0, 440, 0, 442, 443, 0, 445, 446, 447, 448,
+ 0, 450, 451, 452, 453, 0, 0, 0, 0, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 0, 485, 0, 487, 488,
+ 489, 0, 491, 492, 0, 494, 495, 496, 497, 498,
+ 499, 0, 501, 502, 503, 504, 505, 506, 507, 0,
+ 509, 510, 511, 0, 513, 514, 515, 516, 0, 518,
+ 519, 0, 0, 522, 523, 0, 0, 526, 527, 528,
+ 0, 530, 0, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 0, 541, 542, 0, 544, 0, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 0, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 0, 577,
+ 578, 0, 580, 581, 582, 583, 174, 175, 586, 587,
+ 0, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 0, 0, 606, 607,
+ 0, 0, 609, 0, 611, 612, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
+ 0, 0, 0, 0, 902, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0, 0, 0,
+ 903, 0, 0, 0, 14, 0, 0, 904, 0, 0,
+ 0, 0, 178, 0, 0, 0, 0, 0, 16, 0,
+ 0, 905, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 906, 0, 0, 0, 0, 0,
+ 0, 0, 907, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 21, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 180, 0, 0, 0, 0,
+ 0, 0, 181, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 182, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 183, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 29, 0,
+ 0, 0, 0, 908, 909, 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, 184, 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,
+ 40, 0, 0, 0, 0, 185, 186, 187, 910, 189,
+ 0, 191, 192, 193, 194, 0, 0, 0, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 0, 206,
+ 207, 208, 209, 210, 211, 212, 213, 0, 911, 0,
+ 0, 217, 218, 219, 220, 221, 0, 0, 224, 225,
+ 226, 227, 228, 0, 0, 0, 232, 233, 234, 235,
+ 236, 912, 238, 239, 240, 241, 0, 0, 0, 0,
+ 0, 0, 247, 0, 249, 0, 251, 252, 0, 254,
+ 255, 256, 257, 258, 259, 0, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 0,
+ 275, 0, 276, 277, 278, 279, 280, 281, 282, 0,
+ 284, 285, 286, 287, 3377, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 0, 0, 0, 303,
+ 0, 913, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 0, 0, 0, 0, 0, 319, 320,
+ 914, 322, 323, 324, 0, 326, 327, 0, 329, 330,
+ 0, 0, 332, 0, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 0, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 0, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 0,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 0, 425, 426, 427, 428,
+ 429, 430, 431, 432, 0, 433, 434, 435, 436, 915,
+ 0, 0, 440, 0, 442, 443, 0, 445, 446, 447,
+ 448, 0, 450, 451, 452, 453, 0, 0, 0, 0,
+ 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 0, 485, 0, 487,
+ 488, 489, 0, 491, 492, 0, 494, 495, 496, 497,
+ 498, 499, 0, 501, 502, 503, 504, 505, 506, 507,
+ 0, 509, 510, 511, 0, 513, 514, 515, 516, 0,
+ 518, 519, 0, 0, 522, 523, 0, 0, 526, 527,
+ 528, 0, 530, 0, 532, 533, 534, 535, 0, 536,
+ 537, 538, 539, 0, 541, 542, 0, 544, 0, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 0,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 0,
+ 577, 578, 0, 580, 581, 582, 583, 174, 175, 586,
+ 587, 0, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 0, 0, 606,
+ 607, 0, 0, 609, 0, 611, 612, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 0, 0, 0, 0, 0, 902, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0, 0,
+ 0, 903, 0, 0, 0, 14, 0, 0, 904, 0,
+ 0, 0, 0, 178, 0, 0, 0, 0, 0, 16,
+ 0, 0, 905, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 906, 0, 0, 0, 0,
+ 0, 0, 0, 907, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 21, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 180, 0, 0, 0,
+ 0, 0, 0, 181, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 182, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 183, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
+ 0, 0, 0, 0, 908, 909, 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, 184, 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, 40, 0, 0, 0, 0, 185, 186, 187, 910,
+ 189, 0, 191, 192, 193, 194, 0, 0, 0, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 0,
+ 206, 207, 208, 209, 210, 211, 212, 213, 0, 911,
+ 0, 0, 217, 218, 219, 220, 221, 0, 0, 224,
+ 225, 226, 227, 228, 0, 0, 0, 232, 233, 234,
+ 235, 236, 912, 238, 239, 240, 241, 0, 0, 0,
+ 0, 0, 0, 247, 0, 249, 0, 251, 252, 0,
+ 254, 255, 256, 257, 258, 259, 0, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 0, 275, 0, 276, 277, 278, 279, 280, 281, 282,
+ 0, 284, 285, 286, 287, 3431, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 0, 0, 0,
+ 303, 0, 913, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 0, 0, 0, 0, 0, 319,
+ 320, 914, 322, 323, 324, 0, 326, 327, 0, 329,
+ 330, 0, 0, 332, 0, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 0, 346, 347, 348,
+ 349, 350, 351, 352, 353, 354, 0, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 0, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 0, 425, 426, 427,
+ 428, 429, 430, 431, 432, 0, 433, 434, 435, 436,
+ 915, 0, 0, 440, 0, 442, 443, 0, 445, 446,
+ 447, 448, 0, 450, 451, 452, 453, 0, 0, 0,
+ 0, 458, 459, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, 474, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 0, 485, 0,
+ 487, 488, 489, 0, 491, 492, 0, 494, 495, 496,
+ 497, 498, 499, 0, 501, 502, 503, 504, 505, 506,
+ 507, 0, 509, 510, 511, 0, 513, 514, 515, 516,
+ 0, 518, 519, 0, 0, 522, 523, 0, 0, 526,
+ 527, 528, 0, 530, 0, 532, 533, 534, 535, 0,
+ 536, 537, 538, 539, 0, 541, 542, 0, 544, 0,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 0, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 0, 577, 578, 0, 580, 581, 582, 583, 174, 175,
+ 586, 587, 0, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 0, 0,
+ 606, 607, 0, 0, 609, 0, 611, 612, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6, 0, 0,
+ 0, 0, 0, 0, 0, 0, 902, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0, 0,
+ 0, 0, 903, 0, 0, 0, 14, 0, 0, 904,
+ 0, 0, 0, 0, 178, 0, 0, 0, 0, 0,
+ 16, 0, 0, 905, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 906, 0, 0, 0,
+ 0, 0, 0, 0, 907, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 21, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 180, 0, 0,
+ 0, 0, 0, 0, 181, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 182, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 183, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 29, 0, 0, 0, 0, 908, 909, 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, 184, 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, 40, 0, 0, 0, 0, 185, 186, 187,
+ 910, 189, 0, 191, 192, 193, 194, 0, 0, 0,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 0, 206, 207, 208, 209, 210, 211, 212, 213, 0,
+ 911, 0, 0, 217, 218, 219, 220, 221, 0, 0,
+ 224, 225, 226, 227, 228, 0, 0, 0, 232, 233,
+ 234, 235, 236, 912, 238, 239, 240, 241, 0, 0,
+ 0, 0, 0, 0, 247, 0, 249, 0, 251, 252,
+ 0, 254, 255, 256, 257, 258, 259, 0, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 0, 275, 0, 276, 277, 278, 279, 280, 281,
+ 282, 0, 284, 285, 286, 287, 3893, 289, 290, 291,
+ 292, 293, 294, 295, 296, 297, 298, 299, 0, 0,
+ 0, 303, 0, 913, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 0, 0, 0, 0, 0,
+ 319, 320, 914, 322, 323, 324, 0, 326, 327, 0,
+ 329, 330, 0, 0, 332, 0, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 0, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 0, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 0, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 0, 425, 426,
+ 427, 428, 429, 430, 431, 432, 0, 433, 434, 435,
+ 436, 915, 0, 0, 440, 0, 442, 443, 0, 445,
+ 446, 447, 448, 0, 450, 451, 452, 453, 0, 0,
+ 0, 0, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 0, 485,
+ 0, 487, 488, 489, 0, 491, 492, 0, 494, 495,
+ 496, 497, 498, 499, 0, 501, 502, 503, 504, 505,
+ 506, 507, 0, 509, 510, 511, 0, 513, 514, 515,
+ 516, 0, 518, 519, 0, 0, 522, 523, 0, 0,
+ 526, 527, 528, 0, 530, 0, 532, 533, 534, 535,
+ 0, 536, 537, 538, 539, 0, 541, 542, 0, 544,
+ 0, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 0, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 0, 577, 578, 0, 580, 581, 582, 583, 174,
+ 175, 586, 587, 0, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 0,
+ 0, 606, 607, 0, 0, 609, 0, 611, 612, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6, 0,
+ 0, 0, 0, 0, 0, 0, 0, 902, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 176, 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, 177, 0, 0, 0,
+ 0, 0, 0, 903, 0, 0, 0, 14, 0, 0,
+ 904, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 16, 0, 0, 905, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 906, 0, 0,
+ 0, 0, 0, 0, 0, 907, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 21, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 29, 0, 0, 0, 0, 908, 909, 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, 184,
+ 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, 40, 0, 0, 0, 0, 185, 186,
+ 187, 910, 189, 0, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 0, 206, 207, 208, 209, 210, 211, 212, 213,
+ 0, 911, 0, 0, 217, 218, 219, 220, 221, 0,
+ 0, 224, 225, 226, 227, 228, 0, 0, 0, 232,
+ 233, 234, 235, 236, 912, 238, 239, 240, 241, 0,
+ 0, 0, 0, 0, 0, 247, 0, 249, 0, 251,
+ 252, 0, 254, 255, 256, 257, 258, 259, 0, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 0, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 0, 284, 285, 286, 287, 3899, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 0,
+ 0, 0, 303, 0, 913, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 0, 0, 0, 0,
+ 0, 319, 320, 914, 322, 323, 324, 0, 326, 327,
+ 0, 329, 330, 0, 0, 332, 0, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 0, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 0, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 0, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 915, 0, 0, 440, 0, 442, 443, 0,
+ 445, 446, 447, 448, 0, 450, 451, 452, 453, 0,
+ 0, 0, 0, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 0,
+ 485, 0, 487, 488, 489, 0, 491, 492, 0, 494,
+ 495, 496, 497, 498, 499, 0, 501, 502, 503, 504,
+ 505, 506, 507, 0, 509, 510, 511, 0, 513, 514,
+ 515, 516, 0, 518, 519, 0, 0, 522, 523, 0,
+ 0, 526, 527, 528, 0, 530, 0, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 0, 541, 542, 0,
+ 544, 0, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 0, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 0, 577, 578, 0, 580, 581, 582, 583,
+ 174, 175, 586, 587, 0, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 0, 0, 606, 607, 0, 0, 609, 0, 611, 612,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 902, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 176,
+ 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, 177, 0, 0,
+ 0, 0, 0, 0, 903, 0, 0, 0, 14, 0,
+ 0, 904, 0, 0, 0, 0, 178, 0, 0, 0,
+ 0, 0, 16, 0, 0, 905, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 906, 0,
+ 0, 0, 0, 0, 0, 0, 907, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 21, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 180,
+ 0, 0, 0, 0, 0, 0, 181, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0, 0, 908, 909, 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,
+ 184, 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, 40, 0, 0, 0, 0, 185,
+ 186, 187, 910, 189, 0, 191, 192, 193, 194, 0,
+ 0, 0, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 0, 206, 207, 208, 209, 210, 211, 212,
+ 213, 0, 911, 0, 0, 217, 218, 219, 220, 221,
+ 0, 0, 224, 225, 226, 227, 228, 0, 0, 0,
+ 232, 233, 234, 235, 236, 912, 238, 239, 240, 241,
+ 0, 0, 0, 0, 0, 0, 247, 0, 249, 0,
+ 251, 252, 0, 254, 255, 256, 257, 258, 259, 0,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 0, 275, 0, 276, 277, 278, 279,
+ 280, 281, 282, 0, 284, 285, 286, 287, 4198, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 0, 0, 0, 303, 0, 913, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 0, 0, 0,
+ 0, 0, 319, 320, 914, 322, 323, 324, 0, 326,
+ 327, 0, 329, 330, 0, 0, 332, 0, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 0,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 0,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 0, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 0,
+ 425, 426, 427, 428, 429, 430, 431, 432, 0, 433,
+ 434, 435, 436, 915, 0, 0, 440, 0, 442, 443,
+ 0, 445, 446, 447, 448, 0, 450, 451, 452, 453,
+ 0, 0, 0, 0, 458, 459, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ 474, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 0, 485, 0, 487, 488, 489, 0, 491, 492, 0,
+ 494, 495, 496, 497, 498, 499, 0, 501, 502, 503,
+ 504, 505, 506, 507, 0, 509, 510, 511, 0, 513,
+ 514, 515, 516, 0, 518, 519, 0, 0, 522, 523,
+ 0, 0, 526, 527, 528, 0, 530, 0, 532, 533,
+ 534, 535, 0, 536, 537, 538, 539, 0, 541, 542,
+ 0, 544, 0, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 0, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 0, 577, 578, 0, 580, 581, 582,
+ 583, 174, 175, 586, 587, 0, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 0, 0, 606, 607, 0, 0, 609, 0, 611,
+ 612, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 0, 0, 0, 0, 0, 902,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 176, 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, 177, 0,
+ 0, 0, 0, 0, 0, 903, 0, 0, 0, 14,
+ 0, 0, 904, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 16, 0, 0, 905, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 906,
+ 0, 0, 0, 0, 0, 0, 0, 907, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 29, 0, 0, 0, 0, 908, 909,
+ 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, 184, 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, 40, 0, 0, 0, 0,
+ 185, 186, 187, 910, 189, 0, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 0, 206, 207, 208, 209, 210, 211,
+ 212, 213, 0, 911, 0, 0, 217, 218, 219, 220,
+ 221, 0, 0, 224, 225, 226, 227, 228, 0, 0,
+ 0, 232, 233, 234, 235, 236, 912, 238, 239, 240,
+ 241, 0, 0, 0, 0, 0, 0, 247, 0, 249,
+ 0, 251, 252, 0, 254, 255, 256, 257, 258, 259,
+ 0, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 0, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 0, 284, 285, 286, 287, 0,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 0, 0, 0, 303, 0, 913, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 0, 0,
+ 0, 0, 0, 319, 320, 914, 322, 323, 324, 0,
+ 326, 327, 0, 329, 330, 0, 0, 332, 0, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 0, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 0, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 0, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 915, 0, 0, 440, 0, 442,
+ 443, 0, 445, 446, 447, 448, 0, 450, 451, 452,
+ 453, 0, 0, 0, 0, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 0, 485, 0, 487, 488, 489, 0, 491, 492,
+ 0, 494, 495, 496, 497, 498, 499, 0, 501, 502,
+ 503, 504, 505, 506, 507, 0, 509, 510, 511, 0,
+ 513, 514, 515, 516, 0, 518, 519, 0, 0, 522,
+ 523, 0, 0, 526, 527, 528, 0, 530, 0, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 0, 541,
+ 542, 0, 544, 0, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 0, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 0, 577, 578, 0, 580, 581,
+ 582, 583, 174, 175, 586, 587, 0, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 0, 0, 606, 607, 0, 0, 609, 0,
+ 611, 612, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 902, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 176, 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, 177,
+ 0, 0, 0, 0, 0, 0, 903, 0, 0, 0,
+ 14, 0, 0, 904, 0, 0, 0, 0, 178, 0,
+ 0, 0, 0, 0, 16, 0, 0, 905, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 906, 0, 0, 0, 0, 0, 0, 0, 907, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 21, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 180, 0, 0, 0, 0, 0, 0, 181, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 183, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 29, 0, 0, 0, 0, 908,
+ 909, 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, 184, 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, 40, 0, 0, 0,
+ 0, 185, 186, 187, 910, 189, 0, 191, 192, 193,
+ 194, 0, 0, 0, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 0, 206, 207, 208, 209, 210,
+ 211, 212, 213, 0, 911, 0, 0, 217, 218, 219,
+ 220, 221, 0, 0, 224, 225, 226, 227, 228, 0,
+ 0, 0, 232, 233, 234, 235, 236, 912, 238, 239,
+ 240, 241, 0, 0, 0, 0, 0, 0, 247, 0,
+ 249, 0, 251, 252, 0, 254, 255, 256, 257, 258,
+ 259, 0, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 0, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 0, 284, 285, 286, 287,
+ 0, 289, 290, 291, 292, 293, 294, 295, 296, 297,
+ 298, 299, 0, 0, 0, 303, 0, 913, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 0,
+ 0, 0, 0, 0, 319, 320, 914, 322, 323, 324,
+ 0, 326, 327, 0, 329, 330, 0, 0, 332, 0,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 0, 346, 347, 348, 349, 350, 351, 352, 353,
+ 354, 0, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 0, 425, 426, 427, 428, 429, 430, 431, 432,
+ 0, 433, 434, 435, 436, 915, 0, 0, 440, 0,
+ 442, 443, 0, 445, 446, 447, 448, 0, 450, 451,
+ 452, 453, 0, 0, 0, 0, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 0, 485, 0, 487, 488, 489, 0, 491,
+ 492, 0, 494, 495, 496, 497, 498, 499, 0, 501,
+ 502, 503, 504, 505, 506, 507, 0, 509, 510, 511,
+ 0, 513, 514, 515, 516, 0, 518, 519, 0, 0,
+ 522, 523, 0, 0, 526, 527, 528, 0, 530, 0,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 0,
+ 541, 542, 0, 544, 0, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 0, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 0, 577, 578, 0, 580,
+ 581, 582, 583, 174, 175, 586, 1741, 0, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 0, 0, 606, 607, 0, 0, 609,
+ 0, 611, 612, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 176, 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,
+ 177, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 14, 0, 0, 0, 0, 0, 0, 0, 178,
+ 0, 0, 0, 0, 0, 16, 0, 0, 905, 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, 21, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 180, 0, 0, 0, 0, 0, 0, 181,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 183, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 29, 0, 0, 0, 0,
+ 908, 909, 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, 184, 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, 40, 0, 0,
+ 0, 0, 185, 186, 187, 910, 189, 0, 191, 192,
+ 193, 194, 0, 0, 0, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 0, 206, 207, 208, 209,
+ 210, 211, 212, 213, 0, 911, 0, 0, 217, 218,
+ 219, 220, 221, 0, 0, 224, 225, 226, 227, 228,
+ 0, 0, 0, 232, 233, 234, 235, 236, 0, 238,
+ 239, 240, 241, 0, 0, 0, 0, 0, 0, 247,
+ 0, 249, 0, 251, 252, 0, 254, 255, 256, 257,
+ 258, 259, 0, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 0, 275, 0, 276,
+ 277, 278, 279, 280, 281, 282, 0, 284, 285, 286,
+ 287, 0, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 0, 0, 0, 303, 0, 0, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 0, 0, 0, 0, 0, 319, 320, 914, 322, 323,
+ 324, 0, 326, 327, 0, 329, 330, 0, 0, 332,
+ 0, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 0, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 0, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 0, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 0, 425, 426, 427, 428, 429, 430, 431,
+ 432, 0, 433, 434, 435, 436, 0, 0, 0, 440,
+ 0, 442, 443, 0, 445, 446, 447, 448, 0, 450,
+ 451, 452, 453, 0, 0, 0, 0, 458, 459, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, 474, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 0, 485, 0, 487, 488, 489, 0,
+ 491, 492, 0, 494, 495, 496, 497, 498, 499, 0,
+ 501, 502, 503, 504, 505, 506, 507, 0, 509, 510,
+ 511, 0, 513, 514, 515, 516, 0, 518, 519, 174,
+ 175, 522, 523, 0, 0, 526, 527, 528, 0, 530,
+ 0, 532, 533, 534, 535, 0, 536, 537, 538, 539,
+ 0, 541, 542, 0, 544, 0, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 0, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 0, 577, 578, 0,
+ 580, 581, 582, 583, 0, 0, 586, 587, 176, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 0, 0, 606, 607, 0, 0,
+ 609, 0, 611, 612, 0, 0, 177, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 178, 0, 0, 0, 0,
+ 0, 0, 0, 0, 905, 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, 180, 0,
+ 0, 0, 0, 0, 0, 181, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 182, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 183, 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, 184,
+ 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, 1524, 0, 0, 0, 0, 0, 0, 185, 186,
+ 187, 910, 189, 0, 191, 192, 193, 194, 0, 0,
+ 0, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 0, 206, 207, 208, 209, 210, 211, 212, 213,
+ 0, 0, 0, 0, 217, 218, 219, 220, 221, 0,
+ 0, 224, 225, 226, 227, 228, 0, 0, 0, 232,
+ 233, 234, 235, 236, 0, 238, 239, 240, 241, 0,
+ 0, 0, 0, 0, 0, 247, 0, 249, 0, 251,
+ 252, 0, 254, 255, 256, 257, 258, 259, 0, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 0, 275, 0, 276, 277, 278, 279, 280,
+ 281, 282, 0, 284, 285, 286, 287, 0, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 0,
+ 0, 0, 303, 0, 0, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 0, 0, 0, 0,
+ 0, 319, 320, 914, 322, 323, 324, 0, 326, 327,
+ 0, 329, 330, 0, 0, 332, 0, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 0, 346,
+ 347, 348, 349, 350, 351, 352, 353, 354, 0, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 0, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 0, 425,
+ 426, 427, 428, 429, 430, 431, 432, 0, 433, 434,
+ 435, 436, 0, 0, 0, 440, 0, 442, 443, 0,
+ 445, 446, 447, 448, 0, 450, 451, 452, 453, 0,
+ 0, 0, 0, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 0,
+ 485, 0, 487, 488, 489, 0, 491, 492, 0, 494,
+ 495, 496, 497, 498, 499, 0, 501, 502, 503, 504,
+ 505, 506, 507, 0, 509, 510, 511, 0, 513, 514,
+ 515, 516, 0, 518, 519, 174, 175, 522, 523, 0,
+ 0, 526, 527, 528, 0, 530, 0, 532, 533, 534,
+ 535, 0, 536, 537, 538, 539, 0, 541, 542, 0,
+ 544, 0, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 0, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 0, 577, 578, 0, 580, 581, 582, 583,
+ 0, 0, 586, 587, 176, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 0, 0, 606, 607, 0, 0, 609, 0, 611, 612,
+ 0, 0, 177, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 178, 0, 0, 0, 0, 0, 0, 0, 0,
+ 905, 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, 180, 0, 0, 0, 0, 0,
+ 0, 181, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 182, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 183, 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, 184, 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, 1535, 0, 0,
+ 0, 0, 0, 0, 185, 186, 187, 910, 189, 0,
+ 191, 192, 193, 194, 0, 0, 0, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 0, 206, 207,
+ 208, 209, 210, 211, 212, 213, 0, 0, 0, 0,
+ 217, 218, 219, 220, 221, 0, 0, 224, 225, 226,
+ 227, 228, 0, 0, 0, 232, 233, 234, 235, 236,
+ 0, 238, 239, 240, 241, 0, 0, 0, 0, 0,
+ 0, 247, 0, 249, 0, 251, 252, 0, 254, 255,
+ 256, 257, 258, 259, 0, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 0, 275,
+ 0, 276, 277, 278, 279, 280, 281, 282, 0, 284,
+ 285, 286, 287, 0, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 0, 0, 0, 303, 0,
+ 0, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 0, 0, 0, 0, 0, 319, 320, 914,
+ 322, 323, 324, 0, 326, 327, 0, 329, 330, 0,
+ 0, 332, 0, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 0, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 0, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 0, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 0, 425, 426, 427, 428, 429,
+ 430, 431, 432, 0, 433, 434, 435, 436, 0, 0,
+ 0, 440, 0, 442, 443, 0, 445, 446, 447, 448,
+ 0, 450, 451, 452, 453, 0, 0, 0, 0, 458,
+ 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, 474, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 0, 485, 0, 487, 488,
+ 489, 0, 491, 492, 0, 494, 495, 496, 497, 498,
+ 499, 0, 501, 502, 503, 504, 505, 506, 507, 0,
+ 509, 510, 511, 0, 513, 514, 515, 516, 0, 518,
+ 519, 174, 175, 522, 523, 0, 0, 526, 527, 528,
+ 0, 530, 0, 532, 533, 534, 535, 0, 536, 537,
+ 538, 539, 0, 541, 542, 0, 544, 0, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 0, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 0, 577,
+ 578, 0, 580, 581, 582, 583, 0, 0, 586, 587,
+ 176, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 0, 0, 606, 607,
+ 0, 0, 609, 0, 611, 612, 0, 0, 177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 178, 0, 0,
+ 0, 0, 0, 0, 0, 0, 905, 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,
+ 180, 0, 0, 0, 0, 0, 0, 181, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 183, 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, 184, 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,
+ 185, 186, 187, 910, 189, 0, 191, 192, 193, 194,
+ 0, 0, 0, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 0, 206, 207, 208, 209, 210, 211,
+ 212, 213, 0, 0, 0, 0, 217, 218, 219, 220,
+ 221, 0, 0, 224, 225, 226, 227, 228, 0, 0,
+ 0, 232, 233, 234, 235, 236, 0, 238, 239, 240,
+ 241, 0, 0, 0, 0, 0, 0, 247, 0, 249,
+ 0, 251, 252, 0, 254, 255, 256, 257, 258, 259,
+ 0, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 0, 275, 0, 276, 277, 278,
+ 279, 280, 281, 282, 0, 284, 285, 286, 287, 0,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 0, 0, 0, 303, 0, 0, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 0, 0,
+ 0, 0, 0, 319, 320, 914, 322, 323, 324, 0,
+ 326, 327, 0, 329, 330, 0, 0, 332, 0, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 0, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 0, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 0, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 0, 425, 426, 427, 428, 429, 430, 431, 432, 0,
+ 433, 434, 435, 436, 0, 0, 0, 440, 0, 442,
+ 443, 0, 445, 446, 447, 448, 0, 450, 451, 452,
+ 453, 0, 0, 0, 0, 458, 459, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 0, 485, 0, 487, 488, 489, 0, 491, 492,
+ 0, 494, 495, 496, 497, 498, 499, 0, 501, 502,
+ 503, 504, 505, 506, 507, 0, 509, 510, 511, 0,
+ 513, 514, 515, 516, 0, 518, 519, 0, 0, 522,
+ 523, 0, 0, 526, 527, 528, 0, 530, 0, 532,
+ 533, 534, 535, 0, 536, 537, 538, 539, 0, 541,
+ 542, 0, 544, 0, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 0, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 0, 577, 578, 0, 580, 581,
+ 582, 583, 0, 0, 586, 587, 0, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 174, 175, 606, 607, 0, 0, 609, 0,
+ 611, 612, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3451, 3452,
+ 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 0,
+ 3462, 3463, 3464, 3465, 0, 0, 3466, 3467, 3468, 3469,
+ 3470, 3471, 3472, 3473, 3474, 3475, 3476, 0, 3477, 3478,
+ 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 0,
+ 3488, 176, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496,
+ 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506,
+ 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 177,
+ 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525,
+ 0, 3526, 3527, 3528, 3529, 3530, 0, 0, 178, 3531,
+ 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541,
+ 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551,
+ 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561,
+ 3562, 3563, 3564, 3565, 3566, 3567, 3568, 0, 0, 0,
+ 3569, 3570, 3571, 3572, 3573, 3574, 3575, 0, 0, 0,
+ 3576, 180, 3577, 3578, 3579, 3580, 3581, 3582, 181, 3583,
+ 3584, 3585, 3586, 3587, 3588, 0, 3589, 3590, 3591, 3592,
+ 182, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601,
+ 3602, 183, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610,
+ 3611, 3612, 3613, 3614, 3615, 3616, 3617, 0, 3618, 3619,
+ 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629,
+ 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639,
+ 3640, 0, 3641, 3642, 0, 3643, 3644, 3645, 3646, 3647,
+ 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657,
+ 3658, 3659, 184, 3660, 3661, 3662, 3663, 0, 0, 0,
+ 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673,
+ 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 0,
+ 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692,
+ 3693, 185, 186, 187, 0, 189, 190, 191, 192, 193,
+ 194, 3694, 3695, 3696, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
+ 211, 212, 213, 214, 215, 0, 216, 0, 218, 0,
+ 0, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 0, 0, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 0, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 3697, 3698, 273, 274, 275, 0, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 0, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 0, 0, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 0, 315,
+ 316, 317, 0, 318, 319, 320, 0, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 0, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, 352, 0,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 0, 389, 390, 391, 392,
+ 393, 394, 395, 0, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 0, 3699, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 0, 0, 0, 432,
+ 3700, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 0, 0,
+ 472, 473, 474, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 0, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 0, 516, 517, 518, 519, 520, 3701,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 0, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 0, 565, 566, 0, 568, 569, 3702,
+ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 0, 3703, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 0, 605, 606, 607, 608, 0, 609,
+ 610, 611
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 5, 165, 68, 44, 163, 916, 0, 0, 678, 679,
+ 1671, 1397, 0, 1171, 1906, 1173, 1174, 1722, 657, 1876,
+ 173, 26, 789, 1181, 1932, 30, 2086, 22, 2044, 657,
+ 35, 1456, 789, 38, 673, 0, 162, 1595, 1735, 678,
+ 1580, 3047, 759, 2694, 0, 673, 51, 1586, 3355, 2553,
+ 2096, 1931, 57, 678, 2015, 1229, 61, 52, 2848, 1365,
+ 678, 3273, 1368, 58, 3376, 744, 646, 746, 704, 3202,
+ 749, 750, 3243, 997, 68, 1135, 31, 902, 160, 904,
+ 3268, 906, 907, 3119, 4051, 1625, 3973, 4051, 913, 2564,
+ 1368, 1362, 678, 2859, 2860, 1616, 676, 646, 1533, 3948,
+ 3949, 1850, 678, 3274, 2475, 1405, 2876, 2627, 2878, 1502,
+ 678, 1405, 2562, 1356, 45, 3257, 966, 1655, 123, 1295,
+ 2879, 1208, 1792, 1793, 3496, 2591, 827, 676, 721, 3135,
+ 2664, 724, 4206, 2875, 2967, 1673, 2734, 2879, 1735, 1799,
+ 134, 134, 4216, 1230, 2063, 2176, 1337, 2034, 678, 4223,
+ 657, 156, 157, 1900, 173, 160, 173, 162, 173, 1819,
+ 4051, 4216, 3702, 4874, 173, 173, 673, 4572, 4223, 134,
+ 2655, 678, 123, 3697, 4679, 2654, 2655, 3327, 3702, 173,
+ 173, 1452, 3949, 1843, 1844, 173, 5035, 1708, 1709, 1710,
+ 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720,
+ 3025, 12, 4051, 1900, 3930, 15, 4529, 4529, 173, 4529,
+ 4486, 16, 17, 1693, 6, 7, 3496, 1067, 1068, 1069,
+ 15, 1701, 1702, 26, 1704, 1705, 1137, 1897, 42, 4530,
+ 1080, 4532, 31, 3319, 4535, 6, 7, 31, 42, 6,
+ 7, 31, 4141, 4142, 26, 51, 4145, 47, 4549, 6,
+ 7, 6, 7, 4152, 6, 7, 26, 1433, 31, 4158,
+ 67, 53, 783, 902, 26, 904, 127, 906, 907, 657,
+ 31, 6, 7, 47, 913, 4581, 42, 916, 28, 2187,
+ 3509, 42, 42, 26, 127, 673, 3119, 2772, 71, 5159,
+ 5160, 5126, 4377, 2772, 11, 12, 33, 47, 104, 26,
+ 89, 26, 42, 1900, 41, 1231, 3342, 33, 24, 25,
+ 26, 4669, 28, 50, 30, 41, 32, 24, 25, 26,
+ 26, 28, 771, 30, 50, 32, 47, 628, 99, 33,
+ 28, 33, 24, 25, 26, 770, 28, 41, 30, 41,
+ 32, 755, 33, 145, 53, 173, 50, 42, 50, 203,
+ 41, 53, 31, 42, 123, 88, 123, 203, 42, 50,
+ 47, 26, 14, 178, 242, 203, 299, 2817, 14, 5709,
+ 182, 123, 99, 3295, 99, 206, 65, 3842, 3843, 42,
+ 65, 244, 314, 158, 685, 5180, 3462, 254, 33, 136,
+ 804, 43, 44, 99, 268, 902, 41, 904, 3474, 906,
+ 907, 168, 143, 3683, 314, 50, 913, 1467, 143, 916,
+ 57, 33, 33, 26, 127, 128, 168, 232, 378, 41,
+ 41, 143, 172, 3703, 128, 42, 1861, 314, 50, 50,
+ 4420, 2557, 127, 318, 99, 168, 1496, 244, 305, 391,
+ 26, 281, 42, 254, 42, 99, 33, 63, 310, 391,
+ 33, 427, 5482, 295, 41, 107, 178, 1979, 41, 387,
+ 14, 107, 1861, 50, 267, 127, 294, 50, 99, 51,
+ 5327, 208, 40, 5813, 633, 317, 635, 636, 637, 638,
+ 639, 640, 208, 642, 643, 2545, 99, 369, 33, 43,
+ 44, 4835, 4454, 591, 305, 4876, 41, 435, 1137, 151,
+ 60, 67, 14, 314, 208, 50, 208, 116, 47, 3342,
+ 114, 299, 53, 672, 902, 816, 904, 208, 906, 907,
+ 646, 5306, 104, 197, 337, 913, 33, 53, 916, 314,
+ 2438, 43, 44, 54, 41, 4875, 122, 254, 239, 644,
+ 192, 258, 299, 50, 33, 312, 192, 201, 33, 1935,
+ 676, 572, 41, 107, 122, 1256, 41, 1950, 341, 75,
+ 312, 50, 4636, 208, 5069, 50, 119, 726, 727, 209,
+ 31, 697, 5442, 4563, 10, 4881, 433, 96, 315, 471,
+ 122, 4636, 31, 366, 141, 711, 208, 208, 305, 315,
+ 5891, 170, 1750, 328, 5895, 107, 764, 314, 4672, 152,
+ 232, 769, 53, 771, 145, 4454, 408, 1765, 299, 458,
+ 160, 315, 494, 315, 33, 386, 71, 4672, 919, 160,
+ 1337, 208, 50, 3699, 315, 208, 1100, 203, 196, 314,
+ 1137, 50, 1225, 201, 1227, 779, 155, 217, 192, 1318,
+ 645, 646, 1321, 787, 528, 33, 1325, 1326, 1327, 31,
+ 463, 314, 4539, 41, 2534, 4729, 403, 203, 1132, 201,
+ 1584, 57, 50, 208, 1421, 670, 4557, 67, 225, 203,
+ 315, 676, 251, 203, 4729, 71, 1600, 73, 244, 805,
+ 192, 779, 787, 323, 1744, 5542, 691, 846, 847, 2546,
+ 4214, 127, 697, 315, 315, 251, 2002, 5055, 629, 3233,
+ 182, 208, 364, 3237, 290, 710, 711, 311, 4557, 1796,
+ 686, 1798, 1562, 1563, 1801, 234, 671, 843, 3089, 208,
+ 236, 2682, 290, 208, 2002, 746, 1813, 178, 315, 1816,
+ 1790, 99, 315, 1820, 2034, 2861, 4635, 4044, 743, 292,
+ 2034, 3226, 374, 1444, 281, 1502, 287, 3226, 290, 1137,
+ 688, 2186, 601, 475, 759, 386, 838, 839, 840, 1846,
+ 1847, 1848, 6063, 4135, 4663, 4137, 287, 1468, 4667, 307,
+ 315, 776, 310, 299, 4146, 4674, 770, 2669, 432, 5564,
+ 1971, 232, 713, 675, 789, 153, 448, 2186, 450, 3825,
+ 721, 1982, 5822, 724, 4166, 580, 2354, 2355, 726, 33,
+ 805, 1440, 504, 688, 3954, 4177, 143, 41, 315, 814,
+ 577, 1735, 3818, 695, 169, 2723, 50, 281, 658, 779,
+ 208, 568, 827, 432, 666, 577, 315, 779, 5172, 834,
+ 315, 836, 506, 838, 839, 840, 841, 643, 843, 378,
+ 581, 178, 797, 384, 244, 787, 33, 780, 123, 782,
+ 782, 1552, 5647, 4133, 41, 4135, 684, 4137, 258, 287,
+ 33, 281, 299, 50, 639, 4330, 4146, 568, 41, 743,
+ 911, 33, 782, 1723, 229, 2535, 6216, 50, 540, 41,
+ 630, 528, 4162, 2763, 2792, 1465, 4166, 842, 50, 844,
+ 747, 50, 614, 168, 644, 782, 901, 4177, 903, 2379,
+ 2380, 54, 2382, 2383, 782, 281, 2082, 912, 658, 4871,
+ 915, 366, 779, 376, 593, 1841, 107, 779, 72, 782,
+ 1334, 782, 472, 928, 918, 918, 33, 315, 782, 5014,
+ 918, 681, 299, 1440, 41, 723, 782, 1573, 33, 782,
+ 755, 710, 3392, 50, 782, 341, 41, 730, 669, 763,
+ 1399, 782, 614, 918, 743, 50, 758, 1392, 5264, 763,
+ 4189, 4047, 768, 359, 33, 712, 769, 779, 779, 779,
+ 366, 763, 41, 787, 208, 782, 1900, 782, 1745, 779,
+ 779, 50, 669, 787, 779, 779, 1703, 769, 1745, 779,
+ 759, 4981, 3825, 5269, 786, 5271, 5831, 763, 780, 769,
+ 782, 192, 763, 763, 1070, 779, 779, 769, 3833, 5332,
+ 5332, 4978, 5332, 1649, 4978, 786, 477, 5375, 780, 786,
+ 782, 208, 4871, 763, 4873, 758, 769, 787, 3950, 786,
+ 717, 786, 2781, 5334, 786, 208, 1162, 780, 5908, 782,
+ 5910, 5911, 769, 780, 769, 1171, 208, 787, 1174, 629,
+ 1817, 786, 1440, 1179, 763, 4131, 4132, 742, 33, 785,
+ 1817, 643, 779, 769, 780, 547, 41, 1072, 763, 782,
+ 768, 769, 688, 780, 763, 50, 1070, 4153, 782, 763,
+ 782, 315, 1070, 4159, 1210, 5590, 5935, 4978, 780, 4815,
+ 2150, 782, 4168, 649, 4170, 4171, 4172, 314, 4174, 4175,
+ 763, 208, 1781, 787, 769, 5510, 4873, 1777, 4184, 4185,
+ 4186, 4187, 4188, 208, 766, 767, 768, 769, 770, 771,
+ 772, 773, 768, 769, 770, 771, 772, 773, 315, 4978,
+ 1135, 5512, 901, 1850, 6004, 6005, 696, 782, 1777, 208,
+ 2662, 2663, 315, 88, 593, 6015, 763, 35, 36, 37,
+ 505, 39, 1777, 315, 5865, 5866, 769, 1162, 780, 1777,
+ 2071, 782, 5502, 763, 732, 763, 1171, 704, 568, 1174,
+ 787, 5511, 1752, 692, 1179, 4008, 4009, 376, 5168, 4012,
+ 4013, 232, 335, 769, 4724, 4018, 4019, 787, 4728, 787,
+ 732, 1777, 560, 1950, 376, 782, 578, 780, 6068, 782,
+ 4724, 1777, 782, 1752, 4728, 1210, 782, 361, 315, 1777,
+ 369, 593, 4045, 1914, 768, 769, 770, 771, 772, 773,
+ 315, 33, 763, 1524, 281, 688, 143, 780, 376, 41,
+ 1271, 1399, 1358, 208, 1535, 780, 782, 782, 50, 208,
+ 704, 254, 1395, 1248, 1195, 1250, 315, 1777, 782, 787,
+ 1255, 1256, 782, 232, 1971, 767, 768, 769, 770, 771,
+ 772, 773, 333, 1422, 331, 1982, 1983, 1272, 156, 2127,
+ 1777, 1337, 232, 1952, 1953, 782, 1281, 614, 160, 743,
+ 1959, 1960, 1961, 3163, 704, 1236, 3033, 653, 393, 270,
+ 1295, 1296, 305, 782, 1225, 780, 1227, 1890, 5372, 2457,
+ 5374, 314, 577, 3160, 755, 4493, 143, 5297, 4496, 5299,
+ 3190, 1316, 763, 3200, 5304, 735, 2474, 5372, 5562, 5374,
+ 2478, 5311, 5312, 2623, 1917, 4475, 448, 178, 704, 2623,
+ 3981, 5321, 1337, 1338, 730, 494, 3033, 5327, 448, 1465,
+ 315, 2265, 371, 1337, 3995, 782, 4718, 1429, 703, 1337,
+ 787, 390, 506, 1358, 580, 4497, 33, 2531, 2783, 211,
+ 14, 4367, 33, 580, 1319, 1320, 1297, 743, 2038, 1949,
+ 41, 1376, 232, 50, 2434, 2435, 1395, 5627, 1395, 50,
+ 1395, 298, 2688, 2904, 2690, 2691, 1395, 1395, 369, 43,
+ 44, 178, 1397, 1398, 782, 178, 208, 53, 1392, 2699,
+ 2460, 1395, 1395, 1408, 2797, 2699, 3437, 1395, 2109, 2110,
+ 2688, 3330, 2690, 2691, 1419, 782, 1421, 2504, 409, 410,
+ 787, 2508, 40, 2510, 1429, 1430, 71, 1553, 1433, 173,
+ 1395, 723, 2071, 3967, 3968, 580, 3033, 2524, 4718, 1444,
+ 1741, 492, 5824, 1448, 3910, 1450, 5690, 510, 3006, 3007,
+ 2537, 2538, 2643, 107, 5176, 1460, 5802, 2996, 2649, 779,
+ 1465, 298, 1467, 1468, 101, 3373, 4064, 787, 71, 3129,
+ 73, 40, 2111, 1404, 3012, 3013, 3014, 3015, 3963, 3964,
+ 551, 1250, 3853, 2111, 3963, 3964, 1255, 143, 3028, 688,
+ 553, 1496, 614, 4499, 33, 787, 3867, 1502, 649, 528,
+ 3871, 3022, 41, 315, 614, 4264, 688, 2146, 613, 5759,
+ 31, 50, 2033, 494, 1264, 145, 33, 2997, 2146, 2999,
+ 2159, 1526, 4264, 358, 41, 1275, 593, 143, 1594, 755,
+ 160, 476, 492, 50, 2159, 72, 695, 208, 192, 127,
+ 688, 2159, 459, 193, 2183, 2184, 780, 1552, 1553, 33,
+ 462, 2727, 5542, 33, 4387, 2183, 2184, 41, 5548, 33,
+ 2163, 41, 633, 414, 2071, 5464, 50, 41, 1337, 33,
+ 50, 423, 976, 977, 978, 2818, 50, 41, 196, 770,
+ 771, 772, 773, 2159, 363, 566, 50, 2445, 2446, 126,
+ 472, 2159, 1586, 780, 338, 782, 1722, 4117, 4118, 448,
+ 1594, 658, 258, 657, 2111, 392, 1594, 780, 40, 782,
+ 755, 110, 5646, 33, 736, 654, 3365, 1021, 780, 673,
+ 782, 41, 459, 474, 678, 688, 1752, 196, 779, 2159,
+ 50, 414, 492, 287, 572, 10, 5050, 472, 315, 2146,
+ 669, 586, 298, 33, 315, 1650, 167, 704, 593, 1654,
+ 1419, 41, 2159, 632, 599, 1660, 1697, 33, 6040, 296,
+ 50, 1430, 307, 572, 2381, 41, 1671, 582, 71, 208,
+ 73, 235, 782, 780, 50, 4125, 2183, 2184, 590, 1448,
+ 659, 1450, 6028, 2071, 40, 780, 57, 1851, 225, 1683,
+ 1683, 208, 5682, 101, 19, 20, 99, 3367, 99, 99,
+ 1782, 1783, 73, 1785, 1786, 1787, 1788, 357, 3229, 641,
+ 145, 5701, 328, 782, 695, 1797, 28, 1722, 30, 1724,
+ 214, 2357, 713, 2111, 208, 716, 314, 2787, 208, 674,
+ 42, 5453, 226, 1815, 208, 1740, 5458, 5459, 167, 1744,
+ 1745, 335, 150, 577, 208, 33, 232, 1752, 1753, 10,
+ 5814, 5785, 127, 41, 384, 667, 293, 226, 2146, 258,
+ 3195, 378, 50, 366, 196, 614, 779, 2068, 468, 1774,
+ 5619, 2159, 688, 1899, 4916, 756, 315, 1782, 1783, 1784,
+ 1785, 1786, 1787, 1788, 1789, 1790, 1791, 281, 208, 568,
+ 735, 312, 1797, 1957, 1958, 2183, 2184, 5646, 315, 268,
+ 201, 5650, 1733, 459, 160, 780, 506, 782, 746, 1814,
+ 1815, 4847, 1817, 127, 1940, 2454, 434, 652, 208, 144,
+ 289, 4857, 4858, 1949, 740, 1951, 33, 753, 314, 2454,
+ 5244, 315, 208, 1838, 41, 315, 2454, 746, 3898, 5857,
+ 196, 315, 5860, 50, 782, 1850, 33, 5261, 902, 598,
+ 904, 315, 906, 907, 41, 787, 74, 3128, 173, 913,
+ 454, 2441, 916, 50, 1990, 434, 2167, 4637, 86, 225,
+ 457, 196, 787, 782, 2175, 763, 764, 765, 2454, 10,
+ 141, 1650, 2793, 312, 2185, 1654, 2454, 736, 296, 1820,
+ 404, 1660, 2441, 33, 1899, 315, 5084, 2808, 2599, 5748,
+ 3200, 41, 3060, 303, 304, 33, 3200, 3178, 197, 1914,
+ 50, 33, 2551, 41, 1919, 5637, 4682, 2043, 3076, 41,
+ 208, 595, 50, 2551, 2454, 315, 2643, 676, 50, 3087,
+ 3088, 5119, 2649, 782, 4943, 1940, 5785, 293, 2849, 315,
+ 598, 3366, 1947, 5830, 1949, 1950, 1951, 2664, 782, 5836,
+ 1955, 36, 37, 5802, 119, 2634, 3262, 542, 2637, 1890,
+ 4969, 661, 2641, 366, 2721, 33, 1971, 436, 780, 463,
+ 4341, 1740, 6036, 41, 6071, 4346, 4347, 1982, 1983, 294,
+ 33, 3041, 50, 386, 3262, 1990, 1917, 152, 41, 314,
+ 2583, 608, 281, 3386, 3387, 3887, 342, 50, 2601, 33,
+ 2670, 208, 314, 403, 458, 4021, 403, 41, 1412, 413,
+ 141, 3071, 723, 600, 4847, 1784, 50, 691, 676, 128,
+ 1789, 208, 1791, 6087, 4857, 4858, 5993, 315, 5992, 6047,
+ 386, 4141, 3889, 2858, 2859, 2860, 3997, 572, 2043, 5794,
+ 2797, 33, 3233, 454, 2551, 154, 3237, 2052, 4699, 41,
+ 364, 293, 461, 2058, 568, 4530, 528, 2062, 50, 154,
+ 4535, 386, 3368, 6127, 2781, 4540, 2454, 627, 208, 1838,
+ 5106, 745, 413, 5828, 421, 475, 787, 2082, 6175, 6176,
+ 208, 1850, 2685, 1137, 493, 489, 208, 704, 5937, 33,
+ 3368, 437, 2097, 33, 2099, 2734, 14, 41, 2103, 3370,
+ 5472, 41, 4753, 720, 2109, 2110, 50, 763, 315, 3033,
+ 50, 782, 766, 767, 768, 769, 770, 771, 772, 773,
+ 120, 2126, 2127, 683, 709, 43, 44, 292, 315, 33,
+ 5318, 226, 5303, 668, 448, 33, 450, 41, 5147, 495,
+ 208, 613, 727, 41, 386, 2150, 50, 601, 489, 2154,
+ 561, 4261, 50, 33, 2793, 208, 33, 671, 567, 2164,
+ 779, 41, 454, 2551, 41, 2170, 47, 55, 787, 2808,
+ 50, 460, 497, 50, 208, 315, 2181, 2182, 419, 6028,
+ 0, 2702, 2703, 117, 118, 426, 1955, 315, 5468, 107,
+ 47, 33, 5472, 315, 541, 33, 131, 669, 47, 41,
+ 647, 123, 1971, 41, 7, 127, 2786, 499, 50, 2848,
+ 2849, 746, 50, 1982, 1983, 144, 208, 506, 218, 2858,
+ 2859, 2860, 723, 2848, 2863, 106, 540, 2734, 3139, 51,
+ 2848, 47, 3082, 2227, 2227, 3146, 2875, 2786, 2863, 648,
+ 2879, 5553, 602, 782, 2880, 2863, 168, 315, 2412, 106,
+ 2875, 173, 5440, 495, 2879, 2891, 2892, 106, 705, 6123,
+ 2896, 708, 315, 151, 208, 782, 3, 196, 208, 6097,
+ 217, 205, 2848, 5106, 192, 3042, 568, 57, 779, 167,
+ 2848, 315, 104, 2052, 206, 3042, 2793, 2863, 735, 2058,
+ 106, 71, 6156, 73, 31, 2863, 743, 128, 782, 2875,
+ 614, 2808, 782, 2879, 208, 33, 763, 2875, 782, 2375,
+ 208, 2879, 2948, 41, 6142, 2441, 780, 5150, 2848, 3799,
+ 151, 3801, 50, 315, 47, 14, 2331, 33, 208, 2965,
+ 2335, 208, 2458, 2863, 281, 41, 573, 574, 47, 229,
+ 287, 2848, 2849, 2348, 50, 2875, 2734, 763, 282, 2879,
+ 238, 2858, 2859, 2860, 43, 44, 3895, 2126, 2127, 4834,
+ 4835, 251, 782, 145, 752, 33, 208, 141, 2875, 454,
+ 208, 315, 2879, 41, 127, 315, 127, 136, 160, 2982,
+ 6067, 2375, 50, 106, 413, 2154, 1440, 2375, 47, 5465,
+ 5180, 779, 782, 763, 53, 2164, 55, 106, 5474, 158,
+ 5476, 5477, 5478, 5479, 5480, 2793, 782, 2489, 5596, 4780,
+ 4781, 315, 2494, 650, 499, 704, 6103, 315, 107, 744,
+ 2808, 2503, 173, 4898, 177, 4900, 1003, 2509, 99, 2434,
+ 2435, 33, 2558, 3103, 3104, 315, 2441, 723, 315, 41,
+ 2445, 2446, 779, 6079, 6080, 1022, 1023, 206, 50, 30,
+ 787, 763, 153, 2458, 35, 2460, 768, 769, 2463, 2464,
+ 2848, 2849, 151, 5114, 3103, 3104, 779, 168, 782, 128,
+ 2858, 2859, 2860, 315, 787, 2863, 561, 315, 3103, 3104,
+ 208, 6117, 5694, 2488, 2489, 3103, 3104, 2875, 241, 2494,
+ 22, 2879, 57, 779, 782, 768, 769, 29, 2503, 31,
+ 3139, 667, 208, 192, 2509, 787, 71, 3146, 5641, 675,
+ 5643, 271, 4369, 33, 680, 311, 3233, 3103, 3104, 604,
+ 3237, 41, 282, 2454, 33, 713, 33, 3103, 3104, 717,
+ 50, 2536, 41, 3444, 41, 3103, 3104, 4498, 769, 31,
+ 208, 50, 33, 50, 779, 769, 2672, 2552, 4624, 780,
+ 41, 2633, 787, 2558, 2559, 2560, 780, 2639, 2640, 50,
+ 313, 341, 2331, 4579, 779, 328, 2335, 4643, 2523, 5757,
+ 2501, 154, 787, 3103, 3104, 782, 4652, 65, 769, 359,
+ 779, 2512, 4658, 2588, 510, 4601, 366, 315, 787, 780,
+ 2595, 782, 4668, 3196, 2599, 782, 3103, 3104, 533, 534,
+ 4676, 4677, 537, 538, 539, 33, 208, 57, 737, 315,
+ 779, 391, 4862, 41, 258, 5922, 5923, 4867, 787, 779,
+ 2625, 71, 50, 73, 2629, 2630, 2631, 787, 2633, 3386,
+ 3387, 178, 3139, 2638, 2639, 2640, 5769, 307, 2643, 3146,
+ 310, 779, 782, 779, 2649, 33, 4288, 315, 3365, 787,
+ 4292, 787, 2583, 41, 782, 577, 33, 33, 780, 2664,
+ 2786, 779, 50, 2668, 41, 41, 2597, 2672, 2673, 19,
+ 20, 4229, 4230, 50, 50, 50, 2445, 2446, 763, 764,
+ 765, 343, 5762, 5763, 299, 33, 33, 513, 208, 515,
+ 516, 3997, 950, 41, 41, 6132, 6133, 5172, 3301, 208,
+ 4258, 208, 50, 50, 530, 3879, 532, 113, 114, 115,
+ 3868, 4372, 3870, 315, 782, 4273, 2721, 208, 389, 3997,
+ 391, 417, 2727, 1777, 141, 1286, 4141, 4142, 3886, 782,
+ 4145, 1292, 1293, 3336, 128, 3338, 3339, 4152, 4784, 997,
+ 5873, 3344, 4282, 5876, 746, 5396, 780, 670, 3922, 3352,
+ 2876, 3139, 2878, 3356, 425, 3358, 1664, 1665, 3146, 5130,
+ 5131, 670, 3283, 3284, 191, 3286, 3287, 2536, 2773, 2700,
+ 2775, 19, 20, 3412, 4312, 3835, 2781, 2708, 281, 2784,
+ 208, 2786, 2787, 4799, 455, 4325, 33, 3412, 5865, 5866,
+ 782, 2560, 2797, 460, 41, 315, 3883, 767, 768, 625,
+ 626, 128, 780, 50, 231, 3444, 315, 780, 315, 782,
+ 19, 20, 5892, 145, 786, 1073, 5896, 33, 731, 732,
+ 208, 734, 33, 736, 315, 41, 4097, 145, 662, 33,
+ 41, 208, 208, 28, 50, 30, 3412, 41, 782, 50,
+ 145, 268, 782, 312, 3412, 101, 50, 147, 766, 767,
+ 768, 769, 770, 771, 772, 773, 127, 787, 158, 5334,
+ 208, 208, 2631, 780, 33, 782, 166, 734, 33, 2638,
+ 281, 2876, 41, 2878, 2643, 780, 41, 782, 782, 787,
+ 2649, 50, 3412, 120, 782, 50, 780, 315, 782, 33,
+ 33, 341, 657, 436, 150, 2664, 144, 41, 41, 4119,
+ 780, 4121, 4782, 780, 743, 3412, 50, 50, 47, 359,
+ 268, 779, 33, 33, 33, 114, 366, 588, 1176, 287,
+ 41, 41, 41, 4628, 5428, 33, 33, 315, 128, 50,
+ 50, 50, 2863, 41, 41, 144, 3002, 3444, 315, 315,
+ 782, 391, 50, 50, 782, 780, 151, 782, 196, 249,
+ 730, 622, 33, 780, 141, 782, 606, 81, 33, 386,
+ 41, 208, 101, 647, 19, 20, 41, 315, 315, 50,
+ 780, 398, 782, 3137, 2979, 50, 4942, 277, 53, 4995,
+ 4008, 4009, 779, 584, 4012, 4013, 475, 196, 5004, 779,
+ 4018, 4019, 208, 704, 6074, 6075, 101, 208, 254, 780,
+ 580, 782, 2996, 3008, 208, 33, 779, 1265, 3002, 779,
+ 4976, 150, 2781, 41, 3002, 2784, 1375, 2071, 735, 1378,
+ 1379, 779, 50, 147, 3412, 333, 18, 19, 20, 333,
+ 780, 3036, 782, 780, 158, 782, 3041, 3042, 333, 208,
+ 296, 4580, 166, 208, 780, 150, 782, 81, 40, 305,
+ 203, 299, 780, 780, 551, 782, 3444, 2111, 314, 88,
+ 780, 780, 782, 782, 208, 208, 3071, 287, 315, 193,
+ 203, 498, 328, 427, 780, 3842, 3843, 766, 767, 768,
+ 769, 770, 771, 772, 773, 3842, 3843, 208, 208, 208,
+ 145, 782, 2146, 4364, 3099, 283, 3101, 3091, 3091, 315,
+ 208, 208, 779, 3091, 315, 2159, 3270, 1365, 360, 788,
+ 1368, 315, 780, 147, 24, 254, 351, 3243, 28, 780,
+ 30, 782, 32, 351, 158, 249, 3091, 208, 3133, 2183,
+ 2184, 786, 166, 208, 3216, 3091, 779, 4798, 386, 779,
+ 3145, 568, 779, 515, 516, 779, 315, 3273, 3274, 254,
+ 315, 779, 40, 277, 780, 779, 782, 296, 530, 193,
+ 532, 3797, 50, 780, 15, 782, 305, 55, 160, 779,
+ 4595, 315, 315, 779, 779, 314, 3943, 386, 780, 779,
+ 208, 4339, 4340, 3309, 24, 25, 3943, 4361, 28, 328,
+ 30, 296, 32, 779, 315, 315, 315, 226, 737, 73,
+ 305, 779, 779, 4761, 196, 57, 81, 315, 315, 314,
+ 5996, 3216, 780, 779, 782, 249, 3221, 6223, 33, 71,
+ 4635, 73, 780, 328, 782, 780, 41, 782, 3233, 780,
+ 311, 782, 3237, 225, 315, 50, 1566, 1567, 3243, 268,
+ 315, 737, 780, 277, 782, 1575, 3251, 1505, 4663, 497,
+ 3967, 3968, 4667, 625, 626, 283, 779, 779, 4644, 4674,
+ 780, 779, 3193, 151, 780, 4651, 782, 3036, 3273, 3274,
+ 24, 780, 147, 780, 28, 1605, 30, 1607, 32, 167,
+ 730, 38, 780, 158, 782, 779, 6072, 315, 497, 780,
+ 213, 166, 1622, 1623, 1624, 4956, 780, 779, 782, 1629,
+ 1630, 293, 4460, 780, 3309, 782, 779, 1637, 196, 338,
+ 213, 533, 534, 128, 4700, 537, 538, 539, 193, 33,
+ 3325, 213, 780, 47, 782, 6111, 1584, 41, 203, 5034,
+ 779, 386, 5298, 780, 779, 782, 50, 787, 393, 779,
+ 779, 1599, 1600, 18, 19, 20, 779, 779, 5364, 5315,
+ 238, 213, 780, 408, 780, 40, 782, 779, 779, 6145,
+ 3365, 780, 5328, 782, 5330, 40, 3297, 3298, 3299, 3300,
+ 55, 3302, 3303, 4198, 249, 430, 3145, 780, 53, 782,
+ 3385, 3386, 3387, 780, 413, 782, 3391, 23, 6174, 779,
+ 26, 27, 780, 208, 386, 31, 4702, 780, 73, 782,
+ 2454, 779, 277, 780, 780, 88, 75, 436, 779, 3340,
+ 3341, 751, 3343, 127, 3345, 3346, 3347, 3348, 3349, 3350,
+ 3351, 5118, 3353, 779, 99, 4064, 3357, 4985, 780, 780,
+ 782, 782, 780, 780, 463, 780, 779, 782, 4041, 4042,
+ 4043, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 3221, 779, 306, 307, 780, 126, 782, 780,
+ 4618, 782, 4065, 4066, 3233, 4068, 151, 780, 3237, 782,
+ 1728, 780, 779, 782, 55, 723, 145, 1735, 5139, 31,
+ 535, 4120, 167, 88, 5005, 160, 780, 33, 782, 341,
+ 779, 160, 4120, 548, 208, 41, 744, 2551, 23, 779,
+ 315, 26, 27, 495, 50, 779, 31, 359, 787, 779,
+ 565, 196, 119, 780, 366, 782, 123, 779, 1776, 33,
+ 127, 196, 5582, 779, 779, 779, 201, 41, 203, 15,
+ 780, 214, 782, 780, 779, 744, 50, 779, 779, 391,
+ 145, 122, 780, 226, 782, 152, 92, 93, 94, 95,
+ 225, 15, 779, 238, 33, 779, 225, 4064, 4133, 4198,
+ 779, 168, 41, 4330, 780, 4140, 173, 779, 4143, 780,
+ 780, 50, 782, 4330, 782, 4150, 780, 5434, 779, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 779, 584, 138, 139, 140, 780, 3365, 782, 281, 206,
+ 780, 315, 782, 4239, 5620, 780, 289, 782, 780, 779,
+ 782, 780, 779, 4120, 128, 780, 203, 780, 293, 782,
+ 201, 226, 3391, 779, 779, 4264, 5518, 763, 780, 658,
+ 782, 355, 779, 662, 779, 690, 780, 780, 779, 4264,
+ 779, 324, 1900, 189, 190, 779, 128, 779, 779, 128,
+ 705, 779, 779, 81, 779, 203, 3820, 75, 782, 780,
+ 780, 780, 208, 779, 4300, 779, 779, 779, 779, 4272,
+ 779, 346, 780, 780, 779, 399, 4064, 401, 779, 122,
+ 2734, 779, 779, 779, 289, 292, 81, 779, 4264, 779,
+ 4293, 4198, 779, 779, 208, 22, 4264, 24, 25, 779,
+ 779, 28, 29, 30, 31, 779, 735, 253, 126, 290,
+ 5407, 386, 779, 779, 743, 384, 258, 782, 5626, 147,
+ 5417, 670, 460, 779, 5632, 5633, 688, 145, 127, 208,
+ 158, 688, 4120, 704, 4264, 676, 510, 429, 166, 2793,
+ 143, 782, 160, 422, 2002, 782, 2004, 782, 582, 360,
+ 782, 785, 147, 436, 2808, 127, 394, 4264, 201, 782,
+ 752, 782, 579, 158, 699, 193, 763, 491, 7, 315,
+ 316, 166, 5433, 40, 743, 3780, 463, 463, 24, 25,
+ 463, 779, 28, 50, 30, 5325, 32, 10, 55, 677,
+ 465, 782, 217, 31, 2848, 2849, 136, 296, 193, 217,
+ 151, 315, 65, 393, 2858, 2859, 2860, 225, 203, 2863,
+ 4198, 18, 19, 20, 408, 3, 3821, 541, 583, 743,
+ 495, 249, 403, 40, 787, 427, 311, 54, 47, 410,
+ 3835, 436, 3837, 40, 127, 782, 315, 3842, 3843, 787,
+ 3845, 120, 787, 3848, 3849, 182, 422, 290, 643, 277,
+ 704, 780, 333, 333, 249, 33, 333, 4682, 463, 141,
+ 506, 311, 561, 41, 588, 411, 73, 24, 25, 26,
+ 3952, 28, 50, 30, 128, 32, 4264, 5035, 730, 154,
+ 311, 779, 277, 177, 151, 786, 782, 106, 105, 47,
+ 5276, 5277, 99, 5279, 5555, 779, 3901, 787, 427, 5420,
+ 167, 3895, 3896, 780, 4425, 4426, 4427, 4428, 4429, 4430,
+ 4431, 4432, 4433, 4434, 3845, 4436, 4437, 4438, 4439, 4440,
+ 4441, 4442, 4443, 4444, 4445, 594, 106, 4448, 4449, 196,
+ 780, 336, 478, 2191, 782, 780, 3941, 2267, 3943, 780,
+ 2270, 3946, 3947, 787, 24, 25, 26, 3952, 28, 780,
+ 30, 648, 32, 160, 678, 4108, 2286, 780, 127, 127,
+ 403, 250, 3967, 3968, 780, 787, 384, 410, 780, 3974,
+ 577, 238, 779, 167, 191, 658, 700, 2307, 779, 196,
+ 5888, 136, 18, 19, 20, 660, 5144, 5373, 782, 196,
+ 287, 788, 677, 782, 201, 127, 203, 602, 544, 770,
+ 546, 73, 4938, 4939, 40, 4941, 552, 2265, 2266, 787,
+ 4946, 4052, 782, 4949, 231, 4536, 4952, 4953, 225, 127,
+ 4541, 688, 770, 360, 4960, 151, 4962, 4666, 5725, 490,
+ 208, 701, 451, 702, 127, 4971, 782, 73, 435, 644,
+ 688, 4666, 4617, 4682, 4619, 264, 127, 266, 4666, 3103,
+ 3104, 268, 735, 33, 4629, 780, 5577, 662, 277, 779,
+ 743, 41, 779, 99, 782, 154, 612, 3, 3837, 406,
+ 50, 782, 4647, 362, 293, 151, 217, 752, 363, 239,
+ 510, 370, 360, 510, 4659, 3139, 293, 510, 5793, 2347,
+ 4666, 4096, 3146, 510, 4099, 510, 385, 510, 4666, 763,
+ 4675, 782, 2360, 708, 782, 283, 395, 396, 397, 120,
+ 656, 19, 20, 676, 4108, 4108, 405, 24, 25, 47,
+ 4108, 28, 287, 30, 160, 32, 127, 596, 71, 4123,
+ 735, 743, 713, 673, 158, 716, 4666, 315, 743, 346,
+ 5526, 780, 5528, 5529, 725, 780, 780, 484, 128, 57,
+ 780, 780, 158, 96, 4833, 210, 779, 782, 137, 4666,
+ 196, 787, 65, 33, 251, 201, 109, 203, 439, 386,
+ 787, 41, 3941, 780, 664, 4682, 594, 3946, 3947, 386,
+ 50, 398, 125, 53, 391, 418, 779, 782, 4193, 225,
+ 6206, 595, 2450, 480, 4199, 5735, 480, 33, 3967, 3968,
+ 780, 283, 748, 782, 68, 41, 734, 703, 2466, 782,
+ 547, 206, 155, 759, 50, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 563, 564, 208, 222,
+ 33, 568, 569, 570, 6091, 128, 19, 20, 41, 4842,
+ 4843, 4844, 4845, 203, 782, 4848, 4849, 50, 782, 779,
+ 4853, 4930, 33, 4856, 543, 474, 4859, 293, 287, 4862,
+ 41, 63, 146, 4866, 4867, 154, 555, 649, 97, 50,
+ 713, 42, 53, 716, 57, 4945, 4281, 780, 4666, 780,
+ 780, 498, 725, 5823, 702, 427, 780, 770, 495, 780,
+ 128, 234, 128, 780, 4682, 2553, 780, 769, 787, 636,
+ 217, 779, 31, 5964, 780, 780, 780, 780, 4313, 780,
+ 346, 378, 780, 780, 780, 122, 763, 780, 780, 4840,
+ 780, 4326, 145, 780, 782, 4330, 782, 5867, 4333, 81,
+ 782, 4852, 780, 2591, 2592, 315, 780, 4501, 208, 5250,
+ 780, 782, 780, 782, 780, 780, 780, 779, 591, 686,
+ 386, 568, 295, 411, 780, 779, 31, 779, 4363, 773,
+ 31, 782, 270, 779, 427, 6222, 655, 4372, 779, 5305,
+ 779, 779, 208, 281, 131, 128, 4381, 787, 127, 127,
+ 782, 782, 4313, 504, 4378, 4373, 128, 787, 782, 4515,
+ 3444, 787, 782, 782, 201, 147, 4999, 782, 5001, 787,
+ 5003, 780, 4333, 613, 693, 208, 158, 5046, 258, 4414,
+ 677, 5050, 780, 782, 166, 4420, 53, 782, 707, 4424,
+ 478, 5046, 100, 47, 782, 5050, 670, 208, 5046, 6090,
+ 2688, 365, 2690, 2691, 2692, 782, 127, 576, 158, 158,
+ 750, 193, 4447, 507, 72, 315, 549, 75, 439, 123,
+ 5971, 203, 557, 660, 779, 268, 268, 657, 268, 495,
+ 679, 680, 681, 682, 268, 314, 409, 410, 268, 203,
+ 5046, 779, 127, 763, 5050, 763, 5387, 763, 5046, 315,
+ 763, 4486, 5050, 290, 734, 299, 544, 270, 546, 763,
+ 4495, 4573, 576, 763, 552, 5174, 168, 249, 126, 5178,
+ 5179, 129, 4628, 763, 763, 763, 763, 763, 416, 5112,
+ 4515, 4637, 315, 18, 19, 20, 5046, 145, 763, 787,
+ 5050, 763, 430, 763, 432, 277, 763, 119, 763, 763,
+ 6191, 123, 160, 763, 315, 127, 34, 6077, 763, 5046,
+ 333, 5180, 763, 5050, 6205, 752, 782, 299, 763, 2807,
+ 6211, 763, 763, 782, 612, 5180, 464, 6218, 4563, 763,
+ 152, 763, 5180, 386, 287, 787, 287, 787, 4573, 477,
+ 393, 755, 392, 4578, 6095, 506, 168, 154, 786, 780,
+ 153, 173, 4513, 153, 787, 408, 4580, 780, 780, 217,
+ 780, 780, 213, 769, 99, 780, 787, 225, 656, 769,
+ 787, 65, 510, 410, 5180, 5244, 780, 430, 780, 4603,
+ 4603, 5250, 5180, 779, 206, 558, 559, 779, 782, 5244,
+ 528, 338, 5261, 4628, 660, 287, 697, 287, 241, 584,
+ 492, 128, 4637, 416, 262, 128, 5261, 787, 787, 779,
+ 145, 779, 232, 30, 769, 4414, 780, 430, 763, 432,
+ 5180, 782, 779, 763, 782, 4424, 4661, 779, 5046, 5570,
+ 733, 203, 5050, 545, 333, 293, 126, 203, 5244, 203,
+ 50, 287, 158, 5180, 158, 712, 5244, 408, 782, 780,
+ 408, 464, 31, 31, 31, 5261, 240, 283, 53, 779,
+ 748, 779, 4818, 5261, 477, 787, 779, 245, 606, 127,
+ 292, 759, 770, 780, 584, 613, 72, 143, 770, 75,
+ 215, 470, 535, 782, 5244, 623, 752, 787, 779, 779,
+ 786, 95, 351, 352, 155, 548, 779, 510, 4854, 637,
+ 155, 5261, 780, 780, 780, 780, 30, 5244, 787, 779,
+ 782, 782, 565, 5250, 206, 528, 780, 780, 5387, 780,
+ 780, 153, 780, 4758, 5261, 780, 384, 780, 3016, 388,
+ 126, 669, 779, 129, 672, 780, 65, 272, 273, 274,
+ 779, 5450, 779, 716, 763, 3033, 128, 5935, 31, 145,
+ 688, 31, 232, 782, 6170, 782, 780, 292, 313, 4948,
+ 232, 88, 5180, 4798, 160, 779, 704, 779, 427, 734,
+ 554, 408, 4807, 4797, 4797, 203, 779, 779, 299, 299,
+ 779, 719, 378, 4818, 53, 782, 4821, 780, 4823, 31,
+ 782, 446, 208, 606, 287, 53, 131, 439, 251, 502,
+ 613, 224, 129, 4838, 391, 4876, 576, 779, 779, 127,
+ 623, 346, 127, 348, 30, 65, 256, 3105, 145, 4854,
+ 780, 168, 504, 780, 637, 314, 5244, 780, 643, 225,
+ 782, 206, 5250, 368, 65, 780, 780, 690, 347, 4874,
+ 4875, 782, 782, 5261, 169, 217, 780, 314, 4883, 780,
+ 5387, 386, 705, 4814, 780, 6043, 669, 447, 393, 672,
+ 780, 173, 779, 754, 763, 167, 262, 782, 741, 250,
+ 418, 418, 217, 408, 53, 688, 713, 203, 5034, 716,
+ 415, 641, 780, 676, 641, 299, 299, 30, 170, 4850,
+ 4851, 779, 30, 593, 4929, 430, 217, 293, 384, 4860,
+ 217, 5570, 65, 217, 217, 159, 719, 4942, 4943, 4944,
+ 705, 159, 217, 4874, 705, 4940, 217, 592, 217, 4954,
+ 217, 4956, 217, 603, 4885, 203, 203, 386, 4963, 4964,
+ 4955, 485, 128, 439, 4969, 262, 594, 584, 203, 154,
+ 4965, 4976, 310, 602, 314, 391, 4981, 4972, 310, 4974,
+ 4975, 576, 487, 99, 281, 577, 237, 57, 779, 498,
+ 619, 4996, 497, 780, 780, 613, 293, 549, 780, 5387,
+ 780, 155, 780, 782, 3262, 780, 780, 71, 5647, 782,
+ 4064, 362, 780, 5018, 780, 65, 645, 406, 384, 370,
+ 780, 50, 5647, 787, 780, 780, 5665, 654, 5069, 5034,
+ 535, 782, 782, 780, 385, 779, 779, 53, 779, 31,
+ 779, 338, 787, 548, 395, 396, 397, 780, 378, 117,
+ 65, 65, 65, 779, 405, 779, 6214, 686, 446, 4990,
+ 30, 331, 741, 5570, 5069, 141, 4120, 160, 5073, 4838,
+ 225, 5647, 390, 741, 702, 669, 314, 5794, 422, 5647,
+ 317, 424, 587, 281, 295, 787, 763, 127, 593, 30,
+ 782, 780, 549, 780, 780, 445, 685, 779, 782, 780,
+ 419, 583, 160, 779, 160, 236, 53, 105, 203, 127,
+ 3368, 5828, 779, 779, 65, 780, 413, 5647, 779, 782,
+ 65, 780, 5127, 779, 782, 65, 780, 127, 31, 287,
+ 411, 127, 160, 782, 5139, 5140, 314, 287, 780, 782,
+ 5647, 584, 5147, 30, 4198, 461, 651, 780, 780, 780,
+ 649, 5156, 601, 658, 5159, 5160, 601, 779, 5665, 5164,
+ 440, 787, 367, 5168, 779, 779, 72, 299, 779, 576,
+ 6, 5176, 120, 287, 120, 4944, 5181, 5303, 5848, 787,
+ 281, 787, 5570, 787, 787, 690, 787, 787, 92, 93,
+ 94, 95, 543, 780, 4963, 73, 787, 287, 287, 787,
+ 705, 706, 787, 787, 555, 787, 787, 787, 787, 787,
+ 281, 787, 685, 718, 584, 72, 72, 5934, 160, 5740,
+ 5741, 50, 5743, 5744, 5745, 5746, 787, 780, 594, 696,
+ 711, 30, 782, 782, 138, 139, 140, 5242, 779, 18,
+ 780, 576, 218, 65, 65, 144, 779, 779, 99, 5290,
+ 99, 5292, 5183, 217, 428, 584, 584, 296, 649, 5647,
+ 779, 418, 418, 779, 5269, 430, 5271, 780, 5199, 780,
+ 782, 180, 779, 779, 160, 779, 48, 5665, 702, 160,
+ 741, 201, 339, 99, 296, 189, 190, 53, 154, 640,
+ 779, 5296, 5297, 5298, 5299, 787, 5291, 6208, 5303, 5304,
+ 697, 5306, 780, 589, 655, 779, 5311, 5312, 80, 779,
+ 5315, 203, 787, 659, 779, 5320, 5321, 426, 198, 737,
+ 127, 779, 5327, 5328, 779, 5330, 422, 780, 207, 101,
+ 173, 779, 338, 5338, 780, 779, 702, 251, 110, 585,
+ 5861, 780, 693, 5864, 779, 5509, 787, 644, 218, 253,
+ 782, 5872, 782, 480, 5875, 332, 707, 203, 704, 131,
+ 5365, 658, 203, 108, 112, 662, 780, 780, 780, 203,
+ 65, 780, 5377, 145, 296, 101, 5381, 203, 150, 203,
+ 143, 649, 116, 432, 30, 779, 5989, 258, 3091, 2571,
+ 782, 3359, 5003, 4999, 5001, 3212, 5631, 142, 4030, 5255,
+ 5662, 173, 5812, 6032, 757, 1746, 5073, 1417, 4463, 5242,
+ 3957, 708, 316, 5046, 5377, 5504, 5394, 5590, 4679, 1734,
+ 3910, 2592, 3437, 3381, 2069, 820, 4198, 2182, 5433, 5500,
+ 2183, 5499, 2184, 5226, 179, 4562, 4051, 5442, 735, 5319,
+ 5123, 5446, 4322, 4326, 4758, 2420, 5855, 5420, 5453, 5454,
+ 5966, 6095, 6056, 5458, 5459, 5748, 5418, 1405, 4937, 2699,
+ 232, 4557, 5653, 4981, 236, 5168, 4563, 5293, 4832, 6080,
+ 5924, 5512, 818, 5934, 5828, 5817, 5817, 5817, 5817, 4261,
+ 4141, 3739, 254, 4214, 4189, 5937, 258, 259, 5848, 4626,
+ 3783, 5496, 5066, 4289, 4292, 4284, 6101, 5502, 88, 88,
+ 6074, 5638, 6075, 5880, 3204, 5499, 5511, 411, 5892, 5896,
+ 5539, 4651, 5517, 5289, 3944, 5287, 4562, 289, 4978, 1511,
+ 1426, 3779, 1929, 3192, 296, 297, 5706, 3187, 5846, 2727,
+ 5543, 2085, 3036, 2560, 2817, 3391, 4126, 5542, 134, 1392,
+ 2996, 763, 3134, 5548, 1339, 5550, 1379, 4600, 3266, 5590,
+ 5555, 4313, 3045, 2944, 1159, 2947, 1668, 3014, 3013, 5564,
+ 3820, 1724, 3729, 1590, 1569, 4701, 6033, 5816, 5694, 6208,
+ 5575, 5576, 6133, 6132, 478, 1337, 4902, 1983, 1600, 1337,
+ 1978, 353, 4366, 5820, 5274, 5590, 4807, 5821, 1575, 3847,
+ 1973, 1337, 3806, 2678, 4495, 3253, 5365, 4494, 3804, 1337,
+ 1337, 5118, 5725, 4784, 950, 5646, 5611, 1999, 5555, 5650,
+ 5114, 4702, 4666, 3269, 3262, 5135, 769, 5622, 2672, 4272,
+ 966, 393, 5627, 1400, 970, 4501, 106, 2773, 4682, 88,
+ 5635, 2148, 5637, 688, 1370, 4123, 2810, 4378, 4813, 1249,
+ 544, 3294, 546, 4365, 4363, 6090, 5651, 993, 552, 5433,
+ 834, 997, 3910, 5658, 835, 2097, 1002, 679, 1806, 2532,
+ 679, 2533, 3126, 1395, 436, 2586, 5496, 5793, 679, 441,
+ 5150, 1918, 1516, 4129, 6093, 4907, 6138, 5682, 5283, 6211,
+ 452, 453, 6218, 2552, 2807, 5454, 5139, 5692, 954, 5694,
+ 2863, 3103, 678, 2188, 3104, 5700, 5701, 5702, 2466, 678,
+ 3105, 6208, 3100, 5698, 3854, 2164, 1174, 3096, 612, 3095,
+ 676, 1746, 1504, 1140, 1504, 2721, 5721, 1949, 4040, 3041,
+ 4515, 1067, 1068, 1069, 1070, 4606, 3207, 1073, 4052, 717,
+ 112, 5361, 88, 88, 1080, 1282, 481, 88, 918, 3997,
+ 4886, 4120, 5868, 3438, 5785, 5665, -1, -1, 2185, 5263,
+ -1, -1, 656, -1, 5759, -1, -1, -1, -1, 5764,
+ -1, 5802, -1, -1, -1, 5770, 511, 512, -1, 514,
+ 515, 516, 517, 518, -1, 520, 521, 522, 523, 524,
+ 525, 526, 527, -1, 529, 530, 531, 532, 5793, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5809, -1, 5811, -1, -1, -1,
+ -1, 5816, -1, -1, -1, 5820, 5821, -1, -1, -1,
+ 6208, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1176, -1, -1, -1, -1, 607, -1, -1, -1, -1,
+ -1, 5846, -1, -1, 748, 617, -1, -1, -1, 5780,
+ 5855, -1, -1, -1, -1, 759, 628, -1, 5924, -1,
+ 5986, -1, 634, 5868, -1, -1, -1, 6031, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 625, 626, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 665, -1, 5900, 5937, 669, -1, -1,
+ -1, -1, -1, 5908, -1, 5910, 5911, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1261, -1, -1, -1, 1265,
+ -1, -1, -1, 5692, -1, -1, 698, -1, 6054, -1,
+ 5924, 5862, 5863, 5702, 5939, -1, 5924, -1, -1, -1,
+ -1, -1, -1, 5874, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5964,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5986, -1, -1, -1, -1, -1, 6028, -1, -1,
+ -1, -1, 5046, -1, -1, -1, -1, -1, -1, 6004,
+ 6005, -1, -1, 6008, -1, -1, -1, -1, -1, -1,
+ 6015, -1, -1, -1, -1, -1, -1, -1, -1, 1365,
+ -1, -1, 1368, -1, 6029, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6079, 6080,
+ -1, -1, 5811, -1, 5975, -1, -1, 5978, -1, 6054,
+ -1, -1, -1, -1, -1, 6219, -1, -1, -1, -1,
+ -1, -1, -1, 6068, -1, -1, -1, -1, -1, 6195,
+ -1, -1, -1, -1, 6200, -1, 6117, -1, 6083, -1,
+ -1, -1, -1, -1, -1, 6090, -1, -1, -1, 1435,
+ -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, -1, -1, -1, -1, 5180, -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, 1505,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1514, -1,
+ 1516, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6191, -1, -1, -1,
+ 6195, -1, -1, -1, -1, 6200, 5250, -1, -1, -1,
+ 6205, -1, -1, -1, -1, -1, 6211, -1, -1, -1,
+ -1, -1, -1, 6218, -1, -1, 1562, 1563, -1, -1,
+ -1, -1, 1568, -1, -1, -1, 1572, 1573, 1574, -1,
+ -1, -1, -1, -1, -1, -1, 1582, 1583, 1584, -1,
+ -1, -1, 1588, -1, -1, -1, 1592, 1593, 1594, -1,
+ 1596, 1597, 1598, 1599, 1600, -1, -1, -1, -1, -1,
+ 1606, -1, 1608, -1, -1, 1611, 1612, 1613, 1614, -1,
+ 1616, -1, 1618, 1619, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1632, 1633, 1634, 1635,
+ 1636, -1, 1638, 1639, 1640, 1641, 1642, 1643, -1, 1645,
+ 1646, -1, 1648, 1649, -1, 1651, 1652, -1, -1, 1655,
+ 1656, -1, 1658, 1659, -1, 1661, -1, 1663, -1, -1,
+ -1, 1667, 1668, 1669, -1, -1, 1672, 1673, 1674, 1675,
+ -1, 1677, -1, 5387, -1, -1, -1, -1, 1684, -1,
+ -1, -1, -1, -1, 1690, 1691, 1692, 1693, -1, -1,
+ -1, -1, -1, -1, -1, 1701, 1702, -1, 1704, 1705,
+ -1, -1, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715,
+ 1716, 1717, 1718, 1719, 1720, -1, -1, 1723, -1, -1,
+ -1, -1, 1728, -1, -1, -1, -1, -1, -1, 1735,
+ -1, -1, -1, -1, -1, -1, 6, 7, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 18, 19,
+ 20, -1, 1758, -1, -1, -1, 6, 7, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 18, -1,
+ 1776, -1, -1, -1, -1, -1, 46, -1, 48, 49,
+ -1, -1, -1, -1, 4702, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 70, -1, 72, 53, -1, -1, -1, -1, 78, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, 81, -1, -1, -1, -1, -1, -1, -1, -1,
+ 110, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4772, -1, 5570, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1874, 119,
+ 1876, -1, -1, 123, -1, 145, -1, 127, 18, 19,
+ 20, -1, -1, -1, -1, -1, 136, 137, -1, -1,
+ -1, -1, -1, 143, 1900, -1, -1, 147, -1, -1,
+ -1, -1, 152, 173, 154, 1911, -1, -1, 158, -1,
+ -1, -1, -1, -1, -1, -1, 166, -1, 168, -1,
+ -1, -1, -1, 173, -1, -1, -1, -1, -1, -1,
+ -1, 71, -1, 73, 204, -1, 206, -1, -1, -1,
+ -1, -1, -1, 193, -1, 215, -1, 217, -1, -1,
+ -1, 5665, -1, 203, -1, -1, 206, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 240, -1, -1, -1, -1, -1, 226, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1996, -1, -1, -1, -1, 245, 2002, -1, 2004, 249,
+ -1, -1, 272, 273, 274, 145, -1, -1, 258, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2024, -1,
+ -1, -1, 292, -1, -1, -1, -1, 277, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 292, -1, -1, -1, -1, -1, 298, 299,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 312, -1, 314, -1, -1, -1, 338, -1,
+ -1, -1, -1, -1, -1, 215, 346, -1, 348, -1,
+ -1, -1, 11, -1, 13, -1, -1, -1, -1, 18,
+ 19, 20, -1, -1, -1, -1, -1, -1, 368, -1,
+ -1, -1, -1, -1, -1, 375, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 386, -1, -1, -1,
+ -1, -1, -1, 393, -1, -1, -1, -1, -1, -1,
+ -1, -1, 272, 273, 274, -1, -1, -1, 408, -1,
+ -1, -1, 71, 2149, 73, 415, -1, -1, -1, 419,
+ 420, -1, 292, -1, -1, -1, 426, -1, -1, -1,
+ 430, -1, -1, -1, -1, -1, -1, -1, 438, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2191, 2192, -1, -1, 459,
+ -1, -1, -1, -1, 2200, 2201, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 346, -1, 348, 459,
+ -1, -1, -1, 483, -1, -1, 145, 487, -1, -1,
+ -1, -1, -1, -1, -1, -1, 366, 497, 368, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 167, -1,
+ -1, -1, -1, -1, -1, -1, 386, -1, 2254, -1,
+ -1, -1, -1, 393, -1, -1, -1, -1, -1, 2265,
+ 2266, -1, -1, -1, -1, 535, -1, -1, 408, -1,
+ -1, -1, -1, -1, -1, 415, -1, -1, 548, -1,
+ 550, -1, -1, -1, -1, -1, 215, -1, -1, -1,
+ 430, -1, 2298, 2299, 2300, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 587, -1, -1,
+ -1, -1, -1, 593, -1, -1, -1, 577, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6, 7, -1,
+ -1, 2347, -1, 272, 273, 274, -1, 487, 618, 18,
+ -1, 2357, -1, -1, 2360, -1, -1, 497, -1, 629,
+ 630, 631, -1, 292, -1, -1, -1, -1, -1, 2375,
+ -1, -1, -1, 2379, 2380, -1, 2382, 2383, -1, -1,
+ -1, 651, -1, -1, 53, 2391, -1, 2393, 658, -1,
+ -1, -1, -1, -1, -1, 535, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 548, -1,
+ -1, -1, 81, -1, -1, -1, -1, 346, 2424, 348,
+ 690, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 705, 706, 366, -1, 368,
+ -1, -1, -1, -1, 2450, -1, -1, 587, 718, -1,
+ 119, -1, 722, 593, 123, -1, 2462, 386, 127, -1,
+ 2466, -1, -1, -1, 393, -1, -1, 136, 137, 2475,
+ -1, -1, -1, -1, -1, -1, -1, -1, 147, 408,
+ 2486, -1, -1, 152, -1, 154, 415, -1, -1, 158,
+ -1, -1, -1, -1, 6208, -1, 2502, 166, -1, 168,
+ 750, 430, -1, -1, 173, -1, -1, -1, -1, -1,
+ 5428, 651, -1, 763, -1, -1, 786, -1, 658, -1,
+ -1, -1, -1, -1, 193, -1, -1, -1, -1, -1,
+ 780, -1, 782, 2539, 203, 785, 786, 206, -1, -1,
+ 2546, -1, -1, -1, -1, -1, -1, 2553, -1, -1,
+ 690, -1, -1, -1, -1, -1, -1, 226, 487, -1,
+ -1, -1, -1, -1, -1, 705, 706, -1, 497, -1,
+ -1, -1, -1, -1, -1, -1, 245, -1, 718, -1,
+ 249, -1, -1, -1, -1, 2591, 2592, -1, -1, 258,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 535, -1, 277, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 548,
+ -1, -1, -1, 292, -1, -1, -1, -1, -1, -1,
+ 299, -1, -1, -1, -1, -1, 2642, -1, -1, -1,
+ -1, -1, 782, 312, -1, 314, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 587, -1,
+ -1, -1, -1, -1, 593, -1, -1, -1, -1, 2675,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2688, -1, 2690, 2691, 2692, -1, 2694, -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, -1, 651, -1, -1, -1, -1, 2733, -1, 658,
+ -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, 690, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 705, 706, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 718,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2807, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2864, -1,
+ -1, -1, 2868, -1, -1, 2871, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2880, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2889, -1, 2891, 2892, -1, 2894, 2895,
+ 2896, 2897, -1, 2899, -1, 2901, 2902, -1, 2904, -1,
+ -1, -1, -1, -1, -1, -1, 2912, 2913, 577, -1,
+ -1, 2917, 2918, 2919, -1, -1, -1, -1, -1, -1,
+ -1, 2927, 2928, 2929, -1, 2931, -1, 2933, -1, 2935,
+ -1, 2937, -1, 2939, -1, -1, -1, -1, 2944, 2945,
+ -1, 2947, 2948, 2949, -1, -1, -1, 2953, -1, -1,
+ 2956, -1, -1, -1, -1, -1, -1, -1, -1, 2965,
+ -1, -1, 2968, -1, 2970, 2971, 2972, -1, -1, 2975,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2997, 5, 2999, 7, -1, 3002, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3012, 3013, 3014, 3015,
+ 3016, 3017, -1, -1, -1, -1, 3022, -1, -1, -1,
+ -1, -1, -1, -1, -1, 659, -1, 3033, -1, -1,
+ -1, -1, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, -1, 68, -1, 70, -1, 72,
+ -1, -1, -1, -1, 3070, -1, -1, 80, -1, -1,
+ 704, -1, -1, -1, -1, -1, 3082, -1, -1, -1,
+ -1, 750, -1, 3089, -1, -1, -1, -1, 101, -1,
+ 103, 104, 19, 20, 763, -1, -1, 110, -1, 3105,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 780, -1, 782, 127, -1, 785, 786, 131, -1,
+ 47, -1, 49, -1, -1, -1, -1, -1, 141, -1,
+ 57, -1, 3138, -1, -1, -1, -1, 150, -1, -1,
+ -1, -1, -1, -1, 71, -1, -1, -1, 161, -1,
+ -1, -1, 79, 80, 3160, -1, -1, -1, 171, -1,
+ 173, -1, 89, -1, 177, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 103, 104, -1, -1,
+ -1, -1, -1, -1, 818, -1, -1, -1, -1, -1,
+ -1, 204, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 216, 217, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 227, 228, -1, -1, 145, -1,
+ -1, -1, -1, 3229, -1, -1, 239, 240, 241, -1,
+ 243, -1, 159, -1, -1, 248, -1, -1, -1, -1,
+ -1, 254, -1, -1, 3250, 258, 259, 260, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3262, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 294, -1, 296, -1, 298, -1, 214, -1, -1,
+ -1, -1, 305, -1, -1, -1, -1, -1, -1, 226,
+ 313, 314, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 328, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 966, -1, -1, -1, 970, 350, 351, -1,
+ 353, -1, -1, -1, -1, -1, -1, 360, -1, -1,
+ -1, -1, -1, -1, 281, 368, -1, -1, -1, 993,
+ -1, -1, 3368, -1, -1, -1, -1, -1, 1002, -1,
+ -1, -1, -1, -1, 3380, 388, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 324, -1, 412,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 422,
+ -1, -1, -1, -1, -1, -1, -1, 344, -1, -1,
+ -1, -1, -1, -1, -1, -1, 353, -1, 441, 3435,
+ -1, -1, -1, 1067, 1068, 1069, 1070, -1, -1, 366,
+ -1, 3447, -1, 456, 3450, -1, 1080, -1, -1, -1,
+ 377, -1, -1, -1, 467, -1, -1, 470, -1, -1,
+ 473, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 400, -1, 488, -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, 429, 430, -1, -1, 433, -1, 435, -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, 462, 463, -1, -1, -1,
+ -1, 468, 469, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 485, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 506,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 602,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 528, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 631, -1,
+ -1, -1, 635, -1, -1, -1, -1, 1261, -1, -1,
+ -1, -1, 645, -1, -1, -1, -1, -1, -1, -1,
+ 653, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 665, -1, -1, 582, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 597, -1, -1, 686, -1, -1, 689, -1, -1, 606,
+ -1, -1, 609, 610, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 624, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 722,
+ -1, -1, -1, -1, -1, -1, -1, -1, 731, 3725,
+ 3726, -1, -1, -1, 3730, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3739, 661, -1, -1, -1, -1, -1,
+ -1, -1, 669, -1, 757, -1, 3752, -1, 3754, -1,
+ 3756, -1, 3758, -1, -1, -1, -1, -1, -1, -1,
+ -1, 688, -1, 690, -1, -1, 779, 3773, -1, -1,
+ -1, -1, -1, 3779, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3792, 3793, -1, -1,
+ -1, 3797, -1, 3799, -1, 3801, -1, -1, -1, -1,
+ 3806, 1435, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 740, -1, -1, -1, -1, -1, -1,
+ 747, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3847, -1, -1, -1, -1, -1, 3853, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3867, -1, -1, -1, 3871, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1514, -1, 1516, 3889, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3910, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1562, 1563,
+ -1, -1, -1, -1, 1568, -1, -1, -1, 1572, 1573,
+ 1574, -1, -1, -1, -1, -1, -1, -1, 1582, 1583,
+ -1, -1, -1, -1, 1588, -1, -1, -1, 1592, 1593,
+ 1594, -1, 1596, 1597, 1598, 3971, -1, -1, -1, -1,
+ -1, -1, 1606, -1, 1608, 3981, -1, 1611, 1612, 1613,
+ 1614, -1, 1616, -1, 1618, 1619, -1, -1, -1, 3995,
+ -1, 3997, 3998, -1, -1, -1, -1, -1, 1632, 1633,
+ 1634, 1635, 1636, -1, 1638, 1639, 1640, 1641, 1642, 1643,
+ -1, 1645, 1646, -1, 1648, 1649, -1, 1651, 1652, -1,
+ -1, 1655, 1656, -1, 1658, 1659, -1, 1661, -1, 1663,
+ -1, -1, -1, 1667, 1668, 1669, -1, -1, 1672, 1673,
+ 1674, 1675, -1, 1677, -1, -1, -1, -1, -1, -1,
+ 1684, -1, -1, -1, -1, -1, 1690, 1691, 1692, 1693,
+ -1, -1, -1, -1, -1, -1, -1, 1701, 1702, -1,
+ 1704, 1705, -1, -1, 1708, 1709, 1710, 1711, 1712, 1713,
+ 1714, 1715, 1716, 1717, 1718, 1719, 1720, -1, -1, 1723,
+ -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, -1, -1, 1758, -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, -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, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4236, 4237, 5, 4239, -1, -1, -1, -1, -1, -1,
+ 1874, -1, 1876, -1, -1, -1, 4252, 4253, 4254, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4276, 4277, -1, -1, -1, 48, 49, 1911, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, 4300, 68, -1, 70, -1, 72,
+ -1, -1, -1, -1, -1, -1, 4312, 80, -1, -1,
+ -1, -1, -1, -1, -1, 4321, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 101, -1,
+ 103, 104, -1, -1, -1, 4341, -1, 110, -1, -1,
+ 4346, 4347, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 127, -1, -1, -1, 131, 4365,
+ -1, -1, 1996, 4369, -1, -1, -1, -1, 141, -1,
+ -1, -1, -1, -1, -1, -1, -1, 150, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 161, -1,
+ 2024, -1, -1, -1, -1, -1, -1, -1, 171, -1,
+ 173, -1, -1, -1, 177, -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, 204, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 216, 217, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 227, 228, -1, -1, -1, -1,
+ -1, -1, -1, 18, 19, 20, 239, 240, 241, -1,
+ 243, -1, -1, -1, -1, 248, -1, -1, -1, -1,
+ -1, 254, -1, -1, -1, 258, 259, 260, -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, 2149, 71, -1, 73, -1,
+ -1, 294, -1, 296, -1, 298, -1, -1, -1, -1,
+ -1, -1, 305, -1, -1, -1, -1, -1, -1, -1,
+ 313, 314, -1, -1, 99, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 328, -1, -1, 2192, -1,
+ -1, -1, -1, -1, 4570, 4571, 2200, 2201, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 350, 351, -1,
+ 353, -1, -1, -1, -1, -1, -1, 360, -1, -1,
+ 145, -1, -1, -1, -1, 368, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 659, -1, -1, -1, -1, 388, -1, -1, -1, -1,
+ 2254, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 412,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 422,
+ -1, -1, -1, -1, -1, 704, -1, -1, -1, -1,
+ 215, -1, -1, -1, 2298, 2299, 2300, -1, 441, 56,
+ 57, -1, -1, -1, 61, 62, -1, -1, -1, -1,
+ -1, -1, -1, 456, 71, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4699, 467, -1, 4702, 470, -1, -1,
+ 473, -1, -1, -1, -1, -1, -1, -1, -1, 96,
+ -1, -1, -1, -1, -1, 488, -1, 272, 273, 274,
+ -1, -1, 109, 2357, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 292, 125, -1,
+ 127, 2375, -1, -1, -1, 2379, 2380, 4753, 2382, 2383,
+ -1, -1, -1, -1, -1, -1, -1, 2391, -1, 2393,
+ -1, -1, -1, -1, -1, -1, 4772, -1, 155, 818,
+ -1, -1, -1, -1, 4780, 4781, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 174, 175, 176,
+ 2424, 346, -1, 348, -1, -1, -1, 184, 185, 186,
+ -1, -1, -1, -1, -1, -1, -1, 4813, -1, -1,
+ -1, 366, -1, 368, -1, 202, 2450, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2462, 602,
+ -1, 386, -1, -1, -1, -1, -1, -1, 393, -1,
+ -1, 2475, -1, -1, -1, -1, -1, 234, -1, -1,
+ -1, -1, 2486, 408, -1, -1, -1, -1, 631, -1,
+ 415, -1, 635, -1, -1, -1, -1, -1, 2502, -1,
+ -1, -1, 645, -1, 261, 430, -1, -1, -1, -1,
+ 653, -1, -1, -1, -1, -1, 4892, -1, 4894, -1,
+ -1, -1, 665, -1, -1, -1, -1, 284, 285, 286,
+ -1, -1, -1, -1, -1, 2539, -1, -1, -1, -1,
+ -1, -1, 2546, 686, -1, -1, 689, 966, -1, 306,
+ 307, 970, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 487, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 497, -1, 993, -1, -1, -1, -1, 722,
+ -1, -1, -1, 1002, -1, -1, -1, -1, 731, -1,
+ -1, -1, -1, -1, -1, -1, -1, 354, -1, 356,
+ 357, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 535, -1, -1, -1, 757, -1, 373, -1, -1, -1,
+ -1, -1, -1, 548, -1, -1, -1, -1, -1, 5005,
+ -1, -1, -1, -1, -1, -1, 779, -1, 2642, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1067, 1068,
+ 1069, 1070, 409, 410, -1, -1, -1, -1, -1, -1,
+ -1, 1080, 587, -1, -1, -1, -1, -1, 593, -1,
+ -1, 2675, -1, -1, -1, 5051, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2694, -1, -1, -1, -1, -1, -1, -1, 455, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5091, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 651, -1, -1, 2733,
+ -1, -1, -1, 658, -1, -1, -1, -1, 5114, 496,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5130, 5131, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 690, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 705, 706, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 718, -1, -1, -1, -1, -1, -1,
+ -1, 558, 559, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 574, 575, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1261, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 616,
+ 2864, -1, -1, -1, 2868, -1, -1, 2871, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2880, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2889, -1, 2891, 2892, -1,
+ 2894, 2895, 2896, 2897, -1, 2899, -1, 2901, 2902, -1,
+ 2904, -1, -1, -1, -1, -1, -1, -1, 2912, 2913,
+ -1, -1, -1, 2917, 2918, 2919, -1, -1, -1, -1,
+ -1, -1, -1, 2927, 2928, 2929, -1, 2931, -1, 2933,
+ -1, 2935, -1, 2937, -1, 2939, -1, -1, -1, -1,
+ 2944, 2945, -1, 2947, 2948, 2949, -1, -1, -1, 2953,
+ -1, -1, 2956, 710, -1, -1, 713, -1, -1, 716,
+ -1, 2965, -1, -1, 2968, -1, 2970, 2971, 2972, -1,
+ -1, 2975, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 739, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2997, -1, 2999, -1, -1, 3002, -1,
+ -1, -1, 759, -1, -1, -1, -1, -1, 3012, 3013,
+ 3014, 3015, -1, 3017, -1, -1, 1435, -1, 3022, -1,
+ 5396, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5420, -1, -1, -1, -1, -1,
+ -1, -1, 5428, -1, -1, -1, -1, -1, 5434, -1,
+ -1, -1, -1, -1, -1, -1, 3070, -1, -1, -1,
+ -1, -1, -1, 5449, -1, -1, -1, -1, 3082, -1,
+ -1, -1, -1, -1, -1, 3089, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1514, -1, 1516, -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,
+ -1, -1, -1, -1, 3138, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1562, 1563, -1, -1, -1, -1, 1568,
+ -1, -1, -1, 1572, 1573, 1574, 3160, -1, -1, -1,
+ -1, -1, -1, 1582, 1583, -1, -1, -1, -1, 1588,
+ -1, -1, -1, 1592, 1593, 1594, -1, 1596, 1597, 1598,
+ -1, -1, -1, -1, -1, -1, -1, 1606, -1, 1608,
+ -1, -1, 1611, 1612, 1613, 1614, -1, 1616, -1, 1618,
+ 1619, 5577, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1632, 1633, 1634, 1635, 1636, -1, 1638,
+ 1639, 1640, 1641, 1642, 1643, 3229, 1645, 1646, -1, 1648,
+ 1649, -1, 1651, 1652, -1, -1, 1655, 1656, -1, 1658,
+ 1659, -1, 1661, -1, 1663, -1, 3250, -1, 1667, 1668,
+ 1669, -1, -1, 1672, 1673, 1674, 1675, -1, 1677, -1,
+ -1, -1, -1, -1, -1, 1684, -1, -1, -1, -1,
+ -1, 1690, 1691, 1692, 1693, -1, -1, -1, -1, -1,
+ -1, -1, 1701, 1702, -1, 1704, 1705, -1, -1, 1708,
+ 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718,
+ 1719, 1720, -1, -1, 1723, -1, -1, -1, 18, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 657, -1, -1, -1, -1, -1,
+ -1, 5707, -1, -1, -1, -1, 46, -1, 48, 1758,
+ 673, -1, -1, -1, -1, -1, 679, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 70, -1, -1, -1, -1, -1, -1, -1, 78, -1,
+ -1, -1, -1, -1, -1, -1, 3380, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 110, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5794, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3435, -1, -1, -1, 145, -1, -1, -1, -1,
+ -1, -1, -1, 3447, -1, -1, 3450, -1, -1, -1,
+ -1, -1, 5828, -1, -1, 1874, -1, 1876, -1, -1,
+ -1, -1, -1, 173, 5840, -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, 1911, -1, -1, -1, 206, -1, -1, -1,
+ -1, -1, -1, -1, -1, 215, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 240, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5924, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 272, 273, 274, -1, -1, -1, -1, 902,
+ -1, 904, -1, 906, 907, -1, -1, 1996, -1, -1,
+ 913, -1, 292, 916, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5971, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2024, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 338, -1,
+ -1, -1, -1, -1, -1, -1, 346, -1, 348, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 368, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 386, -1, -1, -1,
+ -1, -1, -1, 393, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 408, -1,
+ -1, -1, -1, -1, -1, 415, -1, -1, -1, 419,
+ -1, -1, -1, -1, -1, 6091, 426, -1, -1, 6095,
+ 430, 3725, 3726, -1, -1, -1, 3730, -1, -1, -1,
+ 2149, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3752, 459,
+ 3754, -1, 3756, -1, 3758, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3773,
+ -1, -1, -1, 2192, -1, -1, -1, 487, -1, -1,
+ -1, 2200, 2201, -1, -1, -1, -1, 497, 3792, 3793,
+ -1, -1, -1, 3797, -1, 3799, -1, 3801, -1, -1,
+ -1, -1, 3806, -1, 1137, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 535, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2254, -1, -1, 548, -1,
+ 550, -1, -1, -1, -1, -1, 6222, -1, -1, 3853,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3867, -1, -1, -1, 3871, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 587, -1, 2298,
+ 2299, 2300, -1, 593, -1, 3889, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1264, -1, -1, -1, -1, -1, -1, 2357, -1,
+ -1, 651, -1, -1, -1, -1, -1, -1, 658, -1,
+ -1, -1, -1, -1, -1, -1, 2375, -1, -1, -1,
+ 2379, 2380, -1, 2382, 2383, -1, -1, 3971, -1, -1,
+ -1, -1, 2391, -1, 2393, -1, -1, 3981, -1, -1,
+ 690, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3995, -1, -1, 3998, 705, 706, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2424, -1, -1, 718, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2450, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2462, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2475, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2486, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2502, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1440, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2539, -1, -1, -1, -1, -1, -1, 2546, -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,
+ -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, -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, 2642, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4236, 4237, -1, 4239, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 659, 4252, 4253,
+ 4254, -1, -1, -1, -1, -1, 2675, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4276, 4277, -1, 2694, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4300, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4312, -1,
+ -1, -1, -1, -1, 2733, -1, -1, 4321, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4341, -1, -1,
+ -1, -1, 4346, 4347, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4365, -1, -1, -1, 4369, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, 818, -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, -1,
+ -1, -1, -1, -1, -1, 2864, -1, -1, -1, 2868,
+ -1, -1, 2871, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2880, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2889, -1, 2891, 2892, -1, 2894, 2895, 2896, 2897, -1,
+ 2899, -1, 2901, 2902, -1, 2904, -1, -1, -1, -1,
+ -1, -1, -1, 2912, 2913, -1, -1, -1, 2917, 2918,
+ 2919, -1, -1, -1, -1, -1, -1, -1, 2927, 2928,
+ 2929, -1, 2931, -1, 2933, -1, 2935, -1, 2937, -1,
+ 2939, -1, -1, -1, -1, 2944, 2945, -1, 2947, 2948,
+ 2949, -1, -1, -1, 2953, -1, -1, 2956, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2965, -1, -1, 2968,
+ -1, 2970, 2971, 2972, -1, -1, 2975, -1, 970, -1,
+ -1, -1, -1, -1, -1, -1, 4570, 4571, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2997, -1,
+ 2999, 993, -1, 3002, -1, -1, -1, -1, -1, -1,
+ 1002, -1, -1, 3012, 3013, 3014, 3015, -1, 3017, -1,
+ -1, -1, -1, 3022, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3070, -1, -1, -1, -1, -1, -1, 1070, -1,
+ -1, -1, -1, 3082, -1, -1, -1, -1, -1, 5,
+ 3089, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4699, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 48, 49, -1, -1, -1, -1, -1, 3138,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 66, -1, -1, -1, 70, -1, 72, -1, 2071, -1,
+ -1, 3160, -1, -1, 80, -1, -1, -1, -1, 4753,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 101, -1, 103, 104, -1,
+ -1, -1, -1, -1, 110, -1, 4780, 4781, 2111, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 131, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4813,
+ 3229, -1, -1, 2146, 150, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 161, 2159, -1, -1, -1,
+ -1, 3250, -1, -1, -1, 171, -1, 173, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1261,
+ 2183, 2184, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 204, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 216, 217, -1, -1, -1, -1, -1, -1, 4892, -1,
+ 4894, 227, 228, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 239, 240, -1, -1, 243, -1, -1,
+ -1, -1, 248, -1, -1, -1, -1, -1, 254, -1,
+ -1, -1, 258, 259, 260, -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, -1, 294, -1,
+ 296, 3380, 298, -1, -1, -1, -1, -1, -1, 305,
+ -1, -1, -1, -1, -1, -1, -1, -1, 314, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 328, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5005, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 350, -1, 3435, 353, -1, -1,
+ -1, -1, -1, 1435, 360, -1, -1, -1, 3447, -1,
+ -1, 3450, 368, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5051, -1, -1,
+ -1, -1, 388, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 412, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 422, 5091, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1514, -1, 1516, 441, -1, -1, -1, -1,
+ 5114, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 456, 2454, -1, -1, -1, -1, 5130, 5131, -1, -1,
+ -1, 467, -1, -1, 470, -1, -1, 473, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 488, -1, -1, -1, 1568, -1, -1, -1,
+ 1572, -1, 1574, -1, -1, -1, -1, -1, -1, -1,
+ 1582, 1583, -1, -1, -1, -1, 1588, -1, -1, -1,
+ 1592, 1593, 1594, -1, 1596, 1597, 1598, -1, -1, -1,
+ -1, -1, -1, -1, 1606, -1, 1608, -1, -1, 1611,
+ 1612, 1613, 1614, -1, -1, -1, 1618, 1619, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2551, -1,
+ 1632, 1633, 1634, 1635, 1636, -1, 1638, 1639, 1640, 1641,
+ 1642, -1, -1, 1645, 1646, -1, 1648, 1649, -1, 1651,
+ 1652, -1, -1, -1, 1656, -1, 1658, 1659, -1, 1661,
+ -1, 1663, -1, 2586, -1, 1667, 1668, 1669, -1, -1,
+ 1672, -1, 1674, 1675, -1, 1677, 602, -1, -1, -1,
+ -1, -1, 1684, -1, -1, -1, -1, -1, 1690, 1691,
+ 1692, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 631, -1, -1, -1, 635,
+ -1, -1, -1, -1, -1, -1, 3725, 3726, -1, 645,
+ -1, 3730, -1, -1, -1, -1, -1, 653, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 665,
+ -1, -1, -1, 3752, -1, 3754, -1, 3756, -1, 3758,
+ -1, -1, -1, -1, -1, -1, 1758, -1, -1, -1,
+ 686, -1, -1, 689, 3773, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3792, 3793, -1, -1, -1, 3797, -1,
+ 3799, -1, 3801, -1, -1, -1, 722, 3806, -1, -1,
+ -1, -1, 5396, -1, -1, 731, -1, -1, -1, -1,
+ -1, 2734, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5420, -1, -1, -1,
+ -1, 757, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5434, -1, -1, -1, 3853, -1, -1, -1, -1, -1,
+ -1, -1, -1, 779, -1, 5449, -1, -1, 3867, -1,
+ -1, -1, 3871, -1, -1, -1, -1, -1, -1, -1,
+ 2793, -1, 1874, -1, 1876, -1, -1, -1, -1, -1,
+ 3889, -1, -1, -1, -1, 2808, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1911,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2848, 2849, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2858, 2859, 2860, -1, -1,
+ 2863, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2875, -1, -1, -1, 2879, -1, -1, -1,
+ -1, -1, 3971, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3981, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5577, -1, -1, 3995, -1, -1, 3998,
+ -1, -1, -1, -1, 1996, -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, 2024, -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, -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, -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, 5707, -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, -1, 2149, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2192, -1, -1, -1, -1, -1, -1, -1, 2200, 2201,
+ 5794, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3139, -1, -1, -1,
+ -1, -1, -1, 3146, -1, -1, -1, 4236, 4237, -1,
+ 4239, -1, -1, -1, 5828, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4252, 4253, 4254, 5840, -1, -1, -1,
+ -1, -1, 2254, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4276, 4277, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4300, -1, -1, -1, -1, 2298, 2299, 2300, -1,
+ -1, -1, -1, 4312, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4321, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5924, -1, 4341, -1, -1, -1, -1, 4346, 4347, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4365, -1, -1, -1,
+ 4369, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2375, -1, -1, -1, 5971, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2391,
+ -1, 2393, -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, 2424, -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, 2450, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2462, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2475, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2486, -1, -1, -1, -1, 3412,
+ -1, -1, -1, -1, -1, -1, -1, 6091, -1, -1,
+ 2502, 6095, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3444, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2539, -1, -1,
+ -1, -1, -1, -1, 2546, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4570, 4571, -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, -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, -1, 6222, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2642, -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, 2675, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4699, -1, 2694, -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, -1, -1, -1, -1, -1,
+ -1, 2733, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4753, -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, 4780, 4781, -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, 4813, -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, -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, 2864, -1, -1, -1, 2868, -1, -1, 2871,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4892, -1, 4894, -1, 2889, -1, -1,
+ -1, -1, 2894, 2895, 2896, 2897, -1, 2899, -1, 2901,
+ 2902, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2912, 2913, -1, -1, -1, 2917, 2918, 2919, -1, -1,
+ -1, -1, -1, -1, -1, 2927, 2928, 2929, -1, 2931,
+ -1, 2933, -1, 2935, -1, 2937, -1, 2939, -1, -1,
+ -1, -1, 2944, 2945, -1, 2947, -1, 2949, -1, -1,
+ -1, 2953, -1, -1, 2956, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2968, -1, 2970, 2971,
+ 2972, -1, -1, 2975, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5005, -1, -1, -1,
+ 3002, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3013, 3014, -1, -1, 3017, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3948, 3949, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5051, -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, 3070, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5091, -1, -1, -1, -1, 3089, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5114, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5130, 5131, -1, -1, -1, -1, -1, 4051, -1,
+ -1, -1, -1, -1, -1, -1, 3138, -1, -1, -1,
+ -1, 4064, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3160, -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, -1, -1, -1, -1, -1, -1, 4120, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3250, -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, 4198, -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, -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,
+ -1, 4264, -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, -1, -1, -1, -1, 3380, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5396, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5420, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5434, -1, -1, -1, -1,
+ -1, -1, -1, 3435, -1, -1, -1, -1, -1, -1,
+ 5449, -1, -1, -1, -1, 3447, -1, -1, 3450, -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, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4454, -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, -1, -1, -1, -1, 5577, -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, -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, -1, 4557, -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, -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, 5707, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3725, 3726, -1, -1, -1, 3730, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4666, -1, -1, -1, -1, -1, -1,
+ 3752, -1, 3754, -1, 3756, -1, 3758, -1, -1, 4682,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3773, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5794, -1, -1, -1, -1,
+ 3792, 3793, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3806, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5828,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5840, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3853, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3867, -1, -1, -1, 3871,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3889, -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, 5924, -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, 4871, -1,
+ 4873, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5971, -1, -1, -1, -1, -1, -1, 3971,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3981,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3995, -1, -1, 3998, -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, -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, 4978, -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, 6091, -1, -1, -1, 6095, -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, -1,
+ -1, -1, -1, 5046, -1, -1, -1, 5050, -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,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6222, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4236, 4237, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4252, 4253, 4254, -1, -1, -1, -1, 5180, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4276, 4277, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4321,
+ -1, 5244, -1, -1, -1, -1, -1, 5250, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5261, 4341,
+ -1, -1, -1, -1, 4346, 4347, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4365, -1, -1, -1, 4369, -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,
+ -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, -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, 5387, -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, -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, -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, -1, -1, -1, -1, -1, -1, -1, 4570, 4571,
+ -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, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5570, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5619, 4699, -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, 5646, 5647, -1, -1, 5650, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5665, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4753, -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, 4780, 4781,
+ -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, 4813, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5748, -1, -1, -1, -1,
+ -1, -1, -1, 5756, -1, -1, -1, -1, -1, 5762,
+ 5763, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5785, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5802,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4892, -1, 4894, -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, -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, 5880, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5892,
+ -1, -1, -1, 5896, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5937, -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, -1, -1, 5051,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5996, 5997, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5091,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6028, -1, -1, -1, -1,
+ -1, -1, 5114, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5130, 5131,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6072,
+ -1, 6074, 6075, -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, -1, -1, -1, 6111, -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, -1, 6145, -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, 6174, -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, -1, 6208, -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, -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,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5396, -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, -1, -1, -1,
+ -1, -1, 5434, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5449, -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,
+ -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, -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, -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, -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, -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,
+ -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, -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, -1, 5707, -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, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
+ -1, -1, -1, -1, 8, 9, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 19, 20, -1, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 57, 58, 59, 60, -1, 5840, -1,
+ -1, -1, -1, -1, 68, 69, -1, 71, -1, -1,
+ -1, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 84, 85, -1, 87, 88, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, 102, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, 120, 121, 122, -1,
+ 124, -1, -1, -1, -1, -1, -1, -1, 132, 133,
+ 134, 135, -1, -1, -1, -1, -1, 141, -1, -1,
+ 144, -1, 5924, -1, -1, -1, 150, -1, -1, 153,
+ -1, -1, -1, -1, -1, -1, -1, -1, 162, -1,
+ 164, -1, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 180, 181, -1, 183,
+ -1, -1, -1, 187, 188, -1, -1, -1, 192, -1,
+ -1, 195, 196, -1, 198, 199, 200, 201, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, 219, 220, 221, -1, 223,
+ -1, -1, -1, -1, -1, -1, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 241, -1, -1,
+ -1, -1, -1, -1, -1, 249, 250, -1, -1, -1,
+ 254, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 268, -1, -1, -1, -1, -1,
+ -1, 275, 276, -1, 278, 279, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 300, 301, 302, -1,
+ -1, 305, -1, -1, 308, 309, -1, -1, -1, 6091,
+ 314, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ 6222, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, 768, 769, -1, -1, 3, -1,
+ 774, -1, -1, 8, 9, 779, -1, -1, -1, 783,
+ 784, -1, -1, 787, 19, 20, -1, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 57, 58, 59, 60, -1, -1, -1, 64,
+ -1, -1, -1, 68, 69, -1, 71, -1, -1, -1,
+ -1, -1, -1, 78, 79, -1, -1, 82, 83, 84,
+ 85, -1, 87, 88, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, 102, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, 120, 121, 122, -1, 124,
+ -1, -1, -1, -1, -1, -1, -1, 132, 133, 134,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -1, -1, -1, -1, -1, 150, -1, -1, 153, -1,
+ -1, -1, -1, -1, -1, -1, -1, 162, 163, 164,
+ -1, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 180, 181, -1, 183, -1,
+ -1, -1, 187, 188, -1, -1, -1, 192, -1, -1,
+ 195, 196, -1, 198, 199, 200, 201, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, 219, 220, 221, -1, 223, -1,
+ -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, -1, -1, -1, 249, 250, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 268, -1, -1, -1, -1, -1, -1,
+ 275, 276, -1, 278, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, 288, -1, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 300, 301, 302, -1, -1,
+ -1, -1, -1, 308, 309, -1, -1, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 769, -1, -1, 3, -1, 774,
+ -1, -1, 8, 9, 779, -1, -1, -1, 783, 784,
+ -1, -1, 787, 19, 20, -1, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, 47, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 57, 58, 59, 60, -1, -1, -1, -1, -1,
+ -1, -1, 68, 69, -1, 71, -1, -1, -1, -1,
+ -1, -1, 78, 79, -1, -1, 82, 83, 84, 85,
+ -1, 87, 88, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, 102, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, 120, 121, 122, -1, 124, -1,
+ -1, -1, -1, -1, -1, -1, 132, 133, 134, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -1,
+ -1, -1, -1, -1, 150, -1, -1, 153, -1, -1,
+ -1, -1, -1, -1, -1, -1, 162, -1, 164, -1,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 180, 181, -1, 183, -1, -1,
+ -1, 187, 188, -1, -1, -1, 192, -1, -1, 195,
+ 196, -1, 198, 199, 200, 201, -1, 203, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, 219, 220, 221, -1, 223, -1, -1,
+ -1, -1, -1, -1, 230, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ -1, -1, -1, 249, 250, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 268, -1, -1, -1, -1, -1, -1, 275,
+ 276, -1, 278, 279, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 290, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 300, 301, 302, -1, -1, -1,
+ -1, -1, 308, 309, -1, -1, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, 768, 769, -1, -1, 3, -1, 774, -1,
+ -1, 8, 9, 779, -1, -1, -1, 783, 784, -1,
+ -1, 787, 19, 20, -1, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -1, -1, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 57, 58, 59, 60, -1, -1, -1, -1, -1, -1,
+ -1, 68, 69, -1, 71, -1, -1, -1, -1, -1,
+ -1, 78, 79, -1, -1, 82, 83, 84, 85, -1,
+ 87, 88, -1, 90, 91, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, 102, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, 120, 121, 122, -1, 124, -1, -1,
+ -1, -1, -1, -1, -1, 132, 133, 134, 135, -1,
+ -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
+ -1, -1, -1, 150, -1, -1, 153, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, -1, 164, -1, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 180, 181, -1, 183, -1, -1, -1,
+ 187, 188, -1, -1, -1, 192, -1, -1, 195, 196,
+ -1, 198, 199, 200, 201, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, 219, 220, 221, -1, 223, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, -1, -1, -1,
+ -1, -1, 249, 250, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 268, -1, -1, -1, -1, -1, -1, 275, 276,
+ -1, 278, 279, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 290, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, 301, 302, -1, -1, -1, -1,
+ -1, 308, 309, -1, 311, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, 768, 769, -1, -1, 3, -1, 774, -1, -1,
+ 8, 9, 779, -1, -1, -1, 783, 784, -1, -1,
+ 787, 19, 20, -1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 57,
+ 58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
+ 68, 69, -1, 71, -1, -1, -1, -1, -1, -1,
+ 78, 79, -1, -1, 82, 83, 84, 85, -1, 87,
+ 88, -1, 90, 91, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, 102, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, 120, 121, 122, -1, 124, -1, -1, -1,
+ -1, -1, -1, -1, 132, 133, 134, 135, -1, -1,
+ -1, -1, -1, 141, -1, 143, 144, -1, -1, -1,
+ -1, -1, 150, -1, -1, 153, -1, -1, -1, -1,
+ -1, -1, -1, -1, 162, -1, 164, -1, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 180, 181, -1, 183, -1, -1, -1, 187,
+ 188, -1, -1, -1, 192, -1, -1, 195, 196, -1,
+ 198, 199, 200, 201, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, 219, 220, 221, -1, 223, -1, -1, -1, -1,
+ -1, -1, 230, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 241, -1, -1, -1, -1, -1, -1,
+ -1, 249, 250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 268, -1, -1, -1, -1, -1, -1, 275, 276, -1,
+ 278, 279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 290, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 301, 302, -1, -1, -1, -1, -1,
+ 308, 309, -1, -1, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ 768, 769, -1, -1, 3, -1, 774, -1, -1, 8,
+ 9, 779, -1, -1, -1, 783, 784, -1, -1, 787,
+ 19, 20, -1, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
+ -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 57, 58,
+ 59, 60, -1, -1, -1, -1, -1, -1, -1, 68,
+ 69, -1, 71, -1, -1, -1, -1, -1, -1, 78,
+ 79, -1, -1, 82, 83, 84, 85, -1, 87, 88,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, 102, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, 120, 121, 122, -1, 124, -1, -1, -1, 128,
+ -1, -1, -1, 132, 133, 134, 135, -1, -1, -1,
+ -1, -1, 141, -1, -1, 144, -1, -1, -1, -1,
+ -1, 150, -1, -1, 153, -1, -1, -1, -1, -1,
+ -1, -1, -1, 162, -1, 164, -1, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 180, 181, -1, 183, -1, -1, -1, 187, 188,
+ -1, -1, -1, 192, -1, -1, 195, 196, -1, 198,
+ 199, 200, 201, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ 219, 220, 221, -1, 223, -1, -1, -1, -1, -1,
+ -1, 230, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 241, -1, -1, -1, -1, -1, -1, -1,
+ 249, 250, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 268,
+ -1, -1, -1, -1, -1, -1, 275, 276, -1, 278,
+ 279, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 290, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 300, 301, 302, -1, -1, -1, -1, -1, 308,
+ 309, -1, -1, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, 768,
+ 769, -1, -1, 3, -1, 774, -1, -1, 8, 9,
+ 779, -1, -1, -1, 783, 784, -1, -1, 787, 19,
+ 20, -1, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, 58, 59,
+ 60, -1, -1, -1, -1, -1, -1, -1, 68, 69,
+ -1, 71, -1, -1, -1, -1, -1, -1, 78, 79,
+ -1, -1, 82, 83, 84, 85, -1, 87, 88, -1,
+ 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, 102, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ 120, 121, 122, -1, 124, -1, -1, -1, 128, -1,
+ -1, -1, 132, 133, 134, 135, -1, -1, -1, -1,
+ -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
+ 150, -1, -1, 153, -1, -1, -1, -1, -1, -1,
+ -1, -1, 162, -1, 164, -1, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 180, 181, -1, 183, -1, -1, -1, 187, 188, -1,
+ -1, -1, 192, -1, -1, 195, 196, -1, 198, 199,
+ 200, 201, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, 219,
+ 220, 221, -1, 223, -1, -1, -1, -1, -1, -1,
+ 230, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 241, -1, -1, -1, -1, -1, -1, -1, 249,
+ 250, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 268, -1,
+ -1, -1, -1, -1, -1, 275, 276, -1, 278, 279,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 290, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 300, 301, 302, -1, -1, -1, -1, -1, 308, 309,
+ -1, -1, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, 768, 769,
+ -1, -1, 3, -1, 774, -1, -1, 8, 9, 779,
+ -1, -1, -1, 783, 784, -1, -1, 787, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 57, 58, 59, 60,
+ -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
+ 71, -1, -1, -1, -1, -1, -1, 78, 79, -1,
+ -1, 82, 83, 84, 85, -1, 87, 88, -1, 90,
+ 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, 120,
+ 121, 122, -1, 124, -1, -1, -1, 128, -1, -1,
+ -1, 132, 133, 134, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, 150,
+ -1, -1, 153, -1, -1, -1, -1, -1, -1, -1,
+ -1, 162, -1, 164, -1, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 180,
+ 181, -1, 183, -1, -1, -1, 187, 188, -1, -1,
+ -1, 192, -1, -1, 195, 196, -1, 198, 199, 200,
+ 201, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, 219, 220,
+ 221, -1, 223, -1, -1, -1, -1, -1, -1, 230,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, -1, -1, -1, 249, 250,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 268, -1, -1,
+ -1, -1, -1, -1, 275, 276, -1, 278, 279, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 290,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 300,
+ 301, 302, -1, -1, -1, -1, -1, 308, 309, -1,
+ -1, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, 768, 769, -1,
+ -1, 3, -1, 774, -1, -1, 8, 9, 779, -1,
+ -1, -1, 783, 784, -1, -1, 787, 19, 20, -1,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, 40, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 57, 58, 59, 60, -1,
+ -1, -1, -1, -1, -1, -1, 68, 69, -1, 71,
+ -1, -1, -1, -1, -1, -1, 78, 79, -1, -1,
+ 82, 83, 84, 85, -1, 87, 88, -1, 90, 91,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ 102, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, 120, 121,
+ 122, -1, 124, -1, -1, -1, -1, -1, -1, -1,
+ 132, 133, 134, 135, -1, -1, -1, -1, -1, 141,
+ -1, 143, 144, -1, -1, -1, -1, -1, 150, -1,
+ -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
+ 162, -1, 164, -1, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 180, 181,
+ -1, 183, -1, -1, -1, 187, 188, -1, -1, -1,
+ 192, -1, -1, 195, 196, -1, 198, 199, 200, 201,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, 219, 220, 221,
+ -1, 223, -1, -1, -1, -1, -1, -1, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, -1, -1, 249, 250, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 268, -1, -1, -1,
+ -1, -1, -1, 275, 276, -1, 278, 279, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 300, 301,
+ 302, -1, -1, -1, -1, -1, 308, 309, -1, -1,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, 768, 769, -1, -1,
+ 3, -1, 774, -1, -1, 8, 9, 779, -1, -1,
+ -1, 783, 784, -1, -1, 787, 19, 20, -1, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 57, 58, 59, 60, -1, -1,
+ -1, -1, -1, -1, -1, 68, 69, -1, 71, -1,
+ -1, -1, -1, -1, -1, 78, 79, -1, -1, 82,
+ 83, 84, 85, -1, 87, 88, -1, 90, 91, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, 120, 121, 122,
+ -1, 124, -1, -1, -1, -1, -1, -1, -1, 132,
+ 133, 134, 135, -1, -1, -1, -1, -1, 141, -1,
+ -1, 144, -1, -1, -1, -1, -1, 150, -1, -1,
+ 153, -1, -1, -1, -1, -1, -1, -1, -1, 162,
+ -1, 164, -1, 166, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 180, 181, -1,
+ 183, -1, -1, -1, 187, 188, -1, -1, -1, 192,
+ -1, -1, 195, 196, -1, 198, 199, 200, 201, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, 219, 220, 221, -1,
+ 223, -1, -1, -1, -1, -1, -1, 230, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
+ -1, -1, -1, -1, -1, -1, 249, 250, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 268, -1, -1, -1, -1,
+ -1, -1, 275, 276, -1, 278, 279, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 290, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300, 301, 302,
+ -1, -1, -1, -1, -1, 308, 309, -1, -1, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, -1, -1, -1,
+ -1, -1, -1, -1, -1, 768, 769, -1, -1, 3,
+ -1, 774, -1, -1, 8, 9, 779, -1, -1, -1,
+ 783, 784, -1, -1, 787, 19, 20, -1, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 57, 58, 59, 60, -1, -1, -1,
+ -1, -1, -1, -1, 68, 69, -1, 71, -1, -1,
+ -1, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 84, 85, -1, 87, 88, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, 102, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, 120, 121, 122, -1,
+ 124, -1, -1, -1, -1, -1, -1, -1, 132, 133,
+ 134, 135, -1, -1, -1, -1, -1, 141, -1, -1,
+ 144, -1, -1, -1, -1, -1, 150, -1, -1, 153,
+ -1, -1, -1, -1, -1, -1, -1, -1, 162, -1,
+ 164, -1, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 180, 181, -1, 183,
+ -1, -1, -1, 187, 188, -1, -1, -1, 192, -1,
+ -1, 195, 196, -1, 198, 199, 200, 201, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, 219, 220, 221, -1, 223,
+ -1, -1, -1, -1, -1, -1, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 241, -1, -1,
+ -1, -1, -1, -1, -1, 249, 250, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 268, -1, -1, -1, -1, -1,
+ -1, 275, 276, -1, 278, 279, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 300, 301, 302, -1,
+ -1, -1, -1, -1, 308, 309, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, 768, 769, -1, -1, 3, -1,
+ 774, -1, -1, 8, 9, 779, -1, -1, -1, 783,
+ 784, -1, -1, 787, 19, 20, -1, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 57, 58, 59, 60, -1, -1, -1, -1,
+ -1, -1, -1, 68, 69, -1, 71, -1, -1, -1,
+ -1, -1, -1, 78, 79, -1, -1, 82, 83, 84,
+ 85, -1, 87, 88, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, 102, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, 120, 121, 122, -1, 124,
+ -1, -1, -1, -1, -1, -1, -1, 132, 133, 134,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -1, -1, -1, -1, -1, 150, -1, -1, 153, -1,
+ -1, -1, -1, -1, -1, -1, -1, 162, -1, 164,
+ -1, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 180, 181, -1, 183, -1,
+ -1, -1, 187, 188, -1, -1, -1, 192, -1, -1,
+ 195, 196, -1, 198, 199, 200, 201, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, 219, 220, 221, -1, 223, -1,
+ -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, -1, -1, -1, 249, 250, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 268, -1, -1, -1, -1, -1, -1,
+ 275, 276, -1, 278, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 300, 301, 302, -1, -1,
+ -1, -1, -1, 308, 309, -1, -1, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 769, -1, -1, 3, -1, 774,
+ -1, -1, 8, 9, 779, -1, -1, -1, 783, 784,
+ -1, -1, 787, 19, 20, -1, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 57, 58, 59, 60, -1, -1, -1, -1, -1,
+ -1, -1, 68, 69, -1, 71, -1, -1, -1, -1,
+ -1, -1, 78, 79, -1, -1, 82, 83, 84, 85,
+ -1, 87, 88, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, 102, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, 120, 121, 122, -1, 124, -1,
+ -1, -1, -1, -1, -1, -1, 132, 133, 134, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -1,
+ -1, -1, -1, -1, 150, -1, -1, 153, -1, -1,
+ -1, -1, -1, -1, -1, -1, 162, -1, 164, -1,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 180, 181, -1, 183, -1, -1,
+ -1, 187, 188, -1, -1, -1, 192, -1, -1, 195,
+ 196, -1, 198, 199, 200, 201, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, 219, 220, 221, -1, 223, -1, -1,
+ -1, -1, -1, -1, 230, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ -1, -1, -1, 249, 250, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 268, -1, -1, -1, -1, -1, -1, 275,
+ 276, -1, 278, 279, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 290, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 300, 301, 302, -1, -1, -1,
+ -1, -1, 308, 309, -1, -1, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, 768, 769, -1, -1, 3, -1, 774, -1,
+ -1, 8, 9, 779, -1, -1, -1, 783, 784, -1,
+ -1, 787, 19, 20, -1, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -1, -1, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 57, 58, 59, 60, -1, -1, -1, -1, -1, -1,
+ -1, 68, 69, -1, 71, -1, -1, -1, -1, -1,
+ -1, 78, 79, -1, -1, 82, 83, 84, 85, -1,
+ 87, 88, -1, 90, 91, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, 102, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, 120, 121, 122, -1, 124, -1, -1,
+ -1, -1, -1, -1, -1, 132, 133, 134, 135, -1,
+ -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
+ -1, -1, -1, 150, -1, -1, 153, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, -1, 164, -1, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 180, 181, -1, 183, -1, -1, -1,
+ 187, 188, -1, -1, -1, 192, -1, -1, 195, -1,
+ -1, 198, 199, 200, 201, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, 219, 220, 221, -1, 223, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, -1, -1, -1,
+ -1, -1, 249, 250, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 268, -1, -1, -1, -1, -1, -1, 275, 276,
+ -1, 278, 279, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 290, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, 301, 302, -1, -1, -1, -1,
+ -1, 308, 309, -1, -1, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, 768, 769, -1, -1, 3, -1, 774, -1, -1,
+ 8, 9, 779, -1, -1, -1, 783, 784, -1, -1,
+ 787, 19, 20, -1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 57,
+ 58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
+ 68, 69, -1, 71, -1, -1, -1, -1, -1, -1,
+ 78, 79, -1, -1, 82, 83, 84, 85, -1, 87,
+ 88, -1, 90, 91, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, 102, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, 120, 121, 122, -1, 124, -1, -1, -1,
+ -1, -1, -1, -1, 132, 133, 134, 135, -1, -1,
+ -1, -1, -1, 141, -1, -1, 144, -1, -1, -1,
+ -1, -1, 150, -1, -1, 153, -1, -1, -1, -1,
+ -1, -1, -1, -1, 162, -1, 164, -1, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 180, 181, -1, 183, -1, -1, -1, 187,
+ 188, -1, -1, -1, 192, -1, -1, 195, 196, -1,
+ 198, 199, 200, 201, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, 219, 220, 221, -1, 223, -1, -1, -1, -1,
+ -1, -1, 230, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 241, -1, -1, -1, -1, -1, -1,
+ -1, 249, 250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 268, -1, -1, -1, -1, -1, -1, 275, 276, -1,
+ 278, 279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 290, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 301, 302, -1, -1, -1, -1, -1,
+ 308, 309, -1, -1, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ 768, 769, -1, -1, 3, -1, 774, -1, -1, 8,
+ 9, 779, -1, -1, -1, 783, 784, -1, -1, 787,
+ 19, 20, -1, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
+ -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 57, 58,
+ 59, 60, -1, -1, -1, -1, -1, -1, -1, 68,
+ 69, -1, 71, -1, -1, -1, -1, -1, -1, 78,
+ 79, -1, -1, 82, 83, 84, 85, -1, 87, 88,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, 102, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, 120, 121, 122, -1, 124, -1, -1, -1, -1,
+ -1, -1, -1, 132, 133, 134, 135, -1, -1, -1,
+ -1, -1, 141, -1, -1, 144, -1, -1, -1, -1,
+ -1, 150, -1, -1, 153, -1, -1, -1, -1, -1,
+ -1, -1, -1, 162, -1, 164, -1, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 180, 181, -1, 183, -1, -1, -1, 187, 188,
+ -1, -1, -1, 192, -1, -1, 195, 196, -1, 198,
+ 199, 200, 201, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ 219, 220, 221, -1, 223, -1, -1, -1, -1, -1,
+ -1, 230, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 241, -1, -1, -1, -1, -1, -1, -1,
+ 249, 250, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 268,
+ -1, -1, -1, -1, -1, -1, 275, 276, -1, 278,
+ 279, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 290, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 300, 301, 302, -1, -1, -1, -1, -1, 308,
+ 309, -1, -1, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, 768,
+ 769, -1, -1, 3, -1, 774, -1, -1, 8, 9,
+ 779, -1, -1, -1, 783, 784, -1, -1, 787, 19,
+ 20, -1, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, 58, 59,
+ 60, -1, -1, -1, -1, -1, -1, -1, 68, 69,
+ -1, 71, -1, -1, -1, -1, -1, -1, 78, 79,
+ -1, -1, 82, 83, 84, 85, -1, 87, 88, -1,
+ 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, 102, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ 120, 121, 122, -1, 124, -1, -1, -1, -1, -1,
+ -1, -1, 132, 133, 134, 135, -1, -1, -1, -1,
+ -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
+ 150, -1, -1, 153, -1, -1, -1, -1, -1, -1,
+ -1, -1, 162, -1, 164, -1, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 180, 181, 182, 183, -1, -1, -1, 187, 188, -1,
+ -1, -1, 192, -1, -1, 195, -1, -1, 198, 199,
+ 200, 201, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, 219,
+ 220, 221, -1, 223, -1, -1, -1, -1, -1, -1,
+ 230, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 241, -1, -1, -1, -1, -1, -1, -1, 249,
+ 250, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 268, -1,
+ -1, -1, -1, -1, -1, 275, 276, -1, 278, 279,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 290, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 300, 301, 302, -1, -1, -1, -1, -1, 308, 309,
+ -1, -1, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, 768, 769,
+ -1, -1, 3, -1, 774, -1, -1, 8, 9, 779,
+ -1, -1, -1, 783, 784, -1, -1, 787, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 57, 58, 59, 60,
+ -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
+ 71, -1, -1, -1, -1, -1, -1, 78, 79, -1,
+ -1, 82, 83, 84, 85, -1, 87, 88, -1, 90,
+ 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, 120,
+ 121, 122, -1, 124, -1, -1, -1, -1, -1, -1,
+ -1, 132, 133, 134, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, 150,
+ -1, -1, 153, -1, -1, -1, -1, -1, -1, -1,
+ -1, 162, -1, 164, -1, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 180,
+ 181, -1, 183, -1, -1, -1, 187, 188, -1, -1,
+ -1, 192, -1, -1, 195, -1, -1, 198, 199, 200,
+ 201, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, 219, 220,
+ 221, -1, 223, -1, -1, -1, -1, -1, -1, 230,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, -1, -1, -1, 249, 250,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 268, -1, -1,
+ -1, -1, -1, -1, 275, 276, -1, 278, 279, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 290,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 300,
+ 301, 302, -1, -1, -1, -1, -1, 308, 309, -1,
+ -1, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, 768, 769, -1,
+ -1, 3, -1, 774, -1, -1, 8, 9, 779, -1,
+ -1, -1, 783, 784, -1, -1, 787, 19, 20, -1,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, 40, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 57, 58, 59, 60, -1,
+ -1, -1, -1, -1, -1, -1, 68, 69, -1, 71,
+ -1, -1, -1, -1, -1, -1, 78, 79, -1, -1,
+ 82, 83, 84, 85, -1, 87, 88, -1, 90, 91,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ 102, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, 120, 121,
+ 122, -1, 124, -1, -1, -1, -1, -1, -1, -1,
+ 132, 133, 134, 135, -1, -1, -1, -1, -1, 141,
+ -1, -1, 144, -1, -1, -1, -1, -1, 150, -1,
+ -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
+ 162, -1, 164, -1, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 180, 181,
+ -1, 183, -1, -1, -1, 187, 188, -1, -1, -1,
+ 192, -1, -1, 195, -1, -1, 198, 199, 200, 201,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, 219, 220, 221,
+ -1, 223, -1, -1, -1, -1, -1, -1, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, -1, -1, 249, 250, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 268, -1, -1, -1,
+ -1, -1, -1, 275, 276, -1, 278, 279, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 300, 301,
+ 302, -1, -1, -1, -1, -1, 308, 309, -1, -1,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, 768, 769, -1, -1,
+ 3, -1, 774, -1, -1, 8, 9, 779, -1, -1,
+ -1, 783, 784, -1, -1, 787, 19, 20, -1, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 57, 58, 59, 60, -1, -1,
+ -1, -1, -1, -1, -1, 68, 69, -1, 71, -1,
+ -1, -1, -1, -1, -1, 78, 79, -1, -1, 82,
+ 83, 84, 85, -1, 87, 88, -1, 90, 91, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, 120, 121, 122,
+ -1, 124, -1, -1, -1, -1, -1, -1, -1, 132,
+ 133, 134, 135, -1, -1, -1, -1, -1, 141, -1,
+ -1, 144, -1, -1, -1, -1, -1, 150, -1, -1,
+ 153, -1, -1, -1, -1, -1, -1, -1, -1, 162,
+ -1, 164, -1, 166, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 180, 181, -1,
+ 183, -1, -1, -1, 187, 188, -1, -1, -1, 192,
+ -1, -1, 195, -1, -1, 198, 199, 200, 201, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, 219, 220, 221, -1,
+ 223, -1, -1, -1, -1, -1, -1, 230, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
+ -1, -1, -1, -1, -1, -1, 249, 250, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 268, -1, -1, -1, -1,
+ -1, -1, 275, 276, -1, 278, 279, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 290, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300, 301, 302,
+ -1, -1, -1, -1, -1, 308, 309, -1, -1, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, -1, -1, -1,
+ -1, -1, -1, -1, -1, 768, 769, -1, -1, 3,
+ -1, 774, -1, -1, 8, 9, 779, -1, -1, -1,
+ 783, 784, -1, -1, 787, 19, 20, -1, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 57, 58, 59, 60, -1, -1, -1,
+ -1, -1, -1, -1, 68, 69, -1, 71, -1, -1,
+ -1, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 84, 85, -1, 87, 88, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, 102, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, 120, 121, 122, -1,
+ 124, -1, -1, -1, -1, -1, -1, -1, 132, 133,
+ 134, 135, -1, -1, -1, -1, -1, 141, -1, -1,
+ 144, -1, -1, -1, -1, -1, 150, -1, -1, 153,
+ -1, -1, -1, -1, -1, -1, -1, -1, 162, -1,
+ 164, -1, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 180, 181, -1, 183,
+ -1, -1, -1, 187, 188, -1, -1, -1, 192, -1,
+ -1, 195, -1, -1, 198, 199, 200, 201, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, 219, 220, 221, -1, 223,
+ -1, -1, -1, -1, -1, -1, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 241, -1, -1,
+ -1, -1, -1, -1, -1, 249, 250, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 268, -1, -1, -1, -1, -1,
+ -1, 275, 276, -1, 278, 279, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 300, 301, 302, -1,
+ -1, -1, -1, -1, 308, 309, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, 768, 769, -1, -1, 3, -1,
+ 774, -1, -1, 8, 9, 779, -1, -1, -1, 783,
+ 784, -1, -1, 787, 19, 20, -1, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 57, 58, 59, 60, -1, -1, -1, -1,
+ -1, -1, -1, 68, 69, -1, 71, -1, -1, -1,
+ -1, -1, -1, 78, 79, -1, -1, 82, 83, 84,
+ 85, -1, 87, 88, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, 102, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, 120, 121, 122, -1, 124,
+ -1, -1, -1, -1, -1, -1, -1, 132, 133, 134,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -1, -1, -1, -1, -1, 150, -1, -1, 153, -1,
+ -1, -1, -1, -1, -1, -1, -1, 162, -1, 164,
+ -1, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 180, 181, -1, 183, -1,
+ -1, -1, 187, 188, -1, -1, -1, 192, -1, -1,
+ 195, -1, -1, 198, 199, 200, 201, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, 219, 220, 221, -1, 223, -1,
+ -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, -1, -1, -1, 249, 250, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 268, -1, -1, -1, -1, -1, -1,
+ 275, 276, -1, 278, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 300, 301, 302, -1, -1,
+ -1, -1, -1, 308, 309, -1, -1, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 769, -1, -1, 3, -1, 774,
+ -1, -1, 8, 9, 779, -1, -1, -1, 783, 784,
+ -1, -1, 787, 19, 20, -1, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 57, 58, 59, 60, -1, -1, -1, -1, -1,
+ -1, -1, 68, 69, -1, 71, -1, -1, -1, -1,
+ -1, -1, 78, 79, -1, -1, 82, 83, 84, 85,
+ -1, 87, 88, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, 102, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, 120, 121, 122, -1, 124, -1,
+ -1, -1, -1, -1, -1, -1, 132, 133, 134, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -1,
+ -1, -1, -1, -1, 150, -1, -1, 153, -1, -1,
+ -1, -1, -1, -1, -1, -1, 162, -1, 164, -1,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 180, 181, -1, 183, -1, -1,
+ -1, 187, 188, -1, -1, -1, 192, -1, -1, 195,
+ -1, -1, 198, 199, 200, 201, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, 219, 220, 221, -1, 223, -1, -1,
+ -1, -1, -1, -1, 230, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ -1, -1, -1, 249, 250, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 268, -1, -1, -1, -1, -1, -1, 275,
+ 276, -1, 278, 279, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 290, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 300, 301, 302, -1, -1, -1,
+ -1, -1, 308, 309, -1, -1, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, 768, 769, -1, -1, 3, -1, 774, -1,
+ -1, 8, 9, 779, -1, -1, -1, 783, 784, -1,
+ -1, 787, 19, 20, -1, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -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, 58, 59, 60, -1, -1, -1, -1, -1, -1,
+ -1, 68, 69, -1, 71, -1, -1, -1, -1, -1,
+ -1, 78, 79, -1, -1, 82, 83, 84, 85, -1,
+ 87, 88, -1, 90, 91, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, 102, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, 120, 121, 122, -1, 124, -1, -1,
+ -1, -1, -1, -1, -1, 132, 133, 134, 135, -1,
+ -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
+ -1, -1, -1, 150, -1, -1, 153, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, -1, 164, -1, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 180, 181, -1, 183, -1, -1, -1,
+ 187, 188, -1, -1, -1, 192, -1, -1, 195, -1,
+ -1, 198, 199, 200, 201, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, 219, 220, 221, -1, 223, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, -1, -1, -1,
+ -1, -1, 249, 250, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 268, -1, -1, -1, -1, -1, -1, 275, 276,
+ -1, 278, 279, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 290, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, 301, 302, -1, -1, -1, -1,
+ -1, 308, 309, -1, -1, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, 768, 769, -1, -1, 3, -1, -1, -1, -1,
+ 8, -1, 779, -1, -1, -1, -1, 784, -1, -1,
+ 787, 19, 20, -1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, 122, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, 201, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 290, -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,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, 3, 756, 757,
+ 758, 759, 8, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 787,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, 3,
+ 756, 757, 758, 759, 8, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, 780, -1, -1, -1, -1, -1,
+ -1, 787, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, 8, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 787, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, 8, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 779, -1, -1, -1, -1, -1, -1, -1,
+ 787, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, 8, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 787, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, 75, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 129, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, 145, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 160, -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, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 262, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, 787, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -1, -1, -1, 254, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 279, -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, 305, -1, -1, -1, -1, -1,
+ -1, -1, -1, 314, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 779, -1,
+ -1, -1, -1, -1, -1, -1, 787, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 111, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 779,
+ -1, -1, -1, -1, 784, -1, -1, 787, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 779, -1, -1, -1, -1, 784, -1, -1, 787, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 779, -1, -1, -1, -1, -1, -1, -1, 787,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, 770, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 787, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 779, -1, -1, -1, -1, -1, -1,
+ -1, 787, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, 787, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
+ -1, -1, -1, -1, -1, -1, 77, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, 123, -1, -1, -1, 127, -1, -1, 130,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 157, -1, -1, -1,
+ -1, -1, -1, -1, 165, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 177, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, 246, 247, -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, 279, -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, -1, 313, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, -1, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ -1, 342, 343, 344, 345, 346, 347, 348, 349, -1,
+ 351, -1, -1, 354, 355, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, -1, -1, -1, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, -1, -1,
+ -1, -1, -1, -1, 385, -1, 387, -1, 389, 390,
+ -1, 392, 393, 394, 395, 396, 397, -1, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, -1, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, -1, 423, 424, 425, 426, -1, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, -1, -1,
+ -1, 442, -1, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, -1, -1, -1, -1, -1,
+ 461, 462, 463, 464, 465, 466, -1, 468, 469, -1,
+ 471, 472, -1, -1, 475, -1, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, -1, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, -1, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, -1, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, -1, -1, 585, -1, 587, 588, -1, 590,
+ 591, 592, 593, -1, 595, 596, 597, 598, -1, -1,
+ -1, -1, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, -1, 630,
+ -1, 632, 633, 634, -1, 636, 637, -1, 639, 640,
+ 641, 642, 643, 644, -1, 646, 647, 648, 649, 650,
+ 651, 652, -1, 654, 655, 656, -1, 658, 659, 660,
+ 661, -1, 663, 664, -1, -1, 667, 668, -1, -1,
+ 671, 672, 673, -1, 675, -1, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, -1, 687, 688, -1, 690,
+ -1, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, -1, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, -1, 723, 724, -1, 726, 727, 728, 729, -1,
+ -1, 732, 733, -1, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, -1,
+ -1, 752, 753, -1, -1, 756, -1, 758, 759, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 782, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 85, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, -1, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 779,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, 3, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
+ 779, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 71, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, 3, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 19, 20, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 71, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ 3, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 19, 20, 21, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 31, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, 3, 756, 757, 758, 759, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
+ 21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 31, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, 3, 756, 757, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 19, 20, 21, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 31, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, 3, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 19, 20, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 74, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, 3, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 19, 20, -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, -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,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 8, 9, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, 28, -1, 30, -1, 32,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, 251, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 8, 9, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
+ -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
+ -1, 32, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ 251, -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 8,
+ 9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
+ -1, 30, -1, 32, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, 251, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 8, 9, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
+ -1, 28, -1, 30, -1, 32, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, -1, 770, -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,
+ -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, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -1, -1, -1, -1, -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -1, -1, -1, -1, -1, 26, -1, -1, 770,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 40, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, 196, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, 209,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 265, -1, 267, -1, 269,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, 21, -1, -1, -1, -1, -1, -1, 769,
+ -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 42, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 57, -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, 88,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, 21, 763, -1, -1, -1, -1, -1,
+ -1, -1, -1, 31, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 42, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -1, 763, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
+ 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,
+ -1, 128, 129, 130, 131, 132, -1, -1, 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, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, -1, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ -1, 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, -1, 128, 129, 130, 131, 132, -1, -1, 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, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, -1,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, -1, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, -1, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, -1, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, -1, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, -1,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, -1, 661, 662, 663, 664, 665,
+ -1, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, -1, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, -1, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 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, -1,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, -1, 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, -1, 128, 129, 130, 131, 132, -1, -1,
+ 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, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ -1, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, -1, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, -1, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, -1, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, -1, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, -1, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ -1, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, -1, 661, 662, 663, 664,
+ 665, -1, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, -1, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, -1, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 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,
+ -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, -1, 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, -1, 128, 129, 130, 131, 132, -1,
+ -1, 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, 199, 200, 201, 202, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, 291, 292, 293,
+ 294, -1, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, -1, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, -1,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, -1, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, -1,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, -1, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, -1, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, -1, 661, 662, 663,
+ 664, 665, -1, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, -1, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, -1, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, 21, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 31, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 47, 48, -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, 80, -1, -1,
+ -1, 84, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 101, -1,
+ -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 131, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, 145, -1, -1, -1, -1, 150, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 173, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 232,
+ -1, -1, -1, 236, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 254, -1, -1, -1, 258, 259, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 279, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 289, -1, -1, -1,
+ -1, -1, -1, 296, 297, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, 21,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 31,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 47, 48, -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, 80, -1,
+ -1, -1, 84, -1, -1, -1, 88, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 101,
+ -1, -1, -1, -1, -1, -1, -1, -1, 110, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 131,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, 145, -1, -1, -1, -1, 150, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 173, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 232, -1, -1, -1, 236, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 254, -1, -1, -1, 258, 259, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 279, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 289, -1, -1,
+ -1, -1, -1, -1, 296, 297, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -1, -1, -1, 24, 25, 26, -1, 28, -1, 30,
+ 31, 32, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 84, 85, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, 21, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 31, -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, 57, -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, 88,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -1, -1, 23, -1, -1, 26, 27,
+ -1, -1, -1, 31, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, 21, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 31, -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,
+ 57, -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, 88, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, 21, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 31, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 85,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, 21, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 31, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 47, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, 21, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 31, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 84, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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,
+ -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, 21,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 31,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 76, 77, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ -1, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -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, 57, -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, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, 21, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 31, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -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, -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, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -1, -1, -1,
+ 148, -1, -1, 151, -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, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, 212, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, 21, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 31, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -1, -1, -1, -1, -1,
+ -1, -1, 258, -1, -1, -1, -1, -1, -1, -1,
+ -1, 267, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, 21, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 31, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 128, -1, -1, -1, -1, -1,
+ -1, 135, 136, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 31, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 53, -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, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 267, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 128, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 30, -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, -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, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -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, -1, -1, -1, 88,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -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, -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, -1, -1, -1,
+ 88, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 63, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -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, -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,
+ -1, -1, -1, 88, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -1, -1, -1, -1, -1,
+ -1, 225, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 31, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, 47, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -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, -1, -1, -1, 88, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -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, -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, -1, -1, -1, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -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, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -1, -1, -1, -1, -1, -1, 225, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -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, -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, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -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, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, 279, -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, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, -1, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -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, -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,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, 279, -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, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, -1, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, 351, -1, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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,
+ -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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, 279, -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, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 31,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, 279, -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,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
+ -1, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, -1, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, -1, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, -1,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, 279, -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, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, -1, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, -1, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -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, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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,
+ 279, -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, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, 351, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, -1, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 31, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ -1, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, -1, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, -1, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -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, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, 279, -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, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
+ -1, 77, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 113, 114, 115,
+ 116, -1, -1, -1, -1, -1, -1, 123, -1, -1,
+ -1, 127, -1, -1, 130, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 157, -1, -1, -1, -1, -1, -1, -1, 165,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 177, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ 246, 247, -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, 279, -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, -1, 313, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, -1, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, -1, 342, 343, 344, 345,
+ 346, 347, 348, 349, -1, 351, -1, -1, 354, 355,
+ 356, 357, 358, -1, -1, 361, 362, 363, 364, 365,
+ -1, -1, -1, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, -1, -1, -1, -1, -1, -1, 385,
+ -1, 387, -1, 389, 390, -1, 392, 393, 394, 395,
+ 396, 397, -1, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, -1, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, -1, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, -1, -1, -1, 442, -1, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ -1, -1, -1, -1, -1, 461, 462, 463, 464, 465,
+ 466, -1, 468, 469, -1, 471, 472, -1, -1, 475,
+ -1, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, -1, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, -1, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, -1, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, -1, -1, 585,
+ -1, 587, 588, -1, 590, 591, 592, 593, -1, 595,
+ 596, 597, 598, -1, -1, -1, -1, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, -1, 630, -1, 632, 633, 634, -1,
+ 636, 637, -1, 639, 640, 641, 642, 643, 644, -1,
+ 646, 647, 648, 649, 650, 651, 652, -1, 654, 655,
+ 656, -1, 658, 659, 660, 661, -1, 663, 664, -1,
+ -1, 667, 668, -1, -1, 671, 672, 673, -1, 675,
+ -1, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ -1, 687, 688, -1, 690, -1, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, -1, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, -1, 723, 724, -1,
+ 726, 727, 728, 729, 19, 20, 732, 733, -1, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, -1, -1, 752, 753, -1, -1,
+ 756, -1, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 68, -1, -1, -1, -1, -1, -1,
+ -1, -1, 77, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 114,
+ -1, 116, -1, -1, -1, -1, -1, -1, 123, -1,
+ -1, -1, 127, -1, -1, 130, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 157, -1, -1, -1, -1, -1, -1, -1,
+ 165, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 177, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 188, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, 246, 247, -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, 279, -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, 311, -1, 313, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, -1, 324,
+ 325, 326, 327, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, -1, 342, 343, 344,
+ 345, 346, 347, 348, 349, -1, 351, -1, -1, 354,
+ 355, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, -1, -1, -1, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, -1, -1, -1, -1, -1, -1,
+ 385, -1, 387, -1, 389, 390, -1, 392, 393, 394,
+ 395, 396, 397, -1, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, -1, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, -1, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, -1, -1, -1, 442, -1, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, -1, -1, -1, -1, -1, 461, 462, 463, 464,
+ 465, 466, -1, 468, 469, -1, 471, 472, -1, -1,
+ 475, -1, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, -1, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, -1, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, -1, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, -1, -1,
+ 585, -1, 587, 588, -1, 590, 591, 592, 593, -1,
+ 595, 596, 597, 598, -1, -1, -1, -1, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, -1, 630, -1, 632, 633, 634,
+ -1, 636, 637, -1, 639, 640, 641, 642, 643, 644,
+ -1, 646, 647, 648, 649, 650, 651, 652, -1, 654,
+ 655, 656, -1, 658, 659, 660, 661, -1, 663, 664,
+ -1, -1, 667, 668, -1, -1, 671, 672, 673, -1,
+ 675, -1, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, -1, 687, 688, -1, 690, -1, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, -1, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, -1, 723, 724,
+ -1, 726, 727, 728, 729, 19, 20, 732, 733, -1,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, -1, -1, 752, 753, -1,
+ -1, 756, -1, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 68, -1, -1, -1, -1, -1,
+ -1, -1, -1, 77, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, 123,
+ -1, -1, -1, 127, -1, -1, 130, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, 141, -1, -1,
+ 144, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 157, -1, -1, -1, -1, -1, -1,
+ -1, 165, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 177, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 241, -1, -1,
+ -1, -1, 246, 247, -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, 279, -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, -1, 313,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, -1,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, -1, 342, 343,
+ 344, 345, 346, 347, 348, 349, -1, 351, -1, -1,
+ 354, 355, 356, 357, 358, -1, -1, 361, 362, 363,
+ 364, 365, -1, -1, -1, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, -1, -1, -1, -1, -1,
+ -1, 385, -1, 387, -1, 389, 390, -1, 392, 393,
+ 394, 395, 396, 397, -1, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, -1, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, -1, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, -1, -1, -1, 442, -1,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, -1, -1, -1, -1, -1, 461, 462, 463,
+ 464, 465, 466, -1, 468, 469, -1, 471, 472, -1,
+ -1, 475, -1, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, -1, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, -1, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, -1, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, -1,
+ -1, 585, -1, 587, 588, -1, 590, 591, 592, 593,
+ -1, 595, 596, 597, 598, -1, -1, -1, -1, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, -1, 630, -1, 632, 633,
+ 634, -1, 636, 637, -1, 639, 640, 641, 642, 643,
+ 644, -1, 646, 647, 648, 649, 650, 651, 652, -1,
+ 654, 655, 656, -1, 658, 659, 660, 661, -1, 663,
+ 664, -1, -1, 667, 668, -1, -1, 671, 672, 673,
+ -1, 675, -1, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, -1, 687, 688, -1, 690, -1, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, -1, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, -1, 723,
+ 724, -1, 726, 727, 728, 729, 19, 20, 732, 733,
+ -1, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, -1, -1, 752, 753,
+ -1, -1, 756, -1, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 68, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ 123, -1, -1, -1, 127, -1, -1, 130, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, 141, -1,
+ -1, 144, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 157, -1, -1, -1, -1, -1,
+ -1, -1, 165, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 177, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 188, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
+ -1, -1, -1, 246, 247, -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, 279, -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, -1,
+ 313, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ -1, 324, 325, 326, 327, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, -1, 342,
+ 343, 344, 345, 346, 347, 348, 349, -1, 351, -1,
+ -1, 354, 355, 356, 357, 358, -1, -1, 361, 362,
+ 363, 364, 365, -1, -1, -1, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, -1, -1, -1, -1,
+ -1, -1, 385, -1, 387, -1, 389, 390, -1, 392,
+ 393, 394, 395, 396, 397, -1, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, -1,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, -1,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, -1, -1, -1, 442,
+ -1, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, -1, -1, -1, -1, -1, 461, 462,
+ 463, 464, 465, 466, -1, 468, 469, -1, 471, 472,
+ -1, -1, 475, -1, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, -1, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, -1, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, -1, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ -1, -1, 585, -1, 587, 588, -1, 590, 591, 592,
+ 593, -1, 595, 596, 597, 598, -1, -1, -1, -1,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, -1, 630, -1, 632,
+ 633, 634, -1, 636, 637, -1, 639, 640, 641, 642,
+ 643, 644, -1, 646, 647, 648, 649, 650, 651, 652,
+ -1, 654, 655, 656, -1, 658, 659, 660, 661, -1,
+ 663, 664, -1, -1, 667, 668, -1, -1, 671, 672,
+ 673, -1, 675, -1, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, -1, 687, 688, -1, 690, -1, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, -1,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, -1,
+ 723, 724, -1, 726, 727, 728, 729, 19, 20, 732,
+ 733, -1, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, -1, -1, 752,
+ 753, -1, -1, 756, -1, 758, 759, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
+ -1, -1, -1, -1, -1, 77, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, 123, -1, -1, -1, 127, -1, -1, 130, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, 141,
+ -1, -1, 144, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 157, -1, -1, -1, -1,
+ -1, -1, -1, 165, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 177, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 188, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 241,
+ -1, -1, -1, -1, 246, 247, -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, 279, -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,
+ -1, 313, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, -1, 324, 325, 326, 327, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, -1,
+ 342, 343, 344, 345, 346, 347, 348, 349, -1, 351,
+ -1, -1, 354, 355, 356, 357, 358, -1, -1, 361,
+ 362, 363, 364, 365, -1, -1, -1, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, -1, -1, -1,
+ -1, -1, -1, 385, -1, 387, -1, 389, 390, -1,
+ 392, 393, 394, 395, 396, 397, -1, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ -1, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ -1, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, -1, -1, -1,
+ 442, -1, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, -1, -1, -1, -1, -1, 461,
+ 462, 463, 464, 465, 466, -1, 468, 469, -1, 471,
+ 472, -1, -1, 475, -1, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, -1, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, -1, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, -1, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, -1, -1, 585, -1, 587, 588, -1, 590, 591,
+ 592, 593, -1, 595, 596, 597, 598, -1, -1, -1,
+ -1, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, -1, 630, -1,
+ 632, 633, 634, -1, 636, 637, -1, 639, 640, 641,
+ 642, 643, 644, -1, 646, 647, 648, 649, 650, 651,
+ 652, -1, 654, 655, 656, -1, 658, 659, 660, 661,
+ -1, 663, 664, -1, -1, 667, 668, -1, -1, 671,
+ 672, 673, -1, 675, -1, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, -1, 687, 688, -1, 690, -1,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ -1, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ -1, 723, 724, -1, 726, 727, 728, 729, 19, 20,
+ 732, 733, -1, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, -1, -1,
+ 752, 753, -1, -1, 756, -1, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
+ -1, -1, -1, -1, -1, -1, 77, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, 123, -1, -1, -1, 127, -1, -1, 130,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 157, -1, -1, -1,
+ -1, -1, -1, -1, 165, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 177, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 188, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, 246, 247, -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, 279, -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, -1, 313, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, -1, 324, 325, 326, 327, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ -1, 342, 343, 344, 345, 346, 347, 348, 349, -1,
+ 351, -1, -1, 354, 355, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, -1, -1, -1, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, -1, -1,
+ -1, -1, -1, -1, 385, -1, 387, -1, 389, 390,
+ -1, 392, 393, 394, 395, 396, 397, -1, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, -1, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, -1, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, -1, -1,
+ -1, 442, -1, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, -1, -1, -1, -1, -1,
+ 461, 462, 463, 464, 465, 466, -1, 468, 469, -1,
+ 471, 472, -1, -1, 475, -1, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, -1, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, -1, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, -1, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, -1, -1, 585, -1, 587, 588, -1, 590,
+ 591, 592, 593, -1, 595, 596, 597, 598, -1, -1,
+ -1, -1, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, -1, 630,
+ -1, 632, 633, 634, -1, 636, 637, -1, 639, 640,
+ 641, 642, 643, 644, -1, 646, 647, 648, 649, 650,
+ 651, 652, -1, 654, 655, 656, -1, 658, 659, 660,
+ 661, -1, 663, 664, -1, -1, 667, 668, -1, -1,
+ 671, 672, 673, -1, 675, -1, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, -1, 687, 688, -1, 690,
+ -1, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, -1, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, -1, 723, 724, -1, 726, 727, 728, 729, 19,
+ 20, 732, 733, -1, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, -1,
+ -1, 752, 753, -1, -1, 756, -1, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 68, -1,
+ -1, -1, -1, -1, -1, -1, -1, 77, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, 123, -1, -1, -1, 127, -1, -1,
+ 130, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 157, -1, -1,
+ -1, -1, -1, -1, -1, 165, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 177, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 241, -1, -1, -1, -1, 246, 247, -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, 279,
+ -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, -1, 313, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, -1, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, -1, 342, 343, 344, 345, 346, 347, 348, 349,
+ -1, 351, -1, -1, 354, 355, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, -1, -1, -1, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, -1,
+ -1, -1, -1, -1, -1, 385, -1, 387, -1, 389,
+ 390, -1, 392, 393, 394, 395, 396, 397, -1, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, -1, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, -1, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, -1,
+ -1, -1, 442, -1, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, -1, -1, -1, -1,
+ -1, 461, 462, 463, 464, 465, 466, -1, 468, 469,
+ -1, 471, 472, -1, -1, 475, -1, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, -1, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, -1, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, -1, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, -1, -1, 585, -1, 587, 588, -1,
+ 590, 591, 592, 593, -1, 595, 596, 597, 598, -1,
+ -1, -1, -1, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, -1,
+ 630, -1, 632, 633, 634, -1, 636, 637, -1, 639,
+ 640, 641, 642, 643, 644, -1, 646, 647, 648, 649,
+ 650, 651, 652, -1, 654, 655, 656, -1, 658, 659,
+ 660, 661, -1, 663, 664, -1, -1, 667, 668, -1,
+ -1, 671, 672, 673, -1, 675, -1, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, -1, 687, 688, -1,
+ 690, -1, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, -1, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, -1, 723, 724, -1, 726, 727, 728, 729,
+ 19, 20, 732, 733, -1, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ -1, -1, 752, 753, -1, -1, 756, -1, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
+ -1, -1, -1, -1, -1, -1, -1, -1, 77, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, 123, -1, -1, -1, 127, -1,
+ -1, 130, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, 141, -1, -1, 144, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 157, -1,
+ -1, -1, -1, -1, -1, -1, 165, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 177, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 188,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 241, -1, -1, -1, -1, 246, 247, -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,
+ 279, -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, -1, 313, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, -1, 324, 325, 326, 327, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, -1, 342, 343, 344, 345, 346, 347, 348,
+ 349, -1, 351, -1, -1, 354, 355, 356, 357, 358,
+ -1, -1, 361, 362, 363, 364, 365, -1, -1, -1,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ -1, -1, -1, -1, -1, -1, 385, -1, 387, -1,
+ 389, 390, -1, 392, 393, 394, 395, 396, 397, -1,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, -1, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, -1, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ -1, -1, -1, 442, -1, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, -1, -1, -1,
+ -1, -1, 461, 462, 463, 464, 465, 466, -1, 468,
+ 469, -1, 471, 472, -1, -1, 475, -1, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, -1,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, -1,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, -1,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, -1, -1, 585, -1, 587, 588,
+ -1, 590, 591, 592, 593, -1, 595, 596, 597, 598,
+ -1, -1, -1, -1, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ -1, 630, -1, 632, 633, 634, -1, 636, 637, -1,
+ 639, 640, 641, 642, 643, 644, -1, 646, 647, 648,
+ 649, 650, 651, 652, -1, 654, 655, 656, -1, 658,
+ 659, 660, 661, -1, 663, 664, -1, -1, 667, 668,
+ -1, -1, 671, 672, 673, -1, 675, -1, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, -1, 687, 688,
+ -1, 690, -1, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, -1, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, -1, 723, 724, -1, 726, 727, 728,
+ 729, 19, 20, 732, 733, -1, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, -1, -1, 752, 753, -1, -1, 756, -1, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 68, -1, -1, -1, -1, -1, -1, -1, -1, 77,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, 123, -1, -1, -1, 127,
+ -1, -1, 130, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, 141, -1, -1, 144, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 157,
+ -1, -1, -1, -1, -1, -1, -1, 165, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 177,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 241, -1, -1, -1, -1, 246, 247,
+ -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, 279, -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, -1, 313, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, -1, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, -1, 342, 343, 344, 345, 346, 347,
+ 348, 349, -1, 351, -1, -1, 354, 355, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, -1, -1,
+ -1, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, -1, -1, -1, -1, -1, -1, 385, -1, 387,
+ -1, 389, 390, -1, 392, 393, 394, 395, 396, 397,
+ -1, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, -1, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, -1, 423, 424, 425, 426, -1,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, -1, -1, -1, 442, -1, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, -1, -1,
+ -1, -1, -1, 461, 462, 463, 464, 465, 466, -1,
+ 468, 469, -1, 471, 472, -1, -1, 475, -1, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ -1, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ -1, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ -1, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, -1, -1, 585, -1, 587,
+ 588, -1, 590, 591, 592, 593, -1, 595, 596, 597,
+ 598, -1, -1, -1, -1, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, -1, 630, -1, 632, 633, 634, -1, 636, 637,
+ -1, 639, 640, 641, 642, 643, 644, -1, 646, 647,
+ 648, 649, 650, 651, 652, -1, 654, 655, 656, -1,
+ 658, 659, 660, 661, -1, 663, 664, -1, -1, 667,
+ 668, -1, -1, 671, 672, 673, -1, 675, -1, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, -1, 687,
+ 688, -1, 690, -1, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, -1, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, -1, 723, 724, -1, 726, 727,
+ 728, 729, 19, 20, 732, 733, -1, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, -1, -1, 752, 753, -1, -1, 756, -1,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
+ 77, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, 123, -1, -1, -1,
+ 127, -1, -1, 130, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 157, -1, -1, -1, -1, -1, -1, -1, 165, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 177, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 188, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, -1, -1, 246,
+ 247, -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, 279, -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, -1, 313, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, -1, 324, 325, 326,
+ 327, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, -1, 342, 343, 344, 345, 346,
+ 347, 348, 349, -1, 351, -1, -1, 354, 355, 356,
+ 357, 358, -1, -1, 361, 362, 363, 364, 365, -1,
+ -1, -1, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, -1, -1, -1, -1, -1, -1, 385, -1,
+ 387, -1, 389, 390, -1, 392, 393, 394, 395, 396,
+ 397, -1, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, -1, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, -1, 423, 424, 425, 426,
+ -1, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, -1, -1, -1, 442, -1, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, -1,
+ -1, -1, -1, -1, 461, 462, 463, 464, 465, 466,
+ -1, 468, 469, -1, 471, 472, -1, -1, 475, -1,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, -1, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, -1, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, -1, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, -1, -1, 585, -1,
+ 587, 588, -1, 590, 591, 592, 593, -1, 595, 596,
+ 597, 598, -1, -1, -1, -1, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, -1, 630, -1, 632, 633, 634, -1, 636,
+ 637, -1, 639, 640, 641, 642, 643, 644, -1, 646,
+ 647, 648, 649, 650, 651, 652, -1, 654, 655, 656,
+ -1, 658, 659, 660, 661, -1, 663, 664, -1, -1,
+ 667, 668, -1, -1, 671, 672, 673, -1, 675, -1,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, -1,
+ 687, 688, -1, 690, -1, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, -1, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, -1, 723, 724, -1, 726,
+ 727, 728, 729, 19, 20, 732, 733, -1, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, -1, -1, 752, 753, -1, -1, 756,
+ -1, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 127, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -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, 177, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 188, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ 246, 247, -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, 279, -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, -1, 313, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, -1, 324, 325,
+ 326, 327, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, -1, 342, 343, 344, 345,
+ 346, 347, 348, 349, -1, 351, -1, -1, 354, 355,
+ 356, 357, 358, -1, -1, 361, 362, 363, 364, 365,
+ -1, -1, -1, 369, 370, 371, 372, 373, -1, 375,
+ 376, 377, 378, -1, -1, -1, -1, -1, -1, 385,
+ -1, 387, -1, 389, 390, -1, 392, 393, 394, 395,
+ 396, 397, -1, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, -1, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, -1, 423, 424, 425,
+ 426, -1, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, -1, -1, -1, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ -1, -1, -1, -1, -1, 461, 462, 463, 464, 465,
+ 466, -1, 468, 469, -1, 471, 472, -1, -1, 475,
+ -1, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, -1, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, -1, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, -1, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, -1, -1, -1, 585,
+ -1, 587, 588, -1, 590, 591, 592, 593, -1, 595,
+ 596, 597, 598, -1, -1, -1, -1, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, -1, 630, -1, 632, 633, 634, -1,
+ 636, 637, -1, 639, 640, 641, 642, 643, 644, -1,
+ 646, 647, 648, 649, 650, 651, 652, -1, 654, 655,
+ 656, -1, 658, 659, 660, 661, -1, 663, 664, 19,
+ 20, 667, 668, -1, -1, 671, 672, 673, -1, 675,
+ -1, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ -1, 687, 688, -1, 690, -1, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, -1, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, -1, 723, 724, -1,
+ 726, 727, 728, 729, -1, -1, 732, 733, 88, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, -1, -1, 752, 753, -1, -1,
+ 756, -1, 758, 759, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 188, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, 279,
+ -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, 311, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, -1, 324, 325, 326, 327, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, -1, 342, 343, 344, 345, 346, 347, 348, 349,
+ -1, -1, -1, -1, 354, 355, 356, 357, 358, -1,
+ -1, 361, 362, 363, 364, 365, -1, -1, -1, 369,
+ 370, 371, 372, 373, -1, 375, 376, 377, 378, -1,
+ -1, -1, -1, -1, -1, 385, -1, 387, -1, 389,
+ 390, -1, 392, 393, 394, 395, 396, 397, -1, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, -1, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, -1, 423, 424, 425, 426, -1, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, -1,
+ -1, -1, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, -1, -1, -1, -1,
+ -1, 461, 462, 463, 464, 465, 466, -1, 468, 469,
+ -1, 471, 472, -1, -1, 475, -1, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, -1, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, -1, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, -1, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, -1, -1, -1, 585, -1, 587, 588, -1,
+ 590, 591, 592, 593, -1, 595, 596, 597, 598, -1,
+ -1, -1, -1, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, -1,
+ 630, -1, 632, 633, 634, -1, 636, 637, -1, 639,
+ 640, 641, 642, 643, 644, -1, 646, 647, 648, 649,
+ 650, 651, 652, -1, 654, 655, 656, -1, 658, 659,
+ 660, 661, -1, 663, 664, 19, 20, 667, 668, -1,
+ -1, 671, 672, 673, -1, 675, -1, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, -1, 687, 688, -1,
+ 690, -1, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, -1, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, -1, 723, 724, -1, 726, 727, 728, 729,
+ -1, -1, 732, 733, 88, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ -1, -1, 752, 753, -1, -1, 756, -1, 758, 759,
+ -1, -1, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 188, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, 279, -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, 311, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, -1,
+ 324, 325, 326, 327, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, -1, 342, 343,
+ 344, 345, 346, 347, 348, 349, -1, -1, -1, -1,
+ 354, 355, 356, 357, 358, -1, -1, 361, 362, 363,
+ 364, 365, -1, -1, -1, 369, 370, 371, 372, 373,
+ -1, 375, 376, 377, 378, -1, -1, -1, -1, -1,
+ -1, 385, -1, 387, -1, 389, 390, -1, 392, 393,
+ 394, 395, 396, 397, -1, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, -1, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, -1, 423,
+ 424, 425, 426, -1, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, -1, -1, -1, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, -1, -1, -1, -1, -1, 461, 462, 463,
+ 464, 465, 466, -1, 468, 469, -1, 471, 472, -1,
+ -1, 475, -1, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, -1, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, -1, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, -1, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, -1, -1,
+ -1, 585, -1, 587, 588, -1, 590, 591, 592, 593,
+ -1, 595, 596, 597, 598, -1, -1, -1, -1, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, -1, 630, -1, 632, 633,
+ 634, -1, 636, 637, -1, 639, 640, 641, 642, 643,
+ 644, -1, 646, 647, 648, 649, 650, 651, 652, -1,
+ 654, 655, 656, -1, 658, 659, 660, 661, -1, 663,
+ 664, 19, 20, 667, 668, -1, -1, 671, 672, 673,
+ -1, 675, -1, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, -1, 687, 688, -1, 690, -1, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, -1, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, -1, 723,
+ 724, -1, 726, 727, 728, 729, -1, -1, 732, 733,
+ 88, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, -1, -1, 752, 753,
+ -1, -1, 756, -1, 758, 759, -1, -1, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 188, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, 279, -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, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, -1, 324, 325, 326, 327,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, -1, 342, 343, 344, 345, 346, 347,
+ 348, 349, -1, -1, -1, -1, 354, 355, 356, 357,
+ 358, -1, -1, 361, 362, 363, 364, 365, -1, -1,
+ -1, 369, 370, 371, 372, 373, -1, 375, 376, 377,
+ 378, -1, -1, -1, -1, -1, -1, 385, -1, 387,
+ -1, 389, 390, -1, 392, 393, 394, 395, 396, 397,
+ -1, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, -1, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, -1, 423, 424, 425, 426, -1,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, -1, -1, -1, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, -1, -1,
+ -1, -1, -1, 461, 462, 463, 464, 465, 466, -1,
+ 468, 469, -1, 471, 472, -1, -1, 475, -1, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ -1, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ -1, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ -1, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, -1, -1, -1, 585, -1, 587,
+ 588, -1, 590, 591, 592, 593, -1, 595, 596, 597,
+ 598, -1, -1, -1, -1, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, -1, 630, -1, 632, 633, 634, -1, 636, 637,
+ -1, 639, 640, 641, 642, 643, 644, -1, 646, 647,
+ 648, 649, 650, 651, 652, -1, 654, 655, 656, -1,
+ 658, 659, 660, 661, -1, 663, 664, -1, -1, 667,
+ 668, -1, -1, 671, 672, 673, -1, 675, -1, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, -1, 687,
+ 688, -1, 690, -1, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, -1, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, -1, 723, 724, -1, 726, 727,
+ 728, 729, -1, -1, 732, 733, -1, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 19, 20, 752, 753, -1, -1, 756, -1,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, -1,
+ 57, 58, 59, 60, -1, -1, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, -1, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
+ 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,
+ -1, 128, 129, 130, 131, 132, -1, -1, 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, -1, -1, -1,
+ 177, 178, 179, 180, 181, 182, 183, -1, -1, -1,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 197, 198, 199, 200, 201, -1, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, -1, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, -1, 259, 260, -1, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, -1, -1, -1,
+ 287, 288, 289, 290, 291, 292, 293, 294, 295, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, -1,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, 351, -1, 353, -1, 355, -1,
+ -1, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, -1, -1, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, -1, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, -1, 456,
+ 457, 458, -1, 460, 461, 462, -1, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, -1,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, -1, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, -1, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, -1, -1, -1, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, -1, -1,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, -1, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, -1, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, -1, 711, 712, -1, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, -1, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, -1, 751, 752, 753, 754, -1, 756,
+ 757, 758
+};
+
+/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
+ state STATE-NUM. */
+static const yytype_int16 yystos[] =
+{
+ 0, 5, 7, 48, 49, 66, 68, 70, 72, 80,
+ 101, 103, 104, 110, 127, 131, 141, 150, 161, 171,
+ 173, 177, 204, 216, 217, 227, 228, 239, 240, 241,
+ 243, 248, 254, 258, 259, 260, 294, 296, 298, 305,
+ 313, 314, 328, 350, 351, 353, 360, 368, 388, 412,
+ 422, 441, 456, 467, 470, 473, 488, 602, 631, 635,
+ 645, 653, 665, 686, 689, 722, 731, 757, 779, 790,
+ 793, 794, 795, 796, 797, 799, 805, 807, 822, 869,
+ 908, 909, 916, 917, 930, 965, 990, 1008, 1070, 1123,
+ 1224, 1277, 1280, 1290, 1295, 1301, 1314, 1317, 1323, 1326,
+ 1331, 1338, 1350, 1353, 1356, 1357, 1359, 1362, 1363, 1365,
+ 1366, 1369, 1370, 1373, 1610, 1612, 1625, 1628, 1666, 1675,
+ 1693, 1701, 1715, 1719, 1720, 1724, 1725, 1735, 1742, 1750,
+ 1752, 1758, 1761, 1762, 1794, 1849, 1890, 1897, 1899, 1908,
+ 1911, 1947, 1949, 1954, 1955, 1956, 1957, 1982, 1991, 1992,
+ 1993, 1995, 2023, 2024, 2034, 2039, 88, 226, 338, 413,
+ 463, 658, 662, 735, 1225, 1961, 1962, 1963, 1964, 197,
+ 460, 506, 1325, 1722, 19, 20, 88, 116, 135, 144,
+ 188, 195, 207, 218, 279, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, 756,
+ 757, 758, 759, 1816, 1818, 1827, 1834, 1838, 1839, 1840,
+ 1841, 1842, 1843, 1844, 1845, 1846, 1847, 2001, 966, 528,
+ 1318, 208, 1676, 88, 145, 226, 289, 436, 463, 644,
+ 662, 708, 735, 743, 1624, 993, 860, 931, 1626, 1753,
+ 145, 408, 758, 1767, 281, 704, 1893, 991, 1325, 1124,
+ 1009, 57, 528, 1707, 258, 267, 905, 910, 912, 1827,
+ 653, 735, 1893, 995, 910, 911, 860, 1360, 1850, 1702,
+ 910, 1898, 1667, 1827, 1358, 992, 235, 1796, 1629, 173,
+ 294, 684, 1736, 40, 196, 1406, 1948, 3, 31, 1821,
+ 145, 1893, 753, 1951, 1611, 482, 1827, 1325, 403, 918,
+ 1900, 806, 598, 676, 1827, 1325, 1743, 1951, 1827, 1759,
+ 47, 669, 717, 47, 669, 1694, 598, 676, 351, 352,
+ 388, 427, 602, 619, 645, 686, 1985, 1359, 1366, 1369,
+ 0, 7, 791, 602, 88, 129, 145, 262, 293, 644,
+ 735, 839, 1202, 1203, 1624, 1961, 1962, 1963, 1964, 128,
+ 154, 1376, 1377, 1606, 1354, 1351, 119, 152, 292, 1368,
+ 1958, 1367, 1958, 448, 460, 591, 787, 1721, 1722, 1813,
+ 1827, 1363, 1365, 386, 1244, 1827, 863, 1827, 763, 763,
+ 863, 141, 1623, 21, 1821, 1827, 1829, 1623, 1269, 1270,
+ 268, 1394, 1965, 1966, 1961, 763, 1893, 1350, 1353, 1625,
+ 1628, 1666, 1675, 1718, 787, 870, 311, 946, 947, 967,
+ 970, 973, 818, 819, 1821, 743, 1315, 1893, 328, 143,
+ 178, 475, 614, 1678, 1691, 1692, 1623, 1614, 1623, 1623,
+ 1623, 1623, 1623, 1623, 1623, 1623, 658, 1893, 978, 1827,
+ 2005, 47, 48, 80, 84, 101, 110, 131, 145, 150,
+ 173, 232, 236, 254, 258, 259, 289, 296, 297, 353,
+ 393, 436, 441, 452, 453, 607, 611, 617, 628, 634,
+ 665, 669, 698, 1829, 1912, 1916, 1917, 1918, 1920, 1922,
+ 1923, 1924, 1925, 946, 961, 1631, 471, 675, 1754, 154,
+ 1763, 1891, 77, 123, 130, 144, 157, 165, 246, 247,
+ 321, 351, 374, 444, 463, 582, 887, 932, 933, 934,
+ 935, 937, 940, 943, 944, 945, 955, 956, 957, 958,
+ 959, 980, 983, 1818, 1828, 1841, 1842, 1843, 1847, 2002,
+ 2010, 2011, 2012, 2032, 2033, 2034, 2035, 2037, 1893, 3,
+ 8, 9, 19, 20, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, 40, 57, 58, 59, 60,
+ 68, 69, 71, 78, 79, 82, 83, 84, 85, 87,
+ 90, 91, 99, 102, 120, 121, 122, 124, 132, 133,
+ 134, 141, 150, 153, 162, 164, 166, 180, 181, 183,
+ 187, 192, 196, 198, 199, 200, 201, 219, 220, 221,
+ 223, 230, 241, 249, 250, 268, 275, 276, 278, 279,
+ 290, 300, 301, 302, 308, 309, 327, 328, 329, 330,
+ 334, 341, 349, 366, 379, 381, 382, 383, 398, 410,
+ 411, 466, 478, 500, 501, 546, 552, 561, 562, 585,
+ 593, 605, 649, 656, 663, 694, 713, 714, 715, 716,
+ 721, 722, 735, 737, 749, 751, 759, 768, 769, 774,
+ 779, 783, 784, 787, 1369, 1375, 1400, 1401, 1402, 1403,
+ 1407, 1418, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1432,
+ 1433, 1434, 1442, 1448, 1449, 1450, 1451, 1452, 1454, 1457,
+ 1786, 1789, 1791, 1792, 1793, 1810, 1817, 1819, 1820, 1827,
+ 1834, 1845, 1846, 65, 1010, 510, 250, 362, 370, 385,
+ 395, 396, 397, 405, 543, 555, 655, 693, 707, 913,
+ 915, 737, 906, 912, 1827, 860, 1623, 887, 981, 912,
+ 47, 333, 611, 1909, 1910, 1918, 1920, 47, 106, 264,
+ 266, 277, 293, 474, 679, 680, 681, 682, 1379, 1386,
+ 1387, 1960, 3, 71, 99, 144, 321, 366, 463, 468,
+ 506, 556, 577, 593, 644, 661, 687, 717, 750, 1167,
+ 1816, 1825, 1836, 1838, 1839, 1840, 1842, 1843, 1844, 1847,
+ 1851, 1861, 1872, 2001, 47, 49, 79, 80, 89, 145,
+ 159, 214, 226, 281, 324, 344, 353, 366, 377, 400,
+ 430, 433, 435, 462, 463, 468, 469, 485, 506, 528,
+ 582, 597, 606, 609, 610, 624, 661, 669, 690, 747,
+ 1167, 1201, 1703, 1707, 1708, 1710, 1719, 1818, 1862, 912,
+ 1893, 178, 1674, 779, 1645, 1654, 946, 2007, 1795, 1631,
+ 1737, 1827, 343, 1951, 1829, 1332, 1291, 50, 1952, 1400,
+ 1473, 800, 299, 802, 1726, 417, 1813, 1815, 1827, 1901,
+ 1829, 141, 1069, 1821, 128, 1296, 528, 613, 669, 1744,
+ 1745, 287, 1952, 746, 1760, 670, 818, 232, 314, 1281,
+ 1282, 1283, 670, 818, 281, 1696, 1623, 1623, 23, 26,
+ 27, 31, 1787, 1788, 1822, 1984, 1984, 1984, 460, 1983,
+ 1984, 1984, 780, 780, 786, 1827, 1069, 1069, 145, 1069,
+ 1069, 662, 844, 145, 145, 281, 658, 226, 289, 436,
+ 1965, 337, 861, 861, 1961, 111, 135, 779, 784, 1375,
+ 1378, 1478, 1481, 1493, 1496, 1497, 1498, 1509, 1510, 1511,
+ 1512, 1514, 1515, 1516, 1813, 211, 423, 1601, 1602, 1607,
+ 312, 1539, 1376, 123, 127, 168, 173, 206, 577, 1388,
+ 1564, 1569, 1570, 1579, 1580, 1584, 226, 1583, 1596, 1606,
+ 47, 106, 1959, 1959, 1959, 1579, 1581, 1369, 1372, 1373,
+ 1580, 1582, 1371, 47, 1827, 1717, 127, 1716, 787, 1355,
+ 1352, 42, 763, 1648, 1649, 1227, 734, 1229, 787, 542,
+ 709, 727, 85, 1829, 1830, 1831, 1916, 1230, 120, 1235,
+ 1234, 860, 281, 143, 581, 1271, 1272, 1273, 657, 436,
+ 743, 1965, 1829, 1302, 1827, 779, 873, 946, 968, 1400,
+ 114, 975, 973, 287, 1316, 1617, 1618, 1813, 128, 1679,
+ 128, 1679, 1680, 1681, 1688, 1689, 1827, 1691, 1827, 141,
+ 1622, 863, 863, 863, 1827, 860, 1829, 860, 1615, 1623,
+ 1623, 994, 151, 979, 606, 1921, 647, 647, 705, 708,
+ 735, 743, 779, 1399, 475, 584, 704, 580, 735, 89,
+ 743, 333, 551, 633, 333, 333, 203, 333, 371, 528,
+ 669, 551, 287, 203, 782, 779, 283, 427, 178, 414,
+ 474, 1633, 1635, 393, 613, 1755, 1756, 360, 178, 392,
+ 1769, 1813, 1894, 1895, 311, 1828, 128, 136, 561, 1827,
+ 1828, 1828, 1828, 2038, 1827, 311, 1828, 1827, 427, 2033,
+ 1995, 1996, 946, 960, 1827, 788, 127, 177, 241, 313,
+ 351, 786, 1324, 1458, 19, 20, 30, 1817, 1834, 31,
+ 1788, 153, 768, 769, 1425, 779, 779, 779, 311, 1400,
+ 1476, 1477, 779, 779, 779, 779, 779, 1399, 1399, 1399,
+ 779, 1398, 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 779, 779, 779, 779, 1400, 779, 779, 779, 8,
+ 779, 1474, 1475, 1810, 1817, 779, 779, 779, 779, 1400,
+ 1398, 779, 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 15, 779, 779, 779, 779, 1399, 1398, 1398, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 779, 779, 779, 31, 779, 779, 779, 779, 779,
+ 779, 779, 779, 737, 779, 779, 779, 737, 779, 779,
+ 779, 779, 31, 779, 779, 779, 31, 779, 779, 779,
+ 779, 779, 779, 779, 779, 153, 1425, 153, 1425, 1425,
+ 1125, 1369, 1400, 1794, 1827, 1817, 33, 41, 50, 208,
+ 315, 1404, 1405, 35, 36, 37, 39, 156, 763, 764,
+ 765, 1408, 55, 151, 167, 238, 677, 1406, 14, 43,
+ 44, 107, 192, 766, 767, 768, 769, 770, 771, 772,
+ 773, 1425, 73, 38, 213, 213, 751, 1822, 787, 779,
+ 15, 1011, 54, 287, 782, 763, 1822, 1328, 1830, 1832,
+ 1327, 733, 1921, 584, 203, 128, 203, 1361, 1387, 3,
+ 1829, 258, 644, 787, 57, 99, 1168, 1169, 1648, 1829,
+ 127, 1648, 1648, 1917, 99, 1817, 1855, 1864, 1852, 57,
+ 99, 1171, 1172, 1829, 787, 1648, 1853, 782, 670, 1722,
+ 779, 88, 214, 226, 281, 289, 324, 436, 463, 658,
+ 735, 743, 167, 312, 1714, 63, 688, 376, 688, 688,
+ 318, 688, 435, 688, 1714, 47, 1082, 1829, 1568, 1569,
+ 1574, 128, 151, 1709, 1711, 376, 688, 127, 688, 704,
+ 676, 47, 355, 399, 401, 491, 541, 588, 678, 700,
+ 1697, 1698, 1699, 818, 477, 818, 1574, 1714, 1711, 510,
+ 429, 378, 608, 704, 720, 1722, 1393, 688, 740, 143,
+ 1268, 1655, 782, 422, 1797, 1798, 1805, 1827, 1634, 1635,
+ 1813, 2040, 782, 1333, 1334, 1335, 1336, 1813, 1617, 363,
+ 568, 239, 568, 1953, 782, 1400, 803, 57, 270, 416,
+ 430, 432, 464, 477, 510, 528, 606, 613, 623, 637,
+ 669, 672, 688, 719, 1727, 1732, 1733, 1818, 1893, 3,
+ 74, 919, 920, 921, 922, 1817, 582, 232, 374, 1406,
+ 1827, 798, 743, 1293, 1893, 1747, 360, 1746, 782, 653,
+ 1827, 1953, 127, 1284, 1285, 1284, 580, 755, 394, 782,
+ 1284, 1284, 1618, 1827, 1821, 782, 579, 1987, 699, 1988,
+ 763, 158, 639, 1986, 7, 792, 1827, 826, 1069, 860,
+ 860, 1069, 830, 832, 1069, 1069, 1069, 837, 838, 743,
+ 463, 463, 1965, 779, 1478, 1498, 1510, 1511, 1512, 1513,
+ 1514, 1827, 10, 1384, 81, 147, 158, 166, 193, 249,
+ 277, 1505, 1506, 782, 217, 1507, 1508, 31, 1823, 1823,
+ 3, 1603, 1604, 1605, 1827, 1829, 1540, 136, 1543, 1539,
+ 454, 561, 1571, 296, 8, 28, 30, 32, 251, 1575,
+ 1576, 1789, 1817, 151, 65, 1576, 1568, 1388, 1827, 1388,
+ 1389, 1389, 1372, 1718, 393, 1723, 1787, 1827, 1827, 1580,
+ 1583, 1821, 99, 386, 1066, 1067, 1079, 1080, 1175, 408,
+ 864, 1827, 1399, 3, 864, 1813, 583, 1830, 1831, 1832,
+ 1931, 1935, 1623, 1273, 413, 489, 863, 1813, 743, 1303,
+ 1304, 1618, 787, 871, 874, 875, 1400, 974, 311, 969,
+ 971, 887, 1998, 427, 808, 1617, 127, 364, 448, 450,
+ 540, 614, 782, 1319, 1320, 1321, 1813, 54, 1677, 1620,
+ 1621, 1814, 1827, 127, 1382, 1383, 1539, 782, 1682, 787,
+ 1690, 120, 1827, 787, 1915, 1918, 1832, 1930, 1617, 1616,
+ 1613, 422, 2009, 643, 977, 704, 780, 333, 1832, 333,
+ 333, 1931, 214, 226, 281, 463, 862, 1919, 353, 393,
+ 436, 441, 452, 453, 607, 617, 628, 634, 665, 669,
+ 698, 1923, 1925, 1803, 1804, 1817, 962, 141, 1268, 479,
+ 735, 1400, 1757, 1757, 1339, 506, 1768, 53, 763, 1535,
+ 1536, 1537, 572, 746, 782, 1892, 946, 311, 1827, 561,
+ 128, 154, 1994, 2028, 946, 311, 779, 954, 177, 786,
+ 936, 782, 986, 984, 989, 985, 2036, 1617, 3, 1459,
+ 1829, 787, 779, 47, 1467, 1538, 1467, 1467, 1400, 1477,
+ 114, 311, 427, 1400, 1473, 1400, 106, 1467, 1538, 780,
+ 24, 25, 26, 28, 30, 32, 780, 1588, 1592, 1593,
+ 1400, 1400, 1810, 780, 1364, 1365, 1374, 1794, 92, 93,
+ 94, 95, 138, 139, 140, 189, 190, 253, 316, 411,
+ 478, 544, 546, 552, 612, 656, 748, 759, 1532, 1533,
+ 1400, 106, 1460, 1460, 1447, 1400, 1400, 1400, 1532, 1400,
+ 1400, 1400, 1817, 1475, 336, 782, 787, 106, 1467, 1400,
+ 106, 1467, 1400, 1400, 1400, 1400, 1400, 780, 1403, 780,
+ 1400, 1400, 780, 648, 1467, 1467, 106, 1467, 780, 1588,
+ 1467, 1467, 780, 1400, 1400, 1429, 1430, 1431, 64, 163,
+ 288, 1400, 1419, 1420, 1421, 1400, 1400, 106, 1467, 1400,
+ 1400, 1400, 1415, 1416, 1400, 1400, 1472, 1473, 1400, 1400,
+ 409, 410, 713, 716, 1534, 1400, 1400, 1473, 1813, 1400,
+ 1400, 127, 1813, 1472, 1400, 127, 1400, 1400, 1813, 1400,
+ 1400, 1533, 1533, 1400, 1419, 1400, 780, 8, 787, 1811,
+ 1827, 1400, 1472, 1400, 1400, 1400, 780, 782, 1365, 1400,
+ 787, 1400, 1400, 1400, 1402, 122, 201, 290, 732, 1406,
+ 47, 340, 1402, 1409, 1402, 779, 1375, 1402, 1402, 167,
+ 55, 151, 167, 238, 1403, 1403, 1403, 1403, 1403, 1403,
+ 1403, 153, 1403, 153, 1403, 1403, 1403, 1403, 1403, 1173,
+ 1829, 1425, 779, 1456, 1549, 1827, 779, 136, 328, 329,
+ 330, 1817, 1435, 461, 493, 567, 648, 1417, 169, 229,
+ 505, 703, 1012, 1016, 1751, 1821, 915, 410, 713, 716,
+ 914, 1457, 1791, 1810, 782, 287, 1329, 1330, 1813, 946,
+ 782, 127, 1832, 1831, 1932, 862, 1919, 770, 1391, 1392,
+ 1394, 468, 506, 661, 1863, 1648, 1918, 1827, 73, 1400,
+ 1882, 1881, 1880, 787, 787, 1648, 782, 1854, 232, 492,
+ 1883, 1884, 1885, 1886, 1827, 1873, 99, 717, 1817, 1856,
+ 1868, 1858, 1859, 1861, 1872, 688, 127, 770, 1069, 63,
+ 863, 863, 1813, 863, 318, 863, 863, 863, 1813, 1832,
+ 1813, 1393, 1393, 376, 688, 1714, 863, 1714, 1709, 376,
+ 688, 1714, 151, 1712, 510, 553, 688, 1706, 1706, 1714,
+ 1827, 863, 1714, 1831, 1709, 1714, 1821, 490, 701, 451,
+ 127, 1700, 782, 435, 688, 1813, 1711, 1709, 1709, 127,
+ 1714, 1714, 1714, 1481, 1665, 1813, 1394, 1657, 1659, 779,
+ 1652, 2008, 782, 779, 1801, 154, 1636, 2028, 3, 151,
+ 782, 217, 1344, 1346, 1347, 448, 614, 1292, 363, 239,
+ 1400, 801, 99, 143, 804, 1400, 1660, 1661, 510, 510,
+ 510, 510, 360, 510, 818, 510, 782, 1393, 1728, 1829,
+ 914, 924, 782, 763, 1536, 1902, 120, 676, 1400, 1294,
+ 1617, 287, 1749, 818, 1745, 1827, 47, 1279, 627, 683,
+ 1286, 1287, 127, 820, 821, 673, 1283, 820, 1892, 1787,
+ 596, 1989, 1829, 834, 1827, 828, 1915, 1931, 1829, 1069,
+ 1069, 823, 1813, 2025, 1394, 1974, 848, 1394, 1069, 1069,
+ 1069, 743, 1494, 782, 780, 780, 780, 780, 780, 782,
+ 780, 1478, 47, 53, 55, 128, 1385, 1537, 158, 158,
+ 210, 1517, 166, 249, 1505, 1517, 1478, 1496, 779, 1384,
+ 1608, 1829, 782, 787, 1400, 65, 137, 1541, 1543, 251,
+ 649, 1572, 1576, 572, 668, 746, 1390, 1817, 439, 251,
+ 577, 782, 787, 664, 1565, 649, 1572, 1597, 1400, 1228,
+ 1649, 1067, 73, 1167, 418, 191, 231, 268, 386, 398,
+ 498, 568, 866, 868, 1632, 1829, 1632, 1236, 779, 480,
+ 242, 782, 1939, 1813, 1233, 1232, 1813, 782, 595, 1305,
+ 1827, 873, 780, 782, 283, 946, 971, 68, 108, 142,
+ 179, 481, 511, 512, 514, 515, 516, 517, 518, 520,
+ 521, 522, 523, 524, 525, 526, 527, 529, 530, 531,
+ 532, 625, 626, 809, 810, 817, 127, 1322, 734, 1618,
+ 1320, 1507, 703, 782, 1684, 787, 1690, 222, 1563, 1564,
+ 1689, 128, 770, 1827, 203, 1827, 782, 782, 67, 244,
+ 1274, 1617, 1617, 887, 779, 948, 951, 287, 314, 1914,
+ 63, 770, 1813, 1827, 1929, 1929, 780, 782, 887, 1997,
+ 1636, 1400, 1832, 1340, 1341, 1342, 1343, 1813, 146, 144,
+ 321, 463, 1818, 1824, 1833, 1838, 1839, 1840, 1841, 1842,
+ 1843, 1844, 1847, 2001, 178, 232, 755, 1896, 26, 769,
+ 1585, 1587, 1895, 941, 946, 154, 649, 1827, 97, 886,
+ 2029, 938, 946, 948, 949, 953, 1827, 978, 980, 981,
+ 2007, 2028, 1892, 1863, 42, 1817, 1400, 780, 1468, 780,
+ 780, 283, 427, 1400, 1400, 53, 299, 780, 299, 782,
+ 1443, 780, 770, 780, 782, 782, 780, 780, 1365, 128,
+ 780, 1445, 1446, 1400, 782, 782, 782, 769, 780, 782,
+ 780, 782, 782, 780, 779, 1810, 1817, 1467, 780, 780,
+ 1467, 780, 782, 782, 780, 780, 780, 151, 782, 782,
+ 780, 780, 1467, 780, 780, 780, 780, 782, 128, 782,
+ 780, 128, 1400, 128, 1400, 128, 1400, 128, 780, 782,
+ 780, 1467, 780, 780, 782, 782, 780, 782, 782, 782,
+ 780, 780, 780, 782, 780, 780, 782, 780, 780, 780,
+ 1813, 780, 780, 780, 1813, 782, 780, 782, 782, 780,
+ 782, 782, 782, 780, 780, 782, 1817, 1827, 780, 787,
+ 53, 504, 782, 1190, 780, 780, 1532, 1532, 1473, 780,
+ 785, 1817, 122, 201, 290, 732, 779, 50, 1400, 434,
+ 1402, 1402, 779, 1375, 1402, 1402, 1400, 1400, 1550, 217,
+ 1552, 779, 779, 779, 779, 779, 787, 1394, 1439, 1440,
+ 1441, 378, 779, 1021, 1022, 1014, 1021, 1015, 591, 1024,
+ 160, 472, 1400, 763, 1832, 1832, 782, 1892, 427, 131,
+ 1918, 128, 782, 1929, 1929, 782, 1400, 1808, 1817, 787,
+ 787, 787, 99, 144, 321, 463, 577, 750, 1818, 1821,
+ 1826, 1835, 1838, 1839, 1840, 1841, 1843, 1844, 1847, 2001,
+ 1876, 127, 1648, 99, 1173, 1174, 1832, 31, 578, 593,
+ 1888, 47, 57, 99, 203, 1400, 1889, 1827, 1827, 1865,
+ 1864, 127, 580, 755, 504, 782, 782, 1648, 1889, 787,
+ 1857, 787, 1648, 782, 782, 1860, 1400, 780, 1827, 863,
+ 863, 1821, 1400, 863, 1714, 1714, 863, 1714, 1821, 128,
+ 1713, 860, 1714, 613, 1574, 1699, 1712, 820, 1709, 1813,
+ 1714, 1714, 1400, 258, 1507, 1661, 780, 782, 1653, 887,
+ 1798, 1802, 1804, 53, 1637, 1638, 886, 1829, 99, 1337,
+ 1827, 1335, 1813, 1007, 1346, 145, 160, 1199, 1348, 802,
+ 782, 100, 1738, 818, 1733, 1617, 1734, 922, 925, 926,
+ 921, 573, 574, 650, 923, 454, 561, 1827, 1903, 1904,
+ 1821, 1617, 448, 614, 736, 1297, 1298, 1299, 1587, 47,
+ 1748, 670, 782, 365, 1278, 1695, 782, 127, 1990, 1065,
+ 1066, 299, 723, 1211, 1827, 314, 1913, 1939, 845, 1827,
+ 1827, 1813, 825, 863, 2020, 1069, 1069, 1813, 863, 1827,
+ 863, 1069, 1400, 1478, 1478, 785, 576, 713, 717, 1380,
+ 1381, 1427, 1381, 158, 1517, 1517, 1509, 158, 203, 299,
+ 1531, 1827, 1536, 1167, 1170, 1604, 1827, 1400, 1544, 1809,
+ 1542, 750, 1546, 1541, 314, 580, 1573, 1572, 507, 1587,
+ 1576, 1577, 439, 1576, 1576, 1817, 549, 1566, 1809, 123,
+ 779, 1065, 1821, 1649, 1649, 557, 268, 268, 657, 1821,
+ 268, 268, 268, 182, 360, 406, 484, 547, 563, 564,
+ 568, 569, 570, 636, 686, 841, 842, 88, 476, 586,
+ 593, 599, 674, 735, 846, 847, 65, 314, 742, 1933,
+ 270, 369, 494, 566, 695, 756, 1927, 1928, 1935, 314,
+ 1942, 1892, 203, 856, 1241, 779, 1967, 1231, 1304, 127,
+ 872, 1400, 1998, 972, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763, 763, 782,
+ 820, 734, 1381, 1621, 1827, 299, 1827, 576, 168, 1578,
+ 1481, 787, 1690, 1813, 1918, 1832, 1892, 427, 898, 899,
+ 952, 34, 1931, 333, 787, 787, 287, 287, 1803, 963,
+ 1637, 782, 1344, 1346, 1823, 755, 506, 392, 24, 25,
+ 28, 30, 32, 942, 154, 76, 77, 144, 443, 444,
+ 463, 750, 892, 893, 895, 901, 928, 929, 1818, 1838,
+ 1839, 1840, 1841, 1842, 1843, 1844, 1847, 2001, 2003, 2014,
+ 2030, 427, 2033, 786, 939, 950, 780, 782, 987, 976,
+ 982, 1828, 982, 982, 886, 1826, 1400, 782, 1400, 1400,
+ 283, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 57, 58, 59, 60, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, 87, 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, 117, 118, 119, 120,
+ 121, 122, 123, 124, 125, 126, 128, 129, 130, 131,
+ 132, 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, 177,
+ 178, 179, 180, 181, 182, 183, 187, 189, 190, 191,
+ 192, 193, 194, 196, 197, 198, 199, 200, 201, 203,
+ 204, 205, 206, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 217, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 259, 260, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 280, 281, 282, 283, 287, 288, 289, 290, 291, 292,
+ 293, 294, 295, 296, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 328, 329, 330, 409, 410, 559,
+ 577, 666, 716, 739, 1131, 1469, 1470, 1471, 1818, 1837,
+ 1838, 1839, 1840, 1841, 1842, 1847, 1848, 1999, 2000, 2001,
+ 1168, 1168, 1469, 1473, 780, 153, 153, 1400, 1473, 1473,
+ 782, 1400, 1400, 1400, 1400, 1400, 1400, 1400, 1403, 787,
+ 780, 780, 1400, 1400, 1400, 1400, 1400, 780, 1400, 1400,
+ 1400, 1400, 128, 1400, 128, 1400, 128, 1400, 153, 1400,
+ 780, 1416, 1400, 1415, 1473, 1400, 1400, 1400, 1473, 28,
+ 768, 1585, 1589, 153, 1400, 1400, 1400, 1400, 1400, 787,
+ 787, 1827, 57, 71, 1185, 1186, 1187, 1188, 1189, 1588,
+ 1587, 780, 769, 769, 1374, 1402, 780, 782, 1402, 50,
+ 1400, 434, 1532, 1532, 1551, 1827, 65, 780, 1453, 1472,
+ 1400, 1431, 1472, 1400, 1421, 1472, 1472, 1817, 1400, 780,
+ 782, 779, 1030, 1403, 1022, 168, 1060, 1061, 1588, 697,
+ 1025, 338, 1017, 1013, 914, 287, 1330, 287, 241, 584,
+ 1930, 1831, 128, 128, 1392, 1395, 1395, 787, 787, 787,
+ 1648, 1400, 1832, 1875, 1648, 779, 779, 1648, 1648, 1889,
+ 793, 232, 632, 659, 1887, 1885, 1884, 1874, 1827, 1883,
+ 1827, 1869, 1858, 1859, 1868, 433, 747, 1585, 1590, 1704,
+ 30, 1713, 1539, 1709, 1670, 1671, 1811, 1382, 1395, 1394,
+ 1656, 1658, 1661, 427, 780, 779, 1630, 1619, 1813, 427,
+ 1345, 779, 1661, 763, 820, 127, 314, 1729, 1730, 763,
+ 782, 36, 37, 454, 499, 561, 604, 763, 764, 765,
+ 1905, 1907, 1539, 127, 128, 1300, 1298, 820, 1287, 1821,
+ 733, 1288, 1994, 2004, 1587, 545, 358, 472, 652, 1217,
+ 1217, 203, 1211, 333, 1942, 126, 203, 203, 824, 840,
+ 841, 2021, 1975, 863, 835, 2027, 641, 2026, 1813, 782,
+ 1381, 31, 1403, 50, 287, 1478, 1509, 158, 158, 1478,
+ 1509, 1499, 1500, 780, 782, 1526, 1527, 1169, 1609, 16,
+ 17, 782, 1545, 51, 104, 1567, 1400, 1456, 1547, 1548,
+ 1546, 712, 1573, 1577, 1390, 782, 1567, 1571, 1394, 1598,
+ 1599, 1600, 1174, 1169, 408, 408, 413, 489, 1649, 1649,
+ 65, 1649, 1651, 1649, 182, 547, 314, 1649, 1650, 1650,
+ 842, 1237, 1821, 1821, 1821, 1821, 1587, 1821, 1821, 780,
+ 782, 31, 593, 1829, 1936, 1937, 31, 31, 31, 50,
+ 1926, 533, 534, 537, 538, 539, 1940, 1941, 331, 593,
+ 1240, 1226, 390, 654, 240, 1242, 1827, 1968, 53, 1967,
+ 47, 378, 1306, 873, 283, 779, 779, 1587, 779, 1587,
+ 1587, 1821, 1821, 1590, 1821, 1587, 1821, 1821, 1821, 1821,
+ 1821, 1821, 1821, 1587, 1821, 404, 568, 671, 1792, 122,
+ 290, 1587, 1595, 1821, 1587, 810, 787, 1481, 1690, 1393,
+ 251, 1576, 245, 1686, 1539, 1892, 1274, 127, 900, 780,
+ 1400, 951, 314, 1944, 584, 770, 770, 1931, 1931, 113,
+ 114, 115, 964, 1627, 1342, 1813, 1346, 143, 1349, 1764,
+ 56, 57, 61, 62, 71, 96, 109, 125, 153, 155,
+ 174, 175, 176, 184, 185, 186, 202, 234, 258, 261,
+ 284, 285, 286, 306, 307, 354, 356, 357, 373, 409,
+ 410, 431, 455, 496, 558, 559, 574, 575, 616, 649,
+ 710, 713, 716, 723, 739, 759, 1129, 1131, 1132, 1133,
+ 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144,
+ 470, 74, 86, 782, 786, 1400, 949, 2009, 427, 787,
+ 1400, 1400, 779, 1150, 1151, 1153, 1153, 779, 1146, 1147,
+ 1151, 779, 1147, 1155, 95, 155, 1151, 1150, 1152, 1154,
+ 1153, 155, 1154, 1151, 780, 780, 780, 780, 1444, 1400,
+ 1400, 780, 206, 1462, 1462, 1400, 782, 782, 780, 782,
+ 780, 780, 780, 151, 1436, 1437, 1817, 780, 780, 780,
+ 780, 780, 782, 127, 782, 1400, 1400, 1400, 1400, 780,
+ 780, 53, 1410, 780, 53, 780, 780, 780, 28, 30,
+ 30, 780, 782, 1400, 780, 780, 782, 782, 780, 1817,
+ 1827, 787, 779, 1180, 1180, 51, 104, 643, 768, 1182,
+ 1183, 1184, 782, 782, 1400, 1400, 780, 1473, 1402, 780,
+ 782, 1402, 1552, 1544, 206, 1455, 780, 780, 780, 780,
+ 780, 780, 779, 1395, 1441, 1018, 1019, 1020, 1827, 780,
+ 1590, 153, 65, 779, 1032, 763, 779, 1022, 1832, 1813,
+ 128, 1932, 1932, 53, 1396, 1821, 1827, 770, 1817, 1827,
+ 1827, 1877, 1889, 1888, 31, 31, 1867, 1866, 387, 726,
+ 232, 1889, 1648, 1648, 1889, 24, 25, 28, 30, 32,
+ 1574, 1705, 1714, 782, 1668, 1648, 1536, 1661, 780, 782,
+ 313, 1364, 11, 12, 258, 1002, 1364, 1639, 1641, 1644,
+ 1507, 779, 225, 1528, 1529, 1530, 1827, 779, 1731, 232,
+ 250, 362, 370, 385, 395, 396, 397, 405, 543, 555,
+ 640, 655, 693, 707, 927, 926, 1906, 1574, 734, 554,
+ 513, 817, 1289, 1813, 203, 1831, 1240, 408, 1813, 1813,
+ 11, 13, 18, 145, 167, 215, 272, 273, 274, 292,
+ 346, 348, 368, 386, 393, 408, 415, 430, 487, 497,
+ 535, 548, 587, 593, 651, 658, 690, 705, 706, 718,
+ 998, 1000, 1071, 1073, 1074, 1076, 1078, 1079, 1080, 1087,
+ 1818, 1071, 779, 883, 863, 849, 1967, 779, 885, 96,
+ 155, 234, 692, 1085, 885, 836, 1495, 1381, 1381, 203,
+ 1502, 1509, 1509, 203, 1504, 1400, 779, 1007, 1827, 1524,
+ 1525, 378, 1771, 1809, 53, 782, 1809, 1572, 1576, 1400,
+ 780, 782, 1589, 1589, 1589, 1589, 1589, 1589, 1632, 847,
+ 31, 53, 299, 1934, 1938, 208, 1927, 1587, 1587, 1587,
+ 1792, 768, 1585, 1586, 1940, 173, 294, 1238, 446, 46,
+ 48, 49, 70, 72, 78, 110, 173, 204, 206, 217,
+ 240, 338, 375, 419, 420, 426, 438, 459, 483, 550,
+ 618, 629, 630, 631, 722, 1005, 1072, 1074, 1245, 1250,
+ 1252, 1255, 1261, 1262, 1263, 1265, 1266, 1560, 1406, 1950,
+ 342, 437, 850, 287, 419, 426, 852, 780, 782, 1969,
+ 1970, 53, 47, 779, 1307, 1998, 813, 814, 1587, 815,
+ 816, 1587, 811, 812, 1587, 1827, 1539, 1827, 439, 251,
+ 1687, 1683, 1350, 1794, 131, 1939, 1939, 961, 1997, 961,
+ 1639, 1349, 502, 143, 328, 1770, 1153, 1153, 391, 1151,
+ 1159, 1161, 1146, 224, 1146, 1159, 57, 71, 73, 306,
+ 341, 359, 730, 1134, 1139, 1141, 1161, 1167, 1176, 1178,
+ 1134, 1159, 1134, 1146, 779, 1159, 1134, 1153, 1153, 1134,
+ 1153, 779, 1146, 1159, 71, 307, 307, 310, 1146, 1153,
+ 723, 779, 891, 1153, 1153, 1153, 576, 1153, 1153, 894,
+ 1146, 310, 1153, 1153, 1153, 1153, 1153, 1155, 127, 127,
+ 2031, 1827, 988, 976, 1827, 24, 28, 30, 32, 1177,
+ 1178, 30, 30, 1152, 1177, 1177, 780, 1532, 1532, 65,
+ 256, 1461, 168, 1464, 1465, 780, 1400, 1400, 1473, 193,
+ 357, 780, 314, 1438, 1400, 1400, 1400, 1532, 96, 109,
+ 125, 155, 234, 295, 409, 410, 558, 559, 716, 1139,
+ 1140, 1411, 1412, 1413, 1414, 1469, 1595, 1532, 1400, 1400,
+ 1827, 1588, 780, 1190, 1185, 1183, 1185, 1186, 1587, 780,
+ 1473, 206, 1553, 65, 780, 1472, 1396, 780, 782, 347,
+ 1063, 1400, 1016, 217, 1033, 1034, 1035, 1588, 1018, 1932,
+ 1821, 1827, 787, 1648, 1648, 1889, 780, 780, 1889, 1889,
+ 1871, 1870, 1574, 1671, 1539, 99, 1660, 1526, 1395, 1661,
+ 780, 1642, 1643, 1806, 1807, 1811, 1827, 1794, 1640, 1686,
+ 1644, 47, 1251, 1259, 1260, 1827, 780, 782, 1590, 1739,
+ 1740, 447, 173, 779, 763, 782, 827, 1813, 754, 831,
+ 833, 75, 594, 787, 1088, 1089, 1090, 1091, 1099, 1100,
+ 1105, 1106, 1107, 1199, 1202, 1203, 1812, 1827, 167, 741,
+ 418, 1813, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
+ 1649, 1649, 418, 1649, 1649, 1649, 1649, 1649, 1649, 1649,
+ 1649, 1649, 1649, 421, 541, 1827, 1649, 1649, 1003, 1004,
+ 1005, 782, 1073, 999, 1648, 884, 865, 54, 335, 996,
+ 203, 53, 876, 877, 641, 676, 641, 1967, 22, 29,
+ 31, 1479, 1501, 299, 1503, 299, 1531, 143, 298, 459,
+ 1519, 1520, 1523, 117, 118, 205, 282, 1772, 1773, 170,
+ 1774, 1567, 1549, 1548, 1567, 1573, 1572, 1395, 1600, 593,
+ 1821, 1936, 30, 30, 593, 99, 153, 560, 1239, 75,
+ 217, 384, 594, 702, 1091, 1099, 1100, 1267, 1199, 1267,
+ 217, 1267, 217, 217, 281, 287, 75, 126, 217, 594,
+ 702, 1104, 1199, 1267, 1649, 217, 65, 1007, 53, 287,
+ 384, 763, 1199, 1276, 1649, 217, 159, 705, 159, 217,
+ 705, 1267, 217, 592, 217, 217, 217, 1072, 782, 1004,
+ 1250, 779, 1090, 603, 1400, 1400, 203, 856, 863, 203,
+ 386, 857, 1827, 1632, 1364, 1969, 1308, 485, 780, 782,
+ 780, 782, 780, 782, 1685, 128, 439, 1391, 1632, 584,
+ 314, 1943, 1943, 203, 1662, 154, 1159, 1158, 1648, 1159,
+ 295, 317, 666, 1148, 1149, 1149, 1176, 99, 1173, 1159,
+ 1134, 1177, 1168, 57, 73, 391, 1162, 1149, 1223, 1787,
+ 1159, 1223, 1149, 310, 1149, 1159, 576, 889, 890, 1827,
+ 2006, 99, 1994, 2013, 1134, 888, 928, 1134, 1149, 2013,
+ 237, 1145, 1177, 57, 1179, 1134, 1159, 1149, 1149, 896,
+ 904, 905, 1587, 779, 897, 982, 780, 780, 780, 780,
+ 782, 780, 780, 1463, 1809, 1787, 1464, 1466, 1575, 780,
+ 780, 782, 780, 498, 549, 613, 780, 780, 1146, 155,
+ 1154, 71, 1154, 1177, 780, 780, 782, 780, 780, 780,
+ 1181, 780, 782, 780, 65, 229, 251, 1554, 1555, 1809,
+ 780, 1020, 1532, 160, 472, 780, 782, 1036, 780, 770,
+ 1879, 1878, 1889, 1889, 820, 1563, 406, 1799, 780, 782,
+ 787, 1365, 1646, 1647, 1811, 1632, 780, 782, 1529, 780,
+ 782, 50, 1741, 1658, 1821, 817, 779, 829, 1829, 779,
+ 779, 1222, 1812, 10, 127, 1101, 1827, 780, 782, 72,
+ 126, 225, 293, 1103, 1198, 1105, 1069, 1199, 1200, 1200,
+ 1108, 787, 1813, 1649, 99, 1587, 1594, 99, 1587, 99,
+ 1587, 99, 1587, 1075, 1590, 1587, 1587, 1821, 1821, 1649,
+ 1587, 1829, 454, 499, 568, 1084, 1587, 1590, 1590, 99,
+ 1587, 1821, 99, 389, 391, 425, 455, 588, 622, 1083,
+ 1594, 1587, 1594, 1001, 1770, 1073, 1071, 26, 28, 30,
+ 32, 99, 1591, 1592, 1821, 1827, 148, 151, 212, 879,
+ 880, 881, 882, 1827, 2015, 2016, 2017, 866, 867, 1950,
+ 2022, 101, 150, 296, 997, 654, 1969, 780, 878, 2016,
+ 1980, 1981, 1821, 1980, 53, 31, 378, 1482, 1400, 779,
+ 1400, 779, 780, 1199, 1199, 1520, 65, 65, 117, 65,
+ 1773, 271, 282, 1775, 1776, 1573, 779, 446, 30, 331,
+ 141, 1069, 141, 1068, 741, 1068, 1622, 1622, 1325, 1622,
+ 1251, 1260, 1813, 1167, 1622, 160, 1623, 10, 1622, 741,
+ 225, 1622, 1622, 99, 1827, 1325, 1561, 1562, 1811, 1006,
+ 1622, 1622, 1813, 99, 1827, 1325, 1260, 1622, 1325, 1325,
+ 1325, 1251, 46, 78, 110, 1263, 1086, 1088, 335, 454,
+ 1275, 1532, 669, 1821, 422, 1243, 314, 1971, 1632, 1311,
+ 1827, 47, 779, 1309, 814, 816, 812, 1632, 1403, 131,
+ 1940, 1945, 1946, 424, 1686, 281, 1827, 317, 295, 99,
+ 1173, 1158, 780, 782, 780, 888, 780, 782, 1129, 1400,
+ 2013, 787, 763, 1179, 209, 265, 269, 902, 903, 904,
+ 907, 1406, 1827, 878, 127, 30, 782, 1567, 780, 1400,
+ 549, 445, 1590, 780, 1587, 1566, 780, 55, 403, 410,
+ 713, 716, 725, 1556, 1557, 1791, 1567, 685, 1062, 1017,
+ 779, 1023, 1035, 1037, 1827, 1889, 1889, 1578, 1800, 1806,
+ 770, 1827, 780, 782, 1648, 1260, 1740, 419, 780, 1219,
+ 1221, 1827, 779, 583, 1219, 1219, 779, 1827, 1089, 779,
+ 160, 160, 1200, 1069, 236, 1192, 1222, 1827, 1069, 1069,
+ 144, 354, 356, 357, 373, 409, 410, 431, 455, 496,
+ 558, 559, 574, 575, 616, 660, 710, 713, 716, 739,
+ 759, 928, 1109, 1130, 1132, 1818, 1838, 1839, 1840, 1841,
+ 1842, 1847, 2001, 1827, 780, 1821, 779, 1821, 53, 1064,
+ 1003, 780, 782, 879, 649, 723, 1129, 105, 2033, 203,
+ 850, 782, 865, 2018, 1129, 2018, 1969, 779, 780, 1531,
+ 1531, 127, 1518, 1518, 1787, 1787, 65, 1787, 65, 65,
+ 1776, 31, 1239, 411, 1238, 1406, 1325, 1406, 1101, 1827,
+ 1812, 1251, 1812, 1247, 287, 1249, 1169, 1812, 1622, 1259,
+ 127, 160, 1812, 1812, 1251, 782, 1567, 1010, 1827, 1812,
+ 1588, 314, 1107, 1251, 1256, 1251, 780, 1827, 851, 858,
+ 859, 72, 361, 506, 780, 782, 1310, 287, 584, 1946,
+ 1663, 1632, 1813, 1177, 1787, 1177, 2013, 889, 1827, 30,
+ 782, 2033, 461, 780, 899, 780, 1809, 780, 780, 780,
+ 725, 1557, 1558, 1791, 649, 601, 440, 1559, 601, 1791,
+ 1063, 779, 1030, 1026, 99, 303, 304, 403, 475, 1038,
+ 1669, 1804, 787, 1647, 1661, 367, 780, 782, 1567, 779,
+ 1219, 779, 780, 780, 1827, 779, 1400, 1069, 1222, 1827,
+ 1813, 299, 1210, 723, 1222, 1222, 1111, 787, 1102, 1103,
+ 1110, 787, 1734, 1002, 1001, 2016, 723, 891, 576, 6,
+ 843, 1394, 855, 856, 2016, 2019, 195, 1483, 1484, 1827,
+ 1536, 780, 780, 136, 158, 206, 1522, 1521, 1787, 1787,
+ 1787, 780, 120, 1253, 120, 144, 196, 1218, 110, 258,
+ 1107, 1319, 281, 287, 73, 1812, 1827, 1274, 1246, 1562,
+ 287, 287, 281, 1275, 1257, 1259, 1248, 685, 853, 2033,
+ 584, 72, 72, 1827, 225, 1312, 1313, 1827, 1403, 160,
+ 1507, 787, 903, 1567, 458, 50, 458, 136, 403, 568,
+ 712, 1028, 1029, 1827, 780, 696, 1031, 1040, 711, 145,
+ 386, 393, 408, 535, 548, 565, 705, 1054, 1055, 1056,
+ 1059, 1076, 1708, 1632, 244, 770, 1892, 1221, 30, 782,
+ 1220, 846, 1892, 1892, 782, 1827, 780, 1222, 1210, 723,
+ 779, 1193, 1217, 1092, 1217, 1094, 1095, 18, 225, 293,
+ 386, 495, 752, 1076, 1112, 1113, 1122, 1164, 1165, 1166,
+ 1191, 1406, 1132, 73, 99, 201, 203, 346, 465, 660,
+ 1116, 1118, 1156, 1157, 1165, 1827, 780, 1077, 1078, 576,
+ 1827, 1976, 852, 2032, 218, 780, 782, 1485, 65, 65,
+ 779, 779, 1812, 591, 779, 1254, 144, 99, 99, 1275,
+ 1813, 217, 1174, 1325, 1827, 1812, 1813, 1258, 1297, 1400,
+ 428, 854, 843, 584, 584, 780, 782, 296, 1765, 1827,
+ 1558, 649, 209, 323, 780, 782, 1588, 779, 1042, 1044,
+ 1039, 418, 1649, 1649, 418, 1649, 1649, 1649, 1649, 779,
+ 1049, 1056, 430, 299, 386, 497, 723, 744, 1076, 1204,
+ 1207, 1212, 1213, 1214, 1218, 1567, 780, 1827, 780, 780,
+ 314, 1205, 1209, 1213, 1216, 1206, 1208, 1213, 1215, 1827,
+ 782, 1098, 1096, 1217, 1194, 1827, 180, 1195, 779, 1093,
+ 779, 779, 160, 1821, 702, 1165, 741, 160, 201, 1173,
+ 19, 20, 768, 769, 779, 1126, 1127, 1128, 1375, 1422,
+ 1790, 296, 339, 99, 53, 391, 1157, 1163, 1827, 787,
+ 1813, 857, 843, 1479, 1484, 127, 1133, 1135, 1136, 1137,
+ 1487, 1488, 1528, 1530, 1103, 1588, 1033, 1128, 1007, 1035,
+ 1007, 154, 1400, 1313, 1664, 1170, 1027, 1029, 779, 1043,
+ 1044, 1045, 182, 1041, 1044, 1649, 1821, 1821, 1649, 1591,
+ 1591, 1588, 1829, 697, 1050, 1051, 1649, 1217, 1821, 1649,
+ 1217, 1264, 1265, 1266, 1214, 752, 1892, 589, 1264, 1216,
+ 1264, 1215, 780, 1827, 779, 779, 1097, 780, 782, 462,
+ 590, 667, 203, 1196, 1219, 779, 1219, 1219, 426, 1160,
+ 1792, 1792, 1125, 198, 737, 649, 1126, 1158, 1156, 787,
+ 1827, 127, 422, 1486, 207, 120, 218, 780, 780, 780,
+ 779, 1672, 1673, 1811, 1766, 1031, 780, 782, 182, 1047,
+ 1048, 1403, 1821, 1821, 1052, 780, 782, 1081, 1829, 1587,
+ 1266, 1265, 585, 1204, 1818, 780, 1219, 1219, 779, 1827,
+ 101, 296, 780, 1219, 780, 780, 780, 779, 1397, 427,
+ 686, 1117, 1827, 787, 1394, 858, 1482, 218, 1479, 1033,
+ 782, 1648, 251, 1777, 1044, 782, 1046, 1053, 1829, 1051,
+ 1264, 780, 1220, 1219, 67, 244, 258, 568, 1197, 1197,
+ 1204, 780, 1205, 1206, 780, 1588, 1114, 1115, 1164, 1114,
+ 595, 691, 745, 1119, 1827, 1977, 1479, 99, 201, 432,
+ 1489, 1490, 1491, 1492, 780, 1673, 1661, 480, 1771, 1048,
+ 780, 1057, 1058, 1059, 1192, 780, 1220, 99, 201, 332,
+ 203, 203, 1204, 780, 1164, 1120, 1121, 1122, 112, 24,
+ 25, 28, 30, 1479, 1480, 203, 1490, 1492, 1490, 1491,
+ 65, 1774, 1059, 1204, 780, 296, 101, 1122, 649, 116,
+ 432, 203, 203, 1787, 143, 1778, 1204, 1197, 1197, 1978,
+ 30, 779, 1780, 457, 600, 1972, 1973, 170, 251, 1779,
+ 3, 780, 1781, 1782, 1811, 258, 1783, 1829, 1979, 1829,
+ 780, 782, 1784, 1785, 1811, 1632, 2033, 1782, 782, 1648,
+ 843, 1785, 1394, 1661, 1395
+};
+
+/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
+static const yytype_int16 yyr1[] =
+{
+ 0, 789, 790, 791, 790, 790, 792, 792, 793, 793,
+ 793, 794, 794, 794, 794, 794, 794, 794, 794, 794,
+ 794, 794, 794, 794, 794, 794, 794, 794, 794, 794,
+ 794, 794, 794, 794, 794, 794, 794, 794, 794, 794,
+ 794, 794, 794, 794, 794, 794, 794, 794, 794, 794,
+ 794, 794, 794, 794, 794, 794, 794, 794, 794, 794,
+ 794, 794, 794, 794, 794, 794, 794, 794, 794, 794,
+ 794, 795, 796, 796, 798, 797, 799, 800, 801, 799,
+ 802, 803, 802, 804, 804, 806, 805, 808, 807, 809,
+ 809, 810, 810, 810, 810, 810, 810, 810, 810, 810,
+ 810, 810, 810, 810, 810, 810, 810, 810, 810, 810,
+ 810, 811, 811, 811, 812, 813, 813, 813, 814, 815,
+ 815, 815, 816, 817, 817, 817, 817, 817, 817, 817,
+ 817, 818, 818, 819, 820, 820, 821, 823, 824, 822,
+ 825, 822, 826, 827, 822, 828, 829, 822, 830, 831,
+ 822, 832, 833, 822, 834, 822, 835, 822, 836, 822,
+ 837, 822, 838, 822, 822, 822, 839, 822, 822, 840,
+ 840, 841, 841, 842, 842, 842, 842, 842, 842, 842,
+ 842, 842, 842, 842, 842, 842, 842, 843, 843, 845,
+ 844, 846, 846, 847, 847, 847, 847, 847, 847, 847,
+ 849, 848, 851, 850, 850, 852, 852, 852, 852, 853,
+ 853, 854, 854, 855, 855, 856, 857, 857, 859, 858,
+ 860, 861, 861, 862, 862, 862, 862, 863, 863, 864,
+ 864, 865, 865, 866, 866, 866, 866, 866, 866, 866,
+ 867, 867, 868, 868, 870, 869, 871, 869, 872, 869,
+ 873, 873, 874, 874, 875, 875, 876, 877, 876, 878,
+ 878, 879, 880, 880, 881, 881, 882, 882, 882, 884,
+ 883, 885, 886, 886, 887, 887, 888, 888, 888, 889,
+ 890, 890, 891, 892, 894, 893, 893, 893, 896, 895,
+ 897, 897, 898, 900, 899, 901, 901, 901, 901, 902,
+ 902, 903, 904, 904, 905, 906, 906, 907, 907, 907,
+ 907, 907, 907, 908, 908, 909, 910, 910, 911, 911,
+ 912, 912, 913, 913, 914, 914, 914, 915, 915, 915,
+ 915, 915, 915, 915, 915, 915, 915, 915, 915, 915,
+ 916, 917, 918, 918, 919, 919, 920, 920, 921, 922,
+ 922, 923, 923, 923, 924, 925, 925, 926, 927, 927,
+ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927,
+ 927, 927, 928, 928, 929, 929, 931, 930, 933, 932,
+ 934, 934, 936, 935, 935, 937, 937, 938, 937, 939,
+ 937, 940, 940, 941, 940, 942, 940, 943, 944, 945,
+ 947, 946, 948, 950, 949, 952, 951, 953, 953, 954,
+ 954, 955, 955, 955, 956, 957, 957, 957, 958, 958,
+ 959, 960, 960, 962, 963, 961, 964, 964, 964, 964,
+ 966, 965, 968, 967, 967, 969, 969, 970, 970, 972,
+ 971, 974, 973, 975, 975, 976, 976, 977, 977, 978,
+ 979, 979, 979, 980, 981, 982, 984, 983, 985, 983,
+ 986, 987, 988, 983, 989, 983, 991, 990, 992, 990,
+ 993, 994, 990, 995, 990, 996, 996, 997, 997, 997,
+ 999, 998, 998, 998, 1000, 1000, 1001, 1001, 1002, 1002,
+ 1003, 1004, 1004, 1006, 1005, 1007, 1009, 1008, 1011, 1010,
+ 1012, 1013, 1012, 1012, 1012, 1014, 1012, 1012, 1015, 1012,
+ 1016, 1016, 1017, 1017, 1018, 1018, 1019, 1019, 1020, 1021,
+ 1022, 1023, 1024, 1024, 1025, 1026, 1025, 1027, 1025, 1028,
+ 1028, 1029, 1030, 1031, 1031, 1032, 1032, 1033, 1033, 1034,
+ 1034, 1036, 1035, 1037, 1038, 1039, 1038, 1040, 1038, 1038,
+ 1038, 1038, 1041, 1041, 1042, 1042, 1043, 1043, 1045, 1046,
+ 1044, 1047, 1047, 1048, 1048, 1049, 1049, 1050, 1050, 1052,
+ 1051, 1053, 1054, 1054, 1055, 1055, 1056, 1056, 1057, 1057,
+ 1058, 1058, 1059, 1059, 1059, 1059, 1059, 1059, 1059, 1059,
+ 1059, 1060, 1061, 1060, 1060, 1062, 1062, 1063, 1063, 1064,
+ 1064, 1065, 1065, 1066, 1066, 1067, 1067, 1067, 1068, 1068,
+ 1069, 1069, 1070, 1070, 1071, 1071, 1072, 1072, 1073, 1073,
+ 1073, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074,
+ 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074,
+ 1074, 1075, 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1074,
+ 1074, 1074, 1074, 1074, 1074, 1074, 1074, 1076, 1076, 1076,
+ 1076, 1077, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1083,
+ 1083, 1083, 1083, 1083, 1083, 1084, 1084, 1084, 1085, 1085,
+ 1085, 1085, 1086, 1087, 1088, 1088, 1089, 1089, 1089, 1089,
+ 1089, 1090, 1090, 1092, 1091, 1093, 1091, 1094, 1091, 1095,
+ 1091, 1096, 1091, 1097, 1091, 1098, 1091, 1099, 1100, 1101,
+ 1102, 1102, 1103, 1104, 1104, 1105, 1105, 1106, 1108, 1107,
+ 1110, 1109, 1111, 1109, 1112, 1112, 1113, 1113, 1114, 1114,
+ 1115, 1115, 1116, 1116, 1116, 1116, 1117, 1116, 1116, 1116,
+ 1118, 1118, 1119, 1119, 1119, 1119, 1120, 1120, 1121, 1121,
+ 1122, 1122, 1122, 1122, 1124, 1123, 1125, 1125, 1126, 1126,
+ 1127, 1127, 1128, 1128, 1129, 1130, 1130, 1131, 1131, 1131,
+ 1132, 1132, 1132, 1132, 1132, 1132, 1133, 1133, 1133, 1133,
+ 1133, 1133, 1133, 1133, 1133, 1133, 1134, 1134, 1134, 1134,
+ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1136, 1136,
+ 1136, 1136, 1136, 1137, 1137, 1137, 1137, 1137, 1137, 1137,
+ 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1137, 1138, 1138,
+ 1139, 1140, 1140, 1141, 1141, 1142, 1142, 1142, 1142, 1142,
+ 1143, 1143, 1143, 1143, 1143, 1144, 1144, 1144, 1145, 1145,
+ 1146, 1146, 1146, 1147, 1148, 1148, 1148, 1148, 1148, 1148,
+ 1149, 1150, 1150, 1150, 1150, 1151, 1152, 1153, 1153, 1154,
+ 1154, 1155, 1155, 1156, 1156, 1157, 1157, 1157, 1157, 1157,
+ 1157, 1157, 1158, 1158, 1159, 1159, 1160, 1160, 1161, 1162,
+ 1163, 1164, 1164, 1164, 1165, 1165, 1165, 1166, 1166, 1167,
+ 1167, 1168, 1168, 1169, 1169, 1170, 1170, 1171, 1171, 1172,
+ 1172, 1173, 1174, 1174, 1175, 1175, 1176, 1176, 1176, 1177,
+ 1177, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178,
+ 1179, 1179, 1181, 1180, 1182, 1182, 1183, 1184, 1184, 1184,
+ 1184, 1185, 1186, 1187, 1187, 1188, 1189, 1189, 1190, 1190,
+ 1191, 1191, 1192, 1193, 1193, 1194, 1194, 1195, 1195, 1195,
+ 1195, 1196, 1196, 1196, 1196, 1196, 1197, 1197, 1197, 1197,
+ 1197, 1198, 1198, 1199, 1199, 1200, 1200, 1201, 1201, 1201,
+ 1202, 1203, 1204, 1204, 1205, 1205, 1206, 1206, 1207, 1207,
+ 1208, 1208, 1209, 1209, 1210, 1210, 1211, 1211, 1211, 1212,
+ 1212, 1213, 1213, 1213, 1213, 1213, 1214, 1214, 1215, 1216,
+ 1216, 1217, 1217, 1217, 1218, 1218, 1219, 1219, 1220, 1220,
+ 1221, 1221, 1222, 1222, 1223, 1223, 1225, 1226, 1224, 1227,
+ 1224, 1228, 1224, 1224, 1229, 1224, 1230, 1224, 1231, 1224,
+ 1232, 1224, 1233, 1224, 1234, 1224, 1224, 1235, 1236, 1237,
+ 1224, 1238, 1238, 1239, 1239, 1239, 1239, 1240, 1240, 1240,
+ 1240, 1240, 1241, 1241, 1241, 1241, 1242, 1242, 1243, 1243,
+ 1244, 1244, 1245, 1245, 1245, 1245, 1245, 1245, 1245, 1245,
+ 1245, 1245, 1246, 1245, 1245, 1247, 1245, 1248, 1245, 1245,
+ 1245, 1245, 1245, 1245, 1249, 1245, 1250, 1251, 1251, 1253,
+ 1252, 1254, 1254, 1254, 1256, 1255, 1257, 1258, 1257, 1259,
+ 1259, 1260, 1261, 1261, 1262, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263,
+ 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1263, 1264, 1264,
+ 1264, 1264, 1264, 1265, 1265, 1266, 1266, 1267, 1267, 1268,
+ 1268, 1270, 1269, 1271, 1271, 1272, 1272, 1273, 1273, 1274,
+ 1274, 1274, 1275, 1275, 1275, 1276, 1276, 1276, 1276, 1278,
+ 1277, 1279, 1277, 1277, 1277, 1280, 1281, 1281, 1282, 1282,
+ 1283, 1283, 1283, 1285, 1284, 1286, 1286, 1287, 1287, 1287,
+ 1288, 1288, 1288, 1289, 1289, 1291, 1290, 1292, 1292, 1292,
+ 1293, 1294, 1293, 1296, 1295, 1297, 1297, 1298, 1298, 1299,
+ 1299, 1299, 1300, 1300, 1300, 1302, 1301, 1303, 1303, 1304,
+ 1305, 1305, 1306, 1306, 1307, 1308, 1307, 1309, 1310, 1309,
+ 1311, 1311, 1311, 1312, 1312, 1312, 1313, 1313, 1314, 1314,
+ 1315, 1316, 1315, 1318, 1317, 1319, 1319, 1320, 1320, 1321,
+ 1321, 1321, 1321, 1321, 1321, 1322, 1322, 1324, 1323, 1325,
+ 1325, 1325, 1327, 1326, 1326, 1328, 1328, 1329, 1329, 1330,
+ 1332, 1331, 1333, 1333, 1334, 1334, 1335, 1336, 1337, 1337,
+ 1339, 1338, 1340, 1340, 1341, 1341, 1342, 1343, 1345, 1344,
+ 1347, 1346, 1348, 1348, 1349, 1349, 1351, 1350, 1352, 1350,
+ 1354, 1353, 1355, 1353, 1356, 1356, 1358, 1357, 1360, 1361,
+ 1359, 1362, 1363, 1364, 1364, 1365, 1365, 1367, 1366, 1368,
+ 1366, 1369, 1369, 1370, 1371, 1370, 1370, 1372, 1372, 1373,
+ 1374, 1375, 1375, 1376, 1376, 1377, 1378, 1378, 1379, 1379,
+ 1380, 1380, 1380, 1381, 1381, 1381, 1382, 1383, 1383, 1384,
+ 1384, 1385, 1385, 1385, 1385, 1386, 1386, 1387, 1387, 1387,
+ 1388, 1388, 1389, 1389, 1390, 1390, 1390, 1390, 1391, 1391,
+ 1391, 1392, 1392, 1393, 1394, 1395, 1396, 1396, 1396, 1396,
+ 1396, 1397, 1397, 1397, 1398, 1398, 1398, 1399, 1399, 1400,
+ 1400, 1400, 1400, 1400, 1401, 1401, 1401, 1401, 1401, 1401,
+ 1401, 1401, 1401, 1401, 1401, 1401, 1402, 1402, 1402, 1402,
+ 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402,
+ 1402, 1402, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403,
+ 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403,
+ 1403, 1404, 1404, 1405, 1405, 1406, 1406, 1407, 1407, 1408,
+ 1408, 1408, 1408, 1408, 1408, 1409, 1409, 1410, 1410, 1411,
+ 1411, 1411, 1412, 1412, 1412, 1412, 1412, 1412, 1413, 1413,
+ 1413, 1414, 1414, 1415, 1416, 1416, 1417, 1417, 1417, 1417,
+ 1418, 1419, 1419, 1420, 1421, 1421, 1421, 1421, 1421, 1421,
+ 1421, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422,
+ 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422,
+ 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422, 1422,
+ 1423, 1423, 1423, 1423, 1424, 1424, 1425, 1425, 1425, 1425,
+ 1425, 1425, 1426, 1426, 1427, 1427, 1428, 1428, 1428, 1428,
+ 1428, 1428, 1428, 1428, 1428, 1428, 1428, 1428, 1428, 1428,
+ 1428, 1428, 1428, 1428, 1428, 1428, 1428, 1429, 1429, 1430,
+ 1430, 1431, 1431, 1432, 1432, 1432, 1432, 1432, 1432, 1432,
+ 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432,
+ 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1433,
+ 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433, 1433,
+ 1433, 1433, 1433, 1435, 1434, 1434, 1434, 1434, 1434, 1434,
+ 1434, 1434, 1434, 1434, 1434, 1436, 1436, 1437, 1437, 1438,
+ 1438, 1439, 1439, 1440, 1440, 1441, 1442, 1442, 1442, 1442,
+ 1442, 1442, 1442, 1443, 1444, 1442, 1442, 1442, 1442, 1442,
+ 1442, 1442, 1442, 1442, 1442, 1442, 1445, 1442, 1446, 1442,
+ 1447, 1442, 1448, 1448, 1449, 1449, 1449, 1450, 1450, 1450,
+ 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450, 1450,
+ 1451, 1453, 1452, 1452, 1454, 1454, 1455, 1456, 1458, 1457,
+ 1459, 1459, 1459, 1459, 1460, 1460, 1461, 1461, 1462, 1462,
+ 1463, 1463, 1464, 1464, 1465, 1466, 1468, 1467, 1469, 1469,
+ 1469, 1469, 1469, 1469, 1469, 1469, 1470, 1470, 1470, 1470,
+ 1470, 1470, 1470, 1470, 1471, 1471, 1471, 1471, 1472, 1472,
+ 1473, 1473, 1474, 1474, 1475, 1475, 1476, 1476, 1477, 1477,
+ 1478, 1478, 1479, 1479, 1479, 1480, 1480, 1480, 1480, 1480,
+ 1481, 1482, 1483, 1483, 1485, 1484, 1486, 1484, 1487, 1487,
+ 1487, 1488, 1488, 1488, 1488, 1489, 1489, 1489, 1489, 1489,
+ 1490, 1490, 1490, 1491, 1492, 1494, 1495, 1493, 1496, 1496,
+ 1497, 1497, 1498, 1499, 1498, 1500, 1498, 1498, 1501, 1498,
+ 1502, 1498, 1498, 1503, 1498, 1504, 1498, 1498, 1505, 1505,
+ 1505, 1506, 1506, 1507, 1507, 1508, 1509, 1509, 1509, 1509,
+ 1509, 1510, 1510, 1511, 1511, 1512, 1512, 1513, 1513, 1514,
+ 1514, 1515, 1516, 1517, 1517, 1518, 1518, 1518, 1518, 1519,
+ 1519, 1521, 1520, 1522, 1520, 1523, 1523, 1524, 1525, 1524,
+ 1527, 1526, 1528, 1528, 1529, 1529, 1530, 1530, 1531, 1531,
+ 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532, 1532,
+ 1532, 1532, 1533, 1533, 1533, 1533, 1533, 1533, 1533, 1533,
+ 1533, 1534, 1534, 1534, 1534, 1535, 1535, 1535, 1536, 1536,
+ 1537, 1538, 1538, 1539, 1540, 1539, 1541, 1542, 1541, 1543,
+ 1543, 1544, 1544, 1545, 1545, 1545, 1546, 1546, 1547, 1547,
+ 1548, 1550, 1549, 1551, 1551, 1552, 1552, 1553, 1553, 1554,
+ 1554, 1555, 1555, 1556, 1556, 1557, 1557, 1557, 1558, 1558,
+ 1558, 1559, 1559, 1559, 1559, 1559, 1559, 1560, 1561, 1561,
+ 1562, 1563, 1563, 1565, 1564, 1566, 1566, 1567, 1567, 1567,
+ 1568, 1568, 1569, 1569, 1569, 1569, 1570, 1570, 1570, 1570,
+ 1570, 1571, 1571, 1572, 1572, 1573, 1573, 1574, 1575, 1575,
+ 1575, 1576, 1576, 1576, 1576, 1576, 1576, 1577, 1578, 1578,
+ 1578, 1578, 1579, 1579, 1579, 1580, 1580, 1581, 1582, 1583,
+ 1583, 1583, 1584, 1584, 1585, 1585, 1586, 1586, 1587, 1587,
+ 1587, 1587, 1587, 1587, 1588, 1588, 1588, 1588, 1588, 1589,
+ 1589, 1589, 1589, 1590, 1590, 1590, 1590, 1590, 1591, 1591,
+ 1591, 1591, 1591, 1592, 1593, 1593, 1594, 1594, 1595, 1595,
+ 1595, 1597, 1596, 1598, 1598, 1599, 1599, 1600, 1602, 1601,
+ 1603, 1603, 1604, 1605, 1605, 1605, 1606, 1608, 1609, 1607,
+ 1607, 1607, 1611, 1610, 1613, 1612, 1614, 1612, 1612, 1612,
+ 1612, 1615, 1612, 1612, 1612, 1612, 1616, 1612, 1612, 1617,
+ 1617, 1618, 1619, 1620, 1620, 1621, 1622, 1622, 1623, 1623,
+ 1624, 1624, 1626, 1627, 1625, 1629, 1630, 1628, 1631, 1632,
+ 1633, 1633, 1633, 1634, 1634, 1635, 1635, 1636, 1636, 1638,
+ 1637, 1639, 1639, 1640, 1639, 1641, 1642, 1642, 1643, 1643,
+ 1644, 1645, 1645, 1646, 1646, 1647, 1648, 1648, 1649, 1649,
+ 1650, 1650, 1651, 1651, 1653, 1652, 1655, 1654, 1656, 1656,
+ 1657, 1657, 1658, 1658, 1659, 1659, 1660, 1660, 1661, 1661,
+ 1662, 1663, 1664, 1662, 1665, 1665, 1667, 1668, 1669, 1666,
+ 1670, 1670, 1671, 1671, 1672, 1672, 1673, 1674, 1674, 1676,
+ 1675, 1677, 1677, 1678, 1678, 1679, 1680, 1681, 1682, 1683,
+ 1681, 1684, 1685, 1681, 1686, 1687, 1686, 1688, 1688, 1689,
+ 1689, 1690, 1690, 1691, 1691, 1692, 1692, 1692, 1694, 1695,
+ 1693, 1696, 1696, 1697, 1697, 1698, 1698, 1699, 1699, 1699,
+ 1699, 1699, 1699, 1699, 1699, 1699, 1700, 1700, 1702, 1701,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1704, 1703, 1705, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1703,
+ 1703, 1703, 1703, 1703, 1703, 1703, 1703, 1706, 1706, 1706,
+ 1707, 1707, 1708, 1708, 1709, 1709, 1710, 1710, 1711, 1711,
+ 1712, 1712, 1713, 1713, 1714, 1714, 1714, 1716, 1715, 1717,
+ 1715, 1718, 1718, 1718, 1718, 1718, 1718, 1719, 1719, 1720,
+ 1721, 1721, 1721, 1721, 1722, 1722, 1723, 1723, 1723, 1724,
+ 1726, 1725, 1728, 1727, 1727, 1729, 1729, 1730, 1731, 1730,
+ 1732, 1732, 1733, 1733, 1733, 1733, 1733, 1733, 1733, 1733,
+ 1733, 1733, 1733, 1733, 1733, 1733, 1733, 1733, 1733, 1733,
+ 1734, 1734, 1735, 1736, 1737, 1736, 1736, 1738, 1738, 1739,
+ 1739, 1739, 1740, 1741, 1741, 1743, 1742, 1744, 1744, 1746,
+ 1745, 1747, 1745, 1745, 1748, 1748, 1749, 1749, 1750, 1751,
+ 1750, 1753, 1752, 1754, 1754, 1754, 1755, 1755, 1755, 1756,
+ 1756, 1757, 1757, 1759, 1758, 1760, 1760, 1761, 1763, 1764,
+ 1765, 1766, 1762, 1767, 1767, 1768, 1768, 1769, 1769, 1769,
+ 1770, 1770, 1770, 1771, 1771, 1772, 1772, 1773, 1773, 1773,
+ 1773, 1774, 1774, 1775, 1775, 1776, 1776, 1777, 1777, 1778,
+ 1778, 1779, 1779, 1780, 1780, 1780, 1781, 1781, 1782, 1782,
+ 1783, 1783, 1784, 1784, 1785, 1786, 1786, 1786, 1786, 1787,
+ 1787, 1788, 1788, 1788, 1789, 1789, 1789, 1790, 1790, 1791,
+ 1791, 1791, 1791, 1791, 1791, 1791, 1791, 1791, 1791, 1792,
+ 1792, 1792, 1792, 1792, 1793, 1793, 1793, 1795, 1794, 1796,
+ 1796, 1797, 1797, 1798, 1799, 1800, 1799, 1801, 1801, 1802,
+ 1803, 1804, 1804, 1805, 1806, 1806, 1807, 1807, 1808, 1808,
+ 1809, 1810, 1810, 1810, 1810, 1810, 1811, 1811, 1811, 1811,
+ 1811, 1812, 1812, 1812, 1812, 1813, 1813, 1813, 1814, 1814,
+ 1815, 1816, 1816, 1817, 1817, 1817, 1818, 1819, 1819, 1819,
+ 1819, 1820, 1821, 1822, 1823, 1824, 1824, 1825, 1825, 1826,
+ 1826, 1826, 1827, 1827, 1828, 1828, 1829, 1829, 1829, 1830,
+ 1830, 1830, 1831, 1831, 1832, 1833, 1833, 1833, 1833, 1833,
+ 1833, 1833, 1833, 1833, 1833, 1833, 1833, 1834, 1834, 1834,
+ 1834, 1834, 1834, 1834, 1834, 1834, 1834, 1834, 1834, 1834,
+ 1835, 1835, 1835, 1835, 1835, 1835, 1835, 1835, 1835, 1835,
+ 1835, 1835, 1835, 1836, 1836, 1836, 1836, 1836, 1836, 1836,
+ 1836, 1836, 1836, 1836, 1836, 1836, 1837, 1837, 1837, 1837,
+ 1837, 1837, 1837, 1837, 1838, 1838, 1838, 1838, 1838, 1838,
+ 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838,
+ 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838,
+ 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838,
+ 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1838,
+ 1838, 1838, 1838, 1838, 1838, 1838, 1838, 1839, 1839, 1839,
+ 1839, 1839, 1839, 1840, 1840, 1840, 1840, 1840, 1840, 1840,
+ 1840, 1840, 1840, 1841, 1841, 1841, 1842, 1842, 1842, 1843,
+ 1843, 1843, 1843, 1843, 1843, 1843, 1843, 1843, 1843, 1843,
+ 1843, 1843, 1843, 1843, 1843, 1843, 1843, 1843, 1843, 1843,
+ 1843, 1843, 1843, 1843, 1843, 1844, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845,
+ 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1845, 1846, 1846,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848, 1848,
+ 1848, 1848, 1850, 1849, 1851, 1851, 1852, 1851, 1853, 1851,
+ 1854, 1851, 1855, 1855, 1856, 1856, 1857, 1856, 1858, 1858,
+ 1860, 1859, 1859, 1861, 1861, 1861, 1862, 1862, 1862, 1862,
+ 1863, 1863, 1863, 1863, 1865, 1864, 1866, 1864, 1867, 1864,
+ 1869, 1868, 1870, 1868, 1871, 1868, 1873, 1872, 1874, 1872,
+ 1875, 1872, 1876, 1872, 1877, 1872, 1878, 1872, 1879, 1872,
+ 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1880, 1872, 1881,
+ 1872, 1882, 1872, 1883, 1883, 1883, 1883, 1884, 1885, 1886,
+ 1886, 1887, 1887, 1887, 1887, 1888, 1888, 1888, 1889, 1889,
+ 1889, 1889, 1889, 1891, 1890, 1892, 1892, 1892, 1893, 1893,
+ 1894, 1894, 1895, 1896, 1896, 1896, 1896, 1896, 1898, 1897,
+ 1900, 1899, 1901, 1901, 1902, 1901, 1903, 1903, 1904, 1904,
+ 1905, 1905, 1905, 1905, 1906, 1905, 1907, 1907, 1907, 1907,
+ 1907, 1908, 1909, 1909, 1909, 1909, 1909, 1910, 1910, 1911,
+ 1912, 1912, 1912, 1912, 1913, 1913, 1914, 1914, 1915, 1915,
+ 1916, 1917, 1918, 1918, 1919, 1919, 1920, 1920, 1921, 1921,
+ 1922, 1922, 1922, 1922, 1923, 1924, 1924, 1924, 1924, 1925,
+ 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925,
+ 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925,
+ 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925,
+ 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925,
+ 1925, 1926, 1926, 1927, 1927, 1928, 1928, 1928, 1929, 1929,
+ 1929, 1929, 1930, 1930, 1931, 1931, 1932, 1932, 1933, 1933,
+ 1934, 1934, 1935, 1935, 1935, 1935, 1936, 1936, 1937, 1938,
+ 1938, 1938, 1939, 1939, 1939, 1939, 1939, 1940, 1940, 1940,
+ 1940, 1940, 1941, 1941, 1942, 1942, 1943, 1943, 1944, 1944,
+ 1945, 1945, 1946, 1946, 1948, 1947, 1949, 1950, 1950, 1951,
+ 1951, 1952, 1952, 1952, 1953, 1953, 1953, 1954, 1955, 1955,
+ 1955, 1956, 1957, 1958, 1958, 1958, 1959, 1959, 1959, 1960,
+ 1960, 1960, 1960, 1960, 1960, 1960, 1960, 1960, 1961, 1961,
+ 1962, 1963, 1964, 1964, 1964, 1965, 1965, 1966, 1966, 1967,
+ 1967, 1968, 1968, 1970, 1969, 1971, 1971, 1971, 1971, 1972,
+ 1972, 1973, 1973, 1975, 1976, 1977, 1978, 1979, 1974, 1981,
+ 1980, 1982, 1982, 1982, 1982, 1982, 1982, 1983, 1983, 1984,
+ 1984, 1984, 1985, 1985, 1985, 1986, 1986, 1986, 1987, 1987,
+ 1988, 1989, 1988, 1990, 1990, 1991, 1991, 1992, 1992, 1993,
+ 1994, 1995, 1996, 1997, 1998, 1999, 1999, 1999, 2000, 2000,
+ 2001, 2001, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2003,
+ 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003,
+ 2003, 2004, 2005, 2006, 2008, 2007, 2009, 2010, 2011, 2012,
+ 2013, 2013, 2014, 2014, 2015, 2015, 2016, 2016, 2016, 2017,
+ 2017, 2017, 2017, 2019, 2018, 2021, 2022, 2020, 2023, 2023,
+ 2023, 2025, 2024, 2026, 2024, 2027, 2024, 2024, 2028, 2028,
+ 2029, 2030, 2030, 2030, 2031, 2030, 2032, 2032, 2032, 2032,
+ 2032, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2033, 2034,
+ 2034, 2034, 2034, 2036, 2035, 2038, 2037, 2040, 2039
+};
+
+/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
+static const yytype_int8 yyr2[] =
+{
+ 0, 2, 1, 0, 4, 2, 0, 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, 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, 3, 1, 1, 0, 5, 3, 0, 0, 6,
+ 0, 0, 3, 1, 3, 0, 3, 0, 7, 1,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 5, 5, 5,
+ 1, 0, 1, 3, 1, 0, 1, 3, 1, 0,
+ 1, 3, 1, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 1, 1, 0, 1, 3, 0, 0, 8,
+ 0, 8, 0, 0, 15, 0, 0, 17, 0, 0,
+ 15, 0, 0, 15, 0, 6, 0, 10, 0, 11,
+ 0, 5, 0, 5, 8, 6, 0, 3, 1, 0,
+ 1, 1, 2, 3, 2, 1, 3, 2, 1, 3,
+ 3, 3, 1, 1, 1, 1, 3, 0, 1, 0,
+ 12, 1, 3, 2, 2, 2, 2, 2, 2, 2,
+ 0, 12, 0, 6, 2, 0, 1, 3, 1, 0,
+ 2, 0, 2, 0, 1, 4, 0, 2, 0, 3,
+ 0, 0, 1, 1, 1, 1, 2, 3, 1, 0,
+ 2, 0, 2, 2, 2, 2, 2, 3, 3, 1,
+ 1, 2, 3, 3, 0, 4, 0, 6, 0, 8,
+ 0, 3, 0, 1, 3, 1, 0, 0, 2, 3,
+ 1, 1, 0, 1, 3, 1, 1, 1, 1, 0,
+ 4, 3, 0, 3, 2, 3, 1, 3, 5, 2,
+ 1, 3, 3, 1, 0, 4, 4, 1, 0, 6,
+ 0, 3, 0, 0, 3, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 3, 0, 1, 1, 1, 1,
+ 2, 1, 1, 2, 3, 3, 1, 1, 0, 1,
+ 0, 2, 3, 5, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 4, 0, 1, 1, 3, 1, 3, 3, 1,
+ 2, 1, 1, 1, 1, 1, 3, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 0, 5, 0, 2,
+ 1, 1, 0, 3, 1, 1, 2, 0, 4, 0,
+ 5, 1, 2, 0, 4, 0, 5, 2, 2, 2,
+ 0, 2, 0, 0, 3, 0, 3, 1, 3, 0,
+ 3, 1, 1, 1, 3, 3, 4, 5, 2, 4,
+ 2, 1, 3, 0, 0, 6, 0, 2, 2, 2,
+ 0, 6, 0, 3, 1, 1, 2, 1, 2, 0,
+ 5, 0, 5, 0, 2, 0, 1, 0, 1, 2,
+ 5, 3, 5, 3, 5, 1, 0, 5, 0, 5,
+ 0, 0, 0, 8, 0, 5, 0, 3, 0, 3,
+ 0, 0, 5, 0, 3, 1, 1, 1, 1, 1,
+ 0, 5, 3, 1, 2, 4, 0, 4, 1, 4,
+ 1, 0, 1, 0, 4, 0, 0, 3, 0, 6,
+ 6, 0, 4, 2, 2, 0, 3, 2, 0, 3,
+ 0, 1, 0, 3, 0, 1, 1, 3, 1, 4,
+ 3, 3, 0, 2, 0, 0, 7, 0, 10, 1,
+ 3, 1, 1, 0, 2, 0, 3, 1, 3, 0,
+ 1, 0, 6, 1, 0, 0, 4, 0, 3, 1,
+ 1, 1, 1, 1, 1, 3, 1, 3, 0, 0,
+ 5, 1, 3, 1, 1, 0, 3, 1, 3, 0,
+ 4, 1, 0, 1, 2, 1, 1, 1, 0, 1,
+ 2, 1, 3, 4, 3, 3, 3, 3, 4, 4,
+ 3, 0, 0, 6, 3, 0, 2, 0, 1, 0,
+ 1, 0, 1, 1, 2, 1, 1, 3, 0, 3,
+ 0, 3, 1, 3, 0, 1, 1, 2, 1, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 6, 1, 1, 3, 4, 4, 2, 2,
+ 2, 3, 3, 3, 1, 3, 1, 3, 3, 3,
+ 3, 0, 1, 2, 4, 4, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 3, 1, 1, 1, 1,
+ 2, 1, 3, 0, 9, 0, 10, 0, 9, 0,
+ 9, 0, 11, 0, 12, 0, 10, 2, 7, 7,
+ 0, 1, 4, 0, 1, 0, 1, 2, 0, 4,
+ 0, 3, 0, 3, 0, 1, 2, 1, 0, 1,
+ 2, 1, 0, 1, 2, 3, 0, 6, 5, 5,
+ 0, 2, 0, 1, 1, 1, 0, 1, 2, 1,
+ 1, 2, 2, 1, 0, 3, 1, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 3, 3, 3, 2,
+ 1, 1, 3, 3, 3, 3, 0, 1, 2, 2,
+ 3, 3, 2, 3, 3, 4, 3, 3, 3, 1,
+ 2, 2, 2, 2, 3, 3, 2, 2, 2, 3,
+ 3, 2, 3, 2, 2, 2, 2, 2, 5, 5,
+ 1, 1, 2, 2, 1, 2, 1, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 2, 0, 3,
+ 0, 1, 1, 5, 0, 1, 1, 1, 2, 2,
+ 1, 3, 3, 3, 3, 1, 1, 0, 1, 0,
+ 1, 0, 1, 2, 1, 1, 2, 4, 1, 3,
+ 2, 1, 0, 2, 0, 1, 0, 1, 2, 2,
+ 2, 3, 2, 1, 1, 1, 2, 1, 2, 2,
+ 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
+ 1, 1, 1, 1, 0, 1, 2, 1, 1, 0,
+ 1, 1, 1, 2, 1, 2, 3, 3, 2, 2,
+ 0, 1, 0, 4, 1, 1, 1, 0, 1, 2,
+ 1, 1, 2, 1, 3, 3, 1, 1, 0, 2,
+ 0, 1, 5, 0, 3, 3, 1, 0, 2, 2,
+ 2, 0, 3, 3, 6, 6, 1, 1, 2, 2,
+ 2, 2, 2, 1, 1, 0, 1, 1, 1, 1,
+ 1, 1, 0, 1, 0, 1, 0, 1, 1, 2,
+ 1, 2, 1, 2, 0, 2, 0, 2, 2, 2,
+ 2, 3, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 2, 4, 2, 0, 4,
+ 1, 4, 0, 1, 1, 3, 0, 0, 9, 0,
+ 5, 0, 7, 7, 0, 6, 0, 6, 0, 11,
+ 0, 10, 0, 11, 0, 8, 8, 0, 0, 0,
+ 9, 1, 1, 0, 1, 1, 3, 0, 2, 3,
+ 5, 5, 0, 3, 1, 4, 0, 3, 0, 2,
+ 0, 1, 0, 2, 2, 2, 2, 1, 1, 1,
+ 4, 4, 0, 6, 4, 0, 5, 0, 6, 4,
+ 3, 1, 7, 7, 0, 7, 2, 1, 1, 0,
+ 6, 0, 3, 2, 0, 5, 0, 0, 6, 1,
+ 3, 1, 1, 3, 3, 3, 2, 2, 4, 4,
+ 2, 7, 6, 5, 5, 4, 5, 4, 4, 2,
+ 2, 7, 5, 6, 3, 6, 6, 4, 6, 1,
+ 1, 1, 1, 1, 3, 3, 3, 5, 0, 1,
+ 1, 2, 2, 3, 3, 3, 3, 0, 1, 0,
+ 1, 0, 2, 0, 1, 2, 1, 1, 1, 0,
+ 1, 1, 0, 2, 1, 0, 1, 1, 1, 0,
+ 7, 0, 5, 5, 4, 3, 0, 1, 1, 3,
+ 3, 2, 2, 0, 2, 1, 3, 0, 1, 1,
+ 0, 2, 4, 1, 3, 0, 5, 0, 1, 1,
+ 3, 0, 4, 0, 4, 0, 1, 1, 2, 1,
+ 1, 1, 0, 2, 2, 0, 5, 1, 3, 2,
+ 0, 3, 1, 4, 1, 0, 4, 1, 0, 4,
+ 0, 1, 3, 0, 1, 3, 1, 1, 2, 6,
+ 3, 0, 4, 0, 3, 0, 1, 1, 2, 1,
+ 1, 1, 1, 1, 2, 0, 2, 0, 6, 0,
+ 1, 1, 0, 5, 4, 3, 5, 1, 3, 4,
+ 0, 6, 1, 1, 1, 3, 2, 3, 1, 1,
+ 0, 6, 1, 1, 1, 3, 3, 4, 0, 6,
+ 0, 2, 0, 4, 0, 2, 0, 3, 0, 4,
+ 0, 3, 0, 4, 1, 1, 0, 3, 0, 0,
+ 5, 6, 7, 1, 2, 1, 1, 0, 3, 0,
+ 3, 3, 3, 1, 0, 4, 3, 1, 1, 1,
+ 1, 1, 4, 0, 1, 2, 1, 1, 0, 1,
+ 0, 1, 1, 2, 1, 2, 9, 0, 1, 0,
+ 2, 3, 1, 4, 4, 2, 1, 1, 1, 1,
+ 3, 5, 0, 1, 0, 2, 1, 2, 3, 1,
+ 1, 3, 4, 0, 0, 0, 0, 2, 2, 1,
+ 1, 0, 2, 3, 0, 2, 3, 0, 2, 3,
+ 3, 3, 2, 1, 3, 4, 3, 4, 3, 4,
+ 3, 4, 3, 3, 6, 1, 3, 4, 5, 7,
+ 6, 8, 5, 6, 4, 3, 5, 4, 6, 3,
+ 4, 1, 3, 3, 3, 3, 3, 3, 3, 5,
+ 5, 5, 6, 6, 3, 3, 3, 3, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 2, 1,
+ 1, 1, 1, 2, 1, 1, 1, 2, 1, 2,
+ 2, 2, 1, 4, 1, 3, 1, 1, 1, 1,
+ 3, 1, 1, 1, 4, 4, 4, 3, 3, 3,
+ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 6, 4, 4, 7, 6, 3, 4, 6,
+ 6, 4, 4, 4, 4, 4, 4, 6, 8, 10,
+ 1, 1, 3, 1, 1, 3, 1, 2, 2, 2,
+ 2, 2, 1, 3, 4, 6, 4, 6, 2, 2,
+ 4, 4, 4, 10, 6, 8, 6, 4, 4, 6,
+ 4, 3, 4, 1, 4, 3, 4, 1, 1, 5,
+ 3, 5, 3, 6, 8, 2, 2, 8, 8, 6,
+ 6, 2, 6, 3, 6, 8, 4, 3, 4, 8,
+ 8, 4, 2, 2, 2, 6, 6, 4, 8, 4,
+ 4, 8, 4, 6, 6, 4, 6, 8, 6, 5,
+ 8, 7, 10, 0, 5, 4, 4, 4, 6, 8,
+ 6, 6, 6, 6, 6, 2, 3, 0, 4, 0,
+ 3, 0, 1, 1, 3, 4, 4, 5, 4, 4,
+ 4, 5, 4, 0, 0, 7, 4, 5, 4, 5,
+ 4, 4, 4, 4, 4, 5, 0, 9, 0, 8,
+ 0, 7, 3, 3, 1, 1, 1, 3, 3, 3,
+ 3, 3, 4, 4, 4, 6, 4, 6, 4, 6,
+ 5, 0, 7, 4, 4, 4, 4, 1, 0, 3,
+ 3, 1, 3, 5, 0, 1, 0, 2, 0, 3,
+ 4, 2, 0, 1, 2, 1, 0, 3, 2, 3,
+ 3, 3, 2, 1, 1, 1, 1, 1, 2, 1,
+ 2, 2, 1, 2, 1, 2, 2, 3, 0, 1,
+ 1, 3, 1, 3, 1, 3, 4, 5, 1, 3,
+ 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
+ 1, 4, 1, 3, 0, 3, 0, 5, 2, 4,
+ 4, 1, 1, 1, 1, 0, 1, 2, 1, 2,
+ 1, 1, 2, 3, 3, 0, 0, 10, 1, 4,
+ 1, 3, 3, 0, 6, 0, 8, 4, 0, 8,
+ 0, 10, 6, 0, 8, 0, 10, 6, 1, 2,
+ 1, 1, 2, 0, 1, 5, 1, 1, 1, 1,
+ 1, 1, 3, 1, 3, 3, 3, 3, 3, 3,
+ 3, 5, 3, 0, 1, 0, 2, 3, 3, 1,
+ 1, 0, 7, 0, 7, 1, 2, 0, 0, 2,
+ 0, 2, 0, 1, 1, 1, 1, 3, 1, 3,
+ 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, 0, 1,
+ 2, 0, 1, 0, 0, 3, 0, 0, 3, 0,
+ 4, 4, 2, 0, 1, 1, 0, 2, 3, 1,
+ 3, 0, 7, 0, 1, 0, 3, 0, 3, 0,
+ 3, 1, 1, 1, 4, 2, 2, 2, 1, 2,
+ 2, 0, 3, 2, 2, 3, 3, 3, 3, 1,
+ 2, 0, 1, 0, 4, 4, 2, 0, 1, 1,
+ 0, 1, 2, 5, 4, 1, 4, 7, 5, 8,
+ 3, 1, 1, 1, 1, 1, 2, 1, 1, 3,
+ 3, 1, 3, 1, 1, 1, 1, 1, 0, 2,
+ 3, 4, 1, 2, 1, 0, 1, 1, 1, 0,
+ 2, 2, 2, 1, 0, 1, 2, 2, 2, 1,
+ 2, 2, 2, 2, 1, 1, 1, 1, 1, 2,
+ 1, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 6, 0, 1, 3, 1, 3, 0, 2,
+ 3, 1, 1, 2, 1, 3, 2, 0, 0, 7,
+ 2, 1, 0, 3, 0, 8, 0, 8, 4, 5,
+ 5, 0, 6, 4, 4, 4, 0, 6, 1, 1,
+ 3, 1, 2, 1, 3, 1, 0, 2, 0, 2,
+ 0, 1, 0, 0, 12, 0, 0, 10, 0, 0,
+ 0, 1, 1, 0, 1, 1, 1, 0, 1, 0,
+ 2, 1, 2, 0, 3, 3, 0, 1, 3, 1,
+ 1, 3, 1, 3, 1, 3, 1, 1, 0, 1,
+ 1, 1, 1, 1, 0, 4, 0, 4, 0, 1,
+ 0, 1, 3, 1, 5, 3, 1, 1, 1, 1,
+ 0, 0, 0, 7, 5, 1, 0, 0, 0, 13,
+ 3, 1, 3, 3, 3, 1, 3, 0, 1, 0,
+ 3, 0, 3, 2, 3, 3, 2, 5, 0, 0,
+ 7, 0, 0, 8, 0, 0, 3, 1, 3, 2,
+ 4, 0, 2, 0, 2, 1, 1, 1, 0, 0,
+ 7, 0, 1, 0, 1, 1, 3, 1, 1, 2,
+ 2, 2, 1, 1, 1, 1, 0, 3, 0, 3,
+ 2, 4, 4, 3, 4, 4, 1, 3, 3, 3,
+ 3, 6, 2, 2, 0, 6, 0, 8, 5, 2,
+ 1, 1, 1, 5, 5, 2, 2, 1, 4, 3,
+ 2, 3, 2, 2, 1, 4, 4, 3, 3, 3,
+ 2, 2, 3, 4, 3, 3, 3, 3, 4, 4,
+ 3, 2, 3, 3, 3, 3, 3, 4, 4, 3,
+ 3, 4, 4, 3, 4, 4, 3, 1, 1, 1,
+ 1, 1, 0, 1, 0, 2, 0, 1, 1, 1,
+ 0, 2, 0, 2, 0, 3, 3, 0, 4, 0,
+ 4, 1, 1, 1, 1, 1, 1, 1, 1, 3,
+ 1, 2, 1, 1, 0, 3, 0, 1, 1, 5,
+ 0, 4, 0, 4, 1, 0, 1, 4, 0, 3,
+ 3, 1, 2, 2, 2, 2, 3, 4, 2, 1,
+ 1, 1, 1, 2, 1, 1, 1, 1, 1, 2,
+ 0, 1, 2, 2, 0, 3, 1, 0, 5, 0,
+ 1, 3, 1, 0, 3, 0, 3, 3, 1, 0,
+ 5, 0, 3, 2, 0, 1, 0, 2, 5, 0,
+ 6, 0, 4, 0, 1, 1, 2, 2, 3, 0,
+ 1, 1, 2, 0, 3, 0, 4, 2, 0, 0,
+ 0, 0, 23, 1, 1, 0, 1, 0, 1, 1,
+ 0, 1, 1, 0, 2, 2, 1, 3, 4, 3,
+ 3, 0, 2, 2, 1, 3, 3, 0, 4, 0,
+ 3, 1, 1, 0, 3, 2, 3, 1, 1, 2,
+ 0, 2, 3, 1, 5, 1, 1, 2, 2, 1,
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
+ 1, 1, 1, 1, 2, 2, 2, 0, 4, 0,
+ 1, 1, 3, 7, 0, 0, 4, 0, 3, 1,
+ 1, 1, 3, 1, 1, 1, 3, 5, 3, 5,
+ 1, 1, 3, 4, 5, 4, 1, 3, 4, 4,
+ 5, 1, 5, 3, 2, 1, 3, 2, 2, 4,
+ 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,
+ 3, 2, 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, 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, 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, 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,
+ 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, 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, 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, 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, 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,
+ 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, 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, 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, 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, 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,
+ 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, 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, 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, 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, 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,
+ 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, 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, 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, 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, 3, 1, 3, 0, 3, 0, 3,
+ 0, 5, 1, 3, 1, 3, 0, 3, 1, 3,
+ 0, 3, 1, 1, 1, 1, 0, 1, 1, 1,
+ 0, 2, 2, 2, 0, 4, 0, 6, 0, 6,
+ 0, 4, 0, 6, 0, 6, 0, 4, 0, 6,
+ 0, 6, 0, 5, 0, 7, 0, 9, 0, 9,
+ 2, 3, 2, 4, 3, 5, 2, 0, 4, 0,
+ 4, 0, 6, 1, 1, 3, 3, 1, 3, 2,
+ 2, 2, 2, 2, 1, 1, 4, 4, 1, 1,
+ 1, 1, 1, 0, 5, 0, 2, 1, 1, 1,
+ 1, 3, 3, 1, 1, 2, 2, 2, 0, 3,
+ 0, 3, 3, 2, 0, 6, 1, 2, 1, 1,
+ 1, 1, 1, 1, 0, 5, 1, 1, 1, 1,
+ 1, 3, 6, 6, 7, 5, 3, 4, 1, 3,
+ 8, 8, 6, 4, 0, 3, 0, 3, 1, 3,
+ 2, 1, 1, 1, 0, 1, 1, 2, 0, 1,
+ 1, 1, 3, 3, 4, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 2, 1, 3, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 1, 2, 2,
+ 2, 2, 2, 3, 2, 2, 2, 2, 3, 3,
+ 2, 0, 1, 3, 1, 2, 2, 2, 1, 3,
+ 3, 1, 1, 3, 1, 3, 1, 3, 1, 1,
+ 1, 1, 4, 5, 4, 1, 3, 1, 2, 0,
+ 2, 5, 0, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 1, 0, 2, 0, 2, 0, 3,
+ 2, 1, 2, 1, 0, 3, 1, 0, 1, 0,
+ 1, 0, 3, 2, 0, 1, 2, 4, 4, 5,
+ 4, 2, 3, 2, 2, 2, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 3, 3, 3, 3, 0, 1, 3, 3, 0,
+ 3, 1, 3, 0, 3, 0, 3, 4, 4, 1,
+ 1, 0, 2, 0, 0, 0, 0, 0, 20, 0,
+ 2, 4, 4, 3, 4, 3, 3, 0, 3, 1,
+ 3, 5, 1, 1, 1, 0, 1, 1, 0, 2,
+ 0, 0, 3, 0, 2, 6, 3, 4, 4, 1,
+ 0, 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, 1, 0, 6, 4, 2, 1, 1,
+ 1, 2, 5, 6, 2, 1, 2, 3, 1, 6,
+ 8, 5, 7, 0, 4, 0, 0, 7, 6, 4,
+ 4, 0, 6, 0, 11, 0, 11, 10, 1, 3,
+ 2, 1, 4, 1, 0, 6, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 7, 0, 5, 0, 7
+};
+
+
+enum { YYENOMEM = -2 };
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+#define YYNOMEM goto yyexhaustedlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (thd, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
+
+
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Kind, Value, thd); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, THD *thd)
+{
+ FILE *yyoutput = yyo;
+ YY_USE (yyoutput);
+ YY_USE (thd);
+ if (!yyvaluep)
+ return;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, THD *thd)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+
+ yy_symbol_value_print (yyo, yykind, yyvaluep, thd);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
+ int yyrule, THD *thd)
+{
+ int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)], thd);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, thd); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep, THD *thd)
+{
+ YY_USE (yyvaluep);
+ YY_USE (thd);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ switch (yykind)
+ {
+ case YYSYMBOL_expr_lex: /* expr_lex */
+#line 1551 "/home/buildbot/git/mkdist/sql/yy_mariadb.yy"
+{
+ /*
+ In case of a syntax/oom error let's free the sp_expr_lex
+ instance, but only if it has not been linked to any structures
+ such as sp_instr_jump_if_not::m_lex_keeper yet, e.g.:
+ IF f1() THEN1
+ i.e. THEN1 came instead of the expected THEN causing a syntax error.
+ */
+ if (!((*yyvaluep).expr_lex)->sp_lex_in_use)
+ delete ((*yyvaluep).expr_lex);
+}
+#line 29430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case YYSYMBOL_cursor_actual_parameters: /* cursor_actual_parameters */
+#line 1610 "/home/buildbot/git/mkdist/sql/yy_mariadb.yy"
+{
+ if (((*yyvaluep).sp_assignment_lex_list))
+ {
+ sp_assignment_lex *elem;
+ List_iterator<sp_assignment_lex> li(*((*yyvaluep).sp_assignment_lex_list));
+ while ((elem= li++))
+ {
+ if (!elem->sp_lex_in_use)
+ delete elem;
+ }
+ }
+}
+#line 29447 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case YYSYMBOL_opt_parenthesized_cursor_actual_parameters: /* opt_parenthesized_cursor_actual_parameters */
+#line 1610 "/home/buildbot/git/mkdist/sql/yy_mariadb.yy"
+{
+ if (((*yyvaluep).sp_assignment_lex_list))
+ {
+ sp_assignment_lex *elem;
+ List_iterator<sp_assignment_lex> li(*((*yyvaluep).sp_assignment_lex_list));
+ while ((elem= li++))
+ {
+ if (!elem->sp_lex_in_use)
+ delete elem;
+ }
+ }
+}
+#line 29464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ default:
+ break;
+ }
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (THD *thd)
+{
+/* Lookahead token kind. */
+int yychar;
+
+
+/* The semantic value of the lookahead symbol. */
+/* Default value used for initialization, for pacifying older GCCs
+ or non-GCC compilers. */
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
+
+ /* Number of syntax errors so far. */
+ int yynerrs = 0;
+
+ yy_state_fast_t yystate = 0;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus = 0;
+
+ /* Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* Their size. */
+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
+
+ /* The state stack: array, bottom, top. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss = yyssa;
+ yy_state_t *yyssp = yyss;
+
+ /* The semantic value stack: array, bottom, top. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp = yyvs;
+
+ int yyn;
+ /* The return value of yyparse. */
+ int yyresult;
+ /* Lookahead symbol kind. */
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yysetstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ YY_IGNORE_USELESS_CAST_BEGIN
+ *yyssp = YY_CAST (yy_state_t, yystate);
+ YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ YYNOMEM;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ yy_state_t *yyss1 = yyss;
+ YYSTYPE *yyvs1 = yyvs;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * YYSIZEOF (*yyssp),
+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ YYNOMEM;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yy_state_t *yyss1 = yyss;
+ union yyalloc *yyptr =
+ YY_CAST (union yyalloc *,
+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
+ if (! yyptr)
+ YYNOMEM;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YY_IGNORE_USELESS_CAST_BEGIN
+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+ YY_CAST (long, yystacksize)));
+ YY_IGNORE_USELESS_CAST_END
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token\n"));
+ yychar = yylex (&yylval, thd);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ goto yyerrlab1;
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2: /* query: END_OF_INPUT */
+#line 1976 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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;
+ YYLIP->found_semicolon= NULL;
+ }
+#line 29747 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3: /* $@1: %empty */
+#line 1985 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_input_stream *lip = YYLIP;
+
+ if ((thd->client_capabilities & CLIENT_MULTI_QUERIES) &&
+ lip->multi_statements &&
+ ! lip->eof())
+ {
+ /*
+ We found a well formed query, and multi queries are allowed:
+ - force the parser to stop after the ';'
+ - mark the start of the next query for the next invocation
+ of the parser.
+ */
+ lip->next_state= MY_LEX_END;
+ lip->found_semicolon= lip->get_ptr();
+ }
+ else
+ {
+ /* Single query, terminated. */
+ lip->found_semicolon= NULL;
+ }
+ }
+#line 29774 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 5: /* query: directly_executable_statement END_OF_INPUT */
+#line 2010 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Single query, not terminated. */
+ YYLIP->found_semicolon= NULL;
+ }
+#line 29783 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 71: /* deallocate: deallocate_or_drop PREPARE_SYM ident */
+#line 2093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_deallocate_prepare((yyvsp[0].ident_sys));
+ }
+#line 29791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 74: /* $@2: %empty */
+#line 2105 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "PREPARE..FROM"; }
+#line 29797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 75: /* prepare: PREPARE_SYM ident FROM $@2 expr */
+#line 2107 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_prepare((yyvsp[-3].ident_sys), (yyvsp[0].item)))
+ MYSQL_YYABORT;
+ }
+#line 29807 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 76: /* execute: EXECUTE_SYM ident execute_using */
+#line 2116 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_execute((yyvsp[-1].ident_sys), (yyvsp[0].item_list)))
+ MYSQL_YYABORT;
+ }
+#line 29816 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 77: /* $@3: %empty */
+#line 2121 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "EXECUTE IMMEDIATE"; }
+#line 29822 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 78: /* $@4: %empty */
+#line 2123 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= NULL; }
+#line 29828 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 79: /* execute: EXECUTE_SYM IMMEDIATE_SYM $@3 expr $@4 execute_using */
+#line 2125 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_execute_immediate((yyvsp[-2].item), (yyvsp[0].item_list)))
+ MYSQL_YYABORT;
+ }
+#line 29837 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 80: /* execute_using: %empty */
+#line 2132 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= NULL; }
+#line 29843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 81: /* $@5: %empty */
+#line 2134 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "EXECUTE..USING"; }
+#line 29849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 82: /* execute_using: USING $@5 execute_params */
+#line 2136 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= (yyvsp[0].item_list);
+ Lex->clause_that_disallows_subselect= NULL;
+ }
+#line 29858 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 83: /* execute_params: expr_or_ignore_or_default */
+#line 2144 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_list)= List<Item>::make(thd->mem_root, (yyvsp[0].item)))))
+ MYSQL_YYABORT;
+ }
+#line 29867 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 84: /* execute_params: execute_params ',' expr_or_ignore_or_default */
+#line 2149 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.item_list)= (yyvsp[-2].item_list))->push_back((yyvsp[0].item), thd->mem_root))
+ MYSQL_YYABORT;
+ }
+#line 29876 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 85: /* $@6: %empty */
+#line 2160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HELP"));
+ }
+#line 29885 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 86: /* help: HELP_SYM $@6 ident_or_text */
+#line 2165 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_HELP;
+ lex->help_arg= (yyvsp[0].lex_str).str;
+ }
+#line 29895 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 87: /* $@7: %empty */
+#line 2176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_CHANGE_MASTER;
+ }
+#line 29903 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 88: /* change: CHANGE MASTER_SYM optional_connection_name TO_SYM $@7 master_defs optional_for_channel */
+#line 2181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 29909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 91: /* master_def: MASTER_HOST_SYM '=' TEXT_STRING_sys */
+#line 2191 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.host = (yyvsp[0].lex_str).str;
+ }
+#line 29917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 92: /* master_def: MASTER_USER_SYM '=' TEXT_STRING_sys */
+#line 2195 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.user = (yyvsp[0].lex_str).str;
+ }
+#line 29925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 93: /* master_def: MASTER_PASSWORD_SYM '=' TEXT_STRING_sys */
+#line 2199 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.password = (yyvsp[0].lex_str).str;
+ }
+#line 29933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 94: /* master_def: MASTER_PORT_SYM '=' ulong_num */
+#line 2203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.port = (yyvsp[0].ulong_num);
+ }
+#line 29941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 95: /* master_def: MASTER_CONNECT_RETRY_SYM '=' ulong_num */
+#line 2207 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.connect_retry = (yyvsp[0].ulong_num);
+ }
+#line 29949 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 96: /* master_def: MASTER_DELAY_SYM '=' ulong_num */
+#line 2211 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].ulong_num) > MASTER_DELAY_MAX)
+ {
+ my_error(ER_MASTER_DELAY_VALUE_OUT_OF_RANGE, MYF(0),
+ (ulong) (yyvsp[0].ulong_num), (ulong) MASTER_DELAY_MAX);
+ }
+ else
+ Lex->mi.sql_delay = (yyvsp[0].ulong_num);
+ }
+#line 29963 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 97: /* master_def: MASTER_SSL_SYM '=' ulong_num */
+#line 2221 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl= (yyvsp[0].ulong_num) ?
+ LEX_MASTER_INFO::LEX_MI_ENABLE : LEX_MASTER_INFO::LEX_MI_DISABLE;
+ }
+#line 29972 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 98: /* master_def: MASTER_SSL_CA_SYM '=' TEXT_STRING_sys */
+#line 2226 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_ca= (yyvsp[0].lex_str).str;
+ }
+#line 29980 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 99: /* master_def: MASTER_SSL_CAPATH_SYM '=' TEXT_STRING_sys */
+#line 2230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_capath= (yyvsp[0].lex_str).str;
+ }
+#line 29988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 100: /* master_def: MASTER_SSL_CERT_SYM '=' TEXT_STRING_sys */
+#line 2234 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_cert= (yyvsp[0].lex_str).str;
+ }
+#line 29996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 101: /* master_def: MASTER_SSL_CIPHER_SYM '=' TEXT_STRING_sys */
+#line 2238 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_cipher= (yyvsp[0].lex_str).str;
+ }
+#line 30004 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 102: /* master_def: MASTER_SSL_KEY_SYM '=' TEXT_STRING_sys */
+#line 2242 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_key= (yyvsp[0].lex_str).str;
+ }
+#line 30012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 103: /* master_def: MASTER_SSL_VERIFY_SERVER_CERT_SYM '=' ulong_num */
+#line 2246 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_verify_server_cert= (yyvsp[0].ulong_num) ?
+ LEX_MASTER_INFO::LEX_MI_ENABLE : LEX_MASTER_INFO::LEX_MI_DISABLE;
+ }
+#line 30021 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 104: /* master_def: MASTER_SSL_CRL_SYM '=' TEXT_STRING_sys */
+#line 2251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_crl= (yyvsp[0].lex_str).str;
+ }
+#line 30029 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 105: /* master_def: MASTER_SSL_CRLPATH_SYM '=' TEXT_STRING_sys */
+#line 2255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_crlpath= (yyvsp[0].lex_str).str;
+ }
+#line 30037 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 106: /* master_def: MASTER_HEARTBEAT_PERIOD_SYM '=' NUM_literal */
+#line 2260 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.heartbeat_period= (float) (yyvsp[0].item_num)->val_real();
+ if (unlikely(Lex->mi.heartbeat_period >
+ SLAVE_MAX_HEARTBEAT_PERIOD) ||
+ unlikely(Lex->mi.heartbeat_period < 0.0))
+ my_yyabort_error((ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE, MYF(0),
+ SLAVE_MAX_HEARTBEAT_PERIOD));
+
+ if (unlikely(Lex->mi.heartbeat_period > slave_net_timeout))
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX,
+ ER_THD(thd, ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX));
+ }
+ if (unlikely(Lex->mi.heartbeat_period < 0.001))
+ {
+ if (unlikely(Lex->mi.heartbeat_period != 0.0))
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN,
+ ER_THD(thd, ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN));
+ Lex->mi.heartbeat_period= 0.0;
+ }
+ Lex->mi.heartbeat_opt= LEX_MASTER_INFO::LEX_MI_DISABLE;
+ }
+ Lex->mi.heartbeat_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 30069 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 107: /* master_def: IGNORE_SERVER_IDS_SYM '=' '(' ignore_server_id_list ')' */
+#line 2288 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.repl_ignore_server_ids_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 30077 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 108: /* master_def: DO_DOMAIN_IDS_SYM '=' '(' do_domain_id_list ')' */
+#line 2292 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.repl_do_domain_ids_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 30085 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 109: /* master_def: IGNORE_DOMAIN_IDS_SYM '=' '(' ignore_domain_id_list ')' */
+#line 2296 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.repl_ignore_domain_ids_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 30093 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 114: /* ignore_server_id: ulong_num */
+#line 2311 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ insert_dynamic(&Lex->mi.repl_ignore_server_ids, (uchar*) &((yyvsp[0].ulong_num)));
+ }
+#line 30101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 118: /* do_domain_id: ulong_num */
+#line 2324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ insert_dynamic(&Lex->mi.repl_do_domain_ids, (uchar*) &((yyvsp[0].ulong_num)));
+ }
+#line 30109 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 122: /* ignore_domain_id: ulong_num */
+#line 2337 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ insert_dynamic(&Lex->mi.repl_ignore_domain_ids, (uchar*) &((yyvsp[0].ulong_num)));
+ }
+#line 30117 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 123: /* master_file_def: MASTER_LOG_FILE_SYM '=' TEXT_STRING_sys */
+#line 2344 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.log_file_name = (yyvsp[0].lex_str).str;
+ }
+#line 30125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 124: /* master_file_def: MASTER_LOG_POS_SYM '=' ulonglong_num */
+#line 2348 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ If the user specified a value < BIN_LOG_HEADER_SIZE, adjust it
+ instead of causing subsequent errors.
+ We need to do it in this file, because only there we know that
+ MASTER_LOG_POS has been explicitly specified. On the contrary
+ in change_master() (sql_repl.cc) we cannot distinguish between 0
+ (MASTER_LOG_POS explicitly specified as 0) and 0 (unspecified),
+ whereas we want to distinguish (specified 0 means "read the binlog
+ from 0" (4 in fact), unspecified means "don't change the position
+ (keep the preceding value)").
+ */
+ Lex->mi.pos= MY_MAX(BIN_LOG_HEADER_SIZE, (yyvsp[0].ulonglong_number));
+ }
+#line 30144 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 125: /* master_file_def: RELAY_LOG_FILE_SYM '=' TEXT_STRING_sys */
+#line 2363 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.relay_log_name = (yyvsp[0].lex_str).str;
+ }
+#line 30152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 126: /* master_file_def: RELAY_LOG_POS_SYM '=' ulong_num */
+#line 2367 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.relay_log_pos = (yyvsp[0].ulong_num);
+ /* Adjust if < BIN_LOG_HEADER_SIZE (same comment as Lex->mi.pos) */
+ Lex->mi.relay_log_pos= MY_MAX(BIN_LOG_HEADER_SIZE, Lex->mi.relay_log_pos);
+ }
+#line 30162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 127: /* master_file_def: MASTER_USE_GTID_SYM '=' CURRENT_POS_SYM */
+#line 2373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->mi.use_gtid_opt != LEX_MASTER_INFO::LEX_GTID_UNCHANGED))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MASTER_use_gtid"));
+ Lex->mi.use_gtid_opt= LEX_MASTER_INFO::LEX_GTID_CURRENT_POS;
+ }
+#line 30172 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 128: /* master_file_def: MASTER_USE_GTID_SYM '=' SLAVE_POS_SYM */
+#line 2379 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->mi.use_gtid_opt != LEX_MASTER_INFO::LEX_GTID_UNCHANGED))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MASTER_use_gtid"));
+ Lex->mi.use_gtid_opt= LEX_MASTER_INFO::LEX_GTID_SLAVE_POS;
+ }
+#line 30182 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 129: /* master_file_def: MASTER_USE_GTID_SYM '=' NO_SYM */
+#line 2385 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->mi.use_gtid_opt != LEX_MASTER_INFO::LEX_GTID_UNCHANGED))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MASTER_use_gtid"));
+ Lex->mi.use_gtid_opt= LEX_MASTER_INFO::LEX_GTID_NO;
+ }
+#line 30192 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 130: /* master_file_def: MASTER_DEMOTE_TO_SLAVE_SYM '=' bool */
+#line 2391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.is_demotion_opt= (bool) (yyvsp[0].ulong_num);
+ }
+#line 30200 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 131: /* optional_connection_name: %empty */
+#line 2398 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->mi.connection_name= null_clex_str;
+ }
+#line 30209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 133: /* connection_name: TEXT_STRING_sys */
+#line 2407 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.connection_name= (yyvsp[0].lex_str);
+#ifdef HAVE_REPLICATION
+ if (unlikely(check_master_connection_name(&(yyvsp[0].lex_str))))
+ my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "MASTER_CONNECTION_NAME"));
+#endif
+ }
+#line 30221 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 134: /* optional_for_channel: %empty */
+#line 2418 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*do nothing */
+ }
+#line 30229 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 136: /* for_channel: FOR_SYM CHANNEL_SYM TEXT_STRING_sys */
+#line 2427 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->mi.connection_name.str != NULL)
+ {
+ my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)"));
+ }
+ else
+ {
+ Lex->mi.connection_name= (yyvsp[0].lex_str);
+#ifdef HAVE_REPLICATION
+ if (unlikely(check_master_connection_name(&(yyvsp[0].lex_str))))
+ my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "MASTER_CONNECTION_NAME"));
+#endif
+ }
+
+ }
+#line 30249 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 137: /* $@8: %empty */
+#line 2448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_create_table()))
+ MYSQL_YYABORT;
+ lex->create_info.init();
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
+ if (lex->set_command_with_check(SQLCOM_CREATE_TABLE, (yyvsp[-2].num), (yyvsp[-3].object_ddl_options) | (yyvsp[0].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 30265 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 138: /* $@9: %empty */
+#line 2460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_SHARED_UPGRADABLE))
+ MYSQL_YYABORT;
+ lex->alter_info.reset();
+ /*
+ For CREATE TABLE we should not open the table even if it exists.
+ If the table exists, we should either not create it or replace it
+ */
+ lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
+ lex->name= null_clex_str;
+ lex->create_last_non_select_table= lex->last_table();
+ lex->inc_select_stack_outer_barrier();
+ }
+#line 30286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 139: /* create: create_or_replace opt_temporary TABLE_SYM opt_if_not_exists $@8 table_ident $@9 create_body */
+#line 2477 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
+ }
+#line 30296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 140: /* $@10: %empty */
+#line 2483 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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();
+ if (unlikely(lex->set_command_with_check(SQLCOM_CREATE_SEQUENCE, (yyvsp[-3].num),
+ (yyvsp[-4].object_ddl_options) | (yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_EXCLUSIVE))
+ MYSQL_YYABORT;
+
+ /*
+ For CREATE TABLE, an non-existing table is not an error.
+ Instruct open_tables() to just take an MDL lock if the
+ table does not exist.
+ */
+ lex->alter_info.reset();
+ lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
+ lex->name= null_clex_str;
+ lex->create_last_non_select_table= lex->last_table();
+ if (unlikely(!(lex->create_info.seq_create_info=
+ new (thd->mem_root) sequence_definition())))
+ MYSQL_YYABORT;
+ }
+#line 30330 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 141: /* create: create_or_replace opt_temporary SEQUENCE_SYM opt_if_not_exists table_ident $@10 opt_sequence opt_create_table_options */
+#line 2513 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+
+ if (unlikely(lex->create_info.seq_create_info->check_and_adjust(1)))
+ {
+ my_error(ER_SEQUENCE_INVALID_DATA, MYF(0),
+ lex->first_select_lex()->table_list.first->db.str,
+ lex->first_select_lex()->table_list.first->
+ table_name.str);
+ MYSQL_YYABORT;
+ }
+
+ /* No fields specified, generate them */
+ if (unlikely(prepare_sequence_fields(thd,
+ &lex->alter_info.create_list)))
+ MYSQL_YYABORT;
+
+ /* CREATE SEQUENCE always creates a sequence */
+ Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
+ Lex->create_info.sequence= 1;
+
+ create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
+ }
+#line 30359 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 142: /* $@11: %empty */
+#line 2538 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 30368 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 143: /* $@12: %empty */
+#line 2545 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index(Key::MULTIPLE, &(yyvsp[-3].ident_sys), (yyvsp[-2].key_alg), (yyvsp[-7].object_ddl_options) | (yyvsp[-5].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 30379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 144: /* create: create_or_replace INDEX_SYM opt_if_not_exists $@11 ident opt_key_algorithm_clause ON table_ident $@12 '(' key_list ')' opt_lock_wait_timeout normal_key_options opt_index_lock_algorithm */
+#line 2553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 145: /* $@13: %empty */
+#line 2557 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 30396 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 146: /* $@14: %empty */
+#line 2564 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index(Key::UNIQUE, &(yyvsp[-3].ident_sys), (yyvsp[-2].key_alg), (yyvsp[-8].object_ddl_options) | (yyvsp[-5].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 30407 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 147: /* create: create_or_replace UNIQUE_SYM INDEX_SYM opt_if_not_exists $@13 ident opt_key_algorithm_clause ON table_ident $@14 '(' key_list opt_without_overlaps ')' opt_lock_wait_timeout normal_key_options opt_index_lock_algorithm */
+#line 2573 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 148: /* $@15: %empty */
+#line 2577 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 30424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 149: /* $@16: %empty */
+#line 2583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index((yyvsp[-6].key_type), &(yyvsp[-2].ident_sys), HA_KEY_ALG_UNDEF, (yyvsp[-7].object_ddl_options) | (yyvsp[-3].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 30435 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 150: /* create: create_or_replace fulltext INDEX_SYM $@15 opt_if_not_exists ident ON table_ident $@16 '(' key_list ')' opt_lock_wait_timeout fulltext_key_options opt_index_lock_algorithm */
+#line 2591 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30443 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 151: /* $@17: %empty */
+#line 2595 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 30452 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 152: /* $@18: %empty */
+#line 2601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index((yyvsp[-6].key_type), &(yyvsp[-2].ident_sys), HA_KEY_ALG_UNDEF, (yyvsp[-7].object_ddl_options) | (yyvsp[-3].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 30463 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 153: /* create: create_or_replace spatial INDEX_SYM $@17 opt_if_not_exists ident ON table_ident $@18 '(' key_list ')' opt_lock_wait_timeout spatial_key_options opt_index_lock_algorithm */
+#line 2609 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30471 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 154: /* $@19: %empty */
+#line 2613 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.init();
+ }
+#line 30479 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 155: /* create: create_or_replace DATABASE opt_if_not_exists ident $@19 opt_create_database_options */
+#line 2617 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(lex->set_command_with_check(SQLCOM_CREATE_DB, 0,
+ (yyvsp[-5].object_ddl_options) | (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ lex->name= (yyvsp[-2].ident_sys);
+ }
+#line 30491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 156: /* $@20: %empty */
+#line 2626 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
+ if (Lex->add_create_view(thd, (yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options),
+ DTYPE_ALGORITHM_UNDEFINED, (yyvsp[-3].view_suid), (yyvsp[0].table)))
+ MYSQL_YYABORT;
+ }
+#line 30504 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 157: /* create: create_or_replace definer_opt opt_view_suid VIEW_SYM opt_if_not_exists table_ident $@20 view_list_opt AS view_select */
+#line 2635 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 158: /* $@21: %empty */
+#line 2640 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_create_view(thd, (yyvsp[-6].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-5].num), (yyvsp[-3].view_suid), (yyvsp[0].table))))
+ MYSQL_YYABORT;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
+ }
+#line 30524 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 159: /* create: create_or_replace view_algorithm definer_opt opt_view_suid VIEW_SYM opt_if_not_exists table_ident $@21 view_list_opt AS view_select */
+#line 2648 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30532 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 160: /* $@22: %empty */
+#line 2652 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->create_info.set((yyvsp[-2].object_ddl_options));
+ }
+#line 30542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 161: /* create: create_or_replace definer_opt TRIGGER_SYM $@22 trigger_tail */
+#line 2658 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 162: /* $@23: %empty */
+#line 2662 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->create_info.set((yyvsp[-2].object_ddl_options));
+ }
+#line 30560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 163: /* create: create_or_replace definer_opt EVENT_SYM $@23 event_tail */
+#line 2668 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 30568 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 164: /* create: 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 */
+#line 2673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_command_with_check(SQLCOM_CREATE_USER,
+ (yyvsp[-7].object_ddl_options) | (yyvsp[-5].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 30578 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 165: /* create: create_or_replace ROLE_SYM opt_if_not_exists clear_privileges role_list opt_with_admin */
+#line 2680 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_command_with_check(SQLCOM_CREATE_ROLE,
+ (yyvsp[-5].object_ddl_options) | (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 30588 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 166: /* $@24: %empty */
+#line 2685 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->set_command(SQLCOM_CREATE_SERVER, (yyvsp[0].object_ddl_options)); }
+#line 30594 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 167: /* create: create_or_replace $@24 server_def */
+#line 2687 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 30600 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 169: /* opt_sequence: %empty */
+#line 2692 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 30606 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 173: /* sequence_def: MINVALUE_SYM opt_equal longlong_num */
+#line 2703 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.seq_create_info->min_value= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
+ }
+#line 30615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 174: /* sequence_def: NO_SYM MINVALUE_SYM */
+#line 2708 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_min_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MINVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
+ }
+#line 30625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 175: /* sequence_def: NOMINVALUE_SYM */
+#line 2714 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_min_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MINVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
+ }
+#line 30635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 176: /* sequence_def: MAXVALUE_SYM opt_equal longlong_num */
+#line 2720 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_max_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
+ Lex->create_info.seq_create_info->max_value= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_max_value;
+ }
+#line 30647 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 177: /* sequence_def: NO_SYM MAXVALUE_SYM */
+#line 2728 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_max_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_max_value;
+ }
+#line 30657 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 178: /* sequence_def: NOMAXVALUE_SYM */
+#line 2734 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_max_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_max_value;
+ }
+#line 30667 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 179: /* sequence_def: START_SYM opt_with longlong_num */
+#line 2740 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_start))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "START"));
+ Lex->create_info.seq_create_info->start= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_start;
+ }
+#line 30679 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 180: /* sequence_def: INCREMENT_SYM opt_by longlong_num */
+#line 2748 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_increment))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "INCREMENT"));
+ Lex->create_info.seq_create_info->increment= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_increment;
+ }
+#line 30691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 181: /* sequence_def: CACHE_SYM opt_equal longlong_num */
+#line 2756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cache))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CACHE"));
+ Lex->create_info.seq_create_info->cache= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cache;
+ }
+#line 30703 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 182: /* sequence_def: NOCACHE_SYM */
+#line 2764 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cache))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CACHE"));
+ Lex->create_info.seq_create_info->cache= 0;
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cache;
+ }
+#line 30715 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 183: /* sequence_def: CYCLE_SYM */
+#line 2772 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cycle))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CYCLE"));
+ Lex->create_info.seq_create_info->cycle= 1;
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cycle;
+ }
+#line 30727 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 184: /* sequence_def: NOCYCLE_SYM */
+#line 2780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cycle))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CYCLE"));
+ Lex->create_info.seq_create_info->cycle= 0;
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cycle;
+ }
+#line 30739 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 185: /* sequence_def: RESTART_SYM */
+#line 2788 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, "RESTART");
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_restart))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "RESTART"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_restart;
+ }
+#line 30755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 186: /* sequence_def: RESTART_SYM opt_with longlong_num */
+#line 2800 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, "RESTART");
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_restart))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "RESTART"));
+ Lex->create_info.seq_create_info->restart= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_restart | seq_field_used_restart_value;
+ }
+#line 30772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 187: /* force_lookahead: %empty */
+#line 2815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30778 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 188: /* force_lookahead: FORCE_LOOKAHEAD */
+#line 2815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30784 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 189: /* $@25: %empty */
+#line 2819 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ Lex->server_options.reset((yyvsp[0].lex_str));
+ }
+#line 30794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 190: /* server_def: SERVER_SYM opt_if_not_exists ident_or_text $@25 FOREIGN DATA_SYM WRAPPER_SYM ident_or_text OPTIONS_SYM '(' server_options_list ')' */
+#line 2826 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->server_options.scheme= (yyvsp[-4].lex_str); }
+#line 30800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 193: /* server_option: USER_SYM TEXT_STRING_sys */
+#line 2836 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.username.str == 0);
+ Lex->server_options.username= (yyvsp[0].lex_str);
+ }
+#line 30809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 194: /* server_option: HOST_SYM TEXT_STRING_sys */
+#line 2841 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
+ Lex->server_options.host= (yyvsp[0].lex_str);
+ }
+#line 30818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 195: /* server_option: DATABASE TEXT_STRING_sys */
+#line 2846 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.db.str == 0);
+ Lex->server_options.db= (yyvsp[0].lex_str);
+ }
+#line 30827 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 196: /* server_option: OWNER_SYM TEXT_STRING_sys */
+#line 2851 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.owner.str == 0);
+ Lex->server_options.owner= (yyvsp[0].lex_str);
+ }
+#line 30836 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 197: /* server_option: PASSWORD_SYM TEXT_STRING_sys */
+#line 2856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.password.str == 0);
+ Lex->server_options.password= (yyvsp[0].lex_str);
+ }
+#line 30845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 198: /* server_option: SOCKET_SYM TEXT_STRING_sys */
+#line 2861 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.socket.str == 0);
+ Lex->server_options.socket= (yyvsp[0].lex_str);
+ }
+#line 30854 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 199: /* server_option: PORT_SYM ulong_num */
+#line 2866 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->server_options.port= (yyvsp[0].ulong_num);
+ }
+#line 30862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 200: /* $@26: %empty */
+#line 2873 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+
+ lex->stmt_definition_begin= (yyvsp[-2].simple_string);
+ if (unlikely(lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ if (unlikely(!(lex->event_parse_data=
+ Event_parse_data::new_instance(thd))))
+ MYSQL_YYABORT;
+ lex->event_parse_data->identifier= (yyvsp[0].spname);
+ lex->event_parse_data->on_completion=
+ Event_parse_data::ON_COMPLETION_DROP;
+
+ lex->sql_command= SQLCOM_CREATE_EVENT;
+ /* We need that for disallowing subqueries */
+ }
+#line 30883 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 201: /* event_tail: remember_name opt_if_not_exists sp_name $@26 ON SCHEDULE_SYM ev_schedule_time opt_ev_on_completion opt_ev_status opt_ev_comment DO_SYM ev_sql_stmt */
+#line 2894 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ sql_command is set here because some rules in ev_sql_stmt
+ can overwrite it
+ */
+ Lex->sql_command= SQLCOM_CREATE_EVENT;
+ }
+#line 30895 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 202: /* $@27: %empty */
+#line 2905 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_expression= (yyvsp[-1].item);
+ Lex->event_parse_data->interval= (yyvsp[0].interval);
+ }
+#line 30904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 204: /* ev_schedule_time: AT_SYM expr */
+#line 2912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_execute_at= (yyvsp[0].item);
+ }
+#line 30912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 205: /* opt_ev_status: %empty */
+#line 2918 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 30918 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 206: /* opt_ev_status: ENABLE_SYM */
+#line 2920 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->status= Event_parse_data::ENABLED;
+ Lex->event_parse_data->status_changed= true;
+ (yyval.num)= 1;
+ }
+#line 30928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 207: /* opt_ev_status: DISABLE_SYM ON SLAVE */
+#line 2926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->status= Event_parse_data::SLAVESIDE_DISABLED;
+ Lex->event_parse_data->status_changed= true;
+ (yyval.num)= 1;
+ }
+#line 30938 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 208: /* opt_ev_status: DISABLE_SYM */
+#line 2932 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->status= Event_parse_data::DISABLED;
+ Lex->event_parse_data->status_changed= true;
+ (yyval.num)= 1;
+ }
+#line 30948 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 209: /* ev_starts: %empty */
+#line 2941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_now_local(thd, 0);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ Lex->event_parse_data->item_starts= item;
+ }
+#line 30959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 210: /* ev_starts: STARTS_SYM expr */
+#line 2948 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_starts= (yyvsp[0].item);
+ }
+#line 30967 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 212: /* ev_ends: ENDS_SYM expr */
+#line 2956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_ends= (yyvsp[0].item);
+ }
+#line 30975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 213: /* opt_ev_on_completion: %empty */
+#line 2962 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 30981 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 215: /* ev_on_completion: ON COMPLETION_SYM opt_not PRESERVE_SYM */
+#line 2968 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->on_completion= (yyvsp[-1].num)
+ ? Event_parse_data::ON_COMPLETION_DROP
+ : Event_parse_data::ON_COMPLETION_PRESERVE;
+ (yyval.num)= 1;
+ }
+#line 30992 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 216: /* opt_ev_comment: %empty */
+#line 2977 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 30998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 217: /* opt_ev_comment: COMMENT_SYM TEXT_STRING_sys */
+#line 2979 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->comment= Lex->event_parse_data->comment= (yyvsp[0].lex_str);
+ (yyval.num)= 1;
+ }
+#line 31007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 218: /* $@28: %empty */
+#line 2986 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= YYLIP;
+
+ /*
+ This stops the following :
+ - CREATE EVENT ... DO CREATE EVENT ...;
+ - ALTER EVENT ... DO CREATE EVENT ...;
+ - CREATE EVENT ... DO ALTER EVENT DO ....;
+ - CREATE PROCEDURE ... BEGIN CREATE EVENT ... END|
+ This allows:
+ - CREATE EVENT ... DO DROP EVENT yyy;
+ - CREATE EVENT ... DO ALTER EVENT yyy;
+ (the nested ALTER EVENT can have anything but DO clause)
+ - ALTER EVENT ... DO ALTER EVENT yyy;
+ (the nested ALTER EVENT can have anything but DO clause)
+ - ALTER EVENT ... DO DROP EVENT yyy;
+ - CREATE PROCEDURE ... BEGIN ALTER EVENT ... END|
+ (the nested ALTER EVENT can have anything but DO clause)
+ - CREATE PROCEDURE ... BEGIN DROP EVENT ... END|
+ */
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_EVENT_RECURSION_FORBIDDEN, MYF(0)));
+
+ if (unlikely(!lex->make_sp_head(thd,
+ lex->event_parse_data->identifier,
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+
+ lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
+ }
+#line 31044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 219: /* ev_sql_stmt: $@28 sp_proc_stmt force_lookahead */
+#line 3019 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* return back to the original memory root ASAP */
+ if (Lex->sp_body_finalize_event(thd))
+ MYSQL_YYABORT;
+ }
+#line 31054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 220: /* clear_privileges: %empty */
+#line 3028 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->users_list.empty();
+ lex->first_select_lex()->db= null_clex_str;
+ lex->account_options.reset();
+ }
+#line 31065 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 221: /* opt_aggregate: %empty */
+#line 3037 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_aggregate_type)= NOT_AGGREGATE; }
+#line 31071 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 222: /* opt_aggregate: AGGREGATE_SYM */
+#line 3038 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_aggregate_type)= GROUP_AGGREGATE; }
+#line 31077 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 223: /* sp_handler: FUNCTION_SYM */
+#line 3043 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_function; }
+#line 31083 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 224: /* sp_handler: PROCEDURE_SYM */
+#line 3044 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_procedure; }
+#line 31089 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 225: /* sp_handler: PACKAGE_ORACLE_SYM */
+#line 3045 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_package_spec; }
+#line 31095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 226: /* sp_handler: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM */
+#line 3046 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_package_body; }
+#line 31101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 227: /* sp_name: ident '.' ident */
+#line 3052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 31110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 228: /* sp_name: ident */
+#line 3057 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 31119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 229: /* sp_a_chistics: %empty */
+#line 3064 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 230: /* sp_a_chistics: sp_a_chistics sp_chistic */
+#line 3065 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 231: /* sp_c_chistics: %empty */
+#line 3069 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31137 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 232: /* sp_c_chistics: sp_c_chistics sp_c_chistic */
+#line 3070 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 233: /* sp_chistic: COMMENT_SYM TEXT_STRING_sys */
+#line 3076 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
+#line 31149 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 234: /* sp_chistic: LANGUAGE_SYM SQL_SYM */
+#line 3078 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* Just parse it, we only have one language for now. */ }
+#line 31155 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 235: /* sp_chistic: NO_SYM SQL_SYM */
+#line 3080 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_NO_SQL; }
+#line 31161 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 236: /* sp_chistic: CONTAINS_SYM SQL_SYM */
+#line 3082 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_CONTAINS_SQL; }
+#line 31167 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 237: /* sp_chistic: READS_SYM SQL_SYM DATA_SYM */
+#line 3084 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_READS_SQL_DATA; }
+#line 31173 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 238: /* sp_chistic: MODIFIES_SYM SQL_SYM DATA_SYM */
+#line 3086 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_MODIFIES_SQL_DATA; }
+#line 31179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 239: /* sp_chistic: sp_suid */
+#line 3088 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.suid= (yyvsp[0].sp_suid); }
+#line 31185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 240: /* sp_c_chistic: sp_chistic */
+#line 3093 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 31191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 241: /* sp_c_chistic: opt_not DETERMINISTIC_SYM */
+#line 3094 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.detistic= ! (yyvsp[-1].num); }
+#line 31197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 242: /* sp_suid: SQL_SYM SECURITY_SYM DEFINER_SYM */
+#line 3098 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_suid)= SP_IS_SUID; }
+#line 31203 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 243: /* sp_suid: SQL_SYM SECURITY_SYM INVOKER_SYM */
+#line 3099 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_suid)= SP_IS_NOT_SUID; }
+#line 31209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 244: /* $@29: %empty */
+#line 3104 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->call_statement_start(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 245: /* call: CALL_SYM ident $@29 opt_sp_cparam_list */
+#line 3109 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 31227 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 246: /* $@30: %empty */
+#line 3114 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->call_statement_start(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31236 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 247: /* call: CALL_SYM ident '.' ident $@30 opt_sp_cparam_list */
+#line 3119 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 31245 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 248: /* $@31: %empty */
+#line 3124 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->call_statement_start(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 249: /* call: CALL_SYM ident '.' ident '.' ident $@31 opt_sp_cparam_list */
+#line 3129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 31263 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 254: /* sp_cparams: sp_cparams ',' expr */
+#line 3148 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
+ }
+#line 31271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 255: /* sp_cparams: expr */
+#line 3152 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
+ }
+#line 31279 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 256: /* sp_fdparam_list: %empty */
+#line 3160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ Lex->sphead->m_param_end= Lex->sphead->m_param_begin;
+ }
+#line 31288 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 257: /* $@32: %empty */
+#line 3165 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ }
+#line 31296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 258: /* sp_fdparam_list: $@32 sp_fdparams */
+#line 3169 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
+ }
+#line 31304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 261: /* sp_param_name: ident */
+#line 3181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.spvar)= Lex->sp_param_init(&(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 31313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 266: /* sp_parameter_type: IN_SYM */
+#line 3199 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_IN; }
+#line 31319 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 267: /* sp_parameter_type: OUT_SYM */
+#line 3200 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_OUT; }
+#line 31325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 268: /* sp_parameter_type: INOUT_SYM */
+#line 3201 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
+#line 31331 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 269: /* $@33: %empty */
+#line 3206 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
+ }
+#line 31339 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 270: /* sp_parenthesized_pdparam_list: '(' $@33 sp_pdparam_list ')' */
+#line 3211 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
+ }
+#line 31347 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 272: /* sp_proc_stmts: %empty */
+#line 3221 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 274: /* sp_proc_stmts1: sp_proc_stmt ';' */
+#line 3226 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31359 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 276: /* optionally_qualified_column_ident: sp_decl_ident */
+#line 3233 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
+ Qualified_column_ident(&(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 31369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 277: /* optionally_qualified_column_ident: sp_decl_ident '.' ident */
+#line 3239 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
+ Qualified_column_ident(&(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 31379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 278: /* optionally_qualified_column_ident: sp_decl_ident '.' ident '.' ident */
+#line 3245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
+ Qualified_column_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 31389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 279: /* row_field_definition: row_field_name field_type */
+#line 3255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
+ COLUMN_DEFINITION_ROUTINE_LOCAL);
+ }
+#line 31398 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 280: /* row_field_definition_list: row_field_definition */
+#line 3263 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.spvar_definition_list)= Row_definition_list::make(thd->mem_root, (yyvsp[0].spvar_definition))))
+ MYSQL_YYABORT;
+ }
+#line 31407 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 281: /* row_field_definition_list: row_field_definition_list ',' row_field_definition */
+#line 3268 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.spvar_definition_list)= (yyvsp[-2].spvar_definition_list))->append_uniq(thd->mem_root, (yyvsp[0].spvar_definition)))
+ MYSQL_YYABORT;
+ }
+#line 31416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 282: /* row_type_body: '(' row_field_definition_list ')' */
+#line 3275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_definition_list)= (yyvsp[-1].spvar_definition_list); }
+#line 31422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 283: /* sp_decl_idents_init_vars: sp_decl_idents */
+#line 3280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_variable_declarations_init(thd, (yyvsp[0].num));
+ }
+#line 31430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 284: /* $@34: %empty */
+#line 3288 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
+ COLUMN_DEFINITION_ROUTINE_LOCAL);
+ }
+#line 31439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 285: /* sp_decl_variable_list: sp_decl_idents_init_vars field_type $@34 sp_opt_default */
+#line 3293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_finalize(thd, (yyvsp[-3].num),
+ &Lex->last_field[0],
+ (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-3].num));
+ }
+#line 31451 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 286: /* sp_decl_variable_list: sp_decl_idents_init_vars ROW_SYM row_type_body sp_opt_default */
+#line 3303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_row_finalize(thd, (yyvsp[-3].num), (yyvsp[-1].spvar_definition_list), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-3].num));
+ }
+#line 31461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 288: /* $@35: %empty */
+#line 3313 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_handler_declaration_init(thd, (yyvsp[-2].num))))
+ MYSQL_YYABORT;
+ }
+#line 31470 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 289: /* sp_decl_handler: sp_handler_type HANDLER_SYM FOR_SYM $@35 sp_hcond_list sp_proc_stmt */
+#line 3318 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_handler_declaration_finalize(thd, (yyvsp[-5].num))))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).curs= 0;
+ (yyval.spblock).hndlrs= 1;
+ }
+#line 31481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 292: /* sp_cursor_stmt_lex: %empty */
+#line 3333 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(thd->lex->sphead);
+ if (unlikely(!((yyval.sp_cursor_stmt)= new (thd->mem_root)
+ sp_lex_cursor(thd, thd->lex))))
+ MYSQL_YYABORT;
+ }
+#line 31492 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 293: /* $@36: %empty */
+#line 3343 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(thd->free_list == NULL);
+ Lex->sphead->reset_lex(thd, (yyvsp[0].sp_cursor_stmt));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 31503 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 294: /* sp_cursor_stmt: sp_cursor_stmt_lex $@36 select */
+#line 3350 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex == (yyvsp[-2].sp_cursor_stmt));
+ Lex->pop_select(); //main select
+ if (unlikely((yyvsp[-2].sp_cursor_stmt)->stmt_finalize(thd)) ||
+ unlikely((yyvsp[-2].sp_cursor_stmt)->sphead->restore_lex(thd)))
+ MYSQL_YYABORT;
+ (yyval.sp_cursor_stmt)= (yyvsp[-2].sp_cursor_stmt);
+ }
+#line 31516 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 295: /* sp_handler_type: EXIT_MARIADB_SYM */
+#line 3361 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::EXIT; }
+#line 31522 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 296: /* sp_handler_type: CONTINUE_MARIADB_SYM */
+#line 3362 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::CONTINUE; }
+#line 31528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 297: /* sp_handler_type: EXIT_ORACLE_SYM */
+#line 3363 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::EXIT; }
+#line 31534 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 298: /* sp_handler_type: CONTINUE_ORACLE_SYM */
+#line 3364 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::CONTINUE; }
+#line 31540 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 299: /* sp_hcond_list: sp_hcond_element */
+#line 3370 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 31546 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 300: /* sp_hcond_list: sp_hcond_list ',' sp_hcond_element */
+#line 3372 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)+= 1; }
+#line 31552 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 301: /* sp_hcond_element: sp_hcond */
+#line 3377 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ sp_pcontext *ctx= lex->spcont->parent_context();
+
+ if (unlikely(ctx->check_duplicate_handler((yyvsp[0].spcondvalue))))
+ my_yyabort_error((ER_SP_DUP_HANDLER, MYF(0)));
+
+ sp_instr_hpush_jump *i= (sp_instr_hpush_jump *)sp->last_instruction();
+ i->add_condition((yyvsp[0].spcondvalue));
+ }
+#line 31568 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 302: /* sp_cond: ulong_num */
+#line 3392 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* mysql errno */
+ if (unlikely((yyvsp[0].ulong_num) == 0))
+ my_yyabort_error((ER_WRONG_VALUE, MYF(0), "CONDITION", "0"));
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value((yyvsp[0].ulong_num));
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 304: /* sqlstate: SQLSTATE_SYM opt_value TEXT_STRING_literal */
+#line 3404 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* SQLSTATE */
+
+ /*
+ An error is triggered:
+ - if the specified string is not a valid SQLSTATE,
+ - or if it represents the completion condition -- it is not
+ allowed to SIGNAL, or declare a handler for the completion
+ condition.
+ */
+ if (unlikely(!is_sqlstate_valid(&(yyvsp[0].lex_str)) ||
+ is_sqlstate_completion((yyvsp[0].lex_str).str)))
+ my_yyabort_error((ER_SP_BAD_SQLSTATE, MYF(0), (yyvsp[0].lex_str).str));
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value((yyvsp[0].lex_str).str);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31601 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 305: /* opt_value: %empty */
+#line 3423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 306: /* opt_value: VALUE_SYM */
+#line 3424 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 31613 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 307: /* sp_hcond: sp_cond */
+#line 3429 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= (yyvsp[0].spcondvalue);
+ }
+#line 31621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 308: /* sp_hcond: ident */
+#line 3433 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= Lex->spcont->find_declared_or_predefined_condition(thd, &(yyvsp[0].ident_sys));
+ if (unlikely((yyval.spcondvalue) == NULL))
+ my_yyabort_error((ER_SP_COND_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 31631 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 309: /* sp_hcond: SQLWARNING_SYM */
+#line 3439 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::WARNING);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 310: /* sp_hcond: not FOUND_SYM */
+#line 3445 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::NOT_FOUND);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 311: /* sp_hcond: SQLEXCEPTION_SYM */
+#line 3451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31661 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 312: /* sp_hcond: OTHERS_ORACLE_SYM */
+#line 3457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 313: /* raise_stmt_oracle: RAISE_ORACLE_SYM opt_set_signal_information */
+#line 3467 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_resignal_statement(thd, NULL)))
+ MYSQL_YYABORT;
+ }
+#line 31680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 314: /* raise_stmt_oracle: RAISE_ORACLE_SYM signal_value opt_set_signal_information */
+#line 3472 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue))))
+ MYSQL_YYABORT;
+ }
+#line 31689 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 315: /* signal_stmt: SIGNAL_SYM signal_value opt_set_signal_information */
+#line 3480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue)))
+ MYSQL_YYABORT;
+ }
+#line 31698 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 316: /* signal_value: ident */
+#line 3488 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.spcondvalue)= Lex->stmt_signal_value((yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31707 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 317: /* signal_value: sqlstate */
+#line 3493 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
+#line 31713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 318: /* opt_signal_value: %empty */
+#line 3498 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spcondvalue)= NULL; }
+#line 31719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 319: /* opt_signal_value: signal_value */
+#line 3500 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
+#line 31725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 320: /* opt_set_signal_information: %empty */
+#line 3505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->m_parser_state->m_yacc.m_set_signal_info.clear();
+ }
+#line 31733 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 322: /* signal_information_item_list: signal_condition_information_item_name '=' signal_allowed_expr */
+#line 3513 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Set_signal_information *info;
+ info= &thd->m_parser_state->m_yacc.m_set_signal_info;
+ int index= (int) (yyvsp[-2].diag_condition_item_name);
+ info->clear();
+ info->m_item[index]= (yyvsp[0].item);
+ }
+#line 31745 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 323: /* signal_information_item_list: signal_information_item_list ',' signal_condition_information_item_name '=' signal_allowed_expr */
+#line 3522 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Set_signal_information *info;
+ info= &thd->m_parser_state->m_yacc.m_set_signal_info;
+ int index= (int) (yyvsp[-2].diag_condition_item_name);
+ if (unlikely(info->m_item[index] != NULL))
+ my_yyabort_error((ER_DUP_SIGNAL_SET, MYF(0),
+ Diag_condition_item_names[index].str));
+ info->m_item[index]= (yyvsp[0].item);
+ }
+#line 31759 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 324: /* signal_allowed_expr: literal */
+#line 3538 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 31765 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 325: /* signal_allowed_expr: variable */
+#line 3540 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].item)->type() == Item::FUNC_ITEM)
+ {
+ Item_func *item= (Item_func*) (yyvsp[0].item);
+ if (unlikely(item->functype() == Item_func::SUSERVAR_FUNC))
+ {
+ /*
+ Don't allow the following syntax:
+ SIGNAL/RESIGNAL ...
+ SET <signal condition item name> = @foo := expr
+ */
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 31787 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 326: /* signal_allowed_expr: simple_ident */
+#line 3558 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 31793 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 327: /* signal_condition_information_item_name: CLASS_ORIGIN_SYM */
+#line 3564 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CLASS_ORIGIN; }
+#line 31799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 328: /* signal_condition_information_item_name: SUBCLASS_ORIGIN_SYM */
+#line 3566 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_SUBCLASS_ORIGIN; }
+#line 31805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 329: /* signal_condition_information_item_name: CONSTRAINT_CATALOG_SYM */
+#line 3568 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_CATALOG; }
+#line 31811 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 330: /* signal_condition_information_item_name: CONSTRAINT_SCHEMA_SYM */
+#line 3570 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_SCHEMA; }
+#line 31817 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 331: /* signal_condition_information_item_name: CONSTRAINT_NAME_SYM */
+#line 3572 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_NAME; }
+#line 31823 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 332: /* signal_condition_information_item_name: CATALOG_NAME_SYM */
+#line 3574 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CATALOG_NAME; }
+#line 31829 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 333: /* signal_condition_information_item_name: SCHEMA_NAME_SYM */
+#line 3576 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_SCHEMA_NAME; }
+#line 31835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 334: /* signal_condition_information_item_name: TABLE_NAME_SYM */
+#line 3578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_TABLE_NAME; }
+#line 31841 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 335: /* signal_condition_information_item_name: COLUMN_NAME_SYM */
+#line 3580 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_COLUMN_NAME; }
+#line 31847 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 336: /* signal_condition_information_item_name: CURSOR_NAME_SYM */
+#line 3582 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CURSOR_NAME; }
+#line 31853 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 337: /* signal_condition_information_item_name: MESSAGE_TEXT_SYM */
+#line 3584 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_MESSAGE_TEXT; }
+#line 31859 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 338: /* signal_condition_information_item_name: MYSQL_ERRNO_SYM */
+#line 3586 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_MYSQL_ERRNO; }
+#line 31865 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 339: /* signal_condition_information_item_name: ROW_NUMBER_SYM */
+#line 3588 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_ROW_NUMBER; }
+#line 31871 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 340: /* resignal_stmt: RESIGNAL_SYM opt_signal_value opt_set_signal_information */
+#line 3593 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_resignal_statement(thd, (yyvsp[-1].spcondvalue))))
+ MYSQL_YYABORT;
+ }
+#line 31880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 341: /* get_diagnostics: GET_SYM which_area DIAGNOSTICS_SYM diagnostics_information */
+#line 3601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Diagnostics_information *info= (yyvsp[0].diag_info);
+
+ info->set_which_da((yyvsp[-2].diag_area));
+
+ Lex->sql_command= SQLCOM_GET_DIAGNOSTICS;
+ Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_get_diagnostics(info);
+
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31896 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 342: /* which_area: %empty */
+#line 3616 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
+#line 31902 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 343: /* which_area: CURRENT_SYM */
+#line 3618 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
+#line 31908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 344: /* diagnostics_information: statement_information */
+#line 3623 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.diag_info)= new (thd->mem_root) Statement_information((yyvsp[0].stmt_info_list));
+ if (unlikely((yyval.diag_info) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31918 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 345: /* diagnostics_information: CONDITION_SYM condition_number condition_information */
+#line 3629 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.diag_info)= new (thd->mem_root) Condition_information((yyvsp[-1].item), (yyvsp[0].cond_info_list));
+ if (unlikely((yyval.diag_info) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 346: /* statement_information: statement_information_item */
+#line 3638 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.stmt_info_list)= new (thd->mem_root) List<Statement_information_item>;
+ if (unlikely((yyval.stmt_info_list) == NULL) ||
+ unlikely((yyval.stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 31939 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 347: /* statement_information: statement_information ',' statement_information_item */
+#line 3645 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-2].stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.stmt_info_list)= (yyvsp[-2].stmt_info_list);
+ }
+#line 31949 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 348: /* statement_information_item: simple_target_specification '=' statement_information_item_name */
+#line 3654 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.stmt_info_item)= new (thd->mem_root) Statement_information_item((yyvsp[0].stmt_info_item_name), (yyvsp[-2].item));
+ if (unlikely((yyval.stmt_info_item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 349: /* simple_target_specification: ident_cli */
+#line 3663 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= thd->lex->create_item_for_sp_var(&(yyvsp[0].ident_cli), NULL))))
+ MYSQL_YYABORT;
+ }
+#line 31968 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 350: /* simple_target_specification: '@' ident_or_text */
+#line 3668 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31983 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 351: /* statement_information_item_name: NUMBER_MARIADB_SYM */
+#line 3682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
+#line 31989 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 352: /* statement_information_item_name: NUMBER_ORACLE_SYM */
+#line 3684 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
+#line 31995 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 353: /* statement_information_item_name: ROW_COUNT_SYM */
+#line 3686 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.stmt_info_item_name)= Statement_information_item::ROW_COUNT; }
+#line 32001 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 354: /* condition_number: signal_allowed_expr */
+#line 3695 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 32007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 355: /* condition_information: condition_information_item */
+#line 3700 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.cond_info_list)= new (thd->mem_root) List<Condition_information_item>;
+ if (unlikely((yyval.cond_info_list) == NULL) ||
+ unlikely((yyval.cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 32018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 356: /* condition_information: condition_information ',' condition_information_item */
+#line 3707 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-2].cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.cond_info_list)= (yyvsp[-2].cond_info_list);
+ }
+#line 32028 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 357: /* condition_information_item: simple_target_specification '=' condition_information_item_name */
+#line 3716 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.cond_info_item)= new (thd->mem_root) Condition_information_item((yyvsp[0].cond_info_item_name), (yyvsp[-2].item));
+ if (unlikely((yyval.cond_info_item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 32038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 358: /* condition_information_item_name: CLASS_ORIGIN_SYM */
+#line 3725 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CLASS_ORIGIN; }
+#line 32044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 359: /* condition_information_item_name: SUBCLASS_ORIGIN_SYM */
+#line 3727 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::SUBCLASS_ORIGIN; }
+#line 32050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 360: /* condition_information_item_name: CONSTRAINT_CATALOG_SYM */
+#line 3729 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_CATALOG; }
+#line 32056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 361: /* condition_information_item_name: CONSTRAINT_SCHEMA_SYM */
+#line 3731 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_SCHEMA; }
+#line 32062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 362: /* condition_information_item_name: CONSTRAINT_NAME_SYM */
+#line 3733 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_NAME; }
+#line 32068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 363: /* condition_information_item_name: CATALOG_NAME_SYM */
+#line 3735 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CATALOG_NAME; }
+#line 32074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 364: /* condition_information_item_name: SCHEMA_NAME_SYM */
+#line 3737 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::SCHEMA_NAME; }
+#line 32080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 365: /* condition_information_item_name: TABLE_NAME_SYM */
+#line 3739 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::TABLE_NAME; }
+#line 32086 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 366: /* condition_information_item_name: COLUMN_NAME_SYM */
+#line 3741 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::COLUMN_NAME; }
+#line 32092 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 367: /* condition_information_item_name: CURSOR_NAME_SYM */
+#line 3743 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CURSOR_NAME; }
+#line 32098 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 368: /* condition_information_item_name: MESSAGE_TEXT_SYM */
+#line 3745 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::MESSAGE_TEXT; }
+#line 32104 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 369: /* condition_information_item_name: MYSQL_ERRNO_SYM */
+#line 3747 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::MYSQL_ERRNO; }
+#line 32110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 370: /* condition_information_item_name: RETURNED_SQLSTATE_SYM */
+#line 3749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::RETURNED_SQLSTATE; }
+#line 32116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 371: /* condition_information_item_name: ROW_NUMBER_SYM */
+#line 3751 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::ROW_NUMBER; }
+#line 32122 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 373: /* sp_decl_ident: keyword_sp_decl */
+#line 3757 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_ident_cli(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 32131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 374: /* sp_decl_idents: sp_decl_ident */
+#line 3765 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* NOTE: field definition is filled in sp_decl section. */
+
+ LEX *lex= Lex;
+ sp_pcontext *spc= lex->spcont;
+
+ if (unlikely(spc->find_variable(&(yyvsp[0].ident_sys), TRUE)))
+ my_yyabort_error((ER_SP_DUP_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+ spc->add_variable(thd, &(yyvsp[0].ident_sys));
+ (yyval.num)= 1;
+ }
+#line 32147 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 375: /* sp_decl_idents: sp_decl_idents ',' ident */
+#line 3777 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* NOTE: field definition is filled in sp_decl section. */
+
+ LEX *lex= Lex;
+ sp_pcontext *spc= lex->spcont;
+
+ if (unlikely(spc->find_variable(&(yyvsp[0].ident_sys), TRUE)))
+ my_yyabort_error((ER_SP_DUP_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+ spc->add_variable(thd, &(yyvsp[0].ident_sys));
+ (yyval.num)= (yyvsp[-2].num) + 1;
+ }
+#line 32163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 376: /* $@37: %empty */
+#line 3792 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sphead->new_cont_backpatch(NULL);
+ }
+#line 32173 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 377: /* sp_proc_stmt_if: IF_SYM $@37 sp_if END IF_SYM */
+#line 3798 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sphead->do_cont_backpatch(); }
+#line 32179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 378: /* $@38: %empty */
+#line 3802 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ 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();
+ }
+#line 32196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 379: /* sp_proc_stmt_statement: $@38 sp_statement */
+#line 3815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->sp_proc_stmt_statement_finalize(thd, yychar == YYEMPTY) ||
+ Lex->sphead->restore_lex(thd))
+ MYSQL_YYABORT;
+ }
+#line 32206 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 382: /* $@39: %empty */
+#line 3830 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_head *sp= (yyvsp[0].expr_lex)->sphead;
+ if (unlikely(sp->m_handler->add_instr_freturn(thd, sp, (yyvsp[0].expr_lex)->spcont,
+ (yyvsp[0].expr_lex)->get_item(), (yyvsp[0].expr_lex))))
+ MYSQL_YYABORT;
+ }
+#line 32217 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 383: /* sp_proc_stmt_return: RETURN_ALLMODES_SYM expr_lex $@39 */
+#line 3836 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 32223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 384: /* sp_proc_stmt_return: RETURN_ORACLE_SYM */
+#line 3838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ if (unlikely(sp->m_handler->add_instr_preturn(thd, sp,
+ lex->spcont)))
+ MYSQL_YYABORT;
+ }
+#line 32235 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 385: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM */
+#line 3849 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_exit_statement(thd, NULL)))
+ MYSQL_YYABORT;
+ }
+#line 32244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 386: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM label_ident */
+#line 3854 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_exit_statement(thd, &(yyvsp[0].ident_sys), NULL)))
+ MYSQL_YYABORT;
+ }
+#line 32253 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 387: /* $@40: %empty */
+#line 3859 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_exit_statement(thd, (yyvsp[0].expr_lex)->get_item())))
+ MYSQL_YYABORT;
+ }
+#line 32262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 388: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM WHEN_SYM expr_lex $@40 */
+#line 3863 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 32268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 389: /* $@41: %empty */
+#line 3865 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_exit_statement(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].expr_lex)->get_item())))
+ MYSQL_YYABORT;
+ }
+#line 32277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 390: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM label_ident WHEN_SYM expr_lex $@41 */
+#line 3869 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 32283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 391: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM */
+#line 3874 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_continue_statement(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 392: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM label_ident */
+#line 3879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_continue_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 393: /* $@42: %empty */
+#line 3884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_continue_when_statement(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 394: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM WHEN_SYM expr_lex $@42 */
+#line 3888 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 32316 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 395: /* $@43: %empty */
+#line 3890 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_continue_when_statement(thd, &(yyvsp[-2].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 396: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM label_ident WHEN_SYM expr_lex $@43 */
+#line 3894 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 32331 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 397: /* sp_proc_stmt_leave: LEAVE_SYM label_ident */
+#line 3900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_leave_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 398: /* sp_proc_stmt_iterate: ITERATE_SYM label_ident */
+#line 3908 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_iterate_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 399: /* sp_proc_stmt_goto_oracle: GOTO_ORACLE_SYM label_ident */
+#line 3916 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_goto_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32358 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 400: /* @44: %empty */
+#line 3924 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->sphead);
+ if (unlikely(!((yyval.expr_lex)= new (thd->mem_root)
+ sp_expr_lex(thd, thd->lex))))
+ MYSQL_YYABORT;
+ Lex->sphead->reset_lex(thd, (yyval.expr_lex));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 32372 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 401: /* expr_lex: @44 expr */
+#line 3934 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.expr_lex)= (yyvsp[-1].expr_lex);
+ (yyval.expr_lex)->set_item((yyvsp[0].item));
+ Lex->pop_select(); //min select
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ if ((yyval.expr_lex)->sphead->restore_lex(thd))
+ MYSQL_YYABORT;
+ }
+#line 32386 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 402: /* assignment_source_lex: %empty */
+#line 3947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->sphead);
+ if (unlikely(!((yyval.assignment_lex)= new (thd->mem_root)
+ sp_assignment_lex(thd, thd->lex))))
+ MYSQL_YYABORT;
+ }
+#line 32397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 403: /* $@45: %empty */
+#line 3957 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(thd->free_list == NULL);
+ Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 32408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 404: /* assignment_source_expr: assignment_source_lex $@45 expr */
+#line 3964 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-2].assignment_lex) == thd->lex);
+ (yyval.assignment_lex)= (yyvsp[-2].assignment_lex);
+ (yyval.assignment_lex)->set_item_and_free_list((yyvsp[0].item), thd->free_list);
+ thd->free_list= NULL;
+ Lex->pop_select(); //min select
+ if ((yyval.assignment_lex)->sphead->restore_lex(thd))
+ MYSQL_YYABORT;
+ }
+#line 32422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 405: /* $@46: %empty */
+#line 3977 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ Lex->current_select->parsing_place= FOR_LOOP_BOUND;
+ }
+#line 32433 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 406: /* for_loop_bound_expr: assignment_source_lex $@46 expr */
+#line 3984 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-2].assignment_lex) == thd->lex);
+ (yyval.assignment_lex)= (yyvsp[-2].assignment_lex);
+ (yyval.assignment_lex)->set_item_and_free_list((yyvsp[0].item), NULL);
+ Lex->pop_select(); //main select
+ if (unlikely((yyval.assignment_lex)->sphead->restore_lex(thd)))
+ MYSQL_YYABORT;
+ Lex->current_select->parsing_place= NO_MATTER;
+ }
+#line 32447 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 407: /* cursor_actual_parameters: assignment_source_expr */
+#line 3997 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.sp_assignment_lex_list)= new (thd->mem_root) List<sp_assignment_lex>)))
+ MYSQL_YYABORT;
+ (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
+ }
+#line 32457 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 408: /* cursor_actual_parameters: cursor_actual_parameters ',' assignment_source_expr */
+#line 4003 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.sp_assignment_lex_list)= (yyvsp[-2].sp_assignment_lex_list);
+ (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
+ }
+#line 32466 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 409: /* opt_parenthesized_cursor_actual_parameters: %empty */
+#line 4010 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_assignment_lex_list)= NULL; }
+#line 32472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 410: /* opt_parenthesized_cursor_actual_parameters: '(' cursor_actual_parameters ')' */
+#line 4011 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
+#line 32478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 414: /* sp_proc_stmt_open: OPEN_SYM ident opt_parenthesized_cursor_actual_parameters */
+#line 4022 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_open_cursor(thd, &(yyvsp[-1].ident_sys), (yyvsp[0].sp_assignment_lex_list))))
+ MYSQL_YYABORT;
+ }
+#line 32487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 415: /* sp_proc_stmt_fetch_head: FETCH_SYM ident INTO */
+#line 4030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 416: /* sp_proc_stmt_fetch_head: FETCH_SYM FROM ident INTO */
+#line 4035 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 417: /* sp_proc_stmt_fetch_head: FETCH_SYM NEXT_SYM FROM ident INTO */
+#line 4040 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 32514 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 418: /* sp_proc_stmt_fetch: sp_proc_stmt_fetch_head sp_fetch_list */
+#line 4047 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32520 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 419: /* sp_proc_stmt_fetch: FETCH_SYM GROUP_SYM NEXT_SYM ROW_SYM */
+#line 4049 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_agg_cfetch()))
+ MYSQL_YYABORT;
+ }
+#line 32529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 420: /* sp_proc_stmt_close: CLOSE_SYM ident */
+#line 4057 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ uint offset;
+ sp_instr_cclose *i;
+
+ if (unlikely(!lex->spcont->find_cursor(&(yyvsp[0].ident_sys), &offset, false)))
+ my_yyabort_error((ER_SP_CURSOR_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
+ i= new (thd->mem_root)
+ sp_instr_cclose(sp->instructions(), lex->spcont, offset);
+ if (unlikely(i == NULL) ||
+ unlikely(sp->add_instr(i)))
+ MYSQL_YYABORT;
+ }
+#line 32548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 421: /* sp_fetch_list: ident */
+#line 4075 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ sp_pcontext *spc= lex->spcont;
+ sp_variable *spv= likely(spc != NULL)
+ ? spc->find_variable(&(yyvsp[0].ident_sys), false)
+ : NULL;
+
+ if (unlikely(!spv))
+ my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+
+ /* An SP local variable */
+ sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
+ i->add_to_varlist(spv);
+ }
+#line 32568 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 422: /* sp_fetch_list: sp_fetch_list ',' ident */
+#line 4091 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ sp_pcontext *spc= lex->spcont;
+ sp_variable *spv= likely(spc != NULL)
+ ? spc->find_variable(&(yyvsp[0].ident_sys), false)
+ : NULL;
+
+ if (unlikely(!spv))
+ my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+
+ /* An SP local variable */
+ sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
+ i->add_to_varlist(spv);
+ }
+#line 32588 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 423: /* $@47: %empty */
+#line 4110 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-1].expr_lex)->sp_if_expr(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 424: /* $@48: %empty */
+#line 4115 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-3].expr_lex)->sp_if_after_statements(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32606 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 425: /* sp_if: expr_lex THEN_SYM $@47 sp_if_then_statements $@48 sp_elseifs */
+#line 4120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ lex->sphead->backpatch(lex->spcont->pop_label());
+ }
+#line 32616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 430: /* $@49: %empty */
+#line 4136 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+
+ /**
+ An example of the CASE statement in use is
+ <pre>
+ CREATE PROCEDURE proc_19194_simple(i int)
+ BEGIN
+ DECLARE str CHAR(10);
+
+ CASE i
+ WHEN 1 THEN SET str="1";
+ WHEN 2 THEN SET str="2";
+ WHEN 3 THEN SET str="3";
+ ELSE SET str="unknown";
+ END CASE;
+
+ SELECT str;
+ END
+ </pre>
+ The actions are used to generate the following code:
+ <pre>
+ SHOW PROCEDURE CODE proc_19194_simple;
+ Pos Instruction
+ 0 set str@1 NULL
+ 1 set_case_expr (12) 0 i@0
+ 2 jump_if_not 5(12) (case_expr@0 = 1)
+ 3 set str@1 _latin1'1'
+ 4 jump 12
+ 5 jump_if_not 8(12) (case_expr@0 = 2)
+ 6 set str@1 _latin1'2'
+ 7 jump 12
+ 8 jump_if_not 11(12) (case_expr@0 = 3)
+ 9 set str@1 _latin1'3'
+ 10 jump 12
+ 11 set str@1 _latin1'unknown'
+ 12 stmt 0 "SELECT str"
+ </pre>
+ */
+
+ Lex->sphead->new_cont_backpatch(NULL);
+
+ /*
+ BACKPATCH: Creating target label for the jump to after END CASE
+ (instruction 12 in the example)
+ */
+ Lex->spcont->push_label(thd, &empty_clex_str, Lex->sphead->instructions());
+ }
+#line 32670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 431: /* case_stmt_specification: CASE_SYM $@49 case_stmt_body else_clause_opt END CASE_SYM */
+#line 4189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ BACKPATCH: Resolving forward jump from
+ "case_stmt_action_then" to after END CASE
+ (jump from instruction 4 to 12, 7 to 12 ... in the example)
+ */
+ Lex->sphead->backpatch(Lex->spcont->pop_label());
+
+ if ((yyvsp[-3].num))
+ Lex->spcont->pop_case_expr_id();
+
+ Lex->sphead->do_cont_backpatch();
+ }
+#line 32688 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 432: /* $@50: %empty */
+#line 4206 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_expr()))
+ MYSQL_YYABORT;
+ }
+#line 32697 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 433: /* case_stmt_body: expr_lex $@50 simple_when_clause_list */
+#line 4211 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 32703 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 434: /* case_stmt_body: searched_when_clause_list */
+#line 4213 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 32709 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 439: /* $@51: %empty */
+#line 4228 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Simple case: <caseval> = <whenval> */
+ if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(true)))
+ MYSQL_YYABORT;
+ }
+#line 32719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 440: /* simple_when_clause: WHEN_SYM expr_lex $@51 THEN_SYM sp_case_then_statements */
+#line 4235 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->case_stmt_action_then()))
+ MYSQL_YYABORT;
+ }
+#line 32728 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 441: /* $@52: %empty */
+#line 4243 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(false)))
+ MYSQL_YYABORT;
+ }
+#line 32737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 442: /* searched_when_clause: WHEN_SYM expr_lex $@52 THEN_SYM sp_case_then_statements */
+#line 4249 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->case_stmt_action_then()))
+ MYSQL_YYABORT;
+ }
+#line 32746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 443: /* else_clause_opt: %empty */
+#line 4257 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ uint ip= sp->instructions();
+ sp_instr_error *i= new (thd->mem_root)
+ sp_instr_error(ip, lex->spcont, ER_SP_CASE_NOT_FOUND);
+ if (unlikely(i == NULL) ||
+ unlikely(sp->add_instr(i)))
+ MYSQL_YYABORT;
+ }
+#line 32761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 445: /* sp_opt_label: %empty */
+#line 4271 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 32767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 446: /* sp_opt_label: label_ident */
+#line 4272 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 32773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 447: /* opt_sp_for_loop_direction: %empty */
+#line 4277 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 32779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 448: /* opt_sp_for_loop_direction: REVERSE_SYM */
+#line 4278 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= -1; }
+#line 32785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 449: /* sp_for_loop_index_and_bounds: ident_for_loop_index sp_for_loop_bounds */
+#line 4283 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_declarations(thd, &(yyval.for_loop), &(yyvsp[-1].ident_sys), (yyvsp[0].for_loop_bounds))))
+ MYSQL_YYABORT;
+ }
+#line 32794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 450: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr DOT_DOT_SYM for_loop_bound_expr */
+#line 4292 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.for_loop_bounds)= Lex_for_loop_bounds_intrange((yyvsp[-3].num), (yyvsp[-2].assignment_lex), (yyvsp[0].assignment_lex));
+ }
+#line 32802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 451: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr */
+#line 4296 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.for_loop_bounds).m_direction= (yyvsp[-1].num);
+ (yyval.for_loop_bounds).m_index= (yyvsp[0].assignment_lex);
+ (yyval.for_loop_bounds).m_target_bound= NULL;
+ (yyval.for_loop_bounds).m_implicit_cursor= false;
+ }
+#line 32813 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 452: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction '(' sp_cursor_stmt ')' */
+#line 4303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_implicit_cursor_statement(thd, &(yyval.for_loop_bounds),
+ (yyvsp[-1].sp_cursor_stmt))))
+ MYSQL_YYABORT;
+ }
+#line 32823 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 453: /* loop_body: sp_proc_stmts1 END LOOP_SYM */
+#line 4312 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ uint ip= lex->sphead->instructions();
+ sp_label *lab= lex->spcont->last_label(); /* Jumping back */
+ sp_instr_jump *i= new (thd->mem_root)
+ sp_instr_jump(ip, lex->spcont, lab->ip);
+ if (unlikely(i == NULL) ||
+ unlikely(lex->sphead->add_instr(i)))
+ MYSQL_YYABORT;
+ }
+#line 32838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 454: /* repeat_body: sp_proc_stmts1 UNTIL_SYM expr_lex END REPEAT_SYM */
+#line 4326 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-2].expr_lex)->sp_repeat_loop_finalize(thd))
+ MYSQL_YYABORT;
+ }
+#line 32847 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 455: /* pop_sp_loop_label: sp_opt_label */
+#line 4334 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 456: /* $@53: %empty */
+#line 4342 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32865 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 457: /* sp_labeled_control: sp_control_label LOOP_SYM $@53 loop_body pop_sp_loop_label */
+#line 4347 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32871 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 458: /* $@54: %empty */
+#line 4349 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 459: /* sp_labeled_control: sp_control_label WHILE_SYM $@54 while_body pop_sp_loop_label */
+#line 4354 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32886 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 460: /* $@55: %empty */
+#line 4356 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ // See "The FOR LOOP statement" comments in sql_lex.cc
+ Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
+ }
+#line 32895 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 461: /* $@56: %empty */
+#line 4361 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-3].lex_str)))) // The inner WHILE block
+ MYSQL_YYABORT;
+ if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 462: /* $@57: %empty */
+#line 4368 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 463: /* sp_labeled_control: sp_control_label FOR_SYM $@55 sp_for_loop_index_and_bounds $@56 for_loop_statements $@57 pop_sp_loop_label */
+#line 4373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-4].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 464: /* $@58: %empty */
+#line 4378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 465: /* sp_labeled_control: sp_control_label REPEAT_SYM $@58 repeat_body pop_sp_loop_label */
+#line 4383 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32939 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 466: /* $@59: %empty */
+#line 4388 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32948 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 467: /* sp_unlabeled_control: LOOP_SYM $@59 loop_body */
+#line 4393 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_pop_loop_empty_label(thd);
+ }
+#line 32956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 468: /* $@60: %empty */
+#line 4397 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 469: /* sp_unlabeled_control: WHILE_SYM $@60 while_body */
+#line 4402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_pop_loop_empty_label(thd);
+ }
+#line 32973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 470: /* $@61: %empty */
+#line 4406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ // See "The FOR LOOP statement" comments in sql_lex.cc
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
+ }
+#line 32984 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 471: /* $@62: %empty */
+#line 4413 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd))) // The inner WHILE block
+ MYSQL_YYABORT;
+ if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32995 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 472: /* sp_unlabeled_control: FOR_SYM $@61 sp_for_loop_index_and_bounds $@62 for_loop_statements */
+#line 4420 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
+ MYSQL_YYABORT;
+ Lex->sp_pop_loop_empty_label(thd); // The inner WHILE block
+ if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-2].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 33007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 473: /* $@63: %empty */
+#line 4428 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33016 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 474: /* sp_unlabeled_control: REPEAT_SYM $@63 repeat_body */
+#line 4433 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_pop_loop_empty_label(thd);
+ }
+#line 33024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 475: /* trg_action_time: BEFORE_SYM */
+#line 4440 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
+#line 33030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 476: /* trg_action_time: AFTER_SYM */
+#line 4442 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
+#line 33036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 477: /* trg_event: INSERT */
+#line 4447 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.event= TRG_EVENT_INSERT; }
+#line 33042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 478: /* trg_event: UPDATE_SYM */
+#line 4449 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
+#line 33048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 479: /* trg_event: DELETE_SYM */
+#line 4451 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.event= TRG_EVENT_DELETE; }
+#line 33054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 480: /* $@64: %empty */
+#line 4456 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->create_info.option_list= NULL; }
+#line 33060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 481: /* create_body: create_field_list_parens $@64 opt_create_table_options opt_create_partitioning opt_create_select */
+#line 4457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 482: /* create_body: opt_create_table_options opt_create_partitioning opt_create_select */
+#line 4458 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33072 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 483: /* create_body: create_like */
+#line 4460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+
+ Lex->create_info.add(DDL_options_st::OPT_LIKE);
+ TABLE_LIST *src_table= Lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, 0, TL_READ, MDL_SHARED_READ);
+ if (unlikely(! src_table))
+ MYSQL_YYABORT;
+ /* CREATE TABLE ... LIKE is not allowed for views. */
+ src_table->required_type= TABLE_TYPE_NORMAL;
+ }
+#line 33087 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 484: /* create_like: LIKE table_ident */
+#line 4473 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table)= (yyvsp[0].table); }
+#line 33093 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 485: /* create_like: LEFT_PAREN_LIKE LIKE table_ident ')' */
+#line 4474 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table)= (yyvsp[-1].table); }
+#line 33099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 486: /* opt_create_select: %empty */
+#line 4478 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 487: /* opt_create_select: opt_duplicate opt_as create_select_query_expression opt_versioning_option */
+#line 4481 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.add(DDL_options_st::OPT_CREATE_SELECT);
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 33115 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 488: /* create_select_query_expression: query_expression */
+#line 4490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->parsed_insert_select((yyvsp[0].select_lex_unit)->first_select()))
+ MYSQL_YYABORT;
+ }
+#line 33124 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 489: /* create_select_query_expression: LEFT_PAREN_WITH with_clause query_expression_no_with_clause ')' */
+#line 4495 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *first_select= (yyvsp[-1].select_lex_unit)->first_select();
+ (yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
+ (yyvsp[-2].with_clause)->attach_to(first_select);
+ if (Lex->parsed_insert_select(first_select))
+ MYSQL_YYABORT;
+ }
+#line 33136 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 490: /* opt_create_partitioning: opt_partitioning */
+#line 4506 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Remove all tables used in PARTITION clause from the global table
+ list. Partitioning with subqueries is not allowed anyway.
+ */
+ TABLE_LIST *last_non_sel_table= Lex->create_last_non_select_table;
+ last_non_sel_table->next_global= 0;
+ Lex->query_tables_last= &last_non_sel_table->next_global;
+ }
+#line 33150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 491: /* opt_partitioning: %empty */
+#line 4542 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 493: /* $@65: %empty */
+#line 4548 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+ if (lex->sql_command == SQLCOM_ALTER_TABLE)
+ {
+ lex->alter_info.partition_flags|= ALTER_PARTITION_INFO;
+ }
+ }
+#line 33171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 495: /* have_partitioning: %empty */
+#line 4563 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ LEX_CSTRING partition_name={STRING_WITH_LEN("partition")};
+ if (unlikely(!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN)))
+ my_yyabort_error((ER_OPTION_PREVENTS_STATEMENT, MYF(0),
+ "--skip-partition"));
+#else
+ my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), "partitioning",
+ "--with-plugin-partition"));
+#endif
+ }
+#line 33187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 496: /* $@66: %empty */
+#line 4578 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Lex->part_info))
+ {
+ thd->parse_error(ER_PARTITION_ENTRY_ERROR);
+ MYSQL_YYABORT;
+ }
+ 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.
+ */
+ }
+#line 33205 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 497: /* partition_entry: PARTITION_SYM $@66 partition */
+#line 4592 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 33213 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 498: /* $@67: %empty */
+#line 4599 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->safe_to_cache_query= 1; }
+#line 33219 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 500: /* part_type_def: opt_linear KEY_SYM opt_key_algo '(' part_field_list ')' */
+#line 4605 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->list_of_part_fields= TRUE;
+ part_info->column_list= FALSE;
+ part_info->part_type= HASH_PARTITION;
+ }
+#line 33230 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 501: /* $@68: %empty */
+#line 4612 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= HASH_PARTITION; }
+#line 33236 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 502: /* part_type_def: opt_linear HASH_SYM $@68 part_func */
+#line 4613 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 503: /* part_type_def: RANGE_SYM part_func */
+#line 4615 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= RANGE_PARTITION; }
+#line 33248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 504: /* part_type_def: RANGE_SYM part_column_list */
+#line 4617 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= RANGE_PARTITION; }
+#line 33254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 505: /* $@69: %empty */
+#line 4619 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_PART_FUNC;
+ }
+#line 33262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 506: /* part_type_def: LIST_SYM $@69 part_func */
+#line 4623 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->part_info->part_type= LIST_PARTITION;
+ Select->parsing_place= NO_MATTER;
+ }
+#line 33271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 507: /* part_type_def: LIST_SYM part_column_list */
+#line 4628 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= LIST_PARTITION; }
+#line 33277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 508: /* $@70: %empty */
+#line 4630 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->part_info->vers_init_info(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 510: /* opt_linear: %empty */
+#line 4638 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 511: /* opt_linear: LINEAR_SYM */
+#line 4640 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->linear_hash_ind= TRUE;}
+#line 33298 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 512: /* opt_key_algo: %empty */
+#line 4645 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
+#line 33304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 513: /* opt_key_algo: ALGORITHM_SYM '=' real_ulong_num */
+#line 4647 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch ((yyvsp[0].ulong_num)) {
+ case 1:
+ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_51;
+ break;
+ case 2:
+ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_55;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 33322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 514: /* part_field_list: %empty */
+#line 4663 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 515: /* part_field_list: part_field_item_list */
+#line 4664 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 516: /* part_field_item_list: part_field_item */
+#line 4668 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 517: /* part_field_item_list: part_field_item_list ',' part_field_item */
+#line 4669 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 518: /* part_field_item: ident */
+#line 4674 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->num_columns++;
+ if (unlikely(part_info->part_field_list.push_back((yyvsp[0].ident_sys).str,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->num_columns > MAX_REF_PARTS))
+ my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
+ "list of partition fields"));
+ }
+#line 33361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 519: /* part_column_list: COLUMNS '(' part_field_list ')' */
+#line 4688 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->column_list= TRUE;
+ part_info->list_of_part_fields= TRUE;
+ }
+#line 33371 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 520: /* part_func: '(' part_func_expr ')' */
+#line 4698 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->set_part_expr(thd, (yyvsp[-1].item), FALSE)))
+ MYSQL_YYABORT;
+ part_info->num_columns= 1;
+ part_info->column_list= FALSE;
+ }
+#line 33383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 521: /* sub_part_func: '(' part_func_expr ')' */
+#line 4709 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
+ MYSQL_YYABORT;
+ }
+#line 33392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 522: /* opt_num_parts: %empty */
+#line 4717 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33398 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 523: /* opt_num_parts: PARTITIONS_SYM real_ulong_num */
+#line 4719 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint num_parts= (yyvsp[0].ulong_num);
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(num_parts == 0))
+ my_yyabort_error((ER_NO_PARTS_ERROR, MYF(0), "partitions"));
+
+ part_info->num_parts= num_parts;
+ part_info->use_default_num_partitions= FALSE;
+ }
+#line 33412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 524: /* opt_sub_part: %empty */
+#line 4731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33418 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 525: /* $@71: %empty */
+#line 4733 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->subpart_type= HASH_PARTITION; }
+#line 33424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 526: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear HASH_SYM sub_part_func $@71 opt_num_subparts */
+#line 4734 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 527: /* $@72: %empty */
+#line 4737 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->subpart_type= HASH_PARTITION;
+ part_info->list_of_subpart_fields= TRUE;
+ }
+#line 33440 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 528: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear KEY_SYM opt_key_algo '(' sub_part_field_list ')' $@72 opt_num_subparts */
+#line 4742 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 529: /* sub_part_field_list: sub_part_field_item */
+#line 4746 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33452 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 530: /* sub_part_field_list: sub_part_field_list ',' sub_part_field_item */
+#line 4747 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33458 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 531: /* sub_part_field_item: ident */
+#line 4752 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->subpart_field_list.push_back((yyvsp[0].ident_sys).str,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+
+ if (unlikely(part_info->subpart_field_list.elements > MAX_REF_PARTS))
+ my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
+ "list of subpartition fields"));
+ }
+#line 33473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 532: /* part_func_expr: bit_expr */
+#line 4766 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Lex->safe_to_cache_query))
+ {
+ thd->parse_error(ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR);
+ MYSQL_YYABORT;
+ }
+ (yyval.item)=(yyvsp[0].item);
+ }
+#line 33486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 533: /* opt_num_subparts: %empty */
+#line 4777 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33492 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 534: /* opt_num_subparts: SUBPARTITIONS_SYM real_ulong_num */
+#line 4779 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint num_parts= (yyvsp[0].ulong_num);
+ LEX *lex= Lex;
+ if (unlikely(num_parts == 0))
+ my_yyabort_error((ER_NO_PARTS_ERROR, MYF(0), "subpartitions"));
+ lex->part_info->num_subparts= num_parts;
+ lex->part_info->use_default_num_subpartitions= FALSE;
+ }
+#line 33505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 535: /* part_defs: %empty */
+#line 4791 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->part_type == RANGE_PARTITION))
+ my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
+ "RANGE"));
+ if (unlikely(part_info->part_type == LIST_PARTITION))
+ my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
+ "LIST"));
+ }
+#line 33519 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 536: /* part_defs: '(' part_def_list ')' */
+#line 4801 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ uint count_curr_parts= part_info->partitions.elements;
+ if (part_info->num_parts != 0)
+ {
+ if (unlikely(part_info->num_parts !=
+ count_curr_parts))
+ {
+ thd->parse_error(ER_PARTITION_WRONG_NO_PART_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+ else if (count_curr_parts > 0)
+ {
+ part_info->num_parts= count_curr_parts;
+ }
+ part_info->count_curr_subparts= 0;
+ }
+#line 33542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 537: /* part_def_list: part_definition */
+#line 4822 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 538: /* part_def_list: part_def_list ',' part_definition */
+#line 4823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33554 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 541: /* $@73: %empty */
+#line 4833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ partition_element *p_elem= new (thd->mem_root) partition_element();
+
+ if (unlikely(!p_elem) ||
+ unlikely(part_info->partitions.push_back(p_elem, thd->mem_root)))
+ MYSQL_YYABORT;
+
+ p_elem->part_state= PART_NORMAL;
+ p_elem->id= part_info->partitions.elements - 1;
+ part_info->curr_part_elem= p_elem;
+ part_info->current_partition= p_elem;
+ part_info->use_default_partitions= FALSE;
+ part_info->use_default_num_partitions= FALSE;
+ }
+#line 33574 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 542: /* part_definition: opt_partition $@73 part_name opt_part_values opt_part_options opt_sub_partition */
+#line 4852 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 543: /* part_name: ident */
+#line 4857 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ partition_element *p_elem= part_info->curr_part_elem;
+ if (unlikely(check_ident_length(&(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ p_elem->partition_name= (yyvsp[0].ident_sys).str;
+ }
+#line 33592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 544: /* opt_part_values: %empty */
+#line 4868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->error_if_requires_values()))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->part_type == VERSIONING_PARTITION))
+ my_yyabort_error((ER_VERS_WRONG_PARTS, MYF(0),
+ lex->create_last_non_select_table->
+ table_name.str));
+ }
+ else
+ part_info->part_type= HASH_PARTITION;
+ }
+#line 33612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 545: /* $@74: %empty */
+#line 4884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->part_type != RANGE_PARTITION))
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "RANGE", "LESS THAN"));
+ }
+ else
+ part_info->part_type= RANGE_PARTITION;
+ }
+#line 33629 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 546: /* opt_part_values: VALUES_LESS_SYM THAN_SYM $@74 part_func_max */
+#line 4896 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 547: /* $@75: %empty */
+#line 4898 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->part_type != LIST_PARTITION))
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "LIST", "IN"));
+ }
+ else
+ part_info->part_type= LIST_PARTITION;
+ }
+#line 33652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 548: /* opt_part_values: VALUES_IN_SYM $@75 part_values_in */
+#line 4910 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33658 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 549: /* opt_part_values: CURRENT_SYM */
+#line 4912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (Lex->part_values_current(thd))
+ MYSQL_YYABORT;
+#endif
+ }
+#line 33669 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 550: /* opt_part_values: HISTORY_SYM */
+#line 4919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (Lex->part_values_history(thd))
+ MYSQL_YYABORT;
+#endif
+ }
+#line 33680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 551: /* opt_part_values: DEFAULT */
+#line 4926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->part_type != LIST_PARTITION))
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "LIST", "DEFAULT"));
+ }
+ else
+ part_info->part_type= LIST_PARTITION;
+ if (unlikely(part_info->init_column_part(thd)))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->add_max_value(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 552: /* part_func_max: MAXVALUE_SYM */
+#line 4946 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+
+ if (unlikely(part_info->num_columns &&
+ part_info->num_columns != 1U))
+ {
+ part_info->print_debug("Kilroy II", NULL);
+ thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
+ MYSQL_YYABORT;
+ }
+ else
+ part_info->num_columns= 1U;
+ if (unlikely(part_info->init_column_part(thd)))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->add_max_value(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33723 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 553: /* part_func_max: part_value_item */
+#line 4963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33729 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 554: /* part_values_in: part_value_item */
+#line 4968 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ part_info->print_debug("part_values_in: part_value_item", NULL);
+
+ if (part_info->num_columns != 1U)
+ {
+ if (unlikely(!lex->is_partition_management() ||
+ part_info->num_columns == 0 ||
+ part_info->num_columns > MAX_REF_PARTS))
+ {
+ part_info->print_debug("Kilroy III", NULL);
+ thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
+ MYSQL_YYABORT;
+ }
+ /*
+ Reorganize the current large array into a list of small
+ arrays with one entry in each array. This can happen
+ in the first partition of an ALTER TABLE statement where
+ we ADD or REORGANIZE partitions. Also can only happen
+ for LIST partitions.
+ */
+ if (unlikely(part_info->reorganize_into_single_field_col_val(thd)))
+ MYSQL_YYABORT;
+ }
+ }
+#line 33760 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 555: /* part_values_in: '(' part_value_list ')' */
+#line 4995 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->num_columns < 2U))
+ {
+ thd->parse_error(ER_ROW_SINGLE_PARTITION_FIELD_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+#line 33773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 556: /* part_value_list: part_value_item */
+#line 5006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 557: /* part_value_list: part_value_list ',' part_value_item */
+#line 5007 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 558: /* $@76: %empty */
+#line 5012 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->print_debug("( part_value_item", NULL);
+ /* Initialisation code needed for each list of value expressions */
+ if (unlikely(!(part_info->part_type == LIST_PARTITION &&
+ part_info->num_columns == 1U) &&
+ part_info->init_column_part(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 559: /* $@77: %empty */
+#line 5021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 560: /* part_value_item: '(' $@76 part_value_item_list $@77 ')' */
+#line 5023 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->print_debug(") part_value_item", NULL);
+ if (part_info->num_columns == 0)
+ part_info->num_columns= part_info->curr_list_object;
+ if (unlikely(part_info->num_columns != part_info->curr_list_object))
+ {
+ /*
+ All value items lists must be of equal length, in some cases
+ which is covered by the above if-statement we don't know yet
+ how many columns is in the partition so the assignment above
+ ensures that we only report errors when we know we have an
+ error.
+ */
+ part_info->print_debug("Kilroy I", NULL);
+ thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
+ MYSQL_YYABORT;
+ }
+ part_info->curr_list_object= 0;
+ }
+#line 33830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 561: /* part_value_item_list: part_value_expr_item */
+#line 5046 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33836 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 562: /* part_value_item_list: part_value_item_list ',' part_value_expr_item */
+#line 5047 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 563: /* part_value_expr_item: MAXVALUE_SYM */
+#line 5052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->part_type == LIST_PARTITION))
+ {
+ thd->parse_error(ER_MAXVALUE_IN_VALUES_IN);
+ MYSQL_YYABORT;
+ }
+ if (unlikely(part_info->add_max_value(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 564: /* part_value_expr_item: bit_expr */
+#line 5063 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ Item *part_expr= (yyvsp[0].item);
+
+ if (unlikely(!lex->safe_to_cache_query))
+ {
+ thd->parse_error(ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR);
+ MYSQL_YYABORT;
+ }
+ if (unlikely(part_info->add_column_list_value(thd, part_expr)))
+ MYSQL_YYABORT;
+ }
+#line 33875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 565: /* opt_sub_partition: %empty */
+#line 5081 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->num_subparts != 0 &&
+ !part_info->use_default_subpartitions))
+ {
+ /*
+ We come here when we have defined subpartitions on the first
+ partition but not on all the subsequent partitions.
+ */
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+#line 33893 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 566: /* opt_sub_partition: '(' sub_part_list ')' */
+#line 5095 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (part_info->num_subparts != 0)
+ {
+ if (unlikely(part_info->num_subparts !=
+ part_info->count_curr_subparts))
+ {
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+ else if (part_info->count_curr_subparts > 0)
+ {
+ if (unlikely(part_info->partitions.elements > 1))
+ {
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ part_info->num_subparts= part_info->count_curr_subparts;
+ }
+ part_info->count_curr_subparts= 0;
+ }
+#line 33920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 567: /* sub_part_list: sub_part_definition */
+#line 5120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33926 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 568: /* sub_part_list: sub_part_list ',' sub_part_definition */
+#line 5121 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33932 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 569: /* $@78: %empty */
+#line 5126 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ partition_element *curr_part= part_info->current_partition;
+ partition_element *sub_p_elem= new (thd->mem_root)
+ partition_element(curr_part);
+ if (unlikely(part_info->use_default_subpartitions &&
+ part_info->partitions.elements >= 2))
+ {
+ /*
+ create table t1 (a int)
+ partition by list (a) subpartition by hash (a)
+ (partition p0 values in (1),
+ partition p1 values in (2) subpartition sp11);
+ causes use to arrive since we are on the second
+ partition, but still use_default_subpartitions
+ is set. When we come here we're processing at least
+ the second partition (the current partition processed
+ have already been put into the partitions list.
+ */
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ if (unlikely(!sub_p_elem) ||
+ unlikely(curr_part->subpartitions.push_back(sub_p_elem, thd->mem_root)))
+ MYSQL_YYABORT;
+
+ sub_p_elem->id= curr_part->subpartitions.elements - 1;
+ part_info->curr_part_elem= sub_p_elem;
+ part_info->use_default_subpartitions= FALSE;
+ part_info->use_default_num_subpartitions= FALSE;
+ part_info->count_curr_subparts++;
+ }
+#line 33969 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 570: /* sub_part_definition: SUBPARTITION_SYM $@78 sub_name opt_subpart_options */
+#line 5158 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 571: /* sub_name: ident_or_text */
+#line 5163 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(check_ident_length(&(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str;
+ }
+#line 33985 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 572: /* opt_part_options: %empty */
+#line 5171 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 573: /* opt_part_options: part_option_list */
+#line 5172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 574: /* part_option_list: part_option_list part_option */
+#line 5176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34003 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 575: /* part_option_list: part_option */
+#line 5177 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34009 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 576: /* part_option: server_part_option */
+#line 5181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34015 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 577: /* part_option: engine_defined_option */
+#line 5183 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->part_info->curr_part_elem->option_list,
+ &Lex->option_list_last);
+ }
+#line 34024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 578: /* opt_subpart_options: %empty */
+#line 5190 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 579: /* opt_subpart_options: subpart_option_list */
+#line 5191 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 580: /* subpart_option_list: subpart_option_list server_part_option */
+#line 5195 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 581: /* subpart_option_list: server_part_option */
+#line 5196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 582: /* server_part_option: TABLESPACE opt_equal ident_or_text */
+#line 5201 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* Compatibility with MySQL */ }
+#line 34054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 583: /* server_part_option: opt_storage ENGINE_SYM opt_equal storage_engines */
+#line 5203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->curr_part_elem->engine_type= (yyvsp[0].db_type);
+ part_info->default_engine_type= (yyvsp[0].db_type);
+ }
+#line 34064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 584: /* server_part_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
+#line 5209 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info->curr_part_elem->connect_string.str= (yyvsp[0].lex_str).str;
+ lex->part_info->curr_part_elem->connect_string.length= (yyvsp[0].lex_str).length;
+ }
+#line 34074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 585: /* server_part_option: NODEGROUP_SYM opt_equal real_ulong_num */
+#line 5215 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
+#line 34080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 586: /* server_part_option: MAX_ROWS opt_equal real_ulonglong_num */
+#line 5217 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
+#line 34086 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 587: /* server_part_option: MIN_ROWS opt_equal real_ulonglong_num */
+#line 5219 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
+#line 34092 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 588: /* server_part_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5221 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; }
+#line 34098 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 589: /* server_part_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5223 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; }
+#line 34104 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 590: /* server_part_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
+#line 5225 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
+#line 34110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 591: /* opt_versioning_rotation: %empty */
+#line 5229 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 592: /* $@79: %empty */
+#line 5230 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "INTERVAL"; }
+#line 34122 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 593: /* opt_versioning_rotation: $@79 INTERVAL_SYM expr interval opt_versioning_interval_start opt_vers_auto_part */
+#line 5232 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ const char *table_name= Lex->create_last_non_select_table->table_name.str;
+ if (unlikely(part_info->vers_set_interval(thd, (yyvsp[-3].item), (yyvsp[-2].interval), (yyvsp[-1].item), (yyvsp[0].num),
+ table_name)))
+ MYSQL_YYABORT;
+ }
+#line 34134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 594: /* opt_versioning_rotation: LIMIT ulonglong_num opt_vers_auto_part */
+#line 5240 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ const char *table_name= Lex->create_last_non_select_table->table_name.str;
+ if (unlikely(part_info->vers_set_limit((yyvsp[-1].ulonglong_number), (yyvsp[0].num), table_name)))
+ MYSQL_YYABORT;
+ }
+#line 34145 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 595: /* opt_versioning_interval_start: %empty */
+#line 5251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= NULL;
+ }
+#line 34153 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 596: /* opt_versioning_interval_start: STARTS_SYM literal */
+#line 5255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 34161 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 597: /* opt_vers_auto_part: %empty */
+#line 5262 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= 0;
+ }
+#line 34169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 598: /* opt_vers_auto_part: AUTO_SYM */
+#line 5266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= 1;
+ }
+#line 34177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 599: /* opt_as: %empty */
+#line 5275 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 600: /* opt_as: AS */
+#line 5276 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34189 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 601: /* opt_create_database_options: %empty */
+#line 5280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34195 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 602: /* opt_create_database_options: create_database_options */
+#line 5281 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34201 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 603: /* create_database_options: create_database_option */
+#line 5285 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 604: /* create_database_options: create_database_options create_database_option */
+#line 5286 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34213 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 605: /* create_database_option: default_collation */
+#line 5290 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34219 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 606: /* create_database_option: default_charset */
+#line 5291 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34225 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 607: /* create_database_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
+#line 5293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
+ Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
+ }
+#line 34234 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 608: /* opt_if_not_exists_table_element: %empty */
+#line 5301 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= FALSE;
+ }
+#line 34242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 609: /* opt_if_not_exists_table_element: IF_SYM not EXISTS */
+#line 5305 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= TRUE;
+ }
+#line 34250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 610: /* opt_if_not_exists: %empty */
+#line 5312 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).init();
+ }
+#line 34258 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 611: /* opt_if_not_exists: IF_SYM not EXISTS */
+#line 5316 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
+ }
+#line 34266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 612: /* create_or_replace: CREATE */
+#line 5323 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).init();
+ }
+#line 34274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 613: /* create_or_replace: CREATE OR_SYM REPLACE */
+#line 5327 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
+ }
+#line 34282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 621: /* create_table_option: ENGINE_SYM opt_equal ident_or_text */
+#line 5350 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!lex->m_sql_cmd)
+ {
+ DBUG_ASSERT(lex->sql_command == SQLCOM_ALTER_TABLE);
+ if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table()))
+ MYSQL_YYABORT;
+ }
+ Storage_engine_name *opt=
+ lex->m_sql_cmd->option_storage_engine_name();
+ DBUG_ASSERT(opt); // Expect a proper Sql_cmd
+ *opt= Storage_engine_name((yyvsp[0].lex_str));
+ lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
+ }
+#line 34301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 622: /* create_table_option: MAX_ROWS opt_equal ulonglong_num */
+#line 5365 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.max_rows= (yyvsp[0].ulonglong_number);
+ Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;
+ }
+#line 34310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 623: /* create_table_option: MIN_ROWS opt_equal ulonglong_num */
+#line 5370 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.min_rows= (yyvsp[0].ulonglong_number);
+ Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;
+ }
+#line 34319 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 624: /* create_table_option: AVG_ROW_LENGTH opt_equal ulong_num */
+#line 5375 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.avg_row_length=(yyvsp[0].ulong_num);
+ Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;
+ }
+#line 34328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 625: /* create_table_option: PASSWORD_SYM opt_equal TEXT_STRING_sys */
+#line 5380 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.password=(yyvsp[0].lex_str).str;
+ Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD;
+ }
+#line 34337 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 626: /* create_table_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
+#line 5385 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.comment=(yyvsp[0].lex_str);
+ Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
+ }
+#line 34346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 627: /* create_table_option: AUTO_INC opt_equal ulonglong_num */
+#line 5390 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.auto_increment_value=(yyvsp[0].ulonglong_number);
+ Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;
+ }
+#line 34355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 628: /* create_table_option: PACK_KEYS_SYM opt_equal ulong_num */
+#line 5395 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch((yyvsp[0].ulong_num)) {
+ case 0:
+ Lex->create_info.table_options|= HA_OPTION_NO_PACK_KEYS;
+ break;
+ case 1:
+ Lex->create_info.table_options|= HA_OPTION_PACK_KEYS;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
+ }
+#line 34374 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 629: /* create_table_option: PACK_KEYS_SYM opt_equal DEFAULT */
+#line 5410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options&=
+ ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS);
+ Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
+ }
+#line 34384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 630: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal ulong_num */
+#line 5416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch((yyvsp[0].ulong_num)) {
+ case 0:
+ Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_OFF;
+ break;
+ case 1:
+ Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_ON;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
+ }
+#line 34403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 631: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal DEFAULT */
+#line 5431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_DEFAULT;
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
+ }
+#line 34412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 632: /* create_table_option: STATS_PERSISTENT_SYM opt_equal ulong_num */
+#line 5436 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch((yyvsp[0].ulong_num)) {
+ case 0:
+ Lex->create_info.table_options|= HA_OPTION_NO_STATS_PERSISTENT;
+ break;
+ case 1:
+ Lex->create_info.table_options|= HA_OPTION_STATS_PERSISTENT;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
+ }
+#line 34431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 633: /* create_table_option: STATS_PERSISTENT_SYM opt_equal DEFAULT */
+#line 5451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options&=
+ ~(HA_OPTION_STATS_PERSISTENT | HA_OPTION_NO_STATS_PERSISTENT);
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
+ }
+#line 34441 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 634: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal ulong_num */
+#line 5457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* From user point of view STATS_SAMPLE_PAGES can be specified as
+ STATS_SAMPLE_PAGES=N (where 0<N<=65535, it does not make sense to
+ scan 0 pages) or STATS_SAMPLE_PAGES=default. Internally we record
+ =default as 0. See create_frm() in sql/table.cc, we use only two
+ bytes for stats_sample_pages and this is why we do not allow
+ larger values. 65535 pages, 16kb each means to sample 1GB, which
+ is impractical. If at some point this needs to be extended, then
+ we can store the higher bits from stats_sample_pages in .frm too. */
+ if (unlikely((yyvsp[0].ulong_num) == 0 || (yyvsp[0].ulong_num) > 0xffff))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.stats_sample_pages=(yyvsp[0].ulong_num);
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
+ }
+#line 34463 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 635: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal DEFAULT */
+#line 5475 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.stats_sample_pages=0;
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
+ }
+#line 34472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 636: /* create_table_option: CHECKSUM_SYM opt_equal ulong_num */
+#line 5480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
+ Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
+ }
+#line 34481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 637: /* create_table_option: TABLE_CHECKSUM_SYM opt_equal ulong_num */
+#line 5485 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
+ Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
+ }
+#line 34490 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 638: /* create_table_option: PAGE_CHECKSUM_SYM opt_equal choice */
+#line 5490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM;
+ Lex->create_info.page_checksum= (yyvsp[0].choice);
+ }
+#line 34499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 639: /* create_table_option: DELAY_KEY_WRITE_SYM opt_equal ulong_num */
+#line 5495 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE;
+ Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE;
+ }
+#line 34508 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 640: /* create_table_option: ROW_FORMAT_SYM opt_equal row_types */
+#line 5500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.row_type= (yyvsp[0].row_type);
+ Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
+ }
+#line 34517 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 641: /* $@80: %empty */
+#line 5505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
+ }
+#line 34525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 642: /* create_table_option: UNION_SYM opt_equal $@80 '(' opt_table_list ')' */
+#line 5509 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Move the union list to the merge_list and exclude its tables
+ from the global list.
+ */
+ LEX *lex=Lex;
+ 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
+ table being created/altered and parent tables.
+ */
+ TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table;
+ DBUG_ASSERT(last_non_sel_table->next_global ==
+ lex->create_info.merge_list);
+ last_non_sel_table->next_global= 0;
+ Lex->query_tables_last= &last_non_sel_table->next_global;
+
+ lex->create_info.used_fields|= HA_CREATE_USED_UNION;
+ }
+#line 34551 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 645: /* create_table_option: INSERT_METHOD opt_equal merge_insert_types */
+#line 5533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.merge_insert_method= (yyvsp[0].ulong_num);
+ Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD;
+ }
+#line 34560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 646: /* create_table_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5538 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.data_file_name= (yyvsp[0].lex_str).str;
+ Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR;
+ }
+#line 34569 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 647: /* create_table_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.index_file_name= (yyvsp[0].lex_str).str;
+ Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR;
+ }
+#line 34578 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 648: /* create_table_option: TABLESPACE ident */
+#line 5548 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* Compatiblity with MySQL */ }
+#line 34584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 649: /* create_table_option: STORAGE_SYM DISK_SYM */
+#line 5550 "/home/buildbot/git/sql/sql_yacc.yy"
+ {Lex->create_info.storage_media= HA_SM_DISK;}
+#line 34590 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 650: /* create_table_option: STORAGE_SYM MEMORY_SYM */
+#line 5552 "/home/buildbot/git/sql/sql_yacc.yy"
+ {Lex->create_info.storage_media= HA_SM_MEMORY;}
+#line 34596 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 651: /* create_table_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
+#line 5554 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.connect_string.str= (yyvsp[0].lex_str).str;
+ Lex->create_info.connect_string.length= (yyvsp[0].lex_str).length;
+ Lex->create_info.used_fields|= HA_CREATE_USED_CONNECTION;
+ }
+#line 34606 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 652: /* create_table_option: KEY_BLOCK_SIZE opt_equal ulong_num */
+#line 5560 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
+ Lex->create_info.key_block_size= (yyvsp[0].ulong_num);
+ }
+#line 34615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 653: /* create_table_option: TRANSACTIONAL_SYM opt_equal choice */
+#line 5565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
+ Lex->create_info.transactional= (yyvsp[0].choice);
+ }
+#line 34624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 654: /* create_table_option: engine_defined_option */
+#line 5570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->create_info.option_list, &Lex->option_list_last);
+ }
+#line 34632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 655: /* create_table_option: SEQUENCE_SYM opt_equal choice */
+#line 5574 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
+ Lex->create_info.sequence= ((yyvsp[0].choice) == HA_CHOICE_YES);
+ }
+#line 34641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 657: /* engine_defined_option: IDENT_sys equal TEXT_STRING_sys */
+#line 5583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
+ my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true);
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 34652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 658: /* engine_defined_option: IDENT_sys equal ident */
+#line 5590 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
+ my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false);
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 34663 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 659: /* engine_defined_option: IDENT_sys equal real_ulonglong_num */
+#line 5597 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), thd->mem_root);
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 34672 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 660: /* engine_defined_option: IDENT_sys equal DEFAULT */
+#line 5602 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys));
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 34681 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 663: /* versioning_option: WITH_SYSTEM_SYM VERSIONING_SYM */
+#line 5615 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ if (!DBUG_IF("sysvers_force"))
+ {
+ my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
+ MYSQL_YYABORT;
+ }
+ }
+ else
+ {
+ Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
+ Lex->create_info.options|= HA_VERSIONED_TABLE;
+ }
+ }
+#line 34701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 664: /* default_charset: opt_default charset opt_equal charset_name_or_default */
+#line 5634 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))))
+ MYSQL_YYABORT;
+ }
+#line 34710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 665: /* default_collation: opt_default COLLATE_SYM opt_equal collation_name_or_default */
+#line 5642 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_specification_st *cinfo= &Lex->create_info;
+ if (unlikely(cinfo->add_table_option_default_collation((yyvsp[0].Lex_extended_collation))))
+ MYSQL_YYABORT;
+ }
+#line 34720 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 666: /* storage_engines: ident_or_text */
+#line 5651 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Storage_engine_name((yyvsp[0].lex_str)).
+ resolve_storage_engine_with_error(thd, &(yyval.db_type),
+ thd->lex->create_info.tmp_table()))
+ MYSQL_YYABORT;
+ }
+#line 34731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 667: /* known_storage_engines: ident_or_text */
+#line 5661 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ plugin_ref plugin;
+ if (likely((plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), false))))
+ (yyval.db_type)= plugin_hton(plugin);
+ else
+ my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str));
+ }
+#line 34743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 668: /* row_types: DEFAULT */
+#line 5671 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_DEFAULT; }
+#line 34749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 669: /* row_types: FIXED_SYM */
+#line 5672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_FIXED; }
+#line 34755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 670: /* row_types: DYNAMIC_SYM */
+#line 5673 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_DYNAMIC; }
+#line 34761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 671: /* row_types: COMPRESSED_SYM */
+#line 5674 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_COMPRESSED; }
+#line 34767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 672: /* row_types: REDUNDANT_SYM */
+#line 5675 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_REDUNDANT; }
+#line 34773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 673: /* row_types: COMPACT_SYM */
+#line 5676 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_COMPACT; }
+#line 34779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 674: /* row_types: PAGE_SYM */
+#line 5677 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_PAGE; }
+#line 34785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 675: /* merge_insert_types: NO_SYM */
+#line 5681 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
+#line 34791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 676: /* merge_insert_types: FIRST_SYM */
+#line 5682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
+#line 34797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 677: /* merge_insert_types: LAST_SYM */
+#line 5683 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
+#line 34803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 678: /* udf_type: STRING_SYM */
+#line 5687 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) STRING_RESULT; }
+#line 34809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 679: /* udf_type: REAL */
+#line 5688 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) REAL_RESULT; }
+#line 34815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 680: /* udf_type: DECIMAL_SYM */
+#line 5689 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) DECIMAL_RESULT; }
+#line 34821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 681: /* udf_type: INT_SYM */
+#line 5690 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) INT_RESULT; }
+#line 34827 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 682: /* create_field_list: field_list */
+#line 5696 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ }
+#line 34835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 683: /* create_field_list_parens: LEFT_PAREN_ALT field_list ')' */
+#line 5703 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ }
+#line 34843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 686: /* field_list_item: column_def */
+#line 5714 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 690: /* field_list_item: PERIOD_SYM period_for_application_time */
+#line 5718 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 691: /* column_def: field_spec */
+#line 5723 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.create_field)= (yyvsp[0].create_field); }
+#line 34861 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 692: /* column_def: field_spec opt_constraint references */
+#line 5725 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_column_foreign_key(&((yyvsp[-2].create_field)->field_name), &(yyvsp[-1].lex_str),
+ (yyvsp[0].table), DDL_options())))
+ MYSQL_YYABORT;
+ (yyval.create_field)= (yyvsp[-2].create_field);
+ }
+#line 34872 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 693: /* $@81: %empty */
+#line 5735 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 694: /* key_def: key_or_index opt_if_not_exists opt_ident opt_USING_key_algorithm $@81 '(' key_list ')' normal_key_options */
+#line 5740 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 695: /* $@82: %empty */
+#line 5742 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-2].ident_sys), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 696: /* key_def: key_or_index opt_if_not_exists ident TYPE_SYM btree_or_rtree $@82 '(' key_list ')' normal_key_options */
+#line 5747 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 697: /* $@83: %empty */
+#line 5749 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34914 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 698: /* key_def: fulltext opt_key_or_index opt_if_not_exists opt_ident $@83 '(' key_list ')' fulltext_key_options */
+#line 5754 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 699: /* $@84: %empty */
+#line 5756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34930 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 700: /* key_def: spatial opt_key_or_index opt_if_not_exists opt_ident $@84 '(' key_list ')' spatial_key_options */
+#line 5761 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34936 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 701: /* $@85: %empty */
+#line 5765 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-3].key_type), (yyvsp[-1].lex_str).str ? &(yyvsp[-1].lex_str) : &(yyvsp[-4].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 702: /* key_def: opt_constraint constraint_key_type opt_if_not_exists opt_ident opt_USING_key_algorithm $@85 '(' key_list opt_without_overlaps ')' normal_key_options */
+#line 5770 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 703: /* $@86: %empty */
+#line 5773 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].ident_sys).str ? &(yyvsp[-2].ident_sys) : &(yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34962 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 704: /* key_def: opt_constraint constraint_key_type opt_if_not_exists ident TYPE_SYM btree_or_rtree $@86 '(' key_list opt_without_overlaps ')' normal_key_options */
+#line 5778 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34968 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 705: /* $@87: %empty */
+#line 5780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->check_add_key((yyvsp[-1].object_ddl_options))) ||
+ unlikely(!(Lex->last_key= (new (thd->mem_root)
+ Key(Key::MULTIPLE,
+ (yyvsp[-4].lex_str).str ? &(yyvsp[-4].lex_str) : &(yyvsp[0].lex_str),
+ HA_KEY_ALG_UNDEF, true, (yyvsp[-1].object_ddl_options))))))
+ MYSQL_YYABORT;
+ Lex->option_list= NULL;
+ }
+#line 34982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 706: /* key_def: opt_constraint FOREIGN KEY_SYM opt_if_not_exists opt_ident $@87 '(' key_list ')' references */
+#line 5790 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_table_foreign_key((yyvsp[-5].lex_str).str ? &(yyvsp[-5].lex_str) : &(yyvsp[-9].lex_str),
+ (yyvsp[-9].lex_str).str ? &(yyvsp[-9].lex_str) : &(yyvsp[-5].lex_str), (yyvsp[0].table), (yyvsp[-6].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34992 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 707: /* constraint_def: opt_constraint check_constraint */
+#line 5799 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
+ }
+#line 35000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 708: /* period_for_system_time: PERIOD_SYM FOR_SYSTEM_TIME_SYM '(' ident ',' ident ')' */
+#line 5807 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Vers_parse_info &info= Lex->vers_get_info();
+ info.set_period((yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys));
+ }
+#line 35009 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 709: /* period_for_application_time: FOR_SYM ident '(' ident ',' ident ')' */
+#line 5815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_period((yyvsp[-5].ident_sys), (yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 35018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 710: /* opt_check_constraint: %empty */
+#line 5822 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.virtual_column)= (Virtual_column_info*) 0; }
+#line 35024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 711: /* opt_check_constraint: check_constraint */
+#line 5823 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.virtual_column)= (yyvsp[0].virtual_column);}
+#line 35030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 712: /* check_constraint: CHECK_SYM '(' expr ')' */
+#line 5828 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[-1].item));
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ (yyval.virtual_column)= v;
+ }
+#line 35041 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 713: /* opt_constraint_no_id: %empty */
+#line 5837 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35047 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 714: /* opt_constraint_no_id: CONSTRAINT */
+#line 5838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35053 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 715: /* opt_constraint: %empty */
+#line 5842 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 35059 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 716: /* opt_constraint: constraint */
+#line 5843 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].lex_str); }
+#line 35065 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 717: /* constraint: CONSTRAINT opt_ident */
+#line 5847 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str); }
+#line 35071 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 718: /* @88: %empty */
+#line 5852 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Create_field *f= new (thd->mem_root) Create_field();
+
+ if (unlikely(check_string_char_length(&(yyvsp[0].lex_str), 0, NAME_CHAR_LEN,
+ system_charset_info, 1)))
+ my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].lex_str).str));
+
+ if (unlikely(!f))
+ MYSQL_YYABORT;
+
+ lex->init_last_field(f, &(yyvsp[0].lex_str));
+ (yyval.create_field)= f;
+ lex->parsing_options.lookup_keywords_after_qualifier= true;
+ }
+#line 35091 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 719: /* field_spec: field_ident @88 field_type_or_serial opt_check_constraint */
+#line 5868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->parsing_options.lookup_keywords_after_qualifier= false;
+ (yyval.create_field)= (yyvsp[-2].create_field);
+
+ (yyval.create_field)->check_constraint= (yyvsp[0].virtual_column);
+
+ if (unlikely((yyval.create_field)->check(thd)))
+ MYSQL_YYABORT;
+
+ lex->alter_info.create_list.push_back((yyval.create_field), thd->mem_root);
+
+ (yyval.create_field)->create_if_not_exists= Lex->check_exists;
+ if ((yyval.create_field)->flags & PRI_KEY_FLAG)
+ lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::PRIMARY, lex->check_exists);
+ else if ((yyval.create_field)->flags & UNIQUE_KEY_FLAG)
+ lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::UNIQUE, lex->check_exists);
+ }
+#line 35114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 720: /* $@89: %empty */
+#line 5890 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
+ COLUMN_DEFINITION_TABLE_FIELD);
+ }
+#line 35123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 721: /* field_type_or_serial: qualified_field_type $@89 field_def */
+#line 5895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ auto tmp= (yyvsp[-2].Lex_field_type).charset_collation_attrs();
+ if (tmp.merge_column_charset_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
+ MYSQL_YYABORT;
+ Lex->last_field->set_charset_collation_attrs(tmp);
+ }
+#line 35134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 722: /* $@90: %empty */
+#line 5902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_handler(&type_handler_ulonglong);
+ Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG
+ | UNSIGNED_FLAG | UNIQUE_KEY_FLAG;
+ Lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 35145 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 724: /* opt_serial_attribute: %empty */
+#line 5912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 725: /* opt_serial_attribute: opt_serial_attribute_list */
+#line 5913 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 726: /* opt_serial_attribute_list: opt_serial_attribute_list serial_attribute */
+#line 5917 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 728: /* opt_asrow_attribute: %empty */
+#line 5922 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 729: /* opt_asrow_attribute: opt_asrow_attribute_list */
+#line 5923 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35175 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 730: /* opt_asrow_attribute_list: opt_asrow_attribute_list asrow_attribute */
+#line 5927 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35181 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 732: /* field_def: %empty */
+#line 5932 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 35187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 734: /* field_def: attribute_list compressed_deprecated_column_attribute */
+#line 5934 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
+#line 35193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 735: /* field_def: attribute_list compressed_deprecated_column_attribute attribute_list */
+#line 5936 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-2].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
+ MYSQL_YYABORT;
+ }
+#line 35202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 736: /* $@91: %empty */
+#line 5941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
+ }
+#line 35210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 737: /* field_def: opt_generated_always AS virtual_column_func $@91 vcol_opt_specifier vcol_opt_attribute */
+#line 5945 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 738: /* field_def: opt_generated_always AS ROW_SYM START_SYM opt_asrow_attribute */
+#line 5949 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->last_field_generated_always_as_row_start())
+ MYSQL_YYABORT;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35228 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 739: /* field_def: opt_generated_always AS ROW_SYM END opt_asrow_attribute */
+#line 5955 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->last_field_generated_always_as_row_end())
+ MYSQL_YYABORT;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 740: /* opt_generated_always: %empty */
+#line 5963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 741: /* opt_generated_always: GENERATED_SYM ALWAYS_SYM */
+#line 5964 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 742: /* vcol_opt_specifier: %empty */
+#line 5969 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
+ }
+#line 35258 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 743: /* vcol_opt_specifier: VIRTUAL_SYM */
+#line 5973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
+ }
+#line 35266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 744: /* vcol_opt_specifier: PERSISTENT_SYM */
+#line 5977 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
+ }
+#line 35274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 745: /* vcol_opt_specifier: STORED_SYM */
+#line 5981 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
+ }
+#line 35282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 746: /* vcol_opt_attribute: %empty */
+#line 5987 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35288 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 747: /* vcol_opt_attribute: vcol_opt_attribute_list */
+#line 5988 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35294 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 748: /* vcol_opt_attribute_list: vcol_opt_attribute_list vcol_attribute */
+#line 5992 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35300 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 750: /* vcol_attribute: UNIQUE_SYM */
+#line 5998 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= UNIQUE_KEY_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 35310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 751: /* vcol_attribute: UNIQUE_SYM KEY_SYM */
+#line 6004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= UNIQUE_KEY_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 35320 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 752: /* vcol_attribute: COMMENT_SYM TEXT_STRING_sys */
+#line 6009 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->comment= (yyvsp[0].lex_str); }
+#line 35326 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 753: /* vcol_attribute: INVISIBLE_SYM */
+#line 6011 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->invisible= INVISIBLE_USER;
+ }
+#line 35334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 754: /* $@92: %empty */
+#line 6018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ "PARSE_VCOL_EXPR" can only be used by the SQL server
+ when reading a '*.frm' file.
+ Prevent the end user from invoking this command.
+ */
+ MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 35349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 755: /* parse_vcol_expr: PARSE_VCOL_EXPR_SYM $@92 expr */
+#line 6029 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[0].item));
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ Lex->last_field->vcol_info= v;
+ Lex->pop_select(); //main select
+ }
+#line 35361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 757: /* parenthesized_expr: expr ',' expr_list */
+#line 6041 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[0].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 35372 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 758: /* virtual_column_func: '(' parenthesized_expr ')' */
+#line 6051 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Virtual_column_info *v=
+ add_virtual_expression(thd, (yyvsp[-1].item));
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ (yyval.virtual_column)= v;
+ }
+#line 35384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 759: /* virtual_column_func: subquery */
+#line 6059 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item;
+ if (!(item= new (thd->mem_root) Item_singlerow_subselect(thd, (yyvsp[0].select_lex))))
+ MYSQL_YYABORT;
+ Virtual_column_info *v= add_virtual_expression(thd, item);
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ (yyval.virtual_column)= v;
+ }
+#line 35398 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 763: /* column_default_expr: expr_or_literal */
+#line 6075 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
+ MYSQL_YYABORT;
+ }
+#line 35407 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 764: /* field_type: field_type_all */
+#line 6082 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
+ }
+#line 35415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 765: /* qualified_field_type: field_type_all */
+#line 6089 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
+ }
+#line 35423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 766: /* qualified_field_type: sp_decl_ident '.' field_type_all */
+#line 6093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->map_data_type((yyvsp[-2].ident_sys), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type))))
+ MYSQL_YYABORT;
+ }
+#line 35432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 767: /* udt_name: IDENT_sys */
+#line 6100 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 35438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 768: /* udt_name: reserved_keyword_udt */
+#line 6101 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].kwd); }
+#line 35444 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 769: /* udt_name: non_reserved_keyword_udt */
+#line 6102 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].kwd); }
+#line 35450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 775: /* field_type_all: udt_name float_options srid_option */
+#line 6112 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].lex_str), (yyvsp[-1].Lex_length_and_dec)))
+ MYSQL_YYABORT;
+ }
+#line 35459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 776: /* field_type_numeric: int_type opt_field_length last_field_options */
+#line 6120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set_handler_length_flags((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec), (uint32) (yyvsp[0].ulong_num));
+ }
+#line 35467 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 777: /* field_type_numeric: real_type opt_precision last_field_options */
+#line 6123 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
+#line 35473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 778: /* field_type_numeric: FLOAT_SYM float_options last_field_options */
+#line 6125 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_float, (yyvsp[-1].Lex_length_and_dec));
+ if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length() && !(yyvsp[-1].Lex_length_and_dec).has_explicit_dec())
+ {
+ if (unlikely((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_DOUBLE))
+ my_yyabort_error((ER_WRONG_FIELD_SPEC, MYF(0),
+ Lex->last_field->field_name.str));
+ if ((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_FLOAT)
+ (yyval.Lex_field_type).set(&type_handler_double);
+ else
+ (yyval.Lex_field_type).set(&type_handler_float);
+ }
+ }
+#line 35491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 779: /* field_type_numeric: BIT_SYM opt_field_length */
+#line 6139 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].Lex_length_and_dec));
+ }
+#line 35499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 780: /* field_type_numeric: BOOL_SYM */
+#line 6143 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
+ }
+#line 35507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 781: /* field_type_numeric: BOOLEAN_SYM */
+#line 6147 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
+ }
+#line 35515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 782: /* field_type_numeric: DECIMAL_SYM float_options last_field_options */
+#line 6151 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
+#line 35521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 783: /* field_type_numeric: NUMBER_ORACLE_SYM float_options last_field_options */
+#line 6153 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
+ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));
+ else
+ (yyval.Lex_field_type).set(&type_handler_double);
+ }
+#line 35532 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 784: /* field_type_numeric: NUMERIC_SYM float_options last_field_options */
+#line 6160 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
+#line 35538 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 785: /* field_type_numeric: FIXED_SYM float_options last_field_options */
+#line 6162 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
+#line 35544 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 786: /* opt_binary_and_compression: %empty */
+#line 6167 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 35550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 787: /* opt_binary_and_compression: binary */
+#line 6168 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
+#line 35556 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 788: /* opt_binary_and_compression: binary compressed_deprecated_data_type_attribute */
+#line 6169 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
+#line 35562 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 789: /* opt_binary_and_compression: compressed opt_binary */
+#line 6170 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
+#line 35568 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 790: /* field_type_string: char opt_field_length opt_binary */
+#line 6175 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
+ }
+#line 35576 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 791: /* field_type_string: nchar opt_field_length opt_bin_mod */
+#line 6179 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec),
+ Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
+ }
+#line 35585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 792: /* field_type_string: BINARY opt_field_length */
+#line 6184 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 35593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 793: /* field_type_string: varchar opt_field_length opt_binary_and_compression */
+#line 6188 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
+ }
+#line 35601 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 794: /* field_type_string: VARCHAR2_ORACLE_SYM opt_field_length opt_binary_and_compression */
+#line 6192 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
+ }
+#line 35609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 795: /* field_type_string: nvarchar opt_field_length opt_compressed opt_bin_mod */
+#line 6196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].Lex_length_and_dec),
+ Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
+ }
+#line 35618 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 796: /* field_type_string: VARBINARY opt_field_length opt_compressed */
+#line 6201 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 35626 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 797: /* field_type_string: RAW_ORACLE_SYM opt_field_length opt_compressed */
+#line 6205 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 35634 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 798: /* field_type_temporal: YEAR_SYM opt_field_length last_field_options */
+#line 6212 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
+ {
+ if ((yyvsp[-1].Lex_length_and_dec).length() != 4)
+ {
+ char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
+ my_snprintf(buff, sizeof(buff), "YEAR(%u)", (uint) (yyvsp[-1].Lex_length_and_dec).length());
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_WARN_DEPRECATED_SYNTAX,
+ ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
+ buff, "YEAR(4)");
+ }
+ }
+ (yyval.Lex_field_type).set(&type_handler_year, (yyvsp[-1].Lex_length_and_dec));
+ }
+#line 35654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 799: /* field_type_temporal: DATE_SYM */
+#line 6227 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdate); }
+#line 35660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 800: /* field_type_temporal: TIME_SYM opt_field_length */
+#line 6229 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
+ static_cast<const Type_handler*>(&type_handler_time2) :
+ static_cast<const Type_handler*>(&type_handler_time),
+ (yyvsp[0].Lex_length_and_dec));
+ }
+#line 35671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 801: /* field_type_temporal: TIMESTAMP opt_field_length */
+#line 6236 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
+ static_cast<const Type_handler*>(&type_handler_timestamp2):
+ static_cast<const Type_handler*>(&type_handler_timestamp),
+ (yyvsp[0].Lex_length_and_dec));
+ }
+#line 35682 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 802: /* field_type_temporal: DATETIME opt_field_length */
+#line 6243 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(thd->type_handler_for_datetime(), (yyvsp[0].Lex_length_and_dec));
+ }
+#line 35690 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 803: /* field_type_lob: TINYBLOB opt_compressed */
+#line 6251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_tiny_blob, &my_charset_bin);
+ }
+#line 35698 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 804: /* field_type_lob: BLOB_MARIADB_SYM opt_field_length opt_compressed */
+#line 6255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 35706 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 805: /* field_type_lob: BLOB_ORACLE_SYM field_length opt_compressed */
+#line 6259 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 35714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 806: /* field_type_lob: BLOB_ORACLE_SYM opt_compressed */
+#line 6263 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
+ }
+#line 35722 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 807: /* field_type_lob: MEDIUMBLOB opt_compressed */
+#line 6267 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
+ }
+#line 35730 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 808: /* field_type_lob: LONGBLOB opt_compressed */
+#line 6271 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
+ }
+#line 35738 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 809: /* field_type_lob: LONG_SYM VARBINARY opt_compressed */
+#line 6275 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
+ }
+#line 35746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 810: /* field_type_lob: LONG_SYM varchar opt_binary_and_compression */
+#line 6279 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 811: /* field_type_lob: TINYTEXT opt_binary_and_compression */
+#line 6281 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_tiny_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 812: /* field_type_lob: TEXT_SYM opt_field_length opt_binary_and_compression */
+#line 6283 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35764 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 813: /* field_type_lob: MEDIUMTEXT opt_binary_and_compression */
+#line 6285 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35770 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 814: /* field_type_lob: LONGTEXT opt_binary_and_compression */
+#line 6287 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 815: /* field_type_lob: CLOB_ORACLE_SYM opt_binary_and_compression */
+#line 6289 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35782 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 816: /* field_type_lob: LONG_SYM opt_binary_and_compression */
+#line 6291 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35788 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 817: /* field_type_lob: JSON_SYM opt_compressed */
+#line 6293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_long_blob_json, &my_charset_utf8mb4_bin);
+ }
+#line 35796 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 818: /* field_type_misc: ENUM '(' string_list ')' opt_binary */
+#line 6300 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_enum, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 819: /* field_type_misc: SET '(' string_list ')' opt_binary */
+#line 6302 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_set, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 820: /* char: CHAR_SYM */
+#line 6306 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 821: /* nchar: NCHAR_SYM */
+#line 6310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 822: /* nchar: NATIONAL_SYM CHAR_SYM */
+#line 6311 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 823: /* varchar: char VARYING */
+#line 6315 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 824: /* varchar: VARCHAR */
+#line 6316 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 825: /* nvarchar: NATIONAL_SYM VARCHAR */
+#line 6320 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 826: /* nvarchar: NVARCHAR_SYM */
+#line 6321 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 827: /* nvarchar: NCHAR_SYM VARCHAR */
+#line 6322 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 828: /* nvarchar: NATIONAL_SYM CHAR_SYM VARYING */
+#line 6323 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 829: /* nvarchar: NCHAR_SYM VARYING */
+#line 6324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 830: /* int_type: INT_SYM */
+#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_slong; }
+#line 35874 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 831: /* int_type: TINYINT */
+#line 6329 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_stiny; }
+#line 35880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 832: /* int_type: SMALLINT */
+#line 6330 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_sshort; }
+#line 35886 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 833: /* int_type: MEDIUMINT */
+#line 6331 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_sint24; }
+#line 35892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 834: /* int_type: BIGINT */
+#line 6332 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_slonglong; }
+#line 35898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 835: /* real_type: REAL */
+#line 6337 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.type_handler)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ?
+ static_cast<const Type_handler *>(&type_handler_float) :
+ static_cast<const Type_handler *>(&type_handler_double);
+ }
+#line 35908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 836: /* real_type: DOUBLE_SYM */
+#line 6342 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_double; }
+#line 35914 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 837: /* real_type: DOUBLE_SYM PRECISION */
+#line 6343 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_double; }
+#line 35920 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 838: /* srid_option: %empty */
+#line 6348 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->srid= 0; }
+#line 35926 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 839: /* srid_option: REF_SYSTEM_ID_SYM '=' NUM */
+#line 6351 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
+ }
+#line 35934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 840: /* float_options: %empty */
+#line 6357 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); }
+#line 35940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 843: /* precision: '(' NUM ',' NUM ')' */
+#line 6363 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
+#line 35946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 844: /* field_options: %empty */
+#line 6367 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 845: /* field_options: SIGNED_SYM */
+#line 6368 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 846: /* field_options: UNSIGNED */
+#line 6369 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG; }
+#line 35964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 847: /* field_options: ZEROFILL */
+#line 6370 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
+#line 35970 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 848: /* field_options: UNSIGNED ZEROFILL */
+#line 6371 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
+#line 35976 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 849: /* field_options: ZEROFILL UNSIGNED */
+#line 6372 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
+#line 35982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 850: /* last_field_options: field_options */
+#line 6376 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->flags|= ((yyval.ulong_num)= (yyvsp[0].ulong_num)); }
+#line 35988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 851: /* field_length_str: '(' LONG_NUM ')' */
+#line 6380 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 35994 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 852: /* field_length_str: '(' ULONGLONG_NUM ')' */
+#line 6381 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 36000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 853: /* field_length_str: '(' DECIMAL_NUM ')' */
+#line 6382 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 36006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 854: /* field_length_str: '(' NUM ')' */
+#line 6383 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 36012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 855: /* field_length: field_length_str */
+#line 6386 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), NULL); }
+#line 36018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 856: /* field_scale: field_length_str */
+#line 6390 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).set(NULL, (yyvsp[0].const_simple_string)); }
+#line 36024 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 857: /* opt_field_length: %empty */
+#line 6395 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); /* use default length */ }
+#line 36030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 859: /* opt_field_scale: %empty */
+#line 6400 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); }
+#line 36036 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 861: /* opt_precision: %empty */
+#line 6405 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); }
+#line 36042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 862: /* opt_precision: precision */
+#line 6406 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
+#line 36048 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 863: /* attribute_list: attribute_list attribute */
+#line 6412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
+ MYSQL_YYABORT;
+ }
+#line 36057 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 865: /* attribute: NULL_SYM */
+#line 6421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->flags&= ~NOT_NULL_FLAG;
+ Lex->last_field->explicitly_nullable= true;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 36067 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 866: /* attribute: DEFAULT column_default_expr */
+#line 6427 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->default_value= (yyvsp[0].virtual_column);
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 36076 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 867: /* attribute: ON UPDATE_SYM NOW_SYM opt_default_time_precision */
+#line 6432 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ Lex->last_field->on_update= item;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 36088 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 868: /* attribute: AUTO_INC */
+#line 6439 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 36094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 869: /* attribute: SERIAL_SYM DEFAULT VALUE_SYM */
+#line 6441 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 36105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 870: /* attribute: COLLATE_SYM collation_name */
+#line 6448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
+ }
+#line 36113 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 871: /* attribute: serial_attribute */
+#line 6451 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 36119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 872: /* opt_compression_method: %empty */
+#line 6455 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= NULL; }
+#line 36125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 873: /* opt_compression_method: equal ident */
+#line 6456 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
+#line 36131 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 874: /* opt_compressed: %empty */
+#line 6460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36137 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 875: /* opt_compressed: compressed */
+#line 6461 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 36143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 876: /* opt_enable: %empty */
+#line 6465 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36149 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 877: /* opt_enable: ENABLE_SYM */
+#line 6466 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 36155 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 878: /* compressed: COMPRESSED_SYM opt_compression_method */
+#line 6471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 36164 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 879: /* compressed_deprecated_data_type_attribute: COMPRESSED_SYM opt_compression_method */
+#line 6479 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 36173 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 880: /* compressed_deprecated_column_attribute: COMPRESSED_SYM opt_compression_method */
+#line 6487 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->last_field->
+ set_compressed_deprecated_column_attribute(thd, (yyvsp[-1].kwd).pos(), (yyvsp[0].const_simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 36183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 881: /* asrow_attribute: not NULL_SYM opt_enable */
+#line 6496 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->flags|= NOT_NULL_FLAG;
+ }
+#line 36191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 882: /* asrow_attribute: opt_primary KEY_SYM */
+#line 6500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= PRI_KEY_FLAG | NOT_NULL_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 36201 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 885: /* serial_attribute: engine_defined_option */
+#line 6511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->last_field->option_list, &Lex->option_list_last);
+ }
+#line 36209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 886: /* serial_attribute: with_or_without_system VERSIONING_SYM */
+#line 6515 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->versioning= (yyvsp[-1].vers_column_versioning);
+ Lex->create_info.options|= HA_VERSIONED_TABLE;
+ if (Lex->alter_info.flags & ALTER_DROP_SYSTEM_VERSIONING)
+ {
+ my_yyabort_error((ER_VERS_NOT_VERSIONED, MYF(0),
+ Lex->create_last_non_select_table->table_name.str));
+ }
+ }
+#line 36223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 887: /* with_or_without_system: WITH_SYSTEM_SYM */
+#line 6528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
+ Lex->create_info.vers_info.versioned_fields= true;
+ (yyval.vers_column_versioning)= Column_definition::WITH_VERSIONING;
+ }
+#line 36233 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 888: /* with_or_without_system: WITHOUT SYSTEM */
+#line 6534 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
+ Lex->create_info.vers_info.unversioned_fields= true;
+ (yyval.vers_column_versioning)= Column_definition::WITHOUT_VERSIONING;
+ }
+#line 36243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 889: /* charset: CHAR_SYM SET */
+#line 6543 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.kwd)= (yyvsp[-1].kwd); }
+#line 36249 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 890: /* charset: CHARSET */
+#line 6544 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.kwd)= (yyvsp[0].kwd); }
+#line 36255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 891: /* charset_name: ident_or_text */
+#line 6549 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ myf utf8_flag= thd->get_utf8_flag();
+ if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str, MY_CS_PRIMARY,
+ MYF(utf8_flag)))))
+ my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
+ }
+#line 36266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 892: /* charset_name: BINARY */
+#line 6555 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= &my_charset_bin; }
+#line 36272 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 893: /* charset_name_or_default: charset_name */
+#line 6559 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=(yyvsp[0].charset); }
+#line 36278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 894: /* charset_name_or_default: DEFAULT */
+#line 6560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=NULL; }
+#line 36284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 895: /* opt_load_data_charset: %empty */
+#line 6564 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= NULL; }
+#line 36290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 896: /* opt_load_data_charset: charset charset_name_or_default */
+#line 6565 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= (yyvsp[0].charset); }
+#line 36296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 897: /* old_or_new_charset_name: ident_or_text */
+#line 6570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ myf utf8_flag= thd->get_utf8_flag();
+ if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,
+ MY_CS_PRIMARY,
+ MYF(utf8_flag))) &&
+ !((yyval.charset)=get_old_charset_by_name((yyvsp[0].lex_str).str))))
+ my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
+ }
+#line 36309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 898: /* old_or_new_charset_name: BINARY */
+#line 6578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= &my_charset_bin; }
+#line 36315 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 899: /* old_or_new_charset_name_or_default: old_or_new_charset_name */
+#line 6582 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=(yyvsp[0].charset); }
+#line 36321 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 900: /* old_or_new_charset_name_or_default: DEFAULT */
+#line 6583 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=NULL; }
+#line 36327 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 901: /* collation_name: ident_or_text */
+#line 6588 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_extended_collation).set_by_name((yyvsp[0].lex_str).str, thd->get_utf8_flag()))
+ MYSQL_YYABORT;
+ }
+#line 36336 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 902: /* collation_name_or_default: collation_name */
+#line 6595 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_extended_collation)=(yyvsp[0].Lex_extended_collation); }
+#line 36342 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 903: /* collation_name_or_default: DEFAULT */
+#line 6596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_extended_collation).set_collate_default(); }
+#line 36348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 904: /* opt_default: %empty */
+#line 6600 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36354 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 905: /* opt_default: DEFAULT */
+#line 6601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36360 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 906: /* charset_or_alias: charset charset_name */
+#line 6605 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= (yyvsp[0].charset); }
+#line 36366 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 907: /* charset_or_alias: ASCII_SYM */
+#line 6606 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= &my_charset_latin1; }
+#line 36372 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 908: /* charset_or_alias: UNICODE_SYM */
+#line 6608 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))))
+ my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2"));
+ }
+#line 36381 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 909: /* opt_binary: %empty */
+#line 6615 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 36387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 911: /* binary: BYTE_SYM */
+#line 6621 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset(&my_charset_bin));
+ }
+#line 36395 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 912: /* binary: charset_or_alias */
+#line 6625 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset((yyvsp[0].charset)));
+ }
+#line 36403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 913: /* binary: charset_or_alias BINARY */
+#line 6629 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[-1].charset))))
+ MYSQL_YYABORT;
+ }
+#line 36412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 914: /* binary: BINARY */
+#line 6633 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).set_contextually_typed_binary_style(); }
+#line 36418 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 915: /* binary: BINARY charset_or_alias */
+#line 6635 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[0].charset))))
+ MYSQL_YYABORT;
+ }
+#line 36427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 916: /* binary: charset_or_alias COLLATE_SYM DEFAULT */
+#line 6640 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_default(Lex_exact_charset((yyvsp[-2].charset)));
+ }
+#line 36435 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 917: /* binary: charset_or_alias COLLATE_SYM collation_name */
+#line 6644 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].Lex_extended_collation).merge_exact_charset(Lex_exact_charset((yyvsp[-2].charset))))
+ MYSQL_YYABORT;
+ (yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
+ }
+#line 36445 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 918: /* binary: COLLATE_SYM collation_name */
+#line 6650 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
+ }
+#line 36453 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 919: /* binary: COLLATE_SYM DEFAULT */
+#line 6654 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_collate_default();
+ }
+#line 36461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 920: /* opt_bin_mod: %empty */
+#line 6660 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 36467 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 921: /* opt_bin_mod: BINARY */
+#line 6661 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= true; }
+#line 36473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 922: /* $@93: %empty */
+#line 6666 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].ulong_num) == 0))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 36485 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 923: /* ws_nweights: '(' real_ulong_num $@93 ')' */
+#line 6674 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
+#line 36491 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 924: /* ws_level_flag_desc: ASC */
+#line 6678 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 36497 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 925: /* ws_level_flag_desc: DESC */
+#line 6679 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
+#line 36503 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 926: /* ws_level_flag_reverse: REVERSE_SYM */
+#line 6683 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
+#line 36509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 927: /* ws_level_flags: %empty */
+#line 6686 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 36515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 928: /* ws_level_flags: ws_level_flag_desc */
+#line 6687 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 36521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 929: /* ws_level_flags: ws_level_flag_desc ws_level_flag_reverse */
+#line 6688 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
+#line 36527 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 930: /* ws_level_flags: ws_level_flag_reverse */
+#line 6689 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
+#line 36533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 931: /* ws_level_number: real_ulong_num */
+#line 6694 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ulong_num)= (yyvsp[0].ulong_num) < 1 ? 1 : ((yyvsp[0].ulong_num) > MY_STRXFRM_NLEVELS ? MY_STRXFRM_NLEVELS : (yyvsp[0].ulong_num));
+ (yyval.ulong_num)--;
+ }
+#line 36542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 932: /* ws_level_list_item: ws_level_number ws_level_flags */
+#line 6702 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
+ }
+#line 36550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 933: /* ws_level_list: ws_level_list_item */
+#line 6708 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 36556 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 934: /* ws_level_list: ws_level_list ',' ws_level_list_item */
+#line 6709 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
+#line 36562 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 935: /* ws_level_range: ws_level_number '-' ws_level_number */
+#line 6714 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint start= (yyvsp[-2].ulong_num);
+ uint end= (yyvsp[0].ulong_num);
+ for ((yyval.ulong_num)= 0; start <= end; start++)
+ (yyval.ulong_num)|= (1 << start);
+ }
+#line 36573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 936: /* ws_level_list_or_range: ws_level_list */
+#line 6723 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 36579 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 937: /* ws_level_list_or_range: ws_level_range */
+#line 6724 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 36585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 938: /* opt_ws_levels: %empty */
+#line 6728 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 36591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 939: /* opt_ws_levels: LEVEL_SYM ws_level_list_or_range */
+#line 6729 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 36597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 942: /* references: REFERENCES table_ident opt_ref_list opt_match_clause opt_on_update_delete */
+#line 6743 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)=(yyvsp[-3].table);
+ }
+#line 36605 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 943: /* opt_ref_list: %empty */
+#line 6750 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ref_list.empty(); }
+#line 36611 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 945: /* ref_list: ref_list ',' ident */
+#line 6756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
+ if (unlikely(key == NULL))
+ MYSQL_YYABORT;
+ Lex->ref_list.push_back(key, thd->mem_root);
+ }
+#line 36622 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 946: /* ref_list: ident */
+#line 6763 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
+ if (unlikely(key == NULL))
+ MYSQL_YYABORT;
+ LEX *lex= Lex;
+ lex->ref_list.empty();
+ lex->ref_list.push_back(key, thd->mem_root);
+ }
+#line 36635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 947: /* opt_match_clause: %empty */
+#line 6775 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
+#line 36641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 948: /* opt_match_clause: MATCH FULL */
+#line 6777 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
+#line 36647 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 949: /* opt_match_clause: MATCH PARTIAL */
+#line 6779 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
+#line 36653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 950: /* opt_match_clause: MATCH SIMPLE_SYM */
+#line 6781 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
+#line 36659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 951: /* opt_on_update_delete: %empty */
+#line 6786 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= FK_OPTION_UNDEF;
+ lex->fk_delete_opt= FK_OPTION_UNDEF;
+ }
+#line 36669 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 952: /* opt_on_update_delete: ON UPDATE_SYM delete_option */
+#line 6792 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= (yyvsp[0].m_fk_option);
+ lex->fk_delete_opt= FK_OPTION_UNDEF;
+ }
+#line 36679 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 953: /* opt_on_update_delete: ON DELETE_SYM delete_option */
+#line 6798 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= FK_OPTION_UNDEF;
+ lex->fk_delete_opt= (yyvsp[0].m_fk_option);
+ }
+#line 36689 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 954: /* opt_on_update_delete: ON UPDATE_SYM delete_option ON DELETE_SYM delete_option */
+#line 6805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= (yyvsp[-3].m_fk_option);
+ lex->fk_delete_opt= (yyvsp[0].m_fk_option);
+ }
+#line 36699 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 955: /* opt_on_update_delete: ON DELETE_SYM delete_option ON UPDATE_SYM delete_option */
+#line 6812 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= (yyvsp[0].m_fk_option);
+ lex->fk_delete_opt= (yyvsp[-3].m_fk_option);
+ }
+#line 36709 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 956: /* delete_option: RESTRICT */
+#line 6820 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
+#line 36715 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 957: /* delete_option: CASCADE */
+#line 6821 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_CASCADE; }
+#line 36721 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 958: /* delete_option: SET NULL_SYM */
+#line 6822 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
+#line 36727 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 959: /* delete_option: NO_SYM ACTION */
+#line 6823 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
+#line 36733 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 960: /* delete_option: SET DEFAULT */
+#line 6824 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
+#line 36739 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 961: /* constraint_key_type: PRIMARY_SYM KEY_SYM */
+#line 6828 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_type)= Key::PRIMARY; }
+#line 36745 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 962: /* constraint_key_type: UNIQUE_SYM opt_key_or_index */
+#line 6829 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_type)= Key::UNIQUE; }
+#line 36751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 963: /* key_or_index: KEY_SYM */
+#line 6833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 964: /* key_or_index: INDEX_SYM */
+#line 6834 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 965: /* opt_key_or_index: %empty */
+#line 6838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 967: /* keys_or_index: KEYS */
+#line 6843 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36775 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 968: /* keys_or_index: INDEX_SYM */
+#line 6844 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 969: /* keys_or_index: INDEXES */
+#line 6845 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36787 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 970: /* fulltext: FULLTEXT_SYM */
+#line 6849 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_type)= Key::FULLTEXT;}
+#line 36793 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 971: /* spatial: SPATIAL_SYM */
+#line 6854 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef HAVE_SPATIAL
+ (yyval.key_type)= Key::SPATIAL;
+#else
+ my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), sym_group_geom.name,
+ sym_group_geom.needed_define));
+#endif
+ }
+#line 36806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 972: /* normal_key_options: %empty */
+#line 6865 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 973: /* normal_key_options: normal_key_opts */
+#line 6866 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->option_list= Lex->option_list; }
+#line 36818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 974: /* fulltext_key_options: %empty */
+#line 6870 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36824 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 975: /* fulltext_key_options: fulltext_key_opts */
+#line 6871 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->option_list= Lex->option_list; }
+#line 36830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 976: /* spatial_key_options: %empty */
+#line 6875 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36836 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 977: /* spatial_key_options: spatial_key_opts */
+#line 6876 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->option_list= Lex->option_list; }
+#line 36842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 984: /* opt_USING_key_algorithm: %empty */
+#line 6895 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
+#line 36848 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 985: /* opt_USING_key_algorithm: USING btree_or_rtree */
+#line 6896 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= (yyvsp[0].key_alg); }
+#line 36854 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 986: /* opt_key_algorithm_clause: %empty */
+#line 6901 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
+#line 36860 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 987: /* opt_key_algorithm_clause: USING btree_or_rtree */
+#line 6902 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= (yyvsp[0].key_alg); }
+#line 36866 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 988: /* opt_key_algorithm_clause: TYPE_SYM btree_or_rtree */
+#line 6903 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= (yyvsp[0].key_alg); }
+#line 36872 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 989: /* key_using_alg: USING btree_or_rtree */
+#line 6908 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
+#line 36878 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 990: /* key_using_alg: TYPE_SYM btree_or_rtree */
+#line 6910 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
+#line 36884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 991: /* all_key_opt: KEY_BLOCK_SIZE opt_equal ulong_num */
+#line 6915 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num);
+ Lex->last_key->key_create_info.flags|= HA_USES_BLOCK_SIZE;
+ }
+#line 36893 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 992: /* all_key_opt: COMMENT_SYM TEXT_STRING_sys */
+#line 6920 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
+#line 36899 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 993: /* all_key_opt: VISIBLE_SYM */
+#line 6922 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* This is mainly for MySQL 8.0 compatibility */
+ }
+#line 36907 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 994: /* all_key_opt: ignorability */
+#line 6926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_key->key_create_info.is_ignored= (yyvsp[0].num);
+ }
+#line 36915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 995: /* all_key_opt: engine_defined_option */
+#line 6930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->option_list, &Lex->option_list_last);
+ }
+#line 36923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1000: /* fulltext_key_opt: WITH PARSER_SYM IDENT_sys */
+#line 6947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (likely(plugin_is_ready(&(yyvsp[0].ident_sys), MYSQL_FTPARSER_PLUGIN)))
+ Lex->last_key->key_create_info.parser_name= (yyvsp[0].ident_sys);
+ else
+ my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 36934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1001: /* btree_or_rtree: BTREE_SYM */
+#line 6956 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_BTREE; }
+#line 36940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1002: /* btree_or_rtree: RTREE_SYM */
+#line 6957 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_RTREE; }
+#line 36946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1003: /* btree_or_rtree: HASH_SYM */
+#line 6958 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_HASH; }
+#line 36952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1004: /* ignorability: IGNORED_SYM */
+#line 6962 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= true; }
+#line 36958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1005: /* ignorability: NOT_SYM IGNORED_SYM */
+#line 6963 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 36964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1006: /* key_list: key_list ',' key_part order_dir */
+#line 6968 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].key_part)->asc= (yyvsp[0].num);
+ Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
+ }
+#line 36973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1007: /* key_list: key_part order_dir */
+#line 6973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].key_part)->asc= (yyvsp[0].num);
+ Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
+ }
+#line 36982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1008: /* opt_without_overlaps: %empty */
+#line 6980 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1009: /* opt_without_overlaps: ',' ident WITHOUT OVERLAPS_SYM */
+#line 6982 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_key->without_overlaps= true;
+ Lex->last_key->period= (yyvsp[-2].ident_sys);
+ }
+#line 36997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1010: /* key_part: ident */
+#line 6990 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
+ if (unlikely((yyval.key_part) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1011: /* key_part: ident '(' NUM ')' */
+#line 6996 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int key_part_len= atoi((yyvsp[-1].lex_str).str);
+ if (unlikely(!key_part_len))
+ my_yyabort_error((ER_KEY_PART_0, MYF(0), (yyvsp[-3].ident_sys).str));
+ (yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[-3].ident_sys), (uint) key_part_len);
+ if (unlikely((yyval.key_part) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1012: /* opt_ident: %empty */
+#line 7007 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 37026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1013: /* opt_ident: field_ident */
+#line 7008 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].lex_str); }
+#line 37032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1014: /* string_list: text_string */
+#line 7013 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
+#line 37038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1015: /* string_list: string_list ',' text_string */
+#line 7015 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
+#line 37044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1016: /* $@94: %empty */
+#line 7024 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->name= null_clex_str;
+ Lex->table_type= TABLE_TYPE_UNKNOWN;
+ Lex->sql_command= SQLCOM_ALTER_TABLE;
+ 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);
+ }
+#line 37064 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1017: /* $@95: %empty */
+#line 7040 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.set((yyvsp[-2].object_ddl_options));
+ if (!Lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT, MDL_SHARED_UPGRADABLE))
+ MYSQL_YYABORT;
+ 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();
+ }
+#line 37080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1018: /* alter: ALTER $@94 alter_options TABLE_SYM opt_if_exists table_ident opt_lock_wait_timeout $@95 alter_commands */
+#line 7052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (likely(!Lex->m_sql_cmd))
+ {
+ /* Create a generic ALTER TABLE statment. */
+ Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+ Lex->pop_select(); //main select
+ }
+#line 37095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1019: /* $@96: %empty */
+#line 7063 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.init();
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 37105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1020: /* alter: ALTER DATABASE ident_or_empty $@96 create_database_options */
+#line 7069 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_ALTER_DB;
+ lex->name= (yyvsp[-2].ident_sys);
+ if (lex->name.str == NULL &&
+ unlikely(lex->copy_db_to(&lex->name)))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ }
+#line 37119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1021: /* $@97: %empty */
+#line 7079 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.init();
+ Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
+ Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
+ }
+#line 37129 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1022: /* alter: ALTER DATABASE COMMENT_SYM opt_equal TEXT_STRING_sys $@97 opt_create_database_options */
+#line 7085 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_ALTER_DB;
+ lex->name= Lex_ident_sys();
+ if (lex->name.str == NULL &&
+ unlikely(lex->copy_db_to(&lex->name)))
+ MYSQL_YYABORT;
+ }
+#line 37142 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1023: /* alter: ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM */
+#line 7094 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "DATABASE"));
+ lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
+ lex->name= (yyvsp[-4].ident_sys);
+ }
+#line 37154 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1024: /* $@98: %empty */
+#line 7102 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_procedure_start((yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 37163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1025: /* alter: ALTER PROCEDURE_SYM sp_name $@98 sp_a_chistics stmt_end */
+#line 7107 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37169 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1026: /* $@99: %empty */
+#line 7109 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_function_start((yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 37178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1027: /* alter: ALTER FUNCTION_SYM sp_name $@99 sp_a_chistics stmt_end */
+#line 7114 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37184 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1028: /* $@100: %empty */
+#line 7116 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, (yyvsp[-4].num), (yyvsp[-2].view_suid), (yyvsp[0].table)))
+ MYSQL_YYABORT;
+ }
+#line 37195 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1029: /* alter: ALTER view_algorithm definer_opt opt_view_suid VIEW_SYM table_ident $@100 view_list_opt AS view_select stmt_end */
+#line 7122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37201 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1030: /* $@101: %empty */
+#line 7129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, (yyvsp[-2].view_suid), (yyvsp[0].table)))
+ MYSQL_YYABORT;
+ }
+#line 37212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1031: /* alter: ALTER definer_opt opt_view_suid VIEW_SYM table_ident $@101 view_list_opt AS view_select stmt_end */
+#line 7135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1032: /* $@102: %empty */
+#line 7137 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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
+ If it had to be supported spname had to be added to
+ Event_parse_data.
+ */
+
+ if (unlikely(!(Lex->event_parse_data= Event_parse_data::new_instance(thd))))
+ MYSQL_YYABORT;
+ Lex->event_parse_data->identifier= (yyvsp[0].spname);
+
+ Lex->sql_command= SQLCOM_ALTER_EVENT;
+ Lex->stmt_definition_begin= (yyvsp[-2].simple_string);
+ }
+#line 37241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1033: /* alter: ALTER definer_opt remember_name EVENT_SYM sp_name $@102 ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_status opt_ev_comment opt_ev_sql_stmt */
+#line 7160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ /*
+ sql_command is set here because some rules in ev_sql_stmt
+ can overwrite it
+ */
+ Lex->sql_command= SQLCOM_ALTER_EVENT;
+ Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
+
+ Lex->pop_select(); //main select
+ }
+#line 37261 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1034: /* $@103: %empty */
+#line 7176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_ALTER_SERVER;
+ lex->server_options.reset((yyvsp[0].lex_str));
+ }
+#line 37271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1035: /* alter: ALTER SERVER_SYM ident_or_text $@103 OPTIONS_SYM '(' server_options_list ')' */
+#line 7180 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 37277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1036: /* alter: ALTER USER_SYM opt_if_exists clear_privileges grant_list opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration */
+#line 7184 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.set((yyvsp[-5].object_ddl_options));
+ Lex->sql_command= SQLCOM_ALTER_USER;
+ }
+#line 37286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1037: /* $@104: %empty */
+#line 7189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_ALTER_SEQUENCE;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 37298 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1038: /* $@105: %empty */
+#line 7197 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!(lex->create_info.seq_create_info= new (thd->mem_root)
+ sequence_definition()) ||
+ !lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_SEQUENCE,
+ TL_WRITE, MDL_EXCLUSIVE))
+ MYSQL_YYABORT;
+ }
+#line 37312 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1039: /* $@106: %empty */
+#line 7207 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Create a generic ALTER SEQUENCE statment. */
+ Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence((yyvsp[-4].object_ddl_options));
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37323 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1040: /* alter: ALTER SEQUENCE_SYM opt_if_exists $@104 table_ident $@105 sequence_defs $@106 stmt_end */
+#line 7212 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1041: /* account_locking_option: LOCK_SYM */
+#line 7217 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
+ }
+#line 37337 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1042: /* account_locking_option: UNLOCK_SYM */
+#line 7221 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
+ }
+#line 37345 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1043: /* opt_password_expire_option: %empty */
+#line 7228 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
+ }
+#line 37353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1044: /* opt_password_expire_option: NEVER_SYM */
+#line 7232 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
+ }
+#line 37361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1045: /* opt_password_expire_option: DEFAULT */
+#line 7236 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
+ }
+#line 37369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1046: /* opt_password_expire_option: INTERVAL_SYM NUM DAY_SYM */
+#line 7240 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_INTERVAL;
+ if (!(Lex->account_options.num_expiration_days= atoi((yyvsp[-1].lex_str).str)))
+ my_yyabort_error((ER_WRONG_VALUE, MYF(0), "DAY", (yyvsp[-1].lex_str).str));
+ }
+#line 37379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1052: /* ev_alter_on_schedule_completion: %empty */
+#line 7256 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0;}
+#line 37385 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1053: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time */
+#line 7257 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 37391 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1054: /* ev_alter_on_schedule_completion: ev_on_completion */
+#line 7258 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 37397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1055: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time ev_on_completion */
+#line 7259 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 37403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1056: /* opt_ev_rename_to: %empty */
+#line 7263 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0;}
+#line 37409 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1057: /* opt_ev_rename_to: RENAME TO_SYM sp_name */
+#line 7265 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Use lex's spname to hold the new name.
+ The original name is in the Event_parse_data object
+ */
+ Lex->spname= (yyvsp[0].spname);
+ (yyval.num)= 1;
+ }
+#line 37422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1058: /* opt_ev_sql_stmt: %empty */
+#line 7276 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0;}
+#line 37428 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1059: /* opt_ev_sql_stmt: DO_SYM ev_sql_stmt */
+#line 7277 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 37434 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1060: /* ident_or_empty: %empty */
+#line 7282 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_sys)= Lex_ident_sys(); }
+#line 37440 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1063: /* alter_commands: DISCARD TABLESPACE */
+#line 7289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_discard_import_tablespace(
+ Sql_cmd_discard_import_tablespace::DISCARD_TABLESPACE);
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37452 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1064: /* alter_commands: IMPORT TABLESPACE */
+#line 7297 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_discard_import_tablespace(
+ Sql_cmd_discard_import_tablespace::IMPORT_TABLESPACE);
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1070: /* alter_commands: DROP PARTITION_SYM opt_if_exists alt_part_name_list */
+#line 7319 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_DROP;
+ DBUG_ASSERT(!Lex->if_exists());
+ Lex->create_info.add((yyvsp[-1].object_ddl_options));
+ }
+#line 37474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1071: /* alter_commands: REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
+#line 7326 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->alter_info.partition_flags|= ALTER_PARTITION_REBUILD;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ }
+#line 37484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1072: /* $@107: %empty */
+#line 7333 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_optimize_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1074: /* alter_commands: ANALYZE_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
+#line 7346 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_analyze_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37514 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1075: /* $@108: %empty */
+#line 7357 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_check_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1077: /* $@109: %empty */
+#line 7369 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_repair_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37543 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1079: /* alter_commands: COALESCE PARTITION_SYM opt_no_write_to_binlog real_ulong_num */
+#line 7381 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->alter_info.partition_flags|= ALTER_PARTITION_COALESCE;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->alter_info.num_parts= (yyvsp[0].ulong_num);
+ }
+#line 37554 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1080: /* alter_commands: TRUNCATE_SYM PARTITION_SYM all_or_alt_part_name_list */
+#line 7388 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_truncate_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37568 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1082: /* alter_commands: EXCHANGE_SYM PARTITION_SYM alt_part_name_item WITH TABLE_SYM table_ident have_partitioning */
+#line 7400 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_table_exchange_partition((yyvsp[-1].table)))
+ MYSQL_YYABORT;
+ }
+#line 37577 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1083: /* alter_commands: CONVERT_SYM PARTITION_SYM alt_part_name_item TO_SYM TABLE_SYM table_ident have_partitioning */
+#line 7406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (Lex->stmt_alter_table((yyvsp[-1].table)))
+ MYSQL_YYABORT;
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.partition_flags|= ALTER_PARTITION_CONVERT_OUT;
+ }
+#line 37591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1084: /* $@110: %empty */
+#line 7416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), nullptr, 0,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
+ MYSQL_YYABORT;
+
+ /*
+ This will appear as (new_db, new_name) in alter_ctx.
+ new_db will be IX-locked and new_name X-locked.
+ */
+ lex->first_select_lex()->db= (yyvsp[0].table)->db;
+ lex->name= (yyvsp[0].table)->table;
+ if (lex->first_select_lex()->db.str == NULL &&
+ lex->copy_db_to(&lex->first_select_lex()->db))
+ MYSQL_YYABORT;
+
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+
+ lex->part_info->num_parts= 1;
+ /*
+ OR-ed with ALTER_PARTITION_ADD because too many checks of
+ ALTER_PARTITION_ADD required.
+ */
+ lex->alter_info.partition_flags|= ALTER_PARTITION_ADD |
+ ALTER_PARTITION_CONVERT_IN;
+ }
+#line 37625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1085: /* alter_commands: CONVERT_SYM TABLE_SYM table_ident $@110 TO_SYM PARTITION_SYM part_definition */
+#line 7446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37636 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1086: /* remove_partitioning: REMOVE_SYM PARTITIONING_SYM */
+#line 7456 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
+ }
+#line 37644 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1087: /* all_or_alt_part_name_list: ALL */
+#line 7463 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
+ }
+#line 37652 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1089: /* $@111: %empty */
+#line 7472 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+
+ lex->alter_info.partition_flags|= ALTER_PARTITION_ADD;
+ DBUG_ASSERT(!Lex->create_info.if_not_exists());
+ lex->create_info.set((yyvsp[-1].object_ddl_options));
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ }
+#line 37668 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1090: /* add_partition_rule: ADD PARTITION_SYM opt_if_not_exists opt_no_write_to_binlog $@111 add_part_extra */
+#line 7484 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37674 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1092: /* add_part_extra: '(' part_def_list ')' */
+#line 7490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info->num_parts= lex->part_info->partitions.elements;
+ }
+#line 37683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1093: /* add_part_extra: PARTITIONS_SYM real_ulong_num */
+#line 7495 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->part_info->num_parts= (yyvsp[0].ulong_num);
+ }
+#line 37691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1094: /* $@112: %empty */
+#line 7502 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ }
+#line 37704 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1096: /* reorg_parts_rule: %empty */
+#line 7515 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
+ }
+#line 37712 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1097: /* $@113: %empty */
+#line 7519 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
+ }
+#line 37720 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1098: /* reorg_parts_rule: alt_part_name_list $@113 INTO '(' part_def_list ')' */
+#line 7523 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->num_parts= part_info->partitions.elements;
+ }
+#line 37729 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1099: /* alt_part_name_list: alt_part_name_item */
+#line 7530 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37735 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1100: /* alt_part_name_list: alt_part_name_list ',' alt_part_name_item */
+#line 7531 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37741 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1101: /* alt_part_name_item: ident */
+#line 7536 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->alter_info.partition_names.push_back((yyvsp[0].ident_sys).str,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 37751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1105: /* alter_list_item: add_column column_def opt_place */
+#line 7558 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->create_last_non_select_table= lex->last_table();
+ lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
+ (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
+ }
+#line 37762 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1106: /* alter_list_item: ADD key_def */
+#line 7565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ Lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 37771 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1107: /* alter_list_item: ADD period_for_system_time */
+#line 7570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_PERIOD;
+ }
+#line 37779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1108: /* alter_list_item: ADD PERIOD_SYM opt_if_not_exists_table_element period_for_application_time */
+#line 7575 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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;
+ }
+#line 37789 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1109: /* alter_list_item: add_column '(' create_field_list ')' */
+#line 7581 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
+ if (!lex->alter_info.key_list.is_empty())
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 37800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1110: /* alter_list_item: ADD constraint_def */
+#line 7588 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
+ }
+#line 37808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1111: /* alter_list_item: ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint */
+#line 7592 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
+ Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), TRUE);
+ }
+#line 37817 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1112: /* alter_list_item: CHANGE opt_column opt_if_exists_table_element field_ident field_spec opt_place */
+#line 7598 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_CHANGE_COLUMN | ALTER_RENAME_COLUMN;
+ Lex->create_last_non_select_table= Lex->last_table();
+ (yyvsp[-1].create_field)->change= (yyvsp[-2].lex_str);
+ (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
+ }
+#line 37828 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1113: /* alter_list_item: MODIFY_SYM opt_column opt_if_exists_table_element field_spec opt_place */
+#line 7606 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
+ Lex->create_last_non_select_table= Lex->last_table();
+ (yyvsp[-1].create_field)->change= (yyvsp[-1].create_field)->field_name;
+ (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
+ }
+#line 37839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1114: /* alter_list_item: DROP opt_column opt_if_exists_table_element field_ident opt_restrict */
+#line 7613 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::COLUMN, (yyvsp[-1].lex_str).str, (yyvsp[-2].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_PARSER_DROP_COLUMN;
+ }
+#line 37853 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1115: /* alter_list_item: DROP CONSTRAINT opt_if_exists_table_element field_ident */
+#line 7623 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::CHECK_CONSTRAINT,
+ (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
+ 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;
+ }
+#line 37868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1116: /* alter_list_item: DROP FOREIGN KEY_SYM opt_if_exists_table_element field_ident */
+#line 7634 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::FOREIGN_KEY, (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY;
+ }
+#line 37882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1117: /* alter_list_item: DROP opt_constraint_no_id PRIMARY_SYM KEY_SYM */
+#line 7644 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::KEY, primary_key_name.str,
+ FALSE));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_DROP_INDEX;
+ }
+#line 37897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1118: /* alter_list_item: DROP key_or_index opt_if_exists_table_element field_ident */
+#line 7655 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::KEY, (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_DROP_INDEX;
+ }
+#line 37911 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1119: /* alter_list_item: DISABLE_SYM KEYS */
+#line 7665 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.keys_onoff= Alter_info::DISABLE;
+ lex->alter_info.flags|= ALTER_KEYS_ONOFF;
+ }
+#line 37921 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1120: /* alter_list_item: ENABLE_SYM KEYS */
+#line 7671 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.keys_onoff= Alter_info::ENABLE;
+ lex->alter_info.flags|= ALTER_KEYS_ONOFF;
+ }
+#line 37931 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1121: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident SET DEFAULT column_default_expr */
+#line 7677 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (check_expression((yyvsp[0].virtual_column), &(yyvsp[-3].lex_str), VCOL_DEFAULT))
+ MYSQL_YYABORT;
+ if (unlikely(Lex->add_alter_list((yyvsp[-3].lex_str), (yyvsp[0].virtual_column), (yyvsp[-4].num))))
+ MYSQL_YYABORT;
+ }
+#line 37942 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1122: /* alter_list_item: ALTER key_or_index opt_if_exists_table_element ident ignorability */
+#line 7684 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ Alter_index_ignorability *ac= new (thd->mem_root)
+ Alter_index_ignorability((yyvsp[-1].ident_sys).str, (yyvsp[0].num), (yyvsp[-2].num));
+ if (ac == NULL)
+ MYSQL_YYABORT;
+ lex->alter_info.alter_index_ignorability_list.push_back(ac);
+ lex->alter_info.flags|= ALTER_INDEX_IGNORABILITY;
+ }
+#line 37956 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1123: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident DROP DEFAULT */
+#line 7694 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_alter_list((yyvsp[-2].lex_str), (Virtual_column_info*) 0, (yyvsp[-3].num))))
+ MYSQL_YYABORT;
+ }
+#line 37965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1124: /* alter_list_item: RENAME opt_to table_ident */
+#line 7699 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_table((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ Lex->alter_info.flags|= ALTER_RENAME;
+ }
+#line 37975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1125: /* alter_list_item: RENAME COLUMN_SYM opt_if_exists_table_element ident TO_SYM ident */
+#line 7705 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_alter_list((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), (yyvsp[-3].num))))
+ MYSQL_YYABORT;
+ }
+#line 37984 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1126: /* alter_list_item: RENAME key_or_index opt_if_exists_table_element field_ident TO_SYM field_ident */
+#line 7710 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_rename_key *ak= new (thd->mem_root)
+ Alter_rename_key((yyvsp[-2].lex_str), (yyvsp[0].lex_str), (yyvsp[-3].num));
+ if (ak == NULL)
+ MYSQL_YYABORT;
+ lex->alter_info.alter_rename_key_list.push_back(ak);
+ lex->alter_info.flags|= ALTER_RENAME_INDEX;
+ }
+#line 37998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1127: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default */
+#line 7720 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_alter_list_item_convert_to_charset((yyvsp[0].charset)))
+ MYSQL_YYABORT;
+ }
+#line 38007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1128: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default COLLATE_SYM collation_name_or_default */
+#line 7726 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_alter_list_item_convert_to_charset((yyvsp[-2].charset), (yyvsp[0].Lex_extended_collation)))
+ MYSQL_YYABORT;
+ }
+#line 38016 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1129: /* alter_list_item: create_table_options_space_separated */
+#line 7731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.flags|= ALTER_OPTIONS;
+ }
+#line 38025 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1130: /* alter_list_item: FORCE_SYM */
+#line 7736 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_RECREATE;
+ }
+#line 38033 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1131: /* alter_list_item: alter_order_clause */
+#line 7740 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.flags|= ALTER_ORDER;
+ }
+#line 38042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1134: /* alter_list_item: ADD SYSTEM VERSIONING_SYM */
+#line 7747 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
+ Lex->create_info.options|= HA_VERSIONED_TABLE;
+ }
+#line 38051 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1135: /* alter_list_item: DROP SYSTEM VERSIONING_SYM */
+#line 7752 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
+ Lex->create_info.options&= ~HA_VERSIONED_TABLE;
+ }
+#line 38060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1136: /* alter_list_item: DROP PERIOD_SYM FOR_SYSTEM_TIME_SYM */
+#line 7757 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_DROP_PERIOD;
+ }
+#line 38068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1137: /* alter_list_item: DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident */
+#line 7761 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Alter_drop *ad= new Alter_drop(Alter_drop::PERIOD, (yyvsp[0].ident_sys).str, (yyvsp[-2].num));
+ 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;
+ }
+#line 38080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1143: /* alter_algorithm_option: ALGORITHM_SYM opt_equal DEFAULT */
+#line 7780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.set_requested_algorithm(
+ Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT);
+ }
+#line 38089 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1144: /* alter_algorithm_option: ALGORITHM_SYM opt_equal ident */
+#line 7785 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->alter_info.set_requested_algorithm(&(yyvsp[0].ident_sys))))
+ my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 38098 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1145: /* alter_lock_option: LOCK_SYM opt_equal DEFAULT */
+#line 7793 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.requested_lock=
+ Alter_info::ALTER_TABLE_LOCK_DEFAULT;
+ }
+#line 38107 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1146: /* alter_lock_option: LOCK_SYM opt_equal ident */
+#line 7798 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->alter_info.set_requested_lock(&(yyvsp[0].ident_sys))))
+ my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 38116 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1147: /* opt_column: %empty */
+#line 7805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38122 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1148: /* opt_column: COLUMN_SYM */
+#line 7806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38128 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1149: /* opt_ignore: %empty */
+#line 7810 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 0;}
+#line 38134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1150: /* opt_ignore: IGNORE_SYM */
+#line 7811 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1;}
+#line 38140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1151: /* $@114: %empty */
+#line 7815 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 0;}
+#line 38146 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1157: /* alter_option: IGNORE_SYM */
+#line 7829 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1;}
+#line 38152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1158: /* alter_option: ONLINE_SYM */
+#line 7831 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.requested_lock=
+ Alter_info::ALTER_TABLE_LOCK_NONE;
+ }
+#line 38161 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1159: /* opt_restrict: %empty */
+#line 7838 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->drop_mode= DROP_DEFAULT; }
+#line 38167 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1160: /* opt_restrict: RESTRICT */
+#line 7839 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->drop_mode= DROP_RESTRICT; }
+#line 38173 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1161: /* opt_restrict: CASCADE */
+#line 7840 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->drop_mode= DROP_CASCADE; }
+#line 38179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1162: /* opt_place: %empty */
+#line 7844 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 38185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1163: /* opt_place: AFTER_SYM ident */
+#line 7846 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str)= (yyvsp[0].ident_sys);
+ Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
+ }
+#line 38194 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1164: /* opt_place: FIRST_SYM */
+#line 7851 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str).str= first_keyword;
+ (yyval.lex_str).length= 5; /* Length of "first" */
+ Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
+ }
+#line 38204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1165: /* opt_to: %empty */
+#line 7859 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1166: /* opt_to: TO_SYM */
+#line 7860 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38216 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1167: /* opt_to: '=' */
+#line 7861 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38222 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1168: /* opt_to: AS */
+#line 7862 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38228 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1169: /* $@115: %empty */
+#line 7867 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_START;
+ lex->type = 0;
+ /* If you change this code don't forget to update SLAVE START too */
+ }
+#line 38239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1170: /* slave: START_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel $@115 slave_until */
+#line 7874 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38245 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1171: /* $@116: %empty */
+#line 7876 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_ALL_START;
+ lex->type = 0;
+ /* If you change this code don't forget to update STOP SLAVE too */
+ }
+#line 38256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1172: /* slave: START_SYM ALL SLAVES slave_thread_opts $@116 */
+#line 7882 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1173: /* slave: STOP_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel */
+#line 7884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_STOP;
+ lex->type = 0;
+ /* If you change this code don't forget to update SLAVE STOP too */
+ }
+#line 38273 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1174: /* slave: STOP_SYM ALL SLAVES slave_thread_opts */
+#line 7891 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_ALL_STOP;
+ lex->type = 0;
+ /* If you change this code don't forget to update SLAVE STOP too */
+ }
+#line 38284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1175: /* start: START_SYM TRANSACTION_SYM opt_start_transaction_option_list */
+#line 7901 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_BEGIN;
+ /* READ ONLY and READ WRITE are mutually exclusive. */
+ if (unlikely(((yyvsp[0].num) & MYSQL_START_TRANS_OPT_READ_WRITE) &&
+ ((yyvsp[0].num) & MYSQL_START_TRANS_OPT_READ_ONLY)))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ lex->start_transaction_opt= (yyvsp[0].num);
+ }
+#line 38301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1176: /* opt_start_transaction_option_list: %empty */
+#line 7917 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= 0;
+ }
+#line 38309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1177: /* opt_start_transaction_option_list: start_transaction_option_list */
+#line 7921 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (yyvsp[0].num);
+ }
+#line 38317 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1178: /* start_transaction_option_list: start_transaction_option */
+#line 7928 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (yyvsp[0].num);
+ }
+#line 38325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1179: /* start_transaction_option_list: start_transaction_option_list ',' start_transaction_option */
+#line 7932 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
+ }
+#line 38333 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1180: /* start_transaction_option: WITH CONSISTENT_SYM SNAPSHOT_SYM */
+#line 7939 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
+ }
+#line 38341 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1181: /* start_transaction_option: READ_SYM ONLY_SYM */
+#line 7943 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
+ }
+#line 38349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1182: /* start_transaction_option: READ_SYM WRITE_SYM */
+#line 7947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
+ }
+#line 38357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1183: /* $@117: %empty */
+#line 7953 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->slave_thd_opt= 0; }
+#line 38363 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1184: /* slave_thread_opts: $@117 slave_thread_opt_list */
+#line 7955 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1187: /* slave_thread_opt: %empty */
+#line 7964 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38375 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1188: /* slave_thread_opt: SQL_THREAD */
+#line 7965 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->slave_thd_opt|=SLAVE_SQL; }
+#line 38381 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1189: /* slave_thread_opt: RELAY_THREAD */
+#line 7966 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->slave_thd_opt|=SLAVE_IO; }
+#line 38387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1190: /* slave_until: %empty */
+#line 7970 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1191: /* slave_until: UNTIL_SYM slave_until_opts */
+#line 7972 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(((lex->mi.log_file_name || lex->mi.pos) &&
+ (lex->mi.relay_log_name || lex->mi.relay_log_pos)) ||
+ !((lex->mi.log_file_name && lex->mi.pos) ||
+ (lex->mi.relay_log_name && lex->mi.relay_log_pos))))
+ my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0)));
+ }
+#line 38406 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1192: /* slave_until: UNTIL_SYM MASTER_GTID_POS_SYM '=' TEXT_STRING_sys */
+#line 7981 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
+ }
+#line 38414 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1195: /* $@118: %empty */
+#line 7993 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_CHECKSUM;
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 38425 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1196: /* checksum: CHECKSUM_SYM table_or_tables $@118 table_list opt_checksum_type */
+#line 8000 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1197: /* opt_checksum_type: %empty */
+#line 8004 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags= 0; }
+#line 38437 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1198: /* opt_checksum_type: QUICK */
+#line 8005 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags= T_QUICK; }
+#line 38443 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1199: /* opt_checksum_type: EXTENDED_SYM */
+#line 8006 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags= T_EXTEND; }
+#line 38449 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1201: /* $@119: %empty */
+#line 8012 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->table_type= TABLE_TYPE_VIEW; }
+#line 38455 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1203: /* $@120: %empty */
+#line 8018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_REPAIR;
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 38469 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1204: /* repair: REPAIR opt_no_write_to_binlog $@120 repair_table_or_view */
+#line 8028 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_repair_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1205: /* opt_mi_repair_type: %empty */
+#line 8038 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags = T_MEDIUM; }
+#line 38487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1206: /* opt_mi_repair_type: mi_repair_types */
+#line 8039 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38493 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1207: /* mi_repair_types: mi_repair_type */
+#line 8043 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1208: /* mi_repair_types: mi_repair_type mi_repair_types */
+#line 8044 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1209: /* mi_repair_type: QUICK */
+#line 8048 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_QUICK; }
+#line 38511 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1210: /* mi_repair_type: EXTENDED_SYM */
+#line 8049 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_EXTEND; }
+#line 38517 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1211: /* mi_repair_type: USE_FRM */
+#line 8050 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_USEFRM; }
+#line 38523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1212: /* opt_view_repair_type: %empty */
+#line 8054 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 38529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1213: /* opt_view_repair_type: FOR_SYM UPGRADE_SYM */
+#line 8055 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
+#line 38535 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1214: /* opt_view_repair_type: FROM MYSQL_SYM */
+#line 8056 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
+#line 38541 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1215: /* $@121: %empty */
+#line 8061 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_ANALYZE;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 38555 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1216: /* analyze: ANALYZE_SYM opt_no_write_to_binlog table_or_tables $@121 analyze_table_list */
+#line 8071 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_analyze_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38567 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1220: /* opt_persistent_stat_clause: %empty */
+#line 8091 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1221: /* opt_persistent_stat_clause: PERSISTENT_SYM FOR_SYM persistent_stat_spec */
+#line 8093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->lex->with_persistent_for_clause= TRUE;
+ }
+#line 38581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1222: /* persistent_stat_spec: ALL */
+#line 8100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38587 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1223: /* persistent_stat_spec: COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec */
+#line 8102 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1224: /* persistent_column_stat_spec: ALL */
+#line 8106 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38599 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1225: /* $@122: %empty */
+#line 8108 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ lex->column_list= new (thd->mem_root) List<LEX_STRING>;
+ if (unlikely(lex->column_list == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1226: /* persistent_column_stat_spec: '(' $@122 table_column_list ')' */
+#line 8116 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 38616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1227: /* persistent_index_stat_spec: ALL */
+#line 8120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38622 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1228: /* $@123: %empty */
+#line 8122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ lex->index_list= new (thd->mem_root) List<LEX_STRING>;
+ if (unlikely(lex->index_list == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1229: /* persistent_index_stat_spec: '(' $@123 table_index_list ')' */
+#line 8130 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 38639 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1230: /* table_column_list: %empty */
+#line 8135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1231: /* table_column_list: ident */
+#line 8137 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->column_list->push_back((LEX_STRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
+ }
+#line 38654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1232: /* table_column_list: table_column_list ',' ident */
+#line 8142 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->column_list->push_back((LEX_STRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
+ }
+#line 38663 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1233: /* table_index_list: %empty */
+#line 8150 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38669 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1236: /* table_index_name: ident */
+#line 8157 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->index_list->push_back((LEX_STRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)),
+ thd->mem_root);
+ }
+#line 38679 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1237: /* table_index_name: PRIMARY_SYM */
+#line 8164 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_STRING str= {(char*) "PRIMARY", 7};
+ Lex->index_list->push_back((LEX_STRING*)
+ thd->memdup(&str, sizeof(LEX_STRING)),
+ thd->mem_root);
+ }
+#line 38690 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1238: /* binlog_base64_event: BINLOG_SYM TEXT_STRING_sys */
+#line 8174 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
+ Lex->comment= (yyvsp[0].lex_str);
+ Lex->ident.str= NULL;
+ Lex->ident.length= 0;
+ }
+#line 38701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1239: /* binlog_base64_event: BINLOG_SYM '@' ident_or_text ',' '@' ident_or_text */
+#line 8182 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
+ Lex->comment= (yyvsp[-3].lex_str);
+ Lex->ident= (yyvsp[0].lex_str);
+ }
+#line 38711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1241: /* $@124: %empty */
+#line 8192 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->table_type= TABLE_TYPE_VIEW; }
+#line 38717 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1243: /* $@125: %empty */
+#line 8197 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+
+ lex->sql_command = SQLCOM_CHECK;
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 38731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1244: /* check: CHECK_SYM $@125 check_view_or_table */
+#line 8207 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "CHECK"));
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_check_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38745 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1245: /* opt_mi_check_type: %empty */
+#line 8219 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags = T_MEDIUM; }
+#line 38751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1246: /* opt_mi_check_type: mi_check_types */
+#line 8220 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1247: /* mi_check_types: mi_check_type */
+#line 8224 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1248: /* mi_check_types: mi_check_type mi_check_types */
+#line 8225 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1249: /* mi_check_type: QUICK */
+#line 8229 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_QUICK; }
+#line 38775 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1250: /* mi_check_type: FAST_SYM */
+#line 8230 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_FAST; }
+#line 38781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1251: /* mi_check_type: MEDIUM_SYM */
+#line 8231 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_MEDIUM; }
+#line 38787 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1252: /* mi_check_type: EXTENDED_SYM */
+#line 8232 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_EXTEND; }
+#line 38793 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1253: /* mi_check_type: CHANGED */
+#line 8233 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
+#line 38799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1254: /* mi_check_type: FOR_SYM UPGRADE_SYM */
+#line 8234 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
+#line 38805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1255: /* opt_view_check_type: %empty */
+#line 8238 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 38811 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1256: /* opt_view_check_type: FOR_SYM UPGRADE_SYM */
+#line 8239 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
+#line 38817 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1257: /* $@126: %empty */
+#line 8244 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_OPTIMIZE;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 38831 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1258: /* optimize: OPTIMIZE opt_no_write_to_binlog table_or_tables $@126 table_list opt_lock_wait_timeout */
+#line 8254 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_optimize_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1259: /* opt_no_write_to_binlog: %empty */
+#line 8264 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 38849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1260: /* opt_no_write_to_binlog: NO_WRITE_TO_BINLOG */
+#line 8265 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 38855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1261: /* opt_no_write_to_binlog: LOCAL_SYM */
+#line 8266 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 38861 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1262: /* $@127: %empty */
+#line 8271 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_RENAME_TABLE;
+ Lex->create_info.set((yyvsp[0].object_ddl_options));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 38872 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1263: /* rename: RENAME table_or_tables opt_if_exists $@127 table_to_table_list */
+#line 8278 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 38880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1264: /* rename: RENAME USER_SYM clear_privileges rename_list */
+#line 8282 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_RENAME_USER;
+ }
+#line 38888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1265: /* rename_list: user TO_SYM user */
+#line 8289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) ||
+ Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 38898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1266: /* rename_list: rename_list ',' user TO_SYM user */
+#line 8295 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) ||
+ Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 38908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1269: /* table_to_table: table_ident opt_lock_wait_timeout TO_SYM table_ident */
+#line 8309 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ SELECT_LEX *sl= lex->current_select;
+ if (unlikely(!sl->add_table_to_list(thd, (yyvsp[-3].table),NULL,
+ TL_OPTION_UPDATING,
+ TL_IGNORE, MDL_EXCLUSIVE)) ||
+ unlikely(!sl->add_table_to_list(thd, (yyvsp[0].table), NULL,
+ TL_OPTION_UPDATING,
+ TL_IGNORE, MDL_EXCLUSIVE)))
+ MYSQL_YYABORT;
+ }
+#line 38924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1270: /* $@128: %empty */
+#line 8324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.reset();
+ }
+#line 38932 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1271: /* keycache: CACHE_SYM INDEX_SYM $@128 keycache_list_or_parts IN_SYM key_cache_name */
+#line 8328 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
+ lex->ident= (yyvsp[0].lex_str);
+ }
+#line 38942 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1276: /* assign_to_keycache: table_ident cache_keys_spec */
+#line 8347 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 38954 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1277: /* assign_to_keycache_parts: table_ident adm_partition cache_keys_spec */
+#line 8358 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 38966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1278: /* key_cache_name: ident */
+#line 8368 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 38972 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1279: /* key_cache_name: DEFAULT */
+#line 8369 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str) = default_key_cache_base; }
+#line 38978 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1280: /* $@129: %empty */
+#line 8374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_PRELOAD_KEYS;
+ lex->alter_info.reset();
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 38990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1281: /* preload: LOAD INDEX_SYM INTO CACHE_SYM $@129 preload_list_or_parts */
+#line 8382 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 38998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1286: /* preload_keys: table_ident cache_keys_spec opt_ignore_leaves */
+#line 8399 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 39010 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1287: /* preload_keys_parts: table_ident adm_partition cache_keys_spec opt_ignore_leaves */
+#line 8410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 39022 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1288: /* $@130: %empty */
+#line 8421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
+ }
+#line 39030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1290: /* $@131: %empty */
+#line 8428 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->first_select_lex()->alloc_index_hints(thd);
+ Select->set_index_hint_type(INDEX_HINT_USE,
+ INDEX_HINT_MASK_ALL);
+ }
+#line 39040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1292: /* cache_key_list_or_empty: %empty */
+#line 8437 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 39046 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1294: /* opt_ignore_leaves: %empty */
+#line 8443 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 39052 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1295: /* opt_ignore_leaves: IGNORE_SYM LEAVES */
+#line 8444 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
+#line 39058 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1296: /* $@132: %empty */
+#line 8454 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex_unit)->fake_select_lex ?
+ (yyvsp[0].select_lex_unit)->fake_select_lex :
+ (yyvsp[0].select_lex_unit)->first_select()))
+ MYSQL_YYABORT;
+ }
+#line 39069 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1297: /* select: query_expression_no_with_clause $@132 opt_procedure_or_into */
+#line 8461 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select();
+ (yyvsp[-2].select_lex_unit)->set_with_clause(NULL);
+ if (Lex->select_finalize((yyvsp[-2].select_lex_unit), (yyvsp[0].select_lock)))
+ MYSQL_YYABORT;
+ }
+#line 39080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1298: /* $@133: %empty */
+#line 8468 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex_unit)->fake_select_lex ?
+ (yyvsp[0].select_lex_unit)->fake_select_lex :
+ (yyvsp[0].select_lex_unit)->first_select()))
+ MYSQL_YYABORT;
+ }
+#line 39091 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1299: /* select: with_clause query_expression_no_with_clause $@133 opt_procedure_or_into */
+#line 8475 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select();
+ (yyvsp[-2].select_lex_unit)->set_with_clause((yyvsp[-3].with_clause));
+ (yyvsp[-3].with_clause)->attach_to((yyvsp[-2].select_lex_unit)->first_select());
+ if (Lex->select_finalize((yyvsp[-2].select_lex_unit), (yyvsp[0].select_lock)))
+ MYSQL_YYABORT;
+ }
+#line 39103 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1300: /* $@134: %empty */
+#line 8486 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex)))
+ MYSQL_YYABORT;
+ }
+#line 39112 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1301: /* select_into: select_into_query_specification $@134 opt_order_limit_lock */
+#line 8491 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit((yyvsp[-2].select_lex))))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].order_limit_lock))
+ unit= Lex->add_tail_to_query_expression_body(unit, (yyvsp[0].order_limit_lock));
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
+ }
+#line 39126 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1302: /* $@135: %empty */
+#line 8502 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex)))
+ MYSQL_YYABORT;
+ }
+#line 39135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1303: /* select_into: with_clause select_into_query_specification $@135 opt_order_limit_lock */
+#line 8507 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit((yyvsp[-2].select_lex))))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].order_limit_lock))
+ unit= Lex->add_tail_to_query_expression_body(unit, (yyvsp[0].order_limit_lock));
+ unit->set_with_clause((yyvsp[-3].with_clause));
+ (yyvsp[-3].with_clause)->attach_to((yyvsp[-2].select_lex));
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
+ }
+#line 39151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1304: /* simple_table: query_specification */
+#line 8521 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex); }
+#line 39157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1305: /* simple_table: table_value_constructor */
+#line 8522 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex); }
+#line 39163 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1306: /* $@136: %empty */
+#line 8527 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->parsed_TVC_start())
+ MYSQL_YYABORT;
+ }
+#line 39172 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1307: /* table_value_constructor: VALUES $@136 values_list */
+#line 8532 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex)= Lex->parsed_TVC_end()))
+ MYSQL_YYABORT;
+ }
+#line 39181 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1308: /* $@137: %empty */
+#line 8540 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel;
+ LEX *lex= Lex;
+ if (!(sel= lex->alloc_select(TRUE)) || lex->push_select(sel))
+ MYSQL_YYABORT;
+ sel->init_select();
+ sel->braces= FALSE;
+ }
+#line 39194 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1309: /* $@138: %empty */
+#line 8549 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= SELECT_LIST;
+ }
+#line 39202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1310: /* query_specification_start: SELECT_SYM $@137 select_options $@138 select_item_list */
+#line 8553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ }
+#line 39210 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1311: /* query_specification: query_specification_start opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
+#line 8565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lex)= Lex->pop_select();
+ }
+#line 39218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1312: /* select_into_query_specification: query_specification_start into opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
+#line 8578 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lex)= Lex->pop_select();
+ }
+#line 39226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1313: /* query_expression: query_expression_no_with_clause */
+#line 8636 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].select_lex_unit)->set_with_clause(NULL);
+ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit);
+ }
+#line 39235 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1314: /* query_expression: with_clause query_expression_no_with_clause */
+#line 8642 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].select_lex_unit)->set_with_clause((yyvsp[-1].with_clause));
+ (yyvsp[-1].with_clause)->attach_to((yyvsp[0].select_lex_unit)->first_select());
+ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit);
+ }
+#line 39245 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1315: /* query_expression_no_with_clause: query_expression_body_ext */
+#line 8655 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
+#line 39251 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1316: /* query_expression_no_with_clause: query_expression_body_ext_parens */
+#line 8656 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
+#line 39257 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1317: /* $@139: %empty */
+#line 8671 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].select_lex_unit)->first_select()->next_select())
+ {
+ if (Lex->parsed_multi_operand_query_expression_body((yyvsp[0].select_lex_unit)))
+ MYSQL_YYABORT;
+ }
+ }
+#line 39269 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1318: /* query_expression_body_ext: query_expression_body $@139 opt_query_expression_tail */
+#line 8679 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].order_limit_lock))
+ (yyval.select_lex_unit)= (yyvsp[-2].select_lex_unit);
+ else
+ (yyval.select_lex_unit)= Lex->add_tail_to_query_expression_body((yyvsp[-2].select_lex_unit), (yyvsp[0].order_limit_lock));
+ }
+#line 39280 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1319: /* $@140: %empty */
+#line 8686 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->push_select(!(yyvsp[0].select_lex_unit)->first_select()->next_select() ?
+ (yyvsp[0].select_lex_unit)->first_select() : (yyvsp[0].select_lex_unit)->fake_select_lex);
+ }
+#line 39289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1320: /* query_expression_body_ext: query_expression_body_ext_parens $@140 query_expression_tail */
+#line 8691 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex_unit)= Lex->add_tail_to_query_expression_body_ext_parens((yyvsp[-2].select_lex_unit), (yyvsp[0].order_limit_lock))))
+ MYSQL_YYABORT;
+ }
+#line 39298 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1321: /* query_expression_body_ext_parens: '(' query_expression_body_ext_parens ')' */
+#line 8699 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit); }
+#line 39304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1322: /* query_expression_body_ext_parens: '(' query_expression_body_ext ')' */
+#line 8701 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= (yyvsp[-1].select_lex_unit)->first_select()->next_select() ?
+ (yyvsp[-1].select_lex_unit)->fake_select_lex : (yyvsp[-1].select_lex_unit)->first_select();
+ sel->braces= true;
+ (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit);
+ }
+#line 39315 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1323: /* query_expression_body: query_simple */
+#line 8716 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->push_select((yyvsp[0].select_lex));
+ if (!((yyval.select_lex_unit)= Lex->create_unit((yyvsp[0].select_lex))))
+ MYSQL_YYABORT;
+ }
+#line 39325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1324: /* $@141: %empty */
+#line 8723 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[-1].select_lex_unit)->first_select()->next_select())
+ {
+ Lex->pop_select();
+ }
+ }
+#line 39336 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1325: /* query_expression_body: query_expression_body unit_type_decl $@141 query_primary */
+#line 8730 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex_unit)= Lex->add_primary_to_query_expression_body((yyvsp[-3].select_lex_unit), (yyvsp[0].select_lex),
+ (yyvsp[-2].unit_operation).unit_type,
+ (yyvsp[-2].unit_operation).distinct)))
+ MYSQL_YYABORT;
+ }
+#line 39347 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1326: /* query_expression_body: query_expression_body_ext_parens unit_type_decl query_primary */
+#line 8739 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex_unit)= Lex->add_primary_to_query_expression_body_ext_parens(
+ (yyvsp[-2].select_lex_unit), (yyvsp[0].select_lex),
+ (yyvsp[-1].unit_operation).unit_type,
+ (yyvsp[-1].unit_operation).distinct)))
+ MYSQL_YYABORT;
+ }
+#line 39359 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1327: /* query_primary: query_simple */
+#line 8755 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex); }
+#line 39365 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1328: /* query_primary: query_expression_body_ext_parens */
+#line 8757 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex_unit)->first_select(); }
+#line 39371 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1329: /* query_simple: simple_table */
+#line 8766 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex);}
+#line 39377 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1330: /* subselect: query_expression */
+#line 8771 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
+ MYSQL_YYABORT;
+ }
+#line 39386 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1331: /* subquery: query_expression_body_ext_parens */
+#line 8812 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].select_lex_unit)->fake_select_lex)
+ (yyvsp[0].select_lex_unit)->first_select()->braces= false;
+ else
+ (yyvsp[0].select_lex_unit)->fake_select_lex->braces= false;
+ if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
+ MYSQL_YYABORT;
+ }
+#line 39399 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1332: /* subquery: '(' with_clause query_expression_no_with_clause ')' */
+#line 8821 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
+ (yyvsp[-2].with_clause)->attach_to((yyvsp[-1].select_lex_unit)->first_select());
+ if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[-1].select_lex_unit))))
+ MYSQL_YYABORT;
+ }
+#line 39410 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1336: /* table_reference_list: join_table_list */
+#line 8840 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->context.table_list=
+ Select->context.first_name_resolution_table=
+ Select->table_list.first;
+ }
+#line 39420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1339: /* select_options: select_option_list */
+#line 8855 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((Select->options & SELECT_DISTINCT) &&
+ (Select->options & SELECT_ALL)))
+ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT"));
+ }
+#line 39430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1340: /* opt_history_unit: %empty */
+#line 8864 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_range_unit)= VERS_TIMESTAMP;
+ }
+#line 39438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1341: /* opt_history_unit: TRANSACTION_SYM */
+#line 8868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_range_unit)= VERS_TRX_ID;
+ }
+#line 39446 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1342: /* opt_history_unit: TIMESTAMP */
+#line 8872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_range_unit)= VERS_TIMESTAMP;
+ }
+#line 39454 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1343: /* history_point: TIMESTAMP TEXT_STRING */
+#line 8879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item;
+ if (!(item= type_handler_datetime.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true)))
+ MYSQL_YYABORT;
+ (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, item);
+ }
+#line 39467 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1344: /* history_point: function_call_keyword_timestamp */
+#line 8888 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
+ }
+#line 39475 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1345: /* history_point: opt_history_unit bit_expr */
+#line 8892 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
+ }
+#line 39483 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1346: /* for_portion_of_time_clause: FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM bit_expr TO_SYM bit_expr */
+#line 8900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(0 == strcasecmp((yyvsp[-4].ident_sys).str, "SYSTEM_TIME")))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-5].simple_string));
+ MYSQL_YYABORT;
+ }
+ Lex->period_conditions.init(SYSTEM_TIME_FROM_TO,
+ Vers_history_point(VERS_TIMESTAMP, (yyvsp[-2].item)),
+ Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item)),
+ (yyvsp[-4].ident_sys));
+ }
+#line 39499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1347: /* opt_for_portion_of_time_clause: %empty */
+#line 8915 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= false;
+ }
+#line 39507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1348: /* opt_for_portion_of_time_clause: for_portion_of_time_clause */
+#line 8919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= true;
+ }
+#line 39515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1349: /* opt_for_system_time_clause: %empty */
+#line 8926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= false;
+ }
+#line 39523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1350: /* opt_for_system_time_clause: FOR_SYSTEM_TIME_SYM system_time_expr */
+#line 8930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= true;
+ }
+#line 39531 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1351: /* system_time_expr: AS OF_SYM history_point */
+#line 8937 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
+ }
+#line 39539 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1352: /* system_time_expr: ALL */
+#line 8941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_ALL);
+ }
+#line 39547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1353: /* system_time_expr: FROM history_point TO_SYM history_point */
+#line 8945 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_FROM_TO, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
+ }
+#line 39555 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1354: /* system_time_expr: BETWEEN_SYM history_point AND_SYM history_point */
+#line 8949 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_BETWEEN, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
+ }
+#line 39563 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1358: /* select_option: SQL_NO_CACHE_SYM */
+#line 8962 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_NO_QUERY_CACHE)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_NO_CACHE"));
+ Select->options|= OPTION_NO_QUERY_CACHE;
+ }
+#line 39576 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1359: /* select_option: SQL_CACHE_SYM */
+#line 8971 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_TO_QUERY_CACHE)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_CACHE"));
+ Select->options|= OPTION_TO_QUERY_CACHE;
+ }
+#line 39589 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1360: /* select_lock_type: FOR_SYM UPDATE_SYM opt_lock_wait_timeout_new */
+#line 8984 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ (yyval.select_lock).defined_lock= TRUE;
+ (yyval.select_lock).update_lock= TRUE;
+ }
+#line 39599 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1361: /* select_lock_type: LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout_new */
+#line 8990 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ (yyval.select_lock).defined_lock= TRUE;
+ (yyval.select_lock).update_lock= FALSE;
+ }
+#line 39609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1362: /* opt_select_lock_type: %empty */
+#line 9000 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ }
+#line 39617 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1363: /* opt_select_lock_type: select_lock_type */
+#line 9004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ }
+#line 39625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1364: /* opt_lock_wait_timeout_new: %empty */
+#line 9011 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ }
+#line 39633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1365: /* opt_lock_wait_timeout_new: WAIT_SYM ulong_num */
+#line 9015 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ (yyval.select_lock).defined_timeout= TRUE;
+ (yyval.select_lock).timeout= (yyvsp[0].ulong_num);
+ }
+#line 39643 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1366: /* opt_lock_wait_timeout_new: NOWAIT_SYM */
+#line 9021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ (yyval.select_lock).defined_timeout= TRUE;
+ (yyval.select_lock).timeout= 0;
+ }
+#line 39653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1367: /* opt_lock_wait_timeout_new: SKIP_SYM LOCKED_SYM */
+#line 9027 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ (yyval.select_lock).skip_locked= 1;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SKIP_LOCKED);
+ }
+#line 39663 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1370: /* select_item_list: '*' */
+#line 9038 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ bool is_parsing_returning=
+ thd->lex->current_select->parsing_place ==
+ IN_RETURNING;
+ SELECT_LEX *correct_select= is_parsing_returning ?
+ thd->lex->returning() :
+ thd->lex->current_select;
+ Item *item= new (thd->mem_root)
+ Item_field(thd, &correct_select->context,
+ star_clex_str);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(add_item_to_list(thd, item)))
+ MYSQL_YYABORT;
+ correct_select->with_wild++;
+ }
+#line 39684 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1371: /* select_item: remember_name select_sublist_qualified_asterisk remember_end */
+#line 9058 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
+ MYSQL_YYABORT;
+ }
+#line 39693 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1372: /* select_item: remember_name expr remember_end select_alias */
+#line 9063 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string));
+
+ if (unlikely(add_item_to_list(thd, (yyvsp[-2].item))))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].lex_str).str)
+ {
+ if (unlikely(Lex->sql_command == SQLCOM_CREATE_VIEW &&
+ check_column_name((yyvsp[0].lex_str).str)))
+ my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), (yyvsp[0].lex_str).str));
+ (yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
+ }
+ else if (!(yyvsp[-2].item)->name.str || (yyvsp[-2].item)->name.str == item_empty_name)
+ {
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
+ }
+ }
+#line 39716 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1373: /* remember_tok_start: %empty */
+#line 9084 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.simple_string)= (char*) YYLIP->get_tok_start();
+ }
+#line 39724 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1374: /* remember_name: %empty */
+#line 9090 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
+ }
+#line 39732 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1375: /* remember_end: %empty */
+#line 9096 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
+ }
+#line 39740 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1376: /* select_alias: %empty */
+#line 9102 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=null_clex_str;}
+#line 39746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1377: /* select_alias: AS ident */
+#line 9103 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys); }
+#line 39752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1378: /* select_alias: AS TEXT_STRING_sys */
+#line 9104 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str); }
+#line 39758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1379: /* select_alias: ident */
+#line 9105 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys); }
+#line 39764 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1380: /* select_alias: TEXT_STRING_sys */
+#line 9106 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str); }
+#line 39770 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1381: /* opt_default_time_precision: %empty */
+#line 9110 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= NOT_FIXED_DEC; }
+#line 39776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1382: /* opt_default_time_precision: '(' ')' */
+#line 9111 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= NOT_FIXED_DEC; }
+#line 39782 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1383: /* opt_default_time_precision: '(' real_ulong_num ')' */
+#line 9112 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].ulong_num); }
+#line 39788 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1384: /* opt_time_precision: %empty */
+#line 9116 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 39794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1385: /* opt_time_precision: '(' ')' */
+#line 9117 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 39800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1386: /* opt_time_precision: '(' real_ulong_num ')' */
+#line 9118 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].ulong_num); }
+#line 39806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1387: /* optional_braces: %empty */
+#line 9122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 39812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1388: /* optional_braces: '(' ')' */
+#line 9123 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 39818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1389: /* expr: expr or expr */
+#line 9129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Design notes:
+ Do not use a manually maintained stack like thd->lex->xxx_list,
+ but use the internal bison stack ($$, $1 and $3) instead.
+ Using the bison stack is:
+ - more robust to changes in the grammar,
+ - guaranteed to be in sync with the parser state,
+ - better for performances (no memory allocation).
+ */
+ Item_cond_or *item1;
+ Item_cond_or *item3;
+ if (is_cond_or((yyvsp[-2].item)))
+ {
+ item1= (Item_cond_or*) (yyvsp[-2].item);
+ if (is_cond_or((yyvsp[0].item)))
+ {
+ item3= (Item_cond_or*) (yyvsp[0].item);
+ /*
+ (X1 OR X2) OR (Y1 OR Y2) ==> OR (X1, X2, Y1, Y2)
+ */
+ item3->add_at_head(item1->argument_list());
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /*
+ (X1 OR X2) OR Y ==> OR (X1, X2, Y)
+ */
+ item1->add((yyvsp[0].item), thd->mem_root);
+ (yyval.item) = (yyvsp[-2].item);
+ }
+ }
+ else if (is_cond_or((yyvsp[0].item)))
+ {
+ item3= (Item_cond_or*) (yyvsp[0].item);
+ /*
+ X OR (Y1 OR Y2) ==> OR (X, Y1, Y2)
+ */
+ item3->add_at_head((yyvsp[-2].item), thd->mem_root);
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /* X OR Y */
+ (yyval.item)= new (thd->mem_root) Item_cond_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+ }
+#line 39873 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1390: /* expr: expr XOR expr */
+#line 9180 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* XOR is a proprietary extension */
+ (yyval.item)= new (thd->mem_root) Item_func_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1391: /* expr: expr and expr */
+#line 9187 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* See comments in rule expr: expr or expr */
+ Item_cond_and *item1;
+ Item_cond_and *item3;
+ if (is_cond_and((yyvsp[-2].item)))
+ {
+ item1= (Item_cond_and*) (yyvsp[-2].item);
+ if (is_cond_and((yyvsp[0].item)))
+ {
+ item3= (Item_cond_and*) (yyvsp[0].item);
+ /*
+ (X1 AND X2) AND (Y1 AND Y2) ==> AND (X1, X2, Y1, Y2)
+ */
+ item3->add_at_head(item1->argument_list());
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /*
+ (X1 AND X2) AND Y ==> AND (X1, X2, Y)
+ */
+ item1->add((yyvsp[0].item), thd->mem_root);
+ (yyval.item) = (yyvsp[-2].item);
+ }
+ }
+ else if (is_cond_and((yyvsp[0].item)))
+ {
+ item3= (Item_cond_and*) (yyvsp[0].item);
+ /*
+ X AND (Y1 AND Y2) ==> AND (X, Y1, Y2)
+ */
+ item3->add_at_head((yyvsp[-2].item), thd->mem_root);
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /* X AND Y */
+ (yyval.item)= new (thd->mem_root) Item_cond_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+ }
+#line 39931 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1392: /* expr: NOT_SYM expr */
+#line 9230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= negate_expression(thd, (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1394: /* boolean_test: boolean_test IS TRUE_SYM */
+#line 9240 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39951 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1395: /* boolean_test: boolean_test IS not TRUE_SYM */
+#line 9246 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39961 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1396: /* boolean_test: boolean_test IS FALSE_SYM */
+#line 9252 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1397: /* boolean_test: boolean_test IS not FALSE_SYM */
+#line 9258 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39981 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1398: /* boolean_test: boolean_test IS UNKNOWN_SYM */
+#line 9264 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1399: /* boolean_test: boolean_test IS not UNKNOWN_SYM */
+#line 9270 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40001 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1400: /* boolean_test: boolean_test IS NULL_SYM */
+#line 9276 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40011 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1401: /* boolean_test: boolean_test IS not NULL_SYM */
+#line 9282 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40021 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1402: /* boolean_test: boolean_test EQUAL_SYM predicate */
+#line 9288 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_equal(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1403: /* boolean_test: boolean_test comp_op predicate */
+#line 9294 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (*(yyvsp[-1].boolfunc2creator))(0)->create(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40041 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1404: /* boolean_test: boolean_test comp_op all_or_any '(' subselect ')' */
+#line 9300 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= all_any_subquery_creator(thd, (yyvsp[-5].item), (yyvsp[-4].boolfunc2creator), (yyvsp[-3].num), (yyvsp[-1].select_lex));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40051 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1406: /* predicate: predicate IN_SYM subquery */
+#line 9310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-2].item), (yyvsp[0].select_lex));
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 40061 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1407: /* predicate: predicate not IN_SYM subquery */
+#line 9316 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-3].item), (yyvsp[0].select_lex));
+ if (unlikely(!item))
+ MYSQL_YYABORT;
+ (yyval.item)= negate_expression(thd, item);
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 40074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1408: /* predicate: predicate IN_SYM '(' expr ')' */
+#line 9325 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-4].item), true, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1409: /* predicate: predicate IN_SYM '(' expr ',' expr_list ')' */
+#line 9331 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyvsp[-1].item_list)->push_front((yyvsp[-6].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_func_in(thd, *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1410: /* predicate: predicate not IN_SYM '(' expr ')' */
+#line 9339 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-5].item), false, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1411: /* predicate: predicate not IN_SYM '(' expr ',' expr_list ')' */
+#line 9345 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyvsp[-1].item_list)->push_front((yyvsp[-7].item), thd->mem_root);
+ Item_func_in *item= new (thd->mem_root) Item_func_in(thd, *(yyvsp[-1].item_list));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 40119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1412: /* predicate: predicate BETWEEN_SYM predicate AND_SYM predicate */
+#line 9354 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_between(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40129 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1413: /* predicate: predicate not BETWEEN_SYM predicate AND_SYM predicate */
+#line 9360 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_func_between *item;
+ item= new (thd->mem_root) Item_func_between(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 40141 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1414: /* predicate: predicate SOUNDS_SYM LIKE predicate */
+#line 9368 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item1= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[-3].item));
+ Item *item4= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[0].item));
+ if (unlikely(item1 == NULL) || unlikely(item4 == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_func_eq(thd, item1, item4);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40155 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1415: /* predicate: predicate LIKE predicate */
+#line 9378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-2].item), (yyvsp[0].item), escape(thd), false);
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 40165 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1416: /* predicate: predicate LIKE predicate ESCAPE_SYM predicate */
+#line 9384 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->escape_used= true;
+ (yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item), true);
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 40176 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1417: /* predicate: predicate not LIKE predicate */
+#line 9391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-3].item), (yyvsp[0].item), escape(thd), false);
+ if (unlikely(!item))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 40187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1418: /* predicate: predicate not LIKE predicate ESCAPE_SYM predicate */
+#line 9398 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->escape_used= true;
+ Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item), true);
+ if (unlikely(!item))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 40199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1419: /* predicate: predicate REGEXP predicate */
+#line 9406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1420: /* predicate: predicate not REGEXP predicate */
+#line 9412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-3].item), (yyvsp[0].item));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= negate_expression(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40222 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1422: /* bit_expr: bit_expr '|' bit_expr */
+#line 9425 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40232 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1423: /* bit_expr: bit_expr '&' bit_expr */
+#line 9431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1424: /* bit_expr: bit_expr SHIFT_LEFT bit_expr */
+#line 9437 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_shift_left(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40252 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1425: /* bit_expr: bit_expr SHIFT_RIGHT bit_expr */
+#line 9443 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_shift_right(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1426: /* bit_expr: bit_expr ORACLE_CONCAT_SYM bit_expr */
+#line 9449 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_concat_operator_oracle(thd,
+ (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40273 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1427: /* bit_expr: bit_expr '+' bit_expr */
+#line 9456 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_plus(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1428: /* bit_expr: bit_expr '-' bit_expr */
+#line 9462 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_minus(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40293 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1429: /* bit_expr: bit_expr '+' INTERVAL_SYM expr interval */
+#line 9468 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40303 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1430: /* bit_expr: bit_expr '-' INTERVAL_SYM expr interval */
+#line 9474 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1431: /* bit_expr: INTERVAL_SYM expr interval '+' expr */
+#line 9481 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40323 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1432: /* bit_expr: '+' INTERVAL_SYM expr interval '+' expr */
+#line 9487 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40333 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1433: /* bit_expr: '-' INTERVAL_SYM expr interval '+' expr */
+#line 9493 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40343 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1434: /* bit_expr: bit_expr '*' bit_expr */
+#line 9499 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mul(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1435: /* bit_expr: bit_expr '/' bit_expr */
+#line 9505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40363 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1436: /* bit_expr: bit_expr '%' bit_expr */
+#line 9511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1437: /* bit_expr: bit_expr DIV_SYM bit_expr */
+#line 9517 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_int_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1438: /* bit_expr: bit_expr MOD_SYM bit_expr */
+#line 9523 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1439: /* bit_expr: bit_expr '^' bit_expr */
+#line 9529 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1449: /* comp_op: '=' */
+#line 9558 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_eq_creator; }
+#line 40409 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1450: /* comp_op: GE */
+#line 9559 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_ge_creator; }
+#line 40415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1451: /* comp_op: '>' */
+#line 9560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_gt_creator; }
+#line 40421 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1452: /* comp_op: LE */
+#line 9561 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_le_creator; }
+#line 40427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1453: /* comp_op: '<' */
+#line 9562 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_lt_creator; }
+#line 40433 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1454: /* comp_op: NE */
+#line 9563 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_ne_creator; }
+#line 40439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1455: /* all_or_any: ALL */
+#line 9567 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 40445 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1456: /* all_or_any: ANY_SYM */
+#line 9568 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 40451 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1457: /* opt_dyncol_type: %empty */
+#line 9573 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
+ }
+#line 40459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1458: /* opt_dyncol_type: AS dyncol_type */
+#line 9576 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
+#line 40465 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1462: /* numeric_dyncol_type: INT_SYM */
+#line 9586 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
+#line 40471 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1463: /* numeric_dyncol_type: UNSIGNED INT_SYM */
+#line 9587 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_UINT); }
+#line 40477 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1464: /* numeric_dyncol_type: DOUBLE_SYM */
+#line 9588 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
+#line 40483 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1465: /* numeric_dyncol_type: REAL */
+#line 9589 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
+#line 40489 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1466: /* numeric_dyncol_type: FLOAT_SYM */
+#line 9590 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
+#line 40495 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1467: /* numeric_dyncol_type: DECIMAL_SYM float_options */
+#line 9591 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
+#line 40501 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1468: /* temporal_dyncol_type: DATE_SYM */
+#line 9595 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
+#line 40507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1469: /* temporal_dyncol_type: TIME_SYM opt_field_scale */
+#line 9596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_TIME, (yyvsp[0].Lex_length_and_dec)); }
+#line 40513 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1470: /* temporal_dyncol_type: DATETIME opt_field_scale */
+#line 9597 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, (yyvsp[0].Lex_length_and_dec)); }
+#line 40519 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1471: /* string_dyncol_type: char opt_binary */
+#line 9602 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_dyncol_type).set(DYN_COL_STRING, (yyvsp[0].Lex_exact_charset_extended_collation_attrs), thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 40528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1472: /* string_dyncol_type: nchar */
+#line 9607 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_dyncol_type).set(DYN_COL_STRING, national_charset_info);
+ }
+#line 40536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1473: /* dyncall_create_element: expr ',' expr opt_dyncol_type */
+#line 9614 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
+ alloc_root(thd->mem_root, sizeof(DYNCALL_CREATE_DEF));
+ if (unlikely((yyval.dyncol_def) == NULL))
+ MYSQL_YYABORT;
+ (yyval.dyncol_def)->key= (yyvsp[-3].item);
+ (yyval.dyncol_def)->value= (yyvsp[-1].item);
+ (yyval.dyncol_def)->type= (DYNAMIC_COLUMN_TYPE)(yyvsp[0].Lex_dyncol_type).dyncol_type();
+ (yyval.dyncol_def)->cs= (yyvsp[0].Lex_dyncol_type).charset_collation();
+ if ((yyvsp[0].Lex_dyncol_type).has_explicit_length())
+ (yyval.dyncol_def)->len= (yyvsp[0].Lex_dyncol_type).length();
+ else
+ (yyval.dyncol_def)->len= 0;
+ if ((yyvsp[0].Lex_dyncol_type).has_explicit_dec())
+ (yyval.dyncol_def)->frac= (yyvsp[0].Lex_dyncol_type).dec();
+ else
+ (yyval.dyncol_def)->len= 0;
+ }
+#line 40559 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1474: /* dyncall_create_list: dyncall_create_element */
+#line 9636 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.dyncol_def_list)= new (thd->mem_root) List<DYNCALL_CREATE_DEF>;
+ if (unlikely((yyval.dyncol_def_list) == NULL))
+ MYSQL_YYABORT;
+ (yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
+ }
+#line 40570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1475: /* dyncall_create_list: dyncall_create_list ',' dyncall_create_element */
+#line 9643 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
+ (yyval.dyncol_def_list)= (yyvsp[-2].dyncol_def_list);
+ }
+#line 40579 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1476: /* plsql_cursor_attr: ISOPEN_SYM */
+#line 9651 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
+#line 40585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1477: /* plsql_cursor_attr: FOUND_SYM */
+#line 9652 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
+#line 40591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1478: /* plsql_cursor_attr: NOTFOUND_SYM */
+#line 9653 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
+#line 40597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1479: /* plsql_cursor_attr: ROWCOUNT_SYM */
+#line 9654 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
+#line 40603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1480: /* explicit_cursor_attr: ident PERCENT_ORACLE_SYM plsql_cursor_attr */
+#line 9659 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_plsql_cursor_attr(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].plsql_cursor_attr)))))
+ MYSQL_YYABORT;
+ }
+#line 40612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1483: /* trim_operands_regular: expr */
+#line 9672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
+#line 40618 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1484: /* trim_operands_special: LEADING expr FROM expr */
+#line 9676 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 40624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1485: /* trim_operands_special: TRAILING expr FROM expr */
+#line 9677 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 40630 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1486: /* trim_operands_special: BOTH expr FROM expr */
+#line 9678 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 40636 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1487: /* trim_operands_special: LEADING FROM expr */
+#line 9679 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item)); }
+#line 40642 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1488: /* trim_operands_special: TRAILING FROM expr */
+#line 9680 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item)); }
+#line 40648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1489: /* trim_operands_special: BOTH FROM expr */
+#line 9681 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
+#line 40654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1490: /* trim_operands_special: expr FROM expr */
+#line 9682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 40660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1497: /* column_default_non_parenthesized_expr: param_marker */
+#line 9720 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item_param); }
+#line 40666 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1499: /* column_default_non_parenthesized_expr: sum_expr */
+#line 9723 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!Lex->select_stack_top || Lex->json_table)
+ {
+ my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
+#line 40678 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1500: /* column_default_non_parenthesized_expr: window_func_expr */
+#line 9731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!Lex->select_stack_top)
+ {
+ my_error(ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
+#line 40690 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1502: /* column_default_non_parenthesized_expr: ROW_SYM '(' expr ',' expr_list ')' */
+#line 9740 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1503: /* column_default_non_parenthesized_expr: EXISTS '(' subselect ')' */
+#line 9747 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_exists_subselect(thd, (yyvsp[-1].select_lex));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1504: /* column_default_non_parenthesized_expr: '{' ident expr '}' */
+#line 9753 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].item)->make_odbc_literal(thd, &(yyvsp[-2].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 40720 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1505: /* column_default_non_parenthesized_expr: MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' */
+#line 9758 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-5].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
+ Item_func_match *i1= new (thd->mem_root) Item_func_match(thd, *(yyvsp[-5].item_list),
+ (yyvsp[-1].num));
+ if (unlikely(i1 == NULL))
+ MYSQL_YYABORT;
+ Select->add_ftfunc_to_list(thd, i1);
+ (yyval.item)= i1;
+ }
+#line 40734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1506: /* column_default_non_parenthesized_expr: CAST_SYM '(' expr AS cast_type ')' */
+#line 9768 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
+ MYSQL_YYABORT;
+ }
+#line 40743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1507: /* column_default_non_parenthesized_expr: CASE_SYM when_list_opt_else END */
+#line 9773 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= new(thd->mem_root) Item_func_case_searched(thd, *(yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 40752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1508: /* column_default_non_parenthesized_expr: CASE_SYM expr when_list_opt_else END */
+#line 9778 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
+ if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_case_simple(thd, *(yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 40762 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1509: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr ',' cast_type ')' */
+#line 9784 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
+ MYSQL_YYABORT;
+ }
+#line 40771 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1510: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr USING charset_name ')' */
+#line 9789 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_conv_charset(thd, (yyvsp[-3].item), (yyvsp[-1].charset));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1511: /* column_default_non_parenthesized_expr: DEFAULT '(' simple_ident ')' */
+#line 9795 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_splocal *il= (yyvsp[-1].item)->get_item_splocal();
+ if (unlikely(il))
+ my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str));
+ (yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context(),
+ (yyvsp[-1].item), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->default_used= TRUE;
+ }
+#line 40796 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1512: /* column_default_non_parenthesized_expr: VALUE_SYM '(' simple_ident_nospvar ')' */
+#line 9806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_insert_value(thd, Lex->current_context(),
+ (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40807 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1513: /* column_default_non_parenthesized_expr: NEXT_SYM VALUE_SYM FOR_SYM table_ident */
+#line 9813 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40816 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1514: /* column_default_non_parenthesized_expr: NEXTVAL_SYM '(' table_ident ')' */
+#line 9818 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40825 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1515: /* column_default_non_parenthesized_expr: PREVIOUS_SYM VALUE_SYM FOR_SYM table_ident */
+#line 9823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40834 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1516: /* column_default_non_parenthesized_expr: LASTVAL_SYM '(' table_ident ')' */
+#line 9828 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40843 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1517: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ')' */
+#line 9833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-3].table), (yyvsp[-1].longlong_number), 0, 1))))
+ MYSQL_YYABORT;
+ }
+#line 40852 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1518: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ')' */
+#line 9838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-5].table), (yyvsp[-3].longlong_number), 0, (yyvsp[-1].ulong_num)))))
+ MYSQL_YYABORT;
+ }
+#line 40861 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1519: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ',' ulonglong_num ')' */
+#line 9843 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-7].table), (yyvsp[-5].longlong_number), (yyvsp[-1].ulonglong_number), (yyvsp[-3].ulong_num)))))
+ MYSQL_YYABORT;
+ }
+#line 40870 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1522: /* primary_expr: '(' parenthesized_expr ')' */
+#line 9852 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[-1].item); }
+#line 40876 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1523: /* primary_expr: subquery */
+#line 9854 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->create_item_query_expression(thd, (yyvsp[0].select_lex)->master_unit())))
+ MYSQL_YYABORT;
+ }
+#line 40885 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1525: /* string_factor_expr: string_factor_expr COLLATE_SYM collation_name */
+#line 9863 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= new (thd->mem_root)
+ Item_func_set_collation(thd, (yyvsp[-2].item), (yyvsp[0].Lex_extended_collation)))))
+ MYSQL_YYABORT;
+ }
+#line 40895 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1527: /* simple_expr: BINARY simple_expr */
+#line 9873 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Type_cast_attributes at(&my_charset_bin);
+ if (unlikely(!((yyval.item)= type_handler_long_blob.create_typecast_item(thd, (yyvsp[0].item), at))))
+ MYSQL_YYABORT;
+ }
+#line 40905 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1528: /* simple_expr: '+' simple_expr */
+#line 9879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 40913 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1529: /* simple_expr: '-' simple_expr */
+#line 9883 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item)->neg(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1530: /* simple_expr: '~' simple_expr */
+#line 9889 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_neg(thd, (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1531: /* simple_expr: not2 simple_expr */
+#line 9895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= negate_expression(thd, (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40943 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1533: /* mysql_concatenation_expr: mysql_concatenation_expr MYSQL_CONCAT_SYM simple_expr */
+#line 9905 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_concat(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40953 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1534: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ')' */
+#line 9914 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_datetime_typecast(thd, (yyvsp[-1].item),
+ AUTO_SEC_PART_DIGITS);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1535: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ',' expr ')' */
+#line 9921 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_timestamp(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40974 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1536: /* function_call_keyword: CHAR_SYM '(' expr_list ')' */
+#line 9935 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40984 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1537: /* function_call_keyword: CHAR_SYM '(' expr_list USING charset_name ')' */
+#line 9941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-3].item_list), (yyvsp[-1].charset));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40994 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1538: /* function_call_keyword: CURRENT_USER optional_braces */
+#line 9947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_current_user(thd,
+ Lex->current_context());
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query= 0;
+ }
+#line 41007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1539: /* function_call_keyword: CURRENT_ROLE optional_braces */
+#line 9956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_current_role(thd,
+ Lex->current_context());
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query= 0;
+ }
+#line 41020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1540: /* function_call_keyword: DATE_SYM '(' expr ')' */
+#line 9965 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1541: /* function_call_keyword: DAY_SYM '(' expr ')' */
+#line 9971 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1542: /* function_call_keyword: HOUR_SYM '(' expr ')' */
+#line 9977 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1543: /* function_call_keyword: INSERT '(' expr ',' expr ',' expr ',' expr ')' */
+#line 9983 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_insert(thd, (yyvsp[-7].item), (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1544: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ')' */
+#line 9989 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ List<Item> *list= new (thd->mem_root) List<Item>;
+ if (unlikely(list == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(list->push_front((yyvsp[-1].item), thd->mem_root)) ||
+ unlikely(list->push_front((yyvsp[-3].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ Item_row *item= new (thd->mem_root) Item_row(thd, *list);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_func_interval(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41079 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1545: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' */
+#line 10004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyvsp[-1].item_list)->push_front((yyvsp[-5].item), thd->mem_root);
+ Item_row *item= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_func_interval(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1546: /* function_call_keyword: LEFT '(' expr ',' expr ')' */
+#line 10015 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_left(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41104 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1547: /* function_call_keyword: MINUTE_SYM '(' expr ')' */
+#line 10021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1548: /* function_call_keyword: MONTH_SYM '(' expr ')' */
+#line 10027 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41124 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1549: /* function_call_keyword: RIGHT '(' expr ',' expr ')' */
+#line 10033 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_right(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41134 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1550: /* function_call_keyword: SECOND_SYM '(' expr ')' */
+#line 10039 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41144 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1551: /* function_call_keyword: SQL_SYM PERCENT_ORACLE_SYM ROWCOUNT_SYM */
+#line 10045 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_oracle_sql_rowcount(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query= 0;
+ }
+#line 41156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1552: /* function_call_keyword: TIME_SYM '(' expr ')' */
+#line 10053 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_time_typecast(thd, (yyvsp[-1].item),
+ AUTO_SEC_PART_DIGITS);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41167 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1553: /* function_call_keyword: function_call_keyword_timestamp */
+#line 10060 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 41175 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1554: /* function_call_keyword: TRIM '(' trim_operands ')' */
+#line 10064 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
+ make_item_func_trim(thd, (yyvsp[-1].trim)))))
+ MYSQL_YYABORT;
+ }
+#line 41185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1555: /* function_call_keyword: USER_SYM '(' ')' */
+#line 10070 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_user(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query=0;
+ }
+#line 41197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1556: /* function_call_keyword: YEAR_SYM '(' expr ')' */
+#line 10078 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1559: /* substring_operands_regular: expr ',' expr ',' expr */
+#line 10092 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 41215 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1560: /* substring_operands_regular: expr ',' expr */
+#line 10096 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 41223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1561: /* substring_operands_special: expr FROM expr FOR_SYM expr */
+#line 10103 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 41231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1562: /* substring_operands_special: expr FROM expr */
+#line 10107 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 41239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1563: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' expr ')' */
+#line 10127 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item),
+ INTERVAL_DAY, 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1564: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10134 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1565: /* function_call_nonkeyword: CURDATE optional_braces */
+#line 10140 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 41271 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1566: /* function_call_nonkeyword: CURTIME opt_time_precision */
+#line 10147 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curtime_local(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 41282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1567: /* function_call_nonkeyword: DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10154 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1568: /* function_call_nonkeyword: DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1569: /* function_call_nonkeyword: EXTRACT_SYM '(' interval FROM expr ')' */
+#line 10166 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_extract(thd, (yyvsp[-3].interval), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41312 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1570: /* function_call_nonkeyword: GET_FORMAT '(' date_time_type ',' expr ')' */
+#line 10172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_get_format(thd, (yyvsp[-3].date_time_type), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1571: /* function_call_nonkeyword: NOW_SYM opt_time_precision */
+#line 10178 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 41333 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1572: /* function_call_nonkeyword: POSITION_SYM '(' bit_expr IN_SYM expr ')' */
+#line 10185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_locate(thd, (yyvsp[-1].item), (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41343 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1573: /* function_call_nonkeyword: ROWNUM_SYM '(' ')' */
+#line 10196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_rownum(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41353 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1574: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' expr ')' */
+#line 10202 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item),
+ INTERVAL_DAY, 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41364 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1575: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10209 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41374 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1576: /* function_call_nonkeyword: SUBSTRING '(' substring_operands ')' */
+#line 10215 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
+ make_item_func_substr(thd, (yyvsp[-1].substring_spec)))))
+ MYSQL_YYABORT;
+ }
+#line 41384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1577: /* function_call_nonkeyword: SYSDATE '(' ')' */
+#line 10228 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
+ MYSQL_YYABORT;
+ }
+#line 41393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1578: /* function_call_nonkeyword: SYSDATE '(' real_ulong_num ')' */
+#line 10233 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, (uint) (yyvsp[-1].ulong_num)))))
+ MYSQL_YYABORT;
+ }
+#line 41402 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1579: /* function_call_nonkeyword: TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' */
+#line 10238 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-1].item), (yyvsp[-3].item), (yyvsp[-5].interval_time_st), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1580: /* function_call_nonkeyword: TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' */
+#line 10244 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_timestamp_diff(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[-5].interval_time_st));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1581: /* function_call_nonkeyword: TRIM_ORACLE '(' trim_operands ')' */
+#line 10250 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
+ MYSQL_YYABORT;
+ }
+#line 41431 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1582: /* function_call_nonkeyword: UTC_DATE_SYM optional_braces */
+#line 10255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 41442 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1583: /* function_call_nonkeyword: UTC_TIME_SYM opt_time_precision */
+#line 10262 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curtime_utc(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 41453 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1584: /* function_call_nonkeyword: UTC_TIMESTAMP_SYM opt_time_precision */
+#line 10269 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_now_utc(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 41464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1585: /* function_call_nonkeyword: COLUMN_ADD_SYM '(' expr ',' dyncall_create_list ')' */
+#line 10277 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_add(thd, (yyvsp[-3].item), *(yyvsp[-1].dyncol_def_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1586: /* function_call_nonkeyword: COLUMN_DELETE_SYM '(' expr ',' expr_list ')' */
+#line 10284 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_delete(thd, (yyvsp[-3].item), *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1587: /* function_call_nonkeyword: COLUMN_CREATE_SYM '(' dyncall_create_list ')' */
+#line 10291 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1588: /* function_call_nonkeyword: COLUMN_GET_SYM '(' expr ',' expr AS cast_type ')' */
+#line 10298 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].Lex_cast_type).type_handler(),
+ (yyvsp[-1].Lex_cast_type), (yyvsp[-1].Lex_cast_type).charset());
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1589: /* function_call_conflict: ASCII_SYM '(' expr ')' */
+#line 10313 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1590: /* function_call_conflict: CHARSET '(' expr ')' */
+#line 10319 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1591: /* function_call_conflict: IF_SYM '(' expr ',' expr ',' expr ')' */
+#line 10325 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_if(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41535 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1592: /* function_call_conflict: LAST_VALUE '(' expr ')' */
+#line 10334 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ List<Item> *list= new (thd->mem_root) List<Item>;
+ if (unlikely(list == NULL))
+ MYSQL_YYABORT;
+ list->push_back((yyvsp[-1].item), thd->mem_root);
+
+ (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *list);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41550 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1593: /* function_call_conflict: LAST_VALUE '(' expr_list ',' expr ')' */
+#line 10345 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-3].item_list)->push_back((yyvsp[-1].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-3].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1594: /* function_call_conflict: MOD_SYM '(' expr ',' expr ')' */
+#line 10352 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1595: /* function_call_conflict: PASSWORD_SYM '(' expr ')' */
+#line 10358 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item* i1;
+ i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item));
+ if (unlikely(i1 == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= i1;
+ }
+#line 41583 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1596: /* function_call_conflict: REPEAT_SYM '(' expr ',' expr ')' */
+#line 10366 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_repeat(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1597: /* function_call_conflict: REPLACE '(' expr ',' expr ',' expr ')' */
+#line 10372 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
+ make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
+ MYSQL_YYABORT;
+ }
+#line 41603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1598: /* function_call_conflict: TRUNCATE_SYM '(' expr ',' expr ')' */
+#line 10378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_round(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41613 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1599: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr opt_ws_levels ')' */
+#line 10384 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-2].item), 0, 0, (yyvsp[-1].ulong_num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41623 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1600: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS CHAR_SYM ws_nweights opt_ws_levels ')' */
+#line 10390 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root)
+ Item_func_weight_string(thd, (yyvsp[-5].item), 0, (yyvsp[-2].ulong_num),
+ (yyvsp[-1].ulong_num) | MY_STRXFRM_PAD_WITH_SPACE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1601: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS BINARY ws_nweights ')' */
+#line 10398 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_char_typecast(thd, (yyvsp[-4].item), (yyvsp[-1].ulong_num),
+ &my_charset_bin);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root)
+ Item_func_weight_string(thd, item, 0, (yyvsp[-1].ulong_num),
+ MY_STRXFRM_PAD_WITH_SPACE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1602: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr ',' ulong_num ',' ulong_num ',' ulong_num ')' */
+#line 10410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-7].item), (yyvsp[-5].ulong_num), (yyvsp[-3].ulong_num),
+ (yyvsp[-1].ulong_num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41662 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1603: /* @142: %empty */
+#line 10429 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef HAVE_DLOPEN
+ udf_func *udf= 0;
+ LEX *lex= Lex;
+ if (using_udf_functions &&
+ (udf= find_udf((yyvsp[-1].ident_sys).str, (yyvsp[-1].ident_sys).length)) &&
+ udf->type == UDFTYPE_AGGREGATE)
+ {
+ if (unlikely(lex->current_select->inc_in_sum_expr()))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+ /* Temporary placing the result of find_udf in $3 */
+ (yyval.udf)= udf;
+#endif
+ }
+#line 41685 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1604: /* function_call_generic: ident_func '(' @142 opt_udf_expr_list ')' */
+#line 10448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ const Type_handler *h;
+ Create_func *builder;
+ Item *item= NULL;
+
+ if (unlikely(check_routine_name(&(yyvsp[-4].ident_sys))))
+ MYSQL_YYABORT;
+
+ /*
+ Implementation note:
+ names are resolved with the following order:
+ - MySQL native functions,
+ - User Defined Functions,
+ - Constructors, like POINT(1,1)
+ - Stored Functions (assuming the current <use> database)
+
+ This will be revised with WL#2128 (SQL PATH)
+ */
+ builder= Schema::find_implied(thd)->
+ find_native_function_builder(thd, (yyvsp[-4].ident_sys));
+ if (builder)
+ {
+ item= builder->create_func(thd, &(yyvsp[-4].ident_sys), (yyvsp[-1].item_list));
+ }
+ else if ((h= Type_handler::handler_by_name(thd, (yyvsp[-4].ident_sys))) &&
+ (item= h->make_constructor_item(thd, (yyvsp[-1].item_list))))
+ {
+ // Found a constructor with a proper argument count
+ }
+ else
+ {
+#ifdef HAVE_DLOPEN
+ /* Retrieving the result of find_udf */
+ udf_func *udf= (yyvsp[-2].udf);
+
+ if (udf)
+ {
+ if (udf->type == UDFTYPE_AGGREGATE)
+ {
+ Select->in_sum_expr--;
+ }
+
+ item= Create_udf_func::s_singleton.create(thd, udf, (yyvsp[-1].item_list));
+ }
+ else
+#endif
+ {
+ builder= find_qualified_function_builder(thd);
+ DBUG_ASSERT(builder);
+ item= builder->create_func(thd, &(yyvsp[-4].ident_sys), (yyvsp[-1].item_list));
+ }
+ }
+
+ if (unlikely(! ((yyval.item)= item)))
+ MYSQL_YYABORT;
+ }
+#line 41746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1605: /* function_call_generic: CONTAINS_SYM '(' opt_expr_list ')' */
+#line 10505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
+ (yyvsp[-3].kwd), (yyvsp[-1].item_list))))
+ MYSQL_YYABORT;
+ }
+#line 41756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1606: /* function_call_generic: OVERLAPS_SYM '(' opt_expr_list ')' */
+#line 10511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
+ (yyvsp[-3].kwd), (yyvsp[-1].item_list))))
+ MYSQL_YYABORT;
+ }
+#line 41766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1607: /* function_call_generic: WITHIN '(' opt_expr_list ')' */
+#line 10517 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
+ (yyvsp[-3].kwd), (yyvsp[-1].item_list))))
+ MYSQL_YYABORT;
+ }
+#line 41776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1608: /* function_call_generic: ident_cli '.' ident_cli '(' opt_expr_list ')' */
+#line 10523 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1609: /* function_call_generic: ident_cli '.' ident_cli '.' ident_cli '(' opt_expr_list ')' */
+#line 10528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-7].ident_cli), &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1610: /* function_call_generic: ident_cli '.' REPLACE '(' opt_expr_list ')' */
+#line 10533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_replace(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1611: /* function_call_generic: ident_cli '.' SUBSTRING '(' opt_expr_list ')' */
+#line 10538 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41812 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1612: /* function_call_generic: ident_cli '.' SUBSTRING '(' substring_operands_special ')' */
+#line 10543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].substring_spec)))))
+ MYSQL_YYABORT;
+ }
+#line 41821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1613: /* function_call_generic: ident_cli '.' TRIM '(' opt_expr_list ')' */
+#line 10548 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_trim(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1614: /* function_call_generic: ident_cli '.' TRIM '(' trim_operands_special ')' */
+#line 10553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_trim(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].trim)))))
+ MYSQL_YYABORT;
+ }
+#line 41839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1615: /* fulltext_options: opt_natural_language_mode opt_query_expansion */
+#line 10573 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); }
+#line 41845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1616: /* fulltext_options: IN_SYM BOOLEAN_SYM MODE_SYM */
+#line 10575 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_BOOL; }
+#line 41851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1617: /* opt_natural_language_mode: %empty */
+#line 10579 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_NL; }
+#line 41857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1618: /* opt_natural_language_mode: IN_SYM NATURAL LANGUAGE_SYM MODE_SYM */
+#line 10580 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_NL; }
+#line 41863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1619: /* opt_query_expansion: %empty */
+#line 10584 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 41869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1620: /* opt_query_expansion: WITH QUERY_SYM EXPANSION_SYM */
+#line 10585 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_EXPAND; }
+#line 41875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1621: /* opt_udf_expr_list: %empty */
+#line 10589 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= NULL; }
+#line 41881 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1622: /* opt_udf_expr_list: udf_expr_list */
+#line 10590 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[0].item_list); }
+#line 41887 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1623: /* udf_expr_list: udf_expr */
+#line 10595 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= new (thd->mem_root) List<Item>;
+ if (unlikely((yyval.item_list) == NULL))
+ MYSQL_YYABORT;
+ (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ }
+#line 41898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1624: /* udf_expr_list: udf_expr_list ',' udf_expr */
+#line 10602 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 41907 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1625: /* udf_expr: remember_name expr remember_end select_alias */
+#line 10610 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Use Item::name as a storage for the attribute value of user
+ defined function argument. It is safe to use Item::name
+ because the syntax will not allow having an explicit name here.
+ See WL#1017 re. udf attributes.
+ */
+ if ((yyvsp[0].lex_str).str)
+ {
+ (yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
+ }
+ /*
+ A field has to have its proper name in order for name
+ resolution to work, something we are only guaranteed if we
+ parse it out. If we hijack the input stream with
+ remember_name we may get quoted or escaped names.
+ */
+ else if ((yyvsp[-2].item)->type() != Item::FIELD_ITEM &&
+ (yyvsp[-2].item)->type() != Item::REF_ITEM /* For HAVING */ )
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
+ (yyval.item)= (yyvsp[-2].item);
+ }
+#line 41935 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1626: /* sum_expr: AVG_SYM '(' in_sum_expr ')' */
+#line 10637 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), FALSE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41945 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1627: /* sum_expr: AVG_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10643 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), TRUE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41955 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1628: /* sum_expr: BIT_AND '(' in_sum_expr ')' */
+#line 10649 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1629: /* sum_expr: BIT_OR '(' in_sum_expr ')' */
+#line 10655 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1630: /* sum_expr: BIT_XOR '(' in_sum_expr ')' */
+#line 10661 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41985 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1631: /* sum_expr: COUNT_SYM '(' opt_all '*' ')' */
+#line 10667 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_sum_count(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41998 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1632: /* sum_expr: COUNT_SYM '(' in_sum_expr ')' */
+#line 10676 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42008 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1633: /* $@143: %empty */
+#line 10682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 42014 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1634: /* $@144: %empty */
+#line 10684 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr--; }
+#line 42020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1635: /* sum_expr: COUNT_SYM '(' DISTINCT $@143 expr_list $@144 ')' */
+#line 10686 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_count(thd, *(yyvsp[-2].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42030 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1636: /* sum_expr: MIN_SYM '(' in_sum_expr ')' */
+#line 10692 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1637: /* sum_expr: MIN_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10703 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1638: /* sum_expr: MAX_SYM '(' in_sum_expr ')' */
+#line 10709 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1639: /* sum_expr: MAX_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10715 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42070 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1640: /* sum_expr: STD_SYM '(' in_sum_expr ')' */
+#line 10721 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1641: /* sum_expr: VARIANCE_SYM '(' in_sum_expr ')' */
+#line 10727 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42090 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1642: /* sum_expr: STDDEV_SAMP_SYM '(' in_sum_expr ')' */
+#line 10733 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1643: /* sum_expr: VAR_SAMP_SYM '(' in_sum_expr ')' */
+#line 10739 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1644: /* sum_expr: SUM_SYM '(' in_sum_expr ')' */
+#line 10745 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), FALSE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1645: /* sum_expr: SUM_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), TRUE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42130 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1646: /* $@145: %empty */
+#line 10757 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 42136 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1647: /* sum_expr: GROUP_CONCAT_SYM '(' opt_distinct $@145 expr_list opt_gorder_clause opt_gconcat_separator opt_glimit_clause ')' */
+#line 10761 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->in_sum_expr--;
+ (yyval.item)= new (thd->mem_root)
+ Item_func_group_concat(thd, Lex->current_context(),
+ (yyvsp[-6].num), (yyvsp[-4].item_list),
+ sel->gorder_list, (yyvsp[-2].string), (yyvsp[-1].num),
+ sel->limit_params.select_limit,
+ sel->limit_params.offset_limit);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ sel->limit_params.clear();
+ (yyvsp[-4].item_list)->empty();
+ sel->gorder_list.empty();
+ }
+#line 42156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1648: /* $@146: %empty */
+#line 10777 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 42162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1649: /* sum_expr: JSON_ARRAYAGG_SYM '(' opt_distinct $@146 expr_list opt_gorder_clause opt_glimit_clause ')' */
+#line 10780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ List<Item> *args= (yyvsp[-3].item_list);
+ sel->in_sum_expr--;
+ if (args && args->elements > 1)
+ {
+ /* JSON_ARRAYAGG supports only one parameter */
+ my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), "JSON_ARRAYAGG");
+ MYSQL_YYABORT;
+ }
+ String* s= new (thd->mem_root) String(",", 1, &my_charset_latin1);
+ if (unlikely(s == NULL))
+ MYSQL_YYABORT;
+
+ (yyval.item)= new (thd->mem_root)
+ Item_func_json_arrayagg(thd, Lex->current_context(),
+ (yyvsp[-5].num), args,
+ sel->gorder_list, s, (yyvsp[-1].num),
+ sel->limit_params.select_limit,
+ sel->limit_params.offset_limit);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ sel->limit_params.clear();
+ (yyvsp[-3].item_list)->empty();
+ sel->gorder_list.empty();
+ }
+#line 42193 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1650: /* $@147: %empty */
+#line 10807 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 42199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1651: /* sum_expr: JSON_OBJECTAGG_SYM '(' $@147 expr ',' expr ')' */
+#line 10809 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->in_sum_expr--;
+
+ (yyval.item)= new (thd->mem_root) Item_func_json_objectagg(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42212 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1652: /* window_func_expr: window_func OVER_SYM window_name */
+#line 10821 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item), (yyvsp[0].lex_str_ptr));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
+ MYSQL_YYABORT;
+ }
+#line 42224 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1653: /* window_func_expr: window_func OVER_SYM window_spec */
+#line 10830 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(Select->add_window_spec(thd, lex->win_ref,
+ Select->group_list,
+ Select->order_list,
+ lex->win_frame)))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item),
+ thd->lex->win_spec);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
+ MYSQL_YYABORT;
+ }
+#line 42243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1656: /* window_func: function_call_generic */
+#line 10852 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item* item = (Item*)(yyvsp[0].item);
+ /* 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;
+ }
+ }
+#line 42259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1657: /* simple_window_func: ROW_NUMBER_SYM '(' ')' */
+#line 10867 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_row_number(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42269 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1658: /* simple_window_func: RANK_SYM '(' ')' */
+#line 10874 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_rank(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42279 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1659: /* simple_window_func: DENSE_RANK_SYM '(' ')' */
+#line 10881 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_dense_rank(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1660: /* simple_window_func: PERCENT_RANK_SYM '(' ')' */
+#line 10888 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_percent_rank(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1661: /* simple_window_func: CUME_DIST_SYM '(' ')' */
+#line 10895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_cume_dist(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1662: /* simple_window_func: NTILE_SYM '(' expr ')' */
+#line 10902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_ntile(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42319 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1663: /* simple_window_func: FIRST_VALUE_SYM '(' expr ')' */
+#line 10909 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_first_value(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1664: /* simple_window_func: LAST_VALUE '(' expr ')' */
+#line 10916 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_last_value(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42339 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1665: /* simple_window_func: NTH_VALUE_SYM '(' expr ',' expr ')' */
+#line 10923 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_nth_value(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42349 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1666: /* simple_window_func: LEAD_SYM '(' expr ')' */
+#line 10930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* No second argument defaults to 1. */
+ Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
+ if (unlikely(item_offset == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-1].item), item_offset);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42363 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1667: /* simple_window_func: LEAD_SYM '(' expr ',' expr ')' */
+#line 10941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1668: /* simple_window_func: LAG_SYM '(' expr ')' */
+#line 10948 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* No second argument defaults to 1. */
+ Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
+ if (unlikely(item_offset == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-1].item), item_offset);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42387 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1669: /* simple_window_func: LAG_SYM '(' expr ',' expr ')' */
+#line 10959 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42397 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1670: /* inverse_distribution_function: percentile_function OVER_SYM '(' opt_window_partition_clause ')' */
+#line 10971 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(Select->add_window_spec(thd, lex->win_ref,
+ Select->group_list,
+ Select->order_list,
+ NULL)))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-4].item),
+ thd->lex->win_spec);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
+ MYSQL_YYABORT;
+ }
+#line 42416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1671: /* $@148: %empty */
+#line 10989 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->prepare_add_window_spec(thd); }
+#line 42422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1672: /* percentile_function: inverse_distribution_function_def WITHIN GROUP_SYM '(' $@148 order_by_single_element_list ')' */
+#line 10991 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[-6].item);
+ }
+#line 42430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1673: /* percentile_function: MEDIAN_SYM '(' expr ')' */
+#line 10995 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *args= new (thd->mem_root) Item_decimal(thd, "0.5", 3,
+ thd->charset());
+ if (unlikely(args == NULL) || unlikely(thd->is_error()))
+ MYSQL_YYABORT;
+ Select->prepare_add_window_spec(thd);
+ if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),FALSE)))
+ MYSQL_YYABORT;
+
+ (yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, args);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1674: /* inverse_distribution_function_def: PERCENTILE_CONT_SYM '(' expr ')' */
+#line 11012 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42458 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1675: /* inverse_distribution_function_def: PERCENTILE_DISC_SYM '(' expr ')' */
+#line 11018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_percentile_disc(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42468 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1676: /* order_by_single_element_list: ORDER_SYM BY order_ident order_dir */
+#line 11027 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 42477 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1677: /* window_name: ident */
+#line 11036 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
+ if (unlikely((yyval.lex_str_ptr) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1678: /* $@149: %empty */
+#line 11045 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(! Lex->parsing_options.allows_variable))
+ my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0)));
+ }
+#line 42496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1679: /* variable: '@' $@149 variable_aux */
+#line 11050 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 42504 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1680: /* variable_aux: ident_or_text SET_VAR expr */
+#line 11057 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_func_set_user_var *item;
+ if (!(yyvsp[-2].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ (yyval.item)= item= new (thd->mem_root) Item_func_set_user_var(thd, &(yyvsp[-2].lex_str), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ LEX *lex= Lex;
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ lex->set_var_list.push_back(item, thd->mem_root);
+ }
+#line 42523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1681: /* variable_aux: ident_or_text */
+#line 11072 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ LEX *lex= Lex;
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ }
+#line 42540 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1682: /* variable_aux: '@' opt_var_ident_type ident_sysvar_name */
+#line 11085 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-1].var_type), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 42549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1683: /* variable_aux: '@' opt_var_ident_type ident_sysvar_name '.' ident */
+#line 11090 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 42558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1684: /* opt_distinct: %empty */
+#line 11097 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 42564 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1685: /* opt_distinct: DISTINCT */
+#line 11098 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 42570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1686: /* opt_gconcat_separator: %empty */
+#line 11103 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1);
+ if (unlikely((yyval.string) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 42580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1687: /* opt_gconcat_separator: SEPARATOR_SYM text_string */
+#line 11108 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.string) = (yyvsp[0].string); }
+#line 42586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1690: /* gorder_list: gorder_list ',' order_ident order_dir */
+#line 11118 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 42595 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1691: /* gorder_list: order_ident order_dir */
+#line 11123 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 42604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1692: /* opt_glimit_clause: %empty */
+#line 11130 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 42610 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1693: /* opt_glimit_clause: glimit_clause */
+#line 11131 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 42616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1694: /* glimit_clause: LIMIT glimit_options */
+#line 11137 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 42624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1695: /* glimit_options: limit_options */
+#line 11144 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->limit_params= (yyvsp[0].select_limit);
+ }
+#line 42632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1696: /* $@150: %empty */
+#line 11153 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->current_select->inc_in_sum_expr()))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 42645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1697: /* in_sum_expr: opt_all $@150 expr */
+#line 11162 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->in_sum_expr--;
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 42654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1698: /* cast_type: BINARY opt_field_length */
+#line 11170 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].Lex_length_and_dec), &my_charset_bin); }
+#line 42660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1699: /* cast_type: CHAR_SYM opt_field_length opt_binary */
+#line 11172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
+ thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 42670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1700: /* cast_type: VARCHAR field_length opt_binary */
+#line 11178 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
+ thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 42680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1701: /* cast_type: VARCHAR2_ORACLE_SYM field_length opt_binary */
+#line 11184 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
+ thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 42690 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1702: /* cast_type: NCHAR_SYM opt_field_length */
+#line 11190 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].Lex_length_and_dec), national_charset_info);
+ }
+#line 42698 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1703: /* cast_type: cast_type_numeric */
+#line 11193 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
+#line 42704 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1704: /* cast_type: cast_type_temporal */
+#line 11194 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
+#line 42710 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1705: /* cast_type: udt_name */
+#line 11196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->set_cast_type_udt(&(yyval.Lex_cast_type), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 42719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1706: /* cast_type_numeric: INT_SYM */
+#line 11203 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_slonglong); }
+#line 42725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1707: /* cast_type_numeric: SIGNED_SYM */
+#line 11204 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_slonglong); }
+#line 42731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1708: /* cast_type_numeric: SIGNED_SYM INT_SYM */
+#line 11205 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_slonglong); }
+#line 42737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1709: /* cast_type_numeric: UNSIGNED */
+#line 11206 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
+#line 42743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1710: /* cast_type_numeric: UNSIGNED INT_SYM */
+#line 11207 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
+#line 42749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1711: /* cast_type_numeric: DECIMAL_SYM float_options */
+#line 11208 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_newdecimal, (yyvsp[0].Lex_length_and_dec)); }
+#line 42755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1712: /* cast_type_numeric: FLOAT_SYM */
+#line 11209 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_float); }
+#line 42761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1713: /* cast_type_numeric: DOUBLE_SYM opt_precision */
+#line 11210 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_double, (yyvsp[0].Lex_length_and_dec)); }
+#line 42767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1714: /* cast_type_temporal: DATE_SYM */
+#line 11214 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_newdate); }
+#line 42773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1715: /* cast_type_temporal: TIME_SYM opt_field_scale */
+#line 11215 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_time2, (yyvsp[0].Lex_length_and_dec)); }
+#line 42779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1716: /* cast_type_temporal: DATETIME opt_field_scale */
+#line 11216 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_datetime2, (yyvsp[0].Lex_length_and_dec)); }
+#line 42785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1717: /* cast_type_temporal: INTERVAL_SYM DAY_SECOND_SYM field_scale */
+#line 11218 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_cast_type).set(&type_handler_interval_DDhhmmssff, (yyvsp[0].Lex_length_and_dec));
+ }
+#line 42793 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1718: /* opt_expr_list: %empty */
+#line 11224 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= NULL; }
+#line 42799 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1719: /* opt_expr_list: expr_list */
+#line 11225 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[0].item_list);}
+#line 42805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1720: /* expr_list: expr */
+#line 11230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_list)= List<Item>::make(thd->mem_root, (yyvsp[0].item)))))
+ MYSQL_YYABORT;
+ }
+#line 42814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1721: /* expr_list: expr_list ',' expr */
+#line 11235 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 42823 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1722: /* ident_list_arg: ident_list */
+#line 11242 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[0].item_list); }
+#line 42829 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1723: /* ident_list_arg: '(' ident_list ')' */
+#line 11243 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[-1].item_list); }
+#line 42835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1724: /* ident_list: simple_ident */
+#line 11248 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= new (thd->mem_root) List<Item>;
+ if (unlikely((yyval.item_list) == NULL) ||
+ unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 42846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1725: /* ident_list: ident_list ',' simple_ident */
+#line 11255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 42855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1726: /* when_list: WHEN_SYM expr THEN_SYM expr */
+#line 11263 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= new (thd->mem_root) List<Item>;
+ if (unlikely((yyval.item_list) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely((yyval.item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
+ (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 42868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1727: /* when_list: when_list WHEN_SYM expr THEN_SYM expr */
+#line 11272 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
+ (yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.item_list)= (yyvsp[-4].item_list);
+ }
+#line 42879 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1729: /* when_list_opt_else: when_list ELSE expr */
+#line 11283 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 42889 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1730: /* table_ref: table_factor */
+#line 11293 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42895 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1731: /* table_ref: join_table */
+#line 11295 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->nest_last_join(thd))))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 42908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1732: /* json_text_literal: TEXT_STRING */
+#line 11307 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1733: /* json_text_literal: NCHAR_STRING */
+#line 11311 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= national_charset_info;
+ }
+#line 42924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1734: /* json_text_literal: UNDERSCORE_CHARSET TEXT_STRING */
+#line 11315 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= (yyvsp[-1].charset);
+ (yyval.lex_string_with_metadata)= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 42933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1736: /* json_text_literal_or_num: NUM */
+#line 11324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1737: /* json_text_literal_or_num: LONG_NUM */
+#line 11328 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42949 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1738: /* json_text_literal_or_num: DECIMAL_NUM */
+#line 11332 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42957 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1739: /* json_text_literal_or_num: FLOAT_NUM */
+#line 11336 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1740: /* join_table_list: derived_table_list */
+#line 11342 "/home/buildbot/git/sql/sql_yacc.yy"
+ { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); }
+#line 42971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1741: /* json_table_columns_clause: COLUMNS '(' json_table_columns_list ')' */
+#line 11347 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42977 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1743: /* json_table_columns_list: json_table_columns_list ',' json_table_column */
+#line 11353 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42983 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1744: /* $@151: %empty */
+#line 11358 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Create_field *f= new (thd->mem_root) Create_field();
+
+ if (unlikely(check_string_char_length(&(yyvsp[0].ident_sys), 0, NAME_CHAR_LEN,
+ system_charset_info, 1)))
+ my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].ident_sys).str));
+
+ lex->json_table->m_cur_json_table_column=
+ new (thd->mem_root) Json_table_column(f,
+ lex->json_table->get_cur_nested_path());
+
+ if (unlikely(!f ||
+ !lex->json_table->m_cur_json_table_column))
+ MYSQL_YYABORT;
+
+ lex->init_last_field(f, &(yyvsp[0].ident_sys));
+ }
+#line 43006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1745: /* json_table_column: ident $@151 json_table_column_type */
+#line 11377 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(lex->json_table->
+ m_cur_json_table_column->m_field->check(thd)))
+ MYSQL_YYABORT;
+ lex->json_table->m_columns.push_back(
+ lex->json_table->m_cur_json_table_column, thd->mem_root);
+ }
+#line 43019 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1746: /* $@152: %empty */
+#line 11386 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Json_table_nested_path *np= new (thd->mem_root)
+ Json_table_nested_path();
+ np->set_path(thd, (yyvsp[0].lex_string_with_metadata));
+ lex->json_table->start_nested_path(np);
+ }
+#line 43031 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1747: /* json_table_column: NESTED_SYM PATH_SYM json_text_literal $@152 json_table_columns_clause */
+#line 11394 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->json_table->end_nested_path();
+ }
+#line 43040 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1748: /* json_table_column_type: FOR_SYM ORDINALITY_SYM */
+#line 11402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_field_type_st type;
+ type.set(&type_handler_slong);
+ Lex->last_field->set_attributes(thd, type,
+ COLUMN_DEFINITION_TABLE_FIELD);
+ Lex->json_table->m_cur_json_table_column->
+ set(Json_table_column::FOR_ORDINALITY);
+ }
+#line 43053 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1749: /* json_table_column_type: json_table_field_type PATH_SYM json_text_literal json_opt_on_empty_or_error */
+#line 11412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[-3].Lex_field_type),
+ COLUMN_DEFINITION_TABLE_FIELD);
+ if (Lex->json_table->m_cur_json_table_column->
+ set(thd, Json_table_column::PATH, (yyvsp[-1].lex_string_with_metadata),
+ (yyvsp[-3].Lex_field_type).charset_collation_attrs()))
+ {
+ MYSQL_YYABORT;
+ }
+ }
+#line 43068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1750: /* json_table_column_type: json_table_field_type EXISTS PATH_SYM json_text_literal */
+#line 11423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[-3].Lex_field_type),
+ COLUMN_DEFINITION_TABLE_FIELD);
+ if (Lex->json_table->m_cur_json_table_column->
+ set(thd, Json_table_column::EXISTS_PATH, (yyvsp[0].lex_string_with_metadata),
+ (yyvsp[-3].Lex_field_type).charset_collation_attrs()))
+ MYSQL_YYABORT;
+ }
+#line 43081 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1755: /* json_opt_on_empty_or_error: %empty */
+#line 11442 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43087 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1760: /* json_on_response: ERROR_SYM */
+#line 11451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.json_on_response).m_response= Json_table_column::RESPONSE_ERROR;
+ }
+#line 43095 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1761: /* json_on_response: NULL_SYM */
+#line 11455 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.json_on_response).m_response= Json_table_column::RESPONSE_NULL;
+ }
+#line 43103 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1762: /* json_on_response: DEFAULT json_text_literal_or_num */
+#line 11459 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.json_on_response).m_response= Json_table_column::RESPONSE_DEFAULT;
+ (yyval.json_on_response).m_default= (yyvsp[0].lex_string_with_metadata);
+ Lex->json_table->m_cur_json_table_column->m_defaults_cs=
+ thd->variables.collation_connection;
+ }
+#line 43114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1763: /* json_on_error_response: json_on_response ON ERROR_SYM */
+#line 11469 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_cur_json_table_column->m_on_error= (yyvsp[-2].json_on_response);
+ }
+#line 43122 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1764: /* json_on_empty_response: json_on_response ON EMPTY_SYM */
+#line 11476 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_cur_json_table_column->m_on_empty= (yyvsp[-2].json_on_response);
+ }
+#line 43130 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1765: /* $@153: %empty */
+#line 11483 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ push_table_function_arg_context(Lex, thd->mem_root);
+ //TODO: introduce IN_TABLE_FUNC_ARGUMENT?
+ Select->parsing_place= IN_ON;
+ }
+#line 43140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1766: /* $@154: %empty */
+#line 11489 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_function_json_table *jt=
+ new (thd->mem_root) Table_function_json_table((yyvsp[-1].item));
+ if (unlikely(!jt))
+ MYSQL_YYABORT;
+ /* See comment for class Table_function_json_table: */
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->json_table= jt;
+
+ Select->parsing_place= NO_MATTER;
+ jt->set_name_resolution_context(Lex->pop_context());
+ }
+#line 43157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1767: /* table_function: JSON_TABLE_SYM '(' $@153 expr ',' $@154 json_text_literal json_table_columns_clause ')' opt_table_alias_clause */
+#line 11502 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ if (unlikely((yyvsp[0].lex_str_ptr) == NULL))
+ {
+ /* Alias is not optional. */
+ my_error(ER_JSON_TABLE_ALIAS_REQUIRED, MYF(0));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->json_table->m_nested_path.set_path(thd, (yyvsp[-3].lex_string_with_metadata))))
+ MYSQL_YYABORT;
+ if (!((yyval.table_list)= sel->add_table_to_list(thd,
+ new (thd->mem_root) Table_ident(thd, &any_db,
+ (yyvsp[0].lex_str_ptr), TRUE),
+ NULL,
+ TL_OPTION_TABLE_FUNCTION,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ 0,0,0)))
+ MYSQL_YYABORT;
+ (yyval.table_list)->table_function= Lex->json_table;
+ Lex->json_table= 0;
+ status_var_increment(thd->status_var.feature_json);
+ }
+#line 43185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1768: /* esc_table_ref: table_ref */
+#line 11535 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)=(yyvsp[0].table_list); }
+#line 43191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1769: /* esc_table_ref: '{' ident table_ref '}' */
+#line 11536 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)=(yyvsp[-1].table_list); }
+#line 43197 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1770: /* derived_table_list: esc_table_ref */
+#line 11543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table_list)=(yyvsp[0].table_list);
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 43206 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1771: /* derived_table_list: derived_table_list ',' esc_table_ref */
+#line 11548 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 43215 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1772: /* join_table: table_ref normal_join table_ref */
+#line 11562 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
+ if (unlikely(Select->add_cross_joined_table((yyvsp[-2].table_list), (yyvsp[0].table_list), (yyvsp[-1].num))))
+ MYSQL_YYABORT;
+ }
+#line 43225 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1773: /* $@155: %empty */
+#line 11569 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-3].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ /* Change the current name resolution context to a local context. */
+ if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-3].table_list), (yyvsp[-1].table_list))))
+ MYSQL_YYABORT;
+ Select->parsing_place= IN_ON;
+ }
+#line 43239 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1774: /* join_table: table_ref normal_join table_ref ON $@155 expr */
+#line 11579 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-3].table_list)->straight=(yyvsp[-4].num);
+ add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
+ (yyvsp[-3].table_list)->on_context= Lex->pop_context();
+ Select->parsing_place= NO_MATTER;
+ }
+#line 43250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1775: /* $@156: %empty */
+#line 11587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-3].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ }
+#line 43260 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1776: /* join_table: table_ref normal_join table_ref USING $@156 '(' using_list ')' */
+#line 11593 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-5].table_list)->straight=(yyvsp[-6].num);
+ add_join_natural((yyvsp[-7].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
+ (yyval.table_list)=(yyvsp[-5].table_list);
+ }
+#line 43270 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1777: /* join_table: table_ref NATURAL inner_join table_factor */
+#line 11599 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
+ Select->add_joined_table((yyvsp[-3].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ (yyvsp[0].table_list)->straight=(yyvsp[-1].num);
+ add_join_natural((yyvsp[-3].table_list),(yyvsp[0].table_list),NULL,Select);
+ }
+#line 43282 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1778: /* $@157: %empty */
+#line 11610 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ /* Change the current name resolution context to a local context. */
+ if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-5].table_list), (yyvsp[-1].table_list))))
+ MYSQL_YYABORT;
+ Select->parsing_place= IN_ON;
+ }
+#line 43296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1779: /* join_table: table_ref LEFT opt_outer JOIN_SYM table_ref ON $@157 expr */
+#line 11620 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
+ (yyvsp[-3].table_list)->on_context= Lex->pop_context();
+ (yyvsp[-3].table_list)->outer_join|=JOIN_TYPE_LEFT;
+ (yyval.table_list)=(yyvsp[-3].table_list);
+ Select->parsing_place= NO_MATTER;
+ }
+#line 43308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1780: /* $@158: %empty */
+#line 11628 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-4].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 43318 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1781: /* join_table: table_ref LEFT opt_outer JOIN_SYM table_factor $@158 USING '(' using_list ')' */
+#line 11634 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ add_join_natural((yyvsp[-9].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
+ (yyvsp[-5].table_list)->outer_join|=JOIN_TYPE_LEFT;
+ (yyval.table_list)=(yyvsp[-5].table_list);
+ }
+#line 43328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1782: /* join_table: table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor */
+#line 11640 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ add_join_natural((yyvsp[-5].table_list),(yyvsp[0].table_list),NULL,Select);
+ (yyvsp[0].table_list)->outer_join|=JOIN_TYPE_LEFT;
+ (yyval.table_list)=(yyvsp[0].table_list);
+ }
+#line 43341 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1783: /* $@159: %empty */
+#line 11652 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ /* Change the current name resolution context to a local context. */
+ if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-5].table_list), (yyvsp[-1].table_list))))
+ MYSQL_YYABORT;
+ Select->parsing_place= IN_ON;
+ }
+#line 43355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1784: /* join_table: table_ref RIGHT opt_outer JOIN_SYM table_ref ON $@159 expr */
+#line 11662 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
+ MYSQL_YYABORT;
+ add_join_on(thd, (yyval.table_list), (yyvsp[0].item));
+ (yyvsp[-7].table_list)->on_context= Lex->pop_context();
+ Select->parsing_place= NO_MATTER;
+ }
+#line 43368 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1785: /* $@160: %empty */
+#line 11671 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-4].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 43378 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1786: /* join_table: table_ref RIGHT opt_outer JOIN_SYM table_factor $@160 USING '(' using_list ')' */
+#line 11677 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
+ MYSQL_YYABORT;
+ add_join_natural((yyval.table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
+ }
+#line 43389 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1787: /* join_table: table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor */
+#line 11684 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ add_join_natural((yyvsp[0].table_list),(yyvsp[-5].table_list),NULL,Select);
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
+ MYSQL_YYABORT;
+ }
+#line 43403 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1788: /* inner_join: JOIN_SYM */
+#line 11697 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 43409 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1789: /* inner_join: INNER_SYM JOIN_SYM */
+#line 11698 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 43415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1790: /* inner_join: STRAIGHT_JOIN */
+#line 11699 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 43421 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1791: /* normal_join: inner_join */
+#line 11703 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = (yyvsp[0].num); }
+#line 43427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1792: /* normal_join: CROSS JOIN_SYM */
+#line 11704 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 43433 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1793: /* opt_use_partition: %empty */
+#line 11712 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.string_list)= 0;}
+#line 43439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1795: /* use_partition: PARTITION_SYM '(' using_list ')' have_partitioning */
+#line 11718 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.string_list)= (yyvsp[-2].string_list);
+ Select->parsing_place= Select->save_parsing_place;
+ Select->save_parsing_place= NO_MATTER;
+ }
+#line 43449 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1796: /* table_factor: table_primary_ident_opt_parens */
+#line 11726 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 43455 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1797: /* table_factor: table_primary_derived_opt_parens */
+#line 11727 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 43461 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1798: /* table_factor: join_table_parens */
+#line 11729 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].table_list)->nested_join->nest_type= 0;
+ (yyval.table_list)= (yyvsp[0].table_list);
+ }
+#line 43470 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1799: /* table_factor: table_reference_list_parens */
+#line 11733 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 43476 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1800: /* table_factor: table_function */
+#line 11734 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 43482 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1801: /* table_primary_ident_opt_parens: table_primary_ident */
+#line 11738 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 43488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1802: /* table_primary_ident_opt_parens: '(' table_primary_ident_opt_parens ')' */
+#line 11739 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 43494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1803: /* table_primary_derived_opt_parens: table_primary_derived */
+#line 11743 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 43500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1804: /* table_primary_derived_opt_parens: '(' table_primary_derived_opt_parens ')' */
+#line 11744 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 43506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1805: /* table_reference_list_parens: '(' table_reference_list_parens ')' */
+#line 11748 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 43512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1806: /* table_reference_list_parens: '(' nested_table_reference_list ')' */
+#line 11750 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Select->end_nested_join(thd)))
+ MYSQL_YYABORT;
+ }
+#line 43521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1807: /* nested_table_reference_list: table_ref ',' table_ref */
+#line 11758 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Select->init_nested_join(thd))
+ MYSQL_YYABORT;
+ Select->add_joined_table((yyvsp[-2].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ (yyval.table_list)= (yyvsp[-2].table_list)->embedding;
+ }
+#line 43533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1808: /* nested_table_reference_list: nested_table_reference_list ',' table_ref */
+#line 11766 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->add_joined_table((yyvsp[0].table_list));
+ (yyval.table_list)= (yyvsp[-2].table_list);
+ }
+#line 43542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1809: /* join_table_parens: '(' join_table_parens ')' */
+#line 11773 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 43548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1810: /* join_table_parens: '(' join_table ')' */
+#line 11775 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!((yyval.table_list)= lex->current_select->nest_last_join(thd)))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 43561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1811: /* table_primary_ident: table_ident opt_use_partition opt_for_system_time_clause opt_table_alias_clause opt_key_definition */
+#line 11789 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
+ 0,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ (yyvsp[-3].string_list))))
+ MYSQL_YYABORT;
+ if ((yyvsp[-2].num))
+ (yyval.table_list)->vers_conditions= Lex->vers_conditions;
+ }
+#line 43577 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1812: /* table_primary_derived: subquery opt_for_system_time_clause table_alias_clause */
+#line 11805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Lex->parsed_derived_table((yyvsp[-2].select_lex)->master_unit(), (yyvsp[-1].num), (yyvsp[0].lex_str_ptr))))
+ MYSQL_YYABORT;
+ }
+#line 43586 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1813: /* opt_outer: %empty */
+#line 11822 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1814: /* opt_outer: OUTER */
+#line 11823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43598 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1815: /* index_hint_clause: %empty */
+#line 11828 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (thd->variables.old_behavior & OLD_MODE_IGNORE_INDEX_ONLY_FOR_JOIN) ?
+ INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL;
+ }
+#line 43607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1816: /* index_hint_clause: FOR_SYM JOIN_SYM */
+#line 11832 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= INDEX_HINT_MASK_JOIN; }
+#line 43613 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1817: /* index_hint_clause: FOR_SYM ORDER_SYM BY */
+#line 11833 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= INDEX_HINT_MASK_ORDER; }
+#line 43619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1818: /* index_hint_clause: FOR_SYM GROUP_SYM BY */
+#line 11834 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= INDEX_HINT_MASK_GROUP; }
+#line 43625 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1819: /* index_hint_type: FORCE_SYM */
+#line 11838 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.index_hint)= INDEX_HINT_FORCE; }
+#line 43631 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1820: /* index_hint_type: IGNORE_SYM */
+#line 11839 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.index_hint)= INDEX_HINT_IGNORE; }
+#line 43637 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1821: /* $@161: %empty */
+#line 11844 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
+ }
+#line 43645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1823: /* $@162: %empty */
+#line 11849 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
+ }
+#line 43653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1828: /* $@163: %empty */
+#line 11862 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->alloc_index_hints(thd); }
+#line 43659 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1830: /* $@164: %empty */
+#line 11866 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->clear_index_hints(); }
+#line 43665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1832: /* opt_key_usage_list: %empty */
+#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->add_index_hint(thd, NULL, 0); }
+#line 43671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1833: /* opt_key_usage_list: key_usage_list */
+#line 11872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1834: /* key_usage_element: ident */
+#line 11877 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->add_index_hint(thd, (yyvsp[0].ident_sys).str, (yyvsp[0].ident_sys).length); }
+#line 43683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1835: /* key_usage_element: PRIMARY_SYM */
+#line 11879 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->add_index_hint(thd, "PRIMARY", 7); }
+#line 43689 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1838: /* using_list: ident */
+#line 11889 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.string_list)= new (thd->mem_root) List<String>)))
+ MYSQL_YYABORT;
+ String *s= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
+ (yyvsp[0].ident_sys).length,
+ system_charset_info);
+ if (unlikely(unlikely(s == NULL)))
+ MYSQL_YYABORT;
+ (yyval.string_list)->push_back(s, thd->mem_root);
+ }
+#line 43704 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1839: /* using_list: using_list ',' ident */
+#line 11900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ String *s= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
+ (yyvsp[0].ident_sys).length,
+ system_charset_info);
+ if (unlikely(unlikely(s == NULL)))
+ MYSQL_YYABORT;
+ if (unlikely((yyvsp[-2].string_list)->push_back(s, thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.string_list)= (yyvsp[-2].string_list);
+ }
+#line 43719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1840: /* interval: interval_time_stamp */
+#line 11913 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1841: /* interval: DAY_HOUR_SYM */
+#line 11914 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_HOUR; }
+#line 43731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1842: /* interval: DAY_MICROSECOND_SYM */
+#line 11915 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
+#line 43737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1843: /* interval: DAY_MINUTE_SYM */
+#line 11916 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_MINUTE; }
+#line 43743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1844: /* interval: DAY_SECOND_SYM */
+#line 11917 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_SECOND; }
+#line 43749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1845: /* interval: HOUR_MICROSECOND_SYM */
+#line 11918 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
+#line 43755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1846: /* interval: HOUR_MINUTE_SYM */
+#line 11919 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_HOUR_MINUTE; }
+#line 43761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1847: /* interval: HOUR_SECOND_SYM */
+#line 11920 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_HOUR_SECOND; }
+#line 43767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1848: /* interval: MINUTE_MICROSECOND_SYM */
+#line 11921 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
+#line 43773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1849: /* interval: MINUTE_SECOND_SYM */
+#line 11922 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_MINUTE_SECOND; }
+#line 43779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1850: /* interval: SECOND_MICROSECOND_SYM */
+#line 11923 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
+#line 43785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1851: /* interval: YEAR_MONTH_SYM */
+#line 11924 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_YEAR_MONTH; }
+#line 43791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1852: /* interval_time_stamp: DAY_SYM */
+#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_DAY; }
+#line 43797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1853: /* interval_time_stamp: WEEK_SYM */
+#line 11929 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_WEEK; }
+#line 43803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1854: /* interval_time_stamp: HOUR_SYM */
+#line 11930 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_HOUR; }
+#line 43809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1855: /* interval_time_stamp: MINUTE_SYM */
+#line 11931 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_MINUTE; }
+#line 43815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1856: /* interval_time_stamp: MONTH_SYM */
+#line 11932 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_MONTH; }
+#line 43821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1857: /* interval_time_stamp: QUARTER_SYM */
+#line 11933 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_QUARTER; }
+#line 43827 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1858: /* interval_time_stamp: SECOND_SYM */
+#line 11934 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_SECOND; }
+#line 43833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1859: /* interval_time_stamp: MICROSECOND_SYM */
+#line 11935 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
+#line 43839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1860: /* interval_time_stamp: YEAR_SYM */
+#line 11936 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_YEAR; }
+#line 43845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1861: /* date_time_type: DATE_SYM */
+#line 11940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
+#line 43851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1862: /* date_time_type: TIME_SYM */
+#line 11941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
+#line 43857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1863: /* date_time_type: DATETIME */
+#line 11942 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
+#line 43863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1864: /* date_time_type: TIMESTAMP */
+#line 11943 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
+#line 43869 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1868: /* opt_table_alias_clause: %empty */
+#line 11953 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str_ptr)=0; }
+#line 43875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1869: /* opt_table_alias_clause: table_alias_clause */
+#line 11954 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str_ptr)= (yyvsp[0].lex_str_ptr); }
+#line 43881 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1870: /* table_alias_clause: table_alias ident_table_alias */
+#line 11959 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str_ptr)= (LEX_CSTRING*) thd->memdup(&(yyvsp[0].ident_sys),sizeof(LEX_STRING));
+ if (unlikely((yyval.lex_str_ptr) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43891 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1873: /* opt_where_clause: %empty */
+#line 11972 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->where= 0; }
+#line 43897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1874: /* $@165: %empty */
+#line 11974 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_WHERE;
+ }
+#line 43905 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1875: /* opt_where_clause: WHERE $@165 expr */
+#line 11978 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *select= Select;
+ select->where= normalize_cond(thd, (yyvsp[0].item));
+ select->parsing_place= NO_MATTER;
+ if ((yyvsp[0].item))
+ (yyvsp[0].item)->top_level_item();
+ }
+#line 43917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1877: /* $@166: %empty */
+#line 11990 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_HAVING;
+ }
+#line 43925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1878: /* opt_having_clause: HAVING $@166 expr */
+#line 11994 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->having= normalize_cond(thd, (yyvsp[0].item));
+ sel->parsing_place= NO_MATTER;
+ if ((yyvsp[0].item))
+ (yyvsp[0].item)->top_level_item();
+ }
+#line 43937 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1881: /* group_list: group_list ',' order_ident order_dir */
+#line 12014 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 43946 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1882: /* group_list: order_ident order_dir */
+#line 12019 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 43955 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1883: /* olap_opt: %empty */
+#line 12026 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43961 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1884: /* olap_opt: WITH_CUBE_SYM */
+#line 12028 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ 'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
+ and cause LALR(2) conflicts.
+ This syntax is not standard.
+ MySQL syntax: GROUP BY col1, col2, col3 WITH CUBE
+ SQL-2003: GROUP BY ... CUBE(col1, col2, col3)
+ */
+ LEX *lex=Lex;
+ 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;
+
+ my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE"));
+ }
+#line 43982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1885: /* olap_opt: WITH_ROLLUP_SYM */
+#line 12045 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ 'WITH ROLLUP' is needed for backward compatibility,
+ and cause LALR(2) conflicts.
+ This syntax is not standard.
+ MySQL syntax: GROUP BY col1, col2, col3 WITH ROLLUP
+ SQL-2003: GROUP BY ... ROLLUP(col1, col2, col3)
+ */
+ LEX *lex= Lex;
+ 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;
+ }
+#line 44001 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1886: /* opt_window_clause: %empty */
+#line 12067 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44007 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1887: /* opt_window_clause: WINDOW_SYM window_def_list */
+#line 12070 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44013 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1890: /* window_def: window_name AS window_spec */
+#line 12080 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(Select->add_window_def(thd, (yyvsp[-2].lex_str_ptr), lex->win_ref,
+ Select->group_list,
+ Select->order_list,
+ lex->win_frame)))
+ MYSQL_YYABORT;
+ }
+#line 44026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1891: /* $@167: %empty */
+#line 12092 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->prepare_add_window_spec(thd); }
+#line 44032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1892: /* window_spec: '(' $@167 opt_window_ref opt_window_partition_clause opt_window_order_clause opt_window_frame_clause ')' */
+#line 12096 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 44038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1893: /* opt_window_ref: %empty */
+#line 12100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1894: /* opt_window_ref: ident */
+#line 12102 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->lex->win_ref= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
+ if (unlikely(thd->lex->win_ref == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1895: /* opt_window_partition_clause: %empty */
+#line 12110 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 44060 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1897: /* opt_window_order_clause: %empty */
+#line 12115 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 44066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1898: /* opt_window_order_clause: ORDER_SYM BY order_list */
+#line 12116 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->order_list= *((yyvsp[0].select_order)); }
+#line 44072 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1899: /* opt_window_frame_clause: %empty */
+#line 12120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1900: /* opt_window_frame_clause: window_frame_units window_frame_extent opt_window_frame_exclusion */
+#line 12122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->win_frame=
+ new (thd->mem_root) Window_frame((yyvsp[-2].frame_units),
+ lex->frame_top_bound,
+ lex->frame_bottom_bound,
+ (yyvsp[0].frame_exclusion));
+ if (unlikely(lex->win_frame == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44093 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1901: /* window_frame_units: ROWS_SYM */
+#line 12135 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_units)= Window_frame::UNITS_ROWS; }
+#line 44099 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1902: /* window_frame_units: RANGE_SYM */
+#line 12136 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_units)= Window_frame::UNITS_RANGE; }
+#line 44105 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1903: /* window_frame_extent: window_frame_start */
+#line 12141 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->frame_top_bound= (yyvsp[0].window_frame_bound);
+ lex->frame_bottom_bound=
+ new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::CURRENT, NULL);
+ if (unlikely(lex->frame_bottom_bound == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1904: /* window_frame_extent: BETWEEN_SYM window_frame_bound AND_SYM window_frame_bound */
+#line 12151 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->frame_top_bound= (yyvsp[-2].window_frame_bound);
+ lex->frame_bottom_bound= (yyvsp[0].window_frame_bound);
+ }
+#line 44129 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1905: /* window_frame_start: UNBOUNDED_SYM PRECEDING_SYM */
+#line 12160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::PRECEDING, NULL);
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1906: /* window_frame_start: CURRENT_SYM ROW_SYM */
+#line 12167 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::CURRENT, NULL);
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1907: /* window_frame_start: literal PRECEDING_SYM */
+#line 12174 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::PRECEDING, (yyvsp[-1].item));
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1908: /* window_frame_bound: window_frame_start */
+#line 12183 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.window_frame_bound)= (yyvsp[0].window_frame_bound); }
+#line 44168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1909: /* window_frame_bound: UNBOUNDED_SYM FOLLOWING_SYM */
+#line 12185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::FOLLOWING, NULL);
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44179 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1910: /* window_frame_bound: literal FOLLOWING_SYM */
+#line 12192 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::FOLLOWING, (yyvsp[-1].item));
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44190 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1911: /* opt_window_frame_exclusion: %empty */
+#line 12201 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
+#line 44196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1912: /* opt_window_frame_exclusion: EXCLUDE_SYM CURRENT_SYM ROW_SYM */
+#line 12203 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_CURRENT_ROW; }
+#line 44202 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1913: /* opt_window_frame_exclusion: EXCLUDE_SYM GROUP_SYM */
+#line 12205 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_GROUP; }
+#line 44208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1914: /* opt_window_frame_exclusion: EXCLUDE_SYM TIES_SYM */
+#line 12207 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_TIES; }
+#line 44214 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1915: /* opt_window_frame_exclusion: EXCLUDE_SYM NO_SYM OTHERS_MARIADB_SYM */
+#line 12209 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
+#line 44220 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1916: /* opt_window_frame_exclusion: EXCLUDE_SYM NO_SYM OTHERS_ORACLE_SYM */
+#line 12211 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
+#line 44226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1920: /* alter_order_item: simple_ident_nospvar order_dir */
+#line 12229 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ bool ascending= ((yyvsp[0].num) == 1) ? true : false;
+ if (unlikely(add_order_to_list(thd, (yyvsp[-1].item), ascending)))
+ MYSQL_YYABORT;
+ }
+#line 44236 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1921: /* opt_order_clause: %empty */
+#line 12242 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_order)= NULL; }
+#line 44242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1922: /* opt_order_clause: order_clause */
+#line 12244 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_order)= (yyvsp[0].select_order); }
+#line 44248 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1923: /* $@168: %empty */
+#line 12249 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->where= "ORDER clause";
+ }
+#line 44256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1924: /* order_clause: ORDER_SYM BY $@168 order_list */
+#line 12253 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_order)= (yyvsp[0].select_order);
+ }
+#line 44264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1925: /* order_list: order_list ',' order_ident order_dir */
+#line 12260 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_order)= (yyvsp[-3].select_order);
+ if (add_to_list(thd, *(yyval.select_order), (yyvsp[-1].item),(bool) (yyvsp[0].num)))
+ MYSQL_YYABORT;
+ }
+#line 44274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1926: /* order_list: order_ident order_dir */
+#line 12266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_order)= new (thd->mem_root) SQL_I_List<ORDER>();
+ if (add_to_list(thd, *(yyval.select_order), (yyvsp[-1].item), (bool) (yyvsp[0].num)))
+ MYSQL_YYABORT;
+ }
+#line 44284 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1927: /* order_dir: %empty */
+#line 12274 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 44290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1928: /* order_dir: ASC */
+#line 12275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 44296 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1929: /* order_dir: DESC */
+#line 12276 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 44302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1930: /* opt_limit_clause: %empty */
+#line 12282 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_limit).clear(); }
+#line 44308 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1931: /* opt_limit_clause: limit_clause */
+#line 12284 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_limit)= (yyvsp[0].select_limit); }
+#line 44314 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1932: /* limit_clause: LIMIT limit_options */
+#line 12289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit)= (yyvsp[0].select_limit);
+ if (!(yyval.select_limit).select_limit->basic_const_item() ||
+ (yyval.select_limit).select_limit->val_int() > 0)
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 44325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1933: /* limit_clause: LIMIT limit_options ROWS_SYM EXAMINED_SYM limit_rows_option */
+#line 12297 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit)= (yyvsp[-3].select_limit);
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 44334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1934: /* limit_clause: LIMIT ROWS_SYM EXAMINED_SYM limit_rows_option */
+#line 12302 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).clear();
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 44343 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1935: /* limit_clause: fetch_first_clause */
+#line 12307 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit)= (yyvsp[0].select_limit);
+ if (!(yyval.select_limit).select_limit ||
+ !(yyval.select_limit).select_limit->basic_const_item() ||
+ (yyval.select_limit).select_limit->val_int() > 0)
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 44355 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1936: /* fetch_first_clause: FETCH_SYM first_or_next row_or_rows only_or_with_ties */
+#line 12318 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (unlikely(one == NULL))
+ MYSQL_YYABORT;
+ (yyval.select_limit).select_limit= one;
+ (yyval.select_limit).offset_limit= 0;
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 44369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1937: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows FETCH_SYM first_or_next row_or_rows only_or_with_ties */
+#line 12329 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (unlikely(one == NULL))
+ MYSQL_YYABORT;
+ (yyval.select_limit).select_limit= one;
+ (yyval.select_limit).offset_limit= (yyvsp[-5].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 44383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1938: /* fetch_first_clause: FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties */
+#line 12339 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[-2].item);
+ (yyval.select_limit).offset_limit= 0;
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 44394 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1939: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties */
+#line 12347 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[-2].item);
+ (yyval.select_limit).offset_limit= (yyvsp[-6].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 44405 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1940: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows */
+#line 12354 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= 0;
+ (yyval.select_limit).offset_limit= (yyvsp[-1].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 44416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1945: /* only_or_with_ties: ONLY_SYM */
+#line 12373 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 44422 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1946: /* only_or_with_ties: WITH TIES_SYM */
+#line 12374 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 44428 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1947: /* opt_global_limit_clause: opt_limit_clause */
+#line 12380 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->limit_params= (yyvsp[0].select_limit);
+ }
+#line 44436 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1948: /* limit_options: limit_option */
+#line 12387 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[0].item);
+ (yyval.select_limit).offset_limit= NULL;
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 44447 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1949: /* limit_options: limit_option ',' limit_option */
+#line 12394 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[0].item);
+ (yyval.select_limit).offset_limit= (yyvsp[-2].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 44458 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1950: /* limit_options: limit_option OFFSET_SYM limit_option */
+#line 12401 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[-2].item);
+ (yyval.select_limit).offset_limit= (yyvsp[0].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 44469 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1951: /* limit_option: ident_cli */
+#line 12411 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 44478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1952: /* limit_option: ident_cli '.' ident_cli */
+#line 12416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 44487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1953: /* limit_option: param_marker */
+#line 12421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].item_param)->limit_clause_param= TRUE;
+ }
+#line 44495 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1954: /* limit_option: ULONGLONG_NUM */
+#line 12425 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1955: /* limit_option: LONG_NUM */
+#line 12431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1956: /* limit_option: NUM */
+#line 12437 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1957: /* limit_rows_option: limit_option */
+#line 12446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->limit_rows_examined= (yyvsp[0].item);
+ }
+#line 44533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1958: /* delete_limit_clause: %empty */
+#line 12453 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->current_select->limit_params.select_limit= 0;
+ }
+#line 44542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1959: /* delete_limit_clause: LIMIT limit_option */
+#line 12458 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->limit_params.select_limit= (yyvsp[0].item);
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ sel->limit_params.explicit_limit= 1;
+ }
+#line 44553 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1960: /* delete_limit_clause: LIMIT ROWS_SYM EXAMINED_SYM */
+#line 12464 "/home/buildbot/git/sql/sql_yacc.yy"
+ { thd->parse_error(); MYSQL_YYABORT; }
+#line 44559 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1961: /* delete_limit_clause: LIMIT limit_option ROWS_SYM EXAMINED_SYM */
+#line 12465 "/home/buildbot/git/sql/sql_yacc.yy"
+ { thd->parse_error(); MYSQL_YYABORT; }
+#line 44565 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1962: /* order_limit_lock: order_or_limit */
+#line 12470 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= (yyvsp[0].order_limit_lock);
+ (yyval.order_limit_lock)->lock.empty();
+ }
+#line 44574 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1963: /* order_limit_lock: order_or_limit select_lock_type */
+#line 12475 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= (yyvsp[-1].order_limit_lock);
+ (yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
+ }
+#line 44583 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1964: /* order_limit_lock: select_lock_type */
+#line 12480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
+ if (!(yyval.order_limit_lock))
+ YYABORT;
+ (yyval.order_limit_lock)->order_list= NULL;
+ (yyval.order_limit_lock)->limit.clear();
+ (yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
+ }
+#line 44596 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1965: /* opt_order_limit_lock: %empty */
+#line 12492 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select();
+ (yyval.order_limit_lock)= NULL;
+ }
+#line 44605 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1966: /* opt_order_limit_lock: order_limit_lock */
+#line 12496 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.order_limit_lock)= (yyvsp[0].order_limit_lock); }
+#line 44611 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1969: /* opt_procedure_or_into: %empty */
+#line 12509 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ }
+#line 44619 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1970: /* opt_procedure_or_into: procedure_clause opt_select_lock_type */
+#line 12513 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ }
+#line 44627 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1971: /* opt_procedure_or_into: into opt_select_lock_type */
+#line 12517 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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...'");
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ }
+#line 44641 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1972: /* order_or_limit: order_clause opt_limit_clause */
+#line 12531 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
+ if (!(yyval.order_limit_lock))
+ YYABORT;
+ (yyval.order_limit_lock)->order_list= (yyvsp[-1].select_order);
+ (yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
+ }
+#line 44653 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1973: /* order_or_limit: limit_clause */
+#line 12539 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
+ if (!(yyval.order_limit_lock))
+ YYABORT;
+ (yyval.order_limit_lock)->order_list= NULL;
+ (yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
+ }
+#line 44665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1976: /* int_num: opt_plus NUM */
+#line 12555 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44671 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1977: /* int_num: '-' NUM */
+#line 12556 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1978: /* ulong_num: opt_plus NUM */
+#line 12560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1979: /* ulong_num: HEX_NUM */
+#line 12561 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= strtoul((yyvsp[0].lex_str).str, (char**) 0, 16); }
+#line 44689 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1980: /* ulong_num: opt_plus LONG_NUM */
+#line 12562 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44695 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1981: /* ulong_num: opt_plus ULONGLONG_NUM */
+#line 12563 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1982: /* ulong_num: opt_plus DECIMAL_NUM */
+#line 12564 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44707 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1983: /* ulong_num: opt_plus FLOAT_NUM */
+#line 12565 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44713 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1984: /* real_ulong_num: NUM */
+#line 12569 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1985: /* real_ulong_num: HEX_NUM */
+#line 12570 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
+#line 44725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1986: /* real_ulong_num: LONG_NUM */
+#line 12571 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1987: /* real_ulong_num: ULONGLONG_NUM */
+#line 12572 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1988: /* real_ulong_num: dec_num_error */
+#line 12573 "/home/buildbot/git/sql/sql_yacc.yy"
+ { MYSQL_YYABORT; }
+#line 44743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1989: /* longlong_num: opt_plus NUM */
+#line 12577 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1990: /* longlong_num: LONG_NUM */
+#line 12578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44755 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1991: /* longlong_num: '-' NUM */
+#line 12579 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1992: /* longlong_num: '-' LONG_NUM */
+#line 12580 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1993: /* ulonglong_num: opt_plus NUM */
+#line 12584 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44773 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1994: /* ulonglong_num: opt_plus ULONGLONG_NUM */
+#line 12585 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44779 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1995: /* ulonglong_num: opt_plus LONG_NUM */
+#line 12586 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1996: /* ulonglong_num: opt_plus DECIMAL_NUM */
+#line 12587 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1997: /* ulonglong_num: opt_plus FLOAT_NUM */
+#line 12588 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44797 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1998: /* real_ulonglong_num: NUM */
+#line 12592 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44803 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 1999: /* real_ulonglong_num: ULONGLONG_NUM */
+#line 12593 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44809 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2000: /* real_ulonglong_num: HEX_NUM */
+#line 12594 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); }
+#line 44815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2001: /* real_ulonglong_num: LONG_NUM */
+#line 12595 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44821 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2002: /* real_ulonglong_num: dec_num_error */
+#line 12596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { MYSQL_YYABORT; }
+#line 44827 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2003: /* dec_num_error: dec_num */
+#line 12601 "/home/buildbot/git/sql/sql_yacc.yy"
+ { thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
+#line 44833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2006: /* choice: ulong_num */
+#line 12610 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
+#line 44839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2007: /* choice: DEFAULT */
+#line 12611 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.choice)= HA_CHOICE_UNDEF; }
+#line 44845 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2008: /* bool: ulong_num */
+#line 12615 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
+#line 44851 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2009: /* bool: TRUE_SYM */
+#line 12616 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 1; }
+#line 44857 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2010: /* bool: FALSE_SYM */
+#line 12617 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 44863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2011: /* $@169: %empty */
+#line 12622 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+
+ lex->proc_list.elements=0;
+ lex->proc_list.first=0;
+ lex->proc_list.next= &lex->proc_list.first;
+ Item_field *item= new (thd->mem_root)
+ Item_field(thd, &lex->current_select->context,
+ (yyvsp[0].ident_sys));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(add_proc_to_list(thd, item)))
+ MYSQL_YYABORT;
+ Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+
+ /*
+ PROCEDURE CLAUSE cannot handle subquery as one of its parameter,
+ so disallow any subqueries further.
+ Alow subqueries back once the parameters are reduced.
+ */
+ Lex->clause_that_disallows_subselect= "PROCEDURE";
+ Select->options|= OPTION_PROCEDURE_CLAUSE;
+ }
+#line 44891 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2012: /* procedure_clause: PROCEDURE_SYM ident $@169 '(' procedure_list ')' */
+#line 12646 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Subqueries are allowed from now.*/
+ Lex->clause_that_disallows_subselect= NULL;
+ }
+#line 44900 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2013: /* procedure_list: %empty */
+#line 12653 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2014: /* procedure_list: procedure_list2 */
+#line 12654 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2017: /* procedure_item: remember_name expr remember_end */
+#line 12664 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_proc_to_list(thd, (yyvsp[-1].item))))
+ MYSQL_YYABORT;
+ if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
+ (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 44923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2018: /* $@170: %empty */
+#line 12673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (!lex->describe &&
+ unlikely((!(lex->result= new (thd->mem_root)
+ select_dumpvar(thd)))))
+ MYSQL_YYABORT;
+ }
+#line 44935 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2019: /* select_var_list_init: $@170 select_var_list */
+#line 12681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2021: /* select_var_list: select_var_ident */
+#line 12686 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2022: /* select_var_ident: select_outvar */
+#line 12690 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->result)
+ {
+ if (unlikely((yyvsp[0].myvar) == NULL))
+ MYSQL_YYABORT;
+ ((select_dumpvar *)Lex->result)->var_list.push_back((yyvsp[0].myvar), thd->mem_root);
+ }
+ else
+ {
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(Lex->describe);
+ }
+ }
+#line 44968 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2023: /* select_outvar: '@' ident_or_text */
+#line 12710 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+
+ (yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user(&(yyvsp[0].lex_str)) : NULL;
+ }
+#line 44982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2024: /* select_outvar: ident_or_text */
+#line 12720 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[0].lex_str))) && Lex->result))
+ MYSQL_YYABORT;
+ }
+#line 44991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2025: /* select_outvar: ident '.' ident */
+#line 12725 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))) && Lex->result))
+ MYSQL_YYABORT;
+ }
+#line 45000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2026: /* into: INTO into_destination */
+#line 12733 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2027: /* $@171: %empty */
+#line 12738 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ if (unlikely(!(lex->exchange=
+ new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str, 0))) ||
+ unlikely(!(lex->result=
+ new (thd->mem_root)
+ select_export(thd, lex->exchange))))
+ MYSQL_YYABORT;
+ }
+#line 45021 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2028: /* $@172: %empty */
+#line 12749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->exchange->cs= (yyvsp[0].charset); }
+#line 45027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2030: /* into_destination: DUMPFILE TEXT_STRING_filesystem */
+#line 12752 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (!lex->describe)
+ {
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ if (unlikely(!(lex->exchange=
+ new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str,1))))
+ MYSQL_YYABORT;
+ if (unlikely(!(lex->result=
+ new (thd->mem_root)
+ select_dump(thd, lex->exchange))))
+ MYSQL_YYABORT;
+ }
+ }
+#line 45046 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2031: /* into_destination: select_var_list_init */
+#line 12767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ }
+#line 45054 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2032: /* $@173: %empty */
+#line 12778 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_DO;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
+ lex->init_select();
+ }
+#line 45066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2033: /* do: DO_SYM $@173 expr_list */
+#line 12786 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->insert_list= (yyvsp[0].item_list);
+ Lex->pop_select(); //main select
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 45077 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2034: /* $@174: %empty */
+#line 12800 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_command(SQLCOM_DROP_TABLE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
+ YYPS->m_lock_type= TL_UNLOCK;
+ YYPS->m_mdl_type= MDL_EXCLUSIVE;
+ }
+#line 45088 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2035: /* drop: DROP opt_temporary table_or_tables opt_if_exists $@174 table_list opt_lock_wait_timeout opt_restrict */
+#line 12807 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2036: /* $@175: %empty */
+#line 12809 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 45103 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2037: /* drop: DROP INDEX_SYM $@175 opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout */
+#line 12814 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::KEY, (yyvsp[-3].ident_sys).str, (yyvsp[-4].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->sql_command= SQLCOM_DROP_INDEX;
+ lex->alter_info.reset();
+ 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, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_UPGRADABLE)))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ }
+#line 45125 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2038: /* drop: DROP DATABASE opt_if_exists ident */
+#line 12832 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_command(SQLCOM_DROP_DB, (yyvsp[-1].object_ddl_options));
+ lex->name= (yyvsp[0].ident_sys);
+ }
+#line 45135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2039: /* drop: DROP USER_SYM opt_if_exists clear_privileges user_list */
+#line 12838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options));
+ }
+#line 45143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2040: /* drop: DROP ROLE_SYM opt_if_exists clear_privileges role_list */
+#line 12842 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options));
+ }
+#line 45151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2041: /* $@176: %empty */
+#line 12846 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_VIEW, (yyvsp[0].object_ddl_options));
+ YYPS->m_lock_type= TL_UNLOCK;
+ YYPS->m_mdl_type= MDL_EXCLUSIVE;
+ }
+#line 45162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2042: /* drop: DROP VIEW_SYM opt_if_exists $@176 table_list opt_restrict */
+#line 12853 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2043: /* drop: DROP EVENT_SYM opt_if_exists sp_name */
+#line 12855 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->spname= (yyvsp[0].spname);
+ Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options));
+ }
+#line 45177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2044: /* drop: DROP TRIGGER_SYM opt_if_exists sp_name */
+#line 12860 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_TRIGGER, (yyvsp[-1].object_ddl_options));
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45187 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2045: /* drop: DROP SERVER_SYM opt_if_exists ident_or_text */
+#line 12866 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_DROP_SERVER, (yyvsp[-1].object_ddl_options));
+ Lex->server_options.reset((yyvsp[0].lex_str));
+ }
+#line 45196 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2046: /* $@177: %empty */
+#line 12872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_SEQUENCE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
+ lex->table_type= TABLE_TYPE_SEQUENCE;
+ YYPS->m_lock_type= TL_UNLOCK;
+ YYPS->m_mdl_type= MDL_EXCLUSIVE;
+ }
+#line 45208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2047: /* drop: DROP opt_temporary SEQUENCE_SYM opt_if_exists $@177 table_list */
+#line 12880 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45214 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2051: /* table_name: table_ident */
+#line 12891 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!thd->lex->current_select_or_default()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL,
+ TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type))
+ MYSQL_YYABORT;
+ }
+#line 45227 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2052: /* table_name_with_opt_use_partition: table_ident opt_use_partition */
+#line 12903 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
+ TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ NULL,
+ (yyvsp[0].string_list))))
+ MYSQL_YYABORT;
+ }
+#line 45241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2055: /* table_alias_ref: table_ident_opt_wild */
+#line 12921 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->
+ add_table_to_list(thd, (yyvsp[0].table), NULL,
+ (TL_OPTION_UPDATING |
+ TL_OPTION_ALIAS),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 45255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2056: /* opt_if_exists_table_element: %empty */
+#line 12934 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= FALSE;
+ (yyval.num)= 0;
+ }
+#line 45264 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2057: /* opt_if_exists_table_element: IF_SYM EXISTS */
+#line 12939 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= TRUE;
+ (yyval.num)= 1;
+ }
+#line 45273 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2058: /* opt_if_exists: %empty */
+#line 12947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
+ }
+#line 45281 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2059: /* opt_if_exists: IF_SYM EXISTS */
+#line 12951 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS);
+ }
+#line 45289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2060: /* opt_temporary: %empty */
+#line 12957 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 45295 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2061: /* opt_temporary: TEMPORARY */
+#line 12958 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
+#line 45301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2062: /* $@178: %empty */
+#line 12966 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_INSERT;
+ Lex->duplicates= DUP_ERROR;
+ thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
+ thd->get_stmt_da()->reset_current_row_for_warning(1);
+ }
+#line 45312 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2063: /* $@179: %empty */
+#line 12973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_lock_for_tables((yyvsp[-3].lock_type), true, false);
+ }
+#line 45320 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2064: /* insert: INSERT $@178 insert_start insert_lock_option opt_ignore opt_into insert_table $@179 insert_field_spec opt_insert_update opt_returning stmt_end */
+#line 12978 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mark_first_table_as_inserting();
+ thd->get_stmt_da()->reset_current_row_for_warning(0);
+ }
+#line 45329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2065: /* $@180: %empty */
+#line 12986 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_REPLACE;
+ Lex->duplicates= DUP_REPLACE;
+ thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
+ thd->get_stmt_da()->reset_current_row_for_warning(1);
+ }
+#line 45340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2066: /* $@181: %empty */
+#line 12993 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_lock_for_tables((yyvsp[-2].lock_type), true, false);
+ }
+#line 45348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2067: /* replace: REPLACE $@180 insert_start replace_lock_option opt_into insert_table $@181 insert_field_spec opt_returning stmt_end */
+#line 12998 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mark_first_table_as_inserting();
+ thd->get_stmt_da()->reset_current_row_for_warning(0);
+ }
+#line 45357 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2068: /* insert_start: %empty */
+#line 13004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->init_select();
+ Lex->inc_select_stack_outer_barrier();
+ Lex->current_select->parsing_place= BEFORE_OPT_LIST;
+ }
+#line 45369 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2069: /* stmt_end: %empty */
+#line 13013 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 45379 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2070: /* insert_lock_option: %empty */
+#line 13022 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ If it is SP we do not allow insert optimisation when result of
+ insert visible only after the table unlocking but everyone can
+ read table.
+ */
+ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
+ }
+#line 45392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2072: /* insert_lock_option: HIGH_PRIORITY */
+#line 13031 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE; }
+#line 45398 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2073: /* replace_lock_option: %empty */
+#line 13035 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_DEFAULT; }
+#line 45404 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2075: /* insert_replace_option: LOW_PRIORITY */
+#line 13040 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
+#line 45410 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2076: /* insert_replace_option: DELAYED_SYM */
+#line 13042 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
+ Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
+ (yyval.lock_type)= TL_WRITE_DELAYED;
+ }
+#line 45420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2079: /* $@182: %empty */
+#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->save_parsing_place= Select->parsing_place;
+ }
+#line 45428 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2080: /* insert_table: $@182 table_name_with_opt_use_partition */
+#line 13056 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ //lex->field_list.empty();
+ lex->many_values.empty();
+ lex->insert_list=0;
+ }
+#line 45439 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2081: /* insert_field_spec: insert_values */
+#line 13065 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45445 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2082: /* insert_field_spec: insert_field_list insert_values */
+#line 13066 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45451 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2083: /* $@183: %empty */
+#line 13068 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)) ||
+ unlikely(lex->many_values.push_back(lex->insert_list,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ lex->current_select->parsing_place= NO_MATTER;
+ }
+#line 45464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2085: /* insert_field_list: LEFT_PAREN_ALT opt_fields ')' */
+#line 13081 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->current_select->parsing_place= AFTER_LIST;
+ }
+#line 45472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2088: /* fields: fields ',' insert_ident */
+#line 13093 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 45478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2089: /* fields: insert_ident */
+#line 13094 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 45484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2090: /* insert_values: create_select_query_expression */
+#line 13100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45490 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2095: /* ident_eq_value: simple_ident_nospvar equal expr_or_ignore_or_default */
+#line 13115 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(lex->field_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
+ unlikely(lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45501 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2096: /* equal: '=' */
+#line 13124 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45507 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2097: /* equal: SET_VAR */
+#line 13125 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45513 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2098: /* opt_equal: %empty */
+#line 13129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45519 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2099: /* opt_equal: equal */
+#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2100: /* opt_with: opt_equal */
+#line 13134 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45531 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2101: /* opt_with: WITH */
+#line 13135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45537 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2102: /* opt_by: opt_equal */
+#line 13139 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45543 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2103: /* opt_by: BY */
+#line 13140 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2104: /* $@184: %empty */
+#line 13145 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
+ MYSQL_YYABORT;
+ }
+#line 45558 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2105: /* no_braces: '(' $@184 opt_values ')' */
+#line 13150 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ thd->get_stmt_da()->inc_current_row_for_warning();
+ if (unlikely(lex->many_values.push_back(lex->insert_list,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2106: /* $@185: %empty */
+#line 13161 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
+ MYSQL_YYABORT;
+ }
+#line 45579 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2107: /* no_braces_with_names: '(' $@185 opt_values_with_names ')' */
+#line 13166 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ thd->get_stmt_da()->inc_current_row_for_warning();
+ if (unlikely(lex->many_values.push_back(lex->insert_list,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2108: /* opt_values: %empty */
+#line 13176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2110: /* opt_values_with_names: %empty */
+#line 13181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2112: /* values: values ',' expr_or_ignore_or_default */
+#line 13187 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2113: /* values: expr_or_ignore_or_default */
+#line 13192 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2114: /* values_with_names: values_with_names ',' remember_name expr_or_ignore_or_default remember_end */
+#line 13200 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ // give some name in case of using in table value constuctor (TVC)
+ if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
+ (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 45633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2115: /* values_with_names: remember_name expr_or_ignore_or_default remember_end */
+#line 13208 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ // give some name in case of using in table value constuctor (TVC)
+ if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
+ (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 45645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2116: /* expr_or_ignore: expr */
+#line 13218 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item);}
+#line 45651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2117: /* expr_or_ignore: IGNORE_SYM */
+#line 13220 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_ignore_specification(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 45661 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2118: /* expr_or_ignore_or_default: expr_or_ignore */
+#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item);}
+#line 45667 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2119: /* expr_or_ignore_or_default: DEFAULT */
+#line 13230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_default_specification(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 45677 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2121: /* $@186: %empty */
+#line 13239 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->duplicates= DUP_UPDATE; }
+#line 45683 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2122: /* $@187: %empty */
+#line 13241 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
+ }
+#line 45691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2123: /* opt_insert_update: ON DUPLICATE_SYM $@186 KEY_SYM UPDATE_SYM $@187 insert_update_list */
+#line 13245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ }
+#line 45699 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2124: /* update_table_list: table_ident opt_use_partition for_portion_of_time_clause opt_table_alias_clause opt_key_definition */
+#line 13253 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
+ 0,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ (yyvsp[-3].string_list))))
+ MYSQL_YYABORT;
+ (yyval.table_list)->period_conditions= Lex->period_conditions;
+ }
+#line 45714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2125: /* update_table_list: join_table_list */
+#line 13263 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 45720 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2126: /* $@188: %empty */
+#line 13270 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->sql_command= SQLCOM_UPDATE;
+ lex->duplicates= DUP_ERROR;
+ }
+#line 45733 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2127: /* $@189: %empty */
+#line 13280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *slex= Lex->first_select_lex();
+ if (slex->table_list.elements > 1)
+ Lex->sql_command= SQLCOM_UPDATE_MULTI;
+ 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),
+ slex->get_table_list()->alias.str, "UPDATE");
+ MYSQL_YYABORT;
+ }
+ /*
+ In case of multi-update setting write lock for all tables may
+ be too pessimistic. We will decrease lock level if possible in
+ mysql_multi_update().
+ */
+ slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1, false);
+ }
+#line 45756 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2128: /* $@190: %empty */
+#line 13299 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-1].select_order))
+ Select->order_list= *((yyvsp[-1].select_order));
+ }
+#line 45765 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2129: /* update: UPDATE_SYM $@188 opt_low_priority opt_ignore update_table_list SET update_list $@189 opt_where_clause opt_order_clause delete_limit_clause $@190 stmt_end */
+#line 13302 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45771 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2132: /* update_elem: simple_ident_nospvar equal DEFAULT */
+#line 13312 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *def= new (thd->mem_root) Item_default_value(thd,
+ Lex->current_context(), (yyvsp[-2].item), 1);
+ if (!def || add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, def))
+ MYSQL_YYABORT;
+ }
+#line 45782 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2133: /* update_elem: simple_ident_nospvar equal expr_or_ignore */
+#line 13319 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, (yyvsp[0].item)))
+ MYSQL_YYABORT;
+ }
+#line 45791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2136: /* insert_update_elem: simple_ident_nospvar equal expr_or_ignore_or_default */
+#line 13332 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->update_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
+ unlikely(lex->value_list.push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2137: /* opt_low_priority: %empty */
+#line 13341 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_DEFAULT; }
+#line 45808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2138: /* opt_low_priority: LOW_PRIORITY */
+#line 13342 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
+#line 45814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2139: /* $@191: %empty */
+#line 13349 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_DELETE;
+ YYPS->m_lock_type= TL_WRITE_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_WRITE;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->ignore= 0;
+ lex->first_select_lex()->order_list.empty();
+ }
+#line 45830 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2140: /* delete: DELETE_SYM $@191 delete_part2 */
+#line 13361 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 45839 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2141: /* opt_delete_system_time: %empty */
+#line 13369 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
+ }
+#line 45847 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2142: /* opt_delete_system_time: BEFORE_SYM SYSTEM_TIME_SYM history_point */
+#line 13373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_BEFORE, (yyvsp[0].vers_history_point));
+ }
+#line 45855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2143: /* delete_part2: opt_delete_options single_multi */
+#line 13379 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45861 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2144: /* delete_part2: HISTORY_SYM delete_single_table opt_delete_system_time */
+#line 13381 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_table()->vers_conditions= Lex->vers_conditions;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 45872 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2145: /* delete_single_table: FROM table_ident opt_use_partition */
+#line 13391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->
+ add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ NULL,
+ (yyvsp[0].string_list))))
+ MYSQL_YYABORT;
+ YYPS->m_lock_type= TL_READ_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ }
+#line 45888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2146: /* delete_single_table_for_period: delete_single_table opt_for_portion_of_time_clause */
+#line 13406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].num))
+ Lex->last_table()->period_conditions= Lex->period_conditions;
+ }
+#line 45897 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2147: /* single_multi: delete_single_table_for_period opt_where_clause opt_order_clause delete_limit_clause opt_returning */
+#line 13418 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-2].select_order))
+ Select->order_list= *((yyvsp[-2].select_order));
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 45909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2148: /* $@192: %empty */
+#line 13426 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ mysql_init_multi_delete(Lex);
+ YYPS->m_lock_type= TL_READ_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ }
+#line 45919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2149: /* $@193: %empty */
+#line 13432 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
+ MYSQL_YYABORT;
+ }
+#line 45928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2150: /* single_multi: table_wild_list $@192 FROM join_table_list opt_where_clause $@193 stmt_end */
+#line 13435 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2151: /* $@194: %empty */
+#line 13437 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ mysql_init_multi_delete(Lex);
+ YYPS->m_lock_type= TL_READ_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ }
+#line 45944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2152: /* $@195: %empty */
+#line 13443 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
+ MYSQL_YYABORT;
+ }
+#line 45953 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2153: /* single_multi: FROM table_alias_ref_list $@194 USING join_table_list opt_where_clause $@195 stmt_end */
+#line 13446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2154: /* opt_returning: %empty */
+#line 13451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(!Lex->has_returning());
+ }
+#line 45967 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2155: /* $@196: %empty */
+#line 13455 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(!Lex->has_returning());
+ /*
+ When parsing_place is IN_RETURNING, we push select items to
+ item_list of builtin_select instead of current_select.
+ But set parsing_place of current_select to true.
+
+ Because parsing_place for builtin_select will be IN_RETURNING,
+ regardless there is SELECT in RETURNING. Example, if
+ there is RETURNING (SELECT...), then when we parse
+ SELECT inside RETURNING, builtin_select->parsing_place
+ will still be true. So the select items of SELECT inside
+ RETURNING will be added to item_list of builtin_select which
+ is incorrect. We want to prevent this from happening.
+ Since for every new select, a new SELECT_LEX
+ object is created and pushed to select stack, current_select
+ will point to SELECT inside RETURNING, and also has
+ parsing_place not set to IN_RETURNING by default.
+ So items are correctly added to item_list of SELECT inside
+ RETURNING instead of builtin_select.
+ */
+
+ thd->lex->current_select->parsing_place= IN_RETURNING;
+ thd->lex->push_context(&thd->lex->returning()->context);
+ }
+#line 45997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2156: /* opt_returning: RETURNING_SYM $@196 select_item_list */
+#line 13481 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->lex->pop_context();
+ thd->lex->current_select->parsing_place= NO_MATTER;
+ }
+#line 46006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2159: /* table_wild_one: ident opt_wild */
+#line 13494 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_ident *ti= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
+ if (unlikely(ti == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(!Select->
+ add_table_to_list(thd,
+ ti,
+ NULL,
+ (TL_OPTION_UPDATING |
+ TL_OPTION_ALIAS),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 46025 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2160: /* table_wild_one: ident '.' ident opt_wild */
+#line 13509 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_ident *ti= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
+ if (unlikely(ti == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(!Select->
+ add_table_to_list(thd,
+ ti,
+ NULL,
+ (TL_OPTION_UPDATING |
+ TL_OPTION_ALIAS),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 46044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2161: /* opt_wild: %empty */
+#line 13526 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2162: /* opt_wild: '.' '*' */
+#line 13527 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2163: /* opt_delete_options: %empty */
+#line 13531 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2164: /* opt_delete_options: opt_delete_option opt_delete_options */
+#line 13532 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2165: /* opt_delete_option: QUICK */
+#line 13536 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= OPTION_QUICK; }
+#line 46074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2166: /* opt_delete_option: LOW_PRIORITY */
+#line 13537 "/home/buildbot/git/sql/sql_yacc.yy"
+ { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
+#line 46080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2167: /* opt_delete_option: IGNORE_SYM */
+#line 13538 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1; }
+#line 46086 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2168: /* $@197: %empty */
+#line 13543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= Lex;
+ lex->sql_command= SQLCOM_TRUNCATE;
+ lex->alter_info.reset();
+ 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;
+ }
+#line 46101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2169: /* $@198: %empty */
+#line 13554 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_truncate_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 46113 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2170: /* truncate: TRUNCATE_SYM $@197 opt_table_sym table_name opt_lock_wait_timeout $@198 opt_truncate_table_storage_clause */
+#line 13561 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 46119 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2177: /* profile_def: CPU_SYM */
+#line 13579 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_CPU;
+ }
+#line 46127 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2178: /* profile_def: MEMORY_SYM */
+#line 13583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_MEMORY;
+ }
+#line 46135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2179: /* profile_def: BLOCK_SYM IO_SYM */
+#line 13587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_BLOCK_IO;
+ }
+#line 46143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2180: /* profile_def: CONTEXT_SYM SWITCHES_SYM */
+#line 13591 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_CONTEXT;
+ }
+#line 46151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2181: /* profile_def: PAGE_SYM FAULTS_SYM */
+#line 13595 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_PAGE_FAULTS;
+ }
+#line 46159 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2182: /* profile_def: IPC_SYM */
+#line 13599 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_IPC;
+ }
+#line 46167 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2183: /* profile_def: SWAPS_SYM */
+#line 13603 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_SWAPS;
+ }
+#line 46175 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2184: /* profile_def: SOURCE_SYM */
+#line 13607 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_SOURCE;
+ }
+#line 46183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2185: /* profile_def: ALL */
+#line 13611 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_ALL;
+ }
+#line 46191 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2186: /* opt_profile_args: %empty */
+#line 13618 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_query_id= 0;
+ }
+#line 46199 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2187: /* opt_profile_args: FOR_SYM QUERY_SYM NUM */
+#line 13622 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_query_id= atoi((yyvsp[0].lex_str).str);
+ }
+#line 46207 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2188: /* $@199: %empty */
+#line 13631 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->wild=0;
+ lex->ident= null_clex_str;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->current_select->parsing_place= SELECT_LIST;
+ lex->create_info.init();
+ }
+#line 46222 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2189: /* show: SHOW $@199 show_param */
+#line 13642 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
+ }
+#line 46231 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2190: /* show_param: DATABASES wild_and_where */
+#line 13650 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_DATABASES;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)))
+ MYSQL_YYABORT;
+ }
+#line 46242 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2191: /* show_param: opt_full TABLES opt_db wild_and_where */
+#line 13657 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_TABLES;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES))
+ MYSQL_YYABORT;
+ }
+#line 46254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2192: /* show_param: opt_full TRIGGERS_SYM opt_db wild_and_where */
+#line 13665 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_TRIGGERS;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS))
+ MYSQL_YYABORT;
+ }
+#line 46266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2193: /* show_param: EVENTS_SYM opt_db wild_and_where */
+#line 13673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_EVENTS;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS))
+ MYSQL_YYABORT;
+ }
+#line 46278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2194: /* show_param: TABLE_SYM STATUS_SYM opt_db wild_and_where */
+#line 13681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLES))
+ MYSQL_YYABORT;
+ }
+#line 46290 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2195: /* show_param: OPEN_SYM TABLES opt_db wild_and_where */
+#line 13689 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES))
+ MYSQL_YYABORT;
+ }
+#line 46302 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2196: /* show_param: PLUGINS_SYM */
+#line 13697 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_PLUGINS;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PLUGINS)))
+ MYSQL_YYABORT;
+ }
+#line 46313 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2197: /* show_param: PLUGINS_SYM SONAME_SYM TEXT_STRING_sys */
+#line 13704 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->ident= (yyvsp[0].lex_str);
+ Lex->sql_command= SQLCOM_SHOW_PLUGINS;
+ if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
+ MYSQL_YYABORT;
+ }
+#line 46324 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2198: /* show_param: PLUGINS_SYM SONAME_SYM wild_and_where */
+#line 13711 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PLUGINS;
+ if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
+ MYSQL_YYABORT;
+ }
+#line 46334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2199: /* show_param: ENGINE_SYM known_storage_engines show_engine_param */
+#line 13717 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->create_info.db_type= (yyvsp[-1].db_type); }
+#line 46340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2200: /* show_param: ENGINE_SYM ALL show_engine_param */
+#line 13719 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->create_info.db_type= NULL; }
+#line 46346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2201: /* show_param: opt_full COLUMNS from_or_in table_ident opt_db wild_and_where */
+#line 13721 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_FIELDS;
+ if ((yyvsp[-1].lex_str).str)
+ (yyvsp[-2].table)->change_db(&(yyvsp[-1].lex_str));
+ if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)))
+ MYSQL_YYABORT;
+ }
+#line 46359 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2202: /* show_param: master_or_binary LOGS_SYM */
+#line 13730 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_BINLOGS;
+ }
+#line 46367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2203: /* show_param: SLAVE HOSTS_SYM */
+#line 13734 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
+ }
+#line 46375 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2204: /* $@200: %empty */
+#line 13738 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
+ }
+#line 46384 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2206: /* $@201: %empty */
+#line 13744 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
+ }
+#line 46393 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2207: /* show_param: RELAYLOG_SYM optional_connection_name EVENTS_SYM binlog_in binlog_from $@201 opt_global_limit_clause optional_for_channel */
+#line 13749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 46399 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2208: /* show_param: keys_or_index from_or_in table_ident opt_db opt_where_clause */
+#line 13751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_KEYS;
+ if ((yyvsp[-1].lex_str).str)
+ (yyvsp[-2].table)->change_db(&(yyvsp[-1].lex_str));
+ if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)))
+ MYSQL_YYABORT;
+ }
+#line 46412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2209: /* show_param: opt_storage ENGINES_SYM */
+#line 13760 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_ENGINES)))
+ MYSQL_YYABORT;
+ }
+#line 46423 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2210: /* show_param: AUTHORS_SYM */
+#line 13767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_AUTHORS;
+ }
+#line 46432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2211: /* show_param: CONTRIBUTORS_SYM */
+#line 13772 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
+ }
+#line 46441 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2212: /* show_param: PRIVILEGES */
+#line 13777 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
+ }
+#line 46450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2213: /* show_param: COUNT_SYM '(' '*' ')' WARNINGS */
+#line 13782 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING var= {STRING_WITH_LEN("warning_count")};
+ (void) create_select_for_variable(thd, &var);
+ }
+#line 46459 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2214: /* show_param: COUNT_SYM '(' '*' ')' ERRORS */
+#line 13787 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
+ (void) create_select_for_variable(thd, &var);
+ }
+#line 46468 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2215: /* show_param: WARNINGS opt_global_limit_clause */
+#line 13792 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command = SQLCOM_SHOW_WARNS;}
+#line 46474 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2216: /* show_param: ERRORS opt_global_limit_clause */
+#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command = SQLCOM_SHOW_ERRORS;}
+#line 46480 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2217: /* show_param: PROFILES_SYM */
+#line 13796 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command = SQLCOM_SHOW_PROFILES; }
+#line 46486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2218: /* show_param: PROFILE_SYM opt_profile_defs opt_profile_args opt_global_limit_clause */
+#line 13798 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_PROFILE;
+ if (unlikely(prepare_schema_table(thd, lex, NULL, SCH_PROFILES)))
+ MYSQL_YYABORT;
+ }
+#line 46497 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2219: /* show_param: opt_var_type STATUS_SYM wild_and_where */
+#line 13805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS;
+ lex->option_type= (yyvsp[-2].var_type);
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)))
+ MYSQL_YYABORT;
+ }
+#line 46509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2220: /* show_param: opt_full PROCESSLIST_SYM */
+#line 13813 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
+#line 46515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2221: /* show_param: opt_var_type VARIABLES wild_and_where */
+#line 13815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_VARIABLES;
+ lex->option_type= (yyvsp[-2].var_type);
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)))
+ MYSQL_YYABORT;
+ }
+#line 46527 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2222: /* show_param: charset wild_and_where */
+#line 13823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_CHARSETS;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_CHARSETS)))
+ MYSQL_YYABORT;
+ }
+#line 46538 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2223: /* show_param: COLLATION_SYM wild_and_where */
+#line 13830 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_COLLATIONS;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)))
+ MYSQL_YYABORT;
+ }
+#line 46549 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2224: /* show_param: GRANTS */
+#line 13837 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_GRANTS;
+ if (unlikely(!(Lex->grant_user=
+ (LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ Lex->grant_user->user= current_user_and_current_role;
+ }
+#line 46561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2225: /* show_param: GRANTS FOR_SYM user_or_role clear_privileges */
+#line 13845 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_GRANTS;
+ lex->grant_user=(yyvsp[-1].lex_user);
+ }
+#line 46571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2226: /* show_param: CREATE DATABASE opt_if_not_exists ident */
+#line 13851 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_SHOW_CREATE_DB, (yyvsp[-1].object_ddl_options));
+ Lex->name= (yyvsp[0].ident_sys);
+ }
+#line 46580 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2227: /* show_param: CREATE TABLE_SYM table_ident */
+#line 13856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL,0))
+ MYSQL_YYABORT;
+ lex->create_info.storage_media= HA_SM_DEFAULT;
+ }
+#line 46592 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2228: /* show_param: CREATE VIEW_SYM table_ident */
+#line 13864 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL, 0))
+ MYSQL_YYABORT;
+ lex->table_type= TABLE_TYPE_VIEW;
+ }
+#line 46604 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2229: /* show_param: CREATE SEQUENCE_SYM table_ident */
+#line 13872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL, 0))
+ MYSQL_YYABORT;
+ lex->table_type= TABLE_TYPE_SEQUENCE;
+ }
+#line 46616 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2230: /* show_param: BINLOG_SYM STATUS_SYM */
+#line 13880 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
+ }
+#line 46624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2231: /* show_param: MASTER_SYM STATUS_SYM */
+#line 13884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
+ }
+#line 46632 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2232: /* show_param: ALL SLAVES STATUS_SYM */
+#line 13888 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_show_slave_status(true)))
+ MYSQL_YYABORT;
+ Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
+ }
+#line 46643 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2233: /* show_param: SLAVE optional_connection_name STATUS_SYM optional_for_channel */
+#line 13895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_show_slave_status()))
+ MYSQL_YYABORT;
+ Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
+ }
+#line 46654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2234: /* show_param: CREATE PROCEDURE_SYM sp_name */
+#line 13902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ lex->sql_command = SQLCOM_SHOW_CREATE_PROC;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2235: /* show_param: CREATE FUNCTION_SYM sp_name */
+#line 13909 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ lex->sql_command = SQLCOM_SHOW_CREATE_FUNC;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46676 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2236: /* show_param: CREATE PACKAGE_MARIADB_SYM sp_name */
+#line 13916 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2237: /* show_param: CREATE PACKAGE_ORACLE_SYM sp_name */
+#line 13922 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46696 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2238: /* show_param: CREATE PACKAGE_MARIADB_SYM BODY_MARIADB_SYM sp_name */
+#line 13928 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46706 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2239: /* show_param: CREATE PACKAGE_ORACLE_SYM BODY_ORACLE_SYM sp_name */
+#line 13934 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46716 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2240: /* show_param: CREATE TRIGGER_SYM sp_name */
+#line 13940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46726 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2241: /* show_param: CREATE USER_SYM */
+#line 13946 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
+ if (unlikely(!(Lex->grant_user=
+ (LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ Lex->grant_user->user= current_user;
+ }
+#line 46738 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2242: /* show_param: CREATE USER_SYM user */
+#line 13954 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
+ Lex->grant_user= (yyvsp[0].lex_user);
+ }
+#line 46747 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2243: /* show_param: PROCEDURE_SYM STATUS_SYM wild_and_where */
+#line 13959 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2244: /* show_param: FUNCTION_SYM STATUS_SYM wild_and_where */
+#line 13966 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2245: /* show_param: PACKAGE_MARIADB_SYM STATUS_SYM wild_and_where */
+#line 13973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46780 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2246: /* show_param: PACKAGE_ORACLE_SYM STATUS_SYM wild_and_where */
+#line 13980 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46791 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2247: /* show_param: PACKAGE_MARIADB_SYM BODY_MARIADB_SYM STATUS_SYM wild_and_where */
+#line 13987 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2248: /* show_param: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM STATUS_SYM wild_and_where */
+#line 13994 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46813 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2249: /* show_param: PROCEDURE_SYM CODE_SYM sp_name */
+#line 14001 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46822 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2250: /* show_param: FUNCTION_SYM CODE_SYM sp_name */
+#line 14006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46831 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2251: /* show_param: PACKAGE_MARIADB_SYM BODY_MARIADB_SYM CODE_SYM sp_name */
+#line 14011 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46840 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2252: /* show_param: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM CODE_SYM sp_name */
+#line 14016 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46849 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2253: /* show_param: CREATE EVENT_SYM sp_name */
+#line 14021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->spname= (yyvsp[0].spname);
+ Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
+ }
+#line 46858 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2254: /* show_param: describe_command opt_format_json FOR_SYM expr */
+#line 14030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
+ if (unlikely(prepare_schema_table(thd, Lex, 0,
+ Lex->explain_json ? SCH_EXPLAIN_JSON : SCH_EXPLAIN_TABULAR)))
+ MYSQL_YYABORT;
+ add_value_to_list(thd, (yyvsp[0].item));
+ }
+#line 46870 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2255: /* show_param: ANALYZE_SYM opt_format_json FOR_SYM expr */
+#line 14038 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_ANALYZE;
+ if (unlikely(prepare_schema_table(thd, Lex, 0,
+ Lex->explain_json ? SCH_ANALYZE_JSON : SCH_ANALYZE_TABULAR)))
+ MYSQL_YYABORT;
+ add_value_to_list(thd, (yyvsp[0].item));
+ }
+#line 46882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2256: /* show_param: IDENT_sys remember_tok_start wild_and_where */
+#line 14046 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ bool in_plugin;
+ lex->sql_command= SQLCOM_SHOW_GENERIC;
+ ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-2].ident_sys), &in_plugin);
+ if (unlikely(!table || !table->old_format || !in_plugin))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-1].simple_string));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(lex->wild && table->idx_field1 < 0))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].simple_string));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(make_schema_select(thd, Lex->current_select, table)))
+ MYSQL_YYABORT;
+ }
+#line 46905 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2257: /* show_engine_param: STATUS_SYM */
+#line 14068 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
+#line 46911 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2258: /* show_engine_param: MUTEX_SYM */
+#line 14070 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
+#line 46917 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2259: /* show_engine_param: LOGS_SYM */
+#line 14072 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
+#line 46923 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2264: /* opt_db: %empty */
+#line 14086 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 46929 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2265: /* opt_db: from_or_in ident */
+#line 14087 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 46935 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2266: /* opt_full: %empty */
+#line 14091 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->verbose=0; }
+#line 46941 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2267: /* opt_full: FULL */
+#line 14092 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->verbose=1; }
+#line 46947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2270: /* binlog_in: %empty */
+#line 14101 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.log_file_name = 0; }
+#line 46953 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2271: /* binlog_in: IN_SYM TEXT_STRING_sys */
+#line 14102 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.log_file_name = (yyvsp[0].lex_str).str; }
+#line 46959 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2272: /* binlog_from: %empty */
+#line 14106 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.pos = 4; /* skip magic number */ }
+#line 46965 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2273: /* binlog_from: FROM ulonglong_num */
+#line 14107 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.pos = (yyvsp[0].ulonglong_number); }
+#line 46971 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2274: /* wild_and_where: %empty */
+#line 14111 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.simple_string)= 0; }
+#line 46977 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2275: /* wild_and_where: LIKE remember_tok_start TEXT_STRING_sys */
+#line 14113 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length,
+ system_charset_info);
+ if (unlikely(Lex->wild == NULL))
+ MYSQL_YYABORT;
+ (yyval.simple_string)= (yyvsp[-1].simple_string);
+ }
+#line 46990 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2276: /* wild_and_where: WHERE remember_tok_start expr */
+#line 14122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->where= normalize_cond(thd, (yyvsp[0].item));
+ if ((yyvsp[0].item))
+ (yyvsp[0].item)->top_level_item();
+ (yyval.simple_string)= (yyvsp[-1].simple_string);
+ }
+#line 47001 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2277: /* $@202: %empty */
+#line 14133 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->current_select->parsing_place= SELECT_LIST;
+ lex->sql_command= SQLCOM_SHOW_FIELDS;
+ lex->first_select_lex()->db= null_clex_str;
+ lex->verbose= 0;
+ if (unlikely(prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)))
+ MYSQL_YYABORT;
+ }
+#line 47018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2278: /* describe: describe_command table_ident $@202 opt_describe_column */
+#line 14146 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
+ }
+#line 47027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2279: /* $@203: %empty */
+#line 14151 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_NORMAL; }
+#line 47033 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2280: /* describe: describe_command opt_extended_describe $@203 explainable_command */
+#line 14153 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->first_select_lex()->options|= SELECT_DESCRIBE;
+ }
+#line 47042 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2289: /* analyze_stmt_command: ANALYZE_SYM opt_format_json explainable_command */
+#line 14175 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->analyze_stmt= true;
+ }
+#line 47050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2290: /* opt_extended_describe: EXTENDED_SYM */
+#line 14181 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_EXTENDED; }
+#line 47056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2291: /* opt_extended_describe: EXTENDED_SYM ALL */
+#line 14183 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
+#line 47062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2292: /* opt_extended_describe: PARTITIONS_SYM */
+#line 14184 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_PARTITIONS; }
+#line 47068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2293: /* opt_extended_describe: opt_format_json */
+#line 14185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2294: /* opt_format_json: %empty */
+#line 14189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2295: /* opt_format_json: FORMAT_SYM '=' ident_or_text */
+#line 14191 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("JSON")))
+ Lex->explain_json= true;
+ else if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("TRADITIONAL")))
+ DBUG_ASSERT(Lex->explain_json==false);
+ else
+ my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0),
+ "EXPLAIN/ANALYZE", (yyvsp[0].lex_str).str));
+ }
+#line 47094 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2296: /* opt_describe_column: %empty */
+#line 14203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47100 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2297: /* opt_describe_column: text_string */
+#line 14204 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->wild= (yyvsp[0].string); }
+#line 47106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2298: /* opt_describe_column: ident */
+#line 14206 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
+ (yyvsp[0].ident_sys).length,
+ system_charset_info);
+ if (unlikely(Lex->wild == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47118 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2299: /* explain_for_connection: describe_command opt_format_json FOR_SYM CONNECTION_SYM expr */
+#line 14222 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->wild=0;
+ lex->ident= null_clex_str;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->current_select->parsing_place= SELECT_LIST;
+ lex->create_info.init();
+ Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
+ Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
+ if (unlikely(prepare_schema_table(thd, Lex, 0,
+ Lex->explain_json ? SCH_EXPLAIN_JSON : SCH_EXPLAIN_TABULAR)))
+ MYSQL_YYABORT;
+ add_value_to_list(thd, (yyvsp[0].item));
+ }
+#line 47140 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2300: /* $@204: %empty */
+#line 14245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_FLUSH;
+ lex->type= 0;
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ }
+#line 47151 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2301: /* flush: FLUSH_SYM opt_no_write_to_binlog $@204 flush_options */
+#line 14251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47157 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2302: /* $@205: %empty */
+#line 14256 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_TABLES;
+ /*
+ Set type of metadata and table locks for
+ FLUSH TABLES table_list [WITH READ LOCK].
+ */
+ YYPS->m_lock_type= TL_READ_NO_INSERT;
+ YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO;
+ }
+#line 47171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2303: /* flush_options: table_or_tables $@205 opt_table_list opt_flush_lock */
+#line 14266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47177 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2304: /* flush_options: flush_options_list */
+#line 14268 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47183 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2305: /* opt_flush_lock: %empty */
+#line 14272 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47189 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2306: /* opt_flush_lock: flush_lock */
+#line 14274 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ TABLE_LIST *tables= Lex->query_tables;
+ for (; tables; tables= tables->next_global)
+ {
+ tables->mdl_request.set_type(MDL_SHARED_NO_WRITE);
+ /* Ignore temporary tables. */
+ tables->open_type= OT_BASE_ONLY;
+ }
+ }
+#line 47203 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2307: /* flush_lock: WITH READ_SYM LOCK_SYM optional_flush_tables_arguments */
+#line 14287 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); }
+#line 47209 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2308: /* $@206: %empty */
+#line 14289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->query_tables == NULL))
+ {
+ // Table list can't be empty
+ thd->parse_error(ER_NO_TABLES_USED);
+ MYSQL_YYABORT;
+ }
+ Lex->type|= REFRESH_FOR_EXPORT;
+ }
+#line 47223 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2309: /* flush_lock: FOR_SYM $@206 EXPORT_SYM */
+#line 14297 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47229 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2311: /* flush_options_list: flush_option */
+#line 14303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47235 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2312: /* flush_option: ERROR_SYM LOGS_SYM */
+#line 14308 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_ERROR_LOG; }
+#line 47241 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2313: /* flush_option: ENGINE_SYM LOGS_SYM */
+#line 14310 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_ENGINE_LOG; }
+#line 47247 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2314: /* flush_option: GENERAL LOGS_SYM */
+#line 14312 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_GENERAL_LOG; }
+#line 47253 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2315: /* flush_option: SLOW LOGS_SYM */
+#line 14314 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_SLOW_LOG; }
+#line 47259 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2316: /* flush_option: BINARY LOGS_SYM opt_delete_gtid_domain */
+#line 14316 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_BINARY_LOG; }
+#line 47265 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2317: /* flush_option: RELAY LOGS_SYM optional_connection_name optional_for_channel */
+#line 14318 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->type & REFRESH_RELAY_LOG))
+ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH", "RELAY LOGS"));
+ lex->type|= REFRESH_RELAY_LOG;
+ lex->relay_log_connection_name= lex->mi.connection_name;
+ }
+#line 47277 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2318: /* flush_option: QUERY_SYM CACHE_SYM */
+#line 14326 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_QUERY_CACHE_FREE; }
+#line 47283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2319: /* flush_option: HOSTS_SYM */
+#line 14328 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_HOSTS; }
+#line 47289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2320: /* flush_option: PRIVILEGES */
+#line 14330 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_GRANT; }
+#line 47295 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2321: /* flush_option: LOGS_SYM */
+#line 14332 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_LOG;
+ Lex->relay_log_connection_name= empty_clex_str;
+ }
+#line 47304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2322: /* flush_option: STATUS_SYM */
+#line 14337 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_STATUS; }
+#line 47310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2323: /* flush_option: SLAVE optional_connection_name */
+#line 14339 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->type & REFRESH_SLAVE))
+ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH","SLAVE"));
+ lex->type|= REFRESH_SLAVE;
+ lex->reset_slave_info.all= false;
+ }
+#line 47322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2324: /* flush_option: MASTER_SYM */
+#line 14347 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_MASTER; }
+#line 47328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2325: /* flush_option: DES_KEY_FILE */
+#line 14349 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_DES_KEY_FILE; }
+#line 47334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2326: /* flush_option: RESOURCES */
+#line 14351 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_USER_RESOURCES; }
+#line 47340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2327: /* flush_option: SSL_SYM */
+#line 14353 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_SSL;}
+#line 47346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2328: /* flush_option: THREADS_SYM */
+#line 14355 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_THREADS;}
+#line 47352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2329: /* flush_option: IDENT_sys remember_tok_start */
+#line 14357 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_GENERIC;
+ ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-1].ident_sys));
+ if (unlikely(!table || !table->reset_table))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].simple_string));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->view_list.push_back((LEX_CSTRING*)
+ thd->memdup(&(yyvsp[-1].ident_sys), sizeof(LEX_CSTRING)),
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 47370 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2330: /* opt_table_list: %empty */
+#line 14373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47376 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2331: /* opt_table_list: table_list */
+#line 14374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2332: /* backup: BACKUP_SYM backup_statements */
+#line 14378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47388 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2333: /* backup_statements: STAGE_SYM ident */
+#line 14383 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int type;
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP STAGE"));
+ if ((type= find_type((yyvsp[0].ident_sys).str, &backup_stage_names,
+ FIND_TYPE_NO_PREFIX)) <= 0)
+ my_yyabort_error((ER_BACKUP_UNKNOWN_STAGE, MYF(0), (yyvsp[0].ident_sys).str));
+ Lex->sql_command= SQLCOM_BACKUP;
+ Lex->backup_stage= (backup_stages) (type-1);
+ break;
+ }
+#line 47404 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2334: /* $@207: %empty */
+#line 14395 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP LOCK"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 47415 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2335: /* backup_statements: LOCK_SYM $@207 table_ident */
+#line 14402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, 0,
+ TL_READ, MDL_SHARED_HIGH_PRIO)))
+ MYSQL_YYABORT;
+ Lex->sql_command= SQLCOM_BACKUP_LOCK;
+ Lex->pop_select(); //main select
+ }
+#line 47427 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2336: /* backup_statements: UNLOCK_SYM */
+#line 14410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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;
+ }
+#line 47438 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2337: /* opt_delete_gtid_domain: %empty */
+#line 14419 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47444 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2338: /* opt_delete_gtid_domain: DELETE_DOMAIN_ID_SYM '=' '(' delete_domain_id_list ')' */
+#line 14421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47450 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2342: /* delete_domain_id: ulonglong_num */
+#line 14431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint32 value= (uint32) (yyvsp[0].ulonglong_number);
+ if ((yyvsp[0].ulonglong_number) > UINT_MAX32)
+ {
+ my_printf_error(ER_BINLOG_CANT_DELETE_GTID_DOMAIN,
+ "The value of gtid domain being deleted ('%llu') "
+ "exceeds its maximum size "
+ "of 32 bit unsigned integer", MYF(0), (yyvsp[0].ulonglong_number));
+ MYSQL_YYABORT;
+ }
+ insert_dynamic(&Lex->delete_gtid_domain, (uchar*) &value);
+ }
+#line 47467 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2343: /* optional_flush_tables_arguments: %empty */
+#line 14446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num)= 0;}
+#line 47473 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2344: /* optional_flush_tables_arguments: AND_SYM DISABLE_SYM CHECKPOINT_SYM */
+#line 14447 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num)= REFRESH_CHECKPOINT; }
+#line 47479 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2345: /* $@208: %empty */
+#line 14452 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_RESET; lex->type=0;
+ }
+#line 47488 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2346: /* reset: RESET_SYM $@208 reset_options */
+#line 14457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47494 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2349: /* $@209: %empty */
+#line 14466 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_SLAVE; }
+#line 47500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2350: /* reset_option: SLAVE $@209 optional_connection_name slave_reset_options optional_for_channel */
+#line 14469 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2351: /* $@210: %empty */
+#line 14471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_MASTER;
+ Lex->next_binlog_file_number= 0;
+ }
+#line 47515 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2353: /* reset_option: QUERY_SYM CACHE_SYM */
+#line 14476 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_QUERY_CACHE;}
+#line 47521 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2354: /* slave_reset_options: %empty */
+#line 14480 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->reset_slave_info.all= false; }
+#line 47527 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2355: /* slave_reset_options: ALL */
+#line 14481 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->reset_slave_info.all= true; }
+#line 47533 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2356: /* master_reset_options: %empty */
+#line 14485 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47539 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2357: /* master_reset_options: TO_SYM ulong_num */
+#line 14487 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->next_binlog_file_number = (yyvsp[0].ulong_num);
+ }
+#line 47547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2358: /* purge: PURGE master_or_binary LOGS_SYM TO_SYM TEXT_STRING_sys */
+#line 14494 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_purge_to((yyvsp[0].lex_str));
+ }
+#line 47555 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2359: /* $@211: %empty */
+#line 14498 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
+#line 47561 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2360: /* purge: PURGE master_or_binary LOGS_SYM BEFORE_SYM $@211 expr */
+#line 14500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_purge_before((yyvsp[0].item)))
+ MYSQL_YYABORT;
+ }
+#line 47571 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2361: /* $@212: %empty */
+#line 14512 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->value_list.empty();
+ lex->users_list.empty();
+ lex->sql_command= SQLCOM_KILL;
+ lex->kill_type= KILL_TYPE_ID;
+ }
+#line 47583 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2362: /* kill: KILL_SYM $@212 kill_type kill_option */
+#line 14520 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->kill_signal= (killed_state) ((yyvsp[-1].num) | (yyvsp[0].num));
+ }
+#line 47591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2363: /* kill_type: %empty */
+#line 14526 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_HARD_BIT; }
+#line 47597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2364: /* kill_type: HARD_SYM */
+#line 14527 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_HARD_BIT; }
+#line 47603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2365: /* kill_type: SOFT_SYM */
+#line 14528 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 47609 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2366: /* kill_option: opt_connection kill_expr */
+#line 14532 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_CONNECTION; }
+#line 47615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2367: /* kill_option: QUERY_SYM kill_expr */
+#line 14533 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_QUERY; }
+#line 47621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2368: /* kill_option: QUERY_SYM ID_SYM expr */
+#line 14535 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (int) KILL_QUERY;
+ Lex->kill_type= KILL_TYPE_QUERY;
+ Lex->value_list.push_front((yyvsp[0].item), thd->mem_root);
+ }
+#line 47631 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2369: /* opt_connection: %empty */
+#line 14543 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47637 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2370: /* opt_connection: CONNECTION_SYM */
+#line 14544 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47643 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2371: /* kill_expr: expr */
+#line 14549 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->value_list.push_front((yyval.item), thd->mem_root);
+ }
+#line 47651 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2372: /* kill_expr: USER_SYM user */
+#line 14553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root);
+ Lex->kill_type= KILL_TYPE_USER;
+ }
+#line 47660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2373: /* $@213: %empty */
+#line 14560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHUTDOWN; }
+#line 47666 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2374: /* shutdown: SHUTDOWN $@213 shutdown_option */
+#line 14561 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47672 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2375: /* shutdown_option: %empty */
+#line 14565 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->is_shutdown_wait_for_slaves= false; }
+#line 47678 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2376: /* shutdown_option: WAIT_SYM FOR_SYM ALL SLAVES */
+#line 14567 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->is_shutdown_wait_for_slaves= true;
+ }
+#line 47686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2377: /* use: USE_SYM ident */
+#line 14576 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_CHANGE_DB;
+ lex->first_select_lex()->db= (yyvsp[0].ident_sys);
+ }
+#line 47696 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2378: /* $@214: %empty */
+#line 14587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+
+ if (unlikely(lex->sphead))
+ {
+ my_error(ER_SP_BADSTATEMENT, MYF(0),
+ (yyvsp[0].filetype) == FILETYPE_CSV ? "LOAD DATA" : "LOAD XML");
+ MYSQL_YYABORT;
+ }
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ }
+#line 47714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2379: /* $@215: %empty */
+#line 14601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_LOAD;
+ lex->local_file= (yyvsp[-2].num);
+ lex->duplicates= DUP_ERROR;
+ lex->ignore= 0;
+ if (unlikely(!(lex->exchange= new (thd->mem_root)
+ sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))))
+ MYSQL_YYABORT;
+ }
+#line 47729 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2380: /* $@216: %empty */
+#line 14612 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
+ TL_OPTION_UPDATING,
+ (yyvsp[-9].lock_type), MDL_SHARED_WRITE,
+ NULL, (yyvsp[0].string_list))))
+ MYSQL_YYABORT;
+ lex->field_list.empty();
+ lex->update_list.empty();
+ lex->value_list.empty();
+ lex->many_values.empty();
+ }
+#line 47746 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2381: /* $@217: %empty */
+#line 14625 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->exchange->cs= (yyvsp[0].charset); }
+#line 47752 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2382: /* load: LOAD data_or_xml $@214 load_data_lock opt_local INFILE TEXT_STRING_filesystem $@215 opt_duplicate INTO TABLE_SYM table_ident opt_use_partition $@216 opt_load_data_charset $@217 opt_xml_rows_identified_by opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec opt_load_data_set_spec stmt_end */
+#line 14630 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mark_first_table_as_inserting();
+ }
+#line 47760 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2383: /* data_or_xml: DATA_SYM */
+#line 14636 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.filetype)= FILETYPE_CSV; }
+#line 47766 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2384: /* data_or_xml: XML_SYM */
+#line 14637 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.filetype)= FILETYPE_XML; }
+#line 47772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2385: /* opt_local: %empty */
+#line 14641 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=0;}
+#line 47778 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2386: /* opt_local: LOCAL_SYM */
+#line 14642 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=1;}
+#line 47784 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2387: /* load_data_lock: %empty */
+#line 14646 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_DEFAULT; }
+#line 47790 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2388: /* load_data_lock: CONCURRENT */
+#line 14648 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Ignore this option in SP to avoid problem with query cache and
+ triggers with non default priority locks
+ */
+ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
+ }
+#line 47802 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2389: /* load_data_lock: LOW_PRIORITY */
+#line 14655 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
+#line 47808 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2390: /* opt_duplicate: %empty */
+#line 14659 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->duplicates=DUP_ERROR; }
+#line 47814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2391: /* opt_duplicate: REPLACE */
+#line 14660 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->duplicates=DUP_REPLACE; }
+#line 47820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2392: /* opt_duplicate: IGNORE_SYM */
+#line 14661 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1; }
+#line 47826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2397: /* field_term: TERMINATED BY text_string */
+#line 14676 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->field_term= (yyvsp[0].string);
+ }
+#line 47835 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2398: /* field_term: OPTIONALLY ENCLOSED BY text_string */
+#line 14681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ DBUG_ASSERT(lex->exchange != 0);
+ lex->exchange->enclosed= (yyvsp[0].string);
+ lex->exchange->opt_enclosed= 1;
+ }
+#line 47846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2399: /* field_term: ENCLOSED BY text_string */
+#line 14688 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->enclosed= (yyvsp[0].string);
+ }
+#line 47855 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2400: /* field_term: ESCAPED BY text_string */
+#line 14693 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->escaped= (yyvsp[0].string);
+ }
+#line 47864 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2405: /* line_term: TERMINATED BY text_string */
+#line 14711 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->line_term= (yyvsp[0].string);
+ }
+#line 47873 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2406: /* line_term: STARTING BY text_string */
+#line 14716 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->line_start= (yyvsp[0].string);
+ }
+#line 47882 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2407: /* opt_xml_rows_identified_by: %empty */
+#line 14723 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2408: /* opt_xml_rows_identified_by: ROWS_SYM IDENTIFIED_SYM BY text_string */
+#line 14725 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->exchange->line_term = (yyvsp[0].string); }
+#line 47894 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2410: /* opt_ignore_lines: IGNORE_SYM NUM lines_or_rows */
+#line 14731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str);
+ }
+#line 47903 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2411: /* lines_or_rows: LINES */
+#line 14738 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47909 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2412: /* lines_or_rows: ROWS_SYM */
+#line 14739 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47915 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2413: /* opt_field_or_var_spec: %empty */
+#line 14743 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47921 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2414: /* opt_field_or_var_spec: '(' fields_or_vars ')' */
+#line 14744 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47927 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2415: /* opt_field_or_var_spec: '(' ')' */
+#line 14745 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47933 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2416: /* fields_or_vars: fields_or_vars ',' field_or_var */
+#line 14750 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 47939 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2417: /* fields_or_vars: field_or_var */
+#line 14752 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 47945 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2418: /* field_or_var: simple_ident_nospvar */
+#line 14756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.item)= (yyvsp[0].item);}
+#line 47951 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2419: /* field_or_var: '@' ident_or_text */
+#line 14758 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+
+ (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, &(yyvsp[0].lex_str));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47967 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2420: /* opt_load_data_set_spec: %empty */
+#line 14772 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2421: /* opt_load_data_set_spec: SET load_data_set_list */
+#line 14773 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47979 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2424: /* load_data_set_elem: simple_ident_nospvar equal remember_name expr_or_ignore_or_default remember_end */
+#line 14783 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->update_list.push_back((yyvsp[-4].item), thd->mem_root)) ||
+ unlikely(lex->value_list.push_back((yyvsp[-1].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyvsp[-1].item)->set_name_no_truncate(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 47991 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2425: /* text_literal: TEXT_STRING */
+#line 14796 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal((yyvsp[0].lex_string_with_metadata)))))
+ MYSQL_YYABORT;
+ }
+#line 48000 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2426: /* text_literal: NCHAR_STRING */
+#line 14801 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_nchar((yyvsp[0].lex_string_with_metadata)))))
+ MYSQL_YYABORT;
+ }
+#line 48009 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2427: /* text_literal: UNDERSCORE_CHARSET TEXT_STRING */
+#line 14806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_charset((yyvsp[0].lex_string_with_metadata), (yyvsp[-1].charset)))))
+ MYSQL_YYABORT;
+ }
+#line 48018 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2428: /* text_literal: text_literal TEXT_STRING_literal */
+#line 14811 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= (yyvsp[-1].item_basic_constant)->make_string_literal_concat(thd, &(yyvsp[0].lex_str)))))
+ MYSQL_YYABORT;
+ }
+#line 48027 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2429: /* text_string: TEXT_STRING_literal */
+#line 14819 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.string)= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length,
+ thd->variables.collation_connection);
+ if (unlikely((yyval.string) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48039 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2430: /* text_string: hex_or_bin_String */
+#line 14826 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.string)= (yyvsp[0].string); }
+#line 48045 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2431: /* hex_or_bin_String: HEX_NUM */
+#line 14832 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length);
+ if (unlikely(tmp == NULL))
+ MYSQL_YYABORT;
+ (yyval.string)= tmp->val_str((String*) 0);
+ }
+#line 48057 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2432: /* hex_or_bin_String: HEX_STRING */
+#line 14840 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length);
+ if (unlikely(tmp == NULL))
+ MYSQL_YYABORT;
+ (yyval.string)= tmp->val_str((String*) 0);
+ }
+#line 48069 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2433: /* hex_or_bin_String: BIN_NUM */
+#line 14848 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length);
+ if (unlikely(tmp == NULL))
+ MYSQL_YYABORT;
+ /*
+ it is OK only emulate fix_fields, because we need only
+ value of constant
+ */
+ (yyval.string)= tmp->val_str((String*) 0);
+ }
+#line 48085 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2434: /* param_marker: PARAM_MARKER */
+#line 14863 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &param_clex_str,
+ YYLIP->get_tok_start(),
+ YYLIP->get_tok_start() + 1))))
+ MYSQL_YYABORT;
+ }
+#line 48096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2435: /* param_marker: COLON_ORACLE_SYM ident_cli */
+#line 14870 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
+ (yyvsp[-1].kwd).pos(), (yyvsp[0].ident_cli).end()))))
+ MYSQL_YYABORT;
+ }
+#line 48106 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2436: /* param_marker: COLON_ORACLE_SYM NUM */
+#line 14876 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
+ (yyvsp[-1].kwd).pos(),
+ YYLIP->get_ptr()))))
+ MYSQL_YYABORT;
+ }
+#line 48117 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2437: /* signed_literal: '+' NUM_literal */
+#line 14885 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item_num); }
+#line 48123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2438: /* signed_literal: '-' NUM_literal */
+#line 14887 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].item_num)->max_length++;
+ (yyval.item)= (yyvsp[0].item_num)->neg(thd);
+ }
+#line 48132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2439: /* literal: text_literal */
+#line 14894 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item_basic_constant); }
+#line 48138 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2440: /* literal: NUM_literal */
+#line 14895 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item_num); }
+#line 48144 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2441: /* literal: temporal_literal */
+#line 14896 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 48150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2442: /* literal: NULL_SYM */
+#line 14898 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ For the digest computation, in this context only,
+ NULL is considered a literal, hence reduced to '?'
+ REDUCE:
+ TOK_GENERIC_VALUE := NULL_SYM
+ */
+ YYLIP->reduce_digest_token(TOK_GENERIC_VALUE, NULL_SYM);
+ (yyval.item)= new (thd->mem_root) Item_null(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
+ }
+#line 48168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2443: /* literal: FALSE_SYM */
+#line 14912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "FALSE",0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48178 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2444: /* literal: TRUE_SYM */
+#line 14918 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "TRUE",1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48188 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2445: /* literal: HEX_NUM */
+#line 14924 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48198 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2446: /* literal: HEX_STRING */
+#line 14930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2447: /* literal: BIN_NUM */
+#line 14936 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2448: /* literal: UNDERSCORE_CHARSET hex_or_bin_String */
+#line 14942 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_string_with_introducer *item_str;
+ LEX_CSTRING tmp;
+ (yyvsp[0].string)->get_value(&tmp);
+ /*
+ Pass NULL as name. Name will be set in the "select_item" rule and
+ will include the introducer and the original hex/bin notation.
+ */
+ item_str= new (thd->mem_root)
+ Item_string_with_introducer(thd, null_clex_str,
+ tmp, (yyvsp[-1].charset));
+ if (unlikely(!item_str ||
+ !item_str->check_well_formed_result(true)))
+ MYSQL_YYABORT;
+
+ (yyval.item)= item_str;
+ }
+#line 48240 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2449: /* NUM_literal: NUM */
+#line 14963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int error;
+ (yyval.item_num)= new (thd->mem_root)
+ Item_int(thd, (yyvsp[0].lex_str).str,
+ (longlong) my_strtoll10((yyvsp[0].lex_str).str, NULL, &error),
+ (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48254 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2450: /* NUM_literal: LONG_NUM */
+#line 14973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int error;
+ (yyval.item_num)= new (thd->mem_root)
+ Item_int(thd, (yyvsp[0].lex_str).str,
+ (longlong) my_strtoll10((yyvsp[0].lex_str).str, NULL, &error),
+ (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2451: /* NUM_literal: ULONGLONG_NUM */
+#line 14983 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_num)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48278 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2452: /* NUM_literal: DECIMAL_NUM */
+#line 14989 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_num)= new (thd->mem_root) Item_decimal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length,
+ thd->charset());
+ if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
+ MYSQL_YYABORT;
+ }
+#line 48289 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2453: /* NUM_literal: FLOAT_NUM */
+#line 14996 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_num)= new (thd->mem_root) Item_float(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
+ MYSQL_YYABORT;
+ }
+#line 48299 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2454: /* temporal_literal: DATE_SYM TEXT_STRING */
+#line 15006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= type_handler_newdate.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true))))
+ MYSQL_YYABORT;
+ }
+#line 48310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2455: /* temporal_literal: TIME_SYM TEXT_STRING */
+#line 15013 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= type_handler_time2.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true))))
+ MYSQL_YYABORT;
+ }
+#line 48321 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2456: /* temporal_literal: TIMESTAMP TEXT_STRING */
+#line 15020 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= type_handler_datetime.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true))))
+ MYSQL_YYABORT;
+ }
+#line 48332 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2457: /* $@218: %empty */
+#line 15030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ With_clause *with_clause=
+ new With_clause((yyvsp[0].num), 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;
+ with_clause->add_to_list(&lex->with_clauses_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;
+ }
+#line 48352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2458: /* with_clause: WITH opt_recursive $@218 with_list */
+#line 15046 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.with_clause)= Lex->curr_with_clause;
+ Lex->curr_with_clause= Lex->curr_with_clause->pop();
+ }
+#line 48361 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2459: /* opt_recursive: %empty */
+#line 15054 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 48367 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2460: /* opt_recursive: RECURSIVE_SYM */
+#line 15055 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 48373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2463: /* with_list_element: with_element_head opt_with_column_list AS '(' query_expression ')' opt_cycle */
+#line 15069 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
+ : thd->query();
+ const char *spec_start= (yyvsp[-3].kwd).pos() + 1;
+ With_element *elem= new With_element((yyvsp[-6].with_element_head), *(yyvsp[-5].ident_sys_list), (yyvsp[-2].select_lex_unit));
+ if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
+ MYSQL_YYABORT;
+ if (elem->set_unparsed_spec(thd, spec_start, (yyvsp[-1].kwd).pos(),
+ spec_start - query_start))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].ident_sys_list))
+ {
+ elem->set_cycle_list((yyvsp[0].ident_sys_list));
+ }
+ elem->set_tables_end_pos(lex->query_tables_last);
+ }
+#line 48395 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2464: /* opt_cycle: %empty */
+#line 15090 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_sys_list)= NULL; }
+#line 48401 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2465: /* $@219: %empty */
+#line 15093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!Lex->curr_with_clause->with_recursive)
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].kwd).pos());
+ }
+ }
+#line 48412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2466: /* opt_cycle: CYCLE_SYM $@219 comma_separated_ident_list RESTRICT */
+#line 15100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list);
+ }
+#line 48420 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2467: /* opt_with_column_list: %empty */
+#line 15108 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.ident_sys_list)= new (thd->mem_root) List<Lex_ident_sys>) == NULL)
+ MYSQL_YYABORT;
+ }
+#line 48429 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2468: /* opt_with_column_list: '(' with_column_list ')' */
+#line 15113 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list); }
+#line 48435 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2470: /* ident_sys_alloc: ident_cli */
+#line 15122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ident_sys_ptr)= new (thd->mem_root) Lex_ident_sys(thd, &(yyvsp[0].ident_cli));
+ }
+#line 48443 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2471: /* comma_separated_ident_list: ident_sys_alloc */
+#line 15129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ident_sys_list)= new (thd->mem_root) List<Lex_ident_sys>;
+ if (unlikely((yyval.ident_sys_list) == NULL || (yyval.ident_sys_list)->push_back((yyvsp[0].ident_sys_ptr))))
+ MYSQL_YYABORT;
+ }
+#line 48453 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2472: /* comma_separated_ident_list: comma_separated_ident_list ',' ident_sys_alloc */
+#line 15135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.ident_sys_list)= (yyvsp[-2].ident_sys_list))->push_back((yyvsp[0].ident_sys_ptr)))
+ MYSQL_YYABORT;
+ }
+#line 48462 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2473: /* with_element_head: ident */
+#line 15144 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING *name=
+ (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
+ (yyval.with_element_head)= new (thd->mem_root) With_element_head(name);
+ if (unlikely(name == NULL || (yyval.with_element_head) == NULL))
+ MYSQL_YYABORT;
+ (yyval.with_element_head)->tables_pos.set_start_pos(Lex->query_tables_last);
+ }
+#line 48475 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2474: /* insert_ident: simple_ident_nospvar */
+#line 15161 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 48481 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2475: /* insert_ident: table_wild */
+#line 15162 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 48487 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2476: /* table_wild: ident '.' '*' */
+#line 15167 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 48496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2477: /* table_wild: ident '.' ident '.' '*' */
+#line 15172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 48505 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2478: /* select_sublist_qualified_asterisk: ident_cli '.' '*' */
+#line 15180 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48514 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2479: /* select_sublist_qualified_asterisk: ident_cli '.' ident_cli '.' '*' */
+#line 15185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48523 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2480: /* order_ident: expr */
+#line 15192 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 48529 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2481: /* simple_ident: ident_cli */
+#line 15198 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48538 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2482: /* simple_ident: ident_cli '.' ident_cli */
+#line 15203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2483: /* simple_ident: '.' ident_cli '.' ident_cli */
+#line 15208 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_cli empty((yyvsp[-2].ident_cli).pos(), 0);
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &empty, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48557 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2484: /* simple_ident: ident_cli '.' ident_cli '.' ident_cli */
+#line 15214 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48566 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2485: /* simple_ident: COLON_ORACLE_SYM ident_cli '.' ident_cli */
+#line 15219 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48575 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2486: /* simple_ident_nospvar: ident */
+#line 15227 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident_nosp(thd, &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 48584 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2487: /* simple_ident_nospvar: ident '.' ident */
+#line 15232 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident_nospvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 48593 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2488: /* simple_ident_nospvar: COLON_ORACLE_SYM ident_cli '.' ident_cli */
+#line 15237 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 48602 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2489: /* simple_ident_nospvar: '.' ident '.' ident */
+#line 15242 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys none;
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &none, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 48612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2490: /* simple_ident_nospvar: ident '.' ident '.' ident */
+#line 15248 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 48621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2491: /* field_ident: ident */
+#line 15255 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys);}
+#line 48627 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2492: /* field_ident: ident '.' ident '.' ident */
+#line 15257 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ TABLE_LIST *table= Select->table_list.first;
+ if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-4].ident_sys).str,
+ table->db.str)))
+ my_yyabort_error((ER_WRONG_DB_NAME, MYF(0), (yyvsp[-4].ident_sys).str));
+ if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
+ table->table_name.str)))
+ my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.lex_str)=(yyvsp[0].ident_sys);
+ }
+#line 48642 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2493: /* field_ident: ident '.' ident */
+#line 15268 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ TABLE_LIST *table= Select->table_list.first;
+ if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
+ table->alias.str)))
+ my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.lex_str)=(yyvsp[0].ident_sys);
+ }
+#line 48654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2494: /* field_ident: '.' ident */
+#line 15275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys);}
+#line 48660 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2495: /* table_ident: ident */
+#line 15280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2496: /* table_ident: ident '.' ident */
+#line 15286 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys), 0);
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48680 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2497: /* table_ident: '.' ident */
+#line 15292 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* For Delphi */
+ (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2498: /* table_ident_opt_wild: ident opt_wild */
+#line 15302 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48701 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2499: /* table_ident_opt_wild: ident '.' ident opt_wild */
+#line 15308 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48711 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2500: /* table_ident_nodb: ident */
+#line 15317 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING db= any_db;
+ (yyval.table)= new (thd->mem_root) Table_ident(thd, &db, &(yyvsp[0].ident_sys), 0);
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48722 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2505: /* ident_cli: keyword_ident */
+#line 15333 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48728 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2506: /* IDENT_sys: IDENT_cli */
+#line 15338 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
+ MYSQL_YYABORT;
+ }
+#line 48737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2509: /* ident_cli_func: keyword_func_sp_var_and_label */
+#line 15347 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48743 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2510: /* ident_cli_func: keyword_func_sp_var_not_label */
+#line 15348 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48749 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2511: /* ident_func: ident_cli_func */
+#line 15353 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
+ MYSQL_YYABORT;
+ }
+#line 48758 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2512: /* TEXT_STRING_sys: TEXT_STRING */
+#line 15362 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (thd->make_text_string_sys(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
+ MYSQL_YYABORT;
+ }
+#line 48767 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2513: /* TEXT_STRING_literal: TEXT_STRING */
+#line 15370 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (thd->make_text_string_connection(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
+ MYSQL_YYABORT;
+ }
+#line 48776 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2514: /* TEXT_STRING_filesystem: TEXT_STRING */
+#line 15378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (thd->make_text_string_filesystem(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
+ MYSQL_YYABORT;
+ }
+#line 48785 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2516: /* ident_table_alias: keyword_table_alias */
+#line 15387 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48794 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2517: /* ident_cli_set_usual_case: IDENT_cli */
+#line 15394 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].ident_cli); }
+#line 48800 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2518: /* ident_cli_set_usual_case: keyword_set_usual_case */
+#line 15395 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48806 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2520: /* ident_sysvar_name: keyword_sysvar_name */
+#line 15401 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48815 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2521: /* ident_sysvar_name: TEXT_STRING_sys */
+#line 15406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_sys(thd, &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 48824 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2523: /* ident: keyword_ident */
+#line 15416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48833 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2525: /* label_ident: keyword_label */
+#line 15425 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48842 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2526: /* ident_or_text: ident */
+#line 15432 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys);}
+#line 48848 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2527: /* ident_or_text: TEXT_STRING_sys */
+#line 15433 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str);}
+#line 48854 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2528: /* ident_or_text: LEX_HOSTNAME */
+#line 15434 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str);}
+#line 48860 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2529: /* user_maybe_role: ident_or_text */
+#line 15439 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user = (yyvsp[0].lex_str);
+
+ if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
+ username_char_length,
+ system_charset_info, 0)))
+ MYSQL_YYABORT;
+ }
+#line 48875 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2530: /* user_maybe_role: ident_or_text '@' ident_or_text */
+#line 15450 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user = (yyvsp[-2].lex_str); (yyval.lex_user)->host=(yyvsp[0].lex_str);
+
+ if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
+ username_char_length,
+ system_charset_info, 0)) ||
+ unlikely(check_host_name(&(yyval.lex_user)->host)))
+ MYSQL_YYABORT;
+ if ((yyval.lex_user)->host.str[0])
+ {
+ /*
+ Convert hostname part of username to lowercase.
+ It's OK to use in-place lowercase as long as
+ the character set is utf8.
+ */
+ my_casedn_str(system_charset_info, (char*) (yyval.lex_user)->host.str);
+ }
+ else
+ {
+ /*
+ fix historical undocumented convention that empty host is the
+ same as '%'
+ */
+ (yyval.lex_user)->host= host_not_specified;
+ }
+ }
+#line 48908 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2531: /* user_maybe_role: CURRENT_USER optional_braces */
+#line 15479 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user= current_user;
+ (yyval.lex_user)->auth= new (thd->mem_root) USER_AUTH();
+ }
+#line 48919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 2534: /* user: user_maybe_role */
+#line 15490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].lex_user)->user.str != current_user.str && (yyvsp[0].lex_user)->host.str == 0)
+ (yyvsp[0].lex_user)->host= host_not_specified;
+ (yyval.lex_user)= (yyvsp[0].lex_user);
+ }
+#line 48929 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3262: /* $@220: %empty */
+#line 16359 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_stmt_init();
+ }
+#line 48938 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3263: /* set: SET $@220 set_param */
+#line 16364 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 48947 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3266: /* $@221: %empty */
+#line 16374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_type= OPT_DEFAULT;
+ if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48957 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3267: /* set_param: TRANSACTION_SYM $@221 transaction_characteristics */
+#line 16380 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3268: /* $@222: %empty */
+#line 16385 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_type= (yyvsp[0].var_type);
+ }
+#line 48974 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3270: /* $@223: %empty */
+#line 16391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->table_or_sp_used()))
+ my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), "SET STATEMENT"));
+ lex->stmt_var_list= lex->var_list;
+ lex->var_list.empty();
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 48988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3276: /* $@224: %empty */
+#line 16418 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48997 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3277: /* start_option_value_list_following_option_type: TRANSACTION_SYM $@224 transaction_characteristics */
+#line 16423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3280: /* $@225: %empty */
+#line 16438 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_type= (yyvsp[0].var_type);
+ }
+#line 49014 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3283: /* option_type: GLOBAL_SYM */
+#line 16446 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_GLOBAL; }
+#line 49020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3284: /* option_type: LOCAL_SYM */
+#line 16447 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3285: /* option_type: SESSION_SYM */
+#line 16448 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3286: /* opt_var_type: %empty */
+#line 16452 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3287: /* opt_var_type: GLOBAL_SYM */
+#line 16453 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_GLOBAL; }
+#line 49044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3288: /* opt_var_type: LOCAL_SYM */
+#line 16454 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3289: /* opt_var_type: SESSION_SYM */
+#line 16455 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3290: /* opt_var_ident_type: %empty */
+#line 16459 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_DEFAULT; }
+#line 49062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3291: /* opt_var_ident_type: GLOBAL_SYM '.' */
+#line 16460 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_GLOBAL; }
+#line 49068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3292: /* opt_var_ident_type: LOCAL_SYM '.' */
+#line 16461 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49074 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3293: /* opt_var_ident_type: SESSION_SYM '.' */
+#line 16462 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 49080 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3294: /* $@226: %empty */
+#line 16471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push(false))
+ MYSQL_YYABORT;
+ }
+#line 49089 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3295: /* set_stmt_option: ident_cli equal $@226 set_expr_or_default */
+#line 16476 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(Lex->option_type, &tmp, (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //min select
+ }
+#line 49101 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3296: /* $@227: %empty */
+#line 16484 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push(false))
+ MYSQL_YYABORT;
+ }
+#line 49110 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3297: /* set_stmt_option: ident_cli '.' ident equal $@227 set_expr_or_default */
+#line 16489 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(thd, Lex->option_type,
+ &tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //min select
+ }
+#line 49123 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3298: /* $@228: %empty */
+#line 16498 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push(false))
+ MYSQL_YYABORT;
+ }
+#line 49132 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3299: /* set_stmt_option: DEFAULT '.' ident equal $@228 set_expr_or_default */
+#line 16503 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable(Lex->option_type,
+ &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //min select
+ }
+#line 49143 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3300: /* $@229: %empty */
+#line 16515 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49152 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3301: /* option_value_following_option_type: ident_cli equal $@229 set_expr_or_default */
+#line 16520 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(Lex->option_type, &tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49164 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3302: /* $@230: %empty */
+#line 16528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49173 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3303: /* option_value_following_option_type: ident_cli '.' ident equal $@230 set_expr_or_default */
+#line 16533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(thd, Lex->option_type, &tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49185 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3304: /* $@231: %empty */
+#line 16541 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49194 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3305: /* option_value_following_option_type: DEFAULT '.' ident equal $@231 set_expr_or_default */
+#line 16546 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49204 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3306: /* $@232: %empty */
+#line 16556 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49213 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3307: /* option_value_no_option_type: ident_cli_set_usual_case equal $@232 set_expr_or_default */
+#line 16561 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49225 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3308: /* $@233: %empty */
+#line 16569 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49234 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3309: /* option_value_no_option_type: ident_cli_set_usual_case '.' ident equal $@233 set_expr_or_default */
+#line 16574 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49246 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3310: /* $@234: %empty */
+#line 16582 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3311: /* option_value_no_option_type: DEFAULT '.' ident equal $@234 set_expr_or_default */
+#line 16587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49266 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3312: /* $@235: %empty */
+#line 16594 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[-1].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+
+ if (sp_create_assignment_lex(thd, (yyvsp[-2].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 49281 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3313: /* option_value_no_option_type: '@' ident_or_text equal $@235 expr */
+#line 16605 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_user_variable(thd, &(yyvsp[-3].lex_str), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49291 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3314: /* $@236: %empty */
+#line 16611 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-4].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 49300 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3315: /* option_value_no_option_type: '@' '@' opt_var_ident_type ident_sysvar_name equal $@236 set_expr_or_default */
+#line 16616 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_system_variable((yyvsp[-4].var_type), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3316: /* $@237: %empty */
+#line 16622 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 49319 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3317: /* option_value_no_option_type: '@' '@' opt_var_ident_type ident_sysvar_name '.' ident equal $@237 set_expr_or_default */
+#line 16627 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_system_variable(thd, (yyvsp[-6].var_type), &(yyvsp[-5].ident_sys), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49329 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3318: /* $@238: %empty */
+#line 16633 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 49338 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3319: /* option_value_no_option_type: '@' '@' opt_var_ident_type DEFAULT '.' ident equal $@238 set_expr_or_default */
+#line 16638 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable((yyvsp[-6].var_type), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49348 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3320: /* option_value_no_option_type: charset old_or_new_charset_name_or_default */
+#line 16644 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex= thd->lex;
+ CHARSET_INFO *cs2;
+ cs2= (yyvsp[0].charset) ? (yyvsp[0].charset): global_system_variables.character_set_client;
+ set_var_collation_client *var;
+ var= (new (thd->mem_root)
+ set_var_collation_client(cs2,
+ thd->variables.collation_database,
+ cs2));
+ if (unlikely(var == NULL))
+ MYSQL_YYABORT;
+ lex->var_list.push_back(var, thd->mem_root);
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49370 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3321: /* option_value_no_option_type: NAMES_SYM equal expr */
+#line 16662 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_pcontext *spc= lex->spcont;
+ LEX_CSTRING names= { STRING_WITH_LEN("names") };
+ if (unlikely(spc && spc->find_variable(&names, false)))
+ my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), names.str);
+ else
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+#line 49385 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3322: /* option_value_no_option_type: NAMES_SYM charset_name_or_default */
+#line 16673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ CHARSET_INFO *def= global_system_variables.character_set_client;
+ Lex_exact_charset_opt_extended_collate tmp((yyvsp[0].charset) ? (yyvsp[0].charset) : def, false);
+ if (Lex->set_names((yyvsp[-1].kwd).pos(), tmp, yychar == YYEMPTY))
+ MYSQL_YYABORT;
+ }
+#line 49396 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3323: /* option_value_no_option_type: NAMES_SYM charset_name_or_default COLLATE_SYM collation_name_or_default */
+#line 16681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ CHARSET_INFO *def= global_system_variables.character_set_client;
+ Lex_exact_charset_opt_extended_collate tmp((yyvsp[-2].charset) ? (yyvsp[-2].charset) : def, false);
+ if (tmp.merge_collation((yyvsp[0].Lex_extended_collation)) ||
+ Lex->set_names((yyvsp[-3].kwd).pos(), tmp, yychar == YYEMPTY))
+ MYSQL_YYABORT;
+ }
+#line 49408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3324: /* option_value_no_option_type: DEFAULT ROLE_SYM grant_role */
+#line 16689 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-2].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex = Lex;
+ LEX_USER *user;
+ if (unlikely(!(user=(LEX_USER *) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ user->user= current_user;
+ set_var_default_role *var= (new (thd->mem_root)
+ set_var_default_role(user,
+ (yyvsp[0].lex_user)->user));
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+
+ thd->lex->autocommit= TRUE;
+ if (lex->sphead)
+ lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49434 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3325: /* option_value_no_option_type: DEFAULT ROLE_SYM grant_role FOR_SYM user */
+#line 16711 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-4].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex = Lex;
+ set_var_default_role *var= (new (thd->mem_root)
+ set_var_default_role((yyvsp[0].lex_user), (yyvsp[-2].lex_user)->user));
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+ thd->lex->autocommit= TRUE;
+ if (lex->sphead)
+ lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49454 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3326: /* option_value_no_option_type: ROLE_SYM role_name */
+#line 16727 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex = Lex;
+ set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_user)->user);
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49469 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3327: /* $@239: %empty */
+#line 16738 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3328: /* option_value_no_option_type: ROLE_SYM equal $@239 set_expr_or_default */
+#line 16743 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].kwd));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49490 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3329: /* $@240: %empty */
+#line 16751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49499 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3330: /* option_value_no_option_type: PASSWORD_SYM equal $@240 text_or_password */
+#line 16756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_create_set_password_instr(thd, (yyvsp[0].user_auth),
+ yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49509 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3331: /* $@241: %empty */
+#line 16762 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 49518 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3332: /* option_value_no_option_type: PASSWORD_SYM FOR_SYM $@241 user equal text_or_password */
+#line 16767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_create_set_password_instr(thd, (yyvsp[-2].lex_user), (yyvsp[0].user_auth),
+ yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 49528 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3337: /* transaction_access_mode: transaction_access_mode_types */
+#line 16783 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ set_var *var= (new (thd->mem_root)
+ set_var(thd, lex->option_type,
+ find_sys_var(thd, "tx_read_only"),
+ &null_clex_str,
+ item));
+ if (unlikely(var == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3338: /* isolation_level: ISOLATION LEVEL_SYM isolation_types */
+#line 16802 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ set_var *var= (new (thd->mem_root)
+ set_var(thd, lex->option_type,
+ find_sys_var(thd, "tx_isolation"),
+ &null_clex_str,
+ item));
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49567 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3339: /* transaction_access_mode_types: READ_SYM ONLY_SYM */
+#line 16819 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= true; }
+#line 49573 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3340: /* transaction_access_mode_types: READ_SYM WRITE_SYM */
+#line 16820 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 49579 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3341: /* isolation_types: READ_SYM UNCOMMITTED_SYM */
+#line 16824 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
+#line 49585 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3342: /* isolation_types: READ_SYM COMMITTED_SYM */
+#line 16825 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_READ_COMMITTED; }
+#line 49591 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3343: /* isolation_types: REPEATABLE_SYM READ_SYM */
+#line 16826 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
+#line 49597 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3344: /* isolation_types: SERIALIZABLE_SYM */
+#line 16827 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_SERIALIZABLE; }
+#line 49603 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3345: /* text_or_password: TEXT_STRING */
+#line 16833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= new (thd->mem_root) USER_AUTH();
+ (yyval.user_auth)->auth_str= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 49612 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3346: /* text_or_password: PASSWORD_SYM '(' TEXT_STRING ')' */
+#line 16838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= new (thd->mem_root) USER_AUTH();
+ (yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
+ }
+#line 49621 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3347: /* text_or_password: OLD_PASSWORD_SYM '(' TEXT_STRING ')' */
+#line 16843 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= new (thd->mem_root) USER_AUTH();
+ (yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
+ (yyval.user_auth)->auth_str.str= Item_func_password::alloc(thd,
+ (yyvsp[-1].lex_string_with_metadata).str, (yyvsp[-1].lex_string_with_metadata).length, Item_func_password::OLD);
+ (yyval.user_auth)->auth_str.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
+ }
+#line 49633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3348: /* set_expr_or_default: expr */
+#line 16853 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 49639 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3349: /* set_expr_or_default: DEFAULT */
+#line 16854 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=0; }
+#line 49645 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3350: /* set_expr_or_default: ON */
+#line 16856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON", 2);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 49655 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3351: /* set_expr_or_default: ALL */
+#line 16862 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 49665 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3352: /* set_expr_or_default: BINARY */
+#line 16868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 49675 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3353: /* $@242: %empty */
+#line 16879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK"));
+ lex->sql_command= SQLCOM_LOCK_TABLES;
+ }
+#line 49687 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3354: /* lock: LOCK_SYM table_or_tables $@242 table_lock_list opt_lock_wait_timeout */
+#line 16887 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49693 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3355: /* opt_lock_wait_timeout: %empty */
+#line 16892 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49699 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3356: /* opt_lock_wait_timeout: WAIT_SYM ulong_num */
+#line 16894 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), (yyvsp[0].ulong_num))) ||
+ unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), (yyvsp[0].ulong_num))))
+ MYSQL_YYABORT;
+ }
+#line 49709 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3357: /* opt_lock_wait_timeout: NOWAIT_SYM */
+#line 16900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), 0)) ||
+ unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), 0)))
+ MYSQL_YYABORT;
+ }
+#line 49719 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3358: /* table_or_tables: TABLE_SYM */
+#line 16908 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 49725 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3359: /* table_or_tables: TABLES */
+#line 16909 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 49731 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3362: /* table_lock: table_ident opt_table_alias_clause lock_option */
+#line 16919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num);
+ bool lock_for_write= (lock_type >= TL_FIRST_WRITE);
+ ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
+ enum_mdl_type mdl_type= !lock_for_write
+ ? MDL_SHARED_READ
+ : lock_type == TL_WRITE_CONCURRENT_INSERT
+ ? MDL_SHARED_WRITE
+ : MDL_SHARED_NO_READ_WRITE;
+
+ if (unlikely(!Lex->current_select_or_default()->
+ add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), table_options,
+ lock_type, mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 49751 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3363: /* lock_option: READ_SYM */
+#line 16937 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_READ_NO_INSERT; }
+#line 49757 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3364: /* lock_option: WRITE_SYM */
+#line 16938 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_WRITE_DEFAULT; }
+#line 49763 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3365: /* lock_option: WRITE_SYM CONCURRENT */
+#line 16940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
+ }
+#line 49771 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3366: /* lock_option: LOW_PRIORITY WRITE_SYM */
+#line 16944 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_WRITE_LOW_PRIORITY; }
+#line 49777 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3367: /* lock_option: READ_SYM LOCAL_SYM */
+#line 16945 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_READ; }
+#line 49783 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3368: /* $@243: %empty */
+#line 16950 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK"));
+ lex->sql_command= SQLCOM_UNLOCK_TABLES;
+ }
+#line 49795 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3369: /* unlock: UNLOCK_SYM $@243 table_or_tables */
+#line 16958 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49801 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3370: /* $@244: %empty */
+#line 16967 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 49810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3371: /* handler: HANDLER_SYM $@244 handler_tail */
+#line 16972 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 49818 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3372: /* handler_tail: table_ident OPEN_SYM opt_table_alias_clause */
+#line 16979 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
+ lex->sql_command = SQLCOM_HA_OPEN;
+ if (!lex->current_select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0))
+ MYSQL_YYABORT;
+ }
+#line 49831 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3373: /* handler_tail: table_ident_nodb CLOSE_SYM */
+#line 16988 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
+ lex->sql_command = SQLCOM_HA_CLOSE;
+ if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
+ MYSQL_YYABORT;
+ }
+#line 49844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3374: /* $@245: %empty */
+#line 16997 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ SELECT_LEX *select= Select;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
+ 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);
+ if (unlikely(one == NULL))
+ MYSQL_YYABORT;
+ select->limit_params.select_limit= one;
+ select->limit_params.offset_limit= 0;
+ lex->limit_rows_examined= 0;
+ if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
+ MYSQL_YYABORT;
+ }
+#line 49866 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3375: /* handler_tail: table_ident_nodb READ_SYM $@245 handler_read_or_scan opt_where_clause opt_global_limit_clause */
+#line 17015 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ SELECT_LEX *select= Select;
+ lex->clause_that_disallows_subselect= NULL;
+ if (!lex->current_select->limit_params.explicit_limit)
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (one == NULL)
+ MYSQL_YYABORT;
+ select->limit_params.select_limit= one;
+ select->limit_params.offset_limit= 0;
+ lex->limit_rows_examined= 0;
+ }
+ /* Stored functions are not supported for HANDLER READ. */
+ if (lex->uses_stored_routines())
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "stored functions in HANDLER ... READ");
+ MYSQL_YYABORT;
+ }
+ }
+#line 49892 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3376: /* handler_read_or_scan: handler_scan_function */
+#line 17039 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ident= null_clex_str; }
+#line 49898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3377: /* handler_read_or_scan: ident handler_rkey_function */
+#line 17040 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ident= (yyvsp[-1].ident_sys); }
+#line 49904 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3378: /* handler_scan_function: FIRST_SYM */
+#line 17044 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RFIRST; }
+#line 49910 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3379: /* handler_scan_function: NEXT_SYM */
+#line 17045 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RNEXT; }
+#line 49916 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3380: /* handler_rkey_function: FIRST_SYM */
+#line 17049 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RFIRST; }
+#line 49922 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3381: /* handler_rkey_function: NEXT_SYM */
+#line 17050 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RNEXT; }
+#line 49928 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3382: /* handler_rkey_function: PREV_SYM */
+#line 17051 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RPREV; }
+#line 49934 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3383: /* handler_rkey_function: LAST_SYM */
+#line 17052 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RLAST; }
+#line 49940 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3384: /* $@246: %empty */
+#line 17054 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->ha_read_mode = RKEY;
+ lex->ha_rkey_mode=(yyvsp[0].ha_rkey_mode);
+ if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)))
+ MYSQL_YYABORT;
+ }
+#line 49952 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3385: /* handler_rkey_function: handler_rkey_mode $@246 '(' values ')' */
+#line 17062 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3386: /* handler_rkey_mode: '=' */
+#line 17066 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; }
+#line 49964 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3387: /* handler_rkey_mode: GE */
+#line 17067 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
+#line 49970 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3388: /* handler_rkey_mode: LE */
+#line 17068 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
+#line 49976 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3389: /* handler_rkey_mode: '>' */
+#line 17069 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; }
+#line 49982 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3390: /* handler_rkey_mode: '<' */
+#line 17070 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; }
+#line 49988 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3391: /* revoke: REVOKE clear_privileges revoke_command */
+#line 17077 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49994 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3392: /* revoke_command: grant_privileges ON opt_table grant_ident FROM user_and_role_list */
+#line 17082 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_revoke_table(thd, (yyvsp[-5].lex_grant), *(yyvsp[-2].lex_grant_ident)))
+ MYSQL_YYABORT;
+ }
+#line 50003 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3393: /* revoke_command: grant_privileges ON sp_handler grant_ident FROM user_and_role_list */
+#line 17087 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_revoke_sp(thd, (yyvsp[-5].lex_grant), *(yyvsp[-2].lex_grant_ident), *(yyvsp[-3].sp_handler)))
+ MYSQL_YYABORT;
+ }
+#line 50012 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3394: /* revoke_command: ALL opt_privileges ',' GRANT OPTION FROM user_and_role_list */
+#line 17092 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_REVOKE_ALL;
+ }
+#line 50020 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3395: /* revoke_command: PROXY_SYM ON user FROM user_list */
+#line 17096 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_revoke_proxy(thd, (yyvsp[-2].lex_user)))
+ MYSQL_YYABORT;
+ }
+#line 50029 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3396: /* revoke_command: admin_option_for_role FROM user_and_role_list */
+#line 17101 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_REVOKE_ROLE;
+ if (unlikely(Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50039 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3397: /* admin_option_for_role: ADMIN_SYM OPTION FOR_SYM grant_role */
+#line 17110 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
+#line 50045 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3398: /* admin_option_for_role: grant_role */
+#line 17112 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
+#line 50051 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3399: /* grant: GRANT clear_privileges grant_command */
+#line 17117 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50057 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3400: /* grant_command: grant_privileges ON opt_table grant_ident TO_SYM grant_list opt_require_clause opt_grant_options */
+#line 17123 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_grant_table(thd, (yyvsp[-7].lex_grant), *(yyvsp[-4].lex_grant_ident), (yyvsp[0].privilege)))
+ MYSQL_YYABORT;
+ }
+#line 50066 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3401: /* grant_command: grant_privileges ON sp_handler grant_ident TO_SYM grant_list opt_require_clause opt_grant_options */
+#line 17129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_grant_sp(thd, (yyvsp[-7].lex_grant), *(yyvsp[-4].lex_grant_ident), *(yyvsp[-5].sp_handler), (yyvsp[0].privilege)))
+ MYSQL_YYABORT;
+ }
+#line 50075 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3402: /* grant_command: PROXY_SYM ON user TO_SYM grant_list opt_grant_option */
+#line 17134 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_grant_proxy(thd, (yyvsp[-3].lex_user), (yyvsp[0].privilege)))
+ MYSQL_YYABORT;
+ }
+#line 50084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3403: /* grant_command: grant_role TO_SYM grant_list opt_with_admin_option */
+#line 17139 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_GRANT_ROLE;
+ /* The first role is the one that is granted */
+ if (unlikely(Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3404: /* opt_with_admin: %empty */
+#line 17150 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->definer = 0; }
+#line 50102 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3405: /* opt_with_admin: WITH ADMIN_SYM user_or_role */
+#line 17151 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->definer = (yyvsp[0].lex_user); }
+#line 50108 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3406: /* opt_with_admin_option: %empty */
+#line 17155 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= false; }
+#line 50114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3407: /* opt_with_admin_option: WITH ADMIN_SYM OPTION */
+#line 17156 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= true; }
+#line 50120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3408: /* role_list: grant_role */
+#line 17161 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50129 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3409: /* role_list: role_list ',' grant_role */
+#line 17166 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50138 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3410: /* current_role: CURRENT_ROLE optional_braces */
+#line 17174 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user= current_role;
+ }
+#line 50148 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3411: /* role_name: ident_or_text */
+#line 17183 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ CHARSET_INFO *cs= system_charset_info;
+ /* trim end spaces (as they'll be lost in mysql.user anyway) */
+ (yyvsp[0].lex_str).length= cs->lengthsp((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ ((char*) (yyvsp[0].lex_str).str)[(yyvsp[0].lex_str).length] = '\0';
+ if (unlikely((yyvsp[0].lex_str).length == 0))
+ my_yyabort_error((ER_INVALID_ROLE, MYF(0), ""));
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ if (lex_string_eq(&(yyvsp[0].lex_str), &none))
+ (yyval.lex_user)->user= none;
+ else if (lex_string_eq(&(yyvsp[0].lex_str), &public_name))
+ (yyval.lex_user)->user= public_name;
+ else if (check_string_char_length(&((yyval.lex_user)->user= (yyvsp[0].lex_str)), ER_USERNAME,
+ username_char_length, cs, 0))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->host= empty_clex_str;
+ }
+#line 50171 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3417: /* grant_privileges: ALL opt_privileges */
+#line 17213 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege(GLOBAL_ACLS, true)))
+ MYSQL_YYABORT;
+ }
+#line 50180 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3420: /* object_privilege_list: object_privilege */
+#line 17226 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege((yyvsp[0].privilege))))
+ MYSQL_YYABORT;
+ }
+#line 50189 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3421: /* object_privilege_list: column_list_privilege */
+#line 17231 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege()) ||
+ (yyval.lex_grant)->add_column_list_privilege(thd, (yyvsp[0].column_list_privilege).m_columns[0],
+ (yyvsp[0].column_list_privilege).m_privilege))
+ MYSQL_YYABORT;
+ }
+#line 50200 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3422: /* object_privilege_list: object_privilege_list ',' object_privilege */
+#line 17238 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ ((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_object_privilege((yyvsp[0].privilege));
+ }
+#line 50208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3423: /* object_privilege_list: object_privilege_list ',' column_list_privilege */
+#line 17242 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_column_list_privilege(thd, (yyvsp[0].column_list_privilege).m_columns[0],
+ (yyvsp[0].column_list_privilege).m_privilege))
+ MYSQL_YYABORT;
+ }
+#line 50218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3424: /* column_list_privilege: column_privilege '(' comma_separated_ident_list ')' */
+#line 17251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.column_list_privilege)= Lex_column_list_privilege((yyvsp[-1].ident_sys_list), (yyvsp[-3].privilege));
+ }
+#line 50226 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3425: /* column_privilege: SELECT_SYM */
+#line 17257 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SELECT_ACL; }
+#line 50232 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3426: /* column_privilege: INSERT */
+#line 17258 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= INSERT_ACL; }
+#line 50238 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3427: /* column_privilege: UPDATE_SYM */
+#line 17259 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= UPDATE_ACL; }
+#line 50244 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3428: /* column_privilege: REFERENCES */
+#line 17260 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REFERENCES_ACL; }
+#line 50250 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3429: /* object_privilege: SELECT_SYM */
+#line 17264 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SELECT_ACL; }
+#line 50256 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3430: /* object_privilege: INSERT */
+#line 17265 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= INSERT_ACL; }
+#line 50262 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3431: /* object_privilege: UPDATE_SYM */
+#line 17266 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= UPDATE_ACL; }
+#line 50268 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3432: /* object_privilege: REFERENCES */
+#line 17267 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REFERENCES_ACL; }
+#line 50274 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3433: /* object_privilege: DELETE_SYM */
+#line 17268 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= DELETE_ACL;}
+#line 50280 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3434: /* object_privilege: USAGE */
+#line 17269 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50286 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3435: /* object_privilege: INDEX_SYM */
+#line 17270 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= INDEX_ACL;}
+#line 50292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3436: /* object_privilege: ALTER */
+#line 17271 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= ALTER_ACL;}
+#line 50298 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3437: /* object_privilege: CREATE */
+#line 17272 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_ACL;}
+#line 50304 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3438: /* object_privilege: DROP */
+#line 17273 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= DROP_ACL;}
+#line 50310 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3439: /* object_privilege: EXECUTE_SYM */
+#line 17274 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= EXECUTE_ACL;}
+#line 50316 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3440: /* object_privilege: RELOAD */
+#line 17275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= RELOAD_ACL;}
+#line 50322 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3441: /* object_privilege: SHUTDOWN */
+#line 17276 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SHUTDOWN_ACL;}
+#line 50328 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3442: /* object_privilege: PROCESS */
+#line 17277 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= PROCESS_ACL;}
+#line 50334 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3443: /* object_privilege: FILE_SYM */
+#line 17278 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= FILE_ACL;}
+#line 50340 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3444: /* object_privilege: GRANT OPTION */
+#line 17279 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= GRANT_ACL;}
+#line 50346 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3445: /* object_privilege: SHOW DATABASES */
+#line 17280 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SHOW_DB_ACL;}
+#line 50352 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3446: /* object_privilege: SUPER_SYM */
+#line 17281 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SUPER_ACL;}
+#line 50358 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3447: /* object_privilege: CREATE TEMPORARY TABLES */
+#line 17282 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_TMP_ACL;}
+#line 50364 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3448: /* object_privilege: LOCK_SYM TABLES */
+#line 17283 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= LOCK_TABLES_ACL; }
+#line 50370 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3449: /* object_privilege: REPLICATION SLAVE */
+#line 17284 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REPL_SLAVE_ACL; }
+#line 50376 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3450: /* object_privilege: REPLICATION CLIENT_SYM */
+#line 17285 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_MONITOR_ACL; /*Compatibility*/ }
+#line 50382 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3451: /* object_privilege: CREATE VIEW_SYM */
+#line 17286 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_VIEW_ACL; }
+#line 50388 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3452: /* object_privilege: SHOW VIEW_SYM */
+#line 17287 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SHOW_VIEW_ACL; }
+#line 50394 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3453: /* object_privilege: CREATE ROUTINE_SYM */
+#line 17288 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_PROC_ACL; }
+#line 50400 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3454: /* object_privilege: ALTER ROUTINE_SYM */
+#line 17289 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= ALTER_PROC_ACL; }
+#line 50406 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3455: /* object_privilege: CREATE USER_SYM */
+#line 17290 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_USER_ACL; }
+#line 50412 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3456: /* object_privilege: EVENT_SYM */
+#line 17291 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= EVENT_ACL;}
+#line 50418 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3457: /* object_privilege: TRIGGER_SYM */
+#line 17292 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= TRIGGER_ACL; }
+#line 50424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3458: /* object_privilege: CREATE TABLESPACE */
+#line 17293 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_TABLESPACE_ACL; }
+#line 50430 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3459: /* object_privilege: DELETE_SYM HISTORY_SYM */
+#line 17294 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= DELETE_HISTORY_ACL; }
+#line 50436 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3460: /* object_privilege: SET USER_SYM */
+#line 17295 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SET_USER_ACL; }
+#line 50442 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3461: /* object_privilege: FEDERATED_SYM ADMIN_SYM */
+#line 17296 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= FEDERATED_ADMIN_ACL; }
+#line 50448 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3462: /* object_privilege: CONNECTION_SYM ADMIN_SYM */
+#line 17297 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CONNECTION_ADMIN_ACL; }
+#line 50454 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3463: /* object_privilege: READ_SYM ONLY_SYM ADMIN_SYM */
+#line 17298 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
+#line 50460 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3464: /* object_privilege: READ_ONLY_SYM ADMIN_SYM */
+#line 17299 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
+#line 50466 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3465: /* object_privilege: BINLOG_SYM MONITOR_SYM */
+#line 17300 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_MONITOR_ACL; }
+#line 50472 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3466: /* object_privilege: BINLOG_SYM ADMIN_SYM */
+#line 17301 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_ADMIN_ACL; }
+#line 50478 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3467: /* object_privilege: BINLOG_SYM REPLAY_SYM */
+#line 17302 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_REPLAY_ACL; }
+#line 50484 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3468: /* object_privilege: REPLICATION MASTER_SYM ADMIN_SYM */
+#line 17303 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REPL_MASTER_ADMIN_ACL; }
+#line 50490 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3469: /* object_privilege: REPLICATION SLAVE ADMIN_SYM */
+#line 17304 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REPL_SLAVE_ADMIN_ACL; }
+#line 50496 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3470: /* object_privilege: SLAVE MONITOR_SYM */
+#line 17305 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SLAVE_MONITOR_ACL; }
+#line 50502 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3471: /* opt_and: %empty */
+#line 17309 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50508 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3472: /* opt_and: AND_SYM */
+#line 17310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50514 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3475: /* require_list_element: SUBJECT_SYM TEXT_STRING */
+#line 17320 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (lex->account_options.x509_subject.str)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
+ lex->account_options.x509_subject= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 50525 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3476: /* require_list_element: ISSUER_SYM TEXT_STRING */
+#line 17327 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (lex->account_options.x509_issuer.str)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
+ lex->account_options.x509_issuer= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 50536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3477: /* require_list_element: CIPHER_SYM TEXT_STRING */
+#line 17334 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (lex->account_options.ssl_cipher.str)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
+ lex->account_options.ssl_cipher= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 50547 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3478: /* grant_ident: '*' */
+#line 17344 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING db;
+ if (unlikely(Lex->copy_db_to(&db)))
+ MYSQL_YYABORT;
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name(db,
+ Lex_grant_object_name::STAR)))
+ MYSQL_YYABORT;
+ }
+#line 50560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3479: /* grant_ident: ident '.' '*' */
+#line 17353 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name((yyvsp[-2].ident_sys),
+ Lex_grant_object_name::IDENT_STAR)))
+ MYSQL_YYABORT;
+ }
+#line 50570 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3480: /* grant_ident: '*' '.' '*' */
+#line 17359 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name(
+ null_clex_str,
+ Lex_grant_object_name::STAR_STAR)))
+ MYSQL_YYABORT;
+ }
+#line 50581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3481: /* grant_ident: table_ident */
+#line 17366 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name((yyvsp[0].table))))
+ MYSQL_YYABORT;
+ }
+#line 50590 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3482: /* user_list: user */
+#line 17374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50599 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3483: /* user_list: user_list ',' user */
+#line 17379 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50608 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3484: /* grant_list: grant_user */
+#line 17387 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50617 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3485: /* grant_list: grant_list ',' grant_user */
+#line 17392 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50626 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3486: /* user_and_role_list: user_or_role */
+#line 17400 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50635 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3487: /* user_and_role_list: user_and_role_list ',' user_or_role */
+#line 17405 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 50644 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3492: /* grant_user: user IDENTIFIED_SYM BY TEXT_STRING */
+#line 17416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[-3].lex_user);
+ (yyvsp[-3].lex_user)->auth= new (thd->mem_root) USER_AUTH();
+ (yyvsp[-3].lex_user)->auth->pwtext= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 50654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3493: /* grant_user: user IDENTIFIED_SYM BY PASSWORD_SYM TEXT_STRING */
+#line 17422 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[-4].lex_user);
+ (yyvsp[-4].lex_user)->auth= new (thd->mem_root) USER_AUTH();
+ (yyvsp[-4].lex_user)->auth->auth_str= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 50664 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3494: /* grant_user: user IDENTIFIED_SYM via_or_with auth_expression */
+#line 17428 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[-3].lex_user);
+ (yyvsp[-3].lex_user)->auth= (yyvsp[0].user_auth);
+ }
+#line 50673 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3495: /* grant_user: user_or_role */
+#line 17433 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[0].lex_user);
+ }
+#line 50681 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3496: /* auth_expression: auth_token OR_SYM auth_expression */
+#line 17440 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= (yyvsp[-2].user_auth);
+ DBUG_ASSERT((yyval.user_auth)->next == NULL);
+ (yyval.user_auth)->next= (yyvsp[0].user_auth);
+ }
+#line 50691 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3497: /* auth_expression: auth_token */
+#line 17446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= (yyvsp[0].user_auth);
+ }
+#line 50699 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3498: /* auth_token: ident_or_text opt_auth_str */
+#line 17453 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= (yyvsp[0].user_auth);
+ (yyval.user_auth)->plugin= (yyvsp[-1].lex_str);
+ }
+#line 50708 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3499: /* opt_auth_str: %empty */
+#line 17461 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ }
+#line 50717 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3500: /* opt_auth_str: using_or_as TEXT_STRING_sys */
+#line 17466 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ (yyval.user_auth)->auth_str= (yyvsp[0].lex_str);
+ }
+#line 50727 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3501: /* opt_auth_str: using_or_as PASSWORD_SYM '(' TEXT_STRING ')' */
+#line 17472 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ (yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
+ }
+#line 50737 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3503: /* opt_require_clause: REQUIRE_SYM require_list */
+#line 17482 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_SPECIFIED;
+ }
+#line 50745 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3504: /* opt_require_clause: REQUIRE_SYM SSL_SYM */
+#line 17486 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_ANY;
+ }
+#line 50753 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3505: /* opt_require_clause: REQUIRE_SYM X509_SYM */
+#line 17490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_X509;
+ }
+#line 50761 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3506: /* opt_require_clause: REQUIRE_SYM NONE_SYM */
+#line 17494 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_NONE;
+ }
+#line 50769 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3507: /* resource_option: MAX_QUERIES_PER_HOUR ulong_num */
+#line 17501 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.questions=(yyvsp[0].ulong_num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
+ }
+#line 50778 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3508: /* resource_option: MAX_UPDATES_PER_HOUR ulong_num */
+#line 17506 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.updates=(yyvsp[0].ulong_num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
+ }
+#line 50787 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3509: /* resource_option: MAX_CONNECTIONS_PER_HOUR ulong_num */
+#line 17511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.conn_per_hour= (yyvsp[0].ulong_num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
+ }
+#line 50796 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3510: /* resource_option: MAX_USER_CONNECTIONS_SYM int_num */
+#line 17516 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.user_conn= (yyvsp[0].num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
+ }
+#line 50805 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3511: /* resource_option: MAX_STATEMENT_TIME_SYM NUM_literal */
+#line 17521 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.max_statement_time= (yyvsp[0].item_num)->val_real();
+ Lex->account_options.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
+ }
+#line 50814 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3512: /* resource_option_list: resource_option_list resource_option */
+#line 17528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50820 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3513: /* resource_option_list: resource_option */
+#line 17529 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50826 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3514: /* opt_resource_options: %empty */
+#line 17533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50832 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3516: /* opt_grant_options: %empty */
+#line 17539 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50838 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3517: /* opt_grant_options: WITH grant_option_list */
+#line 17540 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= (yyvsp[0].privilege); }
+#line 50844 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3518: /* opt_grant_option: %empty */
+#line 17544 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50850 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3519: /* opt_grant_option: WITH GRANT OPTION */
+#line 17545 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= GRANT_ACL; }
+#line 50856 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3520: /* grant_option_list: grant_option_list grant_option */
+#line 17549 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= (yyvsp[-1].privilege) | (yyvsp[0].privilege); }
+#line 50862 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3522: /* grant_option: GRANT OPTION */
+#line 17554 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= GRANT_ACL;}
+#line 50868 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3523: /* grant_option: resource_option */
+#line 17555 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50874 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3524: /* $@247: %empty */
+#line 17560 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_BEGIN;
+ lex->start_transaction_opt= 0;
+ }
+#line 50884 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3525: /* begin_stmt_mariadb: BEGIN_MARIADB_SYM $@247 opt_work */
+#line 17565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50890 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3526: /* compound_statement: sp_proc_stmt_compound_ok */
+#line 17570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_COMPOUND;
+ if (Lex->sp_body_finalize_procedure(thd))
+ MYSQL_YYABORT;
+ }
+#line 50900 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3527: /* opt_not: %empty */
+#line 17578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 50906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3528: /* opt_not: not */
+#line 17579 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 50912 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3529: /* opt_work: %empty */
+#line 17583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50918 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3530: /* opt_work: WORK_SYM */
+#line 17584 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50924 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3531: /* opt_chain: %empty */
+#line 17589 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
+#line 50930 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3532: /* opt_chain: AND_SYM NO_SYM CHAIN_SYM */
+#line 17590 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_NO; }
+#line 50936 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3533: /* opt_chain: AND_SYM CHAIN_SYM */
+#line 17591 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_YES; }
+#line 50942 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3534: /* opt_release: %empty */
+#line 17596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
+#line 50948 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3535: /* opt_release: RELEASE_SYM */
+#line 17597 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_YES; }
+#line 50954 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3536: /* opt_release: NO_SYM RELEASE_SYM */
+#line 17598 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_NO; }
+#line 50960 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3537: /* commit: COMMIT_SYM opt_work opt_chain opt_release */
+#line 17603 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_COMMIT;
+ /* Don't allow AND CHAIN RELEASE. */
+ MYSQL_YYABORT_UNLESS((yyvsp[-1].m_yes_no_unk) != TVL_YES || (yyvsp[0].m_yes_no_unk) != TVL_YES);
+ lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
+ lex->tx_release= (yyvsp[0].m_yes_no_unk);
+ }
+#line 50973 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3538: /* rollback: ROLLBACK_SYM opt_work opt_chain opt_release */
+#line 17615 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ROLLBACK;
+ /* Don't allow AND CHAIN RELEASE. */
+ MYSQL_YYABORT_UNLESS((yyvsp[-1].m_yes_no_unk) != TVL_YES || (yyvsp[0].m_yes_no_unk) != TVL_YES);
+ lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
+ lex->tx_release= (yyvsp[0].m_yes_no_unk);
+ }
+#line 50986 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3539: /* rollback: ROLLBACK_SYM opt_work TO_SYM SAVEPOINT_SYM ident */
+#line 17624 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 50996 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3540: /* rollback: ROLLBACK_SYM opt_work TO_SYM ident */
+#line 17630 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 51006 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3541: /* savepoint: SAVEPOINT_SYM ident */
+#line 17639 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 51016 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3542: /* release: RELEASE_SYM SAVEPOINT_SYM ident */
+#line 17648 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 51026 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3543: /* unit_type_decl: UNION_SYM union_option */
+#line 17661 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.unit_operation).unit_type= UNION_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
+#line 51032 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3544: /* unit_type_decl: INTERSECT_SYM union_option */
+#line 17663 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.unit_operation).unit_type= INTERSECT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
+#line 51038 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3545: /* unit_type_decl: EXCEPT_SYM union_option */
+#line 17665 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.unit_operation).unit_type= EXCEPT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
+#line 51044 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3546: /* union_option: %empty */
+#line 17672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=1; }
+#line 51050 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3547: /* union_option: DISTINCT */
+#line 17673 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=1; }
+#line 51056 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3548: /* union_option: ALL */
+#line 17674 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=0; }
+#line 51062 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3549: /* query_expression_option: STRAIGHT_JOIN */
+#line 17678 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_STRAIGHT_JOIN; }
+#line 51068 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3550: /* query_expression_option: HIGH_PRIORITY */
+#line 17680 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ YYPS->m_lock_type= TL_READ_HIGH_PRIORITY;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ Select->options|= SELECT_HIGH_PRIORITY;
+ }
+#line 51078 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3551: /* query_expression_option: DISTINCT */
+#line 17685 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_DISTINCT; }
+#line 51084 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3552: /* query_expression_option: UNIQUE_SYM */
+#line 17686 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_DISTINCT; }
+#line 51090 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3553: /* query_expression_option: SQL_SMALL_RESULT */
+#line 17687 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_SMALL_RESULT; }
+#line 51096 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3554: /* query_expression_option: SQL_BIG_RESULT */
+#line 17688 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_BIG_RESULT; }
+#line 51102 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3555: /* query_expression_option: SQL_BUFFER_RESULT */
+#line 17689 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= OPTION_BUFFER_RESULT; }
+#line 51108 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3556: /* query_expression_option: SQL_CALC_FOUND_ROWS */
+#line 17690 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= OPTION_FOUND_ROWS; }
+#line 51114 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3557: /* query_expression_option: ALL */
+#line 17691 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_ALL; }
+#line 51120 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3560: /* no_definer: %empty */
+#line 17707 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ We have to distinguish missing DEFINER-clause from case when
+ CURRENT_USER specified as definer explicitly in order to properly
+ handle CREATE TRIGGER statements which come to replication thread
+ from older master servers (i.e. to create non-suid trigger in this
+ case).
+ */
+ thd->lex->definer= 0;
+ }
+#line 51135 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3561: /* definer: DEFINER_SYM '=' user_or_role */
+#line 17721 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->definer= (yyvsp[0].lex_user);
+ Lex->account_options.reset();
+ }
+#line 51144 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3562: /* view_algorithm: ALGORITHM_SYM '=' UNDEFINED_SYM */
+#line 17734 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= DTYPE_ALGORITHM_UNDEFINED; }
+#line 51150 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3563: /* view_algorithm: ALGORITHM_SYM '=' MERGE_SYM */
+#line 17735 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_ALGORITHM_MERGE; }
+#line 51156 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3564: /* view_algorithm: ALGORITHM_SYM '=' TEMPTABLE_SYM */
+#line 17736 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_ALGORITHM_TMPTABLE; }
+#line 51162 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3565: /* opt_view_suid: %empty */
+#line 17740 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= VIEW_SUID_DEFAULT; }
+#line 51168 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3566: /* opt_view_suid: view_suid */
+#line 17741 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= (yyvsp[0].view_suid); }
+#line 51174 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3567: /* view_suid: SQL_SYM SECURITY_SYM DEFINER_SYM */
+#line 17745 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= VIEW_SUID_DEFINER; }
+#line 51180 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3568: /* view_suid: SQL_SYM SECURITY_SYM INVOKER_SYM */
+#line 17746 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= VIEW_SUID_INVOKER; }
+#line 51186 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3569: /* view_list_opt: %empty */
+#line 17751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51192 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3570: /* view_list_opt: '(' view_list ')' */
+#line 17752 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 51198 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3571: /* view_list: ident */
+#line 17757 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->view_list.push_back((LEX_CSTRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
+ thd->mem_root);
+ }
+#line 51208 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3572: /* view_list: view_list ',' ident */
+#line 17763 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->view_list.push_back((LEX_CSTRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
+ thd->mem_root);
+ }
+#line 51218 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3573: /* $@248: %empty */
+#line 17771 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->parsing_options.allows_variable= FALSE;
+ lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
+ }
+#line 51228 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3574: /* view_select: $@248 query_expression view_check_option */
+#line 17778 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->parsed_create_view((yyvsp[-1].select_lex_unit), (yyvsp[0].num)))
+ MYSQL_YYABORT;
+ }
+#line 51237 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3575: /* view_check_option: %empty */
+#line 17785 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_NONE; }
+#line 51243 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3576: /* view_check_option: WITH CHECK_SYM OPTION */
+#line 17786 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_CASCADED; }
+#line 51249 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3577: /* view_check_option: WITH CASCADED CHECK_SYM OPTION */
+#line 17787 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_CASCADED; }
+#line 51255 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3578: /* view_check_option: WITH LOCAL_SYM CHECK_SYM OPTION */
+#line 17788 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_LOCAL; }
+#line 51261 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3579: /* trigger_action_order: FOLLOWS_SYM */
+#line 17799 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trigger_action_order_type)= TRG_ORDER_FOLLOWS; }
+#line 51267 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3580: /* trigger_action_order: PRECEDES_SYM */
+#line 17801 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trigger_action_order_type)= TRG_ORDER_PRECEDES; }
+#line 51273 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3581: /* trigger_follows_precedes_clause: %empty */
+#line 17806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.trg_execution_order).ordering_clause= TRG_ORDER_NONE;
+ (yyval.trg_execution_order).anchor_trigger_name.str= NULL;
+ (yyval.trg_execution_order).anchor_trigger_name.length= 0;
+ }
+#line 51283 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3582: /* trigger_follows_precedes_clause: trigger_action_order ident_or_text */
+#line 17813 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.trg_execution_order).ordering_clause= (yyvsp[-1].trigger_action_order_type);
+ (yyval.trg_execution_order).anchor_trigger_name= (yyvsp[0].lex_str);
+ }
+#line 51292 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3583: /* $@249: %empty */
+#line 17822 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 51301 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3584: /* $@250: %empty */
+#line 17831 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $9 */
+ Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
+ }
+#line 51309 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3585: /* $@251: %empty */
+#line 17837 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $13 */
+ Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
+ }
+#line 51317 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3586: /* $@252: %empty */
+#line 17842 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->trg_chistics.ordering_clause_begin= YYLIP->get_cpp_ptr();
+ }
+#line 51325 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3587: /* $@253: %empty */
+#line 17846 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $18 */
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= YYLIP;
+
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_NO_RECURSIVE_CREATE, MYF(0), "TRIGGER"));
+
+ lex->stmt_definition_begin= (yyvsp[-16].simple_string);
+ lex->ident.str= (yyvsp[-9].simple_string);
+ lex->ident.length= (yyvsp[-5].simple_string) - (yyvsp[-9].simple_string);
+ lex->spname= (yyvsp[-13].spname);
+ (*static_cast<st_trg_execution_order*>(&lex->trg_chistics))= ((yyvsp[0].trg_execution_order));
+ lex->trg_chistics.ordering_clause_end= lip->get_cpp_ptr();
+
+ if (unlikely(!lex->make_sp_head(thd, (yyvsp[-13].spname), &sp_handler_trigger,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+
+ lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
+ }
+#line 51350 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3588: /* trigger_tail: remember_name opt_if_not_exists $@249 sp_name trg_action_time trg_event ON remember_name $@250 table_ident FOR_SYM remember_name $@251 EACH_SYM ROW_SYM $@252 trigger_follows_precedes_clause $@253 sp_proc_stmt force_lookahead */
+#line 17867 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $21 */
+ LEX *lex= Lex;
+
+ lex->sql_command= SQLCOM_CREATE_TRIGGER;
+ if (lex->sp_body_finalize_trigger(thd))
+ MYSQL_YYABORT;
+
+ /*
+ We have to do it after parsing trigger body, because some of
+ sp_proc_stmt alternatives are not saving/restoring LEX, so
+ lex->query_tables can be wiped out.
+ */
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[-10].table), (LEX_CSTRING*) 0,
+ TL_OPTION_UPDATING, TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
+ MYSQL_YYABORT;
+ }
+#line 51373 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3589: /* $@254: %empty */
+#line 17895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->init_last_field(&lex->sphead->m_return_field_def,
+ &empty_clex_str);
+ }
+#line 51383 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3590: /* sf_return_type: $@254 field_type */
+#line 17901 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sf_return_fill_definition((yyvsp[0].Lex_field_type))))
+ MYSQL_YYABORT;
+ }
+#line 51392 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3591: /* xa: XA_SYM begin_or_start xid opt_join_or_resume */
+#line 17911 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_START;
+ }
+#line 51400 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3592: /* xa: XA_SYM END xid opt_suspend */
+#line 17915 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_END;
+ }
+#line 51408 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3593: /* xa: XA_SYM PREPARE_SYM xid */
+#line 17919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_PREPARE;
+ }
+#line 51416 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3594: /* xa: XA_SYM COMMIT_SYM xid opt_one_phase */
+#line 17923 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_COMMIT;
+ }
+#line 51424 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3595: /* xa: XA_SYM ROLLBACK_SYM xid */
+#line 17927 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_ROLLBACK;
+ }
+#line 51432 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3596: /* xa: XA_SYM RECOVER_SYM opt_format_xid */
+#line 17931 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_RECOVER;
+ Lex->verbose= (yyvsp[0].num);
+ }
+#line 51441 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3597: /* opt_format_xid: %empty */
+#line 17938 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 51447 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3598: /* opt_format_xid: FORMAT_SYM '=' ident_or_text */
+#line 17940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("SQL")))
+ (yyval.num)= true;
+ else if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("RAW")))
+ (yyval.num)= false;
+ else
+ {
+ my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0),
+ "XA RECOVER", (yyvsp[0].lex_str).str));
+ (yyval.num)= false;
+ }
+ }
+#line 51464 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3599: /* xid: text_string */
+#line 17956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
+ if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
+ MYSQL_YYABORT;
+ Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
+ }
+#line 51475 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3600: /* xid: text_string ',' text_string */
+#line 17963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
+ if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
+ MYSQL_YYABORT;
+ Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length());
+ }
+#line 51486 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3601: /* xid: text_string ',' text_string ',' ulong_num */
+#line 17970 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE &&
+ (yyvsp[-2].string)->length() <= MAXBQUALSIZE &&
+ (yyvsp[0].ulong_num) <= static_cast<ulong>(
+ std::numeric_limits<int32_t>::max()));
+ if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
+ MYSQL_YYABORT;
+ Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length());
+ }
+#line 51500 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3602: /* begin_or_start: BEGIN_MARIADB_SYM */
+#line 17982 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51506 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3603: /* begin_or_start: BEGIN_ORACLE_SYM */
+#line 17983 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51512 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3604: /* begin_or_start: START_SYM */
+#line 17984 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51518 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3605: /* opt_join_or_resume: %empty */
+#line 17988 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_NONE; }
+#line 51524 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3606: /* opt_join_or_resume: JOIN_SYM */
+#line 17989 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_JOIN; }
+#line 51530 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3607: /* opt_join_or_resume: RESUME_SYM */
+#line 17990 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_RESUME; }
+#line 51536 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3608: /* opt_one_phase: %empty */
+#line 17994 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_NONE; }
+#line 51542 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3609: /* opt_one_phase: ONE_SYM PHASE_SYM */
+#line 17995 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_ONE_PHASE; }
+#line 51548 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3610: /* opt_suspend: %empty */
+#line 18000 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_NONE; }
+#line 51554 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3611: /* $@255: %empty */
+#line 18002 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_SUSPEND; }
+#line 51560 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3613: /* opt_migrate: %empty */
+#line 18007 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51566 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3614: /* opt_migrate: FOR_SYM MIGRATE_SYM */
+#line 18008 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_FOR_MIGRATE; }
+#line 51572 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3615: /* install: INSTALL_SYM PLUGIN_SYM opt_if_not_exists ident SONAME_SYM TEXT_STRING_sys */
+#line 18013 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_install_plugin((yyvsp[-3].object_ddl_options), (yyvsp[-2].ident_sys), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 51581 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3616: /* install: INSTALL_SYM SONAME_SYM TEXT_STRING_sys */
+#line 18018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_install_plugin((yyvsp[0].lex_str));
+ }
+#line 51589 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3617: /* uninstall: UNINSTALL_SYM PLUGIN_SYM opt_if_exists ident */
+#line 18025 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_uninstall_plugin_by_name((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 51598 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3618: /* uninstall: UNINSTALL_SYM SONAME_SYM opt_if_exists TEXT_STRING_sys */
+#line 18030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_uninstall_plugin_by_soname((yyvsp[-1].object_ddl_options), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 51607 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3619: /* keep_gcc_happy: IMPOSSIBLE_ACTION */
+#line 18039 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ YYERROR;
+ }
+#line 51615 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3653: /* row_field_name: ident */
+#line 18122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.spvar_definition)= Lex->row_field_name(thd, (yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51624 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3654: /* $@256: %empty */
+#line 18130 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-1].expr_lex)->sp_while_loop_expression(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51633 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3655: /* while_body: expr_lex DO_SYM $@256 sp_proc_stmts1 END WHILE_SYM */
+#line 18135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_while_loop_finalize(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51642 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3656: /* for_loop_statements: DO_SYM sp_proc_stmts1 END FOR_SYM */
+#line 18143 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 51648 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3657: /* sp_label: label_ident ':' */
+#line 18147 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[-1].ident_sys); }
+#line 51654 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3659: /* sp_block_label: sp_label */
+#line 18156 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->spcont->block_label_declare(&(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ (yyval.lex_str)= (yyvsp[0].lex_str);
+ }
+#line 51664 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3660: /* sp_opt_default: _empty */
+#line 18164 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = NULL; }
+#line 51670 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3661: /* sp_opt_default: DEFAULT expr */
+#line 18165 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item); }
+#line 51676 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3662: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars TYPE_SYM OF_SYM optionally_qualified_column_ident sp_opt_default */
+#line 18172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_with_ref_finalize(thd, (yyvsp[-4].num), (yyvsp[-1].qualified_column_ident), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-4].num));
+ }
+#line 51686 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3663: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars ROW_SYM TYPE_SYM OF_SYM optionally_qualified_column_ident sp_opt_default */
+#line 18180 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_rowtype_finalize(thd, (yyvsp[-5].num), (yyvsp[-1].qualified_column_ident), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-5].num));
+ }
+#line 51696 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3664: /* sp_param_name_and_mode: sp_parameter_type sp_param_name */
+#line 18189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].spvar)->mode= (yyvsp[-1].spvar_mode);
+ (yyval.spvar)= (yyvsp[0].spvar);
+ }
+#line 51705 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3666: /* sp_param: sp_param_name_and_mode field_type */
+#line 18198 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_param_fill_definition((yyval.spvar)= (yyvsp[-1].spvar), (yyvsp[0].Lex_field_type))))
+ MYSQL_YYABORT;
+ }
+#line 51714 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3667: /* sp_param: sp_param_name_and_mode ROW_SYM row_type_body */
+#line 18203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_row(thd, (yyval.spvar)= (yyvsp[-2].spvar), (yyvsp[0].spvar_definition_list))))
+ MYSQL_YYABORT;
+ }
+#line 51723 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3669: /* sp_param_anchored: sp_param_name_and_mode TYPE_SYM OF_SYM ident '.' ident */
+#line 18212 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_type_reference(thd,
+ (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-2].ident_sys),
+ (yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51734 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3670: /* sp_param_anchored: sp_param_name_and_mode TYPE_SYM OF_SYM ident '.' ident '.' ident */
+#line 18219 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-7].spvar),
+ (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51744 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3671: /* sp_param_anchored: sp_param_name_and_mode ROW_SYM TYPE_SYM OF_SYM ident */
+#line 18225 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-4].spvar), (yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51753 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3672: /* sp_param_anchored: sp_param_name_and_mode ROW_SYM TYPE_SYM OF_SYM ident '.' ident */
+#line 18230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-6].spvar), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51762 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3673: /* $@257: %empty */
+#line 18239 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->sphead->set_c_chistics(lex->sp_chistics);
+ lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51772 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3674: /* sf_c_chistics_and_body_standalone: sp_c_chistics $@257 sp_proc_stmt_in_returns_clause force_lookahead */
+#line 18245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_body_finalize_function(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51781 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3675: /* $@258: %empty */
+#line 18253 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[0].spname),
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+ }
+#line 51792 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3676: /* $@259: %empty */
+#line 18261 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->set_c_chistics(Lex->sp_chistics);
+ Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51801 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3677: /* sp_tail_standalone: sp_name $@258 sp_parenthesized_pdparam_list sp_c_chistics $@259 sp_proc_stmt force_lookahead */
+#line 18266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_body_finalize_procedure(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51810 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3678: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident '.' ident */
+#line 18274 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_drop_function((yyvsp[-3].object_ddl_options), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 51819 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3679: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident */
+#line 18279 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_drop_function((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 51828 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3680: /* drop_routine: DROP PROCEDURE_SYM opt_if_exists sp_name */
+#line 18284 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_drop_procedure((yyvsp[-1].object_ddl_options), (yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51837 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3681: /* $@260: %empty */
+#line 18293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_procedure_start((yyvsp[-3].object_ddl_options) | (yyvsp[0].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 51846 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3682: /* create_routine: create_or_replace definer_opt PROCEDURE_SYM opt_if_not_exists $@260 sp_tail_standalone */
+#line 18298 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_create_routine_finalize();
+ }
+#line 51854 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3683: /* $@261: %empty */
+#line 18303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_stored_function_start((yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-3].sp_aggregate_type), (yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51863 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3684: /* create_routine: create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@261 sp_parenthesized_fdparam_list RETURNS_SYM sf_return_type sf_c_chistics_and_body_standalone */
+#line 18310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_create_routine_finalize();
+ }
+#line 51871 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3685: /* $@262: %empty */
+#line 18315 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_stored_function_start((yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-3].sp_aggregate_type), (yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51880 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3686: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@262 sp_parenthesized_fdparam_list RETURNS_SYM sf_return_type sf_c_chistics_and_body_standalone */
+#line 18322 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_create_routine_finalize();
+ }
+#line 51888 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3687: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys */
+#line 18327 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_udf_function((yyvsp[-9].object_ddl_options) | (yyvsp[-5].object_ddl_options), (yyvsp[-7].sp_aggregate_type), (yyvsp[-4].ident_sys),
+ (Item_result) (yyvsp[-2].num), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 51898 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3688: /* sp_decls: _empty */
+#line 18337 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spblock).init();
+ }
+#line 51906 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3689: /* sp_decls: sp_decls sp_decl ';' */
+#line 18341 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ // We check for declarations out of (standard) order this way
+ // because letting the grammar rules reflect it caused tricky
+ // shift/reduce conflicts with the wrong result. (And we get
+ // better error handling this way.)
+ if (unlikely(Lex->sp_declarations_join(&(yyval.spblock), (yyvsp[-2].spblock), (yyvsp[-1].spblock))))
+ MYSQL_YYABORT;
+ }
+#line 51919 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3690: /* sp_decl: DECLARE_MARIADB_SYM sp_decl_body */
+#line 18352 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock)= (yyvsp[0].spblock); }
+#line 51925 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3692: /* sp_decl_body: sp_decl_ident CONDITION_SYM FOR_SYM sp_cond */
+#line 18359 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->spcont->declare_condition(thd, &(yyvsp[-3].ident_sys), (yyvsp[0].spcondvalue))))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
+ (yyval.spblock).conds= 1;
+ }
+#line 51936 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3694: /* $@263: %empty */
+#line 18367 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd);
+ }
+#line 51944 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3695: /* sp_decl_body: sp_decl_ident CURSOR_SYM $@263 opt_parenthesized_cursor_formal_parameters FOR_SYM sp_cursor_stmt */
+#line 18372 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_pcontext *param_ctx= Lex->spcont;
+ if (unlikely(Lex->sp_block_finalize(thd)))
+ MYSQL_YYABORT;
+ if (unlikely(Lex->sp_declare_cursor(thd, &(yyvsp[-5].ident_sys), (yyvsp[0].sp_cursor_stmt), param_ctx, true)))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).hndlrs= 0;
+ (yyval.spblock).curs= 1;
+ }
+#line 51958 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3713: /* $@264: %empty */
+#line 18423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
+ }
+#line 51966 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3714: /* sp_labeled_block: sp_block_label BEGIN_MARIADB_SYM $@264 sp_decls sp_proc_stmts END sp_opt_label */
+#line 18430 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock), &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 51975 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3715: /* $@265: %empty */
+#line 18438 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd);
+ }
+#line 51983 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3716: /* sp_unlabeled_block: BEGIN_MARIADB_SYM $@265 sp_decls sp_proc_stmts END */
+#line 18444 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
+ MYSQL_YYABORT;
+ }
+#line 51992 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3717: /* $@266: %empty */
+#line 18452 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sp_block_init(thd);
+ }
+#line 52002 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+ case 3718: /* sp_unlabeled_block_not_atomic: BEGIN_MARIADB_SYM not ATOMIC_SYM $@266 sp_decls sp_proc_stmts END */
+#line 18460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
+ MYSQL_YYABORT;
+ }
+#line 52011 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+ break;
+
+
+#line 52015 "/home/buildbot/git/mkdist/sql/yy_mariadb.cc"
+
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+ yyerror (thd, YY_("syntax error"));
+ }
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, thd);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+ ++yynerrs;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ /* Pop stack until we find a state that shifts the error token. */
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ YY_ACCESSING_SYMBOL (yystate), yyvsp, thd);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturnlab;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturnlab;
+
+
+/*-----------------------------------------------------------.
+| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
+`-----------------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (thd, YY_("memory exhausted"));
+ yyresult = 2;
+ goto yyreturnlab;
+
+
+/*----------------------------------------------------------.
+| yyreturnlab -- parsing is finished, clean up and return. |
+`----------------------------------------------------------*/
+yyreturnlab:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, thd);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, thd);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+
+ return yyresult;
+}
+
diff --git a/sql/yy_mariadb.hh b/sql/yy_mariadb.hh
new file mode 100644
index 00000000..fa18f2cb
--- /dev/null
+++ b/sql/yy_mariadb.hh
@@ -0,0 +1,981 @@
+/* A Bison parser, made by GNU Bison 3.8.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
+ Inc.
+
+ This program is free 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 3 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, see <https://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+#ifndef YY_MYSQL_HOME_BUILDBOT_GIT_MKDIST_SQL_YY_MARIADB_HH_INCLUDED
+# define YY_MYSQL_HOME_BUILDBOT_GIT_MKDIST_SQL_YY_MARIADB_HH_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int MYSQLdebug;
+#endif
+
+/* Token kinds. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ ABORT_SYM = 258, /* ABORT_SYM */
+ IMPOSSIBLE_ACTION = 259, /* IMPOSSIBLE_ACTION */
+ FORCE_LOOKAHEAD = 260, /* FORCE_LOOKAHEAD */
+ END_OF_INPUT = 261, /* END_OF_INPUT */
+ COLON_ORACLE_SYM = 262, /* COLON_ORACLE_SYM */
+ PARAM_MARKER = 263, /* PARAM_MARKER */
+ FOR_SYSTEM_TIME_SYM = 264, /* FOR_SYSTEM_TIME_SYM */
+ LEFT_PAREN_ALT = 265, /* LEFT_PAREN_ALT */
+ LEFT_PAREN_WITH = 266, /* LEFT_PAREN_WITH */
+ LEFT_PAREN_LIKE = 267, /* LEFT_PAREN_LIKE */
+ ORACLE_CONCAT_SYM = 268, /* ORACLE_CONCAT_SYM */
+ PERCENT_ORACLE_SYM = 269, /* PERCENT_ORACLE_SYM */
+ WITH_CUBE_SYM = 270, /* WITH_CUBE_SYM */
+ WITH_ROLLUP_SYM = 271, /* WITH_ROLLUP_SYM */
+ WITH_SYSTEM_SYM = 272, /* WITH_SYSTEM_SYM */
+ IDENT = 273, /* IDENT */
+ IDENT_QUOTED = 274, /* IDENT_QUOTED */
+ LEX_HOSTNAME = 275, /* LEX_HOSTNAME */
+ UNDERSCORE_CHARSET = 276, /* UNDERSCORE_CHARSET */
+ BIN_NUM = 277, /* BIN_NUM */
+ DECIMAL_NUM = 278, /* DECIMAL_NUM */
+ FLOAT_NUM = 279, /* FLOAT_NUM */
+ HEX_NUM = 280, /* HEX_NUM */
+ HEX_STRING = 281, /* HEX_STRING */
+ LONG_NUM = 282, /* LONG_NUM */
+ NCHAR_STRING = 283, /* NCHAR_STRING */
+ NUM = 284, /* NUM */
+ TEXT_STRING = 285, /* TEXT_STRING */
+ ULONGLONG_NUM = 286, /* ULONGLONG_NUM */
+ AND_AND_SYM = 287, /* AND_AND_SYM */
+ DOT_DOT_SYM = 288, /* DOT_DOT_SYM */
+ EQUAL_SYM = 289, /* EQUAL_SYM */
+ GE = 290, /* GE */
+ LE = 291, /* LE */
+ MYSQL_CONCAT_SYM = 292, /* MYSQL_CONCAT_SYM */
+ NE = 293, /* NE */
+ NOT2_SYM = 294, /* NOT2_SYM */
+ OR2_SYM = 295, /* OR2_SYM */
+ SET_VAR = 296, /* SET_VAR */
+ SHIFT_LEFT = 297, /* SHIFT_LEFT */
+ SHIFT_RIGHT = 298, /* SHIFT_RIGHT */
+ ACCESSIBLE_SYM = 299, /* ACCESSIBLE_SYM */
+ ADD = 300, /* ADD */
+ ALL = 301, /* ALL */
+ ALTER = 302, /* ALTER */
+ ANALYZE_SYM = 303, /* ANALYZE_SYM */
+ AND_SYM = 304, /* AND_SYM */
+ ASC = 305, /* ASC */
+ ASENSITIVE_SYM = 306, /* ASENSITIVE_SYM */
+ AS = 307, /* AS */
+ BEFORE_SYM = 308, /* BEFORE_SYM */
+ BETWEEN_SYM = 309, /* BETWEEN_SYM */
+ BIGINT = 310, /* BIGINT */
+ BINARY = 311, /* BINARY */
+ BIT_AND = 312, /* BIT_AND */
+ BIT_OR = 313, /* BIT_OR */
+ BIT_XOR = 314, /* BIT_XOR */
+ BLOB_MARIADB_SYM = 315, /* BLOB_MARIADB_SYM */
+ BLOB_ORACLE_SYM = 316, /* BLOB_ORACLE_SYM */
+ BODY_ORACLE_SYM = 317, /* BODY_ORACLE_SYM */
+ BOTH = 318, /* BOTH */
+ BY = 319, /* BY */
+ CALL_SYM = 320, /* CALL_SYM */
+ CASCADE = 321, /* CASCADE */
+ CASE_SYM = 322, /* CASE_SYM */
+ CAST_SYM = 323, /* CAST_SYM */
+ CHANGE = 324, /* CHANGE */
+ CHAR_SYM = 325, /* CHAR_SYM */
+ CHECK_SYM = 326, /* CHECK_SYM */
+ COLLATE_SYM = 327, /* COLLATE_SYM */
+ CONDITION_SYM = 328, /* CONDITION_SYM */
+ CONSTRAINT = 329, /* CONSTRAINT */
+ CONTINUE_MARIADB_SYM = 330, /* CONTINUE_MARIADB_SYM */
+ CONTINUE_ORACLE_SYM = 331, /* CONTINUE_ORACLE_SYM */
+ CONVERT_SYM = 332, /* CONVERT_SYM */
+ COUNT_SYM = 333, /* COUNT_SYM */
+ CREATE = 334, /* CREATE */
+ CROSS = 335, /* CROSS */
+ CUME_DIST_SYM = 336, /* CUME_DIST_SYM */
+ CURDATE = 337, /* CURDATE */
+ CURRENT_ROLE = 338, /* CURRENT_ROLE */
+ CURRENT_USER = 339, /* CURRENT_USER */
+ CURSOR_SYM = 340, /* CURSOR_SYM */
+ CURTIME = 341, /* CURTIME */
+ DATABASE = 342, /* DATABASE */
+ DATABASES = 343, /* DATABASES */
+ DATE_ADD_INTERVAL = 344, /* DATE_ADD_INTERVAL */
+ DATE_SUB_INTERVAL = 345, /* DATE_SUB_INTERVAL */
+ DAY_HOUR_SYM = 346, /* DAY_HOUR_SYM */
+ DAY_MICROSECOND_SYM = 347, /* DAY_MICROSECOND_SYM */
+ DAY_MINUTE_SYM = 348, /* DAY_MINUTE_SYM */
+ DAY_SECOND_SYM = 349, /* DAY_SECOND_SYM */
+ DECIMAL_SYM = 350, /* DECIMAL_SYM */
+ DECLARE_MARIADB_SYM = 351, /* DECLARE_MARIADB_SYM */
+ DECLARE_ORACLE_SYM = 352, /* DECLARE_ORACLE_SYM */
+ DEFAULT = 353, /* DEFAULT */
+ DELETE_DOMAIN_ID_SYM = 354, /* DELETE_DOMAIN_ID_SYM */
+ DELETE_SYM = 355, /* DELETE_SYM */
+ DENSE_RANK_SYM = 356, /* DENSE_RANK_SYM */
+ DESCRIBE = 357, /* DESCRIBE */
+ DESC = 358, /* DESC */
+ DETERMINISTIC_SYM = 359, /* DETERMINISTIC_SYM */
+ DISTINCT = 360, /* DISTINCT */
+ DIV_SYM = 361, /* DIV_SYM */
+ DO_DOMAIN_IDS_SYM = 362, /* DO_DOMAIN_IDS_SYM */
+ DOUBLE_SYM = 363, /* DOUBLE_SYM */
+ DROP = 364, /* DROP */
+ DUAL_SYM = 365, /* DUAL_SYM */
+ EACH_SYM = 366, /* EACH_SYM */
+ ELSEIF_MARIADB_SYM = 367, /* ELSEIF_MARIADB_SYM */
+ ELSE = 368, /* ELSE */
+ ELSIF_ORACLE_SYM = 369, /* ELSIF_ORACLE_SYM */
+ EMPTY_SYM = 370, /* EMPTY_SYM */
+ ENCLOSED = 371, /* ENCLOSED */
+ ESCAPED = 372, /* ESCAPED */
+ EXCEPT_SYM = 373, /* EXCEPT_SYM */
+ EXISTS = 374, /* EXISTS */
+ EXTRACT_SYM = 375, /* EXTRACT_SYM */
+ FALSE_SYM = 376, /* FALSE_SYM */
+ FETCH_SYM = 377, /* FETCH_SYM */
+ FIRST_VALUE_SYM = 378, /* FIRST_VALUE_SYM */
+ FLOAT_SYM = 379, /* FLOAT_SYM */
+ FOREIGN = 380, /* FOREIGN */
+ FOR_SYM = 381, /* FOR_SYM */
+ FROM = 382, /* FROM */
+ FULLTEXT_SYM = 383, /* FULLTEXT_SYM */
+ GOTO_ORACLE_SYM = 384, /* GOTO_ORACLE_SYM */
+ GRANT = 385, /* GRANT */
+ GROUP_CONCAT_SYM = 386, /* GROUP_CONCAT_SYM */
+ JSON_ARRAYAGG_SYM = 387, /* JSON_ARRAYAGG_SYM */
+ JSON_OBJECTAGG_SYM = 388, /* JSON_OBJECTAGG_SYM */
+ JSON_TABLE_SYM = 389, /* JSON_TABLE_SYM */
+ GROUP_SYM = 390, /* GROUP_SYM */
+ HAVING = 391, /* HAVING */
+ HOUR_MICROSECOND_SYM = 392, /* HOUR_MICROSECOND_SYM */
+ HOUR_MINUTE_SYM = 393, /* HOUR_MINUTE_SYM */
+ HOUR_SECOND_SYM = 394, /* HOUR_SECOND_SYM */
+ IF_SYM = 395, /* IF_SYM */
+ IGNORE_DOMAIN_IDS_SYM = 396, /* IGNORE_DOMAIN_IDS_SYM */
+ IGNORE_SYM = 397, /* IGNORE_SYM */
+ IGNORED_SYM = 398, /* IGNORED_SYM */
+ INDEX_SYM = 399, /* INDEX_SYM */
+ INFILE = 400, /* INFILE */
+ INNER_SYM = 401, /* INNER_SYM */
+ INOUT_SYM = 402, /* INOUT_SYM */
+ INSENSITIVE_SYM = 403, /* INSENSITIVE_SYM */
+ INSERT = 404, /* INSERT */
+ IN_SYM = 405, /* IN_SYM */
+ INTERSECT_SYM = 406, /* INTERSECT_SYM */
+ INTERVAL_SYM = 407, /* INTERVAL_SYM */
+ INTO = 408, /* INTO */
+ INT_SYM = 409, /* INT_SYM */
+ IS = 410, /* IS */
+ ITERATE_SYM = 411, /* ITERATE_SYM */
+ JOIN_SYM = 412, /* JOIN_SYM */
+ KEYS = 413, /* KEYS */
+ KEY_SYM = 414, /* KEY_SYM */
+ KILL_SYM = 415, /* KILL_SYM */
+ LAG_SYM = 416, /* LAG_SYM */
+ LEADING = 417, /* LEADING */
+ LEAD_SYM = 418, /* LEAD_SYM */
+ LEAVE_SYM = 419, /* LEAVE_SYM */
+ LEFT = 420, /* LEFT */
+ LIKE = 421, /* LIKE */
+ LIMIT = 422, /* LIMIT */
+ LINEAR_SYM = 423, /* LINEAR_SYM */
+ LINES = 424, /* LINES */
+ LOAD = 425, /* LOAD */
+ LOCATOR_SYM = 426, /* LOCATOR_SYM */
+ LOCK_SYM = 427, /* LOCK_SYM */
+ LONGBLOB = 428, /* LONGBLOB */
+ LONG_SYM = 429, /* LONG_SYM */
+ LONGTEXT = 430, /* LONGTEXT */
+ LOOP_SYM = 431, /* LOOP_SYM */
+ LOW_PRIORITY = 432, /* LOW_PRIORITY */
+ MASTER_SSL_VERIFY_SERVER_CERT_SYM = 433, /* MASTER_SSL_VERIFY_SERVER_CERT_SYM */
+ MATCH = 434, /* MATCH */
+ MAX_SYM = 435, /* MAX_SYM */
+ MAXVALUE_SYM = 436, /* MAXVALUE_SYM */
+ MEDIAN_SYM = 437, /* MEDIAN_SYM */
+ MEDIUMBLOB = 438, /* MEDIUMBLOB */
+ MEDIUMINT = 439, /* MEDIUMINT */
+ MEDIUMTEXT = 440, /* MEDIUMTEXT */
+ MIN_SYM = 441, /* MIN_SYM */
+ MINUS_ORACLE_SYM = 442, /* MINUS_ORACLE_SYM */
+ MINUTE_MICROSECOND_SYM = 443, /* MINUTE_MICROSECOND_SYM */
+ MINUTE_SECOND_SYM = 444, /* MINUTE_SECOND_SYM */
+ MODIFIES_SYM = 445, /* MODIFIES_SYM */
+ MOD_SYM = 446, /* MOD_SYM */
+ NATURAL = 447, /* NATURAL */
+ NEG = 448, /* NEG */
+ NESTED_SYM = 449, /* NESTED_SYM */
+ NOT_SYM = 450, /* NOT_SYM */
+ NO_WRITE_TO_BINLOG = 451, /* NO_WRITE_TO_BINLOG */
+ NOW_SYM = 452, /* NOW_SYM */
+ NTH_VALUE_SYM = 453, /* NTH_VALUE_SYM */
+ NTILE_SYM = 454, /* NTILE_SYM */
+ NULL_SYM = 455, /* NULL_SYM */
+ NUMERIC_SYM = 456, /* NUMERIC_SYM */
+ ON = 457, /* ON */
+ OPTIMIZE = 458, /* OPTIMIZE */
+ OPTIONALLY = 459, /* OPTIONALLY */
+ ORDER_SYM = 460, /* ORDER_SYM */
+ ORDINALITY_SYM = 461, /* ORDINALITY_SYM */
+ OR_SYM = 462, /* OR_SYM */
+ OTHERS_ORACLE_SYM = 463, /* OTHERS_ORACLE_SYM */
+ OUTER = 464, /* OUTER */
+ OUTFILE = 465, /* OUTFILE */
+ OUT_SYM = 466, /* OUT_SYM */
+ OVER_SYM = 467, /* OVER_SYM */
+ PACKAGE_ORACLE_SYM = 468, /* PACKAGE_ORACLE_SYM */
+ PAGE_CHECKSUM_SYM = 469, /* PAGE_CHECKSUM_SYM */
+ PARSE_VCOL_EXPR_SYM = 470, /* PARSE_VCOL_EXPR_SYM */
+ PARTITION_SYM = 471, /* PARTITION_SYM */
+ PATH_SYM = 472, /* PATH_SYM */
+ PERCENTILE_CONT_SYM = 473, /* PERCENTILE_CONT_SYM */
+ PERCENTILE_DISC_SYM = 474, /* PERCENTILE_DISC_SYM */
+ PERCENT_RANK_SYM = 475, /* PERCENT_RANK_SYM */
+ PORTION_SYM = 476, /* PORTION_SYM */
+ POSITION_SYM = 477, /* POSITION_SYM */
+ PRECISION = 478, /* PRECISION */
+ PRIMARY_SYM = 479, /* PRIMARY_SYM */
+ PROCEDURE_SYM = 480, /* PROCEDURE_SYM */
+ PURGE = 481, /* PURGE */
+ RAISE_ORACLE_SYM = 482, /* RAISE_ORACLE_SYM */
+ RANGE_SYM = 483, /* RANGE_SYM */
+ RANK_SYM = 484, /* RANK_SYM */
+ READS_SYM = 485, /* READS_SYM */
+ READ_SYM = 486, /* READ_SYM */
+ READ_WRITE_SYM = 487, /* READ_WRITE_SYM */
+ REAL = 488, /* REAL */
+ RECURSIVE_SYM = 489, /* RECURSIVE_SYM */
+ REFERENCES = 490, /* REFERENCES */
+ REF_SYSTEM_ID_SYM = 491, /* REF_SYSTEM_ID_SYM */
+ REGEXP = 492, /* REGEXP */
+ RELEASE_SYM = 493, /* RELEASE_SYM */
+ RENAME = 494, /* RENAME */
+ REPEAT_SYM = 495, /* REPEAT_SYM */
+ REQUIRE_SYM = 496, /* REQUIRE_SYM */
+ RESIGNAL_SYM = 497, /* RESIGNAL_SYM */
+ RESTRICT = 498, /* RESTRICT */
+ RETURNING_SYM = 499, /* RETURNING_SYM */
+ RETURN_MARIADB_SYM = 500, /* RETURN_MARIADB_SYM */
+ RETURN_ORACLE_SYM = 501, /* RETURN_ORACLE_SYM */
+ REVOKE = 502, /* REVOKE */
+ RIGHT = 503, /* RIGHT */
+ ROW_NUMBER_SYM = 504, /* ROW_NUMBER_SYM */
+ ROWS_SYM = 505, /* ROWS_SYM */
+ ROWTYPE_ORACLE_SYM = 506, /* ROWTYPE_ORACLE_SYM */
+ SECOND_MICROSECOND_SYM = 507, /* SECOND_MICROSECOND_SYM */
+ SELECT_SYM = 508, /* SELECT_SYM */
+ SENSITIVE_SYM = 509, /* SENSITIVE_SYM */
+ SEPARATOR_SYM = 510, /* SEPARATOR_SYM */
+ SERVER_OPTIONS = 511, /* SERVER_OPTIONS */
+ SET = 512, /* SET */
+ SHOW = 513, /* SHOW */
+ SIGNAL_SYM = 514, /* SIGNAL_SYM */
+ SMALLINT = 515, /* SMALLINT */
+ SPATIAL_SYM = 516, /* SPATIAL_SYM */
+ SPECIFIC_SYM = 517, /* SPECIFIC_SYM */
+ SQL_BIG_RESULT = 518, /* SQL_BIG_RESULT */
+ SQLEXCEPTION_SYM = 519, /* SQLEXCEPTION_SYM */
+ SQL_SMALL_RESULT = 520, /* SQL_SMALL_RESULT */
+ SQLSTATE_SYM = 521, /* SQLSTATE_SYM */
+ SQL_SYM = 522, /* SQL_SYM */
+ SQLWARNING_SYM = 523, /* SQLWARNING_SYM */
+ SSL_SYM = 524, /* SSL_SYM */
+ STARTING = 525, /* STARTING */
+ STATS_AUTO_RECALC_SYM = 526, /* STATS_AUTO_RECALC_SYM */
+ STATS_PERSISTENT_SYM = 527, /* STATS_PERSISTENT_SYM */
+ STATS_SAMPLE_PAGES_SYM = 528, /* STATS_SAMPLE_PAGES_SYM */
+ STDDEV_SAMP_SYM = 529, /* STDDEV_SAMP_SYM */
+ STD_SYM = 530, /* STD_SYM */
+ STRAIGHT_JOIN = 531, /* STRAIGHT_JOIN */
+ SUM_SYM = 532, /* SUM_SYM */
+ SYSDATE = 533, /* SYSDATE */
+ TABLE_REF_PRIORITY = 534, /* TABLE_REF_PRIORITY */
+ TABLE_SYM = 535, /* TABLE_SYM */
+ TERMINATED = 536, /* TERMINATED */
+ THEN_SYM = 537, /* THEN_SYM */
+ TINYBLOB = 538, /* TINYBLOB */
+ TINYINT = 539, /* TINYINT */
+ TINYTEXT = 540, /* TINYTEXT */
+ TO_SYM = 541, /* TO_SYM */
+ TRAILING = 542, /* TRAILING */
+ TRIGGER_SYM = 543, /* TRIGGER_SYM */
+ TRUE_SYM = 544, /* TRUE_SYM */
+ UNDO_SYM = 545, /* UNDO_SYM */
+ UNION_SYM = 546, /* UNION_SYM */
+ UNIQUE_SYM = 547, /* UNIQUE_SYM */
+ UNLOCK_SYM = 548, /* UNLOCK_SYM */
+ UNSIGNED = 549, /* UNSIGNED */
+ UPDATE_SYM = 550, /* UPDATE_SYM */
+ USAGE = 551, /* USAGE */
+ USE_SYM = 552, /* USE_SYM */
+ USING = 553, /* USING */
+ UTC_DATE_SYM = 554, /* UTC_DATE_SYM */
+ UTC_TIMESTAMP_SYM = 555, /* UTC_TIMESTAMP_SYM */
+ UTC_TIME_SYM = 556, /* UTC_TIME_SYM */
+ VALUES_IN_SYM = 557, /* VALUES_IN_SYM */
+ VALUES_LESS_SYM = 558, /* VALUES_LESS_SYM */
+ VALUES = 559, /* VALUES */
+ VARBINARY = 560, /* VARBINARY */
+ VARCHAR = 561, /* VARCHAR */
+ VARIANCE_SYM = 562, /* VARIANCE_SYM */
+ VAR_SAMP_SYM = 563, /* VAR_SAMP_SYM */
+ VARYING = 564, /* VARYING */
+ WHEN_SYM = 565, /* WHEN_SYM */
+ WHERE = 566, /* WHERE */
+ WHILE_SYM = 567, /* WHILE_SYM */
+ WITH = 568, /* WITH */
+ XOR = 569, /* XOR */
+ YEAR_MONTH_SYM = 570, /* YEAR_MONTH_SYM */
+ ZEROFILL = 571, /* ZEROFILL */
+ BODY_MARIADB_SYM = 572, /* BODY_MARIADB_SYM */
+ ELSEIF_ORACLE_SYM = 573, /* ELSEIF_ORACLE_SYM */
+ ELSIF_MARIADB_SYM = 574, /* ELSIF_MARIADB_SYM */
+ EXCEPTION_ORACLE_SYM = 575, /* EXCEPTION_ORACLE_SYM */
+ GOTO_MARIADB_SYM = 576, /* GOTO_MARIADB_SYM */
+ OTHERS_MARIADB_SYM = 577, /* OTHERS_MARIADB_SYM */
+ PACKAGE_MARIADB_SYM = 578, /* PACKAGE_MARIADB_SYM */
+ RAISE_MARIADB_SYM = 579, /* RAISE_MARIADB_SYM */
+ ROWTYPE_MARIADB_SYM = 580, /* ROWTYPE_MARIADB_SYM */
+ ROWNUM_SYM = 581, /* ROWNUM_SYM */
+ REPLACE = 582, /* REPLACE */
+ SUBSTRING = 583, /* SUBSTRING */
+ TRIM = 584, /* TRIM */
+ ACCOUNT_SYM = 585, /* ACCOUNT_SYM */
+ ACTION = 586, /* ACTION */
+ ADMIN_SYM = 587, /* ADMIN_SYM */
+ ADDDATE_SYM = 588, /* ADDDATE_SYM */
+ AFTER_SYM = 589, /* AFTER_SYM */
+ AGAINST = 590, /* AGAINST */
+ AGGREGATE_SYM = 591, /* AGGREGATE_SYM */
+ ALGORITHM_SYM = 592, /* ALGORITHM_SYM */
+ ALWAYS_SYM = 593, /* ALWAYS_SYM */
+ ANY_SYM = 594, /* ANY_SYM */
+ ASCII_SYM = 595, /* ASCII_SYM */
+ AT_SYM = 596, /* AT_SYM */
+ ATOMIC_SYM = 597, /* ATOMIC_SYM */
+ AUTHORS_SYM = 598, /* AUTHORS_SYM */
+ AUTOEXTEND_SIZE_SYM = 599, /* AUTOEXTEND_SIZE_SYM */
+ AUTO_INC = 600, /* AUTO_INC */
+ AUTO_SYM = 601, /* AUTO_SYM */
+ AVG_ROW_LENGTH = 602, /* AVG_ROW_LENGTH */
+ AVG_SYM = 603, /* AVG_SYM */
+ BACKUP_SYM = 604, /* BACKUP_SYM */
+ BEGIN_MARIADB_SYM = 605, /* BEGIN_MARIADB_SYM */
+ BEGIN_ORACLE_SYM = 606, /* BEGIN_ORACLE_SYM */
+ BINLOG_SYM = 607, /* BINLOG_SYM */
+ BIT_SYM = 608, /* BIT_SYM */
+ BLOCK_SYM = 609, /* BLOCK_SYM */
+ BOOL_SYM = 610, /* BOOL_SYM */
+ BOOLEAN_SYM = 611, /* BOOLEAN_SYM */
+ BTREE_SYM = 612, /* BTREE_SYM */
+ BYTE_SYM = 613, /* BYTE_SYM */
+ CACHE_SYM = 614, /* CACHE_SYM */
+ CASCADED = 615, /* CASCADED */
+ CATALOG_NAME_SYM = 616, /* CATALOG_NAME_SYM */
+ CHAIN_SYM = 617, /* CHAIN_SYM */
+ CHANGED = 618, /* CHANGED */
+ CHANNEL_SYM = 619, /* CHANNEL_SYM */
+ CHARSET = 620, /* CHARSET */
+ CHECKPOINT_SYM = 621, /* CHECKPOINT_SYM */
+ CHECKSUM_SYM = 622, /* CHECKSUM_SYM */
+ CIPHER_SYM = 623, /* CIPHER_SYM */
+ CLASS_ORIGIN_SYM = 624, /* CLASS_ORIGIN_SYM */
+ CLIENT_SYM = 625, /* CLIENT_SYM */
+ CLOB_MARIADB_SYM = 626, /* CLOB_MARIADB_SYM */
+ CLOB_ORACLE_SYM = 627, /* CLOB_ORACLE_SYM */
+ CLOSE_SYM = 628, /* CLOSE_SYM */
+ COALESCE = 629, /* COALESCE */
+ CODE_SYM = 630, /* CODE_SYM */
+ COLLATION_SYM = 631, /* COLLATION_SYM */
+ COLUMNS = 632, /* COLUMNS */
+ COLUMN_ADD_SYM = 633, /* COLUMN_ADD_SYM */
+ COLUMN_CHECK_SYM = 634, /* COLUMN_CHECK_SYM */
+ COLUMN_CREATE_SYM = 635, /* COLUMN_CREATE_SYM */
+ COLUMN_DELETE_SYM = 636, /* COLUMN_DELETE_SYM */
+ COLUMN_GET_SYM = 637, /* COLUMN_GET_SYM */
+ COLUMN_SYM = 638, /* COLUMN_SYM */
+ COLUMN_NAME_SYM = 639, /* COLUMN_NAME_SYM */
+ COMMENT_SYM = 640, /* COMMENT_SYM */
+ COMMITTED_SYM = 641, /* COMMITTED_SYM */
+ COMMIT_SYM = 642, /* COMMIT_SYM */
+ COMPACT_SYM = 643, /* COMPACT_SYM */
+ COMPLETION_SYM = 644, /* COMPLETION_SYM */
+ COMPRESSED_SYM = 645, /* COMPRESSED_SYM */
+ CONCURRENT = 646, /* CONCURRENT */
+ CONNECTION_SYM = 647, /* CONNECTION_SYM */
+ CONSISTENT_SYM = 648, /* CONSISTENT_SYM */
+ CONSTRAINT_CATALOG_SYM = 649, /* CONSTRAINT_CATALOG_SYM */
+ CONSTRAINT_NAME_SYM = 650, /* CONSTRAINT_NAME_SYM */
+ CONSTRAINT_SCHEMA_SYM = 651, /* CONSTRAINT_SCHEMA_SYM */
+ CONTAINS_SYM = 652, /* CONTAINS_SYM */
+ CONTEXT_SYM = 653, /* CONTEXT_SYM */
+ CONTRIBUTORS_SYM = 654, /* CONTRIBUTORS_SYM */
+ CPU_SYM = 655, /* CPU_SYM */
+ CUBE_SYM = 656, /* CUBE_SYM */
+ CURRENT_SYM = 657, /* CURRENT_SYM */
+ CURRENT_POS_SYM = 658, /* CURRENT_POS_SYM */
+ CURSOR_NAME_SYM = 659, /* CURSOR_NAME_SYM */
+ CYCLE_SYM = 660, /* CYCLE_SYM */
+ DATAFILE_SYM = 661, /* DATAFILE_SYM */
+ DATA_SYM = 662, /* DATA_SYM */
+ DATETIME = 663, /* DATETIME */
+ DATE_SYM = 664, /* DATE_SYM */
+ DAY_SYM = 665, /* DAY_SYM */
+ DEALLOCATE_SYM = 666, /* DEALLOCATE_SYM */
+ DEFINER_SYM = 667, /* DEFINER_SYM */
+ DELAYED_SYM = 668, /* DELAYED_SYM */
+ DELAY_KEY_WRITE_SYM = 669, /* DELAY_KEY_WRITE_SYM */
+ DES_KEY_FILE = 670, /* DES_KEY_FILE */
+ DIAGNOSTICS_SYM = 671, /* DIAGNOSTICS_SYM */
+ DIRECTORY_SYM = 672, /* DIRECTORY_SYM */
+ DISABLE_SYM = 673, /* DISABLE_SYM */
+ DISCARD = 674, /* DISCARD */
+ DISK_SYM = 675, /* DISK_SYM */
+ DO_SYM = 676, /* DO_SYM */
+ DUMPFILE = 677, /* DUMPFILE */
+ DUPLICATE_SYM = 678, /* DUPLICATE_SYM */
+ DYNAMIC_SYM = 679, /* DYNAMIC_SYM */
+ ENABLE_SYM = 680, /* ENABLE_SYM */
+ END = 681, /* END */
+ ENDS_SYM = 682, /* ENDS_SYM */
+ ENGINES_SYM = 683, /* ENGINES_SYM */
+ ENGINE_SYM = 684, /* ENGINE_SYM */
+ ENUM = 685, /* ENUM */
+ ERROR_SYM = 686, /* ERROR_SYM */
+ ERRORS = 687, /* ERRORS */
+ ESCAPE_SYM = 688, /* ESCAPE_SYM */
+ EVENTS_SYM = 689, /* EVENTS_SYM */
+ EVENT_SYM = 690, /* EVENT_SYM */
+ EVERY_SYM = 691, /* EVERY_SYM */
+ EXCHANGE_SYM = 692, /* EXCHANGE_SYM */
+ EXAMINED_SYM = 693, /* EXAMINED_SYM */
+ EXCLUDE_SYM = 694, /* EXCLUDE_SYM */
+ EXECUTE_SYM = 695, /* EXECUTE_SYM */
+ EXCEPTION_MARIADB_SYM = 696, /* EXCEPTION_MARIADB_SYM */
+ EXIT_MARIADB_SYM = 697, /* EXIT_MARIADB_SYM */
+ EXIT_ORACLE_SYM = 698, /* EXIT_ORACLE_SYM */
+ EXPANSION_SYM = 699, /* EXPANSION_SYM */
+ EXPIRE_SYM = 700, /* EXPIRE_SYM */
+ EXPORT_SYM = 701, /* EXPORT_SYM */
+ EXTENDED_SYM = 702, /* EXTENDED_SYM */
+ EXTENT_SIZE_SYM = 703, /* EXTENT_SIZE_SYM */
+ FAST_SYM = 704, /* FAST_SYM */
+ FAULTS_SYM = 705, /* FAULTS_SYM */
+ FEDERATED_SYM = 706, /* FEDERATED_SYM */
+ FILE_SYM = 707, /* FILE_SYM */
+ FIRST_SYM = 708, /* FIRST_SYM */
+ FIXED_SYM = 709, /* FIXED_SYM */
+ FLUSH_SYM = 710, /* FLUSH_SYM */
+ FOLLOWS_SYM = 711, /* FOLLOWS_SYM */
+ FOLLOWING_SYM = 712, /* FOLLOWING_SYM */
+ FORCE_SYM = 713, /* FORCE_SYM */
+ FORMAT_SYM = 714, /* FORMAT_SYM */
+ FOUND_SYM = 715, /* FOUND_SYM */
+ FULL = 716, /* FULL */
+ FUNCTION_SYM = 717, /* FUNCTION_SYM */
+ GENERAL = 718, /* GENERAL */
+ GENERATED_SYM = 719, /* GENERATED_SYM */
+ GET_FORMAT = 720, /* GET_FORMAT */
+ GET_SYM = 721, /* GET_SYM */
+ GLOBAL_SYM = 722, /* GLOBAL_SYM */
+ GRANTS = 723, /* GRANTS */
+ HANDLER_SYM = 724, /* HANDLER_SYM */
+ HARD_SYM = 725, /* HARD_SYM */
+ HASH_SYM = 726, /* HASH_SYM */
+ HELP_SYM = 727, /* HELP_SYM */
+ HIGH_PRIORITY = 728, /* HIGH_PRIORITY */
+ HISTORY_SYM = 729, /* HISTORY_SYM */
+ HOST_SYM = 730, /* HOST_SYM */
+ HOSTS_SYM = 731, /* HOSTS_SYM */
+ HOUR_SYM = 732, /* HOUR_SYM */
+ ID_SYM = 733, /* ID_SYM */
+ IDENTIFIED_SYM = 734, /* IDENTIFIED_SYM */
+ IGNORE_SERVER_IDS_SYM = 735, /* IGNORE_SERVER_IDS_SYM */
+ IMMEDIATE_SYM = 736, /* IMMEDIATE_SYM */
+ IMPORT = 737, /* IMPORT */
+ INCREMENT_SYM = 738, /* INCREMENT_SYM */
+ INDEXES = 739, /* INDEXES */
+ INITIAL_SIZE_SYM = 740, /* INITIAL_SIZE_SYM */
+ INSERT_METHOD = 741, /* INSERT_METHOD */
+ INSTALL_SYM = 742, /* INSTALL_SYM */
+ INVOKER_SYM = 743, /* INVOKER_SYM */
+ IO_SYM = 744, /* IO_SYM */
+ IPC_SYM = 745, /* IPC_SYM */
+ ISOLATION = 746, /* ISOLATION */
+ ISOPEN_SYM = 747, /* ISOPEN_SYM */
+ ISSUER_SYM = 748, /* ISSUER_SYM */
+ INVISIBLE_SYM = 749, /* INVISIBLE_SYM */
+ JSON_SYM = 750, /* JSON_SYM */
+ KEY_BLOCK_SIZE = 751, /* KEY_BLOCK_SIZE */
+ LANGUAGE_SYM = 752, /* LANGUAGE_SYM */
+ LAST_SYM = 753, /* LAST_SYM */
+ LAST_VALUE = 754, /* LAST_VALUE */
+ LASTVAL_SYM = 755, /* LASTVAL_SYM */
+ LEAVES = 756, /* LEAVES */
+ LESS_SYM = 757, /* LESS_SYM */
+ LEVEL_SYM = 758, /* LEVEL_SYM */
+ LIST_SYM = 759, /* LIST_SYM */
+ LOCAL_SYM = 760, /* LOCAL_SYM */
+ LOCKED_SYM = 761, /* LOCKED_SYM */
+ LOCKS_SYM = 762, /* LOCKS_SYM */
+ LOGFILE_SYM = 763, /* LOGFILE_SYM */
+ LOGS_SYM = 764, /* LOGS_SYM */
+ MASTER_CONNECT_RETRY_SYM = 765, /* MASTER_CONNECT_RETRY_SYM */
+ MASTER_DELAY_SYM = 766, /* MASTER_DELAY_SYM */
+ MASTER_GTID_POS_SYM = 767, /* MASTER_GTID_POS_SYM */
+ MASTER_HOST_SYM = 768, /* MASTER_HOST_SYM */
+ MASTER_LOG_FILE_SYM = 769, /* MASTER_LOG_FILE_SYM */
+ MASTER_LOG_POS_SYM = 770, /* MASTER_LOG_POS_SYM */
+ MASTER_PASSWORD_SYM = 771, /* MASTER_PASSWORD_SYM */
+ MASTER_PORT_SYM = 772, /* MASTER_PORT_SYM */
+ MASTER_SERVER_ID_SYM = 773, /* MASTER_SERVER_ID_SYM */
+ MASTER_SSL_CAPATH_SYM = 774, /* MASTER_SSL_CAPATH_SYM */
+ MASTER_SSL_CA_SYM = 775, /* MASTER_SSL_CA_SYM */
+ MASTER_SSL_CERT_SYM = 776, /* MASTER_SSL_CERT_SYM */
+ MASTER_SSL_CIPHER_SYM = 777, /* MASTER_SSL_CIPHER_SYM */
+ MASTER_SSL_CRL_SYM = 778, /* MASTER_SSL_CRL_SYM */
+ MASTER_SSL_CRLPATH_SYM = 779, /* MASTER_SSL_CRLPATH_SYM */
+ MASTER_SSL_KEY_SYM = 780, /* MASTER_SSL_KEY_SYM */
+ MASTER_SSL_SYM = 781, /* MASTER_SSL_SYM */
+ MASTER_SYM = 782, /* MASTER_SYM */
+ MASTER_USER_SYM = 783, /* MASTER_USER_SYM */
+ MASTER_USE_GTID_SYM = 784, /* MASTER_USE_GTID_SYM */
+ MASTER_HEARTBEAT_PERIOD_SYM = 785, /* MASTER_HEARTBEAT_PERIOD_SYM */
+ MASTER_DEMOTE_TO_SLAVE_SYM = 786, /* MASTER_DEMOTE_TO_SLAVE_SYM */
+ MAX_CONNECTIONS_PER_HOUR = 787, /* MAX_CONNECTIONS_PER_HOUR */
+ MAX_QUERIES_PER_HOUR = 788, /* MAX_QUERIES_PER_HOUR */
+ MAX_ROWS = 789, /* MAX_ROWS */
+ MAX_SIZE_SYM = 790, /* MAX_SIZE_SYM */
+ MAX_UPDATES_PER_HOUR = 791, /* MAX_UPDATES_PER_HOUR */
+ MAX_STATEMENT_TIME_SYM = 792, /* MAX_STATEMENT_TIME_SYM */
+ MAX_USER_CONNECTIONS_SYM = 793, /* MAX_USER_CONNECTIONS_SYM */
+ MEDIUM_SYM = 794, /* MEDIUM_SYM */
+ MEMORY_SYM = 795, /* MEMORY_SYM */
+ MERGE_SYM = 796, /* MERGE_SYM */
+ MESSAGE_TEXT_SYM = 797, /* MESSAGE_TEXT_SYM */
+ MICROSECOND_SYM = 798, /* MICROSECOND_SYM */
+ MIGRATE_SYM = 799, /* MIGRATE_SYM */
+ MINUTE_SYM = 800, /* MINUTE_SYM */
+ MINVALUE_SYM = 801, /* MINVALUE_SYM */
+ MIN_ROWS = 802, /* MIN_ROWS */
+ MODE_SYM = 803, /* MODE_SYM */
+ MODIFY_SYM = 804, /* MODIFY_SYM */
+ MONITOR_SYM = 805, /* MONITOR_SYM */
+ MONTH_SYM = 806, /* MONTH_SYM */
+ MUTEX_SYM = 807, /* MUTEX_SYM */
+ MYSQL_SYM = 808, /* MYSQL_SYM */
+ MYSQL_ERRNO_SYM = 809, /* MYSQL_ERRNO_SYM */
+ NAMES_SYM = 810, /* NAMES_SYM */
+ NAME_SYM = 811, /* NAME_SYM */
+ NATIONAL_SYM = 812, /* NATIONAL_SYM */
+ NCHAR_SYM = 813, /* NCHAR_SYM */
+ NEVER_SYM = 814, /* NEVER_SYM */
+ NEXT_SYM = 815, /* NEXT_SYM */
+ NEXTVAL_SYM = 816, /* NEXTVAL_SYM */
+ NOCACHE_SYM = 817, /* NOCACHE_SYM */
+ NOCYCLE_SYM = 818, /* NOCYCLE_SYM */
+ NODEGROUP_SYM = 819, /* NODEGROUP_SYM */
+ NONE_SYM = 820, /* NONE_SYM */
+ NOTFOUND_SYM = 821, /* NOTFOUND_SYM */
+ NO_SYM = 822, /* NO_SYM */
+ NOMAXVALUE_SYM = 823, /* NOMAXVALUE_SYM */
+ NOMINVALUE_SYM = 824, /* NOMINVALUE_SYM */
+ NO_WAIT_SYM = 825, /* NO_WAIT_SYM */
+ NOWAIT_SYM = 826, /* NOWAIT_SYM */
+ NUMBER_MARIADB_SYM = 827, /* NUMBER_MARIADB_SYM */
+ NUMBER_ORACLE_SYM = 828, /* NUMBER_ORACLE_SYM */
+ NVARCHAR_SYM = 829, /* NVARCHAR_SYM */
+ OF_SYM = 830, /* OF_SYM */
+ OFFSET_SYM = 831, /* OFFSET_SYM */
+ OLD_PASSWORD_SYM = 832, /* OLD_PASSWORD_SYM */
+ ONE_SYM = 833, /* ONE_SYM */
+ ONLY_SYM = 834, /* ONLY_SYM */
+ ONLINE_SYM = 835, /* ONLINE_SYM */
+ OPEN_SYM = 836, /* OPEN_SYM */
+ OPTIONS_SYM = 837, /* OPTIONS_SYM */
+ OPTION = 838, /* OPTION */
+ OVERLAPS_SYM = 839, /* OVERLAPS_SYM */
+ OWNER_SYM = 840, /* OWNER_SYM */
+ PACK_KEYS_SYM = 841, /* PACK_KEYS_SYM */
+ PAGE_SYM = 842, /* PAGE_SYM */
+ PARSER_SYM = 843, /* PARSER_SYM */
+ PARTIAL = 844, /* PARTIAL */
+ PARTITIONS_SYM = 845, /* PARTITIONS_SYM */
+ PARTITIONING_SYM = 846, /* PARTITIONING_SYM */
+ PASSWORD_SYM = 847, /* PASSWORD_SYM */
+ PERIOD_SYM = 848, /* PERIOD_SYM */
+ PERSISTENT_SYM = 849, /* PERSISTENT_SYM */
+ PHASE_SYM = 850, /* PHASE_SYM */
+ PLUGINS_SYM = 851, /* PLUGINS_SYM */
+ PLUGIN_SYM = 852, /* PLUGIN_SYM */
+ PORT_SYM = 853, /* PORT_SYM */
+ PRECEDES_SYM = 854, /* PRECEDES_SYM */
+ PRECEDING_SYM = 855, /* PRECEDING_SYM */
+ PREPARE_SYM = 856, /* PREPARE_SYM */
+ PRESERVE_SYM = 857, /* PRESERVE_SYM */
+ PREV_SYM = 858, /* PREV_SYM */
+ PREVIOUS_SYM = 859, /* PREVIOUS_SYM */
+ PRIVILEGES = 860, /* PRIVILEGES */
+ PROCESS = 861, /* PROCESS */
+ PROCESSLIST_SYM = 862, /* PROCESSLIST_SYM */
+ PROFILE_SYM = 863, /* PROFILE_SYM */
+ PROFILES_SYM = 864, /* PROFILES_SYM */
+ PROXY_SYM = 865, /* PROXY_SYM */
+ QUARTER_SYM = 866, /* QUARTER_SYM */
+ QUERY_SYM = 867, /* QUERY_SYM */
+ QUICK = 868, /* QUICK */
+ RAW_MARIADB_SYM = 869, /* RAW_MARIADB_SYM */
+ RAW_ORACLE_SYM = 870, /* RAW_ORACLE_SYM */
+ READ_ONLY_SYM = 871, /* READ_ONLY_SYM */
+ REBUILD_SYM = 872, /* REBUILD_SYM */
+ RECOVER_SYM = 873, /* RECOVER_SYM */
+ REDOFILE_SYM = 874, /* REDOFILE_SYM */
+ REDO_BUFFER_SIZE_SYM = 875, /* REDO_BUFFER_SIZE_SYM */
+ REDUNDANT_SYM = 876, /* REDUNDANT_SYM */
+ RELAY = 877, /* RELAY */
+ RELAYLOG_SYM = 878, /* RELAYLOG_SYM */
+ RELAY_LOG_FILE_SYM = 879, /* RELAY_LOG_FILE_SYM */
+ RELAY_LOG_POS_SYM = 880, /* RELAY_LOG_POS_SYM */
+ RELAY_THREAD = 881, /* RELAY_THREAD */
+ RELOAD = 882, /* RELOAD */
+ REMOVE_SYM = 883, /* REMOVE_SYM */
+ REORGANIZE_SYM = 884, /* REORGANIZE_SYM */
+ REPAIR = 885, /* REPAIR */
+ REPEATABLE_SYM = 886, /* REPEATABLE_SYM */
+ REPLAY_SYM = 887, /* REPLAY_SYM */
+ REPLICATION = 888, /* REPLICATION */
+ RESET_SYM = 889, /* RESET_SYM */
+ RESTART_SYM = 890, /* RESTART_SYM */
+ RESOURCES = 891, /* RESOURCES */
+ RESTORE_SYM = 892, /* RESTORE_SYM */
+ RESUME_SYM = 893, /* RESUME_SYM */
+ RETURNED_SQLSTATE_SYM = 894, /* RETURNED_SQLSTATE_SYM */
+ RETURNS_SYM = 895, /* RETURNS_SYM */
+ REUSE_SYM = 896, /* REUSE_SYM */
+ REVERSE_SYM = 897, /* REVERSE_SYM */
+ ROLE_SYM = 898, /* ROLE_SYM */
+ ROLLBACK_SYM = 899, /* ROLLBACK_SYM */
+ ROLLUP_SYM = 900, /* ROLLUP_SYM */
+ ROUTINE_SYM = 901, /* ROUTINE_SYM */
+ ROWCOUNT_SYM = 902, /* ROWCOUNT_SYM */
+ ROW_SYM = 903, /* ROW_SYM */
+ ROW_COUNT_SYM = 904, /* ROW_COUNT_SYM */
+ ROW_FORMAT_SYM = 905, /* ROW_FORMAT_SYM */
+ RTREE_SYM = 906, /* RTREE_SYM */
+ SAVEPOINT_SYM = 907, /* SAVEPOINT_SYM */
+ SCHEDULE_SYM = 908, /* SCHEDULE_SYM */
+ SCHEMA_NAME_SYM = 909, /* SCHEMA_NAME_SYM */
+ SECOND_SYM = 910, /* SECOND_SYM */
+ SECURITY_SYM = 911, /* SECURITY_SYM */
+ SEQUENCE_SYM = 912, /* SEQUENCE_SYM */
+ SERIALIZABLE_SYM = 913, /* SERIALIZABLE_SYM */
+ SERIAL_SYM = 914, /* SERIAL_SYM */
+ SESSION_SYM = 915, /* SESSION_SYM */
+ SERVER_SYM = 916, /* SERVER_SYM */
+ SETVAL_SYM = 917, /* SETVAL_SYM */
+ SHARE_SYM = 918, /* SHARE_SYM */
+ SHUTDOWN = 919, /* SHUTDOWN */
+ SIGNED_SYM = 920, /* SIGNED_SYM */
+ SIMPLE_SYM = 921, /* SIMPLE_SYM */
+ SKIP_SYM = 922, /* SKIP_SYM */
+ SLAVE = 923, /* SLAVE */
+ SLAVES = 924, /* SLAVES */
+ SLAVE_POS_SYM = 925, /* SLAVE_POS_SYM */
+ SLOW = 926, /* SLOW */
+ SNAPSHOT_SYM = 927, /* SNAPSHOT_SYM */
+ SOCKET_SYM = 928, /* SOCKET_SYM */
+ SOFT_SYM = 929, /* SOFT_SYM */
+ SONAME_SYM = 930, /* SONAME_SYM */
+ SOUNDS_SYM = 931, /* SOUNDS_SYM */
+ SOURCE_SYM = 932, /* SOURCE_SYM */
+ SQL_BUFFER_RESULT = 933, /* SQL_BUFFER_RESULT */
+ SQL_CACHE_SYM = 934, /* SQL_CACHE_SYM */
+ SQL_CALC_FOUND_ROWS = 935, /* SQL_CALC_FOUND_ROWS */
+ SQL_NO_CACHE_SYM = 936, /* SQL_NO_CACHE_SYM */
+ SQL_THREAD = 937, /* SQL_THREAD */
+ STAGE_SYM = 938, /* STAGE_SYM */
+ STARTS_SYM = 939, /* STARTS_SYM */
+ START_SYM = 940, /* START_SYM */
+ STATEMENT_SYM = 941, /* STATEMENT_SYM */
+ STATUS_SYM = 942, /* STATUS_SYM */
+ STOP_SYM = 943, /* STOP_SYM */
+ STORAGE_SYM = 944, /* STORAGE_SYM */
+ STORED_SYM = 945, /* STORED_SYM */
+ STRING_SYM = 946, /* STRING_SYM */
+ SUBCLASS_ORIGIN_SYM = 947, /* SUBCLASS_ORIGIN_SYM */
+ SUBDATE_SYM = 948, /* SUBDATE_SYM */
+ SUBJECT_SYM = 949, /* SUBJECT_SYM */
+ SUBPARTITIONS_SYM = 950, /* SUBPARTITIONS_SYM */
+ SUBPARTITION_SYM = 951, /* SUBPARTITION_SYM */
+ SUPER_SYM = 952, /* SUPER_SYM */
+ SUSPEND_SYM = 953, /* SUSPEND_SYM */
+ SWAPS_SYM = 954, /* SWAPS_SYM */
+ SWITCHES_SYM = 955, /* SWITCHES_SYM */
+ SYSTEM = 956, /* SYSTEM */
+ SYSTEM_TIME_SYM = 957, /* SYSTEM_TIME_SYM */
+ TABLES = 958, /* TABLES */
+ TABLESPACE = 959, /* TABLESPACE */
+ TABLE_CHECKSUM_SYM = 960, /* TABLE_CHECKSUM_SYM */
+ TABLE_NAME_SYM = 961, /* TABLE_NAME_SYM */
+ TEMPORARY = 962, /* TEMPORARY */
+ TEMPTABLE_SYM = 963, /* TEMPTABLE_SYM */
+ TEXT_SYM = 964, /* TEXT_SYM */
+ THAN_SYM = 965, /* THAN_SYM */
+ TIES_SYM = 966, /* TIES_SYM */
+ TIMESTAMP = 967, /* TIMESTAMP */
+ TIMESTAMP_ADD = 968, /* TIMESTAMP_ADD */
+ TIMESTAMP_DIFF = 969, /* TIMESTAMP_DIFF */
+ TIME_SYM = 970, /* TIME_SYM */
+ TRANSACTION_SYM = 971, /* TRANSACTION_SYM */
+ TRANSACTIONAL_SYM = 972, /* TRANSACTIONAL_SYM */
+ THREADS_SYM = 973, /* THREADS_SYM */
+ TRIGGERS_SYM = 974, /* TRIGGERS_SYM */
+ TRIM_ORACLE = 975, /* TRIM_ORACLE */
+ TRUNCATE_SYM = 976, /* TRUNCATE_SYM */
+ TYPE_SYM = 977, /* TYPE_SYM */
+ UDF_RETURNS_SYM = 978, /* UDF_RETURNS_SYM */
+ UNBOUNDED_SYM = 979, /* UNBOUNDED_SYM */
+ UNCOMMITTED_SYM = 980, /* UNCOMMITTED_SYM */
+ UNDEFINED_SYM = 981, /* UNDEFINED_SYM */
+ UNDOFILE_SYM = 982, /* UNDOFILE_SYM */
+ UNDO_BUFFER_SIZE_SYM = 983, /* UNDO_BUFFER_SIZE_SYM */
+ UNICODE_SYM = 984, /* UNICODE_SYM */
+ UNINSTALL_SYM = 985, /* UNINSTALL_SYM */
+ UNKNOWN_SYM = 986, /* UNKNOWN_SYM */
+ UNTIL_SYM = 987, /* UNTIL_SYM */
+ UPGRADE_SYM = 988, /* UPGRADE_SYM */
+ USER_SYM = 989, /* USER_SYM */
+ USE_FRM = 990, /* USE_FRM */
+ VALUE_SYM = 991, /* VALUE_SYM */
+ VARCHAR2_MARIADB_SYM = 992, /* VARCHAR2_MARIADB_SYM */
+ VARCHAR2_ORACLE_SYM = 993, /* VARCHAR2_ORACLE_SYM */
+ VARIABLES = 994, /* VARIABLES */
+ VERSIONING_SYM = 995, /* VERSIONING_SYM */
+ VIA_SYM = 996, /* VIA_SYM */
+ VIEW_SYM = 997, /* VIEW_SYM */
+ VISIBLE_SYM = 998, /* VISIBLE_SYM */
+ VIRTUAL_SYM = 999, /* VIRTUAL_SYM */
+ WAIT_SYM = 1000, /* WAIT_SYM */
+ WARNINGS = 1001, /* WARNINGS */
+ WEEK_SYM = 1002, /* WEEK_SYM */
+ WEIGHT_STRING_SYM = 1003, /* WEIGHT_STRING_SYM */
+ WINDOW_SYM = 1004, /* WINDOW_SYM */
+ WITHIN = 1005, /* WITHIN */
+ WITHOUT = 1006, /* WITHOUT */
+ WORK_SYM = 1007, /* WORK_SYM */
+ WRAPPER_SYM = 1008, /* WRAPPER_SYM */
+ WRITE_SYM = 1009, /* WRITE_SYM */
+ X509_SYM = 1010, /* X509_SYM */
+ XA_SYM = 1011, /* XA_SYM */
+ XML_SYM = 1012, /* XML_SYM */
+ YEAR_SYM = 1013, /* YEAR_SYM */
+ CONDITIONLESS_JOIN = 1014, /* CONDITIONLESS_JOIN */
+ ON_SYM = 1015, /* ON_SYM */
+ PREC_BELOW_NOT = 1016, /* PREC_BELOW_NOT */
+ SUBQUERY_AS_EXPR = 1017, /* SUBQUERY_AS_EXPR */
+ PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE = 1018, /* PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE */
+ USER = 1019, /* USER */
+ PREC_BELOW_CONTRACTION_TOKEN2 = 1020, /* PREC_BELOW_CONTRACTION_TOKEN2 */
+ EMPTY_FROM_CLAUSE = 1021 /* EMPTY_FROM_CLAUSE */
+ };
+ typedef enum yytokentype yytoken_kind_t;
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+union YYSTYPE
+{
+#line 192 "/home/buildbot/git/sql/sql_yacc.yy"
+
+ int num;
+ ulong ulong_num;
+ ulonglong ulonglong_number;
+ longlong longlong_number;
+ uint sp_instr_addr;
+
+ /* structs */
+ LEX_CSTRING lex_str;
+ Lex_ident_cli_st kwd;
+ Lex_ident_cli_st ident_cli;
+ Lex_ident_sys_st ident_sys;
+ Lex_column_list_privilege_st column_list_privilege;
+ Lex_string_with_metadata_st lex_string_with_metadata;
+ Lex_spblock_st spblock;
+ Lex_spblock_handlers_st spblock_handlers;
+ Lex_length_and_dec_st Lex_length_and_dec;
+ Lex_cast_type_st Lex_cast_type;
+ Lex_field_type_st Lex_field_type;
+ Lex_exact_charset_extended_collation_attrs_st
+ Lex_exact_charset_extended_collation_attrs;
+ Lex_extended_collation_st Lex_extended_collation;
+ Lex_dyncol_type_st Lex_dyncol_type;
+ Lex_for_loop_st for_loop;
+ Lex_for_loop_bounds_st for_loop_bounds;
+ Lex_trim_st trim;
+ Json_table_column::On_response json_on_response;
+ Lex_substring_spec_st substring_spec;
+ 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 */
+ Lex_ident_sys *ident_sys_ptr;
+ Create_field *create_field;
+ Spvar_definition *spvar_definition;
+ Row_definition_list *spvar_definition_list;
+ const Type_handler *type_handler;
+ const class Sp_handler *sp_handler;
+ CHARSET_INFO *charset;
+ Condition_information_item *cond_info_item;
+ DYNCALL_CREATE_DEF *dyncol_def;
+ Diagnostics_information *diag_info;
+ Item *item;
+ Item_num *item_num;
+ Item_param *item_param;
+ Item_basic_constant *item_basic_constant;
+ Key_part_spec *key_part;
+ LEX *lex;
+ sp_expr_lex *expr_lex;
+ sp_assignment_lex *assignment_lex;
+ 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;
+ List<sp_assignment_lex> *sp_assignment_lex_list;
+ List<Statement_information_item> *stmt_info_list;
+ List<String> *string_list;
+ List<Lex_ident_sys> *ident_sys_list;
+ Statement_information_item *stmt_info_item;
+ String *string;
+ TABLE_LIST *table_list;
+ Table_ident *table;
+ Qualified_column_ident *qualified_column_ident;
+ char *simple_string;
+ const char *const_simple_string;
+ chooser_compare_func_creator boolfunc2creator;
+ class Lex_grant_privilege *lex_grant;
+ class Lex_grant_object_name *lex_grant_ident;
+ class my_var *myvar;
+ class sp_condition_value *spcondvalue;
+ class sp_head *sphead;
+ class sp_name *spname;
+ class sp_variable *spvar;
+ class With_element_head *with_element_head;
+ class With_clause *with_clause;
+ class Virtual_column_info *virtual_column;
+ engine_option_value *engine_option_value_ptr;
+
+ 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;
+ udf_func *udf;
+ 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 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;
+ enum enum_fk_option m_fk_option;
+ enum Item_udftype udf_type;
+ enum Key::Keytype key_type;
+ enum Statement_information_item::Name stmt_info_item_name;
+ enum enum_filetype filetype;
+ enum enum_tx_isolation tx_isolation;
+ enum enum_var_type var_type;
+ enum enum_yes_no_unknown m_yes_no_unk;
+ enum ha_choice choice;
+ enum ha_key_alg key_alg;
+ enum ha_rkey_function ha_rkey_mode;
+ enum index_hint_type index_hint;
+ enum interval_type interval, interval_time_st;
+ enum row_type row_type;
+ enum sp_variable::enum_mode spvar_mode;
+ enum thr_lock_type lock_type;
+ enum enum_mysql_timestamp_type date_time_type;
+ enum Window_frame_bound::Bound_precedence_type bound_precedence_type;
+ enum Window_frame::Frame_units frame_units;
+ enum Window_frame::Frame_exclusion frame_exclusion;
+ enum trigger_order_type trigger_action_order_type;
+ DDL_options_st object_ddl_options;
+ enum vers_kind_t vers_range_unit;
+ enum Column_definition::enum_column_versioning vers_column_versioning;
+ enum plsql_cursor_attr_t plsql_cursor_attr;
+ privilege_t privilege;
+
+#line 968 "/home/buildbot/git/mkdist/sql/yy_mariadb.hh"
+
+};
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+
+int MYSQLparse (THD *thd);
+
+
+#endif /* !YY_MYSQL_HOME_BUILDBOT_GIT_MKDIST_SQL_YY_MARIADB_HH_INCLUDED */
diff --git a/sql/yy_oracle.cc b/sql/yy_oracle.cc
new file mode 100644
index 00000000..a9d8cddd
--- /dev/null
+++ b/sql/yy_oracle.cc
@@ -0,0 +1,52289 @@
+/* A Bison parser, made by GNU Bison 3.8.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
+ Inc.
+
+ This program is free 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 3 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, see <https://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output, and Bison version. */
+#define YYBISON 30802
+
+/* Bison version string. */
+#define YYBISON_VERSION "3.8.2"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "/home/buildbot/git/mkdist/sql/myskel.m4"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+
+/* Substitute the variable and function names. */
+#define yyparse ORAparse
+#define yylex ORAlex
+#define yyerror ORAerror
+#define yydebug ORAdebug
+#define yynerrs ORAnerrs
+
+/* First part of user prologue. */
+#line 25 "/home/buildbot/git/sql/sql_yacc.yy"
+
+#define YYLIP (& thd->m_parser_state->m_lip)
+#define YYPS (& thd->m_parser_state->m_yacc)
+#define YYCSCL (thd->variables.character_set_client)
+
+#define MYSQL_YACC
+#define YYINITDEPTH 100
+#define YYMAXDEPTH 3200 /* Because of 64K stack */
+#define Lex (thd->lex)
+
+#define Select Lex->current_select
+#include "mariadb.h"
+#include "sql_priv.h"
+#include "sql_parse.h" /* comp_*_creator */
+#include "sql_table.h" /* primary_key_name */
+#include "sql_partition.h" /* partition_info, HASH_PARTITION */
+#include "sql_class.h" /* Key_part_spec, enum_filetype, Diag_condition_item_name */
+#include "slave.h"
+#include "lex_symbol.h"
+#include "item_create.h"
+#include "sp_head.h"
+#include "sp_rcontext.h"
+#include "sp.h"
+#include "sql_show.h"
+#include "sql_alter.h" // Sql_cmd_alter_table*
+#include "sql_truncate.h" // Sql_cmd_truncate_table
+#include "sql_admin.h" // Sql_cmd_analyze/Check..._table
+#include "sql_partition_admin.h" // Sql_cmd_alter_table_*_part.
+#include "sql_handler.h" // Sql_cmd_handler_*
+#include "sql_signal.h"
+#include "sql_get_diagnostics.h" // Sql_cmd_get_diagnostics
+#include "sql_cte.h"
+#include "sql_window.h"
+#include "item_windowfunc.h"
+#include "event_parse_data.h"
+#include "create_options.h"
+#include <myisam.h>
+#include <myisammrg.h>
+#include "keycaches.h"
+#include "set_var.h"
+#include "rpl_mi.h"
+#include "lex_token.h"
+#include "sql_lex.h"
+#include "sql_sequence.h"
+#include "my_base.h"
+#include "sql_type_json.h"
+#include "json_table.h"
+
+/* this is to get the bison compilation windows warnings out */
+#ifdef _MSC_VER
+/* warning C4065: switch statement contains 'default' but no 'case' labels */
+/* warning C4102: 'yyexhaustedlab': unreferenced label */
+#pragma warning (disable : 4065 4102)
+#endif
+#if defined (__GNUC__) || defined (__clang__)
+#pragma GCC diagnostic ignored "-Wunused-label" /* yyexhaustedlab: */
+#endif
+
+/* Stack size 28200 with clang for MYSQLparse() and ORAparse() */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
+int yylex(void *yylval, void *yythd);
+
+#define yyoverflow(A,B,C,D,E,F) \
+ { \
+ size_t val= *(F); \
+ if (unlikely(my_yyoverflow((B), (D), &val))) \
+ { \
+ yyerror(thd, (char*) (A)); \
+ return 2; \
+ } \
+ else \
+ { \
+ *(F)= (YYSIZE_T)val; \
+ } \
+ }
+
+#define MYSQL_YYABORT \
+ do \
+ { \
+ YYABORT; \
+ } while (0)
+
+#define MYSQL_YYABORT_UNLESS(A) \
+ if (unlikely(!(A))) \
+ { \
+ thd->parse_error(); \
+ MYSQL_YYABORT; \
+ }
+
+#define my_yyabort_error(A) \
+ do { my_error A; MYSQL_YYABORT; } while(0)
+
+#ifndef DBUG_OFF
+#define YYDEBUG 1
+#else
+#define YYDEBUG 0
+#endif
+
+
+static Item* escape(THD *thd)
+{
+ thd->lex->escape_used= false;
+ const char *esc= thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES ? "" : "\\";
+ return new (thd->mem_root) Item_string_ascii(thd, esc, MY_TEST(esc[0]));
+}
+
+
+/**
+ @brief Bison callback to report a syntax/OOM error
+
+ This function is invoked by the bison-generated parser
+ when a syntax error, a parse error or an out-of-memory
+ condition occurs. This function is not invoked when the
+ parser is requested to abort by semantic action code
+ by means of YYABORT or YYACCEPT macros. This is why these
+ macros should not be used (use MYSQL_YYABORT/MYSQL_YYACCEPT
+ instead).
+
+ The parser will abort immediately after invoking this callback.
+
+ This function is not for use in semantic actions and is internal to
+ the parser, as it performs some pre-return cleanup.
+ In semantic actions, please use thd->parse_error() or my_error to
+ push an error into the error stack and MYSQL_YYABORT
+ to abort from the parser.
+*/
+
+static void yyerror(THD *thd, const char *s)
+{
+ /* "parse error" changed into "syntax error" between bison 1.75 and 1.875 */
+ if (strcmp(s,"parse error") == 0 || strcmp(s,"syntax error") == 0)
+ s= ER_THD(thd, ER_SYNTAX_ERROR);
+ thd->parse_error(s, 0);
+}
+
+
+#ifndef DBUG_OFF
+#define __CONCAT_UNDERSCORED(x,y) x ## _ ## y
+#define _CONCAT_UNDERSCORED(x,y) __CONCAT_UNDERSCORED(x,y)
+void _CONCAT_UNDERSCORED(turn_parser_debug_on,yyparse)()
+{
+ /*
+ MYSQLdebug is in sql/yy_*.cc, in bison generated code.
+ Turning this option on is **VERY** verbose, and should be
+ used when investigating a syntax error problem only.
+
+ The syntax to run with bison traces is as follows :
+ - Starting a server manually :
+ mysqld --debug-dbug="d,parser_debug" ...
+ - Running a test :
+ mysql-test-run.pl --mysqld="--debug-dbug=d,parser_debug" ...
+
+ The result will be in the process stderr (var/log/master.err)
+ */
+
+#ifndef _AIX
+ extern int yydebug;
+#else
+ static int yydebug;
+#endif
+ yydebug= 1;
+}
+#endif
+
+
+
+#line 244 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+
+# ifndef YY_CAST
+# ifdef __cplusplus
+# define YY_CAST(Type, Val) static_cast<Type> (Val)
+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
+# else
+# define YY_CAST(Type, Val) ((Type) (Val))
+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# endif
+# endif
+# ifndef YY_NULLPTR
+# if defined __cplusplus
+# if 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
+# else
+# define YY_NULLPTR 0
+# endif
+# else
+# define YY_NULLPTR ((void*)0)
+# endif
+# endif
+
+#include "yy_oracle.hh"
+/* Symbol kind. */
+enum yysymbol_kind_t
+{
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_3_ = 3, /* '@' */
+ YYSYMBOL_ABORT_SYM = 4, /* ABORT_SYM */
+ YYSYMBOL_IMPOSSIBLE_ACTION = 5, /* IMPOSSIBLE_ACTION */
+ YYSYMBOL_FORCE_LOOKAHEAD = 6, /* FORCE_LOOKAHEAD */
+ YYSYMBOL_END_OF_INPUT = 7, /* END_OF_INPUT */
+ YYSYMBOL_COLON_ORACLE_SYM = 8, /* COLON_ORACLE_SYM */
+ YYSYMBOL_PARAM_MARKER = 9, /* PARAM_MARKER */
+ YYSYMBOL_FOR_SYSTEM_TIME_SYM = 10, /* FOR_SYSTEM_TIME_SYM */
+ YYSYMBOL_LEFT_PAREN_ALT = 11, /* LEFT_PAREN_ALT */
+ YYSYMBOL_LEFT_PAREN_WITH = 12, /* LEFT_PAREN_WITH */
+ YYSYMBOL_LEFT_PAREN_LIKE = 13, /* LEFT_PAREN_LIKE */
+ YYSYMBOL_ORACLE_CONCAT_SYM = 14, /* ORACLE_CONCAT_SYM */
+ YYSYMBOL_PERCENT_ORACLE_SYM = 15, /* PERCENT_ORACLE_SYM */
+ YYSYMBOL_WITH_CUBE_SYM = 16, /* WITH_CUBE_SYM */
+ YYSYMBOL_WITH_ROLLUP_SYM = 17, /* WITH_ROLLUP_SYM */
+ YYSYMBOL_WITH_SYSTEM_SYM = 18, /* WITH_SYSTEM_SYM */
+ YYSYMBOL_IDENT = 19, /* IDENT */
+ YYSYMBOL_IDENT_QUOTED = 20, /* IDENT_QUOTED */
+ YYSYMBOL_LEX_HOSTNAME = 21, /* LEX_HOSTNAME */
+ YYSYMBOL_UNDERSCORE_CHARSET = 22, /* UNDERSCORE_CHARSET */
+ YYSYMBOL_BIN_NUM = 23, /* BIN_NUM */
+ YYSYMBOL_DECIMAL_NUM = 24, /* DECIMAL_NUM */
+ YYSYMBOL_FLOAT_NUM = 25, /* FLOAT_NUM */
+ YYSYMBOL_HEX_NUM = 26, /* HEX_NUM */
+ YYSYMBOL_HEX_STRING = 27, /* HEX_STRING */
+ YYSYMBOL_LONG_NUM = 28, /* LONG_NUM */
+ YYSYMBOL_NCHAR_STRING = 29, /* NCHAR_STRING */
+ YYSYMBOL_NUM = 30, /* NUM */
+ YYSYMBOL_TEXT_STRING = 31, /* TEXT_STRING */
+ YYSYMBOL_ULONGLONG_NUM = 32, /* ULONGLONG_NUM */
+ YYSYMBOL_AND_AND_SYM = 33, /* AND_AND_SYM */
+ YYSYMBOL_DOT_DOT_SYM = 34, /* DOT_DOT_SYM */
+ YYSYMBOL_EQUAL_SYM = 35, /* EQUAL_SYM */
+ YYSYMBOL_GE = 36, /* GE */
+ YYSYMBOL_LE = 37, /* LE */
+ YYSYMBOL_MYSQL_CONCAT_SYM = 38, /* MYSQL_CONCAT_SYM */
+ YYSYMBOL_NE = 39, /* NE */
+ YYSYMBOL_NOT2_SYM = 40, /* NOT2_SYM */
+ YYSYMBOL_OR2_SYM = 41, /* OR2_SYM */
+ YYSYMBOL_SET_VAR = 42, /* SET_VAR */
+ YYSYMBOL_SHIFT_LEFT = 43, /* SHIFT_LEFT */
+ YYSYMBOL_SHIFT_RIGHT = 44, /* SHIFT_RIGHT */
+ YYSYMBOL_ACCESSIBLE_SYM = 45, /* ACCESSIBLE_SYM */
+ YYSYMBOL_ADD = 46, /* ADD */
+ YYSYMBOL_ALL = 47, /* ALL */
+ YYSYMBOL_ALTER = 48, /* ALTER */
+ YYSYMBOL_ANALYZE_SYM = 49, /* ANALYZE_SYM */
+ YYSYMBOL_AND_SYM = 50, /* AND_SYM */
+ YYSYMBOL_ASC = 51, /* ASC */
+ YYSYMBOL_ASENSITIVE_SYM = 52, /* ASENSITIVE_SYM */
+ YYSYMBOL_AS = 53, /* AS */
+ YYSYMBOL_BEFORE_SYM = 54, /* BEFORE_SYM */
+ YYSYMBOL_BETWEEN_SYM = 55, /* BETWEEN_SYM */
+ YYSYMBOL_BIGINT = 56, /* BIGINT */
+ YYSYMBOL_BINARY = 57, /* BINARY */
+ YYSYMBOL_BIT_AND = 58, /* BIT_AND */
+ YYSYMBOL_BIT_OR = 59, /* BIT_OR */
+ YYSYMBOL_BIT_XOR = 60, /* BIT_XOR */
+ YYSYMBOL_BLOB_MARIADB_SYM = 61, /* BLOB_MARIADB_SYM */
+ YYSYMBOL_BLOB_ORACLE_SYM = 62, /* BLOB_ORACLE_SYM */
+ YYSYMBOL_BODY_ORACLE_SYM = 63, /* BODY_ORACLE_SYM */
+ YYSYMBOL_BOTH = 64, /* BOTH */
+ YYSYMBOL_BY = 65, /* BY */
+ YYSYMBOL_CALL_SYM = 66, /* CALL_SYM */
+ YYSYMBOL_CASCADE = 67, /* CASCADE */
+ YYSYMBOL_CASE_SYM = 68, /* CASE_SYM */
+ YYSYMBOL_CAST_SYM = 69, /* CAST_SYM */
+ YYSYMBOL_CHANGE = 70, /* CHANGE */
+ YYSYMBOL_CHAR_SYM = 71, /* CHAR_SYM */
+ YYSYMBOL_CHECK_SYM = 72, /* CHECK_SYM */
+ YYSYMBOL_COLLATE_SYM = 73, /* COLLATE_SYM */
+ YYSYMBOL_CONDITION_SYM = 74, /* CONDITION_SYM */
+ YYSYMBOL_CONSTRAINT = 75, /* CONSTRAINT */
+ YYSYMBOL_CONTINUE_MARIADB_SYM = 76, /* CONTINUE_MARIADB_SYM */
+ YYSYMBOL_CONTINUE_ORACLE_SYM = 77, /* CONTINUE_ORACLE_SYM */
+ YYSYMBOL_CONVERT_SYM = 78, /* CONVERT_SYM */
+ YYSYMBOL_COUNT_SYM = 79, /* COUNT_SYM */
+ YYSYMBOL_CREATE = 80, /* CREATE */
+ YYSYMBOL_CROSS = 81, /* CROSS */
+ YYSYMBOL_CUME_DIST_SYM = 82, /* CUME_DIST_SYM */
+ YYSYMBOL_CURDATE = 83, /* CURDATE */
+ YYSYMBOL_CURRENT_ROLE = 84, /* CURRENT_ROLE */
+ YYSYMBOL_CURRENT_USER = 85, /* CURRENT_USER */
+ YYSYMBOL_CURSOR_SYM = 86, /* CURSOR_SYM */
+ YYSYMBOL_CURTIME = 87, /* CURTIME */
+ YYSYMBOL_DATABASE = 88, /* DATABASE */
+ YYSYMBOL_DATABASES = 89, /* DATABASES */
+ YYSYMBOL_DATE_ADD_INTERVAL = 90, /* DATE_ADD_INTERVAL */
+ YYSYMBOL_DATE_SUB_INTERVAL = 91, /* DATE_SUB_INTERVAL */
+ YYSYMBOL_DAY_HOUR_SYM = 92, /* DAY_HOUR_SYM */
+ YYSYMBOL_DAY_MICROSECOND_SYM = 93, /* DAY_MICROSECOND_SYM */
+ YYSYMBOL_DAY_MINUTE_SYM = 94, /* DAY_MINUTE_SYM */
+ YYSYMBOL_DAY_SECOND_SYM = 95, /* DAY_SECOND_SYM */
+ YYSYMBOL_DECIMAL_SYM = 96, /* DECIMAL_SYM */
+ YYSYMBOL_DECLARE_MARIADB_SYM = 97, /* DECLARE_MARIADB_SYM */
+ YYSYMBOL_DECLARE_ORACLE_SYM = 98, /* DECLARE_ORACLE_SYM */
+ YYSYMBOL_DEFAULT = 99, /* DEFAULT */
+ YYSYMBOL_DELETE_DOMAIN_ID_SYM = 100, /* DELETE_DOMAIN_ID_SYM */
+ YYSYMBOL_DELETE_SYM = 101, /* DELETE_SYM */
+ YYSYMBOL_DENSE_RANK_SYM = 102, /* DENSE_RANK_SYM */
+ YYSYMBOL_DESCRIBE = 103, /* DESCRIBE */
+ YYSYMBOL_DESC = 104, /* DESC */
+ YYSYMBOL_DETERMINISTIC_SYM = 105, /* DETERMINISTIC_SYM */
+ YYSYMBOL_DISTINCT = 106, /* DISTINCT */
+ YYSYMBOL_DIV_SYM = 107, /* DIV_SYM */
+ YYSYMBOL_DO_DOMAIN_IDS_SYM = 108, /* DO_DOMAIN_IDS_SYM */
+ YYSYMBOL_DOUBLE_SYM = 109, /* DOUBLE_SYM */
+ YYSYMBOL_DROP = 110, /* DROP */
+ YYSYMBOL_DUAL_SYM = 111, /* DUAL_SYM */
+ YYSYMBOL_EACH_SYM = 112, /* EACH_SYM */
+ YYSYMBOL_ELSEIF_MARIADB_SYM = 113, /* ELSEIF_MARIADB_SYM */
+ YYSYMBOL_ELSE = 114, /* ELSE */
+ YYSYMBOL_ELSIF_ORACLE_SYM = 115, /* ELSIF_ORACLE_SYM */
+ YYSYMBOL_EMPTY_SYM = 116, /* EMPTY_SYM */
+ YYSYMBOL_ENCLOSED = 117, /* ENCLOSED */
+ YYSYMBOL_ESCAPED = 118, /* ESCAPED */
+ YYSYMBOL_EXCEPT_SYM = 119, /* EXCEPT_SYM */
+ YYSYMBOL_EXISTS = 120, /* EXISTS */
+ YYSYMBOL_EXTRACT_SYM = 121, /* EXTRACT_SYM */
+ YYSYMBOL_FALSE_SYM = 122, /* FALSE_SYM */
+ YYSYMBOL_FETCH_SYM = 123, /* FETCH_SYM */
+ YYSYMBOL_FIRST_VALUE_SYM = 124, /* FIRST_VALUE_SYM */
+ YYSYMBOL_FLOAT_SYM = 125, /* FLOAT_SYM */
+ YYSYMBOL_FOREIGN = 126, /* FOREIGN */
+ YYSYMBOL_FOR_SYM = 127, /* FOR_SYM */
+ YYSYMBOL_FROM = 128, /* FROM */
+ YYSYMBOL_FULLTEXT_SYM = 129, /* FULLTEXT_SYM */
+ YYSYMBOL_GOTO_ORACLE_SYM = 130, /* GOTO_ORACLE_SYM */
+ YYSYMBOL_GRANT = 131, /* GRANT */
+ YYSYMBOL_GROUP_CONCAT_SYM = 132, /* GROUP_CONCAT_SYM */
+ YYSYMBOL_JSON_ARRAYAGG_SYM = 133, /* JSON_ARRAYAGG_SYM */
+ YYSYMBOL_JSON_OBJECTAGG_SYM = 134, /* JSON_OBJECTAGG_SYM */
+ YYSYMBOL_JSON_TABLE_SYM = 135, /* JSON_TABLE_SYM */
+ YYSYMBOL_GROUP_SYM = 136, /* GROUP_SYM */
+ YYSYMBOL_HAVING = 137, /* HAVING */
+ YYSYMBOL_HOUR_MICROSECOND_SYM = 138, /* HOUR_MICROSECOND_SYM */
+ YYSYMBOL_HOUR_MINUTE_SYM = 139, /* HOUR_MINUTE_SYM */
+ YYSYMBOL_HOUR_SECOND_SYM = 140, /* HOUR_SECOND_SYM */
+ YYSYMBOL_IF_SYM = 141, /* IF_SYM */
+ YYSYMBOL_IGNORE_DOMAIN_IDS_SYM = 142, /* IGNORE_DOMAIN_IDS_SYM */
+ YYSYMBOL_IGNORE_SYM = 143, /* IGNORE_SYM */
+ YYSYMBOL_IGNORED_SYM = 144, /* IGNORED_SYM */
+ YYSYMBOL_INDEX_SYM = 145, /* INDEX_SYM */
+ YYSYMBOL_INFILE = 146, /* INFILE */
+ YYSYMBOL_INNER_SYM = 147, /* INNER_SYM */
+ YYSYMBOL_INOUT_SYM = 148, /* INOUT_SYM */
+ YYSYMBOL_INSENSITIVE_SYM = 149, /* INSENSITIVE_SYM */
+ YYSYMBOL_INSERT = 150, /* INSERT */
+ YYSYMBOL_IN_SYM = 151, /* IN_SYM */
+ YYSYMBOL_INTERSECT_SYM = 152, /* INTERSECT_SYM */
+ YYSYMBOL_INTERVAL_SYM = 153, /* INTERVAL_SYM */
+ YYSYMBOL_INTO = 154, /* INTO */
+ YYSYMBOL_INT_SYM = 155, /* INT_SYM */
+ YYSYMBOL_IS = 156, /* IS */
+ YYSYMBOL_ITERATE_SYM = 157, /* ITERATE_SYM */
+ YYSYMBOL_JOIN_SYM = 158, /* JOIN_SYM */
+ YYSYMBOL_KEYS = 159, /* KEYS */
+ YYSYMBOL_KEY_SYM = 160, /* KEY_SYM */
+ YYSYMBOL_KILL_SYM = 161, /* KILL_SYM */
+ YYSYMBOL_LAG_SYM = 162, /* LAG_SYM */
+ YYSYMBOL_LEADING = 163, /* LEADING */
+ YYSYMBOL_LEAD_SYM = 164, /* LEAD_SYM */
+ YYSYMBOL_LEAVE_SYM = 165, /* LEAVE_SYM */
+ YYSYMBOL_LEFT = 166, /* LEFT */
+ YYSYMBOL_LIKE = 167, /* LIKE */
+ YYSYMBOL_LIMIT = 168, /* LIMIT */
+ YYSYMBOL_LINEAR_SYM = 169, /* LINEAR_SYM */
+ YYSYMBOL_LINES = 170, /* LINES */
+ YYSYMBOL_LOAD = 171, /* LOAD */
+ YYSYMBOL_LOCATOR_SYM = 172, /* LOCATOR_SYM */
+ YYSYMBOL_LOCK_SYM = 173, /* LOCK_SYM */
+ YYSYMBOL_LONGBLOB = 174, /* LONGBLOB */
+ YYSYMBOL_LONG_SYM = 175, /* LONG_SYM */
+ YYSYMBOL_LONGTEXT = 176, /* LONGTEXT */
+ YYSYMBOL_LOOP_SYM = 177, /* LOOP_SYM */
+ YYSYMBOL_LOW_PRIORITY = 178, /* LOW_PRIORITY */
+ YYSYMBOL_MASTER_SSL_VERIFY_SERVER_CERT_SYM = 179, /* MASTER_SSL_VERIFY_SERVER_CERT_SYM */
+ YYSYMBOL_MATCH = 180, /* MATCH */
+ YYSYMBOL_MAX_SYM = 181, /* MAX_SYM */
+ YYSYMBOL_MAXVALUE_SYM = 182, /* MAXVALUE_SYM */
+ YYSYMBOL_MEDIAN_SYM = 183, /* MEDIAN_SYM */
+ YYSYMBOL_MEDIUMBLOB = 184, /* MEDIUMBLOB */
+ YYSYMBOL_MEDIUMINT = 185, /* MEDIUMINT */
+ YYSYMBOL_MEDIUMTEXT = 186, /* MEDIUMTEXT */
+ YYSYMBOL_MIN_SYM = 187, /* MIN_SYM */
+ YYSYMBOL_MINUS_ORACLE_SYM = 188, /* MINUS_ORACLE_SYM */
+ YYSYMBOL_MINUTE_MICROSECOND_SYM = 189, /* MINUTE_MICROSECOND_SYM */
+ YYSYMBOL_MINUTE_SECOND_SYM = 190, /* MINUTE_SECOND_SYM */
+ YYSYMBOL_MODIFIES_SYM = 191, /* MODIFIES_SYM */
+ YYSYMBOL_MOD_SYM = 192, /* MOD_SYM */
+ YYSYMBOL_NATURAL = 193, /* NATURAL */
+ YYSYMBOL_NEG = 194, /* NEG */
+ YYSYMBOL_NESTED_SYM = 195, /* NESTED_SYM */
+ YYSYMBOL_NOT_SYM = 196, /* NOT_SYM */
+ YYSYMBOL_NO_WRITE_TO_BINLOG = 197, /* NO_WRITE_TO_BINLOG */
+ YYSYMBOL_NOW_SYM = 198, /* NOW_SYM */
+ YYSYMBOL_NTH_VALUE_SYM = 199, /* NTH_VALUE_SYM */
+ YYSYMBOL_NTILE_SYM = 200, /* NTILE_SYM */
+ YYSYMBOL_NULL_SYM = 201, /* NULL_SYM */
+ YYSYMBOL_NUMERIC_SYM = 202, /* NUMERIC_SYM */
+ YYSYMBOL_ON = 203, /* ON */
+ YYSYMBOL_OPTIMIZE = 204, /* OPTIMIZE */
+ YYSYMBOL_OPTIONALLY = 205, /* OPTIONALLY */
+ YYSYMBOL_ORDER_SYM = 206, /* ORDER_SYM */
+ YYSYMBOL_ORDINALITY_SYM = 207, /* ORDINALITY_SYM */
+ YYSYMBOL_OR_SYM = 208, /* OR_SYM */
+ YYSYMBOL_OTHERS_ORACLE_SYM = 209, /* OTHERS_ORACLE_SYM */
+ YYSYMBOL_OUTER = 210, /* OUTER */
+ YYSYMBOL_OUTFILE = 211, /* OUTFILE */
+ YYSYMBOL_OUT_SYM = 212, /* OUT_SYM */
+ YYSYMBOL_OVER_SYM = 213, /* OVER_SYM */
+ YYSYMBOL_PACKAGE_ORACLE_SYM = 214, /* PACKAGE_ORACLE_SYM */
+ YYSYMBOL_PAGE_CHECKSUM_SYM = 215, /* PAGE_CHECKSUM_SYM */
+ YYSYMBOL_PARSE_VCOL_EXPR_SYM = 216, /* PARSE_VCOL_EXPR_SYM */
+ YYSYMBOL_PARTITION_SYM = 217, /* PARTITION_SYM */
+ YYSYMBOL_PATH_SYM = 218, /* PATH_SYM */
+ YYSYMBOL_PERCENTILE_CONT_SYM = 219, /* PERCENTILE_CONT_SYM */
+ YYSYMBOL_PERCENTILE_DISC_SYM = 220, /* PERCENTILE_DISC_SYM */
+ YYSYMBOL_PERCENT_RANK_SYM = 221, /* PERCENT_RANK_SYM */
+ YYSYMBOL_PORTION_SYM = 222, /* PORTION_SYM */
+ YYSYMBOL_POSITION_SYM = 223, /* POSITION_SYM */
+ YYSYMBOL_PRECISION = 224, /* PRECISION */
+ YYSYMBOL_PRIMARY_SYM = 225, /* PRIMARY_SYM */
+ YYSYMBOL_PROCEDURE_SYM = 226, /* PROCEDURE_SYM */
+ YYSYMBOL_PURGE = 227, /* PURGE */
+ YYSYMBOL_RAISE_ORACLE_SYM = 228, /* RAISE_ORACLE_SYM */
+ YYSYMBOL_RANGE_SYM = 229, /* RANGE_SYM */
+ YYSYMBOL_RANK_SYM = 230, /* RANK_SYM */
+ YYSYMBOL_READS_SYM = 231, /* READS_SYM */
+ YYSYMBOL_READ_SYM = 232, /* READ_SYM */
+ YYSYMBOL_READ_WRITE_SYM = 233, /* READ_WRITE_SYM */
+ YYSYMBOL_REAL = 234, /* REAL */
+ YYSYMBOL_RECURSIVE_SYM = 235, /* RECURSIVE_SYM */
+ YYSYMBOL_REFERENCES = 236, /* REFERENCES */
+ YYSYMBOL_REF_SYSTEM_ID_SYM = 237, /* REF_SYSTEM_ID_SYM */
+ YYSYMBOL_REGEXP = 238, /* REGEXP */
+ YYSYMBOL_RELEASE_SYM = 239, /* RELEASE_SYM */
+ YYSYMBOL_RENAME = 240, /* RENAME */
+ YYSYMBOL_REPEAT_SYM = 241, /* REPEAT_SYM */
+ YYSYMBOL_REQUIRE_SYM = 242, /* REQUIRE_SYM */
+ YYSYMBOL_RESIGNAL_SYM = 243, /* RESIGNAL_SYM */
+ YYSYMBOL_RESTRICT = 244, /* RESTRICT */
+ YYSYMBOL_RETURNING_SYM = 245, /* RETURNING_SYM */
+ YYSYMBOL_RETURN_MARIADB_SYM = 246, /* RETURN_MARIADB_SYM */
+ YYSYMBOL_RETURN_ORACLE_SYM = 247, /* RETURN_ORACLE_SYM */
+ YYSYMBOL_REVOKE = 248, /* REVOKE */
+ YYSYMBOL_RIGHT = 249, /* RIGHT */
+ YYSYMBOL_ROW_NUMBER_SYM = 250, /* ROW_NUMBER_SYM */
+ YYSYMBOL_ROWS_SYM = 251, /* ROWS_SYM */
+ YYSYMBOL_ROWTYPE_ORACLE_SYM = 252, /* ROWTYPE_ORACLE_SYM */
+ YYSYMBOL_SECOND_MICROSECOND_SYM = 253, /* SECOND_MICROSECOND_SYM */
+ YYSYMBOL_SELECT_SYM = 254, /* SELECT_SYM */
+ YYSYMBOL_SENSITIVE_SYM = 255, /* SENSITIVE_SYM */
+ YYSYMBOL_SEPARATOR_SYM = 256, /* SEPARATOR_SYM */
+ YYSYMBOL_SERVER_OPTIONS = 257, /* SERVER_OPTIONS */
+ YYSYMBOL_SET = 258, /* SET */
+ YYSYMBOL_SHOW = 259, /* SHOW */
+ YYSYMBOL_SIGNAL_SYM = 260, /* SIGNAL_SYM */
+ YYSYMBOL_SMALLINT = 261, /* SMALLINT */
+ YYSYMBOL_SPATIAL_SYM = 262, /* SPATIAL_SYM */
+ YYSYMBOL_SPECIFIC_SYM = 263, /* SPECIFIC_SYM */
+ YYSYMBOL_SQL_BIG_RESULT = 264, /* SQL_BIG_RESULT */
+ YYSYMBOL_SQLEXCEPTION_SYM = 265, /* SQLEXCEPTION_SYM */
+ YYSYMBOL_SQL_SMALL_RESULT = 266, /* SQL_SMALL_RESULT */
+ YYSYMBOL_SQLSTATE_SYM = 267, /* SQLSTATE_SYM */
+ YYSYMBOL_SQL_SYM = 268, /* SQL_SYM */
+ YYSYMBOL_SQLWARNING_SYM = 269, /* SQLWARNING_SYM */
+ YYSYMBOL_SSL_SYM = 270, /* SSL_SYM */
+ YYSYMBOL_STARTING = 271, /* STARTING */
+ YYSYMBOL_STATS_AUTO_RECALC_SYM = 272, /* STATS_AUTO_RECALC_SYM */
+ YYSYMBOL_STATS_PERSISTENT_SYM = 273, /* STATS_PERSISTENT_SYM */
+ YYSYMBOL_STATS_SAMPLE_PAGES_SYM = 274, /* STATS_SAMPLE_PAGES_SYM */
+ YYSYMBOL_STDDEV_SAMP_SYM = 275, /* STDDEV_SAMP_SYM */
+ YYSYMBOL_STD_SYM = 276, /* STD_SYM */
+ YYSYMBOL_STRAIGHT_JOIN = 277, /* STRAIGHT_JOIN */
+ YYSYMBOL_SUM_SYM = 278, /* SUM_SYM */
+ YYSYMBOL_SYSDATE = 279, /* SYSDATE */
+ YYSYMBOL_TABLE_REF_PRIORITY = 280, /* TABLE_REF_PRIORITY */
+ YYSYMBOL_TABLE_SYM = 281, /* TABLE_SYM */
+ YYSYMBOL_TERMINATED = 282, /* TERMINATED */
+ YYSYMBOL_THEN_SYM = 283, /* THEN_SYM */
+ YYSYMBOL_TINYBLOB = 284, /* TINYBLOB */
+ YYSYMBOL_TINYINT = 285, /* TINYINT */
+ YYSYMBOL_TINYTEXT = 286, /* TINYTEXT */
+ YYSYMBOL_TO_SYM = 287, /* TO_SYM */
+ YYSYMBOL_TRAILING = 288, /* TRAILING */
+ YYSYMBOL_TRIGGER_SYM = 289, /* TRIGGER_SYM */
+ YYSYMBOL_TRUE_SYM = 290, /* TRUE_SYM */
+ YYSYMBOL_UNDO_SYM = 291, /* UNDO_SYM */
+ YYSYMBOL_UNION_SYM = 292, /* UNION_SYM */
+ YYSYMBOL_UNIQUE_SYM = 293, /* UNIQUE_SYM */
+ YYSYMBOL_UNLOCK_SYM = 294, /* UNLOCK_SYM */
+ YYSYMBOL_UNSIGNED = 295, /* UNSIGNED */
+ YYSYMBOL_UPDATE_SYM = 296, /* UPDATE_SYM */
+ YYSYMBOL_USAGE = 297, /* USAGE */
+ YYSYMBOL_USE_SYM = 298, /* USE_SYM */
+ YYSYMBOL_USING = 299, /* USING */
+ YYSYMBOL_UTC_DATE_SYM = 300, /* UTC_DATE_SYM */
+ YYSYMBOL_UTC_TIMESTAMP_SYM = 301, /* UTC_TIMESTAMP_SYM */
+ YYSYMBOL_UTC_TIME_SYM = 302, /* UTC_TIME_SYM */
+ YYSYMBOL_VALUES_IN_SYM = 303, /* VALUES_IN_SYM */
+ YYSYMBOL_VALUES_LESS_SYM = 304, /* VALUES_LESS_SYM */
+ YYSYMBOL_VALUES = 305, /* VALUES */
+ YYSYMBOL_VARBINARY = 306, /* VARBINARY */
+ YYSYMBOL_VARCHAR = 307, /* VARCHAR */
+ YYSYMBOL_VARIANCE_SYM = 308, /* VARIANCE_SYM */
+ YYSYMBOL_VAR_SAMP_SYM = 309, /* VAR_SAMP_SYM */
+ YYSYMBOL_VARYING = 310, /* VARYING */
+ YYSYMBOL_WHEN_SYM = 311, /* WHEN_SYM */
+ YYSYMBOL_WHERE = 312, /* WHERE */
+ YYSYMBOL_WHILE_SYM = 313, /* WHILE_SYM */
+ YYSYMBOL_WITH = 314, /* WITH */
+ YYSYMBOL_XOR = 315, /* XOR */
+ YYSYMBOL_YEAR_MONTH_SYM = 316, /* YEAR_MONTH_SYM */
+ YYSYMBOL_ZEROFILL = 317, /* ZEROFILL */
+ YYSYMBOL_BODY_MARIADB_SYM = 318, /* BODY_MARIADB_SYM */
+ YYSYMBOL_ELSEIF_ORACLE_SYM = 319, /* ELSEIF_ORACLE_SYM */
+ YYSYMBOL_ELSIF_MARIADB_SYM = 320, /* ELSIF_MARIADB_SYM */
+ YYSYMBOL_EXCEPTION_ORACLE_SYM = 321, /* EXCEPTION_ORACLE_SYM */
+ YYSYMBOL_GOTO_MARIADB_SYM = 322, /* GOTO_MARIADB_SYM */
+ YYSYMBOL_OTHERS_MARIADB_SYM = 323, /* OTHERS_MARIADB_SYM */
+ YYSYMBOL_PACKAGE_MARIADB_SYM = 324, /* PACKAGE_MARIADB_SYM */
+ YYSYMBOL_RAISE_MARIADB_SYM = 325, /* RAISE_MARIADB_SYM */
+ YYSYMBOL_ROWTYPE_MARIADB_SYM = 326, /* ROWTYPE_MARIADB_SYM */
+ YYSYMBOL_ROWNUM_SYM = 327, /* ROWNUM_SYM */
+ YYSYMBOL_REPLACE = 328, /* REPLACE */
+ YYSYMBOL_SUBSTRING = 329, /* SUBSTRING */
+ YYSYMBOL_TRIM = 330, /* TRIM */
+ YYSYMBOL_ACCOUNT_SYM = 331, /* ACCOUNT_SYM */
+ YYSYMBOL_ACTION = 332, /* ACTION */
+ YYSYMBOL_ADMIN_SYM = 333, /* ADMIN_SYM */
+ YYSYMBOL_ADDDATE_SYM = 334, /* ADDDATE_SYM */
+ YYSYMBOL_AFTER_SYM = 335, /* AFTER_SYM */
+ YYSYMBOL_AGAINST = 336, /* AGAINST */
+ YYSYMBOL_AGGREGATE_SYM = 337, /* AGGREGATE_SYM */
+ YYSYMBOL_ALGORITHM_SYM = 338, /* ALGORITHM_SYM */
+ YYSYMBOL_ALWAYS_SYM = 339, /* ALWAYS_SYM */
+ YYSYMBOL_ANY_SYM = 340, /* ANY_SYM */
+ YYSYMBOL_ASCII_SYM = 341, /* ASCII_SYM */
+ YYSYMBOL_AT_SYM = 342, /* AT_SYM */
+ YYSYMBOL_ATOMIC_SYM = 343, /* ATOMIC_SYM */
+ YYSYMBOL_AUTHORS_SYM = 344, /* AUTHORS_SYM */
+ YYSYMBOL_AUTOEXTEND_SIZE_SYM = 345, /* AUTOEXTEND_SIZE_SYM */
+ YYSYMBOL_AUTO_INC = 346, /* AUTO_INC */
+ YYSYMBOL_AUTO_SYM = 347, /* AUTO_SYM */
+ YYSYMBOL_AVG_ROW_LENGTH = 348, /* AVG_ROW_LENGTH */
+ YYSYMBOL_AVG_SYM = 349, /* AVG_SYM */
+ YYSYMBOL_BACKUP_SYM = 350, /* BACKUP_SYM */
+ YYSYMBOL_BEGIN_MARIADB_SYM = 351, /* BEGIN_MARIADB_SYM */
+ YYSYMBOL_BEGIN_ORACLE_SYM = 352, /* BEGIN_ORACLE_SYM */
+ YYSYMBOL_BINLOG_SYM = 353, /* BINLOG_SYM */
+ YYSYMBOL_BIT_SYM = 354, /* BIT_SYM */
+ YYSYMBOL_BLOCK_SYM = 355, /* BLOCK_SYM */
+ YYSYMBOL_BOOL_SYM = 356, /* BOOL_SYM */
+ YYSYMBOL_BOOLEAN_SYM = 357, /* BOOLEAN_SYM */
+ YYSYMBOL_BTREE_SYM = 358, /* BTREE_SYM */
+ YYSYMBOL_BYTE_SYM = 359, /* BYTE_SYM */
+ YYSYMBOL_CACHE_SYM = 360, /* CACHE_SYM */
+ YYSYMBOL_CASCADED = 361, /* CASCADED */
+ YYSYMBOL_CATALOG_NAME_SYM = 362, /* CATALOG_NAME_SYM */
+ YYSYMBOL_CHAIN_SYM = 363, /* CHAIN_SYM */
+ YYSYMBOL_CHANGED = 364, /* CHANGED */
+ YYSYMBOL_CHANNEL_SYM = 365, /* CHANNEL_SYM */
+ YYSYMBOL_CHARSET = 366, /* CHARSET */
+ YYSYMBOL_CHECKPOINT_SYM = 367, /* CHECKPOINT_SYM */
+ YYSYMBOL_CHECKSUM_SYM = 368, /* CHECKSUM_SYM */
+ YYSYMBOL_CIPHER_SYM = 369, /* CIPHER_SYM */
+ YYSYMBOL_CLASS_ORIGIN_SYM = 370, /* CLASS_ORIGIN_SYM */
+ YYSYMBOL_CLIENT_SYM = 371, /* CLIENT_SYM */
+ YYSYMBOL_CLOB_MARIADB_SYM = 372, /* CLOB_MARIADB_SYM */
+ YYSYMBOL_CLOB_ORACLE_SYM = 373, /* CLOB_ORACLE_SYM */
+ YYSYMBOL_CLOSE_SYM = 374, /* CLOSE_SYM */
+ YYSYMBOL_COALESCE = 375, /* COALESCE */
+ YYSYMBOL_CODE_SYM = 376, /* CODE_SYM */
+ YYSYMBOL_COLLATION_SYM = 377, /* COLLATION_SYM */
+ YYSYMBOL_COLUMNS = 378, /* COLUMNS */
+ YYSYMBOL_COLUMN_ADD_SYM = 379, /* COLUMN_ADD_SYM */
+ YYSYMBOL_COLUMN_CHECK_SYM = 380, /* COLUMN_CHECK_SYM */
+ YYSYMBOL_COLUMN_CREATE_SYM = 381, /* COLUMN_CREATE_SYM */
+ YYSYMBOL_COLUMN_DELETE_SYM = 382, /* COLUMN_DELETE_SYM */
+ YYSYMBOL_COLUMN_GET_SYM = 383, /* COLUMN_GET_SYM */
+ YYSYMBOL_COLUMN_SYM = 384, /* COLUMN_SYM */
+ YYSYMBOL_COLUMN_NAME_SYM = 385, /* COLUMN_NAME_SYM */
+ YYSYMBOL_COMMENT_SYM = 386, /* COMMENT_SYM */
+ YYSYMBOL_COMMITTED_SYM = 387, /* COMMITTED_SYM */
+ YYSYMBOL_COMMIT_SYM = 388, /* COMMIT_SYM */
+ YYSYMBOL_COMPACT_SYM = 389, /* COMPACT_SYM */
+ YYSYMBOL_COMPLETION_SYM = 390, /* COMPLETION_SYM */
+ YYSYMBOL_COMPRESSED_SYM = 391, /* COMPRESSED_SYM */
+ YYSYMBOL_CONCURRENT = 392, /* CONCURRENT */
+ YYSYMBOL_CONNECTION_SYM = 393, /* CONNECTION_SYM */
+ YYSYMBOL_CONSISTENT_SYM = 394, /* CONSISTENT_SYM */
+ YYSYMBOL_CONSTRAINT_CATALOG_SYM = 395, /* CONSTRAINT_CATALOG_SYM */
+ YYSYMBOL_CONSTRAINT_NAME_SYM = 396, /* CONSTRAINT_NAME_SYM */
+ YYSYMBOL_CONSTRAINT_SCHEMA_SYM = 397, /* CONSTRAINT_SCHEMA_SYM */
+ YYSYMBOL_CONTAINS_SYM = 398, /* CONTAINS_SYM */
+ YYSYMBOL_CONTEXT_SYM = 399, /* CONTEXT_SYM */
+ YYSYMBOL_CONTRIBUTORS_SYM = 400, /* CONTRIBUTORS_SYM */
+ YYSYMBOL_CPU_SYM = 401, /* CPU_SYM */
+ YYSYMBOL_CUBE_SYM = 402, /* CUBE_SYM */
+ YYSYMBOL_CURRENT_SYM = 403, /* CURRENT_SYM */
+ YYSYMBOL_CURRENT_POS_SYM = 404, /* CURRENT_POS_SYM */
+ YYSYMBOL_CURSOR_NAME_SYM = 405, /* CURSOR_NAME_SYM */
+ YYSYMBOL_CYCLE_SYM = 406, /* CYCLE_SYM */
+ YYSYMBOL_DATAFILE_SYM = 407, /* DATAFILE_SYM */
+ YYSYMBOL_DATA_SYM = 408, /* DATA_SYM */
+ YYSYMBOL_DATETIME = 409, /* DATETIME */
+ YYSYMBOL_DATE_SYM = 410, /* DATE_SYM */
+ YYSYMBOL_DAY_SYM = 411, /* DAY_SYM */
+ YYSYMBOL_DEALLOCATE_SYM = 412, /* DEALLOCATE_SYM */
+ YYSYMBOL_DEFINER_SYM = 413, /* DEFINER_SYM */
+ YYSYMBOL_DELAYED_SYM = 414, /* DELAYED_SYM */
+ YYSYMBOL_DELAY_KEY_WRITE_SYM = 415, /* DELAY_KEY_WRITE_SYM */
+ YYSYMBOL_DES_KEY_FILE = 416, /* DES_KEY_FILE */
+ YYSYMBOL_DIAGNOSTICS_SYM = 417, /* DIAGNOSTICS_SYM */
+ YYSYMBOL_DIRECTORY_SYM = 418, /* DIRECTORY_SYM */
+ YYSYMBOL_DISABLE_SYM = 419, /* DISABLE_SYM */
+ YYSYMBOL_DISCARD = 420, /* DISCARD */
+ YYSYMBOL_DISK_SYM = 421, /* DISK_SYM */
+ YYSYMBOL_DO_SYM = 422, /* DO_SYM */
+ YYSYMBOL_DUMPFILE = 423, /* DUMPFILE */
+ YYSYMBOL_DUPLICATE_SYM = 424, /* DUPLICATE_SYM */
+ YYSYMBOL_DYNAMIC_SYM = 425, /* DYNAMIC_SYM */
+ YYSYMBOL_ENABLE_SYM = 426, /* ENABLE_SYM */
+ YYSYMBOL_END = 427, /* END */
+ YYSYMBOL_ENDS_SYM = 428, /* ENDS_SYM */
+ YYSYMBOL_ENGINES_SYM = 429, /* ENGINES_SYM */
+ YYSYMBOL_ENGINE_SYM = 430, /* ENGINE_SYM */
+ YYSYMBOL_ENUM = 431, /* ENUM */
+ YYSYMBOL_ERROR_SYM = 432, /* ERROR_SYM */
+ YYSYMBOL_ERRORS = 433, /* ERRORS */
+ YYSYMBOL_ESCAPE_SYM = 434, /* ESCAPE_SYM */
+ YYSYMBOL_EVENTS_SYM = 435, /* EVENTS_SYM */
+ YYSYMBOL_EVENT_SYM = 436, /* EVENT_SYM */
+ YYSYMBOL_EVERY_SYM = 437, /* EVERY_SYM */
+ YYSYMBOL_EXCHANGE_SYM = 438, /* EXCHANGE_SYM */
+ YYSYMBOL_EXAMINED_SYM = 439, /* EXAMINED_SYM */
+ YYSYMBOL_EXCLUDE_SYM = 440, /* EXCLUDE_SYM */
+ YYSYMBOL_EXECUTE_SYM = 441, /* EXECUTE_SYM */
+ YYSYMBOL_EXCEPTION_MARIADB_SYM = 442, /* EXCEPTION_MARIADB_SYM */
+ YYSYMBOL_EXIT_MARIADB_SYM = 443, /* EXIT_MARIADB_SYM */
+ YYSYMBOL_EXIT_ORACLE_SYM = 444, /* EXIT_ORACLE_SYM */
+ YYSYMBOL_EXPANSION_SYM = 445, /* EXPANSION_SYM */
+ YYSYMBOL_EXPIRE_SYM = 446, /* EXPIRE_SYM */
+ YYSYMBOL_EXPORT_SYM = 447, /* EXPORT_SYM */
+ YYSYMBOL_EXTENDED_SYM = 448, /* EXTENDED_SYM */
+ YYSYMBOL_EXTENT_SIZE_SYM = 449, /* EXTENT_SIZE_SYM */
+ YYSYMBOL_FAST_SYM = 450, /* FAST_SYM */
+ YYSYMBOL_FAULTS_SYM = 451, /* FAULTS_SYM */
+ YYSYMBOL_FEDERATED_SYM = 452, /* FEDERATED_SYM */
+ YYSYMBOL_FILE_SYM = 453, /* FILE_SYM */
+ YYSYMBOL_FIRST_SYM = 454, /* FIRST_SYM */
+ YYSYMBOL_FIXED_SYM = 455, /* FIXED_SYM */
+ YYSYMBOL_FLUSH_SYM = 456, /* FLUSH_SYM */
+ YYSYMBOL_FOLLOWS_SYM = 457, /* FOLLOWS_SYM */
+ YYSYMBOL_FOLLOWING_SYM = 458, /* FOLLOWING_SYM */
+ YYSYMBOL_FORCE_SYM = 459, /* FORCE_SYM */
+ YYSYMBOL_FORMAT_SYM = 460, /* FORMAT_SYM */
+ YYSYMBOL_FOUND_SYM = 461, /* FOUND_SYM */
+ YYSYMBOL_FULL = 462, /* FULL */
+ YYSYMBOL_FUNCTION_SYM = 463, /* FUNCTION_SYM */
+ YYSYMBOL_GENERAL = 464, /* GENERAL */
+ YYSYMBOL_GENERATED_SYM = 465, /* GENERATED_SYM */
+ YYSYMBOL_GET_FORMAT = 466, /* GET_FORMAT */
+ YYSYMBOL_GET_SYM = 467, /* GET_SYM */
+ YYSYMBOL_GLOBAL_SYM = 468, /* GLOBAL_SYM */
+ YYSYMBOL_GRANTS = 469, /* GRANTS */
+ YYSYMBOL_HANDLER_SYM = 470, /* HANDLER_SYM */
+ YYSYMBOL_HARD_SYM = 471, /* HARD_SYM */
+ YYSYMBOL_HASH_SYM = 472, /* HASH_SYM */
+ YYSYMBOL_HELP_SYM = 473, /* HELP_SYM */
+ YYSYMBOL_HIGH_PRIORITY = 474, /* HIGH_PRIORITY */
+ YYSYMBOL_HISTORY_SYM = 475, /* HISTORY_SYM */
+ YYSYMBOL_HOST_SYM = 476, /* HOST_SYM */
+ YYSYMBOL_HOSTS_SYM = 477, /* HOSTS_SYM */
+ YYSYMBOL_HOUR_SYM = 478, /* HOUR_SYM */
+ YYSYMBOL_ID_SYM = 479, /* ID_SYM */
+ YYSYMBOL_IDENTIFIED_SYM = 480, /* IDENTIFIED_SYM */
+ YYSYMBOL_IGNORE_SERVER_IDS_SYM = 481, /* IGNORE_SERVER_IDS_SYM */
+ YYSYMBOL_IMMEDIATE_SYM = 482, /* IMMEDIATE_SYM */
+ YYSYMBOL_IMPORT = 483, /* IMPORT */
+ YYSYMBOL_INCREMENT_SYM = 484, /* INCREMENT_SYM */
+ YYSYMBOL_INDEXES = 485, /* INDEXES */
+ YYSYMBOL_INITIAL_SIZE_SYM = 486, /* INITIAL_SIZE_SYM */
+ YYSYMBOL_INSERT_METHOD = 487, /* INSERT_METHOD */
+ YYSYMBOL_INSTALL_SYM = 488, /* INSTALL_SYM */
+ YYSYMBOL_INVOKER_SYM = 489, /* INVOKER_SYM */
+ YYSYMBOL_IO_SYM = 490, /* IO_SYM */
+ YYSYMBOL_IPC_SYM = 491, /* IPC_SYM */
+ YYSYMBOL_ISOLATION = 492, /* ISOLATION */
+ YYSYMBOL_ISOPEN_SYM = 493, /* ISOPEN_SYM */
+ YYSYMBOL_ISSUER_SYM = 494, /* ISSUER_SYM */
+ YYSYMBOL_INVISIBLE_SYM = 495, /* INVISIBLE_SYM */
+ YYSYMBOL_JSON_SYM = 496, /* JSON_SYM */
+ YYSYMBOL_KEY_BLOCK_SIZE = 497, /* KEY_BLOCK_SIZE */
+ YYSYMBOL_LANGUAGE_SYM = 498, /* LANGUAGE_SYM */
+ YYSYMBOL_LAST_SYM = 499, /* LAST_SYM */
+ YYSYMBOL_LAST_VALUE = 500, /* LAST_VALUE */
+ YYSYMBOL_LASTVAL_SYM = 501, /* LASTVAL_SYM */
+ YYSYMBOL_LEAVES = 502, /* LEAVES */
+ YYSYMBOL_LESS_SYM = 503, /* LESS_SYM */
+ YYSYMBOL_LEVEL_SYM = 504, /* LEVEL_SYM */
+ YYSYMBOL_LIST_SYM = 505, /* LIST_SYM */
+ YYSYMBOL_LOCAL_SYM = 506, /* LOCAL_SYM */
+ YYSYMBOL_LOCKED_SYM = 507, /* LOCKED_SYM */
+ YYSYMBOL_LOCKS_SYM = 508, /* LOCKS_SYM */
+ YYSYMBOL_LOGFILE_SYM = 509, /* LOGFILE_SYM */
+ YYSYMBOL_LOGS_SYM = 510, /* LOGS_SYM */
+ YYSYMBOL_MASTER_CONNECT_RETRY_SYM = 511, /* MASTER_CONNECT_RETRY_SYM */
+ YYSYMBOL_MASTER_DELAY_SYM = 512, /* MASTER_DELAY_SYM */
+ YYSYMBOL_MASTER_GTID_POS_SYM = 513, /* MASTER_GTID_POS_SYM */
+ YYSYMBOL_MASTER_HOST_SYM = 514, /* MASTER_HOST_SYM */
+ YYSYMBOL_MASTER_LOG_FILE_SYM = 515, /* MASTER_LOG_FILE_SYM */
+ YYSYMBOL_MASTER_LOG_POS_SYM = 516, /* MASTER_LOG_POS_SYM */
+ YYSYMBOL_MASTER_PASSWORD_SYM = 517, /* MASTER_PASSWORD_SYM */
+ YYSYMBOL_MASTER_PORT_SYM = 518, /* MASTER_PORT_SYM */
+ YYSYMBOL_MASTER_SERVER_ID_SYM = 519, /* MASTER_SERVER_ID_SYM */
+ YYSYMBOL_MASTER_SSL_CAPATH_SYM = 520, /* MASTER_SSL_CAPATH_SYM */
+ YYSYMBOL_MASTER_SSL_CA_SYM = 521, /* MASTER_SSL_CA_SYM */
+ YYSYMBOL_MASTER_SSL_CERT_SYM = 522, /* MASTER_SSL_CERT_SYM */
+ YYSYMBOL_MASTER_SSL_CIPHER_SYM = 523, /* MASTER_SSL_CIPHER_SYM */
+ YYSYMBOL_MASTER_SSL_CRL_SYM = 524, /* MASTER_SSL_CRL_SYM */
+ YYSYMBOL_MASTER_SSL_CRLPATH_SYM = 525, /* MASTER_SSL_CRLPATH_SYM */
+ YYSYMBOL_MASTER_SSL_KEY_SYM = 526, /* MASTER_SSL_KEY_SYM */
+ YYSYMBOL_MASTER_SSL_SYM = 527, /* MASTER_SSL_SYM */
+ YYSYMBOL_MASTER_SYM = 528, /* MASTER_SYM */
+ YYSYMBOL_MASTER_USER_SYM = 529, /* MASTER_USER_SYM */
+ YYSYMBOL_MASTER_USE_GTID_SYM = 530, /* MASTER_USE_GTID_SYM */
+ YYSYMBOL_MASTER_HEARTBEAT_PERIOD_SYM = 531, /* MASTER_HEARTBEAT_PERIOD_SYM */
+ YYSYMBOL_MASTER_DEMOTE_TO_SLAVE_SYM = 532, /* MASTER_DEMOTE_TO_SLAVE_SYM */
+ YYSYMBOL_MAX_CONNECTIONS_PER_HOUR = 533, /* MAX_CONNECTIONS_PER_HOUR */
+ YYSYMBOL_MAX_QUERIES_PER_HOUR = 534, /* MAX_QUERIES_PER_HOUR */
+ YYSYMBOL_MAX_ROWS = 535, /* MAX_ROWS */
+ YYSYMBOL_MAX_SIZE_SYM = 536, /* MAX_SIZE_SYM */
+ YYSYMBOL_MAX_UPDATES_PER_HOUR = 537, /* MAX_UPDATES_PER_HOUR */
+ YYSYMBOL_MAX_STATEMENT_TIME_SYM = 538, /* MAX_STATEMENT_TIME_SYM */
+ YYSYMBOL_MAX_USER_CONNECTIONS_SYM = 539, /* MAX_USER_CONNECTIONS_SYM */
+ YYSYMBOL_MEDIUM_SYM = 540, /* MEDIUM_SYM */
+ YYSYMBOL_MEMORY_SYM = 541, /* MEMORY_SYM */
+ YYSYMBOL_MERGE_SYM = 542, /* MERGE_SYM */
+ YYSYMBOL_MESSAGE_TEXT_SYM = 543, /* MESSAGE_TEXT_SYM */
+ YYSYMBOL_MICROSECOND_SYM = 544, /* MICROSECOND_SYM */
+ YYSYMBOL_MIGRATE_SYM = 545, /* MIGRATE_SYM */
+ YYSYMBOL_MINUTE_SYM = 546, /* MINUTE_SYM */
+ YYSYMBOL_MINVALUE_SYM = 547, /* MINVALUE_SYM */
+ YYSYMBOL_MIN_ROWS = 548, /* MIN_ROWS */
+ YYSYMBOL_MODE_SYM = 549, /* MODE_SYM */
+ YYSYMBOL_MODIFY_SYM = 550, /* MODIFY_SYM */
+ YYSYMBOL_MONITOR_SYM = 551, /* MONITOR_SYM */
+ YYSYMBOL_MONTH_SYM = 552, /* MONTH_SYM */
+ YYSYMBOL_MUTEX_SYM = 553, /* MUTEX_SYM */
+ YYSYMBOL_MYSQL_SYM = 554, /* MYSQL_SYM */
+ YYSYMBOL_MYSQL_ERRNO_SYM = 555, /* MYSQL_ERRNO_SYM */
+ YYSYMBOL_NAMES_SYM = 556, /* NAMES_SYM */
+ YYSYMBOL_NAME_SYM = 557, /* NAME_SYM */
+ YYSYMBOL_NATIONAL_SYM = 558, /* NATIONAL_SYM */
+ YYSYMBOL_NCHAR_SYM = 559, /* NCHAR_SYM */
+ YYSYMBOL_NEVER_SYM = 560, /* NEVER_SYM */
+ YYSYMBOL_NEXT_SYM = 561, /* NEXT_SYM */
+ YYSYMBOL_NEXTVAL_SYM = 562, /* NEXTVAL_SYM */
+ YYSYMBOL_NOCACHE_SYM = 563, /* NOCACHE_SYM */
+ YYSYMBOL_NOCYCLE_SYM = 564, /* NOCYCLE_SYM */
+ YYSYMBOL_NODEGROUP_SYM = 565, /* NODEGROUP_SYM */
+ YYSYMBOL_NONE_SYM = 566, /* NONE_SYM */
+ YYSYMBOL_NOTFOUND_SYM = 567, /* NOTFOUND_SYM */
+ YYSYMBOL_NO_SYM = 568, /* NO_SYM */
+ YYSYMBOL_NOMAXVALUE_SYM = 569, /* NOMAXVALUE_SYM */
+ YYSYMBOL_NOMINVALUE_SYM = 570, /* NOMINVALUE_SYM */
+ YYSYMBOL_NO_WAIT_SYM = 571, /* NO_WAIT_SYM */
+ YYSYMBOL_NOWAIT_SYM = 572, /* NOWAIT_SYM */
+ YYSYMBOL_NUMBER_MARIADB_SYM = 573, /* NUMBER_MARIADB_SYM */
+ YYSYMBOL_NUMBER_ORACLE_SYM = 574, /* NUMBER_ORACLE_SYM */
+ YYSYMBOL_NVARCHAR_SYM = 575, /* NVARCHAR_SYM */
+ YYSYMBOL_OF_SYM = 576, /* OF_SYM */
+ YYSYMBOL_OFFSET_SYM = 577, /* OFFSET_SYM */
+ YYSYMBOL_OLD_PASSWORD_SYM = 578, /* OLD_PASSWORD_SYM */
+ YYSYMBOL_ONE_SYM = 579, /* ONE_SYM */
+ YYSYMBOL_ONLY_SYM = 580, /* ONLY_SYM */
+ YYSYMBOL_ONLINE_SYM = 581, /* ONLINE_SYM */
+ YYSYMBOL_OPEN_SYM = 582, /* OPEN_SYM */
+ YYSYMBOL_OPTIONS_SYM = 583, /* OPTIONS_SYM */
+ YYSYMBOL_OPTION = 584, /* OPTION */
+ YYSYMBOL_OVERLAPS_SYM = 585, /* OVERLAPS_SYM */
+ YYSYMBOL_OWNER_SYM = 586, /* OWNER_SYM */
+ YYSYMBOL_PACK_KEYS_SYM = 587, /* PACK_KEYS_SYM */
+ YYSYMBOL_PAGE_SYM = 588, /* PAGE_SYM */
+ YYSYMBOL_PARSER_SYM = 589, /* PARSER_SYM */
+ YYSYMBOL_PARTIAL = 590, /* PARTIAL */
+ YYSYMBOL_PARTITIONS_SYM = 591, /* PARTITIONS_SYM */
+ YYSYMBOL_PARTITIONING_SYM = 592, /* PARTITIONING_SYM */
+ YYSYMBOL_PASSWORD_SYM = 593, /* PASSWORD_SYM */
+ YYSYMBOL_PERIOD_SYM = 594, /* PERIOD_SYM */
+ YYSYMBOL_PERSISTENT_SYM = 595, /* PERSISTENT_SYM */
+ YYSYMBOL_PHASE_SYM = 596, /* PHASE_SYM */
+ YYSYMBOL_PLUGINS_SYM = 597, /* PLUGINS_SYM */
+ YYSYMBOL_PLUGIN_SYM = 598, /* PLUGIN_SYM */
+ YYSYMBOL_PORT_SYM = 599, /* PORT_SYM */
+ YYSYMBOL_PRECEDES_SYM = 600, /* PRECEDES_SYM */
+ YYSYMBOL_PRECEDING_SYM = 601, /* PRECEDING_SYM */
+ YYSYMBOL_PREPARE_SYM = 602, /* PREPARE_SYM */
+ YYSYMBOL_PRESERVE_SYM = 603, /* PRESERVE_SYM */
+ YYSYMBOL_PREV_SYM = 604, /* PREV_SYM */
+ YYSYMBOL_PREVIOUS_SYM = 605, /* PREVIOUS_SYM */
+ YYSYMBOL_PRIVILEGES = 606, /* PRIVILEGES */
+ YYSYMBOL_PROCESS = 607, /* PROCESS */
+ YYSYMBOL_PROCESSLIST_SYM = 608, /* PROCESSLIST_SYM */
+ YYSYMBOL_PROFILE_SYM = 609, /* PROFILE_SYM */
+ YYSYMBOL_PROFILES_SYM = 610, /* PROFILES_SYM */
+ YYSYMBOL_PROXY_SYM = 611, /* PROXY_SYM */
+ YYSYMBOL_QUARTER_SYM = 612, /* QUARTER_SYM */
+ YYSYMBOL_QUERY_SYM = 613, /* QUERY_SYM */
+ YYSYMBOL_QUICK = 614, /* QUICK */
+ YYSYMBOL_RAW_MARIADB_SYM = 615, /* RAW_MARIADB_SYM */
+ YYSYMBOL_RAW_ORACLE_SYM = 616, /* RAW_ORACLE_SYM */
+ YYSYMBOL_READ_ONLY_SYM = 617, /* READ_ONLY_SYM */
+ YYSYMBOL_REBUILD_SYM = 618, /* REBUILD_SYM */
+ YYSYMBOL_RECOVER_SYM = 619, /* RECOVER_SYM */
+ YYSYMBOL_REDOFILE_SYM = 620, /* REDOFILE_SYM */
+ YYSYMBOL_REDO_BUFFER_SIZE_SYM = 621, /* REDO_BUFFER_SIZE_SYM */
+ YYSYMBOL_REDUNDANT_SYM = 622, /* REDUNDANT_SYM */
+ YYSYMBOL_RELAY = 623, /* RELAY */
+ YYSYMBOL_RELAYLOG_SYM = 624, /* RELAYLOG_SYM */
+ YYSYMBOL_RELAY_LOG_FILE_SYM = 625, /* RELAY_LOG_FILE_SYM */
+ YYSYMBOL_RELAY_LOG_POS_SYM = 626, /* RELAY_LOG_POS_SYM */
+ YYSYMBOL_RELAY_THREAD = 627, /* RELAY_THREAD */
+ YYSYMBOL_RELOAD = 628, /* RELOAD */
+ YYSYMBOL_REMOVE_SYM = 629, /* REMOVE_SYM */
+ YYSYMBOL_REORGANIZE_SYM = 630, /* REORGANIZE_SYM */
+ YYSYMBOL_REPAIR = 631, /* REPAIR */
+ YYSYMBOL_REPEATABLE_SYM = 632, /* REPEATABLE_SYM */
+ YYSYMBOL_REPLAY_SYM = 633, /* REPLAY_SYM */
+ YYSYMBOL_REPLICATION = 634, /* REPLICATION */
+ YYSYMBOL_RESET_SYM = 635, /* RESET_SYM */
+ YYSYMBOL_RESTART_SYM = 636, /* RESTART_SYM */
+ YYSYMBOL_RESOURCES = 637, /* RESOURCES */
+ YYSYMBOL_RESTORE_SYM = 638, /* RESTORE_SYM */
+ YYSYMBOL_RESUME_SYM = 639, /* RESUME_SYM */
+ YYSYMBOL_RETURNED_SQLSTATE_SYM = 640, /* RETURNED_SQLSTATE_SYM */
+ YYSYMBOL_RETURNS_SYM = 641, /* RETURNS_SYM */
+ YYSYMBOL_REUSE_SYM = 642, /* REUSE_SYM */
+ YYSYMBOL_REVERSE_SYM = 643, /* REVERSE_SYM */
+ YYSYMBOL_ROLE_SYM = 644, /* ROLE_SYM */
+ YYSYMBOL_ROLLBACK_SYM = 645, /* ROLLBACK_SYM */
+ YYSYMBOL_ROLLUP_SYM = 646, /* ROLLUP_SYM */
+ YYSYMBOL_ROUTINE_SYM = 647, /* ROUTINE_SYM */
+ YYSYMBOL_ROWCOUNT_SYM = 648, /* ROWCOUNT_SYM */
+ YYSYMBOL_ROW_SYM = 649, /* ROW_SYM */
+ YYSYMBOL_ROW_COUNT_SYM = 650, /* ROW_COUNT_SYM */
+ YYSYMBOL_ROW_FORMAT_SYM = 651, /* ROW_FORMAT_SYM */
+ YYSYMBOL_RTREE_SYM = 652, /* RTREE_SYM */
+ YYSYMBOL_SAVEPOINT_SYM = 653, /* SAVEPOINT_SYM */
+ YYSYMBOL_SCHEDULE_SYM = 654, /* SCHEDULE_SYM */
+ YYSYMBOL_SCHEMA_NAME_SYM = 655, /* SCHEMA_NAME_SYM */
+ YYSYMBOL_SECOND_SYM = 656, /* SECOND_SYM */
+ YYSYMBOL_SECURITY_SYM = 657, /* SECURITY_SYM */
+ YYSYMBOL_SEQUENCE_SYM = 658, /* SEQUENCE_SYM */
+ YYSYMBOL_SERIALIZABLE_SYM = 659, /* SERIALIZABLE_SYM */
+ YYSYMBOL_SERIAL_SYM = 660, /* SERIAL_SYM */
+ YYSYMBOL_SESSION_SYM = 661, /* SESSION_SYM */
+ YYSYMBOL_SERVER_SYM = 662, /* SERVER_SYM */
+ YYSYMBOL_SETVAL_SYM = 663, /* SETVAL_SYM */
+ YYSYMBOL_SHARE_SYM = 664, /* SHARE_SYM */
+ YYSYMBOL_SHUTDOWN = 665, /* SHUTDOWN */
+ YYSYMBOL_SIGNED_SYM = 666, /* SIGNED_SYM */
+ YYSYMBOL_SIMPLE_SYM = 667, /* SIMPLE_SYM */
+ YYSYMBOL_SKIP_SYM = 668, /* SKIP_SYM */
+ YYSYMBOL_SLAVE = 669, /* SLAVE */
+ YYSYMBOL_SLAVES = 670, /* SLAVES */
+ YYSYMBOL_SLAVE_POS_SYM = 671, /* SLAVE_POS_SYM */
+ YYSYMBOL_SLOW = 672, /* SLOW */
+ YYSYMBOL_SNAPSHOT_SYM = 673, /* SNAPSHOT_SYM */
+ YYSYMBOL_SOCKET_SYM = 674, /* SOCKET_SYM */
+ YYSYMBOL_SOFT_SYM = 675, /* SOFT_SYM */
+ YYSYMBOL_SONAME_SYM = 676, /* SONAME_SYM */
+ YYSYMBOL_SOUNDS_SYM = 677, /* SOUNDS_SYM */
+ YYSYMBOL_SOURCE_SYM = 678, /* SOURCE_SYM */
+ YYSYMBOL_SQL_BUFFER_RESULT = 679, /* SQL_BUFFER_RESULT */
+ YYSYMBOL_SQL_CACHE_SYM = 680, /* SQL_CACHE_SYM */
+ YYSYMBOL_SQL_CALC_FOUND_ROWS = 681, /* SQL_CALC_FOUND_ROWS */
+ YYSYMBOL_SQL_NO_CACHE_SYM = 682, /* SQL_NO_CACHE_SYM */
+ YYSYMBOL_SQL_THREAD = 683, /* SQL_THREAD */
+ YYSYMBOL_STAGE_SYM = 684, /* STAGE_SYM */
+ YYSYMBOL_STARTS_SYM = 685, /* STARTS_SYM */
+ YYSYMBOL_START_SYM = 686, /* START_SYM */
+ YYSYMBOL_STATEMENT_SYM = 687, /* STATEMENT_SYM */
+ YYSYMBOL_STATUS_SYM = 688, /* STATUS_SYM */
+ YYSYMBOL_STOP_SYM = 689, /* STOP_SYM */
+ YYSYMBOL_STORAGE_SYM = 690, /* STORAGE_SYM */
+ YYSYMBOL_STORED_SYM = 691, /* STORED_SYM */
+ YYSYMBOL_STRING_SYM = 692, /* STRING_SYM */
+ YYSYMBOL_SUBCLASS_ORIGIN_SYM = 693, /* SUBCLASS_ORIGIN_SYM */
+ YYSYMBOL_SUBDATE_SYM = 694, /* SUBDATE_SYM */
+ YYSYMBOL_SUBJECT_SYM = 695, /* SUBJECT_SYM */
+ YYSYMBOL_SUBPARTITIONS_SYM = 696, /* SUBPARTITIONS_SYM */
+ YYSYMBOL_SUBPARTITION_SYM = 697, /* SUBPARTITION_SYM */
+ YYSYMBOL_SUPER_SYM = 698, /* SUPER_SYM */
+ YYSYMBOL_SUSPEND_SYM = 699, /* SUSPEND_SYM */
+ YYSYMBOL_SWAPS_SYM = 700, /* SWAPS_SYM */
+ YYSYMBOL_SWITCHES_SYM = 701, /* SWITCHES_SYM */
+ YYSYMBOL_SYSTEM = 702, /* SYSTEM */
+ YYSYMBOL_SYSTEM_TIME_SYM = 703, /* SYSTEM_TIME_SYM */
+ YYSYMBOL_TABLES = 704, /* TABLES */
+ YYSYMBOL_TABLESPACE = 705, /* TABLESPACE */
+ YYSYMBOL_TABLE_CHECKSUM_SYM = 706, /* TABLE_CHECKSUM_SYM */
+ YYSYMBOL_TABLE_NAME_SYM = 707, /* TABLE_NAME_SYM */
+ YYSYMBOL_TEMPORARY = 708, /* TEMPORARY */
+ YYSYMBOL_TEMPTABLE_SYM = 709, /* TEMPTABLE_SYM */
+ YYSYMBOL_TEXT_SYM = 710, /* TEXT_SYM */
+ YYSYMBOL_THAN_SYM = 711, /* THAN_SYM */
+ YYSYMBOL_TIES_SYM = 712, /* TIES_SYM */
+ YYSYMBOL_TIMESTAMP = 713, /* TIMESTAMP */
+ YYSYMBOL_TIMESTAMP_ADD = 714, /* TIMESTAMP_ADD */
+ YYSYMBOL_TIMESTAMP_DIFF = 715, /* TIMESTAMP_DIFF */
+ YYSYMBOL_TIME_SYM = 716, /* TIME_SYM */
+ YYSYMBOL_TRANSACTION_SYM = 717, /* TRANSACTION_SYM */
+ YYSYMBOL_TRANSACTIONAL_SYM = 718, /* TRANSACTIONAL_SYM */
+ YYSYMBOL_THREADS_SYM = 719, /* THREADS_SYM */
+ YYSYMBOL_TRIGGERS_SYM = 720, /* TRIGGERS_SYM */
+ YYSYMBOL_TRIM_ORACLE = 721, /* TRIM_ORACLE */
+ YYSYMBOL_TRUNCATE_SYM = 722, /* TRUNCATE_SYM */
+ YYSYMBOL_TYPE_SYM = 723, /* TYPE_SYM */
+ YYSYMBOL_UDF_RETURNS_SYM = 724, /* UDF_RETURNS_SYM */
+ YYSYMBOL_UNBOUNDED_SYM = 725, /* UNBOUNDED_SYM */
+ YYSYMBOL_UNCOMMITTED_SYM = 726, /* UNCOMMITTED_SYM */
+ YYSYMBOL_UNDEFINED_SYM = 727, /* UNDEFINED_SYM */
+ YYSYMBOL_UNDOFILE_SYM = 728, /* UNDOFILE_SYM */
+ YYSYMBOL_UNDO_BUFFER_SIZE_SYM = 729, /* UNDO_BUFFER_SIZE_SYM */
+ YYSYMBOL_UNICODE_SYM = 730, /* UNICODE_SYM */
+ YYSYMBOL_UNINSTALL_SYM = 731, /* UNINSTALL_SYM */
+ YYSYMBOL_UNKNOWN_SYM = 732, /* UNKNOWN_SYM */
+ YYSYMBOL_UNTIL_SYM = 733, /* UNTIL_SYM */
+ YYSYMBOL_UPGRADE_SYM = 734, /* UPGRADE_SYM */
+ YYSYMBOL_USER_SYM = 735, /* USER_SYM */
+ YYSYMBOL_USE_FRM = 736, /* USE_FRM */
+ YYSYMBOL_VALUE_SYM = 737, /* VALUE_SYM */
+ YYSYMBOL_VARCHAR2_MARIADB_SYM = 738, /* VARCHAR2_MARIADB_SYM */
+ YYSYMBOL_VARCHAR2_ORACLE_SYM = 739, /* VARCHAR2_ORACLE_SYM */
+ YYSYMBOL_VARIABLES = 740, /* VARIABLES */
+ YYSYMBOL_VERSIONING_SYM = 741, /* VERSIONING_SYM */
+ YYSYMBOL_VIA_SYM = 742, /* VIA_SYM */
+ YYSYMBOL_VIEW_SYM = 743, /* VIEW_SYM */
+ YYSYMBOL_VISIBLE_SYM = 744, /* VISIBLE_SYM */
+ YYSYMBOL_VIRTUAL_SYM = 745, /* VIRTUAL_SYM */
+ YYSYMBOL_WAIT_SYM = 746, /* WAIT_SYM */
+ YYSYMBOL_WARNINGS = 747, /* WARNINGS */
+ YYSYMBOL_WEEK_SYM = 748, /* WEEK_SYM */
+ YYSYMBOL_WEIGHT_STRING_SYM = 749, /* WEIGHT_STRING_SYM */
+ YYSYMBOL_WINDOW_SYM = 750, /* WINDOW_SYM */
+ YYSYMBOL_WITHIN = 751, /* WITHIN */
+ YYSYMBOL_WITHOUT = 752, /* WITHOUT */
+ YYSYMBOL_WORK_SYM = 753, /* WORK_SYM */
+ YYSYMBOL_WRAPPER_SYM = 754, /* WRAPPER_SYM */
+ YYSYMBOL_WRITE_SYM = 755, /* WRITE_SYM */
+ YYSYMBOL_X509_SYM = 756, /* X509_SYM */
+ YYSYMBOL_XA_SYM = 757, /* XA_SYM */
+ YYSYMBOL_XML_SYM = 758, /* XML_SYM */
+ YYSYMBOL_YEAR_SYM = 759, /* YEAR_SYM */
+ YYSYMBOL_CONDITIONLESS_JOIN = 760, /* CONDITIONLESS_JOIN */
+ YYSYMBOL_ON_SYM = 761, /* ON_SYM */
+ YYSYMBOL_PREC_BELOW_NOT = 762, /* PREC_BELOW_NOT */
+ YYSYMBOL_763_ = 763, /* '=' */
+ YYSYMBOL_764_ = 764, /* '>' */
+ YYSYMBOL_765_ = 765, /* '<' */
+ YYSYMBOL_766_ = 766, /* '|' */
+ YYSYMBOL_767_ = 767, /* '&' */
+ YYSYMBOL_768_ = 768, /* '-' */
+ YYSYMBOL_769_ = 769, /* '+' */
+ YYSYMBOL_770_ = 770, /* '*' */
+ YYSYMBOL_771_ = 771, /* '/' */
+ YYSYMBOL_772_ = 772, /* '%' */
+ YYSYMBOL_773_ = 773, /* '^' */
+ YYSYMBOL_774_ = 774, /* '~' */
+ YYSYMBOL_SUBQUERY_AS_EXPR = 775, /* SUBQUERY_AS_EXPR */
+ YYSYMBOL_PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE = 776, /* PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE */
+ YYSYMBOL_USER = 777, /* USER */
+ YYSYMBOL_PREC_BELOW_CONTRACTION_TOKEN2 = 778, /* PREC_BELOW_CONTRACTION_TOKEN2 */
+ YYSYMBOL_779_ = 779, /* '(' */
+ YYSYMBOL_780_ = 780, /* ')' */
+ YYSYMBOL_EMPTY_FROM_CLAUSE = 781, /* EMPTY_FROM_CLAUSE */
+ YYSYMBOL_782_ = 782, /* ',' */
+ YYSYMBOL_783_ = 783, /* '!' */
+ YYSYMBOL_784_ = 784, /* '{' */
+ YYSYMBOL_785_ = 785, /* '}' */
+ YYSYMBOL_786_ = 786, /* ';' */
+ YYSYMBOL_787_ = 787, /* '.' */
+ YYSYMBOL_YYACCEPT = 788, /* $accept */
+ YYSYMBOL_query = 789, /* query */
+ YYSYMBOL_790_1 = 790, /* $@1 */
+ YYSYMBOL_opt_end_of_input = 791, /* opt_end_of_input */
+ YYSYMBOL_directly_executable_statement = 792, /* directly_executable_statement */
+ YYSYMBOL_verb_clause = 793, /* verb_clause */
+ YYSYMBOL_deallocate = 794, /* deallocate */
+ YYSYMBOL_deallocate_or_drop = 795, /* deallocate_or_drop */
+ YYSYMBOL_prepare = 796, /* prepare */
+ YYSYMBOL_797_2 = 797, /* $@2 */
+ YYSYMBOL_execute = 798, /* execute */
+ YYSYMBOL_799_3 = 799, /* $@3 */
+ YYSYMBOL_800_4 = 800, /* $@4 */
+ YYSYMBOL_execute_using = 801, /* execute_using */
+ YYSYMBOL_802_5 = 802, /* $@5 */
+ YYSYMBOL_execute_params = 803, /* execute_params */
+ YYSYMBOL_help = 804, /* help */
+ YYSYMBOL_805_6 = 805, /* $@6 */
+ YYSYMBOL_change = 806, /* change */
+ YYSYMBOL_807_7 = 807, /* $@7 */
+ YYSYMBOL_master_defs = 808, /* master_defs */
+ YYSYMBOL_master_def = 809, /* master_def */
+ YYSYMBOL_ignore_server_id_list = 810, /* ignore_server_id_list */
+ YYSYMBOL_ignore_server_id = 811, /* ignore_server_id */
+ YYSYMBOL_do_domain_id_list = 812, /* do_domain_id_list */
+ YYSYMBOL_do_domain_id = 813, /* do_domain_id */
+ YYSYMBOL_ignore_domain_id_list = 814, /* ignore_domain_id_list */
+ YYSYMBOL_ignore_domain_id = 815, /* ignore_domain_id */
+ YYSYMBOL_master_file_def = 816, /* master_file_def */
+ YYSYMBOL_optional_connection_name = 817, /* optional_connection_name */
+ YYSYMBOL_connection_name = 818, /* connection_name */
+ YYSYMBOL_optional_for_channel = 819, /* optional_for_channel */
+ YYSYMBOL_for_channel = 820, /* for_channel */
+ YYSYMBOL_create = 821, /* create */
+ YYSYMBOL_822_8 = 822, /* $@8 */
+ YYSYMBOL_823_9 = 823, /* $@9 */
+ YYSYMBOL_824_10 = 824, /* $@10 */
+ YYSYMBOL_825_11 = 825, /* $@11 */
+ YYSYMBOL_826_12 = 826, /* $@12 */
+ YYSYMBOL_827_13 = 827, /* $@13 */
+ YYSYMBOL_828_14 = 828, /* $@14 */
+ YYSYMBOL_829_15 = 829, /* $@15 */
+ YYSYMBOL_830_16 = 830, /* $@16 */
+ YYSYMBOL_831_17 = 831, /* $@17 */
+ YYSYMBOL_832_18 = 832, /* $@18 */
+ YYSYMBOL_833_19 = 833, /* $@19 */
+ YYSYMBOL_834_20 = 834, /* $@20 */
+ YYSYMBOL_835_21 = 835, /* $@21 */
+ YYSYMBOL_836_22 = 836, /* $@22 */
+ YYSYMBOL_837_23 = 837, /* $@23 */
+ YYSYMBOL_838_24 = 838, /* $@24 */
+ YYSYMBOL_opt_sequence = 839, /* opt_sequence */
+ YYSYMBOL_sequence_defs = 840, /* sequence_defs */
+ YYSYMBOL_sequence_def = 841, /* sequence_def */
+ YYSYMBOL_force_lookahead = 842, /* force_lookahead */
+ YYSYMBOL_server_def = 843, /* server_def */
+ YYSYMBOL_844_25 = 844, /* $@25 */
+ YYSYMBOL_server_options_list = 845, /* server_options_list */
+ YYSYMBOL_server_option = 846, /* server_option */
+ YYSYMBOL_event_tail = 847, /* event_tail */
+ YYSYMBOL_848_26 = 848, /* $@26 */
+ YYSYMBOL_ev_schedule_time = 849, /* ev_schedule_time */
+ YYSYMBOL_850_27 = 850, /* $@27 */
+ YYSYMBOL_opt_ev_status = 851, /* opt_ev_status */
+ YYSYMBOL_ev_starts = 852, /* ev_starts */
+ YYSYMBOL_ev_ends = 853, /* ev_ends */
+ YYSYMBOL_opt_ev_on_completion = 854, /* opt_ev_on_completion */
+ YYSYMBOL_ev_on_completion = 855, /* ev_on_completion */
+ YYSYMBOL_opt_ev_comment = 856, /* opt_ev_comment */
+ YYSYMBOL_ev_sql_stmt = 857, /* ev_sql_stmt */
+ YYSYMBOL_858_28 = 858, /* $@28 */
+ YYSYMBOL_clear_privileges = 859, /* clear_privileges */
+ YYSYMBOL_opt_aggregate = 860, /* opt_aggregate */
+ YYSYMBOL_sp_handler = 861, /* sp_handler */
+ YYSYMBOL_sp_name = 862, /* sp_name */
+ YYSYMBOL_sp_a_chistics = 863, /* sp_a_chistics */
+ YYSYMBOL_sp_c_chistics = 864, /* sp_c_chistics */
+ YYSYMBOL_sp_chistic = 865, /* sp_chistic */
+ YYSYMBOL_sp_c_chistic = 866, /* sp_c_chistic */
+ YYSYMBOL_sp_suid = 867, /* sp_suid */
+ YYSYMBOL_call = 868, /* call */
+ YYSYMBOL_869_29 = 869, /* $@29 */
+ YYSYMBOL_870_30 = 870, /* $@30 */
+ YYSYMBOL_871_31 = 871, /* $@31 */
+ YYSYMBOL_opt_sp_cparam_list = 872, /* opt_sp_cparam_list */
+ YYSYMBOL_opt_sp_cparams = 873, /* opt_sp_cparams */
+ YYSYMBOL_sp_cparams = 874, /* sp_cparams */
+ YYSYMBOL_sp_fdparam_list = 875, /* sp_fdparam_list */
+ YYSYMBOL_876_32 = 876, /* $@32 */
+ YYSYMBOL_sp_fdparams = 877, /* sp_fdparams */
+ YYSYMBOL_sp_param_name = 878, /* sp_param_name */
+ YYSYMBOL_sp_pdparam_list = 879, /* sp_pdparam_list */
+ YYSYMBOL_sp_pdparams = 880, /* sp_pdparams */
+ YYSYMBOL_sp_parameter_type = 881, /* sp_parameter_type */
+ YYSYMBOL_sp_parenthesized_pdparam_list = 882, /* sp_parenthesized_pdparam_list */
+ YYSYMBOL_883_33 = 883, /* $@33 */
+ YYSYMBOL_sp_parenthesized_fdparam_list = 884, /* sp_parenthesized_fdparam_list */
+ YYSYMBOL_sp_proc_stmts = 885, /* sp_proc_stmts */
+ YYSYMBOL_sp_proc_stmts1 = 886, /* sp_proc_stmts1 */
+ YYSYMBOL_optionally_qualified_column_ident = 887, /* optionally_qualified_column_ident */
+ YYSYMBOL_row_field_definition = 888, /* row_field_definition */
+ YYSYMBOL_row_field_definition_list = 889, /* row_field_definition_list */
+ YYSYMBOL_row_type_body = 890, /* row_type_body */
+ YYSYMBOL_sp_decl_idents_init_vars = 891, /* sp_decl_idents_init_vars */
+ YYSYMBOL_sp_decl_variable_list = 892, /* sp_decl_variable_list */
+ YYSYMBOL_893_34 = 893, /* $@34 */
+ YYSYMBOL_sp_decl_handler = 894, /* sp_decl_handler */
+ YYSYMBOL_895_35 = 895, /* $@35 */
+ YYSYMBOL_opt_parenthesized_cursor_formal_parameters = 896, /* opt_parenthesized_cursor_formal_parameters */
+ YYSYMBOL_sp_cursor_stmt_lex = 897, /* sp_cursor_stmt_lex */
+ YYSYMBOL_sp_cursor_stmt = 898, /* sp_cursor_stmt */
+ YYSYMBOL_899_36 = 899, /* $@36 */
+ YYSYMBOL_sp_handler_type = 900, /* sp_handler_type */
+ YYSYMBOL_sp_hcond_list = 901, /* sp_hcond_list */
+ YYSYMBOL_sp_hcond_element = 902, /* sp_hcond_element */
+ YYSYMBOL_sp_cond = 903, /* sp_cond */
+ YYSYMBOL_sqlstate = 904, /* sqlstate */
+ YYSYMBOL_opt_value = 905, /* opt_value */
+ YYSYMBOL_sp_hcond = 906, /* sp_hcond */
+ YYSYMBOL_raise_stmt_oracle = 907, /* raise_stmt_oracle */
+ YYSYMBOL_signal_stmt = 908, /* signal_stmt */
+ YYSYMBOL_signal_value = 909, /* signal_value */
+ YYSYMBOL_opt_signal_value = 910, /* opt_signal_value */
+ YYSYMBOL_opt_set_signal_information = 911, /* opt_set_signal_information */
+ YYSYMBOL_signal_information_item_list = 912, /* signal_information_item_list */
+ YYSYMBOL_signal_allowed_expr = 913, /* signal_allowed_expr */
+ YYSYMBOL_signal_condition_information_item_name = 914, /* signal_condition_information_item_name */
+ YYSYMBOL_resignal_stmt = 915, /* resignal_stmt */
+ YYSYMBOL_get_diagnostics = 916, /* get_diagnostics */
+ YYSYMBOL_which_area = 917, /* which_area */
+ YYSYMBOL_diagnostics_information = 918, /* diagnostics_information */
+ YYSYMBOL_statement_information = 919, /* statement_information */
+ YYSYMBOL_statement_information_item = 920, /* statement_information_item */
+ YYSYMBOL_simple_target_specification = 921, /* simple_target_specification */
+ YYSYMBOL_statement_information_item_name = 922, /* statement_information_item_name */
+ YYSYMBOL_condition_number = 923, /* condition_number */
+ YYSYMBOL_condition_information = 924, /* condition_information */
+ YYSYMBOL_condition_information_item = 925, /* condition_information_item */
+ YYSYMBOL_condition_information_item_name = 926, /* condition_information_item_name */
+ YYSYMBOL_sp_decl_ident = 927, /* sp_decl_ident */
+ YYSYMBOL_sp_decl_idents = 928, /* sp_decl_idents */
+ YYSYMBOL_sp_proc_stmt_if = 929, /* sp_proc_stmt_if */
+ YYSYMBOL_930_37 = 930, /* $@37 */
+ YYSYMBOL_sp_proc_stmt_statement = 931, /* sp_proc_stmt_statement */
+ YYSYMBOL_932_38 = 932, /* $@38 */
+ YYSYMBOL_RETURN_ALLMODES_SYM = 933, /* RETURN_ALLMODES_SYM */
+ YYSYMBOL_sp_proc_stmt_return = 934, /* sp_proc_stmt_return */
+ YYSYMBOL_935_39 = 935, /* $@39 */
+ YYSYMBOL_sp_proc_stmt_exit_oracle = 936, /* sp_proc_stmt_exit_oracle */
+ YYSYMBOL_937_40 = 937, /* $@40 */
+ YYSYMBOL_938_41 = 938, /* $@41 */
+ YYSYMBOL_sp_proc_stmt_continue_oracle = 939, /* sp_proc_stmt_continue_oracle */
+ YYSYMBOL_940_42 = 940, /* $@42 */
+ YYSYMBOL_941_43 = 941, /* $@43 */
+ YYSYMBOL_sp_proc_stmt_leave = 942, /* sp_proc_stmt_leave */
+ YYSYMBOL_sp_proc_stmt_iterate = 943, /* sp_proc_stmt_iterate */
+ YYSYMBOL_sp_proc_stmt_goto_oracle = 944, /* sp_proc_stmt_goto_oracle */
+ YYSYMBOL_expr_lex = 945, /* expr_lex */
+ YYSYMBOL_946_44 = 946, /* @44 */
+ YYSYMBOL_assignment_source_lex = 947, /* assignment_source_lex */
+ YYSYMBOL_assignment_source_expr = 948, /* assignment_source_expr */
+ YYSYMBOL_949_45 = 949, /* $@45 */
+ YYSYMBOL_for_loop_bound_expr = 950, /* for_loop_bound_expr */
+ YYSYMBOL_951_46 = 951, /* $@46 */
+ YYSYMBOL_cursor_actual_parameters = 952, /* cursor_actual_parameters */
+ YYSYMBOL_opt_parenthesized_cursor_actual_parameters = 953, /* opt_parenthesized_cursor_actual_parameters */
+ YYSYMBOL_sp_proc_stmt_with_cursor = 954, /* sp_proc_stmt_with_cursor */
+ YYSYMBOL_sp_proc_stmt_open = 955, /* sp_proc_stmt_open */
+ YYSYMBOL_sp_proc_stmt_fetch_head = 956, /* sp_proc_stmt_fetch_head */
+ YYSYMBOL_sp_proc_stmt_fetch = 957, /* sp_proc_stmt_fetch */
+ YYSYMBOL_sp_proc_stmt_close = 958, /* sp_proc_stmt_close */
+ YYSYMBOL_sp_fetch_list = 959, /* sp_fetch_list */
+ YYSYMBOL_sp_if = 960, /* sp_if */
+ YYSYMBOL_961_47 = 961, /* $@47 */
+ YYSYMBOL_962_48 = 962, /* $@48 */
+ YYSYMBOL_sp_elseifs = 963, /* sp_elseifs */
+ YYSYMBOL_case_stmt_specification = 964, /* case_stmt_specification */
+ YYSYMBOL_965_49 = 965, /* $@49 */
+ YYSYMBOL_case_stmt_body = 966, /* case_stmt_body */
+ YYSYMBOL_967_50 = 967, /* $@50 */
+ YYSYMBOL_simple_when_clause_list = 968, /* simple_when_clause_list */
+ YYSYMBOL_searched_when_clause_list = 969, /* searched_when_clause_list */
+ YYSYMBOL_simple_when_clause = 970, /* simple_when_clause */
+ YYSYMBOL_971_51 = 971, /* $@51 */
+ YYSYMBOL_searched_when_clause = 972, /* searched_when_clause */
+ YYSYMBOL_973_52 = 973, /* $@52 */
+ YYSYMBOL_else_clause_opt = 974, /* else_clause_opt */
+ YYSYMBOL_sp_opt_label = 975, /* sp_opt_label */
+ YYSYMBOL_opt_sp_for_loop_direction = 976, /* opt_sp_for_loop_direction */
+ YYSYMBOL_sp_for_loop_index_and_bounds = 977, /* sp_for_loop_index_and_bounds */
+ YYSYMBOL_sp_for_loop_bounds = 978, /* sp_for_loop_bounds */
+ YYSYMBOL_loop_body = 979, /* loop_body */
+ YYSYMBOL_repeat_body = 980, /* repeat_body */
+ YYSYMBOL_pop_sp_loop_label = 981, /* pop_sp_loop_label */
+ YYSYMBOL_sp_labeled_control = 982, /* sp_labeled_control */
+ YYSYMBOL_983_53 = 983, /* $@53 */
+ YYSYMBOL_984_54 = 984, /* $@54 */
+ YYSYMBOL_985_55 = 985, /* $@55 */
+ YYSYMBOL_986_56 = 986, /* $@56 */
+ YYSYMBOL_987_57 = 987, /* $@57 */
+ YYSYMBOL_988_58 = 988, /* $@58 */
+ YYSYMBOL_sp_unlabeled_control = 989, /* sp_unlabeled_control */
+ YYSYMBOL_990_59 = 990, /* $@59 */
+ YYSYMBOL_991_60 = 991, /* $@60 */
+ YYSYMBOL_992_61 = 992, /* $@61 */
+ YYSYMBOL_993_62 = 993, /* $@62 */
+ YYSYMBOL_994_63 = 994, /* $@63 */
+ YYSYMBOL_trg_action_time = 995, /* trg_action_time */
+ YYSYMBOL_trg_event = 996, /* trg_event */
+ YYSYMBOL_create_body = 997, /* create_body */
+ YYSYMBOL_998_64 = 998, /* $@64 */
+ YYSYMBOL_create_like = 999, /* create_like */
+ YYSYMBOL_opt_create_select = 1000, /* opt_create_select */
+ YYSYMBOL_create_select_query_expression = 1001, /* create_select_query_expression */
+ YYSYMBOL_opt_create_partitioning = 1002, /* opt_create_partitioning */
+ YYSYMBOL_opt_partitioning = 1003, /* opt_partitioning */
+ YYSYMBOL_partitioning = 1004, /* partitioning */
+ YYSYMBOL_1005_65 = 1005, /* $@65 */
+ YYSYMBOL_have_partitioning = 1006, /* have_partitioning */
+ YYSYMBOL_partition_entry = 1007, /* partition_entry */
+ YYSYMBOL_1008_66 = 1008, /* $@66 */
+ YYSYMBOL_partition = 1009, /* partition */
+ YYSYMBOL_1010_67 = 1010, /* $@67 */
+ YYSYMBOL_part_type_def = 1011, /* part_type_def */
+ YYSYMBOL_1012_68 = 1012, /* $@68 */
+ YYSYMBOL_1013_69 = 1013, /* $@69 */
+ YYSYMBOL_1014_70 = 1014, /* $@70 */
+ YYSYMBOL_opt_linear = 1015, /* opt_linear */
+ YYSYMBOL_opt_key_algo = 1016, /* opt_key_algo */
+ YYSYMBOL_part_field_list = 1017, /* part_field_list */
+ YYSYMBOL_part_field_item_list = 1018, /* part_field_item_list */
+ YYSYMBOL_part_field_item = 1019, /* part_field_item */
+ YYSYMBOL_part_column_list = 1020, /* part_column_list */
+ YYSYMBOL_part_func = 1021, /* part_func */
+ YYSYMBOL_sub_part_func = 1022, /* sub_part_func */
+ YYSYMBOL_opt_num_parts = 1023, /* opt_num_parts */
+ YYSYMBOL_opt_sub_part = 1024, /* opt_sub_part */
+ YYSYMBOL_1025_71 = 1025, /* $@71 */
+ YYSYMBOL_1026_72 = 1026, /* $@72 */
+ YYSYMBOL_sub_part_field_list = 1027, /* sub_part_field_list */
+ YYSYMBOL_sub_part_field_item = 1028, /* sub_part_field_item */
+ YYSYMBOL_part_func_expr = 1029, /* part_func_expr */
+ YYSYMBOL_opt_num_subparts = 1030, /* opt_num_subparts */
+ YYSYMBOL_part_defs = 1031, /* part_defs */
+ YYSYMBOL_part_def_list = 1032, /* part_def_list */
+ YYSYMBOL_opt_partition = 1033, /* opt_partition */
+ YYSYMBOL_part_definition = 1034, /* part_definition */
+ YYSYMBOL_1035_73 = 1035, /* $@73 */
+ YYSYMBOL_part_name = 1036, /* part_name */
+ YYSYMBOL_opt_part_values = 1037, /* opt_part_values */
+ YYSYMBOL_1038_74 = 1038, /* $@74 */
+ YYSYMBOL_1039_75 = 1039, /* $@75 */
+ YYSYMBOL_part_func_max = 1040, /* part_func_max */
+ YYSYMBOL_part_values_in = 1041, /* part_values_in */
+ YYSYMBOL_part_value_list = 1042, /* part_value_list */
+ YYSYMBOL_part_value_item = 1043, /* part_value_item */
+ YYSYMBOL_1044_76 = 1044, /* $@76 */
+ YYSYMBOL_1045_77 = 1045, /* $@77 */
+ YYSYMBOL_part_value_item_list = 1046, /* part_value_item_list */
+ YYSYMBOL_part_value_expr_item = 1047, /* part_value_expr_item */
+ YYSYMBOL_opt_sub_partition = 1048, /* opt_sub_partition */
+ YYSYMBOL_sub_part_list = 1049, /* sub_part_list */
+ YYSYMBOL_sub_part_definition = 1050, /* sub_part_definition */
+ YYSYMBOL_1051_78 = 1051, /* $@78 */
+ YYSYMBOL_sub_name = 1052, /* sub_name */
+ YYSYMBOL_opt_part_options = 1053, /* opt_part_options */
+ YYSYMBOL_part_option_list = 1054, /* part_option_list */
+ YYSYMBOL_part_option = 1055, /* part_option */
+ YYSYMBOL_opt_subpart_options = 1056, /* opt_subpart_options */
+ YYSYMBOL_subpart_option_list = 1057, /* subpart_option_list */
+ YYSYMBOL_server_part_option = 1058, /* server_part_option */
+ YYSYMBOL_opt_versioning_rotation = 1059, /* opt_versioning_rotation */
+ YYSYMBOL_1060_79 = 1060, /* $@79 */
+ YYSYMBOL_opt_versioning_interval_start = 1061, /* opt_versioning_interval_start */
+ YYSYMBOL_opt_vers_auto_part = 1062, /* opt_vers_auto_part */
+ YYSYMBOL_opt_as = 1063, /* opt_as */
+ YYSYMBOL_opt_create_database_options = 1064, /* opt_create_database_options */
+ YYSYMBOL_create_database_options = 1065, /* create_database_options */
+ YYSYMBOL_create_database_option = 1066, /* create_database_option */
+ YYSYMBOL_opt_if_not_exists_table_element = 1067, /* opt_if_not_exists_table_element */
+ YYSYMBOL_opt_if_not_exists = 1068, /* opt_if_not_exists */
+ YYSYMBOL_create_or_replace = 1069, /* create_or_replace */
+ YYSYMBOL_opt_create_table_options = 1070, /* opt_create_table_options */
+ YYSYMBOL_create_table_options_space_separated = 1071, /* create_table_options_space_separated */
+ YYSYMBOL_create_table_options = 1072, /* create_table_options */
+ YYSYMBOL_create_table_option = 1073, /* create_table_option */
+ YYSYMBOL_1074_80 = 1074, /* $@80 */
+ YYSYMBOL_engine_defined_option = 1075, /* engine_defined_option */
+ YYSYMBOL_opt_versioning_option = 1076, /* opt_versioning_option */
+ YYSYMBOL_versioning_option = 1077, /* versioning_option */
+ YYSYMBOL_default_charset = 1078, /* default_charset */
+ YYSYMBOL_default_collation = 1079, /* default_collation */
+ YYSYMBOL_storage_engines = 1080, /* storage_engines */
+ YYSYMBOL_known_storage_engines = 1081, /* known_storage_engines */
+ YYSYMBOL_row_types = 1082, /* row_types */
+ YYSYMBOL_merge_insert_types = 1083, /* merge_insert_types */
+ YYSYMBOL_udf_type = 1084, /* udf_type */
+ YYSYMBOL_create_field_list = 1085, /* create_field_list */
+ YYSYMBOL_create_field_list_parens = 1086, /* create_field_list_parens */
+ YYSYMBOL_field_list = 1087, /* field_list */
+ YYSYMBOL_field_list_item = 1088, /* field_list_item */
+ YYSYMBOL_column_def = 1089, /* column_def */
+ YYSYMBOL_key_def = 1090, /* key_def */
+ YYSYMBOL_1091_81 = 1091, /* $@81 */
+ YYSYMBOL_1092_82 = 1092, /* $@82 */
+ YYSYMBOL_1093_83 = 1093, /* $@83 */
+ YYSYMBOL_1094_84 = 1094, /* $@84 */
+ YYSYMBOL_1095_85 = 1095, /* $@85 */
+ YYSYMBOL_1096_86 = 1096, /* $@86 */
+ YYSYMBOL_1097_87 = 1097, /* $@87 */
+ YYSYMBOL_constraint_def = 1098, /* constraint_def */
+ YYSYMBOL_period_for_system_time = 1099, /* period_for_system_time */
+ YYSYMBOL_period_for_application_time = 1100, /* period_for_application_time */
+ YYSYMBOL_opt_check_constraint = 1101, /* opt_check_constraint */
+ YYSYMBOL_check_constraint = 1102, /* check_constraint */
+ YYSYMBOL_opt_constraint_no_id = 1103, /* opt_constraint_no_id */
+ YYSYMBOL_opt_constraint = 1104, /* opt_constraint */
+ YYSYMBOL_constraint = 1105, /* constraint */
+ YYSYMBOL_field_spec = 1106, /* field_spec */
+ YYSYMBOL_1107_88 = 1107, /* @88 */
+ YYSYMBOL_field_type_or_serial = 1108, /* field_type_or_serial */
+ YYSYMBOL_1109_89 = 1109, /* $@89 */
+ YYSYMBOL_1110_90 = 1110, /* $@90 */
+ YYSYMBOL_opt_serial_attribute = 1111, /* opt_serial_attribute */
+ YYSYMBOL_opt_serial_attribute_list = 1112, /* opt_serial_attribute_list */
+ YYSYMBOL_opt_asrow_attribute = 1113, /* opt_asrow_attribute */
+ YYSYMBOL_opt_asrow_attribute_list = 1114, /* opt_asrow_attribute_list */
+ YYSYMBOL_field_def = 1115, /* field_def */
+ YYSYMBOL_1116_91 = 1116, /* $@91 */
+ YYSYMBOL_opt_generated_always = 1117, /* opt_generated_always */
+ YYSYMBOL_vcol_opt_specifier = 1118, /* vcol_opt_specifier */
+ YYSYMBOL_vcol_opt_attribute = 1119, /* vcol_opt_attribute */
+ YYSYMBOL_vcol_opt_attribute_list = 1120, /* vcol_opt_attribute_list */
+ YYSYMBOL_vcol_attribute = 1121, /* vcol_attribute */
+ YYSYMBOL_parse_vcol_expr = 1122, /* parse_vcol_expr */
+ YYSYMBOL_1123_92 = 1123, /* $@92 */
+ YYSYMBOL_parenthesized_expr = 1124, /* parenthesized_expr */
+ YYSYMBOL_virtual_column_func = 1125, /* virtual_column_func */
+ YYSYMBOL_expr_or_literal = 1126, /* expr_or_literal */
+ YYSYMBOL_column_default_expr = 1127, /* column_default_expr */
+ YYSYMBOL_field_type = 1128, /* field_type */
+ YYSYMBOL_qualified_field_type = 1129, /* qualified_field_type */
+ YYSYMBOL_udt_name = 1130, /* udt_name */
+ YYSYMBOL_field_type_all = 1131, /* field_type_all */
+ YYSYMBOL_field_type_numeric = 1132, /* field_type_numeric */
+ YYSYMBOL_opt_binary_and_compression = 1133, /* opt_binary_and_compression */
+ YYSYMBOL_field_type_string = 1134, /* field_type_string */
+ YYSYMBOL_field_type_temporal = 1135, /* field_type_temporal */
+ YYSYMBOL_field_type_lob = 1136, /* field_type_lob */
+ YYSYMBOL_field_type_misc = 1137, /* field_type_misc */
+ YYSYMBOL_char = 1138, /* char */
+ YYSYMBOL_nchar = 1139, /* nchar */
+ YYSYMBOL_varchar = 1140, /* varchar */
+ YYSYMBOL_nvarchar = 1141, /* nvarchar */
+ YYSYMBOL_int_type = 1142, /* int_type */
+ YYSYMBOL_real_type = 1143, /* real_type */
+ YYSYMBOL_srid_option = 1144, /* srid_option */
+ YYSYMBOL_float_options = 1145, /* float_options */
+ YYSYMBOL_precision = 1146, /* precision */
+ YYSYMBOL_field_options = 1147, /* field_options */
+ YYSYMBOL_last_field_options = 1148, /* last_field_options */
+ YYSYMBOL_field_length_str = 1149, /* field_length_str */
+ YYSYMBOL_field_length = 1150, /* field_length */
+ YYSYMBOL_field_scale = 1151, /* field_scale */
+ YYSYMBOL_opt_field_length = 1152, /* opt_field_length */
+ YYSYMBOL_opt_field_scale = 1153, /* opt_field_scale */
+ YYSYMBOL_opt_precision = 1154, /* opt_precision */
+ YYSYMBOL_attribute_list = 1155, /* attribute_list */
+ YYSYMBOL_attribute = 1156, /* attribute */
+ YYSYMBOL_opt_compression_method = 1157, /* opt_compression_method */
+ YYSYMBOL_opt_compressed = 1158, /* opt_compressed */
+ YYSYMBOL_opt_enable = 1159, /* opt_enable */
+ YYSYMBOL_compressed = 1160, /* compressed */
+ YYSYMBOL_compressed_deprecated_data_type_attribute = 1161, /* compressed_deprecated_data_type_attribute */
+ YYSYMBOL_compressed_deprecated_column_attribute = 1162, /* compressed_deprecated_column_attribute */
+ YYSYMBOL_asrow_attribute = 1163, /* asrow_attribute */
+ YYSYMBOL_serial_attribute = 1164, /* serial_attribute */
+ YYSYMBOL_with_or_without_system = 1165, /* with_or_without_system */
+ YYSYMBOL_charset = 1166, /* charset */
+ YYSYMBOL_charset_name = 1167, /* charset_name */
+ YYSYMBOL_charset_name_or_default = 1168, /* charset_name_or_default */
+ YYSYMBOL_opt_load_data_charset = 1169, /* opt_load_data_charset */
+ YYSYMBOL_old_or_new_charset_name = 1170, /* old_or_new_charset_name */
+ YYSYMBOL_old_or_new_charset_name_or_default = 1171, /* old_or_new_charset_name_or_default */
+ YYSYMBOL_collation_name = 1172, /* collation_name */
+ YYSYMBOL_collation_name_or_default = 1173, /* collation_name_or_default */
+ YYSYMBOL_opt_default = 1174, /* opt_default */
+ YYSYMBOL_charset_or_alias = 1175, /* charset_or_alias */
+ YYSYMBOL_opt_binary = 1176, /* opt_binary */
+ YYSYMBOL_binary = 1177, /* binary */
+ YYSYMBOL_opt_bin_mod = 1178, /* opt_bin_mod */
+ YYSYMBOL_ws_nweights = 1179, /* ws_nweights */
+ YYSYMBOL_1180_93 = 1180, /* $@93 */
+ YYSYMBOL_ws_level_flag_desc = 1181, /* ws_level_flag_desc */
+ YYSYMBOL_ws_level_flag_reverse = 1182, /* ws_level_flag_reverse */
+ YYSYMBOL_ws_level_flags = 1183, /* ws_level_flags */
+ YYSYMBOL_ws_level_number = 1184, /* ws_level_number */
+ YYSYMBOL_ws_level_list_item = 1185, /* ws_level_list_item */
+ YYSYMBOL_ws_level_list = 1186, /* ws_level_list */
+ YYSYMBOL_ws_level_range = 1187, /* ws_level_range */
+ YYSYMBOL_ws_level_list_or_range = 1188, /* ws_level_list_or_range */
+ YYSYMBOL_opt_ws_levels = 1189, /* opt_ws_levels */
+ YYSYMBOL_opt_primary = 1190, /* opt_primary */
+ YYSYMBOL_references = 1191, /* references */
+ YYSYMBOL_opt_ref_list = 1192, /* opt_ref_list */
+ YYSYMBOL_ref_list = 1193, /* ref_list */
+ YYSYMBOL_opt_match_clause = 1194, /* opt_match_clause */
+ YYSYMBOL_opt_on_update_delete = 1195, /* opt_on_update_delete */
+ YYSYMBOL_delete_option = 1196, /* delete_option */
+ YYSYMBOL_constraint_key_type = 1197, /* constraint_key_type */
+ YYSYMBOL_key_or_index = 1198, /* key_or_index */
+ YYSYMBOL_opt_key_or_index = 1199, /* opt_key_or_index */
+ YYSYMBOL_keys_or_index = 1200, /* keys_or_index */
+ YYSYMBOL_fulltext = 1201, /* fulltext */
+ YYSYMBOL_spatial = 1202, /* spatial */
+ YYSYMBOL_normal_key_options = 1203, /* normal_key_options */
+ YYSYMBOL_fulltext_key_options = 1204, /* fulltext_key_options */
+ YYSYMBOL_spatial_key_options = 1205, /* spatial_key_options */
+ YYSYMBOL_normal_key_opts = 1206, /* normal_key_opts */
+ YYSYMBOL_spatial_key_opts = 1207, /* spatial_key_opts */
+ YYSYMBOL_fulltext_key_opts = 1208, /* fulltext_key_opts */
+ YYSYMBOL_opt_USING_key_algorithm = 1209, /* opt_USING_key_algorithm */
+ YYSYMBOL_opt_key_algorithm_clause = 1210, /* opt_key_algorithm_clause */
+ YYSYMBOL_key_using_alg = 1211, /* key_using_alg */
+ YYSYMBOL_all_key_opt = 1212, /* all_key_opt */
+ YYSYMBOL_normal_key_opt = 1213, /* normal_key_opt */
+ YYSYMBOL_spatial_key_opt = 1214, /* spatial_key_opt */
+ YYSYMBOL_fulltext_key_opt = 1215, /* fulltext_key_opt */
+ YYSYMBOL_btree_or_rtree = 1216, /* btree_or_rtree */
+ YYSYMBOL_ignorability = 1217, /* ignorability */
+ YYSYMBOL_key_list = 1218, /* key_list */
+ YYSYMBOL_opt_without_overlaps = 1219, /* opt_without_overlaps */
+ YYSYMBOL_key_part = 1220, /* key_part */
+ YYSYMBOL_opt_ident = 1221, /* opt_ident */
+ YYSYMBOL_string_list = 1222, /* string_list */
+ YYSYMBOL_alter = 1223, /* alter */
+ YYSYMBOL_1224_94 = 1224, /* $@94 */
+ YYSYMBOL_1225_95 = 1225, /* $@95 */
+ YYSYMBOL_1226_96 = 1226, /* $@96 */
+ YYSYMBOL_1227_97 = 1227, /* $@97 */
+ YYSYMBOL_1228_98 = 1228, /* $@98 */
+ YYSYMBOL_1229_99 = 1229, /* $@99 */
+ YYSYMBOL_1230_100 = 1230, /* $@100 */
+ YYSYMBOL_1231_101 = 1231, /* $@101 */
+ YYSYMBOL_1232_102 = 1232, /* $@102 */
+ YYSYMBOL_1233_103 = 1233, /* $@103 */
+ YYSYMBOL_1234_104 = 1234, /* $@104 */
+ YYSYMBOL_1235_105 = 1235, /* $@105 */
+ YYSYMBOL_1236_106 = 1236, /* $@106 */
+ YYSYMBOL_account_locking_option = 1237, /* account_locking_option */
+ YYSYMBOL_opt_password_expire_option = 1238, /* opt_password_expire_option */
+ YYSYMBOL_opt_account_locking_and_opt_password_expiration = 1239, /* opt_account_locking_and_opt_password_expiration */
+ YYSYMBOL_ev_alter_on_schedule_completion = 1240, /* ev_alter_on_schedule_completion */
+ YYSYMBOL_opt_ev_rename_to = 1241, /* opt_ev_rename_to */
+ YYSYMBOL_opt_ev_sql_stmt = 1242, /* opt_ev_sql_stmt */
+ YYSYMBOL_ident_or_empty = 1243, /* ident_or_empty */
+ YYSYMBOL_alter_commands = 1244, /* alter_commands */
+ YYSYMBOL_1245_107 = 1245, /* $@107 */
+ YYSYMBOL_1246_108 = 1246, /* $@108 */
+ YYSYMBOL_1247_109 = 1247, /* $@109 */
+ YYSYMBOL_1248_110 = 1248, /* $@110 */
+ YYSYMBOL_remove_partitioning = 1249, /* remove_partitioning */
+ YYSYMBOL_all_or_alt_part_name_list = 1250, /* all_or_alt_part_name_list */
+ YYSYMBOL_add_partition_rule = 1251, /* add_partition_rule */
+ YYSYMBOL_1252_111 = 1252, /* $@111 */
+ YYSYMBOL_add_part_extra = 1253, /* add_part_extra */
+ YYSYMBOL_reorg_partition_rule = 1254, /* reorg_partition_rule */
+ YYSYMBOL_1255_112 = 1255, /* $@112 */
+ YYSYMBOL_reorg_parts_rule = 1256, /* reorg_parts_rule */
+ YYSYMBOL_1257_113 = 1257, /* $@113 */
+ YYSYMBOL_alt_part_name_list = 1258, /* alt_part_name_list */
+ YYSYMBOL_alt_part_name_item = 1259, /* alt_part_name_item */
+ YYSYMBOL_alter_list = 1260, /* alter_list */
+ YYSYMBOL_add_column = 1261, /* add_column */
+ YYSYMBOL_alter_list_item = 1262, /* alter_list_item */
+ YYSYMBOL_opt_index_lock_algorithm = 1263, /* opt_index_lock_algorithm */
+ YYSYMBOL_alter_algorithm_option = 1264, /* alter_algorithm_option */
+ YYSYMBOL_alter_lock_option = 1265, /* alter_lock_option */
+ YYSYMBOL_opt_column = 1266, /* opt_column */
+ YYSYMBOL_opt_ignore = 1267, /* opt_ignore */
+ YYSYMBOL_alter_options = 1268, /* alter_options */
+ YYSYMBOL_1269_114 = 1269, /* $@114 */
+ YYSYMBOL_alter_options_part2 = 1270, /* alter_options_part2 */
+ YYSYMBOL_alter_option_list = 1271, /* alter_option_list */
+ YYSYMBOL_alter_option = 1272, /* alter_option */
+ YYSYMBOL_opt_restrict = 1273, /* opt_restrict */
+ YYSYMBOL_opt_place = 1274, /* opt_place */
+ YYSYMBOL_opt_to = 1275, /* opt_to */
+ YYSYMBOL_slave = 1276, /* slave */
+ YYSYMBOL_1277_115 = 1277, /* $@115 */
+ YYSYMBOL_1278_116 = 1278, /* $@116 */
+ YYSYMBOL_start = 1279, /* start */
+ YYSYMBOL_opt_start_transaction_option_list = 1280, /* opt_start_transaction_option_list */
+ YYSYMBOL_start_transaction_option_list = 1281, /* start_transaction_option_list */
+ YYSYMBOL_start_transaction_option = 1282, /* start_transaction_option */
+ YYSYMBOL_slave_thread_opts = 1283, /* slave_thread_opts */
+ YYSYMBOL_1284_117 = 1284, /* $@117 */
+ YYSYMBOL_slave_thread_opt_list = 1285, /* slave_thread_opt_list */
+ YYSYMBOL_slave_thread_opt = 1286, /* slave_thread_opt */
+ YYSYMBOL_slave_until = 1287, /* slave_until */
+ YYSYMBOL_slave_until_opts = 1288, /* slave_until_opts */
+ YYSYMBOL_checksum = 1289, /* checksum */
+ YYSYMBOL_1290_118 = 1290, /* $@118 */
+ YYSYMBOL_opt_checksum_type = 1291, /* opt_checksum_type */
+ YYSYMBOL_repair_table_or_view = 1292, /* repair_table_or_view */
+ YYSYMBOL_1293_119 = 1293, /* $@119 */
+ YYSYMBOL_repair = 1294, /* repair */
+ YYSYMBOL_1295_120 = 1295, /* $@120 */
+ YYSYMBOL_opt_mi_repair_type = 1296, /* opt_mi_repair_type */
+ YYSYMBOL_mi_repair_types = 1297, /* mi_repair_types */
+ YYSYMBOL_mi_repair_type = 1298, /* mi_repair_type */
+ YYSYMBOL_opt_view_repair_type = 1299, /* opt_view_repair_type */
+ YYSYMBOL_analyze = 1300, /* analyze */
+ YYSYMBOL_1301_121 = 1301, /* $@121 */
+ YYSYMBOL_analyze_table_list = 1302, /* analyze_table_list */
+ YYSYMBOL_analyze_table_elem_spec = 1303, /* analyze_table_elem_spec */
+ YYSYMBOL_opt_persistent_stat_clause = 1304, /* opt_persistent_stat_clause */
+ YYSYMBOL_persistent_stat_spec = 1305, /* persistent_stat_spec */
+ YYSYMBOL_persistent_column_stat_spec = 1306, /* persistent_column_stat_spec */
+ YYSYMBOL_1307_122 = 1307, /* $@122 */
+ YYSYMBOL_persistent_index_stat_spec = 1308, /* persistent_index_stat_spec */
+ YYSYMBOL_1309_123 = 1309, /* $@123 */
+ YYSYMBOL_table_column_list = 1310, /* table_column_list */
+ YYSYMBOL_table_index_list = 1311, /* table_index_list */
+ YYSYMBOL_table_index_name = 1312, /* table_index_name */
+ YYSYMBOL_binlog_base64_event = 1313, /* binlog_base64_event */
+ YYSYMBOL_check_view_or_table = 1314, /* check_view_or_table */
+ YYSYMBOL_1315_124 = 1315, /* $@124 */
+ YYSYMBOL_check = 1316, /* check */
+ YYSYMBOL_1317_125 = 1317, /* $@125 */
+ YYSYMBOL_opt_mi_check_type = 1318, /* opt_mi_check_type */
+ YYSYMBOL_mi_check_types = 1319, /* mi_check_types */
+ YYSYMBOL_mi_check_type = 1320, /* mi_check_type */
+ YYSYMBOL_opt_view_check_type = 1321, /* opt_view_check_type */
+ YYSYMBOL_optimize = 1322, /* optimize */
+ YYSYMBOL_1323_126 = 1323, /* $@126 */
+ YYSYMBOL_opt_no_write_to_binlog = 1324, /* opt_no_write_to_binlog */
+ YYSYMBOL_rename = 1325, /* rename */
+ YYSYMBOL_1326_127 = 1326, /* $@127 */
+ YYSYMBOL_rename_list = 1327, /* rename_list */
+ YYSYMBOL_table_to_table_list = 1328, /* table_to_table_list */
+ YYSYMBOL_table_to_table = 1329, /* table_to_table */
+ YYSYMBOL_keycache = 1330, /* keycache */
+ YYSYMBOL_1331_128 = 1331, /* $@128 */
+ YYSYMBOL_keycache_list_or_parts = 1332, /* keycache_list_or_parts */
+ YYSYMBOL_keycache_list = 1333, /* keycache_list */
+ YYSYMBOL_assign_to_keycache = 1334, /* assign_to_keycache */
+ YYSYMBOL_assign_to_keycache_parts = 1335, /* assign_to_keycache_parts */
+ YYSYMBOL_key_cache_name = 1336, /* key_cache_name */
+ YYSYMBOL_preload = 1337, /* preload */
+ YYSYMBOL_1338_129 = 1338, /* $@129 */
+ YYSYMBOL_preload_list_or_parts = 1339, /* preload_list_or_parts */
+ YYSYMBOL_preload_list = 1340, /* preload_list */
+ YYSYMBOL_preload_keys = 1341, /* preload_keys */
+ YYSYMBOL_preload_keys_parts = 1342, /* preload_keys_parts */
+ YYSYMBOL_adm_partition = 1343, /* adm_partition */
+ YYSYMBOL_1344_130 = 1344, /* $@130 */
+ YYSYMBOL_cache_keys_spec = 1345, /* cache_keys_spec */
+ YYSYMBOL_1346_131 = 1346, /* $@131 */
+ YYSYMBOL_cache_key_list_or_empty = 1347, /* cache_key_list_or_empty */
+ YYSYMBOL_opt_ignore_leaves = 1348, /* opt_ignore_leaves */
+ YYSYMBOL_select = 1349, /* select */
+ YYSYMBOL_1350_132 = 1350, /* $@132 */
+ YYSYMBOL_1351_133 = 1351, /* $@133 */
+ YYSYMBOL_select_into = 1352, /* select_into */
+ YYSYMBOL_1353_134 = 1353, /* $@134 */
+ YYSYMBOL_1354_135 = 1354, /* $@135 */
+ YYSYMBOL_simple_table = 1355, /* simple_table */
+ YYSYMBOL_table_value_constructor = 1356, /* table_value_constructor */
+ YYSYMBOL_1357_136 = 1357, /* $@136 */
+ YYSYMBOL_query_specification_start = 1358, /* query_specification_start */
+ YYSYMBOL_1359_137 = 1359, /* $@137 */
+ YYSYMBOL_1360_138 = 1360, /* $@138 */
+ YYSYMBOL_query_specification = 1361, /* query_specification */
+ YYSYMBOL_select_into_query_specification = 1362, /* select_into_query_specification */
+ YYSYMBOL_query_expression = 1363, /* query_expression */
+ YYSYMBOL_query_expression_no_with_clause = 1364, /* query_expression_no_with_clause */
+ YYSYMBOL_query_expression_body_ext = 1365, /* query_expression_body_ext */
+ YYSYMBOL_1366_139 = 1366, /* $@139 */
+ YYSYMBOL_1367_140 = 1367, /* $@140 */
+ YYSYMBOL_query_expression_body_ext_parens = 1368, /* query_expression_body_ext_parens */
+ YYSYMBOL_query_expression_body = 1369, /* query_expression_body */
+ YYSYMBOL_1370_141 = 1370, /* $@141 */
+ YYSYMBOL_query_primary = 1371, /* query_primary */
+ YYSYMBOL_query_simple = 1372, /* query_simple */
+ YYSYMBOL_subselect = 1373, /* subselect */
+ YYSYMBOL_subquery = 1374, /* subquery */
+ YYSYMBOL_opt_from_clause = 1375, /* opt_from_clause */
+ YYSYMBOL_from_clause = 1376, /* from_clause */
+ YYSYMBOL_table_reference_list = 1377, /* table_reference_list */
+ YYSYMBOL_select_options = 1378, /* select_options */
+ YYSYMBOL_opt_history_unit = 1379, /* opt_history_unit */
+ YYSYMBOL_history_point = 1380, /* history_point */
+ YYSYMBOL_for_portion_of_time_clause = 1381, /* for_portion_of_time_clause */
+ YYSYMBOL_opt_for_portion_of_time_clause = 1382, /* opt_for_portion_of_time_clause */
+ YYSYMBOL_opt_for_system_time_clause = 1383, /* opt_for_system_time_clause */
+ YYSYMBOL_system_time_expr = 1384, /* system_time_expr */
+ YYSYMBOL_select_option_list = 1385, /* select_option_list */
+ YYSYMBOL_select_option = 1386, /* select_option */
+ YYSYMBOL_select_lock_type = 1387, /* select_lock_type */
+ YYSYMBOL_opt_select_lock_type = 1388, /* opt_select_lock_type */
+ YYSYMBOL_opt_lock_wait_timeout_new = 1389, /* opt_lock_wait_timeout_new */
+ YYSYMBOL_select_item_list = 1390, /* select_item_list */
+ YYSYMBOL_select_item = 1391, /* select_item */
+ YYSYMBOL_remember_tok_start = 1392, /* remember_tok_start */
+ YYSYMBOL_remember_name = 1393, /* remember_name */
+ YYSYMBOL_remember_end = 1394, /* remember_end */
+ YYSYMBOL_select_alias = 1395, /* select_alias */
+ YYSYMBOL_opt_default_time_precision = 1396, /* opt_default_time_precision */
+ YYSYMBOL_opt_time_precision = 1397, /* opt_time_precision */
+ YYSYMBOL_optional_braces = 1398, /* optional_braces */
+ YYSYMBOL_expr = 1399, /* expr */
+ YYSYMBOL_boolean_test = 1400, /* boolean_test */
+ YYSYMBOL_predicate = 1401, /* predicate */
+ YYSYMBOL_bit_expr = 1402, /* bit_expr */
+ YYSYMBOL_or = 1403, /* or */
+ YYSYMBOL_and = 1404, /* and */
+ YYSYMBOL_not = 1405, /* not */
+ YYSYMBOL_not2 = 1406, /* not2 */
+ YYSYMBOL_comp_op = 1407, /* comp_op */
+ YYSYMBOL_all_or_any = 1408, /* all_or_any */
+ YYSYMBOL_opt_dyncol_type = 1409, /* opt_dyncol_type */
+ YYSYMBOL_dyncol_type = 1410, /* dyncol_type */
+ YYSYMBOL_numeric_dyncol_type = 1411, /* numeric_dyncol_type */
+ YYSYMBOL_temporal_dyncol_type = 1412, /* temporal_dyncol_type */
+ YYSYMBOL_string_dyncol_type = 1413, /* string_dyncol_type */
+ YYSYMBOL_dyncall_create_element = 1414, /* dyncall_create_element */
+ YYSYMBOL_dyncall_create_list = 1415, /* dyncall_create_list */
+ YYSYMBOL_plsql_cursor_attr = 1416, /* plsql_cursor_attr */
+ YYSYMBOL_explicit_cursor_attr = 1417, /* explicit_cursor_attr */
+ YYSYMBOL_trim_operands = 1418, /* trim_operands */
+ YYSYMBOL_trim_operands_regular = 1419, /* trim_operands_regular */
+ YYSYMBOL_trim_operands_special = 1420, /* trim_operands_special */
+ YYSYMBOL_column_default_non_parenthesized_expr = 1421, /* column_default_non_parenthesized_expr */
+ YYSYMBOL_primary_expr = 1422, /* primary_expr */
+ YYSYMBOL_string_factor_expr = 1423, /* string_factor_expr */
+ YYSYMBOL_simple_expr = 1424, /* simple_expr */
+ YYSYMBOL_mysql_concatenation_expr = 1425, /* mysql_concatenation_expr */
+ YYSYMBOL_function_call_keyword_timestamp = 1426, /* function_call_keyword_timestamp */
+ YYSYMBOL_function_call_keyword = 1427, /* function_call_keyword */
+ YYSYMBOL_substring_operands = 1428, /* substring_operands */
+ YYSYMBOL_substring_operands_regular = 1429, /* substring_operands_regular */
+ YYSYMBOL_substring_operands_special = 1430, /* substring_operands_special */
+ YYSYMBOL_function_call_nonkeyword = 1431, /* function_call_nonkeyword */
+ YYSYMBOL_function_call_conflict = 1432, /* function_call_conflict */
+ YYSYMBOL_function_call_generic = 1433, /* function_call_generic */
+ YYSYMBOL_1434_142 = 1434, /* @142 */
+ YYSYMBOL_fulltext_options = 1435, /* fulltext_options */
+ YYSYMBOL_opt_natural_language_mode = 1436, /* opt_natural_language_mode */
+ YYSYMBOL_opt_query_expansion = 1437, /* opt_query_expansion */
+ YYSYMBOL_opt_udf_expr_list = 1438, /* opt_udf_expr_list */
+ YYSYMBOL_udf_expr_list = 1439, /* udf_expr_list */
+ YYSYMBOL_udf_expr = 1440, /* udf_expr */
+ YYSYMBOL_sum_expr = 1441, /* sum_expr */
+ YYSYMBOL_1442_143 = 1442, /* $@143 */
+ YYSYMBOL_1443_144 = 1443, /* $@144 */
+ YYSYMBOL_1444_145 = 1444, /* $@145 */
+ YYSYMBOL_1445_146 = 1445, /* $@146 */
+ YYSYMBOL_1446_147 = 1446, /* $@147 */
+ YYSYMBOL_window_func_expr = 1447, /* window_func_expr */
+ YYSYMBOL_window_func = 1448, /* window_func */
+ YYSYMBOL_simple_window_func = 1449, /* simple_window_func */
+ YYSYMBOL_inverse_distribution_function = 1450, /* inverse_distribution_function */
+ YYSYMBOL_percentile_function = 1451, /* percentile_function */
+ YYSYMBOL_1452_148 = 1452, /* $@148 */
+ YYSYMBOL_inverse_distribution_function_def = 1453, /* inverse_distribution_function_def */
+ YYSYMBOL_order_by_single_element_list = 1454, /* order_by_single_element_list */
+ YYSYMBOL_window_name = 1455, /* window_name */
+ YYSYMBOL_variable = 1456, /* variable */
+ YYSYMBOL_1457_149 = 1457, /* $@149 */
+ YYSYMBOL_variable_aux = 1458, /* variable_aux */
+ YYSYMBOL_opt_distinct = 1459, /* opt_distinct */
+ YYSYMBOL_opt_gconcat_separator = 1460, /* opt_gconcat_separator */
+ YYSYMBOL_opt_gorder_clause = 1461, /* opt_gorder_clause */
+ YYSYMBOL_gorder_list = 1462, /* gorder_list */
+ YYSYMBOL_opt_glimit_clause = 1463, /* opt_glimit_clause */
+ YYSYMBOL_glimit_clause = 1464, /* glimit_clause */
+ YYSYMBOL_glimit_options = 1465, /* glimit_options */
+ YYSYMBOL_in_sum_expr = 1466, /* in_sum_expr */
+ YYSYMBOL_1467_150 = 1467, /* $@150 */
+ YYSYMBOL_cast_type = 1468, /* cast_type */
+ YYSYMBOL_cast_type_numeric = 1469, /* cast_type_numeric */
+ YYSYMBOL_cast_type_temporal = 1470, /* cast_type_temporal */
+ YYSYMBOL_opt_expr_list = 1471, /* opt_expr_list */
+ YYSYMBOL_expr_list = 1472, /* expr_list */
+ YYSYMBOL_ident_list_arg = 1473, /* ident_list_arg */
+ YYSYMBOL_ident_list = 1474, /* ident_list */
+ YYSYMBOL_when_list = 1475, /* when_list */
+ YYSYMBOL_when_list_opt_else = 1476, /* when_list_opt_else */
+ YYSYMBOL_table_ref = 1477, /* table_ref */
+ YYSYMBOL_json_text_literal = 1478, /* json_text_literal */
+ YYSYMBOL_json_text_literal_or_num = 1479, /* json_text_literal_or_num */
+ YYSYMBOL_join_table_list = 1480, /* join_table_list */
+ YYSYMBOL_json_table_columns_clause = 1481, /* json_table_columns_clause */
+ YYSYMBOL_json_table_columns_list = 1482, /* json_table_columns_list */
+ YYSYMBOL_json_table_column = 1483, /* json_table_column */
+ YYSYMBOL_1484_151 = 1484, /* $@151 */
+ YYSYMBOL_1485_152 = 1485, /* $@152 */
+ YYSYMBOL_json_table_column_type = 1486, /* json_table_column_type */
+ YYSYMBOL_json_table_field_type = 1487, /* json_table_field_type */
+ YYSYMBOL_json_opt_on_empty_or_error = 1488, /* json_opt_on_empty_or_error */
+ YYSYMBOL_json_on_response = 1489, /* json_on_response */
+ YYSYMBOL_json_on_error_response = 1490, /* json_on_error_response */
+ YYSYMBOL_json_on_empty_response = 1491, /* json_on_empty_response */
+ YYSYMBOL_table_function = 1492, /* table_function */
+ YYSYMBOL_1493_153 = 1493, /* $@153 */
+ YYSYMBOL_1494_154 = 1494, /* $@154 */
+ YYSYMBOL_esc_table_ref = 1495, /* esc_table_ref */
+ YYSYMBOL_derived_table_list = 1496, /* derived_table_list */
+ YYSYMBOL_join_table = 1497, /* join_table */
+ YYSYMBOL_1498_155 = 1498, /* $@155 */
+ YYSYMBOL_1499_156 = 1499, /* $@156 */
+ YYSYMBOL_1500_157 = 1500, /* $@157 */
+ YYSYMBOL_1501_158 = 1501, /* $@158 */
+ YYSYMBOL_1502_159 = 1502, /* $@159 */
+ YYSYMBOL_1503_160 = 1503, /* $@160 */
+ YYSYMBOL_inner_join = 1504, /* inner_join */
+ YYSYMBOL_normal_join = 1505, /* normal_join */
+ YYSYMBOL_opt_use_partition = 1506, /* opt_use_partition */
+ YYSYMBOL_use_partition = 1507, /* use_partition */
+ YYSYMBOL_table_factor = 1508, /* table_factor */
+ YYSYMBOL_table_primary_ident_opt_parens = 1509, /* table_primary_ident_opt_parens */
+ YYSYMBOL_table_primary_derived_opt_parens = 1510, /* table_primary_derived_opt_parens */
+ YYSYMBOL_table_reference_list_parens = 1511, /* table_reference_list_parens */
+ YYSYMBOL_nested_table_reference_list = 1512, /* nested_table_reference_list */
+ YYSYMBOL_join_table_parens = 1513, /* join_table_parens */
+ YYSYMBOL_table_primary_ident = 1514, /* table_primary_ident */
+ YYSYMBOL_table_primary_derived = 1515, /* table_primary_derived */
+ YYSYMBOL_opt_outer = 1516, /* opt_outer */
+ YYSYMBOL_index_hint_clause = 1517, /* index_hint_clause */
+ YYSYMBOL_index_hint_type = 1518, /* index_hint_type */
+ YYSYMBOL_index_hint_definition = 1519, /* index_hint_definition */
+ YYSYMBOL_1520_161 = 1520, /* $@161 */
+ YYSYMBOL_1521_162 = 1521, /* $@162 */
+ YYSYMBOL_index_hints_list = 1522, /* index_hints_list */
+ YYSYMBOL_opt_index_hints_list = 1523, /* opt_index_hints_list */
+ YYSYMBOL_1524_163 = 1524, /* $@163 */
+ YYSYMBOL_opt_key_definition = 1525, /* opt_key_definition */
+ YYSYMBOL_1526_164 = 1526, /* $@164 */
+ YYSYMBOL_opt_key_usage_list = 1527, /* opt_key_usage_list */
+ YYSYMBOL_key_usage_element = 1528, /* key_usage_element */
+ YYSYMBOL_key_usage_list = 1529, /* key_usage_list */
+ YYSYMBOL_using_list = 1530, /* using_list */
+ YYSYMBOL_interval = 1531, /* interval */
+ YYSYMBOL_interval_time_stamp = 1532, /* interval_time_stamp */
+ YYSYMBOL_date_time_type = 1533, /* date_time_type */
+ YYSYMBOL_table_alias = 1534, /* table_alias */
+ YYSYMBOL_opt_table_alias_clause = 1535, /* opt_table_alias_clause */
+ YYSYMBOL_table_alias_clause = 1536, /* table_alias_clause */
+ YYSYMBOL_opt_all = 1537, /* opt_all */
+ YYSYMBOL_opt_where_clause = 1538, /* opt_where_clause */
+ YYSYMBOL_1539_165 = 1539, /* $@165 */
+ YYSYMBOL_opt_having_clause = 1540, /* opt_having_clause */
+ YYSYMBOL_1541_166 = 1541, /* $@166 */
+ YYSYMBOL_opt_group_clause = 1542, /* opt_group_clause */
+ YYSYMBOL_group_list = 1543, /* group_list */
+ YYSYMBOL_olap_opt = 1544, /* olap_opt */
+ YYSYMBOL_opt_window_clause = 1545, /* opt_window_clause */
+ YYSYMBOL_window_def_list = 1546, /* window_def_list */
+ YYSYMBOL_window_def = 1547, /* window_def */
+ YYSYMBOL_window_spec = 1548, /* window_spec */
+ YYSYMBOL_1549_167 = 1549, /* $@167 */
+ YYSYMBOL_opt_window_ref = 1550, /* opt_window_ref */
+ YYSYMBOL_opt_window_partition_clause = 1551, /* opt_window_partition_clause */
+ YYSYMBOL_opt_window_order_clause = 1552, /* opt_window_order_clause */
+ YYSYMBOL_opt_window_frame_clause = 1553, /* opt_window_frame_clause */
+ YYSYMBOL_window_frame_units = 1554, /* window_frame_units */
+ YYSYMBOL_window_frame_extent = 1555, /* window_frame_extent */
+ YYSYMBOL_window_frame_start = 1556, /* window_frame_start */
+ YYSYMBOL_window_frame_bound = 1557, /* window_frame_bound */
+ YYSYMBOL_opt_window_frame_exclusion = 1558, /* opt_window_frame_exclusion */
+ YYSYMBOL_alter_order_clause = 1559, /* alter_order_clause */
+ YYSYMBOL_alter_order_list = 1560, /* alter_order_list */
+ YYSYMBOL_alter_order_item = 1561, /* alter_order_item */
+ YYSYMBOL_opt_order_clause = 1562, /* opt_order_clause */
+ YYSYMBOL_order_clause = 1563, /* order_clause */
+ YYSYMBOL_1564_168 = 1564, /* $@168 */
+ YYSYMBOL_order_list = 1565, /* order_list */
+ YYSYMBOL_order_dir = 1566, /* order_dir */
+ YYSYMBOL_opt_limit_clause = 1567, /* opt_limit_clause */
+ YYSYMBOL_limit_clause = 1568, /* limit_clause */
+ YYSYMBOL_fetch_first_clause = 1569, /* fetch_first_clause */
+ YYSYMBOL_first_or_next = 1570, /* first_or_next */
+ YYSYMBOL_row_or_rows = 1571, /* row_or_rows */
+ YYSYMBOL_only_or_with_ties = 1572, /* only_or_with_ties */
+ YYSYMBOL_opt_global_limit_clause = 1573, /* opt_global_limit_clause */
+ YYSYMBOL_limit_options = 1574, /* limit_options */
+ YYSYMBOL_limit_option = 1575, /* limit_option */
+ YYSYMBOL_limit_rows_option = 1576, /* limit_rows_option */
+ YYSYMBOL_delete_limit_clause = 1577, /* delete_limit_clause */
+ YYSYMBOL_order_limit_lock = 1578, /* order_limit_lock */
+ YYSYMBOL_opt_order_limit_lock = 1579, /* opt_order_limit_lock */
+ YYSYMBOL_query_expression_tail = 1580, /* query_expression_tail */
+ YYSYMBOL_opt_query_expression_tail = 1581, /* opt_query_expression_tail */
+ YYSYMBOL_opt_procedure_or_into = 1582, /* opt_procedure_or_into */
+ YYSYMBOL_order_or_limit = 1583, /* order_or_limit */
+ YYSYMBOL_opt_plus = 1584, /* opt_plus */
+ YYSYMBOL_int_num = 1585, /* int_num */
+ YYSYMBOL_ulong_num = 1586, /* ulong_num */
+ YYSYMBOL_real_ulong_num = 1587, /* real_ulong_num */
+ YYSYMBOL_longlong_num = 1588, /* longlong_num */
+ YYSYMBOL_ulonglong_num = 1589, /* ulonglong_num */
+ YYSYMBOL_real_ulonglong_num = 1590, /* real_ulonglong_num */
+ YYSYMBOL_dec_num_error = 1591, /* dec_num_error */
+ YYSYMBOL_dec_num = 1592, /* dec_num */
+ YYSYMBOL_choice = 1593, /* choice */
+ YYSYMBOL_bool = 1594, /* bool */
+ YYSYMBOL_procedure_clause = 1595, /* procedure_clause */
+ YYSYMBOL_1596_169 = 1596, /* $@169 */
+ YYSYMBOL_procedure_list = 1597, /* procedure_list */
+ YYSYMBOL_procedure_list2 = 1598, /* procedure_list2 */
+ YYSYMBOL_procedure_item = 1599, /* procedure_item */
+ YYSYMBOL_select_var_list_init = 1600, /* select_var_list_init */
+ YYSYMBOL_1601_170 = 1601, /* $@170 */
+ YYSYMBOL_select_var_list = 1602, /* select_var_list */
+ YYSYMBOL_select_var_ident = 1603, /* select_var_ident */
+ YYSYMBOL_select_outvar = 1604, /* select_outvar */
+ YYSYMBOL_into = 1605, /* into */
+ YYSYMBOL_into_destination = 1606, /* into_destination */
+ YYSYMBOL_1607_171 = 1607, /* $@171 */
+ YYSYMBOL_1608_172 = 1608, /* $@172 */
+ YYSYMBOL_do = 1609, /* do */
+ YYSYMBOL_1610_173 = 1610, /* $@173 */
+ YYSYMBOL_drop = 1611, /* drop */
+ YYSYMBOL_1612_174 = 1612, /* $@174 */
+ YYSYMBOL_1613_175 = 1613, /* $@175 */
+ YYSYMBOL_1614_176 = 1614, /* $@176 */
+ YYSYMBOL_1615_177 = 1615, /* $@177 */
+ YYSYMBOL_table_list = 1616, /* table_list */
+ YYSYMBOL_table_name = 1617, /* table_name */
+ YYSYMBOL_table_name_with_opt_use_partition = 1618, /* table_name_with_opt_use_partition */
+ YYSYMBOL_table_alias_ref_list = 1619, /* table_alias_ref_list */
+ YYSYMBOL_table_alias_ref = 1620, /* table_alias_ref */
+ YYSYMBOL_opt_if_exists_table_element = 1621, /* opt_if_exists_table_element */
+ YYSYMBOL_opt_if_exists = 1622, /* opt_if_exists */
+ YYSYMBOL_opt_temporary = 1623, /* opt_temporary */
+ YYSYMBOL_insert = 1624, /* insert */
+ YYSYMBOL_1625_178 = 1625, /* $@178 */
+ YYSYMBOL_1626_179 = 1626, /* $@179 */
+ YYSYMBOL_replace = 1627, /* replace */
+ YYSYMBOL_1628_180 = 1628, /* $@180 */
+ YYSYMBOL_1629_181 = 1629, /* $@181 */
+ YYSYMBOL_insert_start = 1630, /* insert_start */
+ YYSYMBOL_stmt_end = 1631, /* stmt_end */
+ YYSYMBOL_insert_lock_option = 1632, /* insert_lock_option */
+ YYSYMBOL_replace_lock_option = 1633, /* replace_lock_option */
+ YYSYMBOL_insert_replace_option = 1634, /* insert_replace_option */
+ YYSYMBOL_opt_into = 1635, /* opt_into */
+ YYSYMBOL_insert_table = 1636, /* insert_table */
+ YYSYMBOL_1637_182 = 1637, /* $@182 */
+ YYSYMBOL_insert_field_spec = 1638, /* insert_field_spec */
+ YYSYMBOL_1639_183 = 1639, /* $@183 */
+ YYSYMBOL_insert_field_list = 1640, /* insert_field_list */
+ YYSYMBOL_opt_fields = 1641, /* opt_fields */
+ YYSYMBOL_fields = 1642, /* fields */
+ YYSYMBOL_insert_values = 1643, /* insert_values */
+ YYSYMBOL_values_list = 1644, /* values_list */
+ YYSYMBOL_ident_eq_list = 1645, /* ident_eq_list */
+ YYSYMBOL_ident_eq_value = 1646, /* ident_eq_value */
+ YYSYMBOL_equal = 1647, /* equal */
+ YYSYMBOL_opt_equal = 1648, /* opt_equal */
+ YYSYMBOL_opt_with = 1649, /* opt_with */
+ YYSYMBOL_opt_by = 1650, /* opt_by */
+ YYSYMBOL_no_braces = 1651, /* no_braces */
+ YYSYMBOL_1652_184 = 1652, /* $@184 */
+ YYSYMBOL_no_braces_with_names = 1653, /* no_braces_with_names */
+ YYSYMBOL_1654_185 = 1654, /* $@185 */
+ YYSYMBOL_opt_values = 1655, /* opt_values */
+ YYSYMBOL_opt_values_with_names = 1656, /* opt_values_with_names */
+ YYSYMBOL_values = 1657, /* values */
+ YYSYMBOL_values_with_names = 1658, /* values_with_names */
+ YYSYMBOL_expr_or_ignore = 1659, /* expr_or_ignore */
+ YYSYMBOL_expr_or_ignore_or_default = 1660, /* expr_or_ignore_or_default */
+ YYSYMBOL_opt_insert_update = 1661, /* opt_insert_update */
+ YYSYMBOL_1662_186 = 1662, /* $@186 */
+ YYSYMBOL_1663_187 = 1663, /* $@187 */
+ YYSYMBOL_update_table_list = 1664, /* update_table_list */
+ YYSYMBOL_update = 1665, /* update */
+ YYSYMBOL_1666_188 = 1666, /* $@188 */
+ YYSYMBOL_1667_189 = 1667, /* $@189 */
+ YYSYMBOL_1668_190 = 1668, /* $@190 */
+ YYSYMBOL_update_list = 1669, /* update_list */
+ YYSYMBOL_update_elem = 1670, /* update_elem */
+ YYSYMBOL_insert_update_list = 1671, /* insert_update_list */
+ YYSYMBOL_insert_update_elem = 1672, /* insert_update_elem */
+ YYSYMBOL_opt_low_priority = 1673, /* opt_low_priority */
+ YYSYMBOL_delete = 1674, /* delete */
+ YYSYMBOL_1675_191 = 1675, /* $@191 */
+ YYSYMBOL_opt_delete_system_time = 1676, /* opt_delete_system_time */
+ YYSYMBOL_delete_part2 = 1677, /* delete_part2 */
+ YYSYMBOL_delete_single_table = 1678, /* delete_single_table */
+ YYSYMBOL_delete_single_table_for_period = 1679, /* delete_single_table_for_period */
+ YYSYMBOL_single_multi = 1680, /* single_multi */
+ YYSYMBOL_1681_192 = 1681, /* $@192 */
+ YYSYMBOL_1682_193 = 1682, /* $@193 */
+ YYSYMBOL_1683_194 = 1683, /* $@194 */
+ YYSYMBOL_1684_195 = 1684, /* $@195 */
+ YYSYMBOL_opt_returning = 1685, /* opt_returning */
+ YYSYMBOL_1686_196 = 1686, /* $@196 */
+ YYSYMBOL_table_wild_list = 1687, /* table_wild_list */
+ YYSYMBOL_table_wild_one = 1688, /* table_wild_one */
+ YYSYMBOL_opt_wild = 1689, /* opt_wild */
+ YYSYMBOL_opt_delete_options = 1690, /* opt_delete_options */
+ YYSYMBOL_opt_delete_option = 1691, /* opt_delete_option */
+ YYSYMBOL_truncate = 1692, /* truncate */
+ YYSYMBOL_1693_197 = 1693, /* $@197 */
+ YYSYMBOL_1694_198 = 1694, /* $@198 */
+ YYSYMBOL_opt_table_sym = 1695, /* opt_table_sym */
+ YYSYMBOL_opt_profile_defs = 1696, /* opt_profile_defs */
+ YYSYMBOL_profile_defs = 1697, /* profile_defs */
+ YYSYMBOL_profile_def = 1698, /* profile_def */
+ YYSYMBOL_opt_profile_args = 1699, /* opt_profile_args */
+ YYSYMBOL_show = 1700, /* show */
+ YYSYMBOL_1701_199 = 1701, /* $@199 */
+ YYSYMBOL_show_param = 1702, /* show_param */
+ YYSYMBOL_1703_200 = 1703, /* $@200 */
+ YYSYMBOL_1704_201 = 1704, /* $@201 */
+ YYSYMBOL_show_engine_param = 1705, /* show_engine_param */
+ YYSYMBOL_master_or_binary = 1706, /* master_or_binary */
+ YYSYMBOL_opt_storage = 1707, /* opt_storage */
+ YYSYMBOL_opt_db = 1708, /* opt_db */
+ YYSYMBOL_opt_full = 1709, /* opt_full */
+ YYSYMBOL_from_or_in = 1710, /* from_or_in */
+ YYSYMBOL_binlog_in = 1711, /* binlog_in */
+ YYSYMBOL_binlog_from = 1712, /* binlog_from */
+ YYSYMBOL_wild_and_where = 1713, /* wild_and_where */
+ YYSYMBOL_describe = 1714, /* describe */
+ YYSYMBOL_1715_202 = 1715, /* $@202 */
+ YYSYMBOL_1716_203 = 1716, /* $@203 */
+ YYSYMBOL_explainable_command = 1717, /* explainable_command */
+ YYSYMBOL_describe_command = 1718, /* describe_command */
+ YYSYMBOL_analyze_stmt_command = 1719, /* analyze_stmt_command */
+ YYSYMBOL_opt_extended_describe = 1720, /* opt_extended_describe */
+ YYSYMBOL_opt_format_json = 1721, /* opt_format_json */
+ YYSYMBOL_opt_describe_column = 1722, /* opt_describe_column */
+ YYSYMBOL_explain_for_connection = 1723, /* explain_for_connection */
+ YYSYMBOL_flush = 1724, /* flush */
+ YYSYMBOL_1725_204 = 1725, /* $@204 */
+ YYSYMBOL_flush_options = 1726, /* flush_options */
+ YYSYMBOL_1727_205 = 1727, /* $@205 */
+ YYSYMBOL_opt_flush_lock = 1728, /* opt_flush_lock */
+ YYSYMBOL_flush_lock = 1729, /* flush_lock */
+ YYSYMBOL_1730_206 = 1730, /* $@206 */
+ YYSYMBOL_flush_options_list = 1731, /* flush_options_list */
+ YYSYMBOL_flush_option = 1732, /* flush_option */
+ YYSYMBOL_opt_table_list = 1733, /* opt_table_list */
+ YYSYMBOL_backup = 1734, /* backup */
+ YYSYMBOL_backup_statements = 1735, /* backup_statements */
+ YYSYMBOL_1736_207 = 1736, /* $@207 */
+ YYSYMBOL_opt_delete_gtid_domain = 1737, /* opt_delete_gtid_domain */
+ YYSYMBOL_delete_domain_id_list = 1738, /* delete_domain_id_list */
+ YYSYMBOL_delete_domain_id = 1739, /* delete_domain_id */
+ YYSYMBOL_optional_flush_tables_arguments = 1740, /* optional_flush_tables_arguments */
+ YYSYMBOL_reset = 1741, /* reset */
+ YYSYMBOL_1742_208 = 1742, /* $@208 */
+ YYSYMBOL_reset_options = 1743, /* reset_options */
+ YYSYMBOL_reset_option = 1744, /* reset_option */
+ YYSYMBOL_1745_209 = 1745, /* $@209 */
+ YYSYMBOL_1746_210 = 1746, /* $@210 */
+ YYSYMBOL_slave_reset_options = 1747, /* slave_reset_options */
+ YYSYMBOL_master_reset_options = 1748, /* master_reset_options */
+ YYSYMBOL_purge = 1749, /* purge */
+ YYSYMBOL_1750_211 = 1750, /* $@211 */
+ YYSYMBOL_kill = 1751, /* kill */
+ YYSYMBOL_1752_212 = 1752, /* $@212 */
+ YYSYMBOL_kill_type = 1753, /* kill_type */
+ YYSYMBOL_kill_option = 1754, /* kill_option */
+ YYSYMBOL_opt_connection = 1755, /* opt_connection */
+ YYSYMBOL_kill_expr = 1756, /* kill_expr */
+ YYSYMBOL_shutdown = 1757, /* shutdown */
+ YYSYMBOL_1758_213 = 1758, /* $@213 */
+ YYSYMBOL_shutdown_option = 1759, /* shutdown_option */
+ YYSYMBOL_use = 1760, /* use */
+ YYSYMBOL_load = 1761, /* load */
+ YYSYMBOL_1762_214 = 1762, /* $@214 */
+ YYSYMBOL_1763_215 = 1763, /* $@215 */
+ YYSYMBOL_1764_216 = 1764, /* $@216 */
+ YYSYMBOL_1765_217 = 1765, /* $@217 */
+ YYSYMBOL_data_or_xml = 1766, /* data_or_xml */
+ YYSYMBOL_opt_local = 1767, /* opt_local */
+ YYSYMBOL_load_data_lock = 1768, /* load_data_lock */
+ YYSYMBOL_opt_duplicate = 1769, /* opt_duplicate */
+ YYSYMBOL_opt_field_term = 1770, /* opt_field_term */
+ YYSYMBOL_field_term_list = 1771, /* field_term_list */
+ YYSYMBOL_field_term = 1772, /* field_term */
+ YYSYMBOL_opt_line_term = 1773, /* opt_line_term */
+ YYSYMBOL_line_term_list = 1774, /* line_term_list */
+ YYSYMBOL_line_term = 1775, /* line_term */
+ YYSYMBOL_opt_xml_rows_identified_by = 1776, /* opt_xml_rows_identified_by */
+ YYSYMBOL_opt_ignore_lines = 1777, /* opt_ignore_lines */
+ YYSYMBOL_lines_or_rows = 1778, /* lines_or_rows */
+ YYSYMBOL_opt_field_or_var_spec = 1779, /* opt_field_or_var_spec */
+ YYSYMBOL_fields_or_vars = 1780, /* fields_or_vars */
+ YYSYMBOL_field_or_var = 1781, /* field_or_var */
+ YYSYMBOL_opt_load_data_set_spec = 1782, /* opt_load_data_set_spec */
+ YYSYMBOL_load_data_set_list = 1783, /* load_data_set_list */
+ YYSYMBOL_load_data_set_elem = 1784, /* load_data_set_elem */
+ YYSYMBOL_text_literal = 1785, /* text_literal */
+ YYSYMBOL_text_string = 1786, /* text_string */
+ YYSYMBOL_hex_or_bin_String = 1787, /* hex_or_bin_String */
+ YYSYMBOL_param_marker = 1788, /* param_marker */
+ YYSYMBOL_signed_literal = 1789, /* signed_literal */
+ YYSYMBOL_literal = 1790, /* literal */
+ YYSYMBOL_NUM_literal = 1791, /* NUM_literal */
+ YYSYMBOL_temporal_literal = 1792, /* temporal_literal */
+ YYSYMBOL_with_clause = 1793, /* with_clause */
+ YYSYMBOL_1794_218 = 1794, /* $@218 */
+ YYSYMBOL_opt_recursive = 1795, /* opt_recursive */
+ YYSYMBOL_with_list = 1796, /* with_list */
+ YYSYMBOL_with_list_element = 1797, /* with_list_element */
+ YYSYMBOL_opt_cycle = 1798, /* opt_cycle */
+ YYSYMBOL_1799_219 = 1799, /* $@219 */
+ YYSYMBOL_opt_with_column_list = 1800, /* opt_with_column_list */
+ YYSYMBOL_with_column_list = 1801, /* with_column_list */
+ YYSYMBOL_ident_sys_alloc = 1802, /* ident_sys_alloc */
+ YYSYMBOL_comma_separated_ident_list = 1803, /* comma_separated_ident_list */
+ YYSYMBOL_with_element_head = 1804, /* with_element_head */
+ YYSYMBOL_insert_ident = 1805, /* insert_ident */
+ YYSYMBOL_table_wild = 1806, /* table_wild */
+ YYSYMBOL_select_sublist_qualified_asterisk = 1807, /* select_sublist_qualified_asterisk */
+ YYSYMBOL_order_ident = 1808, /* order_ident */
+ YYSYMBOL_simple_ident = 1809, /* simple_ident */
+ YYSYMBOL_simple_ident_nospvar = 1810, /* simple_ident_nospvar */
+ YYSYMBOL_field_ident = 1811, /* field_ident */
+ YYSYMBOL_table_ident = 1812, /* table_ident */
+ YYSYMBOL_table_ident_opt_wild = 1813, /* table_ident_opt_wild */
+ YYSYMBOL_table_ident_nodb = 1814, /* table_ident_nodb */
+ YYSYMBOL_IDENT_cli = 1815, /* IDENT_cli */
+ YYSYMBOL_ident_cli = 1816, /* ident_cli */
+ YYSYMBOL_IDENT_sys = 1817, /* IDENT_sys */
+ YYSYMBOL_ident_cli_func = 1818, /* ident_cli_func */
+ YYSYMBOL_ident_func = 1819, /* ident_func */
+ YYSYMBOL_TEXT_STRING_sys = 1820, /* TEXT_STRING_sys */
+ YYSYMBOL_TEXT_STRING_literal = 1821, /* TEXT_STRING_literal */
+ YYSYMBOL_TEXT_STRING_filesystem = 1822, /* TEXT_STRING_filesystem */
+ YYSYMBOL_ident_table_alias = 1823, /* ident_table_alias */
+ YYSYMBOL_ident_cli_set_usual_case = 1824, /* ident_cli_set_usual_case */
+ YYSYMBOL_ident_sysvar_name = 1825, /* ident_sysvar_name */
+ YYSYMBOL_ident = 1826, /* ident */
+ YYSYMBOL_label_ident = 1827, /* label_ident */
+ YYSYMBOL_ident_or_text = 1828, /* ident_or_text */
+ YYSYMBOL_user_maybe_role = 1829, /* user_maybe_role */
+ YYSYMBOL_user_or_role = 1830, /* user_or_role */
+ YYSYMBOL_user = 1831, /* user */
+ YYSYMBOL_keyword_table_alias = 1832, /* keyword_table_alias */
+ YYSYMBOL_keyword_ident = 1833, /* keyword_ident */
+ YYSYMBOL_keyword_sysvar_name = 1834, /* keyword_sysvar_name */
+ YYSYMBOL_keyword_set_usual_case = 1835, /* keyword_set_usual_case */
+ YYSYMBOL_non_reserved_keyword_udt = 1836, /* non_reserved_keyword_udt */
+ YYSYMBOL_keyword_sp_var_not_label = 1837, /* keyword_sp_var_not_label */
+ YYSYMBOL_keyword_sp_head = 1838, /* keyword_sp_head */
+ YYSYMBOL_keyword_verb_clause = 1839, /* keyword_verb_clause */
+ YYSYMBOL_keyword_set_special_case = 1840, /* keyword_set_special_case */
+ YYSYMBOL_keyword_sysvar_type = 1841, /* keyword_sysvar_type */
+ YYSYMBOL_keyword_data_type = 1842, /* keyword_data_type */
+ YYSYMBOL_keyword_cast_type = 1843, /* keyword_cast_type */
+ YYSYMBOL_keyword_func_sp_var_and_label = 1844, /* keyword_func_sp_var_and_label */
+ YYSYMBOL_keyword_func_sp_var_not_label = 1845, /* keyword_func_sp_var_not_label */
+ YYSYMBOL_keyword_sp_var_and_label = 1846, /* keyword_sp_var_and_label */
+ YYSYMBOL_reserved_keyword_udt_not_param_type = 1847, /* reserved_keyword_udt_not_param_type */
+ YYSYMBOL_set = 1848, /* set */
+ YYSYMBOL_1849_220 = 1849, /* $@220 */
+ YYSYMBOL_set_param = 1850, /* set_param */
+ YYSYMBOL_1851_221 = 1851, /* $@221 */
+ YYSYMBOL_1852_222 = 1852, /* $@222 */
+ YYSYMBOL_1853_223 = 1853, /* $@223 */
+ YYSYMBOL_set_stmt_option_list = 1854, /* set_stmt_option_list */
+ YYSYMBOL_start_option_value_list_following_option_type = 1855, /* start_option_value_list_following_option_type */
+ YYSYMBOL_1856_224 = 1856, /* $@224 */
+ YYSYMBOL_option_value_list = 1857, /* option_value_list */
+ YYSYMBOL_option_value = 1858, /* option_value */
+ YYSYMBOL_1859_225 = 1859, /* $@225 */
+ YYSYMBOL_option_type = 1860, /* option_type */
+ YYSYMBOL_opt_var_type = 1861, /* opt_var_type */
+ YYSYMBOL_opt_var_ident_type = 1862, /* opt_var_ident_type */
+ YYSYMBOL_set_stmt_option = 1863, /* set_stmt_option */
+ YYSYMBOL_1864_226 = 1864, /* $@226 */
+ YYSYMBOL_1865_227 = 1865, /* $@227 */
+ YYSYMBOL_1866_228 = 1866, /* $@228 */
+ YYSYMBOL_option_value_following_option_type = 1867, /* option_value_following_option_type */
+ YYSYMBOL_1868_229 = 1868, /* $@229 */
+ YYSYMBOL_1869_230 = 1869, /* $@230 */
+ YYSYMBOL_1870_231 = 1870, /* $@231 */
+ YYSYMBOL_option_value_no_option_type = 1871, /* option_value_no_option_type */
+ YYSYMBOL_1872_232 = 1872, /* $@232 */
+ YYSYMBOL_1873_233 = 1873, /* $@233 */
+ YYSYMBOL_1874_234 = 1874, /* $@234 */
+ YYSYMBOL_1875_235 = 1875, /* $@235 */
+ YYSYMBOL_1876_236 = 1876, /* $@236 */
+ YYSYMBOL_1877_237 = 1877, /* $@237 */
+ YYSYMBOL_1878_238 = 1878, /* $@238 */
+ YYSYMBOL_1879_239 = 1879, /* $@239 */
+ YYSYMBOL_1880_240 = 1880, /* $@240 */
+ YYSYMBOL_1881_241 = 1881, /* $@241 */
+ YYSYMBOL_transaction_characteristics = 1882, /* transaction_characteristics */
+ YYSYMBOL_transaction_access_mode = 1883, /* transaction_access_mode */
+ YYSYMBOL_isolation_level = 1884, /* isolation_level */
+ YYSYMBOL_transaction_access_mode_types = 1885, /* transaction_access_mode_types */
+ YYSYMBOL_isolation_types = 1886, /* isolation_types */
+ YYSYMBOL_text_or_password = 1887, /* text_or_password */
+ YYSYMBOL_set_expr_or_default = 1888, /* set_expr_or_default */
+ YYSYMBOL_lock = 1889, /* lock */
+ YYSYMBOL_1890_242 = 1890, /* $@242 */
+ YYSYMBOL_opt_lock_wait_timeout = 1891, /* opt_lock_wait_timeout */
+ YYSYMBOL_table_or_tables = 1892, /* table_or_tables */
+ YYSYMBOL_table_lock_list = 1893, /* table_lock_list */
+ YYSYMBOL_table_lock = 1894, /* table_lock */
+ YYSYMBOL_lock_option = 1895, /* lock_option */
+ YYSYMBOL_unlock = 1896, /* unlock */
+ YYSYMBOL_1897_243 = 1897, /* $@243 */
+ YYSYMBOL_handler = 1898, /* handler */
+ YYSYMBOL_1899_244 = 1899, /* $@244 */
+ YYSYMBOL_handler_tail = 1900, /* handler_tail */
+ YYSYMBOL_1901_245 = 1901, /* $@245 */
+ YYSYMBOL_handler_read_or_scan = 1902, /* handler_read_or_scan */
+ YYSYMBOL_handler_scan_function = 1903, /* handler_scan_function */
+ YYSYMBOL_handler_rkey_function = 1904, /* handler_rkey_function */
+ YYSYMBOL_1905_246 = 1905, /* $@246 */
+ YYSYMBOL_handler_rkey_mode = 1906, /* handler_rkey_mode */
+ YYSYMBOL_revoke = 1907, /* revoke */
+ YYSYMBOL_revoke_command = 1908, /* revoke_command */
+ YYSYMBOL_admin_option_for_role = 1909, /* admin_option_for_role */
+ YYSYMBOL_grant = 1910, /* grant */
+ YYSYMBOL_grant_command = 1911, /* grant_command */
+ YYSYMBOL_opt_with_admin = 1912, /* opt_with_admin */
+ YYSYMBOL_opt_with_admin_option = 1913, /* opt_with_admin_option */
+ YYSYMBOL_role_list = 1914, /* role_list */
+ YYSYMBOL_current_role = 1915, /* current_role */
+ YYSYMBOL_role_name = 1916, /* role_name */
+ YYSYMBOL_grant_role = 1917, /* grant_role */
+ YYSYMBOL_opt_table = 1918, /* opt_table */
+ YYSYMBOL_grant_privileges = 1919, /* grant_privileges */
+ YYSYMBOL_opt_privileges = 1920, /* opt_privileges */
+ YYSYMBOL_object_privilege_list = 1921, /* object_privilege_list */
+ YYSYMBOL_column_list_privilege = 1922, /* column_list_privilege */
+ YYSYMBOL_column_privilege = 1923, /* column_privilege */
+ YYSYMBOL_object_privilege = 1924, /* object_privilege */
+ YYSYMBOL_opt_and = 1925, /* opt_and */
+ YYSYMBOL_require_list = 1926, /* require_list */
+ YYSYMBOL_require_list_element = 1927, /* require_list_element */
+ YYSYMBOL_grant_ident = 1928, /* grant_ident */
+ YYSYMBOL_user_list = 1929, /* user_list */
+ YYSYMBOL_grant_list = 1930, /* grant_list */
+ YYSYMBOL_user_and_role_list = 1931, /* user_and_role_list */
+ YYSYMBOL_via_or_with = 1932, /* via_or_with */
+ YYSYMBOL_using_or_as = 1933, /* using_or_as */
+ YYSYMBOL_grant_user = 1934, /* grant_user */
+ YYSYMBOL_auth_expression = 1935, /* auth_expression */
+ YYSYMBOL_auth_token = 1936, /* auth_token */
+ YYSYMBOL_opt_auth_str = 1937, /* opt_auth_str */
+ YYSYMBOL_opt_require_clause = 1938, /* opt_require_clause */
+ YYSYMBOL_resource_option = 1939, /* resource_option */
+ YYSYMBOL_resource_option_list = 1940, /* resource_option_list */
+ YYSYMBOL_opt_resource_options = 1941, /* opt_resource_options */
+ YYSYMBOL_opt_grant_options = 1942, /* opt_grant_options */
+ YYSYMBOL_opt_grant_option = 1943, /* opt_grant_option */
+ YYSYMBOL_grant_option_list = 1944, /* grant_option_list */
+ YYSYMBOL_grant_option = 1945, /* grant_option */
+ YYSYMBOL_begin_stmt_mariadb = 1946, /* begin_stmt_mariadb */
+ YYSYMBOL_1947_247 = 1947, /* $@247 */
+ YYSYMBOL_compound_statement = 1948, /* compound_statement */
+ YYSYMBOL_opt_not = 1949, /* opt_not */
+ YYSYMBOL_opt_work = 1950, /* opt_work */
+ YYSYMBOL_opt_chain = 1951, /* opt_chain */
+ YYSYMBOL_opt_release = 1952, /* opt_release */
+ YYSYMBOL_commit = 1953, /* commit */
+ YYSYMBOL_rollback = 1954, /* rollback */
+ YYSYMBOL_savepoint = 1955, /* savepoint */
+ YYSYMBOL_release = 1956, /* release */
+ YYSYMBOL_unit_type_decl = 1957, /* unit_type_decl */
+ YYSYMBOL_union_option = 1958, /* union_option */
+ YYSYMBOL_query_expression_option = 1959, /* query_expression_option */
+ YYSYMBOL_definer_opt = 1960, /* definer_opt */
+ YYSYMBOL_no_definer = 1961, /* no_definer */
+ YYSYMBOL_definer = 1962, /* definer */
+ YYSYMBOL_view_algorithm = 1963, /* view_algorithm */
+ YYSYMBOL_opt_view_suid = 1964, /* opt_view_suid */
+ YYSYMBOL_view_suid = 1965, /* view_suid */
+ YYSYMBOL_view_list_opt = 1966, /* view_list_opt */
+ YYSYMBOL_view_list = 1967, /* view_list */
+ YYSYMBOL_view_select = 1968, /* view_select */
+ YYSYMBOL_1969_248 = 1969, /* $@248 */
+ YYSYMBOL_view_check_option = 1970, /* view_check_option */
+ YYSYMBOL_trigger_action_order = 1971, /* trigger_action_order */
+ YYSYMBOL_trigger_follows_precedes_clause = 1972, /* trigger_follows_precedes_clause */
+ YYSYMBOL_trigger_tail = 1973, /* trigger_tail */
+ YYSYMBOL_1974_249 = 1974, /* $@249 */
+ YYSYMBOL_1975_250 = 1975, /* $@250 */
+ YYSYMBOL_1976_251 = 1976, /* $@251 */
+ YYSYMBOL_1977_252 = 1977, /* $@252 */
+ YYSYMBOL_1978_253 = 1978, /* $@253 */
+ YYSYMBOL_sf_return_type = 1979, /* sf_return_type */
+ YYSYMBOL_1980_254 = 1980, /* $@254 */
+ YYSYMBOL_xa = 1981, /* xa */
+ YYSYMBOL_opt_format_xid = 1982, /* opt_format_xid */
+ YYSYMBOL_xid = 1983, /* xid */
+ YYSYMBOL_begin_or_start = 1984, /* begin_or_start */
+ YYSYMBOL_opt_join_or_resume = 1985, /* opt_join_or_resume */
+ YYSYMBOL_opt_one_phase = 1986, /* opt_one_phase */
+ YYSYMBOL_opt_suspend = 1987, /* opt_suspend */
+ YYSYMBOL_1988_255 = 1988, /* $@255 */
+ YYSYMBOL_opt_migrate = 1989, /* opt_migrate */
+ YYSYMBOL_install = 1990, /* install */
+ YYSYMBOL_uninstall = 1991, /* uninstall */
+ YYSYMBOL_keep_gcc_happy = 1992, /* keep_gcc_happy */
+ YYSYMBOL__empty = 1993, /* _empty */
+ YYSYMBOL_statement = 1994, /* statement */
+ YYSYMBOL_sp_statement = 1995, /* sp_statement */
+ YYSYMBOL_1996_256 = 1996, /* $@256 */
+ YYSYMBOL_1997_257 = 1997, /* $@257 */
+ YYSYMBOL_1998_258 = 1998, /* $@258 */
+ YYSYMBOL_sp_if_then_statements = 1999, /* sp_if_then_statements */
+ YYSYMBOL_sp_case_then_statements = 2000, /* sp_case_then_statements */
+ YYSYMBOL_reserved_keyword_udt = 2001, /* reserved_keyword_udt */
+ YYSYMBOL_keyword_sp_block_section = 2002, /* keyword_sp_block_section */
+ YYSYMBOL_keyword_label = 2003, /* keyword_label */
+ YYSYMBOL_keyword_sp_decl = 2004, /* keyword_sp_decl */
+ YYSYMBOL_opt_truncate_table_storage_clause = 2005, /* opt_truncate_table_storage_clause */
+ YYSYMBOL_ident_for_loop_index = 2006, /* ident_for_loop_index */
+ YYSYMBOL_row_field_name = 2007, /* row_field_name */
+ YYSYMBOL_while_body = 2008, /* while_body */
+ YYSYMBOL_2009_259 = 2009, /* $@259 */
+ YYSYMBOL_for_loop_statements = 2010, /* for_loop_statements */
+ YYSYMBOL_sp_control_label = 2011, /* sp_control_label */
+ YYSYMBOL_sp_block_label = 2012, /* sp_block_label */
+ YYSYMBOL_remember_end_opt = 2013, /* remember_end_opt */
+ YYSYMBOL_sp_opt_default = 2014, /* sp_opt_default */
+ YYSYMBOL_sp_opt_inout = 2015, /* sp_opt_inout */
+ YYSYMBOL_sp_proc_stmts1_implicit_block = 2016, /* sp_proc_stmts1_implicit_block */
+ YYSYMBOL_2017_260 = 2017, /* $@260 */
+ YYSYMBOL_remember_lex = 2018, /* remember_lex */
+ YYSYMBOL_keyword_directly_assignable = 2019, /* keyword_directly_assignable */
+ YYSYMBOL_ident_directly_assignable = 2020, /* ident_directly_assignable */
+ YYSYMBOL_ident_cli_directly_assignable = 2021, /* ident_cli_directly_assignable */
+ YYSYMBOL_set_assign = 2022, /* set_assign */
+ YYSYMBOL_2023_261 = 2023, /* $@261 */
+ YYSYMBOL_2024_262 = 2024, /* $@262 */
+ YYSYMBOL_2025_263 = 2025, /* $@263 */
+ YYSYMBOL_labels_declaration_oracle = 2026, /* labels_declaration_oracle */
+ YYSYMBOL_label_declaration_oracle = 2027, /* label_declaration_oracle */
+ YYSYMBOL_opt_exception_clause = 2028, /* opt_exception_clause */
+ YYSYMBOL_exception_handlers = 2029, /* exception_handlers */
+ YYSYMBOL_exception_handler = 2030, /* exception_handler */
+ YYSYMBOL_2031_264 = 2031, /* $@264 */
+ YYSYMBOL_sp_no_param = 2032, /* sp_no_param */
+ YYSYMBOL_opt_sp_parenthesized_fdparam_list = 2033, /* opt_sp_parenthesized_fdparam_list */
+ YYSYMBOL_opt_sp_parenthesized_pdparam_list = 2034, /* opt_sp_parenthesized_pdparam_list */
+ YYSYMBOL_opt_sp_name = 2035, /* opt_sp_name */
+ YYSYMBOL_opt_package_routine_end_name = 2036, /* opt_package_routine_end_name */
+ YYSYMBOL_sp_tail_is = 2037, /* sp_tail_is */
+ YYSYMBOL_sp_instr_addr = 2038, /* sp_instr_addr */
+ YYSYMBOL_sp_body = 2039, /* sp_body */
+ YYSYMBOL_2040_265 = 2040, /* $@265 */
+ YYSYMBOL_2041_266 = 2041, /* $@266 */
+ YYSYMBOL_2042_267 = 2042, /* $@267 */
+ YYSYMBOL_create_package_chistic = 2043, /* create_package_chistic */
+ YYSYMBOL_create_package_chistics = 2044, /* create_package_chistics */
+ YYSYMBOL_opt_create_package_chistics = 2045, /* opt_create_package_chistics */
+ YYSYMBOL_opt_create_package_chistics_init = 2046, /* opt_create_package_chistics_init */
+ YYSYMBOL_2047_268 = 2047, /* $@268 */
+ YYSYMBOL_package_implementation_executable_section = 2048, /* package_implementation_executable_section */
+ YYSYMBOL_package_implementation_declare_section = 2049, /* package_implementation_declare_section */
+ YYSYMBOL_package_implementation_declare_section_list1 = 2050, /* package_implementation_declare_section_list1 */
+ YYSYMBOL_package_implementation_declare_section_list2 = 2051, /* package_implementation_declare_section_list2 */
+ YYSYMBOL_package_routine_lex = 2052, /* package_routine_lex */
+ YYSYMBOL_package_specification_function = 2053, /* package_specification_function */
+ YYSYMBOL_2054_269 = 2054, /* $@269 */
+ YYSYMBOL_package_specification_procedure = 2055, /* package_specification_procedure */
+ YYSYMBOL_2056_270 = 2056, /* $@270 */
+ YYSYMBOL_package_implementation_routine_definition = 2057, /* package_implementation_routine_definition */
+ YYSYMBOL_package_implementation_function_body = 2058, /* package_implementation_function_body */
+ YYSYMBOL_2059_271 = 2059, /* $@271 */
+ YYSYMBOL_package_implementation_procedure_body = 2060, /* package_implementation_procedure_body */
+ YYSYMBOL_2061_272 = 2061, /* $@272 */
+ YYSYMBOL_package_implementation_item_declaration = 2062, /* package_implementation_item_declaration */
+ YYSYMBOL_opt_package_specification_element_list = 2063, /* opt_package_specification_element_list */
+ YYSYMBOL_package_specification_element_list = 2064, /* package_specification_element_list */
+ YYSYMBOL_package_specification_element = 2065, /* package_specification_element */
+ YYSYMBOL_sp_decl_variable_list_anchored = 2066, /* sp_decl_variable_list_anchored */
+ YYSYMBOL_sp_param_name_and_mode = 2067, /* sp_param_name_and_mode */
+ YYSYMBOL_sp_param = 2068, /* sp_param */
+ YYSYMBOL_sp_param_anchored = 2069, /* sp_param_anchored */
+ YYSYMBOL_sf_c_chistics_and_body_standalone = 2070, /* sf_c_chistics_and_body_standalone */
+ YYSYMBOL_2071_273 = 2071, /* $@273 */
+ YYSYMBOL_sp_tail_standalone = 2072, /* sp_tail_standalone */
+ YYSYMBOL_2073_274 = 2073, /* $@274 */
+ YYSYMBOL_2074_275 = 2074, /* $@275 */
+ YYSYMBOL_drop_routine = 2075, /* drop_routine */
+ YYSYMBOL_create_routine = 2076, /* create_routine */
+ YYSYMBOL_2077_276 = 2077, /* $@276 */
+ YYSYMBOL_2078_277 = 2078, /* $@277 */
+ YYSYMBOL_2079_278 = 2079, /* $@278 */
+ YYSYMBOL_2080_279 = 2080, /* $@279 */
+ YYSYMBOL_2081_280 = 2081, /* $@280 */
+ YYSYMBOL_2082_281 = 2082, /* $@281 */
+ YYSYMBOL_2083_282 = 2083, /* $@282 */
+ YYSYMBOL_opt_sp_decl_body_list = 2084, /* opt_sp_decl_body_list */
+ YYSYMBOL_sp_decl_body_list = 2085, /* sp_decl_body_list */
+ YYSYMBOL_2086_283 = 2086, /* $@283 */
+ YYSYMBOL_sp_decl_non_handler_list = 2087, /* sp_decl_non_handler_list */
+ YYSYMBOL_sp_decl_handler_list = 2088, /* sp_decl_handler_list */
+ YYSYMBOL_opt_sp_decl_handler_list = 2089, /* opt_sp_decl_handler_list */
+ YYSYMBOL_sp_decl_non_handler = 2090, /* sp_decl_non_handler */
+ YYSYMBOL_2091_284 = 2091, /* $@284 */
+ YYSYMBOL_sp_proc_stmt = 2092, /* sp_proc_stmt */
+ YYSYMBOL_sp_labelable_stmt = 2093, /* sp_labelable_stmt */
+ YYSYMBOL_sp_proc_stmt_compound_ok = 2094, /* sp_proc_stmt_compound_ok */
+ YYSYMBOL_sp_labeled_block = 2095, /* sp_labeled_block */
+ YYSYMBOL_2096_285 = 2096, /* $@285 */
+ YYSYMBOL_2097_286 = 2097, /* $@286 */
+ YYSYMBOL_2098_287 = 2098, /* $@287 */
+ YYSYMBOL_opt_not_atomic = 2099, /* opt_not_atomic */
+ YYSYMBOL_sp_unlabeled_block = 2100, /* sp_unlabeled_block */
+ YYSYMBOL_2101_288 = 2101, /* $@288 */
+ YYSYMBOL_2102_289 = 2102, /* $@289 */
+ YYSYMBOL_2103_290 = 2103, /* $@290 */
+ YYSYMBOL_sp_block_statements_and_exceptions = 2104, /* sp_block_statements_and_exceptions */
+ YYSYMBOL_2105_291 = 2105 /* $@291 */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
+
+
+/* Second part of user prologue. */
+#line 330 "/home/buildbot/git/sql/sql_yacc.yy"
+
+/* 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);
+
+#line 2389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+
+
+#ifdef short
+# undef short
+#endif
+
+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
+ <limits.h> and (if available) <stdint.h> are included
+ so that the code can choose integer types of a good width. */
+
+#ifndef __PTRDIFF_MAX__
+# include <limits.h> /* INFRINGES ON USER NAME SPACE */
+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_STDINT_H
+# endif
+#endif
+
+/* Narrow types that promote to a signed type and that can represent a
+ signed or unsigned integer of at least N bits. In tables they can
+ save space and decrease cache pressure. Promoting to a signed type
+ helps avoid bugs in integer arithmetic. */
+
+#ifdef __INT_LEAST8_MAX__
+typedef __INT_LEAST8_TYPE__ yytype_int8;
+#elif defined YY_STDINT_H
+typedef int_least8_t yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef __INT_LEAST16_MAX__
+typedef __INT_LEAST16_TYPE__ yytype_int16;
+#elif defined YY_STDINT_H
+typedef int_least16_t yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+/* Work around bug in HP-UX 11.23, which defines these macros
+ incorrectly for preprocessor constants. This workaround can likely
+ be removed in 2023, as HPE has promised support for HP-UX 11.23
+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
+ <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
+#ifdef __hpux
+# undef UINT_LEAST8_MAX
+# undef UINT_LEAST16_MAX
+# define UINT_LEAST8_MAX 255
+# define UINT_LEAST16_MAX 65535
+#endif
+
+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST8_TYPE__ yytype_uint8;
+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST8_MAX <= INT_MAX)
+typedef uint_least8_t yytype_uint8;
+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+typedef unsigned char yytype_uint8;
+#else
+typedef short yytype_uint8;
+#endif
+
+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
+typedef __UINT_LEAST16_TYPE__ yytype_uint16;
+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
+ && UINT_LEAST16_MAX <= INT_MAX)
+typedef uint_least16_t yytype_uint16;
+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
+typedef unsigned short yytype_uint16;
+#else
+typedef int yytype_uint16;
+#endif
+
+#ifndef YYPTRDIFF_T
+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
+# define YYPTRDIFF_T __PTRDIFF_TYPE__
+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
+# elif defined PTRDIFF_MAX
+# ifndef ptrdiff_t
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# endif
+# define YYPTRDIFF_T ptrdiff_t
+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
+# else
+# define YYPTRDIFF_T long
+# define YYPTRDIFF_MAXIMUM LONG_MAX
+# endif
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM \
+ YY_CAST (YYPTRDIFF_T, \
+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
+ ? YYPTRDIFF_MAXIMUM \
+ : YY_CAST (YYSIZE_T, -1)))
+
+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
+
+/* Stored state numbers (used for stacks). */
+typedef yytype_int16 yy_state_t;
+
+/* State numbers in computations. */
+typedef int yy_state_fast_t;
+
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(Msgid) Msgid
+# endif
+#endif
+
+
+#ifndef YY_ATTRIBUTE_PURE
+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define YY_ATTRIBUTE_PURE
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define YY_ATTRIBUTE_UNUSED
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YY_USE(E) ((void) (E))
+#else
+# define YY_USE(E) /* empty */
+#endif
+
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
+# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
+# else
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
+# endif
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define YY_INITIAL_VALUE(Value) Value
+#endif
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END
+#endif
+#ifndef YY_INITIAL_VALUE
+# define YY_INITIAL_VALUE(Value) /* Nothing. */
+#endif
+
+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
+# define YY_IGNORE_USELESS_CAST_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
+# define YY_IGNORE_USELESS_CAST_END \
+ _Pragma ("GCC diagnostic pop")
+#endif
+#ifndef YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_BEGIN
+# define YY_IGNORE_USELESS_CAST_END
+#endif
+
+
+#define YY_ASSERT(E) ((void) (0 && (E)))
+
+#if !defined yyoverflow
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's 'empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined EXIT_SUCCESS
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined EXIT_SUCCESS
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* !defined yyoverflow */
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yy_state_t yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+# define YYCOPY_NEEDED 1
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYPTRDIFF_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(Dst, Src, Count) \
+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYPTRDIFF_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (Dst)[yyi] = (Src)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 757
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 108324
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 788
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 1318
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 3833
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 6409
+
+/* YYMAXUTOK -- Last valid token kind. */
+#define YYMAXUTOK 1021
+
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_int16 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 783, 2, 2, 2, 772, 767, 2,
+ 779, 780, 770, 769, 782, 768, 787, 771, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 786,
+ 765, 763, 764, 2, 3, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 773, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 784, 766, 785, 774, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 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, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, 474, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, 681, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, 755,
+ 756, 757, 758, 759, 760, 761, 762, 775, 776, 777,
+ 778, 781
+};
+
+#if YYDEBUG
+/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_int16 yyrline[] =
+{
+ 0, 1975, 1975, 1985, 1984, 2009, 2016, 2018, 2022, 2023,
+ 2024, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037,
+ 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047,
+ 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057,
+ 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067,
+ 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077,
+ 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087,
+ 2088, 2092, 2099, 2100, 2105, 2104, 2115, 2121, 2123, 2120,
+ 2132, 2134, 2133, 2143, 2148, 2160, 2159, 2176, 2175, 2185,
+ 2186, 2190, 2194, 2198, 2202, 2206, 2210, 2220, 2225, 2229,
+ 2233, 2237, 2241, 2245, 2250, 2254, 2259, 2287, 2291, 2295,
+ 2300, 2303, 2305, 2306, 2310, 2316, 2318, 2319, 2323, 2329,
+ 2331, 2332, 2336, 2343, 2347, 2362, 2366, 2372, 2378, 2384,
+ 2390, 2398, 2402, 2406, 2418, 2421, 2426, 2448, 2460, 2447,
+ 2483, 2482, 2538, 2545, 2537, 2557, 2564, 2556, 2577, 2583,
+ 2576, 2595, 2601, 2594, 2613, 2612, 2626, 2624, 2640, 2638,
+ 2652, 2651, 2662, 2661, 2671, 2678, 2685, 2685, 2688, 2692,
+ 2693, 2697, 2698, 2702, 2707, 2713, 2719, 2727, 2733, 2739,
+ 2747, 2755, 2763, 2771, 2779, 2787, 2799, 2815, 2815, 2819,
+ 2818, 2830, 2831, 2835, 2840, 2845, 2850, 2855, 2860, 2865,
+ 2873, 2872, 2905, 2904, 2911, 2918, 2919, 2925, 2931, 2941,
+ 2947, 2953, 2955, 2962, 2963, 2967, 2977, 2978, 2986, 2986,
+ 3028, 3037, 3038, 3043, 3044, 3045, 3046, 3051, 3056, 3064,
+ 3065, 3069, 3070, 3075, 3077, 3079, 3081, 3083, 3085, 3087,
+ 3093, 3094, 3098, 3099, 3104, 3103, 3114, 3113, 3124, 3123,
+ 3136, 3138, 3141, 3143, 3147, 3151, 3160, 3165, 3165, 3175,
+ 3176, 3180, 3188, 3190, 3194, 3195, 3199, 3200, 3201, 3206,
+ 3205, 3217, 3221, 3222, 3226, 3227, 3232, 3238, 3244, 3254,
+ 3262, 3267, 3275, 3279, 3288, 3286, 3300, 3308, 3313, 3312,
+ 3326, 3328, 3333, 3343, 3342, 3361, 3362, 3363, 3364, 3369,
+ 3371, 3376, 3391, 3399, 3403, 3423, 3424, 3428, 3432, 3438,
+ 3444, 3450, 3456, 3466, 3471, 3479, 3487, 3492, 3498, 3499,
+ 3505, 3508, 3512, 3520, 3537, 3539, 3557, 3563, 3565, 3567,
+ 3569, 3571, 3573, 3575, 3577, 3579, 3581, 3583, 3585, 3587,
+ 3592, 3600, 3616, 3617, 3622, 3628, 3637, 3644, 3653, 3662,
+ 3667, 3681, 3683, 3685, 3694, 3699, 3706, 3715, 3724, 3726,
+ 3728, 3730, 3732, 3734, 3736, 3738, 3740, 3742, 3744, 3746,
+ 3748, 3750, 3755, 3756, 3764, 3776, 3792, 3791, 3802, 3802,
+ 3824, 3825, 3830, 3829, 3837, 3848, 3853, 3859, 3858, 3865,
+ 3864, 3873, 3878, 3884, 3883, 3890, 3889, 3899, 3907, 3915,
+ 3924, 3924, 3947, 3957, 3956, 3977, 3976, 3996, 4002, 4010,
+ 4011, 4015, 4016, 4017, 4021, 4029, 4034, 4039, 4047, 4048,
+ 4056, 4074, 4090, 4110, 4115, 4109, 4127, 4129, 4130, 4131,
+ 4136, 4135, 4206, 4205, 4212, 4217, 4218, 4222, 4223, 4228,
+ 4227, 4243, 4242, 4257, 4267, 4271, 4272, 4277, 4278, 4282,
+ 4290, 4295, 4302, 4311, 4325, 4333, 4342, 4341, 4349, 4348,
+ 4356, 4361, 4368, 4355, 4378, 4377, 4388, 4387, 4397, 4396,
+ 4406, 4413, 4405, 4428, 4427, 4439, 4441, 4446, 4448, 4450,
+ 4456, 4455, 4458, 4459, 4473, 4474, 4478, 4479, 4489, 4494,
+ 4505, 4542, 4543, 4548, 4547, 4563, 4578, 4577, 4599, 4598,
+ 4604, 4612, 4611, 4614, 4616, 4619, 4618, 4627, 4630, 4629,
+ 4638, 4639, 4645, 4646, 4663, 4664, 4668, 4669, 4673, 4687,
+ 4697, 4708, 4717, 4718, 4731, 4733, 4732, 4737, 4735, 4746,
+ 4747, 4751, 4765, 4777, 4778, 4791, 4800, 4822, 4823, 4826,
+ 4828, 4833, 4832, 4856, 4868, 4884, 4883, 4898, 4897, 4911,
+ 4918, 4925, 4945, 4963, 4967, 4994, 5006, 5007, 5012, 5021,
+ 5011, 5046, 5047, 5051, 5062, 5081, 5094, 5120, 5121, 5126,
+ 5125, 5162, 5171, 5172, 5176, 5177, 5181, 5182, 5190, 5191,
+ 5195, 5196, 5200, 5202, 5208, 5214, 5216, 5218, 5220, 5222,
+ 5224, 5229, 5230, 5230, 5239, 5251, 5254, 5262, 5265, 5275,
+ 5276, 5280, 5281, 5285, 5286, 5290, 5291, 5292, 5301, 5304,
+ 5312, 5315, 5322, 5326, 5332, 5334, 5338, 5339, 5343, 5344,
+ 5345, 5349, 5364, 5369, 5374, 5379, 5384, 5389, 5394, 5409,
+ 5415, 5430, 5435, 5450, 5456, 5474, 5479, 5484, 5489, 5494,
+ 5499, 5505, 5504, 5530, 5531, 5532, 5537, 5542, 5547, 5549,
+ 5551, 5553, 5559, 5564, 5569, 5573, 5578, 5582, 5589, 5596,
+ 5601, 5608, 5610, 5614, 5633, 5641, 5650, 5660, 5671, 5672,
+ 5673, 5674, 5675, 5676, 5677, 5681, 5682, 5683, 5687, 5688,
+ 5689, 5690, 5695, 5702, 5709, 5710, 5714, 5715, 5716, 5717,
+ 5718, 5722, 5724, 5735, 5734, 5742, 5741, 5749, 5748, 5756,
+ 5755, 5765, 5762, 5773, 5771, 5780, 5779, 5798, 5806, 5814,
+ 5822, 5823, 5827, 5837, 5838, 5842, 5843, 5847, 5852, 5851,
+ 5890, 5889, 5902, 5901, 5912, 5913, 5917, 5918, 5922, 5923,
+ 5927, 5928, 5932, 5933, 5934, 5935, 5941, 5940, 5948, 5954,
+ 5963, 5964, 5969, 5972, 5976, 5980, 5987, 5988, 5992, 5993,
+ 5997, 6003, 6009, 6010, 6018, 6017, 6039, 6040, 6050, 6058,
+ 6070, 6070, 6073, 6074, 6081, 6088, 6092, 6100, 6101, 6102,
+ 6106, 6107, 6108, 6109, 6110, 6111, 6119, 6123, 6124, 6138,
+ 6142, 6146, 6150, 6152, 6159, 6161, 6167, 6168, 6169, 6170,
+ 6174, 6178, 6183, 6187, 6191, 6195, 6200, 6204, 6211, 6227,
+ 6228, 6235, 6242, 6250, 6254, 6258, 6262, 6266, 6270, 6274,
+ 6278, 6280, 6282, 6284, 6286, 6288, 6290, 6292, 6299, 6301,
+ 6306, 6310, 6311, 6315, 6316, 6320, 6321, 6322, 6323, 6324,
+ 6328, 6329, 6330, 6331, 6332, 6336, 6342, 6343, 6348, 6350,
+ 6357, 6358, 6359, 6363, 6367, 6368, 6369, 6370, 6371, 6372,
+ 6376, 6380, 6381, 6382, 6383, 6386, 6390, 6395, 6396, 6400,
+ 6401, 6405, 6406, 6411, 6416, 6420, 6426, 6431, 6439, 6440,
+ 6447, 6451, 6455, 6456, 6460, 6461, 6465, 6466, 6470, 6478,
+ 6486, 6495, 6499, 6505, 6509, 6510, 6514, 6527, 6533, 6543,
+ 6544, 6548, 6555, 6559, 6560, 6564, 6565, 6569, 6578, 6582,
+ 6583, 6587, 6595, 6596, 6600, 6601, 6605, 6606, 6607, 6615,
+ 6616, 6620, 6624, 6628, 6633, 6634, 6639, 6643, 6649, 6653,
+ 6660, 6661, 6666, 6665, 6678, 6679, 6683, 6686, 6687, 6688,
+ 6689, 6693, 6701, 6708, 6709, 6713, 6723, 6724, 6728, 6729,
+ 6732, 6734, 6738, 6750, 6751, 6755, 6762, 6775, 6776, 6778,
+ 6780, 6786, 6791, 6797, 6803, 6810, 6820, 6821, 6822, 6823,
+ 6824, 6828, 6829, 6833, 6834, 6838, 6839, 6843, 6844, 6845,
+ 6849, 6853, 6865, 6866, 6870, 6871, 6875, 6876, 6880, 6881,
+ 6885, 6886, 6890, 6891, 6895, 6896, 6901, 6902, 6903, 6907,
+ 6909, 6914, 6919, 6921, 6925, 6929, 6936, 6937, 6941, 6945,
+ 6946, 6956, 6957, 6958, 6962, 6963, 6967, 6972, 6980, 6981,
+ 6989, 6995, 7007, 7008, 7012, 7014, 7024, 7040, 7023, 7063,
+ 7062, 7079, 7078, 7093, 7102, 7101, 7109, 7108, 7116, 7115,
+ 7129, 7123, 7137, 7136, 7176, 7175, 7182, 7189, 7197, 7207,
+ 7188, 7216, 7220, 7228, 7231, 7235, 7239, 7247, 7249, 7250,
+ 7251, 7252, 7256, 7257, 7258, 7259, 7263, 7264, 7276, 7277,
+ 7282, 7283, 7286, 7288, 7296, 7304, 7306, 7308, 7309, 7317,
+ 7318, 7324, 7333, 7331, 7344, 7357, 7356, 7369, 7367, 7380,
+ 7387, 7397, 7398, 7404, 7416, 7415, 7455, 7462, 7466, 7472,
+ 7470, 7487, 7489, 7494, 7502, 7501, 7515, 7519, 7518, 7530,
+ 7531, 7535, 7548, 7549, 7553, 7557, 7564, 7569, 7573, 7580,
+ 7587, 7591, 7596, 7604, 7612, 7622, 7633, 7643, 7654, 7664,
+ 7670, 7676, 7683, 7693, 7698, 7704, 7709, 7719, 7724, 7730,
+ 7735, 7739, 7744, 7745, 7746, 7751, 7756, 7760, 7770, 7772,
+ 7773, 7774, 7775, 7779, 7784, 7792, 7797, 7805, 7806, 7810,
+ 7811, 7815, 7815, 7818, 7820, 7824, 7825, 7829, 7830, 7838,
+ 7839, 7840, 7844, 7845, 7850, 7859, 7860, 7861, 7862, 7867,
+ 7866, 7876, 7875, 7883, 7890, 7900, 7917, 7920, 7927, 7931,
+ 7938, 7942, 7946, 7953, 7953, 7959, 7960, 7964, 7965, 7966,
+ 7970, 7971, 7980, 7987, 7988, 7993, 7992, 8004, 8005, 8006,
+ 8010, 8012, 8011, 8018, 8017, 8038, 8039, 8043, 8044, 8048,
+ 8049, 8050, 8054, 8055, 8056, 8061, 8060, 8081, 8082, 8086,
+ 8091, 8092, 8099, 8101, 8106, 8108, 8107, 8120, 8122, 8121,
+ 8135, 8136, 8141, 8150, 8151, 8152, 8156, 8163, 8173, 8181,
+ 8190, 8192, 8191, 8197, 8196, 8219, 8220, 8224, 8225, 8229,
+ 8230, 8231, 8232, 8233, 8234, 8238, 8239, 8244, 8243, 8264,
+ 8265, 8266, 8271, 8270, 8281, 8288, 8294, 8303, 8304, 8308,
+ 8324, 8323, 8336, 8337, 8341, 8342, 8346, 8357, 8368, 8369,
+ 8374, 8373, 8388, 8389, 8393, 8394, 8398, 8409, 8421, 8420,
+ 8428, 8428, 8437, 8438, 8443, 8444, 8454, 8453, 8468, 8467,
+ 8486, 8485, 8502, 8500, 8521, 8522, 8527, 8526, 8540, 8549,
+ 8539, 8559, 8571, 8635, 8640, 8655, 8656, 8671, 8670, 8686,
+ 8685, 8698, 8700, 8715, 8723, 8721, 8736, 8754, 8756, 8766,
+ 8770, 8811, 8820, 8830, 8831, 8835, 8839, 8845, 8852, 8854,
+ 8863, 8867, 8871, 8878, 8887, 8891, 8898, 8915, 8918, 8926,
+ 8929, 8936, 8940, 8944, 8948, 8955, 8956, 8960, 8961, 8970,
+ 8983, 8989, 9000, 9003, 9011, 9014, 9020, 9026, 9035, 9036,
+ 9037, 9057, 9062, 9084, 9090, 9096, 9102, 9103, 9104, 9105,
+ 9106, 9110, 9111, 9112, 9116, 9117, 9118, 9122, 9123, 9128,
+ 9179, 9186, 9229, 9235, 9239, 9245, 9251, 9257, 9263, 9269,
+ 9275, 9281, 9287, 9293, 9299, 9305, 9309, 9315, 9324, 9330,
+ 9338, 9344, 9353, 9359, 9367, 9377, 9383, 9390, 9397, 9405,
+ 9411, 9420, 9424, 9430, 9436, 9442, 9448, 9455, 9461, 9467,
+ 9473, 9479, 9486, 9492, 9498, 9504, 9510, 9516, 9522, 9528,
+ 9534, 9538, 9539, 9543, 9544, 9548, 9549, 9553, 9554, 9558,
+ 9559, 9560, 9561, 9562, 9563, 9567, 9568, 9573, 9576, 9580,
+ 9581, 9582, 9586, 9587, 9588, 9589, 9590, 9591, 9595, 9596,
+ 9597, 9601, 9606, 9613, 9635, 9642, 9651, 9652, 9653, 9654,
+ 9658, 9667, 9668, 9672, 9676, 9677, 9678, 9679, 9680, 9681,
+ 9682, 9714, 9715, 9716, 9717, 9718, 9719, 9720, 9721, 9722,
+ 9730, 9738, 9739, 9746, 9752, 9757, 9767, 9772, 9777, 9783,
+ 9788, 9794, 9805, 9812, 9817, 9822, 9827, 9832, 9837, 9842,
+ 9850, 9851, 9852, 9853, 9861, 9862, 9871, 9872, 9878, 9882,
+ 9888, 9894, 9903, 9904, 9913, 9920, 9934, 9940, 9946, 9955,
+ 9964, 9970, 9976, 9982, 9988, 10003, 10014, 10020, 10026, 10032,
+ 10038, 10044, 10052, 10059, 10063, 10069, 10077, 10086, 10087, 10091,
+ 10095, 10102, 10106, 10126, 10133, 10139, 10146, 10153, 10159, 10165,
+ 10171, 10177, 10184, 10190, 10201, 10208, 10214, 10221, 10227, 10232,
+ 10237, 10243, 10249, 10254, 10261, 10268, 10276, 10283, 10290, 10297,
+ 10312, 10318, 10324, 10333, 10344, 10351, 10357, 10365, 10371, 10377,
+ 10383, 10389, 10397, 10409, 10429, 10428, 10504, 10510, 10516, 10522,
+ 10527, 10532, 10537, 10542, 10547, 10552, 10572, 10574, 10579, 10580,
+ 10584, 10585, 10589, 10590, 10594, 10601, 10609, 10636, 10642, 10648,
+ 10654, 10660, 10666, 10675, 10682, 10684, 10681, 10691, 10702, 10708,
+ 10714, 10720, 10726, 10732, 10738, 10744, 10750, 10757, 10756, 10777,
+ 10776, 10807, 10806, 10820, 10829, 10847, 10849, 10851, 10866, 10873,
+ 10880, 10887, 10894, 10901, 10908, 10915, 10922, 10929, 10940, 10947,
+ 10958, 10969, 10989, 10988, 10994, 11011, 11017, 11026, 11035, 11045,
+ 11044, 11056, 11071, 11084, 11089, 11097, 11098, 11103, 11108, 11111,
+ 11113, 11117, 11122, 11130, 11131, 11136, 11143, 11153, 11152, 11169,
+ 11171, 11177, 11183, 11189, 11193, 11194, 11195, 11203, 11204, 11205,
+ 11206, 11207, 11208, 11209, 11210, 11214, 11215, 11216, 11217, 11224,
+ 11225, 11229, 11234, 11242, 11243, 11247, 11254, 11262, 11271, 11281,
+ 11282, 11293, 11294, 11306, 11310, 11314, 11322, 11323, 11327, 11331,
+ 11335, 11342, 11346, 11351, 11352, 11358, 11357, 11386, 11385, 11401,
+ 11410, 11422, 11434, 11435, 11436, 11437, 11442, 11443, 11444, 11445,
+ 11446, 11450, 11454, 11458, 11468, 11475, 11483, 11489, 11482, 11535,
+ 11536, 11542, 11547, 11561, 11569, 11567, 11587, 11585, 11598, 11610,
+ 11608, 11628, 11627, 11639, 11652, 11650, 11671, 11670, 11683, 11697,
+ 11698, 11699, 11703, 11704, 11712, 11713, 11717, 11726, 11727, 11728,
+ 11733, 11734, 11738, 11739, 11743, 11744, 11748, 11749, 11757, 11765,
+ 11773, 11774, 11787, 11803, 11810, 11822, 11823, 11828, 11832, 11833,
+ 11834, 11838, 11839, 11844, 11843, 11849, 11848, 11856, 11857, 11860,
+ 11862, 11862, 11866, 11866, 11871, 11872, 11876, 11878, 11883, 11884,
+ 11888, 11899, 11913, 11914, 11915, 11916, 11917, 11918, 11919, 11920,
+ 11921, 11922, 11923, 11924, 11928, 11929, 11930, 11931, 11932, 11933,
+ 11934, 11935, 11936, 11940, 11941, 11942, 11943, 11946, 11948, 11949,
+ 11953, 11954, 11958, 11966, 11968, 11972, 11974, 11973, 11987, 11990,
+ 11989, 12007, 12009, 12013, 12018, 12026, 12027, 12044, 12067, 12068,
+ 12074, 12075, 12079, 12092, 12091, 12100, 12101, 12110, 12111, 12115,
+ 12116, 12120, 12121, 12135, 12136, 12140, 12150, 12159, 12166, 12173,
+ 12183, 12184, 12191, 12201, 12202, 12204, 12206, 12208, 12210, 12219,
+ 12223, 12224, 12228, 12242, 12243, 12249, 12248, 12259, 12265, 12274,
+ 12275, 12276, 12282, 12283, 12288, 12295, 12301, 12306, 12317, 12327,
+ 12338, 12345, 12353, 12363, 12364, 12368, 12369, 12373, 12374, 12379,
+ 12386, 12393, 12400, 12410, 12415, 12420, 12424, 12430, 12436, 12445,
+ 12453, 12457, 12464, 12465, 12469, 12474, 12479, 12492, 12496, 12500,
+ 12504, 12509, 12512, 12516, 12530, 12538, 12549, 12551, 12555, 12556,
+ 12560, 12561, 12562, 12563, 12564, 12565, 12569, 12570, 12571, 12572,
+ 12573, 12577, 12578, 12579, 12580, 12584, 12585, 12586, 12587, 12588,
+ 12592, 12593, 12594, 12595, 12596, 12600, 12605, 12606, 12610, 12611,
+ 12615, 12616, 12617, 12622, 12621, 12653, 12654, 12658, 12659, 12663,
+ 12673, 12673, 12685, 12686, 12689, 12709, 12719, 12724, 12732, 12738,
+ 12749, 12737, 12751, 12766, 12778, 12777, 12800, 12799, 12809, 12808,
+ 12831, 12837, 12841, 12846, 12845, 12854, 12859, 12865, 12872, 12870,
+ 12881, 12885, 12886, 12890, 12902, 12915, 12916, 12920, 12934, 12938,
+ 12947, 12950, 12957, 12958, 12966, 12973, 12965, 12986, 12993, 12985,
+ 13004, 13013, 13022, 13030, 13031, 13035, 13036, 13040, 13041, 13049,
+ 13049, 13052, 13052, 13065, 13066, 13068, 13067, 13080, 13086, 13088,
+ 13092, 13094, 13100, 13104, 13105, 13109, 13110, 13114, 13124, 13125,
+ 13129, 13130, 13134, 13135, 13139, 13140, 13145, 13144, 13161, 13160,
+ 13176, 13177, 13181, 13182, 13186, 13191, 13199, 13207, 13218, 13219,
+ 13228, 13229, 13237, 13239, 13241, 13239, 13251, 13263, 13270, 13280,
+ 13299, 13269, 13306, 13307, 13311, 13318, 13326, 13327, 13331, 13341,
+ 13342, 13349, 13348, 13369, 13372, 13379, 13380, 13390, 13405, 13413,
+ 13426, 13432, 13425, 13437, 13443, 13436, 13451, 13455, 13454, 13488,
+ 13489, 13493, 13508, 13526, 13527, 13531, 13532, 13536, 13537, 13538,
+ 13543, 13554, 13542, 13564, 13566, 13569, 13571, 13574, 13575, 13578,
+ 13582, 13586, 13590, 13594, 13598, 13602, 13606, 13610, 13618, 13621,
+ 13631, 13630, 13649, 13656, 13664, 13672, 13680, 13688, 13696, 13703,
+ 13710, 13716, 13718, 13720, 13729, 13733, 13738, 13737, 13744, 13743,
+ 13750, 13759, 13766, 13771, 13776, 13781, 13786, 13791, 13793, 13795,
+ 13797, 13804, 13812, 13814, 13822, 13829, 13836, 13844, 13850, 13855,
+ 13863, 13871, 13879, 13883, 13887, 13894, 13901, 13908, 13915, 13921,
+ 13927, 13933, 13939, 13945, 13953, 13958, 13965, 13972, 13979, 13986,
+ 13993, 14000, 14005, 14010, 14015, 14020, 14025, 14037, 14045, 14067,
+ 14069, 14071, 14076, 14077, 14080, 14082, 14086, 14087, 14091, 14092,
+ 14096, 14097, 14101, 14102, 14106, 14107, 14111, 14112, 14121, 14133,
+ 14132, 14151, 14150, 14160, 14161, 14162, 14163, 14164, 14165, 14169,
+ 14170, 14174, 14181, 14182, 14184, 14185, 14189, 14190, 14203, 14204,
+ 14205, 14221, 14245, 14244, 14256, 14255, 14267, 14272, 14273, 14286,
+ 14289, 14288, 14301, 14302, 14307, 14309, 14311, 14313, 14315, 14317,
+ 14325, 14327, 14329, 14331, 14336, 14338, 14346, 14348, 14350, 14352,
+ 14354, 14356, 14373, 14374, 14378, 14382, 14395, 14394, 14409, 14419,
+ 14420, 14423, 14425, 14426, 14430, 14446, 14447, 14452, 14451, 14461,
+ 14462, 14466, 14466, 14471, 14470, 14476, 14480, 14481, 14485, 14486,
+ 14493, 14498, 14497, 14512, 14511, 14526, 14527, 14528, 14532, 14533,
+ 14534, 14543, 14544, 14548, 14552, 14560, 14560, 14565, 14566, 14575,
+ 14587, 14601, 14612, 14625, 14586, 14636, 14637, 14641, 14642, 14646,
+ 14647, 14655, 14659, 14660, 14661, 14664, 14666, 14670, 14671, 14675,
+ 14680, 14687, 14692, 14699, 14701, 14705, 14706, 14710, 14715, 14723,
+ 14724, 14728, 14730, 14738, 14739, 14743, 14744, 14745, 14749, 14751,
+ 14756, 14757, 14772, 14773, 14777, 14778, 14782, 14795, 14800, 14805,
+ 14810, 14818, 14826, 14831, 14839, 14847, 14862, 14869, 14875, 14885,
+ 14886, 14894, 14895, 14896, 14897, 14911, 14917, 14923, 14929, 14935,
+ 14941, 14962, 14972, 14982, 14988, 14995, 15005, 15012, 15019, 15030,
+ 15029, 15054, 15055, 15060, 15061, 15066, 15090, 15093, 15092, 15108,
+ 15112, 15117, 15121, 15128, 15134, 15143, 15161, 15162, 15166, 15171,
+ 15179, 15184, 15192, 15197, 15202, 15207, 15213, 15218, 15226, 15231,
+ 15236, 15241, 15247, 15255, 15256, 15267, 15275, 15279, 15285, 15291,
+ 15301, 15307, 15316, 15326, 15327, 15331, 15332, 15333, 15337, 15345,
+ 15346, 15347, 15348, 15352, 15361, 15369, 15377, 15385, 15386, 15394,
+ 15395, 15399, 15400, 15405, 15414, 15415, 15423, 15424, 15432, 15433,
+ 15434, 15438, 15449, 15478, 15487, 15487, 15489, 15499, 15500, 15501,
+ 15502, 15503, 15504, 15505, 15506, 15507, 15508, 15509, 15510, 15515,
+ 15516, 15517, 15518, 15519, 15520, 15521, 15522, 15523, 15524, 15525,
+ 15526, 15527, 15531, 15532, 15533, 15534, 15535, 15536, 15537, 15538,
+ 15539, 15540, 15541, 15542, 15543, 15547, 15548, 15549, 15550, 15551,
+ 15552, 15553, 15554, 15555, 15556, 15557, 15558, 15559, 15563, 15564,
+ 15565, 15566, 15567, 15568, 15569, 15570, 15583, 15584, 15585, 15586,
+ 15587, 15588, 15589, 15590, 15591, 15592, 15593, 15594, 15595, 15596,
+ 15597, 15598, 15599, 15600, 15601, 15602, 15603, 15604, 15605, 15606,
+ 15607, 15608, 15609, 15610, 15611, 15612, 15613, 15614, 15615, 15616,
+ 15617, 15618, 15619, 15620, 15621, 15622, 15623, 15624, 15625, 15626,
+ 15627, 15628, 15629, 15630, 15631, 15632, 15633, 15634, 15635, 15676,
+ 15677, 15678, 15679, 15680, 15681, 15692, 15693, 15694, 15695, 15696,
+ 15697, 15698, 15699, 15700, 15701, 15705, 15706, 15707, 15711, 15712,
+ 15713, 15722, 15723, 15724, 15725, 15726, 15727, 15728, 15729, 15730,
+ 15731, 15732, 15733, 15734, 15735, 15736, 15737, 15738, 15739, 15740,
+ 15741, 15742, 15743, 15744, 15745, 15746, 15747, 15752, 15757, 15758,
+ 15759, 15760, 15761, 15762, 15763, 15764, 15765, 15766, 15767, 15768,
+ 15769, 15770, 15771, 15772, 15773, 15774, 15775, 15776, 15777, 15778,
+ 15779, 15780, 15781, 15782, 15783, 15784, 15785, 15786, 15787, 15788,
+ 15789, 15790, 15791, 15792, 15793, 15794, 15795, 15796, 15797, 15798,
+ 15799, 15800, 15805, 15806, 15807, 15808, 15809, 15810, 15811, 15812,
+ 15813, 15814, 15815, 15816, 15817, 15818, 15819, 15820, 15821, 15822,
+ 15823, 15824, 15825, 15826, 15827, 15828, 15829, 15830, 15831, 15832,
+ 15833, 15834, 15835, 15836, 15837, 15838, 15839, 15840, 15841, 15842,
+ 15843, 15844, 15845, 15846, 15847, 15848, 15849, 15850, 15851, 15852,
+ 15853, 15854, 15855, 15856, 15857, 15858, 15859, 15860, 15861, 15862,
+ 15863, 15864, 15865, 15866, 15867, 15868, 15869, 15870, 15871, 15872,
+ 15873, 15874, 15875, 15876, 15877, 15878, 15879, 15880, 15881, 15882,
+ 15883, 15884, 15885, 15886, 15887, 15888, 15889, 15890, 15891, 15892,
+ 15893, 15894, 15895, 15896, 15897, 15898, 15899, 15900, 15901, 15902,
+ 15903, 15904, 15905, 15906, 15907, 15908, 15909, 15910, 15911, 15912,
+ 15913, 15914, 15915, 15919, 15920, 15921, 15922, 15923, 15924, 15925,
+ 15926, 15927, 15928, 15929, 15930, 15931, 15932, 15933, 15934, 15935,
+ 15936, 15937, 15938, 15939, 15940, 15941, 15942, 15943, 15944, 15945,
+ 15946, 15947, 15948, 15949, 15950, 15951, 15952, 15953, 15954, 15955,
+ 15956, 15957, 15958, 15959, 15960, 15961, 15962, 15963, 15964, 15965,
+ 15966, 15967, 15968, 15969, 15970, 15971, 15972, 15973, 15974, 15975,
+ 15976, 15977, 15978, 15979, 15980, 15981, 15982, 15983, 15984, 15985,
+ 15986, 15987, 15988, 15989, 15990, 15991, 15992, 15993, 15994, 15995,
+ 15996, 15997, 15998, 15999, 16000, 16001, 16002, 16003, 16004, 16005,
+ 16006, 16007, 16008, 16009, 16010, 16011, 16012, 16013, 16014, 16015,
+ 16016, 16017, 16018, 16019, 16020, 16021, 16022, 16023, 16024, 16025,
+ 16026, 16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034, 16035,
+ 16036, 16037, 16038, 16039, 16040, 16041, 16042, 16043, 16044, 16045,
+ 16046, 16047, 16048, 16049, 16050, 16051, 16052, 16053, 16054, 16055,
+ 16056, 16057, 16058, 16059, 16060, 16061, 16062, 16063, 16064, 16068,
+ 16069, 16075, 16076, 16077, 16078, 16079, 16080, 16081, 16082, 16083,
+ 16084, 16085, 16086, 16087, 16088, 16089, 16093, 16094, 16095, 16096,
+ 16100, 16101, 16102, 16103, 16104, 16105, 16110, 16111, 16112, 16113,
+ 16114, 16115, 16116, 16117, 16118, 16119, 16120, 16121, 16122, 16123,
+ 16124, 16125, 16126, 16127, 16128, 16129, 16130, 16131, 16132, 16133,
+ 16134, 16135, 16136, 16137, 16138, 16139, 16140, 16141, 16142, 16143,
+ 16144, 16145, 16146, 16147, 16148, 16149, 16150, 16151, 16152, 16153,
+ 16154, 16155, 16156, 16157, 16158, 16159, 16160, 16161, 16162, 16163,
+ 16164, 16165, 16166, 16167, 16168, 16169, 16170, 16171, 16172, 16173,
+ 16174, 16175, 16176, 16177, 16178, 16179, 16180, 16181, 16182, 16183,
+ 16184, 16185, 16186, 16187, 16188, 16189, 16190, 16191, 16192, 16193,
+ 16194, 16195, 16196, 16197, 16198, 16199, 16200, 16201, 16202, 16203,
+ 16204, 16205, 16206, 16207, 16208, 16209, 16210, 16211, 16212, 16213,
+ 16214, 16215, 16216, 16217, 16218, 16219, 16220, 16221, 16222, 16223,
+ 16224, 16225, 16226, 16227, 16228, 16229, 16231, 16233, 16234, 16235,
+ 16236, 16237, 16238, 16239, 16240, 16241, 16242, 16243, 16244, 16245,
+ 16246, 16247, 16248, 16249, 16250, 16251, 16252, 16253, 16254, 16255,
+ 16256, 16257, 16258, 16259, 16260, 16261, 16262, 16263, 16264, 16265,
+ 16266, 16267, 16268, 16269, 16270, 16271, 16272, 16273, 16274, 16275,
+ 16276, 16277, 16278, 16279, 16280, 16281, 16282, 16283, 16284, 16285,
+ 16286, 16287, 16288, 16289, 16290, 16291, 16292, 16293, 16294, 16295,
+ 16296, 16297, 16298, 16299, 16300, 16301, 16302, 16303, 16304, 16305,
+ 16306, 16307, 16308, 16309, 16310, 16311, 16312, 16313, 16314, 16315,
+ 16316, 16317, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325,
+ 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335,
+ 16336, 16337, 16338, 16339, 16340, 16341, 16342, 16343, 16344, 16345,
+ 16346, 16347, 16359, 16358, 16371, 16372, 16374, 16373, 16385, 16384,
+ 16391, 16389, 16409, 16410, 16415, 16416, 16418, 16417, 16431, 16432,
+ 16438, 16437, 16442, 16446, 16447, 16448, 16452, 16453, 16454, 16455,
+ 16459, 16460, 16461, 16462, 16471, 16470, 16484, 16483, 16498, 16497,
+ 16515, 16514, 16528, 16527, 16541, 16540, 16556, 16555, 16569, 16568,
+ 16582, 16581, 16594, 16593, 16611, 16610, 16622, 16621, 16633, 16632,
+ 16643, 16661, 16672, 16679, 16688, 16710, 16726, 16738, 16737, 16751,
+ 16750, 16762, 16761, 16775, 16776, 16777, 16778, 16782, 16801, 16819,
+ 16820, 16824, 16825, 16826, 16827, 16832, 16837, 16842, 16853, 16854,
+ 16855, 16861, 16867, 16879, 16878, 16892, 16893, 16899, 16908, 16909,
+ 16913, 16914, 16918, 16937, 16938, 16939, 16944, 16945, 16950, 16949,
+ 16967, 16966, 16978, 16987, 16997, 16996, 17039, 17040, 17044, 17045,
+ 17049, 17050, 17051, 17052, 17054, 17053, 17066, 17067, 17068, 17069,
+ 17070, 17076, 17081, 17086, 17091, 17095, 17100, 17109, 17111, 17116,
+ 17121, 17127, 17133, 17138, 17150, 17151, 17155, 17156, 17160, 17165,
+ 17173, 17182, 17203, 17203, 17205, 17207, 17211, 17212, 17219, 17221,
+ 17225, 17230, 17237, 17241, 17250, 17257, 17258, 17259, 17260, 17264,
+ 17265, 17266, 17267, 17268, 17269, 17270, 17271, 17272, 17273, 17274,
+ 17275, 17276, 17277, 17278, 17279, 17280, 17281, 17282, 17283, 17284,
+ 17285, 17286, 17287, 17288, 17289, 17290, 17291, 17292, 17293, 17294,
+ 17295, 17296, 17297, 17298, 17299, 17300, 17301, 17302, 17303, 17304,
+ 17305, 17309, 17310, 17314, 17315, 17319, 17326, 17333, 17343, 17352,
+ 17358, 17365, 17373, 17378, 17386, 17391, 17399, 17404, 17411, 17411,
+ 17412, 17412, 17415, 17421, 17427, 17432, 17439, 17445, 17452, 17461,
+ 17465, 17471, 17479, 17481, 17485, 17489, 17493, 17500, 17505, 17510,
+ 17515, 17520, 17528, 17529, 17533, 17534, 17539, 17540, 17544, 17545,
+ 17549, 17550, 17554, 17555, 17560, 17559, 17569, 17578, 17579, 17583,
+ 17584, 17589, 17590, 17591, 17596, 17597, 17598, 17602, 17614, 17623,
+ 17629, 17638, 17647, 17660, 17662, 17664, 17672, 17673, 17674, 17678,
+ 17679, 17685, 17686, 17687, 17688, 17689, 17690, 17691, 17701, 17702,
+ 17707, 17720, 17734, 17735, 17736, 17740, 17741, 17745, 17746, 17751,
+ 17752, 17756, 17762, 17771, 17771, 17785, 17786, 17787, 17788, 17798,
+ 17800, 17806, 17812, 17822, 17831, 17837, 17842, 17846, 17820, 17895,
+ 17895, 17910, 17914, 17918, 17922, 17926, 17930, 17938, 17939, 17955,
+ 17962, 17969, 17982, 17983, 17984, 17988, 17989, 17990, 17994, 17995,
+ 18000, 18002, 18001, 18007, 18008, 18012, 18017, 18024, 18029, 18038,
+ 18044, 18473, 18474, 18478, 18480, 18479, 18493, 18492, 18505, 18504,
+ 18518, 18522, 18526, 18531, 18532, 18538, 18539, 18540, 18541, 18542,
+ 18543, 18544, 18545, 18549, 18550, 18551, 18552, 18553, 18554, 18555,
+ 18556, 18560, 18561, 18562, 18567, 18571, 18580, 18579, 18592, 18598,
+ 18602, 18612, 18621, 18622, 18623, 18627, 18628, 18629, 18633, 18633,
+ 18645, 18651, 18652, 18653, 18654, 18655, 18656, 18657, 18658, 18662,
+ 18663, 18671, 18672, 18678, 18677, 18694, 18693, 18712, 18711, 18735,
+ 18736, 18740, 18749, 18750, 18754, 18755, 18760, 18759, 18774, 18782,
+ 18783, 18787, 18788, 18793, 18794, 18799, 18800, 18804, 18805, 18809,
+ 18813, 18817, 18823, 18813, 18832, 18834, 18839, 18840, 18844, 18845,
+ 18849, 18849, 18855, 18861, 18869, 18870, 18871, 18877, 18878, 18884,
+ 18885, 18891, 18902, 18901, 18929, 18928, 18954, 18963, 18972, 18978,
+ 18977, 18997, 18996, 19016, 19020, 19021, 19025, 19026, 19030, 19037,
+ 19047, 19055, 19066, 19074, 19079, 19084, 19088, 19093, 19098, 19103,
+ 19113, 19112, 19127, 19135, 19126, 19149, 19154, 19159, 19164, 19172,
+ 19185, 19184, 19195, 19193, 19209, 19207, 19221, 19230, 19228, 19250,
+ 19264, 19269, 19248, 19282, 19286, 19291, 19290, 19299, 19303, 19304,
+ 19311, 19312, 19319, 19320, 19324, 19325, 19332, 19343, 19342, 19361,
+ 19362, 19363, 19364, 19365, 19366, 19370, 19371, 19372, 19373, 19374,
+ 19375, 19376, 19377, 19378, 19379, 19380, 19384, 19385, 19386, 19387,
+ 19394, 19392, 19408, 19412, 19406, 19428, 19429, 19434, 19433, 19448,
+ 19454, 19447, 19471, 19469
+};
+#endif
+
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "\"end of file\"", "error", "\"invalid token\"", "'@'", "ABORT_SYM",
+ "IMPOSSIBLE_ACTION", "FORCE_LOOKAHEAD", "END_OF_INPUT",
+ "COLON_ORACLE_SYM", "PARAM_MARKER", "FOR_SYSTEM_TIME_SYM",
+ "LEFT_PAREN_ALT", "LEFT_PAREN_WITH", "LEFT_PAREN_LIKE",
+ "ORACLE_CONCAT_SYM", "PERCENT_ORACLE_SYM", "WITH_CUBE_SYM",
+ "WITH_ROLLUP_SYM", "WITH_SYSTEM_SYM", "IDENT", "IDENT_QUOTED",
+ "LEX_HOSTNAME", "UNDERSCORE_CHARSET", "BIN_NUM", "DECIMAL_NUM",
+ "FLOAT_NUM", "HEX_NUM", "HEX_STRING", "LONG_NUM", "NCHAR_STRING", "NUM",
+ "TEXT_STRING", "ULONGLONG_NUM", "AND_AND_SYM", "DOT_DOT_SYM",
+ "EQUAL_SYM", "GE", "LE", "MYSQL_CONCAT_SYM", "NE", "NOT2_SYM", "OR2_SYM",
+ "SET_VAR", "SHIFT_LEFT", "SHIFT_RIGHT", "ACCESSIBLE_SYM", "ADD", "ALL",
+ "ALTER", "ANALYZE_SYM", "AND_SYM", "ASC", "ASENSITIVE_SYM", "AS",
+ "BEFORE_SYM", "BETWEEN_SYM", "BIGINT", "BINARY", "BIT_AND", "BIT_OR",
+ "BIT_XOR", "BLOB_MARIADB_SYM", "BLOB_ORACLE_SYM", "BODY_ORACLE_SYM",
+ "BOTH", "BY", "CALL_SYM", "CASCADE", "CASE_SYM", "CAST_SYM", "CHANGE",
+ "CHAR_SYM", "CHECK_SYM", "COLLATE_SYM", "CONDITION_SYM", "CONSTRAINT",
+ "CONTINUE_MARIADB_SYM", "CONTINUE_ORACLE_SYM", "CONVERT_SYM",
+ "COUNT_SYM", "CREATE", "CROSS", "CUME_DIST_SYM", "CURDATE",
+ "CURRENT_ROLE", "CURRENT_USER", "CURSOR_SYM", "CURTIME", "DATABASE",
+ "DATABASES", "DATE_ADD_INTERVAL", "DATE_SUB_INTERVAL", "DAY_HOUR_SYM",
+ "DAY_MICROSECOND_SYM", "DAY_MINUTE_SYM", "DAY_SECOND_SYM", "DECIMAL_SYM",
+ "DECLARE_MARIADB_SYM", "DECLARE_ORACLE_SYM", "DEFAULT",
+ "DELETE_DOMAIN_ID_SYM", "DELETE_SYM", "DENSE_RANK_SYM", "DESCRIBE",
+ "DESC", "DETERMINISTIC_SYM", "DISTINCT", "DIV_SYM", "DO_DOMAIN_IDS_SYM",
+ "DOUBLE_SYM", "DROP", "DUAL_SYM", "EACH_SYM", "ELSEIF_MARIADB_SYM",
+ "ELSE", "ELSIF_ORACLE_SYM", "EMPTY_SYM", "ENCLOSED", "ESCAPED",
+ "EXCEPT_SYM", "EXISTS", "EXTRACT_SYM", "FALSE_SYM", "FETCH_SYM",
+ "FIRST_VALUE_SYM", "FLOAT_SYM", "FOREIGN", "FOR_SYM", "FROM",
+ "FULLTEXT_SYM", "GOTO_ORACLE_SYM", "GRANT", "GROUP_CONCAT_SYM",
+ "JSON_ARRAYAGG_SYM", "JSON_OBJECTAGG_SYM", "JSON_TABLE_SYM", "GROUP_SYM",
+ "HAVING", "HOUR_MICROSECOND_SYM", "HOUR_MINUTE_SYM", "HOUR_SECOND_SYM",
+ "IF_SYM", "IGNORE_DOMAIN_IDS_SYM", "IGNORE_SYM", "IGNORED_SYM",
+ "INDEX_SYM", "INFILE", "INNER_SYM", "INOUT_SYM", "INSENSITIVE_SYM",
+ "INSERT", "IN_SYM", "INTERSECT_SYM", "INTERVAL_SYM", "INTO", "INT_SYM",
+ "IS", "ITERATE_SYM", "JOIN_SYM", "KEYS", "KEY_SYM", "KILL_SYM",
+ "LAG_SYM", "LEADING", "LEAD_SYM", "LEAVE_SYM", "LEFT", "LIKE", "LIMIT",
+ "LINEAR_SYM", "LINES", "LOAD", "LOCATOR_SYM", "LOCK_SYM", "LONGBLOB",
+ "LONG_SYM", "LONGTEXT", "LOOP_SYM", "LOW_PRIORITY",
+ "MASTER_SSL_VERIFY_SERVER_CERT_SYM", "MATCH", "MAX_SYM", "MAXVALUE_SYM",
+ "MEDIAN_SYM", "MEDIUMBLOB", "MEDIUMINT", "MEDIUMTEXT", "MIN_SYM",
+ "MINUS_ORACLE_SYM", "MINUTE_MICROSECOND_SYM", "MINUTE_SECOND_SYM",
+ "MODIFIES_SYM", "MOD_SYM", "NATURAL", "NEG", "NESTED_SYM", "NOT_SYM",
+ "NO_WRITE_TO_BINLOG", "NOW_SYM", "NTH_VALUE_SYM", "NTILE_SYM",
+ "NULL_SYM", "NUMERIC_SYM", "ON", "OPTIMIZE", "OPTIONALLY", "ORDER_SYM",
+ "ORDINALITY_SYM", "OR_SYM", "OTHERS_ORACLE_SYM", "OUTER", "OUTFILE",
+ "OUT_SYM", "OVER_SYM", "PACKAGE_ORACLE_SYM", "PAGE_CHECKSUM_SYM",
+ "PARSE_VCOL_EXPR_SYM", "PARTITION_SYM", "PATH_SYM",
+ "PERCENTILE_CONT_SYM", "PERCENTILE_DISC_SYM", "PERCENT_RANK_SYM",
+ "PORTION_SYM", "POSITION_SYM", "PRECISION", "PRIMARY_SYM",
+ "PROCEDURE_SYM", "PURGE", "RAISE_ORACLE_SYM", "RANGE_SYM", "RANK_SYM",
+ "READS_SYM", "READ_SYM", "READ_WRITE_SYM", "REAL", "RECURSIVE_SYM",
+ "REFERENCES", "REF_SYSTEM_ID_SYM", "REGEXP", "RELEASE_SYM", "RENAME",
+ "REPEAT_SYM", "REQUIRE_SYM", "RESIGNAL_SYM", "RESTRICT", "RETURNING_SYM",
+ "RETURN_MARIADB_SYM", "RETURN_ORACLE_SYM", "REVOKE", "RIGHT",
+ "ROW_NUMBER_SYM", "ROWS_SYM", "ROWTYPE_ORACLE_SYM",
+ "SECOND_MICROSECOND_SYM", "SELECT_SYM", "SENSITIVE_SYM", "SEPARATOR_SYM",
+ "SERVER_OPTIONS", "SET", "SHOW", "SIGNAL_SYM", "SMALLINT", "SPATIAL_SYM",
+ "SPECIFIC_SYM", "SQL_BIG_RESULT", "SQLEXCEPTION_SYM", "SQL_SMALL_RESULT",
+ "SQLSTATE_SYM", "SQL_SYM", "SQLWARNING_SYM", "SSL_SYM", "STARTING",
+ "STATS_AUTO_RECALC_SYM", "STATS_PERSISTENT_SYM",
+ "STATS_SAMPLE_PAGES_SYM", "STDDEV_SAMP_SYM", "STD_SYM", "STRAIGHT_JOIN",
+ "SUM_SYM", "SYSDATE", "TABLE_REF_PRIORITY", "TABLE_SYM", "TERMINATED",
+ "THEN_SYM", "TINYBLOB", "TINYINT", "TINYTEXT", "TO_SYM", "TRAILING",
+ "TRIGGER_SYM", "TRUE_SYM", "UNDO_SYM", "UNION_SYM", "UNIQUE_SYM",
+ "UNLOCK_SYM", "UNSIGNED", "UPDATE_SYM", "USAGE", "USE_SYM", "USING",
+ "UTC_DATE_SYM", "UTC_TIMESTAMP_SYM", "UTC_TIME_SYM", "VALUES_IN_SYM",
+ "VALUES_LESS_SYM", "VALUES", "VARBINARY", "VARCHAR", "VARIANCE_SYM",
+ "VAR_SAMP_SYM", "VARYING", "WHEN_SYM", "WHERE", "WHILE_SYM", "WITH",
+ "XOR", "YEAR_MONTH_SYM", "ZEROFILL", "BODY_MARIADB_SYM",
+ "ELSEIF_ORACLE_SYM", "ELSIF_MARIADB_SYM", "EXCEPTION_ORACLE_SYM",
+ "GOTO_MARIADB_SYM", "OTHERS_MARIADB_SYM", "PACKAGE_MARIADB_SYM",
+ "RAISE_MARIADB_SYM", "ROWTYPE_MARIADB_SYM", "ROWNUM_SYM", "REPLACE",
+ "SUBSTRING", "TRIM", "ACCOUNT_SYM", "ACTION", "ADMIN_SYM", "ADDDATE_SYM",
+ "AFTER_SYM", "AGAINST", "AGGREGATE_SYM", "ALGORITHM_SYM", "ALWAYS_SYM",
+ "ANY_SYM", "ASCII_SYM", "AT_SYM", "ATOMIC_SYM", "AUTHORS_SYM",
+ "AUTOEXTEND_SIZE_SYM", "AUTO_INC", "AUTO_SYM", "AVG_ROW_LENGTH",
+ "AVG_SYM", "BACKUP_SYM", "BEGIN_MARIADB_SYM", "BEGIN_ORACLE_SYM",
+ "BINLOG_SYM", "BIT_SYM", "BLOCK_SYM", "BOOL_SYM", "BOOLEAN_SYM",
+ "BTREE_SYM", "BYTE_SYM", "CACHE_SYM", "CASCADED", "CATALOG_NAME_SYM",
+ "CHAIN_SYM", "CHANGED", "CHANNEL_SYM", "CHARSET", "CHECKPOINT_SYM",
+ "CHECKSUM_SYM", "CIPHER_SYM", "CLASS_ORIGIN_SYM", "CLIENT_SYM",
+ "CLOB_MARIADB_SYM", "CLOB_ORACLE_SYM", "CLOSE_SYM", "COALESCE",
+ "CODE_SYM", "COLLATION_SYM", "COLUMNS", "COLUMN_ADD_SYM",
+ "COLUMN_CHECK_SYM", "COLUMN_CREATE_SYM", "COLUMN_DELETE_SYM",
+ "COLUMN_GET_SYM", "COLUMN_SYM", "COLUMN_NAME_SYM", "COMMENT_SYM",
+ "COMMITTED_SYM", "COMMIT_SYM", "COMPACT_SYM", "COMPLETION_SYM",
+ "COMPRESSED_SYM", "CONCURRENT", "CONNECTION_SYM", "CONSISTENT_SYM",
+ "CONSTRAINT_CATALOG_SYM", "CONSTRAINT_NAME_SYM", "CONSTRAINT_SCHEMA_SYM",
+ "CONTAINS_SYM", "CONTEXT_SYM", "CONTRIBUTORS_SYM", "CPU_SYM", "CUBE_SYM",
+ "CURRENT_SYM", "CURRENT_POS_SYM", "CURSOR_NAME_SYM", "CYCLE_SYM",
+ "DATAFILE_SYM", "DATA_SYM", "DATETIME", "DATE_SYM", "DAY_SYM",
+ "DEALLOCATE_SYM", "DEFINER_SYM", "DELAYED_SYM", "DELAY_KEY_WRITE_SYM",
+ "DES_KEY_FILE", "DIAGNOSTICS_SYM", "DIRECTORY_SYM", "DISABLE_SYM",
+ "DISCARD", "DISK_SYM", "DO_SYM", "DUMPFILE", "DUPLICATE_SYM",
+ "DYNAMIC_SYM", "ENABLE_SYM", "END", "ENDS_SYM", "ENGINES_SYM",
+ "ENGINE_SYM", "ENUM", "ERROR_SYM", "ERRORS", "ESCAPE_SYM", "EVENTS_SYM",
+ "EVENT_SYM", "EVERY_SYM", "EXCHANGE_SYM", "EXAMINED_SYM", "EXCLUDE_SYM",
+ "EXECUTE_SYM", "EXCEPTION_MARIADB_SYM", "EXIT_MARIADB_SYM",
+ "EXIT_ORACLE_SYM", "EXPANSION_SYM", "EXPIRE_SYM", "EXPORT_SYM",
+ "EXTENDED_SYM", "EXTENT_SIZE_SYM", "FAST_SYM", "FAULTS_SYM",
+ "FEDERATED_SYM", "FILE_SYM", "FIRST_SYM", "FIXED_SYM", "FLUSH_SYM",
+ "FOLLOWS_SYM", "FOLLOWING_SYM", "FORCE_SYM", "FORMAT_SYM", "FOUND_SYM",
+ "FULL", "FUNCTION_SYM", "GENERAL", "GENERATED_SYM", "GET_FORMAT",
+ "GET_SYM", "GLOBAL_SYM", "GRANTS", "HANDLER_SYM", "HARD_SYM", "HASH_SYM",
+ "HELP_SYM", "HIGH_PRIORITY", "HISTORY_SYM", "HOST_SYM", "HOSTS_SYM",
+ "HOUR_SYM", "ID_SYM", "IDENTIFIED_SYM", "IGNORE_SERVER_IDS_SYM",
+ "IMMEDIATE_SYM", "IMPORT", "INCREMENT_SYM", "INDEXES",
+ "INITIAL_SIZE_SYM", "INSERT_METHOD", "INSTALL_SYM", "INVOKER_SYM",
+ "IO_SYM", "IPC_SYM", "ISOLATION", "ISOPEN_SYM", "ISSUER_SYM",
+ "INVISIBLE_SYM", "JSON_SYM", "KEY_BLOCK_SIZE", "LANGUAGE_SYM",
+ "LAST_SYM", "LAST_VALUE", "LASTVAL_SYM", "LEAVES", "LESS_SYM",
+ "LEVEL_SYM", "LIST_SYM", "LOCAL_SYM", "LOCKED_SYM", "LOCKS_SYM",
+ "LOGFILE_SYM", "LOGS_SYM", "MASTER_CONNECT_RETRY_SYM",
+ "MASTER_DELAY_SYM", "MASTER_GTID_POS_SYM", "MASTER_HOST_SYM",
+ "MASTER_LOG_FILE_SYM", "MASTER_LOG_POS_SYM", "MASTER_PASSWORD_SYM",
+ "MASTER_PORT_SYM", "MASTER_SERVER_ID_SYM", "MASTER_SSL_CAPATH_SYM",
+ "MASTER_SSL_CA_SYM", "MASTER_SSL_CERT_SYM", "MASTER_SSL_CIPHER_SYM",
+ "MASTER_SSL_CRL_SYM", "MASTER_SSL_CRLPATH_SYM", "MASTER_SSL_KEY_SYM",
+ "MASTER_SSL_SYM", "MASTER_SYM", "MASTER_USER_SYM", "MASTER_USE_GTID_SYM",
+ "MASTER_HEARTBEAT_PERIOD_SYM", "MASTER_DEMOTE_TO_SLAVE_SYM",
+ "MAX_CONNECTIONS_PER_HOUR", "MAX_QUERIES_PER_HOUR", "MAX_ROWS",
+ "MAX_SIZE_SYM", "MAX_UPDATES_PER_HOUR", "MAX_STATEMENT_TIME_SYM",
+ "MAX_USER_CONNECTIONS_SYM", "MEDIUM_SYM", "MEMORY_SYM", "MERGE_SYM",
+ "MESSAGE_TEXT_SYM", "MICROSECOND_SYM", "MIGRATE_SYM", "MINUTE_SYM",
+ "MINVALUE_SYM", "MIN_ROWS", "MODE_SYM", "MODIFY_SYM", "MONITOR_SYM",
+ "MONTH_SYM", "MUTEX_SYM", "MYSQL_SYM", "MYSQL_ERRNO_SYM", "NAMES_SYM",
+ "NAME_SYM", "NATIONAL_SYM", "NCHAR_SYM", "NEVER_SYM", "NEXT_SYM",
+ "NEXTVAL_SYM", "NOCACHE_SYM", "NOCYCLE_SYM", "NODEGROUP_SYM", "NONE_SYM",
+ "NOTFOUND_SYM", "NO_SYM", "NOMAXVALUE_SYM", "NOMINVALUE_SYM",
+ "NO_WAIT_SYM", "NOWAIT_SYM", "NUMBER_MARIADB_SYM", "NUMBER_ORACLE_SYM",
+ "NVARCHAR_SYM", "OF_SYM", "OFFSET_SYM", "OLD_PASSWORD_SYM", "ONE_SYM",
+ "ONLY_SYM", "ONLINE_SYM", "OPEN_SYM", "OPTIONS_SYM", "OPTION",
+ "OVERLAPS_SYM", "OWNER_SYM", "PACK_KEYS_SYM", "PAGE_SYM", "PARSER_SYM",
+ "PARTIAL", "PARTITIONS_SYM", "PARTITIONING_SYM", "PASSWORD_SYM",
+ "PERIOD_SYM", "PERSISTENT_SYM", "PHASE_SYM", "PLUGINS_SYM", "PLUGIN_SYM",
+ "PORT_SYM", "PRECEDES_SYM", "PRECEDING_SYM", "PREPARE_SYM",
+ "PRESERVE_SYM", "PREV_SYM", "PREVIOUS_SYM", "PRIVILEGES", "PROCESS",
+ "PROCESSLIST_SYM", "PROFILE_SYM", "PROFILES_SYM", "PROXY_SYM",
+ "QUARTER_SYM", "QUERY_SYM", "QUICK", "RAW_MARIADB_SYM", "RAW_ORACLE_SYM",
+ "READ_ONLY_SYM", "REBUILD_SYM", "RECOVER_SYM", "REDOFILE_SYM",
+ "REDO_BUFFER_SIZE_SYM", "REDUNDANT_SYM", "RELAY", "RELAYLOG_SYM",
+ "RELAY_LOG_FILE_SYM", "RELAY_LOG_POS_SYM", "RELAY_THREAD", "RELOAD",
+ "REMOVE_SYM", "REORGANIZE_SYM", "REPAIR", "REPEATABLE_SYM", "REPLAY_SYM",
+ "REPLICATION", "RESET_SYM", "RESTART_SYM", "RESOURCES", "RESTORE_SYM",
+ "RESUME_SYM", "RETURNED_SQLSTATE_SYM", "RETURNS_SYM", "REUSE_SYM",
+ "REVERSE_SYM", "ROLE_SYM", "ROLLBACK_SYM", "ROLLUP_SYM", "ROUTINE_SYM",
+ "ROWCOUNT_SYM", "ROW_SYM", "ROW_COUNT_SYM", "ROW_FORMAT_SYM",
+ "RTREE_SYM", "SAVEPOINT_SYM", "SCHEDULE_SYM", "SCHEMA_NAME_SYM",
+ "SECOND_SYM", "SECURITY_SYM", "SEQUENCE_SYM", "SERIALIZABLE_SYM",
+ "SERIAL_SYM", "SESSION_SYM", "SERVER_SYM", "SETVAL_SYM", "SHARE_SYM",
+ "SHUTDOWN", "SIGNED_SYM", "SIMPLE_SYM", "SKIP_SYM", "SLAVE", "SLAVES",
+ "SLAVE_POS_SYM", "SLOW", "SNAPSHOT_SYM", "SOCKET_SYM", "SOFT_SYM",
+ "SONAME_SYM", "SOUNDS_SYM", "SOURCE_SYM", "SQL_BUFFER_RESULT",
+ "SQL_CACHE_SYM", "SQL_CALC_FOUND_ROWS", "SQL_NO_CACHE_SYM", "SQL_THREAD",
+ "STAGE_SYM", "STARTS_SYM", "START_SYM", "STATEMENT_SYM", "STATUS_SYM",
+ "STOP_SYM", "STORAGE_SYM", "STORED_SYM", "STRING_SYM",
+ "SUBCLASS_ORIGIN_SYM", "SUBDATE_SYM", "SUBJECT_SYM", "SUBPARTITIONS_SYM",
+ "SUBPARTITION_SYM", "SUPER_SYM", "SUSPEND_SYM", "SWAPS_SYM",
+ "SWITCHES_SYM", "SYSTEM", "SYSTEM_TIME_SYM", "TABLES", "TABLESPACE",
+ "TABLE_CHECKSUM_SYM", "TABLE_NAME_SYM", "TEMPORARY", "TEMPTABLE_SYM",
+ "TEXT_SYM", "THAN_SYM", "TIES_SYM", "TIMESTAMP", "TIMESTAMP_ADD",
+ "TIMESTAMP_DIFF", "TIME_SYM", "TRANSACTION_SYM", "TRANSACTIONAL_SYM",
+ "THREADS_SYM", "TRIGGERS_SYM", "TRIM_ORACLE", "TRUNCATE_SYM", "TYPE_SYM",
+ "UDF_RETURNS_SYM", "UNBOUNDED_SYM", "UNCOMMITTED_SYM", "UNDEFINED_SYM",
+ "UNDOFILE_SYM", "UNDO_BUFFER_SIZE_SYM", "UNICODE_SYM", "UNINSTALL_SYM",
+ "UNKNOWN_SYM", "UNTIL_SYM", "UPGRADE_SYM", "USER_SYM", "USE_FRM",
+ "VALUE_SYM", "VARCHAR2_MARIADB_SYM", "VARCHAR2_ORACLE_SYM", "VARIABLES",
+ "VERSIONING_SYM", "VIA_SYM", "VIEW_SYM", "VISIBLE_SYM", "VIRTUAL_SYM",
+ "WAIT_SYM", "WARNINGS", "WEEK_SYM", "WEIGHT_STRING_SYM", "WINDOW_SYM",
+ "WITHIN", "WITHOUT", "WORK_SYM", "WRAPPER_SYM", "WRITE_SYM", "X509_SYM",
+ "XA_SYM", "XML_SYM", "YEAR_SYM", "CONDITIONLESS_JOIN", "ON_SYM",
+ "PREC_BELOW_NOT", "'='", "'>'", "'<'", "'|'", "'&'", "'-'", "'+'", "'*'",
+ "'/'", "'%'", "'^'", "'~'", "SUBQUERY_AS_EXPR",
+ "PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE", "USER",
+ "PREC_BELOW_CONTRACTION_TOKEN2", "'('", "')'", "EMPTY_FROM_CLAUSE",
+ "','", "'!'", "'{'", "'}'", "';'", "'.'", "$accept", "query", "$@1",
+ "opt_end_of_input", "directly_executable_statement", "verb_clause",
+ "deallocate", "deallocate_or_drop", "prepare", "$@2", "execute", "$@3",
+ "$@4", "execute_using", "$@5", "execute_params", "help", "$@6", "change",
+ "$@7", "master_defs", "master_def", "ignore_server_id_list",
+ "ignore_server_id", "do_domain_id_list", "do_domain_id",
+ "ignore_domain_id_list", "ignore_domain_id", "master_file_def",
+ "optional_connection_name", "connection_name", "optional_for_channel",
+ "for_channel", "create", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13",
+ "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "$@20", "$@21", "$@22",
+ "$@23", "$@24", "opt_sequence", "sequence_defs", "sequence_def",
+ "force_lookahead", "server_def", "$@25", "server_options_list",
+ "server_option", "event_tail", "$@26", "ev_schedule_time", "$@27",
+ "opt_ev_status", "ev_starts", "ev_ends", "opt_ev_on_completion",
+ "ev_on_completion", "opt_ev_comment", "ev_sql_stmt", "$@28",
+ "clear_privileges", "opt_aggregate", "sp_handler", "sp_name",
+ "sp_a_chistics", "sp_c_chistics", "sp_chistic", "sp_c_chistic",
+ "sp_suid", "call", "$@29", "$@30", "$@31", "opt_sp_cparam_list",
+ "opt_sp_cparams", "sp_cparams", "sp_fdparam_list", "$@32", "sp_fdparams",
+ "sp_param_name", "sp_pdparam_list", "sp_pdparams", "sp_parameter_type",
+ "sp_parenthesized_pdparam_list", "$@33", "sp_parenthesized_fdparam_list",
+ "sp_proc_stmts", "sp_proc_stmts1", "optionally_qualified_column_ident",
+ "row_field_definition", "row_field_definition_list", "row_type_body",
+ "sp_decl_idents_init_vars", "sp_decl_variable_list", "$@34",
+ "sp_decl_handler", "$@35", "opt_parenthesized_cursor_formal_parameters",
+ "sp_cursor_stmt_lex", "sp_cursor_stmt", "$@36", "sp_handler_type",
+ "sp_hcond_list", "sp_hcond_element", "sp_cond", "sqlstate", "opt_value",
+ "sp_hcond", "raise_stmt_oracle", "signal_stmt", "signal_value",
+ "opt_signal_value", "opt_set_signal_information",
+ "signal_information_item_list", "signal_allowed_expr",
+ "signal_condition_information_item_name", "resignal_stmt",
+ "get_diagnostics", "which_area", "diagnostics_information",
+ "statement_information", "statement_information_item",
+ "simple_target_specification", "statement_information_item_name",
+ "condition_number", "condition_information",
+ "condition_information_item", "condition_information_item_name",
+ "sp_decl_ident", "sp_decl_idents", "sp_proc_stmt_if", "$@37",
+ "sp_proc_stmt_statement", "$@38", "RETURN_ALLMODES_SYM",
+ "sp_proc_stmt_return", "$@39", "sp_proc_stmt_exit_oracle", "$@40",
+ "$@41", "sp_proc_stmt_continue_oracle", "$@42", "$@43",
+ "sp_proc_stmt_leave", "sp_proc_stmt_iterate", "sp_proc_stmt_goto_oracle",
+ "expr_lex", "@44", "assignment_source_lex", "assignment_source_expr",
+ "$@45", "for_loop_bound_expr", "$@46", "cursor_actual_parameters",
+ "opt_parenthesized_cursor_actual_parameters", "sp_proc_stmt_with_cursor",
+ "sp_proc_stmt_open", "sp_proc_stmt_fetch_head", "sp_proc_stmt_fetch",
+ "sp_proc_stmt_close", "sp_fetch_list", "sp_if", "$@47", "$@48",
+ "sp_elseifs", "case_stmt_specification", "$@49", "case_stmt_body",
+ "$@50", "simple_when_clause_list", "searched_when_clause_list",
+ "simple_when_clause", "$@51", "searched_when_clause", "$@52",
+ "else_clause_opt", "sp_opt_label", "opt_sp_for_loop_direction",
+ "sp_for_loop_index_and_bounds", "sp_for_loop_bounds", "loop_body",
+ "repeat_body", "pop_sp_loop_label", "sp_labeled_control", "$@53", "$@54",
+ "$@55", "$@56", "$@57", "$@58", "sp_unlabeled_control", "$@59", "$@60",
+ "$@61", "$@62", "$@63", "trg_action_time", "trg_event", "create_body",
+ "$@64", "create_like", "opt_create_select",
+ "create_select_query_expression", "opt_create_partitioning",
+ "opt_partitioning", "partitioning", "$@65", "have_partitioning",
+ "partition_entry", "$@66", "partition", "$@67", "part_type_def", "$@68",
+ "$@69", "$@70", "opt_linear", "opt_key_algo", "part_field_list",
+ "part_field_item_list", "part_field_item", "part_column_list",
+ "part_func", "sub_part_func", "opt_num_parts", "opt_sub_part", "$@71",
+ "$@72", "sub_part_field_list", "sub_part_field_item", "part_func_expr",
+ "opt_num_subparts", "part_defs", "part_def_list", "opt_partition",
+ "part_definition", "$@73", "part_name", "opt_part_values", "$@74",
+ "$@75", "part_func_max", "part_values_in", "part_value_list",
+ "part_value_item", "$@76", "$@77", "part_value_item_list",
+ "part_value_expr_item", "opt_sub_partition", "sub_part_list",
+ "sub_part_definition", "$@78", "sub_name", "opt_part_options",
+ "part_option_list", "part_option", "opt_subpart_options",
+ "subpart_option_list", "server_part_option", "opt_versioning_rotation",
+ "$@79", "opt_versioning_interval_start", "opt_vers_auto_part", "opt_as",
+ "opt_create_database_options", "create_database_options",
+ "create_database_option", "opt_if_not_exists_table_element",
+ "opt_if_not_exists", "create_or_replace", "opt_create_table_options",
+ "create_table_options_space_separated", "create_table_options",
+ "create_table_option", "$@80", "engine_defined_option",
+ "opt_versioning_option", "versioning_option", "default_charset",
+ "default_collation", "storage_engines", "known_storage_engines",
+ "row_types", "merge_insert_types", "udf_type", "create_field_list",
+ "create_field_list_parens", "field_list", "field_list_item",
+ "column_def", "key_def", "$@81", "$@82", "$@83", "$@84", "$@85", "$@86",
+ "$@87", "constraint_def", "period_for_system_time",
+ "period_for_application_time", "opt_check_constraint",
+ "check_constraint", "opt_constraint_no_id", "opt_constraint",
+ "constraint", "field_spec", "@88", "field_type_or_serial", "$@89",
+ "$@90", "opt_serial_attribute", "opt_serial_attribute_list",
+ "opt_asrow_attribute", "opt_asrow_attribute_list", "field_def", "$@91",
+ "opt_generated_always", "vcol_opt_specifier", "vcol_opt_attribute",
+ "vcol_opt_attribute_list", "vcol_attribute", "parse_vcol_expr", "$@92",
+ "parenthesized_expr", "virtual_column_func", "expr_or_literal",
+ "column_default_expr", "field_type", "qualified_field_type", "udt_name",
+ "field_type_all", "field_type_numeric", "opt_binary_and_compression",
+ "field_type_string", "field_type_temporal", "field_type_lob",
+ "field_type_misc", "char", "nchar", "varchar", "nvarchar", "int_type",
+ "real_type", "srid_option", "float_options", "precision",
+ "field_options", "last_field_options", "field_length_str",
+ "field_length", "field_scale", "opt_field_length", "opt_field_scale",
+ "opt_precision", "attribute_list", "attribute", "opt_compression_method",
+ "opt_compressed", "opt_enable", "compressed",
+ "compressed_deprecated_data_type_attribute",
+ "compressed_deprecated_column_attribute", "asrow_attribute",
+ "serial_attribute", "with_or_without_system", "charset", "charset_name",
+ "charset_name_or_default", "opt_load_data_charset",
+ "old_or_new_charset_name", "old_or_new_charset_name_or_default",
+ "collation_name", "collation_name_or_default", "opt_default",
+ "charset_or_alias", "opt_binary", "binary", "opt_bin_mod", "ws_nweights",
+ "$@93", "ws_level_flag_desc", "ws_level_flag_reverse", "ws_level_flags",
+ "ws_level_number", "ws_level_list_item", "ws_level_list",
+ "ws_level_range", "ws_level_list_or_range", "opt_ws_levels",
+ "opt_primary", "references", "opt_ref_list", "ref_list",
+ "opt_match_clause", "opt_on_update_delete", "delete_option",
+ "constraint_key_type", "key_or_index", "opt_key_or_index",
+ "keys_or_index", "fulltext", "spatial", "normal_key_options",
+ "fulltext_key_options", "spatial_key_options", "normal_key_opts",
+ "spatial_key_opts", "fulltext_key_opts", "opt_USING_key_algorithm",
+ "opt_key_algorithm_clause", "key_using_alg", "all_key_opt",
+ "normal_key_opt", "spatial_key_opt", "fulltext_key_opt",
+ "btree_or_rtree", "ignorability", "key_list", "opt_without_overlaps",
+ "key_part", "opt_ident", "string_list", "alter", "$@94", "$@95", "$@96",
+ "$@97", "$@98", "$@99", "$@100", "$@101", "$@102", "$@103", "$@104",
+ "$@105", "$@106", "account_locking_option", "opt_password_expire_option",
+ "opt_account_locking_and_opt_password_expiration",
+ "ev_alter_on_schedule_completion", "opt_ev_rename_to", "opt_ev_sql_stmt",
+ "ident_or_empty", "alter_commands", "$@107", "$@108", "$@109", "$@110",
+ "remove_partitioning", "all_or_alt_part_name_list", "add_partition_rule",
+ "$@111", "add_part_extra", "reorg_partition_rule", "$@112",
+ "reorg_parts_rule", "$@113", "alt_part_name_list", "alt_part_name_item",
+ "alter_list", "add_column", "alter_list_item",
+ "opt_index_lock_algorithm", "alter_algorithm_option",
+ "alter_lock_option", "opt_column", "opt_ignore", "alter_options",
+ "$@114", "alter_options_part2", "alter_option_list", "alter_option",
+ "opt_restrict", "opt_place", "opt_to", "slave", "$@115", "$@116",
+ "start", "opt_start_transaction_option_list",
+ "start_transaction_option_list", "start_transaction_option",
+ "slave_thread_opts", "$@117", "slave_thread_opt_list",
+ "slave_thread_opt", "slave_until", "slave_until_opts", "checksum",
+ "$@118", "opt_checksum_type", "repair_table_or_view", "$@119", "repair",
+ "$@120", "opt_mi_repair_type", "mi_repair_types", "mi_repair_type",
+ "opt_view_repair_type", "analyze", "$@121", "analyze_table_list",
+ "analyze_table_elem_spec", "opt_persistent_stat_clause",
+ "persistent_stat_spec", "persistent_column_stat_spec", "$@122",
+ "persistent_index_stat_spec", "$@123", "table_column_list",
+ "table_index_list", "table_index_name", "binlog_base64_event",
+ "check_view_or_table", "$@124", "check", "$@125", "opt_mi_check_type",
+ "mi_check_types", "mi_check_type", "opt_view_check_type", "optimize",
+ "$@126", "opt_no_write_to_binlog", "rename", "$@127", "rename_list",
+ "table_to_table_list", "table_to_table", "keycache", "$@128",
+ "keycache_list_or_parts", "keycache_list", "assign_to_keycache",
+ "assign_to_keycache_parts", "key_cache_name", "preload", "$@129",
+ "preload_list_or_parts", "preload_list", "preload_keys",
+ "preload_keys_parts", "adm_partition", "$@130", "cache_keys_spec",
+ "$@131", "cache_key_list_or_empty", "opt_ignore_leaves", "select",
+ "$@132", "$@133", "select_into", "$@134", "$@135", "simple_table",
+ "table_value_constructor", "$@136", "query_specification_start", "$@137",
+ "$@138", "query_specification", "select_into_query_specification",
+ "query_expression", "query_expression_no_with_clause",
+ "query_expression_body_ext", "$@139", "$@140",
+ "query_expression_body_ext_parens", "query_expression_body", "$@141",
+ "query_primary", "query_simple", "subselect", "subquery",
+ "opt_from_clause", "from_clause", "table_reference_list",
+ "select_options", "opt_history_unit", "history_point",
+ "for_portion_of_time_clause", "opt_for_portion_of_time_clause",
+ "opt_for_system_time_clause", "system_time_expr", "select_option_list",
+ "select_option", "select_lock_type", "opt_select_lock_type",
+ "opt_lock_wait_timeout_new", "select_item_list", "select_item",
+ "remember_tok_start", "remember_name", "remember_end", "select_alias",
+ "opt_default_time_precision", "opt_time_precision", "optional_braces",
+ "expr", "boolean_test", "predicate", "bit_expr", "or", "and", "not",
+ "not2", "comp_op", "all_or_any", "opt_dyncol_type", "dyncol_type",
+ "numeric_dyncol_type", "temporal_dyncol_type", "string_dyncol_type",
+ "dyncall_create_element", "dyncall_create_list", "plsql_cursor_attr",
+ "explicit_cursor_attr", "trim_operands", "trim_operands_regular",
+ "trim_operands_special", "column_default_non_parenthesized_expr",
+ "primary_expr", "string_factor_expr", "simple_expr",
+ "mysql_concatenation_expr", "function_call_keyword_timestamp",
+ "function_call_keyword", "substring_operands",
+ "substring_operands_regular", "substring_operands_special",
+ "function_call_nonkeyword", "function_call_conflict",
+ "function_call_generic", "@142", "fulltext_options",
+ "opt_natural_language_mode", "opt_query_expansion", "opt_udf_expr_list",
+ "udf_expr_list", "udf_expr", "sum_expr", "$@143", "$@144", "$@145",
+ "$@146", "$@147", "window_func_expr", "window_func",
+ "simple_window_func", "inverse_distribution_function",
+ "percentile_function", "$@148", "inverse_distribution_function_def",
+ "order_by_single_element_list", "window_name", "variable", "$@149",
+ "variable_aux", "opt_distinct", "opt_gconcat_separator",
+ "opt_gorder_clause", "gorder_list", "opt_glimit_clause", "glimit_clause",
+ "glimit_options", "in_sum_expr", "$@150", "cast_type",
+ "cast_type_numeric", "cast_type_temporal", "opt_expr_list", "expr_list",
+ "ident_list_arg", "ident_list", "when_list", "when_list_opt_else",
+ "table_ref", "json_text_literal", "json_text_literal_or_num",
+ "join_table_list", "json_table_columns_clause",
+ "json_table_columns_list", "json_table_column", "$@151", "$@152",
+ "json_table_column_type", "json_table_field_type",
+ "json_opt_on_empty_or_error", "json_on_response",
+ "json_on_error_response", "json_on_empty_response", "table_function",
+ "$@153", "$@154", "esc_table_ref", "derived_table_list", "join_table",
+ "$@155", "$@156", "$@157", "$@158", "$@159", "$@160", "inner_join",
+ "normal_join", "opt_use_partition", "use_partition", "table_factor",
+ "table_primary_ident_opt_parens", "table_primary_derived_opt_parens",
+ "table_reference_list_parens", "nested_table_reference_list",
+ "join_table_parens", "table_primary_ident", "table_primary_derived",
+ "opt_outer", "index_hint_clause", "index_hint_type",
+ "index_hint_definition", "$@161", "$@162", "index_hints_list",
+ "opt_index_hints_list", "$@163", "opt_key_definition", "$@164",
+ "opt_key_usage_list", "key_usage_element", "key_usage_list",
+ "using_list", "interval", "interval_time_stamp", "date_time_type",
+ "table_alias", "opt_table_alias_clause", "table_alias_clause", "opt_all",
+ "opt_where_clause", "$@165", "opt_having_clause", "$@166",
+ "opt_group_clause", "group_list", "olap_opt", "opt_window_clause",
+ "window_def_list", "window_def", "window_spec", "$@167",
+ "opt_window_ref", "opt_window_partition_clause",
+ "opt_window_order_clause", "opt_window_frame_clause",
+ "window_frame_units", "window_frame_extent", "window_frame_start",
+ "window_frame_bound", "opt_window_frame_exclusion", "alter_order_clause",
+ "alter_order_list", "alter_order_item", "opt_order_clause",
+ "order_clause", "$@168", "order_list", "order_dir", "opt_limit_clause",
+ "limit_clause", "fetch_first_clause", "first_or_next", "row_or_rows",
+ "only_or_with_ties", "opt_global_limit_clause", "limit_options",
+ "limit_option", "limit_rows_option", "delete_limit_clause",
+ "order_limit_lock", "opt_order_limit_lock", "query_expression_tail",
+ "opt_query_expression_tail", "opt_procedure_or_into", "order_or_limit",
+ "opt_plus", "int_num", "ulong_num", "real_ulong_num", "longlong_num",
+ "ulonglong_num", "real_ulonglong_num", "dec_num_error", "dec_num",
+ "choice", "bool", "procedure_clause", "$@169", "procedure_list",
+ "procedure_list2", "procedure_item", "select_var_list_init", "$@170",
+ "select_var_list", "select_var_ident", "select_outvar", "into",
+ "into_destination", "$@171", "$@172", "do", "$@173", "drop", "$@174",
+ "$@175", "$@176", "$@177", "table_list", "table_name",
+ "table_name_with_opt_use_partition", "table_alias_ref_list",
+ "table_alias_ref", "opt_if_exists_table_element", "opt_if_exists",
+ "opt_temporary", "insert", "$@178", "$@179", "replace", "$@180", "$@181",
+ "insert_start", "stmt_end", "insert_lock_option", "replace_lock_option",
+ "insert_replace_option", "opt_into", "insert_table", "$@182",
+ "insert_field_spec", "$@183", "insert_field_list", "opt_fields",
+ "fields", "insert_values", "values_list", "ident_eq_list",
+ "ident_eq_value", "equal", "opt_equal", "opt_with", "opt_by",
+ "no_braces", "$@184", "no_braces_with_names", "$@185", "opt_values",
+ "opt_values_with_names", "values", "values_with_names", "expr_or_ignore",
+ "expr_or_ignore_or_default", "opt_insert_update", "$@186", "$@187",
+ "update_table_list", "update", "$@188", "$@189", "$@190", "update_list",
+ "update_elem", "insert_update_list", "insert_update_elem",
+ "opt_low_priority", "delete", "$@191", "opt_delete_system_time",
+ "delete_part2", "delete_single_table", "delete_single_table_for_period",
+ "single_multi", "$@192", "$@193", "$@194", "$@195", "opt_returning",
+ "$@196", "table_wild_list", "table_wild_one", "opt_wild",
+ "opt_delete_options", "opt_delete_option", "truncate", "$@197", "$@198",
+ "opt_table_sym", "opt_profile_defs", "profile_defs", "profile_def",
+ "opt_profile_args", "show", "$@199", "show_param", "$@200", "$@201",
+ "show_engine_param", "master_or_binary", "opt_storage", "opt_db",
+ "opt_full", "from_or_in", "binlog_in", "binlog_from", "wild_and_where",
+ "describe", "$@202", "$@203", "explainable_command", "describe_command",
+ "analyze_stmt_command", "opt_extended_describe", "opt_format_json",
+ "opt_describe_column", "explain_for_connection", "flush", "$@204",
+ "flush_options", "$@205", "opt_flush_lock", "flush_lock", "$@206",
+ "flush_options_list", "flush_option", "opt_table_list", "backup",
+ "backup_statements", "$@207", "opt_delete_gtid_domain",
+ "delete_domain_id_list", "delete_domain_id",
+ "optional_flush_tables_arguments", "reset", "$@208", "reset_options",
+ "reset_option", "$@209", "$@210", "slave_reset_options",
+ "master_reset_options", "purge", "$@211", "kill", "$@212", "kill_type",
+ "kill_option", "opt_connection", "kill_expr", "shutdown", "$@213",
+ "shutdown_option", "use", "load", "$@214", "$@215", "$@216", "$@217",
+ "data_or_xml", "opt_local", "load_data_lock", "opt_duplicate",
+ "opt_field_term", "field_term_list", "field_term", "opt_line_term",
+ "line_term_list", "line_term", "opt_xml_rows_identified_by",
+ "opt_ignore_lines", "lines_or_rows", "opt_field_or_var_spec",
+ "fields_or_vars", "field_or_var", "opt_load_data_set_spec",
+ "load_data_set_list", "load_data_set_elem", "text_literal",
+ "text_string", "hex_or_bin_String", "param_marker", "signed_literal",
+ "literal", "NUM_literal", "temporal_literal", "with_clause", "$@218",
+ "opt_recursive", "with_list", "with_list_element", "opt_cycle", "$@219",
+ "opt_with_column_list", "with_column_list", "ident_sys_alloc",
+ "comma_separated_ident_list", "with_element_head", "insert_ident",
+ "table_wild", "select_sublist_qualified_asterisk", "order_ident",
+ "simple_ident", "simple_ident_nospvar", "field_ident", "table_ident",
+ "table_ident_opt_wild", "table_ident_nodb", "IDENT_cli", "ident_cli",
+ "IDENT_sys", "ident_cli_func", "ident_func", "TEXT_STRING_sys",
+ "TEXT_STRING_literal", "TEXT_STRING_filesystem", "ident_table_alias",
+ "ident_cli_set_usual_case", "ident_sysvar_name", "ident", "label_ident",
+ "ident_or_text", "user_maybe_role", "user_or_role", "user",
+ "keyword_table_alias", "keyword_ident", "keyword_sysvar_name",
+ "keyword_set_usual_case", "non_reserved_keyword_udt",
+ "keyword_sp_var_not_label", "keyword_sp_head", "keyword_verb_clause",
+ "keyword_set_special_case", "keyword_sysvar_type", "keyword_data_type",
+ "keyword_cast_type", "keyword_func_sp_var_and_label",
+ "keyword_func_sp_var_not_label", "keyword_sp_var_and_label",
+ "reserved_keyword_udt_not_param_type", "set", "$@220", "set_param",
+ "$@221", "$@222", "$@223", "set_stmt_option_list",
+ "start_option_value_list_following_option_type", "$@224",
+ "option_value_list", "option_value", "$@225", "option_type",
+ "opt_var_type", "opt_var_ident_type", "set_stmt_option", "$@226",
+ "$@227", "$@228", "option_value_following_option_type", "$@229", "$@230",
+ "$@231", "option_value_no_option_type", "$@232", "$@233", "$@234",
+ "$@235", "$@236", "$@237", "$@238", "$@239", "$@240", "$@241",
+ "transaction_characteristics", "transaction_access_mode",
+ "isolation_level", "transaction_access_mode_types", "isolation_types",
+ "text_or_password", "set_expr_or_default", "lock", "$@242",
+ "opt_lock_wait_timeout", "table_or_tables", "table_lock_list",
+ "table_lock", "lock_option", "unlock", "$@243", "handler", "$@244",
+ "handler_tail", "$@245", "handler_read_or_scan", "handler_scan_function",
+ "handler_rkey_function", "$@246", "handler_rkey_mode", "revoke",
+ "revoke_command", "admin_option_for_role", "grant", "grant_command",
+ "opt_with_admin", "opt_with_admin_option", "role_list", "current_role",
+ "role_name", "grant_role", "opt_table", "grant_privileges",
+ "opt_privileges", "object_privilege_list", "column_list_privilege",
+ "column_privilege", "object_privilege", "opt_and", "require_list",
+ "require_list_element", "grant_ident", "user_list", "grant_list",
+ "user_and_role_list", "via_or_with", "using_or_as", "grant_user",
+ "auth_expression", "auth_token", "opt_auth_str", "opt_require_clause",
+ "resource_option", "resource_option_list", "opt_resource_options",
+ "opt_grant_options", "opt_grant_option", "grant_option_list",
+ "grant_option", "begin_stmt_mariadb", "$@247", "compound_statement",
+ "opt_not", "opt_work", "opt_chain", "opt_release", "commit", "rollback",
+ "savepoint", "release", "unit_type_decl", "union_option",
+ "query_expression_option", "definer_opt", "no_definer", "definer",
+ "view_algorithm", "opt_view_suid", "view_suid", "view_list_opt",
+ "view_list", "view_select", "$@248", "view_check_option",
+ "trigger_action_order", "trigger_follows_precedes_clause",
+ "trigger_tail", "$@249", "$@250", "$@251", "$@252", "$@253",
+ "sf_return_type", "$@254", "xa", "opt_format_xid", "xid",
+ "begin_or_start", "opt_join_or_resume", "opt_one_phase", "opt_suspend",
+ "$@255", "opt_migrate", "install", "uninstall", "keep_gcc_happy",
+ "_empty", "statement", "sp_statement", "$@256", "$@257", "$@258",
+ "sp_if_then_statements", "sp_case_then_statements",
+ "reserved_keyword_udt", "keyword_sp_block_section", "keyword_label",
+ "keyword_sp_decl", "opt_truncate_table_storage_clause",
+ "ident_for_loop_index", "row_field_name", "while_body", "$@259",
+ "for_loop_statements", "sp_control_label", "sp_block_label",
+ "remember_end_opt", "sp_opt_default", "sp_opt_inout",
+ "sp_proc_stmts1_implicit_block", "$@260", "remember_lex",
+ "keyword_directly_assignable", "ident_directly_assignable",
+ "ident_cli_directly_assignable", "set_assign", "$@261", "$@262", "$@263",
+ "labels_declaration_oracle", "label_declaration_oracle",
+ "opt_exception_clause", "exception_handlers", "exception_handler",
+ "$@264", "sp_no_param", "opt_sp_parenthesized_fdparam_list",
+ "opt_sp_parenthesized_pdparam_list", "opt_sp_name",
+ "opt_package_routine_end_name", "sp_tail_is", "sp_instr_addr", "sp_body",
+ "$@265", "$@266", "$@267", "create_package_chistic",
+ "create_package_chistics", "opt_create_package_chistics",
+ "opt_create_package_chistics_init", "$@268",
+ "package_implementation_executable_section",
+ "package_implementation_declare_section",
+ "package_implementation_declare_section_list1",
+ "package_implementation_declare_section_list2", "package_routine_lex",
+ "package_specification_function", "$@269",
+ "package_specification_procedure", "$@270",
+ "package_implementation_routine_definition",
+ "package_implementation_function_body", "$@271",
+ "package_implementation_procedure_body", "$@272",
+ "package_implementation_item_declaration",
+ "opt_package_specification_element_list",
+ "package_specification_element_list", "package_specification_element",
+ "sp_decl_variable_list_anchored", "sp_param_name_and_mode", "sp_param",
+ "sp_param_anchored", "sf_c_chistics_and_body_standalone", "$@273",
+ "sp_tail_standalone", "$@274", "$@275", "drop_routine", "create_routine",
+ "$@276", "$@277", "$@278", "$@279", "$@280", "$@281", "$@282",
+ "opt_sp_decl_body_list", "sp_decl_body_list", "$@283",
+ "sp_decl_non_handler_list", "sp_decl_handler_list",
+ "opt_sp_decl_handler_list", "sp_decl_non_handler", "$@284",
+ "sp_proc_stmt", "sp_labelable_stmt", "sp_proc_stmt_compound_ok",
+ "sp_labeled_block", "$@285", "$@286", "$@287", "opt_not_atomic",
+ "sp_unlabeled_block", "$@288", "$@289", "$@290",
+ "sp_block_statements_and_exceptions", "$@291", YY_NULLPTR
+};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
+#endif
+
+#define YYPACT_NINF (-5620)
+
+#define yypact_value_is_default(Yyn) \
+ ((Yyn) == YYPACT_NINF)
+
+#define YYTABLE_NINF (-3833)
+
+#define yytable_value_is_error(Yyn) \
+ 0
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const int yypact[] =
+{
+ 40187, -5620, -5620, 95170, -5620, -5620, 2648, 1295, 95170, -5620,
+ 156, -5620, 1258, -5620, -5620, -5620, -5620, -5620, 4411, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 155, 427, -5620, -5620,
+ 409, -5620, -5620, -5620, -5620, 691, 81091, 1202, 627, -5620,
+ 84796, -5620, -5620, -5620, -5620, 84796, -5620, -5620, 95170, -5620,
+ -5620, 1314, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 640, -5620, 1809, 2579, -5620, -5620, -5620, -5620, -5620, -5620,
+ 1887, -5620, -5620, -5620, -5620, -5620, -5620, 427, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 1366, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 1751, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 95911, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 395, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 1946, -5620, -5620,
+ -5620, -5620, -5620, 208, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 53, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 95170, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 409, -5620, -5620, -5620, 1702, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 1366, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 95170, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 238, -5620,
+ -5620, 268, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 71, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 2631, -5620,
+ -5620, 137, 2400, 2481, -5620, -5620, 1929, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 2997, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 2407,
+ -5620, -5620, -5620, -5620, 3803, 1923, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 48366, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 137, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 214, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 1735, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 96652, 95170, 1771, 1789, 95170, 2491, 81832, 2491,
+ -5620, 118, -5620, -5620, 2266, -5620, 1939, -5620, 427, 2443,
+ 1902, 2398, 2701, 969, 2409, 82573, 1275, 2491, -5620, 2133,
+ 2491, 2491, 2491, 2491, 2491, 2491, -5620, 2491, 2491, 1074,
+ 104062, 69976, -5620, -5620, 952, 2586, -5620, -5620, -5620, -5620,
+ -5620, -5620, 5802, 427, 24152, 2690, -5620, -5620, 2250, 4706,
+ 2041, -5620, 2512, -5620, -5620, 95170, -5620, 2491, 5802, -5620,
+ 2512, 70717, 3531, 52082, 7775, 2512, 427, 2606, -5620, 2037,
+ -5620, -5620, -5620, -5620, -5620, -5620, 95170, -5620, 1366, -5620,
+ -5620, 2489, -5620, -5620, 81832, -5620, -5620, -5620, -5620, -5620,
+ 2785, 24152, 252, 2547, -5620, -5620, 2442, 49107, 81832, 2736,
+ 2701, 2753, -5620, 1899, 530, -5620, 2153, 2245, 2701, 416,
+ 2264, 2701, 2669, 2491, 2491, -5620, -5620, 2759, 2759, 2759,
+ 2509, 2759, -5620, 2759, 2851, 2235, 353, -5620, -5620, 2217,
+ 95170, 2736, -5620, 2736, -5620, 2877, 2736, 2736, 2366, 2884,
+ 2889, 199, 2494, 1766, 1766, 2266, 43920, 398, 2711, -5620,
+ 2851, 1689, 2138, 2054, 2054, 2054, 1689, 137, 1689, -5620,
+ 3033, 1939, 2940, 95170, -5620, 2946, -5620, 2268, -5620, -5620,
+ -5620, 95170, 95170, 279, -5620, 2343, -5620, 2319, 62, 72199,
+ -5620, 2968, -5620, -5620, -5620, -5620, -5620, -5620, 2834, 351,
+ 2466, 2693, 2395, -5620, 2892, 81832, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 95170, 2360, -5620, -5620, 24152, 3038,
+ 2398, -5620, 2886, -5620, -5620, -5620, -5620, 49107, -5620, -5620,
+ -5620,104062, -5620, -5620, -5620, 1476, 67012, -5620, 2386, 2706,
+ -5620, 2399, 1506, 1544, -5620, -5620, 1582, 1640, 1659, -5620,
+ -5620, -5620, 1761, -5620, -5620, -5620,103321, 1649, 2391, -5620,
+ -5620, 3056, -5620, -5620, 85537, 358, 95170, 3054, 2491, 95170,
+ 95170, 95170, 95170, 95170, -5620, 81832, -5620, -5620, 2491, 2491,
+ -5620, -5620, 3055, -5620, 2611, 2565, 2084, 2444, 2777, -5620,
+ 2645, -5620, 2478, 2556, 2687, 2492, 2506, 2535, 224, -5620,
+ 2519, -5620, 1226, 2941, 332, 376, 2959, 378, 412, 3098,
+ 2969, 425, 174, 446, 2757, 482, -5620, -5620, -5620, -5620,
+ 2992, 3104, 2529, -5620, 2536, -5620, 3042, 2906, 344, -5620,
+ -5620, 198, 2983, 1370, 49107,106095,104803, 83314,106095,106095,
+ 106095, -5620, -5620, 280, 95170,105449, 95170, 7384, -5620, -5620,
+ 41697, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 95170, -5620, -5620, -5620, -5620, -5620, -5620, 1757, 1329, 8291,
+ -5620, 2560, -5620, -5620, -5620, -5620, -5620, 86278, -5620, 223,
+ 254, 3076, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 30304, 2576, 2602, 2603, 19538, 2615, 2619,
+ 2629, 2636, 2640, 2444, 2444, 2444, 2641, 2644, 2667, 2671,
+ 2704, 2712, 2713, -5620, 2721, 2733, 2738, 2739, 2749, 2760,
+ 24921, 2766, 2770, 2775, 37938, 2776, 2780, 2784, 2819, 24152,
+ 2641, 2823, 2827, -5620, 2830, 2855, 2860, 2866, 2882, 2890,
+ 2893, 2900, 3354, 2907, 2908, 2919, 2923, -5620, 2444, 2641,
+ 2641, 2932, 2938, 2444, 2949, 2955, 2960, 2973, 2978, 2989,
+ 2999, 3000, 3006, 3007, 3011, 3012, 308, 3013, 3020, 3025,
+ 3026, 3027, 3028, 3030, 2674, 3031, 3032, 3041, 2742, 3043,
+ 3046, 3049, 3050, 317, 3052, 3053, 318, 3058, 3064, 3065,
+ 3068, 3070, 3077, 3084, 31073, 31842, 30304, 17231, -5620, 95170,
+ 97393, -5620, -5620, 3307, 2189, 3138, 1725, 30304, -5620, -5620,
+ -5620, 3351, -5620, 3389, -5620, -5620, -5620, -5620, 3283, 3294,
+ -5620, 3311, -5620, -5620, 3320, 2813, -5620, 3505, -5620, -5620,
+ -5620, -5620, -5620, 2789, -5620, 3085, 3598, 3620, 3086, 3087,
+ -5620, -5620, 496, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 2980, 2903, -5620, 3505,
+ -5620, -5620, 75163, -5620, 5448, -5620, -5620, 2611, 3234, 3522,
+ -5620, 3689, -5620, 3618, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 3531, -5620, -5620, 53586,
+ 3612, 880, -5620, -5620, 339, -5620, 404, 475, 65530, -5620,
+ 389, 66271, 489, 87019, 1128, -5620, 72940, -5620, 517, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3089,
+ -5620, 3202, 3416, 3100, 2751, 1876, -5620, -5620, 236, 957,
+ 3189, 93, -5620, 1005, -5620, 1876, -5620, 75904, 356, 2279,
+ -5620, 981, -5620, 3764, -5620, -5620, 3204, 3191, 3217, -5620,
+ 3066, -5620, 2701, -5620, 375, -5620, 356, 1876, 2279, -5620,
+ 3392, 3470, 1076, 3416, -5620, -47, -5620, -5620, -5620, 3760,
+ -5620, 3122, -5620, 3728, -5620, 95170, 391, 49107, -5620, -5620,
+ -5620, -5620, 3124, 49107, 49107, 1159, 1160, 3307, 3125, 24152,
+ -5620, -5620, 4138, 55842, 3328, 1578, 7, -5620, -5620, 1809,
+ 95170, -5620, -5620, 1055, -5620, 3558, -5620, 3143, -5620, 98134,
+ 1160, 3796, -5620, -5620, -5620, 852, 3533, -5620, 3146, -5620,
+ -5620, -5620, -5620, 49107, 95170, 2701, -5620, -5620, -5620, -5620,
+ 3147, -5620, -5620, 3356, 3239, -5620, 3176, -5620, -5620, 230,
+ -5620, -5620, 3933, -5620, 95170, -5620, 2736, -5620, -5620, 2736,
+ -5620, -5620, -5620, 2736, 2736, 2237, 2736, -5620, -5620, 3203,
+ -5620, 3485, 3490, 2892, -5620, 3175, 43179, 95170, 3950, -5620,
+ 3969, -5620, -5620, -5620, 3180, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 3749, 3936, 3936, -5620, 54338, -5620, -5620,
+ 3839, 2711, 1052, 3681, 57346, 3827, 3916, 59602, -5620, 356,
+ -5620, -5620, -5620, -5620, 553, 95170, -5620, 553, 553, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 137, -5620, -5620, 2443, 3608, 73681, 95170, 1689, 2138,
+ 18769, 3962, 3964, -5620, -5620, -5620, 2701, 430, 3594, -5620,
+ 95170, -5620, -5620, -5620, 2444, 4004, -5620, -5620, -5620, -5620,
+ -5620, 49107, 3429, 72199, 2491, -5620, -5620, -5620, 351, -5620,
+ 1915, 95170, 49107, 3265, -5620, 49107, 3226, 24152, -5620, -5620,
+ 3703, 3307, -5620, 3588, -5620, -5620, 49107, 1840, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 3237, -5620, -5620, -5620, 3237, 925, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3238,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 3798, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3238, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 218, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 3635, 3093, 1220, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 3635, -5620, 1220, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3238, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 3248, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 3635, -5620, 1220, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 3237, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 3237, -5620, -5620, 1220, 3237, -5620, 3249, 3238, 3635,
+ 1359, 1900, 3238, -5620, -5620, 3237, 3251, 3237, 3237, 3237,
+ 3237, -5620, 3237, 4019, 3252, -5620, 3238, -5620, -5620, -5620,
+ -5620, -5620, -5620, 130, 3237, 3237, 3237, 3237, 3256, 222,
+ -5620, 229, 249, 250, 253, 264, 265, -5620, -5620, -5620,
+ -5620, 3909, 95170, 3911, -5620, 3692, 1649, 3255, 3259, -5620,
+ 49107, 3988, 49107, 3921, 2711, -5620, 3269, -5620, 3268, -5620,
+ -5620, 3938, 95170, 95170, -5620, -5620, -5620, -5620, 3273, 76645,
+ -5620, 75163, 49107, -5620, -5620, 3888, 3430, -5620, -5620, -5620,
+ -5620, -5620, -5620, 3371, -5620, -5620, 3296, -5620, -5620, -5620,
+ -5620, 3744, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 75163, -5620, -5620, 3746, 3747, -5620, 72199, 2129, 8165, 97393,
+ -5620, 3940, -5620, -5620, -5620, 3760, -5620, -5620, 25690, -5620,
+ 26459, -5620, -5620, -5620, 3577, 1363, 823, -5620, -5620, -5620,
+ -5620, -5620, -5620, 4040, -5620, -5620, -5620, -5620, -5620, -5620,
+ 3774, 95170, 3526, 3961, 3942, -5620, -5620, -5620, -5620, -5620,
+ 3779, 3315, 3920, 3313, -5620, -5620, 275, -5620, 3321, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 49107,
+ 55090, -5620, -5620, -5620, 3323, -5620, -5620, -5620, 3326, 30304,
+ 30304, -5620, 4064, 4064, 4064, 24152, 3016, 473, 3686, 24152,
+ 24152, 24152, 2309, 3335, -5620, -5620, -5620, 396, -5620, 24152,
+ 24152, 38685, 3338, 520, 5444, 24152, 4002, 4002, -5620, 24152,
+ 24152, 17231, 4773, 24152, 24152, 24152, 97393, 38685, 3778, 3337,
+ -5620, 3333, 2373, 24152, 2378, 24152, -5620, -5620, 24152, 24152,
+ 24152, 24152, 3341, 32611, 3343, 24152, 24152, 3345, 3480, 4064,
+ 4064, 2401, 436, -5620, -5620, -5620, 4064, 4064, -5620, 24152,
+ 24152, 18000, 24152, 24152, 2413, 24152, 24152, 24152, 24152, 24152,
+ 24152, -5620, 24152, 24152, 1611, 24152, 24152, 49107, 24152, 24152,
+ 4003, 49107, 24152, 24152, 4005, 24152, 24152, 49107, 24152, -5620,
+ 24152, 3626, 3626, -5620, 24152, 18000, 24152, 3349, 39432, 24152,
+ 24152, 24152, 24921, -5620, 24921, -5620, -5620, 3353, 2883, 545,
+ 137, 24152, 3350, -5620, -5620, -5620, -5620, 24152, 24152, 24152,
+ 32611, -5620, -5620, -5620, 670, -5620, -5620, -5620, 27228, 32611,
+ 3357, 32611, 32611, 3971, 2265, 32611, 32611, 32611, 32611, 32611,
+ 32611, 32611, 33380, 34149, 32611, 32611, 32611, 32611, -5620, 81832,
+ 30304, 51330, 3360, 4006, -5620, 77386, -5620, 1588, 1061, -5620,
+ 2701, 4706, 35687, -5620, 3359, -5620, 3856, 49107, -5620, 3362,
+ 4022, 75163, 72199, 2129, 3380, -5620, 1529, 276, -5620, 76645,
+ 95170, -5620, -5620, -5620, 4078, 24152, -5620, -5620, -5620, -5620,
+ -5620, 3365, 533, 3372, -5620, 1176, -5620, -5620, -5620, -5620,
+ -5620, 95170, -5620, 87760, 52834, 3467, 4029, 3397, 2736, 88501,
+ 95170, 49107, 95170, 98875, 95170, 95170, 49107, 75163, 49107, -5620,
+ -5620, -5620, 1020, 1876, 95170, 1876, 2279, 1036, 1876, 4008,
+ -5620, -5620, 1029, 1029, -5620, -5620, -5620, -5620, -5620, -5620,
+ 1876, 95170, 95170, 1876, 72199, -5620, 2279, 1847, -5620, 3683,
+ 3475, -5620, -5620, -5620, 3726, -5620, -5620, 4052, 3398, -5620,
+ 3750, -5620, 3493, -5620, -5620, 49107, -5620, -5620, 2279, -5620,
+ 2279, 2279, 4055, 1876, 1876, 1876, -5620, 44661, 3404, 3407,
+ -5620, 3405, -5620, 3409, -5620, 4035, -5620, -5620, -5620, 3765,
+ 4190, 4043, 3426, -5620, -5620, 3974, 63, -5620, 3851, -5620,
+ 3976, -5620, 24152, 3307, 20307, 3709, -5620, -5620, 3710, 3711,
+ 3712, -5620, -5620, -5620, -5620, 3857, 3713, -5620, 2701, 3714,
+ -5620, -5620, -5620, 3443, -5620, -5620, -5620, 81832, 35687, -5620,
+ 3444, -5620, 3464, -5620, 271, -5620, -5620, 4108, 3553, 24152,
+ -5620, -5620, 49107, 3945, -5620, 2701, 1899, 95170, -5620, -5620,
+ 4186, -5620, 1828, 4107, -5620, -5620, 3564, 416, -5620, 4107,
+ 1019, -5620, -5620, 2759, 3645, -5620, -5620, -5620, 81832, -5620,
+ -5620, -5620, -5620, -5620, -5620, 95170, -5620, 76645, 72199, 81832,
+ 2736, 2736, -5620, 49107, 2736, 95170, -5620, -5620, -5620, 2736,
+ 2736, 2736, 3507, -5620, 2186, 3482, 3483, 3486, 3487, 2014,
+ 3491, 45402, 2414, 4772, 4112, 4115, -5620, 4065, 3039, 4065,
+ -5620, -5620, 45402, 44661, 3497, 3950, -5620, -5620, -5620, -5620,
+ 81832, 3498, -5620, -5620, 3492, -5620, 24152, 4219, 4149, 3839,
+ -5620, -5620, 58098, 1518, 86278, -5620, -5620, -5620, 3848, 4037,
+ 993, -5620, 3502, 3630, -5620, 190, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 24152, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 30304, 2671, -5620, 3307, -5620, -5620, -5620, -5620,
+ -5620, 276, 260, -5620, -5620, -5620, 466, 3872, 1643, -5620,
+ -5620, 81832, 1643, -5620, 3516, 3817, -5620, 3819, 147, -5620,
+ 49107, -5620, -5620, -5620, -5620, -5620, 49107, 3518, -5620, 3715,
+ 95170, 2360, 3524, 3523, 3307, 4026, -5620, 3703, -5620, -5620,
+ -5620, 5802, 4243, 5776, 164, 3581, -5620, -5620, -5620, -5620,
+ -5620, 49107, -5620, -5620, 1857, 3549, 2897, -5620, -5620, -5620,
+ 3635, 276, 3635, -5620, -5620, 2931, 1086, -5620, -5620, -5620,
+ 1086, -5620, 435, 3612, 78127, 3635, -5620, -5620, -5620, -5620,
+ 4020, 1220, 1750, 78868, 2573, 3941, -5620, -5620, -5620, 1086,
+ 2759, -5620, -5620, 3635, -5620, -5620, -5620, 2759, 1086, -5620,
+ 4023, -5620, -5620, -5620, 1086, 3635,104062, 2023, 1220, -5620,
+ -5620, 1220, 1086, 534, 95170, 2023, 4097, -5620, 1750, 4279,
+ 1220, 3635, 1086, 4307, -5620, 1086, -5620, -5620, 220, -5620,
+ -5620, 1649, -5620, -5620, -5620, 3749, 3637, -5620, 3556, -5620,
+ -5620, 915, 4121, -5620, -5620, 4141, 95170, 4220, 61084, -5620,
+ -5620, 4146, -5620, 95170, 3569, -5620, -5620, 3570, 188, 49107,
+ 49107, 5802, -5620, -5620, 3574, -5620, -5620, -5620, 4068, -5620,
+ -5620, 85, 4293, -5620, -5620, -5620, 46143, 46143, 1226, 2941,
+ -5620, -5620, 2959, -5620, -5620, 2969, -5620, 174, -5620, 2757,
+ -5620, -5620, -5620, -5620, 2067, -5620, -5620, -5620, 4035, 24152,
+ 50589, 3307, -5620, -5620, 49107, -5620, 4211, -5620, -5620,101839,
+ 145, -5620, -5620, 256, 49107, -5620, -5620, -5620, -5620, 4206,
+ 3717, 95170, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 95170,
+ 2360, -5620, 95170,104062, 5802, 5802, -5620, 82573, -5620, 1305,
+ 1529, -5620, 4319, 97393, 24152, -5620, 3583, -5620, 3584, 3587,
+ 3029, 3943, 24152, 24152, -5620, 2810, 83, 452, -5620, 3589,
+ 3603, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3596,
+ -5620, -5620, 555, 560, 3602, -5620, -5620, -5620, 3604, 137,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 4240, -5620, 270, -5620, -5620, -5620, 24152, 567, 1171, 1172,
+ 3614, 406, 457, 1199, 3323, 2090, 3607, 38685, 97393, 4064,
+ 3610, 493, 4064, 3616, 1218, 1297, 602, 1522, 1696, -5620,
+ 1156, -5620, 1317, 1335, -5620, -5620, 3619, 3622, 4064, 3623,
+ -5620, 3624, 3627, 3631, 1430, 462, 3632, -5620, -5620, 21076,
+ 21845, 22614, 3141, 3633, -5620, -5620, 1466, 1838, 4064, 3636,
+ 1974, 1527, 1642, -5620, 2114, 1644, 1701, 3638, 3125, 2113,
+ 2273, -5620, -5620, -5620, -5620, 3640, 2296, 2318, 3643, 3646,
+ 2342, 2348, 49107, 3647, 3648, 2361, 49107, 1707, 2390, 3649,
+ 1708, 463, 3650, 3653, 2408, 3659, 1738, -5620, 97393, 95170,
+ 3661, 3655, 292, 3663, 2418, 4773, 4773, -5620, 24152, 3664,
+ 363, 97393, 2564, 1384, -5620, 3138, -5620, -5620, -5620, -5620,
+ 207, -5620, 3641, 3138, 3651, 3282, 17231, -5620, 1262, 1809,
+ 32611, 32611, 3666, 32611, 32611, 1524, 540, 540, 3678, 3678,
+ 1222, 620, 24921, 1524, 24921, 1524, 3678, 3678, 3678, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 4229, 3674, 3677,
+ 3684, 3687, -70, 3682, -5620, -5620, -5620, -5620, -5620, -5620,
+ 58, 4089, -5620, 3878, 1328, 24152, -5620, 3718, 4439, 4440,
+ 4441, -5620, -5620, -5620, -5620, 75163, 75163, 3693, -5620, 1019,
+ 4047, 4345, 76645, 4349, -5620, 3696, 46143, 46143, -5620, 3697,
+ -5620, 24152, 3695, 3702, 3704, 99616, -5620, 4357, 276, 79609,
+ 3307, 75163, 334, 18769, 95170, 95170, -5620, 87019, 4363, 868,
+ 3989, -5620, 3719, 3721, -5620, 276, 18769, 3720, 1229, 535,
+ -5620, 3722, 3727, -5620, -5620, -5620, -5620, 24152, 3731, 95170,
+ 95170, -5620, -5620, -5620, -5620, 95170, -5620, -5620, -5620, -5620,
+ -5620, -5620, 2701, 24152, 95170, 1876, -5620, -5620, -5620, 1876,
+ 95170, 1876, -5620, 2701, 4369, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 1876, -5620, -5620, -5620, -5620,
+ -5620, 3899, 356, 3066, 4008, 4107, 2279, 49107, 1876, 1876,
+ 24152, -5620, -5620, -5620, -5620, 4257, 3749, 20307, 3736, 3735,
+ -5620, -5620, 5802, 95170, 97393, 4465, -5620, -5620, 7227, -5620,
+ 81832, 89242, 49107, -5620, -5620, -5620, 2474, -5620, -5620, -5620,
+ -5620, -5620, 3307, 2547, 2671, -5620, 3738, 3307, -5620, -5620,
+ 4421, -5620, -5620, -5620, -5620, 2701, -5620, -5620, 4518, -5620,
+ 49107, -5620, -5620, 56594, 56594, 1926, -5620,100357, -5620, 2701,
+ 3307, 49107, 1537, 256, -5620, 4475, -5620, -5620, 3859, -5620,
+ -5620, -5620, 3751, -5620, 4161, -5620, -5620, -5620, -5620, -5620,
+ -5620, 3753, -5620, 4400, -5620, 2147, 200, 95170, 524, 147,
+ -5620, 95170, 95170, 49107, -5620, 95170, -5620, 95170, 2736, -5620,
+ -5620, 2736, 49107, 95170, 95170, 2736, 24152, 45402, -5620, -5620,
+ -5620, -5620, -5620, 45402, -5620, 2756, -5620, 3956, 2017, 2017,
+ -5620, -5620, -5620, -5620, -5620, 4382, 4065, 4065, 45402, 4384,
+ 4184, -5620, 95170, 4387, 490, -5620, 54338, 95170, 3307, 24152,
+ -5620, 3793, 4149, -5620, 211, 244, 190, -5620, 4039, 256,
+ -5620, -5620, 59602, 4105, 59602, 59602, 97393, 3998, 24152, -5620,
+ 4427, 3782, 3307, 18769, 18769, 2147, 2701, -5620, 276, 276,
+ 4001, 4296, 4297, 3906, 2701, 4298, 4299, 4301, -5620, -5620,
+ -5620, -5620, -5620, 3272, 2101, 227, 1204, 72199, 4259, 1019,
+ 4373, 3799, -5620, 49107, 4450, -5620, -5620, -5620, -5620, 24152,
+ -5620, -5620, -5620, 6955, -5620, 3824, 3825, 3826, 3828, 3829,
+ 3831, 3832, 3834, 3835, 3836, 3837, 3840, 3842, 3843, 3844,
+ 3846, 3847, 3849, 3853, 3855, 3860, 3863, 3864, 3865, 3867,
+ 298, -5620, -5620, 3852, -5620, -5620, -5620, -5620, 95170, 4426,
+ 3854, 3861, 3862, 3866, -5620, -5620, 95170, -5620, 2120, 4294,
+ 4324, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 80350, 276, -5620, -5620, 2151, -5620,
+ -5620, 2219, -5620, -5620, -5620, -5620, -5620, 2229, 69235, -5620,
+ 24152, 24152, -5620, -5620, -5620, -5620, -5620, 2023, 2023, 3833,
+ -5620, 3868, -5620, -5620, -5620, -5620, -5620, 4279, -5620, 3869,
+ -5620, 64789, -5620, -5620, -5620, -5620, 3586, -5620, 4187, -5620,
+ 2017, 95170, 4323, 61084, -5620, 4057, 4467, -5620, -5620, 44661,
+ -5620, 3870, 49107, -5620, 76645, 75163, -5620, -5620, -5620, 3873,
+ 1305, 9164, -5620, -5620, 4604, 72199, 4306, -5620, -5620, 3871,
+ -5620, 3874, 4353, 4356, -5620, 97393, -5620, -5620, -5620, 3307,
+ -5620, -5620, 3877, -5620, -5620, 3974, 3936, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 3889, 4150, 4260, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 4506, -5620, -5620, -5620, -5620, 2262, 284, -5620,
+ -5620, -5620,106095,106095,106095, -5620, 4235, -5620,102580, 24152,
+ -5620, 1820, -5620, 24152, -5620, -5620, 24152, -5620, 3307, 3334,
+ 106826, 78868, -5620, 78868,106826, 24152, -5620, 3885, -5620, 4514,
+ 4516, -5620, -5620, -5620, 24152, -5620, 24152, 24152, 1842, 24152,
+ 24152, 24152, 24152, -5620, 24152, -5620, 24152, 24152, -5620, 32611,
+ -5620, 3883, 3891, -5620, -5620, 3892, -5620, 24152, 24152, -5620,
+ -5620, -5620, 24152, 24152, 24152, -5620, -5620, 3893, -5620, -5620,
+ -5620, -5620, 24152, 24152, 24152, -5620, 24152, 3198, 24152, 3381,
+ 24152, 3579, 24152, -5620, 27997, -5620, 3894, -5620, -5620, 24152,
+ 24152, -5620, 24152, 24152, 24152, -5620, -5620, -5620, 24152, -5620,
+ 4463, 24152, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 24152, -5620, 492, 28766, -5620, 24152, 24152, 24152, -5620, -5620,
+ 24152, 3890, 3895, -5620, 95170, 2501, 3183, 256, 3898, -5620,
+ -5620, 3912, 3914, 3125, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 520, 32611, 499, 32611, 1809, 3318, 17231, -5620, 1379,
+ 1809, 4773, 4773, 95170, 4615, 3904, -5620, 24152, 24152, 18000,
+ 24152, 97393, 24152, 3908, 3907, -5620, 3917, 32611, -5620, -5620,
+ 3918, -5620, 2485, 3183, 4007, 4364, -5620, 3307, 35687, 4416,
+ -5620, 49107, 4419, 4466, 4125, -5620, 75163, 72199, 4583, 4584,
+ -5620, 3307, -5620, 3926, -5620, -5620, -5620, 3927, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 552, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 24152, 75163, -5620, -5620, -5620,
+ -5620, 276, -5620, 3939, 3944, -5620, -5620, 276, 276, 18769,
+ -5620, 40942, -5620, -5620, 195, 4223, 4485, -5620, -5620, 95170,
+ 1176, 95170, -5620, 52834, 52834, 89983, 3307, 12, -5620, -5620,
+ -5620, -5620, 3307, -5620, -5620, -5620, -5620, -5620, -5620, 3952,
+ -5620, -5620, -5620, 4689, -5620, -5620, 4369, -5620, 2711, 2279,
+ -5620, -5620, 3307, 39432, 1467, -5620, -5620, -5620, 20307, 9586,
+ -5620, 3946, 3947, 3948, -5620, 49107, 3949, 4401, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3951, -5620,
+ -5620, 20307, 3965, -5620, 4107, -5620, 3873, 1320, 3968, 3954,
+ -5620, -5620, -5620, -5620, -5620, -5620, 287, 291, 2762, 2711,
+ -5620, -5620, 381, -5620, -5620, -5620, -5620, -5620, 897, -5620,
+ -5620, 4107, -5620, 1828, 2701, 3991, 299, 256, 4180, -5620,
+ -5620, 2147, 1446, 1446, 4529, 200, 4404, -5620, 4259, 4607,
+ 4531, 4536, -5620, 3272, -5620, -5620, 364, -5620, -5620, -5620,
+ 95170, -5620, -5620, -25, -5620, 49107, 1922, 3969, 3969, -5620,
+ 2017, 333, -5620, 32611, 4691, -5620, 4453, 45402, 4587, 4589,
+ -5620, 45402, -5620, -5620, 2283, -5620, -5620, 74422, -5620, -5620,
+ -5620, 3307, 226, 2436, 24152, 95170, -5620, 3793, 4030, -5620,
+ -5620, 244, -5620, -5620, -5620, -5620, 59602, -5620, -5620, -5620,
+ 1518, 3967, 2436, 1052, 3970, -5620, -5620, -5620, -5620, 79609,
+ 74422, -5620, 4344, 4346, 1917, -5620, -5620, -5620, -5620, 276,
+ 276, -5620, 479, 276, -5620, -5620, 294, -5620, -5620, 1205,
+ 325, 3272, -5620, 2701, 2701, 2701, 2701, 256, 2701, 2701,
+ 2301, -5620, 326, -5620, -5620, 81832, -5620, 4722, 4724, -5620,
+ 4725, -5620, -5620, 1309, -5620, 3062, 1047, -5620, 1051, -5620,
+ 4517, 95170, 4705, 3799, -5620, 441, 2360, 3307, -5620, 4476,
+ 3984, 3985, 256, 3987, 256, 256, 2701, 2701, 3952, 2701,
+ 256, 2701, 2701, 2701, 2701, 2701, 2701, 2701, 256, 2701,
+ 1545, 3690, 408, 2701, 256, 5776, -5620, -5620, 2312, 2367,
+ -5620, 67753, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 4737, -5620, -5620, -5620, -5620, -5620, 1750, 2759, 1750, -5620,
+ 104062, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 3307, 3307, -5620, -5620, 95170, 4738, -5620, -5620, -5620, -5620,
+ 3673, -5620, -5620, -5620, 4309, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 3986, 44661, 1004, -5620, 58850, 4532,
+ 2711, 4010, -5620, 1019, -5620, -5620, 1656, 4597, -5620, 3996,
+ 24152, -5620, 536, 4197, 4012, 61825, 72199, 72199, -5620, 2831,
+ -5620, 49107, -5620, 4640, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 24152, -5620, -5620, 95170, 2360, 3888, -5620, -5620, -5620,
+ -5620, -5620, 4433,106095, 4000, 3307, 24152, 3307, 3307, 24152,
+ 3237, 3237, 3238, 3256, -5620, 4694, -5620, 4631, 3237, 3237,
+ -5620, 3237, 4636, 3237, 3237, -5620, 4014, -5620, -5620, 4015,
+ 4016, 4017, 3125, -5620, 24152, 24152, 2473, 129, 129, 24152,
+ 1925, 1976, 505, -5620, 2495, 2513, 2533, 1509, 97393, -5620,
+ -5620, 2617, 2632, 2633, 2709, 2754, -5620, 1986, 3425, 1998,
+ 3307, 24152, 3307, 24152, 3307, 24152, 3307, 24921, 2767, -5620,
+ 2355, 3748, -5620, 2377, 3999, 2781, 2812, 2381, -5620, 3017,
+ 4768, 2410, 24921, 2817, 2828, 2033, 2047, 2856, 97393, 95170,
+ 4013, 4025, 4025, 349, -5620, 4027, -5620, -5620, -5620, 4033,
+ -5620, 24152, 24152, 4021, 3138, -5620, 24152, 1809, 32611, 515,
+ 32611, -5620, -5620, 4229, -5620, 24152, -5620, 4593, 4028, 3688,
+ 4031, 4032, 3141, 4038, 4041, 4044, 4048, 3307, -5620, -5620,
+ 95170, 4049, 1725, -5620, 3952, -5620, 4652, -5620, 4752, 4054,
+ 4069, 4058, 3918, -5620, 75163, -5620, 49107, -5620, 4692, 3570,
+ -5620, 72199, 72199, -5620, 84055, -5620, 60343, 95170, 95170, -5620,
+ 3307, -5620, 18769, 334, 4797, 4800, -5620, -5620, -5620, -5620,
+ 127, 4602, -5620, -5620, -5620, -5620, 18769, 276, -5620, 276,
+ 18769, 3727, -5620, -5620, -5620, -5620, 3745, -5620, 356, -5620,
+ -5620, -5620, 1876, 4056, -5620, 276, 1178, -5620, 20307, 4059,
+ 4062, -5620, 4659, -5620, 520, 316, -5620, 3749, -5620, 4530,
+ -5620, -5620, 4066, 90724, -5620, 4070, -5620, -5620, 4611, -5620,
+ -5620, 4053, 56594, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 356, 4114, 4300, -5620, -5620, -5620,
+ -5620, -5620, 3233, -5620, 4162, 4165, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 49107, 4648, 72199, 1047, 4448,
+ 49107, 49107, 7198, 9207, 3272, -5620, 2087, 2701, -5620, -5620,
+ -5620, 364, -5620, 4079, 95170, -5620, 3799, 4080, 472, 4080,
+ -5620, -5620, -5620, -5620, 1725, 2017, 2017, 4188, 4561, 45402,
+ 45402, 4231, 4562, 24152, 4083, -5620, 95170, -5620, 1200, -5620,
+ 4486, -5620, -5620, 24152, -5620, -5620, -5620, -5620, 3307, 4816,
+ 4090, -5620, -5620, -5620, -5620, -5620, -5620, 24152, -5620, 58098,
+ 24152, 4091, 4093, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 492, 492, -5620, -5620, 492, 492, -5620, -5620, -5620, -5620,
+ 492, 492, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 2101, -5620, 4842, 585, -5620, 4668, -5620, -5620,
+ -5620, -5620, 956, 256, 256, 256, 3690, 1977, -5620, 3062,
+ 439, 4431, -5620, 6672, 1809, 1596, 4591, 2223, -5620, 2419,
+ -5620, 4826, -5620, 205, -5620, -5620, -5620, 312, 324, -5620,
+ 371, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 95170,
+ -5620, 4669, -5620, -5620, -5620, -5620, 3251, 266, -5620, -5620,
+ 4102, -5620, -5620, -5620, -5620, -5620, -5620, 64789, -5620, -5620,
+ 61084, 2711, -5620, 95170, 4444, 4633, -5620, -5620, -5620, -5620,
+ -5620, -5620, 520, -5620, 3307, -5620, 4755, -5620, -5620, -5620,
+ -5620, 147, 147, -5620, -5620, -5620, -5620, 316, -5620, -5620,
+ 4640, 4386, -5620, 1483, 3307, -5620, -5620, -5620, -5620, -5620,
+ -5620, 95170, 505, 3307, -5620, 1750, -5620, -5620, 3237, -5620,
+ 1750, -5620, -5620, -5620, -5620, -5620, -5620, 1750, -5620, -5620,
+ -5620, -5620, 4109, 4773, 4773, -5620, 4827, 4637, 4726, 2885,
+ 24152, 24152, -5620, 24152, -5620, -5620, -5620, 1374, 4116, 4586,
+ -5620, -5620, -5620, -5620, -5620, -5620, 24152, 24152, 24152, 3307,
+ 3307, 3307, 4773, -5620, -5620, 3195, -5620, -5620,106826, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 408, 4773, -5620, -5620,
+ 24152, 24152, -5620, -5620, -5620, 95170, 3183, 4117, 4394, -5620,
+ -5620, -5620, 3183, 4258, -5620, -5620, 3183, 256, -5620, -5620,
+ -5620, 2500, 3138, -5620, 24152, 1809, 4696, 4122, 4838, 4127,
+ -5620, -5620, -5620, -5620, -5620, -5620, 24152, 84055, -5620, 4130,
+ 4132, -5620, -5620, -5620, 4569, 24152, 4748, 4701, -5620, 3183,
+ 95170, -5620, -5620, -5620, 72199, 3696, 3696, 91465, -5620, -5620,
+ -5620, -5620, 1891, 276, 276, 18769, -5620, -5620, 4140, 4142,
+ 18769, 18769, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 356, -5620, 39432, 2711, 23383,
+ -5620, -5620, -5620, 20307, -5620, 4143, 39432, 4613, -5620, -5620,
+ -5620, 4532, 228, -5620, -5620, -5620, 4530, -5620, 92206, -5620,
+ 4148, -5620, 4139, -5620, 1895, 4482, 4758, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 4153, -5620, -5620, -5620, 4170, -5620, 4155,
+ -5620, -5620, -5620, 49107, -5620, -5620, 4185, -5620, -5620, 42438,
+ 4774, 4201, 4525, 49107, 276, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 4528, 276, 276, 276, 276, 276,
+ 276, 276, 276, 276, 276, 1624, 95170, 276, 276, -5620,
+ -5620, 4730, -5620, 6555, -5620, -5620, -5620, -5620, -5620, 276,
+ -5620, 2087, -5620, -5620, 1321, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 608, 4746, 4900, 4175, -5620, -5620, 4707, -5620,
+ -5620, -5620, -5620, 4282, 4712, 3799, 2745, -5620, -5620, -5620,
+ 4661, -5620, -5620, -5620, 4662, 3307, 95170, -5620, -5620, -5620,
+ 1324, 1987, 4796, 2436, 4191, 95170, 2436, 244, 190, 3307,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 354, -5620, 81832, -5620, -5620, -5620, -5620,
+ -5620, 4937, 4939, -5620, -5620, -5620, -5620, 4379, 420, 4269,
+ 1909, 4756, 4590, 4759, 2169, 3707, 276, 4760, 4914, -5620,
+ 688, 276, 4763, 4825, 4280, 4828, 4769, -5620, 4284, 4590,
+ 4775, 4398, 4777, 4779, 4780, -5620, -5620, 9207, -5620, -5620,
+ -5620, -5620, 166, 46884, -5620, -5620, -5620, -5620, -5620, 4388,
+ 24152, 24152, 4798, 95170, 4799, -5620, 4617, -5620, 95170, -5620,
+ 520, -5620, -5620, -5620, 4519, -5620, 2515, -5620, -5620, 2574,
+ -5620, -5620, 2582, -5620, -5620, -5620, -5620, -5620, 4747, 95170,
+ -5620, -5620, 3870, -5620, 4877, -5620, 4567, 3380, -5620, -5620,
+ 137, 4423, 4695, 4695, -5620, -5620, -5620, 4807, -5620, -5620,
+ -5620, -5620, 4858, 2360,106095, 4588, -5620, -5620, -5620, -5620,
+ -5620, -5620, 4234, 4236, 24152, 2759, 4726, 59602, 4238, -5620,
+ -5620, 2887, 2209, 2583, 4521, 4473, -5620, 4412, -5620, 2910,
+ 3307, 3307, 771, 3238, -5620, -5620, -5620, -5620, 4869, 3237,
+ -5620, 4956, -5620, 3237, 1750, -5620, -5620, -5620, -5620, -5620,
+ 4249, 2590, 1875, 2943, 2947, -5620, -5620, -5620, 4251, -5620,
+ -5620, 301, -5620, 4250, -5620, 2597, 4968, 1980, 24152, -5620,
+ 4254, -5620, -5620, 95170, -5620, -5620, 4773, 1330, -5620, 2598,
+ -5620, -5620, -5620, 4255, 3696, -5620, -5620, 62566, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, 18769, 18769, 4107, -5620, 4141,
+ 2671, -5620, -5620, -5620, -5620, 4630, 4262, 4256, -5620, -5620,
+ -5620, 4252, 137, 39432, -5620, -5620, 64789, -5620, -5620, 4264,
+ 4263, -5620, -5620, -5620, 90724, -5620, 2622, -5620, -5620, 4987,
+ 20307, 2701, 2601, 4268, -5620, 81832, 4274, 4275, 49848, 1920,
+ 95170, 2625, -5620, -5620, -5620, -5620, -5620, 2125, -5620, 1356,
+ 2736, 2474, 2474, -5620, 4261, 49107, -5620, 276, -5620, 390,
+ 392, 428, 448, -5620, 3952, 256, 256, 2701, 2701, 276,
+ 256, 81832, 1868, 256, 3952, 3952, 458, 2701, 1173, 390,
+ -5620, -5620, -5620, 256, 390, 255, -5620, -5620, 9210, -5620,
+ 9207, 71458,107566, -5620, -5620, -5620, 4629, 1321, -5620, 95170,
+ 4061, -5620, -5620, 1781, 4405, -5620, 4281, 95170, -5620, 2701,
+ -5620, 5007, 5032, -5620, -5620, 4688, 24152, 4290, 24152, 4291,
+ 2658, -5620, 2474, -5620, 2474, -5620, 1324, 5010, 5012, 4955,
+ 5013, 1987, -5620, 2456, -5620, -5620, -5620, -5620, -5620, -5620,
+ 244, -5620, -5620, 4302, -5620, -5620, -5620, -5620, 4634, -5620,
+ 5049, -5620, 4754, 47625, 2736, -5620, 1810, 4342, -5620, -5620,
+ -5620, 4946, 3054, 3054, 409, 3054, 92206, 95170, 49107, 490,
+ 1283, 4930, 2491, 1991, 4351, 4868, 3054, 3054, 92947, 409,
+ 39432, -5620, -5620, -5620, 3054, -5620, 3054, 49107, 93688, 409,
+ -5620, -5620, -5620, 95170, -5620, 3054, 409, -5620, 409, 409,
+ 92206, -5620, 8027, -5620, -5620, 42438, 315, -5620, 3307, 4773,
+ 4704, -5620, -5620, 4428, 2701, 4673, -5620, -5620, 4782, -5620,
+ 95170, 297, -5620, 256, -5620, 256, -5620, 256, -5620, 281,
+ -5620, 32611, -5620, 3697, -5620, -5620, 2179, -5620, -5620, 4675,
+ 4532, 4819, -5620, -5620,106095, -5620, -5620, 4322, 2436, -5620,
+ 4325, -5620, -5620, -5620, -5620, 24152, -5620, 4557, -5620, 4663,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 3952, -5620, -5620, -5620, 4327, -5620, 256, -5620, 24152, -5620,
+ -5620, 4329, 3858, 2436, -5620, -5620, 4425, 4364, 4333, -5620,
+ 4701, 95170, -5620, -5620, 18769, 18769, -5620, -5620, -5620, 4467,
+ -5620, -5620, -5620, 39432, 63307, 4335, 4331, -5620, 276, -5620,
+ 109, -5620, 95170, -5620, -5620, 3952, 4697, -5620, 2663, -5620,
+ -5620, 95170, 4338, 4537, 95170, 95170, -5620, -5620, 4343, 95170,
+ -5620, -5620, -5620, 42438, 4348, 4961, 4963, 2474, -5620, 2736,
+ 4889, 49848, -5620, 2736, 2736, 68494, 95170, 4350, 2701, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 4354, -5620,
+ -5620, -5620, -5620, -5620, 2701, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 5075,
+ -5620, 4730, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 4352, -5620, -5620, -5620, -5620, -5620, -5620,
+ 107566, 1345, -5620, -5620, -5620, -5620, 4358, -5620, 4362, -5620,
+ -5620, 4355, 4347, -5620, -5620, -5620, 5027, 2087, -5620, -5620,
+ -5620, 4933, 1596, -5620, -5620, 4360, -5620, 69235, -5620, -5620,
+ -5620, -5620, 4361, 4359, 3307, 95170, 3307, 95170, -5620, 5022,
+ 5022, -5620, 2759, 2759, 5086, 2759, -5620, 5087, 5088, 2456,
+ -5620, -5620, 5125, 420, 4750, 439, 1809, 409, 1809, 5030,
+ -5620, -5620, 95170, 49848, 92206, 49848, -5620, 4871, -5620, 74422,
+ 49848, 3054, 95170, -5620, 5035, -5620, 4999, 49848, 49848, -5620,
+ -5620, 92206, 4381, -5620, 2436, 2690, 95170, 49848, -5620, -5620,
+ -5620, 3183, 4850, 49848, 92206, -5620, 92206, -5620, 4690, 4878,
+ 3708, -5620, 4391, 4393, 95170, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 1247, -5620, -5620, 2681, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 563, 95170, -5620, 1291, 4592, -5620, 2179,
+ -5620, -5620, -5620, 49107, -5620, 24152, -5620, -5620, 2957, -5620,
+ -5620, 4397, -5620, 4399, 3967, -5620, 4295, 4534, 4439, 4440,
+ 4441, 4577, 4745, -5620, 4585, -5620, 4174, 4569, 4409, 32611,
+ -5620, -5620, 2062, -5620, -5620, -5620, -5620, 97393, -5620, -5620,
+ 4402, -5620, 39432, 20307, -5620, -5620, -5620, 4829, -5620, 2682,
+ 2436, 4418, 95170, 4420, 2688, 2694, 95170, 4424, -5620, 24152,
+ 2736, -5620, -5620, 49848, 49107, -5620, 4903, -51, 49848, 49848,
+ -5620, 4417, 5136, -5620, -5620, 4422, -5620, -5620, 49107, -5620,
+ -5620, 228, 255, 210, 327, -5620, 285, 1345, -5620, -5620,
+ 95170, -5620, 95170, -5620, 95170, -5620, 95170, -5620, -5620, -5620,
+ 4798, 4061, 95170, -5620, 95170, -5620,101098, 6083, 2700, 2717,
+ 2463, -5620, -5620, -5620, -5620, 2759, -5620, 2759, 2759, -5620,
+ 4430, -5620, -5620, -5620, 5092, -5620, 5093, -5620, 2385, 508,
+ -5620, 49848, 1857, 4935, 4931, 5144, -5620, 49848, 4263, 95170,
+ -5620, -5620, 1656, -5620, 39432, -5620, -5620, 4932, 4936, -5620,
+ 4941, 315, -5620, 95170, -5620, -5620, -5620, 4539, -5620, 5802,
+ 4641, 5156, 5157, -5620, 95170, 94429, -5620, -5620, 5215, 32611,
+ -5620, -5620, 5071, -5620, 3749, 2436, -5620, -5620, -5620, 1382,
+ -5620, 5183, 1737, -5620, -5620, 1364, -5620, -5620, -5620, -5620,
+ 95170, 4455, 4540, -5620, -5620, 4527, -5620, -5620, 3716, -5620,
+ 116, 64048, -5620, -5620, -5620, -5620, 1019, 95170, -5620, 5209,
+ 4458, 2101, 1019, 1019, 4459, 95170, 2971, 49848, 4903, 1608,
+ 4464, 1446, -5620, 1446, -5620, -5620, 3149, 69235, -5620, -5620,
+ 3897, 95170, 4462, 5226, -5620, -5620, 4460, -5620, 4468, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 95170, 82573,
+ -5620, 2223, -5620, 2087, -5620, -5620, 5034, 2724, -5620, -5620,
+ -5620, -5620, -5620, 5180, -5620, 5185, 4469, 4474, -5620, -5620,
+ -5620, -5620, 49848, -15, -5620, -5620, 5111, -5620, 5158, 5159,
+ 315, -5620, 49107, 5039, 79609, -5620, -5620, -5620, 409, -5620,
+ 95170, 49848, 49107, -5620, -5620, 4263, 897, 24152, 4831, 5254,
+ -5620, 4680, 4681, -5620, -5620, 2728, -5620, -5620, 4543, 1725,
+ 4971, -5620, -5620, -5620, 4295, -5620, -5620, 4619, 1816, -5620,
+ 2768, -5620, -5620, -5620, 3183, -5620, 4490, -5620, 4852, 276,
+ 276, 4853, 276, 276, 276, 276, 4494, 3716, -5620, -5620,
+ -5620, 4844, -5620, -5620, -5620, 1350, 2436, 4495, 95170, 4497,
+ 2797, 1401, 1269, 95170, 4496, -5620, -5620, -5620, 1446, 95170,
+ 5099, -5620, 4501, -5620, 4502, 4503, -5620, -5620, 5123, 2701,
+ -5620, 4594, -5620, -5620, 3149, -5620, -5620, -5620, 4544, 5127,
+ 5089, -5620, 81832, 34918, -5620, 4992, -5620, 4952, 5193, -5620,
+ 5240, 3740, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 4867, -5620, 4079, 4080, -5620, -5620, 49107, 4617,
+ -5620, 2745, -5620,101098, 8917, -5620, -5620, 90724, 90724, 5136,
+ 3183, 4701, -5620, -5620, -5620, 34918, -5620, -5620, 4701, -5620,
+ -5620, -5620, -5620, -5620, 5141, -5620, 3307, 24152, -5620, -5620,
+ -5620, -5620, -5620, -5620, 94429, -5620, -5620, 490, -5620, -5620,
+ -5620, -5620, -5620, 95170, -5620, 4520, -5620, -5620, 152, 276,
+ 2701, 2701, 276, 3543, 3543, 3183, 81832, 4601, -5620, -5620,
+ 276, 1446, 2701, 276, 1446, -5620, -5620, 1574, 1350, -5620,
+ -5620, -5620, -5620, -5620, -5620, 750, 1019, -5620, 4711, 1574,
+ 1401, -5620, -5620, 1574, 1269, -5620, -5620, 4522, 95170, 4524,
+ 4526, -5620, 2805, -5620, 1680, 5098, 95170, 4533, 95170, 95170,
+ -5620, -5620, -5620, -5620, -5620, -5620, 4880, -5620, 4535, 4541,
+ 3690, 3690, 17231, -5620, -5620, -5620, -5620, -5620, -5620, 5109,
+ -5620, 4571, 1369, 276, -5620, 3200, -5620, -5620, -5620, 95170,
+ -5620, 5062, 4958, 5184, 4891, 5254, -5620, -5620, 5108, -5620,
+ -5620, -5620, -5620, -5620, 2191, 4542, 2839, -5620, -5620, 2848,
+ -5620, -5620, -5620, -5620, 4545, 3307, -5620, 39432, -5620, 4540,
+ -5620, -5620, 2858, -5620, 29535, -5620, -5620, -5620, 2701, -5620,
+ -5620, 2701, -5620, -5620, -5620, -5620, -5620, 2870, -5620, 81832,
+ -5620, -5620, 256, -5620, -5620, 5143, 4983, -5620, 4741, 1350,
+ 2695, -5620, -5620, -5620, -5620, -5620, 4547, 95170, 95170, 4549,
+ -5620, 95170, -5620, -5620, -5620, 1609, -5620, 2871, 95170, 2878,
+ 2917, -5620, -5620, -5620, -5620, 4552, 4550, -5620, 101, -5620,
+ -5620, 3200, 95170, 95170, -5620, 4061, -5620, -5620, -5620, -5620,
+ -5620, 4688, -5620, 5105, 2745, -5620, -5620, -5620, 4701, 4554,
+ -5620, 276, 5083, -5620, -5620, 4520, -5620, 4558, -5620, 1725,
+ -5620, -5620, 81832, -5620, 4601, -5620, -5620, -5620, -5620, -5620,
+ -5620, 1574, -5620, -5620, 2928, 4458, 95170, -5620, 1442, 1442,
+ 1350, 2944, 1401, 1269, -5620, 445, -5620, 3378, 3378, 1517,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 2745,
+ 1312, 2951, 39432, 20307, 4861, 4486, -5620, 29535, 4563, 3823,
+ -5620, -5620, -5620, 4889, 4564, 4458, -5620, -5620, 537, 5014,
+ 5139, 5147, -5620, 1350, -5620, -5620, -5620, 4573, -5620, 3378,
+ -5620, -5620, -5620, -5620, -5620, 1763, 4061, 4920, 5242, -5620,
+ 3960, -5620, -5620, -5620, 5152, 1312, 1312, -5620, -5620, -5620,
+ 5292, 4796, -5620, -5620, -5620, 3823, -5620, -5620, 1350, 4578,
+ -5620, -5620, -5620, 5063, 5261, -5620, -5620, -5620, -5620, 1763,
+ -5620, -5620, 4715, -5620, -5620, -5620, -5620, -5620, -5620, 1281,
+ 5162, -5620, 5163, -5620, 2759, 5224, -5620, -5620, 1350, 1442,
+ 1442, -5620, -5620, -5620, -5620, 5253, 4938, -5620, 5341, 4595,
+ -5620, -5620, -5620, 1726, 1982, 36439, 5114, -5620, -5620, 81832,
+ -5620, -5620, -5620, -5620, 81832, -5620, 2965, -5620, -5620, 39432,
+ -5620, -5620, 5802, -5620, -5620, 37191, 4596, -5620, 276, -5620,
+ 5254, -5620, 39432, -5620, -5620, -5620, 20307, -5620, -5620
+};
+
+/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
+ Performed when YYTABLE does not specify something else to do. Zero
+ means the default is an error. */
+static const yytype_int16 yydefact[] =
+{
+ 0, 3619, 2, 0, 2503, 2504, 1016, 2296, 0, 430,
+ 0, 1243, 612, 2746, 3829, 2141, 2290, 2289, 2062, 2761,
+ 470, 220, 2809, 376, 2064, 2363, 0, 0, 466, 2862,
+ 1259, 2879, 754, 496, 2886, 0, 320, 0, 0, 473,
+ 318, 220, 1308, 3262, 2190, 0, 3368, 2128, 0, 1306,
+ 468, 2461, 2714, 2759, 2760, 2789, 2622, 2880, 2903, 2931,
+ 2067, 2699, 2698, 2700, 3002, 2701, 2702, 2703, 2704, 2705,
+ 3003, 2597, 2706, 2707, 2708, 2710, 2709, 2711, 2712, 3004,
+ 2598, 3524, 3620, 2599, 2671, 2713, 2673, 2672, 2715, 2600,
+ 2601, 2716, 2717, 2718, 2720, 2719, 2603, 2602, 2721, 2723,
+ 2722, 2674, 2675, 2724, 3005, 2725, 2727, 2604, 3000, 2605,
+ 2606, 2607, 2726, 2608, 2728, 3529, 2729, 2730, 2609, 2731,
+ 2732, 2733, 2734, 2736, 2735, 2737, 2738, 2740, 2741, 2742,
+ 2739, 2743, 2744, 2747, 2745, 2677, 2676, 3006, 2610, 2748,
+ 2749, 2750, 2751, 2753, 2754, 2752, 2755, 2034, 2756, 2757,
+ 2758, 2766, 2767, 2769, 2768, 2678, 2770, 2771, 2772, 2774,
+ 2773, 2775, 2777, 2611, 2612, 2613, 2776, 2778, 2762, 2763,
+ 2764, 2765, 2780, 2779, 2781, 2782, 2783, 2679, 1259, 2615,
+ 2999, 2784, 2785, 3677, 2786, 2787, 3007, 2616, 2668, 2788,
+ 3370, 2791, 2790, 85, 2792, 2618, 2793, 3008, 3009, 2794,
+ 2795, 2797, 2799, 2796, 2800, 2801, 2807, 2619, 2798, 2802,
+ 2803, 2804, 2805, 2806, 2808, 2680, 2810, 2811, 3010, 3011,
+ 2812, 2813, 2814, 2815, 2669, 2816, 2817, 2818, 2819, 2832,
+ 2833, 2823, 2824, 2826, 2827, 2830, 2825, 2831, 2836, 2835,
+ 2837, 2838, 2839, 2840, 2841, 2834, 2821, 2828, 2829, 2822,
+ 2842, 2843, 2820, 2844, 2846, 2845, 2847, 2681, 2848, 2849,
+ 2850, 2851, 2852, 3012, 2853, 2854, 2856, 2855, 2857, 3013,
+ 2858, 2859, 2860, 2665, 2861, 2682, 2683, 2863, 2864, 3014,
+ 2865, 2866, 2871, 2872, 2873, 2868, 2867, 2869, 2870, 2684,
+ 2685, 2686, 2874, 2875, 2876, 2878, 2877, 2621, 2620, 3015,
+ 2623, 2881, 2882, 2624, 2883, 2885, 2884, 2667, 2625, 2887,
+ 2888, 2890, 2889, 2626, 2627, 2628, 2891, 2892, 2893, 2894,
+ 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2687, 2688,
+ 2904, 2905, 2906, 2908, 2907, 2909, 2910, 2914, 2911, 2912,
+ 2913, 2915, 2629, 2916, 1259, 2917, 2918, 2919, 2630, 2921,
+ 2920, 2631, 2922, 2923, 2924, 2925, 2926, 2666, 3529, 2927,
+ 2928, 2930, 2689, 2929, 2932, 2933, 0, 2934, 2935, 3016,
+ 2632, 2936, 2937, 2690, 2670, 2633, 3017, 2939, 2375, 2697,
+ 2938, 2940, 2635, 2636, 2941, 2942, 2943, 2634, 2944, 2637,
+ 3018, 2945, 2947, 2946, 2948, 2949, 2950, 2951, 2638, 2952,
+ 2953, 2639, 2954, 2640, 2955, 2956, 3019, 2957, 2959, 2958,
+ 2960, 2961, 2962, 2963, 2964, 2965, 2967, 2969, 2968, 2966,
+ 2970, 2971, 2691, 2972, 2641, 2692, 3021, 3022, 2693, 2973,
+ 2974, 2975, 2976, 3020, 2170, 2977, 2978, 2644, 2979, 2980,
+ 2982, 2981, 2642, 2643, 2983, 2984, 2648, 3023, 2985, 3024,
+ 2694, 2695, 2986, 2987, 2997, 2988, 2990, 2989, 2992, 2991,
+ 2998, 3025, 3678, 2645, 2993, 2994, 2646, 2995, 2647, 2996,
+ 2696, 0, 0, 3, 3621, 22, 0, 45, 27, 33,
+ 17, 21, 16, 47, 60, 53, 30, 3816, 3817, 3819,
+ 43, 3560, 42, 11, 63, 64, 19, 50, 12, 15,
+ 18, 41, 49, 37, 44, 57, 58, 1329, 1305, 1333,
+ 1304, 1300, 1296, 1315, 1316, 1317, 1323, 25, 26, 34,
+ 51, 68, 23, 65, 61, 24, 2296, 13, 28, 29,
+ 14, 52, 46, 38, 62, 69, 39, 0, 3681, 3675,
+ 3673, 3676, 3671, 3672, 3001, 2596, 3674, 59, 40, 67,
+ 32, 54, 31, 9, 10, 20, 55, 56, 48, 70,
+ 35, 66, 36, 8, 3682, 0, 3622, 2050, 168, 3526,
+ 3818, 2561, 2560, 2598, 3633, 2599, 2601, 2652, 2602, 2655,
+ 2656, 2649, 2610, 2657, 3634, 2613, 2614, 2653, 2558, 2616,
+ 2658, 2617, 2619, 2650, 2651, 2659, 2654, 2628, 2660, 2630,
+ 2661, 2662, 2663, 2638, 2639, 2664, 2643, 2559, 2647, 2508,
+ 2524, 0, 2525, 2555, 2553, 2557, 2551, 2556, 2549, 2550,
+ 2554, 2552, 1060, 0, 0, 0, 0, 2060, 0, 2060,
+ 1151, 1374, 3558, 3559, 3560, 1260, 0, 1261, 0, 0,
+ 244, 400, 131, 0, 0, 3620, 2165, 2060, 2038, 2060,
+ 2060, 2060, 2060, 2060, 2060, 2060, 2063, 2060, 2060, 0,
+ 0, 0, 400, 2070, 2365, 0, 2385, 2386, 2380, 3358,
+ 3359, 3353, 378, 0, 0, 0, 2263, 2262, 0, 0,
+ 305, 317, 320, 313, 316, 0, 220, 2060, 378, 319,
+ 320, 0, 1338, 0, 2268, 320, 0, 2139, 2379, 0,
+ 400, 2462, 2459, 2070, 2336, 2338, 0, 2334, 3529, 1446,
+ 1445, 0, 3825, 3827, 0, 2514, 1238, 1270, 1195, 3530,
+ 3531, 0, 77, 80, 2302, 343, 0, 0, 0, 610,
+ 0, 0, 1203, 0, 3531, 3541, 2377, 0, 131, 1176,
+ 0, 131, 2173, 2060, 2060, 3602, 3603, 0, 0, 0,
+ 3597, 0, 3604, 0, 1333, 0, 1319, 1, 5, 0,
+ 0, 610, 970, 610, 971, 0, 610, 610, 0, 0,
+ 0, 0, 3565, 3558, 3559, 3560, 0, 2020, 1875, 1334,
+ 1333, 1967, 1971, 3546, 3546, 3546, 0, 0, 1967, 1324,
+ 2764, 2999, 2885, 0, 2281, 2295, 2279, 2497, 1302, 1298,
+ 3683, 0, 0, 2608, 1019, 1061, 1024, 228, 0, 0,
+ 1026, 0, 1037, 2530, 2529, 2528, 1034, 220, 0, 1153,
+ 0, 0, 0, 3566, 3565, 0, 1215, 2283, 2284, 2285,
+ 2286, 2287, 2288, 2291, 0, 250, 400, 432, 0, 443,
+ 434, 437, 0, 132, 133, 1241, 1244, 0, 613, 296,
+ 298, 0, 3650, 295, 297, 3649, 0, 3794, 0, 0,
+ 374, 283, 372, 3646, 3643, 3648, 3644, 3647, 3645, 3783,
+ 373, 3680, 0, 287, 3830, 3784, 3785, 3787, 0, 2169,
+ 2168, 0, 2167, 2142, 0, 2165, 0, 2058, 2060, 0,
+ 0, 0, 0, 0, 220, 0, 220, 2043, 2060, 2060,
+ 471, 3679, 0, 3654, 3418, 3436, 3437, 1387, 3433, 3438,
+ 0, 3435, 3430, 0, 0, 3432, 3429, 0, 0, 3457,
+ 3431, 3434, 2599, 2732, 2773, 2613, 2781, 2782, 2895, 2899,
+ 2904, 2915, 2919, 2663, 2635, 2960, 3411, 3399, 3413, 3412,
+ 0, 0, 3416, 3421, 0, 3420, 0, 0, 2072, 2366,
+ 2367, 2371, 0, 2389, 0, 0, 391, 0, 0, 0,
+ 0, 3815, 380, 381, 0, 385, 0, 378, 3813, 3805,
+ 0, 400, 3812, 3807, 3806, 3808, 3809, 3810, 3811, 411,
+ 0, 412, 413, 3814, 467, 3801, 3802, 0, 0, 378,
+ 3689, 0, 3803, 3799, 3800, 1257, 1679, 0, 2436, 2505,
+ 2506, 0, 2449, 2454, 2455, 2447, 2448, 2452, 2428, 2451,
+ 2427, 2453, 1448, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1387, 1387, 1387, 1384, 0, 0, 0,
+ 0, 0, 0, 2445, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1384, 0, 0, 2444, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1577, 2446, 1387, 1384,
+ 1384, 0, 0, 1387, 0, 0, 0, 3002, 2597, 3004,
+ 2652, 2604, 2605, 2606, 2607, 2649, 2676, 3006, 3007, 3008,
+ 3010, 3011, 3012, 3013, 2864, 3014, 3015, 2667, 2893, 2689,
+ 3016, 3017, 3019, 2692, 3021, 3022, 2693, 3020, 2664, 3023,
+ 3024, 3025, 2645, 2696, 0, 0, 0, 0, 1447, 0,
+ 0, 1331, 1523, 755, 1393, 1405, 1421, 0, 1521, 1520,
+ 1524, 1526, 1532, 1440, 1553, 1492, 1493, 1495, 1494, 1499,
+ 1500, 0, 1655, 1501, 0, 0, 1498, 2441, 1497, 1496,
+ 2442, 2443, 1491, 2483, 2513, 0, 0, 2507, 3001, 2596,
+ 498, 497, 0, 339, 332, 327, 335, 329, 331, 330,
+ 336, 337, 338, 333, 328, 334, 321, 0, 306, 0,
+ 314, 3542, 0, 1262, 378, 474, 340, 3418, 2700, 2899,
+ 3391, 0, 3398, 0, 3557, 3551, 3554, 3553, 3549, 3552,
+ 3550, 3555, 1359, 3556, 1358, 1309, 1339, 1356, 1357, 0,
+ 0, 0, 2586, 2585, 890, 2583, 3283, 3284, 0, 2587,
+ 0, 0, 3285, 2952, 2973, 2584, 0, 2519, 0, 2520,
+ 2580, 2578, 2582, 2581, 2575, 2576, 2579, 3263, 3268, 3264,
+ 2577, 0, 2296, 0, 0, 2276, 968, 967, 0, 0,
+ 0, 0, 2212, 0, 890, 2276, 2213, 0, 1932, 2266,
+ 2269, 0, 3287, 2226, 969, 3288, 2262, 0, 2198, 2214,
+ 2175, 2219, 131, 3289, 131, 2265, 1932, 2276, 0, 2191,
+ 0, 0, 0, 2296, 1373, 0, 315, 3369, 2140, 1149,
+ 2108, 1307, 2094, 0, 469, 0, 2075, 0, 2335, 3525,
+ 3826, 3709, 0, 0, 0, 0, 3534, 1721, 2035, 0,
+ 81, 76, 0, 0, 0, 0, 2502, 3371, 86, 0,
+ 0, 3616, 74, 0, 2353, 0, 2351, 2348, 2350, 0,
+ 3534, 0, 2376, 1183, 1183, 0, 0, 1175, 1177, 1178,
+ 1183, 1183, 2174, 0, 0, 0, 2435, 2433, 2434, 2515,
+ 3599, 2432, 2431, 3608, 3610, 3593, 0, 3596, 3595, 3605,
+ 1322, 1321, 6, 71, 0, 142, 610, 220, 220, 610,
+ 167, 148, 151, 610, 610, 610, 610, 160, 162, 0,
+ 222, 0, 0, 3565, 1337, 2809, 0, 0, 1349, 1335,
+ 1769, 1336, 1801, 1771, 1741, 1732, 1731, 1797, 1798, 1800,
+ 1799, 1802, 1804, 1794, 0, 0, 2033, 0, 2028, 1876,
+ 1881, 1875, 0, 0, 0, 0, 0, 0, 1966, 1932,
+ 1975, 1937, 1968, 1301, 1964, 0, 1297, 1362, 1362, 3548,
+ 3547, 3545, 3544, 3543, 1969, 1320, 1328, 1326, 1327, 1970,
+ 1318, 0, 2293, 2499, 0, 0, 2298, 0, 1967, 1971,
+ 0, 0, 0, 2099, 2098, 2101, 0, 904, 0, 229,
+ 0, 3563, 3564, 3562, 1387, 2531, 2534, 3561, 2535, 229,
+ 2061, 0, 0, 0, 2060, 1157, 1158, 1152, 1154, 1156,
+ 0, 0, 0, 0, 2297, 0, 246, 252, 245, 441,
+ 0, 401, 3668, 0, 438, 87, 0, 1245, 2051, 2053,
+ 3797, 3026, 3027, 3028, 3029, 3030, 3031, 3033, 3034, 3032,
+ 3035, 3036, 834, 857, 3037, 3038, 3039, 857, 874, 3040,
+ 3041, 3042, 3043, 3044, 3045, 3046, 3047, 820, 3048, 3049,
+ 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3060,
+ 3059, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 840,
+ 3069, 3070, 3071, 3072, 3073, 3074, 3076, 3075, 3077, 3078,
+ 3079, 3080, 836, 3081, 3082, 3083, 3085, 3084, 3086, 3087,
+ 3088, 3089, 3090, 3091, 3092, 3093, 3094, 840, 3095, 3096,
+ 3097, 3098, 3099, 3101, 3100, 3104, 3105, 3106, 3107, 3108,
+ 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118,
+ 3119, 830, 3120, 3121, 3122, 3123, 3124, 3125, 3102, 3126,
+ 3103, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135,
+ 874, 786, 786, 3136, 3137, 3138, 3139, 3140, 3141, 3142,
+ 874, 833, 786, 3145, 3146, 3143, 3144, 3147, 3148, 3149,
+ 3150, 3151, 3153, 3152, 3156, 3154, 3155, 840, 3157, 3158,
+ 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168,
+ 3169, 3171, 3172, 3170, 3173, 3174, 3175, 3176, 3177, 3178,
+ 3179, 3180, 3181, 3182, 3183, 3184, 835, 3185, 3187, 3186,
+ 3188, 3189, 3190, 3191, 3193, 3194, 3195, 3196, 3197, 3198,
+ 3199, 3200, 3203, 3201, 3202, 3204, 3205, 3206, 3207, 3208,
+ 0, 3209, 3210, 832, 3211, 3212, 3216, 3213, 3217, 3214,
+ 3218, 3215, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226,
+ 3228, 3229, 3230, 3231, 3232, 874, 831, 786, 3233, 3234,
+ 3235, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245,
+ 3246, 3247, 3248, 3250, 3251, 3249, 857, 824, 3252, 3254,
+ 3253, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3192, 3227,
+ 3236, 857, 780, 781, 786, 857, 799, 0, 840, 874,
+ 0, 821, 840, 826, 2595, 857, 0, 857, 857, 857,
+ 857, 3649, 857, 0, 276, 284, 840, 764, 770, 772,
+ 771, 773, 774, 857, 857, 857, 857, 857, 861, 767,
+ 769, 2588, 2589, 2590, 2591, 2593, 2594, 3632, 768, 2592,
+ 3790, 0, 0, 0, 3796, 0, 3620, 0, 0, 3788,
+ 0, 2143, 0, 1347, 1875, 2145, 2150, 2159, 2163, 2166,
+ 2040, 0, 0, 0, 3768, 3767, 2046, 2045, 3766, 0,
+ 2047, 0, 0, 2048, 2036, 0, 447, 449, 3419, 3417,
+ 3454, 3453, 3458, 0, 3455, 3451, 0, 3410, 3459, 3444,
+ 3448, 0, 3460, 3445, 3452, 3466, 3465, 3467, 3462, 3461,
+ 0, 3464, 3450, 0, 3449, 3470, 0, 3414, 0, 0,
+ 423, 0, 2077, 2078, 2074, 1149, 2073, 2372, 0, 2364,
+ 0, 1280, 2391, 2390, 2387, 1867, 3355, 3360, 3642, 3641,
+ 3640, 3639, 2526, 0, 3636, 3638, 3635, 3637, 2527, 400,
+ 392, 0, 0, 2864, 0, 399, 398, 397, 420, 400,
+ 386, 409, 0, 0, 3623, 379, 3624, 382, 418, 421,
+ 460, 456, 464, 458, 3822, 3820, 3690, 3804, 274, 0,
+ 0, 2505, 2506, 2438, 2437, 2507, 2429, 2450, 0, 0,
+ 0, 1527, 1873, 1873, 1873, 0, 0, 1729, 0, 0,
+ 0, 0, 1873, 0, 1565, 1539, 1538, 0, 1566, 0,
+ 0, 0, 0, 0, 0, 0, 1685, 1685, 1651, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1723,
+ 1725, 2483, 1873, 0, 1873, 0, 1392, 1571, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1873,
+ 1873, 1873, 0, 1583, 1585, 1584, 1873, 1873, 1573, 0,
+ 0, 0, 0, 0, 1873, 0, 0, 0, 0, 0,
+ 1719, 2456, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1719, 0, 0, 0, 0, 0, 0, 2458,
+ 0, 0, 0, 2457, 0, 0, 0, 0, 0, 0,
+ 1719, 0, 0, 1529, 0, 1528, 1530, 0, 1331, 756,
+ 0, 0, 0, 1444, 1442, 1443, 1441, 0, 0, 0,
+ 0, 1450, 1452, 1454, 0, 1449, 1451, 1453, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1531, 0,
+ 0, 0, 0, 0, 2430, 0, 1604, 0, 510, 2361,
+ 0, 0, 0, 304, 1264, 2536, 0, 0, 400, 3417,
+ 0, 0, 0, 3414, 1374, 1355, 3290, 0, 889, 0,
+ 0, 892, 894, 893, 3322, 0, 891, 3331, 3329, 3327,
+ 3326, 0, 0, 3270, 3272, 0, 898, 900, 899, 3320,
+ 897, 0, 3306, 0, 0, 0, 0, 0, 610, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2243, 0, 1373,
+ 1373, 2192, 0, 2276, 0, 2276, 2266, 0, 2276, 2272,
+ 2232, 2225, 0, 0, 667, 1949, 1933, 2218, 2270, 2271,
+ 2276, 0, 0, 2276, 0, 2233, 2266, 2276, 2187, 0,
+ 0, 2179, 2184, 2180, 0, 2186, 2185, 2188, 2176, 2177,
+ 0, 2205, 0, 2217, 2224, 0, 2204, 2211, 0, 2222,
+ 2266, 2266, 0, 2276, 2276, 2276, 1150, 0, 1374, 0,
+ 3656, 2460, 2463, 2469, 2475, 2079, 2076, 2337, 272, 0,
+ 0, 0, 1272, 1274, 1273, 1290, 1197, 3533, 0, 3535,
+ 0, 3537, 0, 78, 0, 0, 2329, 2327, 0, 0,
+ 0, 2321, 2323, 2326, 2322, 0, 0, 2328, 131, 0,
+ 2324, 2330, 2303, 2306, 2313, 1373, 2304, 0, 0, 341,
+ 344, 346, 0, 349, 1867, 3374, 3373, 0, 0, 0,
+ 1201, 1204, 0, 2358, 2355, 131, 0, 2662, 3540, 3538,
+ 0, 1171, 1187, 134, 1181, 1182, 0, 0, 1174, 134,
+ 3355, 3617, 3618, 0, 0, 3594, 3611, 3592, 0, 3606,
+ 3607, 3591, 7, 4, 154, 0, 145, 0, 0, 0,
+ 610, 610, 137, 0, 610, 0, 3770, 1374, 1374, 610,
+ 610, 610, 0, 1766, 0, 1732, 1797, 1798, 1800, 0,
+ 1799, 0, 0, 1867, 0, 0, 1789, 1815, 0, 1815,
+ 1791, 1792, 0, 0, 0, 1349, 1795, 2516, 2029, 2032,
+ 0, 2021, 2023, 2024, 2528, 2026, 0, 0, 1878, 1881,
+ 1943, 1944, 0, 1364, 0, 1957, 1958, 1956, 0, 1934,
+ 1950, 1955, 1953, 0, 1925, 0, 1974, 1965, 2013, 1363,
+ 1972, 1973, 1325, 2282, 0, 2280, 2299, 2300, 2498, 1303,
+ 1299, 3351, 3352, 3349, 3350, 3348, 3684, 3685, 3687, 1021,
+ 905, 2100, 904, 603, 606, 605, 0, 0, 2071, 227,
+ 2533, 0, 2071, 1038, 0, 2534, 3495, 0, 3502, 3484,
+ 0, 1155, 3567, 3568, 1032, 1030, 0, 1216, 1217, 1220,
+ 0, 250, 0, 253, 255, 0, 400, 433, 435, 444,
+ 3631, 378, 0, 0, 1255, 0, 1253, 1252, 1250, 1251,
+ 1249, 0, 1240, 1246, 1247, 290, 0, 855, 858, 792,
+ 874, 872, 874, 806, 875, 0, 844, 842, 841, 837,
+ 844, 808, 914, 820, 0, 874, 907, 911, 908, 816,
+ 0, 786, 909, 0, 912, 787, 814, 807, 813, 844,
+ 0, 803, 811, 874, 779, 815, 802, 0, 844, 817,
+ 822, 825, 827, 829, 844, 874, 0, 3620, 786, 801,
+ 800, 786, 844, 0, 0, 3620, 838, 823, 909, 920,
+ 786, 874, 844, 0, 862, 844, 288, 375, 1976, 3709,
+ 3792, 3793, 3786, 3789, 3791, 1794, 0, 2146, 2153, 2055,
+ 2057, 2497, 0, 1348, 2148, 1923, 0, 0, 0, 2161,
+ 2059, 0, 3769, 0, 2042, 3408, 3482, 2041, 1159, 0,
+ 0, 378, 472, 448, 402, 3447, 1388, 3463, 0, 3468,
+ 3469, 3406, 225, 224, 3415, 223, 0, 0, 0, 0,
+ 3456, 3439, 0, 3443, 3442, 0, 3440, 0, 3441, 0,
+ 3446, 3423, 3422, 2473, 0, 2472, 3668, 377, 2079, 3009,
+ 3023, 2373, 2369, 2368, 0, 2388, 0, 1868, 1869, 0,
+ 0, 1871, 3357, 1976, 0, 3354, 3691, 393, 400, 0,
+ 0, 0, 415, 387, 400, 402, 414, 453, 275, 0,
+ 250, 383, 0, 0, 378, 378, 400, 3620, 3709, 3355,
+ 3290, 1680, 1682, 0, 0, 1874, 0, 1697, 0, 0,
+ 0, 0, 0, 0, 1507, 0, 0, 0, 1634, 0,
+ 1697, 1662, 2006, 2007, 1987, 1988, 1986, 1989, 1385, 0,
+ 1990, 2005, 0, 0, 0, 1660, 1330, 1313, 0, 0,
+ 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852,
+ 1853, 1854, 1856, 1861, 1857, 1858, 1859, 1860, 1855, 1862,
+ 0, 1842, 0, 1686, 1647, 1649, 0, 0, 0, 756,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1873,
+ 0, 0, 1873, 0, 0, 0, 0, 0, 0, 1661,
+ 0, 1659, 0, 0, 1658, 1551, 0, 0, 1873, 0,
+ 1578, 0, 0, 0, 0, 0, 0, 1557, 1558, 0,
+ 0, 0, 1483, 0, 1481, 1482, 0, 0, 1873, 0,
+ 0, 0, 0, 1474, 0, 0, 0, 0, 1720, 0,
+ 0, 1865, 1863, 1866, 1864, 0, 0, 1721, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1555, 0, 0,
+ 0, 2488, 938, 0, 0, 0, 0, 1522, 0, 0,
+ 0, 0, 1390, 1389, 1391, 1402, 1396, 1400, 1394, 1398,
+ 0, 1455, 3003, 1403, 0, 0, 0, 1406, 1415, 1419,
+ 0, 0, 0, 0, 0, 1426, 1424, 1425, 1437, 1438,
+ 1422, 1423, 0, 1428, 0, 1427, 1434, 1435, 1436, 1439,
+ 1525, 901, 1533, 1893, 1653, 1654, 1678, 1897, 0, 0,
+ 0, 0, 2484, 1374, 1477, 1476, 1478, 1479, 1480, 511,
+ 0, 505, 508, 522, 0, 0, 2360, 0, 2676, 2692,
+ 2693, 322, 325, 324, 326, 0, 0, 1263, 1267, 3355,
+ 0, 0, 0, 0, 3486, 3396, 0, 0, 1370, 1310,
+ 1369, 0, 0, 0, 0, 0, 3312, 3324, 0, 0,
+ 3321, 0, 0, 0, 0, 0, 3294, 0, 0, 0,
+ 0, 3267, 3333, 3334, 3337, 0, 0, 0, 2973, 0,
+ 3269, 3274, 3265, 3278, 3280, 3282, 2234, 0, 0, 0,
+ 0, 2239, 2236, 2229, 2242, 2714, 2238, 2255, 2237, 2231,
+ 2244, 2230, 0, 0, 0, 2276, 2248, 2251, 2245, 2276,
+ 0, 2276, 2247, 0, 2274, 2261, 2260, 2259, 2202, 2201,
+ 2195, 2267, 2252, 2246, 220, 2276, 2200, 2199, 2181, 2182,
+ 2183, 0, 1932, 0, 2272, 134, 2266, 0, 2276, 2276,
+ 0, 2258, 2221, 2223, 2127, 0, 1794, 0, 0, 2113,
+ 2106, 2093, 378, 0, 0, 0, 2080, 2081, 378, 3828,
+ 0, 0, 0, 495, 1290, 1276, 1292, 1199, 1198, 1196,
+ 3532, 3536, 1722, 80, 2121, 2119, 82, 2118, 2120, 83,
+ 2339, 2315, 2314, 2316, 2320, 131, 2325, 2317, 0, 2331,
+ 2332, 350, 354, 0, 0, 0, 3372, 0, 611, 0,
+ 75, 0, 1205, 1976, 2354, 2356, 2349, 3539, 0, 1172,
+ 1189, 1188, 1184, 1185, 0, 1169, 135, 1180, 1179, 1173,
+ 2171, 3600, 3609, 3613, 3598, 601, 986, 0, 3404, 3502,
+ 189, 0, 0, 0, 140, 0, 3720, 0, 610, 161,
+ 163, 610, 0, 0, 0, 610, 0, 0, 1811, 1803,
+ 1805, 1806, 1807, 0, 1810, 0, 1352, 0, 1340, 1340,
+ 1350, 1813, 1793, 1790, 1816, 0, 1815, 1815, 0, 0,
+ 1773, 1772, 0, 1867, 895, 2025, 0, 0, 1877, 0,
+ 1879, 1888, 1878, 1946, 2689, 0, 0, 1366, 0, 1976,
+ 1360, 2437, 0, 0, 0, 0, 0, 0, 0, 1945,
+ 1942, 0, 2301, 0, 0, 601, 0, 604, 2100, 2100,
+ 0, 0, 0, 0, 0, 0, 0, 0, 230, 239,
+ 1025, 2532, 1027, 0, 0, 0, 0, 0, 3514, 3355,
+ 1052, 3569, 1028, 0, 0, 1219, 248, 247, 251, 0,
+ 3668, 439, 436, 378, 431, 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,
+ 134, 89, 110, 0, 1242, 1254, 2052, 1248, 0, 0,
+ 0, 0, 0, 0, 804, 878, 0, 805, 0, 846,
+ 847, 845, 850, 782, 778, 915, 919, 918, 809, 810,
+ 789, 910, 906, 913, 0, 872, 788, 784, 0, 1014,
+ 796, 0, 785, 828, 783, 797, 280, 0, 0, 3655,
+ 0, 0, 3662, 286, 812, 794, 798, 3620, 3620, 277,
+ 285, 0, 775, 790, 921, 791, 793, 920, 776, 0,
+ 777, 1976, 1981, 1977, 3795, 303, 0, 302, 0, 2147,
+ 1340, 0, 0, 0, 2500, 0, 1960, 1924, 2160, 0,
+ 2164, 2163, 0, 3765, 0, 0, 1161, 1160, 2044, 2049,
+ 3355, 378, 292, 405, 451, 0, 0, 3403, 226, 3478,
+ 3481, 2497, 0, 0, 3424, 0, 424, 3630, 2081, 2370,
+ 2374, 1281, 1283, 1284, 1282, 1290, 0, 2548, 2547, 2546,
+ 2517, 1872, 2518, 2543, 2541, 2545, 2539, 2544, 2537, 2538,
+ 2542, 2540, 0, 3363, 3364, 3362, 3356, 3361, 394, 395,
+ 416, 419, 0, 388, 389, 403, 407, 0, 3626, 3625,
+ 422, 461, 445, 445, 445, 3823, 0, 1258, 0, 0,
+ 2487, 0, 1629, 0, 1630, 1631, 0, 1508, 1730, 0,
+ 0, 0, 1536, 0, 0, 0, 1633, 0, 1386, 0,
+ 0, 1511, 1503, 1314, 0, 1664, 0, 0, 0, 0,
+ 0, 0, 0, 1669, 0, 1667, 0, 0, 1724, 0,
+ 1726, 2484, 0, 1639, 1674, 0, 1637, 0, 0, 1663,
+ 1675, 1676, 0, 0, 0, 1643, 1641, 0, 1645, 1579,
+ 1642, 1644, 0, 0, 0, 1576, 0, 0, 0, 0,
+ 0, 0, 0, 1554, 0, 1590, 0, 1627, 1591, 0,
+ 0, 1588, 0, 0, 0, 1606, 1540, 1541, 0, 1542,
+ 1593, 0, 1516, 1547, 1548, 1513, 1514, 1607, 1596, 1515,
+ 0, 1550, 1976, 0, 1534, 0, 0, 0, 1552, 1582,
+ 0, 0, 0, 1512, 0, 0, 0, 1976, 0, 1608,
+ 1556, 0, 0, 757, 1332, 1504, 2485, 1397, 1401, 1395,
+ 1399, 0, 0, 0, 0, 1414, 0, 0, 1407, 1417,
+ 1420, 0, 0, 1895, 0, 0, 1672, 1719, 1719, 1719,
+ 1719, 0, 0, 0, 1623, 1624, 0, 0, 504, 503,
+ 0, 507, 591, 0, 524, 512, 501, 2362, 0, 0,
+ 1265, 0, 0, 0, 0, 3397, 0, 0, 0, 0,
+ 1374, 1375, 1375, 2483, 3291, 3292, 3293, 0, 2573, 2572,
+ 2570, 2574, 2571, 2521, 2523, 0, 2522, 2568, 2566, 2569,
+ 2564, 2562, 2563, 2567, 2565, 0, 0, 3310, 903, 902,
+ 3323, 0, 3345, 0, 0, 3330, 3328, 0, 0, 0,
+ 3273, 0, 3339, 3340, 0, 0, 0, 3308, 3307, 0,
+ 0, 0, 3300, 0, 0, 0, 2257, 0, 2228, 2241,
+ 2240, 2277, 2278, 2254, 2250, 2196, 2253, 2249, 2273, 1976,
+ 2206, 2227, 2197, 0, 2220, 2178, 2274, 2235, 1875, 2266,
+ 2193, 2194, 2256, 0, 1349, 1375, 2109, 1374, 2110, 378,
+ 2464, 0, 2471, 0, 2068, 0, 0, 3620, 1239, 1279,
+ 1271, 1278, 1275, 1290, 1288, 1277, 964, 963, 0, 1291,
+ 79, 0, 0, 2318, 134, 2312, 2333, 2307, 0, 345,
+ 355, 347, 351, 352, 353, 348, 2783, 2864, 0, 1875,
+ 3376, 3615, 1212, 1210, 1209, 1211, 1200, 1206, 1207, 2359,
+ 2357, 134, 2378, 1187, 0, 1190, 3620, 1976, 0, 3612,
+ 155, 602, 0, 0, 0, 986, 0, 165, 3514, 0,
+ 0, 0, 138, 169, 3720, 3777, 3620, 3762, 3771, 3583,
+ 0, 156, 3774, 228, 3772, 0, 0, 1808, 1809, 1770,
+ 1340, 1342, 1341, 0, 0, 1344, 0, 0, 0, 0,
+ 1778, 0, 1774, 1776, 0, 1840, 1832, 0, 2030, 2022,
+ 2027, 2482, 1885, 1929, 0, 0, 1311, 1888, 0, 1947,
+ 1938, 0, 1367, 1365, 1959, 1936, 0, 1952, 1951, 1954,
+ 1364, 1926, 1929, 0, 1374, 3686, 3688, 1022, 607, 0,
+ 0, 1023, 0, 0, 0, 233, 236, 234, 235, 2100,
+ 2100, 183, 2100, 2100, 182, 184, 0, 178, 175, 185,
+ 2100, 1039, 171, 0, 0, 0, 0, 1976, 0, 0,
+ 0, 191, 0, 3489, 3488, 0, 3504, 0, 0, 3506,
+ 0, 3505, 3503, 3474, 3485, 0, 1047, 1017, 0, 1054,
+ 1056, 0, 0, 3569, 1218, 0, 250, 254, 442, 0,
+ 0, 0, 1976, 0, 1976, 1976, 0, 0, 1976, 0,
+ 1976, 0, 0, 0, 0, 0, 0, 0, 1976, 0,
+ 0, 0, 1976, 0, 1976, 0, 88, 1256, 0, 3620,
+ 261, 0, 260, 3755, 292, 853, 851, 854, 852, 873,
+ 0, 848, 849, 916, 917, 879, 909, 0, 909, 282,
+ 0, 3111, 279, 767, 2588, 2589, 2590, 2591, 2593, 2594,
+ 3664, 3663, 3751, 3750, 0, 0, 795, 312, 311, 309,
+ 378, 299, 307, 301, 0, 308, 1984, 1985, 1982, 1980,
+ 1983, 3831, 2144, 2056, 2163, 0, 2498, 1373, 0, 2156,
+ 1875, 0, 2162, 3355, 3409, 3483, 1159, 0, 293, 0,
+ 0, 402, 3518, 0, 0, 0, 0, 0, 2474, 426,
+ 2065, 0, 1290, 1294, 2381, 3366, 3367, 3365, 396, 417,
+ 390, 0, 410, 402, 0, 250, 0, 455, 457, 446,
+ 465, 459, 0, 445, 1683, 1681, 0, 1698, 1727, 0,
+ 857, 857, 840, 861, 1713, 3118, 1707, 1710, 0, 859,
+ 1715, 857, 1708, 859, 0, 1706, 0, 1704, 1705, 0,
+ 0, 0, 1635, 1632, 0, 0, 0, 1689, 1689, 0,
+ 0, 0, 0, 1431, 0, 0, 0, 1618, 0, 1640,
+ 1638, 0, 0, 0, 0, 0, 1646, 0, 1562, 1560,
+ 1489, 0, 1487, 0, 1488, 0, 1490, 0, 0, 1628,
+ 0, 1457, 1475, 0, 0, 0, 1722, 0, 1992, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2489, 0, 0, 927, 933, 936, 937, 939, 931, 0,
+ 1600, 0, 0, 0, 1412, 1408, 0, 1416, 0, 0,
+ 0, 1430, 1429, 1897, 1896, 0, 1671, 0, 0, 1721,
+ 0, 0, 1721, 0, 0, 0, 2486, 1375, 1605, 1374,
+ 514, 0, 532, 506, 1976, 509, 0, 523, 0, 535,
+ 0, 0, 0, 323, 0, 1268, 0, 454, 0, 3395,
+ 3487, 0, 0, 1368, 1376, 1371, 0, 0, 0, 3314,
+ 3313, 3325, 0, 0, 0, 0, 3298, 3296, 3295, 3271,
+ 0, 0, 3344, 3338, 3335, 3336, 0, 0, 3277, 0,
+ 0, 3275, 3279, 3281, 2216, 2215, 0, 2275, 1932, 2189,
+ 2208, 2210, 2276, 2129, 2133, 0, 1867, 2117, 0, 0,
+ 2111, 2115, 0, 2470, 0, 0, 2082, 1794, 273, 0,
+ 3692, 3833, 0, 1834, 84, 0, 2319, 2310, 0, 2305,
+ 2308, 0, 0, 3387, 3388, 3380, 3383, 3381, 3382, 3386,
+ 3389, 3390, 3377, 3384, 1932, 0, 0, 1202, 1208, 2352,
+ 1186, 136, 0, 1170, 0, 0, 3651, 2172, 3601, 3614,
+ 1001, 1003, 1002, 987, 988, 0, 0, 0, 1047, 0,
+ 0, 0, 614, 614, 170, 3779, 0, 0, 3715, 3718,
+ 3716, 3719, 3721, 3620, 0, 200, 3569, 3620, 0, 3620,
+ 158, 1767, 1351, 1343, 1345, 1340, 1340, 0, 1731, 0,
+ 0, 0, 1731, 0, 0, 495, 0, 1812, 1829, 896,
+ 2395, 1886, 1887, 0, 1882, 1930, 1931, 1884, 1880, 0,
+ 1889, 1891, 1312, 1948, 1940, 1935, 1361, 0, 1928, 0,
+ 0, 0, 2016, 2018, 665, 664, 238, 237, 242, 243,
+ 1976, 1976, 2105, 2104, 1976, 1976, 177, 174, 2103, 2102,
+ 1976, 1976, 172, 2071, 195, 194, 196, 197, 199, 198,
+ 193, 1035, 0, 3492, 0, 3499, 3494, 3497, 3477, 3476,
+ 3475, 3472, 0, 1976, 1976, 1976, 0, 1976, 3513, 3515,
+ 0, 0, 1036, 904, 3527, 0, 0, 205, 3571, 0,
+ 3573, 0, 1222, 0, 1221, 249, 3668, 1976, 1976, 103,
+ 1976, 95, 96, 91, 123, 124, 93, 94, 99, 98,
+ 100, 101, 104, 105, 102, 97, 92, 127, 129, 128,
+ 106, 2012, 2011, 2010, 130, 125, 126, 90, 291, 0,
+ 268, 266, 267, 3666, 3665, 3752, 0, 0, 3753, 3798,
+ 0, 819, 1015, 818, 281, 278, 839, 1976, 289, 310,
+ 0, 1875, 2501, 0, 0, 1961, 2157, 2149, 2151, 2039,
+ 2037, 3658, 0, 452, 406, 450, 0, 3402, 3407, 3480,
+ 3479, 3502, 3502, 400, 3668, 400, 425, 0, 1285, 1290,
+ 1294, 0, 1286, 2392, 404, 408, 3628, 3627, 462, 3709,
+ 3821, 0, 0, 1728, 1699, 909, 1712, 1714, 0, 1711,
+ 909, 856, 860, 1717, 1703, 1709, 1716, 909, 1506, 1537,
+ 1510, 1509, 0, 0, 0, 1569, 0, 1687, 1693, 0,
+ 0, 0, 1544, 0, 1670, 1668, 1546, 0, 0, 1620,
+ 2486, 1595, 1666, 1572, 1597, 1549, 0, 0, 0, 1486,
+ 1484, 1485, 0, 1563, 1586, 0, 1473, 1587, 0, 1570,
+ 1594, 1502, 1994, 1993, 1991, 1517, 1976, 0, 1574, 1535,
+ 0, 0, 1599, 2490, 2491, 0, 0, 0, 938, 924,
+ 925, 926, 0, 928, 930, 932, 0, 1976, 1433, 1432,
+ 1404, 0, 1413, 1410, 0, 1418, 1899, 1898, 0, 0,
+ 1611, 1613, 1612, 1615, 1614, 1609, 1719, 1376, 1625, 0,
+ 515, 516, 518, 520, 597, 0, 510, 539, 499, 0,
+ 514, 502, 1266, 1269, 0, 3393, 3392, 0, 1372, 1380,
+ 1379, 2480, 2484, 0, 0, 0, 3311, 3332, 0, 0,
+ 0, 0, 3342, 3341, 3343, 3309, 3304, 3302, 3301, 1998,
+ 1999, 1997, 1995, 1996, 2207, 1932, 2203, 0, 1875, 0,
+ 1832, 1375, 2107, 0, 3657, 0, 2088, 0, 2085, 2092,
+ 488, 2156, 0, 2083, 2054, 3696, 3693, 3694, 0, 1837,
+ 0, 1838, 1835, 1836, 1976, 0, 0, 371, 363, 358,
+ 366, 360, 362, 361, 367, 368, 369, 370, 364, 359,
+ 365, 357, 356, 0, 3375, 1213, 1214, 0, 1193, 1191,
+ 3652, 3653, 143, 0, 3405, 164, 0, 149, 152, 715,
+ 0, 0, 0, 0, 2100, 2100, 2100, 2100, 2100, 2100,
+ 2100, 2100, 2100, 2100, 0, 2100, 2100, 2100, 2100, 2100,
+ 2100, 2100, 2100, 2100, 2100, 0, 0, 2100, 2100, 139,
+ 483, 491, 615, 618, 654, 656, 643, 644, 480, 0,
+ 141, 0, 3708, 3707, 3620, 3714, 3717, 269, 3702, 3698,
+ 3701, 231, 0, 0, 0, 257, 3700, 3699, 0, 680,
+ 681, 679, 678, 0, 0, 3569, 0, 1354, 1353, 1779,
+ 0, 1783, 1788, 1784, 0, 1775, 0, 1796, 1841, 1833,
+ 0, 0, 2403, 1929, 0, 0, 1929, 0, 0, 1375,
+ 2014, 1374, 176, 181, 180, 173, 186, 179, 1040, 192,
+ 3493, 3491, 3490, 0, 3498, 0, 3473, 3509, 3507, 3508,
+ 3511, 0, 0, 3510, 3512, 1041, 1042, 1048, 1043, 1147,
+ 1147, 0, 1147, 0, 0, 1147, 2100, 0, 0, 495,
+ 1165, 2100, 0, 0, 0, 0, 0, 1130, 0, 1147,
+ 0, 0, 0, 0, 0, 1068, 1129, 616, 1018, 1067,
+ 1069, 1081, 491, 0, 1102, 1132, 1133, 1131, 3528, 0,
+ 0, 0, 1053, 0, 208, 206, 216, 3570, 0, 2071,
+ 0, 3573, 1224, 1225, 0, 440, 0, 116, 118, 0,
+ 120, 122, 0, 112, 114, 259, 3667, 3754, 0, 0,
+ 843, 300, 2163, 2154, 0, 1962, 0, 1374, 2071, 294,
+ 0, 0, 3516, 3516, 427, 429, 428, 2122, 1287, 1295,
+ 2394, 2393, 0, 250, 445, 0, 1684, 1700, 1718, 1701,
+ 1702, 1636, 0, 0, 0, 0, 1693, 0, 0, 1694,
+ 1652, 0, 0, 0, 0, 0, 1505, 0, 1616, 0,
+ 1561, 1559, 0, 840, 1464, 1466, 1462, 1465, 0, 859,
+ 1468, 0, 821, 859, 909, 1472, 1458, 1459, 1460, 1461,
+ 0, 0, 0, 0, 0, 2492, 922, 1602, 0, 935,
+ 929, 927, 934, 0, 1409, 0, 0, 1901, 0, 1673,
+ 0, 1626, 519, 0, 598, 594, 0, 0, 540, 0,
+ 541, 537, 513, 0, 3394, 1378, 1377, 0, 3318, 3316,
+ 3315, 3347, 3346, 3299, 3297, 0, 0, 134, 2132, 1923,
+ 2134, 2135, 2126, 2116, 2114, 2466, 0, 2089, 2091, 2477,
+ 2476, 2488, 0, 0, 2071, 2084, 1976, 3695, 1087, 0,
+ 1088, 1099, 1101, 1293, 0, 2344, 0, 2342, 2311, 2345,
+ 0, 0, 0, 0, 146, 0, 0, 0, 1012, 2625,
+ 0, 0, 684, 686, 687, 688, 689, 0, 716, 691,
+ 610, 965, 965, 718, 2493, 0, 663, 2100, 484, 1976,
+ 1976, 1976, 1976, 641, 1976, 1976, 1976, 0, 0, 2100,
+ 1976, 0, 0, 1976, 1976, 1976, 1976, 0, 0, 1976,
+ 649, 650, 648, 1976, 1976, 2392, 490, 492, 904, 619,
+ 614, 0, 0, 3670, 3670, 3744, 0, 3745, 3746, 262,
+ 3763, 475, 476, 0, 0, 3573, 0, 0, 3589, 0,
+ 3589, 0, 0, 1734, 1733, 0, 0, 0, 0, 0,
+ 0, 1822, 0, 1821, 0, 1827, 1831, 0, 0, 0,
+ 0, 2396, 2398, 0, 2031, 1883, 1892, 1890, 1927, 1939,
+ 0, 2019, 2017, 0, 3500, 3496, 1979, 1978, 0, 1045,
+ 0, 1044, 1049, 1012, 610, 1148, 608, 0, 1106, 1110,
+ 1107, 608, 2058, 2058, 1259, 2058, 0, 0, 0, 0,
+ 2058, 0, 2060, 2058, 0, 0, 2058, 2058, 0, 1259,
+ 0, 493, 1168, 1166, 2058, 1167, 2058, 0, 0, 1259,
+ 1119, 1063, 1120, 0, 1064, 2058, 1259, 1086, 1259, 1259,
+ 0, 617, 904, 1065, 1066, 715, 1162, 215, 204, 0,
+ 0, 1055, 1057, 0, 0, 1058, 3572, 1031, 3575, 2071,
+ 1230, 0, 108, 1976, 109, 1976, 107, 1976, 3758, 0,
+ 2071, 0, 1963, 2158, 2152, 3519, 0, 3401, 3400, 0,
+ 2156, 0, 3629, 463, 445, 1567, 1568, 1690, 1929, 1688,
+ 0, 1695, 1696, 1650, 1592, 0, 1545, 0, 1617, 0,
+ 1598, 1564, 1467, 1463, 1470, 822, 1469, 1471, 1589, 1518,
+ 1976, 1575, 1580, 1581, 0, 1601, 1976, 1411, 0, 1904,
+ 1903, 0, 0, 1929, 1610, 517, 595, 512, 0, 536,
+ 539, 0, 500, 2481, 0, 0, 3305, 3303, 2209, 1960,
+ 2467, 2465, 2087, 0, 0, 0, 2086, 2096, 0, 2069,
+ 0, 1289, 0, 1839, 2340, 1976, 0, 2309, 0, 1192,
+ 1194, 0, 0, 0, 0, 0, 717, 1013, 0, 0,
+ 690, 2496, 683, 715, 0, 0, 0, 965, 707, 610,
+ 0, 1012, 966, 610, 610, 0, 0, 0, 0, 2009,
+ 2008, 638, 631, 630, 633, 632, 635, 634, 0, 627,
+ 624, 636, 626, 651, 0, 639, 621, 676, 677, 675,
+ 645, 652, 622, 623, 629, 628, 625, 668, 673, 671,
+ 670, 669, 674, 672, 640, 655, 637, 653, 482, 599,
+ 620, 491, 2002, 2003, 2000, 2001, 660, 659, 2004, 657,
+ 658, 3670, 3670, 0, 372, 3646, 3644, 3647, 3645, 3780,
+ 3724, 3725, 3729, 3727, 3738, 3731, 0, 3731, 0, 3661,
+ 3747, 0, 263, 265, 240, 232, 0, 0, 479, 477,
+ 478, 0, 0, 157, 271, 258, 231, 0, 3776, 231,
+ 3573, 1735, 0, 0, 1780, 0, 1785, 0, 1777, 1817,
+ 1817, 1828, 0, 0, 0, 0, 2397, 0, 0, 2404,
+ 2406, 1941, 0, 1043, 0, 0, 0, 1259, 0, 0,
+ 1134, 1104, 0, 0, 0, 0, 1075, 0, 1084, 0,
+ 0, 2058, 0, 1136, 0, 1135, 0, 0, 0, 1145,
+ 1146, 0, 1919, 1921, 1929, 0, 0, 0, 1124, 1143,
+ 1144, 0, 0, 0, 0, 1094, 0, 1080, 1147, 0,
+ 1147, 1103, 0, 682, 0, 1164, 1105, 202, 207, 217,
+ 218, 1033, 0, 3574, 1029, 0, 1231, 1227, 1228, 1223,
+ 117, 121, 113, 0, 0, 2155, 0, 0, 3523, 3517,
+ 3521, 2123, 2071, 0, 3824, 0, 1692, 1648, 0, 1619,
+ 1621, 0, 923, 0, 1900, 1894, 0, 0, 0, 0,
+ 0, 0, 1913, 1905, 0, 1677, 0, 597, 0, 0,
+ 525, 538, 544, 543, 3319, 3317, 2130, 0, 2090, 2478,
+ 2489, 489, 0, 0, 3668, 1100, 2343, 0, 3385, 0,
+ 1929, 1010, 0, 0, 0, 0, 0, 0, 685, 0,
+ 610, 961, 962, 1012, 0, 692, 984, 2493, 1012, 1012,
+ 722, 0, 710, 720, 765, 2495, 485, 647, 2332, 646,
+ 600, 0, 2392, 0, 0, 3743, 0, 3726, 3728, 3730,
+ 0, 3749, 0, 3748, 3620, 270, 0, 241, 3710, 1374,
+ 213, 3760, 3620, 3590, 3620, 159, 0, 1867, 0, 0,
+ 0, 1825, 1823, 2401, 2402, 0, 2399, 0, 0, 2405,
+ 0, 1050, 1046, 1051, 0, 1089, 0, 1108, 0, 0,
+ 1074, 0, 1245, 0, 0, 1127, 1115, 0, 1070, 0,
+ 1117, 1118, 1159, 1072, 0, 1922, 494, 0, 0, 1079,
+ 0, 1162, 1071, 1096, 1077, 1109, 1163, 209, 1059, 378,
+ 0, 0, 0, 1226, 0, 1233, 3759, 3756, 0, 0,
+ 3522, 3520, 0, 2066, 1794, 1929, 1543, 1519, 1603, 0,
+ 1910, 0, 0, 1908, 1907, 0, 1902, 1909, 596, 593,
+ 0, 0, 533, 551, 547, 0, 549, 550, 572, 2071,
+ 0, 0, 2095, 2097, 3697, 2346, 3355, 0, 1007, 0,
+ 1008, 0, 3355, 3355, 0, 0, 0, 1012, 984, 2493,
+ 943, 0, 693, 0, 697, 699, 724, 0, 719, 711,
+ 732, 0, 0, 661, 481, 3670, 0, 3670, 0, 3709,
+ 3722, 3781, 3734, 3732, 3704, 3703, 3778, 264, 3620, 3620,
+ 3584, 205, 214, 0, 3775, 3773, 2862, 0, 1743, 1745,
+ 1768, 1782, 1787, 0, 1818, 0, 0, 0, 2400, 2408,
+ 2407, 3501, 0, 1091, 609, 1004, 0, 1122, 0, 0,
+ 1162, 1076, 0, 0, 0, 1116, 1137, 1114, 1259, 1920,
+ 0, 0, 0, 1113, 1095, 1097, 1205, 0, 211, 187,
+ 3576, 0, 0, 1232, 1237, 0, 1234, 1236, 0, 1346,
+ 0, 2382, 1691, 1911, 0, 1912, 1915, 0, 0, 1916,
+ 0, 529, 531, 521, 0, 526, 0, 545, 0, 2100,
+ 2100, 0, 2100, 2100, 2100, 2100, 565, 573, 575, 576,
+ 577, 0, 2131, 2468, 2479, 972, 1929, 0, 0, 0,
+ 0, 974, 976, 0, 0, 712, 705, 701, 0, 0,
+ 947, 985, 0, 695, 0, 0, 887, 941, 750, 0,
+ 753, 0, 885, 723, 725, 883, 884, 727, 0, 0,
+ 0, 766, 0, 0, 865, 0, 868, 0, 0, 721,
+ 0, 733, 864, 871, 2494, 642, 487, 662, 3741, 3737,
+ 3739, 3736, 0, 3661, 3620, 3620, 3764, 3711, 0, 216,
+ 3710, 0, 1742, 0, 0, 1820, 1819, 1834, 0, 0,
+ 0, 539, 1090, 1005, 1123, 0, 1112, 495, 539, 1128,
+ 1073, 1125, 1126, 495, 0, 1078, 210, 0, 203, 188,
+ 219, 3577, 3578, 1229, 0, 3757, 2124, 895, 1906, 1914,
+ 1918, 1917, 527, 0, 534, 558, 548, 554, 0, 2100,
+ 0, 0, 2100, 0, 0, 0, 0, 0, 542, 574,
+ 2100, 0, 0, 2100, 0, 993, 995, 1138, 973, 997,
+ 996, 978, 994, 1006, 1011, 1010, 3355, 190, 0, 1138,
+ 975, 999, 982, 1138, 977, 998, 980, 0, 0, 0,
+ 0, 703, 0, 946, 0, 951, 0, 0, 0, 0,
+ 751, 752, 888, 726, 886, 882, 876, 870, 2505, 2506,
+ 0, 0, 0, 762, 763, 866, 759, 760, 761, 0,
+ 741, 0, 0, 872, 863, 734, 3710, 3710, 3723, 3620,
+ 231, 0, 0, 0, 0, 187, 1747, 1744, 0, 1752,
+ 1754, 1753, 1755, 1746, 0, 0, 0, 1111, 1093, 0,
+ 1121, 1083, 1085, 1082, 0, 212, 1235, 0, 2383, 533,
+ 530, 558, 0, 556, 0, 552, 546, 553, 0, 590,
+ 584, 0, 586, 587, 585, 582, 569, 0, 567, 0,
+ 989, 992, 1976, 990, 144, 1140, 1139, 979, 0, 972,
+ 0, 150, 983, 153, 981, 708, 0, 0, 0, 0,
+ 944, 0, 948, 949, 950, 0, 942, 0, 0, 0,
+ 0, 877, 881, 2440, 2439, 0, 1381, 869, 0, 736,
+ 880, 735, 3620, 3620, 3782, 3735, 3589, 3709, 1374, 218,
+ 3761, 0, 1749, 0, 0, 1826, 1824, 1092, 539, 2125,
+ 2137, 0, 2409, 528, 555, 0, 563, 559, 561, 564,
+ 589, 588, 0, 566, 0, 583, 666, 991, 1142, 1141,
+ 1009, 1138, 1000, 709, 0, 1008, 0, 945, 0, 0,
+ 972, 0, 974, 976, 758, 0, 867, 728, 728, 742,
+ 3706, 3705, 3742, 3740, 231, 3712, 3585, 201, 1748, 0,
+ 1756, 0, 0, 0, 0, 2395, 557, 0, 0, 578,
+ 571, 568, 147, 0, 0, 1008, 957, 956, 0, 0,
+ 953, 952, 694, 972, 698, 700, 1382, 0, 739, 729,
+ 731, 738, 744, 745, 743, 746, 3733, 0, 0, 1751,
+ 0, 1762, 1761, 1750, 0, 1757, 1759, 1098, 2136, 2138,
+ 0, 2403, 562, 560, 570, 579, 581, 706, 972, 0,
+ 960, 958, 959, 0, 0, 696, 1383, 730, 737, 747,
+ 749, 3713, 0, 1739, 1740, 1738, 1737, 1736, 1763, 0,
+ 0, 1758, 0, 1760, 0, 2411, 580, 702, 972, 0,
+ 0, 748, 3586, 1765, 1764, 0, 0, 2410, 0, 2415,
+ 704, 955, 954, 3581, 0, 0, 2422, 3579, 3580, 0,
+ 3587, 2413, 2414, 2412, 0, 2417, 0, 2419, 2420, 0,
+ 2071, 3582, 378, 2421, 2416, 0, 2423, 2425, 0, 2384,
+ 187, 2418, 0, 1374, 3588, 2424, 0, 1375, 2426
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -5620, -5620, -5620, -5620, 1734, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, 2323, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 1462, -5620, 122, -5620, 128, -5620, 125, -4030, -599,
+ -5620, -2250, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 1619, -3408, -5553, -5620, -5620, -397, 1014, -5620,
+ -5620, -74, -5620, -432, -5620, -5620, -5620, -4672, -589, -818,
+ -5620, 42, 4620, 3260, -585, 3928, -4607, 257, -5620, -3349,
+ -5620, -5620, -5620, -5620, -2390, -5620, -5620, -5620, -5620, 258,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -613, -5620,
+ 1460, -5620, 955, -5620, -4604, -5620, -737, -5620, -5620, -5620,
+ 1478, -5620, -5620, 357, 947, 2847, 2843, -5620, -5620, -5620,
+ -5620, 1823, -5620, 2011, -5620, -2116, 3285, -5620, -5620, -5620,
+ -5620, -5620, 2333, -2878, -5620, -5620, -5620, 1166, -5620, -850,
+ -5620, 40, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -504, -5620, -2481,
+ 1397, -5620, 1420, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -709, -5620, -5620, -5620, 44, -5620, -5620, -5620,
+ -5620, -5620, 2945, -5620, 4574, -5620, -5620, -3841, -5620, 2752,
+ -5620, 2755, 2758, -3243, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 47, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -236, -234, 0, 550, 1031, -5620, -4149, -5620,
+ -5620, -100, -5620, -5620, -5620, -5620, -5620, 810, 110, 808,
+ -5620, 440, 2530, -3237, -5620, -5620, -5620, -5620, -5620, -5620,
+ -593, -145, -684, -5620, -4536, -5620, -5036, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -3957, -5620, -5620, -5620, -819,
+ -5620, -5620, -775, -5620, -5620, -5620, -5620, -447, -5620, -5620,
+ -3892, -5620, -5620, -5620, -135, -5620, 2280, 4009, -2256, 277,
+ -679, -5620, -4077, 600, -4290, -4162, -5620, -3974, -5620, -333,
+ -1367, -1329, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 240,
+ 113, 604, -4395, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -4391, -4358, -26, -5620, -5127, -5620, 399, -5620, -4931, -5620,
+ -5620, -5620, -5620, -5620, -5620, -778, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5619, -5620, -5620, -611, -623, -5620, -513,
+ -3206, -5620, -3230, -4595, -501, -1396, -500, -499, -498, -5620,
+ -1563, 934, 3875, -5620, -5620, -5620, -5620, -1515, -1717, -5620,
+ 1445, -3832, -1393, 984, -1424, -3834, 1461, -612, -5401, -3221,
+ -1385, -5620, -1349, -5620, -5620, -3645, -3817, -5620, -680, -2297,
+ -3637, -522, -5620, -5620, -2097, -3720, -5620, 2996, -2410, -2421,
+ 2187, 1391, -5620, -5620, 922, -5620, -1752, 924, -5620, -5620,
+ -5620, 930, -5620, -772, -5620, -5620, -5620, -5620, -3812, -5620,
+ -2905, -3719, -5620, 5021, 5028, -3768, -732, -727, -5620, -5620,
+ -5620, -261, 1773, -5620, -3509, -514, -519, -518, -3668, -151,
+ -4993, -3696, -3705, -3394, 3021, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 55,
+ 69, 1273, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 681, -2629, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -4166, -3059, -5620, -5620, 331, -5437, -4259, -4264, -4105, 3679,
+ -5620, -5620, -5620, -5620, 4087, -3843, -4269, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 3250, 1432, -5620, -5620, 1825, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -300, 1831,
+ -5620, -5620, -5620, -5620, -5620, 2359, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -441, -5620, -5620, -5620, -5620, -5620,
+ -128, 3092, -5620, -5620, -5620, -5620, -28, -5620, -5620, -5620,
+ -5620, 1988, -5620, -5620, -5620, -5620, 2539, -5620, -5620, -5620,
+ -5620, -5620, -5620, 1576, -5620, 2210, -5620, -2883, -5620, -5620,
+ 1096, -615, -5620, -5620, -421, -5620, -5620, -5620, -5620, -5620,
+ 60, -5620, -5620, -5620, 5050, -1912, 16, -460, -5620, -5620,
+ 15, -5620, -5620, 4151, -485, 2039, -719, 4815, -5620, -5620,
+ -5620, -5620, -2954, 1912, -5620, 4209, -5620, -5620, 4392, 1396,
+ 4172, 1782, 686, 2004, -2034, -628, -3534, 999, -5620, 1641,
+ 896, 11402, -5620, -1911, -1984, -5620, -5620, -78, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 2105, 2109, -5620, -5620,
+ 3555, -5620, 2042, -3550, -5620, -5620, -826, -5620, -2940, -5620,
+ -5620, -5620, 2044, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, 1469, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3510, -1974, -5620,
+ -5620, 3652, -5620, 1564, -5620, 678, -5620, -5620, -1559, -5620,
+ -3244, -5620, -5620, -1966, -682, -5620, 3639, -5620, 3672, -1282,
+ -4496, -5620, -2084, -574, -5620, -345, -5620, -5620, -5620, -5620,
+ -5620, -3460, -677, -675, -5620, -5620, -5620, 3270, -5620, 4265,
+ -5620, -5620, -5620, -5620, -5620, -5620, 3274, -5620, -2516, -5620,
+ -2936, 4266, 4270, 4272, -5620, 4276, -5620, -5620, -2135, 161,
+ -5620, 488, -5620, -5620, -5620, -5620, -5620, 986, -5620, -340,
+ 594, -338, -4501, -1915, 859, -5620, -5620, -2251, 3291, 3698,
+ -1375, -5620, 2493, -5620, 3275, 1530, -5620, 1861, -5620, 865,
+ 870, -5620, -5620, 1539, -5620, -5620, -5620, -5620, 365, -209,
+ -5620, -5620, -5620, -38, 649, -2502, -5620, 373, -3678, 4267,
+ -42, -5620, 1856, -2331, -3632, -1223, 735, -1331, 1867, 355,
+ 4899, -224, -5620, -5620, 4239, -5620, -2240, -5620, -2205, -1947,
+ -1549, -3475, -3094, -4904, -5620, -2429, 1121, -5620, -5620, -5620,
+ -5620, 879, -5620, -5620, -5620, 2537, -5620, 5182, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -693, -1210,
+ -5620, -5620, 2365, -1663, -552, 5201, -418, -5620, -5620, -417,
+ -5620, -5620, 4996, -2416, -5620, -5620, 4406, 3072, 2335, -5620,
+ 1214, -5620, -5620, -5620, -5620, 1033, -5620, -5620, 95, -1053,
+ 709, 1858, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 650,
+ -5620, 1050, -2242, -5620, -5620, -5620, -5620, -416, -5620, -5620,
+ -5620, -5620, 1056, -5620, -560, -5620, -409, -5620, -5620, -5620,
+ 4830, -5620, -5620, -5620, -5620, -5620, -5620, -4352, -5620, -5620,
+ 3139, -1776, 4832, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ 2703, -5620, -5620, -5620, -5620, -5620, -5620, 3528, 5025, 5031,
+ -2003, -5620, -1073, 2710, 2050, -1125, -5620, -5620, -5620, 4283,
+ 5036, -5620, -5620, -252, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 2660, 81, -5620, -5620, -5620, -5620,
+ -5620, 388, -5620, -5620, -5620, -5620, 3428, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 3845, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, 1243, -538, -5620, 577, -582, -5620, 251, -5620, -5620,
+ -5620, -5620, -5620, -654, -5620, -5620, -660, -5620, -1429, 4742,
+ -1382, -5620, -2091, -3804, -5620, 1, -5620, -5620, -5620, 2714,
+ -5620, -5620, -5620, -5620, 2379, -2964, -5620, 415, -5620, -5620,
+ -3054, -965, -2030, -4307, 9922, -5620, -5620, 50, 4942, 3289,
+ -5620, -5620, 165, -488, -1274, -5620, -5620, 2331, -3, 2430,
+ -565, -755, -779, -1110, -5620, 4500, -5620, -5620, -5620, 21,
+ -637, -627, 213, 89, 59, 29, 6826, 9152, 23, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, 2097,
+ 2098, -5620, 5058, -5620, 3083, 2807, -5620, -5620, -5620, 2100,
+ -5620, -5620, -5620, 5065, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, 2106, 2116, 2118, -5620, -5620, 1581,
+ -2754, -5620, -5620, -2295, 150, -5620, 3115, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, 3432, -583, 4546, -581,
+ 3644, 5074, 4579, -5620, 3900, -5620, 3901, -5620, 1388, -5620,
+ -1263, 2175, -1740, -3416, -5620, -5620, 2566, 951, -5620, -5620,
+ -2951, -3233, -5620, 2022, 849, -5620, -5620, 212, -5620, -5620,
+ -5620, 1389, 403, 5051, 4456, -5620, -5620, -5620, -5620, 5272,
+ 2211, -5620, 1010, 5297, 5298, 5299, -27, -5620, -3663, -5620,
+ -4504, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -4939, -5620, -5620, -5620, 2498, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -73, 4821, -5620, -5620, -5620,
+ -5620, 1308, -3034, -5620, -683, -5620, -5620, -5620, -5620, -5620,
+ 3127, -5620, 1778, -5620, -5620, -178, -2304, -5620, -2571, -5620,
+ -4848, 27, -626, 4833, -5620, -5620, -5620, -5620, -5620, 4808,
+ -5620, -5620, 1123, -5620, -4146, -4142, -173, -4138, -401, -4553,
+ -5620, -3789, -5620, -5620, -5620, 1513, -5620, -5620, 2043, -5620,
+ -5620, -5620, -5620, 366, 369, 379, -5620, 374, -5620, -4699,
+ -5620, -5620, -5620, -5620, 370, -5620, -5620, -4197, -5620, -5620,
+ -4280, -5620, 343, -5620, -5620, -5620, -5620, -5620, -5620, -5620,
+ -5620, -5620, -5620, -5620, -5620, -5620, -2616, -5620, -5620, -5620,
+ 4011, -5620, 4945, -5620, -960, 4834, -5620, -5620, -5620, -5620,
+ -5620, -5620, 48, -5620, -5620, -5620, -2513, -5620
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ 0, 472, 759, 2333, 473, 474, 475, 476, 477, 2299,
+ 478, 1309, 3053, 1311, 2264, 3056, 479, 728, 480, 2473,
+ 3250, 3251, 4902, 4903, 4896, 4897, 4899, 4900, 3252, 842,
+ 843, 3095, 3096, 481, 3113, 4282, 3763, 2335, 5063, 3107,
+ 5352, 2340, 5066, 2341, 5067, 3105, 4296, 4785, 2347, 2348,
+ 768, 4283, 3851, 3852, 6010, 1370, 3759, 3860, 3861, 3120,
+ 4773, 4882, 5727, 4886, 5868, 6008, 5821, 3879, 5245, 5728,
+ 5729, 661, 1381, 2606, 5814, 2438, 5671, 5454, 5455, 3199,
+ 482, 835, 2461, 3886, 1488, 2462, 2463, 5136, 5137, 3918,
+ 3919, 5451, 5452, 4443, 4768, 5129, 4776, 3038, 967, 1783,
+ 3296, 3297, 2537, 856, 857, 2545, 858, 3321, 3259, 3988,
+ 3989, 4472, 859, 3960, 3961, 3962, 3325, 1179, 3963, 483,
+ 484, 682, 690, 683, 1176, 2911, 1177, 485, 486, 726,
+ 2289, 2290, 2291, 2292, 3725, 3073, 3719, 3720, 4701, 860,
+ 861, 968, 662, 969, 970, 971, 972, 2661, 973, 3403,
+ 4010, 974, 3398, 4008, 975, 976, 977, 946, 838, 3353,
+ 3406, 4011, 3354, 3990, 3407, 2656, 978, 979, 980, 981,
+ 982, 1928, 947, 2626, 3999, 4486, 983, 641, 839, 1490,
+ 2467, 840, 2468, 3889, 841, 2465, 1493, 4017, 2594, 900,
+ 1847, 984, 1185, 4018, 985, 2664, 2666, 2663, 4016, 4934,
+ 2665, 986, 672, 700, 660, 1845, 688, 5133, 5461, 4749,
+ 5120, 4750, 5418, 4669, 5115, 5116, 5117, 5525, 3704, 490,
+ 675, 1161, 2118, 2903, 4162, 3580, 3582, 2904, 4161, 4609,
+ 4610, 4611, 3578, 3579, 5600, 3584, 4159, 5762, 6139, 5890,
+ 5891, 4151, 5895, 4618, 5009, 5010, 5011, 5321, 5602, 5768,
+ 6028, 5896, 6146, 6026, 6142, 6027, 6144, 6278, 6227, 6228,
+ 6038, 6157, 6158, 6232, 6279, 5906, 5907, 5908, 6324, 6325,
+ 5909, 4155, 4156, 5597, 5005, 5651, 3750, 3751, 2433, 5499,
+ 1320, 491, 4751, 4866, 4752, 4753, 5388, 6046, 5966, 4755,
+ 4756, 4757, 6235, 2193, 5414, 5400, 4783, 5542, 4758, 5071,
+ 5072, 5073, 5074, 5932, 6077, 5934, 5935, 6070, 6179, 6069,
+ 5075, 5076, 5360, 5798, 5368, 5205, 5077, 5078, 5079, 5375,
+ 5642, 5800, 5796, 5943, 5944, 6298, 6299, 5959, 6259, 5960,
+ 6305, 6338, 6339, 5945, 492, 674, 2067, 6093, 6094, 6095,
+ 1785, 5643, 1786, 1787, 1788, 2509, 1789, 1790, 1791, 1792,
+ 1793, 1794, 1795, 1796, 1797, 1798, 3312, 2496, 2497, 3272,
+ 3273, 2487, 2488, 4512, 2489, 4513, 2555, 5961, 5962, 3265,
+ 2493, 6192, 2494, 3286, 6105, 5946, 5963, 5948, 2513, 2143,
+ 2144, 3798, 2158, 2159, 3629, 3630, 2436, 2514, 3280, 2515,
+ 3315, 4577, 5304, 4583, 4584, 4585, 4113, 4114, 4115, 4116,
+ 4117, 3538, 5949, 5635, 5930, 6072, 6075, 6186, 6290, 5369,
+ 5080, 5373, 1278, 5081, 5082, 6047, 6059, 6063, 6048, 6064,
+ 6060, 5792, 3754, 6049, 6050, 6051, 6066, 6062, 4273, 6052,
+ 5619, 5919, 5620, 5356, 3288, 493, 630, 4393, 1457, 3185,
+ 1459, 1469, 3883, 3211, 3210, 1472, 1471, 3203, 4363, 4837,
+ 5182, 4392, 3880, 4397, 5551, 804, 4868, 5858, 5702, 5866,
+ 5704, 4869, 5049, 4870, 5843, 5992, 4871, 5723, 5864, 6004,
+ 5050, 5051, 4872, 4873, 4874, 6164, 6165, 6166, 5191, 2237,
+ 818, 819, 1477, 1478, 1479, 3348, 5546, 5217, 494, 3745,
+ 3089, 495, 1337, 1338, 1339, 2311, 2312, 3092, 3093, 4263,
+ 4709, 496, 1304, 3049, 2301, 3081, 497, 1323, 3736, 3737,
+ 3738, 4257, 498, 1485, 2457, 2458, 3215, 4404, 4894, 5250,
+ 5559, 5735, 5555, 5875, 5876, 499, 846, 1496, 500, 643,
+ 2482, 2483, 2484, 3254, 501, 1939, 638, 502, 2127, 2124,
+ 2917, 2918, 503, 1303, 2251, 2252, 2253, 2254, 3700, 504,
+ 2634, 3371, 3372, 3373, 3374, 3044, 4232, 3045, 3046, 3709,
+ 4492, 505, 782, 1449, 506, 781, 1448, 507, 508, 699,
+ 754, 692, 2134, 510, 511, 4670, 2707, 513, 788, 786,
+ 1121, 515, 1441, 1437, 516, 2708, 1122, 778, 779, 1389,
+ 1205, 3783, 3784, 2573, 2574, 3153, 3140, 1206, 1207, 1418,
+ 2410, 3170, 2929, 2930, 2233, 2931, 4174, 4628, 6256, 1968,
+ 1857, 1307, 1124, 1125, 1126, 2078, 2079, 2094, 1127, 2088,
+ 2854, 4556, 4976, 4977, 4978, 4979, 2793, 2794, 2898, 1128,
+ 2783, 2784, 2785, 1129, 1130, 1131, 1132, 1133, 1134, 1135,
+ 2776, 2777, 2778, 1136, 1137, 1138, 2893, 4538, 4539, 4958,
+ 3573, 3574, 3575, 1139, 3435, 4522, 3446, 3447, 2736, 1140,
+ 1141, 1142, 1143, 1144, 4137, 1145, 4599, 4329, 1146, 1940,
+ 2671, 2734, 4946, 4527, 5277, 4948, 4949, 5281, 2676, 3423,
+ 4046, 4047, 4048, 2797, 2798, 1988, 1989, 1957, 1958, 1390,
+ 5145, 6348, 1391, 5473, 5827, 5828, 5984, 6211, 6123, 6124,
+ 6313, 6314, 6315, 6316, 1392, 3126, 4786, 1393, 1394, 1395,
+ 4313, 4314, 5146, 4790, 5148, 4794, 2371, 2372, 2375, 2376,
+ 1396, 1397, 1398, 1399, 2359, 1400, 1401, 1402, 3145, 5681,
+ 5154, 5155, 5837, 5836, 5156, 4799, 4800, 4317, 4318, 4680,
+ 4681, 4682, 3794, 2730, 2731, 2805, 2639, 2640, 2641, 2677,
+ 1410, 2386, 3161, 3804, 2388, 3802, 4324, 3806, 4330, 4331,
+ 2885, 3563, 4133, 3565, 4997, 5311, 5312, 5592, 5750, 5751,
+ 5756, 4877, 5522, 5523, 3336, 1419, 3178, 3821, 4327, 2195,
+ 2196, 1421, 2392, 3165, 3810, 2197, 2399, 2400, 3815, 3979,
+ 1422, 1423, 1435, 1440, 1426, 1424, 3326, 4833, 3327, 4118,
+ 4101, 5055, 5427, 2700, 2701, 5381, 4434, 1427, 3181, 4341,
+ 4342, 4343, 1406, 1407, 2381, 2382, 2383, 1428, 1408, 3154,
+ 4320, 517, 721, 518, 2590, 887, 1842, 2589, 3716, 1498,
+ 4226, 2568, 2569, 1832, 812, 659, 519, 663, 4487, 520,
+ 703, 4225, 948, 3200, 1885, 2245, 1886, 3037, 3694, 3695,
+ 4671, 5043, 4672, 5036, 5037, 4673, 1291, 5336, 5337, 1455,
+ 4359, 4360, 4354, 3031, 3688, 1292, 2238, 4219, 3028, 4220,
+ 3029, 3058, 4221, 5270, 5742, 6137, 3025, 521, 697, 4658,
+ 5769, 4213, 4214, 6219, 6220, 1289, 522, 646, 2567, 883,
+ 1821, 1824, 1825, 2577, 4918, 3332, 5260, 4467, 4917, 1826,
+ 1827, 3334, 884, 885, 523, 742, 3746, 1343, 2217, 2218,
+ 2219, 3012, 524, 694, 1279, 4208, 4655, 2998, 678, 5911,
+ 2200, 1282, 2201, 2994, 3670, 2181, 525, 1446, 1444, 833,
+ 526, 527, 794, 639, 2415, 528, 529, 1312, 2282, 3070,
+ 4239, 4240, 4685, 2283, 2284, 3717, 530, 707, 1297, 3713,
+ 5056, 5057, 5347, 531, 733, 1327, 1328, 2305, 2303, 3741,
+ 3084, 532, 2905, 533, 664, 951, 1889, 1890, 2632, 534,
+ 736, 1332, 535, 536, 953, 4493, 6017, 6222, 668, 2636,
+ 1894, 5419, 4802, 5161, 5162, 5164, 5489, 5490, 6275, 6369,
+ 6383, 6376, 6386, 6387, 6390, 6396, 6397, 1147, 1350, 1351,
+ 1148, 6098, 1149, 1150, 1151, 2709, 1295, 702, 2241, 2242,
+ 5331, 5607, 3035, 3691, 2623, 2624, 2243, 5038, 5039, 3602,
+ 3803, 1152, 4215, 5357, 1499, 2570, 1315, 609, 1153, 610,
+ 1154, 1155, 814, 1352, 2378, 3381, 1228, 3615, 1156, 4019,
+ 1465, 2125, 2446, 2447, 3382, 612, 3616, 1229, 1800, 613,
+ 614, 615, 616, 617, 618, 619, 544, 545, 620, 1807,
+ 547, 693, 1237, 2155, 2163, 2948, 2153, 2960, 3650, 2962,
+ 2963, 3655, 2964, 1285, 2935, 2154, 3639, 4641, 4640, 2961,
+ 4200, 5026, 5025, 2965, 2956, 4196, 4182, 3625, 4635, 5325,
+ 5324, 2943, 2942, 2941, 2951, 2952, 2953, 2954, 4193, 3635,
+ 2426, 548, 954, 2645, 671, 1896, 1897, 3395, 549, 696,
+ 550, 727, 1317, 3077, 3729, 3730, 4252, 4703, 4253, 551,
+ 1190, 1191, 552, 937, 3757, 3357, 2584, 1468, 939, 2585,
+ 2607, 941, 1849, 942, 943, 944, 945, 4382, 3872, 3873,
+ 3362, 2587, 2448, 2925, 3865, 4823, 2449, 4376, 4377, 4824,
+ 3208, 5568, 4389, 3876, 5267, 4477, 5569, 5570, 553, 708,
+ 554, 5456, 720, 1306, 2261, 555, 556, 557, 558, 787,
+ 1431, 1208, 631, 632, 633, 634, 822, 823, 3882, 4399,
+ 4889, 4890, 5553, 6379, 6380, 3119, 4294, 5978, 6308, 6373,
+ 6392, 5466, 5467, 559, 1357, 1353, 753, 2331, 2325, 2327,
+ 3103, 3749, 560, 561, 562, 4769, 563, 1925, 2660, 4015,
+ 4933, 3366, 2469, 1808, 621, 1908, 870, 4267, 902, 3298,
+ 1294, 3032, 2592, 987, 988, 5664, 3303, 4445, 2470, 2471,
+ 5445, 871, 872, 565, 566, 1450, 3183, 3184, 989, 990,
+ 4231, 4676, 4677, 5046, 4777, 4778, 4771, 5816, 6262, 4764,
+ 2248, 5818, 5819, 6112, 6307, 4290, 4291, 4292, 3765, 3766,
+ 5811, 5439, 5440, 5441, 5660, 5448, 5975, 5446, 5974, 5442,
+ 5808, 6107, 5806, 6106, 5443, 5126, 5127, 5444, 873, 3921,
+ 3922, 3923, 5672, 5823, 3768, 4293, 5457, 567, 568, 3117,
+ 4299, 4297, 4286, 4761, 5656, 5973, 874, 875, 1816, 876,
+ 877, 2562, 878, 2485, 991, 992, 569, 993, 2668, 2667,
+ 4022, 713, 994, 1301, 645, 1815, 2249, 3697
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule whose
+ number is the opposite. If YYTABLE_NINF, syntax error. */
+static const yytype_int16 yytable[] =
+{
+ 611, 537, 673, 821, 711, 640, 1784, 1923, 864, 712,
+ 1240, 755, 2880, 1226, 1277, 514, 512, 2416, 865, 2760,
+ 2699, 539, 3059, 546, 827, 3100, 3202, 564, 2830, 543,
+ 1467, 2913, 2401, 684, 903, 2401, 2389, 684, 806, 1308,
+ 487, 810, 684, 3076, 488, 698, 3328, 489, 570, 3329,
+ 538, 3415, 2579, 2223, 1466, 3367, 1231, 1388, 2510, 542,
+ 509, 2706, 2500, 816, 3935, 2771, 1232, 2740, 4175, 3099,
+ 3692, 3217, 2126, 3337, 3180, 1184, 2814, 817, 938, 1990,
+ 940, 2554, 1364, 691, 1365, 4274, 2405, 1367, 1368, 541,
+ 2434, 3281, 3942, 2490, 2833, 886, 936, 889, 890, 891,
+ 892, 893, 894, 895, 2354, 896, 897, 4430, 938, 4344,
+ 1192, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2873, 2875,
+ 2876, 2877, 2878, 2879, 3822, 2492, 936, 3281, 2435, 4876,
+ 2191, 2379, 2519, 2320, 4875, 1183, 2601, 837, 3313, 1334,
+ 1818, 3708, 1341, 4470, 4338, 2982, 2983, 4770, 2912, 1302,
+ 724, 4217, 2224, 3024, 1497, 3416, 2498, 4784, 3758, 4905,
+ 4319, 3705, 723, 1318, 5130, 2145, 4797, 2148, 2149, 2845,
+ 4020, 4021, 3072, 1809, 3405, 2162, 3187, 2853, 2855, 4334,
+ 2858, 2859, 4500, 2989, 2498, 3786, 3888, 1951, 687, 3636,
+ 4051, 1344, 1345, 4345, 4207, 3718, 1293, 2913, 3785, 3785,
+ 4045, 5469, 3648, 3005, 4045, 2225, 4760, 4511, 5122, 4516,
+ 5241, 4511, 3790, 540, -2617, -2617, 3282, 5428, 828, 1802,
+ 4401, 829, 830, 831, 1923, 1500, 2516, 3018, 3019, 1803,
+ 832, 4867, 4708, -3650, 3149, 2501, 2518, -372, -2503, 864,
+ 4667, 3310, 4321, 4322, -3646, 2517, 3322, 718, 716, 865,
+ -2617, 3069, 4892, 2528, 2498, 3346, 800, 2534, -2797, -2797,
+ 1484, -486, -486, 4762, -3643, -3648, -1020, -1020, -3644, -2504,
+ 3409, 2546, 2512, 2512, 795, 2459, 5447, -1870, -1870, -3647,
+ -3645, 4908, 3322, 2512, 5601, 737, -384, -384, 2063, 2065,
+ 2066, 3253, 3862, -3378, -3378, 5150, 5563, -3379, -3379, 2182,
+ 665, 2108, 1438, 2073, 1834, 1835, 1836, 1837, 4754, 4754,
+ -2100, 2074, 731, 1863, 2912, 740, 732, 800, 1453, 5044,
+ 2075, 1453, 2523, 3392, 2637, 2073, 2427, 4666, 4667, 3547,
+ 1840, 2522, 1489, 2074, 6145, 4526, 1833, 2524, 3322, 2031,
+ 2521, 2526, 2075, 4153, 5557, 3535, 1843, 1844, 2049, 2053,
+ 3322, 2535, 4579, 2538, 2539, 2540, 2541, 4373, 2542, 2430,
+ 5913, 5624, 5625, 735, 4303, 3632, 4763, 1453, 2525, 2548,
+ 2549, 2550, 2551, 2552, 3417, 2498, 3972, 3393, 2512, 2498,
+ 4762, -2652, 3431, 4849, 2529, 715, 820, 5249, 2329, 3206,
+ 3785, 42, 5614, 2498, 2678, 2679, 2073, 3322, 4930, 3356,
+ 4579, -2614, -2614, 2689, 2074, 4580, 715, 3277, 3548, 4264,
+ -3378, 2187, 5083, 2075, -3379, 2512, 3322, 4288, 3322, 4754,
+ 2692, 2693, 2694, 4415, 2695, 3094, 2696, 4190, 2697, 3825,
+ 3826, 1453, 3347, 2750, 3322, 2753, 3576, -2614, 3396, 2073,
+ 2547, 3163, 49, 4362, 5188, 4204, -2668, 2074, 5189, 2575,
+ 2766, 2767, 2769, 4580, 3322, -3378, 2075, 2772, 2773, -3379,
+ 2692, 2693, 2694, 5119, 2695, 2789, 2696, 1927, 2697, 2692,
+ 2693, 2694, 783, 2695, 3322, 2696, 4356, 2697, 2076, 1412,
+ 1373, 5190, 42, 4763, 3322, 2073, 756, 680, 4402, 5379,
+ 2073, 5382, 4003, 2074, 1475, 2073, 2073, 3549, 2074, 3752,
+ 2076, 879, 2075, 2074, 2074, 784, 1210, 2075, 4255, 4256,
+ 3684, 3047, 2075, 2075, 4642, 5799, 2147, -2669, 5433, 5179,
+ 4098, 1453, 1882, 797, 1414, -1945, 2073, 5384, 6257, 2430,
+ 4431, -2670, 2073, 49, 2074, -3456, 880, 1210, 2073, 3188,
+ 2074, 3863, 51, 2075, 4352, 1872, 2074, 5386, 2073, 2075,
+ 2119, -2797, 514, 799, 2095, 2075, 2074, 5404, 3808, 1453,
+ 6104, 1210, 6210, 666, 1439, 2075, 5083, 5128, 4779, 1882,
+ 42, 2076, 869, 5180, 4668, 1453, 5990, 1453, 2073, -3439,
+ 1305, -3443, 4830, 4931, 5447, 2077, 2074, 2682, 2073, -2497,
+ 3483, 1887, 635, 2073, 1453, 2075, 2074, 509, 3109, -3378,
+ 2073, 2074, 5721, -3379, 1461, 2075, 635, 2077, 2074, 1404,
+ 2075, 2256, 4835, 4607, 2076, -3442, 4298, 2075, 5848, 805,
+ 807, 49, 6171, 807, 3592, 815, 6173, 4780, -3440, 5780,
+ 51, 5463, 3193, 4774, 2095, 2073, 6330, 5809, 4821, 4358,
+ 537, 2234, 4388, 2074, 2137, 785, 2431, 2098, 1335, -3441,
+ 5544, 729, 2075, 2146, 514, 512, 936, 755, 815, 2114,
+ 2076, 2160, 5131, 2096, 2097, 2076, 863, 1388, 868, 743,
+ 2076, 2076, 5793, 2220, 543, 2222, 4511, 3048, 2077, 4614,
+ 1413, 539, 1181, 546, 642, -3446, 6340, 2336, 815, 543,
+ 2339, 2123, 2194, 2235, 2342, 2343, 2345, 2346, 4432, 509,
+ 5211, 2076, 1873, 1298, 542, 4867, 4781, 2076, 669, 3570,
+ 709, 815, 5810, 2076, 1230, 4448, 1236, 3571, 2445, 542,
+ 6361, 2077, 1235, 2076, 1316, 815, 1415, 2098, 1182, 730,
+ 1336, 2586, 2099, 4836, 867, 5193, 5376, 5195, 6331, 1420,
+ 5207, 5212, 5659, 1227, 1420, 1379, 1420, 744, 676, 541,
+ 4287, 3433, 1234, 2076, 5225, 4625, 4626, 1363, 1883, 4205,
+ 2598, 734, 1460, 2076, 5991, 3677, 5849, 2077, 2076, 5545,
+ 5850, 1462, 2077, 797, 42, 2076, 2506, 2077, 2077, 4754,
+ 5644, 2188, 1233, 2120, 2683, 3685, 3307, 6258, 826, 1463,
+ 1443, -1945, 2846, 847, 1447, 4861, 3536, 1483, 1451, 1452,
+ 6104, 1254, 1436, 2474, 6282, 1883, 815, 844, 2077, 899,
+ 2076, 1888, 2099, 704, 2077, 5736, 2431, 1329, 1884, 4403,
+ 2077, 1405, 815, 995, 3809, 49, 4302, 4191, 5420, 827,
+ 2077, 1486, 1254, 3706, 51, 3811, 5433, 3577, 3756, 3179,
+ 3785, 4357, 2385, 1874, 797, 2481, 1287, 6404, 3707, 5453,
+ 4476, 4308, 2221, 4643, 4192, 4312, 1254, 1374, 866, 1473,
+ 2077, -3565, 6127, 3432, -3378, 2262, 710, 3207, -3379, 2330,
+ 2077, 2847, 539, 540, 546, 2077, 4362, 1801, 3739, 1806,
+ 543, 1828, 2077, 1830, 4822, 4188, 807, 807, 807, 807,
+ 1838, 4457, 815, 4754, 3101, 1321, 2454, 863, 3365, 868,
+ 3394, 637, 3796, 844, 5668, 543, 844, 738, 669, 2486,
+ 542, 2262, 3633, 667, 3877, 637, 471, 2077, 5572, 4374,
+ 3541, 3542, 2450, 3753, 2183, 4621, 755, 3634, 5083, 3207,
+ 5450, 6141, 1476, 1417, 705, 542, 1839, 741, 1841, 3550,
+ 541, 4265, 4288, 5132, 4581, 1805, 2481, 5173, 5232, 3555,
+ 3556, 797, 3559, 3560, 1914, 739, 1438, 5968, 5659, 5970,
+ 2848, 1918, 6132, 1921, 3813, 867, 5675, 1864, 4876, 3864,
+ 2481, 537, 882, 4875, 5678, 5213, 5679, 1929, 1907, 1907,
+ 5181, 1907, 1907, 1907, 4893, 514, 512, -2617, 1907, 3323,
+ 2166, 539, 4581, 546, -2617, -2617, 5661, 564, 5822, 543,
+ 3916, 801, -2509, 3952, 3953, -3650, 2704, 471, 4323, -372,
+ 2401, 3788, 3789, 3678, 1906, 1906, -3646, 1906, 1906, 1906,
+ 538, 2923, 1990, 828, 1906, 3323, 829, 830, 831, 542,
+ 509, 2232, 5350, -2510, 2638, 832, -3643, -3648, -2797, 1454,
+ -3644, -486, 1454, 5421, 1905, 1905, -1020, 1905, 1905, 1905,
+ 3445, -3647, -3645, 4909, 1905, 3986, 5083, -1870, 2986, 541,
+ 2988, 3166, 2659, 2992, 540, 2434, -384, 2980, 5564, 1804,
+ 4867, 4014, 5214, -3378, 3537, 3000, 5558, -3379, 3003, 3135,
+ 3915, 3323, 3006, 6187, 2936, 6189, 6190, 2032, 1454, 866,
+ 3150, 3289, -115, 3323, -115, 471, 2050, 2054, 3289, 2946,
+ 5805, 5807, -2652, 2435, -119, 3264, -119, 3267, 3021, 3022,
+ 3023, 1299, 2050, 5663, -3456, 3279, 2071, 4582, 2070, 4490,
+ 3278, 2445, 5141, 2063, 2065, 5165, -2652, 5033, 5168, 5428,
+ 5428, 670, 2068, 1361, 4049, 5294, 4050, 4511, 3290, 5296,
+ 3323, 4511, 3304, 5188, 4754, 3305, 4754, 5189, 3545, 2588,
+ 3295, -111, 1454, -111, 3316, 3017, 4834, 2914, -3439, 3323,
+ -3443, 3323, 2512, 2481, 4782, 2508, 3317, -2668, 1904, 1904,
+ 2095, 1904, 1904, 1904, -2614, 5169, 2698, 3323, 1904, 815,
+ 5190, -2614, -2614, 540, 6244, 6245, 3453, 3934, 3454, 2512,
+ 3462, -2668, 2512, 3465, -3442, 6251, 5699, 3323, 5701, 2096,
+ 2097, 2512, 5951, 5706, 2073, 2073, 815, -3440, 5014, 3477,
+ 5711, 5712, 2074, 2074, -2163, 815, 2770, 3323, 815, 677,
+ 5718, 2075, 2075, 815, 2419, 6296, 5083, 3323, -3441, 3496,
+ 2899, 2637, 2073, -2100, 3434, -2100, 2095, 3455, -2669, 3456,
+ 2074, 2297, 1454, 3524, 3484, 3525, 2669, 1453, 2582, 2075,
+ 669, 2073, -2670, 6285, 815, 3980, 938, 3308, 4754, 2074,
+ 4099, 3323, -2669, 2098, -3446, 2096, 2097, 6264, 2075, 4803,
+ 5980, 3256, 5407, 3464, 936, 5171, -2670, 2502, 2686, 4125,
+ 1454, 4126, 4100, 4806, 2882, 4532, 5737, 4533, 4, 5,
+ 2900, 1210, 2244, 2504, 797, 4593, 1454, 4594, 1454, 471,
+ 797, 797, 709, -2163, 2161, 2095, 3344, 3472, 2102, 2103,
+ 2104, 2105, 2106, 2107, 4980, 1454, 2491, 2298, 3207, 5730,
+ 2945, -1870, 3651, 2914, 706, 3867, 2308, 2838, 4045, 2098,
+ 2073, 670, 4119, 2184, 2096, 2097, 669, 3439, 2074, 4178,
+ 797, 2321, 3440, -1830, 3363, 3733, 5708, 2075, 2099, 3449,
+ 2073, 4787, 4788, 2924, 2808, 669, 2352, 2202, 2074, 4381,
+ -3266, 2334, 686, 5374, 3718, 3785, 3785, 2075, 2073, 4,
+ 5, 2857, 4895, 4791, 4792, 2672, 2074, 1466, 4390, 2076,
+ 2076, 3269, 3469, 797, 2361, 2075, 5817, 2070, 2102, 2103,
+ 2104, 2105, 2106, 2107, 5083, 2642, 2984, 6363, 2098, 2259,
+ 5855, 2068, 2849, 3270, 2384, 2647, 1420, 2076, 2949, 2337,
+ 2338, 6310, 2990, 5845, 2099, 2653, 2637, 2073, 879, 709,
+ 4, 5, 2408, 949, 1831, 3004, 2076, 1934, 4636, 4206,
+ 2530, 5068, 2314, 5574, 2075, 5207, -1870, 844, 3266, 844,
+ 2189, 4394, 4645, 2417, 2418, 537, 4648, 4237, 3642, 1466,
+ 3868, 5215, 5863, 880, 2228, 6129, 1436, 2439, 710, 514,
+ 512, -3276, 2286, 2073, 4236, 5846, 644, 5151, 797, 4234,
+ 815, 2074, 4163, 2302, 3866, 4067, -1870, 2362, 807, 797,
+ 2075, 1240, 797, 2099, 1226, 6116, 2077, 2077, 3585, 2969,
+ 5317, 4259, 635, 797, 5845, 3187, 4405, 2913, -1830, 2073,
+ 5886, 772, 6168, 6205, 509, 2076, 2390, 2074, -714, 6286,
+ 2322, 3734, 1456, 6311, 2077, 3281, 2075, 3281, 1388, 4358,
+ 3370, 755, 2257, 2095, 2139, 2076, 4451, 1231, 4453, 5779,
+ 4922, 4923, 3405, 2077, 5824, 5989, 5825, 1232, 5491, 2995,
+ 3452, -1870, 4268, 2076, 2881, 5845, 5846, 5123, 1892, 701,
+ -3678, 5291, 2096, 2097, 6002, 2073, 938, 5865, 2937, 1865,
+ 2073, 2506, 5408, 2074, 5409, 3982, 2901, 4954, 2074, 2643,
+ 3174, 5431, 2075, 3867, 936, 710, -1259, 2075, 5739, 2507,
+ -3679, 5996, 2996, 2445, 2971, 2972, 1254, 2974, 2976, 2977,
+ 2978, 2642, -715, 4152, 2572, -1870, 1951, 5846, 5410, 2987,
+ 5576, 4138, 4141, 4144, 4145, 2644, 4003, 2315, 5731, 3082,
+ 3027, 2491, 2077, 2391, 2912, 3992, 2098, 3002, -3675, 5389,
+ -3266, 2429, 5152, 3643, 2920, 4497, 4930, 950, 5411, 5402,
+ 5403, 2098, 2077, 3735, 4238, 5595, 4157, -1870, 2076, 2706,
+ 4391, 4124, 1388, 4127, 824, 2185, 4131, 4132, 5632, 6041,
+ 2077, 3870, 4368, 1388, 1388, 6042, -3673, 6306, 4206, -1830,
+ 4537, 3111, 3112, 3598, 3599, 3115, 2531, 2140, 2950, 2203,
+ 3122, 3123, 3124, 670, 2076, 2073, 4212, 2073, -3471, 3066,
+ 5976, 1935, 6271, 2074, 2229, 2074, 6287, 4409, 4469, 4411,
+ 4412, 5273, 2075, 2190, 2075, 4417, 3554, -2163, 3868, 2077,
+ 6288, 2099, 3333, 4425, 2486, 4395, 3085, 4433, 2985, 4436,
+ 6248, 4674, 845, 6364, -3676, 6058, 2099, 2997, 6270, 3118,
+ 3121, -3276, 3071, 3346, 2991, 849, 850, 2258, 2260, 2073,
+ 2076, 4955, 898, -3674, 2073, 2076, 6042, 2074, 2434, 2095,
+ 2073, 2073, 2074, 2560, 6312, 2077, 2075, 4846, 2074, 2074,
+ 881, 2075, 3271, 5732, 938, 636, 3189, 2075, 2075, 670,
+ 3116, 5412, 1893, 3104, 2902, 2643, 6043, 5887, 2096, 2097,
+ 3869, 2073, 936, 6309, 3110, 3175, 2435, 1866, 670, 2074,
+ 2230, 2077, 3460, 5153, 5124, 1383, -2163, 6042, 2075, 3674,
+ 2401, 3981, 2401, 2401, 5910, 5413, 2231, -3678, 2300, 4304,
+ 3586, 637, 5318, -3471, 4270, 3589, 3590, 2502, 5432, 2557,
+ 2295, 4931, 1412, 4130, 6347, 3155, 1413, 797, 2434, 2571,
+ 5358, 1210, 5942, 2504, 1818, 5581, 5942, -3679, 4770, 2581,
+ 807, 3631, 2098, 6111, 3191, 1813, 815, 2077, 815, 797,
+ 5883, 3814, 2077, 3817, 3818, 3777, 5715, 6043, 6131, 709,
+ 2076, 3778, 2076, 2073, 6133, 685, 2435, 1414, 3223, 1867,
+ 3664, 2074, 1415, 689, 3665, -3675, 3667, 815, 695, 5857,
+ 2075, 2073, 5705, 815, 3192, 2073, 3201, 2642, 715, 2074,
+ 3672, 5020, 5458, 2074, 1930, 3627, 5023, 5024, 2075, 882,
+ 5278, 4461, 2075, 3680, 3681, 1416, 3349, 3350, 6043, 3870,
+ 3347, 6238, 3647, -3673, 2076, 6249, 3652, 6239, 2649, 2076,
+ 3299, 3193, 4851, 3367, 4206, 2076, 2076, 2099, 4271, 1964,
+ 1965, 1966, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
+ 5358, 5459, 5888, 5910, 1931, 5192, 797, 815, 4880, 2881,
+ 5206, 2638, 5778, 4463, 5313, 5216, 2076, 4818, 2146, 4427,
+ 2508, 5498, 2296, 3450, 3451, 2073, 3391, 2077, 2073, 2077,
+ 3871, -3676, 3221, 2074, 2013, 4660, 2074, 2475, 1454, 2018,
+ 5942, 6204, 2075, -2100, -2100, 2075, 4661, 5636, 3351, 5947,
+ -3674, 3457, 2070, 5754, 2475, 3733, 4935, 5942, 514, 2101,
+ 2102, 2103, 2104, 2105, 2106, 2107, 2068, 2932, 1932, -1259,
+ 3467, 5513, 3384, 2459, -3471, 710, 2850, 2073, 4807, 2073,
+ 6289, 2077, 3385, 6045, 2179, 2074, 2077, 2074, 6198, 2073,
+ 2801, 2802, 2077, 2077, 2075, 6020, 2075, 2074, 2076, 3194,
+ 864, 2073, 717, 4881, 797, 2933, 2075, 903, 797, 2074,
+ 865, 3195, 783, 2179, 797, 5110, 2076, 5359, 2075, 2894,
+ 2076, 2643, 1184, 2077, 3706, 2831, 5938, 2100, 2101, 2102,
+ 2103, 2104, 2105, 2106, 2107, 3300, 2073, 5882, 6143, 3707,
+ 1933, 6147, 5916, 6044, 2074, 784, 5889, 5460, 3696, 3468,
+ 2073, 2895, 1814, 2075, 3281, 514, 2839, 2481, 2074, 3281,
+ 3167, 2506, 853, 854, 6045, 4937, 3281, 2075, 4272, 3473,
+ 4939, 1429, 4004, 1380, 5157, 5158, 815, 4940, 2886, 2507,
+ 4100, 4100, 6302, 4428, 4100, 4100, 1254, 3474, -1870, 719,
+ 4100, 4100, 3301, 5931, 797, 5933, 2638, 6083, 815, 815,
+ 2076, 5942, 1831, 2076, 5999, 2077, 815, 2938, 5507, 6021,
+ 4762, 3196, 6182, 3558, 3399, 6045, 2073, 4832, 6092, 5939,
+ 3404, 3734, 6381, 2077, 2074, 2896, 3543, 2077, 2955, 2180,
+ 1430, 5763, 1293, 2075, 5532, 5111, 807, 807, 797, 807,
+ 807, 807, 807, 797, 815, 797, 5372, 5372, 4827, 4828,
+ 4829, 807, 2076, 6377, 2076, 1230, 3168, 1236, 2180, 3853,
+ 2934, 6115, 5159, 1235, 2076, 5885, 888, 5364, 3001, 807,
+ 4462, 815, 4898, 4901, 2476, 4904, 2076, 2532, 6303, 5309,
+ 2533, 3197, 3482, 5916, 1227, 785, 4429, 4592, -904, 4595,
+ -904, 2476, 797, 1234, 2080, 2081, 2082, 5942, 2083, -221,
+ -2347, 5310, 3266, 6382, 797, 3985, 2897, 2077, 6053, 5788,
+ 2077, 2076, 2073, 4763, 5794, 5795, 2430, 5479, 3494, 5480,
+ 2074, 5365, 3624, 1233, 3822, 2076, 4481, 4482, 5940, 2075,
+ 6071, 5673, 6304, 1923, 3169, 3572, 1417, 2364, 6276, 5160,
+ 6183, 5326, 5327, 3735, 811, 2100, 2101, 2102, 2103, 2104,
+ 2105, 2106, 2107, 5615, 815, 2906, 6193, 6194, 2477, 2077,
+ 2478, 2077, 777, 5185, 2104, 2105, 2106, 2107, 3618, 797,
+ 2344, 2077, 3470, 4211, 3087, 2477, 2073, 2478, 3619, 3499,
+ 5567, 6213, 4665, 2077, 2074, -2347, 2554, 6202, 6203, 2481,
+ 2861, 2076, 5397, 2075, 2803, 815, 6378, 2804, 2452, 2073,
+ 4348, 5928, 3106, 2365, 815, 815, 815, 2074, 5757, 938,
+ 797, 3595, 807, 2602, 2366, 2084, 2075, 6184, 2077, 725,
+ 5366, 2073, 2367, -72, 4254, 2603, 2675, 936, 797, 2074,
+ 2440, 4433, 2077, -342, 1425, 5764, 5765, 5398, 2075, 797,
+ 797, -2347, 3007, 6160, 2881, 2073, 6163, 815, 1319, 2368,
+ 2479, 2073, 4993, 2074, 2434, 3659, 5197, 6326, 3732, 2074,
+ 3660, 1923, 2075, 5926, 2073, 5376, 755, 2479, 2075, 3663,
+ 757, 6241, 2074, 6097, 2453, 3666, 4349, 2198, 1388, 6214,
+ 2604, 2075, 6061, 6065, 1388, 2688, 2862, 2076, 5367, 3689,
+ 2675, 5034, 2435, 2073, 3500, 2675, 3503, 1324, 2077, 1388,
+ 2199, 2074, 2863, 6356, 2401, 2369, 5399, 6291, 815, 3769,
+ 2075, 2073, 3770, 844, 4206, 6097, 3775, 797, 2675, 2074,
+ 5198, 2073, 2445, 797, 2480, 3090, 5199, 3216, 2075, 2074,
+ 2675, 3136, 5372, 2370, 3302, 5766, 3714, 3137, 2075, 3138,
+ 844, 2480, 3302, 5247, 3797, 3698, 3471, 5170, 797, 2749,
+ 2508, 2076, 6292, 3504, 2752, 3814, 2586, 4325, 758, 3520,
+ 3523, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 3722,
+ 3723, 815, 5264, 2864, 2076, 4307, 2073, 2768, 4452, 4311,
+ 815, 3091, 1325, -904, 2074, 4440, 4181, 4506, 4441, 2788,
+ 3530, 5745, 802, 2075, 2077, 6335, 2076, 3337, 2073, 5845,
+ 3764, 760, 3767, 2431, 808, 776, 2074, 5767, 3772, 3774,
+ 4326, 3309, 3139, 5272, 15, 2075, 2073, 6371, 6372, 6284,
+ 2076, 6061, 809, 3281, 2074, 6065, 2076, 539, 4111, 546,
+ 6357, 777, 4179, 2075, 5297, 543, 2073, 5506, 1326, 2076,
+ 5604, 5605, 4112, 1828, 2074, 3341, 3724, 3854, 4183, 4442,
+ 3343, 5846, 714, 2075, 4186, 4187, 797, 797, 2077, 6329,
+ 6370, 2385, 2605, 24, 869, 542, 2401, 2073, 2076, 5833,
+ 2445, 5537, 4026, 3361, 3361, 4468, 4504, 4505, 4942, 4943,
+ 715, 2077, 6300, 6300, 2075, 1809, 2076, 4514, 3495, 3706,
+ 1388, 5834, 2481, 2914, 4059, 541, 2076, 815, 5339, 4986,
+ 3283, 797, 811, 2077, 3707, 5206, 5040, 4962, -592, 2498,
+ 5000, 797, 4884, 5770, 3452, 4510, 3284, 4465, 3402, 4885,
+ 2073, 4517, 4982, 4154, 6337, 5301, 3408, 2077, 2074, 3410,
+ 3383, 3945, 3390, 2077, 3323, 2073, 2073, 2075, 3389, 5835,
+ 3570, 3946, 5012, 2074, 2074, -2341, 2077, -2341, 5017, 625,
+ 5415, 2076, 2075, 2075, 539, 5417, 546, 3855, 863, 834,
+ 868, 1997, 543, 1180, 3856, 3198, 543, 42, 3388, 3198,
+ 3857, 1186, 825, 2076, 4301, 2077, 1286, 4530, 1375, 836,
+ 2014, 2015, 4383, 4384, 4, 5, 4385, 4386, 4387, 2881,
+ 1376, 2076, 542, 2077, 514, 3443, 542, 5487, 3387, 1923,
+ 3781, 1851, 715, 2077, 3782, 3624, 622, 848, 5488, 47,
+ 952, 2076, 2073, 6061, 6065, 4831, 3323, 1809, 49, 540,
+ 2074, 1809, 541, 4052, 3498, 1160, 867, 51, 4531, 2075,
+ 1162, 938, 820, 3984, 4057, 4058, 2313, 5142, 4546, 3543,
+ 679, 60, 2318, 2319, 5143, 3858, 5144, 5328, 1178, 936,
+ 4548, 3618, 1346, 1377, 1288, 1347, 1348, 2073, 2077, 1852,
+ 1349, 3619, 1853, 3945, 3132, 2074, 3133, 3945, 4243, 4244,
+ 2073, 4812, 4813, 3946, 2075, 4814, 4815, 3946, 2074, 797,
+ 2077, 4816, 4817, 797, 2073, 4570, 1290, 2075, 4170, 1854,
+ 2407, 4093, 2074, 2409, 2409, 2076, 3532, 1855, 2077, 4571,
+ 4989, 2075, 1300, 5554, 4991, 1305, 3859, 2364, 4097, 2168,
+ 2076, 2076, 1466, 2073, 5565, 2073, 1310, 3364, 2077, 3365,
+ 2073, 2074, 3386, 2074, 4206, 6350, 6352, 2070, 2074, 1313,
+ 2075, 2073, 2075, 3430, 4206, 4206, 2146, 2075, 2146, 2074,
+ 3458, 2068, 2747, 6408, 623, 5700, 540, 1319, 2075, 681,
+ 866, 1322, 6200, 681, 5380, 5383, 5385, 5387, 681, 2073,
+ 5390, 5391, 5713, 3506, 3501, 5395, 3502, 2074, 5401, 1331,
+ 3927, 5405, 3930, 2365, 5380, 5722, 2075, 5724, 5416, 5380,
+ 2822, 2823, 815, 815, 2366, 1333, -3560, 2076, 2073, 815,
+ 2073, 3260, 2367, 3361, 3361, 3261, 2074, 3262, 2074, 3263,
+ 1378, 3936, 2077, 3937, 1340, 2075, 815, 2075, 815, 6152,
+ 6153, 3637, 3638, 2073, 4483, 4484, 4485, 2077, 2077, 2368,
+ 1342, 2074, 2085, 2086, 2087, 3260, 3617, 2401, 3623, 3261,
+ 2075, 3268, 2076, 3263, 3622, 2169, 3658, 807, 3127, 1356,
+ 1240, 1240, 807, 1226, 1226, 2076, 2073, 2170, 5248, 776,
+ 2073, 807, 745, 746, 2074, 4654, 624, 807, 2074, 2076,
+ 2073, 5285, 4974, 2075, 3621, 1432, 1433, 2075, 2074, 3938,
+ 4458, 3937, 783, 1362, 2073, 2369, -1319, 2075, 4808, 3939,
+ -1319, 3940, 2074, 5338, 797, 1360, 1231, 1231, 2076, 747,
+ 2076, 2075, 1366, 1409, 2077, 2076, 1232, 1232, 1369, 1371,
+ 2244, 4704, 2171, 2370, 1372, 784, 2076, 815, 3701, 797,
+ 2172, -2294, 4012, 5774, 4013, 4562, 3671, 4563, 4898, 2073,
+ 4901, -1319, 4904, 3507, 4622, 1447, -1319, 2074, 748, 4218,
+ 4206, 625, 2073, 4315, 2076, 4316, 2075, 797, 1388, 2077,
+ 2074, 4447, 1388, 1445, 3728, 2173, 3509, 1458, 797, 2075,
+ 1442, 4371, 2077, 4372, -3560, 761, 4913, 4656, 1470, -1319,
+ -2294, 5316, 4438, 2076, 4439, 2076, 2077, 755, 3510, 1346,
+ 3614, 5583, 1347, 1348, 3755, 4206, 1460, 1946, 3760, 3761,
+ 797, 626, 807, 2208, 807, 1474, 3232, 3233, 2076, 797,
+ 3773, 807, 3513, 1480, 797, 2077, 762, 2077, 3514, 1481,
+ 797, 3245, 2077, 3247, -2292, 4554, 4462, 3502, 1482, 1487,
+ 3186, 3518, 763, 2077, 4646, 797, 4647, 3661, 3620, 3795,
+ 2502, 2076, 1492, 2384, 3800, 2076, 5743, 4557, 3668, 2262,
+ 820, 4561, 4659, 2262, 2503, 2076, 2504, 5936, 4, 5,
+ 3521, 2077, 1810, 1495, 2073, 785, 1811, 1819, 709, 2076,
+ 5524, 1812, 2074, -2292, 1820, 4295, 2365, 2174, 3528, 709,
+ 4565, 2075, 4566, 2089, -2294, 1831, 4340, 2366, 3540, 4887,
+ 2077, 4888, 2077, 5977, 815, 3146, 1846, 2692, 2693, 2694,
+ 797, 2695, 1850, 2696, 2175, 2697, 4245, 1848, 5936, 4,
+ 5, 5594, 471, 1856, 2076, 2077, 3248, 3249, 5881, 1859,
+ 844, 2073, 2146, 749, 3302, 3302, -2294, 2076, 1809, 2074,
+ 709, 2445, 2445, 3964, 3731, -2294, 1354, 1355, 2075, 1358,
+ 750, 1359, 1858, 4525, -2294, 3920, 1388, -3426, 2077, 764,
+ 1860, 4246, 2077, 3929, 2881, 2146, 1527, 1861, -2294, 3492,
+ 1862, -3428, 2077, 5952, 1868, 4534, 751, 5566, -2062, 1876,
+ 4994, 815, 2262, 5029, 1802, -3425, 2077, -2292, 3147, 2090,
+ 765, 4963, 1869, 4535, 1803, 5252, 5972, 5253, -3427, 5953,
+ 4375, 1870, 1871, 5040, 4964, 2091, 627, 1877, 1875, -940,
+ 628, 1878, 3426, 4536, 3299, 1879, 2370, 752, 3965, 3944,
+ 4965, 3949, 709, 4247, 5547, 1880, 4081, 1955, 3974, -2292,
+ 3976, 2077, 3552, 1881, 710, 624, 797, 2089, -2292, 797,
+ 2073, 815, 815, 1891, 2077, 710, 1938, -2292, 2074, 2076,
+ 4966, 3828, 815, 5912, 5254, 1952, 5255, 2075, 709, 3835,
+ -940, -2292, 5256, 5286, 5257, 2262, 4248, 2073, 4128, 2008,
+ 5299, 5773, 5300, 2089, 5937, 2074, 2092, 5307, 5319, 2262,
+ 5320, 1953, 1954, 629, 2075, 1903, 1910, 3948, 1915, 1916,
+ 1917, -3560, 2924, 2924, 1959, 1920, 710, 4541, 1960, 2505,
+ 1747, 5954, 5344, 5955, 5345, 5362, 2076, 5363, 1961, 2176,
+ 625, 2040, 4542, 4543, 2073, 1962, 1466, 1466, 709, 1963,
+ 1967, 2209, 2074, 1969, 2109, 5937, 5830, 2110, 815, 4967,
+ 815, 2075, 5027, 2090, 2506, 1907, 1907, 1907, 5478, 3617,
+ 4316, 3623, 5938, 5618, 4591, 4663, 1970, 3622, 5292, 2091,
+ 1971, 3944, 2507, 3949, 3839, 3944, 2077, 3949, 2073, 1254,
+ -1319, 5733, 5776, 5734, 5777, 2210, 2074, 2211, 5782, 2090,
+ 5777, 1906, 1906, 1906, 5783, 2075, 5777, 3621, 710, 2044,
+ 5831, 5915, 4316, 1972, 2491, 2091, 2177, 5921, 5922, 4544,
+ 4968, 1973, 1974, 5938, 2178, 5752, -1657, 5832, 4714, 4316,
+ 1975, 1905, 1905, 1905, 5982, 5758, 5983, -1656, 6013, 4083,
+ 6014, 3947, 1976, 2077, 710, 2076, 5279, 1977, 1978, 3948,
+ 2092, 3572, 1466, 3948, 2111, 4249, 4250, 4251, 1979, 5502,
+ 5503, 4110, 5505, 2112, 4545, 5939, 1349, 5510, -940, 1980,
+ 5514, 3779, 2076, 5517, 5518, 1983, 5956, 4553, 6022, 1984,
+ 6023, 5526, 4547, 5527, 1985, 1992, 2092, 2212, 2070, 1993,
+ 4134, 4559, 5533, 1994, 2113, 2401, 514, 2692, 2693, 5422,
+ 2498, 5423, 2068, 5424, 710, 5425, 2115, 6057, 1194, 4372,
+ 5018, 5019, 5338, 3614, 5719, 6180, 5939, 6181, 797, 2076,
+ 1388, 1388, 4560, 815, 815, 4383, 4384, 4568, 1995, 4385,
+ 4386, 4387, 1998, 5937, 4969, 4970, 1999, 2213, 4569, 2000,
+ 3966, 3967, 2073, 2117, 3968, 4152, 3969, 4029, 3970, 6216,
+ 2074, 5054, 2077, 815, 4230, 1904, 1904, 1904, 6217, 2075,
+ 5320, 3620, 3840, 2076, 2001, -2525, 4572, 1195, 6224, 2002,
+ 6225, 766, 537, 3947, 5940, 2003, 4197, 3947, 4199, 2077,
+ 6233, 6250, 6234, 5777, 2214, -2062, 514, 512, 6252, -166,
+ 5777, 2004, 539, 1361, 546, 4950, 2122, 5284, 564, 2005,
+ 543, 5938, 2006, 4266, 1230, 1230, 1236, 1236, 3841, 2007,
+ 2831, 487, 1235, 1235, 5524, 488, 2009, 2010, 489, 570,
+ 5290, 538, 797, 4289, 6265, 5940, 2077, 6253, 2011, 5777,
+ 542, 509, 2012, 1227, 1227, 656, 5121, 4085, 6283, 4772,
+ 5777, 2016, 1234, 1234, 1003, 1004, 955, 2017, 1007, -2294,
+ 1009, 2073, 1011, 5302, 6293, 2131, 5777, 5303, 2019, 2074,
+ 541, 6317, 767, 5320, 2020, 4, 5, 5746, 2075, 2021,
+ 2077, 9, 1233, 1233, 2215, 6394, 4707, 6395, 3232, 3233,
+ 956, 5925, 2022, 4971, 4972, 5879, 3842, 2023, 5936, 4,
+ 5, 6169, 2121, 3245, 5939, 3247, 2216, 807, 2024, 4649,
+ 4650, 14, 797, 4651, 4924, 4652, 4926, 4653, 2025, 2026,
+ 709, 2073, 5200, 5200, 797, 2027, 2028, 2076, 797, 2074,
+ 2029, 2030, 2033, 5752, 815, 1196, 957, 1197, 2075, 2034,
+ 20, 4555, 2886, 958, 2035, 2036, 2037, 2038, 1198, 2039,
+ 2041, 2042, -2292, 5952, 23, 2093, 3483, 2132, 2130, 3843,
+ 2043, 2133, 2045, 2508, 1199, 2046, 815, 815, 2047, 2048,
+ 959, 2051, 2052, 5201, 5201, 3844, 3845, 2055, 960, 5953,
+ 3846, 3847, 3848, 2056, 2057, 2924, 4444, 2058, 5707, 2059,
+ 28, 4953, 3706, 3706, 540, 6087, 2060, 4919, 3248, 3249,
+ 5958, 5898, 815, 2061, 2116, -2511, -2512, 3707, 3707, 1466,
+ 2138, 2164, 2165, 5940, 961, 1809, 636, 2186, 4398, 2167,
+ 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
+ 1011, 2204, 2205, 2207, 2077, 2206, 2076, 3829, 3830, 2227,
+ -940, 5941, 2226, 2236, 2239, 2240, 2250, 2262, 3849, 4261,
+ 2294, 4973, 4995, 5586, 39, 5936, 4, 5, 2304, 962,
+ 963, 3945, 783, 2310, 5202, 2306, -1319, 2316, 2317, 2323,
+ -1319, 3946, -713, -713, 862, 2324, 710, 709, 2326, 2328,
+ 2332, 5954, 1801, 5955, 1806, 3274, 2349, 6024, 2350, 901,
+ -740, 4455, 5941, 2351, 2353, 784, 2076, 6237, 3850, 2093,
+ 2362, 539, 2373, 546, 3287, 5937, 2374, 2377, 5898, 543,
+ 5952, -1319, 797, 3292, 6399, 2387, -1319, 2393, 2403, 3294,
+ 1033, 2404, 5142, 1284, 6343, 6344, 50, 3306, 6345, 5143,
+ 6346, 5144, 2418, 815, 815, 2093, 5953, 3318, 797, 542,
+ 3320, 2414, 2437, 2077, 2427, 1200, 2428, 2441, 2456, -1319,
+ 1805, 4496, 2444, 2460, 2466, 2472, 2486, 2495, 4364, 4365,
+ 4366, 4367, 2499, 4369, 4370, 82, 2491, 2520, 2527, 541,
+ 2536, 6319, 2073, 5938, 2543, 2553, 2556, 2721, 2558, 2544,
+ 2074, 2563, 2566, 6128, 2559, 2564, 1907, 964, 2572, 2075,
+ 2364, 2576, 4558, 5683, 5684, 2578, 5686, -940, 2580, 1053,
+ 2583, 4413, 4414, 2077, 4416, 2591, 4418, 4419, 4420, 4421,
+ 4422, 4423, 4424, 2593, 4426, 2595, 2596, 2597, 4435, 2599,
+ 2600, 2627, 1906, 2635, 2646, 2648, 5956, 2650, 6154, 2651,
+ 2654, 5185, 5185, 710, 2655, 785, 2652, 2657, 5954, 2658,
+ 5955, 709, 5899, 2662, 2722, 2674, 4574, 6221, 2733, 5900,
+ 2673, 2675, 1905, 2684, 2746, 2691, 2365, 965, 2705, 2747,
+ 2748, 2759, 5937, 2761, 5901, 2764, 5939, 2366, 2765, 2827,
+ 2812, 6103, 2816, 2837, 1804, 2367, 2856, 2841, 2860, 2887,
+ 901, 2915, 2888, 2916, 2921, 1799, -2264, 4612, 1067, 2922,
+ 2928, 2939, 2944, 540, 2947, 2966, 2967, 4, 5, 2993,
+ 6229, 815, 2368, 797, 6407, 862, -3527, 2968, 815, 815,
+ 2723, 4630, 2724, 3008, 4633, 4634, 3009, 3010, 2725, 3011,
+ 3013, 3015, 3020, 4340, -2112, 3014, 3030, 3033, 3034, 3036,
+ 5938, 3043, 3039, 3040, 3041, 2265, 1001, 1002, 1003, 1004,
+ 1005, 1006, 1007, 1008, 1009, 1010, 1011, 2076, 3042, 5899,
+ 1201, 1202, 1203, 1204, 3050, 3051, 5900, 3064, 2369, 3060,
+ 3061, 3062, 3063, 3065, 3067, 3068, 3074, 3075, 3078, 3079,
+ 4683, 5901, 3083, 3088, 3094, 5940, 1904, 3097, 2726, 514,
+ 514, 3102, 6221, 5956, 1902, 1902, 2370, 1902, 1902, 1902,
+ 3125, 5902, 3191, -2264, 1902, 966, 5838, 710, 5839, 5840,
+ 4375, 5587, 3128, 3129, 5903, 2364, 3130, 3131, 5588, 2364,
+ 3142, 3134, 797, 3143, 815, 3144, 3152, 797, 797, 3157,
+ 3156, 5904, 2727, 5939, 3159, 5613, 3160, 3172, 3173, 3176,
+ 3190, 807, 3192, 6229, 3177, 3204, 1033, -2536, 5242, 3205,
+ 3213, 5203, 5203, 4687, 3218, 3219, 797, 797, 6297, 3220,
+ 3214, 3224, 2364, 4798, 2077, 3255, 4878, 1001, 1002, 1003,
+ 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 3258, 3193,
+ 2547, 2365, 3285, 3293, 3311, 2365, 3314, 3319, 3331, 4629,
+ 3330, -715, 2366, 3335, 5183, 6388, 2366, 1416, 3339, 3342,
+ 2367, 3344, 3345, 3352, 2367, 3355, 3358, 3376, 5902, 6398,
+ 3400, 3419, 5957, 3422, 3424, 6388, 3401, 3425, 3444, 3436,
+ 3427, 5903, 6398, 3437, 2728, 1053, 3438, 2368, 2365, 3964,
+ -1319, 2368, 3441, 3452, 3442, 2729, 3459, 3792, 5904, 2366,
+ 3463, 4789, 5940, -1870, -1870, -715, 3466, 2367, 762, 3475,
+ 5958, 5371, 3476, 3478, 3479, -1870, 1275, 3480, 2266, 5204,
+ 5204, 3481, 3485, 3493, 3706, 4688, 3497, 1033, 3505, 669,
+ -1456, 5905, 3508, 4689, 2368, 3511, 3512, 3516, 3517, 3707,
+ 3551, 3522, 3526, 2369, 4793, 3527, 3920, 2369, 4690, 3529,
+ 2637, 3533, 3534, 3539, 3544, 3557, 3564, 3194, 4691, 4692,
+ 4693, 2107, 4765, 3566, 3965, 4457, 3567, 4912, 4694, 3195,
+ 4914, 2370, -1622, 3568, 1067, 2370, 3569, 3576, -1870, 3583,
+ 2031, 2049, 2053, 4920, 3593, 3591, 3594, 3596, 3597, 3600,
+ 2369, 3588, 3604, 3793, 3626, 864, 5184, 514, 512, 3605,
+ 3641, 3606, 5941, 3644, -715, 865, 1053, 3669, 4936, 647,
+ 5353, 3645, 514, 3646, 3653, 5497, -1870, 3649, 2370, 3654,
+ -1870, 3657, 3673, 1275, -1870, 3683, 3686, 3687, 3693, 5509,
+ 3711, 3712, 3740, -1870, -1870, 5641, 3744, 3748, 5905, 3742,
+ -1870, 764, 3780, 3743, -1870, 3747, 5396, 4, 5, -1870,
+ 3787, -1870, 3791, 3805, 3816, -1870, 3812, 3820, 4350, 4351,
+ 3823, 4353, 4355, -1870, 2267, -1870, 648, 5958, 3831, 3196,
+ -1870, 3824, -715, 3834, 3832, 3833, 3836, 3837, 2268, 3838,
+ 2269, 5589, 4985, 3875, 5590, 2265, 3878, 3885, 3881, 3944,
+ -1870, 3949, 3924, 5591, 5588, 1067, 3917, 3890, 3891, 3892,
+ -1870, 3893, 3894, -1870, 3895, 3896, 4695, 3897, 3898, 3899,
+ 3900, 2285, 2270, 3901, 4630, 3902, 3903, 3904, 4696, 3905,
+ 3906, 3931, 3907, -1870, 3971, 2271, 3908, 4612, 3909, 3932,
+ 3954, 815, 3975, 3910, 5016, 649, 3911, 3912, 3913, 3197,
+ 3914, 3955, -1870, 3977, 3925, 3978, -1870, 650, 3991, 3993,
+ 3996, 3926, 3927, 3997, 4005, -1870, 3928, 3948, 2272, 5941,
+ 5512, 3930, 4007, 5185, 2831, 2481, 4006, 3981, 3994, 4001,
+ 4009, 3995, 4023, 5041, -1870, 4053, 2273, 4054, 5042, 4055,
+ 4068, 4069, 4070, 4076, 4089, 5052, -1665, 4108, 4120, -1870,
+ 4135, 4121, 4109, 4122, 4136, -1870, -1870, 514, 4148, 4149,
+ 5633, 5125, 1809, 4697, 5638, 5639, 4150, 3577, 5587, -1870,
+ 651, -1870, 4160, 4164, 4158, 5588, 4166, 4167, 4698, 4168,
+ 797, 4171, 4172, 4176, 4177, 2950, 5084, 2949, 4184, 4209,
+ 797, 3323, 4229, 4185, 4262, 4269, 4223, 4224, 4235, 3365,
+ 4233, 4241, 4275, 4279, 4280, 4228, 4242, 4277, 1802, 4281,
+ 4306, 4305, 4333, 5112, 2274, 4309, 4699, 4310, 1803, 4337,
+ -2015, 2275, 4346, 4378, 4347, 4379, 4380, 4396, 4400, 4406,
+ 4700, 2276, -715, 4407, 4408, 5183, 4410, 4450, 4456, 5869,
+ 4459, 3947, 4629, 4460, 4471, 2277, 4473, 4466, -1814, -1814,
+ 3340, 4478, 4479, 4491, 1809, 4499, 4509, 4501, 2266, 4508,
+ -1814, 4515, 5015, 3795, 4518, 4519, 4520, 4521, 4564, 4598,
+ 4575, 4590, 2886, 864, 4576, 4615, 2073, 2278, 4600, 4586,
+ 2279, 4601, 4602, 865, 2074, 4587, -715, 4616, 4603, 762,
+ 4624, 4604, 815, 2075, 4605, 2637, 2280, 4606, 4638, 4613,
+ 3945, 4639, 4619, 4617, 4644, 3706, 4664, 4620, 4657, 4662,
+ 3946, 4675, 670, 4686, 4663, 4678, -1870, 652, 4705, 4684,
+ 3707, 4713, 4710, -1814, 4706, 4711, 4716, 2281, 4767, 4775,
+ -1781, -1786, 4796, 5186, 4801, 2710, 2711, 2712, 2713, 4804,
+ 5084, 4810, 4805, 4820, 653, 4811, 4825, 4838, 4883, 4891,
+ 807, 4906, 4910, 4915, 4916, 5246, 4921, 5589, 4929, 4941,
+ 5590, -1814, 4944, 4945, 4947, -1814, 4956, 4987, 3536, -1814,
+ 4957, 4581, 4996, 4998, 4323, 514, 5259, 4999, -1814, -1814,
+ 5002, 2714, 2715, 2716, 5003, -715, 5004, 2899, 5008, -1814,
+ 5021, 5054, 5022, 5035, -1814, 6367, -1814, 51, 5053, 5058,
+ -1814, 5059, 5060, 5061, 2267, 514, 799, 5062, -1814, 5065,
+ -1814, 5085, 5086, 5087, 2146, -1814, 5099, 4849, 2268, 5134,
+ 2269, 5787, 764, 5135, 5138, -256, 1163, 1907, 5139, 5140,
+ 5147, 5149, 2717, 2718, -1870, -1814, 5163, 5176, 3964, 5177,
+ 2883, 5187, 5178, 5194, 5185, -1814, 5196, 5209, -1814, 5210,
+ 5219, 2076, 2270, -715, 5220, 5221, 5223, 5222, 5174, 5224,
+ 5227, 5237, 5226, 1906, 5228, 2271, 5229, 5230, -1814, 5258,
+ 4612, 5240, 5243, 5244, 5251, 5261, 5262, 5265, 5589, 5266,
+ 5269, 5590, 5271, -73, 5275, 5274, 5276, -1814, 5283, 5287,
+ 5749, -1814, 5288, 1905, 5293, 5289, 2719, 5295, 2272, 5298,
+ -1814, 5305, 5306, 5308, 5314, 5322, 5330, 5346, 5333, 5334,
+ 2831, 5820, 5332, 3965, 5341, 5342, 2273, 5351, 5376, -1814,
+ 3266, 4683, 4878, 5354, 5355, 654, 5449, 514, 5335, 5462,
+ 5470, 5464, 815, 5471, -1814, 5084, 5472, 5361, 1164, 5475,
+ 5477, -1814, 5484, 655, 5185, 5482, 1165, 5483, 5485, 5494,
+ 5493, 5492, 797, 5500, -1814, 5495, -1814, 5498, 2077, 2720,
+ 5511, 1166, 5515, 5516, 4394, 5550, 5552, 5548, 815, 5571,
+ 5573, 1167, 1168, 1169, 5575, 5577, 5579, 5582, 5580, 5585,
+ 5596, 1170, 5599, 5612, 1809, 5611, 5617, 5622, 5430, 656,
+ 5623, 5630, 5626, 5631, 2274, 5634, 3920, 5629, 5650, 5666,
+ 5646, 2275, 5667, 5648, 3920, 5665, 5669, -1870, 5655, 5677,
+ 5676, 2276, 4439, 5435, 5661, 5438, 657, 1904, 5663, 5680,
+ 2638, 5685, 5687, 5688, 658, 2277, 5690, 5359, 5703, 5710,
+ 3945, 5692, 5709, 5714, 5720, 5199, 5504, -1870, 6273, -1870,
+ 3946, 5725, -1870, -1870, 1157, 5363, 5740, 5747, 5754, 5748,
+ 5084, 5521, 864, 5753, 2721, 5755, 5757, 2278, 5760, 5771,
+ 2279, 5531, 865, 5052, 5052, 797, 5775, 5779, 5534, 5781,
+ 5535, 5536, 5791, 5785, 5797, 5520, 2280, 2831, 5364, 5801,
+ 5841, 5437, 5842, 5844, 797, 5530, 5852, 5854, 5853, 5860,
+ 5052, 1157, 5862, 5861, 5867, 5870, 5349, 5052, 5871, 5872,
+ 5878, 5880, 5084, 5884, 6096, 5893, 5894, 2281, 5897, 5917,
+ 5918, 5923, 5965, 5929, 4721, 5985, 5969, 5556, 5987, 1171,
+ 5986, 2722, 5981, 5988, 5971, 5993, 5998, 5994, 5995, 6007,
+ 6009, 1172, 5392, 5393, 6011, 6012, 6015, 6016, 6019, 6025,
+ 6029, 6032, 5406, 6037, 6040, 6054, 6096, 6056, 6068, 6074,
+ 6076, 6078, 6079, 6080, 5186, 6084, 5429, 6085, 6099, 2881,
+ 6086, 6100, 6101, 6102, 6108, 6134, 6082, 1907, 6156, 6141,
+ 6170, 6185, 6175, 6177, 5468, 6178, 6191, 6196, 6197, 6206,
+ 6207, 6208, 6188, 6209, -2509, 6212, 4846, 2723, 5603, 2724,
+ -2510, 4851, 6215, 6269, 6218, 2725, 6240, 6243, 6246, 6255,
+ 5041, 5610, 6254, 1906, 6274, 5436, 6272, 3797, 1157, 5052,
+ 6277, 6320, 6333, 6323, 6328, 6403, 6332, 6341, 5621, -1814,
+ 6334, 5621, 5621, 6336, 6342, 6349, 5627, 6354, 6358, 6359,
+ 5084, 1173, 6360, 1905, 6362, 6365, 6366, 6368, 5637, 6363,
+ 6364, 6374, 6389, 5645, 6375, 4189, 3710, 4437, 6402, 5562,
+ 5561, 5560, 4284, 6096, 5920, 2726, 4819, 2881, 5670, 5979,
+ 6114, 6267, 5187, 2926, 1382, 5465, 1801, 2442, 1806, 1174,
+ 4454, 4907, 4449, 5340, 4911, 3324, 2907, 3721, 4702, 5549,
+ 4495, 4475, 3222, 1175, 1494, 3411, 5804, 5803, 5694, 3412,
+ 5696, 5652, 5233, 3413, 4865, 5716, 5007, 5598, 5013, 2727,
+ 6140, 3581, 6400, 5089, 5090, 5091, 5092, 5093, 5094, 5095,
+ 5096, 5097, 5098, 5315, 5100, 5101, 5102, 5103, 5104, 5105,
+ 5106, 5107, 5108, 5109, 5761, 6223, 5113, 5114, 6322, 6281,
+ 6039, 5435, 5759, 5438, 1805, 3827, 2432, 5231, 5501, 5695,
+ 5967, 6155, 3795, 5697, 3795, 5543, 5628, 5236, 5370, 6199,
+ 6301, 6195, 6130, 6119, 6120, 6121, 6122, 1904, 3944, 4975,
+ 3949, 955, 4938, 6201, 4507, 6138, 2511, 1945, 3275, 5698,
+ 5084, 5052, 5084, 4578, 3956, 4990, 815, 5084, 4988, 5052,
+ 4992, 6327, 769, 1157, 5084, 5084, 9, 1157, 5052, 770,
+ 6294, 2728, -1814, 5717, 5084, 956, 6295, 5927, 4276, 5437,
+ 5084, 5052, 2729, 5052, 6167, 2638, 2710, 2711, 2712, 2713,
+ 1157, 5726, 6172, 5647, 1945, 6174, 14, 5847, 3291, 1157,
+ 5693, 4715, -1814, 5234, -1814, 5208, 3948, -1814, -1814, 5649,
+ 5218, 5738, 5691, 5541, 2628, 2451, 6005, 3098, 4260, 4258,
+ 797, 957, 3884, 6136, 5851, 20, 3257, 4488, 958, 4165,
+ 6266, 3702, 2714, 2715, 2716, 4002, 4928, 798, 1804, 23,
+ 4123, 5815, 2412, 4878, 6236, 1411, 4216, 2363, 2135, 5815,
+ 2411, 5815, 4336, 5263, 4173, 959, 5001, 4092, 4090, 2831,
+ 2825, 4143, 4140, 960, 1157, 1157, 1157, 1157, 4608, 5621,
+ 1945, 2884, 4528, 5784, 5280, 28, 2745, 1157, 2681, 2735,
+ 5789, 797, 755, 2717, 2718, 5084, 5084, 6268, 6117, 6353,
+ 6351, 5682, 3148, 3151, 5481, 797, 5032, 6125, 5343, 961,
+ 6126, 2355, 2356, 5436, 3141, 3807, 2357, 5812, 2358, 5813,
+ 2690, 807, 2360, 3920, 3162, 4597, 514, 6280, 4332, 807,
+ 5167, 807, 4596, 5829, 5166, 6018, 5859, 5593, 5329, 4339,
+ 3947, 5584, 5282, 4335, 5606, 1434, 2406, 4981, 2420, 39,
+ 5172, 780, 771, 3799, 962, 963, 3973, 2719, 5084, 1296,
+ 3368, 4927, 2246, 4000, 5084, 5045, 5856, 5772, 4361, 5031,
+ 5348, 2831, 6318, 5028, 1823, 3338, 3675, 1829, 5950, 1280,
+ 5052, 2999, 5950, 1945, 3676, 1281, 4210, 2413, 3715, 5802,
+ 1283, 5873, 5877, 5616, 3086, 2633, 4932, 6321, 5486, 6355,
+ 5689, 6401, 6405, 1947, 3998, 5815, 869, 3690, 5608, 4024,
+ 4201, 1238, 4202, 3418, 3640, 4203, 4198, 5892, 1239, 3397,
+ 2720, 50, 4195, 4194, 4637, 1193, 2129, 2150, 4985, 3108,
+ 4826, 4169, 5268, 3874, 5621, 6406, 5175, 2927, 2621, 2622,
+ 4278, 5741, 5924, 4879, 5084, 1330, 2309, 789, 773, 774,
+ 775, 1924, 4925, 3414, 4498, 6109, 5378, 1936, 5964, 5047,
+ 82, 6110, 6263, 1926, 4766, 5653, 5657, 4285, 5394, 1157,
+ 5658, 5654, 5674, 1945, 6391, 807, 5662, 0, 3944, 6393,
+ 3949, 1817, 964, 1937, 0, 901, 0, 2561, 0, 0,
+ 6000, 0, 0, 0, 0, 0, 0, 0, 0, 5084,
+ 863, 0, 868, 0, 0, 955, 0, 0, 543, 797,
+ 0, 815, 0, 0, 0, 2721, 0, 6001, 5084, 797,
+ 0, 0, 0, 0, 0, 0, 5950, 0, 0, 0,
+ 9, 0, 0, 0, 0, 0, 0, 0, 542, 956,
+ 0, 0, 0, 5950, 3225, 0, 3948, 0, 0, 0,
+ 0, 0, 965, 0, 0, 0, 0, 0, 0, 0,
+ 14, 0, 0, 0, 0, 0, 0, 0, 867, 0,
+ 0, 0, 0, 0, 1945, 6055, 0, 1945, 3226, 0,
+ 6067, 0, 2722, 0, 0, 957, 6073, 0, 3380, 20,
+ 0, 0, 958, 0, 0, 0, 0, 0, 0, 1944,
+ 0, 0, 0, 23, 0, 0, 0, 0, 0, 815,
+ 1157, 0, 901, 0, 0, 3227, 862, 0, 0, 959,
+ 0, 0, 0, 0, 0, 0, 0, 960, 0, 0,
+ 0, 0, 0, 0, 0, 797, 0, 0, 0, 28,
+ 5829, 0, 0, 0, 4683, 4683, 1991, 1157, 2723, 0,
+ 2724, 0, 0, 0, 0, 0, 2725, 0, 0, 0,
+ 0, 0, 0, 961, 0, 0, 0, 0, 0, 0,
+ 3947, 5877, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5892, 0, 0, 0, 0, 0, 0, 5950, 0, 0,
+ 966, 0, 866, 815, 0, 0, 5815, 0, 0, 0,
+ 0, 0, 0, 39, 0, 0, 0, 0, 962, 963,
+ 0, 0, 0, 0, 0, 0, 2726, 0, 0, 0,
+ 0, 0, 2072, 0, 0, 6176, 0, 0, 0, 0,
+ 0, 0, 0, 5621, 0, 5621, 5621, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -1870,
+ -1870, 0, 0, 2070, 0, 0, 0, 0, 0, 0,
+ 2727, -1870, 0, 0, 6081, 0, 807, 2068, 0, 0,
+ 0, 0, 0, 0, 0, 50, 0, 0, 0, 0,
+ 0, 0, 0, 5950, 0, 0, 0, 4878, 0, 6261,
+ 6261, 0, 0, 0, 2831, 0, 2637, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 0, 815, 0, 0, 0,
+ 0, 0, 0, 0, -1870, 2152, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5621, 5621, 964, 0, 6247, 5950,
+ 5950, 2128, 0, 0, 0, 5621, 0, 0, 0, 0,
+ 0, 0, 2728, 0, 0, 6149, 6150, 0, 0, 6260,
+ 6260, 0, -1870, 2729, 0, 0, -1870, 6161, 0, 0,
+ -1870, 0, 0, 0, 0, 0, 0, 0, 0, -1870,
+ -1870, 5950, 0, 0, 3613, 0, 0, 0, 4878, 815,
+ -1870, 0, 0, 0, 0, -1870, 0, -1870, 0, 0,
+ 0, -1870, 0, 5621, 0, 0, 965, 0, 0, -1870,
+ 0, -1870, 0, 0, 0, 2293, -1870, 3228, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2831,
+ 0, 0, 0, 0, 0, 0, -1870, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -1870, 3229, 3230, -1870,
+ 3231, 3232, 3233, 3234, 3235, 0, 3236, 3237, 3238, 3239,
+ 3240, 3241, 3242, 3243, 0, 3244, 3245, 3246, 3247, -1870,
+ 0, 0, 0, 6230, 0, 0, 6231, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -1870, 0,
+ 0, 0, -1870, 0, 0, 0, 0, 0, 0, 0,
+ 0, -1870, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2402, 2285, 0, 2402,
+ -1870, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2831, 0, 0, -1870, 815, 0, 0, 1945,
+ 0, 815, -1870, 0, 966, 0, 2831, 0, 1157, 0,
+ 1157, 0, 2831, 0, 0, -1870, 0, -1870, 0, 2831,
+ 0, 3248, 3249, 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, 1157,
+ 1157, 0, 0, 0, 0, 1157, 0, 0, 0, 1157,
+ 1157, 1157, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 1157, 1945, 0, 0, 0, 1157, 0, 0, 0, 1157,
+ 1157, 1157, 0, 1157, 1157, 1157, 1945, 1945, 0, 0,
+ 0, 0, 0, 1157, 0, 1157, 0, 0, 1157, 1157,
+ 1157, 1157, 0, 1157, 0, 1157, 1157, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 1157, 1157, 1157, 1157, 0, 1157, 1157, 1157, 1157, 1157,
+ 1157, 0, 1157, 1157, 0, 1157, 1157, 0, 1157, 1157,
+ 0, 0, 1157, 1157, 0, 1157, 1157, 0, 1157, 0,
+ 1157, 0, 0, 0, 1157, 1157, 1157, 0, 0, 1157,
+ 1157, 1157, 1157, 0, 1157, 0, 0, 0, 0, 0,
+ 0, 1157, 0, 4721, 4, 5, 0, 1157, 1157, 1157,
+ 1157, 0, 0, 0, 0, 0, 0, 3943, 1157, 1157,
+ 0, 1157, 1157, 0, 0, 1157, 1157, 1157, 1157, 1157,
+ 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 6030, 6031,
+ 1157, 6033, 6034, 6035, 6036, 1945, 0, 0, 0, 0,
+ 0, 0, 1945, 0, 0, 0, -904, 0, -904, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1157, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2430, 0, 0, 0, 0, 0,
+ -1870, 0, 0, 1945, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -1062, -1062,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4721, 4, 5, 0, 0, 0, 0, 0, 0, 0,
+ 4722, 1902, 1902, 1902, 0, 0, 0, 3613, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4839, 3943,
+ 4840, 4841, 0, 3943, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6148, 0,
+ 0, 6151, 4842, 0, 4843, 0, 0, 0, 0, 6159,
+ 4844, 0, 6162, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1157, 0, 1157, 0, 0, 0, 0, 0,
+ 4724, 2430, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4845, 0, 0, 0, 0, 0, 1945, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4722, 0, 0,
+ 0, 2625, 0, 0, 0, 0, 0, 4725, 4726, 4727,
+ 0, 0, 0, -1870, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4846, 2638, 4728, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -1870, 0, -1870, 0, 0, -1870, -1870,
+ 0, 0, 0, 0, 0, 0, 4847, 0, 4848, 0,
+ 0, 0, 0, 0, 0, 0, 1157, 4724, 0, 4849,
+ 0, 0, 1945, 0, 1945, 0, 0, 0, 0, 0,
+ 0, 4729, 0, 4730, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4850, 1991, 1157, 0, 0, 0, 0, 0,
+ 0, -904, 1157, 4731, 0, 0, 0, 0, 2744, 1991,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4732, 0, 0, 4725, 4726, 4727, 0, 4733, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4734, 4728, 0, 0, 0, 0, 0,
+ 4735, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4736, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 955, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4851, 0, 0, 0, 0, 0, 0, 0, 4729, 0,
+ 4730, 0, 0, 9, 0, 0, 0, 0, 0, 0,
+ 0, 0, 956, 0, 0, 0, 0, 0, 0, 0,
+ 4731, 0, 4737, 0, 0, 0, 0, 4852, 0, 0,
+ 0, 0, 4738, 14, 0, 0, 0, 2892, 4732, 0,
+ 0, 0, 0, 0, 1991, 4733, 0, 0, -3669, -3669,
+ -3669, 0, 0, 0, 0, 0, 0, 0, 957, 0,
+ 4734, 0, 20, 0, 0, 958, 0, 4735, 0, 0,
+ 4739, 4853, 4854, 0, 0, 0, 23, 0, 4855, 0,
+ 0, 0, 4736, 4740, 0, 2959, 0, 0, 0, 0,
+ 4856, 0, 959, 0, 0, 0, 0, 0, 0, 0,
+ 960, 0, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 0, 4857, 28, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4741, 0, 0, 0, 0, 0, 4742, 0,
+ 0, 0, 0, 0, 0, 4858, 961, 0, 0, 4737,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4738,
+ 0, 0, 0, 1945, 1157, 0, 0, 0, 0, 0,
+ 0, 0, 1157, 1157, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 39, 0, 0, 0,
+ 0, 962, 963, 0, 0, 0, 4743, 4739, 0, 4719,
+ 1799, 4720, 0, 4744, 0, 0, 4721, 4, 5, 0,
+ 4740, 0, 4859, 0, 0, 0, 0, 0, 0, 901,
+ 1991, 0, 0, 0, 0, 0, 1157, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4745, 0, 1945, 1945, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4741,
+ 4746, 4747, 0, 0, 0, 4742, -3669, 0, 50, -904,
+ 955, -904, 0, 4748, 0, 0, 0, 0, 0, 1157,
+ 1157, 1157, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4860, 0, 0, 0, 0, 9, 0, 2430, 0, 0,
+ 0, 4861, 4862, 4863, 956, 0, 0, 82, 0, 0,
+ 0, 0, 1902, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4743, 0, 14, 0, 0, 1945, 964,
+ 4744, 0, 0, 0, 2402, 0, 3171, 5118, 1157, 0,
+ 0, 1945, 0, 4722, 0, 0, 0, 0, 0, 0,
+ 957, 0, 0, 0, 20, 0, 1157, 958, 0, 0,
+ 1157, 1157, 4745, 1157, 1157, 4723, 0, 0, 23, 0,
+ 0, 0, 1157, 0, 1157, 0, 0, 4746, 4747, 0,
+ 0, 0, -3669, 0, 959, 0, 0, 0, 0, 0,
+ 4748, 0, 960, 0, 4864, 0, 0, 0, 0, 965,
+ 0, 0, 0, 0, 28, 1157, 0, 0, 0, 0,
+ 0, 0, 0, 4724, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 955, 961, 0,
+ 0, 1157, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1157, 0, 0, 0, 1945, 0, 0,
+ 0, 0, 9, 0, 0, 0, 1157, 0, -1062, 0,
+ 0, 956, 0, 0, 0, 0, 0, 1157, 39, 0,
+ 4725, 4726, 4727, 962, 963, 0, 0, 0, 0, 0,
+ 0, 0, 14, 1157, 0, 0, 0, 0, 0, 0,
+ 4728, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1158, 0, 0, 0, 0, 0, 0, 957, 0, 0,
+ 0, 20, 0, 0, 958, 0, 0, 0, 0, 0,
+ 1157, 0, 0, 0, 0, 23, 0, 1157, 0, 0,
+ 0, 0, 0, 0, 1945, 0, 0, 966, 0, 0,
+ 50, 959, 0, 0, 4729, 0, 4730, 1158, -3832, 960,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 28, 0, 0, -904, 0, 4731, 0, 0, 0,
+ 0, 4759, 4759, 1945, 1945, 0, 0, 0, 0, 82,
+ 0, 0, 0, 0, 4732, 961, 0, 0, 0, 0,
+ 0, 4733, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 964, 0, 0, 0, 0, 4734, 0, 0, 0,
+ 0, 0, 0, 4735, 0, 3420, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 39, 1157, 0, 4736, 0,
+ 962, 963, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, -3832, 0, 0, 0, 0, 1157,
+ 0, 0, 0, 0, 1158, 0, 0, 0, 0, 0,
+ 0, 965, 1945, 0, 1945, 1945, 1945, 0, 1157, 0,
+ 0, 0, 4759, 1157, 1157, 4737, 0, 0, 0, 1991,
+ 3461, 0, 0, 0, 0, 4738, 0, 50, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4739, 0, 0, 82, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4740, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 964, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3531, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3546, 0, 4741, 0, 0, 0, 0,
+ 0, 4742, 0, 0, 4, 5, 0, 0, 0, 0,
+ 1157, 1157, 0, 0, 0, 0, 0, 0, 0, 966,
+ 0, 1922, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1241, 0, 1242, 0, 0, 0, 965, 0,
+ 0, 0, 676, 0, 0, 0, 0, 0, 0, 1158,
+ 0, 0, 0, 1158, 0, 0, 1210, 3943, 0, 4743,
+ 0, 0, 0, 0, 1243, 1244, 4744, 0, 0, 0,
+ 0, 0, 0, 0, 1245, 1945, 1158, 0, 0, 0,
+ 0, 0, 0, 3603, 0, 1158, 0, 0, 16, 17,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4745, 2152,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4746, 4747, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4748, 0, 0, 1157,
+ 1246, 0, 0, 1157, 0, 0, 1157, 0, 0, 0,
+ 0, 0, 0, 0, 1247, 1157, 0, 0, 0, 0,
+ 1158, 1158, 1158, 1158, 1157, 0, 1157, 1157, 0, 1157,
+ 1157, 1157, 1157, 1158, 1157, 0, 1157, 1157, 0, 1157,
+ 0, 0, 0, 0, 0, 0, 966, 1157, 1157, 0,
+ 0, 0, 1157, 1157, 1157, 0, 2625, 0, 0, 0,
+ 0, 0, 1157, 1157, 1157, 0, 1157, 0, 1157, 1248,
+ 1157, 0, 1157, 0, 1157, 0, 0, 0, 0, 1157,
+ 1157, 1249, 1157, 1157, 1157, 0, 0, 0, 1157, 0,
+ 0, 1157, 0, 0, 0, 2293, 2293, 0, 0, 0,
+ 1157, 0, 0, 1157, 0, 1157, 1157, 1157, 0, 0,
+ 1157, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4759, 0, 0, 4721, 4, 5, 0, 0,
+ 0, 0, 1157, 0, 1157, 0, 1250, 1157, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1157, 1157, 1157,
+ 1157, 1945, 1157, 5538, 0, 4840, 0, 1157, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1945, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4842, 0, 1251,
+ 0, 0, 0, 0, 0, 5539, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2402, 0, 2402, 2402, 3819, 1252,
+ 0, 0, 0, 0, 0, 1157, 2430, 0, 1253, 0,
+ 0, 0, 0, 0, 0, 1158, 0, 5540, 0, 1157,
+ 0, 1254, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1255, 0, 0, 1945, 4759, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4722, 0, 0, 1256, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1157, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4846, 0, 0, 0, -2264, 1257, 0, 0, 1258, 0,
+ 1259, 1157, 0, 905, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1902, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4848, 0, 0, 0, 1260, 1261, 0,
+ 0, 0, 4724, 1262, 1263, 906, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1264, 0, 0, 0, 0, 0, 908, 4850, 0, 0,
+ 0, 0, 0, 0, 0, 909, 1158, 0, 0, 0,
+ 0, 1265, 0, 1157, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 910, 0, 0, 4725,
+ 4726, 4727, 0, 1266, 1157, 0, 0, 2625, 0, 0,
+ 911, 0, 0, 1158, 0, 912, 1945, 0, 0, 4728,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 955, 0, 0, 0, 913, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1267, 0, 9,
+ 0, 0, 0, 0, 0, 4851, 0, 0, 956, 0,
+ 0, 0, 1268, 4729, 0, 4730, 0, 0, 0, 0,
+ 0, 1269, 0, 0, 1270, 1271, 0, 0, 0, -3660,
+ 0, 0, 0, 0, 0, 4731, 0, 914, 0, 1272,
+ 0, 915, 0, 0, 0, 0, 0, 4759, 0, 4759,
+ 0, 5434, 0, 4732, 957, 0, 0, 0, -3659, 916,
+ 4733, 958, 0, 917, 918, 0, 0, 0, 0, 0,
+ 0, 0, 23, 0, 0, 4734, 1273, 0, 0, 0,
+ 0, 0, 4735, 0, 1274, 0, 4853, 0, 959, 0,
+ 0, 0, 0, 4855, 919, 0, 960, 4736, 0, 0,
+ 0, 920, 921, -3286, 0, 1275, 0, 0, -3659, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1945, 0,
+ 0, 0, 0, 0, 0, 0, 4857, 0, 0, 0,
+ 1157, 0, 961, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1157, 0, 4146, 4737, -3286, 0, 0, 2608, 0,
+ 0, 4759, 1276, 0, 4738, 0, 1157, 0, 0, 1157,
+ 1991, 0, -3659, 0, 0, 0, 0, 962, 963, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1157, 1157, 0, 0, 2609, 1157,
+ 0, 0, 4739, 1902, 0, 0, 0, 0, 1945, 0,
+ 0, 0, 0, 0, 0, 4740, 0, 4859, 0, 0,
+ 0, 1157, 0, 1157, 0, 1157, 0, 1157, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2959, 0, 0,
+ 0, 2610, 1157, 0, -3659, 0, 2611, 0, 1945, 0,
+ 0, 0, 0, 0, 4741, 0, 0, 2612, 2613, 0,
+ 4742, 1157, 1157, 0, 0, 0, 1157, 0, 1157, 0,
+ 1157, 0, 0, 0, 0, 1157, 0, 0, 0, 0,
+ 0, 0, 0, -3660, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1799, 964, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1945, 0, 4743, 0,
+ 0, 0, 1157, 0, 0, 4744, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1157, 0, 0, 0,
+ 1157, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1158, 0, 1158, 4745, 1157, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5434,
+ 0, 0, 4746, 4747, 0, 965, 0, 0, 0, 0,
+ 0, 0, 1945, 0, 0, 4748, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3943, 0, 2402, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2614, 0, 0, 1158, 1158, 0, 0, 0,
+ 0, 1158, 2615, 0, 0, 1158, 1158, 1158, 0, 0,
+ 0, 0, 0, 2616, 0, 1158, 1158, 0, 0, 2617,
+ 0, 1158, 0, 0, 0, 1158, 1158, 1158, 0, 1158,
+ 1158, 1158, 0, 1157, 0, 0, 0, 0, 0, 1158,
+ 0, 1158, 0, 1157, 1158, 1158, 1158, 1158, 0, 1158,
+ 2618, 1158, 1158, 0, 2619, 0, 0, 1157, 0, 1945,
+ 1157, 0, 0, 0, 0, 1158, 1158, 1158, 1158, 1158,
+ 0, 1158, 1158, 1158, 1158, 1158, 1158, 0, 1158, 1158,
+ 0, 1158, 1158, 2620, 1158, 1158, 0, 0, 1158, 1158,
+ 0, 1158, 1158, 966, 1158, 0, 1158, 0, 0, 0,
+ 1158, 1158, 1158, 0, 0, 1158, 1158, 1158, 1158, 0,
+ 1158, 0, 0, 0, 0, 0, 0, 1158, 0, 0,
+ 0, 0, 0, 1158, 1158, 1158, 1158, 0, 0, 0,
+ 0, 0, 0, 0, 1158, 1158, 0, 1158, 1158, 0,
+ 2402, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158, 1158,
+ 1158, 1158, 1158, 1158, 0, 0, 1158, 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, 1158, 0, 1512, 1513, 0, 0, 0, 1517, 1518,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1527, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4540, 0, 0, 1549, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1562, 0, 0, 0,
+ 1157, 1157, 0, 1157, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1577, 0, 6118, 0, 1157, 1157, 1157, 0,
+ 4573, 0, 0, 0, 0, 0, 0, 4759, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1157, 1157, 1601, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4759, 3943, 0, 1158, 4759,
+ 1158, 1620, 1621, 1622, 1157, 0, 0, 0, 0, 0,
+ 0, 1630, 1631, 1632, 0, 0, 1157, 0, 862, 0,
+ 0, 0, 0, 0, 0, 1157, 0, 0, 4632, 1647,
+ 0, 0, 0, 0, 0, 1158, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1157, 0, 0, 0, 0,
+ 1157, 1157, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1676, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 0, 0, 0, 1157, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1703, 0,
+ 0, 0, 0, 0, 2293, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4759, 0, 0, 0,
+ 0, 1725, 1726, 1727, 4759, 0, 0, 955, 0, 0,
+ 4759, 4759, 1158, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1746, 1747, 4721, 4, 5, 4721, 4,
+ 5, 0, 9, 4759, 0, 0, 0, 0, 0, 0,
+ 1158, 956, 0, 0, 0, 0, 0, 0, 1158, 0,
+ 4759, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 14, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1761, 0, 1762, 1763, 0, 0, 0, -904, 0,
+ -904, 2402, 0, 0, 0, 0, 0, 957, 0, 0,
+ 1764, 20, 0, 0, 958, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 23, 2430, 0, 0, 2430,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 959, 0, 0, 0, 0, 1765, 1766, 0, 960,
+ 0, 0, 0, 0, 0, 0, 0, 4759, 0, 0,
+ 0, 28, 0, 0, 0, 0, 0, 0, 0, 4759,
+ 0, 0, 4722, 4759, 0, 4722, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 961, 0, 0, 0, 0,
+ 0, 0, 1768, 0, 0, 0, 0, 0, 0, 0,
+ 1157, 1157, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4759, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 39, 0, 0, 0, 0,
+ 962, 963, 0, 1769, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4724, 0, 0, 4724, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1157, 0, 0, 1945, 0, 0,
+ 0, 0, 0, 0, 0, 1158, 0, 0, 4759, 6242,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1770, 1771, 50, 0, 4725,
+ 4726, 4727, 4725, 4726, 4727, 0, 0, 0, 0, 0,
+ 4759, 1772, 1773, 0, 0, 0, 0, 0, 1157, 4728,
+ 1158, 0, 4728, 0, 0, 0, 0, 0, 1158, 1158,
+ 0, 0, 0, 0, 0, 0, 82, 1945, 0, 0,
+ 0, 0, 0, 0, 0, 1157, 1157, 0, 0, 0,
+ 0, 0, 0, 1775, 0, 0, 0, 0, 964, 4759,
+ 0, 4759, 4759, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4729, 0, 4730, 4729, 0, 4730, 0,
+ 1157, 0, 1158, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -904, 0, 4731, 0, 0, 4731, 0,
+ 0, 0, 4759, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3987, 0, 4732, 0, 0, 4732, 0, 0, 0,
+ 4733, 0, 0, 4733, 0, 1158, 1158, 1158, 965, 0,
+ 0, 0, 0, 0, 0, 4734, 0, 4759, 4734, 0,
+ 0, 0, 4735, 0, 0, 4735, 0, 1777, 0, 955,
+ 1778, 0, 0, 1779, 0, 0, 0, 4736, 0, 0,
+ 4736, 0, 0, 0, 0, 0, 1157, 4759, 1157, 0,
+ 0, 0, 0, 0, 9, 0, 1780, 0, 0, 0,
+ 0, 0, 0, 956, 1158, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1782, 0, 0, 0,
+ 0, 0, 1158, 0, 14, 0, 1158, 1158, 0, 1158,
+ 1158, 0, 0, 0, 4737, 0, 0, 4737, 1158, 0,
+ 1158, 0, 0, 0, 4738, 0, 0, 4738, 0, 957,
+ 0, 0, 0, 20, 0, 0, 958, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 23, 0, 0,
+ 0, 1158, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4739, 959, 0, 4739, 966, 0, 0, 0,
+ 0, 960, 0, 0, 0, 4740, 0, 1158, 4740, 0,
+ 0, 1157, 0, 28, 0, 0, 0, 0, 0, 1158,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 0, 0, 1157, 0, 961, 0, 0,
+ 0, 0, 0, 1158, 4741, 0, 0, 4741, 0, 0,
+ 4742, 0, 0, 4742, 0, 0, 0, 0, 1157, 1158,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1157, 1157, 1159, 39, 0, 0,
+ 0, 0, 962, 963, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1158, 0, 0, 0,
+ 0, 0, 0, 1158, 0, 0, 0, 0, 4743, 0,
+ 0, 4743, 0, 0, 0, 4744, 0, 0, 4744, 0,
+ 0, 0, 0, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2402,
+ 0, 0, 0, 0, 0, 0, 0, 4745, 0, 50,
+ 4745, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4746, 4747, 0, 4746, 4747, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4748, 0, 0, 4748, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 82, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 0, 0, 0, 0, 0, 0, 4146,
+ 964, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1158, 0, 0, 0, 0,
+ 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1158, 0, 0, 0, 0, 1158,
+ 1158, 0, 0, 4222, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 965, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1158, 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, 1157, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157,
+ 0, 0, 0, 0, 0, 0, 0, 1945, 0, 0,
+ 0, 0, 0, 1157, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1158, 1158, 0, 1157,
+ 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, 1159, 0, 0, 966, 1159,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 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, 1157,
+ 0, 0, 0, 0, 0, 1158, 0, 0, 0, 1158,
+ 0, 0, 1158, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1158, 0, 0, 0, 0, 1159, 1159, 1159, 1159,
+ 1158, 0, 1158, 1158, 0, 1158, 1158, 1158, 1158, 1159,
+ 1158, 0, 1158, 1158, 0, 1158, 0, 0, 0, 0,
+ 0, 0, 0, 1158, 1158, 0, 0, 0, 1158, 1158,
+ 1158, 0, 0, 0, 0, 0, 0, 0, 1158, 1158,
+ 1158, 0, 1158, 0, 1158, 0, 1158, 0, 1158, 0,
+ 1158, 0, 0, 0, 0, 1158, 1158, 0, 1158, 1158,
+ 1158, 0, 0, 0, 1158, 0, 0, 1158, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1158, 0, 0, 1158,
+ 0, 1158, 1158, 1158, 0, 0, 1158, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1157, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1158, 0,
+ 1158, 0, 0, 1158, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1158, 1158, 1158, 1158, 0, 1158, 0,
+ 0, 0, 0, 1158, 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, 796, 0,
+ 0, 1158, 0, 1945, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 0, 0, 0, 1158, 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, 1945, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1157, 0, 0,
+ 0, 0, 0, 0, 1158, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1158, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2625,
+ 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, 1157, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 0, 0, 0, 0, 0, 0, 1158,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1158, 0, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 0, 0, 0, 0, 1157, 0, 0, 0, 0, 1314,
+ 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, 1403, 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, 1157, 0, 0, 0, 1157, 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, 1158, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1158, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 0, 0, 1158, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1895, 0, 0, 0,
+ 1158, 1158, 0, 0, 0, 1158, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1157, 1158, 0, 1158,
+ 0, 1158, 0, 1158, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1158, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1158, 1158, 0,
+ 0, 0, 1158, 0, 1158, 0, 1158, 0, 0, 0,
+ 0, 1158, 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, 1158, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 0, 0, 0, 1158, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1159, 0, 1159, 0, 1158, 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, 1159, 1159, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 1159, 1159, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 1159, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 1159, 1159, 1159, 0, 1159, 1159, 1159, 0, 1158,
+ 0, 0, 0, 0, 0, 1159, 0, 1159, 0, 1158,
+ 1159, 1159, 1159, 1159, 0, 1159, 0, 1159, 1159, 0,
+ 0, 0, 0, 1158, 0, 0, 1158, 0, 0, 0,
+ 0, 1159, 1159, 1159, 1159, 1159, 0, 1159, 1159, 1159,
+ 1159, 1159, 1159, 0, 1159, 1159, 0, 1159, 1159, 0,
+ 1159, 1159, 0, 0, 1159, 1159, 0, 1159, 1159, 0,
+ 1159, 0, 1159, 0, 0, 0, 1159, 1159, 1159, 0,
+ 0, 1159, 1159, 1159, 1159, 0, 1159, 0, 0, 2247,
+ 0, 0, 0, 1159, 0, 2255, 0, 0, 0, 1159,
+ 1159, 1159, 1159, 0, 0, 0, 0, 0, 0, 0,
+ 1159, 1159, 0, 1159, 1159, 0, 0, 1159, 1159, 1159,
+ 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
+ 0, 0, 1159, 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, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1403, 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, 1158, 1158, 0, 1158,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 1158, 1158, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2443, 0, 0, 1158, 1158, 0, 0,
+ 0, 0, 0, 0, 2455, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 0, 1159, 0, 0, 0,
+ 1158, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1158, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1158, 0, 0, 0, 0, 1158, 1158, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1158, 0, 0, 0, 1158,
+ 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, 1159, 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, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 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, 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, 1158, 1158, 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, 2565, 0, 2565, 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,
+ 1158, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 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, 1158, 0, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 1159, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1158, 1158, 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, 1158, 0, 1159, 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, 1159, 1159, 1159, 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, 2809,
+ 0, 0, 0, 2813, 0, 0, 0, 0, 0, 2819,
+ 0, 0, 1158, 0, 1158, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 0, 0, 1159, 1159, 0, 1159, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 0, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2919,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1123, 0, 0, 0,
+ 0, 0, 0, 1159, 0, 0, 0, 1158, 0, 0,
+ 0, 0, 0, 2973, 0, 1159, 0, 0, 2979, 0,
+ 2981, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 0, 1158, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1158, 1159, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3016, 0, 0,
+ 1158, 1158, 0, 0, 0, 0, 0, 0, 0, 3026,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 0, 0, 0, 0, 0, 0, 1159,
+ 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,
+ 1491, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3114, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 0, 0, 0, 1403, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1403, 1403, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1159, 0, 0, 0, 0, 1159, 1159, 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, 1159, 3209, 0, 0, 0, 0, 0, 3212, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1158, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1956,
+ 0, 0, 0, 0, 0, 1158, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1158,
+ 0, 0, 1982, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1996, 1159, 1159, 0, 1158, 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, 2069,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3360, 3360,
+ 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, 3375, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1158, 1895, 0, 0, 0,
+ 0, 1159, 0, 0, 0, 1159, 0, 0, 1159, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1159, 0, 1159, 1159,
+ 0, 1159, 1159, 1159, 1159, 0, 1159, 0, 1159, 1159,
+ 0, 1159, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 1159, 0, 0, 0, 1159, 1159, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 1159, 1159, 0, 1159, 0,
+ 1159, 0, 1159, 0, 1159, 0, 1159, 0, 0, 0,
+ 0, 1159, 1159, 0, 1159, 1159, 1159, 0, 0, 0,
+ 1159, 0, 0, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 0, 0, 1159, 0, 1159, 1159, 1159,
+ 0, 0, 1159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1158, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 0, 1159, 0, 0, 1159,
+ 0, 2263, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 1159, 1159, 1159, 0, 1159, 0, 0, 0, 0, 1159,
+ 0, 0, 0, 0, 3515, 0, 0, 0, 3519, 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, 1159, 0, 1158,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 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, 1158, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1158, 0, 0, 0, 0, 0, 0,
+ 1159, 0, 0, 0, 0, 0, 0, 0, 3360, 3360,
+ 0, 0, 2425, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1159, 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, 2464,
+ 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, 1158, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1159, 0, 0, 0, 3679,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 3703, 0, 0, 0, 0, 0,
+ 1158, 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, 3762, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3771, 0, 0, 0, 0, 1403,
+ 0, 0, 0, 0, 0, 1403, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1403, 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, 1158,
+ 0, 0, 0, 1158, 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, 1159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 0, 1159, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1159, 1159, 0, 0,
+ 0, 1159, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1158, 1159, 0, 1159, 0, 1159, 0, 1159,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1159, 0, 0, 0, 0, 0,
+ 0, 1403, 0, 0, 3983, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1159, 1159, 0, 0, 0, 1159, 0,
+ 1159, 0, 1159, 0, 0, 0, 0, 1159, 0, 0,
+ 2631, 0, 2631, 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, 1159, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 0, 0, 1159, 0, 0, 0, 0, 2680, 0, 0,
+ 0, 2685, 0, 2687, 0, 0, 0, 0, 0, 0,
+ 1159, 2702, 2703, 0, 0, 0, 0, 2732, 0, 0,
+ 0, 2737, 2738, 2739, 0, 2741, 2742, 2743, 0, 0,
+ 0, 0, 0, 0, 0, 2751, 0, 2754, 0, 0,
+ 2755, 2756, 2757, 2758, 0, 0, 0, 2762, 2763, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2774, 2775, 2782, 2786, 2787, 0, 2790, 2791, 2792,
+ 2795, 2796, 0, 0, 2799, 2800, 0, 2806, 2807, 0,
+ 2810, 2811, 0, 0, 0, 2815, 0, 2817, 2818, 0,
+ 2820, 0, 2821, 0, 0, 0, 2824, 2782, 2826, 0,
+ 0, 2832, 0, 2834, 2835, 1159, 2836, 0, 0, 0,
+ 0, 0, 0, 2840, 0, 1159, 0, 0, 0, 2842,
+ 2843, 2844, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 0, 0, 1159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2919, 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, 2940, 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, 4227, 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, 3052, 0, 3057, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 1159, 0, 1159, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4300, 1159, 1159,
+ 1159, 3080, 0, 0, 0, 0, 0, 0, 0, 1403,
+ 0, 0, 0, 1403, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1159, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 3158, 0,
+ 0, 0, 1159, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 0, 0, 0, 1159, 3182, 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, 1403, 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, 4489, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3369, 1159, 1159, 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, 3421, 0, 0, 0,
+ 0, 0, 0, 0, 3428, 3429, 0, 0, 4623, 0,
+ 0, 0, 0, 0, 0, 0, 1159, 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, 3448, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1159, 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, 1159, 1159, 0,
+ 0, 3487, 3489, 3491, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4712, 0, 0,
+ 0, 0, 4717, 4718, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1403, 1403, 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, 3553, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3561, 0, 3562, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0,
+ 1159, 0, 0, 0, 0, 0, 0, 3587, 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, 3601, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2425, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2425, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3656,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3662, 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, 1159, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3682, 0, 0, 0, 0, 0, 0, 3057,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1159, 1159, 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, 3776, 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, 3801, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3801, 0, 0, 0, 0, 2425, 2425, 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, 3887, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5064, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5088, 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, 3950, 3951, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1159, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1159, 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, 4025, 0, 0, 0, 4027, 0, 0, 4028, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4056, 0, 0, 0,
+ 0, 4060, 4061, 4062, 4063, 0, 4064, 0, 4065, 4066,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4071,
+ 4072, 0, 0, 0, 4073, 4074, 4075, 0, 0, 0,
+ 0, 0, 0, 0, 4077, 4078, 4079, 0, 4080, 0,
+ 4082, 1159, 4084, 0, 4086, 0, 4088, 0, 0, 0,
+ 0, 2792, 4091, 0, 2792, 0, 4094, 0, 0, 0,
+ 4095, 0, 0, 4096, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4103, 0, 4104, 4105, 4106,
+ 0, 0, 4107, 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, 4129,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4139, 4142, 0, 0, 4147, 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, 5377, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 0, 0, 0, 0, 0, 0, 0, 4180, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2425, 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,
+ 3057, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1159, 0, 0, 0, 0,
+ 0, 0, 0, 3057, 0, 0, 0, 0, 0, 0,
+ 5508, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5528,
+ 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159,
+ 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, 4328, 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, 1159, 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, 1159, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4474, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4494, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1159, 0, 0, 4502, 1159,
+ 0, 4503, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4523, 4524, 0, 0,
+ 0, 4529, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4549, 0, 4550, 0, 4551, 0, 4552,
+ 0, 0, 0, 0, 0, 5744, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4567, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4588, 4589, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3801, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5790, 0, 1159, 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, 2425, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2425, 0,
+ 0, 0, 2425, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3057, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4795, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3801, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3801,
+ 0, 0, 4809, 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, 5997, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6003, 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, 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,
+ 6113, 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, 4951, 4952, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4959, 4960,
+ 4961, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4983, 4984, 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, 5006, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2425, 0, 0,
+ 0, 0, 2425, 2425, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3057, 0, 0, 0, 3057, 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, 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, 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, 5238, 5239, 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, 3801, 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,
+ 3801, 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, 2425, 2425, 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, 3057, 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, 5474, 0,
+ 5476, 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, 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, 5578, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3801, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2425, 2425, 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, 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,
+ 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, 3801, 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, 3057, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5786, 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, 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, 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, 996, 0, 0, 0, 0, 997,
+ 998, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 999, 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007,
+ 1008, 1009, 1010, 1011, 0, 0, 0, 0, 0, 6006,
+ 0, 1012, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1013, 1014,
+ 1015, 1016, 0, 0, 0, 0, 0, 0, 0, 1017,
+ 1018, 0, 1019, 0, 0, 0, 0, 0, 0, 1020,
+ 1021, 0, 0, 1022, 1023, 1024, 1025, 0, 1026, 13,
+ 0, 1027, 1028, 0, 0, 0, 0, 0, 0, 0,
+ 1029, 0, 0, 1030, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 19, 0, 0,
+ 0, 1031, 1032, 1033, 0, 1034, 0, 0, 0, 0,
+ 0, 0, 0, 1035, 1036, 1037, 22, 0, 0, 0,
+ 0, 0, 1038, 0, 0, 571, 0, 0, 0, 0,
+ 0, 1039, 0, 0, 1040, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1041, 0, 1042, 0, 1043, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6135,
+ 0, 1044, 1045, 0, 1046, 0, 0, 0, 1047, 0,
+ 0, 0, 0, 1048, 0, 0, 29, 1049, 0, 1050,
+ 1051, 1052, 1053, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 1054, 1055, 1056, 0, 1057, 0, 0, 0, 0, 0,
+ 0, 1058, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1059, 0, 0, 0, 0, 0, 0, 0,
+ 1060, 1061, 0, 0, 0, 42, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2069, 0, 0, 0, 0, 1062,
+ 0, 0, 0, 0, 0, 0, 1063, 1064, 0, 1065,
+ 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1067, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1068, 1069, 1070, 0, 0, 49, 0, 0, 1071,
+ 1072, 0, 0, 0, 0, 51, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 1073, 1074,
+ 1075, 1076, 61, 62, 63, 1077, 65, 66, 67, 68,
+ 69, 70, 1078, 72, 73, 74, 75, 76, 77, 78,
+ 1079, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 1080, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 1081, 108, 1082, 1083, 1084, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 1085,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 1086, 1087, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 3057, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 1088, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 1089,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 1090, 1091, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 1092, 264, 265,
+ 266, 267, 268, 1093, 270, 271, 272, 273, 274, 275,
+ 276, 277, 1094, 1095, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 3057, 293,
+ 294, 295, 296, 595, 297, 298, 1096, 300, 301, 302,
+ 303, 304, 305, 306, 1097, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 1098, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 1099, 363, 364, 365, 601, 367, 368, 1100, 370, 371,
+ 372, 373, 374, 375, 1101, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 1102, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 1103, 1104, 1105, 1106, 429, 430,
+ 431, 432, 1107, 1108, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 1109, 448, 1110, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 1111, 607, 1112, 464, 465, 466, 0, 467, 608, 469,
+ 1113, 0, 0, 0, 0, 0, 0, 0, 0, 1114,
+ 1115, 0, 0, 996, 0, 1116, 0, 0, 997, 998,
+ 1117, 0, 0, 0, 1118, 1119, 0, 0, 1120, 999,
+ 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
+ 1009, 1010, 1011, 0, 0, 0, 0, 0, 0, 0,
+ 1012, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1013, 1014, 1015,
+ 1016, 0, 0, 0, 2779, 0, 0, 0, 1017, 1018,
+ 0, 1019, 0, 0, 0, 0, 0, 0, 1020, 1021,
+ 0, 0, 1022, 1023, 1024, 1025, 0, 1026, 13, 0,
+ 1027, 1028, 0, 0, 0, 0, 0, 0, 0, 1029,
+ 0, 0, 1030, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 1031, 1032, 1033, 0, 1034, 0, 0, 0, 0, 0,
+ 0, 0, 1035, 1036, 1037, 22, 0, 0, 0, 0,
+ 0, 1038, 0, 0, 571, 0, 0, 0, 0, 0,
+ 1039, 0, 0, 1040, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1041, 2780, 1042, 0, 1043, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1044, 1045, 0, 1046, 0, 0, 0, 1047, 0, 0,
+ 0, 0, 1048, 0, 0, 29, 1049, 0, 1050, 1051,
+ 1052, 1053, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 1054,
+ 1055, 1056, 0, 1057, 0, 0, 0, 0, 0, 0,
+ 1058, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1059, 0, 0, 0, 0, 0, 0, 0, 1060,
+ 1061, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1062, 0,
+ 0, 0, 0, 0, 0, 1063, 1064, 0, 1065, 1066,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2781, 0,
+ 1067, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1068, 1069, 1070, 0, 0, 0, 0, 0, 1071, 1072,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 1073, 1074, 1075,
+ 1076, 61, 62, 63, 1077, 65, 66, 67, 68, 69,
+ 70, 1078, 72, 73, 74, 75, 76, 77, 78, 1079,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 1080, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 1081,
+ 108, 1082, 1083, 1084, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 1085, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 1086, 1087, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 1088, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 1089, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 1090, 1091, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 1092, 264, 265, 266,
+ 267, 268, 1093, 270, 271, 272, 273, 274, 275, 276,
+ 277, 1094, 1095, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 1096, 300, 301, 302, 303,
+ 304, 305, 306, 1097, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 1098, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 1099,
+ 363, 364, 365, 601, 367, 368, 1100, 370, 371, 372,
+ 373, 374, 375, 1101, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 1102, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 1103, 1104, 1105, 1106, 429, 430, 431,
+ 432, 1107, 1108, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 1109, 448, 1110, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 1111,
+ 607, 1112, 464, 465, 466, 0, 467, 608, 469, 1113,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1114, 1115,
+ 0, 0, 996, 0, 1116, 0, 0, 997, 998, 1117,
+ 0, 0, 0, 1118, 1119, 0, 0, 1120, 999, 1000,
+ 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
+ 1010, 1011, 0, 0, 0, 0, 0, 0, 0, 1012,
+ 0, 0, 0, 0, 0, 0, 2421, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2422, 1014, 1015, 1016,
+ 0, 0, 0, 0, 0, 0, 0, 1017, 1018, 0,
+ 1019, 0, 0, 0, 0, 0, 0, 1020, 1021, 0,
+ 0, 1022, 1023, 1024, 1025, 0, 1026, 13, 0, 1027,
+ 1028, 0, 0, 0, 0, 0, 0, 0, 2423, 0,
+ 0, 1030, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 19, 0, 0, 0, 1031,
+ 1032, 1033, 0, 1034, 0, 0, 0, 0, 0, 0,
+ 0, 1035, 1036, 1037, 22, 0, 0, 0, 0, 0,
+ 1038, 0, 0, 571, 0, 0, 0, 0, 0, 1039,
+ 0, 0, 1040, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1041, 0, 1042, 0, 1043, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1044,
+ 1045, 0, 1046, 0, 0, 0, 1047, 0, 0, 0,
+ 0, 1048, 0, 0, 29, 1049, 0, 1050, 1051, 1052,
+ 1053, 0, 2424, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 1054, 1055,
+ 1056, 0, 1057, 0, 0, 0, 0, 0, 0, 1058,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1059, 0, 0, 0, 0, 0, 0, 0, 1060, 1061,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1062, 0, 0,
+ 0, 0, 0, 0, 1063, 1064, 0, 1065, 1066, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1067,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1068,
+ 1069, 1070, 0, 0, 0, 0, 0, 1071, 1072, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 1073, 1074, 1075, 1076,
+ 61, 62, 63, 1077, 65, 66, 67, 68, 69, 70,
+ 1078, 72, 73, 74, 75, 76, 77, 78, 1079, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 1080, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 1081, 108,
+ 1082, 1083, 1084, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 1085, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 1086,
+ 1087, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 1088, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 1089, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 1090,
+ 1091, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 1092, 264, 265, 266, 267,
+ 268, 1093, 270, 271, 272, 273, 274, 275, 276, 277,
+ 1094, 1095, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 1096, 300, 301, 302, 303, 304,
+ 305, 306, 1097, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 1098, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 1099, 363,
+ 364, 365, 601, 367, 368, 1100, 370, 371, 372, 373,
+ 374, 375, 1101, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 1102, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 1103, 1104, 1105, 1106, 429, 430, 431, 432,
+ 1107, 1108, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 1109, 448, 1110, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 1111, 607,
+ 1112, 464, 465, 466, 0, 467, 608, 469, 1113, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1114, 1115, 0,
+ 0, 996, 0, 1116, 0, 0, 997, 998, 1117, 0,
+ 0, 0, 1118, 1119, 0, 0, 1120, 999, 1000, 0,
+ 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
+ 1011, 0, 0, 0, 0, 0, 0, 0, 1012, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1013, 1014, 1015, 1016, 0,
+ 0, 0, 0, 0, 0, 0, 1017, 1018, 0, 1019,
+ 0, 0, 0, 0, 0, 0, 1020, 1021, 0, 0,
+ 1022, 1023, 1024, 1025, 0, 1026, 13, 0, 1027, 1028,
+ 0, 0, 0, 0, 0, 0, 0, 1029, 0, 0,
+ 1030, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 1031, 1032,
+ 1033, 0, 1034, 0, 0, 0, 0, 0, 0, 0,
+ 1035, 1036, 1037, 22, 0, 0, 0, 0, 0, 1038,
+ 0, 0, 571, 0, 0, 0, 0, 0, 1039, 0,
+ 0, 1040, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1041, 0, 1042, 0, 1043, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1044, 1045,
+ 0, 1046, 0, 0, 0, 1047, 0, 0, 0, 0,
+ 1048, 0, 0, 29, 1049, 0, 1050, 1051, 1052, 1053,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 1054, 1055, 1056,
+ 0, 1057, 0, 0, 0, 0, 0, 0, 1058, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1059,
+ 0, 0, 0, 0, 0, 0, 0, 1060, 1061, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1062, 0, 0, 0,
+ 0, 0, 0, 1063, 1064, 0, 1065, 1066, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1067, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1068, 1069,
+ 1070, 0, 0, 0, 0, 0, 1071, 1072, 0, 1955,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 1073, 1074, 1075, 1076, 61,
+ 62, 63, 1077, 65, 66, 67, 68, 69, 70, 1078,
+ 72, 73, 74, 75, 76, 77, 78, 1079, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 1080, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 1081, 108, 1082,
+ 1083, 1084, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 1085, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 1086, 1087,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 1088, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 1089, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 1090, 1091,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 1092, 264, 265, 266, 267, 268,
+ 1093, 270, 271, 272, 273, 274, 275, 276, 277, 1094,
+ 1095, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 1096, 300, 301, 302, 303, 304, 305,
+ 306, 1097, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 1098, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 1099, 363, 364,
+ 365, 601, 367, 368, 1100, 370, 371, 372, 373, 374,
+ 375, 1101, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 1102, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 1103, 1104, 1105, 1106, 429, 430, 431, 432, 1107,
+ 1108, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 1109, 448, 1110, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 1111, 607, 1112,
+ 464, 465, 466, 0, 467, 608, 469, 1113, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1114, 1115, 0, 0,
+ 996, 0, 1116, 0, 0, 997, 998, 1117, 0, 0,
+ 0, 1118, 1119, 0, 0, 1120, 999, 1000, 0, 1001,
+ 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
+ 0, 0, 0, 0, 0, 0, 0, 1012, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1013, 1014, 1015, 1016, 0, 0,
+ 0, 0, 0, 0, 0, 1017, 1018, 0, 1019, 0,
+ 0, 0, 0, 0, 0, 1020, 1021, 0, 0, 1022,
+ 1023, 1024, 1025, 0, 1026, 13, 0, 1027, 1028, 0,
+ 0, 0, 0, 0, 0, 0, 3054, 0, 0, 1030,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 1031, 1032, 1033,
+ 0, 1034, 0, 0, 0, 0, 0, 0, 0, 1035,
+ 1036, 1037, 22, 0, 0, 0, 0, 0, 1038, 0,
+ 3055, 571, 0, 0, 0, 0, 0, 1039, 0, 0,
+ 1040, 0, 0, 0, 0, 0, 0, 0, 0, 1041,
+ 0, 1042, 0, 1043, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1044, 1045, 0,
+ 1046, 0, 0, 0, 1047, 0, 0, 0, 0, 1048,
+ 0, 0, 29, 1049, 0, 1050, 1051, 1052, 1053, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 1054, 1055, 1056, 0,
+ 1057, 0, 0, 0, 0, 0, 0, 1058, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1059, 0,
+ 0, 0, 0, 0, 0, 0, 1060, 1061, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1062, 0, 0, 0, 0,
+ 0, 0, 1063, 1064, 0, 1065, 1066, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1067, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1068, 1069, 1070,
+ 0, 0, 0, 0, 0, 1071, 1072, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 1073, 1074, 1075, 1076, 61, 62,
+ 63, 1077, 65, 66, 67, 68, 69, 70, 1078, 72,
+ 73, 74, 75, 76, 77, 78, 1079, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 1080, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 1081, 108, 1082, 1083,
+ 1084, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 1085, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 1086, 1087, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 1088, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 1089, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 1090, 1091, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 1092, 264, 265, 266, 267, 268, 1093,
+ 270, 271, 272, 273, 274, 275, 276, 277, 1094, 1095,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 1096, 300, 301, 302, 303, 304, 305, 306,
+ 1097, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 1098, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 1099, 363, 364, 365,
+ 601, 367, 368, 1100, 370, 371, 372, 373, 374, 375,
+ 1101, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 1102, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 1103, 1104, 1105, 1106, 429, 430, 431, 432, 1107, 1108,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 1109, 448, 1110, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 1111, 607, 1112, 464,
+ 465, 466, 0, 467, 608, 469, 1113, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1114, 1115, 0, 0, 996,
+ 0, 1116, 0, 0, 997, 998, 1117, 0, 0, 0,
+ 1118, 1119, 0, 0, 1120, 999, 1000, 0, 1001, 1002,
+ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 0,
+ 0, 0, 0, 0, 0, 0, 1012, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1013, 1014, 1015, 1016, 0, 0, 0,
+ 0, 0, 0, 0, 1017, 1018, 0, 1019, 0, 0,
+ 0, 0, 0, 0, 1020, 1021, 0, 0, 1022, 1023,
+ 1024, 1025, 0, 1026, 13, 0, 1027, 1028, 0, 0,
+ 0, 0, 0, 0, 0, 1029, 0, 0, 1030, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 19, 0, 0, 0, 1031, 1032, 1033, 0,
+ 1034, 0, 0, 0, 3486, 0, 0, 0, 1035, 1036,
+ 1037, 22, 0, 0, 0, 0, 0, 1038, 0, 0,
+ 571, 0, 0, 0, 0, 0, 1039, 0, 0, 1040,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1041, 0,
+ 1042, 0, 1043, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1044, 1045, 0, 1046,
+ 0, 0, 0, 1047, 0, 0, 0, 0, 1048, 0,
+ 0, 29, 1049, 0, 1050, 1051, 1052, 1053, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 1054, 1055, 1056, 0, 1057,
+ 0, 0, 0, 0, 0, 0, 1058, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1059, 0, 0,
+ 0, 0, 0, 0, 0, 1060, 1061, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1062, 0, 0, 0, 0, 0,
+ 0, 1063, 1064, 0, 1065, 1066, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1067, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1068, 1069, 1070, 0,
+ 0, 0, 0, 0, 1071, 1072, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 1073, 1074, 1075, 1076, 61, 62, 63,
+ 1077, 65, 66, 67, 68, 69, 70, 1078, 72, 73,
+ 74, 75, 76, 77, 78, 1079, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 1080, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 1081, 108, 1082, 1083, 1084,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 1085, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 1086, 1087, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 1088, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 1089, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 1090, 1091, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 1092, 264, 265, 266, 267, 268, 1093, 270,
+ 271, 272, 273, 274, 275, 276, 277, 1094, 1095, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 1096, 300, 301, 302, 303, 304, 305, 306, 1097,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 1098, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 1099, 363, 364, 365, 601,
+ 367, 368, 1100, 370, 371, 372, 373, 374, 375, 1101,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 1102, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 1103,
+ 1104, 1105, 1106, 429, 430, 431, 432, 1107, 1108, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 1109, 448, 1110, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 1111, 607, 1112, 464, 465,
+ 466, 0, 467, 608, 469, 1113, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1114, 1115, 0, 0, 996, 0,
+ 1116, 0, 0, 997, 998, 1117, 0, 0, 0, 1118,
+ 1119, 0, 0, 1120, 999, 1000, 0, 1001, 1002, 1003,
+ 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 0, 0,
+ 0, 0, 0, 0, 0, 1012, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1013, 1014, 1015, 1016, 0, 0, 0, 0,
+ 0, 0, 0, 1017, 1018, 0, 1019, 0, 0, 0,
+ 0, 0, 0, 1020, 1021, 0, 0, 1022, 1023, 1024,
+ 1025, 0, 1026, 13, 0, 1027, 1028, 0, 0, 0,
+ 0, 0, 0, 0, 1029, 0, 0, 1030, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 19, 0, 0, 0, 1031, 1032, 1033, 0, 1034,
+ 0, 0, 0, 3488, 0, 0, 0, 1035, 1036, 1037,
+ 22, 0, 0, 0, 0, 0, 1038, 0, 0, 571,
+ 0, 0, 0, 0, 0, 1039, 0, 0, 1040, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1041, 0, 1042,
+ 0, 1043, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1044, 1045, 0, 1046, 0,
+ 0, 0, 1047, 0, 0, 0, 0, 1048, 0, 0,
+ 29, 1049, 0, 1050, 1051, 1052, 1053, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 1054, 1055, 1056, 0, 1057, 0,
+ 0, 0, 0, 0, 0, 1058, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1059, 0, 0, 0,
+ 0, 0, 0, 0, 1060, 1061, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1062, 0, 0, 0, 0, 0, 0,
+ 1063, 1064, 0, 1065, 1066, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1067, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1068, 1069, 1070, 0, 0,
+ 0, 0, 0, 1071, 1072, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 1073, 1074, 1075, 1076, 61, 62, 63, 1077,
+ 65, 66, 67, 68, 69, 70, 1078, 72, 73, 74,
+ 75, 76, 77, 78, 1079, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 1080, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 1081, 108, 1082, 1083, 1084, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 1085, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 1086, 1087, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 1088, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 1089, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 1090, 1091, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 1092, 264, 265, 266, 267, 268, 1093, 270, 271,
+ 272, 273, 274, 275, 276, 277, 1094, 1095, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 1096, 300, 301, 302, 303, 304, 305, 306, 1097, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 1098, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 1099, 363, 364, 365, 601, 367,
+ 368, 1100, 370, 371, 372, 373, 374, 375, 1101, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 1102,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 1103, 1104,
+ 1105, 1106, 429, 430, 431, 432, 1107, 1108, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 1109, 448, 1110, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 1111, 607, 1112, 464, 465, 466,
+ 0, 467, 608, 469, 1113, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1114, 1115, 0, 0, 996, 0, 1116,
+ 0, 0, 997, 998, 1117, 0, 0, 0, 1118, 1119,
+ 0, 0, 1120, 999, 1000, 0, 1001, 1002, 1003, 1004,
+ 1005, 1006, 1007, 1008, 1009, 1010, 1011, 0, 0, 0,
+ 0, 0, 0, 0, 1012, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1013, 1014, 1015, 1016, 0, 0, 0, 0, 0,
+ 0, 0, 1017, 1018, 0, 1019, 0, 0, 0, 0,
+ 0, 0, 1020, 1021, 0, 0, 1022, 1023, 1024, 1025,
+ 0, 1026, 13, 0, 1027, 1028, 0, 0, 0, 0,
+ 0, 0, 0, 1029, 0, 0, 1030, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 19, 0, 0, 0, 1031, 1032, 1033, 0, 1034, 0,
+ 0, 0, 3490, 0, 0, 0, 1035, 1036, 1037, 22,
+ 0, 0, 0, 0, 0, 1038, 0, 0, 571, 0,
+ 0, 0, 0, 0, 1039, 0, 0, 1040, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1041, 0, 1042, 0,
+ 1043, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1044, 1045, 0, 1046, 0, 0,
+ 0, 1047, 0, 0, 0, 0, 1048, 0, 0, 29,
+ 1049, 0, 1050, 1051, 1052, 1053, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 1054, 1055, 1056, 0, 1057, 0, 0,
+ 0, 0, 0, 0, 1058, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1059, 0, 0, 0, 0,
+ 0, 0, 0, 1060, 1061, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1062, 0, 0, 0, 0, 0, 0, 1063,
+ 1064, 0, 1065, 1066, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1067, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1068, 1069, 1070, 0, 0, 0,
+ 0, 0, 1071, 1072, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 1073, 1074, 1075, 1076, 61, 62, 63, 1077, 65,
+ 66, 67, 68, 69, 70, 1078, 72, 73, 74, 75,
+ 76, 77, 78, 1079, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 1080, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 1081, 108, 1082, 1083, 1084, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 1085, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 1086, 1087, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 1088, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 1089, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 1090, 1091, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 1092, 264, 265, 266, 267, 268, 1093, 270, 271, 272,
+ 273, 274, 275, 276, 277, 1094, 1095, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 1096,
+ 300, 301, 302, 303, 304, 305, 306, 1097, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 1098,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 1099, 363, 364, 365, 601, 367, 368,
+ 1100, 370, 371, 372, 373, 374, 375, 1101, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 1102, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 1103, 1104, 1105,
+ 1106, 429, 430, 431, 432, 1107, 1108, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 1109,
+ 448, 1110, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 1111, 607, 1112, 464, 465, 466, 0,
+ 467, 608, 469, 1113, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1114, 1115, 0, 0, 996, 0, 1116, 0,
+ 0, 997, 998, 1117, 0, 0, 0, 1118, 1119, 0,
+ 0, 1120, 999, 1000, 0, 1001, 1002, 1003, 1004, 1005,
+ 1006, 1007, 1008, 1009, 1010, 1011, 0, 0, 0, 0,
+ 0, 0, 0, 1012, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1013, 1014, 1015, 1016, 0, 0, 0, 0, 0, 0,
+ 0, 1017, 1018, 0, 1019, 0, 0, 0, 0, 0,
+ 0, 1020, 1021, 0, 0, 1022, 1023, 1024, 1025, 0,
+ 1026, 13, 0, 1027, 1028, 0, 0, 0, 0, 0,
+ 0, 0, 5030, 0, 0, 1030, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 0, 0, 0, 1031, 1032, 1033, 0, 1034, 0, 0,
+ 0, 0, 0, 0, 0, 1035, 1036, 1037, 22, 0,
+ 0, 0, 0, 0, 1038, 0, 3055, 571, 0, 0,
+ 0, 0, 0, 1039, 0, 0, 1040, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1041, 0, 1042, 0, 1043,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1044, 1045, 0, 1046, 0, 0, 0,
+ 1047, 0, 0, 0, 0, 1048, 0, 0, 29, 1049,
+ 0, 1050, 1051, 1052, 1053, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 1054, 1055, 1056, 0, 1057, 0, 0, 0,
+ 0, 0, 0, 1058, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1059, 0, 0, 0, 0, 0,
+ 0, 0, 1060, 1061, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1062, 0, 0, 0, 0, 0, 0, 1063, 1064,
+ 0, 1065, 1066, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1067, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1068, 1069, 1070, 0, 0, 0, 0,
+ 0, 1071, 1072, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 1073, 1074, 1075, 1076, 61, 62, 63, 1077, 65, 66,
+ 67, 68, 69, 70, 1078, 72, 73, 74, 75, 76,
+ 77, 78, 1079, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 1080,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 1081, 108, 1082, 1083, 1084, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 1085, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 1086, 1087, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 1088,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 1089, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 1090, 1091, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 1092,
+ 264, 265, 266, 267, 268, 1093, 270, 271, 272, 273,
+ 274, 275, 276, 277, 1094, 1095, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 1096, 300,
+ 301, 302, 303, 304, 305, 306, 1097, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 1098, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 1099, 363, 364, 365, 601, 367, 368, 1100,
+ 370, 371, 372, 373, 374, 375, 1101, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 1102, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 1103, 1104, 1105, 1106,
+ 429, 430, 431, 432, 1107, 1108, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 1109, 448,
+ 1110, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 1111, 607, 1112, 464, 465, 466, 0, 467,
+ 608, 469, 1113, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1114, 1115, 0, 0, 996, 0, 1116, 0, 0,
+ 997, 998, 1117, 0, 0, 0, 1118, 1119, 0, 0,
+ 1120, 999, 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006,
+ 1007, 1008, 1009, 1010, 1011, 0, 0, 0, 0, 0,
+ 0, 0, 1012, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1013,
+ 1014, 1015, 1016, 0, 0, 0, 0, 0, 0, 0,
+ 1017, 1018, 0, 1019, 0, 0, 0, 0, 0, 0,
+ 1020, 1021, 0, 0, 1022, 1023, 1024, 1025, 0, 1026,
+ 13, 0, 1027, 1028, 0, 0, 0, 0, 0, 0,
+ 0, 1029, 0, 0, 1030, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 1031, 1032, 1033, 0, 1034, 0, 0, 0,
+ 0, 0, 0, 0, 1035, 1036, 1037, 22, 0, 0,
+ 0, 0, 0, 1038, 0, 0, 571, 0, 0, 0,
+ 0, 0, 1039, 0, 0, 1040, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1041, 0, 1042, 0, 1043, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1044, 1045, 0, 1046, 0, 0, 0, 1047,
+ 0, 0, 0, 0, 1048, 0, 0, 29, 1049, 0,
+ 1050, 1051, 1052, 1053, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 1054, 1055, 1056, 0, 1057, 0, 0, 0, 0,
+ 0, 0, 1058, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1059, 0, 0, 0, 0, 0, 0,
+ 0, 1060, 1061, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1062, 0, 0, 0, 0, 0, 0, 1063, 1064, 0,
+ 1065, 1066, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1067, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1068, 1069, 1070, 0, 0, 0, 0, 0,
+ 1071, 1072, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 1073,
+ 1074, 1075, 1076, 61, 62, 63, 1077, 65, 66, 67,
+ 68, 69, 70, 1078, 72, 73, 74, 75, 76, 77,
+ 78, 1079, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 1080, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 1081, 108, 1082, 1083, 1084, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 1085, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 1086, 1087, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 1088, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 1089, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 1090, 1091, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 1092, 264,
+ 265, 266, 267, 268, 1093, 270, 271, 272, 273, 274,
+ 275, 276, 277, 1094, 1095, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 1096, 300, 301,
+ 302, 303, 304, 305, 306, 1097, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 1098, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 1099, 363, 364, 365, 601, 367, 368, 1100, 370,
+ 371, 372, 373, 374, 375, 1101, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 1102, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 1103, 1104, 1105, 1106, 429,
+ 430, 431, 432, 1107, 1108, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 1109, 448, 1110,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 1111, 607, 1112, 464, 465, 466, 0, 467, 608,
+ 469, 1113, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1114, 1115, 0, 0, 996, 0, 1116, 0, 0, 997,
+ 998, 1117, 0, 0, 0, 1118, 1119, 0, 0, 1120,
+ 999, 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007,
+ 1008, 1009, 1010, 1011, 0, 0, 0, 0, 0, 0,
+ 0, 1012, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1013, 1014,
+ 1015, 1016, 0, 0, 0, 0, 0, 0, 0, 1017,
+ 1018, 0, 1019, 0, 0, 0, 0, 0, 0, 1020,
+ 1021, 0, 0, 1022, 1023, 1024, 1025, 0, 1026, 13,
+ 0, 1027, 1028, 0, 0, 0, 0, 0, 0, 0,
+ 1029, 0, 0, 1030, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 19, 0, 0,
+ 0, 1031, 1032, 1033, 0, 1034, 0, 0, 0, 0,
+ 0, 0, 0, 1035, 1036, 1037, 22, 0, 0, 0,
+ 0, 0, 1038, 0, 0, 571, 0, 0, 0, 0,
+ 0, 1039, 0, 0, 1040, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1041, 0, 1042, 0, 1043, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1044, 1045, 0, 1046, 0, 0, 0, 1047, 0,
+ 0, 0, 0, 1048, 0, 0, 29, 1049, 0, 1050,
+ 1051, 1052, 1053, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 1054, 1055, 1056, 0, 1057, 0, 0, 0, 0, 0,
+ 0, 1058, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1059, 0, 0, 0, 0, 0, 0, 0,
+ 1060, 1061, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1062,
+ 0, 0, 0, 0, 0, 0, 1063, 1064, 0, 1065,
+ 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1067, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1068, 1069, 1070, 0, 0, 0, 0, 0, 1071,
+ 1072, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 1073, 1074,
+ 1075, 1076, 61, 62, 63, 1077, 65, 66, 67, 68,
+ 69, 70, 1078, 72, 73, 74, 75, 76, 77, 78,
+ 1079, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 1080, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 1081, 108, 1082, 1083, 1084, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 1085,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 1086, 1087, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 1088, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 1089,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 1090, 1091, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 1092, 264, 265,
+ 266, 267, 268, 1093, 270, 271, 272, 273, 274, 275,
+ 276, 277, 1094, 1095, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 1096, 300, 301, 302,
+ 303, 304, 305, 306, 1097, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 1098, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 1099, 363, 364, 365, 601, 367, 368, 1100, 370, 371,
+ 372, 373, 374, 375, 1101, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 1102, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 1103, 1104, 1105, 1106, 429, 430,
+ 431, 432, 1107, 1108, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 1109, 448, 1110, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 1111, 607, 1112, 464, 465, 466, 0, 467, 608, 469,
+ 1113, 0, 0, 0, 0, 0, 0, 0, 0, 1114,
+ 1115, 0, 0, 996, 0, 1116, 0, 0, 997, 998,
+ 1981, 0, 0, 0, 1118, 1119, 0, 0, 1120, 999,
+ 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
+ 1009, 1010, 1011, 0, 0, 0, 0, 0, 0, 0,
+ 1012, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1013, 1014, 1015,
+ 1016, 0, 0, 0, 0, 0, 0, 0, 1017, 1018,
+ 0, 1019, 0, 0, 0, 0, 0, 0, 1020, 1021,
+ 0, 0, 1022, 1023, 1024, 1025, 0, 1026, 13, 0,
+ 1027, 1028, 0, 0, 0, 0, 0, 0, 0, 1029,
+ 0, 0, 1030, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 1031, 1032, 1033, 0, 1034, 0, 0, 0, 0, 0,
+ 0, 0, 1035, 1036, 1037, 22, 0, 0, 0, 0,
+ 0, 1038, 0, 0, 571, 0, 0, 0, 0, 0,
+ 1039, 0, 0, 1040, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1041, 0, 1042, 0, 1043, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1044, 1045, 0, 1046, 0, 0, 0, 1047, 0, 0,
+ 0, 0, 1048, 0, 0, 29, 1049, 0, 1050, 1051,
+ 1052, 1053, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 1054,
+ 1055, 1056, 0, 1057, 0, 0, 0, 0, 0, 0,
+ 1058, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1059, 0, 0, 0, 0, 0, 0, 0, 1060,
+ 1061, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1062, 0,
+ 0, 0, 0, 0, 0, 1063, 1064, 0, 1065, 1066,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1067, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1068, 1069, 1070, 0, 0, 0, 0, 0, 1071, 1072,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 1073, 1074, 1075,
+ 1076, 61, 62, 63, 1077, 65, 66, 67, 68, 69,
+ 70, 1078, 72, 73, 74, 75, 76, 77, 78, 1079,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 1080, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 1081,
+ 108, 1082, 1083, 1084, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 1085, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 1086, 1087, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 1088, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 1089, 2629,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 1090, 1091, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 1092, 264, 265, 266,
+ 267, 268, 1093, 270, 271, 272, 273, 274, 275, 276,
+ 277, 1094, 1095, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 1096, 300, 301, 302, 303,
+ 304, 305, 306, 1097, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 1098, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 1099,
+ 363, 364, 365, 601, 367, 368, 1100, 370, 371, 372,
+ 373, 374, 375, 1101, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 1102, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 1103, 1104, 1105, 1106, 429, 430, 431,
+ 432, 1107, 1108, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 2630, 448, 1110, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 1111,
+ 607, 1112, 464, 465, 466, 0, 467, 608, 469, 1113,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1114, 1115,
+ 0, 0, 996, 0, 1116, 0, 0, 997, 998, 1117,
+ 0, 0, 0, 1118, 1119, 0, 0, 1120, 999, 1000,
+ 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
+ 1010, 1011, 0, 0, 0, 0, 0, 0, 0, 1012,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1013, 1014, 1015, 1016,
+ 0, 0, 0, 0, 0, 0, 0, 1017, 1018, 0,
+ 1019, 0, 0, 0, 0, 0, 0, 1020, 1021, 0,
+ 0, 1022, 1023, 1024, 1025, 0, 1026, 13, 0, 1027,
+ 1028, 0, 0, 0, 0, 0, 0, 0, 1029, 0,
+ 0, 1030, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 19, 0, 0, 0, 1031,
+ 1032, 1033, 0, 1034, 0, 0, 0, 0, 0, 0,
+ 0, 1035, 1036, 1037, 22, 0, 0, 0, 0, 0,
+ 1038, 0, 0, 571, 0, 0, 0, 0, 0, 1039,
+ 0, 0, 1040, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1041, 0, 1042, 0, 1043, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1044,
+ 1045, 0, 1046, 0, 0, 0, 1047, 0, 0, 0,
+ 0, 1048, 0, 0, 29, 1049, 0, 1050, 1051, 1052,
+ 1053, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 1054, 1055,
+ 1056, 0, 1057, 0, 0, 0, 0, 0, 0, 1058,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1059, 0, 0, 0, 0, 0, 0, 0, 1060, 1061,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1062, 0, 0,
+ 0, 0, 0, 0, 1063, 1064, 0, 1065, 1066, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1067,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1068,
+ 1069, 1070, 0, 0, 0, 0, 0, 1071, 1072, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 1073, 1074, 1075, 1076,
+ 61, 62, 63, 1077, 65, 66, 67, 68, 69, 70,
+ 1078, 72, 73, 74, 75, 76, 77, 78, 1079, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 1080, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 1081, 108,
+ 1082, 1083, 1084, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 1085, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 1086,
+ 1087, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 1088, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 1089, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 1090,
+ 1091, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 1092, 264, 265, 266, 267,
+ 268, 1093, 270, 271, 272, 273, 274, 275, 276, 277,
+ 1094, 1095, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 1096, 300, 301, 302, 303, 304,
+ 305, 306, 1097, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 1098, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 1099, 363,
+ 364, 365, 601, 367, 368, 1100, 370, 371, 372, 373,
+ 374, 375, 1101, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 1102, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 1103, 1104, 1105, 1106, 429, 430, 431, 432,
+ 1107, 1108, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 2630, 448, 1110, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 1111, 607,
+ 1112, 464, 465, 466, 0, 467, 608, 469, 1113, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1114, 1115, 0,
+ 0, 996, 0, 1116, 0, 0, 997, 998, 1117, 0,
+ 0, 0, 1118, 1119, 0, 0, 1120, 999, 1000, 0,
+ 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
+ 1011, 0, 0, 0, 0, 0, 0, 0, 1012, 0,
+ 0, 0, 0, 0, 0, 2851, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1013, 1014, 1015, 1016, 0,
+ 0, 0, 0, 0, 0, 0, 1017, 1018, 0, 1019,
+ 0, 0, 0, 0, 0, 0, 1020, 1021, 0, 0,
+ 1022, 1023, 1024, 1025, 0, 1026, 13, 0, 1027, 1028,
+ 0, 0, 0, 0, 0, 0, 0, 1029, 0, 0,
+ 1030, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 1031, 1032,
+ 1033, 0, 1034, 0, 0, 0, 0, 0, 0, 0,
+ 1035, 1036, 1037, 22, 0, 0, 0, 0, 0, 1038,
+ 0, 0, 571, 0, 0, 0, 0, 0, 1039, 0,
+ 0, 1040, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1041, 0, 1042, 0, 1043, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1044, 1045,
+ 0, 1046, 0, 0, 0, 1047, 0, 0, 0, 0,
+ 1048, 0, 0, 29, 0, 0, 1050, 1051, 1052, 1053,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 1054, 1055, 1056,
+ 0, 1057, 0, 0, 0, 0, 0, 0, 1058, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1059,
+ 0, 0, 0, 0, 0, 0, 0, 1060, 1061, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1062, 0, 0, 0,
+ 0, 0, 0, 1063, 1064, 0, 1065, 1066, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1067, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1068, 1069,
+ 1070, 0, 0, 0, 0, 0, 1071, 1072, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 1073, 1074, 1075, 1076, 61,
+ 62, 63, 1077, 65, 66, 67, 68, 69, 2852, 1078,
+ 72, 73, 74, 75, 76, 77, 78, 1079, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 1080, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 1081, 108, 1082,
+ 1083, 1084, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 1085, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 1086, 1087,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 1088, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 1089, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 1090, 1091,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 1092, 264, 265, 266, 267, 268,
+ 1093, 270, 271, 272, 273, 274, 275, 276, 277, 1094,
+ 1095, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 1096, 300, 301, 302, 303, 304, 305,
+ 306, 1097, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 1098, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 1099, 363, 364,
+ 365, 601, 367, 368, 1100, 370, 371, 372, 373, 374,
+ 375, 1101, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 1102, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 1103, 1104, 1105, 1106, 429, 430, 431, 432, 1107,
+ 1108, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 1109, 448, 1110, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 1111, 607, 1112,
+ 464, 465, 466, 0, 467, 608, 469, 1113, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1114, 1115, 0, 0,
+ 996, 0, 1116, 0, 0, 997, 998, 1117, 0, 0,
+ 0, 1118, 1119, 0, 0, 1120, 999, 1000, 0, 1001,
+ 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
+ 0, 0, 0, 0, 0, 0, 0, 1012, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1013, 1014, 1015, 1016, 0, 0,
+ 0, 0, 0, 0, 0, 1017, 1018, 0, 1019, 0,
+ 0, 0, 0, 0, 0, 1020, 1021, 0, 0, 1022,
+ 1023, 1024, 1025, 0, 1026, 13, 0, 1027, 1028, 0,
+ 0, 0, 0, 0, 0, 0, 1029, 0, 0, 1030,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 1031, 1032, 1033,
+ 0, 1034, 0, 0, 0, 0, 0, 0, 0, 1035,
+ 1036, 1037, 22, 0, 0, 0, 0, 0, 1038, 0,
+ 0, 571, 0, 0, 0, 0, 0, 1039, 0, 0,
+ 4087, 0, 0, 0, 0, 0, 0, 0, 0, 1041,
+ 0, 1042, 0, 1043, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1044, 1045, 0,
+ 1046, 0, 0, 0, 1047, 0, 0, 0, 0, 1048,
+ 0, 0, 29, 1049, 0, 1050, 1051, 1052, 1053, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 1054, 1055, 1056, 0,
+ 1057, 0, 0, 0, 0, 0, 0, 1058, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1059, 0,
+ 0, 0, 0, 0, 0, 0, 1060, 1061, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1062, 0, 0, 0, 0,
+ 0, 0, 1063, 1064, 0, 1065, 1066, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1067, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1068, 1069, 1070,
+ 0, 0, 0, 0, 0, 1071, 1072, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 1073, 1074, 1075, 1076, 61, 62,
+ 63, 1077, 65, 66, 67, 68, 69, 70, 1078, 72,
+ 73, 74, 75, 76, 77, 78, 1079, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 1080, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 1081, 108, 1082, 1083,
+ 1084, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 1085, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 1086, 1087, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 1088, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 1089, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 1090, 1091, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 1092, 264, 265, 266, 267, 268, 1093,
+ 270, 271, 272, 273, 274, 275, 276, 277, 1094, 1095,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 1096, 300, 301, 302, 303, 304, 305, 306,
+ 1097, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 1098, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 1099, 363, 364, 365,
+ 601, 367, 368, 1100, 370, 371, 372, 373, 374, 375,
+ 1101, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 1102, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 1103, 1104, 1105, 1106, 429, 430, 431, 432, 1107, 1108,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 1109, 448, 1110, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 1111, 607, 1112, 464,
+ 465, 466, 0, 467, 608, 469, 1113, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1114, 1115, 0, 0, 996,
+ 0, 1116, 0, 0, 997, 998, 1117, 0, 0, 0,
+ 1118, 1119, 0, 0, 1120, 999, 1000, 0, 1001, 1002,
+ 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 0,
+ 0, 0, 0, 0, 0, 0, 1012, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1013, 1014, 1015, 1016, 0, 0, 0,
+ 0, 0, 0, 0, 1017, 1018, 0, 1019, 0, 0,
+ 0, 0, 0, 0, 1020, 1021, 0, 0, 1022, 1023,
+ 1024, 1025, 0, 1026, 13, 0, 1027, 1028, 0, 0,
+ 0, 0, 0, 0, 0, 1029, 0, 0, 1030, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 19, 0, 0, 0, 1031, 1032, 1033, 0,
+ 1034, 0, 0, 0, 0, 0, 0, 0, 1035, 1036,
+ 1037, 22, 0, 0, 0, 0, 0, 1038, 0, 0,
+ 571, 0, 0, 0, 0, 0, 1039, 0, 0, 4102,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1041, 0,
+ 1042, 0, 1043, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1044, 1045, 0, 1046,
+ 0, 0, 0, 1047, 0, 0, 0, 0, 1048, 0,
+ 0, 29, 1049, 0, 1050, 1051, 1052, 1053, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 1054, 1055, 1056, 0, 1057,
+ 0, 0, 0, 0, 0, 0, 1058, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1059, 0, 0,
+ 0, 0, 0, 0, 0, 1060, 1061, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1062, 0, 0, 0, 0, 0,
+ 0, 1063, 1064, 0, 1065, 1066, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1067, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1068, 1069, 1070, 0,
+ 0, 0, 0, 0, 1071, 1072, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 1073, 1074, 1075, 1076, 61, 62, 63,
+ 1077, 65, 66, 67, 68, 69, 70, 1078, 72, 73,
+ 74, 75, 76, 77, 78, 1079, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 1080, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 1081, 108, 1082, 1083, 1084,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 1085, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 1086, 1087, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 1088, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 1089, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 1090, 1091, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 1092, 264, 265, 266, 267, 268, 1093, 270,
+ 271, 272, 273, 274, 275, 276, 277, 1094, 1095, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 1096, 300, 301, 302, 303, 304, 305, 306, 1097,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 1098, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 1099, 363, 364, 365, 601,
+ 367, 368, 1100, 370, 371, 372, 373, 374, 375, 1101,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 1102, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 1103,
+ 1104, 1105, 1106, 429, 430, 431, 432, 1107, 1108, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 1109, 448, 1110, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 1111, 607, 1112, 464, 465,
+ 466, 0, 467, 608, 469, 1113, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1114, 1115, 0, 0, 996, 0,
+ 1116, 0, 0, 997, 998, 1117, 0, 0, 0, 1118,
+ 1119, 0, 0, 1120, 999, 1000, 0, 1001, 1002, 1003,
+ 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 0, 0,
+ 0, 0, 0, 0, 0, 1012, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1013, 1014, 1015, 1016, 0, 0, 0, 0,
+ 0, 0, 0, 1017, 1018, 0, 1019, 0, 0, 0,
+ 0, 0, 0, 1020, 1021, 0, 0, 1022, 1023, 1024,
+ 1025, 0, 1026, 13, 0, 1027, 1028, 0, 0, 0,
+ 0, 0, 0, 0, 1029, 0, 0, 1030, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 19, 0, 0, 0, 1031, 1032, 1033, 0, 1034,
+ 0, 0, 0, 0, 0, 0, 0, 1035, 1036, 1037,
+ 22, 0, 0, 0, 0, 0, 1038, 0, 0, 571,
+ 0, 0, 0, 0, 0, 1039, 0, 0, 1040, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1041, 0, 1042,
+ 0, 1043, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1044, 1045, 6226, 1046, 0,
+ 0, 0, 1047, 0, 0, 0, 0, 1048, 0, 0,
+ 29, 0, 0, 1050, 1051, 1052, 1053, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 1054, 1055, 1056, 0, 1057, 0,
+ 0, 0, 0, 0, 0, 1058, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1059, 0, 0, 0,
+ 0, 0, 0, 0, 1060, 1061, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1062, 0, 0, 0, 0, 0, 0,
+ 1063, 1064, 0, 1065, 1066, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1067, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1068, 1069, 1070, 0, 0,
+ 0, 0, 0, 1071, 1072, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 1073, 1074, 1075, 1076, 61, 62, 63, 1077,
+ 65, 66, 67, 68, 69, 70, 1078, 72, 73, 74,
+ 75, 76, 77, 78, 1079, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 1080, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 1081, 108, 1082, 1083, 1084, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 1085, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 1086, 1087, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 1088, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 1089, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 1090, 1091, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 1092, 264, 265, 266, 267, 268, 1093, 270, 271,
+ 272, 273, 274, 275, 276, 277, 1094, 1095, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 1096, 300, 301, 302, 303, 304, 305, 306, 1097, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 1098, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 1099, 363, 364, 365, 601, 367,
+ 368, 1100, 370, 371, 372, 373, 374, 375, 1101, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 1102,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 1103, 1104,
+ 1105, 1106, 429, 430, 431, 432, 1107, 1108, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 1109, 448, 1110, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 1111, 607, 1112, 464, 465, 466,
+ 0, 467, 608, 469, 1113, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1114, 1115, 0, 0, 996, 0, 1116,
+ 0, 0, 997, 998, 1117, 0, 0, 0, 1118, 1119,
+ 0, 0, 1120, 999, 1000, 0, 1001, 1002, 1003, 1004,
+ 1005, 1006, 1007, 1008, 1009, 1010, 1011, 0, 0, 0,
+ 0, 0, 0, 0, 1012, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1013, 1014, 1015, 1016, 0, 0, 0, 0, 0,
+ 0, 0, 1017, 1018, 0, 1019, 0, 0, 0, 0,
+ 0, 0, 1020, 1021, 0, 0, 1022, 1023, 1024, 1025,
+ 0, 1026, 13, 0, 1027, 1028, 0, 0, 0, 0,
+ 0, 0, 0, 1029, 0, 0, 1030, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 19, 0, 0, 0, 1031, 1032, 1033, 0, 1034, 0,
+ 0, 0, 0, 0, 0, 0, 1035, 1036, 1037, 22,
+ 0, 0, 0, 0, 0, 1038, 0, 0, 571, 0,
+ 0, 0, 0, 0, 1039, 0, 0, 1948, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1041, 0, 1042, 0,
+ 1043, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1044, 1045, 0, 1046, 0, 0,
+ 0, 1047, 0, 0, 0, 0, 1048, 0, 0, 29,
+ 0, 0, 1050, 1051, 1052, 1053, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 1054, 1055, 1056, 0, 1057, 0, 0,
+ 0, 0, 0, 0, 1058, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1059, 0, 0, 0, 0,
+ 0, 0, 0, 1060, 1061, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1062, 0, 0, 0, 0, 0, 0, 1063,
+ 1064, 0, 1065, 1066, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1067, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1068, 1069, 1070, 0, 0, 0,
+ 0, 0, 1071, 1072, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 1073, 1074, 1075, 1076, 61, 62, 63, 1077, 65,
+ 66, 67, 68, 69, 70, 1078, 72, 73, 74, 75,
+ 76, 77, 78, 1079, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 1080, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 1081, 108, 1082, 1083, 1084, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 1085, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 1086, 1087, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 1088, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 1089, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 1090, 1091, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 1092, 264, 265, 266, 267, 268, 1093, 270, 271, 272,
+ 273, 274, 275, 276, 277, 1094, 1095, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 1096,
+ 300, 301, 302, 303, 304, 305, 306, 1097, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 1098,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 1099, 363, 364, 365, 601, 367, 368,
+ 1100, 370, 371, 372, 373, 374, 375, 1101, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 1102, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 1103, 1104, 1105,
+ 1106, 429, 430, 431, 432, 1107, 1108, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 1109,
+ 448, 1110, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 1111, 607, 1112, 464, 465, 466, 0,
+ 467, 608, 469, 1113, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1949, 1950, 0, 0, 996, 0, 1116, 0,
+ 0, 997, 998, 1117, 0, 0, 0, 1118, 1119, 0,
+ 0, 1120, 999, 1000, 0, 1001, 1002, 1003, 1004, 1005,
+ 1006, 1007, 1008, 1009, 1010, 1011, 0, 0, 0, 0,
+ 0, 0, 0, 1012, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1013, 1014, 1015, 1016, 0, 0, 0, 0, 0, 0,
+ 0, 1017, 1018, 0, 1019, 0, 0, 0, 0, 0,
+ 0, 1020, 1021, 0, 0, 1022, 1023, 1024, 1025, 0,
+ 1026, 13, 0, 1027, 1028, 0, 0, 0, 0, 0,
+ 0, 0, 1029, 0, 0, 1030, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 0, 0, 0, 1031, 1032, 1033, 0, 1034, 0, 0,
+ 0, 0, 0, 0, 0, 1035, 1036, 1037, 22, 0,
+ 0, 0, 0, 0, 1038, 0, 0, 571, 0, 0,
+ 0, 0, 0, 1039, 0, 0, 2062, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1041, 0, 1042, 0, 1043,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1044, 1045, 0, 1046, 0, 0, 0,
+ 1047, 0, 0, 0, 0, 1048, 0, 0, 29, 0,
+ 0, 1050, 1051, 1052, 1053, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 1054, 1055, 1056, 0, 1057, 0, 0, 0,
+ 0, 0, 0, 1058, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1059, 0, 0, 0, 0, 0,
+ 0, 0, 1060, 1061, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1062, 0, 0, 0, 0, 0, 0, 1063, 1064,
+ 0, 1065, 1066, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1067, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1068, 1069, 1070, 0, 0, 0, 0,
+ 0, 1071, 1072, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 1073, 1074, 1075, 1076, 61, 62, 63, 1077, 65, 66,
+ 67, 68, 69, 70, 1078, 72, 73, 74, 75, 76,
+ 77, 78, 1079, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 1080,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 1081, 108, 1082, 1083, 1084, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 1085, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 1086, 1087, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 1088,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 1089, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 1090, 1091, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 1092,
+ 264, 265, 266, 267, 268, 1093, 270, 271, 272, 273,
+ 274, 275, 276, 277, 1094, 1095, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 1096, 300,
+ 301, 302, 303, 304, 305, 306, 1097, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 1098, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 1099, 363, 364, 365, 601, 367, 368, 1100,
+ 370, 371, 372, 373, 374, 375, 1101, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 1102, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 1103, 1104, 1105, 1106,
+ 429, 430, 431, 432, 1107, 1108, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 1109, 448,
+ 1110, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 1111, 607, 1112, 464, 465, 466, 0, 467,
+ 608, 469, 1113, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1949, 1950, 0, 0, 996, 0, 1116, 0, 0,
+ 997, 998, 1117, 0, 0, 0, 1118, 1119, 0, 0,
+ 1120, 999, 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006,
+ 1007, 1008, 1009, 1010, 1011, 0, 0, 0, 0, 0,
+ 0, 0, 1012, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1013,
+ 1014, 1015, 1016, 0, 0, 0, 0, 0, 0, 0,
+ 1017, 1018, 0, 1019, 0, 0, 0, 0, 0, 0,
+ 1020, 1021, 0, 0, 1022, 1023, 1024, 1025, 0, 1026,
+ 13, 0, 1027, 1028, 0, 0, 0, 0, 0, 0,
+ 0, 1029, 0, 0, 1030, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 1031, 1032, 1033, 0, 1034, 0, 0, 0,
+ 0, 0, 0, 0, 1035, 1036, 1037, 22, 0, 0,
+ 0, 0, 0, 1038, 0, 0, 571, 0, 0, 0,
+ 0, 0, 1039, 0, 0, 2064, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1041, 0, 1042, 0, 1043, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1044, 1045, 0, 1046, 0, 0, 0, 1047,
+ 0, 0, 0, 0, 1048, 0, 0, 29, 0, 0,
+ 1050, 1051, 1052, 1053, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 1054, 1055, 1056, 0, 1057, 0, 0, 0, 0,
+ 0, 0, 1058, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1059, 0, 0, 0, 0, 0, 0,
+ 0, 1060, 1061, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1062, 0, 0, 0, 0, 0, 0, 1063, 1064, 0,
+ 1065, 1066, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1067, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1068, 1069, 1070, 0, 0, 0, 0, 0,
+ 1071, 1072, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 1073,
+ 1074, 1075, 1076, 61, 62, 63, 1077, 65, 66, 67,
+ 68, 69, 70, 1078, 72, 73, 74, 75, 76, 77,
+ 78, 1079, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 1080, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 1081, 108, 1082, 1083, 1084, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 1085, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 1086, 1087, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 1088, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 1089, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 1090, 1091, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 1092, 264,
+ 265, 266, 267, 268, 1093, 270, 271, 272, 273, 274,
+ 275, 276, 277, 1094, 1095, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 1096, 300, 301,
+ 302, 303, 304, 305, 306, 1097, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 1098, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 1099, 363, 364, 365, 601, 367, 368, 1100, 370,
+ 371, 372, 373, 374, 375, 1101, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 1102, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 1103, 1104, 1105, 1106, 429,
+ 430, 431, 432, 1107, 1108, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 1109, 448, 1110,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 1111, 607, 1112, 464, 465, 466, 0, 467, 608,
+ 469, 1113, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1949, 1950, 0, 0, 996, 0, 1116, 0, 0, 997,
+ 998, 1117, 0, 0, 0, 1118, 1119, 0, 0, 1120,
+ 999, 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007,
+ 1008, 1009, 1010, 1011, 0, 0, 0, 0, 0, 0,
+ 0, 1012, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1013, 1014,
+ 1015, 1016, 0, 0, 0, 0, 0, 0, 0, 1017,
+ 1018, 0, 1019, 0, 0, 0, 0, 0, 0, 1020,
+ 1021, 0, 0, 1022, 1023, 1024, 1025, 0, 1026, 13,
+ 0, 1027, 1028, 0, 0, 0, 0, 0, 0, 0,
+ 1029, 0, 0, 1030, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 19, 0, 0,
+ 0, 1031, 1032, 1033, 0, 1034, 0, 0, 0, 0,
+ 0, 0, 0, 1035, 1036, 1037, 22, 0, 0, 0,
+ 0, 0, 1038, 0, 0, 571, 0, 0, 0, 0,
+ 0, 1039, 0, 0, 1040, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1041, 0, 1042, 0, 1043, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1044, 1045, 0, 1046, 0, 0, 0, 1047, 0,
+ 0, 0, 0, 1048, 0, 0, 29, 0, 0, 1050,
+ 1051, 1052, 1053, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 1054, 1055, 1056, 0, 1057, 0, 0, 0, 0, 0,
+ 0, 1058, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1059, 0, 0, 0, 0, 0, 0, 0,
+ 1060, 1061, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1062,
+ 0, 0, 0, 0, 0, 0, 1063, 1064, 0, 1065,
+ 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1067, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1068, 1069, 1070, 0, 0, 0, 0, 0, 1071,
+ 1072, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 1073, 1074,
+ 1075, 1076, 61, 62, 63, 1077, 65, 66, 67, 68,
+ 69, 70, 1078, 72, 73, 74, 75, 76, 77, 78,
+ 1079, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 1080, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 1081, 108, 1082, 1083, 1084, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 1085,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 1086, 1087, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 1088, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 1089,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 1090, 1091, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 1092, 264, 265,
+ 266, 267, 268, 1093, 270, 271, 272, 273, 274, 275,
+ 276, 277, 1094, 1095, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 1096, 300, 301, 302,
+ 303, 304, 305, 306, 1097, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 1098, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 1099, 363, 364, 365, 601, 367, 368, 1100, 370, 371,
+ 372, 373, 374, 375, 1101, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 1102, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 1103, 1104, 1105, 1106, 429, 430,
+ 431, 432, 1107, 1108, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 1109, 448, 1110, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 1111, 607, 1112, 464, 465, 466, 0, 467, 608, 469,
+ 1113, 0, 0, 0, 0, 0, 0, 0, 0, 1114,
+ 1115, 0, 0, 996, 0, 1116, 0, 0, 997, 998,
+ 1117, 0, 0, 0, 1118, 1119, 0, 0, 1120, 999,
+ 1000, 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
+ 1009, 1010, 1011, 0, 0, 0, 0, 0, 0, 0,
+ 1012, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1013, 1014, 1015,
+ 1016, 0, 0, 0, 0, 0, 0, 0, 1017, 1018,
+ 0, 1019, 0, 0, 0, 0, 0, 0, 1020, 1021,
+ 0, 0, 1022, 1023, 1024, 1025, 0, 1026, 13, 0,
+ 1027, 1028, 0, 0, 0, 0, 0, 0, 0, 1029,
+ 0, 0, 1030, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 1031, 1032, 1033, 0, 1034, 0, 0, 0, 0, 0,
+ 0, 0, 1035, 1036, 1037, 22, 0, 0, 0, 0,
+ 0, 1038, 0, 0, 571, 0, 0, 0, 0, 0,
+ 1039, 0, 0, 2872, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1041, 0, 1042, 0, 1043, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1044, 1045, 0, 1046, 0, 0, 0, 1047, 0, 0,
+ 0, 0, 1048, 0, 0, 29, 0, 0, 1050, 1051,
+ 1052, 1053, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 1054,
+ 1055, 1056, 0, 1057, 0, 0, 0, 0, 0, 0,
+ 1058, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1059, 0, 0, 0, 0, 0, 0, 0, 1060,
+ 1061, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1062, 0,
+ 0, 0, 0, 0, 0, 1063, 1064, 0, 1065, 1066,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1067, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1068, 1069, 1070, 0, 0, 0, 0, 0, 1071, 1072,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 1073, 1074, 1075,
+ 1076, 61, 62, 63, 1077, 65, 66, 67, 68, 69,
+ 70, 1078, 72, 73, 74, 75, 76, 77, 78, 1079,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 1080, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 1081,
+ 108, 1082, 1083, 1084, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 1085, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 1086, 1087, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 1088, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 1089, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 1090, 1091, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 1092, 264, 265, 266,
+ 267, 268, 1093, 270, 271, 272, 273, 274, 275, 276,
+ 277, 1094, 1095, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 1096, 300, 301, 302, 303,
+ 304, 305, 306, 1097, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 1098, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 1099,
+ 363, 364, 365, 601, 367, 368, 1100, 370, 371, 372,
+ 373, 374, 375, 1101, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 1102, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 1103, 1104, 1105, 1106, 429, 430, 431,
+ 432, 1107, 1108, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 1109, 448, 1110, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 1111,
+ 607, 1112, 464, 465, 466, 0, 467, 608, 469, 1113,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1114, 1115,
+ 0, 0, 996, 0, 1116, 0, 0, 997, 998, 1117,
+ 0, 0, 0, 1118, 1119, 0, 0, 1120, 999, 1000,
+ 0, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
+ 1010, 1011, 0, 0, 0, 0, 0, 0, 0, 1012,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1013, 1014, 1015, 1016,
+ 0, 0, 0, 0, 0, 0, 0, 1017, 1018, 0,
+ 1019, 0, 0, 0, 0, 0, 0, 1020, 1021, 0,
+ 0, 1022, 1023, 1024, 1025, 0, 1026, 13, 0, 1027,
+ 1028, 0, 0, 0, 0, 0, 0, 0, 1029, 0,
+ 0, 1030, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 19, 0, 0, 0, 1031,
+ 1032, 1033, 0, 1034, 0, 0, 0, 0, 0, 0,
+ 0, 1035, 1036, 1037, 22, 0, 0, 0, 0, 0,
+ 1038, 0, 0, 571, 0, 0, 0, 0, 0, 1039,
+ 0, 0, 2874, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1041, 0, 1042, 0, 1043, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1044,
+ 1045, 0, 1046, 0, 0, 0, 1047, 0, 0, 0,
+ 0, 1048, 0, 0, 29, 0, 0, 1050, 1051, 1052,
+ 1053, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 1054, 1055,
+ 1056, 0, 1057, 0, 0, 0, 0, 0, 0, 1058,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1059, 0, 0, 0, 0, 0, 0, 0, 1060, 1061,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1062, 0, 0,
+ 0, 0, 0, 0, 1063, 1064, 0, 1065, 1066, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1067,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1068,
+ 1069, 1070, 0, 0, 0, 0, 0, 1071, 1072, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 1073, 1074, 1075, 1076,
+ 61, 62, 63, 1077, 65, 66, 67, 68, 69, 70,
+ 1078, 72, 73, 74, 75, 76, 77, 78, 1079, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 1080, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 1081, 108,
+ 1082, 1083, 1084, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 1085, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 1086,
+ 1087, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 1088, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 1089, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 1090,
+ 1091, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 1092, 264, 265, 266, 267,
+ 268, 1093, 270, 271, 272, 273, 274, 275, 276, 277,
+ 1094, 1095, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 1096, 300, 301, 302, 303, 304,
+ 305, 306, 1097, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 1098, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 1099, 363,
+ 364, 365, 601, 367, 368, 1100, 370, 371, 372, 373,
+ 374, 375, 1101, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 1102, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 1103, 1104, 1105, 1106, 429, 430, 431, 432,
+ 1107, 1108, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 1109, 448, 1110, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 1111, 607,
+ 1112, 464, 465, 466, 0, 467, 608, 469, 1113, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1114, 1115, 0,
+ 0, 996, 0, 1116, 0, 0, 997, 998, 1117, 0,
+ 0, 0, 1118, 1119, 0, 0, 1120, 6088, 6089, 0,
+ 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
+ 1011, 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, 1014, 1015, 1016, 0,
+ 0, 0, 0, 0, 0, 0, 1017, 1018, 0, 1019,
+ 0, 0, 0, 0, 0, 0, 1020, 1021, 0, 0,
+ 1022, 1023, 1024, 1025, 0, 1026, 13, 0, 1027, 1028,
+ 0, 0, 0, 0, 0, 0, 0, 1029, 0, 0,
+ 1030, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 1031, 1032,
+ 1033, 0, 1034, 0, 0, 0, 0, 0, 0, 0,
+ 1035, 1036, 1037, 22, 0, 0, 0, 0, 0, 1038,
+ 0, 0, 571, 0, 0, 0, 0, 0, 1039, 0,
+ 0, 1948, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1041, 0, 1042, 0, 1043, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1044, 1045,
+ 0, 1046, 0, 0, 0, 1047, 0, 0, 0, 0,
+ 1048, 0, 0, 29, 0, 0, 1050, 1051, 1052, 1053,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 1054, 1055, 1056,
+ 0, 1057, 0, 0, 0, 0, 0, 0, 1058, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1059,
+ 0, 0, 0, 0, 0, 0, 0, 1060, 1061, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1062, 0, 0, 0,
+ 0, 0, 0, 1063, 1064, 0, 1065, 1066, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1067, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1068, 1069,
+ 1070, 0, 0, 0, 0, 0, 1071, 1072, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 1073, 1074, 1075, 1076, 61,
+ 62, 63, 1077, 65, 66, 67, 68, 69, 70, 1078,
+ 72, 73, 74, 75, 76, 77, 78, 1079, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 1080, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 1081, 108, 1082,
+ 1083, 1084, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 1085, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 1086, 1087,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 1088, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 1089, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 1090, 1091,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 1092, 264, 265, 266, 267, 268,
+ 1093, 270, 271, 272, 273, 274, 275, 276, 277, 1094,
+ 1095, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 1096, 300, 301, 302, 303, 304, 305,
+ 306, 1097, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 1098, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 1099, 363, 364,
+ 365, 601, 367, 368, 1100, 370, 371, 372, 373, 374,
+ 375, 1101, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 1102, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 1103, 1104, 1105, 1106, 429, 430, 431, 432, 1107,
+ 1108, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 1109, 448, 1110, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 1111, 607, 1112,
+ 464, 465, 466, 0, 467, 608, 469, 1113, 0, 0,
+ 0, 0, 0, 0, 0, 0, 6090, 6091, 0, 0,
+ 996, 0, 0, 0, 0, 1986, 0, 6092, 0, 0,
+ 0, 0, 1119, 0, 0, 1120, 1941, 1942, 0, 1001,
+ 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
+ 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, 13, 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, 19, 0, 0, 0, 0, 0, 1033,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 1053, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 1067, 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, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 2908, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 2909, 426, 427, 2910, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 6384, 467, 608, 469, 470, 2828, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1120, 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, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 6384, 467, 608, 469, 470, 2828,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 5, 0, 0, 0, 0, 0, 0, 0, 6385,
+ 0, 0, 0, 0, 0, 0, 2829, 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, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 1986, 467, 608, 469,
+ 470, 0, 0, 0, 0, 0, 0, 1941, 1942, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2829, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 1986, 467, 608, 469, 470, 0, 0,
+ 0, 0, 0, 0, 1941, 1942, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1987, 0, 0,
+ 0, 0, 0, 0, 0, 1120, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 2828, 467, 608, 469, 470, 0, 0, 0, 0, 0,
+ 0, 4, 5, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1120, 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,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 1, 0, 2, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2829,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 8, 0, 9, 0, 10, 0, 11,
+ 0, 0, 0, 0, 0, 0, 0, 12, 0, 0,
+ 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 14, 0, 0, 15, 0,
+ 16, 17, 0, 0, 0, 0, 0, 18, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 20, 0, 0, 0, 21, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 23, 0,
+ 0, 0, 0, 0, 0, 0, 0, 24, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 25, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 26, 0,
+ 27, 0, 0, 0, 28, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 30, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 32, 33, 34, 0, 0, 0, 0,
+ 0, 0, 0, 0, 35, 36, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 37, 38, 39, 0,
+ 40, 0, 0, 0, 0, 41, 0, 0, 0, 0,
+ 0, 42, 0, 0, 0, 43, 44, 45, 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, 46, 0, 47, 0, 48, 0, 0, 0, 0,
+ 0, 0, 49, 0, 0, 0, 0, 0, 0, 0,
+ 50, 51, 0, 0, 0, 52, 53, 54, 0, 55,
+ 56, 57, 58, 59, 0, 60, 0, 0, 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, 0, 96, 97, 98, 99, 100, 101,
+ 102, 0, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 0, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 0, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 0, 179, 0, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 0, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 0, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 0,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 0, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 0, 467, 468, 469, 470, 1, 0, 0,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4, 5, 0, 0, 0, 471, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6, 7, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,
+ 9, 0, 10, 0, 11, 0, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 0, 0, 0, 0,
+ 13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 14, 0, 0, 15, 0, 16, 17, 0, 0, 0,
+ 0, 0, 18, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 20,
+ 0, 0, 0, 21, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 23, 0, 0, 0, 0, 0, 0,
+ 0, 0, 24, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 25, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 26, 0, 27, 0, 0, 0, 28,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 30, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 32, 33,
+ 34, 0, 0, 0, 0, 0, 0, 0, 0, 35,
+ 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 37, 38, 39, 0, 40, 0, 0, 0, 0,
+ 41, 0, 0, 0, 0, 0, 42, 0, 0, 0,
+ 43, 44, 45, 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, 46, 0, 47, 0,
+ 48, 0, 0, 0, 0, 0, 0, 49, 0, 0,
+ 0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
+ 52, 53, 54, 0, 55, 56, 57, 58, 59, 0,
+ 60, 0, 0, 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, 0, 96,
+ 97, 98, 99, 100, 101, 102, 0, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 0, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 138, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149, 150, 151, 0,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
+ 179, 0, 180, 181, 182, 183, 184, 185, 186, 187,
+ 188, 189, 190, 191, 192, 193, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 0, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 0, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 0, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 0, 314, 315, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 0, 467, 468,
+ 469, 470, 1, 0, 0, 3, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4, 5, 0, 0,
+ 0, 471, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6, 7, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 8, 0, 0, 0, 10, 0, 11,
+ 0, 0, 0, 0, 0, 0, 0, 12, 0, 0,
+ 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 15, 0,
+ 16, 17, 0, 0, 0, 0, 0, 18, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 21, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 24, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 25, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 26, 0,
+ 27, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 30, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 32, 33, 34, 0, 0, 0, 0,
+ 0, 0, 0, 0, 35, 36, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 37, 38, 0, 0,
+ 40, 0, 0, 0, 0, 41, 0, 0, 0, 0,
+ 0, 42, 0, 0, 0, 43, 44, 45, 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, 46, 0, 47, 0, 48, 0, 0, 0, 0,
+ 0, 0, 49, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 0, 0, 0, 52, 53, 54, 0, 55,
+ 56, 57, 58, 59, 0, 60, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 0, 0,
+ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 95, 0, 96, 97, 98, 99, 100, 101,
+ 102, 0, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 0, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 151, 0, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 178, 0, 179, 0, 180, 181, 182,
+ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+ 193, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 0, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 0, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 0,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 0, 314, 315,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 0, 467, 468, 469, 470, 4, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 471, 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, 5068, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 762, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 3706, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3707, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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,
+ 764, 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, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 5069, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 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, 5070, 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, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1385, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 42, 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, 49, 0, 0, 0, 0, 0,
+ 0, 0, 0, 51, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1386, 0,
+ 0, 0, 0, 0, 0, 0, 793, 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, 13, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1384, 0, 0, 0, 0, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1385, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1386,
+ 0, 0, 0, 0, 1387, 0, 0, 793, 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, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1385, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1386, 0, 0, 0, 0, 1387, 0, 0, 793, 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,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1385, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 4, 5, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1386, 0, 0, 0, 0, 0, 0, 0, 793,
+ 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, 13, 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, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 571, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 362, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 607, 463, 464, 465, 466, 0, 467,
+ 608, 469, 470, 4, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3359, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 793, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5235, 0, 0, 0, 0, 0, 0,
+ 0, 5070, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 5496, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 0, 467, 608, 469, 470, 4, 5, 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, 5070, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 790, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 791, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 792, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 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, 793, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 4, 5, 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, 793, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 813, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 715, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5070, 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, 1464, 0, 0, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 0, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2057, 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, 13, 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, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 1209, 467, 608, 469, 470,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4, 5, 0, 0, 0, 0, 0, 0, 2883,
+ 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, 1210, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1211, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1212, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 1213, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 1214, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 1215, 184, 185, 186, 589,
+ 1216, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 1217, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 1218, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 1219,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 1220, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 1221, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 1222, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 1223,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 1224,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 1225, 463, 464, 465, 466, 1209, 467, 608,
+ 469, 470, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4, 5, 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, 1210, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 13, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1211, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1212, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 1213, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 1214, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 1215, 184, 185,
+ 186, 589, 1216, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 1217, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 1218, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 1219, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 1220, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 1221, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 1222, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 1225, 463, 464, 465, 466, 2136,
+ 467, 608, 469, 470, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4, 5, 813, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 715, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 2380, 467, 608, 469, 470, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4, 5, 813,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 715,
+ 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 2670, 467, 608, 469, 470, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,
+ 5, 813, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 715, 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, 13, 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, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 2287, 467, 608, 469, 470,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1941, 1942, 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, 2288, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 2287, 467, 608,
+ 469, 470, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1941, 1942, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 2394, 998, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1941, 1942, 0, 0, 0,
+ 0, 0, 0, 0, 2395, 0, 2396, 0, 2397, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 2398, 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, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 2394, 998, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1941, 1942, 0,
+ 0, 0, 0, 0, 0, 0, 2395, 0, 2396, 0,
+ 2397, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 3163,
+ 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, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 3164, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 2394, 998,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1941,
+ 1942, 0, 0, 0, 0, 0, 0, 0, 2395, 0,
+ 2396, 0, 2397, 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, 13, 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, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 4464, 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, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 2394, 998, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1941, 1942, 0, 0, 0, 0, 0, 0, 0,
+ 2395, 0, 2396, 0, 2397, 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,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 1941, 1942, 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, 13, 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, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 571, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 0, 2889, 2890, 2891, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 362, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 607, 463, 464, 465, 466, 0, 467,
+ 608, 469, 470, 4, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4631, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3340, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 0, 467, 608, 469, 470, 1941, 1942, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4480, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5323, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 4, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5609, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 0, 0, 0, 0, 0, 3322, 0, 0, 5914, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 709,
+ 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, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 710, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 3957, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 3958, 0, 680, 0, 3959, 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, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 813, 0, 0, 0, 0, 0, 0, 3323, 0,
+ 0, 715, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1453, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2141, 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, 13, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2142,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 813, 1454, 0, 0, 0, 0, 0, 0,
+ 0, 0, 715, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1453, 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, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 0, 1454, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1501, 1502, 1503,
+ 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513,
+ 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523,
+ 1524, 1525, 1526, 1527, 1528, 1529, 0, 1530, 1531, 1532,
+ 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 0, 1541,
+ 13, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550,
+ 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560,
+ 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 19, 1569,
+ 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 0,
+ 1579, 1580, 1581, 1582, 1583, 0, 0, 22, 1584, 1585,
+ 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595,
+ 0, 1596, 1597, 0, 1598, 1599, 1600, 1601, 1602, 1603,
+ 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613,
+ 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623,
+ 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633,
+ 1634, 1635, 1636, 1637, 1638, 1639, 1640, 29, 1641, 1642,
+ 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 31,
+ 1652, 1653, 1654, 1655, 0, 1656, 1657, 1658, 1659, 1660,
+ 34, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669,
+ 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679,
+ 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689,
+ 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699,
+ 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709,
+ 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719,
+ 1720, 0, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728,
+ 1729, 1730, 1731, 1732, 1733, 1734, 1735, 0, 1736, 1737,
+ 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747,
+ 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757,
+ 52, 53, 54, 0, 55, 56, 57, 58, 59, 0,
+ 1758, 1759, 1760, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 1761, 85, 1762, 1763,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 0, 1764, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 1765, 1766, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 1767, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 1768, 586, 587,
+ 179, 0, 180, 181, 182, 0, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 1769, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 0, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 1770, 1771, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 0, 1772, 1773, 292, 1774,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 0, 1775, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 1776, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 0, 374, 375, 376, 377, 602, 0, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 1777, 423, 424, 1778, 426, 427, 1779, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 0, 1780, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 1781, 463, 464, 465, 466, 0, 467, 608,
+ 469, 1782, 4, 5, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1501, 1502,
+ 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512,
+ 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522,
+ 1523, 1524, 1525, 1526, 1527, 1528, 1529, 0, 1530, 1531,
+ 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 0,
+ 1541, 13, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549,
+ 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559,
+ 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 19,
+ 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578,
+ 0, 1579, 1580, 1581, 1582, 1583, 0, 0, 22, 1584,
+ 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594,
+ 1595, 0, 1596, 1597, 0, 1598, 1599, 1600, 1601, 1602,
+ 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612,
+ 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622,
+ 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632,
+ 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 29, 1641,
+ 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651,
+ 31, 1652, 1653, 1654, 1655, 0, 1656, 1657, 1658, 1659,
+ 1660, 34, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668,
+ 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678,
+ 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698,
+ 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708,
+ 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718,
+ 1719, 1720, 0, 1721, 1722, 1723, 1724, 1725, 1726, 1727,
+ 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 0, 1736,
+ 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746,
+ 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756,
+ 1757, 52, 53, 54, 0, 55, 56, 57, 58, 59,
+ 0, 1758, 1759, 1760, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 574, 575, 1761, 85, 1762,
+ 1763, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 0, 1764, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 1765, 1766, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 1767, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 1768, 586,
+ 587, 179, 0, 180, 181, 182, 0, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 1769,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 0, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 1770, 1771, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 0, 1772, 1773, 292,
+ 1774, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 0, 1775,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 4446, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 0, 374, 375, 376, 377, 602, 0,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 1777, 423, 424, 1778, 426, 427, 1779,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 0, 1780, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 1781, 463, 464, 465, 466, 0, 467,
+ 608, 469, 1782, 4, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1501,
+ 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511,
+ 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521,
+ 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 0, 1530,
+ 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540,
+ 0, 1541, 13, 1542, 1543, 1544, 1545, 1546, 1547, 1548,
+ 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558,
+ 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568,
+ 19, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577,
+ 1578, 0, 1579, 1580, 1581, 1582, 1583, 0, 0, 22,
+ 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593,
+ 1594, 1595, 0, 1596, 1597, 0, 1598, 1599, 1600, 1601,
+ 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611,
+ 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621,
+ 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631,
+ 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 29,
+ 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650,
+ 1651, 31, 1652, 1653, 1654, 1655, 0, 1656, 1657, 1658,
+ 1659, 1660, 34, 1661, 1662, 1663, 1664, 1665, 1666, 1667,
+ 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677,
+ 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687,
+ 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697,
+ 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707,
+ 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717,
+ 1718, 1719, 1720, 0, 1721, 1722, 1723, 1724, 1725, 1726,
+ 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 0,
+ 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745,
+ 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755,
+ 1756, 1757, 52, 53, 54, 0, 55, 56, 57, 58,
+ 59, 0, 1758, 1759, 1760, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 1761, 85,
+ 1762, 1763, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 0, 1764, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 1765, 1766, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 1767, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 1768,
+ 586, 587, 179, 0, 180, 181, 182, 0, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 1769, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 0, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 1770, 1771, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 0, 1772, 1773,
+ 292, 1774, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 0,
+ 1775, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 0, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 5640, 374, 375, 376, 377, 602,
+ 0, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 1777, 423, 424, 1778, 426, 427,
+ 1779, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 0, 1780, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 1781, 463, 464, 465, 466, 0,
+ 467, 608, 469, 1782, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510,
+ 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520,
+ 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 0,
+ 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539,
+ 1540, 0, 1541, 13, 1542, 1543, 1544, 1545, 1546, 1547,
+ 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557,
+ 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567,
+ 1568, 19, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576,
+ 1577, 1578, 0, 1579, 1580, 1581, 1582, 1583, 0, 0,
+ 22, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 3941,
+ 1593, 1594, 1595, 0, 1596, 1597, 0, 1598, 1599, 1600,
+ 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610,
+ 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620,
+ 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630,
+ 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640,
+ 29, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649,
+ 1650, 1651, 31, 1652, 1653, 1654, 1655, 0, 1656, 1657,
+ 1658, 1659, 1660, 34, 1661, 1662, 1663, 1664, 1665, 1666,
+ 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676,
+ 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696,
+ 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706,
+ 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716,
+ 1717, 1718, 1719, 1720, 0, 1721, 1722, 1723, 1724, 1725,
+ 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735,
+ 0, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744,
+ 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754,
+ 1755, 1756, 1757, 52, 53, 54, 0, 55, 56, 57,
+ 58, 59, 0, 1758, 1759, 1760, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 1761,
+ 85, 1762, 1763, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 0, 1764, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 1765, 1766, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 1767, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 1768, 586, 587, 179, 0, 180, 181, 182, 0, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 1769, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 0, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 1770, 1771, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 0, 1772,
+ 1773, 292, 1774, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 0, 1775, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 0, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 0, 374, 375, 376, 377,
+ 602, 0, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 1777, 423, 424, 1778, 426,
+ 427, 1779, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 0, 1780, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 0, 463, 464, 465, 466,
+ 0, 467, 608, 469, 1782, 4, 5, 813, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 715, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 904, 905, 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, 906, 0, 0, 0,
+ 907, 0, 0, 0, 13, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 908, 0, 0,
+ 0, 0, 0, 0, 0, 0, 909, 0, 0, 0,
+ 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 910, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 911, 0, 0, 0, 0, 912, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 913,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 914, 0,
+ 0, 0, 915, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 916, 0, 0, 0, 917, 918, 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, 919, 0, 0, 0, 0,
+ 0, 0, 920, 921, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 922,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 923,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 924, 161, 162, 163, 164, 925, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 926, 927,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 928, 321, 322, 323, 929, 325, 326,
+ 327, 328, 329, 930, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 931, 342, 343, 598, 345, 346,
+ 932, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 933, 379, 380, 381, 934, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 935, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 813, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 715, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1187, 905, 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, 906, 0, 0,
+ 0, 907, 0, 0, 0, 13, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 908, 0,
+ 0, 0, 0, 0, 0, 0, 0, 909, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 910, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 911, 0, 0, 0, 0, 912, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 913, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 914,
+ 0, 0, 0, 915, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 916, 0, 0, 0, 917, 918, 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, 919, 0, 0, 0,
+ 0, 0, 0, 920, 921, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 1188, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 922, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 923, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 924, 161, 162, 163, 164, 925, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 926,
+ 927, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 928, 321, 322, 323, 1189, 325,
+ 326, 327, 328, 329, 930, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 931, 342, 343, 598, 345,
+ 346, 932, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 933, 379, 380, 381, 934, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 935, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 4, 5, 0,
+ 0, 0, 2692, 2693, 5422, 0, 5423, 0, 5424, 715,
+ 5425, 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, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5426, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 813, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 715, 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, 907, 1464, 0, 0, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 813, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 715, 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, 2156, 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, 13, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2157,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 0, 0, 1346, 0, 0, 1347, 1348, 0,
+ 0, 0, 1349, 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, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 813, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 715, 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, 2141,
+ 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,
+ 13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2142, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 4, 5, 813, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 715, 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, 1464, 0,
+ 0, 13, 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, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 571, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 362, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 607, 463, 464, 465, 466, 0, 467,
+ 608, 469, 470, 4, 5, 813, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 715, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2192, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 4, 5, 813, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 715, 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, 907,
+ 0, 0, 0, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 0, 467, 608, 469, 470, 1941, 1942, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 2889, 2890, 2891, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 813, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 715, 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, 13, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3276, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 4, 5, 813,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 715,
+ 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, 2141, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 813, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 715, 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, 13, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3628, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 813, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 715, 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, 13, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3933,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 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, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 679,
+ 0, 0, 0, 0, 0, 0, 0, 0, 680, 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, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 813, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 715, 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,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 4, 5, 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, 849,
+ 850, 0, 0, 0, 0, 0, 0, 0, 0, 851,
+ 0, 13, 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, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 852, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 0, 55, 56, 57, 58, 59,
+ 0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 0, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 0, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 853, 854, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 183, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 362, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 855, 463, 464, 465, 466, 0, 467,
+ 608, 469, 470, 4, 5, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1911, 0, 0, 0, 0, 0, 0, 22,
+ 1912, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 1913, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 715, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4627, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 0, 467, 608, 469, 470, 4, 5, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 680, 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, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1822, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 1941, 1942, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1943, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 1941, 1942,
+ 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, 13, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2151, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 1941,
+ 1942, 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, 13, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2957,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 2958, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 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, 2970, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 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,
+ 13, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3699, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 1941, 1942, 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, 13, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2957, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 571, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 362, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 607, 463, 464, 465, 466, 0, 467,
+ 608, 469, 470, 4, 5, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 0, 0, 0, 0, 0, 0, 4679,
+ 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, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 601, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 715, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 0, 467, 608, 469, 470, 4, 5, 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, 5048, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 571, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 572, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 588,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 607, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 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, 13, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5519, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 176, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 4, 5, 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, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5529, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 29, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 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, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 571, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 0, 0,
+ 0, 0, 0, 0, 5874, 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, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 572, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 588, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 607,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 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, 13, 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, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 571, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 572, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 588, 184, 185, 186, 589, 188, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 0, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 607, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 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, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 571, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 572, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 574, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 584, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 588, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 722, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 607, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 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,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
+ 0, 0, 0, 0, 0, 0, 571, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 572, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 574, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 577, 96,
+ 578, 98, 99, 100, 101, 102, 579, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 803, 114,
+ 580, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 581, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 583, 148, 149, 150, 151, 584,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 587,
+ 179, 0, 180, 181, 182, 588, 184, 185, 186, 589,
+ 188, 189, 590, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 593, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 594, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 595, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 596, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 598, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 600, 359, 360,
+ 361, 362, 363, 364, 365, 601, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 602, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 605, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 607, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 1941, 1942, 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, 13, 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, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 571, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 572, 55, 56, 57, 58, 59,
+ 0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ 77, 78, 79, 573, 0, 574, 575, 84, 85, 86,
+ 87, 88, 89, 576, 91, 92, 93, 94, 95, 577,
+ 96, 578, 98, 99, 100, 101, 102, 579, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 0, 112, 113,
+ 114, 580, 116, 117, 118, 119, 120, 121, 122, 123,
+ 124, 581, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 582, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 583, 148, 149, 150, 151,
+ 584, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 163, 164, 585, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 586,
+ 587, 179, 0, 180, 181, 182, 588, 184, 185, 186,
+ 589, 188, 189, 590, 191, 192, 591, 0, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 592, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 593, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 594, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 595, 297, 298, 299, 300,
+ 301, 302, 303, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 596, 314, 597, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 598, 345, 346, 347, 599, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 600, 359,
+ 360, 361, 362, 363, 364, 365, 601, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 602, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 603,
+ 399, 400, 604, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 605, 435, 436, 437, 438,
+ 439, 440, 441, 442, 606, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 607, 463, 464, 465, 466, 0, 467,
+ 608, 469, 470, 4, 5, 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, 13, 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,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
+ 0, 0, 0, 0, 0, 0, 0, 0, 571, 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, 29,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 31, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 34, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 52, 53, 54, 572, 55, 56, 57, 58,
+ 59, 0, 0, 0, 0, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 79, 573, 0, 574, 575, 84, 85,
+ 86, 87, 88, 89, 576, 91, 92, 93, 94, 95,
+ 577, 96, 578, 98, 99, 100, 101, 102, 579, 103,
+ 104, 105, 106, 107, 108, 109, 110, 111, 0, 112,
+ 113, 114, 580, 116, 117, 118, 119, 120, 121, 122,
+ 123, 124, 581, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 582, 139, 0, 140,
+ 141, 142, 143, 144, 145, 146, 583, 148, 149, 150,
+ 151, 584, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 585, 166, 0, 0, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 586, 587, 179, 0, 180, 181, 182, 588, 184, 185,
+ 186, 589, 188, 189, 590, 191, 192, 591, 0, 194,
+ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 592, 208, 209, 210, 211, 212, 213, 214,
+ 215, 216, 593, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 0, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 594, 285, 286, 287, 288, 289, 290, 291,
+ 292, 0, 293, 294, 295, 296, 595, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 596, 314, 597, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 598, 345, 346, 347, 599,
+ 349, 350, 351, 352, 353, 354, 355, 356, 357, 600,
+ 359, 360, 361, 362, 363, 364, 365, 2307, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 602,
+ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 0, 394, 395, 396, 397,
+ 603, 399, 400, 604, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 605, 435, 436, 437,
+ 438, 439, 440, 441, 442, 606, 444, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, 461, 607, 463, 464, 465, 466, 0,
+ 467, 608, 469, 470, 4, 5, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 571,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2975, 53, 54, 572, 55, 56, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 573, 0, 574, 575, 84,
+ 85, 86, 87, 88, 89, 576, 91, 92, 93, 94,
+ 95, 577, 96, 578, 98, 99, 100, 101, 102, 579,
+ 103, 104, 105, 106, 107, 108, 109, 110, 111, 0,
+ 112, 113, 114, 580, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 581, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 582, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 583, 148, 149,
+ 150, 151, 584, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, 164, 585, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 586, 587, 179, 0, 180, 181, 182, 588, 184,
+ 185, 186, 589, 188, 189, 590, 191, 192, 591, 0,
+ 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 592, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 593, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 594, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 595, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 596, 314, 597, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 598, 345, 346, 347,
+ 599, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 600, 359, 360, 361, 362, 363, 364, 365, 601, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 602, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 603, 399, 400, 604, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 605, 435, 436,
+ 437, 438, 439, 440, 441, 442, 606, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 607, 463, 464, 465, 466,
+ 0, 467, 608, 469, 470, 4, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 715, 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, 13, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3607, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3608, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 53, 54, 3609, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 84, 85, 86, 87, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 101, 102,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 586, 587, 179, 0, 180, 181, 182, 3610,
+ 184, 185, 186, 589, 0, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 0, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 289,
+ 290, 291, 292, 3611, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 362, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 373, 0, 375, 376,
+ 377, 602, 379, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 3612, 463, 464, 465,
+ 466, 0, 467, 608, 469, 470, 4, 5, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 0, 0, 0,
+ 0, 571, 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, 29, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 31, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 52, 53, 54, 572, 55,
+ 56, 57, 58, 59, 0, 0, 0, 0, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 573, 0, 574,
+ 575, 84, 85, 86, 87, 88, 89, 576, 91, 92,
+ 93, 94, 95, 577, 96, 578, 98, 99, 100, 101,
+ 102, 579, 103, 104, 105, 106, 107, 108, 109, 110,
+ 111, 0, 112, 113, 114, 580, 116, 117, 118, 119,
+ 120, 121, 122, 123, 124, 581, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, 582,
+ 139, 0, 140, 141, 142, 143, 144, 145, 146, 583,
+ 148, 149, 150, 151, 584, 152, 153, 154, 155, 156,
+ 157, 158, 159, 160, 161, 162, 163, 164, 585, 166,
+ 0, 0, 167, 168, 169, 170, 171, 172, 173, 174,
+ 175, 3726, 177, 586, 587, 179, 0, 180, 181, 182,
+ 588, 184, 185, 186, 589, 188, 189, 590, 191, 192,
+ 591, 0, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 592, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 593, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 0,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 272, 273, 274, 275, 276, 277, 3727, 279,
+ 280, 281, 282, 283, 284, 594, 285, 286, 287, 288,
+ 289, 290, 291, 292, 0, 293, 294, 295, 296, 595,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 596, 314, 597,
+ 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 598, 345,
+ 346, 347, 599, 349, 350, 351, 352, 353, 354, 355,
+ 356, 357, 600, 359, 360, 361, 362, 363, 364, 365,
+ 601, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 602, 379, 380, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 0, 394,
+ 395, 396, 397, 603, 399, 400, 604, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 605,
+ 435, 436, 437, 438, 439, 440, 441, 442, 606, 444,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, 461, 607, 463, 464,
+ 465, 466, 0, 467, 608, 469, 470, 4, 5, 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, 13, 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, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 22, 0, 0, 0, 0, 0, 0,
+ 0, 0, 571, 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, 5826, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 53, 54, 572,
+ 55, 56, 57, 58, 59, 0, 0, 0, 0, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 573, 0,
+ 574, 575, 84, 85, 86, 87, 88, 89, 576, 91,
+ 92, 93, 94, 95, 577, 96, 578, 98, 99, 100,
+ 101, 102, 579, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 0, 112, 113, 114, 580, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 581, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 582, 139, 0, 140, 141, 142, 143, 144, 145, 146,
+ 583, 148, 149, 150, 151, 584, 152, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 585,
+ 166, 0, 0, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 586, 587, 179, 0, 180, 181,
+ 182, 588, 184, 185, 186, 589, 188, 189, 590, 191,
+ 192, 591, 0, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 592, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 593, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 0, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
+ 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 594, 285, 286, 287,
+ 288, 289, 290, 291, 292, 0, 293, 294, 295, 296,
+ 595, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 596, 314,
+ 597, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 598,
+ 345, 346, 347, 599, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 600, 359, 360, 361, 362, 363, 364,
+ 365, 601, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 602, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 0,
+ 394, 395, 396, 397, 603, 399, 400, 604, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 605, 435, 436, 437, 438, 439, 440, 441, 442, 606,
+ 444, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, 461, 607, 463,
+ 464, 465, 466, 0, 467, 608, 469, 470, 4, 5,
+ 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, 13, 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, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3377, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 3378, 55, 56, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 573,
+ 0, 574, 575, 84, 85, 86, 87, 88, 89, 576,
+ 91, 92, 93, 94, 95, 577, 96, 578, 98, 99,
+ 100, 101, 102, 579, 103, 104, 105, 106, 107, 108,
+ 109, 110, 111, 0, 112, 113, 114, 580, 116, 117,
+ 118, 119, 120, 121, 122, 123, 124, 581, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 582, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 583, 148, 149, 150, 151, 584, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
+ 585, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 586, 587, 179, 0, 180,
+ 181, 182, 3379, 184, 185, 186, 589, 188, 189, 590,
+ 191, 192, 591, 0, 194, 195, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 592, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 593, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 594, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 595, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 596,
+ 314, 597, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 598, 345, 346, 347, 599, 349, 350, 351, 352, 353,
+ 354, 355, 356, 357, 600, 359, 360, 361, 362, 363,
+ 364, 365, 601, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 602, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 603, 399, 400, 604, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 605, 435, 436, 437, 438, 439, 440, 441, 442,
+ 606, 444, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 0,
+ 463, 464, 465, 466, 0, 467, 608, 469, 470, 4,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 715, 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, 13, 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, 19, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 22, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3608, 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, 29, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 52, 53,
+ 54, 3609, 55, 56, 57, 58, 59, 0, 0, 0,
+ 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 573, 0, 574, 575, 84, 85, 86, 87, 88, 89,
+ 576, 91, 92, 93, 94, 95, 577, 96, 578, 98,
+ 99, 100, 101, 102, 579, 103, 104, 105, 106, 107,
+ 108, 109, 110, 111, 0, 112, 113, 114, 580, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 581, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 582, 139, 0, 140, 141, 142, 143, 144,
+ 145, 146, 583, 148, 149, 150, 151, 584, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 585, 166, 0, 0, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 586, 587, 179, 0,
+ 180, 181, 182, 3610, 184, 185, 186, 589, 0, 189,
+ 590, 191, 192, 591, 0, 194, 195, 196, 197, 198,
+ 199, 200, 201, 202, 203, 204, 205, 206, 592, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 593, 217,
+ 218, 219, 220, 221, 222, 223, 0, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 0, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, 279, 280, 281, 282, 283, 284, 594, 285,
+ 286, 287, 288, 289, 290, 291, 292, 3611, 293, 294,
+ 295, 296, 595, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 596, 314, 597, 316, 317, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 598, 345, 346, 347, 599, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 600, 359, 360, 361, 362,
+ 363, 364, 365, 601, 367, 368, 369, 370, 371, 372,
+ 373, 0, 375, 376, 377, 602, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 0, 394, 395, 396, 397, 603, 399, 400, 604,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 605, 435, 436, 437, 438, 439, 440, 441,
+ 442, 606, 444, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, 461,
+ 3612, 463, 464, 465, 466, 0, 467, 608, 469, 470,
+ 4, 5, 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, 851, 0, 13,
+ 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, 19, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0,
+ 0, 0, 0, 0, 0, 852, 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, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 52,
+ 53, 54, 0, 55, 56, 57, 58, 59, 0, 0,
+ 0, 0, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 79, 573, 0, 0, 575, 84, 85, 86, 87, 88,
+ 89, 576, 91, 92, 93, 94, 95, 577, 96, 578,
+ 98, 99, 100, 101, 102, 579, 103, 104, 105, 106,
+ 107, 108, 109, 110, 111, 0, 112, 113, 114, 580,
+ 116, 117, 118, 119, 120, 121, 122, 123, 124, 581,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 582, 139, 0, 140, 141, 142, 143,
+ 144, 145, 146, 583, 148, 149, 150, 151, 0, 152,
+ 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
+ 163, 164, 585, 166, 0, 0, 167, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 586, 587, 179,
+ 0, 180, 181, 182, 183, 184, 185, 186, 589, 188,
+ 189, 590, 191, 192, 591, 0, 194, 195, 196, 197,
+ 198, 199, 200, 201, 202, 203, 204, 205, 206, 592,
+ 208, 209, 210, 211, 212, 213, 214, 215, 216, 593,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 0, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, 279, 280, 281, 282, 283, 284, 594,
+ 285, 286, 287, 288, 289, 290, 291, 292, 0, 293,
+ 294, 295, 296, 595, 297, 298, 299, 300, 301, 302,
+ 303, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 596, 314, 597, 316, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 598, 345, 346, 347, 599, 349, 350, 351,
+ 352, 353, 354, 355, 356, 357, 600, 359, 360, 361,
+ 362, 363, 364, 365, 601, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 602, 379, 380, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 0, 394, 395, 396, 397, 603, 399, 400,
+ 604, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 605, 435, 436, 437, 438, 439, 440,
+ 441, 442, 606, 444, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 855, 463, 464, 465, 466, 0, 467, 608, 469,
+ 470, 4, 5, 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,
+ 13, 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, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 22, 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, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 34, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 52, 53, 54, 0, 55, 56, 57, 58, 59, 0,
+ 0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 79, 573, 0, 0, 575, 84, 85, 86, 87,
+ 88, 89, 576, 91, 92, 93, 94, 95, 0, 96,
+ 578, 98, 99, 100, 101, 102, 0, 103, 104, 105,
+ 106, 107, 108, 109, 110, 111, 0, 112, 113, 114,
+ 0, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 0, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, 582, 139, 0, 140, 141, 142,
+ 143, 144, 145, 146, 0, 148, 149, 150, 151, 0,
+ 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 585, 166, 0, 0, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 586, 0,
+ 179, 0, 180, 181, 182, 183, 184, 185, 186, 589,
+ 188, 189, 0, 191, 192, 591, 0, 194, 195, 196,
+ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
+ 592, 208, 209, 210, 211, 212, 213, 214, 215, 216,
+ 0, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 0, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 0, 285, 286, 287, 288, 289, 290, 291, 292, 0,
+ 293, 294, 295, 296, 0, 297, 298, 299, 300, 301,
+ 302, 303, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 0, 314, 597, 316, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 0, 345, 346, 347, 599, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 0, 359, 360,
+ 361, 362, 363, 364, 365, 0, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 0, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 0, 394, 395, 396, 397, 603, 399,
+ 400, 604, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 0, 435, 436, 437, 438, 439,
+ 440, 441, 442, 606, 444, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, 461, 462, 463, 464, 465, 466, 0, 467, 608,
+ 469, 470, 4, 5, 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, 13, 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, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1898, 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, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 34, 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, 0, 0,
+ 0, 0, 0, 0, 1909, 0, 0, 0, 0, 0,
+ 0, 52, 53, 54, 1899, 55, 0, 57, 58, 59,
+ 0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 0, 72, 73, 74, 75, 76,
+ 77, 78, 79, 0, 0, 0, 0, 84, 85, 86,
+ 87, 88, 0, 0, 91, 92, 93, 94, 95, 0,
+ 0, 0, 98, 99, 100, 101, 102, 0, 103, 104,
+ 105, 106, 0, 0, 0, 0, 0, 0, 112, 0,
+ 114, 0, 116, 117, 1900, 119, 120, 121, 122, 123,
+ 124, 0, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 0, 139, 0, 140, 141,
+ 142, 143, 144, 145, 146, 0, 148, 149, 150, 151,
+ 0, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+ 161, 162, 0, 0, 0, 166, 0, 0, 167, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 0,
+ 0, 0, 0, 0, 181, 182, 1901, 184, 185, 186,
+ 0, 188, 189, 0, 191, 192, 0, 0, 194, 0,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
+ 206, 0, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 0, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 0, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
+ 284, 0, 285, 286, 287, 288, 289, 290, 291, 292,
+ 0, 293, 294, 295, 296, 0, 0, 0, 299, 0,
+ 301, 302, 0, 304, 305, 306, 307, 0, 309, 310,
+ 311, 312, 0, 0, 0, 0, 316, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 0, 343, 0, 345, 346, 347, 0, 349,
+ 350, 0, 352, 353, 354, 355, 356, 357, 0, 359,
+ 360, 361, 362, 363, 364, 365, 0, 367, 368, 369,
+ 0, 371, 372, 373, 374, 0, 376, 377, 4, 5,
+ 380, 381, 0, 0, 384, 385, 386, 0, 388, 0,
+ 390, 391, 392, 393, 0, 394, 395, 396, 397, 0,
+ 399, 400, 0, 402, 0, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 0, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 0, 435, 436, 0, 438,
+ 439, 440, 441, 0, 0, 444, 445, 13, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 0, 0, 464, 465, 0, 0, 467,
+ 0, 469, 470, 0, 0, 19, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 22, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1898, 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, 29, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 31, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 34, 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, 0, 0, 0, 0, 0, 0,
+ 1919, 0, 0, 0, 0, 0, 0, 52, 53, 54,
+ 1899, 55, 0, 57, 58, 59, 0, 0, 0, 0,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 0, 72, 73, 74, 75, 76, 77, 78, 79, 0,
+ 0, 0, 0, 84, 85, 86, 87, 88, 0, 0,
+ 91, 92, 93, 94, 95, 0, 0, 0, 98, 99,
+ 100, 101, 102, 0, 103, 104, 105, 106, 0, 0,
+ 0, 0, 0, 0, 112, 0, 114, 0, 116, 117,
+ 1900, 119, 120, 121, 122, 123, 124, 0, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 0, 139, 0, 140, 141, 142, 143, 144, 145,
+ 146, 0, 148, 149, 150, 151, 0, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 0, 0,
+ 0, 166, 0, 0, 167, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 0, 0, 0, 0, 0,
+ 181, 182, 1901, 184, 185, 186, 0, 188, 189, 0,
+ 191, 192, 0, 0, 194, 0, 196, 197, 198, 199,
+ 200, 201, 202, 203, 204, 205, 206, 0, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 0, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 0, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 279, 280, 281, 282, 283, 284, 0, 285, 286,
+ 287, 288, 289, 290, 291, 292, 0, 293, 294, 295,
+ 296, 0, 0, 0, 299, 0, 301, 302, 0, 304,
+ 305, 306, 307, 0, 309, 310, 311, 312, 0, 0,
+ 0, 0, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 0, 343,
+ 0, 345, 346, 347, 0, 349, 350, 0, 352, 353,
+ 354, 355, 356, 357, 0, 359, 360, 361, 362, 363,
+ 364, 365, 0, 367, 368, 369, 0, 371, 372, 373,
+ 374, 0, 376, 377, 4, 5, 380, 381, 0, 0,
+ 384, 385, 386, 0, 388, 0, 390, 391, 392, 393,
+ 0, 394, 395, 396, 397, 0, 399, 400, 0, 402,
+ 0, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 0, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 0, 435, 436, 0, 438, 439, 440, 441, 0,
+ 0, 444, 445, 13, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, 461, 0,
+ 0, 464, 465, 0, 0, 467, 0, 469, 470, 0,
+ 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 0, 0, 0, 1898,
+ 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,
+ 29, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 34, 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,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 53, 54, 1899, 55, 0, 57,
+ 58, 59, 0, 0, 0, 0, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 0, 72, 73, 74,
+ 75, 76, 77, 78, 79, 0, 0, 0, 0, 84,
+ 85, 86, 87, 88, 0, 0, 91, 92, 93, 94,
+ 95, 0, 0, 0, 98, 99, 100, 101, 102, 0,
+ 103, 104, 105, 106, 0, 0, 0, 0, 0, 0,
+ 112, 0, 114, 0, 116, 117, 1900, 119, 120, 121,
+ 122, 123, 124, 0, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, 0, 139, 0,
+ 140, 141, 142, 143, 144, 145, 146, 0, 148, 149,
+ 150, 151, 0, 152, 153, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 0, 0, 0, 166, 0, 0,
+ 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 0, 0, 0, 0, 0, 181, 182, 1901, 184,
+ 185, 186, 0, 188, 189, 0, 191, 192, 0, 0,
+ 194, 0, 196, 197, 198, 199, 200, 201, 202, 203,
+ 204, 205, 206, 0, 208, 209, 210, 211, 212, 213,
+ 214, 215, 216, 0, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 0, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
+ 282, 283, 284, 0, 285, 286, 287, 288, 289, 290,
+ 291, 292, 0, 293, 294, 295, 296, 0, 0, 0,
+ 299, 0, 301, 302, 0, 304, 305, 306, 307, 0,
+ 309, 310, 311, 312, 0, 0, 0, 0, 316, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 0, 343, 0, 345, 346, 347,
+ 0, 349, 350, 0, 352, 353, 354, 355, 356, 357,
+ 0, 359, 360, 361, 362, 363, 364, 365, 0, 367,
+ 368, 369, 0, 371, 372, 373, 374, 0, 376, 377,
+ 0, 0, 380, 381, 0, 0, 384, 385, 386, 0,
+ 388, 0, 390, 391, 392, 393, 0, 394, 395, 396,
+ 397, 0, 399, 400, 0, 402, 0, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 0, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 0, 435, 436,
+ 0, 438, 439, 440, 441, 0, 0, 444, 445, 0,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, 461, 4, 5, 464, 465, 0,
+ 0, 467, 0, 469, 470, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509,
+ 1510, 1511, 0, 4030, 1514, 1515, 1516, 0, 0, 1519,
+ 1520, 1521, 1522, 1523, 1524, 1525, 1526, 4031, 1528, 1529,
+ 0, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538,
+ 1539, 1540, 0, 1541, 13, 1542, 1543, 1544, 1545, 1546,
+ 1547, 1548, 4032, 1550, 1551, 1552, 1553, 1554, 1555, 1556,
+ 1557, 1558, 1559, 1560, 1561, 4033, 1563, 1564, 1565, 1566,
+ 1567, 1568, 19, 1569, 1570, 1571, 1572, 1573, 1574, 1575,
+ 1576, 4034, 1578, 0, 1579, 1580, 1581, 1582, 1583, 0,
+ 0, 22, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591,
+ 3941, 1593, 1594, 1595, 0, 1596, 1597, 0, 1598, 4035,
+ 1600, 4036, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609,
+ 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619,
+ 0, 0, 0, 1623, 1624, 1625, 1626, 1627, 1628, 1629,
+ 0, 0, 0, 1633, 1634, 1635, 1636, 1637, 1638, 1639,
+ 1640, 29, 1641, 1642, 1643, 1644, 1645, 1646, 0, 1648,
+ 1649, 1650, 1651, 31, 1652, 1653, 1654, 1655, 0, 1656,
+ 1657, 1658, 1659, 1660, 34, 1661, 1662, 1663, 1664, 1665,
+ 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675,
+ 0, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685,
+ 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695,
+ 1696, 1697, 1698, 1699, 0, 1701, 1702, 0, 1704, 1705,
+ 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715,
+ 1716, 1717, 1718, 1719, 1720, 0, 1721, 1722, 1723, 1724,
+ 0, 0, 0, 1728, 1729, 1730, 1731, 1732, 1733, 1734,
+ 1735, 4037, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743,
+ 1744, 1745, 0, 4038, 1748, 1749, 1750, 1751, 1752, 1753,
+ 1754, 1755, 1756, 1757, 52, 53, 54, 0, 55, 56,
+ 57, 58, 59, 0, 1758, 1759, 1760, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 574, 575,
+ 0, 85, 0, 0, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 0, 0,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 4039, 4040, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 584, 152, 153, 154, 0, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 0, 586, 587, 179, 0, 180, 181, 182, 0,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 0, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 0, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 0, 4041, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 0,
+ 0, 0, 292, 1774, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 0, 0, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 0, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 0, 374, 375, 376,
+ 377, 602, 4042, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 0, 423, 424, 0,
+ 426, 427, 4043, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 0, 4044, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 0, 463, 464, 465,
+ 466, 0, 467, 608, 469, 4, 5, 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, 13, 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, 19, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 22, 0, 0, 0, 0, 0, 0, 0, 0,
+ 852, 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, 29, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 34, 0, 0, 0, 0, 0,
+ 0, 0, 5431, 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, 0,
+ 0, 0, 0, 0, 52, 53, 54, 0, 55, 56,
+ 57, 58, 59, 0, 0, 0, 0, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 573, 0, 0, 575,
+ 0, 85, 0, 0, 88, 89, 576, 91, 92, 93,
+ 94, 95, 577, 96, 578, 98, 99, 100, 0, 0,
+ 579, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 0, 112, 113, 114, 580, 116, 117, 118, 119, 120,
+ 121, 122, 123, 124, 581, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 0, 0, 137, 582, 139,
+ 0, 140, 141, 142, 143, 144, 145, 146, 583, 148,
+ 149, 150, 151, 0, 152, 153, 154, 0, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 585, 166, 0,
+ 0, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 0, 586, 587, 179, 0, 180, 181, 182, 5432,
+ 184, 185, 186, 589, 188, 189, 590, 191, 192, 591,
+ 0, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 592, 208, 209, 210, 211, 212,
+ 213, 214, 0, 216, 593, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 0, 250,
+ 251, 252, 253, 254, 255, 256, 0, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 0, 0, 277, 278, 279, 280,
+ 281, 282, 283, 284, 594, 285, 286, 287, 288, 0,
+ 0, 0, 292, 0, 293, 294, 295, 296, 595, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 596, 314, 597, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 0, 0, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 598, 345, 346,
+ 347, 599, 349, 350, 351, 352, 353, 354, 355, 356,
+ 357, 600, 359, 360, 361, 0, 363, 364, 365, 601,
+ 367, 368, 369, 370, 371, 372, 0, 374, 375, 376,
+ 377, 602, 0, 380, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 0, 394, 395,
+ 396, 397, 603, 399, 400, 604, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 0, 423, 424, 0,
+ 426, 427, 0, 429, 430, 431, 432, 433, 605, 435,
+ 436, 437, 438, 439, 440, 441, 442, 606, 444, 445,
+ 446, 447, 448, 449, 0, 0, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, 461, 1781, 463, 464, 465,
+ 466, 0, 467, 608, 469
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 3, 0, 30, 631, 82, 8, 856, 967, 645, 82,
+ 693, 471, 2109, 693, 694, 0, 0, 1446, 645, 2003,
+ 1967, 0, 2264, 0, 639, 2320, 2442, 0, 2058, 0,
+ 809, 2122, 1414, 36, 660, 1417, 1411, 40, 623, 721,
+ 0, 626, 45, 2294, 0, 48, 2559, 0, 0, 2565,
+ 0, 2667, 1828, 1276, 809, 2626, 693, 776, 1621, 0,
+ 0, 1973, 1577, 628, 3285, 2012, 693, 1982, 3602, 2319,
+ 3034, 2461, 1182, 2575, 2405, 688, 2042, 629, 661, 1044,
+ 661, 1798, 761, 41, 763, 3753, 1417, 766, 767, 0,
+ 1457, 2512, 3298, 1517, 2060, 647, 661, 649, 650, 651,
+ 652, 653, 654, 655, 1386, 657, 658, 3911, 691, 3829,
+ 691, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103,
+ 2104, 2105, 2106, 2107, 3178, 1518, 691, 2548, 1457, 4393,
+ 1255, 1405, 1647, 1343, 4393, 687, 1876, 641, 2548, 738,
+ 877, 3046, 741, 3986, 3822, 2179, 2180, 4293, 2122, 714,
+ 178, 3685, 1277, 2237, 847, 2668, 1549, 4299, 3109, 4439,
+ 3797, 3044, 165, 728, 4771, 1218, 4315, 1220, 1221, 2080,
+ 3413, 3414, 2288, 856, 2655, 1228, 2432, 2088, 2089, 3811,
+ 2091, 2092, 4023, 2186, 1577, 3139, 3220, 1013, 38, 2943,
+ 3434, 743, 744, 3830, 3669, 3073, 700, 2288, 3138, 3139,
+ 3430, 5140, 2956, 2206, 3434, 1278, 4283, 4039, 4761, 4043,
+ 4882, 4043, 3148, 0, 6, 7, 2513, 5121, 639, 856,
+ 3883, 639, 639, 639, 1184, 851, 1622, 2230, 2231, 856,
+ 639, 4393, 4262, 15, 2369, 1620, 1632, 15, 15, 876,
+ 12, 2545, 16, 17, 15, 1630, 26, 97, 83, 876,
+ 42, 2285, 47, 1768, 1647, 67, 42, 1772, 6, 7,
+ 825, 6, 7, 53, 15, 15, 6, 7, 15, 15,
+ 2660, 1786, 1621, 1622, 526, 1485, 5124, 6, 7, 15,
+ 15, 15, 26, 1632, 5320, 47, 6, 7, 1114, 1115,
+ 1116, 127, 65, 6, 7, 4796, 15, 6, 7, 63,
+ 145, 1127, 787, 33, 889, 890, 891, 892, 4282, 4283,
+ 31, 41, 315, 89, 2288, 47, 344, 42, 42, 4671,
+ 50, 42, 1746, 178, 53, 33, 42, 11, 12, 122,
+ 895, 1727, 836, 41, 182, 206, 888, 1761, 26, 31,
+ 1725, 1765, 50, 3580, 47, 53, 898, 899, 31, 31,
+ 26, 1775, 51, 1777, 1778, 1779, 1780, 31, 1782, 99,
+ 244, 5354, 5355, 366, 31, 31, 156, 42, 1764, 1793,
+ 1794, 1795, 1796, 1797, 2669, 1768, 3330, 232, 1727, 1772,
+ 53, 42, 299, 217, 1769, 31, 268, 4891, 158, 242,
+ 3330, 254, 283, 1786, 1953, 1954, 33, 26, 143, 314,
+ 51, 6, 7, 1962, 41, 104, 31, 2504, 201, 110,
+ 123, 318, 4719, 50, 123, 1764, 26, 3766, 26, 4393,
+ 24, 25, 26, 3898, 28, 127, 30, 232, 32, 3183,
+ 3184, 42, 244, 1992, 26, 1994, 378, 42, 2643, 33,
+ 310, 251, 305, 3851, 4839, 433, 42, 41, 4839, 1824,
+ 2009, 2010, 2011, 104, 26, 168, 50, 2016, 2017, 168,
+ 24, 25, 26, 4753, 28, 2024, 30, 971, 32, 24,
+ 25, 26, 119, 28, 26, 30, 182, 32, 208, 123,
+ 281, 4839, 254, 156, 26, 33, 471, 267, 47, 99,
+ 33, 99, 3375, 41, 143, 33, 33, 290, 41, 299,
+ 208, 143, 50, 41, 41, 152, 71, 50, 127, 128,
+ 3026, 448, 50, 50, 387, 5642, 127, 42, 5122, 99,
+ 28, 42, 178, 526, 168, 314, 33, 99, 427, 99,
+ 122, 42, 33, 305, 41, 203, 178, 71, 33, 73,
+ 41, 314, 314, 50, 65, 371, 41, 99, 33, 50,
+ 54, 299, 537, 537, 14, 50, 41, 99, 314, 42,
+ 5961, 71, 6115, 408, 788, 50, 4873, 4764, 96, 178,
+ 254, 208, 645, 153, 258, 42, 591, 42, 33, 203,
+ 50, 203, 4386, 328, 5432, 315, 41, 114, 33, 582,
+ 128, 393, 197, 33, 42, 50, 41, 537, 2338, 312,
+ 33, 41, 5533, 312, 542, 50, 197, 315, 41, 211,
+ 50, 1304, 173, 4147, 208, 203, 641, 50, 110, 622,
+ 623, 305, 6059, 626, 2919, 628, 6063, 155, 203, 5622,
+ 314, 5135, 268, 4296, 14, 33, 99, 352, 53, 314,
+ 639, 688, 3875, 41, 1209, 292, 386, 107, 232, 203,
+ 335, 598, 50, 1218, 639, 639, 1221, 1117, 661, 1147,
+ 208, 1226, 54, 43, 44, 208, 645, 1386, 645, 598,
+ 208, 208, 723, 1272, 645, 1274, 4508, 614, 315, 4154,
+ 127, 660, 685, 660, 528, 203, 6305, 1366, 691, 660,
+ 1369, 1179, 1257, 740, 1373, 1374, 1375, 1376, 290, 639,
+ 4849, 208, 528, 706, 645, 4867, 234, 208, 281, 779,
+ 40, 714, 427, 208, 693, 3921, 693, 787, 1473, 660,
+ 6339, 315, 693, 208, 727, 728, 173, 107, 686, 676,
+ 314, 1841, 192, 294, 645, 4840, 787, 4842, 201, 781,
+ 4845, 53, 5441, 693, 786, 772, 788, 676, 57, 660,
+ 386, 299, 693, 208, 4859, 4171, 4172, 760, 414, 747,
+ 1870, 358, 787, 208, 779, 3015, 258, 315, 208, 454,
+ 5701, 709, 315, 776, 254, 208, 341, 315, 315, 4753,
+ 5375, 688, 693, 287, 311, 3027, 252, 686, 638, 727,
+ 793, 580, 122, 643, 787, 629, 504, 824, 801, 802,
+ 6201, 366, 787, 1496, 6241, 414, 809, 642, 315, 659,
+ 208, 613, 192, 173, 315, 252, 386, 287, 474, 378,
+ 315, 423, 825, 673, 580, 305, 3780, 632, 5118, 1444,
+ 315, 834, 366, 145, 314, 3166, 5440, 779, 314, 649,
+ 3780, 547, 1407, 669, 847, 782, 696, 6400, 160, 5129,
+ 314, 3787, 477, 726, 659, 3791, 366, 658, 645, 817,
+ 315, 743, 5989, 780, 577, 782, 196, 782, 577, 639,
+ 315, 201, 851, 660, 851, 315, 4284, 856, 3083, 856,
+ 851, 884, 315, 886, 299, 3639, 889, 890, 891, 892,
+ 893, 782, 895, 4867, 2323, 730, 1481, 876, 782, 876,
+ 755, 506, 3153, 738, 5457, 876, 741, 669, 281, 779,
+ 851, 782, 578, 758, 3209, 506, 779, 315, 5270, 593,
+ 2835, 2836, 1474, 723, 688, 4162, 1386, 593, 5235, 782,
+ 5127, 779, 581, 577, 294, 876, 894, 669, 896, 732,
+ 851, 642, 4291, 335, 643, 856, 782, 593, 782, 2860,
+ 2861, 954, 2863, 2864, 957, 717, 1441, 5805, 5657, 5807,
+ 290, 964, 5998, 966, 3169, 876, 5470, 743, 5232, 742,
+ 782, 970, 614, 5232, 5475, 287, 5477, 980, 955, 956,
+ 560, 958, 959, 960, 779, 970, 970, 779, 965, 769,
+ 1242, 970, 643, 970, 786, 787, 786, 970, 5670, 970,
+ 3250, 787, 779, 3307, 3308, 787, 1971, 779, 782, 787,
+ 2392, 3146, 3147, 3016, 955, 956, 787, 958, 959, 960,
+ 970, 2131, 1987, 1444, 965, 769, 1444, 1444, 1444, 970,
+ 970, 1283, 5062, 779, 763, 1444, 787, 787, 786, 763,
+ 787, 786, 763, 5120, 955, 956, 786, 958, 959, 960,
+ 780, 787, 787, 787, 965, 3350, 5363, 786, 2183, 970,
+ 2185, 2392, 787, 2188, 851, 2432, 786, 2177, 787, 856,
+ 5232, 787, 384, 786, 782, 2200, 779, 786, 2203, 2361,
+ 782, 769, 2207, 6076, 2137, 6078, 6079, 779, 763, 876,
+ 2372, 2520, 780, 769, 782, 779, 779, 779, 2527, 2152,
+ 5653, 5654, 763, 2432, 780, 2490, 782, 2492, 2233, 2234,
+ 2235, 708, 779, 786, 782, 2511, 1119, 768, 1117, 4002,
+ 2505, 1876, 4785, 1949, 1950, 4803, 787, 4661, 4806, 6033,
+ 6034, 704, 1117, 780, 3431, 4969, 3433, 4969, 2523, 4973,
+ 769, 4973, 2538, 5538, 5118, 2541, 5120, 5538, 785, 1842,
+ 2535, 780, 763, 782, 2550, 2228, 4389, 2122, 782, 769,
+ 782, 769, 2511, 782, 692, 730, 2551, 763, 955, 956,
+ 14, 958, 959, 960, 779, 4807, 780, 769, 965, 1182,
+ 5538, 786, 787, 970, 6177, 6178, 780, 3284, 782, 2538,
+ 2749, 787, 2541, 2752, 782, 6188, 5503, 769, 5505, 43,
+ 44, 2550, 5797, 5510, 33, 33, 1209, 782, 4624, 2768,
+ 5517, 5518, 41, 41, 299, 1218, 780, 769, 1221, 528,
+ 5527, 50, 50, 1226, 1448, 780, 5533, 769, 782, 2788,
+ 169, 53, 33, 28, 782, 30, 14, 780, 763, 782,
+ 41, 1319, 763, 780, 782, 782, 1939, 42, 1833, 50,
+ 281, 33, 763, 6246, 1257, 3339, 1839, 723, 5232, 41,
+ 768, 769, 787, 107, 782, 43, 44, 6206, 50, 4323,
+ 5823, 2481, 99, 780, 1839, 4809, 787, 57, 1960, 780,
+ 763, 782, 3522, 4337, 2110, 780, 723, 782, 19, 20,
+ 229, 71, 1295, 73, 1297, 780, 763, 782, 763, 779,
+ 1303, 1304, 40, 299, 787, 14, 782, 151, 768, 769,
+ 770, 771, 772, 773, 4558, 763, 391, 1320, 782, 72,
+ 787, 143, 787, 2288, 684, 369, 1329, 782, 4558, 107,
+ 33, 704, 3537, 376, 43, 44, 281, 782, 41, 787,
+ 1343, 1344, 782, 143, 2607, 448, 5512, 50, 192, 782,
+ 33, 4305, 4306, 2132, 2036, 281, 1383, 376, 41, 50,
+ 232, 1364, 735, 5082, 4242, 4305, 4306, 50, 33, 19,
+ 20, 2090, 4406, 4309, 4310, 1940, 41, 2132, 331, 208,
+ 208, 295, 780, 1386, 1387, 50, 5666, 1386, 768, 769,
+ 770, 771, 772, 773, 5701, 572, 376, 116, 107, 239,
+ 5707, 1386, 732, 317, 1407, 1909, 1448, 208, 232, 1367,
+ 1368, 99, 376, 144, 192, 1919, 53, 33, 143, 40,
+ 19, 20, 1425, 471, 141, 2204, 208, 98, 4182, 3669,
+ 71, 75, 580, 5274, 50, 5540, 258, 1272, 2491, 1274,
+ 435, 390, 4196, 1446, 1447, 1444, 4200, 127, 580, 2204,
+ 494, 763, 5721, 178, 378, 5991, 1441, 1460, 196, 1444,
+ 1444, 232, 1312, 33, 3714, 196, 208, 143, 1471, 3711,
+ 1473, 41, 3588, 1323, 270, 3459, 298, 10, 1481, 1482,
+ 50, 2164, 1485, 192, 2164, 5981, 315, 315, 160, 2168,
+ 160, 3741, 197, 1496, 144, 3751, 3886, 3588, 298, 33,
+ 136, 491, 752, 6110, 1444, 208, 454, 41, 225, 67,
+ 1345, 614, 803, 201, 315, 3936, 50, 3938, 2237, 314,
+ 2630, 1981, 363, 14, 644, 208, 3936, 2164, 3938, 779,
+ 4481, 4482, 4013, 315, 5672, 5842, 5674, 2164, 5170, 510,
+ 769, 178, 3747, 208, 2109, 144, 196, 226, 178, 235,
+ 74, 780, 43, 44, 5861, 33, 2139, 5723, 2139, 333,
+ 33, 341, 389, 41, 391, 3341, 505, 193, 41, 746,
+ 577, 226, 50, 369, 2139, 196, 281, 50, 287, 359,
+ 74, 5850, 553, 2338, 2169, 2170, 366, 2172, 2173, 2174,
+ 2175, 572, 236, 3577, 127, 232, 2422, 196, 425, 2184,
+ 5278, 3567, 3568, 3569, 3570, 782, 4489, 755, 361, 2302,
+ 2238, 391, 315, 561, 3588, 3355, 107, 2202, 74, 5094,
+ 492, 1456, 298, 755, 2128, 4015, 143, 675, 455, 5104,
+ 5105, 107, 315, 736, 314, 5313, 3583, 459, 208, 3551,
+ 593, 3552, 2361, 3554, 634, 688, 3561, 3562, 5367, 299,
+ 315, 695, 3857, 2372, 2373, 386, 74, 6264, 3898, 459,
+ 151, 2340, 2341, 2926, 2927, 2344, 307, 787, 492, 688,
+ 2349, 2350, 2351, 704, 208, 33, 3679, 33, 369, 2278,
+ 5818, 352, 6218, 41, 608, 41, 244, 3892, 3983, 3894,
+ 3895, 4934, 50, 688, 50, 3900, 434, 782, 494, 315,
+ 258, 192, 787, 3908, 779, 654, 2305, 3912, 688, 3914,
+ 101, 4227, 743, 432, 74, 314, 192, 688, 6214, 2347,
+ 2348, 492, 2287, 67, 688, 76, 77, 568, 568, 33,
+ 208, 357, 658, 74, 33, 208, 386, 41, 3105, 14,
+ 33, 33, 41, 1816, 432, 315, 50, 173, 41, 41,
+ 475, 50, 666, 506, 2337, 460, 2436, 50, 50, 704,
+ 2345, 588, 392, 2328, 703, 746, 497, 403, 43, 44,
+ 566, 33, 2337, 6269, 2339, 782, 3105, 551, 704, 41,
+ 704, 315, 2747, 459, 463, 775, 782, 386, 50, 3012,
+ 3172, 787, 3174, 3175, 5768, 622, 720, 321, 743, 3783,
+ 472, 506, 472, 494, 358, 2915, 2916, 57, 463, 1812,
+ 232, 328, 123, 434, 6310, 2380, 127, 1820, 3185, 1822,
+ 10, 71, 5796, 73, 2561, 5300, 5800, 321, 5974, 1832,
+ 1833, 2941, 107, 5975, 191, 74, 1839, 315, 1841, 1842,
+ 458, 3172, 315, 3174, 3175, 3127, 5524, 497, 5997, 40,
+ 208, 3133, 208, 33, 6003, 653, 3185, 168, 2471, 633,
+ 2985, 41, 173, 40, 2989, 321, 2991, 1870, 45, 5712,
+ 50, 33, 5509, 1876, 231, 33, 2441, 572, 31, 41,
+ 3005, 4635, 101, 41, 127, 2938, 4640, 4641, 50, 614,
+ 4944, 3975, 50, 3018, 3019, 206, 2589, 2590, 497, 695,
+ 244, 6165, 2955, 321, 208, 296, 2959, 6166, 1911, 208,
+ 2536, 268, 338, 4484, 4154, 208, 208, 192, 472, 1023,
+ 1024, 1025, 766, 767, 768, 769, 770, 771, 772, 773,
+ 10, 150, 568, 5907, 177, 4840, 1939, 1940, 342, 2504,
+ 4845, 763, 5620, 3977, 4998, 4850, 208, 4363, 2513, 404,
+ 730, 141, 374, 782, 782, 33, 2639, 315, 33, 315,
+ 756, 321, 2466, 41, 1068, 4216, 41, 127, 763, 1073,
+ 5944, 6109, 50, 768, 769, 50, 4218, 5371, 2591, 5796,
+ 321, 782, 1981, 601, 127, 448, 4499, 5961, 1973, 767,
+ 768, 769, 770, 771, 772, 773, 1981, 468, 241, 704,
+ 782, 10, 2639, 3213, 695, 196, 2084, 33, 4339, 33,
+ 568, 315, 2639, 744, 167, 41, 315, 41, 649, 33,
+ 409, 410, 315, 315, 50, 209, 50, 41, 208, 386,
+ 2667, 33, 145, 437, 2037, 506, 50, 2663, 2041, 41,
+ 2667, 398, 119, 167, 2047, 421, 208, 127, 50, 461,
+ 208, 746, 2665, 315, 145, 2058, 293, 766, 767, 768,
+ 769, 770, 771, 772, 773, 42, 33, 5745, 6025, 160,
+ 313, 6028, 5777, 723, 41, 152, 712, 296, 3038, 782,
+ 33, 493, 321, 50, 4505, 2070, 2070, 782, 41, 4510,
+ 572, 341, 443, 444, 744, 4505, 4517, 50, 652, 782,
+ 4510, 47, 3376, 337, 117, 118, 2109, 4517, 2111, 359,
+ 4350, 4351, 595, 568, 4354, 4355, 366, 782, 755, 753,
+ 4360, 4361, 99, 5791, 2127, 5793, 763, 5944, 2131, 2132,
+ 208, 6105, 141, 208, 5854, 315, 2139, 2140, 5197, 323,
+ 53, 498, 462, 2862, 2648, 744, 33, 4387, 779, 386,
+ 2654, 614, 170, 315, 41, 567, 2838, 315, 2161, 312,
+ 106, 99, 2666, 50, 5223, 541, 2169, 2170, 2171, 2172,
+ 2173, 2174, 2175, 2176, 2177, 2178, 5081, 5082, 4383, 4384,
+ 4385, 2184, 208, 457, 208, 2164, 668, 2164, 312, 88,
+ 661, 5980, 205, 2164, 208, 458, 63, 72, 2201, 2202,
+ 3976, 2204, 4407, 4408, 364, 4410, 208, 307, 691, 229,
+ 310, 568, 782, 5918, 2164, 292, 671, 4128, 71, 4130,
+ 73, 364, 2225, 2164, 35, 36, 37, 6201, 39, 463,
+ 528, 251, 3285, 251, 2237, 3345, 648, 315, 5916, 5633,
+ 315, 208, 33, 156, 5638, 5639, 99, 5152, 782, 5154,
+ 41, 126, 2935, 2164, 5308, 208, 3996, 3997, 495, 50,
+ 5928, 5467, 745, 3223, 746, 2893, 577, 81, 6225, 282,
+ 590, 5025, 5026, 736, 141, 766, 767, 768, 769, 770,
+ 771, 772, 773, 5342, 2287, 2120, 6090, 6091, 448, 315,
+ 450, 315, 154, 384, 770, 771, 772, 773, 2935, 2302,
+ 63, 315, 780, 3678, 2307, 448, 33, 450, 2935, 782,
+ 131, 120, 4224, 315, 41, 613, 4033, 6106, 6107, 782,
+ 55, 208, 454, 50, 713, 2328, 600, 716, 413, 33,
+ 413, 723, 2335, 147, 2337, 2338, 2339, 41, 601, 2922,
+ 2343, 2922, 2345, 214, 158, 156, 50, 667, 315, 403,
+ 225, 33, 166, 602, 3729, 226, 47, 2922, 2361, 41,
+ 1464, 4566, 315, 417, 226, 303, 304, 499, 50, 2372,
+ 2373, 669, 2207, 6041, 2939, 33, 6044, 2380, 141, 193,
+ 540, 33, 4587, 41, 3751, 2970, 217, 6279, 3081, 41,
+ 2975, 3351, 50, 5787, 33, 787, 2856, 540, 50, 2984,
+ 0, 6169, 41, 5953, 489, 2990, 489, 128, 3127, 218,
+ 281, 50, 5921, 5922, 3133, 106, 151, 208, 293, 3032,
+ 47, 4663, 3751, 33, 782, 47, 782, 528, 315, 3148,
+ 151, 41, 167, 6325, 3816, 249, 568, 6249, 2441, 3118,
+ 50, 33, 3121, 2278, 4684, 5995, 3125, 2450, 47, 41,
+ 281, 33, 3207, 2456, 614, 627, 287, 2460, 50, 41,
+ 47, 47, 5367, 277, 2537, 403, 3065, 53, 50, 55,
+ 2305, 614, 2545, 4889, 3154, 3040, 780, 4808, 2481, 106,
+ 730, 208, 6250, 782, 106, 3816, 3596, 51, 7, 782,
+ 782, 766, 767, 768, 769, 770, 771, 772, 773, 573,
+ 574, 2504, 4918, 238, 208, 3787, 33, 106, 3937, 3791,
+ 2513, 683, 613, 366, 41, 148, 3626, 4032, 151, 106,
+ 782, 5575, 787, 50, 315, 6293, 208, 5029, 33, 144,
+ 3115, 602, 3117, 386, 763, 128, 41, 475, 3123, 3124,
+ 104, 2544, 128, 4933, 101, 50, 33, 6359, 6360, 6245,
+ 208, 6060, 763, 4974, 41, 6064, 208, 2536, 57, 2536,
+ 6328, 154, 3615, 50, 4974, 2536, 33, 5196, 669, 208,
+ 5324, 5325, 71, 2576, 41, 2578, 650, 476, 3631, 212,
+ 2583, 196, 3, 50, 3637, 3638, 2589, 2590, 315, 6285,
+ 6358, 3156, 463, 150, 2667, 2536, 3978, 33, 208, 136,
+ 3355, 5230, 782, 2606, 2607, 3980, 4030, 4031, 4523, 4524,
+ 31, 315, 6257, 6258, 50, 3298, 208, 4041, 780, 145,
+ 3339, 158, 782, 3588, 782, 2536, 208, 2630, 5044, 4576,
+ 57, 2634, 141, 315, 160, 5540, 4666, 4552, 153, 4032,
+ 4606, 2644, 419, 5607, 769, 4038, 73, 3978, 2651, 426,
+ 33, 4044, 4567, 168, 6299, 780, 2659, 315, 41, 2662,
+ 2639, 3298, 2639, 315, 769, 33, 33, 50, 2639, 206,
+ 779, 3298, 4619, 41, 41, 780, 315, 782, 787, 413,
+ 5109, 208, 50, 50, 2663, 5114, 2663, 586, 2667, 787,
+ 2667, 1050, 2663, 682, 593, 2438, 2667, 254, 2639, 2442,
+ 599, 690, 763, 208, 782, 315, 695, 782, 214, 311,
+ 1069, 1070, 533, 534, 19, 20, 537, 538, 539, 3284,
+ 226, 208, 2663, 315, 2709, 2709, 2667, 271, 2639, 3689,
+ 713, 647, 31, 315, 717, 3418, 88, 328, 282, 296,
+ 154, 208, 33, 6252, 6253, 768, 769, 3430, 305, 2536,
+ 41, 3434, 2663, 3435, 780, 65, 2667, 314, 782, 50,
+ 510, 3344, 268, 3344, 3446, 3447, 1334, 22, 782, 3451,
+ 258, 328, 1340, 1341, 29, 674, 31, 5027, 737, 3344,
+ 782, 3418, 23, 289, 178, 26, 27, 33, 315, 705,
+ 31, 3418, 708, 3430, 780, 41, 782, 3434, 36, 37,
+ 33, 4350, 4351, 3430, 50, 4354, 4355, 3434, 41, 2812,
+ 315, 4360, 4361, 2816, 33, 782, 779, 50, 3597, 735,
+ 1424, 3503, 41, 1427, 1428, 208, 2829, 743, 315, 782,
+ 4582, 50, 343, 5249, 4586, 50, 735, 81, 3520, 88,
+ 208, 208, 3597, 33, 5260, 33, 299, 780, 315, 782,
+ 33, 41, 2639, 41, 5094, 6315, 6316, 2856, 41, 417,
+ 50, 33, 50, 53, 5104, 5105, 3431, 50, 3433, 41,
+ 780, 2856, 782, 6407, 226, 5504, 2663, 141, 50, 36,
+ 2667, 128, 6103, 40, 5089, 5090, 5091, 5092, 45, 33,
+ 5095, 5096, 5521, 780, 780, 5100, 782, 41, 5103, 746,
+ 780, 5106, 782, 147, 5109, 5534, 50, 5536, 5113, 5114,
+ 2051, 2052, 2915, 2916, 158, 670, 268, 208, 33, 2922,
+ 33, 24, 166, 2926, 2927, 28, 41, 30, 41, 32,
+ 436, 780, 315, 782, 670, 50, 2939, 50, 2941, 6033,
+ 6034, 2944, 2945, 33, 113, 114, 115, 315, 315, 193,
+ 281, 41, 763, 764, 765, 24, 2935, 4339, 2935, 28,
+ 50, 30, 208, 32, 2935, 214, 2969, 2970, 782, 460,
+ 3653, 3654, 2975, 3653, 3654, 208, 33, 226, 4890, 128,
+ 33, 2984, 351, 352, 41, 4208, 338, 2990, 41, 208,
+ 33, 782, 4555, 50, 2935, 784, 785, 50, 41, 780,
+ 3960, 782, 119, 786, 33, 249, 123, 50, 4339, 780,
+ 127, 782, 41, 5043, 3017, 780, 3653, 3654, 208, 388,
+ 208, 50, 145, 312, 315, 208, 3653, 3654, 662, 145,
+ 3033, 4254, 281, 277, 145, 152, 208, 3040, 3041, 3042,
+ 289, 101, 780, 5614, 782, 28, 3004, 30, 5253, 33,
+ 5255, 168, 5257, 780, 4164, 787, 173, 41, 427, 3687,
+ 5300, 413, 33, 780, 208, 782, 50, 3070, 3787, 315,
+ 41, 3921, 3791, 127, 3077, 324, 780, 734, 3081, 50,
+ 47, 780, 315, 782, 436, 88, 4461, 4212, 120, 206,
+ 150, 5006, 780, 208, 782, 208, 315, 3557, 780, 23,
+ 2935, 5306, 26, 27, 3107, 5345, 787, 31, 3111, 3112,
+ 3113, 463, 3115, 47, 3117, 281, 515, 516, 208, 3122,
+ 3123, 3124, 780, 657, 3127, 315, 129, 315, 780, 436,
+ 3133, 530, 315, 532, 101, 780, 4912, 782, 743, 779,
+ 2431, 780, 145, 315, 4197, 3148, 4199, 2982, 2935, 3152,
+ 57, 208, 114, 3156, 3157, 208, 5572, 780, 2993, 782,
+ 268, 780, 4215, 782, 71, 208, 73, 18, 19, 20,
+ 780, 315, 786, 287, 33, 292, 470, 786, 40, 208,
+ 5210, 782, 41, 150, 128, 3770, 147, 436, 780, 40,
+ 780, 50, 782, 55, 254, 141, 3824, 158, 780, 780,
+ 315, 782, 315, 5819, 3207, 166, 151, 24, 25, 26,
+ 3213, 28, 647, 30, 463, 32, 454, 606, 18, 19,
+ 20, 5312, 779, 779, 208, 315, 625, 626, 5744, 584,
+ 3065, 33, 3797, 602, 3307, 3308, 296, 208, 3921, 41,
+ 40, 3996, 3997, 3321, 3079, 305, 748, 749, 50, 751,
+ 619, 753, 475, 780, 314, 3258, 3975, 779, 315, 262,
+ 704, 499, 315, 3266, 3829, 3830, 71, 580, 328, 128,
+ 735, 779, 315, 73, 333, 780, 645, 5261, 281, 287,
+ 780, 3284, 782, 4658, 3921, 779, 315, 254, 249, 151,
+ 293, 96, 333, 780, 3921, 780, 5809, 782, 779, 99,
+ 3865, 203, 333, 5333, 109, 167, 658, 203, 551, 160,
+ 662, 782, 283, 780, 3940, 779, 277, 686, 3321, 3298,
+ 125, 3298, 40, 561, 5239, 283, 128, 311, 3331, 296,
+ 3333, 315, 50, 427, 196, 338, 3339, 55, 305, 3342,
+ 33, 3344, 3345, 360, 315, 196, 786, 314, 41, 208,
+ 155, 3186, 3355, 5769, 780, 779, 782, 50, 40, 3194,
+ 160, 328, 780, 780, 782, 782, 604, 33, 50, 15,
+ 780, 5613, 782, 55, 225, 41, 238, 780, 780, 782,
+ 782, 779, 779, 735, 50, 955, 956, 3298, 958, 959,
+ 960, 743, 4171, 4172, 779, 965, 196, 780, 779, 306,
+ 307, 201, 780, 203, 782, 780, 208, 782, 779, 658,
+ 413, 737, 780, 780, 33, 779, 4171, 4172, 40, 779,
+ 779, 355, 41, 779, 73, 225, 5677, 38, 3431, 234,
+ 3433, 50, 4655, 151, 341, 3412, 3413, 3414, 780, 3418,
+ 782, 3418, 293, 780, 4126, 782, 779, 3418, 4963, 167,
+ 779, 3430, 359, 3430, 182, 3434, 315, 3434, 33, 366,
+ 577, 780, 780, 782, 782, 399, 41, 401, 780, 151,
+ 782, 3412, 3413, 3414, 780, 50, 782, 3418, 196, 737,
+ 780, 5776, 782, 779, 391, 167, 735, 5782, 5783, 780,
+ 295, 779, 779, 293, 743, 5586, 213, 780, 4277, 782,
+ 779, 3412, 3413, 3414, 780, 5596, 782, 213, 780, 128,
+ 782, 3298, 779, 315, 196, 208, 4945, 779, 779, 3430,
+ 238, 4149, 4277, 3434, 213, 763, 764, 765, 779, 5192,
+ 5193, 3534, 5195, 213, 780, 386, 31, 5200, 160, 779,
+ 5203, 785, 208, 5206, 5207, 779, 346, 780, 780, 779,
+ 782, 5214, 127, 5216, 779, 779, 238, 491, 3557, 779,
+ 3563, 780, 5225, 779, 751, 4947, 3551, 24, 25, 26,
+ 4963, 28, 3557, 30, 196, 32, 787, 780, 47, 782,
+ 4633, 4634, 5612, 3418, 5531, 780, 386, 782, 3591, 208,
+ 4309, 4310, 780, 3596, 3597, 533, 534, 780, 779, 537,
+ 538, 539, 779, 225, 409, 410, 779, 541, 780, 779,
+ 24, 25, 33, 15, 28, 5599, 30, 283, 32, 780,
+ 41, 782, 315, 3626, 3697, 3412, 3413, 3414, 780, 50,
+ 782, 3418, 360, 208, 779, 15, 780, 106, 780, 779,
+ 782, 644, 3641, 3430, 495, 779, 3649, 3434, 3651, 315,
+ 780, 780, 782, 782, 588, 658, 3641, 3641, 780, 662,
+ 782, 779, 3641, 780, 3641, 780, 763, 780, 3641, 779,
+ 3641, 293, 779, 3746, 3653, 3654, 3653, 3654, 406, 779,
+ 3683, 3641, 3653, 3654, 5714, 3641, 779, 779, 3641, 3641,
+ 780, 3641, 3695, 3766, 6207, 495, 315, 780, 779, 782,
+ 3641, 3641, 779, 3653, 3654, 708, 4759, 128, 780, 4294,
+ 782, 779, 3653, 3654, 24, 25, 43, 779, 28, 779,
+ 30, 33, 32, 780, 780, 203, 782, 780, 779, 41,
+ 3641, 780, 735, 782, 779, 19, 20, 780, 50, 779,
+ 315, 68, 3653, 3654, 678, 780, 513, 782, 515, 516,
+ 77, 780, 779, 558, 559, 5739, 484, 779, 18, 19,
+ 20, 6056, 782, 530, 386, 532, 700, 3770, 779, 24,
+ 25, 98, 3775, 28, 4483, 30, 4485, 32, 779, 779,
+ 40, 33, 75, 75, 3787, 779, 779, 208, 3791, 41,
+ 779, 779, 779, 5884, 3797, 264, 123, 266, 50, 779,
+ 127, 53, 3805, 130, 779, 779, 779, 779, 277, 779,
+ 779, 779, 779, 73, 141, 677, 128, 128, 584, 547,
+ 779, 203, 779, 730, 293, 779, 3829, 3830, 779, 779,
+ 157, 779, 779, 126, 126, 563, 564, 779, 165, 99,
+ 568, 569, 570, 779, 779, 4624, 3919, 779, 5511, 779,
+ 177, 4533, 145, 145, 3641, 5952, 779, 4472, 625, 626,
+ 660, 145, 3865, 779, 779, 779, 779, 160, 160, 4624,
+ 258, 782, 670, 495, 201, 4558, 460, 688, 3881, 779,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 127, 688, 676, 315, 704, 208, 3188, 3189, 429,
+ 160, 752, 510, 143, 782, 177, 782, 782, 636, 3744,
+ 582, 716, 4594, 55, 241, 18, 19, 20, 360, 246,
+ 247, 4558, 119, 127, 217, 782, 123, 394, 782, 782,
+ 127, 4558, 225, 225, 645, 579, 196, 40, 699, 763,
+ 7, 201, 3921, 203, 3921, 2500, 743, 5894, 463, 660,
+ 53, 3954, 752, 463, 779, 152, 208, 6162, 686, 677,
+ 10, 3940, 782, 3940, 2519, 225, 217, 31, 145, 3940,
+ 73, 168, 3975, 2528, 6390, 136, 173, 296, 151, 2534,
+ 122, 65, 22, 694, 24, 25, 313, 2542, 28, 29,
+ 30, 31, 3995, 3996, 3997, 677, 99, 2552, 4001, 3940,
+ 2555, 393, 408, 315, 42, 474, 42, 3, 743, 206,
+ 3921, 4014, 583, 787, 311, 427, 779, 779, 3853, 3854,
+ 3855, 3856, 224, 3858, 3859, 352, 391, 779, 779, 3940,
+ 779, 6273, 33, 293, 15, 779, 127, 411, 127, 787,
+ 41, 786, 54, 5990, 352, 786, 4023, 374, 127, 50,
+ 81, 782, 53, 5482, 5483, 787, 5485, 160, 120, 201,
+ 787, 3896, 3897, 315, 3899, 177, 3901, 3902, 3903, 3904,
+ 3905, 3906, 3907, 643, 3909, 704, 780, 333, 3913, 333,
+ 333, 141, 4023, 506, 44, 311, 346, 561, 6035, 128,
+ 311, 384, 384, 196, 779, 292, 154, 177, 201, 786,
+ 203, 40, 386, 782, 478, 779, 4109, 6137, 106, 393,
+ 787, 47, 4023, 427, 336, 780, 147, 444, 780, 782,
+ 787, 780, 225, 780, 408, 780, 386, 158, 648, 780,
+ 127, 391, 127, 780, 3921, 166, 779, 787, 167, 779,
+ 851, 782, 136, 287, 782, 856, 430, 4150, 290, 127,
+ 770, 73, 787, 3940, 782, 688, 127, 19, 20, 151,
+ 6144, 4164, 193, 4166, 6406, 876, 105, 770, 4171, 4172,
+ 544, 4174, 546, 490, 4177, 4178, 701, 451, 552, 127,
+ 782, 688, 127, 4811, 780, 435, 779, 782, 779, 154,
+ 293, 217, 427, 3, 151, 57, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, 208, 782, 386,
+ 679, 680, 681, 682, 363, 239, 393, 360, 249, 510,
+ 510, 510, 510, 510, 510, 782, 782, 763, 120, 676,
+ 4233, 408, 287, 47, 127, 495, 4023, 673, 612, 4224,
+ 4225, 596, 6272, 346, 955, 956, 277, 958, 959, 960,
+ 743, 535, 191, 430, 965, 582, 5685, 196, 5687, 5688,
+ 4825, 403, 780, 780, 548, 81, 780, 780, 410, 81,
+ 158, 780, 4275, 158, 4277, 210, 779, 4280, 4281, 787,
+ 782, 565, 656, 386, 65, 5338, 137, 439, 251, 787,
+ 418, 4294, 231, 6277, 664, 779, 122, 480, 4883, 480,
+ 782, 594, 594, 250, 780, 782, 4309, 4310, 6255, 283,
+ 595, 68, 81, 4316, 315, 734, 4394, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 779, 268,
+ 310, 147, 391, 310, 237, 147, 57, 30, 782, 4174,
+ 703, 72, 158, 222, 75, 6375, 158, 206, 128, 203,
+ 166, 782, 782, 779, 166, 287, 63, 146, 535, 6389,
+ 154, 42, 465, 780, 780, 6395, 649, 780, 128, 780,
+ 427, 548, 6402, 770, 748, 201, 780, 193, 147, 4457,
+ 577, 193, 780, 769, 780, 759, 779, 203, 565, 158,
+ 780, 203, 495, 6, 7, 126, 780, 166, 129, 780,
+ 660, 5080, 780, 780, 780, 18, 690, 780, 270, 702,
+ 702, 780, 780, 780, 145, 362, 780, 122, 780, 281,
+ 779, 705, 782, 370, 193, 782, 780, 780, 780, 160,
+ 779, 782, 782, 249, 203, 782, 4439, 249, 385, 780,
+ 53, 780, 787, 780, 780, 779, 217, 386, 395, 396,
+ 397, 773, 4287, 779, 4457, 782, 779, 4460, 405, 398,
+ 4463, 277, 780, 779, 290, 277, 779, 378, 81, 591,
+ 31, 31, 31, 4472, 427, 782, 131, 128, 782, 782,
+ 249, 763, 787, 299, 127, 5122, 217, 4472, 4472, 787,
+ 127, 787, 752, 504, 225, 5122, 201, 128, 4501, 88,
+ 5065, 782, 4487, 782, 782, 5184, 119, 787, 277, 782,
+ 123, 780, 613, 690, 127, 258, 780, 782, 53, 5199,
+ 782, 100, 47, 136, 137, 5375, 365, 127, 705, 670,
+ 143, 262, 576, 782, 147, 782, 5101, 19, 20, 152,
+ 158, 154, 158, 750, 439, 158, 507, 549, 3839, 3840,
+ 123, 3842, 3843, 166, 416, 168, 145, 660, 557, 498,
+ 173, 779, 293, 657, 268, 268, 268, 268, 430, 268,
+ 432, 713, 4575, 314, 716, 57, 203, 127, 779, 4558,
+ 193, 4558, 156, 725, 410, 290, 734, 763, 763, 763,
+ 203, 763, 763, 206, 763, 763, 543, 763, 763, 763,
+ 763, 1312, 464, 763, 4607, 763, 763, 763, 555, 763,
+ 763, 317, 763, 226, 427, 477, 763, 4620, 763, 295,
+ 787, 4624, 299, 763, 4627, 214, 763, 763, 763, 568,
+ 763, 763, 245, 576, 780, 168, 249, 226, 34, 333,
+ 287, 780, 780, 287, 755, 258, 780, 4558, 510, 752,
+ 5202, 782, 392, 384, 4657, 782, 506, 787, 787, 782,
+ 154, 787, 427, 4666, 277, 780, 528, 153, 4667, 153,
+ 787, 780, 780, 780, 780, 4678, 213, 787, 780, 292,
+ 65, 769, 787, 769, 780, 298, 299, 4672, 780, 782,
+ 5369, 4764, 5375, 640, 5373, 5374, 779, 779, 403, 312,
+ 289, 314, 338, 287, 697, 410, 287, 241, 655, 584,
+ 4713, 128, 128, 787, 787, 492, 4719, 232, 779, 30,
+ 4723, 769, 321, 779, 733, 545, 780, 779, 763, 782,
+ 779, 763, 203, 126, 203, 786, 782, 333, 5375, 203,
+ 287, 50, 712, 4746, 606, 158, 693, 158, 5375, 782,
+ 780, 613, 408, 31, 408, 31, 31, 240, 53, 283,
+ 707, 623, 72, 779, 779, 75, 779, 30, 30, 5729,
+ 461, 4558, 4607, 787, 177, 637, 780, 245, 6, 7,
+ 770, 584, 770, 143, 5467, 352, 155, 787, 270, 95,
+ 18, 155, 4627, 4796, 780, 780, 780, 780, 30, 206,
+ 787, 780, 4805, 5440, 779, 153, 33, 669, 780, 782,
+ 672, 780, 780, 5440, 41, 782, 126, 65, 780, 129,
+ 128, 780, 4825, 50, 780, 53, 688, 779, 31, 780,
+ 5467, 31, 763, 779, 232, 145, 177, 779, 782, 780,
+ 5467, 311, 704, 232, 782, 779, 459, 436, 734, 779,
+ 160, 203, 690, 81, 554, 690, 408, 719, 779, 779,
+ 299, 299, 779, 594, 378, 92, 93, 94, 95, 53,
+ 4873, 780, 782, 31, 463, 782, 208, 446, 287, 53,
+ 4883, 212, 780, 439, 251, 4888, 131, 713, 502, 780,
+ 716, 119, 65, 256, 168, 123, 780, 780, 504, 127,
+ 314, 643, 206, 65, 782, 4890, 4909, 780, 136, 137,
+ 780, 138, 139, 140, 782, 225, 347, 169, 217, 147,
+ 780, 782, 780, 780, 152, 6354, 154, 314, 780, 447,
+ 158, 173, 779, 763, 416, 4920, 4920, 782, 166, 754,
+ 168, 167, 741, 418, 5509, 173, 418, 217, 430, 203,
+ 432, 5630, 262, 53, 247, 780, 250, 4934, 676, 247,
+ 299, 299, 189, 190, 577, 193, 170, 30, 5046, 30,
+ 779, 702, 593, 217, 384, 203, 217, 217, 206, 65,
+ 217, 208, 464, 293, 159, 705, 217, 159, 4823, 705,
+ 592, 603, 217, 4934, 217, 477, 217, 217, 226, 252,
+ 5003, 203, 203, 386, 485, 128, 439, 584, 713, 314,
+ 203, 716, 154, 602, 780, 427, 780, 245, 780, 498,
+ 725, 249, 549, 4934, 155, 613, 253, 71, 510, 780,
+ 258, 780, 782, 65, 780, 780, 406, 50, 782, 787,
+ 5043, 5669, 780, 5046, 780, 782, 528, 779, 787, 277,
+ 6103, 5054, 5130, 779, 779, 644, 427, 5042, 5042, 654,
+ 53, 780, 5065, 31, 292, 5068, 378, 5070, 362, 779,
+ 779, 299, 117, 662, 384, 65, 370, 65, 65, 30,
+ 446, 779, 5085, 741, 312, 331, 314, 141, 315, 316,
+ 160, 385, 741, 225, 390, 422, 314, 669, 5101, 424,
+ 281, 395, 396, 397, 782, 780, 549, 780, 445, 780,
+ 685, 405, 779, 782, 5797, 780, 419, 779, 5121, 708,
+ 583, 160, 779, 160, 606, 236, 5129, 779, 53, 782,
+ 780, 613, 105, 779, 5137, 780, 203, 750, 786, 780,
+ 779, 623, 782, 5122, 786, 5122, 735, 4934, 786, 127,
+ 763, 65, 65, 65, 743, 637, 31, 127, 287, 160,
+ 5797, 411, 127, 782, 314, 287, 5194, 780, 6221, 782,
+ 5797, 780, 785, 786, 674, 782, 584, 780, 601, 780,
+ 5183, 5209, 5819, 649, 411, 440, 601, 669, 779, 787,
+ 672, 5219, 5819, 5196, 5197, 5198, 367, 779, 5226, 779,
+ 5228, 5229, 299, 779, 787, 5208, 688, 5210, 72, 787,
+ 780, 5122, 120, 120, 5217, 5218, 281, 73, 287, 287,
+ 5223, 721, 281, 287, 685, 584, 5061, 5230, 72, 72,
+ 15, 160, 5235, 50, 5953, 780, 696, 719, 711, 30,
+ 782, 782, 780, 779, 18, 65, 786, 5250, 779, 543,
+ 65, 478, 218, 779, 786, 144, 217, 99, 99, 428,
+ 6, 555, 5097, 5098, 584, 584, 723, 296, 649, 779,
+ 418, 418, 5107, 779, 430, 780, 5995, 780, 782, 180,
+ 779, 779, 779, 160, 594, 741, 5121, 160, 296, 5854,
+ 201, 339, 99, 53, 427, 154, 702, 5274, 697, 779,
+ 589, 203, 780, 779, 5139, 779, 426, 198, 737, 247,
+ 352, 127, 779, 422, 779, 207, 173, 544, 5321, 546,
+ 779, 338, 780, 218, 779, 552, 585, 780, 779, 779,
+ 5333, 5334, 780, 5274, 251, 5122, 782, 6017, 838, 5342,
+ 782, 480, 203, 780, 780, 6398, 332, 427, 5351, 577,
+ 203, 5354, 5355, 780, 112, 203, 5359, 65, 780, 296,
+ 5363, 655, 101, 5274, 649, 203, 203, 143, 5371, 116,
+ 432, 30, 258, 5376, 779, 3641, 3053, 3915, 782, 5257,
+ 5255, 5253, 3763, 6102, 5781, 612, 4372, 5952, 5462, 5821,
+ 5979, 6209, 702, 2133, 774, 5137, 5375, 1469, 5375, 693,
+ 3940, 4446, 3924, 5046, 4457, 2558, 2121, 3074, 4242, 5244,
+ 4013, 3991, 2467, 707, 840, 2663, 5652, 5651, 5496, 2664,
+ 5498, 5421, 4872, 2665, 4393, 5525, 4616, 5317, 4620, 656,
+ 6023, 2901, 6392, 4724, 4725, 4726, 4727, 4728, 4729, 4730,
+ 4731, 4732, 4733, 5003, 4735, 4736, 4737, 4738, 4739, 4740,
+ 4741, 4742, 4743, 4744, 5599, 6139, 4747, 4748, 6277, 6234,
+ 5907, 5440, 5597, 5440, 5375, 3185, 1457, 4867, 5191, 5497,
+ 5803, 6036, 5475, 5499, 5477, 5235, 5363, 4873, 5079, 6102,
+ 6258, 6092, 5995, 5984, 5984, 5984, 5984, 5274, 5467, 4555,
+ 5467, 43, 4508, 6105, 4033, 6017, 1621, 997, 2502, 5502,
+ 5503, 5504, 5505, 4112, 3317, 4583, 5509, 5510, 4578, 5512,
+ 4586, 6283, 491, 1013, 5517, 5518, 68, 1017, 5521, 491,
+ 6252, 748, 750, 5526, 5527, 77, 6253, 5788, 3755, 5440,
+ 5533, 5534, 759, 5536, 6048, 763, 92, 93, 94, 95,
+ 1040, 5544, 6060, 5378, 1044, 6064, 98, 5698, 2527, 1049,
+ 5495, 4278, 780, 4872, 782, 4846, 5467, 785, 786, 5394,
+ 4851, 5564, 5493, 5232, 1885, 1478, 5866, 2317, 3743, 3738,
+ 5573, 123, 3213, 6014, 5702, 127, 2484, 4001, 130, 3591,
+ 6208, 3042, 138, 139, 140, 3375, 4490, 537, 5375, 141,
+ 3551, 5664, 1441, 5671, 6159, 780, 3684, 1388, 1206, 5672,
+ 1428, 5674, 3820, 4917, 3600, 157, 4607, 3502, 3499, 5612,
+ 2055, 3569, 3568, 165, 1114, 1115, 1116, 1117, 4149, 5622,
+ 1120, 2111, 4058, 5626, 4946, 177, 1987, 1127, 1956, 1977,
+ 5633, 5634, 6092, 189, 190, 5638, 5639, 6211, 5983, 6316,
+ 6315, 5480, 2368, 2373, 5156, 5648, 4660, 5987, 5054, 201,
+ 5988, 1386, 1386, 5440, 2363, 3162, 1386, 5660, 1386, 5662,
+ 1962, 5664, 1386, 5666, 2389, 4135, 5651, 6232, 3807, 5672,
+ 4805, 5674, 4133, 5676, 4804, 5884, 5714, 5312, 5029, 3823,
+ 5467, 5308, 4947, 3816, 5329, 786, 1419, 4566, 1449, 241,
+ 4811, 509, 491, 3156, 246, 247, 3331, 253, 5701, 703,
+ 2628, 4487, 1296, 3368, 5707, 4672, 5709, 5612, 3850, 4659,
+ 5060, 5714, 6272, 4657, 884, 2576, 3013, 885, 5796, 694,
+ 5723, 2193, 5800, 1223, 3014, 694, 3676, 1444, 3068, 5648,
+ 694, 5734, 5735, 5345, 2306, 1890, 4493, 6275, 5161, 6321,
+ 5489, 6395, 6402, 1001, 3365, 5818, 5819, 3033, 5333, 3418,
+ 3653, 693, 3654, 2670, 2947, 3655, 3650, 5760, 693, 2644,
+ 316, 313, 3646, 3645, 4183, 691, 1187, 1221, 5771, 2337,
+ 4382, 3596, 4923, 3207, 5777, 6403, 4825, 2133, 1878, 1878,
+ 3758, 5569, 5785, 4394, 5787, 734, 1330, 515, 491, 491,
+ 491, 970, 4484, 2666, 4016, 5973, 5087, 989, 5801, 4676,
+ 352, 5974, 6203, 970, 4291, 5431, 5440, 3764, 5099, 1309,
+ 5440, 5432, 5469, 1313, 6379, 5818, 5447, -1, 5797, 6384,
+ 5797, 876, 374, 989, -1, 2536, -1, 1816, -1, -1,
+ 5858, -1, -1, -1, -1, -1, -1, -1, -1, 5842,
+ 5819, -1, 5819, -1, -1, 43, -1, -1, 5819, 5852,
+ -1, 5854, -1, -1, -1, 411, -1, 5860, 5861, 5862,
+ -1, -1, -1, -1, -1, -1, 5944, -1, -1, -1,
+ 68, -1, -1, -1, -1, -1, -1, -1, 5819, 77,
+ -1, -1, -1, 5961, 108, -1, 5797, -1, -1, -1,
+ -1, -1, 444, -1, -1, -1, -1, -1, -1, -1,
+ 98, -1, -1, -1, -1, -1, -1, -1, 5819, -1,
+ -1, -1, -1, -1, 1414, 5918, -1, 1417, 142, -1,
+ 5923, -1, 478, -1, -1, 123, 5929, -1, 2639, 127,
+ -1, -1, 130, -1, -1, -1, -1, -1, -1, 997,
+ -1, -1, -1, 141, -1, -1, -1, -1, -1, 5952,
+ 1450, -1, 2663, -1, -1, 179, 2667, -1, -1, 157,
+ -1, -1, -1, -1, -1, -1, -1, 165, -1, -1,
+ -1, -1, -1, -1, -1, 5978, -1, -1, -1, 177,
+ 5983, -1, -1, -1, 5987, 5988, 1044, 1487, 544, -1,
+ 546, -1, -1, -1, -1, -1, 552, -1, -1, -1,
+ -1, -1, -1, 201, -1, -1, -1, -1, -1, -1,
+ 5797, 6014, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6023, -1, -1, -1, -1, -1, -1, 6105, -1, -1,
+ 582, -1, 5819, 6036, -1, -1, 6109, -1, -1, -1,
+ -1, -1, -1, 241, -1, -1, -1, -1, 246, 247,
+ -1, -1, -1, -1, -1, -1, 612, -1, -1, -1,
+ -1, -1, 1120, -1, -1, 6068, -1, -1, -1, -1,
+ -1, -1, -1, 6076, -1, 6078, 6079, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6,
+ 7, -1, -1, 6092, -1, -1, -1, -1, -1, -1,
+ 656, 18, -1, -1, 5939, -1, 6109, 6092, -1, -1,
+ -1, -1, -1, -1, -1, 313, -1, -1, -1, -1,
+ -1, -1, -1, 6201, -1, -1, -1, 6205, -1, 6202,
+ 6203, -1, -1, -1, 6137, -1, 53, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 352, -1, 6159, -1, -1, -1,
+ -1, -1, -1, -1, 81, 1223, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6177, 6178, 374, -1, 6181, 6257,
+ 6258, 733, -1, -1, -1, 6188, -1, -1, -1, -1,
+ -1, -1, 748, -1, -1, 6030, 6031, -1, -1, 6202,
+ 6203, -1, 119, 759, -1, -1, 123, 6042, -1, -1,
+ 127, -1, -1, -1, -1, -1, -1, -1, -1, 136,
+ 137, 6299, -1, -1, 2935, -1, -1, -1, 6306, 6232,
+ 147, -1, -1, -1, -1, 152, -1, 154, -1, -1,
+ -1, 158, -1, 6246, -1, -1, 444, -1, -1, 166,
+ -1, 168, -1, -1, -1, 1313, 173, 481, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6272,
+ -1, -1, -1, -1, -1, -1, 193, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 203, 511, 512, 206,
+ 514, 515, 516, 517, 518, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, -1, 529, 530, 531, 532, 226,
+ -1, -1, -1, 6148, -1, -1, 6151, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 245, -1,
+ -1, -1, 249, -1, -1, -1, -1, -1, -1, -1,
+ -1, 258, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1414, 3068, -1, 1417,
+ 277, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6375, -1, -1, 292, 6379, -1, -1, 1879,
+ -1, 6384, 299, -1, 582, -1, 6389, -1, 1888, -1,
+ 1890, -1, 6395, -1, -1, 312, -1, 314, -1, 6402,
+ -1, 625, 626, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1949,
+ 1950, -1, -1, -1, -1, 1955, -1, -1, -1, 1959,
+ 1960, 1961, -1, -1, -1, -1, -1, -1, -1, 1969,
+ 1970, 1971, -1, -1, -1, 1975, -1, -1, -1, 1979,
+ 1980, 1981, -1, 1983, 1984, 1985, 1986, 1987, -1, -1,
+ -1, -1, -1, 1993, -1, 1995, -1, -1, 1998, 1999,
+ 2000, 2001, -1, 2003, -1, 2005, 2006, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2019,
+ 2020, 2021, 2022, 2023, -1, 2025, 2026, 2027, 2028, 2029,
+ 2030, -1, 2032, 2033, -1, 2035, 2036, -1, 2038, 2039,
+ -1, -1, 2042, 2043, -1, 2045, 2046, -1, 2048, -1,
+ 2050, -1, -1, -1, 2054, 2055, 2056, -1, -1, 2059,
+ 2060, 2061, 2062, -1, 2064, -1, -1, -1, -1, -1,
+ -1, 2071, -1, 18, 19, 20, -1, 2077, 2078, 2079,
+ 2080, -1, -1, -1, -1, -1, -1, 3298, 2088, 2089,
+ -1, 2091, 2092, -1, -1, 2095, 2096, 2097, 2098, 2099,
+ 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 5899, 5900,
+ 2110, 5902, 5903, 5904, 5905, 2115, -1, -1, -1, -1,
+ -1, -1, 2122, -1, -1, -1, 71, -1, 73, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2145, -1, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, -1, -1, -1,
+ 577, -1, -1, 2163, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6, 7,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 18, 19, 20, -1, -1, -1, -1, -1, -1, -1,
+ 145, 3412, 3413, 3414, -1, -1, -1, 3418, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 46, 3430,
+ 48, 49, -1, 3434, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6029, -1,
+ -1, 6032, 70, -1, 72, -1, -1, -1, -1, 6040,
+ 78, -1, 6043, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2262, -1, 2264, -1, -1, -1, -1, -1,
+ 215, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 110, -1, -1, -1, -1, -1, 2288, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2299,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 145, -1, -1,
+ -1, 1879, -1, -1, -1, -1, -1, 272, 273, 274,
+ -1, -1, -1, 750, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 173, 763, 292, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 780, -1, 782, -1, -1, 785, 786,
+ -1, -1, -1, -1, -1, -1, 204, -1, 206, -1,
+ -1, -1, -1, -1, -1, -1, 2386, 215, -1, 217,
+ -1, -1, 2392, -1, 2394, -1, -1, -1, -1, -1,
+ -1, 346, -1, 348, -1, -1, -1, -1, -1, -1,
+ -1, -1, 240, 1971, 2414, -1, -1, -1, -1, -1,
+ -1, 366, 2422, 368, -1, -1, -1, -1, 1986, 1987,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 386, -1, -1, 272, 273, 274, -1, 393, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 408, 292, -1, -1, -1, -1, -1,
+ 415, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 430, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 43, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 338, -1, -1, -1, -1, -1, -1, -1, 346, -1,
+ 348, -1, -1, 68, -1, -1, -1, -1, -1, -1,
+ -1, -1, 77, -1, -1, -1, -1, -1, -1, -1,
+ 368, -1, 487, -1, -1, -1, -1, 375, -1, -1,
+ -1, -1, 497, 98, -1, -1, -1, 2115, 386, -1,
+ -1, -1, -1, -1, 2122, 393, -1, -1, 113, 114,
+ 115, -1, -1, -1, -1, -1, -1, -1, 123, -1,
+ 408, -1, 127, -1, -1, 130, -1, 415, -1, -1,
+ 535, 419, 420, -1, -1, -1, 141, -1, 426, -1,
+ -1, -1, 430, 548, -1, 2163, -1, -1, -1, -1,
+ 438, -1, 157, -1, -1, -1, -1, -1, -1, -1,
+ 165, -1, -1, -1, -1, -1, -1, -1, -1, 2629,
+ -1, 459, 177, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 587, -1, -1, -1, -1, -1, 593, -1,
+ -1, -1, -1, -1, -1, 483, 201, -1, -1, 487,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 497,
+ -1, -1, -1, 2673, 2674, -1, -1, -1, -1, -1,
+ -1, -1, 2682, 2683, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, 246, 247, -1, -1, -1, 651, 535, -1, 11,
+ 3921, 13, -1, 658, -1, -1, 18, 19, 20, -1,
+ 548, -1, 550, -1, -1, -1, -1, -1, -1, 3940,
+ 2288, -1, -1, -1, -1, -1, 2736, -1, -1, -1,
+ -1, -1, -1, -1, -1, 690, -1, 2747, 2748, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 587,
+ 705, 706, -1, -1, -1, 593, 311, -1, 313, 71,
+ 43, 73, -1, 718, -1, -1, -1, -1, -1, 2779,
+ 2780, 2781, -1, -1, -1, -1, -1, -1, -1, -1,
+ 618, -1, -1, -1, -1, 68, -1, 99, -1, -1,
+ -1, 629, 630, 631, 77, -1, -1, 352, -1, -1,
+ -1, -1, 4023, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 651, -1, 98, -1, -1, 2828, 374,
+ 658, -1, -1, -1, 2392, -1, 2394, 782, 2838, -1,
+ -1, 2841, -1, 145, -1, -1, -1, -1, -1, -1,
+ 123, -1, -1, -1, 127, -1, 2856, 130, -1, -1,
+ 2860, 2861, 690, 2863, 2864, 167, -1, -1, 141, -1,
+ -1, -1, 2872, -1, 2874, -1, -1, 705, 706, -1,
+ -1, -1, 427, -1, 157, -1, -1, -1, -1, -1,
+ 718, -1, 165, -1, 722, -1, -1, -1, -1, 444,
+ -1, -1, -1, -1, 177, 2905, -1, -1, -1, -1,
+ -1, -1, -1, 215, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 43, 201, -1,
+ -1, 2931, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2943, -1, -1, -1, 2947, -1, -1,
+ -1, -1, 68, -1, -1, -1, 2956, -1, 786, -1,
+ -1, 77, -1, -1, -1, -1, -1, 2967, 241, -1,
+ 272, 273, 274, 246, 247, -1, -1, -1, -1, -1,
+ -1, -1, 98, 2983, -1, -1, -1, -1, -1, -1,
+ 292, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 674, -1, -1, -1, -1, -1, -1, 123, -1, -1,
+ -1, 127, -1, -1, 130, -1, -1, -1, -1, -1,
+ 3020, -1, -1, -1, -1, 141, -1, 3027, -1, -1,
+ -1, -1, -1, -1, 3034, -1, -1, 582, -1, -1,
+ 313, 157, -1, -1, 346, -1, 348, 721, 321, 165,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 177, -1, -1, 366, -1, 368, -1, -1, -1,
+ -1, 4282, 4283, 3073, 3074, -1, -1, -1, -1, 352,
+ -1, -1, -1, -1, 386, 201, -1, -1, -1, -1,
+ -1, 393, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 374, -1, -1, -1, -1, 408, -1, -1, -1,
+ -1, -1, -1, 415, -1, 2673, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, 3126, -1, 430, -1,
+ 246, 247, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 427, -1, -1, -1, -1, 3159,
+ -1, -1, -1, -1, 838, -1, -1, -1, -1, -1,
+ -1, 444, 3172, -1, 3174, 3175, 3176, -1, 3178, -1,
+ -1, -1, 4393, 3183, 3184, 487, -1, -1, -1, 2747,
+ 2748, -1, -1, -1, -1, 497, -1, 313, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3219,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 535, -1, -1, 352, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 548, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 374, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2828, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2841, -1, 587, -1, -1, -1, -1,
+ -1, 593, -1, -1, 19, 20, -1, -1, -1, -1,
+ 3300, 3301, -1, -1, -1, -1, -1, -1, -1, 582,
+ -1, 427, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 47, -1, 49, -1, -1, -1, 444, -1,
+ -1, -1, 57, -1, -1, -1, -1, -1, -1, 1013,
+ -1, -1, -1, 1017, -1, -1, 71, 4558, -1, 651,
+ -1, -1, -1, -1, 79, 80, 658, -1, -1, -1,
+ -1, -1, -1, -1, 89, 3365, 1040, -1, -1, -1,
+ -1, -1, -1, 2931, -1, 1049, -1, -1, 103, 104,
+ -1, -1, -1, -1, -1, -1, -1, -1, 690, 2947,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 705, 706, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 718, -1, -1, 3419,
+ 145, -1, -1, 3423, -1, -1, 3426, -1, -1, -1,
+ -1, -1, -1, -1, 159, 3435, -1, -1, -1, -1,
+ 1114, 1115, 1116, 1117, 3444, -1, 3446, 3447, -1, 3449,
+ 3450, 3451, 3452, 1127, 3454, -1, 3456, 3457, -1, 3459,
+ -1, -1, -1, -1, -1, -1, 582, 3467, 3468, -1,
+ -1, -1, 3472, 3473, 3474, -1, 3034, -1, -1, -1,
+ -1, -1, 3482, 3483, 3484, -1, 3486, -1, 3488, 214,
+ 3490, -1, 3492, -1, 3494, -1, -1, -1, -1, 3499,
+ 3500, 226, 3502, 3503, 3504, -1, -1, -1, 3508, -1,
+ -1, 3511, -1, -1, -1, 3073, 3074, -1, -1, -1,
+ 3520, -1, -1, 3523, -1, 3525, 3526, 3527, -1, -1,
+ 3530, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4753, -1, -1, 18, 19, 20, -1, -1,
+ -1, -1, 3552, -1, 3554, -1, 281, 3557, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3567, 3568, 3569,
+ 3570, 3571, 3572, 46, -1, 48, -1, 3577, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3588, -1,
+ -1, -1, -1, -1, -1, -1, -1, 70, -1, 324,
+ -1, -1, -1, -1, -1, 78, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3172, -1, 3174, 3175, 3176, 344,
+ -1, -1, -1, -1, -1, 3625, 99, -1, 353, -1,
+ -1, -1, -1, -1, -1, 1309, -1, 110, -1, 3639,
+ -1, 366, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 377, -1, -1, 3655, 4867, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 145, -1, -1, 400, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3688, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 173, -1, -1, -1, 429, 430, -1, -1, 433, -1,
+ 435, 3711, -1, 48, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4934, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 206, -1, -1, -1, 462, 463, -1,
+ -1, -1, 215, 468, 469, 80, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 485, -1, -1, -1, -1, -1, 101, 240, -1, -1,
+ -1, -1, -1, -1, -1, 110, 1450, -1, -1, -1,
+ -1, 506, -1, 3783, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 131, -1, -1, 272,
+ 273, 274, -1, 528, 3804, -1, -1, 3365, -1, -1,
+ 145, -1, -1, 1487, -1, 150, 3816, -1, -1, 292,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 43, -1, -1, -1, 173, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 582, -1, 68,
+ -1, -1, -1, -1, -1, 338, -1, -1, 77, -1,
+ -1, -1, 597, 346, -1, 348, -1, -1, -1, -1,
+ -1, 606, -1, -1, 609, 610, -1, -1, -1, 98,
+ -1, -1, -1, -1, -1, 368, -1, 232, -1, 624,
+ -1, 236, -1, -1, -1, -1, -1, 5118, -1, 5120,
+ -1, 5122, -1, 386, 123, -1, -1, -1, 127, 254,
+ 393, 130, -1, 258, 259, -1, -1, -1, -1, -1,
+ -1, -1, 141, -1, -1, 408, 661, -1, -1, -1,
+ -1, -1, 415, -1, 669, -1, 419, -1, 157, -1,
+ -1, -1, -1, 426, 289, -1, 165, 430, -1, -1,
+ -1, 296, 297, 688, -1, 690, -1, -1, 177, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3978, -1,
+ -1, -1, -1, -1, -1, -1, 459, -1, -1, -1,
+ 3990, -1, 201, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4011, -1, 3571, 487, 740, -1, -1, 353, -1,
+ -1, 5232, 747, -1, 497, -1, 4026, -1, -1, 4029,
+ 3588, -1, 241, -1, -1, -1, -1, 246, 247, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4054, 4055, -1, -1, 393, 4059,
+ -1, -1, 535, 5274, -1, -1, -1, -1, 4068, -1,
+ -1, -1, -1, -1, -1, 548, -1, 550, -1, -1,
+ -1, 4081, -1, 4083, -1, 4085, -1, 4087, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3655, -1, -1,
+ -1, 436, 4102, -1, 313, -1, 441, -1, 4108, -1,
+ -1, -1, -1, -1, 587, -1, -1, 452, 453, -1,
+ 593, 4121, 4122, -1, -1, -1, 4126, -1, 4128, -1,
+ 4130, -1, -1, -1, -1, 4135, -1, -1, -1, -1,
+ -1, -1, -1, 352, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5375, 374, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4176, -1, 651, -1,
+ -1, -1, 4182, -1, -1, 658, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4196, -1, -1, -1,
+ 4200, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1888, -1, 1890, 690, 4218, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5440,
+ -1, -1, 705, 706, -1, 444, -1, -1, -1, -1,
+ -1, -1, 4242, -1, -1, 718, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5467, -1, 3816, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 607, -1, -1, 1949, 1950, -1, -1, -1,
+ -1, 1955, 617, -1, -1, 1959, 1960, 1961, -1, -1,
+ -1, -1, -1, 628, -1, 1969, 1970, -1, -1, 634,
+ -1, 1975, -1, -1, -1, 1979, 1980, 1981, -1, 1983,
+ 1984, 1985, -1, 4313, -1, -1, -1, -1, -1, 1993,
+ -1, 1995, -1, 4323, 1998, 1999, 2000, 2001, -1, 2003,
+ 665, 2005, 2006, -1, 669, -1, -1, 4337, -1, 4339,
+ 4340, -1, -1, -1, -1, 2019, 2020, 2021, 2022, 2023,
+ -1, 2025, 2026, 2027, 2028, 2029, 2030, -1, 2032, 2033,
+ -1, 2035, 2036, 698, 2038, 2039, -1, -1, 2042, 2043,
+ -1, 2045, 2046, 582, 2048, -1, 2050, -1, -1, -1,
+ 2054, 2055, 2056, -1, -1, 2059, 2060, 2061, 2062, -1,
+ 2064, -1, -1, -1, -1, -1, -1, 2071, -1, -1,
+ -1, -1, -1, 2077, 2078, 2079, 2080, -1, -1, -1,
+ -1, -1, -1, -1, 2088, 2089, -1, 2091, 2092, -1,
+ 3978, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103,
+ 2104, 2105, 2106, 2107, -1, -1, 2110, -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, -1,
+ -1, 2145, -1, 56, 57, -1, -1, -1, 61, 62,
+ -1, -1, -1, -1, -1, -1, -1, -1, 71, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4068, -1, -1, 96, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 109, -1, -1, -1,
+ 4530, 4531, -1, 4533, -1, -1, -1, -1, -1, -1,
+ -1, -1, 125, -1, 127, -1, 4546, 4547, 4548, -1,
+ 4108, -1, -1, -1, -1, -1, -1, 5768, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4570, 4571, 155, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5796, 5797, -1, 2262, 5800,
+ 2264, 174, 175, 176, 4594, -1, -1, -1, -1, -1,
+ -1, 184, 185, 186, -1, -1, 4606, -1, 5819, -1,
+ -1, -1, -1, -1, -1, 4615, -1, -1, 4176, 202,
+ -1, -1, -1, -1, -1, 2299, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4635, -1, -1, -1, -1,
+ 4640, 4641, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 234, -1, -1, -1, -1, -1, -1, -1, 4659,
+ -1, -1, -1, 4663, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 261, -1,
+ -1, -1, -1, -1, 4242, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5907, -1, -1, -1,
+ -1, 284, 285, 286, 5915, -1, -1, 43, -1, -1,
+ 5921, 5922, 2386, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 306, 307, 18, 19, 20, 18, 19,
+ 20, -1, 68, 5944, -1, -1, -1, -1, -1, -1,
+ 2414, 77, -1, -1, -1, -1, -1, -1, 2422, -1,
+ 5961, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 98, -1, -1, -1, -1, -1, -1, -1,
+ -1, 354, -1, 356, 357, -1, -1, -1, 71, -1,
+ 73, 4339, -1, -1, -1, -1, -1, 123, -1, -1,
+ 373, 127, -1, -1, 130, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 141, 99, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 157, -1, -1, -1, -1, 409, 410, -1, 165,
+ -1, -1, -1, -1, -1, -1, -1, 6048, -1, -1,
+ -1, 177, -1, -1, -1, -1, -1, -1, -1, 6060,
+ -1, -1, 145, 6064, -1, 145, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 201, -1, -1, -1, -1,
+ -1, -1, 455, -1, -1, -1, -1, -1, -1, -1,
+ 4880, 4881, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6105, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ 246, 247, -1, 496, -1, -1, -1, -1, -1, -1,
+ -1, -1, 215, -1, -1, 215, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4944, -1, -1, 4947, -1, -1,
+ -1, -1, -1, -1, -1, 2629, -1, -1, 6169, 6170,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 558, 559, 313, -1, 272,
+ 273, 274, 272, 273, 274, -1, -1, -1, -1, -1,
+ 6201, 574, 575, -1, -1, -1, -1, -1, 4998, 292,
+ 2674, -1, 292, -1, -1, -1, -1, -1, 2682, 2683,
+ -1, -1, -1, -1, -1, -1, 352, 5017, -1, -1,
+ -1, -1, -1, -1, -1, 5025, 5026, -1, -1, -1,
+ -1, -1, -1, 616, -1, -1, -1, -1, 374, 6250,
+ -1, 6252, 6253, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 346, -1, 348, 346, -1, 348, -1,
+ 5060, -1, 2736, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 366, -1, 368, -1, -1, 368, -1,
+ -1, -1, 6293, -1, -1, -1, -1, -1, -1, -1,
+ -1, 427, -1, 386, -1, -1, 386, -1, -1, -1,
+ 393, -1, -1, 393, -1, 2779, 2780, 2781, 444, -1,
+ -1, -1, -1, -1, -1, 408, -1, 6328, 408, -1,
+ -1, -1, 415, -1, -1, 415, -1, 710, -1, 43,
+ 713, -1, -1, 716, -1, -1, -1, 430, -1, -1,
+ 430, -1, -1, -1, -1, -1, 5146, 6358, 5148, -1,
+ -1, -1, -1, -1, 68, -1, 739, -1, -1, -1,
+ -1, -1, -1, 77, 2838, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 759, -1, -1, -1,
+ -1, -1, 2856, -1, 98, -1, 2860, 2861, -1, 2863,
+ 2864, -1, -1, -1, 487, -1, -1, 487, 2872, -1,
+ 2874, -1, -1, -1, 497, -1, -1, 497, -1, 123,
+ -1, -1, -1, 127, -1, -1, 130, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 141, -1, -1,
+ -1, 2905, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 535, 157, -1, 535, 582, -1, -1, -1,
+ -1, 165, -1, -1, -1, 548, -1, 2931, 548, -1,
+ -1, 5261, -1, 177, -1, -1, -1, -1, -1, 2943,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2956, -1, -1, 5285, -1, 201, -1, -1,
+ -1, -1, -1, 2967, 587, -1, -1, 587, -1, -1,
+ 593, -1, -1, 593, -1, -1, -1, -1, 5308, 2983,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5324, 5325, 674, 241, -1, -1,
+ -1, -1, 246, 247, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3020, -1, -1, -1,
+ -1, -1, -1, 3027, -1, -1, -1, -1, 651, -1,
+ -1, 651, -1, -1, -1, 658, -1, -1, 658, -1,
+ -1, -1, -1, 721, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4947,
+ -1, -1, -1, -1, -1, -1, -1, 690, -1, 313,
+ 690, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 705, 706, -1, 705, 706, -1, -1, -1,
+ -1, -1, -1, -1, -1, 718, -1, -1, 718, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 352, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3126, -1, -1, -1, -1, -1, -1, 5017,
+ 374, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3159, -1, -1, -1, -1,
+ 838, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3178, -1, -1, -1, -1, 3183,
+ 3184, -1, -1, 427, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 444, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3219, -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, 5575, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5599,
+ -1, -1, -1, -1, -1, -1, -1, 5607, -1, -1,
+ -1, -1, -1, 5613, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3300, 3301, -1, 5629,
+ -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, -1, -1, -1, 1013, -1, -1, 582, 1017,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1040, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1049, -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, -1, -1, -1, -1, -1, 5739,
+ -1, -1, -1, -1, -1, 3419, -1, -1, -1, 3423,
+ -1, -1, 3426, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3435, -1, -1, -1, -1, 1114, 1115, 1116, 1117,
+ 3444, -1, 3446, 3447, -1, 3449, 3450, 3451, 3452, 1127,
+ 3454, -1, 3456, 3457, -1, 3459, -1, -1, -1, -1,
+ -1, -1, -1, 3467, 3468, -1, -1, -1, 3472, 3473,
+ 3474, -1, -1, -1, -1, -1, -1, -1, 3482, 3483,
+ 3484, -1, 3486, -1, 3488, -1, 3490, -1, 3492, -1,
+ 3494, -1, -1, -1, -1, 3499, 3500, -1, 3502, 3503,
+ 3504, -1, -1, -1, 3508, -1, -1, 3511, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3520, -1, -1, 3523,
+ -1, 3525, 3526, 3527, -1, -1, 3530, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5867, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3552, -1,
+ 3554, -1, -1, 3557, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3567, 3568, 3569, 3570, -1, 3572, -1,
+ -1, -1, -1, 3577, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 526, -1,
+ -1, 3625, -1, 5953, -1, -1, -1, -1, -1, -1,
+ -1, 1309, -1, -1, -1, 3639, -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, 5995, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6007, -1, -1,
+ -1, -1, -1, -1, 3688, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3711, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5607,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6092, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1450, -1, -1, -1, -1, -1, -1, 3783,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3804, -1, -1, -1, -1, -1, -1, -1, -1, 1487,
+ -1, -1, -1, -1, 6144, -1, -1, -1, -1, 727,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 776, -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, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6273, -1, -1, -1, 6277, -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,
+ -1, -1, -1, -1, -1, -1, 3990, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4011, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4026, -1, -1, 4029, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 954, -1, -1, -1,
+ 4054, 4055, -1, -1, -1, 4059, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6406, 4081, -1, 4083,
+ -1, 4085, -1, 4087, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4102, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4121, 4122, -1,
+ -1, -1, 4126, -1, 4128, -1, 4130, -1, -1, -1,
+ -1, 4135, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4182, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4196, -1, -1, -1, 4200, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1888, -1, 1890, -1, 4218, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1949, 1950, -1, -1, -1, -1, 1955, -1, -1,
+ -1, 1959, 1960, 1961, -1, -1, -1, -1, -1, -1,
+ -1, 1969, 1970, -1, -1, -1, -1, 1975, -1, -1,
+ -1, 1979, 1980, 1981, -1, 1983, 1984, 1985, -1, 4313,
+ -1, -1, -1, -1, -1, 1993, -1, 1995, -1, 4323,
+ 1998, 1999, 2000, 2001, -1, 2003, -1, 2005, 2006, -1,
+ -1, -1, -1, 4337, -1, -1, 4340, -1, -1, -1,
+ -1, 2019, 2020, 2021, 2022, 2023, -1, 2025, 2026, 2027,
+ 2028, 2029, 2030, -1, 2032, 2033, -1, 2035, 2036, -1,
+ 2038, 2039, -1, -1, 2042, 2043, -1, 2045, 2046, -1,
+ 2048, -1, 2050, -1, -1, -1, 2054, 2055, 2056, -1,
+ -1, 2059, 2060, 2061, 2062, -1, 2064, -1, -1, 1297,
+ -1, -1, -1, 2071, -1, 1303, -1, -1, -1, 2077,
+ 2078, 2079, 2080, -1, -1, -1, -1, -1, -1, -1,
+ 2088, 2089, -1, 2091, 2092, -1, -1, 2095, 2096, 2097,
+ 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
+ -1, -1, 2110, -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, -1, -1, 2145, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1386, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4530, 4531, -1, 4533,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4546, 4547, 4548, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1471, -1, -1, 4570, 4571, -1, -1,
+ -1, -1, -1, -1, 1482, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2262, -1, 2264, -1, -1, -1,
+ 4594, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4606, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4615, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2299, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4635, -1, -1, -1, -1, 4640, 4641, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4659, -1, -1, -1, 4663,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2386, -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, 2414, -1, -1, -1,
+ -1, -1, -1, -1, 2422, -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, -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, -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, -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, -1, -1, -1, 4880, 4881, -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,
+ -1, -1, 1820, -1, 1822, -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,
+ 4944, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2629, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4998, -1, 2674, -1, -1, -1,
+ -1, -1, -1, -1, 2682, 2683, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5025, 5026, -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, -1, 5060, -1, 2736, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2779, 2780, 2781, -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, 2037,
+ -1, -1, -1, 2041, -1, -1, -1, -1, -1, 2047,
+ -1, -1, 5146, -1, 5148, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2838, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2856, -1,
+ -1, -1, 2860, 2861, -1, 2863, 2864, -1, -1, -1,
+ -1, -1, -1, -1, 2872, -1, 2874, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2127,
+ -1, -1, -1, -1, -1, -1, -1, 2905, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 674, -1, -1, -1,
+ -1, -1, -1, 2931, -1, -1, -1, 5261, -1, -1,
+ -1, -1, -1, 2171, -1, 2943, -1, -1, 2176, -1,
+ 2178, -1, -1, -1, -1, -1, -1, -1, 2956, -1,
+ -1, 5285, -1, -1, -1, -1, -1, -1, -1, 2967,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5308, 2983, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2225, -1, -1,
+ 5324, 5325, -1, -1, -1, -1, -1, -1, -1, 2237,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3020, -1, -1, -1, -1, -1, -1, 3027,
+ -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, -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,
+ 838, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2343, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3126, -1,
+ -1, -1, -1, 2361, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2372, 2373, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3159, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3178, -1, -1, -1, -1, 3183, 3184, -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, -1,
+ -1, 3219, 2450, -1, -1, -1, -1, -1, 2456, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5575, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1017,
+ -1, -1, -1, -1, -1, 5599, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5613,
+ -1, -1, 1040, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1049, 3300, 3301, -1, 5629, -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, -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, 1117,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2606, 2607,
+ -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, 2634, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5739, 2644, -1, -1, -1,
+ -1, 3419, -1, -1, -1, 3423, -1, -1, 3426, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3435, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3444, -1, 3446, 3447,
+ -1, 3449, 3450, 3451, 3452, -1, 3454, -1, 3456, 3457,
+ -1, 3459, -1, -1, -1, -1, -1, -1, -1, 3467,
+ 3468, -1, -1, -1, 3472, 3473, 3474, -1, -1, -1,
+ -1, -1, -1, -1, 3482, 3483, 3484, -1, 3486, -1,
+ 3488, -1, 3490, -1, 3492, -1, 3494, -1, -1, -1,
+ -1, 3499, 3500, -1, 3502, 3503, 3504, -1, -1, -1,
+ 3508, -1, -1, 3511, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3520, -1, -1, 3523, -1, 3525, 3526, 3527,
+ -1, -1, 3530, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5867, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3552, -1, 3554, -1, -1, 3557,
+ -1, 1309, -1, -1, -1, -1, -1, -1, -1, 3567,
+ 3568, 3569, 3570, -1, 3572, -1, -1, -1, -1, 3577,
+ -1, -1, -1, -1, 2812, -1, -1, -1, 2816, -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, -1, -1, -1, -1, -1, -1, 3625, -1, 5953,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3639, -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, 5995, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6007, -1, -1, -1, -1, -1, -1,
+ 3688, -1, -1, -1, -1, -1, -1, -1, 2926, 2927,
+ -1, -1, 1450, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3711, -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, 1487,
+ -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, 6092, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3783, -1, -1, -1, 3017,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3804, -1, -1, -1,
+ -1, -1, -1, -1, 3042, -1, -1, -1, -1, -1,
+ 6144, -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, -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, 3113, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3122, -1, -1, -1, -1, 3127,
+ -1, -1, -1, -1, -1, 3133, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3148, -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, 6273,
+ -1, -1, -1, 6277, -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, -1, -1, -1, -1,
+ -1, -1, 3990, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4011, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4026, -1,
+ -1, 4029, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4054, 4055, -1, -1,
+ -1, 4059, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6406, 4081, -1, 4083, -1, 4085, -1, 4087,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4102, -1, -1, -1, -1, -1,
+ -1, 3339, -1, -1, 3342, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4121, 4122, -1, -1, -1, 4126, -1,
+ 4128, -1, 4130, -1, -1, -1, -1, 4135, -1, -1,
+ 1888, -1, 1890, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4182, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4196, -1,
+ -1, -1, 4200, -1, -1, -1, -1, 1955, -1, -1,
+ -1, 1959, -1, 1961, -1, -1, -1, -1, -1, -1,
+ 4218, 1969, 1970, -1, -1, -1, -1, 1975, -1, -1,
+ -1, 1979, 1980, 1981, -1, 1983, 1984, 1985, -1, -1,
+ -1, -1, -1, -1, -1, 1993, -1, 1995, -1, -1,
+ 1998, 1999, 2000, 2001, -1, -1, -1, 2005, 2006, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2019, 2020, 2021, 2022, 2023, -1, 2025, 2026, 2027,
+ 2028, 2029, -1, -1, 2032, 2033, -1, 2035, 2036, -1,
+ 2038, 2039, -1, -1, -1, 2043, -1, 2045, 2046, -1,
+ 2048, -1, 2050, -1, -1, -1, 2054, 2055, 2056, -1,
+ -1, 2059, -1, 2061, 2062, 4313, 2064, -1, -1, -1,
+ -1, -1, -1, 2071, -1, 4323, -1, -1, -1, 2077,
+ 2078, 2079, -1, -1, -1, -1, -1, -1, -1, 4337,
+ -1, -1, 4340, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3591, -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, -1, 2145, -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,
+ -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, -1, -1, -1, -1, -1, 3695, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2262, -1, 2264, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4530, 4531, -1, 4533, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3775, 4546, 4547,
+ 4548, 2299, -1, -1, -1, -1, -1, -1, -1, 3787,
+ -1, -1, -1, 3791, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4570, 4571, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4594, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4606, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4615, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4635, 2386, -1,
+ -1, -1, 4640, 4641, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4659, -1, -1, -1, 4663, 2414, -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, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3975, -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, 4001, -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, -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, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2629, 4880, 4881, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2674, -1, -1, -1,
+ -1, -1, -1, -1, 2682, 2683, -1, -1, 4166, -1,
+ -1, -1, -1, -1, -1, -1, 4944, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2736, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4998, -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, 5025, 5026, -1,
+ -1, 2779, 2780, 2781, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4275, -1, -1,
+ -1, -1, 4280, 4281, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5060, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4309, 4310, -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, 2856, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2872, -1, 2874, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5146, -1,
+ 5148, -1, -1, -1, -1, -1, -1, 2905, -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, 2931, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2943, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2956, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2967,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2983, -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, 5261, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3020, -1, -1, -1, -1, -1, -1, 3027,
+ -1, -1, -1, -1, -1, -1, -1, 5285, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5308, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5324, 5325, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3126, -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, 3159, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3178, -1, -1, -1, -1, 3183, 3184, -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, -1,
+ -1, 3219, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4713, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4723, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3300, 3301, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5575, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5599, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5613, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5629, -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, -1, -1, -1, -1, -1, -1,
+ -1, 3419, -1, -1, -1, 3423, -1, -1, 3426, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3444, -1, -1, -1,
+ -1, 3449, 3450, 3451, 3452, -1, 3454, -1, 3456, 3457,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3467,
+ 3468, -1, -1, -1, 3472, 3473, 3474, -1, -1, -1,
+ -1, -1, -1, -1, 3482, 3483, 3484, -1, 3486, -1,
+ 3488, 5739, 3490, -1, 3492, -1, 3494, -1, -1, -1,
+ -1, 3499, 3500, -1, 3502, -1, 3504, -1, -1, -1,
+ 3508, -1, -1, 3511, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3523, -1, 3525, 3526, 3527,
+ -1, -1, 3530, -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, 3557,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3568, 3569, -1, -1, 3572, -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, 5085, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5867,
+ -1, -1, -1, -1, -1, -1, -1, 3625, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3639, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3688, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5953, -1, -1, -1, -1,
+ -1, -1, -1, 3711, -1, -1, -1, -1, -1, -1,
+ 5198, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5217,
+ -1, -1, -1, -1, -1, -1, -1, 5995, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6007,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3804, -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, -1,
+ -1, -1, -1, -1, 6092, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6144, -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, -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, -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, 3990, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4011, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6273, -1, -1, 4026, 6277,
+ -1, 4029, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4054, 4055, -1, -1,
+ -1, 4059, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4081, -1, 4083, -1, 4085, -1, 4087,
+ -1, -1, -1, -1, -1, 5573, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4102, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4121, 4122, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4135, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5634, -1, 6406, -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, 4182, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4196, -1,
+ -1, -1, 4200, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4218, -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, -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, -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, 4313, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4323, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4337,
+ -1, -1, 4340, -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, 5852, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5862, -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, -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, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5978, -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, 4530, 4531, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4546, 4547,
+ 4548, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4570, 4571, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4615, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4635, -1, -1,
+ -1, -1, 4640, 4641, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4659, -1, -1, -1, 4663, -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, -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,
+ -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, -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, -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, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4880, 4881, -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, -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, 4944, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4998, -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, 5025, 5026, -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, -1, 5060, -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, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5146, -1,
+ 5148, -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, -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, -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, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5285, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5308, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5324, 5325, -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,
+ -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, -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, -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, -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, -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,
+ -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, -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, 5575, -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,
+ -1, -1, -1, -1, -1, 5613, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5629, -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, -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, -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, -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,
+ -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, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3, -1, -1, -1, -1, 8,
+ 9, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 19, 20, -1, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, 5867,
+ -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 57, 58,
+ 59, 60, -1, -1, -1, -1, -1, -1, -1, 68,
+ 69, -1, 71, -1, -1, -1, -1, -1, -1, 78,
+ 79, -1, -1, 82, 83, 84, 85, -1, 87, 88,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, 102, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, 120, 121, 122, -1, 124, -1, -1, -1, -1,
+ -1, -1, -1, 132, 133, 134, 135, -1, -1, -1,
+ -1, -1, 141, -1, -1, 144, -1, -1, -1, -1,
+ -1, 150, -1, -1, 153, -1, -1, -1, -1, -1,
+ -1, -1, -1, 162, -1, 164, -1, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6007,
+ -1, 180, 181, -1, 183, -1, -1, -1, 187, -1,
+ -1, -1, -1, 192, -1, -1, 195, 196, -1, 198,
+ 199, 200, 201, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ 219, 220, 221, -1, 223, -1, -1, -1, -1, -1,
+ -1, 230, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 241, -1, -1, -1, -1, -1, -1, -1,
+ 249, 250, -1, -1, -1, 254, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6092, -1, -1, -1, -1, 268,
+ -1, -1, -1, -1, -1, -1, 275, 276, -1, 278,
+ 279, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 290, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 300, 301, 302, -1, -1, 305, -1, -1, 308,
+ 309, -1, -1, -1, -1, 314, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, 6273, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, 6406, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, 768,
+ 769, -1, -1, 3, -1, 774, -1, -1, 8, 9,
+ 779, -1, -1, -1, 783, 784, -1, -1, 787, 19,
+ 20, -1, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, 58, 59,
+ 60, -1, -1, -1, 64, -1, -1, -1, 68, 69,
+ -1, 71, -1, -1, -1, -1, -1, -1, 78, 79,
+ -1, -1, 82, 83, 84, 85, -1, 87, 88, -1,
+ 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, 102, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ 120, 121, 122, -1, 124, -1, -1, -1, -1, -1,
+ -1, -1, 132, 133, 134, 135, -1, -1, -1, -1,
+ -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
+ 150, -1, -1, 153, -1, -1, -1, -1, -1, -1,
+ -1, -1, 162, 163, 164, -1, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 180, 181, -1, 183, -1, -1, -1, 187, -1, -1,
+ -1, -1, 192, -1, -1, 195, 196, -1, 198, 199,
+ 200, 201, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, 219,
+ 220, 221, -1, 223, -1, -1, -1, -1, -1, -1,
+ 230, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 241, -1, -1, -1, -1, -1, -1, -1, 249,
+ 250, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 268, -1,
+ -1, -1, -1, -1, -1, 275, 276, -1, 278, 279,
+ -1, -1, -1, -1, -1, -1, -1, -1, 288, -1,
+ 290, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 300, 301, 302, -1, -1, -1, -1, -1, 308, 309,
+ -1, -1, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, 768, 769,
+ -1, -1, 3, -1, 774, -1, -1, 8, 9, 779,
+ -1, -1, -1, 783, 784, -1, -1, 787, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, -1, 47, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 57, 58, 59, 60,
+ -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
+ 71, -1, -1, -1, -1, -1, -1, 78, 79, -1,
+ -1, 82, 83, 84, 85, -1, 87, 88, -1, 90,
+ 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, 120,
+ 121, 122, -1, 124, -1, -1, -1, -1, -1, -1,
+ -1, 132, 133, 134, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, 150,
+ -1, -1, 153, -1, -1, -1, -1, -1, -1, -1,
+ -1, 162, -1, 164, -1, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 180,
+ 181, -1, 183, -1, -1, -1, 187, -1, -1, -1,
+ -1, 192, -1, -1, 195, 196, -1, 198, 199, 200,
+ 201, -1, 203, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, 219, 220,
+ 221, -1, 223, -1, -1, -1, -1, -1, -1, 230,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, -1, -1, -1, 249, 250,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 268, -1, -1,
+ -1, -1, -1, -1, 275, 276, -1, 278, 279, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 290,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 300,
+ 301, 302, -1, -1, -1, -1, -1, 308, 309, -1,
+ -1, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, 768, 769, -1,
+ -1, 3, -1, 774, -1, -1, 8, 9, 779, -1,
+ -1, -1, 783, 784, -1, -1, 787, 19, 20, -1,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, 40, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 57, 58, 59, 60, -1,
+ -1, -1, -1, -1, -1, -1, 68, 69, -1, 71,
+ -1, -1, -1, -1, -1, -1, 78, 79, -1, -1,
+ 82, 83, 84, 85, -1, 87, 88, -1, 90, 91,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ 102, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, 120, 121,
+ 122, -1, 124, -1, -1, -1, -1, -1, -1, -1,
+ 132, 133, 134, 135, -1, -1, -1, -1, -1, 141,
+ -1, -1, 144, -1, -1, -1, -1, -1, 150, -1,
+ -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
+ 162, -1, 164, -1, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 180, 181,
+ -1, 183, -1, -1, -1, 187, -1, -1, -1, -1,
+ 192, -1, -1, 195, 196, -1, 198, 199, 200, 201,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, 219, 220, 221,
+ -1, 223, -1, -1, -1, -1, -1, -1, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, -1, -1, 249, 250, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 268, -1, -1, -1,
+ -1, -1, -1, 275, 276, -1, 278, 279, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 300, 301,
+ 302, -1, -1, -1, -1, -1, 308, 309, -1, 311,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, 768, 769, -1, -1,
+ 3, -1, 774, -1, -1, 8, 9, 779, -1, -1,
+ -1, 783, 784, -1, -1, 787, 19, 20, -1, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 57, 58, 59, 60, -1, -1,
+ -1, -1, -1, -1, -1, 68, 69, -1, 71, -1,
+ -1, -1, -1, -1, -1, 78, 79, -1, -1, 82,
+ 83, 84, 85, -1, 87, 88, -1, 90, 91, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, 120, 121, 122,
+ -1, 124, -1, -1, -1, -1, -1, -1, -1, 132,
+ 133, 134, 135, -1, -1, -1, -1, -1, 141, -1,
+ 143, 144, -1, -1, -1, -1, -1, 150, -1, -1,
+ 153, -1, -1, -1, -1, -1, -1, -1, -1, 162,
+ -1, 164, -1, 166, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 180, 181, -1,
+ 183, -1, -1, -1, 187, -1, -1, -1, -1, 192,
+ -1, -1, 195, 196, -1, 198, 199, 200, 201, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, 219, 220, 221, -1,
+ 223, -1, -1, -1, -1, -1, -1, 230, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
+ -1, -1, -1, -1, -1, -1, 249, 250, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 268, -1, -1, -1, -1,
+ -1, -1, 275, 276, -1, 278, 279, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 290, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300, 301, 302,
+ -1, -1, -1, -1, -1, 308, 309, -1, -1, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, -1, -1, -1,
+ -1, -1, -1, -1, -1, 768, 769, -1, -1, 3,
+ -1, 774, -1, -1, 8, 9, 779, -1, -1, -1,
+ 783, 784, -1, -1, 787, 19, 20, -1, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 57, 58, 59, 60, -1, -1, -1,
+ -1, -1, -1, -1, 68, 69, -1, 71, -1, -1,
+ -1, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 84, 85, -1, 87, 88, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, 102, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, 120, 121, 122, -1,
+ 124, -1, -1, -1, 128, -1, -1, -1, 132, 133,
+ 134, 135, -1, -1, -1, -1, -1, 141, -1, -1,
+ 144, -1, -1, -1, -1, -1, 150, -1, -1, 153,
+ -1, -1, -1, -1, -1, -1, -1, -1, 162, -1,
+ 164, -1, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 180, 181, -1, 183,
+ -1, -1, -1, 187, -1, -1, -1, -1, 192, -1,
+ -1, 195, 196, -1, 198, 199, 200, 201, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, 219, 220, 221, -1, 223,
+ -1, -1, -1, -1, -1, -1, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 241, -1, -1,
+ -1, -1, -1, -1, -1, 249, 250, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 268, -1, -1, -1, -1, -1,
+ -1, 275, 276, -1, 278, 279, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 300, 301, 302, -1,
+ -1, -1, -1, -1, 308, 309, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, 768, 769, -1, -1, 3, -1,
+ 774, -1, -1, 8, 9, 779, -1, -1, -1, 783,
+ 784, -1, -1, 787, 19, 20, -1, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 57, 58, 59, 60, -1, -1, -1, -1,
+ -1, -1, -1, 68, 69, -1, 71, -1, -1, -1,
+ -1, -1, -1, 78, 79, -1, -1, 82, 83, 84,
+ 85, -1, 87, 88, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, 102, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, 120, 121, 122, -1, 124,
+ -1, -1, -1, 128, -1, -1, -1, 132, 133, 134,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -1, -1, -1, -1, -1, 150, -1, -1, 153, -1,
+ -1, -1, -1, -1, -1, -1, -1, 162, -1, 164,
+ -1, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 180, 181, -1, 183, -1,
+ -1, -1, 187, -1, -1, -1, -1, 192, -1, -1,
+ 195, 196, -1, 198, 199, 200, 201, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, 219, 220, 221, -1, 223, -1,
+ -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, -1, -1, -1, 249, 250, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 268, -1, -1, -1, -1, -1, -1,
+ 275, 276, -1, 278, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 300, 301, 302, -1, -1,
+ -1, -1, -1, 308, 309, -1, -1, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 769, -1, -1, 3, -1, 774,
+ -1, -1, 8, 9, 779, -1, -1, -1, 783, 784,
+ -1, -1, 787, 19, 20, -1, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 57, 58, 59, 60, -1, -1, -1, -1, -1,
+ -1, -1, 68, 69, -1, 71, -1, -1, -1, -1,
+ -1, -1, 78, 79, -1, -1, 82, 83, 84, 85,
+ -1, 87, 88, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, 102, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, 120, 121, 122, -1, 124, -1,
+ -1, -1, 128, -1, -1, -1, 132, 133, 134, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -1,
+ -1, -1, -1, -1, 150, -1, -1, 153, -1, -1,
+ -1, -1, -1, -1, -1, -1, 162, -1, 164, -1,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 180, 181, -1, 183, -1, -1,
+ -1, 187, -1, -1, -1, -1, 192, -1, -1, 195,
+ 196, -1, 198, 199, 200, 201, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, 219, 220, 221, -1, 223, -1, -1,
+ -1, -1, -1, -1, 230, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ -1, -1, -1, 249, 250, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 268, -1, -1, -1, -1, -1, -1, 275,
+ 276, -1, 278, 279, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 290, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 300, 301, 302, -1, -1, -1,
+ -1, -1, 308, 309, -1, -1, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, 768, 769, -1, -1, 3, -1, 774, -1,
+ -1, 8, 9, 779, -1, -1, -1, 783, 784, -1,
+ -1, 787, 19, 20, -1, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -1, -1, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 57, 58, 59, 60, -1, -1, -1, -1, -1, -1,
+ -1, 68, 69, -1, 71, -1, -1, -1, -1, -1,
+ -1, 78, 79, -1, -1, 82, 83, 84, 85, -1,
+ 87, 88, -1, 90, 91, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, 102, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, 120, 121, 122, -1, 124, -1, -1,
+ -1, -1, -1, -1, -1, 132, 133, 134, 135, -1,
+ -1, -1, -1, -1, 141, -1, 143, 144, -1, -1,
+ -1, -1, -1, 150, -1, -1, 153, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, -1, 164, -1, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 180, 181, -1, 183, -1, -1, -1,
+ 187, -1, -1, -1, -1, 192, -1, -1, 195, 196,
+ -1, 198, 199, 200, 201, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, 219, 220, 221, -1, 223, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, -1, -1, -1,
+ -1, -1, 249, 250, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 268, -1, -1, -1, -1, -1, -1, 275, 276,
+ -1, 278, 279, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 290, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, 301, 302, -1, -1, -1, -1,
+ -1, 308, 309, -1, -1, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, 768, 769, -1, -1, 3, -1, 774, -1, -1,
+ 8, 9, 779, -1, -1, -1, 783, 784, -1, -1,
+ 787, 19, 20, -1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 57,
+ 58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
+ 68, 69, -1, 71, -1, -1, -1, -1, -1, -1,
+ 78, 79, -1, -1, 82, 83, 84, 85, -1, 87,
+ 88, -1, 90, 91, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, 102, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, 120, 121, 122, -1, 124, -1, -1, -1,
+ -1, -1, -1, -1, 132, 133, 134, 135, -1, -1,
+ -1, -1, -1, 141, -1, -1, 144, -1, -1, -1,
+ -1, -1, 150, -1, -1, 153, -1, -1, -1, -1,
+ -1, -1, -1, -1, 162, -1, 164, -1, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 180, 181, -1, 183, -1, -1, -1, 187,
+ -1, -1, -1, -1, 192, -1, -1, 195, 196, -1,
+ 198, 199, 200, 201, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, 219, 220, 221, -1, 223, -1, -1, -1, -1,
+ -1, -1, 230, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 241, -1, -1, -1, -1, -1, -1,
+ -1, 249, 250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 268, -1, -1, -1, -1, -1, -1, 275, 276, -1,
+ 278, 279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 290, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 301, 302, -1, -1, -1, -1, -1,
+ 308, 309, -1, -1, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ 768, 769, -1, -1, 3, -1, 774, -1, -1, 8,
+ 9, 779, -1, -1, -1, 783, 784, -1, -1, 787,
+ 19, 20, -1, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
+ -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 57, 58,
+ 59, 60, -1, -1, -1, -1, -1, -1, -1, 68,
+ 69, -1, 71, -1, -1, -1, -1, -1, -1, 78,
+ 79, -1, -1, 82, 83, 84, 85, -1, 87, 88,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, 102, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, 120, 121, 122, -1, 124, -1, -1, -1, -1,
+ -1, -1, -1, 132, 133, 134, 135, -1, -1, -1,
+ -1, -1, 141, -1, -1, 144, -1, -1, -1, -1,
+ -1, 150, -1, -1, 153, -1, -1, -1, -1, -1,
+ -1, -1, -1, 162, -1, 164, -1, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 180, 181, -1, 183, -1, -1, -1, 187, -1,
+ -1, -1, -1, 192, -1, -1, 195, 196, -1, 198,
+ 199, 200, 201, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ 219, 220, 221, -1, 223, -1, -1, -1, -1, -1,
+ -1, 230, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 241, -1, -1, -1, -1, -1, -1, -1,
+ 249, 250, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 268,
+ -1, -1, -1, -1, -1, -1, 275, 276, -1, 278,
+ 279, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 290, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 300, 301, 302, -1, -1, -1, -1, -1, 308,
+ 309, -1, -1, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, 768,
+ 769, -1, -1, 3, -1, 774, -1, -1, 8, 9,
+ 779, -1, -1, -1, 783, 784, -1, -1, 787, 19,
+ 20, -1, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, 58, 59,
+ 60, -1, -1, -1, -1, -1, -1, -1, 68, 69,
+ -1, 71, -1, -1, -1, -1, -1, -1, 78, 79,
+ -1, -1, 82, 83, 84, 85, -1, 87, 88, -1,
+ 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, 102, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ 120, 121, 122, -1, 124, -1, -1, -1, -1, -1,
+ -1, -1, 132, 133, 134, 135, -1, -1, -1, -1,
+ -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
+ 150, -1, -1, 153, -1, -1, -1, -1, -1, -1,
+ -1, -1, 162, -1, 164, -1, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 180, 181, -1, 183, -1, -1, -1, 187, -1, -1,
+ -1, -1, 192, -1, -1, 195, 196, -1, 198, 199,
+ 200, 201, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, 219,
+ 220, 221, -1, 223, -1, -1, -1, -1, -1, -1,
+ 230, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 241, -1, -1, -1, -1, -1, -1, -1, 249,
+ 250, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 268, -1,
+ -1, -1, -1, -1, -1, 275, 276, -1, 278, 279,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 290, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 300, 301, 302, -1, -1, -1, -1, -1, 308, 309,
+ -1, -1, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, 768, 769,
+ -1, -1, 3, -1, 774, -1, -1, 8, 9, 779,
+ -1, -1, -1, 783, 784, -1, -1, 787, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 57, 58, 59, 60,
+ -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
+ 71, -1, -1, -1, -1, -1, -1, 78, 79, -1,
+ -1, 82, 83, 84, 85, -1, 87, 88, -1, 90,
+ 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, 120,
+ 121, 122, -1, 124, -1, -1, -1, -1, -1, -1,
+ -1, 132, 133, 134, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, 150,
+ -1, -1, 153, -1, -1, -1, -1, -1, -1, -1,
+ -1, 162, -1, 164, -1, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 180,
+ 181, -1, 183, -1, -1, -1, 187, -1, -1, -1,
+ -1, 192, -1, -1, 195, 196, -1, 198, 199, 200,
+ 201, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, 219, 220,
+ 221, -1, 223, -1, -1, -1, -1, -1, -1, 230,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, -1, -1, -1, 249, 250,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 268, -1, -1,
+ -1, -1, -1, -1, 275, 276, -1, 278, 279, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 290,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 300,
+ 301, 302, -1, -1, -1, -1, -1, 308, 309, -1,
+ -1, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, 768, 769, -1,
+ -1, 3, -1, 774, -1, -1, 8, 9, 779, -1,
+ -1, -1, 783, 784, -1, -1, 787, 19, 20, -1,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, 40, -1,
+ -1, -1, -1, -1, -1, 47, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 57, 58, 59, 60, -1,
+ -1, -1, -1, -1, -1, -1, 68, 69, -1, 71,
+ -1, -1, -1, -1, -1, -1, 78, 79, -1, -1,
+ 82, 83, 84, 85, -1, 87, 88, -1, 90, 91,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ 102, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, 120, 121,
+ 122, -1, 124, -1, -1, -1, -1, -1, -1, -1,
+ 132, 133, 134, 135, -1, -1, -1, -1, -1, 141,
+ -1, -1, 144, -1, -1, -1, -1, -1, 150, -1,
+ -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
+ 162, -1, 164, -1, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 180, 181,
+ -1, 183, -1, -1, -1, 187, -1, -1, -1, -1,
+ 192, -1, -1, 195, -1, -1, 198, 199, 200, 201,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, 219, 220, 221,
+ -1, 223, -1, -1, -1, -1, -1, -1, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, -1, -1, 249, 250, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 268, -1, -1, -1,
+ -1, -1, -1, 275, 276, -1, 278, 279, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 300, 301,
+ 302, -1, -1, -1, -1, -1, 308, 309, -1, -1,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, 768, 769, -1, -1,
+ 3, -1, 774, -1, -1, 8, 9, 779, -1, -1,
+ -1, 783, 784, -1, -1, 787, 19, 20, -1, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ -1, -1, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 57, 58, 59, 60, -1, -1,
+ -1, -1, -1, -1, -1, 68, 69, -1, 71, -1,
+ -1, -1, -1, -1, -1, 78, 79, -1, -1, 82,
+ 83, 84, 85, -1, 87, 88, -1, 90, 91, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, 102,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, 120, 121, 122,
+ -1, 124, -1, -1, -1, -1, -1, -1, -1, 132,
+ 133, 134, 135, -1, -1, -1, -1, -1, 141, -1,
+ -1, 144, -1, -1, -1, -1, -1, 150, -1, -1,
+ 153, -1, -1, -1, -1, -1, -1, -1, -1, 162,
+ -1, 164, -1, 166, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 180, 181, -1,
+ 183, -1, -1, -1, 187, -1, -1, -1, -1, 192,
+ -1, -1, 195, 196, -1, 198, 199, 200, 201, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, 219, 220, 221, -1,
+ 223, -1, -1, -1, -1, -1, -1, 230, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 241, -1,
+ -1, -1, -1, -1, -1, -1, 249, 250, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 268, -1, -1, -1, -1,
+ -1, -1, 275, 276, -1, 278, 279, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 290, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 300, 301, 302,
+ -1, -1, -1, -1, -1, 308, 309, -1, -1, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, -1, -1, -1,
+ -1, -1, -1, -1, -1, 768, 769, -1, -1, 3,
+ -1, 774, -1, -1, 8, 9, 779, -1, -1, -1,
+ 783, 784, -1, -1, 787, 19, 20, -1, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 57, 58, 59, 60, -1, -1, -1,
+ -1, -1, -1, -1, 68, 69, -1, 71, -1, -1,
+ -1, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 84, 85, -1, 87, 88, -1, 90, 91, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, 102, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, 120, 121, 122, -1,
+ 124, -1, -1, -1, -1, -1, -1, -1, 132, 133,
+ 134, 135, -1, -1, -1, -1, -1, 141, -1, -1,
+ 144, -1, -1, -1, -1, -1, 150, -1, -1, 153,
+ -1, -1, -1, -1, -1, -1, -1, -1, 162, -1,
+ 164, -1, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 180, 181, -1, 183,
+ -1, -1, -1, 187, -1, -1, -1, -1, 192, -1,
+ -1, 195, 196, -1, 198, 199, 200, 201, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, 219, 220, 221, -1, 223,
+ -1, -1, -1, -1, -1, -1, 230, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 241, -1, -1,
+ -1, -1, -1, -1, -1, 249, 250, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 268, -1, -1, -1, -1, -1,
+ -1, 275, 276, -1, 278, 279, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 300, 301, 302, -1,
+ -1, -1, -1, -1, 308, 309, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, 768, 769, -1, -1, 3, -1,
+ 774, -1, -1, 8, 9, 779, -1, -1, -1, 783,
+ 784, -1, -1, 787, 19, 20, -1, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 57, 58, 59, 60, -1, -1, -1, -1,
+ -1, -1, -1, 68, 69, -1, 71, -1, -1, -1,
+ -1, -1, -1, 78, 79, -1, -1, 82, 83, 84,
+ 85, -1, 87, 88, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, 99, -1, -1, 102, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, 120, 121, 122, -1, 124,
+ -1, -1, -1, -1, -1, -1, -1, 132, 133, 134,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -1, -1, -1, -1, -1, 150, -1, -1, 153, -1,
+ -1, -1, -1, -1, -1, -1, -1, 162, -1, 164,
+ -1, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 180, 181, 182, 183, -1,
+ -1, -1, 187, -1, -1, -1, -1, 192, -1, -1,
+ 195, -1, -1, 198, 199, 200, 201, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, 219, 220, 221, -1, 223, -1,
+ -1, -1, -1, -1, -1, 230, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 241, -1, -1, -1,
+ -1, -1, -1, -1, 249, 250, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 268, -1, -1, -1, -1, -1, -1,
+ 275, 276, -1, 278, 279, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 290, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 300, 301, 302, -1, -1,
+ -1, -1, -1, 308, 309, -1, -1, -1, -1, -1,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, 768, 769, -1, -1, 3, -1, 774,
+ -1, -1, 8, 9, 779, -1, -1, -1, 783, 784,
+ -1, -1, 787, 19, 20, -1, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 57, 58, 59, 60, -1, -1, -1, -1, -1,
+ -1, -1, 68, 69, -1, 71, -1, -1, -1, -1,
+ -1, -1, 78, 79, -1, -1, 82, 83, 84, 85,
+ -1, 87, 88, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, 102, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, 120, 121, 122, -1, 124, -1,
+ -1, -1, -1, -1, -1, -1, 132, 133, 134, 135,
+ -1, -1, -1, -1, -1, 141, -1, -1, 144, -1,
+ -1, -1, -1, -1, 150, -1, -1, 153, -1, -1,
+ -1, -1, -1, -1, -1, -1, 162, -1, 164, -1,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 180, 181, -1, 183, -1, -1,
+ -1, 187, -1, -1, -1, -1, 192, -1, -1, 195,
+ -1, -1, 198, 199, 200, 201, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, 219, 220, 221, -1, 223, -1, -1,
+ -1, -1, -1, -1, 230, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 241, -1, -1, -1, -1,
+ -1, -1, -1, 249, 250, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 268, -1, -1, -1, -1, -1, -1, 275,
+ 276, -1, 278, 279, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 290, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 300, 301, 302, -1, -1, -1,
+ -1, -1, 308, 309, -1, -1, -1, -1, -1, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, 768, 769, -1, -1, 3, -1, 774, -1,
+ -1, 8, 9, 779, -1, -1, -1, 783, 784, -1,
+ -1, 787, 19, 20, -1, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -1, -1, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 57, 58, 59, 60, -1, -1, -1, -1, -1, -1,
+ -1, 68, 69, -1, 71, -1, -1, -1, -1, -1,
+ -1, 78, 79, -1, -1, 82, 83, 84, 85, -1,
+ 87, 88, -1, 90, 91, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, 102, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, 120, 121, 122, -1, 124, -1, -1,
+ -1, -1, -1, -1, -1, 132, 133, 134, 135, -1,
+ -1, -1, -1, -1, 141, -1, -1, 144, -1, -1,
+ -1, -1, -1, 150, -1, -1, 153, -1, -1, -1,
+ -1, -1, -1, -1, -1, 162, -1, 164, -1, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 180, 181, -1, 183, -1, -1, -1,
+ 187, -1, -1, -1, -1, 192, -1, -1, 195, -1,
+ -1, 198, 199, 200, 201, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, 219, 220, 221, -1, 223, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, -1, -1, -1,
+ -1, -1, 249, 250, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 268, -1, -1, -1, -1, -1, -1, 275, 276,
+ -1, 278, 279, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 290, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 300, 301, 302, -1, -1, -1, -1,
+ -1, 308, 309, -1, -1, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, -1, -1, -1, -1, -1, -1, -1,
+ -1, 768, 769, -1, -1, 3, -1, 774, -1, -1,
+ 8, 9, 779, -1, -1, -1, 783, 784, -1, -1,
+ 787, 19, 20, -1, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 57,
+ 58, 59, 60, -1, -1, -1, -1, -1, -1, -1,
+ 68, 69, -1, 71, -1, -1, -1, -1, -1, -1,
+ 78, 79, -1, -1, 82, 83, 84, 85, -1, 87,
+ 88, -1, 90, 91, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, 102, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, 120, 121, 122, -1, 124, -1, -1, -1,
+ -1, -1, -1, -1, 132, 133, 134, 135, -1, -1,
+ -1, -1, -1, 141, -1, -1, 144, -1, -1, -1,
+ -1, -1, 150, -1, -1, 153, -1, -1, -1, -1,
+ -1, -1, -1, -1, 162, -1, 164, -1, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 180, 181, -1, 183, -1, -1, -1, 187,
+ -1, -1, -1, -1, 192, -1, -1, 195, -1, -1,
+ 198, 199, 200, 201, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, 219, 220, 221, -1, 223, -1, -1, -1, -1,
+ -1, -1, 230, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 241, -1, -1, -1, -1, -1, -1,
+ -1, 249, 250, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 268, -1, -1, -1, -1, -1, -1, 275, 276, -1,
+ 278, 279, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 290, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 300, 301, 302, -1, -1, -1, -1, -1,
+ 308, 309, -1, -1, -1, -1, -1, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ 768, 769, -1, -1, 3, -1, 774, -1, -1, 8,
+ 9, 779, -1, -1, -1, 783, 784, -1, -1, 787,
+ 19, 20, -1, 22, 23, 24, 25, 26, 27, 28,
+ 29, 30, 31, 32, -1, -1, -1, -1, -1, -1,
+ -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 57, 58,
+ 59, 60, -1, -1, -1, -1, -1, -1, -1, 68,
+ 69, -1, 71, -1, -1, -1, -1, -1, -1, 78,
+ 79, -1, -1, 82, 83, 84, 85, -1, 87, 88,
+ -1, 90, 91, -1, -1, -1, -1, -1, -1, -1,
+ 99, -1, -1, 102, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 116, -1, -1,
+ -1, 120, 121, 122, -1, 124, -1, -1, -1, -1,
+ -1, -1, -1, 132, 133, 134, 135, -1, -1, -1,
+ -1, -1, 141, -1, -1, 144, -1, -1, -1, -1,
+ -1, 150, -1, -1, 153, -1, -1, -1, -1, -1,
+ -1, -1, -1, 162, -1, 164, -1, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 180, 181, -1, 183, -1, -1, -1, 187, -1,
+ -1, -1, -1, 192, -1, -1, 195, -1, -1, 198,
+ 199, 200, 201, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ 219, 220, 221, -1, 223, -1, -1, -1, -1, -1,
+ -1, 230, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 241, -1, -1, -1, -1, -1, -1, -1,
+ 249, 250, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 268,
+ -1, -1, -1, -1, -1, -1, 275, 276, -1, 278,
+ 279, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 290, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 300, 301, 302, -1, -1, -1, -1, -1, 308,
+ 309, -1, -1, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, -1, -1, 768,
+ 769, -1, -1, 3, -1, 774, -1, -1, 8, 9,
+ 779, -1, -1, -1, 783, 784, -1, -1, 787, 19,
+ 20, -1, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, 58, 59,
+ 60, -1, -1, -1, -1, -1, -1, -1, 68, 69,
+ -1, 71, -1, -1, -1, -1, -1, -1, 78, 79,
+ -1, -1, 82, 83, 84, 85, -1, 87, 88, -1,
+ 90, 91, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, 102, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ 120, 121, 122, -1, 124, -1, -1, -1, -1, -1,
+ -1, -1, 132, 133, 134, 135, -1, -1, -1, -1,
+ -1, 141, -1, -1, 144, -1, -1, -1, -1, -1,
+ 150, -1, -1, 153, -1, -1, -1, -1, -1, -1,
+ -1, -1, 162, -1, 164, -1, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 180, 181, -1, 183, -1, -1, -1, 187, -1, -1,
+ -1, -1, 192, -1, -1, 195, -1, -1, 198, 199,
+ 200, 201, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, 219,
+ 220, 221, -1, 223, -1, -1, -1, -1, -1, -1,
+ 230, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 241, -1, -1, -1, -1, -1, -1, -1, 249,
+ 250, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 268, -1,
+ -1, -1, -1, -1, -1, 275, 276, -1, 278, 279,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 290, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 300, 301, 302, -1, -1, -1, -1, -1, 308, 309,
+ -1, -1, -1, -1, -1, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, 768, 769,
+ -1, -1, 3, -1, 774, -1, -1, 8, 9, 779,
+ -1, -1, -1, 783, 784, -1, -1, 787, 19, 20,
+ -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 57, 58, 59, 60,
+ -1, -1, -1, -1, -1, -1, -1, 68, 69, -1,
+ 71, -1, -1, -1, -1, -1, -1, 78, 79, -1,
+ -1, 82, 83, 84, 85, -1, 87, 88, -1, 90,
+ 91, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, 120,
+ 121, 122, -1, 124, -1, -1, -1, -1, -1, -1,
+ -1, 132, 133, 134, 135, -1, -1, -1, -1, -1,
+ 141, -1, -1, 144, -1, -1, -1, -1, -1, 150,
+ -1, -1, 153, -1, -1, -1, -1, -1, -1, -1,
+ -1, 162, -1, 164, -1, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 180,
+ 181, -1, 183, -1, -1, -1, 187, -1, -1, -1,
+ -1, 192, -1, -1, 195, -1, -1, 198, 199, 200,
+ 201, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, 219, 220,
+ 221, -1, 223, -1, -1, -1, -1, -1, -1, 230,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 241, -1, -1, -1, -1, -1, -1, -1, 249, 250,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 268, -1, -1,
+ -1, -1, -1, -1, 275, 276, -1, 278, 279, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 290,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 300,
+ 301, 302, -1, -1, -1, -1, -1, 308, 309, -1,
+ -1, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, -1,
+ -1, -1, -1, -1, -1, -1, -1, 768, 769, -1,
+ -1, 3, -1, 774, -1, -1, 8, 9, 779, -1,
+ -1, -1, 783, 784, -1, -1, 787, 19, 20, -1,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, -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, 58, 59, 60, -1,
+ -1, -1, -1, -1, -1, -1, 68, 69, -1, 71,
+ -1, -1, -1, -1, -1, -1, 78, 79, -1, -1,
+ 82, 83, 84, 85, -1, 87, 88, -1, 90, 91,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ 102, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, 120, 121,
+ 122, -1, 124, -1, -1, -1, -1, -1, -1, -1,
+ 132, 133, 134, 135, -1, -1, -1, -1, -1, 141,
+ -1, -1, 144, -1, -1, -1, -1, -1, 150, -1,
+ -1, 153, -1, -1, -1, -1, -1, -1, -1, -1,
+ 162, -1, 164, -1, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 180, 181,
+ -1, 183, -1, -1, -1, 187, -1, -1, -1, -1,
+ 192, -1, -1, 195, -1, -1, 198, 199, 200, 201,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, 219, 220, 221,
+ -1, 223, -1, -1, -1, -1, -1, -1, 230, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 241,
+ -1, -1, -1, -1, -1, -1, -1, 249, 250, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 268, -1, -1, -1,
+ -1, -1, -1, 275, 276, -1, 278, 279, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 290, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 300, 301,
+ 302, -1, -1, -1, -1, -1, 308, 309, -1, -1,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, 768, 769, -1, -1,
+ 3, -1, -1, -1, -1, 8, -1, 779, -1, -1,
+ -1, -1, 784, -1, -1, 787, 19, 20, -1, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, 122,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, 201, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -1, -1, -1, -1, -1, -1, -1, 290, -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, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, 3, 756, 757, 758, 759, 8, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 19, 20,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 787, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, 3, 756, 757, 758, 759, 8,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 19, 20, -1, -1, -1, -1, -1, -1, -1, 780,
+ -1, -1, -1, -1, -1, -1, 787, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, 8, 756, 757, 758,
+ 759, -1, -1, -1, -1, -1, -1, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 787, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, 8, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 779, -1, -1,
+ -1, -1, -1, -1, -1, 787, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ 8, 756, 757, 758, 759, -1, -1, -1, -1, -1,
+ -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 787, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 5, -1, 7, 8, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 787,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, -1, 68, -1, 70, -1, 72,
+ -1, -1, -1, -1, -1, -1, -1, 80, -1, -1,
+ -1, -1, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 98, -1, -1, 101, -1,
+ 103, 104, -1, -1, -1, -1, -1, 110, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 127, -1, -1, -1, 131, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, 141, -1,
+ -1, -1, -1, -1, -1, -1, -1, 150, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 161, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 171, -1,
+ 173, -1, -1, -1, 177, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, 204, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, 216, 217, 218, -1, -1, -1, -1,
+ -1, -1, -1, -1, 227, 228, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 239, 240, 241, -1,
+ 243, -1, -1, -1, -1, 248, -1, -1, -1, -1,
+ -1, 254, -1, -1, -1, 258, 259, 260, -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,
+ -1, 294, -1, 296, -1, 298, -1, -1, -1, -1,
+ -1, -1, 305, -1, -1, -1, -1, -1, -1, -1,
+ 313, 314, -1, -1, -1, 318, 319, 320, -1, 322,
+ 323, 324, 325, 326, -1, 328, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, -1, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, -1, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, -1, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, -1, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, -1, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, -1, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, -1,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, -1, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 5, -1, -1,
+ 8, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 19, 20, -1, -1, -1, 779, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 48, 49, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 66, -1,
+ 68, -1, 70, -1, 72, -1, -1, -1, -1, -1,
+ -1, -1, 80, -1, -1, -1, -1, -1, -1, -1,
+ 88, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 98, -1, -1, 101, -1, 103, 104, -1, -1, -1,
+ -1, -1, 110, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
+ -1, -1, -1, 131, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, 141, -1, -1, -1, -1, -1, -1,
+ -1, -1, 150, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 161, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 171, -1, 173, -1, -1, -1, 177,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, 204, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, 216, 217,
+ 218, -1, -1, -1, -1, -1, -1, -1, -1, 227,
+ 228, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 239, 240, 241, -1, 243, -1, -1, -1, -1,
+ 248, -1, -1, -1, -1, -1, 254, -1, -1, -1,
+ 258, 259, 260, -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, -1, 294, -1, 296, -1,
+ 298, -1, -1, -1, -1, -1, -1, 305, -1, -1,
+ -1, -1, -1, -1, -1, 313, 314, -1, -1, -1,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, -1,
+ 328, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, 351, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, -1, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ -1, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, -1,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, -1,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ -1, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ -1, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, -1, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, -1, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 5, -1, -1, 8, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 19, 20, -1, -1,
+ -1, 779, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 48, 49, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 66, -1, -1, -1, 70, -1, 72,
+ -1, -1, -1, -1, -1, -1, -1, 80, -1, -1,
+ -1, -1, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 101, -1,
+ 103, 104, -1, -1, -1, -1, -1, 110, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 131, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 150, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 161, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 171, -1,
+ 173, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, 204, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, 216, 217, 218, -1, -1, -1, -1,
+ -1, -1, -1, -1, 227, 228, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 239, 240, -1, -1,
+ 243, -1, -1, -1, -1, 248, -1, -1, -1, -1,
+ -1, 254, -1, -1, -1, 258, 259, 260, -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,
+ -1, 294, -1, 296, -1, 298, -1, -1, -1, -1,
+ -1, -1, 305, -1, -1, -1, -1, -1, -1, -1,
+ -1, 314, -1, -1, -1, 318, 319, 320, -1, 322,
+ 323, 324, 325, 326, -1, 328, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, -1,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, -1, 367, 368, 369, 370, 371, 372,
+ 373, -1, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, -1, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, -1, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, -1, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, -1, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, -1, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, -1,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, -1, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 779, -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, -1,
+ -1, -1, -1, 75, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 129, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, 145, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 160, -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, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 262, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, 787, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -1, -1, -1, 254, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 305, -1, -1, -1, -1, -1,
+ -1, -1, -1, 314, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 779, -1,
+ -1, -1, -1, -1, -1, -1, 787, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 111, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 779,
+ -1, -1, -1, -1, 784, -1, -1, 787, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 779, -1, -1, -1, -1, 784, -1, -1, 787, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 779, -1, -1, -1, -1, -1, -1, -1, 787,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, 770, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 787, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 779, -1, -1, -1, -1, -1, -1,
+ -1, 787, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, 141, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -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, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, 787, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ 21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 31, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 787, -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, -1, -1,
+ -1, -1, -1, -1, 85, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, -1, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 779, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, 3, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 19, 20, -1, -1, -1, -1, -1, -1, 779,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 71, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, 3, 756, 757,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 19, 20, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 71, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 99, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, 3,
+ 756, 757, 758, 759, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 19, 20, 21, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 31, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, 3, 756, 757, 758, 759, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 19, 20, 21,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 31,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, 3, 756, 757, 758, 759, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, 3, 756, 757, 758, 759,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 19, 20, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 74, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, 3, 756, 757,
+ 758, 759, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 8, 9, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, 28, -1, 30, -1, 32, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, 251, -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,
+ -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, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 8, 9, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
+ 32, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, 251,
+ -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, -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, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 8, 9,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
+ 30, -1, 32, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, 251, -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, -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, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 8, 9, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
+ 28, -1, 30, -1, 32, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -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, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, 770, -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, -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, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -1, -1,
+ -1, -1, -1, -1, -1, -1, 770, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -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, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, -1, 770, -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,
+ -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, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -1, -1, -1, -1, -1, 26, -1, -1, 770, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 40,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, 196, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, 209, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 265, -1, 267, -1, 269, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, 769, -1,
+ -1, 31, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 42, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 57, -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, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, 21, 763, -1, -1, -1, -1, -1, -1,
+ -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 42, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -1, 763, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 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, -1, 75, 76, 77,
+ 78, 79, 80, 81, 82, 83, 84, 85, -1, 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, -1,
+ 128, 129, 130, 131, 132, -1, -1, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ -1, 149, 150, -1, 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, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+ 208, 209, 210, 211, -1, 213, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, -1, 280, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, 291, 292, 293, 294, -1, 296, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, -1,
+ 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, -1, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, -1, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, -1, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, -1, 574, 575, 576, 577,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, -1, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, -1, 661, 662, 663, 664, 665, -1, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ -1, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, -1,
+ 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,
+ -1, 128, 129, 130, 131, 132, -1, -1, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, -1, 149, 150, -1, 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, 199, 200, 201, 202, 203, 204, 205, 206,
+ 207, 208, 209, 210, 211, -1, 213, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226,
+ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
+ 277, 278, -1, 280, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, 291, 292, 293, 294, -1, 296,
+ 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ -1, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, -1, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, -1, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, -1, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, -1, 574, 575, 576,
+ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, -1, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, -1, 661, 662, 663, 664, 665, -1,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, -1, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
+ -1, 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, -1, 128, 129, 130, 131, 132, -1, -1, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, -1, 149, 150, -1, 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, 199, 200, 201, 202, 203, 204, 205,
+ 206, 207, 208, 209, 210, 211, -1, 213, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ 276, 277, 278, -1, 280, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, 291, 292, 293, 294, -1,
+ 296, 297, 298, 299, 300, 301, 302, 303, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, -1, 328, 329, 330, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, -1, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, -1, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, -1, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, -1, 574, 575,
+ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, -1,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, -1, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ -1, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, -1, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 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, -1,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, -1, 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, -1, 128, 129, 130, 131, 132, -1, -1,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, -1, 149, 150, -1, 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, 199, 200, 201, 202, 203, 204,
+ 205, 206, 207, 208, 209, 210, 211, -1, 213, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, -1, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ -1, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, -1, 322, 323, 324,
+ 325, 326, -1, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, -1, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, -1, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, -1, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, -1, 574,
+ 575, 576, 577, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ -1, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, -1, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, -1, 661, 662, 663, 664,
+ 665, -1, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, -1, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, -1, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, 21, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 31, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 47, 48, -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, 80, -1, -1, -1,
+ 84, -1, -1, -1, 88, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 101, -1, -1,
+ -1, -1, -1, -1, -1, -1, 110, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 131, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, 145, -1, -1, -1, -1, 150, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 173,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 232, -1,
+ -1, -1, 236, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 254, -1, -1, -1, 258, 259, -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, 289, -1, -1, -1, -1,
+ -1, -1, 296, 297, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, 21, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 31, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 47, 48, -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, 80, -1, -1,
+ -1, 84, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 101, -1,
+ -1, -1, -1, -1, -1, -1, -1, 110, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 131, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, 145, -1, -1, -1, -1, 150, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 173, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 232,
+ -1, -1, -1, 236, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 254, -1, -1, -1, 258, 259, -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, 289, -1, -1, -1,
+ -1, -1, -1, 296, 297, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -1,
+ -1, -1, 24, 25, 26, -1, 28, -1, 30, 31,
+ 32, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 88, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ 21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 31, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 84, 85, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -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, 57, -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, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -1, -1, 23, -1, -1, 26, 27, -1,
+ -1, -1, 31, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, 21, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 31, -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, 57,
+ -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,
+ 88, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, 21, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 31, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 85, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, 21, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 31, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 47, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, 21, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 31, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 84,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, 21, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 31, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -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, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, 21,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 31,
+ -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, 57, -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, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ 21, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 31, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 88, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -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, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -1, -1, -1, -1, -1, -1, -1, 258,
+ -1, -1, -1, -1, -1, -1, -1, -1, 267, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, 21, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 31, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
+ 77, -1, -1, -1, -1, -1, -1, -1, -1, 86,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, -1, -1,
+ -1, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ -1, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, -1, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ -1, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 128, -1, -1, -1, -1, -1, -1, 135,
+ 136, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 31, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 53, -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, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 267, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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,
+ -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 128, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -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, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 30, -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, -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, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -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, -1, -1, -1, 88, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 99, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -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, -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, -1, -1, -1, 88, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 99,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 63, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -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, -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, -1, -1, -1,
+ 88, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -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, -1, -1,
+ -1, 88, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -1, -1, -1, -1, -1, -1, 225,
+ -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, -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, -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, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 31, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -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, 47, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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,
+ -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, -1, -1, -1, 88, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -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, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 99, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -1, -1,
+ -1, -1, -1, -1, 225, -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, -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, -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, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, 750,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, 506, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, -1, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, 661, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -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, -1, -1, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, 352, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -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, -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, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ -1, -1, -1, -1, -1, -1, 144, -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, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, 352, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 371, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ 568, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, 645, 646, 647,
+ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -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, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, -1, -1,
+ -1, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ -1, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
+ 347, 348, 349, 350, -1, 352, 353, 354, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
+ 377, 378, 379, 380, 381, 382, 383, -1, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, 412, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, 461, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, 472, 473, -1, 475, 476,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, 568, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, 582, 583, 584, 585, 586,
+ 587, 588, 589, 590, 591, 592, 593, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, 686,
+ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, 712, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
+ 727, 728, 729, 730, 731, 732, 733, 734, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, 750, 751, 752, 753, 754, -1, 756,
+ 757, 758, 759, 19, 20, -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, -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, -1,
+ -1, -1, 88, -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,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, 144, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 195,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 207, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 218, -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, -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, -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, -1,
+ -1, -1, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, -1, -1, -1, -1, 331, 332, 333, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
+ 346, 347, 348, 349, 350, -1, 352, 353, 354, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 382, 383, -1, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ 396, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, 409, 410, 411, 412, 413, -1, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, -1, -1, 445,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, -1, 460, 461, 462, 463, 464, 465,
+ 466, 467, 468, 469, 470, 471, 472, 473, -1, 475,
+ 476, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, 492, 493, 494, 495,
+ 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
+ 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
+ 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, -1, 533, 534, 535,
+ 536, 537, 538, 539, 540, 541, 542, 543, 544, 545,
+ 546, 547, 548, 549, 550, 551, 552, 553, 554, 555,
+ 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 566, 567, 568, 569, 570, 571, 572, 573, 574, 575,
+ 576, -1, 578, 579, 580, 581, 582, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605,
+ 606, 607, 608, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 619, 620, 621, 622, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 635,
+ 636, 637, 638, 639, 640, 641, 642, 643, 644, 645,
+ 646, 647, 648, 649, 650, 651, 652, 653, 654, 655,
+ 656, 657, 658, 659, 660, 661, 662, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 676, 677, 678, 679, 680, -1, 682, 683, 684, 685,
+ 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
+ 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
+ 716, 717, 718, 719, 720, 721, 722, 723, 724, 725,
+ 726, 727, 728, 729, 730, 731, 732, 733, 734, 735,
+ 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
+ 746, 747, 748, 749, 750, 751, 752, 753, 754, -1,
+ 756, 757, 758, 759, 19, 20, -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, -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,
+ -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, -1, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, -1,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, 439, 440, 441, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, -1,
+ 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, 568, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, 582, 583, 584,
+ 585, 586, 587, 588, 589, 590, 591, 592, 593, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
+ 645, 646, 647, 648, 649, 650, 651, 652, 653, 654,
+ 655, 656, 657, 658, 659, 660, 661, 662, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 676, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, 712, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
+ 725, 726, 727, 728, 729, 730, 731, 732, 733, 734,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 750, 751, 752, 753, 754,
+ -1, 756, 757, 758, 759, 19, 20, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 31, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 88, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 99, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, -1, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, 496, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, -1, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, 573,
+ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, 649, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, 660, -1, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, 710, 711, 712, 713,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758, 759, 19, 20, -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,
+ -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 195, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 207, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 218, -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, -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,
+ -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, -1, -1, -1, 318, 319, 320, 321, 322,
+ 323, 324, 325, 326, -1, -1, -1, -1, 331, 332,
+ 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, -1, 352,
+ 353, 354, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
+ 383, -1, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, 409, 410, 411, 412,
+ 413, -1, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ -1, -1, 445, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, -1, 475, 476, 477, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, -1,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
+ 573, 574, 575, 576, -1, 578, 579, 580, 581, 582,
+ 583, 584, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 603, 604, 605, 606, 607, 608, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
+ 643, 644, 645, 646, 647, 648, 649, 650, 651, 652,
+ 653, 654, 655, 656, 657, 658, 659, 660, 661, 662,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 676, 677, 678, 679, 680, -1, 682,
+ 683, 684, 685, 686, 687, 688, 689, 690, 691, 692,
+ 693, 694, 695, 696, 697, 698, 699, 700, 701, 702,
+ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712,
+ 713, 714, 715, 716, 717, 718, 719, 720, 721, 722,
+ 723, 724, 725, 726, 727, 728, 729, 730, 731, 732,
+ 733, 734, 735, 736, 737, 738, 739, 740, 741, 742,
+ 743, 744, 745, 746, 747, 748, 749, 750, 751, 752,
+ 753, 754, -1, 756, 757, 758, 759, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -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, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 195, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 207, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, -1, -1, -1, -1, 331,
+ 332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, 345, 346, 347, 348, 349, 350, -1,
+ 352, 353, 354, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, -1, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, 409, 410, 411,
+ 412, 413, -1, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, -1, -1, 445, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, 461,
+ 462, 463, 464, 465, 466, 467, 468, 469, 470, 471,
+ 472, 473, -1, 475, 476, 477, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ 492, 493, 494, 495, 496, 497, 498, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ -1, 533, 534, 535, 536, 537, 538, 539, 540, 541,
+ 542, 543, 544, 545, 546, 547, 548, 549, 550, 551,
+ 552, 553, 554, 555, 556, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 566, 567, 568, 569, 570, 571,
+ 572, 573, 574, 575, 576, -1, 578, 579, 580, 581,
+ 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
+ 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
+ 622, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 635, 636, 637, 638, 639, 640, 641,
+ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651,
+ 652, 653, 654, 655, 656, 657, 658, 659, 660, 661,
+ 662, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 676, 677, 678, 679, 680, -1,
+ 682, 683, 684, 685, 686, 687, 688, 689, 690, 691,
+ 692, 693, 694, 695, 696, 697, 698, 699, 700, 701,
+ 702, 703, 704, 705, 706, 707, 708, 709, 710, 711,
+ 712, 713, 714, 715, 716, 717, 718, 719, 720, 721,
+ 722, 723, 724, 725, 726, 727, 728, 729, 730, 731,
+ 732, 733, 734, 735, 736, 737, 738, 739, 740, 741,
+ 742, 743, 744, 745, 746, 747, 748, 749, 750, 751,
+ 752, 753, 754, -1, 756, 757, 758, 759, 19, 20,
+ -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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, -1, -1, -1, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ -1, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ 371, 372, 373, 374, 375, 376, 377, 378, 379, 380,
+ 381, 382, 383, -1, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, 412, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, -1, 460,
+ 461, 462, 463, 464, 465, 466, 467, 468, 469, 470,
+ 471, 472, 473, -1, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 498, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, 568, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590,
+ 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 635, 636, 637, 638, 639, 640,
+ 641, 642, 643, 644, 645, 646, 647, 648, 649, 650,
+ 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
+ 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, 686, 687, 688, 689, 690,
+ 691, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, 712, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, 722, 723, 724, 725, 726, 727, 728, 729, 730,
+ 731, 732, 733, 734, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, -1,
+ 751, 752, 753, 754, -1, 756, 757, 758, 759, 19,
+ 20, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 31, -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, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 88, -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, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -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, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 195, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 218, -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, -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, -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, -1, -1, -1, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, -1, -1, -1,
+ -1, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, -1, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, 371, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, -1, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, 409,
+ 410, 411, 412, 413, -1, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, -1, -1, 445, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, -1,
+ 460, 461, 462, 463, 464, 465, 466, 467, -1, 469,
+ 470, 471, 472, 473, -1, 475, 476, 477, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, 492, 493, 494, 495, 496, 497, 498, 499,
+ 500, 501, 502, 503, 504, 505, -1, 507, 508, 509,
+ 510, 511, 512, 513, 514, 515, 516, 517, 518, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, -1, 533, 534, 535, 536, 537, 538, 539,
+ 540, 541, 542, 543, 544, 545, 546, 547, 548, 549,
+ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 566, 567, 568, 569,
+ 570, 571, 572, 573, 574, 575, 576, 577, 578, 579,
+ 580, 581, 582, 583, 584, 585, 586, 587, 588, 589,
+ 590, 591, 592, 593, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
+ 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
+ 640, 641, 642, 643, 644, 645, 646, 647, 648, 649,
+ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659,
+ 660, -1, 662, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 676, 677, 678, 679,
+ 680, -1, 682, 683, 684, 685, 686, 687, 688, 689,
+ 690, 691, 692, 693, 694, 695, 696, 697, 698, 699,
+ 700, 701, 702, 703, 704, 705, 706, 707, 708, 709,
+ 710, 711, 712, 713, 714, 715, 716, 717, 718, 719,
+ 720, 721, 722, 723, 724, 725, 726, 727, 728, 729,
+ 730, 731, 732, 733, 734, 735, 736, 737, 738, 739,
+ 740, 741, 742, 743, 744, 745, 746, 747, 748, 749,
+ 750, 751, 752, 753, 754, -1, 756, 757, 758, 759,
+ 19, 20, -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, -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, -1, 86, -1, 88,
+ -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, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -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, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 195, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 207, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 218,
+ -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, -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, -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, -1, -1, -1, 318,
+ 319, 320, -1, 322, 323, 324, 325, 326, -1, -1,
+ -1, -1, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
+ 349, 350, -1, -1, 353, 354, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, 371, 372, 373, 374, 375, 376, 377, 378,
+ 379, 380, 381, 382, 383, -1, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ 409, 410, 411, 412, 413, -1, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, -1, 428,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, -1, -1, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ -1, 460, 461, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, 472, 473, -1, 475, 476, 477, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498,
+ 499, 500, 501, 502, 503, 504, 505, 506, 507, 508,
+ 509, 510, 511, 512, 513, 514, 515, 516, 517, 518,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, -1, 533, 534, 535, 536, 537, 538,
+ 539, 540, 541, 542, 543, 544, 545, 546, 547, 548,
+ 549, 550, 551, 552, 553, 554, 555, 556, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 566, 567, 568,
+ 569, 570, 571, 572, 573, 574, 575, 576, -1, 578,
+ 579, 580, 581, 582, 583, 584, 585, 586, 587, 588,
+ 589, 590, 591, 592, 593, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 603, 604, 605, 606, 607, 608,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 619, 620, 621, 622, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
+ 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
+ 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
+ 659, 660, 661, 662, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 676, 677, 678,
+ 679, 680, -1, 682, 683, 684, 685, 686, 687, 688,
+ 689, 690, 691, 692, 693, 694, 695, 696, 697, 698,
+ 699, 700, 701, 702, 703, 704, 705, 706, 707, 708,
+ 709, 710, 711, 712, 713, 714, 715, 716, 717, 718,
+ 719, 720, 721, 722, 723, 724, 725, 726, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 745, 746, 747, 748,
+ 749, 750, 751, 752, 753, 754, -1, 756, 757, 758,
+ 759, 19, 20, -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, -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, -1, -1, -1,
+ 88, -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, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 135, -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,
+ -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, 195, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 218, -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, -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, -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, -1, -1, -1,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, -1,
+ -1, -1, -1, 331, 332, 333, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, 345, 346, 347,
+ 348, 349, 350, -1, -1, 353, 354, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, -1, 367,
+ 368, 369, 370, 371, 372, 373, -1, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, -1, 385, 386, 387,
+ -1, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ -1, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, -1, 415, 416, 417,
+ 418, 419, 420, 421, -1, 423, 424, 425, 426, -1,
+ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, -1, -1, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, -1,
+ 458, -1, 460, 461, 462, 463, 464, 465, 466, 467,
+ 468, 469, -1, 471, 472, 473, -1, 475, 476, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, 492, 493, 494, 495, 496, 497,
+ -1, 499, 500, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, 515, 516, 517,
+ 518, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, -1, 533, 534, 535, 536, 537,
+ 538, 539, 540, 541, 542, 543, 544, 545, 546, 547,
+ 548, 549, 550, 551, 552, 553, 554, 555, 556, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 566, 567,
+ -1, 569, 570, 571, 572, 573, 574, 575, 576, -1,
+ 578, 579, 580, 581, -1, 583, 584, 585, 586, 587,
+ 588, 589, 590, 591, 592, 593, 594, 595, 596, 597,
+ 598, 599, -1, 601, 602, 603, 604, 605, 606, 607,
+ 608, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627,
+ 628, 629, 630, -1, 632, 633, 634, 635, 636, 637,
+ 638, 639, 640, 641, 642, 643, 644, -1, 646, 647,
+ 648, 649, 650, 651, 652, -1, 654, 655, 656, 657,
+ 658, 659, 660, 661, 662, 663, 664, -1, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
+ 678, 679, 680, -1, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, -1, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, -1, 756, 757,
+ 758, 759, 19, 20, -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, -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, -1, -1,
+ -1, 88, -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, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -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,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 195, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 207, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 218, -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, -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, -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, 311, -1, -1, -1, -1, -1,
+ -1, 318, 319, 320, 321, 322, -1, 324, 325, 326,
+ -1, -1, -1, -1, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 340, -1, 342, 343, 344, 345, 346,
+ 347, 348, 349, -1, -1, -1, -1, 354, 355, 356,
+ 357, 358, -1, -1, 361, 362, 363, 364, 365, -1,
+ -1, -1, 369, 370, 371, 372, 373, -1, 375, 376,
+ 377, 378, -1, -1, -1, -1, -1, -1, 385, -1,
+ 387, -1, 389, 390, 391, 392, 393, 394, 395, 396,
+ 397, -1, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 411, -1, 413, -1, 415, 416,
+ 417, 418, 419, 420, 421, -1, 423, 424, 425, 426,
+ -1, 428, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, -1, -1, -1, 442, -1, -1, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, -1,
+ -1, -1, -1, -1, 461, 462, 463, 464, 465, 466,
+ -1, 468, 469, -1, 471, 472, -1, -1, 475, -1,
+ 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, -1, 489, 490, 491, 492, 493, 494, 495, 496,
+ 497, -1, 499, 500, 501, 502, 503, 504, 505, 506,
+ 507, 508, 509, 510, 511, 512, 513, 514, 515, 516,
+ 517, 518, 519, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, -1, 533, 534, 535, 536,
+ 537, 538, 539, 540, 541, 542, 543, 544, 545, 546,
+ 547, 548, 549, 550, 551, 552, 553, 554, 555, 556,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
+ 567, -1, 569, 570, 571, 572, 573, 574, 575, 576,
+ -1, 578, 579, 580, 581, -1, -1, -1, 585, -1,
+ 587, 588, -1, 590, 591, 592, 593, -1, 595, 596,
+ 597, 598, -1, -1, -1, -1, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, -1, 630, -1, 632, 633, 634, -1, 636,
+ 637, -1, 639, 640, 641, 642, 643, 644, -1, 646,
+ 647, 648, 649, 650, 651, 652, -1, 654, 655, 656,
+ -1, 658, 659, 660, 661, -1, 663, 664, 19, 20,
+ 667, 668, -1, -1, 671, 672, 673, -1, 675, -1,
+ 677, 678, 679, 680, -1, 682, 683, 684, 685, -1,
+ 687, 688, -1, 690, -1, 692, 693, 694, 695, 696,
+ 697, 698, 699, 700, 701, 702, 703, 704, 705, 706,
+ 707, 708, 709, 710, 711, -1, 713, 714, 715, 716,
+ 717, 718, 719, 720, 721, -1, 723, 724, -1, 726,
+ 727, 728, 729, -1, -1, 732, 733, 88, 735, 736,
+ 737, 738, 739, 740, 741, 742, 743, 744, 745, 746,
+ 747, 748, 749, -1, -1, 752, 753, -1, -1, 756,
+ -1, 758, 759, -1, -1, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -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, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 195, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 207, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 218, -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,
+ -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, -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,
+ 311, -1, -1, -1, -1, -1, -1, 318, 319, 320,
+ 321, 322, -1, 324, 325, 326, -1, -1, -1, -1,
+ 331, 332, 333, 334, 335, 336, 337, 338, 339, 340,
+ -1, 342, 343, 344, 345, 346, 347, 348, 349, -1,
+ -1, -1, -1, 354, 355, 356, 357, 358, -1, -1,
+ 361, 362, 363, 364, 365, -1, -1, -1, 369, 370,
+ 371, 372, 373, -1, 375, 376, 377, 378, -1, -1,
+ -1, -1, -1, -1, 385, -1, 387, -1, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, -1, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
+ 411, -1, 413, -1, 415, 416, 417, 418, 419, 420,
+ 421, -1, 423, 424, 425, 426, -1, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, -1, -1,
+ -1, 442, -1, -1, 445, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, -1, -1, -1, -1, -1,
+ 461, 462, 463, 464, 465, 466, -1, 468, 469, -1,
+ 471, 472, -1, -1, 475, -1, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, -1, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, -1, 499, 500,
+ 501, 502, 503, 504, 505, 506, 507, 508, 509, 510,
+ 511, 512, 513, 514, 515, 516, 517, 518, 519, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, -1, 533, 534, 535, 536, 537, 538, 539, 540,
+ 541, 542, 543, 544, 545, 546, 547, 548, 549, 550,
+ 551, 552, 553, 554, 555, 556, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 566, 567, -1, 569, 570,
+ 571, 572, 573, 574, 575, 576, -1, 578, 579, 580,
+ 581, -1, -1, -1, 585, -1, 587, 588, -1, 590,
+ 591, 592, 593, -1, 595, 596, 597, 598, -1, -1,
+ -1, -1, 603, 604, 605, 606, 607, 608, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
+ 621, 622, 623, 624, 625, 626, 627, 628, -1, 630,
+ -1, 632, 633, 634, -1, 636, 637, -1, 639, 640,
+ 641, 642, 643, 644, -1, 646, 647, 648, 649, 650,
+ 651, 652, -1, 654, 655, 656, -1, 658, 659, 660,
+ 661, -1, 663, 664, 19, 20, 667, 668, -1, -1,
+ 671, 672, 673, -1, 675, -1, 677, 678, 679, 680,
+ -1, 682, 683, 684, 685, -1, 687, 688, -1, 690,
+ -1, 692, 693, 694, 695, 696, 697, 698, 699, 700,
+ 701, 702, 703, 704, 705, 706, 707, 708, 709, 710,
+ 711, -1, 713, 714, 715, 716, 717, 718, 719, 720,
+ 721, -1, 723, 724, -1, 726, 727, 728, 729, -1,
+ -1, 732, 733, 88, 735, 736, 737, 738, 739, 740,
+ 741, 742, 743, 744, 745, 746, 747, 748, 749, -1,
+ -1, 752, 753, -1, -1, 756, -1, 758, 759, -1,
+ -1, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, -1, -1, -1, -1, -1, -1, 144,
+ -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, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 195, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 218, -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, -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, -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,
+ -1, -1, -1, 318, 319, 320, 321, 322, -1, 324,
+ 325, 326, -1, -1, -1, -1, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, -1, 342, 343, 344,
+ 345, 346, 347, 348, 349, -1, -1, -1, -1, 354,
+ 355, 356, 357, 358, -1, -1, 361, 362, 363, 364,
+ 365, -1, -1, -1, 369, 370, 371, 372, 373, -1,
+ 375, 376, 377, 378, -1, -1, -1, -1, -1, -1,
+ 385, -1, 387, -1, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, -1, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, -1, 413, -1,
+ 415, 416, 417, 418, 419, 420, 421, -1, 423, 424,
+ 425, 426, -1, 428, 429, 430, 431, 432, 433, 434,
+ 435, 436, 437, 438, -1, -1, -1, 442, -1, -1,
+ 445, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, -1, -1, -1, -1, -1, 461, 462, 463, 464,
+ 465, 466, -1, 468, 469, -1, 471, 472, -1, -1,
+ 475, -1, 477, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, -1, 489, 490, 491, 492, 493, 494,
+ 495, 496, 497, -1, 499, 500, 501, 502, 503, 504,
+ 505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, -1, 533, 534,
+ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
+ 545, 546, 547, 548, 549, 550, 551, 552, 553, 554,
+ 555, 556, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 566, 567, -1, 569, 570, 571, 572, 573, 574,
+ 575, 576, -1, 578, 579, 580, 581, -1, -1, -1,
+ 585, -1, 587, 588, -1, 590, 591, 592, 593, -1,
+ 595, 596, 597, 598, -1, -1, -1, -1, 603, 604,
+ 605, 606, 607, 608, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 619, 620, 621, 622, 623, 624,
+ 625, 626, 627, 628, -1, 630, -1, 632, 633, 634,
+ -1, 636, 637, -1, 639, 640, 641, 642, 643, 644,
+ -1, 646, 647, 648, 649, 650, 651, 652, -1, 654,
+ 655, 656, -1, 658, 659, 660, 661, -1, 663, 664,
+ -1, -1, 667, 668, -1, -1, 671, 672, 673, -1,
+ 675, -1, 677, 678, 679, 680, -1, 682, 683, 684,
+ 685, -1, 687, 688, -1, 690, -1, 692, 693, 694,
+ 695, 696, 697, 698, 699, 700, 701, 702, 703, 704,
+ 705, 706, 707, 708, 709, 710, 711, -1, 713, 714,
+ 715, 716, 717, 718, 719, 720, 721, -1, 723, 724,
+ -1, 726, 727, 728, 729, -1, -1, 732, 733, -1,
+ 735, 736, 737, 738, 739, 740, 741, 742, 743, 744,
+ 745, 746, 747, 748, 749, 19, 20, 752, 753, -1,
+ -1, 756, -1, 758, 759, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, -1, 57, 58, 59, 60, -1, -1, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ -1, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, -1, 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, -1, 128, 129, 130, 131, 132, -1,
+ -1, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, -1, 149, 150, -1, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ -1, -1, -1, 177, 178, 179, 180, 181, 182, 183,
+ -1, -1, -1, 187, 188, 189, 190, 191, 192, 193,
+ 194, 195, 196, 197, 198, 199, 200, 201, -1, 203,
+ 204, 205, 206, 207, 208, 209, 210, 211, -1, 213,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ -1, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, -1, 259, 260, -1, 262, 263,
+ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
+ 274, 275, 276, 277, 278, -1, 280, 281, 282, 283,
+ -1, -1, -1, 287, 288, 289, 290, 291, 292, 293,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, -1, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, -1, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, 352, 353,
+ -1, 355, -1, -1, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, -1, -1,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, -1, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, -1, 456, 457, 458, -1, 460, 461, 462, -1,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, -1, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, -1, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, -1, 559, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, -1,
+ -1, -1, 576, 577, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, -1, -1, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, -1, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, -1, 661, 662, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, -1, 711, 712, -1,
+ 714, 715, 716, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, -1, 739, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, -1, 751, 752, 753,
+ 754, -1, 756, 757, 758, 19, 20, -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, -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, -1, -1, -1, 88, -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, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 195, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 207, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -1, -1, -1, -1, -1,
+ -1, -1, 226, -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, -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, -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, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, -1, -1, -1, -1, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, 345, 346, 347, 348, 349, 350, -1, -1, 353,
+ -1, 355, -1, -1, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, 371, -1, -1,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ -1, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, -1, 411, 412, 413,
+ -1, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, -1, 428, 429, 430, -1, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, -1,
+ -1, 445, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, -1, 456, 457, 458, -1, 460, 461, 462, 463,
+ 464, 465, 466, 467, 468, 469, 470, 471, 472, 473,
+ -1, 475, 476, 477, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, 492, 493,
+ 494, 495, -1, 497, 498, 499, 500, 501, 502, 503,
+ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513,
+ 514, 515, 516, 517, 518, 519, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, -1, 533,
+ 534, 535, 536, 537, 538, 539, -1, 541, 542, 543,
+ 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
+ 554, 555, 556, 557, -1, -1, 560, 561, 562, 563,
+ 564, 565, 566, 567, 568, 569, 570, 571, 572, -1,
+ -1, -1, 576, -1, 578, 579, 580, 581, 582, 583,
+ 584, 585, 586, 587, 588, 589, 590, 591, 592, 593,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 603,
+ 604, 605, 606, 607, 608, 609, 610, 611, 612, 613,
+ 614, -1, -1, 617, 618, 619, 620, 621, 622, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 635, 636, 637, 638, 639, 640, 641, 642, 643,
+ 644, 645, 646, 647, 648, -1, 650, 651, 652, 653,
+ 654, 655, 656, 657, 658, 659, -1, 661, 662, 663,
+ 664, 665, -1, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 676, 677, 678, 679, 680, -1, 682, 683,
+ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
+ 694, 695, 696, 697, 698, 699, 700, 701, 702, 703,
+ 704, 705, 706, 707, 708, 709, -1, 711, 712, -1,
+ 714, 715, -1, 717, 718, 719, 720, 721, 722, 723,
+ 724, 725, 726, 727, 728, 729, 730, 731, 732, 733,
+ 734, 735, 736, 737, -1, -1, 740, 741, 742, 743,
+ 744, 745, 746, 747, 748, 749, 750, 751, 752, 753,
+ 754, -1, 756, 757, 758
+};
+
+/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
+ state STATE-NUM. */
+static const yytype_int16 yystos[] =
+{
+ 0, 5, 7, 8, 19, 20, 48, 49, 66, 68,
+ 70, 72, 80, 88, 98, 101, 103, 104, 110, 116,
+ 127, 131, 135, 141, 150, 161, 171, 173, 177, 195,
+ 204, 207, 216, 217, 218, 227, 228, 239, 240, 241,
+ 243, 248, 254, 258, 259, 260, 294, 296, 298, 305,
+ 313, 314, 318, 319, 320, 322, 323, 324, 325, 326,
+ 328, 331, 332, 333, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 367, 368, 369, 370,
+ 371, 372, 373, 375, 376, 377, 378, 379, 380, 381,
+ 382, 383, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 428, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 445, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 458,
+ 460, 461, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, 472, 473, 475, 476, 477, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, 492, 493, 494, 495, 496, 497, 499, 500, 501,
+ 502, 503, 504, 505, 506, 507, 508, 509, 510, 511,
+ 512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
+ 543, 544, 545, 546, 547, 548, 549, 550, 551, 552,
+ 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 566, 567, 569, 570, 571, 572, 573,
+ 574, 575, 576, 578, 579, 580, 581, 583, 584, 585,
+ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595,
+ 596, 597, 598, 599, 601, 602, 603, 604, 605, 606,
+ 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 635, 636,
+ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
+ 647, 648, 649, 650, 651, 652, 653, 654, 655, 656,
+ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
+ 677, 678, 679, 680, 682, 683, 684, 685, 686, 687,
+ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697,
+ 698, 699, 700, 701, 702, 703, 704, 705, 706, 707,
+ 708, 709, 710, 711, 712, 713, 714, 715, 716, 717,
+ 718, 719, 720, 721, 722, 723, 724, 725, 726, 727,
+ 728, 729, 730, 731, 732, 733, 734, 735, 736, 737,
+ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747,
+ 748, 749, 750, 751, 752, 753, 754, 756, 757, 758,
+ 759, 779, 789, 792, 793, 794, 795, 796, 798, 804,
+ 806, 821, 868, 907, 908, 915, 916, 929, 964, 989,
+ 1007, 1069, 1122, 1223, 1276, 1279, 1289, 1294, 1300, 1313,
+ 1316, 1322, 1325, 1330, 1337, 1349, 1352, 1355, 1356, 1358,
+ 1361, 1362, 1364, 1365, 1368, 1369, 1372, 1609, 1611, 1624,
+ 1627, 1665, 1674, 1692, 1700, 1714, 1718, 1719, 1723, 1724,
+ 1734, 1741, 1749, 1751, 1757, 1760, 1761, 1793, 1815, 1837,
+ 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1848, 1889, 1896,
+ 1898, 1907, 1910, 1946, 1948, 1953, 1954, 1955, 1956, 1981,
+ 1990, 1991, 1992, 1994, 2019, 2021, 2022, 2075, 2076, 2094,
+ 2100, 144, 321, 350, 352, 353, 360, 366, 368, 374,
+ 388, 398, 412, 422, 427, 441, 456, 457, 463, 467,
+ 470, 473, 488, 498, 568, 582, 600, 602, 631, 635,
+ 645, 653, 665, 686, 689, 722, 731, 750, 757, 1815,
+ 1817, 1826, 1833, 1837, 1838, 1839, 1840, 1841, 1842, 1843,
+ 1846, 2002, 88, 226, 338, 413, 463, 658, 662, 735,
+ 1224, 1960, 1961, 1962, 1963, 197, 460, 506, 1324, 1721,
+ 1826, 965, 528, 1317, 208, 2102, 1675, 88, 145, 214,
+ 226, 289, 436, 463, 644, 662, 708, 735, 743, 1623,
+ 992, 859, 930, 1625, 1752, 145, 408, 758, 1766, 281,
+ 704, 1892, 990, 1324, 1123, 1008, 57, 528, 1706, 258,
+ 267, 904, 909, 911, 1826, 653, 735, 1892, 994, 909,
+ 910, 859, 1359, 1849, 1701, 909, 1897, 1666, 1826, 1357,
+ 991, 235, 1795, 1628, 173, 294, 684, 1735, 1947, 40,
+ 196, 1405, 1993, 2099, 3, 31, 1820, 145, 1892, 753,
+ 1950, 1610, 482, 1826, 1324, 403, 917, 1899, 805, 598,
+ 676, 1826, 1324, 1742, 1950, 1826, 1758, 47, 669, 717,
+ 47, 669, 1693, 598, 676, 351, 352, 388, 427, 602,
+ 619, 645, 686, 1984, 1358, 1365, 1368, 0, 7, 790,
+ 602, 88, 129, 145, 262, 293, 644, 735, 838, 1201,
+ 1202, 1623, 1960, 1961, 1962, 1963, 128, 154, 1375, 1376,
+ 1605, 1353, 1350, 119, 152, 292, 1367, 1957, 1366, 1957,
+ 448, 460, 591, 787, 1720, 1721, 1812, 1826, 1362, 1364,
+ 42, 787, 787, 386, 1243, 1826, 862, 1826, 763, 763,
+ 862, 141, 1622, 21, 1820, 1826, 1828, 1622, 1268, 1269,
+ 268, 1393, 1964, 1965, 1960, 763, 1892, 1349, 1352, 1624,
+ 1627, 1665, 1674, 1717, 787, 869, 311, 945, 946, 966,
+ 969, 972, 817, 818, 1820, 743, 1314, 1892, 328, 76,
+ 77, 86, 144, 443, 444, 750, 891, 892, 894, 900,
+ 927, 928, 1817, 1837, 1838, 1839, 1840, 1841, 1846, 1993,
+ 2004, 2019, 2020, 2066, 2084, 2085, 2087, 2088, 2090, 143,
+ 178, 475, 614, 1677, 1690, 1691, 1622, 1613, 63, 1622,
+ 1622, 1622, 1622, 1622, 1622, 1622, 1622, 1622, 658, 1892,
+ 977, 1817, 2006, 2020, 47, 48, 80, 84, 101, 110,
+ 131, 145, 150, 173, 232, 236, 254, 258, 259, 289,
+ 296, 297, 353, 393, 436, 441, 452, 453, 607, 611,
+ 617, 628, 634, 665, 669, 698, 1828, 1911, 1915, 1916,
+ 1917, 1919, 1921, 1922, 1923, 1924, 945, 960, 1630, 471,
+ 675, 1753, 154, 1762, 1890, 43, 77, 123, 130, 157,
+ 165, 201, 246, 247, 374, 444, 582, 886, 929, 931,
+ 932, 933, 934, 936, 939, 942, 943, 944, 954, 955,
+ 956, 957, 958, 964, 979, 982, 989, 2011, 2012, 2026,
+ 2027, 2092, 2093, 2095, 2100, 1892, 3, 8, 9, 19,
+ 20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 40, 57, 58, 59, 60, 68, 69, 71,
+ 78, 79, 82, 83, 84, 85, 87, 90, 91, 99,
+ 102, 120, 121, 122, 124, 132, 133, 134, 141, 150,
+ 153, 162, 164, 166, 180, 181, 183, 187, 192, 196,
+ 198, 199, 200, 201, 219, 220, 221, 223, 230, 241,
+ 249, 250, 268, 275, 276, 278, 279, 290, 300, 301,
+ 302, 308, 309, 327, 328, 329, 330, 334, 341, 349,
+ 366, 379, 381, 382, 383, 398, 410, 411, 466, 478,
+ 500, 501, 546, 552, 561, 562, 585, 593, 605, 649,
+ 656, 663, 694, 713, 714, 715, 716, 721, 722, 735,
+ 737, 749, 751, 759, 768, 769, 774, 779, 783, 784,
+ 787, 1368, 1374, 1399, 1400, 1401, 1402, 1406, 1417, 1421,
+ 1422, 1423, 1424, 1425, 1426, 1427, 1431, 1432, 1433, 1441,
+ 1447, 1448, 1449, 1450, 1451, 1453, 1456, 1785, 1788, 1790,
+ 1791, 1792, 1809, 1816, 1818, 1819, 1826, 1833, 1844, 1845,
+ 65, 1009, 510, 250, 362, 370, 385, 395, 396, 397,
+ 405, 543, 555, 655, 693, 707, 912, 914, 737, 905,
+ 911, 1826, 859, 1622, 886, 980, 911, 47, 333, 611,
+ 1908, 1909, 1917, 1919, 47, 106, 264, 266, 277, 293,
+ 474, 679, 680, 681, 682, 1378, 1385, 1386, 1959, 3,
+ 71, 99, 144, 321, 366, 463, 468, 506, 556, 577,
+ 593, 644, 661, 687, 717, 750, 1166, 1815, 1824, 1835,
+ 1837, 1838, 1839, 1841, 1842, 1843, 1846, 1850, 1860, 1871,
+ 2002, 47, 49, 79, 80, 89, 145, 159, 214, 226,
+ 281, 324, 344, 353, 366, 377, 400, 430, 433, 435,
+ 462, 463, 468, 469, 485, 506, 528, 582, 597, 606,
+ 609, 610, 624, 661, 669, 690, 747, 1166, 1200, 1702,
+ 1706, 1707, 1709, 1718, 1817, 1861, 911, 1892, 178, 1673,
+ 779, 1644, 1653, 945, 2008, 1794, 1630, 1736, 1826, 1950,
+ 343, 2101, 1828, 1331, 1290, 50, 1951, 1399, 1472, 799,
+ 299, 801, 1725, 417, 1812, 1814, 1826, 1900, 1828, 141,
+ 1068, 1820, 128, 1295, 528, 613, 669, 1743, 1744, 287,
+ 1951, 746, 1759, 670, 817, 232, 314, 1280, 1281, 1282,
+ 670, 817, 281, 1695, 1622, 1622, 23, 26, 27, 31,
+ 1786, 1787, 1821, 1983, 1983, 1983, 460, 1982, 1983, 1983,
+ 780, 780, 786, 1826, 1068, 1068, 145, 1068, 1068, 662,
+ 843, 145, 145, 281, 658, 214, 226, 289, 436, 1964,
+ 337, 860, 860, 1960, 111, 135, 779, 784, 1374, 1377,
+ 1477, 1480, 1492, 1495, 1496, 1497, 1508, 1509, 1510, 1511,
+ 1513, 1514, 1515, 1812, 211, 423, 1600, 1601, 1606, 312,
+ 1538, 1375, 123, 127, 168, 173, 206, 577, 1387, 1563,
+ 1568, 1569, 1578, 1579, 1583, 226, 1582, 1595, 1605, 47,
+ 106, 1958, 1958, 1958, 1578, 1580, 1368, 1371, 1372, 1579,
+ 1581, 1370, 47, 1826, 1716, 127, 1715, 787, 1354, 1351,
+ 2023, 1826, 1826, 42, 763, 1647, 1648, 1226, 734, 1228,
+ 787, 542, 709, 727, 85, 1828, 1829, 1830, 1915, 1229,
+ 120, 1234, 1233, 859, 281, 143, 581, 1270, 1271, 1272,
+ 657, 436, 743, 1964, 1828, 1301, 1826, 779, 872, 945,
+ 967, 1399, 114, 974, 972, 287, 1315, 1616, 1617, 1812,
+ 2020, 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,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 87, 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, 117,
+ 118, 119, 120, 121, 122, 123, 124, 125, 126, 128,
+ 129, 130, 131, 132, 136, 137, 138, 139, 140, 141,
+ 142, 143, 144, 145, 146, 147, 149, 150, 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, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+ 205, 206, 208, 209, 210, 211, 213, 214, 215, 216,
+ 217, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
+ 278, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 296, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 328, 329,
+ 330, 354, 356, 357, 373, 409, 410, 431, 455, 496,
+ 558, 559, 574, 575, 577, 616, 649, 710, 713, 716,
+ 739, 750, 759, 887, 927, 1128, 1130, 1131, 1132, 1134,
+ 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1817,
+ 1836, 1837, 1838, 1839, 1840, 1841, 1846, 1847, 2001, 2002,
+ 786, 470, 782, 74, 321, 2103, 2086, 2090, 894, 786,
+ 128, 1678, 128, 1678, 1679, 1680, 1687, 1688, 1826, 1690,
+ 1826, 141, 1621, 1622, 862, 862, 862, 862, 1826, 859,
+ 1828, 859, 1614, 1622, 1622, 993, 151, 978, 606, 1920,
+ 647, 647, 705, 708, 735, 743, 779, 1398, 475, 584,
+ 704, 580, 735, 89, 743, 333, 551, 633, 333, 333,
+ 203, 333, 371, 528, 669, 551, 287, 203, 782, 779,
+ 283, 427, 178, 414, 474, 1632, 1634, 393, 613, 1754,
+ 1755, 360, 178, 392, 1768, 1812, 1893, 1894, 144, 321,
+ 391, 463, 1817, 1827, 1840, 1841, 1842, 1846, 2003, 311,
+ 1827, 128, 136, 561, 1826, 1827, 1827, 1827, 1826, 311,
+ 1827, 1826, 427, 2092, 1994, 1995, 2021, 945, 959, 1826,
+ 127, 177, 241, 313, 98, 352, 2027, 2093, 786, 1323,
+ 1457, 19, 20, 30, 1816, 1833, 31, 1787, 153, 768,
+ 769, 1424, 779, 779, 779, 311, 1399, 1475, 1476, 779,
+ 779, 779, 779, 779, 1398, 1398, 1398, 779, 1397, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 779, 1399, 779, 779, 779, 8, 779, 1473, 1474,
+ 1809, 1816, 779, 779, 779, 779, 1399, 1397, 779, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779, 15, 779,
+ 779, 779, 779, 1398, 1397, 1397, 779, 779, 1398, 779,
+ 779, 779, 779, 779, 779, 779, 779, 779, 779, 779,
+ 779, 31, 779, 779, 779, 779, 779, 779, 779, 779,
+ 737, 779, 779, 779, 737, 779, 779, 779, 779, 31,
+ 779, 779, 779, 31, 779, 779, 779, 779, 779, 779,
+ 779, 779, 153, 1424, 153, 1424, 1424, 1124, 1368, 1399,
+ 1793, 1826, 1816, 33, 41, 50, 208, 315, 1403, 1404,
+ 35, 36, 37, 39, 156, 763, 764, 765, 1407, 55,
+ 151, 167, 238, 677, 1405, 14, 43, 44, 107, 192,
+ 766, 767, 768, 769, 770, 771, 772, 773, 1424, 73,
+ 38, 213, 213, 751, 1821, 787, 779, 15, 1010, 54,
+ 287, 782, 763, 1821, 1327, 1829, 1831, 1326, 733, 1920,
+ 584, 203, 128, 203, 1360, 1386, 3, 1828, 258, 644,
+ 787, 57, 99, 1167, 1168, 1647, 1828, 127, 1647, 1647,
+ 1916, 99, 1816, 1854, 1863, 1851, 57, 99, 1170, 1171,
+ 1828, 787, 1647, 1852, 782, 670, 1721, 779, 88, 214,
+ 226, 281, 289, 324, 436, 463, 658, 735, 743, 167,
+ 312, 1713, 63, 688, 376, 688, 688, 318, 688, 435,
+ 688, 1713, 47, 1081, 1828, 1567, 1568, 1573, 128, 151,
+ 1708, 1710, 376, 688, 127, 688, 704, 676, 47, 355,
+ 399, 401, 491, 541, 588, 678, 700, 1696, 1697, 1698,
+ 817, 477, 817, 1573, 1713, 1710, 510, 429, 378, 608,
+ 704, 720, 1721, 1392, 688, 740, 143, 1267, 1654, 782,
+ 177, 1796, 1797, 1804, 1826, 1633, 1634, 1812, 2038, 2104,
+ 782, 1332, 1333, 1334, 1335, 1812, 1616, 363, 568, 239,
+ 568, 1952, 782, 1399, 802, 57, 270, 416, 430, 432,
+ 464, 477, 510, 528, 606, 613, 623, 637, 669, 672,
+ 688, 719, 1726, 1731, 1732, 1817, 1892, 3, 74, 918,
+ 919, 920, 921, 1816, 582, 232, 374, 1405, 1826, 797,
+ 743, 1292, 1892, 1746, 360, 1745, 782, 653, 1826, 1952,
+ 127, 1283, 1284, 1283, 580, 755, 394, 782, 1283, 1283,
+ 1617, 1826, 1820, 782, 579, 1986, 699, 1987, 763, 158,
+ 639, 1985, 7, 791, 1826, 825, 1068, 859, 859, 1068,
+ 829, 831, 1068, 1068, 63, 1068, 1068, 836, 837, 743,
+ 463, 463, 1964, 779, 1477, 1497, 1509, 1510, 1511, 1512,
+ 1513, 1826, 10, 1383, 81, 147, 158, 166, 193, 249,
+ 277, 1504, 1505, 782, 217, 1506, 1507, 31, 1822, 1822,
+ 3, 1602, 1603, 1604, 1826, 1828, 1539, 136, 1542, 1538,
+ 454, 561, 1570, 296, 8, 28, 30, 32, 251, 1574,
+ 1575, 1788, 1816, 151, 65, 1575, 1567, 1387, 1826, 1387,
+ 1388, 1388, 1371, 1717, 393, 1722, 1786, 1826, 1826, 1579,
+ 1582, 47, 57, 99, 203, 1399, 1888, 42, 42, 1820,
+ 99, 386, 1065, 1066, 1078, 1079, 1174, 408, 863, 1826,
+ 1398, 3, 863, 1812, 583, 1829, 1830, 1831, 1930, 1934,
+ 1622, 1272, 413, 489, 862, 1812, 743, 1302, 1303, 1617,
+ 787, 870, 873, 874, 1399, 973, 311, 968, 970, 2000,
+ 2016, 2017, 427, 807, 1616, 127, 364, 448, 450, 540,
+ 614, 782, 1318, 1319, 1320, 2091, 779, 1149, 1150, 1152,
+ 1152, 391, 1150, 1158, 1160, 779, 1145, 1146, 1150, 224,
+ 1145, 1158, 57, 71, 73, 306, 341, 359, 730, 1133,
+ 1138, 1140, 1160, 1166, 1175, 1177, 1133, 1158, 1133, 1145,
+ 779, 1158, 1133, 1152, 1152, 1133, 1152, 779, 1145, 1158,
+ 71, 307, 307, 310, 1145, 1152, 779, 890, 1152, 1152,
+ 1152, 1152, 1152, 15, 787, 893, 1145, 310, 1152, 1152,
+ 1152, 1152, 1152, 779, 1146, 1154, 127, 1826, 127, 352,
+ 1993, 2088, 2089, 786, 786, 1812, 54, 1676, 1619, 1620,
+ 1813, 1826, 127, 1381, 1382, 1538, 782, 1681, 787, 1689,
+ 120, 1826, 862, 787, 1914, 1917, 1831, 1929, 1616, 1615,
+ 1612, 177, 2010, 643, 976, 704, 780, 333, 1831, 333,
+ 333, 1930, 214, 226, 281, 463, 861, 1918, 353, 393,
+ 436, 441, 452, 453, 607, 617, 628, 634, 665, 669,
+ 698, 1922, 1924, 1802, 1803, 1816, 961, 141, 1267, 479,
+ 735, 1399, 1756, 1756, 1338, 506, 1767, 53, 763, 1534,
+ 1535, 1536, 572, 746, 782, 1891, 44, 945, 311, 1826,
+ 561, 128, 154, 945, 311, 779, 953, 177, 786, 787,
+ 1996, 935, 782, 985, 983, 988, 984, 2097, 2096, 1616,
+ 3, 1458, 1828, 787, 779, 47, 1466, 1537, 1466, 1466,
+ 1399, 1476, 114, 311, 427, 1399, 1472, 1399, 106, 1466,
+ 1537, 780, 24, 25, 26, 28, 30, 32, 780, 1587,
+ 1591, 1592, 1399, 1399, 1809, 780, 1363, 1364, 1373, 1793,
+ 92, 93, 94, 95, 138, 139, 140, 189, 190, 253,
+ 316, 411, 478, 544, 546, 552, 612, 656, 748, 759,
+ 1531, 1532, 1399, 106, 1459, 1459, 1446, 1399, 1399, 1399,
+ 1531, 1399, 1399, 1399, 1816, 1474, 336, 782, 787, 106,
+ 1466, 1399, 106, 1466, 1399, 1399, 1399, 1399, 1399, 780,
+ 1402, 780, 1399, 1399, 780, 648, 1466, 1466, 106, 1466,
+ 780, 1587, 1466, 1466, 1399, 1399, 1428, 1429, 1430, 64,
+ 163, 288, 1399, 1418, 1419, 1420, 1399, 1399, 106, 1466,
+ 1399, 1399, 1399, 1414, 1415, 1399, 1399, 1471, 1472, 1399,
+ 1399, 409, 410, 713, 716, 1533, 1399, 1399, 1472, 1812,
+ 1399, 1399, 127, 1812, 1471, 1399, 127, 1399, 1399, 1812,
+ 1399, 1399, 1532, 1532, 1399, 1418, 1399, 780, 8, 787,
+ 1810, 1826, 1399, 1471, 1399, 1399, 1399, 780, 782, 1364,
+ 1399, 787, 1399, 1399, 1399, 1401, 122, 201, 290, 732,
+ 1405, 47, 340, 1401, 1408, 1401, 779, 1374, 1401, 1401,
+ 167, 55, 151, 167, 238, 1402, 1402, 1402, 1402, 1402,
+ 1402, 1402, 153, 1402, 153, 1402, 1402, 1402, 1402, 1402,
+ 1172, 1828, 1424, 779, 1455, 1548, 1826, 779, 136, 328,
+ 329, 330, 1816, 1434, 461, 493, 567, 648, 1416, 169,
+ 229, 505, 703, 1011, 1015, 1750, 1820, 914, 410, 713,
+ 716, 913, 1456, 1790, 1809, 782, 287, 1328, 1329, 1812,
+ 945, 782, 127, 1831, 1830, 1931, 861, 1918, 770, 1390,
+ 1391, 1393, 468, 506, 661, 1862, 1647, 1917, 1826, 73,
+ 1399, 1881, 1880, 1879, 787, 787, 1647, 782, 1853, 232,
+ 492, 1882, 1883, 1884, 1885, 1826, 1872, 99, 717, 1816,
+ 1855, 1867, 1857, 1858, 1860, 1871, 688, 127, 770, 1068,
+ 63, 862, 862, 1812, 862, 318, 862, 862, 862, 1812,
+ 1831, 1812, 1392, 1392, 376, 688, 1713, 862, 1713, 1708,
+ 376, 688, 1713, 151, 1711, 510, 553, 688, 1705, 1705,
+ 1713, 1826, 862, 1713, 1830, 1708, 1713, 1820, 490, 701,
+ 451, 127, 1699, 782, 435, 688, 1812, 1710, 1708, 1708,
+ 127, 1713, 1713, 1713, 1480, 1664, 1812, 1393, 1656, 1658,
+ 779, 1651, 2009, 782, 779, 1800, 154, 1635, 885, 427,
+ 3, 151, 782, 217, 1343, 1345, 1346, 448, 614, 1291,
+ 363, 239, 1399, 800, 99, 143, 803, 1399, 1659, 1660,
+ 510, 510, 510, 510, 360, 510, 817, 510, 782, 1392,
+ 1727, 1828, 913, 923, 782, 763, 1535, 1901, 120, 676,
+ 1399, 1293, 1616, 287, 1748, 817, 1744, 1826, 47, 1278,
+ 627, 683, 1285, 1286, 127, 819, 820, 673, 1282, 819,
+ 1891, 1786, 596, 1988, 1828, 833, 1826, 827, 1914, 1930,
+ 1828, 1068, 1068, 822, 1812, 1068, 862, 2077, 1393, 1973,
+ 847, 1393, 1068, 1068, 1068, 743, 1493, 782, 780, 780,
+ 780, 780, 780, 782, 780, 1477, 47, 53, 55, 128,
+ 1384, 1536, 158, 158, 210, 1516, 166, 249, 1504, 1516,
+ 1477, 1495, 779, 1383, 1607, 1828, 782, 787, 1399, 65,
+ 137, 1540, 1542, 251, 649, 1571, 1575, 572, 668, 746,
+ 1389, 1816, 439, 251, 577, 782, 787, 664, 1564, 649,
+ 1571, 1596, 1399, 2024, 2025, 1227, 1648, 1066, 73, 1166,
+ 418, 191, 231, 268, 386, 398, 498, 568, 865, 867,
+ 1631, 1828, 1631, 1235, 779, 480, 242, 782, 1938, 1812,
+ 1232, 1231, 1812, 782, 595, 1304, 1826, 872, 780, 782,
+ 283, 945, 970, 886, 68, 108, 142, 179, 481, 511,
+ 512, 514, 515, 516, 517, 518, 520, 521, 522, 523,
+ 524, 525, 526, 527, 529, 530, 531, 532, 625, 626,
+ 808, 809, 816, 127, 1321, 734, 1617, 1319, 779, 896,
+ 24, 28, 30, 32, 1158, 1157, 1647, 1158, 30, 295,
+ 317, 666, 1147, 1148, 1148, 1175, 99, 1172, 1158, 1133,
+ 1176, 1177, 1167, 57, 73, 391, 1161, 1148, 1222, 1786,
+ 1158, 1222, 1148, 310, 1148, 1158, 888, 889, 2007, 2020,
+ 42, 99, 1993, 2014, 1133, 1133, 1148, 252, 723, 1826,
+ 2014, 237, 1144, 1176, 57, 1178, 1133, 1158, 1148, 30,
+ 1148, 895, 26, 769, 903, 904, 1584, 1586, 2104, 1506,
+ 703, 782, 1683, 787, 1689, 222, 1562, 1563, 1688, 128,
+ 770, 1826, 203, 1826, 782, 782, 67, 244, 1273, 1616,
+ 1616, 886, 779, 947, 950, 287, 314, 1913, 63, 770,
+ 1812, 1826, 1928, 1928, 780, 782, 1999, 2016, 1635, 1399,
+ 1831, 1339, 1340, 1341, 1342, 1812, 146, 144, 321, 463,
+ 1817, 1823, 1832, 1837, 1838, 1839, 1840, 1841, 1842, 1843,
+ 1846, 2002, 178, 232, 755, 1895, 1586, 1894, 940, 945,
+ 154, 649, 1826, 937, 945, 947, 948, 952, 1826, 872,
+ 1826, 977, 979, 980, 2008, 2084, 2104, 1891, 1862, 42,
+ 1816, 1399, 780, 1467, 780, 780, 283, 427, 1399, 1399,
+ 53, 299, 780, 299, 782, 1442, 780, 770, 780, 782,
+ 782, 780, 780, 1364, 128, 780, 1444, 1445, 1399, 782,
+ 782, 782, 769, 780, 782, 780, 782, 782, 780, 779,
+ 1809, 1816, 1466, 780, 780, 1466, 780, 782, 782, 780,
+ 780, 780, 151, 782, 782, 780, 780, 1466, 780, 780,
+ 780, 780, 782, 128, 782, 780, 128, 1399, 128, 1399,
+ 128, 1399, 128, 780, 782, 780, 1466, 780, 780, 782,
+ 782, 780, 782, 782, 782, 780, 780, 780, 782, 780,
+ 780, 782, 780, 780, 780, 1812, 780, 780, 780, 1812,
+ 782, 780, 782, 782, 780, 782, 782, 782, 780, 780,
+ 782, 1816, 1826, 780, 787, 53, 504, 782, 1189, 780,
+ 780, 1531, 1531, 1472, 780, 785, 1816, 122, 201, 290,
+ 732, 779, 50, 1399, 434, 1401, 1401, 779, 1374, 1401,
+ 1401, 1399, 1399, 1549, 217, 1551, 779, 779, 779, 779,
+ 779, 787, 1393, 1438, 1439, 1440, 378, 779, 1020, 1021,
+ 1013, 1020, 1014, 591, 1023, 160, 472, 1399, 763, 1831,
+ 1831, 782, 1891, 427, 131, 1917, 128, 782, 1928, 1928,
+ 782, 1399, 1807, 1816, 787, 787, 787, 99, 144, 321,
+ 463, 577, 750, 1817, 1820, 1825, 1834, 1837, 1838, 1839,
+ 1840, 1842, 1843, 1846, 2002, 1875, 127, 1647, 99, 1172,
+ 1173, 1831, 31, 578, 593, 1887, 1888, 1826, 1826, 1864,
+ 1863, 127, 580, 755, 504, 782, 782, 1647, 1888, 787,
+ 1856, 787, 1647, 782, 782, 1859, 1399, 780, 1826, 862,
+ 862, 1820, 1399, 862, 1713, 1713, 862, 1713, 1820, 128,
+ 1712, 859, 1713, 613, 1573, 1698, 1711, 819, 1708, 1812,
+ 1713, 1713, 1399, 258, 1506, 1660, 780, 782, 1652, 886,
+ 1797, 1801, 1803, 53, 1636, 1637, 2092, 2105, 1828, 99,
+ 1336, 1826, 1334, 1812, 1006, 1345, 145, 160, 1198, 1347,
+ 801, 782, 100, 1737, 817, 1732, 1616, 1733, 921, 924,
+ 925, 920, 573, 574, 650, 922, 454, 561, 1826, 1902,
+ 1903, 1820, 1616, 448, 614, 736, 1296, 1297, 1298, 1586,
+ 47, 1747, 670, 782, 365, 1277, 1694, 782, 127, 1989,
+ 1064, 1065, 299, 723, 1210, 1826, 314, 1912, 1938, 844,
+ 1826, 1826, 1812, 824, 862, 2046, 2047, 862, 2072, 1068,
+ 1068, 1812, 862, 1826, 862, 1068, 1399, 1477, 1477, 785,
+ 576, 713, 717, 1379, 1380, 1426, 1380, 158, 1516, 1516,
+ 1508, 158, 203, 299, 1530, 1826, 1535, 1166, 1169, 1603,
+ 1826, 1399, 1543, 1808, 1541, 750, 1545, 1540, 314, 580,
+ 1572, 1571, 507, 1586, 1575, 1576, 439, 1575, 1575, 1816,
+ 549, 1565, 1808, 123, 779, 1888, 1888, 1064, 1820, 1648,
+ 1648, 557, 268, 268, 657, 1820, 268, 268, 268, 182,
+ 360, 406, 484, 547, 563, 564, 568, 569, 570, 636,
+ 686, 840, 841, 88, 476, 586, 593, 599, 674, 735,
+ 845, 846, 65, 314, 742, 1932, 270, 369, 494, 566,
+ 695, 756, 1926, 1927, 1934, 314, 1941, 1891, 203, 855,
+ 1240, 779, 1966, 1230, 1303, 127, 871, 1399, 2000, 971,
+ 763, 763, 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 763, 763, 763, 763, 763,
+ 763, 763, 763, 763, 763, 782, 819, 734, 877, 878,
+ 1826, 2067, 2068, 2069, 156, 780, 780, 780, 780, 1826,
+ 782, 317, 295, 99, 1172, 1157, 780, 782, 780, 780,
+ 782, 144, 1128, 1817, 1837, 1838, 1839, 1840, 1841, 1846,
+ 1399, 1399, 2014, 2014, 787, 763, 1178, 209, 265, 269,
+ 901, 902, 903, 906, 1405, 1826, 24, 25, 28, 30,
+ 32, 427, 1380, 1620, 1826, 299, 1826, 576, 168, 1577,
+ 1480, 787, 1689, 1812, 1917, 1831, 1891, 427, 897, 898,
+ 951, 34, 1930, 333, 787, 787, 287, 287, 1802, 962,
+ 1636, 782, 1343, 1345, 1822, 755, 506, 392, 941, 154,
+ 938, 949, 780, 782, 787, 1997, 986, 975, 981, 1827,
+ 981, 981, 2098, 427, 1825, 1399, 782, 1399, 1399, 283,
+ 57, 71, 96, 109, 125, 153, 155, 295, 307, 409,
+ 410, 559, 666, 716, 739, 1130, 1468, 1469, 1470, 1167,
+ 1167, 1468, 1472, 780, 153, 153, 1399, 1472, 1472, 782,
+ 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1402, 787, 780,
+ 780, 1399, 1399, 1399, 1399, 1399, 780, 1399, 1399, 1399,
+ 1399, 128, 1399, 128, 1399, 128, 1399, 153, 1399, 780,
+ 1415, 1399, 1414, 1472, 1399, 1399, 1399, 1472, 28, 768,
+ 1584, 1588, 153, 1399, 1399, 1399, 1399, 1399, 787, 787,
+ 1826, 57, 71, 1184, 1185, 1186, 1187, 1188, 1587, 1586,
+ 780, 769, 769, 1373, 1401, 780, 782, 1401, 50, 1399,
+ 434, 1531, 1531, 1550, 1826, 65, 780, 1452, 1471, 1399,
+ 1430, 1471, 1399, 1420, 1471, 1471, 1816, 1399, 780, 782,
+ 779, 1029, 1402, 1021, 168, 1059, 1060, 1587, 697, 1024,
+ 338, 1016, 1012, 913, 287, 1329, 287, 241, 584, 1929,
+ 1830, 128, 128, 1391, 1394, 1394, 787, 787, 787, 1647,
+ 1399, 1831, 1874, 1647, 779, 779, 1647, 1647, 1888, 792,
+ 232, 632, 659, 1886, 1884, 1883, 1873, 1826, 1882, 1826,
+ 1868, 1857, 1858, 1867, 433, 747, 1584, 1589, 1703, 30,
+ 1712, 1538, 1708, 1669, 1670, 1810, 1381, 1394, 1393, 1655,
+ 1657, 1660, 427, 780, 779, 1629, 1618, 1812, 786, 321,
+ 1993, 2028, 1344, 779, 1660, 763, 819, 127, 314, 1728,
+ 1729, 763, 782, 36, 37, 454, 499, 561, 604, 763,
+ 764, 765, 1904, 1906, 1538, 127, 128, 1299, 1297, 819,
+ 1286, 1820, 733, 1287, 110, 642, 1993, 2005, 1586, 545,
+ 358, 472, 652, 1216, 1216, 203, 1210, 333, 1941, 126,
+ 203, 203, 823, 839, 840, 2046, 2080, 386, 867, 1993,
+ 2043, 2044, 2045, 2073, 1974, 862, 834, 2079, 641, 2078,
+ 1812, 782, 1380, 31, 1402, 50, 287, 1477, 1508, 158,
+ 158, 1477, 1508, 1498, 1499, 780, 782, 1525, 1526, 1168,
+ 1608, 16, 17, 782, 1544, 51, 104, 1566, 1399, 1455,
+ 1546, 1547, 1545, 712, 1572, 1576, 1389, 782, 1566, 1570,
+ 1393, 1597, 1598, 1599, 1173, 1168, 408, 408, 413, 489,
+ 1648, 1648, 65, 1648, 1650, 1648, 182, 547, 314, 1648,
+ 1649, 1649, 841, 1236, 1820, 1820, 1820, 1820, 1586, 1820,
+ 1820, 780, 782, 31, 593, 1828, 1935, 1936, 31, 31,
+ 31, 50, 1925, 533, 534, 537, 538, 539, 1939, 1940,
+ 331, 593, 1239, 1225, 390, 654, 240, 1241, 1826, 1967,
+ 53, 1966, 47, 378, 1305, 872, 283, 779, 779, 1586,
+ 779, 1586, 1586, 1820, 1820, 1589, 1820, 1586, 1820, 1820,
+ 1820, 1820, 1820, 1820, 1820, 1586, 1820, 404, 568, 671,
+ 1791, 122, 290, 1586, 1594, 1820, 1586, 809, 780, 782,
+ 148, 151, 212, 881, 1993, 2015, 649, 927, 1128, 898,
+ 30, 1176, 1786, 1176, 888, 1826, 30, 782, 2092, 461,
+ 787, 1480, 1689, 1392, 251, 1575, 245, 1685, 1538, 1891,
+ 1273, 177, 899, 780, 1399, 950, 314, 1943, 584, 770,
+ 770, 1930, 1930, 113, 114, 115, 963, 1626, 1341, 1812,
+ 1345, 143, 1348, 1763, 1399, 948, 1826, 872, 2010, 352,
+ 975, 787, 1399, 1399, 1152, 1152, 1145, 1154, 95, 155,
+ 1150, 1149, 1151, 1153, 1152, 155, 1153, 1150, 780, 780,
+ 780, 780, 1443, 1399, 1399, 780, 206, 1461, 1461, 1399,
+ 782, 782, 780, 782, 780, 780, 780, 151, 1435, 1436,
+ 1816, 780, 780, 780, 780, 780, 782, 127, 782, 1399,
+ 1399, 1399, 1399, 780, 780, 53, 1409, 780, 53, 780,
+ 780, 780, 28, 30, 30, 780, 782, 1399, 780, 780,
+ 782, 782, 780, 1816, 1826, 787, 779, 1179, 1179, 51,
+ 104, 643, 768, 1181, 1182, 1183, 782, 782, 1399, 1399,
+ 780, 1472, 1401, 780, 782, 1401, 1551, 1543, 206, 1454,
+ 780, 780, 780, 780, 780, 780, 779, 1394, 1440, 1017,
+ 1018, 1019, 1826, 780, 1589, 153, 65, 779, 1031, 763,
+ 779, 1021, 1831, 1812, 128, 1931, 1931, 53, 1395, 1820,
+ 1826, 770, 1816, 1826, 1826, 1876, 1888, 1887, 31, 31,
+ 1866, 1865, 387, 726, 232, 1888, 1647, 1647, 1888, 24,
+ 25, 28, 30, 32, 1573, 1704, 1713, 782, 1667, 1647,
+ 1535, 1660, 780, 782, 177, 1363, 11, 12, 258, 1001,
+ 1363, 1638, 1640, 1643, 1506, 311, 2029, 2030, 779, 225,
+ 1527, 1528, 1529, 1826, 779, 1730, 232, 250, 362, 370,
+ 385, 395, 396, 397, 405, 543, 555, 640, 655, 693,
+ 707, 926, 925, 1905, 1573, 734, 554, 513, 816, 1288,
+ 690, 690, 1812, 203, 1830, 1239, 408, 1812, 1812, 11,
+ 13, 18, 145, 167, 215, 272, 273, 274, 292, 346,
+ 348, 368, 386, 393, 408, 415, 430, 487, 497, 535,
+ 548, 587, 593, 651, 658, 690, 705, 706, 718, 997,
+ 999, 1070, 1072, 1073, 1075, 1077, 1078, 1079, 1086, 1817,
+ 1070, 2081, 53, 156, 2037, 1820, 2043, 779, 882, 1993,
+ 2032, 2034, 862, 848, 1966, 779, 884, 2032, 2033, 96,
+ 155, 234, 692, 1084, 2033, 835, 1494, 1380, 1380, 203,
+ 1501, 1508, 1508, 203, 1503, 1399, 779, 1006, 1826, 1523,
+ 1524, 378, 1770, 1808, 53, 782, 1808, 1571, 1575, 1399,
+ 780, 782, 1588, 1588, 1588, 1588, 1588, 1588, 1631, 846,
+ 31, 53, 299, 1933, 1937, 208, 1926, 1586, 1586, 1586,
+ 1791, 768, 1584, 1585, 1939, 173, 294, 1237, 446, 46,
+ 48, 49, 70, 72, 78, 110, 173, 204, 206, 217,
+ 240, 338, 375, 419, 420, 426, 438, 459, 483, 550,
+ 618, 629, 630, 631, 722, 1004, 1071, 1073, 1244, 1249,
+ 1251, 1254, 1260, 1261, 1262, 1264, 1265, 1559, 1405, 1949,
+ 342, 437, 849, 287, 419, 426, 851, 780, 782, 1968,
+ 1969, 53, 47, 779, 1306, 2000, 812, 813, 1586, 814,
+ 815, 1586, 810, 811, 1586, 2068, 212, 890, 15, 787,
+ 780, 902, 1826, 1538, 1826, 439, 251, 1686, 1682, 1349,
+ 1793, 131, 1938, 1938, 960, 1999, 960, 1638, 1348, 502,
+ 143, 328, 1769, 1998, 987, 2104, 1826, 1176, 1151, 1176,
+ 1176, 780, 1531, 1531, 65, 256, 1460, 168, 1463, 1464,
+ 780, 1399, 1399, 1472, 193, 357, 780, 314, 1437, 1399,
+ 1399, 1399, 1531, 96, 109, 125, 155, 234, 295, 409,
+ 410, 558, 559, 716, 1138, 1139, 1410, 1411, 1412, 1413,
+ 1468, 1594, 1531, 1399, 1399, 1826, 1587, 780, 1189, 1184,
+ 1182, 1184, 1185, 1586, 780, 1472, 206, 1552, 65, 780,
+ 1471, 1395, 780, 782, 347, 1062, 1399, 1015, 217, 1032,
+ 1033, 1034, 1587, 1017, 1931, 1820, 1826, 787, 1647, 1647,
+ 1888, 780, 780, 1888, 1888, 1870, 1869, 1573, 1670, 1538,
+ 99, 1659, 1525, 1394, 1660, 780, 1641, 1642, 1805, 1806,
+ 1810, 1826, 1793, 1639, 1685, 1643, 2031, 2030, 47, 1250,
+ 1258, 1259, 1826, 780, 782, 1589, 1738, 1739, 447, 173,
+ 779, 763, 782, 826, 1812, 754, 830, 832, 75, 594,
+ 787, 1087, 1088, 1089, 1090, 1098, 1099, 1104, 1105, 1106,
+ 1198, 1201, 1202, 1811, 1826, 167, 741, 418, 1812, 1648,
+ 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 418,
+ 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648, 1648,
+ 421, 541, 1826, 1648, 1648, 1002, 1003, 1004, 782, 1072,
+ 998, 1647, 2037, 226, 463, 1993, 2063, 2064, 2065, 883,
+ 864, 54, 335, 995, 203, 53, 875, 876, 247, 676,
+ 247, 1966, 22, 29, 31, 1478, 1500, 299, 1502, 299,
+ 1530, 143, 298, 459, 1518, 1519, 1522, 117, 118, 205,
+ 282, 1771, 1772, 170, 1773, 1566, 1548, 1547, 1566, 1572,
+ 1571, 1394, 1599, 593, 1820, 1935, 30, 30, 593, 99,
+ 153, 560, 1238, 75, 217, 384, 594, 702, 1090, 1098,
+ 1099, 1266, 1198, 1266, 217, 1266, 217, 217, 281, 287,
+ 75, 126, 217, 594, 702, 1103, 1198, 1266, 1648, 217,
+ 65, 1006, 53, 287, 384, 763, 1198, 1275, 1648, 217,
+ 159, 705, 159, 217, 705, 1266, 217, 592, 217, 217,
+ 217, 1071, 782, 1003, 1249, 779, 1089, 603, 1399, 1399,
+ 203, 855, 862, 203, 386, 856, 1826, 1631, 1363, 1968,
+ 1307, 485, 780, 782, 780, 782, 780, 782, 252, 1826,
+ 1684, 128, 439, 1390, 1631, 584, 314, 1942, 1942, 203,
+ 1661, 154, 872, 981, 427, 780, 780, 1462, 1808, 1786,
+ 1463, 1465, 1574, 780, 780, 782, 780, 498, 549, 613,
+ 780, 780, 1145, 155, 1153, 71, 1153, 1176, 780, 780,
+ 782, 780, 780, 780, 1180, 780, 782, 780, 65, 229,
+ 251, 1553, 1554, 1808, 780, 1019, 1531, 160, 472, 780,
+ 782, 1035, 780, 770, 1878, 1877, 1888, 1888, 819, 1562,
+ 406, 1798, 780, 782, 787, 1364, 1645, 1646, 1810, 1631,
+ 901, 780, 782, 1528, 780, 782, 50, 1740, 1657, 1820,
+ 816, 779, 828, 1828, 779, 779, 1221, 1811, 10, 127,
+ 1100, 1826, 780, 782, 72, 126, 225, 293, 1102, 1197,
+ 1104, 1068, 1198, 1199, 1199, 1107, 787, 1812, 1648, 99,
+ 1586, 1593, 99, 1586, 99, 1586, 99, 1586, 1074, 1589,
+ 1586, 1586, 1820, 1820, 1648, 1586, 1828, 454, 499, 568,
+ 1083, 1586, 1589, 1589, 99, 1586, 1820, 99, 389, 391,
+ 425, 455, 588, 622, 1082, 1593, 1586, 1593, 1000, 1769,
+ 1072, 1070, 26, 28, 30, 32, 99, 1590, 1591, 1820,
+ 1826, 226, 463, 892, 1817, 1837, 1840, 1841, 1846, 2049,
+ 2050, 2051, 2057, 2062, 2065, 2018, 2055, 2018, 2053, 427,
+ 2065, 879, 880, 2068, 865, 866, 1949, 2074, 101, 150,
+ 296, 996, 654, 1968, 780, 877, 1979, 1980, 1820, 1979,
+ 53, 31, 378, 1481, 1399, 779, 1399, 779, 780, 1198,
+ 1198, 1519, 65, 65, 117, 65, 1772, 271, 282, 1774,
+ 1775, 1572, 779, 446, 30, 331, 141, 1068, 141, 1067,
+ 741, 1067, 1621, 1621, 1324, 1621, 1250, 1259, 1812, 1166,
+ 1621, 160, 1622, 10, 1621, 741, 225, 1621, 1621, 99,
+ 1826, 1324, 1560, 1561, 1810, 1005, 1621, 1621, 1812, 99,
+ 1826, 1324, 1259, 1621, 1324, 1324, 1324, 1250, 46, 78,
+ 110, 1262, 1085, 1087, 335, 454, 1274, 1531, 669, 1820,
+ 422, 1242, 314, 1970, 1631, 1310, 1826, 47, 779, 1308,
+ 813, 815, 811, 15, 787, 1631, 1402, 131, 1939, 1944,
+ 1945, 424, 1685, 281, 975, 782, 1566, 780, 1399, 549,
+ 445, 1589, 780, 1586, 1565, 780, 55, 403, 410, 713,
+ 716, 725, 1555, 1556, 1790, 1566, 685, 1061, 1016, 779,
+ 1022, 1034, 1036, 1826, 1888, 1888, 1577, 1799, 1805, 770,
+ 1826, 780, 782, 1647, 283, 1259, 1739, 419, 780, 1218,
+ 1220, 1826, 779, 583, 1218, 1218, 779, 1826, 1088, 779,
+ 160, 160, 1199, 1068, 236, 1191, 1221, 1826, 1068, 1068,
+ 660, 927, 1108, 1129, 1131, 1826, 780, 1820, 779, 1820,
+ 53, 1063, 1002, 2055, 2053, 786, 2082, 2051, 2062, 2057,
+ 2052, 786, 2052, 786, 2013, 780, 782, 105, 2037, 203,
+ 849, 864, 2070, 1128, 2070, 1968, 779, 780, 1530, 1530,
+ 127, 1517, 1517, 1786, 1786, 65, 1786, 65, 65, 1775,
+ 31, 1238, 411, 1237, 1405, 1324, 1405, 1100, 1826, 1811,
+ 1250, 1811, 1246, 287, 1248, 1168, 1811, 1621, 1258, 127,
+ 160, 1811, 1811, 1250, 782, 1566, 1009, 1826, 1811, 1587,
+ 314, 1106, 1250, 1255, 1250, 780, 1826, 850, 857, 858,
+ 72, 361, 506, 780, 782, 1309, 252, 723, 1826, 287,
+ 584, 1945, 1662, 1631, 1812, 1808, 780, 780, 780, 725,
+ 1556, 1557, 1790, 649, 601, 440, 1558, 601, 1790, 1062,
+ 779, 1029, 1025, 99, 303, 304, 403, 475, 1037, 1668,
+ 1803, 787, 1646, 1660, 2016, 367, 780, 782, 1566, 779,
+ 1218, 779, 780, 780, 1826, 779, 1399, 1068, 1221, 1826,
+ 1812, 299, 1209, 723, 1221, 1221, 1110, 787, 1101, 1102,
+ 1109, 787, 1733, 1001, 1000, 2037, 2060, 2037, 2058, 352,
+ 427, 2048, 1826, 1826, 862, 1993, 2035, 2068, 2039, 2040,
+ 1393, 854, 855, 2071, 2035, 2035, 195, 1482, 1483, 1826,
+ 1535, 780, 780, 136, 158, 206, 1521, 1520, 1786, 1786,
+ 1786, 780, 120, 1252, 120, 144, 196, 1217, 110, 258,
+ 1106, 1318, 281, 287, 73, 1811, 1826, 1273, 1245, 1561,
+ 287, 287, 281, 1274, 1256, 1258, 1247, 685, 852, 2092,
+ 584, 72, 72, 1826, 225, 1311, 1312, 1826, 15, 1402,
+ 160, 1506, 1566, 458, 50, 458, 136, 403, 568, 712,
+ 1027, 1028, 1826, 780, 696, 1030, 1039, 711, 145, 386,
+ 393, 408, 535, 548, 565, 705, 1053, 1054, 1055, 1058,
+ 1075, 1707, 1631, 244, 770, 1891, 1220, 30, 782, 1219,
+ 845, 1891, 1891, 782, 1826, 780, 1221, 1209, 723, 779,
+ 1192, 1216, 1091, 1216, 1093, 1094, 18, 225, 293, 386,
+ 495, 752, 1075, 1111, 1112, 1121, 1163, 1164, 1165, 1190,
+ 1405, 1131, 73, 99, 201, 203, 346, 465, 660, 1115,
+ 1117, 1155, 1156, 1164, 1826, 780, 1076, 1077, 2018, 786,
+ 2018, 786, 2104, 2083, 2056, 2054, 2035, 2084, 1975, 851,
+ 2037, 218, 780, 782, 1484, 65, 65, 779, 779, 1811,
+ 591, 779, 1253, 144, 99, 99, 1274, 1812, 217, 1173,
+ 1324, 1826, 1811, 1812, 1257, 1296, 1399, 428, 853, 6,
+ 842, 584, 584, 780, 782, 723, 296, 1764, 1557, 649,
+ 209, 323, 780, 782, 1587, 779, 1041, 1043, 1038, 418,
+ 1648, 1648, 418, 1648, 1648, 1648, 1648, 779, 1048, 1055,
+ 430, 299, 386, 497, 723, 744, 1075, 1203, 1206, 1211,
+ 1212, 1213, 1217, 1566, 780, 1826, 780, 780, 314, 1204,
+ 1208, 1212, 1215, 1205, 1207, 1212, 1214, 1826, 782, 1097,
+ 1095, 1216, 1193, 1826, 180, 1194, 779, 1092, 779, 779,
+ 160, 1820, 702, 1164, 741, 160, 201, 1172, 19, 20,
+ 768, 769, 779, 1125, 1126, 1127, 1374, 1421, 1789, 296,
+ 339, 99, 53, 391, 1156, 1162, 2061, 2059, 427, 2013,
+ 2034, 2033, 2041, 1812, 856, 2039, 1478, 1483, 127, 1132,
+ 1134, 1135, 1136, 1486, 1487, 1527, 1529, 1102, 1587, 1032,
+ 1127, 1006, 1034, 1006, 154, 1399, 1312, 1663, 1169, 1026,
+ 1028, 779, 1042, 1043, 1044, 182, 1040, 1043, 1648, 1820,
+ 1820, 1648, 1590, 1590, 1587, 1828, 697, 1049, 1050, 1648,
+ 1216, 1820, 1648, 1216, 1263, 1264, 1265, 1213, 752, 1891,
+ 589, 1263, 1215, 1263, 1214, 780, 1826, 779, 779, 1096,
+ 780, 782, 462, 590, 667, 203, 1195, 1218, 779, 1218,
+ 1218, 426, 1159, 1791, 1791, 1124, 198, 737, 649, 1125,
+ 1157, 1155, 2039, 2039, 2035, 864, 247, 352, 127, 422,
+ 842, 1485, 207, 120, 218, 780, 780, 780, 779, 1671,
+ 1672, 1810, 1765, 1030, 780, 782, 182, 1046, 1047, 1402,
+ 1820, 1820, 1051, 780, 782, 1080, 1828, 1586, 1265, 1264,
+ 585, 1203, 1817, 780, 1218, 1218, 779, 1826, 101, 296,
+ 780, 1218, 780, 780, 780, 779, 1396, 427, 686, 1116,
+ 1826, 1993, 2036, 2036, 1979, 2104, 1393, 857, 1481, 218,
+ 1478, 1032, 782, 1647, 251, 1776, 1043, 782, 1045, 1052,
+ 1828, 1050, 1263, 780, 1219, 1218, 67, 244, 258, 568,
+ 1196, 1196, 1203, 780, 1204, 1205, 780, 1587, 1113, 1114,
+ 1163, 1113, 595, 691, 745, 1118, 864, 2042, 1976, 1478,
+ 99, 201, 432, 1488, 1489, 1490, 1491, 780, 1672, 1660,
+ 480, 1770, 1047, 780, 1056, 1057, 1058, 1191, 780, 1219,
+ 99, 201, 332, 203, 203, 1203, 780, 1163, 1119, 1120,
+ 1121, 427, 112, 24, 25, 28, 30, 1478, 1479, 203,
+ 1489, 1491, 1489, 1490, 65, 1773, 1058, 1203, 780, 296,
+ 101, 1121, 649, 116, 432, 203, 203, 1786, 143, 1777,
+ 1203, 1196, 1196, 1977, 30, 779, 1779, 457, 600, 1971,
+ 1972, 170, 251, 1778, 3, 780, 1780, 1781, 1810, 258,
+ 1782, 1828, 1978, 1828, 780, 782, 1783, 1784, 1810, 1631,
+ 2092, 1781, 782, 1647, 842, 1784, 1393, 1660, 1394
+};
+
+/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
+static const yytype_int16 yyr1[] =
+{
+ 0, 788, 789, 790, 789, 789, 791, 791, 792, 792,
+ 792, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 793, 793, 793, 793, 793, 793, 793, 793, 793,
+ 793, 794, 795, 795, 797, 796, 798, 799, 800, 798,
+ 801, 802, 801, 803, 803, 805, 804, 807, 806, 808,
+ 808, 809, 809, 809, 809, 809, 809, 809, 809, 809,
+ 809, 809, 809, 809, 809, 809, 809, 809, 809, 809,
+ 809, 810, 810, 810, 811, 812, 812, 812, 813, 814,
+ 814, 814, 815, 816, 816, 816, 816, 816, 816, 816,
+ 816, 817, 817, 818, 819, 819, 820, 822, 823, 821,
+ 824, 821, 825, 826, 821, 827, 828, 821, 829, 830,
+ 821, 831, 832, 821, 833, 821, 834, 821, 835, 821,
+ 836, 821, 837, 821, 821, 821, 838, 821, 821, 839,
+ 839, 840, 840, 841, 841, 841, 841, 841, 841, 841,
+ 841, 841, 841, 841, 841, 841, 841, 842, 842, 844,
+ 843, 845, 845, 846, 846, 846, 846, 846, 846, 846,
+ 848, 847, 850, 849, 849, 851, 851, 851, 851, 852,
+ 852, 853, 853, 854, 854, 855, 856, 856, 858, 857,
+ 859, 860, 860, 861, 861, 861, 861, 862, 862, 863,
+ 863, 864, 864, 865, 865, 865, 865, 865, 865, 865,
+ 866, 866, 867, 867, 869, 868, 870, 868, 871, 868,
+ 872, 872, 873, 873, 874, 874, 875, 876, 875, 877,
+ 877, 878, 879, 879, 880, 880, 881, 881, 881, 883,
+ 882, 884, 885, 885, 886, 886, 887, 887, 887, 888,
+ 889, 889, 890, 891, 893, 892, 892, 892, 895, 894,
+ 896, 896, 897, 899, 898, 900, 900, 900, 900, 901,
+ 901, 902, 903, 903, 904, 905, 905, 906, 906, 906,
+ 906, 906, 906, 907, 907, 908, 909, 909, 910, 910,
+ 911, 911, 912, 912, 913, 913, 913, 914, 914, 914,
+ 914, 914, 914, 914, 914, 914, 914, 914, 914, 914,
+ 915, 916, 917, 917, 918, 918, 919, 919, 920, 921,
+ 921, 922, 922, 922, 923, 924, 924, 925, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 927, 927, 928, 928, 930, 929, 932, 931,
+ 933, 933, 935, 934, 934, 936, 936, 937, 936, 938,
+ 936, 939, 939, 940, 939, 941, 939, 942, 943, 944,
+ 946, 945, 947, 949, 948, 951, 950, 952, 952, 953,
+ 953, 954, 954, 954, 955, 956, 956, 956, 957, 957,
+ 958, 959, 959, 961, 962, 960, 963, 963, 963, 963,
+ 965, 964, 967, 966, 966, 968, 968, 969, 969, 971,
+ 970, 973, 972, 974, 974, 975, 975, 976, 976, 977,
+ 978, 978, 978, 979, 980, 981, 983, 982, 984, 982,
+ 985, 986, 987, 982, 988, 982, 990, 989, 991, 989,
+ 992, 993, 989, 994, 989, 995, 995, 996, 996, 996,
+ 998, 997, 997, 997, 999, 999, 1000, 1000, 1001, 1001,
+ 1002, 1003, 1003, 1005, 1004, 1006, 1008, 1007, 1010, 1009,
+ 1011, 1012, 1011, 1011, 1011, 1013, 1011, 1011, 1014, 1011,
+ 1015, 1015, 1016, 1016, 1017, 1017, 1018, 1018, 1019, 1020,
+ 1021, 1022, 1023, 1023, 1024, 1025, 1024, 1026, 1024, 1027,
+ 1027, 1028, 1029, 1030, 1030, 1031, 1031, 1032, 1032, 1033,
+ 1033, 1035, 1034, 1036, 1037, 1038, 1037, 1039, 1037, 1037,
+ 1037, 1037, 1040, 1040, 1041, 1041, 1042, 1042, 1044, 1045,
+ 1043, 1046, 1046, 1047, 1047, 1048, 1048, 1049, 1049, 1051,
+ 1050, 1052, 1053, 1053, 1054, 1054, 1055, 1055, 1056, 1056,
+ 1057, 1057, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058,
+ 1058, 1059, 1060, 1059, 1059, 1061, 1061, 1062, 1062, 1063,
+ 1063, 1064, 1064, 1065, 1065, 1066, 1066, 1066, 1067, 1067,
+ 1068, 1068, 1069, 1069, 1070, 1070, 1071, 1071, 1072, 1072,
+ 1072, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073,
+ 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073,
+ 1073, 1074, 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1073,
+ 1073, 1073, 1073, 1073, 1073, 1073, 1073, 1075, 1075, 1075,
+ 1075, 1076, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1082,
+ 1082, 1082, 1082, 1082, 1082, 1083, 1083, 1083, 1084, 1084,
+ 1084, 1084, 1085, 1086, 1087, 1087, 1088, 1088, 1088, 1088,
+ 1088, 1089, 1089, 1091, 1090, 1092, 1090, 1093, 1090, 1094,
+ 1090, 1095, 1090, 1096, 1090, 1097, 1090, 1098, 1099, 1100,
+ 1101, 1101, 1102, 1103, 1103, 1104, 1104, 1105, 1107, 1106,
+ 1109, 1108, 1110, 1108, 1111, 1111, 1112, 1112, 1113, 1113,
+ 1114, 1114, 1115, 1115, 1115, 1115, 1116, 1115, 1115, 1115,
+ 1117, 1117, 1118, 1118, 1118, 1118, 1119, 1119, 1120, 1120,
+ 1121, 1121, 1121, 1121, 1123, 1122, 1124, 1124, 1125, 1125,
+ 1126, 1126, 1127, 1127, 1128, 1129, 1129, 1130, 1130, 1130,
+ 1131, 1131, 1131, 1131, 1131, 1131, 1132, 1132, 1132, 1132,
+ 1132, 1132, 1132, 1132, 1132, 1132, 1133, 1133, 1133, 1133,
+ 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1134, 1135, 1135,
+ 1135, 1135, 1135, 1136, 1136, 1136, 1136, 1136, 1136, 1136,
+ 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1136, 1137, 1137,
+ 1138, 1139, 1139, 1140, 1140, 1141, 1141, 1141, 1141, 1141,
+ 1142, 1142, 1142, 1142, 1142, 1143, 1143, 1143, 1144, 1144,
+ 1145, 1145, 1145, 1146, 1147, 1147, 1147, 1147, 1147, 1147,
+ 1148, 1149, 1149, 1149, 1149, 1150, 1151, 1152, 1152, 1153,
+ 1153, 1154, 1154, 1155, 1155, 1156, 1156, 1156, 1156, 1156,
+ 1156, 1156, 1157, 1157, 1158, 1158, 1159, 1159, 1160, 1161,
+ 1162, 1163, 1163, 1163, 1164, 1164, 1164, 1165, 1165, 1166,
+ 1166, 1167, 1167, 1168, 1168, 1169, 1169, 1170, 1170, 1171,
+ 1171, 1172, 1173, 1173, 1174, 1174, 1175, 1175, 1175, 1176,
+ 1176, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177, 1177,
+ 1178, 1178, 1180, 1179, 1181, 1181, 1182, 1183, 1183, 1183,
+ 1183, 1184, 1185, 1186, 1186, 1187, 1188, 1188, 1189, 1189,
+ 1190, 1190, 1191, 1192, 1192, 1193, 1193, 1194, 1194, 1194,
+ 1194, 1195, 1195, 1195, 1195, 1195, 1196, 1196, 1196, 1196,
+ 1196, 1197, 1197, 1198, 1198, 1199, 1199, 1200, 1200, 1200,
+ 1201, 1202, 1203, 1203, 1204, 1204, 1205, 1205, 1206, 1206,
+ 1207, 1207, 1208, 1208, 1209, 1209, 1210, 1210, 1210, 1211,
+ 1211, 1212, 1212, 1212, 1212, 1212, 1213, 1213, 1214, 1215,
+ 1215, 1216, 1216, 1216, 1217, 1217, 1218, 1218, 1219, 1219,
+ 1220, 1220, 1221, 1221, 1222, 1222, 1224, 1225, 1223, 1226,
+ 1223, 1227, 1223, 1223, 1228, 1223, 1229, 1223, 1230, 1223,
+ 1231, 1223, 1232, 1223, 1233, 1223, 1223, 1234, 1235, 1236,
+ 1223, 1237, 1237, 1238, 1238, 1238, 1238, 1239, 1239, 1239,
+ 1239, 1239, 1240, 1240, 1240, 1240, 1241, 1241, 1242, 1242,
+ 1243, 1243, 1244, 1244, 1244, 1244, 1244, 1244, 1244, 1244,
+ 1244, 1244, 1245, 1244, 1244, 1246, 1244, 1247, 1244, 1244,
+ 1244, 1244, 1244, 1244, 1248, 1244, 1249, 1250, 1250, 1252,
+ 1251, 1253, 1253, 1253, 1255, 1254, 1256, 1257, 1256, 1258,
+ 1258, 1259, 1260, 1260, 1261, 1262, 1262, 1262, 1262, 1262,
+ 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262,
+ 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262,
+ 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1262, 1263, 1263,
+ 1263, 1263, 1263, 1264, 1264, 1265, 1265, 1266, 1266, 1267,
+ 1267, 1269, 1268, 1270, 1270, 1271, 1271, 1272, 1272, 1273,
+ 1273, 1273, 1274, 1274, 1274, 1275, 1275, 1275, 1275, 1277,
+ 1276, 1278, 1276, 1276, 1276, 1279, 1280, 1280, 1281, 1281,
+ 1282, 1282, 1282, 1284, 1283, 1285, 1285, 1286, 1286, 1286,
+ 1287, 1287, 1287, 1288, 1288, 1290, 1289, 1291, 1291, 1291,
+ 1292, 1293, 1292, 1295, 1294, 1296, 1296, 1297, 1297, 1298,
+ 1298, 1298, 1299, 1299, 1299, 1301, 1300, 1302, 1302, 1303,
+ 1304, 1304, 1305, 1305, 1306, 1307, 1306, 1308, 1309, 1308,
+ 1310, 1310, 1310, 1311, 1311, 1311, 1312, 1312, 1313, 1313,
+ 1314, 1315, 1314, 1317, 1316, 1318, 1318, 1319, 1319, 1320,
+ 1320, 1320, 1320, 1320, 1320, 1321, 1321, 1323, 1322, 1324,
+ 1324, 1324, 1326, 1325, 1325, 1327, 1327, 1328, 1328, 1329,
+ 1331, 1330, 1332, 1332, 1333, 1333, 1334, 1335, 1336, 1336,
+ 1338, 1337, 1339, 1339, 1340, 1340, 1341, 1342, 1344, 1343,
+ 1346, 1345, 1347, 1347, 1348, 1348, 1350, 1349, 1351, 1349,
+ 1353, 1352, 1354, 1352, 1355, 1355, 1357, 1356, 1359, 1360,
+ 1358, 1361, 1362, 1363, 1363, 1364, 1364, 1366, 1365, 1367,
+ 1365, 1368, 1368, 1369, 1370, 1369, 1369, 1371, 1371, 1372,
+ 1373, 1374, 1374, 1375, 1375, 1376, 1377, 1377, 1378, 1378,
+ 1379, 1379, 1379, 1380, 1380, 1380, 1381, 1382, 1382, 1383,
+ 1383, 1384, 1384, 1384, 1384, 1385, 1385, 1386, 1386, 1386,
+ 1387, 1387, 1388, 1388, 1389, 1389, 1389, 1389, 1390, 1390,
+ 1390, 1391, 1391, 1392, 1393, 1394, 1395, 1395, 1395, 1395,
+ 1395, 1396, 1396, 1396, 1397, 1397, 1397, 1398, 1398, 1399,
+ 1399, 1399, 1399, 1399, 1400, 1400, 1400, 1400, 1400, 1400,
+ 1400, 1400, 1400, 1400, 1400, 1400, 1401, 1401, 1401, 1401,
+ 1401, 1401, 1401, 1401, 1401, 1401, 1401, 1401, 1401, 1401,
+ 1401, 1401, 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402,
+ 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402,
+ 1402, 1403, 1403, 1404, 1404, 1405, 1405, 1406, 1406, 1407,
+ 1407, 1407, 1407, 1407, 1407, 1408, 1408, 1409, 1409, 1410,
+ 1410, 1410, 1411, 1411, 1411, 1411, 1411, 1411, 1412, 1412,
+ 1412, 1413, 1413, 1414, 1415, 1415, 1416, 1416, 1416, 1416,
+ 1417, 1418, 1418, 1419, 1420, 1420, 1420, 1420, 1420, 1420,
+ 1420, 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421,
+ 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421,
+ 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421, 1421,
+ 1422, 1422, 1422, 1422, 1423, 1423, 1424, 1424, 1424, 1424,
+ 1424, 1424, 1425, 1425, 1426, 1426, 1427, 1427, 1427, 1427,
+ 1427, 1427, 1427, 1427, 1427, 1427, 1427, 1427, 1427, 1427,
+ 1427, 1427, 1427, 1427, 1427, 1427, 1427, 1428, 1428, 1429,
+ 1429, 1430, 1430, 1431, 1431, 1431, 1431, 1431, 1431, 1431,
+ 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431,
+ 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431, 1431,
+ 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432,
+ 1432, 1432, 1432, 1432, 1434, 1433, 1433, 1433, 1433, 1433,
+ 1433, 1433, 1433, 1433, 1433, 1433, 1435, 1435, 1436, 1436,
+ 1437, 1437, 1438, 1438, 1439, 1439, 1440, 1441, 1441, 1441,
+ 1441, 1441, 1441, 1441, 1442, 1443, 1441, 1441, 1441, 1441,
+ 1441, 1441, 1441, 1441, 1441, 1441, 1441, 1444, 1441, 1445,
+ 1441, 1446, 1441, 1447, 1447, 1448, 1448, 1448, 1449, 1449,
+ 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449,
+ 1449, 1450, 1452, 1451, 1451, 1453, 1453, 1454, 1455, 1457,
+ 1456, 1458, 1458, 1458, 1458, 1459, 1459, 1460, 1460, 1461,
+ 1461, 1462, 1462, 1463, 1463, 1464, 1465, 1467, 1466, 1468,
+ 1468, 1468, 1468, 1468, 1468, 1468, 1468, 1469, 1469, 1469,
+ 1469, 1469, 1469, 1469, 1469, 1470, 1470, 1470, 1470, 1471,
+ 1471, 1472, 1472, 1473, 1473, 1474, 1474, 1475, 1475, 1476,
+ 1476, 1477, 1477, 1478, 1478, 1478, 1479, 1479, 1479, 1479,
+ 1479, 1480, 1481, 1482, 1482, 1484, 1483, 1485, 1483, 1486,
+ 1486, 1486, 1487, 1487, 1487, 1487, 1488, 1488, 1488, 1488,
+ 1488, 1489, 1489, 1489, 1490, 1491, 1493, 1494, 1492, 1495,
+ 1495, 1496, 1496, 1497, 1498, 1497, 1499, 1497, 1497, 1500,
+ 1497, 1501, 1497, 1497, 1502, 1497, 1503, 1497, 1497, 1504,
+ 1504, 1504, 1505, 1505, 1506, 1506, 1507, 1508, 1508, 1508,
+ 1508, 1508, 1509, 1509, 1510, 1510, 1511, 1511, 1512, 1512,
+ 1513, 1513, 1514, 1515, 1515, 1516, 1516, 1517, 1517, 1517,
+ 1517, 1518, 1518, 1520, 1519, 1521, 1519, 1522, 1522, 1523,
+ 1524, 1523, 1526, 1525, 1527, 1527, 1528, 1528, 1529, 1529,
+ 1530, 1530, 1531, 1531, 1531, 1531, 1531, 1531, 1531, 1531,
+ 1531, 1531, 1531, 1531, 1532, 1532, 1532, 1532, 1532, 1532,
+ 1532, 1532, 1532, 1533, 1533, 1533, 1533, 1534, 1534, 1534,
+ 1535, 1535, 1536, 1537, 1537, 1538, 1539, 1538, 1540, 1541,
+ 1540, 1542, 1542, 1543, 1543, 1544, 1544, 1544, 1545, 1545,
+ 1546, 1546, 1547, 1549, 1548, 1550, 1550, 1551, 1551, 1552,
+ 1552, 1553, 1553, 1554, 1554, 1555, 1555, 1556, 1556, 1556,
+ 1557, 1557, 1557, 1558, 1558, 1558, 1558, 1558, 1558, 1559,
+ 1560, 1560, 1561, 1562, 1562, 1564, 1563, 1565, 1565, 1566,
+ 1566, 1566, 1567, 1567, 1568, 1568, 1568, 1568, 1569, 1569,
+ 1569, 1569, 1569, 1570, 1570, 1571, 1571, 1572, 1572, 1573,
+ 1574, 1574, 1574, 1575, 1575, 1575, 1575, 1575, 1575, 1576,
+ 1577, 1577, 1577, 1577, 1578, 1578, 1578, 1579, 1579, 1580,
+ 1581, 1582, 1582, 1582, 1583, 1583, 1584, 1584, 1585, 1585,
+ 1586, 1586, 1586, 1586, 1586, 1586, 1587, 1587, 1587, 1587,
+ 1587, 1588, 1588, 1588, 1588, 1589, 1589, 1589, 1589, 1589,
+ 1590, 1590, 1590, 1590, 1590, 1591, 1592, 1592, 1593, 1593,
+ 1594, 1594, 1594, 1596, 1595, 1597, 1597, 1598, 1598, 1599,
+ 1601, 1600, 1602, 1602, 1603, 1604, 1604, 1604, 1605, 1607,
+ 1608, 1606, 1606, 1606, 1610, 1609, 1612, 1611, 1613, 1611,
+ 1611, 1611, 1611, 1614, 1611, 1611, 1611, 1611, 1615, 1611,
+ 1611, 1616, 1616, 1617, 1618, 1619, 1619, 1620, 1621, 1621,
+ 1622, 1622, 1623, 1623, 1625, 1626, 1624, 1628, 1629, 1627,
+ 1630, 1631, 1632, 1632, 1632, 1633, 1633, 1634, 1634, 1635,
+ 1635, 1637, 1636, 1638, 1638, 1639, 1638, 1640, 1641, 1641,
+ 1642, 1642, 1643, 1644, 1644, 1645, 1645, 1646, 1647, 1647,
+ 1648, 1648, 1649, 1649, 1650, 1650, 1652, 1651, 1654, 1653,
+ 1655, 1655, 1656, 1656, 1657, 1657, 1658, 1658, 1659, 1659,
+ 1660, 1660, 1661, 1662, 1663, 1661, 1664, 1664, 1666, 1667,
+ 1668, 1665, 1669, 1669, 1670, 1670, 1671, 1671, 1672, 1673,
+ 1673, 1675, 1674, 1676, 1676, 1677, 1677, 1678, 1679, 1680,
+ 1681, 1682, 1680, 1683, 1684, 1680, 1685, 1686, 1685, 1687,
+ 1687, 1688, 1688, 1689, 1689, 1690, 1690, 1691, 1691, 1691,
+ 1693, 1694, 1692, 1695, 1695, 1696, 1696, 1697, 1697, 1698,
+ 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1698, 1699, 1699,
+ 1701, 1700, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702,
+ 1702, 1702, 1702, 1702, 1702, 1702, 1703, 1702, 1704, 1702,
+ 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702,
+ 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702,
+ 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702,
+ 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702,
+ 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1702, 1705,
+ 1705, 1705, 1706, 1706, 1707, 1707, 1708, 1708, 1709, 1709,
+ 1710, 1710, 1711, 1711, 1712, 1712, 1713, 1713, 1713, 1715,
+ 1714, 1716, 1714, 1717, 1717, 1717, 1717, 1717, 1717, 1718,
+ 1718, 1719, 1720, 1720, 1720, 1720, 1721, 1721, 1722, 1722,
+ 1722, 1723, 1725, 1724, 1727, 1726, 1726, 1728, 1728, 1729,
+ 1730, 1729, 1731, 1731, 1732, 1732, 1732, 1732, 1732, 1732,
+ 1732, 1732, 1732, 1732, 1732, 1732, 1732, 1732, 1732, 1732,
+ 1732, 1732, 1733, 1733, 1734, 1735, 1736, 1735, 1735, 1737,
+ 1737, 1738, 1738, 1738, 1739, 1740, 1740, 1742, 1741, 1743,
+ 1743, 1745, 1744, 1746, 1744, 1744, 1747, 1747, 1748, 1748,
+ 1749, 1750, 1749, 1752, 1751, 1753, 1753, 1753, 1754, 1754,
+ 1754, 1755, 1755, 1756, 1756, 1758, 1757, 1759, 1759, 1760,
+ 1762, 1763, 1764, 1765, 1761, 1766, 1766, 1767, 1767, 1768,
+ 1768, 1768, 1769, 1769, 1769, 1770, 1770, 1771, 1771, 1772,
+ 1772, 1772, 1772, 1773, 1773, 1774, 1774, 1775, 1775, 1776,
+ 1776, 1777, 1777, 1778, 1778, 1779, 1779, 1779, 1780, 1780,
+ 1781, 1781, 1782, 1782, 1783, 1783, 1784, 1785, 1785, 1785,
+ 1785, 1786, 1786, 1787, 1787, 1787, 1788, 1788, 1788, 1789,
+ 1789, 1790, 1790, 1790, 1790, 1790, 1790, 1790, 1790, 1790,
+ 1790, 1791, 1791, 1791, 1791, 1791, 1792, 1792, 1792, 1794,
+ 1793, 1795, 1795, 1796, 1796, 1797, 1798, 1799, 1798, 1800,
+ 1800, 1801, 1802, 1803, 1803, 1804, 1805, 1805, 1806, 1806,
+ 1807, 1807, 1808, 1809, 1809, 1809, 1809, 1809, 1810, 1810,
+ 1810, 1810, 1810, 1811, 1811, 1811, 1811, 1812, 1812, 1812,
+ 1813, 1813, 1814, 1815, 1815, 1816, 1816, 1816, 1817, 1818,
+ 1818, 1818, 1818, 1819, 1820, 1821, 1822, 1823, 1823, 1824,
+ 1824, 1825, 1825, 1825, 1826, 1826, 1827, 1827, 1828, 1828,
+ 1828, 1829, 1829, 1829, 1830, 1830, 1831, 1832, 1832, 1832,
+ 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1832, 1833,
+ 1833, 1833, 1833, 1833, 1833, 1833, 1833, 1833, 1833, 1833,
+ 1833, 1833, 1834, 1834, 1834, 1834, 1834, 1834, 1834, 1834,
+ 1834, 1834, 1834, 1834, 1834, 1835, 1835, 1835, 1835, 1835,
+ 1835, 1835, 1835, 1835, 1835, 1835, 1835, 1835, 1836, 1836,
+ 1836, 1836, 1836, 1836, 1836, 1836, 1837, 1837, 1837, 1837,
+ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
+ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
+ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
+ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837,
+ 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1837, 1838,
+ 1838, 1838, 1838, 1838, 1838, 1839, 1839, 1839, 1839, 1839,
+ 1839, 1839, 1839, 1839, 1839, 1840, 1840, 1840, 1841, 1841,
+ 1841, 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842,
+ 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1842,
+ 1842, 1842, 1842, 1842, 1842, 1842, 1842, 1843, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844,
+ 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1844, 1845,
+ 1845, 1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
+ 1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
+ 1846, 1846, 1846, 1846, 1846, 1846, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847, 1847,
+ 1847, 1847, 1849, 1848, 1850, 1850, 1851, 1850, 1852, 1850,
+ 1853, 1850, 1854, 1854, 1855, 1855, 1856, 1855, 1857, 1857,
+ 1859, 1858, 1858, 1860, 1860, 1860, 1861, 1861, 1861, 1861,
+ 1862, 1862, 1862, 1862, 1864, 1863, 1865, 1863, 1866, 1863,
+ 1868, 1867, 1869, 1867, 1870, 1867, 1872, 1871, 1873, 1871,
+ 1874, 1871, 1875, 1871, 1876, 1871, 1877, 1871, 1878, 1871,
+ 1871, 1871, 1871, 1871, 1871, 1871, 1871, 1879, 1871, 1880,
+ 1871, 1881, 1871, 1882, 1882, 1882, 1882, 1883, 1884, 1885,
+ 1885, 1886, 1886, 1886, 1886, 1887, 1887, 1887, 1888, 1888,
+ 1888, 1888, 1888, 1890, 1889, 1891, 1891, 1891, 1892, 1892,
+ 1893, 1893, 1894, 1895, 1895, 1895, 1895, 1895, 1897, 1896,
+ 1899, 1898, 1900, 1900, 1901, 1900, 1902, 1902, 1903, 1903,
+ 1904, 1904, 1904, 1904, 1905, 1904, 1906, 1906, 1906, 1906,
+ 1906, 1907, 1908, 1908, 1908, 1908, 1908, 1909, 1909, 1910,
+ 1911, 1911, 1911, 1911, 1912, 1912, 1913, 1913, 1914, 1914,
+ 1915, 1916, 1917, 1917, 1918, 1918, 1919, 1919, 1920, 1920,
+ 1921, 1921, 1921, 1921, 1922, 1923, 1923, 1923, 1923, 1924,
+ 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
+ 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
+ 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
+ 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924, 1924,
+ 1924, 1925, 1925, 1926, 1926, 1927, 1927, 1927, 1928, 1928,
+ 1928, 1928, 1929, 1929, 1930, 1930, 1931, 1931, 1932, 1932,
+ 1933, 1933, 1934, 1934, 1934, 1934, 1935, 1935, 1936, 1937,
+ 1937, 1937, 1938, 1938, 1938, 1938, 1938, 1939, 1939, 1939,
+ 1939, 1939, 1940, 1940, 1941, 1941, 1942, 1942, 1943, 1943,
+ 1944, 1944, 1945, 1945, 1947, 1946, 1948, 1949, 1949, 1950,
+ 1950, 1951, 1951, 1951, 1952, 1952, 1952, 1953, 1954, 1954,
+ 1954, 1955, 1956, 1957, 1957, 1957, 1958, 1958, 1958, 1959,
+ 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1960, 1960,
+ 1961, 1962, 1963, 1963, 1963, 1964, 1964, 1965, 1965, 1966,
+ 1966, 1967, 1967, 1969, 1968, 1970, 1970, 1970, 1970, 1971,
+ 1971, 1972, 1972, 1974, 1975, 1976, 1977, 1978, 1973, 1980,
+ 1979, 1981, 1981, 1981, 1981, 1981, 1981, 1982, 1982, 1983,
+ 1983, 1983, 1984, 1984, 1984, 1985, 1985, 1985, 1986, 1986,
+ 1987, 1988, 1987, 1989, 1989, 1990, 1990, 1991, 1991, 1992,
+ 1993, 1994, 1994, 1995, 1996, 1995, 1997, 1995, 1998, 1995,
+ 1999, 2000, 2001, 2002, 2002, 2003, 2003, 2003, 2003, 2003,
+ 2003, 2003, 2003, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
+ 2004, 2005, 2005, 2005, 2006, 2007, 2009, 2008, 2010, 2011,
+ 2012, 2013, 2014, 2014, 2014, 2015, 2015, 2015, 2017, 2016,
+ 2018, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2020,
+ 2020, 2021, 2021, 2023, 2022, 2024, 2022, 2025, 2022, 2026,
+ 2026, 2027, 2028, 2028, 2029, 2029, 2031, 2030, 2032, 2033,
+ 2033, 2034, 2034, 2035, 2035, 2036, 2036, 2037, 2037, 2038,
+ 2040, 2041, 2042, 2039, 2043, 2043, 2044, 2044, 2045, 2045,
+ 2047, 2046, 2048, 2048, 2049, 2049, 2049, 2050, 2050, 2051,
+ 2051, 2052, 2054, 2053, 2056, 2055, 2057, 2057, 2057, 2059,
+ 2058, 2061, 2060, 2062, 2063, 2063, 2064, 2064, 2065, 2065,
+ 2066, 2066, 2067, 2068, 2068, 2068, 2069, 2069, 2069, 2069,
+ 2071, 2070, 2073, 2074, 2072, 2075, 2075, 2075, 2075, 2075,
+ 2077, 2076, 2078, 2076, 2079, 2076, 2076, 2080, 2076, 2081,
+ 2082, 2083, 2076, 2084, 2084, 2086, 2085, 2085, 2087, 2087,
+ 2088, 2088, 2089, 2089, 2090, 2090, 2090, 2091, 2090, 2092,
+ 2092, 2092, 2092, 2092, 2092, 2093, 2093, 2093, 2093, 2093,
+ 2093, 2093, 2093, 2093, 2093, 2093, 2094, 2094, 2094, 2094,
+ 2096, 2095, 2097, 2098, 2095, 2099, 2099, 2101, 2100, 2102,
+ 2103, 2100, 2105, 2104
+};
+
+/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
+static const yytype_int8 yyr2[] =
+{
+ 0, 2, 1, 0, 4, 2, 0, 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, 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, 3, 1, 1, 0, 5, 3, 0, 0, 6,
+ 0, 0, 3, 1, 3, 0, 3, 0, 7, 1,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 5, 5, 5,
+ 1, 0, 1, 3, 1, 0, 1, 3, 1, 0,
+ 1, 3, 1, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 1, 1, 0, 1, 3, 0, 0, 8,
+ 0, 8, 0, 0, 15, 0, 0, 17, 0, 0,
+ 15, 0, 0, 15, 0, 6, 0, 10, 0, 11,
+ 0, 5, 0, 5, 8, 6, 0, 3, 1, 0,
+ 1, 1, 2, 3, 2, 1, 3, 2, 1, 3,
+ 3, 3, 1, 1, 1, 1, 3, 0, 1, 0,
+ 12, 1, 3, 2, 2, 2, 2, 2, 2, 2,
+ 0, 12, 0, 6, 2, 0, 1, 3, 1, 0,
+ 2, 0, 2, 0, 1, 4, 0, 2, 0, 3,
+ 0, 0, 1, 1, 1, 1, 2, 3, 1, 0,
+ 2, 0, 2, 2, 2, 2, 2, 3, 3, 1,
+ 1, 2, 3, 3, 0, 4, 0, 6, 0, 8,
+ 0, 3, 0, 1, 3, 1, 0, 0, 2, 3,
+ 1, 1, 0, 1, 3, 1, 1, 1, 1, 0,
+ 4, 3, 0, 3, 2, 3, 1, 3, 5, 2,
+ 1, 3, 3, 1, 0, 4, 4, 1, 0, 6,
+ 0, 3, 0, 0, 3, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 3, 0, 1, 1, 1, 1,
+ 2, 1, 1, 2, 3, 3, 1, 1, 0, 1,
+ 0, 2, 3, 5, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 4, 0, 1, 1, 3, 1, 3, 3, 1,
+ 2, 1, 1, 1, 1, 1, 3, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 0, 5, 0, 2,
+ 1, 1, 0, 3, 1, 1, 2, 0, 4, 0,
+ 5, 1, 2, 0, 4, 0, 5, 2, 2, 2,
+ 0, 2, 0, 0, 3, 0, 3, 1, 3, 0,
+ 3, 1, 1, 1, 3, 3, 4, 5, 2, 4,
+ 2, 1, 3, 0, 0, 6, 0, 2, 2, 2,
+ 0, 6, 0, 3, 1, 1, 2, 1, 2, 0,
+ 5, 0, 5, 0, 2, 0, 1, 0, 1, 2,
+ 5, 3, 5, 3, 5, 1, 0, 5, 0, 5,
+ 0, 0, 0, 8, 0, 5, 0, 3, 0, 3,
+ 0, 0, 5, 0, 3, 1, 1, 1, 1, 1,
+ 0, 5, 3, 1, 2, 4, 0, 4, 1, 4,
+ 1, 0, 1, 0, 4, 0, 0, 3, 0, 6,
+ 6, 0, 4, 2, 2, 0, 3, 2, 0, 3,
+ 0, 1, 0, 3, 0, 1, 1, 3, 1, 4,
+ 3, 3, 0, 2, 0, 0, 7, 0, 10, 1,
+ 3, 1, 1, 0, 2, 0, 3, 1, 3, 0,
+ 1, 0, 6, 1, 0, 0, 4, 0, 3, 1,
+ 1, 1, 1, 1, 1, 3, 1, 3, 0, 0,
+ 5, 1, 3, 1, 1, 0, 3, 1, 3, 0,
+ 4, 1, 0, 1, 2, 1, 1, 1, 0, 1,
+ 2, 1, 3, 4, 3, 3, 3, 3, 4, 4,
+ 3, 0, 0, 6, 3, 0, 2, 0, 1, 0,
+ 1, 0, 1, 1, 2, 1, 1, 3, 0, 3,
+ 0, 3, 1, 3, 0, 1, 1, 2, 1, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 0, 6, 1, 1, 3, 4, 4, 2, 2,
+ 2, 3, 3, 3, 1, 3, 1, 3, 3, 3,
+ 3, 0, 1, 2, 4, 4, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 3, 1, 1, 1, 1,
+ 2, 1, 3, 0, 9, 0, 10, 0, 9, 0,
+ 9, 0, 11, 0, 12, 0, 10, 2, 7, 7,
+ 0, 1, 4, 0, 1, 0, 1, 2, 0, 4,
+ 0, 3, 0, 3, 0, 1, 2, 1, 0, 1,
+ 2, 1, 0, 1, 2, 3, 0, 6, 5, 5,
+ 0, 2, 0, 1, 1, 1, 0, 1, 2, 1,
+ 1, 2, 2, 1, 0, 3, 1, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 3, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 3, 3, 3, 2,
+ 1, 1, 3, 3, 3, 3, 0, 1, 2, 2,
+ 3, 3, 2, 3, 3, 4, 3, 3, 3, 1,
+ 2, 2, 2, 2, 3, 3, 2, 2, 2, 3,
+ 3, 2, 3, 2, 2, 2, 2, 2, 5, 5,
+ 1, 1, 2, 2, 1, 2, 1, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 2, 0, 3,
+ 0, 1, 1, 5, 0, 1, 1, 1, 2, 2,
+ 1, 3, 3, 3, 3, 1, 1, 0, 1, 0,
+ 1, 0, 1, 2, 1, 1, 2, 4, 1, 3,
+ 2, 1, 0, 2, 0, 1, 0, 1, 2, 2,
+ 2, 3, 2, 1, 1, 1, 2, 1, 2, 2,
+ 1, 1, 1, 1, 1, 0, 2, 1, 1, 1,
+ 1, 1, 1, 1, 0, 1, 2, 1, 1, 0,
+ 1, 1, 1, 2, 1, 2, 3, 3, 2, 2,
+ 0, 1, 0, 4, 1, 1, 1, 0, 1, 2,
+ 1, 1, 2, 1, 3, 3, 1, 1, 0, 2,
+ 0, 1, 5, 0, 3, 3, 1, 0, 2, 2,
+ 2, 0, 3, 3, 6, 6, 1, 1, 2, 2,
+ 2, 2, 2, 1, 1, 0, 1, 1, 1, 1,
+ 1, 1, 0, 1, 0, 1, 0, 1, 1, 2,
+ 1, 2, 1, 2, 0, 2, 0, 2, 2, 2,
+ 2, 3, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 1, 1, 1, 2, 4, 2, 0, 4,
+ 1, 4, 0, 1, 1, 3, 0, 0, 9, 0,
+ 5, 0, 7, 7, 0, 6, 0, 6, 0, 11,
+ 0, 10, 0, 11, 0, 8, 8, 0, 0, 0,
+ 9, 1, 1, 0, 1, 1, 3, 0, 2, 3,
+ 5, 5, 0, 3, 1, 4, 0, 3, 0, 2,
+ 0, 1, 0, 2, 2, 2, 2, 1, 1, 1,
+ 4, 4, 0, 6, 4, 0, 5, 0, 6, 4,
+ 3, 1, 7, 7, 0, 7, 2, 1, 1, 0,
+ 6, 0, 3, 2, 0, 5, 0, 0, 6, 1,
+ 3, 1, 1, 3, 3, 3, 2, 2, 4, 4,
+ 2, 7, 6, 5, 5, 4, 5, 4, 4, 2,
+ 2, 7, 5, 6, 3, 6, 6, 4, 6, 1,
+ 1, 1, 1, 1, 3, 3, 3, 5, 0, 1,
+ 1, 2, 2, 3, 3, 3, 3, 0, 1, 0,
+ 1, 0, 2, 0, 1, 2, 1, 1, 1, 0,
+ 1, 1, 0, 2, 1, 0, 1, 1, 1, 0,
+ 7, 0, 5, 5, 4, 3, 0, 1, 1, 3,
+ 3, 2, 2, 0, 2, 1, 3, 0, 1, 1,
+ 0, 2, 4, 1, 3, 0, 5, 0, 1, 1,
+ 3, 0, 4, 0, 4, 0, 1, 1, 2, 1,
+ 1, 1, 0, 2, 2, 0, 5, 1, 3, 2,
+ 0, 3, 1, 4, 1, 0, 4, 1, 0, 4,
+ 0, 1, 3, 0, 1, 3, 1, 1, 2, 6,
+ 3, 0, 4, 0, 3, 0, 1, 1, 2, 1,
+ 1, 1, 1, 1, 2, 0, 2, 0, 6, 0,
+ 1, 1, 0, 5, 4, 3, 5, 1, 3, 4,
+ 0, 6, 1, 1, 1, 3, 2, 3, 1, 1,
+ 0, 6, 1, 1, 1, 3, 3, 4, 0, 6,
+ 0, 2, 0, 4, 0, 2, 0, 3, 0, 4,
+ 0, 3, 0, 4, 1, 1, 0, 3, 0, 0,
+ 5, 6, 7, 1, 2, 1, 1, 0, 3, 0,
+ 3, 3, 3, 1, 0, 4, 3, 1, 1, 1,
+ 1, 1, 4, 0, 1, 2, 1, 1, 0, 1,
+ 0, 1, 1, 2, 1, 2, 9, 0, 1, 0,
+ 2, 3, 1, 4, 4, 2, 1, 1, 1, 1,
+ 3, 5, 0, 1, 0, 2, 1, 2, 3, 1,
+ 1, 3, 4, 0, 0, 0, 0, 2, 2, 1,
+ 1, 0, 2, 3, 0, 2, 3, 0, 2, 3,
+ 3, 3, 2, 1, 3, 4, 3, 4, 3, 4,
+ 3, 4, 3, 3, 6, 1, 3, 4, 5, 7,
+ 6, 8, 5, 6, 4, 3, 5, 4, 6, 3,
+ 4, 1, 3, 3, 3, 3, 3, 3, 3, 5,
+ 5, 5, 6, 6, 3, 3, 3, 3, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 0, 2, 1,
+ 1, 1, 1, 2, 1, 1, 1, 2, 1, 2,
+ 2, 2, 1, 4, 1, 3, 1, 1, 1, 1,
+ 3, 1, 1, 1, 4, 4, 4, 3, 3, 3,
+ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 6, 4, 4, 7, 6, 3, 4, 6,
+ 6, 4, 4, 4, 4, 4, 4, 6, 8, 10,
+ 1, 1, 3, 1, 1, 3, 1, 2, 2, 2,
+ 2, 2, 1, 3, 4, 6, 4, 6, 2, 2,
+ 4, 4, 4, 10, 6, 8, 6, 4, 4, 6,
+ 4, 3, 4, 1, 4, 3, 4, 1, 1, 5,
+ 3, 5, 3, 6, 8, 2, 2, 8, 8, 6,
+ 6, 2, 6, 2, 6, 8, 4, 1, 3, 4,
+ 8, 8, 4, 2, 2, 2, 6, 6, 4, 8,
+ 4, 4, 8, 4, 6, 6, 4, 6, 8, 6,
+ 5, 8, 7, 10, 0, 5, 4, 4, 4, 6,
+ 8, 6, 6, 6, 6, 6, 2, 3, 0, 4,
+ 0, 3, 0, 1, 1, 3, 4, 4, 5, 4,
+ 4, 4, 5, 4, 0, 0, 7, 4, 5, 4,
+ 5, 4, 4, 4, 4, 4, 5, 0, 9, 0,
+ 8, 0, 7, 3, 3, 1, 1, 1, 3, 3,
+ 3, 3, 3, 4, 4, 4, 6, 4, 6, 4,
+ 6, 5, 0, 7, 4, 4, 4, 4, 1, 0,
+ 3, 3, 1, 3, 5, 0, 1, 0, 2, 0,
+ 3, 4, 2, 0, 1, 2, 1, 0, 3, 2,
+ 3, 3, 3, 2, 1, 1, 1, 1, 1, 2,
+ 1, 2, 2, 1, 2, 1, 2, 2, 3, 0,
+ 1, 1, 3, 1, 3, 1, 3, 4, 5, 1,
+ 3, 1, 1, 1, 1, 2, 1, 1, 1, 1,
+ 1, 1, 4, 1, 3, 0, 3, 0, 5, 2,
+ 4, 4, 1, 1, 1, 1, 0, 1, 2, 1,
+ 2, 1, 1, 2, 3, 3, 0, 0, 10, 1,
+ 4, 1, 3, 3, 0, 6, 0, 8, 4, 0,
+ 8, 0, 10, 6, 0, 8, 0, 10, 6, 1,
+ 2, 1, 1, 2, 0, 1, 5, 1, 1, 1,
+ 1, 1, 1, 3, 1, 3, 3, 3, 3, 3,
+ 3, 3, 5, 3, 2, 0, 1, 0, 2, 3,
+ 3, 1, 1, 0, 7, 0, 7, 1, 2, 0,
+ 0, 2, 0, 2, 0, 1, 1, 1, 1, 3,
+ 1, 3, 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,
+ 0, 1, 2, 0, 1, 0, 0, 3, 0, 0,
+ 3, 0, 4, 4, 2, 0, 1, 1, 0, 2,
+ 3, 1, 3, 0, 7, 0, 1, 0, 3, 0,
+ 3, 0, 3, 1, 1, 1, 4, 2, 2, 2,
+ 1, 2, 2, 0, 3, 2, 2, 3, 3, 3,
+ 3, 1, 2, 0, 1, 0, 4, 4, 2, 0,
+ 1, 1, 0, 1, 2, 5, 4, 1, 4, 7,
+ 5, 8, 3, 1, 1, 1, 1, 1, 2, 1,
+ 1, 3, 3, 1, 3, 1, 1, 1, 1, 1,
+ 0, 2, 3, 4, 1, 2, 1, 0, 1, 1,
+ 1, 0, 2, 2, 2, 1, 0, 1, 2, 2,
+ 2, 1, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 2, 1, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 6, 0, 1, 3, 1, 3,
+ 0, 2, 3, 1, 1, 2, 1, 3, 2, 0,
+ 0, 7, 2, 1, 0, 3, 0, 8, 0, 8,
+ 4, 5, 5, 0, 6, 4, 4, 4, 0, 6,
+ 1, 1, 3, 1, 2, 1, 3, 1, 0, 2,
+ 0, 2, 0, 1, 0, 0, 12, 0, 0, 10,
+ 0, 0, 0, 1, 1, 0, 1, 1, 1, 0,
+ 1, 0, 2, 1, 2, 0, 3, 3, 0, 1,
+ 3, 1, 1, 3, 1, 3, 1, 3, 1, 1,
+ 0, 1, 1, 1, 1, 1, 0, 4, 0, 4,
+ 0, 1, 0, 1, 3, 1, 5, 3, 1, 1,
+ 1, 1, 0, 0, 0, 7, 5, 1, 0, 0,
+ 0, 13, 3, 1, 3, 3, 3, 1, 3, 0,
+ 1, 0, 3, 0, 3, 2, 3, 3, 2, 5,
+ 0, 0, 7, 0, 0, 8, 0, 0, 3, 1,
+ 3, 2, 4, 0, 2, 0, 2, 1, 1, 1,
+ 0, 0, 7, 0, 1, 0, 1, 1, 3, 1,
+ 1, 2, 2, 2, 1, 1, 1, 1, 0, 3,
+ 0, 3, 2, 4, 4, 3, 4, 4, 1, 3,
+ 3, 3, 3, 6, 2, 2, 0, 6, 0, 8,
+ 5, 2, 1, 1, 1, 5, 5, 2, 2, 1,
+ 4, 3, 2, 3, 2, 2, 1, 4, 4, 3,
+ 3, 3, 2, 2, 3, 4, 3, 3, 3, 3,
+ 4, 4, 3, 2, 3, 3, 3, 3, 3, 4,
+ 4, 3, 3, 4, 4, 3, 4, 4, 3, 1,
+ 1, 1, 1, 1, 0, 1, 0, 2, 0, 1,
+ 1, 1, 0, 2, 0, 2, 0, 3, 3, 0,
+ 4, 0, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 1, 2, 1, 1, 0, 3, 0, 1,
+ 1, 5, 0, 4, 0, 4, 1, 0, 1, 4,
+ 0, 3, 3, 1, 2, 2, 2, 2, 3, 4,
+ 2, 1, 1, 1, 1, 2, 1, 1, 1, 1,
+ 1, 2, 0, 1, 2, 2, 0, 3, 1, 0,
+ 5, 0, 1, 3, 1, 0, 3, 0, 3, 3,
+ 1, 0, 5, 0, 3, 2, 0, 1, 0, 2,
+ 5, 0, 6, 0, 4, 0, 1, 1, 2, 2,
+ 3, 0, 1, 1, 2, 0, 3, 0, 4, 2,
+ 0, 0, 0, 0, 23, 1, 1, 0, 1, 0,
+ 1, 1, 0, 1, 1, 0, 2, 2, 1, 3,
+ 4, 3, 3, 0, 2, 2, 1, 3, 3, 0,
+ 4, 0, 3, 1, 1, 0, 3, 2, 3, 1,
+ 1, 2, 0, 2, 3, 1, 5, 1, 1, 2,
+ 2, 1, 1, 1, 1, 1, 1, 2, 2, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 1, 1, 1, 1, 1, 2, 2, 2, 0,
+ 4, 0, 1, 1, 3, 7, 0, 0, 4, 0,
+ 3, 1, 1, 1, 3, 1, 1, 1, 3, 5,
+ 3, 5, 1, 1, 3, 4, 5, 4, 1, 3,
+ 4, 4, 5, 1, 5, 3, 2, 1, 3, 2,
+ 2, 4, 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, 3, 2, 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, 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, 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,
+ 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, 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, 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, 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, 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,
+ 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, 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, 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, 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, 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,
+ 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, 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, 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, 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, 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,
+ 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, 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, 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, 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, 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, 3, 1, 3, 0, 3, 0, 3,
+ 0, 5, 1, 3, 1, 3, 0, 3, 1, 3,
+ 0, 3, 1, 1, 1, 1, 0, 1, 1, 1,
+ 0, 2, 2, 2, 0, 4, 0, 6, 0, 6,
+ 0, 4, 0, 6, 0, 6, 0, 4, 0, 6,
+ 0, 6, 0, 5, 0, 7, 0, 9, 0, 9,
+ 2, 3, 2, 4, 3, 5, 2, 0, 4, 0,
+ 4, 0, 6, 1, 1, 3, 3, 1, 3, 2,
+ 2, 2, 2, 2, 1, 1, 4, 4, 1, 1,
+ 1, 1, 1, 0, 5, 0, 2, 1, 1, 1,
+ 1, 3, 3, 1, 1, 2, 2, 2, 0, 3,
+ 0, 3, 3, 2, 0, 6, 1, 2, 1, 1,
+ 1, 1, 1, 1, 0, 5, 1, 1, 1, 1,
+ 1, 3, 6, 6, 7, 5, 3, 4, 1, 3,
+ 8, 8, 6, 4, 0, 3, 0, 3, 1, 3,
+ 2, 1, 1, 1, 0, 1, 1, 2, 0, 1,
+ 1, 1, 3, 3, 4, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 2, 2, 1, 3, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 1, 2, 2,
+ 2, 2, 2, 3, 2, 2, 2, 2, 3, 3,
+ 2, 0, 1, 3, 1, 2, 2, 2, 1, 3,
+ 3, 1, 1, 3, 1, 3, 1, 3, 1, 1,
+ 1, 1, 4, 5, 4, 1, 3, 1, 2, 0,
+ 2, 5, 0, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 1, 0, 2, 0, 2, 0, 3,
+ 2, 1, 2, 1, 0, 3, 1, 0, 1, 0,
+ 1, 0, 3, 2, 0, 1, 2, 4, 4, 5,
+ 4, 2, 3, 2, 2, 2, 0, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 3, 3, 3, 3, 0, 1, 3, 3, 0,
+ 3, 1, 3, 0, 3, 0, 3, 4, 4, 1,
+ 1, 0, 2, 0, 0, 0, 0, 0, 20, 0,
+ 2, 4, 4, 3, 4, 3, 3, 0, 3, 1,
+ 3, 5, 1, 1, 1, 0, 1, 1, 0, 2,
+ 0, 0, 3, 0, 2, 6, 3, 4, 4, 1,
+ 0, 1, 1, 1, 0, 3, 0, 5, 0, 7,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 0, 6, 4, 1,
+ 1, 0, 1, 2, 2, 1, 1, 2, 0, 2,
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 4, 0, 6, 0, 7, 1,
+ 2, 3, 1, 2, 1, 2, 0, 5, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 0, 0, 0, 7, 2, 1, 1, 2, 1, 1,
+ 0, 2, 1, 3, 1, 1, 2, 1, 2, 1,
+ 2, 0, 0, 8, 0, 6, 4, 4, 1, 0,
+ 5, 0, 5, 2, 1, 1, 1, 2, 3, 3,
+ 5, 5, 2, 2, 3, 1, 6, 8, 4, 6,
+ 0, 5, 0, 0, 8, 6, 4, 4, 4, 5,
+ 0, 6, 0, 12, 0, 12, 10, 0, 12, 0,
+ 0, 0, 15, 1, 1, 0, 3, 1, 2, 3,
+ 2, 3, 1, 1, 1, 4, 2, 0, 6, 1,
+ 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 6, 0, 0, 9, 1, 2, 0, 5, 0,
+ 0, 7, 0, 4
+};
+
+
+enum { YYENOMEM = -2 };
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+#define YYNOMEM goto yyexhaustedlab
+
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+ do \
+ if (yychar == YYEMPTY) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ YYPOPSTACK (yylen); \
+ yystate = *yyssp; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (thd, YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+ while (0)
+
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
+
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+
+
+
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Kind, Value, thd); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, THD *thd)
+{
+ FILE *yyoutput = yyo;
+ YY_USE (yyoutput);
+ YY_USE (thd);
+ if (!yyvaluep)
+ return;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YY_USE (yykind);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, THD *thd)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+
+ yy_symbol_value_print (yyo, yykind, yyvaluep, thd);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+static void
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
+ int yyrule, THD *thd)
+{
+ int yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)], thd);
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyssp, yyvsp, Rule, thd); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep, THD *thd)
+{
+ YY_USE (yyvaluep);
+ YY_USE (thd);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ switch (yykind)
+ {
+ case YYSYMBOL_expr_lex: /* expr_lex */
+#line 1551 "/home/buildbot/git/mkdist/sql/yy_oracle.yy"
+{
+ /*
+ In case of a syntax/oom error let's free the sp_expr_lex
+ instance, but only if it has not been linked to any structures
+ such as sp_instr_jump_if_not::m_lex_keeper yet, e.g.:
+ IF f1() THEN1
+ i.e. THEN1 came instead of the expected THEN causing a syntax error.
+ */
+ if (!((*yyvaluep).expr_lex)->sp_lex_in_use)
+ delete ((*yyvaluep).expr_lex);
+}
+#line 28691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case YYSYMBOL_cursor_actual_parameters: /* cursor_actual_parameters */
+#line 1610 "/home/buildbot/git/mkdist/sql/yy_oracle.yy"
+{
+ if (((*yyvaluep).sp_assignment_lex_list))
+ {
+ sp_assignment_lex *elem;
+ List_iterator<sp_assignment_lex> li(*((*yyvaluep).sp_assignment_lex_list));
+ while ((elem= li++))
+ {
+ if (!elem->sp_lex_in_use)
+ delete elem;
+ }
+ }
+}
+#line 28708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case YYSYMBOL_opt_parenthesized_cursor_actual_parameters: /* opt_parenthesized_cursor_actual_parameters */
+#line 1610 "/home/buildbot/git/mkdist/sql/yy_oracle.yy"
+{
+ if (((*yyvaluep).sp_assignment_lex_list))
+ {
+ sp_assignment_lex *elem;
+ List_iterator<sp_assignment_lex> li(*((*yyvaluep).sp_assignment_lex_list));
+ while ((elem= li++))
+ {
+ if (!elem->sp_lex_in_use)
+ delete elem;
+ }
+ }
+}
+#line 28725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ default:
+ break;
+ }
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+int
+yyparse (THD *thd)
+{
+/* Lookahead token kind. */
+int yychar;
+
+
+/* The semantic value of the lookahead symbol. */
+/* Default value used for initialization, for pacifying older GCCs
+ or non-GCC compilers. */
+YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
+YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
+
+ /* Number of syntax errors so far. */
+ int yynerrs = 0;
+
+ yy_state_fast_t yystate = 0;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus = 0;
+
+ /* Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* Their size. */
+ YYPTRDIFF_T yystacksize = YYINITDEPTH;
+
+ /* The state stack: array, bottom, top. */
+ yy_state_t yyssa[YYINITDEPTH];
+ yy_state_t *yyss = yyssa;
+ yy_state_t *yyssp = yyss;
+
+ /* The semantic value stack: array, bottom, top. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp = yyvs;
+
+ int yyn;
+ /* The return value of yyparse. */
+ int yyresult;
+ /* Lookahead symbol kind. */
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ goto yysetstate;
+
+
+/*------------------------------------------------------------.
+| yynewstate -- push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+
+/*--------------------------------------------------------------------.
+| yysetstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+ YY_IGNORE_USELESS_CAST_BEGIN
+ *yyssp = YY_CAST (yy_state_t, yystate);
+ YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
+
+ if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+ YYNOMEM;
+#else
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYPTRDIFF_T yysize = yyssp - yyss + 1;
+
+# if defined yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ yy_state_t *yyss1 = yyss;
+ YYSTYPE *yyvs1 = yyvs;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * YYSIZEOF (*yyssp),
+ &yyvs1, yysize * YYSIZEOF (*yyvsp),
+ &yystacksize);
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+# else /* defined YYSTACK_RELOCATE */
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ YYNOMEM;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yy_state_t *yyss1 = yyss;
+ union yyalloc *yyptr =
+ YY_CAST (union yyalloc *,
+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
+ if (! yyptr)
+ YYNOMEM;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YY_IGNORE_USELESS_CAST_BEGIN
+ YYDPRINTF ((stderr, "Stack size increased to %ld\n",
+ YY_CAST (long, yystacksize)));
+ YY_IGNORE_USELESS_CAST_END
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yypact_value_is_default (yyn))
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token\n"));
+ yychar = yylex (&yylval, thd);
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ goto yyerrlab1;
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yytable_value_is_error (yyn))
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ '$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2: /* query: END_OF_INPUT */
+#line 1976 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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;
+ YYLIP->found_semicolon= NULL;
+ }
+#line 29008 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3: /* $@1: %empty */
+#line 1985 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_input_stream *lip = YYLIP;
+
+ if ((thd->client_capabilities & CLIENT_MULTI_QUERIES) &&
+ lip->multi_statements &&
+ ! lip->eof())
+ {
+ /*
+ We found a well formed query, and multi queries are allowed:
+ - force the parser to stop after the ';'
+ - mark the start of the next query for the next invocation
+ of the parser.
+ */
+ lip->next_state= MY_LEX_END;
+ lip->found_semicolon= lip->get_ptr();
+ }
+ else
+ {
+ /* Single query, terminated. */
+ lip->found_semicolon= NULL;
+ }
+ }
+#line 29035 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 5: /* query: directly_executable_statement END_OF_INPUT */
+#line 2010 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Single query, not terminated. */
+ YYLIP->found_semicolon= NULL;
+ }
+#line 29044 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 71: /* deallocate: deallocate_or_drop PREPARE_SYM ident */
+#line 2093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_deallocate_prepare((yyvsp[0].ident_sys));
+ }
+#line 29052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 74: /* $@2: %empty */
+#line 2105 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "PREPARE..FROM"; }
+#line 29058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 75: /* prepare: PREPARE_SYM ident FROM $@2 expr */
+#line 2107 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_prepare((yyvsp[-3].ident_sys), (yyvsp[0].item)))
+ MYSQL_YYABORT;
+ }
+#line 29068 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 76: /* execute: EXECUTE_SYM ident execute_using */
+#line 2116 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_execute((yyvsp[-1].ident_sys), (yyvsp[0].item_list)))
+ MYSQL_YYABORT;
+ }
+#line 29077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 77: /* $@3: %empty */
+#line 2121 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "EXECUTE IMMEDIATE"; }
+#line 29083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 78: /* $@4: %empty */
+#line 2123 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= NULL; }
+#line 29089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 79: /* execute: EXECUTE_SYM IMMEDIATE_SYM $@3 expr $@4 execute_using */
+#line 2125 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_execute_immediate((yyvsp[-2].item), (yyvsp[0].item_list)))
+ MYSQL_YYABORT;
+ }
+#line 29098 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 80: /* execute_using: %empty */
+#line 2132 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= NULL; }
+#line 29104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 81: /* $@5: %empty */
+#line 2134 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "EXECUTE..USING"; }
+#line 29110 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 82: /* execute_using: USING $@5 execute_params */
+#line 2136 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= (yyvsp[0].item_list);
+ Lex->clause_that_disallows_subselect= NULL;
+ }
+#line 29119 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 83: /* execute_params: expr_or_ignore_or_default */
+#line 2144 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_list)= List<Item>::make(thd->mem_root, (yyvsp[0].item)))))
+ MYSQL_YYABORT;
+ }
+#line 29128 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 84: /* execute_params: execute_params ',' expr_or_ignore_or_default */
+#line 2149 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.item_list)= (yyvsp[-2].item_list))->push_back((yyvsp[0].item), thd->mem_root))
+ MYSQL_YYABORT;
+ }
+#line 29137 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 85: /* $@6: %empty */
+#line 2160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HELP"));
+ }
+#line 29146 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 86: /* help: HELP_SYM $@6 ident_or_text */
+#line 2165 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_HELP;
+ lex->help_arg= (yyvsp[0].lex_str).str;
+ }
+#line 29156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 87: /* $@7: %empty */
+#line 2176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_CHANGE_MASTER;
+ }
+#line 29164 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 88: /* change: CHANGE MASTER_SYM optional_connection_name TO_SYM $@7 master_defs optional_for_channel */
+#line 2181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 29170 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 91: /* master_def: MASTER_HOST_SYM '=' TEXT_STRING_sys */
+#line 2191 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.host = (yyvsp[0].lex_str).str;
+ }
+#line 29178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 92: /* master_def: MASTER_USER_SYM '=' TEXT_STRING_sys */
+#line 2195 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.user = (yyvsp[0].lex_str).str;
+ }
+#line 29186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 93: /* master_def: MASTER_PASSWORD_SYM '=' TEXT_STRING_sys */
+#line 2199 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.password = (yyvsp[0].lex_str).str;
+ }
+#line 29194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 94: /* master_def: MASTER_PORT_SYM '=' ulong_num */
+#line 2203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.port = (yyvsp[0].ulong_num);
+ }
+#line 29202 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 95: /* master_def: MASTER_CONNECT_RETRY_SYM '=' ulong_num */
+#line 2207 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.connect_retry = (yyvsp[0].ulong_num);
+ }
+#line 29210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 96: /* master_def: MASTER_DELAY_SYM '=' ulong_num */
+#line 2211 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].ulong_num) > MASTER_DELAY_MAX)
+ {
+ my_error(ER_MASTER_DELAY_VALUE_OUT_OF_RANGE, MYF(0),
+ (ulong) (yyvsp[0].ulong_num), (ulong) MASTER_DELAY_MAX);
+ }
+ else
+ Lex->mi.sql_delay = (yyvsp[0].ulong_num);
+ }
+#line 29224 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 97: /* master_def: MASTER_SSL_SYM '=' ulong_num */
+#line 2221 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl= (yyvsp[0].ulong_num) ?
+ LEX_MASTER_INFO::LEX_MI_ENABLE : LEX_MASTER_INFO::LEX_MI_DISABLE;
+ }
+#line 29233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 98: /* master_def: MASTER_SSL_CA_SYM '=' TEXT_STRING_sys */
+#line 2226 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_ca= (yyvsp[0].lex_str).str;
+ }
+#line 29241 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 99: /* master_def: MASTER_SSL_CAPATH_SYM '=' TEXT_STRING_sys */
+#line 2230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_capath= (yyvsp[0].lex_str).str;
+ }
+#line 29249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 100: /* master_def: MASTER_SSL_CERT_SYM '=' TEXT_STRING_sys */
+#line 2234 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_cert= (yyvsp[0].lex_str).str;
+ }
+#line 29257 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 101: /* master_def: MASTER_SSL_CIPHER_SYM '=' TEXT_STRING_sys */
+#line 2238 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_cipher= (yyvsp[0].lex_str).str;
+ }
+#line 29265 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 102: /* master_def: MASTER_SSL_KEY_SYM '=' TEXT_STRING_sys */
+#line 2242 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_key= (yyvsp[0].lex_str).str;
+ }
+#line 29273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 103: /* master_def: MASTER_SSL_VERIFY_SERVER_CERT_SYM '=' ulong_num */
+#line 2246 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_verify_server_cert= (yyvsp[0].ulong_num) ?
+ LEX_MASTER_INFO::LEX_MI_ENABLE : LEX_MASTER_INFO::LEX_MI_DISABLE;
+ }
+#line 29282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 104: /* master_def: MASTER_SSL_CRL_SYM '=' TEXT_STRING_sys */
+#line 2251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_crl= (yyvsp[0].lex_str).str;
+ }
+#line 29290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 105: /* master_def: MASTER_SSL_CRLPATH_SYM '=' TEXT_STRING_sys */
+#line 2255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.ssl_crlpath= (yyvsp[0].lex_str).str;
+ }
+#line 29298 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 106: /* master_def: MASTER_HEARTBEAT_PERIOD_SYM '=' NUM_literal */
+#line 2260 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.heartbeat_period= (float) (yyvsp[0].item_num)->val_real();
+ if (unlikely(Lex->mi.heartbeat_period >
+ SLAVE_MAX_HEARTBEAT_PERIOD) ||
+ unlikely(Lex->mi.heartbeat_period < 0.0))
+ my_yyabort_error((ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE, MYF(0),
+ SLAVE_MAX_HEARTBEAT_PERIOD));
+
+ if (unlikely(Lex->mi.heartbeat_period > slave_net_timeout))
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX,
+ ER_THD(thd, ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX));
+ }
+ if (unlikely(Lex->mi.heartbeat_period < 0.001))
+ {
+ if (unlikely(Lex->mi.heartbeat_period != 0.0))
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN,
+ ER_THD(thd, ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN));
+ Lex->mi.heartbeat_period= 0.0;
+ }
+ Lex->mi.heartbeat_opt= LEX_MASTER_INFO::LEX_MI_DISABLE;
+ }
+ Lex->mi.heartbeat_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 29330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 107: /* master_def: IGNORE_SERVER_IDS_SYM '=' '(' ignore_server_id_list ')' */
+#line 2288 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.repl_ignore_server_ids_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 29338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 108: /* master_def: DO_DOMAIN_IDS_SYM '=' '(' do_domain_id_list ')' */
+#line 2292 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.repl_do_domain_ids_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 29346 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 109: /* master_def: IGNORE_DOMAIN_IDS_SYM '=' '(' ignore_domain_id_list ')' */
+#line 2296 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.repl_ignore_domain_ids_opt= LEX_MASTER_INFO::LEX_MI_ENABLE;
+ }
+#line 29354 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 114: /* ignore_server_id: ulong_num */
+#line 2311 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ insert_dynamic(&Lex->mi.repl_ignore_server_ids, (uchar*) &((yyvsp[0].ulong_num)));
+ }
+#line 29362 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 118: /* do_domain_id: ulong_num */
+#line 2324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ insert_dynamic(&Lex->mi.repl_do_domain_ids, (uchar*) &((yyvsp[0].ulong_num)));
+ }
+#line 29370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 122: /* ignore_domain_id: ulong_num */
+#line 2337 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ insert_dynamic(&Lex->mi.repl_ignore_domain_ids, (uchar*) &((yyvsp[0].ulong_num)));
+ }
+#line 29378 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 123: /* master_file_def: MASTER_LOG_FILE_SYM '=' TEXT_STRING_sys */
+#line 2344 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.log_file_name = (yyvsp[0].lex_str).str;
+ }
+#line 29386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 124: /* master_file_def: MASTER_LOG_POS_SYM '=' ulonglong_num */
+#line 2348 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ If the user specified a value < BIN_LOG_HEADER_SIZE, adjust it
+ instead of causing subsequent errors.
+ We need to do it in this file, because only there we know that
+ MASTER_LOG_POS has been explicitly specified. On the contrary
+ in change_master() (sql_repl.cc) we cannot distinguish between 0
+ (MASTER_LOG_POS explicitly specified as 0) and 0 (unspecified),
+ whereas we want to distinguish (specified 0 means "read the binlog
+ from 0" (4 in fact), unspecified means "don't change the position
+ (keep the preceding value)").
+ */
+ Lex->mi.pos= MY_MAX(BIN_LOG_HEADER_SIZE, (yyvsp[0].ulonglong_number));
+ }
+#line 29405 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 125: /* master_file_def: RELAY_LOG_FILE_SYM '=' TEXT_STRING_sys */
+#line 2363 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.relay_log_name = (yyvsp[0].lex_str).str;
+ }
+#line 29413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 126: /* master_file_def: RELAY_LOG_POS_SYM '=' ulong_num */
+#line 2367 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.relay_log_pos = (yyvsp[0].ulong_num);
+ /* Adjust if < BIN_LOG_HEADER_SIZE (same comment as Lex->mi.pos) */
+ Lex->mi.relay_log_pos= MY_MAX(BIN_LOG_HEADER_SIZE, Lex->mi.relay_log_pos);
+ }
+#line 29423 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 127: /* master_file_def: MASTER_USE_GTID_SYM '=' CURRENT_POS_SYM */
+#line 2373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->mi.use_gtid_opt != LEX_MASTER_INFO::LEX_GTID_UNCHANGED))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MASTER_use_gtid"));
+ Lex->mi.use_gtid_opt= LEX_MASTER_INFO::LEX_GTID_CURRENT_POS;
+ }
+#line 29433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 128: /* master_file_def: MASTER_USE_GTID_SYM '=' SLAVE_POS_SYM */
+#line 2379 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->mi.use_gtid_opt != LEX_MASTER_INFO::LEX_GTID_UNCHANGED))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MASTER_use_gtid"));
+ Lex->mi.use_gtid_opt= LEX_MASTER_INFO::LEX_GTID_SLAVE_POS;
+ }
+#line 29443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 129: /* master_file_def: MASTER_USE_GTID_SYM '=' NO_SYM */
+#line 2385 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->mi.use_gtid_opt != LEX_MASTER_INFO::LEX_GTID_UNCHANGED))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MASTER_use_gtid"));
+ Lex->mi.use_gtid_opt= LEX_MASTER_INFO::LEX_GTID_NO;
+ }
+#line 29453 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 130: /* master_file_def: MASTER_DEMOTE_TO_SLAVE_SYM '=' bool */
+#line 2391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.is_demotion_opt= (bool) (yyvsp[0].ulong_num);
+ }
+#line 29461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 131: /* optional_connection_name: %empty */
+#line 2398 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->mi.connection_name= null_clex_str;
+ }
+#line 29470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 133: /* connection_name: TEXT_STRING_sys */
+#line 2407 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.connection_name= (yyvsp[0].lex_str);
+#ifdef HAVE_REPLICATION
+ if (unlikely(check_master_connection_name(&(yyvsp[0].lex_str))))
+ my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "MASTER_CONNECTION_NAME"));
+#endif
+ }
+#line 29482 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 134: /* optional_for_channel: %empty */
+#line 2418 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*do nothing */
+ }
+#line 29490 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 136: /* for_channel: FOR_SYM CHANNEL_SYM TEXT_STRING_sys */
+#line 2427 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->mi.connection_name.str != NULL)
+ {
+ my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)"));
+ }
+ else
+ {
+ Lex->mi.connection_name= (yyvsp[0].lex_str);
+#ifdef HAVE_REPLICATION
+ if (unlikely(check_master_connection_name(&(yyvsp[0].lex_str))))
+ my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "MASTER_CONNECTION_NAME"));
+#endif
+ }
+
+ }
+#line 29510 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 137: /* $@8: %empty */
+#line 2448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_create_table()))
+ MYSQL_YYABORT;
+ lex->create_info.init();
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->current_select->parsing_place= BEFORE_OPT_LIST;
+ if (lex->set_command_with_check(SQLCOM_CREATE_TABLE, (yyvsp[-2].num), (yyvsp[-3].object_ddl_options) | (yyvsp[0].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 29526 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 138: /* $@9: %empty */
+#line 2460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_SHARED_UPGRADABLE))
+ MYSQL_YYABORT;
+ lex->alter_info.reset();
+ /*
+ For CREATE TABLE we should not open the table even if it exists.
+ If the table exists, we should either not create it or replace it
+ */
+ lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
+ lex->name= null_clex_str;
+ lex->create_last_non_select_table= lex->last_table();
+ lex->inc_select_stack_outer_barrier();
+ }
+#line 29547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 139: /* create: create_or_replace opt_temporary TABLE_SYM opt_if_not_exists $@8 table_ident $@9 create_body */
+#line 2477 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
+ }
+#line 29557 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 140: /* $@10: %empty */
+#line 2483 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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();
+ if (unlikely(lex->set_command_with_check(SQLCOM_CREATE_SEQUENCE, (yyvsp[-3].num),
+ (yyvsp[-4].object_ddl_options) | (yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_UPDATING,
+ TL_WRITE, MDL_EXCLUSIVE))
+ MYSQL_YYABORT;
+
+ /*
+ For CREATE TABLE, an non-existing table is not an error.
+ Instruct open_tables() to just take an MDL lock if the
+ table does not exist.
+ */
+ lex->alter_info.reset();
+ lex->query_tables->open_strategy= TABLE_LIST::OPEN_STUB;
+ lex->name= null_clex_str;
+ lex->create_last_non_select_table= lex->last_table();
+ if (unlikely(!(lex->create_info.seq_create_info=
+ new (thd->mem_root) sequence_definition())))
+ MYSQL_YYABORT;
+ }
+#line 29591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 141: /* create: create_or_replace opt_temporary SEQUENCE_SYM opt_if_not_exists table_ident $@10 opt_sequence opt_create_table_options */
+#line 2513 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+
+ if (unlikely(lex->create_info.seq_create_info->check_and_adjust(1)))
+ {
+ my_error(ER_SEQUENCE_INVALID_DATA, MYF(0),
+ lex->first_select_lex()->table_list.first->db.str,
+ lex->first_select_lex()->table_list.first->
+ table_name.str);
+ MYSQL_YYABORT;
+ }
+
+ /* No fields specified, generate them */
+ if (unlikely(prepare_sequence_fields(thd,
+ &lex->alter_info.create_list)))
+ MYSQL_YYABORT;
+
+ /* CREATE SEQUENCE always creates a sequence */
+ Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
+ Lex->create_info.sequence= 1;
+
+ create_table_set_open_action_and_adjust_tables(lex);
+ Lex->pop_select(); //main select
+ }
+#line 29620 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 142: /* $@11: %empty */
+#line 2538 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 29629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 143: /* $@12: %empty */
+#line 2545 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index(Key::MULTIPLE, &(yyvsp[-3].ident_sys), (yyvsp[-2].key_alg), (yyvsp[-7].object_ddl_options) | (yyvsp[-5].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 29640 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 144: /* create: create_or_replace INDEX_SYM opt_if_not_exists $@11 ident opt_key_algorithm_clause ON table_ident $@12 '(' key_list ')' opt_lock_wait_timeout normal_key_options opt_index_lock_algorithm */
+#line 2553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 145: /* $@13: %empty */
+#line 2557 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 29657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 146: /* $@14: %empty */
+#line 2564 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index(Key::UNIQUE, &(yyvsp[-3].ident_sys), (yyvsp[-2].key_alg), (yyvsp[-8].object_ddl_options) | (yyvsp[-5].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 29668 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 147: /* create: create_or_replace UNIQUE_SYM INDEX_SYM opt_if_not_exists $@13 ident opt_key_algorithm_clause ON table_ident $@14 '(' key_list opt_without_overlaps ')' opt_lock_wait_timeout normal_key_options opt_index_lock_algorithm */
+#line 2573 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 148: /* $@15: %empty */
+#line 2577 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 29685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 149: /* $@16: %empty */
+#line 2583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index((yyvsp[-6].key_type), &(yyvsp[-2].ident_sys), HA_KEY_ALG_UNDEF, (yyvsp[-7].object_ddl_options) | (yyvsp[-3].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 29696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 150: /* create: create_or_replace fulltext INDEX_SYM $@15 opt_if_not_exists ident ON table_ident $@16 '(' key_list ')' opt_lock_wait_timeout fulltext_key_options opt_index_lock_algorithm */
+#line 2591 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29704 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 151: /* $@17: %empty */
+#line 2595 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 29713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 152: /* $@18: %empty */
+#line 2601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_create_index_prepare((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ if (Lex->add_create_index((yyvsp[-6].key_type), &(yyvsp[-2].ident_sys), HA_KEY_ALG_UNDEF, (yyvsp[-7].object_ddl_options) | (yyvsp[-3].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 29724 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 153: /* create: create_or_replace spatial INDEX_SYM $@17 opt_if_not_exists ident ON table_ident $@18 '(' key_list ')' opt_lock_wait_timeout spatial_key_options opt_index_lock_algorithm */
+#line 2609 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29732 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 154: /* $@19: %empty */
+#line 2613 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.init();
+ }
+#line 29740 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 155: /* create: create_or_replace DATABASE opt_if_not_exists ident $@19 opt_create_database_options */
+#line 2617 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(lex->set_command_with_check(SQLCOM_CREATE_DB, 0,
+ (yyvsp[-5].object_ddl_options) | (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ lex->name= (yyvsp[-2].ident_sys);
+ }
+#line 29752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 156: /* $@20: %empty */
+#line 2626 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
+ if (Lex->add_create_view(thd, (yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options),
+ DTYPE_ALGORITHM_UNDEFINED, (yyvsp[-3].view_suid), (yyvsp[0].table)))
+ MYSQL_YYABORT;
+ }
+#line 29765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 157: /* create: create_or_replace definer_opt opt_view_suid VIEW_SYM opt_if_not_exists table_ident $@20 view_list_opt AS view_select */
+#line 2635 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29773 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 158: /* $@21: %empty */
+#line 2640 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_create_view(thd, (yyvsp[-6].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-5].num), (yyvsp[-3].view_suid), (yyvsp[0].table))))
+ MYSQL_YYABORT;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->inc_select_stack_outer_barrier();
+ }
+#line 29785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 159: /* create: create_or_replace view_algorithm definer_opt opt_view_suid VIEW_SYM opt_if_not_exists table_ident $@21 view_list_opt AS view_select */
+#line 2648 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 160: /* $@22: %empty */
+#line 2652 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->create_info.set((yyvsp[-2].object_ddl_options));
+ }
+#line 29803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 161: /* create: create_or_replace definer_opt TRIGGER_SYM $@22 trigger_tail */
+#line 2658 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 162: /* $@23: %empty */
+#line 2662 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->create_info.set((yyvsp[-2].object_ddl_options));
+ }
+#line 29821 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 163: /* create: create_or_replace definer_opt EVENT_SYM $@23 event_tail */
+#line 2668 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 29829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 164: /* create: 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 */
+#line 2673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_command_with_check(SQLCOM_CREATE_USER,
+ (yyvsp[-7].object_ddl_options) | (yyvsp[-5].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 29839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 165: /* create: create_or_replace ROLE_SYM opt_if_not_exists clear_privileges role_list opt_with_admin */
+#line 2680 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_command_with_check(SQLCOM_CREATE_ROLE,
+ (yyvsp[-5].object_ddl_options) | (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 29849 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 166: /* $@24: %empty */
+#line 2685 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->set_command(SQLCOM_CREATE_SERVER, (yyvsp[0].object_ddl_options)); }
+#line 29855 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 167: /* create: create_or_replace $@24 server_def */
+#line 2687 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 29861 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 169: /* opt_sequence: %empty */
+#line 2692 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 29867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 173: /* sequence_def: MINVALUE_SYM opt_equal longlong_num */
+#line 2703 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.seq_create_info->min_value= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
+ }
+#line 29876 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 174: /* sequence_def: NO_SYM MINVALUE_SYM */
+#line 2708 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_min_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MINVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
+ }
+#line 29886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 175: /* sequence_def: NOMINVALUE_SYM */
+#line 2714 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_min_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MINVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
+ }
+#line 29896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 176: /* sequence_def: MAXVALUE_SYM opt_equal longlong_num */
+#line 2720 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_max_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
+ Lex->create_info.seq_create_info->max_value= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_max_value;
+ }
+#line 29908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 177: /* sequence_def: NO_SYM MAXVALUE_SYM */
+#line 2728 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_max_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_max_value;
+ }
+#line 29918 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 178: /* sequence_def: NOMAXVALUE_SYM */
+#line 2734 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_max_value))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_max_value;
+ }
+#line 29928 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 179: /* sequence_def: START_SYM opt_with longlong_num */
+#line 2740 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_start))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "START"));
+ Lex->create_info.seq_create_info->start= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_start;
+ }
+#line 29940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 180: /* sequence_def: INCREMENT_SYM opt_by longlong_num */
+#line 2748 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_increment))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "INCREMENT"));
+ Lex->create_info.seq_create_info->increment= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_increment;
+ }
+#line 29952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 181: /* sequence_def: CACHE_SYM opt_equal longlong_num */
+#line 2756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cache))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CACHE"));
+ Lex->create_info.seq_create_info->cache= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cache;
+ }
+#line 29964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 182: /* sequence_def: NOCACHE_SYM */
+#line 2764 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cache))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CACHE"));
+ Lex->create_info.seq_create_info->cache= 0;
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cache;
+ }
+#line 29976 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 183: /* sequence_def: CYCLE_SYM */
+#line 2772 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cycle))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CYCLE"));
+ Lex->create_info.seq_create_info->cycle= 1;
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cycle;
+ }
+#line 29988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 184: /* sequence_def: NOCYCLE_SYM */
+#line 2780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_cycle))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CYCLE"));
+ Lex->create_info.seq_create_info->cycle= 0;
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_cycle;
+ }
+#line 30000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 185: /* sequence_def: RESTART_SYM */
+#line 2788 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, "RESTART");
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_restart))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "RESTART"));
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_restart;
+ }
+#line 30016 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 186: /* sequence_def: RESTART_SYM opt_with longlong_num */
+#line 2800 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, "RESTART");
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->create_info.seq_create_info->used_fields &
+ seq_field_used_restart))
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "RESTART"));
+ Lex->create_info.seq_create_info->restart= (yyvsp[0].longlong_number);
+ Lex->create_info.seq_create_info->used_fields|= seq_field_used_restart | seq_field_used_restart_value;
+ }
+#line 30033 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 187: /* force_lookahead: %empty */
+#line 2815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30039 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 188: /* force_lookahead: FORCE_LOOKAHEAD */
+#line 2815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30045 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 189: /* $@25: %empty */
+#line 2819 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ Lex->server_options.reset((yyvsp[0].lex_str));
+ }
+#line 30055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 190: /* server_def: SERVER_SYM opt_if_not_exists ident_or_text $@25 FOREIGN DATA_SYM WRAPPER_SYM ident_or_text OPTIONS_SYM '(' server_options_list ')' */
+#line 2826 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->server_options.scheme= (yyvsp[-4].lex_str); }
+#line 30061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 193: /* server_option: USER_SYM TEXT_STRING_sys */
+#line 2836 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.username.str == 0);
+ Lex->server_options.username= (yyvsp[0].lex_str);
+ }
+#line 30070 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 194: /* server_option: HOST_SYM TEXT_STRING_sys */
+#line 2841 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
+ Lex->server_options.host= (yyvsp[0].lex_str);
+ }
+#line 30079 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 195: /* server_option: DATABASE TEXT_STRING_sys */
+#line 2846 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.db.str == 0);
+ Lex->server_options.db= (yyvsp[0].lex_str);
+ }
+#line 30088 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 196: /* server_option: OWNER_SYM TEXT_STRING_sys */
+#line 2851 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.owner.str == 0);
+ Lex->server_options.owner= (yyvsp[0].lex_str);
+ }
+#line 30097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 197: /* server_option: PASSWORD_SYM TEXT_STRING_sys */
+#line 2856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.password.str == 0);
+ Lex->server_options.password= (yyvsp[0].lex_str);
+ }
+#line 30106 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 198: /* server_option: SOCKET_SYM TEXT_STRING_sys */
+#line 2861 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS(Lex->server_options.socket.str == 0);
+ Lex->server_options.socket= (yyvsp[0].lex_str);
+ }
+#line 30115 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 199: /* server_option: PORT_SYM ulong_num */
+#line 2866 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->server_options.port= (yyvsp[0].ulong_num);
+ }
+#line 30123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 200: /* $@26: %empty */
+#line 2873 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+
+ lex->stmt_definition_begin= (yyvsp[-2].simple_string);
+ if (unlikely(lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ if (unlikely(!(lex->event_parse_data=
+ Event_parse_data::new_instance(thd))))
+ MYSQL_YYABORT;
+ lex->event_parse_data->identifier= (yyvsp[0].spname);
+ lex->event_parse_data->on_completion=
+ Event_parse_data::ON_COMPLETION_DROP;
+
+ lex->sql_command= SQLCOM_CREATE_EVENT;
+ /* We need that for disallowing subqueries */
+ }
+#line 30144 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 201: /* event_tail: remember_name opt_if_not_exists sp_name $@26 ON SCHEDULE_SYM ev_schedule_time opt_ev_on_completion opt_ev_status opt_ev_comment DO_SYM ev_sql_stmt */
+#line 2894 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ sql_command is set here because some rules in ev_sql_stmt
+ can overwrite it
+ */
+ Lex->sql_command= SQLCOM_CREATE_EVENT;
+ }
+#line 30156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 202: /* $@27: %empty */
+#line 2905 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_expression= (yyvsp[-1].item);
+ Lex->event_parse_data->interval= (yyvsp[0].interval);
+ }
+#line 30165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 204: /* ev_schedule_time: AT_SYM expr */
+#line 2912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_execute_at= (yyvsp[0].item);
+ }
+#line 30173 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 205: /* opt_ev_status: %empty */
+#line 2918 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 30179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 206: /* opt_ev_status: ENABLE_SYM */
+#line 2920 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->status= Event_parse_data::ENABLED;
+ Lex->event_parse_data->status_changed= true;
+ (yyval.num)= 1;
+ }
+#line 30189 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 207: /* opt_ev_status: DISABLE_SYM ON SLAVE */
+#line 2926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->status= Event_parse_data::SLAVESIDE_DISABLED;
+ Lex->event_parse_data->status_changed= true;
+ (yyval.num)= 1;
+ }
+#line 30199 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 208: /* opt_ev_status: DISABLE_SYM */
+#line 2932 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->status= Event_parse_data::DISABLED;
+ Lex->event_parse_data->status_changed= true;
+ (yyval.num)= 1;
+ }
+#line 30209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 209: /* ev_starts: %empty */
+#line 2941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_now_local(thd, 0);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ Lex->event_parse_data->item_starts= item;
+ }
+#line 30220 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 210: /* ev_starts: STARTS_SYM expr */
+#line 2948 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_starts= (yyvsp[0].item);
+ }
+#line 30228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 212: /* ev_ends: ENDS_SYM expr */
+#line 2956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->item_ends= (yyvsp[0].item);
+ }
+#line 30236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 213: /* opt_ev_on_completion: %empty */
+#line 2962 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 30242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 215: /* ev_on_completion: ON COMPLETION_SYM opt_not PRESERVE_SYM */
+#line 2968 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->event_parse_data->on_completion= (yyvsp[-1].num)
+ ? Event_parse_data::ON_COMPLETION_DROP
+ : Event_parse_data::ON_COMPLETION_PRESERVE;
+ (yyval.num)= 1;
+ }
+#line 30253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 216: /* opt_ev_comment: %empty */
+#line 2977 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 30259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 217: /* opt_ev_comment: COMMENT_SYM TEXT_STRING_sys */
+#line 2979 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->comment= Lex->event_parse_data->comment= (yyvsp[0].lex_str);
+ (yyval.num)= 1;
+ }
+#line 30268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 218: /* $@28: %empty */
+#line 2986 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= YYLIP;
+
+ /*
+ This stops the following :
+ - CREATE EVENT ... DO CREATE EVENT ...;
+ - ALTER EVENT ... DO CREATE EVENT ...;
+ - CREATE EVENT ... DO ALTER EVENT DO ....;
+ - CREATE PROCEDURE ... BEGIN CREATE EVENT ... END|
+ This allows:
+ - CREATE EVENT ... DO DROP EVENT yyy;
+ - CREATE EVENT ... DO ALTER EVENT yyy;
+ (the nested ALTER EVENT can have anything but DO clause)
+ - ALTER EVENT ... DO ALTER EVENT yyy;
+ (the nested ALTER EVENT can have anything but DO clause)
+ - ALTER EVENT ... DO DROP EVENT yyy;
+ - CREATE PROCEDURE ... BEGIN ALTER EVENT ... END|
+ (the nested ALTER EVENT can have anything but DO clause)
+ - CREATE PROCEDURE ... BEGIN DROP EVENT ... END|
+ */
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_EVENT_RECURSION_FORBIDDEN, MYF(0)));
+
+ if (unlikely(!lex->make_sp_head(thd,
+ lex->event_parse_data->identifier,
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+
+ lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
+ }
+#line 30305 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 219: /* ev_sql_stmt: $@28 sp_proc_stmt force_lookahead */
+#line 3019 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* return back to the original memory root ASAP */
+ if (Lex->sp_body_finalize_event(thd))
+ MYSQL_YYABORT;
+ }
+#line 30315 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 220: /* clear_privileges: %empty */
+#line 3028 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->users_list.empty();
+ lex->first_select_lex()->db= null_clex_str;
+ lex->account_options.reset();
+ }
+#line 30326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 221: /* opt_aggregate: %empty */
+#line 3037 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_aggregate_type)= NOT_AGGREGATE; }
+#line 30332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 222: /* opt_aggregate: AGGREGATE_SYM */
+#line 3038 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_aggregate_type)= GROUP_AGGREGATE; }
+#line 30338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 223: /* sp_handler: FUNCTION_SYM */
+#line 3043 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_function; }
+#line 30344 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 224: /* sp_handler: PROCEDURE_SYM */
+#line 3044 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_procedure; }
+#line 30350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 225: /* sp_handler: PACKAGE_ORACLE_SYM */
+#line 3045 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_package_spec; }
+#line 30356 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 226: /* sp_handler: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM */
+#line 3046 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_handler)= &sp_handler_package_body; }
+#line 30362 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 227: /* sp_name: ident '.' ident */
+#line 3052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 30371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 228: /* sp_name: ident */
+#line 3057 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 30380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 229: /* sp_a_chistics: %empty */
+#line 3064 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 230: /* sp_a_chistics: sp_a_chistics sp_chistic */
+#line 3065 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 231: /* sp_c_chistics: %empty */
+#line 3069 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30398 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 232: /* sp_c_chistics: sp_c_chistics sp_c_chistic */
+#line 3070 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 233: /* sp_chistic: COMMENT_SYM TEXT_STRING_sys */
+#line 3076 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
+#line 30410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 234: /* sp_chistic: LANGUAGE_SYM SQL_SYM */
+#line 3078 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* Just parse it, we only have one language for now. */ }
+#line 30416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 235: /* sp_chistic: NO_SYM SQL_SYM */
+#line 3080 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_NO_SQL; }
+#line 30422 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 236: /* sp_chistic: CONTAINS_SYM SQL_SYM */
+#line 3082 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_CONTAINS_SQL; }
+#line 30428 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 237: /* sp_chistic: READS_SYM SQL_SYM DATA_SYM */
+#line 3084 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_READS_SQL_DATA; }
+#line 30434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 238: /* sp_chistic: MODIFIES_SYM SQL_SYM DATA_SYM */
+#line 3086 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.daccess= SP_MODIFIES_SQL_DATA; }
+#line 30440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 239: /* sp_chistic: sp_suid */
+#line 3088 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.suid= (yyvsp[0].sp_suid); }
+#line 30446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 240: /* sp_c_chistic: sp_chistic */
+#line 3093 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 30452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 241: /* sp_c_chistic: opt_not DETERMINISTIC_SYM */
+#line 3094 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.detistic= ! (yyvsp[-1].num); }
+#line 30458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 242: /* sp_suid: SQL_SYM SECURITY_SYM DEFINER_SYM */
+#line 3098 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_suid)= SP_IS_SUID; }
+#line 30464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 243: /* sp_suid: SQL_SYM SECURITY_SYM INVOKER_SYM */
+#line 3099 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_suid)= SP_IS_NOT_SUID; }
+#line 30470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 244: /* $@29: %empty */
+#line 3104 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->call_statement_start(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 30479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 245: /* call: CALL_SYM ident $@29 opt_sp_cparam_list */
+#line 3109 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 30488 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 246: /* $@30: %empty */
+#line 3114 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->call_statement_start(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 30497 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 247: /* call: CALL_SYM ident '.' ident $@30 opt_sp_cparam_list */
+#line 3119 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 30506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 248: /* $@31: %empty */
+#line 3124 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->call_statement_start(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 30515 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 249: /* call: CALL_SYM ident '.' ident '.' ident $@31 opt_sp_cparam_list */
+#line 3129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 30524 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 254: /* sp_cparams: sp_cparams ',' expr */
+#line 3148 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
+ }
+#line 30532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 255: /* sp_cparams: expr */
+#line 3152 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
+ }
+#line 30540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 256: /* sp_fdparam_list: %empty */
+#line 3160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ Lex->sphead->m_param_end= Lex->sphead->m_param_begin;
+ }
+#line 30549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 257: /* $@32: %empty */
+#line 3165 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start();
+ }
+#line 30557 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 258: /* sp_fdparam_list: $@32 sp_fdparams */
+#line 3169 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
+ }
+#line 30565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 261: /* sp_param_name: ident */
+#line 3181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.spvar)= Lex->sp_param_init(&(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 30574 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 266: /* sp_parameter_type: IN_SYM */
+#line 3199 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_IN; }
+#line 30580 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 267: /* sp_parameter_type: OUT_SYM */
+#line 3200 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_OUT; }
+#line 30586 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 268: /* sp_parameter_type: INOUT_SYM */
+#line 3201 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
+#line 30592 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 269: /* $@33: %empty */
+#line 3206 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
+ }
+#line 30600 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 270: /* sp_parenthesized_pdparam_list: '(' $@33 sp_pdparam_list ')' */
+#line 3211 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
+ }
+#line 30608 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 272: /* sp_proc_stmts: %empty */
+#line 3221 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 274: /* sp_proc_stmts1: sp_proc_stmt ';' */
+#line 3226 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30620 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 276: /* optionally_qualified_column_ident: sp_decl_ident */
+#line 3233 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
+ Qualified_column_ident(&(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 30630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 277: /* optionally_qualified_column_ident: sp_decl_ident '.' ident */
+#line 3239 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
+ Qualified_column_ident(&(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 30640 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 278: /* optionally_qualified_column_ident: sp_decl_ident '.' ident '.' ident */
+#line 3245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
+ Qualified_column_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 30650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 279: /* row_field_definition: row_field_name field_type */
+#line 3255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
+ COLUMN_DEFINITION_ROUTINE_LOCAL);
+ }
+#line 30659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 280: /* row_field_definition_list: row_field_definition */
+#line 3263 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.spvar_definition_list)= Row_definition_list::make(thd->mem_root, (yyvsp[0].spvar_definition))))
+ MYSQL_YYABORT;
+ }
+#line 30668 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 281: /* row_field_definition_list: row_field_definition_list ',' row_field_definition */
+#line 3268 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.spvar_definition_list)= (yyvsp[-2].spvar_definition_list))->append_uniq(thd->mem_root, (yyvsp[0].spvar_definition)))
+ MYSQL_YYABORT;
+ }
+#line 30677 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 282: /* row_type_body: '(' row_field_definition_list ')' */
+#line 3275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_definition_list)= (yyvsp[-1].spvar_definition_list); }
+#line 30683 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 283: /* sp_decl_idents_init_vars: sp_decl_idents */
+#line 3280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_variable_declarations_init(thd, (yyvsp[0].num));
+ }
+#line 30691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 284: /* $@34: %empty */
+#line 3288 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
+ COLUMN_DEFINITION_ROUTINE_LOCAL);
+ }
+#line 30700 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 285: /* sp_decl_variable_list: sp_decl_idents_init_vars field_type $@34 sp_opt_default */
+#line 3293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_finalize(thd, (yyvsp[-3].num),
+ &Lex->last_field[0],
+ (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-3].num));
+ }
+#line 30712 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 286: /* sp_decl_variable_list: sp_decl_idents_init_vars ROW_SYM row_type_body sp_opt_default */
+#line 3303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_row_finalize(thd, (yyvsp[-3].num), (yyvsp[-1].spvar_definition_list), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-3].num));
+ }
+#line 30722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 288: /* $@35: %empty */
+#line 3313 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_handler_declaration_init(thd, (yyvsp[-2].num))))
+ MYSQL_YYABORT;
+ }
+#line 30731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 289: /* sp_decl_handler: sp_handler_type HANDLER_SYM FOR_SYM $@35 sp_hcond_list sp_proc_stmt */
+#line 3318 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_handler_declaration_finalize(thd, (yyvsp[-5].num))))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).curs= 0;
+ (yyval.spblock).hndlrs= 1;
+ }
+#line 30742 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 292: /* sp_cursor_stmt_lex: %empty */
+#line 3333 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(thd->lex->sphead);
+ if (unlikely(!((yyval.sp_cursor_stmt)= new (thd->mem_root)
+ sp_lex_cursor(thd, thd->lex))))
+ MYSQL_YYABORT;
+ }
+#line 30753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 293: /* $@36: %empty */
+#line 3343 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(thd->free_list == NULL);
+ Lex->sphead->reset_lex(thd, (yyvsp[0].sp_cursor_stmt));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 30764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 294: /* sp_cursor_stmt: sp_cursor_stmt_lex $@36 select */
+#line 3350 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex == (yyvsp[-2].sp_cursor_stmt));
+ Lex->pop_select(); //main select
+ if (unlikely((yyvsp[-2].sp_cursor_stmt)->stmt_finalize(thd)) ||
+ unlikely((yyvsp[-2].sp_cursor_stmt)->sphead->restore_lex(thd)))
+ MYSQL_YYABORT;
+ (yyval.sp_cursor_stmt)= (yyvsp[-2].sp_cursor_stmt);
+ }
+#line 30777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 295: /* sp_handler_type: EXIT_MARIADB_SYM */
+#line 3361 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::EXIT; }
+#line 30783 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 296: /* sp_handler_type: CONTINUE_MARIADB_SYM */
+#line 3362 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::CONTINUE; }
+#line 30789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 297: /* sp_handler_type: EXIT_ORACLE_SYM */
+#line 3363 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::EXIT; }
+#line 30795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 298: /* sp_handler_type: CONTINUE_ORACLE_SYM */
+#line 3364 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= sp_handler::CONTINUE; }
+#line 30801 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 299: /* sp_hcond_list: sp_hcond_element */
+#line 3370 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 30807 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 300: /* sp_hcond_list: sp_hcond_list ',' sp_hcond_element */
+#line 3372 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)+= 1; }
+#line 30813 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 301: /* sp_hcond_element: sp_hcond */
+#line 3377 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ sp_pcontext *ctx= lex->spcont->parent_context();
+
+ if (unlikely(ctx->check_duplicate_handler((yyvsp[0].spcondvalue))))
+ my_yyabort_error((ER_SP_DUP_HANDLER, MYF(0)));
+
+ sp_instr_hpush_jump *i= (sp_instr_hpush_jump *)sp->last_instruction();
+ i->add_condition((yyvsp[0].spcondvalue));
+ }
+#line 30829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 302: /* sp_cond: ulong_num */
+#line 3392 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* mysql errno */
+ if (unlikely((yyvsp[0].ulong_num) == 0))
+ my_yyabort_error((ER_WRONG_VALUE, MYF(0), "CONDITION", "0"));
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value((yyvsp[0].ulong_num));
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 30841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 304: /* sqlstate: SQLSTATE_SYM opt_value TEXT_STRING_literal */
+#line 3404 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* SQLSTATE */
+
+ /*
+ An error is triggered:
+ - if the specified string is not a valid SQLSTATE,
+ - or if it represents the completion condition -- it is not
+ allowed to SIGNAL, or declare a handler for the completion
+ condition.
+ */
+ if (unlikely(!is_sqlstate_valid(&(yyvsp[0].lex_str)) ||
+ is_sqlstate_completion((yyvsp[0].lex_str).str)))
+ my_yyabort_error((ER_SP_BAD_SQLSTATE, MYF(0), (yyvsp[0].lex_str).str));
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value((yyvsp[0].lex_str).str);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 30862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 305: /* opt_value: %empty */
+#line 3423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30868 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 306: /* opt_value: VALUE_SYM */
+#line 3424 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 30874 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 307: /* sp_hcond: sp_cond */
+#line 3429 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= (yyvsp[0].spcondvalue);
+ }
+#line 30882 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 308: /* sp_hcond: ident */
+#line 3433 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= Lex->spcont->find_declared_or_predefined_condition(thd, &(yyvsp[0].ident_sys));
+ if (unlikely((yyval.spcondvalue) == NULL))
+ my_yyabort_error((ER_SP_COND_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 30892 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 309: /* sp_hcond: SQLWARNING_SYM */
+#line 3439 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::WARNING);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 30902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 310: /* sp_hcond: not FOUND_SYM */
+#line 3445 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::NOT_FOUND);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 30912 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 311: /* sp_hcond: SQLEXCEPTION_SYM */
+#line 3451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 30922 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 312: /* sp_hcond: OTHERS_ORACLE_SYM */
+#line 3457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
+ if (unlikely((yyval.spcondvalue) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 30932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 313: /* raise_stmt_oracle: RAISE_ORACLE_SYM opt_set_signal_information */
+#line 3467 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_resignal_statement(thd, NULL)))
+ MYSQL_YYABORT;
+ }
+#line 30941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 314: /* raise_stmt_oracle: RAISE_ORACLE_SYM signal_value opt_set_signal_information */
+#line 3472 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue))))
+ MYSQL_YYABORT;
+ }
+#line 30950 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 315: /* signal_stmt: SIGNAL_SYM signal_value opt_set_signal_information */
+#line 3480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue)))
+ MYSQL_YYABORT;
+ }
+#line 30959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 316: /* signal_value: ident */
+#line 3488 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.spcondvalue)= Lex->stmt_signal_value((yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 30968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 317: /* signal_value: sqlstate */
+#line 3493 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
+#line 30974 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 318: /* opt_signal_value: %empty */
+#line 3498 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spcondvalue)= NULL; }
+#line 30980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 319: /* opt_signal_value: signal_value */
+#line 3500 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
+#line 30986 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 320: /* opt_set_signal_information: %empty */
+#line 3505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->m_parser_state->m_yacc.m_set_signal_info.clear();
+ }
+#line 30994 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 322: /* signal_information_item_list: signal_condition_information_item_name '=' signal_allowed_expr */
+#line 3513 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Set_signal_information *info;
+ info= &thd->m_parser_state->m_yacc.m_set_signal_info;
+ int index= (int) (yyvsp[-2].diag_condition_item_name);
+ info->clear();
+ info->m_item[index]= (yyvsp[0].item);
+ }
+#line 31006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 323: /* signal_information_item_list: signal_information_item_list ',' signal_condition_information_item_name '=' signal_allowed_expr */
+#line 3522 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Set_signal_information *info;
+ info= &thd->m_parser_state->m_yacc.m_set_signal_info;
+ int index= (int) (yyvsp[-2].diag_condition_item_name);
+ if (unlikely(info->m_item[index] != NULL))
+ my_yyabort_error((ER_DUP_SIGNAL_SET, MYF(0),
+ Diag_condition_item_names[index].str));
+ info->m_item[index]= (yyvsp[0].item);
+ }
+#line 31020 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 324: /* signal_allowed_expr: literal */
+#line 3538 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 31026 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 325: /* signal_allowed_expr: variable */
+#line 3540 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].item)->type() == Item::FUNC_ITEM)
+ {
+ Item_func *item= (Item_func*) (yyvsp[0].item);
+ if (unlikely(item->functype() == Item_func::SUSERVAR_FUNC))
+ {
+ /*
+ Don't allow the following syntax:
+ SIGNAL/RESIGNAL ...
+ SET <signal condition item name> = @foo := expr
+ */
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 31048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 326: /* signal_allowed_expr: simple_ident */
+#line 3558 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 31054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 327: /* signal_condition_information_item_name: CLASS_ORIGIN_SYM */
+#line 3564 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CLASS_ORIGIN; }
+#line 31060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 328: /* signal_condition_information_item_name: SUBCLASS_ORIGIN_SYM */
+#line 3566 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_SUBCLASS_ORIGIN; }
+#line 31066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 329: /* signal_condition_information_item_name: CONSTRAINT_CATALOG_SYM */
+#line 3568 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_CATALOG; }
+#line 31072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 330: /* signal_condition_information_item_name: CONSTRAINT_SCHEMA_SYM */
+#line 3570 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_SCHEMA; }
+#line 31078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 331: /* signal_condition_information_item_name: CONSTRAINT_NAME_SYM */
+#line 3572 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_NAME; }
+#line 31084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 332: /* signal_condition_information_item_name: CATALOG_NAME_SYM */
+#line 3574 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CATALOG_NAME; }
+#line 31090 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 333: /* signal_condition_information_item_name: SCHEMA_NAME_SYM */
+#line 3576 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_SCHEMA_NAME; }
+#line 31096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 334: /* signal_condition_information_item_name: TABLE_NAME_SYM */
+#line 3578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_TABLE_NAME; }
+#line 31102 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 335: /* signal_condition_information_item_name: COLUMN_NAME_SYM */
+#line 3580 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_COLUMN_NAME; }
+#line 31108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 336: /* signal_condition_information_item_name: CURSOR_NAME_SYM */
+#line 3582 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_CURSOR_NAME; }
+#line 31114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 337: /* signal_condition_information_item_name: MESSAGE_TEXT_SYM */
+#line 3584 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_MESSAGE_TEXT; }
+#line 31120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 338: /* signal_condition_information_item_name: MYSQL_ERRNO_SYM */
+#line 3586 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_MYSQL_ERRNO; }
+#line 31126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 339: /* signal_condition_information_item_name: ROW_NUMBER_SYM */
+#line 3588 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_condition_item_name)= DIAG_ROW_NUMBER; }
+#line 31132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 340: /* resignal_stmt: RESIGNAL_SYM opt_signal_value opt_set_signal_information */
+#line 3593 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_resignal_statement(thd, (yyvsp[-1].spcondvalue))))
+ MYSQL_YYABORT;
+ }
+#line 31141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 341: /* get_diagnostics: GET_SYM which_area DIAGNOSTICS_SYM diagnostics_information */
+#line 3601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Diagnostics_information *info= (yyvsp[0].diag_info);
+
+ info->set_which_da((yyvsp[-2].diag_area));
+
+ Lex->sql_command= SQLCOM_GET_DIAGNOSTICS;
+ Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_get_diagnostics(info);
+
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31157 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 342: /* which_area: %empty */
+#line 3616 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
+#line 31163 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 343: /* which_area: CURRENT_SYM */
+#line 3618 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
+#line 31169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 344: /* diagnostics_information: statement_information */
+#line 3623 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.diag_info)= new (thd->mem_root) Statement_information((yyvsp[0].stmt_info_list));
+ if (unlikely((yyval.diag_info) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 345: /* diagnostics_information: CONDITION_SYM condition_number condition_information */
+#line 3629 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.diag_info)= new (thd->mem_root) Condition_information((yyvsp[-1].item), (yyvsp[0].cond_info_list));
+ if (unlikely((yyval.diag_info) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31189 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 346: /* statement_information: statement_information_item */
+#line 3638 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.stmt_info_list)= new (thd->mem_root) List<Statement_information_item>;
+ if (unlikely((yyval.stmt_info_list) == NULL) ||
+ unlikely((yyval.stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 31200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 347: /* statement_information: statement_information ',' statement_information_item */
+#line 3645 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-2].stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.stmt_info_list)= (yyvsp[-2].stmt_info_list);
+ }
+#line 31210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 348: /* statement_information_item: simple_target_specification '=' statement_information_item_name */
+#line 3654 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.stmt_info_item)= new (thd->mem_root) Statement_information_item((yyvsp[0].stmt_info_item_name), (yyvsp[-2].item));
+ if (unlikely((yyval.stmt_info_item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31220 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 349: /* simple_target_specification: ident_cli */
+#line 3663 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= thd->lex->create_item_for_sp_var(&(yyvsp[0].ident_cli), NULL))))
+ MYSQL_YYABORT;
+ }
+#line 31229 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 350: /* simple_target_specification: '@' ident_or_text */
+#line 3668 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31244 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 351: /* statement_information_item_name: NUMBER_MARIADB_SYM */
+#line 3682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
+#line 31250 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 352: /* statement_information_item_name: NUMBER_ORACLE_SYM */
+#line 3684 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
+#line 31256 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 353: /* statement_information_item_name: ROW_COUNT_SYM */
+#line 3686 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.stmt_info_item_name)= Statement_information_item::ROW_COUNT; }
+#line 31262 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 354: /* condition_number: signal_allowed_expr */
+#line 3695 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 31268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 355: /* condition_information: condition_information_item */
+#line 3700 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.cond_info_list)= new (thd->mem_root) List<Condition_information_item>;
+ if (unlikely((yyval.cond_info_list) == NULL) ||
+ unlikely((yyval.cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 31279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 356: /* condition_information: condition_information ',' condition_information_item */
+#line 3707 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-2].cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.cond_info_list)= (yyvsp[-2].cond_info_list);
+ }
+#line 31289 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 357: /* condition_information_item: simple_target_specification '=' condition_information_item_name */
+#line 3716 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.cond_info_item)= new (thd->mem_root) Condition_information_item((yyvsp[0].cond_info_item_name), (yyvsp[-2].item));
+ if (unlikely((yyval.cond_info_item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 31299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 358: /* condition_information_item_name: CLASS_ORIGIN_SYM */
+#line 3725 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CLASS_ORIGIN; }
+#line 31305 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 359: /* condition_information_item_name: SUBCLASS_ORIGIN_SYM */
+#line 3727 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::SUBCLASS_ORIGIN; }
+#line 31311 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 360: /* condition_information_item_name: CONSTRAINT_CATALOG_SYM */
+#line 3729 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_CATALOG; }
+#line 31317 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 361: /* condition_information_item_name: CONSTRAINT_SCHEMA_SYM */
+#line 3731 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_SCHEMA; }
+#line 31323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 362: /* condition_information_item_name: CONSTRAINT_NAME_SYM */
+#line 3733 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_NAME; }
+#line 31329 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 363: /* condition_information_item_name: CATALOG_NAME_SYM */
+#line 3735 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CATALOG_NAME; }
+#line 31335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 364: /* condition_information_item_name: SCHEMA_NAME_SYM */
+#line 3737 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::SCHEMA_NAME; }
+#line 31341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 365: /* condition_information_item_name: TABLE_NAME_SYM */
+#line 3739 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::TABLE_NAME; }
+#line 31347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 366: /* condition_information_item_name: COLUMN_NAME_SYM */
+#line 3741 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::COLUMN_NAME; }
+#line 31353 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 367: /* condition_information_item_name: CURSOR_NAME_SYM */
+#line 3743 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::CURSOR_NAME; }
+#line 31359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 368: /* condition_information_item_name: MESSAGE_TEXT_SYM */
+#line 3745 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::MESSAGE_TEXT; }
+#line 31365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 369: /* condition_information_item_name: MYSQL_ERRNO_SYM */
+#line 3747 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::MYSQL_ERRNO; }
+#line 31371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 370: /* condition_information_item_name: RETURNED_SQLSTATE_SYM */
+#line 3749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::RETURNED_SQLSTATE; }
+#line 31377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 371: /* condition_information_item_name: ROW_NUMBER_SYM */
+#line 3751 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.cond_info_item_name)= Condition_information_item::ROW_NUMBER; }
+#line 31383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 373: /* sp_decl_ident: keyword_sp_decl */
+#line 3757 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_ident_cli(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 31392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 374: /* sp_decl_idents: sp_decl_ident */
+#line 3765 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* NOTE: field definition is filled in sp_decl section. */
+
+ LEX *lex= Lex;
+ sp_pcontext *spc= lex->spcont;
+
+ if (unlikely(spc->find_variable(&(yyvsp[0].ident_sys), TRUE)))
+ my_yyabort_error((ER_SP_DUP_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+ spc->add_variable(thd, &(yyvsp[0].ident_sys));
+ (yyval.num)= 1;
+ }
+#line 31408 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 375: /* sp_decl_idents: sp_decl_idents ',' ident */
+#line 3777 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* NOTE: field definition is filled in sp_decl section. */
+
+ LEX *lex= Lex;
+ sp_pcontext *spc= lex->spcont;
+
+ if (unlikely(spc->find_variable(&(yyvsp[0].ident_sys), TRUE)))
+ my_yyabort_error((ER_SP_DUP_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+ spc->add_variable(thd, &(yyvsp[0].ident_sys));
+ (yyval.num)= (yyvsp[-2].num) + 1;
+ }
+#line 31424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 376: /* $@37: %empty */
+#line 3792 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sphead->new_cont_backpatch(NULL);
+ }
+#line 31434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 377: /* sp_proc_stmt_if: IF_SYM $@37 sp_if END IF_SYM */
+#line 3798 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sphead->do_cont_backpatch(); }
+#line 31440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 378: /* $@38: %empty */
+#line 3802 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ 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();
+ }
+#line 31457 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 379: /* sp_proc_stmt_statement: $@38 sp_statement */
+#line 3815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->sp_proc_stmt_statement_finalize(thd, yychar == YYEMPTY) ||
+ Lex->sphead->restore_lex(thd))
+ MYSQL_YYABORT;
+ }
+#line 31467 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 382: /* $@39: %empty */
+#line 3830 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_head *sp= (yyvsp[0].expr_lex)->sphead;
+ if (unlikely(sp->m_handler->add_instr_freturn(thd, sp, (yyvsp[0].expr_lex)->spcont,
+ (yyvsp[0].expr_lex)->get_item(), (yyvsp[0].expr_lex))))
+ MYSQL_YYABORT;
+ }
+#line 31478 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 383: /* sp_proc_stmt_return: RETURN_ALLMODES_SYM expr_lex $@39 */
+#line 3836 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 31484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 384: /* sp_proc_stmt_return: RETURN_ORACLE_SYM */
+#line 3838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ if (unlikely(sp->m_handler->add_instr_preturn(thd, sp,
+ lex->spcont)))
+ MYSQL_YYABORT;
+ }
+#line 31496 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 385: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM */
+#line 3849 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_exit_statement(thd, NULL)))
+ MYSQL_YYABORT;
+ }
+#line 31505 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 386: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM label_ident */
+#line 3854 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_exit_statement(thd, &(yyvsp[0].ident_sys), NULL)))
+ MYSQL_YYABORT;
+ }
+#line 31514 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 387: /* $@40: %empty */
+#line 3859 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_exit_statement(thd, (yyvsp[0].expr_lex)->get_item())))
+ MYSQL_YYABORT;
+ }
+#line 31523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 388: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM WHEN_SYM expr_lex $@40 */
+#line 3863 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 31529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 389: /* $@41: %empty */
+#line 3865 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_exit_statement(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].expr_lex)->get_item())))
+ MYSQL_YYABORT;
+ }
+#line 31538 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 390: /* sp_proc_stmt_exit_oracle: EXIT_ORACLE_SYM label_ident WHEN_SYM expr_lex $@41 */
+#line 3869 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 31544 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 391: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM */
+#line 3874 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_continue_statement(thd)))
+ MYSQL_YYABORT;
+ }
+#line 31553 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 392: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM label_ident */
+#line 3879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_continue_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 393: /* $@42: %empty */
+#line 3884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_continue_when_statement(thd)))
+ MYSQL_YYABORT;
+ }
+#line 31571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 394: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM WHEN_SYM expr_lex $@42 */
+#line 3888 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 31577 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 395: /* $@43: %empty */
+#line 3890 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->sp_continue_when_statement(thd, &(yyvsp[-2].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31586 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 396: /* sp_proc_stmt_continue_oracle: CONTINUE_ORACLE_SYM label_ident WHEN_SYM expr_lex $@43 */
+#line 3894 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* See the comment 'COMMENT_FOR_DESCTRUCTOR' near %destructor */ }
+#line 31592 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 397: /* sp_proc_stmt_leave: LEAVE_SYM label_ident */
+#line 3900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_leave_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 398: /* sp_proc_stmt_iterate: ITERATE_SYM label_ident */
+#line 3908 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_iterate_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 399: /* sp_proc_stmt_goto_oracle: GOTO_ORACLE_SYM label_ident */
+#line 3916 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_goto_statement(thd, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31619 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 400: /* @44: %empty */
+#line 3924 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->sphead);
+ if (unlikely(!((yyval.expr_lex)= new (thd->mem_root)
+ sp_expr_lex(thd, thd->lex))))
+ MYSQL_YYABORT;
+ Lex->sphead->reset_lex(thd, (yyval.expr_lex));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 31633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 401: /* expr_lex: @44 expr */
+#line 3934 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.expr_lex)= (yyvsp[-1].expr_lex);
+ (yyval.expr_lex)->set_item((yyvsp[0].item));
+ Lex->pop_select(); //min select
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ if ((yyval.expr_lex)->sphead->restore_lex(thd))
+ MYSQL_YYABORT;
+ }
+#line 31647 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 402: /* assignment_source_lex: %empty */
+#line 3947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->sphead);
+ if (unlikely(!((yyval.assignment_lex)= new (thd->mem_root)
+ sp_assignment_lex(thd, thd->lex))))
+ MYSQL_YYABORT;
+ }
+#line 31658 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 403: /* $@45: %empty */
+#line 3957 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(thd->free_list == NULL);
+ Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 31669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 404: /* assignment_source_expr: assignment_source_lex $@45 expr */
+#line 3964 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-2].assignment_lex) == thd->lex);
+ (yyval.assignment_lex)= (yyvsp[-2].assignment_lex);
+ (yyval.assignment_lex)->set_item_and_free_list((yyvsp[0].item), thd->free_list);
+ thd->free_list= NULL;
+ Lex->pop_select(); //min select
+ if ((yyval.assignment_lex)->sphead->restore_lex(thd))
+ MYSQL_YYABORT;
+ }
+#line 31683 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 405: /* $@46: %empty */
+#line 3977 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ Lex->current_select->parsing_place= FOR_LOOP_BOUND;
+ }
+#line 31694 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 406: /* for_loop_bound_expr: assignment_source_lex $@46 expr */
+#line 3984 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-2].assignment_lex) == thd->lex);
+ (yyval.assignment_lex)= (yyvsp[-2].assignment_lex);
+ (yyval.assignment_lex)->set_item_and_free_list((yyvsp[0].item), NULL);
+ Lex->pop_select(); //main select
+ if (unlikely((yyval.assignment_lex)->sphead->restore_lex(thd)))
+ MYSQL_YYABORT;
+ Lex->current_select->parsing_place= NO_MATTER;
+ }
+#line 31708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 407: /* cursor_actual_parameters: assignment_source_expr */
+#line 3997 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.sp_assignment_lex_list)= new (thd->mem_root) List<sp_assignment_lex>)))
+ MYSQL_YYABORT;
+ (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
+ }
+#line 31718 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 408: /* cursor_actual_parameters: cursor_actual_parameters ',' assignment_source_expr */
+#line 4003 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.sp_assignment_lex_list)= (yyvsp[-2].sp_assignment_lex_list);
+ (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
+ }
+#line 31727 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 409: /* opt_parenthesized_cursor_actual_parameters: %empty */
+#line 4010 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_assignment_lex_list)= NULL; }
+#line 31733 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 410: /* opt_parenthesized_cursor_actual_parameters: '(' cursor_actual_parameters ')' */
+#line 4011 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
+#line 31739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 414: /* sp_proc_stmt_open: OPEN_SYM ident opt_parenthesized_cursor_actual_parameters */
+#line 4022 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_open_cursor(thd, &(yyvsp[-1].ident_sys), (yyvsp[0].sp_assignment_lex_list))))
+ MYSQL_YYABORT;
+ }
+#line 31748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 415: /* sp_proc_stmt_fetch_head: FETCH_SYM ident INTO */
+#line 4030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 416: /* sp_proc_stmt_fetch_head: FETCH_SYM FROM ident INTO */
+#line 4035 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 417: /* sp_proc_stmt_fetch_head: FETCH_SYM NEXT_SYM FROM ident INTO */
+#line 4040 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 31775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 418: /* sp_proc_stmt_fetch: sp_proc_stmt_fetch_head sp_fetch_list */
+#line 4047 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 31781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 419: /* sp_proc_stmt_fetch: FETCH_SYM GROUP_SYM NEXT_SYM ROW_SYM */
+#line 4049 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_add_agg_cfetch()))
+ MYSQL_YYABORT;
+ }
+#line 31790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 420: /* sp_proc_stmt_close: CLOSE_SYM ident */
+#line 4057 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ uint offset;
+ sp_instr_cclose *i;
+
+ if (unlikely(!lex->spcont->find_cursor(&(yyvsp[0].ident_sys), &offset, false)))
+ my_yyabort_error((ER_SP_CURSOR_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
+ i= new (thd->mem_root)
+ sp_instr_cclose(sp->instructions(), lex->spcont, offset);
+ if (unlikely(i == NULL) ||
+ unlikely(sp->add_instr(i)))
+ MYSQL_YYABORT;
+ }
+#line 31809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 421: /* sp_fetch_list: ident */
+#line 4075 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ sp_pcontext *spc= lex->spcont;
+ sp_variable *spv= likely(spc != NULL)
+ ? spc->find_variable(&(yyvsp[0].ident_sys), false)
+ : NULL;
+
+ if (unlikely(!spv))
+ my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+
+ /* An SP local variable */
+ sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
+ i->add_to_varlist(spv);
+ }
+#line 31829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 422: /* sp_fetch_list: sp_fetch_list ',' ident */
+#line 4091 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ sp_pcontext *spc= lex->spcont;
+ sp_variable *spv= likely(spc != NULL)
+ ? spc->find_variable(&(yyvsp[0].ident_sys), false)
+ : NULL;
+
+ if (unlikely(!spv))
+ my_yyabort_error((ER_SP_UNDECLARED_VAR, MYF(0), (yyvsp[0].ident_sys).str));
+
+ /* An SP local variable */
+ sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
+ i->add_to_varlist(spv);
+ }
+#line 31849 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 423: /* $@47: %empty */
+#line 4110 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-1].expr_lex)->sp_if_expr(thd)))
+ MYSQL_YYABORT;
+ }
+#line 31858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 424: /* $@48: %empty */
+#line 4115 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-3].expr_lex)->sp_if_after_statements(thd)))
+ MYSQL_YYABORT;
+ }
+#line 31867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 425: /* sp_if: expr_lex THEN_SYM $@47 sp_if_then_statements $@48 sp_elseifs */
+#line 4120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ lex->sphead->backpatch(lex->spcont->pop_label());
+ }
+#line 31877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 430: /* $@49: %empty */
+#line 4136 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+
+ /**
+ An example of the CASE statement in use is
+ <pre>
+ CREATE PROCEDURE proc_19194_simple(i int)
+ BEGIN
+ DECLARE str CHAR(10);
+
+ CASE i
+ WHEN 1 THEN SET str="1";
+ WHEN 2 THEN SET str="2";
+ WHEN 3 THEN SET str="3";
+ ELSE SET str="unknown";
+ END CASE;
+
+ SELECT str;
+ END
+ </pre>
+ The actions are used to generate the following code:
+ <pre>
+ SHOW PROCEDURE CODE proc_19194_simple;
+ Pos Instruction
+ 0 set str@1 NULL
+ 1 set_case_expr (12) 0 i@0
+ 2 jump_if_not 5(12) (case_expr@0 = 1)
+ 3 set str@1 _latin1'1'
+ 4 jump 12
+ 5 jump_if_not 8(12) (case_expr@0 = 2)
+ 6 set str@1 _latin1'2'
+ 7 jump 12
+ 8 jump_if_not 11(12) (case_expr@0 = 3)
+ 9 set str@1 _latin1'3'
+ 10 jump 12
+ 11 set str@1 _latin1'unknown'
+ 12 stmt 0 "SELECT str"
+ </pre>
+ */
+
+ Lex->sphead->new_cont_backpatch(NULL);
+
+ /*
+ BACKPATCH: Creating target label for the jump to after END CASE
+ (instruction 12 in the example)
+ */
+ Lex->spcont->push_label(thd, &empty_clex_str, Lex->sphead->instructions());
+ }
+#line 31931 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 431: /* case_stmt_specification: CASE_SYM $@49 case_stmt_body else_clause_opt END CASE_SYM */
+#line 4189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ BACKPATCH: Resolving forward jump from
+ "case_stmt_action_then" to after END CASE
+ (jump from instruction 4 to 12, 7 to 12 ... in the example)
+ */
+ Lex->sphead->backpatch(Lex->spcont->pop_label());
+
+ if ((yyvsp[-3].num))
+ Lex->spcont->pop_case_expr_id();
+
+ Lex->sphead->do_cont_backpatch();
+ }
+#line 31949 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 432: /* $@50: %empty */
+#line 4206 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_expr()))
+ MYSQL_YYABORT;
+ }
+#line 31958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 433: /* case_stmt_body: expr_lex $@50 simple_when_clause_list */
+#line 4211 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 31964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 434: /* case_stmt_body: searched_when_clause_list */
+#line 4213 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 31970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 439: /* $@51: %empty */
+#line 4228 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Simple case: <caseval> = <whenval> */
+ if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(true)))
+ MYSQL_YYABORT;
+ }
+#line 31980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 440: /* simple_when_clause: WHEN_SYM expr_lex $@51 THEN_SYM sp_case_then_statements */
+#line 4235 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->case_stmt_action_then()))
+ MYSQL_YYABORT;
+ }
+#line 31989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 441: /* $@52: %empty */
+#line 4243 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].expr_lex)->case_stmt_action_when(false)))
+ MYSQL_YYABORT;
+ }
+#line 31998 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 442: /* searched_when_clause: WHEN_SYM expr_lex $@52 THEN_SYM sp_case_then_statements */
+#line 4249 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->case_stmt_action_then()))
+ MYSQL_YYABORT;
+ }
+#line 32007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 443: /* else_clause_opt: %empty */
+#line 4257 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_head *sp= lex->sphead;
+ uint ip= sp->instructions();
+ sp_instr_error *i= new (thd->mem_root)
+ sp_instr_error(ip, lex->spcont, ER_SP_CASE_NOT_FOUND);
+ if (unlikely(i == NULL) ||
+ unlikely(sp->add_instr(i)))
+ MYSQL_YYABORT;
+ }
+#line 32022 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 445: /* sp_opt_label: %empty */
+#line 4271 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 32028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 446: /* sp_opt_label: label_ident */
+#line 4272 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 32034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 447: /* opt_sp_for_loop_direction: %empty */
+#line 4277 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 32040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 448: /* opt_sp_for_loop_direction: REVERSE_SYM */
+#line 4278 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= -1; }
+#line 32046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 449: /* sp_for_loop_index_and_bounds: ident_for_loop_index sp_for_loop_bounds */
+#line 4283 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_declarations(thd, &(yyval.for_loop), &(yyvsp[-1].ident_sys), (yyvsp[0].for_loop_bounds))))
+ MYSQL_YYABORT;
+ }
+#line 32055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 450: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr DOT_DOT_SYM for_loop_bound_expr */
+#line 4292 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.for_loop_bounds)= Lex_for_loop_bounds_intrange((yyvsp[-3].num), (yyvsp[-2].assignment_lex), (yyvsp[0].assignment_lex));
+ }
+#line 32063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 451: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction for_loop_bound_expr */
+#line 4296 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.for_loop_bounds).m_direction= (yyvsp[-1].num);
+ (yyval.for_loop_bounds).m_index= (yyvsp[0].assignment_lex);
+ (yyval.for_loop_bounds).m_target_bound= NULL;
+ (yyval.for_loop_bounds).m_implicit_cursor= false;
+ }
+#line 32074 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 452: /* sp_for_loop_bounds: IN_SYM opt_sp_for_loop_direction '(' sp_cursor_stmt ')' */
+#line 4303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_implicit_cursor_statement(thd, &(yyval.for_loop_bounds),
+ (yyvsp[-1].sp_cursor_stmt))))
+ MYSQL_YYABORT;
+ }
+#line 32084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 453: /* loop_body: sp_proc_stmts1 END LOOP_SYM */
+#line 4312 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ uint ip= lex->sphead->instructions();
+ sp_label *lab= lex->spcont->last_label(); /* Jumping back */
+ sp_instr_jump *i= new (thd->mem_root)
+ sp_instr_jump(ip, lex->spcont, lab->ip);
+ if (unlikely(i == NULL) ||
+ unlikely(lex->sphead->add_instr(i)))
+ MYSQL_YYABORT;
+ }
+#line 32099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 454: /* repeat_body: sp_proc_stmts1 UNTIL_SYM expr_lex END REPEAT_SYM */
+#line 4326 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-2].expr_lex)->sp_repeat_loop_finalize(thd))
+ MYSQL_YYABORT;
+ }
+#line 32108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 455: /* pop_sp_loop_label: sp_opt_label */
+#line 4334 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32117 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 456: /* $@53: %empty */
+#line 4342 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 457: /* sp_labeled_control: sp_control_label LOOP_SYM $@53 loop_body pop_sp_loop_label */
+#line 4347 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 458: /* $@54: %empty */
+#line 4349 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 459: /* sp_labeled_control: sp_control_label WHILE_SYM $@54 while_body pop_sp_loop_label */
+#line 4354 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 460: /* $@55: %empty */
+#line 4356 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ // See "The FOR LOOP statement" comments in sql_lex.cc
+ Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
+ }
+#line 32156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 461: /* $@56: %empty */
+#line 4361 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-3].lex_str)))) // The inner WHILE block
+ MYSQL_YYABORT;
+ if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32167 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 462: /* $@57: %empty */
+#line 4368 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32176 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 463: /* sp_labeled_control: sp_control_label FOR_SYM $@55 sp_for_loop_index_and_bounds $@56 for_loop_statements $@57 pop_sp_loop_label */
+#line 4373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-4].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 464: /* $@58: %empty */
+#line 4378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 32194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 465: /* sp_labeled_control: sp_control_label REPEAT_SYM $@58 repeat_body pop_sp_loop_label */
+#line 4383 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 32200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 466: /* $@59: %empty */
+#line 4388 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 467: /* sp_unlabeled_control: LOOP_SYM $@59 loop_body */
+#line 4393 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_pop_loop_empty_label(thd);
+ }
+#line 32217 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 468: /* $@60: %empty */
+#line 4397 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 469: /* sp_unlabeled_control: WHILE_SYM $@60 while_body */
+#line 4402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_pop_loop_empty_label(thd);
+ }
+#line 32234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 470: /* $@61: %empty */
+#line 4406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ // See "The FOR LOOP statement" comments in sql_lex.cc
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
+ }
+#line 32245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 471: /* $@62: %empty */
+#line 4413 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd))) // The inner WHILE block
+ MYSQL_YYABORT;
+ if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32256 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 472: /* sp_unlabeled_control: FOR_SYM $@61 sp_for_loop_index_and_bounds $@62 for_loop_statements */
+#line 4420 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-2].for_loop))))
+ MYSQL_YYABORT;
+ Lex->sp_pop_loop_empty_label(thd); // The inner WHILE block
+ if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-2].for_loop))))
+ MYSQL_YYABORT;
+ }
+#line 32268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 473: /* $@63: %empty */
+#line 4428 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_loop_empty_label(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32277 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 474: /* sp_unlabeled_control: REPEAT_SYM $@63 repeat_body */
+#line 4433 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_pop_loop_empty_label(thd);
+ }
+#line 32285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 475: /* trg_action_time: BEFORE_SYM */
+#line 4440 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
+#line 32291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 476: /* trg_action_time: AFTER_SYM */
+#line 4442 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
+#line 32297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 477: /* trg_event: INSERT */
+#line 4447 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.event= TRG_EVENT_INSERT; }
+#line 32303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 478: /* trg_event: UPDATE_SYM */
+#line 4449 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
+#line 32309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 479: /* trg_event: DELETE_SYM */
+#line 4451 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->trg_chistics.event= TRG_EVENT_DELETE; }
+#line 32315 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 480: /* $@64: %empty */
+#line 4456 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->create_info.option_list= NULL; }
+#line 32321 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 481: /* create_body: create_field_list_parens $@64 opt_create_table_options opt_create_partitioning opt_create_select */
+#line 4457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32327 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 482: /* create_body: opt_create_table_options opt_create_partitioning opt_create_select */
+#line 4458 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32333 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 483: /* create_body: create_like */
+#line 4460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+
+ Lex->create_info.add(DDL_options_st::OPT_LIKE);
+ TABLE_LIST *src_table= Lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, 0, TL_READ, MDL_SHARED_READ);
+ if (unlikely(! src_table))
+ MYSQL_YYABORT;
+ /* CREATE TABLE ... LIKE is not allowed for views. */
+ src_table->required_type= TABLE_TYPE_NORMAL;
+ }
+#line 32348 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 484: /* create_like: LIKE table_ident */
+#line 4473 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table)= (yyvsp[0].table); }
+#line 32354 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 485: /* create_like: LEFT_PAREN_LIKE LIKE table_ident ')' */
+#line 4474 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table)= (yyvsp[-1].table); }
+#line 32360 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 486: /* opt_create_select: %empty */
+#line 4478 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 487: /* opt_create_select: opt_duplicate opt_as create_select_query_expression opt_versioning_option */
+#line 4481 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.add(DDL_options_st::OPT_CREATE_SELECT);
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 32376 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 488: /* create_select_query_expression: query_expression */
+#line 4490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->parsed_insert_select((yyvsp[0].select_lex_unit)->first_select()))
+ MYSQL_YYABORT;
+ }
+#line 32385 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 489: /* create_select_query_expression: LEFT_PAREN_WITH with_clause query_expression_no_with_clause ')' */
+#line 4495 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *first_select= (yyvsp[-1].select_lex_unit)->first_select();
+ (yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
+ (yyvsp[-2].with_clause)->attach_to(first_select);
+ if (Lex->parsed_insert_select(first_select))
+ MYSQL_YYABORT;
+ }
+#line 32397 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 490: /* opt_create_partitioning: opt_partitioning */
+#line 4506 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Remove all tables used in PARTITION clause from the global table
+ list. Partitioning with subqueries is not allowed anyway.
+ */
+ TABLE_LIST *last_non_sel_table= Lex->create_last_non_select_table;
+ last_non_sel_table->next_global= 0;
+ Lex->query_tables_last= &last_non_sel_table->next_global;
+ }
+#line 32411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 491: /* opt_partitioning: %empty */
+#line 4542 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32417 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 493: /* $@65: %empty */
+#line 4548 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+ if (lex->sql_command == SQLCOM_ALTER_TABLE)
+ {
+ lex->alter_info.partition_flags|= ALTER_PARTITION_INFO;
+ }
+ }
+#line 32432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 495: /* have_partitioning: %empty */
+#line 4563 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ LEX_CSTRING partition_name={STRING_WITH_LEN("partition")};
+ if (unlikely(!plugin_is_ready(&partition_name, MYSQL_STORAGE_ENGINE_PLUGIN)))
+ my_yyabort_error((ER_OPTION_PREVENTS_STATEMENT, MYF(0),
+ "--skip-partition"));
+#else
+ my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), "partitioning",
+ "--with-plugin-partition"));
+#endif
+ }
+#line 32448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 496: /* $@66: %empty */
+#line 4578 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Lex->part_info))
+ {
+ thd->parse_error(ER_PARTITION_ENTRY_ERROR);
+ MYSQL_YYABORT;
+ }
+ 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.
+ */
+ }
+#line 32466 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 497: /* partition_entry: PARTITION_SYM $@66 partition */
+#line 4592 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 32474 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 498: /* $@67: %empty */
+#line 4599 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->safe_to_cache_query= 1; }
+#line 32480 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 500: /* part_type_def: opt_linear KEY_SYM opt_key_algo '(' part_field_list ')' */
+#line 4605 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->list_of_part_fields= TRUE;
+ part_info->column_list= FALSE;
+ part_info->part_type= HASH_PARTITION;
+ }
+#line 32491 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 501: /* $@68: %empty */
+#line 4612 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= HASH_PARTITION; }
+#line 32497 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 502: /* part_type_def: opt_linear HASH_SYM $@68 part_func */
+#line 4613 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 503: /* part_type_def: RANGE_SYM part_func */
+#line 4615 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= RANGE_PARTITION; }
+#line 32509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 504: /* part_type_def: RANGE_SYM part_column_list */
+#line 4617 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= RANGE_PARTITION; }
+#line 32515 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 505: /* $@69: %empty */
+#line 4619 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_PART_FUNC;
+ }
+#line 32523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 506: /* part_type_def: LIST_SYM $@69 part_func */
+#line 4623 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->part_info->part_type= LIST_PARTITION;
+ Select->parsing_place= NO_MATTER;
+ }
+#line 32532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 507: /* part_type_def: LIST_SYM part_column_list */
+#line 4628 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->part_type= LIST_PARTITION; }
+#line 32538 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 508: /* $@70: %empty */
+#line 4630 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->part_info->vers_init_info(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 510: /* opt_linear: %empty */
+#line 4638 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32553 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 511: /* opt_linear: LINEAR_SYM */
+#line 4640 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->linear_hash_ind= TRUE;}
+#line 32559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 512: /* opt_key_algo: %empty */
+#line 4645 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
+#line 32565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 513: /* opt_key_algo: ALGORITHM_SYM '=' real_ulong_num */
+#line 4647 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch ((yyvsp[0].ulong_num)) {
+ case 1:
+ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_51;
+ break;
+ case 2:
+ Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_55;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 32583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 514: /* part_field_list: %empty */
+#line 4663 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 515: /* part_field_list: part_field_item_list */
+#line 4664 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 516: /* part_field_item_list: part_field_item */
+#line 4668 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 517: /* part_field_item_list: part_field_item_list ',' part_field_item */
+#line 4669 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 518: /* part_field_item: ident */
+#line 4674 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->num_columns++;
+ if (unlikely(part_info->part_field_list.push_back((yyvsp[0].ident_sys).str,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->num_columns > MAX_REF_PARTS))
+ my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
+ "list of partition fields"));
+ }
+#line 32622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 519: /* part_column_list: COLUMNS '(' part_field_list ')' */
+#line 4688 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->column_list= TRUE;
+ part_info->list_of_part_fields= TRUE;
+ }
+#line 32632 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 520: /* part_func: '(' part_func_expr ')' */
+#line 4698 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->set_part_expr(thd, (yyvsp[-1].item), FALSE)))
+ MYSQL_YYABORT;
+ part_info->num_columns= 1;
+ part_info->column_list= FALSE;
+ }
+#line 32644 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 521: /* sub_part_func: '(' part_func_expr ')' */
+#line 4709 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
+ MYSQL_YYABORT;
+ }
+#line 32653 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 522: /* opt_num_parts: %empty */
+#line 4717 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 523: /* opt_num_parts: PARTITIONS_SYM real_ulong_num */
+#line 4719 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint num_parts= (yyvsp[0].ulong_num);
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(num_parts == 0))
+ my_yyabort_error((ER_NO_PARTS_ERROR, MYF(0), "partitions"));
+
+ part_info->num_parts= num_parts;
+ part_info->use_default_num_partitions= FALSE;
+ }
+#line 32673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 524: /* opt_sub_part: %empty */
+#line 4731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 525: /* $@71: %empty */
+#line 4733 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->subpart_type= HASH_PARTITION; }
+#line 32685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 526: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear HASH_SYM sub_part_func $@71 opt_num_subparts */
+#line 4734 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 527: /* $@72: %empty */
+#line 4737 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->subpart_type= HASH_PARTITION;
+ part_info->list_of_subpart_fields= TRUE;
+ }
+#line 32701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 528: /* opt_sub_part: SUBPARTITION_SYM BY opt_linear KEY_SYM opt_key_algo '(' sub_part_field_list ')' $@72 opt_num_subparts */
+#line 4742 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32707 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 529: /* sub_part_field_list: sub_part_field_item */
+#line 4746 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 530: /* sub_part_field_list: sub_part_field_list ',' sub_part_field_item */
+#line 4747 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 531: /* sub_part_field_item: ident */
+#line 4752 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->subpart_field_list.push_back((yyvsp[0].ident_sys).str,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+
+ if (unlikely(part_info->subpart_field_list.elements > MAX_REF_PARTS))
+ my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
+ "list of subpartition fields"));
+ }
+#line 32734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 532: /* part_func_expr: bit_expr */
+#line 4766 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Lex->safe_to_cache_query))
+ {
+ thd->parse_error(ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR);
+ MYSQL_YYABORT;
+ }
+ (yyval.item)=(yyvsp[0].item);
+ }
+#line 32747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 533: /* opt_num_subparts: %empty */
+#line 4777 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 534: /* opt_num_subparts: SUBPARTITIONS_SYM real_ulong_num */
+#line 4779 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint num_parts= (yyvsp[0].ulong_num);
+ LEX *lex= Lex;
+ if (unlikely(num_parts == 0))
+ my_yyabort_error((ER_NO_PARTS_ERROR, MYF(0), "subpartitions"));
+ lex->part_info->num_subparts= num_parts;
+ lex->part_info->use_default_num_subpartitions= FALSE;
+ }
+#line 32766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 535: /* part_defs: %empty */
+#line 4791 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->part_type == RANGE_PARTITION))
+ my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
+ "RANGE"));
+ if (unlikely(part_info->part_type == LIST_PARTITION))
+ my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
+ "LIST"));
+ }
+#line 32780 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 536: /* part_defs: '(' part_def_list ')' */
+#line 4801 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ uint count_curr_parts= part_info->partitions.elements;
+ if (part_info->num_parts != 0)
+ {
+ if (unlikely(part_info->num_parts !=
+ count_curr_parts))
+ {
+ thd->parse_error(ER_PARTITION_WRONG_NO_PART_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+ else if (count_curr_parts > 0)
+ {
+ part_info->num_parts= count_curr_parts;
+ }
+ part_info->count_curr_subparts= 0;
+ }
+#line 32803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 537: /* part_def_list: part_definition */
+#line 4822 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 538: /* part_def_list: part_def_list ',' part_definition */
+#line 4823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32815 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 541: /* $@73: %empty */
+#line 4833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ partition_element *p_elem= new (thd->mem_root) partition_element();
+
+ if (unlikely(!p_elem) ||
+ unlikely(part_info->partitions.push_back(p_elem, thd->mem_root)))
+ MYSQL_YYABORT;
+
+ p_elem->part_state= PART_NORMAL;
+ p_elem->id= part_info->partitions.elements - 1;
+ part_info->curr_part_elem= p_elem;
+ part_info->current_partition= p_elem;
+ part_info->use_default_partitions= FALSE;
+ part_info->use_default_num_partitions= FALSE;
+ }
+#line 32835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 542: /* part_definition: opt_partition $@73 part_name opt_part_values opt_part_options opt_sub_partition */
+#line 4852 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 543: /* part_name: ident */
+#line 4857 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ partition_element *p_elem= part_info->curr_part_elem;
+ if (unlikely(check_ident_length(&(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ p_elem->partition_name= (yyvsp[0].ident_sys).str;
+ }
+#line 32853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 544: /* opt_part_values: %empty */
+#line 4868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->error_if_requires_values()))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->part_type == VERSIONING_PARTITION))
+ my_yyabort_error((ER_VERS_WRONG_PARTS, MYF(0),
+ lex->create_last_non_select_table->
+ table_name.str));
+ }
+ else
+ part_info->part_type= HASH_PARTITION;
+ }
+#line 32873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 545: /* $@74: %empty */
+#line 4884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->part_type != RANGE_PARTITION))
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "RANGE", "LESS THAN"));
+ }
+ else
+ part_info->part_type= RANGE_PARTITION;
+ }
+#line 32890 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 546: /* opt_part_values: VALUES_LESS_SYM THAN_SYM $@74 part_func_max */
+#line 4896 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 547: /* $@75: %empty */
+#line 4898 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->part_type != LIST_PARTITION))
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "LIST", "IN"));
+ }
+ else
+ part_info->part_type= LIST_PARTITION;
+ }
+#line 32913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 548: /* opt_part_values: VALUES_IN_SYM $@75 part_values_in */
+#line 4910 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32919 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 549: /* opt_part_values: CURRENT_SYM */
+#line 4912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (Lex->part_values_current(thd))
+ MYSQL_YYABORT;
+#endif
+ }
+#line 32930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 550: /* opt_part_values: HISTORY_SYM */
+#line 4919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ if (Lex->part_values_history(thd))
+ MYSQL_YYABORT;
+#endif
+ }
+#line 32941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 551: /* opt_part_values: DEFAULT */
+#line 4926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (unlikely(part_info->part_type != LIST_PARTITION))
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "LIST", "DEFAULT"));
+ }
+ else
+ part_info->part_type= LIST_PARTITION;
+ if (unlikely(part_info->init_column_part(thd)))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->add_max_value(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 552: /* part_func_max: MAXVALUE_SYM */
+#line 4946 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+
+ if (unlikely(part_info->num_columns &&
+ part_info->num_columns != 1U))
+ {
+ part_info->print_debug("Kilroy II", NULL);
+ thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
+ MYSQL_YYABORT;
+ }
+ else
+ part_info->num_columns= 1U;
+ if (unlikely(part_info->init_column_part(thd)))
+ MYSQL_YYABORT;
+ if (unlikely(part_info->add_max_value(thd)))
+ MYSQL_YYABORT;
+ }
+#line 32984 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 553: /* part_func_max: part_value_item */
+#line 4963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 32990 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 554: /* part_values_in: part_value_item */
+#line 4968 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ part_info->print_debug("part_values_in: part_value_item", NULL);
+
+ if (part_info->num_columns != 1U)
+ {
+ if (unlikely(!lex->is_partition_management() ||
+ part_info->num_columns == 0 ||
+ part_info->num_columns > MAX_REF_PARTS))
+ {
+ part_info->print_debug("Kilroy III", NULL);
+ thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
+ MYSQL_YYABORT;
+ }
+ /*
+ Reorganize the current large array into a list of small
+ arrays with one entry in each array. This can happen
+ in the first partition of an ALTER TABLE statement where
+ we ADD or REORGANIZE partitions. Also can only happen
+ for LIST partitions.
+ */
+ if (unlikely(part_info->reorganize_into_single_field_col_val(thd)))
+ MYSQL_YYABORT;
+ }
+ }
+#line 33021 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 555: /* part_values_in: '(' part_value_list ')' */
+#line 4995 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->num_columns < 2U))
+ {
+ thd->parse_error(ER_ROW_SINGLE_PARTITION_FIELD_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+#line 33034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 556: /* part_value_list: part_value_item */
+#line 5006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 557: /* part_value_list: part_value_list ',' part_value_item */
+#line 5007 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 558: /* $@76: %empty */
+#line 5012 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->print_debug("( part_value_item", NULL);
+ /* Initialisation code needed for each list of value expressions */
+ if (unlikely(!(part_info->part_type == LIST_PARTITION &&
+ part_info->num_columns == 1U) &&
+ part_info->init_column_part(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 559: /* $@77: %empty */
+#line 5021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 560: /* part_value_item: '(' $@76 part_value_item_list $@77 ')' */
+#line 5023 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->print_debug(") part_value_item", NULL);
+ if (part_info->num_columns == 0)
+ part_info->num_columns= part_info->curr_list_object;
+ if (unlikely(part_info->num_columns != part_info->curr_list_object))
+ {
+ /*
+ All value items lists must be of equal length, in some cases
+ which is covered by the above if-statement we don't know yet
+ how many columns is in the partition so the assignment above
+ ensures that we only report errors when we know we have an
+ error.
+ */
+ part_info->print_debug("Kilroy I", NULL);
+ thd->parse_error(ER_PARTITION_COLUMN_LIST_ERROR);
+ MYSQL_YYABORT;
+ }
+ part_info->curr_list_object= 0;
+ }
+#line 33091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 561: /* part_value_item_list: part_value_expr_item */
+#line 5046 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 562: /* part_value_item_list: part_value_item_list ',' part_value_expr_item */
+#line 5047 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 563: /* part_value_expr_item: MAXVALUE_SYM */
+#line 5052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->part_type == LIST_PARTITION))
+ {
+ thd->parse_error(ER_MAXVALUE_IN_VALUES_IN);
+ MYSQL_YYABORT;
+ }
+ if (unlikely(part_info->add_max_value(thd)))
+ MYSQL_YYABORT;
+ }
+#line 33118 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 564: /* part_value_expr_item: bit_expr */
+#line 5063 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ Item *part_expr= (yyvsp[0].item);
+
+ if (unlikely(!lex->safe_to_cache_query))
+ {
+ thd->parse_error(ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR);
+ MYSQL_YYABORT;
+ }
+ if (unlikely(part_info->add_column_list_value(thd, part_expr)))
+ MYSQL_YYABORT;
+ }
+#line 33136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 565: /* opt_sub_partition: %empty */
+#line 5081 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (unlikely(part_info->num_subparts != 0 &&
+ !part_info->use_default_subpartitions))
+ {
+ /*
+ We come here when we have defined subpartitions on the first
+ partition but not on all the subsequent partitions.
+ */
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+#line 33154 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 566: /* opt_sub_partition: '(' sub_part_list ')' */
+#line 5095 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ if (part_info->num_subparts != 0)
+ {
+ if (unlikely(part_info->num_subparts !=
+ part_info->count_curr_subparts))
+ {
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ }
+ else if (part_info->count_curr_subparts > 0)
+ {
+ if (unlikely(part_info->partitions.elements > 1))
+ {
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ part_info->num_subparts= part_info->count_curr_subparts;
+ }
+ part_info->count_curr_subparts= 0;
+ }
+#line 33181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 567: /* sub_part_list: sub_part_definition */
+#line 5120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 568: /* sub_part_list: sub_part_list ',' sub_part_definition */
+#line 5121 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 569: /* $@78: %empty */
+#line 5126 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ partition_element *curr_part= part_info->current_partition;
+ partition_element *sub_p_elem= new (thd->mem_root)
+ partition_element(curr_part);
+ if (unlikely(part_info->use_default_subpartitions &&
+ part_info->partitions.elements >= 2))
+ {
+ /*
+ create table t1 (a int)
+ partition by list (a) subpartition by hash (a)
+ (partition p0 values in (1),
+ partition p1 values in (2) subpartition sp11);
+ causes use to arrive since we are on the second
+ partition, but still use_default_subpartitions
+ is set. When we come here we're processing at least
+ the second partition (the current partition processed
+ have already been put into the partitions list.
+ */
+ thd->parse_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR);
+ MYSQL_YYABORT;
+ }
+ if (unlikely(!sub_p_elem) ||
+ unlikely(curr_part->subpartitions.push_back(sub_p_elem, thd->mem_root)))
+ MYSQL_YYABORT;
+
+ sub_p_elem->id= curr_part->subpartitions.elements - 1;
+ part_info->curr_part_elem= sub_p_elem;
+ part_info->use_default_subpartitions= FALSE;
+ part_info->use_default_num_subpartitions= FALSE;
+ part_info->count_curr_subparts++;
+ }
+#line 33230 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 570: /* sub_part_definition: SUBPARTITION_SYM $@78 sub_name opt_subpart_options */
+#line 5158 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 571: /* sub_name: ident_or_text */
+#line 5163 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(check_ident_length(&(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str;
+ }
+#line 33246 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 572: /* opt_part_options: %empty */
+#line 5171 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33252 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 573: /* opt_part_options: part_option_list */
+#line 5172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33258 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 574: /* part_option_list: part_option_list part_option */
+#line 5176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33264 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 575: /* part_option_list: part_option */
+#line 5177 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33270 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 576: /* part_option: server_part_option */
+#line 5181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33276 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 577: /* part_option: engine_defined_option */
+#line 5183 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->part_info->curr_part_elem->option_list,
+ &Lex->option_list_last);
+ }
+#line 33285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 578: /* opt_subpart_options: %empty */
+#line 5190 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 579: /* opt_subpart_options: subpart_option_list */
+#line 5191 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 580: /* subpart_option_list: subpart_option_list server_part_option */
+#line 5195 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 581: /* subpart_option_list: server_part_option */
+#line 5196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 582: /* server_part_option: TABLESPACE opt_equal ident_or_text */
+#line 5201 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* Compatibility with MySQL */ }
+#line 33315 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 583: /* server_part_option: opt_storage ENGINE_SYM opt_equal storage_engines */
+#line 5203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->curr_part_elem->engine_type= (yyvsp[0].db_type);
+ part_info->default_engine_type= (yyvsp[0].db_type);
+ }
+#line 33325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 584: /* server_part_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
+#line 5209 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info->curr_part_elem->connect_string.str= (yyvsp[0].lex_str).str;
+ lex->part_info->curr_part_elem->connect_string.length= (yyvsp[0].lex_str).length;
+ }
+#line 33335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 585: /* server_part_option: NODEGROUP_SYM opt_equal real_ulong_num */
+#line 5215 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
+#line 33341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 586: /* server_part_option: MAX_ROWS opt_equal real_ulonglong_num */
+#line 5217 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
+#line 33347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 587: /* server_part_option: MIN_ROWS opt_equal real_ulonglong_num */
+#line 5219 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
+#line 33353 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 588: /* server_part_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5221 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; }
+#line 33359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 589: /* server_part_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5223 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; }
+#line 33365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 590: /* server_part_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
+#line 5225 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
+#line 33371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 591: /* opt_versioning_rotation: %empty */
+#line 5229 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 592: /* $@79: %empty */
+#line 5230 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "INTERVAL"; }
+#line 33383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 593: /* opt_versioning_rotation: $@79 INTERVAL_SYM expr interval opt_versioning_interval_start opt_vers_auto_part */
+#line 5232 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ const char *table_name= Lex->create_last_non_select_table->table_name.str;
+ if (unlikely(part_info->vers_set_interval(thd, (yyvsp[-3].item), (yyvsp[-2].interval), (yyvsp[-1].item), (yyvsp[0].num),
+ table_name)))
+ MYSQL_YYABORT;
+ }
+#line 33395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 594: /* opt_versioning_rotation: LIMIT ulonglong_num opt_vers_auto_part */
+#line 5240 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ const char *table_name= Lex->create_last_non_select_table->table_name.str;
+ if (unlikely(part_info->vers_set_limit((yyvsp[-1].ulonglong_number), (yyvsp[0].num), table_name)))
+ MYSQL_YYABORT;
+ }
+#line 33406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 595: /* opt_versioning_interval_start: %empty */
+#line 5251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= NULL;
+ }
+#line 33414 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 596: /* opt_versioning_interval_start: STARTS_SYM literal */
+#line 5255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 33422 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 597: /* opt_vers_auto_part: %empty */
+#line 5262 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= 0;
+ }
+#line 33430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 598: /* opt_vers_auto_part: AUTO_SYM */
+#line 5266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= 1;
+ }
+#line 33438 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 599: /* opt_as: %empty */
+#line 5275 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33444 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 600: /* opt_as: AS */
+#line 5276 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33450 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 601: /* opt_create_database_options: %empty */
+#line 5280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 602: /* opt_create_database_options: create_database_options */
+#line 5281 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 603: /* create_database_options: create_database_option */
+#line 5285 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 604: /* create_database_options: create_database_options create_database_option */
+#line 5286 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33474 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 605: /* create_database_option: default_collation */
+#line 5290 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33480 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 606: /* create_database_option: default_charset */
+#line 5291 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 33486 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 607: /* create_database_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
+#line 5293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
+ Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
+ }
+#line 33495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 608: /* opt_if_not_exists_table_element: %empty */
+#line 5301 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= FALSE;
+ }
+#line 33503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 609: /* opt_if_not_exists_table_element: IF_SYM not EXISTS */
+#line 5305 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= TRUE;
+ }
+#line 33511 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 610: /* opt_if_not_exists: %empty */
+#line 5312 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).init();
+ }
+#line 33519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 611: /* opt_if_not_exists: IF_SYM not EXISTS */
+#line 5316 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
+ }
+#line 33527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 612: /* create_or_replace: CREATE */
+#line 5323 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).init();
+ }
+#line 33535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 613: /* create_or_replace: CREATE OR_SYM REPLACE */
+#line 5327 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
+ }
+#line 33543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 621: /* create_table_option: ENGINE_SYM opt_equal ident_or_text */
+#line 5350 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!lex->m_sql_cmd)
+ {
+ DBUG_ASSERT(lex->sql_command == SQLCOM_ALTER_TABLE);
+ if (!(lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table()))
+ MYSQL_YYABORT;
+ }
+ Storage_engine_name *opt=
+ lex->m_sql_cmd->option_storage_engine_name();
+ DBUG_ASSERT(opt); // Expect a proper Sql_cmd
+ *opt= Storage_engine_name((yyvsp[0].lex_str));
+ lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
+ }
+#line 33562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 622: /* create_table_option: MAX_ROWS opt_equal ulonglong_num */
+#line 5365 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.max_rows= (yyvsp[0].ulonglong_number);
+ Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;
+ }
+#line 33571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 623: /* create_table_option: MIN_ROWS opt_equal ulonglong_num */
+#line 5370 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.min_rows= (yyvsp[0].ulonglong_number);
+ Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;
+ }
+#line 33580 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 624: /* create_table_option: AVG_ROW_LENGTH opt_equal ulong_num */
+#line 5375 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.avg_row_length=(yyvsp[0].ulong_num);
+ Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;
+ }
+#line 33589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 625: /* create_table_option: PASSWORD_SYM opt_equal TEXT_STRING_sys */
+#line 5380 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.password=(yyvsp[0].lex_str).str;
+ Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD;
+ }
+#line 33598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 626: /* create_table_option: COMMENT_SYM opt_equal TEXT_STRING_sys */
+#line 5385 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.comment=(yyvsp[0].lex_str);
+ Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
+ }
+#line 33607 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 627: /* create_table_option: AUTO_INC opt_equal ulonglong_num */
+#line 5390 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.auto_increment_value=(yyvsp[0].ulonglong_number);
+ Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;
+ }
+#line 33616 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 628: /* create_table_option: PACK_KEYS_SYM opt_equal ulong_num */
+#line 5395 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch((yyvsp[0].ulong_num)) {
+ case 0:
+ Lex->create_info.table_options|= HA_OPTION_NO_PACK_KEYS;
+ break;
+ case 1:
+ Lex->create_info.table_options|= HA_OPTION_PACK_KEYS;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
+ }
+#line 33635 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 629: /* create_table_option: PACK_KEYS_SYM opt_equal DEFAULT */
+#line 5410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options&=
+ ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS);
+ Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
+ }
+#line 33645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 630: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal ulong_num */
+#line 5416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch((yyvsp[0].ulong_num)) {
+ case 0:
+ Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_OFF;
+ break;
+ case 1:
+ Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_ON;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
+ }
+#line 33664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 631: /* create_table_option: STATS_AUTO_RECALC_SYM opt_equal DEFAULT */
+#line 5431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_DEFAULT;
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
+ }
+#line 33673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 632: /* create_table_option: STATS_PERSISTENT_SYM opt_equal ulong_num */
+#line 5436 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ switch((yyvsp[0].ulong_num)) {
+ case 0:
+ Lex->create_info.table_options|= HA_OPTION_NO_STATS_PERSISTENT;
+ break;
+ case 1:
+ Lex->create_info.table_options|= HA_OPTION_STATS_PERSISTENT;
+ break;
+ default:
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
+ }
+#line 33692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 633: /* create_table_option: STATS_PERSISTENT_SYM opt_equal DEFAULT */
+#line 5451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options&=
+ ~(HA_OPTION_STATS_PERSISTENT | HA_OPTION_NO_STATS_PERSISTENT);
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
+ }
+#line 33702 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 634: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal ulong_num */
+#line 5457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* From user point of view STATS_SAMPLE_PAGES can be specified as
+ STATS_SAMPLE_PAGES=N (where 0<N<=65535, it does not make sense to
+ scan 0 pages) or STATS_SAMPLE_PAGES=default. Internally we record
+ =default as 0. See create_frm() in sql/table.cc, we use only two
+ bytes for stats_sample_pages and this is why we do not allow
+ larger values. 65535 pages, 16kb each means to sample 1GB, which
+ is impractical. If at some point this needs to be extended, then
+ we can store the higher bits from stats_sample_pages in .frm too. */
+ if (unlikely((yyvsp[0].ulong_num) == 0 || (yyvsp[0].ulong_num) > 0xffff))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ Lex->create_info.stats_sample_pages=(yyvsp[0].ulong_num);
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
+ }
+#line 33724 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 635: /* create_table_option: STATS_SAMPLE_PAGES_SYM opt_equal DEFAULT */
+#line 5475 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.stats_sample_pages=0;
+ Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
+ }
+#line 33733 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 636: /* create_table_option: CHECKSUM_SYM opt_equal ulong_num */
+#line 5480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
+ Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
+ }
+#line 33742 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 637: /* create_table_option: TABLE_CHECKSUM_SYM opt_equal ulong_num */
+#line 5485 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM;
+ Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM;
+ }
+#line 33751 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 638: /* create_table_option: PAGE_CHECKSUM_SYM opt_equal choice */
+#line 5490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM;
+ Lex->create_info.page_checksum= (yyvsp[0].choice);
+ }
+#line 33760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 639: /* create_table_option: DELAY_KEY_WRITE_SYM opt_equal ulong_num */
+#line 5495 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.table_options|= (yyvsp[0].ulong_num) ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE;
+ Lex->create_info.used_fields|= HA_CREATE_USED_DELAY_KEY_WRITE;
+ }
+#line 33769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 640: /* create_table_option: ROW_FORMAT_SYM opt_equal row_types */
+#line 5500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.row_type= (yyvsp[0].row_type);
+ Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
+ }
+#line 33778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 641: /* $@80: %empty */
+#line 5505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->first_select_lex()->table_list.save_and_clear(&Lex->save_list);
+ }
+#line 33786 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 642: /* create_table_option: UNION_SYM opt_equal $@80 '(' opt_table_list ')' */
+#line 5509 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Move the union list to the merge_list and exclude its tables
+ from the global list.
+ */
+ LEX *lex=Lex;
+ 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
+ table being created/altered and parent tables.
+ */
+ TABLE_LIST *last_non_sel_table= lex->create_last_non_select_table;
+ DBUG_ASSERT(last_non_sel_table->next_global ==
+ lex->create_info.merge_list);
+ last_non_sel_table->next_global= 0;
+ Lex->query_tables_last= &last_non_sel_table->next_global;
+
+ lex->create_info.used_fields|= HA_CREATE_USED_UNION;
+ }
+#line 33812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 645: /* create_table_option: INSERT_METHOD opt_equal merge_insert_types */
+#line 5533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.merge_insert_method= (yyvsp[0].ulong_num);
+ Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD;
+ }
+#line 33821 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 646: /* create_table_option: DATA_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5538 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.data_file_name= (yyvsp[0].lex_str).str;
+ Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR;
+ }
+#line 33830 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 647: /* create_table_option: INDEX_SYM DIRECTORY_SYM opt_equal TEXT_STRING_sys */
+#line 5543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.index_file_name= (yyvsp[0].lex_str).str;
+ Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR;
+ }
+#line 33839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 648: /* create_table_option: TABLESPACE ident */
+#line 5548 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* Compatiblity with MySQL */ }
+#line 33845 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 649: /* create_table_option: STORAGE_SYM DISK_SYM */
+#line 5550 "/home/buildbot/git/sql/sql_yacc.yy"
+ {Lex->create_info.storage_media= HA_SM_DISK;}
+#line 33851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 650: /* create_table_option: STORAGE_SYM MEMORY_SYM */
+#line 5552 "/home/buildbot/git/sql/sql_yacc.yy"
+ {Lex->create_info.storage_media= HA_SM_MEMORY;}
+#line 33857 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 651: /* create_table_option: CONNECTION_SYM opt_equal TEXT_STRING_sys */
+#line 5554 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.connect_string.str= (yyvsp[0].lex_str).str;
+ Lex->create_info.connect_string.length= (yyvsp[0].lex_str).length;
+ Lex->create_info.used_fields|= HA_CREATE_USED_CONNECTION;
+ }
+#line 33867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 652: /* create_table_option: KEY_BLOCK_SIZE opt_equal ulong_num */
+#line 5560 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
+ Lex->create_info.key_block_size= (yyvsp[0].ulong_num);
+ }
+#line 33876 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 653: /* create_table_option: TRANSACTIONAL_SYM opt_equal choice */
+#line 5565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
+ Lex->create_info.transactional= (yyvsp[0].choice);
+ }
+#line 33885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 654: /* create_table_option: engine_defined_option */
+#line 5570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->create_info.option_list, &Lex->option_list_last);
+ }
+#line 33893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 655: /* create_table_option: SEQUENCE_SYM opt_equal choice */
+#line 5574 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
+ Lex->create_info.sequence= ((yyvsp[0].choice) == HA_CHOICE_YES);
+ }
+#line 33902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 657: /* engine_defined_option: IDENT_sys equal TEXT_STRING_sys */
+#line 5583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
+ my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true);
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 33913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 658: /* engine_defined_option: IDENT_sys equal ident */
+#line 5590 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
+ my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false);
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 33924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 659: /* engine_defined_option: IDENT_sys equal real_ulonglong_num */
+#line 5597 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), thd->mem_root);
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 33933 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 660: /* engine_defined_option: IDENT_sys equal DEFAULT */
+#line 5602 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.engine_option_value_ptr)= new (thd->mem_root) engine_option_value((yyvsp[-2].ident_sys));
+ MYSQL_YYABORT_UNLESS((yyval.engine_option_value_ptr));
+ }
+#line 33942 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 663: /* versioning_option: WITH_SYSTEM_SYM VERSIONING_SYM */
+#line 5615 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ if (!DBUG_IF("sysvers_force"))
+ {
+ my_error(ER_VERS_NOT_SUPPORTED, MYF(0), "CREATE TEMPORARY TABLE");
+ MYSQL_YYABORT;
+ }
+ }
+ else
+ {
+ Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
+ Lex->create_info.options|= HA_VERSIONED_TABLE;
+ }
+ }
+#line 33962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 664: /* default_charset: opt_default charset opt_equal charset_name_or_default */
+#line 5634 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))))
+ MYSQL_YYABORT;
+ }
+#line 33971 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 665: /* default_collation: opt_default COLLATE_SYM opt_equal collation_name_or_default */
+#line 5642 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_specification_st *cinfo= &Lex->create_info;
+ if (unlikely(cinfo->add_table_option_default_collation((yyvsp[0].Lex_extended_collation))))
+ MYSQL_YYABORT;
+ }
+#line 33981 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 666: /* storage_engines: ident_or_text */
+#line 5651 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Storage_engine_name((yyvsp[0].lex_str)).
+ resolve_storage_engine_with_error(thd, &(yyval.db_type),
+ thd->lex->create_info.tmp_table()))
+ MYSQL_YYABORT;
+ }
+#line 33992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 667: /* known_storage_engines: ident_or_text */
+#line 5661 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ plugin_ref plugin;
+ if (likely((plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), false))))
+ (yyval.db_type)= plugin_hton(plugin);
+ else
+ my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str));
+ }
+#line 34004 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 668: /* row_types: DEFAULT */
+#line 5671 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_DEFAULT; }
+#line 34010 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 669: /* row_types: FIXED_SYM */
+#line 5672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_FIXED; }
+#line 34016 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 670: /* row_types: DYNAMIC_SYM */
+#line 5673 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_DYNAMIC; }
+#line 34022 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 671: /* row_types: COMPRESSED_SYM */
+#line 5674 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_COMPRESSED; }
+#line 34028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 672: /* row_types: REDUNDANT_SYM */
+#line 5675 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_REDUNDANT; }
+#line 34034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 673: /* row_types: COMPACT_SYM */
+#line 5676 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_COMPACT; }
+#line 34040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 674: /* row_types: PAGE_SYM */
+#line 5677 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.row_type)= ROW_TYPE_PAGE; }
+#line 34046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 675: /* merge_insert_types: NO_SYM */
+#line 5681 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
+#line 34052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 676: /* merge_insert_types: FIRST_SYM */
+#line 5682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
+#line 34058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 677: /* merge_insert_types: LAST_SYM */
+#line 5683 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
+#line 34064 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 678: /* udf_type: STRING_SYM */
+#line 5687 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) STRING_RESULT; }
+#line 34070 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 679: /* udf_type: REAL */
+#line 5688 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) REAL_RESULT; }
+#line 34076 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 680: /* udf_type: DECIMAL_SYM */
+#line 5689 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) DECIMAL_RESULT; }
+#line 34082 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 681: /* udf_type: INT_SYM */
+#line 5690 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num) = (int) INT_RESULT; }
+#line 34088 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 682: /* create_field_list: field_list */
+#line 5696 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ }
+#line 34096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 683: /* create_field_list_parens: LEFT_PAREN_ALT field_list ')' */
+#line 5703 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ }
+#line 34104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 686: /* field_list_item: column_def */
+#line 5714 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34110 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 690: /* field_list_item: PERIOD_SYM period_for_application_time */
+#line 5718 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 691: /* column_def: field_spec */
+#line 5723 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.create_field)= (yyvsp[0].create_field); }
+#line 34122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 692: /* column_def: field_spec opt_constraint references */
+#line 5725 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_column_foreign_key(&((yyvsp[-2].create_field)->field_name), &(yyvsp[-1].lex_str),
+ (yyvsp[0].table), DDL_options())))
+ MYSQL_YYABORT;
+ (yyval.create_field)= (yyvsp[-2].create_field);
+ }
+#line 34133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 693: /* $@81: %empty */
+#line 5735 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 694: /* key_def: key_or_index opt_if_not_exists opt_ident opt_USING_key_algorithm $@81 '(' key_list ')' normal_key_options */
+#line 5740 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 695: /* $@82: %empty */
+#line 5742 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-2].ident_sys), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 696: /* key_def: key_or_index opt_if_not_exists ident TYPE_SYM btree_or_rtree $@82 '(' key_list ')' normal_key_options */
+#line 5747 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 697: /* $@83: %empty */
+#line 5749 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 698: /* key_def: fulltext opt_key_or_index opt_if_not_exists opt_ident $@83 '(' key_list ')' fulltext_key_options */
+#line 5754 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 699: /* $@84: %empty */
+#line 5756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34191 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 700: /* key_def: spatial opt_key_or_index opt_if_not_exists opt_ident $@84 '(' key_list ')' spatial_key_options */
+#line 5761 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34197 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 701: /* $@85: %empty */
+#line 5765 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-3].key_type), (yyvsp[-1].lex_str).str ? &(yyvsp[-1].lex_str) : &(yyvsp[-4].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 702: /* key_def: opt_constraint constraint_key_type opt_if_not_exists opt_ident opt_USING_key_algorithm $@85 '(' key_list opt_without_overlaps ')' normal_key_options */
+#line 5770 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 703: /* $@86: %empty */
+#line 5773 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_list= NULL;
+ if (unlikely(Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].ident_sys).str ? &(yyvsp[-2].ident_sys) : &(yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34223 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 704: /* key_def: opt_constraint constraint_key_type opt_if_not_exists ident TYPE_SYM btree_or_rtree $@86 '(' key_list opt_without_overlaps ')' normal_key_options */
+#line 5778 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 34229 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 705: /* $@87: %empty */
+#line 5780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->check_add_key((yyvsp[-1].object_ddl_options))) ||
+ unlikely(!(Lex->last_key= (new (thd->mem_root)
+ Key(Key::MULTIPLE,
+ (yyvsp[-4].lex_str).str ? &(yyvsp[-4].lex_str) : &(yyvsp[0].lex_str),
+ HA_KEY_ALG_UNDEF, true, (yyvsp[-1].object_ddl_options))))))
+ MYSQL_YYABORT;
+ Lex->option_list= NULL;
+ }
+#line 34243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 706: /* key_def: opt_constraint FOREIGN KEY_SYM opt_if_not_exists opt_ident $@87 '(' key_list ')' references */
+#line 5790 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_table_foreign_key((yyvsp[-5].lex_str).str ? &(yyvsp[-5].lex_str) : &(yyvsp[-9].lex_str),
+ (yyvsp[-9].lex_str).str ? &(yyvsp[-9].lex_str) : &(yyvsp[-5].lex_str), (yyvsp[0].table), (yyvsp[-6].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 34253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 707: /* constraint_def: opt_constraint check_constraint */
+#line 5799 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
+ }
+#line 34261 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 708: /* period_for_system_time: PERIOD_SYM FOR_SYSTEM_TIME_SYM '(' ident ',' ident ')' */
+#line 5807 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Vers_parse_info &info= Lex->vers_get_info();
+ info.set_period((yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys));
+ }
+#line 34270 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 709: /* period_for_application_time: FOR_SYM ident '(' ident ',' ident ')' */
+#line 5815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_period((yyvsp[-5].ident_sys), (yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 34279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 710: /* opt_check_constraint: %empty */
+#line 5822 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.virtual_column)= (Virtual_column_info*) 0; }
+#line 34285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 711: /* opt_check_constraint: check_constraint */
+#line 5823 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.virtual_column)= (yyvsp[0].virtual_column);}
+#line 34291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 712: /* check_constraint: CHECK_SYM '(' expr ')' */
+#line 5828 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[-1].item));
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ (yyval.virtual_column)= v;
+ }
+#line 34302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 713: /* opt_constraint_no_id: %empty */
+#line 5837 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 714: /* opt_constraint_no_id: CONSTRAINT */
+#line 5838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34314 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 715: /* opt_constraint: %empty */
+#line 5842 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 34320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 716: /* opt_constraint: constraint */
+#line 5843 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].lex_str); }
+#line 34326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 717: /* constraint: CONSTRAINT opt_ident */
+#line 5847 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str); }
+#line 34332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 718: /* @88: %empty */
+#line 5852 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Create_field *f= new (thd->mem_root) Create_field();
+
+ if (unlikely(check_string_char_length(&(yyvsp[0].lex_str), 0, NAME_CHAR_LEN,
+ system_charset_info, 1)))
+ my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].lex_str).str));
+
+ if (unlikely(!f))
+ MYSQL_YYABORT;
+
+ lex->init_last_field(f, &(yyvsp[0].lex_str));
+ (yyval.create_field)= f;
+ lex->parsing_options.lookup_keywords_after_qualifier= true;
+ }
+#line 34352 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 719: /* field_spec: field_ident @88 field_type_or_serial opt_check_constraint */
+#line 5868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->parsing_options.lookup_keywords_after_qualifier= false;
+ (yyval.create_field)= (yyvsp[-2].create_field);
+
+ (yyval.create_field)->check_constraint= (yyvsp[0].virtual_column);
+
+ if (unlikely((yyval.create_field)->check(thd)))
+ MYSQL_YYABORT;
+
+ lex->alter_info.create_list.push_back((yyval.create_field), thd->mem_root);
+
+ (yyval.create_field)->create_if_not_exists= Lex->check_exists;
+ if ((yyval.create_field)->flags & PRI_KEY_FLAG)
+ lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::PRIMARY, lex->check_exists);
+ else if ((yyval.create_field)->flags & UNIQUE_KEY_FLAG)
+ lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::UNIQUE, lex->check_exists);
+ }
+#line 34375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 720: /* $@89: %empty */
+#line 5890 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[0].Lex_field_type),
+ COLUMN_DEFINITION_TABLE_FIELD);
+ }
+#line 34384 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 721: /* field_type_or_serial: qualified_field_type $@89 field_def */
+#line 5895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ auto tmp= (yyvsp[-2].Lex_field_type).charset_collation_attrs();
+ if (tmp.merge_column_charset_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
+ MYSQL_YYABORT;
+ Lex->last_field->set_charset_collation_attrs(tmp);
+ }
+#line 34395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 722: /* $@90: %empty */
+#line 5902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_handler(&type_handler_ulonglong);
+ Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG
+ | UNSIGNED_FLAG | UNIQUE_KEY_FLAG;
+ Lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 34406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 724: /* opt_serial_attribute: %empty */
+#line 5912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34412 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 725: /* opt_serial_attribute: opt_serial_attribute_list */
+#line 5913 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34418 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 726: /* opt_serial_attribute_list: opt_serial_attribute_list serial_attribute */
+#line 5917 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 728: /* opt_asrow_attribute: %empty */
+#line 5922 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 729: /* opt_asrow_attribute: opt_asrow_attribute_list */
+#line 5923 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34436 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 730: /* opt_asrow_attribute_list: opt_asrow_attribute_list asrow_attribute */
+#line 5927 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34442 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 732: /* field_def: %empty */
+#line 5932 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 34448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 734: /* field_def: attribute_list compressed_deprecated_column_attribute */
+#line 5934 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
+#line 34454 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 735: /* field_def: attribute_list compressed_deprecated_column_attribute attribute_list */
+#line 5936 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-2].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
+ MYSQL_YYABORT;
+ }
+#line 34463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 736: /* $@91: %empty */
+#line 5941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
+ }
+#line 34471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 737: /* field_def: opt_generated_always AS virtual_column_func $@91 vcol_opt_specifier vcol_opt_attribute */
+#line 5945 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 34479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 738: /* field_def: opt_generated_always AS ROW_SYM START_SYM opt_asrow_attribute */
+#line 5949 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->last_field_generated_always_as_row_start())
+ MYSQL_YYABORT;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 34489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 739: /* field_def: opt_generated_always AS ROW_SYM END opt_asrow_attribute */
+#line 5955 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->last_field_generated_always_as_row_end())
+ MYSQL_YYABORT;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 34499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 740: /* opt_generated_always: %empty */
+#line 5963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34505 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 741: /* opt_generated_always: GENERATED_SYM ALWAYS_SYM */
+#line 5964 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34511 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 742: /* vcol_opt_specifier: %empty */
+#line 5969 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
+ }
+#line 34519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 743: /* vcol_opt_specifier: VIRTUAL_SYM */
+#line 5973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
+ }
+#line 34527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 744: /* vcol_opt_specifier: PERSISTENT_SYM */
+#line 5977 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
+ }
+#line 34535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 745: /* vcol_opt_specifier: STORED_SYM */
+#line 5981 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
+ }
+#line 34543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 746: /* vcol_opt_attribute: %empty */
+#line 5987 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 747: /* vcol_opt_attribute: vcol_opt_attribute_list */
+#line 5988 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 748: /* vcol_opt_attribute_list: vcol_opt_attribute_list vcol_attribute */
+#line 5992 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 34561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 750: /* vcol_attribute: UNIQUE_SYM */
+#line 5998 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= UNIQUE_KEY_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 34571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 751: /* vcol_attribute: UNIQUE_SYM KEY_SYM */
+#line 6004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= UNIQUE_KEY_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 34581 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 752: /* vcol_attribute: COMMENT_SYM TEXT_STRING_sys */
+#line 6009 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->comment= (yyvsp[0].lex_str); }
+#line 34587 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 753: /* vcol_attribute: INVISIBLE_SYM */
+#line 6011 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->invisible= INVISIBLE_USER;
+ }
+#line 34595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 754: /* $@92: %empty */
+#line 6018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ "PARSE_VCOL_EXPR" can only be used by the SQL server
+ when reading a '*.frm' file.
+ Prevent the end user from invoking this command.
+ */
+ MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 34610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 755: /* parse_vcol_expr: PARSE_VCOL_EXPR_SYM $@92 expr */
+#line 6029 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[0].item));
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ Lex->last_field->vcol_info= v;
+ Lex->pop_select(); //main select
+ }
+#line 34622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 757: /* parenthesized_expr: expr ',' expr_list */
+#line 6041 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[0].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 34633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 758: /* virtual_column_func: '(' parenthesized_expr ')' */
+#line 6051 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Virtual_column_info *v=
+ add_virtual_expression(thd, (yyvsp[-1].item));
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ (yyval.virtual_column)= v;
+ }
+#line 34645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 759: /* virtual_column_func: subquery */
+#line 6059 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item;
+ if (!(item= new (thd->mem_root) Item_singlerow_subselect(thd, (yyvsp[0].select_lex))))
+ MYSQL_YYABORT;
+ Virtual_column_info *v= add_virtual_expression(thd, item);
+ if (unlikely(!v))
+ MYSQL_YYABORT;
+ (yyval.virtual_column)= v;
+ }
+#line 34659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 763: /* column_default_expr: expr_or_literal */
+#line 6075 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
+ MYSQL_YYABORT;
+ }
+#line 34668 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 764: /* field_type: field_type_all */
+#line 6082 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
+ }
+#line 34676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 765: /* qualified_field_type: field_type_all */
+#line 6089 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->map_data_type(Lex_ident_sys(), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type)));
+ }
+#line 34684 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 766: /* qualified_field_type: sp_decl_ident '.' field_type_all */
+#line 6093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->map_data_type((yyvsp[-2].ident_sys), &((yyval.Lex_field_type)= (yyvsp[0].Lex_field_type))))
+ MYSQL_YYABORT;
+ }
+#line 34693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 767: /* udt_name: IDENT_sys */
+#line 6100 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 34699 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 768: /* udt_name: reserved_keyword_udt */
+#line 6101 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].kwd); }
+#line 34705 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 769: /* udt_name: non_reserved_keyword_udt */
+#line 6102 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].kwd); }
+#line 34711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 775: /* field_type_all: udt_name float_options srid_option */
+#line 6112 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->set_field_type_udt(&(yyval.Lex_field_type), (yyvsp[-2].lex_str), (yyvsp[-1].Lex_length_and_dec)))
+ MYSQL_YYABORT;
+ }
+#line 34720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 776: /* field_type_numeric: int_type opt_field_length last_field_options */
+#line 6120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set_handler_length_flags((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec), (uint32) (yyvsp[0].ulong_num));
+ }
+#line 34728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 777: /* field_type_numeric: real_type opt_precision last_field_options */
+#line 6123 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
+#line 34734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 778: /* field_type_numeric: FLOAT_SYM float_options last_field_options */
+#line 6125 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_float, (yyvsp[-1].Lex_length_and_dec));
+ if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length() && !(yyvsp[-1].Lex_length_and_dec).has_explicit_dec())
+ {
+ if (unlikely((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_DOUBLE))
+ my_yyabort_error((ER_WRONG_FIELD_SPEC, MYF(0),
+ Lex->last_field->field_name.str));
+ if ((yyvsp[-1].Lex_length_and_dec).length() > PRECISION_FOR_FLOAT)
+ (yyval.Lex_field_type).set(&type_handler_double);
+ else
+ (yyval.Lex_field_type).set(&type_handler_float);
+ }
+ }
+#line 34752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 779: /* field_type_numeric: BIT_SYM opt_field_length */
+#line 6139 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].Lex_length_and_dec));
+ }
+#line 34760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 780: /* field_type_numeric: BOOL_SYM */
+#line 6143 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
+ }
+#line 34768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 781: /* field_type_numeric: BOOLEAN_SYM */
+#line 6147 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set_handler_length(&type_handler_stiny, 1);
+ }
+#line 34776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 782: /* field_type_numeric: DECIMAL_SYM float_options last_field_options */
+#line 6151 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
+#line 34782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 783: /* field_type_numeric: NUMBER_ORACLE_SYM float_options last_field_options */
+#line 6153 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
+ (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));
+ else
+ (yyval.Lex_field_type).set(&type_handler_double);
+ }
+#line 34793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 784: /* field_type_numeric: NUMERIC_SYM float_options last_field_options */
+#line 6160 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
+#line 34799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 785: /* field_type_numeric: FIXED_SYM float_options last_field_options */
+#line 6162 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
+#line 34805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 786: /* opt_binary_and_compression: %empty */
+#line 6167 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 34811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 787: /* opt_binary_and_compression: binary */
+#line 6168 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
+#line 34817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 788: /* opt_binary_and_compression: binary compressed_deprecated_data_type_attribute */
+#line 6169 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs); }
+#line 34823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 789: /* opt_binary_and_compression: compressed opt_binary */
+#line 6170 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[0].Lex_exact_charset_extended_collation_attrs); }
+#line 34829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 790: /* field_type_string: char opt_field_length opt_binary */
+#line 6175 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
+ }
+#line 34837 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 791: /* field_type_string: nchar opt_field_length opt_bin_mod */
+#line 6179 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].Lex_length_and_dec),
+ Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
+ }
+#line 34846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 792: /* field_type_string: BINARY opt_field_length */
+#line 6184 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 34854 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 793: /* field_type_string: varchar opt_field_length opt_binary_and_compression */
+#line 6188 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
+ }
+#line 34862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 794: /* field_type_string: VARCHAR2_ORACLE_SYM opt_field_length opt_binary_and_compression */
+#line 6192 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs));
+ }
+#line 34870 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 795: /* field_type_string: nvarchar opt_field_length opt_compressed opt_bin_mod */
+#line 6196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].Lex_length_and_dec),
+ Lex_exact_charset_extended_collation_attrs::national((yyvsp[0].num)));
+ }
+#line 34879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 796: /* field_type_string: VARBINARY opt_field_length opt_compressed */
+#line 6201 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 34887 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 797: /* field_type_string: RAW_ORACLE_SYM opt_field_length opt_compressed */
+#line 6205 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 34895 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 798: /* field_type_temporal: YEAR_SYM opt_field_length last_field_options */
+#line 6212 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-1].Lex_length_and_dec).has_explicit_length())
+ {
+ if ((yyvsp[-1].Lex_length_and_dec).length() != 4)
+ {
+ char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
+ my_snprintf(buff, sizeof(buff), "YEAR(%u)", (uint) (yyvsp[-1].Lex_length_and_dec).length());
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_WARN_DEPRECATED_SYNTAX,
+ ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
+ buff, "YEAR(4)");
+ }
+ }
+ (yyval.Lex_field_type).set(&type_handler_year, (yyvsp[-1].Lex_length_and_dec));
+ }
+#line 34915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 799: /* field_type_temporal: DATE_SYM */
+#line 6227 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_newdate); }
+#line 34921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 800: /* field_type_temporal: TIME_SYM opt_field_length */
+#line 6229 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
+ static_cast<const Type_handler*>(&type_handler_time2) :
+ static_cast<const Type_handler*>(&type_handler_time),
+ (yyvsp[0].Lex_length_and_dec));
+ }
+#line 34932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 801: /* field_type_temporal: TIMESTAMP opt_field_length */
+#line 6236 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
+ static_cast<const Type_handler*>(&type_handler_timestamp2):
+ static_cast<const Type_handler*>(&type_handler_timestamp),
+ (yyvsp[0].Lex_length_and_dec));
+ }
+#line 34943 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 802: /* field_type_temporal: DATETIME opt_field_length */
+#line 6243 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(thd->type_handler_for_datetime(), (yyvsp[0].Lex_length_and_dec));
+ }
+#line 34951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 803: /* field_type_lob: TINYBLOB opt_compressed */
+#line 6251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_tiny_blob, &my_charset_bin);
+ }
+#line 34959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 804: /* field_type_lob: BLOB_MARIADB_SYM opt_field_length opt_compressed */
+#line 6255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 34967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 805: /* field_type_lob: BLOB_ORACLE_SYM field_length opt_compressed */
+#line 6259 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), &my_charset_bin);
+ }
+#line 34975 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 806: /* field_type_lob: BLOB_ORACLE_SYM opt_compressed */
+#line 6263 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
+ }
+#line 34983 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 807: /* field_type_lob: MEDIUMBLOB opt_compressed */
+#line 6267 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
+ }
+#line 34991 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 808: /* field_type_lob: LONGBLOB opt_compressed */
+#line 6271 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_long_blob, &my_charset_bin);
+ }
+#line 34999 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 809: /* field_type_lob: LONG_SYM VARBINARY opt_compressed */
+#line 6275 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_medium_blob, &my_charset_bin);
+ }
+#line 35007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 810: /* field_type_lob: LONG_SYM varchar opt_binary_and_compression */
+#line 6279 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 811: /* field_type_lob: TINYTEXT opt_binary_and_compression */
+#line 6281 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_tiny_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 812: /* field_type_lob: TEXT_SYM opt_field_length opt_binary_and_compression */
+#line 6283 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 813: /* field_type_lob: MEDIUMTEXT opt_binary_and_compression */
+#line 6285 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 814: /* field_type_lob: LONGTEXT opt_binary_and_compression */
+#line 6287 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 815: /* field_type_lob: CLOB_ORACLE_SYM opt_binary_and_compression */
+#line 6289 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_long_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 816: /* field_type_lob: LONG_SYM opt_binary_and_compression */
+#line 6291 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_medium_blob, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 817: /* field_type_lob: JSON_SYM opt_compressed */
+#line 6293 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_field_type).set(&type_handler_long_blob_json, &my_charset_utf8mb4_bin);
+ }
+#line 35057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 818: /* field_type_misc: ENUM '(' string_list ')' opt_binary */
+#line 6300 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_enum, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 819: /* field_type_misc: SET '(' string_list ')' opt_binary */
+#line 6302 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_field_type).set(&type_handler_set, (yyvsp[0].Lex_exact_charset_extended_collation_attrs)); }
+#line 35069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 820: /* char: CHAR_SYM */
+#line 6306 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 821: /* nchar: NCHAR_SYM */
+#line 6310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35081 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 822: /* nchar: NATIONAL_SYM CHAR_SYM */
+#line 6311 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35087 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 823: /* varchar: char VARYING */
+#line 6315 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35093 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 824: /* varchar: VARCHAR */
+#line 6316 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 825: /* nvarchar: NATIONAL_SYM VARCHAR */
+#line 6320 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 826: /* nvarchar: NVARCHAR_SYM */
+#line 6321 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 827: /* nvarchar: NCHAR_SYM VARCHAR */
+#line 6322 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35117 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 828: /* nvarchar: NATIONAL_SYM CHAR_SYM VARYING */
+#line 6323 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 829: /* nvarchar: NCHAR_SYM VARYING */
+#line 6324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 830: /* int_type: INT_SYM */
+#line 6328 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_slong; }
+#line 35135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 831: /* int_type: TINYINT */
+#line 6329 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_stiny; }
+#line 35141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 832: /* int_type: SMALLINT */
+#line 6330 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_sshort; }
+#line 35147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 833: /* int_type: MEDIUMINT */
+#line 6331 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_sint24; }
+#line 35153 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 834: /* int_type: BIGINT */
+#line 6332 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_slonglong; }
+#line 35159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 835: /* real_type: REAL */
+#line 6337 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.type_handler)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ?
+ static_cast<const Type_handler *>(&type_handler_float) :
+ static_cast<const Type_handler *>(&type_handler_double);
+ }
+#line 35169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 836: /* real_type: DOUBLE_SYM */
+#line 6342 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_double; }
+#line 35175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 837: /* real_type: DOUBLE_SYM PRECISION */
+#line 6343 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.type_handler)= &type_handler_double; }
+#line 35181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 838: /* srid_option: %empty */
+#line 6348 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->srid= 0; }
+#line 35187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 839: /* srid_option: REF_SYSTEM_ID_SYM '=' NUM */
+#line 6351 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
+ }
+#line 35195 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 840: /* float_options: %empty */
+#line 6357 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); }
+#line 35201 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 843: /* precision: '(' NUM ',' NUM ')' */
+#line 6363 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
+#line 35207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 844: /* field_options: %empty */
+#line 6367 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 845: /* field_options: SIGNED_SYM */
+#line 6368 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 846: /* field_options: UNSIGNED */
+#line 6369 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG; }
+#line 35225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 847: /* field_options: ZEROFILL */
+#line 6370 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
+#line 35231 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 848: /* field_options: UNSIGNED ZEROFILL */
+#line 6371 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
+#line 35237 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 849: /* field_options: ZEROFILL UNSIGNED */
+#line 6372 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= UNSIGNED_FLAG | ZEROFILL_FLAG; }
+#line 35243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 850: /* last_field_options: field_options */
+#line 6376 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->flags|= ((yyval.ulong_num)= (yyvsp[0].ulong_num)); }
+#line 35249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 851: /* field_length_str: '(' LONG_NUM ')' */
+#line 6380 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 35255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 852: /* field_length_str: '(' ULONGLONG_NUM ')' */
+#line 6381 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 35261 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 853: /* field_length_str: '(' DECIMAL_NUM ')' */
+#line 6382 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 35267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 854: /* field_length_str: '(' NUM ')' */
+#line 6383 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
+#line 35273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 855: /* field_length: field_length_str */
+#line 6386 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), NULL); }
+#line 35279 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 856: /* field_scale: field_length_str */
+#line 6390 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).set(NULL, (yyvsp[0].const_simple_string)); }
+#line 35285 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 857: /* opt_field_length: %empty */
+#line 6395 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); /* use default length */ }
+#line 35291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 859: /* opt_field_scale: %empty */
+#line 6400 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); }
+#line 35297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 861: /* opt_precision: %empty */
+#line 6405 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec).reset(); }
+#line 35303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 862: /* opt_precision: precision */
+#line 6406 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
+#line 35309 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 863: /* attribute_list: attribute_list attribute */
+#line 6412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.Lex_exact_charset_extended_collation_attrs)= (yyvsp[-1].Lex_exact_charset_extended_collation_attrs)).merge_column_collate_clause_and_collate_clause((yyvsp[0].Lex_exact_charset_extended_collation_attrs)))
+ MYSQL_YYABORT;
+ }
+#line 35318 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 865: /* attribute: NULL_SYM */
+#line 6421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->flags&= ~NOT_NULL_FLAG;
+ Lex->last_field->explicitly_nullable= true;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35328 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 866: /* attribute: DEFAULT column_default_expr */
+#line 6427 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->default_value= (yyvsp[0].virtual_column);
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 867: /* attribute: ON UPDATE_SYM NOW_SYM opt_default_time_precision */
+#line 6432 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ Lex->last_field->on_update= item;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 868: /* attribute: AUTO_INC */
+#line 6439 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 35355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 869: /* attribute: SERIAL_SYM DEFAULT VALUE_SYM */
+#line 6441 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ (yyval.Lex_exact_charset_extended_collation_attrs).init();
+ }
+#line 35366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 870: /* attribute: COLLATE_SYM collation_name */
+#line 6448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
+ }
+#line 35374 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 871: /* attribute: serial_attribute */
+#line 6451 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 35380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 872: /* opt_compression_method: %empty */
+#line 6455 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= NULL; }
+#line 35386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 873: /* opt_compression_method: equal ident */
+#line 6456 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
+#line 35392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 874: /* opt_compressed: %empty */
+#line 6460 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35398 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 875: /* opt_compressed: compressed */
+#line 6461 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 35404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 876: /* opt_enable: %empty */
+#line 6465 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 877: /* opt_enable: ENABLE_SYM */
+#line 6466 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 35416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 878: /* compressed: COMPRESSED_SYM opt_compression_method */
+#line 6471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 35425 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 879: /* compressed_deprecated_data_type_attribute: COMPRESSED_SYM opt_compression_method */
+#line 6479 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 35434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 880: /* compressed_deprecated_column_attribute: COMPRESSED_SYM opt_compression_method */
+#line 6487 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->last_field->
+ set_compressed_deprecated_column_attribute(thd, (yyvsp[-1].kwd).pos(), (yyvsp[0].const_simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 35444 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 881: /* asrow_attribute: not NULL_SYM opt_enable */
+#line 6496 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->flags|= NOT_NULL_FLAG;
+ }
+#line 35452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 882: /* asrow_attribute: opt_primary KEY_SYM */
+#line 6500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->last_field->flags|= PRI_KEY_FLAG | NOT_NULL_FLAG;
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 35462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 885: /* serial_attribute: engine_defined_option */
+#line 6511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->last_field->option_list, &Lex->option_list_last);
+ }
+#line 35470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 886: /* serial_attribute: with_or_without_system VERSIONING_SYM */
+#line 6515 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->versioning= (yyvsp[-1].vers_column_versioning);
+ Lex->create_info.options|= HA_VERSIONED_TABLE;
+ if (Lex->alter_info.flags & ALTER_DROP_SYSTEM_VERSIONING)
+ {
+ my_yyabort_error((ER_VERS_NOT_VERSIONED, MYF(0),
+ Lex->create_last_non_select_table->table_name.str));
+ }
+ }
+#line 35484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 887: /* with_or_without_system: WITH_SYSTEM_SYM */
+#line 6528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
+ Lex->create_info.vers_info.versioned_fields= true;
+ (yyval.vers_column_versioning)= Column_definition::WITH_VERSIONING;
+ }
+#line 35494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 888: /* with_or_without_system: WITHOUT SYSTEM */
+#line 6534 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
+ Lex->create_info.vers_info.unversioned_fields= true;
+ (yyval.vers_column_versioning)= Column_definition::WITHOUT_VERSIONING;
+ }
+#line 35504 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 889: /* charset: CHAR_SYM SET */
+#line 6543 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.kwd)= (yyvsp[-1].kwd); }
+#line 35510 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 890: /* charset: CHARSET */
+#line 6544 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.kwd)= (yyvsp[0].kwd); }
+#line 35516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 891: /* charset_name: ident_or_text */
+#line 6549 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ myf utf8_flag= thd->get_utf8_flag();
+ if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str, MY_CS_PRIMARY,
+ MYF(utf8_flag)))))
+ my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
+ }
+#line 35527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 892: /* charset_name: BINARY */
+#line 6555 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= &my_charset_bin; }
+#line 35533 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 893: /* charset_name_or_default: charset_name */
+#line 6559 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=(yyvsp[0].charset); }
+#line 35539 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 894: /* charset_name_or_default: DEFAULT */
+#line 6560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=NULL; }
+#line 35545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 895: /* opt_load_data_charset: %empty */
+#line 6564 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= NULL; }
+#line 35551 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 896: /* opt_load_data_charset: charset charset_name_or_default */
+#line 6565 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= (yyvsp[0].charset); }
+#line 35557 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 897: /* old_or_new_charset_name: ident_or_text */
+#line 6570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ myf utf8_flag= thd->get_utf8_flag();
+ if (unlikely(!((yyval.charset)=get_charset_by_csname((yyvsp[0].lex_str).str,
+ MY_CS_PRIMARY,
+ MYF(utf8_flag))) &&
+ !((yyval.charset)=get_old_charset_by_name((yyvsp[0].lex_str).str))))
+ my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), (yyvsp[0].lex_str).str));
+ }
+#line 35570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 898: /* old_or_new_charset_name: BINARY */
+#line 6578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= &my_charset_bin; }
+#line 35576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 899: /* old_or_new_charset_name_or_default: old_or_new_charset_name */
+#line 6582 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=(yyvsp[0].charset); }
+#line 35582 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 900: /* old_or_new_charset_name_or_default: DEFAULT */
+#line 6583 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)=NULL; }
+#line 35588 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 901: /* collation_name: ident_or_text */
+#line 6588 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_extended_collation).set_by_name((yyvsp[0].lex_str).str, thd->get_utf8_flag()))
+ MYSQL_YYABORT;
+ }
+#line 35597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 902: /* collation_name_or_default: collation_name */
+#line 6595 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_extended_collation)=(yyvsp[0].Lex_extended_collation); }
+#line 35603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 903: /* collation_name_or_default: DEFAULT */
+#line 6596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_extended_collation).set_collate_default(); }
+#line 35609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 904: /* opt_default: %empty */
+#line 6600 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 905: /* opt_default: DEFAULT */
+#line 6601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 35621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 906: /* charset_or_alias: charset charset_name */
+#line 6605 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= (yyvsp[0].charset); }
+#line 35627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 907: /* charset_or_alias: ASCII_SYM */
+#line 6606 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.charset)= &my_charset_latin1; }
+#line 35633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 908: /* charset_or_alias: UNICODE_SYM */
+#line 6608 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))))
+ my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2"));
+ }
+#line 35642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 909: /* opt_binary: %empty */
+#line 6615 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).init(); }
+#line 35648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 911: /* binary: BYTE_SYM */
+#line 6621 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset(&my_charset_bin));
+ }
+#line 35656 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 912: /* binary: charset_or_alias */
+#line 6625 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_charset(Lex_exact_charset((yyvsp[0].charset)));
+ }
+#line 35664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 913: /* binary: charset_or_alias BINARY */
+#line 6629 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[-1].charset))))
+ MYSQL_YYABORT;
+ }
+#line 35673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 914: /* binary: BINARY */
+#line 6633 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_exact_charset_extended_collation_attrs).set_contextually_typed_binary_style(); }
+#line 35679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 915: /* binary: BINARY charset_or_alias */
+#line 6635 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_binary(Lex_exact_charset((yyvsp[0].charset))))
+ MYSQL_YYABORT;
+ }
+#line 35688 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 916: /* binary: charset_or_alias COLLATE_SYM DEFAULT */
+#line 6640 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_charset_collate_default(Lex_exact_charset((yyvsp[-2].charset)));
+ }
+#line 35696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 917: /* binary: charset_or_alias COLLATE_SYM collation_name */
+#line 6644 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].Lex_extended_collation).merge_exact_charset(Lex_exact_charset((yyvsp[-2].charset))))
+ MYSQL_YYABORT;
+ (yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
+ }
+#line 35706 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 918: /* binary: COLLATE_SYM collation_name */
+#line 6650 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs)= Lex_exact_charset_extended_collation_attrs((yyvsp[0].Lex_extended_collation));
+ }
+#line 35714 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 919: /* binary: COLLATE_SYM DEFAULT */
+#line 6654 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_exact_charset_extended_collation_attrs).set_collate_default();
+ }
+#line 35722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 920: /* opt_bin_mod: %empty */
+#line 6660 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 35728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 921: /* opt_bin_mod: BINARY */
+#line 6661 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= true; }
+#line 35734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 922: /* $@93: %empty */
+#line 6666 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[0].ulong_num) == 0))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 35746 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 923: /* ws_nweights: '(' real_ulong_num $@93 ')' */
+#line 6674 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
+#line 35752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 924: /* ws_level_flag_desc: ASC */
+#line 6678 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35758 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 925: /* ws_level_flag_desc: DESC */
+#line 6679 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
+#line 35764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 926: /* ws_level_flag_reverse: REVERSE_SYM */
+#line 6683 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
+#line 35770 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 927: /* ws_level_flags: %empty */
+#line 6686 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 928: /* ws_level_flags: ws_level_flag_desc */
+#line 6687 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 35782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 929: /* ws_level_flags: ws_level_flag_desc ws_level_flag_reverse */
+#line 6688 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
+#line 35788 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 930: /* ws_level_flags: ws_level_flag_reverse */
+#line 6689 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
+#line 35794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 931: /* ws_level_number: real_ulong_num */
+#line 6694 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ulong_num)= (yyvsp[0].ulong_num) < 1 ? 1 : ((yyvsp[0].ulong_num) > MY_STRXFRM_NLEVELS ? MY_STRXFRM_NLEVELS : (yyvsp[0].ulong_num));
+ (yyval.ulong_num)--;
+ }
+#line 35803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 932: /* ws_level_list_item: ws_level_number ws_level_flags */
+#line 6702 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
+ }
+#line 35811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 933: /* ws_level_list: ws_level_list_item */
+#line 6708 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 35817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 934: /* ws_level_list: ws_level_list ',' ws_level_list_item */
+#line 6709 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
+#line 35823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 935: /* ws_level_range: ws_level_number '-' ws_level_number */
+#line 6714 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint start= (yyvsp[-2].ulong_num);
+ uint end= (yyvsp[0].ulong_num);
+ for ((yyval.ulong_num)= 0; start <= end; start++)
+ (yyval.ulong_num)|= (1 << start);
+ }
+#line 35834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 936: /* ws_level_list_or_range: ws_level_list */
+#line 6723 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 35840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 937: /* ws_level_list_or_range: ws_level_range */
+#line 6724 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 35846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 938: /* opt_ws_levels: %empty */
+#line 6728 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 35852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 939: /* opt_ws_levels: LEVEL_SYM ws_level_list_or_range */
+#line 6729 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
+#line 35858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 942: /* references: REFERENCES table_ident opt_ref_list opt_match_clause opt_on_update_delete */
+#line 6743 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)=(yyvsp[-3].table);
+ }
+#line 35866 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 943: /* opt_ref_list: %empty */
+#line 6750 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ref_list.empty(); }
+#line 35872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 945: /* ref_list: ref_list ',' ident */
+#line 6756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
+ if (unlikely(key == NULL))
+ MYSQL_YYABORT;
+ Lex->ref_list.push_back(key, thd->mem_root);
+ }
+#line 35883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 946: /* ref_list: ident */
+#line 6763 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
+ if (unlikely(key == NULL))
+ MYSQL_YYABORT;
+ LEX *lex= Lex;
+ lex->ref_list.empty();
+ lex->ref_list.push_back(key, thd->mem_root);
+ }
+#line 35896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 947: /* opt_match_clause: %empty */
+#line 6775 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
+#line 35902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 948: /* opt_match_clause: MATCH FULL */
+#line 6777 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
+#line 35908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 949: /* opt_match_clause: MATCH PARTIAL */
+#line 6779 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
+#line 35914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 950: /* opt_match_clause: MATCH SIMPLE_SYM */
+#line 6781 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
+#line 35920 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 951: /* opt_on_update_delete: %empty */
+#line 6786 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= FK_OPTION_UNDEF;
+ lex->fk_delete_opt= FK_OPTION_UNDEF;
+ }
+#line 35930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 952: /* opt_on_update_delete: ON UPDATE_SYM delete_option */
+#line 6792 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= (yyvsp[0].m_fk_option);
+ lex->fk_delete_opt= FK_OPTION_UNDEF;
+ }
+#line 35940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 953: /* opt_on_update_delete: ON DELETE_SYM delete_option */
+#line 6798 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= FK_OPTION_UNDEF;
+ lex->fk_delete_opt= (yyvsp[0].m_fk_option);
+ }
+#line 35950 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 954: /* opt_on_update_delete: ON UPDATE_SYM delete_option ON DELETE_SYM delete_option */
+#line 6805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= (yyvsp[-3].m_fk_option);
+ lex->fk_delete_opt= (yyvsp[0].m_fk_option);
+ }
+#line 35960 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 955: /* opt_on_update_delete: ON DELETE_SYM delete_option ON UPDATE_SYM delete_option */
+#line 6812 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->fk_update_opt= (yyvsp[0].m_fk_option);
+ lex->fk_delete_opt= (yyvsp[-3].m_fk_option);
+ }
+#line 35970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 956: /* delete_option: RESTRICT */
+#line 6820 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
+#line 35976 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 957: /* delete_option: CASCADE */
+#line 6821 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_CASCADE; }
+#line 35982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 958: /* delete_option: SET NULL_SYM */
+#line 6822 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
+#line 35988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 959: /* delete_option: NO_SYM ACTION */
+#line 6823 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
+#line 35994 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 960: /* delete_option: SET DEFAULT */
+#line 6824 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
+#line 36000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 961: /* constraint_key_type: PRIMARY_SYM KEY_SYM */
+#line 6828 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_type)= Key::PRIMARY; }
+#line 36006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 962: /* constraint_key_type: UNIQUE_SYM opt_key_or_index */
+#line 6829 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_type)= Key::UNIQUE; }
+#line 36012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 963: /* key_or_index: KEY_SYM */
+#line 6833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 964: /* key_or_index: INDEX_SYM */
+#line 6834 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 965: /* opt_key_or_index: %empty */
+#line 6838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 967: /* keys_or_index: KEYS */
+#line 6843 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 968: /* keys_or_index: INDEX_SYM */
+#line 6844 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 969: /* keys_or_index: INDEXES */
+#line 6845 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 970: /* fulltext: FULLTEXT_SYM */
+#line 6849 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_type)= Key::FULLTEXT;}
+#line 36054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 971: /* spatial: SPATIAL_SYM */
+#line 6854 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef HAVE_SPATIAL
+ (yyval.key_type)= Key::SPATIAL;
+#else
+ my_yyabort_error((ER_FEATURE_DISABLED, MYF(0), sym_group_geom.name,
+ sym_group_geom.needed_define));
+#endif
+ }
+#line 36067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 972: /* normal_key_options: %empty */
+#line 6865 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 973: /* normal_key_options: normal_key_opts */
+#line 6866 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->option_list= Lex->option_list; }
+#line 36079 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 974: /* fulltext_key_options: %empty */
+#line 6870 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36085 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 975: /* fulltext_key_options: fulltext_key_opts */
+#line 6871 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->option_list= Lex->option_list; }
+#line 36091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 976: /* spatial_key_options: %empty */
+#line 6875 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36097 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 977: /* spatial_key_options: spatial_key_opts */
+#line 6876 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->option_list= Lex->option_list; }
+#line 36103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 984: /* opt_USING_key_algorithm: %empty */
+#line 6895 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
+#line 36109 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 985: /* opt_USING_key_algorithm: USING btree_or_rtree */
+#line 6896 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= (yyvsp[0].key_alg); }
+#line 36115 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 986: /* opt_key_algorithm_clause: %empty */
+#line 6901 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
+#line 36121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 987: /* opt_key_algorithm_clause: USING btree_or_rtree */
+#line 6902 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= (yyvsp[0].key_alg); }
+#line 36127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 988: /* opt_key_algorithm_clause: TYPE_SYM btree_or_rtree */
+#line 6903 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= (yyvsp[0].key_alg); }
+#line 36133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 989: /* key_using_alg: USING btree_or_rtree */
+#line 6908 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
+#line 36139 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 990: /* key_using_alg: TYPE_SYM btree_or_rtree */
+#line 6910 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
+#line 36145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 991: /* all_key_opt: KEY_BLOCK_SIZE opt_equal ulong_num */
+#line 6915 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num);
+ Lex->last_key->key_create_info.flags|= HA_USES_BLOCK_SIZE;
+ }
+#line 36154 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 992: /* all_key_opt: COMMENT_SYM TEXT_STRING_sys */
+#line 6920 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
+#line 36160 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 993: /* all_key_opt: VISIBLE_SYM */
+#line 6922 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* This is mainly for MySQL 8.0 compatibility */
+ }
+#line 36168 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 994: /* all_key_opt: ignorability */
+#line 6926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_key->key_create_info.is_ignored= (yyvsp[0].num);
+ }
+#line 36176 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 995: /* all_key_opt: engine_defined_option */
+#line 6930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].engine_option_value_ptr)->link(&Lex->option_list, &Lex->option_list_last);
+ }
+#line 36184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1000: /* fulltext_key_opt: WITH PARSER_SYM IDENT_sys */
+#line 6947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (likely(plugin_is_ready(&(yyvsp[0].ident_sys), MYSQL_FTPARSER_PLUGIN)))
+ Lex->last_key->key_create_info.parser_name= (yyvsp[0].ident_sys);
+ else
+ my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 36195 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1001: /* btree_or_rtree: BTREE_SYM */
+#line 6956 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_BTREE; }
+#line 36201 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1002: /* btree_or_rtree: RTREE_SYM */
+#line 6957 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_RTREE; }
+#line 36207 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1003: /* btree_or_rtree: HASH_SYM */
+#line 6958 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.key_alg)= HA_KEY_ALG_HASH; }
+#line 36213 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1004: /* ignorability: IGNORED_SYM */
+#line 6962 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= true; }
+#line 36219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1005: /* ignorability: NOT_SYM IGNORED_SYM */
+#line 6963 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 36225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1006: /* key_list: key_list ',' key_part order_dir */
+#line 6968 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].key_part)->asc= (yyvsp[0].num);
+ Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
+ }
+#line 36234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1007: /* key_list: key_part order_dir */
+#line 6973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].key_part)->asc= (yyvsp[0].num);
+ Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
+ }
+#line 36243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1008: /* opt_without_overlaps: %empty */
+#line 6980 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1009: /* opt_without_overlaps: ',' ident WITHOUT OVERLAPS_SYM */
+#line 6982 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_key->without_overlaps= true;
+ Lex->last_key->period= (yyvsp[-2].ident_sys);
+ }
+#line 36258 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1010: /* key_part: ident */
+#line 6990 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
+ if (unlikely((yyval.key_part) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1011: /* key_part: ident '(' NUM ')' */
+#line 6996 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int key_part_len= atoi((yyvsp[-1].lex_str).str);
+ if (unlikely(!key_part_len))
+ my_yyabort_error((ER_KEY_PART_0, MYF(0), (yyvsp[-3].ident_sys).str));
+ (yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[-3].ident_sys), (uint) key_part_len);
+ if (unlikely((yyval.key_part) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1012: /* opt_ident: %empty */
+#line 7007 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 36287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1013: /* opt_ident: field_ident */
+#line 7008 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].lex_str); }
+#line 36293 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1014: /* string_list: text_string */
+#line 7013 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
+#line 36299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1015: /* string_list: string_list ',' text_string */
+#line 7015 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
+#line 36305 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1016: /* $@94: %empty */
+#line 7024 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->name= null_clex_str;
+ Lex->table_type= TABLE_TYPE_UNKNOWN;
+ Lex->sql_command= SQLCOM_ALTER_TABLE;
+ 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);
+ }
+#line 36325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1017: /* $@95: %empty */
+#line 7040 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.set((yyvsp[-2].object_ddl_options));
+ if (!Lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT, MDL_SHARED_UPGRADABLE))
+ MYSQL_YYABORT;
+ 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();
+ }
+#line 36341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1018: /* alter: ALTER $@94 alter_options TABLE_SYM opt_if_exists table_ident opt_lock_wait_timeout $@95 alter_commands */
+#line 7052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (likely(!Lex->m_sql_cmd))
+ {
+ /* Create a generic ALTER TABLE statment. */
+ Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+ Lex->pop_select(); //main select
+ }
+#line 36356 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1019: /* $@96: %empty */
+#line 7063 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.init();
+ if (Lex->main_select_push(true))
+ MYSQL_YYABORT;
+ }
+#line 36366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1020: /* alter: ALTER DATABASE ident_or_empty $@96 create_database_options */
+#line 7069 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_ALTER_DB;
+ lex->name= (yyvsp[-2].ident_sys);
+ if (lex->name.str == NULL &&
+ unlikely(lex->copy_db_to(&lex->name)))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ }
+#line 36380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1021: /* $@97: %empty */
+#line 7079 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.init();
+ Lex->create_info.schema_comment= thd->make_clex_string((yyvsp[0].lex_str));
+ Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
+ }
+#line 36390 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1022: /* alter: ALTER DATABASE COMMENT_SYM opt_equal TEXT_STRING_sys $@97 opt_create_database_options */
+#line 7085 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_ALTER_DB;
+ lex->name= Lex_ident_sys();
+ if (lex->name.str == NULL &&
+ unlikely(lex->copy_db_to(&lex->name)))
+ MYSQL_YYABORT;
+ }
+#line 36403 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1023: /* alter: ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM */
+#line 7094 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "DATABASE"));
+ lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
+ lex->name= (yyvsp[-4].ident_sys);
+ }
+#line 36415 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1024: /* $@98: %empty */
+#line 7102 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_procedure_start((yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 36424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1025: /* alter: ALTER PROCEDURE_SYM sp_name $@98 sp_a_chistics stmt_end */
+#line 7107 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36430 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1026: /* $@99: %empty */
+#line 7109 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_function_start((yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 36439 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1027: /* alter: ALTER FUNCTION_SYM sp_name $@99 sp_a_chistics stmt_end */
+#line 7114 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36445 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1028: /* $@100: %empty */
+#line 7116 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, (yyvsp[-4].num), (yyvsp[-2].view_suid), (yyvsp[0].table)))
+ MYSQL_YYABORT;
+ }
+#line 36456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1029: /* alter: ALTER view_algorithm definer_opt opt_view_suid VIEW_SYM table_ident $@100 view_list_opt AS view_select stmt_end */
+#line 7122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36462 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1030: /* $@101: %empty */
+#line 7129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ if (Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, (yyvsp[-2].view_suid), (yyvsp[0].table)))
+ MYSQL_YYABORT;
+ }
+#line 36473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1031: /* alter: ALTER definer_opt opt_view_suid VIEW_SYM table_ident $@101 view_list_opt AS view_select stmt_end */
+#line 7135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1032: /* $@102: %empty */
+#line 7137 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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
+ If it had to be supported spname had to be added to
+ Event_parse_data.
+ */
+
+ if (unlikely(!(Lex->event_parse_data= Event_parse_data::new_instance(thd))))
+ MYSQL_YYABORT;
+ Lex->event_parse_data->identifier= (yyvsp[0].spname);
+
+ Lex->sql_command= SQLCOM_ALTER_EVENT;
+ Lex->stmt_definition_begin= (yyvsp[-2].simple_string);
+ }
+#line 36502 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1033: /* alter: ALTER definer_opt remember_name EVENT_SYM sp_name $@102 ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_status opt_ev_comment opt_ev_sql_stmt */
+#line 7160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ /*
+ sql_command is set here because some rules in ev_sql_stmt
+ can overwrite it
+ */
+ Lex->sql_command= SQLCOM_ALTER_EVENT;
+ Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
+
+ Lex->pop_select(); //main select
+ }
+#line 36522 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1034: /* $@103: %empty */
+#line 7176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_ALTER_SERVER;
+ lex->server_options.reset((yyvsp[0].lex_str));
+ }
+#line 36532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1035: /* alter: ALTER SERVER_SYM ident_or_text $@103 OPTIONS_SYM '(' server_options_list ')' */
+#line 7180 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 36538 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1036: /* alter: ALTER USER_SYM opt_if_exists clear_privileges grant_list opt_require_clause opt_resource_options opt_account_locking_and_opt_password_expiration */
+#line 7184 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_info.set((yyvsp[-5].object_ddl_options));
+ Lex->sql_command= SQLCOM_ALTER_USER;
+ }
+#line 36547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1037: /* $@104: %empty */
+#line 7189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_ALTER_SEQUENCE;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 36559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1038: /* $@105: %empty */
+#line 7197 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!(lex->create_info.seq_create_info= new (thd->mem_root)
+ sequence_definition()) ||
+ !lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL, TL_OPTION_SEQUENCE,
+ TL_WRITE, MDL_EXCLUSIVE))
+ MYSQL_YYABORT;
+ }
+#line 36573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1039: /* $@106: %empty */
+#line 7207 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Create a generic ALTER SEQUENCE statment. */
+ Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence((yyvsp[-4].object_ddl_options));
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36584 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1040: /* alter: ALTER SEQUENCE_SYM opt_if_exists $@104 table_ident $@105 sequence_defs $@106 stmt_end */
+#line 7212 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36590 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1041: /* account_locking_option: LOCK_SYM */
+#line 7217 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_LOCKED;
+ }
+#line 36598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1042: /* account_locking_option: UNLOCK_SYM */
+#line 7221 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.account_locked= ACCOUNTLOCK_UNLOCKED;
+ }
+#line 36606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1043: /* opt_password_expire_option: %empty */
+#line 7228 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NOW;
+ }
+#line 36614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1044: /* opt_password_expire_option: NEVER_SYM */
+#line 7232 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_NEVER;
+ }
+#line 36622 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1045: /* opt_password_expire_option: DEFAULT */
+#line 7236 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_DEFAULT;
+ }
+#line 36630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1046: /* opt_password_expire_option: INTERVAL_SYM NUM DAY_SYM */
+#line 7240 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.password_expire= PASSWORD_EXPIRE_INTERVAL;
+ if (!(Lex->account_options.num_expiration_days= atoi((yyvsp[-1].lex_str).str)))
+ my_yyabort_error((ER_WRONG_VALUE, MYF(0), "DAY", (yyvsp[-1].lex_str).str));
+ }
+#line 36640 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1052: /* ev_alter_on_schedule_completion: %empty */
+#line 7256 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0;}
+#line 36646 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1053: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time */
+#line 7257 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 36652 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1054: /* ev_alter_on_schedule_completion: ev_on_completion */
+#line 7258 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 36658 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1055: /* ev_alter_on_schedule_completion: ON SCHEDULE_SYM ev_schedule_time ev_on_completion */
+#line 7259 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 36664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1056: /* opt_ev_rename_to: %empty */
+#line 7263 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0;}
+#line 36670 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1057: /* opt_ev_rename_to: RENAME TO_SYM sp_name */
+#line 7265 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Use lex's spname to hold the new name.
+ The original name is in the Event_parse_data object
+ */
+ Lex->spname= (yyvsp[0].spname);
+ (yyval.num)= 1;
+ }
+#line 36683 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1058: /* opt_ev_sql_stmt: %empty */
+#line 7276 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0;}
+#line 36689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1059: /* opt_ev_sql_stmt: DO_SYM ev_sql_stmt */
+#line 7277 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 36695 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1060: /* ident_or_empty: %empty */
+#line 7282 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_sys)= Lex_ident_sys(); }
+#line 36701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1063: /* alter_commands: DISCARD TABLESPACE */
+#line 7289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_discard_import_tablespace(
+ Sql_cmd_discard_import_tablespace::DISCARD_TABLESPACE);
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1064: /* alter_commands: IMPORT TABLESPACE */
+#line 7297 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_discard_import_tablespace(
+ Sql_cmd_discard_import_tablespace::IMPORT_TABLESPACE);
+ if (unlikely(Lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1070: /* alter_commands: DROP PARTITION_SYM opt_if_exists alt_part_name_list */
+#line 7319 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_DROP;
+ DBUG_ASSERT(!Lex->if_exists());
+ Lex->create_info.add((yyvsp[-1].object_ddl_options));
+ }
+#line 36735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1071: /* alter_commands: REBUILD_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
+#line 7326 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->alter_info.partition_flags|= ALTER_PARTITION_REBUILD;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ }
+#line 36745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1072: /* $@107: %empty */
+#line 7333 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_optimize_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1074: /* alter_commands: ANALYZE_SYM PARTITION_SYM opt_no_write_to_binlog all_or_alt_part_name_list */
+#line 7346 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_analyze_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1075: /* $@108: %empty */
+#line 7357 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_check_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1077: /* $@109: %empty */
+#line 7369 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_repair_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36804 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1079: /* alter_commands: COALESCE PARTITION_SYM opt_no_write_to_binlog real_ulong_num */
+#line 7381 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->alter_info.partition_flags|= ALTER_PARTITION_COALESCE;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->alter_info.num_parts= (yyvsp[0].ulong_num);
+ }
+#line 36815 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1080: /* alter_commands: TRUNCATE_SYM PARTITION_SYM all_or_alt_part_name_list */
+#line 7388 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->check_opt.init();
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_alter_table_truncate_partition();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1082: /* alter_commands: EXCHANGE_SYM PARTITION_SYM alt_part_name_item WITH TABLE_SYM table_ident have_partitioning */
+#line 7400 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_table_exchange_partition((yyvsp[-1].table)))
+ MYSQL_YYABORT;
+ }
+#line 36838 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1083: /* alter_commands: CONVERT_SYM PARTITION_SYM alt_part_name_item TO_SYM TABLE_SYM table_ident have_partitioning */
+#line 7406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (Lex->stmt_alter_table((yyvsp[-1].table)))
+ MYSQL_YYABORT;
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.partition_flags|= ALTER_PARTITION_CONVERT_OUT;
+ }
+#line 36852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1084: /* $@110: %empty */
+#line 7416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), nullptr, 0,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
+ MYSQL_YYABORT;
+
+ /*
+ This will appear as (new_db, new_name) in alter_ctx.
+ new_db will be IX-locked and new_name X-locked.
+ */
+ lex->first_select_lex()->db= (yyvsp[0].table)->db;
+ lex->name= (yyvsp[0].table)->table;
+ if (lex->first_select_lex()->db.str == NULL &&
+ lex->copy_db_to(&lex->first_select_lex()->db))
+ MYSQL_YYABORT;
+
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+
+ lex->part_info->num_parts= 1;
+ /*
+ OR-ed with ALTER_PARTITION_ADD because too many checks of
+ ALTER_PARTITION_ADD required.
+ */
+ lex->alter_info.partition_flags|= ALTER_PARTITION_ADD |
+ ALTER_PARTITION_CONVERT_IN;
+ }
+#line 36886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1085: /* alter_commands: CONVERT_SYM TABLE_SYM table_ident $@110 TO_SYM PARTITION_SYM part_definition */
+#line 7446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 36897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1086: /* remove_partitioning: REMOVE_SYM PARTITIONING_SYM */
+#line 7456 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
+ }
+#line 36905 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1087: /* all_or_alt_part_name_list: ALL */
+#line 7463 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
+ }
+#line 36913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1089: /* $@111: %empty */
+#line 7472 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+
+ lex->alter_info.partition_flags|= ALTER_PARTITION_ADD;
+ DBUG_ASSERT(!Lex->create_info.if_not_exists());
+ lex->create_info.set((yyvsp[-1].object_ddl_options));
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ }
+#line 36929 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1090: /* add_partition_rule: ADD PARTITION_SYM opt_if_not_exists opt_no_write_to_binlog $@111 add_part_extra */
+#line 7484 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1092: /* add_part_extra: '(' part_def_list ')' */
+#line 7490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info->num_parts= lex->part_info->partitions.elements;
+ }
+#line 36944 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1093: /* add_part_extra: PARTITIONS_SYM real_ulong_num */
+#line 7495 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->part_info->num_parts= (yyvsp[0].ulong_num);
+ }
+#line 36952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1094: /* $@112: %empty */
+#line 7502 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->part_info= new (thd->mem_root) partition_info();
+ if (unlikely(!lex->part_info))
+ MYSQL_YYABORT;
+
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ }
+#line 36965 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1096: /* reorg_parts_rule: %empty */
+#line 7515 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
+ }
+#line 36973 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1097: /* $@113: %empty */
+#line 7519 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
+ }
+#line 36981 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1098: /* reorg_parts_rule: alt_part_name_list $@113 INTO '(' part_def_list ')' */
+#line 7523 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ partition_info *part_info= Lex->part_info;
+ part_info->num_parts= part_info->partitions.elements;
+ }
+#line 36990 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1099: /* alt_part_name_list: alt_part_name_item */
+#line 7530 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 36996 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1100: /* alt_part_name_list: alt_part_name_list ',' alt_part_name_item */
+#line 7531 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37002 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1101: /* alt_part_name_item: ident */
+#line 7536 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->alter_info.partition_names.push_back((yyvsp[0].ident_sys).str,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 37012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1105: /* alter_list_item: add_column column_def opt_place */
+#line 7558 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->create_last_non_select_table= lex->last_table();
+ lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
+ (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
+ }
+#line 37023 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1106: /* alter_list_item: ADD key_def */
+#line 7565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->create_last_non_select_table= Lex->last_table();
+ Lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 37032 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1107: /* alter_list_item: ADD period_for_system_time */
+#line 7570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_PERIOD;
+ }
+#line 37040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1108: /* alter_list_item: ADD PERIOD_SYM opt_if_not_exists_table_element period_for_application_time */
+#line 7575 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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;
+ }
+#line 37050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1109: /* alter_list_item: add_column '(' create_field_list ')' */
+#line 7581 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
+ if (!lex->alter_info.key_list.is_empty())
+ lex->alter_info.flags|= ALTER_ADD_INDEX;
+ }
+#line 37061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1110: /* alter_list_item: ADD constraint_def */
+#line 7588 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
+ }
+#line 37069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1111: /* alter_list_item: ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint */
+#line 7592 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
+ Lex->add_constraint((yyvsp[-1].lex_str), (yyvsp[0].virtual_column), TRUE);
+ }
+#line 37078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1112: /* alter_list_item: CHANGE opt_column opt_if_exists_table_element field_ident field_spec opt_place */
+#line 7598 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_CHANGE_COLUMN | ALTER_RENAME_COLUMN;
+ Lex->create_last_non_select_table= Lex->last_table();
+ (yyvsp[-1].create_field)->change= (yyvsp[-2].lex_str);
+ (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
+ }
+#line 37089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1113: /* alter_list_item: MODIFY_SYM opt_column opt_if_exists_table_element field_spec opt_place */
+#line 7606 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
+ Lex->create_last_non_select_table= Lex->last_table();
+ (yyvsp[-1].create_field)->change= (yyvsp[-1].create_field)->field_name;
+ (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
+ }
+#line 37100 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1114: /* alter_list_item: DROP opt_column opt_if_exists_table_element field_ident opt_restrict */
+#line 7613 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::COLUMN, (yyvsp[-1].lex_str).str, (yyvsp[-2].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_PARSER_DROP_COLUMN;
+ }
+#line 37114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1115: /* alter_list_item: DROP CONSTRAINT opt_if_exists_table_element field_ident */
+#line 7623 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::CHECK_CONSTRAINT,
+ (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
+ 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;
+ }
+#line 37129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1116: /* alter_list_item: DROP FOREIGN KEY_SYM opt_if_exists_table_element field_ident */
+#line 7634 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::FOREIGN_KEY, (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY;
+ }
+#line 37143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1117: /* alter_list_item: DROP opt_constraint_no_id PRIMARY_SYM KEY_SYM */
+#line 7644 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::KEY, primary_key_name.str,
+ FALSE));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_DROP_INDEX;
+ }
+#line 37158 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1118: /* alter_list_item: DROP key_or_index opt_if_exists_table_element field_ident */
+#line 7655 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::KEY, (yyvsp[0].lex_str).str, (yyvsp[-1].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->alter_info.drop_list.push_back(ad, thd->mem_root);
+ lex->alter_info.flags|= ALTER_DROP_INDEX;
+ }
+#line 37172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1119: /* alter_list_item: DISABLE_SYM KEYS */
+#line 7665 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.keys_onoff= Alter_info::DISABLE;
+ lex->alter_info.flags|= ALTER_KEYS_ONOFF;
+ }
+#line 37182 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1120: /* alter_list_item: ENABLE_SYM KEYS */
+#line 7671 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.keys_onoff= Alter_info::ENABLE;
+ lex->alter_info.flags|= ALTER_KEYS_ONOFF;
+ }
+#line 37192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1121: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident SET DEFAULT column_default_expr */
+#line 7677 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (check_expression((yyvsp[0].virtual_column), &(yyvsp[-3].lex_str), VCOL_DEFAULT))
+ MYSQL_YYABORT;
+ if (unlikely(Lex->add_alter_list((yyvsp[-3].lex_str), (yyvsp[0].virtual_column), (yyvsp[-4].num))))
+ MYSQL_YYABORT;
+ }
+#line 37203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1122: /* alter_list_item: ALTER key_or_index opt_if_exists_table_element ident ignorability */
+#line 7684 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ Alter_index_ignorability *ac= new (thd->mem_root)
+ Alter_index_ignorability((yyvsp[-1].ident_sys).str, (yyvsp[0].num), (yyvsp[-2].num));
+ if (ac == NULL)
+ MYSQL_YYABORT;
+ lex->alter_info.alter_index_ignorability_list.push_back(ac);
+ lex->alter_info.flags|= ALTER_INDEX_IGNORABILITY;
+ }
+#line 37217 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1123: /* alter_list_item: ALTER opt_column opt_if_exists_table_element field_ident DROP DEFAULT */
+#line 7694 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_alter_list((yyvsp[-2].lex_str), (Virtual_column_info*) 0, (yyvsp[-3].num))))
+ MYSQL_YYABORT;
+ }
+#line 37226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1124: /* alter_list_item: RENAME opt_to table_ident */
+#line 7699 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_alter_table((yyvsp[0].table)))
+ MYSQL_YYABORT;
+ Lex->alter_info.flags|= ALTER_RENAME;
+ }
+#line 37236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1125: /* alter_list_item: RENAME COLUMN_SYM opt_if_exists_table_element ident TO_SYM ident */
+#line 7705 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_alter_list((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), (yyvsp[-3].num))))
+ MYSQL_YYABORT;
+ }
+#line 37245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1126: /* alter_list_item: RENAME key_or_index opt_if_exists_table_element field_ident TO_SYM field_ident */
+#line 7710 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_rename_key *ak= new (thd->mem_root)
+ Alter_rename_key((yyvsp[-2].lex_str), (yyvsp[0].lex_str), (yyvsp[-3].num));
+ if (ak == NULL)
+ MYSQL_YYABORT;
+ lex->alter_info.alter_rename_key_list.push_back(ak);
+ lex->alter_info.flags|= ALTER_RENAME_INDEX;
+ }
+#line 37259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1127: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default */
+#line 7720 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_alter_list_item_convert_to_charset((yyvsp[0].charset)))
+ MYSQL_YYABORT;
+ }
+#line 37268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1128: /* alter_list_item: CONVERT_SYM TO_SYM charset charset_name_or_default COLLATE_SYM collation_name_or_default */
+#line 7726 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->add_alter_list_item_convert_to_charset((yyvsp[-2].charset), (yyvsp[0].Lex_extended_collation)))
+ MYSQL_YYABORT;
+ }
+#line 37277 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1129: /* alter_list_item: create_table_options_space_separated */
+#line 7731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.flags|= ALTER_OPTIONS;
+ }
+#line 37286 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1130: /* alter_list_item: FORCE_SYM */
+#line 7736 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_RECREATE;
+ }
+#line 37294 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1131: /* alter_list_item: alter_order_clause */
+#line 7740 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->alter_info.flags|= ALTER_ORDER;
+ }
+#line 37303 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1134: /* alter_list_item: ADD SYSTEM VERSIONING_SYM */
+#line 7747 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
+ Lex->create_info.options|= HA_VERSIONED_TABLE;
+ }
+#line 37312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1135: /* alter_list_item: DROP SYSTEM VERSIONING_SYM */
+#line 7752 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
+ Lex->create_info.options&= ~HA_VERSIONED_TABLE;
+ }
+#line 37321 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1136: /* alter_list_item: DROP PERIOD_SYM FOR_SYSTEM_TIME_SYM */
+#line 7757 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.flags|= ALTER_DROP_PERIOD;
+ }
+#line 37329 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1137: /* alter_list_item: DROP PERIOD_SYM opt_if_exists_table_element FOR_SYM ident */
+#line 7761 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Alter_drop *ad= new Alter_drop(Alter_drop::PERIOD, (yyvsp[0].ident_sys).str, (yyvsp[-2].num));
+ 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;
+ }
+#line 37341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1143: /* alter_algorithm_option: ALGORITHM_SYM opt_equal DEFAULT */
+#line 7780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.set_requested_algorithm(
+ Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT);
+ }
+#line 37350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1144: /* alter_algorithm_option: ALGORITHM_SYM opt_equal ident */
+#line 7785 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->alter_info.set_requested_algorithm(&(yyvsp[0].ident_sys))))
+ my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 37359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1145: /* alter_lock_option: LOCK_SYM opt_equal DEFAULT */
+#line 7793 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.requested_lock=
+ Alter_info::ALTER_TABLE_LOCK_DEFAULT;
+ }
+#line 37368 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1146: /* alter_lock_option: LOCK_SYM opt_equal ident */
+#line 7798 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->alter_info.set_requested_lock(&(yyvsp[0].ident_sys))))
+ my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].ident_sys).str));
+ }
+#line 37377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1147: /* opt_column: %empty */
+#line 7805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1148: /* opt_column: COLUMN_SYM */
+#line 7806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1149: /* opt_ignore: %empty */
+#line 7810 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 0;}
+#line 37395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1150: /* opt_ignore: IGNORE_SYM */
+#line 7811 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1;}
+#line 37401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1151: /* $@114: %empty */
+#line 7815 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 0;}
+#line 37407 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1157: /* alter_option: IGNORE_SYM */
+#line 7829 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1;}
+#line 37413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1158: /* alter_option: ONLINE_SYM */
+#line 7831 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.requested_lock=
+ Alter_info::ALTER_TABLE_LOCK_NONE;
+ }
+#line 37422 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1159: /* opt_restrict: %empty */
+#line 7838 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->drop_mode= DROP_DEFAULT; }
+#line 37428 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1160: /* opt_restrict: RESTRICT */
+#line 7839 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->drop_mode= DROP_RESTRICT; }
+#line 37434 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1161: /* opt_restrict: CASCADE */
+#line 7840 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->drop_mode= DROP_CASCADE; }
+#line 37440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1162: /* opt_place: %empty */
+#line 7844 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 37446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1163: /* opt_place: AFTER_SYM ident */
+#line 7846 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str)= (yyvsp[0].ident_sys);
+ Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
+ }
+#line 37455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1164: /* opt_place: FIRST_SYM */
+#line 7851 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str).str= first_keyword;
+ (yyval.lex_str).length= 5; /* Length of "first" */
+ Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
+ }
+#line 37465 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1165: /* opt_to: %empty */
+#line 7859 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1166: /* opt_to: TO_SYM */
+#line 7860 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37477 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1167: /* opt_to: '=' */
+#line 7861 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1168: /* opt_to: AS */
+#line 7862 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1169: /* $@115: %empty */
+#line 7867 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_START;
+ lex->type = 0;
+ /* If you change this code don't forget to update SLAVE START too */
+ }
+#line 37500 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1170: /* slave: START_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel $@115 slave_until */
+#line 7874 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1171: /* $@116: %empty */
+#line 7876 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_ALL_START;
+ lex->type = 0;
+ /* If you change this code don't forget to update STOP SLAVE too */
+ }
+#line 37517 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1172: /* slave: START_SYM ALL SLAVES slave_thread_opts $@116 */
+#line 7882 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1173: /* slave: STOP_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel */
+#line 7884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_STOP;
+ lex->type = 0;
+ /* If you change this code don't forget to update SLAVE STOP too */
+ }
+#line 37534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1174: /* slave: STOP_SYM ALL SLAVES slave_thread_opts */
+#line 7891 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_SLAVE_ALL_STOP;
+ lex->type = 0;
+ /* If you change this code don't forget to update SLAVE STOP too */
+ }
+#line 37545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1175: /* start: START_SYM TRANSACTION_SYM opt_start_transaction_option_list */
+#line 7901 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_BEGIN;
+ /* READ ONLY and READ WRITE are mutually exclusive. */
+ if (unlikely(((yyvsp[0].num) & MYSQL_START_TRANS_OPT_READ_WRITE) &&
+ ((yyvsp[0].num) & MYSQL_START_TRANS_OPT_READ_ONLY)))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ lex->start_transaction_opt= (yyvsp[0].num);
+ }
+#line 37562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1176: /* opt_start_transaction_option_list: %empty */
+#line 7917 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= 0;
+ }
+#line 37570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1177: /* opt_start_transaction_option_list: start_transaction_option_list */
+#line 7921 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (yyvsp[0].num);
+ }
+#line 37578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1178: /* start_transaction_option_list: start_transaction_option */
+#line 7928 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (yyvsp[0].num);
+ }
+#line 37586 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1179: /* start_transaction_option_list: start_transaction_option_list ',' start_transaction_option */
+#line 7932 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
+ }
+#line 37594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1180: /* start_transaction_option: WITH CONSISTENT_SYM SNAPSHOT_SYM */
+#line 7939 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
+ }
+#line 37602 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1181: /* start_transaction_option: READ_SYM ONLY_SYM */
+#line 7943 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
+ }
+#line 37610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1182: /* start_transaction_option: READ_SYM WRITE_SYM */
+#line 7947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
+ }
+#line 37618 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1183: /* $@117: %empty */
+#line 7953 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->slave_thd_opt= 0; }
+#line 37624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1184: /* slave_thread_opts: $@117 slave_thread_opt_list */
+#line 7955 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37630 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1187: /* slave_thread_opt: %empty */
+#line 7964 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37636 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1188: /* slave_thread_opt: SQL_THREAD */
+#line 7965 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->slave_thd_opt|=SLAVE_SQL; }
+#line 37642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1189: /* slave_thread_opt: RELAY_THREAD */
+#line 7966 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->slave_thd_opt|=SLAVE_IO; }
+#line 37648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1190: /* slave_until: %empty */
+#line 7970 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1191: /* slave_until: UNTIL_SYM slave_until_opts */
+#line 7972 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(((lex->mi.log_file_name || lex->mi.pos) &&
+ (lex->mi.relay_log_name || lex->mi.relay_log_pos)) ||
+ !((lex->mi.log_file_name && lex->mi.pos) ||
+ (lex->mi.relay_log_name && lex->mi.relay_log_pos))))
+ my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0)));
+ }
+#line 37667 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1192: /* slave_until: UNTIL_SYM MASTER_GTID_POS_SYM '=' TEXT_STRING_sys */
+#line 7981 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
+ }
+#line 37675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1195: /* $@118: %empty */
+#line 7993 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_CHECKSUM;
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 37686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1196: /* checksum: CHECKSUM_SYM table_or_tables $@118 table_list opt_checksum_type */
+#line 8000 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1197: /* opt_checksum_type: %empty */
+#line 8004 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags= 0; }
+#line 37698 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1198: /* opt_checksum_type: QUICK */
+#line 8005 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags= T_QUICK; }
+#line 37704 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1199: /* opt_checksum_type: EXTENDED_SYM */
+#line 8006 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags= T_EXTEND; }
+#line 37710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1201: /* $@119: %empty */
+#line 8012 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->table_type= TABLE_TYPE_VIEW; }
+#line 37716 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1203: /* $@120: %empty */
+#line 8018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_REPAIR;
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 37730 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1204: /* repair: REPAIR opt_no_write_to_binlog $@120 repair_table_or_view */
+#line 8028 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_repair_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37742 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1205: /* opt_mi_repair_type: %empty */
+#line 8038 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags = T_MEDIUM; }
+#line 37748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1206: /* opt_mi_repair_type: mi_repair_types */
+#line 8039 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1207: /* mi_repair_types: mi_repair_type */
+#line 8043 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1208: /* mi_repair_types: mi_repair_type mi_repair_types */
+#line 8044 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1209: /* mi_repair_type: QUICK */
+#line 8048 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_QUICK; }
+#line 37772 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1210: /* mi_repair_type: EXTENDED_SYM */
+#line 8049 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_EXTEND; }
+#line 37778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1211: /* mi_repair_type: USE_FRM */
+#line 8050 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_USEFRM; }
+#line 37784 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1212: /* opt_view_repair_type: %empty */
+#line 8054 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 37790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1213: /* opt_view_repair_type: FOR_SYM UPGRADE_SYM */
+#line 8055 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
+#line 37796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1214: /* opt_view_repair_type: FROM MYSQL_SYM */
+#line 8056 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
+#line 37802 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1215: /* $@121: %empty */
+#line 8061 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_ANALYZE;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 37816 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1216: /* analyze: ANALYZE_SYM opt_no_write_to_binlog table_or_tables $@121 analyze_table_list */
+#line 8071 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_analyze_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1220: /* opt_persistent_stat_clause: %empty */
+#line 8091 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1221: /* opt_persistent_stat_clause: PERSISTENT_SYM FOR_SYM persistent_stat_spec */
+#line 8093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->lex->with_persistent_for_clause= TRUE;
+ }
+#line 37842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1222: /* persistent_stat_spec: ALL */
+#line 8100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37848 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1223: /* persistent_stat_spec: COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec */
+#line 8102 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37854 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1224: /* persistent_column_stat_spec: ALL */
+#line 8106 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1225: /* $@122: %empty */
+#line 8108 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ lex->column_list= new (thd->mem_root) List<LEX_STRING>;
+ if (unlikely(lex->column_list == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37871 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1226: /* persistent_column_stat_spec: '(' $@122 table_column_list ')' */
+#line 8116 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 37877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1227: /* persistent_index_stat_spec: ALL */
+#line 8120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1228: /* $@123: %empty */
+#line 8122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ lex->index_list= new (thd->mem_root) List<LEX_STRING>;
+ if (unlikely(lex->index_list == NULL))
+ MYSQL_YYABORT;
+ }
+#line 37894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1229: /* persistent_index_stat_spec: '(' $@123 table_index_list ')' */
+#line 8130 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 37900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1230: /* table_column_list: %empty */
+#line 8135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1231: /* table_column_list: ident */
+#line 8137 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->column_list->push_back((LEX_STRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
+ }
+#line 37915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1232: /* table_column_list: table_column_list ',' ident */
+#line 8142 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->column_list->push_back((LEX_STRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
+ }
+#line 37924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1233: /* table_index_list: %empty */
+#line 8150 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 37930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1236: /* table_index_name: ident */
+#line 8157 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->index_list->push_back((LEX_STRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)),
+ thd->mem_root);
+ }
+#line 37940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1237: /* table_index_name: PRIMARY_SYM */
+#line 8164 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_STRING str= {(char*) "PRIMARY", 7};
+ Lex->index_list->push_back((LEX_STRING*)
+ thd->memdup(&str, sizeof(LEX_STRING)),
+ thd->mem_root);
+ }
+#line 37951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1238: /* binlog_base64_event: BINLOG_SYM TEXT_STRING_sys */
+#line 8174 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
+ Lex->comment= (yyvsp[0].lex_str);
+ Lex->ident.str= NULL;
+ Lex->ident.length= 0;
+ }
+#line 37962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1239: /* binlog_base64_event: BINLOG_SYM '@' ident_or_text ',' '@' ident_or_text */
+#line 8182 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
+ Lex->comment= (yyvsp[-3].lex_str);
+ Lex->ident= (yyvsp[0].lex_str);
+ }
+#line 37972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1241: /* $@124: %empty */
+#line 8192 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->table_type= TABLE_TYPE_VIEW; }
+#line 37978 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1243: /* $@125: %empty */
+#line 8197 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+
+ lex->sql_command = SQLCOM_CHECK;
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 37992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1244: /* check: CHECK_SYM $@125 check_view_or_table */
+#line 8207 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "CHECK"));
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_check_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1245: /* opt_mi_check_type: %empty */
+#line 8219 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags = T_MEDIUM; }
+#line 38012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1246: /* opt_mi_check_type: mi_check_types */
+#line 8220 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1247: /* mi_check_types: mi_check_type */
+#line 8224 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1248: /* mi_check_types: mi_check_type mi_check_types */
+#line 8225 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 38030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1249: /* mi_check_type: QUICK */
+#line 8229 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_QUICK; }
+#line 38036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1250: /* mi_check_type: FAST_SYM */
+#line 8230 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_FAST; }
+#line 38042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1251: /* mi_check_type: MEDIUM_SYM */
+#line 8231 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_MEDIUM; }
+#line 38048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1252: /* mi_check_type: EXTENDED_SYM */
+#line 8232 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_EXTEND; }
+#line 38054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1253: /* mi_check_type: CHANGED */
+#line 8233 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
+#line 38060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1254: /* mi_check_type: FOR_SYM UPGRADE_SYM */
+#line 8234 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
+#line 38066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1255: /* opt_view_check_type: %empty */
+#line 8238 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 38072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1256: /* opt_view_check_type: FOR_SYM UPGRADE_SYM */
+#line 8239 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
+#line 38078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1257: /* $@126: %empty */
+#line 8244 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_OPTIMIZE;
+ lex->no_write_to_binlog= (yyvsp[-1].num);
+ lex->check_opt.init();
+ lex->alter_info.reset();
+ /* Will be overridden during execution. */
+ YYPS->m_lock_type= TL_UNLOCK;
+ }
+#line 38092 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1258: /* optimize: OPTIMIZE opt_no_write_to_binlog table_or_tables $@126 table_list opt_lock_wait_timeout */
+#line 8254 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_optimize_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 38104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1259: /* opt_no_write_to_binlog: %empty */
+#line 8264 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 38110 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1260: /* opt_no_write_to_binlog: NO_WRITE_TO_BINLOG */
+#line 8265 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 38116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1261: /* opt_no_write_to_binlog: LOCAL_SYM */
+#line 8266 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 38122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1262: /* $@127: %empty */
+#line 8271 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_RENAME_TABLE;
+ Lex->create_info.set((yyvsp[0].object_ddl_options));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 38133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1263: /* rename: RENAME table_or_tables opt_if_exists $@127 table_to_table_list */
+#line 8278 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 38141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1264: /* rename: RENAME USER_SYM clear_privileges rename_list */
+#line 8282 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_RENAME_USER;
+ }
+#line 38149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1265: /* rename_list: user TO_SYM user */
+#line 8289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) ||
+ Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 38159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1266: /* rename_list: rename_list ',' user TO_SYM user */
+#line 8295 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[-2].lex_user), thd->mem_root) ||
+ Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 38169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1269: /* table_to_table: table_ident opt_lock_wait_timeout TO_SYM table_ident */
+#line 8309 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ SELECT_LEX *sl= lex->current_select;
+ if (unlikely(!sl->add_table_to_list(thd, (yyvsp[-3].table),NULL,
+ TL_OPTION_UPDATING,
+ TL_IGNORE, MDL_EXCLUSIVE)) ||
+ unlikely(!sl->add_table_to_list(thd, (yyvsp[0].table), NULL,
+ TL_OPTION_UPDATING,
+ TL_IGNORE, MDL_EXCLUSIVE)))
+ MYSQL_YYABORT;
+ }
+#line 38185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1270: /* $@128: %empty */
+#line 8324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.reset();
+ }
+#line 38193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1271: /* keycache: CACHE_SYM INDEX_SYM $@128 keycache_list_or_parts IN_SYM key_cache_name */
+#line 8328 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
+ lex->ident= (yyvsp[0].lex_str);
+ }
+#line 38203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1276: /* assign_to_keycache: table_ident cache_keys_spec */
+#line 8347 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 38215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1277: /* assign_to_keycache_parts: table_ident adm_partition cache_keys_spec */
+#line 8358 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 38227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1278: /* key_cache_name: ident */
+#line 8368 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 38233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1279: /* key_cache_name: DEFAULT */
+#line 8369 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str) = default_key_cache_base; }
+#line 38239 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1280: /* $@129: %empty */
+#line 8374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_PRELOAD_KEYS;
+ lex->alter_info.reset();
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 38251 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1281: /* preload: LOAD INDEX_SYM INTO CACHE_SYM $@129 preload_list_or_parts */
+#line 8382 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 38259 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1286: /* preload_keys: table_ident cache_keys_spec opt_ignore_leaves */
+#line 8399 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 38271 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1287: /* preload_keys_parts: table_ident adm_partition cache_keys_spec opt_ignore_leaves */
+#line 8410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ,
+ MDL_SHARED_READ,
+ Select->
+ pop_index_hints())))
+ MYSQL_YYABORT;
+ }
+#line 38283 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1288: /* $@130: %empty */
+#line 8421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
+ }
+#line 38291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1290: /* $@131: %empty */
+#line 8428 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->first_select_lex()->alloc_index_hints(thd);
+ Select->set_index_hint_type(INDEX_HINT_USE,
+ INDEX_HINT_MASK_ALL);
+ }
+#line 38301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1292: /* cache_key_list_or_empty: %empty */
+#line 8437 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 38307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1294: /* opt_ignore_leaves: %empty */
+#line 8443 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 38313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1295: /* opt_ignore_leaves: IGNORE_SYM LEAVES */
+#line 8444 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
+#line 38319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1296: /* $@132: %empty */
+#line 8454 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex_unit)->fake_select_lex ?
+ (yyvsp[0].select_lex_unit)->fake_select_lex :
+ (yyvsp[0].select_lex_unit)->first_select()))
+ MYSQL_YYABORT;
+ }
+#line 38330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1297: /* select: query_expression_no_with_clause $@132 opt_procedure_or_into */
+#line 8461 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select();
+ (yyvsp[-2].select_lex_unit)->set_with_clause(NULL);
+ if (Lex->select_finalize((yyvsp[-2].select_lex_unit), (yyvsp[0].select_lock)))
+ MYSQL_YYABORT;
+ }
+#line 38341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1298: /* $@133: %empty */
+#line 8468 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex_unit)->fake_select_lex ?
+ (yyvsp[0].select_lex_unit)->fake_select_lex :
+ (yyvsp[0].select_lex_unit)->first_select()))
+ MYSQL_YYABORT;
+ }
+#line 38352 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1299: /* select: with_clause query_expression_no_with_clause $@133 opt_procedure_or_into */
+#line 8475 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select();
+ (yyvsp[-2].select_lex_unit)->set_with_clause((yyvsp[-3].with_clause));
+ (yyvsp[-3].with_clause)->attach_to((yyvsp[-2].select_lex_unit)->first_select());
+ if (Lex->select_finalize((yyvsp[-2].select_lex_unit), (yyvsp[0].select_lock)))
+ MYSQL_YYABORT;
+ }
+#line 38364 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1300: /* $@134: %empty */
+#line 8486 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex)))
+ MYSQL_YYABORT;
+ }
+#line 38373 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1301: /* select_into: select_into_query_specification $@134 opt_order_limit_lock */
+#line 8491 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit((yyvsp[-2].select_lex))))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].order_limit_lock))
+ unit= Lex->add_tail_to_query_expression_body(unit, (yyvsp[0].order_limit_lock));
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
+ }
+#line 38387 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1302: /* $@135: %empty */
+#line 8502 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->push_select((yyvsp[0].select_lex)))
+ MYSQL_YYABORT;
+ }
+#line 38396 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1303: /* select_into: with_clause select_into_query_specification $@135 opt_order_limit_lock */
+#line 8507 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX_UNIT *unit;
+ if (!(unit = Lex->create_unit((yyvsp[-2].select_lex))))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].order_limit_lock))
+ unit= Lex->add_tail_to_query_expression_body(unit, (yyvsp[0].order_limit_lock));
+ unit->set_with_clause((yyvsp[-3].with_clause));
+ (yyvsp[-3].with_clause)->attach_to((yyvsp[-2].select_lex));
+ if (Lex->select_finalize(unit))
+ MYSQL_YYABORT;
+ }
+#line 38412 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1304: /* simple_table: query_specification */
+#line 8521 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex); }
+#line 38418 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1305: /* simple_table: table_value_constructor */
+#line 8522 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex); }
+#line 38424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1306: /* $@136: %empty */
+#line 8527 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->parsed_TVC_start())
+ MYSQL_YYABORT;
+ }
+#line 38433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1307: /* table_value_constructor: VALUES $@136 values_list */
+#line 8532 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex)= Lex->parsed_TVC_end()))
+ MYSQL_YYABORT;
+ }
+#line 38442 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1308: /* $@137: %empty */
+#line 8540 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel;
+ LEX *lex= Lex;
+ if (!(sel= lex->alloc_select(TRUE)) || lex->push_select(sel))
+ MYSQL_YYABORT;
+ sel->init_select();
+ sel->braces= FALSE;
+ }
+#line 38455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1309: /* $@138: %empty */
+#line 8549 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= SELECT_LIST;
+ }
+#line 38463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1310: /* query_specification_start: SELECT_SYM $@137 select_options $@138 select_item_list */
+#line 8553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ }
+#line 38471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1311: /* query_specification: query_specification_start opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
+#line 8565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lex)= Lex->pop_select();
+ }
+#line 38479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1312: /* select_into_query_specification: query_specification_start into opt_from_clause opt_where_clause opt_group_clause opt_having_clause opt_window_clause */
+#line 8578 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lex)= Lex->pop_select();
+ }
+#line 38487 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1313: /* query_expression: query_expression_no_with_clause */
+#line 8636 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].select_lex_unit)->set_with_clause(NULL);
+ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit);
+ }
+#line 38496 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1314: /* query_expression: with_clause query_expression_no_with_clause */
+#line 8642 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].select_lex_unit)->set_with_clause((yyvsp[-1].with_clause));
+ (yyvsp[-1].with_clause)->attach_to((yyvsp[0].select_lex_unit)->first_select());
+ (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit);
+ }
+#line 38506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1315: /* query_expression_no_with_clause: query_expression_body_ext */
+#line 8655 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
+#line 38512 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1316: /* query_expression_no_with_clause: query_expression_body_ext_parens */
+#line 8656 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex_unit)= (yyvsp[0].select_lex_unit); }
+#line 38518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1317: /* $@139: %empty */
+#line 8671 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].select_lex_unit)->first_select()->next_select())
+ {
+ if (Lex->parsed_multi_operand_query_expression_body((yyvsp[0].select_lex_unit)))
+ MYSQL_YYABORT;
+ }
+ }
+#line 38530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1318: /* query_expression_body_ext: query_expression_body $@139 opt_query_expression_tail */
+#line 8679 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].order_limit_lock))
+ (yyval.select_lex_unit)= (yyvsp[-2].select_lex_unit);
+ else
+ (yyval.select_lex_unit)= Lex->add_tail_to_query_expression_body((yyvsp[-2].select_lex_unit), (yyvsp[0].order_limit_lock));
+ }
+#line 38541 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1319: /* $@140: %empty */
+#line 8686 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->push_select(!(yyvsp[0].select_lex_unit)->first_select()->next_select() ?
+ (yyvsp[0].select_lex_unit)->first_select() : (yyvsp[0].select_lex_unit)->fake_select_lex);
+ }
+#line 38550 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1320: /* query_expression_body_ext: query_expression_body_ext_parens $@140 query_expression_tail */
+#line 8691 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex_unit)= Lex->add_tail_to_query_expression_body_ext_parens((yyvsp[-2].select_lex_unit), (yyvsp[0].order_limit_lock))))
+ MYSQL_YYABORT;
+ }
+#line 38559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1321: /* query_expression_body_ext_parens: '(' query_expression_body_ext_parens ')' */
+#line 8699 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit); }
+#line 38565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1322: /* query_expression_body_ext_parens: '(' query_expression_body_ext ')' */
+#line 8701 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= (yyvsp[-1].select_lex_unit)->first_select()->next_select() ?
+ (yyvsp[-1].select_lex_unit)->fake_select_lex : (yyvsp[-1].select_lex_unit)->first_select();
+ sel->braces= true;
+ (yyval.select_lex_unit)= (yyvsp[-1].select_lex_unit);
+ }
+#line 38576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1323: /* query_expression_body: query_simple */
+#line 8716 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->push_select((yyvsp[0].select_lex));
+ if (!((yyval.select_lex_unit)= Lex->create_unit((yyvsp[0].select_lex))))
+ MYSQL_YYABORT;
+ }
+#line 38586 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1324: /* $@141: %empty */
+#line 8723 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[-1].select_lex_unit)->first_select()->next_select())
+ {
+ Lex->pop_select();
+ }
+ }
+#line 38597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1325: /* query_expression_body: query_expression_body unit_type_decl $@141 query_primary */
+#line 8730 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex_unit)= Lex->add_primary_to_query_expression_body((yyvsp[-3].select_lex_unit), (yyvsp[0].select_lex),
+ (yyvsp[-2].unit_operation).unit_type,
+ (yyvsp[-2].unit_operation).distinct)))
+ MYSQL_YYABORT;
+ }
+#line 38608 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1326: /* query_expression_body: query_expression_body_ext_parens unit_type_decl query_primary */
+#line 8739 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex_unit)= Lex->add_primary_to_query_expression_body_ext_parens(
+ (yyvsp[-2].select_lex_unit), (yyvsp[0].select_lex),
+ (yyvsp[-1].unit_operation).unit_type,
+ (yyvsp[-1].unit_operation).distinct)))
+ MYSQL_YYABORT;
+ }
+#line 38620 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1327: /* query_primary: query_simple */
+#line 8755 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex); }
+#line 38626 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1328: /* query_primary: query_expression_body_ext_parens */
+#line 8757 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex_unit)->first_select(); }
+#line 38632 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1329: /* query_simple: simple_table */
+#line 8766 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_lex)= (yyvsp[0].select_lex);}
+#line 38638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1330: /* subselect: query_expression */
+#line 8771 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
+ MYSQL_YYABORT;
+ }
+#line 38647 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1331: /* subquery: query_expression_body_ext_parens */
+#line 8812 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].select_lex_unit)->fake_select_lex)
+ (yyvsp[0].select_lex_unit)->first_select()->braces= false;
+ else
+ (yyvsp[0].select_lex_unit)->fake_select_lex->braces= false;
+ if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[0].select_lex_unit))))
+ MYSQL_YYABORT;
+ }
+#line 38660 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1332: /* subquery: '(' with_clause query_expression_no_with_clause ')' */
+#line 8821 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].select_lex_unit)->set_with_clause((yyvsp[-2].with_clause));
+ (yyvsp[-2].with_clause)->attach_to((yyvsp[-1].select_lex_unit)->first_select());
+ if (!((yyval.select_lex)= Lex->parsed_subselect((yyvsp[-1].select_lex_unit))))
+ MYSQL_YYABORT;
+ }
+#line 38671 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1336: /* table_reference_list: join_table_list */
+#line 8840 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->context.table_list=
+ Select->context.first_name_resolution_table=
+ Select->table_list.first;
+ }
+#line 38681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1339: /* select_options: select_option_list */
+#line 8855 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((Select->options & SELECT_DISTINCT) &&
+ (Select->options & SELECT_ALL)))
+ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT"));
+ }
+#line 38691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1340: /* opt_history_unit: %empty */
+#line 8864 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_range_unit)= VERS_TIMESTAMP;
+ }
+#line 38699 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1341: /* opt_history_unit: TRANSACTION_SYM */
+#line 8868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_range_unit)= VERS_TRX_ID;
+ }
+#line 38707 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1342: /* opt_history_unit: TIMESTAMP */
+#line 8872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_range_unit)= VERS_TIMESTAMP;
+ }
+#line 38715 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1343: /* history_point: TIMESTAMP TEXT_STRING */
+#line 8879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item;
+ if (!(item= type_handler_datetime.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true)))
+ MYSQL_YYABORT;
+ (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, item);
+ }
+#line 38728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1344: /* history_point: function_call_keyword_timestamp */
+#line 8888 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
+ }
+#line 38736 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1345: /* history_point: opt_history_unit bit_expr */
+#line 8892 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
+ }
+#line 38744 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1346: /* for_portion_of_time_clause: FOR_SYM PORTION_SYM OF_SYM remember_tok_start ident FROM bit_expr TO_SYM bit_expr */
+#line 8900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(0 == strcasecmp((yyvsp[-4].ident_sys).str, "SYSTEM_TIME")))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-5].simple_string));
+ MYSQL_YYABORT;
+ }
+ Lex->period_conditions.init(SYSTEM_TIME_FROM_TO,
+ Vers_history_point(VERS_TIMESTAMP, (yyvsp[-2].item)),
+ Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item)),
+ (yyvsp[-4].ident_sys));
+ }
+#line 38760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1347: /* opt_for_portion_of_time_clause: %empty */
+#line 8915 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= false;
+ }
+#line 38768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1348: /* opt_for_portion_of_time_clause: for_portion_of_time_clause */
+#line 8919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= true;
+ }
+#line 38776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1349: /* opt_for_system_time_clause: %empty */
+#line 8926 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= false;
+ }
+#line 38784 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1350: /* opt_for_system_time_clause: FOR_SYSTEM_TIME_SYM system_time_expr */
+#line 8930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= true;
+ }
+#line 38792 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1351: /* system_time_expr: AS OF_SYM history_point */
+#line 8937 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
+ }
+#line 38800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1352: /* system_time_expr: ALL */
+#line 8941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_ALL);
+ }
+#line 38808 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1353: /* system_time_expr: FROM history_point TO_SYM history_point */
+#line 8945 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_FROM_TO, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
+ }
+#line 38816 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1354: /* system_time_expr: BETWEEN_SYM history_point AND_SYM history_point */
+#line 8949 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_BETWEEN, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
+ }
+#line 38824 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1358: /* select_option: SQL_NO_CACHE_SYM */
+#line 8962 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_NO_QUERY_CACHE)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_NO_CACHE"));
+ Select->options|= OPTION_NO_QUERY_CACHE;
+ }
+#line 38837 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1359: /* select_option: SQL_CACHE_SYM */
+#line 8971 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Allow this flag once per query.
+ */
+ if (Select->options & OPTION_TO_QUERY_CACHE)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SQL_CACHE"));
+ Select->options|= OPTION_TO_QUERY_CACHE;
+ }
+#line 38850 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1360: /* select_lock_type: FOR_SYM UPDATE_SYM opt_lock_wait_timeout_new */
+#line 8984 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ (yyval.select_lock).defined_lock= TRUE;
+ (yyval.select_lock).update_lock= TRUE;
+ }
+#line 38860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1361: /* select_lock_type: LOCK_SYM IN_SYM SHARE_SYM MODE_SYM opt_lock_wait_timeout_new */
+#line 8990 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ (yyval.select_lock).defined_lock= TRUE;
+ (yyval.select_lock).update_lock= FALSE;
+ }
+#line 38870 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1362: /* opt_select_lock_type: %empty */
+#line 9000 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ }
+#line 38878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1363: /* opt_select_lock_type: select_lock_type */
+#line 9004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ }
+#line 38886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1364: /* opt_lock_wait_timeout_new: %empty */
+#line 9011 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ }
+#line 38894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1365: /* opt_lock_wait_timeout_new: WAIT_SYM ulong_num */
+#line 9015 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ (yyval.select_lock).defined_timeout= TRUE;
+ (yyval.select_lock).timeout= (yyvsp[0].ulong_num);
+ }
+#line 38904 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1366: /* opt_lock_wait_timeout_new: NOWAIT_SYM */
+#line 9021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ (yyval.select_lock).defined_timeout= TRUE;
+ (yyval.select_lock).timeout= 0;
+ }
+#line 38914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1367: /* opt_lock_wait_timeout_new: SKIP_SYM LOCKED_SYM */
+#line 9027 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ (yyval.select_lock).skip_locked= 1;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SKIP_LOCKED);
+ }
+#line 38924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1370: /* select_item_list: '*' */
+#line 9038 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ bool is_parsing_returning=
+ thd->lex->current_select->parsing_place ==
+ IN_RETURNING;
+ SELECT_LEX *correct_select= is_parsing_returning ?
+ thd->lex->returning() :
+ thd->lex->current_select;
+ Item *item= new (thd->mem_root)
+ Item_field(thd, &correct_select->context,
+ star_clex_str);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(add_item_to_list(thd, item)))
+ MYSQL_YYABORT;
+ correct_select->with_wild++;
+ }
+#line 38945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1371: /* select_item: remember_name select_sublist_qualified_asterisk remember_end */
+#line 9058 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
+ MYSQL_YYABORT;
+ }
+#line 38954 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1372: /* select_item: remember_name expr remember_end select_alias */
+#line 9063 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string));
+
+ if (unlikely(add_item_to_list(thd, (yyvsp[-2].item))))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].lex_str).str)
+ {
+ if (unlikely(Lex->sql_command == SQLCOM_CREATE_VIEW &&
+ check_column_name((yyvsp[0].lex_str).str)))
+ my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), (yyvsp[0].lex_str).str));
+ (yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
+ }
+ else if (!(yyvsp[-2].item)->name.str || (yyvsp[-2].item)->name.str == item_empty_name)
+ {
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
+ }
+ }
+#line 38977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1373: /* remember_tok_start: %empty */
+#line 9084 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.simple_string)= (char*) YYLIP->get_tok_start();
+ }
+#line 38985 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1374: /* remember_name: %empty */
+#line 9090 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
+ }
+#line 38993 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1375: /* remember_end: %empty */
+#line 9096 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
+ }
+#line 39001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1376: /* select_alias: %empty */
+#line 9102 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=null_clex_str;}
+#line 39007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1377: /* select_alias: AS ident */
+#line 9103 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys); }
+#line 39013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1378: /* select_alias: AS TEXT_STRING_sys */
+#line 9104 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str); }
+#line 39019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1379: /* select_alias: ident */
+#line 9105 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys); }
+#line 39025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1380: /* select_alias: TEXT_STRING_sys */
+#line 9106 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str); }
+#line 39031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1381: /* opt_default_time_precision: %empty */
+#line 9110 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= NOT_FIXED_DEC; }
+#line 39037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1382: /* opt_default_time_precision: '(' ')' */
+#line 9111 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= NOT_FIXED_DEC; }
+#line 39043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1383: /* opt_default_time_precision: '(' real_ulong_num ')' */
+#line 9112 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].ulong_num); }
+#line 39049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1384: /* opt_time_precision: %empty */
+#line 9116 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 39055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1385: /* opt_time_precision: '(' ')' */
+#line 9117 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 39061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1386: /* opt_time_precision: '(' real_ulong_num ')' */
+#line 9118 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].ulong_num); }
+#line 39067 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1387: /* optional_braces: %empty */
+#line 9122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 39073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1388: /* optional_braces: '(' ')' */
+#line 9123 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 39079 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1389: /* expr: expr or expr */
+#line 9129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Design notes:
+ Do not use a manually maintained stack like thd->lex->xxx_list,
+ but use the internal bison stack ($$, $1 and $3) instead.
+ Using the bison stack is:
+ - more robust to changes in the grammar,
+ - guaranteed to be in sync with the parser state,
+ - better for performances (no memory allocation).
+ */
+ Item_cond_or *item1;
+ Item_cond_or *item3;
+ if (is_cond_or((yyvsp[-2].item)))
+ {
+ item1= (Item_cond_or*) (yyvsp[-2].item);
+ if (is_cond_or((yyvsp[0].item)))
+ {
+ item3= (Item_cond_or*) (yyvsp[0].item);
+ /*
+ (X1 OR X2) OR (Y1 OR Y2) ==> OR (X1, X2, Y1, Y2)
+ */
+ item3->add_at_head(item1->argument_list());
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /*
+ (X1 OR X2) OR Y ==> OR (X1, X2, Y)
+ */
+ item1->add((yyvsp[0].item), thd->mem_root);
+ (yyval.item) = (yyvsp[-2].item);
+ }
+ }
+ else if (is_cond_or((yyvsp[0].item)))
+ {
+ item3= (Item_cond_or*) (yyvsp[0].item);
+ /*
+ X OR (Y1 OR Y2) ==> OR (X, Y1, Y2)
+ */
+ item3->add_at_head((yyvsp[-2].item), thd->mem_root);
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /* X OR Y */
+ (yyval.item)= new (thd->mem_root) Item_cond_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+ }
+#line 39134 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1390: /* expr: expr XOR expr */
+#line 9180 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* XOR is a proprietary extension */
+ (yyval.item)= new (thd->mem_root) Item_func_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1391: /* expr: expr and expr */
+#line 9187 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* See comments in rule expr: expr or expr */
+ Item_cond_and *item1;
+ Item_cond_and *item3;
+ if (is_cond_and((yyvsp[-2].item)))
+ {
+ item1= (Item_cond_and*) (yyvsp[-2].item);
+ if (is_cond_and((yyvsp[0].item)))
+ {
+ item3= (Item_cond_and*) (yyvsp[0].item);
+ /*
+ (X1 AND X2) AND (Y1 AND Y2) ==> AND (X1, X2, Y1, Y2)
+ */
+ item3->add_at_head(item1->argument_list());
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /*
+ (X1 AND X2) AND Y ==> AND (X1, X2, Y)
+ */
+ item1->add((yyvsp[0].item), thd->mem_root);
+ (yyval.item) = (yyvsp[-2].item);
+ }
+ }
+ else if (is_cond_and((yyvsp[0].item)))
+ {
+ item3= (Item_cond_and*) (yyvsp[0].item);
+ /*
+ X AND (Y1 AND Y2) ==> AND (X, Y1, Y2)
+ */
+ item3->add_at_head((yyvsp[-2].item), thd->mem_root);
+ (yyval.item) = (yyvsp[0].item);
+ }
+ else
+ {
+ /* X AND Y */
+ (yyval.item)= new (thd->mem_root) Item_cond_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+ }
+#line 39192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1392: /* expr: NOT_SYM expr */
+#line 9230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= negate_expression(thd, (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39202 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1394: /* boolean_test: boolean_test IS TRUE_SYM */
+#line 9240 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39212 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1395: /* boolean_test: boolean_test IS not TRUE_SYM */
+#line 9246 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1396: /* boolean_test: boolean_test IS FALSE_SYM */
+#line 9252 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39232 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1397: /* boolean_test: boolean_test IS not FALSE_SYM */
+#line 9258 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1398: /* boolean_test: boolean_test IS UNKNOWN_SYM */
+#line 9264 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39252 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1399: /* boolean_test: boolean_test IS not UNKNOWN_SYM */
+#line 9270 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39262 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1400: /* boolean_test: boolean_test IS NULL_SYM */
+#line 9276 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1401: /* boolean_test: boolean_test IS not NULL_SYM */
+#line 9282 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1402: /* boolean_test: boolean_test EQUAL_SYM predicate */
+#line 9288 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_equal(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39292 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1403: /* boolean_test: boolean_test comp_op predicate */
+#line 9294 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (*(yyvsp[-1].boolfunc2creator))(0)->create(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1404: /* boolean_test: boolean_test comp_op all_or_any '(' subselect ')' */
+#line 9300 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= all_any_subquery_creator(thd, (yyvsp[-5].item), (yyvsp[-4].boolfunc2creator), (yyvsp[-3].num), (yyvsp[-1].select_lex));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1406: /* predicate: predicate IN_SYM subquery */
+#line 9310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-2].item), (yyvsp[0].select_lex));
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 39322 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1407: /* predicate: predicate not IN_SYM subquery */
+#line 9316 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-3].item), (yyvsp[0].select_lex));
+ if (unlikely(!item))
+ MYSQL_YYABORT;
+ (yyval.item)= negate_expression(thd, item);
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 39335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1408: /* predicate: predicate IN_SYM '(' expr ')' */
+#line 9325 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-4].item), true, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39345 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1409: /* predicate: predicate IN_SYM '(' expr ',' expr_list ')' */
+#line 9331 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyvsp[-1].item_list)->push_front((yyvsp[-6].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_func_in(thd, *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39357 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1410: /* predicate: predicate not IN_SYM '(' expr ')' */
+#line 9339 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-5].item), false, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39367 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1411: /* predicate: predicate not IN_SYM '(' expr ',' expr_list ')' */
+#line 9345 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyvsp[-1].item_list)->push_front((yyvsp[-7].item), thd->mem_root);
+ Item_func_in *item= new (thd->mem_root) Item_func_in(thd, *(yyvsp[-1].item_list));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 39380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1412: /* predicate: predicate BETWEEN_SYM predicate AND_SYM predicate */
+#line 9354 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_between(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39390 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1413: /* predicate: predicate not BETWEEN_SYM predicate AND_SYM predicate */
+#line 9360 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_func_between *item;
+ item= new (thd->mem_root) Item_func_between(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 39402 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1414: /* predicate: predicate SOUNDS_SYM LIKE predicate */
+#line 9368 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item1= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[-3].item));
+ Item *item4= new (thd->mem_root) Item_func_soundex(thd, (yyvsp[0].item));
+ if (unlikely(item1 == NULL) || unlikely(item4 == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_func_eq(thd, item1, item4);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1415: /* predicate: predicate LIKE predicate */
+#line 9378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-2].item), (yyvsp[0].item), escape(thd), false);
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 39426 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1416: /* predicate: predicate LIKE predicate ESCAPE_SYM predicate */
+#line 9384 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->escape_used= true;
+ (yyval.item)= new (thd->mem_root) Item_func_like(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item), true);
+ if (unlikely(!(yyval.item)))
+ MYSQL_YYABORT;
+ }
+#line 39437 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1417: /* predicate: predicate not LIKE predicate */
+#line 9391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-3].item), (yyvsp[0].item), escape(thd), false);
+ if (unlikely(!item))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 39448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1418: /* predicate: predicate not LIKE predicate ESCAPE_SYM predicate */
+#line 9398 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->escape_used= true;
+ Item *item= new (thd->mem_root) Item_func_like(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[0].item), true);
+ if (unlikely(!item))
+ MYSQL_YYABORT;
+ (yyval.item)= item->neg_transformer(thd);
+ }
+#line 39460 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1419: /* predicate: predicate REGEXP predicate */
+#line 9406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1420: /* predicate: predicate not REGEXP predicate */
+#line 9412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-3].item), (yyvsp[0].item));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= negate_expression(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1422: /* bit_expr: bit_expr '|' bit_expr */
+#line 9425 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39493 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1423: /* bit_expr: bit_expr '&' bit_expr */
+#line 9431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1424: /* bit_expr: bit_expr SHIFT_LEFT bit_expr */
+#line 9437 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_shift_left(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1425: /* bit_expr: bit_expr SHIFT_RIGHT bit_expr */
+#line 9443 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_shift_right(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1426: /* bit_expr: bit_expr ORACLE_CONCAT_SYM bit_expr */
+#line 9449 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_concat_operator_oracle(thd,
+ (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1427: /* bit_expr: bit_expr '+' bit_expr */
+#line 9456 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_plus(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39544 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1428: /* bit_expr: bit_expr '-' bit_expr */
+#line 9462 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_minus(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1429: /* bit_expr: bit_expr '+' INTERVAL_SYM expr interval */
+#line 9468 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1430: /* bit_expr: bit_expr '-' INTERVAL_SYM expr interval */
+#line 9474 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-4].item), (yyvsp[-1].item), (yyvsp[0].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39574 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1431: /* bit_expr: INTERVAL_SYM expr interval '+' expr */
+#line 9481 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39584 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1432: /* bit_expr: '+' INTERVAL_SYM expr interval '+' expr */
+#line 9487 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1433: /* bit_expr: '-' INTERVAL_SYM expr interval '+' expr */
+#line 9493 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39604 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1434: /* bit_expr: bit_expr '*' bit_expr */
+#line 9499 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mul(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1435: /* bit_expr: bit_expr '/' bit_expr */
+#line 9505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1436: /* bit_expr: bit_expr '%' bit_expr */
+#line 9511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39634 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1437: /* bit_expr: bit_expr DIV_SYM bit_expr */
+#line 9517 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_int_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39644 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1438: /* bit_expr: bit_expr MOD_SYM bit_expr */
+#line 9523 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1439: /* bit_expr: bit_expr '^' bit_expr */
+#line 9529 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1449: /* comp_op: '=' */
+#line 9558 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_eq_creator; }
+#line 39670 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1450: /* comp_op: GE */
+#line 9559 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_ge_creator; }
+#line 39676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1451: /* comp_op: '>' */
+#line 9560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_gt_creator; }
+#line 39682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1452: /* comp_op: LE */
+#line 9561 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_le_creator; }
+#line 39688 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1453: /* comp_op: '<' */
+#line 9562 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_lt_creator; }
+#line 39694 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1454: /* comp_op: NE */
+#line 9563 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.boolfunc2creator) = &comp_ne_creator; }
+#line 39700 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1455: /* all_or_any: ALL */
+#line 9567 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 39706 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1456: /* all_or_any: ANY_SYM */
+#line 9568 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 39712 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1457: /* opt_dyncol_type: %empty */
+#line 9573 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
+ }
+#line 39720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1458: /* opt_dyncol_type: AS dyncol_type */
+#line 9576 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
+#line 39726 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1462: /* numeric_dyncol_type: INT_SYM */
+#line 9586 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
+#line 39732 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1463: /* numeric_dyncol_type: UNSIGNED INT_SYM */
+#line 9587 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_UINT); }
+#line 39738 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1464: /* numeric_dyncol_type: DOUBLE_SYM */
+#line 9588 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
+#line 39744 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1465: /* numeric_dyncol_type: REAL */
+#line 9589 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
+#line 39750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1466: /* numeric_dyncol_type: FLOAT_SYM */
+#line 9590 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
+#line 39756 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1467: /* numeric_dyncol_type: DECIMAL_SYM float_options */
+#line 9591 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
+#line 39762 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1468: /* temporal_dyncol_type: DATE_SYM */
+#line 9595 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
+#line 39768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1469: /* temporal_dyncol_type: TIME_SYM opt_field_scale */
+#line 9596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_TIME, (yyvsp[0].Lex_length_and_dec)); }
+#line 39774 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1470: /* temporal_dyncol_type: DATETIME opt_field_scale */
+#line 9597 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, (yyvsp[0].Lex_length_and_dec)); }
+#line 39780 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1471: /* string_dyncol_type: char opt_binary */
+#line 9602 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_dyncol_type).set(DYN_COL_STRING, (yyvsp[0].Lex_exact_charset_extended_collation_attrs), thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 39789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1472: /* string_dyncol_type: nchar */
+#line 9607 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_dyncol_type).set(DYN_COL_STRING, national_charset_info);
+ }
+#line 39797 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1473: /* dyncall_create_element: expr ',' expr opt_dyncol_type */
+#line 9614 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
+ alloc_root(thd->mem_root, sizeof(DYNCALL_CREATE_DEF));
+ if (unlikely((yyval.dyncol_def) == NULL))
+ MYSQL_YYABORT;
+ (yyval.dyncol_def)->key= (yyvsp[-3].item);
+ (yyval.dyncol_def)->value= (yyvsp[-1].item);
+ (yyval.dyncol_def)->type= (DYNAMIC_COLUMN_TYPE)(yyvsp[0].Lex_dyncol_type).dyncol_type();
+ (yyval.dyncol_def)->cs= (yyvsp[0].Lex_dyncol_type).charset_collation();
+ if ((yyvsp[0].Lex_dyncol_type).has_explicit_length())
+ (yyval.dyncol_def)->len= (yyvsp[0].Lex_dyncol_type).length();
+ else
+ (yyval.dyncol_def)->len= 0;
+ if ((yyvsp[0].Lex_dyncol_type).has_explicit_dec())
+ (yyval.dyncol_def)->frac= (yyvsp[0].Lex_dyncol_type).dec();
+ else
+ (yyval.dyncol_def)->len= 0;
+ }
+#line 39820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1474: /* dyncall_create_list: dyncall_create_element */
+#line 9636 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.dyncol_def_list)= new (thd->mem_root) List<DYNCALL_CREATE_DEF>;
+ if (unlikely((yyval.dyncol_def_list) == NULL))
+ MYSQL_YYABORT;
+ (yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
+ }
+#line 39831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1475: /* dyncall_create_list: dyncall_create_list ',' dyncall_create_element */
+#line 9643 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
+ (yyval.dyncol_def_list)= (yyvsp[-2].dyncol_def_list);
+ }
+#line 39840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1476: /* plsql_cursor_attr: ISOPEN_SYM */
+#line 9651 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
+#line 39846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1477: /* plsql_cursor_attr: FOUND_SYM */
+#line 9652 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
+#line 39852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1478: /* plsql_cursor_attr: NOTFOUND_SYM */
+#line 9653 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
+#line 39858 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1479: /* plsql_cursor_attr: ROWCOUNT_SYM */
+#line 9654 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
+#line 39864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1480: /* explicit_cursor_attr: ident PERCENT_ORACLE_SYM plsql_cursor_attr */
+#line 9659 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_plsql_cursor_attr(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].plsql_cursor_attr)))))
+ MYSQL_YYABORT;
+ }
+#line 39873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1483: /* trim_operands_regular: expr */
+#line 9672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
+#line 39879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1484: /* trim_operands_special: LEADING expr FROM expr */
+#line 9676 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 39885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1485: /* trim_operands_special: TRAILING expr FROM expr */
+#line 9677 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 39891 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1486: /* trim_operands_special: BOTH expr FROM expr */
+#line 9678 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 39897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1487: /* trim_operands_special: LEADING FROM expr */
+#line 9679 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item)); }
+#line 39903 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1488: /* trim_operands_special: TRAILING FROM expr */
+#line 9680 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item)); }
+#line 39909 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1489: /* trim_operands_special: BOTH FROM expr */
+#line 9681 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item)); }
+#line 39915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1490: /* trim_operands_special: expr FROM expr */
+#line 9682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item)); }
+#line 39921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1497: /* column_default_non_parenthesized_expr: param_marker */
+#line 9720 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item_param); }
+#line 39927 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1499: /* column_default_non_parenthesized_expr: sum_expr */
+#line 9723 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!Lex->select_stack_top || Lex->json_table)
+ {
+ my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
+#line 39939 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1500: /* column_default_non_parenthesized_expr: window_func_expr */
+#line 9731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!Lex->select_stack_top)
+ {
+ my_error(ER_WRONG_PLACEMENT_OF_WINDOW_FUNCTION, MYF(0));
+ MYSQL_YYABORT;
+ }
+ }
+#line 39951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1502: /* column_default_non_parenthesized_expr: ROW_SYM '(' expr ',' expr_list ')' */
+#line 9740 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1503: /* column_default_non_parenthesized_expr: EXISTS '(' subselect ')' */
+#line 9747 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_exists_subselect(thd, (yyvsp[-1].select_lex));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 39972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1504: /* column_default_non_parenthesized_expr: '{' ident expr '}' */
+#line 9753 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].item)->make_odbc_literal(thd, &(yyvsp[-2].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 39981 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1505: /* column_default_non_parenthesized_expr: MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' */
+#line 9758 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-5].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
+ Item_func_match *i1= new (thd->mem_root) Item_func_match(thd, *(yyvsp[-5].item_list),
+ (yyvsp[-1].num));
+ if (unlikely(i1 == NULL))
+ MYSQL_YYABORT;
+ Select->add_ftfunc_to_list(thd, i1);
+ (yyval.item)= i1;
+ }
+#line 39995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1506: /* column_default_non_parenthesized_expr: CAST_SYM '(' expr AS cast_type ')' */
+#line 9768 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
+ MYSQL_YYABORT;
+ }
+#line 40004 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1507: /* column_default_non_parenthesized_expr: CASE_SYM when_list_opt_else END */
+#line 9773 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= new(thd->mem_root) Item_func_case_searched(thd, *(yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 40013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1508: /* column_default_non_parenthesized_expr: CASE_SYM expr when_list_opt_else END */
+#line 9778 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
+ if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_case_simple(thd, *(yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 40023 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1509: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr ',' cast_type ')' */
+#line 9784 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item_or_error(thd, (yyvsp[-3].item)))))
+ MYSQL_YYABORT;
+ }
+#line 40032 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1510: /* column_default_non_parenthesized_expr: CONVERT_SYM '(' expr USING charset_name ')' */
+#line 9789 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_conv_charset(thd, (yyvsp[-3].item), (yyvsp[-1].charset));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1511: /* column_default_non_parenthesized_expr: DEFAULT '(' simple_ident ')' */
+#line 9795 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_splocal *il= (yyvsp[-1].item)->get_item_splocal();
+ if (unlikely(il))
+ my_yyabort_error((ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str));
+ (yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context(),
+ (yyvsp[-1].item), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->default_used= TRUE;
+ }
+#line 40057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1512: /* column_default_non_parenthesized_expr: VALUE_SYM '(' simple_ident_nospvar ')' */
+#line 9806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_insert_value(thd, Lex->current_context(),
+ (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40068 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1513: /* column_default_non_parenthesized_expr: NEXT_SYM VALUE_SYM FOR_SYM table_ident */
+#line 9813 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1514: /* column_default_non_parenthesized_expr: NEXTVAL_SYM '(' table_ident ')' */
+#line 9818 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1515: /* column_default_non_parenthesized_expr: PREVIOUS_SYM VALUE_SYM FOR_SYM table_ident */
+#line 9823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1516: /* column_default_non_parenthesized_expr: LASTVAL_SYM '(' table_ident ')' */
+#line 9828 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
+ MYSQL_YYABORT;
+ }
+#line 40104 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1517: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ')' */
+#line 9833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-3].table), (yyvsp[-1].longlong_number), 0, 1))))
+ MYSQL_YYABORT;
+ }
+#line 40113 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1518: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ')' */
+#line 9838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-5].table), (yyvsp[-3].longlong_number), 0, (yyvsp[-1].ulong_num)))))
+ MYSQL_YYABORT;
+ }
+#line 40122 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1519: /* column_default_non_parenthesized_expr: SETVAL_SYM '(' table_ident ',' longlong_num ',' bool ',' ulonglong_num ')' */
+#line 9843 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-7].table), (yyvsp[-5].longlong_number), (yyvsp[-1].ulonglong_number), (yyvsp[-3].ulong_num)))))
+ MYSQL_YYABORT;
+ }
+#line 40131 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1522: /* primary_expr: '(' parenthesized_expr ')' */
+#line 9852 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[-1].item); }
+#line 40137 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1523: /* primary_expr: subquery */
+#line 9854 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->create_item_query_expression(thd, (yyvsp[0].select_lex)->master_unit())))
+ MYSQL_YYABORT;
+ }
+#line 40146 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1525: /* string_factor_expr: string_factor_expr COLLATE_SYM collation_name */
+#line 9863 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= new (thd->mem_root)
+ Item_func_set_collation(thd, (yyvsp[-2].item), (yyvsp[0].Lex_extended_collation)))))
+ MYSQL_YYABORT;
+ }
+#line 40156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1527: /* simple_expr: BINARY simple_expr */
+#line 9873 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Type_cast_attributes at(&my_charset_bin);
+ if (unlikely(!((yyval.item)= type_handler_long_blob.create_typecast_item(thd, (yyvsp[0].item), at))))
+ MYSQL_YYABORT;
+ }
+#line 40166 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1528: /* simple_expr: '+' simple_expr */
+#line 9879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 40174 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1529: /* simple_expr: '-' simple_expr */
+#line 9883 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item)->neg(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1530: /* simple_expr: '~' simple_expr */
+#line 9889 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_bit_neg(thd, (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1531: /* simple_expr: not2 simple_expr */
+#line 9895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= negate_expression(thd, (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1533: /* mysql_concatenation_expr: mysql_concatenation_expr MYSQL_CONCAT_SYM simple_expr */
+#line 9905 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_concat(thd, (yyvsp[-2].item), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40214 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1534: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ')' */
+#line 9914 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_datetime_typecast(thd, (yyvsp[-1].item),
+ AUTO_SEC_PART_DIGITS);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1535: /* function_call_keyword_timestamp: TIMESTAMP '(' expr ',' expr ')' */
+#line 9921 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_timestamp(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1536: /* function_call_keyword: CHAR_SYM '(' expr_list ')' */
+#line 9935 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1537: /* function_call_keyword: CHAR_SYM '(' expr_list USING charset_name ')' */
+#line 9941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-3].item_list), (yyvsp[-1].charset));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1538: /* function_call_keyword: CURRENT_USER optional_braces */
+#line 9947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_current_user(thd,
+ Lex->current_context());
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query= 0;
+ }
+#line 40268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1539: /* function_call_keyword: CURRENT_ROLE optional_braces */
+#line 9956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_current_role(thd,
+ Lex->current_context());
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query= 0;
+ }
+#line 40281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1540: /* function_call_keyword: DATE_SYM '(' expr ')' */
+#line 9965 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40291 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1541: /* function_call_keyword: DAY_SYM '(' expr ')' */
+#line 9971 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1542: /* function_call_keyword: HOUR_SYM '(' expr ')' */
+#line 9977 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40311 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1543: /* function_call_keyword: INSERT '(' expr ',' expr ',' expr ',' expr ')' */
+#line 9983 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_insert(thd, (yyvsp[-7].item), (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40321 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1544: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ')' */
+#line 9989 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ List<Item> *list= new (thd->mem_root) List<Item>;
+ if (unlikely(list == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(list->push_front((yyvsp[-1].item), thd->mem_root)) ||
+ unlikely(list->push_front((yyvsp[-3].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ Item_row *item= new (thd->mem_root) Item_row(thd, *list);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_func_interval(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40340 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1545: /* function_call_keyword: INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' */
+#line 10004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
+ (yyvsp[-1].item_list)->push_front((yyvsp[-5].item), thd->mem_root);
+ Item_row *item= new (thd->mem_root) Item_row(thd, *(yyvsp[-1].item_list));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_func_interval(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1546: /* function_call_keyword: LEFT '(' expr ',' expr ')' */
+#line 10015 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_left(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1547: /* function_call_keyword: MINUTE_SYM '(' expr ')' */
+#line 10021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1548: /* function_call_keyword: MONTH_SYM '(' expr ')' */
+#line 10027 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40385 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1549: /* function_call_keyword: RIGHT '(' expr ',' expr ')' */
+#line 10033 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_right(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1550: /* function_call_keyword: SECOND_SYM '(' expr ')' */
+#line 10039 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40405 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1551: /* function_call_keyword: SQL_SYM PERCENT_ORACLE_SYM ROWCOUNT_SYM */
+#line 10045 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_oracle_sql_rowcount(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query= 0;
+ }
+#line 40417 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1552: /* function_call_keyword: TIME_SYM '(' expr ')' */
+#line 10053 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_time_typecast(thd, (yyvsp[-1].item),
+ AUTO_SEC_PART_DIGITS);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40428 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1553: /* function_call_keyword: function_call_keyword_timestamp */
+#line 10060 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 40436 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1554: /* function_call_keyword: TRIM '(' trim_operands ')' */
+#line 10064 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
+ make_item_func_trim(thd, (yyvsp[-1].trim)))))
+ MYSQL_YYABORT;
+ }
+#line 40446 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1555: /* function_call_keyword: USER_SYM '(' ')' */
+#line 10070 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_user(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->safe_to_cache_query=0;
+ }
+#line 40458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1556: /* function_call_keyword: YEAR_SYM '(' expr ')' */
+#line 10078 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1559: /* substring_operands_regular: expr ',' expr ',' expr */
+#line 10092 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 40476 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1560: /* substring_operands_regular: expr ',' expr */
+#line 10096 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 40484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1561: /* substring_operands_special: expr FROM expr FOR_SYM expr */
+#line 10103 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 40492 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1562: /* substring_operands_special: expr FROM expr */
+#line 10107 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.substring_spec)= Lex_substring_spec_st::init((yyvsp[-2].item), (yyvsp[0].item));
+ }
+#line 40500 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1563: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' expr ')' */
+#line 10127 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item),
+ INTERVAL_DAY, 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40511 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1564: /* function_call_nonkeyword: ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10134 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40521 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1565: /* function_call_nonkeyword: CURDATE optional_braces */
+#line 10140 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 40532 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1566: /* function_call_nonkeyword: CURTIME opt_time_precision */
+#line 10147 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curtime_local(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 40543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1567: /* function_call_nonkeyword: DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10154 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40553 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1568: /* function_call_nonkeyword: DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40563 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1569: /* function_call_nonkeyword: EXTRACT_SYM '(' interval FROM expr ')' */
+#line 10166 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_extract(thd, (yyvsp[-3].interval), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1570: /* function_call_nonkeyword: GET_FORMAT '(' date_time_type ',' expr ')' */
+#line 10172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_get_format(thd, (yyvsp[-3].date_time_type), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1571: /* function_call_nonkeyword: NOW_SYM opt_time_precision */
+#line 10178 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 40594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1572: /* function_call_nonkeyword: POSITION_SYM '(' bit_expr IN_SYM expr ')' */
+#line 10185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_locate(thd, (yyvsp[-1].item), (yyvsp[-3].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40604 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1573: /* function_call_nonkeyword: ROWNUM_SYM optional_braces */
+#line 10196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_rownum(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1574: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' expr ')' */
+#line 10202 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-3].item), (yyvsp[-1].item),
+ INTERVAL_DAY, 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40625 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1575: /* function_call_nonkeyword: SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' */
+#line 10209 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-5].item), (yyvsp[-2].item), (yyvsp[-1].interval), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40635 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1576: /* function_call_nonkeyword: SUBSTRING '(' substring_operands ')' */
+#line 10215 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
+ make_item_func_substr(thd, (yyvsp[-1].substring_spec)))))
+ MYSQL_YYABORT;
+ }
+#line 40645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1577: /* function_call_nonkeyword: SYSDATE */
+#line 10222 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
+ MYSQL_YYABORT;
+ }
+#line 40654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1578: /* function_call_nonkeyword: SYSDATE '(' ')' */
+#line 10228 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, 0))))
+ MYSQL_YYABORT;
+ }
+#line 40663 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1579: /* function_call_nonkeyword: SYSDATE '(' real_ulong_num ')' */
+#line 10233 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_sysdate(thd, (uint) (yyvsp[-1].ulong_num)))))
+ MYSQL_YYABORT;
+ }
+#line 40672 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1580: /* function_call_nonkeyword: TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' */
+#line 10238 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[-1].item), (yyvsp[-3].item), (yyvsp[-5].interval_time_st), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1581: /* function_call_nonkeyword: TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' */
+#line 10244 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_timestamp_diff(thd, (yyvsp[-3].item), (yyvsp[-1].item), (yyvsp[-5].interval_time_st));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1582: /* function_call_nonkeyword: TRIM_ORACLE '(' trim_operands ')' */
+#line 10250 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
+ MYSQL_YYABORT;
+ }
+#line 40701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1583: /* function_call_nonkeyword: UTC_DATE_SYM optional_braces */
+#line 10255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 40712 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1584: /* function_call_nonkeyword: UTC_TIME_SYM opt_time_precision */
+#line 10262 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_curtime_utc(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 40723 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1585: /* function_call_nonkeyword: UTC_TIMESTAMP_SYM opt_time_precision */
+#line 10269 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_now_utc(thd, (yyvsp[0].num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ Lex->safe_to_cache_query=0;
+ }
+#line 40734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1586: /* function_call_nonkeyword: COLUMN_ADD_SYM '(' expr ',' dyncall_create_list ')' */
+#line 10277 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_add(thd, (yyvsp[-3].item), *(yyvsp[-1].dyncol_def_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40744 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1587: /* function_call_nonkeyword: COLUMN_DELETE_SYM '(' expr ',' expr_list ')' */
+#line 10284 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_delete(thd, (yyvsp[-3].item), *(yyvsp[-1].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1588: /* function_call_nonkeyword: COLUMN_CREATE_SYM '(' dyncall_create_list ')' */
+#line 10291 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1589: /* function_call_nonkeyword: COLUMN_GET_SYM '(' expr ',' expr AS cast_type ')' */
+#line 10298 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].Lex_cast_type).type_handler(),
+ (yyvsp[-1].Lex_cast_type), (yyvsp[-1].Lex_cast_type).charset());
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1590: /* function_call_conflict: ASCII_SYM '(' expr ')' */
+#line 10313 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1591: /* function_call_conflict: CHARSET '(' expr ')' */
+#line 10319 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1592: /* function_call_conflict: IF_SYM '(' expr ',' expr ',' expr ')' */
+#line 10325 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_if(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1593: /* function_call_conflict: LAST_VALUE '(' expr ')' */
+#line 10334 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ List<Item> *list= new (thd->mem_root) List<Item>;
+ if (unlikely(list == NULL))
+ MYSQL_YYABORT;
+ list->push_back((yyvsp[-1].item), thd->mem_root);
+
+ (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *list);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1594: /* function_call_conflict: LAST_VALUE '(' expr_list ',' expr ')' */
+#line 10345 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-3].item_list)->push_back((yyvsp[-1].item), thd->mem_root);
+ (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-3].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1595: /* function_call_conflict: MOD_SYM '(' expr ',' expr ')' */
+#line 10352 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1596: /* function_call_conflict: PASSWORD_SYM '(' expr ')' */
+#line 10358 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item* i1;
+ i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item));
+ if (unlikely(i1 == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= i1;
+ }
+#line 40853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1597: /* function_call_conflict: REPEAT_SYM '(' expr ',' expr ')' */
+#line 10366 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_repeat(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40863 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1598: /* function_call_conflict: REPLACE '(' expr ',' expr ',' expr ')' */
+#line 10372 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Schema::find_implied(thd)->
+ make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
+ MYSQL_YYABORT;
+ }
+#line 40873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1599: /* function_call_conflict: TRUNCATE_SYM '(' expr ',' expr ')' */
+#line 10378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_round(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1600: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr opt_ws_levels ')' */
+#line 10384 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-2].item), 0, 0, (yyvsp[-1].ulong_num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1601: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS CHAR_SYM ws_nweights opt_ws_levels ')' */
+#line 10390 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root)
+ Item_func_weight_string(thd, (yyvsp[-5].item), 0, (yyvsp[-2].ulong_num),
+ (yyvsp[-1].ulong_num) | MY_STRXFRM_PAD_WITH_SPACE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40905 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1602: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr AS BINARY ws_nweights ')' */
+#line 10398 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_char_typecast(thd, (yyvsp[-4].item), (yyvsp[-1].ulong_num),
+ &my_charset_bin);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root)
+ Item_func_weight_string(thd, item, 0, (yyvsp[-1].ulong_num),
+ MY_STRXFRM_PAD_WITH_SPACE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40921 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1603: /* function_call_conflict: WEIGHT_STRING_SYM '(' expr ',' ulong_num ',' ulong_num ',' ulong_num ')' */
+#line 10410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_func_weight_string(thd, (yyvsp[-7].item), (yyvsp[-5].ulong_num), (yyvsp[-3].ulong_num),
+ (yyvsp[-1].ulong_num));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 40932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1604: /* @142: %empty */
+#line 10429 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+#ifdef HAVE_DLOPEN
+ udf_func *udf= 0;
+ LEX *lex= Lex;
+ if (using_udf_functions &&
+ (udf= find_udf((yyvsp[-1].ident_sys).str, (yyvsp[-1].ident_sys).length)) &&
+ udf->type == UDFTYPE_AGGREGATE)
+ {
+ if (unlikely(lex->current_select->inc_in_sum_expr()))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+ /* Temporary placing the result of find_udf in $3 */
+ (yyval.udf)= udf;
+#endif
+ }
+#line 40955 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1605: /* function_call_generic: ident_func '(' @142 opt_udf_expr_list ')' */
+#line 10448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ const Type_handler *h;
+ Create_func *builder;
+ Item *item= NULL;
+
+ if (unlikely(check_routine_name(&(yyvsp[-4].ident_sys))))
+ MYSQL_YYABORT;
+
+ /*
+ Implementation note:
+ names are resolved with the following order:
+ - MySQL native functions,
+ - User Defined Functions,
+ - Constructors, like POINT(1,1)
+ - Stored Functions (assuming the current <use> database)
+
+ This will be revised with WL#2128 (SQL PATH)
+ */
+ builder= Schema::find_implied(thd)->
+ find_native_function_builder(thd, (yyvsp[-4].ident_sys));
+ if (builder)
+ {
+ item= builder->create_func(thd, &(yyvsp[-4].ident_sys), (yyvsp[-1].item_list));
+ }
+ else if ((h= Type_handler::handler_by_name(thd, (yyvsp[-4].ident_sys))) &&
+ (item= h->make_constructor_item(thd, (yyvsp[-1].item_list))))
+ {
+ // Found a constructor with a proper argument count
+ }
+ else
+ {
+#ifdef HAVE_DLOPEN
+ /* Retrieving the result of find_udf */
+ udf_func *udf= (yyvsp[-2].udf);
+
+ if (udf)
+ {
+ if (udf->type == UDFTYPE_AGGREGATE)
+ {
+ Select->in_sum_expr--;
+ }
+
+ item= Create_udf_func::s_singleton.create(thd, udf, (yyvsp[-1].item_list));
+ }
+ else
+#endif
+ {
+ builder= find_qualified_function_builder(thd);
+ DBUG_ASSERT(builder);
+ item= builder->create_func(thd, &(yyvsp[-4].ident_sys), (yyvsp[-1].item_list));
+ }
+ }
+
+ if (unlikely(! ((yyval.item)= item)))
+ MYSQL_YYABORT;
+ }
+#line 41016 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1606: /* function_call_generic: CONTAINS_SYM '(' opt_expr_list ')' */
+#line 10505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
+ (yyvsp[-3].kwd), (yyvsp[-1].item_list))))
+ MYSQL_YYABORT;
+ }
+#line 41026 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1607: /* function_call_generic: OVERLAPS_SYM '(' opt_expr_list ')' */
+#line 10511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
+ (yyvsp[-3].kwd), (yyvsp[-1].item_list))))
+ MYSQL_YYABORT;
+ }
+#line 41036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1608: /* function_call_generic: WITHIN '(' opt_expr_list ')' */
+#line 10517 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.item)= Lex->make_item_func_call_native_or_parse_error(thd,
+ (yyvsp[-3].kwd), (yyvsp[-1].item_list))))
+ MYSQL_YYABORT;
+ }
+#line 41046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1609: /* function_call_generic: ident_cli '.' ident_cli '(' opt_expr_list ')' */
+#line 10523 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1610: /* function_call_generic: ident_cli '.' ident_cli '.' ident_cli '(' opt_expr_list ')' */
+#line 10528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-7].ident_cli), &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41064 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1611: /* function_call_generic: ident_cli '.' REPLACE '(' opt_expr_list ')' */
+#line 10533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_replace(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41073 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1612: /* function_call_generic: ident_cli '.' SUBSTRING '(' opt_expr_list ')' */
+#line 10538 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41082 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1613: /* function_call_generic: ident_cli '.' SUBSTRING '(' substring_operands_special ')' */
+#line 10543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].substring_spec)))))
+ MYSQL_YYABORT;
+ }
+#line 41091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1614: /* function_call_generic: ident_cli '.' TRIM '(' opt_expr_list ')' */
+#line 10548 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_trim(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].item_list)))))
+ MYSQL_YYABORT;
+ }
+#line 41100 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1615: /* function_call_generic: ident_cli '.' TRIM '(' trim_operands_special ')' */
+#line 10553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_func_trim(thd, (yyvsp[-5].ident_cli), (yyvsp[-3].kwd), (yyvsp[-1].trim)))))
+ MYSQL_YYABORT;
+ }
+#line 41109 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1616: /* fulltext_options: opt_natural_language_mode opt_query_expansion */
+#line 10573 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); }
+#line 41115 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1617: /* fulltext_options: IN_SYM BOOLEAN_SYM MODE_SYM */
+#line 10575 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_BOOL; }
+#line 41121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1618: /* opt_natural_language_mode: %empty */
+#line 10579 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_NL; }
+#line 41127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1619: /* opt_natural_language_mode: IN_SYM NATURAL LANGUAGE_SYM MODE_SYM */
+#line 10580 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_NL; }
+#line 41133 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1620: /* opt_query_expansion: %empty */
+#line 10584 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 41139 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1621: /* opt_query_expansion: WITH QUERY_SYM EXPANSION_SYM */
+#line 10585 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= FT_EXPAND; }
+#line 41145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1622: /* opt_udf_expr_list: %empty */
+#line 10589 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= NULL; }
+#line 41151 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1623: /* opt_udf_expr_list: udf_expr_list */
+#line 10590 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[0].item_list); }
+#line 41157 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1624: /* udf_expr_list: udf_expr */
+#line 10595 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= new (thd->mem_root) List<Item>;
+ if (unlikely((yyval.item_list) == NULL))
+ MYSQL_YYABORT;
+ (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ }
+#line 41168 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1625: /* udf_expr_list: udf_expr_list ',' udf_expr */
+#line 10602 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 41177 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1626: /* udf_expr: remember_name expr remember_end select_alias */
+#line 10610 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Use Item::name as a storage for the attribute value of user
+ defined function argument. It is safe to use Item::name
+ because the syntax will not allow having an explicit name here.
+ See WL#1017 re. udf attributes.
+ */
+ if ((yyvsp[0].lex_str).str)
+ {
+ (yyvsp[-2].item)->base_flags|= item_base_t::IS_EXPLICIT_NAME;
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[0].lex_str));
+ }
+ /*
+ A field has to have its proper name in order for name
+ resolution to work, something we are only guaranteed if we
+ parse it out. If we hijack the input stream with
+ remember_name we may get quoted or escaped names.
+ */
+ else if ((yyvsp[-2].item)->type() != Item::FIELD_ITEM &&
+ (yyvsp[-2].item)->type() != Item::REF_ITEM /* For HAVING */ )
+ (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
+ (yyval.item)= (yyvsp[-2].item);
+ }
+#line 41205 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1627: /* sum_expr: AVG_SYM '(' in_sum_expr ')' */
+#line 10637 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), FALSE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1628: /* sum_expr: AVG_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10643 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), TRUE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1629: /* sum_expr: BIT_AND '(' in_sum_expr ')' */
+#line 10649 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1630: /* sum_expr: BIT_OR '(' in_sum_expr ')' */
+#line 10655 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1631: /* sum_expr: BIT_XOR '(' in_sum_expr ')' */
+#line 10661 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1632: /* sum_expr: COUNT_SYM '(' opt_all '*' ')' */
+#line 10667 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1);
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_sum_count(thd, item);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41268 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1633: /* sum_expr: COUNT_SYM '(' in_sum_expr ')' */
+#line 10676 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1634: /* $@143: %empty */
+#line 10682 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 41284 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1635: /* $@144: %empty */
+#line 10684 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr--; }
+#line 41290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1636: /* sum_expr: COUNT_SYM '(' DISTINCT $@143 expr_list $@144 ')' */
+#line 10686 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_count(thd, *(yyvsp[-2].item_list));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41300 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1637: /* sum_expr: MIN_SYM '(' in_sum_expr ')' */
+#line 10692 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1638: /* sum_expr: MIN_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10703 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1639: /* sum_expr: MAX_SYM '(' in_sum_expr ')' */
+#line 10709 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1640: /* sum_expr: MAX_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10715 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41340 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1641: /* sum_expr: STD_SYM '(' in_sum_expr ')' */
+#line 10721 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1642: /* sum_expr: VARIANCE_SYM '(' in_sum_expr ')' */
+#line 10727 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41360 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1643: /* sum_expr: STDDEV_SAMP_SYM '(' in_sum_expr ')' */
+#line 10733 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1644: /* sum_expr: VAR_SAMP_SYM '(' in_sum_expr ')' */
+#line 10739 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1645: /* sum_expr: SUM_SYM '(' in_sum_expr ')' */
+#line 10745 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), FALSE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41390 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1646: /* sum_expr: SUM_SYM '(' DISTINCT in_sum_expr ')' */
+#line 10751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), TRUE);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1647: /* $@145: %empty */
+#line 10757 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 41406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1648: /* sum_expr: GROUP_CONCAT_SYM '(' opt_distinct $@145 expr_list opt_gorder_clause opt_gconcat_separator opt_glimit_clause ')' */
+#line 10761 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->in_sum_expr--;
+ (yyval.item)= new (thd->mem_root)
+ Item_func_group_concat(thd, Lex->current_context(),
+ (yyvsp[-6].num), (yyvsp[-4].item_list),
+ sel->gorder_list, (yyvsp[-2].string), (yyvsp[-1].num),
+ sel->limit_params.select_limit,
+ sel->limit_params.offset_limit);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ sel->limit_params.clear();
+ (yyvsp[-4].item_list)->empty();
+ sel->gorder_list.empty();
+ }
+#line 41426 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1649: /* $@146: %empty */
+#line 10777 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 41432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1650: /* sum_expr: JSON_ARRAYAGG_SYM '(' opt_distinct $@146 expr_list opt_gorder_clause opt_glimit_clause ')' */
+#line 10780 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ List<Item> *args= (yyvsp[-3].item_list);
+ sel->in_sum_expr--;
+ if (args && args->elements > 1)
+ {
+ /* JSON_ARRAYAGG supports only one parameter */
+ my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), "JSON_ARRAYAGG");
+ MYSQL_YYABORT;
+ }
+ String* s= new (thd->mem_root) String(",", 1, &my_charset_latin1);
+ if (unlikely(s == NULL))
+ MYSQL_YYABORT;
+
+ (yyval.item)= new (thd->mem_root)
+ Item_func_json_arrayagg(thd, Lex->current_context(),
+ (yyvsp[-5].num), args,
+ sel->gorder_list, s, (yyvsp[-1].num),
+ sel->limit_params.select_limit,
+ sel->limit_params.offset_limit);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ sel->limit_params.clear();
+ (yyvsp[-3].item_list)->empty();
+ sel->gorder_list.empty();
+ }
+#line 41463 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1651: /* $@147: %empty */
+#line 10807 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->in_sum_expr++; }
+#line 41469 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1652: /* sum_expr: JSON_OBJECTAGG_SYM '(' $@147 expr ',' expr ')' */
+#line 10809 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->in_sum_expr--;
+
+ (yyval.item)= new (thd->mem_root) Item_func_json_objectagg(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41482 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1653: /* window_func_expr: window_func OVER_SYM window_name */
+#line 10821 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item), (yyvsp[0].lex_str_ptr));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
+ MYSQL_YYABORT;
+ }
+#line 41494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1654: /* window_func_expr: window_func OVER_SYM window_spec */
+#line 10830 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(Select->add_window_spec(thd, lex->win_ref,
+ Select->group_list,
+ Select->order_list,
+ lex->win_frame)))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item),
+ thd->lex->win_spec);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
+ MYSQL_YYABORT;
+ }
+#line 41513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1657: /* window_func: function_call_generic */
+#line 10852 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item* item = (Item*)(yyvsp[0].item);
+ /* 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;
+ }
+ }
+#line 41529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1658: /* simple_window_func: ROW_NUMBER_SYM '(' ')' */
+#line 10867 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_row_number(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41539 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1659: /* simple_window_func: RANK_SYM '(' ')' */
+#line 10874 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_rank(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1660: /* simple_window_func: DENSE_RANK_SYM '(' ')' */
+#line 10881 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_dense_rank(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1661: /* simple_window_func: PERCENT_RANK_SYM '(' ')' */
+#line 10888 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_percent_rank(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41569 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1662: /* simple_window_func: CUME_DIST_SYM '(' ')' */
+#line 10895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_cume_dist(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41579 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1663: /* simple_window_func: NTILE_SYM '(' expr ')' */
+#line 10902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_ntile(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1664: /* simple_window_func: FIRST_VALUE_SYM '(' expr ')' */
+#line 10909 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_first_value(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41599 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1665: /* simple_window_func: LAST_VALUE '(' expr ')' */
+#line 10916 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_last_value(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1666: /* simple_window_func: NTH_VALUE_SYM '(' expr ',' expr ')' */
+#line 10923 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_nth_value(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41619 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1667: /* simple_window_func: LEAD_SYM '(' expr ')' */
+#line 10930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* No second argument defaults to 1. */
+ Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
+ if (unlikely(item_offset == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-1].item), item_offset);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1668: /* simple_window_func: LEAD_SYM '(' expr ',' expr ')' */
+#line 10941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41643 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1669: /* simple_window_func: LAG_SYM '(' expr ')' */
+#line 10948 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* No second argument defaults to 1. */
+ Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
+ if (unlikely(item_offset == NULL))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-1].item), item_offset);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1670: /* simple_window_func: LAG_SYM '(' expr ',' expr ')' */
+#line 10959 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-3].item), (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41667 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1671: /* inverse_distribution_function: percentile_function OVER_SYM '(' opt_window_partition_clause ')' */
+#line 10971 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(Select->add_window_spec(thd, lex->win_ref,
+ Select->group_list,
+ Select->order_list,
+ NULL)))
+ MYSQL_YYABORT;
+ (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-4].item),
+ thd->lex->win_spec);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
+ MYSQL_YYABORT;
+ }
+#line 41686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1672: /* $@148: %empty */
+#line 10989 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->prepare_add_window_spec(thd); }
+#line 41692 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1673: /* percentile_function: inverse_distribution_function_def WITHIN GROUP_SYM '(' $@148 order_by_single_element_list ')' */
+#line 10991 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[-6].item);
+ }
+#line 41700 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1674: /* percentile_function: MEDIAN_SYM '(' expr ')' */
+#line 10995 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *args= new (thd->mem_root) Item_decimal(thd, "0.5", 3,
+ thd->charset());
+ if (unlikely(args == NULL) || unlikely(thd->is_error()))
+ MYSQL_YYABORT;
+ Select->prepare_add_window_spec(thd);
+ if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),FALSE)))
+ MYSQL_YYABORT;
+
+ (yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, args);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41718 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1675: /* inverse_distribution_function_def: PERCENTILE_CONT_SYM '(' expr ')' */
+#line 11012 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1676: /* inverse_distribution_function_def: PERCENTILE_DISC_SYM '(' expr ')' */
+#line 11018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_sum_percentile_disc(thd, (yyvsp[-1].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41738 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1677: /* order_by_single_element_list: ORDER_SYM BY order_ident order_dir */
+#line 11027 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 41747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1678: /* window_name: ident */
+#line 11036 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
+ if (unlikely((yyval.lex_str_ptr) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1679: /* $@149: %empty */
+#line 11045 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(! Lex->parsing_options.allows_variable))
+ my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0)));
+ }
+#line 41766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1680: /* variable: '@' $@149 variable_aux */
+#line 11050 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 41774 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1681: /* variable_aux: ident_or_text SET_VAR expr */
+#line 11057 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_func_set_user_var *item;
+ if (!(yyvsp[-2].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ (yyval.item)= item= new (thd->mem_root) Item_func_set_user_var(thd, &(yyvsp[-2].lex_str), (yyvsp[0].item));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ LEX *lex= Lex;
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ lex->set_var_list.push_back(item, thd->mem_root);
+ }
+#line 41793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1682: /* variable_aux: ident_or_text */
+#line 11072 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ LEX *lex= Lex;
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ }
+#line 41810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1683: /* variable_aux: '@' opt_var_ident_type ident_sysvar_name */
+#line 11085 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-1].var_type), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 41819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1684: /* variable_aux: '@' opt_var_ident_type ident_sysvar_name '.' ident */
+#line 11090 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 41828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1685: /* opt_distinct: %empty */
+#line 11097 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 41834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1686: /* opt_distinct: DISTINCT */
+#line 11098 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 41840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1687: /* opt_gconcat_separator: %empty */
+#line 11103 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1);
+ if (unlikely((yyval.string) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 41850 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1688: /* opt_gconcat_separator: SEPARATOR_SYM text_string */
+#line 11108 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.string) = (yyvsp[0].string); }
+#line 41856 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1691: /* gorder_list: gorder_list ',' order_ident order_dir */
+#line 11118 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 41865 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1692: /* gorder_list: order_ident order_dir */
+#line 11123 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 41874 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1693: /* opt_glimit_clause: %empty */
+#line 11130 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 41880 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1694: /* opt_glimit_clause: glimit_clause */
+#line 11131 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 41886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1695: /* glimit_clause: LIMIT glimit_options */
+#line 11137 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 41894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1696: /* glimit_options: limit_options */
+#line 11144 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->limit_params= (yyvsp[0].select_limit);
+ }
+#line 41902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1697: /* $@150: %empty */
+#line 11153 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->current_select->inc_in_sum_expr()))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 41915 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1698: /* in_sum_expr: opt_all $@150 expr */
+#line 11162 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->in_sum_expr--;
+ (yyval.item)= (yyvsp[0].item);
+ }
+#line 41924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1699: /* cast_type: BINARY opt_field_length */
+#line 11170 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].Lex_length_and_dec), &my_charset_bin); }
+#line 41930 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1700: /* cast_type: CHAR_SYM opt_field_length opt_binary */
+#line 11172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
+ thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 41940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1701: /* cast_type: VARCHAR field_length opt_binary */
+#line 11178 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
+ thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 41950 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1702: /* cast_type: VARCHAR2_ORACLE_SYM field_length opt_binary */
+#line 11184 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-1].Lex_length_and_dec), (yyvsp[0].Lex_exact_charset_extended_collation_attrs),
+ thd->variables.collation_connection))
+ MYSQL_YYABORT;
+ }
+#line 41960 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1703: /* cast_type: NCHAR_SYM opt_field_length */
+#line 11190 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].Lex_length_and_dec), national_charset_info);
+ }
+#line 41968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1704: /* cast_type: cast_type_numeric */
+#line 11193 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
+#line 41974 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1705: /* cast_type: cast_type_temporal */
+#line 11194 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); }
+#line 41980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1706: /* cast_type: udt_name */
+#line 11196 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->set_cast_type_udt(&(yyval.Lex_cast_type), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 41989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1707: /* cast_type_numeric: INT_SYM */
+#line 11203 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_slonglong); }
+#line 41995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1708: /* cast_type_numeric: SIGNED_SYM */
+#line 11204 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_slonglong); }
+#line 42001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1709: /* cast_type_numeric: SIGNED_SYM INT_SYM */
+#line 11205 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_slonglong); }
+#line 42007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1710: /* cast_type_numeric: UNSIGNED */
+#line 11206 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
+#line 42013 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1711: /* cast_type_numeric: UNSIGNED INT_SYM */
+#line 11207 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
+#line 42019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1712: /* cast_type_numeric: DECIMAL_SYM float_options */
+#line 11208 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_newdecimal, (yyvsp[0].Lex_length_and_dec)); }
+#line 42025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1713: /* cast_type_numeric: FLOAT_SYM */
+#line 11209 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_float); }
+#line 42031 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1714: /* cast_type_numeric: DOUBLE_SYM opt_precision */
+#line 11210 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_double, (yyvsp[0].Lex_length_and_dec)); }
+#line 42037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1715: /* cast_type_temporal: DATE_SYM */
+#line 11214 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_newdate); }
+#line 42043 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1716: /* cast_type_temporal: TIME_SYM opt_field_scale */
+#line 11215 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_time2, (yyvsp[0].Lex_length_and_dec)); }
+#line 42049 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1717: /* cast_type_temporal: DATETIME opt_field_scale */
+#line 11216 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.Lex_cast_type).set(&type_handler_datetime2, (yyvsp[0].Lex_length_and_dec)); }
+#line 42055 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1718: /* cast_type_temporal: INTERVAL_SYM DAY_SECOND_SYM field_scale */
+#line 11218 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.Lex_cast_type).set(&type_handler_interval_DDhhmmssff, (yyvsp[0].Lex_length_and_dec));
+ }
+#line 42063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1719: /* opt_expr_list: %empty */
+#line 11224 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= NULL; }
+#line 42069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1720: /* opt_expr_list: expr_list */
+#line 11225 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[0].item_list);}
+#line 42075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1721: /* expr_list: expr */
+#line 11230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_list)= List<Item>::make(thd->mem_root, (yyvsp[0].item)))))
+ MYSQL_YYABORT;
+ }
+#line 42084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1722: /* expr_list: expr_list ',' expr */
+#line 11235 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 42093 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1723: /* ident_list_arg: ident_list */
+#line 11242 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[0].item_list); }
+#line 42099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1724: /* ident_list_arg: '(' ident_list ')' */
+#line 11243 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item_list)= (yyvsp[-1].item_list); }
+#line 42105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1725: /* ident_list: simple_ident */
+#line 11248 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= new (thd->mem_root) List<Item>;
+ if (unlikely((yyval.item_list) == NULL) ||
+ unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 42116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1726: /* ident_list: ident_list ',' simple_ident */
+#line 11255 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 42125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1727: /* when_list: WHEN_SYM expr THEN_SYM expr */
+#line 11263 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_list)= new (thd->mem_root) List<Item>;
+ if (unlikely((yyval.item_list) == NULL))
+ MYSQL_YYABORT;
+ if (unlikely((yyval.item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
+ (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 42138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1728: /* when_list: when_list WHEN_SYM expr THEN_SYM expr */
+#line 11272 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
+ (yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.item_list)= (yyvsp[-4].item_list);
+ }
+#line 42149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1730: /* when_list_opt_else: when_list ELSE expr */
+#line 11283 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.item_list)= (yyvsp[-2].item_list);
+ }
+#line 42159 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1731: /* table_ref: table_factor */
+#line 11293 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1732: /* table_ref: join_table */
+#line 11295 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->nest_last_join(thd))))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 42178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1733: /* json_text_literal: TEXT_STRING */
+#line 11307 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1734: /* json_text_literal: NCHAR_STRING */
+#line 11311 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= national_charset_info;
+ }
+#line 42194 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1735: /* json_text_literal: UNDERSCORE_CHARSET TEXT_STRING */
+#line 11315 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= (yyvsp[-1].charset);
+ (yyval.lex_string_with_metadata)= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 42203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1737: /* json_text_literal_or_num: NUM */
+#line 11324 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42211 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1738: /* json_text_literal_or_num: LONG_NUM */
+#line 11328 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1739: /* json_text_literal_or_num: DECIMAL_NUM */
+#line 11332 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1740: /* json_text_literal_or_num: FLOAT_NUM */
+#line 11336 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_text_literal_cs= NULL;
+ }
+#line 42235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1741: /* join_table_list: derived_table_list */
+#line 11342 "/home/buildbot/git/sql/sql_yacc.yy"
+ { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); }
+#line 42241 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1742: /* json_table_columns_clause: COLUMNS '(' json_table_columns_list ')' */
+#line 11347 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42247 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1744: /* json_table_columns_list: json_table_columns_list ',' json_table_column */
+#line 11353 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42253 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1745: /* $@151: %empty */
+#line 11358 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Create_field *f= new (thd->mem_root) Create_field();
+
+ if (unlikely(check_string_char_length(&(yyvsp[0].ident_sys), 0, NAME_CHAR_LEN,
+ system_charset_info, 1)))
+ my_yyabort_error((ER_TOO_LONG_IDENT, MYF(0), (yyvsp[0].ident_sys).str));
+
+ lex->json_table->m_cur_json_table_column=
+ new (thd->mem_root) Json_table_column(f,
+ lex->json_table->get_cur_nested_path());
+
+ if (unlikely(!f ||
+ !lex->json_table->m_cur_json_table_column))
+ MYSQL_YYABORT;
+
+ lex->init_last_field(f, &(yyvsp[0].ident_sys));
+ }
+#line 42276 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1746: /* json_table_column: ident $@151 json_table_column_type */
+#line 11377 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(lex->json_table->
+ m_cur_json_table_column->m_field->check(thd)))
+ MYSQL_YYABORT;
+ lex->json_table->m_columns.push_back(
+ lex->json_table->m_cur_json_table_column, thd->mem_root);
+ }
+#line 42289 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1747: /* $@152: %empty */
+#line 11386 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Json_table_nested_path *np= new (thd->mem_root)
+ Json_table_nested_path();
+ np->set_path(thd, (yyvsp[0].lex_string_with_metadata));
+ lex->json_table->start_nested_path(np);
+ }
+#line 42301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1748: /* json_table_column: NESTED_SYM PATH_SYM json_text_literal $@152 json_table_columns_clause */
+#line 11394 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->json_table->end_nested_path();
+ }
+#line 42310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1749: /* json_table_column_type: FOR_SYM ORDINALITY_SYM */
+#line 11402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_field_type_st type;
+ type.set(&type_handler_slong);
+ Lex->last_field->set_attributes(thd, type,
+ COLUMN_DEFINITION_TABLE_FIELD);
+ Lex->json_table->m_cur_json_table_column->
+ set(Json_table_column::FOR_ORDINALITY);
+ }
+#line 42323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1750: /* json_table_column_type: json_table_field_type PATH_SYM json_text_literal json_opt_on_empty_or_error */
+#line 11412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[-3].Lex_field_type),
+ COLUMN_DEFINITION_TABLE_FIELD);
+ if (Lex->json_table->m_cur_json_table_column->
+ set(thd, Json_table_column::PATH, (yyvsp[-1].lex_string_with_metadata),
+ (yyvsp[-3].Lex_field_type).charset_collation_attrs()))
+ {
+ MYSQL_YYABORT;
+ }
+ }
+#line 42338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1751: /* json_table_column_type: json_table_field_type EXISTS PATH_SYM json_text_literal */
+#line 11423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_field->set_attributes(thd, (yyvsp[-3].Lex_field_type),
+ COLUMN_DEFINITION_TABLE_FIELD);
+ if (Lex->json_table->m_cur_json_table_column->
+ set(thd, Json_table_column::EXISTS_PATH, (yyvsp[0].lex_string_with_metadata),
+ (yyvsp[-3].Lex_field_type).charset_collation_attrs()))
+ MYSQL_YYABORT;
+ }
+#line 42351 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1756: /* json_opt_on_empty_or_error: %empty */
+#line 11442 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42357 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1761: /* json_on_response: ERROR_SYM */
+#line 11451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.json_on_response).m_response= Json_table_column::RESPONSE_ERROR;
+ }
+#line 42365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1762: /* json_on_response: NULL_SYM */
+#line 11455 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.json_on_response).m_response= Json_table_column::RESPONSE_NULL;
+ }
+#line 42373 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1763: /* json_on_response: DEFAULT json_text_literal_or_num */
+#line 11459 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.json_on_response).m_response= Json_table_column::RESPONSE_DEFAULT;
+ (yyval.json_on_response).m_default= (yyvsp[0].lex_string_with_metadata);
+ Lex->json_table->m_cur_json_table_column->m_defaults_cs=
+ thd->variables.collation_connection;
+ }
+#line 42384 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1764: /* json_on_error_response: json_on_response ON ERROR_SYM */
+#line 11469 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_cur_json_table_column->m_on_error= (yyvsp[-2].json_on_response);
+ }
+#line 42392 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1765: /* json_on_empty_response: json_on_response ON EMPTY_SYM */
+#line 11476 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->json_table->m_cur_json_table_column->m_on_empty= (yyvsp[-2].json_on_response);
+ }
+#line 42400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1766: /* $@153: %empty */
+#line 11483 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ push_table_function_arg_context(Lex, thd->mem_root);
+ //TODO: introduce IN_TABLE_FUNC_ARGUMENT?
+ Select->parsing_place= IN_ON;
+ }
+#line 42410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1767: /* $@154: %empty */
+#line 11489 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_function_json_table *jt=
+ new (thd->mem_root) Table_function_json_table((yyvsp[-1].item));
+ if (unlikely(!jt))
+ MYSQL_YYABORT;
+ /* See comment for class Table_function_json_table: */
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
+ Lex->json_table= jt;
+
+ Select->parsing_place= NO_MATTER;
+ jt->set_name_resolution_context(Lex->pop_context());
+ }
+#line 42427 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1768: /* table_function: JSON_TABLE_SYM '(' $@153 expr ',' $@154 json_text_literal json_table_columns_clause ')' opt_table_alias_clause */
+#line 11502 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ if (unlikely((yyvsp[0].lex_str_ptr) == NULL))
+ {
+ /* Alias is not optional. */
+ my_error(ER_JSON_TABLE_ALIAS_REQUIRED, MYF(0));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->json_table->m_nested_path.set_path(thd, (yyvsp[-3].lex_string_with_metadata))))
+ MYSQL_YYABORT;
+ if (!((yyval.table_list)= sel->add_table_to_list(thd,
+ new (thd->mem_root) Table_ident(thd, &any_db,
+ (yyvsp[0].lex_str_ptr), TRUE),
+ NULL,
+ TL_OPTION_TABLE_FUNCTION,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ 0,0,0)))
+ MYSQL_YYABORT;
+ (yyval.table_list)->table_function= Lex->json_table;
+ Lex->json_table= 0;
+ status_var_increment(thd->status_var.feature_json);
+ }
+#line 42455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1769: /* esc_table_ref: table_ref */
+#line 11535 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)=(yyvsp[0].table_list); }
+#line 42461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1770: /* esc_table_ref: '{' ident table_ref '}' */
+#line 11536 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)=(yyvsp[-1].table_list); }
+#line 42467 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1771: /* derived_table_list: esc_table_ref */
+#line 11543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table_list)=(yyvsp[0].table_list);
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 42476 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1772: /* derived_table_list: derived_table_list ',' esc_table_ref */
+#line 11548 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 42485 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1773: /* join_table: table_ref normal_join table_ref */
+#line 11562 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
+ if (unlikely(Select->add_cross_joined_table((yyvsp[-2].table_list), (yyvsp[0].table_list), (yyvsp[-1].num))))
+ MYSQL_YYABORT;
+ }
+#line 42495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1774: /* $@155: %empty */
+#line 11569 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-3].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ /* Change the current name resolution context to a local context. */
+ if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-3].table_list), (yyvsp[-1].table_list))))
+ MYSQL_YYABORT;
+ Select->parsing_place= IN_ON;
+ }
+#line 42509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1775: /* join_table: table_ref normal_join table_ref ON $@155 expr */
+#line 11579 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-3].table_list)->straight=(yyvsp[-4].num);
+ add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
+ (yyvsp[-3].table_list)->on_context= Lex->pop_context();
+ Select->parsing_place= NO_MATTER;
+ }
+#line 42520 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1776: /* $@156: %empty */
+#line 11587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-3].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ }
+#line 42530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1777: /* join_table: table_ref normal_join table_ref USING $@156 '(' using_list ')' */
+#line 11593 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-5].table_list)->straight=(yyvsp[-6].num);
+ add_join_natural((yyvsp[-7].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
+ (yyval.table_list)=(yyvsp[-5].table_list);
+ }
+#line 42540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1778: /* join_table: table_ref NATURAL inner_join table_factor */
+#line 11599 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
+ Select->add_joined_table((yyvsp[-3].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ (yyvsp[0].table_list)->straight=(yyvsp[-1].num);
+ add_join_natural((yyvsp[-3].table_list),(yyvsp[0].table_list),NULL,Select);
+ }
+#line 42552 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1779: /* $@157: %empty */
+#line 11610 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ /* Change the current name resolution context to a local context. */
+ if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-5].table_list), (yyvsp[-1].table_list))))
+ MYSQL_YYABORT;
+ Select->parsing_place= IN_ON;
+ }
+#line 42566 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1780: /* join_table: table_ref LEFT opt_outer JOIN_SYM table_ref ON $@157 expr */
+#line 11620 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
+ (yyvsp[-3].table_list)->on_context= Lex->pop_context();
+ (yyvsp[-3].table_list)->outer_join|=JOIN_TYPE_LEFT;
+ (yyval.table_list)=(yyvsp[-3].table_list);
+ Select->parsing_place= NO_MATTER;
+ }
+#line 42578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1781: /* $@158: %empty */
+#line 11628 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-4].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 42588 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1782: /* join_table: table_ref LEFT opt_outer JOIN_SYM table_factor $@158 USING '(' using_list ')' */
+#line 11634 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ add_join_natural((yyvsp[-9].table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
+ (yyvsp[-5].table_list)->outer_join|=JOIN_TYPE_LEFT;
+ (yyval.table_list)=(yyvsp[-5].table_list);
+ }
+#line 42598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1783: /* join_table: table_ref NATURAL LEFT opt_outer JOIN_SYM table_factor */
+#line 11640 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ add_join_natural((yyvsp[-5].table_list),(yyvsp[0].table_list),NULL,Select);
+ (yyvsp[0].table_list)->outer_join|=JOIN_TYPE_LEFT;
+ (yyval.table_list)=(yyvsp[0].table_list);
+ }
+#line 42611 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1784: /* $@159: %empty */
+#line 11652 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[-1].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[-1].table_list));
+ /* Change the current name resolution context to a local context. */
+ if (unlikely(push_new_name_resolution_context(thd, (yyvsp[-5].table_list), (yyvsp[-1].table_list))))
+ MYSQL_YYABORT;
+ Select->parsing_place= IN_ON;
+ }
+#line 42625 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1785: /* join_table: table_ref RIGHT opt_outer JOIN_SYM table_ref ON $@159 expr */
+#line 11662 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
+ MYSQL_YYABORT;
+ add_join_on(thd, (yyval.table_list), (yyvsp[0].item));
+ (yyvsp[-7].table_list)->on_context= Lex->pop_context();
+ Select->parsing_place= NO_MATTER;
+ }
+#line 42638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1786: /* $@160: %empty */
+#line 11671 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-4].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ }
+#line 42648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1787: /* join_table: table_ref RIGHT opt_outer JOIN_SYM table_factor $@160 USING '(' using_list ')' */
+#line 11677 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
+ MYSQL_YYABORT;
+ add_join_natural((yyval.table_list),(yyvsp[-5].table_list),(yyvsp[-1].string_list),Select);
+ }
+#line 42659 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1788: /* join_table: table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor */
+#line 11684 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-5].table_list) && (yyvsp[0].table_list));
+ Select->add_joined_table((yyvsp[-5].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ add_join_natural((yyvsp[0].table_list),(yyvsp[-5].table_list),NULL,Select);
+ LEX *lex= Lex;
+ if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
+ MYSQL_YYABORT;
+ }
+#line 42673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1789: /* inner_join: JOIN_SYM */
+#line 11697 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 42679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1790: /* inner_join: INNER_SYM JOIN_SYM */
+#line 11698 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 42685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1791: /* inner_join: STRAIGHT_JOIN */
+#line 11699 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 1; }
+#line 42691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1792: /* normal_join: inner_join */
+#line 11703 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = (yyvsp[0].num); }
+#line 42697 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1793: /* normal_join: CROSS JOIN_SYM */
+#line 11704 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num) = 0; }
+#line 42703 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1794: /* opt_use_partition: %empty */
+#line 11712 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.string_list)= 0;}
+#line 42709 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1796: /* use_partition: PARTITION_SYM '(' using_list ')' have_partitioning */
+#line 11718 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.string_list)= (yyvsp[-2].string_list);
+ Select->parsing_place= Select->save_parsing_place;
+ Select->save_parsing_place= NO_MATTER;
+ }
+#line 42719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1797: /* table_factor: table_primary_ident_opt_parens */
+#line 11726 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1798: /* table_factor: table_primary_derived_opt_parens */
+#line 11727 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1799: /* table_factor: join_table_parens */
+#line 11729 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].table_list)->nested_join->nest_type= 0;
+ (yyval.table_list)= (yyvsp[0].table_list);
+ }
+#line 42740 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1800: /* table_factor: table_reference_list_parens */
+#line 11733 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42746 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1801: /* table_factor: table_function */
+#line 11734 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42752 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1802: /* table_primary_ident_opt_parens: table_primary_ident */
+#line 11738 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42758 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1803: /* table_primary_ident_opt_parens: '(' table_primary_ident_opt_parens ')' */
+#line 11739 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 42764 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1804: /* table_primary_derived_opt_parens: table_primary_derived */
+#line 11743 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 42770 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1805: /* table_primary_derived_opt_parens: '(' table_primary_derived_opt_parens ')' */
+#line 11744 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 42776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1806: /* table_reference_list_parens: '(' table_reference_list_parens ')' */
+#line 11748 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 42782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1807: /* table_reference_list_parens: '(' nested_table_reference_list ')' */
+#line 11750 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Select->end_nested_join(thd)))
+ MYSQL_YYABORT;
+ }
+#line 42791 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1808: /* nested_table_reference_list: table_ref ',' table_ref */
+#line 11758 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Select->init_nested_join(thd))
+ MYSQL_YYABORT;
+ Select->add_joined_table((yyvsp[-2].table_list));
+ Select->add_joined_table((yyvsp[0].table_list));
+ (yyval.table_list)= (yyvsp[-2].table_list)->embedding;
+ }
+#line 42803 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1809: /* nested_table_reference_list: nested_table_reference_list ',' table_ref */
+#line 11766 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->add_joined_table((yyvsp[0].table_list));
+ (yyval.table_list)= (yyvsp[-2].table_list);
+ }
+#line 42812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1810: /* join_table_parens: '(' join_table_parens ')' */
+#line 11773 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[-1].table_list); }
+#line 42818 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1811: /* join_table_parens: '(' join_table ')' */
+#line 11775 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (!((yyval.table_list)= lex->current_select->nest_last_join(thd)))
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+ }
+#line 42831 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1812: /* table_primary_ident: table_ident opt_use_partition opt_for_system_time_clause opt_table_alias_clause opt_key_definition */
+#line 11789 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
+ 0,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ (yyvsp[-3].string_list))))
+ MYSQL_YYABORT;
+ if ((yyvsp[-2].num))
+ (yyval.table_list)->vers_conditions= Lex->vers_conditions;
+ }
+#line 42847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1813: /* table_primary_derived: subquery opt_for_system_time_clause table_alias_clause */
+#line 11805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Lex->parsed_derived_table((yyvsp[-2].select_lex)->master_unit(), (yyvsp[-1].num), (yyvsp[0].lex_str_ptr))))
+ MYSQL_YYABORT;
+ }
+#line 42856 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1814: /* table_primary_derived: subquery opt_for_system_time_clause */
+#line 11812 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING alias;
+ if ((yyvsp[-1].select_lex)->make_unique_derived_name(thd, &alias) ||
+ !((yyval.table_list)= Lex->parsed_derived_table((yyvsp[-1].select_lex)->master_unit(), (yyvsp[0].num), &alias)))
+ MYSQL_YYABORT;
+ }
+#line 42867 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1815: /* opt_outer: %empty */
+#line 11822 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1816: /* opt_outer: OUTER */
+#line 11823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1817: /* index_hint_clause: %empty */
+#line 11828 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (thd->variables.old_behavior & OLD_MODE_IGNORE_INDEX_ONLY_FOR_JOIN) ?
+ INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL;
+ }
+#line 42888 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1818: /* index_hint_clause: FOR_SYM JOIN_SYM */
+#line 11832 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= INDEX_HINT_MASK_JOIN; }
+#line 42894 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1819: /* index_hint_clause: FOR_SYM ORDER_SYM BY */
+#line 11833 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= INDEX_HINT_MASK_ORDER; }
+#line 42900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1820: /* index_hint_clause: FOR_SYM GROUP_SYM BY */
+#line 11834 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= INDEX_HINT_MASK_GROUP; }
+#line 42906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1821: /* index_hint_type: FORCE_SYM */
+#line 11838 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.index_hint)= INDEX_HINT_FORCE; }
+#line 42912 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1822: /* index_hint_type: IGNORE_SYM */
+#line 11839 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.index_hint)= INDEX_HINT_IGNORE; }
+#line 42918 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1823: /* $@161: %empty */
+#line 11844 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
+ }
+#line 42926 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1825: /* $@162: %empty */
+#line 11849 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
+ }
+#line 42934 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1830: /* $@163: %empty */
+#line 11862 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->alloc_index_hints(thd); }
+#line 42940 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1832: /* $@164: %empty */
+#line 11866 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->clear_index_hints(); }
+#line 42946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1834: /* opt_key_usage_list: %empty */
+#line 11871 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->add_index_hint(thd, NULL, 0); }
+#line 42952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1835: /* opt_key_usage_list: key_usage_list */
+#line 11872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 42958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1836: /* key_usage_element: ident */
+#line 11877 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->add_index_hint(thd, (yyvsp[0].ident_sys).str, (yyvsp[0].ident_sys).length); }
+#line 42964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1837: /* key_usage_element: PRIMARY_SYM */
+#line 11879 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->add_index_hint(thd, "PRIMARY", 7); }
+#line 42970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1840: /* using_list: ident */
+#line 11889 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.string_list)= new (thd->mem_root) List<String>)))
+ MYSQL_YYABORT;
+ String *s= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
+ (yyvsp[0].ident_sys).length,
+ system_charset_info);
+ if (unlikely(unlikely(s == NULL)))
+ MYSQL_YYABORT;
+ (yyval.string_list)->push_back(s, thd->mem_root);
+ }
+#line 42985 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1841: /* using_list: using_list ',' ident */
+#line 11900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ String *s= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
+ (yyvsp[0].ident_sys).length,
+ system_charset_info);
+ if (unlikely(unlikely(s == NULL)))
+ MYSQL_YYABORT;
+ if (unlikely((yyvsp[-2].string_list)->push_back(s, thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyval.string_list)= (yyvsp[-2].string_list);
+ }
+#line 43000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1842: /* interval: interval_time_stamp */
+#line 11913 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1843: /* interval: DAY_HOUR_SYM */
+#line 11914 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_HOUR; }
+#line 43012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1844: /* interval: DAY_MICROSECOND_SYM */
+#line 11915 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
+#line 43018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1845: /* interval: DAY_MINUTE_SYM */
+#line 11916 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_MINUTE; }
+#line 43024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1846: /* interval: DAY_SECOND_SYM */
+#line 11917 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_DAY_SECOND; }
+#line 43030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1847: /* interval: HOUR_MICROSECOND_SYM */
+#line 11918 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
+#line 43036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1848: /* interval: HOUR_MINUTE_SYM */
+#line 11919 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_HOUR_MINUTE; }
+#line 43042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1849: /* interval: HOUR_SECOND_SYM */
+#line 11920 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_HOUR_SECOND; }
+#line 43048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1850: /* interval: MINUTE_MICROSECOND_SYM */
+#line 11921 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
+#line 43054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1851: /* interval: MINUTE_SECOND_SYM */
+#line 11922 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_MINUTE_SECOND; }
+#line 43060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1852: /* interval: SECOND_MICROSECOND_SYM */
+#line 11923 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
+#line 43066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1853: /* interval: YEAR_MONTH_SYM */
+#line 11924 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval)=INTERVAL_YEAR_MONTH; }
+#line 43072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1854: /* interval_time_stamp: DAY_SYM */
+#line 11928 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_DAY; }
+#line 43078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1855: /* interval_time_stamp: WEEK_SYM */
+#line 11929 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_WEEK; }
+#line 43084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1856: /* interval_time_stamp: HOUR_SYM */
+#line 11930 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_HOUR; }
+#line 43090 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1857: /* interval_time_stamp: MINUTE_SYM */
+#line 11931 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_MINUTE; }
+#line 43096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1858: /* interval_time_stamp: MONTH_SYM */
+#line 11932 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_MONTH; }
+#line 43102 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1859: /* interval_time_stamp: QUARTER_SYM */
+#line 11933 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_QUARTER; }
+#line 43108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1860: /* interval_time_stamp: SECOND_SYM */
+#line 11934 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_SECOND; }
+#line 43114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1861: /* interval_time_stamp: MICROSECOND_SYM */
+#line 11935 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
+#line 43120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1862: /* interval_time_stamp: YEAR_SYM */
+#line 11936 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.interval_time_st)=INTERVAL_YEAR; }
+#line 43126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1863: /* date_time_type: DATE_SYM */
+#line 11940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
+#line 43132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1864: /* date_time_type: TIME_SYM */
+#line 11941 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
+#line 43138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1865: /* date_time_type: DATETIME */
+#line 11942 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
+#line 43144 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1866: /* date_time_type: TIMESTAMP */
+#line 11943 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
+#line 43150 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1870: /* opt_table_alias_clause: %empty */
+#line 11953 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str_ptr)=0; }
+#line 43156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1871: /* opt_table_alias_clause: table_alias_clause */
+#line 11954 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str_ptr)= (yyvsp[0].lex_str_ptr); }
+#line 43162 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1872: /* table_alias_clause: table_alias ident_table_alias */
+#line 11959 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_str_ptr)= (LEX_CSTRING*) thd->memdup(&(yyvsp[0].ident_sys),sizeof(LEX_STRING));
+ if (unlikely((yyval.lex_str_ptr) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1875: /* opt_where_clause: %empty */
+#line 11972 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->where= 0; }
+#line 43178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1876: /* $@165: %empty */
+#line 11974 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_WHERE;
+ }
+#line 43186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1877: /* opt_where_clause: WHERE $@165 expr */
+#line 11978 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *select= Select;
+ select->where= normalize_cond(thd, (yyvsp[0].item));
+ select->parsing_place= NO_MATTER;
+ if ((yyvsp[0].item))
+ (yyvsp[0].item)->top_level_item();
+ }
+#line 43198 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1879: /* $@166: %empty */
+#line 11990 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_HAVING;
+ }
+#line 43206 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1880: /* opt_having_clause: HAVING $@166 expr */
+#line 11994 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->having= normalize_cond(thd, (yyvsp[0].item));
+ sel->parsing_place= NO_MATTER;
+ if ((yyvsp[0].item))
+ (yyvsp[0].item)->top_level_item();
+ }
+#line 43218 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1883: /* group_list: group_list ',' order_ident order_dir */
+#line 12014 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 43227 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1884: /* group_list: order_ident order_dir */
+#line 12019 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ }
+#line 43236 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1885: /* olap_opt: %empty */
+#line 12026 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43242 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1886: /* olap_opt: WITH_CUBE_SYM */
+#line 12028 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ 'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
+ and cause LALR(2) conflicts.
+ This syntax is not standard.
+ MySQL syntax: GROUP BY col1, col2, col3 WITH CUBE
+ SQL-2003: GROUP BY ... CUBE(col1, col2, col3)
+ */
+ LEX *lex=Lex;
+ 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;
+
+ my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE"));
+ }
+#line 43263 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1887: /* olap_opt: WITH_ROLLUP_SYM */
+#line 12045 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ 'WITH ROLLUP' is needed for backward compatibility,
+ and cause LALR(2) conflicts.
+ This syntax is not standard.
+ MySQL syntax: GROUP BY col1, col2, col3 WITH ROLLUP
+ SQL-2003: GROUP BY ... ROLLUP(col1, col2, col3)
+ */
+ LEX *lex= Lex;
+ 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;
+ }
+#line 43282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1888: /* opt_window_clause: %empty */
+#line 12067 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43288 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1889: /* opt_window_clause: WINDOW_SYM window_def_list */
+#line 12070 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43294 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1892: /* window_def: window_name AS window_spec */
+#line 12080 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(Select->add_window_def(thd, (yyvsp[-2].lex_str_ptr), lex->win_ref,
+ Select->group_list,
+ Select->order_list,
+ lex->win_frame)))
+ MYSQL_YYABORT;
+ }
+#line 43307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1893: /* $@167: %empty */
+#line 12092 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->prepare_add_window_spec(thd); }
+#line 43313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1894: /* window_spec: '(' $@167 opt_window_ref opt_window_partition_clause opt_window_order_clause opt_window_frame_clause ')' */
+#line 12096 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 43319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1895: /* opt_window_ref: %empty */
+#line 12100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1896: /* opt_window_ref: ident */
+#line 12102 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->lex->win_ref= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
+ if (unlikely(thd->lex->win_ref == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1897: /* opt_window_partition_clause: %empty */
+#line 12110 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 43341 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1899: /* opt_window_order_clause: %empty */
+#line 12115 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 43347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1900: /* opt_window_order_clause: ORDER_SYM BY order_list */
+#line 12116 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->order_list= *((yyvsp[0].select_order)); }
+#line 43353 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1901: /* opt_window_frame_clause: %empty */
+#line 12120 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 43359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1902: /* opt_window_frame_clause: window_frame_units window_frame_extent opt_window_frame_exclusion */
+#line 12122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->win_frame=
+ new (thd->mem_root) Window_frame((yyvsp[-2].frame_units),
+ lex->frame_top_bound,
+ lex->frame_bottom_bound,
+ (yyvsp[0].frame_exclusion));
+ if (unlikely(lex->win_frame == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43374 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1903: /* window_frame_units: ROWS_SYM */
+#line 12135 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_units)= Window_frame::UNITS_ROWS; }
+#line 43380 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1904: /* window_frame_units: RANGE_SYM */
+#line 12136 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_units)= Window_frame::UNITS_RANGE; }
+#line 43386 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1905: /* window_frame_extent: window_frame_start */
+#line 12141 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->frame_top_bound= (yyvsp[0].window_frame_bound);
+ lex->frame_bottom_bound=
+ new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::CURRENT, NULL);
+ if (unlikely(lex->frame_bottom_bound == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1906: /* window_frame_extent: BETWEEN_SYM window_frame_bound AND_SYM window_frame_bound */
+#line 12151 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->frame_top_bound= (yyvsp[-2].window_frame_bound);
+ lex->frame_bottom_bound= (yyvsp[0].window_frame_bound);
+ }
+#line 43410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1907: /* window_frame_start: UNBOUNDED_SYM PRECEDING_SYM */
+#line 12160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::PRECEDING, NULL);
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43421 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1908: /* window_frame_start: CURRENT_SYM ROW_SYM */
+#line 12167 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::CURRENT, NULL);
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1909: /* window_frame_start: literal PRECEDING_SYM */
+#line 12174 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::PRECEDING, (yyvsp[-1].item));
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1910: /* window_frame_bound: window_frame_start */
+#line 12183 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.window_frame_bound)= (yyvsp[0].window_frame_bound); }
+#line 43449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1911: /* window_frame_bound: UNBOUNDED_SYM FOLLOWING_SYM */
+#line 12185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::FOLLOWING, NULL);
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43460 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1912: /* window_frame_bound: literal FOLLOWING_SYM */
+#line 12192 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.window_frame_bound)= new (thd->mem_root)
+ Window_frame_bound(Window_frame_bound::FOLLOWING, (yyvsp[-1].item));
+ if (unlikely((yyval.window_frame_bound) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43471 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1913: /* opt_window_frame_exclusion: %empty */
+#line 12201 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
+#line 43477 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1914: /* opt_window_frame_exclusion: EXCLUDE_SYM CURRENT_SYM ROW_SYM */
+#line 12203 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_CURRENT_ROW; }
+#line 43483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1915: /* opt_window_frame_exclusion: EXCLUDE_SYM GROUP_SYM */
+#line 12205 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_GROUP; }
+#line 43489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1916: /* opt_window_frame_exclusion: EXCLUDE_SYM TIES_SYM */
+#line 12207 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_TIES; }
+#line 43495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1917: /* opt_window_frame_exclusion: EXCLUDE_SYM NO_SYM OTHERS_MARIADB_SYM */
+#line 12209 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
+#line 43501 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1918: /* opt_window_frame_exclusion: EXCLUDE_SYM NO_SYM OTHERS_ORACLE_SYM */
+#line 12211 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
+#line 43507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1922: /* alter_order_item: simple_ident_nospvar order_dir */
+#line 12229 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ bool ascending= ((yyvsp[0].num) == 1) ? true : false;
+ if (unlikely(add_order_to_list(thd, (yyvsp[-1].item), ascending)))
+ MYSQL_YYABORT;
+ }
+#line 43517 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1923: /* opt_order_clause: %empty */
+#line 12242 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_order)= NULL; }
+#line 43523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1924: /* opt_order_clause: order_clause */
+#line 12244 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_order)= (yyvsp[0].select_order); }
+#line 43529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1925: /* $@168: %empty */
+#line 12249 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->where= "ORDER clause";
+ }
+#line 43537 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1926: /* order_clause: ORDER_SYM BY $@168 order_list */
+#line 12253 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_order)= (yyvsp[0].select_order);
+ }
+#line 43545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1927: /* order_list: order_list ',' order_ident order_dir */
+#line 12260 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_order)= (yyvsp[-3].select_order);
+ if (add_to_list(thd, *(yyval.select_order), (yyvsp[-1].item),(bool) (yyvsp[0].num)))
+ MYSQL_YYABORT;
+ }
+#line 43555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1928: /* order_list: order_ident order_dir */
+#line 12266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_order)= new (thd->mem_root) SQL_I_List<ORDER>();
+ if (add_to_list(thd, *(yyval.select_order), (yyvsp[-1].item), (bool) (yyvsp[0].num)))
+ MYSQL_YYABORT;
+ }
+#line 43565 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1929: /* order_dir: %empty */
+#line 12274 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 43571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1930: /* order_dir: ASC */
+#line 12275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 43577 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1931: /* order_dir: DESC */
+#line 12276 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 43583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1932: /* opt_limit_clause: %empty */
+#line 12282 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_limit).clear(); }
+#line 43589 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1933: /* opt_limit_clause: limit_clause */
+#line 12284 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.select_limit)= (yyvsp[0].select_limit); }
+#line 43595 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1934: /* limit_clause: LIMIT limit_options */
+#line 12289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit)= (yyvsp[0].select_limit);
+ if (!(yyval.select_limit).select_limit->basic_const_item() ||
+ (yyval.select_limit).select_limit->val_int() > 0)
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 43606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1935: /* limit_clause: LIMIT limit_options ROWS_SYM EXAMINED_SYM limit_rows_option */
+#line 12297 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit)= (yyvsp[-3].select_limit);
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 43615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1936: /* limit_clause: LIMIT ROWS_SYM EXAMINED_SYM limit_rows_option */
+#line 12302 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).clear();
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 43624 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1937: /* limit_clause: fetch_first_clause */
+#line 12307 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit)= (yyvsp[0].select_limit);
+ if (!(yyval.select_limit).select_limit ||
+ !(yyval.select_limit).select_limit->basic_const_item() ||
+ (yyval.select_limit).select_limit->val_int() > 0)
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ }
+#line 43636 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1938: /* fetch_first_clause: FETCH_SYM first_or_next row_or_rows only_or_with_ties */
+#line 12318 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (unlikely(one == NULL))
+ MYSQL_YYABORT;
+ (yyval.select_limit).select_limit= one;
+ (yyval.select_limit).offset_limit= 0;
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 43650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1939: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows FETCH_SYM first_or_next row_or_rows only_or_with_ties */
+#line 12329 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (unlikely(one == NULL))
+ MYSQL_YYABORT;
+ (yyval.select_limit).select_limit= one;
+ (yyval.select_limit).offset_limit= (yyvsp[-5].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 43664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1940: /* fetch_first_clause: FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties */
+#line 12339 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[-2].item);
+ (yyval.select_limit).offset_limit= 0;
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 43675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1941: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows FETCH_SYM first_or_next limit_option row_or_rows only_or_with_ties */
+#line 12347 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[-2].item);
+ (yyval.select_limit).offset_limit= (yyvsp[-6].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= (yyvsp[0].num);
+ }
+#line 43686 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1942: /* fetch_first_clause: OFFSET_SYM limit_option row_or_rows */
+#line 12354 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= 0;
+ (yyval.select_limit).offset_limit= (yyvsp[-1].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 43697 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1947: /* only_or_with_ties: ONLY_SYM */
+#line 12373 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 43703 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1948: /* only_or_with_ties: WITH TIES_SYM */
+#line 12374 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 43709 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1949: /* opt_global_limit_clause: opt_limit_clause */
+#line 12380 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->limit_params= (yyvsp[0].select_limit);
+ }
+#line 43717 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1950: /* limit_options: limit_option */
+#line 12387 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[0].item);
+ (yyval.select_limit).offset_limit= NULL;
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 43728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1951: /* limit_options: limit_option ',' limit_option */
+#line 12394 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[0].item);
+ (yyval.select_limit).offset_limit= (yyvsp[-2].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 43739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1952: /* limit_options: limit_option OFFSET_SYM limit_option */
+#line 12401 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_limit).select_limit= (yyvsp[-2].item);
+ (yyval.select_limit).offset_limit= (yyvsp[0].item);
+ (yyval.select_limit).explicit_limit= true;
+ (yyval.select_limit).with_ties= false;
+ }
+#line 43750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1953: /* limit_option: ident_cli */
+#line 12411 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 43759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1954: /* limit_option: ident_cli '.' ident_cli */
+#line 12416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 43768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1955: /* limit_option: param_marker */
+#line 12421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].item_param)->limit_clause_param= TRUE;
+ }
+#line 43776 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1956: /* limit_option: ULONGLONG_NUM */
+#line 12425 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43786 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1957: /* limit_option: LONG_NUM */
+#line 12431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1958: /* limit_option: NUM */
+#line 12437 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 43806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1959: /* limit_rows_option: limit_option */
+#line 12446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->limit_rows_examined= (yyvsp[0].item);
+ }
+#line 43814 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1960: /* delete_limit_clause: %empty */
+#line 12453 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->current_select->limit_params.select_limit= 0;
+ }
+#line 43823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1961: /* delete_limit_clause: LIMIT limit_option */
+#line 12458 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *sel= Select;
+ sel->limit_params.select_limit= (yyvsp[0].item);
+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
+ sel->limit_params.explicit_limit= 1;
+ }
+#line 43834 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1962: /* delete_limit_clause: LIMIT ROWS_SYM EXAMINED_SYM */
+#line 12464 "/home/buildbot/git/sql/sql_yacc.yy"
+ { thd->parse_error(); MYSQL_YYABORT; }
+#line 43840 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1963: /* delete_limit_clause: LIMIT limit_option ROWS_SYM EXAMINED_SYM */
+#line 12465 "/home/buildbot/git/sql/sql_yacc.yy"
+ { thd->parse_error(); MYSQL_YYABORT; }
+#line 43846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1964: /* order_limit_lock: order_or_limit */
+#line 12470 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= (yyvsp[0].order_limit_lock);
+ (yyval.order_limit_lock)->lock.empty();
+ }
+#line 43855 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1965: /* order_limit_lock: order_or_limit select_lock_type */
+#line 12475 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= (yyvsp[-1].order_limit_lock);
+ (yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
+ }
+#line 43864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1966: /* order_limit_lock: select_lock_type */
+#line 12480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
+ if (!(yyval.order_limit_lock))
+ YYABORT;
+ (yyval.order_limit_lock)->order_list= NULL;
+ (yyval.order_limit_lock)->limit.clear();
+ (yyval.order_limit_lock)->lock= (yyvsp[0].select_lock);
+ }
+#line 43877 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1967: /* opt_order_limit_lock: %empty */
+#line 12492 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select();
+ (yyval.order_limit_lock)= NULL;
+ }
+#line 43886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1968: /* opt_order_limit_lock: order_limit_lock */
+#line 12496 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.order_limit_lock)= (yyvsp[0].order_limit_lock); }
+#line 43892 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1971: /* opt_procedure_or_into: %empty */
+#line 12509 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock).empty();
+ }
+#line 43900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1972: /* opt_procedure_or_into: procedure_clause opt_select_lock_type */
+#line 12513 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ }
+#line 43908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1973: /* opt_procedure_or_into: into opt_select_lock_type */
+#line 12517 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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...'");
+ (yyval.select_lock)= (yyvsp[0].select_lock);
+ }
+#line 43922 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1974: /* order_or_limit: order_clause opt_limit_clause */
+#line 12531 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
+ if (!(yyval.order_limit_lock))
+ YYABORT;
+ (yyval.order_limit_lock)->order_list= (yyvsp[-1].select_order);
+ (yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
+ }
+#line 43934 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1975: /* order_or_limit: limit_clause */
+#line 12539 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.order_limit_lock)= new(thd->mem_root) Lex_order_limit_lock;
+ if (!(yyval.order_limit_lock))
+ YYABORT;
+ (yyval.order_limit_lock)->order_list= NULL;
+ (yyval.order_limit_lock)->limit= (yyvsp[0].select_limit);
+ }
+#line 43946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1978: /* int_num: opt_plus NUM */
+#line 12555 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43952 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1979: /* int_num: '-' NUM */
+#line 12556 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1980: /* ulong_num: opt_plus NUM */
+#line 12560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1981: /* ulong_num: HEX_NUM */
+#line 12561 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= strtoul((yyvsp[0].lex_str).str, (char**) 0, 16); }
+#line 43970 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1982: /* ulong_num: opt_plus LONG_NUM */
+#line 12562 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43976 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1983: /* ulong_num: opt_plus ULONGLONG_NUM */
+#line 12563 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1984: /* ulong_num: opt_plus DECIMAL_NUM */
+#line 12564 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43988 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1985: /* ulong_num: opt_plus FLOAT_NUM */
+#line 12565 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 43994 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1986: /* real_ulong_num: NUM */
+#line 12569 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1987: /* real_ulong_num: HEX_NUM */
+#line 12570 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
+#line 44006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1988: /* real_ulong_num: LONG_NUM */
+#line 12571 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1989: /* real_ulong_num: ULONGLONG_NUM */
+#line 12572 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1990: /* real_ulong_num: dec_num_error */
+#line 12573 "/home/buildbot/git/sql/sql_yacc.yy"
+ { MYSQL_YYABORT; }
+#line 44024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1991: /* longlong_num: opt_plus NUM */
+#line 12577 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1992: /* longlong_num: LONG_NUM */
+#line 12578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44036 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1993: /* longlong_num: '-' NUM */
+#line 12579 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1994: /* longlong_num: '-' LONG_NUM */
+#line 12580 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1995: /* ulonglong_num: opt_plus NUM */
+#line 12584 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44054 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1996: /* ulonglong_num: opt_plus ULONGLONG_NUM */
+#line 12585 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1997: /* ulonglong_num: opt_plus LONG_NUM */
+#line 12586 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1998: /* ulonglong_num: opt_plus DECIMAL_NUM */
+#line 12587 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 1999: /* ulonglong_num: opt_plus FLOAT_NUM */
+#line 12588 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44078 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2000: /* real_ulonglong_num: NUM */
+#line 12592 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2001: /* real_ulonglong_num: ULONGLONG_NUM */
+#line 12593 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44090 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2002: /* real_ulonglong_num: HEX_NUM */
+#line 12594 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); }
+#line 44096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2003: /* real_ulonglong_num: LONG_NUM */
+#line 12595 "/home/buildbot/git/sql/sql_yacc.yy"
+ { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
+#line 44102 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2004: /* real_ulonglong_num: dec_num_error */
+#line 12596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { MYSQL_YYABORT; }
+#line 44108 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2005: /* dec_num_error: dec_num */
+#line 12601 "/home/buildbot/git/sql/sql_yacc.yy"
+ { thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
+#line 44114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2008: /* choice: ulong_num */
+#line 12610 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
+#line 44120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2009: /* choice: DEFAULT */
+#line 12611 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.choice)= HA_CHOICE_UNDEF; }
+#line 44126 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2010: /* bool: ulong_num */
+#line 12615 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
+#line 44132 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2011: /* bool: TRUE_SYM */
+#line 12616 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 1; }
+#line 44138 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2012: /* bool: FALSE_SYM */
+#line 12617 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ulong_num)= 0; }
+#line 44144 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2013: /* $@169: %empty */
+#line 12622 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+
+ lex->proc_list.elements=0;
+ lex->proc_list.first=0;
+ lex->proc_list.next= &lex->proc_list.first;
+ Item_field *item= new (thd->mem_root)
+ Item_field(thd, &lex->current_select->context,
+ (yyvsp[0].ident_sys));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(add_proc_to_list(thd, item)))
+ MYSQL_YYABORT;
+ Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+
+ /*
+ PROCEDURE CLAUSE cannot handle subquery as one of its parameter,
+ so disallow any subqueries further.
+ Alow subqueries back once the parameters are reduced.
+ */
+ Lex->clause_that_disallows_subselect= "PROCEDURE";
+ Select->options|= OPTION_PROCEDURE_CLAUSE;
+ }
+#line 44172 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2014: /* procedure_clause: PROCEDURE_SYM ident $@169 '(' procedure_list ')' */
+#line 12646 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* Subqueries are allowed from now.*/
+ Lex->clause_that_disallows_subselect= NULL;
+ }
+#line 44181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2015: /* procedure_list: %empty */
+#line 12653 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2016: /* procedure_list: procedure_list2 */
+#line 12654 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2019: /* procedure_item: remember_name expr remember_end */
+#line 12664 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(add_proc_to_list(thd, (yyvsp[-1].item))))
+ MYSQL_YYABORT;
+ if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
+ (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 44204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2020: /* $@170: %empty */
+#line 12673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (!lex->describe &&
+ unlikely((!(lex->result= new (thd->mem_root)
+ select_dumpvar(thd)))))
+ MYSQL_YYABORT;
+ }
+#line 44216 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2021: /* select_var_list_init: $@170 select_var_list */
+#line 12681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2023: /* select_var_list: select_var_ident */
+#line 12686 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2024: /* select_var_ident: select_outvar */
+#line 12690 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->result)
+ {
+ if (unlikely((yyvsp[0].myvar) == NULL))
+ MYSQL_YYABORT;
+ ((select_dumpvar *)Lex->result)->var_list.push_back((yyvsp[0].myvar), thd->mem_root);
+ }
+ else
+ {
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(Lex->describe);
+ }
+ }
+#line 44249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2025: /* select_outvar: '@' ident_or_text */
+#line 12710 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+
+ (yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user(&(yyvsp[0].lex_str)) : NULL;
+ }
+#line 44263 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2026: /* select_outvar: ident_or_text */
+#line 12720 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[0].lex_str))) && Lex->result))
+ MYSQL_YYABORT;
+ }
+#line 44272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2027: /* select_outvar: ident '.' ident */
+#line 12725 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))) && Lex->result))
+ MYSQL_YYABORT;
+ }
+#line 44281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2028: /* into: INTO into_destination */
+#line 12733 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2029: /* $@171: %empty */
+#line 12738 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ if (unlikely(!(lex->exchange=
+ new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str, 0))) ||
+ unlikely(!(lex->result=
+ new (thd->mem_root)
+ select_export(thd, lex->exchange))))
+ MYSQL_YYABORT;
+ }
+#line 44302 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2030: /* $@172: %empty */
+#line 12749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->exchange->cs= (yyvsp[0].charset); }
+#line 44308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2032: /* into_destination: DUMPFILE TEXT_STRING_filesystem */
+#line 12752 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (!lex->describe)
+ {
+ lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ if (unlikely(!(lex->exchange=
+ new (thd->mem_root) sql_exchange((yyvsp[0].lex_str).str,1))))
+ MYSQL_YYABORT;
+ if (unlikely(!(lex->result=
+ new (thd->mem_root)
+ select_dump(thd, lex->exchange))))
+ MYSQL_YYABORT;
+ }
+ }
+#line 44327 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2033: /* into_destination: select_var_list_init */
+#line 12767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
+ }
+#line 44335 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2034: /* $@173: %empty */
+#line 12778 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_DO;
+ if (lex->main_select_push(true))
+ MYSQL_YYABORT;
+ lex->init_select();
+ }
+#line 44347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2035: /* do: DO_SYM $@173 expr_list */
+#line 12786 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->insert_list= (yyvsp[0].item_list);
+ Lex->pop_select(); //main select
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 44358 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2036: /* $@174: %empty */
+#line 12800 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_command(SQLCOM_DROP_TABLE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
+ YYPS->m_lock_type= TL_UNLOCK;
+ YYPS->m_mdl_type= MDL_EXCLUSIVE;
+ }
+#line 44369 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2037: /* drop: DROP opt_temporary table_or_tables opt_if_exists $@174 table_list opt_lock_wait_timeout opt_restrict */
+#line 12807 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2038: /* $@175: %empty */
+#line 12809 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 44384 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2039: /* drop: DROP INDEX_SYM $@175 opt_if_exists_table_element ident ON table_ident opt_lock_wait_timeout */
+#line 12814 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Alter_drop *ad= (new (thd->mem_root)
+ Alter_drop(Alter_drop::KEY, (yyvsp[-3].ident_sys).str, (yyvsp[-4].num)));
+ if (unlikely(ad == NULL))
+ MYSQL_YYABORT;
+ lex->sql_command= SQLCOM_DROP_INDEX;
+ lex->alter_info.reset();
+ 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, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
+ TL_READ_NO_INSERT,
+ MDL_SHARED_UPGRADABLE)))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //main select
+ }
+#line 44406 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2040: /* drop: DROP DATABASE opt_if_exists ident */
+#line 12832 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_command(SQLCOM_DROP_DB, (yyvsp[-1].object_ddl_options));
+ lex->name= (yyvsp[0].ident_sys);
+ }
+#line 44416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2041: /* drop: DROP USER_SYM opt_if_exists clear_privileges user_list */
+#line 12838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options));
+ }
+#line 44424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2042: /* drop: DROP ROLE_SYM opt_if_exists clear_privileges role_list */
+#line 12842 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options));
+ }
+#line 44432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2043: /* $@176: %empty */
+#line 12846 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_VIEW, (yyvsp[0].object_ddl_options));
+ YYPS->m_lock_type= TL_UNLOCK;
+ YYPS->m_mdl_type= MDL_EXCLUSIVE;
+ }
+#line 44443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2044: /* drop: DROP VIEW_SYM opt_if_exists $@176 table_list opt_restrict */
+#line 12853 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2045: /* drop: DROP EVENT_SYM opt_if_exists sp_name */
+#line 12855 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->spname= (yyvsp[0].spname);
+ Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options));
+ }
+#line 44458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2046: /* drop: DROP TRIGGER_SYM opt_if_exists sp_name */
+#line 12860 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_TRIGGER, (yyvsp[-1].object_ddl_options));
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 44468 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2047: /* drop: DROP SERVER_SYM opt_if_exists ident_or_text */
+#line 12866 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_DROP_SERVER, (yyvsp[-1].object_ddl_options));
+ Lex->server_options.reset((yyvsp[0].lex_str));
+ }
+#line 44477 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2048: /* $@177: %empty */
+#line 12872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_SEQUENCE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
+ lex->table_type= TABLE_TYPE_SEQUENCE;
+ YYPS->m_lock_type= TL_UNLOCK;
+ YYPS->m_mdl_type= MDL_EXCLUSIVE;
+ }
+#line 44489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2049: /* drop: DROP opt_temporary SEQUENCE_SYM opt_if_exists $@177 table_list */
+#line 12880 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44495 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2053: /* table_name: table_ident */
+#line 12891 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!thd->lex->current_select_or_default()->
+ add_table_to_list(thd, (yyvsp[0].table), NULL,
+ TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type))
+ MYSQL_YYABORT;
+ }
+#line 44508 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2054: /* table_name_with_opt_use_partition: table_ident opt_use_partition */
+#line 12903 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
+ TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ NULL,
+ (yyvsp[0].string_list))))
+ MYSQL_YYABORT;
+ }
+#line 44522 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2057: /* table_alias_ref: table_ident_opt_wild */
+#line 12921 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->
+ add_table_to_list(thd, (yyvsp[0].table), NULL,
+ (TL_OPTION_UPDATING |
+ TL_OPTION_ALIAS),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 44536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2058: /* opt_if_exists_table_element: %empty */
+#line 12934 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= FALSE;
+ (yyval.num)= 0;
+ }
+#line 44545 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2059: /* opt_if_exists_table_element: IF_SYM EXISTS */
+#line 12939 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->check_exists= TRUE;
+ (yyval.num)= 1;
+ }
+#line 44554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2060: /* opt_if_exists: %empty */
+#line 12947 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
+ }
+#line 44562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2061: /* opt_if_exists: IF_SYM EXISTS */
+#line 12951 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS);
+ }
+#line 44570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2062: /* opt_temporary: %empty */
+#line 12957 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 44576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2063: /* opt_temporary: TEMPORARY */
+#line 12958 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
+#line 44582 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2064: /* $@178: %empty */
+#line 12966 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_INSERT;
+ Lex->duplicates= DUP_ERROR;
+ thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
+ thd->get_stmt_da()->reset_current_row_for_warning(1);
+ }
+#line 44593 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2065: /* $@179: %empty */
+#line 12973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_lock_for_tables((yyvsp[-3].lock_type), true, false);
+ }
+#line 44601 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2066: /* insert: INSERT $@178 insert_start insert_lock_option opt_ignore opt_into insert_table $@179 insert_field_spec opt_insert_update opt_returning stmt_end */
+#line 12978 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mark_first_table_as_inserting();
+ thd->get_stmt_da()->reset_current_row_for_warning(0);
+ }
+#line 44610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2067: /* $@180: %empty */
+#line 12986 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_REPLACE;
+ Lex->duplicates= DUP_REPLACE;
+ thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
+ thd->get_stmt_da()->reset_current_row_for_warning(1);
+ }
+#line 44621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2068: /* $@181: %empty */
+#line 12993 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->set_lock_for_tables((yyvsp[-2].lock_type), true, false);
+ }
+#line 44629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2069: /* replace: REPLACE $@180 insert_start replace_lock_option opt_into insert_table $@181 insert_field_spec opt_returning stmt_end */
+#line 12998 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mark_first_table_as_inserting();
+ thd->get_stmt_da()->reset_current_row_for_warning(0);
+ }
+#line 44638 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2070: /* insert_start: %empty */
+#line 13004 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ Lex->init_select();
+ Lex->inc_select_stack_outer_barrier();
+ Lex->current_select->parsing_place= BEFORE_OPT_LIST;
+ }
+#line 44650 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2071: /* stmt_end: %empty */
+#line 13013 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 44660 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2072: /* insert_lock_option: %empty */
+#line 13022 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ If it is SP we do not allow insert optimisation when result of
+ insert visible only after the table unlocking but everyone can
+ read table.
+ */
+ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
+ }
+#line 44673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2074: /* insert_lock_option: HIGH_PRIORITY */
+#line 13031 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE; }
+#line 44679 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2075: /* replace_lock_option: %empty */
+#line 13035 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_DEFAULT; }
+#line 44685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2077: /* insert_replace_option: LOW_PRIORITY */
+#line 13040 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
+#line 44691 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2078: /* insert_replace_option: DELAYED_SYM */
+#line 13042 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
+ Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
+ (yyval.lock_type)= TL_WRITE_DELAYED;
+ }
+#line 44701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2081: /* $@182: %empty */
+#line 13052 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->save_parsing_place= Select->parsing_place;
+ }
+#line 44709 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2082: /* insert_table: $@182 table_name_with_opt_use_partition */
+#line 13056 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ //lex->field_list.empty();
+ lex->many_values.empty();
+ lex->insert_list=0;
+ }
+#line 44720 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2083: /* insert_field_spec: insert_values */
+#line 13065 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44726 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2084: /* insert_field_spec: insert_field_list insert_values */
+#line 13066 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44732 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2085: /* $@183: %empty */
+#line 13068 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)) ||
+ unlikely(lex->many_values.push_back(lex->insert_list,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ lex->current_select->parsing_place= NO_MATTER;
+ }
+#line 44745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2087: /* insert_field_list: LEFT_PAREN_ALT opt_fields ')' */
+#line 13081 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->current_select->parsing_place= AFTER_LIST;
+ }
+#line 44753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2090: /* fields: fields ',' insert_ident */
+#line 13093 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 44759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2091: /* fields: insert_ident */
+#line 13094 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 44765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2092: /* insert_values: create_select_query_expression */
+#line 13100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2097: /* ident_eq_value: simple_ident_nospvar equal expr_or_ignore_or_default */
+#line 13115 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(lex->field_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
+ unlikely(lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 44782 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2098: /* equal: '=' */
+#line 13124 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44788 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2099: /* equal: SET_VAR */
+#line 13125 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44794 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2100: /* opt_equal: %empty */
+#line 13129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44800 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2101: /* opt_equal: equal */
+#line 13130 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2102: /* opt_with: opt_equal */
+#line 13134 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44812 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2103: /* opt_with: WITH */
+#line 13135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44818 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2104: /* opt_by: opt_equal */
+#line 13139 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44824 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2105: /* opt_by: BY */
+#line 13140 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44830 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2106: /* $@184: %empty */
+#line 13145 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
+ MYSQL_YYABORT;
+ }
+#line 44839 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2107: /* no_braces: '(' $@184 opt_values ')' */
+#line 13150 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ thd->get_stmt_da()->inc_current_row_for_warning();
+ if (unlikely(lex->many_values.push_back(lex->insert_list,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 44851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2108: /* $@185: %empty */
+#line 13161 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
+ MYSQL_YYABORT;
+ }
+#line 44860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2109: /* no_braces_with_names: '(' $@185 opt_values_with_names ')' */
+#line 13166 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ thd->get_stmt_da()->inc_current_row_for_warning();
+ if (unlikely(lex->many_values.push_back(lex->insert_list,
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 44872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2110: /* opt_values: %empty */
+#line 13176 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2112: /* opt_values_with_names: %empty */
+#line 13181 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 44884 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2114: /* values: values ',' expr_or_ignore_or_default */
+#line 13187 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 44893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2115: /* values: expr_or_ignore_or_default */
+#line 13192 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 44902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2116: /* values_with_names: values_with_names ',' remember_name expr_or_ignore_or_default remember_end */
+#line 13200 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ // give some name in case of using in table value constuctor (TVC)
+ if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
+ (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 44914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2117: /* values_with_names: remember_name expr_or_ignore_or_default remember_end */
+#line 13208 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ // give some name in case of using in table value constuctor (TVC)
+ if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
+ (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 44926 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2118: /* expr_or_ignore: expr */
+#line 13218 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item);}
+#line 44932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2119: /* expr_or_ignore: IGNORE_SYM */
+#line 13220 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_ignore_specification(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44942 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2120: /* expr_or_ignore_or_default: expr_or_ignore */
+#line 13228 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item);}
+#line 44948 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2121: /* expr_or_ignore_or_default: DEFAULT */
+#line 13230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_default_specification(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 44958 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2123: /* $@186: %empty */
+#line 13239 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->duplicates= DUP_UPDATE; }
+#line 44964 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2124: /* $@187: %empty */
+#line 13241 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
+ }
+#line 44972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2125: /* opt_insert_update: ON DUPLICATE_SYM $@186 KEY_SYM UPDATE_SYM $@187 insert_update_list */
+#line 13245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ }
+#line 44980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2126: /* update_table_list: table_ident opt_use_partition for_portion_of_time_clause opt_table_alias_clause opt_key_definition */
+#line 13253 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
+ 0,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ Select->pop_index_hints(),
+ (yyvsp[-3].string_list))))
+ MYSQL_YYABORT;
+ (yyval.table_list)->period_conditions= Lex->period_conditions;
+ }
+#line 44995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2127: /* update_table_list: join_table_list */
+#line 13263 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.table_list)= (yyvsp[0].table_list); }
+#line 45001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2128: /* $@188: %empty */
+#line 13270 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->sql_command= SQLCOM_UPDATE;
+ lex->duplicates= DUP_ERROR;
+ }
+#line 45014 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2129: /* $@189: %empty */
+#line 13280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ SELECT_LEX *slex= Lex->first_select_lex();
+ if (slex->table_list.elements > 1)
+ Lex->sql_command= SQLCOM_UPDATE_MULTI;
+ 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),
+ slex->get_table_list()->alias.str, "UPDATE");
+ MYSQL_YYABORT;
+ }
+ /*
+ In case of multi-update setting write lock for all tables may
+ be too pessimistic. We will decrease lock level if possible in
+ mysql_multi_update().
+ */
+ slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1, false);
+ }
+#line 45037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2130: /* $@190: %empty */
+#line 13299 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-1].select_order))
+ Select->order_list= *((yyvsp[-1].select_order));
+ }
+#line 45046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2131: /* update: UPDATE_SYM $@188 opt_low_priority opt_ignore update_table_list SET update_list $@189 opt_where_clause opt_order_clause delete_limit_clause $@190 stmt_end */
+#line 13302 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2134: /* update_elem: simple_ident_nospvar equal DEFAULT */
+#line 13312 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *def= new (thd->mem_root) Item_default_value(thd,
+ Lex->current_context(), (yyvsp[-2].item), 1);
+ if (!def || add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, def))
+ MYSQL_YYABORT;
+ }
+#line 45063 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2135: /* update_elem: simple_ident_nospvar equal expr_or_ignore */
+#line 13319 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (add_item_to_list(thd, (yyvsp[-2].item)) || add_value_to_list(thd, (yyvsp[0].item)))
+ MYSQL_YYABORT;
+ }
+#line 45072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2138: /* insert_update_elem: simple_ident_nospvar equal expr_or_ignore_or_default */
+#line 13332 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->update_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
+ unlikely(lex->value_list.push_back((yyvsp[0].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 45083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2139: /* opt_low_priority: %empty */
+#line 13341 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_DEFAULT; }
+#line 45089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2140: /* opt_low_priority: LOW_PRIORITY */
+#line 13342 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
+#line 45095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2141: /* $@191: %empty */
+#line 13349 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_DELETE;
+ YYPS->m_lock_type= TL_WRITE_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_WRITE;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->ignore= 0;
+ lex->first_select_lex()->order_list.empty();
+ }
+#line 45111 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2142: /* delete: DELETE_SYM $@191 delete_part2 */
+#line 13361 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 45120 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2143: /* opt_delete_system_time: %empty */
+#line 13369 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
+ }
+#line 45128 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2144: /* opt_delete_system_time: BEFORE_SYM SYSTEM_TIME_SYM history_point */
+#line 13373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->vers_conditions.init(SYSTEM_TIME_BEFORE, (yyvsp[0].vers_history_point));
+ }
+#line 45136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2145: /* delete_part2: opt_delete_options single_multi */
+#line 13379 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45142 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2146: /* delete_part2: HISTORY_SYM delete_single_table opt_delete_system_time */
+#line 13381 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->last_table()->vers_conditions= Lex->vers_conditions;
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 45153 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2147: /* delete_single_table: FROM table_ident opt_use_partition */
+#line 13391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->
+ add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type,
+ NULL,
+ (yyvsp[0].string_list))))
+ MYSQL_YYABORT;
+ YYPS->m_lock_type= TL_READ_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ }
+#line 45169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2148: /* delete_single_table_for_period: delete_single_table opt_for_portion_of_time_clause */
+#line 13406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].num))
+ Lex->last_table()->period_conditions= Lex->period_conditions;
+ }
+#line 45178 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2149: /* single_multi: delete_single_table_for_period opt_where_clause opt_order_clause delete_limit_clause opt_returning */
+#line 13418 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[-2].select_order))
+ Select->order_list= *((yyvsp[-2].select_order));
+ Lex->pop_select(); //main select
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 45190 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2150: /* $@192: %empty */
+#line 13426 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ mysql_init_multi_delete(Lex);
+ YYPS->m_lock_type= TL_READ_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ }
+#line 45200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2151: /* $@193: %empty */
+#line 13432 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
+ MYSQL_YYABORT;
+ }
+#line 45209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2152: /* single_multi: table_wild_list $@192 FROM join_table_list opt_where_clause $@193 stmt_end */
+#line 13435 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2153: /* $@194: %empty */
+#line 13437 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ mysql_init_multi_delete(Lex);
+ YYPS->m_lock_type= TL_READ_DEFAULT;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ }
+#line 45225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2154: /* $@195: %empty */
+#line 13443 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
+ MYSQL_YYABORT;
+ }
+#line 45234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2155: /* single_multi: FROM table_alias_ref_list $@194 USING join_table_list opt_where_clause $@195 stmt_end */
+#line 13446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45240 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2156: /* opt_returning: %empty */
+#line 13451 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(!Lex->has_returning());
+ }
+#line 45248 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2157: /* $@196: %empty */
+#line 13455 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(!Lex->has_returning());
+ /*
+ When parsing_place is IN_RETURNING, we push select items to
+ item_list of builtin_select instead of current_select.
+ But set parsing_place of current_select to true.
+
+ Because parsing_place for builtin_select will be IN_RETURNING,
+ regardless there is SELECT in RETURNING. Example, if
+ there is RETURNING (SELECT...), then when we parse
+ SELECT inside RETURNING, builtin_select->parsing_place
+ will still be true. So the select items of SELECT inside
+ RETURNING will be added to item_list of builtin_select which
+ is incorrect. We want to prevent this from happening.
+ Since for every new select, a new SELECT_LEX
+ object is created and pushed to select stack, current_select
+ will point to SELECT inside RETURNING, and also has
+ parsing_place not set to IN_RETURNING by default.
+ So items are correctly added to item_list of SELECT inside
+ RETURNING instead of builtin_select.
+ */
+
+ thd->lex->current_select->parsing_place= IN_RETURNING;
+ thd->lex->push_context(&thd->lex->returning()->context);
+ }
+#line 45278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2158: /* opt_returning: RETURNING_SYM $@196 select_item_list */
+#line 13481 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thd->lex->pop_context();
+ thd->lex->current_select->parsing_place= NO_MATTER;
+ }
+#line 45287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2161: /* table_wild_one: ident opt_wild */
+#line 13494 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_ident *ti= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
+ if (unlikely(ti == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(!Select->
+ add_table_to_list(thd,
+ ti,
+ NULL,
+ (TL_OPTION_UPDATING |
+ TL_OPTION_ALIAS),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 45306 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2162: /* table_wild_one: ident '.' ident opt_wild */
+#line 13509 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Table_ident *ti= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
+ if (unlikely(ti == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(!Select->
+ add_table_to_list(thd,
+ ti,
+ NULL,
+ (TL_OPTION_UPDATING |
+ TL_OPTION_ALIAS),
+ YYPS->m_lock_type,
+ YYPS->m_mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 45325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2163: /* opt_wild: %empty */
+#line 13526 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2164: /* opt_wild: '.' '*' */
+#line 13527 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2165: /* opt_delete_options: %empty */
+#line 13531 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2166: /* opt_delete_options: opt_delete_option opt_delete_options */
+#line 13532 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 45349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2167: /* opt_delete_option: QUICK */
+#line 13536 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= OPTION_QUICK; }
+#line 45355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2168: /* opt_delete_option: LOW_PRIORITY */
+#line 13537 "/home/buildbot/git/sql/sql_yacc.yy"
+ { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
+#line 45361 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2169: /* opt_delete_option: IGNORE_SYM */
+#line 13538 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1; }
+#line 45367 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2170: /* $@197: %empty */
+#line 13543 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= Lex;
+ lex->sql_command= SQLCOM_TRUNCATE;
+ lex->alter_info.reset();
+ 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;
+ }
+#line 45382 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2171: /* $@198: %empty */
+#line 13554 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX* lex= thd->lex;
+ DBUG_ASSERT(!lex->m_sql_cmd);
+ lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_truncate_table();
+ if (unlikely(lex->m_sql_cmd == NULL))
+ MYSQL_YYABORT;
+ }
+#line 45394 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2172: /* truncate: TRUNCATE_SYM $@197 opt_table_sym table_name opt_lock_wait_timeout $@198 opt_truncate_table_storage_clause */
+#line 13561 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 45400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2179: /* profile_def: CPU_SYM */
+#line 13579 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_CPU;
+ }
+#line 45408 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2180: /* profile_def: MEMORY_SYM */
+#line 13583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_MEMORY;
+ }
+#line 45416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2181: /* profile_def: BLOCK_SYM IO_SYM */
+#line 13587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_BLOCK_IO;
+ }
+#line 45424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2182: /* profile_def: CONTEXT_SYM SWITCHES_SYM */
+#line 13591 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_CONTEXT;
+ }
+#line 45432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2183: /* profile_def: PAGE_SYM FAULTS_SYM */
+#line 13595 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_PAGE_FAULTS;
+ }
+#line 45440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2184: /* profile_def: IPC_SYM */
+#line 13599 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_IPC;
+ }
+#line 45448 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2185: /* profile_def: SWAPS_SYM */
+#line 13603 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_SWAPS;
+ }
+#line 45456 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2186: /* profile_def: SOURCE_SYM */
+#line 13607 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_SOURCE;
+ }
+#line 45464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2187: /* profile_def: ALL */
+#line 13611 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_options|= PROFILE_ALL;
+ }
+#line 45472 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2188: /* opt_profile_args: %empty */
+#line 13618 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_query_id= 0;
+ }
+#line 45480 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2189: /* opt_profile_args: FOR_SYM QUERY_SYM NUM */
+#line 13622 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->profile_query_id= atoi((yyvsp[0].lex_str).str);
+ }
+#line 45488 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2190: /* $@199: %empty */
+#line 13631 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->wild=0;
+ lex->ident= null_clex_str;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->current_select->parsing_place= SELECT_LIST;
+ lex->create_info.init();
+ }
+#line 45503 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2191: /* show: SHOW $@199 show_param */
+#line 13642 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
+ }
+#line 45512 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2192: /* show_param: DATABASES wild_and_where */
+#line 13650 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_DATABASES;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)))
+ MYSQL_YYABORT;
+ }
+#line 45523 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2193: /* show_param: opt_full TABLES opt_db wild_and_where */
+#line 13657 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_TABLES;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES))
+ MYSQL_YYABORT;
+ }
+#line 45535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2194: /* show_param: opt_full TRIGGERS_SYM opt_db wild_and_where */
+#line 13665 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_TRIGGERS;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS))
+ MYSQL_YYABORT;
+ }
+#line 45547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2195: /* show_param: EVENTS_SYM opt_db wild_and_where */
+#line 13673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_EVENTS;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS))
+ MYSQL_YYABORT;
+ }
+#line 45559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2196: /* show_param: TABLE_SYM STATUS_SYM opt_db wild_and_where */
+#line 13681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_TABLES))
+ MYSQL_YYABORT;
+ }
+#line 45571 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2197: /* show_param: OPEN_SYM TABLES opt_db wild_and_where */
+#line 13689 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
+ lex->first_select_lex()->db= (yyvsp[-1].lex_str);
+ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES))
+ MYSQL_YYABORT;
+ }
+#line 45583 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2198: /* show_param: PLUGINS_SYM */
+#line 13697 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_PLUGINS;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PLUGINS)))
+ MYSQL_YYABORT;
+ }
+#line 45594 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2199: /* show_param: PLUGINS_SYM SONAME_SYM TEXT_STRING_sys */
+#line 13704 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->ident= (yyvsp[0].lex_str);
+ Lex->sql_command= SQLCOM_SHOW_PLUGINS;
+ if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
+ MYSQL_YYABORT;
+ }
+#line 45605 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2200: /* show_param: PLUGINS_SYM SONAME_SYM wild_and_where */
+#line 13711 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PLUGINS;
+ if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
+ MYSQL_YYABORT;
+ }
+#line 45615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2201: /* show_param: ENGINE_SYM known_storage_engines show_engine_param */
+#line 13717 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->create_info.db_type= (yyvsp[-1].db_type); }
+#line 45621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2202: /* show_param: ENGINE_SYM ALL show_engine_param */
+#line 13719 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->create_info.db_type= NULL; }
+#line 45627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2203: /* show_param: opt_full COLUMNS from_or_in table_ident opt_db wild_and_where */
+#line 13721 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_FIELDS;
+ if ((yyvsp[-1].lex_str).str)
+ (yyvsp[-2].table)->change_db(&(yyvsp[-1].lex_str));
+ if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)))
+ MYSQL_YYABORT;
+ }
+#line 45640 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2204: /* show_param: master_or_binary LOGS_SYM */
+#line 13730 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_BINLOGS;
+ }
+#line 45648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2205: /* show_param: SLAVE HOSTS_SYM */
+#line 13734 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
+ }
+#line 45656 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2206: /* $@200: %empty */
+#line 13738 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
+ }
+#line 45665 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2208: /* $@201: %empty */
+#line 13744 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
+ }
+#line 45674 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2209: /* show_param: RELAYLOG_SYM optional_connection_name EVENTS_SYM binlog_in binlog_from $@201 opt_global_limit_clause optional_for_channel */
+#line 13749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 45680 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2210: /* show_param: keys_or_index from_or_in table_ident opt_db opt_where_clause */
+#line 13751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_KEYS;
+ if ((yyvsp[-1].lex_str).str)
+ (yyvsp[-2].table)->change_db(&(yyvsp[-1].lex_str));
+ if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)))
+ MYSQL_YYABORT;
+ }
+#line 45693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2211: /* show_param: opt_storage ENGINES_SYM */
+#line 13760 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_ENGINES)))
+ MYSQL_YYABORT;
+ }
+#line 45704 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2212: /* show_param: AUTHORS_SYM */
+#line 13767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_AUTHORS;
+ }
+#line 45713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2213: /* show_param: CONTRIBUTORS_SYM */
+#line 13772 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
+ }
+#line 45722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2214: /* show_param: PRIVILEGES */
+#line 13777 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
+ }
+#line 45731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2215: /* show_param: COUNT_SYM '(' '*' ')' WARNINGS */
+#line 13782 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING var= {STRING_WITH_LEN("warning_count")};
+ (void) create_select_for_variable(thd, &var);
+ }
+#line 45740 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2216: /* show_param: COUNT_SYM '(' '*' ')' ERRORS */
+#line 13787 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
+ (void) create_select_for_variable(thd, &var);
+ }
+#line 45749 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2217: /* show_param: WARNINGS opt_global_limit_clause */
+#line 13792 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command = SQLCOM_SHOW_WARNS;}
+#line 45755 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2218: /* show_param: ERRORS opt_global_limit_clause */
+#line 13794 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command = SQLCOM_SHOW_ERRORS;}
+#line 45761 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2219: /* show_param: PROFILES_SYM */
+#line 13796 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command = SQLCOM_SHOW_PROFILES; }
+#line 45767 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2220: /* show_param: PROFILE_SYM opt_profile_defs opt_profile_args opt_global_limit_clause */
+#line 13798 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_PROFILE;
+ if (unlikely(prepare_schema_table(thd, lex, NULL, SCH_PROFILES)))
+ MYSQL_YYABORT;
+ }
+#line 45778 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2221: /* show_param: opt_var_type STATUS_SYM wild_and_where */
+#line 13805 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS;
+ lex->option_type= (yyvsp[-2].var_type);
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)))
+ MYSQL_YYABORT;
+ }
+#line 45790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2222: /* show_param: opt_full PROCESSLIST_SYM */
+#line 13813 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
+#line 45796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2223: /* show_param: opt_var_type VARIABLES wild_and_where */
+#line 13815 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_VARIABLES;
+ lex->option_type= (yyvsp[-2].var_type);
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)))
+ MYSQL_YYABORT;
+ }
+#line 45808 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2224: /* show_param: charset wild_and_where */
+#line 13823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_CHARSETS;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_CHARSETS)))
+ MYSQL_YYABORT;
+ }
+#line 45819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2225: /* show_param: COLLATION_SYM wild_and_where */
+#line 13830 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_COLLATIONS;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)))
+ MYSQL_YYABORT;
+ }
+#line 45830 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2226: /* show_param: GRANTS */
+#line 13837 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_GRANTS;
+ if (unlikely(!(Lex->grant_user=
+ (LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ Lex->grant_user->user= current_user_and_current_role;
+ }
+#line 45842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2227: /* show_param: GRANTS FOR_SYM user_or_role clear_privileges */
+#line 13845 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_GRANTS;
+ lex->grant_user=(yyvsp[-1].lex_user);
+ }
+#line 45852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2228: /* show_param: CREATE DATABASE opt_if_not_exists ident */
+#line 13851 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->set_command(SQLCOM_SHOW_CREATE_DB, (yyvsp[-1].object_ddl_options));
+ Lex->name= (yyvsp[0].ident_sys);
+ }
+#line 45861 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2229: /* show_param: CREATE TABLE_SYM table_ident */
+#line 13856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL,0))
+ MYSQL_YYABORT;
+ lex->create_info.storage_media= HA_SM_DEFAULT;
+ }
+#line 45873 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2230: /* show_param: CREATE VIEW_SYM table_ident */
+#line 13864 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL, 0))
+ MYSQL_YYABORT;
+ lex->table_type= TABLE_TYPE_VIEW;
+ }
+#line 45885 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2231: /* show_param: CREATE SEQUENCE_SYM table_ident */
+#line 13872 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE;
+ if (!lex->first_select_lex()->add_table_to_list(thd, (yyvsp[0].table), NULL, 0))
+ MYSQL_YYABORT;
+ lex->table_type= TABLE_TYPE_SEQUENCE;
+ }
+#line 45897 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2232: /* show_param: BINLOG_SYM STATUS_SYM */
+#line 13880 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
+ }
+#line 45905 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2233: /* show_param: MASTER_SYM STATUS_SYM */
+#line 13884 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_SHOW_BINLOG_STAT;
+ }
+#line 45913 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2234: /* show_param: ALL SLAVES STATUS_SYM */
+#line 13888 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_show_slave_status(true)))
+ MYSQL_YYABORT;
+ Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
+ }
+#line 45924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2235: /* show_param: SLAVE optional_connection_name STATUS_SYM optional_for_channel */
+#line 13895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(Lex->m_sql_cmd= new (thd->mem_root)
+ Sql_cmd_show_slave_status()))
+ MYSQL_YYABORT;
+ Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
+ }
+#line 45935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2236: /* show_param: CREATE PROCEDURE_SYM sp_name */
+#line 13902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ lex->sql_command = SQLCOM_SHOW_CREATE_PROC;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2237: /* show_param: CREATE FUNCTION_SYM sp_name */
+#line 13909 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ lex->sql_command = SQLCOM_SHOW_CREATE_FUNC;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45957 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2238: /* show_param: CREATE PACKAGE_MARIADB_SYM sp_name */
+#line 13916 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2239: /* show_param: CREATE PACKAGE_ORACLE_SYM sp_name */
+#line 13922 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2240: /* show_param: CREATE PACKAGE_MARIADB_SYM BODY_MARIADB_SYM sp_name */
+#line 13928 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45987 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2241: /* show_param: CREATE PACKAGE_ORACLE_SYM BODY_ORACLE_SYM sp_name */
+#line 13934 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 45997 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2242: /* show_param: CREATE TRIGGER_SYM sp_name */
+#line 13940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 46007 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2243: /* show_param: CREATE USER_SYM */
+#line 13946 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
+ if (unlikely(!(Lex->grant_user=
+ (LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ Lex->grant_user->user= current_user;
+ }
+#line 46019 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2244: /* show_param: CREATE USER_SYM user */
+#line 13954 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
+ Lex->grant_user= (yyvsp[0].lex_user);
+ }
+#line 46028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2245: /* show_param: PROCEDURE_SYM STATUS_SYM wild_and_where */
+#line 13959 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46039 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2246: /* show_param: FUNCTION_SYM STATUS_SYM wild_and_where */
+#line 13966 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2247: /* show_param: PACKAGE_MARIADB_SYM STATUS_SYM wild_and_where */
+#line 13973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46061 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2248: /* show_param: PACKAGE_ORACLE_SYM STATUS_SYM wild_and_where */
+#line 13980 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46072 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2249: /* show_param: PACKAGE_MARIADB_SYM BODY_MARIADB_SYM STATUS_SYM wild_and_where */
+#line 13987 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2250: /* show_param: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM STATUS_SYM wild_and_where */
+#line 13994 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
+ if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
+ MYSQL_YYABORT;
+ }
+#line 46094 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2251: /* show_param: PROCEDURE_SYM CODE_SYM sp_name */
+#line 14001 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2252: /* show_param: FUNCTION_SYM CODE_SYM sp_name */
+#line 14006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46112 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2253: /* show_param: PACKAGE_MARIADB_SYM BODY_MARIADB_SYM CODE_SYM sp_name */
+#line 14011 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46121 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2254: /* show_param: PACKAGE_ORACLE_SYM BODY_ORACLE_SYM CODE_SYM sp_name */
+#line 14016 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
+ Lex->spname= (yyvsp[0].spname);
+ }
+#line 46130 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2255: /* show_param: CREATE EVENT_SYM sp_name */
+#line 14021 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->spname= (yyvsp[0].spname);
+ Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
+ }
+#line 46139 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2256: /* show_param: describe_command opt_format_json FOR_SYM expr */
+#line 14030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
+ if (unlikely(prepare_schema_table(thd, Lex, 0,
+ Lex->explain_json ? SCH_EXPLAIN_JSON : SCH_EXPLAIN_TABULAR)))
+ MYSQL_YYABORT;
+ add_value_to_list(thd, (yyvsp[0].item));
+ }
+#line 46151 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2257: /* show_param: ANALYZE_SYM opt_format_json FOR_SYM expr */
+#line 14038 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_SHOW_ANALYZE;
+ if (unlikely(prepare_schema_table(thd, Lex, 0,
+ Lex->explain_json ? SCH_ANALYZE_JSON : SCH_ANALYZE_TABULAR)))
+ MYSQL_YYABORT;
+ add_value_to_list(thd, (yyvsp[0].item));
+ }
+#line 46163 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2258: /* show_param: IDENT_sys remember_tok_start wild_and_where */
+#line 14046 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ bool in_plugin;
+ lex->sql_command= SQLCOM_SHOW_GENERIC;
+ ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-2].ident_sys), &in_plugin);
+ if (unlikely(!table || !table->old_format || !in_plugin))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-1].simple_string));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(lex->wild && table->idx_field1 < 0))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].simple_string));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(make_schema_select(thd, Lex->current_select, table)))
+ MYSQL_YYABORT;
+ }
+#line 46186 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2259: /* show_engine_param: STATUS_SYM */
+#line 14068 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
+#line 46192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2260: /* show_engine_param: MUTEX_SYM */
+#line 14070 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
+#line 46198 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2261: /* show_engine_param: LOGS_SYM */
+#line 14072 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
+#line 46204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2266: /* opt_db: %empty */
+#line 14086 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 46210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2267: /* opt_db: from_or_in ident */
+#line 14087 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 46216 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2268: /* opt_full: %empty */
+#line 14091 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->verbose=0; }
+#line 46222 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2269: /* opt_full: FULL */
+#line 14092 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->verbose=1; }
+#line 46228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2272: /* binlog_in: %empty */
+#line 14101 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.log_file_name = 0; }
+#line 46234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2273: /* binlog_in: IN_SYM TEXT_STRING_sys */
+#line 14102 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.log_file_name = (yyvsp[0].lex_str).str; }
+#line 46240 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2274: /* binlog_from: %empty */
+#line 14106 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.pos = 4; /* skip magic number */ }
+#line 46246 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2275: /* binlog_from: FROM ulonglong_num */
+#line 14107 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->mi.pos = (yyvsp[0].ulonglong_number); }
+#line 46252 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2276: /* wild_and_where: %empty */
+#line 14111 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.simple_string)= 0; }
+#line 46258 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2277: /* wild_and_where: LIKE remember_tok_start TEXT_STRING_sys */
+#line 14113 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length,
+ system_charset_info);
+ if (unlikely(Lex->wild == NULL))
+ MYSQL_YYABORT;
+ (yyval.simple_string)= (yyvsp[-1].simple_string);
+ }
+#line 46271 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2278: /* wild_and_where: WHERE remember_tok_start expr */
+#line 14122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->where= normalize_cond(thd, (yyvsp[0].item));
+ if ((yyvsp[0].item))
+ (yyvsp[0].item)->top_level_item();
+ (yyval.simple_string)= (yyvsp[-1].simple_string);
+ }
+#line 46282 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2279: /* $@202: %empty */
+#line 14133 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->current_select->parsing_place= SELECT_LIST;
+ lex->sql_command= SQLCOM_SHOW_FIELDS;
+ lex->first_select_lex()->db= null_clex_str;
+ lex->verbose= 0;
+ if (unlikely(prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)))
+ MYSQL_YYABORT;
+ }
+#line 46299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2280: /* describe: describe_command table_ident $@202 opt_describe_column */
+#line 14146 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
+ }
+#line 46308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2281: /* $@203: %empty */
+#line 14151 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_NORMAL; }
+#line 46314 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2282: /* describe: describe_command opt_extended_describe $@203 explainable_command */
+#line 14153 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->first_select_lex()->options|= SELECT_DESCRIBE;
+ }
+#line 46323 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2291: /* analyze_stmt_command: ANALYZE_SYM opt_format_json explainable_command */
+#line 14175 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->analyze_stmt= true;
+ }
+#line 46331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2292: /* opt_extended_describe: EXTENDED_SYM */
+#line 14181 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_EXTENDED; }
+#line 46337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2293: /* opt_extended_describe: EXTENDED_SYM ALL */
+#line 14183 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_EXTENDED | DESCRIBE_EXTENDED2; }
+#line 46343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2294: /* opt_extended_describe: PARTITIONS_SYM */
+#line 14184 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->describe|= DESCRIBE_PARTITIONS; }
+#line 46349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2295: /* opt_extended_describe: opt_format_json */
+#line 14185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2296: /* opt_format_json: %empty */
+#line 14189 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46361 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2297: /* opt_format_json: FORMAT_SYM '=' ident_or_text */
+#line 14191 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("JSON")))
+ Lex->explain_json= true;
+ else if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("TRADITIONAL")))
+ DBUG_ASSERT(Lex->explain_json==false);
+ else
+ my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0),
+ "EXPLAIN/ANALYZE", (yyvsp[0].lex_str).str));
+ }
+#line 46375 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2298: /* opt_describe_column: %empty */
+#line 14203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46381 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2299: /* opt_describe_column: text_string */
+#line 14204 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->wild= (yyvsp[0].string); }
+#line 46387 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2300: /* opt_describe_column: ident */
+#line 14206 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
+ (yyvsp[0].ident_sys).length,
+ system_charset_info);
+ if (unlikely(Lex->wild == NULL))
+ MYSQL_YYABORT;
+ }
+#line 46399 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2301: /* explain_for_connection: describe_command opt_format_json FOR_SYM CONNECTION_SYM expr */
+#line 14222 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->wild=0;
+ lex->ident= null_clex_str;
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ lex->current_select->parsing_place= SELECT_LIST;
+ lex->create_info.init();
+ Select->parsing_place= NO_MATTER;
+ Lex->pop_select(); //main select
+ Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
+ if (unlikely(prepare_schema_table(thd, Lex, 0,
+ Lex->explain_json ? SCH_EXPLAIN_JSON : SCH_EXPLAIN_TABULAR)))
+ MYSQL_YYABORT;
+ add_value_to_list(thd, (yyvsp[0].item));
+ }
+#line 46421 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2302: /* $@204: %empty */
+#line 14245 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_FLUSH;
+ lex->type= 0;
+ lex->no_write_to_binlog= (yyvsp[0].num);
+ }
+#line 46432 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2303: /* flush: FLUSH_SYM opt_no_write_to_binlog $@204 flush_options */
+#line 14251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46438 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2304: /* $@205: %empty */
+#line 14256 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_TABLES;
+ /*
+ Set type of metadata and table locks for
+ FLUSH TABLES table_list [WITH READ LOCK].
+ */
+ YYPS->m_lock_type= TL_READ_NO_INSERT;
+ YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO;
+ }
+#line 46452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2305: /* flush_options: table_or_tables $@205 opt_table_list opt_flush_lock */
+#line 14266 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46458 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2306: /* flush_options: flush_options_list */
+#line 14268 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2307: /* opt_flush_lock: %empty */
+#line 14272 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2308: /* opt_flush_lock: flush_lock */
+#line 14274 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ TABLE_LIST *tables= Lex->query_tables;
+ for (; tables; tables= tables->next_global)
+ {
+ tables->mdl_request.set_type(MDL_SHARED_NO_WRITE);
+ /* Ignore temporary tables. */
+ tables->open_type= OT_BASE_ONLY;
+ }
+ }
+#line 46484 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2309: /* flush_lock: WITH READ_SYM LOCK_SYM optional_flush_tables_arguments */
+#line 14287 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); }
+#line 46490 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2310: /* $@206: %empty */
+#line 14289 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->query_tables == NULL))
+ {
+ // Table list can't be empty
+ thd->parse_error(ER_NO_TABLES_USED);
+ MYSQL_YYABORT;
+ }
+ Lex->type|= REFRESH_FOR_EXPORT;
+ }
+#line 46504 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2311: /* flush_lock: FOR_SYM $@206 EXPORT_SYM */
+#line 14297 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46510 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2313: /* flush_options_list: flush_option */
+#line 14303 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46516 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2314: /* flush_option: ERROR_SYM LOGS_SYM */
+#line 14308 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_ERROR_LOG; }
+#line 46522 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2315: /* flush_option: ENGINE_SYM LOGS_SYM */
+#line 14310 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_ENGINE_LOG; }
+#line 46528 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2316: /* flush_option: GENERAL LOGS_SYM */
+#line 14312 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_GENERAL_LOG; }
+#line 46534 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2317: /* flush_option: SLOW LOGS_SYM */
+#line 14314 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_SLOW_LOG; }
+#line 46540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2318: /* flush_option: BINARY LOGS_SYM opt_delete_gtid_domain */
+#line 14316 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_BINARY_LOG; }
+#line 46546 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2319: /* flush_option: RELAY LOGS_SYM optional_connection_name optional_for_channel */
+#line 14318 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->type & REFRESH_RELAY_LOG))
+ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH", "RELAY LOGS"));
+ lex->type|= REFRESH_RELAY_LOG;
+ lex->relay_log_connection_name= lex->mi.connection_name;
+ }
+#line 46558 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2320: /* flush_option: QUERY_SYM CACHE_SYM */
+#line 14326 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_QUERY_CACHE_FREE; }
+#line 46564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2321: /* flush_option: HOSTS_SYM */
+#line 14328 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_HOSTS; }
+#line 46570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2322: /* flush_option: PRIVILEGES */
+#line 14330 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_GRANT; }
+#line 46576 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2323: /* flush_option: LOGS_SYM */
+#line 14332 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_LOG;
+ Lex->relay_log_connection_name= empty_clex_str;
+ }
+#line 46585 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2324: /* flush_option: STATUS_SYM */
+#line 14337 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_STATUS; }
+#line 46591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2325: /* flush_option: SLAVE optional_connection_name */
+#line 14339 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->type & REFRESH_SLAVE))
+ my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH","SLAVE"));
+ lex->type|= REFRESH_SLAVE;
+ lex->reset_slave_info.all= false;
+ }
+#line 46603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2326: /* flush_option: MASTER_SYM */
+#line 14347 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_MASTER; }
+#line 46609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2327: /* flush_option: DES_KEY_FILE */
+#line 14349 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_DES_KEY_FILE; }
+#line 46615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2328: /* flush_option: RESOURCES */
+#line 14351 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_USER_RESOURCES; }
+#line 46621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2329: /* flush_option: SSL_SYM */
+#line 14353 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_SSL;}
+#line 46627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2330: /* flush_option: THREADS_SYM */
+#line 14355 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_THREADS;}
+#line 46633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2331: /* flush_option: IDENT_sys remember_tok_start */
+#line 14357 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_GENERIC;
+ ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-1].ident_sys));
+ if (unlikely(!table || !table->reset_table))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].simple_string));
+ MYSQL_YYABORT;
+ }
+ if (unlikely(Lex->view_list.push_back((LEX_CSTRING*)
+ thd->memdup(&(yyvsp[-1].ident_sys), sizeof(LEX_CSTRING)),
+ thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 46651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2332: /* opt_table_list: %empty */
+#line 14373 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2333: /* opt_table_list: table_list */
+#line 14374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46663 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2334: /* backup: BACKUP_SYM backup_statements */
+#line 14378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2335: /* backup_statements: STAGE_SYM ident */
+#line 14383 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int type;
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP STAGE"));
+ if ((type= find_type((yyvsp[0].ident_sys).str, &backup_stage_names,
+ FIND_TYPE_NO_PREFIX)) <= 0)
+ my_yyabort_error((ER_BACKUP_UNKNOWN_STAGE, MYF(0), (yyvsp[0].ident_sys).str));
+ Lex->sql_command= SQLCOM_BACKUP;
+ Lex->backup_stage= (backup_stages) (type-1);
+ break;
+ }
+#line 46685 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2336: /* $@207: %empty */
+#line 14395 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "BACKUP LOCK"));
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 46696 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2337: /* backup_statements: LOCK_SYM $@207 table_ident */
+#line 14402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[0].table), NULL, 0,
+ TL_READ, MDL_SHARED_HIGH_PRIO)))
+ MYSQL_YYABORT;
+ Lex->sql_command= SQLCOM_BACKUP_LOCK;
+ Lex->pop_select(); //main select
+ }
+#line 46708 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2338: /* backup_statements: UNLOCK_SYM */
+#line 14410 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ 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;
+ }
+#line 46719 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2339: /* opt_delete_gtid_domain: %empty */
+#line 14419 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46725 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2340: /* opt_delete_gtid_domain: DELETE_DOMAIN_ID_SYM '=' '(' delete_domain_id_list ')' */
+#line 14421 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2344: /* delete_domain_id: ulonglong_num */
+#line 14431 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ uint32 value= (uint32) (yyvsp[0].ulonglong_number);
+ if ((yyvsp[0].ulonglong_number) > UINT_MAX32)
+ {
+ my_printf_error(ER_BINLOG_CANT_DELETE_GTID_DOMAIN,
+ "The value of gtid domain being deleted ('%llu') "
+ "exceeds its maximum size "
+ "of 32 bit unsigned integer", MYF(0), (yyvsp[0].ulonglong_number));
+ MYSQL_YYABORT;
+ }
+ insert_dynamic(&Lex->delete_gtid_domain, (uchar*) &value);
+ }
+#line 46748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2345: /* optional_flush_tables_arguments: %empty */
+#line 14446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num)= 0;}
+#line 46754 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2346: /* optional_flush_tables_arguments: AND_SYM DISABLE_SYM CHECKPOINT_SYM */
+#line 14447 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.num)= REFRESH_CHECKPOINT; }
+#line 46760 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2347: /* $@208: %empty */
+#line 14452 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_RESET; lex->type=0;
+ }
+#line 46769 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2348: /* reset: RESET_SYM $@208 reset_options */
+#line 14457 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2351: /* $@209: %empty */
+#line 14466 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_SLAVE; }
+#line 46781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2352: /* reset_option: SLAVE $@209 optional_connection_name slave_reset_options optional_for_channel */
+#line 14469 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 46787 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2353: /* $@210: %empty */
+#line 14471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->type|= REFRESH_MASTER;
+ Lex->next_binlog_file_number= 0;
+ }
+#line 46796 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2355: /* reset_option: QUERY_SYM CACHE_SYM */
+#line 14476 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->type|= REFRESH_QUERY_CACHE;}
+#line 46802 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2356: /* slave_reset_options: %empty */
+#line 14480 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->reset_slave_info.all= false; }
+#line 46808 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2357: /* slave_reset_options: ALL */
+#line 14481 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->reset_slave_info.all= true; }
+#line 46814 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2358: /* master_reset_options: %empty */
+#line 14485 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46820 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2359: /* master_reset_options: TO_SYM ulong_num */
+#line 14487 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->next_binlog_file_number = (yyvsp[0].ulong_num);
+ }
+#line 46828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2360: /* purge: PURGE master_or_binary LOGS_SYM TO_SYM TEXT_STRING_sys */
+#line 14494 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_purge_to((yyvsp[0].lex_str));
+ }
+#line 46836 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2361: /* $@211: %empty */
+#line 14498 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->clause_that_disallows_subselect= "PURGE..BEFORE"; }
+#line 46842 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2362: /* purge: PURGE master_or_binary LOGS_SYM BEFORE_SYM $@211 expr */
+#line 14500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->clause_that_disallows_subselect= NULL;
+ if (Lex->stmt_purge_before((yyvsp[0].item)))
+ MYSQL_YYABORT;
+ }
+#line 46852 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2363: /* $@212: %empty */
+#line 14512 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->value_list.empty();
+ lex->users_list.empty();
+ lex->sql_command= SQLCOM_KILL;
+ lex->kill_type= KILL_TYPE_ID;
+ }
+#line 46864 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2364: /* kill: KILL_SYM $@212 kill_type kill_option */
+#line 14520 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->kill_signal= (killed_state) ((yyvsp[-1].num) | (yyvsp[0].num));
+ }
+#line 46872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2365: /* kill_type: %empty */
+#line 14526 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_HARD_BIT; }
+#line 46878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2366: /* kill_type: HARD_SYM */
+#line 14527 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_HARD_BIT; }
+#line 46884 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2367: /* kill_type: SOFT_SYM */
+#line 14528 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 46890 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2368: /* kill_option: opt_connection kill_expr */
+#line 14532 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_CONNECTION; }
+#line 46896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2369: /* kill_option: QUERY_SYM kill_expr */
+#line 14533 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (int) KILL_QUERY; }
+#line 46902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2370: /* kill_option: QUERY_SYM ID_SYM expr */
+#line 14535 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (int) KILL_QUERY;
+ Lex->kill_type= KILL_TYPE_QUERY;
+ Lex->value_list.push_front((yyvsp[0].item), thd->mem_root);
+ }
+#line 46912 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2371: /* opt_connection: %empty */
+#line 14543 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 46918 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2372: /* opt_connection: CONNECTION_SYM */
+#line 14544 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 46924 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2373: /* kill_expr: expr */
+#line 14549 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->value_list.push_front((yyval.item), thd->mem_root);
+ }
+#line 46932 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2374: /* kill_expr: USER_SYM user */
+#line 14553 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root);
+ Lex->kill_type= KILL_TYPE_USER;
+ }
+#line 46941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2375: /* $@213: %empty */
+#line 14560 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sql_command= SQLCOM_SHUTDOWN; }
+#line 46947 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2376: /* shutdown: SHUTDOWN $@213 shutdown_option */
+#line 14561 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 46953 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2377: /* shutdown_option: %empty */
+#line 14565 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->is_shutdown_wait_for_slaves= false; }
+#line 46959 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2378: /* shutdown_option: WAIT_SYM FOR_SYM ALL SLAVES */
+#line 14567 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->is_shutdown_wait_for_slaves= true;
+ }
+#line 46967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2379: /* use: USE_SYM ident */
+#line 14576 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command=SQLCOM_CHANGE_DB;
+ lex->first_select_lex()->db= (yyvsp[0].ident_sys);
+ }
+#line 46977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2380: /* $@214: %empty */
+#line 14587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+
+ if (unlikely(lex->sphead))
+ {
+ my_error(ER_SP_BADSTATEMENT, MYF(0),
+ (yyvsp[0].filetype) == FILETYPE_CSV ? "LOAD DATA" : "LOAD XML");
+ MYSQL_YYABORT;
+ }
+ if (lex->main_select_push())
+ MYSQL_YYABORT;
+ lex->init_select();
+ }
+#line 46995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2381: /* $@215: %empty */
+#line 14601 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_LOAD;
+ lex->local_file= (yyvsp[-2].num);
+ lex->duplicates= DUP_ERROR;
+ lex->ignore= 0;
+ if (unlikely(!(lex->exchange= new (thd->mem_root)
+ sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))))
+ MYSQL_YYABORT;
+ }
+#line 47010 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2382: /* $@216: %empty */
+#line 14612 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
+ TL_OPTION_UPDATING,
+ (yyvsp[-9].lock_type), MDL_SHARED_WRITE,
+ NULL, (yyvsp[0].string_list))))
+ MYSQL_YYABORT;
+ lex->field_list.empty();
+ lex->update_list.empty();
+ lex->value_list.empty();
+ lex->many_values.empty();
+ }
+#line 47027 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2383: /* $@217: %empty */
+#line 14625 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->exchange->cs= (yyvsp[0].charset); }
+#line 47033 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2384: /* load: LOAD data_or_xml $@214 load_data_lock opt_local INFILE TEXT_STRING_filesystem $@215 opt_duplicate INTO TABLE_SYM table_ident opt_use_partition $@216 opt_load_data_charset $@217 opt_xml_rows_identified_by opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec opt_load_data_set_spec stmt_end */
+#line 14630 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->mark_first_table_as_inserting();
+ }
+#line 47041 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2385: /* data_or_xml: DATA_SYM */
+#line 14636 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.filetype)= FILETYPE_CSV; }
+#line 47047 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2386: /* data_or_xml: XML_SYM */
+#line 14637 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.filetype)= FILETYPE_XML; }
+#line 47053 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2387: /* opt_local: %empty */
+#line 14641 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=0;}
+#line 47059 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2388: /* opt_local: LOCAL_SYM */
+#line 14642 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=1;}
+#line 47065 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2389: /* load_data_lock: %empty */
+#line 14646 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_DEFAULT; }
+#line 47071 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2390: /* load_data_lock: CONCURRENT */
+#line 14648 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ Ignore this option in SP to avoid problem with query cache and
+ triggers with non default priority locks
+ */
+ (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
+ }
+#line 47083 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2391: /* load_data_lock: LOW_PRIORITY */
+#line 14655 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
+#line 47089 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2392: /* opt_duplicate: %empty */
+#line 14659 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->duplicates=DUP_ERROR; }
+#line 47095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2393: /* opt_duplicate: REPLACE */
+#line 14660 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->duplicates=DUP_REPLACE; }
+#line 47101 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2394: /* opt_duplicate: IGNORE_SYM */
+#line 14661 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ignore= 1; }
+#line 47107 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2399: /* field_term: TERMINATED BY text_string */
+#line 14676 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->field_term= (yyvsp[0].string);
+ }
+#line 47116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2400: /* field_term: OPTIONALLY ENCLOSED BY text_string */
+#line 14681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ DBUG_ASSERT(lex->exchange != 0);
+ lex->exchange->enclosed= (yyvsp[0].string);
+ lex->exchange->opt_enclosed= 1;
+ }
+#line 47127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2401: /* field_term: ENCLOSED BY text_string */
+#line 14688 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->enclosed= (yyvsp[0].string);
+ }
+#line 47136 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2402: /* field_term: ESCAPED BY text_string */
+#line 14693 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->escaped= (yyvsp[0].string);
+ }
+#line 47145 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2407: /* line_term: TERMINATED BY text_string */
+#line 14711 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->line_term= (yyvsp[0].string);
+ }
+#line 47154 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2408: /* line_term: STARTING BY text_string */
+#line 14716 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->line_start= (yyvsp[0].string);
+ }
+#line 47163 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2409: /* opt_xml_rows_identified_by: %empty */
+#line 14723 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47169 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2410: /* opt_xml_rows_identified_by: ROWS_SYM IDENTIFIED_SYM BY text_string */
+#line 14725 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->exchange->line_term = (yyvsp[0].string); }
+#line 47175 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2412: /* opt_ignore_lines: IGNORE_SYM NUM lines_or_rows */
+#line 14731 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT(Lex->exchange != 0);
+ Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str);
+ }
+#line 47184 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2413: /* lines_or_rows: LINES */
+#line 14738 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47190 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2414: /* lines_or_rows: ROWS_SYM */
+#line 14739 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 47196 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2415: /* opt_field_or_var_spec: %empty */
+#line 14743 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47202 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2416: /* opt_field_or_var_spec: '(' fields_or_vars ')' */
+#line 14744 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47208 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2417: /* opt_field_or_var_spec: '(' ')' */
+#line 14745 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47214 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2418: /* fields_or_vars: fields_or_vars ',' field_or_var */
+#line 14750 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 47220 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2419: /* fields_or_vars: field_or_var */
+#line 14752 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
+#line 47226 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2420: /* field_or_var: simple_ident_nospvar */
+#line 14756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {(yyval.item)= (yyvsp[0].item);}
+#line 47232 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2421: /* field_or_var: '@' ident_or_text */
+#line 14758 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[0].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+
+ (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, &(yyvsp[0].lex_str));
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47248 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2422: /* opt_load_data_set_spec: %empty */
+#line 14772 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47254 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2423: /* opt_load_data_set_spec: SET load_data_set_list */
+#line 14773 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 47260 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2426: /* load_data_set_elem: simple_ident_nospvar equal remember_name expr_or_ignore_or_default remember_end */
+#line 14783 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->update_list.push_back((yyvsp[-4].item), thd->mem_root)) ||
+ unlikely(lex->value_list.push_back((yyvsp[-1].item), thd->mem_root)))
+ MYSQL_YYABORT;
+ (yyvsp[-1].item)->set_name_no_truncate(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
+ }
+#line 47272 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2427: /* text_literal: TEXT_STRING */
+#line 14796 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal((yyvsp[0].lex_string_with_metadata)))))
+ MYSQL_YYABORT;
+ }
+#line 47281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2428: /* text_literal: NCHAR_STRING */
+#line 14801 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_nchar((yyvsp[0].lex_string_with_metadata)))))
+ MYSQL_YYABORT;
+ }
+#line 47290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2429: /* text_literal: UNDERSCORE_CHARSET TEXT_STRING */
+#line 14806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_charset((yyvsp[0].lex_string_with_metadata), (yyvsp[-1].charset)))))
+ MYSQL_YYABORT;
+ }
+#line 47299 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2430: /* text_literal: text_literal TEXT_STRING_literal */
+#line 14811 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_basic_constant)= (yyvsp[-1].item_basic_constant)->make_string_literal_concat(thd, &(yyvsp[0].lex_str)))))
+ MYSQL_YYABORT;
+ }
+#line 47308 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2431: /* text_string: TEXT_STRING_literal */
+#line 14819 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.string)= new (thd->mem_root) String((const char*) (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length,
+ thd->variables.collation_connection);
+ if (unlikely((yyval.string) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2432: /* text_string: hex_or_bin_String */
+#line 14826 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.string)= (yyvsp[0].string); }
+#line 47326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2433: /* hex_or_bin_String: HEX_NUM */
+#line 14832 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length);
+ if (unlikely(tmp == NULL))
+ MYSQL_YYABORT;
+ (yyval.string)= tmp->val_str((String*) 0);
+ }
+#line 47338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2434: /* hex_or_bin_String: HEX_STRING */
+#line 14840 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length);
+ if (unlikely(tmp == NULL))
+ MYSQL_YYABORT;
+ (yyval.string)= tmp->val_str((String*) 0);
+ }
+#line 47350 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2435: /* hex_or_bin_String: BIN_NUM */
+#line 14848 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str,
+ (yyvsp[0].lex_str).length);
+ if (unlikely(tmp == NULL))
+ MYSQL_YYABORT;
+ /*
+ it is OK only emulate fix_fields, because we need only
+ value of constant
+ */
+ (yyval.string)= tmp->val_str((String*) 0);
+ }
+#line 47366 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2436: /* param_marker: PARAM_MARKER */
+#line 14863 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &param_clex_str,
+ YYLIP->get_tok_start(),
+ YYLIP->get_tok_start() + 1))))
+ MYSQL_YYABORT;
+ }
+#line 47377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2437: /* param_marker: COLON_ORACLE_SYM ident_cli */
+#line 14870 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
+ (yyvsp[-1].kwd).pos(), (yyvsp[0].ident_cli).end()))))
+ MYSQL_YYABORT;
+ }
+#line 47387 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2438: /* param_marker: COLON_ORACLE_SYM NUM */
+#line 14876 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
+ (yyvsp[-1].kwd).pos(),
+ YYLIP->get_ptr()))))
+ MYSQL_YYABORT;
+ }
+#line 47398 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2439: /* signed_literal: '+' NUM_literal */
+#line 14885 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item_num); }
+#line 47404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2440: /* signed_literal: '-' NUM_literal */
+#line 14887 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[0].item_num)->max_length++;
+ (yyval.item)= (yyvsp[0].item_num)->neg(thd);
+ }
+#line 47413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2441: /* literal: text_literal */
+#line 14894 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item_basic_constant); }
+#line 47419 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2442: /* literal: NUM_literal */
+#line 14895 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item_num); }
+#line 47425 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2443: /* literal: temporal_literal */
+#line 14896 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)= (yyvsp[0].item); }
+#line 47431 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2444: /* literal: NULL_SYM */
+#line 14898 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ For the digest computation, in this context only,
+ NULL is considered a literal, hence reduced to '?'
+ REDUCE:
+ TOK_GENERIC_VALUE := NULL_SYM
+ */
+ YYLIP->reduce_digest_token(TOK_GENERIC_VALUE, NULL_SYM);
+ (yyval.item)= new (thd->mem_root) Item_null(thd);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
+ }
+#line 47449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2445: /* literal: FALSE_SYM */
+#line 14912 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "FALSE",0);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47459 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2446: /* literal: TRUE_SYM */
+#line 14918 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "TRUE",1);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47469 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2447: /* literal: HEX_NUM */
+#line 14924 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2448: /* literal: HEX_STRING */
+#line 14930 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2449: /* literal: BIN_NUM */
+#line 14936 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2450: /* literal: UNDERSCORE_CHARSET hex_or_bin_String */
+#line 14942 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Item_string_with_introducer *item_str;
+ LEX_CSTRING tmp;
+ (yyvsp[0].string)->get_value(&tmp);
+ /*
+ Pass NULL as name. Name will be set in the "select_item" rule and
+ will include the introducer and the original hex/bin notation.
+ */
+ item_str= new (thd->mem_root)
+ Item_string_with_introducer(thd, null_clex_str,
+ tmp, (yyvsp[-1].charset));
+ if (unlikely(!item_str ||
+ !item_str->check_well_formed_result(true)))
+ MYSQL_YYABORT;
+
+ (yyval.item)= item_str;
+ }
+#line 47521 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2451: /* NUM_literal: NUM */
+#line 14963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int error;
+ (yyval.item_num)= new (thd->mem_root)
+ Item_int(thd, (yyvsp[0].lex_str).str,
+ (longlong) my_strtoll10((yyvsp[0].lex_str).str, NULL, &error),
+ (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47535 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2452: /* NUM_literal: LONG_NUM */
+#line 14973 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ int error;
+ (yyval.item_num)= new (thd->mem_root)
+ Item_int(thd, (yyvsp[0].lex_str).str,
+ (longlong) my_strtoll10((yyvsp[0].lex_str).str, NULL, &error),
+ (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2453: /* NUM_literal: ULONGLONG_NUM */
+#line 14983 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_num)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47559 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2454: /* NUM_literal: DECIMAL_NUM */
+#line 14989 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_num)= new (thd->mem_root) Item_decimal(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length,
+ thd->charset());
+ if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
+ MYSQL_YYABORT;
+ }
+#line 47570 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2455: /* NUM_literal: FLOAT_NUM */
+#line 14996 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item_num)= new (thd->mem_root) Item_float(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
+ MYSQL_YYABORT;
+ }
+#line 47580 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2456: /* temporal_literal: DATE_SYM TEXT_STRING */
+#line 15006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= type_handler_newdate.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true))))
+ MYSQL_YYABORT;
+ }
+#line 47591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2457: /* temporal_literal: TIME_SYM TEXT_STRING */
+#line 15013 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= type_handler_time2.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true))))
+ MYSQL_YYABORT;
+ }
+#line 47602 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2458: /* temporal_literal: TIMESTAMP TEXT_STRING */
+#line 15020 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= type_handler_datetime.create_literal_item(thd,
+ (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
+ YYCSCL, true))))
+ MYSQL_YYABORT;
+ }
+#line 47613 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2459: /* $@218: %empty */
+#line 15030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ With_clause *with_clause=
+ new With_clause((yyvsp[0].num), 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;
+ with_clause->add_to_list(&lex->with_clauses_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;
+ }
+#line 47633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2460: /* with_clause: WITH opt_recursive $@218 with_list */
+#line 15046 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.with_clause)= Lex->curr_with_clause;
+ Lex->curr_with_clause= Lex->curr_with_clause->pop();
+ }
+#line 47642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2461: /* opt_recursive: %empty */
+#line 15054 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 47648 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2462: /* opt_recursive: RECURSIVE_SYM */
+#line 15055 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 47654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2465: /* with_list_element: with_element_head opt_with_column_list AS '(' query_expression ')' opt_cycle */
+#line 15069 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
+ : thd->query();
+ const char *spec_start= (yyvsp[-3].kwd).pos() + 1;
+ With_element *elem= new With_element((yyvsp[-6].with_element_head), *(yyvsp[-5].ident_sys_list), (yyvsp[-2].select_lex_unit));
+ if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
+ MYSQL_YYABORT;
+ if (elem->set_unparsed_spec(thd, spec_start, (yyvsp[-1].kwd).pos(),
+ spec_start - query_start))
+ MYSQL_YYABORT;
+ if ((yyvsp[0].ident_sys_list))
+ {
+ elem->set_cycle_list((yyvsp[0].ident_sys_list));
+ }
+ elem->set_tables_end_pos(lex->query_tables_last);
+ }
+#line 47676 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2466: /* opt_cycle: %empty */
+#line 15090 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_sys_list)= NULL; }
+#line 47682 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2467: /* $@219: %empty */
+#line 15093 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!Lex->curr_with_clause->with_recursive)
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[0].kwd).pos());
+ }
+ }
+#line 47693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2468: /* opt_cycle: CYCLE_SYM $@219 comma_separated_ident_list RESTRICT */
+#line 15100 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list);
+ }
+#line 47701 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2469: /* opt_with_column_list: %empty */
+#line 15108 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.ident_sys_list)= new (thd->mem_root) List<Lex_ident_sys>) == NULL)
+ MYSQL_YYABORT;
+ }
+#line 47710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2470: /* opt_with_column_list: '(' with_column_list ')' */
+#line 15113 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_sys_list)= (yyvsp[-1].ident_sys_list); }
+#line 47716 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2472: /* ident_sys_alloc: ident_cli */
+#line 15122 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ident_sys_ptr)= new (thd->mem_root) Lex_ident_sys(thd, &(yyvsp[0].ident_cli));
+ }
+#line 47724 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2473: /* comma_separated_ident_list: ident_sys_alloc */
+#line 15129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.ident_sys_list)= new (thd->mem_root) List<Lex_ident_sys>;
+ if (unlikely((yyval.ident_sys_list) == NULL || (yyval.ident_sys_list)->push_back((yyvsp[0].ident_sys_ptr))))
+ MYSQL_YYABORT;
+ }
+#line 47734 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2474: /* comma_separated_ident_list: comma_separated_ident_list ',' ident_sys_alloc */
+#line 15135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.ident_sys_list)= (yyvsp[-2].ident_sys_list))->push_back((yyvsp[0].ident_sys_ptr)))
+ MYSQL_YYABORT;
+ }
+#line 47743 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2475: /* with_element_head: ident */
+#line 15144 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING *name=
+ (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
+ (yyval.with_element_head)= new (thd->mem_root) With_element_head(name);
+ if (unlikely(name == NULL || (yyval.with_element_head) == NULL))
+ MYSQL_YYABORT;
+ (yyval.with_element_head)->tables_pos.set_start_pos(Lex->query_tables_last);
+ }
+#line 47756 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2476: /* insert_ident: simple_ident_nospvar */
+#line 15161 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 47762 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2477: /* insert_ident: table_wild */
+#line 15162 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 47768 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2478: /* table_wild: ident '.' '*' */
+#line 15167 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 47777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2479: /* table_wild: ident '.' ident '.' '*' */
+#line 15172 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 47786 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2480: /* select_sublist_qualified_asterisk: ident_cli '.' '*' */
+#line 15180 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2481: /* select_sublist_qualified_asterisk: ident_cli '.' ident_cli '.' '*' */
+#line 15185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47804 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2482: /* order_ident: expr */
+#line 15192 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 47810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2483: /* simple_ident: ident_cli */
+#line 15198 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47819 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2484: /* simple_ident: ident_cli '.' ident_cli */
+#line 15203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2485: /* simple_ident: '.' ident_cli '.' ident_cli */
+#line 15208 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_cli empty((yyvsp[-2].ident_cli).pos(), 0);
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &empty, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47838 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2486: /* simple_ident: ident_cli '.' ident_cli '.' ident_cli */
+#line 15214 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2487: /* simple_ident: COLON_ORACLE_SYM ident_cli '.' ident_cli */
+#line 15219 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47856 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2488: /* simple_ident_nospvar: ident */
+#line 15227 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident_nosp(thd, &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 47865 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2489: /* simple_ident_nospvar: ident '.' ident */
+#line 15232 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident_nospvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 47874 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2490: /* simple_ident_nospvar: COLON_ORACLE_SYM ident_cli '.' ident_cli */
+#line 15237 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
+ MYSQL_YYABORT;
+ }
+#line 47883 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2491: /* simple_ident_nospvar: '.' ident '.' ident */
+#line 15242 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys none;
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &none, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 47893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2492: /* simple_ident_nospvar: ident '.' ident '.' ident */
+#line 15248 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
+ MYSQL_YYABORT;
+ }
+#line 47902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2493: /* field_ident: ident */
+#line 15255 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys);}
+#line 47908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2494: /* field_ident: ident '.' ident '.' ident */
+#line 15257 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ TABLE_LIST *table= Select->table_list.first;
+ if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-4].ident_sys).str,
+ table->db.str)))
+ my_yyabort_error((ER_WRONG_DB_NAME, MYF(0), (yyvsp[-4].ident_sys).str));
+ if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
+ table->table_name.str)))
+ my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.lex_str)=(yyvsp[0].ident_sys);
+ }
+#line 47923 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2495: /* field_ident: ident '.' ident */
+#line 15268 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ TABLE_LIST *table= Select->table_list.first;
+ if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
+ table->alias.str)))
+ my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
+ (yyval.lex_str)=(yyvsp[0].ident_sys);
+ }
+#line 47935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2496: /* field_ident: '.' ident */
+#line 15275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys);}
+#line 47941 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2497: /* table_ident: ident */
+#line 15280 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47951 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2498: /* table_ident: ident '.' ident */
+#line 15286 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys), 0);
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47961 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2499: /* table_ident: '.' ident */
+#line 15292 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /* For Delphi */
+ (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2500: /* table_ident_opt_wild: ident opt_wild */
+#line 15302 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47982 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2501: /* table_ident_opt_wild: ident '.' ident opt_wild */
+#line 15308 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 47992 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2502: /* table_ident_nodb: ident */
+#line 15317 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING db= any_db;
+ (yyval.table)= new (thd->mem_root) Table_ident(thd, &db, &(yyvsp[0].ident_sys), 0);
+ if (unlikely((yyval.table) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48003 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2507: /* ident_cli: keyword_ident */
+#line 15333 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48009 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2508: /* IDENT_sys: IDENT_cli */
+#line 15338 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
+ MYSQL_YYABORT;
+ }
+#line 48018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2511: /* ident_cli_func: keyword_func_sp_var_and_label */
+#line 15347 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48024 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2512: /* ident_cli_func: keyword_func_sp_var_not_label */
+#line 15348 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48030 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2513: /* ident_func: ident_cli_func */
+#line 15353 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
+ MYSQL_YYABORT;
+ }
+#line 48039 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2514: /* TEXT_STRING_sys: TEXT_STRING */
+#line 15362 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (thd->make_text_string_sys(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
+ MYSQL_YYABORT;
+ }
+#line 48048 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2515: /* TEXT_STRING_literal: TEXT_STRING */
+#line 15370 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (thd->make_text_string_connection(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
+ MYSQL_YYABORT;
+ }
+#line 48057 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2516: /* TEXT_STRING_filesystem: TEXT_STRING */
+#line 15378 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (thd->make_text_string_filesystem(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
+ MYSQL_YYABORT;
+ }
+#line 48066 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2518: /* ident_table_alias: keyword_table_alias */
+#line 15387 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2519: /* ident_cli_set_usual_case: IDENT_cli */
+#line 15394 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].ident_cli); }
+#line 48081 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2520: /* ident_cli_set_usual_case: keyword_set_usual_case */
+#line 15395 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 48087 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2522: /* ident_sysvar_name: keyword_sysvar_name */
+#line 15401 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48096 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2523: /* ident_sysvar_name: TEXT_STRING_sys */
+#line 15406 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_sys(thd, &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 48105 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2525: /* ident: keyword_ident */
+#line 15416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48114 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2527: /* label_ident: keyword_label */
+#line 15425 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 48123 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2528: /* ident_or_text: ident */
+#line 15432 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].ident_sys);}
+#line 48129 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2529: /* ident_or_text: TEXT_STRING_sys */
+#line 15433 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str);}
+#line 48135 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2530: /* ident_or_text: LEX_HOSTNAME */
+#line 15434 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)=(yyvsp[0].lex_str);}
+#line 48141 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2531: /* user_maybe_role: ident_or_text */
+#line 15439 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user = (yyvsp[0].lex_str);
+
+ if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
+ username_char_length,
+ system_charset_info, 0)))
+ MYSQL_YYABORT;
+ }
+#line 48156 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2532: /* user_maybe_role: ident_or_text '@' ident_or_text */
+#line 15450 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user = (yyvsp[-2].lex_str); (yyval.lex_user)->host=(yyvsp[0].lex_str);
+
+ if (unlikely(check_string_char_length(&(yyval.lex_user)->user, ER_USERNAME,
+ username_char_length,
+ system_charset_info, 0)) ||
+ unlikely(check_host_name(&(yyval.lex_user)->host)))
+ MYSQL_YYABORT;
+ if ((yyval.lex_user)->host.str[0])
+ {
+ /*
+ Convert hostname part of username to lowercase.
+ It's OK to use in-place lowercase as long as
+ the character set is utf8.
+ */
+ my_casedn_str(system_charset_info, (char*) (yyval.lex_user)->host.str);
+ }
+ else
+ {
+ /*
+ fix historical undocumented convention that empty host is the
+ same as '%'
+ */
+ (yyval.lex_user)->host= host_not_specified;
+ }
+ }
+#line 48189 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2533: /* user_maybe_role: CURRENT_USER optional_braces */
+#line 15479 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user= current_user;
+ (yyval.lex_user)->auth= new (thd->mem_root) USER_AUTH();
+ }
+#line 48200 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 2536: /* user: user_maybe_role */
+#line 15490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if ((yyvsp[0].lex_user)->user.str != current_user.str && (yyvsp[0].lex_user)->host.str == 0)
+ (yyvsp[0].lex_user)->host= host_not_specified;
+ (yyval.lex_user)= (yyvsp[0].lex_user);
+ }
+#line 48210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3262: /* $@220: %empty */
+#line 16359 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_stmt_init();
+ }
+#line 48219 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3263: /* set: SET $@220 set_param */
+#line 16364 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 48228 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3266: /* $@221: %empty */
+#line 16374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_type= OPT_DEFAULT;
+ if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48238 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3267: /* set_param: TRANSACTION_SYM $@221 transaction_characteristics */
+#line 16380 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48247 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3268: /* $@222: %empty */
+#line 16385 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_type= (yyvsp[0].var_type);
+ }
+#line 48255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3270: /* $@223: %empty */
+#line 16391 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->table_or_sp_used()))
+ my_yyabort_error((ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), "SET STATEMENT"));
+ lex->stmt_var_list= lex->var_list;
+ lex->var_list.empty();
+ if (Lex->check_main_unit_semantics())
+ MYSQL_YYABORT;
+ }
+#line 48269 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3276: /* $@224: %empty */
+#line 16418 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[0].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48278 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3277: /* start_option_value_list_following_option_type: TRANSACTION_SYM $@224 transaction_characteristics */
+#line 16423 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3280: /* $@225: %empty */
+#line 16438 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->option_type= (yyvsp[0].var_type);
+ }
+#line 48295 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3283: /* option_type: GLOBAL_SYM */
+#line 16446 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_GLOBAL; }
+#line 48301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3284: /* option_type: LOCAL_SYM */
+#line 16447 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3285: /* option_type: SESSION_SYM */
+#line 16448 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3286: /* opt_var_type: %empty */
+#line 16452 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3287: /* opt_var_type: GLOBAL_SYM */
+#line 16453 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_GLOBAL; }
+#line 48325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3288: /* opt_var_type: LOCAL_SYM */
+#line 16454 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3289: /* opt_var_type: SESSION_SYM */
+#line 16455 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3290: /* opt_var_ident_type: %empty */
+#line 16459 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_DEFAULT; }
+#line 48343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3291: /* opt_var_ident_type: GLOBAL_SYM '.' */
+#line 16460 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_GLOBAL; }
+#line 48349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3292: /* opt_var_ident_type: LOCAL_SYM '.' */
+#line 16461 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48355 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3293: /* opt_var_ident_type: SESSION_SYM '.' */
+#line 16462 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.var_type)=OPT_SESSION; }
+#line 48361 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3294: /* $@226: %empty */
+#line 16471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push(false))
+ MYSQL_YYABORT;
+ }
+#line 48370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3295: /* set_stmt_option: ident_cli equal $@226 set_expr_or_default */
+#line 16476 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(Lex->option_type, &tmp, (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //min select
+ }
+#line 48382 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3296: /* $@227: %empty */
+#line 16484 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push(false))
+ MYSQL_YYABORT;
+ }
+#line 48391 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3297: /* set_stmt_option: ident_cli '.' ident equal $@227 set_expr_or_default */
+#line 16489 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(thd, Lex->option_type,
+ &tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //min select
+ }
+#line 48404 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3298: /* $@228: %empty */
+#line 16498 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push(false))
+ MYSQL_YYABORT;
+ }
+#line 48413 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3299: /* set_stmt_option: DEFAULT '.' ident equal $@228 set_expr_or_default */
+#line 16503 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable(Lex->option_type,
+ &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ Lex->pop_select(); //min select
+ }
+#line 48424 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3300: /* $@229: %empty */
+#line 16515 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48433 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3301: /* option_value_following_option_type: ident_cli equal $@229 set_expr_or_default */
+#line 16520 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(Lex->option_type, &tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48445 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3302: /* $@230: %empty */
+#line 16528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48454 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3303: /* option_value_following_option_type: ident_cli '.' ident equal $@230 set_expr_or_default */
+#line 16533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_system_variable(thd, Lex->option_type, &tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48466 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3304: /* $@231: %empty */
+#line 16541 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48475 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3305: /* option_value_following_option_type: DEFAULT '.' ident equal $@231 set_expr_or_default */
+#line 16546 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48485 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3306: /* $@232: %empty */
+#line 16556 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3307: /* option_value_no_option_type: ident_cli_set_usual_case equal $@232 set_expr_or_default */
+#line 16561 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48506 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3308: /* $@233: %empty */
+#line 16569 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48515 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3309: /* option_value_no_option_type: ident_cli_set_usual_case '.' ident equal $@233 set_expr_or_default */
+#line 16574 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48527 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3310: /* $@234: %empty */
+#line 16582 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3311: /* option_value_no_option_type: DEFAULT '.' ident equal $@234 set_expr_or_default */
+#line 16587 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-3].ident_sys), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48547 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3312: /* $@235: %empty */
+#line 16594 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!(yyvsp[-1].lex_str).length)
+ {
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+
+ if (sp_create_assignment_lex(thd, (yyvsp[-2].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 48562 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3313: /* option_value_no_option_type: '@' ident_or_text equal $@235 expr */
+#line 16605 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_user_variable(thd, &(yyvsp[-3].lex_str), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48572 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3314: /* $@236: %empty */
+#line 16611 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-4].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 48581 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3315: /* option_value_no_option_type: '@' '@' opt_var_ident_type ident_sysvar_name equal $@236 set_expr_or_default */
+#line 16616 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_system_variable((yyvsp[-4].var_type), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3316: /* $@237: %empty */
+#line 16622 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 48600 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3317: /* option_value_no_option_type: '@' '@' opt_var_ident_type ident_sysvar_name '.' ident equal $@237 set_expr_or_default */
+#line 16627 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_system_variable(thd, (yyvsp[-6].var_type), &(yyvsp[-5].ident_sys), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48610 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3318: /* $@238: %empty */
+#line 16633 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-6].lex_str).str))
+ MYSQL_YYABORT;
+ }
+#line 48619 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3319: /* option_value_no_option_type: '@' '@' opt_var_ident_type DEFAULT '.' ident equal $@238 set_expr_or_default */
+#line 16638 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->set_default_system_variable((yyvsp[-6].var_type), &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48629 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3320: /* option_value_no_option_type: charset old_or_new_charset_name_or_default */
+#line 16644 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex= thd->lex;
+ CHARSET_INFO *cs2;
+ cs2= (yyvsp[0].charset) ? (yyvsp[0].charset): global_system_variables.character_set_client;
+ set_var_collation_client *var;
+ var= (new (thd->mem_root)
+ set_var_collation_client(cs2,
+ thd->variables.collation_database,
+ cs2));
+ if (unlikely(var == NULL))
+ MYSQL_YYABORT;
+ lex->var_list.push_back(var, thd->mem_root);
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3321: /* option_value_no_option_type: NAMES_SYM equal expr */
+#line 16662 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ sp_pcontext *spc= lex->spcont;
+ LEX_CSTRING names= { STRING_WITH_LEN("names") };
+ if (unlikely(spc && spc->find_variable(&names, false)))
+ my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), names.str);
+ else
+ thd->parse_error();
+ MYSQL_YYABORT;
+ }
+#line 48666 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3322: /* option_value_no_option_type: NAMES_SYM charset_name_or_default */
+#line 16673 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ CHARSET_INFO *def= global_system_variables.character_set_client;
+ Lex_exact_charset_opt_extended_collate tmp((yyvsp[0].charset) ? (yyvsp[0].charset) : def, false);
+ if (Lex->set_names((yyvsp[-1].kwd).pos(), tmp, yychar == YYEMPTY))
+ MYSQL_YYABORT;
+ }
+#line 48677 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3323: /* option_value_no_option_type: NAMES_SYM charset_name_or_default COLLATE_SYM collation_name_or_default */
+#line 16681 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ CHARSET_INFO *def= global_system_variables.character_set_client;
+ Lex_exact_charset_opt_extended_collate tmp((yyvsp[-2].charset) ? (yyvsp[-2].charset) : def, false);
+ if (tmp.merge_collation((yyvsp[0].Lex_extended_collation)) ||
+ Lex->set_names((yyvsp[-3].kwd).pos(), tmp, yychar == YYEMPTY))
+ MYSQL_YYABORT;
+ }
+#line 48689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3324: /* option_value_no_option_type: DEFAULT ROLE_SYM grant_role */
+#line 16689 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-2].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex = Lex;
+ LEX_USER *user;
+ if (unlikely(!(user=(LEX_USER *) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ user->user= current_user;
+ set_var_default_role *var= (new (thd->mem_root)
+ set_var_default_role(user,
+ (yyvsp[0].lex_user)->user));
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+
+ thd->lex->autocommit= TRUE;
+ if (lex->sphead)
+ lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48715 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3325: /* option_value_no_option_type: DEFAULT ROLE_SYM grant_role FOR_SYM user */
+#line 16711 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-4].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex = Lex;
+ set_var_default_role *var= (new (thd->mem_root)
+ set_var_default_role((yyvsp[0].lex_user), (yyvsp[-2].lex_user)->user));
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+ thd->lex->autocommit= TRUE;
+ if (lex->sphead)
+ lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
+ if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3326: /* option_value_no_option_type: ROLE_SYM role_name */
+#line 16727 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ LEX *lex = Lex;
+ set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_user)->user);
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48750 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3327: /* $@239: %empty */
+#line 16738 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3328: /* option_value_no_option_type: ROLE_SYM equal $@239 set_expr_or_default */
+#line 16743 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].kwd));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3329: /* $@240: %empty */
+#line 16751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48780 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3330: /* option_value_no_option_type: PASSWORD_SYM equal $@240 text_or_password */
+#line 16756 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_create_set_password_instr(thd, (yyvsp[0].user_auth),
+ yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48790 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3331: /* $@241: %empty */
+#line 16762 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 48799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3332: /* option_value_no_option_type: PASSWORD_SYM FOR_SYM $@241 user equal text_or_password */
+#line 16767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_create_set_password_instr(thd, (yyvsp[-2].lex_user), (yyvsp[0].user_auth),
+ yychar == YYEMPTY)))
+ MYSQL_YYABORT;
+ }
+#line 48809 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3337: /* transaction_access_mode: transaction_access_mode_types */
+#line 16783 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ set_var *var= (new (thd->mem_root)
+ set_var(thd, lex->option_type,
+ find_sys_var(thd, "tx_read_only"),
+ &null_clex_str,
+ item));
+ if (unlikely(var == NULL))
+ MYSQL_YYABORT;
+ if (unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 48829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3338: /* isolation_level: ISOLATION LEVEL_SYM isolation_types */
+#line 16802 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation));
+ if (unlikely(item == NULL))
+ MYSQL_YYABORT;
+ set_var *var= (new (thd->mem_root)
+ set_var(thd, lex->option_type,
+ find_sys_var(thd, "tx_isolation"),
+ &null_clex_str,
+ item));
+ if (unlikely(var == NULL) ||
+ unlikely(lex->var_list.push_back(var, thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 48848 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3339: /* transaction_access_mode_types: READ_SYM ONLY_SYM */
+#line 16819 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= true; }
+#line 48854 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3340: /* transaction_access_mode_types: READ_SYM WRITE_SYM */
+#line 16820 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 48860 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3341: /* isolation_types: READ_SYM UNCOMMITTED_SYM */
+#line 16824 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
+#line 48866 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3342: /* isolation_types: READ_SYM COMMITTED_SYM */
+#line 16825 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_READ_COMMITTED; }
+#line 48872 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3343: /* isolation_types: REPEATABLE_SYM READ_SYM */
+#line 16826 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
+#line 48878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3344: /* isolation_types: SERIALIZABLE_SYM */
+#line 16827 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.tx_isolation)= ISO_SERIALIZABLE; }
+#line 48884 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3345: /* text_or_password: TEXT_STRING */
+#line 16833 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= new (thd->mem_root) USER_AUTH();
+ (yyval.user_auth)->auth_str= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 48893 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3346: /* text_or_password: PASSWORD_SYM '(' TEXT_STRING ')' */
+#line 16838 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= new (thd->mem_root) USER_AUTH();
+ (yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
+ }
+#line 48902 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3347: /* text_or_password: OLD_PASSWORD_SYM '(' TEXT_STRING ')' */
+#line 16843 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= new (thd->mem_root) USER_AUTH();
+ (yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
+ (yyval.user_auth)->auth_str.str= Item_func_password::alloc(thd,
+ (yyvsp[-1].lex_string_with_metadata).str, (yyvsp[-1].lex_string_with_metadata).length, Item_func_password::OLD);
+ (yyval.user_auth)->auth_str.length= SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
+ }
+#line 48914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3348: /* set_expr_or_default: expr */
+#line 16853 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=(yyvsp[0].item); }
+#line 48920 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3349: /* set_expr_or_default: DEFAULT */
+#line 16854 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item)=0; }
+#line 48926 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3350: /* set_expr_or_default: ON */
+#line 16856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON", 2);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48936 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3351: /* set_expr_or_default: ALL */
+#line 16862 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48946 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3352: /* set_expr_or_default: BINARY */
+#line 16868 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6);
+ if (unlikely((yyval.item) == NULL))
+ MYSQL_YYABORT;
+ }
+#line 48956 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3353: /* $@242: %empty */
+#line 16879 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK"));
+ lex->sql_command= SQLCOM_LOCK_TABLES;
+ }
+#line 48968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3354: /* lock: LOCK_SYM table_or_tables $@242 table_lock_list opt_lock_wait_timeout */
+#line 16887 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 48974 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3355: /* opt_lock_wait_timeout: %empty */
+#line 16892 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 48980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3356: /* opt_lock_wait_timeout: WAIT_SYM ulong_num */
+#line 16894 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), (yyvsp[0].ulong_num))) ||
+ unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), (yyvsp[0].ulong_num))))
+ MYSQL_YYABORT;
+ }
+#line 48990 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3357: /* opt_lock_wait_timeout: NOWAIT_SYM */
+#line 16900 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), 0)) ||
+ unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), 0)))
+ MYSQL_YYABORT;
+ }
+#line 49000 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3358: /* table_or_tables: TABLE_SYM */
+#line 16908 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 49006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3359: /* table_or_tables: TABLES */
+#line 16909 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 49012 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3362: /* table_lock: table_ident opt_table_alias_clause lock_option */
+#line 16919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ thr_lock_type lock_type= (thr_lock_type) (yyvsp[0].num);
+ bool lock_for_write= (lock_type >= TL_FIRST_WRITE);
+ ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
+ enum_mdl_type mdl_type= !lock_for_write
+ ? MDL_SHARED_READ
+ : lock_type == TL_WRITE_CONCURRENT_INSERT
+ ? MDL_SHARED_WRITE
+ : MDL_SHARED_NO_READ_WRITE;
+
+ if (unlikely(!Lex->current_select_or_default()->
+ add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[-1].lex_str_ptr), table_options,
+ lock_type, mdl_type)))
+ MYSQL_YYABORT;
+ }
+#line 49032 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3363: /* lock_option: READ_SYM */
+#line 16937 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_READ_NO_INSERT; }
+#line 49038 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3364: /* lock_option: WRITE_SYM */
+#line 16938 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_WRITE_DEFAULT; }
+#line 49044 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3365: /* lock_option: WRITE_SYM CONCURRENT */
+#line 16940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
+ }
+#line 49052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3366: /* lock_option: LOW_PRIORITY WRITE_SYM */
+#line 16944 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_WRITE_LOW_PRIORITY; }
+#line 49058 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3367: /* lock_option: READ_SYM LOCAL_SYM */
+#line 16945 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= TL_READ; }
+#line 49064 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3368: /* $@243: %empty */
+#line 16950 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK"));
+ lex->sql_command= SQLCOM_UNLOCK_TABLES;
+ }
+#line 49076 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3369: /* unlock: UNLOCK_SYM $@243 table_or_tables */
+#line 16958 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49082 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3370: /* $@244: %empty */
+#line 16967 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->main_select_push())
+ MYSQL_YYABORT;
+ }
+#line 49091 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3371: /* handler: HANDLER_SYM $@244 handler_tail */
+#line 16972 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->pop_select(); //main select
+ }
+#line 49099 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3372: /* handler_tail: table_ident OPEN_SYM opt_table_alias_clause */
+#line 16979 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
+ lex->sql_command = SQLCOM_HA_OPEN;
+ if (!lex->current_select->add_table_to_list(thd, (yyvsp[-2].table), (yyvsp[0].lex_str_ptr), 0))
+ MYSQL_YYABORT;
+ }
+#line 49112 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3373: /* handler_tail: table_ident_nodb CLOSE_SYM */
+#line 16988 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
+ lex->sql_command = SQLCOM_HA_CLOSE;
+ if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
+ MYSQL_YYABORT;
+ }
+#line 49125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3374: /* $@245: %empty */
+#line 16997 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ SELECT_LEX *select= Select;
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "HANDLER"));
+ 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);
+ if (unlikely(one == NULL))
+ MYSQL_YYABORT;
+ select->limit_params.select_limit= one;
+ select->limit_params.offset_limit= 0;
+ lex->limit_rows_examined= 0;
+ if (!lex->current_select->add_table_to_list(thd, (yyvsp[-1].table), 0, 0))
+ MYSQL_YYABORT;
+ }
+#line 49147 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3375: /* handler_tail: table_ident_nodb READ_SYM $@245 handler_read_or_scan opt_where_clause opt_global_limit_clause */
+#line 17015 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ SELECT_LEX *select= Select;
+ lex->clause_that_disallows_subselect= NULL;
+ if (!lex->current_select->limit_params.explicit_limit)
+ {
+ Item *one= new (thd->mem_root) Item_int(thd, (int32) 1);
+ if (one == NULL)
+ MYSQL_YYABORT;
+ select->limit_params.select_limit= one;
+ select->limit_params.offset_limit= 0;
+ lex->limit_rows_examined= 0;
+ }
+ /* Stored functions are not supported for HANDLER READ. */
+ if (lex->uses_stored_routines())
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "stored functions in HANDLER ... READ");
+ MYSQL_YYABORT;
+ }
+ }
+#line 49173 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3376: /* handler_read_or_scan: handler_scan_function */
+#line 17039 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ident= null_clex_str; }
+#line 49179 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3377: /* handler_read_or_scan: ident handler_rkey_function */
+#line 17040 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ident= (yyvsp[-1].ident_sys); }
+#line 49185 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3378: /* handler_scan_function: FIRST_SYM */
+#line 17044 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RFIRST; }
+#line 49191 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3379: /* handler_scan_function: NEXT_SYM */
+#line 17045 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RNEXT; }
+#line 49197 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3380: /* handler_rkey_function: FIRST_SYM */
+#line 17049 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RFIRST; }
+#line 49203 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3381: /* handler_rkey_function: NEXT_SYM */
+#line 17050 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RNEXT; }
+#line 49209 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3382: /* handler_rkey_function: PREV_SYM */
+#line 17051 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RPREV; }
+#line 49215 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3383: /* handler_rkey_function: LAST_SYM */
+#line 17052 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->ha_read_mode = RLAST; }
+#line 49221 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3384: /* $@246: %empty */
+#line 17054 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->ha_read_mode = RKEY;
+ lex->ha_rkey_mode=(yyvsp[0].ha_rkey_mode);
+ if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)))
+ MYSQL_YYABORT;
+ }
+#line 49233 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3385: /* handler_rkey_function: handler_rkey_mode $@246 '(' values ')' */
+#line 17062 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49239 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3386: /* handler_rkey_mode: '=' */
+#line 17066 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT; }
+#line 49245 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3387: /* handler_rkey_mode: GE */
+#line 17067 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
+#line 49251 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3388: /* handler_rkey_mode: LE */
+#line 17068 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
+#line 49257 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3389: /* handler_rkey_mode: '>' */
+#line 17069 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY; }
+#line 49263 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3390: /* handler_rkey_mode: '<' */
+#line 17070 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY; }
+#line 49269 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3391: /* revoke: REVOKE clear_privileges revoke_command */
+#line 17077 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49275 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3392: /* revoke_command: grant_privileges ON opt_table grant_ident FROM user_and_role_list */
+#line 17082 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_revoke_table(thd, (yyvsp[-5].lex_grant), *(yyvsp[-2].lex_grant_ident)))
+ MYSQL_YYABORT;
+ }
+#line 49284 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3393: /* revoke_command: grant_privileges ON sp_handler grant_ident FROM user_and_role_list */
+#line 17087 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_revoke_sp(thd, (yyvsp[-5].lex_grant), *(yyvsp[-2].lex_grant_ident), *(yyvsp[-3].sp_handler)))
+ MYSQL_YYABORT;
+ }
+#line 49293 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3394: /* revoke_command: ALL opt_privileges ',' GRANT OPTION FROM user_and_role_list */
+#line 17092 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_REVOKE_ALL;
+ }
+#line 49301 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3395: /* revoke_command: PROXY_SYM ON user FROM user_list */
+#line 17096 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_revoke_proxy(thd, (yyvsp[-2].lex_user)))
+ MYSQL_YYABORT;
+ }
+#line 49310 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3396: /* revoke_command: admin_option_for_role FROM user_and_role_list */
+#line 17101 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_REVOKE_ROLE;
+ if (unlikely(Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49320 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3397: /* admin_option_for_role: ADMIN_SYM OPTION FOR_SYM grant_role */
+#line 17110 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
+#line 49326 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3398: /* admin_option_for_role: grant_role */
+#line 17112 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
+#line 49332 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3399: /* grant: GRANT clear_privileges grant_command */
+#line 17117 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49338 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3400: /* grant_command: grant_privileges ON opt_table grant_ident TO_SYM grant_list opt_require_clause opt_grant_options */
+#line 17123 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_grant_table(thd, (yyvsp[-7].lex_grant), *(yyvsp[-4].lex_grant_ident), (yyvsp[0].privilege)))
+ MYSQL_YYABORT;
+ }
+#line 49347 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3401: /* grant_command: grant_privileges ON sp_handler grant_ident TO_SYM grant_list opt_require_clause opt_grant_options */
+#line 17129 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_grant_sp(thd, (yyvsp[-7].lex_grant), *(yyvsp[-4].lex_grant_ident), *(yyvsp[-5].sp_handler), (yyvsp[0].privilege)))
+ MYSQL_YYABORT;
+ }
+#line 49356 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3402: /* grant_command: PROXY_SYM ON user TO_SYM grant_list opt_grant_option */
+#line 17134 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_grant_proxy(thd, (yyvsp[-3].lex_user), (yyvsp[0].privilege)))
+ MYSQL_YYABORT;
+ }
+#line 49365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3403: /* grant_command: grant_role TO_SYM grant_list opt_with_admin_option */
+#line 17139 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_GRANT_ROLE;
+ /* The first role is the one that is granted */
+ if (unlikely(Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3404: /* opt_with_admin: %empty */
+#line 17150 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->definer = 0; }
+#line 49383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3405: /* opt_with_admin: WITH ADMIN_SYM user_or_role */
+#line 17151 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->definer = (yyvsp[0].lex_user); }
+#line 49389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3406: /* opt_with_admin_option: %empty */
+#line 17155 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= false; }
+#line 49395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3407: /* opt_with_admin_option: WITH ADMIN_SYM OPTION */
+#line 17156 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->with_admin_option= true; }
+#line 49401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3408: /* role_list: grant_role */
+#line 17161 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49410 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3409: /* role_list: role_list ',' grant_role */
+#line 17166 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49419 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3410: /* current_role: CURRENT_ROLE optional_braces */
+#line 17174 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->user= current_role;
+ }
+#line 49429 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3411: /* role_name: ident_or_text */
+#line 17183 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ CHARSET_INFO *cs= system_charset_info;
+ /* trim end spaces (as they'll be lost in mysql.user anyway) */
+ (yyvsp[0].lex_str).length= cs->lengthsp((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
+ ((char*) (yyvsp[0].lex_str).str)[(yyvsp[0].lex_str).length] = '\0';
+ if (unlikely((yyvsp[0].lex_str).length == 0))
+ my_yyabort_error((ER_INVALID_ROLE, MYF(0), ""));
+ if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
+ MYSQL_YYABORT;
+ if (lex_string_eq(&(yyvsp[0].lex_str), &none))
+ (yyval.lex_user)->user= none;
+ else if (lex_string_eq(&(yyvsp[0].lex_str), &public_name))
+ (yyval.lex_user)->user= public_name;
+ else if (check_string_char_length(&((yyval.lex_user)->user= (yyvsp[0].lex_str)), ER_USERNAME,
+ username_char_length, cs, 0))
+ MYSQL_YYABORT;
+ (yyval.lex_user)->host= empty_clex_str;
+ }
+#line 49452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3417: /* grant_privileges: ALL opt_privileges */
+#line 17213 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege(GLOBAL_ACLS, true)))
+ MYSQL_YYABORT;
+ }
+#line 49461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3420: /* object_privilege_list: object_privilege */
+#line 17226 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege((yyvsp[0].privilege))))
+ MYSQL_YYABORT;
+ }
+#line 49470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3421: /* object_privilege_list: column_list_privilege */
+#line 17231 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant)= new (thd->mem_root) Lex_grant_privilege()) ||
+ (yyval.lex_grant)->add_column_list_privilege(thd, (yyvsp[0].column_list_privilege).m_columns[0],
+ (yyvsp[0].column_list_privilege).m_privilege))
+ MYSQL_YYABORT;
+ }
+#line 49481 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3422: /* object_privilege_list: object_privilege_list ',' object_privilege */
+#line 17238 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ ((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_object_privilege((yyvsp[0].privilege));
+ }
+#line 49489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3423: /* object_privilege_list: object_privilege_list ',' column_list_privilege */
+#line 17242 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (((yyval.lex_grant)= (yyvsp[-2].lex_grant))->add_column_list_privilege(thd, (yyvsp[0].column_list_privilege).m_columns[0],
+ (yyvsp[0].column_list_privilege).m_privilege))
+ MYSQL_YYABORT;
+ }
+#line 49499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3424: /* column_list_privilege: column_privilege '(' comma_separated_ident_list ')' */
+#line 17251 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.column_list_privilege)= Lex_column_list_privilege((yyvsp[-1].ident_sys_list), (yyvsp[-3].privilege));
+ }
+#line 49507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3425: /* column_privilege: SELECT_SYM */
+#line 17257 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SELECT_ACL; }
+#line 49513 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3426: /* column_privilege: INSERT */
+#line 17258 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= INSERT_ACL; }
+#line 49519 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3427: /* column_privilege: UPDATE_SYM */
+#line 17259 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= UPDATE_ACL; }
+#line 49525 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3428: /* column_privilege: REFERENCES */
+#line 17260 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REFERENCES_ACL; }
+#line 49531 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3429: /* object_privilege: SELECT_SYM */
+#line 17264 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SELECT_ACL; }
+#line 49537 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3430: /* object_privilege: INSERT */
+#line 17265 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= INSERT_ACL; }
+#line 49543 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3431: /* object_privilege: UPDATE_SYM */
+#line 17266 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= UPDATE_ACL; }
+#line 49549 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3432: /* object_privilege: REFERENCES */
+#line 17267 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REFERENCES_ACL; }
+#line 49555 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3433: /* object_privilege: DELETE_SYM */
+#line 17268 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= DELETE_ACL;}
+#line 49561 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3434: /* object_privilege: USAGE */
+#line 17269 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 49567 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3435: /* object_privilege: INDEX_SYM */
+#line 17270 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= INDEX_ACL;}
+#line 49573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3436: /* object_privilege: ALTER */
+#line 17271 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= ALTER_ACL;}
+#line 49579 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3437: /* object_privilege: CREATE */
+#line 17272 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_ACL;}
+#line 49585 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3438: /* object_privilege: DROP */
+#line 17273 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= DROP_ACL;}
+#line 49591 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3439: /* object_privilege: EXECUTE_SYM */
+#line 17274 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= EXECUTE_ACL;}
+#line 49597 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3440: /* object_privilege: RELOAD */
+#line 17275 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= RELOAD_ACL;}
+#line 49603 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3441: /* object_privilege: SHUTDOWN */
+#line 17276 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SHUTDOWN_ACL;}
+#line 49609 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3442: /* object_privilege: PROCESS */
+#line 17277 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= PROCESS_ACL;}
+#line 49615 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3443: /* object_privilege: FILE_SYM */
+#line 17278 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= FILE_ACL;}
+#line 49621 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3444: /* object_privilege: GRANT OPTION */
+#line 17279 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= GRANT_ACL;}
+#line 49627 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3445: /* object_privilege: SHOW DATABASES */
+#line 17280 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SHOW_DB_ACL;}
+#line 49633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3446: /* object_privilege: SUPER_SYM */
+#line 17281 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SUPER_ACL;}
+#line 49639 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3447: /* object_privilege: CREATE TEMPORARY TABLES */
+#line 17282 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_TMP_ACL;}
+#line 49645 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3448: /* object_privilege: LOCK_SYM TABLES */
+#line 17283 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= LOCK_TABLES_ACL; }
+#line 49651 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3449: /* object_privilege: REPLICATION SLAVE */
+#line 17284 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REPL_SLAVE_ACL; }
+#line 49657 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3450: /* object_privilege: REPLICATION CLIENT_SYM */
+#line 17285 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_MONITOR_ACL; /*Compatibility*/ }
+#line 49663 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3451: /* object_privilege: CREATE VIEW_SYM */
+#line 17286 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_VIEW_ACL; }
+#line 49669 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3452: /* object_privilege: SHOW VIEW_SYM */
+#line 17287 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SHOW_VIEW_ACL; }
+#line 49675 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3453: /* object_privilege: CREATE ROUTINE_SYM */
+#line 17288 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_PROC_ACL; }
+#line 49681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3454: /* object_privilege: ALTER ROUTINE_SYM */
+#line 17289 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= ALTER_PROC_ACL; }
+#line 49687 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3455: /* object_privilege: CREATE USER_SYM */
+#line 17290 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_USER_ACL; }
+#line 49693 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3456: /* object_privilege: EVENT_SYM */
+#line 17291 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= EVENT_ACL;}
+#line 49699 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3457: /* object_privilege: TRIGGER_SYM */
+#line 17292 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= TRIGGER_ACL; }
+#line 49705 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3458: /* object_privilege: CREATE TABLESPACE */
+#line 17293 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CREATE_TABLESPACE_ACL; }
+#line 49711 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3459: /* object_privilege: DELETE_SYM HISTORY_SYM */
+#line 17294 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= DELETE_HISTORY_ACL; }
+#line 49717 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3460: /* object_privilege: SET USER_SYM */
+#line 17295 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SET_USER_ACL; }
+#line 49723 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3461: /* object_privilege: FEDERATED_SYM ADMIN_SYM */
+#line 17296 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= FEDERATED_ADMIN_ACL; }
+#line 49729 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3462: /* object_privilege: CONNECTION_SYM ADMIN_SYM */
+#line 17297 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= CONNECTION_ADMIN_ACL; }
+#line 49735 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3463: /* object_privilege: READ_SYM ONLY_SYM ADMIN_SYM */
+#line 17298 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
+#line 49741 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3464: /* object_privilege: READ_ONLY_SYM ADMIN_SYM */
+#line 17299 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= READ_ONLY_ADMIN_ACL; }
+#line 49747 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3465: /* object_privilege: BINLOG_SYM MONITOR_SYM */
+#line 17300 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_MONITOR_ACL; }
+#line 49753 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3466: /* object_privilege: BINLOG_SYM ADMIN_SYM */
+#line 17301 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_ADMIN_ACL; }
+#line 49759 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3467: /* object_privilege: BINLOG_SYM REPLAY_SYM */
+#line 17302 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= BINLOG_REPLAY_ACL; }
+#line 49765 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3468: /* object_privilege: REPLICATION MASTER_SYM ADMIN_SYM */
+#line 17303 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REPL_MASTER_ADMIN_ACL; }
+#line 49771 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3469: /* object_privilege: REPLICATION SLAVE ADMIN_SYM */
+#line 17304 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= REPL_SLAVE_ADMIN_ACL; }
+#line 49777 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3470: /* object_privilege: SLAVE MONITOR_SYM */
+#line 17305 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= SLAVE_MONITOR_ACL; }
+#line 49783 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3471: /* opt_and: %empty */
+#line 17309 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49789 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3472: /* opt_and: AND_SYM */
+#line 17310 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 49795 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3475: /* require_list_element: SUBJECT_SYM TEXT_STRING */
+#line 17320 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (lex->account_options.x509_subject.str)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
+ lex->account_options.x509_subject= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 49806 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3476: /* require_list_element: ISSUER_SYM TEXT_STRING */
+#line 17327 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (lex->account_options.x509_issuer.str)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
+ lex->account_options.x509_issuer= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 49817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3477: /* require_list_element: CIPHER_SYM TEXT_STRING */
+#line 17334 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ if (lex->account_options.ssl_cipher.str)
+ my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
+ lex->account_options.ssl_cipher= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 49828 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3478: /* grant_ident: '*' */
+#line 17344 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING db;
+ if (unlikely(Lex->copy_db_to(&db)))
+ MYSQL_YYABORT;
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name(db,
+ Lex_grant_object_name::STAR)))
+ MYSQL_YYABORT;
+ }
+#line 49841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3479: /* grant_ident: ident '.' '*' */
+#line 17353 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name((yyvsp[-2].ident_sys),
+ Lex_grant_object_name::IDENT_STAR)))
+ MYSQL_YYABORT;
+ }
+#line 49851 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3480: /* grant_ident: '*' '.' '*' */
+#line 17359 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name(
+ null_clex_str,
+ Lex_grant_object_name::STAR_STAR)))
+ MYSQL_YYABORT;
+ }
+#line 49862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3481: /* grant_ident: table_ident */
+#line 17366 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.lex_grant_ident)= new (thd->mem_root) Lex_grant_object_name((yyvsp[0].table))))
+ MYSQL_YYABORT;
+ }
+#line 49871 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3482: /* user_list: user */
+#line 17374 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49880 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3483: /* user_list: user_list ',' user */
+#line 17379 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49889 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3484: /* grant_list: grant_user */
+#line 17387 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49898 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3485: /* grant_list: grant_list ',' grant_user */
+#line 17392 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49907 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3486: /* user_and_role_list: user_or_role */
+#line 17400 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49916 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3487: /* user_and_role_list: user_and_role_list ',' user_or_role */
+#line 17405 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
+ MYSQL_YYABORT;
+ }
+#line 49925 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3492: /* grant_user: user IDENTIFIED_SYM BY TEXT_STRING */
+#line 17416 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[-3].lex_user);
+ (yyvsp[-3].lex_user)->auth= new (thd->mem_root) USER_AUTH();
+ (yyvsp[-3].lex_user)->auth->pwtext= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 49935 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3493: /* grant_user: user IDENTIFIED_SYM BY PASSWORD_SYM TEXT_STRING */
+#line 17422 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[-4].lex_user);
+ (yyvsp[-4].lex_user)->auth= new (thd->mem_root) USER_AUTH();
+ (yyvsp[-4].lex_user)->auth->auth_str= (yyvsp[0].lex_string_with_metadata);
+ }
+#line 49945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3494: /* grant_user: user IDENTIFIED_SYM via_or_with auth_expression */
+#line 17428 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[-3].lex_user);
+ (yyvsp[-3].lex_user)->auth= (yyvsp[0].user_auth);
+ }
+#line 49954 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3495: /* grant_user: user_or_role */
+#line 17433 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex_user)= (yyvsp[0].lex_user);
+ }
+#line 49962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3496: /* auth_expression: auth_token OR_SYM auth_expression */
+#line 17440 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= (yyvsp[-2].user_auth);
+ DBUG_ASSERT((yyval.user_auth)->next == NULL);
+ (yyval.user_auth)->next= (yyvsp[0].user_auth);
+ }
+#line 49972 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3497: /* auth_expression: auth_token */
+#line 17446 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= (yyvsp[0].user_auth);
+ }
+#line 49980 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3498: /* auth_token: ident_or_text opt_auth_str */
+#line 17453 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.user_auth)= (yyvsp[0].user_auth);
+ (yyval.user_auth)->plugin= (yyvsp[-1].lex_str);
+ }
+#line 49989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3499: /* opt_auth_str: %empty */
+#line 17461 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ }
+#line 49998 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3500: /* opt_auth_str: using_or_as TEXT_STRING_sys */
+#line 17466 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ (yyval.user_auth)->auth_str= (yyvsp[0].lex_str);
+ }
+#line 50008 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3501: /* opt_auth_str: using_or_as PASSWORD_SYM '(' TEXT_STRING ')' */
+#line 17472 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.user_auth)=(USER_AUTH*) thd->calloc(sizeof(USER_AUTH))))
+ MYSQL_YYABORT;
+ (yyval.user_auth)->pwtext= (yyvsp[-1].lex_string_with_metadata);
+ }
+#line 50018 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3503: /* opt_require_clause: REQUIRE_SYM require_list */
+#line 17482 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_SPECIFIED;
+ }
+#line 50026 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3504: /* opt_require_clause: REQUIRE_SYM SSL_SYM */
+#line 17486 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_ANY;
+ }
+#line 50034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3505: /* opt_require_clause: REQUIRE_SYM X509_SYM */
+#line 17490 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_X509;
+ }
+#line 50042 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3506: /* opt_require_clause: REQUIRE_SYM NONE_SYM */
+#line 17494 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.ssl_type= SSL_TYPE_NONE;
+ }
+#line 50050 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3507: /* resource_option: MAX_QUERIES_PER_HOUR ulong_num */
+#line 17501 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.questions=(yyvsp[0].ulong_num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
+ }
+#line 50059 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3508: /* resource_option: MAX_UPDATES_PER_HOUR ulong_num */
+#line 17506 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.updates=(yyvsp[0].ulong_num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
+ }
+#line 50068 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3509: /* resource_option: MAX_CONNECTIONS_PER_HOUR ulong_num */
+#line 17511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.conn_per_hour= (yyvsp[0].ulong_num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::CONNECTIONS_PER_HOUR;
+ }
+#line 50077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3510: /* resource_option: MAX_USER_CONNECTIONS_SYM int_num */
+#line 17516 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.user_conn= (yyvsp[0].num);
+ Lex->account_options.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
+ }
+#line 50086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3511: /* resource_option: MAX_STATEMENT_TIME_SYM NUM_literal */
+#line 17521 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->account_options.max_statement_time= (yyvsp[0].item_num)->val_real();
+ Lex->account_options.specified_limits|= USER_RESOURCES::MAX_STATEMENT_TIME;
+ }
+#line 50095 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3512: /* resource_option_list: resource_option_list resource_option */
+#line 17528 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50101 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3513: /* resource_option_list: resource_option */
+#line 17529 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50107 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3514: /* opt_resource_options: %empty */
+#line 17533 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50113 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3516: /* opt_grant_options: %empty */
+#line 17539 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50119 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3517: /* opt_grant_options: WITH grant_option_list */
+#line 17540 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= (yyvsp[0].privilege); }
+#line 50125 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3518: /* opt_grant_option: %empty */
+#line 17544 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50131 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3519: /* opt_grant_option: WITH GRANT OPTION */
+#line 17545 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= GRANT_ACL; }
+#line 50137 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3520: /* grant_option_list: grant_option_list grant_option */
+#line 17549 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= (yyvsp[-1].privilege) | (yyvsp[0].privilege); }
+#line 50143 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3522: /* grant_option: GRANT OPTION */
+#line 17554 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= GRANT_ACL;}
+#line 50149 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3523: /* grant_option: resource_option */
+#line 17555 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.privilege)= NO_ACL; }
+#line 50155 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3524: /* $@247: %empty */
+#line 17560 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command = SQLCOM_BEGIN;
+ lex->start_transaction_opt= 0;
+ }
+#line 50165 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3525: /* begin_stmt_mariadb: BEGIN_MARIADB_SYM $@247 opt_work */
+#line 17565 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50171 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3526: /* compound_statement: sp_proc_stmt_compound_ok */
+#line 17570 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command= SQLCOM_COMPOUND;
+ if (Lex->sp_body_finalize_procedure(thd))
+ MYSQL_YYABORT;
+ }
+#line 50181 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3527: /* opt_not: %empty */
+#line 17578 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 50187 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3528: /* opt_not: not */
+#line 17579 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 50193 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3529: /* opt_work: %empty */
+#line 17583 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50199 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3530: /* opt_work: WORK_SYM */
+#line 17584 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50205 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3531: /* opt_chain: %empty */
+#line 17589 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
+#line 50211 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3532: /* opt_chain: AND_SYM NO_SYM CHAIN_SYM */
+#line 17590 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_NO; }
+#line 50217 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3533: /* opt_chain: AND_SYM CHAIN_SYM */
+#line 17591 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_YES; }
+#line 50223 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3534: /* opt_release: %empty */
+#line 17596 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
+#line 50229 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3535: /* opt_release: RELEASE_SYM */
+#line 17597 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_YES; }
+#line 50235 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3536: /* opt_release: NO_SYM RELEASE_SYM */
+#line 17598 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.m_yes_no_unk)= TVL_NO; }
+#line 50241 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3537: /* commit: COMMIT_SYM opt_work opt_chain opt_release */
+#line 17603 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_COMMIT;
+ /* Don't allow AND CHAIN RELEASE. */
+ MYSQL_YYABORT_UNLESS((yyvsp[-1].m_yes_no_unk) != TVL_YES || (yyvsp[0].m_yes_no_unk) != TVL_YES);
+ lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
+ lex->tx_release= (yyvsp[0].m_yes_no_unk);
+ }
+#line 50254 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3538: /* rollback: ROLLBACK_SYM opt_work opt_chain opt_release */
+#line 17615 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ROLLBACK;
+ /* Don't allow AND CHAIN RELEASE. */
+ MYSQL_YYABORT_UNLESS((yyvsp[-1].m_yes_no_unk) != TVL_YES || (yyvsp[0].m_yes_no_unk) != TVL_YES);
+ lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
+ lex->tx_release= (yyvsp[0].m_yes_no_unk);
+ }
+#line 50267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3539: /* rollback: ROLLBACK_SYM opt_work TO_SYM SAVEPOINT_SYM ident */
+#line 17624 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 50277 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3540: /* rollback: ROLLBACK_SYM opt_work TO_SYM ident */
+#line 17630 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 50287 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3541: /* savepoint: SAVEPOINT_SYM ident */
+#line 17639 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 50297 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3542: /* release: RELEASE_SYM SAVEPOINT_SYM ident */
+#line 17648 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
+ lex->ident= (yyvsp[0].ident_sys);
+ }
+#line 50307 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3543: /* unit_type_decl: UNION_SYM union_option */
+#line 17661 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.unit_operation).unit_type= UNION_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
+#line 50313 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3544: /* unit_type_decl: INTERSECT_SYM union_option */
+#line 17663 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.unit_operation).unit_type= INTERSECT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
+#line 50319 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3545: /* unit_type_decl: EXCEPT_SYM union_option */
+#line 17665 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.unit_operation).unit_type= EXCEPT_TYPE; (yyval.unit_operation).distinct= (yyvsp[0].num); }
+#line 50325 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3546: /* union_option: %empty */
+#line 17672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=1; }
+#line 50331 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3547: /* union_option: DISTINCT */
+#line 17673 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=1; }
+#line 50337 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3548: /* union_option: ALL */
+#line 17674 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)=0; }
+#line 50343 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3549: /* query_expression_option: STRAIGHT_JOIN */
+#line 17678 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_STRAIGHT_JOIN; }
+#line 50349 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3550: /* query_expression_option: HIGH_PRIORITY */
+#line 17680 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ YYPS->m_lock_type= TL_READ_HIGH_PRIORITY;
+ YYPS->m_mdl_type= MDL_SHARED_READ;
+ Select->options|= SELECT_HIGH_PRIORITY;
+ }
+#line 50359 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3551: /* query_expression_option: DISTINCT */
+#line 17685 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_DISTINCT; }
+#line 50365 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3552: /* query_expression_option: UNIQUE_SYM */
+#line 17686 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_DISTINCT; }
+#line 50371 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3553: /* query_expression_option: SQL_SMALL_RESULT */
+#line 17687 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_SMALL_RESULT; }
+#line 50377 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3554: /* query_expression_option: SQL_BIG_RESULT */
+#line 17688 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_BIG_RESULT; }
+#line 50383 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3555: /* query_expression_option: SQL_BUFFER_RESULT */
+#line 17689 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= OPTION_BUFFER_RESULT; }
+#line 50389 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3556: /* query_expression_option: SQL_CALC_FOUND_ROWS */
+#line 17690 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= OPTION_FOUND_ROWS; }
+#line 50395 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3557: /* query_expression_option: ALL */
+#line 17691 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Select->options|= SELECT_ALL; }
+#line 50401 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3560: /* no_definer: %empty */
+#line 17707 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ /*
+ We have to distinguish missing DEFINER-clause from case when
+ CURRENT_USER specified as definer explicitly in order to properly
+ handle CREATE TRIGGER statements which come to replication thread
+ from older master servers (i.e. to create non-suid trigger in this
+ case).
+ */
+ thd->lex->definer= 0;
+ }
+#line 50416 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3561: /* definer: DEFINER_SYM '=' user_or_role */
+#line 17721 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->definer= (yyvsp[0].lex_user);
+ Lex->account_options.reset();
+ }
+#line 50425 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3562: /* view_algorithm: ALGORITHM_SYM '=' UNDEFINED_SYM */
+#line 17734 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= DTYPE_ALGORITHM_UNDEFINED; }
+#line 50431 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3563: /* view_algorithm: ALGORITHM_SYM '=' MERGE_SYM */
+#line 17735 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_ALGORITHM_MERGE; }
+#line 50437 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3564: /* view_algorithm: ALGORITHM_SYM '=' TEMPTABLE_SYM */
+#line 17736 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_ALGORITHM_TMPTABLE; }
+#line 50443 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3565: /* opt_view_suid: %empty */
+#line 17740 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= VIEW_SUID_DEFAULT; }
+#line 50449 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3566: /* opt_view_suid: view_suid */
+#line 17741 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= (yyvsp[0].view_suid); }
+#line 50455 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3567: /* view_suid: SQL_SYM SECURITY_SYM DEFINER_SYM */
+#line 17745 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= VIEW_SUID_DEFINER; }
+#line 50461 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3568: /* view_suid: SQL_SYM SECURITY_SYM INVOKER_SYM */
+#line 17746 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.view_suid)= VIEW_SUID_INVOKER; }
+#line 50467 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3569: /* view_list_opt: %empty */
+#line 17751 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50473 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3570: /* view_list_opt: '(' view_list ')' */
+#line 17752 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 50479 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3571: /* view_list: ident */
+#line 17757 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->view_list.push_back((LEX_CSTRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
+ thd->mem_root);
+ }
+#line 50489 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3572: /* view_list: view_list ',' ident */
+#line 17763 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->view_list.push_back((LEX_CSTRING*)
+ thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
+ thd->mem_root);
+ }
+#line 50499 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3573: /* $@248: %empty */
+#line 17771 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->parsing_options.allows_variable= FALSE;
+ lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
+ }
+#line 50509 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3574: /* view_select: $@248 query_expression view_check_option */
+#line 17778 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->parsed_create_view((yyvsp[-1].select_lex_unit), (yyvsp[0].num)))
+ MYSQL_YYABORT;
+ }
+#line 50518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3575: /* view_check_option: %empty */
+#line 17785 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_NONE; }
+#line 50524 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3576: /* view_check_option: WITH CHECK_SYM OPTION */
+#line 17786 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_CASCADED; }
+#line 50530 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3577: /* view_check_option: WITH CASCADED CHECK_SYM OPTION */
+#line 17787 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_CASCADED; }
+#line 50536 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3578: /* view_check_option: WITH LOCAL_SYM CHECK_SYM OPTION */
+#line 17788 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= VIEW_CHECK_LOCAL; }
+#line 50542 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3579: /* trigger_action_order: FOLLOWS_SYM */
+#line 17799 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trigger_action_order_type)= TRG_ORDER_FOLLOWS; }
+#line 50548 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3580: /* trigger_action_order: PRECEDES_SYM */
+#line 17801 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.trigger_action_order_type)= TRG_ORDER_PRECEDES; }
+#line 50554 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3581: /* trigger_follows_precedes_clause: %empty */
+#line 17806 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.trg_execution_order).ordering_clause= TRG_ORDER_NONE;
+ (yyval.trg_execution_order).anchor_trigger_name.str= NULL;
+ (yyval.trg_execution_order).anchor_trigger_name.length= 0;
+ }
+#line 50564 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3582: /* trigger_follows_precedes_clause: trigger_action_order ident_or_text */
+#line 17813 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.trg_execution_order).ordering_clause= (yyvsp[-1].trigger_action_order_type);
+ (yyval.trg_execution_order).anchor_trigger_name= (yyvsp[0].lex_str);
+ }
+#line 50573 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3583: /* $@249: %empty */
+#line 17822 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))))
+ MYSQL_YYABORT;
+ }
+#line 50582 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3584: /* $@250: %empty */
+#line 17831 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $9 */
+ Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
+ }
+#line 50590 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3585: /* $@251: %empty */
+#line 17837 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $13 */
+ Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
+ }
+#line 50598 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3586: /* $@252: %empty */
+#line 17842 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->trg_chistics.ordering_clause_begin= YYLIP->get_cpp_ptr();
+ }
+#line 50606 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3587: /* $@253: %empty */
+#line 17846 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $18 */
+ LEX *lex= thd->lex;
+ Lex_input_stream *lip= YYLIP;
+
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_NO_RECURSIVE_CREATE, MYF(0), "TRIGGER"));
+
+ lex->stmt_definition_begin= (yyvsp[-16].simple_string);
+ lex->ident.str= (yyvsp[-9].simple_string);
+ lex->ident.length= (yyvsp[-5].simple_string) - (yyvsp[-9].simple_string);
+ lex->spname= (yyvsp[-13].spname);
+ (*static_cast<st_trg_execution_order*>(&lex->trg_chistics))= ((yyvsp[0].trg_execution_order));
+ lex->trg_chistics.ordering_clause_end= lip->get_cpp_ptr();
+
+ if (unlikely(!lex->make_sp_head(thd, (yyvsp[-13].spname), &sp_handler_trigger,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+
+ lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
+ }
+#line 50631 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3588: /* trigger_tail: remember_name opt_if_not_exists $@249 sp_name trg_action_time trg_event ON remember_name $@250 table_ident FOR_SYM remember_name $@251 EACH_SYM ROW_SYM $@252 trigger_follows_precedes_clause $@253 sp_proc_stmt force_lookahead */
+#line 17867 "/home/buildbot/git/sql/sql_yacc.yy"
+ { /* $21 */
+ LEX *lex= Lex;
+
+ lex->sql_command= SQLCOM_CREATE_TRIGGER;
+ if (lex->sp_body_finalize_trigger(thd))
+ MYSQL_YYABORT;
+
+ /*
+ We have to do it after parsing trigger body, because some of
+ sp_proc_stmt alternatives are not saving/restoring LEX, so
+ lex->query_tables can be wiped out.
+ */
+ if (!lex->first_select_lex()->
+ add_table_to_list(thd, (yyvsp[-10].table), (LEX_CSTRING*) 0,
+ TL_OPTION_UPDATING, TL_READ_NO_INSERT,
+ MDL_SHARED_NO_WRITE))
+ MYSQL_YYABORT;
+ }
+#line 50654 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3589: /* $@254: %empty */
+#line 17895 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->init_last_field(&lex->sphead->m_return_field_def,
+ &empty_clex_str);
+ }
+#line 50664 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3590: /* sf_return_type: $@254 field_type */
+#line 17901 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sf_return_fill_definition((yyvsp[0].Lex_field_type))))
+ MYSQL_YYABORT;
+ }
+#line 50673 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3591: /* xa: XA_SYM begin_or_start xid opt_join_or_resume */
+#line 17911 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_START;
+ }
+#line 50681 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3592: /* xa: XA_SYM END xid opt_suspend */
+#line 17915 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_END;
+ }
+#line 50689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3593: /* xa: XA_SYM PREPARE_SYM xid */
+#line 17919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_PREPARE;
+ }
+#line 50697 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3594: /* xa: XA_SYM COMMIT_SYM xid opt_one_phase */
+#line 17923 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_COMMIT;
+ }
+#line 50705 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3595: /* xa: XA_SYM ROLLBACK_SYM xid */
+#line 17927 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_ROLLBACK;
+ }
+#line 50713 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3596: /* xa: XA_SYM RECOVER_SYM opt_format_xid */
+#line 17931 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sql_command = SQLCOM_XA_RECOVER;
+ Lex->verbose= (yyvsp[0].num);
+ }
+#line 50722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3597: /* opt_format_xid: %empty */
+#line 17938 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= false; }
+#line 50728 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3598: /* opt_format_xid: FORMAT_SYM '=' ident_or_text */
+#line 17940 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("SQL")))
+ (yyval.num)= true;
+ else if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("RAW")))
+ (yyval.num)= false;
+ else
+ {
+ my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0),
+ "XA RECOVER", (yyvsp[0].lex_str).str));
+ (yyval.num)= false;
+ }
+ }
+#line 50745 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3599: /* xid: text_string */
+#line 17956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
+ if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
+ MYSQL_YYABORT;
+ Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
+ }
+#line 50756 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3600: /* xid: text_string ',' text_string */
+#line 17963 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
+ if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
+ MYSQL_YYABORT;
+ Lex->xid->set(1L, (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length(), (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length());
+ }
+#line 50767 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3601: /* xid: text_string ',' text_string ',' ulong_num */
+#line 17970 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE &&
+ (yyvsp[-2].string)->length() <= MAXBQUALSIZE &&
+ (yyvsp[0].ulong_num) <= static_cast<ulong>(
+ std::numeric_limits<int32_t>::max()));
+ if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
+ MYSQL_YYABORT;
+ Lex->xid->set((yyvsp[0].ulong_num), (yyvsp[-4].string)->ptr(), (yyvsp[-4].string)->length(), (yyvsp[-2].string)->ptr(), (yyvsp[-2].string)->length());
+ }
+#line 50781 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3602: /* begin_or_start: BEGIN_MARIADB_SYM */
+#line 17982 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50787 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3603: /* begin_or_start: BEGIN_ORACLE_SYM */
+#line 17983 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50793 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3604: /* begin_or_start: START_SYM */
+#line 17984 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50799 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3605: /* opt_join_or_resume: %empty */
+#line 17988 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_NONE; }
+#line 50805 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3606: /* opt_join_or_resume: JOIN_SYM */
+#line 17989 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_JOIN; }
+#line 50811 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3607: /* opt_join_or_resume: RESUME_SYM */
+#line 17990 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_RESUME; }
+#line 50817 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3608: /* opt_one_phase: %empty */
+#line 17994 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_NONE; }
+#line 50823 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3609: /* opt_one_phase: ONE_SYM PHASE_SYM */
+#line 17995 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_ONE_PHASE; }
+#line 50829 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3610: /* opt_suspend: %empty */
+#line 18000 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_NONE; }
+#line 50835 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3611: /* $@255: %empty */
+#line 18002 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_SUSPEND; }
+#line 50841 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3613: /* opt_migrate: %empty */
+#line 18007 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 50847 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3614: /* opt_migrate: FOR_SYM MIGRATE_SYM */
+#line 18008 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->xa_opt=XA_FOR_MIGRATE; }
+#line 50853 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3615: /* install: INSTALL_SYM PLUGIN_SYM opt_if_not_exists ident SONAME_SYM TEXT_STRING_sys */
+#line 18013 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_install_plugin((yyvsp[-3].object_ddl_options), (yyvsp[-2].ident_sys), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 50862 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3616: /* install: INSTALL_SYM SONAME_SYM TEXT_STRING_sys */
+#line 18018 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_install_plugin((yyvsp[0].lex_str));
+ }
+#line 50870 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3617: /* uninstall: UNINSTALL_SYM PLUGIN_SYM opt_if_exists ident */
+#line 18025 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_uninstall_plugin_by_name((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 50879 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3618: /* uninstall: UNINSTALL_SYM SONAME_SYM opt_if_exists TEXT_STRING_sys */
+#line 18030 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_uninstall_plugin_by_soname((yyvsp[-1].object_ddl_options), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 50888 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3619: /* keep_gcc_happy: IMPOSSIBLE_ACTION */
+#line 18039 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ YYERROR;
+ }
+#line 50896 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3624: /* $@256: %empty */
+#line 18480 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ // Direct procedure call (without the CALL keyword)
+ Lex_ident_sys tmp(thd, &(yyvsp[0].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->call_statement_start(thd, &tmp)))
+ MYSQL_YYABORT;
+ }
+#line 50908 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3625: /* sp_statement: ident_cli_directly_assignable $@256 opt_sp_cparam_list */
+#line 18488 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 50917 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3626: /* $@257: %empty */
+#line 18493 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-2].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->call_statement_start(thd, &tmp, &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 50928 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3627: /* sp_statement: ident_cli_directly_assignable '.' ident $@257 opt_sp_cparam_list */
+#line 18500 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 50937 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3628: /* $@258: %empty */
+#line 18505 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-4].ident_cli));
+ if (unlikely(Lex->call_statement_start(thd, &tmp, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 50947 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3629: /* sp_statement: ident_cli_directly_assignable '.' ident '.' ident $@258 opt_sp_cparam_list */
+#line 18511 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->check_cte_dependencies_and_resolve_references())
+ MYSQL_YYABORT;
+ }
+#line 50956 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3630: /* sp_if_then_statements: sp_proc_stmts1_implicit_block */
+#line 18518 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 50962 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3631: /* sp_case_then_statements: sp_proc_stmts1_implicit_block */
+#line 18522 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 50968 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3655: /* row_field_name: ident_directly_assignable */
+#line 18572 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (!((yyval.spvar_definition)= Lex->row_field_name(thd, (yyvsp[0].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 50977 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3656: /* $@259: %empty */
+#line 18580 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyvsp[-1].expr_lex)->sp_while_loop_expression(thd)))
+ MYSQL_YYABORT;
+ }
+#line 50986 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3657: /* while_body: expr_lex LOOP_SYM $@259 sp_proc_stmts1 END LOOP_SYM */
+#line 18585 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_while_loop_finalize(thd)))
+ MYSQL_YYABORT;
+ }
+#line 50995 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3658: /* for_loop_statements: LOOP_SYM sp_proc_stmts1 END LOOP_SYM */
+#line 18593 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 51001 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3660: /* sp_block_label: labels_declaration_oracle */
+#line 18603 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->spcont->block_label_declare(&(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ (yyval.lex_str)= (yyvsp[0].lex_str);
+ }
+#line 51011 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3661: /* remember_end_opt: %empty */
+#line 18612 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (yychar == YYEMPTY)
+ (yyval.simple_string)= (char*) YYLIP->get_cpp_ptr_rtrim();
+ else
+ (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
+ }
+#line 51022 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3662: /* sp_opt_default: _empty */
+#line 18621 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = NULL; }
+#line 51028 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3663: /* sp_opt_default: DEFAULT expr */
+#line 18622 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item); }
+#line 51034 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3664: /* sp_opt_default: SET_VAR expr */
+#line 18623 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.item) = (yyvsp[0].item); }
+#line 51040 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3665: /* sp_opt_inout: _empty */
+#line 18627 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_IN; }
+#line 51046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3667: /* sp_opt_inout: IN_SYM OUT_SYM */
+#line 18629 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
+#line 51052 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3668: /* $@260: %empty */
+#line 18633 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd);
+ }
+#line 51060 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3669: /* sp_proc_stmts1_implicit_block: $@260 sp_proc_stmts1 */
+#line 18637 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_finalize(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51069 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3670: /* remember_lex: %empty */
+#line 18645 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.lex)= thd->lex;
+ }
+#line 51077 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3680: /* ident_directly_assignable: keyword_directly_assignable */
+#line 18664 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
+ MYSQL_YYABORT;
+ }
+#line 51086 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3682: /* ident_cli_directly_assignable: keyword_directly_assignable */
+#line 18672 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.ident_cli)= (yyvsp[0].kwd); }
+#line 51092 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3683: /* $@261: %empty */
+#line 18678 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_stmt_init();
+ if (sp_create_assignment_lex(thd, (yyvsp[-1].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 51103 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3684: /* set_assign: ident_cli_directly_assignable SET_VAR $@261 set_expr_or_default */
+#line 18685 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex_ident_sys tmp(thd, &(yyvsp[-3].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(Lex->set_variable(&tmp, (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY,
+ false)))
+ MYSQL_YYABORT;
+ }
+#line 51116 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3685: /* $@262: %empty */
+#line 18694 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex=Lex;
+ lex->set_stmt_init();
+ if (sp_create_assignment_lex(thd, (yyvsp[-3].ident_cli).pos()))
+ MYSQL_YYABORT;
+ }
+#line 51127 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3686: /* set_assign: ident_cli_directly_assignable '.' ident SET_VAR $@262 set_expr_or_default */
+#line 18701 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ DBUG_ASSERT(lex->var_list.is_empty());
+ Lex_ident_sys tmp(thd, &(yyvsp[-5].ident_cli));
+ if (unlikely(!tmp.str) ||
+ unlikely(lex->set_variable(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY,
+ false)))
+ MYSQL_YYABORT;
+ }
+#line 51142 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3687: /* $@263: %empty */
+#line 18712 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ if (unlikely(!lex->is_trigger_new_or_old_reference(&(yyvsp[-3].ident_sys))))
+ {
+ thd->parse_error(ER_SYNTAX_ERROR, (yyvsp[-4].kwd).pos());
+ MYSQL_YYABORT;
+ }
+ lex->set_stmt_init();
+ if (sp_create_assignment_lex(thd, (yyvsp[-4].kwd).pos()))
+ MYSQL_YYABORT;
+ }
+#line 51158 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3688: /* set_assign: COLON_ORACLE_SYM ident '.' ident SET_VAR $@263 set_expr_or_default */
+#line 18724 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX_CSTRING tmp= { (yyvsp[-5].ident_sys).str, (yyvsp[-5].ident_sys).length };
+ if (unlikely(Lex->set_trigger_field(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
+ unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY,
+ false)))
+ MYSQL_YYABORT;
+ }
+#line 51170 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3689: /* labels_declaration_oracle: label_declaration_oracle */
+#line 18735 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].lex_str); }
+#line 51176 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3690: /* labels_declaration_oracle: labels_declaration_oracle label_declaration_oracle */
+#line 18736 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].lex_str); }
+#line 51182 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3691: /* label_declaration_oracle: SHIFT_LEFT label_ident SHIFT_RIGHT */
+#line 18741 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_push_goto_label(thd, &(yyvsp[-1].ident_sys))))
+ MYSQL_YYABORT;
+ (yyval.lex_str)= (yyvsp[-1].ident_sys);
+ }
+#line 51192 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3692: /* opt_exception_clause: _empty */
+#line 18749 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 0; }
+#line 51198 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3693: /* opt_exception_clause: EXCEPTION_ORACLE_SYM exception_handlers */
+#line 18750 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[0].num); }
+#line 51204 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3694: /* exception_handlers: exception_handler */
+#line 18754 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= 1; }
+#line 51210 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3695: /* exception_handlers: exception_handlers exception_handler */
+#line 18755 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.num)= (yyvsp[-1].num) + 1; }
+#line 51216 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3696: /* $@264: %empty */
+#line 18760 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_handler_declaration_init(thd, sp_handler::EXIT)))
+ MYSQL_YYABORT;
+ }
+#line 51225 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3697: /* exception_handler: WHEN_SYM $@264 sp_hcond_list THEN_SYM sp_proc_stmts1_implicit_block */
+#line 18767 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_handler_declaration_finalize(thd, sp_handler::EXIT)))
+ MYSQL_YYABORT;
+ }
+#line 51234 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3698: /* sp_no_param: _empty */
+#line 18775 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->m_param_begin= Lex->sphead->m_param_end=
+ YYLIP->get_cpp_tok_start() + 1;
+ }
+#line 51243 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3703: /* opt_sp_name: _empty */
+#line 18793 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spname)= NULL; }
+#line 51249 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3704: /* opt_sp_name: sp_name */
+#line 18794 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spname)= (yyvsp[0].spname); }
+#line 51255 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3705: /* opt_package_routine_end_name: _empty */
+#line 18799 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= null_clex_str; }
+#line 51261 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3706: /* opt_package_routine_end_name: ident */
+#line 18800 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.lex_str)= (yyvsp[0].ident_sys); }
+#line 51267 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3709: /* sp_instr_addr: %empty */
+#line 18809 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.sp_instr_addr)= Lex->sphead->instructions(); }
+#line 51273 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3710: /* $@265: %empty */
+#line 18813 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd);
+ }
+#line 51281 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3711: /* $@266: %empty */
+#line 18817 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51290 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3712: /* $@267: %empty */
+#line 18823 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-3].spblock).hndlrs+= (yyvsp[0].spblock_handlers).hndlrs;
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock))))
+ MYSQL_YYABORT;
+ }
+#line 51300 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3714: /* create_package_chistic: COMMENT_SYM TEXT_STRING_sys */
+#line 18833 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
+#line 51306 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3715: /* create_package_chistic: sp_suid */
+#line 18835 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.suid= (yyvsp[0].sp_suid); }
+#line 51312 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3716: /* create_package_chistics: create_package_chistic */
+#line 18839 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51318 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3717: /* create_package_chistics: create_package_chistics create_package_chistic */
+#line 18840 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 51324 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3719: /* opt_create_package_chistics: create_package_chistics */
+#line 18845 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 51330 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3720: /* $@268: %empty */
+#line 18849 "/home/buildbot/git/sql/sql_yacc.yy"
+ { Lex->sp_chistics.init(); }
+#line 51336 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3722: /* package_implementation_executable_section: END */
+#line 18856 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_add_empty(thd)))
+ MYSQL_YYABORT;
+ (yyval.spblock_handlers).init(0);
+ }
+#line 51346 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3723: /* package_implementation_executable_section: BEGIN_ORACLE_SYM sp_block_statements_and_exceptions END */
+#line 18861 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock_handlers)= (yyvsp[-1].spblock_handlers); }
+#line 51352 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3726: /* package_implementation_declare_section: package_implementation_declare_section_list1 package_implementation_declare_section_list2 */
+#line 18873 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock).join((yyvsp[-1].spblock), (yyvsp[0].spblock)); }
+#line 51358 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3728: /* package_implementation_declare_section_list1: package_implementation_declare_section_list1 package_implementation_item_declaration */
+#line 18880 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock).join((yyvsp[-1].spblock), (yyvsp[0].spblock)); }
+#line 51364 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3730: /* package_implementation_declare_section_list2: package_implementation_declare_section_list2 package_implementation_routine_definition */
+#line 18887 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock).join((yyvsp[-1].spblock), (yyvsp[0].spblock)); }
+#line 51370 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3731: /* package_routine_lex: %empty */
+#line 18891 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!((yyval.lex)= new (thd->mem_root)
+ sp_lex_local(thd, thd->lex))))
+ MYSQL_YYABORT;
+ thd->m_parser_state->m_yacc.reset_before_substatement();
+ }
+#line 51381 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3732: /* $@269: %empty */
+#line 18902 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-2].lex)->sphead->get_package());
+ (yyvsp[-1].lex)->sql_command= SQLCOM_CREATE_FUNCTION;
+ sp_name *spname= (yyvsp[-2].lex)->make_sp_name_package_routine(thd, &(yyvsp[0].ident_sys));
+ if (unlikely(!spname))
+ MYSQL_YYABORT;
+ thd->lex= (yyvsp[-1].lex);
+ if (unlikely(!(yyvsp[-1].lex)->make_sp_head_no_recursive(thd, spname,
+ &sp_handler_package_function,
+ NOT_AGGREGATE)))
+ MYSQL_YYABORT;
+ (yyvsp[-2].lex)->sphead->get_package()->m_current_routine= (yyvsp[-1].lex);
+ (void) is_native_function_with_warn(thd, &(yyvsp[0].ident_sys));
+ }
+#line 51400 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3733: /* package_specification_function: remember_lex package_routine_lex ident $@269 opt_sp_parenthesized_fdparam_list RETURN_ORACLE_SYM sf_return_type sp_c_chistics */
+#line 18919 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_head *sp= thd->lex->sphead;
+ sp->restore_thd_mem_root(thd);
+ thd->lex= (yyvsp[-7].lex);
+ (yyval.lex)= (yyvsp[-6].lex);
+ }
+#line 51411 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3734: /* $@270: %empty */
+#line 18929 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ DBUG_ASSERT((yyvsp[-2].lex)->sphead->get_package());
+ (yyvsp[-1].lex)->sql_command= SQLCOM_CREATE_PROCEDURE;
+ sp_name *spname= (yyvsp[-2].lex)->make_sp_name_package_routine(thd, &(yyvsp[0].ident_sys));
+ if (unlikely(!spname))
+ MYSQL_YYABORT;
+ thd->lex= (yyvsp[-1].lex);
+ if (unlikely(!(yyvsp[-1].lex)->make_sp_head_no_recursive(thd, spname,
+ &sp_handler_package_procedure,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+ (yyvsp[-2].lex)->sphead->get_package()->m_current_routine= (yyvsp[-1].lex);
+ }
+#line 51429 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3735: /* package_specification_procedure: remember_lex package_routine_lex ident $@270 opt_sp_parenthesized_pdparam_list sp_c_chistics */
+#line 18944 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_head *sp= thd->lex->sphead;
+ sp->restore_thd_mem_root(thd);
+ thd->lex= (yyvsp[-5].lex);
+ (yyval.lex)= (yyvsp[-4].lex);
+ }
+#line 51440 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3736: /* package_implementation_routine_definition: FUNCTION_SYM package_specification_function package_implementation_function_body ';' */
+#line 18956 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg= Lex->get_sp_package();
+ if (unlikely(pkg->add_routine_implementation((yyvsp[-2].lex))))
+ MYSQL_YYABORT;
+ pkg->m_current_routine= NULL;
+ (yyval.spblock).init();
+ }
+#line 51452 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3737: /* package_implementation_routine_definition: PROCEDURE_SYM package_specification_procedure package_implementation_procedure_body ';' */
+#line 18965 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg= Lex->get_sp_package();
+ if (unlikely(pkg->add_routine_implementation((yyvsp[-2].lex))))
+ MYSQL_YYABORT;
+ pkg->m_current_routine= NULL;
+ (yyval.spblock).init();
+ }
+#line 51464 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3738: /* package_implementation_routine_definition: package_specification_element */
+#line 18972 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock).init(); }
+#line 51470 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3739: /* $@271: %empty */
+#line 18978 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg= Lex->get_sp_package();
+ sp_head *sp= pkg->m_current_routine->sphead;
+ thd->lex= pkg->m_current_routine;
+ sp->reset_thd_mem_root(thd);
+ sp->set_c_chistics(thd->lex->sp_chistics);
+ sp->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51483 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3740: /* package_implementation_function_body: sp_tail_is remember_lex $@271 sp_body opt_package_routine_end_name */
+#line 18987 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(thd->lex->sp_body_finalize_function(thd) ||
+ thd->lex->sphead->check_package_routine_end_name((yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ thd->lex= (yyvsp[-3].lex);
+ }
+#line 51494 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3741: /* $@272: %empty */
+#line 18997 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg= Lex->get_sp_package();
+ sp_head *sp= pkg->m_current_routine->sphead;
+ thd->lex= pkg->m_current_routine;
+ sp->reset_thd_mem_root(thd);
+ sp->set_c_chistics(thd->lex->sp_chistics);
+ sp->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51507 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3742: /* package_implementation_procedure_body: sp_tail_is remember_lex $@272 sp_body opt_package_routine_end_name */
+#line 19006 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(thd->lex->sp_body_finalize_procedure(thd) ||
+ thd->lex->sphead->check_package_routine_end_name((yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ thd->lex= (yyvsp[-3].lex);
+ }
+#line 51518 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3748: /* package_specification_element: FUNCTION_SYM package_specification_function ';' */
+#line 19031 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg= Lex->get_sp_package();
+ if (unlikely(pkg->add_routine_declaration((yyvsp[-1].lex))))
+ MYSQL_YYABORT;
+ pkg->m_current_routine= NULL;
+ }
+#line 51529 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3749: /* package_specification_element: PROCEDURE_SYM package_specification_procedure ';' */
+#line 19038 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg= Lex->get_sp_package();
+ if (unlikely(pkg->add_routine_declaration((yyvsp[-1].lex))))
+ MYSQL_YYABORT;
+ pkg->m_current_routine= NULL;
+ }
+#line 51540 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3750: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars optionally_qualified_column_ident PERCENT_ORACLE_SYM TYPE_SYM sp_opt_default */
+#line 19050 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_with_ref_finalize(thd, (yyvsp[-4].num), (yyvsp[-3].qualified_column_ident), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-4].num));
+ }
+#line 51550 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3751: /* sp_decl_variable_list_anchored: sp_decl_idents_init_vars optionally_qualified_column_ident PERCENT_ORACLE_SYM ROWTYPE_ORACLE_SYM sp_opt_default */
+#line 19058 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_variable_declarations_rowtype_finalize(thd, (yyvsp[-4].num), (yyvsp[-3].qualified_column_ident), (yyvsp[0].item))))
+ MYSQL_YYABORT;
+ (yyval.spblock).init_using_vars((yyvsp[-4].num));
+ }
+#line 51560 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3752: /* sp_param_name_and_mode: sp_param_name sp_opt_inout */
+#line 19067 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-1].spvar)->mode= (yyvsp[0].spvar_mode);
+ (yyval.spvar)= (yyvsp[-1].spvar);
+ }
+#line 51569 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3753: /* sp_param: sp_param_name_and_mode field_type */
+#line 19075 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_param_fill_definition((yyval.spvar)= (yyvsp[-1].spvar), (yyvsp[0].Lex_field_type))))
+ MYSQL_YYABORT;
+ }
+#line 51578 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3754: /* sp_param: sp_param_name_and_mode ROW_SYM row_type_body */
+#line 19080 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_row(thd, (yyval.spvar)= (yyvsp[-2].spvar), (yyvsp[0].spvar_definition_list))))
+ MYSQL_YYABORT;
+ }
+#line 51587 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3756: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident '.' ident PERCENT_ORACLE_SYM TYPE_SYM */
+#line 19089 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51596 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3757: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident '.' ident '.' ident PERCENT_ORACLE_SYM TYPE_SYM */
+#line 19094 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-7].spvar), (yyvsp[-6].ident_sys), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51605 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3758: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident PERCENT_ORACLE_SYM ROWTYPE_ORACLE_SYM */
+#line 19099 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-3].spvar), (yyvsp[-2].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51614 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3759: /* sp_param_anchored: sp_param_name_and_mode sp_decl_ident '.' ident PERCENT_ORACLE_SYM ROWTYPE_ORACLE_SYM */
+#line 19104 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
+ MYSQL_YYABORT;
+ }
+#line 51623 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3760: /* $@273: %empty */
+#line 19113 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= thd->lex;
+ lex->sphead->set_c_chistics(lex->sp_chistics);
+ lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51633 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3761: /* sf_c_chistics_and_body_standalone: sp_c_chistics $@273 sp_tail_is sp_body force_lookahead */
+#line 19119 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_body_finalize_function(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51642 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3762: /* $@274: %empty */
+#line 19127 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[0].spname),
+ &sp_handler_procedure,
+ DEFAULT_AGGREGATE)))
+ MYSQL_YYABORT;
+ }
+#line 51653 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3763: /* $@275: %empty */
+#line 19135 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sphead->set_c_chistics(Lex->sp_chistics);
+ Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51662 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3764: /* sp_tail_standalone: sp_name $@274 opt_sp_parenthesized_pdparam_list sp_c_chistics $@275 sp_tail_is sp_body opt_sp_name */
+#line 19142 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_body_finalize_procedure_standalone(thd, (yyvsp[0].spname))))
+ MYSQL_YYABORT;
+ }
+#line 51671 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3765: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident '.' ident */
+#line 19150 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_drop_function((yyvsp[-3].object_ddl_options), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 51680 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3766: /* drop_routine: DROP FUNCTION_SYM opt_if_exists ident */
+#line 19155 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_drop_function((yyvsp[-1].object_ddl_options), (yyvsp[0].ident_sys)))
+ MYSQL_YYABORT;
+ }
+#line 51689 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3767: /* drop_routine: DROP PROCEDURE_SYM opt_if_exists sp_name */
+#line 19160 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_drop_procedure((yyvsp[-1].object_ddl_options), (yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51698 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3768: /* drop_routine: DROP PACKAGE_ORACLE_SYM opt_if_exists sp_name */
+#line 19165 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_PACKAGE, (yyvsp[-1].object_ddl_options));
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE"));
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 51710 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3769: /* drop_routine: DROP PACKAGE_ORACLE_SYM BODY_ORACLE_SYM opt_if_exists sp_name */
+#line 19173 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ LEX *lex= Lex;
+ lex->set_command(SQLCOM_DROP_PACKAGE_BODY, (yyvsp[-1].object_ddl_options));
+ if (unlikely(lex->sphead))
+ my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE BODY"));
+ lex->spname= (yyvsp[0].spname);
+ }
+#line 51722 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3770: /* $@276: %empty */
+#line 19185 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_procedure_start((yyvsp[-3].object_ddl_options) | (yyvsp[0].object_ddl_options)))
+ MYSQL_YYABORT;
+ }
+#line 51731 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3771: /* create_routine: create_or_replace definer_opt PROCEDURE_SYM opt_if_not_exists $@276 sp_tail_standalone */
+#line 19190 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->stmt_create_routine_finalize();
+ }
+#line 51739 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3772: /* $@277: %empty */
+#line 19195 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_stored_function_start((yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-3].sp_aggregate_type), (yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51748 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3773: /* create_routine: create_or_replace definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@277 opt_sp_parenthesized_fdparam_list RETURN_ORACLE_SYM sf_return_type sf_c_chistics_and_body_standalone opt_sp_name */
+#line 19203 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_stored_function_finalize_standalone((yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51757 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3774: /* $@278: %empty */
+#line 19209 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_stored_function_start((yyvsp[-5].object_ddl_options) | (yyvsp[-1].object_ddl_options), (yyvsp[-3].sp_aggregate_type), (yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51766 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3775: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists sp_name $@278 opt_sp_parenthesized_fdparam_list RETURN_ORACLE_SYM sf_return_type sf_c_chistics_and_body_standalone opt_sp_name */
+#line 19217 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_stored_function_finalize_standalone((yyvsp[0].spname)))
+ MYSQL_YYABORT;
+ }
+#line 51775 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3776: /* create_routine: create_or_replace no_definer opt_aggregate FUNCTION_SYM opt_if_not_exists ident RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys */
+#line 19223 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (Lex->stmt_create_udf_function((yyvsp[-9].object_ddl_options) | (yyvsp[-5].object_ddl_options), (yyvsp[-7].sp_aggregate_type), (yyvsp[-4].ident_sys),
+ (Item_result) (yyvsp[-2].num), (yyvsp[0].lex_str)))
+ MYSQL_YYABORT;
+ }
+#line 51785 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3777: /* $@279: %empty */
+#line 19230 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg;
+ if (unlikely(!(pkg= Lex->
+ create_package_start(thd,
+ SQLCOM_CREATE_PACKAGE,
+ &sp_handler_package_spec,
+ (yyvsp[-1].spname), (yyvsp[-5].object_ddl_options) | (yyvsp[-2].object_ddl_options)))))
+ MYSQL_YYABORT;
+ pkg->set_c_chistics(Lex->sp_chistics);
+ Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ }
+#line 51801 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3778: /* create_routine: create_or_replace definer_opt PACKAGE_ORACLE_SYM opt_if_not_exists sp_name opt_create_package_chistics_init $@279 sp_tail_is opt_package_specification_element_list END remember_end_opt opt_sp_name */
+#line 19244 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_package_finalize(thd, (yyvsp[-7].spname), (yyvsp[0].spname), (yyvsp[-1].simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 51810 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3779: /* $@280: %empty */
+#line 19250 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_package *pkg;
+ if (unlikely(!(pkg= Lex->
+ create_package_start(thd,
+ SQLCOM_CREATE_PACKAGE_BODY,
+ &sp_handler_package_body,
+ (yyvsp[-1].spname), (yyvsp[-6].object_ddl_options) | (yyvsp[-2].object_ddl_options)))))
+ MYSQL_YYABORT;
+ pkg->set_c_chistics(Lex->sp_chistics);
+ Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
+ Lex->sp_block_init(thd);
+ }
+#line 51827 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3780: /* $@281: %empty */
+#line 19264 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51836 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3781: /* $@282: %empty */
+#line 19269 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-2].spblock).hndlrs+= (yyvsp[0].spblock_handlers).hndlrs;
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
+ MYSQL_YYABORT;
+ }
+#line 51846 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3782: /* create_routine: create_or_replace definer_opt PACKAGE_ORACLE_SYM BODY_ORACLE_SYM opt_if_not_exists sp_name opt_create_package_chistics_init $@280 sp_tail_is package_implementation_declare_section $@281 package_implementation_executable_section $@282 remember_end_opt opt_sp_name */
+#line 19275 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->create_package_finalize(thd, (yyvsp[-9].spname), (yyvsp[0].spname), (yyvsp[-1].simple_string))))
+ MYSQL_YYABORT;
+ }
+#line 51855 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3783: /* opt_sp_decl_body_list: _empty */
+#line 19283 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spblock).init();
+ }
+#line 51863 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3784: /* opt_sp_decl_body_list: sp_decl_body_list */
+#line 19286 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock)= (yyvsp[0].spblock); }
+#line 51869 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3785: /* $@283: %empty */
+#line 19291 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sphead->sp_add_instr_cpush_for_cursors(thd, Lex->spcont)))
+ MYSQL_YYABORT;
+ }
+#line 51878 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3786: /* sp_decl_body_list: sp_decl_non_handler_list $@283 opt_sp_decl_handler_list */
+#line 19296 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[0].spblock));
+ }
+#line 51886 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3788: /* sp_decl_non_handler_list: sp_decl_non_handler ';' */
+#line 19303 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock)= (yyvsp[-1].spblock); }
+#line 51892 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3789: /* sp_decl_non_handler_list: sp_decl_non_handler_list sp_decl_non_handler ';' */
+#line 19305 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[-1].spblock));
+ }
+#line 51900 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3790: /* sp_decl_handler_list: sp_decl_handler ';' */
+#line 19311 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock)= (yyvsp[-1].spblock); }
+#line 51906 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3791: /* sp_decl_handler_list: sp_decl_handler_list sp_decl_handler ';' */
+#line 19313 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[-1].spblock));
+ }
+#line 51914 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3792: /* opt_sp_decl_handler_list: _empty */
+#line 19319 "/home/buildbot/git/sql/sql_yacc.yy"
+ { (yyval.spblock).init(); }
+#line 51920 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3795: /* sp_decl_non_handler: ident_directly_assignable CONDITION_SYM FOR_SYM sp_cond */
+#line 19326 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->spcont->declare_condition(thd, &(yyvsp[-3].ident_sys), (yyvsp[0].spcondvalue))))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
+ (yyval.spblock).conds= 1;
+ }
+#line 51931 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3796: /* sp_decl_non_handler: ident_directly_assignable EXCEPTION_ORACLE_SYM */
+#line 19333 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_condition_value *spcond= new (thd->mem_root)
+ sp_condition_value_user_defined();
+ if (unlikely(!spcond) ||
+ unlikely(Lex->spcont->declare_condition(thd, &(yyvsp[-1].ident_sys), spcond)))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
+ (yyval.spblock).conds= 1;
+ }
+#line 51945 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3797: /* $@284: %empty */
+#line 19343 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd);
+ }
+#line 51953 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3798: /* sp_decl_non_handler: CURSOR_SYM ident_directly_assignable $@284 opt_parenthesized_cursor_formal_parameters IS sp_cursor_stmt */
+#line 19348 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ sp_pcontext *param_ctx= Lex->spcont;
+ if (unlikely(Lex->sp_block_finalize(thd)))
+ MYSQL_YYABORT;
+ if (unlikely(Lex->sp_declare_cursor(thd, &(yyvsp[-4].ident_sys), (yyvsp[0].sp_cursor_stmt), param_ctx, false)))
+ MYSQL_YYABORT;
+ (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).hndlrs= 0;
+ (yyval.spblock).curs= 1;
+ }
+#line 51967 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3804: /* sp_proc_stmt: labels_declaration_oracle sp_labelable_stmt */
+#line 19366 "/home/buildbot/git/sql/sql_yacc.yy"
+ {}
+#line 51973 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3815: /* sp_labelable_stmt: NULL_SYM */
+#line 19380 "/home/buildbot/git/sql/sql_yacc.yy"
+ { }
+#line 51979 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3820: /* $@285: %empty */
+#line 19394 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
+ MYSQL_YYABORT;
+ }
+#line 51989 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3821: /* sp_labeled_block: sp_block_label BEGIN_ORACLE_SYM $@285 sp_block_statements_and_exceptions END sp_opt_label */
+#line 19402 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_finalize(thd, Lex_spblock((yyvsp[-2].spblock_handlers)), &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 51998 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3822: /* $@286: %empty */
+#line 19408 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
+ }
+#line 52006 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3823: /* $@287: %empty */
+#line 19412 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
+ MYSQL_YYABORT;
+ }
+#line 52015 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3824: /* sp_labeled_block: sp_block_label DECLARE_ORACLE_SYM $@286 opt_sp_decl_body_list $@287 BEGIN_ORACLE_SYM sp_block_statements_and_exceptions END sp_opt_label */
+#line 19420 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-5].spblock).hndlrs+= (yyvsp[-2].spblock_handlers).hndlrs;
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-5].spblock), &(yyvsp[0].lex_str))))
+ MYSQL_YYABORT;
+ }
+#line 52025 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3827: /* $@288: %empty */
+#line 19434 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sp_block_init(thd);
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
+ MYSQL_YYABORT;
+ }
+#line 52037 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3828: /* sp_unlabeled_block: BEGIN_ORACLE_SYM opt_not_atomic $@288 sp_block_statements_and_exceptions END */
+#line 19443 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_finalize(thd, Lex_spblock((yyvsp[-1].spblock_handlers)))))
+ MYSQL_YYABORT;
+ }
+#line 52046 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3829: /* $@289: %empty */
+#line 19448 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->maybe_start_compound_statement(thd)))
+ MYSQL_YYABORT;
+ Lex->sp_block_init(thd);
+ }
+#line 52056 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3830: /* $@290: %empty */
+#line 19454 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
+ MYSQL_YYABORT;
+ }
+#line 52065 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3831: /* sp_unlabeled_block: DECLARE_ORACLE_SYM $@289 opt_sp_decl_body_list $@290 BEGIN_ORACLE_SYM sp_block_statements_and_exceptions END */
+#line 19461 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ (yyvsp[-4].spblock).hndlrs+= (yyvsp[-1].spblock_handlers).hndlrs;
+ if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-4].spblock))))
+ MYSQL_YYABORT;
+ }
+#line 52075 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3832: /* $@291: %empty */
+#line 19471 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_executable_section(thd, (yyvsp[-1].sp_instr_addr))))
+ MYSQL_YYABORT;
+ }
+#line 52084 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+ case 3833: /* sp_block_statements_and_exceptions: sp_instr_addr sp_proc_stmts $@291 opt_exception_clause */
+#line 19476 "/home/buildbot/git/sql/sql_yacc.yy"
+ {
+ if (unlikely(Lex->sp_block_with_exceptions_finalize_exceptions(thd, (yyvsp[-3].sp_instr_addr), (yyvsp[0].num))))
+ MYSQL_YYABORT;
+ (yyval.spblock_handlers).init((yyvsp[0].num));
+ }
+#line 52094 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+ break;
+
+
+#line 52098 "/home/buildbot/git/mkdist/sql/yy_oracle.cc"
+
+ default: break;
+ }
+ /* User semantic actions sometimes alter yychar, and that requires
+ that yytoken be updated with the new translation. We take the
+ approach of translating immediately before every use of yytoken.
+ One alternative is translating here after every semantic action,
+ but that translation would be missed if the semantic action invokes
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
+ incorrect destructor might then be invoked immediately. In the
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead
+ to an incorrect destructor call or verbose syntax error message
+ before the lookahead is translated. */
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+
+ *++yyvsp = yyval;
+
+ /* Now 'shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+ {
+ const int yylhs = yyr1[yyn] - YYNTOKENS;
+ const int yyi = yypgoto[yylhs] + *yyssp;
+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+ ? yytable[yyi]
+ : yydefgoto[yylhs]);
+ }
+
+ goto yynewstate;
+
+
+/*--------------------------------------.
+| yyerrlab -- here on detecting error. |
+`--------------------------------------*/
+yyerrlab:
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+ yyerror (thd, YY_("syntax error"));
+ }
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval, thd);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+ /* Pacify compilers when the user code never invokes YYERROR and the
+ label yyerrorlab therefore never appears in user code. */
+ if (0)
+ YYERROR;
+ ++yynerrs;
+
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ /* Pop stack until we find a state that shifts the error token. */
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ YY_ACCESSING_SYMBOL (yystate), yyvsp, thd);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturnlab;
+
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturnlab;
+
+
+/*-----------------------------------------------------------.
+| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
+`-----------------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (thd, YY_("memory exhausted"));
+ yyresult = 2;
+ goto yyreturnlab;
+
+
+/*----------------------------------------------------------.
+| yyreturnlab -- parsing is finished, clean up and return. |
+`----------------------------------------------------------*/
+yyreturnlab:
+ if (yychar != YYEMPTY)
+ {
+ /* Make sure we have latest lookahead translation. See comments at
+ user semantic actions for why this is necessary. */
+ yytoken = YYTRANSLATE (yychar);
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval, thd);
+ }
+ /* Do not reclaim the symbols of the rule whose action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, thd);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+
+ return yyresult;
+}
+
diff --git a/sql/yy_oracle.hh b/sql/yy_oracle.hh
new file mode 100644
index 00000000..9c7af745
--- /dev/null
+++ b/sql/yy_oracle.hh
@@ -0,0 +1,981 @@
+/* A Bison parser, made by GNU Bison 3.8.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
+ Inc.
+
+ This program is free 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 3 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, see <https://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
+#ifndef YY_ORA_HOME_BUILDBOT_GIT_MKDIST_SQL_YY_ORACLE_HH_INCLUDED
+# define YY_ORA_HOME_BUILDBOT_GIT_MKDIST_SQL_YY_ORACLE_HH_INCLUDED
+/* Debug traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int ORAdebug;
+#endif
+
+/* Token kinds. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ ABORT_SYM = 258, /* ABORT_SYM */
+ IMPOSSIBLE_ACTION = 259, /* IMPOSSIBLE_ACTION */
+ FORCE_LOOKAHEAD = 260, /* FORCE_LOOKAHEAD */
+ END_OF_INPUT = 261, /* END_OF_INPUT */
+ COLON_ORACLE_SYM = 262, /* COLON_ORACLE_SYM */
+ PARAM_MARKER = 263, /* PARAM_MARKER */
+ FOR_SYSTEM_TIME_SYM = 264, /* FOR_SYSTEM_TIME_SYM */
+ LEFT_PAREN_ALT = 265, /* LEFT_PAREN_ALT */
+ LEFT_PAREN_WITH = 266, /* LEFT_PAREN_WITH */
+ LEFT_PAREN_LIKE = 267, /* LEFT_PAREN_LIKE */
+ ORACLE_CONCAT_SYM = 268, /* ORACLE_CONCAT_SYM */
+ PERCENT_ORACLE_SYM = 269, /* PERCENT_ORACLE_SYM */
+ WITH_CUBE_SYM = 270, /* WITH_CUBE_SYM */
+ WITH_ROLLUP_SYM = 271, /* WITH_ROLLUP_SYM */
+ WITH_SYSTEM_SYM = 272, /* WITH_SYSTEM_SYM */
+ IDENT = 273, /* IDENT */
+ IDENT_QUOTED = 274, /* IDENT_QUOTED */
+ LEX_HOSTNAME = 275, /* LEX_HOSTNAME */
+ UNDERSCORE_CHARSET = 276, /* UNDERSCORE_CHARSET */
+ BIN_NUM = 277, /* BIN_NUM */
+ DECIMAL_NUM = 278, /* DECIMAL_NUM */
+ FLOAT_NUM = 279, /* FLOAT_NUM */
+ HEX_NUM = 280, /* HEX_NUM */
+ HEX_STRING = 281, /* HEX_STRING */
+ LONG_NUM = 282, /* LONG_NUM */
+ NCHAR_STRING = 283, /* NCHAR_STRING */
+ NUM = 284, /* NUM */
+ TEXT_STRING = 285, /* TEXT_STRING */
+ ULONGLONG_NUM = 286, /* ULONGLONG_NUM */
+ AND_AND_SYM = 287, /* AND_AND_SYM */
+ DOT_DOT_SYM = 288, /* DOT_DOT_SYM */
+ EQUAL_SYM = 289, /* EQUAL_SYM */
+ GE = 290, /* GE */
+ LE = 291, /* LE */
+ MYSQL_CONCAT_SYM = 292, /* MYSQL_CONCAT_SYM */
+ NE = 293, /* NE */
+ NOT2_SYM = 294, /* NOT2_SYM */
+ OR2_SYM = 295, /* OR2_SYM */
+ SET_VAR = 296, /* SET_VAR */
+ SHIFT_LEFT = 297, /* SHIFT_LEFT */
+ SHIFT_RIGHT = 298, /* SHIFT_RIGHT */
+ ACCESSIBLE_SYM = 299, /* ACCESSIBLE_SYM */
+ ADD = 300, /* ADD */
+ ALL = 301, /* ALL */
+ ALTER = 302, /* ALTER */
+ ANALYZE_SYM = 303, /* ANALYZE_SYM */
+ AND_SYM = 304, /* AND_SYM */
+ ASC = 305, /* ASC */
+ ASENSITIVE_SYM = 306, /* ASENSITIVE_SYM */
+ AS = 307, /* AS */
+ BEFORE_SYM = 308, /* BEFORE_SYM */
+ BETWEEN_SYM = 309, /* BETWEEN_SYM */
+ BIGINT = 310, /* BIGINT */
+ BINARY = 311, /* BINARY */
+ BIT_AND = 312, /* BIT_AND */
+ BIT_OR = 313, /* BIT_OR */
+ BIT_XOR = 314, /* BIT_XOR */
+ BLOB_MARIADB_SYM = 315, /* BLOB_MARIADB_SYM */
+ BLOB_ORACLE_SYM = 316, /* BLOB_ORACLE_SYM */
+ BODY_ORACLE_SYM = 317, /* BODY_ORACLE_SYM */
+ BOTH = 318, /* BOTH */
+ BY = 319, /* BY */
+ CALL_SYM = 320, /* CALL_SYM */
+ CASCADE = 321, /* CASCADE */
+ CASE_SYM = 322, /* CASE_SYM */
+ CAST_SYM = 323, /* CAST_SYM */
+ CHANGE = 324, /* CHANGE */
+ CHAR_SYM = 325, /* CHAR_SYM */
+ CHECK_SYM = 326, /* CHECK_SYM */
+ COLLATE_SYM = 327, /* COLLATE_SYM */
+ CONDITION_SYM = 328, /* CONDITION_SYM */
+ CONSTRAINT = 329, /* CONSTRAINT */
+ CONTINUE_MARIADB_SYM = 330, /* CONTINUE_MARIADB_SYM */
+ CONTINUE_ORACLE_SYM = 331, /* CONTINUE_ORACLE_SYM */
+ CONVERT_SYM = 332, /* CONVERT_SYM */
+ COUNT_SYM = 333, /* COUNT_SYM */
+ CREATE = 334, /* CREATE */
+ CROSS = 335, /* CROSS */
+ CUME_DIST_SYM = 336, /* CUME_DIST_SYM */
+ CURDATE = 337, /* CURDATE */
+ CURRENT_ROLE = 338, /* CURRENT_ROLE */
+ CURRENT_USER = 339, /* CURRENT_USER */
+ CURSOR_SYM = 340, /* CURSOR_SYM */
+ CURTIME = 341, /* CURTIME */
+ DATABASE = 342, /* DATABASE */
+ DATABASES = 343, /* DATABASES */
+ DATE_ADD_INTERVAL = 344, /* DATE_ADD_INTERVAL */
+ DATE_SUB_INTERVAL = 345, /* DATE_SUB_INTERVAL */
+ DAY_HOUR_SYM = 346, /* DAY_HOUR_SYM */
+ DAY_MICROSECOND_SYM = 347, /* DAY_MICROSECOND_SYM */
+ DAY_MINUTE_SYM = 348, /* DAY_MINUTE_SYM */
+ DAY_SECOND_SYM = 349, /* DAY_SECOND_SYM */
+ DECIMAL_SYM = 350, /* DECIMAL_SYM */
+ DECLARE_MARIADB_SYM = 351, /* DECLARE_MARIADB_SYM */
+ DECLARE_ORACLE_SYM = 352, /* DECLARE_ORACLE_SYM */
+ DEFAULT = 353, /* DEFAULT */
+ DELETE_DOMAIN_ID_SYM = 354, /* DELETE_DOMAIN_ID_SYM */
+ DELETE_SYM = 355, /* DELETE_SYM */
+ DENSE_RANK_SYM = 356, /* DENSE_RANK_SYM */
+ DESCRIBE = 357, /* DESCRIBE */
+ DESC = 358, /* DESC */
+ DETERMINISTIC_SYM = 359, /* DETERMINISTIC_SYM */
+ DISTINCT = 360, /* DISTINCT */
+ DIV_SYM = 361, /* DIV_SYM */
+ DO_DOMAIN_IDS_SYM = 362, /* DO_DOMAIN_IDS_SYM */
+ DOUBLE_SYM = 363, /* DOUBLE_SYM */
+ DROP = 364, /* DROP */
+ DUAL_SYM = 365, /* DUAL_SYM */
+ EACH_SYM = 366, /* EACH_SYM */
+ ELSEIF_MARIADB_SYM = 367, /* ELSEIF_MARIADB_SYM */
+ ELSE = 368, /* ELSE */
+ ELSIF_ORACLE_SYM = 369, /* ELSIF_ORACLE_SYM */
+ EMPTY_SYM = 370, /* EMPTY_SYM */
+ ENCLOSED = 371, /* ENCLOSED */
+ ESCAPED = 372, /* ESCAPED */
+ EXCEPT_SYM = 373, /* EXCEPT_SYM */
+ EXISTS = 374, /* EXISTS */
+ EXTRACT_SYM = 375, /* EXTRACT_SYM */
+ FALSE_SYM = 376, /* FALSE_SYM */
+ FETCH_SYM = 377, /* FETCH_SYM */
+ FIRST_VALUE_SYM = 378, /* FIRST_VALUE_SYM */
+ FLOAT_SYM = 379, /* FLOAT_SYM */
+ FOREIGN = 380, /* FOREIGN */
+ FOR_SYM = 381, /* FOR_SYM */
+ FROM = 382, /* FROM */
+ FULLTEXT_SYM = 383, /* FULLTEXT_SYM */
+ GOTO_ORACLE_SYM = 384, /* GOTO_ORACLE_SYM */
+ GRANT = 385, /* GRANT */
+ GROUP_CONCAT_SYM = 386, /* GROUP_CONCAT_SYM */
+ JSON_ARRAYAGG_SYM = 387, /* JSON_ARRAYAGG_SYM */
+ JSON_OBJECTAGG_SYM = 388, /* JSON_OBJECTAGG_SYM */
+ JSON_TABLE_SYM = 389, /* JSON_TABLE_SYM */
+ GROUP_SYM = 390, /* GROUP_SYM */
+ HAVING = 391, /* HAVING */
+ HOUR_MICROSECOND_SYM = 392, /* HOUR_MICROSECOND_SYM */
+ HOUR_MINUTE_SYM = 393, /* HOUR_MINUTE_SYM */
+ HOUR_SECOND_SYM = 394, /* HOUR_SECOND_SYM */
+ IF_SYM = 395, /* IF_SYM */
+ IGNORE_DOMAIN_IDS_SYM = 396, /* IGNORE_DOMAIN_IDS_SYM */
+ IGNORE_SYM = 397, /* IGNORE_SYM */
+ IGNORED_SYM = 398, /* IGNORED_SYM */
+ INDEX_SYM = 399, /* INDEX_SYM */
+ INFILE = 400, /* INFILE */
+ INNER_SYM = 401, /* INNER_SYM */
+ INOUT_SYM = 402, /* INOUT_SYM */
+ INSENSITIVE_SYM = 403, /* INSENSITIVE_SYM */
+ INSERT = 404, /* INSERT */
+ IN_SYM = 405, /* IN_SYM */
+ INTERSECT_SYM = 406, /* INTERSECT_SYM */
+ INTERVAL_SYM = 407, /* INTERVAL_SYM */
+ INTO = 408, /* INTO */
+ INT_SYM = 409, /* INT_SYM */
+ IS = 410, /* IS */
+ ITERATE_SYM = 411, /* ITERATE_SYM */
+ JOIN_SYM = 412, /* JOIN_SYM */
+ KEYS = 413, /* KEYS */
+ KEY_SYM = 414, /* KEY_SYM */
+ KILL_SYM = 415, /* KILL_SYM */
+ LAG_SYM = 416, /* LAG_SYM */
+ LEADING = 417, /* LEADING */
+ LEAD_SYM = 418, /* LEAD_SYM */
+ LEAVE_SYM = 419, /* LEAVE_SYM */
+ LEFT = 420, /* LEFT */
+ LIKE = 421, /* LIKE */
+ LIMIT = 422, /* LIMIT */
+ LINEAR_SYM = 423, /* LINEAR_SYM */
+ LINES = 424, /* LINES */
+ LOAD = 425, /* LOAD */
+ LOCATOR_SYM = 426, /* LOCATOR_SYM */
+ LOCK_SYM = 427, /* LOCK_SYM */
+ LONGBLOB = 428, /* LONGBLOB */
+ LONG_SYM = 429, /* LONG_SYM */
+ LONGTEXT = 430, /* LONGTEXT */
+ LOOP_SYM = 431, /* LOOP_SYM */
+ LOW_PRIORITY = 432, /* LOW_PRIORITY */
+ MASTER_SSL_VERIFY_SERVER_CERT_SYM = 433, /* MASTER_SSL_VERIFY_SERVER_CERT_SYM */
+ MATCH = 434, /* MATCH */
+ MAX_SYM = 435, /* MAX_SYM */
+ MAXVALUE_SYM = 436, /* MAXVALUE_SYM */
+ MEDIAN_SYM = 437, /* MEDIAN_SYM */
+ MEDIUMBLOB = 438, /* MEDIUMBLOB */
+ MEDIUMINT = 439, /* MEDIUMINT */
+ MEDIUMTEXT = 440, /* MEDIUMTEXT */
+ MIN_SYM = 441, /* MIN_SYM */
+ MINUS_ORACLE_SYM = 442, /* MINUS_ORACLE_SYM */
+ MINUTE_MICROSECOND_SYM = 443, /* MINUTE_MICROSECOND_SYM */
+ MINUTE_SECOND_SYM = 444, /* MINUTE_SECOND_SYM */
+ MODIFIES_SYM = 445, /* MODIFIES_SYM */
+ MOD_SYM = 446, /* MOD_SYM */
+ NATURAL = 447, /* NATURAL */
+ NEG = 448, /* NEG */
+ NESTED_SYM = 449, /* NESTED_SYM */
+ NOT_SYM = 450, /* NOT_SYM */
+ NO_WRITE_TO_BINLOG = 451, /* NO_WRITE_TO_BINLOG */
+ NOW_SYM = 452, /* NOW_SYM */
+ NTH_VALUE_SYM = 453, /* NTH_VALUE_SYM */
+ NTILE_SYM = 454, /* NTILE_SYM */
+ NULL_SYM = 455, /* NULL_SYM */
+ NUMERIC_SYM = 456, /* NUMERIC_SYM */
+ ON = 457, /* ON */
+ OPTIMIZE = 458, /* OPTIMIZE */
+ OPTIONALLY = 459, /* OPTIONALLY */
+ ORDER_SYM = 460, /* ORDER_SYM */
+ ORDINALITY_SYM = 461, /* ORDINALITY_SYM */
+ OR_SYM = 462, /* OR_SYM */
+ OTHERS_ORACLE_SYM = 463, /* OTHERS_ORACLE_SYM */
+ OUTER = 464, /* OUTER */
+ OUTFILE = 465, /* OUTFILE */
+ OUT_SYM = 466, /* OUT_SYM */
+ OVER_SYM = 467, /* OVER_SYM */
+ PACKAGE_ORACLE_SYM = 468, /* PACKAGE_ORACLE_SYM */
+ PAGE_CHECKSUM_SYM = 469, /* PAGE_CHECKSUM_SYM */
+ PARSE_VCOL_EXPR_SYM = 470, /* PARSE_VCOL_EXPR_SYM */
+ PARTITION_SYM = 471, /* PARTITION_SYM */
+ PATH_SYM = 472, /* PATH_SYM */
+ PERCENTILE_CONT_SYM = 473, /* PERCENTILE_CONT_SYM */
+ PERCENTILE_DISC_SYM = 474, /* PERCENTILE_DISC_SYM */
+ PERCENT_RANK_SYM = 475, /* PERCENT_RANK_SYM */
+ PORTION_SYM = 476, /* PORTION_SYM */
+ POSITION_SYM = 477, /* POSITION_SYM */
+ PRECISION = 478, /* PRECISION */
+ PRIMARY_SYM = 479, /* PRIMARY_SYM */
+ PROCEDURE_SYM = 480, /* PROCEDURE_SYM */
+ PURGE = 481, /* PURGE */
+ RAISE_ORACLE_SYM = 482, /* RAISE_ORACLE_SYM */
+ RANGE_SYM = 483, /* RANGE_SYM */
+ RANK_SYM = 484, /* RANK_SYM */
+ READS_SYM = 485, /* READS_SYM */
+ READ_SYM = 486, /* READ_SYM */
+ READ_WRITE_SYM = 487, /* READ_WRITE_SYM */
+ REAL = 488, /* REAL */
+ RECURSIVE_SYM = 489, /* RECURSIVE_SYM */
+ REFERENCES = 490, /* REFERENCES */
+ REF_SYSTEM_ID_SYM = 491, /* REF_SYSTEM_ID_SYM */
+ REGEXP = 492, /* REGEXP */
+ RELEASE_SYM = 493, /* RELEASE_SYM */
+ RENAME = 494, /* RENAME */
+ REPEAT_SYM = 495, /* REPEAT_SYM */
+ REQUIRE_SYM = 496, /* REQUIRE_SYM */
+ RESIGNAL_SYM = 497, /* RESIGNAL_SYM */
+ RESTRICT = 498, /* RESTRICT */
+ RETURNING_SYM = 499, /* RETURNING_SYM */
+ RETURN_MARIADB_SYM = 500, /* RETURN_MARIADB_SYM */
+ RETURN_ORACLE_SYM = 501, /* RETURN_ORACLE_SYM */
+ REVOKE = 502, /* REVOKE */
+ RIGHT = 503, /* RIGHT */
+ ROW_NUMBER_SYM = 504, /* ROW_NUMBER_SYM */
+ ROWS_SYM = 505, /* ROWS_SYM */
+ ROWTYPE_ORACLE_SYM = 506, /* ROWTYPE_ORACLE_SYM */
+ SECOND_MICROSECOND_SYM = 507, /* SECOND_MICROSECOND_SYM */
+ SELECT_SYM = 508, /* SELECT_SYM */
+ SENSITIVE_SYM = 509, /* SENSITIVE_SYM */
+ SEPARATOR_SYM = 510, /* SEPARATOR_SYM */
+ SERVER_OPTIONS = 511, /* SERVER_OPTIONS */
+ SET = 512, /* SET */
+ SHOW = 513, /* SHOW */
+ SIGNAL_SYM = 514, /* SIGNAL_SYM */
+ SMALLINT = 515, /* SMALLINT */
+ SPATIAL_SYM = 516, /* SPATIAL_SYM */
+ SPECIFIC_SYM = 517, /* SPECIFIC_SYM */
+ SQL_BIG_RESULT = 518, /* SQL_BIG_RESULT */
+ SQLEXCEPTION_SYM = 519, /* SQLEXCEPTION_SYM */
+ SQL_SMALL_RESULT = 520, /* SQL_SMALL_RESULT */
+ SQLSTATE_SYM = 521, /* SQLSTATE_SYM */
+ SQL_SYM = 522, /* SQL_SYM */
+ SQLWARNING_SYM = 523, /* SQLWARNING_SYM */
+ SSL_SYM = 524, /* SSL_SYM */
+ STARTING = 525, /* STARTING */
+ STATS_AUTO_RECALC_SYM = 526, /* STATS_AUTO_RECALC_SYM */
+ STATS_PERSISTENT_SYM = 527, /* STATS_PERSISTENT_SYM */
+ STATS_SAMPLE_PAGES_SYM = 528, /* STATS_SAMPLE_PAGES_SYM */
+ STDDEV_SAMP_SYM = 529, /* STDDEV_SAMP_SYM */
+ STD_SYM = 530, /* STD_SYM */
+ STRAIGHT_JOIN = 531, /* STRAIGHT_JOIN */
+ SUM_SYM = 532, /* SUM_SYM */
+ SYSDATE = 533, /* SYSDATE */
+ TABLE_REF_PRIORITY = 534, /* TABLE_REF_PRIORITY */
+ TABLE_SYM = 535, /* TABLE_SYM */
+ TERMINATED = 536, /* TERMINATED */
+ THEN_SYM = 537, /* THEN_SYM */
+ TINYBLOB = 538, /* TINYBLOB */
+ TINYINT = 539, /* TINYINT */
+ TINYTEXT = 540, /* TINYTEXT */
+ TO_SYM = 541, /* TO_SYM */
+ TRAILING = 542, /* TRAILING */
+ TRIGGER_SYM = 543, /* TRIGGER_SYM */
+ TRUE_SYM = 544, /* TRUE_SYM */
+ UNDO_SYM = 545, /* UNDO_SYM */
+ UNION_SYM = 546, /* UNION_SYM */
+ UNIQUE_SYM = 547, /* UNIQUE_SYM */
+ UNLOCK_SYM = 548, /* UNLOCK_SYM */
+ UNSIGNED = 549, /* UNSIGNED */
+ UPDATE_SYM = 550, /* UPDATE_SYM */
+ USAGE = 551, /* USAGE */
+ USE_SYM = 552, /* USE_SYM */
+ USING = 553, /* USING */
+ UTC_DATE_SYM = 554, /* UTC_DATE_SYM */
+ UTC_TIMESTAMP_SYM = 555, /* UTC_TIMESTAMP_SYM */
+ UTC_TIME_SYM = 556, /* UTC_TIME_SYM */
+ VALUES_IN_SYM = 557, /* VALUES_IN_SYM */
+ VALUES_LESS_SYM = 558, /* VALUES_LESS_SYM */
+ VALUES = 559, /* VALUES */
+ VARBINARY = 560, /* VARBINARY */
+ VARCHAR = 561, /* VARCHAR */
+ VARIANCE_SYM = 562, /* VARIANCE_SYM */
+ VAR_SAMP_SYM = 563, /* VAR_SAMP_SYM */
+ VARYING = 564, /* VARYING */
+ WHEN_SYM = 565, /* WHEN_SYM */
+ WHERE = 566, /* WHERE */
+ WHILE_SYM = 567, /* WHILE_SYM */
+ WITH = 568, /* WITH */
+ XOR = 569, /* XOR */
+ YEAR_MONTH_SYM = 570, /* YEAR_MONTH_SYM */
+ ZEROFILL = 571, /* ZEROFILL */
+ BODY_MARIADB_SYM = 572, /* BODY_MARIADB_SYM */
+ ELSEIF_ORACLE_SYM = 573, /* ELSEIF_ORACLE_SYM */
+ ELSIF_MARIADB_SYM = 574, /* ELSIF_MARIADB_SYM */
+ EXCEPTION_ORACLE_SYM = 575, /* EXCEPTION_ORACLE_SYM */
+ GOTO_MARIADB_SYM = 576, /* GOTO_MARIADB_SYM */
+ OTHERS_MARIADB_SYM = 577, /* OTHERS_MARIADB_SYM */
+ PACKAGE_MARIADB_SYM = 578, /* PACKAGE_MARIADB_SYM */
+ RAISE_MARIADB_SYM = 579, /* RAISE_MARIADB_SYM */
+ ROWTYPE_MARIADB_SYM = 580, /* ROWTYPE_MARIADB_SYM */
+ ROWNUM_SYM = 581, /* ROWNUM_SYM */
+ REPLACE = 582, /* REPLACE */
+ SUBSTRING = 583, /* SUBSTRING */
+ TRIM = 584, /* TRIM */
+ ACCOUNT_SYM = 585, /* ACCOUNT_SYM */
+ ACTION = 586, /* ACTION */
+ ADMIN_SYM = 587, /* ADMIN_SYM */
+ ADDDATE_SYM = 588, /* ADDDATE_SYM */
+ AFTER_SYM = 589, /* AFTER_SYM */
+ AGAINST = 590, /* AGAINST */
+ AGGREGATE_SYM = 591, /* AGGREGATE_SYM */
+ ALGORITHM_SYM = 592, /* ALGORITHM_SYM */
+ ALWAYS_SYM = 593, /* ALWAYS_SYM */
+ ANY_SYM = 594, /* ANY_SYM */
+ ASCII_SYM = 595, /* ASCII_SYM */
+ AT_SYM = 596, /* AT_SYM */
+ ATOMIC_SYM = 597, /* ATOMIC_SYM */
+ AUTHORS_SYM = 598, /* AUTHORS_SYM */
+ AUTOEXTEND_SIZE_SYM = 599, /* AUTOEXTEND_SIZE_SYM */
+ AUTO_INC = 600, /* AUTO_INC */
+ AUTO_SYM = 601, /* AUTO_SYM */
+ AVG_ROW_LENGTH = 602, /* AVG_ROW_LENGTH */
+ AVG_SYM = 603, /* AVG_SYM */
+ BACKUP_SYM = 604, /* BACKUP_SYM */
+ BEGIN_MARIADB_SYM = 605, /* BEGIN_MARIADB_SYM */
+ BEGIN_ORACLE_SYM = 606, /* BEGIN_ORACLE_SYM */
+ BINLOG_SYM = 607, /* BINLOG_SYM */
+ BIT_SYM = 608, /* BIT_SYM */
+ BLOCK_SYM = 609, /* BLOCK_SYM */
+ BOOL_SYM = 610, /* BOOL_SYM */
+ BOOLEAN_SYM = 611, /* BOOLEAN_SYM */
+ BTREE_SYM = 612, /* BTREE_SYM */
+ BYTE_SYM = 613, /* BYTE_SYM */
+ CACHE_SYM = 614, /* CACHE_SYM */
+ CASCADED = 615, /* CASCADED */
+ CATALOG_NAME_SYM = 616, /* CATALOG_NAME_SYM */
+ CHAIN_SYM = 617, /* CHAIN_SYM */
+ CHANGED = 618, /* CHANGED */
+ CHANNEL_SYM = 619, /* CHANNEL_SYM */
+ CHARSET = 620, /* CHARSET */
+ CHECKPOINT_SYM = 621, /* CHECKPOINT_SYM */
+ CHECKSUM_SYM = 622, /* CHECKSUM_SYM */
+ CIPHER_SYM = 623, /* CIPHER_SYM */
+ CLASS_ORIGIN_SYM = 624, /* CLASS_ORIGIN_SYM */
+ CLIENT_SYM = 625, /* CLIENT_SYM */
+ CLOB_MARIADB_SYM = 626, /* CLOB_MARIADB_SYM */
+ CLOB_ORACLE_SYM = 627, /* CLOB_ORACLE_SYM */
+ CLOSE_SYM = 628, /* CLOSE_SYM */
+ COALESCE = 629, /* COALESCE */
+ CODE_SYM = 630, /* CODE_SYM */
+ COLLATION_SYM = 631, /* COLLATION_SYM */
+ COLUMNS = 632, /* COLUMNS */
+ COLUMN_ADD_SYM = 633, /* COLUMN_ADD_SYM */
+ COLUMN_CHECK_SYM = 634, /* COLUMN_CHECK_SYM */
+ COLUMN_CREATE_SYM = 635, /* COLUMN_CREATE_SYM */
+ COLUMN_DELETE_SYM = 636, /* COLUMN_DELETE_SYM */
+ COLUMN_GET_SYM = 637, /* COLUMN_GET_SYM */
+ COLUMN_SYM = 638, /* COLUMN_SYM */
+ COLUMN_NAME_SYM = 639, /* COLUMN_NAME_SYM */
+ COMMENT_SYM = 640, /* COMMENT_SYM */
+ COMMITTED_SYM = 641, /* COMMITTED_SYM */
+ COMMIT_SYM = 642, /* COMMIT_SYM */
+ COMPACT_SYM = 643, /* COMPACT_SYM */
+ COMPLETION_SYM = 644, /* COMPLETION_SYM */
+ COMPRESSED_SYM = 645, /* COMPRESSED_SYM */
+ CONCURRENT = 646, /* CONCURRENT */
+ CONNECTION_SYM = 647, /* CONNECTION_SYM */
+ CONSISTENT_SYM = 648, /* CONSISTENT_SYM */
+ CONSTRAINT_CATALOG_SYM = 649, /* CONSTRAINT_CATALOG_SYM */
+ CONSTRAINT_NAME_SYM = 650, /* CONSTRAINT_NAME_SYM */
+ CONSTRAINT_SCHEMA_SYM = 651, /* CONSTRAINT_SCHEMA_SYM */
+ CONTAINS_SYM = 652, /* CONTAINS_SYM */
+ CONTEXT_SYM = 653, /* CONTEXT_SYM */
+ CONTRIBUTORS_SYM = 654, /* CONTRIBUTORS_SYM */
+ CPU_SYM = 655, /* CPU_SYM */
+ CUBE_SYM = 656, /* CUBE_SYM */
+ CURRENT_SYM = 657, /* CURRENT_SYM */
+ CURRENT_POS_SYM = 658, /* CURRENT_POS_SYM */
+ CURSOR_NAME_SYM = 659, /* CURSOR_NAME_SYM */
+ CYCLE_SYM = 660, /* CYCLE_SYM */
+ DATAFILE_SYM = 661, /* DATAFILE_SYM */
+ DATA_SYM = 662, /* DATA_SYM */
+ DATETIME = 663, /* DATETIME */
+ DATE_SYM = 664, /* DATE_SYM */
+ DAY_SYM = 665, /* DAY_SYM */
+ DEALLOCATE_SYM = 666, /* DEALLOCATE_SYM */
+ DEFINER_SYM = 667, /* DEFINER_SYM */
+ DELAYED_SYM = 668, /* DELAYED_SYM */
+ DELAY_KEY_WRITE_SYM = 669, /* DELAY_KEY_WRITE_SYM */
+ DES_KEY_FILE = 670, /* DES_KEY_FILE */
+ DIAGNOSTICS_SYM = 671, /* DIAGNOSTICS_SYM */
+ DIRECTORY_SYM = 672, /* DIRECTORY_SYM */
+ DISABLE_SYM = 673, /* DISABLE_SYM */
+ DISCARD = 674, /* DISCARD */
+ DISK_SYM = 675, /* DISK_SYM */
+ DO_SYM = 676, /* DO_SYM */
+ DUMPFILE = 677, /* DUMPFILE */
+ DUPLICATE_SYM = 678, /* DUPLICATE_SYM */
+ DYNAMIC_SYM = 679, /* DYNAMIC_SYM */
+ ENABLE_SYM = 680, /* ENABLE_SYM */
+ END = 681, /* END */
+ ENDS_SYM = 682, /* ENDS_SYM */
+ ENGINES_SYM = 683, /* ENGINES_SYM */
+ ENGINE_SYM = 684, /* ENGINE_SYM */
+ ENUM = 685, /* ENUM */
+ ERROR_SYM = 686, /* ERROR_SYM */
+ ERRORS = 687, /* ERRORS */
+ ESCAPE_SYM = 688, /* ESCAPE_SYM */
+ EVENTS_SYM = 689, /* EVENTS_SYM */
+ EVENT_SYM = 690, /* EVENT_SYM */
+ EVERY_SYM = 691, /* EVERY_SYM */
+ EXCHANGE_SYM = 692, /* EXCHANGE_SYM */
+ EXAMINED_SYM = 693, /* EXAMINED_SYM */
+ EXCLUDE_SYM = 694, /* EXCLUDE_SYM */
+ EXECUTE_SYM = 695, /* EXECUTE_SYM */
+ EXCEPTION_MARIADB_SYM = 696, /* EXCEPTION_MARIADB_SYM */
+ EXIT_MARIADB_SYM = 697, /* EXIT_MARIADB_SYM */
+ EXIT_ORACLE_SYM = 698, /* EXIT_ORACLE_SYM */
+ EXPANSION_SYM = 699, /* EXPANSION_SYM */
+ EXPIRE_SYM = 700, /* EXPIRE_SYM */
+ EXPORT_SYM = 701, /* EXPORT_SYM */
+ EXTENDED_SYM = 702, /* EXTENDED_SYM */
+ EXTENT_SIZE_SYM = 703, /* EXTENT_SIZE_SYM */
+ FAST_SYM = 704, /* FAST_SYM */
+ FAULTS_SYM = 705, /* FAULTS_SYM */
+ FEDERATED_SYM = 706, /* FEDERATED_SYM */
+ FILE_SYM = 707, /* FILE_SYM */
+ FIRST_SYM = 708, /* FIRST_SYM */
+ FIXED_SYM = 709, /* FIXED_SYM */
+ FLUSH_SYM = 710, /* FLUSH_SYM */
+ FOLLOWS_SYM = 711, /* FOLLOWS_SYM */
+ FOLLOWING_SYM = 712, /* FOLLOWING_SYM */
+ FORCE_SYM = 713, /* FORCE_SYM */
+ FORMAT_SYM = 714, /* FORMAT_SYM */
+ FOUND_SYM = 715, /* FOUND_SYM */
+ FULL = 716, /* FULL */
+ FUNCTION_SYM = 717, /* FUNCTION_SYM */
+ GENERAL = 718, /* GENERAL */
+ GENERATED_SYM = 719, /* GENERATED_SYM */
+ GET_FORMAT = 720, /* GET_FORMAT */
+ GET_SYM = 721, /* GET_SYM */
+ GLOBAL_SYM = 722, /* GLOBAL_SYM */
+ GRANTS = 723, /* GRANTS */
+ HANDLER_SYM = 724, /* HANDLER_SYM */
+ HARD_SYM = 725, /* HARD_SYM */
+ HASH_SYM = 726, /* HASH_SYM */
+ HELP_SYM = 727, /* HELP_SYM */
+ HIGH_PRIORITY = 728, /* HIGH_PRIORITY */
+ HISTORY_SYM = 729, /* HISTORY_SYM */
+ HOST_SYM = 730, /* HOST_SYM */
+ HOSTS_SYM = 731, /* HOSTS_SYM */
+ HOUR_SYM = 732, /* HOUR_SYM */
+ ID_SYM = 733, /* ID_SYM */
+ IDENTIFIED_SYM = 734, /* IDENTIFIED_SYM */
+ IGNORE_SERVER_IDS_SYM = 735, /* IGNORE_SERVER_IDS_SYM */
+ IMMEDIATE_SYM = 736, /* IMMEDIATE_SYM */
+ IMPORT = 737, /* IMPORT */
+ INCREMENT_SYM = 738, /* INCREMENT_SYM */
+ INDEXES = 739, /* INDEXES */
+ INITIAL_SIZE_SYM = 740, /* INITIAL_SIZE_SYM */
+ INSERT_METHOD = 741, /* INSERT_METHOD */
+ INSTALL_SYM = 742, /* INSTALL_SYM */
+ INVOKER_SYM = 743, /* INVOKER_SYM */
+ IO_SYM = 744, /* IO_SYM */
+ IPC_SYM = 745, /* IPC_SYM */
+ ISOLATION = 746, /* ISOLATION */
+ ISOPEN_SYM = 747, /* ISOPEN_SYM */
+ ISSUER_SYM = 748, /* ISSUER_SYM */
+ INVISIBLE_SYM = 749, /* INVISIBLE_SYM */
+ JSON_SYM = 750, /* JSON_SYM */
+ KEY_BLOCK_SIZE = 751, /* KEY_BLOCK_SIZE */
+ LANGUAGE_SYM = 752, /* LANGUAGE_SYM */
+ LAST_SYM = 753, /* LAST_SYM */
+ LAST_VALUE = 754, /* LAST_VALUE */
+ LASTVAL_SYM = 755, /* LASTVAL_SYM */
+ LEAVES = 756, /* LEAVES */
+ LESS_SYM = 757, /* LESS_SYM */
+ LEVEL_SYM = 758, /* LEVEL_SYM */
+ LIST_SYM = 759, /* LIST_SYM */
+ LOCAL_SYM = 760, /* LOCAL_SYM */
+ LOCKED_SYM = 761, /* LOCKED_SYM */
+ LOCKS_SYM = 762, /* LOCKS_SYM */
+ LOGFILE_SYM = 763, /* LOGFILE_SYM */
+ LOGS_SYM = 764, /* LOGS_SYM */
+ MASTER_CONNECT_RETRY_SYM = 765, /* MASTER_CONNECT_RETRY_SYM */
+ MASTER_DELAY_SYM = 766, /* MASTER_DELAY_SYM */
+ MASTER_GTID_POS_SYM = 767, /* MASTER_GTID_POS_SYM */
+ MASTER_HOST_SYM = 768, /* MASTER_HOST_SYM */
+ MASTER_LOG_FILE_SYM = 769, /* MASTER_LOG_FILE_SYM */
+ MASTER_LOG_POS_SYM = 770, /* MASTER_LOG_POS_SYM */
+ MASTER_PASSWORD_SYM = 771, /* MASTER_PASSWORD_SYM */
+ MASTER_PORT_SYM = 772, /* MASTER_PORT_SYM */
+ MASTER_SERVER_ID_SYM = 773, /* MASTER_SERVER_ID_SYM */
+ MASTER_SSL_CAPATH_SYM = 774, /* MASTER_SSL_CAPATH_SYM */
+ MASTER_SSL_CA_SYM = 775, /* MASTER_SSL_CA_SYM */
+ MASTER_SSL_CERT_SYM = 776, /* MASTER_SSL_CERT_SYM */
+ MASTER_SSL_CIPHER_SYM = 777, /* MASTER_SSL_CIPHER_SYM */
+ MASTER_SSL_CRL_SYM = 778, /* MASTER_SSL_CRL_SYM */
+ MASTER_SSL_CRLPATH_SYM = 779, /* MASTER_SSL_CRLPATH_SYM */
+ MASTER_SSL_KEY_SYM = 780, /* MASTER_SSL_KEY_SYM */
+ MASTER_SSL_SYM = 781, /* MASTER_SSL_SYM */
+ MASTER_SYM = 782, /* MASTER_SYM */
+ MASTER_USER_SYM = 783, /* MASTER_USER_SYM */
+ MASTER_USE_GTID_SYM = 784, /* MASTER_USE_GTID_SYM */
+ MASTER_HEARTBEAT_PERIOD_SYM = 785, /* MASTER_HEARTBEAT_PERIOD_SYM */
+ MASTER_DEMOTE_TO_SLAVE_SYM = 786, /* MASTER_DEMOTE_TO_SLAVE_SYM */
+ MAX_CONNECTIONS_PER_HOUR = 787, /* MAX_CONNECTIONS_PER_HOUR */
+ MAX_QUERIES_PER_HOUR = 788, /* MAX_QUERIES_PER_HOUR */
+ MAX_ROWS = 789, /* MAX_ROWS */
+ MAX_SIZE_SYM = 790, /* MAX_SIZE_SYM */
+ MAX_UPDATES_PER_HOUR = 791, /* MAX_UPDATES_PER_HOUR */
+ MAX_STATEMENT_TIME_SYM = 792, /* MAX_STATEMENT_TIME_SYM */
+ MAX_USER_CONNECTIONS_SYM = 793, /* MAX_USER_CONNECTIONS_SYM */
+ MEDIUM_SYM = 794, /* MEDIUM_SYM */
+ MEMORY_SYM = 795, /* MEMORY_SYM */
+ MERGE_SYM = 796, /* MERGE_SYM */
+ MESSAGE_TEXT_SYM = 797, /* MESSAGE_TEXT_SYM */
+ MICROSECOND_SYM = 798, /* MICROSECOND_SYM */
+ MIGRATE_SYM = 799, /* MIGRATE_SYM */
+ MINUTE_SYM = 800, /* MINUTE_SYM */
+ MINVALUE_SYM = 801, /* MINVALUE_SYM */
+ MIN_ROWS = 802, /* MIN_ROWS */
+ MODE_SYM = 803, /* MODE_SYM */
+ MODIFY_SYM = 804, /* MODIFY_SYM */
+ MONITOR_SYM = 805, /* MONITOR_SYM */
+ MONTH_SYM = 806, /* MONTH_SYM */
+ MUTEX_SYM = 807, /* MUTEX_SYM */
+ MYSQL_SYM = 808, /* MYSQL_SYM */
+ MYSQL_ERRNO_SYM = 809, /* MYSQL_ERRNO_SYM */
+ NAMES_SYM = 810, /* NAMES_SYM */
+ NAME_SYM = 811, /* NAME_SYM */
+ NATIONAL_SYM = 812, /* NATIONAL_SYM */
+ NCHAR_SYM = 813, /* NCHAR_SYM */
+ NEVER_SYM = 814, /* NEVER_SYM */
+ NEXT_SYM = 815, /* NEXT_SYM */
+ NEXTVAL_SYM = 816, /* NEXTVAL_SYM */
+ NOCACHE_SYM = 817, /* NOCACHE_SYM */
+ NOCYCLE_SYM = 818, /* NOCYCLE_SYM */
+ NODEGROUP_SYM = 819, /* NODEGROUP_SYM */
+ NONE_SYM = 820, /* NONE_SYM */
+ NOTFOUND_SYM = 821, /* NOTFOUND_SYM */
+ NO_SYM = 822, /* NO_SYM */
+ NOMAXVALUE_SYM = 823, /* NOMAXVALUE_SYM */
+ NOMINVALUE_SYM = 824, /* NOMINVALUE_SYM */
+ NO_WAIT_SYM = 825, /* NO_WAIT_SYM */
+ NOWAIT_SYM = 826, /* NOWAIT_SYM */
+ NUMBER_MARIADB_SYM = 827, /* NUMBER_MARIADB_SYM */
+ NUMBER_ORACLE_SYM = 828, /* NUMBER_ORACLE_SYM */
+ NVARCHAR_SYM = 829, /* NVARCHAR_SYM */
+ OF_SYM = 830, /* OF_SYM */
+ OFFSET_SYM = 831, /* OFFSET_SYM */
+ OLD_PASSWORD_SYM = 832, /* OLD_PASSWORD_SYM */
+ ONE_SYM = 833, /* ONE_SYM */
+ ONLY_SYM = 834, /* ONLY_SYM */
+ ONLINE_SYM = 835, /* ONLINE_SYM */
+ OPEN_SYM = 836, /* OPEN_SYM */
+ OPTIONS_SYM = 837, /* OPTIONS_SYM */
+ OPTION = 838, /* OPTION */
+ OVERLAPS_SYM = 839, /* OVERLAPS_SYM */
+ OWNER_SYM = 840, /* OWNER_SYM */
+ PACK_KEYS_SYM = 841, /* PACK_KEYS_SYM */
+ PAGE_SYM = 842, /* PAGE_SYM */
+ PARSER_SYM = 843, /* PARSER_SYM */
+ PARTIAL = 844, /* PARTIAL */
+ PARTITIONS_SYM = 845, /* PARTITIONS_SYM */
+ PARTITIONING_SYM = 846, /* PARTITIONING_SYM */
+ PASSWORD_SYM = 847, /* PASSWORD_SYM */
+ PERIOD_SYM = 848, /* PERIOD_SYM */
+ PERSISTENT_SYM = 849, /* PERSISTENT_SYM */
+ PHASE_SYM = 850, /* PHASE_SYM */
+ PLUGINS_SYM = 851, /* PLUGINS_SYM */
+ PLUGIN_SYM = 852, /* PLUGIN_SYM */
+ PORT_SYM = 853, /* PORT_SYM */
+ PRECEDES_SYM = 854, /* PRECEDES_SYM */
+ PRECEDING_SYM = 855, /* PRECEDING_SYM */
+ PREPARE_SYM = 856, /* PREPARE_SYM */
+ PRESERVE_SYM = 857, /* PRESERVE_SYM */
+ PREV_SYM = 858, /* PREV_SYM */
+ PREVIOUS_SYM = 859, /* PREVIOUS_SYM */
+ PRIVILEGES = 860, /* PRIVILEGES */
+ PROCESS = 861, /* PROCESS */
+ PROCESSLIST_SYM = 862, /* PROCESSLIST_SYM */
+ PROFILE_SYM = 863, /* PROFILE_SYM */
+ PROFILES_SYM = 864, /* PROFILES_SYM */
+ PROXY_SYM = 865, /* PROXY_SYM */
+ QUARTER_SYM = 866, /* QUARTER_SYM */
+ QUERY_SYM = 867, /* QUERY_SYM */
+ QUICK = 868, /* QUICK */
+ RAW_MARIADB_SYM = 869, /* RAW_MARIADB_SYM */
+ RAW_ORACLE_SYM = 870, /* RAW_ORACLE_SYM */
+ READ_ONLY_SYM = 871, /* READ_ONLY_SYM */
+ REBUILD_SYM = 872, /* REBUILD_SYM */
+ RECOVER_SYM = 873, /* RECOVER_SYM */
+ REDOFILE_SYM = 874, /* REDOFILE_SYM */
+ REDO_BUFFER_SIZE_SYM = 875, /* REDO_BUFFER_SIZE_SYM */
+ REDUNDANT_SYM = 876, /* REDUNDANT_SYM */
+ RELAY = 877, /* RELAY */
+ RELAYLOG_SYM = 878, /* RELAYLOG_SYM */
+ RELAY_LOG_FILE_SYM = 879, /* RELAY_LOG_FILE_SYM */
+ RELAY_LOG_POS_SYM = 880, /* RELAY_LOG_POS_SYM */
+ RELAY_THREAD = 881, /* RELAY_THREAD */
+ RELOAD = 882, /* RELOAD */
+ REMOVE_SYM = 883, /* REMOVE_SYM */
+ REORGANIZE_SYM = 884, /* REORGANIZE_SYM */
+ REPAIR = 885, /* REPAIR */
+ REPEATABLE_SYM = 886, /* REPEATABLE_SYM */
+ REPLAY_SYM = 887, /* REPLAY_SYM */
+ REPLICATION = 888, /* REPLICATION */
+ RESET_SYM = 889, /* RESET_SYM */
+ RESTART_SYM = 890, /* RESTART_SYM */
+ RESOURCES = 891, /* RESOURCES */
+ RESTORE_SYM = 892, /* RESTORE_SYM */
+ RESUME_SYM = 893, /* RESUME_SYM */
+ RETURNED_SQLSTATE_SYM = 894, /* RETURNED_SQLSTATE_SYM */
+ RETURNS_SYM = 895, /* RETURNS_SYM */
+ REUSE_SYM = 896, /* REUSE_SYM */
+ REVERSE_SYM = 897, /* REVERSE_SYM */
+ ROLE_SYM = 898, /* ROLE_SYM */
+ ROLLBACK_SYM = 899, /* ROLLBACK_SYM */
+ ROLLUP_SYM = 900, /* ROLLUP_SYM */
+ ROUTINE_SYM = 901, /* ROUTINE_SYM */
+ ROWCOUNT_SYM = 902, /* ROWCOUNT_SYM */
+ ROW_SYM = 903, /* ROW_SYM */
+ ROW_COUNT_SYM = 904, /* ROW_COUNT_SYM */
+ ROW_FORMAT_SYM = 905, /* ROW_FORMAT_SYM */
+ RTREE_SYM = 906, /* RTREE_SYM */
+ SAVEPOINT_SYM = 907, /* SAVEPOINT_SYM */
+ SCHEDULE_SYM = 908, /* SCHEDULE_SYM */
+ SCHEMA_NAME_SYM = 909, /* SCHEMA_NAME_SYM */
+ SECOND_SYM = 910, /* SECOND_SYM */
+ SECURITY_SYM = 911, /* SECURITY_SYM */
+ SEQUENCE_SYM = 912, /* SEQUENCE_SYM */
+ SERIALIZABLE_SYM = 913, /* SERIALIZABLE_SYM */
+ SERIAL_SYM = 914, /* SERIAL_SYM */
+ SESSION_SYM = 915, /* SESSION_SYM */
+ SERVER_SYM = 916, /* SERVER_SYM */
+ SETVAL_SYM = 917, /* SETVAL_SYM */
+ SHARE_SYM = 918, /* SHARE_SYM */
+ SHUTDOWN = 919, /* SHUTDOWN */
+ SIGNED_SYM = 920, /* SIGNED_SYM */
+ SIMPLE_SYM = 921, /* SIMPLE_SYM */
+ SKIP_SYM = 922, /* SKIP_SYM */
+ SLAVE = 923, /* SLAVE */
+ SLAVES = 924, /* SLAVES */
+ SLAVE_POS_SYM = 925, /* SLAVE_POS_SYM */
+ SLOW = 926, /* SLOW */
+ SNAPSHOT_SYM = 927, /* SNAPSHOT_SYM */
+ SOCKET_SYM = 928, /* SOCKET_SYM */
+ SOFT_SYM = 929, /* SOFT_SYM */
+ SONAME_SYM = 930, /* SONAME_SYM */
+ SOUNDS_SYM = 931, /* SOUNDS_SYM */
+ SOURCE_SYM = 932, /* SOURCE_SYM */
+ SQL_BUFFER_RESULT = 933, /* SQL_BUFFER_RESULT */
+ SQL_CACHE_SYM = 934, /* SQL_CACHE_SYM */
+ SQL_CALC_FOUND_ROWS = 935, /* SQL_CALC_FOUND_ROWS */
+ SQL_NO_CACHE_SYM = 936, /* SQL_NO_CACHE_SYM */
+ SQL_THREAD = 937, /* SQL_THREAD */
+ STAGE_SYM = 938, /* STAGE_SYM */
+ STARTS_SYM = 939, /* STARTS_SYM */
+ START_SYM = 940, /* START_SYM */
+ STATEMENT_SYM = 941, /* STATEMENT_SYM */
+ STATUS_SYM = 942, /* STATUS_SYM */
+ STOP_SYM = 943, /* STOP_SYM */
+ STORAGE_SYM = 944, /* STORAGE_SYM */
+ STORED_SYM = 945, /* STORED_SYM */
+ STRING_SYM = 946, /* STRING_SYM */
+ SUBCLASS_ORIGIN_SYM = 947, /* SUBCLASS_ORIGIN_SYM */
+ SUBDATE_SYM = 948, /* SUBDATE_SYM */
+ SUBJECT_SYM = 949, /* SUBJECT_SYM */
+ SUBPARTITIONS_SYM = 950, /* SUBPARTITIONS_SYM */
+ SUBPARTITION_SYM = 951, /* SUBPARTITION_SYM */
+ SUPER_SYM = 952, /* SUPER_SYM */
+ SUSPEND_SYM = 953, /* SUSPEND_SYM */
+ SWAPS_SYM = 954, /* SWAPS_SYM */
+ SWITCHES_SYM = 955, /* SWITCHES_SYM */
+ SYSTEM = 956, /* SYSTEM */
+ SYSTEM_TIME_SYM = 957, /* SYSTEM_TIME_SYM */
+ TABLES = 958, /* TABLES */
+ TABLESPACE = 959, /* TABLESPACE */
+ TABLE_CHECKSUM_SYM = 960, /* TABLE_CHECKSUM_SYM */
+ TABLE_NAME_SYM = 961, /* TABLE_NAME_SYM */
+ TEMPORARY = 962, /* TEMPORARY */
+ TEMPTABLE_SYM = 963, /* TEMPTABLE_SYM */
+ TEXT_SYM = 964, /* TEXT_SYM */
+ THAN_SYM = 965, /* THAN_SYM */
+ TIES_SYM = 966, /* TIES_SYM */
+ TIMESTAMP = 967, /* TIMESTAMP */
+ TIMESTAMP_ADD = 968, /* TIMESTAMP_ADD */
+ TIMESTAMP_DIFF = 969, /* TIMESTAMP_DIFF */
+ TIME_SYM = 970, /* TIME_SYM */
+ TRANSACTION_SYM = 971, /* TRANSACTION_SYM */
+ TRANSACTIONAL_SYM = 972, /* TRANSACTIONAL_SYM */
+ THREADS_SYM = 973, /* THREADS_SYM */
+ TRIGGERS_SYM = 974, /* TRIGGERS_SYM */
+ TRIM_ORACLE = 975, /* TRIM_ORACLE */
+ TRUNCATE_SYM = 976, /* TRUNCATE_SYM */
+ TYPE_SYM = 977, /* TYPE_SYM */
+ UDF_RETURNS_SYM = 978, /* UDF_RETURNS_SYM */
+ UNBOUNDED_SYM = 979, /* UNBOUNDED_SYM */
+ UNCOMMITTED_SYM = 980, /* UNCOMMITTED_SYM */
+ UNDEFINED_SYM = 981, /* UNDEFINED_SYM */
+ UNDOFILE_SYM = 982, /* UNDOFILE_SYM */
+ UNDO_BUFFER_SIZE_SYM = 983, /* UNDO_BUFFER_SIZE_SYM */
+ UNICODE_SYM = 984, /* UNICODE_SYM */
+ UNINSTALL_SYM = 985, /* UNINSTALL_SYM */
+ UNKNOWN_SYM = 986, /* UNKNOWN_SYM */
+ UNTIL_SYM = 987, /* UNTIL_SYM */
+ UPGRADE_SYM = 988, /* UPGRADE_SYM */
+ USER_SYM = 989, /* USER_SYM */
+ USE_FRM = 990, /* USE_FRM */
+ VALUE_SYM = 991, /* VALUE_SYM */
+ VARCHAR2_MARIADB_SYM = 992, /* VARCHAR2_MARIADB_SYM */
+ VARCHAR2_ORACLE_SYM = 993, /* VARCHAR2_ORACLE_SYM */
+ VARIABLES = 994, /* VARIABLES */
+ VERSIONING_SYM = 995, /* VERSIONING_SYM */
+ VIA_SYM = 996, /* VIA_SYM */
+ VIEW_SYM = 997, /* VIEW_SYM */
+ VISIBLE_SYM = 998, /* VISIBLE_SYM */
+ VIRTUAL_SYM = 999, /* VIRTUAL_SYM */
+ WAIT_SYM = 1000, /* WAIT_SYM */
+ WARNINGS = 1001, /* WARNINGS */
+ WEEK_SYM = 1002, /* WEEK_SYM */
+ WEIGHT_STRING_SYM = 1003, /* WEIGHT_STRING_SYM */
+ WINDOW_SYM = 1004, /* WINDOW_SYM */
+ WITHIN = 1005, /* WITHIN */
+ WITHOUT = 1006, /* WITHOUT */
+ WORK_SYM = 1007, /* WORK_SYM */
+ WRAPPER_SYM = 1008, /* WRAPPER_SYM */
+ WRITE_SYM = 1009, /* WRITE_SYM */
+ X509_SYM = 1010, /* X509_SYM */
+ XA_SYM = 1011, /* XA_SYM */
+ XML_SYM = 1012, /* XML_SYM */
+ YEAR_SYM = 1013, /* YEAR_SYM */
+ CONDITIONLESS_JOIN = 1014, /* CONDITIONLESS_JOIN */
+ ON_SYM = 1015, /* ON_SYM */
+ PREC_BELOW_NOT = 1016, /* PREC_BELOW_NOT */
+ SUBQUERY_AS_EXPR = 1017, /* SUBQUERY_AS_EXPR */
+ PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE = 1018, /* PREC_BELOW_IDENTIFIER_OPT_SPECIAL_CASE */
+ USER = 1019, /* USER */
+ PREC_BELOW_CONTRACTION_TOKEN2 = 1020, /* PREC_BELOW_CONTRACTION_TOKEN2 */
+ EMPTY_FROM_CLAUSE = 1021 /* EMPTY_FROM_CLAUSE */
+ };
+ typedef enum yytokentype yytoken_kind_t;
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+union YYSTYPE
+{
+#line 192 "/home/buildbot/git/sql/sql_yacc.yy"
+
+ int num;
+ ulong ulong_num;
+ ulonglong ulonglong_number;
+ longlong longlong_number;
+ uint sp_instr_addr;
+
+ /* structs */
+ LEX_CSTRING lex_str;
+ Lex_ident_cli_st kwd;
+ Lex_ident_cli_st ident_cli;
+ Lex_ident_sys_st ident_sys;
+ Lex_column_list_privilege_st column_list_privilege;
+ Lex_string_with_metadata_st lex_string_with_metadata;
+ Lex_spblock_st spblock;
+ Lex_spblock_handlers_st spblock_handlers;
+ Lex_length_and_dec_st Lex_length_and_dec;
+ Lex_cast_type_st Lex_cast_type;
+ Lex_field_type_st Lex_field_type;
+ Lex_exact_charset_extended_collation_attrs_st
+ Lex_exact_charset_extended_collation_attrs;
+ Lex_extended_collation_st Lex_extended_collation;
+ Lex_dyncol_type_st Lex_dyncol_type;
+ Lex_for_loop_st for_loop;
+ Lex_for_loop_bounds_st for_loop_bounds;
+ Lex_trim_st trim;
+ Json_table_column::On_response json_on_response;
+ Lex_substring_spec_st substring_spec;
+ 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 */
+ Lex_ident_sys *ident_sys_ptr;
+ Create_field *create_field;
+ Spvar_definition *spvar_definition;
+ Row_definition_list *spvar_definition_list;
+ const Type_handler *type_handler;
+ const class Sp_handler *sp_handler;
+ CHARSET_INFO *charset;
+ Condition_information_item *cond_info_item;
+ DYNCALL_CREATE_DEF *dyncol_def;
+ Diagnostics_information *diag_info;
+ Item *item;
+ Item_num *item_num;
+ Item_param *item_param;
+ Item_basic_constant *item_basic_constant;
+ Key_part_spec *key_part;
+ LEX *lex;
+ sp_expr_lex *expr_lex;
+ sp_assignment_lex *assignment_lex;
+ 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;
+ List<sp_assignment_lex> *sp_assignment_lex_list;
+ List<Statement_information_item> *stmt_info_list;
+ List<String> *string_list;
+ List<Lex_ident_sys> *ident_sys_list;
+ Statement_information_item *stmt_info_item;
+ String *string;
+ TABLE_LIST *table_list;
+ Table_ident *table;
+ Qualified_column_ident *qualified_column_ident;
+ char *simple_string;
+ const char *const_simple_string;
+ chooser_compare_func_creator boolfunc2creator;
+ class Lex_grant_privilege *lex_grant;
+ class Lex_grant_object_name *lex_grant_ident;
+ class my_var *myvar;
+ class sp_condition_value *spcondvalue;
+ class sp_head *sphead;
+ class sp_name *spname;
+ class sp_variable *spvar;
+ class With_element_head *with_element_head;
+ class With_clause *with_clause;
+ class Virtual_column_info *virtual_column;
+ engine_option_value *engine_option_value_ptr;
+
+ 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;
+ udf_func *udf;
+ 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 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;
+ enum enum_fk_option m_fk_option;
+ enum Item_udftype udf_type;
+ enum Key::Keytype key_type;
+ enum Statement_information_item::Name stmt_info_item_name;
+ enum enum_filetype filetype;
+ enum enum_tx_isolation tx_isolation;
+ enum enum_var_type var_type;
+ enum enum_yes_no_unknown m_yes_no_unk;
+ enum ha_choice choice;
+ enum ha_key_alg key_alg;
+ enum ha_rkey_function ha_rkey_mode;
+ enum index_hint_type index_hint;
+ enum interval_type interval, interval_time_st;
+ enum row_type row_type;
+ enum sp_variable::enum_mode spvar_mode;
+ enum thr_lock_type lock_type;
+ enum enum_mysql_timestamp_type date_time_type;
+ enum Window_frame_bound::Bound_precedence_type bound_precedence_type;
+ enum Window_frame::Frame_units frame_units;
+ enum Window_frame::Frame_exclusion frame_exclusion;
+ enum trigger_order_type trigger_action_order_type;
+ DDL_options_st object_ddl_options;
+ enum vers_kind_t vers_range_unit;
+ enum Column_definition::enum_column_versioning vers_column_versioning;
+ enum plsql_cursor_attr_t plsql_cursor_attr;
+ privilege_t privilege;
+
+#line 968 "/home/buildbot/git/mkdist/sql/yy_oracle.hh"
+
+};
+typedef union YYSTYPE YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+
+
+int ORAparse (THD *thd);
+
+
+#endif /* !YY_ORA_HOME_BUILDBOT_GIT_MKDIST_SQL_YY_ORACLE_HH_INCLUDED */
diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt
index 5b6818fc..5c7b6aa4 100644
--- a/storage/archive/CMakeLists.txt
+++ b/storage/archive/CMakeLists.txt
@@ -14,5 +14,5 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
SET(ARCHIVE_SOURCES azio.c ha_archive.cc ha_archive.h)
-MYSQL_ADD_PLUGIN(archive ${ARCHIVE_SOURCES} STORAGE_ENGINE LINK_LIBRARIES ${ZLIB_LIBRARY})
+MYSQL_ADD_PLUGIN(archive ${ARCHIVE_SOURCES} STORAGE_ENGINE LINK_LIBRARIES ${ZLIB_LIBRARIES})
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 19a0ffe0..1ee1f071 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -267,6 +267,9 @@ ha_archive::ha_archive(handlerton *hton, TABLE_SHARE *table_arg)
archive_reader_open= FALSE;
}
+/* Stack size 50264 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int archive_discover(handlerton *hton, THD* thd, TABLE_SHARE *share)
{
DBUG_ENTER("archive_discover");
@@ -308,6 +311,7 @@ ret:
my_free(frm_ptr);
DBUG_RETURN(my_errno);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/**
@brief Read version 1 meta file (5.0 compatibility routine).
@@ -478,6 +482,10 @@ int ha_archive::read_data_header(azio_stream *file_to_read)
See ha_example.cc for a longer description.
*/
+
+/* Stack size 49608 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
Archive_share *ha_archive::get_share(const char *table_name, int *rc)
{
Archive_share *tmp_share;
@@ -540,6 +548,7 @@ err:
DBUG_RETURN(tmp_share);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
int Archive_share::init_archive_writer()
@@ -761,6 +770,9 @@ int ha_archive::frm_compare(azio_stream *s)
of creation.
*/
+/* Stack size 49608 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int ha_archive::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *create_info)
{
@@ -878,6 +890,7 @@ error:
/* Return error number, if we got one */
DBUG_RETURN(error ? error : -1);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/*
This is where the actual row is written out.
@@ -1496,6 +1509,10 @@ int ha_archive::repair(THD* thd, HA_CHECK_OPT* check_opt)
The table can become fragmented if data was inserted, read, and then
inserted again. What we do is open up the file and recompress it completely.
*/
+
+/* Stack size 50152 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
{
int rc= 0;
@@ -1621,6 +1638,7 @@ error:
DBUG_RETURN(rc);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/*
Below is an example of how to setup row level locking.
diff --git a/storage/columnstore/CMakeLists.txt b/storage/columnstore/CMakeLists.txt
index ebb138c7..3767d5da 100644
--- a/storage/columnstore/CMakeLists.txt
+++ b/storage/columnstore/CMakeLists.txt
@@ -1,6 +1,7 @@
#set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine")
-if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}")
+if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}" OR
+ (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/columnstore/CMakeLists.txt))
return()
endif()
diff --git a/storage/columnstore/columnstore/CMakeLists.txt b/storage/columnstore/columnstore/CMakeLists.txt
index 5d43aef5..0e6ad413 100644
--- a/storage/columnstore/columnstore/CMakeLists.txt
+++ b/storage/columnstore/columnstore/CMakeLists.txt
@@ -223,6 +223,7 @@ IF (MASK_LONGDOUBLE)
MY_CHECK_AND_SET_COMPILER_FLAG("-DMASK_LONGDOUBLE")
ENDIF()
+
SET (CMAKE_REQUIRED_FLAGS "-Werror -Wall")
SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed")
SET (ENGINE_DT_LIB datatypes)
diff --git a/storage/columnstore/columnstore/VERSION b/storage/columnstore/columnstore/VERSION
index 35b4ad7f..fb113a00 100644
--- a/storage/columnstore/columnstore/VERSION
+++ b/storage/columnstore/columnstore/VERSION
@@ -1,4 +1,4 @@
COLUMNSTORE_VERSION_MAJOR=6
COLUMNSTORE_VERSION_MINOR=4
COLUMNSTORE_VERSION_PATCH=8
-COLUMNSTORE_VERSION_RELEASE=1
+COLUMNSTORE_VERSION_RELEASE=2
diff --git a/storage/columnstore/columnstore/datatypes/mcs_datatype.cpp b/storage/columnstore/columnstore/datatypes/mcs_datatype.cpp
index 59bc2bf2..2ca95ba2 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_datatype.cpp
+++ b/storage/columnstore/columnstore/datatypes/mcs_datatype.cpp
@@ -1915,4 +1915,3 @@ const uint8_t* TypeHandlerUDecimal128::getEmptyValueForType(
} // end of namespace datatypes
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/datatypes/mcs_datatype.h b/storage/columnstore/columnstore/datatypes/mcs_datatype.h
index a25c23e1..11b0d989 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_datatype.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_datatype.h
@@ -2522,6 +2522,4 @@ class TypeHandlerTimestamp : public TypeHandlerTemporal
} // end of namespace datatypes
-#endif // MCS_DATATYPE_H_INCLUDED
-
-// vim:ts=2 sw=2:
+#endif // MCS_DATATYPE_H_INCLUDED \ No newline at end of file
diff --git a/storage/columnstore/columnstore/datatypes/mcs_datatype_basic.h b/storage/columnstore/columnstore/datatypes/mcs_datatype_basic.h
index 5ba6cfc1..16179f71 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_datatype_basic.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_datatype_basic.h
@@ -80,4 +80,3 @@ uint64_t xFloatToMCSUInt64Round(SRC value)
} // end of namespace datatypes
#endif // MCS_DATATYPE_BASIC_H_INCLUDED
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/datatypes/mcs_double.h b/storage/columnstore/columnstore/datatypes/mcs_double.h
index e34bf7aa..7e420f2f 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_double.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_double.h
@@ -55,5 +55,4 @@ class TDouble
} // end of namespace datatypes
-#endif // MCS_DOUBLE_H_INCLUDED
-// vim:ts=2 sw=2:
+#endif // MCS_DOUBLE_H_INCLUDED \ No newline at end of file
diff --git a/storage/columnstore/columnstore/datatypes/mcs_float128.h b/storage/columnstore/columnstore/datatypes/mcs_float128.h
index 058ad1ed..c25cfc90 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_float128.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_float128.h
@@ -725,5 +725,4 @@ class TFloat128
} // namespace datatypes
-#endif // MCS_TSFLOAT128_H_INCLUDED
-// vim:ts=2 sw=2:
+#endif // MCS_TSFLOAT128_H_INCLUDED \ No newline at end of file
diff --git a/storage/columnstore/columnstore/datatypes/mcs_int128.cpp b/storage/columnstore/columnstore/datatypes/mcs_int128.cpp
index 13329fc4..58dee474 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_int128.cpp
+++ b/storage/columnstore/columnstore/datatypes/mcs_int128.cpp
@@ -113,4 +113,3 @@ std::ostream& operator<<(std::ostream& os, const TSInt128& x)
}
} // end of namespace datatypes
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/datatypes/mcs_int128.h b/storage/columnstore/columnstore/datatypes/mcs_int128.h
index 02df0c7e..ddc37bdf 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_int128.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_int128.h
@@ -324,4 +324,3 @@ class TSInt128
} // end of namespace datatypes
#endif // MCS_TSINT128_H_INCLUDED
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/datatypes/mcs_int64.h b/storage/columnstore/columnstore/datatypes/mcs_int64.h
index c44f1169..be379a62 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_int64.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_int64.h
@@ -180,5 +180,4 @@ class TSInt64Null : public TSInt64, public TNullFlag
} // end of namespace datatypes
-#endif // MCS_INT64_H_INCLUDED
-// vim:ts=2 sw=2:
+#endif // MCS_INT64_H_INCLUDED \ No newline at end of file
diff --git a/storage/columnstore/columnstore/datatypes/mcs_longdouble.h b/storage/columnstore/columnstore/datatypes/mcs_longdouble.h
index 55215642..f33d7658 100644
--- a/storage/columnstore/columnstore/datatypes/mcs_longdouble.h
+++ b/storage/columnstore/columnstore/datatypes/mcs_longdouble.h
@@ -55,5 +55,4 @@ class TLongDouble
} // end of namespace datatypes
-#endif // MCS_LONGDOUBLE_H_INCLUDED
-// vim:ts=2 sw=2:
+#endif // MCS_LONGDOUBLE_H_INCLUDED \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/ddlpackage/CMakeLists.txt b/storage/columnstore/columnstore/dbcon/ddlpackage/CMakeLists.txt
index ed211403..5557ed3f 100644
--- a/storage/columnstore/columnstore/dbcon/ddlpackage/CMakeLists.txt
+++ b/storage/columnstore/columnstore/dbcon/ddlpackage/CMakeLists.txt
@@ -9,7 +9,7 @@ FIND_PACKAGE(FLEX REQUIRED)
FLEX_TARGET(ddl_scan ddl.l ${CMAKE_CURRENT_BINARY_DIR}/ddl-scan.cpp COMPILE_FLAGS "-i -L -Pddl")
ADD_FLEX_BISON_DEPENDENCY(ddl_scan ddl_gram)
-set_source_files_properties(ddl-scan.cpp PROPERTIES COMPILE_FLAGS -Wno-sign-compare)
+set_source_files_properties(ddl-scan.cpp PROPERTIES COMPILE_FLAGS "-Wno-register -Wno-deprecated-register -Wno-sign-compare -DYY_NO_INPUT")
########### next target ###############
diff --git a/storage/columnstore/columnstore/dbcon/ddlpackageproc/altertableprocessor.cpp b/storage/columnstore/columnstore/dbcon/ddlpackageproc/altertableprocessor.cpp
index aca76bf4..c09c79b4 100644
--- a/storage/columnstore/columnstore/dbcon/ddlpackageproc/altertableprocessor.cpp
+++ b/storage/columnstore/columnstore/dbcon/ddlpackageproc/altertableprocessor.cpp
@@ -2539,7 +2539,6 @@ void AlterTableProcessor::renameColumn(uint32_t sessionID, execplan::CalpontSyst
}
} // namespace ddlpackageprocessor
-// vim:ts=4 sw=4:
#ifdef __clang__
#pragma clang diagnostic pop
diff --git a/storage/columnstore/columnstore/dbcon/ddlpackageproc/createtableprocessor.cpp b/storage/columnstore/columnstore/dbcon/ddlpackageproc/createtableprocessor.cpp
index f51d0395..f0ff32be 100644
--- a/storage/columnstore/columnstore/dbcon/ddlpackageproc/createtableprocessor.cpp
+++ b/storage/columnstore/columnstore/dbcon/ddlpackageproc/createtableprocessor.cpp
@@ -830,4 +830,3 @@ void CreateTableProcessor::rollBackCreateTable(const string& error, BRM::TxnID t
}
} // namespace ddlpackageprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.cpp b/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.cpp
index 3740035d..bf27af32 100644
--- a/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.cpp
+++ b/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.cpp
@@ -1491,4 +1491,3 @@ int DDLPackageProcessor::commitTransaction(uint64_t uniqueId, BRM::TxnID txnID)
}
} // namespace ddlpackageprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.h b/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.h
index d2dd84c7..c2458528 100644
--- a/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.h
+++ b/storage/columnstore/columnstore/dbcon/ddlpackageproc/ddlpackageprocessor.h
@@ -54,7 +54,7 @@
#define EXPORT
#endif
-//#define IDB_DDL_DEBUG
+// #define IDB_DDL_DEBUG
namespace ddlpackageprocessor
{
#define SUMMARY_INFO(message) \
@@ -891,5 +891,4 @@ bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&)
#undef EXPORT
-#endif // DDLPACKAGEPROCESSOR_H
-// vim:ts=4 sw=4:
+#endif // DDLPACKAGEPROCESSOR_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/ddlpackageproc/droptableprocessor.cpp b/storage/columnstore/columnstore/dbcon/ddlpackageproc/droptableprocessor.cpp
index e1ca785d..4cfc7946 100644
--- a/storage/columnstore/columnstore/dbcon/ddlpackageproc/droptableprocessor.cpp
+++ b/storage/columnstore/columnstore/dbcon/ddlpackageproc/droptableprocessor.cpp
@@ -1367,4 +1367,3 @@ TruncTableProcessor::DDLResult TruncTableProcessor::processPackage(
} // namespace ddlpackageprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackage/CMakeLists.txt b/storage/columnstore/columnstore/dbcon/dmlpackage/CMakeLists.txt
index d7b5f235..e999cdae 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackage/CMakeLists.txt
+++ b/storage/columnstore/columnstore/dbcon/dmlpackage/CMakeLists.txt
@@ -10,7 +10,7 @@ FIND_PACKAGE(FLEX REQUIRED)
FLEX_TARGET(dml_scan dml.l ${CMAKE_CURRENT_BINARY_DIR}/dml-scan.cpp COMPILE_FLAGS "-i -L -Pdml")
ADD_FLEX_BISON_DEPENDENCY(dml_scan dml_gram)
-set_source_files_properties(dml-scan.cpp PROPERTIES COMPILE_FLAGS -Wno-sign-compare)
+set_source_files_properties(dml-scan.cpp PROPERTIES COMPILE_FLAGS "-Wno-register -Wno-deprecated-register -Wno-sign-compare -DYY_NO_INPUT")
########### next target ###############
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.cpp b/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.cpp
index 3a71efaf..875e90d7 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.cpp
+++ b/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.cpp
@@ -97,4 +97,3 @@ AutoincrementData::OIDNextValue& AutoincrementData::getOidNextValueMap()
return fOidNextValueMap;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.h b/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.h
index 17be0648..81614f40 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.h
+++ b/storage/columnstore/columnstore/dbcon/dmlpackageproc/autoincrementdata.h
@@ -50,5 +50,4 @@ class AutoincrementData
boost::mutex fOIDnextvalLock;
};
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackageproc/dmlpackageprocessor.cpp b/storage/columnstore/columnstore/dbcon/dmlpackageproc/dmlpackageprocessor.cpp
index b5217b0e..78b19b39 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackageproc/dmlpackageprocessor.cpp
+++ b/storage/columnstore/columnstore/dbcon/dmlpackageproc/dmlpackageprocessor.cpp
@@ -913,4 +913,3 @@ int DMLPackageProcessor::endTransaction(uint64_t uniqueId, BRM::TxnID txnID, boo
return rc;
}
} // namespace dmlpackageprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackageproc/insertpackageprocessor.cpp b/storage/columnstore/columnstore/dbcon/dmlpackageproc/insertpackageprocessor.cpp
index fb844b69..3fd6b7ae 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackageproc/insertpackageprocessor.cpp
+++ b/storage/columnstore/columnstore/dbcon/dmlpackageproc/insertpackageprocessor.cpp
@@ -432,4 +432,3 @@ DMLPackageProcessor::DMLResult InsertPackageProcessor::processPackage(dmlpackage
} // namespace dmlpackageprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.cpp b/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.cpp
index d5f94ec6..1c169917 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.cpp
+++ b/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.cpp
@@ -101,4 +101,3 @@ TablelockData::OIDTablelock& TablelockData::getOidTablelockMap()
}
} // namespace dmlpackageprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.h b/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.h
index a5910d84..9c52d1cf 100644
--- a/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.h
+++ b/storage/columnstore/columnstore/dbcon/dmlpackageproc/tablelockdata.h
@@ -62,5 +62,4 @@ class TablelockData
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/execplan/calpontselectexecutionplan.h b/storage/columnstore/columnstore/dbcon/execplan/calpontselectexecutionplan.h
index 10217d36..04b83689 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/calpontselectexecutionplan.h
+++ b/storage/columnstore/columnstore/dbcon/execplan/calpontselectexecutionplan.h
@@ -940,5 +940,4 @@ inline std::ostream& operator<<(std::ostream& os, const CalpontSelectExecutionPl
}
} // namespace execplan
-#endif // CALPONTSELECTEXECUTIONPLAN_H
-// vim:ts=4 sw=4:
+#endif // CALPONTSELECTEXECUTIONPLAN_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/execplan/calpontsystemcatalog.h b/storage/columnstore/columnstore/dbcon/execplan/calpontsystemcatalog.h
index 5be4b023..56322f3d 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/calpontsystemcatalog.h
+++ b/storage/columnstore/columnstore/dbcon/execplan/calpontsystemcatalog.h
@@ -1284,5 +1284,4 @@ bool ctListSort(const CalpontSystemCatalog::ColType& a, const CalpontSystemCatal
} // namespace execplan
-#endif // EXECPLAN_CALPONTSYSTEMCATALOG_H
-// vim:ts=4 sw=4:
+#endif // EXECPLAN_CALPONTSYSTEMCATALOG_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/execplan/clientrotator.cpp b/storage/columnstore/columnstore/dbcon/execplan/clientrotator.cpp
index 7616f90e..395d7648 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/clientrotator.cpp
+++ b/storage/columnstore/columnstore/dbcon/execplan/clientrotator.cpp
@@ -399,4 +399,3 @@ void ClientRotator::writeToLog(int line, const string& msg, bool critical) const
}
} // namespace execplan
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/execplan/clientrotator.h b/storage/columnstore/columnstore/dbcon/execplan/clientrotator.h
index f0be4ff7..3ce8e97e 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/clientrotator.h
+++ b/storage/columnstore/columnstore/dbcon/execplan/clientrotator.h
@@ -167,5 +167,4 @@ class ClientRotator
};
} // namespace execplan
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/execplan/constantcolumn.cpp b/storage/columnstore/columnstore/dbcon/execplan/constantcolumn.cpp
index a3094285..bcdc6767 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/constantcolumn.cpp
+++ b/storage/columnstore/columnstore/dbcon/execplan/constantcolumn.cpp
@@ -347,4 +347,3 @@ bool ConstantColumn::operator!=(const TreeNode* t) const
}
} // namespace execplan
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/execplan/constantfilter.cpp b/storage/columnstore/columnstore/dbcon/execplan/constantfilter.cpp
index 4f837d0a..18f872e0 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/constantfilter.cpp
+++ b/storage/columnstore/columnstore/dbcon/execplan/constantfilter.cpp
@@ -308,4 +308,3 @@ void ConstantFilter::setSimpleColumnList()
}
} // namespace execplan
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/execplan/sessionmanager.h b/storage/columnstore/columnstore/dbcon/execplan/sessionmanager.h
index 71076c26..9014a703 100644
--- a/storage/columnstore/columnstore/dbcon/execplan/sessionmanager.h
+++ b/storage/columnstore/columnstore/dbcon/execplan/sessionmanager.h
@@ -69,7 +69,7 @@ namespace execplan
* immediately, causing all subsequent references to fail. This only affects
* 'leakcheck'.
*/
-//#define DESTROYSHMSEG
+// #define DESTROYSHMSEG
class SessionManager
{
@@ -214,5 +214,4 @@ class SessionManager
} // namespace execplan
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/anydatalist.cpp b/storage/columnstore/columnstore/dbcon/joblist/anydatalist.cpp
index 4e5df471..da1ae05a 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/anydatalist.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/anydatalist.cpp
@@ -170,4 +170,3 @@ std::ostream& omitOidInDL(std::ostream& strm)
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/batchprimitiveprocessor-jl.h b/storage/columnstore/columnstore/dbcon/joblist/batchprimitiveprocessor-jl.h
index 46c8a583..577a16d3 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/batchprimitiveprocessor-jl.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/batchprimitiveprocessor-jl.h
@@ -44,7 +44,7 @@
#include "brm.h"
#include "command-jl.h"
#include "resourcemanager.h"
-//#include "tableband.h"
+// #include "tableband.h"
namespace joblist
{
@@ -367,5 +367,4 @@ class BatchPrimitiveProcessorJL
} // namespace joblist
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/columncommand-jl.h b/storage/columnstore/columnstore/dbcon/joblist/columncommand-jl.h
index e0001902..2ac982cc 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/columncommand-jl.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/columncommand-jl.h
@@ -130,5 +130,4 @@ class ColumnCommandJL : public CommandJL
} // namespace joblist
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.cpp b/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.cpp
index e0475c11..d03f21e0 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.cpp
@@ -828,4 +828,3 @@ void CrossEngineStep::formatMiniStats()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.h b/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.h
index 71c7386f..23f3315c 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/crossenginestep.h
@@ -250,6 +250,4 @@ class CrossEngineStep : public BatchPrimitive, public TupleDeliveryStep
} // namespace joblist
-#endif // JOBLIST_CROSSENGINESTEP_H
-
-// vim:ts=4 sw=4:
+#endif // JOBLIST_CROSSENGINESTEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/diskjoinstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/diskjoinstep.cpp
index 87be2166..2f69f962 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/diskjoinstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/diskjoinstep.cpp
@@ -163,7 +163,7 @@ void DiskJoinStep::smallReader()
RGData rgData;
bool more = true;
int64_t memUsage = 0, combinedMemUsage = 0;
- int rowCount = 0;
+ [[maybe_unused]] int rowCount = 0;
RowGroup l_smallRG = smallRG;
try
@@ -224,7 +224,7 @@ void DiskJoinStep::largeReader()
RGData rgData;
bool more = true;
int64_t largeSize = 0;
- int rowCount = 0;
+ [[maybe_unused]] int rowCount = 0;
RowGroup l_largeRG = largeRG;
largeIterationCount++;
diff --git a/storage/columnstore/columnstore/dbcon/joblist/distributedenginecomm.cpp b/storage/columnstore/columnstore/dbcon/joblist/distributedenginecomm.cpp
index ced9bf81..4e735e58 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/distributedenginecomm.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/distributedenginecomm.cpp
@@ -1150,4 +1150,3 @@ uint32_t DistributedEngineComm::MQE::getNextConnectionId(const size_t pmIndex,
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/elementtype.h b/storage/columnstore/columnstore/dbcon/joblist/elementtype.h
index 0d1f6ed7..0b38d93e 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/elementtype.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/elementtype.h
@@ -245,14 +245,14 @@ extern std::ostream& operator<<(std::ostream& out, const TupleType& rhs);
#ifndef NO_DATALISTS
-//#include "bandeddl.h"
-//#include "wsdl.h"
+// #include "bandeddl.h"
+// #include "wsdl.h"
#include "fifo.h"
-//#include "bucketdl.h"
-//#include "constantdatalist.h"
-//#include "swsdl.h"
-//#include "zdl.h"
-//#include "deliverywsdl.h"
+// #include "bucketdl.h"
+// #include "constantdatalist.h"
+// #include "swsdl.h"
+// #include "zdl.h"
+// #include "deliverywsdl.h"
namespace joblist
{
@@ -639,5 +639,4 @@ extern std::ostream& omitOidInDL(std::ostream& strm);
#endif
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/errorinfo.h b/storage/columnstore/columnstore/dbcon/joblist/errorinfo.h
index 710cb89c..a709a938 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/errorinfo.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/errorinfo.h
@@ -53,5 +53,4 @@ typedef boost::shared_ptr<ErrorInfo> SErrorInfo;
} // namespace joblist
-#endif // JOBLIST_ERROR_INFO_H_
-// vim:ts=4 sw=4:
+#endif // JOBLIST_ERROR_INFO_H_ \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/expressionstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/expressionstep.cpp
index 2f5b96af..b182c7b2 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/expressionstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/expressionstep.cpp
@@ -790,4 +790,3 @@ const string ExpressionStep::toString() const
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/fifo.h b/storage/columnstore/columnstore/dbcon/joblist/fifo.h
index 62bf8935..025e9f63 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/fifo.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/fifo.h
@@ -530,5 +530,4 @@ void FIFO<element_t>::totalFileCounts(uint64_t& numFiles, uint64_t& numBytes) co
} // namespace joblist
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/groupconcat.cpp b/storage/columnstore/columnstore/dbcon/joblist/groupconcat.cpp
index 5eb0e1b1..f9a64645 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/groupconcat.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/groupconcat.cpp
@@ -1050,4 +1050,3 @@ const string GroupConcatNoOrder::toString() const
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jlf_common.cpp b/storage/columnstore/columnstore/dbcon/joblist/jlf_common.cpp
index 6ae8724e..47a1ecc6 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jlf_common.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/jlf_common.cpp
@@ -822,4 +822,3 @@ bool compatibleColumnTypes(const CalpontSystemCatalog::ColDataType& dt1, uint32_
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jlf_execplantojoblist.cpp b/storage/columnstore/columnstore/dbcon/joblist/jlf_execplantojoblist.cpp
index 4ba29aa5..441ee1ea 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jlf_execplantojoblist.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/jlf_execplantojoblist.cpp
@@ -3446,7 +3446,6 @@ void JLF_ExecPlanToJobList::addJobSteps(JobStepVector& nsv, JobInfo& jobInfo, bo
}
} // namespace joblist
-// vim:ts=4 sw=4:
#ifdef __clang__
#pragma clang diagnostic pop
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jlf_graphics.cpp b/storage/columnstore/columnstore/dbcon/joblist/jlf_graphics.cpp
index 7365e1c4..348fb85d 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jlf_graphics.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/jlf_graphics.cpp
@@ -418,7 +418,6 @@ ostream& writeDotCmds(ostream& dotFile, const JobStepVector& query, const JobSte
} // end namespace jlf_graphics
-// vim:ts=4 sw=4 syntax=cpp:
#ifdef __clang__
#pragma clang diagnostic pop
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jlf_subquery.cpp b/storage/columnstore/columnstore/dbcon/joblist/jlf_subquery.cpp
index 91d8a5de..0ea66ac0 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jlf_subquery.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/jlf_subquery.cpp
@@ -875,4 +875,3 @@ SJSTEP doUnionSub(CalpontExecutionPlan* ep, JobInfo& jobInfo)
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jlf_tuplejoblist.cpp b/storage/columnstore/columnstore/dbcon/joblist/jlf_tuplejoblist.cpp
index 7678d278..d388ce9f 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jlf_tuplejoblist.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/jlf_tuplejoblist.cpp
@@ -4559,7 +4559,6 @@ SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo&
}
} // namespace joblist
-// vim:ts=4 sw=4:
#ifdef __clang__
#pragma clang diagnostic pop
diff --git a/storage/columnstore/columnstore/dbcon/joblist/joblist.cpp b/storage/columnstore/columnstore/dbcon/joblist/joblist.cpp
index fd58bde0..7adc6a98 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/joblist.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/joblist.cpp
@@ -1233,4 +1233,3 @@ void TupleJobList::abort()
#pragma clang diagnostic pop
#endif
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/joblist.h b/storage/columnstore/columnstore/dbcon/joblist/joblist.h
index 61f498a2..4c6eb19e 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/joblist.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/joblist.h
@@ -261,5 +261,4 @@ typedef boost::shared_ptr<TupleJobList> STJLP;
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp b/storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp
index 648b6f1c..26809d39 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp
@@ -2314,7 +2314,6 @@ SJLP JobListFactory::makeJobList(CalpontExecutionPlan* cplan, ResourceManager* r
}
} // namespace joblist
-// vim:ts=4 sw=4:
#ifdef __clang__
#pragma clang diagnostic pop
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jobstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/jobstep.cpp
index 36d13f35..8f42dff1 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jobstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/jobstep.cpp
@@ -244,4 +244,3 @@ void JobStep::handleException(std::exception_ptr e, const int errorCode, const u
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/jobstep.h b/storage/columnstore/columnstore/dbcon/joblist/jobstep.h
index e3c669cf..47371eb1 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/jobstep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/jobstep.h
@@ -567,5 +567,4 @@ typedef boost::shared_ptr<JobStep> SJSTEP;
} // namespace joblist
-#endif // JOBLIST_JOBSTEP_H_
-// vim:ts=4 sw=4:
+#endif // JOBLIST_JOBSTEP_H_ \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/lbidlist.cpp b/storage/columnstore/columnstore/dbcon/joblist/lbidlist.cpp
index 26080f0c..e784eb26 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/lbidlist.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/lbidlist.cpp
@@ -920,4 +920,3 @@ template bool LBIDList::checkRangeOverlap<int64_t>(int64_t min, int64_t max, int
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/limitedorderby.cpp b/storage/columnstore/columnstore/dbcon/joblist/limitedorderby.cpp
index 3aee6fc0..f4e573bd 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/limitedorderby.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/limitedorderby.cpp
@@ -303,4 +303,3 @@ const string LimitedOrderBy::toString() const
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/passthrucommand-jl.cpp b/storage/columnstore/columnstore/dbcon/joblist/passthrucommand-jl.cpp
index b512e37b..84e63f9c 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/passthrucommand-jl.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/passthrucommand-jl.cpp
@@ -110,4 +110,3 @@ uint16_t PassThruCommandJL::getWidth()
}
}; // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/pcolscan.cpp b/storage/columnstore/columnstore/dbcon/joblist/pcolscan.cpp
index aa6fd57b..2a3e64fb 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/pcolscan.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/pcolscan.cpp
@@ -472,4 +472,3 @@ void pColScanStep::appendFilter(const std::vector<const execplan::Filter*>& fs)
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/pcolstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/pcolstep.cpp
index fe9a6d5c..3a314a7d 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/pcolstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/pcolstep.cpp
@@ -616,4 +616,3 @@ void pColStep::appendFilter(const std::vector<const execplan::Filter*>& fs)
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/pdictionaryscan.cpp b/storage/columnstore/columnstore/dbcon/joblist/pdictionaryscan.cpp
index 08b65a70..910f0a8b 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/pdictionaryscan.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/pdictionaryscan.cpp
@@ -929,4 +929,3 @@ uint16_t pDictionaryScan::planFlagsToPrimFlags(uint32_t planFlags)
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/primitivemsg.h b/storage/columnstore/columnstore/dbcon/joblist/primitivemsg.h
index 3d467a8e..216182c9 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/primitivemsg.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/primitivemsg.h
@@ -885,5 +885,4 @@ struct LbidAtVer
#pragma pack(pop)
-#endif // JOBLIST_PRIMITIVE_H
-// vim:ts=4 sw=4:
+#endif // JOBLIST_PRIMITIVE_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/primitivestep.h b/storage/columnstore/columnstore/dbcon/joblist/primitivestep.h
index d20ef5a1..e25b3899 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/primitivestep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/primitivestep.h
@@ -111,18 +111,24 @@ class pColStep : public JobStep
pColStep(const PassThruStep& rhs);
- virtual ~pColStep(){}
+ virtual ~pColStep()
+ {
+ }
/** @brief Starts processing. Set at least the RID list before calling.
*
* Starts processing. Set at least the RID list before calling this.
*/
- virtual void run(){}
+ virtual void run()
+ {
+ }
/** @brief Sync's the caller with the end of execution.
*
* Does nothing. Returns when this instance is finished.
*/
- virtual void join(){}
+ virtual void join()
+ {
+ }
virtual const std::string toString() const;
@@ -347,19 +353,25 @@ class pColScanStep : public JobStep
const execplan::CalpontSystemCatalog::ColType& ct, const JobInfo& jobInfo);
pColScanStep(const pColStep& rhs);
- ~pColScanStep(){}
+ ~pColScanStep()
+ {
+ }
/** @brief Starts processing.
*
* Starts processing.
*/
- virtual void run(){}
+ virtual void run()
+ {
+ }
/** @brief Sync's the caller with the end of execution.
*
* Does nothing. Returns when this instance is finished.
*/
- virtual void join(){}
+ virtual void join()
+ {
+ }
virtual bool isDictCol() const
{
@@ -549,12 +561,18 @@ class pDictionaryStep : public JobStep
pDictionaryStep(execplan::CalpontSystemCatalog::OID oid, execplan::CalpontSystemCatalog::OID tabelOid,
const execplan::CalpontSystemCatalog::ColType& ct, const JobInfo& jobInfo);
- virtual ~pDictionaryStep(){}
+ virtual ~pDictionaryStep()
+ {
+ }
/** @brief virtual void Run method
*/
- virtual void run(){}
- virtual void join(){}
+ virtual void run()
+ {
+ }
+ virtual void join()
+ {
+ }
// void setOutList(StringDataList* rids);
void setInputList(DataList_t* rids)
{
@@ -1506,7 +1524,7 @@ class FilterStep : public JobStep
protected:
// void unblockDataLists(FifoDataList* fifo, StringFifoDataList* strFifo, StrDataList* strResult,
- //DataList_t* result);
+ // DataList_t* result);
private:
// This i/f is not meaningful in this step
@@ -1676,5 +1694,4 @@ class PseudoColStep : public pColStep
} // namespace joblist
-#endif // JOBLIST_PRIMITIVESTEP_H
-// vim:ts=4 sw=4:
+#endif // JOBLIST_PRIMITIVESTEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/rowestimator.cpp b/storage/columnstore/columnstore/dbcon/joblist/rowestimator.cpp
index 9babae7c..fa7e8920 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/rowestimator.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/rowestimator.cpp
@@ -269,8 +269,8 @@ float RowEstimator::estimateRowReturnFactor(const BRM::EMEntry& emEntry, const m
float tempFactor = 1.0;
uint64_t adjustedMin = 0, adjustedMax = 0;
- uint128_t adjustedBigMin, adjustedBigMax;
- uint32_t distinctValuesEstimate;
+ uint128_t adjustedBigMin = 0, adjustedBigMax = 0;
+ uint32_t distinctValuesEstimate = 0;
// Adjust values based on column type and estimate the
if (!ct.isWideDecimalType())
diff --git a/storage/columnstore/columnstore/dbcon/joblist/subquerystep.cpp b/storage/columnstore/columnstore/dbcon/joblist/subquerystep.cpp
index a019c24f..fbc46912 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/subquerystep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/subquerystep.cpp
@@ -533,4 +533,3 @@ void SubAdapterStep::formatMiniStats()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/subquerystep.h b/storage/columnstore/columnstore/dbcon/joblist/subquerystep.h
index fb0eca13..e7a10f57 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/subquerystep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/subquerystep.h
@@ -274,5 +274,4 @@ class SubAdapterStep : public JobStep, public TupleDeliveryStep
} // namespace joblist
-#endif // SUBQUERY_STEP_H
-// vim:ts=4 sw=4:
+#endif // SUBQUERY_STEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/subquerytransformer.cpp b/storage/columnstore/columnstore/dbcon/joblist/subquerytransformer.cpp
index 816b6aa7..48f1cc2d 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/subquerytransformer.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/subquerytransformer.cpp
@@ -622,4 +622,3 @@ void SimpleScalarTransformer::getScalarResult()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tuple-bps.cpp b/storage/columnstore/columnstore/dbcon/joblist/tuple-bps.cpp
index f9a6d736..c730e494 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tuple-bps.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/tuple-bps.cpp
@@ -3334,4 +3334,3 @@ template bool TupleBPS::compareSingleValue<int64_t>(uint8_t COP, int64_t val1, i
template bool TupleBPS::compareSingleValue<int128_t>(uint8_t COP, int128_t val1, int128_t val2) const;
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.cpp b/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.cpp
index 3f06ed1c..16ce5611 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.cpp
@@ -5962,4 +5962,3 @@ void TupleAggregateStep::formatMiniStats()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.h b/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.h
index 95d6ee42..f15c87bc 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/tupleaggregatestep.h
@@ -225,6 +225,4 @@ class TupleAggregateStep : public JobStep, public TupleDeliveryStep
} // namespace joblist
-#endif // JOBLIST_TUPLEAGGREGATESTEP_H
-
-// vim:ts=4 sw=4:
+#endif // JOBLIST_TUPLEAGGREGATESTEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.cpp
index f6a7d70c..b93e4137 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.cpp
@@ -1258,4 +1258,3 @@ void TupleAnnexStep::formatMiniStats()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.h b/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.h
index 96cc0064..fa761262 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/tupleannexstep.h
@@ -194,6 +194,4 @@ class reservablePQ : private std::priority_queue<T>
} // namespace joblist
-#endif // JOBLIST_TUPLEANNEXSTEP_H
-
-// vim:ts=4 sw=4:
+#endif // JOBLIST_TUPLEANNEXSTEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.cpp
index ee252ec0..065b087d 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.cpp
@@ -842,4 +842,3 @@ const string TupleConstantBooleanStep::toString() const
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.h b/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.h
index 0aca68ff..e1bd3b93 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/tupleconstantstep.h
@@ -190,6 +190,4 @@ class TupleConstantBooleanStep : public TupleConstantStep
} // namespace joblist
-#endif // JOBLIST_TUPLECONSTANTSTEP_H
-
-// vim:ts=4 sw=4:
+#endif // JOBLIST_TUPLECONSTANTSTEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp b/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp
index 8625723e..0b646b46 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.cpp
@@ -2017,4 +2017,3 @@ void TupleHashJoinStep::abort()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.h b/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.h
index 8531cfd7..45ee8729 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/tuplehashjoin.h
@@ -653,5 +653,4 @@ class TupleHashJoinStep : public JobStep, public TupleDeliveryStep
} // namespace joblist
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.cpp
index 701e77b3..60496895 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.cpp
@@ -408,4 +408,3 @@ void TupleHavingStep::formatMiniStats()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.h b/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.h
index 068f3d35..eae7ae0c 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/tuplehavingstep.h
@@ -117,5 +117,3 @@ class TupleHavingStep : public ExpressionStep, public TupleDeliveryStep
} // namespace joblist
#endif // JOBLIST_TUPLEHAVINGSTEP_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/virtualtable.cpp b/storage/columnstore/columnstore/dbcon/joblist/virtualtable.cpp
index dc9bf275..8fe1ec67 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/virtualtable.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/virtualtable.cpp
@@ -158,4 +158,3 @@ const CalpontSystemCatalog::ColType& VirtualTable::columnType(uint32_t i) const
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.cpp b/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.cpp
index 1ab8d398..ab7b8ca8 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.cpp
+++ b/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.cpp
@@ -1599,4 +1599,3 @@ void WindowFunctionStep::formatMiniStats()
}
} // namespace joblist
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.h b/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.h
index e2f03eb4..fb5597e7 100644
--- a/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.h
+++ b/storage/columnstore/columnstore/dbcon/joblist/windowfunctionstep.h
@@ -226,6 +226,4 @@ class WindowFunctionStep : public JobStep, public TupleDeliveryStep
} // namespace joblist
-#endif // JOBLIST_WINDOWFUNCTIONSTEP_H
-
-// vim:ts=4 sw=4:
+#endif // JOBLIST_WINDOWFUNCTIONSTEP_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_autoi.cpp b/storage/columnstore/columnstore/dbcon/mysql/ha_autoi.cpp
index ddfbcdc2..4b9a2ae3 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/ha_autoi.cpp
+++ b/storage/columnstore/columnstore/dbcon/mysql/ha_autoi.cpp
@@ -176,4 +176,3 @@ bool parseAutoincrementColumnComment(std::string comment, uint64_t& startValue)
return autoincrement;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_datatype.h b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_datatype.h
index 2f9e625d..b0fd54a6 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_datatype.h
+++ b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_datatype.h
@@ -842,6 +842,4 @@ class WriteBatchFieldMariaDB : public WriteBatchField
} // end of namespace datatypes
-#endif
-
-// vim:ts=2 sw=2:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_ddl.cpp b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_ddl.cpp
index 2d18688f..305b8e07 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_ddl.cpp
+++ b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_ddl.cpp
@@ -2810,4 +2810,3 @@ extern "C"
}
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_dml.cpp b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_dml.cpp
index bd142382..a3f97db7 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_dml.cpp
+++ b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_dml.cpp
@@ -1001,4 +1001,3 @@ int ha_mcs_impl_close_connection_(handlerton* hton, THD* thd, cal_connection_inf
return rc;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_execplan.cpp b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_execplan.cpp
index 55f6de40..798e5af8 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_execplan.cpp
+++ b/storage/columnstore/columnstore/dbcon/mysql/ha_mcs_execplan.cpp
@@ -10481,4 +10481,3 @@ int getGroupPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, cal_gro
}
} // namespace cal_impl_if
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/mysql/ha_pseudocolumn.cpp b/storage/columnstore/columnstore/dbcon/mysql/ha_pseudocolumn.cpp
index 5b1010e8..48811328 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/ha_pseudocolumn.cpp
+++ b/storage/columnstore/columnstore/dbcon/mysql/ha_pseudocolumn.cpp
@@ -584,4 +584,3 @@ execplan::ReturnedColumn* buildPseudoColumn(Item* item, gp_walk_info& gwi, bool&
}
} // namespace cal_impl_if
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dbcon/mysql/idb_mysql.h b/storage/columnstore/columnstore/dbcon/mysql/idb_mysql.h
index bc966ffc..06911c6c 100644
--- a/storage/columnstore/columnstore/dbcon/mysql/idb_mysql.h
+++ b/storage/columnstore/columnstore/dbcon/mysql/idb_mysql.h
@@ -33,8 +33,8 @@ bool isnan(T);
#endif
#endif
-//#define INFINIDB_DEBUG
-//#define DEBUG_WALK_COND
+// #define INFINIDB_DEBUG
+// #define DEBUG_WALK_COND
#define MYSQL_SERVER 1 // needed for definition of struct THD in mysql_priv.h
#define USE_CALPONT_REGEX
@@ -119,5 +119,4 @@ inline char* idb_mysql_query_str(THD* thd)
}
} // namespace
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/ddlproc/ddlproc.cpp b/storage/columnstore/columnstore/ddlproc/ddlproc.cpp
index e479fbf4..f203f85d 100644
--- a/storage/columnstore/columnstore/ddlproc/ddlproc.cpp
+++ b/storage/columnstore/columnstore/ddlproc/ddlproc.cpp
@@ -248,4 +248,3 @@ int main(int argc, char** argv)
return ServiceDDLProc(opt).Run();
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/ddlproc/ddlprocessor.cpp b/storage/columnstore/columnstore/ddlproc/ddlprocessor.cpp
index eb6f3d09..cca42af1 100644
--- a/storage/columnstore/columnstore/ddlproc/ddlprocessor.cpp
+++ b/storage/columnstore/columnstore/ddlproc/ddlprocessor.cpp
@@ -876,4 +876,3 @@ int DDLProcessor::commitTransaction(uint32_t txnID, std::string& errorMsg)
return rc;
}
} // namespace ddlprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.cpp b/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.cpp
index 1a61e1eb..48307417 100644
--- a/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.cpp
+++ b/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.cpp
@@ -547,4 +547,3 @@ void BatchInsertProc::getError(int& errorCode, std::string& errMsg)
errMsg = fErrMsg;
}
} // namespace dmlprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.h b/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.h
index c7cccb1d..f889c89c 100644
--- a/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.h
+++ b/storage/columnstore/columnstore/dmlproc/batchinsertprocessor.h
@@ -94,5 +94,4 @@ class BatchInsertProc
};
} // namespace dmlprocessor
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/dmlproc/dmlproc.cpp b/storage/columnstore/columnstore/dmlproc/dmlproc.cpp
index f1fa9cc4..fb79ae59 100644
--- a/storage/columnstore/columnstore/dmlproc/dmlproc.cpp
+++ b/storage/columnstore/columnstore/dmlproc/dmlproc.cpp
@@ -639,14 +639,7 @@ int ServiceDMLProc::Child()
// Couldn't check the return code b/c
// fuser returns 1 for unused port.
-#if defined(__GNUC__) && __GNUC__ >= 5
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-result"
- (void)::system(cmd.c_str());
-#pragma GCC diagnostic pop
-#else
- (void)::system(cmd.c_str());
-#endif
+ std::ignore = ::system(cmd.c_str());
}
catch (...)
{
@@ -698,4 +691,3 @@ int main(int argc, char** argv)
return ServiceDMLProc(opt).Run();
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dmlproc/dmlprocessor.cpp b/storage/columnstore/columnstore/dmlproc/dmlprocessor.cpp
index 33e9b3d1..0cc5337a 100644
--- a/storage/columnstore/columnstore/dmlproc/dmlprocessor.cpp
+++ b/storage/columnstore/columnstore/dmlproc/dmlprocessor.cpp
@@ -2001,4 +2001,3 @@ void DMLProcessor::log(const std::string& msg, logging::LOG_TYPE level)
}
} // namespace dmlprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/dmlproc/dmlprocessor.h b/storage/columnstore/columnstore/dmlproc/dmlprocessor.h
index b1863600..35465cda 100644
--- a/storage/columnstore/columnstore/dmlproc/dmlprocessor.h
+++ b/storage/columnstore/columnstore/dmlproc/dmlprocessor.h
@@ -331,5 +331,4 @@ class RollbackTransactionProcessor : public dmlpackageprocessor::DMLPackageProce
} // namespace dmlprocessor
-#endif // DMLPROCESSOR_H
-// vim:ts=4 sw=4:
+#endif // DMLPROCESSOR_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/exemgr/activestatementcounter.cpp b/storage/columnstore/columnstore/exemgr/activestatementcounter.cpp
index 27a3df1d..b25e6154 100644
--- a/storage/columnstore/columnstore/exemgr/activestatementcounter.cpp
+++ b/storage/columnstore/columnstore/exemgr/activestatementcounter.cpp
@@ -57,4 +57,3 @@ void ActiveStatementCounter::decr(bool& counted)
--fStatementCount;
condvar.notify_one();
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/exemgr/activestatementcounter.h b/storage/columnstore/columnstore/exemgr/activestatementcounter.h
index e8e75c58..fbbf953c 100644
--- a/storage/columnstore/columnstore/exemgr/activestatementcounter.h
+++ b/storage/columnstore/columnstore/exemgr/activestatementcounter.h
@@ -63,5 +63,4 @@ class ActiveStatementCounter
BRM::VSS fVss;
};
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/exemgr/main.cpp b/storage/columnstore/columnstore/exemgr/main.cpp
index 513cc075..abb0991c 100644
--- a/storage/columnstore/columnstore/exemgr/main.cpp
+++ b/storage/columnstore/columnstore/exemgr/main.cpp
@@ -1825,4 +1825,3 @@ int main(int argc, char* argv[])
return ServiceExeMgr(opt).Run();
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.cpp b/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.cpp
index d33ac883..47153584 100644
--- a/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.cpp
+++ b/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.cpp
@@ -1063,4 +1063,3 @@ std::string Oam::itoa(const int i)
return ss.str();
}
} // namespace oam
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.h b/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.h
index 504a537d..7e762ff0 100644
--- a/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.h
+++ b/storage/columnstore/columnstore/oam/oamcpp/liboamcpp.h
@@ -425,5 +425,4 @@ class Oam
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/oamapps/columnstoreDB/columnstoreDB.cpp b/storage/columnstore/columnstore/oamapps/columnstoreDB/columnstoreDB.cpp
index f716f9bd..3bdca8b6 100644
--- a/storage/columnstore/columnstore/oamapps/columnstoreDB/columnstoreDB.cpp
+++ b/storage/columnstore/columnstore/oamapps/columnstoreDB/columnstoreDB.cpp
@@ -271,7 +271,7 @@ int main(int argc, char** argv)
Oam oam;
BRM::DBRM dbrm;
- char c;
+ signed char c;
// Invokes member function `int operator ()(void);'
while ((c = getopt(argc, argv, "c:h")) != -1)
diff --git a/storage/columnstore/columnstore/oamapps/postConfigure/mycnfUpgrade.cpp b/storage/columnstore/columnstore/oamapps/postConfigure/mycnfUpgrade.cpp
index d46bd773..a5b51dec 100644
--- a/storage/columnstore/columnstore/oamapps/postConfigure/mycnfUpgrade.cpp
+++ b/storage/columnstore/columnstore/oamapps/postConfigure/mycnfUpgrade.cpp
@@ -284,4 +284,3 @@ int main(int argc, char* argv[])
exit(0);
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/oamapps/sessionWalker/sessionwalker.cpp b/storage/columnstore/columnstore/oamapps/sessionWalker/sessionwalker.cpp
index 5f096012..06cf08bd 100644
--- a/storage/columnstore/columnstore/oamapps/sessionWalker/sessionwalker.cpp
+++ b/storage/columnstore/columnstore/oamapps/sessionWalker/sessionwalker.cpp
@@ -133,4 +133,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/blockcache/blockcacheclient.h b/storage/columnstore/columnstore/primitives/blockcache/blockcacheclient.h
index ccdb5b16..c4b06c7b 100644
--- a/storage/columnstore/columnstore/primitives/blockcache/blockcacheclient.h
+++ b/storage/columnstore/columnstore/primitives/blockcache/blockcacheclient.h
@@ -177,5 +177,4 @@ class blockCacheClient
} // namespace dbbc
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/blockcache/blockrequestprocessor.h b/storage/columnstore/columnstore/primitives/blockcache/blockrequestprocessor.h
index edb1479f..3a1de568 100644
--- a/storage/columnstore/columnstore/primitives/blockcache/blockrequestprocessor.h
+++ b/storage/columnstore/columnstore/primitives/blockcache/blockrequestprocessor.h
@@ -191,5 +191,4 @@ class BlockRequestProcessor
};
} // namespace dbbc
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/blockcache/filerequest.h b/storage/columnstore/columnstore/primitives/blockcache/filerequest.h
index 19bd9256..0ede2eef 100644
--- a/storage/columnstore/columnstore/primitives/blockcache/filerequest.h
+++ b/storage/columnstore/columnstore/primitives/blockcache/filerequest.h
@@ -321,5 +321,4 @@ class fileRequest
} // namespace dbbc
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/blockcache/iomanager.cpp b/storage/columnstore/columnstore/primitives/blockcache/iomanager.cpp
index 81eb787c..d8cae6f3 100644
--- a/storage/columnstore/columnstore/primitives/blockcache/iomanager.cpp
+++ b/storage/columnstore/columnstore/primitives/blockcache/iomanager.cpp
@@ -1442,4 +1442,3 @@ void ioManager::handleBlockReadError(fileRequest* fr, const string& errMsg, bool
}
} // namespace dbbc
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/blockcache/iomanager.h b/storage/columnstore/columnstore/primitives/blockcache/iomanager.h
index 6cf61569..546675d7 100644
--- a/storage/columnstore/columnstore/primitives/blockcache/iomanager.h
+++ b/storage/columnstore/columnstore/primitives/blockcache/iomanager.h
@@ -43,7 +43,7 @@
#include "fileblockrequestqueue.h"
#include "filebuffermgr.h"
-//#define SHARED_NOTHING_DEMO_2
+// #define SHARED_NOTHING_DEMO_2
namespace dbbc
{
@@ -148,5 +148,4 @@ void dropFDCache();
void purgeFDCache(std::vector<BRM::FileInfo>& files);
} // namespace dbbc
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/linux-port/column.cpp b/storage/columnstore/columnstore/primitives/linux-port/column.cpp
index fb13ffba..f07416a2 100644
--- a/storage/columnstore/columnstore/primitives/linux-port/column.cpp
+++ b/storage/columnstore/columnstore/primitives/linux-port/column.cpp
@@ -18,7 +18,7 @@
#include <iostream>
#include <sstream>
-//#define NDEBUG
+// #define NDEBUG
#include <cassert>
#include <cmath>
#include <functional>
@@ -1636,7 +1636,7 @@ template <typename T, typename std::enable_if<sizeof(T) == sizeof(int8_t) || siz
T>::type* = nullptr> // gcc >= 5
#else
sizeof(T) == sizeof(int128_t),
- T>::type*> // gcc 4.8.5
+ T>::type*> // gcc 4.8.5
#endif
#else
sizeof(T) == sizeof(int128_t),
@@ -1672,7 +1672,7 @@ template <typename T,
#if ___GNUC__ >= 5
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type* = nullptr> // gcc >= 5
#else
- typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type*> // gcc 4.8.5
+ typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type*> // gcc 4.8.5
#endif
#else
typename std::enable_if<sizeof(T) <= sizeof(int64_t), T>::type* = nullptr>
@@ -1763,5 +1763,4 @@ template void primitives::PrimitiveProcessor::columnScanAndFilter<int64_t>(NewCo
template void primitives::PrimitiveProcessor::columnScanAndFilter<int128_t>(NewColRequestHeader*,
ColResultHeader*);
-} // namespace primitives
-// vim:ts=4 sw=4:
+} // namespace primitives \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/linux-port/dictionary.cpp b/storage/columnstore/columnstore/primitives/linux-port/dictionary.cpp
index 2942d4fd..360d8b60 100644
--- a/storage/columnstore/columnstore/primitives/linux-port/dictionary.cpp
+++ b/storage/columnstore/columnstore/primitives/linux-port/dictionary.cpp
@@ -620,4 +620,3 @@ void PrimitiveProcessor::p_Dictionary(const DictInput* in, vector<uint8_t>* out,
}
} // namespace primitives
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/linux-port/index.cpp b/storage/columnstore/columnstore/primitives/linux-port/index.cpp
index bbfc949e..2d86d35e 100644
--- a/storage/columnstore/columnstore/primitives/linux-port/index.cpp
+++ b/storage/columnstore/columnstore/primitives/linux-port/index.cpp
@@ -1130,4 +1130,3 @@ void PrimitiveProcessor::p_IdxList(const IndexListHeader* rqst, IndexListHeader*
}
} // namespace primitives
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/linux-port/primitiveprocessor.h b/storage/columnstore/columnstore/primitives/linux-port/primitiveprocessor.h
index baaf054f..453d41d8 100644
--- a/storage/columnstore/columnstore/primitives/linux-port/primitiveprocessor.h
+++ b/storage/columnstore/columnstore/primitives/linux-port/primitiveprocessor.h
@@ -563,5 +563,4 @@ boost::shared_ptr<ParsedColumnFilter> _parseColumnFilter(
} // namespace primitives
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp b/storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp
index e16b7ff1..5d898d05 100644
--- a/storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp
+++ b/storage/columnstore/columnstore/primitives/primproc/batchprimitiveprocessor.cpp
@@ -2806,4 +2806,3 @@ void BatchPrimitiveProcessor::buildVSSCache(uint32_t loopCount)
}
} // namespace primitiveprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp b/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp
index 16426f49..a7069359 100644
--- a/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp
+++ b/storage/columnstore/columnstore/primitives/primproc/columncommand.cpp
@@ -1226,4 +1226,3 @@ void ColumnCommandInt128::issuePrimitive()
}
} // namespace primitiveprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/primproc/columncommand.h b/storage/columnstore/columnstore/primitives/primproc/columncommand.h
index b3ec49d7..c260f23d 100644
--- a/storage/columnstore/columnstore/primitives/primproc/columncommand.h
+++ b/storage/columnstore/columnstore/primitives/primproc/columncommand.h
@@ -307,5 +307,4 @@ inline void ColumnCommand::fillEmptyBlock<messageqcpp::ByteStream::hexbyte>(uint
} // namespace primitiveprocessor
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/primitives/primproc/primitiveserver.cpp b/storage/columnstore/columnstore/primitives/primproc/primitiveserver.cpp
index 99aa7a31..19c1f6a4 100644
--- a/storage/columnstore/columnstore/primitives/primproc/primitiveserver.cpp
+++ b/storage/columnstore/columnstore/primitives/primproc/primitiveserver.cpp
@@ -2575,4 +2575,3 @@ bool BPPV::aborted()
// end workaround
} // namespace primitiveprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/primproc/primproc.cpp b/storage/columnstore/columnstore/primitives/primproc/primproc.cpp
index 96ab2088..ce757c32 100644
--- a/storage/columnstore/columnstore/primitives/primproc/primproc.cpp
+++ b/storage/columnstore/columnstore/primitives/primproc/primproc.cpp
@@ -786,4 +786,3 @@ int main(int argc, char** argv)
return ServicePrimProc(opt).Run();
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/primitives/primproc/udf.cpp b/storage/columnstore/columnstore/primitives/primproc/udf.cpp
index 7a836590..188e5128 100644
--- a/storage/columnstore/columnstore/primitives/primproc/udf.cpp
+++ b/storage/columnstore/columnstore/primitives/primproc/udf.cpp
@@ -69,4 +69,3 @@ void loadUDFs()
}
} // namespace primitiveprocessor
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/storage-manager/src/smcat.cpp b/storage/columnstore/columnstore/storage-manager/src/smcat.cpp
index e931ec8a..48dc5077 100644
--- a/storage/columnstore/columnstore/storage-manager/src/smcat.cpp
+++ b/storage/columnstore/columnstore/storage-manager/src/smcat.cpp
@@ -94,7 +94,7 @@ void catFileOffline(const char* filename, int prefixlen)
void catFileOnline(const char* filename, int prefixlen)
{
uint8_t data[8192];
- off_t offset = 0;
+ [[maybe_unused]] off_t offset = 0;
int read_err, write_err, count;
idbdatafile::SMDataFile df(filename, O_RDONLY, 0);
diff --git a/storage/columnstore/columnstore/storage-manager/src/unit_tests.cpp b/storage/columnstore/columnstore/storage-manager/src/unit_tests.cpp
index 3d2e7ec2..dc37007a 100644
--- a/storage/columnstore/columnstore/storage-manager/src/unit_tests.cpp
+++ b/storage/columnstore/columnstore/storage-manager/src/unit_tests.cpp
@@ -1063,10 +1063,10 @@ bool copytask(bool connectionTest = false)
copy_cmd* cmd = (copy_cmd*)buf;
cmd->opcode = COPY;
cmd->file1.flen = strlen(source);
- strncpy(cmd->file1.filename, source, cmd->file1.flen);
+ memcpy(cmd->file1.filename, source, cmd->file1.flen);
f_name* file2 = (f_name*)&cmd->file1.filename[cmd->file1.flen];
file2->flen = strlen(dest);
- strncpy(file2->filename, dest, file2->flen);
+ memcpy(file2->filename, dest, file2->flen);
uint len = (uint64_t)&file2->filename[file2->flen] - (uint64_t)buf;
diff --git a/storage/columnstore/columnstore/tests/primitives_column_scan_and_filter.cpp b/storage/columnstore/columnstore/tests/primitives_column_scan_and_filter.cpp
index 70f921b3..eeed651e 100644
--- a/storage/columnstore/columnstore/tests/primitives_column_scan_and_filter.cpp
+++ b/storage/columnstore/columnstore/tests/primitives_column_scan_and_filter.cpp
@@ -965,4 +965,3 @@ TEST_F(ColumnScanFilterTest, ColumnScan16Bytes2CompFilters)
EXPECT_EQ(out->Max, __col16block_cdf_umax);
EXPECT_EQ(out->Min, __col16block_cdf_umin);
}
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/tests/primitives_scan_bench.cpp b/storage/columnstore/columnstore/tests/primitives_scan_bench.cpp
index 2d6b77c9..c2431b8d 100644
--- a/storage/columnstore/columnstore/tests/primitives_scan_bench.cpp
+++ b/storage/columnstore/columnstore/tests/primitives_scan_bench.cpp
@@ -427,4 +427,3 @@ BENCHMARK_DEFINE_F(FilterBenchFixture, BM_ColumnScan8Byte1FilterVectorizedCode)(
BENCHMARK_REGISTER_F(FilterBenchFixture, BM_ColumnScan8Byte1FilterVectorizedCode);
BENCHMARK_MAIN();
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/tools/bincvt/li2bin.cpp b/storage/columnstore/columnstore/tools/bincvt/li2bin.cpp
index 51b1d8b6..91bf9c4c 100644
--- a/storage/columnstore/columnstore/tools/bincvt/li2bin.cpp
+++ b/storage/columnstore/columnstore/tools/bincvt/li2bin.cpp
@@ -278,4 +278,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/clearShm/main.cpp b/storage/columnstore/columnstore/tools/clearShm/main.cpp
index e37e27db..d31f9a75 100644
--- a/storage/columnstore/columnstore/tools/clearShm/main.cpp
+++ b/storage/columnstore/columnstore/tools/clearShm/main.cpp
@@ -221,4 +221,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/dbbuilder/dbbuilder.cpp b/storage/columnstore/columnstore/tools/dbbuilder/dbbuilder.cpp
index 38b9ffd5..79d2a4be 100644
--- a/storage/columnstore/columnstore/tools/dbbuilder/dbbuilder.cpp
+++ b/storage/columnstore/columnstore/tools/dbbuilder/dbbuilder.cpp
@@ -324,4 +324,3 @@ int main(int argc, char* argv[])
return 1;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/ddlcleanup/ddlcleanup.cpp b/storage/columnstore/columnstore/tools/ddlcleanup/ddlcleanup.cpp
index bbbbac43..6d1ca008 100644
--- a/storage/columnstore/columnstore/tools/ddlcleanup/ddlcleanup.cpp
+++ b/storage/columnstore/columnstore/tools/ddlcleanup/ddlcleanup.cpp
@@ -80,4 +80,3 @@ int main(int argc, char** argv)
return ddlcleanuputil::ddl_cleanup();
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/editem/editem.cpp b/storage/columnstore/columnstore/tools/editem/editem.cpp
index 2dcb6ce8..bce63ed0 100644
--- a/storage/columnstore/columnstore/tools/editem/editem.cpp
+++ b/storage/columnstore/columnstore/tools/editem/editem.cpp
@@ -1040,4 +1040,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/qfe/server.cpp b/storage/columnstore/columnstore/tools/qfe/server.cpp
index 018cf470..7b3276de 100644
--- a/storage/columnstore/columnstore/tools/qfe/server.cpp
+++ b/storage/columnstore/columnstore/tools/qfe/server.cpp
@@ -513,4 +513,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/sendPlan/sendplan.cpp b/storage/columnstore/columnstore/tools/sendPlan/sendplan.cpp
index 5374d867..bd8f4bb4 100644
--- a/storage/columnstore/columnstore/tools/sendPlan/sendplan.cpp
+++ b/storage/columnstore/columnstore/tools/sendPlan/sendplan.cpp
@@ -390,4 +390,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/tools/setConfig/main.cpp b/storage/columnstore/columnstore/tools/setConfig/main.cpp
index 1c536167..7d7fe396 100644
--- a/storage/columnstore/columnstore/tools/setConfig/main.cpp
+++ b/storage/columnstore/columnstore/tools/setConfig/main.cpp
@@ -148,4 +148,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/cacheutils/cacheutils.cpp b/storage/columnstore/columnstore/utils/cacheutils/cacheutils.cpp
index ead2483a..a0042e15 100644
--- a/storage/columnstore/columnstore/utils/cacheutils/cacheutils.cpp
+++ b/storage/columnstore/columnstore/utils/cacheutils/cacheutils.cpp
@@ -354,4 +354,3 @@ int purgePrimProcFdCache(const std::vector<BRM::FileInfo> files, const int pmId)
}
} // namespace cacheutils
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/cacheutils/cacheutils.h b/storage/columnstore/columnstore/utils/cacheutils/cacheutils.h
index 13d01ef6..fdc01da7 100644
--- a/storage/columnstore/columnstore/utils/cacheutils/cacheutils.h
+++ b/storage/columnstore/columnstore/utils/cacheutils/cacheutils.h
@@ -73,6 +73,4 @@ int dropPrimProcFdCache();
int purgePrimProcFdCache(const std::vector<BRM::FileInfo> files, const int pmId);
} // namespace cacheutils
-// vim:ts=4 sw=4:
-
#endif
diff --git a/storage/columnstore/columnstore/utils/common/hashfamily.h b/storage/columnstore/columnstore/utils/common/hashfamily.h
index 6733beaf..eb40a4df 100644
--- a/storage/columnstore/columnstore/utils/common/hashfamily.h
+++ b/storage/columnstore/columnstore/utils/common/hashfamily.h
@@ -51,5 +51,4 @@ class HashFamily
};
} // namespace utils
-#endif
-// vim:ts=2 sw=2:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/common/mcs_basic_types.h b/storage/columnstore/columnstore/utils/common/mcs_basic_types.h
index 2e1caf32..e19f78a8 100644
--- a/storage/columnstore/columnstore/utils/common/mcs_basic_types.h
+++ b/storage/columnstore/columnstore/utils/common/mcs_basic_types.h
@@ -22,5 +22,4 @@
using int128_t = __int128;
using uint128_t = unsigned __int128;
-#endif // MCS_BASIC_TYPES_H_INCLUDED
-// vim:ts=2 sw=2:
+#endif // MCS_BASIC_TYPES_H_INCLUDED \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/common/simd_sse.h b/storage/columnstore/columnstore/utils/common/simd_sse.h
index c7da2ec0..d9873414 100644
--- a/storage/columnstore/columnstore/utils/common/simd_sse.h
+++ b/storage/columnstore/columnstore/utils/common/simd_sse.h
@@ -892,4 +892,3 @@ class SimdFilterProcessor<
} // namespace simd
#endif // if defined(__x86_64__ )
-// vim:ts=2 sw=2:
diff --git a/storage/columnstore/columnstore/utils/compress/idbcompress.cpp b/storage/columnstore/columnstore/utils/compress/idbcompress.cpp
index a0a98387..adc7a9cd 100644
--- a/storage/columnstore/columnstore/utils/compress/idbcompress.cpp
+++ b/storage/columnstore/columnstore/utils/compress/idbcompress.cpp
@@ -672,4 +672,3 @@ std::shared_ptr<CompressInterface> getCompressorByType(
#endif
} // namespace compress
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/configcpp/configcpp.cpp b/storage/columnstore/columnstore/utils/configcpp/configcpp.cpp
index a7194ef7..e102a0cb 100644
--- a/storage/columnstore/columnstore/utils/configcpp/configcpp.cpp
+++ b/storage/columnstore/columnstore/utils/configcpp/configcpp.cpp
@@ -669,4 +669,3 @@ std::string Config::getTempFileDir(Config::TempDirPurpose what)
}
} // namespace config
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/configcpp/configcpp.h b/storage/columnstore/columnstore/utils/configcpp/configcpp.h
index f573f292..35f290e8 100644
--- a/storage/columnstore/columnstore/utils/configcpp/configcpp.h
+++ b/storage/columnstore/columnstore/utils/configcpp/configcpp.h
@@ -244,5 +244,4 @@ class Config
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/configcpp/configstream.cpp b/storage/columnstore/columnstore/utils/configcpp/configstream.cpp
index 059f690e..cfb1a4ac 100644
--- a/storage/columnstore/columnstore/utils/configcpp/configstream.cpp
+++ b/storage/columnstore/columnstore/utils/configcpp/configstream.cpp
@@ -64,4 +64,3 @@ void ConfigStream::init(const xmlChar* xp)
}
} // namespace config
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/configcpp/configstream.h b/storage/columnstore/columnstore/utils/configcpp/configstream.h
index b42c6506..8c32e31d 100644
--- a/storage/columnstore/columnstore/utils/configcpp/configstream.h
+++ b/storage/columnstore/columnstore/utils/configcpp/configstream.h
@@ -62,5 +62,4 @@ class ConfigStream
} // namespace config
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/configcpp/xmlparser.cpp b/storage/columnstore/columnstore/utils/configcpp/xmlparser.cpp
index 03da1f95..37b6bdde 100644
--- a/storage/columnstore/columnstore/utils/configcpp/xmlparser.cpp
+++ b/storage/columnstore/columnstore/utils/configcpp/xmlparser.cpp
@@ -285,4 +285,3 @@ const vector<string> XMLParser::enumSection(const xmlDocPtr doc, const string& s
}
} // namespace config
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/configcpp/xmlparser.h b/storage/columnstore/columnstore/utils/configcpp/xmlparser.h
index 48467d24..c1804992 100644
--- a/storage/columnstore/columnstore/utils/configcpp/xmlparser.h
+++ b/storage/columnstore/columnstore/utils/configcpp/xmlparser.h
@@ -64,5 +64,4 @@ class XMLParser
} // namespace config
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/dataconvert/dataconvert.cpp b/storage/columnstore/columnstore/utils/dataconvert/dataconvert.cpp
index 14195433..37ff38c4 100644
--- a/storage/columnstore/columnstore/utils/dataconvert/dataconvert.cpp
+++ b/storage/columnstore/columnstore/utils/dataconvert/dataconvert.cpp
@@ -1418,7 +1418,7 @@ boost::any DataConvert::StringToUDecimal(const datatypes::SystemCatalog::TypeAtt
{
int64_t val64;
number_int_value(data, typeCode, colType, pushWarning, prm.noRoundup(), val64);
- char ival = (char)val64;
+ signed char ival = (signed char)val64;
if (ival < 0 && ival != static_cast<int8_t>(joblist::TINYINTEMPTYROW) &&
ival != static_cast<int8_t>(joblist::TINYINTNULL))
@@ -3388,4 +3388,3 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u
}
} // namespace dataconvert
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.cpp b/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.cpp
index a9defdf4..ca196c29 100644
--- a/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.cpp
+++ b/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.cpp
@@ -270,4 +270,3 @@ int ddl_cleanup()
}
} // namespace ddlcleanuputil
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.h b/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.h
index 7eebdf15..b76052fa 100644
--- a/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.h
+++ b/storage/columnstore/columnstore/utils/ddlcleanup/ddlcleanuputil.h
@@ -29,6 +29,4 @@ namespace ddlcleanuputil
{
int ddl_cleanup();
}
-// vim:ts=4 sw=4:
-
#endif
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_abs.cpp b/storage/columnstore/columnstore/utils/funcexp/func_abs.cpp
index 64ac5d01..cd05ade7 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_abs.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_abs.cpp
@@ -79,4 +79,3 @@ long double Func_abs::getLongDoubleVal(Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_add_time.cpp b/storage/columnstore/columnstore/utils/funcexp/func_add_time.cpp
index 5a2506b3..82c173ed 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_add_time.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_add_time.cpp
@@ -303,4 +303,3 @@ int64_t Func_add_time::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, boo
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_ascii.cpp b/storage/columnstore/columnstore/utils/funcexp/func_ascii.cpp
index eb93f601..5cf8653d 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_ascii.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_ascii.cpp
@@ -56,4 +56,3 @@ int64_t Func_ascii::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNu
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_between.cpp b/storage/columnstore/columnstore/utils/funcexp/func_between.cpp
index 3ce66eb6..65712363 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_between.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_between.cpp
@@ -376,4 +376,3 @@ bool Func_notbetween::getBoolVal(rowgroup::Row& row, FunctionParm& pm, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp b/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp
index c10030b9..998696ae 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_bitwise.cpp
@@ -494,4 +494,3 @@ bool Func_bit_count::fix(execplan::FunctionColumn& col) const
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_case.cpp b/storage/columnstore/columnstore/utils/funcexp/func_case.cpp
index e8bfbd0f..fba7691e 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_case.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_case.cpp
@@ -723,4 +723,3 @@ int64_t Func_searched_case::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_cast.cpp b/storage/columnstore/columnstore/utils/funcexp/func_cast.cpp
index 4b224c6d..ef0e2f51 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_cast.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_cast.cpp
@@ -1549,4 +1549,3 @@ double Func_cast_double::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_ceil.cpp b/storage/columnstore/columnstore/utils/funcexp/func_ceil.cpp
index dc559a5d..e5c1f872 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_ceil.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_ceil.cpp
@@ -598,4 +598,3 @@ IDB_Decimal Func_ceil::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_char.cpp b/storage/columnstore/columnstore/utils/funcexp/func_char.cpp
index 7ead2b94..0c4adeaf 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_char.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_char.cpp
@@ -178,4 +178,3 @@ string Func_char::getStrVal(Row& row, FunctionParm& parm, bool& isNull, CalpontS
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_char_length.cpp b/storage/columnstore/columnstore/utils/funcexp/func_char_length.cpp
index 553d5439..5270d1d8 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_char_length.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_char_length.cpp
@@ -121,4 +121,3 @@ int64_t Func_char_length::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_coalesce.cpp b/storage/columnstore/columnstore/utils/funcexp/func_coalesce.cpp
index ebabde05..bbb5a279 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_coalesce.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_coalesce.cpp
@@ -244,4 +244,3 @@ execplan::IDB_Decimal Func_coalesce::getDecimalVal(rowgroup::Row& row, FunctionP
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_concat.cpp b/storage/columnstore/columnstore/utils/funcexp/func_concat.cpp
index 73b2a2b2..05835d23 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_concat.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_concat.cpp
@@ -65,4 +65,3 @@ string Func_concat::getStrVal(Row& row, FunctionParm& parm, bool& isNull, Calpon
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_concat_oracle.cpp b/storage/columnstore/columnstore/utils/funcexp/func_concat_oracle.cpp
index 28713a10..46631e7a 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_concat_oracle.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_concat_oracle.cpp
@@ -71,4 +71,3 @@ string Func_concat_oracle::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_concat_ws.cpp b/storage/columnstore/columnstore/utils/funcexp/func_concat_ws.cpp
index 2c07c5b0..ea0cf22d 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_concat_ws.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_concat_ws.cpp
@@ -121,4 +121,3 @@ string Func_concat_ws::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_conv.cpp b/storage/columnstore/columnstore/utils/funcexp/func_conv.cpp
index 5f73f5ea..037ce83e 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_conv.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_conv.cpp
@@ -304,4 +304,3 @@ string Func_conv::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_convert_tz.cpp b/storage/columnstore/columnstore/utils/funcexp/func_convert_tz.cpp
index 03efdad8..36339279 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_convert_tz.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_convert_tz.cpp
@@ -220,4 +220,3 @@ string Func_convert_tz::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_crc32.cpp b/storage/columnstore/columnstore/utils/funcexp/func_crc32.cpp
index 8d728c11..e573db87 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_crc32.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_crc32.cpp
@@ -64,4 +64,3 @@ int64_t Func_crc32::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNu
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_date.cpp b/storage/columnstore/columnstore/utils/funcexp/func_date.cpp
index 5544e8b3..b6e554e5 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_date.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_date.cpp
@@ -149,4 +149,3 @@ string Func_date::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_date_add.cpp b/storage/columnstore/columnstore/utils/funcexp/func_date_add.cpp
index 2e715acc..6cc47fda 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_date_add.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_date_add.cpp
@@ -816,4 +816,3 @@ string Func_date_add::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_date_format.cpp b/storage/columnstore/columnstore/utils/funcexp/func_date_format.cpp
index 962fc811..8a3ba974 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_date_format.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_date_format.cpp
@@ -416,4 +416,3 @@ int64_t Func_date_format::getTimestampIntVal(rowgroup::Row& row, FunctionParm& p
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_day.cpp b/storage/columnstore/columnstore/utils/funcexp/func_day.cpp
index bd4a484d..e7954e3d 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_day.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_day.cpp
@@ -143,4 +143,3 @@ int64_t Func_day::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_dayname.cpp b/storage/columnstore/columnstore/utils/funcexp/func_dayname.cpp
index 07078a25..e8e069db 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_dayname.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_dayname.cpp
@@ -179,4 +179,3 @@ string Func_dayname::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_dayofweek.cpp b/storage/columnstore/columnstore/utils/funcexp/func_dayofweek.cpp
index 441bfeeb..c8fb40ab 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_dayofweek.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_dayofweek.cpp
@@ -166,4 +166,3 @@ int64_t Func_dayofweek::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_dayofyear.cpp b/storage/columnstore/columnstore/utils/funcexp/func_dayofyear.cpp
index fb9d9742..215ec215 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_dayofyear.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_dayofyear.cpp
@@ -160,4 +160,3 @@ int64_t Func_dayofyear::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_div.cpp b/storage/columnstore/columnstore/utils/funcexp/func_div.cpp
index 7169992b..d36e75c9 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_div.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_div.cpp
@@ -108,4 +108,3 @@ string Func_div::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_elt.cpp b/storage/columnstore/columnstore/utils/funcexp/func_elt.cpp
index 22446095..860dd1ae 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_elt.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_elt.cpp
@@ -96,4 +96,3 @@ string Func_elt::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_exp.cpp b/storage/columnstore/columnstore/utils/funcexp/func_exp.cpp
index bab2fc92..d57b2855 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_exp.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_exp.cpp
@@ -110,4 +110,3 @@ long double Func_exp::getLongDoubleVal(Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_extract.cpp b/storage/columnstore/columnstore/utils/funcexp/func_extract.cpp
index a6f8d635..b051f267 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_extract.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_extract.cpp
@@ -254,4 +254,3 @@ int64_t Func_extract::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_find_in_set.cpp b/storage/columnstore/columnstore/utils/funcexp/func_find_in_set.cpp
index 94c1243d..85b0c7e2 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_find_in_set.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_find_in_set.cpp
@@ -127,4 +127,3 @@ execplan::IDB_Decimal Func_find_in_set::getDecimalVal(rowgroup::Row& row, Functi
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_floor.cpp b/storage/columnstore/columnstore/utils/funcexp/func_floor.cpp
index 7c0dacc8..f497400b 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_floor.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_floor.cpp
@@ -555,4 +555,3 @@ IDB_Decimal Func_floor::getDecimalVal(Row& row, FunctionParm& parm, bool& isNull
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_from_days.cpp b/storage/columnstore/columnstore/utils/funcexp/func_from_days.cpp
index e9f45b42..a3e964ee 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_from_days.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_from_days.cpp
@@ -80,4 +80,3 @@ int64_t Func_from_days::getDatetimeIntVal(rowgroup::Row& row, FunctionParm& parm
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_from_unixtime.cpp b/storage/columnstore/columnstore/utils/funcexp/func_from_unixtime.cpp
index cca4083b..b01bfab3 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_from_unixtime.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_from_unixtime.cpp
@@ -212,4 +212,3 @@ long double Func_from_unixtime::getLongDoubleVal(rowgroup::Row& row, FunctionPar
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_get_format.cpp b/storage/columnstore/columnstore/utils/funcexp/func_get_format.cpp
index d902c087..00f51364 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_get_format.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_get_format.cpp
@@ -107,4 +107,3 @@ string Func_get_format::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_greatest.cpp b/storage/columnstore/columnstore/utils/funcexp/func_greatest.cpp
index e8562be2..b3dea5be 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_greatest.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_greatest.cpp
@@ -240,4 +240,3 @@ int64_t Func_greatest::getTimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_hex.cpp b/storage/columnstore/columnstore/utils/funcexp/func_hex.cpp
index 9e2fa114..c1a111cb 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_hex.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_hex.cpp
@@ -140,4 +140,3 @@ string Func_hex::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_hour.cpp b/storage/columnstore/columnstore/utils/funcexp/func_hour.cpp
index 7d2da741..0550ef3e 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_hour.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_hour.cpp
@@ -156,4 +156,3 @@ int64_t Func_hour::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_idbpartition.cpp b/storage/columnstore/columnstore/utils/funcexp/func_idbpartition.cpp
index 3b71cdd9..b7b5e697 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_idbpartition.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_idbpartition.cpp
@@ -63,4 +63,3 @@ string Func_idbpartition::getStrVal(Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_if.cpp b/storage/columnstore/columnstore/utils/funcexp/func_if.cpp
index 98fe8a33..d5941df8 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_if.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_if.cpp
@@ -234,4 +234,3 @@ int64_t Func_if::getTimeIntVal(Row& row, FunctionParm& parm, bool& isNull, Calpo
}
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_ifnull.cpp b/storage/columnstore/columnstore/utils/funcexp/func_ifnull.cpp
index 52dae255..a2450a5a 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_ifnull.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_ifnull.cpp
@@ -205,4 +205,3 @@ bool Func_ifnull::getBoolVal(Row& row, FunctionParm& parm, bool& isNull, Calpont
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_in.cpp b/storage/columnstore/columnstore/utils/funcexp/func_in.cpp
index 89ed8959..d452fc24 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_in.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_in.cpp
@@ -386,4 +386,3 @@ bool Func_notin::getBoolVal(rowgroup::Row& row, FunctionParm& pm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_insert.cpp b/storage/columnstore/columnstore/utils/funcexp/func_insert.cpp
index 236752e9..72fd06e4 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_insert.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_insert.cpp
@@ -102,4 +102,3 @@ std::string Func_insert::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_instr.cpp b/storage/columnstore/columnstore/utils/funcexp/func_instr.cpp
index ab0379cc..71eb81d0 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_instr.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_instr.cpp
@@ -85,4 +85,3 @@ int64_t Func_instr::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNu
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_isnull.cpp b/storage/columnstore/columnstore/utils/funcexp/func_isnull.cpp
index 48337b3e..4ff7e643 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_isnull.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_isnull.cpp
@@ -79,4 +79,3 @@ bool Func_isnull::getBoolVal(Row& row, FunctionParm& parm, bool& isNull, Calpont
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_last_day.cpp b/storage/columnstore/columnstore/utils/funcexp/func_last_day.cpp
index 89f173a7..e74a2d51 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_last_day.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_last_day.cpp
@@ -195,4 +195,3 @@ int64_t Func_last_day::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp b/storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp
index 817e82ae..eabdfd40 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_lcase.cpp
@@ -68,4 +68,3 @@ std::string Func_lcase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_least.cpp b/storage/columnstore/columnstore/utils/funcexp/func_least.cpp
index add78cfa..d488b751 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_least.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_least.cpp
@@ -218,4 +218,3 @@ int64_t Func_least::getTimeIntVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_left.cpp b/storage/columnstore/columnstore/utils/funcexp/func_left.cpp
index a90d5f46..de31d177 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_left.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_left.cpp
@@ -73,4 +73,3 @@ std::string Func_left::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_length.cpp b/storage/columnstore/columnstore/utils/funcexp/func_length.cpp
index f63e2f1b..a6f7236f 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_length.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_length.cpp
@@ -55,4 +55,3 @@ int64_t Func_length::getIntVal(rowgroup::Row& row, FunctionParm& fp, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_lpad.cpp b/storage/columnstore/columnstore/utils/funcexp/func_lpad.cpp
index 0ad0bdc2..8a5544a6 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_lpad.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_lpad.cpp
@@ -127,4 +127,3 @@ std::string Func_lpad::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_ltrim.cpp b/storage/columnstore/columnstore/utils/funcexp/func_ltrim.cpp
index 39fd7165..3d7e9691 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_ltrim.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_ltrim.cpp
@@ -93,4 +93,3 @@ std::string Func_ltrim::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_ltrim_oracle.cpp b/storage/columnstore/columnstore/utils/funcexp/func_ltrim_oracle.cpp
index 234808e7..70fc1dc8 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_ltrim_oracle.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_ltrim_oracle.cpp
@@ -97,4 +97,3 @@ std::string Func_ltrim_oracle::getStrVal(rowgroup::Row& row, FunctionParm& fp, b
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_makedate.cpp b/storage/columnstore/columnstore/utils/funcexp/func_makedate.cpp
index 0418508d..fb49f54c 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_makedate.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_makedate.cpp
@@ -190,4 +190,3 @@ string Func_makedate::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_maketime.cpp b/storage/columnstore/columnstore/utils/funcexp/func_maketime.cpp
index 6d0a9d90..ad918ccc 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_maketime.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_maketime.cpp
@@ -171,4 +171,3 @@ string Func_maketime::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_math.cpp b/storage/columnstore/columnstore/utils/funcexp/func_math.cpp
index 7d60ae50..74a12aa7 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_math.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_math.cpp
@@ -2276,4 +2276,3 @@ double Func_degrees::getDoubleVal(Row& row, FunctionParm& parm, bool& isNull, Ca
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_md5.cpp b/storage/columnstore/columnstore/utils/funcexp/func_md5.cpp
index 6ef058e8..0ce6b0a0 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_md5.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_md5.cpp
@@ -512,4 +512,3 @@ string Func_md5::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_microsecond.cpp b/storage/columnstore/columnstore/utils/funcexp/func_microsecond.cpp
index aca1e3ae..8c94647b 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_microsecond.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_microsecond.cpp
@@ -137,4 +137,3 @@ int64_t Func_microsecond::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_minute.cpp b/storage/columnstore/columnstore/utils/funcexp/func_minute.cpp
index af310c87..8e572454 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_minute.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_minute.cpp
@@ -137,4 +137,3 @@ int64_t Func_minute::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_mod.cpp b/storage/columnstore/columnstore/utils/funcexp/func_mod.cpp
index bf33a649..dff1a4e0 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_mod.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_mod.cpp
@@ -531,4 +531,3 @@ std::string Func_mod::getStrVal(Row& row, FunctionParm& fp, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_month.cpp b/storage/columnstore/columnstore/utils/funcexp/func_month.cpp
index 50ee3600..ea66abf3 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_month.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_month.cpp
@@ -142,4 +142,3 @@ int64_t Func_month::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNu
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_monthname.cpp b/storage/columnstore/columnstore/utils/funcexp/func_monthname.cpp
index 8ea7c3e3..c674f454 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_monthname.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_monthname.cpp
@@ -191,4 +191,3 @@ execplan::IDB_Decimal Func_monthname::getDecimalVal(rowgroup::Row& row, Function
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_nullif.cpp b/storage/columnstore/columnstore/utils/funcexp/func_nullif.cpp
index ba4ab740..3821151e 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_nullif.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_nullif.cpp
@@ -964,7 +964,7 @@ execplan::IDB_Decimal Func_nullif::getDecimalVal(rowgroup::Row& row, FunctionPar
{
// strip off micro seconds
value = value.substr(0, 14);
- int64_t x = atoll(value.c_str());
+ x = atoll(value.c_str());
if (s > 5)
s = 0;
@@ -1022,4 +1022,3 @@ execplan::IDB_Decimal Func_nullif::getDecimalVal(rowgroup::Row& row, FunctionPar
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_period_add.cpp b/storage/columnstore/columnstore/utils/funcexp/func_period_add.cpp
index 23b96415..4038651e 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_period_add.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_period_add.cpp
@@ -94,4 +94,3 @@ int64_t Func_period_add::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_period_diff.cpp b/storage/columnstore/columnstore/utils/funcexp/func_period_diff.cpp
index 470ab60c..080d15a4 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_period_diff.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_period_diff.cpp
@@ -113,4 +113,3 @@ int64_t Func_period_diff::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_pow.cpp b/storage/columnstore/columnstore/utils/funcexp/func_pow.cpp
index 734b50a2..236e7e2c 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_pow.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_pow.cpp
@@ -121,4 +121,3 @@ long double Func_pow::getLongDoubleVal(Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_quarter.cpp b/storage/columnstore/columnstore/utils/funcexp/func_quarter.cpp
index 04c4babb..5f1fd003 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_quarter.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_quarter.cpp
@@ -139,4 +139,3 @@ int64_t Func_quarter::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_quote.cpp b/storage/columnstore/columnstore/utils/funcexp/func_quote.cpp
index 05ce4cec..b82cf7ba 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_quote.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_quote.cpp
@@ -80,4 +80,3 @@ std::string Func_quote::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_rand.cpp b/storage/columnstore/columnstore/utils/funcexp/func_rand.cpp
index 223949bb..b7da263d 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_rand.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_rand.cpp
@@ -98,4 +98,3 @@ double Func_rand::getDoubleVal(rowgroup::Row& row, FunctionParm& parm, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_regexp.cpp b/storage/columnstore/columnstore/utils/funcexp/func_regexp.cpp
index cb495c8c..60e1459d 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_regexp.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_regexp.cpp
@@ -248,4 +248,3 @@ bool Func_regexp::getBoolVal(rowgroup::Row& row, FunctionParm& pm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_repeat.cpp b/storage/columnstore/columnstore/utils/funcexp/func_repeat.cpp
index 6b0e6ace..ebbfc355 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_repeat.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_repeat.cpp
@@ -90,4 +90,3 @@ std::string Func_repeat::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_replace.cpp b/storage/columnstore/columnstore/utils/funcexp/func_replace.cpp
index 05e0fe35..da18fb3f 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_replace.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_replace.cpp
@@ -173,4 +173,3 @@ std::string Func_replace::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_replace_oracle.cpp b/storage/columnstore/columnstore/utils/funcexp/func_replace_oracle.cpp
index b8eb7f6e..113b49d9 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_replace_oracle.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_replace_oracle.cpp
@@ -167,4 +167,3 @@ std::string Func_replace_oracle::getStrVal(rowgroup::Row& row, FunctionParm& fp,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_reverse.cpp b/storage/columnstore/columnstore/utils/funcexp/func_reverse.cpp
index 2b383ee7..db57d095 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_reverse.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_reverse.cpp
@@ -93,4 +93,3 @@ std::string Func_reverse::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_right.cpp b/storage/columnstore/columnstore/utils/funcexp/func_right.cpp
index 4615256e..2c1ec612 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_right.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_right.cpp
@@ -73,4 +73,3 @@ std::string Func_right::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_round.cpp b/storage/columnstore/columnstore/utils/funcexp/func_round.cpp
index 16855324..c6e67336 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_round.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_round.cpp
@@ -645,7 +645,7 @@ string Func_round::getStrVal(Row& row, FunctionParm& parm, bool& isNull, Calpont
{
IDB_Decimal x = getDecimalVal(row, parm, isNull, op_ct);
int64_t e = (x.scale < 0) ? (-x.scale) : x.scale;
- int64_t p = 1;
+ [[maybe_unused]] int64_t p = 1;
while (e-- > 0)
p *= 10;
@@ -716,4 +716,3 @@ int64_t Func_round::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm, b
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_rpad.cpp b/storage/columnstore/columnstore/utils/funcexp/func_rpad.cpp
index fba47bfa..a2a538ff 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_rpad.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_rpad.cpp
@@ -127,4 +127,3 @@ std::string Func_rpad::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_rtrim.cpp b/storage/columnstore/columnstore/utils/funcexp/func_rtrim.cpp
index 426ec871..ee61906b 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_rtrim.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_rtrim.cpp
@@ -157,4 +157,3 @@ std::string Func_rtrim::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_rtrim_oracle.cpp b/storage/columnstore/columnstore/utils/funcexp/func_rtrim_oracle.cpp
index 1b47d7dd..93713e11 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_rtrim_oracle.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_rtrim_oracle.cpp
@@ -161,4 +161,3 @@ std::string Func_rtrim_oracle::getStrVal(rowgroup::Row& row, FunctionParm& fp, b
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_sec_to_time.cpp b/storage/columnstore/columnstore/utils/funcexp/func_sec_to_time.cpp
index d3b4af67..9a2fef4c 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_sec_to_time.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_sec_to_time.cpp
@@ -231,4 +231,3 @@ execplan::IDB_Decimal Func_sec_to_time::getDecimalVal(rowgroup::Row& row, Functi
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_second.cpp b/storage/columnstore/columnstore/utils/funcexp/func_second.cpp
index 7731ea66..6136c3ed 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_second.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_second.cpp
@@ -144,4 +144,3 @@ int64_t Func_second::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_sha.cpp b/storage/columnstore/columnstore/utils/funcexp/func_sha.cpp
index bc74a0a2..ec3fac1f 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_sha.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_sha.cpp
@@ -655,4 +655,3 @@ string Func_sha::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull,
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_sign.cpp b/storage/columnstore/columnstore/utils/funcexp/func_sign.cpp
index a0cece67..426fbb0c 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_sign.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_sign.cpp
@@ -71,4 +71,3 @@ string Func_sign::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNull
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_space.cpp b/storage/columnstore/columnstore/utils/funcexp/func_space.cpp
index 93e765a5..9a9a8578 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_space.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_space.cpp
@@ -57,4 +57,3 @@ std::string Func_space::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_str_to_date.cpp b/storage/columnstore/columnstore/utils/funcexp/func_str_to_date.cpp
index 0580021f..ab0fb4f6 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_str_to_date.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_str_to_date.cpp
@@ -264,4 +264,3 @@ int64_t Func_str_to_date::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_strcmp.cpp b/storage/columnstore/columnstore/utils/funcexp/func_strcmp.cpp
index a16c68cc..63b3b0b2 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_strcmp.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_strcmp.cpp
@@ -74,4 +74,3 @@ std::string Func_strcmp::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_substr.cpp b/storage/columnstore/columnstore/utils/funcexp/func_substr.cpp
index cb45acc0..9a39a4f1 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_substr.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_substr.cpp
@@ -98,4 +98,3 @@ std::string Func_substr::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_substring_index.cpp b/storage/columnstore/columnstore/utils/funcexp/func_substring_index.cpp
index ffae25e5..82f94a7e 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_substring_index.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_substring_index.cpp
@@ -205,4 +205,3 @@ std::string Func_substring_index::getStrVal(rowgroup::Row& row, FunctionParm& fp
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_sysdate.cpp b/storage/columnstore/columnstore/utils/funcexp/func_sysdate.cpp
index b30e66c5..780492f3 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_sysdate.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_sysdate.cpp
@@ -105,4 +105,3 @@ int64_t Func_sysdate::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm, bool
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_time.cpp b/storage/columnstore/columnstore/utils/funcexp/func_time.cpp
index 14d2246a..e898f782 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_time.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_time.cpp
@@ -169,4 +169,3 @@ double Func_time::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_time_format.cpp b/storage/columnstore/columnstore/utils/funcexp/func_time_format.cpp
index d075658b..1205e21b 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_time_format.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_time_format.cpp
@@ -229,4 +229,3 @@ string Func_time_format::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool&
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_time_to_sec.cpp b/storage/columnstore/columnstore/utils/funcexp/func_time_to_sec.cpp
index 388ef2ca..3cf718aa 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_time_to_sec.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_time_to_sec.cpp
@@ -195,4 +195,3 @@ int64_t Func_time_to_sec::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_timediff.cpp b/storage/columnstore/columnstore/utils/funcexp/func_timediff.cpp
index d3f89139..03000476 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_timediff.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_timediff.cpp
@@ -349,4 +349,3 @@ double Func_timediff::getDoubleVal(rowgroup::Row& row, FunctionParm& fp, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_timestampdiff.cpp b/storage/columnstore/columnstore/utils/funcexp/func_timestampdiff.cpp
index 07e7eda7..6ad2f395 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_timestampdiff.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_timestampdiff.cpp
@@ -196,4 +196,3 @@ int64_t Func_timestampdiff::getTimeIntVal(rowgroup::Row& row, FunctionParm& parm
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_to_days.cpp b/storage/columnstore/columnstore/utils/funcexp/func_to_days.cpp
index f597c5fd..d6f831be 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_to_days.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_to_days.cpp
@@ -151,4 +151,3 @@ int64_t Func_to_days::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_trim.cpp b/storage/columnstore/columnstore/utils/funcexp/func_trim.cpp
index 636afe44..d4782356 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_trim.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_trim.cpp
@@ -168,4 +168,3 @@ std::string Func_trim::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& isN
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_trim_oracle.cpp b/storage/columnstore/columnstore/utils/funcexp/func_trim_oracle.cpp
index 5e1226c5..4daec213 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_trim_oracle.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_trim_oracle.cpp
@@ -166,4 +166,3 @@ std::string Func_trim_oracle::getStrVal(rowgroup::Row& row, FunctionParm& fp, bo
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_truncate.cpp b/storage/columnstore/columnstore/utils/funcexp/func_truncate.cpp
index 87f045af..7a529c00 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_truncate.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_truncate.cpp
@@ -522,7 +522,7 @@ IDB_Decimal Func_truncate::getDecimalVal(Row& row, FunctionParm& parm, bool& isN
{
// strip off micro seconds
value = value.substr(0, 14);
- int64_t x = atoll(value.c_str());
+ x = atoll(value.c_str());
if (s > 5)
s = 0;
@@ -613,7 +613,7 @@ IDB_Decimal Func_truncate::getDecimalVal(Row& row, FunctionParm& parm, bool& isN
{
// strip off micro seconds
value = value.substr(0, 14);
- int64_t x = atoll(value.c_str());
+ x = atoll(value.c_str());
if (s > 5)
s = 0;
@@ -721,4 +721,3 @@ int64_t Func_truncate::getTimestampIntVal(rowgroup::Row& row, FunctionParm& parm
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_ucase.cpp b/storage/columnstore/columnstore/utils/funcexp/func_ucase.cpp
index 9fa00e67..1cbbd6a2 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_ucase.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_ucase.cpp
@@ -77,4 +77,3 @@ std::string Func_ucase::getStrVal(rowgroup::Row& row, FunctionParm& fp, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_unhex.cpp b/storage/columnstore/columnstore/utils/funcexp/func_unhex.cpp
index 38da2cb2..92ef5fa3 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_unhex.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_unhex.cpp
@@ -112,4 +112,3 @@ string Func_unhex::getStrVal(rowgroup::Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_unix_timestamp.cpp b/storage/columnstore/columnstore/utils/funcexp/func_unix_timestamp.cpp
index d5b65fe2..f9c81e6b 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_unix_timestamp.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_unix_timestamp.cpp
@@ -223,4 +223,3 @@ string Func_unix_timestamp::getStrVal(rowgroup::Row& row, FunctionParm& parm, bo
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_week.cpp b/storage/columnstore/columnstore/utils/funcexp/func_week.cpp
index 8f7a3af0..e6ab52f3 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_week.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_week.cpp
@@ -169,4 +169,3 @@ int64_t Func_week::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_weekday.cpp b/storage/columnstore/columnstore/utils/funcexp/func_weekday.cpp
index 302293b8..e78d12c6 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_weekday.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_weekday.cpp
@@ -164,4 +164,3 @@ int64_t Func_weekday::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& is
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_year.cpp b/storage/columnstore/columnstore/utils/funcexp/func_year.cpp
index 2f4fc827..9ea12fbd 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_year.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_year.cpp
@@ -140,4 +140,3 @@ int64_t Func_year::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& isNul
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/func_yearweek.cpp b/storage/columnstore/columnstore/utils/funcexp/func_yearweek.cpp
index 3b85692b..2ad94139 100644
--- a/storage/columnstore/columnstore/utils/funcexp/func_yearweek.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/func_yearweek.cpp
@@ -173,4 +173,3 @@ int64_t Func_yearweek::getIntVal(rowgroup::Row& row, FunctionParm& parm, bool& i
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/funcexp/functor.cpp b/storage/columnstore/columnstore/utils/funcexp/functor.cpp
index 4eed1688..3da34944 100644
--- a/storage/columnstore/columnstore/utils/funcexp/functor.cpp
+++ b/storage/columnstore/columnstore/utils/funcexp/functor.cpp
@@ -361,4 +361,3 @@ string Func::longDoubleToString(long double ld)
}
} // namespace funcexp
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/libmysql_client/libmysql_client.h b/storage/columnstore/columnstore/utils/libmysql_client/libmysql_client.h
index 4207a705..931886b7 100644
--- a/storage/columnstore/columnstore/utils/libmysql_client/libmysql_client.h
+++ b/storage/columnstore/columnstore/utils/libmysql_client/libmysql_client.h
@@ -91,4 +91,3 @@ class LibMySQL
#endif // UTILS_LIBMYSQL_CL_H
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/loggingcpp/errorcodes.cpp b/storage/columnstore/columnstore/utils/loggingcpp/errorcodes.cpp
index e52a5e32..c8e879c0 100644
--- a/storage/columnstore/columnstore/utils/loggingcpp/errorcodes.cpp
+++ b/storage/columnstore/columnstore/utils/loggingcpp/errorcodes.cpp
@@ -103,4 +103,3 @@ string ErrorCodes::errorString(uint16_t code) const
return (fPreamble + msg);
}
} // namespace logging
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/loggingcpp/exceptclasses.h b/storage/columnstore/columnstore/utils/loggingcpp/exceptclasses.h
index 92aebbbb..7bd6b625 100644
--- a/storage/columnstore/columnstore/utils/loggingcpp/exceptclasses.h
+++ b/storage/columnstore/columnstore/utils/loggingcpp/exceptclasses.h
@@ -307,5 +307,4 @@ class ProtocolError : public std::logic_error
} // namespace logging
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/messageqcpp/inetstreamsocket.cpp b/storage/columnstore/columnstore/utils/messageqcpp/inetstreamsocket.cpp
index 81ed82f6..45f605bc 100644
--- a/storage/columnstore/columnstore/utils/messageqcpp/inetstreamsocket.cpp
+++ b/storage/columnstore/columnstore/utils/messageqcpp/inetstreamsocket.cpp
@@ -101,8 +101,6 @@ using boost::scoped_array;
// some static functions
namespace
{
-using messageqcpp::ByteStream;
-
// @bug 2441 - Retry after 512 read() error.
// ERESTARTSYS (512) is a kernal I/O errno that is similar to a EINTR, except
// that it is not supposed to "leak" out into the user space. But we are
@@ -937,16 +935,8 @@ void InetStreamSocket::connect(const sockaddr* serv_addr)
char buf = '\0';
(void)::recv(socketParms().sd(), &buf, 1, 0);
#else
-#if defined(__GNUC__) && __GNUC__ >= 5
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-result"
- char buf = '\0';
- ::read(socketParms().sd(), &buf, 1); // we know 1 byte is in the recv buffer
-#pragma GCC diagnostic pop
-#else
char buf = '\0';
- ::read(socketParms().sd(), &buf, 1); // we know 1 byte is in the recv buffer
-#endif // pragma
+ std::ignore = ::read(socketParms().sd(), &buf, 1); // we know 1 byte is in the recv buffer
#endif
return;
}
diff --git a/storage/columnstore/columnstore/utils/messageqcpp/messagequeue.h b/storage/columnstore/columnstore/utils/messageqcpp/messagequeue.h
index 7d9cba82..30dd20ff 100644
--- a/storage/columnstore/columnstore/utils/messageqcpp/messagequeue.h
+++ b/storage/columnstore/columnstore/utils/messageqcpp/messagequeue.h
@@ -337,5 +337,4 @@ inline void MessageQueueClient::syncProto(bool use)
#undef EXPORT
-#endif // MESSAGEQCPP_MESSAGEQUEUE_H
-// vim:ts=4 sw=4:
+#endif // MESSAGEQCPP_MESSAGEQUEUE_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/multicast/multicast.cpp b/storage/columnstore/columnstore/utils/multicast/multicast.cpp
index 116f0382..b471c170 100644
--- a/storage/columnstore/columnstore/utils/multicast/multicast.cpp
+++ b/storage/columnstore/columnstore/utils/multicast/multicast.cpp
@@ -93,4 +93,3 @@ void MulticastSender::send(const ByteStream& msg)
} // namespace multicast
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/regr/regrmysql.cpp b/storage/columnstore/columnstore/utils/regr/regrmysql.cpp
index 1b480aa8..d9e9a51b 100644
--- a/storage/columnstore/columnstore/utils/regr/regrmysql.cpp
+++ b/storage/columnstore/columnstore/utils/regr/regrmysql.cpp
@@ -1405,4 +1405,3 @@ extern "C"
return valOut;
}
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/rowgroup/rowgroup.cpp b/storage/columnstore/columnstore/utils/rowgroup/rowgroup.cpp
index 4e767e1d..7c297f8f 100644
--- a/storage/columnstore/columnstore/utils/rowgroup/rowgroup.cpp
+++ b/storage/columnstore/columnstore/utils/rowgroup/rowgroup.cpp
@@ -1751,4 +1751,3 @@ RowGroup RowGroup::truncate(uint32_t cols)
} // namespace rowgroup
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/rowgroup/rowgroup.h b/storage/columnstore/columnstore/utils/rowgroup/rowgroup.h
index a17449d0..6dfebfec 100644
--- a/storage/columnstore/columnstore/utils/rowgroup/rowgroup.h
+++ b/storage/columnstore/columnstore/utils/rowgroup/rowgroup.h
@@ -31,7 +31,7 @@
#include <vector>
#include <string>
#include <stdexcept>
-//#define NDEBUG
+// #define NDEBUG
#include <cassert>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
@@ -1525,8 +1525,8 @@ class RowGroup : public messageqcpp::Serializeable
inline void setUseStringTable(bool);
// RGData *convertToInlineData(uint64_t *size = NULL) const; // caller manages the memory returned by
- //this void convertToInlineDataInPlace(); RGData *convertToStringTable(uint64_t *size = NULL) const; void
- //convertToStringTableInPlace();
+ // this void convertToInlineDataInPlace(); RGData *convertToStringTable(uint64_t *size = NULL)
+ // const; void convertToStringTableInPlace();
void serializeRGData(messageqcpp::ByteStream&) const;
inline uint32_t getStringTableThreshold() const;
@@ -2184,5 +2184,4 @@ inline void RGData::getRow(uint32_t num, Row* row)
} // namespace rowgroup
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/rwlock/rwlock.cpp b/storage/columnstore/columnstore/utils/rwlock/rwlock.cpp
index 73a9c5db..ca7b82e9 100644
--- a/storage/columnstore/columnstore/utils/rwlock/rwlock.cpp
+++ b/storage/columnstore/columnstore/utils/rwlock/rwlock.cpp
@@ -746,4 +746,3 @@ LockState RWLock::getLockState()
}
} // namespace rwlock
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/rwlock/rwlock.h b/storage/columnstore/columnstore/utils/rwlock/rwlock.h
index 33702570..d18640a4 100644
--- a/storage/columnstore/columnstore/utils/rwlock/rwlock.h
+++ b/storage/columnstore/columnstore/utils/rwlock/rwlock.h
@@ -46,9 +46,15 @@
namespace rwlock
{
-const std::array<const std::string, 7> RWLockNames = { {
- "all", "VSS", "ExtentMap", "FreeList", "VBBM", "CopyLocks", "ExtentMapIndex",
-} };
+const std::array<const std::string, 7> RWLockNames = {{
+ "all",
+ "VSS",
+ "ExtentMap",
+ "FreeList",
+ "VBBM",
+ "CopyLocks",
+ "ExtentMapIndex",
+}};
/// the layout of the shmseg
struct State
@@ -283,5 +289,4 @@ class RWLock
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/startup/installdir.cpp b/storage/columnstore/columnstore/utils/startup/installdir.cpp
index 65437a9c..2db2128d 100644
--- a/storage/columnstore/columnstore/utils/startup/installdir.cpp
+++ b/storage/columnstore/columnstore/utils/startup/installdir.cpp
@@ -112,4 +112,3 @@ const string StartUp::tmpDir()
}
} // namespace startup
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/startup/installdir.h b/storage/columnstore/columnstore/utils/startup/installdir.h
index 4d9b8989..c902d4bf 100644
--- a/storage/columnstore/columnstore/utils/startup/installdir.h
+++ b/storage/columnstore/columnstore/utils/startup/installdir.h
@@ -53,5 +53,4 @@ class StartUp
} // namespace startup
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/testbc/iomanager.cpp b/storage/columnstore/columnstore/utils/testbc/iomanager.cpp
index 7c3cc4d6..b2944e5b 100644
--- a/storage/columnstore/columnstore/utils/testbc/iomanager.cpp
+++ b/storage/columnstore/columnstore/utils/testbc/iomanager.cpp
@@ -325,4 +325,3 @@ fileRequest* ioManager::getNextRequest()
}
} // namespace dbbc
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/testbc/iomanager.h b/storage/columnstore/columnstore/utils/testbc/iomanager.h
index 20704c58..aab251dd 100644
--- a/storage/columnstore/columnstore/utils/testbc/iomanager.h
+++ b/storage/columnstore/columnstore/utils/testbc/iomanager.h
@@ -99,5 +99,4 @@ class ioManager
};
} // namespace dbbc
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/threadpool/prioritythreadpool.cpp b/storage/columnstore/columnstore/utils/threadpool/prioritythreadpool.cpp
index b26144b6..908c0ba9 100644
--- a/storage/columnstore/columnstore/utils/threadpool/prioritythreadpool.cpp
+++ b/storage/columnstore/columnstore/utils/threadpool/prioritythreadpool.cpp
@@ -322,4 +322,3 @@ void PriorityThreadPool::stop()
}
} // namespace threadpool
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/udfsdk/udfmysql.cpp b/storage/columnstore/columnstore/utils/udfsdk/udfmysql.cpp
index 55272942..f32fc6b3 100644
--- a/storage/columnstore/columnstore/utils/udfsdk/udfmysql.cpp
+++ b/storage/columnstore/columnstore/utils/udfsdk/udfmysql.cpp
@@ -535,4 +535,3 @@ extern "C"
return 0;
}
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/udfsdk/udfsdk.cpp b/storage/columnstore/columnstore/utils/udfsdk/udfsdk.cpp
index 0cf80618..dc5e4fa8 100644
--- a/storage/columnstore/columnstore/utils/udfsdk/udfsdk.cpp
+++ b/storage/columnstore/columnstore/utils/udfsdk/udfsdk.cpp
@@ -375,4 +375,3 @@ int64_t MCS_isnull::getDatetimeIntVal(Row& row, FunctionParm& parm, bool& isNull
}
} // namespace udfsdk
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/udfsdk/udfsdk.h b/storage/columnstore/columnstore/utils/udfsdk/udfsdk.h
index 9e53601b..6c0ee013 100644
--- a/storage/columnstore/columnstore/utils/udfsdk/udfsdk.h
+++ b/storage/columnstore/columnstore/utils/udfsdk/udfsdk.h
@@ -314,4 +314,3 @@ class MCS_isnull : public funcexp::Func
#undef EXPORT
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/framebound.cpp b/storage/columnstore/columnstore/utils/windowfunction/framebound.cpp
index 043620f5..56b50d2e 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/framebound.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/framebound.cpp
@@ -72,4 +72,3 @@ const string FrameBound::toString() const
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/framebound.h b/storage/columnstore/columnstore/utils/windowfunction/framebound.h
index 27038ae1..22203c73 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/framebound.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/framebound.h
@@ -146,6 +146,4 @@ extern std::map<int, std::string> colType2String;
} // namespace windowfunction
-#endif // UTILS_FRAMEBOUND_H
-
-// vim:ts=4 sw=4:
+#endif // UTILS_FRAMEBOUND_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.cpp b/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.cpp
index 0b356bce..e884d930 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.cpp
@@ -411,4 +411,3 @@ template class FrameBoundExpressionRange<float>;
template class FrameBoundExpressionRange<uint64_t>;
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.h b/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.h
index 0a36a543..0688e7da 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/frameboundrange.h
@@ -214,6 +214,4 @@ class FrameBoundExpressionRange : public FrameBoundConstantRange<T>
} // namespace windowfunction
-#endif // UTILS_FRAMEBOUNDRANGE_H
-
-// vim:ts=4 sw=4:
+#endif // UTILS_FRAMEBOUNDRANGE_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.cpp b/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.cpp
index 616b1e0e..3d442741 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.cpp
@@ -139,4 +139,3 @@ template class FrameBoundExpressionRow<float>;
template class FrameBoundExpressionRow<uint64_t>;
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.h b/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.h
index ac0b6c0a..bc7f450a 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/frameboundrow.h
@@ -148,5 +148,3 @@ class FrameBoundExpressionRow : public FrameBoundConstantRow
} // namespace windowfunction
#endif // UTILS_FRAMEBOUNDROW_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/idborderby.cpp b/storage/columnstore/columnstore/utils/windowfunction/idborderby.cpp
index 30d442e7..5160eed2 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/idborderby.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/idborderby.cpp
@@ -898,4 +898,3 @@ bool IdbOrderBy::Eq::operator()(const Row::Pointer& d1, const Row::Pointer& d2)
}
} // namespace ordering
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_count.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_count.cpp
index c45cd297..bc469476 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_count.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_count.cpp
@@ -184,4 +184,3 @@ template boost::shared_ptr<WindowFunctionType> WF_count<int64_t>::makeFunction(i
WindowFunctionColumn*);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_count.h b/storage/columnstore/columnstore/utils/windowfunction/wf_count.h
index 2dcbd963..1c4da82e 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_count.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_count.h
@@ -49,5 +49,3 @@ class WF_count : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_COUNT_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.cpp
index 4e7de53f..b3babe8b 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.cpp
@@ -306,4 +306,3 @@ template void WF_lead_lag<double>::parseParms(const std::vector<execplan::SRCP>&
template void WF_lead_lag<string>::parseParms(const std::vector<execplan::SRCP>&);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.h b/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.h
index 9aaea0c8..e6290eb8 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_lead_lag.h
@@ -54,5 +54,3 @@ class WF_lead_lag : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_LEAD_LAG_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.cpp
index 4120fe32..b5b63bde 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.cpp
@@ -185,4 +185,3 @@ template boost::shared_ptr<WindowFunctionType> WF_min_max<int64_t>::makeFunction
WindowFunctionColumn*);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.h b/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.h
index bd8091ed..9305ebcb 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_min_max.h
@@ -48,5 +48,3 @@ class WF_min_max : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_MIN_MAX_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.cpp
index 338984a0..f3c9e2a1 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.cpp
@@ -271,4 +271,3 @@ template boost::shared_ptr<WindowFunctionType> WF_nth_value<int64_t>::makeFuncti
WindowFunctionColumn*);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.h b/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.h
index d5d98b4b..e78709f2 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_nth_value.h
@@ -52,5 +52,3 @@ class WF_nth_value : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_NTH_VALUE_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.cpp
index 375fd81d..4b663460 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.cpp
@@ -154,4 +154,3 @@ void WF_ntile::operator()(int64_t b, int64_t e, int64_t c)
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.h b/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.h
index 154f725b..db3de2cf 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_ntile.h
@@ -49,5 +49,3 @@ class WF_ntile : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_NTILE_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.cpp
index 4d0dfce0..24d6b9f2 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.cpp
@@ -382,4 +382,3 @@ template boost::shared_ptr<WindowFunctionType> WF_percentile<int64_t>::makeFunct
WindowFunctionColumn*);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.h b/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.h
index 952f29af..713a2698 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_percentile.h
@@ -50,5 +50,3 @@ class WF_percentile : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_PERCENTILE_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.cpp
index f0459b7f..540ca808 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.cpp
@@ -145,4 +145,3 @@ void WF_ranking::operator()(int64_t b, int64_t e, int64_t c)
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.h b/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.h
index df2e7471..dcfb9448 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_ranking.h
@@ -48,5 +48,3 @@ class WF_ranking : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_RANKING_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.cpp
index 6453c0a0..6dd58ce3 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.cpp
@@ -86,4 +86,3 @@ void WF_row_number::operator()(int64_t b, int64_t e, int64_t c)
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.h b/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.h
index d0976c25..bcb8d996 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_row_number.h
@@ -47,5 +47,3 @@ class WF_row_number : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_ROW_NUMBER_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_stats.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_stats.cpp
index a4b6f4f5..73a668ac 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_stats.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_stats.cpp
@@ -234,4 +234,3 @@ template boost::shared_ptr<WindowFunctionType> WF_stats<int64_t>::makeFunction(i
WindowFunctionColumn*);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_stats.h b/storage/columnstore/columnstore/utils/windowfunction/wf_stats.h
index 725d1c6c..6a50df11 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_stats.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_stats.h
@@ -50,5 +50,3 @@ class WF_stats : public WindowFunctionType
} // namespace windowfunction
#endif // UTILS_WF_STATS_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.cpp
index d988f0a1..573b6e09 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.cpp
@@ -306,4 +306,3 @@ template boost::shared_ptr<WindowFunctionType> WF_sum_avg<int64_t, long double>:
int, const string&, int, WindowFunctionColumn*);
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.h b/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.h
index 14cbd356..bdb5bc38 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_sum_avg.h
@@ -61,6 +61,4 @@ class WF_sum_avg : public WindowFunctionType
} // namespace windowfunction
-#endif // UTILS_WF_SUM_AVG_H
-
-// vim:ts=4 sw=4:
+#endif // UTILS_WF_SUM_AVG_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.cpp b/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.cpp
index 274c9701..0894c6ad 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.cpp
@@ -1191,4 +1191,3 @@ void WF_udaf::operator()(int64_t b, int64_t e, int64_t c)
fPrev = c;
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.h b/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.h
index ab777761..22fae5a6 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/wf_udaf.h
@@ -113,6 +113,4 @@ class WF_udaf : public WindowFunctionType
} // namespace windowfunction
-#endif // UTILS_WF_UDAF_H
-
-// vim:ts=4 sw=4:
+#endif // UTILS_WF_UDAF_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/utils/windowfunction/windowframe.cpp b/storage/columnstore/columnstore/utils/windowfunction/windowframe.cpp
index cbc9352c..491e0a0f 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/windowframe.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/windowframe.cpp
@@ -81,4 +81,3 @@ const string WindowFrame::toString() const
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/windowframe.h b/storage/columnstore/columnstore/utils/windowfunction/windowframe.h
index 159ee84d..cb20c5fe 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/windowframe.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/windowframe.h
@@ -121,5 +121,3 @@ class WindowFrame
} // namespace windowfunction
#endif // UTILS_WINDOWFRAME_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/windowfunction.cpp b/storage/columnstore/columnstore/utils/windowfunction/windowfunction.cpp
index a0e84493..941fff91 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/windowfunction.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/windowfunction.cpp
@@ -259,4 +259,3 @@ void WindowFunction::sort(std::vector<RowPosition>::iterator v, uint64_t n)
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/windowfunction.h b/storage/columnstore/columnstore/utils/windowfunction/windowfunction.h
index 53f5b9a4..2d65f8fc 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/windowfunction.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/windowfunction.h
@@ -113,5 +113,3 @@ class WindowFunction
} // namespace windowfunction
#endif // UTILS_WINDOWFUNCTION_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.cpp b/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.cpp
index ccf74609..43f05f4b 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.cpp
+++ b/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.cpp
@@ -797,4 +797,3 @@ void WindowFunctionType::constParms(const std::vector<SRCP>& functionParms)
}
} // namespace windowfunction
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.h b/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.h
index c1af9bc7..e64ac30c 100644
--- a/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.h
+++ b/storage/columnstore/columnstore/utils/windowfunction/windowfunctiontype.h
@@ -305,5 +305,3 @@ extern std::map<int, std::string> colType2String;
} // namespace windowfunction
#endif // UTILS_WINDOWFUNCTIONTYPE_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/versioning/BRM/brmshmimpl.cpp b/storage/columnstore/columnstore/versioning/BRM/brmshmimpl.cpp
index 74028241..44750c63 100644
--- a/storage/columnstore/columnstore/versioning/BRM/brmshmimpl.cpp
+++ b/storage/columnstore/columnstore/versioning/BRM/brmshmimpl.cpp
@@ -410,4 +410,3 @@ void BRMManagedShmImpl::remap(const bool readOnly)
} // namespace BRM
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/versioning/BRM/load_brm.cpp b/storage/columnstore/columnstore/versioning/BRM/load_brm.cpp
index 4378fb76..b72bd3c2 100644
--- a/storage/columnstore/columnstore/versioning/BRM/load_brm.cpp
+++ b/storage/columnstore/columnstore/versioning/BRM/load_brm.cpp
@@ -127,4 +127,3 @@ int main(int argc, char** argv)
return 0;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/versioning/BRM/slavecomm.cpp b/storage/columnstore/columnstore/versioning/BRM/slavecomm.cpp
index 7b665a1a..1f490dd8 100644
--- a/storage/columnstore/columnstore/versioning/BRM/slavecomm.cpp
+++ b/storage/columnstore/columnstore/versioning/BRM/slavecomm.cpp
@@ -2432,4 +2432,3 @@ void SlaveComm::do_dmlReleaseLBIDRanges(ByteStream& msg)
} // namespace BRM
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/versioning/BRM/vbbm.cpp b/storage/columnstore/columnstore/versioning/BRM/vbbm.cpp
index 253bd051..2ed2454d 100644
--- a/storage/columnstore/columnstore/versioning/BRM/vbbm.cpp
+++ b/storage/columnstore/columnstore/versioning/BRM/vbbm.cpp
@@ -40,7 +40,6 @@
#include <boost/interprocess/shared_memory_object.hpp>
#include <boost/interprocess/mapped_region.hpp>
-namespace bi = boost::interprocess;
#include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
@@ -1076,8 +1075,8 @@ void VBBM::save(string filename)
}
var = VBBM_MAGIC_V2;
- int bytesWritten = 0;
- int bytesToWrite = 12;
+ [[maybe_unused]] int bytesWritten = 0;
+ [[maybe_unused]] int bytesToWrite = 12;
bytesWritten += out->write((char*)&var, 4);
bytesWritten += out->write((char*)&vbbm->vbCurrentSize, 4);
bytesWritten += out->write((char*)&vbbm->nFiles, 4);
diff --git a/storage/columnstore/columnstore/writeengine/client/we_clients.cpp b/storage/columnstore/columnstore/writeengine/client/we_clients.cpp
index c696dbb6..b6d66e2e 100644
--- a/storage/columnstore/columnstore/writeengine/client/we_clients.cpp
+++ b/storage/columnstore/columnstore/writeengine/client/we_clients.cpp
@@ -545,4 +545,3 @@ void WEClients::addDataToOutput(SBS sbs, uint32_t connIndex)
} // namespace WriteEngine
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/client/we_clients.h b/storage/columnstore/columnstore/writeengine/client/we_clients.h
index 8028181a..a059b739 100644
--- a/storage/columnstore/columnstore/writeengine/client/we_clients.h
+++ b/storage/columnstore/columnstore/writeengine/client/we_clients.h
@@ -32,7 +32,7 @@
#include <boost/scoped_array.hpp>
#include "bytestream.h"
-//#include "we_message.h"
+// #include "we_message.h"
#include "threadsafequeue.h"
#include "rwlock_local.h"
#include "resourcemanager.h"
@@ -181,5 +181,4 @@ class WEClients
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.cpp b/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.cpp
index d155715b..9f910193 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.cpp
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.cpp
@@ -52,4 +52,3 @@ void Redistribute::handleRedistributeMessage(ByteStream& bs, IOSocket& ios)
} // namespace redistribute
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.h b/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.h
index 62c33b83..8e01ed01 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.h
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistribute.h
@@ -45,6 +45,4 @@ class Redistribute
} // namespace redistribute
-#endif // WE_REDISTRIBUTE_H
-
-// vim:ts=4 sw=4:
+#endif // WE_REDISTRIBUTE_H \ No newline at end of file
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.cpp b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.cpp
index a54e47ff..9cb5e139 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.cpp
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.cpp
@@ -698,4 +698,3 @@ void RedistributeControl::logMessage(const string& msg)
} // namespace redistribute
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.h b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.h
index 65535051..6b466508 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.h
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrol.h
@@ -126,5 +126,3 @@ class RedistributeControl
} // namespace redistribute
#endif // WE_REDISTRIBUTECONTROL_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.cpp b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.cpp
index ce808eb2..774f4011 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.cpp
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.cpp
@@ -838,4 +838,3 @@ void RedistributeControlThread::doStopAction()
} // namespace redistribute
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.h b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.h
index 8f3116fa..92581ebd 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.h
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributecontrolthread.h
@@ -127,5 +127,3 @@ class RedistributeControlThread
} // namespace redistribute
#endif // WE_REDISTRIBUTECONTROLTHREAD_H
-
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.cpp b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.cpp
index 67f1f586..5825ea53 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.cpp
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.cpp
@@ -1520,4 +1520,3 @@ void RedistributeWorkerThread::logMessage(const string& msg, int line)
} // namespace redistribute
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.h b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.h
index cdd3a62a..c1933bf7 100644
--- a/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.h
+++ b/storage/columnstore/columnstore/writeengine/redistribute/we_redistributeworkerthread.h
@@ -142,6 +142,4 @@ class RedistributeWorkerThread
} // namespace redistribute
-#endif // WE_REDISTRIBUTEWORKERTHREAD_H
-
-// vim:ts=4 sw=4:
+#endif \ No newline at end of file
diff --git a/storage/columnstore/columnstore/writeengine/server/we_ddlcommandproc.cpp b/storage/columnstore/columnstore/writeengine/server/we_ddlcommandproc.cpp
index 1d832f9e..3970e6c1 100644
--- a/storage/columnstore/columnstore/writeengine/server/we_ddlcommandproc.cpp
+++ b/storage/columnstore/columnstore/writeengine/server/we_ddlcommandproc.cpp
@@ -4952,4 +4952,3 @@ void WE_DDLCommandProc::purgeFDCache()
}
} // namespace WriteEngine
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/shared/we_brm.cpp b/storage/columnstore/columnstore/writeengine/shared/we_brm.cpp
index a049806b..fb5d88fa 100644
--- a/storage/columnstore/columnstore/writeengine/shared/we_brm.cpp
+++ b/storage/columnstore/columnstore/writeengine/shared/we_brm.cpp
@@ -1741,4 +1741,3 @@ int BRMWrapper::getExtentCPMaxMin(const BRM::LBID_t lbid, BRM::CPMaxMin& cpMaxMi
}
} // namespace WriteEngine
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/shared/we_chunkmanager.cpp b/storage/columnstore/columnstore/writeengine/shared/we_chunkmanager.cpp
index b34535c7..784f9990 100644
--- a/storage/columnstore/columnstore/writeengine/shared/we_chunkmanager.cpp
+++ b/storage/columnstore/columnstore/writeengine/shared/we_chunkmanager.cpp
@@ -2667,4 +2667,3 @@ int ChunkManager::checkFixLastDictChunk(const FID& fid, uint16_t root, uint32_t
}
} // namespace WriteEngine
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/splitter/we_splitterapp.cpp b/storage/columnstore/columnstore/writeengine/splitter/we_splitterapp.cpp
index 366c64ad..22a29100 100644
--- a/storage/columnstore/columnstore/writeengine/splitter/we_splitterapp.cpp
+++ b/storage/columnstore/columnstore/writeengine/splitter/we_splitterapp.cpp
@@ -572,4 +572,3 @@ int main(int argc, char** argv)
return SPLTR_EXIT_STATUS;
}
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/wrapper/we_colop.cpp b/storage/columnstore/columnstore/writeengine/wrapper/we_colop.cpp
index 25bed1eb..bbe3dc42 100644
--- a/storage/columnstore/columnstore/writeengine/wrapper/we_colop.cpp
+++ b/storage/columnstore/columnstore/writeengine/wrapper/we_colop.cpp
@@ -1910,4 +1910,3 @@ int ColumnOp::writeRowsValues(Column& curCol, uint64_t totalRow, const RIDList&
}
} // namespace WriteEngine
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.cpp b/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.cpp
index 64bfff06..421ecbcb 100644
--- a/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.cpp
+++ b/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.cpp
@@ -109,4 +109,3 @@ ColsExtsInfoMap& TableMetaData::getColsExtsInfoMap()
return fColsExtsInfoMap;
}
} // namespace WriteEngine
-// vim:ts=4 sw=4:
diff --git a/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.h b/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.h
index 2e4f114a..830fecba 100644
--- a/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.h
+++ b/storage/columnstore/columnstore/writeengine/wrapper/we_tablemetadata.h
@@ -99,5 +99,4 @@ class TableMetaData
#undef EXPORT
-#endif
-// vim:ts=4 sw=4:
+#endif // WE_TABLEMETADATA_H__ \ No newline at end of file
diff --git a/storage/columnstore/columnstore/writeengine/wrapper/writeengine.cpp b/storage/columnstore/columnstore/writeengine/wrapper/writeengine.cpp
index 81520412..41471472 100644
--- a/storage/columnstore/columnstore/writeengine/wrapper/writeengine.cpp
+++ b/storage/columnstore/columnstore/writeengine/wrapper/writeengine.cpp
@@ -6628,4 +6628,3 @@ int WriteEngineWrapper::RemoveTxnFromLBIDMap(const TxnID txnid)
}
} // end of namespace
-// vim:ts=4 sw=4:
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 51d1cf2f..31f7d2eb 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -406,7 +406,7 @@ MYSQL_ADD_PLUGIN(connect ${CONNECT_SOURCES}
STORAGE_ENGINE
COMPONENT connect-engine
RECOMPILE_FOR_EMBEDDED
- LINK_LIBRARIES ${ZLIB_LIBRARY} ${XML_LIBRARY} ${ICONV_LIBRARY}
+ LINK_LIBRARIES ${ZLIB_LIBRARIES} ${XML_LIBRARY} ${ICONV_LIBRARY}
${ODBC_LIBRARY} ${JDBC_LIBRARY} ${MONGOC_LIBRARY} ${IPHLPAPI_LIBRARY} ${REST_LIBRARY})
IF(NOT TARGET connect)
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 54ecde32..e9aa3db6 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -6454,6 +6454,9 @@ char *ha_connect::GetDBfromName(const char *name)
ha_create_table() in handle.cc
*/
+/* Stack size 25608 in clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int ha_connect::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *create_info)
{
@@ -6998,6 +7001,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
table= st;
DBUG_RETURN(rc);
} // end of create
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/**
Used to check whether a file based outward table can be populated by
@@ -7005,6 +7009,10 @@ int ha_connect::create(const char *name, TABLE *table_arg,
- file does not exist or is void
- user has file privilege
*/
+
+/* Stack size 16664 in clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
bool ha_connect::FileExists(const char *fn, bool bf)
{
if (!fn || !*fn)
@@ -7055,6 +7063,7 @@ bool ha_connect::FileExists(const char *fn, bool bf)
return true;
} // end of FileExists
+PRAGMA_REENABLE_CHECK_STACK_FRAME
// Called by SameString and NoFieldOptionChange
bool ha_connect::CheckString(PCSZ str1, PCSZ str2)
diff --git a/storage/connect/ioapi.h b/storage/connect/ioapi.h
index 44430e56..94b292ed 100644
--- a/storage/connect/ioapi.h
+++ b/storage/connect/ioapi.h
@@ -144,7 +144,7 @@ typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stre
typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-/* here is the "old" 32 bits structure structure */
+/* here is the "old" 32 bits structure */
typedef struct zlib_filefunc_def_s
{
open_file_func zopen_file;
diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp
index 67f22ce2..ab588dd4 100644
--- a/storage/connect/libdoc.cpp
+++ b/storage/connect/libdoc.cpp
@@ -93,7 +93,6 @@ class LIBXMLDOC : public XMLDOCUMENT {
xmlXPathContextPtr Ctxp;
xmlXPathObjectPtr Xop;
xmlXPathObjectPtr NlXop;
- xmlErrorPtr Xerr;
char *Buf; // Temporary
bool Nofreelist;
}; // end of class LIBXMLDOC
@@ -327,7 +326,6 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp)
Ctxp = NULL;
Xop = NULL;
NlXop = NULL;
- Xerr = NULL;
Buf = NULL;
Nofreelist = false;
} // end of LIBXMLDOC constructor
@@ -365,8 +363,8 @@ bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn)
Encoding = (char*)Docp->encoding;
return false;
- } else if ((Xerr = xmlGetLastError()))
- xmlResetError(Xerr);
+ } else if (xmlGetLastError())
+ xmlResetLastError();
return true;
} // end of ParseFile
@@ -505,9 +503,9 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn)
#if 1
// This function does not crash (
if (xmlSaveFormatFileEnc((const char *)ofn, Docp, Encoding, 0) < 0) {
- xmlErrorPtr err = xmlGetLastError();
+ const xmlError *err = xmlGetLastError();
strcpy(g->Message, (err) ? err->message : "Error saving XML doc");
- xmlResetError(Xerr);
+ xmlResetLastError();
rc = -1;
} // endif Save
// rc = xmlDocDump(of, Docp);
@@ -546,8 +544,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
if (Nlist) {
xmlXPathFreeNodeSet(Nlist);
- if ((Xerr = xmlGetLastError()))
- xmlResetError(Xerr);
+ if (xmlGetLastError())
+ xmlResetLastError();
Nlist = NULL;
} // endif Nlist
@@ -555,8 +553,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
if (Xop) {
xmlXPathFreeObject(Xop);
- if ((Xerr = xmlGetLastError()))
- xmlResetError(Xerr);
+ if (xmlGetLastError())
+ xmlResetLastError();
Xop = NULL;
} // endif Xop
@@ -564,8 +562,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
if (NlXop) {
xmlXPathFreeObject(NlXop);
- if ((Xerr = xmlGetLastError()))
- xmlResetError(Xerr);
+ if (xmlGetLastError())
+ xmlResetLastError();
NlXop = NULL;
} // endif NlXop
@@ -573,8 +571,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
if (Ctxp) {
xmlXPathFreeContext(Ctxp);
- if ((Xerr = xmlGetLastError()))
- xmlResetError(Xerr);
+ if (xmlGetLastError())
+ xmlResetLastError();
Ctxp = NULL;
} // endif Ctxp
@@ -590,6 +588,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp)
/******************************************************************/
xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
{
+ const xmlError *xerr;
xmlNodeSetPtr nl;
if (trace(1))
@@ -649,11 +648,11 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp)
} else
xmlXPathFreeObject(Xop); // Caused node not found
- if ((Xerr = xmlGetLastError())) {
- strcpy(g->Message, Xerr->message);
- xmlResetError(Xerr);
+ if ((xerr = xmlGetLastError())) {
+ strcpy(g->Message, xerr->message);
+ xmlResetLastError();
return NULL;
- } // endif Xerr
+ } // endif xerr
} // endif Xop
@@ -1079,7 +1078,7 @@ void XML2NODE::AddText(PGLOBAL g, PCSZ txtp)
/******************************************************************/
void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp)
{
- xmlErrorPtr xerr;
+ const xmlError *xerr;
if (trace(1))
htrc("DeleteChild: node=%p\n", dnp);
@@ -1122,7 +1121,7 @@ err:
if (trace(1))
htrc("DeleteChild: errmsg=%-.256s\n", xerr->message);
- xmlResetError(xerr);
+ xmlResetLastError();
} // end of DeleteChild
/* -------------------- class XML2NODELIST ---------------------- */
diff --git a/storage/connect/mysql-test/connect/r/drop-open-error.result b/storage/connect/mysql-test/connect/r/drop-open-error.result
index a5d1e893..f9b9b7e8 100644
--- a/storage/connect/mysql-test/connect/r/drop-open-error.result
+++ b/storage/connect/mysql-test/connect/r/drop-open-error.result
@@ -3,7 +3,7 @@ create table tcon engine=connect table_type=mysql CONNECTION='mysql://root@local
ERROR HY000: Too long value for 'SRCDEF'
drop table mdev9949;
Warnings:
-Warning 1017 Can't find file: 'MYSQLD_DATADIR/test/mdev9949.dos' (errno: 2 "No such file or directory")
+Warning 1017 Can't find file: 'DATADIR/test/mdev9949.dos' (errno: 2 "No such file or directory")
drop table t1;
select @@secure_file_priv 'must be NULL';
must be NULL
diff --git a/storage/connect/mysql-test/connect/r/mysql.result b/storage/connect/mysql-test/connect/r/mysql.result
index 1dcbca88..d1c68dcc 100644
--- a/storage/connect/mysql-test/connect/r/mysql.result
+++ b/storage/connect/mysql-test/connect/r/mysql.result
@@ -229,6 +229,7 @@ a
20
30
# Start of mysqldump ------
+/*!999999\- enable the sandbox mode */
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
diff --git a/storage/connect/mysql-test/connect/t/drop-open-error.test b/storage/connect/mysql-test/connect/t/drop-open-error.test
index 69e634e8..dd286c96 100644
--- a/storage/connect/mysql-test/connect/t/drop-open-error.test
+++ b/storage/connect/mysql-test/connect/t/drop-open-error.test
@@ -13,8 +13,9 @@ error ER_VALUE_TOO_LONG;
create table tcon engine=connect table_type=mysql CONNECTION='mysql://root@localhost/test/t1' SRCDEF='select c from t1 where c in ("foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar", "foo", "bar", "qux", "foobar")';
# copy the invalid frm (as created by the statement above before the MDEV-9949 fix)
+let $MARIADB_DATADIR=`select @@datadir`;
copy_file $MTR_SUITE_DIR/std_data/mdev9949.frm $datadir/test/mdev9949.frm;
---replace_result $datadir MYSQLD_DATADIR/ ./ MYSQLD_DATADIR/
+--replace_result $MARIADB_DATADIR DATADIR/ './' 'DATADIR/'
drop table mdev9949;
drop table t1;
diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp
index d0b7b316..7e2857f1 100644
--- a/storage/connect/tabmul.cpp
+++ b/storage/connect/tabmul.cpp
@@ -125,8 +125,11 @@ PTDB TDBMUL::Duplicate(PGLOBAL g)
/* have a LRECL that is the sum of the lengths of all components. */
/* This is why we use a big filename array to take care of that. */
/***********************************************************************/
+
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
bool TDBMUL::InitFileNames(PGLOBAL g)
- {
+{
#define PFNZ 4096
#define FNSZ (_MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT)
PTDBDIR dirp;
@@ -234,6 +237,7 @@ bool TDBMUL::InitFileNames(PGLOBAL g)
NumFiles = n;
return false;
} // end of InitFileNames
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/***********************************************************************/
/* The table column list is the sub-table column list. */
diff --git a/storage/connect/unzip.c b/storage/connect/unzip.c
index 90935043..de69f4b6 100644
--- a/storage/connect/unzip.c
+++ b/storage/connect/unzip.c
@@ -122,7 +122,7 @@
const char unz_copyright[] =
" unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
-/* unz_file_info_interntal contain internal info about a file in zipfile*/
+/* unz_file_info64_internal contain internal info about a file in zipfile*/
typedef struct unz_file_info64_internal_s
{
ZPOS64_T offset_curfile;/* relative offset of local header 8 bytes */
@@ -542,7 +542,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
return 0;
- /* number of the disk with the start of the zip64 end of central directory */
+ /* number of the disk with the start of the zip64 end of central directory */
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
return 0;
if (uL != 0)
@@ -590,10 +590,10 @@ local unzFile unzOpenInternal (const void *path,
ZPOS64_T central_pos;
uLong uL;
- uLong number_disk; /* number of the current dist, used for
- spaning ZIP, unsupported, always 0*/
- uLong number_disk_with_CD; /* number the the disk with central dir, used
- for spaning ZIP, unsupported, always 0*/
+ uLong number_disk; /* number of the current disk, used for
+ spanning ZIP, unsupported, always 0*/
+ uLong number_disk_with_CD; /* number the disk with central dir, used
+ for spanning ZIP, unsupported, always 0*/
ZPOS64_T number_entry_CD; /* total number of entries in
the central dir
(same than number_entry on nospan) */
diff --git a/storage/connect/unzip.h b/storage/connect/unzip.h
index 2104e391..ef045109 100644
--- a/storage/connect/unzip.h
+++ b/storage/connect/unzip.h
@@ -306,7 +306,7 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
Get Info about the current file
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
the current file
- if szFileName!=NULL, the filemane string will be copied in szFileName
+ if szFileName!=NULL, the filename string will be copied in szFileName
(fileNameBufferSize is the size of the buffer)
if extraField!=NULL, the extra field information will be copied in extraField
(extraFieldBufferSize is the size of the buffer).
diff --git a/storage/connect/zip.c b/storage/connect/zip.c
index 3d3d4cad..523ea222 100644
--- a/storage/connect/zip.c
+++ b/storage/connect/zip.c
@@ -575,7 +575,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
return 0;
- /* number of the disk with the start of the zip64 end of central directory */
+ /* number of the disk with the start of the zip64 end of central directory */
if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK)
return 0;
if (uL != 0)
@@ -614,9 +614,9 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) {
ZPOS64_T central_pos;
uLong uL;
- uLong number_disk; /* number of the current dist, used for
+ uLong number_disk; /* number of the current disk, used for
spanning ZIP, unsupported, always 0*/
- uLong number_disk_with_CD; /* number the the disk with central dir, used
+ uLong number_disk_with_CD; /* number of the disk with central dir, used
for spanning ZIP, unsupported, always 0*/
ZPOS64_T number_entry;
ZPOS64_T number_entry_CD; /* total number of entries in
@@ -814,71 +814,66 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit) {
/************************************************************/
extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) {
- zip64_internal ziinit;
zip64_internal* zi;
int err=ZIP_OK;
- ziinit.z_filefunc.zseek32_file = NULL;
- ziinit.z_filefunc.ztell32_file = NULL;
+ if (!(zi = (zip64_internal*)ALLOC(sizeof(zip64_internal))))
+ return NULL;
+
+ zi->z_filefunc.zseek32_file = NULL;
+ zi->z_filefunc.ztell32_file = NULL;
if (pzlib_filefunc64_32_def==NULL)
- fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64);
+ fill_fopen64_filefunc(&zi->z_filefunc.zfile_func64);
else
- ziinit.z_filefunc = *pzlib_filefunc64_32_def;
+ zi->z_filefunc = *pzlib_filefunc64_32_def;
- ziinit.filestream = ZOPEN64(ziinit.z_filefunc,
+ zi->filestream = ZOPEN64(zi->z_filefunc,
pathname,
(append == APPEND_STATUS_CREATE) ?
(ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) :
(ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING));
- if (ziinit.filestream == NULL)
+ if (zi->filestream == NULL)
+ {
+ free(zi);
return NULL;
+ }
if (append == APPEND_STATUS_CREATEAFTER)
- ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END);
+ ZSEEK64(zi->z_filefunc,zi->filestream,0,SEEK_END);
- ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream);
- ziinit.in_opened_file_inzip = 0;
- ziinit.ci.stream_initialised = 0;
- ziinit.number_entry = 0;
- ziinit.add_position_when_writing_offset = 0;
- init_linkedlist(&(ziinit.central_dir));
-
-
-
- zi = (zip64_internal*)ALLOC(sizeof(zip64_internal));
- if (zi==NULL)
- {
- ZCLOSE64(ziinit.z_filefunc,ziinit.filestream);
- return NULL;
- }
+ zi->begin_pos = ZTELL64(zi->z_filefunc,zi->filestream);
+ zi->in_opened_file_inzip = 0;
+ zi->ci.stream_initialised = 0;
+ zi->number_entry = 0;
+ zi->add_position_when_writing_offset = 0;
+ init_linkedlist(&(zi->central_dir));
/* now we add file in a zipfile */
# ifndef NO_ADDFILEINEXISTINGZIP
- ziinit.globalcomment = NULL;
+ zi->globalcomment = NULL;
if (append == APPEND_STATUS_ADDINZIP)
{
// Read and Cache Central Directory Records
- err = LoadCentralDirectoryRecord(&ziinit);
+ err = LoadCentralDirectoryRecord(zi);
}
if (globalcomment)
{
- *globalcomment = ziinit.globalcomment;
+ *globalcomment = zi->globalcomment;
}
# endif /* !NO_ADDFILEINEXISTINGZIP*/
if (err != ZIP_OK)
{
# ifndef NO_ADDFILEINEXISTINGZIP
- free(ziinit.globalcomment);
+ free(zi->globalcomment);
# endif /* !NO_ADDFILEINEXISTINGZIP*/
free(zi);
return NULL;
}
else
{
- *zi = ziinit;
return (zipFile)zi;
}
}
@@ -1027,7 +1022,6 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
int err = ZIP_OK;
# ifdef NOCRYPT
- (crcForCrypting);
if (password != NULL)
return ZIP_PARAMERROR;
# endif
@@ -1043,6 +1037,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
return ZIP_PARAMERROR;
#endif
+ // The filename and comment length must fit in 16 bits.
+ if ((filename!=NULL) && (strlen(filename)>0xffff))
+ return ZIP_PARAMERROR;
+ if ((comment!=NULL) && (strlen(comment)>0xffff))
+ return ZIP_PARAMERROR;
+ // The extra field length must fit in 16 bits. If the member also requires
+ // a Zip64 extra block, that will also need to fit within that 16-bit
+ // length, but that will be checked for later.
+ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
+ return ZIP_PARAMERROR;
+
zi = (zip64_internal*)file;
if (zi->in_opened_file_inzip == 1)
@@ -1597,7 +1602,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_si
if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree)
{
- // we can not write more data to the buffer that we have room for.
+ // we cannot write more data to the buffer that we have room for.
return ZIP_BADZIPFILE;
}
@@ -1861,7 +1866,7 @@ extern int ZEXPORT zipClose(zipFile file, const char* global_comment) {
free_linkedlist(&(zi->central_dir));
pos = centraldir_pos_inzip - zi->add_position_when_writing_offset;
- if(pos >= 0xffffffff || zi->number_entry > 0xFFFF)
+ if(pos >= 0xffffffff || zi->number_entry >= 0xFFFF)
{
ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
diff --git a/storage/connect/zip.h b/storage/connect/zip.h
index 5fc08413..3e230d34 100644
--- a/storage/connect/zip.h
+++ b/storage/connect/zip.h
@@ -177,9 +177,9 @@ extern int ZEXPORT zipOpenNewFileInZip64(zipFile file,
filename : the filename in zip (if NULL, '-' without quote will be used
*zipfi contain supplemental information
if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
- contains the extrafield data the the local header
+ contains the extrafield data for the local header
if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
- contains the extrafield data the the local header
+ contains the extrafield data for the global header
if comment != NULL, comment contain the comment string
method contain the compression method (0 for store, Z_DEFLATED for deflate)
level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 5f7f0c1e..404ad22a 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -440,31 +440,22 @@ int ha_heap::external_lock(THD *thd, int lock_type)
SYNOPSIS
disable_indexes()
- mode mode of operation:
- HA_KEY_SWITCH_NONUNIQ disable all non-unique keys
- HA_KEY_SWITCH_ALL disable all keys
- HA_KEY_SWITCH_NONUNIQ_SAVE dis. non-uni. and make persistent
- HA_KEY_SWITCH_ALL_SAVE dis. all keys and make persistent
DESCRIPTION
- Disable indexes and clear keys to use for scanning.
-
- IMPLEMENTATION
- HA_KEY_SWITCH_NONUNIQ is not implemented.
- HA_KEY_SWITCH_NONUNIQ_SAVE is not implemented with HEAP.
- HA_KEY_SWITCH_ALL_SAVE is not implemented with HEAP.
+ See handler::ha_disable_indexes()
RETURN
0 ok
HA_ERR_WRONG_COMMAND mode not implemented.
*/
-int ha_heap::disable_indexes(uint mode)
+int ha_heap::disable_indexes(key_map map, bool persist)
{
int error;
- if (mode == HA_KEY_SWITCH_ALL)
+ if (!persist)
{
+ DBUG_ASSERT(map.is_clear_all());
if (!(error= heap_disable_indexes(file)))
set_keys_for_scanning();
}
@@ -482,11 +473,6 @@ int ha_heap::disable_indexes(uint mode)
SYNOPSIS
enable_indexes()
- mode mode of operation:
- HA_KEY_SWITCH_NONUNIQ enable all non-unique keys
- HA_KEY_SWITCH_ALL enable all keys
- HA_KEY_SWITCH_NONUNIQ_SAVE en. non-uni. and make persistent
- HA_KEY_SWITCH_ALL_SAVE en. all keys and make persistent
DESCRIPTION
Enable indexes and set keys to use for scanning.
@@ -495,10 +481,7 @@ int ha_heap::disable_indexes(uint mode)
since the heap storage engine cannot repair the indexes.
To be sure, call handler::delete_all_rows() before.
- IMPLEMENTATION
- HA_KEY_SWITCH_NONUNIQ is not implemented.
- HA_KEY_SWITCH_NONUNIQ_SAVE is not implemented with HEAP.
- HA_KEY_SWITCH_ALL_SAVE is not implemented with HEAP.
+ See also handler::ha_enable_indexes()
RETURN
0 ok
@@ -506,12 +489,13 @@ int ha_heap::disable_indexes(uint mode)
HA_ERR_WRONG_COMMAND mode not implemented.
*/
-int ha_heap::enable_indexes(uint mode)
+int ha_heap::enable_indexes(key_map map, bool persist)
{
int error;
- if (mode == HA_KEY_SWITCH_ALL)
+ if (!persist)
{
+ DBUG_ASSERT(map.is_prefix(table->s->keys));
if (!(error= heap_enable_indexes(file)))
set_keys_for_scanning();
}
diff --git a/storage/heap/ha_heap.h b/storage/heap/ha_heap.h
index 18e0d1a9..d8636f7f 100644
--- a/storage/heap/ha_heap.h
+++ b/storage/heap/ha_heap.h
@@ -101,8 +101,8 @@ public:
int external_lock(THD *thd, int lock_type);
int delete_all_rows(void);
int reset_auto_increment(ulonglong value);
- int disable_indexes(uint mode);
- int enable_indexes(uint mode);
+ int disable_indexes(key_map map, bool persist);
+ int enable_indexes(key_map map, bool persist);
int indexes_are_disabled(void);
ha_rows records_in_range(uint inx, const key_range *start_key,
const key_range *end_key, page_range *pages);
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 32c0a437..b3125ca9 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -48,6 +48,13 @@ IF(UNIX)
IF(HAVE_LIBNUMA)
LINK_LIBRARIES(numa)
ENDIF()
+ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ IF(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch|AARCH|p(ower)?pc|x86_|amd)64")
+ OPTION(WITH_INNODB_PMEM "Support memory-mapped InnoDB redo log" ON)
+ ELSE() # Disable by default on ISA that are not covered by our CI
+ OPTION(WITH_INNODB_PMEM "Support memory-mapped InnoDB redo log" OFF)
+ ENDIF()
+ ENDIF()
ENDIF()
ENDIF()
@@ -71,7 +78,7 @@ ADD_FEATURE_INFO(INNODB_ROOT_GUESS WITH_INNODB_ROOT_GUESS
OPTION(WITH_INNODB_EXTRA_DEBUG "Enable extra InnoDB debug checks" OFF)
IF(WITH_INNODB_EXTRA_DEBUG)
- ADD_DEFINITIONS(-DUNIV_ZIP_DEBUG)
+ ADD_DEFINITIONS(-DUNIV_ZIP_DEBUG -DLOG_LATCH_DEBUG)
ENDIF()
ADD_FEATURE_INFO(INNODB_EXTRA_DEBUG WITH_INNODB_EXTRA_DEBUG "Extra InnoDB debug checks")
@@ -133,7 +140,6 @@ SET(INNOBASE_SOURCES
btr/btr0pcur.cc
btr/btr0sea.cc
btr/btr0defragment.cc
- buf/buf0block_hint.cc
buf/buf0buddy.cc
buf/buf0buf.cc
buf/buf0dblwr.cc
@@ -428,26 +434,16 @@ SET(INNOBASE_SOURCES
ut/ut0vec.cc
ut/ut0wqueue.cc)
-OPTION(WITH_PMEM "Support redo log in persistent memory" OFF)
-FIND_PACKAGE(PMEM)
-IF(PMEM_FOUND)
- INCLUDE_DIRECTORIES(${PMEM_INCLUDES})
- ADD_COMPILE_FLAGS(log/log0log.cc log/log0recv.cc
- buf/buf0flu.cc mtr/mtr0mtr.cc trx/trx0trx.cc srv/srv0start.cc
- COMPILE_FLAGS "-DHAVE_PMEM")
- SET(PMEM_LIBRARY ${PMEM_LIBRARIES})
-ELSE()
- IF(WITH_PMEM)
- MESSAGE(FATAL_ERROR "WITH_PMEM=ON cannot be satisfied")
- ENDIF()
+IF(WITH_INNODB_PMEM)
+ ADD_DEFINITIONS(-DHAVE_PMEM)
+ SET(INNOBASE_SOURCES ${INNOBASE_SOURCES} include/cache.h sync/cache.cc)
ENDIF()
MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
MODULE_OUTPUT_NAME ha_innodb
DEFAULT RECOMPILE_FOR_EMBEDDED
LINK_LIBRARIES
- ${ZLIB_LIBRARY}
- ${PMEM_LIBRARY}
+ ${ZLIB_LIBRARIES}
${NUMA_LIBRARY}
${LIBSYSTEMD}
${LINKER_SCRIPT})
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 705ff035..6b3a3733 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -264,6 +264,8 @@ btr_root_block_get(
mtr_t* mtr, /*!< in: mtr */
dberr_t* err) /*!< out: error code */
{
+ ut_ad(mode != RW_NO_LATCH);
+
if (!index->table || !index->table->space)
{
*err= DB_TABLESPACE_NOT_FOUND;
@@ -285,13 +287,12 @@ btr_root_block_get(
if (UNIV_LIKELY(block != nullptr))
{
- if (UNIV_UNLIKELY(mode == RW_NO_LATCH));
- else if (!!page_is_comp(block->page.frame) !=
- index->table->not_redundant() ||
- btr_page_get_index_id(block->page.frame) != index->id ||
- !fil_page_index_page_check(block->page.frame) ||
- index->is_spatial() !=
- (fil_page_get_type(block->page.frame) == FIL_PAGE_RTREE))
+ if (!!page_is_comp(block->page.frame) !=
+ index->table->not_redundant() ||
+ btr_page_get_index_id(block->page.frame) != index->id ||
+ !fil_page_index_page_check(block->page.frame) ||
+ index->is_spatial() !=
+ (fil_page_get_type(block->page.frame) == FIL_PAGE_RTREE))
{
*err= DB_PAGE_CORRUPTED;
block= nullptr;
@@ -561,13 +562,39 @@ btr_page_alloc_for_ibuf(
{
buf_page_make_young_if_needed(&new_block->page);
*err= flst_remove(root, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, new_block,
- PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, mtr);
+ PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE,
+ fil_system.sys_space->free_limit, mtr);
}
ut_d(if (*err == DB_SUCCESS)
flst_validate(root, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, mtr));
return new_block;
}
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
+/** Acquire a latch on the index root page for allocating or freeing pages.
+@param index index tree
+@param mtr mini-transaction
+@param err error code
+@return root page
+@retval nullptr if an error occurred */
+buf_block_t *btr_root_block_sx(dict_index_t *index, mtr_t *mtr, dberr_t *err)
+{
+ buf_block_t *root=
+ mtr->get_already_latched(page_id_t{index->table->space_id, index->page},
+ MTR_MEMO_PAGE_SX_FIX);
+ if (!root)
+ {
+ root= btr_root_block_get(index, RW_SX_LATCH, mtr, err);
+ if (UNIV_UNLIKELY(!root))
+ return root;
+ }
+#ifdef BTR_CUR_HASH_ADAPT
+ else
+ ut_ad(!root->index || !root->index->freed());
+#endif
+ return root;
+}
+
/**************************************************************//**
Allocates a new file page to be used in an index tree. NOTE: we assume
that the caller has made the reservation for free extents!
@@ -589,21 +616,9 @@ btr_page_alloc_low(
page should be initialized. */
dberr_t* err) /*!< out: error code */
{
- const auto savepoint= mtr->get_savepoint();
- buf_block_t *root= btr_root_block_get(index, RW_NO_LATCH, mtr, err);
+ buf_block_t *root= btr_root_block_sx(index, mtr, err);
if (UNIV_UNLIKELY(!root))
return root;
-
- const bool have_latch= mtr->have_u_or_x_latch(*root);
-#ifdef BTR_CUR_HASH_ADAPT
- ut_ad(!have_latch || !root->index || !root->index->freed());
-#endif
- mtr->rollback_to_savepoint(savepoint);
-
- if (!have_latch &&
- UNIV_UNLIKELY(!(root= btr_root_block_get(index, RW_SX_LATCH, mtr, err))))
- return root;
-
fseg_header_t *seg_header= root->page.frame +
(level ? PAGE_HEADER + PAGE_BTR_SEG_TOP : PAGE_HEADER + PAGE_BTR_SEG_LEAF);
return fseg_alloc_free_page_general(seg_header, hint_page_no, file_direction,
@@ -652,7 +667,8 @@ btr_page_free_for_ibuf(
buf_block_t *root= btr_get_latched_root(*index, mtr);
dberr_t err=
flst_add_first(root, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
- block, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, mtr);
+ block, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE,
+ fil_system.sys_space->free_limit, mtr);
ut_d(if (err == DB_SUCCESS)
flst_validate(root, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, mtr));
return err;
@@ -696,24 +712,16 @@ dberr_t btr_page_free(dict_index_t* index, buf_block_t* block, mtr_t* mtr,
fil_space_t *space= index->table->space;
dberr_t err;
- const auto savepoint= mtr->get_savepoint();
- if (buf_block_t *root= btr_root_block_get(index, RW_NO_LATCH, mtr, &err))
+ if (buf_block_t *root= btr_root_block_sx(index, mtr, &err))
{
- const bool have_latch= mtr->have_u_or_x_latch(*root);
-#ifdef BTR_CUR_HASH_ADAPT
- ut_ad(!have_latch || !root->index || !root->index->freed());
-#endif
- mtr->rollback_to_savepoint(savepoint);
- if (have_latch ||
- (root= btr_root_block_get(index, RW_SX_LATCH, mtr, &err)))
- err= fseg_free_page(&root->page.frame[blob ||
- page_is_leaf(block->page.frame)
- ? PAGE_HEADER + PAGE_BTR_SEG_LEAF
- : PAGE_HEADER + PAGE_BTR_SEG_TOP],
- space, page, mtr, space_latched);
+ err= fseg_free_page(&root->page.frame[blob ||
+ page_is_leaf(block->page.frame)
+ ? PAGE_HEADER + PAGE_BTR_SEG_LEAF
+ : PAGE_HEADER + PAGE_BTR_SEG_TOP],
+ space, page, mtr, space_latched);
+ if (err == DB_SUCCESS)
+ buf_page_free(space, page, mtr);
}
- if (err == DB_SUCCESS)
- buf_page_free(space, page, mtr);
/* The page was marked free in the allocation bitmap, but it
should remain exclusively latched until mtr_t::commit() or until it
@@ -1291,54 +1299,71 @@ btr_read_autoinc(dict_index_t* index)
return autoinc;
}
-/** Read the last used AUTO_INCREMENT value from PAGE_ROOT_AUTO_INC,
-or fall back to MAX(auto_increment_column).
-@param[in] table table containing an AUTO_INCREMENT column
-@param[in] col_no index of the AUTO_INCREMENT column
-@return the AUTO_INCREMENT value
-@retval 0 on error or if no AUTO_INCREMENT value was used yet */
-ib_uint64_t
-btr_read_autoinc_with_fallback(const dict_table_t* table, unsigned col_no)
+dict_index_t *dict_table_t::get_index(const dict_col_t &col) const
{
- ut_ad(table->persistent_autoinc);
- ut_ad(!table->is_temporary());
+ dict_index_t *index= dict_table_get_first_index(this);
- dict_index_t* index = dict_table_get_first_index(table);
+ while (index && (index->fields[0].col != &col || index->is_corrupted()))
+ index= dict_table_get_next_index(index);
- if (index == NULL) {
- return 0;
- }
+ return index;
+}
- mtr_t mtr;
- mtr.start();
- buf_block_t* block = buf_page_get(
- page_id_t(index->table->space_id, index->page),
- index->table->space->zip_size(),
- RW_S_LATCH, &mtr);
-
- ib_uint64_t autoinc = block
- ? page_get_autoinc(block->page.frame) : 0;
- const bool retry = block && autoinc == 0
- && !page_is_empty(block->page.frame);
- mtr.commit();
+/** Read the last used AUTO_INCREMENT value from PAGE_ROOT_AUTO_INC,
+or fall back to MAX(auto_increment_column).
+@param table table containing an AUTO_INCREMENT column
+@param col_no index of the AUTO_INCREMENT column
+@param mysql_version TABLE_SHARE::mysql_version
+@param max the maximum value of the AUTO_INCREMENT column
+@return the AUTO_INCREMENT value
+@retval 0 on error or if no AUTO_INCREMENT value was used yet */
+uint64_t btr_read_autoinc_with_fallback(const dict_table_t *table,
+ unsigned col_no, ulong mysql_version,
+ uint64_t max)
+{
+ ut_ad(table->persistent_autoinc);
+ ut_ad(!table->is_temporary());
- if (retry) {
- /* This should be an old data file where
- PAGE_ROOT_AUTO_INC was initialized to 0.
- Fall back to reading MAX(autoinc_col).
- There should be an index on it. */
- const dict_col_t* autoinc_col
- = dict_table_get_nth_col(table, col_no);
- while (index && index->fields[0].col != autoinc_col) {
- index = dict_table_get_next_index(index);
- }
+ uint64_t autoinc= 0;
+ mtr_t mtr;
+ mtr.start();
- if (index) {
- autoinc = row_search_max_autoinc(index);
- }
- }
+ if (buf_block_t *block=
+ buf_page_get(page_id_t(table->space_id,
+ dict_table_get_first_index(table)->page),
+ table->space->zip_size(), RW_SX_LATCH, &mtr))
+ {
+ autoinc= page_get_autoinc(block->page.frame);
- return autoinc;
+ if (autoinc > 0 && autoinc <= max && mysql_version >= 100210);
+ else if (dict_index_t *index=
+ table->get_index(*dict_table_get_nth_col(table, col_no)))
+ {
+ /* Read MAX(autoinc_col), in case this table had originally been
+ created before MariaDB 10.2.4 introduced persistent AUTO_INCREMENT
+ and MariaDB 10.2.10 fixed MDEV-12123, and there could be a garbage
+ value in the PAGE_ROOT_AUTO_INC field. */
+ const uint64_t max_autoinc= row_search_max_autoinc(index);
+ const bool need_adjust{autoinc > max || autoinc < max_autoinc};
+ ut_ad(max_autoinc <= max);
+
+ if (UNIV_UNLIKELY(need_adjust) && !high_level_read_only && !opt_readonly)
+ {
+ sql_print_information("InnoDB: Resetting PAGE_ROOT_AUTO_INC from "
+ UINT64PF " to " UINT64PF
+ " on table %`.*s.%`s (created with version %lu)",
+ autoinc, max_autoinc,
+ int(table->name.dblen()), table->name.m_name,
+ table->name.basename(), mysql_version);
+ autoinc= max_autoinc;
+ index->set_modified(mtr);
+ page_set_autoinc(block, max_autoinc, &mtr, true);
+ }
+ }
+ }
+
+ mtr.commit();
+ return autoinc;
}
/** Write the next available AUTO_INCREMENT value to PAGE_ROOT_AUTO_INC.
diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc
index 5bf68c58..e2513ad6 100644
--- a/storage/innobase/btr/btr0bulk.cc
+++ b/storage/innobase/btr/btr0bulk.cc
@@ -837,7 +837,7 @@ PageBulk::release()
m_block->page.fix();
/* No other threads can modify this block. */
- m_modify_clock = buf_block_get_modify_clock(m_block);
+ m_modify_clock = m_block->modify_clock;
m_mtr.commit();
}
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 46afb73b..2fc05b06 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -817,7 +817,7 @@ static ulint btr_node_ptr_max_size(const dict_index_t* index)
/* Determine the maximum length of the index field. */
field_max_size = dict_col_get_fixed_size(col, comp);
- if (field_max_size) {
+ if (field_max_size && field->fixed_len) {
/* dict_index_add_col() should guarantee this */
ut_ad(!field->prefix_len
|| field->fixed_len == field->prefix_len);
@@ -935,7 +935,7 @@ static inline page_cur_mode_t btr_cur_nonleaf_mode(page_cur_mode_t mode)
return PAGE_CUR_LE;
}
-static MY_ATTRIBUTE((nonnull))
+MY_ATTRIBUTE((nonnull,warn_unused_result))
/** Acquire a latch on the previous page without violating the latching order.
@param block index page
@param page_id page identifier with valid space identifier
@@ -946,8 +946,9 @@ static MY_ATTRIBUTE((nonnull))
@retval 0 if an error occurred
@retval 1 if the page could be latched in the wrong order
@retval -1 if the latch on block was temporarily released */
-int btr_latch_prev(buf_block_t *block, page_id_t page_id, ulint zip_size,
- rw_lock_type_t rw_latch, mtr_t *mtr, dberr_t *err)
+static int btr_latch_prev(buf_block_t *block, page_id_t page_id,
+ ulint zip_size,
+ rw_lock_type_t rw_latch, mtr_t *mtr, dberr_t *err)
{
ut_ad(rw_latch == RW_S_LATCH || rw_latch == RW_X_LATCH);
ut_ad(page_id.space() == block->page.id().space());
@@ -955,47 +956,80 @@ int btr_latch_prev(buf_block_t *block, page_id_t page_id, ulint zip_size,
const auto prev_savepoint= mtr->get_savepoint();
ut_ad(block == mtr->at_savepoint(prev_savepoint - 1));
- page_id.set_page_no(btr_page_get_prev(block->page.frame));
+ const page_t *const page= block->page.frame;
+ page_id.set_page_no(btr_page_get_prev(page));
+ /* We are holding a latch on the current page.
+
+ We will start by buffer-fixing the left sibling. Waiting for a latch
+ on it while holding a latch on the current page could lead to a
+ deadlock, because another thread could hold that latch and wait for
+ a right sibling page latch (the current page).
+
+ If there is a conflict, we will temporarily release our latch on the
+ current block while waiting for a latch on the left sibling. The
+ buffer-fixes on both blocks will prevent eviction. */
+
+ retry:
buf_block_t *prev= buf_page_get_gen(page_id, zip_size, RW_NO_LATCH, nullptr,
BUF_GET, mtr, err, false);
if (UNIV_UNLIKELY(!prev))
return 0;
int ret= 1;
- if (UNIV_UNLIKELY(rw_latch == RW_S_LATCH))
+ static_assert(MTR_MEMO_PAGE_S_FIX == mtr_memo_type_t(BTR_SEARCH_LEAF), "");
+ static_assert(MTR_MEMO_PAGE_X_FIX == mtr_memo_type_t(BTR_MODIFY_LEAF), "");
+
+ if (rw_latch == RW_S_LATCH
+ ? prev->page.lock.s_lock_try() : prev->page.lock.x_lock_try())
{
- if (UNIV_LIKELY(prev->page.lock.s_lock_try()))
+ mtr->lock_register(prev_savepoint, mtr_memo_type_t(rw_latch));
+ if (UNIV_UNLIKELY(prev->page.id() != page_id))
{
- mtr->lock_register(prev_savepoint, MTR_MEMO_PAGE_S_FIX);
- goto prev_latched;
+ fail:
+ /* the page was just read and found to be corrupted */
+ mtr->rollback_to_savepoint(prev_savepoint);
+ return 0;
}
- block->page.lock.s_unlock();
}
else
{
- if (UNIV_LIKELY(prev->page.lock.x_lock_try()))
+ ut_ad(mtr->at_savepoint(mtr->get_savepoint() - 1)->page.id() == page_id);
+ mtr->release_last_page();
+ if (rw_latch == RW_S_LATCH)
+ block->page.lock.s_unlock();
+ else
+ block->page.lock.x_unlock();
+
+ prev= buf_page_get_gen(page_id, zip_size, rw_latch, prev,
+ BUF_GET, mtr, err);
+ if (rw_latch == RW_S_LATCH)
+ block->page.lock.s_lock();
+ else
+ block->page.lock.x_lock();
+
+ const page_id_t prev_page_id= page_id;
+ page_id.set_page_no(btr_page_get_prev(page));
+
+ if (UNIV_UNLIKELY(page_id != prev_page_id))
{
- mtr->lock_register(prev_savepoint, MTR_MEMO_PAGE_X_FIX);
- goto prev_latched;
+ mtr->release_last_page();
+ if (page_id.page_no() == FIL_NULL)
+ return -1;
+ goto retry;
}
- block->page.lock.x_unlock();
+
+ if (UNIV_UNLIKELY(!prev))
+ goto fail;
+
+ ret= -1;
}
- ret= -1;
- mtr->lock_register(prev_savepoint - 1, MTR_MEMO_BUF_FIX);
- mtr->rollback_to_savepoint(prev_savepoint);
- prev= buf_page_get_gen(page_id, zip_size, rw_latch, prev,
- BUF_GET, mtr, err, false);
- if (UNIV_UNLIKELY(!prev))
- return 0;
- mtr->upgrade_buffer_fix(prev_savepoint - 1, rw_latch);
-
- prev_latched:
- if (memcmp_aligned<2>(FIL_PAGE_TYPE + prev->page.frame,
- FIL_PAGE_TYPE + block->page.frame, 2) ||
- memcmp_aligned<2>(PAGE_HEADER + PAGE_INDEX_ID + prev->page.frame,
- PAGE_HEADER + PAGE_INDEX_ID + block->page.frame, 8) ||
- page_is_comp(prev->page.frame) != page_is_comp(block->page.frame))
+ const page_t *const p= prev->page.frame;
+ if (memcmp_aligned<4>(FIL_PAGE_NEXT + p, FIL_PAGE_OFFSET + page, 4) ||
+ memcmp_aligned<2>(FIL_PAGE_TYPE + p, FIL_PAGE_TYPE + page, 2) ||
+ memcmp_aligned<2>(PAGE_HEADER + PAGE_INDEX_ID + p,
+ PAGE_HEADER + PAGE_INDEX_ID + page, 8) ||
+ page_is_comp(p) != page_is_comp(page))
{
ut_ad("corrupted" == 0); // FIXME: remove this
*err= DB_CORRUPTION;
@@ -6092,7 +6126,6 @@ btr_store_big_rec_extern_fields(
for (ulint blob_npages = 0;; ++blob_npages) {
buf_block_t* block;
const ulint commit_freq = 4;
- uint32_t r_extents;
ut_ad(page_align(field_ref) == page_align(rec));
@@ -6127,22 +6160,14 @@ btr_store_big_rec_extern_fields(
hint_prev = rec_block->page.id().page_no();
}
- error = fsp_reserve_free_extents(
- &r_extents, index->table->space, 1,
- FSP_BLOB, &mtr, 1);
- if (UNIV_UNLIKELY(error != DB_SUCCESS)) {
-alloc_fail:
- mtr.commit();
- goto func_exit;
- }
-
block = btr_page_alloc(index, hint_prev + 1,
FSP_NO_DIR, 0, &mtr, &mtr,
&error);
- index->table->space->release_free_extents(r_extents);
if (!block) {
- goto alloc_fail;
+alloc_fail:
+ mtr.commit();
+ goto func_exit;
}
const uint32_t space_id = block->page.id().space();
diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc
index 2131fb94..de0f9e93 100644
--- a/storage/innobase/btr/btr0pcur.cc
+++ b/storage/innobase/btr/btr0pcur.cc
@@ -179,10 +179,8 @@ 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. */
- cursor->modify_clock = buf_block_get_modify_clock(block);
+ cursor->old_page_id = block->page.id();
+ cursor->modify_clock = block->modify_clock;
}
/**************************************************************//**
@@ -214,101 +212,80 @@ btr_pcur_copy_stored_position(
}
/** Optimistically latches the leaf page or pages requested.
-@param[in] block guessed buffer block
-@param[in,out] pcur cursor
-@param[in,out] latch_mode BTR_SEARCH_LEAF, ...
-@param[in,out] mtr mini-transaction
-@return true if success */
+@param pcur persistent cursor
+@param latch_mode BTR_SEARCH_LEAF, ...
+@param mtr mini-transaction
+@return true on success */
TRANSACTIONAL_TARGET
-static bool btr_pcur_optimistic_latch_leaves(buf_block_t *block,
- btr_pcur_t *pcur,
+static bool btr_pcur_optimistic_latch_leaves(btr_pcur_t *pcur,
btr_latch_mode *latch_mode,
mtr_t *mtr)
{
- ut_ad(block->page.buf_fix_count());
- ut_ad(block->page.in_file());
- ut_ad(block->page.frame);
-
static_assert(BTR_SEARCH_PREV & BTR_SEARCH_LEAF, "");
static_assert(BTR_MODIFY_PREV & BTR_MODIFY_LEAF, "");
static_assert((BTR_SEARCH_PREV ^ BTR_MODIFY_PREV) ==
(RW_S_LATCH ^ RW_X_LATCH), "");
+ buf_block_t *const block=
+ buf_page_optimistic_fix(pcur->btr_cur.page_cur.block, pcur->old_page_id);
+
+ if (!block)
+ return false;
+
+ if (*latch_mode == BTR_SEARCH_LEAF || *latch_mode == BTR_MODIFY_LEAF)
+ return buf_page_optimistic_get(block, rw_lock_type_t(*latch_mode),
+ pcur->modify_clock, mtr);
+
+ ut_ad(*latch_mode == BTR_SEARCH_PREV || *latch_mode == BTR_MODIFY_PREV);
const rw_lock_type_t mode=
rw_lock_type_t(*latch_mode & (RW_X_LATCH | RW_S_LATCH));
- switch (*latch_mode) {
- default:
- ut_ad(*latch_mode == BTR_SEARCH_LEAF || *latch_mode == BTR_MODIFY_LEAF);
- return buf_page_optimistic_get(mode, block, pcur->modify_clock, mtr);
- case BTR_SEARCH_PREV:
- case BTR_MODIFY_PREV:
- page_id_t id{0};
- uint32_t left_page_no;
- ulint zip_size;
- buf_block_t *left_block= nullptr;
- {
- transactional_shared_lock_guard<block_lock> g{block->page.lock};
- if (block->modify_clock != pcur->modify_clock)
- return false;
- id= block->page.id();
- zip_size= block->zip_size();
- left_page_no= btr_page_get_prev(block->page.frame);
- }
-
- if (left_page_no != FIL_NULL)
- {
- left_block=
- buf_page_get_gen(page_id_t(id.space(), left_page_no), zip_size,
- mode, nullptr, BUF_GET_POSSIBLY_FREED, mtr);
-
- if (!left_block);
- else if (btr_page_get_next(left_block->page.frame) != id.page_no())
- {
-release_left_block:
- mtr->release_last_page();
- return false;
- }
- else
- buf_page_make_young_if_needed(&left_block->page);
- }
-
- if (buf_page_optimistic_get(mode, block, pcur->modify_clock, mtr))
- {
- if (btr_page_get_prev(block->page.frame) == left_page_no)
- {
- /* block was already buffer-fixed while entering the function and
- buf_page_optimistic_get() buffer-fixes it again. */
- ut_ad(2 <= block->page.buf_fix_count());
- *latch_mode= btr_latch_mode(mode);
- return true;
- }
-
- mtr->release_last_page();
- }
-
- ut_ad(block->page.buf_fix_count());
- if (left_block)
- goto release_left_block;
- return false;
+ uint64_t modify_clock;
+ uint32_t left_page_no;
+ const page_t *const page= block->page.frame;
+ {
+ transactional_shared_lock_guard<block_lock> g{block->page.lock};
+ modify_clock= block->modify_clock;
+ left_page_no= btr_page_get_prev(page);
}
-}
-/** Structure acts as functor to do the latching of leaf pages.
-It returns true if latching of leaf pages succeeded and false
-otherwise. */
-struct optimistic_latch_leaves
-{
- btr_pcur_t *const cursor;
- btr_latch_mode *const latch_mode;
- mtr_t *const mtr;
+ const auto savepoint= mtr->get_savepoint();
+ mtr->memo_push(block, MTR_MEMO_BUF_FIX);
- bool operator()(buf_block_t *hint) const
+ if (UNIV_UNLIKELY(modify_clock != pcur->modify_clock))
{
- return hint &&
- btr_pcur_optimistic_latch_leaves(hint, cursor, latch_mode, mtr);
+ fail:
+ mtr->rollback_to_savepoint(savepoint);
+ return false;
+ }
+
+ buf_block_t *prev;
+ if (left_page_no != FIL_NULL)
+ {
+ prev= buf_page_get_gen(page_id_t(pcur->old_page_id.space(),
+ left_page_no), block->zip_size(),
+ mode, nullptr, BUF_GET_POSSIBLY_FREED, mtr);
+ if (!prev ||
+ page_is_comp(prev->page.frame) != page_is_comp(block->page.frame) ||
+ memcmp_aligned<2>(block->page.frame, prev->page.frame, 2) ||
+ memcmp_aligned<2>(block->page.frame + PAGE_HEADER + PAGE_INDEX_ID,
+ prev->page.frame + PAGE_HEADER + PAGE_INDEX_ID, 8))
+ goto fail;
}
-};
+ else
+ prev= nullptr;
+
+ mtr->upgrade_buffer_fix(savepoint, mode);
+
+ if (UNIV_UNLIKELY(block->modify_clock != modify_clock) ||
+ UNIV_UNLIKELY(block->page.is_freed()) ||
+ (prev &&
+ memcmp_aligned<4>(FIL_PAGE_NEXT + prev->page.frame,
+ FIL_PAGE_OFFSET + page, 4)))
+ goto fail;
+
+ return true;
+}
/** Restores the stored position of a persistent cursor bufferfixing
the page and obtaining the specified latches. If the cursor position
@@ -331,6 +308,7 @@ btr_pcur_t::SAME_UNIQ cursor position is on user rec and points on the
record with the same unique field values as in the stored record,
btr_pcur_t::NOT_SAME cursor position is not on user rec or points on
the record with not the samebuniq field values as in the stored */
+TRANSACTIONAL_TARGET
btr_pcur_t::restore_status
btr_pcur_t::restore_position(btr_latch_mode restore_latch_mode, mtr_t *mtr)
{
@@ -361,7 +339,6 @@ btr_pcur_t::restore_position(btr_latch_mode restore_latch_mode, mtr_t *mtr)
latch_mode =
BTR_LATCH_MODE_WITHOUT_INTENTION(restore_latch_mode);
pos_state = BTR_PCUR_IS_POSITIONED;
- block_when_stored.clear();
return restore_status::NOT_SAME;
}
@@ -378,9 +355,8 @@ btr_pcur_t::restore_position(btr_latch_mode restore_latch_mode, mtr_t *mtr)
case BTR_SEARCH_PREV:
case BTR_MODIFY_PREV:
/* Try optimistic restoration. */
- if (block_when_stored.run_with_hint(
- optimistic_latch_leaves{this, &restore_latch_mode,
- mtr})) {
+ if (btr_pcur_optimistic_latch_leaves(this, &restore_latch_mode,
+ mtr)) {
pos_state = BTR_PCUR_IS_POSITIONED;
latch_mode = restore_latch_mode;
@@ -485,16 +461,22 @@ btr_pcur_t::restore_position(btr_latch_mode restore_latch_mode, mtr_t *mtr)
since the cursor can now be on a different page!
But we can retain the value of old_rec */
- block_when_stored.store(btr_pcur_get_block(this));
- modify_clock= buf_block_get_modify_clock(
- block_when_stored.block());
+ old_page_id = btr_cur.page_cur.block->page.id();
+ modify_clock = btr_cur.page_cur.block->modify_clock;
mem_heap_free(heap);
return restore_status::SAME_ALL;
}
- if (n_matched_fields >= index->n_uniq)
- ret_val= restore_status::SAME_UNIQ;
+ if (n_matched_fields >= index->n_uniq
+ /* Unique indexes can contain "NULL" keys, and if all
+ unique fields are NULL and not all tuple
+ fields match to record fields, then treat it as if
+ restored cursor position points to the record with
+ not the same unique key. */
+ && !(index->n_nullable
+ && dtuple_contains_null(tuple, index->n_uniq)))
+ ret_val= restore_status::SAME_UNIQ;
}
mem_heap_free(heap);
@@ -612,40 +594,33 @@ btr_pcur_move_backward_from_page(
return true;
}
- buf_block_t* block = btr_pcur_get_block(cursor);
-
- if (page_has_prev(block->page.frame)) {
- buf_block_t* left_block
- = mtr->at_savepoint(mtr->get_savepoint() - 1);
- const page_t* const left = left_block->page.frame;
- if (memcmp_aligned<4>(left + FIL_PAGE_NEXT,
- block->page.frame
- + FIL_PAGE_OFFSET, 4)) {
- /* This should be the right sibling page, or
- if there is none, the current block. */
- ut_ad(left_block == block
- || !memcmp_aligned<4>(left + FIL_PAGE_PREV,
- block->page.frame
- + FIL_PAGE_OFFSET, 4));
- /* The previous one must be the left sibling. */
- left_block
- = mtr->at_savepoint(mtr->get_savepoint() - 2);
- ut_ad(!memcmp_aligned<4>(left_block->page.frame
- + FIL_PAGE_NEXT,
- block->page.frame
- + FIL_PAGE_OFFSET, 4));
- }
+ buf_block_t* block = mtr->at_savepoint(0);
+ ut_ad(block == btr_pcur_get_block(cursor));
+ const page_t* const page = block->page.frame;
+ /* btr_pcur_optimistic_latch_leaves() will acquire a latch on
+ the preceding page if one exists;
+ if that fails, btr_cur_t::search_leaf() invoked by
+ btr_pcur_open_with_no_init() will also acquire a latch on the
+ succeeding page. Our caller only needs one page latch. */
+ ut_ad(mtr->get_savepoint() <= 3);
+
+ if (page_has_prev(page)) {
+ buf_block_t* const left_block = mtr->at_savepoint(1);
+ ut_ad(!memcmp_aligned<4>(page + FIL_PAGE_OFFSET,
+ left_block->page.frame
+ + FIL_PAGE_NEXT, 4));
if (btr_pcur_is_before_first_on_page(cursor)) {
+ /* Reposition on the previous page. */
page_cur_set_after_last(left_block,
&cursor->btr_cur.page_cur);
/* Release the right sibling. */
- } else {
- /* Release the left sibling. */
+ mtr->rollback_to_savepoint(0, 1);
block = left_block;
}
- mtr->release(*block);
}
+ mtr->rollback_to_savepoint(1);
+ ut_ad(block == mtr->at_savepoint(0));
cursor->latch_mode = latch_mode;
cursor->old_rec = nullptr;
return false;
diff --git a/storage/innobase/buf/buf0block_hint.cc b/storage/innobase/buf/buf0block_hint.cc
deleted file mode 100644
index 6bd01faa..00000000
--- a/storage/innobase/buf/buf0block_hint.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2020, 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, version 2.0, as published by the
-Free Software Foundation.
-
-This program is also distributed with certain software (including but not
-limited to OpenSSL) that is licensed under separate terms, as designated in a
-particular file or component or in included license documentation. The authors
-of MySQL hereby grant you an additional permission to link the program and
-your derivative works with the separately licensed software that they have
-included with MySQL.
-
-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, version 2.0,
-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 "buf0block_hint.h"
-namespace buf {
-
-TRANSACTIONAL_TARGET
-void Block_hint::buffer_fix_block_if_still_valid()
-{
- /* To check if m_block belongs to the current buf_pool, we must
- prevent freeing memory while we check, and until we buffer-fix the
- block. For this purpose it is enough to latch any of the many
- latches taken by buf_pool_t::resize().
-
- Similar to buf_page_optimistic_get(), we must validate
- m_block->page.id() after acquiring the hash_lock, because the object
- may have been freed and not actually attached to buf_pool.page_hash
- at the moment. (The block could have been reused to store a
- different page, and that slice of buf_pool.page_hash could be protected
- by another hash_lock that we are not holding.)
-
- Finally, we must ensure that the block is not being freed. */
- if (m_block)
- {
- auto &cell= buf_pool.page_hash.cell_get(m_page_id.fold());
- transactional_shared_lock_guard<page_hash_latch> g
- {buf_pool.page_hash.lock_get(cell)};
- if (buf_pool.is_uncompressed(m_block) && m_page_id == m_block->page.id() &&
- m_block->page.frame && m_block->page.in_file())
- m_block->page.fix();
- else
- clear();
- }
-}
-} // namespace buf
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 23b5b776..49f73105 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -77,6 +77,8 @@ struct set_numa_interleave_t
if (srv_numa_interleave) {
struct bitmask *numa_mems_allowed = numa_get_mems_allowed();
+ MEM_MAKE_DEFINED(numa_mems_allowed,
+ sizeof *numa_mems_allowed);
ib::info() << "Setting NUMA memory policy to"
" MPOL_INTERLEAVE";
if (set_mempolicy(MPOL_INTERLEAVE,
@@ -1062,6 +1064,7 @@ inline bool buf_pool_t::chunk_t::create(size_t bytes)
if (srv_numa_interleave)
{
struct bitmask *numa_mems_allowed= numa_get_mems_allowed();
+ MEM_MAKE_DEFINED(numa_mems_allowed, sizeof *numa_mems_allowed);
if (mbind(mem, mem_size(), MPOL_INTERLEAVE,
numa_mems_allowed->maskp, numa_mems_allowed->size,
MPOL_MF_MOVE))
@@ -1591,17 +1594,14 @@ inline bool buf_pool_t::withdraw_blocks()
/* reserve free_list length */
if (UT_LIST_GET_LEN(withdraw) < withdraw_target) {
- buf_flush_LRU(
- std::max<ulint>(withdraw_target
- - UT_LIST_GET_LEN(withdraw),
- srv_LRU_scan_depth),
- true);
- mysql_mutex_unlock(&buf_pool.mutex);
- buf_dblwr.flush_buffered_writes();
- mysql_mutex_lock(&buf_pool.flush_list_mutex);
- buf_flush_wait_LRU_batch_end();
- mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- mysql_mutex_lock(&buf_pool.mutex);
+ try_LRU_scan = false;
+ mysql_mutex_unlock(&mutex);
+ mysql_mutex_lock(&flush_list_mutex);
+ page_cleaner_wakeup(true);
+ my_cond_wait(&done_flush_list,
+ &flush_list_mutex.m_mutex);
+ mysql_mutex_unlock(&flush_list_mutex);
+ mysql_mutex_lock(&mutex);
}
/* relocate blocks/buddies in withdrawn area */
@@ -2298,7 +2298,10 @@ buf_page_t *buf_pool_t::watch_set(const page_id_t id,
got_block:
bpage->fix();
if (watch_is_sentinel(*bpage))
+ {
+ ut_ad(!bpage->oldest_modification());
bpage= nullptr;
+ }
page_hash.lock_get(chain).unlock();
return bpage;
}
@@ -2370,6 +2373,7 @@ void buf_pool_t::watch_unset(const page_id_t id, buf_pool_t::hash_chain &chain)
}
else
{
+ ut_ad(!w->oldest_modification());
const auto state= w->state();
ut_ad(~buf_page_t::LRU_MASK & state);
ut_ad(state >= buf_page_t::UNFIXED + 1);
@@ -2856,9 +2860,10 @@ got_block_fixed:
if (state > buf_page_t::READ_FIX && state < buf_page_t::WRITE_FIX) {
if (mode == BUF_PEEK_IF_IN_POOL) {
ignore_block:
+ block->unfix();
+ignore_unfixed:
ut_ad(mode == BUF_GET_POSSIBLY_FREED
|| mode == BUF_PEEK_IF_IN_POOL);
- block->unfix();
if (err) {
*err = DB_CORRUPTION;
}
@@ -2872,16 +2877,32 @@ ignore_block:
in buf_page_t::read_complete() or
buf_pool_t::corrupted_evict(), or
after buf_zip_decompress() in this function. */
- block->page.lock.s_lock();
+ if (rw_latch != RW_NO_LATCH) {
+ block->page.lock.s_lock();
+ } else if (!block->page.lock.s_lock_try()) {
+ /* For RW_NO_LATCH, we should not try to acquire S or X
+ latch directly as we could be violating the latching
+ order resulting in deadlock. Instead we try latching the
+ page and retry in case of a failure. */
+ goto wait_for_read;
+ }
state = block->page.state();
ut_ad(state < buf_page_t::READ_FIX
|| state >= buf_page_t::WRITE_FIX);
const page_id_t id{block->page.id()};
block->page.lock.s_unlock();
- if (UNIV_UNLIKELY(id != page_id)) {
+ if (UNIV_UNLIKELY(state < buf_page_t::UNFIXED)) {
+ if (UNIV_UNLIKELY(id == page_id)) {
+ /* The page read was completed, and
+ another thread marked the page as free
+ while we were waiting. */
+ goto ignore_block;
+ }
+
ut_ad(id == page_id_t{~0ULL});
block->page.unfix();
+
if (++retries < BUF_PAGE_READ_MAX_RETRIES) {
goto loop;
}
@@ -2892,6 +2913,7 @@ ignore_block:
return nullptr;
}
+ ut_ad(id == page_id);
} else if (mode != BUF_PEEK_IF_IN_POOL) {
} else if (!mtr) {
ut_ad(!block->page.oldest_modification());
@@ -2918,6 +2940,7 @@ free_unfixed_block:
if (UNIV_UNLIKELY(!block->page.frame)) {
if (!block->page.lock.x_lock_try()) {
wait_for_unzip:
+wait_for_read:
/* The page is being read or written, or
another thread is executing buf_zip_decompress()
in buf_page_get_low() on it. */
@@ -3098,83 +3121,72 @@ re_evict_fail:
#endif /* UNIV_DEBUG */
ut_ad(block->page.frame);
+ /* The state = block->page.state() may be stale at this point,
+ and in fact, at any point of time if we consider its
+ buffer-fix component. If the block is being read into the
+ buffer pool, it is possible that buf_page_t::read_complete()
+ will invoke buf_pool_t::corrupted_evict() and therefore
+ invalidate it (invoke buf_page_t::set_corrupt_id() and set the
+ state to FREED). Therefore, after acquiring the page latch we
+ must recheck the state. */
+
if (state >= buf_page_t::UNFIXED
&& allow_ibuf_merge
&& fil_page_get_type(block->page.frame) == FIL_PAGE_INDEX
&& page_is_leaf(block->page.frame)) {
block->page.lock.x_lock();
- ut_ad(block->page.id() == page_id
- || (state >= buf_page_t::READ_FIX
- && state < buf_page_t::WRITE_FIX));
-
-#ifdef BTR_CUR_HASH_ADAPT
- btr_search_drop_page_hash_index(block, true);
-#endif /* BTR_CUR_HASH_ADAPT */
-
- dberr_t e;
-
- if (UNIV_UNLIKELY(block->page.id() != page_id)) {
-page_id_mismatch:
- state = block->page.state();
- e = DB_CORRUPTION;
-ibuf_merge_corrupted:
- if (err) {
- *err = e;
- }
-
- if (block->page.id().is_corrupted()) {
- buf_pool.corrupted_evict(&block->page, state);
- }
- return nullptr;
- }
-
state = block->page.state();
ut_ad(state < buf_page_t::READ_FIX);
if (state >= buf_page_t::IBUF_EXIST
&& state < buf_page_t::REINIT) {
block->page.clear_ibuf_exist();
- e = ibuf_merge_or_delete_for_page(block, page_id,
- block->zip_size());
- if (UNIV_UNLIKELY(e != DB_SUCCESS)) {
- goto ibuf_merge_corrupted;
+ if (dberr_t local_err =
+ ibuf_merge_or_delete_for_page(block, page_id,
+ block->zip_size())) {
+ if (err) {
+ *err = local_err;
+ }
+ goto release_and_ignore_block;
}
+ } else if (state < buf_page_t::UNFIXED) {
+release_and_ignore_block:
+ block->page.lock.x_unlock();
+ goto ignore_block;
}
- if (rw_latch == RW_X_LATCH) {
- goto get_latch_valid;
- } else {
+#ifdef BTR_CUR_HASH_ADAPT
+ btr_search_drop_page_hash_index(block, true);
+#endif /* BTR_CUR_HASH_ADAPT */
+
+ switch (rw_latch) {
+ case RW_NO_LATCH:
+ block->page.lock.x_unlock();
+ break;
+ case RW_S_LATCH:
block->page.lock.x_unlock();
- goto get_latch;
+ block->page.lock.s_lock();
+ break;
+ case RW_SX_LATCH:
+ block->page.lock.x_u_downgrade();
+ break;
+ default:
+ ut_ad(rw_latch == RW_X_LATCH);
}
+
+ mtr->memo_push(block, mtr_memo_type_t(rw_latch));
} else {
-get_latch:
switch (rw_latch) {
case RW_NO_LATCH:
mtr->memo_push(block, MTR_MEMO_BUF_FIX);
return block;
case RW_S_LATCH:
block->page.lock.s_lock();
- ut_ad(!block->page.is_read_fixed());
- if (UNIV_UNLIKELY(block->page.id() != page_id)) {
- block->page.lock.s_unlock();
- block->page.lock.x_lock();
- goto page_id_mismatch;
- }
-get_latch_valid:
- mtr->memo_push(block, mtr_memo_type_t(rw_latch));
-#ifdef BTR_CUR_HASH_ADAPT
- btr_search_drop_page_hash_index(block, true);
-#endif /* BTR_CUR_HASH_ADAPT */
break;
case RW_SX_LATCH:
block->page.lock.u_lock();
ut_ad(!block->page.is_io_fixed());
- if (UNIV_UNLIKELY(block->page.id() != page_id)) {
- block->page.lock.u_x_upgrade();
- goto page_id_mismatch;
- }
- goto get_latch_valid;
+ break;
default:
ut_ad(rw_latch == RW_X_LATCH);
if (block->page.lock.x_lock_upgraded()) {
@@ -3183,17 +3195,26 @@ get_latch_valid:
mtr->page_lock_upgrade(*block);
return block;
}
- if (UNIV_UNLIKELY(block->page.id() != page_id)) {
- goto page_id_mismatch;
- }
- goto get_latch_valid;
}
- ut_ad(page_id_t(page_get_space_id(block->page.frame),
- page_get_page_no(block->page.frame))
- == page_id);
+ mtr->memo_push(block, mtr_memo_type_t(rw_latch));
+ state = block->page.state();
+
+ if (UNIV_UNLIKELY(state < buf_page_t::UNFIXED)) {
+ mtr->release_last_page();
+ goto ignore_unfixed;
+ }
+
+ ut_ad(state < buf_page_t::READ_FIX
+ || state > buf_page_t::WRITE_FIX);
+
+#ifdef BTR_CUR_HASH_ADAPT
+ btr_search_drop_page_hash_index(block, true);
+#endif /* BTR_CUR_HASH_ADAPT */
}
+ ut_ad(page_id_t(page_get_space_id(block->page.frame),
+ page_get_page_no(block->page.frame)) == page_id);
return block;
}
@@ -3289,83 +3310,76 @@ buf_page_get_gen(
return block;
}
-/********************************************************************//**
-This is the general function used to get optimistic access to a database
-page.
-@return TRUE if success */
TRANSACTIONAL_TARGET
-bool buf_page_optimistic_get(ulint rw_latch, buf_block_t *block,
- uint64_t modify_clock, mtr_t *mtr)
+buf_block_t *buf_page_optimistic_fix(buf_block_t *block, page_id_t id)
+{
+ buf_pool_t::hash_chain &chain= buf_pool.page_hash.cell_get(id.fold());
+ transactional_shared_lock_guard<page_hash_latch> g
+ {buf_pool.page_hash.lock_get(chain)};
+ if (UNIV_UNLIKELY(!buf_pool.is_uncompressed(block) ||
+ id != block->page.id() || !block->page.frame))
+ return nullptr;
+ const auto state= block->page.state();
+ if (UNIV_UNLIKELY(state < buf_page_t::UNFIXED ||
+ state >= buf_page_t::READ_FIX))
+ return nullptr;
+ block->page.fix();
+ return block;
+}
+
+buf_block_t *buf_page_optimistic_get(buf_block_t *block,
+ rw_lock_type_t rw_latch,
+ uint64_t modify_clock, mtr_t *mtr)
{
- ut_ad(block);
- ut_ad(mtr);
ut_ad(mtr->is_active());
ut_ad(rw_latch == RW_S_LATCH || rw_latch == RW_X_LATCH);
+ ut_ad(block->page.buf_fix_count());
- if (have_transactional_memory);
- else if (UNIV_UNLIKELY(!block->page.frame))
- return false;
- else
+ if (rw_latch == RW_S_LATCH)
{
- const auto state= block->page.state();
- if (UNIV_UNLIKELY(state < buf_page_t::UNFIXED ||
- state >= buf_page_t::READ_FIX))
- return false;
- }
+ if (!block->page.lock.s_lock_try())
+ {
+ fail:
+ block->page.unfix();
+ return nullptr;
+ }
- bool success;
- const page_id_t id{block->page.id()};
- buf_pool_t::hash_chain &chain= buf_pool.page_hash.cell_get(id.fold());
- bool have_u_not_x= false;
+ ut_ad(!ibuf_inside(mtr) ||
+ ibuf_page(block->page.id(), block->zip_size(), nullptr));
- {
- transactional_shared_lock_guard<page_hash_latch> g
- {buf_pool.page_hash.lock_get(chain)};
- if (UNIV_UNLIKELY(id != block->page.id() || !block->page.frame))
- return false;
- const auto state= block->page.state();
- if (UNIV_UNLIKELY(state < buf_page_t::UNFIXED ||
- state >= buf_page_t::READ_FIX))
- return false;
-
- if (rw_latch == RW_S_LATCH)
- success= block->page.lock.s_lock_try();
- else
+ if (modify_clock != block->modify_clock || block->page.is_freed())
{
- have_u_not_x= block->page.lock.have_u_not_x();
- success= have_u_not_x || block->page.lock.x_lock_try();
+ block->page.lock.s_unlock();
+ goto fail;
}
- }
- if (!success)
- return false;
-
- if (have_u_not_x)
+ ut_ad(!block->page.is_read_fixed());
+ buf_page_make_young_if_needed(&block->page);
+ mtr->memo_push(block, MTR_MEMO_PAGE_S_FIX);
+ }
+ else if (block->page.lock.have_u_not_x())
{
block->page.lock.u_x_upgrade();
+ block->page.unfix();
mtr->page_lock_upgrade(*block);
- ut_ad(id == block->page.id());
ut_ad(modify_clock == block->modify_clock);
}
+ else if (!block->page.lock.x_lock_try())
+ goto fail;
else
{
- ut_ad(rw_latch == RW_S_LATCH || !block->page.is_io_fixed());
- ut_ad(id == block->page.id());
- ut_ad(!ibuf_inside(mtr) || ibuf_page(id, block->zip_size(), nullptr));
+ ut_ad(!block->page.is_io_fixed());
+ ut_ad(!ibuf_inside(mtr) ||
+ ibuf_page(block->page.id(), block->zip_size(), nullptr));
if (modify_clock != block->modify_clock || block->page.is_freed())
{
- if (rw_latch == RW_S_LATCH)
- block->page.lock.s_unlock();
- else
- block->page.lock.x_unlock();
- return false;
+ block->page.lock.x_unlock();
+ goto fail;
}
- block->page.fix();
- ut_ad(!block->page.is_read_fixed());
buf_page_make_young_if_needed(&block->page);
- mtr->memo_push(block, mtr_memo_type_t(rw_latch));
+ mtr->memo_push(block, MTR_MEMO_PAGE_X_FIX);
}
ut_d(if (!(++buf_dbg_counter % 5771)) buf_pool.validate());
@@ -3375,7 +3389,7 @@ bool buf_page_optimistic_get(ulint rw_latch, buf_block_t *block,
ut_ad(~buf_page_t::LRU_MASK & state);
ut_ad(block->page.frame);
- return true;
+ return block;
}
/** Try to S-latch a page.
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index d4628985..d364be31 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -274,30 +274,22 @@ buf_flush_relocate_on_flush_list(
ut_d(buf_flush_validate_low());
}
-/** Note that a block is no longer dirty, while not removing
-it from buf_pool.flush_list
-@param temporary whether the page belongs to the temporary tablespace
-@param error whether an error may have occurred while writing */
-inline void buf_page_t::write_complete(bool temporary, bool error)
+void buf_page_t::write_complete(bool persistent, bool error, uint32_t state)
{
- ut_ad(temporary == fsp_is_system_temporary(id().space()));
- if (UNIV_UNLIKELY(error));
- else if (temporary)
- {
- ut_ad(oldest_modification() == 2);
- oldest_modification_= 0;
- }
- else
+ ut_ad(!persistent == fsp_is_system_temporary(id().space()));
+ ut_ad(state >= WRITE_FIX);
+
+ if (UNIV_LIKELY(!error))
{
+ ut_d(lsn_t om= oldest_modification());
+ ut_ad(om >= 2);
+ ut_ad(persistent == (om > 2));
/* We use release memory order to guarantee that callers of
oldest_modification_acquire() will observe the block as
being detached from buf_pool.flush_list, after reading the value 0. */
- ut_ad(oldest_modification() > 2);
- oldest_modification_.store(1, std::memory_order_release);
+ oldest_modification_.store(persistent, std::memory_order_release);
}
- const auto s= state();
- ut_ad(s >= WRITE_FIX);
- zip.fix.fetch_sub((s >= WRITE_FIX_REINIT)
+ zip.fix.fetch_sub((state >= WRITE_FIX_REINIT)
? (WRITE_FIX_REINIT - UNFIXED)
: (WRITE_FIX - UNFIXED));
lock.u_unlock(true);
@@ -311,18 +303,10 @@ inline void buf_pool_t::n_flush_inc()
inline void buf_pool_t::n_flush_dec()
{
- mysql_mutex_lock(&flush_list_mutex);
+ mysql_mutex_assert_owner(&flush_list_mutex);
ut_ad(page_cleaner_status >= LRU_FLUSH);
if ((page_cleaner_status-= LRU_FLUSH) < LRU_FLUSH)
pthread_cond_broadcast(&done_flush_LRU);
- mysql_mutex_unlock(&flush_list_mutex);
-}
-
-inline void buf_pool_t::n_flush_dec_holding_mutex()
-{
- mysql_mutex_assert_owner(&flush_list_mutex);
- ut_ad(page_cleaner_status >= LRU_FLUSH);
- page_cleaner_status-= LRU_FLUSH;
}
/** Complete write of a file page from buf_pool.
@@ -352,28 +336,26 @@ void buf_page_write_complete(const IORequest &request, bool error)
mysql_mutex_assert_not_owner(&buf_pool.mutex);
mysql_mutex_assert_not_owner(&buf_pool.flush_list_mutex);
- if (request.is_LRU())
+ const bool persistent= bpage->oldest_modification() != 2;
+
+ if (UNIV_UNLIKELY(!persistent) && UNIV_LIKELY(!error))
{
- const bool temp= bpage->oldest_modification() == 2;
- if (!temp && state < buf_page_t::WRITE_FIX_REINIT &&
- request.node->space->use_doublewrite())
- buf_dblwr.write_completed();
/* We must hold buf_pool.mutex while releasing the block, so that
no other thread can access it before we have freed it. */
mysql_mutex_lock(&buf_pool.mutex);
- bpage->write_complete(temp, error);
- if (!error)
- buf_LRU_free_page(bpage, true);
+ bpage->write_complete(persistent, error, state);
+ buf_LRU_free_page(bpage, true);
mysql_mutex_unlock(&buf_pool.mutex);
-
- buf_pool.n_flush_dec();
}
else
{
+ bpage->write_complete(persistent, error, state);
if (state < buf_page_t::WRITE_FIX_REINIT &&
request.node->space->use_doublewrite())
+ {
+ ut_ad(persistent);
buf_dblwr.write_completed();
- bpage->write_complete(false, error);
+ }
}
}
@@ -740,17 +722,15 @@ ATTRIBUTE_COLD void buf_pool_t::release_freed_page(buf_page_t *bpage) noexcept
}
/** Write a flushable page to a file or free a freeable block.
-@param evict whether to evict the page on write completion
@param space tablespace
@return whether a page write was initiated and buf_pool.mutex released */
-bool buf_page_t::flush(bool evict, fil_space_t *space)
+bool buf_page_t::flush(fil_space_t *space)
{
mysql_mutex_assert_not_owner(&buf_pool.flush_list_mutex);
ut_ad(in_file());
ut_ad(in_LRU_list);
ut_ad((space->purpose == FIL_TYPE_TEMPORARY) ==
(space == fil_system.temp_space));
- ut_ad(evict || space != fil_system.temp_space);
ut_ad(space->referenced());
const auto s= state();
@@ -797,22 +777,11 @@ bool buf_page_t::flush(bool evict, fil_space_t *space)
mysql_mutex_unlock(&buf_pool.mutex);
IORequest::Type type= IORequest::WRITE_ASYNC;
- if (UNIV_UNLIKELY(evict))
- {
- type= IORequest::WRITE_LRU;
- mysql_mutex_lock(&buf_pool.flush_list_mutex);
- buf_pool.n_flush_inc();
- mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- }
/* Apart from the U-lock, this block will also be protected by
is_write_fixed() and oldest_modification()>1.
Thus, it cannot be relocated or removed. */
- DBUG_PRINT("ib_buf", ("%s %u page %u:%u",
- evict ? "LRU" : "flush_list",
- id().space(), id().page_no()));
-
buf_block_t *block= reinterpret_cast<buf_block_t*>(this);
page_t *write_frame= zip.data;
@@ -864,10 +833,7 @@ bool buf_page_t::flush(bool evict, fil_space_t *space)
{
switch (space->chain.start->punch_hole) {
case 1:
- static_assert(IORequest::PUNCH_LRU - IORequest::PUNCH ==
- IORequest::WRITE_LRU - IORequest::WRITE_ASYNC, "");
- type=
- IORequest::Type(type + (IORequest::PUNCH - IORequest::WRITE_ASYNC));
+ type= IORequest::PUNCH;
break;
case 2:
size= orig_size;
@@ -894,10 +860,8 @@ bool buf_page_t::flush(bool evict, fil_space_t *space)
/** Check whether a page can be flushed from the buf_pool.
@param id page identifier
@param fold id.fold()
-@param evict true=buf_pool.LRU; false=buf_pool.flush_list
@return whether the page can be flushed */
-static bool buf_flush_check_neighbor(const page_id_t id, ulint fold,
- bool evict)
+static bool buf_flush_check_neighbor(const page_id_t id, ulint fold)
{
mysql_mutex_assert_owner(&buf_pool.mutex);
ut_ad(fold == id.fold());
@@ -906,26 +870,16 @@ static bool buf_flush_check_neighbor(const page_id_t id, ulint fold,
const buf_page_t *bpage=
buf_pool.page_hash.get(id, buf_pool.page_hash.cell_get(fold));
- if (!bpage || buf_pool.watch_is_sentinel(*bpage))
- return false;
-
- /* We avoid flushing 'non-old' blocks in an eviction flush, because the
- flushed blocks are soon freed */
- if (evict && !bpage->is_old())
- return false;
-
- return bpage->oldest_modification() > 1 && !bpage->is_io_fixed();
+ return bpage && bpage->oldest_modification() > 1 && !bpage->is_io_fixed();
}
/** Check which neighbors of a page can be flushed from the buf_pool.
@param space tablespace
@param id page identifier of a dirty page
@param contiguous whether to consider contiguous areas of pages
-@param evict true=buf_pool.LRU; false=buf_pool.flush_list
@return last page number that can be flushed */
static page_id_t buf_flush_check_neighbors(const fil_space_t &space,
- page_id_t &id, bool contiguous,
- bool evict)
+ page_id_t &id, bool contiguous)
{
ut_ad(id.page_no() < space.size +
(space.physical_size() == 2048 ? 1
@@ -958,7 +912,7 @@ static page_id_t buf_flush_check_neighbors(const fil_space_t &space,
for (page_id_t i= id - 1;; --i)
{
fold--;
- if (!buf_flush_check_neighbor(i, fold, evict))
+ if (!buf_flush_check_neighbor(i, fold))
{
low= i + 1;
break;
@@ -974,7 +928,7 @@ static page_id_t buf_flush_check_neighbors(const fil_space_t &space,
while (++i < high)
{
++fold;
- if (!buf_flush_check_neighbor(i, fold, evict))
+ if (!buf_flush_check_neighbor(i, fold))
break;
}
@@ -1051,14 +1005,13 @@ and also write zeroes or punch the hole for the freed ranges of pages.
@param page_id page identifier
@param bpage buffer page
@param contiguous whether to consider contiguous areas of pages
-@param evict true=buf_pool.LRU; false=buf_pool.flush_list
@param n_flushed number of pages flushed so far in this batch
@param n_to_flush maximum number of pages we are allowed to flush
@return number of pages flushed */
static ulint buf_flush_try_neighbors(fil_space_t *space,
const page_id_t page_id,
buf_page_t *bpage,
- bool contiguous, bool evict,
+ bool contiguous,
ulint n_flushed, ulint n_to_flush)
{
ut_ad(space->id == page_id.space());
@@ -1072,7 +1025,7 @@ static ulint buf_flush_try_neighbors(fil_space_t *space,
ut_ad(lsn >= bpage->oldest_modification());
if (UNIV_UNLIKELY(lsn < space->get_create_lsn()))
{
- ut_a(!bpage->flush(evict, space));
+ ut_a(!bpage->flush(space));
mysql_mutex_unlock(&buf_pool.mutex);
return 0;
}
@@ -1082,7 +1035,7 @@ static ulint buf_flush_try_neighbors(fil_space_t *space,
ulint count= 0;
page_id_t id= page_id;
- page_id_t high= buf_flush_check_neighbors(*space, id, contiguous, evict);
+ page_id_t high= buf_flush_check_neighbors(*space, id, contiguous);
ut_ad(page_id >= id);
ut_ad(page_id < high);
@@ -1119,7 +1072,7 @@ static ulint buf_flush_try_neighbors(fil_space_t *space,
ut_ad(!buf_pool.watch_is_sentinel(*b));
ut_ad(b->oldest_modification() > 1);
flush:
- if (b->flush(evict, space))
+ if (b->flush(space))
{
++count;
continue;
@@ -1127,9 +1080,10 @@ static ulint buf_flush_try_neighbors(fil_space_t *space,
}
/* We avoid flushing 'non-old' blocks in an eviction flush,
because the flushed blocks are soon freed */
- else if ((!evict || b->is_old()) && !buf_pool.watch_is_sentinel(*b) &&
- b->oldest_modification() > 1 && b->lock.u_lock_try(true))
+ else if (b->oldest_modification() > 1 && b->lock.u_lock_try(true))
{
+ /* For the buf_pool.watch[] sentinels, oldest_modification() == 0 */
+ ut_ad(!buf_pool.watch_is_sentinel(*b));
if (b->oldest_modification() < 2)
b->lock.u_unlock(true);
else
@@ -1251,10 +1205,8 @@ static void buf_flush_discard_page(buf_page_t *bpage)
/** Flush dirty blocks from the end buf_pool.LRU,
and move clean blocks to buf_pool.free.
@param max maximum number of blocks to flush
-@param evict whether dirty pages are to be evicted after flushing them
@param n counts of flushed and evicted pages */
-static void buf_flush_LRU_list_batch(ulint max, bool evict,
- flush_counters_t *n)
+static void buf_flush_LRU_list_batch(ulint max, flush_counters_t *n)
{
ulint scanned= 0;
ulint free_limit= srv_LRU_scan_depth;
@@ -1302,8 +1254,12 @@ static void buf_flush_LRU_list_batch(ulint max, bool evict,
if (state < buf_page_t::READ_FIX && bpage->lock.u_lock_try(true))
{
ut_ad(!bpage->is_io_fixed());
- bool do_evict= evict;
switch (bpage->oldest_modification()) {
+ case 2:
+ /* LRU flushing will always evict pages of the temporary tablespace,
+ in buf_page_write_complete(). */
+ ++n->evicted;
+ break;
case 1:
mysql_mutex_lock(&buf_pool.flush_list_mutex);
if (ut_d(lsn_t lsn=) bpage->oldest_modification())
@@ -1316,12 +1272,8 @@ static void buf_flush_LRU_list_batch(ulint max, bool evict,
case 0:
bpage->lock.u_unlock(true);
goto evict;
- case 2:
- /* LRU flushing will always evict pages of the temporary tablespace. */
- do_evict= true;
}
- /* Block is ready for flush. Dispatch an IO request.
- If do_evict, the page may be evicted by buf_page_write_complete(). */
+ /* Block is ready for flush. Dispatch an IO request. */
const page_id_t page_id(bpage->id());
const uint32_t space_id= page_id.space();
if (!space || space->id != space_id)
@@ -1356,6 +1308,7 @@ static void buf_flush_LRU_list_batch(ulint max, bool evict,
no_space:
mysql_mutex_lock(&buf_pool.flush_list_mutex);
buf_flush_discard_page(bpage);
+ ++n->evicted;
continue;
}
@@ -1368,8 +1321,8 @@ static void buf_flush_LRU_list_batch(ulint max, bool evict,
if (neighbors && space->is_rotational())
n->flushed+= buf_flush_try_neighbors(space, page_id, bpage,
neighbors == 1,
- do_evict, n->flushed, max);
- else if (bpage->flush(do_evict, space))
+ n->flushed, max);
+ else if (bpage->flush(space))
++n->flushed;
else
continue;
@@ -1387,24 +1340,25 @@ static void buf_flush_LRU_list_batch(ulint max, bool evict,
space->release();
if (scanned)
+ {
MONITOR_INC_VALUE_CUMULATIVE(MONITOR_LRU_BATCH_SCANNED,
MONITOR_LRU_BATCH_SCANNED_NUM_CALL,
MONITOR_LRU_BATCH_SCANNED_PER_CALL,
scanned);
+ }
}
/** Flush and move pages from LRU or unzip_LRU list to the free list.
Whether LRU or unzip_LRU is used depends on the state of the system.
@param max maximum number of blocks to flush
-@param evict whether dirty pages are to be evicted after flushing them
@param n counts of flushed and evicted pages */
-static void buf_do_LRU_batch(ulint max, bool evict, flush_counters_t *n)
+static void buf_do_LRU_batch(ulint max, flush_counters_t *n)
{
if (buf_LRU_evict_from_unzip_LRU())
buf_free_from_unzip_LRU_list_batch();
n->evicted= 0;
n->flushed= 0;
- buf_flush_LRU_list_batch(max, evict, n);
+ buf_flush_LRU_list_batch(max, n);
mysql_mutex_assert_owner(&buf_pool.mutex);
buf_lru_freed_page_count+= n->evicted;
@@ -1516,8 +1470,8 @@ static ulint buf_do_flush_list_batch(ulint max_n, lsn_t lsn)
{
if (neighbors && space->is_rotational())
count+= buf_flush_try_neighbors(space, page_id, bpage,
- neighbors == 1, false, count, max_n);
- else if (bpage->flush(false, space))
+ neighbors == 1, count, max_n);
+ else if (bpage->flush(space))
++count;
else
continue;
@@ -1536,10 +1490,13 @@ static ulint buf_do_flush_list_batch(ulint max_n, lsn_t lsn)
space->release();
if (scanned)
+ {
MONITOR_INC_VALUE_CUMULATIVE(MONITOR_FLUSH_BATCH_SCANNED,
MONITOR_FLUSH_BATCH_SCANNED_NUM_CALL,
MONITOR_FLUSH_BATCH_SCANNED_PER_CALL,
scanned);
+ }
+
return count;
}
@@ -1683,7 +1640,7 @@ bool buf_flush_list_space(fil_space_t *space, ulint *n_flushed)
goto was_freed;
}
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- if (bpage->flush(false, space))
+ if (bpage->flush(space))
{
++n_flush;
if (!--max_n_flush)
@@ -1741,27 +1698,22 @@ and move clean blocks to buf_pool.free.
The caller must invoke buf_dblwr.flush_buffered_writes()
after releasing buf_pool.mutex.
@param max_n wished maximum mumber of blocks flushed
-@param evict whether to evict pages after flushing
-@return evict ? number of processed pages : number of pages written */
-ulint buf_flush_LRU(ulint max_n, bool evict)
+@return number of pages written */
+static ulint buf_flush_LRU(ulint max_n)
{
mysql_mutex_assert_owner(&buf_pool.mutex);
flush_counters_t n;
- buf_do_LRU_batch(max_n, evict, &n);
+ buf_do_LRU_batch(max_n, &n);
ulint pages= n.flushed;
if (n.evicted)
{
- if (evict)
- pages+= n.evicted;
buf_pool.try_LRU_scan= true;
pthread_cond_broadcast(&buf_pool.done_free);
}
- else if (!pages && !buf_pool.try_LRU_scan &&
- !buf_pool.LRU_warned.test_and_set(std::memory_order_acquire))
- {
+ else if (!pages && !buf_pool.try_LRU_scan)
/* For example, with the minimum innodb_buffer_pool_size=5M and
the default innodb_page_size=16k there are only a little over 316
pages in the buffer pool. The buffer pool can easily be exhausted
@@ -1775,18 +1727,13 @@ ulint buf_flush_LRU(ulint max_n, bool evict)
(3) This thread is the only one that could make progress, but
we fail to do so because all the pages that we scanned are
buffer-fixed or latched by some thread. */
- sql_print_warning("InnoDB: Could not free any blocks in the buffer pool!"
- " %zu blocks are in use and %zu free."
- " Consider increasing innodb_buffer_pool_size.",
- UT_LIST_GET_LEN(buf_pool.LRU),
- UT_LIST_GET_LEN(buf_pool.free));
- }
+ buf_pool.LRU_warn();
return pages;
}
#ifdef HAVE_PMEM
-# include <libpmem.h>
+# include "cache.h"
#endif
/** Write checkpoint information to the log header and release mutex.
@@ -1900,8 +1847,7 @@ inline void log_t::write_checkpoint(lsn_t end_lsn) noexcept
ut_ad(!log.is_opened());
bool success;
log.m_file=
- os_file_create_func(get_log_file_path().c_str(),
- OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT,
+ os_file_create_func(get_log_file_path().c_str(), OS_FILE_OPEN,
OS_FILE_NORMAL, OS_LOG_FILE, false, &success);
ut_a(success);
ut_a(log.is_opened());
@@ -1916,7 +1862,7 @@ inline void log_t::write_checkpoint(lsn_t end_lsn) noexcept
{
my_munmap(buf, file_size);
buf= resize_buf;
- buf_free= START_OFFSET + (get_lsn() - resizing);
+ set_buf_free(START_OFFSET + (get_lsn() - resizing));
}
else
#endif
@@ -1958,9 +1904,7 @@ inline void log_t::write_checkpoint(lsn_t end_lsn) noexcept
static bool log_checkpoint_low(lsn_t oldest_lsn, lsn_t end_lsn)
{
ut_ad(!srv_read_only_mode);
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
ut_ad(oldest_lsn <= end_lsn);
ut_ad(end_lsn == log_sys.get_lsn());
@@ -2327,7 +2271,7 @@ func_exit:
sum_pages += last_pages_in;
- const ulint time_elapsed = std::max<ulint>(curr_time - prev_time, 1);
+ const ulint time_elapsed = std::max<ulint>(ulint(curr_time - prev_time), 1);
/* We update our variables every innodb_flushing_avg_loops
iterations to smooth out transition in workload. */
@@ -2541,26 +2485,16 @@ static void buf_flush_page_cleaner()
{
buf_pool.page_cleaner_set_idle(false);
buf_pool.n_flush_inc();
- /* Remove clean blocks from buf_pool.flush_list before the LRU scan. */
- for (buf_page_t *p= UT_LIST_GET_FIRST(buf_pool.flush_list); p; )
- {
- const lsn_t lsn{p->oldest_modification()};
- ut_ad(lsn > 2 || lsn == 1);
- buf_page_t *n= UT_LIST_GET_NEXT(list, p);
- if (lsn <= 1)
- buf_pool.delete_from_flush_list(p);
- p= n;
- }
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
n= srv_max_io_capacity;
mysql_mutex_lock(&buf_pool.mutex);
LRU_flush:
- n= buf_flush_LRU(n, false);
+ n= buf_flush_LRU(n);
mysql_mutex_unlock(&buf_pool.mutex);
last_pages+= n;
check_oldest_and_set_idle:
mysql_mutex_lock(&buf_pool.flush_list_mutex);
- buf_pool.n_flush_dec_holding_mutex();
+ buf_pool.n_flush_dec();
oldest_lsn= buf_pool.get_oldest_modification(0);
if (!oldest_lsn)
goto fully_unemployed;
@@ -2693,6 +2627,16 @@ static void buf_flush_page_cleaner()
#endif
}
+ATTRIBUTE_COLD void buf_pool_t::LRU_warn()
+{
+ mysql_mutex_assert_owner(&mutex);
+ if (!LRU_warned.test_and_set(std::memory_order_acquire))
+ sql_print_warning("InnoDB: Could not free any blocks in the buffer pool!"
+ " %zu blocks are in use and %zu free."
+ " Consider increasing innodb_buffer_pool_size.",
+ UT_LIST_GET_LEN(LRU), UT_LIST_GET_LEN(free));
+}
+
/** Initialize page_cleaner. */
ATTRIBUTE_COLD void buf_flush_page_cleaner_init()
{
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index 2a8d6ff2..33d01b6b 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -385,142 +385,76 @@ we put it to free list to be used.
@return the free control block, in state BUF_BLOCK_MEMORY */
buf_block_t *buf_LRU_get_free_block(bool have_mutex)
{
- ulint n_iterations = 0;
- ulint flush_failures = 0;
- MONITOR_INC(MONITOR_LRU_GET_FREE_SEARCH);
- if (have_mutex) {
- mysql_mutex_assert_owner(&buf_pool.mutex);
- goto got_mutex;
- }
- DBUG_EXECUTE_IF("recv_ran_out_of_buffer",
- if (recv_recovery_is_on()
- && recv_sys.apply_log_recs) {
- mysql_mutex_lock(&buf_pool.mutex);
- goto flush_lru;
- });
-get_mutex:
- mysql_mutex_lock(&buf_pool.mutex);
-got_mutex:
- buf_LRU_check_size_of_non_data_objects();
- buf_block_t* block;
+ bool waited= false;
+ MONITOR_INC(MONITOR_LRU_GET_FREE_SEARCH);
+ if (!have_mutex)
+ mysql_mutex_lock(&buf_pool.mutex);
+
+ buf_LRU_check_size_of_non_data_objects();
- IF_DBUG(static bool buf_lru_free_blocks_error_printed,);
- DBUG_EXECUTE_IF("ib_lru_force_no_free_page",
- if (!buf_lru_free_blocks_error_printed) {
- n_iterations = 21;
- goto not_found;});
+ buf_block_t *block;
retry:
- /* If there is a block in the free list, take it */
- if ((block = buf_LRU_get_free_only()) != nullptr) {
+ /* If there is a block in the free list, take it */
+ block= buf_LRU_get_free_only();
+ if (block)
+ {
got_block:
- const ulint LRU_size = UT_LIST_GET_LEN(buf_pool.LRU);
- const ulint available = UT_LIST_GET_LEN(buf_pool.free);
- const ulint scan_depth = srv_LRU_scan_depth / 2;
- ut_ad(LRU_size <= BUF_LRU_MIN_LEN || available >= scan_depth
- || buf_pool.need_LRU_eviction());
-
- if (!have_mutex) {
- mysql_mutex_unlock(&buf_pool.mutex);
- }
-
- if (UNIV_UNLIKELY(available < scan_depth)
- && LRU_size > BUF_LRU_MIN_LEN) {
- mysql_mutex_lock(&buf_pool.flush_list_mutex);
- if (!buf_pool.page_cleaner_active()) {
- buf_pool.page_cleaner_wakeup(true);
- }
- mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- }
-
- block->page.zip.clear();
- return block;
- }
+ const ulint LRU_size= UT_LIST_GET_LEN(buf_pool.LRU);
+ const ulint available= UT_LIST_GET_LEN(buf_pool.free);
+ const ulint scan_depth= srv_LRU_scan_depth / 2;
+ ut_ad(LRU_size <= BUF_LRU_MIN_LEN ||
+ available >= scan_depth || buf_pool.need_LRU_eviction());
- MONITOR_INC( MONITOR_LRU_GET_FREE_LOOPS );
- if (n_iterations || buf_pool.try_LRU_scan) {
- /* If no block was in the free list, search from the
- end of the LRU list and try to free a block there.
- If we are doing for the first time we'll scan only
- tail of the LRU list otherwise we scan the whole LRU
- list. */
- if (buf_LRU_scan_and_free_block(n_iterations
- ? ULINT_UNDEFINED : 100)) {
- goto retry;
- }
+ if (UNIV_UNLIKELY(available < scan_depth) && LRU_size > BUF_LRU_MIN_LEN)
+ {
+ mysql_mutex_lock(&buf_pool.flush_list_mutex);
+ if (!buf_pool.page_cleaner_active())
+ buf_pool.page_cleaner_wakeup(true);
+ mysql_mutex_unlock(&buf_pool.flush_list_mutex);
+ }
- /* Tell other threads that there is no point
- in scanning the LRU list. */
- buf_pool.try_LRU_scan = false;
- }
+ if (!have_mutex)
+ mysql_mutex_unlock(&buf_pool.mutex);
- for (;;) {
- if ((block = buf_LRU_get_free_only()) != nullptr) {
- goto got_block;
- }
- const bool wake = buf_pool.need_LRU_eviction();
- mysql_mutex_unlock(&buf_pool.mutex);
- mysql_mutex_lock(&buf_pool.flush_list_mutex);
- const auto n_flush = buf_pool.n_flush();
- if (wake && !buf_pool.page_cleaner_active()) {
- buf_pool.page_cleaner_wakeup(true);
- }
- mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- mysql_mutex_lock(&buf_pool.mutex);
- if (!n_flush) {
- goto not_found;
- }
- if (!buf_pool.try_LRU_scan) {
- my_cond_wait(&buf_pool.done_free,
- &buf_pool.mutex.m_mutex);
- }
- }
-
-not_found:
- if (n_iterations > 1) {
- MONITOR_INC( MONITOR_LRU_GET_FREE_WAITS );
- }
+ block->page.zip.clear();
+ return block;
+ }
- if (n_iterations == 21
- && srv_buf_pool_old_size == srv_buf_pool_size
- && buf_pool.LRU_warned.test_and_set(std::memory_order_acquire)) {
- IF_DBUG(buf_lru_free_blocks_error_printed = true,);
- mysql_mutex_unlock(&buf_pool.mutex);
- ib::warn() << "Difficult to find free blocks in the buffer pool"
- " (" << n_iterations << " search iterations)! "
- << flush_failures << " failed attempts to"
- " flush a page!"
- " Consider increasing innodb_buffer_pool_size."
- " Pending flushes (fsync): "
- << fil_n_pending_tablespace_flushes
- << ". " << os_n_file_reads << " OS file reads, "
- << os_n_file_writes << " OS file writes, "
- << os_n_fsyncs
- << " OS fsyncs.";
- mysql_mutex_lock(&buf_pool.mutex);
- }
+ MONITOR_INC(MONITOR_LRU_GET_FREE_LOOPS);
+ if (waited || buf_pool.try_LRU_scan)
+ {
+ /* If no block was in the free list, search from the end of the
+ LRU list and try to free a block there. If we are doing for the
+ first time we'll scan only tail of the LRU list otherwise we scan
+ the whole LRU list. */
+ if (buf_LRU_scan_and_free_block(waited ? ULINT_UNDEFINED : 100))
+ goto retry;
+
+ /* Tell other threads that there is no point in scanning the LRU
+ list. */
+ buf_pool.try_LRU_scan= false;
+ }
- /* No free block was found: try to flush the LRU list.
- The freed blocks will be up for grabs for all threads.
+ waited= true;
- TODO: A more elegant way would have been to return one freed
- up block to the caller here but the code that deals with
- removing the block from buf_pool.page_hash and buf_pool.LRU is fairly
- involved (particularly in case of ROW_FORMAT=COMPRESSED pages). We
- can do that in a separate patch sometime in future. */
-#ifndef DBUG_OFF
-flush_lru:
-#endif
- if (!buf_flush_LRU(innodb_lru_flush_size, true)) {
- MONITOR_INC(MONITOR_LRU_SINGLE_FLUSH_FAILURE_COUNT);
- ++flush_failures;
- }
+ while (!(block= buf_LRU_get_free_only()))
+ {
+ buf_pool.stat.LRU_waits++;
+
+ timespec abstime;
+ set_timespec(abstime, 1);
+
+ mysql_mutex_lock(&buf_pool.flush_list_mutex);
+ if (!buf_pool.page_cleaner_active())
+ buf_pool.page_cleaner_wakeup(true);
+ mysql_mutex_unlock(&buf_pool.flush_list_mutex);
+ if (my_cond_timedwait(&buf_pool.done_free, &buf_pool.mutex.m_mutex,
+ &abstime))
+ buf_pool.LRU_warn();
+ }
- n_iterations++;
- buf_pool.stat.LRU_waits++;
- mysql_mutex_unlock(&buf_pool.mutex);
- buf_dblwr.flush_buffered_writes();
- goto get_mutex;
+ goto got_block;
}
/** Move the LRU_old pointer so that the length of the old blocks list
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc
index 9041c6a2..76a5e710 100644
--- a/storage/innobase/buf/buf0rea.cc
+++ b/storage/innobase/buf/buf0rea.cc
@@ -575,7 +575,7 @@ fail:
hash_lock.lock_shared();
const buf_page_t* bpage= buf_pool.page_hash.get(i, chain);
- if (!bpage)
+ if (!bpage || buf_pool.watch_is_sentinel(*bpage))
{
hash_lock.unlock_shared();
if (i == page_id)
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 5d3cab17..a1295c33 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -657,47 +657,22 @@ dict_table_t::parse_name<>(char(&)[NAME_LEN + 1], char(&)[NAME_LEN + 1],
/** Acquire MDL shared for the table name.
@tparam trylock whether to use non-blocking operation
@param[in,out] table table object
-@param[in,out] thd background thread
-@param[out] mdl mdl ticket
+@param[in,out] mdl_context MDL context
+@param[out] mdl MDL ticket
@param[in] table_op operation to perform when opening
@return table object after locking MDL shared
@retval nullptr if the table is not readable, or if trylock && MDL blocked */
template<bool trylock>
+__attribute__((nonnull, warn_unused_result))
dict_table_t*
dict_acquire_mdl_shared(dict_table_t *table,
- THD *thd,
- MDL_ticket **mdl,
+ MDL_context *mdl_context, MDL_ticket **mdl,
dict_table_op_t table_op)
{
- if (!table || !mdl)
- return table;
-
- MDL_context *mdl_context= static_cast<MDL_context*>(thd_mdl_context(thd));
- size_t db_len;
- dict_table_t *not_found= nullptr;
-
- if (trylock)
- {
- dict_sys.freeze(SRW_LOCK_CALL);
- db_len= dict_get_db_name_len(table->name.m_name);
- dict_sys.unfreeze();
- }
- else
- {
- ut_ad(dict_sys.frozen_not_locked());
- db_len= dict_get_db_name_len(table->name.m_name);
- }
-
- if (db_len == 0)
- return table; /* InnoDB system tables are not covered by MDL */
-
- if (!mdl_context)
- return nullptr;
-
table_id_t table_id= table->id;
char db_buf[NAME_LEN + 1], db_buf1[NAME_LEN + 1];
char tbl_buf[NAME_LEN + 1], tbl_buf1[NAME_LEN + 1];
- size_t tbl_len;
+ size_t db_len, tbl_len;
bool unaccessible= false;
if (!table->parse_name<!trylock>(db_buf, tbl_buf, &db_len, &tbl_len))
@@ -768,7 +743,6 @@ retry:
if (!table || !table->is_accessible())
{
- table= nullptr;
return_without_mdl:
if (trylock)
dict_sys.unfreeze();
@@ -777,7 +751,7 @@ return_without_mdl:
mdl_context->release_lock(*mdl);
*mdl= nullptr;
}
- return not_found;
+ return nullptr;
}
size_t db1_len, tbl1_len;
@@ -815,6 +789,50 @@ return_without_mdl:
}
template dict_table_t* dict_acquire_mdl_shared<false>
+(dict_table_t*,MDL_context*,MDL_ticket**,dict_table_op_t);
+
+/** Acquire MDL shared for the table name.
+@tparam trylock whether to use non-blocking operation
+@param[in,out] table table object
+@param[in,out] thd background thread
+@param[out] mdl mdl ticket
+@param[in] table_op operation to perform when opening
+@return table object after locking MDL shared
+@retval nullptr if the table is not readable, or if trylock && MDL blocked */
+template<bool trylock>
+dict_table_t*
+dict_acquire_mdl_shared(dict_table_t *table,
+ THD *thd,
+ MDL_ticket **mdl,
+ dict_table_op_t table_op)
+{
+ if (!table || !mdl)
+ return table;
+
+ MDL_context *mdl_context= static_cast<MDL_context*>(thd_mdl_context(thd));
+ size_t db_len;
+
+ if (trylock)
+ {
+ dict_sys.freeze(SRW_LOCK_CALL);
+ db_len= dict_get_db_name_len(table->name.m_name);
+ dict_sys.unfreeze();
+ }
+ else
+ {
+ ut_ad(dict_sys.frozen_not_locked());
+ db_len= dict_get_db_name_len(table->name.m_name);
+ }
+
+ if (db_len == 0)
+ return table; /* InnoDB system tables are not covered by MDL */
+
+ return mdl_context
+ ? dict_acquire_mdl_shared<trylock>(table, mdl_context, mdl, table_op)
+ : nullptr;
+}
+
+template dict_table_t* dict_acquire_mdl_shared<false>
(dict_table_t*,THD*,MDL_ticket**,dict_table_op_t);
template dict_table_t* dict_acquire_mdl_shared<true>
(dict_table_t*,THD*,MDL_ticket**,dict_table_op_t);
@@ -960,9 +978,6 @@ void dict_sys_t::lock_wait(SRW_LOCK_ARGS(const char *file, unsigned line))
{
latch.wr_lock(SRW_LOCK_ARGS(file, line));
latch_ex_wait_start.store(0, std::memory_order_relaxed);
- ut_ad(!latch_readers);
- ut_ad(!latch_ex);
- ut_d(latch_ex= pthread_self());
return;
}
@@ -978,35 +993,36 @@ void dict_sys_t::lock_wait(SRW_LOCK_ARGS(const char *file, unsigned line))
ib::warn() << "A long wait (" << waited
<< " seconds) was observed for dict_sys.latch";
latch.wr_lock(SRW_LOCK_ARGS(file, line));
- ut_ad(!latch_readers);
- ut_ad(!latch_ex);
- ut_d(latch_ex= pthread_self());
}
#ifdef UNIV_PFS_RWLOCK
ATTRIBUTE_NOINLINE void dict_sys_t::unlock()
{
- ut_ad(latch_ex == pthread_self());
- ut_ad(!latch_readers);
- ut_d(latch_ex= 0);
latch.wr_unlock();
}
ATTRIBUTE_NOINLINE void dict_sys_t::freeze(const char *file, unsigned line)
{
latch.rd_lock(file, line);
- ut_ad(!latch_ex);
- ut_d(latch_readers++);
}
ATTRIBUTE_NOINLINE void dict_sys_t::unfreeze()
{
- ut_ad(!latch_ex);
- ut_ad(latch_readers--);
latch.rd_unlock();
}
#endif /* UNIV_PFS_RWLOCK */
+/** Report an error about failing to open a table.
+@param name table name */
+static void dict_table_open_failed(const table_name_t &name)
+{
+ my_printf_error(ER_TABLE_CORRUPT,
+ "Table %`.*s.%`s is corrupted."
+ " Please drop the table and recreate.",
+ MYF(ME_ERROR_LOG),
+ int(name.dblen()), name.m_name, name.basename());
+}
+
/**********************************************************************//**
Returns a table object and increments its open handle count.
NOTE! This is a high-level function to be used mainly from outside the
@@ -1039,18 +1055,20 @@ dict_table_open_on_name(
if (!(ignore_err & ~DICT_ERR_IGNORE_FK_NOKEY) &&
!table->is_readable() && table->corrupted)
{
- ulint algo = table->space->get_compression_algo();
- if (algo <= PAGE_ALGORITHM_LAST && !fil_comp_algo_loaded(algo)) {
- my_printf_error(ER_PROVIDER_NOT_LOADED,
- "Table %s is compressed with %s, which is not currently loaded. "
- "Please load the %s provider plugin to open the table",
- MYF(ME_ERROR_LOG), table->name,
- page_compression_algorithms[algo], page_compression_algorithms[algo]);
- } else {
- my_printf_error(ER_TABLE_CORRUPT,
- "Table %s is corrupted. Please drop the table and recreate.",
- MYF(ME_ERROR_LOG), table->name);
- }
+ ulint algo= table->space->get_compression_algo();
+ if (algo <= PAGE_ALGORITHM_LAST && !fil_comp_algo_loaded(algo))
+ my_printf_error(ER_PROVIDER_NOT_LOADED,
+ "Table %`.*s.%`s is compressed with %s,"
+ " which is not currently loaded. "
+ "Please load the %s provider plugin"
+ " to open the table",
+ MYF(ME_ERROR_LOG),
+ int(table->name.dblen()), table->name.m_name,
+ table->name.basename(),
+ page_compression_algorithms[algo],
+ page_compression_algorithms[algo]);
+ else
+ dict_table_open_failed(table->name);
dict_sys.unfreeze();
DBUG_RETURN(nullptr);
}
@@ -1070,8 +1088,7 @@ dict_table_open_on_name(
if (!(ignore_err & ~DICT_ERR_IGNORE_FK_NOKEY) &&
!table->is_readable() && table->corrupted)
{
- ib::error() << "Table " << table->name
- << " is corrupted. Please drop the table and recreate.";
+ dict_table_open_failed(table->name);
if (!dict_locked)
dict_sys.unlock();
DBUG_RETURN(nullptr);
@@ -1992,7 +2009,6 @@ dict_index_add_to_cache(
new_index->n_fields = new_index->n_def;
new_index->trx_id = index->trx_id;
new_index->set_committed(index->is_committed());
- new_index->nulls_equal = index->nulls_equal;
n_ord = new_index->n_uniq;
/* Flag the ordering columns and also set column max_prefix */
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index f11187b9..f647278d 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -3867,6 +3867,10 @@ release_and_exit:
goto release_and_exit;
}
+#ifdef ENABLED_DEBUG_SYNC
+ DEBUG_SYNC(thd, "dict_stats_mdl_acquired");
+#endif /* ENABLED_DEBUG_SYNC */
+
trx = trx_create();
trx_start_internal_read_only(trx);
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 97cb3994..d4e6c6f3 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -2290,7 +2290,7 @@ void fil_space_crypt_close_tablespace(const fil_space_t *space)
<< space->chain.start->name << " ("
<< space->id << ") active threads "
<< crypt_data->rotate_state.active_threads
- << "flushing="
+ << " flushing="
<< crypt_data->rotate_state.flushing << ".";
last = now;
}
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index bd0ace7c..e8d23657 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -342,7 +342,7 @@ static bool fil_node_open_file_low(fil_node_t *node)
ut_ad(node->space->is_closing());
mysql_mutex_assert_owner(&fil_system.mutex);
static_assert(((UNIV_ZIP_SIZE_MIN >> 1) << 3) == 4096, "compatibility");
-#if defined _WIN32 || defined HAVE_FCNTL_DIRECT
+#if defined _WIN32 || defined O_DIRECT
ulint type;
switch (FSP_FLAGS_GET_ZIP_SSIZE(node->space->flags)) {
case 1:
@@ -361,8 +361,7 @@ static bool fil_node_open_file_low(fil_node_t *node)
bool success;
node->handle= os_file_create(innodb_data_file_key, node->name,
node->is_raw_disk
- ? OS_FILE_OPEN_RAW | OS_FILE_ON_ERROR_NO_EXIT
- : OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT,
+ ? OS_FILE_OPEN_RAW : OS_FILE_OPEN,
OS_FILE_AIO, type,
srv_read_only_mode, &success);
@@ -928,9 +927,7 @@ bool fil_space_free(uint32_t id, bool x_latched)
log_sys.latch.wr_unlock();
} else {
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
if (space->max_lsn) {
ut_d(space->max_lsn = 0);
fil_system.named_spaces.remove(*space);
@@ -1691,30 +1688,27 @@ pfs_os_file_t fil_delete_tablespace(uint32_t id)
/*******************************************************************//**
Allocates and builds a file name from a path, a table or tablespace name
and a suffix. The string must be freed by caller with ut_free().
-@param[in] path NULL or the directory path or the full path and filename.
+@param[in] path nullptr or the directory path or the full path and filename
@param[in] name {} if path is full, or Table/Tablespace name
-@param[in] ext the file extension to use
-@param[in] trim_name true if the last name on the path should be trimmed.
+@param[in] extension the file extension to use
+@param[in] trim_name true if the last name on the path should be trimmed
@return own: file name */
-char* fil_make_filepath(const char *path, const fil_space_t::name_type &name,
- ib_extention ext, bool trim_name)
+char* fil_make_filepath_low(const char *path,
+ const fil_space_t::name_type &name,
+ ib_extention extension, bool trim_name)
{
/* The path may contain the basename of the file, if so we do not
need the name. If the path is NULL, we can use the default path,
but there needs to be a name. */
ut_ad(path || name.data());
- /* If we are going to strip a name off the path, there better be a
- path and a new name to put back on. */
- ut_ad(!trim_name || (path && name.data()));
-
if (path == NULL) {
path = fil_path_to_mysql_datadir;
}
ulint len = 0; /* current length */
ulint path_len = strlen(path);
- const char* suffix = dot_ext[ext];
+ const char* suffix = dot_ext[extension];
ulint suffix_len = strlen(suffix);
ulint full_len = path_len + 1 + name.size() + suffix_len + 1;
@@ -1797,8 +1791,16 @@ char* fil_make_filepath(const char *path, const fil_space_t::name_type &name,
char *fil_make_filepath(const char* path, const table_name_t name,
ib_extention suffix, bool strip_name)
{
- return fil_make_filepath(path, {name.m_name, strlen(name.m_name)},
- suffix, strip_name);
+ return fil_make_filepath_low(path, {name.m_name, strlen(name.m_name)},
+ suffix, strip_name);
+}
+
+/** Wrapper function over fil_make_filepath_low() to build directory name.
+@param path the directory path or the full path and filename
+@return own: directory name */
+static inline char *fil_make_dirpath(const char *path)
+{
+ return fil_make_filepath_low(path, fil_space_t::name_type{}, NO_EXT, true);
}
dberr_t fil_space_t::rename(const char *path, bool log, bool replace)
@@ -1839,14 +1841,32 @@ dberr_t fil_space_t::rename(const char *path, bool log, bool replace)
return DB_TABLESPACE_NOT_FOUND;
}
- exists= false;
- if (replace);
- else if (!os_file_status(path, &exists, &ftype) || exists)
+ if (!replace)
{
- sql_print_error("InnoDB: Cannot rename '%s' to '%s'"
- " because the target file exists.",
- old_path, path);
- return DB_TABLESPACE_EXISTS;
+ char *schema_path= fil_make_dirpath(path);
+ if (!schema_path)
+ return DB_ERROR;
+
+ exists= false;
+ bool schema_fail= os_file_status(schema_path, &exists, &ftype) && !exists;
+ ut_free(schema_path);
+
+ if (schema_fail)
+ {
+ sql_print_error("InnoDB: Cannot rename '%s' to '%s'"
+ " because the target schema directory doesn't exist.",
+ old_path, path);
+ return DB_ERROR;
+ }
+
+ exists= false;
+ if (!os_file_status(path, &exists, &ftype) || exists)
+ {
+ sql_print_error("InnoDB: Cannot rename '%s' to '%s'"
+ " because the target file exists.",
+ old_path, path);
+ return DB_TABLESPACE_EXISTS;
+ }
}
mtr_t mtr;
@@ -1906,7 +1926,7 @@ fil_ibd_create(
static_assert(((UNIV_ZIP_SIZE_MIN >> 1) << 3) == 4096,
"compatibility");
-#if defined _WIN32 || defined HAVE_FCNTL_DIRECT
+#if defined _WIN32 || defined O_DIRECT
ulint type;
switch (FSP_FLAGS_GET_ZIP_SSIZE(flags)) {
case 1:
@@ -1922,7 +1942,7 @@ fil_ibd_create(
file = os_file_create(
innodb_data_file_key, path,
- OS_FILE_CREATE | OS_FILE_ON_ERROR_NO_EXIT,
+ OS_FILE_CREATE,
OS_FILE_AIO, type, srv_read_only_mode, &success);
if (!success) {
@@ -3037,9 +3057,7 @@ void
fil_names_dirty(
fil_space_t* space)
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
ut_ad(recv_recovery_is_on());
ut_ad(log_sys.get_lsn() != 0);
ut_ad(space->max_lsn == 0);
@@ -3053,9 +3071,7 @@ fil_names_dirty(
tablespace was modified for the first time since fil_names_clear(). */
ATTRIBUTE_NOINLINE ATTRIBUTE_COLD void mtr_t::name_write()
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
ut_d(fil_space_validate_for_mtr_commit(m_user_space));
ut_ad(!m_user_space->max_lsn);
m_user_space->max_lsn= log_sys.get_lsn();
@@ -3079,9 +3095,7 @@ ATTRIBUTE_COLD lsn_t fil_names_clear(lsn_t lsn)
{
mtr_t mtr;
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
ut_ad(lsn);
ut_ad(log_sys.is_latest());
diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc
index 1c20efcd..62f90f53 100644
--- a/storage/innobase/fsp/fsp0file.cc
+++ b/storage/innobase/fsp/fsp0file.cc
@@ -502,9 +502,10 @@ err_exit:
return DB_SUCCESS;
}
- sql_print_error("InnoDB: %s in datafile: %s, Space ID: "
- UINT32PF ", " "Flags: " UINT32PF,
- error_txt, m_filepath, m_space_id, m_flags);
+ sql_print_information(
+ "InnoDB: %s in datafile: %s, Space ID: " UINT32PF
+ ", " "Flags: " UINT32PF,
+ error_txt, m_filepath, m_space_id, m_flags);
m_is_valid = false;
return DB_CORRUPTION;
}
diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc
index 87672a82..5f34fe93 100644
--- a/storage/innobase/fsp/fsp0fsp.cc
+++ b/storage/innobase/fsp/fsp0fsp.cc
@@ -259,6 +259,7 @@ inline void xdes_init(const buf_block_t &block, xdes_t *descr, mtr_t *mtr)
}
/** Mark a page used in an extent descriptor.
+@param[in] space tablespace
@param[in,out] seg_inode segment inode
@param[in,out] iblock segment inode page
@param[in] page page number
@@ -268,8 +269,9 @@ inline void xdes_init(const buf_block_t &block, xdes_t *descr, mtr_t *mtr)
@return error code */
static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
-fseg_mark_page_used(fseg_inode_t *seg_inode, buf_block_t *iblock,
- ulint page, xdes_t *descr, buf_block_t *xdes, mtr_t *mtr)
+fseg_mark_page_used(const fil_space_t *space,
+ fseg_inode_t *seg_inode, buf_block_t *iblock,
+ uint32_t page, xdes_t *descr, buf_block_t *xdes, mtr_t *mtr)
{
ut_ad(fil_page_get_type(iblock->page.frame) == FIL_PAGE_INODE);
ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE));
@@ -278,15 +280,16 @@ fseg_mark_page_used(fseg_inode_t *seg_inode, buf_block_t *iblock,
const uint16_t xoffset= uint16_t(descr - xdes->page.frame + XDES_FLST_NODE);
const uint16_t ioffset= uint16_t(seg_inode - iblock->page.frame);
+ const uint32_t limit= space->free_limit;
if (!xdes_get_n_used(descr))
{
/* We move the extent from the free list to the NOT_FULL list */
if (dberr_t err= flst_remove(iblock, uint16_t(FSEG_FREE + ioffset),
- xdes, xoffset, mtr))
+ xdes, xoffset, limit, mtr))
return err;
if (dberr_t err= flst_add_last(iblock, uint16_t(FSEG_NOT_FULL + ioffset),
- xdes, xoffset, mtr))
+ xdes, xoffset, limit, mtr))
return err;
}
@@ -303,10 +306,10 @@ fseg_mark_page_used(fseg_inode_t *seg_inode, buf_block_t *iblock,
{
/* We move the extent from the NOT_FULL list to the FULL list */
if (dberr_t err= flst_remove(iblock, uint16_t(FSEG_NOT_FULL + ioffset),
- xdes, xoffset, mtr))
+ xdes, xoffset, limit, mtr))
return err;
if (dberr_t err= flst_add_last(iblock, uint16_t(FSEG_FULL + ioffset),
- xdes, xoffset, mtr))
+ xdes, xoffset, limit, mtr))
return err;
mtr->write<4>(*iblock, seg_inode + FSEG_NOT_FULL_N_USED,
not_full_n_used - FSP_EXTENT_SIZE);
@@ -884,7 +887,7 @@ fsp_fill_free_list(
xdes_set_free<false>(*xdes, descr, FSP_IBUF_BITMAP_OFFSET, mtr);
xdes_set_state(*xdes, descr, XDES_FREE_FRAG, mtr);
if (dberr_t err= flst_add_last(header, FSP_HEADER_OFFSET + FSP_FREE_FRAG,
- xdes, xoffset, mtr))
+ xdes, xoffset, space->free_limit, mtr))
return err;
byte *n_used= FSP_HEADER_OFFSET + FSP_FRAG_N_USED + header->page.frame;
mtr->write<4>(*header, n_used, 2U + mach_read_from_4(n_used));
@@ -893,7 +896,7 @@ fsp_fill_free_list(
{
if (dberr_t err=
flst_add_last(header, FSP_HEADER_OFFSET + FSP_FREE,
- xdes, xoffset, mtr))
+ xdes, xoffset, space->free_limit, mtr))
return err;
count++;
}
@@ -944,7 +947,11 @@ corrupted:
first = flst_get_first(FSP_HEADER_OFFSET + FSP_FREE
+ header->page.frame);
- if (first.page == FIL_NULL) {
+ if (first.page >= space->free_limit) {
+ if (first.page != FIL_NULL) {
+ goto flst_corrupted;
+ }
+
*err = fsp_fill_free_list(false, space, header, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
goto corrupted;
@@ -955,6 +962,17 @@ corrupted:
if (first.page == FIL_NULL) {
return nullptr; /* No free extents left */
}
+ if (first.page >= space->free_limit) {
+ goto flst_corrupted;
+ }
+ }
+
+ if (first.boffset < FSP_HEADER_OFFSET + FSP_HEADER_SIZE
+ || first.boffset >= space->physical_size()
+ - (XDES_SIZE + FIL_PAGE_DATA_END)) {
+ flst_corrupted:
+ *err = DB_CORRUPTION;
+ goto corrupted;
}
descr = xdes_lst_get_descriptor(*space, first, mtr,
@@ -967,7 +985,7 @@ corrupted:
*err = flst_remove(header, FSP_HEADER_OFFSET + FSP_FREE, desc_block,
static_cast<uint16_t>(descr - desc_block->page.frame
+ XDES_FLST_NODE),
- mtr);
+ space->free_limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
return nullptr;
}
@@ -984,11 +1002,12 @@ MY_ATTRIBUTE((nonnull, warn_unused_result))
@param[in,out] xdes extent descriptor page
@param[in,out] descr extent descriptor
@param[in] bit slot to allocate in the extent
+@param[in] space tablespace
@param[in,out] mtr mini-transaction
@return error code */
static dberr_t
fsp_alloc_from_free_frag(buf_block_t *header, buf_block_t *xdes, xdes_t *descr,
- ulint bit, mtr_t *mtr)
+ uint32_t bit, fil_space_t *space, mtr_t *mtr)
{
if (UNIV_UNLIKELY(xdes_get_state(descr) != XDES_FREE_FRAG ||
!xdes_is_free(descr, bit)))
@@ -1001,14 +1020,15 @@ fsp_alloc_from_free_frag(buf_block_t *header, buf_block_t *xdes, xdes_t *descr,
if (xdes_is_full(descr))
{
+ const uint32_t limit= space->free_limit;
/* The fragment is full: move it to another list */
const uint16_t xoffset=
static_cast<uint16_t>(descr - xdes->page.frame + XDES_FLST_NODE);
if (dberr_t err= flst_remove(header, FSP_HEADER_OFFSET + FSP_FREE_FRAG,
- xdes, xoffset, mtr))
+ xdes, xoffset, limit, mtr))
return err;
if (dberr_t err= flst_add_last(header, FSP_HEADER_OFFSET + FSP_FULL_FRAG,
- xdes, xoffset, mtr))
+ xdes, xoffset, limit, mtr))
return err;
xdes_set_state(*xdes, descr, XDES_FULL_FRAG, mtr);
n_used-= FSP_EXTENT_SIZE;
@@ -1070,8 +1090,11 @@ buf_block_t *fsp_alloc_free_page(fil_space_t *space, uint32_t hint,
/* Else take the first extent in free_frag list */
fil_addr_t first = flst_get_first(FSP_HEADER_OFFSET + FSP_FREE_FRAG +
block->page.frame);
- if (first.page == FIL_NULL)
+ if (first.page >= space->free_limit)
{
+ if (first.page != FIL_NULL)
+ goto flst_corrupted;
+
/* There are no partially full fragments: allocate a free extent
and add it to the FREE_FRAG list. NOTE that the allocation may
have as a side-effect that an extent containing a descriptor
@@ -1082,13 +1105,23 @@ buf_block_t *fsp_alloc_free_page(fil_space_t *space, uint32_t hint,
return nullptr;
*err= flst_add_last(block, FSP_HEADER_OFFSET + FSP_FREE_FRAG, xdes,
static_cast<uint16_t>(descr - xdes->page.frame +
- XDES_FLST_NODE), mtr);
+ XDES_FLST_NODE),
+ space->free_limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS))
return nullptr;
xdes_set_state(*xdes, descr, XDES_FREE_FRAG, mtr);
}
else
{
+ if (first.boffset < FSP_HEADER_OFFSET + FSP_HEADER_SIZE ||
+ first.boffset >= space->physical_size() -
+ (XDES_SIZE + FIL_PAGE_DATA_END))
+ {
+ flst_corrupted:
+ *err= DB_CORRUPTION;
+ goto err_exit;
+ }
+
descr= xdes_lst_get_descriptor(*space, first, mtr, &xdes, err);
if (!descr)
return nullptr;
@@ -1135,7 +1168,7 @@ buf_block_t *fsp_alloc_free_page(fil_space_t *space, uint32_t hint,
}
}
- *err= fsp_alloc_from_free_frag(block, xdes, descr, free, mtr);
+ *err= fsp_alloc_from_free_frag(block, xdes, descr, free, space, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS))
goto corrupted;
return fsp_page_create(space, page_no, init_mtr);
@@ -1174,7 +1207,8 @@ static dberr_t fsp_free_extent(fil_space_t* space, uint32_t offset,
space->free_len++;
return flst_add_last(block, FSP_HEADER_OFFSET + FSP_FREE,
xdes, static_cast<uint16_t>(descr - xdes->page.frame +
- XDES_FLST_NODE), mtr);
+ XDES_FLST_NODE),
+ space->free_limit, mtr);
}
MY_ATTRIBUTE((nonnull))
@@ -1228,16 +1262,17 @@ static dberr_t fsp_free_page(fil_space_t *space, uint32_t offset, mtr_t *mtr)
const uint16_t xoffset= static_cast<uint16_t>(descr - xdes->page.frame
+ XDES_FLST_NODE);
+ const uint32_t limit = space->free_limit;
if (state == XDES_FULL_FRAG) {
/* The fragment was full: move it to another list */
err = flst_remove(header, FSP_HEADER_OFFSET + FSP_FULL_FRAG,
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
err = flst_add_last(header, FSP_HEADER_OFFSET + FSP_FREE_FRAG,
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
@@ -1259,7 +1294,7 @@ static dberr_t fsp_free_page(fil_space_t *space, uint32_t offset, mtr_t *mtr)
if (!xdes_get_n_used(descr)) {
/* The extent has become free: move it to another list */
err = flst_remove(header, FSP_HEADER_OFFSET + FSP_FREE_FRAG,
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (err == DB_SUCCESS) {
err = fsp_free_extent(space, offset, mtr);
}
@@ -1353,7 +1388,7 @@ static dberr_t fsp_alloc_seg_inode_page(fil_space_t *space,
#endif
return flst_add_last(header, FSP_HEADER_OFFSET + FSP_SEG_INODES_FREE,
- block, FSEG_INODE_PAGE_NODE, mtr);
+ block, FSEG_INODE_PAGE_NODE, space->free_limit, mtr);
}
MY_ATTRIBUTE((nonnull, warn_unused_result))
@@ -1409,12 +1444,13 @@ fsp_alloc_seg_inode(fil_space_t *space, buf_block_t *header,
{
/* There are no other unused headers left on the page: move it
to another list */
+ const uint32_t limit= space->free_limit;
*err= flst_remove(header, FSP_HEADER_OFFSET + FSP_SEG_INODES_FREE,
- block, FSEG_INODE_PAGE_NODE, mtr);
+ block, FSEG_INODE_PAGE_NODE, limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS))
return nullptr;
*err= flst_add_last(header, FSP_HEADER_OFFSET + FSP_SEG_INODES_FULL,
- block, FSEG_INODE_PAGE_NODE, mtr);
+ block, FSEG_INODE_PAGE_NODE, limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS))
return nullptr;
}
@@ -1447,16 +1483,17 @@ static void fsp_free_seg_inode(fil_space_t *space, fseg_inode_t *inode,
}
const ulint physical_size= space->physical_size();
+ const uint32_t limit= space->free_limit;
if (ULINT_UNDEFINED == fsp_seg_inode_page_find_free(iblock->page.frame, 0,
physical_size))
{
/* Move the page to another list */
if (flst_remove(header, FSP_HEADER_OFFSET + FSP_SEG_INODES_FULL,
- iblock, FSEG_INODE_PAGE_NODE, mtr) != DB_SUCCESS)
+ iblock, FSEG_INODE_PAGE_NODE, limit, mtr) != DB_SUCCESS)
return;
if (flst_add_last(header, FSP_HEADER_OFFSET + FSP_SEG_INODES_FREE,
- iblock, FSEG_INODE_PAGE_NODE, mtr) != DB_SUCCESS)
+ iblock, FSEG_INODE_PAGE_NODE, limit, mtr) != DB_SUCCESS)
return;
}
@@ -1468,7 +1505,7 @@ static void fsp_free_seg_inode(fil_space_t *space, fseg_inode_t *inode,
/* There are no other used headers left on the page: free it */
if (flst_remove(header, FSP_HEADER_OFFSET + FSP_SEG_INODES_FREE,
- iblock, FSEG_INODE_PAGE_NODE, mtr) == DB_SUCCESS)
+ iblock, FSEG_INODE_PAGE_NODE, limit, mtr) == DB_SUCCESS)
fsp_free_page(space, iblock->page.id().page_no(), mtr);
}
@@ -1841,7 +1878,8 @@ static dberr_t fseg_fill_free_list(const fseg_inode_t *inode,
static_cast<uint16_t>(inode - iblock->page.frame +
FSEG_FREE), xdes,
static_cast<uint16_t>(descr - xdes->page.frame +
- XDES_FLST_NODE), mtr))
+ XDES_FLST_NODE),
+ space->free_limit, mtr))
return err;
xdes_set_state(*xdes, descr, XDES_FSEG, mtr);
mtr->memcpy(*xdes, descr + XDES_ID, inode + FSEG_ID, 8);
@@ -1876,11 +1914,25 @@ fseg_alloc_free_extent(
ut_ad(!memcmp(FSEG_MAGIC_N_BYTES, FSEG_MAGIC_N + inode, 4));
ut_d(space->modify_check(*mtr));
+ if (UNIV_UNLIKELY(page_offset(inode) < FSEG_ARR_OFFSET))
+ {
+ corrupted:
+ *err= DB_CORRUPTION;
+ space->set_corrupted();
+ return nullptr;
+ }
+
if (flst_get_len(inode + FSEG_FREE))
{
+ const fil_addr_t first= flst_get_first(inode + FSEG_FREE);
+ if (first.page >= space->free_limit ||
+ first.boffset < FSP_HEADER_OFFSET + FSP_HEADER_SIZE ||
+ first.boffset >= space->physical_size() -
+ (XDES_SIZE + FIL_PAGE_DATA_END))
+ goto corrupted;
+
/* Segment free list is not empty, allocate from it */
- return xdes_lst_get_descriptor(*space, flst_get_first(inode + FSEG_FREE),
- mtr, xdes, err);
+ return xdes_lst_get_descriptor(*space, first, mtr, xdes, err);
}
xdes_t* descr= fsp_alloc_free_extent(space, 0, xdes, mtr, err);
@@ -1892,7 +1944,8 @@ fseg_alloc_free_extent(
static_cast<uint16_t>(inode - iblock->page.frame +
FSEG_FREE), *xdes,
static_cast<uint16_t>(descr - (*xdes)->page.frame +
- XDES_FLST_NODE), mtr);
+ XDES_FLST_NODE),
+ space->free_limit, mtr);
if (UNIV_LIKELY(*err != DB_SUCCESS))
return nullptr;
/* Try to fill the segment free list */
@@ -1978,29 +2031,42 @@ fseg_alloc_free_page_low(
}
}
- /* In the big if-else below we look for ret_page and ret_descr */
- /*-------------------------------------------------------------*/
- if ((xdes_get_state(descr) == XDES_FSEG)
- && mach_read_from_8(descr + XDES_ID) == seg_id
- && xdes_is_free(descr, hint % FSP_EXTENT_SIZE)) {
+ const uint32_t extent_size = FSP_EXTENT_SIZE;
+ ret_descr = descr;
+ /* Try to get the page from extent which belongs to segment */
+ if (xdes_get_state(descr) == XDES_FSEG
+ && mach_read_from_8(descr + XDES_ID) == seg_id) {
+ /* Get the page from the segment extent */
+ if (xdes_is_free(descr, hint % extent_size)) {
take_hinted_page:
- /* 1. We can take the hinted page
- =================================*/
- ret_descr = descr;
- ret_page = hint;
- /* Skip the check for extending the tablespace. If the
- page hint were not within the size of the tablespace,
- we would have got (descr == NULL) above and reset the hint. */
- goto got_hinted_page;
- /*-----------------------------------------------------------*/
- } else if (xdes_get_state(descr) == XDES_FREE
- && reserved - used < reserved / FSEG_FILLFACTOR
- && used >= FSEG_FRAG_LIMIT) {
-
- /* 2. We allocate the free extent from space and can take
- =========================================================
- the hinted page
- ===============*/
+ ret_page = hint;
+ goto got_hinted_page;
+ } else if (!xdes_is_full(descr)) {
+ /* Take the page from the same extent as the
+ hinted page (and the extent already belongs to
+ the segment) */
+ ret_page = xdes_find_free(descr, hint % extent_size);
+ if (ret_page == FIL_NULL) {
+ ut_ad(!has_done_reservation);
+ return nullptr;
+ }
+ ret_page += xdes_get_offset(ret_descr);
+ goto alloc_done;
+ }
+ }
+
+ /** If the number of unused but reserved pages in a segment is
+ esser than minimum value of 1/8 of reserved pages or
+ 4 * FSP_EXTENT_SIZE and there are at least half of extent size
+ used pages, then we allow a new empty extent to be added to
+ the segment in fseg_alloc_free_page_general(). Otherwise, we use
+ unused pages of the segment. */
+ if (used < extent_size / 2 ||
+ reserved - used >= reserved / 8 ||
+ reserved - used >= extent_size * 4) {
+ } else if (xdes_get_state(descr) == XDES_FREE) {
+ /* Allocate the free extent from space and can
+ take the hinted page */
ret_descr = fsp_alloc_free_extent(space, hint, &xdes,
mtr, err);
@@ -2020,61 +2086,42 @@ take_hinted_page:
+ FSEG_FREE), xdes,
static_cast<uint16_t>(ret_descr
- xdes->page.frame
- + XDES_FLST_NODE), mtr);
+ + XDES_FLST_NODE),
+ space->free_limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
return nullptr;
}
/* Try to fill the segment free list */
*err = fseg_fill_free_list(seg_inode, iblock, space,
- hint + FSP_EXTENT_SIZE, mtr);
+ hint + extent_size, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
return nullptr;
}
goto take_hinted_page;
- /*-----------------------------------------------------------*/
- } else if ((direction != FSP_NO_DIR)
- && ((reserved - used) < reserved / FSEG_FILLFACTOR)
- && (used >= FSEG_FRAG_LIMIT)
- && (ret_descr = fseg_alloc_free_extent(seg_inode, iblock,
- &xdes, space,
- mtr, err))) {
- /* 3. We take any free extent (which was already assigned above
- ===============================================================
- in the if-condition to ret_descr) and take the lowest or
- ========================================================
- highest page in it, depending on the direction
- ==============================================*/
+ } else if (direction != FSP_NO_DIR) {
+
+ ret_descr = fseg_alloc_free_extent(seg_inode, iblock,
+ &xdes, space, mtr, err);
+
+ if (!ret_descr) {
+ ut_ad(*err != DB_SUCCESS);
+ return nullptr;
+ }
+ /* Take any free extent (which was already assigned
+ above in the if-condition to ret_descr) and take the
+ lowest or highest page in it, depending on the direction */
ret_page = xdes_get_offset(ret_descr);
if (direction == FSP_DOWN) {
- ret_page += FSP_EXTENT_SIZE - 1;
- }
- ut_ad(!has_done_reservation || ret_page != FIL_NULL);
- /*-----------------------------------------------------------*/
- } else if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
- return nullptr;
- } else if ((xdes_get_state(descr) == XDES_FSEG)
- && mach_read_from_8(descr + XDES_ID) == seg_id
- && (!xdes_is_full(descr))) {
-
- /* 4. We can take the page from the same extent as the
- ======================================================
- hinted page (and the extent already belongs to the
- ==================================================
- segment)
- ========*/
- ret_descr = descr;
- ret_page = xdes_find_free(ret_descr, hint % FSP_EXTENT_SIZE);
- if (ret_page == FIL_NULL) {
- ut_ad(!has_done_reservation);
- } else {
- ret_page += xdes_get_offset(ret_descr);
+ ret_page += extent_size - 1;
}
- /*-----------------------------------------------------------*/
- } else if (reserved - used > 0) {
- /* 5. We take any unused page from the segment
- ==============================================*/
+ goto alloc_done;
+ }
+
+ /* Try to take individual page from the segment or tablespace */
+ if (reserved - used > 0) {
+ /* Take any unused page from the segment */
fil_addr_t first;
if (flst_get_len(seg_inode + FSEG_NOT_FULL) > 0) {
@@ -2083,7 +2130,15 @@ take_hinted_page:
first = flst_get_first(seg_inode + FSEG_FREE);
} else {
ut_ad(!has_done_reservation);
- return(NULL);
+ return nullptr;
+ }
+
+ if (first.page >= space->free_limit
+ || first.boffset < FSP_HEADER_OFFSET + FSP_HEADER_SIZE
+ || first.boffset >= space->physical_size()
+ - (XDES_SIZE + FIL_PAGE_DATA_END)) {
+ *err= DB_CORRUPTION;
+ return nullptr;
}
ret_descr = xdes_lst_get_descriptor(*space, first, mtr, &xdes);
@@ -2097,10 +2152,9 @@ take_hinted_page:
} else {
ret_page += xdes_get_offset(ret_descr);
}
- /*-----------------------------------------------------------*/
- } else if (used < FSEG_FRAG_LIMIT) {
- /* 6. We allocate an individual page from the space
- ===================================================*/
+
+ } else if (used < extent_size / 2) {
+ /* Allocate an individual page from the space */
buf_block_t* block = fsp_alloc_free_page(
space, hint, mtr, init_mtr, err);
@@ -2123,13 +2177,11 @@ take_hinted_page:
/* fsp_alloc_free_page() invoked fsp_init_file_page()
already. */
return(block);
- /*-----------------------------------------------------------*/
} else {
- /* 7. We allocate a new extent and take its first page
- ======================================================*/
+ /* In worst case, try to allocate a new extent
+ and take its first page */
ret_descr = fseg_alloc_free_extent(seg_inode, iblock, &xdes,
space, mtr, err);
-
if (!ret_descr) {
ut_ad(!has_done_reservation || *err);
return nullptr;
@@ -2142,14 +2194,13 @@ take_hinted_page:
/* Page could not be allocated */
ut_ad(!has_done_reservation);
- return(NULL);
+ return nullptr;
}
-
+alloc_done:
if (space->size <= ret_page && !is_predefined_tablespace(space->id)) {
/* It must be that we are extending a single-table
tablespace whose size is still < 64 pages */
-
- if (ret_page >= FSP_EXTENT_SIZE) {
+ if (ret_page >= extent_size) {
sql_print_error("InnoDB: Trying to extend '%s'"
" by single page(s) though the"
" space size " UINT32PF "."
@@ -2157,33 +2208,34 @@ take_hinted_page:
space->chain.start->name, space->size,
ret_page);
ut_ad(!has_done_reservation);
- return(NULL);
+ return nullptr;
}
if (!fsp_try_extend_data_file_with_pages(
space, ret_page, header, mtr)) {
/* No disk space left */
ut_ad(!has_done_reservation);
- return(NULL);
+ return nullptr;
}
}
-got_hinted_page:
- /* ret_descr == NULL if the block was allocated from free_frag
- (XDES_FREE_FRAG) */
+ /* Skip the check for extending the tablespace.
+ If the page hint were not within the size of the tablespace,
+ descr set to nullptr above and reset the hint and the block
+ was allocated from free_frag (XDES_FREE_FRAG) */
if (ret_descr != NULL) {
+got_hinted_page:
/* At this point we know the extent and the page offset.
The extent is still in the appropriate list (FSEG_NOT_FULL
or FSEG_FREE), and the page is not yet marked as used. */
-
ut_d(buf_block_t* xxdes);
ut_ad(xdes_get_descriptor(space, ret_page, mtr, err, &xxdes)
== ret_descr);
ut_ad(xdes == xxdes);
- ut_ad(xdes_is_free(ret_descr, ret_page % FSP_EXTENT_SIZE));
+ ut_ad(xdes_is_free(ret_descr, ret_page % extent_size));
- *err = fseg_mark_page_used(seg_inode, iblock, ret_page,
- ret_descr, xdes, mtr);
+ *err = fseg_mark_page_used(space, seg_inode, iblock, ret_page,
+ ret_descr, xdes, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
return nullptr;
}
@@ -2524,18 +2576,19 @@ corrupted:
const uint16_t xoffset= uint16_t(descr - xdes->page.frame
+ XDES_FLST_NODE);
const uint16_t ioffset= uint16_t(seg_inode - iblock->page.frame);
+ const uint32_t limit = space->free_limit;
if (xdes_is_full(descr)) {
/* The fragment is full: move it to another list */
err = flst_remove(iblock,
static_cast<uint16_t>(FSEG_FULL + ioffset),
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
err = flst_add_last(iblock, static_cast<uint16_t>(FSEG_NOT_FULL
+ ioffset),
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
@@ -2553,7 +2606,7 @@ corrupted:
if (!xdes_get_n_used(descr)) {
err = flst_remove(iblock, static_cast<uint16_t>(FSEG_NOT_FULL
+ ioffset),
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
@@ -2698,11 +2751,12 @@ fseg_free_extent(
#endif /* BTR_CUR_HASH_ADAPT */
uint16_t lst;
+ uint32_t limit = space->free_limit;
if (xdes_is_full(descr)) {
lst = static_cast<uint16_t>(FSEG_FULL + ioffset);
remove:
- err = flst_remove(iblock, lst, xdes, xoffset, mtr);
+ err = flst_remove(iblock, lst, xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
@@ -2712,7 +2766,7 @@ remove:
} else {
err = flst_remove(
iblock, static_cast<uint16_t>(FSEG_NOT_FULL + ioffset),
- xdes, xoffset, mtr);
+ xdes, xoffset, limit, mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
return err;
}
@@ -2962,7 +3016,10 @@ fseg_get_first_extent(
return nullptr;
}
- if (first.page == FIL_NULL)
+ if (first.page >= space->free_limit ||
+ first.boffset < FSP_HEADER_OFFSET + FSP_HEADER_SIZE ||
+ first.boffset >= space->physical_size() -
+ (XDES_SIZE + FIL_PAGE_DATA_END))
goto corrupted;
return xdes_lst_get_descriptor(*space, first, mtr, nullptr, err);
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 0775d939..4d9a1d3a 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -2187,6 +2187,22 @@ fts_trx_row_get_new_state(
return(result);
}
+/** Compare two doubly indirected pointers */
+static int fts_ptr2_cmp(const void *p1, const void *p2)
+{
+ const void *a= **static_cast<const void*const*const*>(p1);
+ const void *b= **static_cast<const void*const*const*>(p2);
+ return b > a ? -1 : a > b;
+}
+
+/** Compare a singly indirected pointer to a doubly indirected one */
+static int fts_ptr1_ptr2_cmp(const void *p1, const void *p2)
+{
+ const void *a= *static_cast<const void*const*>(p1);
+ const void *b= **static_cast<const void*const*const*>(p2);
+ return b > a ? -1 : a > b;
+}
+
/******************************************************************//**
Create a savepoint instance.
@return savepoint instance */
@@ -2209,8 +2225,8 @@ fts_savepoint_create(
savepoint->name = mem_heap_strdup(heap, name);
}
- savepoint->tables = rbt_create(
- sizeof(fts_trx_table_t*), fts_trx_table_cmp);
+ static_assert(!offsetof(fts_trx_table_t, table), "ABI");
+ savepoint->tables = rbt_create(sizeof(fts_trx_table_t*), fts_ptr2_cmp);
return(savepoint);
}
@@ -2258,6 +2274,19 @@ fts_trx_create(
return(ftt);
}
+/** Compare two doc_id */
+static inline int doc_id_cmp(doc_id_t a, doc_id_t b)
+{
+ return b > a ? -1 : a > b;
+}
+
+/** Compare two DOC_ID. */
+int fts_doc_id_cmp(const void *p1, const void *p2)
+{
+ return doc_id_cmp(*static_cast<const doc_id_t*>(p1),
+ *static_cast<const doc_id_t*>(p2));
+}
+
/******************************************************************//**
Create an FTS trx table.
@return FTS trx table */
@@ -2276,7 +2305,8 @@ fts_trx_table_create(
ftt->table = table;
ftt->fts_trx = fts_trx;
- ftt->rows = rbt_create(sizeof(fts_trx_row_t), fts_trx_row_doc_id_cmp);
+ static_assert(!offsetof(fts_trx_row_t, doc_id), "ABI");
+ ftt->rows = rbt_create(sizeof(fts_trx_row_t), fts_doc_id_cmp);
return(ftt);
}
@@ -2300,7 +2330,8 @@ fts_trx_table_clone(
ftt->table = ftt_src->table;
ftt->fts_trx = ftt_src->fts_trx;
- ftt->rows = rbt_create(sizeof(fts_trx_row_t), fts_trx_row_doc_id_cmp);
+ static_assert(!offsetof(fts_trx_row_t, doc_id), "ABI");
+ ftt->rows = rbt_create(sizeof(fts_trx_row_t), fts_doc_id_cmp);
/* Copy the rb tree values to the new savepoint. */
rbt_merge_uniq(ftt->rows, ftt_src->rows);
@@ -2325,13 +2356,9 @@ fts_trx_init(
{
fts_trx_table_t* ftt;
ib_rbt_bound_t parent;
- ib_rbt_t* tables;
- fts_savepoint_t* savepoint;
-
- savepoint = static_cast<fts_savepoint_t*>(ib_vector_last(savepoints));
-
- tables = savepoint->tables;
- rbt_search_cmp(tables, &parent, &table->id, fts_trx_table_id_cmp, NULL);
+ ib_rbt_t* tables = static_cast<fts_savepoint_t*>(
+ ib_vector_last(savepoints))->tables;
+ rbt_search_cmp(tables, &parent, &table, fts_ptr1_ptr2_cmp, nullptr);
if (parent.result == 0) {
fts_trx_table_t** fttp;
@@ -3860,6 +3887,13 @@ fts_write_node(
return(error);
}
+/** Sort an array of doc_id */
+void fts_doc_ids_sort(ib_vector_t *doc_ids)
+{
+ doc_id_t *const data= reinterpret_cast<doc_id_t*>(doc_ids->data);
+ std::sort(data, data + doc_ids->used);
+}
+
/*********************************************************************//**
Add rows to the DELETED_CACHE table.
@return DB_SUCCESS if all went well else error code*/
@@ -3881,7 +3915,7 @@ fts_sync_add_deleted_cache(
ut_a(ib_vector_size(doc_ids) > 0);
- ib_vector_sort(doc_ids, fts_doc_id_cmp);
+ fts_doc_ids_sort(doc_ids);
info = pars_info_create();
@@ -5575,8 +5609,8 @@ fts_savepoint_rollback_last_stmt(
l_ftt = rbt_value(fts_trx_table_t*, node);
rbt_search_cmp(
- s_tables, &parent, &(*l_ftt)->table->id,
- fts_trx_table_id_cmp, NULL);
+ s_tables, &parent, &(*l_ftt)->table,
+ fts_ptr1_ptr2_cmp, nullptr);
if (parent.result == 0) {
fts_trx_table_t** s_ftt;
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc
index fe31767d..30889e59 100644
--- a/storage/innobase/fts/fts0opt.cc
+++ b/storage/innobase/fts/fts0opt.cc
@@ -1016,7 +1016,7 @@ fts_table_fetch_doc_ids(
que_graph_free(graph);
if (error == DB_SUCCESS) {
- ib_vector_sort(doc_ids->doc_ids, fts_doc_id_cmp);
+ fts_doc_ids_sort(doc_ids->doc_ids);
}
if (alloc_bk_trx) {
diff --git a/storage/innobase/fts/fts0que.cc b/storage/innobase/fts/fts0que.cc
index 9c92a117..b8f22076 100644
--- a/storage/innobase/fts/fts0que.cc
+++ b/storage/innobase/fts/fts0que.cc
@@ -385,22 +385,6 @@ fts_query_terms_in_document(
ulint* total); /*!< out: total words in document */
#endif
-/********************************************************************
-Compare two fts_doc_freq_t doc_ids.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_freq_doc_id_cmp(
-/*================*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
-{
- const fts_doc_freq_t* fq1 = (const fts_doc_freq_t*) p1;
- const fts_doc_freq_t* fq2 = (const fts_doc_freq_t*) p2;
-
- return((int) (fq1->doc_id - fq2->doc_id));
-}
-
#if 0
/*******************************************************************//**
Print the table used for calculating LCS. */
@@ -506,14 +490,11 @@ fts_query_compare_rank(
if (r2->rank < r1->rank) {
return(-1);
} else if (r2->rank == r1->rank) {
-
if (r1->doc_id < r2->doc_id) {
- return(1);
- } else if (r1->doc_id > r2->doc_id) {
- return(1);
+ return -1;
}
- return(0);
+ return r1->doc_id > r2->doc_id;
}
return(1);
@@ -674,8 +655,9 @@ fts_query_add_word_freq(
word_freq.doc_count = 0;
+ static_assert(!offsetof(fts_doc_freq_t, doc_id), "ABI");
word_freq.doc_freqs = rbt_create(
- sizeof(fts_doc_freq_t), fts_freq_doc_id_cmp);
+ sizeof(fts_doc_freq_t), fts_doc_id_cmp);
parent.last = rbt_add_node(
query->word_freqs, &parent, &word_freq);
@@ -1253,8 +1235,9 @@ fts_query_intersect(
/* Create the rb tree that will hold the doc ids of
the intersection. */
+ static_assert(!offsetof(fts_ranking_t, doc_id), "ABI");
query->intersection = rbt_create(
- sizeof(fts_ranking_t), fts_ranking_doc_id_cmp);
+ sizeof(fts_ranking_t), fts_doc_id_cmp);
query->total_size += SIZEOF_RBT_CREATE;
@@ -1540,8 +1523,9 @@ fts_merge_doc_ids(
to create a new result set for fts_query_intersect(). */
if (query->oper == FTS_EXIST) {
+ static_assert(!offsetof(fts_ranking_t, doc_id), "ABI");
query->intersection = rbt_create(
- sizeof(fts_ranking_t), fts_ranking_doc_id_cmp);
+ sizeof(fts_ranking_t), fts_doc_id_cmp);
query->total_size += SIZEOF_RBT_CREATE;
}
@@ -3012,8 +2996,9 @@ fts_query_visitor(
if (query->oper == FTS_EXIST) {
ut_ad(query->intersection == NULL);
+ static_assert(!offsetof(fts_ranking_t, doc_id), "ABI");
query->intersection = rbt_create(
- sizeof(fts_ranking_t), fts_ranking_doc_id_cmp);
+ sizeof(fts_ranking_t), fts_doc_id_cmp);
query->total_size += SIZEOF_RBT_CREATE;
}
@@ -3123,8 +3108,8 @@ fts_ast_visit_sub_exp(
/* Create new result set to store the sub-expression result. We
will merge this result set with the parent after processing. */
- query->doc_ids = rbt_create(sizeof(fts_ranking_t),
- fts_ranking_doc_id_cmp);
+ static_assert(!offsetof(fts_ranking_t, doc_id), "ABI");
+ query->doc_ids = rbt_create(sizeof(fts_ranking_t), fts_doc_id_cmp);
query->total_size += SIZEOF_RBT_CREATE;
@@ -3661,8 +3646,9 @@ fts_query_prepare_result(
result = static_cast<fts_result_t*>(
ut_zalloc_nokey(sizeof(*result)));
+ static_assert(!offsetof(fts_ranking_t, doc_id), "ABI");
result->rankings_by_id = rbt_create(
- sizeof(fts_ranking_t), fts_ranking_doc_id_cmp);
+ sizeof(fts_ranking_t), fts_doc_id_cmp);
query->total_size += sizeof(fts_result_t) + SIZEOF_RBT_CREATE;
result_is_null = true;
@@ -4038,7 +4024,7 @@ fts_query(
DEBUG_SYNC_C("fts_deleted_doc_ids_append");
/* Sort the vector so that we can do a binary search over the ids. */
- ib_vector_sort(query.deleted->doc_ids, fts_doc_id_cmp);
+ fts_doc_ids_sort(query.deleted->doc_ids);
/* Convert the query string to lower case before parsing. We own
the ut_malloc'ed result and so remember to free it before return. */
@@ -4065,8 +4051,9 @@ fts_query(
query.heap = mem_heap_create(128);
/* Create the rb tree for the doc id (current) set. */
+ static_assert(!offsetof(fts_ranking_t, doc_id), "ABI");
query.doc_ids = rbt_create(
- sizeof(fts_ranking_t), fts_ranking_doc_id_cmp);
+ sizeof(fts_ranking_t), fts_doc_id_cmp);
query.parser = index->parser;
query.total_size += SIZEOF_RBT_CREATE;
diff --git a/storage/innobase/fut/fut0lst.cc b/storage/innobase/fut/fut0lst.cc
index a52027f2..48e2fbe3 100644
--- a/storage/innobase/fut/fut0lst.cc
+++ b/storage/innobase/fut/fut0lst.cc
@@ -113,17 +113,18 @@ static void flst_add_to_empty(buf_block_t *base, uint16_t boffset,
}
/** Insert a node after another one.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] cur insert position block
-@param[in] coffset byte offset of the insert position
-@param[in,out] add block to be added
-@param[in] aoffset byte offset of the block to be added
-@param[in,out] mtr mini-transaction */
+@param base base node block
+@param boffset byte offset of the base node
+@param cur insert position block
+@param coffset byte offset of the insert position
+@param add block to be added
+@param aoffset byte offset of the block to be added
+@param limit fil_space_t::free_limit
+@param mtr mini-transaction */
static dberr_t flst_insert_after(buf_block_t *base, uint16_t boffset,
buf_block_t *cur, uint16_t coffset,
buf_block_t *add, uint16_t aoffset,
- mtr_t *mtr)
+ uint32_t limit, mtr_t *mtr)
{
ut_ad(base != cur || boffset != coffset);
ut_ad(base != add || boffset != aoffset);
@@ -139,6 +140,15 @@ static dberr_t flst_insert_after(buf_block_t *base, uint16_t boffset,
MTR_MEMO_PAGE_SX_FIX));
fil_addr_t next_addr= flst_get_next_addr(cur->page.frame + coffset);
+ if (next_addr.page >= limit)
+ {
+ if (UNIV_UNLIKELY(next_addr.page != FIL_NULL))
+ return DB_CORRUPTION;
+ }
+ else if (UNIV_UNLIKELY(next_addr.boffset < FIL_PAGE_DATA ||
+ next_addr.boffset >= base->physical_size() -
+ FIL_PAGE_DATA_END))
+ return DB_CORRUPTION;
flst_write_addr(*add, add->page.frame + aoffset + FLST_PREV,
cur->page.id().page_no(), coffset, mtr);
@@ -167,18 +177,19 @@ static dberr_t flst_insert_after(buf_block_t *base, uint16_t boffset,
}
/** Insert a node before another one.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] cur insert position block
-@param[in] coffset byte offset of the insert position
-@param[in,out] add block to be added
-@param[in] aoffset byte offset of the block to be added
-@param[in,out] mtr mini-transaction
+@param base base node block
+@param boffset byte offset of the base node
+@param cur insert position block
+@param coffset byte offset of the insert position
+@param add block to be added
+@param aoffset byte offset of the block to be added
+@param limit fil_space_t::free_limit
+@param mtr mini-transaction
@return error code */
static dberr_t flst_insert_before(buf_block_t *base, uint16_t boffset,
buf_block_t *cur, uint16_t coffset,
buf_block_t *add, uint16_t aoffset,
- mtr_t *mtr)
+ uint32_t limit, mtr_t *mtr)
{
ut_ad(base != cur || boffset != coffset);
ut_ad(base != add || boffset != aoffset);
@@ -194,6 +205,15 @@ static dberr_t flst_insert_before(buf_block_t *base, uint16_t boffset,
MTR_MEMO_PAGE_SX_FIX));
fil_addr_t prev_addr= flst_get_prev_addr(cur->page.frame + coffset);
+ if (prev_addr.page >= limit)
+ {
+ if (UNIV_UNLIKELY(prev_addr.page != FIL_NULL))
+ return DB_CORRUPTION;
+ }
+ else if (UNIV_UNLIKELY(prev_addr.boffset < FIL_PAGE_DATA ||
+ prev_addr.boffset >= base->physical_size() -
+ FIL_PAGE_DATA_END))
+ return DB_CORRUPTION;
flst_write_addr(*add, add->page.frame + aoffset + FLST_PREV,
prev_addr.page, prev_addr.boffset, mtr);
@@ -234,14 +254,9 @@ void flst_init(const buf_block_t& block, byte *base, mtr_t *mtr)
flst_zero_both(block, base + FLST_FIRST, mtr);
}
-/** Append a file list node to a list.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] add block to be added
-@param[in] aoffset byte offset of the node to be added
-@param[in,outr] mtr mini-transaction */
dberr_t flst_add_last(buf_block_t *base, uint16_t boffset,
- buf_block_t *add, uint16_t aoffset, mtr_t *mtr)
+ buf_block_t *add, uint16_t aoffset,
+ uint32_t limit, mtr_t *mtr)
{
ut_ad(base != add || boffset != aoffset);
ut_ad(boffset < base->physical_size());
@@ -258,6 +273,13 @@ dberr_t flst_add_last(buf_block_t *base, uint16_t boffset,
else
{
fil_addr_t addr= flst_get_last(base->page.frame + boffset);
+ if (UNIV_UNLIKELY(addr.page >= limit))
+ return DB_CORRUPTION;
+ else if (UNIV_UNLIKELY(addr.boffset < FIL_PAGE_DATA ||
+ addr.boffset >= base->physical_size() -
+ FIL_PAGE_DATA_END))
+ return DB_CORRUPTION;
+
buf_block_t *cur= add;
dberr_t err;
if (addr.page != add->page.id().page_no() &&
@@ -266,19 +288,13 @@ dberr_t flst_add_last(buf_block_t *base, uint16_t boffset,
BUF_GET_POSSIBLY_FREED, mtr, &err)))
return err;
return flst_insert_after(base, boffset, cur, addr.boffset,
- add, aoffset, mtr);
+ add, aoffset, limit, mtr);
}
}
-/** Prepend a file list node to a list.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] add block to be added
-@param[in] aoffset byte offset of the node to be added
-@param[in,out] mtr mini-transaction
-@return error code */
dberr_t flst_add_first(buf_block_t *base, uint16_t boffset,
- buf_block_t *add, uint16_t aoffset, mtr_t *mtr)
+ buf_block_t *add, uint16_t aoffset,
+ uint32_t limit, mtr_t *mtr)
{
ut_ad(base != add || boffset != aoffset);
ut_ad(boffset < base->physical_size());
@@ -296,6 +312,12 @@ dberr_t flst_add_first(buf_block_t *base, uint16_t boffset,
else
{
fil_addr_t addr= flst_get_first(base->page.frame + boffset);
+ if (UNIV_UNLIKELY(addr.page >= limit))
+ return DB_CORRUPTION;
+ else if (UNIV_UNLIKELY(addr.boffset < FIL_PAGE_DATA ||
+ addr.boffset >= base->physical_size() -
+ FIL_PAGE_DATA_END))
+ return DB_CORRUPTION;
buf_block_t *cur= add;
dberr_t err;
if (addr.page != add->page.id().page_no() &&
@@ -304,19 +326,13 @@ dberr_t flst_add_first(buf_block_t *base, uint16_t boffset,
BUF_GET_POSSIBLY_FREED, mtr, &err)))
return err;
return flst_insert_before(base, boffset, cur, addr.boffset,
- add, aoffset, mtr);
+ add, aoffset, limit, mtr);
}
}
-/** Remove a file list node.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] cur block to be removed
-@param[in] coffset byte offset of the current record to be removed
-@param[in,out] mtr mini-transaction
-@return error code */
dberr_t flst_remove(buf_block_t *base, uint16_t boffset,
- buf_block_t *cur, uint16_t coffset, mtr_t *mtr)
+ buf_block_t *cur, uint16_t coffset,
+ uint32_t limit, mtr_t *mtr)
{
ut_ad(boffset < base->physical_size());
ut_ad(coffset < cur->physical_size());
@@ -329,9 +345,27 @@ dberr_t flst_remove(buf_block_t *base, uint16_t boffset,
const fil_addr_t next_addr= flst_get_next_addr(cur->page.frame + coffset);
dberr_t err= DB_SUCCESS;
- if (prev_addr.page == FIL_NULL)
+ if (next_addr.page >= limit)
+ {
+ if (next_addr.page != FIL_NULL)
+ return DB_CORRUPTION;
+ }
+ else if (UNIV_UNLIKELY(next_addr.boffset < FIL_PAGE_DATA ||
+ next_addr.boffset >= base->physical_size() -
+ FIL_PAGE_DATA_END))
+ return DB_CORRUPTION;
+
+ if (prev_addr.page >= limit)
+ {
+ if (prev_addr.page != FIL_NULL)
+ return DB_CORRUPTION;
flst_write_addr(*base, base->page.frame + boffset + FLST_FIRST,
next_addr.page, next_addr.boffset, mtr);
+ }
+ else if (UNIV_UNLIKELY(prev_addr.boffset < FIL_PAGE_DATA ||
+ prev_addr.boffset >= base->physical_size() -
+ FIL_PAGE_DATA_END))
+ return DB_CORRUPTION;
else
{
buf_block_t *b= cur;
@@ -375,25 +409,19 @@ void flst_validate(const buf_block_t *base, uint16_t boffset, mtr_t *mtr)
ut_ad(mtr->memo_contains_flagged(base, MTR_MEMO_PAGE_X_FIX |
MTR_MEMO_PAGE_SX_FIX));
- /* We use two mini-transaction handles: the first is used to lock
- the base node, and prevent other threads from modifying the list.
- The second is used to traverse the list. We cannot run the second
- mtr without committing it at times, because if the list is long,
- the x-locked pages could fill the buffer, resulting in a deadlock. */
- mtr_t mtr2;
-
const uint32_t len= flst_get_len(base->page.frame + boffset);
fil_addr_t addr= flst_get_first(base->page.frame + boffset);
for (uint32_t i= len; i--; )
{
- mtr2.start();
+ ut_ad(addr.boffset >= FIL_PAGE_DATA);
+ ut_ad(addr.boffset < base->physical_size() - FIL_PAGE_DATA_END);
const buf_block_t *b=
buf_page_get_gen(page_id_t(base->page.id().space(), addr.page),
base->zip_size(), RW_SX_LATCH, nullptr, BUF_GET, mtr);
ut_ad(b);
addr= flst_get_next_addr(b->page.frame + addr.boffset);
- mtr2.commit();
+ mtr->release_last_page();
}
ut_ad(addr.page == FIL_NULL);
@@ -402,13 +430,14 @@ void flst_validate(const buf_block_t *base, uint16_t boffset, mtr_t *mtr)
for (uint32_t i= len; i--; )
{
- mtr2.start();
+ ut_ad(addr.boffset >= FIL_PAGE_DATA);
+ ut_ad(addr.boffset < base->physical_size() - FIL_PAGE_DATA_END);
const buf_block_t *b=
buf_page_get_gen(page_id_t(base->page.id().space(), addr.page),
base->zip_size(), RW_SX_LATCH, nullptr, BUF_GET, mtr);
ut_ad(b);
addr= flst_get_prev_addr(b->page.frame + addr.boffset);
- mtr2.commit();
+ mtr->release_last_page();
}
ut_ad(addr.page == FIL_NULL);
diff --git a/storage/innobase/gis/gis0sea.cc b/storage/innobase/gis/gis0sea.cc
index 0df9a7de..4aab68e9 100644
--- a/storage/innobase/gis/gis0sea.cc
+++ b/storage/innobase/gis/gis0sea.cc
@@ -289,10 +289,6 @@ rtr_pcur_getnext_from_path(
mtr->rollback_to_savepoint(1);
}
- ut_ad((my_latch_mode | 4) == BTR_CONT_MODIFY_TREE
- || !page_is_leaf(btr_cur_get_page(btr_cur))
- || !btr_cur->page_cur.block->page.lock.have_any());
-
const auto block_savepoint = mtr->get_savepoint();
block = buf_page_get_gen(
page_id_t(index->table->space_id,
@@ -511,7 +507,7 @@ rtr_pcur_move_to_next(
mysql_mutex_unlock(&rtr_info->matches->rtr_match_mutex);
cursor->btr_cur.page_cur.rec = rec.r_rec;
- cursor->btr_cur.page_cur.block = &rtr_info->matches->block;
+ cursor->btr_cur.page_cur.block = rtr_info->matches->block;
DEBUG_SYNC_C("rtr_pcur_move_to_next_return");
return(true);
@@ -672,8 +668,13 @@ dberr_t rtr_search_to_nth_level(ulint level, const dtuple_t *tuple,
buf_mode, mtr, &err, false);
if (!block)
{
- if (err == DB_DECRYPTION_FAILED)
- btr_decryption_failed(*index);
+ if (err)
+ {
+ err_exit:
+ if (err == DB_DECRYPTION_FAILED)
+ btr_decryption_failed(*index);
+ mtr->rollback_to_savepoint(savepoint);
+ }
func_exit:
if (UNIV_LIKELY_NULL(heap))
mem_heap_free(heap);
@@ -737,7 +738,8 @@ dberr_t rtr_search_to_nth_level(ulint level, const dtuple_t *tuple,
#endif
}
- if (height == 0) {
+ if (height == 0)
+ {
if (rw_latch == RW_NO_LATCH)
{
ut_ad(block == mtr->at_savepoint(block_savepoint));
@@ -821,7 +823,7 @@ dberr_t rtr_search_to_nth_level(ulint level, const dtuple_t *tuple,
if (page_cur_search_with_match(tuple, page_mode, &up_match,
&low_match, &cur->page_cur, nullptr)) {
err= DB_CORRUPTION;
- goto func_exit;
+ goto err_exit;
}
}
@@ -1316,21 +1318,15 @@ rtr_create_rtr_info(
rtr_info->index = index;
if (init_matches) {
- rtr_info->heap = mem_heap_create(sizeof(*(rtr_info->matches)));
rtr_info->matches = static_cast<matched_rec_t*>(
- mem_heap_zalloc(
- rtr_info->heap,
- sizeof(*rtr_info->matches)));
+ ut_zalloc_nokey(sizeof *rtr_info->matches));
rtr_info->matches->matched_recs
= UT_NEW_NOKEY(rtr_rec_vector());
- rtr_info->matches->bufp = page_align(rtr_info->matches->rec_buf
- + UNIV_PAGE_SIZE_MAX + 1);
mysql_mutex_init(rtr_match_mutex_key,
&rtr_info->matches->rtr_match_mutex,
nullptr);
- rtr_info->matches->block.page.lock.init();
}
rtr_info->path = UT_NEW_NOKEY(rtr_node_path_t());
@@ -1449,18 +1445,16 @@ rtr_clean_rtr_info(
if (free_all) {
if (rtr_info->matches) {
- if (rtr_info->matches->matched_recs != NULL) {
- UT_DELETE(rtr_info->matches->matched_recs);
+ if (rtr_info->matches->block) {
+ buf_block_free(rtr_info->matches->block);
+ rtr_info->matches->block = nullptr;
}
- rtr_info->matches->block.page.lock.free();
+ UT_DELETE(rtr_info->matches->matched_recs);
mysql_mutex_destroy(
&rtr_info->matches->rtr_match_mutex);
- }
-
- if (rtr_info->heap) {
- mem_heap_free(rtr_info->heap);
+ ut_free(rtr_info->matches);
}
if (initialized) {
@@ -1570,7 +1564,7 @@ rtr_check_discard_page(
if (auto matches = rtr_info->matches) {
mysql_mutex_lock(&matches->rtr_match_mutex);
- if (matches->block.page.id() == id) {
+ if (matches->block->page.id() == id) {
matches->matched_recs->clear();
matches->valid = false;
}
@@ -1584,23 +1578,6 @@ rtr_check_discard_page(
lock_sys.prdt_page_free_from_discard(id, true);
}
-/** Structure acts as functor to get the optimistic access of the page.
-It returns true if it successfully gets the page. */
-struct optimistic_get
-{
- btr_pcur_t *const r_cursor;
- mtr_t *const mtr;
-
- optimistic_get(btr_pcur_t *r_cursor,mtr_t *mtr)
- :r_cursor(r_cursor), mtr(mtr) {}
-
- bool operator()(buf_block_t *hint) const
- {
- return hint && buf_page_optimistic_get(
- RW_X_LATCH, hint, r_cursor->modify_clock, mtr);
- }
-};
-
/** Restore the stored position of a persistent cursor bufferfixing the page */
static
bool
@@ -1632,8 +1609,11 @@ rtr_cur_restore_position(
r_cursor->modify_clock = 100;
);
- if (r_cursor->block_when_stored.run_with_hint(
- optimistic_get(r_cursor, mtr))) {
+ if (buf_page_optimistic_fix(r_cursor->btr_cur.page_cur.block,
+ r_cursor->old_page_id)
+ && buf_page_optimistic_get(r_cursor->btr_cur.page_cur.block,
+ RW_X_LATCH, r_cursor->modify_clock,
+ mtr)) {
ut_ad(r_cursor->pos_state == BTR_PCUR_IS_POSITIONED);
ut_ad(r_cursor->rel_pos == BTR_PCUR_ON);
@@ -1778,7 +1758,7 @@ rtr_leaf_push_match_rec(
ulint data_len;
rtr_rec_t rtr_rec;
- buf = match_rec->block.page.frame + match_rec->used;
+ buf = match_rec->block->page.frame + match_rec->used;
ut_ad(page_rec_is_leaf(rec));
copy = rec_copy(buf, rec, offsets);
@@ -1875,43 +1855,6 @@ rtr_non_leaf_insert_stack_push(
new_seq, level, child_no, my_cursor, mbr_inc);
}
-/** Copy a buf_block_t, except "block->page.lock".
-@param[in,out] matches copy to match->block
-@param[in] block block to copy */
-static
-void
-rtr_copy_buf(
- matched_rec_t* matches,
- const buf_block_t* block)
-{
- /* Copy all members of "block" to "matches->block" except "lock".
- We skip "lock" because it is not used
- from the dummy buf_block_t we create here and because memcpy()ing
- it generates (valid) compiler warnings that the vtable pointer
- will be copied. */
- matches->block.page.lock.free();
- new (&matches->block.page) buf_page_t(block->page);
- matches->block.page.frame = block->page.frame;
- matches->block.unzip_LRU = block->unzip_LRU;
-
- ut_d(matches->block.in_unzip_LRU_list = block->in_unzip_LRU_list);
- ut_d(matches->block.in_withdraw_list = block->in_withdraw_list);
-
- /* Skip buf_block_t::lock */
- matches->block.modify_clock = block->modify_clock;
-#ifdef BTR_CUR_HASH_ADAPT
- matches->block.n_hash_helps = block->n_hash_helps;
- 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 = 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 */
-}
-
/****************************************************************//**
Generate a shadow copy of the page block header to save the
matched records */
@@ -1925,16 +1868,18 @@ rtr_init_match(
{
ut_ad(matches->matched_recs->empty());
matches->locked = false;
- rtr_copy_buf(matches, block);
- matches->block.page.frame = matches->bufp;
matches->valid = false;
+ if (!matches->block) {
+ matches->block = buf_block_alloc();
+ }
+
+ matches->block->page.init(buf_page_t::MEMORY, block->page.id());
/* We have to copy PAGE_*_SUPREMUM_END bytes so that we can
use infimum/supremum of this page as normal btr page for search. */
- memcpy(matches->block.page.frame, page, page_is_comp(page)
- ? PAGE_NEW_SUPREMUM_END : PAGE_OLD_SUPREMUM_END);
matches->used = page_is_comp(page)
? PAGE_NEW_SUPREMUM_END
: PAGE_OLD_SUPREMUM_END;
+ memcpy(matches->block->page.frame, page, matches->used);
#ifdef RTR_SEARCH_DIAGNOSTIC
ulint pageno = page_get_page_no(page);
fprintf(stderr, "INNODB_RTR: Searching leaf page %d\n",
@@ -2361,7 +2306,7 @@ rtr_cur_search_with_match(
#endif /* UNIV_DEBUG */
/* Pop the last match record and position on it */
match_rec->matched_recs->pop_back();
- page_cur_position(test_rec.r_rec, &match_rec->block,
+ page_cur_position(test_rec.r_rec, match_rec->block,
cursor);
}
} else {
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 407834f2..dfe034ec 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -47,10 +47,13 @@ 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 <mysql/service_print_check_msg.h>
#include "sql_type_geom.h"
#include "scope.h"
#include "srv0srv.h"
+extern my_bool opt_readonly;
+
// MYSQL_PLUGIN_IMPORT extern my_bool lower_case_file_system;
// MYSQL_PLUGIN_IMPORT extern char mysql_unpacked_real_data_home[];
@@ -116,6 +119,7 @@ thread_local ha_handler_stats *mariadb_stats= &mariadb_dummy_stats;
#include "snappy-c.h"
#include <limits>
+#include <myisamchk.h> // TT_FOR_UPGRADE
#define thd_get_trx_isolation(X) ((enum_tx_isolation)thd_tx_isolation(X))
@@ -874,6 +878,10 @@ static MYSQL_THDVAR_BOOL(table_locks, PLUGIN_VAR_OPCMDARG,
/* check_func */ NULL, /* update_func */ NULL,
/* default */ TRUE);
+static MYSQL_THDVAR_BOOL(snapshot_isolation, PLUGIN_VAR_OPCMDARG,
+ "Use snapshot isolation (write-write conflict detection).",
+ NULL, NULL, FALSE);
+
static MYSQL_THDVAR_BOOL(strict_mode, PLUGIN_VAR_OPCMDARG,
"Use strict mode when evaluating create options.",
NULL, NULL, TRUE);
@@ -2166,6 +2174,9 @@ convert_error_code_to_mysql(
return(HA_ERR_LOCK_DEADLOCK);
+ case DB_RECORD_CHANGED:
+ return HA_ERR_RECORD_CHANGED;
+
case DB_LOCK_WAIT_TIMEOUT:
/* Starting from 5.0.13, we let MySQL just roll back the
latest SQL statement in a lock wait timeout. Previously, we
@@ -2809,6 +2820,8 @@ innobase_trx_init(
trx->check_unique_secondary = !thd_test_options(
thd, OPTION_RELAXED_UNIQUE_CHECKS);
+ trx->snapshot_isolation = THDVAR(thd, snapshot_isolation) & 1;
+
#ifdef WITH_WSREP
trx->wsrep = wsrep_on(thd);
#endif
@@ -4003,7 +4016,7 @@ static int innodb_init_params()
data_mysql_default_charset_coll = (ulint) default_charset_info->number;
-#ifdef HAVE_FCNTL_DIRECT
+#if !defined _WIN32 && defined O_DIRECT
if (srv_use_atomic_writes && my_may_have_atomic_write) {
/*
Force O_DIRECT on Unixes (on Windows writes are always
@@ -4342,7 +4355,7 @@ innobase_start_trx_and_assign_read_view(
Do this only if transaction is using REPEATABLE READ isolation
level. */
trx->isolation_level = innobase_map_isolation_level(
- thd_get_trx_isolation(thd));
+ thd_get_trx_isolation(thd)) & 3;
if (trx->isolation_level == TRX_ISO_REPEATABLE_READ) {
trx->read_view.open(trx);
@@ -5345,67 +5358,6 @@ test_normalize_table_name_low()
}
}
}
-
-/*********************************************************************
-Test ut_format_name(). */
-static
-void
-test_ut_format_name()
-/*=================*/
-{
- char buf[NAME_LEN * 3];
-
- struct {
- const char* name;
- ulint buf_size;
- const char* expected;
- } test_data[] = {
- {"test/t1", sizeof(buf), "`test`.`t1`"},
- {"test/t1", 12, "`test`.`t1`"},
- {"test/t1", 11, "`test`.`t1"},
- {"test/t1", 10, "`test`.`t"},
- {"test/t1", 9, "`test`.`"},
- {"test/t1", 8, "`test`."},
- {"test/t1", 7, "`test`"},
- {"test/t1", 6, "`test"},
- {"test/t1", 5, "`tes"},
- {"test/t1", 4, "`te"},
- {"test/t1", 3, "`t"},
- {"test/t1", 2, "`"},
- {"test/t1", 1, ""},
- {"test/t1", 0, "BUF_NOT_CHANGED"},
- {"table", sizeof(buf), "`table`"},
- {"ta'le", sizeof(buf), "`ta'le`"},
- {"ta\"le", sizeof(buf), "`ta\"le`"},
- {"ta`le", sizeof(buf), "`ta``le`"},
- };
-
- for (size_t i = 0; i < UT_ARR_SIZE(test_data); i++) {
-
- memcpy(buf, "BUF_NOT_CHANGED", strlen("BUF_NOT_CHANGED") + 1);
-
- char* ret;
-
- ret = ut_format_name(test_data[i].name,
- buf,
- test_data[i].buf_size);
-
- ut_a(ret == buf);
-
- if (strcmp(buf, test_data[i].expected) == 0) {
- ib::info() << "ut_format_name(" << test_data[i].name
- << ", buf, " << test_data[i].buf_size << "),"
- " expected " << test_data[i].expected
- << ", OK";
- } else {
- ib::error() << "ut_format_name(" << test_data[i].name
- << ", buf, " << test_data[i].buf_size << "),"
- " expected " << test_data[i].expected
- << ", ERROR: got " << buf;
- ut_error;
- }
- }
-}
#endif /* !DBUG_OFF */
/** Match index columns between MySQL and InnoDB.
@@ -5763,9 +5715,9 @@ func_exit:
return ret;
}
-/********************************************************************//**
-Get the upper limit of the MySQL integral and floating-point type.
-@return maximum allowed value for the field */
+/** Get the maximum integer value of a numeric column.
+@param field column definition
+@return maximum allowed integer value */
ulonglong innobase_get_int_col_max_value(const Field *field)
{
ulonglong max_value = 0;
@@ -5830,46 +5782,45 @@ ha_innobase::open().
@param[in,out] table persistent table
@param[in] field the AUTO_INCREMENT column */
-static
-void
-initialize_auto_increment(dict_table_t* table, const Field* field)
-{
- ut_ad(!table->is_temporary());
-
- const unsigned col_no = innodb_col_no(field);
-
- table->autoinc_mutex.wr_lock();
-
- table->persistent_autoinc = static_cast<uint16_t>(
- dict_table_get_nth_col_pos(table, col_no, NULL) + 1)
- & dict_index_t::MAX_N_FIELDS;
+static void initialize_auto_increment(dict_table_t *table, const Field& field,
+ const TABLE_SHARE &s)
+{
+ ut_ad(!table->is_temporary());
+ const unsigned col_no= innodb_col_no(&field);
+ table->autoinc_mutex.wr_lock();
+ table->persistent_autoinc=
+ uint16_t(dict_table_get_nth_col_pos(table, col_no, nullptr) + 1) &
+ dict_index_t::MAX_N_FIELDS;
+ if (table->autoinc)
+ /* Already initialized. Our caller checked
+ table->persistent_autoinc without
+ autoinc_mutex protection, and there might be multiple
+ ha_innobase::open() executing concurrently. */;
+ else if (srv_force_recovery >= SRV_FORCE_NO_UNDO_LOG_SCAN)
+ /* If innodb_force_recovery is set so high that writes
+ are disabled we force the AUTOINC counter to 0
+ value effectively disabling writes to the table.
+ Secondly, we avoid reading the table in case the read
+ results in failure due to a corrupted table/index.
+
+ We will not return an error to the client, so that the
+ tables can be dumped with minimal hassle. If an error
+ were returned in this case, the first attempt to read
+ the table would fail and subsequent SELECTs would succeed. */;
+ else if (table->persistent_autoinc)
+ {
+ uint64_t max_value= innobase_get_int_col_max_value(&field);
+ table->autoinc=
+ innobase_next_autoinc(btr_read_autoinc_with_fallback(table, col_no,
+ s.mysql_version,
+ max_value),
+ 1 /* need */,
+ 1 /* auto_increment_increment */,
+ 0 /* auto_increment_offset */,
+ max_value);
+ }
- if (table->autoinc) {
- /* Already initialized. Our caller checked
- table->persistent_autoinc without
- autoinc_mutex protection, and there might be multiple
- ha_innobase::open() executing concurrently. */
- } else if (srv_force_recovery >= SRV_FORCE_NO_UNDO_LOG_SCAN) {
- /* If the recovery level is set so high that writes
- are disabled we force the AUTOINC counter to 0
- value effectively disabling writes to the table.
- Secondly, we avoid reading the table in case the read
- results in failure due to a corrupted table/index.
-
- We will not return an error to the client, so that the
- tables can be dumped with minimal hassle. If an error
- were returned in this case, the first attempt to read
- the table would fail and subsequent SELECTs would succeed. */
- } else if (table->persistent_autoinc) {
- table->autoinc = innobase_next_autoinc(
- btr_read_autoinc_with_fallback(table, col_no),
- 1 /* need */,
- 1 /* auto_increment_increment */,
- 0 /* auto_increment_offset */,
- innobase_get_int_col_max_value(field));
- }
-
- table->autoinc_mutex.wr_unlock();
+ table->autoinc_mutex.wr_unlock();
}
/** Open an InnoDB table
@@ -6105,7 +6056,7 @@ ha_innobase::open(const char* name, int, uint)
|| m_prebuilt->table->persistent_autoinc
|| !m_prebuilt->table->is_readable()) {
} else if (const Field* ai = table->found_next_number_field) {
- initialize_auto_increment(m_prebuilt->table, ai);
+ initialize_auto_increment(m_prebuilt->table, *ai, *table->s);
}
/* Set plugin parser for fulltext index */
@@ -7394,26 +7345,55 @@ ha_innobase::build_template(
ulint num_v = 0;
- if (active_index != MAX_KEY
- && 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. */
+ /* MDEV-31154: For pushed down index condition we don't support virtual
+ column and idx_cond_push() does check for it. For row ID filtering we
+ don't need such restrictions but we get into trouble trying to use the
+ ICP path.
+
+ 1. It should be fine to follow no_icp path if primary key is generated.
+ However, with user specified primary key(PK), the row is identified by
+ the PK and those columns need to be converted to mysql format in
+ row_search_idx_cond_check before doing the comparison. Since secondary
+ indexes always have PK appended in innodb, it works with current ICP
+ handling code when fetch_primary_key_cols is set to TRUE.
+
+ 2. Although ICP comparison and Row ID comparison works on different
+ columns the current ICP code can be shared by both.
+
+ 3. In most cases, it works today by jumping to goto no_icp when we
+ encounter a virtual column. This is hackish and already have some
+ issues as it cannot handle PK and all states are not reset properly,
+ for example, idx_cond_n_cols is not reset.
+
+ 4. We already encountered MDEV-28747 m_prebuilt->idx_cond was being set.
+
+ Neither ICP nor row ID comparison needs virtual columns and the code is
+ simplified to handle both. It should handle the issues. */
+
+ const bool pushed_down = active_index != MAX_KEY
+ && active_index == pushed_idx_cond_keyno;
+
+ m_prebuilt->idx_cond = pushed_down ? this : nullptr;
+
+ if (m_prebuilt->idx_cond || m_prebuilt->pk_filter) {
+ /* Push down an index condition, end_range check or row ID
+ filter */
for (ulint i = 0; i < n_fields; i++) {
const Field* field = table->field[i];
const bool is_v = !field->stored_in_db();
- if (is_v && skip_virtual) {
- num_v++;
- continue;
- }
+
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;
- goto no_icp;
+
+ if (is_v) {
+ if (index_contains) {
+ /* We want to ensure that ICP is not
+ used with virtual columns. */
+ ut_ad(!pushed_down);
+ m_prebuilt->idx_cond = nullptr;
+ }
+ num_v++;
+ continue;
}
/* Test if an end_range or an index condition
@@ -7433,7 +7413,7 @@ icp:
which would be acceptable if end_range==NULL. */
if (build_template_needs_field_in_icp(
index, m_prebuilt, index_contains,
- is_v ? num_v : i - num_v, is_v)) {
+ i - num_v, false)) {
if (!whole_row) {
field = build_template_needs_field(
index_contains,
@@ -7442,15 +7422,10 @@ icp:
fetch_primary_key_cols,
index, table, i, num_v);
if (!field) {
- if (is_v) {
- num_v++;
- }
continue;
}
}
- ut_ad(!is_v);
-
mysql_row_templ_t* templ= build_template_field(
m_prebuilt, clust_index, index,
table, field, i - num_v, 0);
@@ -7527,15 +7502,16 @@ icp:
*/
}
- if (is_v) {
- num_v++;
- }
}
- ut_ad(m_prebuilt->idx_cond_n_cols > 0);
- ut_ad(m_prebuilt->idx_cond_n_cols == m_prebuilt->n_template);
-
num_v = 0;
+ ut_ad(m_prebuilt->idx_cond_n_cols == m_prebuilt->n_template);
+ if (m_prebuilt->idx_cond_n_cols == 0) {
+ /* No columns to push down. It is safe to jump to np ICP
+ path. */
+ m_prebuilt->idx_cond = nullptr;
+ goto no_icp;
+ }
/* Include the fields that are not needed in index condition
pushdown. */
@@ -7550,7 +7526,7 @@ icp:
bool index_contains = index->contains_col_or_prefix(
is_v ? num_v : i - num_v, is_v);
- if (!build_template_needs_field_in_icp(
+ if (is_v || !build_template_needs_field_in_icp(
index, m_prebuilt, index_contains,
is_v ? num_v : i - num_v, is_v)) {
/* Not needed in ICP */
@@ -7583,7 +7559,7 @@ icp:
} else {
no_icp:
/* No index condition pushdown */
- m_prebuilt->idx_cond = NULL;
+ ut_ad(!m_prebuilt->idx_cond);
ut_ad(num_v == 0);
for (ulint i = 0; i < n_fields; i++) {
@@ -8737,6 +8713,7 @@ ha_innobase::delete_row(
: PLAIN_DELETE;
trx->fts_next_doc_id = 0;
+ ut_ad(!trx->is_bulk_insert());
error = row_update_for_mysql(m_prebuilt);
#ifdef WITH_WSREP
@@ -8844,47 +8821,63 @@ ha_innobase::index_end(void)
DBUG_RETURN(0);
}
-/*********************************************************************//**
-Converts a search mode flag understood by MySQL to a flag understood
-by InnoDB. */
-page_cur_mode_t
-convert_search_mode_to_innobase(
-/*============================*/
- ha_rkey_function find_flag)
-{
- switch (find_flag) {
- case HA_READ_KEY_EXACT:
- /* this does not require the index to be UNIQUE */
- case HA_READ_KEY_OR_NEXT:
- return(PAGE_CUR_GE);
- case HA_READ_AFTER_KEY:
- return(PAGE_CUR_G);
- case HA_READ_BEFORE_KEY:
- return(PAGE_CUR_L);
- case HA_READ_KEY_OR_PREV:
- case HA_READ_PREFIX_LAST:
- case HA_READ_PREFIX_LAST_OR_PREV:
- return(PAGE_CUR_LE);
- case HA_READ_MBR_CONTAIN:
- return(PAGE_CUR_CONTAIN);
- case HA_READ_MBR_INTERSECT:
- return(PAGE_CUR_INTERSECT);
- case HA_READ_MBR_WITHIN:
- return(PAGE_CUR_WITHIN);
- case HA_READ_MBR_DISJOINT:
- return(PAGE_CUR_DISJOINT);
- case HA_READ_MBR_EQUAL:
- return(PAGE_CUR_MBR_EQUAL);
- case HA_READ_PREFIX:
- return(PAGE_CUR_UNSUPP);
- /* do not use "default:" in order to produce a gcc warning:
- enumeration value '...' not handled in switch
- (if -Wswitch or -Wall is used) */
- }
-
- my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "this functionality");
-
- return(PAGE_CUR_UNSUPP);
+/** Convert a MariaDB search mode to an InnoDB search mode.
+@tparam last_match whether last_match_mode is to be set
+@param find_flag MariaDB search mode
+@param mode InnoDB search mode
+@param last_match_mode pointer to ha_innobase::m_last_match_mode
+@return whether the search mode is unsupported */
+template<bool last_match= false>
+static bool convert_search_mode_to_innobase(ha_rkey_function find_flag,
+ page_cur_mode_t &mode,
+ uint *last_match_mode= nullptr)
+{
+ mode= PAGE_CUR_LE;
+ if (last_match)
+ *last_match_mode= 0;
+
+ switch (find_flag) {
+ case HA_READ_KEY_EXACT:
+ /* this does not require the index to be UNIQUE */
+ if (last_match)
+ *last_match_mode= ROW_SEL_EXACT;
+ /* fall through */
+ case HA_READ_KEY_OR_NEXT:
+ mode= PAGE_CUR_GE;
+ return false;
+ case HA_READ_AFTER_KEY:
+ mode= PAGE_CUR_G;
+ return false;
+ case HA_READ_BEFORE_KEY:
+ mode= PAGE_CUR_L;
+ return false;
+ case HA_READ_PREFIX_LAST:
+ if (last_match)
+ *last_match_mode= ROW_SEL_EXACT_PREFIX;
+ /* fall through */
+ case HA_READ_KEY_OR_PREV:
+ case HA_READ_PREFIX_LAST_OR_PREV:
+ return false;
+ case HA_READ_MBR_CONTAIN:
+ mode= PAGE_CUR_CONTAIN;
+ return false;
+ case HA_READ_MBR_INTERSECT:
+ mode= PAGE_CUR_INTERSECT;
+ return false;
+ case HA_READ_MBR_WITHIN:
+ mode= PAGE_CUR_WITHIN;
+ return false;
+ case HA_READ_MBR_DISJOINT:
+ mode= PAGE_CUR_DISJOINT;
+ return false;
+ case HA_READ_MBR_EQUAL:
+ mode= PAGE_CUR_MBR_EQUAL;
+ return false;
+ case HA_READ_PREFIX:
+ break;
+ }
+
+ return true;
}
/*
@@ -8962,8 +8955,7 @@ ha_innobase::index_read(
mariadb_set_stats set_stats_temporary(handler_stats);
DEBUG_SYNC_C("ha_innobase_index_read_begin");
- ut_a(m_prebuilt->trx == thd_to_trx(m_user_thd));
- ut_ad(key_len != 0 || find_flag != HA_READ_KEY_EXACT);
+ ut_ad(m_prebuilt->trx == thd_to_trx(m_user_thd));
dict_index_t* index = m_prebuilt->index;
@@ -8999,7 +8991,8 @@ ha_innobase::index_read(
build_template(false);
}
- if (key_ptr != NULL) {
+ if (key_len) {
+ ut_ad(key_ptr);
/* Convert the search key value to InnoDB format into
m_prebuilt->search_tuple */
@@ -9009,84 +9002,58 @@ ha_innobase::index_read(
m_prebuilt->srch_key_val_len,
index,
(byte*) key_ptr,
- (ulint) key_len);
+ key_len);
DBUG_ASSERT(m_prebuilt->search_tuple->n_fields > 0);
} else {
+ ut_ad(find_flag != HA_READ_KEY_EXACT);
/* We position the cursor to the last or the first entry
in the index */
dtuple_set_n_fields(m_prebuilt->search_tuple, 0);
}
- page_cur_mode_t mode = convert_search_mode_to_innobase(find_flag);
-
- ulint match_mode = 0;
+ page_cur_mode_t mode;
- if (find_flag == HA_READ_KEY_EXACT) {
-
- match_mode = ROW_SEL_EXACT;
-
- } else if (find_flag == HA_READ_PREFIX_LAST) {
-
- match_mode = ROW_SEL_EXACT_PREFIX;
+ if (convert_search_mode_to_innobase<true>(find_flag, mode,
+ &m_last_match_mode)) {
+ table->status = STATUS_NOT_FOUND;
+ DBUG_RETURN(HA_ERR_UNSUPPORTED);
}
- m_last_match_mode = (uint) match_mode;
-
- dberr_t ret = mode == PAGE_CUR_UNSUPP ? DB_UNSUPPORTED
- : row_search_mvcc(buf, mode, m_prebuilt, match_mode, 0);
+ dberr_t ret =
+ row_search_mvcc(buf, mode, m_prebuilt, m_last_match_mode, 0);
DBUG_EXECUTE_IF("ib_select_query_failure", ret = DB_ERROR;);
- int error;
-
- switch (ret) {
- case DB_SUCCESS:
- error = 0;
+ if (UNIV_LIKELY(ret == DB_SUCCESS)) {
table->status = 0;
- break;
-
- case DB_RECORD_NOT_FOUND:
- error = HA_ERR_KEY_NOT_FOUND;
- table->status = STATUS_NOT_FOUND;
- break;
+ DBUG_RETURN(0);
+ }
- case DB_END_OF_INDEX:
- error = HA_ERR_KEY_NOT_FOUND;
- table->status = STATUS_NOT_FOUND;
- break;
+ table->status = STATUS_NOT_FOUND;
+ switch (ret) {
case DB_TABLESPACE_DELETED:
ib_senderrf(
m_prebuilt->trx->mysql_thd, IB_LOG_LEVEL_ERROR,
ER_TABLESPACE_DISCARDED,
table->s->table_name.str);
-
- table->status = STATUS_NOT_FOUND;
- error = HA_ERR_TABLESPACE_MISSING;
- break;
-
+ DBUG_RETURN(HA_ERR_TABLESPACE_MISSING);
+ case DB_RECORD_NOT_FOUND:
+ case DB_END_OF_INDEX:
+ DBUG_RETURN(HA_ERR_KEY_NOT_FOUND);
case DB_TABLESPACE_NOT_FOUND:
-
ib_senderrf(
m_prebuilt->trx->mysql_thd, IB_LOG_LEVEL_ERROR,
ER_TABLESPACE_MISSING,
table->s->table_name.str);
-
- table->status = STATUS_NOT_FOUND;
- error = HA_ERR_TABLESPACE_MISSING;
- break;
-
+ DBUG_RETURN(HA_ERR_TABLESPACE_MISSING);
default:
- error = convert_error_code_to_mysql(
- ret, m_prebuilt->table->flags, m_user_thd);
-
- table->status = STATUS_NOT_FOUND;
- break;
+ DBUG_RETURN(convert_error_code_to_mysql(
+ ret, m_prebuilt->table->flags,
+ m_user_thd));
}
-
- DBUG_RETURN(error);
}
/*******************************************************************//**
@@ -9513,8 +9480,6 @@ ha_innobase::rnd_pos(
DBUG_ENTER("rnd_pos");
DBUG_DUMP("key", pos, ref_length);
- ut_a(m_prebuilt->trx == thd_to_trx(ha_thd()));
-
/* Note that we assume the length of the row reference is fixed
for the table, and it is == ref_length */
@@ -9938,7 +9903,8 @@ wsrep_append_foreign_key(
}
ulint rcode = DB_SUCCESS;
- char cache_key[513] = {'\0'};
+ char cache_key[MAX_FULL_NAME_LEN] = {'\0'};
+ char db_name[MAX_DATABASE_NAME_LEN+1] = {'\0'};
size_t cache_key_len = 0;
if ( !((referenced) ?
@@ -10028,14 +9994,38 @@ wsrep_append_foreign_key(
return DB_ERROR;
}
- strncpy(cache_key,
+ char * fk_table =
(wsrep_protocol_version > 1) ?
((referenced) ?
foreign->referenced_table->name.m_name :
foreign->foreign_table->name.m_name) :
- foreign->foreign_table->name.m_name, sizeof(cache_key) - 1);
- cache_key_len = strlen(cache_key);
+ foreign->foreign_table->name.m_name;
+
+ /* convert db and table name parts separately to system charset */
+ ulint db_name_len = dict_get_db_name_len(fk_table);
+ strmake(db_name, fk_table, db_name_len);
+ uint errors;
+ cache_key_len= innobase_convert_to_system_charset(cache_key,
+ db_name, sizeof(cache_key), &errors);
+ if (errors) {
+ WSREP_WARN("unexpected foreign key table %s %s",
+ foreign->referenced_table->name.m_name,
+ foreign->foreign_table->name.m_name);
+ return DB_ERROR;
+ }
+ /* after db name adding 0 and then converted table name */
+ cache_key[db_name_len]= '\0';
+ cache_key_len++;
+
+ cache_key_len+= innobase_convert_to_system_charset(cache_key+cache_key_len,
+ fk_table+db_name_len+1, sizeof(cache_key), &errors);
+ if (errors) {
+ WSREP_WARN("unexpected foreign key table %s %s",
+ foreign->referenced_table->name.m_name,
+ foreign->foreign_table->name.m_name);
+ return DB_ERROR;
+ }
#ifdef WSREP_DEBUG_PRINT
ulint j;
fprintf(stderr, "FK parent key, table: %s %s len: %lu ",
@@ -10045,16 +10035,6 @@ wsrep_append_foreign_key(
}
fprintf(stderr, "\n");
#endif
- char *p = strchr(cache_key, '/');
-
- if (p) {
- *p = '\0';
- } else {
- WSREP_WARN("unexpected foreign key table %s %s",
- foreign->referenced_table->name.m_name,
- foreign->foreign_table->name.m_name);
- }
-
wsrep_buf_t wkey_part[3];
wsrep_key_t wkey = {wkey_part, 3};
@@ -12269,7 +12249,7 @@ create_table_info_t::create_foreign_keys()
dict_index_t* index = NULL;
fkerr_t index_error = FK_SUCCESS;
dict_index_t* err_index = NULL;
- ulint err_col;
+ ulint err_col = 0;
const bool tmp_table = m_flags2 & DICT_TF2_TEMPORARY;
const CHARSET_INFO* cs = thd_charset(m_thd);
const char* operation = "Create ";
@@ -13383,6 +13363,49 @@ ha_innobase::discard_or_import_tablespace(
DBUG_RETURN(0);
}
+/** Report a DROP TABLE failure due to a FOREIGN KEY constraint.
+@param name table name
+@param foreign constraint */
+ATTRIBUTE_COLD
+static void delete_table_cannot_drop_foreign(const table_name_t &name,
+ const dict_foreign_t &foreign)
+{
+ mysql_mutex_lock(&dict_foreign_err_mutex);
+ rewind(dict_foreign_err_file);
+ ut_print_timestamp(dict_foreign_err_file);
+ fputs(" Cannot drop table ", dict_foreign_err_file);
+ ut_print_name(dict_foreign_err_file, nullptr, name.m_name);
+ fputs("\nbecause it is referenced by ", dict_foreign_err_file);
+ ut_print_name(dict_foreign_err_file, nullptr, foreign.foreign_table_name);
+ putc('\n', dict_foreign_err_file);
+ mysql_mutex_unlock(&dict_foreign_err_mutex);
+}
+
+/** Check if DROP TABLE would fail due to a FOREIGN KEY constraint.
+@param table table to be dropped
+@param sqlcom thd_sql_command(current_thd)
+@return whether child tables that refer to this table exist */
+static bool delete_table_check_foreigns(const dict_table_t &table,
+ enum_sql_command sqlcom)
+{
+ const bool drop_db{sqlcom == SQLCOM_DROP_DB};
+ for (const auto foreign : table.referenced_set)
+ {
+ /* We should allow dropping a referenced table if creating
+ that referenced table has failed for some reason. For example
+ if referenced table is created but it column types that are
+ referenced do not match. */
+ if (foreign->foreign_table == &table ||
+ (drop_db &&
+ dict_tables_have_same_db(table.name.m_name,
+ foreign->foreign_table_name_lookup)))
+ continue;
+ delete_table_cannot_drop_foreign(table.name, *foreign);
+ return true;
+ }
+
+ return false;
+}
/** DROP TABLE (possibly as part of DROP DATABASE, CREATE/ALTER TABLE)
@param name table name
@@ -13397,8 +13420,8 @@ int ha_innobase::delete_table(const char *name)
DBUG_EXECUTE_IF("test_normalize_table_name_low",
test_normalize_table_name_low(););
- DBUG_EXECUTE_IF("test_ut_format_name", test_ut_format_name(););
+ const enum_sql_command sqlcom= enum_sql_command(thd_sql_command(thd));
trx_t *parent_trx= check_trx_exists(thd);
dict_table_t *table;
@@ -13435,6 +13458,13 @@ int ha_innobase::delete_table(const char *name)
DBUG_RETURN(0);
}
+ if (parent_trx->check_foreigns &&
+ delete_table_check_foreigns(*table, sqlcom))
+ {
+ dict_sys.unlock();
+ DBUG_RETURN(HA_ERR_ROW_IS_REFERENCED);
+ }
+
table->acquire();
dict_sys.unlock();
@@ -13467,14 +13497,7 @@ int ha_innobase::delete_table(const char *name)
/* FOREIGN KEY constraints cannot exist on partitioned tables. */;
#endif
else
- {
- dict_sys.freeze(SRW_LOCK_CALL);
- for (const dict_foreign_t* f : table->referenced_set)
- if (dict_table_t* child= f->foreign_table)
- if ((err= lock_table_for_trx(child, trx, LOCK_X)) != DB_SUCCESS)
- break;
- dict_sys.unfreeze();
- }
+ err= lock_table_children(table, trx);
}
dict_table_t *table_stats= nullptr, *index_stats= nullptr;
@@ -13484,7 +13507,6 @@ int ha_innobase::delete_table(const char *name)
const bool fts= err == DB_SUCCESS &&
(table->flags2 & (DICT_TF2_FTS_HAS_DOC_ID | DICT_TF2_FTS));
- const enum_sql_command sqlcom= enum_sql_command(thd_sql_command(thd));
if (fts)
{
@@ -13642,36 +13664,16 @@ err_exit:
DBUG_RETURN(convert_error_code_to_mysql(err, 0, NULL));
}
- if (!table->no_rollback() && trx->check_foreigns)
+ if (!table->no_rollback())
{
- const bool drop_db= sqlcom == SQLCOM_DROP_DB;
- for (auto foreign : table->referenced_set)
+ if (trx->check_foreigns && delete_table_check_foreigns(*table, sqlcom))
{
- /* We should allow dropping a referenced table if creating
- that referenced table has failed for some reason. For example
- if referenced table is created but it column types that are
- referenced do not match. */
- if (foreign->foreign_table == table ||
- (drop_db &&
- dict_tables_have_same_db(table->name.m_name,
- foreign->foreign_table_name_lookup)))
- continue;
- mysql_mutex_lock(&dict_foreign_err_mutex);
- rewind(dict_foreign_err_file);
- ut_print_timestamp(dict_foreign_err_file);
- fputs(" Cannot drop table ", dict_foreign_err_file);
- ut_print_name(dict_foreign_err_file, trx, table->name.m_name);
- fputs("\nbecause it is referenced by ", dict_foreign_err_file);
- ut_print_name(dict_foreign_err_file, trx, foreign->foreign_table_name);
- putc('\n', dict_foreign_err_file);
- mysql_mutex_unlock(&dict_foreign_err_mutex);
err= DB_CANNOT_DROP_CONSTRAINT;
goto err_exit;
}
- }
- if (!table->no_rollback())
err= trx->drop_table_foreign(table->name);
+ }
if (err == DB_SUCCESS && table_stats && index_stats)
err= trx->drop_table_statistics(table->name);
@@ -13790,6 +13792,19 @@ int ha_innobase::truncate()
update_thd();
+#ifdef UNIV_DEBUG
+ if (!thd_test_options(m_user_thd, OPTION_NO_FOREIGN_KEY_CHECKS))
+ {
+ /* fk_truncate_illegal_if_parent() should have failed in
+ Sql_cmd_truncate_table::handler_truncate() if foreign_key_checks=ON
+ and child tables exist. */
+ dict_sys.freeze(SRW_LOCK_CALL);
+ for (const auto foreign : m_prebuilt->table->referenced_set)
+ ut_ad(foreign->foreign_table == m_prebuilt->table);
+ dict_sys.unfreeze();
+ }
+#endif
+
if (is_read_only())
DBUG_RETURN(HA_ERR_TABLE_READONLY);
@@ -13872,14 +13887,7 @@ int ha_innobase::truncate()
dict_table_t *table_stats = nullptr, *index_stats = nullptr;
MDL_ticket *mdl_table = nullptr, *mdl_index = nullptr;
- dberr_t error= DB_SUCCESS;
-
- dict_sys.freeze(SRW_LOCK_CALL);
- for (const dict_foreign_t *f : ib_table->referenced_set)
- if (dict_table_t *child= f->foreign_table)
- if ((error= lock_table_for_trx(child, trx, LOCK_X)) != DB_SUCCESS)
- break;
- dict_sys.unfreeze();
+ dberr_t error= lock_table_children(ib_table, trx);
if (error == DB_SUCCESS)
error= lock_table_for_trx(ib_table, trx, LOCK_X);
@@ -14070,16 +14078,7 @@ ha_innobase::rename_table(
/* There is no need to lock any FOREIGN KEY child tables. */
} else if (dict_table_t *table = dict_table_open_on_name(
norm_from, false, DICT_ERR_IGNORE_FK_NOKEY)) {
- dict_sys.freeze(SRW_LOCK_CALL);
- for (const dict_foreign_t* f : table->referenced_set) {
- if (dict_table_t* child = f->foreign_table) {
- error = lock_table_for_trx(child, trx, LOCK_X);
- if (error != DB_SUCCESS) {
- break;
- }
- }
- }
- dict_sys.unfreeze();
+ error = lock_table_children(table, trx);
if (error == DB_SUCCESS) {
error = lock_table_for_trx(table, trx, LOCK_X);
}
@@ -14218,14 +14217,14 @@ ha_innobase::records_in_range(
dict_index_t* index;
dtuple_t* range_start;
dtuple_t* range_end;
- ha_rows n_rows;
+ ha_rows n_rows = HA_POS_ERROR;
page_cur_mode_t mode1;
page_cur_mode_t mode2;
mem_heap_t* heap;
DBUG_ENTER("records_in_range");
- ut_a(m_prebuilt->trx == thd_to_trx(ha_thd()));
+ ut_ad(m_prebuilt->trx == thd_to_trx(ha_thd()));
m_prebuilt->trx->op_info = "estimating records in index range";
@@ -14238,12 +14237,7 @@ ha_innobase::records_in_range(
/* There exists possibility of not being able to find requested
index due to inconsistency between MySQL and InoDB dictionary info.
Necessary message should have been printed in innobase_get_index() */
- if (!m_prebuilt->table->space) {
- n_rows = HA_POS_ERROR;
- goto func_exit;
- }
- if (!index) {
- n_rows = HA_POS_ERROR;
+ if (!index || !m_prebuilt->table->space) {
goto func_exit;
}
if (index->is_corrupted()) {
@@ -14259,61 +14253,50 @@ ha_innobase::records_in_range(
+ sizeof(dtuple_t)));
range_start = dtuple_create(heap, key->ext_key_parts);
- dict_index_copy_types(range_start, index, key->ext_key_parts);
range_end = dtuple_create(heap, key->ext_key_parts);
- dict_index_copy_types(range_end, index, key->ext_key_parts);
-
- row_sel_convert_mysql_key_to_innobase(
- range_start,
- m_prebuilt->srch_key_val1,
- m_prebuilt->srch_key_val_len,
- index,
- (byte*) (min_key ? min_key->key : (const uchar*) 0),
- (ulint) (min_key ? min_key->length : 0));
-
- DBUG_ASSERT(min_key
- ? range_start->n_fields > 0
- : range_start->n_fields == 0);
-
- row_sel_convert_mysql_key_to_innobase(
- range_end,
- m_prebuilt->srch_key_val2,
- m_prebuilt->srch_key_val_len,
- index,
- (byte*) (max_key ? max_key->key : (const uchar*) 0),
- (ulint) (max_key ? max_key->length : 0));
-
- DBUG_ASSERT(max_key
- ? range_end->n_fields > 0
- : range_end->n_fields == 0);
-
- mode1 = convert_search_mode_to_innobase(
- min_key ? min_key->flag : HA_READ_KEY_EXACT);
-
- mode2 = convert_search_mode_to_innobase(
- max_key ? max_key->flag : HA_READ_KEY_EXACT);
-
- if (mode1 != PAGE_CUR_UNSUPP && mode2 != PAGE_CUR_UNSUPP) {
-
- if (dict_index_is_spatial(index)) {
- /*Only min_key used in spatial index. */
- n_rows = rtr_estimate_n_rows_in_range(
- index, range_start, mode1);
- } else {
- btr_pos_t tuple1(range_start, mode1, pages->first_page);
- btr_pos_t tuple2(range_end, mode2, pages->last_page);
- n_rows = btr_estimate_n_rows_in_range(
- index, &tuple1, &tuple2);
- pages->first_page= tuple1.page_id.raw();
- pages->last_page= tuple2.page_id.raw();
- }
+
+ if (!min_key) {
+ mode1 = PAGE_CUR_GE;
+ dtuple_set_n_fields(range_start, 0);
+ } else if (convert_search_mode_to_innobase(min_key->flag, mode1)) {
+ goto unsupported;
} else {
+ dict_index_copy_types(range_start, index, key->ext_key_parts);
+ row_sel_convert_mysql_key_to_innobase(
+ range_start,
+ m_prebuilt->srch_key_val1,
+ m_prebuilt->srch_key_val_len,
+ index, min_key->key, min_key->length);
+ DBUG_ASSERT(range_start->n_fields > 0);
+ }
- n_rows = HA_POS_ERROR;
+ if (!max_key) {
+ mode2 = PAGE_CUR_GE;
+ dtuple_set_n_fields(range_end, 0);
+ } else if (convert_search_mode_to_innobase(max_key->flag, mode2)) {
+ goto unsupported;
+ } else {
+ dict_index_copy_types(range_end, index, key->ext_key_parts);
+ row_sel_convert_mysql_key_to_innobase(
+ range_end,
+ m_prebuilt->srch_key_val2,
+ m_prebuilt->srch_key_val_len,
+ index, max_key->key, max_key->length);
+ DBUG_ASSERT(range_end->n_fields > 0);
}
- mem_heap_free(heap);
+ if (dict_index_is_spatial(index)) {
+ /*Only min_key used in spatial index. */
+ n_rows = rtr_estimate_n_rows_in_range(
+ index, range_start, mode1);
+ } else {
+ btr_pos_t tuple1(range_start, mode1, pages->first_page);
+ btr_pos_t tuple2(range_end, mode2, pages->last_page);
+ n_rows = btr_estimate_n_rows_in_range(index, &tuple1, &tuple2);
+ pages->first_page= tuple1.page_id.raw();
+ pages->last_page= tuple2.page_id.raw();
+ }
DBUG_EXECUTE_IF(
"print_btr_estimate_n_rows_in_range_return_value",
@@ -14324,11 +14307,7 @@ ha_innobase::records_in_range(
(longlong) n_rows);
);
-func_exit:
-
- m_prebuilt->trx->op_info = (char*)"";
-
- /* The MySQL optimizer seems to believe an estimate of 0 rows is
+ /* The MariaDB optimizer seems to believe an estimate of 0 rows is
always accurate and may return the result 'Empty set' based on that.
The accuracy is not guaranteed, and even if it were, for a locking
read we should anyway perform the search to set the next-key lock.
@@ -14338,6 +14317,10 @@ func_exit:
n_rows = 1;
}
+unsupported:
+ mem_heap_free(heap);
+func_exit:
+ m_prebuilt->trx->op_info = "";
DBUG_RETURN((ha_rows) n_rows);
}
@@ -15140,6 +15123,7 @@ ha_innobase::check(
ulint n_rows_in_table = ULINT_UNDEFINED;
bool is_ok = true;
dberr_t ret;
+ uint handler_flags= check_opt->handler_flags;
DBUG_ENTER("ha_innobase::check");
DBUG_ASSERT(thd == ha_thd());
@@ -15148,6 +15132,27 @@ ha_innobase::check(
ut_a(m_prebuilt->trx == thd_to_trx(thd));
ut_ad(m_prebuilt->trx->mysql_thd == thd);
+ if (handler_flags || check_for_upgrade(check_opt)) {
+ /* The file was already checked and fixed as part of open */
+ print_check_msg(thd, table->s->db.str, table->s->table_name.str,
+ "check", "note",
+ (opt_readonly || high_level_read_only
+ || !(check_opt->sql_flags & TT_FOR_UPGRADE))
+ ? "Auto_increment will be"
+ " checked on each open until"
+ " CHECK TABLE FOR UPGRADE is executed"
+ : "Auto_increment checked and"
+ " .frm file version updated", 1);
+ if (handler_flags && (check_opt->sql_flags & TT_FOR_UPGRADE)) {
+ /*
+ No other issues found (as handler_flags was only
+ set if there as not other problems with the table
+ than auto_increment).
+ */
+ DBUG_RETURN(HA_ADMIN_OK);
+ }
+ }
+
if (m_prebuilt->mysql_template == NULL) {
/* Build the template; we will use a dummy template
in index scans done in checking */
@@ -15330,7 +15335,7 @@ ha_innobase::check(
}
/* Restore the original isolation level */
- m_prebuilt->trx->isolation_level = old_isolation_level;
+ m_prebuilt->trx->isolation_level = old_isolation_level & 3;
#ifdef BTR_CUR_HASH_ADAPT
# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
/* We validate the whole adaptive hash index for all tables
@@ -15351,6 +15356,35 @@ func_exit:
DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT);
}
+/**
+Check if we there is a problem with the InnoDB table.
+@param check_opt check options
+@retval HA_ADMIN_OK if Table is ok
+@retval HA_ADMIN_NEEDS_ALTER User should run ALTER TABLE FOR UPGRADE
+@retval HA_ADMIN_NEEDS_CHECK User should run CHECK TABLE FOR UPGRADE
+@retval HA_ADMIN_FAILED if InnoDB is in read-only mode */
+int ha_innobase::check_for_upgrade(HA_CHECK_OPT *check_opt)
+{
+ /*
+ Check if there is a possibility that the auto increment value
+ stored in PAGE_ROOT_AUTO_INC could be corrupt.
+ */
+ if (table->s->mysql_version >= 100210);
+ else if (const Field *auto_increment= table->found_next_number_field)
+ {
+ uint col_no= innodb_col_no(auto_increment);
+ const dict_col_t *autoinc_col=
+ dict_table_get_nth_col(m_prebuilt->table, col_no);
+ if (m_prebuilt->table->get_index(*autoinc_col))
+ {
+ check_opt->handler_flags= 1;
+ return (high_level_read_only && !opt_readonly)
+ ? HA_ADMIN_FAILED : HA_ADMIN_NEEDS_CHECK;
+ }
+ }
+ return HA_ADMIN_OK;
+}
+
/*******************************************************************//**
Gets the foreign key create info for a table stored in InnoDB.
@return own: character string in the form which can be inserted to the
@@ -15408,7 +15442,6 @@ get_foreign_key_info(
char tmp_buff[NAME_LEN+1];
char name_buff[NAME_LEN+1];
const char* ptr;
- LEX_CSTRING* referenced_key_name;
LEX_CSTRING* name = NULL;
if (dict_table_t::is_temporary_name(foreign->foreign_table_name)) {
@@ -15509,18 +15542,16 @@ get_foreign_key_info(
if (foreign->referenced_index
&& foreign->referenced_index->name != NULL) {
- referenced_key_name = thd_make_lex_string(
+ f_key_info.referenced_key_name = thd_make_lex_string(
thd,
- f_key_info.referenced_key_name,
+ nullptr,
foreign->referenced_index->name,
strlen(foreign->referenced_index->name),
1);
} else {
- referenced_key_name = NULL;
+ f_key_info.referenced_key_name = NULL;
}
- f_key_info.referenced_key_name = referenced_key_name;
-
pf_key_info = (FOREIGN_KEY_INFO*) thd_memdup(thd, &f_key_info,
sizeof(FOREIGN_KEY_INFO));
@@ -15806,7 +15837,7 @@ ha_innobase::start_stmt(
}
/* fall through */
default:
- trx->end_bulk_insert(*m_prebuilt->table);
+ trx->bulk_insert_apply_for_table(m_prebuilt->table);
if (!trx->bulk_insert) {
break;
}
@@ -16000,7 +16031,7 @@ ha_innobase::external_lock(
}
/* fall through */
default:
- trx->end_bulk_insert(*m_prebuilt->table);
+ trx->bulk_insert_apply_for_table(m_prebuilt->table);
if (!trx->bulk_insert) {
break;
}
@@ -16370,7 +16401,7 @@ ha_innobase::store_lock(
if (lock_type != TL_IGNORE
&& trx->n_mysql_tables_in_use == 0) {
trx->isolation_level = innobase_map_isolation_level(
- (enum_tx_isolation) thd_tx_isolation(thd));
+ (enum_tx_isolation) thd_tx_isolation(thd)) & 3;
if (trx->isolation_level <= TRX_ISO_READ_COMMITTED) {
@@ -16600,6 +16631,13 @@ ha_innobase::get_auto_increment(
if (error != DB_SUCCESS) {
*first_value = (~(ulonglong) 0);
+ /* This is an error case. We do the error handling by calling
+ the error code conversion function. Specifically, we need to
+ call thd_mark_transaction_to_rollback() to inform sql that we
+ have rolled back innodb transaction after a deadlock error. We
+ ignore the returned mysql error code here. */
+ std::ignore = convert_error_code_to_mysql(
+ error, m_prebuilt->table->flags, m_user_thd);
return;
}
@@ -17535,6 +17573,7 @@ innodb_make_page_dirty(THD*, st_mysql_sys_var*, void*, const void* save)
{
mtr_t mtr;
uint space_id = *static_cast<const uint*>(save);
+ srv_fil_make_page_dirty_debug= space_id;
mysql_mutex_unlock(&LOCK_global_system_variables);
fil_space_t* space = fil_space_t::get(space_id);
@@ -18261,13 +18300,15 @@ buf_flush_list_now_set(THD*, st_mysql_sys_var*, void*, const void* save)
return;
const uint s= srv_fil_make_page_dirty_debug;
mysql_mutex_unlock(&LOCK_global_system_variables);
- if (s)
- buf_flush_sync();
- else
+ if (s == 0 || srv_is_undo_tablespace(s))
{
- while (buf_flush_list_space(fil_system.sys_space, nullptr));
+ fil_space_t *space= fil_system.sys_space;
+ if (s) { space= fil_space_get(s); }
+ while (buf_flush_list_space(space, nullptr));
os_aio_wait_until_no_pending_writes(true);
}
+ else
+ buf_flush_sync();
mysql_mutex_lock(&LOCK_global_system_variables);
}
@@ -18452,7 +18493,7 @@ static void innodb_log_file_size_update(THD *thd, st_mysql_sys_var*,
const bool in_progress(buf_pool.get_oldest_modification(LSN_MAX) <
log_sys.resize_in_progress());
if (in_progress)
- my_cond_timedwait(&buf_pool.do_flush_list,
+ my_cond_timedwait(&buf_pool.done_flush_list,
&buf_pool.flush_list_mutex.m_mutex, &abstime);
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
if (!log_sys.resize_in_progress())
@@ -18463,6 +18504,15 @@ static void innodb_log_file_size_update(THD *thd, st_mysql_sys_var*,
mysql_mutex_lock(&LOCK_global_system_variables);
}
+static void innodb_log_spin_wait_delay_update(THD *, st_mysql_sys_var*,
+ void *, const void *save)
+{
+ log_sys.latch.wr_lock(SRW_LOCK_CALL);
+ mtr_t::spin_wait_delay= *static_cast<const unsigned*>(save);
+ mtr_t::finisher_update();
+ log_sys.latch.wr_unlock();
+}
+
/** Update innodb_status_output or innodb_status_output_locks,
which control InnoDB "status monitor" output to the error log.
@param[out] var current value
@@ -19279,10 +19329,10 @@ static MYSQL_SYSVAR_ULONG(page_size, srv_page_size,
NULL, NULL, UNIV_PAGE_SIZE_DEF,
UNIV_PAGE_SIZE_MIN, UNIV_PAGE_SIZE_MAX, 0);
-static MYSQL_SYSVAR_SIZE_T(log_buffer_size, log_sys.buf_size,
+static MYSQL_SYSVAR_UINT(log_buffer_size, log_sys.buf_size,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"Redo log buffer size in bytes.",
- NULL, NULL, 16U << 20, 2U << 20, SIZE_T_MAX, 4096);
+ NULL, NULL, 16U << 20, 2U << 20, log_sys.buf_size_max, 4096);
#if defined __linux__ || defined _WIN32
static MYSQL_SYSVAR_BOOL(log_file_buffering, log_sys.log_buffered,
@@ -19297,6 +19347,12 @@ static MYSQL_SYSVAR_ULONGLONG(log_file_size, srv_log_file_size,
nullptr, innodb_log_file_size_update,
96 << 20, 4 << 20, std::numeric_limits<ulonglong>::max(), 4096);
+static MYSQL_SYSVAR_UINT(log_spin_wait_delay, mtr_t::spin_wait_delay,
+ PLUGIN_VAR_OPCMDARG,
+ "Delay between log buffer spin lock polls (0 to use a blocking latch)",
+ nullptr, innodb_log_spin_wait_delay_update,
+ 0, 0, 6000, 0);
+
static MYSQL_SYSVAR_UINT(old_blocks_pct, innobase_old_blocks_pct,
PLUGIN_VAR_RQCMDARG,
"Percentage of the buffer pool to reserve for 'old' blocks.",
@@ -19756,6 +19812,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(log_file_buffering),
#endif
MYSQL_SYSVAR(log_file_size),
+ MYSQL_SYSVAR(log_spin_wait_delay),
MYSQL_SYSVAR(log_group_home_dir),
MYSQL_SYSVAR(max_dirty_pages_pct),
MYSQL_SYSVAR(max_dirty_pages_pct_lwm),
@@ -19776,6 +19833,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(ft_server_stopword_table),
MYSQL_SYSVAR(ft_user_stopword_table),
MYSQL_SYSVAR(disable_sort_file_cache),
+ MYSQL_SYSVAR(snapshot_isolation),
MYSQL_SYSVAR(stats_on_metadata),
MYSQL_SYSVAR(stats_transient_sample_pages),
MYSQL_SYSVAR(stats_persistent),
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index 1f42bf18..50ac423f 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -209,6 +209,7 @@ public:
int rename_table(const char* from, const char* to) override;
inline int defragment_table();
int check(THD* thd, HA_CHECK_OPT* check_opt) override;
+ int check_for_upgrade(HA_CHECK_OPT* check_opt) override;
inline void reload_statistics();
@@ -909,6 +910,12 @@ unsigned
innodb_col_no(const Field* field)
MY_ATTRIBUTE((nonnull, warn_unused_result));
+/** Get the maximum integer value of a numeric column.
+@param field column definition
+@return maximum allowed integer value */
+ulonglong innobase_get_int_col_max_value(const Field *field)
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
+
/********************************************************************//**
Helper function to push frm mismatch error to error log and
if needed to sql-layer. */
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 1401136f..6689b9ef 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -864,6 +864,9 @@ my_error_innodb(
case DB_DEADLOCK:
my_error(ER_LOCK_DEADLOCK, MYF(0));
break;
+ case DB_RECORD_CHANGED:
+ my_error(ER_CHECKREAD, MYF(0), table);
+ break;
case DB_LOCK_WAIT_TIMEOUT:
my_error(ER_LOCK_WAIT_TIMEOUT, MYF(0));
break;
@@ -1458,11 +1461,6 @@ struct ha_innobase_inplace_ctx : public inplace_alter_handler_ctx
}
};
-/********************************************************************//**
-Get the upper limit of the MySQL integral and floating-point type.
-@return maximum allowed value for the field */
-ulonglong innobase_get_int_col_max_value(const Field *field);
-
/** Determine if fulltext indexes exist in a given table.
@param table MySQL table
@return number of fulltext indexes */
@@ -1730,11 +1728,9 @@ instant_alter_column_possible(
ut_ad(!is_null || nullable);
n_nullable += nullable;
n_add++;
- uint l;
+ uint l = (*af)->pack_length();
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
@@ -1748,7 +1744,6 @@ instant_alter_column_possible(
if (!is_null) {
min_size += l;
}
- l = (*af)->pack_length();
max_size += l;
lenlen += l > 255 ? 2 : 1;
}
@@ -1762,7 +1757,6 @@ instant_alter_column_possible(
((*af))->get_length();
goto variable_length;
default:
- l = (*af)->pack_length();
if (l > 255 && ib_table.not_redundant()) {
goto variable_length;
}
@@ -2748,6 +2742,9 @@ cannot_create_many_fulltext_index:
online = false;
}
+ static constexpr const char *not_implemented
+ = "Not implemented for system-versioned operations";
+
if (ha_alter_info->handler_flags
& ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX) {
/* ADD FULLTEXT|SPATIAL INDEX requires a lock.
@@ -2775,6 +2772,12 @@ cannot_create_many_fulltext_index:
goto cannot_create_many_fulltext_index;
}
+ if (altered_table->versioned()) {
+ ha_alter_info->unsupported_reason
+ = not_implemented;
+ DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
+ }
+
add_fulltext = true;
if (ha_alter_info->online
&& !ha_alter_info->unsupported_reason) {
@@ -2811,12 +2814,18 @@ cannot_create_many_fulltext_index:
}
}
+ if (m_prebuilt->table->is_stats_table()) {
+ if (ha_alter_info->online) {
+ ha_alter_info->unsupported_reason =
+ table_share->table_name.str;
+ }
+ online= false;
+ }
+
// FIXME: implement Online DDL for system-versioned operations
if (ha_alter_info->handler_flags & INNOBASE_ALTER_VERSIONED_REBUILD) {
-
if (ha_alter_info->online) {
- ha_alter_info->unsupported_reason =
- "Not implemented for system-versioned operations";
+ ha_alter_info->unsupported_reason = not_implemented;
}
online = false;
@@ -7444,6 +7453,7 @@ error_handled:
row_mysql_lock_data_dictionary(ctx->trx);
} else {
row_merge_drop_indexes(ctx->trx, user_table, true);
+ user_table->indexes.start->online_log = nullptr;
ctx->trx->commit();
}
@@ -9865,13 +9875,7 @@ commit_set_autoinc(
const dict_col_t* autoinc_col
= dict_table_get_nth_col(ctx->old_table,
innodb_col_no(ai));
- dict_index_t* index
- = dict_table_get_first_index(ctx->old_table);
- while (index != NULL
- && index->fields[0].col != autoinc_col) {
- index = dict_table_get_next_index(index);
- }
-
+ auto index = ctx->old_table->get_index(*autoinc_col);
ut_ad(index);
ib_uint64_t max_in_table = index
@@ -10246,6 +10250,7 @@ when rebuilding the table.
@param ctx In-place ALTER TABLE context
@param altered_table MySQL table that is being altered
@param old_table MySQL table as it is before the ALTER operation
+@param statistics_exist whether to update InnoDB persistent statistics
@param trx Data dictionary transaction
@param table_name Table name in MySQL
@retval true Failure
@@ -10519,6 +10524,7 @@ when not rebuilding the table.
@param ha_alter_info Data used during in-place alter
@param ctx In-place ALTER TABLE context
@param old_table MySQL table as it is before the ALTER operation
+@param statistics_exist whether to update InnoDB persistent statistics
@param trx Data dictionary transaction
@param table_name Table name in MySQL
@retval true Failure
@@ -10532,6 +10538,7 @@ commit_try_norebuild(
ha_innobase_inplace_ctx*ctx,
TABLE* altered_table,
const TABLE* old_table,
+ bool statistics_exist,
trx_t* trx,
const char* table_name)
{
@@ -10646,6 +10653,10 @@ commit_try_norebuild(
goto handle_error;
}
+ if (!statistics_exist) {
+ continue;
+ }
+
error = dict_stats_delete_from_index_stats(db, table,
index->name, trx);
switch (error) {
@@ -10657,7 +10668,8 @@ commit_try_norebuild(
}
}
- if (const size_t size = ha_alter_info->rename_keys.size()) {
+ if (!statistics_exist) {
+ } else if (const size_t size = ha_alter_info->rename_keys.size()) {
char tmp_name[5];
char db[MAX_DB_UTF8_LEN], table[MAX_TABLE_UTF8_LEN];
@@ -11224,16 +11236,7 @@ ha_innobase::commit_inplace_alter_table(
fts_optimize_remove_table(ctx->old_table);
}
- dict_sys.freeze(SRW_LOCK_CALL);
- for (auto f : ctx->old_table->referenced_set) {
- if (dict_table_t* child = f->foreign_table) {
- error = lock_table_for_trx(child, trx, LOCK_X);
- if (error != DB_SUCCESS) {
- break;
- }
- }
- }
- dict_sys.unfreeze();
+ error = lock_table_children(ctx->old_table, trx);
if (ctx->new_table->fts) {
ut_ad(!ctx->new_table->fts->add_wq);
@@ -11413,6 +11416,8 @@ err_index:
}
}
+ DEBUG_SYNC(m_user_thd, "innodb_commit_inplace_before_lock");
+
DBUG_EXECUTE_IF("stats_lock_fail",
error = DB_LOCK_WAIT_TIMEOUT;
trx_rollback_for_mysql(trx););
@@ -11496,7 +11501,9 @@ fail:
goto fail;
}
} else if (commit_try_norebuild(ha_alter_info, ctx,
- altered_table, table, trx,
+ altered_table, table,
+ table_stats && index_stats,
+ trx,
table_share->table_name.str)) {
goto fail;
}
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index 4ec07b81..e77401ed 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -24,6 +24,7 @@ Insert buffer
Created 7/19/1997 Heikki Tuuri
*******************************************************/
+#include <tuple>
#include "ibuf0ibuf.h"
#include "btr0sea.h"
@@ -1833,7 +1834,7 @@ corrupted:
err = flst_add_last(ibuf_root, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
block, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE,
- &mtr);
+ fil_system.sys_space->free_limit, &mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
goto corrupted;
}
@@ -1864,7 +1865,6 @@ Removes a page from the free list and frees it to the fsp system. */
static void ibuf_remove_free_page()
{
mtr_t mtr;
- mtr_t mtr2;
page_t* header_page;
log_free_check();
@@ -1891,26 +1891,28 @@ early_exit:
return;
}
- ibuf_mtr_start(&mtr2);
-
- buf_block_t* root = ibuf_tree_root_get(&mtr2);
+ buf_block_t* root = ibuf_tree_root_get(&mtr);
if (UNIV_UNLIKELY(!root)) {
- ibuf_mtr_commit(&mtr2);
goto early_exit;
}
- mysql_mutex_unlock(&ibuf_mutex);
-
+ const auto root_savepoint = mtr.get_savepoint() - 1;
const uint32_t page_no = flst_get_last(PAGE_HEADER
+ PAGE_BTR_IBUF_FREE_LIST
+ root->page.frame).page;
+ if (page_no >= fil_system.sys_space->free_limit) {
+ goto early_exit;
+ }
+
+ mysql_mutex_unlock(&ibuf_mutex);
+
/* NOTE that we must release the latch on the ibuf tree root
because in fseg_free_page we access level 1 pages, and the root
is a level 2 page. */
-
- ibuf_mtr_commit(&mtr2);
+ root->page.lock.u_unlock();
+ mtr.lock_register(root_savepoint, MTR_MEMO_BUF_FIX);
ibuf_exit(&mtr);
/* Since pessimistic inserts were prevented, we know that the
@@ -1933,15 +1935,7 @@ early_exit:
ibuf_enter(&mtr);
mysql_mutex_lock(&ibuf_mutex);
-
- root = ibuf_tree_root_get(&mtr, &err);
- if (UNIV_UNLIKELY(!root)) {
- mysql_mutex_unlock(&ibuf_pessimistic_insert_mutex);
- goto func_exit;
- }
-
- ut_ad(page_no == flst_get_last(PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST
- + root->page.frame).page);
+ mtr.upgrade_buffer_fix(root_savepoint, RW_X_LATCH);
/* Remove the page from the free list and update the ibuf size data */
if (buf_block_t* block =
@@ -1950,7 +1944,7 @@ early_exit:
err = flst_remove(root, PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
block,
PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE,
- &mtr);
+ fil_system.sys_space->free_limit, &mtr);
}
mysql_mutex_unlock(&ibuf_pessimistic_insert_mutex);
@@ -2332,7 +2326,8 @@ func_exit:
/** Merge the change buffer to some pages. */
static void ibuf_read_merge_pages(const uint32_t* space_ids,
- const uint32_t* page_nos, ulint n_stored)
+ const uint32_t* page_nos, ulint n_stored,
+ bool slow_shutdown_cleanup)
{
for (ulint i = 0; i < n_stored; i++) {
const uint32_t space_id = space_ids[i];
@@ -2357,30 +2352,28 @@ tablespace_deleted:
if (UNIV_LIKELY(page_nos[i] < size)) {
mtr.start();
dberr_t err;
- buf_block_t *block =
+ /* Load the page and apply change buffers. */
+ std::ignore =
buf_page_get_gen(page_id_t(space_id, page_nos[i]),
zip_size, RW_X_LATCH, nullptr,
BUF_GET_POSSIBLY_FREED,
&mtr, &err, true);
- bool remove = !block
- || fil_page_get_type(block->page.frame)
- != FIL_PAGE_INDEX
- || !page_is_leaf(block->page.frame);
mtr.commit();
if (err == DB_TABLESPACE_DELETED) {
s->x_unlock();
goto tablespace_deleted;
}
- if (!remove) {
- s->x_unlock();
- continue;
- }
}
s->x_unlock();
- if (srv_shutdown_state == SRV_SHUTDOWN_NONE
- || srv_fast_shutdown) {
+ /* During slow shutdown cleanup, we apply all pending IBUF
+ changes and need to cleanup any left-over IBUF records. There
+ are a few cases when the changes are already discarded and IBUF
+ bitmap is cleaned but we miss to delete the record. Even after
+ the issues are fixed, we need to keep this safety measure for
+ upgraded DBs with such left over records. */
+ if (!slow_shutdown_cleanup) {
continue;
}
@@ -2451,7 +2444,7 @@ ATTRIBUTE_COLD ulint ibuf_contract()
space_ids, page_nos, &n_pages);
ibuf_mtr_commit(&mtr);
- ibuf_read_merge_pages(space_ids, page_nos, n_pages);
+ ibuf_read_merge_pages(space_ids, page_nos, n_pages, true);
return(sum_sizes + 1);
}
@@ -2532,7 +2525,7 @@ ibuf_merge_space(
}
#endif /* UNIV_DEBUG */
- ibuf_read_merge_pages(spaces, pages, n_pages);
+ ibuf_read_merge_pages(spaces, pages, n_pages, false);
}
return(n_pages);
diff --git a/storage/innobase/include/btr0btr.h b/storage/innobase/include/btr0btr.h
index b42c543c..83bdaa97 100644
--- a/storage/innobase/include/btr0btr.h
+++ b/storage/innobase/include/btr0btr.h
@@ -189,13 +189,16 @@ btr_read_autoinc(dict_index_t* index)
/** Read the last used AUTO_INCREMENT value from PAGE_ROOT_AUTO_INC,
or fall back to MAX(auto_increment_column).
-@param[in] table table containing an AUTO_INCREMENT column
-@param[in] col_no index of the AUTO_INCREMENT column
-@return the AUTO_INCREMENT value
-@retval 0 on error or if no AUTO_INCREMENT value was used yet */
-ib_uint64_t
-btr_read_autoinc_with_fallback(const dict_table_t* table, unsigned col_no)
- MY_ATTRIBUTE((nonnull, warn_unused_result));
+@param table table containing an AUTO_INCREMENT column
+@param col_no index of the AUTO_INCREMENT column
+@param mysql_version TABLE_SHARE::mysql_version
+@param max the maximum value of the AUTO_INCREMENT column
+@return the AUTO_INCREMENT value
+@retval 0 on error or if no AUTO_INCREMENT value was used yet */
+uint64_t btr_read_autoinc_with_fallback(const dict_table_t *table,
+ unsigned col_no, ulong mysql_version,
+ uint64_t max)
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Write the next available AUTO_INCREMENT value to PAGE_ROOT_AUTO_INC.
@param[in,out] index clustered index
diff --git a/storage/innobase/include/btr0pcur.h b/storage/innobase/include/btr0pcur.h
index c66a3bfa..5f84328d 100644
--- a/storage/innobase/include/btr0pcur.h
+++ b/storage/innobase/include/btr0pcur.h
@@ -28,7 +28,6 @@ Created 2/23/1996 Heikki Tuuri
#include "dict0dict.h"
#include "btr0cur.h"
-#include "buf0block_hint.h"
#include "btr0btr.h"
#include "gis0rtree.h"
@@ -332,8 +331,8 @@ struct btr_pcur_t
/** BTR_PCUR_ON, BTR_PCUR_BEFORE, or BTR_PCUR_AFTER, depending on
whether cursor was on, before, or after the old_rec record */
btr_pcur_pos_t rel_pos= btr_pcur_pos_t(0);
- /** buffer block when the position was stored */
- buf::Block_hint block_when_stored;
+ /** the page identifier of old_rec */
+ page_id_t old_page_id{0,0};
/** the modify clock value of the buffer block when the cursor position
was stored */
ib_uint64_t modify_clock= 0;
@@ -432,7 +431,8 @@ btr_pcur_open(
}
/** Open a cursor on the first user record satisfying the search condition;
-in case of no match, after the last index record. */
+in case of no match, after the last index record.
+@return DB_SUCCESS or error code */
MY_ATTRIBUTE((nonnull, warn_unused_result))
inline
dberr_t
diff --git a/storage/innobase/include/buf0block_hint.h b/storage/innobase/include/buf0block_hint.h
deleted file mode 100644
index d4fee7c1..00000000
--- a/storage/innobase/include/buf0block_hint.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 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, version 2.0, as published by the
-Free Software Foundation.
-
-This program is also distributed with certain software (including but not
-limited to OpenSSL) that is licensed under separate terms, as designated in a
-particular file or component or in included license documentation. The authors
-of MySQL hereby grant you an additional permission to link the program and
-your derivative works with the separately licensed software that they have
-included with MySQL.
-
-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, version 2.0,
-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
-
-*****************************************************************************/
-#pragma once
-#include "buf0buf.h"
-
-namespace buf {
-class Block_hint {
-public:
- /** Stores the pointer to the block, which is currently buffer-fixed.
- @param block a pointer to a buffer-fixed block to be stored */
- inline void store(buf_block_t *block)
- {
- ut_ad(block->page.buf_fix_count());
- m_block= block;
- m_page_id= block->page.id();
- }
-
- /** Clears currently stored pointer. */
- inline void clear() { m_block= nullptr; }
-
- /** Invoke f on m_block(which may be null)
- @param f The function to be executed. It will be passed the pointer.
- If you wish to use the block pointer subsequently,
- you need to ensure you buffer-fix it before returning from f.
- @return the return value of f
- */
- template <typename F>
- bool run_with_hint(const F &f)
- {
- buffer_fix_block_if_still_valid();
- /* m_block could be changed during f() call, so we use local
- variable to remember which block we need to unfix */
- buf_block_t *block= m_block;
- bool res= f(block);
- if (block)
- block->page.unfix();
- return res;
- }
-
- buf_block_t *block() const { return m_block; }
-
- private:
- /** The block pointer stored by store(). */
- buf_block_t *m_block= nullptr;
- /** If m_block is non-null, the m_block->page.id at time it was stored. */
- page_id_t m_page_id{0, 0};
-
- /** A helper function which checks if m_block is not a dangling pointer and
- still points to block with page with m_page_id and if so, buffer-fixes it,
- otherwise clear()s it */
- void buffer_fix_block_if_still_valid();
-};
-} // namespace buf
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index cd7cc294..c291615c 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -158,14 +158,25 @@ buf_block_free(
#define buf_page_get(ID, SIZE, LA, MTR) \
buf_page_get_gen(ID, SIZE, LA, NULL, BUF_GET, MTR)
-/** Try to acquire a page latch.
-@param rw_latch RW_S_LATCH or RW_X_LATCH
+/** Try to buffer-fix a page.
@param block guessed block
+@param id expected block->page.id()
+@return block if it was buffer-fixed
+@retval nullptr if the block no longer is valid */
+buf_block_t *buf_page_optimistic_fix(buf_block_t *block, page_id_t id)
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
+
+/** Try to acquire a page latch after buf_page_optimistic_fix().
+@param block buffer-fixed block
+@param rw_latch RW_S_LATCH or RW_X_LATCH
@param modify_clock expected value of block->modify_clock
@param mtr mini-transaction
-@return whether the latch was acquired (the page is an allocated file page) */
-bool buf_page_optimistic_get(ulint rw_latch, buf_block_t *block,
- uint64_t modify_clock, mtr_t *mtr);
+@return block if the latch was acquired
+@retval nullptr if block->unfix() was called because it no longer is valid */
+buf_block_t *buf_page_optimistic_get(buf_block_t *block,
+ rw_lock_type_t rw_latch,
+ uint64_t modify_clock, mtr_t *mtr)
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Try to S-latch a page.
Suitable for using when holding the lock_sys latches (as it avoids deadlock).
@@ -292,15 +303,6 @@ void
buf_block_modify_clock_inc(
/*=======================*/
buf_block_t* block); /*!< in: block */
-/********************************************************************//**
-Returns the value of the modify clock. The caller must have an s-lock
-or x-lock on the block.
-@return value */
-UNIV_INLINE
-ib_uint64_t
-buf_block_get_modify_clock(
-/*=======================*/
- buf_block_t* block); /*!< in: block */
#endif /* !UNIV_INNOCHECKSUM */
/** Check if a buffer is all zeroes.
@@ -771,17 +773,16 @@ public:
@retval DB_FAIL if the page contains the wrong ID */
dberr_t read_complete(const fil_node_t &node);
- /** Note that a block is no longer dirty, while not removing
- it from buf_pool.flush_list
- @param temporary whether the page belongs to the temporary tablespace
- @param error whether an error may have occurred while writing */
- inline void write_complete(bool temporary, bool error);
+ /** Release a write fix after a page write was completed.
+ @param persistent whether the page belongs to a persistent tablespace
+ @param error whether an error may have occurred while writing
+ @param state recently read state() value with the correct io-fix */
+ void write_complete(bool persistent, bool error, uint32_t state);
/** Write a flushable page to a file or free a freeable block.
- @param evict whether to evict the page on write completion
@param space tablespace
@return whether a page write was initiated and buf_pool.mutex released */
- bool flush(bool evict, fil_space_t *space);
+ bool flush(fil_space_t *space);
/** Notify that a page in a temporary tablespace has been modified. */
void set_temp_modified()
@@ -1756,10 +1757,6 @@ public:
/** Decrement the number of pending LRU flush */
inline void n_flush_dec();
- /** Decrement the number of pending LRU flush
- while holding flush_list_mutex */
- inline void n_flush_dec_holding_mutex();
-
/** @return whether flush_list flushing is active */
bool flush_list_active() const
{
@@ -1912,6 +1909,9 @@ public:
/** Free a page whose underlying file page has been freed. */
ATTRIBUTE_COLD void release_freed_page(buf_page_t *bpage) noexcept;
+ /** Issue a warning that we could not free up buffer pool pages. */
+ ATTRIBUTE_COLD void LRU_warn();
+
private:
/** Temporary memory for page_compressed and encrypted I/O */
struct io_buf_t
diff --git a/storage/innobase/include/buf0buf.inl b/storage/innobase/include/buf0buf.inl
index b3158cf1..050c8493 100644
--- a/storage/innobase/include/buf0buf.inl
+++ b/storage/innobase/include/buf0buf.inl
@@ -116,17 +116,3 @@ buf_block_modify_clock_inc(
block->modify_clock++;
}
-
-/********************************************************************//**
-Returns the value of the modify clock. The caller must have an s-lock
-or x-lock on the block.
-@return value */
-UNIV_INLINE
-ib_uint64_t
-buf_block_get_modify_clock(
-/*=======================*/
- buf_block_t* block) /*!< in: block */
-{
- ut_ad(block->page.lock.have_any());
- return(block->modify_clock);
-}
diff --git a/storage/innobase/include/buf0flu.h b/storage/innobase/include/buf0flu.h
index 0cce514b..cc32a38a 100644
--- a/storage/innobase/include/buf0flu.h
+++ b/storage/innobase/include/buf0flu.h
@@ -85,16 +85,6 @@ buf_flush_init_for_writing(
bool buf_flush_list_space(fil_space_t *space, ulint *n_flushed= nullptr)
MY_ATTRIBUTE((warn_unused_result));
-/** Write out dirty blocks from buf_pool.LRU,
-and move clean blocks to buf_pool.free.
-The caller must invoke buf_dblwr.flush_buffered_writes()
-after releasing buf_pool.mutex.
-@param max_n wished maximum mumber of blocks flushed
-@param evict whether to evict pages after flushing
-@return evict ? number of processed pages : number of pages written
-@retval 0 if a buf_pool.LRU batch is already running */
-ulint buf_flush_LRU(ulint max_n, bool evict);
-
/** Wait until a LRU flush batch ends. */
void buf_flush_wait_LRU_batch_end();
/** Wait until all persistent pages are flushed up to a limit.
diff --git a/storage/innobase/include/cache.h b/storage/innobase/include/cache.h
new file mode 100644
index 00000000..0647cbe6
--- /dev/null
+++ b/storage/innobase/include/cache.h
@@ -0,0 +1,33 @@
+/*****************************************************************************
+
+Copyright (c) 2024, MariaDB plc
+
+This program is free 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
+
+*****************************************************************************/
+
+#pragma once
+#include <cstddef>
+
+#if defined __x86_64__ || defined __aarch64__ || defined __powerpc64__
+struct pmem_control
+{
+ void (*persist)(const void *, size_t);
+public:
+ pmem_control();
+};
+extern const pmem_control pmem;
+# define pmem_persist(buf, size) pmem.persist(buf, size)
+#else
+void pmem_persist(const void *buf, size_t size);
+#endif
diff --git a/storage/innobase/include/data0data.h b/storage/innobase/include/data0data.h
index a5356e0d..fcb543eb 100644
--- a/storage/innobase/include/data0data.h
+++ b/storage/innobase/include/data0data.h
@@ -339,15 +339,12 @@ dtuple_set_types_binary(
dtuple_t* tuple, /*!< in: data tuple */
ulint n) /*!< in: number of fields to set */
MY_ATTRIBUTE((nonnull));
-/**********************************************************************//**
-Checks if a dtuple contains an SQL null value.
-@return TRUE if some field is SQL null */
+/** Checks if a dtuple contains an SQL null value.
+@param tuple tuple
+@param fields_number number of fields in the tuple to check
+@return true if some field is SQL null */
UNIV_INLINE
-ibool
-dtuple_contains_null(
-/*=================*/
- const dtuple_t* tuple) /*!< in: dtuple */
- MY_ATTRIBUTE((nonnull, warn_unused_result));
+bool dtuple_contains_null(const dtuple_t *tuple, ulint fields_number = 0);
/**********************************************************//**
Checks that a data field is typed. Asserts an error if not.
@return TRUE if ok */
diff --git a/storage/innobase/include/data0data.inl b/storage/innobase/include/data0data.inl
index 2d1bf5a2..b6c6ace8 100644
--- a/storage/innobase/include/data0data.inl
+++ b/storage/innobase/include/data0data.inl
@@ -596,28 +596,18 @@ data_write_sql_null(
memset(data, 0, len);
}
-/**********************************************************************//**
-Checks if a dtuple contains an SQL null value.
-@return TRUE if some field is SQL null */
+/** Checks if a dtuple contains an SQL null value.
+@param tuple tuple
+@param fields_number number of fields in the tuple to check
+@return true if some field is SQL null */
UNIV_INLINE
-ibool
-dtuple_contains_null(
-/*=================*/
- const dtuple_t* tuple) /*!< in: dtuple */
+bool dtuple_contains_null(const dtuple_t *tuple, ulint fields_number)
{
- ulint n;
- ulint i;
-
- n = dtuple_get_n_fields(tuple);
-
- for (i = 0; i < n; i++) {
- if (dfield_is_null(dtuple_get_nth_field(tuple, i))) {
-
- return(TRUE);
- }
- }
-
- return(FALSE);
+ ulint n= fields_number ? fields_number : dtuple_get_n_fields(tuple);
+ for (ulint i= 0; i < n; i++)
+ if (dfield_is_null(dtuple_get_nth_field(tuple, i)))
+ return true;
+ return false;
}
/**************************************************************//**
diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h
index 64182aab..960ec390 100644
--- a/storage/innobase/include/db0err.h
+++ b/storage/innobase/include/db0err.h
@@ -32,23 +32,25 @@ Created 5/24/1996 Heikki Tuuri
enum dberr_t {
DB_SUCCESS,
- DB_SUCCESS_LOCKED_REC = 9, /*!< like DB_SUCCESS, but a new
+ DB_SUCCESS_LOCKED_REC= 9, /*!< like DB_SUCCESS, but a new
explicit record lock was created */
/* The following are error codes */
- DB_ERROR = 11,
+ DB_RECORD_CHANGED,
+ DB_ERROR,
DB_INTERRUPTED,
DB_OUT_OF_MEMORY,
DB_OUT_OF_FILE_SPACE,
DB_LOCK_WAIT,
DB_DEADLOCK,
- DB_ROLLBACK,
DB_DUPLICATE_KEY,
DB_MISSING_HISTORY, /*!< required history data has been
deleted due to lack of space in
rollback segment */
- DB_CLUSTER_NOT_FOUND = 30,
- DB_TABLE_NOT_FOUND,
+#ifdef WITH_WSREP
+ DB_ROLLBACK,
+#endif
+ DB_TABLE_NOT_FOUND= 31,
DB_TOO_BIG_RECORD, /*!< a record in an index would not fit
on a compressed page, or it would
become bigger than 1/2 free space in
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 5fafb2c5..3baac658 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -35,6 +35,7 @@ Created 1/8/1996 Heikki Tuuri
#include <my_sys.h>
#include <deque>
+class MDL_context;
class MDL_ticket;
/** the first table or index ID for other than hard-coded system tables */
@@ -139,6 +140,21 @@ dict_acquire_mdl_shared(dict_table_t *table,
MDL_ticket **mdl,
dict_table_op_t table_op= DICT_TABLE_OP_NORMAL);
+/** Acquire MDL shared for the table name.
+@tparam trylock whether to use non-blocking operation
+@param[in,out] table table object
+@param[in,out] mdl_context MDL context
+@param[out] mdl MDL ticket
+@param[in] table_op operation to perform when opening
+@return table object after locking MDL shared
+@retval nullptr if the table is not readable, or if trylock && MDL blocked */
+template<bool trylock>
+__attribute__((nonnull, warn_unused_result))
+dict_table_t*
+dict_acquire_mdl_shared(dict_table_t *table,
+ MDL_context *mdl_context, MDL_ticket **mdl,
+ dict_table_op_t table_op);
+
/** Look up a table by numeric identifier.
@param[in] table_id table identifier
@param[in] dict_locked data dictionary locked
@@ -1314,13 +1330,7 @@ class dict_sys_t
std::atomic<ulonglong> latch_ex_wait_start;
/** the rw-latch protecting the data dictionary cache */
- alignas(CPU_LEVEL1_DCACHE_LINESIZE) srw_lock latch;
-#ifdef UNIV_DEBUG
- /** whether latch is being held in exclusive mode (by any thread) */
- Atomic_relaxed<pthread_t> latch_ex;
- /** number of S-latch holders */
- Atomic_counter<uint32_t> latch_readers;
-#endif
+ alignas(CPU_LEVEL1_DCACHE_LINESIZE) IF_DBUG(srw_lock_debug,srw_lock) latch;
public:
/** Indexes of SYS_TABLE[] */
enum
@@ -1488,15 +1498,12 @@ public:
}
#ifdef UNIV_DEBUG
- /** @return whether any thread (not necessarily the current thread)
- is holding the latch; that is, this check may return false
- positives */
- bool frozen() const { return latch_readers || latch_ex; }
- /** @return whether any thread (not necessarily the current thread)
- is holding a shared latch */
- bool frozen_not_locked() const { return latch_readers; }
+ /** @return whether the current thread is holding the latch */
+ bool frozen() const { return latch.have_any(); }
+ /** @return whether the current thread is holding a shared latch */
+ bool frozen_not_locked() const { return latch.have_rd(); }
/** @return whether the current thread holds the exclusive latch */
- bool locked() const { return latch_ex == pthread_self(); }
+ bool locked() const { return latch.have_wr(); }
#endif
private:
/** Acquire the exclusive latch */
@@ -1511,13 +1518,7 @@ public:
/** Exclusively lock the dictionary cache. */
void lock(SRW_LOCK_ARGS(const char *file, unsigned line))
{
- if (latch.wr_lock_try())
- {
- ut_ad(!latch_readers);
- ut_ad(!latch_ex);
- ut_d(latch_ex= pthread_self());
- }
- else
+ if (!latch.wr_lock_try())
lock_wait(SRW_LOCK_ARGS(file, line));
}
@@ -1530,27 +1531,11 @@ public:
ATTRIBUTE_NOINLINE void unfreeze();
#else
/** Unlock the data dictionary cache. */
- void unlock()
- {
- ut_ad(latch_ex == pthread_self());
- ut_ad(!latch_readers);
- ut_d(latch_ex= 0);
- latch.wr_unlock();
- }
+ void unlock() { latch.wr_unlock(); }
/** Acquire a shared lock on the dictionary cache. */
- void freeze()
- {
- latch.rd_lock();
- ut_ad(!latch_ex);
- ut_d(latch_readers++);
- }
+ void freeze() { latch.rd_lock(); }
/** Release a shared lock on the dictionary cache. */
- void unfreeze()
- {
- ut_ad(!latch_ex);
- ut_ad(latch_readers--);
- latch.rd_unlock();
- }
+ void unfreeze() { latch.rd_unlock(); }
#endif
/** Estimate the used memory occupied by the data dictionary
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index fde2a714..0268a280 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -1010,8 +1010,6 @@ struct dict_index_t {
/*!< number of columns the user defined to
be in the index: in the internal
representation we add more columns */
- unsigned nulls_equal:1;
- /*!< if true, SQL NULL == SQL NULL */
unsigned n_uniq:10;/*!< number of fields from the beginning
which are enough to determine an index
entry uniquely */
@@ -2448,6 +2446,9 @@ public:
/** @return number of unique columns in FTS_DOC_ID index */
unsigned fts_n_uniq() const { return versioned() ? 2 : 1; }
+ /** @return the index for that starts with a specific column */
+ dict_index_t *get_index(const dict_col_t &col) const;
+
/** Create metadata.
@param name table name
@param space tablespace
diff --git a/storage/innobase/include/dict0mem.inl b/storage/innobase/include/dict0mem.inl
index d60ee5d9..edb7cf92 100644
--- a/storage/innobase/include/dict0mem.inl
+++ b/storage/innobase/include/dict0mem.inl
@@ -63,6 +63,5 @@ dict_mem_fill_index_struct(
& index->MAX_N_FIELDS;
/* The '1 +' above prevents allocation
of an empty mem block */
- index->nulls_equal = false;
ut_d(index->magic_n = DICT_INDEX_MAGIC_N);
}
diff --git a/storage/innobase/include/dyn0buf.h b/storage/innobase/include/dyn0buf.h
index 06af4dcc..7a4e6760 100644
--- a/storage/innobase/include/dyn0buf.h
+++ b/storage/innobase/include/dyn0buf.h
@@ -57,11 +57,7 @@ public:
/**
Gets the number of used bytes in a block.
@return number of bytes used */
- ulint used() const
- MY_ATTRIBUTE((warn_unused_result))
- {
- return(static_cast<ulint>(m_used & ~DYN_BLOCK_FULL_FLAG));
- }
+ uint32_t used() const { return m_used; }
/**
Gets pointer to the start of data.
@@ -153,8 +149,7 @@ public:
/** Storage */
byte m_data[MAX_DATA_SIZE];
- /** number of data bytes used in this block;
- DYN_BLOCK_FULL_FLAG is set when the block becomes full */
+ /** number of data bytes used in this block */
uint32_t m_used;
friend class mtr_buf_t;
diff --git a/storage/innobase/include/dyn0types.h b/storage/innobase/include/dyn0types.h
index 83d0b0d6..af7f663d 100644
--- a/storage/innobase/include/dyn0types.h
+++ b/storage/innobase/include/dyn0types.h
@@ -33,7 +33,4 @@ Created 2013-03-16 Sunny Bains
/** This is the initial 'payload' size of a dynamic array */
#define DYN_ARRAY_DATA_SIZE 512
-/** Flag for dyn_block_t::used that indicates a full block */
-#define DYN_BLOCK_FULL_FLAG 0x1000000UL
-
#endif /* dyn0types_h */
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index cdc32515..dfda1178 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -63,7 +63,7 @@ enum srv_flush_t
SRV_LITTLESYNC,
/** do not flush after writing */
SRV_NOSYNC,
- /** invoke os_file_set_nocache() on data files. This implies using
+ /** Open or create files with O_DIRECT. This implies using
unbuffered I/O but still fdatasync(), because some filesystems might
not flush meta-data on write completion */
SRV_O_DIRECT,
@@ -347,7 +347,6 @@ struct fil_space_t final
~fil_space_t()
{
ut_ad(!latch_owner);
- ut_ad(!latch_count);
latch.destroy();
}
@@ -411,9 +410,9 @@ private:
/** The reference count */
static constexpr uint32_t PENDING= ~(STOPPING | CLOSING | NEEDS_FSYNC);
/** latch protecting all page allocation bitmap pages */
- srw_lock latch;
+ IF_DBUG(srw_lock_debug, srw_lock) latch;
+ /** the thread that holds the exclusive latch, or 0 */
pthread_t latch_owner;
- ut_d(Atomic_relaxed<uint32_t> latch_count;)
public:
/** MariaDB encryption data */
fil_space_crypt_t *crypt_data;
@@ -1004,40 +1003,32 @@ public:
bool recheck, bool encrypt);
#ifdef UNIV_DEBUG
- bool is_latched() const { return latch_count != 0; }
+ bool is_latched() const { return latch.have_any(); }
#endif
- bool is_owner() const { return latch_owner == pthread_self(); }
+ bool is_owner() const
+ {
+ const bool owner{latch_owner == pthread_self()};
+ ut_ad(owner == latch.have_wr());
+ return owner;
+ }
/** Acquire the allocation latch in exclusive mode */
void x_lock()
{
latch.wr_lock(SRW_LOCK_CALL);
ut_ad(!latch_owner);
latch_owner= pthread_self();
- ut_ad(!latch_count.fetch_add(1));
}
/** Release the allocation latch from exclusive mode */
void x_unlock()
{
- ut_ad(latch_count.fetch_sub(1) == 1);
ut_ad(latch_owner == pthread_self());
latch_owner= 0;
latch.wr_unlock();
}
/** Acquire the allocation latch in shared mode */
- void s_lock()
- {
- ut_ad(!is_owner());
- latch.rd_lock(SRW_LOCK_CALL);
- ut_ad(!latch_owner);
- ut_d(latch_count.fetch_add(1));
- }
+ void s_lock() { latch.rd_lock(SRW_LOCK_CALL); }
/** Release the allocation latch from shared mode */
- void s_unlock()
- {
- ut_ad(latch_count.fetch_sub(1));
- ut_ad(!latch_owner);
- latch.rd_unlock();
- }
+ void s_unlock() { latch.rd_unlock(); }
typedef span<const char> name_type;
@@ -1637,17 +1628,34 @@ void fil_close_tablespace(uint32_t id);
/*******************************************************************//**
Allocates and builds a file name from a path, a table or tablespace name
and a suffix. The string must be freed by caller with ut_free().
-@param[in] path NULL or the directory path or the full path and filename.
+@param[in] path nullptr or the directory path or the full path and filename
@param[in] name {} if path is full, or Table/Tablespace name
-@param[in] ext the file extension to use
-@param[in] trim_name true if the last name on the path should be trimmed.
+@param[in] extension the file extension to use
+@param[in] trim_name true if the last name on the path should be trimmed
@return own: file name */
-char* fil_make_filepath(const char *path, const fil_space_t::name_type &name,
- ib_extention ext, bool trim_name);
+char* fil_make_filepath_low(const char *path,
+ const fil_space_t::name_type &name,
+ ib_extention extension, bool trim_name);
char *fil_make_filepath(const char* path, const table_name_t name,
ib_extention suffix, bool strip_name);
+/** Wrapper function over fil_make_filepath_low to build file name.
+@param path nullptr or the directory path or the full path and filename
+@param name {} if path is full, or Table/Tablespace name
+@param extension the file extension to use
+@param trim_name true if the last name on the path should be trimmed
+@return own: file name */
+static inline char*
+fil_make_filepath(const char* path, const fil_space_t::name_type &name,
+ ib_extention extension, bool trim_name)
+{
+ /* If we are going to strip a name off the path, there better be a
+ path and a new name to put back on. */
+ ut_ad(!trim_name || (path && name.data()));
+ return fil_make_filepath_low(path, name, extension, trim_name);
+}
+
/** Create a tablespace file.
@param[in] space_id Tablespace ID
@param[in] name Tablespace name in dbname/tablename format.
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 26261554..99459bcb 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -209,24 +209,6 @@ typedef byte fseg_inode_t;
static constexpr byte FSEG_MAGIC_N_BYTES[4]={0x05,0xd6,0x69,0xd2};
-#define FSEG_FILLFACTOR 8 /* If the number of unused but reserved
- pages in a segment is less than
- reserved pages / FSEG_FILLFACTOR,
- and there are
- at least FSEG_FRAG_LIMIT used pages,
- then we allow a new empty extent to
- be added to the segment in
- fseg_alloc_free_page_general().
- Otherwise, we
- use unused pages of the segment. */
-
-#define FSEG_FRAG_LIMIT FSEG_FRAG_ARR_N_SLOTS
- /* If the segment has >= this many
- used pages, it may be expanded by
- allocating extents to the segment;
- until that only individual fragment
- pages are allocated from the space */
-
#define FSEG_FREE_LIST_LIMIT 40 /* If the reserved size of a segment
is at least this many extents, we
allow extents to be put to the free
@@ -294,7 +276,7 @@ Determine if a page is marked free.
@param[in] descr extent descriptor
@param[in] offset page offset within extent
@return whether the page is free */
-inline bool xdes_is_free(const xdes_t *descr, ulint offset)
+inline bool xdes_is_free(const xdes_t *descr, uint32_t offset)
{
ut_ad(offset < FSP_EXTENT_SIZE);
ulint index= XDES_FREE_BIT + XDES_BITS_PER_PAGE * offset;
diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h
index c0151b44..1d2b409b 100644
--- a/storage/innobase/include/fts0fts.h
+++ b/storage/innobase/include/fts0fts.h
@@ -163,6 +163,9 @@ struct fts_token_t;
struct fts_doc_ids_t;
struct fts_index_cache_t;
+/** Compare two DOC_ID. */
+int fts_doc_id_cmp(const void *p1, const void *p2)
+ __attribute__((nonnull, warn_unused_result));
/** Initialize the "fts_table" for internal query into FTS auxiliary
tables */
@@ -412,6 +415,9 @@ inline void fts_doc_ids_free(fts_doc_ids_t* doc_ids)
mem_heap_free(static_cast<mem_heap_t*>(doc_ids->self_heap->arg));
}
+/** Sort an array of doc_id */
+void fts_doc_ids_sort(ib_vector_t *doc_ids);
+
/******************************************************************//**
Notify the FTS system about an operation on an FTS-indexed table. */
void
diff --git a/storage/innobase/include/fts0priv.h b/storage/innobase/include/fts0priv.h
index ae0bb036..04faceb9 100644
--- a/storage/innobase/include/fts0priv.h
+++ b/storage/innobase/include/fts0priv.h
@@ -271,27 +271,6 @@ fts_index_fetch_nodes(
word, /*!< in: the word to fetch */
fts_fetch_t* fetch) /*!< in: fetch callback.*/
MY_ATTRIBUTE((nonnull));
-/******************************************************************//**
-Compare two fts_trx_table_t instances, we actually compare the
-table id's here.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_trx_table_cmp(
-/*==============*/
- const void* v1, /*!< in: id1 */
- const void* v2) /*!< in: id2 */
- MY_ATTRIBUTE((nonnull, warn_unused_result));
-/******************************************************************//**
-Compare a table id with a trx_table_t table id.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_trx_table_id_cmp(
-/*=================*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
- MY_ATTRIBUTE((nonnull, warn_unused_result));
#define fts_sql_commit(trx) trx_commit_for_mysql(trx)
#define fts_sql_rollback(trx) (trx)->rollback()
/******************************************************************//**
diff --git a/storage/innobase/include/fts0priv.inl b/storage/innobase/include/fts0priv.inl
index 3cb09c92..3d937bb3 100644
--- a/storage/innobase/include/fts0priv.inl
+++ b/storage/innobase/include/fts0priv.inl
@@ -52,47 +52,3 @@ fts_read_object_id(
if the id is HEX or DEC and do the right thing with it. */
return(sscanf(str, UINT64PFx, id) == 1);
}
-
-/******************************************************************//**
-Compare two fts_trx_table_t instances.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_trx_table_cmp(
-/*==============*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
-{
- const dict_table_t* table1
- = (*static_cast<const fts_trx_table_t* const*>(p1))->table;
-
- const dict_table_t* table2
- = (*static_cast<const fts_trx_table_t* const*>(p2))->table;
-
- return((table1->id > table2->id)
- ? 1
- : (table1->id == table2->id)
- ? 0
- : -1);
-}
-
-/******************************************************************//**
-Compare a table id with a fts_trx_table_t table id.
-@return < 0 if n1 < n2, 0 if n1 == n2,> 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_trx_table_id_cmp(
-/*=================*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
-{
- const uintmax_t* table_id = static_cast<const uintmax_t*>(p1);
- const dict_table_t* table2
- = (*static_cast<const fts_trx_table_t* const*>(p2))->table;
-
- return((*table_id > table2->id)
- ? 1
- : (*table_id == table2->id)
- ? 0
- : -1);
-}
diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h
index fb278d54..7b95348b 100644
--- a/storage/innobase/include/fts0types.h
+++ b/storage/innobase/include/fts0types.h
@@ -278,44 +278,6 @@ struct fts_token_t {
extern const fts_index_selector_t fts_index_selector[];
/******************************************************************//**
-Compare two fts_trx_row_t instances doc_ids. */
-UNIV_INLINE
-int
-fts_trx_row_doc_id_cmp(
-/*===================*/
- /*!< out:
- < 0 if n1 < n2,
- 0 if n1 == n2,
- > 0 if n1 > n2 */
- const void* p1, /*!< in: id1 */
- const void* p2); /*!< in: id2 */
-
-/******************************************************************//**
-Compare two fts_ranking_t instances doc_ids. */
-UNIV_INLINE
-int
-fts_ranking_doc_id_cmp(
-/*===================*/
- /*!< out:
- < 0 if n1 < n2,
- 0 if n1 == n2,
- > 0 if n1 > n2 */
- const void* p1, /*!< in: id1 */
- const void* p2); /*!< in: id2 */
-
-/******************************************************************//**
-Compare two doc_ids. */
-UNIV_INLINE
-int fts_doc_id_cmp(
-/*==================*/
- /*!< out:
- < 0 if n1 < n2,
- 0 if n1 == n2,
- > 0 if n1 > n2 */
- const void* p1, /*!< in: id1 */
- const void* p2); /*!< in: id2 */
-
-/******************************************************************//**
Duplicate a string. */
UNIV_INLINE
void
diff --git a/storage/innobase/include/fts0types.inl b/storage/innobase/include/fts0types.inl
index facc1e5c..5b57cad7 100644
--- a/storage/innobase/include/fts0types.inl
+++ b/storage/innobase/include/fts0types.inl
@@ -47,53 +47,6 @@ fts_string_dup(
}
/******************************************************************//**
-Compare two fts_trx_row_t doc_ids.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_trx_row_doc_id_cmp(
-/*===================*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
-{
- const fts_trx_row_t* tr1 = (const fts_trx_row_t*) p1;
- const fts_trx_row_t* tr2 = (const fts_trx_row_t*) p2;
-
- return((int)(tr1->doc_id - tr2->doc_id));
-}
-
-/******************************************************************//**
-Compare two fts_ranking_t doc_ids.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int
-fts_ranking_doc_id_cmp(
-/*===================*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
-{
- const fts_ranking_t* rk1 = (const fts_ranking_t*) p1;
- const fts_ranking_t* rk2 = (const fts_ranking_t*) p2;
-
- return((int)(rk1->doc_id - rk2->doc_id));
-}
-
-/******************************************************************//**
-Compare two doc_ids.
-@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
-UNIV_INLINE
-int fts_doc_id_cmp(
-/*==================*/
- const void* p1, /*!< in: id1 */
- const void* p2) /*!< in: id2 */
-{
- const doc_id_t* up1 = static_cast<const doc_id_t*>(p1);
- const doc_id_t* up2 = static_cast<const doc_id_t*>(p2);
-
- return static_cast<int>(*up1 - *up2);
-}
-
-/******************************************************************//**
Get the first character's code position for FTS index partition */
extern
ulint
diff --git a/storage/innobase/include/fut0lst.h b/storage/innobase/include/fut0lst.h
index 746dab80..1adec365 100644
--- a/storage/innobase/include/fut0lst.h
+++ b/storage/innobase/include/fut0lst.h
@@ -78,34 +78,40 @@ void flst_init(const buf_block_t &block, byte *base, mtr_t *mtr)
MY_ATTRIBUTE((nonnull));
/** Append a file list node to a list.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] add block to be added
-@param[in] aoffset byte offset of the node to be added
-@param[in,out] mtr mini-transaction
+@param base base node block
+@param boffset byte offset of the base node
+@param add block to be added
+@param aoffset byte offset of the node to be added
+@param limit fil_space_t::free_limit
+@param mtr mini-transaction
@return error code */
dberr_t flst_add_last(buf_block_t *base, uint16_t boffset,
- buf_block_t *add, uint16_t aoffset, mtr_t *mtr)
+ buf_block_t *add, uint16_t aoffset,
+ uint32_t limit, mtr_t *mtr)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Prepend a file list node to a list.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] add block to be added
-@param[in] aoffset byte offset of the node to be added
-@param[in,out] mtr mini-transaction
+@param base base node block
+@param boffset byte offset of the base node
+@param add block to be added
+@param aoffset byte offset of the node to be added
+@param limit fil_space_t::free_limit
+@param mtr mini-transaction
@return error code */
dberr_t flst_add_first(buf_block_t *base, uint16_t boffset,
- buf_block_t *add, uint16_t aoffset, mtr_t *mtr)
+ buf_block_t *add, uint16_t aoffset,
+ uint32_t limit, mtr_t *mtr)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Remove a file list node.
-@param[in,out] base base node block
-@param[in] boffset byte offset of the base node
-@param[in,out] cur block to be removed
-@param[in] coffset byte offset of the current record to be removed
-@param[in,out] mtr mini-transaction
+@param base base node block
+@param boffset byte offset of the base node
+@param cur block to be removed
+@param coffset byte offset of the current record to be removed
+@param limit fil_space_t::free_limit
+@param mtr mini-transaction
@return error code */
dberr_t flst_remove(buf_block_t *base, uint16_t boffset,
- buf_block_t *cur, uint16_t coffset, mtr_t *mtr)
+ buf_block_t *cur, uint16_t coffset,
+ uint32_t limit, mtr_t *mtr)
MY_ATTRIBUTE((nonnull, warn_unused_result));
/** @return the length of a list */
@@ -117,11 +123,9 @@ inline uint32_t flst_get_len(const flst_base_node_t *base)
/** @return a file address */
inline fil_addr_t flst_read_addr(const byte *faddr)
{
- fil_addr_t addr= { mach_read_from_4(faddr + FIL_ADDR_PAGE),
- 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;
+ ut_ad(ut_align_offset(faddr, srv_page_size) >= FIL_PAGE_DATA);
+ return fil_addr_t{mach_read_from_4(faddr + FIL_ADDR_PAGE),
+ mach_read_from_2(faddr + FIL_ADDR_BYTE)};
}
/** @return list first node address */
diff --git a/storage/innobase/include/gis0type.h b/storage/innobase/include/gis0type.h
index d6a4ef67..2dc25a89 100644
--- a/storage/innobase/include/gis0type.h
+++ b/storage/innobase/include/gis0type.h
@@ -66,10 +66,7 @@ typedef std::vector<rtr_rec_t, ut_allocator<rtr_rec_t> > rtr_rec_vector;
/* Structure for matched records on the leaf page */
typedef struct matched_rec {
- byte* bufp; /*!< aligned buffer point */
- byte rec_buf[UNIV_PAGE_SIZE_MAX * 2];
- /*!< buffer used to copy matching rec */
- buf_block_t block; /*!< the shadow buffer block */
+ buf_block_t* block; /*!< the shadow buffer block */
ulint used; /*!< memory used */
rtr_rec_vector* matched_recs; /*!< vector holding the matching rec */
mysql_mutex_t rtr_match_mutex;/*!< mutex protect the match_recs
@@ -107,7 +104,6 @@ typedef struct rtr_info{
/*!< mutex protect the "path" vector */
rtr_mbr_t mbr; /*!< the search MBR */
que_thr_t* thr; /*!< the search thread */
- mem_heap_t* heap; /*!< memory heap */
btr_cur_t* cursor; /*!< cursor used for search */
dict_index_t* index; /*!< index it is searching */
bool need_prdt_lock;
diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h
index 59ee7f55..08b9f4bc 100644
--- a/storage/innobase/include/lock0lock.h
+++ b/storage/innobase/include/lock0lock.h
@@ -438,6 +438,13 @@ dberr_t lock_table_for_trx(dict_table_t *table, trx_t *trx, lock_mode mode,
bool no_wait= false)
MY_ATTRIBUTE((nonnull, warn_unused_result));
+/** Lock the child tables of a table.
+@param table parent table
+@param trx transaction
+@return error code */
+dberr_t lock_table_children(dict_table_t *table, trx_t *trx)
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
+
/** Exclusively lock the data dictionary tables.
@param trx dictionary transaction
@return error code
@@ -724,13 +731,8 @@ private:
bool m_initialised;
/** mutex proteting the locks */
- alignas(CPU_LEVEL1_DCACHE_LINESIZE) srw_spin_lock latch;
-#ifdef UNIV_DEBUG
- /** The owner of exclusive latch (0 if none); protected by latch */
- std::atomic<pthread_t> writer{0};
- /** Number of shared latches */
- std::atomic<ulint> readers{0};
-#endif
+ alignas(CPU_LEVEL1_DCACHE_LINESIZE)
+ IF_DBUG(srw_lock_debug,srw_spin_lock) latch;
#ifdef SUX_LOCK_GENERIC
protected:
/** mutex for hash_latch::wait() */
@@ -789,71 +791,35 @@ public:
void wr_lock()
{
mysql_mutex_assert_not_owner(&wait_mutex);
- ut_ad(!is_writer());
latch.wr_lock();
- ut_ad(!writer.exchange(pthread_self(),
- std::memory_order_relaxed));
}
/** Release exclusive lock_sys.latch */
- void wr_unlock()
- {
- ut_ad(writer.exchange(0, std::memory_order_relaxed) ==
- pthread_self());
- latch.wr_unlock();
- }
+ void wr_unlock() { latch.wr_unlock(); }
/** Acquire shared lock_sys.latch */
void rd_lock()
{
mysql_mutex_assert_not_owner(&wait_mutex);
- ut_ad(!is_writer());
latch.rd_lock();
- ut_ad(!writer.load(std::memory_order_relaxed));
- ut_d(readers.fetch_add(1, std::memory_order_relaxed));
}
/** Release shared lock_sys.latch */
- void rd_unlock()
- {
- ut_ad(!is_writer());
- ut_ad(readers.fetch_sub(1, std::memory_order_relaxed));
- latch.rd_unlock();
- }
+ void rd_unlock() { latch.rd_unlock(); }
#endif
/** Try to acquire exclusive lock_sys.latch
@return whether the latch was acquired */
- bool wr_lock_try()
- {
- ut_ad(!is_writer());
- if (!latch.wr_lock_try()) return false;
- ut_ad(!writer.exchange(pthread_self(),
- std::memory_order_relaxed));
- return true;
- }
+ bool wr_lock_try() { return latch.wr_lock_try(); }
/** Try to acquire shared lock_sys.latch
@return whether the latch was acquired */
- bool rd_lock_try()
- {
- ut_ad(!is_writer());
- if (!latch.rd_lock_try()) return false;
- ut_ad(!writer.load(std::memory_order_relaxed));
- ut_d(readers.fetch_add(1, std::memory_order_relaxed));
- return true;
- }
+ bool rd_lock_try() { return latch.rd_lock_try(); }
/** Assert that wr_lock() has been invoked by this thread */
- void assert_locked() const { ut_ad(is_writer()); }
+ void assert_locked() const { ut_ad(latch.have_wr()); }
/** Assert that wr_lock() has not been invoked by this thread */
- void assert_unlocked() const { ut_ad(!is_writer()); }
+ void assert_unlocked() const { ut_ad(!latch.have_wr()); }
#ifdef UNIV_DEBUG
/** @return whether the current thread is the lock_sys.latch writer */
- bool is_writer() const
- {
-# ifdef SUX_LOCK_GENERIC
- return writer.load(std::memory_order_relaxed) == pthread_self();
-# else
- return writer.load(std::memory_order_relaxed) == pthread_self() ||
- (xtest() && !latch.is_locked_or_waiting());
-# endif
- }
+ bool is_writer() const { return latch.have_wr(); }
+ /** @return whether the current thread is holding lock_sys.latch */
+ bool is_holder() const { return latch.have_any(); }
/** Assert that a lock shard is exclusively latched (by some thread) */
void assert_locked(const lock_t &lock) const;
/** Assert that a table lock shard is exclusively latched by this thread */
@@ -965,14 +931,14 @@ extern lock_sys_t lock_sys;
/** @return the index of an array element */
inline ulint lock_sys_t::hash_table::calc_hash(ulint fold) const
{
- ut_ad(lock_sys.is_writer() || lock_sys.readers);
+ ut_ad(lock_sys.is_holder());
return calc_hash(fold, n_cells);
}
/** Get a hash table cell. */
inline hash_cell_t *lock_sys_t::hash_table::cell_get(ulint fold) const
{
- ut_ad(lock_sys.is_writer() || lock_sys.readers);
+ ut_ad(lock_sys.is_holder());
return &array[calc_hash(fold)];
}
diff --git a/storage/innobase/include/log0crypt.h b/storage/innobase/include/log0crypt.h
index 22c0c963..2500ac05 100644
--- a/storage/innobase/include/log0crypt.h
+++ b/storage/innobase/include/log0crypt.h
@@ -28,6 +28,9 @@ MDEV-11782: Rewritten for MariaDB 10.2 by Marko Mäkelä, MariaDB Corporation.
#include "log0log.h"
+/** innodb_encrypt_log: whether to encrypt the redo log */
+extern my_bool srv_encrypt_log;
+
/** Initialize the redo log encryption key and random parameters
when creating a new redo log.
The random parameters will be persisted in the log header.
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h
index 54851ca0..cef0dcae 100644
--- a/storage/innobase/include/log0log.h
+++ b/storage/innobase/include/log0log.h
@@ -132,6 +132,9 @@ public:
/** Redo log buffer */
struct log_t
{
+ /** The maximum buf_size */
+ static constexpr unsigned buf_size_max= os_file_request_size_max;
+
/** 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 */
@@ -165,60 +168,92 @@ struct log_t
static constexpr lsn_t FIRST_LSN= START_OFFSET;
private:
- /** The log sequence number of the last change of durable InnoDB files */
+ /** the lock bit in buf_free */
+ static constexpr size_t buf_free_LOCK= ~(~size_t{0} >> 1);
alignas(CPU_LEVEL1_DCACHE_LINESIZE)
+ /** first free offset within buf used;
+ the most significant bit is set by lock_lsn() to protect this field
+ as well as write_to_buf, waits */
+ std::atomic<size_t> buf_free;
+public:
+ /** number of write requests (to buf); protected by lock_lsn() or lsn_lock */
+ size_t write_to_buf;
+ /** log record buffer, written to by mtr_t::commit() */
+ byte *buf;
+private:
+ /** The log sequence number of the last change of durable InnoDB files;
+ protected by lock_lsn() or lsn_lock or latch.wr_lock() */
std::atomic<lsn_t> lsn;
/** the first guaranteed-durable log sequence number */
std::atomic<lsn_t> flushed_to_disk_lsn;
- /** log sequence number when log resizing was initiated, or 0 */
- std::atomic<lsn_t> resize_lsn;
- /** set when there may be need to initiate a log checkpoint.
- This must hold if lsn - last_checkpoint_lsn > max_checkpoint_age. */
- std::atomic<bool> need_checkpoint;
+public:
+ /** number of append_prepare_wait(); protected by lock_lsn() or lsn_lock */
+ size_t waits;
+ /** innodb_log_buffer_size (size of buf,flush_buf if !is_pmem(), in bytes) */
+ unsigned buf_size;
+ /** log file size in bytes, including the header */
+ lsn_t file_size;
+
+#ifdef LOG_LATCH_DEBUG
+ typedef srw_lock_debug log_rwlock;
+ typedef srw_mutex log_lsn_lock;
-#if defined(__aarch64__)
- /* On ARM, we do more spinning */
+ bool latch_have_wr() const { return latch.have_wr(); }
+ bool latch_have_rd() const { return latch.have_rd(); }
+ bool latch_have_any() const { return latch.have_any(); }
+#else
+# ifndef UNIV_DEBUG
+# elif defined SUX_LOCK_GENERIC
+ bool latch_have_wr() const { return true; }
+ bool latch_have_rd() const { return true; }
+ bool latch_have_any() const { return true; }
+# else
+ bool latch_have_wr() const { return latch.is_write_locked(); }
+ bool latch_have_rd() const { return latch.is_locked(); }
+ bool latch_have_any() const { return latch.is_locked(); }
+# endif
+# ifdef __aarch64__
+ /* On ARM, we spin more */
typedef srw_spin_lock log_rwlock;
typedef pthread_mutex_wrapper<true> log_lsn_lock;
-#else
+# else
typedef srw_lock log_rwlock;
typedef srw_mutex log_lsn_lock;
+# endif
#endif
-
-public:
- /** rw-lock protecting writes to buf; normal mtr_t::commit()
- outside any log checkpoint is covered by a shared latch */
+ /** exclusive latch for checkpoint, shared for mtr_t::commit() to buf */
alignas(CPU_LEVEL1_DCACHE_LINESIZE) log_rwlock latch;
-private:
- /** mutex protecting buf_free et al, together with latch */
- log_lsn_lock lsn_lock;
-public:
- /** first free offset within buf use; protected by lsn_lock */
- Atomic_relaxed<size_t> buf_free;
- /** number of write requests (to buf); protected by lsn_lock */
- size_t write_to_buf;
- /** number of append_prepare_wait(); protected by lsn_lock */
- size_t waits;
-private:
+
+ /** number of std::swap(buf, flush_buf) and writes from buf to log;
+ protected by latch.wr_lock() */
+ ulint write_to_log;
+
/** Last written LSN */
lsn_t write_lsn;
-public:
- /** log record buffer, written to by mtr_t::commit() */
- byte *buf;
+
/** buffer for writing data to ib_logfile0, or nullptr if is_pmem()
In write_buf(), buf and flush_buf are swapped */
byte *flush_buf;
- /** number of std::swap(buf, flush_buf) and writes from buf to log;
- protected by latch.wr_lock() */
- ulint write_to_log;
-
+ /** set when there may be need to initiate a log checkpoint.
+ This must hold if lsn - last_checkpoint_lsn > max_checkpoint_age. */
+ std::atomic<bool> need_checkpoint;
+ /** whether a checkpoint is pending; protected by latch.wr_lock() */
+ Atomic_relaxed<bool> checkpoint_pending;
+ /** next checkpoint number (protected by latch.wr_lock()) */
+ byte next_checkpoint_no;
+ /** recommended maximum buf_free size, after which the buffer is flushed */
+ unsigned max_buf_free;
/** Log sequence number when a log file overwrite (broken crash recovery)
was noticed. Protected by latch.wr_lock(). */
lsn_t overwrite_warned;
- /** innodb_log_buffer_size (size of buf,flush_buf if !is_pmem(), in bytes) */
- size_t buf_size;
+ /** latest completed checkpoint (protected by latch.wr_lock()) */
+ Atomic_relaxed<lsn_t> last_checkpoint_lsn;
+ /** next checkpoint LSN (protected by latch.wr_lock()) */
+ lsn_t next_checkpoint_lsn;
+ /** Log file */
+ log_file_t log;
private:
/** Log file being constructed during resizing; protected by latch */
log_file_t resize_log;
@@ -229,18 +264,14 @@ private:
/** Buffer for writing to resize_log; @see flush_buf */
byte *resize_flush_buf;
- void init_lsn_lock() {lsn_lock.init(); }
- void lock_lsn() { lsn_lock.wr_lock(); }
- void unlock_lsn() {lsn_lock.wr_unlock(); }
- void destroy_lsn_lock() { lsn_lock.destroy(); }
-
-public:
- /** recommended maximum size of buf, after which the buffer is flushed */
- size_t max_buf_free;
+ /** Special implementation of lock_lsn() for IA-32 and AMD64 */
+ void lsn_lock_bts() noexcept;
+ /** Acquire a lock for updating buf_free and related fields.
+ @return the value of buf_free */
+ size_t lock_lsn() noexcept;
- /** log file size in bytes, including the header */
- lsn_t file_size;
-private:
+ /** log sequence number when log resizing was initiated, or 0 */
+ std::atomic<lsn_t> resize_lsn;
/** the log sequence number at the start of the log file */
lsn_t first_lsn;
#if defined __linux__ || defined _WIN32
@@ -250,8 +281,6 @@ private:
public:
/** format of the redo log: e.g., FORMAT_10_8 */
uint32_t format;
- /** Log file */
- log_file_t log;
#if defined __linux__ || defined _WIN32
/** whether file system caching is enabled for the log */
my_bool log_buffered;
@@ -279,21 +308,29 @@ public:
/*!< this is the maximum allowed value
for lsn - last_checkpoint_lsn when a
new query step is started */
- /** latest completed checkpoint (protected by latch.wr_lock()) */
- Atomic_relaxed<lsn_t> last_checkpoint_lsn;
- /** next checkpoint LSN (protected by log_sys.latch) */
- lsn_t next_checkpoint_lsn;
- /** next checkpoint number (protected by latch.wr_lock()) */
- ulint next_checkpoint_no;
- /** whether a checkpoint is pending */
- Atomic_relaxed<bool> checkpoint_pending;
/** buffer for checkpoint header */
byte *checkpoint_buf;
/* @} */
+private:
+ /** A lock when the spin-only lock_lsn() is not being used */
+ log_lsn_lock lsn_lock;
+public:
+
bool is_initialised() const noexcept { return max_buf_free != 0; }
+ /** whether there is capacity in the log buffer */
+ bool buf_free_ok() const noexcept
+ {
+ ut_ad(!is_pmem());
+ return (buf_free.load(std::memory_order_relaxed) & ~buf_free_LOCK) <
+ max_buf_free;
+ }
+
+ void set_buf_free(size_t f) noexcept
+ { ut_ad(f < buf_free_LOCK); buf_free.store(f, std::memory_order_relaxed); }
+
#ifdef HAVE_PMEM
bool is_pmem() const noexcept { return !flush_buf; }
#else
@@ -302,7 +339,7 @@ public:
bool is_opened() const noexcept { return log.is_opened(); }
- /** @return target write LSN to react on buf_free >= max_buf_free */
+ /** @return target write LSN to react on !buf_free_ok() */
inline lsn_t get_write_target() const;
/** @return LSN at which log resizing was started and is still in progress
@@ -402,9 +439,7 @@ public:
void set_recovered_lsn(lsn_t lsn) noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_write_locked());
-#endif /* SUX_LOCK_GENERIC */
+ ut_ad(latch_have_wr());
write_lsn= lsn;
this->lsn.store(lsn, std::memory_order_relaxed);
flushed_to_disk_lsn.store(lsn, std::memory_order_relaxed);
@@ -444,17 +479,23 @@ public:
private:
/** Wait in append_prepare() for buffer to become available
- @param lsn log sequence number to write up to
- @param ex whether log_sys.latch is exclusively locked */
- ATTRIBUTE_COLD void append_prepare_wait(lsn_t lsn, bool ex) noexcept;
+ @tparam spin whether to use the spin-only lock_lsn()
+ @param b the value of buf_free
+ @param ex whether log_sys.latch is exclusively locked
+ @param lsn log sequence number to write up to
+ @return the new value of buf_free */
+ template<bool spin>
+ ATTRIBUTE_COLD size_t append_prepare_wait(size_t b, bool ex, lsn_t lsn)
+ noexcept;
public:
/** Reserve space in the log buffer for appending data.
+ @tparam spin whether to use the spin-only lock_lsn()
@tparam pmem log_sys.is_pmem()
@param size total length of the data to append(), in bytes
@param ex whether log_sys.latch is exclusively locked
@return the start LSN and the buffer position for append() */
- template<bool pmem>
- inline std::pair<lsn_t,byte*> append_prepare(size_t size, bool ex) noexcept;
+ template<bool spin,bool pmem>
+ std::pair<lsn_t,byte*> append_prepare(size_t size, bool ex) noexcept;
/** Append a string of bytes to the redo log.
@param d destination
@@ -462,9 +503,7 @@ public:
@param size length of str, in bytes */
void append(byte *&d, const void *s, size_t size) noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_locked());
-#endif
+ ut_ad(latch_have_any());
ut_ad(d + size <= buf + (is_pmem() ? file_size : buf_size));
memcpy(d, s, size);
d+= size;
diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h
index c916edc9..bfa66216 100644
--- a/storage/innobase/include/mtr0mtr.h
+++ b/storage/innobase/include/mtr0mtr.h
@@ -695,14 +695,40 @@ private:
/** Encrypt the log */
ATTRIBUTE_NOINLINE void encrypt();
+ /** Commit the mini-transaction log.
+ @tparam pmem log_sys.is_pmem()
+ @param mtr mini-transaction
+ @param lsns {start_lsn,flush_ahead} */
+ template<bool pmem>
+ static void commit_log(mtr_t *mtr, std::pair<lsn_t,page_flush_ahead> lsns);
+
/** Append the redo log records to the redo log buffer.
@return {start_lsn,flush_ahead} */
std::pair<lsn_t,page_flush_ahead> do_write();
/** Append the redo log records to the redo log buffer.
+ @tparam spin whether to use the spin-only log_sys.lock_lsn()
+ @tparam pmem log_sys.is_pmem()
+ @param mtr mini-transaction
@param len number of bytes to write
@return {start_lsn,flush_ahead} */
- std::pair<lsn_t,page_flush_ahead> finish_write(size_t len);
+ template<bool spin,bool pmem> static
+ std::pair<lsn_t,page_flush_ahead> finish_writer(mtr_t *mtr, size_t len);
+
+ /** The applicable variant of commit_log() */
+ static void (*commit_logger)(mtr_t *, std::pair<lsn_t,page_flush_ahead>);
+ /** The applicable variant of finish_writer() */
+ static std::pair<lsn_t,page_flush_ahead> (*finisher)(mtr_t *, size_t);
+
+ std::pair<lsn_t,page_flush_ahead> finish_write(size_t len)
+ { return finisher(this, len); }
+public:
+ /** Poll interval in log_sys.lock_lsn(); 0 to use log_sys.lsn_lock.
+ Protected by LOCK_global_system_variables and log_sys.latch. */
+ static unsigned spin_wait_delay;
+ /** Update finisher when spin_wait_delay is changing to or from 0. */
+ static void finisher_update();
+private:
/** Release all latches. */
void release();
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index c8374515..7eba359f 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -46,6 +46,18 @@ Created 10/21/1995 Heikki Tuuri
#include <time.h>
#endif /* !_WIN32 */
+/** The maximum size of a read or write request.
+
+According to Linux "man 2 read" and "man 2 write" this applies to
+both 32-bit and 64-bit systems.
+
+On FreeBSD, the limit is close to the Linux one, INT_MAX.
+
+On Microsoft Windows, the limit is UINT_MAX (4 GiB - 1).
+
+On other systems, the limit typically is up to SSIZE_T_MAX. */
+static constexpr unsigned os_file_request_size_max= 0x7ffff000;
+
extern bool os_has_said_disk_full;
/** File offset in bytes */
@@ -109,25 +121,21 @@ struct pfs_os_file_t
/** Options for os_file_create_func @{ */
enum os_file_create_t {
- OS_FILE_OPEN = 51, /*!< to open an existing file (if
- doesn't exist, error) */
- OS_FILE_CREATE, /*!< to create new file (if
- exists, error) */
- OS_FILE_OVERWRITE, /*!< to create a new file, if exists
- the overwrite old file */
- OS_FILE_OPEN_RAW, /*!< to open a raw device or disk
- partition */
- OS_FILE_CREATE_PATH, /*!< to create the directories */
- OS_FILE_OPEN_RETRY, /*!< open with retry */
-
- /** Flags that can be combined with the above values. Please ensure
- that the above values stay below 128. */
-
- OS_FILE_ON_ERROR_NO_EXIT = 128, /*!< do not exit on unknown errors */
- OS_FILE_ON_ERROR_SILENT = 256 /*!< don't print diagnostic messages to
- the log unless it is a fatal error,
- this flag is only used if
- ON_ERROR_NO_EXIT is set */
+ /** create a new file */
+ OS_FILE_CREATE= 0,
+ /** open an existing file */
+ OS_FILE_OPEN,
+ /** retry opening an existing file */
+ OS_FILE_OPEN_RETRY,
+ /** open a raw block device */
+ OS_FILE_OPEN_RAW,
+
+ /** do not display diagnostic messages */
+ OS_FILE_ON_ERROR_SILENT= 4,
+
+ OS_FILE_CREATE_SILENT= OS_FILE_CREATE | OS_FILE_ON_ERROR_SILENT,
+ OS_FILE_OPEN_SILENT= OS_FILE_OPEN | OS_FILE_ON_ERROR_SILENT,
+ OS_FILE_OPEN_RETRY_SILENT= OS_FILE_OPEN_RETRY | OS_FILE_ON_ERROR_SILENT
};
static const ulint OS_FILE_READ_ONLY = 333;
@@ -144,7 +152,7 @@ static const ulint OS_FILE_NORMAL = 62;
/** Types for file create @{ */
static constexpr ulint OS_DATA_FILE = 100;
static constexpr ulint OS_LOG_FILE = 101;
-#if defined _WIN32 || defined HAVE_FCNTL_DIRECT
+#if defined _WIN32 || defined O_DIRECT
static constexpr ulint OS_DATA_FILE_NO_O_DIRECT = 103;
#endif
/* @} */
@@ -191,14 +199,10 @@ public:
WRITE_ASYNC= WRITE_SYNC | 1,
/** A doublewrite batch */
DBLWR_BATCH= WRITE_ASYNC | 8,
- /** Write data; evict the block on write completion */
- WRITE_LRU= WRITE_ASYNC | 32,
/** Write data and punch hole for the rest */
- PUNCH= WRITE_ASYNC | 64,
- /** Write data and punch hole; evict the block on write completion */
- PUNCH_LRU= PUNCH | WRITE_LRU,
+ PUNCH= WRITE_ASYNC | 16,
/** Zero out a range of bytes in fil_space_t::io() */
- PUNCH_RANGE= WRITE_SYNC | 128,
+ PUNCH_RANGE= WRITE_SYNC | 32,
};
constexpr IORequest(buf_page_t *bpage, buf_tmp_buffer_t *slot,
@@ -211,7 +215,6 @@ public:
bool is_read() const { return (type & READ_SYNC) != 0; }
bool is_write() const { return (type & WRITE_SYNC) != 0; }
- bool is_LRU() const { return (type & (WRITE_LRU ^ WRITE_ASYNC)) != 0; }
bool is_async() const { return (type & (READ_SYNC ^ READ_ASYNC)) != 0; }
void write_complete(int io_error) const;
@@ -349,7 +352,7 @@ A simple function to open or create a file.
pfs_os_file_t
os_file_create_simple_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success);
@@ -358,7 +361,7 @@ os_file_create_simple_func(
os_file_create_simple_no_error_handling(), not directly this function!
A simple function to open or create a file.
@param[in] name name of the file or path as a null-terminated string
-@param[in] create_mode create mode
+@param[in] create_mode OS_FILE_CREATE or OS_FILE_OPEN
@param[in] access_type OS_FILE_READ_ONLY, OS_FILE_READ_WRITE, or
OS_FILE_READ_ALLOW_DELETE; the last option
is used by a backup program reading the file
@@ -369,28 +372,12 @@ A simple function to open or create a file.
pfs_os_file_t
os_file_create_simple_no_error_handling_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success)
MY_ATTRIBUTE((warn_unused_result));
-#ifndef HAVE_FCNTL_DIRECT
-#define os_file_set_nocache(fd, file_name, operation_name) do{}while(0)
-#else
-/** Tries to disable OS caching on an opened file descriptor.
-@param[in] fd file descriptor to alter
-@param[in] file_name file name, used in the diagnostic message
-@param[in] name "open" or "create"; used in the diagnostic
- message */
-void
-os_file_set_nocache(
-/*================*/
- int fd, /*!< in: file descriptor to alter */
- const char* file_name,
- const char* operation_name);
-#endif
-
#ifndef _WIN32 /* On Microsoft Windows, mandatory locking is used */
/** Obtain an exclusive lock on a file.
@param fd file descriptor
@@ -419,7 +406,7 @@ Opens an existing file or creates a new.
pfs_os_file_t
os_file_create_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint purpose,
ulint type,
bool read_only,
@@ -617,7 +604,7 @@ pfs_os_file_t
pfs_os_file_create_simple_func(
mysql_pfs_key_t key,
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success,
@@ -633,7 +620,7 @@ monitor file creation/open.
@param[in] key Performance Schema Key
@param[in] name name of the file or path as a null-terminated
string
-@param[in] create_mode create mode
+@param[in] create_mode OS_FILE_CREATE or OS_FILE_OPEN
@param[in] access_type OS_FILE_READ_ONLY, OS_FILE_READ_WRITE, or
OS_FILE_READ_ALLOW_DELETE; the last option is
used by a backup program reading the file
@@ -648,7 +635,7 @@ pfs_os_file_t
pfs_os_file_create_simple_no_error_handling_func(
mysql_pfs_key_t key,
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success,
@@ -681,7 +668,7 @@ pfs_os_file_t
pfs_os_file_create_func(
mysql_pfs_key_t key,
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint purpose,
ulint type,
bool read_only,
diff --git a/storage/innobase/include/os0file.inl b/storage/innobase/include/os0file.inl
index 7de31505..a7603028 100644
--- a/storage/innobase/include/os0file.inl
+++ b/storage/innobase/include/os0file.inl
@@ -45,7 +45,7 @@ pfs_os_file_t
pfs_os_file_create_simple_func(
mysql_pfs_key_t key,
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success,
@@ -80,7 +80,7 @@ monitor file creation/open.
@param[in] key Performance Schema Key
@param[in] name name of the file or path as a null-terminated
string
-@param[in] create_mode create mode
+@param[in] create_mode OS_FILE_CREATE or OS_FILE_OPEN
@param[in] access_type OS_FILE_READ_ONLY, OS_FILE_READ_WRITE, or
OS_FILE_READ_ALLOW_DELETE; the last option is
used by a backup program reading the file
@@ -95,7 +95,7 @@ pfs_os_file_t
pfs_os_file_create_simple_no_error_handling_func(
mysql_pfs_key_t key,
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success,
@@ -146,7 +146,7 @@ pfs_os_file_t
pfs_os_file_create_func(
mysql_pfs_key_t key,
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint purpose,
ulint type,
bool read_only,
diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h
index 93ea650d..1c2af128 100644
--- a/storage/innobase/include/row0merge.h
+++ b/storage/innobase/include/row0merge.h
@@ -165,14 +165,11 @@ row_merge_drop_indexes(
prepare_inplace_alter_table_dict(). */
void row_merge_drop_temp_indexes();
-/** Create temporary merge files in the given paramater path, and if
-UNIV_PFS_IO defined, register the file descriptor with Performance Schema.
-@param[in] path location for creating temporary merge files, or NULL
+/** Create a temporary file at the specified path.
+@param path location for creating temporary merge files, or nullptr
@return File descriptor */
-pfs_os_file_t
-row_merge_file_create_low(
- const char* path)
- MY_ATTRIBUTE((warn_unused_result));
+pfs_os_file_t row_merge_file_create_low(const char *path)
+ MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************//**
Destroy a merge file. And de-register the file from Performance Schema
if UNIV_PFS_IO is defined. */
diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h
index a1350740..7056c77f 100644
--- a/storage/innobase/include/row0row.h
+++ b/storage/innobase/include/row0row.h
@@ -370,6 +370,12 @@ row_search_index_entry(
mtr_t* mtr) /*!< in: mtr */
MY_ATTRIBUTE((nonnull, warn_unused_result));
+/** Get the byte offset of the DB_TRX_ID column
+@param[in] rec clustered index record
+@param[in] index clustered index
+@return the byte offset of DB_TRX_ID, from the start of rec */
+ulint row_trx_id_offset(const rec_t* rec, const dict_index_t* index);
+
#define ROW_COPY_DATA 1
#define ROW_COPY_POINTERS 2
diff --git a/storage/innobase/include/row0sel.h b/storage/innobase/include/row0sel.h
index 8134c60f..54e4a1d2 100644
--- a/storage/innobase/include/row0sel.h
+++ b/storage/innobase/include/row0sel.h
@@ -115,8 +115,8 @@ row_sel_convert_mysql_key_to_innobase(
ulint buf_len, /*!< in: buffer length */
dict_index_t* index, /*!< in: index of the key value */
const byte* key_ptr, /*!< in: MySQL key value */
- ulint key_len); /*!< in: MySQL key value length */
-
+ ulint key_len) /*!< in: MySQL key value length */
+ MY_ATTRIBUTE((nonnull(1,4,5)));
/** Search for rows in the database using cursor.
Function is mainly used for tables that are shared across connections and
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index 51f3049b..2ed26748 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -194,7 +194,6 @@ enum monitor_id_t {
MONITOR_FLUSH_ADAPTIVE_AVG_PASS,
MONITOR_LRU_GET_FREE_LOOPS,
- MONITOR_LRU_GET_FREE_WAITS,
MONITOR_FLUSH_AVG_PAGE_RATE,
MONITOR_FLUSH_LSN_AVG_RATE,
@@ -215,7 +214,6 @@ enum monitor_id_t {
MONITOR_LRU_BATCH_SCANNED_PER_CALL,
MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE,
MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE,
- MONITOR_LRU_SINGLE_FLUSH_FAILURE_COUNT,
MONITOR_LRU_GET_FREE_SEARCH,
MONITOR_LRU_SEARCH_SCANNED,
MONITOR_LRU_SEARCH_SCANNED_NUM_CALL,
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 457d9ab5..5e6bfc33 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -121,10 +121,6 @@ struct srv_stats_t
ulint_ctr_n_t n_temp_blocks_decrypted;
};
-/** We are prepared for a situation that we have this many threads waiting for
-a transactional lock inside InnoDB. srv_start() sets the value. */
-extern ulint srv_max_n_threads;
-
extern const char* srv_main_thread_op_info;
/** Prefix used by MySQL to indicate pre-5.1 table name encoding */
diff --git a/storage/innobase/include/srw_lock.h b/storage/innobase/include/srw_lock.h
index 01067322..98c256d3 100644
--- a/storage/innobase/include/srw_lock.h
+++ b/storage/innobase/include/srw_lock.h
@@ -153,7 +153,7 @@ template<bool spinloop> class srw_lock_impl;
/** Slim shared-update-exclusive lock with no recursion */
template<bool spinloop>
-class ssux_lock_impl final
+class ssux_lock_impl
{
#ifdef UNIV_PFS_RWLOCK
friend class ssux_lock;
@@ -550,3 +550,51 @@ typedef srw_lock_impl<false> srw_lock;
typedef srw_lock_impl<true> srw_spin_lock;
#endif
+
+#ifdef UNIV_DEBUG
+# include <unordered_set>
+
+class srw_lock_debug : private srw_lock
+{
+ /** The owner of the exclusive lock (0 if none) */
+ std::atomic<pthread_t> writer;
+ /** Protects readers */
+ mutable srw_mutex readers_lock;
+ /** Threads that hold the lock in shared mode */
+ std::atomic<std::unordered_multiset<pthread_t>*> readers;
+
+ /** Register a read lock. */
+ void readers_register();
+
+public:
+ void SRW_LOCK_INIT(mysql_pfs_key_t key);
+ void destroy();
+
+#ifndef SUX_LOCK_GENERIC
+ /** @return whether any lock may be held by any thread */
+ bool is_locked_or_waiting() const noexcept
+ { return srw_lock::is_locked_or_waiting(); }
+ /** @return whether an exclusive lock may be held by any thread */
+ bool is_write_locked() const noexcept { return srw_lock::is_write_locked(); }
+#endif
+
+ /** Acquire an exclusive lock */
+ void wr_lock(SRW_LOCK_ARGS(const char *file, unsigned line));
+ /** @return whether an exclusive lock was acquired */
+ bool wr_lock_try();
+ /** Release after wr_lock() */
+ void wr_unlock();
+ /** Acquire a shared lock */
+ void rd_lock(SRW_LOCK_ARGS(const char *file, unsigned line));
+ /** @return whether a shared lock was acquired */
+ bool rd_lock_try();
+ /** Release after rd_lock() */
+ void rd_unlock();
+ /** @return whether this thread is between rd_lock() and rd_unlock() */
+ bool have_rd() const noexcept;
+ /** @return whether this thread is between wr_lock() and wr_unlock() */
+ bool have_wr() const noexcept;
+ /** @return whether this thread is holding rd_lock() or wr_lock() */
+ bool have_any() const noexcept;
+};
+#endif
diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h
index 0f4f8afa..1fb6cd68 100644
--- a/storage/innobase/include/trx0purge.h
+++ b/storage/innobase/include/trx0purge.h
@@ -55,80 +55,74 @@ Run a purge batch.
@return number of undo log pages handled in the batch */
ulint trx_purge(ulint n_tasks, ulint history_size);
-/** Rollback segements from a given transaction with trx-no
-scheduled for purge. */
-class TrxUndoRsegs {
-private:
- typedef std::vector<trx_rseg_t*, ut_allocator<trx_rseg_t*> >
- trx_rsegs_t;
-public:
- typedef trx_rsegs_t::iterator iterator;
- typedef trx_rsegs_t::const_iterator const_iterator;
-
- TrxUndoRsegs() = default;
-
- /** Constructor */
- TrxUndoRsegs(trx_rseg_t& rseg)
- : trx_no(rseg.last_trx_no()), m_rsegs(1, &rseg) {}
- /** Constructor */
- TrxUndoRsegs(trx_id_t trx_no, trx_rseg_t& rseg)
- : trx_no(trx_no), m_rsegs(1, &rseg) {}
-
- bool operator!=(const TrxUndoRsegs& other) const
- { return trx_no != other.trx_no; }
- bool empty() const { return m_rsegs.empty(); }
- void erase(iterator& it) { m_rsegs.erase(it); }
- iterator begin() { return(m_rsegs.begin()); }
- iterator end() { return(m_rsegs.end()); }
- const_iterator begin() const { return m_rsegs.begin(); }
- const_iterator end() const { return m_rsegs.end(); }
-
- /** Compare two TrxUndoRsegs based on trx_no.
- @param elem1 first element to compare
- @param elem2 second element to compare
- @return true if elem1 > elem2 else false.*/
- bool operator()(const TrxUndoRsegs& lhs, const TrxUndoRsegs& rhs)
- {
- return(lhs.trx_no > rhs.trx_no);
- }
-
- /** Copy of trx_rseg_t::last_trx_no() */
- trx_id_t trx_no= 0;
-private:
- /** Rollback segments of a transaction, scheduled for purge. */
- trx_rsegs_t m_rsegs{};
-};
-
-typedef std::priority_queue<
- TrxUndoRsegs,
- std::vector<TrxUndoRsegs, ut_allocator<TrxUndoRsegs> >,
- TrxUndoRsegs> purge_pq_t;
-
-/** Chooses the rollback segment with the oldest committed transaction */
-struct TrxUndoRsegsIterator {
- /** Constructor */
- TrxUndoRsegsIterator();
- /** Sets the next rseg to purge in purge_sys.
- Executed in the purge coordinator thread.
- @retval false when nothing is to be purged
- @retval true when purge_sys.rseg->latch was locked */
- inline bool set_next();
-
-private:
- // Disable copying
- TrxUndoRsegsIterator(const TrxUndoRsegsIterator&);
- TrxUndoRsegsIterator& operator=(const TrxUndoRsegsIterator&);
-
- /** The current element to process */
- TrxUndoRsegs m_rsegs;
- /** Track the current element in m_rsegs */
- TrxUndoRsegs::const_iterator m_iter;
-};
-
/** The control structure used in the purge operation */
class purge_sys_t
{
- friend TrxUndoRsegsIterator;
+ /** Min-heap based priority queue of (trx_no, trx_sys.rseg_array index)
+ pairs, ordered on trx_no. The highest 64-TRX_NO_SHIFT bits of each element is
+ trx_no, the lowest 8 bits is rseg's index in trx_sys.rseg_array. */
+ class purge_queue
+ {
+ public:
+ typedef std::vector<uint64_t, ut_allocator<uint64_t>> container_type;
+ /** Number of bits reseved to shift trx_no in purge queue element */
+ static constexpr unsigned TRX_NO_SHIFT= 8;
+
+ bool empty() const { return m_array.empty(); }
+ void clear() { m_array.clear(); }
+
+ /** Push (trx_no, trx_sys.rseg_array index) into min-heap.
+ @param trx_no_rseg (trx_no << TRX_NO_SHIFT | (trx_sys.rseg_array index)) */
+ void push_trx_no_rseg(container_type::value_type trx_no_rseg)
+ {
+ m_array.push_back(trx_no_rseg);
+ std::push_heap(m_array.begin(), m_array.end(),
+ std::greater<container_type::value_type>());
+ }
+
+ /** Push rseg to priority queue.
+ @param trx_no trx_no of committed transaction
+ @param rseg rseg of committed transaction*/
+ void push(trx_id_t trx_no, const trx_rseg_t &rseg)
+ {
+ ut_ad(trx_no < 1ULL << (DATA_TRX_ID_LEN * CHAR_BIT));
+ ut_ad(&rseg >= trx_sys.rseg_array);
+ ut_ad(&rseg < trx_sys.rseg_array + TRX_SYS_N_RSEGS);
+ push_trx_no_rseg(trx_no << TRX_NO_SHIFT |
+ byte(&rseg - trx_sys.rseg_array));
+ }
+
+ /** Extracts rseg from (trx_no, trx_sys.rseg_array index) pair.
+ @param trx_no_rseg (trx_no << TRX_NO_SHIFT | (trx_sys.rseg_array index)
+ @return pointer to rseg in trx_sys.rseg_array */
+ static trx_rseg_t *rseg(container_type::value_type trx_no_rseg) {
+ byte i= static_cast<byte>(trx_no_rseg);
+ ut_ad(i < TRX_SYS_N_RSEGS);
+ return &trx_sys.rseg_array[i];
+ }
+
+ /** Pop rseg from priority queue.
+ @return pointer to popped trx_rseg_t object */
+ trx_rseg_t *pop()
+ {
+ ut_ad(!empty());
+ std::pop_heap(m_array.begin(), m_array.end(),
+ std::greater<container_type::value_type>());
+ trx_rseg_t *r = rseg(m_array.back());
+ m_array.pop_back();
+ return r;
+ }
+
+ /** Clone m_array.
+ @return m_array clone */
+ container_type clone_container() const{ return m_array; }
+
+ private:
+ /** Array of (trx_no, trx_sys.rseg_array index) pairs. */
+ container_type m_array;
+ };
+
+
public:
/** latch protecting view, m_enabled */
alignas(CPU_LEVEL1_DCACHE_LINESIZE) mutable srw_spin_lock latch;
@@ -244,15 +238,36 @@ private:
record */
uint16_t hdr_offset; /*!< Header byte offset on the page */
+ /** Binary min-heap of (trx_no, trx_sys.rseg_array index) pairs, ordered on
+ trx_no. It is protected by the pq_mutex */
+ purge_queue purge_queue;
+
+ /** Mutex protecting purge_queue */
+ mysql_mutex_t pq_mutex;
- TrxUndoRsegsIterator
- rseg_iter; /*!< Iterator to get the next rseg
- to process */
public:
- purge_pq_t purge_queue; /*!< Binary min-heap, ordered on
- TrxUndoRsegs::trx_no. It is protected
- by the pq_mutex */
- mysql_mutex_t pq_mutex; /*!< Mutex protecting purge_queue */
+
+ void enqueue(trx_id_t trx_no, const trx_rseg_t &rseg) {
+ mysql_mutex_assert_owner(&pq_mutex);
+ purge_queue.push(trx_no, rseg);
+ }
+
+ /** Push to purge queue without acquiring pq_mutex.
+ @param rseg rseg to push */
+ void enqueue(const trx_rseg_t &rseg) { enqueue(rseg.last_trx_no(), rseg); }
+
+ /** Clone purge queue container.
+ @return purge queue container clone */
+ purge_queue::container_type clone_queue_container() const {
+ mysql_mutex_assert_owner(&pq_mutex);
+ return purge_queue.clone_container();
+ }
+
+ /** Acquare purge_queue_mutex */
+ void queue_lock() { mysql_mutex_lock(&pq_mutex); }
+
+ /** Release purge queue mutex */
+ void queue_unlock() { mysql_mutex_unlock(&pq_mutex); }
/** innodb_undo_log_truncate=ON state;
only modified by purge_coordinator_callback() */
@@ -332,8 +347,9 @@ private:
/** Update the last not yet purged history log info in rseg when
we have purged a whole undo log. Advances also purge_trx_no
- past the purged log. */
- void rseg_get_next_history_log();
+ past the purged log.
+ @return whether anything is to be purged */
+ bool rseg_get_next_history_log();
public:
/**
@@ -438,6 +454,11 @@ public:
@param already_stopped True indicates purge threads were
already stopped */
void stop_FTS(const dict_table_t &table, bool already_stopped=false);
+
+ /** Cleanse purge queue to remove the rseg that reside in undo-tablespace
+ marked for truncate.
+ @param space undo tablespace being truncated */
+ void cleanse_purge_queue(const fil_space_t &space);
};
/** The global data structure coordinating a purge */
diff --git a/storage/innobase/include/trx0rseg.h b/storage/innobase/include/trx0rseg.h
index 7fa43047..e0051b2a 100644
--- a/storage/innobase/include/trx0rseg.h
+++ b/storage/innobase/include/trx0rseg.h
@@ -59,7 +59,7 @@ struct alignas(CPU_LEVEL1_DCACHE_LINESIZE) trx_rseg_t
/** tablespace containing the rollback segment; constant after init() */
fil_space_t *space;
/** latch protecting everything except page_no, space */
- srw_spin_lock latch;
+ IF_DBUG(srw_lock_debug,srw_spin_lock) latch;
/** rollback segment header page number; constant after init() */
uint32_t page_no;
/** length of the TRX_RSEG_HISTORY list (number of transactions) */
@@ -170,19 +170,21 @@ public:
/** Last not yet purged undo log header; FIL_NULL if all purged */
uint32_t last_page_no;
- /** trx_t::no | last_offset << 48 */
+ /** trx_t::no << 16 | last_offset */
uint64_t last_commit_and_offset;
/** @return the commit ID of the last committed transaction */
trx_id_t last_trx_no() const
- { return last_commit_and_offset & ((1ULL << 48) - 1); }
+ { return last_commit_and_offset >> 16; }
/** @return header offset of the last committed transaction */
uint16_t last_offset() const
- { return static_cast<uint16_t>(last_commit_and_offset >> 48); }
+ {
+ return static_cast<uint16_t>(last_commit_and_offset);
+ }
void set_last_commit(uint16_t last_offset, trx_id_t trx_no)
{
- last_commit_and_offset= static_cast<uint64_t>(last_offset) << 48 | trx_no;
+ last_commit_and_offset= trx_no << 16 | static_cast<uint64_t>(last_offset);
}
/** @return the page identifier */
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index 0a3e0d62..15255354 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -785,13 +785,19 @@ public:
const char* op_info; /*!< English text describing the
current operation, or an empty
string */
- uint isolation_level;/*!< TRX_ISO_REPEATABLE_READ, ... */
- bool check_foreigns; /*!< normally TRUE, but if the user
- wants to suppress foreign key checks,
- (in table imports, for example) we
- set this FALSE */
+ /** TRX_ISO_REPEATABLE_READ, ... */
+ unsigned isolation_level:2;
+ /** when set, REPEATABLE READ will actually be Snapshot Isolation, due to
+ detecting write/write conflicts and disabling "semi-consistent read" */
+ unsigned snapshot_isolation:1;
+ /** normally set; "SET foreign_key_checks=0" can be issued to suppress
+ foreign key checks, in table imports, for example */
+ unsigned check_foreigns:1;
+ /** normally set; "SET unique_checks=0, foreign_key_checks=0"
+ enables bulk insert into an empty table */
+ unsigned check_unique_secondary:1;
/** whether an insert into an empty table is active */
- bool bulk_insert;
+ unsigned bulk_insert:1;
/*------------------------------*/
/* MySQL has a transaction coordinator to coordinate two phase
commit between multiple storage engines and the binary log. When
@@ -805,13 +811,6 @@ public:
/** whether this is holding the prepare mutex */
bool active_commit_ordered;
/*------------------------------*/
- bool check_unique_secondary;
- /*!< normally TRUE, but if the user
- wants to speed up inserts by
- suppressing unique key checks
- for secondary indexes when we decide
- if we can use the insert buffer for
- them, we set this FALSE */
bool flush_log_later;/* In 2PC, we hold the
prepare_commit mutex across
both phases. In that case, we
@@ -1189,10 +1188,16 @@ public:
return UNIV_UNLIKELY(bulk_insert) ? bulk_insert_apply_low(): DB_SUCCESS;
}
+ /** Do the bulk insert for the buffered insert operation of a table.
+ @param table bulk insert operation
+ @return DB_SUCCESS or error code. */
+ dberr_t bulk_insert_apply_for_table(dict_table_t *table);
private:
/** Apply the buffered bulk inserts. */
dberr_t bulk_insert_apply_low();
+ /** Rollback the bulk insert operation for the transaction */
+ void bulk_rollback_low();
/** Assign a rollback segment for modifying temporary tables.
@return the assigned rollback segment */
trx_rseg_t *assign_temp_rseg();
diff --git a/storage/innobase/include/trx0undo.inl b/storage/innobase/include/trx0undo.inl
index 9f05989f..023e2b98 100644
--- a/storage/innobase/include/trx0undo.inl
+++ b/storage/innobase/include/trx0undo.inl
@@ -125,5 +125,6 @@ trx_undo_page_get_next_rec(const buf_block_t *undo_page, uint16_t rec,
{
uint16_t end= trx_undo_page_get_end(undo_page, page_no, offset);
uint16_t next= mach_read_from_2(undo_page->page.frame + rec);
- return next == end ? nullptr : undo_page->page.frame + next;
+ ut_ad(next <= end);
+ return next >= end ? nullptr : undo_page->page.frame + next;
}
diff --git a/storage/innobase/include/ut0new.h b/storage/innobase/include/ut0new.h
index f4183e4c..3ff5f885 100644
--- a/storage/innobase/include/ut0new.h
+++ b/storage/innobase/include/ut0new.h
@@ -1071,9 +1071,8 @@ static inline void *ut_malloc_dontdump(size_t n_bytes, ...)
{
void *ptr = my_large_malloc(&n_bytes, MYF(0));
- ut_dontdump(ptr, n_bytes, true);
-
if (ptr) {
+ ut_dontdump(ptr, n_bytes, true);
os_total_large_mem_allocated += n_bytes;
}
return ptr;
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index fe16ce14..500b6455 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -242,20 +242,6 @@ ut_print_name(
FILE* ef, /*!< in: stream */
const trx_t* trx, /*!< in: transaction */
const char* name); /*!< in: table name to print */
-/** Format a table name, quoted as an SQL identifier.
-If the name contains a slash '/', the result will contain two
-identifiers separated by a period (.), as in SQL
-database_name.table_name.
-@see table_name_t
-@param[in] name table or index name
-@param[out] formatted formatted result, will be NUL-terminated
-@param[in] formatted_size size of the buffer in bytes
-@return pointer to 'formatted' */
-char*
-ut_format_name(
- const char* name,
- char* formatted,
- ulint formatted_size);
/**********************************************************************//**
Catenate files. */
diff --git a/storage/innobase/include/ut0vec.h b/storage/innobase/include/ut0vec.h
index f4660f96..ad43e1c8 100644
--- a/storage/innobase/include/ut0vec.h
+++ b/storage/innobase/include/ut0vec.h
@@ -201,15 +201,6 @@ ib_vector_last_const(
const ib_vector_t* vec); /* in: vector */
/********************************************************************
-Sort the vector elements. */
-UNIV_INLINE
-void
-ib_vector_sort(
-/*===========*/
- ib_vector_t* vec, /* in/out: vector */
- ib_compare_t compare); /* in: the comparator to use for sort */
-
-/********************************************************************
The default ib_vector_t heap free. Does nothing. */
UNIV_INLINE
void
diff --git a/storage/innobase/include/ut0vec.inl b/storage/innobase/include/ut0vec.inl
index 531f0f22..1a844dd8 100644
--- a/storage/innobase/include/ut0vec.inl
+++ b/storage/innobase/include/ut0vec.inl
@@ -305,19 +305,6 @@ ib_vector_remove(
}
/********************************************************************
-Sort the vector elements. */
-UNIV_INLINE
-void
-ib_vector_sort(
-/*===========*/
- /* out: void */
- ib_vector_t* vec, /* in: vector */
- ib_compare_t compare)/* in: the comparator to use for sort */
-{
- qsort(vec->data, vec->used, vec->sizeof_value, compare);
-}
-
-/********************************************************************
Destroy the vector. Make sure the vector owns the allocator, e.g.,
the heap in the the heap allocator. */
UNIV_INLINE
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index df51ceb1..a2107007 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -47,6 +47,7 @@ Created 5/7/1996 Heikki Tuuri
#include "que0que.h"
#include "scope.h"
#include <debug_sync.h>
+#include <mysql/service_thd_mdl.h>
#include <set>
@@ -173,7 +174,7 @@ void lock_sys_t::assert_locked(const dict_table_t &table) const
ut_ad(!table.is_temporary());
if (is_writer())
return;
- ut_ad(readers);
+ ut_ad(latch.have_rd());
ut_ad(table.lock_mutex_is_owner());
}
@@ -182,7 +183,7 @@ void lock_sys_t::hash_table::assert_locked(const page_id_t id) const
{
if (lock_sys.is_writer())
return;
- ut_ad(lock_sys.readers);
+ ut_ad(lock_sys.is_holder());
ut_ad(latch(cell_get(id.fold()))->is_locked());
}
@@ -191,7 +192,7 @@ void lock_sys_t::assert_locked(const hash_cell_t &cell) const
{
if (is_writer())
return;
- ut_ad(lock_sys.readers);
+ ut_ad(lock_sys.is_holder());
ut_ad(hash_table::latch(const_cast<hash_cell_t*>(&cell))->is_locked());
}
#endif
@@ -426,13 +427,10 @@ void lock_sys_t::wr_lock(const char *file, unsigned line)
{
mysql_mutex_assert_not_owner(&wait_mutex);
latch.wr_lock(file, line);
- ut_ad(!writer.exchange(pthread_self(), std::memory_order_relaxed));
}
/** Release exclusive lock_sys.latch */
void lock_sys_t::wr_unlock()
{
- ut_ad(writer.exchange(0, std::memory_order_relaxed) ==
- pthread_self());
latch.wr_unlock();
}
@@ -441,15 +439,11 @@ void lock_sys_t::rd_lock(const char *file, unsigned line)
{
mysql_mutex_assert_not_owner(&wait_mutex);
latch.rd_lock(file, line);
- ut_ad(!writer.load(std::memory_order_relaxed));
- ut_d(readers.fetch_add(1, std::memory_order_relaxed));
}
/** Release shared lock_sys.latch */
void lock_sys_t::rd_unlock()
{
- ut_ad(!writer.load(std::memory_order_relaxed));
- ut_ad(readers.fetch_sub(1, std::memory_order_relaxed));
latch.rd_unlock();
}
#endif
@@ -976,8 +970,31 @@ func_exit:
for (lock_t *lock= UT_LIST_GET_FIRST(table->locks); lock;
lock= UT_LIST_GET_NEXT(un_member.tab_lock.locks, lock))
{
- /* if victim has also BF status, but has earlier seqno, we have to wait */
- if (lock->trx != trx &&
+ /* Victim trx needs to be different from BF trx and it has to have a
+ THD so that we can kill it. Victim might not have THD in two cases:
+
+ (1) An incomplete transaction that was recovered from undo logs
+ on server startup (and not yet rolled back).
+
+ (2) Transaction that is in XA PREPARE state and whose client
+ connection was disconnected.
+
+ Neither of these can complete before lock_wait_wsrep() releases
+ lock_sys.latch.
+
+ (1) trx_t::commit_in_memory() is clearing both
+ trx_t::state and trx_t::is_recovered before it invokes
+ lock_release(trx_t*) (which would be blocked by the exclusive
+ lock_sys.latch that we are holding here). Hence, it is not
+ possible to write a debug assertion to document this scenario.
+
+ (2) If is in XA PREPARE state, it would eventually be rolled
+ back and the lock conflict would be resolved when an XA COMMIT
+ or XA ROLLBACK statement is executed in some other connection.
+
+ If victim has also BF status, but has earlier seqno, we have to wait.
+ */
+ if (lock->trx != trx && lock->trx->mysql_thd &&
!(wsrep_thd_is_BF(lock->trx->mysql_thd, false) &&
wsrep_thd_order_before(lock->trx->mysql_thd, trx->mysql_thd)))
{
@@ -1009,8 +1026,11 @@ func_exit:
lock= lock_rec_get_next(heap_no, lock);
do
{
- /* if victim has also BF status, but has earlier seqno, we have to wait */
- if (lock->trx != trx &&
+ /* This is similar case as above except here we have
+ record-locks instead of table locks. See details
+ from comment above.
+ */
+ if (lock->trx != trx && lock->trx->mysql_thd &&
!(wsrep_thd_is_BF(lock->trx->mysql_thd, false) &&
wsrep_thd_order_before(lock->trx->mysql_thd, trx->mysql_thd)))
{
@@ -1036,8 +1056,12 @@ func_exit:
std::vector<std::pair<ulong,trx_id_t>> victim_id;
for (trx_t *v : victims)
+ {
+ /* Victim must have THD */
+ ut_ad(v->mysql_thd);
victim_id.emplace_back(std::pair<ulong,trx_id_t>
{thd_get_thread_id(v->mysql_thd), v->id});
+ }
DBUG_EXECUTE_IF("sync.before_wsrep_thd_abort",
{
@@ -3940,6 +3964,8 @@ static void lock_table_dequeue(lock_t *in_lock, bool owns_wait_mutex)
dberr_t lock_table_for_trx(dict_table_t *table, trx_t *trx, lock_mode mode,
bool no_wait)
{
+ ut_ad(!dict_sys.frozen());
+
mem_heap_t *heap= mem_heap_create(512);
sel_node_t *node= sel_node_create(heap);
que_thr_t *thr= pars_complete_graph_for_exec(node, trx, heap, nullptr);
@@ -3976,6 +4002,67 @@ run_again:
return err;
}
+/** Lock the child tables of a table.
+@param table parent table
+@param trx transaction
+@return error code */
+dberr_t lock_table_children(dict_table_t *table, trx_t *trx)
+{
+ MDL_context *mdl_context=
+ static_cast<MDL_context*>(thd_mdl_context(trx->mysql_thd));
+ ut_ad(mdl_context);
+ struct table_mdl{dict_table_t* table; MDL_ticket *mdl;};
+ std::vector<table_mdl> children;
+ children.emplace_back(table_mdl{table, nullptr});
+
+ dberr_t err= DB_SUCCESS;
+ dict_sys.freeze(SRW_LOCK_CALL);
+
+ rescan:
+ for (auto f : table->referenced_set)
+ if (dict_table_t *child= f->foreign_table)
+ {
+ if (std::find_if(children.begin(), children.end(),
+ [&](const table_mdl &c){ return c.table == child; }) !=
+ children.end())
+ continue; /* We already acquired MDL on this child table. */
+ MDL_ticket *mdl= nullptr;
+ child->acquire();
+ child= dict_acquire_mdl_shared<false>(child, mdl_context, &mdl,
+ DICT_TABLE_OP_NORMAL);
+ if (child)
+ {
+ if (!mdl)
+ child->release();
+ children.emplace_back(table_mdl{child, mdl});
+ goto rescan;
+ }
+ err= DB_LOCK_WAIT_TIMEOUT;
+ break;
+ }
+ dict_sys.unfreeze();
+
+ if (err == DB_SUCCESS)
+ for (const table_mdl &child : children)
+ if (child.mdl)
+ if ((err= lock_table_for_trx(child.table, trx, LOCK_X)) != DB_SUCCESS)
+ break;
+
+ dict_sys.freeze(SRW_LOCK_CALL);
+ for (table_mdl &child : children)
+ {
+ if (child.mdl)
+ {
+ child.table->release();
+ mdl_context->release_lock(child.mdl);
+ }
+ }
+ dict_sys.unfreeze();
+
+ return err;
+}
+
+
/** Exclusively lock the data dictionary tables.
@param trx dictionary transaction
@return error code
@@ -4125,7 +4212,7 @@ restart:
ulint count= 1000;
/* We will not attempt hardware lock elision (memory transaction)
here. Both lock_rec_dequeue_from_page() and lock_table_dequeue()
- would likely lead to a memory transaction due to a system call, to
+ would likely lead to a memory transaction abort due to a system call, to
wake up a waiting transaction. */
lock_sys.rd_lock(SRW_LOCK_CALL);
trx->mutex_lock();
@@ -4295,28 +4382,82 @@ void lock_release_on_drop(trx_t *trx)
}
}
-/** Reset lock bit for supremum and rebuild waiting queue.
+/** Reset a lock bit and rebuild waiting queue.
@param cell rec hash cell of in_lock
@param lock the lock with supemum bit set */
-static void lock_rec_unlock_supremum(hash_cell_t &cell, lock_t *lock)
+static void lock_rec_unlock(hash_cell_t &cell, lock_t *lock, ulint heap_no)
{
- ut_ad(lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM));
+ ut_ad(lock_rec_get_nth_bit(lock, heap_no));
#ifdef SAFE_MUTEX
ut_ad(!mysql_mutex_is_owner(&lock_sys.wait_mutex));
#endif /* SAFE_MUTEX */
ut_ad(!lock->is_table());
ut_ad(lock_sys.is_writer() || lock->trx->mutex_is_owner());
- lock_rec_reset_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM);
+ lock_rec_reset_nth_bit(lock, heap_no);
- lock_t *first_lock= lock_sys_t::get_first(
- cell, lock->un_member.rec_lock.page_id, PAGE_HEAP_NO_SUPREMUM);
+ lock_t *first_lock=
+ lock_sys_t::get_first(cell, lock->un_member.rec_lock.page_id, heap_no);
lock_rec_rebuild_waiting_queue(
#if defined(UNIV_DEBUG) || !defined(DBUG_OFF)
lock->trx,
#endif /* defined(UNIV_DEBUG) || !defined(DBUG_OFF) */
- cell, first_lock, PAGE_HEAP_NO_SUPREMUM);
+ cell, first_lock, heap_no);
+}
+
+/** Release locks to unmodified records on a clustered index page.
+@param cell lock_sys.rec_hash cell of lock
+@param lock record lock
+@param offsets storage for rec_get_offsets()
+@param heap storage for rec_get_offsets()
+@param mtr mini-transaction (will be started and committed) */
+static void lock_rec_unlock_unmodified(hash_cell_t &cell, lock_t *lock,
+ rec_offs *&offsets, mem_heap_t *&heap,
+ mtr_t &mtr)
+{
+ ut_ad(!lock->is_waiting());
+
+ dict_index_t *const index= lock->index;
+
+ mtr.start();
+ if (buf_block_t *block=
+ btr_block_get(*index, lock->un_member.rec_lock.page_id.page_no(),
+ RW_S_LATCH, true, &mtr))
+ {
+ if (UNIV_UNLIKELY(!page_is_leaf(block->page.frame)))
+ {
+ ut_ad("corrupted lock system" == 0);
+ goto func_exit;
+ }
+
+ for (ulint i= PAGE_HEAP_NO_USER_LOW; i < lock_rec_get_n_bits(lock); ++i)
+ {
+ if (!lock_rec_get_nth_bit(lock, i));
+ else if (const rec_t *rec=
+ page_find_rec_with_heap_no(block->page.frame, i))
+ {
+ if (index->is_clust())
+ {
+ if (trx_read_trx_id(rec + row_trx_id_offset(rec, index)) ==
+ lock->trx->id)
+ continue;
+ unlock_rec:
+ lock_rec_unlock(cell, lock, i);
+ }
+ else
+ {
+ offsets= rec_get_offsets(rec, index, offsets, index->n_core_fields,
+ ULINT_UNDEFINED, &heap);
+ if (lock->trx !=
+ lock_sec_rec_some_has_impl(lock->trx, rec, index, offsets))
+ goto unlock_rec;
+ }
+ }
+ }
+ }
+func_exit:
+ mtr.commit();
}
/** Release non-exclusive locks on XA PREPARE,
@@ -4334,6 +4475,12 @@ static bool lock_release_on_prepare_try(trx_t *trx)
DBUG_ASSERT(trx->state == TRX_STATE_PREPARED);
bool all_released= true;
+ mtr_t mtr;
+ rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
+ rec_offs *offsets= offsets_;
+ mem_heap_t *heap= nullptr;
+ rec_offs_init(offsets_);
+
lock_sys.rd_lock(SRW_LOCK_CALL);
trx->mutex_lock();
@@ -4350,20 +4497,24 @@ static bool lock_release_on_prepare_try(trx_t *trx)
if (!lock->is_table())
{
ut_ad(!lock->index->table->is_temporary());
- bool supremum_bit = lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM);
- bool rec_granted_exclusive_not_gap =
+ bool supremum_bit= lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM);
+ bool rec_granted_exclusive_not_gap=
lock->is_rec_granted_exclusive_not_gap();
if (!supremum_bit && rec_granted_exclusive_not_gap)
continue;
- auto &lock_hash= lock_sys.hash_get(lock->type_mode);
- auto cell= lock_hash.cell_get(lock->un_member.rec_lock.page_id.fold());
+ if (UNIV_UNLIKELY(lock->type_mode & (LOCK_PREDICATE | LOCK_PRDT_PAGE)))
+ continue; /* SPATIAL INDEX locking is broken. */
+ auto cell=
+ lock_sys.rec_hash.cell_get(lock->un_member.rec_lock.page_id.fold());
auto latch= lock_sys_t::hash_table::latch(cell);
if (latch->try_acquire())
{
if (!rec_granted_exclusive_not_gap)
lock_rec_dequeue_from_page(lock, false);
else if (supremum_bit)
- lock_rec_unlock_supremum(*cell, lock);
+ lock_rec_unlock(*cell, lock, PAGE_HEAP_NO_SUPREMUM);
+ else
+ lock_rec_unlock_unmodified(*cell, lock, offsets, heap, mtr);
latch->release();
}
else
@@ -4396,6 +4547,8 @@ static bool lock_release_on_prepare_try(trx_t *trx)
lock_sys.rd_unlock();
trx->mutex_unlock();
+ if (UNIV_LIKELY_NULL(heap))
+ mem_heap_free(heap);
return all_released;
}
@@ -4409,52 +4562,71 @@ void lock_release_on_prepare(trx_t *trx)
if (lock_release_on_prepare_try(trx))
return;
- LockMutexGuard g{SRW_LOCK_CALL};
- trx->mutex_lock();
+ mtr_t mtr;
+ rec_offs offsets_[REC_OFFS_NORMAL_SIZE];
+ rec_offs *offsets= offsets_;
+ mem_heap_t *heap= nullptr;
+
+ rec_offs_init(offsets_);
- for (lock_t *prev, *lock= UT_LIST_GET_LAST(trx->lock.trx_locks); lock;
- lock= prev)
{
- ut_ad(lock->trx == trx);
- prev= UT_LIST_GET_PREV(trx_locks, lock);
- if (!lock->is_table())
+ LockMutexGuard g{SRW_LOCK_CALL};
+ trx->mutex_lock();
+
+ for (lock_t *prev, *lock= UT_LIST_GET_LAST(trx->lock.trx_locks); lock;
+ lock= prev)
{
- ut_ad(!lock->index->table->is_temporary());
- if (!lock->is_rec_granted_exclusive_not_gap())
- lock_rec_dequeue_from_page(lock, false);
- else if (lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM))
+ ut_ad(lock->trx == trx);
+ prev= UT_LIST_GET_PREV(trx_locks, lock);
+ if (!lock->is_table())
{
- auto &lock_hash= lock_sys.hash_get(lock->type_mode);
- auto cell= lock_hash.cell_get(lock->un_member.rec_lock.page_id.fold());
- lock_rec_unlock_supremum(*cell, lock);
+ ut_ad(!lock->index->table->is_temporary());
+ if (!lock->is_rec_granted_exclusive_not_gap())
+ lock_rec_dequeue_from_page(lock, false);
+ else if (UNIV_UNLIKELY(lock->type_mode &
+ (LOCK_PREDICATE | LOCK_PRDT_PAGE)))
+ /* SPATIAL INDEX locking is broken. */;
+ else
+ {
+ auto cell= lock_sys.rec_hash.cell_get(lock->un_member.rec_lock.
+ page_id.fold());
+ if (lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM))
+ lock_rec_unlock(*cell, lock, PAGE_HEAP_NO_SUPREMUM);
+ else
+ {
+ ut_ad(lock->trx->isolation_level > TRX_ISO_READ_COMMITTED ||
+ /* Insert-intention lock is valid for supremum for isolation
+ level > TRX_ISO_READ_COMMITTED */
+ lock->mode() == LOCK_X ||
+ !lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM));
+ lock_rec_unlock_unmodified(*cell, lock, offsets, heap, mtr);
+ }
+ }
}
else
- ut_ad(lock->trx->isolation_level > TRX_ISO_READ_COMMITTED ||
- /* Insert-intention lock is valid for supremum for isolation
- level > TRX_ISO_READ_COMMITTED */
- lock->mode() == LOCK_X ||
- !lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM));
- }
- else
- {
- ut_d(dict_table_t *table= lock->un_member.tab_lock.table);
- ut_ad(!table->is_temporary());
- switch (lock->mode()) {
- case LOCK_IS:
- case LOCK_S:
- lock_table_dequeue(lock, false);
- break;
- case LOCK_IX:
- case LOCK_X:
- ut_ad(table->id >= DICT_HDR_FIRST_ID || trx->dict_operation);
- /* fall through */
- default:
- break;
+ {
+ ut_d(dict_table_t *table= lock->un_member.tab_lock.table);
+ ut_ad(!table->is_temporary());
+ switch (lock->mode()) {
+ case LOCK_IS:
+ case LOCK_S:
+ lock_table_dequeue(lock, false);
+ break;
+ case LOCK_IX:
+ case LOCK_X:
+ ut_ad(table->id >= DICT_HDR_FIRST_ID || trx->dict_operation);
+ /* fall through */
+ default:
+ break;
+ }
}
}
}
trx->mutex_unlock();
+
+ if (UNIV_LIKELY_NULL(heap))
+ mem_heap_free(heap);
}
/** Release locks on a table whose creation is being rolled back */
@@ -5414,47 +5586,43 @@ lock_rec_insert_check_and_lock(
return err;
}
-/*********************************************************************//**
-Creates an explicit record lock for a running transaction that currently only
-has an implicit lock on the record. The transaction instance must have a
-reference count > 0 so that it can't be committed and freed before this
-function has completed. */
-static
-bool
-lock_rec_convert_impl_to_expl_for_trx(
-/*==================================*/
- trx_t* trx, /*!< in/out: active transaction */
- const page_id_t id, /*!< in: page identifier */
- const rec_t* rec, /*!< in: user record on page */
- dict_index_t* index) /*!< in: index of record */
+/** Create an explicit record lock for a transaction that currently only
+has an implicit lock on the record.
+@param trx referenced, active transaction, or nullptr
+@param id page identifier
+@param rec record in the page
+@param index the index B-tree that the record belongs to
+@return trx, with the reference released */
+static trx_t *lock_rec_convert_impl_to_expl_for_trx(trx_t *trx,
+ const page_id_t id,
+ const rec_t *rec,
+ dict_index_t *index)
{
- if (!trx)
- return false;
-
- ut_ad(trx->is_referenced());
- ut_ad(page_rec_is_leaf(rec));
- ut_ad(!rec_is_metadata(rec, *index));
+ if (trx)
+ {
+ ut_ad(trx->is_referenced());
+ ut_ad(page_rec_is_leaf(rec));
+ ut_ad(!rec_is_metadata(rec, *index));
- DEBUG_SYNC_C("before_lock_rec_convert_impl_to_expl_for_trx");
- ulint heap_no= page_rec_get_heap_no(rec);
+ ulint heap_no= page_rec_get_heap_no(rec);
- {
- LockGuard g{lock_sys.rec_hash, id};
- trx->mutex_lock();
- ut_ad(!trx_state_eq(trx, TRX_STATE_NOT_STARTED));
+ {
+ LockGuard g{lock_sys.rec_hash, id};
+ trx->mutex_lock();
+ ut_ad(!trx_state_eq(trx, TRX_STATE_NOT_STARTED));
+
+ if (!trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) &&
+ !lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, g.cell(), id, heap_no,
+ trx))
+ lock_rec_add_to_queue(LOCK_X | LOCK_REC_NOT_GAP, g.cell(), id,
+ page_align(rec), heap_no, index, trx, true);
+ }
- if (!trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) &&
- !lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, g.cell(), id, heap_no,
- trx))
- lock_rec_add_to_queue(LOCK_X | LOCK_REC_NOT_GAP, g.cell(), id,
- page_align(rec), heap_no, index, trx, true);
+ trx->release_reference();
+ trx->mutex_unlock();
}
- trx->mutex_unlock();
- trx->release_reference();
-
- DEBUG_SYNC_C("after_lock_rec_convert_impl_to_expl_for_trx");
- return false;
+ return trx;
}
@@ -5545,10 +5713,11 @@ should be created.
@param[in] rec record on the leaf page
@param[in] index the index of the record
@param[in] offsets rec_get_offsets(rec,index)
-@return whether caller_trx already holds an exclusive lock on rec */
+@return unsafe pointer to a transaction that held an exclusive lock on rec
+@retval nullptr if no transaction held an exclusive lock */
template<bool is_primary>
static
-bool
+const trx_t *
lock_rec_convert_impl_to_expl(
trx_t* caller_trx,
page_id_t id,
@@ -5572,10 +5741,10 @@ lock_rec_convert_impl_to_expl(
trx_id = lock_clust_rec_some_has_impl(rec, index, offsets);
if (trx_id == 0) {
- return false;
+ return nullptr;
}
if (UNIV_UNLIKELY(trx_id == caller_trx->id)) {
- return true;
+ return caller_trx;
}
trx = trx_sys.find(caller_trx, trx_id);
@@ -5586,7 +5755,7 @@ lock_rec_convert_impl_to_expl(
offsets);
if (trx == caller_trx) {
trx->release_reference();
- return true;
+ return trx;
}
ut_d(lock_rec_other_trx_holds_expl(caller_trx, trx, rec, id));
@@ -5631,11 +5800,18 @@ lock_clust_rec_modify_check_and_lock(
/* If a transaction has no explicit x-lock set on the record, set one
for it */
- if (lock_rec_convert_impl_to_expl<true>(thr_get_trx(thr),
- block->page.id(),
+ trx_t *trx = thr_get_trx(thr);
+ if (const trx_t *owner =
+ lock_rec_convert_impl_to_expl<true>(trx, block->page.id(),
rec, index, offsets)) {
- /* We already hold an implicit exclusive lock. */
- return DB_SUCCESS;
+ if (owner == trx) {
+ /* We already hold an exclusive lock. */
+ return DB_SUCCESS;
+ }
+
+ if (trx->snapshot_isolation && trx->read_view.is_open()) {
+ return DB_RECORD_CHANGED;
+ }
}
err = lock_rec_lock(true, LOCK_X | LOCK_REC_NOT_GAP,
@@ -5798,12 +5974,19 @@ lock_sec_rec_read_check_and_lock(
return DB_SUCCESS;
}
- if (!page_rec_is_supremum(rec)
- && lock_rec_convert_impl_to_expl<false>(
- trx, block->page.id(), rec, index, offsets)
- && gap_mode == LOCK_REC_NOT_GAP) {
- /* We already hold an implicit exclusive lock. */
- return DB_SUCCESS;
+ if (page_rec_is_supremum(rec)) {
+ } else if (const trx_t *owner =
+ lock_rec_convert_impl_to_expl<false>(trx, block->page.id(),
+ rec, index, offsets)) {
+ if (owner == trx) {
+ if (gap_mode == LOCK_REC_NOT_GAP) {
+ /* We already hold an exclusive lock. */
+ return DB_SUCCESS;
+ }
+ } else if (trx->snapshot_isolation
+ && trx->read_view.is_open()) {
+ return DB_RECORD_CHANGED;
+ }
}
#ifdef WITH_WSREP
@@ -5883,13 +6066,28 @@ lock_clust_rec_read_check_and_lock(
ulint heap_no = page_rec_get_heap_no(rec);
trx_t *trx = thr_get_trx(thr);
- if (!lock_table_has(trx, index->table, LOCK_X)
- && heap_no != PAGE_HEAP_NO_SUPREMUM
- && lock_rec_convert_impl_to_expl<true>(trx, id,
- rec, index, offsets)
- && gap_mode == LOCK_REC_NOT_GAP) {
- /* We already hold an implicit exclusive lock. */
- return DB_SUCCESS;
+ if (lock_table_has(trx, index->table, LOCK_X)
+ || heap_no == PAGE_HEAP_NO_SUPREMUM) {
+ } else if (const trx_t *owner =
+ lock_rec_convert_impl_to_expl<true>(trx, id,
+ rec, index, offsets)) {
+ if (owner == trx) {
+ if (gap_mode == LOCK_REC_NOT_GAP) {
+ /* We already hold an exclusive lock. */
+ return DB_SUCCESS;
+ }
+ } else if (trx->snapshot_isolation
+ && trx->read_view.is_open()) {
+ return DB_RECORD_CHANGED;
+ }
+ }
+
+ if (heap_no > PAGE_HEAP_NO_SUPREMUM && gap_mode != LOCK_GAP
+ && trx->snapshot_isolation
+ && trx->read_view.is_open()
+ && !trx->read_view.changes_visible(
+ trx_read_trx_id(rec + row_trx_id_offset(rec, index)))) {
+ return DB_RECORD_CHANGED;
}
dberr_t err = lock_rec_lock(false, gap_mode | mode,
@@ -6656,6 +6854,7 @@ and less modified rows. Bit 0 is used to prefer orig_trx in case of a tie.
print(buf);
}
+ DBUG_EXECUTE_IF("innodb_deadlock_victim_self", victim= trx;);
ut_ad(victim->state == TRX_STATE_ACTIVE);
/* victim->lock.was_chosen_as_deadlock_victim must always be set before
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index 9f39b303..ea717de2 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -69,9 +69,7 @@ log_t log_sys;
void log_t::set_capacity()
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
/* Margin for the free space in the smallest log, before a new query
step which modifies the database, is started */
@@ -134,7 +132,6 @@ bool log_t::create()
#endif
latch.SRW_LOCK_INIT(log_latch_key);
- init_lsn_lock();
last_checkpoint_lsn= FIRST_LSN;
log_capacity= 0;
@@ -143,7 +140,7 @@ bool log_t::create()
next_checkpoint_lsn= 0;
checkpoint_pending= false;
- buf_free= 0;
+ set_buf_free(0);
ut_ad(is_initialised());
#ifndef HAVE_PMEM
@@ -175,11 +172,13 @@ void log_file_t::write(os_offset_t offset, span<const byte> buf) noexcept
ut_ad(is_opened());
if (dberr_t err= os_file_write_func(IORequestWrite, "ib_logfile0", m_file,
buf.data(), offset, buf.size()))
- ib::fatal() << "write(\"ib_logfile0\") returned " << err;
+ ib::fatal() << "write(\"ib_logfile0\") returned " << err
+ << ". Operating system error number "
+ << IF_WIN(GetLastError(), errno) << ".";
}
#ifdef HAVE_PMEM
-# include <libpmem.h>
+# include "cache.h"
/** Attempt to memory map a file.
@param file log file handle
@@ -236,12 +235,13 @@ void log_t::attach_low(log_file_t file, os_offset_t size)
log.close();
mprotect(ptr, size_t(size), PROT_READ);
buf= static_cast<byte*>(ptr);
- max_buf_free= size;
+ max_buf_free= 1;
# if defined __linux__ || defined _WIN32
set_block_size(CPU_LEVEL1_DCACHE_LINESIZE);
# endif
log_maybe_unbuffered= true;
log_buffered= false;
+ mtr_t::finisher_update();
return true;
}
}
@@ -276,6 +276,7 @@ void log_t::attach_low(log_file_t file, os_offset_t size)
block_size);
#endif
+ mtr_t::finisher_update();
#ifdef HAVE_PMEM
checkpoint_buf= static_cast<byte*>(aligned_malloc(block_size, block_size));
memset_aligned<64>(checkpoint_buf, 0, block_size);
@@ -311,9 +312,7 @@ void log_t::header_write(byte *buf, lsn_t lsn, bool encrypted)
void log_t::create(lsn_t lsn) noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_write_locked());
-#endif
+ ut_ad(latch_have_wr());
ut_ad(!recv_no_log_write);
ut_ad(is_latest());
ut_ad(this == &log_sys);
@@ -330,12 +329,12 @@ void log_t::create(lsn_t lsn) noexcept
{
mprotect(buf, size_t(file_size), PROT_READ | PROT_WRITE);
memset_aligned<4096>(buf, 0, 4096);
- buf_free= START_OFFSET;
+ set_buf_free(START_OFFSET);
}
else
#endif
{
- buf_free= 0;
+ set_buf_free(0);
memset_aligned<4096>(flush_buf, 0, buf_size);
memset_aligned<4096>(buf, 0, buf_size);
}
@@ -464,8 +463,7 @@ log_t::resize_start_status log_t::resize_start(os_offset_t size) noexcept
resize_lsn.store(1, std::memory_order_relaxed);
resize_target= 0;
resize_log.m_file=
- os_file_create_func(path.c_str(),
- OS_FILE_CREATE | OS_FILE_ON_ERROR_NO_EXIT,
+ os_file_create_func(path.c_str(), OS_FILE_CREATE,
OS_FILE_NORMAL, OS_LOG_FILE, false, &success);
if (success)
{
@@ -812,9 +810,7 @@ ATTRIBUTE_COLD void log_t::resize_write_buf(size_t length) noexcept
@return the current log sequence number */
template<bool release_latch> inline lsn_t log_t::write_buf() noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_write_locked());
-#endif
+ ut_ad(latch_have_wr());
ut_ad(!is_pmem());
ut_ad(!srv_read_only_mode);
@@ -930,7 +926,7 @@ wait and check if an already running write is covering the request.
void log_write_up_to(lsn_t lsn, bool durable,
const completion_callback *callback)
{
- ut_ad(!srv_read_only_mode || (log_sys.buf_free < log_sys.max_buf_free));
+ ut_ad(!srv_read_only_mode || log_sys.buf_free_ok());
ut_ad(lsn != LSN_MAX);
ut_ad(lsn != 0);
@@ -1067,7 +1063,7 @@ NOTE that this function may only be called while not holding
any synchronization objects except dict_sys.latch. */
void log_free_check()
{
- ut_ad(!lock_sys.is_writer());
+ ut_ad(!lock_sys.is_holder());
if (log_sys.check_for_checkpoint())
{
ut_ad(!recv_no_log_write);
@@ -1291,6 +1287,7 @@ log_print(
void log_t::close()
{
ut_ad(this == &log_sys);
+ ut_ad(!(buf_free & buf_free_LOCK));
if (!is_initialised()) return;
close_file();
@@ -1308,7 +1305,6 @@ void log_t::close()
#endif
latch.destroy();
- destroy_lsn_lock();
recv_sys.close();
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index e72f842f..6b6a6868 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -844,8 +844,7 @@ processed:
inside recv_sys_t::recover_deferred(). */
bool success;
handle= os_file_create(innodb_data_file_key, filename,
- OS_FILE_CREATE | OS_FILE_ON_ERROR_NO_EXIT |
- OS_FILE_ON_ERROR_SILENT,
+ OS_FILE_CREATE_SILENT,
OS_FILE_AIO, OS_DATA_FILE, false, &success);
}
space->add(filename, handle, size, false, false);
@@ -1714,7 +1713,7 @@ dberr_t recv_sys_t::find_checkpoint()
std::string path{get_log_file_path()};
bool success;
os_file_t file{os_file_create_func(path.c_str(),
- OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT,
+ OS_FILE_OPEN,
OS_FILE_NORMAL, OS_LOG_FILE,
srv_read_only_mode, &success)};
if (file == OS_FILE_CLOSED)
@@ -1744,8 +1743,7 @@ dberr_t recv_sys_t::find_checkpoint()
{
path= get_log_file_path(LOG_FILE_NAME_PREFIX).append(std::to_string(i));
file= os_file_create_func(path.c_str(),
- OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT |
- OS_FILE_ON_ERROR_SILENT,
+ OS_FILE_OPEN_SILENT,
OS_FILE_NORMAL, OS_LOG_FILE, true, &success);
if (file == OS_FILE_CLOSED)
break;
@@ -2520,11 +2518,9 @@ recv_sys_t::parse_mtr_result recv_sys_t::parse(source &l, bool if_exists)
noexcept
{
restart:
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked() ||
+ ut_ad(log_sys.latch_have_wr() ||
srv_operation == SRV_OPERATION_BACKUP ||
srv_operation == SRV_OPERATION_BACKUP_NO_DEFER);
-#endif
mysql_mutex_assert_owner(&mutex);
ut_ad(log_sys.next_checkpoint_lsn);
ut_ad(log_sys.is_latest());
@@ -4052,9 +4048,7 @@ static bool recv_scan_log(bool last_phase)
lsn_t rewound_lsn= 0;
for (ut_d(lsn_t source_offset= 0);;)
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
#ifdef UNIV_DEBUG
const bool wrap{source_offset + recv_sys.len == log_sys.file_size};
#endif
@@ -4120,9 +4114,10 @@ static bool recv_scan_log(bool last_phase)
const lsn_t end{recv_sys.file_checkpoint};
ut_ad(!end || end == recv_sys.lsn);
+ bool corrupt_fs= recv_sys.is_corrupt_fs();
mysql_mutex_unlock(&recv_sys.mutex);
- if (!end)
+ if (!end && !corrupt_fs)
{
recv_sys.set_corrupt_log();
sql_print_error("InnoDB: Missing FILE_CHECKPOINT(" LSN_PF
@@ -4448,9 +4443,7 @@ recv_init_crash_recovery_spaces(bool rescan, bool& missing_tablespace)
static dberr_t recv_rename_files()
{
mysql_mutex_assert_owner(&recv_sys.mutex);
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
dberr_t err= DB_SUCCESS;
@@ -4602,6 +4595,9 @@ read_only_recovery:
LSN_PF, recv_sys.lsn);
goto err_exit;
}
+ if (recv_sys.is_corrupt_fs()) {
+ goto err_exit;
+ }
ut_ad(recv_sys.file_checkpoint);
if (rewind) {
recv_sys.lsn = log_sys.next_checkpoint_lsn;
@@ -4640,9 +4636,9 @@ read_only_recovery:
do {
rescan = recv_scan_log(false);
- ut_ad(!recv_sys.is_corrupt_fs());
- if (recv_sys.is_corrupt_log()) {
+ if (recv_sys.is_corrupt_log() ||
+ recv_sys.is_corrupt_fs()) {
goto err_exit;
}
@@ -4730,7 +4726,7 @@ err_exit:
PROT_READ | PROT_WRITE);
#endif
}
- log_sys.buf_free = recv_sys.offset;
+ log_sys.set_buf_free(recv_sys.offset);
if (recv_needed_recovery
&& srv_operation <= SRV_OPERATION_EXPORT_RESTORED) {
/* Write a FILE_CHECKPOINT marker as the first thing,
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index 01641f74..74d3adb2 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -37,6 +37,31 @@ Created 11/26/1995 Heikki Tuuri
#include "srv0start.h"
#include "log.h"
#include "mariadb_stats.h"
+#include "my_cpu.h"
+
+#ifdef HAVE_PMEM
+void (*mtr_t::commit_logger)(mtr_t *, std::pair<lsn_t,page_flush_ahead>);
+#endif
+std::pair<lsn_t,mtr_t::page_flush_ahead> (*mtr_t::finisher)(mtr_t *, size_t);
+unsigned mtr_t::spin_wait_delay;
+
+void mtr_t::finisher_update()
+{
+ ut_ad(log_sys.latch_have_wr());
+#ifdef HAVE_PMEM
+ if (log_sys.is_pmem())
+ {
+ commit_logger= mtr_t::commit_log<true>;
+ finisher= spin_wait_delay
+ ? mtr_t::finish_writer<true,true> : mtr_t::finish_writer<false,true>;
+ return;
+ }
+ commit_logger= mtr_t::commit_log<false>;
+#endif
+ finisher=
+ (spin_wait_delay
+ ? mtr_t::finish_writer<true,false> : mtr_t::finish_writer<false,false>);
+}
void mtr_memo_slot_t::release() const
{
@@ -82,9 +107,7 @@ void mtr_memo_slot_t::release() const
inline buf_page_t *buf_pool_t::prepare_insert_into_flush_list(lsn_t lsn)
noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(recv_recovery_is_on() || log_sys.latch.is_locked());
-#endif
+ ut_ad(recv_recovery_is_on() || log_sys.latch_have_any());
ut_ad(lsn >= log_sys.last_checkpoint_lsn);
mysql_mutex_assert_owner(&flush_list_mutex);
static_assert(log_t::FIRST_LSN >= 2, "compatibility");
@@ -234,7 +257,14 @@ static void insert_imported(buf_block_t *block)
if (block->page.oldest_modification() <= 1)
{
log_sys.latch.rd_lock(SRW_LOCK_CALL);
- const lsn_t lsn= log_sys.last_checkpoint_lsn;
+ /* For unlogged mtrs (MTR_LOG_NO_REDO), we use the current system LSN. The
+ mtr that generated the LSN is either already committed or in mtr_t::commit.
+ Shared latch and relaxed atomics should be fine here as it is guaranteed
+ that both the current mtr and the mtr that generated the LSN would have
+ added the dirty pages to flush list before we access the minimum LSN during
+ checkpoint. log_checkpoint_low() acquires exclusive log_sys.latch before
+ commencing. */
+ const lsn_t lsn= log_sys.get_lsn();
mysql_mutex_lock(&buf_pool.flush_list_mutex);
buf_pool.insert_into_flush_list
(buf_pool.prepare_insert_into_flush_list(lsn), block, lsn);
@@ -310,12 +340,9 @@ void mtr_t::release()
inline lsn_t log_t::get_write_target() const
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_locked());
-#endif
- if (UNIV_LIKELY(buf_free < max_buf_free))
+ ut_ad(latch_have_any());
+ if (UNIV_LIKELY(buf_free_ok()))
return 0;
- ut_ad(!is_pmem());
/* The LSN corresponding to the end of buf is
write_lsn - (first_lsn & 4095) + buf_free,
but we use simpler arithmetics to return a smaller write target in
@@ -324,151 +351,161 @@ inline lsn_t log_t::get_write_target() const
return write_lsn + max_buf_free / 2;
}
-/** Commit a mini-transaction. */
-void mtr_t::commit()
+template<bool pmem>
+void mtr_t::commit_log(mtr_t *mtr, std::pair<lsn_t,page_flush_ahead> lsns)
{
- ut_ad(is_active());
- ut_ad(!is_inside_ibuf());
-
- /* This is a dirty read, for debugging. */
- ut_ad(!m_modifications || !recv_no_log_write);
- ut_ad(!m_modifications || m_log_mode != MTR_LOG_NONE);
- ut_ad(!m_latch_ex);
+ size_t modified= 0;
+ const lsn_t write_lsn= pmem ? 0 : log_sys.get_write_target();
- if (m_modifications && (m_log_mode == MTR_LOG_NO_REDO || !m_log.empty()))
+ if (mtr->m_made_dirty)
{
- if (UNIV_UNLIKELY(!is_logged()))
+ auto it= mtr->m_memo.rbegin();
+
+ mysql_mutex_lock(&buf_pool.flush_list_mutex);
+
+ buf_page_t *const prev=
+ buf_pool.prepare_insert_into_flush_list(lsns.first);
+
+ while (it != mtr->m_memo.rend())
{
- release_unlogged();
- goto func_exit;
+ const mtr_memo_slot_t &slot= *it++;
+ if (slot.type & MTR_MEMO_MODIFY)
+ {
+ ut_ad(slot.type == MTR_MEMO_PAGE_X_MODIFY ||
+ slot.type == MTR_MEMO_PAGE_SX_MODIFY);
+ modified++;
+ buf_block_t *b= static_cast<buf_block_t*>(slot.object);
+ ut_ad(b->page.id() < end_page_id);
+ ut_d(const auto s= b->page.state());
+ ut_ad(s > buf_page_t::FREED);
+ ut_ad(s < buf_page_t::READ_FIX);
+ ut_ad(mach_read_from_8(b->page.frame + FIL_PAGE_LSN) <=
+ mtr->m_commit_lsn);
+ mach_write_to_8(b->page.frame + FIL_PAGE_LSN, mtr->m_commit_lsn);
+ if (UNIV_LIKELY_NULL(b->page.zip.data))
+ memcpy_aligned<8>(FIL_PAGE_LSN + b->page.zip.data,
+ FIL_PAGE_LSN + b->page.frame, 8);
+ buf_pool.insert_into_flush_list(prev, b, lsns.first);
+ }
}
- ut_ad(!srv_read_only_mode);
- std::pair<lsn_t,page_flush_ahead> lsns{do_write()};
- process_freed_pages();
- size_t modified= 0;
- const lsn_t write_lsn= log_sys.get_write_target();
+ ut_ad(modified);
+ buf_pool.flush_list_requests+= modified;
+ buf_pool.page_cleaner_wakeup();
+ mysql_mutex_unlock(&buf_pool.flush_list_mutex);
- if (m_made_dirty)
+ if (mtr->m_latch_ex)
{
- auto it= m_memo.rbegin();
-
- mysql_mutex_lock(&buf_pool.flush_list_mutex);
+ log_sys.latch.wr_unlock();
+ mtr->m_latch_ex= false;
+ }
+ else
+ log_sys.latch.rd_unlock();
- buf_page_t *const prev=
- buf_pool.prepare_insert_into_flush_list(lsns.first);
+ mtr->release();
+ }
+ else
+ {
+ if (mtr->m_latch_ex)
+ {
+ log_sys.latch.wr_unlock();
+ mtr->m_latch_ex= false;
+ }
+ else
+ log_sys.latch.rd_unlock();
- while (it != m_memo.rend())
- {
- const mtr_memo_slot_t &slot= *it++;
+ for (auto it= mtr->m_memo.rbegin(); it != mtr->m_memo.rend(); )
+ {
+ const mtr_memo_slot_t &slot= *it++;
+ ut_ad(slot.object);
+ switch (slot.type) {
+ case MTR_MEMO_S_LOCK:
+ static_cast<index_lock*>(slot.object)->s_unlock();
+ break;
+ case MTR_MEMO_SPACE_X_LOCK:
+ static_cast<fil_space_t*>(slot.object)->set_committed_size();
+ static_cast<fil_space_t*>(slot.object)->x_unlock();
+ break;
+ case MTR_MEMO_X_LOCK:
+ case MTR_MEMO_SX_LOCK:
+ static_cast<index_lock*>(slot.object)->
+ u_or_x_unlock(slot.type == MTR_MEMO_SX_LOCK);
+ break;
+ default:
+ buf_page_t *bpage= static_cast<buf_page_t*>(slot.object);
+ ut_d(const auto s=)
+ bpage->unfix();
if (slot.type & MTR_MEMO_MODIFY)
{
ut_ad(slot.type == MTR_MEMO_PAGE_X_MODIFY ||
slot.type == MTR_MEMO_PAGE_SX_MODIFY);
- modified++;
- buf_block_t *b= static_cast<buf_block_t*>(slot.object);
- ut_ad(b->page.id() < end_page_id);
- ut_d(const auto s= b->page.state());
- ut_ad(s > buf_page_t::FREED);
+ ut_ad(bpage->oldest_modification() > 1);
+ ut_ad(bpage->oldest_modification() < mtr->m_commit_lsn);
+ ut_ad(bpage->id() < end_page_id);
+ ut_ad(s >= buf_page_t::FREED);
ut_ad(s < buf_page_t::READ_FIX);
- ut_ad(mach_read_from_8(b->page.frame + FIL_PAGE_LSN) <=
- m_commit_lsn);
- mach_write_to_8(b->page.frame + FIL_PAGE_LSN, m_commit_lsn);
- if (UNIV_LIKELY_NULL(b->page.zip.data))
- memcpy_aligned<8>(FIL_PAGE_LSN + b->page.zip.data,
- FIL_PAGE_LSN + b->page.frame, 8);
- buf_pool.insert_into_flush_list(prev, b, lsns.first);
+ ut_ad(mach_read_from_8(bpage->frame + FIL_PAGE_LSN) <=
+ mtr->m_commit_lsn);
+ mach_write_to_8(bpage->frame + FIL_PAGE_LSN, mtr->m_commit_lsn);
+ if (UNIV_LIKELY_NULL(bpage->zip.data))
+ memcpy_aligned<8>(FIL_PAGE_LSN + bpage->zip.data,
+ FIL_PAGE_LSN + bpage->frame, 8);
+ modified++;
+ }
+ switch (auto latch= slot.type & ~MTR_MEMO_MODIFY) {
+ case MTR_MEMO_PAGE_S_FIX:
+ bpage->lock.s_unlock();
+ continue;
+ case MTR_MEMO_PAGE_SX_FIX:
+ case MTR_MEMO_PAGE_X_FIX:
+ bpage->lock.u_or_x_unlock(latch == MTR_MEMO_PAGE_SX_FIX);
+ continue;
+ default:
+ ut_ad(latch == MTR_MEMO_BUF_FIX);
}
}
+ }
- ut_ad(modified);
- buf_pool.flush_list_requests+= modified;
- buf_pool.page_cleaner_wakeup();
- mysql_mutex_unlock(&buf_pool.flush_list_mutex);
+ buf_pool.add_flush_list_requests(modified);
+ mtr->m_memo.clear();
+ }
- if (m_latch_ex)
- {
- log_sys.latch.wr_unlock();
- m_latch_ex= false;
- }
- else
- log_sys.latch.rd_unlock();
+ mariadb_increment_pages_updated(modified);
- release();
- }
- else
- {
- if (m_latch_ex)
- {
- log_sys.latch.wr_unlock();
- m_latch_ex= false;
- }
- else
- log_sys.latch.rd_unlock();
+ if (UNIV_UNLIKELY(lsns.second != PAGE_FLUSH_NO))
+ buf_flush_ahead(mtr->m_commit_lsn, lsns.second == PAGE_FLUSH_SYNC);
- for (auto it= m_memo.rbegin(); it != m_memo.rend(); )
- {
- const mtr_memo_slot_t &slot= *it++;
- ut_ad(slot.object);
- switch (slot.type) {
- case MTR_MEMO_S_LOCK:
- static_cast<index_lock*>(slot.object)->s_unlock();
- break;
- case MTR_MEMO_SPACE_X_LOCK:
- static_cast<fil_space_t*>(slot.object)->set_committed_size();
- static_cast<fil_space_t*>(slot.object)->x_unlock();
- break;
- case MTR_MEMO_X_LOCK:
- case MTR_MEMO_SX_LOCK:
- static_cast<index_lock*>(slot.object)->
- u_or_x_unlock(slot.type == MTR_MEMO_SX_LOCK);
- break;
- default:
- buf_page_t *bpage= static_cast<buf_page_t*>(slot.object);
- ut_d(const auto s=)
- bpage->unfix();
- if (slot.type & MTR_MEMO_MODIFY)
- {
- ut_ad(slot.type == MTR_MEMO_PAGE_X_MODIFY ||
- slot.type == MTR_MEMO_PAGE_SX_MODIFY);
- ut_ad(bpage->oldest_modification() > 1);
- ut_ad(bpage->oldest_modification() < m_commit_lsn);
- ut_ad(bpage->id() < end_page_id);
- ut_ad(s >= buf_page_t::FREED);
- ut_ad(s < buf_page_t::READ_FIX);
- ut_ad(mach_read_from_8(bpage->frame + FIL_PAGE_LSN) <=
- m_commit_lsn);
- mach_write_to_8(bpage->frame + FIL_PAGE_LSN, m_commit_lsn);
- if (UNIV_LIKELY_NULL(bpage->zip.data))
- memcpy_aligned<8>(FIL_PAGE_LSN + bpage->zip.data,
- FIL_PAGE_LSN + bpage->frame, 8);
- modified++;
- }
- switch (auto latch= slot.type & ~MTR_MEMO_MODIFY) {
- case MTR_MEMO_PAGE_S_FIX:
- bpage->lock.s_unlock();
- continue;
- case MTR_MEMO_PAGE_SX_FIX:
- case MTR_MEMO_PAGE_X_FIX:
- bpage->lock.u_or_x_unlock(latch == MTR_MEMO_PAGE_SX_FIX);
- continue;
- default:
- ut_ad(latch == MTR_MEMO_BUF_FIX);
- }
- }
- }
+ if (!pmem && UNIV_UNLIKELY(write_lsn != 0))
+ log_write_up_to(write_lsn, false);
+}
- buf_pool.add_flush_list_requests(modified);
- m_memo.clear();
- }
+/** Commit a mini-transaction. */
+void mtr_t::commit()
+{
+ ut_ad(is_active());
+ ut_ad(!is_inside_ibuf());
- mariadb_increment_pages_updated(modified);
+ /* This is a dirty read, for debugging. */
+ ut_ad(!m_modifications || !recv_no_log_write);
+ ut_ad(!m_modifications || m_log_mode != MTR_LOG_NONE);
+ ut_ad(!m_latch_ex);
- if (UNIV_UNLIKELY(lsns.second != PAGE_FLUSH_NO))
- buf_flush_ahead(m_commit_lsn, lsns.second == PAGE_FLUSH_SYNC);
+ if (m_modifications && (m_log_mode == MTR_LOG_NO_REDO || !m_log.empty()))
+ {
+ if (UNIV_UNLIKELY(!is_logged()))
+ {
+ release_unlogged();
+ goto func_exit;
+ }
- if (UNIV_UNLIKELY(write_lsn != 0))
- log_write_up_to(write_lsn, false);
+ ut_ad(!srv_read_only_mode);
+ std::pair<lsn_t,page_flush_ahead> lsns{do_write()};
+ process_freed_pages();
+#ifdef HAVE_PMEM
+ commit_logger(this, lsns);
+#else
+ commit_log<false>(this, lsns);
+#endif
}
else
{
@@ -513,10 +550,8 @@ void mtr_t::rollback_to_savepoint(ulint begin, ulint end)
/** Set create_lsn. */
inline void fil_space_t::set_create_lsn(lsn_t lsn)
{
-#ifndef SUX_LOCK_GENERIC
/* Concurrent log_checkpoint_low() must be impossible. */
- ut_ad(latch.is_write_locked());
-#endif
+ ut_ad(latch.have_wr());
create_lsn= lsn;
}
@@ -529,7 +564,6 @@ void mtr_t::commit_shrink(fil_space_t &space, uint32_t size)
ut_ad(!is_inside_ibuf());
ut_ad(!high_level_read_only);
ut_ad(m_modifications);
- ut_ad(m_made_dirty);
ut_ad(!m_memo.empty());
ut_ad(!recv_recovery_is_on());
ut_ad(m_log_mode == MTR_LOG_ALL);
@@ -554,9 +588,7 @@ void mtr_t::commit_shrink(fil_space_t &space, uint32_t size)
/* Durably write the reduced FSP_SIZE before truncating the data file. */
log_write_and_flush();
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
os_file_truncate(space.chain.start->name, space.chain.start->handle,
os_offset_t{size} << srv_page_size_shift, true);
@@ -713,9 +745,7 @@ This is to be used at log_checkpoint().
@return current LSN */
ATTRIBUTE_COLD lsn_t mtr_t::commit_files(lsn_t checkpoint_lsn)
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_write_locked());
-#endif
+ ut_ad(log_sys.latch_have_wr());
ut_ad(is_active());
ut_ad(!is_inside_ibuf());
ut_ad(m_log_mode == MTR_LOG_ALL);
@@ -870,13 +900,111 @@ ATTRIBUTE_COLD static void log_overwrite_warning(lsn_t lsn)
? ". Shutdown is in progress" : "");
}
-/** Wait in append_prepare() for buffer to become available
-@param lsn log sequence number to write up to
-@param ex whether log_sys.latch is exclusively locked */
-ATTRIBUTE_COLD void log_t::append_prepare_wait(lsn_t lsn, bool ex) noexcept
+static ATTRIBUTE_NOINLINE void lsn_delay(size_t delay, size_t mult) noexcept
+{
+ delay*= mult * 2; // GCC 13.2.0 -O2 targeting AMD64 wants to unroll twice
+ HMT_low();
+ do
+ MY_RELAX_CPU();
+ while (--delay);
+ HMT_medium();
+}
+
+#if defined __clang_major__ && __clang_major__ < 10
+/* Only clang-10 introduced support for asm goto */
+#elif defined __APPLE__
+/* At least some versions of Apple Xcode do not support asm goto */
+#elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)
+# if SIZEOF_SIZE_T == 8
+# define LOCK_TSET \
+ __asm__ goto("lock btsq $63, %0\n\t" "jnc %l1" \
+ : : "m"(buf_free) : "cc", "memory" : got)
+# else
+# define LOCK_TSET \
+ __asm__ goto("lock btsl $31, %0\n\t" "jnc %l1" \
+ : : "m"(buf_free) : "cc", "memory" : got)
+# endif
+#elif defined _MSC_VER && (defined _M_IX86 || defined _M_X64)
+# if SIZEOF_SIZE_T == 8
+# define LOCK_TSET \
+ if (!_interlockedbittestandset64 \
+ (reinterpret_cast<volatile LONG64*>(&buf_free), 63)) return
+# else
+# define LOCK_TSET \
+ if (!_interlockedbittestandset \
+ (reinterpret_cast<volatile long*>(&buf_free), 31)) return
+# endif
+#endif
+
+#ifdef LOCK_TSET
+ATTRIBUTE_NOINLINE
+void log_t::lsn_lock_bts() noexcept
+{
+ LOCK_TSET;
+ {
+ const size_t m= mtr_t::spin_wait_delay;
+ constexpr size_t DELAY= 10, MAX_ITERATIONS= 10;
+ for (size_t delay_count= DELAY, delay_iterations= 1;;
+ lsn_delay(delay_iterations, m))
+ {
+ if (!(buf_free.load(std::memory_order_relaxed) & buf_free_LOCK))
+ LOCK_TSET;
+ if (!delay_count);
+ else if (delay_iterations < MAX_ITERATIONS)
+ delay_count= DELAY, delay_iterations++;
+ else
+ delay_count--;
+ }
+ }
+
+# ifdef __GNUC__
+ got:
+ return;
+# endif
+}
+
+inline
+#else
+ATTRIBUTE_NOINLINE
+#endif
+size_t log_t::lock_lsn() noexcept
+{
+#ifdef LOCK_TSET
+ lsn_lock_bts();
+ return ~buf_free_LOCK & buf_free.load(std::memory_order_relaxed);
+# undef LOCK_TSET
+#else
+ size_t b= buf_free.fetch_or(buf_free_LOCK, std::memory_order_acquire);
+ if (b & buf_free_LOCK)
+ {
+ const size_t m= mtr_t::spin_wait_delay;
+ constexpr size_t DELAY= 10, MAX_ITERATIONS= 10;
+ for (size_t delay_count= DELAY, delay_iterations= 1;
+ ((b= buf_free.load(std::memory_order_relaxed)) & buf_free_LOCK) ||
+ (buf_free_LOCK & (b= buf_free.fetch_or(buf_free_LOCK,
+ std::memory_order_acquire)));
+ lsn_delay(delay_iterations, m))
+ if (!delay_count);
+ else if (delay_iterations < MAX_ITERATIONS)
+ delay_count= DELAY, delay_iterations++;
+ else
+ delay_count--;
+ }
+ return b;
+#endif
+}
+
+template<bool spin>
+ATTRIBUTE_COLD size_t log_t::append_prepare_wait(size_t b, bool ex, lsn_t lsn)
+ noexcept
{
waits++;
- unlock_lsn();
+ ut_ad(buf_free.load(std::memory_order_relaxed) ==
+ (spin ? (b | buf_free_LOCK) : b));
+ if (spin)
+ buf_free.store(b, std::memory_order_release);
+ else
+ lsn_lock.wr_unlock();
if (ex)
latch.wr_unlock();
@@ -890,51 +1018,57 @@ ATTRIBUTE_COLD void log_t::append_prepare_wait(lsn_t lsn, bool ex) noexcept
else
latch.rd_lock(SRW_LOCK_CALL);
- lock_lsn();
+ if (spin)
+ return lock_lsn();
+
+ lsn_lock.wr_lock();
+ return buf_free.load(std::memory_order_relaxed);
}
/** Reserve space in the log buffer for appending data.
+@tparam spin whether to use the spin-only lock_lsn()
@tparam pmem log_sys.is_pmem()
@param size total length of the data to append(), in bytes
@param ex whether log_sys.latch is exclusively locked
@return the start LSN and the buffer position for append() */
-template<bool pmem>
+template<bool spin,bool pmem>
inline
std::pair<lsn_t,byte*> log_t::append_prepare(size_t size, bool ex) noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_locked());
-# ifndef _WIN32 // there is no accurate is_write_locked() on SRWLOCK
- ut_ad(ex == latch.is_write_locked());
-# endif
-#endif
+ ut_ad(ex ? latch_have_wr() : latch_have_rd());
ut_ad(pmem == is_pmem());
- lock_lsn();
+ if (!spin)
+ lsn_lock.wr_lock();
+ size_t b{spin ? lock_lsn() : buf_free.load(std::memory_order_relaxed)};
write_to_buf++;
const lsn_t l{lsn.load(std::memory_order_relaxed)}, end_lsn{l + size};
- size_t b{buf_free};
if (UNIV_UNLIKELY(pmem
? (end_lsn -
get_flushed_lsn(std::memory_order_relaxed)) > capacity()
: b + size >= buf_size))
- {
- append_prepare_wait(l, ex);
- b= buf_free;
- }
+ b= append_prepare_wait<spin>(b, ex, l);
- lsn.store(end_lsn, std::memory_order_relaxed);
size_t new_buf_free= b + size;
if (pmem && new_buf_free >= file_size)
new_buf_free-= size_t(capacity());
- buf_free= new_buf_free;
- unlock_lsn();
+
+ lsn.store(end_lsn, std::memory_order_relaxed);
if (UNIV_UNLIKELY(end_lsn >= last_checkpoint_lsn + log_capacity))
- set_check_for_checkpoint();
+ set_check_for_checkpoint(true);
+
+ byte *our_buf= buf;
+ if (spin)
+ buf_free.store(new_buf_free, std::memory_order_release);
+ else
+ {
+ buf_free.store(new_buf_free, std::memory_order_relaxed);
+ lsn_lock.wr_unlock();
+ }
- return {l, &buf[b]};
+ return {l, our_buf + b};
}
/** Finish appending data to the log.
@@ -942,9 +1076,7 @@ std::pair<lsn_t,byte*> log_t::append_prepare(size_t size, bool ex) noexcept
@return whether buf_flush_ahead() will have to be invoked */
static mtr_t::page_flush_ahead log_close(lsn_t lsn) noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(log_sys.latch.is_locked());
-#endif
+ ut_ad(log_sys.latch_have_any());
const lsn_t checkpoint_age= lsn - log_sys.last_checkpoint_lsn;
@@ -1009,9 +1141,7 @@ std::pair<lsn_t,mtr_t::page_flush_ahead> mtr_t::do_write()
ut_ad(!recv_no_log_write);
ut_ad(is_logged());
ut_ad(m_log.size());
-#ifndef SUX_LOCK_GENERIC
- ut_ad(!m_latch_ex || log_sys.latch.is_write_locked());
-#endif
+ ut_ad(!m_latch_ex || log_sys.latch_have_wr());
#ifndef DBUG_OFF
do
@@ -1069,9 +1199,7 @@ func_exit:
inline void log_t::resize_write(lsn_t lsn, const byte *end, size_t len,
size_t seq) noexcept
{
-#ifndef SUX_LOCK_GENERIC
- ut_ad(latch.is_locked());
-#endif
+ ut_ad(latch_have_any());
if (UNIV_LIKELY_NULL(resize_buf))
{
@@ -1176,50 +1304,47 @@ inline void log_t::resize_write(lsn_t lsn, const byte *end, size_t len,
}
}
+template<bool spin,bool pmem>
std::pair<lsn_t,mtr_t::page_flush_ahead>
-mtr_t::finish_write(size_t len)
+mtr_t::finish_writer(mtr_t *mtr, size_t len)
{
+ ut_ad(log_sys.is_latest());
ut_ad(!recv_no_log_write);
- ut_ad(is_logged());
-#ifndef SUX_LOCK_GENERIC
-# ifndef _WIN32 // there is no accurate is_write_locked() on SRWLOCK
- ut_ad(m_latch_ex == log_sys.latch.is_write_locked());
-# endif
-#endif
+ ut_ad(mtr->is_logged());
+ ut_ad(mtr->m_latch_ex ? log_sys.latch_have_wr() : log_sys.latch_have_rd());
- const size_t size{m_commit_lsn ? 5U + 8U : 5U};
- std::pair<lsn_t, byte*> start;
+ const size_t size{mtr->m_commit_lsn ? 5U + 8U : 5U};
+ std::pair<lsn_t, byte*> start=
+ log_sys.append_prepare<spin,pmem>(len, mtr->m_latch_ex);
- if (!log_sys.is_pmem())
+ if (!pmem)
{
- start= log_sys.append_prepare<false>(len, m_latch_ex);
- m_log.for_each_block([&start](const mtr_buf_t::block_t *b)
+ mtr->m_log.for_each_block([&start](const mtr_buf_t::block_t *b)
{ log_sys.append(start.second, b->begin(), b->used()); return true; });
#ifdef HAVE_PMEM
write_trailer:
#endif
*start.second++= log_sys.get_sequence_bit(start.first + len - size);
- if (m_commit_lsn)
+ if (mtr->m_commit_lsn)
{
- mach_write_to_8(start.second, m_commit_lsn);
- m_crc= my_crc32c(m_crc, start.second, 8);
+ mach_write_to_8(start.second, mtr->m_commit_lsn);
+ mtr->m_crc= my_crc32c(mtr->m_crc, start.second, 8);
start.second+= 8;
}
- mach_write_to_4(start.second, m_crc);
+ mach_write_to_4(start.second, mtr->m_crc);
start.second+= 4;
}
#ifdef HAVE_PMEM
else
{
- start= log_sys.append_prepare<true>(len, m_latch_ex);
if (UNIV_LIKELY(start.second + len <= &log_sys.buf[log_sys.file_size]))
{
- m_log.for_each_block([&start](const mtr_buf_t::block_t *b)
+ mtr->m_log.for_each_block([&start](const mtr_buf_t::block_t *b)
{ log_sys.append(start.second, b->begin(), b->used()); return true; });
goto write_trailer;
}
- m_log.for_each_block([&start](const mtr_buf_t::block_t *b)
+ mtr->m_log.for_each_block([&start](const mtr_buf_t::block_t *b)
{
size_t size{b->used()};
const size_t size_left(&log_sys.buf[log_sys.file_size] - start.second);
@@ -1242,14 +1367,14 @@ mtr_t::finish_write(size_t len)
byte tail[5 + 8];
tail[0]= log_sys.get_sequence_bit(start.first + len - size);
- if (m_commit_lsn)
+ if (mtr->m_commit_lsn)
{
- mach_write_to_8(tail + 1, m_commit_lsn);
- m_crc= my_crc32c(m_crc, tail + 1, 8);
- mach_write_to_4(tail + 9, m_crc);
+ mach_write_to_8(tail + 1, mtr->m_commit_lsn);
+ mtr->m_crc= my_crc32c(mtr->m_crc, tail + 1, 8);
+ mach_write_to_4(tail + 9, mtr->m_crc);
}
else
- mach_write_to_4(tail + 1, m_crc);
+ mach_write_to_4(tail + 1, mtr->m_crc);
::memcpy(start.second, tail, size_left);
::memcpy(log_sys.buf + log_sys.START_OFFSET, tail + size_left,
@@ -1258,12 +1383,14 @@ mtr_t::finish_write(size_t len)
((size >= size_left) ? log_sys.START_OFFSET : log_sys.file_size) +
(size - size_left);
}
+#else
+ static_assert(!pmem, "");
#endif
log_sys.resize_write(start.first, start.second, len, size);
- m_commit_lsn= start.first + len;
- return {start.first, log_close(m_commit_lsn)};
+ mtr->m_commit_lsn= start.first + len;
+ return {start.first, log_close(mtr->m_commit_lsn)};
}
bool mtr_t::have_x_latch(const buf_block_t &block) const
@@ -1385,7 +1512,7 @@ void mtr_t::upgrade_buffer_fix(ulint savepoint, rw_lock_type_t rw_latch)
ut_ad(slot.type == MTR_MEMO_BUF_FIX);
buf_block_t *block= static_cast<buf_block_t*>(slot.object);
ut_d(const auto state= block->page.state());
- ut_ad(state > buf_page_t::UNFIXED);
+ ut_ad(state > buf_page_t::FREED);
ut_ad(state > buf_page_t::WRITE_FIX || state < buf_page_t::READ_FIX);
static_assert(int{MTR_MEMO_PAGE_S_FIX} == int{RW_S_LATCH}, "");
static_assert(int{MTR_MEMO_PAGE_X_FIX} == int{RW_X_LATCH}, "");
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 31bec346..3293db12 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -200,17 +200,10 @@ os_file_handle_error_cond_exit(
bool on_error_silent);
/** Does error handling when a file operation fails.
-@param[in] name name of a file or NULL
-@param[in] operation operation name that failed
-@return true if we should retry the operation */
-static
-bool
-os_file_handle_error(
- const char* name,
- const char* operation)
+@param operation name of operation that failed */
+static void os_file_handle_error(const char *operation)
{
- /* Exit in case of unknown error */
- return(os_file_handle_error_cond_exit(name, operation, true, false));
+ os_file_handle_error_cond_exit(nullptr, operation, true, false);
}
/** Does error handling when a file operation fails.
@@ -327,6 +320,12 @@ private:
ssize_t m_n;
/** Offset from where to read/write */
os_offset_t m_offset;
+
+ /** Do the read/write
+ @param request The IO context and type
+ @param n Number of bytes to read/write
+ @return the number of bytes read/written or negative value on error */
+ ssize_t execute_low(const IORequest& request, ssize_t n);
};
#ifndef _WIN32 /* On Microsoft Windows, mandatory locking is used */
@@ -680,28 +679,46 @@ os_file_create_subdirs_if_needed(
/** Do the read/write
@param[in] request The IO context and type
+@param[in] n Number of bytes to read/write
+@return the number of bytes read/written or negative value on error */
+ssize_t
+SyncFileIO::execute_low(const IORequest& request, ssize_t n)
+{
+ ut_ad(n > 0);
+ ut_ad(size_t(n) <= os_file_request_size_max);
+
+ if (request.is_read())
+ return IF_WIN(tpool::pread(m_fh, m_buf, n, m_offset), pread(m_fh, m_buf, n, m_offset));
+ return IF_WIN(tpool::pwrite(m_fh, m_buf, n, m_offset), pwrite(m_fh, m_buf, n, m_offset));
+}
+
+/** Do the read/write
+@param[in] request The IO context and type
@return the number of bytes read/written or negative value on error */
ssize_t
SyncFileIO::execute(const IORequest& request)
{
- ssize_t n_bytes;
+ ssize_t n_bytes= 0;
+ ut_ad(m_n > 0);
- if (request.is_read()) {
-#ifdef _WIN32
- n_bytes = tpool::pread(m_fh, m_buf, m_n, m_offset);
-#else
- n_bytes = pread(m_fh, m_buf, m_n, m_offset);
-#endif
- } else {
- ut_ad(request.is_write());
-#ifdef _WIN32
- n_bytes = tpool::pwrite(m_fh, m_buf, m_n, m_offset);
-#else
- n_bytes = pwrite(m_fh, m_buf, m_n, m_offset);
-#endif
- }
+ while (size_t(m_n) > os_file_request_size_max)
+ {
+ ssize_t n_partial_bytes= execute_low(request, os_file_request_size_max);
+ if (n_partial_bytes < 0)
+ return n_partial_bytes;
+ n_bytes+= n_partial_bytes;
+ if (n_partial_bytes != os_file_request_size_max)
+ return n_bytes;
+ advance(os_file_request_size_max);
+ }
- return(n_bytes);
+ if (ssize_t n= execute_low(request, m_n))
+ {
+ if (n < 0)
+ return n;
+ n_bytes += n;
+ }
+ return n_bytes;
}
#ifndef _WIN32
@@ -942,7 +959,7 @@ os_file_flush_func(
ib::error() << "The OS said file flush did not succeed";
- os_file_handle_error(NULL, "flush");
+ os_file_handle_error("flush");
/* It is a fatal error if a file flush does not succeed, because then
the database can get corrupt on disk */
@@ -965,7 +982,7 @@ A simple function to open or create a file.
pfs_os_file_t
os_file_create_simple_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success)
@@ -974,76 +991,52 @@ os_file_create_simple_func(
*success = false;
- int create_flag;
- const char* mode_str __attribute__((unused));
-
- ut_a(!(create_mode & OS_FILE_ON_ERROR_SILENT));
- ut_a(!(create_mode & OS_FILE_ON_ERROR_NO_EXIT));
-
- if (create_mode == OS_FILE_OPEN) {
- mode_str = "OPEN";
-
- if (access_type == OS_FILE_READ_ONLY) {
-
- create_flag = O_RDONLY;
-
- } else if (read_only) {
-
- create_flag = O_RDONLY;
-
- } else {
- create_flag = O_RDWR;
- }
-
- } else if (read_only) {
-
- mode_str = "OPEN";
- create_flag = O_RDONLY;
+ int create_flag = O_RDONLY | O_CLOEXEC;
+ if (read_only) {
} else if (create_mode == OS_FILE_CREATE) {
-
- mode_str = "CREATE";
- create_flag = O_RDWR | O_CREAT | O_EXCL;
-
- } else if (create_mode == OS_FILE_CREATE_PATH) {
-
- mode_str = "CREATE PATH";
- /* Create subdirs along the path if needed. */
-
- *success = os_file_create_subdirs_if_needed(name);
-
- if (!*success) {
-
- ib::error()
- << "Unable to create subdirectories '"
- << name << "'";
-
- return(OS_FILE_CLOSED);
- }
-
- create_flag = O_RDWR | O_CREAT | O_EXCL;
- create_mode = OS_FILE_CREATE;
+ create_flag = O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC;
} else {
-
- ib::error()
- << "Unknown file create mode ("
- << create_mode
- << " for file '" << name << "'";
-
- return(OS_FILE_CLOSED);
+ ut_ad(create_mode == OS_FILE_OPEN);
+ if (access_type != OS_FILE_READ_ONLY) {
+ create_flag = O_RDWR | O_CLOEXEC;
+ }
}
bool retry;
+#ifdef O_DIRECT
+ int direct_flag = 0;
+ /* This function is always called for data files, we should disable
+ OS caching (O_DIRECT) here as we do in os_file_create_func(), so
+ we open the same file in the same mode, see man page of open(2). */
+ switch (srv_file_flush_method) {
+ case SRV_O_DSYNC:
+ case SRV_O_DIRECT:
+ case SRV_O_DIRECT_NO_FSYNC:
+ direct_flag = O_DIRECT;
+ break;
+ }
+#else
+ constexpr int direct_flag = 0;
+#endif
+
do {
- file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
+ file = open(name, create_flag | direct_flag, os_innodb_umask);
if (file == -1) {
+#ifdef O_DIRECT
+ if (direct_flag && errno == EINVAL) {
+ direct_flag = 0;
+ retry = true;
+ continue;
+ }
+#endif
*success = false;
- retry = os_file_handle_error(
+ retry = os_file_handle_error_no_exit(
name,
- create_mode == OS_FILE_OPEN
- ? "open" : "create");
+ create_mode == OS_FILE_CREATE
+ ? "create" : "open", false);
} else {
*success = true;
retry = false;
@@ -1051,24 +1044,6 @@ os_file_create_simple_func(
} while (retry);
-#ifdef HAVE_FCNTL_DIRECT
- /* This function is always called for data files, we should disable
- OS caching (O_DIRECT) here as we do in os_file_create_func(), so
- we open the same file in the same mode, see man page of open(2). */
- if (!srv_read_only_mode && *success) {
- switch (srv_file_flush_method) {
- case SRV_O_DSYNC:
- case SRV_O_DIRECT:
- case SRV_O_DIRECT_NO_FSYNC:
- os_file_set_nocache(file, name, mode_str);
- break;
- default:
- break;
- }
- }
-#endif
-
-#ifndef _WIN32
if (!read_only
&& *success
&& access_type == OS_FILE_READ_WRITE
@@ -1079,7 +1054,6 @@ os_file_create_simple_func(
close(file);
file = -1;
}
-#endif /* !_WIN32 */
return(file);
}
@@ -1113,6 +1087,61 @@ os_file_create_directory(
return(true);
}
+#ifdef O_DIRECT
+# if defined __linux
+/** Note that the log file uses buffered I/O. */
+static ATTRIBUTE_COLD void os_file_log_buffered()
+{
+ log_sys.log_maybe_unbuffered= false;
+ log_sys.log_buffered= true;
+ log_sys.set_block_size(512);
+}
+# endif
+
+/** @return whether the log file may work with unbuffered I/O. */
+static ATTRIBUTE_COLD bool os_file_log_maybe_unbuffered(const struct stat &st)
+{
+ MSAN_STAT_WORKAROUND(&st);
+# ifdef __linux__
+ char b[20 + sizeof "/sys/dev/block/" ":" "/../queue/physical_block_size"];
+ if (snprintf(b, sizeof b, "/sys/dev/block/%u:%u/queue/physical_block_size",
+ major(st.st_dev), minor(st.st_dev)) >=
+ static_cast<int>(sizeof b))
+ return false;
+ int f= open(b, O_RDONLY);
+ if (f == -1)
+ {
+ if (snprintf(b, sizeof b, "/sys/dev/block/%u:%u/../queue/"
+ "physical_block_size",
+ major(st.st_dev), minor(st.st_dev)) >=
+ static_cast<int>(sizeof b))
+ return false;
+ f= open(b, O_RDONLY);
+ }
+ unsigned long s= 0;
+ if (f != -1)
+ {
+ ssize_t l= read(f, b, sizeof b);
+ if (l > 0 && size_t(l) < sizeof b && b[l - 1] == '\n')
+ {
+ char *end= b;
+ s= strtoul(b, &end, 10);
+ if (b == end || *end != '\n')
+ s = 0;
+ }
+ close(f);
+ }
+ if (s > 4096 || s < 64 || !ut_is_2pow(s))
+ return false;
+ log_sys.set_block_size(uint32_t(s));
+# else
+ constexpr unsigned long s= 4096;
+# endif
+
+ return !(st.st_size & (s - 1));
+}
+#endif
+
/** NOTE! Use the corresponding macro os_file_create(), not directly
this function!
Opens an existing file or creates a new.
@@ -1133,73 +1162,83 @@ Opens an existing file or creates a new.
pfs_os_file_t
os_file_create_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint purpose,
ulint type,
bool read_only,
bool* success)
{
- bool on_error_no_exit;
- bool on_error_silent;
-
*success = false;
DBUG_EXECUTE_IF(
"ib_create_table_fail_disk_full",
- *success = false;
errno = ENOSPC;
return(OS_FILE_CLOSED);
);
- int create_flag;
- const char* mode_str __attribute__((unused));
-
- on_error_no_exit = create_mode & OS_FILE_ON_ERROR_NO_EXIT
- ? true : false;
- on_error_silent = create_mode & OS_FILE_ON_ERROR_SILENT
- ? true : false;
+ int create_flag;
- create_mode &= ulint(~(OS_FILE_ON_ERROR_NO_EXIT
- | OS_FILE_ON_ERROR_SILENT));
-
- if (create_mode == OS_FILE_OPEN
- || create_mode == OS_FILE_OPEN_RAW
- || create_mode == OS_FILE_OPEN_RETRY) {
-
- mode_str = "OPEN";
-
- create_flag = read_only ? O_RDONLY : O_RDWR;
-
- } else if (read_only) {
-
- mode_str = "OPEN";
-
- create_flag = O_RDONLY;
-
- } else if (create_mode == OS_FILE_CREATE) {
-
- mode_str = "CREATE";
- create_flag = O_RDWR | O_CREAT | O_EXCL;
+ if (read_only) {
+ create_flag = O_RDONLY | O_CLOEXEC;
+ } else if (create_mode == OS_FILE_CREATE
+ || create_mode == OS_FILE_CREATE_SILENT) {
+ create_flag = O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC;
+ } else {
+ ut_ad(create_mode == OS_FILE_OPEN
+ || create_mode == OS_FILE_OPEN_SILENT
+ || create_mode == OS_FILE_OPEN_RETRY
+ || create_mode == OS_FILE_OPEN_RETRY_SILENT
+ || create_mode == OS_FILE_OPEN_RAW);
+ create_flag = O_RDWR | O_CLOEXEC;
+ }
- } else if (create_mode == OS_FILE_OVERWRITE) {
+#ifdef O_DIRECT
+ struct stat st;
+ ut_a(type == OS_LOG_FILE
+ || type == OS_DATA_FILE || type == OS_DATA_FILE_NO_O_DIRECT);
+ int direct_flag = 0;
- mode_str = "OVERWRITE";
- create_flag = O_RDWR | O_CREAT | O_TRUNC;
+ if (type == OS_DATA_FILE) {
+ switch (srv_file_flush_method) {
+ case SRV_O_DSYNC:
+ case SRV_O_DIRECT:
+ case SRV_O_DIRECT_NO_FSYNC:
+ direct_flag = O_DIRECT;
+ break;
+ default:
+ break;
+ }
+# ifdef __linux__
+ } else if (type != OS_LOG_FILE) {
+ } else if (log_sys.log_buffered) {
+ skip_o_direct:
+ os_file_log_buffered();
+ } else if (create_mode != OS_FILE_CREATE
+ && create_mode != OS_FILE_CREATE_SILENT
+ && !log_sys.is_opened()) {
+ if (stat(name, &st)) {
+ if (errno == ENOENT) {
+ if (create_mode & OS_FILE_ON_ERROR_SILENT) {
+ goto not_found;
+ }
+ sql_print_error(
+ "InnoDB: File %s was not found", name);
+ goto not_found;
+ }
+ goto skip_o_direct;
+ }
- } else {
- ib::error()
- << "Unknown file create mode (" << create_mode << ")"
- << " for file '" << name << "'";
+ if (!os_file_log_maybe_unbuffered(st)) {
+ goto skip_o_direct;
+ }
- return(OS_FILE_CLOSED);
+ direct_flag = O_DIRECT;
+ log_sys.log_maybe_unbuffered= true;
+# endif
}
-
-#ifdef HAVE_FCNTL_DIRECT
- ut_a(type == OS_LOG_FILE
- || type == OS_DATA_FILE
- || type == OS_DATA_FILE_NO_O_DIRECT);
#else
ut_a(type == OS_LOG_FILE || type == OS_DATA_FILE);
+ constexpr int direct_flag = 0;
#endif
ut_a(purpose == OS_FILE_AIO || purpose == OS_FILE_NORMAL);
@@ -1216,115 +1255,66 @@ os_file_create_func(
}
os_file_t file;
- bool retry;
- do {
- file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
+ for (;;) {
+ file = open(name, create_flag | direct_flag, os_innodb_umask);
if (file == -1) {
- const char* operation;
-
- operation = (create_mode == OS_FILE_CREATE
- && !read_only) ? "create" : "open";
-
- *success = false;
-
- if (on_error_no_exit) {
- retry = os_file_handle_error_no_exit(
- name, operation, on_error_silent);
- } else {
- retry = os_file_handle_error(name, operation);
+#ifdef O_DIRECT
+ if (direct_flag && errno == EINVAL) {
+ direct_flag = 0;
+# ifdef __linux__
+ if (type == OS_LOG_FILE) {
+ os_file_log_buffered();
+ }
+# endif
+ if (create_mode == OS_FILE_CREATE
+ || create_mode == OS_FILE_CREATE_SILENT) {
+ /* Linux may create the file
+ before rejecting the O_DIRECT. */
+ unlink(name);
+ }
+ continue;
+ }
+#endif
+ if (!os_file_handle_error_no_exit(
+ name, (create_flag & O_CREAT)
+ ? "create" : "open",
+ create_mode & OS_FILE_ON_ERROR_SILENT)) {
+ break;
}
} else {
*success = true;
- retry = false;
+ break;
}
-
- } while (retry);
+ }
if (!*success) {
- return file;
+#ifdef __linux__
+not_found:
+#endif
+ return OS_FILE_CLOSED;
}
-#ifdef HAVE_FCNTL_DIRECT
- if (type == OS_DATA_FILE) {
- switch (srv_file_flush_method) {
- case SRV_O_DSYNC:
- case SRV_O_DIRECT:
- case SRV_O_DIRECT_NO_FSYNC:
-# ifdef __linux__
-use_o_direct:
-# endif
- os_file_set_nocache(file, name, mode_str);
- break;
- default:
- break;
- }
- }
-# ifdef __linux__
- else if (type == OS_LOG_FILE && !log_sys.is_opened()) {
- struct stat st;
- char b[20 + sizeof "/sys/dev/block/" ":"
- "/../queue/physical_block_size"];
- int f;
- if (fstat(file, &st)) {
- goto skip_o_direct;
- }
- MSAN_STAT_WORKAROUND(&st);
- if (snprintf(b, sizeof b,
- "/sys/dev/block/%u:%u/queue/physical_block_size",
- major(st.st_dev), minor(st.st_dev))
- >= static_cast<int>(sizeof b)) {
- goto skip_o_direct;
- }
- if ((f = open(b, O_RDONLY)) == -1) {
- if (snprintf(b, sizeof b,
- "/sys/dev/block/%u:%u/../queue/"
- "physical_block_size",
- major(st.st_dev), minor(st.st_dev))
- >= static_cast<int>(sizeof b)) {
- goto skip_o_direct;
- }
- f = open(b, O_RDONLY);
- }
- if (f != -1) {
- ssize_t l = read(f, b, sizeof b);
- unsigned long s = 0;
-
- if (l > 0 && static_cast<size_t>(l) < sizeof b
- && b[l - 1] == '\n') {
- char* end = b;
- s = strtoul(b, &end, 10);
- if (b == end || *end != '\n') {
- s = 0;
- }
- }
- close(f);
- if (s > 4096 || s < 64 || !ut_is_2pow(s)) {
- goto skip_o_direct;
- }
- log_sys.log_maybe_unbuffered= true;
- log_sys.set_block_size(uint32_t(s));
- if (!log_sys.log_buffered && !(st.st_size & (s - 1))) {
- goto use_o_direct;
- }
+#ifdef __linux__
+ if ((create_flag & O_CREAT) && type == OS_LOG_FILE) {
+ if (fstat(file, &st) || !os_file_log_maybe_unbuffered(st)) {
+ os_file_log_buffered();
} else {
-skip_o_direct:
- log_sys.log_maybe_unbuffered= false;
- log_sys.log_buffered= true;
- log_sys.set_block_size(512);
+ close(file);
+ return os_file_create_func(name, OS_FILE_OPEN, purpose,
+ type, false, success);
}
}
-# endif
#endif
-#ifndef _WIN32
if (!read_only
&& create_mode != OS_FILE_OPEN_RAW
&& !my_disable_locking
&& os_file_lock(file, name)) {
- if (create_mode == OS_FILE_OPEN_RETRY) {
+ if (create_mode == OS_FILE_OPEN_RETRY
+ || create_mode == OS_FILE_OPEN_RETRY_SILENT) {
ib::info()
<< "Retrying to lock the first data file";
@@ -1346,7 +1336,6 @@ skip_o_direct:
close(file);
file = -1;
}
-#endif /* !_WIN32 */
return(file);
}
@@ -1356,7 +1345,7 @@ os_file_create_simple_no_error_handling(), not directly this function!
A simple function to open or create a file.
@param[in] name name of the file or path as a null-terminated
string
-@param[in] create_mode create mode
+@param[in] create_mode OS_FILE_CREATE or OS_FILE_OPEN
@param[in] access_type OS_FILE_READ_ONLY, OS_FILE_READ_WRITE, or
OS_FILE_READ_ALLOW_DELETE; the last option
is used by a backup program reading the file
@@ -1367,59 +1356,33 @@ A simple function to open or create a file.
pfs_os_file_t
os_file_create_simple_no_error_handling_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success)
{
os_file_t file;
- int create_flag;
-
- ut_a(!(create_mode & OS_FILE_ON_ERROR_SILENT));
- ut_a(!(create_mode & OS_FILE_ON_ERROR_NO_EXIT));
+ int create_flag = O_RDONLY | O_CLOEXEC;
*success = false;
- if (create_mode == OS_FILE_OPEN) {
-
- if (access_type == OS_FILE_READ_ONLY) {
-
- create_flag = O_RDONLY;
-
- } else if (read_only) {
-
- create_flag = O_RDONLY;
-
- } else {
-
+ if (read_only) {
+ } else if (create_mode == OS_FILE_CREATE) {
+ create_flag = O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC;
+ } else {
+ ut_ad(create_mode == OS_FILE_OPEN);
+ if (access_type != OS_FILE_READ_ONLY) {
ut_a(access_type == OS_FILE_READ_WRITE
|| access_type == OS_FILE_READ_ALLOW_DELETE);
create_flag = O_RDWR;
}
-
- } else if (read_only) {
-
- create_flag = O_RDONLY;
-
- } else if (create_mode == OS_FILE_CREATE) {
-
- create_flag = O_RDWR | O_CREAT | O_EXCL;
-
- } else {
-
- ib::error()
- << "Unknown file create mode "
- << create_mode << " for file '" << name << "'";
-
- return(OS_FILE_CLOSED);
}
- file = open(name, create_flag | O_CLOEXEC, os_innodb_umask);
+ file = open(name, create_flag, os_innodb_umask);
*success = (file != -1);
-#ifndef _WIN32
if (!read_only
&& *success
&& access_type == OS_FILE_READ_WRITE
@@ -1431,7 +1394,6 @@ os_file_create_simple_no_error_handling_func(
file = -1;
}
-#endif /* !_WIN32 */
return(file);
}
@@ -1537,7 +1499,7 @@ bool os_file_close_func(os_file_t file)
if (!ret)
return true;
- os_file_handle_error(NULL, "close");
+ os_file_handle_error("close");
return false;
}
@@ -1810,7 +1772,7 @@ bool os_file_flush_func(os_file_t file)
if (srv_start_raw_disk_in_use && GetLastError() == ERROR_INVALID_FUNCTION)
return true;
- os_file_handle_error(nullptr, "flush");
+ os_file_handle_error("flush");
/* It is a fatal error if a file flush does not succeed, because then
the database can get corrupt on disk */
@@ -1924,7 +1886,7 @@ A simple function to open or create a file.
pfs_os_file_t
os_file_create_simple_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success)
@@ -1933,82 +1895,31 @@ os_file_create_simple_func(
*success = false;
- DWORD access;
+ DWORD access = GENERIC_READ;
DWORD create_flag;
DWORD attributes = 0;
- ut_a(!(create_mode & OS_FILE_ON_ERROR_SILENT));
- ut_a(!(create_mode & OS_FILE_ON_ERROR_NO_EXIT));
ut_ad(srv_operation == SRV_OPERATION_NORMAL);
- if (create_mode == OS_FILE_OPEN) {
-
- create_flag = OPEN_EXISTING;
-
- } else if (read_only) {
-
+ if (read_only || create_mode == OS_FILE_OPEN) {
create_flag = OPEN_EXISTING;
-
- } else if (create_mode == OS_FILE_CREATE) {
-
- create_flag = CREATE_NEW;
-
- } else if (create_mode == OS_FILE_CREATE_PATH) {
-
- /* Create subdirs along the path if needed. */
- *success = os_file_create_subdirs_if_needed(name);
-
- if (!*success) {
-
- ib::error()
- << "Unable to create subdirectories '"
- << name << "'";
-
- return(OS_FILE_CLOSED);
- }
-
- create_flag = CREATE_NEW;
- create_mode = OS_FILE_CREATE;
-
} else {
-
- ib::error()
- << "Unknown file create mode ("
- << create_mode << ") for file '"
- << name << "'";
-
- return(OS_FILE_CLOSED);
+ ut_ad(create_mode == OS_FILE_CREATE);
+ create_flag = CREATE_NEW;
}
if (access_type == OS_FILE_READ_ONLY) {
-
- access = GENERIC_READ;
-
} else if (read_only) {
-
ib::info()
<< "Read only mode set. Unable to"
" open file '" << name << "' in RW mode, "
<< "trying RO mode";
-
- access = GENERIC_READ;
-
- } else if (access_type == OS_FILE_READ_WRITE) {
-
- access = GENERIC_READ | GENERIC_WRITE;
-
} else {
-
- ib::error()
- << "Unknown file access type (" << access_type << ") "
- "for file '" << name << "'";
-
- return(OS_FILE_CLOSED);
+ ut_ad(access_type == OS_FILE_READ_WRITE);
+ access = GENERIC_READ | GENERIC_WRITE;
}
- bool retry;
-
- do {
+ for (;;) {
/* Use default security attributes and no template file. */
file = CreateFile(
@@ -2016,22 +1927,18 @@ os_file_create_simple_func(
FILE_SHARE_READ | FILE_SHARE_DELETE,
my_win_file_secattr(), create_flag, attributes, NULL);
- if (file == INVALID_HANDLE_VALUE) {
-
- *success = false;
-
- retry = os_file_handle_error(
- name, create_mode == OS_FILE_OPEN ?
- "open" : "create");
-
- } else {
-
- retry = false;
-
+ if (file != INVALID_HANDLE_VALUE) {
*success = true;
+ break;
}
- } while (retry);
+ if (!os_file_handle_error_no_exit(name,
+ create_flag == CREATE_NEW
+ ? "create" : "open",
+ false)) {
+ break;
+ }
+ }
return(file);
}
@@ -2100,16 +2007,13 @@ Opens an existing file or creates a new.
pfs_os_file_t
os_file_create_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint purpose,
ulint type,
bool read_only,
bool* success)
{
os_file_t file;
- bool retry;
- bool on_error_no_exit;
- bool on_error_silent;
*success = false;
@@ -2120,54 +2024,30 @@ os_file_create_func(
return(OS_FILE_CLOSED);
);
- DWORD create_flag;
+ DWORD create_flag = OPEN_EXISTING;
DWORD share_mode = read_only
? FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE
: FILE_SHARE_READ | FILE_SHARE_DELETE;
- on_error_no_exit = create_mode & OS_FILE_ON_ERROR_NO_EXIT
- ? true : false;
-
- on_error_silent = create_mode & OS_FILE_ON_ERROR_SILENT
- ? true : false;
-
- create_mode &= ~(OS_FILE_ON_ERROR_NO_EXIT | OS_FILE_ON_ERROR_SILENT);
-
- if (create_mode == OS_FILE_OPEN_RAW) {
-
+ switch (create_mode) {
+ case OS_FILE_OPEN_RAW:
ut_a(!read_only);
-
/* On Windows Physical devices require admin privileges and
have to have the write-share mode set. See the remarks
section for the CreateFile() function documentation in MSDN. */
share_mode |= FILE_SHARE_WRITE;
-
- create_flag = OPEN_EXISTING;
-
- } else if (create_mode == OS_FILE_OPEN
- || create_mode == OS_FILE_OPEN_RETRY) {
-
- create_flag = OPEN_EXISTING;
-
- } else if (read_only) {
-
- create_flag = OPEN_EXISTING;
-
- } else if (create_mode == OS_FILE_CREATE) {
-
+ break;
+ case OS_FILE_CREATE_SILENT:
+ case OS_FILE_CREATE:
create_flag = CREATE_NEW;
-
- } else if (create_mode == OS_FILE_OVERWRITE) {
-
- create_flag = CREATE_ALWAYS;
-
- } else {
- ib::error()
- << "Unknown file create mode (" << create_mode << ") "
- << " for file '" << name << "'";
-
- return(OS_FILE_CLOSED);
+ break;
+ default:
+ ut_ad(create_mode == OS_FILE_OPEN
+ || create_mode == OS_FILE_OPEN_SILENT
+ || create_mode == OS_FILE_OPEN_RETRY_SILENT
+ || create_mode == OS_FILE_OPEN_RETRY);
+ break;
}
DWORD attributes = (purpose == OS_FILE_AIO && srv_use_native_aio)
@@ -2225,18 +2105,11 @@ os_file_create_func(
break;
}
- operation = (create_mode == OS_FILE_CREATE && !read_only) ?
- "create" : "open";
+ operation = create_flag == CREATE_NEW ? "create" : "open";
- if (on_error_no_exit) {
- retry = os_file_handle_error_no_exit(
- name, operation, on_error_silent);
- }
- else {
- retry = os_file_handle_error(name, operation);
- }
-
- if (!retry) {
+ if (!os_file_handle_error_no_exit(name, operation,
+ create_mode
+ & OS_FILE_ON_ERROR_SILENT)) {
break;
}
}
@@ -2263,79 +2136,42 @@ A simple function to open or create a file.
pfs_os_file_t
os_file_create_simple_no_error_handling_func(
const char* name,
- ulint create_mode,
+ os_file_create_t create_mode,
ulint access_type,
bool read_only,
bool* success)
{
os_file_t file;
- *success = false;
-
- DWORD access;
- DWORD create_flag;
+ DWORD access = GENERIC_READ;
+ DWORD create_flag = OPEN_EXISTING;
DWORD attributes = 0;
- DWORD share_mode = read_only
- ? FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE
- : FILE_SHARE_READ | FILE_SHARE_DELETE;
+ DWORD share_mode = FILE_SHARE_READ | FILE_SHARE_DELETE;
ut_a(name);
- ut_a(!(create_mode & OS_FILE_ON_ERROR_SILENT));
- ut_a(!(create_mode & OS_FILE_ON_ERROR_NO_EXIT));
-
- if (create_mode == OS_FILE_OPEN) {
-
- create_flag = OPEN_EXISTING;
-
- } else if (read_only) {
-
- create_flag = OPEN_EXISTING;
-
- } else if (create_mode == OS_FILE_CREATE) {
-
- create_flag = CREATE_NEW;
-
+ if (read_only) {
+ share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE
+ | FILE_SHARE_DELETE;
} else {
+ if (create_mode == OS_FILE_CREATE) {
+ create_flag = CREATE_NEW;
+ } else {
+ ut_ad(create_mode == OS_FILE_OPEN);
+ }
- ib::error()
- << "Unknown file create mode (" << create_mode << ") "
- << " for file '" << name << "'";
-
- return(OS_FILE_CLOSED);
- }
-
- if (access_type == OS_FILE_READ_ONLY) {
-
- access = GENERIC_READ;
-
- } else if (read_only) {
-
- access = GENERIC_READ;
-
- } else if (access_type == OS_FILE_READ_WRITE) {
-
- access = GENERIC_READ | GENERIC_WRITE;
-
- } else if (access_type == OS_FILE_READ_ALLOW_DELETE) {
-
- ut_a(!read_only);
-
- access = GENERIC_READ;
-
- /*!< A backup program has to give mysqld the maximum
- freedom to do what it likes with the file */
-
- share_mode |= FILE_SHARE_DELETE | FILE_SHARE_WRITE
- | FILE_SHARE_READ;
-
- } else {
-
- ib::error()
- << "Unknown file access type (" << access_type << ") "
- << "for file '" << name << "'";
-
- return(OS_FILE_CLOSED);
+ switch (access_type) {
+ case OS_FILE_READ_ONLY: break;
+ case OS_FILE_READ_WRITE:
+ access = GENERIC_READ | GENERIC_WRITE;
+ break;
+ default:
+ ut_ad(access_type == OS_FILE_READ_ALLOW_DELETE);
+ /* A backup program has to give mariadbd the maximum
+ freedom to do what it likes with the file */
+ share_mode |= FILE_SHARE_DELETE | FILE_SHARE_WRITE
+ | FILE_SHARE_READ;
+ }
}
file = CreateFile((LPCTSTR) name,
@@ -2503,7 +2339,7 @@ bool os_file_close_func(os_file_t file)
ut_ad(file);
if (!CloseHandle(file))
{
- os_file_handle_error(NULL, "close");
+ os_file_handle_error("close");
return false;
}
@@ -2941,8 +2777,8 @@ os_file_read_func(
if (ulint(n_bytes) == n || err != DB_SUCCESS)
return err;
- os_file_handle_error_cond_exit(type.node ? type.node->name : nullptr, "read",
- false, false);
+ os_file_handle_error_no_exit(type.node ? type.node->name : nullptr, "read",
+ false);
sql_print_error("InnoDB: Tried to read %zu bytes at offset %llu"
" of file %s, but was only able to read %zd",
n, offset, type.node ? type.node->name : "(unknown)",
@@ -3045,36 +2881,6 @@ os_file_handle_error_cond_exit(
return(false);
}
-#ifdef HAVE_FCNTL_DIRECT
-/** Tries to disable OS caching on an opened file descriptor.
-@param[in] fd file descriptor to alter
-@param[in] file_name file name, used in the diagnostic message
-@param[in] name "open" or "create"; used in the diagnostic
- message */
-void
-os_file_set_nocache(int fd, const char *file_name, const char *operation_name)
-{
- if (fcntl(fd, F_SETFL, O_DIRECT) == -1) {
- int errno_save = errno;
- static bool warning_message_printed = false;
- if (errno_save == EINVAL) {
- if (!warning_message_printed) {
- warning_message_printed = true;
- ib::info()
- << "Setting O_DIRECT on file "
- << file_name << " failed";
- }
- } else {
- ib::warn()
- << "Failed to set O_DIRECT on file "
- << file_name << "; " << operation_name
- << " : " << strerror(errno_save)
- << ", continuing anyway.";
- }
- }
-}
-#endif /* HAVE_FCNTL_DIRECT */
-
/** Check if the file system supports sparse files.
@param fh file handle
@return true if the file system supports sparse files */
@@ -3859,8 +3665,9 @@ func_exit:
if (srv_thread_pool->submit_io(cb)) {
slots->release(cb);
- os_file_handle_error(type.node->name, type.is_read()
- ? "aio read" : "aio write");
+ os_file_handle_error_no_exit(type.node->name, type.is_read()
+ ? "aio read" : "aio write",
+ false);
err = DB_IO_ERROR;
type.node->space->release();
}
diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc
index 89e6d149..e375fbfb 100644
--- a/storage/innobase/page/page0zip.cc
+++ b/storage/innobase/page/page0zip.cc
@@ -3269,7 +3269,6 @@ page_zip_validate_low(
ibool sloppy) /*!< in: FALSE=strict,
TRUE=ignore the MIN_REC_FLAG */
{
- page_zip_des_t temp_page_zip;
ibool valid;
if (memcmp(page_zip->data + FIL_PAGE_PREV, page + FIL_PAGE_PREV,
@@ -3310,7 +3309,7 @@ page_zip_validate_low(
MEM_CHECK_DEFINED(page, srv_page_size);
MEM_CHECK_DEFINED(page_zip->data, page_zip_get_size(page_zip));
- temp_page_zip = *page_zip;
+ page_zip_des_t temp_page_zip(*page_zip);
valid = page_zip_decompress_low(&temp_page_zip, temp_page, TRUE);
if (!valid) {
fputs("page_zip_validate(): failed to decompress\n", stderr);
diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc
index a862edd7..47be5e44 100644
--- a/storage/innobase/rem/rem0rec.cc
+++ b/storage/innobase/rem/rem0rec.cc
@@ -427,7 +427,7 @@ start:
}
if (!field->fixed_len
- || (format == REC_LEAF_TEMP
+ || (format <= REC_LEAF_TEMP_INSTANT
&& !dict_col_get_fixed_size(col, true))) {
/* Variable-length field: read the length */
len = *lens--;
diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc
index 2516e24e..6194e9c3 100644
--- a/storage/innobase/row/row0import.cc
+++ b/storage/innobase/row/row0import.cc
@@ -45,9 +45,11 @@ Created 2012-02-08 by Sunny Bains.
#include "lzo/lzo1x.h"
#include "snappy-c.h"
#include "log.h"
+#include "table.h"
+#include "ha_innodb.h"
#include "scope.h"
-
+#include "dict0crea.h"
#include <vector>
#ifdef HAVE_MY_AES_H
@@ -192,6 +194,60 @@ struct row_import {
dberr_t match_flags(THD *thd) const ;
+ ulint find_fts_idx_offset() const
+ {
+ for (ulint i= 0; i < m_n_indexes; i++)
+ {
+ const char* index_name=
+ reinterpret_cast<const char*>(m_indexes[i].m_name);
+ if (!strcmp(index_name, FTS_DOC_ID_INDEX_NAME))
+ return i;
+ }
+ return ULINT_UNDEFINED;
+ }
+
+ const row_index_t *find_index_by_name(const char *name) const
+ {
+ for (ulint i= 0; i < m_n_indexes; i++)
+ {
+ const char* index_name=
+ reinterpret_cast<const char*>(m_indexes[i].m_name);
+ if (!strcmp(index_name, name))
+ return &m_indexes[i];
+ }
+ return nullptr;
+ }
+
+ /** @return whether cfg file has FTS_DOC_ID
+ & FTS_DOC_ID_INDEX*/
+ bool has_hidden_fts() const
+ {
+ if (m_missing) return false;
+ ulint col_offset= find_col(FTS_DOC_ID_COL_NAME);
+ if (col_offset == ULINT_UNDEFINED) return false;
+
+ const dict_col_t *col= &m_cols[col_offset];
+ if (col->mtype != DATA_INT
+ || (col->prtype & ~(DATA_NOT_NULL
+ | DATA_UNSIGNED | DATA_BINARY_TYPE
+ | DATA_FTS_DOC_ID))
+ || col->len != sizeof(doc_id_t))
+ return false;
+
+ return find_index_by_name(FTS_DOC_ID_INDEX_NAME) != nullptr;
+ }
+
+ /** Need to check whether the table need to add system
+ generated fts column and system generated fts document index
+ @param table table to be imported
+ @return whether the table has to add system generated
+ fts column and fts index */
+ bool need_hidden_fts(dict_table_t *table) const
+ {
+ return has_hidden_fts() && !table->fts_doc_id_index &&
+ m_n_cols == static_cast<ulint>(table->n_cols + 1) &&
+ m_n_indexes == UT_LIST_GET_LEN(table->indexes) + 1;
+ }
dict_table_t* m_table; /*!< Table instance */
@@ -547,7 +603,7 @@ protected:
if (m_xdes != 0) {
const xdes_t* xdesc = xdes(page_no, m_xdes);
- ulint pos = page_no % FSP_EXTENT_SIZE;
+ uint32_t pos = page_no % FSP_EXTENT_SIZE;
return xdes_is_free(xdesc, pos);
}
@@ -1079,7 +1135,6 @@ row_import::find_col(
return(i);
}
}
-
return(ULINT_UNDEFINED);
}
@@ -1800,14 +1855,39 @@ PageConverter::update_records(
bool clust_index = m_index->m_srv_index == m_cluster_index;
/* This will also position the cursor on the first user record. */
+ rec_t* rec = m_rec_iter.open(block, m_index->m_srv_index);
- if (!m_rec_iter.open(block, m_index->m_srv_index)) {
+ if (!rec) {
return DB_CORRUPTION;
}
+ ulint deleted;
+
+ if (!page_has_prev(block->page.frame)
+ && m_index->m_srv_index->is_instant()) {
+ /* Expect to find the hidden metadata record */
+ if (page_rec_is_supremum(rec)) {
+ return DB_CORRUPTION;
+ }
+
+ const ulint info_bits = rec_get_info_bits(rec, comp);
+
+ if (!(info_bits & REC_INFO_MIN_REC_FLAG)) {
+ return DB_CORRUPTION;
+ }
+
+ if (!(info_bits & REC_INFO_DELETED_FLAG)
+ != !m_index->m_srv_index->table->instant) {
+ return DB_CORRUPTION;
+ }
+
+ deleted = 0;
+ goto first;
+ }
+
while (!m_rec_iter.end()) {
- rec_t* rec = m_rec_iter.current();
- ibool deleted = rec_get_deleted_flag(rec, comp);
+ rec = m_rec_iter.current();
+ deleted = rec_get_deleted_flag(rec, comp);
/* For the clustered index we have to adjust the BLOB
reference and the system fields irrespective of the
@@ -1815,6 +1895,7 @@ PageConverter::update_records(
cluster records is required for purge to work later. */
if (deleted || clust_index) {
+first:
m_offsets = rec_get_offsets(
rec, m_index->m_srv_index, m_offsets,
m_index->m_srv_index->n_core_fields,
@@ -2101,14 +2182,30 @@ dberr_t PageConverter::operator()(buf_block_t* block) UNIV_NOTHROW
return DB_SUCCESS;
}
-/*****************************************************************//**
-Clean up after import tablespace. */
-static MY_ATTRIBUTE((nonnull, warn_unused_result))
+static void reload_fts_table(row_prebuilt_t *prebuilt,
+ dict_table_t* table)
+{
+ ut_ad(prebuilt->table != table);
+ /* Reload the table in case of hidden fts column */
+ const table_id_t id= prebuilt->table->id;
+ prebuilt->table->release();
+ dict_sys.remove(prebuilt->table);
+ prebuilt->table=
+ dict_table_open_on_id(id, true, DICT_TABLE_OP_NORMAL);
+ prebuilt->table->space= table->space;
+}
+
+/** Clean up after import tablespace.
+@param prebuilt prebuilt from handler
+@param err error code
+@param fts_table constructed table which has system generated
+ fulltext document id
+@return error code or DB_SUCCESS */
+static
dberr_t
-row_import_cleanup(
-/*===============*/
- row_prebuilt_t* prebuilt, /*!< in/out: prebuilt from handler */
- dberr_t err) /*!< in: error code */
+row_import_cleanup(row_prebuilt_t* prebuilt,
+ dberr_t err,
+ dict_table_t* fts_table = nullptr)
{
if (err != DB_SUCCESS) {
dict_table_t* table = prebuilt->table;
@@ -2128,11 +2225,44 @@ row_import_cleanup(
index = UT_LIST_GET_NEXT(indexes, index)) {
index->page = FIL_NULL;
}
+
+ prebuilt->trx->rollback();
+ }
+ else {
+ DBUG_EXECUTE_IF("ib_import_before_commit_crash", DBUG_SUICIDE(););
+ prebuilt->trx->commit();
}
- DBUG_EXECUTE_IF("ib_import_before_commit_crash", DBUG_SUICIDE(););
+ if (fts_table && fts_table != prebuilt->table) {
- prebuilt->trx->commit();
+ if (err == DB_SUCCESS) {
+ reload_fts_table(prebuilt, fts_table);
+ ib::warn() << "Added system generated FTS_DOC_ID "
+ "and FTS_DOC_ID_INDEX while importing "
+ "the tablespace " << prebuilt->table->name;
+ } else if (fts_table->space) {
+ fil_close_tablespace(fts_table->space_id);
+ fts_table->space = NULL;
+ }
+
+ if (!prebuilt->trx->dict_operation_lock_mode) {
+ dict_sys.lock(SRW_LOCK_CALL);
+ }
+
+ dict_index_t* index = UT_LIST_GET_FIRST(
+ fts_table->indexes);
+ while (index) {
+ dict_index_t* next_index =
+ UT_LIST_GET_NEXT(indexes, index);
+ dict_index_remove_from_cache(fts_table, index);
+ index = next_index;
+ }
+ dict_mem_table_free(fts_table);
+
+ if (!prebuilt->trx->dict_operation_lock_mode) {
+ dict_sys.unlock();
+ }
+ }
if (prebuilt->trx->dict_operation_lock_mode) {
row_mysql_unlock_data_dictionary(prebuilt->trx);
@@ -2145,14 +2275,17 @@ row_import_cleanup(
return(err);
}
-/*****************************************************************//**
-Report error during tablespace import. */
-static MY_ATTRIBUTE((nonnull, warn_unused_result))
+/** Report error during tablespace import.
+@param prebuilt prebuilt from the handler
+@param err error code
+@param fts_table table definition containing hidden FTS_DOC_ID column
+@return error code or DB_SUCCESS */
+static
dberr_t
row_import_error(
-/*=============*/
- row_prebuilt_t* prebuilt, /*!< in/out: prebuilt from handler */
- dberr_t err) /*!< in: error code */
+ row_prebuilt_t* prebuilt,
+ dberr_t err,
+ dict_table_t* fts_table=nullptr)
{
if (!trx_is_interrupted(prebuilt->trx)) {
char table_name[MAX_FULL_NAME_LEN + 1];
@@ -2167,7 +2300,7 @@ row_import_error(
table_name, (ulong) err, ut_strerr(err));
}
- return row_import_cleanup(prebuilt, err);
+ return row_import_cleanup(prebuilt, err, fts_table);
}
/*****************************************************************//**
@@ -3059,7 +3192,139 @@ static size_t get_buf_size()
);
}
-/* find, parse instant metadata, performing variaous checks,
+/** Add fts index to the table
+@param table fts index to be added on the table */
+static void add_fts_index(dict_table_t *table)
+{
+ dict_index_t *fts_index= dict_mem_index_create(
+ table, FTS_DOC_ID_INDEX_NAME, DICT_UNIQUE, 2);
+ fts_index->page= FIL_NULL;
+ fts_index->cached= 1;
+ fts_index->n_uniq= 1;
+ /* Add fields for FTS_DOC_ID_INDEX */
+ dict_index_add_col(
+ fts_index, table,
+ &table->cols[table->n_cols - (DATA_N_SYS_COLS + 1)], 0);
+ dict_index_t *clust_index= UT_LIST_GET_FIRST(table->indexes);
+ for (ulint i= 0; i < clust_index->n_uniq; i++)
+ dict_index_add_col(fts_index, table, clust_index->fields[i].col,
+ clust_index->fields[i].prefix_len);
+#ifdef BTR_CUR_HASH_ADAPT
+ fts_index->search_info= btr_search_info_create(fts_index->heap);
+ fts_index->search_info->ref_count= 0;
+#endif /* BTR_CUR_HASH_ADAPT */
+ UT_LIST_ADD_LAST(fts_index->table->indexes, fts_index);
+}
+
+/** Append the hidden fts column and fts doc index to the
+existing table
+@param table table to be imported
+@param thd thread
+@param cfg metadata required by import
+@return table which has fts doc id and fts doc id index */
+static dict_table_t *build_fts_hidden_table(
+ dict_table_t *table, const row_import &cfg)
+{
+ dict_table_t *new_table= dict_table_t::create(
+ {table->name.m_name, strlen(table->name.m_name)},
+ table->space, table->n_t_cols - (DATA_N_SYS_COLS - 1),
+ table->n_v_cols, table->flags,
+ table->flags2);
+
+ new_table->id= table->id;
+ new_table->space_id= table->space_id;
+ const char* col_name= &table->col_names[0];
+ /* Copy columns from old table to new fts table */
+ for (ulint new_i= 0;
+ new_i < ulint(new_table->n_cols - (DATA_N_SYS_COLS + 1));
+ new_i++)
+ {
+ dict_mem_table_add_col(new_table, new_table->heap, col_name,
+ table->cols[new_i].mtype,
+ table->cols[new_i].prtype,
+ table->cols[new_i].len);
+ col_name+= strlen(col_name) + 1;
+ }
+
+ unsigned fts_col_ind= unsigned(table->n_cols - DATA_N_SYS_COLS);
+ fts_add_doc_id_column(new_table, new_table->heap);
+ new_table->cols[fts_col_ind].ind=
+ fts_col_ind & dict_index_t::MAX_N_FIELDS;
+ new_table->cols[fts_col_ind].ord_part= 1;
+ dict_table_add_system_columns(new_table, new_table->heap);
+
+ col_name= &table->v_col_names[0];
+ for (ulint new_i= 0; new_i < new_table->n_v_cols; new_i++)
+ {
+ dict_col_t old_vcol= table->v_cols[new_i].m_col;
+ dict_mem_table_add_v_col(new_table, new_table->heap, col_name,
+ old_vcol.mtype, old_vcol.prtype,
+ old_vcol.len, old_vcol.ind + 1,
+ table->v_cols[new_i].num_base);
+ for (ulint i= 0; i < table->v_cols[new_i].num_base; i++)
+ {
+ dict_col_t *base_col= dict_table_get_nth_col(
+ new_table, table->v_cols[new_i].base_col[i]->ind);
+ new_table->v_cols[new_i].base_col[i]= base_col;
+ }
+ col_name+= strlen(col_name) + 1;
+ }
+
+ bool is_clustered= true;
+ /* Copy indexes from old table to new table */
+ for (dict_index_t *old_index= UT_LIST_GET_FIRST(table->indexes);
+ old_index; is_clustered= false)
+ {
+ dict_index_t *new_index= dict_mem_index_create(
+ new_table, old_index->name, old_index->type,
+ old_index->n_fields + is_clustered);
+
+ new_index->id= old_index->id;
+ new_index->n_uniq= old_index->n_uniq;
+ new_index->type= old_index->type;
+ new_index->cached= 1;
+ new_index->n_user_defined_cols= old_index->n_user_defined_cols;
+ new_index->n_core_null_bytes= old_index->n_core_null_bytes;
+ /* Copy all fields from old index to new index */
+ for (ulint i= 0; i < old_index->n_fields; i++)
+ {
+ dict_field_t *field= dict_index_get_nth_field(old_index, i);
+ dict_col_t *col= field->col;
+ if (col->is_virtual())
+ {
+ dict_v_col_t *v_col= reinterpret_cast<dict_v_col_t*>(col);
+ col= &new_table->v_cols[v_col->v_pos].m_col;
+ }
+ else
+ {
+ unsigned ind= field->col->ind;
+ if (ind >= fts_col_ind) ind++;
+ col= &new_table->cols[ind];
+ }
+ dict_index_add_col(new_index, new_table, col,
+ field->prefix_len);
+ if (i < old_index->n_uniq) col->ord_part= 1;
+ }
+
+ if (is_clustered)
+ {
+ /* Add fts doc id in clustered index */
+ dict_index_add_col(
+ new_index, new_table, &table->cols[fts_col_ind], 0);
+ new_index->fields[old_index->n_fields].fixed_len= sizeof(doc_id_t);
+ }
+
+ new_index->search_info= old_index->search_info;
+ UT_LIST_ADD_LAST(new_index->table->indexes, new_index);
+ old_index= UT_LIST_GET_NEXT(indexes, old_index);
+ if (UT_LIST_GET_LEN(new_table->indexes)
+ == cfg.find_fts_idx_offset())
+ add_fts_index(new_table);
+ }
+ return new_table;
+}
+
+/* find, parse instant metadata, performing various checks,
and apply it to dict_table_t
@return DB_SUCCESS or some error */
static dberr_t handle_instant_metadata(dict_table_t *table,
@@ -4228,6 +4493,107 @@ fil_tablespace_iterate(
return(err);
}
+static void row_import_autoinc(dict_table_t *table, row_prebuilt_t *prebuilt,
+ uint64_t autoinc)
+{
+ if (!table->persistent_autoinc)
+ {
+ ut_ad(!autoinc);
+ return;
+ }
+
+ if (autoinc)
+ {
+ btr_write_autoinc(dict_table_get_first_index(table), autoinc - 1);
+ autoinc_set:
+ table->autoinc= autoinc;
+ sql_print_information("InnoDB: %`.*s.%`s autoinc value set to " UINT64PF,
+ int(table->name.dblen()), table->name.m_name,
+ table->name.basename(), autoinc);
+ }
+ else if (TABLE *t= prebuilt->m_mysql_table)
+ {
+ if (const Field *ai= t->found_next_number_field)
+ {
+ autoinc= 1 +
+ btr_read_autoinc_with_fallback(table, innodb_col_no(ai),
+ t->s->mysql_version,
+ innobase_get_int_col_max_value(ai));
+ goto autoinc_set;
+ }
+ }
+}
+
+/** Update the virtual column position in SYS_COLUMNS and SYS_VIRTUAL
+@param table_id table identifier
+@param new_pos position value
+@param trx transaction
+@return DB_SUCCESS or error code */
+dberr_t update_vcol_pos(table_id_t table_id, ulint new_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, "old_pos", new_pos - 1);
+ DBUG_EXECUTE_IF("ib_import_vcol_update_fail",
+ return DB_DUPLICATE_KEY;);
+ return que_eval_sql(info,
+ "PROCEDURE UPDATE_VCOL () IS\n"
+ "BEGIN\n"
+ "UPDATE SYS_COLUMNS SET POS = POS + 1 "
+ "WHERE TABLE_ID= :id AND POS = :old_pos;\n"
+ "UPDATE SYS_VIRTUAL SET POS = POS + 1 "
+ "WHERE TABLE_ID= :id AND POS = :old_pos;\n"
+ "END\n;", trx);
+}
+
+/**
+1) Update the position of the columns and
+2) Insert the hidden fts doc id in the sys columns table
+3) Insert the hidden fts doc id in the sys indexes and
+sys_fields table
+@param table table to be imported
+@param fts_pos position of fts doc id column
+@param trx transaction
+@return DB_SUCCESS or error code */
+static
+dberr_t innodb_insert_hidden_fts_col(dict_table_t* table,
+ ulint fts_pos,
+ trx_t* trx)
+{
+ dict_index_t* fts_idx=
+ dict_table_get_index_on_name(table, FTS_DOC_ID_INDEX_NAME);
+ if (!fts_idx) return DB_ERROR;
+ for (ulint new_i= 0; new_i < table->n_v_cols; new_i++)
+ {
+ ulint pos= dict_create_v_col_pos(
+ table->v_cols[new_i].v_pos,
+ table->v_cols[new_i].m_col.ind);
+ if (dberr_t err= update_vcol_pos(table->id, pos, trx))
+ return err;
+ }
+ pars_info_t *info= pars_info_create();
+ pars_info_add_ull_literal(info, "id", table->id);
+ dict_hdr_get_new_id(NULL, &fts_idx->id, NULL);
+ pars_info_add_ull_literal(info, "idx_id", fts_idx->id);
+ pars_info_add_int4_literal(info, "pos", fts_pos);
+ pars_info_add_int4_literal(info, "space", fts_idx->table->space_id);
+ pars_info_add_int4_literal(info, "page_no", fts_idx->page);
+
+ return que_eval_sql(info,
+ "PROCEDURE ADD_FTS_COL () IS\n"
+ "BEGIN\n"
+ "INSERT INTO SYS_COLUMNS VALUES"
+ "(:id,:pos,'FTS_DOC_ID',6, 1795, 8, 0);\n"
+ "UPDATE SYS_TABLES SET N_COLS = N_COLS + 1"
+ " WHERE ID = :id;\n"
+ "INSERT INTO SYS_INDEXES VALUES"
+ "(:id, :idx_id, 'FTS_DOC_ID_INDEX', 1,"
+ " 2, :space, :page_no, 50);\n"
+ "INSERT INTO SYS_FIELDS VALUES"
+ "(:idx_id, 1, 'FTS_DOC_ID');\n"
+ "END;\n", trx);
+}
+
/*****************************************************************//**
Imports a tablespace. The space id in the .ibd file must match the space id
of the table in the data dictionary.
@@ -4253,9 +4619,27 @@ row_import_for_mysql(
ut_ad(trx);
ut_ad(trx->state == TRX_STATE_ACTIVE);
ut_ad(!table->is_readable());
+ ut_ad(prebuilt->table == table);
ibuf_delete_for_discarded_space(table->space_id);
+#ifdef BTR_CUR_HASH_ADAPT
+ /* On DISCARD TABLESPACE, we did not drop any adaptive hash
+ index entries. If we replaced the discarded tablespace with a
+ smaller one here, there could still be some adaptive hash
+ index entries that point to cached garbage pages in the buffer
+ pool, because PageConverter::operator() only evicted those
+ pages that were replaced by the imported pages. We must
+ detach any remaining adaptive hash index entries, because the
+ adaptive hash index must be a subset of the table contents;
+ false positives are not tolerated. */
+ for (dict_index_t* index = UT_LIST_GET_FIRST(table->indexes); index;
+ index = UT_LIST_GET_NEXT(indexes, index)) {
+ index = index->clone_if_needed();
+ }
+#endif /* BTR_CUR_HASH_ADAPT */
+ UT_LIST_GET_FIRST(table->indexes)->clear_instant_alter();
+
/* Assign an undo segment for the transaction, so that the
transaction will be recovered after a crash. */
@@ -4281,7 +4665,6 @@ row_import_for_mysql(
row_import cfg;
THD* thd = trx->mysql_thd;
-
err = row_import_read_cfg(table, thd, cfg);
/* Check if the table column definitions match the contents
@@ -4289,8 +4672,16 @@ row_import_for_mysql(
if (err == DB_SUCCESS) {
- if (dberr_t err = handle_instant_metadata(table, cfg)) {
- return row_import_error(prebuilt, err);
+ if (cfg.need_hidden_fts(table)) {
+ cfg.m_table = table = build_fts_hidden_table(
+ table, cfg);
+ }
+
+ err = handle_instant_metadata(table, cfg);
+ if (err != DB_SUCCESS) {
+import_error:
+ return row_import_error(
+ prebuilt, err, table);
}
/* We have a schema file, try and match it with our
@@ -4326,7 +4717,7 @@ row_import_for_mysql(
"table %s when .cfg file is missing.",
table->name.m_name);
err = DB_ERROR;
- return row_import_error(prebuilt, err);
+ goto import_error;
}
FetchIndexRootPages fetchIndexRootPages(table, trx);
@@ -4355,7 +4746,7 @@ row_import_for_mysql(
}
if (err != DB_SUCCESS) {
- return row_import_error(prebuilt, err);
+ goto import_error;
}
trx->op_info = "importing tablespace";
@@ -4375,21 +4766,6 @@ row_import_for_mysql(
DBUG_EXECUTE_IF("ib_import_reset_space_and_lsn_failure",
err = DB_TOO_MANY_CONCURRENT_TRXS;);
-#ifdef BTR_CUR_HASH_ADAPT
- /* On DISCARD TABLESPACE, we did not drop any adaptive hash
- index entries. If we replaced the discarded tablespace with a
- smaller one here, there could still be some adaptive hash
- index entries that point to cached garbage pages in the buffer
- pool, because PageConverter::operator() only evicted those
- pages that were replaced by the imported pages. We must
- detach any remaining adaptive hash index entries, because the
- adaptive hash index must be a subset of the table contents;
- false positives are not tolerated. */
- for (dict_index_t* index = UT_LIST_GET_FIRST(table->indexes); index;
- index = UT_LIST_GET_NEXT(indexes, index)) {
- index = index->clone_if_needed();
- }
-#endif /* BTR_CUR_HASH_ADAPT */
if (err != DB_SUCCESS) {
char table_name[MAX_FULL_NAME_LEN + 1];
@@ -4406,7 +4782,7 @@ row_import_for_mysql(
table_name, ut_strerr(err));
}
- return row_import_cleanup(prebuilt, err);
+ goto import_error;
}
/* If the table is stored in a remote tablespace, we need to
@@ -4469,7 +4845,8 @@ row_import_for_mysql(
dict_index_t* index = dict_table_get_first_index(table);
if (!dict_index_is_clust(index)) {
- return row_import_error(prebuilt, DB_CORRUPTION);
+ err = DB_CORRUPTION;
+ goto import_error;
}
/* Update the Btree segment headers for index node and
@@ -4481,7 +4858,7 @@ row_import_for_mysql(
err = DB_CORRUPTION;);
if (err != DB_SUCCESS) {
- return row_import_error(prebuilt, err);
+ goto import_error;
} else if (cfg.requires_purge(index->name)) {
/* Purge any delete-marked records that couldn't be
@@ -4500,7 +4877,7 @@ row_import_for_mysql(
DBUG_EXECUTE_IF("ib_import_cluster_failure", err = DB_CORRUPTION;);
if (err != DB_SUCCESS) {
- return row_import_error(prebuilt, err);
+ goto import_error;
}
/* For secondary indexes, purge any records that couldn't be purged
@@ -4513,7 +4890,7 @@ row_import_for_mysql(
err = DB_CORRUPTION;);
if (err != DB_SUCCESS) {
- return row_import_error(prebuilt, err);
+ goto import_error;
}
/* Ensure that the next available DB_ROW_ID is not smaller than
@@ -4528,9 +4905,9 @@ row_import_for_mysql(
/* Ensure that all pages dirtied during the IMPORT make it to disk.
The only dirty pages generated should be from the pessimistic purge
of delete marked records that couldn't be purged in Phase I. */
- while (buf_flush_list_space(prebuilt->table->space));
+ while (buf_flush_list_space(table->space));
- for (ulint count = 0; prebuilt->table->space->referenced(); count++) {
+ for (ulint count = 0; table->space->referenced(); count++) {
/* Issue a warning every 10.24 seconds, starting after
2.56 seconds */
if ((count & 511) == 128) {
@@ -4541,38 +4918,48 @@ row_import_for_mysql(
}
ib::info() << "Phase IV - Flush complete";
- prebuilt->table->space->set_imported();
+ /* Set tablespace purpose as FIL_TYPE_TABLESPACE,
+ so that rollback can go ahead smoothly */
+ table->space->set_imported();
+ err = lock_sys_tables(trx);
+ if (err != DB_SUCCESS) {
+ goto import_error;
+ }
/* The dictionary latches will be released in in row_import_cleanup()
after the transaction commit, for both success and error. */
row_mysql_lock_data_dictionary(trx);
+ if (prebuilt->table != table) {
+ /* Add fts_doc_id and fts_doc_idx in data dictionary */
+ err = innodb_insert_hidden_fts_col(
+ table, cfg.find_col(FTS_DOC_ID_COL_NAME), trx);
+ DBUG_EXECUTE_IF("ib_import_fts_error",
+ err= DB_DUPLICATE_KEY;);
+ if (err != DB_SUCCESS) {
+ goto import_error;
+ }
+ }
/* Update the root pages of the table's indexes. */
err = row_import_update_index_root(trx, table, false);
if (err != DB_SUCCESS) {
- return row_import_error(prebuilt, err);
+ goto import_error;
}
err = row_import_update_discarded_flag(trx, table->id, false);
if (err != DB_SUCCESS) {
- return row_import_error(prebuilt, err);
+ goto import_error;
}
table->file_unreadable = false;
table->flags2 &= ~DICT_TF2_DISCARDED & ((1U << DICT_TF2_BITS) - 1);
/* Set autoinc value read from .cfg file, if one was specified.
- Otherwise, keep the PAGE_ROOT_AUTO_INC as is. */
- if (autoinc) {
- ib::info() << table->name << " autoinc value set to "
- << autoinc;
-
- table->autoinc = autoinc--;
- btr_write_autoinc(dict_table_get_first_index(table), autoinc);
- }
+ Otherwise, read the PAGE_ROOT_AUTO_INC and set it to table autoinc. */
+ row_import_autoinc(table, prebuilt, autoinc);
- return row_import_cleanup(prebuilt, err);
+ return row_import_cleanup(prebuilt, err, table);
}
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 9c3c5d22..1f319aae 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -2000,7 +2000,7 @@ row_ins_dupl_error_with_rec(
/* In a unique secondary index we allow equal key values if they
contain SQL NULLs */
- if (!dict_index_is_clust(index) && !index->nulls_equal) {
+ if (!dict_index_is_clust(index)) {
for (i = 0; i < n_unique; i++) {
if (dfield_is_null(dtuple_get_nth_field(entry, i))) {
@@ -2102,16 +2102,8 @@ row_ins_scan_sec_index_for_duplicate(
/* If the secondary index is unique, but one of the fields in the
n_unique first fields is NULL, a unique key violation cannot occur,
since we define NULL != NULL in this case */
-
- if (!index->nulls_equal) {
- for (ulint i = 0; i < n_unique; i++) {
- if (UNIV_SQL_NULL == dfield_get_len(
- dtuple_get_nth_field(entry, i))) {
-
- DBUG_RETURN(DB_SUCCESS);
- }
- }
- }
+ if (index->n_nullable && dtuple_contains_null(entry, n_unique))
+ DBUG_RETURN(DB_SUCCESS);
/* Store old value on n_fields_cmp */
@@ -2569,12 +2561,6 @@ row_ins_index_entry_big_rec(
return(error);
}
-#ifdef HAVE_REPLICATION /* Working around MDEV-24622 */
-extern "C" int thd_is_slave(const MYSQL_THD thd);
-#else
-# define thd_is_slave(thd) 0
-#endif
-
#if defined __aarch64__&&defined __GNUC__&&__GNUC__==4&&!defined __clang__
/* Avoid GCC 4.8.5 internal compiler error due to srw_mutex::wr_unlock().
We would only need this for row_ins_clust_index_entry_low(),
@@ -2728,7 +2714,8 @@ err_exit:
&& !index->table->is_active_ddl()
&& !index->table->has_spatial_index()
&& !index->table->versioned()
- && !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) {
+ && (!dict_table_is_partition(index->table)
+ || thd_sql_command(trx->mysql_thd) == SQLCOM_INSERT)) {
DEBUG_SYNC_C("empty_root_page_insert");
trx->bulk_insert = true;
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 188d8ba5..6fb530f0 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -526,8 +526,6 @@ static ulint row_merge_bulk_buf_add(row_merge_buf_t* buf,
@param[in,out] row table row
@param[in] ext cache of externally stored
column prefixes, or NULL
-@param[in] history_fts row is historical in a system-versioned table
- on which a FTS_DOC_ID_INDEX(FTS_DOC_ID) exists
@param[in,out] doc_id Doc ID if we are creating
FTS index
@param[in,out] conv_heap memory heap where to allocate data when
@@ -550,7 +548,6 @@ row_merge_buf_add(
fts_psort_t* psort_info,
dtuple_t* row,
const row_ext_t* ext,
- const bool history_fts,
doc_id_t* doc_id,
mem_heap_t* conv_heap,
dberr_t* err,
@@ -615,7 +612,7 @@ error:
: NULL;
/* Process the Doc ID column */
- if (!v_col && (history_fts || *doc_id)
+ if (!v_col && *doc_id
&& col->ind == index->table->fts->doc_col) {
fts_write_doc_id((byte*) &write_doc_id, *doc_id);
@@ -676,7 +673,7 @@ error:
}
/* Tokenize and process data for FTS */
- if (!history_fts && (index->type & DICT_FTS)) {
+ if (index->type & DICT_FTS) {
fts_doc_item_t* doc_item;
byte* value;
void* ptr;
@@ -1895,6 +1892,7 @@ row_merge_read_clustered_index(
DBUG_ENTER("row_merge_read_clustered_index");
ut_ad((old_table == new_table) == !col_map);
+ ut_ad(old_table->fts || !new_table->fts || !new_table->versioned());
ut_ad(!defaults || col_map);
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
ut_ad(trx->id);
@@ -2120,7 +2118,6 @@ corrupted_metadata:
dtuple_t* row;
row_ext_t* ext;
page_cur_t* cur = btr_pcur_get_page_cur(&pcur);
- bool history_row, history_fts = false;
stage->n_pk_recs_inc();
@@ -2382,11 +2379,6 @@ end_of_index:
row_heap);
ut_ad(row);
- history_row = new_table->versioned()
- && dtuple_get_nth_field(row, new_table->vers_end)
- ->vers_history_row();
- history_fts = history_row && new_table->fts;
-
for (ulint i = 0; i < n_nonnull; i++) {
dfield_t* field = &row->fields[nonnull[i]];
@@ -2415,7 +2407,7 @@ end_of_index:
}
/* Get the next Doc ID */
- if (add_doc_id && !history_fts) {
+ if (add_doc_id) {
doc_id++;
} else {
doc_id = 0;
@@ -2455,7 +2447,9 @@ end_of_index:
add_autoinc);
if (new_table->versioned()) {
- if (history_row) {
+ if (dtuple_get_nth_field(row,
+ new_table->vers_end)
+ ->vers_history_row()) {
if (dfield_get_type(dfield)->prtype & DATA_NOT_NULL) {
err = DB_UNSUPPORTED;
my_error(ER_UNSUPPORTED_EXTENSION, MYF(0),
@@ -2571,7 +2565,7 @@ write_buffers:
if (UNIV_LIKELY
(row && (rows_added = row_merge_buf_add(
buf, fts_index, old_table, new_table,
- psort_info, row, ext, history_fts,
+ psort_info, row, ext,
&doc_id, conv_heap, &err,
&v_heap, eval_table, trx,
col_collate)))) {
@@ -2904,7 +2898,7 @@ write_buffers:
(!(rows_added = row_merge_buf_add(
buf, fts_index, old_table,
new_table, psort_info,
- row, ext, history_fts, &doc_id,
+ row, ext, &doc_id,
conv_heap, &err, &v_heap,
eval_table, trx, col_collate)))) {
/* An empty buffer should have enough
@@ -4355,9 +4349,7 @@ void row_merge_drop_temp_indexes()
UNIV_PFS_IO defined, register the file descriptor with Performance Schema.
@param[in] path location for creating temporary merge files, or NULL
@return File descriptor */
-pfs_os_file_t
-row_merge_file_create_low(
- const char* path)
+static pfs_os_file_t row_merge_file_create_mode(const char *path, int mode)
{
if (!path) {
path = mysql_tmpdir;
@@ -4398,6 +4390,13 @@ row_merge_file_create_low(
return(fd);
}
+/** Create a temporary file at the specified path.
+@param path location for creating temporary merge files, or nullptr
+@return File descriptor */
+pfs_os_file_t row_merge_file_create_low(const char *path)
+{
+ return row_merge_file_create_mode(path, O_BINARY | O_SEQUENTIAL);
+}
/** Create a merge file in the given location.
@param[out] merge_file merge file structure
@@ -4408,17 +4407,16 @@ row_merge_file_create(
merge_file_t* merge_file,
const char* path)
{
- merge_file->fd = row_merge_file_create_low(path);
merge_file->offset = 0;
merge_file->n_rec = 0;
-#ifdef HAVE_FCNTL_DIRECT
- if (merge_file->fd != OS_FILE_CLOSED) {
- if (srv_disable_sort_file_cache) {
- os_file_set_nocache(merge_file->fd,
- "row0merge.cc", "sort");
- }
- }
+ merge_file->fd =
+ row_merge_file_create_mode(path,
+#if !defined _WIN32 && defined O_DIRECT
+ srv_disable_sort_file_cache
+ ? O_DIRECT | O_BINARY | O_SEQUENTIAL
+ :
#endif
+ O_BINARY | O_SEQUENTIAL);
return(merge_file->fd);
}
@@ -5353,18 +5351,8 @@ dberr_t trx_mod_table_time_t::write_bulk(dict_table_t *table, trx_t *trx)
return err;
}
-dberr_t trx_t::bulk_insert_apply_low()
+void trx_t::bulk_rollback_low()
{
- ut_ad(bulk_insert);
- ut_ad(!check_unique_secondary);
- ut_ad(!check_foreigns);
- dberr_t err;
- for (auto& t : mod_tables)
- if (t.second.is_bulk_insert())
- if ((err= t.second.write_bulk(t.first, this)) != DB_SUCCESS)
- goto bulk_rollback;
- return DB_SUCCESS;
-bulk_rollback:
undo_no_t low_limit= UINT64_MAX;
for (auto& t : mod_tables)
{
@@ -5374,9 +5362,37 @@ bulk_rollback:
low_limit= t.second.get_first();
delete t.second.bulk_store;
t.second.bulk_store= nullptr;
+ t.second.end_bulk_insert();
}
}
trx_savept_t bulk_save{low_limit};
rollback(&bulk_save);
- return err;
+}
+
+dberr_t trx_t::bulk_insert_apply_for_table(dict_table_t *table)
+{
+ auto it= mod_tables.find(table);
+ if (it != mod_tables.end())
+ {
+ if (dberr_t err= it->second.write_bulk(table, this))
+ {
+ bulk_rollback_low();
+ return err;
+ }
+ it->second.end_bulk_insert();
+ }
+ return DB_SUCCESS;
+}
+
+dberr_t trx_t::bulk_insert_apply_low()
+{
+ ut_ad(bulk_insert);
+ for (auto& t : mod_tables)
+ if (t.second.is_bulk_insert())
+ if (dberr_t err= t.second.write_bulk(t.first, this))
+ {
+ bulk_rollback_low();
+ return err;
+ }
+ return DB_SUCCESS;
}
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index c5ee3be7..6a71cf3a 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -695,6 +695,7 @@ handle_new_error:
DBUG_RETURN(true);
case DB_DEADLOCK:
+ case DB_RECORD_CHANGED:
case DB_LOCK_TABLE_FULL:
rollback:
/* Roll back the whole transaction; this resolution was added
@@ -1585,7 +1586,8 @@ init_fts_doc_id_for_ref(
for (dict_foreign_t* foreign : table->referenced_set) {
ut_ad(foreign->foreign_table);
- if (foreign->foreign_table->fts) {
+ if (foreign->foreign_table->space
+ && foreign->foreign_table->fts) {
fts_init_doc_id(foreign->foreign_table);
}
@@ -2383,7 +2385,6 @@ 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->clear_instant_alter();
/* Reset the root page numbers. */
for (; index; index = UT_LIST_GET_NEXT(indexes, index)) {
diff --git a/storage/innobase/row/row0quiesce.cc b/storage/innobase/row/row0quiesce.cc
index e927096f..057b20c7 100644
--- a/storage/innobase/row/row0quiesce.cc
+++ b/storage/innobase/row/row0quiesce.cc
@@ -431,6 +431,10 @@ row_quiesce_write_header(
/*********************************************************************//**
Write the table meta data after quiesce.
@return DB_SUCCESS or error code */
+
+/* Stack size 20904 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_quiesce_write_cfg(
@@ -488,6 +492,7 @@ row_quiesce_write_cfg(
return(err);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/*********************************************************************//**
Check whether a table has an FTS index defined on it.
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index 33f4d81f..944f7358 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -864,6 +864,11 @@ row_sel_build_committed_vers_for_mysql(
column version if any */
mtr_t* mtr) /*!< in: mtr */
{
+ if (prebuilt->trx->snapshot_isolation) {
+ *old_vers = rec;
+ return;
+ }
+
if (prebuilt->old_vers_heap) {
mem_heap_empty(prebuilt->old_vers_heap);
} else {
@@ -1184,11 +1189,11 @@ sel_set_rtr_rec_lock(
ut_ad(page_align(first_rec) == cur_block->page.frame);
ut_ad(match->valid);
- match->block.page.lock.x_lock();
+ match->block->page.lock.x_lock();
retry:
cur_block = btr_pcur_get_block(pcur);
- ut_ad(match->block.page.lock.have_x()
- || match->block.page.lock.have_s());
+ ut_ad(match->block->page.lock.have_x()
+ || match->block->page.lock.have_s());
ut_ad(page_is_leaf(cur_block->page.frame));
err = lock_sec_rec_read_check_and_lock(
@@ -1288,7 +1293,7 @@ re_scan:
ULINT_UNDEFINED, &heap);
err = lock_sec_rec_read_check_and_lock(
- 0, &match->block, rtr_rec->r_rec, index,
+ 0, match->block, rtr_rec->r_rec, index,
my_offsets, static_cast<lock_mode>(mode),
type, thr);
@@ -1304,7 +1309,7 @@ re_scan:
match->locked = true;
func_end:
- match->block.page.lock.x_unlock();
+ match->block->page.lock.x_unlock();
if (heap != NULL) {
mem_heap_free(heap);
}
@@ -3401,7 +3406,7 @@ Row_sel_get_clust_rec_for_mysql::operator()(
if (dict_index_is_spatial(sec_index)
&& btr_cur->rtr_info->matches
&& (page_align(rec)
- == btr_cur->rtr_info->matches->block.page.frame
+ == btr_cur->rtr_info->matches->block->page.frame
|| rec != btr_pcur_get_rec(prebuilt->pcur))) {
#ifdef UNIV_DEBUG
rtr_info_t* rtr_info = btr_cur->rtr_info;
@@ -4456,13 +4461,11 @@ early_not_found:
DBUG_RETURN(DB_RECORD_NOT_FOUND);
}
+#if SIZEOF_SIZE_T < 8
+ if (UNIV_LIKELY(~prebuilt->n_rows_fetched))
+#endif
prebuilt->n_rows_fetched++;
- if (prebuilt->n_rows_fetched > 1000000000) {
- /* Prevent wrap-over */
- prebuilt->n_rows_fetched = 500000000;
- }
-
mode = pcur->search_mode;
}
diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc
index a01eaea5..52f54443 100644
--- a/storage/innobase/row/row0umod.cc
+++ b/storage/innobase/row/row0umod.cc
@@ -190,7 +190,7 @@ row_undo_mod_clust_low(
@param[in] rec clustered index record
@param[in] index clustered index
@return the byte offset of DB_TRX_ID, from the start of rec */
-static ulint row_trx_id_offset(const rec_t* rec, const dict_index_t* index)
+ulint row_trx_id_offset(const rec_t* rec, const dict_index_t* index)
{
ut_ad(index->n_uniq <= MAX_REF_PARTS);
ulint trx_id_offset = index->trx_id_offset;
diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc
index 75798241..62229842 100644
--- a/storage/innobase/srv/srv0mon.cc
+++ b/storage/innobase/srv/srv0mon.cc
@@ -364,11 +364,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_LRU_GET_FREE_LOOPS},
- {"buffer_LRU_get_free_waits", "buffer",
- "Total sleep waits in LRU get free.",
- MONITOR_NONE,
- MONITOR_DEFAULT_START, MONITOR_LRU_GET_FREE_WAITS},
-
{"buffer_flush_avg_page_rate", "buffer",
"Average number of pages at which flushing is happening",
MONITOR_NONE,
@@ -472,11 +467,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE},
- {"buffer_LRU_single_flush_failure_count", "Buffer",
- "Number of times attempt to flush a single page from LRU failed",
- MONITOR_NONE,
- MONITOR_DEFAULT_START, MONITOR_LRU_SINGLE_FLUSH_FAILURE_COUNT},
-
{"buffer_LRU_get_free_search", "Buffer",
"Number of searches performed for a clean page",
MONITOR_NONE,
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 738e0a7e..fc557673 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -91,10 +91,6 @@ Created 2/16/1996 Heikki Tuuri
#include "zlib.h"
#include "log.h"
-/** We are prepared for a situation that we have this many threads waiting for
-a transactional lock inside InnoDB. srv_start() sets the value. */
-ulint srv_max_n_threads;
-
/** Log sequence number at shutdown */
lsn_t srv_shutdown_lsn;
@@ -201,7 +197,7 @@ static dberr_t create_log_file(bool create_new_db, lsn_t lsn)
bool ret;
os_file_t file{
os_file_create_func(logfile0.c_str(),
- OS_FILE_CREATE | OS_FILE_ON_ERROR_NO_EXIT,
+ OS_FILE_CREATE,
OS_FILE_NORMAL, OS_LOG_FILE, false, &ret)
};
@@ -632,15 +628,15 @@ static uint32_t srv_undo_tablespace_open(bool create, const char* name,
}
}
- pfs_os_file_t fh= os_file_create(innodb_data_file_key, name, OS_FILE_OPEN |
- OS_FILE_ON_ERROR_NO_EXIT |
- OS_FILE_ON_ERROR_SILENT,
+ pfs_os_file_t fh= os_file_create(innodb_data_file_key, name,
+ OS_FILE_OPEN_SILENT,
OS_FILE_AIO, OS_DATA_FILE,
srv_read_only_mode, &success);
if (!success)
return 0;
+ ulint n_retries = 5;
os_offset_t size= os_file_get_size(fh);
ut_a(size != os_offset_t(-1));
@@ -648,15 +644,25 @@ static uint32_t srv_undo_tablespace_open(bool create, const char* name,
{
page_t *page= static_cast<byte*>(aligned_malloc(srv_page_size,
srv_page_size));
+undo_retry:
if (os_file_read(IORequestRead, fh, page, 0, srv_page_size, nullptr) !=
DB_SUCCESS)
{
err_exit:
+ if (n_retries && srv_operation == SRV_OPERATION_BACKUP)
+ {
+ sql_print_information("InnoDB: Retrying to read undo "
+ "tablespace %s", name);
+ n_retries--;
+ goto undo_retry;
+ }
ib::error() << "Unable to read first page of file " << name;
aligned_free(page);
return ~0U;
}
+ DBUG_EXECUTE_IF("undo_space_read_fail", goto err_exit;);
+
uint32_t id= mach_read_from_4(FIL_PAGE_SPACE_ID + page);
if (id == 0 || id >= SRV_SPACE_ID_UPPER_BOUND ||
memcmp_aligned<2>(FIL_PAGE_SPACE_ID + page,
@@ -731,9 +737,7 @@ srv_check_undo_redo_logs_exists()
fh = os_file_create_func(
name,
- OS_FILE_OPEN_RETRY
- | OS_FILE_ON_ERROR_NO_EXIT
- | OS_FILE_ON_ERROR_SILENT,
+ OS_FILE_OPEN_RETRY_SILENT,
OS_FILE_NORMAL,
OS_DATA_FILE,
srv_read_only_mode,
@@ -755,8 +759,7 @@ srv_check_undo_redo_logs_exists()
auto logfilename = get_log_file_path();
fh = os_file_create_func(logfilename.c_str(),
- OS_FILE_OPEN_RETRY | OS_FILE_ON_ERROR_NO_EXIT
- | OS_FILE_ON_ERROR_SILENT,
+ OS_FILE_OPEN_RETRY_SILENT,
OS_FILE_NORMAL, OS_LOG_FILE,
srv_read_only_mode, &ret);
@@ -1179,12 +1182,6 @@ dberr_t srv_start(bool create_new_db)
mysql_stage_register("innodb", srv_stages,
static_cast<int>(UT_ARR_SIZE(srv_stages)));
- srv_max_n_threads =
- 1 /* dict_stats_thread */
- + 1 /* fts_optimize_thread */
- + 128 /* safety margin */
- + max_connections;
-
srv_boot();
ib::info() << my_crc32c_implementation();
@@ -1523,6 +1520,71 @@ dberr_t srv_start(bool create_new_db)
fil_system.space_id_reuse_warned = false;
+ if (srv_operation > SRV_OPERATION_EXPORT_RESTORED) {
+ ut_ad(srv_operation == SRV_OPERATION_RESTORE_EXPORT
+ || srv_operation == SRV_OPERATION_RESTORE);
+ return(err);
+ }
+
+ /* Upgrade or resize or rebuild the redo logs before
+ generating any dirty pages, so that the old redo log
+ file will not be written to. */
+
+ if (srv_force_recovery == SRV_FORCE_NO_LOG_REDO) {
+ /* Completely ignore the redo log. */
+ } else if (srv_read_only_mode) {
+ /* Leave the redo log alone. */
+ } else if (log_sys.file_size == srv_log_file_size
+ && log_sys.format
+ == (srv_encrypt_log
+ ? log_t::FORMAT_ENC_10_8
+ : log_t::FORMAT_10_8)) {
+ /* No need to add or remove encryption,
+ upgrade, or resize. */
+ delete_log_files();
+ } else {
+ /* Prepare to delete the old redo log file */
+ const lsn_t lsn{srv_prepare_to_delete_redo_log_file()};
+
+ DBUG_EXECUTE_IF("innodb_log_abort_1",
+ return(srv_init_abort(DB_ERROR)););
+ /* Prohibit redo log writes from any other
+ threads until creating a log checkpoint at the
+ end of create_log_file(). */
+ ut_d(recv_no_log_write = true);
+ ut_ad(!os_aio_pending_reads());
+ ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
+ ut_ad(!buf_pool.get_oldest_modification(0));
+ ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
+ /* os_aio_pending_writes() may hold here if
+ some write_io_callback() did not release the
+ slot yet. However, the page write itself must
+ have completed, because the buf_pool.flush_list
+ is empty. In debug builds, we wait for this to
+ happen, hoping to get a hung process if this
+ assumption does not hold. */
+ ut_d(os_aio_wait_until_no_pending_writes(false));
+
+ /* Close the redo log file, so that we can replace it */
+ log_sys.close_file();
+
+ DBUG_EXECUTE_IF("innodb_log_abort_5",
+ return(srv_init_abort(DB_ERROR)););
+ DBUG_PRINT("ib_log", ("After innodb_log_abort_5"));
+
+ err = create_log_file(false, lsn);
+
+ if (err == DB_SUCCESS && log_sys.resize_rename()) {
+ err = DB_ERROR;
+ }
+
+ if (err != DB_SUCCESS) {
+ return(srv_init_abort(err));
+ }
+ }
+
+ recv_sys.debug_free();
+
if (!srv_read_only_mode) {
const uint32_t flags = FSP_FLAGS_PAGE_SSIZE();
for (uint32_t id = srv_undo_space_id_start;
@@ -1607,71 +1669,6 @@ dberr_t srv_start(bool create_new_db)
return(srv_init_abort(DB_ERROR));
}
}
-
- if (srv_operation > SRV_OPERATION_EXPORT_RESTORED) {
- ut_ad(srv_operation == SRV_OPERATION_RESTORE_EXPORT
- || srv_operation == SRV_OPERATION_RESTORE);
- return(err);
- }
-
- /* Upgrade or resize or rebuild the redo logs before
- generating any dirty pages, so that the old redo log
- file will not be written to. */
-
- if (srv_force_recovery == SRV_FORCE_NO_LOG_REDO) {
- /* Completely ignore the redo log. */
- } else if (srv_read_only_mode) {
- /* Leave the redo log alone. */
- } else if (log_sys.file_size == srv_log_file_size
- && log_sys.format
- == (srv_encrypt_log
- ? log_t::FORMAT_ENC_10_8
- : log_t::FORMAT_10_8)) {
- /* No need to add or remove encryption,
- upgrade, or resize. */
- delete_log_files();
- } else {
- /* Prepare to delete the old redo log file */
- const lsn_t lsn{srv_prepare_to_delete_redo_log_file()};
-
- DBUG_EXECUTE_IF("innodb_log_abort_1",
- return(srv_init_abort(DB_ERROR)););
- /* Prohibit redo log writes from any other
- threads until creating a log checkpoint at the
- end of create_log_file(). */
- ut_d(recv_no_log_write = true);
- ut_ad(!os_aio_pending_reads());
- ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
- ut_ad(!buf_pool.get_oldest_modification(0));
- ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
- /* os_aio_pending_writes() may hold here if
- some write_io_callback() did not release the
- slot yet. However, the page write itself must
- have completed, because the buf_pool.flush_list
- is empty. In debug builds, we wait for this to
- happen, hoping to get a hung process if this
- assumption does not hold. */
- ut_d(os_aio_wait_until_no_pending_writes(false));
-
- /* Close the redo log file, so that we can replace it */
- log_sys.close_file();
-
- DBUG_EXECUTE_IF("innodb_log_abort_5",
- return(srv_init_abort(DB_ERROR)););
- DBUG_PRINT("ib_log", ("After innodb_log_abort_5"));
-
- err = create_log_file(false, lsn);
-
- if (err == DB_SUCCESS && log_sys.resize_rename()) {
- err = DB_ERROR;
- }
-
- if (err != DB_SUCCESS) {
- return(srv_init_abort(err));
- }
- }
-
- recv_sys.debug_free();
}
ut_ad(err == DB_SUCCESS);
diff --git a/storage/innobase/sync/cache.cc b/storage/innobase/sync/cache.cc
new file mode 100644
index 00000000..43d642d0
--- /dev/null
+++ b/storage/innobase/sync/cache.cc
@@ -0,0 +1,160 @@
+/*****************************************************************************
+
+Copyright (c) 2024, MariaDB plc
+
+This program is free 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 is based on the implementation of pmem_persist() in
+https://github.com/pmem/pmdk/, Copyright 2014-2020, Intel Corporation,
+last revised in libpmem-1.12.0. */
+
+#include "my_global.h"
+#include "cache.h"
+#include <cstdint>
+
+#if defined __x86_64__ || defined __aarch64__ || defined __powerpc64__
+# ifdef __x86_64__
+static void pmem_clflush(const void *buf, size_t size)
+{
+ for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
+ end= uintptr_t(buf) + size;
+ u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
+ __asm__ __volatile__("clflush %0" ::
+ "m"(*reinterpret_cast<const char*>(u)) : "memory");
+}
+
+static void pmem_clflushopt(const void *buf, size_t size)
+{
+ for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
+ end= uintptr_t(buf) + size;
+ u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
+ __asm__ __volatile__(".byte 0x66; clflush %0" /* clflushopt */ ::
+ "m"(*reinterpret_cast<const char*>(u)) : "memory");
+ __asm__ __volatile__("sfence" ::: "memory");
+}
+
+static void pmem_clwb(const void *buf, size_t size)
+{
+ for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
+ end= uintptr_t(buf) + size;
+ u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
+ __asm__ __volatile__(".byte 0x66; xsaveopt %0" /* clwb */ ::
+ "m"(*reinterpret_cast<const char*>(u)) : "memory");
+ __asm__ __volatile__("sfence" ::: "memory");
+}
+
+# include <cpuid.h>
+static decltype(pmem_control::persist) pmem_persist_init()
+{
+ uint32_t eax= 0, ebx= 0, ecx= 0, edx= 0;
+ __cpuid_count(7, 0, eax, ebx, ecx, edx);
+ if (ebx & 1U<<24 /* CLWB */)
+ return pmem_clwb;
+ else if (ebx & 1U<<23 /* CLFLUSHOPT */)
+ return pmem_clflushopt;
+ else
+ return pmem_clflush;
+}
+# elif defined __aarch64__
+static void pmem_cvac(const void* buf, size_t size)
+{
+ for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
+ end= uintptr_t(buf) + size;
+ u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
+ __asm__ __volatile__("dc cvac, %0" :: "r"(u) : "memory");
+ __asm__ __volatile__("dmb ishst" ::: "memory");
+}
+
+static void pmem_cvap(const void* buf, size_t size)
+{
+ for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
+ end= uintptr_t(buf) + size;
+ u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
+ __asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory");
+ __asm__ __volatile__("dmb ishst" ::: "memory");
+}
+
+# include <sys/auxv.h>
+# include <asm/hwcap.h>
+# ifndef HWCAP_DCPOP
+# define HWCAP_DCPOP (1 << 16)
+# endif
+
+static decltype(pmem_control::persist) pmem_persist_init()
+{
+ return (getauxval(AT_HWCAP) & HWCAP_DCPOP) ? pmem_cvap : pmem_cvac;
+}
+# elif defined __powerpc64__
+static void pmem_phwsync(const void* buf, size_t size)
+{
+ for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
+ end= uintptr_t(buf) + size;
+ u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
+ {
+ /* GCC is just passing the inline asm snippets to the assembler,
+ and it does not even define these mnemonics by itself. Clang does,
+ and it includes a built-in assembler.
+
+ Let us hope that having a recent enough GCC is an adequate proxy
+ for having a recent enough assembler. */
+# if __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 12)
+ __asm__ __volatile__("dcbstps 0,%0" :: "r"(u) : "memory");
+# else
+ __asm__ __volatile__(".long (0x7cc000AC | %0 << 11)" :: "r"(u) : "memory");
+# endif
+ }
+
+# if __GNUC__ >= 11 || (defined __clang_major__ && __clang_major__ >= 18)
+ __asm__ __volatile__("phwsync" ::: "memory");
+# else
+ __asm__ __volatile__(".long 0x7c80040a" ::: "memory");
+# endif
+}
+
+# include <atomic>
+static void pmem_fence(const void*, size_t)
+{
+ std::atomic_thread_fence(std::memory_order_seq_cst);
+}
+
+# include <sys/auxv.h>
+# ifndef AT_HWCAP2
+# define AT_HWCAP2 26
+# endif
+# ifndef PPC_FEATURE2_ARCH_3_1
+# define PPC_FEATURE2_ARCH_3_1 4
+# endif
+
+static decltype(pmem_control::persist) pmem_persist_init()
+{
+ return (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_3_1)
+ ? pmem_phwsync : pmem_fence;
+}
+# endif
+
+pmem_control::pmem_control() : persist(pmem_persist_init()) {}
+const pmem_control pmem;
+#else
+void pmem_persist(const void *buf, size_t size)
+{
+# if defined __riscv && __riscv_xlen == 64
+ __asm__ __volatile__("fence w,w" ::: "memory");
+# elif defined __loongarch64
+ __asm__ __volatile__("dbar 0" ::: "memory");
+# else
+# error "Missing implementation; recompile with cmake -DWITH_INNODB_PMEM=OFF"
+# endif
+}
+#endif
diff --git a/storage/innobase/sync/srw_lock.cc b/storage/innobase/sync/srw_lock.cc
index 5afb79f2..19db1245 100644
--- a/storage/innobase/sync/srw_lock.cc
+++ b/storage/innobase/sync/srw_lock.cc
@@ -548,3 +548,124 @@ template void ssux_lock_impl<false>::rd_unlock();
template void ssux_lock_impl<false>::u_unlock();
template void ssux_lock_impl<false>::wr_unlock();
#endif /* UNIV_PFS_RWLOCK */
+
+#ifdef UNIV_DEBUG
+void srw_lock_debug::SRW_LOCK_INIT(mysql_pfs_key_t key)
+{
+ srw_lock::SRW_LOCK_INIT(key);
+ readers_lock.init();
+ ut_ad(!readers.load(std::memory_order_relaxed));
+ ut_ad(!have_any());
+}
+
+void srw_lock_debug::destroy()
+{
+ ut_ad(!writer);
+ if (auto r= readers.load(std::memory_order_relaxed))
+ {
+ readers.store(0, std::memory_order_relaxed);
+ ut_ad(r->empty());
+ delete r;
+ }
+ srw_lock::destroy();
+}
+
+bool srw_lock_debug::wr_lock_try()
+{
+ ut_ad(!have_any());
+ if (!srw_lock::wr_lock_try())
+ return false;
+ ut_ad(!writer);
+ writer.store(pthread_self(), std::memory_order_relaxed);
+ return true;
+}
+
+void srw_lock_debug::wr_lock(SRW_LOCK_ARGS(const char *file, unsigned line))
+{
+ ut_ad(!have_any());
+ srw_lock::wr_lock(SRW_LOCK_ARGS(file, line));
+ ut_ad(!writer);
+ writer.store(pthread_self(), std::memory_order_relaxed);
+}
+
+void srw_lock_debug::wr_unlock()
+{
+ ut_ad(have_wr());
+ writer.store(0, std::memory_order_relaxed);
+ srw_lock::wr_unlock();
+}
+
+void srw_lock_debug::readers_register()
+{
+ readers_lock.wr_lock();
+ auto r= readers.load(std::memory_order_relaxed);
+ if (!r)
+ {
+ r= new std::unordered_multiset<pthread_t>();
+ readers.store(r, std::memory_order_relaxed);
+ }
+ r->emplace(pthread_self());
+ readers_lock.wr_unlock();
+}
+
+bool srw_lock_debug::rd_lock_try()
+{
+ ut_ad(!have_any());
+ if (!srw_lock::rd_lock_try())
+ return false;
+ readers_register();
+ return true;
+}
+
+void srw_lock_debug::rd_lock(SRW_LOCK_ARGS(const char *file, unsigned line))
+{
+ ut_ad(!have_any());
+ srw_lock::rd_lock(SRW_LOCK_ARGS(file, line));
+ readers_register();
+}
+
+void srw_lock_debug::rd_unlock()
+{
+ const pthread_t self= pthread_self();
+ ut_ad(writer != self);
+ readers_lock.wr_lock();
+ auto r= readers.load(std::memory_order_relaxed);
+ ut_ad(r);
+ auto i= r->find(self);
+ ut_ad(i != r->end());
+ r->erase(i);
+ readers_lock.wr_unlock();
+
+ srw_lock::rd_unlock();
+}
+
+bool srw_lock_debug::have_rd() const noexcept
+{
+ if (auto r= readers.load(std::memory_order_relaxed))
+ {
+ readers_lock.wr_lock();
+ bool found= r->find(pthread_self()) != r->end();
+ readers_lock.wr_unlock();
+# ifndef SUX_LOCK_GENERIC
+ ut_ad(!found || is_locked());
+# endif
+ return found;
+ }
+ return false;
+}
+
+bool srw_lock_debug::have_wr() const noexcept
+{
+ if (writer != pthread_self())
+ return false;
+# ifndef SUX_LOCK_GENERIC
+ ut_ad(is_write_locked());
+# endif
+ return true;
+}
+
+bool srw_lock_debug::have_any() const noexcept
+{
+ return have_wr() || have_rd();
+}
+#endif
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index cff16d9c..f32f4de5 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -56,84 +56,6 @@ purge_sys_t purge_sys;
my_bool srv_purge_view_update_only_debug;
#endif /* UNIV_DEBUG */
-/** Sentinel value */
-static const TrxUndoRsegs NullElement;
-
-/** Default constructor */
-TrxUndoRsegsIterator::TrxUndoRsegsIterator()
- : m_rsegs(NullElement), m_iter(m_rsegs.begin())
-{
-}
-
-/** Sets the next rseg to purge in purge_sys.
-Executed in the purge coordinator thread.
-@retval false when nothing is to be purged
-@retval true when purge_sys.rseg->latch was locked */
-inline bool TrxUndoRsegsIterator::set_next()
-{
- ut_ad(!purge_sys.next_stored);
- mysql_mutex_lock(&purge_sys.pq_mutex);
-
- /* Only purge consumes events from the priority queue, user
- threads only produce the events. */
-
- /* Check if there are more rsegs to process in the
- current element. */
- if (m_iter != m_rsegs.end()) {
- /* We are still processing rollback segment from
- the same transaction and so expected transaction
- number shouldn't increase. Undo the increment of
- expected commit done by caller assuming rollback
- segments from given transaction are done. */
- purge_sys.tail.trx_no = (*m_iter)->last_trx_no();
- } else if (!purge_sys.purge_queue.empty()) {
- m_rsegs = purge_sys.purge_queue.top();
- purge_sys.purge_queue.pop();
- ut_ad(purge_sys.purge_queue.empty()
- || purge_sys.purge_queue.top() != m_rsegs);
- m_iter = m_rsegs.begin();
- } else {
- /* Queue is empty, reset iterator. */
- purge_sys.rseg = NULL;
- mysql_mutex_unlock(&purge_sys.pq_mutex);
- m_rsegs = NullElement;
- m_iter = m_rsegs.begin();
- return false;
- }
-
- purge_sys.rseg = *m_iter++;
- mysql_mutex_unlock(&purge_sys.pq_mutex);
-
- /* We assume in purge of externally stored fields that space
- id is in the range of UNDO tablespace space ids */
- ut_ad(purge_sys.rseg->space->id == TRX_SYS_SPACE
- || srv_is_undo_tablespace(purge_sys.rseg->space->id));
-
- purge_sys.rseg->latch.wr_lock(SRW_LOCK_CALL);
- trx_id_t last_trx_no = purge_sys.rseg->last_trx_no();
- purge_sys.hdr_offset = purge_sys.rseg->last_offset();
- purge_sys.hdr_page_no = purge_sys.rseg->last_page_no;
-
- /* Only the purge_coordinator_task will access this object
- purge_sys.rseg_iter, or any of purge_sys.hdr_page_no,
- purge_sys.tail.
- The field purge_sys.head and purge_sys.view are modified by
- purge_sys_t::clone_end_view()
- in the purge_coordinator_task
- while holding exclusive purge_sys.latch.
- The purge_sys.view may also be modified by
- purge_sys_t::wake_if_not_active() while holding exclusive
- purge_sys.latch.
- The purge_sys.head may be read by
- purge_truncation_callback(). */
- ut_ad(last_trx_no == m_rsegs.trx_no);
- ut_a(purge_sys.hdr_page_no != FIL_NULL);
- ut_a(purge_sys.tail.trx_no <= last_trx_no);
- purge_sys.tail.trx_no = last_trx_no;
-
- return(true);
-}
-
/** Build a purge 'query' graph. The actual purge is performed by executing
this query graph.
@return own: the query graph */
@@ -345,7 +267,8 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
that is known to be corrupted. */
ut_a(flst_add_first(rseg_header, TRX_RSEG + TRX_RSEG_HISTORY, undo_page,
uint16_t(page_offset(undo_header) +
- TRX_UNDO_HISTORY_NODE), mtr) == DB_SUCCESS);
+ TRX_UNDO_HISTORY_NODE), rseg->space->free_limit,
+ mtr) == DB_SUCCESS);
mtr->write<2>(*undo_page, TRX_UNDO_SEG_HDR + TRX_UNDO_STATE +
undo_page->page.frame, undo_state);
@@ -396,9 +319,7 @@ static void trx_purge_free_segment(buf_block_t *rseg_hdr, buf_block_t *block,
void purge_sys_t::rseg_enable(trx_rseg_t &rseg)
{
ut_ad(this == &purge_sys);
-#ifndef SUX_LOCK_GENERIC
- ut_ad(rseg.latch.is_write_locked());
-#endif
+ ut_ad(rseg.latch.have_wr());
uint8_t skipped= skipped_rseg;
ut_ad(skipped < TRX_SYS_N_RSEGS);
if (&rseg == &trx_sys.rseg_array[skipped])
@@ -437,6 +358,19 @@ inline dberr_t purge_sys_t::iterator::free_history_rseg(trx_rseg_t &rseg) const
mtr_t mtr;
bool freed= false;
uint32_t rseg_ref= 0;
+ const auto last_boffset= srv_page_size - TRX_UNDO_LOG_OLD_HDR_SIZE;
+ /* Technically, rseg.space->free_limit is not protected by
+ rseg.latch, which we are holding, but rseg.space->latch. The value
+ that we are reading may become stale (too small) if other pages are
+ being allocated in this tablespace, for other rollback
+ segments. Nothing can be added to this rseg without holding
+ rseg.latch, and hence we can validate the entire file-based list
+ against the limit that we are reading here.
+
+ Note: The read here may look like a data race. On none of our target
+ architectures this should be an actual problem, because the uint32_t
+ value should always fit in a register and be correctly aligned. */
+ const auto last_page= rseg.space->free_limit;
mtr.start();
@@ -452,13 +386,23 @@ func_exit:
}
hdr_addr= flst_get_last(TRX_RSEG + TRX_RSEG_HISTORY + rseg_hdr->page.frame);
- hdr_addr.boffset= static_cast<uint16_t>(hdr_addr.boffset -
- TRX_UNDO_HISTORY_NODE);
-loop:
if (hdr_addr.page == FIL_NULL)
goto func_exit;
+ if (hdr_addr.page >= last_page ||
+ hdr_addr.boffset < TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE ||
+ hdr_addr.boffset >= last_boffset)
+ {
+ corrupted:
+ err= DB_CORRUPTION;
+ goto func_exit;
+ }
+
+ hdr_addr.boffset= static_cast<uint16_t>(hdr_addr.boffset -
+ TRX_UNDO_HISTORY_NODE);
+
+loop:
buf_block_t *b=
buf_page_get_gen(page_id_t(rseg.space->id, hdr_addr.page),
0, RW_X_LATCH, nullptr, BUF_GET_POSSIBLY_FREED,
@@ -507,11 +451,18 @@ loop:
fil_addr_t prev_hdr_addr=
flst_get_prev_addr(b->page.frame + hdr_addr.boffset +
TRX_UNDO_HISTORY_NODE);
+ if (prev_hdr_addr.page == FIL_NULL);
+ else if (prev_hdr_addr.page >= last_page ||
+ prev_hdr_addr.boffset < TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE ||
+ prev_hdr_addr.boffset >= last_boffset)
+ goto corrupted;
+
prev_hdr_addr.boffset= static_cast<uint16_t>(prev_hdr_addr.boffset -
TRX_UNDO_HISTORY_NODE);
err= flst_remove(rseg_hdr, TRX_RSEG + TRX_RSEG_HISTORY, b,
- uint16_t(hdr_addr.boffset + TRX_UNDO_HISTORY_NODE), &mtr);
+ uint16_t(hdr_addr.boffset + TRX_UNDO_HISTORY_NODE),
+ last_page, &mtr);
if (UNIV_UNLIKELY(err != DB_SUCCESS))
goto func_exit;
@@ -571,45 +522,21 @@ loop:
ut_ad(rseg_hdr->page.id() == rseg.page_id());
mtr.memo_push(rseg_hdr, MTR_MEMO_PAGE_X_FIX);
+ if (hdr_addr.page == FIL_NULL)
+ goto func_exit;
+
goto loop;
}
-/** Cleanse purge queue to remove the rseg that reside in undo-tablespace
-marked for truncate.
-@param[in] space undo tablespace being truncated */
-static void trx_purge_cleanse_purge_queue(const fil_space_t& space)
+void purge_sys_t::cleanse_purge_queue(const fil_space_t &space)
{
- typedef std::vector<TrxUndoRsegs> purge_elem_list_t;
- purge_elem_list_t purge_elem_list;
-
- mysql_mutex_lock(&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();
- }
-
- for (purge_elem_list_t::iterator it = purge_elem_list.begin();
- it != purge_elem_list.end();
- ++it) {
-
- for (TrxUndoRsegs::iterator it2 = it->begin();
- it2 != it->end();
- ++it2) {
- if ((*it2)->space == &space) {
- it->erase(it2);
- break;
- }
- }
-
- if (!it->empty()) {
- purge_sys.purge_queue.push(*it);
- }
- }
-
- mysql_mutex_unlock(&purge_sys.pq_mutex);
+ mysql_mutex_lock(&pq_mutex);
+ auto purge_elem_list= clone_queue_container();
+ purge_queue.clear();
+ for (auto elem : purge_elem_list)
+ if (purge_queue::rseg(elem)->space != &space)
+ purge_queue.push_trx_no_rseg(elem);
+ mysql_mutex_unlock(&pq_mutex);
}
dberr_t purge_sys_t::iterator::free_history() const
@@ -672,7 +599,9 @@ fil_space_t *purge_sys_t::truncating_tablespace()
if (space || srv_undo_tablespaces_active < 2 || !srv_undo_log_truncate)
return space;
- const uint32_t size= uint32_t(srv_max_undo_log_size >> srv_page_size_shift);
+ const uint32_t size=
+ uint32_t(std::min(ulonglong{std::numeric_limits<uint32_t>::max()},
+ srv_max_undo_log_size >> srv_page_size_shift));
for (uint32_t i= truncate_undo_space.last, j= i;; )
{
if (fil_space_t *s= undo_truncate_try(srv_undo_space_id_start + i, size))
@@ -751,7 +680,7 @@ not_free:
const char *file_name= UT_LIST_GET_FIRST(space->chain)->name;
sql_print_information("InnoDB: Truncating %s", file_name);
- trx_purge_cleanse_purge_queue(*space);
+ purge_sys.cleanse_purge_queue(*space);
/* Lock all modified pages of the tablespace.
@@ -870,13 +799,11 @@ buf_block_t *purge_sys_t::get_page(page_id_t id)
return nullptr;
}
-void purge_sys_t::rseg_get_next_history_log()
+bool purge_sys_t::rseg_get_next_history_log()
{
fil_addr_t prev_log_addr;
-#ifndef SUX_LOCK_GENERIC
- ut_ad(rseg->latch.is_write_locked());
-#endif
+ ut_ad(rseg->latch.have_wr());
ut_a(rseg->last_page_no != FIL_NULL);
tail.trx_no= rseg->last_trx_no() + 1;
@@ -888,21 +815,24 @@ void purge_sys_t::rseg_get_next_history_log()
{
const byte *log_hdr= undo_page->page.frame + rseg->last_offset();
prev_log_addr= flst_get_prev_addr(log_hdr + TRX_UNDO_HISTORY_NODE);
+ if (prev_log_addr.boffset < TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE ||
+ prev_log_addr.boffset >= srv_page_size - TRX_UNDO_LOG_OLD_HDR_SIZE)
+ goto corrupted;
prev_log_addr.boffset = static_cast<uint16_t>(prev_log_addr.boffset -
TRX_UNDO_HISTORY_NODE);
}
else
- prev_log_addr.page= FIL_NULL;
+ goto corrupted;
- if (prev_log_addr.page == FIL_NULL)
+ if (prev_log_addr.page >= rseg->space->free_limit)
+ corrupted:
rseg->last_page_no= FIL_NULL;
else
{
/* Read the previous log header. */
trx_id_t trx_no= 0;
if (const buf_block_t* undo_page=
- get_page(page_id_t(rseg->space->id,
- prev_log_addr.page)))
+ get_page(page_id_t(rseg->space->id, prev_log_addr.page)))
{
const byte *log_hdr= undo_page->page.frame + prev_log_addr.boffset;
trx_no= mach_read_from_8(log_hdr + TRX_UNDO_TRX_NO);
@@ -920,12 +850,13 @@ void purge_sys_t::rseg_get_next_history_log()
can never produce events from an empty rollback segment. */
mysql_mutex_lock(&pq_mutex);
- purge_queue.push(*rseg);
+ enqueue(*rseg);
mysql_mutex_unlock(&pq_mutex);
}
}
rseg->latch.wr_unlock();
+ return choose_next_log();
}
/** Position the purge sys "iterator" on the undo record to use for purging.
@@ -933,11 +864,37 @@ void purge_sys_t::rseg_get_next_history_log()
@retval true when purge_sys.rseg->latch was locked */
bool purge_sys_t::choose_next_log()
{
- if (!rseg_iter.set_next())
- return false;
+ ut_ad(!next_stored);
- hdr_offset= rseg->last_offset();
- hdr_page_no= rseg->last_page_no;
+ mysql_mutex_lock(&pq_mutex);
+ if (purge_queue.empty()) {
+ rseg = nullptr;
+ mysql_mutex_unlock(&purge_sys.pq_mutex);
+ return false;
+ }
+ rseg= purge_queue.pop();
+ mysql_mutex_unlock(&purge_sys.pq_mutex);
+
+ /* We assume in purge of externally stored fields that space
+ id is in the range of UNDO tablespace space ids */
+ ut_ad(rseg->space == fil_system.sys_space ||
+ srv_is_undo_tablespace(rseg->space->id));
+
+ rseg->latch.wr_lock(SRW_LOCK_CALL);
+ trx_id_t last_trx_no = rseg->last_trx_no();
+ hdr_offset = rseg->last_offset();
+ hdr_page_no = rseg->last_page_no;
+
+ /* Only the purge_coordinator_task will access this any of
+ purge_sys.hdr_page_no, purge_sys.tail. The field purge_sys.head and
+ purge_sys.view are modified by clone_end_view() in the
+ purge_coordinator_task while holding exclusive purge_sys.latch. The
+ purge_sys.view may also be modified by wake_if_not_active() while holding
+ exclusive purge_sys.latch. The purge_sys.head may be read by
+ purge_truncation_callback(). */
+ ut_a(hdr_page_no != FIL_NULL);
+ ut_a(tail.trx_no <= last_trx_no);
+ tail.trx_no = last_trx_no;
if (!rseg->needs_purge)
{
@@ -968,7 +925,7 @@ bool purge_sys_t::choose_next_log()
if (!b)
goto purge_nothing;
undo_rec=
- trx_undo_page_get_first_rec(b, page_no, hdr_offset);
+ trx_undo_page_get_first_rec(b, hdr_page_no, hdr_offset);
if (!undo_rec)
goto purge_nothing;
}
@@ -992,18 +949,13 @@ inline trx_purge_rec_t purge_sys_t::get_next_rec(roll_ptr_t roll_ptr)
{
ut_ad(next_stored);
ut_ad(tail.trx_no < low_limit_no());
-#ifndef SUX_LOCK_GENERIC
- ut_ad(rseg->latch.is_write_locked());
-#endif
+ ut_ad(rseg->latch.have_wr());
if (!offset)
{
- /* It is the dummy undo log record, which means that there is no
- need to purge this undo log */
- rseg_get_next_history_log();
-
- /* Look for the next undo log and record to purge */
- if (choose_next_log())
+ /* It is the dummy undo log record, which means that there is no need to
+ purge this undo log. Look for the next undo log and record to purge */
+ if (rseg_get_next_history_log())
rseg->latch.wr_unlock();
return {nullptr, 1};
}
@@ -1051,9 +1003,8 @@ inline trx_purge_rec_t purge_sys_t::get_next_rec(roll_ptr_t roll_ptr)
else
{
got_no_rec:
- rseg_get_next_history_log();
/* Look for the next undo log and record to purge */
- locked= choose_next_log();
+ locked= rseg_get_next_history_log();
}
if (locked)
diff --git a/storage/innobase/trx/trx0rseg.cc b/storage/innobase/trx/trx0rseg.cc
index 87a2ac7b..964dca94 100644
--- a/storage/innobase/trx/trx0rseg.cc
+++ b/storage/innobase/trx/trx0rseg.cc
@@ -201,7 +201,7 @@ bool trx_rseg_read_wsrep_checkpoint(const buf_block_t *rseg_header, XID &xid)
memcpy(xid.data, TRX_RSEG + TRX_RSEG_WSREP_XID_DATA
+ rseg_header->page.frame, XIDDATASIZE);
- return true;
+ return wsrep_is_wsrep_xid(&xid);
}
/** Read the WSREP XID from the TRX_SYS page (in case of upgrade).
@@ -210,6 +210,11 @@ bool trx_rseg_read_wsrep_checkpoint(const buf_block_t *rseg_header, XID &xid)
@return whether the WSREP XID is present */
static bool trx_rseg_init_wsrep_xid(const page_t* page, XID& xid)
{
+ if (memcmp(TRX_SYS + TRX_SYS_WSREP_XID_INFO + page,
+ field_ref_zero, TRX_SYS_WSREP_XID_LEN) == 0) {
+ return false;
+ }
+
if (mach_read_from_4(TRX_SYS + TRX_SYS_WSREP_XID_INFO
+ TRX_SYS_WSREP_XID_MAGIC_N_FLD
+ page)
@@ -232,7 +237,8 @@ static bool trx_rseg_init_wsrep_xid(const page_t* page, XID& xid)
memcpy(xid.data,
TRX_SYS + TRX_SYS_WSREP_XID_INFO
+ TRX_SYS_WSREP_XID_DATA + page, XIDDATASIZE);
- return true;
+
+ return wsrep_is_wsrep_xid(&xid);
}
/** Recover the latest WSREP checkpoint XID.
@@ -448,7 +454,14 @@ static dberr_t trx_rseg_mem_restore(trx_rseg_t *rseg, mtr_t *mtr)
{
if (!rseg->space)
return DB_TABLESPACE_NOT_FOUND;
+
+ /* Access the tablespace header page to recover rseg->space->free_limit */
+ page_id_t page_id{rseg->space->id, 0};
dberr_t err;
+ if (!buf_page_get_gen(page_id, 0, RW_S_LATCH, nullptr, BUF_GET, mtr, &err))
+ return err;
+ mtr->release_last_page();
+ page_id.set_page_no(rseg->page_no);
const buf_block_t *rseg_hdr=
buf_page_get_gen(rseg->page_id(), 0, RW_S_LATCH, nullptr, BUF_GET, mtr,
&err);
@@ -493,10 +506,17 @@ static dberr_t trx_rseg_mem_restore(trx_rseg_t *rseg, mtr_t *mtr)
trx_sys.recovered_binlog_offset= binlog_offset;
trx_sys.recovered_binlog_is_legacy_pos= false;
}
+ }
#ifdef WITH_WSREP
- trx_rseg_read_wsrep_checkpoint(rseg_hdr, trx_sys.recovered_wsrep_xid);
+ XID tmp_xid;
+ tmp_xid.null();
+ /* Update recovered wsrep xid only if we found wsrep xid from
+ rseg header page and read xid seqno is larger than currently
+ recovered xid seqno. */
+ if (trx_rseg_read_wsrep_checkpoint(rseg_hdr, tmp_xid) &&
+ wsrep_xid_seqno(&tmp_xid) > wsrep_xid_seqno(&trx_sys.recovered_wsrep_xid))
+ trx_sys.recovered_wsrep_xid.set(&tmp_xid);
#endif
- }
}
if (srv_operation == SRV_OPERATION_RESTORE)
@@ -518,6 +538,11 @@ static dberr_t trx_rseg_mem_restore(trx_rseg_t *rseg, mtr_t *mtr)
fil_addr_t node_addr= flst_get_last(TRX_RSEG + TRX_RSEG_HISTORY +
rseg_hdr->page.frame);
+ if (node_addr.page >= rseg->space->free_limit ||
+ node_addr.boffset < TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE ||
+ node_addr.boffset >= srv_page_size - TRX_UNDO_LOG_OLD_HDR_SIZE)
+ return DB_CORRUPTION;
+
node_addr.boffset= static_cast<uint16_t>(node_addr.boffset -
TRX_UNDO_HISTORY_NODE);
rseg->last_page_no= node_addr.page;
@@ -544,7 +569,7 @@ static dberr_t trx_rseg_mem_restore(trx_rseg_t *rseg, mtr_t *mtr)
if (rseg->last_page_no != FIL_NULL)
/* There is no need to cover this operation by the purge
mutex because we are still bootstrapping. */
- purge_sys.purge_queue.push(*rseg);
+ purge_sys.enqueue(*rseg);
}
trx_sys.set_undo_non_empty(rseg->history_size > 0);
@@ -567,10 +592,6 @@ static void trx_rseg_init_binlog_info(const page_t* page)
+ TRX_SYS + page);
trx_sys.recovered_binlog_is_legacy_pos= true;
}
-
-#ifdef WITH_WSREP
- trx_rseg_init_wsrep_xid(page, trx_sys.recovered_wsrep_xid);
-#endif
}
/** Initialize or recover the rollback segments at startup. */
@@ -589,7 +610,17 @@ dberr_t trx_rseg_array_init()
#endif
mtr_t mtr;
dberr_t err = DB_SUCCESS;
-
+ /* mariabackup --prepare only deals with the redo log and the data
+ files, not with transactions or the data dictionary, that's why
+ trx_lists_init_at_db_start() does not invoke purge_sys.create() and
+ purge queue mutex stays uninitialized, and trx_rseg_mem_restore() quits
+ before initializing undo log lists. */
+ if (srv_operation != SRV_OPERATION_RESTORE)
+ /* Acquiring purge queue mutex here should be fine from the
+ deadlock prevention point of view, because executing that
+ function is a prerequisite for starting the purge subsystem or
+ any transactions. */
+ purge_sys.queue_lock();
for (ulint rseg_id = 0; rseg_id < TRX_SYS_N_RSEGS; rseg_id++) {
mtr.start();
if (const buf_block_t* sys = trx_sysf_get(&mtr, false)) {
@@ -602,7 +633,11 @@ dberr_t trx_rseg_array_init()
+ sys->page.frame);
trx_rseg_init_binlog_info(sys->page.frame);
#ifdef WITH_WSREP
- wsrep_sys_xid.set(&trx_sys.recovered_wsrep_xid);
+ if (trx_rseg_init_wsrep_xid(
+ sys->page.frame, trx_sys.recovered_wsrep_xid)) {
+ wsrep_sys_xid.set(
+ &trx_sys.recovered_wsrep_xid);
+ }
#endif
}
@@ -655,7 +690,8 @@ dberr_t trx_rseg_array_init()
mtr.commit();
}
-
+ if (srv_operation != SRV_OPERATION_RESTORE)
+ purge_sys.queue_unlock();
if (err != DB_SUCCESS) {
for (auto& rseg : trx_sys.rseg_array) {
while (auto u = UT_LIST_GET_FIRST(rseg.undo_list)) {
@@ -667,7 +703,7 @@ dberr_t trx_rseg_array_init()
}
#ifdef WITH_WSREP
- if (!wsrep_sys_xid.is_null()) {
+ if (srv_operation == SRV_OPERATION_NORMAL && !wsrep_sys_xid.is_null()) {
/* Upgrade from a version prior to 10.3.5,
where WSREP XID was stored in TRX_SYS page.
If no rollback segment has a WSREP XID set,
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 942b8bd4..1d22b853 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -412,12 +412,12 @@ void trx_t::free()
#endif
read_view.mem_noaccess();
MEM_NOACCESS(&lock, sizeof lock);
- MEM_NOACCESS(&op_info, sizeof op_info);
- MEM_NOACCESS(&isolation_level, sizeof isolation_level);
- MEM_NOACCESS(&check_foreigns, sizeof check_foreigns);
+ MEM_NOACCESS(&op_info, sizeof op_info +
+ sizeof(unsigned) /* isolation_level, snapshot_isolation,
+ check_foreigns, check_unique_secondary,
+ bulk_insert */);
MEM_NOACCESS(&is_registered, sizeof is_registered);
MEM_NOACCESS(&active_commit_ordered, sizeof active_commit_ordered);
- MEM_NOACCESS(&check_unique_secondary, sizeof check_unique_secondary);
MEM_NOACCESS(&flush_log_later, sizeof flush_log_later);
MEM_NOACCESS(&duplicates, sizeof duplicates);
MEM_NOACCESS(&dict_operation, sizeof dict_operation);
@@ -1142,15 +1142,23 @@ inline void trx_t::write_serialisation_history(mtr_t *mtr)
}
else if (rseg->last_page_no == FIL_NULL)
{
- mysql_mutex_lock(&purge_sys.pq_mutex);
+ /* trx_sys.assign_new_trx_no() and
+ purge_sys.enqueue() must be invoked in the same
+ critical section protected with purge queue mutex to avoid rseg with
+ greater last commit number to be pushed to purge queue prior to rseg with
+ lesser last commit number. In other words pushing to purge queue must be
+ serialized along with assigning trx_no. Otherwise purge coordinator
+ thread can also fetch redo log records from rseg with greater last commit
+ number before rseg with lesser one. */
+ purge_sys.queue_lock();
trx_sys.assign_new_trx_no(this);
const trx_id_t end{rw_trx_hash_element->no};
+ rseg->last_page_no= undo->hdr_page_no;
/* end cannot be less than anything in rseg. User threads only
produce events when a rollback segment is empty. */
- purge_sys.purge_queue.push(TrxUndoRsegs{end, *rseg});
- mysql_mutex_unlock(&purge_sys.pq_mutex);
- rseg->last_page_no= undo->hdr_page_no;
rseg->set_last_commit(undo->hdr_offset, end);
+ purge_sys.enqueue(end, *rseg);
+ purge_sys.queue_unlock();
}
else
trx_sys.assign_new_trx_no(this);
diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc
index ccc68dfe..c0f5b1fb 100644
--- a/storage/innobase/trx/trx0undo.cc
+++ b/storage/innobase/trx/trx0undo.cc
@@ -134,8 +134,9 @@ trx_undo_page_get_first_rec(const buf_block_t *block, uint32_t page_no,
uint16_t offset)
{
uint16_t start= trx_undo_page_get_start(block, page_no, offset);
- return start == trx_undo_page_get_end(block, page_no, offset)
- ? nullptr : block->page.frame + start;
+ uint16_t end= trx_undo_page_get_end(block, page_no, offset);
+ ut_ad(start <= end);
+ return start >= end ? nullptr : block->page.frame + start;
}
/** Get the last undo log record on a page.
@@ -149,8 +150,10 @@ trx_undo_rec_t*
trx_undo_page_get_last_rec(const buf_block_t *block, uint32_t page_no,
uint16_t offset)
{
+ uint16_t start= trx_undo_page_get_start(block, page_no, offset);
uint16_t end= trx_undo_page_get_end(block, page_no, offset);
- return trx_undo_page_get_start(block, page_no, offset) == end
+ ut_ad(start <= end);
+ return start >= end
? nullptr
: block->page.frame + mach_read_from_2(block->page.frame + end - 2);
}
@@ -510,7 +513,7 @@ trx_undo_seg_create(fil_space_t *space, buf_block_t *rseg_hdr, ulint *id,
*err = flst_add_last(block, TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST,
block, TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE,
- mtr);
+ space->free_limit, mtr);
*id = slot_no;
mtr->write<4>(*rseg_hdr, TRX_RSEG + TRX_RSEG_UNDO_SLOTS
@@ -693,7 +696,8 @@ buf_block_t *trx_undo_add_page(trx_undo_t *undo, mtr_t *mtr, dberr_t *err)
mtr->undo_create(*new_block);
trx_undo_page_init(*new_block);
*err= flst_add_last(header_block, TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST,
- new_block, TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE, mtr);
+ new_block, TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE,
+ rseg->space->free_limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS))
new_block= nullptr;
else
@@ -744,9 +748,11 @@ trx_undo_free_page(
buf_page_make_young_if_needed(&header_block->page);
+ const uint32_t limit = rseg->space->free_limit;
+
*err = flst_remove(header_block, TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST,
undo_block, TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE,
- mtr);
+ limit, mtr);
if (UNIV_UNLIKELY(*err != DB_SUCCESS)) {
return FIL_NULL;
@@ -755,7 +761,13 @@ trx_undo_free_page(
const fil_addr_t last_addr = flst_get_last(
TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST
+ header_block->page.frame);
- if (UNIV_UNLIKELY(last_addr.page == page_no)) {
+ if (UNIV_UNLIKELY(last_addr.page == page_no)
+ || UNIV_UNLIKELY(last_addr.page != FIL_NULL
+ && last_addr.page >= limit)
+ || UNIV_UNLIKELY(last_addr.boffset < TRX_UNDO_PAGE_HDR
+ + TRX_UNDO_PAGE_NODE)
+ || UNIV_UNLIKELY(last_addr.boffset >= srv_page_size
+ - TRX_UNDO_LOG_OLD_HDR_SIZE)) {
*err = DB_CORRUPTION;
return FIL_NULL;
}
@@ -972,8 +984,8 @@ trx_undo_mem_create_at_db_start(trx_rseg_t *rseg, ulint id, uint32_t page_no)
ut_ad(id < TRX_RSEG_N_SLOTS);
mtr.start();
- const buf_block_t* block = buf_page_get(
- page_id_t(rseg->space->id, page_no), 0, RW_X_LATCH, &mtr);
+ const page_id_t page_id{rseg->space->id, page_no};
+ const buf_block_t* block = buf_page_get(page_id, 0, RW_X_LATCH, &mtr);
if (UNIV_UNLIKELY(!block)) {
corrupted:
mtr.commit();
@@ -1075,6 +1087,15 @@ corrupted_type:
fil_addr_t last_addr = flst_get_last(
TRX_UNDO_SEG_HDR + TRX_UNDO_PAGE_LIST + block->page.frame);
+ if (last_addr.page >= rseg->space->free_limit
+ || last_addr.boffset < TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_NODE
+ || last_addr.boffset >= srv_page_size
+ - TRX_UNDO_LOG_OLD_HDR_SIZE) {
+ corrupted_undo:
+ ut_free(undo);
+ goto corrupted;
+ }
+
undo->last_page_no = last_addr.page;
undo->top_page_no = last_addr.page;
@@ -1083,8 +1104,7 @@ corrupted_type:
RW_X_LATCH, &mtr);
if (UNIV_UNLIKELY(!last)) {
- ut_free(undo);
- goto corrupted;
+ goto corrupted_undo;
}
if (const trx_undo_rec_t* rec = trx_undo_page_get_last_rec(
diff --git a/storage/innobase/unittest/CMakeLists.txt b/storage/innobase/unittest/CMakeLists.txt
index 7dd7c111..9330d231 100644
--- a/storage/innobase/unittest/CMakeLists.txt
+++ b/storage/innobase/unittest/CMakeLists.txt
@@ -17,6 +17,10 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/unittest/mytap
${CMAKE_SOURCE_DIR}/storage/innobase/include
${CMAKE_SOURCE_DIR}/tpool)
+ADD_EXECUTABLE(innodb_rbt-t innodb_rbt-t.cc ../ut/ut0rbt.cc)
+TARGET_LINK_LIBRARIES(innodb_rbt-t mysys mytap)
+ADD_DEPENDENCIES(innodb_rbt-t GenError)
+MY_ADD_TEST(innodb_rbt)
ADD_EXECUTABLE(innodb_fts-t innodb_fts-t.cc)
TARGET_LINK_LIBRARIES(innodb_fts-t mysys mytap)
ADD_DEPENDENCIES(innodb_fts-t GenError)
diff --git a/storage/innobase/unittest/innodb_rbt-t.cc b/storage/innobase/unittest/innodb_rbt-t.cc
new file mode 100644
index 00000000..38b980da
--- /dev/null
+++ b/storage/innobase/unittest/innodb_rbt-t.cc
@@ -0,0 +1,83 @@
+#include "tap.h"
+#include "ut0rbt.h"
+#include "ut0new.h"
+
+const size_t alloc_max_retries= 0;
+void os_thread_sleep(ulint) { abort(); }
+void ut_dbg_assertion_failed(const char *, const char *, unsigned)
+{ abort(); }
+namespace ib { fatal_or_error::~fatal_or_error() { abort(); } }
+#ifdef UNIV_PFS_MEMORY
+PSI_memory_key mem_key_other, mem_key_std;
+PSI_memory_key ut_new_get_key_by_file(uint32_t) { return mem_key_std; }
+#endif
+
+static const uint64_t doc_ids[]=
+{
+ 103571, 104018, 106821, 108647, 109352, 109379,
+ 110325, 122868, 210682130, 231275441, 234172769, 366236849,
+ 526467159, 1675241735, 1675243405, 1947751899, 1949940363, 2033691953,
+ 2148227299, 2256289791, 2294223591, 2367501260, 2792700091, 2792701220,
+ 2817121627, 2820680352, 2821165664, 3253312130, 3404918378, 3532599429,
+ 3538712078, 3539373037, 3546479309, 3566641838, 3580209634, 3580871267,
+ 3693930556, 3693932734, 3693932983, 3781949558, 3839877411, 3930968983
+};
+
+static int fts_doc_id_cmp(const void *p1, const void *p2)
+{
+ uint64_t a= *static_cast<const uint64_t*>(p1),
+ b= *static_cast<const uint64_t*>(p2);
+ return b > a ? -1 : a > b;
+}
+
+
+static int fts_doc_id_buggy_cmp(const void *p1, const void *p2)
+{
+ return int(*static_cast<const uint64_t*>(p1) -
+ *static_cast<const uint64_t*>(p2));
+}
+
+typedef int (*comparator) (const void*, const void*);
+
+static void rbt_populate(ib_rbt_t *rbt)
+{
+ ib_rbt_bound_t parent;
+ for (const uint64_t &doc_id : doc_ids)
+ {
+ if (rbt_search(rbt, &parent, &doc_id))
+ rbt_add_node(rbt, &parent, &doc_id);
+ }
+}
+
+static void rbt_populate2(ib_rbt_t *rbt)
+{
+ for (const uint64_t &doc_id : doc_ids)
+ rbt_insert(rbt, &doc_id, &doc_id);
+}
+
+static bool rbt_search_all(ib_rbt_t *rbt)
+{
+ ib_rbt_bound_t parent;
+ for (const uint64_t &doc_id : doc_ids)
+ if (rbt_search(rbt, &parent, &doc_id))
+ return false;
+ return true;
+}
+
+static void rbt_test(comparator cmp, bool buggy)
+{
+ ib_rbt_t *rbt= rbt_create(sizeof(uint64_t), cmp);
+ rbt_populate(rbt);
+ ok(rbt_search_all(rbt) != buggy, "search after populate");
+ rbt_free(rbt);
+ rbt= rbt_create(sizeof(uint64_t), cmp);
+ rbt_populate2(rbt);
+ ok(rbt_search_all(rbt) != buggy, "search after populate2");
+ rbt_free(rbt);
+}
+
+int main ()
+{
+ rbt_test(fts_doc_id_buggy_cmp, true);
+ rbt_test(fts_doc_id_cmp, false);
+}
diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc
index 7b69042c..5b3bc185 100644
--- a/storage/innobase/ut/ut0ut.cc
+++ b/storage/innobase/ut/ut0ut.cc
@@ -258,47 +258,6 @@ ut_print_name(
}
}
-/** Format a table name, quoted as an SQL identifier.
-If the name contains a slash '/', the result will contain two
-identifiers separated by a period (.), as in SQL
-database_name.table_name.
-@see table_name_t
-@param[in] name table or index name
-@param[out] formatted formatted result, will be NUL-terminated
-@param[in] formatted_size size of the buffer in bytes
-@return pointer to 'formatted' */
-char*
-ut_format_name(
- const char* name,
- char* formatted,
- ulint formatted_size)
-{
- switch (formatted_size) {
- case 1:
- formatted[0] = '\0';
- /* FALL-THROUGH */
- case 0:
- return(formatted);
- }
-
- char* end;
-
- end = innobase_convert_name(formatted, formatted_size,
- name, strlen(name), NULL);
-
- /* If the space in 'formatted' was completely used, then sacrifice
- the last character in order to write '\0' at the end. */
- if ((ulint) (end - formatted) == formatted_size) {
- end--;
- }
-
- ut_a((ulint) (end - formatted) < formatted_size);
-
- *end = '\0';
-
- return(formatted);
-}
-
/**********************************************************************//**
Catenate files. */
void
@@ -353,14 +312,16 @@ ut_strerr(
return("Lock wait");
case DB_DEADLOCK:
return("Deadlock");
+ case DB_RECORD_CHANGED:
+ return("Record changed");
+#ifdef WITH_WSREP
case DB_ROLLBACK:
return("Rollback");
+#endif
case DB_DUPLICATE_KEY:
return("Duplicate key");
case DB_MISSING_HISTORY:
return("Required history data has been deleted");
- case DB_CLUSTER_NOT_FOUND:
- return("Cluster not found");
case DB_TABLE_NOT_FOUND:
return("Table not found");
case DB_TOO_BIG_RECORD:
diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt
index f55d78f0..426a19f0 100644
--- a/storage/maria/CMakeLists.txt
+++ b/storage/maria/CMakeLists.txt
@@ -124,7 +124,7 @@ ENDIF()
IF (CURL_FOUND)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
MYSQL_ADD_PLUGIN(s3 ha_s3.cc ${S3_SOURCES} COMPONENT s3-engine
- LINK_LIBRARIES ${CURL_LIBRARIES} z STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf)
+ LINK_LIBRARIES ${CURL_LIBRARIES} ${ZLIB_LIBRARIES} STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf)
ENDIF()
SET(CPACK_RPM_s3-engine_PACKAGE_SUMMARY "Amazon S3 archival storage engine for MariaDB" PARENT_SCOPE)
@@ -132,7 +132,7 @@ SET(CPACK_RPM_s3-engine_PACKAGE_DESCRIPTION "The S3 storage engine allows one to
IF(TARGET s3)
MYSQL_ADD_EXECUTABLE(aria_s3_copy aria_s3_copy.cc ${S3_SOURCES} COMPONENT s3-engine)
- TARGET_LINK_LIBRARIES(aria_s3_copy aria myisam mysys mysys_ssl ${CURL_LIBRARIES} ${ZLIB_LIBRARY})
+ TARGET_LINK_LIBRARIES(aria_s3_copy aria myisam mysys mysys_ssl ${CURL_LIBRARIES} ${ZLIB_LIBRARIES})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libmarias3)
ADD_DEFINITIONS(-DWITH_S3_STORAGE_ENGINE)
ENDIF()
diff --git a/storage/maria/aria_chk.c b/storage/maria/aria_chk.c
index 143110dc..4bbe513b 100644
--- a/storage/maria/aria_chk.c
+++ b/storage/maria/aria_chk.c
@@ -145,7 +145,8 @@ int main(int argc, char **argv)
{
if ((ma_control_file_open(FALSE, opt_require_control_file ||
!(check_param.testflag & T_SILENT),
- TRUE)))
+ TRUE,
+ control_file_open_flags)))
{
if (opt_require_control_file ||
(opt_transaction_logging && (check_param.testflag & T_REP_ANY)))
diff --git a/storage/maria/aria_pack.c b/storage/maria/aria_pack.c
index 40e7e399..464a08fb 100644
--- a/storage/maria/aria_pack.c
+++ b/storage/maria/aria_pack.c
@@ -239,7 +239,8 @@ int main(int argc, char **argv)
if (!opt_ignore_control_file &&
(no_control_file= ma_control_file_open(FALSE,
(opt_require_control_file ||
- !silent), FALSE)) &&
+ !silent), FALSE,
+ control_file_open_flags)) &&
opt_require_control_file)
{
error= 1;
diff --git a/storage/maria/aria_read_log.c b/storage/maria/aria_read_log.c
index c0c76ed5..2997314d 100644
--- a/storage/maria/aria_read_log.c
+++ b/storage/maria/aria_read_log.c
@@ -104,7 +104,7 @@ int main(int argc, char **argv)
goto end;
}
/* we don't want to create a control file, it MUST exist */
- if (ma_control_file_open(FALSE, TRUE, TRUE))
+ if (ma_control_file_open(FALSE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't open control file (%d)\n", errno);
goto err;
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 66dd9867..b3b0ba0f 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -38,6 +38,7 @@ C_MODE_START
#include "ma_recovery.h"
C_MODE_END
#include "ma_trnman.h"
+#include "ma_loghandler.h"
//#include "sql_priv.h"
#include "protocol.h"
@@ -45,6 +46,7 @@ C_MODE_END
#include "key.h"
#include "log.h"
#include "sql_parse.h"
+#include "mysql/service_print_check_msg.h"
#include "debug.h"
/*
@@ -428,10 +430,8 @@ static void _ma_check_print_msg(HA_CHECK *param, const LEX_CSTRING *msg_type,
const char *fmt, va_list args)
{
THD *thd= (THD *) param->thd;
- Protocol *protocol= thd->protocol;
- size_t length, msg_length;
+ size_t msg_length __attribute__((unused));
char msgbuf[MYSQL_ERRMSG_SIZE];
- char name[NAME_LEN * 2 + 2];
if (param->testflag & T_SUPPRESS_ERR_HANDLING)
return;
@@ -460,27 +460,10 @@ static void _ma_check_print_msg(HA_CHECK *param, const LEX_CSTRING *msg_type,
_ma_check_print(param, msg_type, msgbuf);
return;
}
- length= (uint) (strxmov(name, param->db_name, ".", param->table_name,
- NullS) - name);
- /*
- TODO: switch from protocol to push_warning here. The main reason we didn't
- it yet is parallel repair, which threads have no THD object accessible via
- current_thd.
-
- Also we likely need to lock mutex here (in both cases with protocol and
- push_warning).
- */
- protocol->prepare_for_resend();
- protocol->store(name, (uint)length, system_charset_info);
- protocol->store(param->op_name, strlen(param->op_name), system_charset_info);
- protocol->store(msg_type, system_charset_info);
- protocol->store(msgbuf, msg_length, system_charset_info);
- if (protocol->write())
- 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)
+ print_check_msg(thd, param->db_name, param->table_name,
+ param->op_name, msg_type->str, msgbuf, 0);
+ if (thd->variables.log_warnings > 2)
_ma_check_print(param, msg_type, msgbuf);
-
return;
}
@@ -1952,41 +1935,46 @@ int ha_maria::preload_keys(THD * thd, HA_CHECK_OPT *check_opt)
SYNOPSIS
disable_indexes()
- mode mode of operation:
- HA_KEY_SWITCH_NONUNIQ disable all non-unique keys
- HA_KEY_SWITCH_ALL disable all keys
- HA_KEY_SWITCH_NONUNIQ_SAVE dis. non-uni. and make persistent
- HA_KEY_SWITCH_ALL_SAVE dis. all keys and make persistent
- IMPLEMENTATION
- HA_KEY_SWITCH_NONUNIQ is not implemented.
- HA_KEY_SWITCH_ALL_SAVE is not implemented.
+ DESCRIPTION
+ See handler::ha_disable_indexes()
RETURN
0 ok
HA_ERR_WRONG_COMMAND mode not implemented.
*/
-int ha_maria::disable_indexes(uint mode)
+int ha_maria::disable_indexes(key_map map, bool persist)
{
int error;
- if (mode == HA_KEY_SWITCH_ALL)
+ if (!persist)
{
/* call a storage engine function to switch the key map */
+ DBUG_ASSERT(map.is_clear_all());
error= maria_disable_indexes(file);
}
- else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
+ else
{
- maria_extra(file, HA_EXTRA_NO_KEYS, 0);
+ /* auto-inc key cannot be disabled */
+ if (table->s->next_number_index < MAX_KEY)
+ DBUG_ASSERT(map.is_set(table->s->next_number_index));
+
+ /* unique keys cannot be disabled either */
+ for (uint i=0; i < table->s->keys; i++)
+ DBUG_ASSERT(!(table->key_info[i].flags & HA_NOSAME) || map.is_set(i));
+
+ ulonglong ullmap= map.to_ulonglong();
+
+ /* make sure auto-inc key is enabled even if it's > 64 */
+ if (map.length() > MARIA_KEYMAP_BITS &&
+ table->s->next_number_index < MAX_KEY)
+ maria_set_key_active(ullmap, table->s->next_number_index);
+
+ maria_extra(file, HA_EXTRA_NO_KEYS, &ullmap);
info(HA_STATUS_CONST); // Read new key info
error= 0;
}
- else
- {
- /* mode not implemented */
- error= HA_ERR_WRONG_COMMAND;
- }
return error;
}
@@ -1996,21 +1984,14 @@ int ha_maria::disable_indexes(uint mode)
SYNOPSIS
enable_indexes()
- mode mode of operation:
- HA_KEY_SWITCH_NONUNIQ enable all non-unique keys
- HA_KEY_SWITCH_ALL enable all keys
- HA_KEY_SWITCH_NONUNIQ_SAVE en. non-uni. and make persistent
- HA_KEY_SWITCH_ALL_SAVE en. all keys and make persistent
DESCRIPTION
Enable indexes, which might have been disabled by disable_index() before.
- The modes without _SAVE work only if both data and indexes are empty,
- since the MARIA repair would enable them persistently.
+ If persist=false, it works only if both data and indexes are empty,
+ since the Aria repair would enable them persistently.
To be sure in these cases, call handler::delete_all_rows() before.
- IMPLEMENTATION
- HA_KEY_SWITCH_NONUNIQ is not implemented.
- HA_KEY_SWITCH_ALL_SAVE is not implemented.
+ See also handler::ha_enable_indexes()
RETURN
0 ok
@@ -2019,18 +2000,19 @@ int ha_maria::disable_indexes(uint mode)
HA_ERR_WRONG_COMMAND mode not implemented.
*/
-int ha_maria::enable_indexes(uint mode)
+int ha_maria::enable_indexes(key_map map, bool persist)
{
int error;
ha_rows start_rows= file->state->records;
- DBUG_PRINT("info", ("ha_maria::enable_indexes mode: %d", mode));
+ DBUG_PRINT("info", ("ha_maria::enable_indexes mode: %d", persist));
if (maria_is_all_keys_active(file->s->state.key_map, file->s->base.keys))
{
/* All indexes are enabled already. */
return 0;
}
- if (mode == HA_KEY_SWITCH_ALL)
+ DBUG_ASSERT(map.is_prefix(table->s->keys));
+ if (!persist)
{
error= maria_enable_indexes(file);
/*
@@ -2039,7 +2021,7 @@ int ha_maria::enable_indexes(uint mode)
but mode==HA_KEY_SWITCH_ALL forbids it.
*/
}
- else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
+ else
{
THD *thd= table->in_use;
HA_CHECK *param= (HA_CHECK*) thd->alloc(sizeof *param);
@@ -2104,11 +2086,6 @@ int ha_maria::enable_indexes(uint mode)
info(HA_STATUS_CONST);
thd_proc_info(thd, save_proc_info);
}
- else
- {
- /* mode not implemented */
- error= HA_ERR_WRONG_COMMAND;
- }
DBUG_EXECUTE_IF("maria_flush_whole_log",
{
DBUG_PRINT("maria_flush_whole_log", ("now"));
@@ -2311,7 +2288,7 @@ int ha_maria::end_bulk_insert()
{
int first_error, first_errno= 0, error;
my_bool abort= file->s->deleting, empty_table= 0;
- uint enable_index_mode= HA_KEY_SWITCH_NONUNIQ_SAVE;
+ bool enable_persistently= true;
DBUG_ENTER("ha_maria::end_bulk_insert");
if ((first_error= maria_end_bulk_insert(file, abort)))
@@ -2340,7 +2317,7 @@ int ha_maria::end_bulk_insert()
first_error= 1;
first_errno= my_errno;
}
- enable_index_mode= HA_KEY_SWITCH_ALL;
+ enable_persistently= false;
empty_table= 1;
/*
Ignore all changed pages, required by _ma_renable_logging_for_table()
@@ -2352,7 +2329,7 @@ int ha_maria::end_bulk_insert()
if (!abort && can_enable_indexes)
{
- if ((error= enable_indexes(enable_index_mode)))
+ if ((error= enable_indexes(key_map(table->s->keys), enable_persistently)))
{
if (!first_error)
{
@@ -3361,6 +3338,8 @@ int ha_maria::create(const char *name, TABLE *table_arg,
if (ha_create_info->tmp_table())
{
create_flags|= HA_CREATE_TMP_TABLE | HA_CREATE_DELAY_KEY_WRITE;
+ if (ha_create_info->options & HA_LEX_CREATE_GLOBAL_TMP_TABLE)
+ create_flags|= HA_CREATE_GLOBAL_TMP_TABLE;
create_info.transactional= 0;
}
if (ha_create_info->options & HA_CREATE_KEEP_FILES)
@@ -3894,7 +3873,8 @@ static int ha_maria_init(void *p)
if (!aria_readonly)
res= maria_upgrade();
res= res || maria_init();
- tmp= ma_control_file_open(!aria_readonly, !aria_readonly, !aria_readonly);
+ tmp= ma_control_file_open(!aria_readonly, !aria_readonly, !aria_readonly,
+ control_file_open_flags);
res= res || aria_readonly ? tmp == CONTROL_FILE_LOCKED : tmp != 0;
res= res ||
((force_start_after_recovery_failures != 0 && !aria_readonly) &&
diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h
index 2b8b5dc9..41f64436 100644
--- a/storage/maria/ha_maria.h
+++ b/storage/maria/ha_maria.h
@@ -122,8 +122,8 @@ public:
int external_lock(THD * thd, int lock_type) override;
int start_stmt(THD *thd, thr_lock_type lock_type) override final;
int delete_all_rows(void) override final;
- int disable_indexes(uint mode) override final;
- int enable_indexes(uint mode) override final;
+ int disable_indexes(key_map map, bool persist) override final;
+ int enable_indexes(key_map map, bool persist) override final;
int indexes_are_disabled(void) override final;
void start_bulk_insert(ha_rows rows, uint flags) override final;
int end_bulk_insert() override final;
diff --git a/storage/maria/ma_bitmap.c b/storage/maria/ma_bitmap.c
index 61fe4f9d..91f93755 100644
--- a/storage/maria/ma_bitmap.c
+++ b/storage/maria/ma_bitmap.c
@@ -232,7 +232,7 @@ 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);
+ myf flag= MY_WME | share->malloc_flag;
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 */
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 543ddcca..561cc324 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -488,7 +488,7 @@ 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);
+ myf flag= MY_WME | share->malloc_flag;
uint default_extents;
DBUG_ENTER("_ma_init_block_record");
@@ -2654,7 +2654,6 @@ 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;
@@ -2721,7 +2720,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, myflag))
+ row->head_length, MY_WME | share->malloc_flag))
DBUG_RETURN(1);
tmp_data_used= 0; /* Either 0 or last used uchar in 'data' */
@@ -4750,7 +4749,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);
+ myf myflag= MY_WME | share->malloc_flag;
DBUG_ENTER("_ma_read_block_record2");
start_of_data= data;
@@ -5089,7 +5088,6 @@ 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,
@@ -5113,7 +5111,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, myflag))
+ row_extents_size, MY_WME | share->malloc_flag))
DBUG_RETURN(1);
memcpy(info->cur_row.extents, data, ROW_EXTENT_SIZE);
data+= ROW_EXTENT_SIZE;
@@ -5283,7 +5281,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);
+ myf flag= MY_WME | share->malloc_flag;
DBUG_ENTER("_ma_scan_init_block_record");
DBUG_ASSERT(info->dfile.file == share->bitmap.file.file);
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 1f6aa2ee..e4ba0726 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -125,6 +125,7 @@ void maria_chk_init(HA_CHECK *param)
param->max_stage= 1;
param->stack_end_ptr= &my_thread_var->stack_ends_here;
param->max_allowed_lsn= (LSN) ~0ULL;
+ /* Flag when initializing buffers possible used by parallel repair threads */
param->malloc_flags= MY_THREAD_SPECIFIC;
}
@@ -1305,7 +1306,6 @@ 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;
@@ -1413,7 +1413,8 @@ 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, myflag))
+ share->base.extra_rec_buff_size,
+ MY_WME | share->malloc_flag))
{
_ma_check_print_error(param,
@@ -2130,7 +2131,7 @@ int maria_chk_data_link(HA_CHECK *param, MARIA_HA *info, my_bool extend)
if (!(record= (uchar*) my_malloc(PSI_INSTRUMENT_ME,
share->base.default_rec_buff_size,
- MYF(param->malloc_flags))))
+ MYF(MY_THREAD_SPECIFIC))))
{
_ma_check_print_error(param,"Not enough memory for record");
DBUG_RETURN(-1);
@@ -2507,6 +2508,11 @@ static int initialize_variables_for_repair(HA_CHECK *param,
maria_versioning(info, 0);
/* remember original number of rows */
*info->state= info->s->state.state;
+ if (share->data_file_type == BLOCK_RECORD)
+ share->state.state.data_file_length= MY_ALIGN(sort_info->filelength,
+ share->block_size);
+ else
+ share->state.state.data_file_length= sort_info->filelength;
return 0;
}
@@ -2743,7 +2749,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
READ_CACHE, share->pack.header_length, 1, MYF(MY_WME)))
goto err;
}
- if (sort_info.new_info->s->data_file_type != BLOCK_RECORD)
+ if (!block_record)
{
/* When writing to not block records, we need a write buffer */
if (!rep_quick)
@@ -2756,7 +2762,7 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
sort_info.new_info->opt_flag|=WRITE_CACHE_USED;
}
}
- else if (block_record)
+ else
{
scan_inited= 1;
if (maria_scan_init(sort_info.info))
@@ -2766,10 +2772,10 @@ int maria_repair(HA_CHECK *param, register MARIA_HA *info,
if (!(sort_param.record=
(uchar *) my_malloc(PSI_INSTRUMENT_ME, (uint)
share->base.default_rec_buff_size,
- MYF(param->malloc_flags))) ||
+ MYF(MY_THREAD_SPECIFIC))) ||
_ma_alloc_buffer(&sort_param.rec_buff, &sort_param.rec_buff_size,
share->base.default_rec_buff_size,
- MYF(param->malloc_flags)))
+ MYF(MY_THREAD_SPECIFIC)))
{
_ma_check_print_error(param, "Not enough memory for extra record");
goto err;
@@ -3389,7 +3395,7 @@ static int sort_one_index(HA_CHECK *param, MARIA_HA *info,
length= page.size;
bzero(buff+length,keyinfo->block_length-length);
if (write_page(share, new_file, buff, keyinfo->block_length,
- new_page_pos, MYF(MY_NABP | MY_WAIT_IF_FULL)))
+ new_page_pos, MYF(MY_NABP | MY_WAIT_IF_FULL) & param->myf_rw))
{
_ma_check_print_error(param,"Can't write indexblock, error: %d",my_errno);
goto err;
@@ -3721,7 +3727,7 @@ int maria_filecopy(HA_CHECK *param, File to,File from,my_off_t start,
buff_length=(ulong) MY_MIN(param->write_buffer_length,length);
if (!(buff=my_malloc(PSI_INSTRUMENT_ME, buff_length,
- MYF(param->malloc_flags))))
+ MYF(MY_THREAD_SPECIFIC))))
{
buff=tmp_buff; buff_length=IO_SIZE;
}
@@ -3867,10 +3873,10 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
if (!(sort_param.record=
(uchar*) my_malloc(PSI_INSTRUMENT_ME,
(size_t) share->base.default_rec_buff_size,
- MYF(param->malloc_flags))) ||
+ MYF(MY_THREAD_SPECIFIC))) ||
_ma_alloc_buffer(&sort_param.rec_buff, &sort_param.rec_buff_size,
share->base.default_rec_buff_size,
- MYF(param->malloc_flags)))
+ MYF(MY_THREAD_SPECIFIC)))
{
_ma_check_print_error(param, "Not enough memory for extra record");
goto err;
@@ -3889,7 +3895,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
sort_param.wordlist=NULL;
init_alloc_root(PSI_INSTRUMENT_ME, &sort_param.wordroot,
FTPARSER_MEMROOT_ALLOC_SIZE, 0,
- MYF(param->malloc_flags));
+ MYF(MY_THREAD_SPECIFIC));
sort_param.key_cmp=sort_key_cmp;
sort_param.lock_in_memory=maria_lock_memory;
@@ -4109,6 +4115,9 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
_ma_check_print_error(param, "Couldn't change to new data file");
goto err;
}
+ /* Inform sort_delete_record that we are using the new file */
+ sort_info.new_info->dfile.file= info->rec_cache.file= info->dfile.file;
+
if (param->testflag & T_UNPACK)
restore_data_file_type(share);
@@ -4457,7 +4466,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
if (!(sort_param=(MARIA_SORT_PARAM *)
my_malloc(PSI_INSTRUMENT_ME, (uint) share->base.keys *
(sizeof(MARIA_SORT_PARAM) + share->base.pack_reclength),
- MYF(MY_ZEROFILL | param->malloc_flags))))
+ MYF(MY_ZEROFILL | MY_THREAD_SPECIFIC))))
{
_ma_check_print_error(param,"Not enough memory for key!");
goto err;
@@ -4515,9 +4524,10 @@ 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));
+ /* These buffers are per thread */
if (_ma_alloc_buffer(&sort_param[i].rec_buff, &sort_param[i].rec_buff_size,
share->base.default_rec_buff_size,
- MYF(param->malloc_flags)))
+ MYF(0)))
{
_ma_check_print_error(param,"Not enough memory!");
goto err;
@@ -4546,7 +4556,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
sort_param[i].key_length+=ft_max_word_len_for_sort-HA_FT_MAXBYTELEN;
init_alloc_root(PSI_INSTRUMENT_ME, &sort_param[i].wordroot,
FTPARSER_MEMROOT_ALLOC_SIZE, 0,
- MYF(param->malloc_flags));
+ MYF(MY_THREAD_SPECIFIC));
}
}
sort_info.total_keys=i;
@@ -6105,7 +6115,7 @@ static MA_SORT_KEY_BLOCKS *alloc_key_blocks(HA_CHECK *param, uint blocks,
if (!(block= (MA_SORT_KEY_BLOCKS*)
my_malloc(PSI_INSTRUMENT_ME,
(sizeof(MA_SORT_KEY_BLOCKS)+buffer_length+IO_SIZE)*blocks,
- MYF(param->malloc_flags))))
+ MYF(MY_THREAD_SPECIFIC))))
{
_ma_check_print_error(param,"Not enough memory for sort-key-blocks");
return(0);
diff --git a/storage/maria/ma_control_file.c b/storage/maria/ma_control_file.c
index 21befb70..03513c46 100644
--- a/storage/maria/ma_control_file.c
+++ b/storage/maria/ma_control_file.c
@@ -272,7 +272,8 @@ static int lock_control_file(const char *name, my_bool do_retry)
CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
my_bool print_error,
- my_bool wait_for_lock)
+ my_bool wait_for_lock,
+ int open_flags)
{
uchar buffer[CF_MAX_SIZE];
char name[FN_REFLEN], errmsg_buff[256];
@@ -280,7 +281,6 @@ CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
" file is probably in use by another process";
uint new_cf_create_time_size, new_cf_changeable_size, new_block_size;
my_off_t file_size;
- int open_flags= O_BINARY | /*O_DIRECT |*/ O_RDWR | O_CLOEXEC;
int error= CONTROL_FILE_UNKNOWN_ERROR;
DBUG_ENTER("ma_control_file_open");
@@ -460,6 +460,15 @@ err:
DBUG_RETURN(error);
}
+/*
+ The most common way to open the control file when writing tests
+*/
+
+CONTROL_FILE_ERROR ma_control_file_open_or_create()
+{
+ return ma_control_file_open(TRUE, TRUE, TRUE,
+ control_file_open_flags);
+}
/*
Write information durably to the control file; stores this information into
@@ -630,7 +639,7 @@ my_bool print_aria_log_control()
int error= CONTROL_FILE_UNKNOWN_ERROR;
uint recovery_fails;
File file;
- DBUG_ENTER("ma_control_file_open");
+ DBUG_ENTER("print_aria_log_control");
if (fn_format(name, CONTROL_FILE_BASE_NAME,
maria_data_root, "", MYF(MY_WME)) == NullS)
diff --git a/storage/maria/ma_control_file.h b/storage/maria/ma_control_file.h
index 40428f66..b2b95e36 100644
--- a/storage/maria/ma_control_file.h
+++ b/storage/maria/ma_control_file.h
@@ -68,10 +68,13 @@ typedef enum enum_control_file_error {
CONTROL_FILE_ERROR ma_control_file_open(my_bool create_if_missing,
my_bool print_error,
- my_bool wait_for_lock);
+ my_bool wait_for_lock,
+ int open_flags);
int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg,
uint32 last_logno_arg, TrID max_trid_arg,
uint8 recovery_failures_arg);
+/* For simple programs that creates Aria files*/
+CONTROL_FILE_ERROR ma_control_file_open_or_create();
int ma_control_file_end(void);
my_bool ma_control_file_inited(void);
my_bool print_aria_log_control(void);
diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c
index 7fd739d1..9ce48ae9 100644
--- a/storage/maria/ma_create.c
+++ b/storage/maria/ma_create.c
@@ -101,7 +101,7 @@ int maria_create(const char *name, enum data_file_type datafile_type,
DBUG_ASSERT(maria_inited);
- if (flags & HA_CREATE_TMP_TABLE)
+ if ((flags & HA_CREATE_TMP_TABLE) && !(flags & HA_CREATE_GLOBAL_TMP_TABLE))
common_flag|= MY_THREAD_SPECIFIC;
if (!ci)
diff --git a/storage/maria/ma_dynrec.c b/storage/maria/ma_dynrec.c
index 33f238d9..fed1bf41 100644
--- a/storage/maria/ma_dynrec.c
+++ b/storage/maria/ma_dynrec.c
@@ -1488,7 +1488,6 @@ int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
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)
@@ -1525,7 +1524,8 @@ int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf,
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
- share->base.extra_rec_buff_size, flag))
+ share->base.extra_rec_buff_size,
+ MY_WME | share->malloc_flag))
goto err;
}
to= info->rec_buff;
@@ -1784,7 +1784,6 @@ 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
@@ -1875,7 +1874,8 @@ int _ma_read_rnd_dynamic_record(MARIA_HA *info,
{
if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size,
block_info.rec_len +
- share->base.extra_rec_buff_size, flag))
+ share->base.extra_rec_buff_size,
+ MY_WME | share->malloc_flag))
goto err;
}
to= info->rec_buff;
diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c
index 425cb421..9ffc551c 100644
--- a/storage/maria/ma_extra.c
+++ b/storage/maria/ma_extra.c
@@ -239,25 +239,17 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
break;
/* we're going to modify pieces of the state, stall Checkpoint */
- mysql_mutex_lock(&share->intern_lock);
if (info->lock_type == F_UNLCK)
{
- mysql_mutex_unlock(&share->intern_lock);
error= 1; /* Not possibly if not lock */
break;
}
+ mysql_mutex_lock(&share->intern_lock);
if (maria_is_any_key_active(share->state.key_map))
{
- MARIA_KEYDEF *key= share->keyinfo;
- uint i;
- for (i =0 ; i < share->base.keys ; i++,key++)
- {
- if (!(key->flag & HA_NOSAME) && info->s->base.auto_key != i+1)
- {
- maria_clear_key_active(share->state.key_map, i);
- info->update|= HA_STATE_CHANGED;
- }
- }
+ if (share->state.key_map != *(ulonglong*)extra_arg)
+ info->update|= HA_STATE_CHANGED;
+ share->state.key_map= *(ulonglong*)extra_arg;
if (!share->changed)
{
@@ -542,7 +534,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);
+ myf flag= MY_WME | share->malloc_flag;
DBUG_ENTER("maria_reset");
/*
Free buffers and reset the following flags:
@@ -601,6 +593,20 @@ uint _ma_file_callback_to_id(void *callback_data)
return share ? share->id : 0;
}
+/*
+ Disable MY_WAIT_IF_FULL flag for temporary tables
+
+ Temporary tables does not have MY_WAIT_IF_FULL in share->write_flags
+*/
+
+uint _ma_write_flags_callback(void *callback_data, myf flags)
+{
+ MARIA_SHARE *share= (MARIA_SHARE*) callback_data;
+ if (share)
+ flags&= ~(~share->write_flag & MY_WAIT_IF_FULL);
+ return flags;
+}
+
/**
@brief flushes the data and/or index file of a table
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index bfeb5e0c..05347b2d 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -1099,10 +1099,6 @@ static TRANSLOG_FILE *get_current_logfile()
uchar maria_trans_file_magic[]=
{ (uchar) 254, (uchar) 254, (uchar) 11, '\001', 'M', 'A', 'R', 'I', 'A',
'L', 'O', 'G' };
-#define LOG_HEADER_DATA_SIZE (sizeof(maria_trans_file_magic) + \
- 8 + 4 + 4 + 4 + 2 + 3 + \
- LSN_STORE_SIZE)
-
/*
Write log file page header in the just opened new log file
@@ -3605,6 +3601,9 @@ static my_bool translog_is_LSN_chunk(uchar type)
@retval 1 Error
*/
+/* Stack size 26120 from clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
my_bool translog_init_with_table(const char *directory,
uint32 log_file_max_size,
uint32 server_version,
@@ -4238,6 +4237,7 @@ err:
ma_message_no_user(0, "log initialization failed");
DBUG_RETURN(1);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/*
diff --git a/storage/maria/ma_loghandler.h b/storage/maria/ma_loghandler.h
index 3e5c58a8..db592adf 100644
--- a/storage/maria/ma_loghandler.h
+++ b/storage/maria/ma_loghandler.h
@@ -534,5 +534,13 @@ typedef enum
} enum_maria_sync_log_dir;
extern ulong sync_log_dir;
+/* sizeof(maria_trans_file_magic) */
+#define LOG_MAGIC_SIZE 12
+#define LOG_HEADER_DATA_SIZE (LOG_MAGIC_SIZE + \
+ 8 + 4 + 4 + 4 + 2 + 3 + \
+ LSN_STORE_SIZE)
+/* Flags when creating aria_log_control */
+#define control_file_open_flags (O_BINARY | /*O_DIRECT |*/ O_RDWR | O_CLOEXEC)
+
C_MODE_END
#endif
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index ad98a534..35578877 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -94,7 +94,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);
+ myf flag= MY_WME | share->malloc_flag;
DBUG_ENTER("maria_clone_internal");
errpos= 0;
@@ -171,7 +171,6 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share,
mysql_mutex_lock(&share->intern_lock);
info.read_record= share->read_record;
share->reopen++;
- share->write_flag=MYF(MY_NABP | MY_WAIT_IF_FULL);
if (share->options & HA_OPTION_READ_ONLY_DATA)
{
info.lock_type=F_RDLCK;
@@ -266,7 +265,9 @@ 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;
+ myf common_flag= (((open_flags & HA_OPEN_TMP_TABLE) &&
+ !(open_flags & HA_OPEN_GLOBAL_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],
@@ -984,11 +985,13 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags,
share->options|= HA_OPTION_READ_ONLY_DATA;
share->is_log_table= FALSE;
+ share->write_flag=MYF(MY_NABP | MY_WAIT_IF_FULL);
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->malloc_flag=
+ (open_flags & HA_OPEN_GLOBAL_TMP_TABLE) ? 0 : MY_THREAD_SPECIFIC;
share->write_flag=MYF(MY_NABP);
share->w_locks++; /* We don't have to update status */
share->tot_locks++;
@@ -1555,6 +1558,9 @@ uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite)
@retval 1 Error
*/
+/* Stack size 26376 from clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
uint _ma_state_info_write_sub(File file, MARIA_STATE_INFO *state, uint pWrite)
{
uchar buff[MARIA_STATE_INFO_SIZE + MARIA_STATE_EXTRA_SIZE];
@@ -1629,6 +1635,7 @@ uint _ma_state_info_write_sub(File file, MARIA_STATE_INFO *state, uint pWrite)
MYF(MY_NABP));
DBUG_RETURN(res != 0);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
static uchar *_ma_state_info_read(uchar *ptr, MARIA_STATE_INFO *state, myf flag)
@@ -2046,9 +2053,8 @@ void _ma_set_index_pagecache_callbacks(PAGECACHE_FILE *file,
int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share)
{
- myf flags= (share->mode & O_NOFOLLOW) ? MY_NOSYMLINKS | MY_WME : MY_WME;
- if (share->temporary)
- flags|= MY_THREAD_SPECIFIC;
+ myf flags= ((share->mode & O_NOFOLLOW) ? MY_NOSYMLINKS | MY_WME : MY_WME) |
+ share->malloc_flag;
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 19783423..57926ee4 100644
--- a/storage/maria/ma_packrec.c
+++ b/storage/maria/ma_packrec.c
@@ -1417,7 +1417,6 @@ 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)
{
@@ -1444,7 +1443,8 @@ 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 +
- share->base.extra_rec_buff_size, flag))
+ share->base.extra_rec_buff_size,
+ MY_WME | share->malloc_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;
@@ -1586,7 +1586,6 @@ _ma_mempack_get_block_info(MARIA_HA *maria,
uchar *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);
@@ -1596,7 +1595,8 @@ _ma_mempack_get_block_info(MARIA_HA *maria,
&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 + share->base.extra_rec_buff_size, flag))
+ info->blob_len + share->base.extra_rec_buff_size,
+ MY_WME | share->malloc_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 144b10a8..49981e79 100644
--- a/storage/maria/ma_pagecache.c
+++ b/storage/maria/ma_pagecache.c
@@ -687,6 +687,8 @@ static my_bool pagecache_fwrite(PAGECACHE *pagecache,
/* FIXME: ENGINE=Aria occasionally writes uninitialized data */
__msan_unpoison(args.page, pagecache->block_size);
#endif
+ /* Reset MY_WAIT_IF_FULL for temporary tables */
+ flags= _ma_write_flags_callback(filedesc->callback_data, flags);
res= (int)my_pwrite(filedesc->file, args.page, pagecache->block_size,
((my_off_t) pageno << pagecache->shift), flags);
(*filedesc->post_write_hook)(res, &args);
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c
index 006c8bef..df9b2024 100644
--- a/storage/maria/ma_recovery.c
+++ b/storage/maria/ma_recovery.c
@@ -1163,11 +1163,12 @@ end:
/*
The record may come from REPAIR, ALTER TABLE ENABLE KEYS, OPTIMIZE.
*/
+
prototype_redo_exec_hook(REDO_REPAIR_TABLE)
{
int error= 1;
MARIA_HA *info;
- HA_CHECK param;
+ HA_CHECK *param;
char *name;
my_bool quick_repair;
DBUG_ENTER("exec_REDO_LOGREC_REDO_REPAIR_TABLE");
@@ -1199,35 +1200,39 @@ prototype_redo_exec_hook(REDO_REPAIR_TABLE)
*/
tprint(tracef, " repairing...\n");
- maria_chk_init(&param);
- param.isam_file_name= name= info->s->open_file_name.str;
- param.testflag= uint8korr(rec->header + FILEID_STORE_SIZE);
- param.tmpdir= maria_tmpdir;
- param.max_trid= max_long_trid;
+ if (!(param= my_malloc(PSI_INSTRUMENT_ME, sizeof(*param), MYF(MY_WME))))
+ DBUG_RETURN(0);
+
+ maria_chk_init(param);
+ param->isam_file_name= name= info->s->open_file_name.str;
+ param->testflag= uint8korr(rec->header + FILEID_STORE_SIZE);
+ param->tmpdir= maria_tmpdir;
+ param->max_trid= max_long_trid;
DBUG_ASSERT(maria_tmpdir);
info->s->state.key_map= uint8korr(rec->header + FILEID_STORE_SIZE + 8);
- quick_repair= MY_TEST(param.testflag & T_QUICK);
+ quick_repair= MY_TEST(param->testflag & T_QUICK);
- if (param.testflag & T_REP_PARALLEL)
+ if (param->testflag & T_REP_PARALLEL)
{
- if (maria_repair_parallel(&param, info, name, quick_repair))
+ if (maria_repair_parallel(param, info, name, quick_repair))
goto end;
}
- else if (param.testflag & T_REP_BY_SORT)
+ else if (param->testflag & T_REP_BY_SORT)
{
- if (maria_repair_by_sort(&param, info, name, quick_repair))
+ if (maria_repair_by_sort(param, info, name, quick_repair))
goto end;
}
- else if (maria_repair(&param, info, name, quick_repair))
+ else if (maria_repair(param, info, name, quick_repair))
goto end;
if (_ma_update_state_lsns(info->s, rec->lsn, trnman_get_min_safe_trid(),
- TRUE, !(param.testflag & T_NO_CREATE_RENAME_LSN)))
+ TRUE, !(param->testflag & T_NO_CREATE_RENAME_LSN)))
goto end;
error= 0;
end:
+ my_free(param);
DBUG_RETURN(error);
}
@@ -2579,6 +2584,8 @@ prototype_undo_exec_hook(UNDO_BULK_INSERT)
return error;
}
+/* Stack size 18776 in clang. Ok as this is during recover */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
static int run_redo_phase(LSN lsn, LSN lsn_end, enum maria_apply_log_way apply)
{
@@ -2822,6 +2829,7 @@ err:
translog_free_record_header(&rec);
DBUG_RETURN(1);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/**
diff --git a/storage/maria/ma_rt_test.c b/storage/maria/ma_rt_test.c
index 3af7d938..17145231 100644
--- a/storage/maria/ma_rt_test.c
+++ b/storage/maria/ma_rt_test.c
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
if (maria_init() ||
(init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0,
maria_block_size, 0, MY_WME) == 0) ||
- ma_control_file_open(TRUE, TRUE, TRUE) ||
+ ma_control_file_open_or_create() ||
(init_pagecache(maria_log_pagecache,
TRANSLOG_PAGECACHE_SIZE, 0, 0,
TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) ||
diff --git a/storage/maria/ma_test1.c b/storage/maria/ma_test1.c
index 22f80ca2..a14679d3 100644
--- a/storage/maria/ma_test1.c
+++ b/storage/maria/ma_test1.c
@@ -81,7 +81,7 @@ int main(int argc,char *argv[])
if (maria_init() ||
(init_pagecache(maria_pagecache, maria_block_size * 16, 0, 0,
maria_block_size, 0, MY_WME) == 0) ||
- ma_control_file_open(TRUE, TRUE, TRUE) ||
+ ma_control_file_open_or_create() ||
(init_pagecache(maria_log_pagecache,
TRANSLOG_PAGECACHE_SIZE, 0, 0,
TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) ||
diff --git a/storage/maria/ma_test2.c b/storage/maria/ma_test2.c
index 66284653..400e6193 100644
--- a/storage/maria/ma_test2.c
+++ b/storage/maria/ma_test2.c
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
if (maria_init() ||
(init_pagecache(maria_pagecache, pagecache_size, 0, 0,
maria_block_size, 0, MY_WME) == 0) ||
- ma_control_file_open(TRUE, TRUE, TRUE) ||
+ ma_control_file_open_or_create() ||
(init_pagecache(maria_log_pagecache,
TRANSLOG_PAGECACHE_SIZE, 0, 0,
TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) ||
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index 91e1b10a..b12f21e3 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -754,6 +754,11 @@ typedef struct st_maria_share
ulong max_pack_length;
ulong state_diff_length;
uint rec_reflength; /* rec_reflength in use now */
+ /*
+ Extra flag to use for my_malloc(); set to MY_THREAD_SPECIFIC for temporary
+ tables whose memory allocation should be accounted to the current THD.
+ */
+ uint malloc_flag;
uint keypage_header;
uint32 ftkeys; /* Number of distinct full-text keys
+ 1 */
@@ -1740,6 +1745,7 @@ extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx);
extern my_bool ma_killed_standalone(MARIA_HA *);
extern uint _ma_file_callback_to_id(void *callback_data);
+extern uint _ma_write_flags_callback(void *callback_data, myf flags);
extern void free_maria_share(MARIA_SHARE *share);
static inline void unmap_file(MARIA_HA *info __attribute__((unused)))
diff --git a/storage/maria/test_ma_backup.c b/storage/maria/test_ma_backup.c
index c57ec6ec..5cb2b074 100644
--- a/storage/maria/test_ma_backup.c
+++ b/storage/maria/test_ma_backup.c
@@ -47,7 +47,7 @@ int main(int argc __attribute__((unused)), char *argv[])
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, TRUE) ||
+ ma_control_file_open_or_create() ||
(init_pagecache(maria_log_pagecache,
TRANSLOG_PAGECACHE_SIZE, 0, 0,
TRANSLOG_PAGE_SIZE, 0, MY_WME) == 0) ||
diff --git a/storage/maria/unittest/CMakeLists.txt b/storage/maria/unittest/CMakeLists.txt
index a2da1507..a7b34410 100644
--- a/storage/maria/unittest/CMakeLists.txt
+++ b/storage/maria/unittest/CMakeLists.txt
@@ -15,7 +15,7 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/unittest/mytap)
-LINK_LIBRARIES(aria myisam mytap mysys dbug strings ${ZLIB_LIBRARY})
+LINK_LIBRARIES(aria myisam mytap mysys dbug strings ${ZLIB_LIBRARIES})
MY_ADD_TESTS(ma_control_file trnman)
diff --git a/storage/maria/unittest/ma_control_file-t.c b/storage/maria/unittest/ma_control_file-t.c
index 859d5514..fdbe86de 100644
--- a/storage/maria/unittest/ma_control_file-t.c
+++ b/storage/maria/unittest/ma_control_file-t.c
@@ -114,7 +114,7 @@ static CONTROL_FILE_ERROR local_ma_control_file_open(void)
{
CONTROL_FILE_ERROR error;
error_handler_hook= my_ignore_message;
- error= ma_control_file_open(TRUE, TRUE, TRUE);
+ error= ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags);
error_handler_hook= default_error_handler_hook;
return error;
}
diff --git a/storage/maria/unittest/ma_test_loghandler-t.c b/storage/maria/unittest/ma_test_loghandler-t.c
index ccda66af..0a1d396e 100644
--- a/storage/maria/unittest/ma_test_loghandler-t.c
+++ b/storage/maria/unittest/ma_test_loghandler-t.c
@@ -143,6 +143,8 @@ static my_bool read_and_check_content(TRANSLOG_HEADER_BUFFER *rec,
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int main(int argc __attribute__((unused)), char *argv[])
{
uint32 i;
@@ -197,7 +199,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
@@ -664,5 +666,6 @@ err:
my_end(0);
return(MY_TEST(exit_status()));
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
#include "../ma_check_standalone.h"
diff --git a/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c b/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c
index 21f6b7d7..5c4045cc 100644
--- a/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_first_lsn-t.c
@@ -66,7 +66,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE,TRUE))
+ if (ma_control_file_open(TRUE, TRUE,TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c b/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
index 391d7851..eedeb9d7 100644
--- a/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
@@ -64,7 +64,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
index e8e114dd..b0e1be8f 100644
--- a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
@@ -280,7 +280,7 @@ int main(int argc __attribute__((unused)), char *argv[])
bzero(long_tr_id, 6);
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
@@ -443,7 +443,7 @@ int main(int argc __attribute__((unused)), char *argv[])
end_pagecache(&pagecache, 1);
ma_control_file_end();
- if (ma_control_file_open(TRUE,TRUE,TRUE))
+ if (ma_control_file_open(TRUE,TRUE,TRUE, control_file_open_flags))
{
fprintf(stderr, "pass2: Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_multithread-t.c b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
index be6046ab..9b7e239b 100644
--- a/storage/maria/unittest/ma_test_loghandler_multithread-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
@@ -331,7 +331,7 @@ int main(int argc __attribute__((unused)),
exit(1);
}
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_noflush-t.c b/storage/maria/unittest/ma_test_loghandler_noflush-t.c
index 46b3a8e7..28cac2ee 100644
--- a/storage/maria/unittest/ma_test_loghandler_noflush-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_noflush-t.c
@@ -65,7 +65,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_nologs-t.c b/storage/maria/unittest/ma_test_loghandler_nologs-t.c
index b95d8bee..a7c526b2 100644
--- a/storage/maria/unittest/ma_test_loghandler_nologs-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_nologs-t.c
@@ -66,7 +66,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
@@ -139,7 +139,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
}
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
index 892a773b..4ecc8f1f 100644
--- a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
@@ -69,7 +69,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/maria/unittest/ma_test_loghandler_purge-t.c b/storage/maria/unittest/ma_test_loghandler_purge-t.c
index 07b50f19..b26a2f99 100644
--- a/storage/maria/unittest/ma_test_loghandler_purge-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_purge-t.c
@@ -67,7 +67,7 @@ int main(int argc __attribute__((unused)), char *argv[])
}
#endif
- if (ma_control_file_open(TRUE, TRUE, TRUE))
+ if (ma_control_file_open(TRUE, TRUE, TRUE, control_file_open_flags))
{
fprintf(stderr, "Can't init control file (%d)\n", errno);
exit(1);
diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt
index bea0eecc..4553fd43 100644
--- a/storage/mroonga/CMakeLists.txt
+++ b/storage/mroonga/CMakeLists.txt
@@ -57,6 +57,11 @@ if(MRN_BUNDLED)
"${PLUGIN_MROONGA}" STREQUAL "NO")
return()
endif()
+ if(WITHOUT_DYNAMIC_PLUGINS)
+ if(NOT (PLUGIN_MROONGA STREQUAL STATIC))
+ return()
+ endif()
+ endif()
endif()
set(MRN_BUNDLED_GROONGA_RELATIVE_DIR "vendor/groonga")
diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp
index a176ccf3..d5f150de 100644
--- a/storage/mroonga/ha_mroonga.cpp
+++ b/storage/mroonga/ha_mroonga.cpp
@@ -4351,9 +4351,9 @@ int ha_mroonga::wrapper_open(const char *name, int mode, uint open_options)
// TODO: implemented by "reindex" instead of "remove and recreate".
// Because "remove and recreate" invalidates opened indexes by
// other threads.
- error = wrapper_disable_indexes_mroonga(HA_KEY_SWITCH_ALL);
+ error = wrapper_disable_indexes_mroonga(key_map(table->s->keys), false);
if (!error) {
- error = wrapper_enable_indexes_mroonga(HA_KEY_SWITCH_ALL);
+ error = wrapper_enable_indexes_mroonga(key_map(table->s->keys), false);
}
}
}
@@ -13639,197 +13639,184 @@ int ha_mroonga::generic_disable_index(int i, KEY *key_info)
DBUG_RETURN(error);
}
-int ha_mroonga::wrapper_disable_indexes_mroonga(uint mode)
+int ha_mroonga::wrapper_disable_indexes_mroonga(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
- if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) {
- uint i;
- for (i = 0; i < table_share->keys; i++) {
- if (i == table->s->primary_key) {
- continue;
- }
- if (share->wrap_key_nr[i] < MAX_KEY) {
- continue;
- }
- if (!grn_index_tables[i]) {
- DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i));
- DBUG_RETURN(0);
- }
+ uint i;
+ for (i = 0; i < table_share->keys; i++) {
+ if (i == table->s->primary_key) {
+ continue;
+ }
+ if (share->wrap_key_nr[i] < MAX_KEY) {
+ continue;
+ }
+ if (!grn_index_tables[i]) {
+ DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i));
+ DBUG_RETURN(0);
+ }
+ }
+ KEY *key_info = table_share->key_info;
+ for (i = 0; i < table_share->keys; i++) {
+ if (!(key_info[i].flags & HA_FULLTEXT) &&
+ !mrn_is_geo_key(&key_info[i])) {
+ continue;
}
- KEY *key_info = table_share->key_info;
- for (i = 0; i < table_share->keys; i++) {
- if (!(key_info[i].flags & HA_FULLTEXT) &&
- !mrn_is_geo_key(&key_info[i])) {
- continue;
- }
- int sub_error = generic_disable_index(i, key_info);
- if (error != 0 && sub_error != 0) {
- error = sub_error;
- }
+ int sub_error = generic_disable_index(i, key_info);
+ if (error != 0 && sub_error != 0) {
+ error = sub_error;
}
- } else {
- error = HA_ERR_WRONG_COMMAND;
}
DBUG_RETURN(error);
}
-int ha_mroonga::wrapper_disable_indexes(uint mode)
+int ha_mroonga::wrapper_disable_indexes(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
- error = wrap_handler->ha_disable_indexes(mode);
+ error = wrap_handler->ha_disable_indexes(map, persist);
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
if (error == HA_ERR_WRONG_COMMAND) {
error = 0;
}
if (!error) {
- error = wrapper_disable_indexes_mroonga(mode);
+ error = wrapper_disable_indexes_mroonga(map, persist);
}
DBUG_RETURN(error);
}
-int ha_mroonga::storage_disable_indexes(uint mode)
+int ha_mroonga::storage_disable_indexes(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
- if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) {
- uint i;
- for (i = 0; i < table_share->keys; i++) {
- if (i == table->s->primary_key) {
- continue;
- }
- if (!grn_index_tables[i]) {
- DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i));
- DBUG_RETURN(0);
- }
+ uint i;
+ for (i = 0; i < table_share->keys; i++) {
+ if (i == table->s->primary_key) {
+ continue;
+ }
+ if (!grn_index_tables[i]) {
+ DBUG_PRINT("info", ("mroonga: keys are disabled already %u", i));
+ DBUG_RETURN(0);
+ }
+ }
+ KEY *key_info = table_share->key_info;
+ for (i = 0; i < table_share->keys; i++) {
+ if (i == table->s->primary_key) {
+ continue;
+ }
+ if (map.is_set(i)) {
+ continue;
}
- KEY *key_info = table_share->key_info;
- for (i = 0; i < table_share->keys; i++) {
- if (i == table->s->primary_key) {
- continue;
- }
- if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE &&
- (key_info[i].flags & HA_NOSAME)) {
- continue;
- }
- int sub_error = generic_disable_index(i, key_info);
- if (error != 0 && sub_error != 0) {
- error = sub_error;
- }
+ int sub_error = generic_disable_index(i, key_info);
+ if (error != 0 && sub_error != 0) {
+ error = sub_error;
}
- } else {
- DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
DBUG_RETURN(error);
}
-int ha_mroonga::disable_indexes(uint mode)
+int ha_mroonga::disable_indexes(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
if (share->wrapper_mode)
{
- error = wrapper_disable_indexes(mode);
+ error = wrapper_disable_indexes(map, persist);
} else {
- error = storage_disable_indexes(mode);
+ error = storage_disable_indexes(map, persist);
}
DBUG_RETURN(error);
}
-int ha_mroonga::wrapper_enable_indexes_mroonga(uint mode)
+int ha_mroonga::wrapper_enable_indexes_mroonga(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
- if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) {
- uint i, j;
- for (i = 0; i < table_share->keys; i++) {
- if (i == table->s->primary_key) {
- continue;
- }
- if (share->wrap_key_nr[i] < MAX_KEY) {
- continue;
- }
- if (!grn_index_columns[i]) {
- break;
- }
+ uint i, j;
+ for (i = 0; i < table_share->keys; i++) {
+ if (i == table->s->primary_key) {
+ continue;
}
- if (i == table_share->keys) {
- DBUG_PRINT("info", ("mroonga: keys are enabled already"));
- DBUG_RETURN(0);
+ if (share->wrap_key_nr[i] < MAX_KEY) {
+ continue;
+ }
+ if (!grn_index_columns[i]) {
+ break;
+ }
+ }
+ if (i == table_share->keys) {
+ DBUG_PRINT("info", ("mroonga: keys are enabled already"));
+ DBUG_RETURN(0);
+ }
+ KEY *p_key_info = &table->key_info[table_share->primary_key];
+ KEY *key_info = table_share->key_info;
+ uint n_keys = table_share->keys;
+ MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, n_keys);
+ MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, n_keys);
+ bitmap_clear_all(table->read_set);
+ mrn_set_bitmap_by_key(table->read_set, p_key_info);
+ mrn::PathMapper mapper(share->table_name);
+ for (i = 0, j = 0; i < n_keys; i++) {
+ if (!(key_info[i].flags & HA_FULLTEXT) &&
+ !mrn_is_geo_key(&key_info[i])) {
+ j++;
+ continue;
}
- KEY *p_key_info = &table->key_info[table_share->primary_key];
- KEY *key_info = table_share->key_info;
- uint n_keys = table_share->keys;
- MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, n_keys);
- MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, n_keys);
- bitmap_clear_all(table->read_set);
- mrn_set_bitmap_by_key(table->read_set, p_key_info);
- mrn::PathMapper mapper(share->table_name);
- for (i = 0, j = 0; i < n_keys; i++) {
- if (!(key_info[i].flags & HA_FULLTEXT) &&
- !mrn_is_geo_key(&key_info[i])) {
- j++;
- continue;
- }
- if ((error = mrn_add_index_param(share, &key_info[i], i)))
- {
+ if ((error = mrn_add_index_param(share, &key_info[i], i)))
+ {
+ break;
+ }
+ index_tables[i] = NULL;
+ index_columns[i] = NULL;
+ if (!grn_index_columns[i]) {
+ if (
+ (key_info[i].flags & HA_FULLTEXT) &&
+ (error = wrapper_create_index_fulltext(mapper.table_name(),
+ i, &key_info[i],
+ index_tables, index_columns,
+ share))
+ ) {
+ break;
+ } else if (
+ mrn_is_geo_key(&key_info[i]) &&
+ (error = wrapper_create_index_geo(mapper.table_name(),
+ i, &key_info[i],
+ index_tables, index_columns,
+ share))
+ ) {
break;
}
- index_tables[i] = NULL;
- index_columns[i] = NULL;
- if (!grn_index_columns[i]) {
- if (
- (key_info[i].flags & HA_FULLTEXT) &&
- (error = wrapper_create_index_fulltext(mapper.table_name(),
- i, &key_info[i],
- index_tables, index_columns,
- share))
- ) {
- break;
- } else if (
- mrn_is_geo_key(&key_info[i]) &&
- (error = wrapper_create_index_geo(mapper.table_name(),
- i, &key_info[i],
- index_tables, index_columns,
- share))
- ) {
- break;
- }
- grn_index_columns[i] = index_columns[i];
- }
- mrn_set_bitmap_by_key(table->read_set, &key_info[i]);
+ grn_index_columns[i] = index_columns[i];
}
- if (!error && i > j)
- {
- error = wrapper_fill_indexes(ha_thd(), table->key_info, index_columns,
- n_keys);
- }
- bitmap_set_all(table->read_set);
- MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
- MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns);
- } else {
- error = HA_ERR_WRONG_COMMAND;
+ mrn_set_bitmap_by_key(table->read_set, &key_info[i]);
}
+ if (!error && i > j)
+ {
+ error = wrapper_fill_indexes(ha_thd(), table->key_info, index_columns,
+ n_keys);
+ }
+ bitmap_set_all(table->read_set);
+ MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
+ MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns);
DBUG_RETURN(error);
}
-int ha_mroonga::wrapper_enable_indexes(uint mode)
+int ha_mroonga::wrapper_enable_indexes(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
- int mroonga_error = wrapper_enable_indexes_mroonga(mode);
+ int mroonga_error = wrapper_enable_indexes_mroonga(map, persist);
MRN_SET_WRAP_SHARE_KEY(share, table->s);
MRN_SET_WRAP_TABLE_KEY(this, table);
- error = wrap_handler->ha_enable_indexes(mode);
+ error = wrap_handler->ha_enable_indexes(map, persist);
MRN_SET_BASE_SHARE_KEY(share, table->s);
MRN_SET_BASE_TABLE_KEY(this, table);
if (error == HA_ERR_WRONG_COMMAND) {
@@ -13838,95 +13825,86 @@ int ha_mroonga::wrapper_enable_indexes(uint mode)
DBUG_RETURN(error);
}
-int ha_mroonga::storage_enable_indexes(uint mode)
+int ha_mroonga::storage_enable_indexes(key_map map, bool persist)
{
int error = 0;
uint n_keys = table_share->keys;
MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_tables, n_keys);
MRN_ALLOCATE_VARIABLE_LENGTH_ARRAYS(grn_obj *, index_columns, n_keys);
bool have_multiple_column_index = false;
- bool skip_unique_key = (mode == HA_KEY_SWITCH_NONUNIQ_SAVE);
MRN_DBUG_ENTER_METHOD();
- if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE || mode == HA_KEY_SWITCH_ALL) {
- uint i;
- for (i = 0; i < table_share->keys; i++) {
- if (i == table->s->primary_key) {
- continue;
- }
- if (!grn_index_columns[i]) {
- break;
- }
+ uint i;
+ for (i = 0; i < n_keys; i++) {
+ if (i == table->s->primary_key) {
+ continue;
}
- if (i == table_share->keys) {
- DBUG_PRINT("info", ("mroonga: keys are enabled already"));
- MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
- MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns);
- DBUG_RETURN(0);
+ if (!grn_index_columns[i]) {
+ break;
+ }
+ }
+ if (i == n_keys) {
+ DBUG_PRINT("info", ("mroonga: keys are enabled already"));
+ MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
+ MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns);
+ DBUG_RETURN(0);
+ }
+ KEY *key_info = table->key_info;
+ bitmap_clear_all(table->read_set);
+ mrn::PathMapper mapper(share->table_name);
+ for (; i < n_keys; i++) {
+ if (!map.is_set(i)) {
+ continue;
}
- KEY *key_info = table->key_info;
- bitmap_clear_all(table->read_set);
- mrn::PathMapper mapper(share->table_name);
- for (i = 0; i < n_keys; i++) {
- if (i == table->s->primary_key) {
- continue;
- }
- if (skip_unique_key && (key_info[i].flags & HA_NOSAME)) {
- continue;
- }
- if ((error = mrn_add_index_param(share, &key_info[i], i)))
+ if ((error = mrn_add_index_param(share, &key_info[i], i)))
+ {
+ break;
+ }
+ index_tables[i] = NULL;
+ if (!grn_index_columns[i]) {
+ if ((error = storage_create_index(table, mapper.table_name(), grn_table,
+ share, &key_info[i], index_tables,
+ index_columns, i)))
{
break;
}
- index_tables[i] = NULL;
- if (!grn_index_columns[i]) {
- if ((error = storage_create_index(table, mapper.table_name(), grn_table,
- share, &key_info[i], index_tables,
- index_columns, i)))
- {
- break;
- }
- if (
- KEY_N_KEY_PARTS(&(key_info[i])) != 1 &&
- !(key_info[i].flags & HA_FULLTEXT)
- ) {
- mrn_set_bitmap_by_key(table->read_set, &key_info[i]);
- have_multiple_column_index = true;
- }
- grn_index_tables[i] = index_tables[i];
- grn_index_columns[i] = index_columns[i];
- } else {
- index_columns[i] = NULL;
+ if (
+ KEY_N_KEY_PARTS(&(key_info[i])) != 1 &&
+ !(key_info[i].flags & HA_FULLTEXT)
+ ) {
+ mrn_set_bitmap_by_key(table->read_set, &key_info[i]);
+ have_multiple_column_index = true;
}
+ grn_index_tables[i] = index_tables[i];
+ grn_index_columns[i] = index_columns[i];
+ } else {
+ index_columns[i] = NULL;
}
- if (!error && have_multiple_column_index)
- {
- error = storage_add_index_multiple_columns(key_info, n_keys,
- index_tables,
- index_columns,
- skip_unique_key);
- }
- bitmap_set_all(table->read_set);
- } else {
- MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
- MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns);
- DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
+ if (!error && have_multiple_column_index)
+ {
+ bool skip_unique_key= !table->s->keys_in_use.is_clear_all();
+ error = storage_add_index_multiple_columns(key_info, n_keys,
+ index_tables,
+ index_columns,
+ skip_unique_key);
+ }
+ bitmap_set_all(table->read_set);
MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_tables);
MRN_FREE_VARIABLE_LENGTH_ARRAYS(index_columns);
DBUG_RETURN(error);
}
-int ha_mroonga::enable_indexes(uint mode)
+int ha_mroonga::enable_indexes(key_map map, bool persist)
{
int error = 0;
MRN_DBUG_ENTER_METHOD();
share->disable_keys = false;
if (share->wrapper_mode)
{
- error = wrapper_enable_indexes(mode);
+ error = wrapper_enable_indexes(map, persist);
} else {
- error = storage_enable_indexes(mode);
+ error = storage_enable_indexes(map, persist);
}
DBUG_RETURN(error);
}
diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp
index 66767899..6bf971aa 100644
--- a/storage/mroonga/ha_mroonga.hpp
+++ b/storage/mroonga/ha_mroonga.hpp
@@ -542,8 +542,8 @@ public:
bool is_crashed() const mrn_override;
bool auto_repair(int error) const mrn_override;
bool auto_repair() const;
- int disable_indexes(uint mode) mrn_override;
- int enable_indexes(uint mode) mrn_override;
+ int disable_indexes(key_map map, bool persist) mrn_override;
+ int enable_indexes(key_map map, bool persist) mrn_override;
int check(THD* thd, HA_CHECK_OPT* check_opt) mrn_override;
int repair(THD* thd, HA_CHECK_OPT* check_opt) mrn_override;
bool check_and_repair(THD *thd) mrn_override;
@@ -1140,12 +1140,12 @@ private:
bool wrapper_auto_repair(int error) const;
bool storage_auto_repair(int error) const;
int generic_disable_index(int i, KEY *key_info);
- int wrapper_disable_indexes_mroonga(uint mode);
- int wrapper_disable_indexes(uint mode);
- int storage_disable_indexes(uint mode);
- int wrapper_enable_indexes_mroonga(uint mode);
- int wrapper_enable_indexes(uint mode);
- int storage_enable_indexes(uint mode);
+ int wrapper_disable_indexes_mroonga(key_map map, bool persist);
+ int wrapper_disable_indexes(key_map map, bool persist);
+ int storage_disable_indexes(key_map map, bool persist);
+ int wrapper_enable_indexes_mroonga(key_map map, bool persist);
+ int wrapper_enable_indexes(key_map map, bool persist);
+ int storage_enable_indexes(key_map map, bool persist);
int wrapper_check(THD* thd, HA_CHECK_OPT* check_opt);
int storage_check(THD* thd, HA_CHECK_OPT* check_opt);
int wrapper_fill_indexes(THD *thd, KEY *key_info,
diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt
index 5b25ada4..cdbfb8f1 100644
--- a/storage/mroonga/vendor/groonga/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -200,6 +200,7 @@ endif()
include_directories(
BEFORE
+ ${CMAKE_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/lib
diff --git a/storage/mroonga/vendor/groonga/lib/db.c b/storage/mroonga/vendor/groonga/lib/db.c
index c3bbb64f..65463bda 100644
--- a/storage/mroonga/vendor/groonga/lib/db.c
+++ b/storage/mroonga/vendor/groonga/lib/db.c
@@ -38,6 +38,7 @@
#include "grn_util.h"
#include "grn_cache.h"
#include "grn_window_functions.h"
+#include <my_attribute.h>
#include <string.h>
#include <math.h>
@@ -1060,6 +1061,8 @@ grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned int name_size
return ctx->rc;
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static grn_obj *
grn_table_create_with_max_n_subrecs(grn_ctx *ctx, const char *name,
unsigned int name_size, const char *path,
@@ -1238,6 +1241,7 @@ grn_table_create_with_max_n_subrecs(grn_ctx *ctx, const char *name,
}
return res;
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
grn_obj *
grn_table_create(grn_ctx *ctx, const char *name, unsigned int name_size,
@@ -4776,6 +4780,9 @@ _grn_table_key(grn_ctx *ctx, grn_obj *table, grn_id id, uint32_t *key_size)
/* column */
+
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
grn_obj *
grn_column_create(grn_ctx *ctx, grn_obj *table,
const char *name, unsigned int name_size,
@@ -4978,6 +4985,7 @@ exit :
if (!res && id) { grn_obj_delete_by_id(ctx, db, id, GRN_TRUE); }
GRN_API_RETURN(res);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
grn_obj *
grn_column_open(grn_ctx *ctx, grn_obj *table,
@@ -8540,6 +8548,8 @@ grn_obj_spec_save(grn_ctx *ctx, grn_db_obj *obj)
grn_obj_close(ctx, &v);
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
inline static void
grn_obj_set_info_source_invalid_lexicon_error(grn_ctx *ctx,
const char *message,
@@ -8590,6 +8600,8 @@ grn_obj_set_info_source_invalid_lexicon_error(grn_ctx *ctx,
source_name_size, source_name);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
+
inline static grn_rc
grn_obj_set_info_source_validate(grn_ctx *ctx, grn_obj *obj, grn_obj *value)
{
@@ -8597,7 +8609,7 @@ grn_obj_set_info_source_validate(grn_ctx *ctx, grn_obj *obj, grn_obj *value)
grn_obj *lexicon = NULL;
grn_id lexicon_domain_id;
grn_obj *lexicon_domain = NULL;
- grn_bool lexicon_domain_is_table;
+ grn_bool lexicon_domain_is_table __attribute__((unused));
grn_bool lexicon_have_tokenizer;
grn_id *source_ids;
int i, n_source_ids;
@@ -9330,7 +9342,7 @@ remove_reference_tables(grn_ctx *ctx, grn_obj *table, grn_obj *db)
grn_bool is_close_opened_object_mode = GRN_FALSE;
grn_id table_id;
char table_name[GRN_TABLE_MAX_KEY_SIZE];
- int table_name_size;
+ int table_name_size __attribute__((unused));
grn_table_cursor *cursor;
if (grn_thread_get_limit() == 1) {
@@ -10317,12 +10329,10 @@ grn_db_spec_unpack(grn_ctx *ctx,
const char *error_message_tag)
{
grn_obj *db;
- grn_db *db_raw;
grn_rc rc;
uint32_t spec_size;
db = ctx->impl->db;
- db_raw = (grn_db *)db;
rc = grn_vector_decode(ctx,
decoded_spec,
diff --git a/storage/mroonga/vendor/groonga/lib/load.c b/storage/mroonga/vendor/groonga/lib/load.c
index eb77f2b3..25d621e7 100644
--- a/storage/mroonga/vendor/groonga/lib/load.c
+++ b/storage/mroonga/vendor/groonga/lib/load.c
@@ -20,6 +20,9 @@
#include "grn_ctx_impl.h"
#include "grn_db.h"
#include "grn_util.h"
+#include <my_attribute.h>
+
+PRAGMA_DISABLE_CHECK_STACK_FRAME
static void
grn_loader_save_error(grn_ctx *ctx, grn_loader *loader)
@@ -1228,3 +1231,5 @@ grn_load(grn_ctx *ctx, grn_content_type input_type,
}
GRN_API_RETURN(ctx->rc);
}
+
+PRAGMA_REENABLE_CHECK_STACK_FRAME
diff --git a/storage/mroonga/vendor/groonga/lib/operator.c b/storage/mroonga/vendor/groonga/lib/operator.c
index 1e1f2cf7..940c0b14 100644
--- a/storage/mroonga/vendor/groonga/lib/operator.c
+++ b/storage/mroonga/vendor/groonga/lib/operator.c
@@ -20,6 +20,7 @@
#include "grn_db.h"
#include "grn_str.h"
#include "grn_normalizer.h"
+#include <my_attribute.h>
#include <string.h>
@@ -31,6 +32,8 @@
# include <onigmo.h>
#endif
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static const char *operator_names[] = {
"push",
"pop",
@@ -1360,3 +1363,5 @@ grn_operator_exec_regexp(grn_ctx *ctx, grn_obj *target, grn_obj *pattern)
}
GRN_API_RETURN(matched);
}
+
+PRAGMA_REENABLE_CHECK_STACK_FRAME
diff --git a/storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c b/storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c
index adb4c91b..eaf5504d 100644
--- a/storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c
+++ b/storage/mroonga/vendor/groonga/lib/proc/proc_object_list.c
@@ -18,6 +18,7 @@
#include "../grn_proc.h"
#include "../grn_db.h"
+#include <my_attribute.h>
#include <groonga/plugin.h>
@@ -73,6 +74,8 @@ command_object_list_dump_flags(grn_ctx *ctx, grn_obj_spec *spec)
GRN_OBJ_FIN(ctx, &flags);
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static grn_obj *
command_object_list(grn_ctx *ctx,
int nargs,
@@ -401,6 +404,7 @@ command_object_list(grn_ctx *ctx,
return NULL;
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
void
grn_proc_init_object_list(grn_ctx *ctx)
diff --git a/storage/mroonga/vendor/groonga/lib/proc/proc_schema.c b/storage/mroonga/vendor/groonga/lib/proc/proc_schema.c
index 061c145a..7c632f45 100644
--- a/storage/mroonga/vendor/groonga/lib/proc/proc_schema.c
+++ b/storage/mroonga/vendor/groonga/lib/proc/proc_schema.c
@@ -17,9 +17,8 @@
*/
#include "../grn_proc.h"
-
#include "../grn_db.h"
-
+#include <my_attribute.h>
#include <groonga/plugin.h>
typedef struct {
@@ -572,6 +571,8 @@ command_schema_table_output_token_filters(grn_ctx *ctx, grn_obj *table)
GRN_OBJ_FIN(ctx, &token_filters);
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static void
command_schema_table_command_collect_arguments(grn_ctx *ctx,
grn_obj *table,
@@ -692,6 +693,7 @@ command_schema_table_command_collect_arguments(grn_ctx *ctx,
#undef ADD_OBJECT_NAME
#undef ADD
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
static void
command_schema_table_output_command(grn_ctx *ctx, grn_obj *table)
@@ -875,6 +877,8 @@ command_schema_output_indexes(grn_ctx *ctx, grn_obj *object)
}
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static void
command_schema_column_command_collect_arguments(grn_ctx *ctx,
grn_obj *table,
@@ -973,6 +977,7 @@ command_schema_column_command_collect_arguments(grn_ctx *ctx,
#undef ADD_OBJECT_NAME
#undef ADD
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
static void
command_schema_column_output_command(grn_ctx *ctx,
diff --git a/storage/mroonga/vendor/groonga/lib/proc/proc_select.c b/storage/mroonga/vendor/groonga/lib/proc/proc_select.c
index a665b1cc..7588b18a 100644
--- a/storage/mroonga/vendor/groonga/lib/proc/proc_select.c
+++ b/storage/mroonga/vendor/groonga/lib/proc/proc_select.c
@@ -24,6 +24,7 @@
#include "../grn_util.h"
#include "../grn_cache.h"
#include "../grn_ii.h"
+#include <my_attribute.h>
#include "../grn_ts.h"
@@ -2912,7 +2913,7 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
uint32_t nhits;
grn_obj *outbuf = ctx->impl->output.buf;
grn_content_type output_type = ctx->impl->output.type;
- char cache_key[GRN_CACHE_MAX_KEY_SIZE];
+ char *cache_key_buffer= 0;
uint32_t cache_key_size;
long long int threshold, original_threshold = 0;
grn_cache *cache_obj = grn_cache_current_get(ctx);
@@ -2985,8 +2986,9 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
} GRN_HASH_EACH_END(ctx, cursor);
}
#undef DRILLDOWN_CACHE_SIZE
- if (cache_key_size <= GRN_CACHE_MAX_KEY_SIZE) {
- char *cp = cache_key;
+ if (cache_key_size <= GRN_CACHE_MAX_KEY_SIZE &&
+ (cache_key_buffer= (char*) malloc(cache_key_size+1))) {
+ char *cp = cache_key_buffer;
#define PUT_CACHE_KEY(string) \
if ((string).value) \
@@ -3066,11 +3068,12 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
{
grn_rc rc;
- rc = grn_cache_fetch(ctx, cache_obj, cache_key, cache_key_size, outbuf);
+ rc = grn_cache_fetch(ctx, cache_obj, cache_key_buffer, cache_key_size, outbuf);
if (rc == GRN_SUCCESS) {
GRN_QUERY_LOG(ctx, GRN_QUERY_LOG_CACHE,
":", "cache(%" GRN_FMT_LLD ")",
(long long int)GRN_TEXT_LEN(outbuf));
+ free(cache_key_buffer);
return ctx->rc;
}
}
@@ -3119,7 +3122,7 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
data->cache.length != 2 ||
data->cache.value[0] != 'n' ||
data->cache.value[1] != 'o')) {
- grn_cache_update(ctx, cache_obj, cache_key, cache_key_size, outbuf);
+ grn_cache_update(ctx, cache_obj, cache_key_buffer, cache_key_size, outbuf);
}
goto exit;
}
@@ -3186,7 +3189,7 @@ grn_select(grn_ctx *ctx, grn_select_data *data)
data->cache.length != 2 ||
data->cache.value[0] != 'n' ||
data->cache.value[1] != 'o')) {
- grn_cache_update(ctx, cache_obj, cache_key, cache_key_size, outbuf);
+ grn_cache_update(ctx, cache_obj, cache_key_buffer, cache_key_size, outbuf);
}
if (data->taintable > 0) {
grn_db_touch(ctx, DB_OBJ(data->tables.target)->db);
@@ -3200,6 +3203,7 @@ exit :
/* GRN_LOG(ctx, GRN_LOG_NONE, "%d", ctx->seqno); */
+ free(cache_key_buffer);
return ctx->rc;
}
@@ -3424,6 +3428,9 @@ grn_select_data_fill_drilldown_columns(grn_ctx *ctx,
strlen(prefix));
}
+
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static grn_bool
grn_select_data_fill_drilldowns(grn_ctx *ctx,
grn_user_data *user_data,
@@ -3562,6 +3569,7 @@ grn_select_data_fill_drilldowns(grn_ctx *ctx,
return succeeded;
}
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
static grn_obj *
command_select(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index f69f1869..3d95fffa 100644
--- a/storage/myisam/ft_boolean_search.c
+++ b/storage/myisam/ft_boolean_search.c
@@ -287,6 +287,8 @@ static int ftb_parse_query_internal(MYSQL_FTPARSER_PARAM *param,
uchar *end= (uchar*) query + len;
FT_WORD w;
+ w.pos= NULL;
+ w.len= 0;
info.prev= ' ';
info.quot= 0;
while (ft_get_word(cs, start, end, &w, &info))
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 14311c87..deeb1f2e 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1570,41 +1570,38 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt)
SYNOPSIS
disable_indexes()
- mode mode of operation:
- HA_KEY_SWITCH_NONUNIQ disable all non-unique keys
- HA_KEY_SWITCH_ALL disable all keys
- HA_KEY_SWITCH_NONUNIQ_SAVE dis. non-uni. and make persistent
- HA_KEY_SWITCH_ALL_SAVE dis. all keys and make persistent
- IMPLEMENTATION
- HA_KEY_SWITCH_NONUNIQ is not implemented.
- HA_KEY_SWITCH_ALL_SAVE is not implemented.
+ DESCRIPTION
+ See handler::ha_disable_indexes()
RETURN
0 ok
HA_ERR_WRONG_COMMAND mode not implemented.
*/
-int ha_myisam::disable_indexes(uint mode)
+int ha_myisam::disable_indexes(key_map map, bool persist)
{
int error;
- if (mode == HA_KEY_SWITCH_ALL)
+ if (!persist)
{
/* call a storage engine function to switch the key map */
+ DBUG_ASSERT(map.is_clear_all());
error= mi_disable_indexes(file);
}
- else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
+ else
{
- mi_extra(file, HA_EXTRA_NO_KEYS, 0);
+ ulonglong ullmap= map.to_ulonglong();
+
+ /* make sure auto-inc key is enabled even if it's > 64 */
+ if (map.length() > MI_KEYMAP_BITS &&
+ table->s->next_number_index < MAX_KEY)
+ mi_set_key_active(ullmap, table->s->next_number_index);
+
+ mi_extra(file, HA_EXTRA_NO_KEYS, &ullmap);
info(HA_STATUS_CONST); // Read new key info
error= 0;
}
- else
- {
- /* mode not implemented */
- error= HA_ERR_WRONG_COMMAND;
- }
return error;
}
@@ -1614,21 +1611,14 @@ int ha_myisam::disable_indexes(uint mode)
SYNOPSIS
enable_indexes()
- mode mode of operation:
- HA_KEY_SWITCH_NONUNIQ enable all non-unique keys
- HA_KEY_SWITCH_ALL enable all keys
- HA_KEY_SWITCH_NONUNIQ_SAVE en. non-uni. and make persistent
- HA_KEY_SWITCH_ALL_SAVE en. all keys and make persistent
DESCRIPTION
Enable indexes, which might have been disabled by disable_index() before.
- The modes without _SAVE work only if both data and indexes are empty,
+ If persist=false, it works only if both data and indexes are empty,
since the MyISAM repair would enable them persistently.
To be sure in these cases, call handler::delete_all_rows() before.
- IMPLEMENTATION
- HA_KEY_SWITCH_NONUNIQ is not implemented.
- HA_KEY_SWITCH_ALL_SAVE is not implemented.
+ See also handler::ha_enable_indexes()
RETURN
0 ok
@@ -1637,7 +1627,7 @@ int ha_myisam::disable_indexes(uint mode)
HA_ERR_WRONG_COMMAND mode not implemented.
*/
-int ha_myisam::enable_indexes(uint mode)
+int ha_myisam::enable_indexes(key_map map, bool persist)
{
int error;
DBUG_ENTER("ha_myisam::enable_indexes");
@@ -1651,7 +1641,8 @@ int ha_myisam::enable_indexes(uint mode)
DBUG_RETURN(0);
}
- if (mode == HA_KEY_SWITCH_ALL)
+ DBUG_ASSERT(map.is_prefix(table->s->keys));
+ if (!persist)
{
error= mi_enable_indexes(file);
/*
@@ -1660,7 +1651,7 @@ int ha_myisam::enable_indexes(uint mode)
but mode==HA_KEY_SWITCH_ALL forbids it.
*/
}
- else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
+ else
{
THD *thd= table->in_use;
int was_error= thd->is_error();
@@ -1720,11 +1711,6 @@ int ha_myisam::enable_indexes(uint mode)
restore_vcos_after_repair();
}
- else
- {
- /* mode not implemented */
- error= HA_ERR_WRONG_COMMAND;
- }
DBUG_RETURN(error);
}
@@ -1887,7 +1873,7 @@ int ha_myisam::end_bulk_insert()
setting the indexes as active and trying to recreate them.
*/
- if (((first_error= enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE)) != 0) &&
+ if (((first_error= enable_indexes(key_map(table->s->keys), true))) &&
table->in_use->killed)
{
delete_all_rows();
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index c4c46a63..e0121dbe 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -109,8 +109,8 @@ class ha_myisam final : public handler
int external_lock(THD *thd, int lock_type);
int delete_all_rows(void);
int reset_auto_increment(ulonglong value);
- int disable_indexes(uint mode);
- int enable_indexes(uint mode);
+ int disable_indexes(key_map map, bool persist);
+ int enable_indexes(key_map map, bool persist);
int indexes_are_disabled(void);
void start_bulk_insert(ha_rows rows, uint flags);
int end_bulk_insert();
diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c
index 66238745..68a19c7b 100644
--- a/storage/myisam/mi_extra.c
+++ b/storage/myisam/mi_extra.c
@@ -225,16 +225,9 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
}
if (mi_is_any_key_active(share->state.key_map))
{
- MI_KEYDEF *key=share->keyinfo;
- uint i;
- for (i=0 ; i < share->base.keys ; i++,key++)
- {
- if (!(key->flag & HA_NOSAME) && info->s->base.auto_key != i+1)
- {
- mi_clear_key_active(share->state.key_map, i);
- info->update|= HA_STATE_CHANGED;
- }
- }
+ if (share->state.key_map != *(ulonglong*)extra_arg)
+ info->update|= HA_STATE_CHANGED;
+ share->state.key_map= *(ulonglong*)extra_arg;
if (!share->changed)
{
diff --git a/storage/perfschema/pfs_buffer_container.h b/storage/perfschema/pfs_buffer_container.h
index d5745e76..b5506fe0 100644
--- a/storage/perfschema/pfs_buffer_container.h
+++ b/storage/perfschema/pfs_buffer_container.h
@@ -1084,8 +1084,7 @@ template <class T>
class PFS_buffer_processor
{
public:
- virtual ~PFS_buffer_processor<T> ()
- {}
+ virtual ~PFS_buffer_processor()= default;
virtual void operator()(T *element) = 0;
};
diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc
index 2b1a80d3..fa85d861 100644
--- a/storage/perfschema/pfs_instr_class.cc
+++ b/storage/perfschema/pfs_instr_class.cc
@@ -55,7 +55,7 @@
Indicate if the performance schema is enabled.
This flag is set at startup, and never changes.
*/
-my_bool pfs_enabled= TRUE;
+my_bool pfs_enabled= FALSE;
/**
PFS_INSTRUMENT option settings array
diff --git a/storage/perfschema/table_replication_applier_status.cc b/storage/perfschema/table_replication_applier_status.cc
index fda3c927..94981482 100644
--- a/storage/perfschema/table_replication_applier_status.cc
+++ b/storage/perfschema/table_replication_applier_status.cc
@@ -166,7 +166,7 @@ void table_replication_applier_status::make_row(Master_info *mi)
m_row.service_state= PS_RPL_NO;
m_row.remaining_delay= 0;
- if (slave_sql_running_state == Relay_log_info::state_delaying_string)
+ if (slave_sql_running_state == stage_sql_thd_waiting_until_delay.m_name)
{
time_t t= my_time(0), sql_delay_end= mi->rli.get_sql_delay_end();
m_row.remaining_delay= (uint)(t < sql_delay_end ?
diff --git a/storage/perfschema/table_replication_applier_status.h b/storage/perfschema/table_replication_applier_status.h
index 4da2087a..5e97dba5 100644
--- a/storage/perfschema/table_replication_applier_status.h
+++ b/storage/perfschema/table_replication_applier_status.h
@@ -59,7 +59,7 @@ struct st_row_applier_status {
enum_rpl_yes_no service_state;
uint remaining_delay;
bool remaining_delay_is_set;
- ulong count_transactions_retries;
+ ulonglong count_transactions_retries;
};
/** Table PERFORMANCE_SCHEMA.replication_applier_status */
diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc
index 9667d7ff..55c4f619 100644
--- a/storage/perfschema/unittest/pfs_instr-t.cc
+++ b/storage/perfschema/unittest/pfs_instr-t.cc
@@ -86,6 +86,8 @@ void test_no_instruments()
cleanup_instruments();
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
void test_no_instances()
{
int rc;
@@ -245,6 +247,7 @@ void test_no_instances()
cleanup_file_hash();
cleanup_instruments();
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
void test_with_instances()
{
diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc
index 7651898d..76e3668d 100644
--- a/storage/perfschema/unittest/pfs_instr_class-t.cc
+++ b/storage/perfschema/unittest/pfs_instr_class-t.cc
@@ -743,6 +743,7 @@ void do_all_tests()
int main(int argc, char **argv)
{
plan(209);
+ pfs_enabled= 1;
MY_INIT(argv[0]);
do_all_tests();
my_end(0);
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 50ff1df7..2308d69f 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -202,7 +202,7 @@ ADD_CONVENIENCE_LIBRARY(rocksdb_aux_lib
ADD_DEPENDENCIES(rocksdb_aux_lib GenError)
# MARIAROCKS-TODO: how to properly depend on -lrt ?
-TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY})
+TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARIES})
if (UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt)
endif()
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
index 27a8616c..e89dbfc0 100644
--- a/storage/rocksdb/build_rocksdb.cmake
+++ b/storage/rocksdb/build_rocksdb.cmake
@@ -79,7 +79,7 @@ check_lib(Snappy)
check_lib(ZSTD ZDICT_trainFromBuffer)
add_definitions(-DZLIB)
-list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARY})
+list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARIES})
ADD_FEATURE_INFO(ROCKSDB_ZLIB "ON" "zlib Compression in the RocksDB storage engine")
if(CMAKE_SYSTEM_NAME MATCHES "Cygwin")
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h
index f847ee25..ea91b9b3 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -397,7 +397,7 @@ class ha_rocksdb : public my_core::handler {
current lookup to be covered. If the bitmap field is null, that means this
index does not cover the current lookup for any record.
*/
- MY_BITMAP m_lookup_bitmap = {nullptr, nullptr, 0, 0};
+ MY_BITMAP m_lookup_bitmap = {nullptr, nullptr, 0, 0, 0};
int alloc_key_buffers(const TABLE *const table_arg,
const Rdb_tbl_def *const tbl_def_arg,
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 5a1350fe..dbf4d7d3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
@@ -3517,7 +3517,7 @@ SHOW SESSION STATUS LIKE 'Handler_read%';
Variable_name Value
Handler_read_first 0
Handler_read_key 3
-Handler_read_last 1
+Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
Handler_read_retry 0
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 8031d4c0..d99c9b11 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
@@ -68,7 +68,6 @@ buffer_flush_n_to_flush_by_age buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NUL
buffer_flush_adaptive_avg_time buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Avg time (ms) spent for adaptive flushing recently.
buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of adaptive flushes passed during the recent Avg period.
buffer_LRU_get_free_loops buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total loops in LRU get free.
-buffer_LRU_get_free_waits buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Total sleep waits in LRU get free.
buffer_flush_avg_page_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average number of pages at which flushing is happening
buffer_flush_lsn_avg_rate buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Average redo generation rate
buffer_flush_pct_for_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Percent of IO capacity used to avoid max dirty page limit
@@ -88,7 +87,6 @@ buffer_LRU_batch_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NUL
buffer_LRU_batch_scanned_per_call buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Pages scanned per LRU batch call
buffer_LRU_batch_flush_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Total pages flushed as part of LRU batches
buffer_LRU_batch_evict_total_pages buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Total pages evicted as part of LRU batches
-buffer_LRU_single_flush_failure_count Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of times attempt to flush a single page from LRU failed
buffer_LRU_get_free_search Buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 counter Number of searches performed for a clean page
buffer_LRU_search_scanned buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_owner Total pages scanned as part of LRU search
buffer_LRU_search_num_scan buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 set_member Number of times LRU search is performed
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/partition.result b/storage/rocksdb/mysql-test/rocksdb/r/partition.result
index a7f2a611..1ba966e9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/partition.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/partition.result
@@ -46,7 +46,6 @@ 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/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
index 627d7da4..c16c1021 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
+++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
@@ -87,6 +87,10 @@ compact_deletes: MDEV-12663 : rocksdb.compact_deletes times out and causes other
blind_delete_without_tx_api: MDEV-12286: rocksdb.blind_delete_without_tx_api test fails
information_schema: MDEV-14372: unstable testcase
+bloomfilter2: MDEV-33789: rocksdb.bloomfilter2 failed on amd64-debian-12-rocksdb
+write_sync: MDEV-33866: rocksdb.write_sync fails on amd64-windows-packages
+locking_issues_case5_rc: MDEV-33781: rocksdb.locking_issues_case5_rc fails on amd64-windows-packages
+
##
## Tests that fail for some other reason
##
diff --git a/storage/rocksdb/rdb_source_revision.h b/storage/rocksdb/rdb_source_revision.h
new file mode 100644
index 00000000..d0d81aa1
--- /dev/null
+++ b/storage/rocksdb/rdb_source_revision.h
@@ -0,0 +1 @@
+#define ROCKSDB_GIT_HASH "bba5e7bc21093d7cfa765e1280a7c4fdcd284288"
diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc
index 5b85b3a2..c998fd18 100644
--- a/storage/spider/ha_spider.cc
+++ b/storage/spider/ha_spider.cc
@@ -269,19 +269,19 @@ int ha_spider::open(
spider_bulk_malloc(spider_current_trx, 16, MYF(MY_WME | MY_ZEROFILL),
&wide_handler, sizeof(SPIDER_WIDE_HANDLER),
&searched_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&ft_discard_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&position_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&idx_read_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&idx_write_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&rnd_read_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&rnd_write_bitmap,
- (uint) sizeof(uchar) * no_bytes_in_map(table->read_set),
+ (uint) sizeof(uchar) * my_bitmap_buffer_size(table->read_set),
&partition_handler,
(uint) sizeof(SPIDER_PARTITION_HANDLER),
NullS)
@@ -305,9 +305,9 @@ int ha_spider::open(
wide_handler->top_share = table->s;
owner->wide_handler_owner = TRUE;
memset(wide_handler->ft_discard_bitmap, 0xFF,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
memset(wide_handler->searched_bitmap, 0,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
wide_handler_alloc = TRUE;
if (!share && !spider_get_share(name, table, thd, this, &error_num))
@@ -347,12 +347,23 @@ int ha_spider::open(
result_list.last = NULL;
result_list.current = NULL;
result_list.record_num = 0;
- if (
- !(result_list.sqls = new spider_string[share->link_count]) ||
- !(result_list.insert_sqls = new spider_string[share->link_count]) ||
- !(result_list.update_sqls = new spider_string[share->link_count]) ||
- !(result_list.tmp_sqls = new spider_string[share->link_count])
- ) {
+ if (!(result_list.sqls = new spider_string[share->link_count]))
+ {
+ error_num = HA_ERR_OUT_OF_MEM;
+ goto error_init_result_list;
+ }
+ if (!(result_list.insert_sqls = new spider_string[share->link_count]))
+ {
+ error_num = HA_ERR_OUT_OF_MEM;
+ goto error_init_result_list;
+ }
+ if (!(result_list.update_sqls = new spider_string[share->link_count]))
+ {
+ error_num = HA_ERR_OUT_OF_MEM;
+ goto error_init_result_list;
+ }
+ if (!(result_list.tmp_sqls = new spider_string[share->link_count]))
+ {
error_num = HA_ERR_OUT_OF_MEM;
goto error_init_result_list;
}
@@ -1000,9 +1011,9 @@ int ha_spider::reset()
if (!is_clone)
{
memset(wide_handler->ft_discard_bitmap, 0xFF,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
memset(wide_handler->searched_bitmap, 0,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
}
while (wide_handler->condition)
{
@@ -1230,7 +1241,7 @@ int ha_spider::index_init(
bitmap_set_all(table->read_set);
if (is_clone)
memset(wide_handler->searched_bitmap, 0xFF,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
}
}
@@ -3125,7 +3136,7 @@ ha_rows ha_spider::multi_range_read_info_const(
bitmap_set_all(table->read_set);
if (is_clone)
memset(wide_handler->searched_bitmap, 0xFF,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
}
}
@@ -3178,7 +3189,7 @@ ha_rows ha_spider::multi_range_read_info(
bitmap_set_all(table->read_set);
if (is_clone)
memset(wide_handler->searched_bitmap, 0xFF,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
}
}
@@ -5437,7 +5448,7 @@ int ha_spider::rnd_init(
bitmap_set_all(table->read_set);
if (is_clone)
memset(wide_handler->searched_bitmap, 0xFF,
- no_bytes_in_map(table->read_set));
+ my_bitmap_buffer_size(table->read_set));
}
set_select_column_mode();
@@ -9023,27 +9034,35 @@ bool ha_spider::auto_repair() const
}
int ha_spider::disable_indexes(
- uint mode
+ key_map map, bool persist
) {
int error_num;
backup_error_status();
DBUG_ENTER("ha_spider::disable_indexes");
DBUG_PRINT("info",("spider this=%p", this));
- if ((error_num = spider_db_disable_keys(this)))
- DBUG_RETURN(check_error_mode(error_num));
- DBUG_RETURN(0);
+ if (persist)
+ {
+ if ((error_num = spider_db_disable_keys(this)))
+ DBUG_RETURN(check_error_mode(error_num));
+ DBUG_RETURN(0);
+ }
+ DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
int ha_spider::enable_indexes(
- uint mode
+ key_map map, bool persist
) {
int error_num;
backup_error_status();
DBUG_ENTER("ha_spider::enable_indexes");
DBUG_PRINT("info",("spider this=%p", this));
- if ((error_num = spider_db_enable_keys(this)))
- DBUG_RETURN(check_error_mode(error_num));
- DBUG_RETURN(0);
+ if (persist)
+ {
+ if ((error_num = spider_db_enable_keys(this)))
+ DBUG_RETURN(check_error_mode(error_num));
+ DBUG_RETURN(0);
+ }
+ DBUG_RETURN(HA_ERR_WRONG_COMMAND);
}
diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h
index 4dffdf78..4c178a33 100644
--- a/storage/spider/ha_spider.h
+++ b/storage/spider/ha_spider.h
@@ -483,10 +483,10 @@ public:
bool auto_repair() const;
#endif
int disable_indexes(
- uint mode
+ key_map map, bool persist
);
int enable_indexes(
- uint mode
+ key_map map, bool persist
);
int check(
THD* thd,
@@ -792,3 +792,26 @@ public:
int lock_tables();
int dml_init();
};
+
+
+/* This is a hack for ASAN
+ * Libraries such as libxml2 and libodbc do not like being unloaded before
+ * exit and will show as a leak in ASAN with no stack trace (as the plugin
+ * has been unloaded from memory).
+ *
+ * The below is designed to trick the compiler into adding a "UNIQUE" symbol
+ * which can be seen using:
+ * readelf -s storage/spider/ha_spider.so | grep UNIQUE
+ *
+ * Having this symbol means that the plugin remains in memory after dlclose()
+ * has been called. Thereby letting the libraries clean up properly.
+ */
+#if defined(__SANITIZE_ADDRESS__)
+__attribute__((__used__))
+inline int dummy(void)
+{
+ static int d;
+ d++;
+ return d;
+}
+#endif
diff --git a/storage/spider/mysql-test/spider/bg/r/spider3_fixes.result b/storage/spider/mysql-test/spider/bg/r/spider3_fixes.result
index aa734573..e3510042 100644
--- a/storage/spider/mysql-test/spider/bg/r/spider3_fixes.result
+++ b/storage/spider/mysql-test/spider/bg/r/spider3_fixes.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result b/storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result
index b793346d..361fd336 100644
--- a/storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result
+++ b/storage/spider/mysql-test/spider/bg/r/spider3_fixes_part.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/bg/r/spider_fixes.result b/storage/spider/mysql-test/spider/bg/r/spider_fixes.result
index 51045e0b..a751d803 100644
--- a/storage/spider/mysql-test/spider/bg/r/spider_fixes.result
+++ b/storage/spider/mysql-test/spider/bg/r/spider_fixes.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/bg/r/spider_fixes_part.result b/storage/spider/mysql-test/spider/bg/r/spider_fixes_part.result
index faf0b6ef..3ce8dfbf 100644
--- a/storage/spider/mysql-test/spider/bg/r/spider_fixes_part.result
+++ b/storage/spider/mysql-test/spider/bg/r/spider_fixes_part.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/bg/t/slave_test_init.inc b/storage/spider/mysql-test/spider/bg/t/slave_test_init.inc
index 739d8897..84de2c7d 100644
--- a/storage/spider/mysql-test/spider/bg/t/slave_test_init.inc
+++ b/storage/spider/mysql-test/spider/bg/t/slave_test_init.inc
@@ -19,7 +19,7 @@ if (!$SLAVE1_1_SLAVE_STATUS)
MASTER_PORT = $MASTER_1_MYPORT
;
}
-START SLAVE;
+--source include/start_slave.inc
--connection master_1
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
--connection slave1_1
diff --git a/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_default.result b/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_default.result
index cb1b190f..8b193975 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_default.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/delete_with_float_column_default.result
@@ -5,6 +5,7 @@ child2_2
child2_3
for child3
for slave1_1
+include/start_slave.inc
connection slave1_1;
connection master_1;
set @old_binlog_format= @@binlog_format;
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
index cb1b190f..8b193975 100644
--- 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
@@ -5,6 +5,7 @@ child2_2
child2_3
for child3
for slave1_1
+include/start_slave.inc
connection slave1_1;
connection master_1;
set @old_binlog_format= @@binlog_format;
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
index 11310212..1e5d7d31 100644
--- 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
@@ -5,6 +5,7 @@ child2_2
child2_3
for child3
for slave1_1
+include/start_slave.inc
connection slave1_1;
connection master_1;
set @old_binlog_format= @@binlog_format;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_19866.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_19866.result
index 4386b4cb..dbf0f54c 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/mdev_19866.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_19866.result
@@ -72,7 +72,6 @@ SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argum
argument
select `pkey`,`val` from `auto_test_remote`.`tbl_a`
select `pkey`,`val` from `auto_test_remote`.`tbl_a` where `pkey` = 1
-select 1 from (select 1) t0
select `pkey`,`val` from `auto_test_remote`.`tbl_a`
select `pkey`,`val` from `auto_test_remote`.`tbl_a`
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %'
@@ -86,7 +85,6 @@ argument
select `pkey`,`val` from `auto_test_remote2`.`tbl_a`
select `pkey`,`val` from `auto_test_remote2`.`tbl_a`
select `pkey`,`val` from `auto_test_remote2`.`tbl_a` where `pkey` = 2
-select 1 from (select 1) t0
select `pkey`,`val` from `auto_test_remote2`.`tbl_a`
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %'
SELECT pkey, val FROM tbl_a ORDER BY pkey;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27172.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27172.result
index 531e48b8..60ef8e2d 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/mdev_27172.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27172.result
@@ -66,9 +66,6 @@ id greeting
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE 'select `id`,`greeting` from %';
argument
-select `id`,`greeting` from `auto_test_remote`.`tbl_a` where `greeting` = 'Aloha!' and ((`greeting` = 'Aloha!'))
-select `id`,`greeting` from `auto_test_remote`.`tbl_b` where `greeting` like 'Aloha%' and ((`greeting` = 'Aloha!'))
-select `id`,`greeting` from `auto_test_remote`.`tbl_c` where `greeting` like 'Aloha%' and ((`greeting` = 'Aloha!'))
connection child2_1;
SET @@global.general_log = @general_log_backup;
SET @@global.log_output = @log_output_backup;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_28856.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_28856.result
index 7e4fd3cd..5fd412b6 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/mdev_28856.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_28856.result
@@ -5,6 +5,8 @@ for master_1
for child2
for child3
set spider_same_server_link=1;
+set @old_spider_same_server_link=@@global.spider_same_server_link;
+set global spider_same_server_link=1;
CREATE SERVER srv FOREIGN DATA WRAPPER mysql
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
# testing monitoring_*
@@ -173,6 +175,7 @@ max(d)
93
drop table t1, t2;
drop server srv;
+set global spider_same_server_link=@old_spider_same_server_link;
for master_1
for child2
for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result
new file mode 100644
index 00000000..79a383fe
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_30727.result
@@ -0,0 +1,24 @@
+CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so';
+SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"');
+ERROR HY000: Can't initialize function 'spider_direct_sql'; Plugin 'SPIDER' is not loaded
+CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
+SELECT spider_bg_direct_sql ('SELECT * FROM s','a','srv "b"');
+ERROR HY000: Can't initialize function 'spider_bg_direct_sql'; Plugin 'SPIDER' is not loaded
+CREATE FUNCTION spider_copy_tables RETURNS INT SONAME 'ha_spider.so';
+SELECT spider_copy_tables ('t', '0', '0');
+ERROR HY000: Can't initialize function 'spider_copy_tables'; Plugin 'SPIDER' is not loaded
+CREATE FUNCTION spider_flush_table_mon_cache RETURNS INT SONAME 'ha_spider.so';
+SELECT spider_flush_table_mon_cache ();
+spider_flush_table_mon_cache ()
+1
+install soname 'ha_spider';
+SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"');
+ERROR HY000: The foreign server name you are trying to reference does not exist. Data source error: b
+call mtr.add_suppression(".*\\[Error\\] (mysqld|mariadbd): Can't find record in 'spider_tables'");
+SELECT spider_copy_tables ('t', '0', '0');
+ERROR HY000: Can't find record in 'spider_tables'
+SELECT spider_flush_table_mon_cache ();
+spider_flush_table_mon_cache ()
+1
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33242.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33242.result
new file mode 100644
index 00000000..bbbc4499
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33242.result
@@ -0,0 +1,4 @@
+set @old_old_mode=@@global.old_mode;
+set global old_mode=4;
+INSTALL SONAME 'ha_spider.so';
+set global old_mode=@old_old_mode;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33434.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33434.result
new file mode 100644
index 00000000..2cbcff38
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33434.result
@@ -0,0 +1,12 @@
+#
+# MDEV-33434 MDEV-33434 UBSAN null pointer passed as argument 2, which is declared to never be null in spider_udf_direct_sql_create_conn
+#
+INSTALL SONAME 'ha_spider';
+SET character_set_connection=ucs2;
+SELECT SPIDER_DIRECT_SQL('SELECT SLEEP(1)', '', 'srv "dummy", port "3307"');
+ERROR HY000: Unable to connect to foreign data source: localhost
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+#
+# end of test mdev_33434
+#
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33441.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33441.result
new file mode 100644
index 00000000..b19194f1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33441.result
@@ -0,0 +1,7 @@
+#
+# MDEV-33441 No spider variables available is Spider is loaded upon server startup
+#
+set spider_same_server_link=0;
+#
+# end of test mdev_33441
+#
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33441_fail.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33441_fail.result
new file mode 100644
index 00000000..e6123ed4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33441_fail.result
@@ -0,0 +1,10 @@
+#
+# MDEV-33441 No spider variables available is Spider is loaded upon server startup
+#
+select * from mysql.plugin;
+name dl
+show variables like 'spider%';
+Variable_name Value
+#
+# end of test mdev_33441_fail
+#
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33494.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33494.result
new file mode 100644
index 00000000..3db28c0f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33494.result
@@ -0,0 +1,4 @@
+set @old_sql_mode=@@global.sql_mode;
+set global sql_mode=(SELECT CONCAT (@@sql_mode,',no_zero_date'));
+install soname 'ha_spider';
+set global sql_mode=@old_sql_mode;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result
new file mode 100644
index 00000000..a5ab3c1d
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538.result
@@ -0,0 +1,12 @@
+show create table information_schema.SPIDER_ALLOC_MEM;
+Table Create Table
+SPIDER_ALLOC_MEM CREATE TEMPORARY TABLE `SPIDER_ALLOC_MEM` (
+ `ID` int(10) unsigned NOT NULL,
+ `FUNC_NAME` varchar(64),
+ `FILE_NAME` varchar(64),
+ `LINE_NO` int(10) unsigned,
+ `TOTAL_ALLOC_MEM` bigint(20) unsigned,
+ `CURRENT_ALLOC_MEM` bigint(20),
+ `ALLOC_MEM_COUNT` bigint(20) unsigned,
+ `FREE_MEM_COUNT` bigint(20) unsigned
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result
new file mode 100644
index 00000000..7535da83
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33538_fail_init.result
@@ -0,0 +1,10 @@
+call mtr.add_suppression("\\[ERROR\\] SPIDER plugin initialization failed");
+call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER' registration as a STORAGE ENGINE failed.");
+call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_WRAPPER_PROTOCOLS' registration as a INFORMATION SCHEMA failed.");
+call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_ALLOC_MEM' registration as a INFORMATION SCHEMA failed.");
+create table mysql.spider_tables (c int);
+# restart: --plugin-load-add=ha_spider
+SELECT * FROM information_schema.SPIDER_ALLOC_MEM;
+ID FUNC_NAME FILE_NAME LINE_NO TOTAL_ALLOC_MEM CURRENT_ALLOC_MEM ALLOC_MEM_COUNT FREE_MEM_COUNT
+SELECT * FROM information_schema.SPIDER_WRAPPER_PROTOCOLS;
+WRAPPER_NAME WRAPPER_VERSION WRAPPER_DESCRIPTION WRAPPER_MATURITY
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33584.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33584.result
new file mode 100644
index 00000000..796c75cc
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33584.result
@@ -0,0 +1,4 @@
+set @old_sql_mode=@@global.sql_mode;
+set global sql_mode='traditional';
+install soname 'ha_spider';
+set global sql_mode=@old_sql_mode;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33679.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33679.result
new file mode 100644
index 00000000..c021bc70
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33679.result
@@ -0,0 +1,25 @@
+#
+# MDEV-33679 spider returns parsing failure on valid left join select by translating the on expression to ()
+#
+for master_1
+for child2
+for child3
+CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+CREATE TABLE `t1` (`c` INT(10) UNSIGNED NOT NULL, `b` VARCHAR(255) NOT NULL , PRIMARY KEY (`c`) USING BTREE ) ENGINE=MYISAM;
+CREATE TABLE `t2` (`a` INT(10) UNSIGNED NOT NULL, `c` INT(10) UNSIGNED NOT NULL ) ENGINE=MYISAM;
+SET spider_same_server_link= on;
+CREATE TABLE `t1_spider` (`c` INT(10) UNSIGNED NOT NULL, `b` VARCHAR(255) NOT NULL , PRIMARY KEY (`c`) USING BTREE ) COMMENT='wrapper "mysql",srv "srv", table "t1"' ENGINE=SPIDER;
+CREATE TABLE `t2_spider` (`a` INT(10) UNSIGNED NOT NULL, `c` INT(10) UNSIGNED NOT NULL
+, PRIMARY KEY (`a`) USING BTREE
+) COMMENT='wrapper "mysql",srv "srv",table "t2"' ENGINE=SPIDER;
+INSERT INTO t1_spider VALUES(1,'oooo');
+INSERT INTO t2_spider VALUES(1,1);
+SELECT t2_spider.a,t1_spider.c FRoM t2_spider LEFT join t1_spider ON (t2_spider.c = t1_spider.c) WHERE t2_spider.a = 1;
+a c
+1 1
+drop table t1, t2, t1_spider, t2_spider;
+drop server srv;
+for master_1
+for child2
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_33731.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_33731.result
new file mode 100644
index 00000000..a63830f1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_33731.result
@@ -0,0 +1,10 @@
+for master_1
+for child2
+for child3
+CREATE TABLE t (a INT) ENGINE=Spider PARTITION BY LIST (a) PARTITIONS 2 (PARTITION p1 VALUES IN (0,1),PARTITION p2 VALUES IN (2,3));
+DELETE FROM t PARTITION (p2);
+ERROR HY000: Unable to connect to foreign data source: localhost
+drop table t;
+for master_1
+for child2
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result
new file mode 100644
index 00000000..b78f18d1
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34003.result
@@ -0,0 +1,18 @@
+for master_1
+for child2
+for child3
+set spider_same_server_link= 1;
+CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+create table t2 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (0,1,0),(1,0,0),(2,0,0);
+create table t1 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=Spider
+COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
+SELECT * FROM t1 WHERE c=0;
+c c1 c2
+0 1 0
+drop table t1, t2;
+drop server srv;
+for master_1
+for child2
+for child3
diff --git a/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result b/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result
index 04e5ed6d..4d161a2f 100644
--- a/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/plugin_load_add_all.result
@@ -3,5 +3,9 @@
#
select * from mysql.plugin;
name dl
+select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA = "information_schema" and TABLE_NAME like "SPIDER_%";
+TABLE_NAME
+SPIDER_ALLOC_MEM
+SPIDER_WRAPPER_PROTOCOLS
create table t (c int) Engine=SPIDER;
drop table t;
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
index f2cab6b0..83dab07f 100644
--- 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
@@ -5,11 +5,12 @@ child2_2
child2_3
for child3
for slave1_1
+include/start_slave.inc
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
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701,10000,20000,30000
connection slave1_1;
for slave1_1
for master_1
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 e84d42bb..239402a5 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
@@ -5,6 +5,7 @@ child2_2
child2_3
for child3
for slave1_1
+include/start_slave.inc
connection slave1_1;
set @old_spider_slave_trx_isolation= @@spider_slave_trx_isolation;
set global spider_slave_trx_isolation= 1;
diff --git a/storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result b/storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result
index 045ddc43..b84f60a6 120000..100644
--- a/storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result
+++ b/storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result
@@ -1 +1,43 @@
-udf_mysql_func_early.result \ No newline at end of file
+#
+# Test that udf created by inserting into mysql_func works as expected
+#
+CREATE SERVER s_1 FOREIGN DATA WRAPPER mysql OPTIONS (
+HOST 'localhost',
+DATABASE 'auto_test_local',
+USER 'root',
+PASSWORD '',
+SOCKET '$MASTER_1_MYSOCK'
+ );
+CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
+HOST 'localhost',
+DATABASE 'auto_test_remote',
+USER 'root',
+PASSWORD '',
+SOCKET '$CHILD2_1_MYSOCK'
+ );
+connect master_1, localhost, root, , , $MASTER_1_MYPORT, $MASTER_1_MYSOCK;
+connect child2_1, localhost, root, , , $CHILD2_1_MYPORT, $CHILD2_1_MYSOCK;
+connection child2_1;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+CREATE TABLE tbl_a (
+a INT
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+insert into tbl_a values (42);
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+CREATE TABLE tbl_a (
+a INT
+) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
+create temporary table results (a int);
+SELECT SPIDER_DIRECT_SQL('select * from tbl_a', 'results', 'srv "s_2_1", database "auto_test_remote"');
+SPIDER_DIRECT_SQL('select * from tbl_a', 'results', 'srv "s_2_1", database "auto_test_remote"')
+1
+select * from results;
+a
+42
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_28856.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_28856.test
index a1642f7a..9ccfc378 100644
--- a/storage/spider/mysql-test/spider/bugfix/t/mdev_28856.test
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_28856.test
@@ -10,6 +10,9 @@
# This test covers some table params under consideration for inclusion
# in the engine-defined options to be implemented in MDEV-28856.
set spider_same_server_link=1;
+set @old_spider_same_server_link=@@global.spider_same_server_link;
+set global spider_same_server_link=1;
+
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
@@ -153,6 +156,7 @@ select max(d) from t1;
drop table t1, t2;
drop server srv;
+set global spider_same_server_link=@old_spider_same_server_link;
--disable_query_log
--disable_result_log
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test
new file mode 100644
index 00000000..ebd08edc
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_30727.test
@@ -0,0 +1,30 @@
+CREATE FUNCTION spider_direct_sql RETURNS INT SONAME 'ha_spider.so';
+--error ER_CANT_INITIALIZE_UDF
+SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"');
+
+CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
+--error ER_CANT_INITIALIZE_UDF
+SELECT spider_bg_direct_sql ('SELECT * FROM s','a','srv "b"');
+
+CREATE FUNCTION spider_copy_tables RETURNS INT SONAME 'ha_spider.so';
+--error ER_CANT_INITIALIZE_UDF
+SELECT spider_copy_tables ('t', '0', '0');
+
+# spider_flush_table_mon_cache does not require spider init to function
+CREATE FUNCTION spider_flush_table_mon_cache RETURNS INT SONAME 'ha_spider.so';
+SELECT spider_flush_table_mon_cache ();
+
+# The function functions properly after the plugin is installed
+install soname 'ha_spider';
+
+--error ER_FOREIGN_SERVER_DOESNT_EXIST
+SELECT spider_direct_sql ('SELECT * FROM s','a','srv "b"');
+
+call mtr.add_suppression(".*\\[Error\\] (mysqld|mariadbd): Can't find record in 'spider_tables'");
+--error ER_KEY_NOT_FOUND
+SELECT spider_copy_tables ('t', '0', '0');
+
+SELECT spider_flush_table_mon_cache ();
+
+--disable_query_log
+--source ../../include/clean_up_spider.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33242.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33242.test
new file mode 100644
index 00000000..215dab25
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33242.test
@@ -0,0 +1,6 @@
+set @old_old_mode=@@global.old_mode;
+set global old_mode=4;
+INSTALL SONAME 'ha_spider.so';
+set global old_mode=@old_old_mode;
+--disable_query_log
+--source ../../include/clean_up_spider.inc
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33434.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33434.test
new file mode 100644
index 00000000..dd9f882f
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33434.test
@@ -0,0 +1,15 @@
+--echo #
+--echo # MDEV-33434 MDEV-33434 UBSAN null pointer passed as argument 2, which is declared to never be null in spider_udf_direct_sql_create_conn
+--echo #
+
+INSTALL SONAME 'ha_spider';
+SET character_set_connection=ucs2;
+--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
+SELECT SPIDER_DIRECT_SQL('SELECT SLEEP(1)', '', 'srv "dummy", port "3307"');
+--disable_query_log
+--source ../../include/clean_up_spider.inc
+--enable_query_log
+
+--echo #
+--echo # end of test mdev_33434
+--echo #
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33441.opt b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441.opt
new file mode 100644
index 00000000..924ea4e3
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441.opt
@@ -0,0 +1 @@
+--plugin-load-add=ha_spider
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33441.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441.test
new file mode 100644
index 00000000..a2e0ddaf
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441.test
@@ -0,0 +1,10 @@
+--echo #
+--echo # MDEV-33441 No spider variables available is Spider is loaded upon server startup
+--echo #
+
+# We test that at least one spider variable exists.
+set spider_same_server_link=0;
+
+--echo #
+--echo # end of test mdev_33441
+--echo #
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.opt b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.opt
new file mode 100644
index 00000000..28f1ce48
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.opt
@@ -0,0 +1,2 @@
+--plugin-load-add=ha_spider
+--debug-dbug=d,fail_spider_init_retry
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.test
new file mode 100644
index 00000000..6734b477
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33441_fail.test
@@ -0,0 +1,10 @@
+--source include/have_debug.inc
+--echo #
+--echo # MDEV-33441 No spider variables available is Spider is loaded upon server startup
+--echo #
+# We test that when retry fails, spider variables are deleted.
+select * from mysql.plugin;
+show variables like 'spider%';
+--echo #
+--echo # end of test mdev_33441_fail
+--echo #
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33494.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33494.test
new file mode 100644
index 00000000..30beca77
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33494.test
@@ -0,0 +1,11 @@
+# This test tests spider init with global no_zero_date sql mode
+set @old_sql_mode=@@global.sql_mode;
+set global sql_mode=(SELECT CONCAT (@@sql_mode,',no_zero_date'));
+install soname 'ha_spider';
+set global sql_mode=@old_sql_mode;
+
+--disable_query_log
+--disable_result_log
+--source ../../include/clean_up_spider.inc
+--enable_result_log
+--enable_query_log
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt
new file mode 100644
index 00000000..a90c3a39
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.opt
@@ -0,0 +1,2 @@
+--plugin-load-add=ha_spider
+--transaction-read-only=on
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test
new file mode 100644
index 00000000..e2d4d8b4
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538.test
@@ -0,0 +1,2 @@
+# we check that information_schema.SPIDER_ALLOC_MEM exists
+show create table information_schema.SPIDER_ALLOC_MEM;
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test
new file mode 100644
index 00000000..fafc2fdb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33538_fail_init.test
@@ -0,0 +1,17 @@
+call mtr.add_suppression("\\[ERROR\\] SPIDER plugin initialization failed");
+call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER' registration as a STORAGE ENGINE failed.");
+call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_WRAPPER_PROTOCOLS' registration as a INFORMATION SCHEMA failed.");
+call mtr.add_suppression(".*\\[ERROR\\] Plugin 'SPIDER_ALLOC_MEM' registration as a INFORMATION SCHEMA failed.");
+# We create a table with identical name of the spider system table, to
+# fail the spider init query ([ERROR] SPIDER plugin initialization
+# failed at 'alter table mysql.spider_tables add column if not exists
+# link_id int not null default 0 after table_name, drop primary key,
+# add primary key (db_name, table_name, link_id), algorithm=copy,
+# lock=shared;' by 'Unknown column 'table_name' in 'spider_tables'')
+# This will cause the init of spider_alloc_mem to fail because it
+# depends on the main spider plugin.
+create table mysql.spider_tables (c int);
+--let $restart_parameters= --plugin-load-add=ha_spider
+--source include/restart_mysqld.inc
+SELECT * FROM information_schema.SPIDER_ALLOC_MEM;
+SELECT * FROM information_schema.SPIDER_WRAPPER_PROTOCOLS;
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33584.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33584.test
new file mode 100644
index 00000000..88644971
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33584.test
@@ -0,0 +1,11 @@
+# This test tests spider init with global no_zero_date sql mode
+set @old_sql_mode=@@global.sql_mode;
+set global sql_mode='traditional';
+install soname 'ha_spider';
+set global sql_mode=@old_sql_mode;
+
+--disable_query_log
+--disable_result_log
+--source ../../include/clean_up_spider.inc
+--enable_result_log
+--enable_query_log
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_33679.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33679.test
new file mode 100644
index 00000000..eee47a21
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33679.test
@@ -0,0 +1,29 @@
+--echo #
+--echo # MDEV-33679 spider returns parsing failure on valid left join select by translating the on expression to ()
+--echo #
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+
+CREATE TABLE `t1` (`c` INT(10) UNSIGNED NOT NULL, `b` VARCHAR(255) NOT NULL , PRIMARY KEY (`c`) USING BTREE ) ENGINE=MYISAM;
+CREATE TABLE `t2` (`a` INT(10) UNSIGNED NOT NULL, `c` INT(10) UNSIGNED NOT NULL ) ENGINE=MYISAM;
+SET spider_same_server_link= on;
+CREATE TABLE `t1_spider` (`c` INT(10) UNSIGNED NOT NULL, `b` VARCHAR(255) NOT NULL , PRIMARY KEY (`c`) USING BTREE ) COMMENT='wrapper "mysql",srv "srv", table "t1"' ENGINE=SPIDER;
+CREATE TABLE `t2_spider` (`a` INT(10) UNSIGNED NOT NULL, `c` INT(10) UNSIGNED NOT NULL
+, PRIMARY KEY (`a`) USING BTREE
+) COMMENT='wrapper "mysql",srv "srv",table "t2"' ENGINE=SPIDER;
+INSERT INTO t1_spider VALUES(1,'oooo');
+INSERT INTO t2_spider VALUES(1,1);
+SELECT t2_spider.a,t1_spider.c FRoM t2_spider LEFT join t1_spider ON (t2_spider.c = t1_spider.c) WHERE t2_spider.a = 1;
+
+drop table t1, t2, t1_spider, t2_spider;
+drop server srv;
+--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_33731.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_33731.test
new file mode 100644
index 00000000..b98c9620
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_33731.test
@@ -0,0 +1,16 @@
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+CREATE TABLE t (a INT) ENGINE=Spider PARTITION BY LIST (a) PARTITIONS 2 (PARTITION p1 VALUES IN (0,1),PARTITION p2 VALUES IN (2,3));
+--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
+DELETE FROM t PARTITION (p2);
+drop table t;
+
+--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_34003.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test
new file mode 100644
index 00000000..f81259b9
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34003.test
@@ -0,0 +1,20 @@
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+set spider_same_server_link= 1;
+evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+create table t2 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (0,1,0),(1,0,0),(2,0,0);
+create table t1 (c INT KEY,c1 BLOB,c2 TEXT) ENGINE=Spider
+COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
+SELECT * FROM t1 WHERE c=0;
+drop table t1, t2;
+drop server srv;
+--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/plugin_load_add_all.test b/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test
index 396145fb..35242b20 100644
--- a/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test
+++ b/storage/spider/mysql-test/spider/bugfix/t/plugin_load_add_all.test
@@ -3,5 +3,6 @@
--echo #
# A simple test that tests plugin-load-add=ha_spider
select * from mysql.plugin;
+select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA = "information_schema" and TABLE_NAME like "SPIDER_%";
create table t (c int) Engine=SPIDER;
drop table t;
diff --git a/storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test b/storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test
index 4263560b..de75f0ee 100644
--- a/storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test
+++ b/storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test
@@ -19,8 +19,10 @@ eval create table t0 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "$srv",
eval alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "$srv",TABLE "t0"';
--error 12719
select * from t0;
+--replace_result test.t1 test.t0 test.t2 test.t0
--error 12719
select * from t1;
+--replace_result test.t1 test.t0 test.t2 test.t0
--error 12719
select * from t2;
drop table t0, t1, t2;
diff --git a/storage/spider/mysql-test/spider/feature/r/pushdown_case.result b/storage/spider/mysql-test/spider/feature/r/pushdown_case.result
new file mode 100644
index 00000000..613ce377
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/r/pushdown_case.result
@@ -0,0 +1,57 @@
+#
+# MDEV-28993 Spider: Push down CASE statement
+#
+for master_1
+for child2
+for child3
+set spider_same_server_link= 1;
+CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+create table t2 (c int);
+create table t1 (c int) ENGINE=Spider
+COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
+insert into t1 values (42), (3), (848), (100);
+explain select case c when 3 then "three" when 42 then "answer" else "other" end from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select case c when 3 then "three" when 42 then "answer" else "other" end from t1;
+case c when 3 then "three" when 42 then "answer" else "other" end
+answer
+three
+other
+other
+explain select case c when 3 then "three" when 42 then "answer" end from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select case c when 3 then "three" when 42 then "answer" end from t1;
+case c when 3 then "three" when 42 then "answer" end
+answer
+three
+NULL
+NULL
+explain select case when c = 3 then "three" when c = 42 then "answer" else "other" end from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select case when c = 3 then "three" when c = 42 then "answer" else "other" end from t1;
+case when c = 3 then "three" when c = 42 then "answer" else "other" end
+answer
+three
+other
+other
+explain select case when c = 3 then "three" when c = 42 then "answer" end from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select case when c = 3 then "three" when c = 42 then "answer" end from t1;
+case when c = 3 then "three" when c = 42 then "answer" end
+answer
+three
+NULL
+NULL
+drop table t1, t2;
+drop server srv;
+for master_1
+for child2
+for child3
+#
+# end of test pushdown_case
+#
diff --git a/storage/spider/mysql-test/spider/feature/r/pushdown_timestamp_diff.result b/storage/spider/mysql-test/spider/feature/r/pushdown_timestamp_diff.result
new file mode 100644
index 00000000..3acd8912
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/r/pushdown_timestamp_diff.result
@@ -0,0 +1,111 @@
+#
+# MDEV-28992 Spider: Push down TIMESTAMPDIFF function
+#
+for master_1
+for child2
+for child3
+set spider_same_server_link= 1;
+CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+create table t2 (
+a INT,
+b CHAR(1),
+c DATETIME,
+PRIMARY KEY(a)
+);
+CREATE TABLE t1 (
+a INT,
+b CHAR(1),
+c DATETIME,
+PRIMARY KEY(a)
+) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
+INSERT INTO t1 (a, b, c) VALUES
+(1, 'a', '2018-11-01 10:21:39'),
+(2, 'b', '2015-06-30 23:59:59'),
+(3, 'c', '2013-11-01 01:01:01');
+interval year
+explain select a, b, timestampdiff(year, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(year, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(year, '2000-01-01 00:00:00', c)
+1 a 18
+2 b 15
+3 c 13
+interval quarter
+explain select a, b, timestampdiff(quarter, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(quarter, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(quarter, '2000-01-01 00:00:00', c)
+1 a 75
+2 b 61
+3 c 55
+interval month
+explain select a, b, timestampdiff(month, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(month, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(month, '2000-01-01 00:00:00', c)
+1 a 226
+2 b 185
+3 c 166
+interval week
+explain select a, b, timestampdiff(week, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(week, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(week, '2000-01-01 00:00:00', c)
+1 a 982
+2 b 808
+3 c 721
+interval day
+explain select a, b, timestampdiff(day, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(day, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(day, '2000-01-01 00:00:00', c)
+1 a 6879
+2 b 5659
+3 c 5053
+internal hour
+explain select a, b, timestampdiff(hour, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(hour, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(hour, '2000-01-01 00:00:00', c)
+1 a 165106
+2 b 135839
+3 c 121273
+internal minute
+explain select a, b, timestampdiff(minute, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(minute, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(minute, '2000-01-01 00:00:00', c)
+1 a 9906381
+2 b 8150399
+3 c 7276381
+internal second
+explain select a, b, timestampdiff(second, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(second, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(second, '2000-01-01 00:00:00', c)
+1 a 594382899
+2 b 489023999
+3 c 436582861
+internal microsecond
+explain select a, b, timestampdiff(microsecond, '2000-01-01 00:00:00', c) from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Storage engine handles GROUP BY
+select a, b, timestampdiff(microsecond, '2000-01-01 00:00:00', c) from t1;
+a b timestampdiff(microsecond, '2000-01-01 00:00:00', c)
+1 a 594382899000000
+2 b 489023999000000
+3 c 436582861000000
+drop table t1, t2;
+drop server srv;
+for master_1
+for child2
+for child3
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
index 0a147c03..f7d4341c 100644
--- 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
@@ -5,11 +5,12 @@ child2_2
child2_3
for child3
for slave1_1
+include/start_slave.inc
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
+slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701
connection slave1_1;
for slave1_1
for master_1
diff --git a/storage/spider/mysql-test/spider/feature/t/pushdown_case.test b/storage/spider/mysql-test/spider/feature/t/pushdown_case.test
new file mode 100644
index 00000000..b86edceb
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/pushdown_case.test
@@ -0,0 +1,50 @@
+--echo #
+--echo # MDEV-28993 Spider: Push down CASE statement
+--echo #
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+set spider_same_server_link= 1;
+evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+create table t2 (c int);
+create table t1 (c int) ENGINE=Spider
+COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
+insert into t1 values (42), (3), (848), (100);
+
+# everything
+let $query=
+select case c when 3 then "three" when 42 then "answer" else "other" end from t1;
+eval explain $query;
+eval $query;
+
+# no else
+let $query=
+select case c when 3 then "three" when 42 then "answer" end from t1;
+eval explain $query;
+eval $query;
+
+# no value
+let $query=
+select case when c = 3 then "three" when c = 42 then "answer" else "other" end from t1;
+eval explain $query;
+eval $query;
+
+# neither
+let $query=
+select case when c = 3 then "three" when c = 42 then "answer" end from t1;
+eval explain $query;
+eval $query;
+
+drop table t1, t2;
+drop server srv;
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--echo #
+--echo # end of test pushdown_case
+--echo #
diff --git a/storage/spider/mysql-test/spider/feature/t/pushdown_timestamp_diff.test b/storage/spider/mysql-test/spider/feature/t/pushdown_timestamp_diff.test
new file mode 100644
index 00000000..81251860
--- /dev/null
+++ b/storage/spider/mysql-test/spider/feature/t/pushdown_timestamp_diff.test
@@ -0,0 +1,93 @@
+--echo #
+--echo # MDEV-28992 Spider: Push down TIMESTAMPDIFF function
+--echo #
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+
+set spider_same_server_link= 1;
+evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
+OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
+
+create table t2 (
+ a INT,
+ b CHAR(1),
+ c DATETIME,
+ PRIMARY KEY(a)
+);
+CREATE TABLE t1 (
+ a INT,
+ b CHAR(1),
+ c DATETIME,
+ PRIMARY KEY(a)
+) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
+
+INSERT INTO t1 (a, b, c) VALUES
+ (1, 'a', '2018-11-01 10:21:39'),
+ (2, 'b', '2015-06-30 23:59:59'),
+ (3, 'c', '2013-11-01 01:01:01');
+
+--echo interval year
+let $query=
+select a, b, timestampdiff(year, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo interval quarter
+let $query=
+select a, b, timestampdiff(quarter, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo interval month
+let $query=
+select a, b, timestampdiff(month, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo interval week
+let $query=
+select a, b, timestampdiff(week, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo interval day
+let $query=
+select a, b, timestampdiff(day, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo internal hour
+let $query=
+select a, b, timestampdiff(hour, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo internal minute
+let $query=
+select a, b, timestampdiff(minute, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo internal second
+let $query=
+select a, b, timestampdiff(second, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+--echo internal microsecond
+let $query=
+select a, b, timestampdiff(microsecond, '2000-01-01 00:00:00', c) from t1;
+eval explain $query;
+eval $query;
+
+drop table t1, t2;
+drop server srv;
+
+--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/include/clean_up_spider.inc b/storage/spider/mysql-test/spider/include/clean_up_spider.inc
index 1c977bfb..249606ec 100644
--- a/storage/spider/mysql-test/spider/include/clean_up_spider.inc
+++ b/storage/spider/mysql-test/spider/include/clean_up_spider.inc
@@ -3,7 +3,6 @@ DROP FUNCTION spider_copy_tables;
DROP FUNCTION spider_ping_table;
DROP FUNCTION spider_bg_direct_sql;
DROP FUNCTION spider_direct_sql;
---replace_regex /\.dll/.so/
UNINSTALL SONAME IF EXISTS 'ha_spider';
DROP TABLE IF EXISTS mysql.spider_xa;
DROP TABLE IF EXISTS mysql.spider_xa_member;
diff --git a/storage/spider/mysql-test/spider/r/partition_join_pushdown_for_single_partition.result b/storage/spider/mysql-test/spider/r/partition_join_pushdown_for_single_partition.result
index 850546fa..3eed8df2 100644
--- a/storage/spider/mysql-test/spider/r/partition_join_pushdown_for_single_partition.result
+++ b/storage/spider/mysql-test/spider/r/partition_join_pushdown_for_single_partition.result
@@ -86,10 +86,8 @@ SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argum
argument
select `value` from `auto_test_remote2`.`tbl_a` where `value` = 5
select `value2` from `auto_test_remote2`.`tbl_b` where `value2` = 5
-select sum('5') `sum(a.value)`,count('5') `count(b.value2)` from (select 1) t0 join (select 1) t1
select `value` from `auto_test_remote2`.`tbl_a` where `value` = 5
select `value2` from `auto_test_remote2`.`tbl_b` where `value2` = 5
-select sum('5') `sum(a.value)`,count('5') `count(b.value2)` from (select 1) t0 join (select 1) t1
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %'
SELECT value FROM tbl_a ORDER BY value;
value
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 28aaf74f..2f850b26 100644
--- a/storage/spider/mysql-test/spider/r/slave_trx_isolation.result
+++ b/storage/spider/mysql-test/spider/r/slave_trx_isolation.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
connection slave1_1;
set @old_spider_slave_trx_isolation= @@spider_slave_trx_isolation;
set global spider_slave_trx_isolation= 1;
diff --git a/storage/spider/mysql-test/spider/r/spider3_fixes.result b/storage/spider/mysql-test/spider/r/spider3_fixes.result
index 7a80e102..614920be 100644
--- a/storage/spider/mysql-test/spider/r/spider3_fixes.result
+++ b/storage/spider/mysql-test/spider/r/spider3_fixes.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/r/spider3_fixes_part.result b/storage/spider/mysql-test/spider/r/spider3_fixes_part.result
index 937f222f..94390ff7 100644
--- a/storage/spider/mysql-test/spider/r/spider3_fixes_part.result
+++ b/storage/spider/mysql-test/spider/r/spider3_fixes_part.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/r/spider_fixes.result b/storage/spider/mysql-test/spider/r/spider_fixes.result
index 273f37a8..9083ad70 100644
--- a/storage/spider/mysql-test/spider/r/spider_fixes.result
+++ b/storage/spider/mysql-test/spider/r/spider_fixes.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
diff --git a/storage/spider/mysql-test/spider/r/spider_fixes_part.result b/storage/spider/mysql-test/spider/r/spider_fixes_part.result
index 571af94c..a59d2d2b 100644
--- a/storage/spider/mysql-test/spider/r/spider_fixes_part.result
+++ b/storage/spider/mysql-test/spider/r/spider_fixes_part.result
@@ -8,6 +8,7 @@ child3_1
child3_2
child3_3
for slave1_1
+include/start_slave.inc
drop and create databases
connection master_1;
@@ -109,6 +110,7 @@ a b c
2.26
auto_increment with partition
connection master_1;
+include/save_master_pos.inc
connection slave1_1;
connection master_1;
DROP TABLE IF EXISTS t1;
diff --git a/storage/spider/mysql-test/spider/t/slave_test_init.inc b/storage/spider/mysql-test/spider/t/slave_test_init.inc
index 739d8897..84de2c7d 100644
--- a/storage/spider/mysql-test/spider/t/slave_test_init.inc
+++ b/storage/spider/mysql-test/spider/t/slave_test_init.inc
@@ -19,7 +19,7 @@ if (!$SLAVE1_1_SLAVE_STATUS)
MASTER_PORT = $MASTER_1_MYPORT
;
}
-START SLAVE;
+--source include/start_slave.inc
--connection master_1
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
--connection slave1_1
diff --git a/storage/spider/mysql-test/spider/t/spider_fixes_part.opt b/storage/spider/mysql-test/spider/t/spider_fixes_part.opt
new file mode 100644
index 00000000..1f24df45
--- /dev/null
+++ b/storage/spider/mysql-test/spider/t/spider_fixes_part.opt
@@ -0,0 +1 @@
+--log-warnings=3
diff --git a/storage/spider/mysql-test/spider/t/spider_fixes_part.test b/storage/spider/mysql-test/spider/t/spider_fixes_part.test
index bff2e574..9604f83b 100644
--- a/storage/spider/mysql-test/spider/t/spider_fixes_part.test
+++ b/storage/spider/mysql-test/spider/t/spider_fixes_part.test
@@ -488,7 +488,23 @@ if ($HAVE_PARTITION)
if ($USE_REPLICATION)
{
save_master_pos;
+ --source include/save_master_pos.inc
--connection slave1_1
+ --let $rc= `select master_pos_wait('$_master_file', $_master_pos, 300, '')`
+ if (`select $rc is NULL OR $rc < 0`)
+ {
+ --vertical_results
+ show slave status;
+ --horizontal_results
+ show global status;
+ show global variables;
+ --let $MYSQLD_DATADIR= `select @@datadir`
+ --exec $MYSQL_BINLOG -v $MYSQLD_DATADIR/mysqld-relay-bin.000001;
+ # Check that the relay-log file is fully on disk.
+ --exec ls -l $MYSQLD_DATADIR;
+ # After that try to restart the slave SQL thread
+ start slave sql_thread;
+ }
sync_with_master;
--connection master_1
--disable_query_log
diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc
index 92775896..68c5362d 100644
--- a/storage/spider/spd_conn.cc
+++ b/storage/spider/spd_conn.cc
@@ -56,7 +56,7 @@ extern struct charset_info_st *spd_charset_utf8mb3_bin;
extern LEX_CSTRING spider_unique_id;
pthread_mutex_t spider_conn_id_mutex;
pthread_mutex_t spider_ipport_conn_mutex;
-ulonglong spider_conn_id = 1;
+ulonglong spider_conn_id;
extern pthread_attr_t spider_pt_attr;
@@ -93,7 +93,7 @@ extern sql_mode_t pushdown_sql_mode;
HASH spider_open_connections;
uint spider_open_connections_id;
HASH spider_ipport_conns;
-long spider_conn_mutex_id = 0;
+long spider_conn_mutex_id;
const char *spider_open_connections_func_name;
const char *spider_open_connections_file_name;
diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc
index 70ca17f8..4b608721 100644
--- a/storage/spider/spd_copy_tables.cc
+++ b/storage/spider/spd_copy_tables.cc
@@ -298,7 +298,7 @@ int spider_udf_get_copy_tgt_tables(
if (
(error_num = spider_get_sys_tables_connect_info(
- table_tables, tmp_share, 0, mem_root)) ||
+ table_tables, tmp_share, mem_root)) ||
(error_num = spider_get_sys_tables_link_status(
table_tables, tmp_share, 0, mem_root)) ||
(error_num = spider_get_sys_tables_link_idx(
@@ -968,7 +968,12 @@ long long spider_copy_tables_body(
all_link_cnt =
copy_tables->link_idx_count[0] + copy_tables->link_idx_count[1];
if (
- !(tmp_sql = new spider_string[all_link_cnt]) ||
+ !(tmp_sql = new spider_string[all_link_cnt])
+ ) {
+ my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM);
+ goto error;
+ }
+ if (
!(spider = new ha_spider[all_link_cnt])
) {
my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM);
@@ -997,13 +1002,6 @@ long long spider_copy_tables_body(
tmp_spider->share = table_conn->share;
tmp_spider->wide_handler = wide_handler;
wide_handler->trx = copy_tables->trx;
-/*
- if (spider_db_append_set_names(table_conn->share))
- {
- my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM);
- goto error_append_set_names;
- }
-*/
tmp_spider->conns = &table_conn->conn;
tmp_sql[roop_count].init_calc_mem(SPD_MID_COPY_TABLES_BODY_3);
tmp_sql[roop_count].set_charset(copy_tables->access_charset);
@@ -1043,13 +1041,6 @@ long long spider_copy_tables_body(
tmp_spider->share = table_conn->share;
tmp_spider->wide_handler = wide_handler;
wide_handler->trx = copy_tables->trx;
-/*
- if (spider_db_append_set_names(table_conn->share))
- {
- my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM);
- goto error_append_set_names;
- }
-*/
tmp_spider->conns = &table_conn->conn;
tmp_sql[roop_count].init_calc_mem(SPD_MID_COPY_TABLES_BODY_5);
tmp_sql[roop_count].set_charset(copy_tables->access_charset);
@@ -1076,14 +1067,6 @@ long long spider_copy_tables_body(
bulk_insert_rows)))
goto error_db_udf_copy_tables;
-/*
- for (table_conn = copy_tables->table_conn[0];
- table_conn; table_conn = table_conn->next)
- spider_db_free_set_names(table_conn->share);
- for (table_conn = copy_tables->table_conn[1];
- table_conn; table_conn = table_conn->next)
- spider_db_free_set_names(table_conn->share);
-*/
if (table_list->table)
{
(thd->is_error() ? trans_rollback_stmt(thd) : trans_commit_stmt(thd));
@@ -1104,8 +1087,7 @@ long long spider_copy_tables_body(
}
delete [] spider;
}
- if (tmp_sql)
- delete [] tmp_sql;
+ delete [] tmp_sql;
spider_udf_free_copy_tables_alloc(copy_tables);
DBUG_RETURN(1);
@@ -1113,17 +1095,6 @@ long long spider_copy_tables_body(
error_db_udf_copy_tables:
error_create_dbton_handler:
error_init_dbton_handler:
-/*
-error_append_set_names:
-*/
-/*
- for (table_conn = copy_tables->table_conn[0];
- table_conn; table_conn = table_conn->next)
- spider_db_free_set_names(table_conn->share);
- for (table_conn = copy_tables->table_conn[1];
- table_conn; table_conn = table_conn->next)
- spider_db_free_set_names(table_conn->share);
-*/
error:
if (spider)
{
@@ -1181,6 +1152,11 @@ my_bool spider_copy_tables_init_body(
char *message
) {
DBUG_ENTER("spider_copy_tables_init_body");
+ if (!spider_hton_ptr)
+ {
+ strcpy(message, "Plugin 'SPIDER' is not loaded");
+ goto error;
+ }
if (args->arg_count != 3 && args->arg_count != 4)
{
strcpy(message, "spider_copy_tables() requires 3 or 4 arguments");
diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc
index 16d5b836..7c56ede2 100644
--- a/storage/spider/spd_db_conn.cc
+++ b/storage/spider/spd_db_conn.cc
@@ -63,7 +63,7 @@ pthread_mutex_t spider_open_conn_mutex;
const char spider_dig_upper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
/* UTC time zone for timestamp columns */
-Time_zone *UTC = 0;
+Time_zone *UTC;
int spider_db_connect(
const SPIDER_SHARE *share,
@@ -344,7 +344,6 @@ int spider_db_conn_queue_action(
) ||
(
conn->loop_check_queue.records &&
- conn->db_conn->set_loop_check_in_bulk_sql() &&
(error_num = spider_dbton[conn->dbton_id].db_util->
append_loop_check(&sql_str, conn))
) ||
@@ -444,13 +443,6 @@ int spider_db_conn_queue_action(
DBUG_RETURN(error_num);
}
if (
- conn->loop_check_queue.records &&
- !conn->db_conn->set_loop_check_in_bulk_sql() &&
- (error_num = conn->db_conn->set_loop_check((int *) conn->need_mon))
- ) {
- DBUG_RETURN(error_num);
- }
- if (
conn->queued_trx_isolation &&
!conn->queued_semi_trx_isolation &&
conn->queued_trx_isolation_val != conn->trx_isolation &&
@@ -9138,6 +9130,9 @@ int spider_db_udf_ping_table_append_select(
DBUG_RETURN(0);
}
+/* Stack size 33032 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
int spider_db_udf_ping_table_mon_next(
THD *thd,
SPIDER_TABLE_MON *table_mon,
@@ -9284,6 +9279,7 @@ int spider_db_udf_ping_table_mon_next(
delete res;
DBUG_RETURN(error_num);
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
int spider_db_udf_copy_key_row(
spider_string *str,
diff --git a/storage/spider/spd_db_include.cc b/storage/spider/spd_db_include.cc
index a4d7d4b4..514470a2 100644
--- a/storage/spider/spd_db_include.cc
+++ b/storage/spider/spd_db_include.cc
@@ -64,22 +64,6 @@ spider_db_conn::spider_db_conn(
DBUG_VOID_RETURN;
}
-bool spider_db_conn::set_loop_check_in_bulk_sql()
-{
- DBUG_ENTER("spider_db_conn::set_loop_check_in_bulk_sql");
- DBUG_PRINT("info",("spider this=%p", this));
- DBUG_RETURN(FALSE);
-}
-
-int spider_db_conn::set_loop_check(
- int *need_mon
-) {
- DBUG_ENTER("spider_db_conn::set_loop_check");
- DBUG_PRINT("info",("spider this=%p", this));
- /* nothing to do */
- DBUG_RETURN(0);
-}
-
int spider_db_conn::fin_loop_check()
{
st_spider_conn_loop_check *lcptr;
diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h
index c2cbe5f2..4e9d6b1a 100644
--- a/storage/spider/spd_db_include.h
+++ b/storage/spider/spd_db_include.h
@@ -79,7 +79,6 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_HS_LTEQUAL_STR "<="
#define SPIDER_SQL_HS_LTEQUAL_LEN (sizeof(SPIDER_SQL_HS_LTEQUAL_STR) - 1)
-#ifdef ITEM_FUNC_CASE_PARAMS_ARE_PUBLIC
#define SPIDER_SQL_CASE_STR "case "
#define SPIDER_SQL_CASE_LEN (sizeof(SPIDER_SQL_CASE_STR) - 1)
#define SPIDER_SQL_WHEN_STR " when "
@@ -90,7 +89,6 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_ELSE_LEN (sizeof(SPIDER_SQL_ELSE_STR) - 1)
#define SPIDER_SQL_END_STR " end"
#define SPIDER_SQL_END_LEN (sizeof(SPIDER_SQL_END_STR) - 1)
-#endif
#define SPIDER_SQL_USING_STR " using "
#define SPIDER_SQL_USING_LEN (sizeof(SPIDER_SQL_USING_STR) - 1)
@@ -1024,10 +1022,6 @@ public:
Time_zone *time_zone,
int *need_mon
) = 0;
- virtual bool set_loop_check_in_bulk_sql();
- virtual int set_loop_check(
- int *need_mon
- );
virtual int fin_loop_check();
virtual int show_master_status(
SPIDER_TRX *trx,
diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc
index c2f0c6b8..450e1a02 100644
--- a/storage/spider/spd_db_mysql.cc
+++ b/storage/spider/spd_db_mysql.cc
@@ -1191,7 +1191,7 @@ int spider_db_mbase_result::fetch_table_cardinality(
uint num_fields = this->num_fields();
if (num_fields < 12 || num_fields > 14)
{
- DBUG_PRINT("info",("spider num_fields < 12 || num_fields > 13"));
+ DBUG_PRINT("info",("spider num_fields < 12 || num_fields > 14"));
DBUG_RETURN(ER_SPIDER_INVALID_REMOTE_TABLE_INFO_NUM);
}
@@ -3266,110 +3266,6 @@ int spider_db_mbase::set_time_zone(
DBUG_RETURN(0);
}
-bool spider_db_mbase::set_loop_check_in_bulk_sql()
-{
- DBUG_ENTER("spider_db_mbase::set_loop_check_in_bulk_sql");
- DBUG_PRINT("info",("spider this=%p", this));
- DBUG_RETURN(TRUE);
-}
-
-int spider_db_mbase::set_loop_check(
- int *need_mon
-) {
- SPIDER_CONN_LOOP_CHECK *lcptr;
- char sql_buf[MAX_FIELD_WIDTH];
- spider_string sql_str(sql_buf, sizeof(sql_buf), &my_charset_bin);
- DBUG_ENTER("spider_db_mbase::set_loop_check");
- DBUG_PRINT("info",("spider this=%p", this));
- sql_str.init_calc_mem(SPD_MID_DB_MBASE_SET_LOOP_CHECK_1);
- while ((lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_element(
- &conn->loop_check_queue, 0)))
- {
- sql_str.length(0);
- if (sql_str.reserve(SPIDER_SQL_SET_USER_VAL_LEN +
- SPIDER_SQL_LOP_CHK_PRM_PRF_LEN + lcptr->to_name.length +
- SPIDER_SQL_NAME_QUOTE_LEN + SPIDER_SQL_EQUAL_LEN +
- SPIDER_SQL_VALUE_QUOTE_LEN +
- lcptr->merged_value.length + SPIDER_SQL_VALUE_QUOTE_LEN))
- {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- sql_str.q_append(SPIDER_SQL_SET_USER_VAL_STR, SPIDER_SQL_SET_USER_VAL_LEN);
- sql_str.q_append(SPIDER_SQL_LOP_CHK_PRM_PRF_STR,
- SPIDER_SQL_LOP_CHK_PRM_PRF_LEN);
- sql_str.q_append(lcptr->to_name.str, lcptr->to_name.length);
- sql_str.q_append(SPIDER_SQL_NAME_QUOTE_STR, SPIDER_SQL_NAME_QUOTE_LEN);
- sql_str.q_append(SPIDER_SQL_EQUAL_STR, SPIDER_SQL_EQUAL_LEN);
- sql_str.q_append(SPIDER_SQL_VALUE_QUOTE_STR, SPIDER_SQL_VALUE_QUOTE_LEN);
- sql_str.q_append(lcptr->merged_value.str, lcptr->merged_value.length);
- 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);
-
- my_hash_delete(&conn->loop_check_queue, (uchar*) lcptr);
- }
- DBUG_RETURN(0);
-}
-
-int spider_db_mbase::fin_loop_check()
-{
- st_spider_conn_loop_check *lcptr;
- DBUG_ENTER("spider_db_mbase::fin_loop_check");
- DBUG_PRINT("info",("spider this=%p", this));
- if (conn->loop_check_queue.records)
- {
- uint l = 0;
- while ((lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_element(
- &conn->loop_check_queue, l)))
- {
- lcptr->flag = 0;
- ++l;
- }
- my_hash_reset(&conn->loop_check_queue);
- }
- lcptr = conn->loop_check_ignored_first;
- while (lcptr)
- {
- lcptr->flag = 0;
- lcptr = lcptr->next;
- }
- conn->loop_check_ignored_first = NULL;
- lcptr = conn->loop_check_meraged_first;
- while (lcptr)
- {
- lcptr->flag = 0;
- lcptr = lcptr->next;
- }
- conn->loop_check_meraged_first = NULL;
- DBUG_RETURN(0);
-}
-
int spider_db_mbase::exec_simple_sql_with_result(
SPIDER_TRX *trx,
SPIDER_SHARE *share,
@@ -5503,14 +5399,6 @@ int spider_db_mbase_util::open_item_func(
alias_length, use_fields, fields));
}
-static bool item_func_is_timestampdiff(
- const char *func_name,
- int func_name_length
-) {
- return func_name_length == 13 &&
- !strncasecmp("timestampdiff", func_name, func_name_length);
-}
-
static bool not_func_should_be_skipped(
Item_func *item_func
){
@@ -5580,16 +5468,10 @@ int spider_db_mbase_util::check_item_func(
Item_func::Functype func_type = item_func->functype();
DBUG_PRINT("info",("spider functype = %d", func_type));
- const char *func_name = (char*) item_func->func_name();
- int func_name_length = strlen(func_name);
- DBUG_PRINT("info",("spider func_name = %s", func_name));
-
/* The blacklist of the functions that cannot be pushed down */
switch (func_type)
{
case Item_func::TRIG_COND_FUNC:
- case Item_func::CASE_SEARCHED_FUNC:
- case Item_func::CASE_SIMPLE_FUNC:
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
case Item_func::NOT_FUNC:
/* Why the following check is necessary? */
@@ -5598,13 +5480,6 @@ int spider_db_mbase_util::check_item_func(
break;
case Item_func::FUNC_SP:
case Item_func::UDF_FUNC:
- /* Notes on merging regarding MDEV-29447: please refer to the
- following commits for build error or merge conflicts:
- 10.6: 1ed20b993b0dd4e95450cab2e8347e5bf4617a69
- 10.9: dd316b6e20265cfd832bb5585cb4c96e716387c8
- 10.10-11: 3f67f110ba1b23a89c5ede0fbeeb203cf5e164f4
- 11.0-1: 17ba6748afa8834df5658361088e6c8e65aca16f
- Please remove this comment after merging. */
use_pushdown_udf= spider_param_use_pushdown_udf(
spider->wide_handler->trx->thd, spider->share->use_pushdown_udf);
if (!use_pushdown_udf)
@@ -5614,12 +5489,18 @@ int spider_db_mbase_util::check_item_func(
if (spider_db_check_ft_idx(item_func, spider) == MAX_KEY)
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
break;
-#ifndef ITEM_FUNC_TIMESTAMPDIFF_ARE_PUBLIC
- case Item_func::UNKNOWN_FUNC:
- if (item_func_is_timestampdiff(func_name, func_name_length))
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
- break;
-#endif
+ case Item_func::MULT_EQUAL_FUNC:
+ /* If there is still Item_equal by the time of
+ JOIN::make_aggr_tables_info() where the spider group by handler
+ is created, it indicates a bug in the optimizer, because there
+ shouldn't be any. */
+ push_warning_printf(
+ spider->wide_handler->trx->thd, SPIDER_WARN_LEVEL_WARN,
+ ER_INTERNAL_ERROR,
+ ER_THD(spider->wide_handler->trx->thd, ER_INTERNAL_ERROR),
+ "Spider group by handler: Encountered multiple equalities, likely "
+ "an optimizer bug");
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
default:
break;
}
@@ -5661,7 +5542,7 @@ int spider_db_mbase_util::print_item_func(
Item *item, **item_list = item_func->arguments();
Field *field;
spider_string tmp_str;
- uint roop_count, item_count = item_func->argument_count(), start_item = 0;
+ uint i, item_count = item_func->argument_count(), start_item = 0;
LEX_CSTRING org_func_name= {SPIDER_SQL_NULL_CHAR_STR,
SPIDER_SQL_NULL_CHAR_LEN};
const char *func_name = SPIDER_SQL_NULL_CHAR_STR,
@@ -5670,8 +5551,8 @@ int spider_db_mbase_util::print_item_func(
int func_name_length = SPIDER_SQL_NULL_CHAR_LEN,
separator_str_length = SPIDER_SQL_NULL_CHAR_LEN,
last_str_length = SPIDER_SQL_NULL_CHAR_LEN;
- int use_pushdown_udf;
- bool merge_func = FALSE;
+ int use_pushdown_udf, case_when_start, case_when_count;
+ bool merge_func = FALSE, case_with_else;
DBUG_ENTER("spider_db_mbase_util::print_item_func");
DBUG_ASSERT(!check_item_func(item_func, spider, alias, alias_length,
use_fields, fields));
@@ -5989,12 +5870,11 @@ int spider_db_mbase_util::print_item_func(
alias, alias_length, dbton_id, use_fields, fields));
} else if (!strncasecmp("timestampdiff", func_name, func_name_length))
{
-#ifdef ITEM_FUNC_TIMESTAMPDIFF_ARE_PUBLIC
Item_func_timestamp_diff *item_func_timestamp_diff =
(Item_func_timestamp_diff *) item_func;
const char *interval_str;
uint interval_len;
- switch (item_func_timestamp_diff->int_type)
+ switch (item_func_timestamp_diff->get_int_type())
{
case INTERVAL_YEAR:
interval_str = SPIDER_SQL_YEAR_STR;
@@ -6045,7 +5925,7 @@ int spider_db_mbase_util::print_item_func(
str->q_append(SPIDER_SQL_OPEN_PAREN_STR, SPIDER_SQL_OPEN_PAREN_LEN);
str->q_append(interval_str, interval_len);
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
-
+
if ((error_num = spider_db_print_item_type(item_list[0], NULL, spider,
str, alias, alias_length, dbton_id, use_fields, fields)))
DBUG_RETURN(error_num);
@@ -6066,9 +5946,6 @@ int spider_db_mbase_util::print_item_func(
SPIDER_SQL_CLOSE_PAREN_LEN);
}
DBUG_RETURN(0);
-#else
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
-#endif
}
} else if (func_name_length == 14)
{
@@ -6562,7 +6439,83 @@ int spider_db_mbase_util::print_item_func(
DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
case Item_func::CASE_SEARCHED_FUNC:
case Item_func::CASE_SIMPLE_FUNC:
- DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
+ /*
+ Arrangement of arguments:
+ - Item_func_case_searched:
+ when1 when2 ... whenk then1 then2 .. thenk [else]
+ - Item_func_case_simple:
+ value when1 when2 ... whenk then1 then2 .. thenk [else]
+ */
+ if (item_func->functype() == Item_func::CASE_SEARCHED_FUNC)
+ {
+ case_when_start= 0;
+ case_when_count= item_count / 2;
+ case_with_else= item_count % 2;
+ }
+ else
+ {
+ case_when_start= 1;
+ case_when_count= (item_count - 1) / 2;
+ case_with_else= item_count % 2 == 0;
+ }
+ if (str)
+ {
+ if (str->reserve(SPIDER_SQL_CASE_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_CASE_STR, SPIDER_SQL_CASE_LEN);
+ }
+ if (case_when_start > 0)
+ {
+ if ((error_num = spider_db_print_item_type(
+ item_list[0], NULL, spider, str,
+ alias, alias_length, dbton_id, use_fields, fields)))
+ DBUG_RETURN(error_num);
+ }
+ for (i = 0; i < (uint) case_when_count; i++)
+ {
+ if (str)
+ {
+ if (str->reserve(SPIDER_SQL_WHEN_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_WHEN_STR, SPIDER_SQL_WHEN_LEN);
+ }
+ if ((error_num = spider_db_print_item_type(
+ item_list[i + case_when_start], NULL, spider, str,
+ alias, alias_length, dbton_id, use_fields, fields)))
+ DBUG_RETURN(error_num);
+ if (str)
+ {
+ if (str->reserve(SPIDER_SQL_THEN_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_THEN_STR, SPIDER_SQL_THEN_LEN);
+ }
+ if ((error_num = spider_db_print_item_type(
+ item_list[i + case_when_start + case_when_count], NULL, spider, str,
+ alias, alias_length, dbton_id, use_fields, fields)))
+ DBUG_RETURN(error_num);
+ }
+ if (case_with_else)
+ {
+ if (str)
+ {
+ if (str->reserve(SPIDER_SQL_ELSE_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_ELSE_STR, SPIDER_SQL_ELSE_LEN);
+ }
+ if ((error_num = spider_db_print_item_type(
+ item_list[item_count - 1], NULL, spider, str,
+ alias, alias_length, dbton_id, use_fields, fields)))
+ DBUG_RETURN(error_num);
+ }
+ if (str)
+ {
+ if (str->reserve(SPIDER_SQL_END_LEN + SPIDER_SQL_CLOSE_PAREN_LEN))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ str->q_append(SPIDER_SQL_END_STR, SPIDER_SQL_END_LEN);
+ str->q_append(SPIDER_SQL_CLOSE_PAREN_STR,
+ SPIDER_SQL_CLOSE_PAREN_LEN);
+ }
+ DBUG_RETURN(0);
case Item_func::JSON_EXTRACT_FUNC:
func_name = (char*) item_func->func_name();
func_name_length = strlen(func_name);
@@ -6577,6 +6530,18 @@ int spider_db_mbase_util::print_item_func(
last_str = SPIDER_SQL_CLOSE_PAREN_STR;
last_str_length = SPIDER_SQL_CLOSE_PAREN_LEN;
break;
+ case Item_func::MULT_EQUAL_FUNC:
+ /* If there is still Item_equal by the time of
+ JOIN::make_aggr_tables_info() where the spider group by handler
+ is created, it indicates a bug in the optimizer, because there
+ shouldn't be any. */
+ push_warning_printf(
+ spider->wide_handler->trx->thd,
+ SPIDER_WARN_LEVEL_WARN, ER_INTERNAL_ERROR,
+ ER_THD(spider->wide_handler->trx->thd, ER_INTERNAL_ERROR),
+ "Spider group by handler: Encountered multiple equalities, likely "
+ "an optimizer bug");
+ DBUG_RETURN(ER_SPIDER_COND_SKIP_NUM);
default:
THD *thd = spider->wide_handler->trx->thd;
SPIDER_SHARE *share = spider->share;
@@ -6606,13 +6571,13 @@ int spider_db_mbase_util::print_item_func(
Loop through the items of the current function expression to
print its portion of the statement
*/
- for (roop_count = start_item; roop_count < item_count; roop_count++)
+ for (i = start_item; i < item_count; i++)
{
- item = item_list[roop_count];
+ item = item_list[i];
if ((error_num = spider_db_print_item_type(item, field, spider, str,
alias, alias_length, dbton_id, use_fields, fields)))
DBUG_RETURN(error_num);
- if (roop_count == 1)
+ if (i == 1)
{
/* Remaining operands need to be preceded by the separator */
func_name = separator_str;
@@ -6626,7 +6591,7 @@ int spider_db_mbase_util::print_item_func(
}
/* Print the last operand value */
- item = item_list[roop_count];
+ item = item_list[i];
if ((error_num = spider_db_print_item_type(item, field, spider, str,
alias, alias_length, dbton_id, use_fields, fields)))
DBUG_RETURN(error_num);
@@ -7259,11 +7224,9 @@ int spider_mbase_share::init()
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
- if (keys > 0 &&
- !(key_hint = new spider_string[keys])
- ) {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
+ if (keys > 0)
+ if (!(key_hint = new spider_string[keys]))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
for (roop_count = 0; roop_count < keys; roop_count++)
{
key_hint[roop_count].init_calc_mem(SPD_MID_MBASE_SHARE_INIT_2);
@@ -7271,12 +7234,12 @@ int spider_mbase_share::init()
}
DBUG_PRINT("info",("spider key_hint=%p", key_hint));
- if (
- !(table_select = new spider_string[1]) ||
- (keys > 0 &&
- !(key_select = new spider_string[keys])
- ) ||
- (error_num = create_table_names_str()) ||
+ if (!(table_select = new spider_string[1]))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (keys > 0)
+ if (!(key_select = new spider_string[keys]))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if ((error_num = create_table_names_str()) ||
(table_share &&
(
(error_num = create_column_name_str()) ||
@@ -7427,11 +7390,18 @@ int spider_mbase_share::create_table_names_str()
table_names_str = NULL;
db_names_str = NULL;
db_table_str = NULL;
- if (
- !(table_names_str = new spider_string[spider_share->all_link_count]) ||
- !(db_names_str = new spider_string[spider_share->all_link_count]) ||
- !(db_table_str = new spider_string[spider_share->all_link_count])
- ) {
+ if (!(table_names_str = new spider_string[spider_share->all_link_count]))
+ {
+ error_num = HA_ERR_OUT_OF_MEM;
+ goto error;
+ }
+ if (!(db_names_str = new spider_string[spider_share->all_link_count]))
+ {
+ error_num = HA_ERR_OUT_OF_MEM;
+ goto error;
+ }
+ if (!(db_table_str = new spider_string[spider_share->all_link_count]))
+ {
error_num = HA_ERR_OUT_OF_MEM;
goto error;
}
@@ -7580,11 +7550,9 @@ int spider_mbase_share::create_column_name_str()
Field **field;
TABLE_SHARE *table_share = spider_share->table_share;
DBUG_ENTER("spider_mbase_share::create_column_name_str");
- if (
- table_share->fields &&
- !(column_name_str = new spider_string[table_share->fields])
- )
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
+ if (table_share->fields)
+ if (!(column_name_str = new spider_string[table_share->fields]))
+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
for (field = table_share->field, str = column_name_str;
*field; field++, str++)
{
@@ -8360,7 +8328,7 @@ int spider_mbase_handler::init()
&link_for_hash,
sizeof(SPIDER_LINK_FOR_HASH) * share->link_count,
&minimum_select_bitmap,
- table ? sizeof(uchar) * no_bytes_in_map(table->read_set) : 0,
+ table ? sizeof(uchar) * my_bitmap_buffer_size(table->read_set) : 0,
NullS))
) {
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
@@ -14829,7 +14797,7 @@ void spider_mbase_handler::minimum_select_bitmap_create()
Field **field_p;
DBUG_ENTER("spider_mbase_handler::minimum_select_bitmap_create");
DBUG_PRINT("info",("spider this=%p", this));
- memset(minimum_select_bitmap, 0, no_bytes_in_map(table->read_set));
+ memset(minimum_select_bitmap, 0, my_bitmap_buffer_size(table->read_set));
if (
spider->use_index_merge ||
spider->is_clone
@@ -14840,7 +14808,7 @@ void spider_mbase_handler::minimum_select_bitmap_create()
table_share->primary_key == MAX_KEY
) {
/* need all columns */
- memset(minimum_select_bitmap, 0xFF, no_bytes_in_map(table->read_set));
+ memset(minimum_select_bitmap, 0xFF, my_bitmap_buffer_size(table->read_set));
DBUG_VOID_RETURN;
} else {
/* need primary key columns */
diff --git a/storage/spider/spd_db_mysql.h b/storage/spider/spd_db_mysql.h
index 9ccc0e33..50b21117 100644
--- a/storage/spider/spd_db_mysql.h
+++ b/storage/spider/spd_db_mysql.h
@@ -519,11 +519,6 @@ public:
Time_zone *time_zone,
int *need_mon
);
- bool set_loop_check_in_bulk_sql();
- int set_loop_check(
- int *need_mon
- );
- int fin_loop_check();
int exec_simple_sql_with_result(
SPIDER_TRX *trx,
SPIDER_SHARE *share,
diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc
index d345bb04..89c872ee 100644
--- a/storage/spider/spd_direct_sql.cc
+++ b/storage/spider/spd_direct_sql.cc
@@ -364,6 +364,23 @@ int spider_udf_direct_sql_create_conn_key(
DBUG_RETURN(0);
}
+static inline void spider_maybe_memcpy_string(
+ char **dest,
+ char *src,
+ char *tmp,
+ uint *dest_len,
+ uint src_len)
+{
+ *dest_len= src_len;
+ if (src_len)
+ {
+ *dest= tmp;
+ memcpy(*dest, src, src_len);
+ } else
+ *dest= NULL;
+}
+
+
SPIDER_CONN *spider_udf_direct_sql_create_conn(
const SPIDER_DIRECT_SQL *direct_sql,
int *error_num
@@ -433,105 +450,49 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn(
conn->tgt_host = tmp_host;
memcpy(conn->tgt_host, direct_sql->tgt_host, direct_sql->tgt_host_length);
conn->tgt_port = direct_sql->tgt_port;
- conn->tgt_socket_length = direct_sql->tgt_socket_length;
- conn->tgt_socket = tmp_socket;
- memcpy(conn->tgt_socket, direct_sql->tgt_socket,
- direct_sql->tgt_socket_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_socket, direct_sql->tgt_socket, tmp_socket,
+ &conn->tgt_socket_length, direct_sql->tgt_socket_length);
if (!tables_on_different_db_are_joinable)
- {
- conn->tgt_db_length = direct_sql->tgt_default_db_name_length;
- conn->tgt_db = tmp_db;
- memcpy(conn->tgt_db, direct_sql->tgt_default_db_name,
- direct_sql->tgt_default_db_name_length);
- }
- conn->tgt_username_length = direct_sql->tgt_username_length;
- conn->tgt_username = tmp_username;
- memcpy(conn->tgt_username, direct_sql->tgt_username,
- direct_sql->tgt_username_length);
- conn->tgt_password_length = direct_sql->tgt_password_length;
- conn->tgt_password = tmp_password;
- memcpy(conn->tgt_password, direct_sql->tgt_password,
- direct_sql->tgt_password_length);
- conn->tgt_ssl_ca_length = direct_sql->tgt_ssl_ca_length;
- if (conn->tgt_ssl_ca_length)
- {
- conn->tgt_ssl_ca = tmp_ssl_ca;
- memcpy(conn->tgt_ssl_ca, direct_sql->tgt_ssl_ca,
- direct_sql->tgt_ssl_ca_length);
- } else
- conn->tgt_ssl_ca = NULL;
- conn->tgt_ssl_capath_length = direct_sql->tgt_ssl_capath_length;
- if (conn->tgt_ssl_capath_length)
- {
- conn->tgt_ssl_capath = tmp_ssl_capath;
- memcpy(conn->tgt_ssl_capath, direct_sql->tgt_ssl_capath,
- direct_sql->tgt_ssl_capath_length);
- } else
- conn->tgt_ssl_capath = NULL;
- conn->tgt_ssl_cert_length = direct_sql->tgt_ssl_cert_length;
- if (conn->tgt_ssl_cert_length)
- {
- conn->tgt_ssl_cert = tmp_ssl_cert;
- memcpy(conn->tgt_ssl_cert, direct_sql->tgt_ssl_cert,
- direct_sql->tgt_ssl_cert_length);
- } else
- conn->tgt_ssl_cert = NULL;
- conn->tgt_ssl_cipher_length = direct_sql->tgt_ssl_cipher_length;
- if (conn->tgt_ssl_cipher_length)
- {
- conn->tgt_ssl_cipher = tmp_ssl_cipher;
- memcpy(conn->tgt_ssl_cipher, direct_sql->tgt_ssl_cipher,
- direct_sql->tgt_ssl_cipher_length);
- } else
- conn->tgt_ssl_cipher = NULL;
- conn->tgt_ssl_key_length = direct_sql->tgt_ssl_key_length;
- if (conn->tgt_ssl_key_length)
- {
- conn->tgt_ssl_key = tmp_ssl_key;
- memcpy(conn->tgt_ssl_key, direct_sql->tgt_ssl_key,
- direct_sql->tgt_ssl_key_length);
- } else
- conn->tgt_ssl_key = NULL;
- conn->tgt_default_file_length = direct_sql->tgt_default_file_length;
- if (conn->tgt_default_file_length)
- {
- conn->tgt_default_file = tmp_default_file;
- memcpy(conn->tgt_default_file, direct_sql->tgt_default_file,
- direct_sql->tgt_default_file_length);
- } else
- conn->tgt_default_file = NULL;
- conn->tgt_default_group_length = direct_sql->tgt_default_group_length;
- if (conn->tgt_default_group_length)
- {
- conn->tgt_default_group = tmp_default_group;
- memcpy(conn->tgt_default_group, direct_sql->tgt_default_group,
- direct_sql->tgt_default_group_length);
- } else
- conn->tgt_default_group = NULL;
- conn->tgt_dsn_length = direct_sql->tgt_dsn_length;
- if (conn->tgt_dsn_length)
- {
- conn->tgt_dsn = tmp_dsn;
- memcpy(conn->tgt_dsn, direct_sql->tgt_dsn,
- direct_sql->tgt_dsn_length);
- } else
- conn->tgt_dsn = NULL;
- conn->tgt_filedsn_length = direct_sql->tgt_filedsn_length;
- if (conn->tgt_filedsn_length)
- {
- conn->tgt_filedsn = tmp_filedsn;
- memcpy(conn->tgt_filedsn, direct_sql->tgt_filedsn,
- direct_sql->tgt_filedsn_length);
- } else
- conn->tgt_filedsn = NULL;
- conn->tgt_driver_length = direct_sql->tgt_driver_length;
- if (conn->tgt_driver_length)
- {
- conn->tgt_driver = tmp_driver;
- memcpy(conn->tgt_driver, direct_sql->tgt_driver,
- direct_sql->tgt_driver_length);
- } else
- conn->tgt_driver = NULL;
+ spider_maybe_memcpy_string(
+ &conn->tgt_db, direct_sql->tgt_default_db_name, tmp_db,
+ &conn->tgt_db_length, direct_sql->tgt_default_db_name_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_username, direct_sql->tgt_username, tmp_username,
+ &conn->tgt_username_length, direct_sql->tgt_username_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_password, direct_sql->tgt_password, tmp_password,
+ &conn->tgt_password_length, direct_sql->tgt_password_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_ssl_ca, direct_sql->tgt_ssl_ca, tmp_ssl_ca,
+ &conn->tgt_ssl_ca_length, direct_sql->tgt_ssl_ca_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_ssl_capath, direct_sql->tgt_ssl_capath, tmp_ssl_capath,
+ &conn->tgt_ssl_capath_length, direct_sql->tgt_ssl_capath_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_ssl_cert, direct_sql->tgt_ssl_cert, tmp_ssl_cert,
+ &conn->tgt_ssl_cert_length, direct_sql->tgt_ssl_cert_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_ssl_cipher, direct_sql->tgt_ssl_cipher, tmp_ssl_cipher,
+ &conn->tgt_ssl_cipher_length, direct_sql->tgt_ssl_cipher_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_ssl_key, direct_sql->tgt_ssl_key, tmp_ssl_key,
+ &conn->tgt_ssl_key_length, direct_sql->tgt_ssl_key_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_default_file, direct_sql->tgt_default_file, tmp_default_file,
+ &conn->tgt_default_file_length, direct_sql->tgt_default_file_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_default_group, direct_sql->tgt_default_group, tmp_default_group,
+ &conn->tgt_default_group_length, direct_sql->tgt_default_group_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_dsn, direct_sql->tgt_dsn, tmp_dsn,
+ &conn->tgt_dsn_length, direct_sql->tgt_dsn_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_filedsn, direct_sql->tgt_filedsn, tmp_filedsn,
+ &conn->tgt_filedsn_length, direct_sql->tgt_filedsn_length);
+ spider_maybe_memcpy_string(
+ &conn->tgt_driver, direct_sql->tgt_driver, tmp_driver,
+ &conn->tgt_driver_length, direct_sql->tgt_driver_length);
conn->tgt_ssl_vsc = direct_sql->tgt_ssl_vsc;
conn->dbton_id = direct_sql->dbton_id;
conn->conn_need_mon = need_mon;
@@ -1658,6 +1619,11 @@ my_bool spider_direct_sql_init_body(
) {
SPIDER_BG_DIRECT_SQL *bg_direct_sql;
DBUG_ENTER("spider_direct_sql_init_body");
+ if (!spider_hton_ptr)
+ {
+ strcpy(message, "Plugin 'SPIDER' is not loaded");
+ goto error;
+ }
if (args->arg_count != 3)
{
strcpy(message, "spider_(bg)_direct_sql() requires 3 arguments");
diff --git a/storage/spider/spd_i_s.cc b/storage/spider/spd_i_s.cc
index 7db95371..8ae88102 100644
--- a/storage/spider/spd_i_s.cc
+++ b/storage/spider/spd_i_s.cc
@@ -28,6 +28,7 @@
#include "spd_table.h"
extern pthread_mutex_t spider_mem_calc_mutex;
+extern handlerton *spider_hton_ptr;
extern const char *spider_alloc_func_name[SPIDER_MEM_CALC_LIST_NUM];
extern const char *spider_alloc_file_name[SPIDER_MEM_CALC_LIST_NUM];
@@ -63,6 +64,8 @@ static int spider_i_s_alloc_mem_fill_table(
uint roop_count;
TABLE *table = tables->table;
DBUG_ENTER("spider_i_s_alloc_mem_fill_table");
+ if (!spider_hton_ptr)
+ DBUG_RETURN(0);
for (roop_count = 0; roop_count < SPIDER_MEM_CALC_LIST_NUM; roop_count++)
{
table->field[0]->store(roop_count, TRUE);
@@ -177,6 +180,8 @@ static int spider_i_s_wrapper_protocols_fill_table(
SPIDER_DBTON *dbton;
TABLE *table = tables->table;
DBUG_ENTER("spider_i_s_wrapper_protocols_fill_table");
+ if (!spider_hton_ptr)
+ DBUG_RETURN(0);
for (roop_count = 0; roop_count < SPIDER_DBTON_SIZE; roop_count++)
{
dbton = &spider_dbton[roop_count];
diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h
index 0f61984e..3828f19b 100644
--- a/storage/spider/spd_include.h
+++ b/storage/spider/spd_include.h
@@ -250,7 +250,6 @@ enum spider_malloc_id {
SPD_MID_DB_MBASE_RESULT_FETCH_ROW_FROM_TMP_TABLE_3,
SPD_MID_DB_MBASE_ROW_APPEND_ESCAPED_TO_STR_1,
SPD_MID_DB_MBASE_ROW_CLONE_1,
- SPD_MID_DB_MBASE_SET_LOOP_CHECK_1,
SPD_MID_DB_MBASE_SET_SQL_MODE_1,
SPD_MID_DB_MBASE_SET_TIME_ZONE_1,
SPD_MID_DB_MBASE_SET_WAIT_TIMEOUT_1,
@@ -1417,6 +1416,7 @@ typedef struct st_spider_table_mon
st_spider_table_mon *next;
} SPIDER_TABLE_MON;
+/* List of `SPIDER_TABLE_MON's */
typedef struct st_spider_table_mon_list
{
char *key;
diff --git a/storage/spider/spd_init_query.h b/storage/spider/spd_init_query.h
index 35a250c7..ced68e03 100644
--- a/storage/spider/spd_init_query.h
+++ b/storage/spider/spd_init_query.h
@@ -20,8 +20,16 @@
*/
static LEX_STRING spider_init_queries[] = {
+ /* Use the default SQL_MODE for this connection. */
{C_STRING_WITH_LEN(
- "SET @@SQL_MODE = REPLACE(@@SQL_MODE, 'ORACLE', '');"
+ "SET @@SQL_MODE = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,"
+ "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';"
+ )},
+ {C_STRING_WITH_LEN(
+ "SET @@OLD_MODE = CONCAT(@@OLD_MODE, ',UTF8_IS_UTF8MB3');"
+ )},
+ {C_STRING_WITH_LEN(
+ "SET tx_read_only = off;"
)},
{C_STRING_WITH_LEN(
"create table if not exists mysql.spider_xa("
diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc
index 722b4cca..80b40c62 100644
--- a/storage/spider/spd_ping_table.cc
+++ b/storage/spider/spd_ping_table.cc
@@ -50,6 +50,8 @@ extern PSI_mutex_key spd_key_mutex_mon_list_update_status;
extern PSI_mutex_key spd_key_mutex_mon_table_cache;
#endif
+/* Array (of size `spider_udf_table_mon_mutex_count') of hashes of
+`SPIDER_TABLE_MON_LIST'. */
HASH *spider_udf_table_mon_list_hash;
uint spider_udf_table_mon_list_hash_id;
const char *spider_udf_table_mon_list_hash_func_name;
@@ -59,23 +61,43 @@ pthread_mutex_t *spider_udf_table_mon_mutexes;
pthread_cond_t *spider_udf_table_mon_conds;
pthread_mutex_t spider_mon_table_cache_mutex;
+/* A cache to store distinct SPIDER_MON_KEYs with db name, table name
+and link id read from mysql.spider_link_mon_servers table. Initialised
+and populated in spider_init_ping_table_mon_cache(), and used in
+spider_ping_table_cache_compare(). The udf
+spider_flush_table_mon_cache is used to flag a initialisation. */
DYNAMIC_ARRAY spider_mon_table_cache;
uint spider_mon_table_cache_id;
const char *spider_mon_table_cache_func_name;
const char *spider_mon_table_cache_file_name;
ulong spider_mon_table_cache_line_no;
-volatile ulonglong spider_mon_table_cache_version = 0;
-volatile ulonglong spider_mon_table_cache_version_req = 1;
-
+/* The mon table cache version, initialised at 0, and always no
+greater than spider_mon_table_cache_version_req. When the inequality
+is strict, an initialisation of spider_mon_table_cache will be
+triggered. */
+volatile ulonglong spider_mon_table_cache_version;
+/* The required mon table cache version, incremented by one by the
+udf spider_flush_table_mon_cache */
+volatile ulonglong spider_mon_table_cache_version_req;
+
+ /* Get or create a `SPIDER_TABLE_MON_LIST' for a key `str' */
SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list(
SPIDER_TRX *trx,
THD *thd,
- spider_string *str,
+ spider_string *str, /* The key to search in
+ `spider_udf_table_mon_list_hash',
+ usually in the format of
+ "./$db_name/$table_name000000000$link_idx" */
uint conv_name_length,
int link_idx,
char *static_link_id,
uint static_link_id_length,
- uint32 server_id,
+ uint32 server_id, /* The server id of the monitor
+ server, used for creating a new
+ table mon list having a
+ `SPIDER_TABLE_MON' corresponding to
+ the server id as the `current'
+ field */
bool need_lock,
int *error_num
) {
@@ -85,6 +107,7 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list(
ulonglong mon_table_cache_version;
my_hash_value_type hash_value;
DBUG_ENTER("spider_get_ping_table_mon_list");
+ /* Reset the cache if the version does not match the requirement */
if (spider_mon_table_cache_version != spider_mon_table_cache_version_req)
{
SPD_INIT_ALLOC_ROOT(&mem_root, 4096, 0, MYF(MY_WME));
@@ -97,6 +120,9 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list(
free_root(&mem_root, MYF(0));
}
+ /* Search for the table mon list in the hash, if one is not found or
+ if it is found but has the wrong cache version, create and
+ initialise a new one. */
mutex_hash=
spider_udf_calc_hash(str->c_ptr(), spider_udf_table_mon_mutex_count);
DBUG_PRINT("info",("spider hash key=%s", str->c_ptr()));
@@ -113,12 +139,15 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_mon_list(
table_mon_list->mon_table_cache_version != mon_table_cache_version
)
{
+ /* If table_mon_list is found but the cache version does not
+ match, remove it from the hash and free it. */
if (
table_mon_list &&
table_mon_list->mon_table_cache_version != mon_table_cache_version
)
spider_release_ping_table_mon_list_loop(mutex_hash, table_mon_list);
-
+ /* create and initialise `table_mon_list' and insert it into the
+ hash */
if (!(table_mon_list = spider_get_ping_table_tgt(thd, str->c_ptr(),
conv_name_length, link_idx, static_link_id, static_link_id_length,
server_id, str, need_lock, error_num)))
@@ -240,6 +269,14 @@ int spider_release_ping_table_mon_list(
DBUG_RETURN(0);
}
+/*
+ Look for a `SPIDER_MON_KEY` in `spider_mon_table_cache' whose db and
+ table name and link_idx matching `name' and `link_idx' with wild
+ card matching. If a match is found, create `SPIDER_TABLE_MON's from
+ all rows in mysql.spider_link_mon_servers that match the info in the
+ `SPIDER_MON_KEY' and populate the `table_mon_list' with these
+ `SPIDER_TABLE_MON's.
+*/
int spider_get_ping_table_mon(
THD *thd,
SPIDER_TABLE_MON_LIST *table_mon_list,
@@ -316,6 +353,8 @@ int spider_get_ping_table_mon(
goto error;
create_table_mon:
+ /* Find the first row in mysql.spider_link_mon_servers matching the
+ db name, table name and link_idx */
if ((error_num = spider_get_sys_table_by_idx(table_link_mon, table_key,
table_link_mon->s->primary_key, 3)))
{
@@ -323,6 +362,9 @@ create_table_mon:
goto error;
}
+ /* create one `SPIDER_TABLE_MON' per row in
+ mysql.spider_link_mon_servers with matching db name, table name and
+ link_idx, and add it to `table_mon_list'. */
do {
if (!(table_mon = (SPIDER_TABLE_MON *)
spider_bulk_malloc(spider_current_trx, SPD_MID_GET_PING_TABLE_MON_1, MYF(MY_WME | MY_ZEROFILL),
@@ -356,7 +398,7 @@ create_table_mon:
(error_num = spider_get_sys_link_mon_server_id(
table_link_mon, &table_mon->server_id, mem_root)) ||
(error_num = spider_get_sys_link_mon_connect_info(
- table_link_mon, tmp_share, 0, mem_root))
+ table_link_mon, tmp_share, mem_root))
) {
table_link_mon->file->print_error(error_num, MYF(0));
spider_sys_index_end(table_link_mon);
@@ -418,15 +460,21 @@ error:
DBUG_RETURN(error_num);
}
+/*
+ creates and return table_mon_list associated with table with `name'
+ and `link_idx'th link.
+*/
SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt(
THD *thd,
- char *name,
+ char *name, /* The table name, usually fully qualified */
uint name_length,
int link_idx,
char *static_link_id,
uint static_link_id_length,
- uint32 server_id,
- spider_string *str,
+ uint32 server_id, /* The server_id will determine the
+ `current' field of the returned
+ `SPIDER_TABLE_MON_LIST'. */
+ spider_string *str, /* str->c_ptr() == name */
bool need_lock,
int *error_num
) {
@@ -471,6 +519,7 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt(
memcpy(key_str, str->ptr(), table_mon_list->key_length);
tmp_share->access_charset = thd->variables.character_set_client;
+ /* Open mysql.spider_tables */
if (
!(table_tables = spider_open_sys_table(
thd, SPIDER_SYS_TABLES_TABLE_NAME_STR,
@@ -480,6 +529,8 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt(
my_error(*error_num, MYF(0));
goto error;
}
+ /* store db and table names and link idx in mysql.spider_tables for
+ reading */
spider_store_tables_name(table_tables, name, name_length);
if (static_link_id)
{
@@ -503,9 +554,10 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt(
goto error;
}
}
+ /* Populate tmp_share with info read from mysql.spider_tables */
if (
(*error_num = spider_get_sys_tables_connect_info(
- table_tables, tmp_share, 0, &mem_root)) ||
+ table_tables, tmp_share, &mem_root)) ||
(*error_num = spider_get_sys_tables_link_status(
table_tables, tmp_share, 0, &mem_root))
) {
@@ -527,9 +579,8 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt(
tmp_share, name, name_length
)) ||
(*error_num = spider_create_conn_keys(tmp_share)) ||
-/*
- (*error_num = spider_db_create_table_names_str(tmp_share)) ||
-*/
+ /* Pinally, populate `table_mon_list' with newly created
+ `SPIDER_TABLE_MON's */
(*error_num = spider_get_ping_table_mon(
thd, table_mon_list, name, name_length, link_idx, server_id, &mem_root,
need_lock))
@@ -819,6 +870,11 @@ error_open_table_tables:
DBUG_RETURN(error_num);
}
+/*
+ Initialise `spider_mon_table_cache' by scanning the
+ mysql.spider_link_mon_servers table, creating distinct
+ `SPIDER_MON_KEY's with the info and inserting them into the cache.
+*/
int spider_init_ping_table_mon_cache(
THD *thd,
MEM_ROOT *mem_root,
@@ -847,6 +903,7 @@ int spider_init_ping_table_mon_cache(
/* reset */
spider_mon_table_cache.elements = 0;
+ /* start at the first row */
if ((error_num = spider_sys_index_first(table_link_mon,
table_link_mon->s->primary_key)))
{
@@ -863,10 +920,16 @@ int spider_init_ping_table_mon_cache(
mon_key.table_name_length = SPIDER_SYS_LINK_MON_TABLE_TABLE_NAME_SIZE + 1;
mon_key.link_id_length = SPIDER_SYS_LINK_MON_TABLE_LINK_ID_SIZE + 1;
do {
+ /* update content of `mon_key' */
if ((error_num = spider_get_sys_link_mon_key(table_link_mon, &mon_key,
mem_root, &same)))
goto error_get_sys_link_mon_key;
+ /* `mon_key' has changed content. since
+ mysql.spider_link_mon_servers is indexed by db_name,
+ table_name, link_idx, and server_id, it is possible that
+ different server_ids share the same mon_key which only has
+ db_name, table_name, link_idx */
if (!same)
{
mon_key.sort = spider_calc_for_sort(3, mon_key.db_name,
@@ -937,6 +1000,13 @@ error_open_sys_table:
DBUG_RETURN(error_num);
}
+/*
+ Read from msyql.spider_link_mon_servers table fields the db name,
+ table name and link_id and search for them with wild card matching
+ in `spider_mon_table_cache'. store the db name, table name, and
+ link_id of the matching `SPIDER_MON_KEY' back to the table field on
+ success.
+*/
int spider_ping_table_cache_compare(
TABLE *table,
MEM_ROOT *mem_root
@@ -1213,9 +1283,6 @@ long long spider_ping_table_body(
DBUG_PRINT("info",("spider mon_table_result->result_status=SPIDER_LINK_MON_NG 2"));
if (table_mon_list->mon_status != SPIDER_LINK_MON_NG)
{
-/*
- pthread_mutex_lock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_lock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (table_mon_list->mon_status != SPIDER_LINK_MON_NG)
{
@@ -1230,9 +1297,6 @@ long long spider_ping_table_body(
conv_name.c_ptr(), conv_name_length, link_idx, TRUE);
status_changed_to_ng = TRUE;
}
-/*
- pthread_mutex_unlock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_unlock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (status_changed_to_ng)
{
@@ -1286,9 +1350,6 @@ long long spider_ping_table_body(
DBUG_PRINT("info",("spider mon_table_result->result_status=SPIDER_LINK_MON_NG 3"));
if (table_mon_list->mon_status != SPIDER_LINK_MON_NG)
{
-/*
- pthread_mutex_lock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_lock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (table_mon_list->mon_status != SPIDER_LINK_MON_NG)
{
@@ -1303,9 +1364,6 @@ long long spider_ping_table_body(
conv_name.c_ptr(), conv_name_length, link_idx, TRUE);
status_changed_to_ng = TRUE;
}
-/*
- pthread_mutex_unlock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_unlock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (status_changed_to_ng)
{
@@ -1349,9 +1407,6 @@ long long spider_ping_table_body(
mon_table_result->result_status == SPIDER_LINK_MON_NG &&
table_mon_list->mon_status != SPIDER_LINK_MON_NG
) {
-/*
- pthread_mutex_lock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_lock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (table_mon_list->mon_status != SPIDER_LINK_MON_NG)
{
@@ -1366,9 +1421,6 @@ long long spider_ping_table_body(
conv_name.c_ptr(), conv_name_length, link_idx, TRUE);
status_changed_to_ng = TRUE;
}
-/*
- pthread_mutex_unlock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_unlock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (status_changed_to_ng)
{
@@ -1539,9 +1591,9 @@ int spider_ping_table_mon_from_table(
SPIDER_SHARE *share,
int base_link_idx,
uint32 server_id,
- char *conv_name,
+ char *conv_name, /* Usually fully qualified table name */
uint conv_name_length,
- int link_idx,
+ int link_idx, /* The link id to ping */
char *where_clause,
uint where_clause_length,
long monitoring_kind,
@@ -1551,9 +1603,6 @@ int spider_ping_table_mon_from_table(
) {
int error_num = 0, current_mon_count, flags;
uint32 first_sid;
-/*
- THD *thd = trx->thd;
-*/
SPIDER_TABLE_MON_LIST *table_mon_list;
SPIDER_TABLE_MON *table_mon;
SPIDER_MON_TABLE_RESULT mon_table_result;
@@ -1622,6 +1671,7 @@ int spider_ping_table_mon_from_table(
if (monitoring_flag & 1)
flags |= SPIDER_UDF_PING_TABLE_USE_ALL_MONITORING_NODES;
+ /* Get or create `table_mon_list' for `conv_name_str'. */
if (!(table_mon_list = spider_get_ping_table_mon_list(trx, thd,
&conv_name_str, conv_name_length, link_idx,
share->static_link_ids[link_idx],
@@ -1653,6 +1703,8 @@ int spider_ping_table_mon_from_table(
table_mon = table_mon_list->current;
first_sid = table_mon->server_id;
current_mon_count = 1;
+ /* Call spider_ping_table on each table_mon of `table_mon_list',
+ until one succeeds */
while (TRUE)
{
DBUG_PRINT("info",("spider thd->killed=%s",
@@ -1697,16 +1749,13 @@ int spider_ping_table_mon_from_table(
if (!spider_db_udf_ping_table_mon_next(
thd, table_mon, mon_conn, &mon_table_result, conv_name,
conv_name_length, link_idx,
- where_clause, where_clause_length, -1, table_mon_list->list_size,
+ where_clause, where_clause_length, /*first_sid=*/-1, table_mon_list->list_size,
0, 0, 0, flags, monitoring_limit))
{
if (
mon_table_result.result_status == SPIDER_LINK_MON_NG &&
table_mon_list->mon_status != SPIDER_LINK_MON_NG
) {
-/*
- pthread_mutex_lock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_lock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
if (table_mon_list->mon_status != SPIDER_LINK_MON_NG)
{
@@ -1721,9 +1770,6 @@ int spider_ping_table_mon_from_table(
spider_sys_log_tables_link_failed(thd, conv_name,
conv_name_length, link_idx, need_lock);
}
-/*
- pthread_mutex_unlock(&table_mon_list->update_status_mutex);
-*/
pthread_mutex_unlock(&spider_udf_table_mon_mutexes[table_mon_list->mutex_hash]);
}
table_mon_list->last_caller_result = mon_table_result.result_status;
diff --git a/storage/spider/spd_sys_table.cc b/storage/spider/spd_sys_table.cc
index 912e02a7..bd3e7a6f 100644
--- a/storage/spider/spd_sys_table.cc
+++ b/storage/spider/spd_sys_table.cc
@@ -574,6 +574,11 @@ int spider_check_sys_table_for_update_all_columns(
HA_WHOLE_KEY, HA_READ_KEY_EXACT));
}
+/*
+ Creates a key (`table_key') consisting of `col_count' key parts of
+ `idx'th index of the table, then positions an index cursor to that
+ key.
+*/
int spider_get_sys_table_by_idx(
TABLE *table,
char *table_key,
@@ -629,7 +634,7 @@ int spider_sys_index_next_same(
int spider_sys_index_first(
TABLE *table,
- const int idx
+ const int idx /* which index to use */
) {
int error_num;
DBUG_ENTER("spider_sys_index_first");
@@ -871,6 +876,10 @@ void spider_store_xa_member_info(
DBUG_VOID_RETURN;
}
+/*
+ Store db and table names from `name' to `table's corresponding
+ fields
+*/
void spider_store_tables_name(
TABLE *table,
const char *name,
@@ -2149,14 +2158,16 @@ int spider_get_sys_tables(
DBUG_RETURN(0);
}
+/* Read table info from mysql.spider_tables into a `SPIDER_SHARE' */
int spider_get_sys_tables_connect_info(
- TABLE *table,
- SPIDER_SHARE *share,
- int link_idx,
+ TABLE *table, /* The mysql.spider_tables table */
+ SPIDER_SHARE *share, /* The `SPIDER_SHARE' to
+ update info */
MEM_ROOT *mem_root
) {
char *ptr;
int error_num = 0;
+ const int link_idx= 0;
DBUG_ENTER("spider_get_sys_tables_connect_info");
DBUG_PRINT("info",("spider link_idx:%d", link_idx));
if ((ptr = get_field(mem_root, table->field[SPIDER_TABLES_PRIORITY_POS])))
@@ -2431,9 +2442,14 @@ int spider_get_sys_tables_monitoring_binlog_pos_at_failing(
DBUG_RETURN(error_num);
}
+/*
+ Read the link status from mysql.spider_tables into a `SPIDER_SHARE'
+ with default value 1 (`SPIDER_LINK_STATUS_OK')
+*/
int spider_get_sys_tables_link_status(
- TABLE *table,
- SPIDER_SHARE *share,
+ TABLE *table, /* The mysql.spider_tables table */
+ SPIDER_SHARE *share, /* The share to read link
+ status into */
int link_idx,
MEM_ROOT *mem_root
) {
@@ -2607,11 +2623,17 @@ error:
DBUG_RETURN(error_num);
}
+/* Populate `mon_key' from the current row in `table' */
int spider_get_sys_link_mon_key(
- TABLE *table,
- SPIDER_MON_KEY *mon_key,
+ TABLE *table, /* the mysql.spider_link_mon_servers
+ table */
+ SPIDER_MON_KEY *mon_key, /* output, to be populated in this
+ function */
MEM_ROOT *mem_root,
- int *same
+ int *same /* output, true if the data from the
+ current row in the table agrees with
+ existing data in `mon_key' and false
+ otherwise */
) {
char *db_name, *table_name, *link_id;
uint db_name_length, table_name_length, link_id_length;
@@ -2627,6 +2649,7 @@ int spider_get_sys_link_mon_key(
DBUG_RETURN(ER_SPIDER_SYS_TABLE_VERSION_NUM);
}
+ /* get data for `mon_key' from the table record */
if (!(db_name=
get_field(mem_root,
table->field[SPIDER_LINK_MON_SERVERS_DB_NAME_POS])))
@@ -2678,9 +2701,12 @@ int spider_get_sys_link_mon_key(
DBUG_RETURN(0);
}
+/* Get the server id from the spider_link_mon_servers table field */
int spider_get_sys_link_mon_server_id(
- TABLE *table,
- uint32 *server_id,
+ TABLE *table, /* the
+ mysql.spider_link_mon_servers
+ table */
+ uint32 *server_id, /* output to server_id */
MEM_ROOT *mem_root
) {
char *ptr;
@@ -2694,14 +2720,17 @@ int spider_get_sys_link_mon_server_id(
DBUG_RETURN(error_num);
}
+/* Get connect info from the spider_link_mon_servers table fields */
int spider_get_sys_link_mon_connect_info(
- TABLE *table,
- SPIDER_SHARE *share,
- int link_idx,
+ TABLE *table, /* The
+ mysql.spider_link_mon_servers
+ table */
+ SPIDER_SHARE *share, /* The output spider_share */
MEM_ROOT *mem_root
) {
char *ptr;
int error_num = 0;
+ const int link_idx= 0;
DBUG_ENTER("spider_get_sys_link_mon_connect_info");
if (
!table->field[SPIDER_LINK_MON_SERVERS_SERVER_POS]->is_null() &&
@@ -2930,9 +2959,6 @@ int spider_get_link_statuses(
if (
(error_num == HA_ERR_KEY_NOT_FOUND || error_num == HA_ERR_END_OF_FILE)
) {
-/*
- table->file->print_error(error_num, MYF(0));
-*/
DBUG_RETURN(error_num);
}
} else if ((error_num =
diff --git a/storage/spider/spd_sys_table.h b/storage/spider/spd_sys_table.h
index f1983323..ce3897c7 100644
--- a/storage/spider/spd_sys_table.h
+++ b/storage/spider/spd_sys_table.h
@@ -56,6 +56,7 @@
#define SPIDER_SYS_LINK_MON_TABLE_TABLE_NAME_SIZE 64
#define SPIDER_SYS_LINK_MON_TABLE_LINK_ID_SIZE 64
+/* For insertion into `spider_mon_table_cache'. */
class SPIDER_MON_KEY: public SPIDER_SORT
{
public:
@@ -401,7 +402,6 @@ int spider_get_sys_tables(
int spider_get_sys_tables_connect_info(
TABLE *table,
SPIDER_SHARE *share,
- int link_idx,
MEM_ROOT *mem_root
);
@@ -478,7 +478,6 @@ int spider_get_sys_link_mon_server_id(
int spider_get_sys_link_mon_connect_info(
TABLE *table,
SPIDER_SHARE *share,
- int link_idx,
MEM_ROOT *mem_root
);
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 208b804f..4b0690be 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -124,6 +124,11 @@ extern SPIDER_DBTON spider_dbton_mysql;
extern SPIDER_DBTON spider_dbton_mariadb;
SPIDER_THREAD *spider_table_sts_threads;
SPIDER_THREAD *spider_table_crd_threads;
+extern volatile ulonglong spider_mon_table_cache_version;
+extern volatile ulonglong spider_mon_table_cache_version_req;
+extern ulonglong spider_conn_id;
+extern Time_zone *UTC;
+extern ulonglong spider_thread_id;
#ifdef HAVE_PSI_INTERFACE
PSI_mutex_key spd_key_mutex_tbl;
@@ -3468,11 +3473,13 @@ error_alloc_conn_string:
DBUG_RETURN(error_num);
}
+/* Set default connect info of a SPIDER_SHARE if needed */
int spider_set_connect_info_default(
- SPIDER_SHARE *share,
- partition_element *part_elem,
- partition_element *sub_elem,
- TABLE_SHARE *table_share
+ SPIDER_SHARE *share, /* The `SPIDER_SHARE' to set
+ default connect info */
+ partition_element *part_elem, /* partition info used as input */
+ partition_element *sub_elem, /* subpartition info used as input */
+ TABLE_SHARE *table_share /* table share info used as input */
) {
bool check_socket;
bool check_database;
@@ -3706,22 +3713,6 @@ int spider_set_connect_info_default(
}
}
-/*
- if (!share->static_link_ids[roop_count])
- {
- DBUG_PRINT("info",("spider create default static_link_ids"));
- share->static_link_ids_lengths[roop_count] =
- SPIDER_DB_STATIC_LINK_ID_LEN;
- if (
- !(share->static_link_ids[roop_count] = spider_create_string(
- SPIDER_DB_STATIC_LINK_ID_STR,
- share->static_link_ids_lengths[roop_count]))
- ) {
- DBUG_RETURN(HA_ERR_OUT_OF_MEM);
- }
- }
-*/
-
if (port_has_default_value)
{
share->tgt_ports[roop_count] = MYSQL_PORT;
@@ -3811,7 +3802,11 @@ int spider_set_connect_info_default(
DBUG_RETURN(0);
}
-
+/*
+ This function is a no-op if all share->tgt_dbs and
+ share->tgt_table_names are non-null, otherwise it may assign them
+ with db_name and table_name
+*/
int spider_set_connect_info_default_db_table(
SPIDER_SHARE *share,
const char *db_name,
@@ -3897,6 +3892,11 @@ int spider_set_connect_info_default_db_table(
DBUG_RETURN(0);
}
+/*
+ Parse `dbtable_name' into db name and table name, and call
+ spider_set_connect_info_default_db_table() to set the db/table name
+ values of `share' if needed
+*/
int spider_set_connect_info_default_dbtable(
SPIDER_SHARE *share,
const char *dbtable_name,
@@ -4256,12 +4256,12 @@ SPIDER_SHARE *spider_create_share(
share->table.key_info = table_share->key_info;
share->table.read_set = &table_share->all_set;
- if (table_share->keys > 0 &&
- !(share->key_hint = new spider_string[table_share->keys])
- ) {
- *error_num = HA_ERR_OUT_OF_MEM;
- goto error_init_hint_string;
- }
+ if (table_share->keys > 0)
+ if (!(share->key_hint = new spider_string[table_share->keys]))
+ {
+ *error_num = HA_ERR_OUT_OF_MEM;
+ goto error_init_hint_string;
+ }
for (roop_count = 0; roop_count < (int) table_share->keys; roop_count++)
share->key_hint[roop_count].init_calc_mem(SPD_MID_CREATE_SHARE_2);
DBUG_PRINT("info",("spider share->key_hint=%p", share->key_hint));
@@ -5797,7 +5797,7 @@ int spider_open_all_tables(
(error_num = spider_get_sys_tables(
table_tables, &db_name, &table_name, &mem_root)) ||
(error_num = spider_get_sys_tables_connect_info(
- table_tables, &tmp_share, 0, &mem_root)) ||
+ table_tables, &tmp_share, &mem_root)) ||
(error_num = spider_set_connect_info_default(
&tmp_share,
NULL,
@@ -6084,7 +6084,11 @@ int spider_close_connection(
}
spider_rollback(spider_hton_ptr, thd, TRUE);
+
+ Dummy_error_handler deh; // suppress network errors at this stage
+ thd->push_internal_handler(&deh);
spider_free_trx(trx, TRUE, false);
+ thd->pop_internal_handler();
DBUG_RETURN(0);
}
@@ -6255,6 +6259,7 @@ int spider_db_done(
pthread_mutex_destroy(&spider_tbl_mutex);
pthread_attr_destroy(&spider_pt_attr);
+ spider_hton_ptr= NULL;
for (roop_count = 0; roop_count < SPIDER_MEM_CALC_LIST_NUM; roop_count++)
{
if (spider_alloc_func_name[roop_count])
@@ -6346,6 +6351,12 @@ int spider_db_init(
handlerton *spider_hton = (handlerton *)p;
DBUG_ENTER("spider_db_init");
+ spider_mon_table_cache_version= 0;
+ spider_mon_table_cache_version_req= 1;
+ spider_conn_id= 1;
+ spider_conn_mutex_id= 0;
+ UTC = 0;
+ spider_thread_id = 1;
const LEX_CSTRING aria_name={STRING_WITH_LEN("Aria")};
if (!plugin_is_ready(&aria_name, MYSQL_STORAGE_ENGINE_PLUGIN))
DBUG_RETURN(HA_ERR_RETRY_INIT);
@@ -6579,11 +6590,6 @@ int spider_db_init(
spider_udf_table_mon_list_hash[roop_count].array.size_of_element);
}
- if (spider_init_system_tables())
- {
- goto error_system_table_creation;
- }
-
if (!(spider_table_sts_threads = (SPIDER_THREAD *)
spider_bulk_malloc(NULL, SPD_MID_DB_INIT_12, MYF(MY_WME | MY_ZEROFILL),
&spider_table_sts_threads, (uint) (sizeof(SPIDER_THREAD) *
@@ -6592,7 +6598,7 @@ int spider_db_init(
spider_param_table_crd_thread_count()),
NullS))
)
- goto error_alloc_mon_mutxes;
+ goto error_alloc_table_sts_crd_threads;
for (roop_count = 0;
roop_count < (int) spider_param_table_sts_thread_count();
@@ -6653,6 +6659,7 @@ error_init_table_sts_threads:
{
spider_free_sts_threads(&spider_table_sts_threads[roop_count]);
}
+error_alloc_table_sts_crd_threads:
spider_free(NULL, spider_table_sts_threads, MYF(0));
roop_count= spider_udf_table_mon_mutex_count - 1;
error_init_udf_table_mon_list_hash:
@@ -6668,7 +6675,6 @@ error_init_udf_table_mon_list_hash:
error_init_udf_table_mon_cond:
for (; roop_count >= 0; roop_count--)
pthread_cond_destroy(&spider_udf_table_mon_conds[roop_count]);
-error_system_table_creation:
roop_count= spider_udf_table_mon_mutex_count - 1;
error_init_udf_table_mon_mutex:
for (; roop_count >= 0; roop_count--)
diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc
index ebf9a777..b7a92286 100644
--- a/storage/spider/spd_trx.cc
+++ b/storage/spider/spd_trx.cc
@@ -41,7 +41,7 @@ extern struct charset_info_st *spd_charset_utf8mb3_bin;
extern handlerton *spider_hton_ptr;
extern SPIDER_DBTON spider_dbton[SPIDER_DBTON_SIZE];
pthread_mutex_t spider_thread_id_mutex;
-ulonglong spider_thread_id = 1;
+ulonglong spider_thread_id;
#ifdef HAVE_PSI_INTERFACE
extern PSI_mutex_key spd_key_mutex_udf_table;
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index aa4d3662..a79a0764 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -39437,18 +39437,24 @@ my_uca1400_collation_definition_init(MY_CHARSET_LOADER *loader,
*dst= nopad ? my_charset_utf8mb4_unicode_520_nopad_ci :
my_charset_utf8mb4_unicode_520_ci;
break;
+#ifdef HAVE_CHARSET_ucs2
case MY_CS_ENCODING_UCS2:
*dst= nopad ? my_charset_ucs2_unicode_520_nopad_ci :
my_charset_ucs2_unicode_520_ci;
break;
+#endif
+#ifdef HAVE_CHARSET_utf16
case MY_CS_ENCODING_UTF16:
*dst= nopad ? my_charset_utf16_unicode_520_nopad_ci :
my_charset_utf16_unicode_520_ci;
break;
+#endif
+#ifdef HAVE_CHARSET_utf32
case MY_CS_ENCODING_UTF32:
*dst= nopad ? my_charset_utf32_unicode_520_nopad_ci :
my_charset_utf32_unicode_520_ci;
break;
+#endif
}
dst->number= id;
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
index 1af0106e..79c8b9a8 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
@@ -51,7 +51,7 @@ Group=mysql
# 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
+AmbientCapabilities=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
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
index 8cb3ab2a..31f1586f 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
@@ -181,7 +181,7 @@ PrivateNetwork=false
# 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
+AmbientCapabilities=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
diff --git a/support-files/mini-benchmark.sh b/support-files/mini-benchmark.sh
index 18de6dbe..a405b6c4 100755
--- a/support-files/mini-benchmark.sh
+++ b/support-files/mini-benchmark.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# Abort on errors
-set -e
+set -ex
display_help() {
echo "Usage: $(basename "$0") [-h] [--perf] [--perf-flamegraph]"
@@ -10,13 +10,33 @@ display_help() {
echo "regressions."
echo
echo "optional arguments:"
+ echo " --name STRING identifier for the benchmark, added to the "
+ echo " folder name and (if --log is set) the log file "
+ echo " --threads \"STRING\" quoted string of space-separated integers "
+ echo " representing the threads to run."
+ echo " example: --threads \"1 32 64 128\""
+ echo " default: \"1 2 4 8 16\""
+ echo " --duration INTEGER duration of each thread run in seconds"
+ echo " default: 60"
+ echo " --workload STRING sysbench workload to execute"
+ echo " default: oltp_read_write"
+ echo " --log logs the mini-benchmark stdout/stderr into the"
+ echo " benchmark folder."
echo " --perf measure CPU cycles and instruction count in for "
echo " sysbench runs"
echo " --perf-flamegraph record performance counters in perf.data.* and"
echo " generate flamegraphs automatically"
+ echo " --cpu-limit upper limit on the number of CPU cycles (in billions) used for the benchmark"
+ echo " default: 750"
echo " -h, --help display this help and exit"
}
+# Default parameters
+BENCHMARK_NAME='mini-benchmark'
+THREADS='1 2 4 8 16'
+DURATION=60
+WORKLOAD='oltp_read_write'
+
while :
do
case "$1" in
@@ -28,6 +48,31 @@ do
display_version
exit 0
;;
+ --name)
+ shift
+ BENCHMARK_NAME+='-'
+ BENCHMARK_NAME+=$1
+ shift
+ ;;
+ --threads)
+ shift
+ THREADS=$1
+ shift
+ ;;
+ --duration)
+ shift
+ DURATION=$1
+ shift
+ ;;
+ --workload)
+ shift
+ WORKLOAD=$1
+ shift
+ ;;
+ --log)
+ LOG=true
+ shift
+ ;;
--perf)
PERF=true
shift
@@ -36,6 +81,11 @@ do
PERF_RECORD=true
shift
;;
+ --cpu-limit)
+ shift
+ CPU_CYCLE_LIMIT=$1
+ shift
+ ;;
-*)
echo "Error: Unknown option: $1" >&2
## or call function display_help
@@ -47,6 +97,13 @@ do
esac
done
+# Save results of this run in a subdirectory so that they are not overwritten by
+# the next run
+TIMESTAMP="$(date -Iseconds)"
+mkdir "$BENCHMARK_NAME-$TIMESTAMP"
+cd "$BENCHMARK_NAME-$TIMESTAMP" || exit 1
+
+(
# Check that the dependencies of this script are available
if [ ! -e /usr/bin/pgrep ]
then
@@ -62,6 +119,7 @@ fi
# If there are multiple processes, assume the last one is the actual server and
# any potential other ones were just part of the service wrapper chain
+# shellcheck disable=SC2005
MARIADB_SERVER_PID="$(echo "$(pgrep -f mariadbd || pgrep -f mysqld)" | tail -n 1)"
if [ -z "$MARIADB_SERVER_PID" ]
@@ -70,6 +128,12 @@ then
exit 1
fi
+if [ "$PERF" == true ] && [ "$PERF_RECORD" == true ]
+then
+ echo "ERROR: Cannot select both --perf and --perf-flamegraph options simultaneously. Please choose one or the other."
+ exit 1
+fi
+
if [ "$PERF" == true ] || [ "$PERF_RECORD" == true ]
then
if [ ! -e /usr/bin/perf ]
@@ -102,31 +166,31 @@ then
echo "Ensure the MariaDB Server debug symbols are installed"
for x in $(ldd /usr/sbin/mariadbd | grep -oE " /.* ")
do
- rpm -q --whatprovides --qf '%{name}' $x | cut -d : -f 1
+ rpm -q --whatprovides --qf '%{name}' "$x" | cut -d : -f 1
done | sort -u > mariadbd-dependencies.txt
# shellcheck disable=SC2046
debuginfo-install -y mariadb-server $(cat mariadbd-dependencies.txt)
-
- if [ ! $(perf record echo "testing perf" > /dev/null 2>&1) ]
+
+ if ! (perf record echo "testing perf") > /dev/null 2>&1
then
echo "perf does not have permission to run on this system. Skipping."
- PERF=""
+ PERF_COMMAND=""
else
echo "Using 'perf' to record performance counters in perf.data files"
- PERF="perf record -g --freq=99 --output=perf.data --timestamp-filename --pid=$MARIADB_SERVER_PID --"
+ PERF_COMMAND="perf record -g --freq=99 --output=perf.data --timestamp-filename --pid=$MARIADB_SERVER_PID --"
fi
-elif [ -e /usr/bin/perf ]
+elif [ "$PERF" == true ]
then
# If flamegraphs were not requested, log normal perf counters if possible
- if [ ! $(perf stat echo "testing perf" > /dev/null 2>&1) ]
+ if ! (perf stat echo "testing perf") > /dev/null 2>&1
then
echo "perf does not have permission to run on this system. Skipping."
- PERF=""
+ PERF_COMMAND=""
else
echo "Using 'perf' to log basic performance counters for benchmark"
- PERF="perf stat -p $MARIADB_SERVER_PID --"
+ PERF_COMMAND="perf stat -p $MARIADB_SERVER_PID --"
fi
fi
@@ -156,28 +220,23 @@ mariadb -e "
CREATE USER IF NOT EXISTS sbtest@localhost;
GRANT ALL PRIVILEGES ON sbtest.* TO sbtest@localhost"
-sysbench oltp_read_write prepare --tables=20 --table-size=100000 | tee sysbench-prepare.log
+sysbench "$WORKLOAD" prepare --tables=20 --table-size=100000 | tee sysbench-prepare.log
sync && sleep 1 # Ensure writes were propagated to disk
-# Save results of this run in a subdirectory so that they are not overwritten by
-# the next run
-TIMESTAMP="$(date -Iseconds)"
-mkdir "mini-benchmark-$TIMESTAMP"
-cd "mini-benchmark-$TIMESTAMP" || exit 1
-
# Run benchmark with increasing thread counts. The MariaDB Server will be using
# around 300 MB of RAM and mostly reading and writing in RAM, so I/O usage is
# also low. The benchmark will most likely be CPU bound to due to the load
# profile, and also guaranteed to be CPU bound because of being limited to a
# single CPU with 'tasksel'.
-for t in 1 2 4 8 16
+for t in $THREADS
do
# Prepend command with perf if defined
- # Output stderr to stdout as perf outpus everything in stderr
- $PERF $TASKSET_SYSBENCH sysbench oltp_read_write run --threads=$t --time=60 --report-interval=10 2>&1 | tee sysbench-run-$t.log
+ # Output stderr to stdout as perf outputs everything in stderr
+ # shellcheck disable=SC2086
+ $PERF_COMMAND $TASKSET_SYSBENCH sysbench "$WORKLOAD" run --threads=$t --time=$DURATION --report-interval=10 2>&1 | tee sysbench-run-$t.log
done
-sysbench oltp_read_write cleanup --tables=20 | tee sysbench-cleanup.log
+sysbench "$WORKLOAD" cleanup --tables=20 | tee sysbench-cleanup.log
# Store results from 4 thread run in a Gitlab-CI compatible metrics file
grep -oE '[a-z]+:[ ]+[0-9.]+' sysbench-run-4.log | sed -r 's/\s+/ /g' | tail -n 15 > metrics.txt
@@ -195,12 +254,21 @@ then
echo "Total: $(grep -h -e instructions sysbench-run-*.log | sort -k 1 | awk '{s+=$1}END{print s}')"
echo # Newline improves readability
+ if [ -z "$CPU_CYCLE_LIMIT" ]
+ then
+ # 04-04-2024: We found this to be an appropriate default limit after running a few benchmarks
+ # Configure the limit with --cpu-limit if needed
+ CPU_CYCLE_LIMIT=750
+ fi
+ CPU_CYCLE_LIMIT_LONG="${CPU_CYCLE_LIMIT}000000000"
+
# Final verdict based on cpu cycle count
RESULT="$(grep -h -e cycles sysbench-run-*.log | sort -k 1 | awk '{s+=$1}END{print s}')"
- if [ "$RESULT" -gt 850000000000 ]
+ if [ "$RESULT" -gt "$CPU_CYCLE_LIMIT_LONG" ]
then
echo # Newline improves readability
- echo "Benchmark exceeded 8.5 billion cpu cycles, performance most likely regressed!"
+ echo "Benchmark exceeded the allowed limit of ${CPU_CYCLE_LIMIT} billion CPU cycles"
+ echo "Performance most likely regressed!"
exit 1
fi
fi
@@ -216,12 +284,12 @@ if [ "$PERF_RECORD" == true ]
then
for f in perf.data.*
do
- perf script -i $f | stackcollapse-perf.pl | flamegraph.pl --width 3000 > $f.svg
+ perf script -i "$f" | stackcollapse-perf.pl | flamegraph.pl --width 1800 > "$f".svg
done
- echo "Flamegraphs stored in folder mini-benchmark-$TIMESTAMP/"
+ echo "Flamegraphs stored in folder $BENCHMARK_NAME-$TIMESTAMP/"
fi
-# Fallback if CPU cycle count not availalbe: final verdict based on peak QPS
+# Fallback if CPU cycle count not available: final verdict based on peak QPS
RESULT="$(sort -k 9 -h sysbench-run-*.log | tail -n 1 | grep -oE "qps: [0-9]+" | grep -oE "[0-9]+")"
case $RESULT in
''|*[!0-9]*)
@@ -240,3 +308,6 @@ case $RESULT in
fi
;;
esac
+# Record the output into the log file, if requested
+) 2>&1 | ($LOG && tee "$BENCHMARK_NAME"-"$TIMESTAMP".log)
+exit ${PIPESTATUS[0]} # Propagate errors in the sub-shell
diff --git a/support-files/policy/apparmor/usr.sbin.mysqld b/support-files/policy/apparmor/usr.sbin.mysqld
index c60ecd28..732f4b3a 100644
--- a/support-files/policy/apparmor/usr.sbin.mysqld
+++ b/support-files/policy/apparmor/usr.sbin.mysqld
@@ -14,6 +14,7 @@
capability chown,
capability dac_override,
+ capability ipc_lock,
capability setgid,
capability setuid,
capability sys_rawio,
diff --git a/support-files/policy/selinux/mariadb-server.te b/support-files/policy/selinux/mariadb-server.te
index 89846063..ba53c97d 100644
--- a/support-files/policy/selinux/mariadb-server.te
+++ b/support-files/policy/selinux/mariadb-server.te
@@ -25,7 +25,7 @@ require {
class lnk_file read;
class process { getattr signull };
class unix_stream_socket connectto;
- class capability { sys_resource sys_nice };
+ class capability { ipc_lock sys_resource sys_nice };
class tcp_socket { name_bind name_connect };
class file { execute setattr read create getattr execute_no_trans write ioctl open append unlink };
class sock_file { create unlink getattr };
@@ -87,6 +87,8 @@ allow mysqld_t bin_t:file { getattr read execute open execute_no_trans ioctl };
# MariaDB additions
allow mysqld_t self:process setpgid;
+allow mysqld_t self:capability { ipc_lock };
+
# This rule allows port tcp/4444
allow mysqld_t kerberos_port_t:tcp_socket { name_bind name_connect };
# This rule allows port tcp/4567 (tram_port_t may not be available on
diff --git a/tests/async_queries.c b/tests/async_queries.c
index 8509b414..f0b4fab8 100644
--- a/tests/async_queries.c
+++ b/tests/async_queries.c
@@ -358,6 +358,7 @@ handle_option(const struct my_option *opt, const char *arg,
return 0;
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
int
main(int argc, char *argv[])
@@ -433,3 +434,4 @@ main(int argc, char *argv[])
return 0;
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c
index c9e64678..f1cd6deb 100644
--- a/tests/mysql_client_fw.c
+++ b/tests/mysql_client_fw.c
@@ -568,6 +568,9 @@ static int my_process_result(MYSQL *mysql_arg)
#define MAX_RES_FIELDS 50
#define MAX_FIELD_DATA_SIZE 255
+/* Stack usage 18888 with clang */
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static int my_process_stmt_result(MYSQL_STMT *stmt)
{
int field_count;
@@ -656,6 +659,7 @@ static int my_process_stmt_result(MYSQL_STMT *stmt)
mysql_free_result(result);
return row_count;
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
/* Prepare statement, execute, and process result set for given query */
@@ -1430,12 +1434,14 @@ int main(int argc, char **argv)
tests_to_run[i]= NULL;
}
-#ifdef _WIN32
- /* must be the same in C/C and embedded, 1208 on 64bit, 968 on 32bit */
- compile_time_assert(sizeof(MYSQL) == 60*sizeof(void*)+728);
-#else
- /* must be the same in C/C and embedded, 1272 on 64bit, 964 on 32bit */
- compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656);
+/*
+ this limited check is enough, if sizeof(MYSQL) changes, it changes
+ everywhere
+*/
+#if defined __x86_64__
+ compile_time_assert(sizeof(MYSQL) == 1272);
+#elif defined __i386__
+ compile_time_assert(sizeof(MYSQL) == 964);
#endif
if (mysql_server_init(embedded_server_arg_count,
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index ffc4a19e..04c439cf 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -3842,7 +3842,7 @@ static void test_bind_result_ext1()
short i_data;
uchar b_data;
int f_data;
- long bData;
+ int bData;
char d_data[20];
double szData;
MYSQL_BIND my_bind[8];
@@ -3938,7 +3938,7 @@ static void test_bind_result_ext1()
fprintf(stdout, "\n data (float) : %d(%lu)", f_data, length[4]);
fprintf(stdout, "\n data (double) : %s(%lu)", d_data, length[5]);
- fprintf(stdout, "\n data (bin) : %ld(%lu)", bData, length[6]);
+ fprintf(stdout, "\n data (bin) : %d(%lu)", bData, length[6]);
fprintf(stdout, "\n data (str) : %g(%lu)", szData, length[7]);
}
@@ -20564,7 +20564,6 @@ typedef struct {
#ifndef EMBEDDED_LIBRARY
static void test_proxy_header_tcp(const char *ipaddr, int port)
{
-
int rc;
MYSQL_RES *result;
int family = (strchr(ipaddr,':') == NULL)?AF_INET:AF_INET6;
@@ -20639,6 +20638,11 @@ static void test_proxy_header_tcp(const char *ipaddr, int port)
DIE_UNLESS(strncmp(row[0], normalized_addr, addrlen) == 0);
DIE_UNLESS(atoi(row[0] + addrlen+1) == port);
mysql_free_result(result);
+ if (i == 0 && !strcmp(ipaddr,"192.0.2.1"))
+ {
+ /* do "dirty" close, to get aborted message in error log.*/
+ mariadb_cancel(m);
+ }
mysql_close(m);
}
sprintf(query,"DROP USER 'u'@'%s'",normalized_addr);
diff --git a/tpool/tpool_generic.cc b/tpool/tpool_generic.cc
index fd97b446..a4d6c405 100644
--- a/tpool/tpool_generic.cc
+++ b/tpool/tpool_generic.cc
@@ -628,7 +628,7 @@ void thread_pool_generic::check_idle(std::chrono::system_clock::time_point now)
}
/* Switch timer off after 1 minute of idle time */
- if (now - idle_since > max_idle_time)
+ if (now - idle_since > max_idle_time && m_active_threads.empty())
{
idle_since= invalid_timestamp;
switch_timer(timer_state_t::OFF);
@@ -722,13 +722,17 @@ static int throttling_interval_ms(size_t n_threads,size_t concurrency)
/* Create a new worker.*/
bool thread_pool_generic::add_thread()
{
- if (m_thread_creation_pending.test_and_set())
- return false;
-
size_t n_threads = thread_count();
if (n_threads >= m_max_threads)
return false;
+
+ /*
+ Deadlock danger exists, so monitor pool health
+ with maintenance timer.
+ */
+ switch_timer(timer_state_t::ON);
+
if (n_threads >= m_min_threads)
{
auto now = std::chrono::system_clock::now();
@@ -739,12 +743,18 @@ bool thread_pool_generic::add_thread()
Throttle thread creation and wakeup deadlock detection timer,
if is it off.
*/
- switch_timer(timer_state_t::ON);
-
return false;
}
}
+ /* Check and set "thread creation pending" flag before creating the thread. We
+ reset the flag in thread_pool_generic::worker_main in new thread created. The
+ flag must be reset back in case we fail to create the thread. If this flag is
+ not reset all future attempt to create thread for this pool would not work as
+ we would return from here. */
+ if (m_thread_creation_pending.test_and_set())
+ return false;
+
worker_data *thread_data = m_thread_data_cache.get();
m_active_threads.push_back(thread_data);
try
@@ -764,6 +774,7 @@ bool thread_pool_generic::add_thread()
"current number of threads in pool %zu\n", e.what(), thread_count());
warning_written = true;
}
+ m_thread_creation_pending.clear();
return false;
}
return true;
@@ -801,6 +812,7 @@ thread_pool_generic::thread_pool_generic(int min_threads, int max_threads) :
m_tasks_dequeued(),
m_wakeups(),
m_spurious_wakeups(),
+ m_timer_state(timer_state_t::ON),
m_in_shutdown(),
m_timestamp(),
m_long_tasks_count(),
@@ -813,6 +825,7 @@ thread_pool_generic::thread_pool_generic(int min_threads, int max_threads) :
m_maintenance_timer(thread_pool_generic::maintenance_func, this, nullptr)
{
set_concurrency();
+
// start the timer
m_maintenance_timer.set_time(0, (int)m_timer_interval.count());
}
diff --git a/unittest/mysys/CMakeLists.txt b/unittest/mysys/CMakeLists.txt
index 4b947ab7..9dd5e5db 100644
--- a/unittest/mysys/CMakeLists.txt
+++ b/unittest/mysys/CMakeLists.txt
@@ -19,7 +19,7 @@ MY_ADD_TESTS(bitmap base64 my_atomic my_rdtsc lf my_malloc my_getopt dynstring
MY_ADD_TESTS(my_vsnprintf LINK_LIBRARIES strings mysys)
MY_ADD_TESTS(aes LINK_LIBRARIES mysys mysys_ssl)
ADD_DEFINITIONS(${SSL_DEFINES})
-INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
MY_ADD_TESTS(ma_dyncol LINK_LIBRARIES mysys)
IF(WIN32)
diff --git a/unittest/mysys/bitmap-t.c b/unittest/mysys/bitmap-t.c
index 22466355..8e12b2b8 100644
--- a/unittest/mysys/bitmap-t.c
+++ b/unittest/mysys/bitmap-t.c
@@ -29,6 +29,8 @@
uint get_rand_bit(uint bitsize)
{
+ if (bitsize == 0)
+ return 0;
return (rand() % bitsize);
}
@@ -121,6 +123,8 @@ error6:
return TRUE;
}
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
my_bool test_compare_operators(MY_BITMAP *map, uint bitsize)
{
uint i, j, test_bit1, test_bit2, test_bit3,test_bit4;
@@ -226,6 +230,8 @@ error5:
test_bit1);
return TRUE;
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
+
my_bool test_count_bits_set(MY_BITMAP *map, uint bitsize)
{
@@ -266,7 +272,7 @@ my_bool test_get_first_bit(MY_BITMAP *map, uint bitsize)
bitmap_clear_all(map);
for (i=0; i < bitsize; i++)
bitmap_set_bit(map, i);
- if (bitmap_get_first(map) != MY_BIT_NONE)
+ if (bitmap_get_first_clear(map) != MY_BIT_NONE)
goto error2;
bitmap_clear_all(map);
@@ -278,7 +284,7 @@ my_bool test_get_first_bit(MY_BITMAP *map, uint bitsize)
goto error1;
bitmap_set_all(map);
bitmap_clear_bit(map, test_bit);
- if (bitmap_get_first(map) != test_bit)
+ if (bitmap_get_first_clear(map) != test_bit)
goto error2;
bitmap_clear_all(map);
}
@@ -297,14 +303,45 @@ my_bool test_get_next_bit(MY_BITMAP *map, uint bitsize)
uint no_loops= bitsize > 128 ? 128 : bitsize;
for (i=0; i < no_loops; i++)
{
+ uint count= 0, bits_set= 0;
+ bitmap_clear_all(map);
test_bit=get_rand_bit(bitsize);
for (j=0; j < test_bit; j++)
bitmap_set_next(map);
if (!bitmap_is_prefix(map, test_bit))
goto error1;
+ j= bitmap_get_first_set(map);
+ if (j == MY_BIT_NONE)
+ {
+ if (test_bit != 0)
+ goto error1;
+ continue;
+ }
+ count= 1;
+ while ((j= bitmap_get_next_set(map,j)) != MY_BIT_NONE)
+ count++;
+ if (count != test_bit)
+ goto error1;
+
+ if (test_bit < 3)
+ continue;
bitmap_clear_all(map);
+ for (j=1; j < test_bit; j+=2)
+ {
+ bits_set++;
+ bitmap_set_bit(map, j);
+ }
+ if ((j= bitmap_get_first_set(map)) == MY_BIT_NONE)
+ goto error1;
+ count= 1;
+ while ((j= bitmap_get_next_set(map,j)) != MY_BIT_NONE)
+ count++;
+ if (count != bits_set)
+ goto error1;
}
+
return FALSE;
+
error1:
diag("get_next error bitsize= %u, prefix_size= %u", bitsize,test_bit);
return TRUE;
@@ -371,7 +408,7 @@ error5:
my_bool test_compare(MY_BITMAP *map, uint bitsize)
{
MY_BITMAP map2;
- uint32 map2buf[MAX_TESTED_BITMAP_SIZE];
+ my_bitmap_map map2buf[MAX_TESTED_BITMAP_SIZE];
uint i, test_bit;
uint no_loops= bitsize > 128 ? 128 : bitsize;
if (my_bitmap_init(&map2, map2buf, bitsize))
@@ -431,7 +468,7 @@ my_bool test_intersect(MY_BITMAP *map, uint bitsize)
{
uint bitsize2 = 1 + get_rand_bit(MAX_TESTED_BITMAP_SIZE - 1);
MY_BITMAP map2;
- uint32 map2buf[MAX_TESTED_BITMAP_SIZE];
+ my_bitmap_map map2buf[MAX_TESTED_BITMAP_SIZE];
uint i, test_bit1, test_bit2, test_bit3;
if (my_bitmap_init(&map2, map2buf, bitsize2))
{
@@ -477,6 +514,107 @@ error:
return TRUE;
}
+my_bool test_copy(MY_BITMAP *map, uint bitsize)
+{
+ my_bitmap_map buff[16], buff2[16], buff3[16];
+ MY_BITMAP map2, map3;
+ uint rnd_bit;
+
+ my_bitmap_init(&map2, buff, sizeof(buff)*8);
+ my_bitmap_init(&map3, buff2, sizeof(buff)*8);
+ bitmap_set_all(&map2);
+ bitmap_set_all(&map3);
+
+ bitsize= MY_MIN(bitsize, map2.n_bits);
+ bitmap_copy(map, &map2);
+ if (bitmap_bits_set(map) != bitsize)
+ {
+ diag("bitmap_copy failed on bitsize %d", bitsize);
+ return 1;
+ }
+ bitmap_set_prefix(&map2, rnd_bit= get_rand_bit(bitsize)+1);
+ bitmap_export((uchar*) buff3, &map2);
+ bitmap_import(&map3, (uchar*) buff3);
+ if (!bitmap_cmp(&map2, &map3))
+ {
+ diag("bitmap_export/bitmap_import failed on bitsize %d rnd_bit: %d",
+ bitsize, rnd_bit);
+ return 1;
+ }
+ return 0;
+}
+
+static my_bool exec_bitmap_exists_intersection(MY_BITMAP **maps, uint bitsize,
+ uint start, uint end, uint bit)
+{
+ bitmap_clear_all(maps[0]);
+ bitmap_clear_all(maps[1]);
+ bitmap_set_bit(maps[0], bit);
+ bitmap_set_bit(maps[1], bit);
+ return bitmap_exists_intersection(maps, 2, start, end);
+}
+
+my_bool test_bitmap_exists_intersection(MY_BITMAP *map, uint bitsize)
+{
+ MY_BITMAP map2;
+ uint start_bit, end_bit, rnd_bit;
+ MY_BITMAP *maps[2];
+ maps[0]= map;
+ maps[1]= &map2;
+
+ my_bitmap_init(&map2, 0, bitsize);
+ bitmap_clear_all(map);
+ bitmap_clear_all(&map2);
+
+ start_bit= get_rand_bit(bitsize);
+ end_bit= get_rand_bit(bitsize);
+ if (start_bit > end_bit)
+ swap_variables(uint, start_bit, end_bit);
+ rnd_bit= start_bit+get_rand_bit(end_bit-start_bit);
+
+ if (!exec_bitmap_exists_intersection(maps, bitsize, start_bit, end_bit,
+ rnd_bit))
+ goto err;
+
+ start_bit= end_bit= rnd_bit= 0;
+ if (!exec_bitmap_exists_intersection(maps, bitsize, start_bit, end_bit,
+ rnd_bit))
+ goto err;
+
+ start_bit= rnd_bit= 0 ; end_bit= bitsize-1;
+ if (!exec_bitmap_exists_intersection(maps, bitsize, start_bit, end_bit,
+ rnd_bit))
+ goto err;
+
+ start_bit= rnd_bit= end_bit= bitsize-1;
+ if (!exec_bitmap_exists_intersection(maps, bitsize, start_bit, end_bit,
+ rnd_bit))
+ goto err;
+
+ if (bitsize > 1)
+ {
+ start_bit= end_bit= 1 ; rnd_bit= 0;
+ if (exec_bitmap_exists_intersection(maps, bitsize, start_bit, end_bit,
+ rnd_bit))
+ goto err;
+
+ start_bit= end_bit= bitsize-1 ; rnd_bit= bitsize-2;
+ if (exec_bitmap_exists_intersection(maps, bitsize, start_bit, end_bit,
+ rnd_bit))
+ goto err;
+ }
+
+ my_bitmap_free(&map2);
+ return 0;
+err:
+ diag("bitmap_exist_intersection failed on bitsize: %d start_bit: %d "
+ "end_bit: %d rnd_bit: %d",
+ bitsize, start_bit, end_bit, rnd_bit);
+ my_bitmap_free(&map2);
+ return 1;
+}
+
+
my_bool do_test(uint bitsize)
{
MY_BITMAP map;
@@ -515,6 +653,12 @@ my_bool do_test(uint bitsize)
bitmap_clear_all(&map);
if (test_intersect(&map,bitsize))
goto error;
+ bitmap_clear_all(&map);
+ if (test_copy(&map,bitsize))
+ goto error;
+ bitmap_clear_all(&map);
+ if (test_bitmap_exists_intersection(&map, bitsize))
+ goto error;
return FALSE;
error:
return TRUE;
diff --git a/unittest/mysys/crc32-t.c b/unittest/mysys/crc32-t.c
index 9834d217..7079aeb6 100644
--- a/unittest/mysys/crc32-t.c
+++ b/unittest/mysys/crc32-t.c
@@ -1,4 +1,4 @@
-/* Copyright (c) MariaDB 2020
+/* Copyright (c) MariaDB 2020, 2024
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -19,51 +19,127 @@
#include <tap.h>
#include <string.h>
#include <ctype.h>
-#include <zlib.h>
/*
- Check that optimized crc32 (ieee, or ethernet polynomical) returns the same
- result as zlib (not so well optimized, yet, but trustworthy)
+ The following lookup table oriented computation of CRC-32
+ is based on the Public Domain / Creative Commons CC0 Perl code from
+ http://billauer.co.il/blog/2011/05/perl-crc32-crc-xs-module/
*/
-#define DO_TEST_CRC32(crc,str) \
- ok(crc32(crc,(const Bytef *)str,(uint)(sizeof(str)-1)) == my_checksum(crc, str, sizeof(str)-1), "crc32 '%s'",str)
-/* Check that CRC32-C calculation returns correct result*/
-#define DO_TEST_CRC32C(crc,str,expected) \
- do { \
- unsigned int v = my_crc32c(crc, str, sizeof(str)-1); \
- printf("crc32(%u,'%s',%zu)=%u\n",crc,str,sizeof(str)-1,v); \
- ok(expected == my_crc32c(crc, str, sizeof(str)-1),"crc32c '%s'",str); \
- }while(0)
+/** Lookup tables */
+static uint32 tab_3309[256], tab_castagnoli[256];
+/** Initialize a lookup table for a CRC-32 polynomial */
+static void init_lookup(uint32 *tab, uint32 polynomial)
+{
+ unsigned i;
+ for (i= 0; i < 256; i++)
+ {
+ uint32 x= i;
+ unsigned j;
+ for (j= 0; j < 8; j++)
+ if (x & 1)
+ x= (x >> 1) ^ polynomial;
+ else
+ x>>= 1;
+ tab[i]= x;
+ }
+}
+
+/** Compute a CRC-32 one octet at a time based on a lookup table */
+static uint crc_(uint32 crc, const void *buf, size_t len, const uint32 *tab)
+{
+ const unsigned char *b= buf;
+ const unsigned char *const end = b + len;
+ crc^= 0xffffffff;
+ while (b != end)
+ crc= ((crc >> 8) & 0xffffff) ^ tab[(crc ^ *b++) & 0xff];
+ crc^= 0xffffffff;
+ return crc;
+}
+
+static uint crc32(uint32 crc, const void *buf, size_t len)
+{ return crc_(crc, buf, len, tab_3309); }
+static uint crc32c(uint32 crc, const void *buf, size_t len)
+{ return crc_(crc, buf, len, tab_castagnoli); }
-#define LONG_STR "1234567890234568900212345678901231213123321212123123123123123"\
- "............................................................................." \
- "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
- "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" \
- "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
+static char buf[16384];
+
+typedef uint (*check)(uint32, const void*, size_t);
+
+static size_t test_buf(check c1, check c2)
+{
+ size_t s;
+ for (s= sizeof buf; s; s--)
+ if (c1(0, buf, s) != c2(0, buf, s))
+ break;
+ return s;
+}
+
+#define DO_TEST_CRC32(crc,str,len) \
+ ok(crc32(crc,str,len) == my_checksum(crc, str, len), \
+ "crc32(%u,'%.*s')", crc, (int) len, str)
+
+/* Check that CRC-32C calculation returns correct result*/
+#define DO_TEST_CRC32C(crc,str,len) \
+ ok(crc32c(crc,str,len) == my_crc32c(crc, str, len), \
+ "crc32c(%u,'%.*s')", crc, (int) len, str)
+
+static const char STR[]=
+ "123456789012345678900212345678901231213123321212123123123123123"
+ "..........................................................................."
+ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+ "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
+ "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz";
int main(int argc __attribute__((unused)),char *argv[])
{
MY_INIT(argv[0]);
- plan(14);
+ init_lookup(tab_3309, 0xedb88320);
+ init_lookup(tab_castagnoli, 0x82f63b78);
+
+ plan(36);
printf("%s\n",my_crc32c_implementation());
- DO_TEST_CRC32(0,"");
- DO_TEST_CRC32(1,"");
- DO_TEST_CRC32(0,"12345");
- DO_TEST_CRC32(1,"12345");
- DO_TEST_CRC32(0,"1234567890123456789");
- DO_TEST_CRC32(0, LONG_STR);
+ DO_TEST_CRC32(0,STR,0);
+ DO_TEST_CRC32(1,STR,0);
+ DO_TEST_CRC32(0,STR,3);
+ DO_TEST_CRC32(0,STR,5);
+ DO_TEST_CRC32(1,STR,5);
+ DO_TEST_CRC32(0,STR,15);
+ DO_TEST_CRC32(0,STR,16);
+ DO_TEST_CRC32(0,STR,19);
+ DO_TEST_CRC32(0,STR,32);
+ DO_TEST_CRC32(0,STR,63);
+ DO_TEST_CRC32(0,STR,64);
+ DO_TEST_CRC32(0,STR,65);
+ DO_TEST_CRC32(0,STR,255);
+ DO_TEST_CRC32(0,STR,256);
+ DO_TEST_CRC32(0,STR,257);
+ DO_TEST_CRC32(0,STR,(sizeof(STR)-1));
ok(0 == my_checksum(0, NULL, 0) , "crc32 data = NULL, length = 0");
- DO_TEST_CRC32C(0,"", 0);
- DO_TEST_CRC32C(1,"", 1);
- DO_TEST_CRC32C(0, "12345", 416359221);
- DO_TEST_CRC32C(1, "12345", 549473433);
- DO_TEST_CRC32C(0, "1234567890123456789", 2366987449U);
- DO_TEST_CRC32C(0, LONG_STR, 3009234172U);
+ DO_TEST_CRC32C(0,STR,0);
+ DO_TEST_CRC32C(1,STR,0);
+ DO_TEST_CRC32C(0,STR,3);
+ DO_TEST_CRC32C(0,STR,5);
+ DO_TEST_CRC32C(1,STR,5);
+ DO_TEST_CRC32C(0,STR,15);
+ DO_TEST_CRC32C(0,STR,16);
+ DO_TEST_CRC32C(0,STR,19);
+ DO_TEST_CRC32C(0,STR,32);
+ DO_TEST_CRC32C(0,STR,63);
+ DO_TEST_CRC32C(0,STR,64);
+ DO_TEST_CRC32C(0,STR,65);
+ DO_TEST_CRC32C(0,STR,255);
+ DO_TEST_CRC32C(0,STR,256);
+ DO_TEST_CRC32C(0,STR,257);
+ DO_TEST_CRC32C(0,STR,(sizeof(STR)-1));
ok(0 == my_crc32c(0, NULL, 0), "crc32c data = NULL, length = 0");
+ memset(buf, 0x5a, sizeof buf);
+ ok(0 == test_buf(my_checksum, crc32), "crc32 with various lengths");
+ ok(0 == test_buf(my_crc32c, crc32c), "crc32c with various lengths");
+
my_end(0);
return exit_status();
}
diff --git a/unittest/mysys/my_getopt-t.c b/unittest/mysys/my_getopt-t.c
index 6ffbfb20..a71c4676 100644
--- a/unittest/mysys/my_getopt-t.c
+++ b/unittest/mysys/my_getopt-t.c
@@ -378,10 +378,10 @@ int main(int argc __attribute__((unused)), char **argv)
"res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull);
run("--ull=-100", NULL);
- ok(res==9 && arg_c==1 && opt_ull==0ULL,
+ ok(res==13 && arg_c==0 && opt_ull==0ULL,
"res:%d, argc:%d, opt_ull:%llu", res, arg_c, opt_ull);
run("--ul=-100", NULL);
- ok(res==9 && arg_c==1 && opt_ul==0UL,
+ ok(res==13 && arg_c==0 && opt_ul==0UL,
"res:%d, argc:%d, opt_ul:%lu", res, arg_c, opt_ul);
my_end(0);
diff --git a/unittest/sql/mf_iocache-t.cc b/unittest/sql/mf_iocache-t.cc
index cc97d3b2..c72e6b7c 100644
--- a/unittest/sql/mf_iocache-t.cc
+++ b/unittest/sql/mf_iocache-t.cc
@@ -96,6 +96,8 @@ void sql_print_error(const char *format, ...)
/*** end of encryption tweaks and stubs ****************************/
+PRAGMA_DISABLE_CHECK_STACK_FRAME
+
static IO_CACHE info;
#define CACHE_SIZE 16384
@@ -472,3 +474,4 @@ int main(int argc __attribute__((unused)),char *argv[])
return exit_status();
}
+PRAGMA_REENABLE_CHECK_STACK_FRAME
diff --git a/vio/vio.c b/vio/vio.c
index 7a98eb2a..bf1e79ae 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -79,6 +79,7 @@ static my_bool has_no_data(Vio *vio __attribute__((unused)))
int vio_pipe_shutdown(Vio *vio, int how)
{
vio->shutdown_flag= how;
+ vio->state= VIO_STATE_SHUTDOWN;
return CancelIoEx(vio->hPipe, NULL);
}
#endif
@@ -98,6 +99,7 @@ static void vio_init(Vio *vio, enum enum_vio_type type,
#endif
memset(vio, 0, sizeof(*vio));
vio->type= type;
+ vio->state= VIO_STATE_ACTIVE;
vio->mysql_socket= MYSQL_INVALID_SOCKET;
mysql_socket_setfd(&vio->mysql_socket, sd);
vio->localhost= flags & VIO_LOCALHOST;
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 002ff274..ffdc76a5 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -288,12 +288,18 @@ size_t vio_write(Vio *vio, const uchar* buf, size_t size)
int vio_socket_shutdown(Vio *vio, int how)
{
- int ret= shutdown(mysql_socket_getfd(vio->mysql_socket), how);
+ int ret;
+ DBUG_ENTER("vio_socket_shutdown");
+ DBUG_PRINT("enter", ("sd: %d", (int)mysql_socket_getfd(vio->mysql_socket)));
+
+ vio->state= VIO_STATE_SHUTDOWN;
+ ret= shutdown(mysql_socket_getfd(vio->mysql_socket), how);
+
#ifdef _WIN32
/* Cancel possible IO in progress (shutdown does not do that on Windows). */
(void) CancelIoEx((HANDLE)mysql_socket_getfd(vio->mysql_socket), NULL);
#endif
- return ret;
+ DBUG_RETURN(ret);
}
@@ -552,7 +558,8 @@ my_bool
vio_should_retry(Vio *vio)
{
DBUG_ENTER("vio_should_retry");
- DBUG_PRINT("info", ("vio_errno: %d", vio_errno(vio)));
+ DBUG_PRINT("info", ("vio_errno: %d state: %d",
+ vio_errno(vio), (int) vio->state));
DBUG_RETURN(vio_errno(vio) == SOCKET_EINTR);
}
@@ -576,28 +583,30 @@ vio_was_timeout(Vio *vio)
int vio_close(Vio *vio)
{
- int r=0;
DBUG_ENTER("vio_close");
DBUG_PRINT("enter", ("sd: %d", (int)mysql_socket_getfd(vio->mysql_socket)));
if (vio->type != VIO_CLOSED)
{
+ MYSQL_SOCKET mysql_socket= vio->mysql_socket;
DBUG_ASSERT(vio->type == VIO_TYPE_TCPIP ||
- vio->type == VIO_TYPE_SOCKET ||
- vio->type == VIO_TYPE_SSL);
+ vio->type == VIO_TYPE_SOCKET ||
+ vio->type == VIO_TYPE_SSL);
- DBUG_ASSERT(mysql_socket_getfd(vio->mysql_socket) >= 0);
- if (mysql_socket_close(vio->mysql_socket))
- r= -1;
- }
- if (r)
- {
- DBUG_PRINT("vio_error", ("close() failed, error: %d",socket_errno));
- /* FIXME: error handling (not critical for MySQL) */
+
+ vio->type= VIO_CLOSED;
+ vio->state= VIO_STATE_CLOSED;
+ vio->mysql_socket= MYSQL_INVALID_SOCKET;
+
+ DBUG_ASSERT(mysql_socket_getfd(mysql_socket) >= 0);
+ if (mysql_socket_close(mysql_socket))
+ {
+ DBUG_PRINT("vio_error", ("close() failed, error: %d",socket_errno));
+ /* FIXME: error handling (not critical for MySQL) */
+ DBUG_RETURN(-1);
+ }
}
- vio->type= VIO_CLOSED;
- vio->mysql_socket= MYSQL_INVALID_SOCKET;
- DBUG_RETURN(r);
+ DBUG_RETURN(0);
}
@@ -917,8 +926,11 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
my_socket sd= mysql_socket_getfd(vio->mysql_socket);
MYSQL_SOCKET_WAIT_VARIABLES(locker, state) /* no ';' */
DBUG_ENTER("vio_io_wait");
- DBUG_PRINT("enter", ("timeout: %d", timeout));
+ DBUG_PRINT("enter", ("sd: %d timeout: %d",
+ (int) mysql_socket_getfd(vio->mysql_socket),
+ timeout));
+ DBUG_ASSERT(vio->state != VIO_STATE_CLOSED);
memset(&pfd, 0, sizeof(pfd));
pfd.fd= sd;
@@ -948,7 +960,7 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
switch ((ret= poll(&pfd, 1, timeout)))
{
case -1:
- DBUG_PRINT("error", ("poll returned -1"));
+ DBUG_PRINT("error", ("poll returned -1 errno: %d", vio_errno(vio)));
/* On error, -1 is returned. */
break;
case 0:
@@ -979,6 +991,7 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
fd_set readfds, writefds, exceptfds;
MYSQL_SOCKET_WAIT_VARIABLES(locker, state) /* no ';' */
DBUG_ENTER("vio_io_wait");
+ DBUG_ASSERT(vio->state != VIO_STATE_CLOSED);
/* Convert the timeout, in milliseconds, to seconds and microseconds. */
if (timeout >= 0)
@@ -1152,6 +1165,7 @@ my_bool vio_is_connected(Vio *vio)
{
uint bytes= 0;
DBUG_ENTER("vio_is_connected");
+ DBUG_ASSERT(vio->state != VIO_STATE_CLOSED);
/*
The first step of detecting an EOF condition is verifying
@@ -1159,6 +1173,7 @@ my_bool vio_is_connected(Vio *vio)
the EOF. An exceptional condition event and/or errors are
interpreted as if there is data to read.
*/
+
if (!vio_io_wait(vio, VIO_IO_EVENT_READ, 0))
DBUG_RETURN(TRUE);
diff --git a/win/packaging/CPackWixConfig.cmake b/win/packaging/CPackWixConfig.cmake
index 4ac4d384..a4b0731b 100644
--- a/win/packaging/CPackWixConfig.cmake
+++ b/win/packaging/CPackWixConfig.cmake
@@ -63,7 +63,7 @@ SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install server")
#Miscellaneous (hidden) components, part of server / or client programs
- FOREACH(comp connect-engine ClientPlugins gssapi-server gssapi-client aws-key-management rocksdb-engine)
+ FOREACH(comp connect-engine ClientPlugins gssapi-server gssapi-client aws-key-management rocksdb-engine plugin-hashicorp-key-management)
STRING(TOUPPER "${comp}" comp)
SET(CPACK_COMPONENT_${comp}_GROUP "MySQLServer")
SET(CPACK_COMPONENT_${comp}_HIDDEN 1)
diff --git a/wsrep-lib/dbsim/db_client_service.hpp b/wsrep-lib/dbsim/db_client_service.hpp
index be6f9ad8..15f32ef8 100644
--- a/wsrep-lib/dbsim/db_client_service.hpp
+++ b/wsrep-lib/dbsim/db_client_service.hpp
@@ -82,6 +82,11 @@ namespace db
return false;
}
+ bool is_prepared_xa() override
+ {
+ return false;
+ }
+
bool is_xa_rollback() override
{
return false;
diff --git a/wsrep-lib/include/wsrep/client_service.hpp b/wsrep-lib/include/wsrep/client_service.hpp
index d47396df..e5aa6499 100644
--- a/wsrep-lib/include/wsrep/client_service.hpp
+++ b/wsrep-lib/include/wsrep/client_service.hpp
@@ -195,6 +195,16 @@ namespace wsrep
virtual bool is_explicit_xa() = 0;
/**
+ * Returns true if the client has an ongoing XA transaction
+ * in prepared state.
+ * Notice: one could simply check if wsrep::transaction is
+ * in s_prepared state. However, wsrep::transaction does not
+ * transition to prepared state for read-only / empty
+ * transactions.
+ */
+ virtual bool is_prepared_xa() = 0;
+
+ /**
* Returns true if the currently executing command is
* a rollback for XA. This is used to avoid setting a
* a deadlock error rollback as it may be unexpected
diff --git a/wsrep-lib/include/wsrep/reporter.hpp b/wsrep-lib/include/wsrep/reporter.hpp
index 3e8c7000..05cc5230 100644
--- a/wsrep-lib/include/wsrep/reporter.hpp
+++ b/wsrep-lib/include/wsrep/reporter.hpp
@@ -105,21 +105,21 @@ namespace wsrep
typedef struct {
double tstamp;
std::string msg;
- } log_msg;
+ } log_msg_t ;
- std::deque<log_msg> err_msg_;
- std::deque<log_msg> warn_msg_;
- std::deque<log_msg> events_;
+ std::deque<log_msg_t> err_msg_;
+ std::deque<log_msg_t> warn_msg_;
+ std::deque<log_msg_t> events_;
size_t const max_msg_;
static void write_log_msg(std::ostream& os,
- const log_msg& msg);
+ const log_msg_t& msg);
static void write_event(std::ostream& os,
- const log_msg& msg);
+ const log_msg_t& msg);
static void write_array(std::ostream& os, const std::string& label,
- const std::deque<log_msg>& events,
+ const std::deque<log_msg_t>& events,
void (*element_writer)(std::ostream& os,
- const log_msg& msg));
+ const log_msg_t& msg));
substates substate_map(enum server_state::state state);
float progress_map(float progress) const;
void write_file(double timestamp);
diff --git a/wsrep-lib/src/client_state.cpp b/wsrep-lib/src/client_state.cpp
index 99c4222f..48501fdd 100644
--- a/wsrep-lib/src/client_state.cpp
+++ b/wsrep-lib/src/client_state.cpp
@@ -68,8 +68,7 @@ void wsrep::client_state::close()
keep_command_error_ = false;
lock.unlock();
if (transaction_.active() &&
- (mode_ != m_local ||
- transaction_.state() != wsrep::transaction::s_prepared))
+ (mode_ != m_local || !client_service_.is_prepared_xa()))
{
client_service_.bf_rollback();
transaction_.after_statement();
diff --git a/wsrep-lib/src/reporter.cpp b/wsrep-lib/src/reporter.cpp
index 511ef819..3b21a199 100644
--- a/wsrep-lib/src/reporter.cpp
+++ b/wsrep-lib/src/reporter.cpp
@@ -176,7 +176,7 @@ static std::string escape_json(const std::string& str)
void
wsrep::reporter::write_log_msg(std::ostream& os,
- const log_msg& msg)
+ const log_msg_t& msg)
{
os << "\t\t{\n";
os << "\t\t\t\"timestamp\": " << std::showpoint << std::setprecision(18)
@@ -187,7 +187,7 @@ wsrep::reporter::write_log_msg(std::ostream& os,
void
wsrep::reporter::write_event(std::ostream& os,
- const log_msg& msg)
+ const log_msg_t& msg)
{
os << "\t\t{\n";
os << "\t\t\t\"timestamp\": " << std::showpoint << std::setprecision(18)
@@ -199,9 +199,9 @@ wsrep::reporter::write_event(std::ostream& os,
void
wsrep::reporter::write_array(std::ostream& os,
const std::string& label,
- const std::deque<log_msg>& msgs,
+ const std::deque<log_msg_t>& msgs,
void (*element_writer)(std::ostream& os,
- const log_msg& msg))
+ const log_msg_t& msg))
{
os << "\t\"" << label << "\": [\n";
for (size_t i(0); i < msgs.size(); ++i)
@@ -351,7 +351,7 @@ wsrep::reporter::report_log_msg(log_level const lvl,
const std::string& msg,
double tstamp)
{
- std::deque<log_msg>& deque(lvl == error ? err_msg_ : warn_msg_);
+ std::deque<log_msg_t>& deque(lvl == error ? err_msg_ : warn_msg_);
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
@@ -363,7 +363,7 @@ wsrep::reporter::report_log_msg(log_level const lvl,
/* Log messages are not expected to be json formatted, so we escape
the message strings here to keep the report file well formatted. */
- log_msg entry({tstamp, escape_json(msg)});
+ log_msg_t entry({tstamp, escape_json(msg)});
deque.push_back(entry);
write_file(tstamp);
}
diff --git a/wsrep-lib/src/transaction.cpp b/wsrep-lib/src/transaction.cpp
index 451e94dd..7d9e31e6 100644
--- a/wsrep-lib/src/transaction.cpp
+++ b/wsrep-lib/src/transaction.cpp
@@ -1400,10 +1400,19 @@ bool wsrep::transaction::abort_or_interrupt(
}
return true;
}
- else if (client_service_.interrupted(lock))
+
+ if (client_service_.interrupted(lock))
{
+ assert(state() != s_must_abort &&
+ state() != s_aborting &&
+ state() != s_aborted);
+
+ // Client was interrupted. Set the appropriate error and abort.
+ // For transactions in prepared state, it is OK to interrupt the
+ // statement, but transaction must remain in prepared state until
+ // commit or rollback.
client_state_.override_error(wsrep::e_interrupted_error);
- if (state() != s_must_abort)
+ if (state() != s_prepared)
{
state(lock, s_must_abort);
}
diff --git a/wsrep-lib/test/mock_client_state.hpp b/wsrep-lib/test/mock_client_state.hpp
index 73b27755..89d38e32 100644
--- a/wsrep-lib/test/mock_client_state.hpp
+++ b/wsrep-lib/test/mock_client_state.hpp
@@ -176,6 +176,11 @@ namespace wsrep
return false;
}
+ bool is_prepared_xa() WSREP_OVERRIDE
+ {
+ return false;
+ }
+
bool is_xa_rollback() WSREP_OVERRIDE
{
return false;
diff --git a/zlib/ChangeLog b/zlib/ChangeLog
index 8707988a..b801a103 100644
--- a/zlib/ChangeLog
+++ b/zlib/ChangeLog
@@ -1,6 +1,16 @@
ChangeLog file for zlib
+Changes in 1.3.1 (22 Jan 2024)
+- Reject overflows of zip header fields in minizip
+- Fix bug in inflateSync() for data held in bit buffer
+- Add LIT_MEM define to use more memory for a small deflate speedup
+- Fix decision on the emission of Zip64 end records in minizip
+- Add bounds checking to ERR_MSG() macro, used by zError()
+- Neutralize zip file traversal attacks in miniunz
+- Fix a bug in ZLIB_DEBUG compiles in check_match()
+- Various portability and appearance improvements
+
Changes in 1.3 (18 Aug 2023)
- Remove K&R function definitions and zlib2ansi
- Fix bug in deflateBound() for level 0 and memLevel 9
diff --git a/zlib/FAQ b/zlib/FAQ
index 55f1cdc2..92f5d3e2 100644
--- a/zlib/FAQ
+++ b/zlib/FAQ
@@ -14,8 +14,7 @@ The latest zlib FAQ is at http://zlib.net/zlib_faq.html
2. Where can I get a Windows DLL version?
The zlib sources can be compiled without change to produce a DLL. See the
- file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the
- precompiled DLL are found in the zlib web site at http://zlib.net/ .
+ file win32/DLL_FAQ.txt in the zlib distribution.
3. Where can I get a Visual Basic interface to zlib?
diff --git a/zlib/README b/zlib/README
index e02fc5aa..c5f91754 100644
--- a/zlib/README
+++ b/zlib/README
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.3 is a general purpose data compression library. All the code is
+zlib 1.3.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
@@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
https://marknelson.us/posts/1997/01/01/zlib-engine.html .
-The changes made in version 1.3 are documented in the file ChangeLog.
+The changes made in version 1.3.1 are documented in the file ChangeLog.
Unsupported third party contributions are provided in directory contrib/ .
@@ -83,7 +83,7 @@ Acknowledgments:
Copyright notice:
- (C) 1995-2023 Jean-loup Gailly and Mark Adler
+ (C) 1995-2024 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/zlib/contrib/nuget/nuget.csproj b/zlib/contrib/nuget/nuget.csproj
new file mode 100644
index 00000000..68627f03
--- /dev/null
+++ b/zlib/contrib/nuget/nuget.csproj
@@ -0,0 +1,43 @@
+<Project Sdk="Microsoft.Build.NoTargets/3.5.6">
+
+ <PropertyGroup>
+ <TargetFramework>net6.0</TargetFramework>
+ <PackageId>madler.zlib.redist</PackageId>
+ <PackageId Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(PackageId).win</PackageId>
+ <PackageId Condition="$([MSBuild]::IsOSPlatform('Linux'))">$(PackageId).linux</PackageId>
+ <PackageId Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(PackageId).osx</PackageId>
+ <Copyright>(C) 1995-2024 Jean-loup Gailly and Mark Adler</Copyright>
+ <version>1.3.1</version>
+ <PackageDescription>NuGet Package for consuming native builds of zlib into .NET without complexity.</PackageDescription>
+ <!--
+ Warns about not having any lib or ref assemblies (.NET Assemblies) in those directories.
+ Native only packages that is to be consumed in .NET should not require these.
+ -->
+ <NoWarn>NU5128</NoWarn>
+ <PackageOutputPath>$(MSBuildProjectDirectory)</PackageOutputPath>
+ <Authors>Jean-loup Gailly and Mark Adler</Authors>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <None Include="../../LICENSE" Pack="true" PackagePath="" />
+ <!-- Package up Windows builds. -->
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/x86/ZlibDll$(Configuration)/zlibwapi.dll" Pack="true" PackagePath="runtimes/win-x86/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/x64/ZlibDll$(Configuration)/zlibwapi.dll" Pack="true" PackagePath="runtimes/win-x64/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/arm/ZlibDll$(Configuration)/zlibwapi.dll" Pack="true" PackagePath="runtimes/win-arm/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/arm64/ZlibDll$(Configuration)/zlibwapi.dll" Pack="true" PackagePath="runtimes/win-arm64/native" />
+ <!-- Include debug symbols as well as we never know if they might actually be needed in the future. -->
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/x86/ZlibDll$(Configuration)/zlibwapi.pdb" Pack="true" PackagePath="runtimes/win-x86/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/x64/ZlibDll$(Configuration)/zlibwapi.pdb" Pack="true" PackagePath="runtimes/win-x64/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/arm/ZlibDll$(Configuration)/zlibwapi.pdb" Pack="true" PackagePath="runtimes/win-arm/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="../vstudio/vc17/arm64/ZlibDll$(Configuration)/zlibwapi.pdb" Pack="true" PackagePath="runtimes/win-arm64/native" />
+ <!-- Package up Linux builds. -->
+ <None Condition="$([MSBuild]::IsOSPlatform('Linux'))" Include="./linux-x86/libz.so" Pack="true" PackagePath="runtimes/linux-x86/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Linux'))" Include="./linux-x64/libz.so" Pack="true" PackagePath="runtimes/linux-x64/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Linux'))" Include="./linux-arm/libz.so" Pack="true" PackagePath="runtimes/linux-arm/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('Linux'))" Include="./linux-arm64/libz.so" Pack="true" PackagePath="runtimes/linux-arm64/native" />
+ <!-- Package up MacOS builds. -->
+ <None Condition="$([MSBuild]::IsOSPlatform('OSX'))" Include="./osx-x64/libz.dylib" Pack="true" PackagePath="runtimes/osx-x64/native" />
+ <None Condition="$([MSBuild]::IsOSPlatform('OSX'))" Include="./osx-arm64/libz.dylib" Pack="true" PackagePath="runtimes/osx-arm64/native" />
+ </ItemGroup>
+
+</Project>
diff --git a/zlib/contrib/nuget/nuget.sln b/zlib/contrib/nuget/nuget.sln
new file mode 100644
index 00000000..46ee8dea
--- /dev/null
+++ b/zlib/contrib/nuget/nuget.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nuget", "nuget.csproj", "{B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/zlib/contrib/vstudio/vc17/miniunz.vcxproj b/zlib/contrib/vstudio/vc17/miniunz.vcxproj
new file mode 100644
index 00000000..68ef1658
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/miniunz.vcxproj
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694382A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <OutDir>arm64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir>arm64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <OutDir>arm64\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir>arm64\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>arm\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir>arm\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>arm\MiniUnzip$(Configuration)\</OutDir>
+ <IntDir>arm\MiniUnzip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)miniunz.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)miniunz.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\miniunz.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/zlib/contrib/vstudio/vc17/minizip.vcxproj b/zlib/contrib/vstudio/vc17/minizip.vcxproj
new file mode 100644
index 00000000..dd3c52e7
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/minizip.vcxproj
@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\MiniZip$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <OutDir>arm64\MiniZip$(Configuration)\</OutDir>
+ <IntDir>arm64\MiniZip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <OutDir>arm64\MiniZip$(Configuration)\</OutDir>
+ <IntDir>arm64\MiniZip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>arm\MiniZip$(Configuration)\</OutDir>
+ <IntDir>arm\MiniZip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>arm\MiniZip$(Configuration)\</OutDir>
+ <IntDir>arm\MiniZip$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)minizip.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)minizip.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\minizip\minizip.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/zlib/contrib/vstudio/vc17/testzlib.vcxproj b/zlib/contrib/vstudio/vc17/testzlib.vcxproj
new file mode 100644
index 00000000..4cc99b3f
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/testzlib.vcxproj
@@ -0,0 +1,473 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|ARM">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|ARM64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}</ProjectGuid>
+ <RootNamespace>testzlib</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlib$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlib$(Configuration)\Tmp\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <OutDir>arm64\TestZlib$(Configuration)\</OutDir>
+ <IntDir>arm64\TestZlib$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <OutDir>arm64\TestZlib$(Configuration)\</OutDir>
+ <IntDir>arm64\TestZlib$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">
+ <OutDir>arm64\TestZlib$(Configuration)\</OutDir>
+ <IntDir>arm64\TestZlib$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>arm\TestZlib$(Configuration)\</OutDir>
+ <IntDir>arm\TestZlib$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>arm\TestZlib$(Configuration)\</OutDir>
+ <IntDir>arm\TestZlib$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">
+ <OutDir>arm\TestZlib$(Configuration)\</OutDir>
+ <IntDir>arm\TestZlib$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlib.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj b/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj
new file mode 100644
index 00000000..73bba55d
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj
@@ -0,0 +1,409 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C52F9E7B-498A-42BE-8DB4-85A15694366A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <OutDir>arm64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <OutDir>arm64\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm64\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>arm\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>arm\TestZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm\TestZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x86\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllDebug\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <OmitFramePointers>true</OmitFramePointers>
+ <AdditionalIncludeDirectories>..\..\..;..\..\minizip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>x64\ZlibDllRelease\zlibwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)testzlibdll.exe</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testzlib\testzlib.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="zlibvc.vcxproj">
+ <Project>{8fd826f8-3739-44e6-8cc8-997122e53b8d}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/zlib/contrib/vstudio/vc17/zlib.rc b/zlib/contrib/vstudio/vc17/zlib.rc
new file mode 100644
index 00000000..a55f341c
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/zlib.rc
@@ -0,0 +1,32 @@
+#include <windows.h>
+
+#define IDR_VERSION1 1
+IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
+ FILEVERSION 1, 3, 1, 0
+ PRODUCTVERSION 1, 3, 1, 0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_DOS_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0 // not used
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ //language ID = U.S. English, char set = Windows, Multilingual
+
+ BEGIN
+ VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
+ VALUE "FileVersion", "1.3.1\0"
+ VALUE "InternalName", "zlib\0"
+ VALUE "OriginalFilename", "zlibwapi.dll\0"
+ VALUE "ProductName", "ZLib.DLL\0"
+ VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
+ VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 1252
+ END
+END
diff --git a/zlib/contrib/vstudio/vc17/zlibstat.vcxproj b/zlib/contrib/vstudio/vc17/zlibstat.vcxproj
new file mode 100644
index 00000000..b946ac2a
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/zlibstat.vcxproj
@@ -0,0 +1,602 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|ARM">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|ARM64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <OutDir>arm64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir>arm64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <OutDir>arm64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir>arm64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">
+ <OutDir>arm64\ZlibStat$(Configuration)\</OutDir>
+ <IntDir>arm64\ZlibStat$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>arm\ZlibStat$(Configuration)\</OutDir>
+ <IntDir>arm\ZlibStat$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>arm\ZlibStat$(Configuration)\</OutDir>
+ <IntDir>arm\ZlibStat$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">
+ <OutDir>arm\ZlibStat$(Configuration)\</OutDir>
+ <IntDir>arm\ZlibStat$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Midl />
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>OldStyle</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Midl />
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Midl />
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">
+ <Midl />
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:ARM64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">
+ <Midl />
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Lib>
+ <AdditionalOptions>/MACHINE:ARM /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibstat.lib</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c" />
+ <ClCompile Include="..\..\minizip\zip.c" />
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/zlib/contrib/vstudio/vc17/zlibvc.def b/zlib/contrib/vstudio/vc17/zlibvc.def
new file mode 100644
index 00000000..53947cc3
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/zlibvc.def
@@ -0,0 +1,158 @@
+LIBRARY
+; zlib data compression and ZIP file I/O library
+
+VERSION 1.3.1
+
+EXPORTS
+ adler32 @1
+ compress @2
+ crc32 @3
+ deflate @4
+ deflateCopy @5
+ deflateEnd @6
+ deflateInit2_ @7
+ deflateInit_ @8
+ deflateParams @9
+ deflateReset @10
+ deflateSetDictionary @11
+ gzclose @12
+ gzdopen @13
+ gzerror @14
+ gzflush @15
+ gzopen @16
+ gzread @17
+ gzwrite @18
+ inflate @19
+ inflateEnd @20
+ inflateInit2_ @21
+ inflateInit_ @22
+ inflateReset @23
+ inflateSetDictionary @24
+ inflateSync @25
+ uncompress @26
+ zlibVersion @27
+ gzprintf @28
+ gzputc @29
+ gzgetc @30
+ gzseek @31
+ gzrewind @32
+ gztell @33
+ gzeof @34
+ gzsetparams @35
+ zError @36
+ inflateSyncPoint @37
+ get_crc_table @38
+ compress2 @39
+ gzputs @40
+ gzgets @41
+ inflateCopy @42
+ inflateBackInit_ @43
+ inflateBack @44
+ inflateBackEnd @45
+ compressBound @46
+ deflateBound @47
+ gzclearerr @48
+ gzungetc @49
+ zlibCompileFlags @50
+ deflatePrime @51
+ deflatePending @52
+
+ unzOpen @61
+ unzClose @62
+ unzGetGlobalInfo @63
+ unzGetCurrentFileInfo @64
+ unzGoToFirstFile @65
+ unzGoToNextFile @66
+ unzOpenCurrentFile @67
+ unzReadCurrentFile @68
+ unzOpenCurrentFile3 @69
+ unztell @70
+ unzeof @71
+ unzCloseCurrentFile @72
+ unzGetGlobalComment @73
+ unzStringFileNameCompare @74
+ unzLocateFile @75
+ unzGetLocalExtrafield @76
+ unzOpen2 @77
+ unzOpenCurrentFile2 @78
+ unzOpenCurrentFilePassword @79
+
+ zipOpen @80
+ zipOpenNewFileInZip @81
+ zipWriteInFileInZip @82
+ zipCloseFileInZip @83
+ zipClose @84
+ zipOpenNewFileInZip2 @86
+ zipCloseFileInZipRaw @87
+ zipOpen2 @88
+ zipOpenNewFileInZip3 @89
+
+ unzGetFilePos @100
+ unzGoToFilePos @101
+
+ fill_win32_filefunc @110
+
+; zlibwapi v1.2.4 added:
+ fill_win32_filefunc64 @111
+ fill_win32_filefunc64A @112
+ fill_win32_filefunc64W @113
+
+ unzOpen64 @120
+ unzOpen2_64 @121
+ unzGetGlobalInfo64 @122
+ unzGetCurrentFileInfo64 @124
+ unzGetCurrentFileZStreamPos64 @125
+ unztell64 @126
+ unzGetFilePos64 @127
+ unzGoToFilePos64 @128
+
+ zipOpen64 @130
+ zipOpen2_64 @131
+ zipOpenNewFileInZip64 @132
+ zipOpenNewFileInZip2_64 @133
+ zipOpenNewFileInZip3_64 @134
+ zipOpenNewFileInZip4_64 @135
+ zipCloseFileInZipRaw64 @136
+
+; zlib1 v1.2.4 added:
+ adler32_combine @140
+ crc32_combine @142
+ deflateSetHeader @144
+ deflateTune @145
+ gzbuffer @146
+ gzclose_r @147
+ gzclose_w @148
+ gzdirect @149
+ gzoffset @150
+ inflateGetHeader @156
+ inflateMark @157
+ inflatePrime @158
+ inflateReset2 @159
+ inflateUndermine @160
+
+; zlib1 v1.2.6 added:
+ gzgetc_ @161
+ inflateResetKeep @163
+ deflateResetKeep @164
+
+; zlib1 v1.2.7 added:
+ gzopen_w @165
+
+; zlib1 v1.2.8 added:
+ inflateGetDictionary @166
+ gzvprintf @167
+
+; zlib1 v1.2.9 added:
+ inflateCodesUsed @168
+ inflateValidate @169
+ uncompress2 @170
+ gzfread @171
+ gzfwrite @172
+ deflateGetDictionary @173
+ adler32_z @174
+ crc32_z @175
+
+; zlib1 v1.2.12 added:
+ crc32_combine_gen @176
+ crc32_combine_gen64 @177
+ crc32_combine_op @178
diff --git a/zlib/contrib/vstudio/vc17/zlibvc.sln b/zlib/contrib/vstudio/vc17/zlibvc.sln
new file mode 100644
index 00000000..67896b74
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/zlibvc.sln
@@ -0,0 +1,179 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33015.44
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcxproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlibdll", "testzlibdll.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcxproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcxproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ ReleaseWithoutAsm|ARM = ReleaseWithoutAsm|ARM
+ ReleaseWithoutAsm|ARM64 = ReleaseWithoutAsm|ARM64
+ ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
+ ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM.ActiveCfg = Debug|ARM
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM.Build.0 = Debug|ARM
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|ARM64.Build.0 = Debug|ARM64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM.ActiveCfg = Release|ARM
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM.Build.0 = Release|ARM
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM64.ActiveCfg = Release|ARM64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|ARM64.Build.0 = Release|ARM64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+ {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM.ActiveCfg = Debug|ARM
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM.Build.0 = Debug|ARM
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|ARM64.Build.0 = Debug|ARM64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM.ActiveCfg = Release|ARM
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM.Build.0 = Release|ARM
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM64.ActiveCfg = Release|ARM64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|ARM64.Build.0 = Release|ARM64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.ActiveCfg = Debug|ARM
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.Build.0 = Debug|ARM
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.Build.0 = Debug|ARM64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.ActiveCfg = Release|ARM
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.Build.0 = Release|ARM
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.ActiveCfg = Release|ARM64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.Build.0 = Release|ARM64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.ActiveCfg = ReleaseWithoutAsm|ARM
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.Build.0 = ReleaseWithoutAsm|ARM
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.ActiveCfg = ReleaseWithoutAsm|ARM64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.Build.0 = ReleaseWithoutAsm|ARM64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
+ {AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM.ActiveCfg = Debug|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM.Build.0 = Debug|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|ARM64.Build.0 = Debug|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM.ActiveCfg = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM.Build.0 = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM64.ActiveCfg = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|ARM64.Build.0 = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.ActiveCfg = Debug|ARM
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM.Build.0 = Debug|ARM
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|ARM64.Build.0 = Debug|ARM64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.ActiveCfg = Release|ARM
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM.Build.0 = Release|ARM
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.ActiveCfg = Release|ARM64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|ARM64.Build.0 = Release|ARM64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+ {48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM.ActiveCfg = Debug|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM.Build.0 = Debug|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|ARM64.Build.0 = Debug|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM.ActiveCfg = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM.Build.0 = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM64.ActiveCfg = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|ARM64.Build.0 = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM.ActiveCfg = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM.Build.0 = Release|ARM
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM64.ActiveCfg = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|ARM64.Build.0 = Release|ARM64
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32
+ {C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {EAA58685-56D9-43F2-8703-FD2CB020745E}
+ EndGlobalSection
+EndGlobal
diff --git a/zlib/contrib/vstudio/vc17/zlibvc.vcxproj b/zlib/contrib/vstudio/vc17/zlibvc.vcxproj
new file mode 100644
index 00000000..10a7a901
--- /dev/null
+++ b/zlib/contrib/vstudio/vc17/zlibvc.vcxproj
@@ -0,0 +1,875 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|ARM">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|ARM64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseWithoutAsm|x64">
+ <Configuration>ReleaseWithoutAsm</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8FD826F8-3739-44E6-8CC8-997122E53B8D}</ProjectGuid>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</GenerateManifest>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">zlibwapi</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">zlibwapi</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <OutDir>arm64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <OutDir>arm\ZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm\ZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <OutDir>arm64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">
+ <OutDir>arm64\ZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm64\ZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <OutDir>arm\ZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm\ZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">
+ <OutDir>arm\ZlibDll$(Configuration)\</OutDir>
+ <IntDir>arm\ZlibDll$(Configuration)\Tmp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|ARM'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>$(OutDir)zlibvc.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)zlibvc.pch</PrecompiledHeaderOutputFile>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
+ <BrowseInformation>
+ </BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x040c</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
+ <ProgramDatabaseFile>$(OutDir)zlibwapi.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)zlibwapi.map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\adler32.c" />
+ <ClCompile Include="..\..\..\compress.c" />
+ <ClCompile Include="..\..\..\crc32.c" />
+ <ClCompile Include="..\..\..\deflate.c" />
+ <ClCompile Include="..\..\..\gzclose.c" />
+ <ClCompile Include="..\..\..\gzlib.c" />
+ <ClCompile Include="..\..\..\gzread.c" />
+ <ClCompile Include="..\..\..\gzwrite.c" />
+ <ClCompile Include="..\..\..\infback.c" />
+ <ClCompile Include="..\..\..\inffast.c" />
+ <ClCompile Include="..\..\..\inflate.c" />
+ <ClCompile Include="..\..\..\inftrees.c" />
+ <ClCompile Include="..\..\minizip\ioapi.c" />
+ <ClCompile Include="..\..\minizip\iowin32.c" />
+ <ClCompile Include="..\..\..\trees.c" />
+ <ClCompile Include="..\..\..\uncompr.c" />
+ <ClCompile Include="..\..\minizip\unzip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\minizip\zip.c">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="zlib.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="zlibvc.def" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\deflate.h" />
+ <ClInclude Include="..\..\..\infblock.h" />
+ <ClInclude Include="..\..\..\infcodes.h" />
+ <ClInclude Include="..\..\..\inffast.h" />
+ <ClInclude Include="..\..\..\inftrees.h" />
+ <ClInclude Include="..\..\..\infutil.h" />
+ <ClInclude Include="..\..\..\zconf.h" />
+ <ClInclude Include="..\..\..\zlib.h" />
+ <ClInclude Include="..\..\..\zutil.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/zlib/deflate.c b/zlib/deflate.c
index bd011751..012ea814 100644
--- a/zlib/deflate.c
+++ b/zlib/deflate.c
@@ -1,5 +1,5 @@
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
+ * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -52,7 +52,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.3 Copyright 1995-2023 Jean-loup Gailly and Mark Adler ";
+ " deflate 1.3.1 Copyright 1995-2024 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -493,7 +493,7 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
* symbols from which it is being constructed.
*/
- s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
+ s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS);
s->pending_buf_size = (ulg)s->lit_bufsize * 4;
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
@@ -503,8 +503,14 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
deflateEnd (strm);
return Z_MEM_ERROR;
}
+#ifdef LIT_MEM
+ s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1));
+ s->l_buf = s->pending_buf + (s->lit_bufsize << 2);
+ s->sym_end = s->lit_bufsize - 1;
+#else
s->sym_buf = s->pending_buf + s->lit_bufsize;
s->sym_end = (s->lit_bufsize - 1) * 3;
+#endif
/* We avoid equality with lit_bufsize*3 because of wraparound at 64K
* on 16 bit machines and because stored blocks are restricted to
* 64K-1 bytes.
@@ -720,9 +726,15 @@ int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
+#ifdef LIT_MEM
+ if (bits < 0 || bits > 16 ||
+ (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3))
+ return Z_BUF_ERROR;
+#else
if (bits < 0 || bits > 16 ||
s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
return Z_BUF_ERROR;
+#endif
do {
put = Buf_size - s->bi_valid;
if (put > bits)
@@ -1294,7 +1306,7 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos));
ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos));
- ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, 4);
+ ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS);
if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
ds->pending_buf == Z_NULL) {
@@ -1305,10 +1317,15 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos));
zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos));
- zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
+ zmemcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS);
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
+#ifdef LIT_MEM
+ ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1));
+ ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2);
+#else
ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
+#endif
ds->l_desc.dyn_tree = ds->dyn_ltree;
ds->d_desc.dyn_tree = ds->dyn_dtree;
@@ -1539,13 +1556,21 @@ local uInt longest_match(deflate_state *s, IPos cur_match) {
*/
local void check_match(deflate_state *s, IPos start, IPos match, int length) {
/* check that the match is indeed a match */
- if (zmemcmp(s->window + match,
- s->window + start, length) != EQUAL) {
- fprintf(stderr, " start %u, match %u, length %d\n",
- start, match, length);
+ Bytef *back = s->window + (int)match, *here = s->window + start;
+ IPos len = length;
+ if (match == (IPos)-1) {
+ /* match starts one byte before the current window -- just compare the
+ subsequent length-1 bytes */
+ back++;
+ here++;
+ len--;
+ }
+ if (zmemcmp(back, here, len) != EQUAL) {
+ fprintf(stderr, " start %u, match %d, length %d\n",
+ start, (int)match, length);
do {
- fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
- } while (--length != 0);
+ fprintf(stderr, "(%02x %02x)", *back++, *here++);
+ } while (--len != 0);
z_error("invalid match");
}
if (z_verbose > 1) {
diff --git a/zlib/deflate.h b/zlib/deflate.h
index 86967914..300c6ada 100644
--- a/zlib/deflate.h
+++ b/zlib/deflate.h
@@ -1,5 +1,5 @@
/* deflate.h -- internal compression state
- * Copyright (C) 1995-2018 Jean-loup Gailly
+ * Copyright (C) 1995-2024 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -23,6 +23,10 @@
# define GZIP
#endif
+/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at
+ the cost of a larger memory footprint */
+/* #define LIT_MEM */
+
/* ===========================================================================
* Internal compression state.
*/
@@ -217,7 +221,14 @@ typedef struct internal_state {
/* Depth of each subtree used as tie breaker for trees of equal frequency
*/
+#ifdef LIT_MEM
+# define LIT_BUFS 5
+ ushf *d_buf; /* buffer for distances */
+ uchf *l_buf; /* buffer for literals/lengths */
+#else
+# define LIT_BUFS 4
uchf *sym_buf; /* buffer for distances and literals/lengths */
+#endif
uInt lit_bufsize;
/* Size of match buffer for literals/lengths. There are 4 reasons for
@@ -239,7 +250,7 @@ typedef struct internal_state {
* - I can't count above 4
*/
- uInt sym_next; /* running index in sym_buf */
+ uInt sym_next; /* running index in symbol buffer */
uInt sym_end; /* symbol table full when sym_next reaches this */
ulg opt_len; /* bit length of current block with optimal trees */
@@ -318,6 +329,25 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
extern const uch ZLIB_INTERNAL _dist_code[];
#endif
+#ifdef LIT_MEM
+# define _tr_tally_lit(s, c, flush) \
+ { uch cc = (c); \
+ s->d_buf[s->sym_next] = 0; \
+ s->l_buf[s->sym_next++] = cc; \
+ s->dyn_ltree[cc].Freq++; \
+ flush = (s->sym_next == s->sym_end); \
+ }
+# define _tr_tally_dist(s, distance, length, flush) \
+ { uch len = (uch)(length); \
+ ush dist = (ush)(distance); \
+ s->d_buf[s->sym_next] = dist; \
+ s->l_buf[s->sym_next++] = len; \
+ dist--; \
+ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
+ s->dyn_dtree[d_code(dist)].Freq++; \
+ flush = (s->sym_next == s->sym_end); \
+ }
+#else
# define _tr_tally_lit(s, c, flush) \
{ uch cc = (c); \
s->sym_buf[s->sym_next++] = 0; \
@@ -337,6 +367,7 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
s->dyn_dtree[d_code(dist)].Freq++; \
flush = (s->sym_next == s->sym_end); \
}
+#endif
#else
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
# define _tr_tally_dist(s, distance, length, flush) \
diff --git a/zlib/gzguts.h b/zlib/gzguts.h
index f9375047..eba72085 100644
--- a/zlib/gzguts.h
+++ b/zlib/gzguts.h
@@ -1,5 +1,5 @@
/* gzguts.h -- zlib internal header definitions for gz* operations
- * Copyright (C) 2004-2019 Mark Adler
+ * Copyright (C) 2004-2024 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -210,9 +210,5 @@ char ZLIB_INTERNAL *gz_strwinerror(DWORD error);
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
value -- needed when comparing unsigned to z_off64_t, which is signed
(possible z_off64_t types off_t, off64_t, and long are all signed) */
-#ifdef INT_MAX
-# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
-#else
unsigned ZLIB_INTERNAL gz_intmax(void);
-# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
-#endif
+#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
diff --git a/zlib/gzlib.c b/zlib/gzlib.c
index 29fc4486..983153cc 100644
--- a/zlib/gzlib.c
+++ b/zlib/gzlib.c
@@ -1,5 +1,5 @@
/* gzlib.c -- zlib functions common to reading and writing gzip files
- * Copyright (C) 2004-2019 Mark Adler
+ * Copyright (C) 2004-2024 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -563,20 +563,20 @@ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) {
#endif
}
-#ifndef INT_MAX
/* portably return maximum value for an int (when limits.h presumed not
available) -- we need to do this to cover cases where 2's complement not
used, since C standard permits 1's complement and sign-bit representations,
otherwise we could just use ((unsigned)-1) >> 1 */
unsigned ZLIB_INTERNAL gz_intmax(void) {
- unsigned p, q;
-
- p = 1;
+#ifdef INT_MAX
+ return INT_MAX;
+#else
+ unsigned p = 1, q;
do {
q = p;
p <<= 1;
p++;
} while (p > q);
return q >> 1;
-}
#endif
+}
diff --git a/zlib/inflate.c b/zlib/inflate.c
index b0757a9b..94ecff01 100644
--- a/zlib/inflate.c
+++ b/zlib/inflate.c
@@ -1387,7 +1387,7 @@ int ZEXPORT inflateSync(z_streamp strm) {
/* if first time, start search in bit buffer */
if (state->mode != SYNC) {
state->mode = SYNC;
- state->hold <<= state->bits & 7;
+ state->hold >>= state->bits & 7;
state->bits -= state->bits & 7;
len = 0;
while (state->bits >= 8) {
diff --git a/zlib/inftrees.c b/zlib/inftrees.c
index 8a208c2d..98cfe164 100644
--- a/zlib/inftrees.c
+++ b/zlib/inftrees.c
@@ -1,5 +1,5 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2023 Mark Adler
+ * Copyright (C) 1995-2024 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate_copyright[] =
- " inflate 1.3 Copyright 1995-2023 Mark Adler ";
+ " inflate 1.3.1 Copyright 1995-2024 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -57,7 +57,7 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
diff --git a/zlib/inftrees.h b/zlib/inftrees.h
index a10712d8..396f74b5 100644
--- a/zlib/inftrees.h
+++ b/zlib/inftrees.h
@@ -41,8 +41,8 @@ typedef struct {
examples/enough.c found in the zlib distribution. The arguments to that
program are the number of symbols, the initial root table size, and the
maximum bit length of a code. "enough 286 9 15" for literal/length codes
- returns returns 852, and "enough 30 6 15" for distance codes returns 592.
- The initial root table size (9 or 6) is found in the fifth argument of the
+ returns 852, and "enough 30 6 15" for distance codes returns 592. The
+ initial root table size (9 or 6) is found in the fifth argument of the
inflate_table() calls in inflate.c and infback.c. If the root table size is
changed, then these maximum sizes would be need to be recalculated and
updated. */
diff --git a/zlib/qnx/package.qpg b/zlib/qnx/package.qpg
index d882af2b..4877e0ef 100644
--- a/zlib/qnx/package.qpg
+++ b/zlib/qnx/package.qpg
@@ -25,10 +25,10 @@
<QPG:Files>
<QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
<QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
- <QPG:Add file="../libz.so.1.3.0" install="/opt/lib/" user="root:bin" permission="644"/>
- <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.3.0"/>
- <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.3.0"/>
- <QPG:Add file="../libz.so.1.3.0" install="/opt/lib/" component="slib"/>
+ <QPG:Add file="../libz.so.1.3.1" install="/opt/lib/" user="root:bin" permission="644"/>
+ <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.3.1"/>
+ <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.3.1"/>
+ <QPG:Add file="../libz.so.1.3.1" install="/opt/lib/" component="slib"/>
</QPG:Files>
<QPG:PackageFilter>
@@ -63,7 +63,7 @@
</QPM:ProductDescription>
<QPM:ReleaseDescription>
- <QPM:ReleaseVersion>1.3.0</QPM:ReleaseVersion>
+ <QPM:ReleaseVersion>1.3.1</QPM:ReleaseVersion>
<QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
<QPM:ReleaseStability>Stable</QPM:ReleaseStability>
<QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
diff --git a/zlib/treebuild.xml b/zlib/treebuild.xml
index 1d1b0077..930b00be 100644
--- a/zlib/treebuild.xml
+++ b/zlib/treebuild.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
-<package name="zlib" version="1.3">
- <library name="zlib" dlversion="1.3" dlname="z">
+<package name="zlib" version="1.3.1">
+ <library name="zlib" dlversion="1.3.1" dlname="z">
<property name="description"> zip compression library </property>
<property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
diff --git a/zlib/trees.c b/zlib/trees.c
index 8dbdc40b..6a523ef3 100644
--- a/zlib/trees.c
+++ b/zlib/trees.c
@@ -1,5 +1,5 @@
/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2021 Jean-loup Gailly
+ * Copyright (C) 1995-2024 Jean-loup Gailly
* detect_data_type() function provided freely by Cosmin Truta, 2006
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -899,14 +899,19 @@ local void compress_block(deflate_state *s, const ct_data *ltree,
const ct_data *dtree) {
unsigned dist; /* distance of matched string */
int lc; /* match length or unmatched char (if dist == 0) */
- unsigned sx = 0; /* running index in sym_buf */
+ unsigned sx = 0; /* running index in symbol buffers */
unsigned code; /* the code to send */
int extra; /* number of extra bits to send */
if (s->sym_next != 0) do {
+#ifdef LIT_MEM
+ dist = s->d_buf[sx];
+ lc = s->l_buf[sx++];
+#else
dist = s->sym_buf[sx++] & 0xff;
dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
lc = s->sym_buf[sx++];
+#endif
if (dist == 0) {
send_code(s, lc, ltree); /* send a literal byte */
Tracecv(isgraph(lc), (stderr," '%c' ", lc));
@@ -931,8 +936,12 @@ local void compress_block(deflate_state *s, const ct_data *ltree,
}
} /* literal or match pair ? */
- /* Check that the overlay between pending_buf and sym_buf is ok: */
+ /* Check for no overlay of pending_buf on needed symbols */
+#ifdef LIT_MEM
+ Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow");
+#else
Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
+#endif
} while (sx < s->sym_next);
@@ -1082,9 +1091,14 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf,
* the current block must be flushed.
*/
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {
+#ifdef LIT_MEM
+ s->d_buf[s->sym_next] = (ush)dist;
+ s->l_buf[s->sym_next++] = (uch)lc;
+#else
s->sym_buf[s->sym_next++] = (uch)dist;
s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
s->sym_buf[s->sym_next++] = (uch)lc;
+#endif
if (dist == 0) {
/* lc is the unmatched char */
s->dyn_ltree[lc].Freq++;
diff --git a/zlib/win32/DLL_FAQ.txt b/zlib/win32/DLL_FAQ.txt
index 12c00901..d8cf5f31 100644
--- a/zlib/win32/DLL_FAQ.txt
+++ b/zlib/win32/DLL_FAQ.txt
@@ -3,7 +3,7 @@
This document describes the design, the rationale, and the usage
-of the official DLL build of zlib, named ZLIB1.DLL. If you have
+of the common DLL build of zlib, named ZLIB1.DLL. If you have
general questions about zlib, you should see the file "FAQ" found
in the zlib distribution, or at the following location:
http://www.gzip.org/zlib/zlib_faq.html
@@ -11,13 +11,9 @@ in the zlib distribution, or at the following location:
1. What is ZLIB1.DLL, and how can I get it?
- - ZLIB1.DLL is the official build of zlib as a DLL.
+ - ZLIB1.DLL is the common build of zlib as a DLL.
(Please remark the character '1' in the name.)
- Pointers to a precompiled ZLIB1.DLL can be found in the zlib
- web site at:
- http://www.zlib.net/
-
Applications that link to ZLIB1.DLL can rely on the following
specification:
@@ -379,18 +375,6 @@ in the zlib distribution, or at the following location:
code. But you can make your own private DLL build, under a
different file name, as suggested in the previous answer.
-
-17. I made my own ZLIB1.DLL build. Can I test it for compliance?
-
- - We prefer that you download the official DLL from the zlib
- web site. If you need something peculiar from this DLL, you
- can send your suggestion to the zlib mailing list.
-
- However, in case you do rebuild the DLL yourself, you can run
- it with the test programs found in the DLL distribution.
- Running these test programs is not a guarantee of compliance,
- but a failure can imply a detected problem.
-
**
This document is written and maintained by
diff --git a/zlib/win32/README-WIN32.txt b/zlib/win32/README-WIN32.txt
index 384c988f..14e6398e 100644
--- a/zlib/win32/README-WIN32.txt
+++ b/zlib/win32/README-WIN32.txt
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.3.0 is a general purpose data compression library. All the code is
+zlib 1.3.1 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -16,13 +16,13 @@ is http://zlib.net/ . Before reporting a problem, please check this site to
verify that you have the latest version of zlib; otherwise get the latest
version and check whether the problem still exists or not.
-PLEASE read DLL_FAQ.txt, and the the zlib FAQ http://zlib.net/zlib_faq.html
-before asking for help.
+PLEASE read DLL_FAQ.txt, and the zlib FAQ http://zlib.net/zlib_faq.html before
+asking for help.
Manifest:
-The package zlib-1.3.0-win32-x86.zip will contain the following files:
+The package zlib-1.3.1-win32-x86.zip will contain the following files:
README-WIN32.txt This document
ChangeLog Changes since previous zlib packages
diff --git a/zlib/zconf.h.cmakein b/zlib/zconf.h.cmakein
index 310c4392..0abe3bc9 100644
--- a/zlib/zconf.h.cmakein
+++ b/zlib/zconf.h.cmakein
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
+ * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -302,14 +302,6 @@
# endif
#endif
-#ifndef Z_ARG /* function prototypes for stdarg */
-# if defined(STDC) || defined(Z_HAVE_STDARG_H)
-# define Z_ARG(args) args
-# else
-# define Z_ARG(args) ()
-# endif
-#endif
-
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
diff --git a/zlib/zconf.h.in b/zlib/zconf.h.in
index fb76ffe3..62adc8d8 100644
--- a/zlib/zconf.h.in
+++ b/zlib/zconf.h.in
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
+ * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -300,14 +300,6 @@
# endif
#endif
-#ifndef Z_ARG /* function prototypes for stdarg */
-# if defined(STDC) || defined(Z_HAVE_STDARG_H)
-# define Z_ARG(args) args
-# else
-# define Z_ARG(args) ()
-# endif
-#endif
-
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
diff --git a/zlib/zlib.3 b/zlib/zlib.3
index 4dd28967..c716020e 100644
--- a/zlib/zlib.3
+++ b/zlib/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "18 Aug 2023"
+.TH ZLIB 3 "22 Jan 2024"
.SH NAME
zlib \- compression/decompression library
.SH SYNOPSIS
@@ -105,9 +105,9 @@ before asking for help.
Send questions and/or comments to zlib@gzip.org,
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
.SH AUTHORS AND LICENSE
-Version 1.3
+Version 1.3.1
.LP
-Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
+Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
.LP
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/zlib/zlib.h b/zlib/zlib.h
index da09785e..32dc34b6 100644
--- a/zlib/zlib.h
+++ b/zlib/zlib.h
@@ -1,7 +1,7 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.3, August 18th, 2023
+ version 1.3.1, January 22nd, 2024
- Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -37,11 +37,11 @@
extern "C" {
#endif
-#define ZLIB_VERSION "1.3"
-#define ZLIB_VERNUM 0x1300
+#define ZLIB_VERSION "1.3.1"
+#define ZLIB_VERNUM 0x1310
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 3
-#define ZLIB_VER_REVISION 0
+#define ZLIB_VER_REVISION 1
#define ZLIB_VER_SUBREVISION 0
/*
@@ -936,10 +936,10 @@ ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
inflateSync returns Z_OK if a possible full flush point has been found,
Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
- In the success case, the application may save the current current value of
- total_in which indicates where valid compressed data was found. In the
- error case, the application may repeatedly call inflateSync, providing more
- input each time, until success or end of the input data.
+ In the success case, the application may save the current value of total_in
+ which indicates where valid compressed data was found. In the error case,
+ the application may repeatedly call inflateSync, providing more input each
+ time, until success or end of the input data.
*/
ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
@@ -1758,14 +1758,14 @@ ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
- len2.
+ len2. len2 must be non-negative.
*/
/*
ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
Return the operator corresponding to length len2, to be used with
- crc32_combine_op().
+ crc32_combine_op(). len2 must be non-negative.
*/
ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
diff --git a/zlib/zutil.h b/zlib/zutil.h
index 902a304c..48dd7feb 100644
--- a/zlib/zutil.h
+++ b/zlib/zutil.h
@@ -1,5 +1,5 @@
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler
+ * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -56,7 +56,7 @@ typedef unsigned long ulg;
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
+#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)]
#define ERR_RETURN(strm,err) \
return (strm->msg = ERR_MSG(err), (err))
@@ -137,17 +137,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#if defined(MACOS) || defined(TARGET_OS_MAC)
+#if defined(MACOS)
# define OS_CODE 7
-# ifndef Z_SOLO
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-# include <unix.h> /* for fdopen */
-# else
-# ifndef fdopen
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# endif
-# endif
-# endif
#endif
#ifdef __acorn
@@ -170,18 +161,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define OS_CODE 19
#endif
-#if defined(_BEOS_) || defined(RISCOS)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
-# if defined(_WIN32_WCE)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-# else
-# define fdopen(fd,type) _fdopen(fd,type)
-# endif
-#endif
-
#if defined(__BORLANDC__) && !defined(MSDOS)
#pragma warn -8004
#pragma warn -8008